Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: linux-pci@vger.kernel.org
Cc: "Hans de Goede" <hdegoede@redhat.com>,
	"Florent DELAHAYE" <kernelorg@undead.fr>,
	"Konrad J Hambrick" <kjhambrick@gmail.com>,
	"Matt Hansen" <2lprbe78@duck.com>,
	"Benoit Grégoire" <benoitg@coeus.ca>,
	"Nicholas Johnson" <nicholas.johnson-opensource@outlook.com.au>,
	"Mika Westerberg" <mika.westerberg@linux.intel.com>,
	"Werner Sembach" <wse@tuxedocomputers.com>,
	mumblingdrunkard@protonmail.com, linux-kernel@vger.kernel.org,
	"Bjorn Helgaas" <bhelgaas@google.com>
Subject: [PATCH 3/4] x86/PCI: Tidy E820 removal messages
Date: Fri,  2 Dec 2022 15:18:37 -0600	[thread overview]
Message-ID: <20221202211838.1061278-4-helgaas@kernel.org> (raw)
In-Reply-To: <20221202211838.1061278-1-helgaas@kernel.org>

From: Bjorn Helgaas <bhelgaas@google.com>

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.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: Hans de Goede <hdegoede@redhat.com>
---
 arch/x86/kernel/resource.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/resource.c b/arch/x86/kernel/resource.c
index bba1abd05bfe..f34454f694cb 100644
--- a/arch/x86/kernel/resource.c
+++ b/arch/x86/kernel/resource.c
@@ -42,8 +42,11 @@ 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)
+				pr_info("resource: remaining [mem %#010Lx-%#010Lx] available\n",
+					avail->start, avail->end);
 			orig = *avail;
 		}
 	}
-- 
2.25.1


  parent reply	other threads:[~2022-12-02 21:19 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-02 21:18 [PATCH 0/4] PCI: Continue E820 vs host bridge window saga Bjorn Helgaas
2022-12-02 21:18 ` [PATCH 1/4] efi/x86: Remove EfiMemoryMappedIO from E820 map Bjorn Helgaas
2022-12-02 21:18 ` [PATCH 2/4] PCI: Skip allocate_resource() if too little space available Bjorn Helgaas
2022-12-02 21:18 ` Bjorn Helgaas [this message]
2022-12-02 21:18 ` [PATCH 4/4] x86/PCI: Fix log message typo Bjorn Helgaas
2022-12-03 12:44 ` [PATCH 0/4] PCI: Continue E820 vs host bridge window saga Hans de Goede
2022-12-03 17:57   ` Bjorn Helgaas
2022-12-04  9:13     ` Hans de Goede
2022-12-07 15:31       ` Hans de Goede
2022-12-08 18:57         ` Bjorn Helgaas
2022-12-08 19:16           ` Hans de Goede
2022-12-08 20:06             ` Bjorn Helgaas
2022-12-08 20:19               ` Hans de Goede
2022-12-04  9:29     ` Hans de Goede
2022-12-05 13:27       ` Werner Sembach
2022-12-05 14:26         ` Hans de Goede
     [not found]           ` <CANBHt+MoHWz6nB39N3vCM8OkWcjqn_5Va-_bbEcknYDQ3Ve8=Q@mail.gmail.com>
2022-12-05 19:21             ` Hans de Goede

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=20221202211838.1061278-4-helgaas@kernel.org \
    --to=helgaas@kernel.org \
    --cc=2lprbe78@duck.com \
    --cc=benoitg@coeus.ca \
    --cc=bhelgaas@google.com \
    --cc=hdegoede@redhat.com \
    --cc=kernelorg@undead.fr \
    --cc=kjhambrick@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=mumblingdrunkard@protonmail.com \
    --cc=nicholas.johnson-opensource@outlook.com.au \
    --cc=wse@tuxedocomputers.com \
    /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