aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/kernel/i8259.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-07-26 16:29:23 +0200
committerIngo Molnar <mingo@elte.hu>2008-07-26 16:29:23 +0200
commit6dec3a10a7a6093af10cef7ac56021150afd6451 (patch)
treef4d8511f023e3e0c203baf889d4a0f3925882381 /arch/x86/kernel/i8259.c
parent29308333fbe2cc61258c1c470f9403960428beb2 (diff)
parent10a010f6953b5a14ba2f0be40a4fce1bea220875 (diff)
Merge branch 'x86/x2apic' into x86/core
Conflicts: include/asm-x86/i8259.h include/asm-x86/msidef.h Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/i8259.c')
-rw-r--r--arch/x86/kernel/i8259.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/x86/kernel/i8259.c b/arch/x86/kernel/i8259.c
index dc92b49d920..4b8a53d841f 100644
--- a/arch/x86/kernel/i8259.c
+++ b/arch/x86/kernel/i8259.c
@@ -282,6 +282,30 @@ static int __init i8259A_init_sysfs(void)
device_initcall(i8259A_init_sysfs);
+void mask_8259A(void)
+{
+ unsigned long flags;
+
+ spin_lock_irqsave(&i8259A_lock, flags);
+
+ outb(0xff, PIC_MASTER_IMR); /* mask all of 8259A-1 */
+ outb(0xff, PIC_SLAVE_IMR); /* mask all of 8259A-2 */
+
+ spin_unlock_irqrestore(&i8259A_lock, flags);
+}
+
+void unmask_8259A(void)
+{
+ unsigned long flags;
+
+ spin_lock_irqsave(&i8259A_lock, flags);
+
+ outb(cached_master_mask, PIC_MASTER_IMR); /* restore master IRQ mask */
+ outb(cached_slave_mask, PIC_SLAVE_IMR); /* restore slave IRQ mask */
+
+ spin_unlock_irqrestore(&i8259A_lock, flags);
+}
+
void init_8259A(int auto_eoi)
{
unsigned long flags;