Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1482183rwb; Thu, 8 Dec 2022 11:10:57 -0800 (PST) X-Google-Smtp-Source: AA0mqf58Gfib+CyDaxZZsKmzrsu5bMmt3PbpjG/xYbRMWOFCs2TnPcjcZPNCpCGoDH7wG5G2Jstr X-Received: by 2002:aa7:dd45:0:b0:45a:3c66:b0e4 with SMTP id o5-20020aa7dd45000000b0045a3c66b0e4mr85716921edw.33.1670526657505; Thu, 08 Dec 2022 11:10:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670526657; cv=none; d=google.com; s=arc-20160816; b=Q5w3bC/eb/DR04/wlY7EQHFHlOr5nRxW3Vm6iD7NI/KvbqLGp9uzyLRoLrb2lsTnrs KZbdIaksg87asT4W4pcioN8G7cyQVdSniHu+FRaSWHGfDNKzxc5/qpXJ03fzYIQVutEV kiK31V57d41sw4GLtYNHhVZfOnrfaS1XsDqG04yBqPOLkMhSr4jjdsDJW+aoybnPChQT d6C7sD42Het0aGv2sk2xDPo1jAlwj1bkrhapCjGWkmM0TSP7rqI8JuqZ0ithOeBOI5vW rG8SXnByHZzbJNGc7Gt/tbiSzuC7HL+OssdwGwwjnqkYawanANu2Yfl+8/C0ZU18wyOw e7+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=0rl0/kFmJZ0JS+jWeUCu7ZdE4YL2Z1CnWkb9R4yo4LY=; b=N8PvMOat3k3KZyj8xFTZYJ2YtcZaT/fU+Heo8E06gtkTDQZ24PevmekxAVMa7497Yx 1nf4UBMEUwzykjv+QTUovAyoMQZrM7P6BUE0BiwVBW8vy3w27PHVpJQEfeTB9cXUK+SR sbVZ5fTNBu1sXFbl8pJC7q8T9aKNd+OiNLvItcAbd+W5ShCMJlqqR2ml8hdCioe/Bg18 7nAJ8cN00e6i6Dx4k2V4+sqXKrnZtyteyZWgNAjYG4785p3IJvFCkyGQb1/Kyn9R+Uq2 W0wPY8jW/uM6nmbLidYfAJ3MMZk25yC/wu2ExdViwFgCIyXz8EHaUR/W6ORsC3sA1BQD 1s7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sL2fsyhI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hz3-20020a1709072ce300b0078df1c345e4si13407575ejc.518.2022.12.08.11.10.38; Thu, 08 Dec 2022 11:10:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sL2fsyhI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229979AbiLHTD4 (ORCPT + 73 others); Thu, 8 Dec 2022 14:03:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229829AbiLHTDx (ORCPT ); Thu, 8 Dec 2022 14:03:53 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C9798E589; Thu, 8 Dec 2022 11:03:53 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 017EC62030; Thu, 8 Dec 2022 19:03:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 34B58C433F0; Thu, 8 Dec 2022 19:03:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670526232; bh=T4l5eXB07Bj4d5xG2NzwgLP1wO8kykiDQLBFTnCYlBU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sL2fsyhIu2ZB+F/TmFq5yRjjIc+A4EoM9Dw8mhGtLfwDtXs/XLFdhvPcQ4yxBVc0e Q6qp2Jmb2xI2w3rUlNWD2drs5xjcdy5Y+UQvthDi8tm1RDT0VVSkfiO/bj7QC3YAc3 heNcvboBQKWMQCInS137CCO+qgkpmCcYaU1B29/WB73UfmJjvEUIBFmyxPZ9JAVgE+ JI8n6RqMCFk0kLdCYpHaJbLTfqTbL2p8vXuw/Hoi7iOKmtBtSusrWjLgw3dqMRikU6 8LgZWovJ3zek+BucIWZ7JrmvPJszESioEGpGHJKhOCJlzovsJrdWA9SlBcISmkv+LO H20TTclHoPP9g== From: Bjorn Helgaas To: linux-pci@vger.kernel.org Cc: Hans de Goede , Florent DELAHAYE , Konrad J Hambrick , Matt Hansen <2lprbe78@duck.com>, =?UTF-8?q?Benoit=20Gr=C3=A9goire?= , Nicholas Johnson , Mika Westerberg , Werner Sembach , mumblingdrunkard@protonmail.com, linux-kernel@vger.kernel.org, Bjorn Helgaas Subject: [PATCH v2 3/4] x86/PCI: Tidy E820 removal messages Date: Thu, 8 Dec 2022 13:03:40 -0600 Message-Id: <20221208190341.1560157-4-helgaas@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221208190341.1560157-1-helgaas@kernel.org> References: <20221208190341.1560157-1-helgaas@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bjorn Helgaas 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 Cc: Hans de Goede --- arch/x86/kernel/resource.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/resource.c b/arch/x86/kernel/resource.c index bba1abd05bfe..7543a13c8520 100644 --- a/arch/x86/kernel/resource.c +++ b/arch/x86/kernel/resource.c @@ -42,8 +42,12 @@ 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 %#010llx-%#010llx] available\n", + (unsigned long long) avail->start, + (unsigned long long) avail->end); orig = *avail; } } -- 2.25.1