lkml.org 
[lkml]   [2019]   [Aug]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] x86/apic: Update virtual irq base for DT/OF based system as well
From
Date

Hi Thomas,

On 22/8/2019 12:47 AM, Andy Shevchenko wrote:
>> For DT we can actually avoid that completely. See below.
>>
>> For ACPI not unfortunately as the stupid GSI mapping is hard coded.
> The below works better for my case, so, if you are going with that
> Tested-by: Andy Shevchenko <andriy.shevchenko@intel.com>
>
>
> 8<-------------
> --- a/arch/x86/kernel/apic/io_apic.c
> +++ b/arch/x86/kernel/apic/io_apic.c
> @@ -2438,7 +2438,13 @@ unsigned int arch_dynirq_lower_bound(uns
> * dmar_alloc_hwirq() may be called before setup_IO_APIC(), so use
> * gsi_top if ioapic_dynirq_base hasn't been initialized yet.
> */
> - return ioapic_initialized ? ioapic_dynirq_base : gsi_top;
> + if (!ioapic_initialized)
> + return gsi_top;
> + /*
> + * For DT enabled machines ioapic_dynirq_base is irrelevant and not
> + * updated. So simply return @from if ioapic_dynirq_base == 0.
> + */
> + return ioapic_dynirq_base ? : from;
> }
>
> #ifdef CONFIG_X86_32


I have also tested above and it works fine. In fact, my first patch to

resolve it during internal review was exactly on similar lines. So if

you are going to add above then i will stop following up on this

topic further. Thanks.


Regards,

Rahul

\
 
 \ /
  Last update: 2019-08-22 05:49    [W:0.058 / U:14.776 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site