From: Prarit Bhargava <prarit@redhat.com>
To: Joe Perches <joe@perches.com>
Cc: David Rientjes <rientjes@google.com>,
linux-kernel@vger.kernel.org, lszubowi@redhat.com,
Matt Fleming <matt.fleming@intel.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
x86@kernel.org, linux-efi@vger.kernel.org
Subject: Re: [PATCH] x86, efi: print debug values in Kib not MB
Date: Tue, 29 Jul 2014 18:05:38 -0400 [thread overview]
Message-ID: <53D81AB2.9080807@redhat.com> (raw)
In-Reply-To: <1406671368.12100.5.camel@joe-AO725>
On 07/29/2014 06:02 PM, Joe Perches wrote:
> On Tue, 2014-07-29 at 13:29 -0700, David Rientjes wrote:
>> On Tue, 29 Jul 2014, Prarit Bhargava wrote:
>>> diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
> []
>>> @@ -384,10 +384,10 @@ static void __init print_efi_memmap(void)
>>> p < memmap.map_end;
>>> p += memmap.desc_size, i++) {
>>> md = p;
>>> - pr_info("mem%02u: type=%u, attr=0x%llx, range=[0x%016llx-0x%016llx) (%lluMB)\n",
>>> + pr_info("mem%02u: type=%u, attr=0x%llx, range=[0x%016llx-0x%016llx) (%lluKiB)\n",
>>> i, md->type, md->attribute, md->phys_addr,
>>> md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT),
>>> - (md->num_pages >> (20 - EFI_PAGE_SHIFT)));
>>> + (md->num_pages << 2));
>>> }
>>> #endif /* EFI_DEBUG */
>>> }
>>
>> If EFI_PAGE_SHIFT were to ever change from its hard-coded 12, then( this
>> would be wrong. Any reason to not simply print EFI_PAGE_SIZE and
>> md->num_pages?
>
> Or maybe ((u64)EFI_PAGE_SIZE * md->num_pages) >> 10
Heh :) See my just sent email. I'll give this a shot :)
P.
>
>
next prev parent reply other threads:[~2014-07-29 22:05 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-29 17:09 [PATCH] x86, efi: print debug values in Kib not MB Prarit Bhargava
2014-07-29 20:29 ` David Rientjes
2014-07-29 22:02 ` Joe Perches
2014-07-29 22:05 ` Prarit Bhargava [this message]
2014-07-29 22:05 ` Prarit Bhargava
2014-07-29 22:29 ` Borislav Petkov
2014-07-29 22:32 ` Prarit Bhargava
2014-07-29 22:36 ` Borislav Petkov
2014-07-29 22:42 ` David Rientjes
2014-07-29 23:01 ` Borislav Petkov
2014-07-29 23:03 ` Prarit Bhargava
2014-07-29 23:07 ` Joe Perches
2014-07-29 23:44 ` David Rientjes
2014-07-29 22:54 ` Prarit Bhargava
2014-07-30 3:25 ` Steven Noonan
2014-07-30 14:48 ` Matt Fleming
2014-07-30 15:05 ` Colin Ian King
2014-07-30 17:04 ` Prarit Bhargava
2014-07-30 17:10 ` Randy Dunlap
2014-07-30 17:21 ` H. Peter Anvin
2014-07-30 19:58 ` Borislav Petkov
2014-07-30 20:43 ` Randy Dunlap
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=53D81AB2.9080807@redhat.com \
--to=prarit@redhat.com \
--cc=hpa@zytor.com \
--cc=joe@perches.com \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lszubowi@redhat.com \
--cc=matt.fleming@intel.com \
--cc=mingo@redhat.com \
--cc=rientjes@google.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox