stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BUG] new MIPS compile error on v5.15.27
@ 2022-03-10 16:25 H. Nikolaus Schaller
  2022-03-10 16:28 ` Christoph Hellwig
  2022-03-10 19:05 ` Greg KH
  0 siblings, 2 replies; 7+ messages in thread
From: H. Nikolaus Schaller @ 2022-03-10 16:25 UTC (permalink / raw)
  To: Huang Pei, Thomas Bogendoerfer, Sasha Levin, Christoph Hellwig
  Cc: stable, linux-kernel, Discussions about the Letux Kernel

upstream commit 277c8cb3e8ac ("MIPS: fix local_{add,sub}_return on MIPS64")

was backported to v5.15.27 as

commit f98371d2ac83 ("MIPS: fix local_{add,sub}_return on MIPS64")

but breaks MIPS build:

In file included from ./arch/mips/include/asm/local.h:8:0,
                 from ./include/linux/genhd.h:20,
                 from ./include/linux/blkdev.h:8,
                 from ./include/linux/blk-cgroup.h:23,
                 from ./include/linux/writeback.h:14,
                 from ./include/linux/memcontrol.h:22,
                 from ./include/net/sock.h:53,
                 from ./include/linux/tcp.h:19,
                 from drivers/net/slip/slip.c:91:
./arch/mips/include/asm/asm.h:68:0: warning: "END" redefined
 #define END(function)     \
 
In file included from drivers/net/slip/slip.c:88:0:
drivers/net/slip/slip.h:44:0: note: this is the location of the previous definition
 #define END             0300  /* indicates end of frame */

Analyses reveals that with the backported MIPS fix there is a new
#include <asm/asm.h> introduced by ./arch/mips/include/asm/local.h
which already defines some END macro.

But why does v5.16.x compile fine where

commit a0ecfd10d669c ("MIPS: fix local_{add,sub}_return on MIPS64")

is also present since v5.16.3?

Deeper analyses shows that there is another patch introduced
in v5.16-rc1 which removed one #include in the above chain and
therefore does not define END by asm/asm.h:

commit 348332e000697 ("mm: don't include <linux/blk-cgroup.h> in <linux/writeback.h>")

Hence, the MIPS fix should only be applied to branches where
the mm fix is already present. Or the mm fix should be backported
as well (if it has no side-effects).

Note: the MIPS fix was apparently not (yet?) applied to v5.10.y or earlier
even tough the Fixes: 7232311ef14c ("local_t: mips extension")
would be true.

BR and thanks,
Nikolaus Schaller


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

* Re: [BUG] new MIPS compile error on v5.15.27
  2022-03-10 16:25 [BUG] new MIPS compile error on v5.15.27 H. Nikolaus Schaller
@ 2022-03-10 16:28 ` Christoph Hellwig
  2022-03-10 16:34   ` H. Nikolaus Schaller
  2022-03-10 16:48   ` Maciej W. Rozycki
  2022-03-10 19:05 ` Greg KH
  1 sibling, 2 replies; 7+ messages in thread
From: Christoph Hellwig @ 2022-03-10 16:28 UTC (permalink / raw)
  To: H. Nikolaus Schaller
  Cc: Huang Pei, Thomas Bogendoerfer, Sasha Levin, Christoph Hellwig,
	stable, linux-kernel, Discussions about the Letux Kernel

Please fix <asm/asm.h>.   The most trivial fix might be to only defined
END() under __ASSEMBLY__, although in the long run it probably wants a
better name as well.

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

* Re: [BUG] new MIPS compile error on v5.15.27
  2022-03-10 16:28 ` Christoph Hellwig
@ 2022-03-10 16:34   ` H. Nikolaus Schaller
  2022-03-10 16:39     ` H. Nikolaus Schaller
  2022-03-10 16:48   ` Maciej W. Rozycki
  1 sibling, 1 reply; 7+ messages in thread
From: H. Nikolaus Schaller @ 2022-03-10 16:34 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Huang Pei, Thomas Bogendoerfer, Sasha Levin, stable, linux-kernel,
	Discussions about the Letux Kernel


> Am 10.03.2022 um 17:28 schrieb Christoph Hellwig <hch@lst.de>:
> 
> Please fix <asm/asm.h>.   The most trivial fix might be to only defined
> END() under __ASSEMBLY__, although in the long run it probably wants a
> better name as well.

Well

a) the bug (name conflict) does not occur in v5.16 or later
b) I am in no way responsible for either of the patches or subsystems

So someone else has to either (partially?) backport

commit 348332e000697 ("mm: don't include <linux/blk-cgroup.h> in <linux/writeback.h>")

to 5.17.y

or write your proposed fix just for 5.17.y because it is not required elsewhere.

BR and thanks,
Nikolaus


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

* Re: [BUG] new MIPS compile error on v5.15.27
  2022-03-10 16:34   ` H. Nikolaus Schaller
@ 2022-03-10 16:39     ` H. Nikolaus Schaller
  0 siblings, 0 replies; 7+ messages in thread
From: H. Nikolaus Schaller @ 2022-03-10 16:39 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Huang Pei, Thomas Bogendoerfer, Sasha Levin, stable, linux-kernel,
	Discussions about the Letux Kernel



> Am 10.03.2022 um 17:34 schrieb H. Nikolaus Schaller <hns@goldelico.com>:
> 
> 
>> Am 10.03.2022 um 17:28 schrieb Christoph Hellwig <hch@lst.de>:
>> 
>> Please fix <asm/asm.h>.   The most trivial fix might be to only defined
>> END() under __ASSEMBLY__, although in the long run it probably wants a
>> better name as well.
> 
> Well
> 
> a) the bug (name conflict) does not occur in v5.16 or later
> b) I am in no way responsible for either of the patches or subsystems
> 
> So someone else has to either (partially?) backport
> 
> commit 348332e000697 ("mm: don't include <linux/blk-cgroup.h> in <linux/writeback.h>")
> 
> to 5.17.y
> 
> or write your proposed fix just for 5.17.y because it is not required elsewhere.

sorry, typo: just for v5.15.y

> 
> BR and thanks,
> Nikolaus
> 


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

* Re: [BUG] new MIPS compile error on v5.15.27
  2022-03-10 16:28 ` Christoph Hellwig
  2022-03-10 16:34   ` H. Nikolaus Schaller
@ 2022-03-10 16:48   ` Maciej W. Rozycki
  1 sibling, 0 replies; 7+ messages in thread
From: Maciej W. Rozycki @ 2022-03-10 16:48 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: H. Nikolaus Schaller, Huang Pei, Thomas Bogendoerfer, Sasha Levin,
	stable, linux-kernel, Discussions about the Letux Kernel

On Thu, 10 Mar 2022, Christoph Hellwig wrote:

> Please fix <asm/asm.h>.   The most trivial fix might be to only defined
> END() under __ASSEMBLY__, although in the long run it probably wants a
> better name as well.

 FWIW the END macro has its roots in IRIX if not MIPSCO.  It's been around 
for some 30 years if not more.  MIPS/ULTRIX may have had it too, as it's 
originally all ECOFF stuff, i.e. `.end', `.ent', `.frame', etc. assembly 
pseudo-ops for symbol/debug information.

  Maciej

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

* Re: [BUG] new MIPS compile error on v5.15.27
  2022-03-10 16:25 [BUG] new MIPS compile error on v5.15.27 H. Nikolaus Schaller
  2022-03-10 16:28 ` Christoph Hellwig
@ 2022-03-10 19:05 ` Greg KH
  2022-03-10 19:26   ` Christoph Hellwig
  1 sibling, 1 reply; 7+ messages in thread
From: Greg KH @ 2022-03-10 19:05 UTC (permalink / raw)
  To: H. Nikolaus Schaller
  Cc: Huang Pei, Thomas Bogendoerfer, Sasha Levin, Christoph Hellwig,
	stable, linux-kernel, Discussions about the Letux Kernel

On Thu, Mar 10, 2022 at 05:25:07PM +0100, H. Nikolaus Schaller wrote:
> upstream commit 277c8cb3e8ac ("MIPS: fix local_{add,sub}_return on MIPS64")
> 
> was backported to v5.15.27 as
> 
> commit f98371d2ac83 ("MIPS: fix local_{add,sub}_return on MIPS64")
> 
> but breaks MIPS build:
> 
> In file included from ./arch/mips/include/asm/local.h:8:0,
>                  from ./include/linux/genhd.h:20,
>                  from ./include/linux/blkdev.h:8,
>                  from ./include/linux/blk-cgroup.h:23,
>                  from ./include/linux/writeback.h:14,
>                  from ./include/linux/memcontrol.h:22,
>                  from ./include/net/sock.h:53,
>                  from ./include/linux/tcp.h:19,
>                  from drivers/net/slip/slip.c:91:
> ./arch/mips/include/asm/asm.h:68:0: warning: "END" redefined
>  #define END(function)     \
>  
> In file included from drivers/net/slip/slip.c:88:0:
> drivers/net/slip/slip.h:44:0: note: this is the location of the previous definition
>  #define END             0300  /* indicates end of frame */
> 
> Analyses reveals that with the backported MIPS fix there is a new
> #include <asm/asm.h> introduced by ./arch/mips/include/asm/local.h
> which already defines some END macro.
> 
> But why does v5.16.x compile fine where
> 
> commit a0ecfd10d669c ("MIPS: fix local_{add,sub}_return on MIPS64")
> 
> is also present since v5.16.3?
> 
> Deeper analyses shows that there is another patch introduced
> in v5.16-rc1 which removed one #include in the above chain and
> therefore does not define END by asm/asm.h:
> 
> commit 348332e000697 ("mm: don't include <linux/blk-cgroup.h> in <linux/writeback.h>")
> 
> Hence, the MIPS fix should only be applied to branches where
> the mm fix is already present. Or the mm fix should be backported
> as well (if it has no side-effects).
> 
> Note: the MIPS fix was apparently not (yet?) applied to v5.10.y or earlier
> even tough the Fixes: 7232311ef14c ("local_t: mips extension")
> would be true.

Thanks for the report.  I'll work on resolving this for the next round
of stable releases _after_ the ones that are currently out for review
are released.

thanks,

greg k-h

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

* Re: [BUG] new MIPS compile error on v5.15.27
  2022-03-10 19:05 ` Greg KH
@ 2022-03-10 19:26   ` Christoph Hellwig
  0 siblings, 0 replies; 7+ messages in thread
From: Christoph Hellwig @ 2022-03-10 19:26 UTC (permalink / raw)
  To: Greg KH
  Cc: H. Nikolaus Schaller, Huang Pei, Thomas Bogendoerfer, Sasha Levin,
	Christoph Hellwig, stable, linux-kernel,
	Discussions about the Letux Kernel

On Thu, Mar 10, 2022 at 08:05:04PM +0100, Greg KH wrote:
> Thanks for the report.  I'll work on resolving this for the next round
> of stable releases _after_ the ones that are currently out for review
> are released.

If you think the genhd.h include cleanup is the best fix feel free
to pick it up.  But I really think it is just hiding the problem,
and that problem will resurface.

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

end of thread, other threads:[~2022-03-10 19:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-10 16:25 [BUG] new MIPS compile error on v5.15.27 H. Nikolaus Schaller
2022-03-10 16:28 ` Christoph Hellwig
2022-03-10 16:34   ` H. Nikolaus Schaller
2022-03-10 16:39     ` H. Nikolaus Schaller
2022-03-10 16:48   ` Maciej W. Rozycki
2022-03-10 19:05 ` Greg KH
2022-03-10 19:26   ` Christoph Hellwig

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 NNTP newsgroup(s).