[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJZ5v0jZBOnwr2DoyzVbtucQu0_4+SDqG949gdzX+7LR5SuFKw@mail.gmail.com>
Date: Fri, 15 Apr 2022 16:12:17 +0200
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Bjorn Helgaas <helgaas@...nel.org>
Cc: Hans de Goede <hdegoede@...hat.com>,
"Rafael J . Wysocki" <rjw@...ysocki.net>,
Borislav Petkov <bp@...en8.de>,
"H . Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...hat.com>,
Mika Westerberg <mika.westerberg@...ux.intel.com>,
Krzysztof Wilczyński <kw@...ux.com>,
Myron Stowe <myron.stowe@...hat.com>,
Juha-Pekka Heikkila <juhapekka.heikkila@...il.com>,
Benoit Grégoire <benoitg@...us.ca>,
Hui Wang <hui.wang@...onical.com>,
Kai-Heng Feng <kai.heng.feng@...onical.com>,
ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
Linux PCI <linux-pci@...r.kernel.org>,
"the arch/x86 maintainers" <x86@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Bjorn Helgaas <bhelgaas@...gle.com>
Subject: Re: [PATCH v2 2/3] x86: Log resource clipping for E820 regions
On Thu, Apr 14, 2022 at 8:23 PM Bjorn Helgaas <helgaas@...nel.org> wrote:
>
> From: Bjorn Helgaas <bhelgaas@...gle.com>
>
> When remove_e820_regions() clips a resource because an E820 region overlaps
> it, log a note in dmesg to add in debugging.
>
> Signed-off-by: Bjorn Helgaas <bhelgaas@...gle.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> ---
> arch/x86/kernel/resource.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/arch/x86/kernel/resource.c b/arch/x86/kernel/resource.c
> index 8ffe68437744..30d524adb012 100644
> --- a/arch/x86/kernel/resource.c
> +++ b/arch/x86/kernel/resource.c
> @@ -1,5 +1,6 @@
> // SPDX-License-Identifier: GPL-2.0
> #include <linux/ioport.h>
> +#include <linux/printk.h>
> #include <asm/e820/api.h>
>
> static void resource_clip(struct resource *res, resource_size_t start,
> @@ -28,6 +29,7 @@ static void remove_e820_regions(struct resource *avail)
> int i;
> struct e820_entry *entry;
> u64 e820_start, e820_end;
> + struct resource orig = *avail;
>
> for (i = 0; i < e820_table->nr_entries; i++) {
> entry = &e820_table->entries[i];
> @@ -35,6 +37,11 @@ static void remove_e820_regions(struct resource *avail)
> e820_end = entry->addr + entry->size - 1;
>
> 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);
> + orig = *avail;
> + }
> }
> }
>
> --
> 2.25.1
>
Powered by blists - more mailing lists