linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: "Paul E. McKenney" <paulmck@kernel.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: Re: linux-next: build warning after merge of the rcu tree
Date: Wed, 26 Jul 2023 16:37:05 +1000	[thread overview]
Message-ID: <20230726163705.3ade6aa6@canb.auug.org.au> (raw)
In-Reply-To: <adba817d-a02b-49fb-bf3d-a22779303764@paulmck-laptop>

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

Hi Paul,

On Tue, 25 Jul 2023 20:48:13 -0700 "Paul E. McKenney" <paulmck@kernel.org> wrote:
>
> Does the following incremental diff (to be squashed into the original) help?
> 
> 							Thanx, Paul
> 
> ------------------------------------------------------------------------
> 
> diff --git a/init/main.c b/init/main.c
> index c946ab87783a..981170da0b1c 100644
> --- a/init/main.c
> +++ b/init/main.c
> @@ -135,7 +135,7 @@ EXPORT_SYMBOL(system_state);
>  void (*__initdata late_time_init)(void);
>  
>  /* Untouched command line saved by arch-specific code. */
> -char __initdata boot_command_line[COMMAND_LINE_SIZE];
> +char boot_command_line[COMMAND_LINE_SIZE] __ro_after_init;
>  /* Untouched saved command line (eg. for /proc) */
>  char *saved_command_line __ro_after_init;
>  unsigned int saved_command_line_len __ro_after_init;

I needed the following (only tested x86_64 allmodconfig build):

diff --git a/include/linux/init.h b/include/linux/init.h
index 9a5973324072..e3ce68988e1b 100644
--- a/include/linux/init.h
+++ b/include/linux/init.h
@@ -112,6 +112,9 @@
 #define __REFCONST       .section       ".ref.rodata", "a"
 
 #ifndef __ASSEMBLY__
+
+#include <linux/cache.h>
+
 /*
  * Used for initialization calls..
  */
@@ -143,7 +146,7 @@ struct file_system_type;
 
 /* Defined in init/main.c */
 extern int do_one_initcall(initcall_t fn);
-extern char __initdata boot_command_line[];
+extern char boot_command_line[] __ro_after_init;
 extern char *saved_command_line;
 extern unsigned int saved_command_line_len;
 extern unsigned int reset_devices;
diff --git a/init/main.c b/init/main.c
index c946ab87783a..981170da0b1c 100644
--- a/init/main.c
+++ b/init/main.c
@@ -135,7 +135,7 @@ EXPORT_SYMBOL(system_state);
 void (*__initdata late_time_init)(void);
 
 /* Untouched command line saved by arch-specific code. */
-char __initdata boot_command_line[COMMAND_LINE_SIZE];
+char boot_command_line[COMMAND_LINE_SIZE] __ro_after_init;
 /* Untouched saved command line (eg. for /proc) */
 char *saved_command_line __ro_after_init;
 unsigned int saved_command_line_len __ro_after_init;

-- 
Cheers,
Stephen Rothwell

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

  reply	other threads:[~2023-07-26  6:37 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-26  2:32 linux-next: build warning after merge of the rcu tree Stephen Rothwell
2023-07-26  3:33 ` Paul E. McKenney
2023-07-26  3:48   ` Paul E. McKenney
2023-07-26  6:37     ` Stephen Rothwell [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-01-25  3:33 Stephen Rothwell
2024-01-25 13:18 ` Paul E. McKenney
2023-04-06  4:43 Stephen Rothwell
2023-04-06 14:15 ` Paul E. McKenney
2023-03-21  2:50 Stephen Rothwell
2023-03-21  3:01 ` Boqun Feng
2022-11-07  3:26 Stephen Rothwell
2022-11-07  5:02 ` Paul E. McKenney
2022-11-07  9:28   ` Akira Yokosawa
2022-06-15  5:38 Stephen Rothwell
2022-06-15 13:55 ` Paul E. McKenney
2021-03-04  1:41 Stephen Rothwell
2021-03-04  1:48 ` Paul E. McKenney
2020-12-07  8:20 Stephen Rothwell
2020-12-07 16:47 ` Paul E. McKenney
2020-12-07 17:48   ` Jonathan Corbet
2020-12-07 18:53     ` Paul E. McKenney
2020-03-10  2:27 Stephen Rothwell
2020-03-10  2:49 ` Paul E. McKenney
2019-12-12  5:06 Stephen Rothwell
2019-12-12  6:02 ` Paul E. McKenney
2019-12-12  6:38   ` Eric Dumazet
2019-12-12  6:57     ` Eric Dumazet
2020-01-10 21:57       ` Paul E. McKenney
2020-01-15 16:42       ` Paul E. McKenney
2019-12-12 11:40   ` Stephen Rothwell
2019-12-13  1:31     ` Paul E. McKenney
2020-01-06 17:51 ` Olof Johansson
2020-01-06 18:10   ` Paul E. McKenney
2020-01-06 21:08     ` Olof Johansson
2020-01-06 21:43       ` Paul E. McKenney
2017-06-21  6:48 Stephen Rothwell
2017-06-21 13:30 ` Paul E. McKenney
2011-08-24  4:23 Stephen Rothwell
2011-08-24 12:27 ` Paul E. McKenney
2011-08-25  0:46   ` Arnaud Lacombe
2011-08-25  5:04     ` Paul E. McKenney
2011-03-25  5:05 Stephen Rothwell
2011-03-25 19:23 ` Paul E. McKenney
2010-09-06  2:14 Stephen Rothwell
2010-09-06  2:32 ` Neil Brown
2010-09-06  3:02   ` Stephen Rothwell
2010-09-06  5:37   ` Paul E. McKenney

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=20230726163705.3ade6aa6@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=paulmck@kernel.org \
    /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 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).