diff options
author | Alistair Popple <alistair@popple.id.au> | 2015-05-15 14:06:37 +1000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2015-05-22 15:14:37 +1000 |
commit | 9f0fd0499d30dbd61632463f293e2e826fa363b1 (patch) | |
tree | 527965017e7b30ed58d31a1cf1236313b4e9e7e4 /arch/powerpc/include/asm/opal.h | |
parent | 96e023e7534c16ab54e236c114340e2447c36d2f (diff) | |
download | op-kernel-dev-9f0fd0499d30dbd61632463f293e2e826fa363b1.zip op-kernel-dev-9f0fd0499d30dbd61632463f293e2e826fa363b1.tar.gz |
powerpc/powernv: Add a virtual irqchip for opal events
Whenever an interrupt is received for opal the linux kernel gets a
bitfield indicating certain events that have occurred and need handling
by the various device drivers. Currently this is handled using a
notifier interface where we call every device driver that has
registered to receive opal events.
This approach has several drawbacks. For example each driver has to do
its own checking to see if the event is relevant as well as event
masking. There is also no easy method of recording the number of times
we receive particular events.
This patch solves these issues by exposing opal events via the
standard interrupt APIs by adding a new interrupt chip and
domain. Drivers can then register for the appropriate events using
standard kernel calls such as irq_of_parse_and_map().
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/include/asm/opal.h')
-rw-r--r-- | arch/powerpc/include/asm/opal.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/opal.h b/arch/powerpc/include/asm/opal.h index dcdf83c..1412814 100644 --- a/arch/powerpc/include/asm/opal.h +++ b/arch/powerpc/include/asm/opal.h @@ -243,6 +243,7 @@ extern void opal_msglog_init(void); extern int opal_async_comp_init(void); extern int opal_sensor_init(void); extern int opal_hmi_handler_init(void); +extern int opal_event_init(void); extern int opal_machine_check(struct pt_regs *regs); extern bool opal_mce_check_early_recovery(struct pt_regs *regs); @@ -254,6 +255,8 @@ extern int opal_resync_timebase(void); extern void opal_lpc_init(void); +extern int opal_event_request(unsigned int opal_event_nr); + struct opal_sg_list *opal_vmalloc_to_sg_list(void *vmalloc_addr, unsigned long vmalloc_size); void opal_free_sg_list(struct opal_sg_list *sg); |