diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2022-12-08 13:03:40 -0600 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2022-12-10 10:33:11 -0600 |
commit | 00904bf64c2819d90a76407d79bdbc8918541320 (patch) | |
tree | ae3128fb260e647fd909b1f57d44419375ff9252 | |
parent | 5c5fb3c3a793b34554e1d21f07cda34308b082cd (diff) | |
download | linux-stable-00904bf64c2819d90a76407d79bdbc8918541320.tar.gz linux-stable-00904bf64c2819d90a76407d79bdbc8918541320.tar.bz2 linux-stable-00904bf64c2819d90a76407d79bdbc8918541320.zip |
x86/PCI: Tidy E820 removal messages
These messages:
clipped [mem size 0x00000000 64bit] to [mem size 0xfffffffffffa0000 64bit] for e820 entry [mem 0x0009f000-0x000fffff]
aren't as useful as they could be because (a) the resource is often
IORESOURCE_UNSET, so we print the size instead of the start/end and (b) we
print the available resource even if it is empty after removing the E820
entry.
Print the available space by hand to avoid the IORESOURCE_UNSET problem and
only if it's non-empty. No functional change intended.
Link: https://lore.kernel.org/r/20221208190341.1560157-4-helgaas@kernel.org
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
-rw-r--r-- | arch/x86/kernel/resource.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/arch/x86/kernel/resource.c b/arch/x86/kernel/resource.c index bba1abd05bfe..79bc8a97a083 100644 --- a/arch/x86/kernel/resource.c +++ b/arch/x86/kernel/resource.c @@ -42,8 +42,16 @@ static void remove_e820_regions(struct resource *avail) resource_clip(avail, e820_start, e820_end); if (orig.start != avail->start || orig.end != avail->end) { - pr_info("clipped %pR to %pR for e820 entry [mem %#010Lx-%#010Lx]\n", - &orig, avail, e820_start, e820_end); + pr_info("resource: avoiding allocation from e820 entry [mem %#010Lx-%#010Lx]\n", + e820_start, e820_end); + if (avail->end > avail->start) + /* + * Use %pa instead of %pR because "avail" + * is typically IORESOURCE_UNSET, so %pR + * shows the size instead of addresses. + */ + pr_info("resource: remaining [mem %pa-%pa] available\n", + &avail->start, &avail->end); orig = *avail; } } |