Re: [PATCH 10/12] kexec: arrange for paddr_vmcoreinfo_note() to return phys_addr_t
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Mark Rutland <mark.rutland@xxxxxxx>
- Subject: Re: [PATCH 10/12] kexec: arrange for paddr_vmcoreinfo_note() to return phys_addr_t
- From: Pratyush Anand <panand@xxxxxxxxxx>
- Date: Fri, 29 Apr 2016 21:17:40 +0530
- Cc: Russell King <rmk+kernel@xxxxxxxxxxxxxxxx>, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, devicetree@xxxxxxxxxxxxxxx, Tony Luck <tony.luck@xxxxxxxxx>, linux-ia64@xxxxxxxxxxxxxxx, linux-doc@xxxxxxxxxxxxxxx, Pawel Moll <pawel.moll@xxxxxxx>, Jonathan Corbet <corbet@xxxxxxx>, Ian Campbell <ijc+devicetree@xxxxxxxxxxxxxx>, kexec@xxxxxxxxxxxxxxxxxxx, Fenghua Yu <fenghua.yu@xxxxxxxxx>, Haren Myneni <hbabu@xxxxxxxxxx>, Rob Herring <robh+dt@xxxxxxxxxx>, Eric Biederman <ebiederm@xxxxxxxxxxxx>, Santosh Shilimkar <ssantosh@xxxxxxxxxx>, Kumar Gala <galak@xxxxxxxxxxxxxx>, Vivek Goyal <vgoyal@xxxxxxxxxx>
- In-reply-to: <20160429151639.GC23726@leverpostej>
- List-id: <linux-ia64.vger.kernel.org>
- References: <20160428092644.GX19428@n2100.arm.linux.org.uk> <E1aviFP-0000je-5t@rmk-PC.arm.linux.org.uk> <CAHB_Gur-6oyEheN-Pom7OwivdvrQpCBaXvM1V2H0JPFRCFZthA@mail.gmail.com> <20160429151639.GC23726@leverpostej>
On Fri, Apr 29, 2016 at 8:46 PM, Mark Rutland <mark.rutland@xxxxxxx> wrote:
> On Fri, Apr 29, 2016 at 08:36:43PM +0530, Pratyush Anand wrote:
>> > + phys_addr_t vmcore_base = paddr_vmcoreinfo_note();
>> > + return sprintf(buf, "%pa %x\n", &vmcore_base,
>>
>> Why do we pass &vmcore_base? Shouldn't it be vmcore_base?
>
> The %pa* printk format specifiers take the value by reference (as
> phys_addr_t and friends are not necessarily the same width as a
> pointer). Per Documentation/printk-formats.txt:
>
> Physical addresses types phys_addr_t:
>
> %pa[p] 0x01234567 or 0x0123456789abcdef
>
> For printing a phys_addr_t type (and its derivatives, such as
> resource_size_t) which can vary based on build options, regardless of
> the width of the CPU data path. Passed by reference.
>
> So the above prints the value of vmcore_base as expected.
Thanks a lot Mark for explaining :-)
Reviewed-by: Pratyush Anand <panand@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]