]> git.baikalelectronics.ru Git - kernel.git/commit
x86/hpet: Use proper hpet device number for MSI allocation
authorThomas Gleixner <tglx@linutronix.de>
Sun, 21 Jun 2015 14:21:50 +0000 (16:21 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Sun, 21 Jun 2015 14:38:40 +0000 (16:38 +0200)
commitaaacb2553121f4182e10838c7c1b6efaf905fdb6
tree40f60475bc55b0775631c59a37bffd01cb5c6d96
parentda23825abd05812579a5b32af4a6820b24b8d21b
x86/hpet: Use proper hpet device number for MSI allocation

hpet_assign_irq() is called with hpet_device->num as "hardware
interrupt number", but hpet_device->num is initialized after the
interrupt has been assigned, so it's always 0. As a consequence only
the first MSI allocation succeeds, the following ones fail because the
"hardware interrupt number" already exists.

Move the initialization of dev->num and other fields before the call
to hpet_assign_irq(), which is the ordering before the offending
commit which introduced that regression.

Fixes: "c43014f3847d x86/hpet: Enhance HPET IRQ to support hierarchical irqdomains"
Reported-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/alpine.DEB.2.11.1506211635010.4107@nanos
Cc: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Borislav Petkov <bp@alien8.de>
arch/x86/kernel/hpet.c