All of lore.kernel.org
 help / color / mirror / Atom feed
* linux-next: build failure after merge of the asm-generic tree
@ 2018-03-15 22:13 Stephen Rothwell
  2018-03-15 22:47 ` Bin Liu
  0 siblings, 1 reply; 21+ messages in thread
From: Stephen Rothwell @ 2018-03-15 22:13 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List,
	Greg Kroah-Hartman, Aaron Wu, Bin Liu

[-- Attachment #1: Type: text/plain, Size: 3839 bytes --]

Hi Arnd,

After merging the asm-generic tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:

drivers/usb/musb/musb_host.c: In function 'musb_rx_reinit':
drivers/usb/musb/musb_host.c:577:10: error: 'struct musb' has no member named 'double_buffer_not_ok'
  if (musb->double_buffer_not_ok)
          ^~
drivers/usb/musb/musb_host.c: In function 'musb_ep_program':
drivers/usb/musb/musb_host.c:807:12: error: 'struct musb' has no member named 'double_buffer_not_ok'
    if (musb->double_buffer_not_ok) {
            ^~

Caused by commit

  8312c0cad792 ("usb: musb: remove blackfin port")

I have applied the following patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 16 Mar 2018 08:58:41 +1100
Subject: [PATCH] usb: musb: more blackfin removal

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/usb/musb/musb_gadget.c | 21 +++++++--------------
 drivers/usb/musb/musb_host.c   | 12 +++---------
 2 files changed, 10 insertions(+), 23 deletions(-)

diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
index 58a41b54763b..e564695c6c8d 100644
--- a/drivers/usb/musb/musb_gadget.c
+++ b/drivers/usb/musb/musb_gadget.c
@@ -995,15 +995,11 @@ static int musb_gadget_enable(struct usb_ep *ep,
 		/* Set TXMAXP with the FIFO size of the endpoint
 		 * to disable double buffering mode.
 		 */
-		if (musb->double_buffer_not_ok) {
-			musb_writew(regs, MUSB_TXMAXP, hw_ep->max_packet_sz_tx);
-		} else {
-			if (can_bulk_split(musb, musb_ep->type))
-				musb_ep->hb_mult = (hw_ep->max_packet_sz_tx /
-							musb_ep->packet_sz) - 1;
-			musb_writew(regs, MUSB_TXMAXP, musb_ep->packet_sz
-					| (musb_ep->hb_mult << 11));
-		}
+		if (can_bulk_split(musb, musb_ep->type))
+			musb_ep->hb_mult = (hw_ep->max_packet_sz_tx /
+						musb_ep->packet_sz) - 1;
+		musb_writew(regs, MUSB_TXMAXP, musb_ep->packet_sz
+				| (musb_ep->hb_mult << 11));
 
 		csr = MUSB_TXCSR_MODE | MUSB_TXCSR_CLRDATATOG;
 		if (musb_readw(regs, MUSB_TXCSR)
@@ -1038,11 +1034,8 @@ static int musb_gadget_enable(struct usb_ep *ep,
 		/* Set RXMAXP with the FIFO size of the endpoint
 		 * to disable double buffering mode.
 		 */
-		if (musb->double_buffer_not_ok)
-			musb_writew(regs, MUSB_RXMAXP, hw_ep->max_packet_sz_tx);
-		else
-			musb_writew(regs, MUSB_RXMAXP, musb_ep->packet_sz
-					| (musb_ep->hb_mult << 11));
+		musb_writew(regs, MUSB_RXMAXP, musb_ep->packet_sz
+				| (musb_ep->hb_mult << 11));
 
 		/* force shared fifo to OUT-only mode */
 		if (hw_ep->is_shared_fifo) {
diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
index 45ed32c2cba9..3a8451a15f7f 100644
--- a/drivers/usb/musb/musb_host.c
+++ b/drivers/usb/musb/musb_host.c
@@ -574,11 +574,8 @@ musb_rx_reinit(struct musb *musb, struct musb_qh *qh, u8 epnum)
 	/* Set RXMAXP with the FIFO size of the endpoint
 	 * to disable double buffer mode.
 	 */
-	if (musb->double_buffer_not_ok)
-		musb_writew(ep->regs, MUSB_RXMAXP, ep->max_packet_sz_rx);
-	else
-		musb_writew(ep->regs, MUSB_RXMAXP,
-				qh->maxpacket | ((qh->hb_mult - 1) << 11));
+	musb_writew(ep->regs, MUSB_RXMAXP,
+			qh->maxpacket | ((qh->hb_mult - 1) << 11));
 
 	ep->rx_reinit = 0;
 }
@@ -804,10 +801,7 @@ static void musb_ep_program(struct musb *musb, u8 epnum,
 		/* protocol/endpoint/interval/NAKlimit */
 		if (epnum) {
 			musb_writeb(epio, MUSB_TXTYPE, qh->type_reg);
-			if (musb->double_buffer_not_ok) {
-				musb_writew(epio, MUSB_TXMAXP,
-						hw_ep->max_packet_sz_tx);
-			} else if (can_bulk_split(musb, qh->type)) {
+			if (can_bulk_split(musb, qh->type)) {
 				qh->hb_mult = hw_ep->max_packet_sz_tx
 						/ packet_sz;
 				musb_writew(epio, MUSB_TXMAXP, packet_sz
-- 
2.16.1

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build failure after merge of the asm-generic tree
  2018-03-15 22:13 linux-next: build failure after merge of the asm-generic tree Stephen Rothwell
@ 2018-03-15 22:47 ` Bin Liu
  2018-03-16  8:07   ` Arnd Bergmann
  0 siblings, 1 reply; 21+ messages in thread
From: Bin Liu @ 2018-03-15 22:47 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Arnd Bergmann, Linux-Next Mailing List,
	Linux Kernel Mailing List, Greg Kroah-Hartman, Aaron Wu

Hi,

On Fri, Mar 16, 2018 at 09:13:55AM +1100, Stephen Rothwell wrote:
> Hi Arnd,
> 
> After merging the asm-generic tree, today's linux-next build (arm
> multi_v7_defconfig) failed like this:
> 
> drivers/usb/musb/musb_host.c: In function 'musb_rx_reinit':
> drivers/usb/musb/musb_host.c:577:10: error: 'struct musb' has no member named 'double_buffer_not_ok'
>   if (musb->double_buffer_not_ok)
>           ^~
> drivers/usb/musb/musb_host.c: In function 'musb_ep_program':
> drivers/usb/musb/musb_host.c:807:12: error: 'struct musb' has no member named 'double_buffer_not_ok'
>     if (musb->double_buffer_not_ok) {
>             ^~
> 
> Caused by commit
> 
>   8312c0cad792 ("usb: musb: remove blackfin port")

I don't have a clone of the asm-generic tree to check, but this patch
Arnd sent yesterday for review doesn't remove double_buffer_not_ok from
struct musb. Is it removed when Arnd you were revising it based on my
review comments? Anyway, it is better to remove it too since this flag
is Blackfin specific, but...

> 
> I have applied the following patch for today:
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Fri, 16 Mar 2018 08:58:41 +1100
> Subject: [PATCH] usb: musb: more blackfin removal
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

...is it possible to combine this fixup patch with the original patch to
avoid bisect headache in the future?

Regards,
-Bin.

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

* Re: linux-next: build failure after merge of the asm-generic tree
  2018-03-15 22:47 ` Bin Liu
@ 2018-03-16  8:07   ` Arnd Bergmann
  0 siblings, 0 replies; 21+ messages in thread
From: Arnd Bergmann @ 2018-03-16  8:07 UTC (permalink / raw)
  To: Bin Liu, Stephen Rothwell, Arnd Bergmann,
	Linux-Next Mailing List, Linux Kernel Mailing List,
	Greg Kroah-Hartman, Aaron Wu

On Thu, Mar 15, 2018 at 11:47 PM, Bin Liu <b-liu@ti.com> wrote:
> Hi,
>
> On Fri, Mar 16, 2018 at 09:13:55AM +1100, Stephen Rothwell wrote:
>> Hi Arnd,
>>
>> After merging the asm-generic tree, today's linux-next build (arm
>> multi_v7_defconfig) failed like this:
>>
>> drivers/usb/musb/musb_host.c: In function 'musb_rx_reinit':
>> drivers/usb/musb/musb_host.c:577:10: error: 'struct musb' has no member named 'double_buffer_not_ok'
>>   if (musb->double_buffer_not_ok)
>>           ^~
>> drivers/usb/musb/musb_host.c: In function 'musb_ep_program':
>> drivers/usb/musb/musb_host.c:807:12: error: 'struct musb' has no member named 'double_buffer_not_ok'
>>     if (musb->double_buffer_not_ok) {
>>             ^~
>>
>> Caused by commit
>>
>>   8312c0cad792 ("usb: musb: remove blackfin port")

Sorry about that, I should have done more testing after updating the patch.
Aaron sent a second version of the blackfin removal, and after comparing
his version with mine, I picked up a couple of extra hunks that I folded
into my patch series, including the two musb bits below.

> I don't have a clone of the asm-generic tree to check, but this patch
> Arnd sent yesterday for review doesn't remove double_buffer_not_ok from
> struct musb. Is it removed when Arnd you were revising it based on my
> review comments? Anyway, it is better to remove it too since this flag
> is Blackfin specific, but is it possible to combine this fixup patch with the
> original patch to avoid bisect headache in the future?

Sure, doing that now.

    Arnd

8<---

diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 011c8ca7de42..13486588e561 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -2166,7 +2166,7 @@ musb_init_controller(struct device *dev, int
nIrq, void __iomem *ctrl)
         *   - initializes musb->xceiv, usually by otg_get_phy()
         *   - stops powering VBUS
         *
-        * There are various transceiver configurations.  Blackfin,
+        * There are various transceiver configurations.
         * DaVinci, TUSB60x0, and others integrate them.  OMAP3 uses
         * external/discrete ones in various flavors (twl4030 family,
         * isp1504, non-OTG, etc) mostly hooking up through ULPI.
diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h
index ac675b1a34c4..8a74cb2907f8 100644
--- a/drivers/usb/musb/musb_core.h
+++ b/drivers/usb/musb/musb_core.h
@@ -414,19 +414,6 @@ struct musb {
        struct usb_gadget_driver *gadget_driver;        /* its driver */
        struct usb_hcd          *hcd;                   /* the usb hcd */

-       /*
-        * FIXME: Remove this flag.
-        *
-        * This is only added to allow Blackfin to work
-        * with current driver. For some unknown reason
-        * Blackfin doesn't work with double buffering
-        * and that's enabled by default.
-        *
-        * We added this flag to forcefully disable double
-        * buffering until we get it working.
-        */
-       unsigned                double_buffer_not_ok:1;
-
        const struct musb_hdrc_config *config;

        int                     xceiv_old_state;

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

* Re: linux-next: build failure after merge of the asm-generic tree
  2022-07-20 12:51 ` Arnd Bergmann
@ 2022-07-21  6:57   ` Lukas Bulwahn
  0 siblings, 0 replies; 21+ messages in thread
From: Lukas Bulwahn @ 2022-07-21  6:57 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Stephen Rothwell, Linux Kernel Mailing List, Linux Next Mailing List

On Wed, Jul 20, 2022 at 2:51 PM Arnd Bergmann <arnd@arndb.de> wrote:
>
> On Wed, Jul 20, 2022 at 2:36 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > Hi all,
> >
> > After merging the asm-generic tree, today's linux-next build (arm64
> > defconfig) failed like this:
> >
> > drivers/char/mem.c: In function 'page_is_allowed':
> > drivers/char/mem.c:66:16: error: implicit declaration of function 'devmem_is_allowed'; did you mean 'page_is_allowed'? [-Werror=implicit-function-declaration]
> >    66 |         return devmem_is_allowed(pfn);
> >       |                ^~~~~~~~~~~~~~~~~
> >       |                page_is_allowed
> > cc1: some warnings being treated as errors
> >
> > Caused by commit
> >
> >   cdfde8f61a00 ("asm-generic: correct reference to GENERIC_LIB_DEVMEM_IS_ALLOWED")
> >
> > arm64 does not have a separate declaration of devmem_is_allowed() and
> > was using the asm-generic one by accident ... some other architectures
> > may be in the same boat.
> >
> > I have reverted that commit for today.
>
> My mistake. I was already aware that the patch was broken, and Lukas said he
> wanted to send an updated version. Unfortunately I picked up the old version
> of my asm-generic-fixes branch as I applied a different patch. I've reworked
> the branch to take this one out again now.
>

Stephen, thanks for testing and already the first quick analysis on
the issue. I will try to get an updated version in place and then we
can see which architectures beyond arm64 really need more care.


Lukas

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

* Re: linux-next: build failure after merge of the asm-generic tree
  2022-07-20 12:36 Stephen Rothwell
@ 2022-07-20 12:51 ` Arnd Bergmann
  2022-07-21  6:57   ` Lukas Bulwahn
  0 siblings, 1 reply; 21+ messages in thread
From: Arnd Bergmann @ 2022-07-20 12:51 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Arnd Bergmann, Lukas Bulwahn, Linux Kernel Mailing List,
	Linux Next Mailing List

On Wed, Jul 20, 2022 at 2:36 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Hi all,
>
> After merging the asm-generic tree, today's linux-next build (arm64
> defconfig) failed like this:
>
> drivers/char/mem.c: In function 'page_is_allowed':
> drivers/char/mem.c:66:16: error: implicit declaration of function 'devmem_is_allowed'; did you mean 'page_is_allowed'? [-Werror=implicit-function-declaration]
>    66 |         return devmem_is_allowed(pfn);
>       |                ^~~~~~~~~~~~~~~~~
>       |                page_is_allowed
> cc1: some warnings being treated as errors
>
> Caused by commit
>
>   cdfde8f61a00 ("asm-generic: correct reference to GENERIC_LIB_DEVMEM_IS_ALLOWED")
>
> arm64 does not have a separate declaration of devmem_is_allowed() and
> was using the asm-generic one by accident ... some other architectures
> may be in the same boat.
>
> I have reverted that commit for today.

My mistake. I was already aware that the patch was broken, and Lukas said he
wanted to send an updated version. Unfortunately I picked up the old version
of my asm-generic-fixes branch as I applied a different patch. I've reworked
the branch to take this one out again now.

        Arnd

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

* linux-next: build failure after merge of the asm-generic tree
@ 2022-07-20 12:36 Stephen Rothwell
  2022-07-20 12:51 ` Arnd Bergmann
  0 siblings, 1 reply; 21+ messages in thread
From: Stephen Rothwell @ 2022-07-20 12:36 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Lukas Bulwahn, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 851 bytes --]

Hi all,

After merging the asm-generic tree, today's linux-next build (arm64
defconfig) failed like this:

drivers/char/mem.c: In function 'page_is_allowed':
drivers/char/mem.c:66:16: error: implicit declaration of function 'devmem_is_allowed'; did you mean 'page_is_allowed'? [-Werror=implicit-function-declaration]
   66 |         return devmem_is_allowed(pfn);
      |                ^~~~~~~~~~~~~~~~~
      |                page_is_allowed
cc1: some warnings being treated as errors

Caused by commit

  cdfde8f61a00 ("asm-generic: correct reference to GENERIC_LIB_DEVMEM_IS_ALLOWED")

arm64 does not have a separate declaration of devmem_is_allowed() and
was using the asm-generic one by accident ... some other architectures
may be in the same boat.

I have reverted that commit for today.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build failure after merge of the asm-generic tree
  2019-02-19 11:19     ` Hugo Lefeuvre
@ 2019-02-19 14:42       ` Arnd Bergmann
  0 siblings, 0 replies; 21+ messages in thread
From: Arnd Bergmann @ 2019-02-19 14:42 UTC (permalink / raw)
  To: Hugo Lefeuvre
  Cc: Stephen Rothwell, Linux Next Mailing List, Linux Kernel Mailing List

On Tue, Feb 19, 2019 at 12:19 PM Hugo Lefeuvre <hle@owl.eu.com> wrote:
>
> > I'm not sending a pull request for this if it breaks any architectures,
> > so I think we need to fix them all, and I suppose we also have to
> > change all architectures in the same patch that changes the architecture
> > independent declaration, so it doesn't break intermittently.
> >
> > At this point, I'd probably drop your patches from my asm-generic
> > tree  entirely to avoid the regression, and wait for you to resend
> > them all after 5.1-rc1, for inclusion in 5.2.
> >
> > Can you elaborate on the original problem that you saw? Maybe
> > we can have a different workaround for it in the meantime.
>
> Agree, these two patches should be dropped:
>
> 1. iomap: add missing const to ioread*/iowrite addr arg
>
> since there are incompatible definitions or declarations in
>
> arch/alpha/include/asm/core_apecs.h
> arch/alpha/include/asm/core_cia.h
> arch/alpha/include/asm/core_lca.h
> arch/alpha/include/asm/core_marvel.h
> arch/alpha/include/asm/core_mcpcia.h
> arch/alpha/include/asm/core_t2.h
> arch/alpha/include/asm/io.h
> arch/alpha/include/asm/io_trivial.h
> arch/alpha/include/asm/jensen.h
> arch/alpha/include/asm/machvec.h
> arch/alpha/kernel/core_marvel.c
> arch/alpha/kernel/io.c
> arch/parisc/lib/iomap.c
> arch/powerpc/kernel/iomap.c
> arch/sh/kernel/iomap.c
>
> 2. lib/iomap: add missing const to mmio_ins* addr arg
>
> since there are incompatible definitions or declarations in
>
> arch/sh/kernel/iomap.c
>
> I will resubmit them with all changes required for arch/. The ones for
> alpha, powerpc and sh are already ready and built with cross compiler.
> I still have to setup a cross compiler to build my parisc changes.

I've dropped all your patches for the moment, since one of the remaining
ones had a conflict against changes in the char-misc tree, and the
last one didn't do much by itself.

Please submit the full set again after -rc1.

        Arnd

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

* Re: linux-next: build failure after merge of the asm-generic tree
  2019-02-19 10:14   ` Arnd Bergmann
@ 2019-02-19 11:19     ` Hugo Lefeuvre
  2019-02-19 14:42       ` Arnd Bergmann
  0 siblings, 1 reply; 21+ messages in thread
From: Hugo Lefeuvre @ 2019-02-19 11:19 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Stephen Rothwell, Linux Next Mailing List, Linux Kernel Mailing List

> I'm not sending a pull request for this if it breaks any architectures,
> so I think we need to fix them all, and I suppose we also have to
> change all architectures in the same patch that changes the architecture
> independent declaration, so it doesn't break intermittently.
> 
> At this point, I'd probably drop your patches from my asm-generic
> tree  entirely to avoid the regression, and wait for you to resend
> them all after 5.1-rc1, for inclusion in 5.2.
> 
> Can you elaborate on the original problem that you saw? Maybe
> we can have a different workaround for it in the meantime.

Agree, these two patches should be dropped:

1. iomap: add missing const to ioread*/iowrite addr arg

since there are incompatible definitions or declarations in

arch/alpha/include/asm/core_apecs.h
arch/alpha/include/asm/core_cia.h
arch/alpha/include/asm/core_lca.h
arch/alpha/include/asm/core_marvel.h
arch/alpha/include/asm/core_mcpcia.h
arch/alpha/include/asm/core_t2.h
arch/alpha/include/asm/io.h
arch/alpha/include/asm/io_trivial.h
arch/alpha/include/asm/jensen.h
arch/alpha/include/asm/machvec.h
arch/alpha/kernel/core_marvel.c
arch/alpha/kernel/io.c
arch/parisc/lib/iomap.c
arch/powerpc/kernel/iomap.c
arch/sh/kernel/iomap.c

2. lib/iomap: add missing const to mmio_ins* addr arg

since there are incompatible definitions or declarations in

arch/sh/kernel/iomap.c

I will resubmit them with all changes required for arch/. The ones for
alpha, powerpc and sh are already ready and built with cross compiler.
I still have to setup a cross compiler to build my parisc changes.

Thanks,

regards,
 Hugo

-- 
                Hugo Lefeuvre (hle)    |    www.owl.eu.com
RSA4096_ 360B 03B3 BF27 4F4D 7A3F D5E8 14AA 1EB8 A247 3DFD
ed25519_ 37B2 6D38 0B25 B8A2 6B9F 3A65 A36F 5357 5F2D DC4C

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

* Re: linux-next: build failure after merge of the asm-generic tree
  2019-02-19  7:45 ` Hugo Lefeuvre
@ 2019-02-19 10:14   ` Arnd Bergmann
  2019-02-19 11:19     ` Hugo Lefeuvre
  0 siblings, 1 reply; 21+ messages in thread
From: Arnd Bergmann @ 2019-02-19 10:14 UTC (permalink / raw)
  To: Hugo Lefeuvre
  Cc: Stephen Rothwell, Linux Next Mailing List, Linux Kernel Mailing List

On Tue, Feb 19, 2019 at 8:45 AM Hugo Lefeuvre <hle@owl.eu.com> wrote:
>
> Hi Stephen, Arnd,
>
> > After merging the asm-generic tree, today's linux-next build (powerpc
> > allnoconfig) failed like this:
> > ...
> > Caused by commit
> >
> >   8e074c243ed3 ("iomap: add missing const to ioread*/iowrite addr arg")
>
> I have prepared a patch addressing this issue, and am currently building it
> with a powerpc cross compiler. I'll submit it once it's done. Please tell
> me if I should update the initial patch instead.
>
> > The const qualifiers are also missing in:
> >
> > arch/parisc/lib/iomap.c
> > arch/sh/kernel/iomap.c
>
> I also have patches for these architectures, but it is more complicated for
> me to test them with a cross compiler. Should I still submit them?

I'm not sending a pull request for this if it breaks any architectures,
so I think we need to fix them all, and I suppose we also have to
change all architectures in the same patch that changes the architecture
independent declaration, so it doesn't break intermittently.

At this point, I'd probably drop your patches from my asm-generic
tree  entirely to avoid the regression, and wait for you to resend
them all after 5.1-rc1, for inclusion in 5.2.

Can you elaborate on the original problem that you saw? Maybe
we can have a different workaround for it in the meantime.

     Arnd

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

* Re: linux-next: build failure after merge of the asm-generic tree
  2019-02-19  6:36 Stephen Rothwell
@ 2019-02-19  7:45 ` Hugo Lefeuvre
  2019-02-19 10:14   ` Arnd Bergmann
  0 siblings, 1 reply; 21+ messages in thread
From: Hugo Lefeuvre @ 2019-02-19  7:45 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Arnd Bergmann, Linux Next Mailing List, Linux Kernel Mailing List

Hi Stephen, Arnd,

> After merging the asm-generic tree, today's linux-next build (powerpc
> allnoconfig) failed like this:
> ...
> Caused by commit
> 
>   8e074c243ed3 ("iomap: add missing const to ioread*/iowrite addr arg")

I have prepared a patch addressing this issue, and am currently building it
with a powerpc cross compiler. I'll submit it once it's done. Please tell
me if I should update the initial patch instead.

> The const qualifiers are also missing in:
> 
> arch/parisc/lib/iomap.c
> arch/sh/kernel/iomap.c

I also have patches for these architectures, but it is more complicated for
me to test them with a cross compiler. Should I still submit them?

> I have reverted that commit for today.
> 
> BTW, that commit only added the const to the ioread* functions ...

Yes, and it does not even make sense to add a const qualifier to the addr
argument in the iowrite case. That was a bad commit message.

Thanks, and sorry for the trouble.

regards,
 Hugo

-- 
                Hugo Lefeuvre (hle)    |    www.owl.eu.com
RSA4096_ 360B 03B3 BF27 4F4D 7A3F D5E8 14AA 1EB8 A247 3DFD
ed25519_ 37B2 6D38 0B25 B8A2 6B9F 3A65 A36F 5357 5F2D DC4C

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

* linux-next: build failure after merge of the asm-generic tree
@ 2019-02-19  6:36 Stephen Rothwell
  2019-02-19  7:45 ` Hugo Lefeuvre
  0 siblings, 1 reply; 21+ messages in thread
From: Stephen Rothwell @ 2019-02-19  6:36 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Hugo Lefeuvre

[-- Attachment #1: Type: text/plain, Size: 6512 bytes --]

Hi Arnd,

After merging the asm-generic tree, today's linux-next build (powerpc
allnoconfig) failed like this:

arch/powerpc/kernel/iomap.c:18:14: error: conflicting types for 'ioread8'
 unsigned int ioread8(void __iomem *addr)
              ^~~~~~~
In file included from arch/powerpc/include/asm/io.h:653,
                 from include/linux/io.h:25,
                 from include/linux/irq.h:20,
                 from arch/powerpc/include/asm/hardirq.h:6,
                 from include/linux/hardirq.h:9,
                 from include/linux/interrupt.h:11,
                 from include/linux/pci.h:32,
                 from arch/powerpc/kernel/iomap.c:7:
include/asm-generic/iomap.h:29:21: note: previous declaration of 'ioread8' was here
 extern unsigned int ioread8(const void __iomem *addr);
                     ^~~~~~~
arch/powerpc/kernel/iomap.c:22:14: error: conflicting types for 'ioread16'
 unsigned int ioread16(void __iomem *addr)
              ^~~~~~~~
In file included from arch/powerpc/include/asm/io.h:653,
                 from include/linux/io.h:25,
                 from include/linux/irq.h:20,
                 from arch/powerpc/include/asm/hardirq.h:6,
                 from include/linux/hardirq.h:9,
                 from include/linux/interrupt.h:11,
                 from include/linux/pci.h:32,
                 from arch/powerpc/kernel/iomap.c:7:
include/asm-generic/iomap.h:30:21: note: previous declaration of 'ioread16' was here
 extern unsigned int ioread16(const void __iomem *addr);
                     ^~~~~~~~
arch/powerpc/kernel/iomap.c:26:14: error: conflicting types for 'ioread16be'
 unsigned int ioread16be(void __iomem *addr)
              ^~~~~~~~~~
In file included from arch/powerpc/include/asm/io.h:653,
                 from include/linux/io.h:25,
                 from include/linux/irq.h:20,
                 from arch/powerpc/include/asm/hardirq.h:6,
                 from include/linux/hardirq.h:9,
                 from include/linux/interrupt.h:11,
                 from include/linux/pci.h:32,
                 from arch/powerpc/kernel/iomap.c:7:
include/asm-generic/iomap.h:31:21: note: previous declaration of 'ioread16be' was here
 extern unsigned int ioread16be(const void __iomem *addr);
                     ^~~~~~~~~~
arch/powerpc/kernel/iomap.c:30:14: error: conflicting types for 'ioread32'
 unsigned int ioread32(void __iomem *addr)
              ^~~~~~~~
In file included from arch/powerpc/include/asm/io.h:653,
                 from include/linux/io.h:25,
                 from include/linux/irq.h:20,
                 from arch/powerpc/include/asm/hardirq.h:6,
                 from include/linux/hardirq.h:9,
                 from include/linux/interrupt.h:11,
                 from include/linux/pci.h:32,
                 from arch/powerpc/kernel/iomap.c:7:
include/asm-generic/iomap.h:32:21: note: previous declaration of 'ioread32' was here
 extern unsigned int ioread32(const void __iomem *addr);
                     ^~~~~~~~
arch/powerpc/kernel/iomap.c:34:14: error: conflicting types for 'ioread32be'
 unsigned int ioread32be(void __iomem *addr)
              ^~~~~~~~~~
In file included from arch/powerpc/include/asm/io.h:653,
                 from include/linux/io.h:25,
                 from include/linux/irq.h:20,
                 from arch/powerpc/include/asm/hardirq.h:6,
                 from include/linux/hardirq.h:9,
                 from include/linux/interrupt.h:11,
                 from include/linux/pci.h:32,
                 from arch/powerpc/kernel/iomap.c:7:
include/asm-generic/iomap.h:33:21: note: previous declaration of 'ioread32be' was here
 extern unsigned int ioread32be(const void __iomem *addr);
                     ^~~~~~~~~~
arch/powerpc/kernel/iomap.c:142:6: error: conflicting types for 'ioread8_rep'
 void ioread8_rep(void __iomem *addr, void *dst, unsigned long count)
      ^~~~~~~~~~~
In file included from arch/powerpc/include/asm/io.h:653,
                 from include/linux/io.h:25,
                 from include/linux/irq.h:20,
                 from arch/powerpc/include/asm/hardirq.h:6,
                 from include/linux/hardirq.h:9,
                 from include/linux/interrupt.h:11,
                 from include/linux/pci.h:32,
                 from arch/powerpc/kernel/iomap.c:7:
include/asm-generic/iomap.h:82:13: note: previous declaration of 'ioread8_rep' was here
 extern void ioread8_rep(const void __iomem *port, void *buf, unsigned long count);
             ^~~~~~~~~~~
arch/powerpc/kernel/iomap.c:146:6: error: conflicting types for 'ioread16_rep'
 void ioread16_rep(void __iomem *addr, void *dst, unsigned long count)
      ^~~~~~~~~~~~
In file included from arch/powerpc/include/asm/io.h:653,
                 from include/linux/io.h:25,
                 from include/linux/irq.h:20,
                 from arch/powerpc/include/asm/hardirq.h:6,
                 from include/linux/hardirq.h:9,
                 from include/linux/interrupt.h:11,
                 from include/linux/pci.h:32,
                 from arch/powerpc/kernel/iomap.c:7:
include/asm-generic/iomap.h:83:13: note: previous declaration of 'ioread16_rep' was here
 extern void ioread16_rep(const void __iomem *port, void *buf, unsigned long count);
             ^~~~~~~~~~~~
arch/powerpc/kernel/iomap.c:150:6: error: conflicting types for 'ioread32_rep'
 void ioread32_rep(void __iomem *addr, void *dst, unsigned long count)
      ^~~~~~~~~~~~
In file included from arch/powerpc/include/asm/io.h:653,
                 from include/linux/io.h:25,
                 from include/linux/irq.h:20,
                 from arch/powerpc/include/asm/hardirq.h:6,
                 from include/linux/hardirq.h:9,
                 from include/linux/interrupt.h:11,
                 from include/linux/pci.h:32,
                 from arch/powerpc/kernel/iomap.c:7:
include/asm-generic/iomap.h:84:13: note: previous declaration of 'ioread32_rep' was here
 extern void ioread32_rep(const void __iomem *port, void *buf, unsigned long count);
             ^~~~~~~~~~~~

Caused by commit

  8e074c243ed3 ("iomap: add missing const to ioread*/iowrite addr arg")

The const qualifiers are also missing in:

arch/parisc/lib/iomap.c
arch/sh/kernel/iomap.c

I have reverted that commit for today.

BTW, that commit only added the const to the ioread* functions ...
-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build failure after merge of the asm-generic tree
  2015-10-14 23:32 ` kbuild test robot
@ 2015-10-15  2:37   ` Stephen Rothwell
  0 siblings, 0 replies; 21+ messages in thread
From: Stephen Rothwell @ 2015-10-15  2:37 UTC (permalink / raw)
  To: kbuild test robot
  Cc: kbuild-all, Arnd Bergmann, linux-next, linux-kernel, Christoph Hellwig

Hi,

On Thu, 15 Oct 2015 07:32:27 +0800 kbuild test robot <lkp@intel.com> wrote:
>
> [auto build test ERROR on v4.3-rc5 -- if it's inappropriate base, please suggest rules for selecting the more suitable base]

I think you should just ignore any patches from me that have
"linux-next:" in the subject line as they need to be applied either to
a branch I have merged or to a combination of branches I have merged.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

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

* Re: linux-next: build failure after merge of the asm-generic tree
  2015-10-14 22:55 Stephen Rothwell
@ 2015-10-14 23:32 ` kbuild test robot
  2015-10-15  2:37   ` Stephen Rothwell
  0 siblings, 1 reply; 21+ messages in thread
From: kbuild test robot @ 2015-10-14 23:32 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: kbuild-all, Arnd Bergmann, linux-next, linux-kernel, Christoph Hellwig

[-- Attachment #1: Type: text/plain, Size: 1095 bytes --]

Hi Stephen,

[auto build test ERROR on v4.3-rc5 -- if it's inappropriate base, please suggest rules for selecting the more suitable base]

url:    https://github.com/0day-ci/linux/commits/Stephen-Rothwell/linux-next-build-failure-after-merge-of-the-asm-generic-tree/20151015-065548
config: i386-randconfig-i1-201541 (attached as .config)
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

>> drivers/acpi/osl.c:43:41: fatal error: linux/io-64-nonatomic-lo-hi.h: No such file or directory
   compilation terminated.

vim +43 drivers/acpi/osl.c

    37	#include <linux/acpi.h>
    38	#include <linux/efi.h>
    39	#include <linux/ioport.h>
    40	#include <linux/list.h>
    41	#include <linux/jiffies.h>
    42	#include <linux/semaphore.h>
  > 43	#include <linux/io-64-nonatomic-lo-hi.h>
    44	
    45	#include <asm/io.h>
    46	#include <asm/uaccess.h>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 18058 bytes --]

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

* linux-next: build failure after merge of the asm-generic tree
@ 2015-10-14 22:55 Stephen Rothwell
  2015-10-14 23:32 ` kbuild test robot
  0 siblings, 1 reply; 21+ messages in thread
From: Stephen Rothwell @ 2015-10-14 22:55 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: linux-next, linux-kernel, Christoph Hellwig

Hi Arnd,

After merging the asm-generic tree, today's linux-next build (x86_64
allmodconfig) failed like this:

drivers/acpi/osl.c:46:47: fatal error: asm-generic/io-64-nonatomic-lo-hi.h: No such file or directory
 #include <asm-generic/io-64-nonatomic-lo-hi.h>
                                               ^

Caused by commit

  f626fe17485b ("move io-64-nonatomic*.h out of asm-generic")

interacting with commit

  3277b4ea216e ("ACPI / osl: replace custom implementation of readq / writeq")

from Linus' tree (added before v4.3-rc1).

I added the following build fix:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 15 Oct 2015 09:50:08 +1100
Subject: [PATCH] fix for "move io-64-nonatomic*.h out of asm-generic"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/acpi/osl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index 739a4a6b3b9b..ed219da94904 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -40,10 +40,10 @@
 #include <linux/list.h>
 #include <linux/jiffies.h>
 #include <linux/semaphore.h>
+#include <linux/io-64-nonatomic-lo-hi.h>
 
 #include <asm/io.h>
 #include <asm/uaccess.h>
-#include <asm-generic/io-64-nonatomic-lo-hi.h>
 
 #include "internal.h"
 
-- 
2.5.1

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

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

* Re: linux-next: build failure after merge of the asm-generic tree
  2014-11-19  7:54 Stephen Rothwell
@ 2014-11-19  9:21 ` Arnd Bergmann
  0 siblings, 0 replies; 21+ messages in thread
From: Arnd Bergmann @ 2014-11-19  9:21 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: linux-next, linux-kernel, Will Deacon, David S. Miller, Sam Ravnborg

On Wednesday 19 November 2014 18:54:14 Stephen Rothwell wrote:
> Hi Arnd,
> 
> After merging the asm-generic tree, today's linux-next build (sparc
> defconfig) failed like this:
> 
> In file included from include/linux/io.h:22:0,
>                  from include/linux/irq.h:23,
>                  from include/asm-generic/hardirq.h:12,
>                  from arch/sparc/include/asm/hardirq_32.h:10,
>                  from arch/sparc/include/asm/hardirq.h:6,
>                  from include/linux/hardirq.h:8,
>                  from include/linux/memcontrol.h:24,
>                  from include/linux/swap.h:8,
>                  from arch/sparc/include/asm/pgtable_32.h:17,
>                  from arch/sparc/include/asm/pgtable.h:6,
>                  from include/linux/mm.h:52,
>                  from include/linux/pagemap.h:7,
>                  from include/linux/blkdev.h:14,
>                  from init/do_mounts.h:2,
>                  from init/do_mounts_rd.c:21:
> arch/sparc/include/asm/io.h:14:0: warning: "readb_relaxed" redefined

Thanks for the report! I think we had seen this one before, but from what
I remembered, Will had already fixed all problems like this one. Apparently
the version I merged did not have the fix, so I applied the patch below
on top of my branch, and checked that it works on both sparc32 and sparc64.

Let me know if I should fix it differently.

	Arnd

>From 7c3969c3a4f3593bf7963355e10401a8638cb1cb Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <arnd@arndb.de>
Date: Wed, 19 Nov 2014 10:15:33 +0100
Subject: [PATCH] sparc: io: remove duplicate relaxed accessors on sparc32

Commit 1191ccb34cf8 ("sparc: io: implement dummy relaxed accessor
macros for writes") added the relaxed accessors (readl_relaxed etc) in
a file that is shared between sparc32 and sparc64. However, the earlier
e1039fb42609 ("sparc32: introduce asm-generic/io.h") had already changed
the sparc32 implementation to use asm-generic/io.h, which provides the
same macros, resulting in lots of build errors.

This moves the definitions from the shared sparc file into the
sparc64-only file to fix the sparc32 build regression.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Fixes: 1191ccb34cf8 ("sparc: io: implement dummy relaxed accessor macros for writes")

diff --git a/arch/sparc/include/asm/io.h b/arch/sparc/include/asm/io.h
index 493f22c4684f..f6902cf3cbe9 100644
--- a/arch/sparc/include/asm/io.h
+++ b/arch/sparc/include/asm/io.h
@@ -10,15 +10,6 @@
  * Defines used for both SPARC32 and SPARC64
  */
 
-/* Relaxed accessors for MMIO */
-#define readb_relaxed(__addr)		readb(__addr)
-#define readw_relaxed(__addr)		readw(__addr)
-#define readl_relaxed(__addr)		readl(__addr)
-
-#define writeb_relaxed(__b, __addr)	writeb(__b, __addr)
-#define writew_relaxed(__w, __addr)	writew(__w, __addr)
-#define writel_relaxed(__l, __addr)	writel(__l, __addr)
-
 /* Big endian versions of memory read/write routines */
 #define readb_be(__addr)	__raw_readb(__addr)
 #define readw_be(__addr)	__raw_readw(__addr)
diff --git a/arch/sparc/include/asm/io_64.h b/arch/sparc/include/asm/io_64.h
index d50e6127325d..9b672be70dda 100644
--- a/arch/sparc/include/asm/io_64.h
+++ b/arch/sparc/include/asm/io_64.h
@@ -101,6 +101,7 @@ static inline void __raw_writeq(u64 q, const volatile void __iomem *addr)
  * the cache by using ASI_PHYS_BYPASS_EC_E_L
  */
 #define readb readb
+#define readb_relaxed readb
 static inline u8 readb(const volatile void __iomem *addr)
 {	u8 ret;
 
@@ -112,6 +113,7 @@ static inline u8 readb(const volatile void __iomem *addr)
 }
 
 #define readw readw
+#define readw_relaxed readw
 static inline u16 readw(const volatile void __iomem *addr)
 {	u16 ret;
 
@@ -124,6 +126,7 @@ static inline u16 readw(const volatile void __iomem *addr)
 }
 
 #define readl readl
+#define readl_relaxed readl
 static inline u32 readl(const volatile void __iomem *addr)
 {	u32 ret;
 
@@ -149,6 +152,7 @@ static inline u64 readq(const volatile void __iomem *addr)
 }
 
 #define writeb writeb
+#define writeb_relaxed writeb
 static inline void writeb(u8 b, volatile void __iomem *addr)
 {
 	__asm__ __volatile__("stba\t%r0, [%1] %2\t/* pci_writeb */"
@@ -158,6 +162,7 @@ static inline void writeb(u8 b, volatile void __iomem *addr)
 }
 
 #define writew writew
+#define writew_relaxed writew
 static inline void writew(u16 w, volatile void __iomem *addr)
 {
 	__asm__ __volatile__("stha\t%r0, [%1] %2\t/* pci_writew */"
@@ -167,6 +172,7 @@ static inline void writew(u16 w, volatile void __iomem *addr)
 }
 
 #define writel writel
+#define writel_relaxed writel
 static inline void writel(u32 l, volatile void __iomem *addr)
 {
 	__asm__ __volatile__("stwa\t%r0, [%1] %2\t/* pci_writel */"


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

* linux-next: build failure after merge of the asm-generic tree
@ 2014-11-19  7:54 Stephen Rothwell
  2014-11-19  9:21 ` Arnd Bergmann
  0 siblings, 1 reply; 21+ messages in thread
From: Stephen Rothwell @ 2014-11-19  7:54 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: linux-next, linux-kernel, Will Deacon, David S. Miller, Sam Ravnborg

[-- Attachment #1: Type: text/plain, Size: 5085 bytes --]

Hi Arnd,

After merging the asm-generic tree, today's linux-next build (sparc
defconfig) failed like this:

In file included from include/linux/io.h:22:0,
                 from include/linux/irq.h:23,
                 from include/asm-generic/hardirq.h:12,
                 from arch/sparc/include/asm/hardirq_32.h:10,
                 from arch/sparc/include/asm/hardirq.h:6,
                 from include/linux/hardirq.h:8,
                 from include/linux/memcontrol.h:24,
                 from include/linux/swap.h:8,
                 from arch/sparc/include/asm/pgtable_32.h:17,
                 from arch/sparc/include/asm/pgtable.h:6,
                 from include/linux/mm.h:52,
                 from include/linux/pagemap.h:7,
                 from include/linux/blkdev.h:14,
                 from init/do_mounts.h:2,
                 from init/do_mounts_rd.c:21:
arch/sparc/include/asm/io.h:14:0: warning: "readb_relaxed" redefined
 #define readb_relaxed(__addr)  readb(__addr)
 ^
In file included from arch/sparc/include/asm/io_32.h:13:0,
                 from arch/sparc/include/asm/io.h:6,
                 from include/linux/io.h:22,
                 from include/linux/irq.h:23,
                 from include/asm-generic/hardirq.h:12,
                 from arch/sparc/include/asm/hardirq_32.h:10,
                 from arch/sparc/include/asm/hardirq.h:6,
                 from include/linux/hardirq.h:8,
                 from include/linux/memcontrol.h:24,
                 from include/linux/swap.h:8,
                 from arch/sparc/include/asm/pgtable_32.h:17,
                 from arch/sparc/include/asm/pgtable.h:6,
                 from include/linux/mm.h:52,
                 from include/linux/pagemap.h:7,
                 from include/linux/blkdev.h:14,
                 from init/do_mounts.h:2,
                 from init/do_mounts_rd.c:21:
include/asm-generic/io.h:183:0: note: this is the location of the previous definition
 #define readb_relaxed readb
 ^

And many, many more :-(

Caused by commit 1191ccb34cf8 ("sparc: io: implement dummy relaxed
accessor macros for writes").

I applied the following fix patch:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 19 Nov 2014 18:49:07 +1100
Subject: [PATCH] sparc: io: fix for implement dummy relaxed accessor macros for writes

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/sparc/include/asm/io.h    | 9 ---------
 arch/sparc/include/asm/io_32.h | 9 +++++++++
 arch/sparc/include/asm/io_64.h | 9 +++++++++
 3 files changed, 18 insertions(+), 9 deletions(-)

diff --git a/arch/sparc/include/asm/io.h b/arch/sparc/include/asm/io.h
index 493f22c4684f..f6902cf3cbe9 100644
--- a/arch/sparc/include/asm/io.h
+++ b/arch/sparc/include/asm/io.h
@@ -10,15 +10,6 @@
  * Defines used for both SPARC32 and SPARC64
  */
 
-/* Relaxed accessors for MMIO */
-#define readb_relaxed(__addr)		readb(__addr)
-#define readw_relaxed(__addr)		readw(__addr)
-#define readl_relaxed(__addr)		readl(__addr)
-
-#define writeb_relaxed(__b, __addr)	writeb(__b, __addr)
-#define writew_relaxed(__w, __addr)	writew(__w, __addr)
-#define writel_relaxed(__l, __addr)	writel(__l, __addr)
-
 /* Big endian versions of memory read/write routines */
 #define readb_be(__addr)	__raw_readb(__addr)
 #define readw_be(__addr)	__raw_readw(__addr)
diff --git a/arch/sparc/include/asm/io_32.h b/arch/sparc/include/asm/io_32.h
index 407ac14295f4..9484c8ec18cf 100644
--- a/arch/sparc/include/asm/io_32.h
+++ b/arch/sparc/include/asm/io_32.h
@@ -4,6 +4,15 @@
 #include <linux/kernel.h>
 #include <linux/ioport.h>  /* struct resource */
 
+/* Relaxed accessors for MMIO */
+#define readb_relaxed(__addr)		readb(__addr)
+#define readw_relaxed(__addr)		readw(__addr)
+#define readl_relaxed(__addr)		readl(__addr)
+
+#define writeb_relaxed(__b, __addr)	writeb(__b, __addr)
+#define writew_relaxed(__w, __addr)	writew(__w, __addr)
+#define writel_relaxed(__l, __addr)	writel(__l, __addr)
+
 #define IO_SPACE_LIMIT 0xffffffff
 
 #define memset_io(d,c,sz)     _memset_io(d,c,sz)
diff --git a/arch/sparc/include/asm/io_64.h b/arch/sparc/include/asm/io_64.h
index d50e6127325d..078f600376c6 100644
--- a/arch/sparc/include/asm/io_64.h
+++ b/arch/sparc/include/asm/io_64.h
@@ -265,6 +265,15 @@ static inline void iowrite32_rep(void __iomem *port, const void *buf, unsigned l
 	outsl((unsigned long __force)port, buf, count);
 }
 
+/* Relaxed accessors for MMIO */
+#define readb_relaxed(__addr)		readb(__addr)
+#define readw_relaxed(__addr)		readw(__addr)
+#define readl_relaxed(__addr)		readl(__addr)
+
+#define writeb_relaxed(__b, __addr)	writeb(__b, __addr)
+#define writew_relaxed(__w, __addr)	writew(__w, __addr)
+#define writel_relaxed(__l, __addr)	writel(__l, __addr)
+
 /* Valid I/O Space regions are anywhere, because each PCI bus supported
  * can live in an arbitrary area of the physical address range.
  */
-- 
2.1.3

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: linux-next: build failure after merge of the asm-generic tree
  2014-09-29 22:31     ` Stephen Rothwell
@ 2014-09-30 10:00       ` Arnd Bergmann
  0 siblings, 0 replies; 21+ messages in thread
From: Arnd Bergmann @ 2014-09-30 10:00 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Will Deacon, linux-next, linux-kernel, David S. Miller

On Tuesday 30 September 2014 08:31:16 Stephen Rothwell wrote:
> Hi Arnd,
> 
> On Fri, 26 Sep 2014 13:14:45 +0200 Arnd Bergmann <arnd@arndb.de> wrote:
> >
> > Thanks, applied on top with Stephen's full report in the commit
> > message and your Ack.
> 
> I look at your tree today, and its empty ... just checking that you
> didn't forget to push or something.
> 

Thanks for the notification. I got overloaded with regressions and
ended up backing it all out for now. I still hope to get the subset
that Will did merged, but first need to split out some or all of
Thierry's patches that caused the regressions.

	Arnd

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

* Re: linux-next: build failure after merge of the asm-generic tree
  2014-09-26 11:14   ` Arnd Bergmann
@ 2014-09-29 22:31     ` Stephen Rothwell
  2014-09-30 10:00       ` Arnd Bergmann
  0 siblings, 1 reply; 21+ messages in thread
From: Stephen Rothwell @ 2014-09-29 22:31 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Will Deacon, linux-next, linux-kernel, David S. Miller

[-- Attachment #1: Type: text/plain, Size: 360 bytes --]

Hi Arnd,

On Fri, 26 Sep 2014 13:14:45 +0200 Arnd Bergmann <arnd@arndb.de> wrote:
>
> Thanks, applied on top with Stephen's full report in the commit
> message and your Ack.

I look at your tree today, and its empty ... just checking that you
didn't forget to push or something.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: linux-next: build failure after merge of the asm-generic tree
  2014-09-26 10:53 ` Will Deacon
@ 2014-09-26 11:14   ` Arnd Bergmann
  2014-09-29 22:31     ` Stephen Rothwell
  0 siblings, 1 reply; 21+ messages in thread
From: Arnd Bergmann @ 2014-09-26 11:14 UTC (permalink / raw)
  To: Will Deacon; +Cc: Stephen Rothwell, linux-next, linux-kernel, David S. Miller

On Friday 26 September 2014 11:53:33 Will Deacon wrote:
> > From: Stephen Rothwell <sfr@canb.auug.org.au>
> > Date: Fri, 26 Sep 2014 19:57:03 +1000
> > Subject: [PATCH] sparc: io: fix for asm-generic: io: implement relaxed
> >  accessor macros as conditional wrappers
> > 
> > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > ---
> >  arch/sparc/include/asm/io.h | 11 ++++++-----
> >  1 file changed, 6 insertions(+), 5 deletions(-)
> > 
> > diff --git a/arch/sparc/include/asm/io.h b/arch/sparc/include/asm/io.h
> > index 493f22c4684f..79b167674010 100644
> > --- a/arch/sparc/include/asm/io.h
> > +++ b/arch/sparc/include/asm/io.h
> > @@ -1,10 +1,5 @@
> >  #ifndef ___ASM_SPARC_IO_H
> >  #define ___ASM_SPARC_IO_H
> > -#if defined(__sparc__) && defined(__arch64__)
> > -#include <asm/io_64.h>
> > -#else
> > -#include <asm/io_32.h>
> > -#endif
> >  
> >  /*
> >   * Defines used for both SPARC32 and SPARC64
> > @@ -19,6 +14,12 @@
> >  #define writew_relaxed(__w, __addr)  writew(__w, __addr)
> >  #define writel_relaxed(__l, __addr)  writel(__l, __addr)
> >  
> > +#if defined(__sparc__) && defined(__arch64__)
> > +#include <asm/io_64.h>
> > +#else
> > +#include <asm/io_32.h>
> > +#endif
> > +
> 
> This patch looks fine to me. Arnd, can you pick this up please?
> 

Thanks, applied on top with Stephen's full report in the commit
message and your Ack.

If David and Sam prefer, I could also do the patch below instead.
As sparc32 already uses the asm-generic header, it doesn't really
need the extra definitions, and they essentially become sparc64-only.

I've picked Stephen's version for now, since it's known to build
in the configurations he tests and has Will's Ack.

	Arnd

diff --git a/arch/sparc/include/asm/io.h b/arch/sparc/include/asm/io.h
index 493f22c4684f..f6902cf3cbe9 100644
--- a/arch/sparc/include/asm/io.h
+++ b/arch/sparc/include/asm/io.h
@@ -10,15 +10,6 @@
  * Defines used for both SPARC32 and SPARC64
  */
 
-/* Relaxed accessors for MMIO */
-#define readb_relaxed(__addr)		readb(__addr)
-#define readw_relaxed(__addr)		readw(__addr)
-#define readl_relaxed(__addr)		readl(__addr)
-
-#define writeb_relaxed(__b, __addr)	writeb(__b, __addr)
-#define writew_relaxed(__w, __addr)	writew(__w, __addr)
-#define writel_relaxed(__l, __addr)	writel(__l, __addr)
-
 /* Big endian versions of memory read/write routines */
 #define readb_be(__addr)	__raw_readb(__addr)
 #define readw_be(__addr)	__raw_readw(__addr)
diff --git a/arch/sparc/include/asm/io_64.h b/arch/sparc/include/asm/io_64.h
index d50e6127325d..e03df49e0dd8 100644
--- a/arch/sparc/include/asm/io_64.h
+++ b/arch/sparc/include/asm/io_64.h
@@ -412,6 +412,15 @@ static inline void iounmap(volatile void __iomem *addr)
 #define iowrite32(val,X)		writel(val,X)
 #define iowrite32be(val,X)		__raw_writel(val,X)
 
+/* Relaxed accessors for MMIO */
+#define readb_relaxed(__addr)		readb(__addr)
+#define readw_relaxed(__addr)		readw(__addr)
+#define readl_relaxed(__addr)		readl(__addr)
+
+#define writeb_relaxed(__b, __addr)	writeb(__b, __addr)
+#define writew_relaxed(__w, __addr)	writew(__w, __addr)
+#define writel_relaxed(__l, __addr)	writel(__l, __addr)
+
 /* Create a virtual mapping cookie for an IO port range */
 void __iomem *ioport_map(unsigned long port, unsigned int nr);
 void ioport_unmap(void __iomem *);


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

* Re: linux-next: build failure after merge of the asm-generic tree
  2014-09-26 10:02 Stephen Rothwell
@ 2014-09-26 10:53 ` Will Deacon
  2014-09-26 11:14   ` Arnd Bergmann
  0 siblings, 1 reply; 21+ messages in thread
From: Will Deacon @ 2014-09-26 10:53 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Arnd Bergmann, linux-next, linux-kernel, David S. Miller

On Fri, Sep 26, 2014 at 11:02:51AM +0100, Stephen Rothwell wrote:
> After merging the asm-generic tree, today's linux-next build (sparc
> defconfig) failed like this:
> 
> In file included from /scratch/sfr/next/include/linux/clocksource.h:19:0,
>                  from /scratch/sfr/next/arch/sparc/include/asm/timer_32.h:11,
>                  from /scratch/sfr/next/arch/sparc/include/asm/timer.h:6,
>                  from /scratch/sfr/next/arch/sparc/kernel/sun4m_irq.c:14:
> /scratch/sfr/next/arch/sparc/include/asm/io.h:14:0: error: "readb_relaxed" redefined [-Werror]
>  #define readb_relaxed(__addr)  readb(__addr)
>  ^
> In file included from /scratch/sfr/next/arch/sparc/include/asm/io_32.h:13:0,
>                  from /scratch/sfr/next/arch/sparc/include/asm/io.h:6,
>                  from /scratch/sfr/next/include/linux/clocksource.h:19,
>                  from /scratch/sfr/next/arch/sparc/include/asm/timer_32.h:11,
>                  from /scratch/sfr/next/arch/sparc/include/asm/timer.h:6,
>                  from /scratch/sfr/next/arch/sparc/kernel/sun4m_irq.c:14:
> /scratch/sfr/next/include/asm-generic/io.h:182:0: note: this is the location of the previous definition
>  #define readb_relaxed readb
>  ^
> 
> And so on several hundred times ... :-(
> 
> Caused by commits 95a668b0452e ("sparc: io: implement dummy relaxed
> accessor macros for writes") and 4c255791ffd6 ("asm-generic: io:
> implement relaxed accessor macros as conditional wrappers").
> 
> arch/sparc/include/asm_32.h includes asm-generic/io.h which means it is
> include before the arch specific versions of the relaxed functions are
> defined ...

Ah yes, Sam recently moved sparc32 over to asm-generic/io.h.

> I have added this patch for today:
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Fri, 26 Sep 2014 19:57:03 +1000
> Subject: [PATCH] sparc: io: fix for asm-generic: io: implement relaxed
>  accessor macros as conditional wrappers
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  arch/sparc/include/asm/io.h | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/sparc/include/asm/io.h b/arch/sparc/include/asm/io.h
> index 493f22c4684f..79b167674010 100644
> --- a/arch/sparc/include/asm/io.h
> +++ b/arch/sparc/include/asm/io.h
> @@ -1,10 +1,5 @@
>  #ifndef ___ASM_SPARC_IO_H
>  #define ___ASM_SPARC_IO_H
> -#if defined(__sparc__) && defined(__arch64__)
> -#include <asm/io_64.h>
> -#else
> -#include <asm/io_32.h>
> -#endif
>  
>  /*
>   * Defines used for both SPARC32 and SPARC64
> @@ -19,6 +14,12 @@
>  #define writew_relaxed(__w, __addr)	writew(__w, __addr)
>  #define writel_relaxed(__l, __addr)	writel(__l, __addr)
>  
> +#if defined(__sparc__) && defined(__arch64__)
> +#include <asm/io_64.h>
> +#else
> +#include <asm/io_32.h>
> +#endif
> +

This patch looks fine to me. Arnd, can you pick this up please?

Thanks,

Will

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

* linux-next: build failure after merge of the asm-generic tree
@ 2014-09-26 10:02 Stephen Rothwell
  2014-09-26 10:53 ` Will Deacon
  0 siblings, 1 reply; 21+ messages in thread
From: Stephen Rothwell @ 2014-09-26 10:02 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: linux-next, linux-kernel, Will Deacon, David S. Miller

[-- Attachment #1: Type: text/plain, Size: 2881 bytes --]

Hi Arnd,

After merging the asm-generic tree, today's linux-next build (sparc
defconfig) failed like this:

In file included from /scratch/sfr/next/include/linux/clocksource.h:19:0,
                 from /scratch/sfr/next/arch/sparc/include/asm/timer_32.h:11,
                 from /scratch/sfr/next/arch/sparc/include/asm/timer.h:6,
                 from /scratch/sfr/next/arch/sparc/kernel/sun4m_irq.c:14:
/scratch/sfr/next/arch/sparc/include/asm/io.h:14:0: error: "readb_relaxed" redefined [-Werror]
 #define readb_relaxed(__addr)  readb(__addr)
 ^
In file included from /scratch/sfr/next/arch/sparc/include/asm/io_32.h:13:0,
                 from /scratch/sfr/next/arch/sparc/include/asm/io.h:6,
                 from /scratch/sfr/next/include/linux/clocksource.h:19,
                 from /scratch/sfr/next/arch/sparc/include/asm/timer_32.h:11,
                 from /scratch/sfr/next/arch/sparc/include/asm/timer.h:6,
                 from /scratch/sfr/next/arch/sparc/kernel/sun4m_irq.c:14:
/scratch/sfr/next/include/asm-generic/io.h:182:0: note: this is the location of the previous definition
 #define readb_relaxed readb
 ^

And so on several hundred times ... :-(

Caused by commits 95a668b0452e ("sparc: io: implement dummy relaxed
accessor macros for writes") and 4c255791ffd6 ("asm-generic: io:
implement relaxed accessor macros as conditional wrappers").

arch/sparc/include/asm_32.h includes asm-generic/io.h which means it is
include before the arch specific versions of the relaxed functions are
defined ...

I have added this patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 26 Sep 2014 19:57:03 +1000
Subject: [PATCH] sparc: io: fix for asm-generic: io: implement relaxed
 accessor macros as conditional wrappers

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/sparc/include/asm/io.h | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/arch/sparc/include/asm/io.h b/arch/sparc/include/asm/io.h
index 493f22c4684f..79b167674010 100644
--- a/arch/sparc/include/asm/io.h
+++ b/arch/sparc/include/asm/io.h
@@ -1,10 +1,5 @@
 #ifndef ___ASM_SPARC_IO_H
 #define ___ASM_SPARC_IO_H
-#if defined(__sparc__) && defined(__arch64__)
-#include <asm/io_64.h>
-#else
-#include <asm/io_32.h>
-#endif
 
 /*
  * Defines used for both SPARC32 and SPARC64
@@ -19,6 +14,12 @@
 #define writew_relaxed(__w, __addr)	writew(__w, __addr)
 #define writel_relaxed(__l, __addr)	writel(__l, __addr)
 
+#if defined(__sparc__) && defined(__arch64__)
+#include <asm/io_64.h>
+#else
+#include <asm/io_32.h>
+#endif
+
 /* Big endian versions of memory read/write routines */
 #define readb_be(__addr)	__raw_readb(__addr)
 #define readw_be(__addr)	__raw_readw(__addr)
-- 
2.1.1

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

end of thread, other threads:[~2022-07-21  6:57 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-15 22:13 linux-next: build failure after merge of the asm-generic tree Stephen Rothwell
2018-03-15 22:47 ` Bin Liu
2018-03-16  8:07   ` Arnd Bergmann
  -- strict thread matches above, loose matches on Subject: below --
2022-07-20 12:36 Stephen Rothwell
2022-07-20 12:51 ` Arnd Bergmann
2022-07-21  6:57   ` Lukas Bulwahn
2019-02-19  6:36 Stephen Rothwell
2019-02-19  7:45 ` Hugo Lefeuvre
2019-02-19 10:14   ` Arnd Bergmann
2019-02-19 11:19     ` Hugo Lefeuvre
2019-02-19 14:42       ` Arnd Bergmann
2015-10-14 22:55 Stephen Rothwell
2015-10-14 23:32 ` kbuild test robot
2015-10-15  2:37   ` Stephen Rothwell
2014-11-19  7:54 Stephen Rothwell
2014-11-19  9:21 ` Arnd Bergmann
2014-09-26 10:02 Stephen Rothwell
2014-09-26 10:53 ` Will Deacon
2014-09-26 11:14   ` Arnd Bergmann
2014-09-29 22:31     ` Stephen Rothwell
2014-09-30 10:00       ` Arnd Bergmann

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.