speakup: only build serialio when ISA is enabled
Subsystems (3)
Samuel Thibault
maintainerPATCH 2/2 speakup: only build serialio when ISA is enabled
Drivers using serialio are already made available in Kconfig only under the ISA condition.
This solves warnings in inb/outb macros on platform that do not have support for ISA.
drivers/accessibility/speakup/Makefile +1 -1
@@ -16,6 +16,7 @@ obj-$(CONFIG_SPEAKUP_SYNTH_TXPRT) += spe obj-$(CONFIG_SPEAKUP_SYNTH_DUMMY) += speakup_dummy.o obj-$(CONFIG_SPEAKUP) += speakup.o +obj-$(CONFIG_ISA) += serialio.o speakup-y := \ buffers.o \ devsynth.o \
@@ -25,7 +26,6 @@ speakup-y := \ keyhelp.o \ kobjects.o \ selection.o \ - serialio.o \ spk_ttyio.o \ synth.o \ thread.o \
Greg KH
maintainerQuoted 21 lines · Samuel Thibault
Drivers using serialio are already made available in
Kconfigonly under the ISA condition.This solves warnings in inb/outb macros on platform that do not have support for ISA.
Signed-off-by Samuel Thibault <[email protected]>Index: linux-2.6/drivers/accessibility/speakup/Makefile
===================================================================drivers/accessibility/speakup/Makefile +1
-0@@ -16,6 +16,7 @@ obj-$(CONFIG_SPEAKUP_SYNTH_TXPRT) += spe obj-$(CONFIG_SPEAKUP_SYNTH_DUMMY) += speakup_dummy.o obj-$(CONFIG_SPEAKUP) += speakup.o +obj-$(CONFIG_ISA) += serialio.o speakup-y := \ buffers.o \ devsynth.o \
drivers/accessibility/speakup/Makefile speakup-y := \ · line 31
Quoted 7 lines
drivers/accessibility/speakup/Makefile +0
-1@@ -25,7 +26,6 @@ speakup-y := \ keyhelp.o \ kobjects.o \ selection.o \ - serialio.o \ spk_ttyio.o \ synth.o \ thread.o \
Nice, this should fix the riscv build issues.
I'll go merge this now, and hold on to the first patch until this round gets merged with Linus.
thanks,
greg k-h
Greg KH
maintainerQuoted 21 lines · Samuel Thibault
Drivers using serialio are already made available in
Kconfigonly under the ISA condition.This solves warnings in inb/outb macros on platform that do not have support for ISA.
Signed-off-by Samuel Thibault <[email protected]>Index: linux-2.6/drivers/accessibility/speakup/Makefile
===================================================================drivers/accessibility/speakup/Makefile +1
-0@@ -16,6 +16,7 @@ obj-$(CONFIG_SPEAKUP_SYNTH_TXPRT) += spe obj-$(CONFIG_SPEAKUP_SYNTH_DUMMY) += speakup_dummy.o obj-$(CONFIG_SPEAKUP) += speakup.o +obj-$(CONFIG_ISA) += serialio.o speakup-y := \ buffers.o \ devsynth.o \
drivers/accessibility/speakup/Makefile speakup-y := \ · line 31
Quoted 7 lines
drivers/accessibility/speakup/Makefile +0
-1@@ -25,7 +26,6 @@ speakup-y := \ keyhelp.o \ kobjects.o \ selection.o \ - serialio.o \ spk_ttyio.o \ synth.o \ thread.o \
Oops, no, I get the following build errors with this patch:
ERROR: modpost: "spk_wait_for_xmitr" [drivers/accessibility/speakup/speakup.ko] undefined!
ERROR: modpost: "spk_serial_io_ops" [drivers/accessibility/speakup/speakup_keypc.ko] undefined!
ERROR: modpost: "spk_stop_serial_interrupt" [drivers/accessibility/speakup/speakup_keypc.ko] undefined!
ERROR: modpost: "spk_serial_io_ops" [drivers/accessibility/speakup/speakup_dtlk.ko] undefined!
ERROR: modpost: "spk_stop_serial_interrupt" [drivers/accessibility/speakup/speakup_dtlk.ko] undefined!
ERROR: modpost: "spk_serial_io_ops" [drivers/accessibility/speakup/speakup_decpc.ko] undefined!
ERROR: modpost: "spk_stop_serial_interrupt" [drivers/accessibility/speakup/speakup_decpc.ko] undefined!
ERROR: modpost: "spk_serial_io_ops" [drivers/accessibility/speakup/speakup_acntpc.ko] undefined!
ERROR: modpost: "spk_stop_serial_interrupt" [drivers/accessibility/speakup/speakup_acntpc.ko] undefined!
So something else needs to change here, sorry, dropping this patch for now.
thanks,
greg k-h
Samuel Thibault
maintainerGreg KH, le mar. 04 août 2020 13:34:13 +0200, a ecrit:
Quoted 32 lines · Samuel Thibault
Quoted 21 lines
Drivers using serialio are already made available in
Kconfigonly under the ISA condition.This solves warnings in inb/outb macros on platform that do not have support for ISA.
Signed-off-by Samuel Thibault <[email protected]>Index: linux-2.6/drivers/accessibility/speakup/Makefile
===================================================================drivers/accessibility/speakup/Makefile +1
-0@@ -16,6 +16,7 @@ obj-$(CONFIG_SPEAKUP_SYNTH_TXPRT) += spe obj-$(CONFIG_SPEAKUP_SYNTH_DUMMY) += speakup_dummy.o obj-$(CONFIG_SPEAKUP) += speakup.o +obj-$(CONFIG_ISA) += serialio.o speakup-y := \ buffers.o \ devsynth.o \drivers/accessibility/speakup/Makefile speakup-y := \ · line 31
Quoted 7 lines
drivers/accessibility/speakup/Makefile +0
-1@@ -25,7 +26,6 @@ speakup-y := \ keyhelp.o \ kobjects.o \ selection.o \ - serialio.o \ spk_ttyio.o \ synth.o \ thread.o \Oops, no, I get the following build errors with this patch:
Quoted 1 line
ERROR: modpost: "
spk_wait_for_xmitr" [drivers/accessibility/speakup/speakup.ko] undefined!
Yes, it depends on the first of the queue.
Samuel
Greg KH
maintainerQuoted 33 lines · Samuel Thibault
Greg KH, le mar. 04 août 2020 13:34:13 +0200, a ecrit:
Quoted 32 lines · Samuel Thibault
Quoted 21 lines
Drivers using serialio are already made available in
Kconfigonly under the ISA condition.This solves warnings in inb/outb macros on platform that do not have support for ISA.
Signed-off-by Samuel Thibault <[email protected]>Index: linux-2.6/drivers/accessibility/speakup/Makefile
===================================================================drivers/accessibility/speakup/Makefile +1
-0@@ -16,6 +16,7 @@ obj-$(CONFIG_SPEAKUP_SYNTH_TXPRT) += spe obj-$(CONFIG_SPEAKUP_SYNTH_DUMMY) += speakup_dummy.o obj-$(CONFIG_SPEAKUP) += speakup.o +obj-$(CONFIG_ISA) += serialio.o speakup-y := \ buffers.o \ devsynth.o \drivers/accessibility/speakup/Makefile speakup-y := \ · line 31
Quoted 7 lines
drivers/accessibility/speakup/Makefile +0
-1@@ -25,7 +26,6 @@ speakup-y := \ keyhelp.o \ kobjects.o \ selection.o \ - serialio.o \ spk_ttyio.o \ synth.o \ thread.o \Oops, no, I get the following build errors with this patch:
Quoted 3 lines
Quoted 1 line
ERROR: modpost: "
spk_wait_for_xmitr" [drivers/accessibility/speakup/speakup.ko] undefined!Yes, it depends on the first of the queue.
Nope, different errors with both patches applied:
ERROR: modpost: "spk_serial_io_ops" [drivers/accessibility/speakup/speakup_keypc.ko] undefined!
ERROR: modpost: "spk_stop_serial_interrupt" [drivers/accessibility/speakup/speakup_keypc.ko] undefined!
ERROR: modpost: "spk_serial_io_ops" [drivers/accessibility/speakup/speakup_dtlk.ko] undefined!
ERROR: modpost: "spk_stop_serial_interrupt" [drivers/accessibility/speakup/speakup_dtlk.ko] undefined!
ERROR: modpost: "spk_serial_io_ops" [drivers/accessibility/speakup/speakup_decpc.ko] undefined!
ERROR: modpost: "spk_stop_serial_interrupt" [drivers/accessibility/speakup/speakup_decpc.ko] undefined!
ERROR: modpost: "spk_serial_io_ops" [drivers/accessibility/speakup/speakup_acntpc.ko] undefined!
ERROR: modpost: "spk_stop_serial_interrupt" [drivers/accessibility/speakup/speakup_acntpc.ko] undefined
:(
Greg KH
maintainerQuoted 33 lines · Samuel Thibault
Greg KH, le mar. 04 août 2020 13:34:13 +0200, a ecrit:
Quoted 32 lines · Samuel Thibault
Quoted 21 lines
Drivers using serialio are already made available in
Kconfigonly under the ISA condition.This solves warnings in inb/outb macros on platform that do not have support for ISA.
Signed-off-by Samuel Thibault <[email protected]>Index: linux-2.6/drivers/accessibility/speakup/Makefile
===================================================================drivers/accessibility/speakup/Makefile +1
-0@@ -16,6 +16,7 @@ obj-$(CONFIG_SPEAKUP_SYNTH_TXPRT) += spe obj-$(CONFIG_SPEAKUP_SYNTH_DUMMY) += speakup_dummy.o obj-$(CONFIG_SPEAKUP) += speakup.o +obj-$(CONFIG_ISA) += serialio.o speakup-y := \ buffers.o \ devsynth.o \drivers/accessibility/speakup/Makefile speakup-y := \ · line 31
Quoted 7 lines
drivers/accessibility/speakup/Makefile +0
-1@@ -25,7 +26,6 @@ speakup-y := \ keyhelp.o \ kobjects.o \ selection.o \ - serialio.o \ spk_ttyio.o \ synth.o \ thread.o \Oops, no, I get the following build errors with this patch:
Quoted 3 lines
Quoted 1 line
ERROR: modpost: "
spk_wait_for_xmitr" [drivers/accessibility/speakup/speakup.ko] undefined!Yes, it depends on the first of the queue.
Ah, missed that, ok, let me try this again...
Samuel Thibault
maintainerGreg KH, le mar. 04 août 2020 13:58:17 +0200, a ecrit:
Quoted 2 lines
ERROR: modpost: "
spk_serial_io_ops" [drivers/accessibility/speakup/speakup_keypc.ko] undefined!
ERROR: modpost: "spk_stop_serial_interrupt" [drivers/accessibility/speakup/speakup_keypc.ko] undefined!
Oh, indeed, these are not covered by the first patch.
I realize that KEYPC depends on ISA, but with COMPILE_TEST as alternative. We can build serialio in the COMPILE_TEST case too, I'll update the patches.
But then we'll still have:
Quoted 1 line
the riscv build issues.
Actually I was surprised by the riscv build issue: the issue is within riscv's inb() implementation, serialio.c is only calling it. arch/riscv/include/asm/io.h says:
#define PCI_IOBASE ((void __iomem *)PCI_IO_START)
[...]
#define inb(c) ({ u8 __v; __io_pbr(); __v = readb_cpu((void*)(PCI_IOBASE + (c))); __io_par(__v); __v; })
and thus yes it's arithmetic over a (void*) pointer, the caller cannot do anything about it.
8250_port.c itself uses inb(), doesn't it get a warning as well? Or is it getting compiled-out on riscv because of some Kconfig condition? I see that the whole drivers/tty/serial is under HAS_IOMEM, and that's the only condition I can see for 8250_port.c (except SERIAL_8250 of course), is that it, or is SERIAL_8250 just not enabled in the riscv bot?
Actually the warning seems new, when looking at the Debian build log:
and looking for serialio.c, I do not see a warning, and its code hasn't changed. Is the build bot compiler just more talkative?
Samuel
Greg KH
maintainerQuoted 18 lines · Samuel Thibault
Greg KH, le mar. 04 août 2020 13:58:17 +0200, a ecrit:
Quoted 2 lines
ERROR: modpost: "
spk_serial_io_ops" [drivers/accessibility/speakup/speakup_keypc.ko] undefined!
ERROR: modpost: "spk_stop_serial_interrupt" [drivers/accessibility/speakup/speakup_keypc.ko] undefined!Oh, indeed, these are not covered by the first patch.
I realize that KEYPC depends on ISA, but with
COMPILE_TESTas alternative. We can build serialio in theCOMPILE_TESTcase too, I'll update the patches.But then we'll still have:
Quoted 1 line
the riscv build issues.
Actually I was surprised by the riscv build issue: the issue is within riscv's
inb()implementation,serialio.cis only calling it.arch/riscv/include/asm/io.hsays:
Quoted 6 lines
#define
PCI_IOBASE((void__iomem*)PCI_IO_START)
[...]
#define inb(c) ({ u8__v;__io_pbr();__v=readb_cpu((void*)(PCI_IOBASE + (c)));__io_par(__v);__v; })and thus yes it's arithmetic over a (void*) pointer, the caller cannot do anything about it.
And that's fine, math with pointers, even void ones, is ok.
I wonder why riscv was complaining about that. It's not nice, but it is valid C.
Quoted 2 lines
8250_port.citself usesinb(), doesn't it get a warning as well? Or is it getting compiled-out on riscv because of someKconfigcondition?
Probably this.
Quoted 11 lines
I
see that the wholedrivers/tty/serialis underHAS_IOMEM, and that's the only condition I can see for8250_port.c(exceptSERIAL_8250of course), is that it, or isSERIAL_8250just not enabled in the riscv bot?Actually the warning seems new, when looking at the Debian build log:
and looking for
serialio.c, I do not see a warning, and its code hasn't changed. Is the build bot compiler just more talkative?
It's more talkative at times, and maybe the riscv code changed too.
Let's see if any of their developers care about it :)
thanks,
greg k-h
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
Samuel Thibault
maintainerGreg KH, le mar. 04 août 2020 17:49:52 +0200, a ecrit:
Quoted 6 lines
Quoted 4 lines
#define inb(c) ({ u8
__v;__io_pbr();__v=readb_cpu((void*)(PCI_IOBASE + (c)));__io_par(__v);__v; })and thus yes it's arithmetic over a (void*) pointer, the caller cannot do anything about it.
And that's fine, math with pointers, even void ones, is ok.
C++ doesn't like it, but in general compilers provide some semantic for it, yes.
Quoted 2 lines
I wonder why riscv was complaining about that. It's not nice, but it is valid C.
Strictly C speaking, no, but GNU C yes.
Quoted 1 line
Let's see if any of their developers care about it :)
Ok :) In the meanwhile I sent a v2 series that should fix the different link cases, just not the particular riscv warning.
Samuel
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv