lkml.org 
[lkml]   [2011]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 4/4] x86, ioapic: remove duplicate code for saving/restoring RTEs

ok, this series looks better, but as this bug has demonstrated it we need to do
better to keep the ioapic code clean.

Firstly, please introduce a 'struct ioapic' structure that starts out with a
nr_registers field, and add an ioapics[] array and consolidate
nr_ioapic_registers into this.

The consolidate other ioapic driver state as well:

- add a *saved_registers field and consolidate ioapic_saved_data into it

- add a 'struct mpc_ioapic mp_config' entry and consolidate mp_ioapics[]

- add a 'struct mp_ioapic_gsi gsi_config' entry and consolidate mp_gsi_routing[]

- add a 'int pin_programmed' field and consolidate mp_ioapic_routing[] into it

ioapics[] itself should be static to io_apic.c.

Please create a separate patch for each change: that way it's bisectable and
reviewable.

These changes alone will make the IO-APIC code a *lot* more readable, more
extensible - and hopefully much less prone to suspend/resume bugs as well.

Feel free to do this on top of your current queue to keep your patch-shuffling
overhead low.

Thanks,

Ingo


\
 
 \ /
  Last update: 2011-05-17 11:11    [W:0.073 / U:24.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site