lkml.org 
[lkml]   [2008]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch 12/26] x64, x2apic/intr-remap: 8259 specific mask/unmask routines
8259 specific mask/unmask routines which be used later while enabling
interrupt-remapping.

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
---
Index: tree-x86/arch/x86/kernel/i8259.c
===================================================================
--- tree-x86.orig/arch/x86/kernel/i8259.c 2008-07-10 09:51:45.000000000 -0700
+++ tree-x86/arch/x86/kernel/i8259.c 2008-07-10 09:52:09.000000000 -0700
@@ -282,6 +282,30 @@

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;
Index: tree-x86/include/asm-x86/i8259.h
===================================================================
--- tree-x86.orig/include/asm-x86/i8259.h 2008-07-10 09:51:45.000000000 -0700
+++ tree-x86/include/asm-x86/i8259.h 2008-07-10 09:52:09.000000000 -0700
@@ -57,4 +57,7 @@

extern struct irq_chip i8259A_chip;

+extern void mask_8259A(void);
+extern void unmask_8259A(void);
+
#endif /* __ASM_I8259_H__ */
--



\
 
 \ /
  Last update: 2008-07-10 20:57    [W:0.510 / U:0.524 seconds]
©2003-2014 Jasper Spaans. Advertise on this site