aboutsummaryrefslogtreecommitdiff
path: root/asm
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-10-24 10:06:49 +1100
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-10-24 10:07:19 +1100
commit531bdefda91102cb3240e4e3289900af0a50e78b (patch)
treecc95231a4ce4a0ae05e7d123eaac4bd9beedef2d /asm
parentbed82938878cff16c539c1c6b3887b2cf65b4f57 (diff)
downloadskiboot-531bdefda91102cb3240e4e3289900af0a50e78b.zip
skiboot-531bdefda91102cb3240e4e3289900af0a50e78b.tar.gz
skiboot-531bdefda91102cb3240e4e3289900af0a50e78b.tar.bz2
irq/occ/opal: Add self-sent dummy interrupt
This makes OPAL use the OCC interrupt facility to send itself an interrupt whenever the OPAL event bit is set as a result of an OPAL call that wasn't itself opal_handle_interrupt() or opal_handle_hmi() (both of which we know the OS will already deal with appropriately). This ensures that OPAL event changes are notified to Linux via its interrupt path which is necessary for it to properly broadcast the state change to its various clients. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'asm')
-rw-r--r--asm/asm-offsets.c1
-rw-r--r--asm/head.S3
2 files changed, 4 insertions, 0 deletions
diff --git a/asm/asm-offsets.c b/asm/asm-offsets.c
index 3440054..e33c181 100644
--- a/asm/asm-offsets.c
+++ b/asm/asm-offsets.c
@@ -35,6 +35,7 @@ int main(void)
OFFSET(CPUTHREAD_PIR, cpu_thread, pir);
OFFSET(CPUTHREAD_SAVE_R1, cpu_thread, save_r1);
OFFSET(CPUTHREAD_STATE, cpu_thread, state);
+ OFFSET(CPUTHREAD_CUR_TOKEN, cpu_thread, current_token);
OFFSET(STACK_TYPE, stack_frame, type);
OFFSET(STACK_LOCALS, stack_frame, locals);
diff --git a/asm/head.S b/asm/head.S
index 37a059d..a56f2bb 100644
--- a/asm/head.S
+++ b/asm/head.S
@@ -777,6 +777,9 @@ opal_entry:
/* Get the CPU thread */
GET_CPU()
+ /* Store token in CPU thread */
+ std %r0,CPUTHREAD_CUR_TOKEN(%r13)
+
/* Mark the stack frame */
li %r12,STACK_ENTRY_OPAL_API
std %r12,STACK_TYPE(%r1)