All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] serial: parisc: GSC: fix build when IOSAPIC is not set
@ 2022-02-14 18:00 Randy Dunlap
  2022-02-14 18:38 ` Helge Deller
  0 siblings, 1 reply; 2+ messages in thread
From: Randy Dunlap @ 2022-02-14 18:00 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, kernel test robot, James E.J. Bottomley,
	Helge Deller, linux-parisc, Greg Kroah-Hartman, linux-serial,
	Jiri Slaby, Johan Hovold

There is a build error when using a kernel .config file from
'kernel test robot' for a different build problem:

hppa64-linux-ld: drivers/tty/serial/8250/8250_gsc.o: in function `.LC3':
(.data.rel.ro+0x18): undefined reference to `iosapic_serial_irq'

when:
  CONFIG_GSC=y
  CONFIG_SERIO_GSCPS2=y
  CONFIG_SERIAL_8250_GSC=y
  CONFIG_PCI is not set
    and hence PCI_LBA is not set.
  IOSAPIC depends on PCI_LBA, so IOSAPIC is not set/enabled.

Make the use of iosapic_serial_irq() conditional to fix the build error.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kernel test robot <lkp@intel.com>
Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
Cc: Helge Deller <deller@gmx.de>
Cc: linux-parisc@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-serial@vger.kernel.org
Cc: Jiri Slaby <jirislaby@kernel.org>
Cc: Johan Hovold <johan@kernel.org>
Suggested-by: Helge Deller <deller@gmx.de>
---
v2: make the call to iosapic_serial_irq() conditional based on
    CONFIG_ settings (thanks, Helge)

 drivers/tty/serial/8250/8250_gsc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-next-20220211.orig/drivers/tty/serial/8250/8250_gsc.c
+++ linux-next-20220211/drivers/tty/serial/8250/8250_gsc.c
@@ -26,7 +26,7 @@ static int __init serial_init_chip(struc
 	unsigned long address;
 	int err;
 
-#ifdef CONFIG_64BIT
+#if defined(CONFIG_64BIT) && defined(CONFIG_IOSAPIC)
 	if (!dev->irq && (dev->id.sversion == 0xad))
 		dev->irq = iosapic_serial_irq(dev);
 #endif

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] serial: parisc: GSC: fix build when IOSAPIC is not set
  2022-02-14 18:00 [PATCH v2] serial: parisc: GSC: fix build when IOSAPIC is not set Randy Dunlap
@ 2022-02-14 18:38 ` Helge Deller
  0 siblings, 0 replies; 2+ messages in thread
From: Helge Deller @ 2022-02-14 18:38 UTC (permalink / raw)
  To: Randy Dunlap, linux-kernel
  Cc: kernel test robot, James E.J. Bottomley, linux-parisc,
	Greg Kroah-Hartman, linux-serial, Jiri Slaby, Johan Hovold

On 2/14/22 19:00, Randy Dunlap wrote:
> There is a build error when using a kernel .config file from
> 'kernel test robot' for a different build problem:
>
> hppa64-linux-ld: drivers/tty/serial/8250/8250_gsc.o: in function `.LC3':
> (.data.rel.ro+0x18): undefined reference to `iosapic_serial_irq'
>
> when:
>   CONFIG_GSC=y
>   CONFIG_SERIO_GSCPS2=y
>   CONFIG_SERIAL_8250_GSC=y
>   CONFIG_PCI is not set
>     and hence PCI_LBA is not set.
>   IOSAPIC depends on PCI_LBA, so IOSAPIC is not set/enabled.
>
> Make the use of iosapic_serial_irq() conditional to fix the build error.
>
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Reported-by: kernel test robot <lkp@intel.com>
> Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
> Cc: Helge Deller <deller@gmx.de>
> Cc: linux-parisc@vger.kernel.org
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: linux-serial@vger.kernel.org
> Cc: Jiri Slaby <jirislaby@kernel.org>
> Cc: Johan Hovold <johan@kernel.org>
> Suggested-by: Helge Deller <deller@gmx.de>

Thank you Randy!

Acked-by: Helge Deller <deller@gmx.de>

Since this patch only affects the parisc platform, I've added it
to the parisc for-next tree (with a stable tag), unless people want it
to go through another subsystem tree...

Helge

> ---
> v2: make the call to iosapic_serial_irq() conditional based on
>     CONFIG_ settings (thanks, Helge)
>
>  drivers/tty/serial/8250/8250_gsc.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- linux-next-20220211.orig/drivers/tty/serial/8250/8250_gsc.c
> +++ linux-next-20220211/drivers/tty/serial/8250/8250_gsc.c
> @@ -26,7 +26,7 @@ static int __init serial_init_chip(struc
>  	unsigned long address;
>  	int err;
>
> -#ifdef CONFIG_64BIT
> +#if defined(CONFIG_64BIT) && defined(CONFIG_IOSAPIC)
>  	if (!dev->irq && (dev->id.sversion == 0xad))
>  		dev->irq = iosapic_serial_irq(dev);
>  #endif
>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-02-14 18:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-14 18:00 [PATCH v2] serial: parisc: GSC: fix build when IOSAPIC is not set Randy Dunlap
2022-02-14 18:38 ` Helge Deller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.