lkml.org 
[lkml]   [2009]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] x86: move dmar_table_init out of enable_IR
From
Date
On Mon, 2009-08-17 at 13:47 -0700, Yinghai Lu wrote:
> Suresh Siddha wrote:
> >
> > We can remove this ifdef check, as dmar_table_init() already handles
> > the !config_intr_remap
> >
> > Also, at this error condition, we should simply return if the cpu has no
> > x2apic support. There is no x2apic support and we failed to enable
> > interrupt-remapping. No need to go further down.
>
> like this ?
>
> ---
> arch/x86/kernel/apic/apic.c | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
>
> Index: linux-2.6/arch/x86/kernel/apic/apic.c
> ===================================================================
> --- linux-2.6.orig/arch/x86/kernel/apic/apic.c
> +++ linux-2.6/arch/x86/kernel/apic/apic.c
> @@ -1392,14 +1392,11 @@ 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;
> + int dmar_table_init_ret;
>
> -#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
> + if (dmar_table_init_ret && !x2apic_supported())
> + return;
>
> ioapic_entries = alloc_ioapic_entries();
> if (!ioapic_entries) {

Ack.



\
 
 \ /
  Last update: 2009-08-18 00:57    [W:0.037 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site