From: Hari Bathini <hbathini@linux.vnet.ibm.com>
To: benh@au1.ibm.com, linuxppc-dev <linuxppc-dev@ozlabs.org>
Cc: sjitindarsingh@gmail.com, stable@vger.kernel.org,
Paul Mackerras <paulus@samba.org>,
ben@codiert.org
Subject: Re: [PATCH 1/4] powerpc/prom: avoid endian conversions for linux, memory-limit node
Date: Fri, 4 Aug 2017 11:05:05 +0530 [thread overview]
Message-ID: <5ed46248-95fa-df97-92eb-c05eead306d0@linux.vnet.ibm.com> (raw)
In-Reply-To: <1501811252.2664.66.camel@au1.ibm.com>
On Friday 04 August 2017 07:17 AM, Benjamin Herrenschmidt wrote:
> On Fri, 2017-08-04 at 11:37 +1000, Benjamin Herrenschmidt wrote:
>> On Thu, 2017-08-03 at 14:54 +0530, Hari Bathini wrote:
>>> As linux,memory-limit node is set and also later used by the kernel,
>>> avoid endian conversions for this property.
>>>
>>> Fixes: 493adffcb43f ("powerpc: Make prom_init.c endian safe")
>>> Cc: stable@vger.kernel.org # 3.12+
>>> Cc: Anton Blanchard <anton@ozlabs.org>
>>> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>>> Signed-off-by: Hari Bathini <hbathini@linux.vnet.ibm.com>
>>> ---
>>> arch/powerpc/kernel/prom_init.c | 3 +--
>>> 1 file changed, 1 insertion(+), 2 deletions(-)
>>>
>>> diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
>>> index 613f79f..723df83 100644
>>> --- a/arch/powerpc/kernel/prom_init.c
>>> +++ b/arch/powerpc/kernel/prom_init.c
>>> @@ -3180,9 +3180,8 @@ unsigned long __init prom_init(unsigned long r3, unsigned long r4,
>>> * Fill in some infos for use by the kernel later on
>>> */
>>> if (prom_memory_limit) {
>>> - __be64 val = cpu_to_be64(prom_memory_limit);
>>> prom_setprop(prom.chosen, "/chosen", "linux,memory-limit",
>>> - &val, sizeof(val));
>>> + &prom_memory_limit, sizeof(prom_memory_limit));
>>> }
>>> #ifdef CONFIG_PPC64
>>> if (prom_iommu_off)
>> NACK. The device-tree is big endian by convention
> Also that probably breaks kexec.
>
Actually, mem= is broken for a while as endian conversion is done for
linux,memory-limit node
in prom_init.c but not in prom.c. Will post fix with endian conversion
done in prom.c..
Thanks
Hari
next prev parent reply other threads:[~2017-08-04 5:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-03 9:24 [PATCH 1/4] powerpc/prom: avoid endian conversions for linux, memory-limit node Hari Bathini
2017-08-03 9:24 ` [PATCH 2/4] powerpc/prom: fix early parsing of parameters Hari Bathini
2017-08-06 8:36 ` kbuild test robot
2017-08-03 9:25 ` [PATCH 3/4] powerpc/prom: fix early parsing of 'mem=' parameter Hari Bathini
2017-08-03 9:25 ` [PATCH 4/4] powerpc/prom: fix early parsing of 'disable_radix' parameter Hari Bathini
2017-08-04 1:37 ` [PATCH 1/4] powerpc/prom: avoid endian conversions for linux, memory-limit node Benjamin Herrenschmidt
2017-08-04 1:47 ` Benjamin Herrenschmidt
2017-08-04 5:35 ` Hari Bathini [this message]
2017-08-04 3:51 ` Michael Ellerman
2017-08-04 5:32 ` Hari Bathini
2017-08-04 10:14 ` Michael Ellerman
2017-08-04 18:38 ` Hari Bathini
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=5ed46248-95fa-df97-92eb-c05eead306d0@linux.vnet.ibm.com \
--to=hbathini@linux.vnet.ibm.com \
--cc=ben@codiert.org \
--cc=benh@au1.ibm.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.org \
--cc=sjitindarsingh@gmail.com \
--cc=stable@vger.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).