From: Michael Ellerman <mpe@ellerman.id.au>
To: Akshay Adiga <akshay.adiga@linux.vnet.ibm.com>,
linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Cc: anton@samba.org, Akshay Adiga <akshay.adiga@linux.vnet.ibm.com>
Subject: Re: [PATCH] Work around for enabling CONFIG_CMDLINE on ppc64le
Date: Thu, 22 Sep 2016 20:21:29 +1000 [thread overview]
Message-ID: <87d1jw8cba.fsf@concordia.ellerman.id.au> (raw)
In-Reply-To: <1474525245-10739-1-git-send-email-akshay.adiga@linux.vnet.ibm.com>
Akshay Adiga <akshay.adiga@linux.vnet.ibm.com> writes:
> Observed that boot arguments (passed as CONFIG_CMDLINE) are not being
> picked up by kernel while using gcc-ppc64-linux-gnu v5.4.0 and v6.1.1.
> While it works as expected with v5.3.1 .
>
> Found that in init/main.c in setup_command_line() the pointers passed to
> strcpy() is messed up.
Hi Akshay,
Thanks for debugging this.
> The problem goes away when compiler optimization is restricted to -O1.
> diff --git a/init/main.c b/init/main.c
> index a8a58e2..4259c42 100644
> --- a/init/main.c
> +++ b/init/main.c
> @@ -358,7 +358,13 @@ static inline void smp_prepare_cpus(unsigned int maxcpus) { }
> * parsing is performed in place, and we should allow a component to
> * store reference of name/value for future reference.
> */
> -static void __init setup_command_line(char *command_line)
> +static void __init
> +#ifdef CONFIG_PPC64
> + #if GCC_VERSION > 50301
> + __attribute__((optimize("-O1")))
> + #endif
> +#endif
> + setup_command_line(char *command_line)
> {
> saved_command_line =
> memblock_virt_alloc(strlen(boot_command_line) + 1, 0);
But I can't merge that patch.
Our options are one or both of:
- get GCC fixed and backport the fix to the compilers we care about.
- blacklist the broken compiler versions.
Is there a GCC bug filed for this?
cheers
next prev parent reply other threads:[~2016-09-22 10:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-22 6:20 Akshay Adiga
2016-09-22 10:21 ` Michael Ellerman [this message]
2016-09-22 10:47 ` Anton Blanchard
2016-09-23 4:15 ` Akshay Adiga
2016-09-27 17:54 ` Akshay Adiga
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=87d1jw8cba.fsf@concordia.ellerman.id.au \
--to=mpe@ellerman.id.au \
--cc=akshay.adiga@linux.vnet.ibm.com \
--cc=anton@samba.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.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
all inboxes | Powered by JetHome®