Thread (12 messages) flat view 12 messages, 5 authors, 2017-08-06

Re: [PATCH 1/4] powerpc/prom: avoid endian conversions for linux, memory-limit node

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2017-08-04 10:14:40

Hari Bathini [off-list ref] writes:
On Friday 04 August 2017 09:21 AM, Michael Ellerman wrote:
quoted
Hari Bathini [off-list ref] writes:
quoted
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 <redacted>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Hari Bathini <redacted>
---
  arch/powerpc/kernel/prom_init.c |    3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)
As Ben said, this is not OK. The flat device tree is a data
structure with a specified format[1], we don't violate the spec just to
avoid an endian swap.

Is there an actual bug you're trying to solve?
Yep. While retrieving this property in prom.c, no endian conversion is 
being done.
It was broken for a while. Let me do the endian swap in prom.c while 
retrieving..
Does it actually not work though, mem=x on the command line?

I think that code in prom.c is basically dead code, it's still there
because we were afraid removing it would break something. These days we
parse the command line early enough that we don't need those properties.

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help