lkml.org 
[lkml]   [2011]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/6] x86: ifdef INTR_REMAP code out

* Henrik Kretzschmar <henne@nachtwindheim.de> wrote:

> +#ifdef CONFIG_INTR_REMAP
> + struct IO_APIC_route_entry **ioapic_entries = NULL;
> +
> if (intr_remapping_enabled) {
> ioapic_entries = alloc_ioapic_entries();
> if (!ioapic_entries) {
> @@ -2133,6 +2136,7 @@ static int lapic_resume(struct sys_device *dev)
> mask_IO_APIC_setup(ioapic_entries);
> legacy_pic->mask_all();
> }
> +#endif
>
> if (x2apic_mode)
> enable_x2apic();
> @@ -2173,6 +2177,7 @@ static int lapic_resume(struct sys_device *dev)
> apic_write(APIC_ESR, 0);
> apic_read(APIC_ESR);
>
> +#ifdef CONFIG_INTR_REMAP
> if (intr_remapping_enabled) {
> reenable_intr_remapping(x2apic_mode);
> legacy_pic->restore_mask();
> @@ -2180,6 +2185,7 @@ static int lapic_resume(struct sys_device *dev)
> free_ioapic_entries(ioapic_entries);
> }
> restore:
> +#endif

Hm, these bits should be factored out in a cleaner fashion - by adding helper
functions, etc. The x2apic code's integration into the lapic code was done in a
pretty ugly fashion so it's not your fault - but if we want to reintroduce UP-IOAPIC
we need to do it cleanly.

Do you still want to do it? :-)

Thanks,

Ingo


\
 
 \ /
  Last update: 2011-02-14 12:05    [W:4.647 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site