* [PATCH 2/2] speakup: only build serialio when ISA is enabled
@ Samuel Thibault
[not found] ` <20200804113413.GA181242@kroah.com>
0 siblings, 1 reply; 4+ messages in thread
From: Samuel Thibault @ UTC (permalink / raw)
To: linux-kernel, gregkh; +Cc: speakup
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.
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Index: linux-2.6/drivers/accessibility/speakup/Makefile
===================================================================
--- linux-2.6.orig/drivers/accessibility/speakup/Makefile
+++ linux-2.6/drivers/accessibility/speakup/Makefile
@@ -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 \
^ permalink raw reply [flat|nested] 4+ messages in thread[parent not found: <20200804113413.GA181242@kroah.com>]
* Re: [PATCH 2/2] speakup: only build serialio when ISA is enabled [not found] ` <20200804113413.GA181242@kroah.com> @ ` Samuel Thibault [not found] ` <20200804115817.GC203147@kroah.com> 0 siblings, 1 reply; 4+ messages in thread From: Samuel Thibault @ UTC (permalink / raw) To: Greg KH; +Cc: linux-kernel, speakup Greg KH, le mar. 04 août 2020 13:34:13 +0200, a ecrit: > On Tue, Aug 04, 2020 at 01:13:32PM +0200, Samuel Thibault wrote: > > 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. > > > > Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> > > > > Index: linux-2.6/drivers/accessibility/speakup/Makefile > > =================================================================== > > --- linux-2.6.orig/drivers/accessibility/speakup/Makefile > > +++ linux-2.6/drivers/accessibility/speakup/Makefile > > @@ -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 \ > > Oops, no, I get the following build errors with this patch: > > ERROR: modpost: "spk_wait_for_xmitr" [drivers/accessibility/speakup/speakup.ko] undefined! Yes, it depends on the first of the queue. Samuel ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <20200804115817.GC203147@kroah.com>]
* Re: [PATCH 2/2] speakup: only build serialio when ISA is enabled [not found] ` <20200804115817.GC203147@kroah.com> @ ` Samuel Thibault [not found] ` <20200804154952.GB495852@kroah.com> 0 siblings, 1 reply; 4+ messages in thread From: Samuel Thibault @ UTC (permalink / raw) To: Greg KH, linux-riscv; +Cc: linux-kernel, linux-serial, speakup Greg KH, le mar. 04 août 2020 13:58:17 +0200, a ecrit: > 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: > 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: https://buildd.debian.org/status/fetch.php?pkg=linux&arch=riscv64&ver=5.7.10-1&stamp=1595803499&raw=0 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <20200804154952.GB495852@kroah.com>]
* Re: [PATCH 2/2] speakup: only build serialio when ISA is enabled [not found] ` <20200804154952.GB495852@kroah.com> @ ` Samuel Thibault 0 siblings, 0 replies; 4+ messages in thread From: Samuel Thibault @ UTC (permalink / raw) To: Greg KH; +Cc: linux-riscv, linux-kernel, linux-serial, speakup Greg KH, le mar. 04 août 2020 17:49:52 +0200, a ecrit: > > #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. > 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. > 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~ UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[PATCH 2/2] speakup: only build serialio when ISA is enabled Samuel Thibault
[not found] ` <20200804113413.GA181242@kroah.com>
` Samuel Thibault
[not found] ` <20200804115817.GC203147@kroah.com>
` Samuel Thibault
[not found] ` <20200804154952.GB495852@kroah.com>
` Samuel Thibault
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).