]>
Commit | Line | Data |
---|---|---|
00e5a55c BS |
1 | From: Suresh Siddha <suresh.b.siddha@intel.com> |
2 | Subject: x64, x2apic/intr-remap: 8259 specific mask/unmask routines | |
3 | References: fate #303948 and fate #303984 | |
4 | Patch-Mainline: queued for .28 | |
5 | Commit-ID: d94d93ca5cc36cd78c532def62772c98fe8ba5d7 | |
6 | ||
7 | Signed-off-by: Thomas Renninger <trenn@suse.de> | |
8 | ||
9 | 8259 specific mask/unmask routines which be used later while enabling | |
10 | interrupt-remapping. | |
11 | ||
12 | Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> | |
13 | Cc: akpm@linux-foundation.org | |
14 | Cc: arjan@linux.intel.com | |
15 | Cc: andi@firstfloor.org | |
16 | Cc: ebiederm@xmission.com | |
17 | Cc: jbarnes@virtuousgeek.org | |
18 | Cc: steiner@sgi.com | |
19 | Signed-off-by: Ingo Molnar <mingo@elte.hu> | |
20 | ||
21 | --- | |
22 | arch/x86/kernel/i8259.c | 24 ++++++++++++++++++++++++ | |
23 | include/asm-x86/i8259.h | 3 +++ | |
24 | 2 files changed, 27 insertions(+) | |
25 | ||
26 | Index: linux-2.6.26/arch/x86/kernel/i8259.c | |
27 | =================================================================== | |
28 | --- linux-2.6.26.orig/arch/x86/kernel/i8259.c | |
29 | +++ linux-2.6.26/arch/x86/kernel/i8259.c | |
30 | @@ -282,6 +282,30 @@ static int __init i8259A_init_sysfs(void | |
31 | ||
32 | device_initcall(i8259A_init_sysfs); | |
33 | ||
34 | +void mask_8259A(void) | |
35 | +{ | |
36 | + unsigned long flags; | |
37 | + | |
38 | + spin_lock_irqsave(&i8259A_lock, flags); | |
39 | + | |
40 | + outb(0xff, PIC_MASTER_IMR); /* mask all of 8259A-1 */ | |
41 | + outb(0xff, PIC_SLAVE_IMR); /* mask all of 8259A-2 */ | |
42 | + | |
43 | + spin_unlock_irqrestore(&i8259A_lock, flags); | |
44 | +} | |
45 | + | |
46 | +void unmask_8259A(void) | |
47 | +{ | |
48 | + unsigned long flags; | |
49 | + | |
50 | + spin_lock_irqsave(&i8259A_lock, flags); | |
51 | + | |
52 | + outb(cached_master_mask, PIC_MASTER_IMR); /* restore master IRQ mask */ | |
53 | + outb(cached_slave_mask, PIC_SLAVE_IMR); /* restore slave IRQ mask */ | |
54 | + | |
55 | + spin_unlock_irqrestore(&i8259A_lock, flags); | |
56 | +} | |
57 | + | |
58 | void init_8259A(int auto_eoi) | |
59 | { | |
60 | unsigned long flags; | |
61 | Index: linux-2.6.26/include/asm-x86/i8259.h | |
62 | =================================================================== | |
63 | --- linux-2.6.26.orig/include/asm-x86/i8259.h | |
64 | +++ linux-2.6.26/include/asm-x86/i8259.h | |
65 | @@ -57,4 +57,7 @@ static inline void outb_pic(unsigned cha | |
66 | ||
67 | extern struct irq_chip i8259A_chip; | |
68 | ||
69 | +extern void mask_8259A(void); | |
70 | +extern void unmask_8259A(void); | |
71 | + | |
72 | #endif /* __ASM_I8259_H__ */ |