All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Kent Overstreet <kent.overstreet@linux.dev>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: Uros Bizjak <ubizjak@gmail.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: Re: linux-next: build failure after merge of the bcachefs tree
Date: Thu, 27 Mar 2025 11:54:03 +1100	[thread overview]
Message-ID: <20250327115403.039e8638@canb.auug.org.au> (raw)
In-Reply-To: <20250326132819.30db65e7@canb.auug.org.au>

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

Hi all,

On Wed, 26 Mar 2025 13:28:19 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the bcachefs tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
> 
> fs/bcachefs/time_stats.c: In function 'bch2_time_stats_reset':
> fs/bcachefs/time_stats.c:165:27: error: comparison of pointers to disjoint address spaces
>   165 |             stats->buffer != TIME_STATS_NONPCPU) {
>       |                           ^~
> fs/bcachefs/time_stats.c: In function 'bch2_time_stats_exit':
> fs/bcachefs/time_stats.c:175:27: error: comparison of pointers to disjoint address spaces
>   175 |         if (stats->buffer != TIME_STATS_NONPCPU) {
>       |                           ^~
> fs/bcachefs/time_stats.c: In function 'bch2_time_stats_init_no_pcpu':
> fs/bcachefs/time_stats.c:192:23: error: assignment from pointer to non-enclosed address space
>   192 |         stats->buffer = TIME_STATS_NONPCPU;
>       |                       ^
> fs/bcachefs/time_stats.c:192:23: note: expected '__seg_gs struct time_stat_buffer *' but pointer is of type 'struct time_stat_buffer *'
> 
> Caused by commit
> 
>   5490554cf06f ("bcachefs: bch2_time_stats_init_no_pcpu()")
> 
> interacting with commit
> 
>   6a367577153a ("percpu/x86: enable strict percpu checks via named AS qualifiers")
> (or an associated one)
> 
> from the mm-stable tree.
> 
> I have applied the following merge fix patch for today (but I think it
> could just be applied to the bcachefs tree).
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Wed, 26 Mar 2025 13:15:00 +1100
> Subject: [PATCH] fix up for "bcachefs: bch2_time_stats_init_no_pcpu()"
> 
> interacting with "percpu/x86: enable strict percpu checks via named AS qualifiers"
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  fs/bcachefs/time_stats.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/bcachefs/time_stats.c b/fs/bcachefs/time_stats.c
> index a8382d876835..b16540aa9ca4 100644
> --- a/fs/bcachefs/time_stats.c
> +++ b/fs/bcachefs/time_stats.c
> @@ -11,7 +11,7 @@
>  #include "time_stats.h"
>  
>  /* disable automatic switching to percpu mode */
> -#define TIME_STATS_NONPCPU	((struct time_stat_buffer *) 1)
> +#define TIME_STATS_NONPCPU	((struct time_stat_buffer __percpu *) 1)
>  
>  static const struct time_unit time_units[] = {
>  	{ "ns",		1		 },
> -- 
> 2.45.2

This now fails like this:

fs/bcachefs/time_stats.c: In function 'bch2_time_stats_init_no_pcpu':
fs/bcachefs/time_stats.c:190:23: error: assignment from pointer to non-enclosed address space
  190 |         stats->buffer = (struct time_stat_buffer __rcu *) TIME_STATS_NONPCPU;
      |                       ^
fs/bcachefs/time_stats.c:190:23: note: expected '__seg_gs struct time_stat_buffer *' but pointer is of type 'struct time_stat_buffer *'

I have now )instead of the above) applied the following merge fix patch (which should be able to be applied to the bcachefs tree directly):

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 27 Mar 2025 11:42:11 +1100
Subject: [PATCH] fix up 2 for "bcachefs: bch2_time_stats_init_no_pcpu()"

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

diff --git a/fs/bcachefs/time_stats.c b/fs/bcachefs/time_stats.c
index 725d433a246f..2c34fe4be912 100644
--- a/fs/bcachefs/time_stats.c
+++ b/fs/bcachefs/time_stats.c
@@ -187,5 +187,5 @@ void bch2_time_stats_init(struct bch2_time_stats *stats)
 void bch2_time_stats_init_no_pcpu(struct bch2_time_stats *stats)
 {
 	bch2_time_stats_init(stats);
-	stats->buffer = (struct time_stat_buffer __rcu *) TIME_STATS_NONPCPU;
+	stats->buffer = (struct time_stat_buffer __percpu *) TIME_STATS_NONPCPU;
 }
-- 
2.45.2

-- 
Cheers,
Stephen Rothwell

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

  reply	other threads:[~2025-03-27  0:54 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-26  2:28 linux-next: build failure after merge of the bcachefs tree Stephen Rothwell
2025-03-27  0:54 ` Stephen Rothwell [this message]
2025-03-27  3:01   ` Kent Overstreet
  -- strict thread matches above, loose matches on Subject: below --
2025-06-02 23:47 Stephen Rothwell
2025-05-21 23:14 Stephen Rothwell
2025-04-22  0:56 Stephen Rothwell
2024-11-10 22:32 Stephen Rothwell
2024-10-13 23:28 Stephen Rothwell
2024-10-14  6:17 ` Greg Kroah-Hartman
2024-10-14  6:18   ` Kent Overstreet
2024-09-27  0:46 Stephen Rothwell
2024-10-10  5:50 ` Stephen Rothwell
2024-10-10  6:10   ` Kent Overstreet
2024-10-10  7:44     ` Stephen Rothwell
2024-09-11  1:44 Stephen Rothwell
2024-02-11 23:54 Stephen Rothwell
2024-02-14  0:16 ` Kees Cook
2024-02-14  0:29   ` Kent Overstreet
2024-02-14  0:39     ` Darrick J. Wong
2024-02-14  1:09     ` Kees Cook
2024-02-07  0:57 Stephen Rothwell
2024-02-08 22:46 ` Stephen Rothwell
2024-02-08 23:59   ` Kent Overstreet
2023-11-15 23:02 Stephen Rothwell
2023-11-12 22:30 Stephen Rothwell
2023-09-12  2:04 Stephen Rothwell
2023-09-12  2:47 ` Qi Zheng
2023-09-12 23:35   ` Stephen Rothwell
2023-09-13  1:10     ` Qi Zheng
2023-09-13 20:23       ` Andrew Morton
2023-09-13 22:31         ` Stephen Rothwell
2023-11-01  0:32           ` Stephen Rothwell
2023-11-01  0:53             ` Kent Overstreet
2023-11-01  1:14               ` Stephen Rothwell
2023-09-13 22:14 ` Stephen Rothwell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250327115403.039e8638@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=akpm@linux-foundation.org \
    --cc=kent.overstreet@linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=ubizjak@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.