Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp685487iol; Sat, 11 Jun 2022 15:34:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwgIOi3/uhiNirXqtTi0aBWfCwRVZbdy6/ie0J7hcwNJ013opJGr2il4E157FR5vVZtQhXp X-Received: by 2002:a05:6402:24a4:b0:434:e43e:2462 with SMTP id q36-20020a05640224a400b00434e43e2462mr1218679eda.312.1654986887041; Sat, 11 Jun 2022 15:34:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654986887; cv=none; d=google.com; s=arc-20160816; b=bvV3v1obItb8s+Or0LcIsfzx3D5fZbNCV9OfTXQe6EzS3MAjl1xrqzhFIsdJJq5Nrl Y/vaPf+biQWJm/ONqXcVvIWTnPohwofphfhxDbviU1X0cgnSTEOC8OEEdjnF67WkcNJh nvCbVUSF0SSEpRhPZvpDU77sMoxmb61D2JRcNlRjp/pcjmTaE0FM/0u3GeUIIpYFPaaM Sz/vHyqeE0Ev0H22kqF5ZZzR7BuhBGG2pTdCVekdY6G03JCs3b9jg4fHVwFWiFhThISz 1W8TtSAgVY8OFK861qfm8vklXpurrv8WPin+09V84AJ3ye2znYc2L3ukUKQ4RL6BXlRo HnLQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=KEbYtgeCY5d2A+34Js+u4oC9j4ydleTr8OH6QnelxU8=; b=QRnLvoXEHarER7S12gnGE6u/0SbLJ1loZSFyW+05oqIVl2abM54nyAqDuwQ18JAXOC hu5mr4IyvHS+qZYdh9GL0lqrXuehmMlJtrGc8BwkIEceA7ZngviMnnbEmtC50hiCr+uZ 8vo0rMw4WWv70smX+WcWroG+wf/l1djYgd1CY6wRebVco6JMQCL17Q9lPNxDI6shUcV1 U2orSliAOD7u0uO8KOw83feQTpwYJ2UHssPPAqYg0QV5v/lVF4u5tW3gPqq7W4L6ACPv Gz6kC809CtNPEGQAaMz3P+JBiNU+60ySXZb10t77HgOikSJb/qkEyP7CUoJCwtHLdU/M rEig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="f/gBQwwB"; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r20-20020a05640251d400b0042dd3c79fd6si3839990edd.424.2022.06.11.15.34.22; Sat, 11 Jun 2022 15:34:47 -0700 (PDT) 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=@redhat.com header.s=mimecast20190719 header.b="f/gBQwwB"; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232108AbiFKUtR (ORCPT + 99 others); Sat, 11 Jun 2022 16:49:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232097AbiFKUtO (ORCPT ); Sat, 11 Jun 2022 16:49:14 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 80604286E6 for ; Sat, 11 Jun 2022 13:49:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654980551; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=KEbYtgeCY5d2A+34Js+u4oC9j4ydleTr8OH6QnelxU8=; b=f/gBQwwBn8D+cC5a6OJU8knQkhi/ykFjvE+D2QCXKIpr55NoqnlwqSKwh1cNw30j9uPDyR I5dMWSSEtDmfnoGSZHyntLrNM9LGO8lF/VzMj4To/8HqLvJvZc9NpP2D/RkqeiAjkjvE08 vtM/U9GadGy4csKDPS7ov49zQbQKMdY= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-609-PibKsS3xNGm3iWsin3nDQw-1; Sat, 11 Jun 2022 16:49:02 -0400 X-MC-Unique: PibKsS3xNGm3iWsin3nDQw-1 Received: by mail-wm1-f69.google.com with SMTP id k5-20020a05600c0b4500b003941ca130f9so1365337wmr.0 for ; Sat, 11 Jun 2022 13:49:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=KEbYtgeCY5d2A+34Js+u4oC9j4ydleTr8OH6QnelxU8=; b=JxJwwXrKdI66nBMK8m2LPk/bngOHansQf1JjcJGRYAif3WXaj1kRfHfr2x9MD+hFAS UcGg+GcZS4IVrQ4DHpetaH+sII+qqsfosQ432RBjhMJ4fbm6zpR8df0aJc6idunh4guW DNnDNI/FodwJh6cKjfH7A8DmB9Rx0uYgxlDxId80TiKkO4QqTBd6uxTph1ox0M0Pg3Sm 4XVCgkRBlV8DOmiu7GDzcEUuyNY5pJWoRFZ0cQ5Cyebiar+Wl5BuoD9LALEcJFhh9PeI p8PhDFvyuQ6v4yhPaoCBbhVxZQgVlVYcjB8GQxTzTijY2SnRmACE2mM+cVf23q82aQ9I YWJA== X-Gm-Message-State: AOAM532Y/pVH8eOhQHk49jYFqd44t7kuPYJ8fPFY8lBrD0l/DctFXgz+ DhD1wzw7np+gB04ITpvoOnbskH3dg0HTt3IM9gYkRHpKOjhmAd1Y0NlEvywDtaQDrS6UQOA1Fbl WEklUBEjA3HxQRViDyYGwjIo= X-Received: by 2002:a5d:4845:0:b0:210:25fa:dc7c with SMTP id n5-20020a5d4845000000b0021025fadc7cmr49214325wrs.131.1654980541130; Sat, 11 Jun 2022 13:49:01 -0700 (PDT) X-Received: by 2002:a5d:4845:0:b0:210:25fa:dc7c with SMTP id n5-20020a5d4845000000b0021025fadc7cmr49214317wrs.131.1654980540940; Sat, 11 Jun 2022 13:49:00 -0700 (PDT) Received: from localhost (cpc111743-lutn13-2-0-cust979.9-3.cable.virginm.net. [82.17.115.212]) by smtp.gmail.com with ESMTPSA id d4-20020adffbc4000000b00219b4c01712sm3506635wrs.92.2022.06.11.13.49.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Jun 2022 13:49:00 -0700 (PDT) From: Aaron Tomlin To: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, joro@8bytes.org, will@kernel.org, dwmw2@infradead.org, baolu.lu@linux.intel.com, hpa@zytor.com Cc: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, atomlin@atomlin.com Subject: [RFC PATCH 1/3] x86/boot/e820: Make __e820__mapped_all() external Date: Sat, 11 Jun 2022 21:48:57 +0100 Message-Id: <20220611204859.234975-1-atomlin@redhat.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 No functional change. This patch allows __e820__mapped_all() to be available for external use, in preparation to enhance the error message generated by arch_rmrr_sanity_check(). Signed-off-by: Aaron Tomlin --- arch/x86/include/asm/e820/api.h | 1 + arch/x86/kernel/e820.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/include/asm/e820/api.h b/arch/x86/include/asm/e820/api.h index e8f58ddd06d9..bf78daa08897 100644 --- a/arch/x86/include/asm/e820/api.h +++ b/arch/x86/include/asm/e820/api.h @@ -13,6 +13,7 @@ extern unsigned long pci_mem_start; extern bool e820__mapped_raw_any(u64 start, u64 end, enum e820_type type); extern bool e820__mapped_any(u64 start, u64 end, enum e820_type type); extern bool e820__mapped_all(u64 start, u64 end, enum e820_type type); +struct e820_entry *__e820__mapped_all(u64 start, u64 end, enum e820_type type); extern void e820__range_add (u64 start, u64 size, enum e820_type type); extern u64 e820__range_update(u64 start, u64 size, enum e820_type old_type, enum e820_type new_type); diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c index f267205f2d5a..09b1c863a766 100644 --- a/arch/x86/kernel/e820.c +++ b/arch/x86/kernel/e820.c @@ -109,7 +109,7 @@ EXPORT_SYMBOL_GPL(e820__mapped_any); * Note: this function only works correctly once the E820 table is sorted and * not-overlapping (at least for the range specified), which is the case normally. */ -static struct e820_entry *__e820__mapped_all(u64 start, u64 end, +struct e820_entry *__e820__mapped_all(u64 start, u64 end, enum e820_type type) { int i; -- 2.34.1