From 5e09fe1f19d3f56b1cebb44439da5b5de6e1fccd Mon Sep 17 00:00:00 2001 From: Nicholas Piggin Date: Wed, 20 Sep 2017 16:56:03 +1000 Subject: core: POWER9 implement OPAL_SIGNAL_SYSTEM_RESET This implements OPAL_SIGNAL_SYSTEM_RESET, using scom registers to quiesce the target thread and raise a system reset exception on it. It has been tested on DD2 with stop0 ESL=0 and ESL=1 shallow power saving modes. DD1 is not implemented because it is sufficiently different as to make support difficult. Signed-off-by: Nicholas Piggin [stewart@linux.vnet.ibm.com: fixup hdat_to_dt test] Signed-off-by: Stewart Smith --- hdata/test/hdata_to_dt.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'hdata/test') diff --git a/hdata/test/hdata_to_dt.c b/hdata/test/hdata_to_dt.c index 155e41b..f597914 100644 --- a/hdata/test/hdata_to_dt.c +++ b/hdata/test/hdata_to_dt.c @@ -98,6 +98,21 @@ struct dt_node *add_ics_node(void) return NULL; } +// Copied from processor.h: +static inline bool is_power9n(uint32_t version) +{ + if (PVR_TYPE(version) != PVR_TYPE_P9) + return false; + /* + * Bit 13 tells us: + * 0 = Scale out (aka Nimbus) + * 1 = Scale up (aka Cumulus) + */ + if ((version >> 13) & 1) + return false; + return true; +} + #include #include -- cgit v1.1