From: Michael Ellerman Date: Fri, 25 Dec 2020 11:30:58 +0000 (+1100) Subject: genirq: Fix export of irq_to_desc() for powerpc KVM X-Git-Tag: baikal/mips/sdk5.9~11874 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=7661d077b5e8cb896803f63f812b0f2921699519;p=kernel.git 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 Signed-off-by: Linus Torvalds --- diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c index 3d0bc38a0bcfc..cc1a09406c6e4 100644 --- a/kernel/irq/irqdesc.c +++ b/kernel/irq/irqdesc.c @@ -352,7 +352,7 @@ struct irq_desc *irq_to_desc(unsigned int irq) { return radix_tree_lookup(&irq_desc_tree, irq); } -#ifdef CONFIG_KVM_BOOK3S_64_HV +#ifdef CONFIG_KVM_BOOK3S_64_HV_MODULE EXPORT_SYMBOL_GPL(irq_to_desc); #endif