Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 48466
b: refs/heads/master
c: ee4eff6
h: refs/heads/master
v: v3
  • Loading branch information
Benjamin Romer authored and Andi Kleen committed Feb 13, 2007
1 parent 7e769fd commit 9ef4937
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 26 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a4af60aa64c828b7c047e7a67b2f896d4bfbd700
refs/heads/master: ee4eff6ff6cbfc8ce38131058a18802bf6206879
24 changes: 11 additions & 13 deletions trunk/arch/x86_64/kernel/io_apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -831,15 +831,15 @@ static void __init setup_IO_APIC_irq(int apic, int pin, int idx, int irq)
entry.delivery_mode = INT_DELIVERY_MODE;
entry.dest_mode = INT_DEST_MODE;
entry.mask = 0; /* enable IRQ */
entry.dest.logical.logical_dest = cpu_mask_to_apicid(TARGET_CPUS);
entry.dest = cpu_mask_to_apicid(TARGET_CPUS);

entry.trigger = irq_trigger(idx);
entry.polarity = irq_polarity(idx);

if (irq_trigger(idx)) {
entry.trigger = 1;
entry.mask = 1;
entry.dest.logical.logical_dest = cpu_mask_to_apicid(TARGET_CPUS);
entry.dest = cpu_mask_to_apicid(TARGET_CPUS);
}

if (!apic && !IO_APIC_IRQ(irq))
Expand All @@ -851,7 +851,7 @@ static void __init setup_IO_APIC_irq(int apic, int pin, int idx, int irq)
if (vector < 0)
return;

entry.dest.logical.logical_dest = cpu_mask_to_apicid(mask);
entry.dest = cpu_mask_to_apicid(mask);
entry.vector = vector;

ioapic_register_intr(irq, vector, IOAPIC_AUTO);
Expand Down Expand Up @@ -920,7 +920,7 @@ static void __init setup_ExtINT_IRQ0_pin(unsigned int apic, unsigned int pin, in
*/
entry.dest_mode = INT_DEST_MODE;
entry.mask = 0; /* unmask IRQ now */
entry.dest.logical.logical_dest = cpu_mask_to_apicid(TARGET_CPUS);
entry.dest = cpu_mask_to_apicid(TARGET_CPUS);
entry.delivery_mode = INT_DELIVERY_MODE;
entry.polarity = 0;
entry.trigger = 0;
Expand Down Expand Up @@ -1020,18 +1020,17 @@ void __apicdebuginit print_IO_APIC(void)

printk(KERN_DEBUG ".... IRQ redirection table:\n");

printk(KERN_DEBUG " NR Log Phy Mask Trig IRR Pol"
" Stat Dest Deli Vect: \n");
printk(KERN_DEBUG " NR Dst Mask Trig IRR Pol"
" Stat Dmod Deli Vect: \n");

for (i = 0; i <= reg_01.bits.entries; i++) {
struct IO_APIC_route_entry entry;

entry = ioapic_read_entry(apic, i);

printk(KERN_DEBUG " %02x %03X %02X ",
printk(KERN_DEBUG " %02x %03X ",
i,
entry.dest.logical.logical_dest,
entry.dest.physical.physical_dest
entry.dest
);

printk("%1d %1d %1d %1d %1d %1d %1d %02X\n",
Expand Down Expand Up @@ -1293,8 +1292,7 @@ void disable_IO_APIC(void)
entry.dest_mode = 0; /* Physical */
entry.delivery_mode = dest_ExtINT; /* ExtInt */
entry.vector = 0;
entry.dest.physical.physical_dest =
GET_APIC_ID(apic_read(APIC_ID));
entry.dest = GET_APIC_ID(apic_read(APIC_ID));

/*
* Add it to the IO-APIC irq-routing table:
Expand Down Expand Up @@ -1556,7 +1554,7 @@ static inline void unlock_ExtINT_logic(void)

entry1.dest_mode = 0; /* physical delivery */
entry1.mask = 0; /* unmask IRQ now */
entry1.dest.physical.physical_dest = hard_smp_processor_id();
entry1.dest = hard_smp_processor_id();
entry1.delivery_mode = dest_ExtINT;
entry1.polarity = entry0.polarity;
entry1.trigger = 0;
Expand Down Expand Up @@ -2131,7 +2129,7 @@ int io_apic_set_pci_routing (int ioapic, int pin, int irq, int triggering, int p

entry.delivery_mode = INT_DELIVERY_MODE;
entry.dest_mode = INT_DEST_MODE;
entry.dest.logical.logical_dest = cpu_mask_to_apicid(mask);
entry.dest = cpu_mask_to_apicid(mask);
entry.trigger = triggering;
entry.polarity = polarity;
entry.mask = 1; /* Disabled (masked) */
Expand Down
14 changes: 2 additions & 12 deletions trunk/include/asm-x86_64/io_apic.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,18 +85,8 @@ struct IO_APIC_route_entry {
mask : 1, /* 0: enabled, 1: disabled */
__reserved_2 : 15;

union { struct { __u32
__reserved_1 : 24,
physical_dest : 4,
__reserved_2 : 4;
} physical;

struct { __u32
__reserved_1 : 24,
logical_dest : 8;
} logical;
} dest;

__u32 __reserved_3 : 24,
dest : 8;
} __attribute__ ((packed));

/*
Expand Down

0 comments on commit 9ef4937

Please sign in to comment.