On Wed, Jan 08, 2014 at 06:02:19PM -0600, Scott Wood wrote: > On Wed, Jan 08, 2014 at 10:42:35AM +0800, Kevin Hao wrote: > > On Tue, Jan 07, 2014 at 05:46:04PM -0600, Scott Wood wrote: > > > Oh. I think it'd be more readable to do "offset = start - > > > memstart_addr" and add offset instead of subtracting it. > > > > Yes, I agree. The reason that I use "offset = memstart_addr - start" is that > > it seems "memstart_addr" is always greater than "start" when we are booting > > a kdump kernel with a kernel option like "crashkernel=64M@80M". :-) > > > > > > > > Also, offset should be phys_addr_t -- even if you don't expect to > > > support offsets greater than 4G on 32-bit, it's semantically the right > > > type to use. Plus, "int" would break if this code were ever used with > > > 64-bit. > > > > I thought about using phy_addr_t for the "offset" originally but gave it up > > for the following reasons: > > * It will not be greater than 4G. > > * We have to use the ugly #ifdef CONFIG_PHYS_64BIT in restore_to_as0(). > > * Need more registers for arguments for restore_to_as0(). > > > > Of course you can change it to phys_addr_t if you prefer. > > Here's the diff I made when applying (also changed the subf in patch 9 to > add)
Looks fine to me. I also done a boot test and it works pretty well. Thanks Scott. Kevin
pgpjE_4e6_kV2.pgp
Description: PGP signature
_______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev