Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1492079

Re: [PATCH] Work around for enabling CONFIG_CMDLINE on ppc64le

Path csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From Akshay Adiga <akshay.adiga@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject Re: [PATCH] Work around for enabling CONFIG_CMDLINE on ppc64le
Date Tue, 27 Sep 2016 20:00:01 +0200
Message-ID <sm4PD-441-13@gated-at.bofh.it> (permalink)
References <sk5G9-2NH-11@gated-at.bofh.it> <sk9qp-555-1@gated-at.bofh.it> <skq7T-7iU-15@gated-at.bofh.it>
X-Original-To Michael Ellerman <mpe@ellerman.id.au>, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0
MIME-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 7bit
X-Tm-As-Mml disable
X-Content-Scanned Fidelis XPS MAILER
X-Cbid 16092717-0052-0000-0000-0000030E8A6F
X-Ibm-Av-Detection SAVI=unused REMOTE=unused XFE=unused
X-Cbparentid 16092717-0053-0000-0000-00000EF53366
X-Proofpoint-Virus-Version vendor=fsecure engine=2.50.10432:,, definitions=2016-09-27_08:,, signatures=0
X-Proofpoint-Spam-Details rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609020000 definitions=main-1609270322
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 70
Organization linux.* mail to news gateway
X-Original-Cc anton@samba.org
X-Original-Date Tue, 27 Sep 2016 23:24:34 +0530
X-Original-Message-ID <57EAB25A.3040802@linux.vnet.ibm.com>
X-Original-References <1474525245-10739-1-git-send-email-akshay.adiga@linux.vnet.ibm.com> <87d1jw8cba.fsf@concordia.ellerman.id.au> <57E4AC5C.5010803@linux.vnet.ibm.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1492079

Show key headers only | View raw


Hi Michael,

Here is the link to the bug raised on launchpad.
https://bugs.launchpad.net/ubuntu/+source/gcc-5/+bug/1628207


On 09/23/2016 09:45 AM, Akshay Adiga wrote:
> Hi Michael,
>
> Anton found this bug and raised it against gcc v7.0 and a fix is 
> available
>  in upstream gcc.
>
>     https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71709
>
> Currently, gcc v5.4.0  and v6.1.1 shipped with Ubuntu 16.04 and 16.10  
> respectively,
>  are hitting this problem.
>
> I have also raised bug against Ubuntu for fixing gcc for 16.04.
>
> https://bugzilla.linux.ibm.com/show_bug.cgi?id=146668
>
>
> On 09/22/2016 03:51 PM, Michael Ellerman wrote:
>> 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
>>
>

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH] Work around for enabling CONFIG_CMDLINE on ppc64le Akshay Adiga <akshay.adiga@linux.vnet.ibm.com> - 2016-09-27 20:00 +0200

csiph-web