diff mbox

x86: i8259: export legacy_pic symbol

Message ID 20170408175420.26736-1-hdegoede@redhat.com
State Superseded
Headers show

Commit Message

Hans de Goede April 8, 2017, 5:54 p.m. UTC
The classic PC rtc-coms driver has a workaround for broken ACPI device
nodes for it which lack an irq resource. This workaround used to
unconditionally hardcode the irq to 8 in these cases.

This was causing irq conflict problems on systems without a legacy-pic
so a recent patch added an if (nr_legacy_irqs()) guard to the
workaround to avoid this irq conflict.

nr_legacy_irqs() uses the legacy_pic symbol under the hood causing
an undefined symbol error if the rtc-cmos code is build as a module.

This commit exports the legacy_pic symbol to fix this.

Cc: rtc-linux@googlegroups.com
Cc: alexandre.belloni@free-electrons.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 arch/x86/kernel/i8259.c | 1 +
 1 file changed, 1 insertion(+)

Comments

H. Peter Anvin April 8, 2017, 8:02 p.m. UTC | #1
On April 8, 2017 10:54:20 AM PDT, Hans de Goede <hdegoede@redhat.com> wrote:
>The classic PC rtc-coms driver has a workaround for broken ACPI device
>nodes for it which lack an irq resource. This workaround used to
>unconditionally hardcode the irq to 8 in these cases.
>
>This was causing irq conflict problems on systems without a legacy-pic
>so a recent patch added an if (nr_legacy_irqs()) guard to the
>workaround to avoid this irq conflict.
>
>nr_legacy_irqs() uses the legacy_pic symbol under the hood causing
>an undefined symbol error if the rtc-cmos code is build as a module.
>
>This commit exports the legacy_pic symbol to fix this.
>
>Cc: rtc-linux@googlegroups.com
>Cc: alexandre.belloni@free-electrons.com
>Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>---
> arch/x86/kernel/i8259.c | 1 +
> 1 file changed, 1 insertion(+)
>
>diff --git a/arch/x86/kernel/i8259.c b/arch/x86/kernel/i8259.c
>index be22f5a..4e3b8a5 100644
>--- a/arch/x86/kernel/i8259.c
>+++ b/arch/x86/kernel/i8259.c
>@@ -418,6 +418,7 @@ struct legacy_pic default_legacy_pic = {
> };
> 
> struct legacy_pic *legacy_pic = &default_legacy_pic;
>+EXPORT_SYMBOL(legacy_pic);
> 
> static int __init i8259A_init_ops(void)
> {

Should probably be EXPORT_SYMBOL_GPL
diff mbox

Patch

diff --git a/arch/x86/kernel/i8259.c b/arch/x86/kernel/i8259.c
index be22f5a..4e3b8a5 100644
--- a/arch/x86/kernel/i8259.c
+++ b/arch/x86/kernel/i8259.c
@@ -418,6 +418,7 @@  struct legacy_pic default_legacy_pic = {
 };
 
 struct legacy_pic *legacy_pic = &default_legacy_pic;
+EXPORT_SYMBOL(legacy_pic);
 
 static int __init i8259A_init_ops(void)
 {