lkml.org 
[lkml]   [2012]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH 8/9] x86: ramdisk info print with high bits.
    From
    On Fri, Nov 16, 2012 at 11:21 AM, Yinghai Lu <yinghai@kernel.org> wrote:
    > On Fri, Nov 16, 2012 at 8:05 AM, H. Peter Anvin <hpa@zytor.com> wrote:
    >> On 11/16/2012 12:53 AM, Yinghai Lu wrote:
    >>> ramdisk could be loaded high now for 64bit.
    >>>
    >>> So need to print more digits for them.
    >>>
    >>> Signed-off-by: Yinghai Lu <yinghai@kernel.org>
    >>> Cc: Matt Fleming <matt.fleming@intel.com>
    >>> ---
    >>> arch/x86/kernel/setup.c | 8 ++++----
    >>> 1 files changed, 4 insertions(+), 4 deletions(-)
    >>>
    >>> diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
    >>> index c2eb535..0e13c6e 100644
    >>> --- a/arch/x86/kernel/setup.c
    >>> +++ b/arch/x86/kernel/setup.c
    >>> @@ -341,7 +341,7 @@ static void __init relocate_initrd(void)
    >>> memblock_reserve(ramdisk_here, area_size);
    >>> initrd_start = ramdisk_here + PAGE_OFFSET;
    >>> initrd_end = initrd_start + ramdisk_size;
    >>> - printk(KERN_INFO "Allocated new RAMDISK: [mem %#010llx-%#010llx]\n",
    >>> + printk(KERN_INFO "Allocated new RAMDISK: [mem %#018llx-%#018llx]\n",
    >>> ramdisk_here, ramdisk_here + ramdisk_size - 1);
    >>
    >> NAK, this is expected to match the resource print format (%pR), which
    >> prints 10 digits by default and then expands. Furthermore, printing
    >> *18* digits is downright silly since we still don't have 72-bit addressing.
    >
    > that is the same as in e820_print_map::
    >
    > printk(KERN_INFO "%s: [mem %#018Lx-%#018Lx] ", who,
    > (unsigned long long) e820.map[i].addr,
    > (unsigned long long)
    > (e820.map[i].addr + e820.map[i].size - 1));
    >
    >
    > that is for 64bit address.
    >
    > that extra 2 is for "0x"
    >
    > or you prefer to cast them to pointer and use %pR for them all?
    >
    > or fix printk to add extra 2 for "0x" when # is found?

    looks like we have lots of %#010llx or %#010Lx there in arch/x86.

    We need to fix printk to make it acting like %pR ?


    \
     
     \ /
      Last update: 2012-11-16 21:21    [W:2.404 / U:0.288 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site