Skip to content

Commit 5f6fb45

Browse files
committed
Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (116 commits) x86: Enable forced interrupt threading support x86: Mark low level interrupts IRQF_NO_THREAD x86: Use generic show_interrupts x86: ioapic: Avoid redundant lookup of irq_cfg x86: ioapic: Use new move_irq functions x86: Use the proper accessors in fixup_irqs() x86: ioapic: Use irq_data->state x86: ioapic: Simplify irq chip and handler setup x86: Cleanup the genirq name space genirq: Add chip flag to force mask on suspend genirq: Add desc->irq_data accessor genirq: Add comments to Kconfig switches genirq: Fixup fasteoi handler for oneshot mode genirq: Provide forced interrupt threading sched: Switch wait_task_inactive to schedule_hrtimeout() genirq: Add IRQF_NO_THREAD genirq: Allow shared oneshot interrupts genirq: Prepare the handling of shared oneshot interrupts genirq: Make warning in handle_percpu_event useful x86: ioapic: Move trigger defines to io_apic.h ... Fix up trivial(?) conflicts in arch/x86/pci/xen.c due to genirq name space changes clashing with the Xen cleanups. The set_irq_msi() had moved to xen_bind_pirq_msi_to_irq().
2 parents 3904afb + c018580 commit 5f6fb45

35 files changed

+2112
-1120
lines changed

Documentation/kernel-parameters.txt

+4
Original file line numberDiff line numberDiff line change
@@ -2444,6 +2444,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
24442444
<deci-seconds>: poll all this frequency
24452445
0: no polling (default)
24462446

2447+
threadirqs [KNL]
2448+
Force threading of all interrupt handlers except those
2449+
marked explicitely IRQF_NO_THREAD.
2450+
24472451
topology= [S390]
24482452
Format: {off | on}
24492453
Specify if the kernel should make use of the cpu

arch/x86/Kconfig

+3-1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ config X86
6868
select GENERIC_FIND_NEXT_BIT
6969
select GENERIC_IRQ_PROBE
7070
select GENERIC_PENDING_IRQ if SMP
71+
select GENERIC_IRQ_SHOW
72+
select IRQ_FORCED_THREADING
7173
select USE_GENERIC_SMP_HELPERS if SMP
7274

7375
config INSTRUCTION_DECODER
@@ -813,7 +815,7 @@ config X86_LOCAL_APIC
813815

814816
config X86_IO_APIC
815817
def_bool y
816-
depends on X86_64 || SMP || X86_32_NON_STANDARD || X86_UP_APIC
818+
depends on X86_64 || SMP || X86_32_NON_STANDARD || X86_UP_IOAPIC
817819

818820
config X86_VISWS_APIC
819821
def_bool y

arch/x86/include/asm/apicdef.h

+12
Original file line numberDiff line numberDiff line change
@@ -426,4 +426,16 @@ struct local_apic {
426426
#else
427427
#define BAD_APICID 0xFFFFu
428428
#endif
429+
430+
enum ioapic_irq_destination_types {
431+
dest_Fixed = 0,
432+
dest_LowestPrio = 1,
433+
dest_SMI = 2,
434+
dest__reserved_1 = 3,
435+
dest_NMI = 4,
436+
dest_INIT = 5,
437+
dest__reserved_2 = 6,
438+
dest_ExtINT = 7
439+
};
440+
429441
#endif /* _ASM_X86_APICDEF_H */

arch/x86/include/asm/io_apic.h

+28-16
Original file line numberDiff line numberDiff line change
@@ -63,17 +63,6 @@ union IO_APIC_reg_03 {
6363
} __attribute__ ((packed)) bits;
6464
};
6565

66-
enum ioapic_irq_destination_types {
67-
dest_Fixed = 0,
68-
dest_LowestPrio = 1,
69-
dest_SMI = 2,
70-
dest__reserved_1 = 3,
71-
dest_NMI = 4,
72-
dest_INIT = 5,
73-
dest__reserved_2 = 6,
74-
dest_ExtINT = 7
75-
};
76-
7766
struct IO_APIC_route_entry {
7867
__u32 vector : 8,
7968
delivery_mode : 3, /* 000: FIXED
@@ -106,6 +95,10 @@ struct IR_IO_APIC_route_entry {
10695
index : 15;
10796
} __attribute__ ((packed));
10897

98+
#define IOAPIC_AUTO -1
99+
#define IOAPIC_EDGE 0
100+
#define IOAPIC_LEVEL 1
101+
109102
#ifdef CONFIG_X86_IO_APIC
110103

111104
/*
@@ -150,18 +143,15 @@ extern int timer_through_8259;
150143
#define io_apic_assign_pci_irqs \
151144
(mp_irq_entries && !skip_ioapic_setup && io_apic_irqs)
152145

153-
extern u8 io_apic_unique_id(u8 id);
154-
extern int io_apic_get_unique_id(int ioapic, int apic_id);
155-
extern int io_apic_get_version(int ioapic);
156-
extern int io_apic_get_redir_entries(int ioapic);
157-
158146
struct io_apic_irq_attr;
159147
extern int io_apic_set_pci_routing(struct device *dev, int irq,
160148
struct io_apic_irq_attr *irq_attr);
161149
void setup_IO_APIC_irq_extra(u32 gsi);
162150
extern void ioapic_and_gsi_init(void);
163151
extern void ioapic_insert_resources(void);
164152

153+
int io_apic_setup_irq_pin(unsigned int irq, int node, struct io_apic_irq_attr *attr);
154+
165155
extern struct IO_APIC_route_entry **alloc_ioapic_entries(void);
166156
extern void free_ioapic_entries(struct IO_APIC_route_entry **ioapic_entries);
167157
extern int save_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries);
@@ -186,6 +176,8 @@ extern void __init pre_init_apic_IRQ0(void);
186176

187177
extern void mp_save_irq(struct mpc_intsrc *m);
188178

179+
extern void disable_ioapic_support(void);
180+
189181
#else /* !CONFIG_X86_IO_APIC */
190182

191183
#define io_apic_assign_pci_irqs 0
@@ -199,6 +191,26 @@ static inline int mp_find_ioapic(u32 gsi) { return 0; }
199191
struct io_apic_irq_attr;
200192
static inline int io_apic_set_pci_routing(struct device *dev, int irq,
201193
struct io_apic_irq_attr *irq_attr) { return 0; }
194+
195+
static inline struct IO_APIC_route_entry **alloc_ioapic_entries(void)
196+
{
197+
return NULL;
198+
}
199+
200+
static inline void free_ioapic_entries(struct IO_APIC_route_entry **ent) { }
201+
static inline int save_IO_APIC_setup(struct IO_APIC_route_entry **ent)
202+
{
203+
return -ENOMEM;
204+
}
205+
206+
static inline void mask_IO_APIC_setup(struct IO_APIC_route_entry **ent) { }
207+
static inline int restore_IO_APIC_setup(struct IO_APIC_route_entry **ent)
208+
{
209+
return -ENOMEM;
210+
}
211+
212+
static inline void mp_save_irq(struct mpc_intsrc *m) { };
213+
static inline void disable_ioapic_support(void) { }
202214
#endif
203215

204216
#endif /* _ASM_X86_IO_APIC_H */

arch/x86/kernel/apic/apic.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
#include <asm/i8259.h>
4444
#include <asm/proto.h>
4545
#include <asm/apic.h>
46+
#include <asm/io_apic.h>
4647
#include <asm/desc.h>
4748
#include <asm/hpet.h>
4849
#include <asm/idle.h>
@@ -1209,7 +1210,7 @@ void __cpuinit setup_local_APIC(void)
12091210
rdtscll(tsc);
12101211

12111212
if (disable_apic) {
1212-
arch_disable_smp_support();
1213+
disable_ioapic_support();
12131214
return;
12141215
}
12151216

@@ -1448,7 +1449,7 @@ int __init enable_IR(void)
14481449
void __init enable_IR_x2apic(void)
14491450
{
14501451
unsigned long flags;
1451-
struct IO_APIC_route_entry **ioapic_entries = NULL;
1452+
struct IO_APIC_route_entry **ioapic_entries;
14521453
int ret, x2apic_enabled = 0;
14531454
int dmar_table_init_ret;
14541455

0 commit comments

Comments
 (0)