]> git.baikalelectronics.ru Git - kernel.git/commit
genirq: Fix export of irq_to_desc() for powerpc KVM
authorMichael Ellerman <mpe@ellerman.id.au>
Fri, 25 Dec 2020 11:30:58 +0000 (22:30 +1100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 25 Dec 2020 19:02:39 +0000 (11:02 -0800)
commit7661d077b5e8cb896803f63f812b0f2921699519
treed796d915216212d4f7421e30a0645d25be49d21b
parentca4726ae2e595db9a39f28683aa96f46f0178038
genirq: Fix export of irq_to_desc() for powerpc KVM

Commit 410ab2ada3e7 ("genirq: Restrict export of irq_to_desc()") removed
the export of irq_to_desc() unless powerpc KVM is being built, because
there is still a use of irq_to_desc() in modular code there.

However it used:

  #ifdef CONFIG_KVM_BOOK3S_64_HV

Which doesn't work when that symbol is =m, leading to a build failure:

  ERROR: modpost: "irq_to_desc" [arch/powerpc/kvm/kvm-hv.ko] undefined!

Fix it by checking for the definedness of the correct symbol which is
CONFIG_KVM_BOOK3S_64_HV_MODULE.

Fixes: 410ab2ada3e7 ("genirq: Restrict export of irq_to_desc()")
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/irq/irqdesc.c