[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220326064632.131637-10-mawupeng1@huawei.com>
Date: Sat, 26 Mar 2022 14:46:32 +0800
From: Wupeng Ma <mawupeng1@...wei.com>
To: <akpm@...ux-foundation.org>, <catalin.marinas@....com>,
<will@...nel.org>, <corbet@....net>
CC: <ardb@...nel.org>, <tglx@...utronix.de>, <mingo@...hat.com>,
<bp@...en8.de>, <dave.hansen@...ux.intel.com>, <x86@...nel.org>,
<hpa@...cr.com>, <dvhart@...radead.org>, <andy@...radead.org>,
<rppt@...nel.org>, <paulmck@...nel.org>, <peterz@...radead.org>,
<jroedel@...e.de>, <songmuchun@...edance.com>, <macro@...am.me.uk>,
<frederic@...nel.org>, <W_Armin@....de>, <john.garry@...wei.com>,
<seanjc@...gle.com>, <tsbogend@...ha.franken.de>,
<anshuman.khandual@....com>, <chenhuacai@...nel.org>,
<david@...hat.com>, <gpiccoli@...lia.com>, <mark.rutland@....com>,
<wangkefeng.wang@...wei.com>, <mawupeng1@...wei.com>,
<linux-doc@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-efi@...r.kernel.org>, <linux-ia64@...r.kernel.org>,
<platform-driver-x86@...r.kernel.org>, <linux-mm@...ck.org>
Subject: [PATCH 9/9] ia64/efi: Code simplification in efi_init
From: Ma Wupeng <mawupeng1@...wei.com>
Since efi_print_memmap() was made public, print EFI memory map in
efi_init() can be simplified by using efi_print_memmap().
Signed-off-by: Ma Wupeng <mawupeng1@...wei.com>
---
arch/ia64/kernel/efi.c | 37 +------------------------------------
1 file changed, 1 insertion(+), 36 deletions(-)
diff --git a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c
index 31149e41f9be..4b8209b8797d 100644
--- a/arch/ia64/kernel/efi.c
+++ b/arch/ia64/kernel/efi.c
@@ -557,42 +557,7 @@ efi_init (void)
#if EFI_DEBUG
/* print EFI memory map: */
- {
- efi_memory_desc_t *md;
- void *p;
- unsigned int i;
-
- for (i = 0, p = efi_map_start; p < efi_map_end;
- ++i, p += efi_desc_size)
- {
- const char *unit;
- unsigned long size;
- char buf[64];
-
- md = p;
- size = md->num_pages << EFI_PAGE_SHIFT;
-
- if ((size >> 40) > 0) {
- size >>= 40;
- unit = "TB";
- } else if ((size >> 30) > 0) {
- size >>= 30;
- unit = "GB";
- } else if ((size >> 20) > 0) {
- size >>= 20;
- unit = "MB";
- } else {
- size >>= 10;
- unit = "KB";
- }
-
- printk("mem%02d: %s "
- "range=[0x%016llx-0x%016llx) (%4lu%s)\n",
- i, efi_md_typeattr_format(buf, sizeof(buf), md),
- md->phys_addr,
- md->phys_addr + efi_md_size(md), size, unit);
- }
- }
+ efi_print_memmap();
#endif
efi_map_pal_code();
--
2.18.0.huawei.25
Powered by blists - more mailing lists