From: Liu Ping Fan Date: Fri, 23 Aug 2013 08:58:47 +0000 (+0800) Subject: x86/ioapic: Check attr against the previous setting when programmed more than once X-Git-Tag: v3.12-rc1~165^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=25aa2957973d361081ac6c8b6e5a0d9d7a83fef6;p=pandora-kernel.git x86/ioapic: Check attr against the previous setting when programmed more than once 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 broken semantics which can be observed in a qemu q35 machine, where ioapic's ioredtbl[x] can never be set as low-active, even if the hpet driver registered it. And hpet driver may share a high-level active IRQ line with other devices. So in qemu, when hpet-dev asserts low-level as kernel expects, the kernel has no response. With this patch, we can observe an ioredtbl[x] set as low-active for hpet. Fix it by reporting -EBUSY to the caller, when attr is different. Signed-off-by: Liu Ping Fan Cc: Kevin Hao Cc: Len Brown Cc: Yinghai Lu Link: http://lkml.kernel.org/r/1377248327-19633-1-git-send-email-pingfank@linux.vnet.ibm.com [ Made small readability edits to both the changelog and the code. ] Signed-off-by: Ingo Molnar --- Reading git-diff-tree failed