[PATCH] x86: ioapic needs check attr when programmed more than once

2013-08-23 Thread Liu Ping Fan
When programming ioapic pinX more than once, current code does not check whether the later attr (trigger&polarity) is the same as the former or not. This causes a broken semantic. This can be observed in qemu q35 machine, where ioapic's ioredtbl[x] can never be set as low-active, even if the hpet

Re: [PATCH] x86: ioapic needs check attr when programmed more than once

2013-08-23 Thread Ingo Molnar
* Liu ping fan wrote: > On Fri, Aug 23, 2013 at 4:04 PM, Liu ping fan wrote: > > On Fri, Aug 23, 2013 at 3:30 PM, Ingo Molnar wrote: > >> > >> * Liu Ping Fan wrote: > >> > >>> When programming ioapic pinX more than once, current code > >>> does not check whether the later attr (trigger&polari

Re: [PATCH] x86: ioapic needs check attr when programmed more than once

2013-08-23 Thread Liu ping fan
On Fri, Aug 23, 2013 at 4:04 PM, Liu ping fan wrote: > On Fri, Aug 23, 2013 at 3:30 PM, Ingo Molnar wrote: >> >> * Liu Ping Fan wrote: >> >>> When programming ioapic pinX more than once, current code >>> does not check whether the later attr (trigger&polarity) is the >>> same as the former or no

Re: [PATCH] x86: ioapic needs check attr when programmed more than once

2013-08-23 Thread Liu ping fan
On Fri, Aug 23, 2013 at 3:30 PM, Ingo Molnar wrote: > > * Liu Ping Fan wrote: > >> When programming ioapic pinX more than once, current code >> does not check whether the later attr (trigger&polarity) is the >> same as the former or not. This causes a broken semantic. >> >> Fix it by reporting -E

Re: [PATCH] x86: ioapic needs check attr when programmed more than once

2013-08-23 Thread Ingo Molnar
* Liu Ping Fan wrote: > When programming ioapic pinX more than once, current code > does not check whether the later attr (trigger&polarity) is the > same as the former or not. This causes a broken semantic. > > Fix it by reporting -EBUSY, when attr is different. Was this observed in real life

[PATCH] x86: ioapic needs check attr when programmed more than once

2013-08-22 Thread Liu Ping Fan
When programming ioapic pinX more than once, current code does not check whether the later attr (trigger&polarity) is the same as the former or not. This causes a broken semantic. Fix it by reporting -EBUSY, when attr is different. Signed-off-by: Liu Ping Fan --- arch/x86/kernel/acpi/boot.c