Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 158636
b: refs/heads/master
c: b7f42ab
h: refs/heads/master
v: v3
  • Loading branch information
Yinghai Lu authored and Ingo Molnar committed Aug 17, 2009
1 parent d78f138 commit ebc5029
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 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: f3d1915a8623b9248572d3ee44e19a80b7a3520b
refs/heads/master: b7f42ab2e237f08a5bbcefa17473e80eb05e725c
22 changes: 13 additions & 9 deletions trunk/arch/x86/kernel/apic/apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1365,14 +1365,6 @@ void enable_x2apic(void)
int __init enable_IR(void)
{
#ifdef CONFIG_INTR_REMAP
int ret;

ret = dmar_table_init();
if (ret) {
pr_debug("dmar_table_init() failed with %d:\n", ret);
return 0;
}

if (!intr_remapping_supported()) {
pr_debug("intr-remapping not supported\n");
return 0;
Expand Down Expand Up @@ -1400,6 +1392,14 @@ void __init enable_IR_x2apic(void)
unsigned long flags;
struct IO_APIC_route_entry **ioapic_entries = NULL;
int ret, x2apic_enabled = 0;
int dmar_table_init_ret = 0;

#ifdef CONFIG_INTR_REMAP
dmar_table_init_ret = dmar_table_init();
if (dmar_table_init_ret)
pr_debug("dmar_table_init() failed with %d:\n",
dmar_table_init_ret);
#endif

ioapic_entries = alloc_ioapic_entries();
if (!ioapic_entries) {
Expand All @@ -1417,7 +1417,11 @@ void __init enable_IR_x2apic(void)
mask_8259A();
mask_IO_APIC_setup(ioapic_entries);

ret = enable_IR();
if (dmar_table_init_ret)
ret = 0;
else
ret = enable_IR();

if (!ret) {
/* IR is required if there is APIC ID > 255 even when running
* under KVM
Expand Down

0 comments on commit ebc5029

Please sign in to comment.