summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Neuling <mikey@neuling.org>2016-05-02 15:26:15 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-05-10 15:36:14 +1000
commitd06349968edece9cab90d39abbd788e727aae75e (patch)
tree2b43860e156308989fbbb7acc99eb72aa6a94caa
parentbaaa518f79224d81c7193ea36b2b042910cc08ba (diff)
downloadtalos-skiboot-d06349968edece9cab90d39abbd788e727aae75e.tar.gz
talos-skiboot-d06349968edece9cab90d39abbd788e727aae75e.zip
Make trigger_attn() enable attn also
This changes trigger_attn() to also enable attn via HID0, so callers don't have to do it themselves. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r--asm/misc.S4
-rw-r--r--core/cpu.c16
-rw-r--r--hw/fsp/fsp-attn.c5
3 files changed, 18 insertions, 7 deletions
diff --git a/asm/misc.S b/asm/misc.S
index c8abdb9a..146b9c39 100644
--- a/asm/misc.S
+++ b/asm/misc.S
@@ -36,8 +36,8 @@ set_hid0:
isync
blr
-.global trigger_attn
-trigger_attn:
+.global __trigger_attn
+__trigger_attn:
sync
isync
attn
diff --git a/core/cpu.c b/core/cpu.c
index d347903f..d113d770 100644
--- a/core/cpu.c
+++ b/core/cpu.c
@@ -399,6 +399,22 @@ static void init_cpu_thread(struct cpu_thread *t,
assert(pir == container_of(t, struct cpu_stack, cpu) - cpu_stacks);
}
+static void enable_attn(void)
+{
+ unsigned long hid0;
+
+ hid0 = mfspr(SPR_HID0);
+ hid0 |= SPR_HID0_ENABLE_ATTN;
+ set_hid0(hid0);
+}
+
+extern void __trigger_attn(void);
+void trigger_attn(void)
+{
+ enable_attn();
+ __trigger_attn();
+}
+
void pre_init_boot_cpu(void)
{
struct cpu_thread *cpu = this_cpu();
diff --git a/hw/fsp/fsp-attn.c b/hw/fsp/fsp-attn.c
index 7b561926..ff702ab2 100644
--- a/hw/fsp/fsp-attn.c
+++ b/hw/fsp/fsp-attn.c
@@ -118,8 +118,6 @@ static void update_sp_attn_area(const char *msg)
void __attribute__((noreturn)) ibm_fsp_terminate(const char *msg)
{
- unsigned long hid0;
-
/* Update SP attention area */
update_sp_attn_area(msg);
@@ -133,9 +131,6 @@ void __attribute__((noreturn)) ibm_fsp_terminate(const char *msg)
* reboot loop.
*/
- hid0 = mfspr(SPR_HID0);
- hid0 |= SPR_HID0_ENABLE_ATTN;
- set_hid0(hid0);
trigger_attn();
for (;;) ;
}
OpenPOWER on IntegriCloud