All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Ellerman <michael@ellerman.id.au>
To: mohan@in.ibm.com
Cc: linuxppc-dev@ozlabs.org, Neil Horman <nhorman@redhat.com>,
	Simon Horman <horms@verge.net.au>,
	kexec@lists.infradead.org, miltonm@bga.com
Subject: Re: [PATCH] Do not inline putprops function
Date: Mon, 10 Aug 2009 11:51:49 +1000	[thread overview]
Message-ID: <1249869109.27744.41.camel@concordia> (raw)
In-Reply-To: <20090807145405.GB3110@in.ibm.com>


[-- Attachment #1.1: Type: text/plain, Size: 2237 bytes --]

On Fri, 2009-08-07 at 20:24 +0530, M. Mohan Kumar wrote:
> On Fri, Aug 07, 2009 at 08:05:49PM +0530, M. Mohan Kumar wrote:
> > Hi,
> > 
> > After enabling EARLY_DEBUG (and DEBUG in some of the files in
> > arch/powerpc/kernel directory), without forcing the dtstruct variable to 8
> > byte alignment: 
> > 
> > # ./kexec -e
> > Starting new kernel
> > console [udbg0] enabled
> >  -> early_setup(), dt_ptr: 0x7723000
> >  -> early_init_devtree(c000000007723000)
> > Invalid tag 5 scanning flattened device tree !
> > search "chosen", depth: 0, uname:
> > Invalid tag 5 scanning flattened device tree !
> > dt_root_size_cells = 2
> > dt_root_addr_cells = 2
> > Invalid tag 5 scanning flattened device tree !
> > reserving: 128c000 -> 5ec1f7
> > reserving: 7734000 -> 8cc000
> > reserving: 7723000 -> f698
> > Phys. mem: 0
> > -> move_device_tree
> > <- move_device_tree
> > Scanning CPUs ...
> > Invalid tag 5 scanning flattened device tree !
> >  <- early_init_devtree()
> > Probing machine type ...
> >   pSeries ...
> > No suitable machine found !
> > 
> > 
> > So device-tree is getting corrupted when dtstruct variable is not aligned to
> > 8 byte variable. This problem is not seen with gcc-3.4. Is it compiler
> > issue? or bug in the code.
> > 
> 
> I tried writing the device tree to a binary file with and without dt_len and
> compared the files after hexdump:

That sounds like a good idea.

> 0000 0001 2f00 0000 0000 0003 0000 0004                 0000 0001 2f00 0000 0000 0003 0000 0004
> 0000 0000 0000 0002 0000 0003 0000 0004                 0000 0000 0000 0002 0000 0003 0000 0004
> 0000 000f 0000 0002 0000 0003 0000 0004                 0000 000f 0000 0002 0000 0003 0000 0004
> 0000 001b 3ef1 4800 0000 0003 0000 000d                 0000 001b 3ef1 4800 0000 0003 0000 000d
> 0000 002b 0000 0000 4942 4d2c 3931 3135               | 0000 002b 4942 4d2c 3931 3135 2d35 3035
> 2d35 3035 0000 0000 0000 0003 0000 0005               | 0000 0000 0000 0003 0000 0005 0000 0036

So the one on the left (which is ?) - has extra padding after 0x2b,
which is the property data length, before the property value
"IBM,9115-505". There shouldn't be any padding there.

cheers

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

[-- Attachment #2: Type: text/plain, Size: 143 bytes --]

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

WARNING: multiple messages have this Message-ID (diff)
From: Michael Ellerman <michael@ellerman.id.au>
To: mohan@in.ibm.com
Cc: linuxppc-dev@ozlabs.org, Neil Horman <nhorman@redhat.com>,
	Simon Horman <horms@verge.net.au>,
	kexec@lists.infradead.org, miltonm@bga.com
Subject: Re: [PATCH] Do not inline putprops function
Date: Mon, 10 Aug 2009 11:51:49 +1000	[thread overview]
Message-ID: <1249869109.27744.41.camel@concordia> (raw)
In-Reply-To: <20090807145405.GB3110@in.ibm.com>

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

On Fri, 2009-08-07 at 20:24 +0530, M. Mohan Kumar wrote:
> On Fri, Aug 07, 2009 at 08:05:49PM +0530, M. Mohan Kumar wrote:
> > Hi,
> > 
> > After enabling EARLY_DEBUG (and DEBUG in some of the files in
> > arch/powerpc/kernel directory), without forcing the dtstruct variable to 8
> > byte alignment: 
> > 
> > # ./kexec -e
> > Starting new kernel
> > console [udbg0] enabled
> >  -> early_setup(), dt_ptr: 0x7723000
> >  -> early_init_devtree(c000000007723000)
> > Invalid tag 5 scanning flattened device tree !
> > search "chosen", depth: 0, uname:
> > Invalid tag 5 scanning flattened device tree !
> > dt_root_size_cells = 2
> > dt_root_addr_cells = 2
> > Invalid tag 5 scanning flattened device tree !
> > reserving: 128c000 -> 5ec1f7
> > reserving: 7734000 -> 8cc000
> > reserving: 7723000 -> f698
> > Phys. mem: 0
> > -> move_device_tree
> > <- move_device_tree
> > Scanning CPUs ...
> > Invalid tag 5 scanning flattened device tree !
> >  <- early_init_devtree()
> > Probing machine type ...
> >   pSeries ...
> > No suitable machine found !
> > 
> > 
> > So device-tree is getting corrupted when dtstruct variable is not aligned to
> > 8 byte variable. This problem is not seen with gcc-3.4. Is it compiler
> > issue? or bug in the code.
> > 
> 
> I tried writing the device tree to a binary file with and without dt_len and
> compared the files after hexdump:

That sounds like a good idea.

> 0000 0001 2f00 0000 0000 0003 0000 0004                 0000 0001 2f00 0000 0000 0003 0000 0004
> 0000 0000 0000 0002 0000 0003 0000 0004                 0000 0000 0000 0002 0000 0003 0000 0004
> 0000 000f 0000 0002 0000 0003 0000 0004                 0000 000f 0000 0002 0000 0003 0000 0004
> 0000 001b 3ef1 4800 0000 0003 0000 000d                 0000 001b 3ef1 4800 0000 0003 0000 000d
> 0000 002b 0000 0000 4942 4d2c 3931 3135               | 0000 002b 4942 4d2c 3931 3135 2d35 3035
> 2d35 3035 0000 0000 0000 0003 0000 0005               | 0000 0000 0000 0003 0000 0005 0000 0036

So the one on the left (which is ?) - has extra padding after 0x2b,
which is the property data length, before the property value
"IBM,9115-505". There shouldn't be any padding there.

cheers

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

  reply	other threads:[~2009-08-10  1:52 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-17 11:34 [PATCH] Do not inline putprops function M. Mohan Kumar
2009-06-17 11:34 ` M. Mohan Kumar
2009-06-17 11:45 ` Simon Horman
2009-06-17 11:45   ` Simon Horman
2009-06-17 11:59   ` M. Mohan Kumar
2009-06-17 11:59     ` M. Mohan Kumar
2009-06-17 12:26     ` Michael Ellerman
2009-06-17 12:26       ` Michael Ellerman
2009-06-17 13:04       ` Neil Horman
2009-06-17 13:04         ` Neil Horman
2009-06-17 13:34         ` M. Mohan Kumar
2009-06-17 13:34           ` M. Mohan Kumar
2009-06-17 14:05           ` Neil Horman
2009-06-17 14:05             ` Neil Horman
2009-06-17 14:26             ` M. Mohan Kumar
2009-06-17 14:26               ` M. Mohan Kumar
2009-06-17 14:40               ` Neil Horman
2009-06-17 14:40                 ` Neil Horman
2009-06-23 12:55                 ` M. Mohan Kumar
2009-06-23 12:55                   ` M. Mohan Kumar
2009-06-23 13:56                   ` Neil Horman
2009-06-23 13:56                     ` Neil Horman
2009-06-24  0:27                     ` Michael Ellerman
2009-06-24  0:27                       ` Michael Ellerman
2009-08-03  5:49                       ` M. Mohan Kumar
2009-08-03  5:49                         ` M. Mohan Kumar
2009-08-05 16:49                         ` M. Mohan Kumar
2009-08-05 16:49                           ` M. Mohan Kumar
2009-08-06 14:24                           ` Michael Ellerman
2009-08-06 14:24                             ` Michael Ellerman
2009-08-07 14:35                             ` M. Mohan Kumar
2009-08-07 14:35                               ` M. Mohan Kumar
2009-08-07 14:54                               ` M. Mohan Kumar
2009-08-07 14:54                                 ` M. Mohan Kumar
2009-08-10  1:51                                 ` Michael Ellerman [this message]
2009-08-10  1:51                                   ` Michael Ellerman
2009-08-10  7:37                           ` Milton Miller
2009-08-10  7:37                             ` Milton Miller

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=1249869109.27744.41.camel@concordia \
    --to=michael@ellerman.id.au \
    --cc=horms@verge.net.au \
    --cc=kexec@lists.infradead.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=miltonm@bga.com \
    --cc=mohan@in.ibm.com \
    --cc=nhorman@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.