From patchwork Thu Feb 24 04:01:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Gow X-Patchwork-Id: 1596993 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=4MqbTP02; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20210112 header.b=piKec3ki; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4K3zkb4mrQz9sG8 for ; Thu, 24 Feb 2022 15:02:15 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:Mime-Version: Message-Id:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=359/PMAdcxE8ddezoB6yajVJAWO3T3G8Z1ZwgCDL3H4=; b=4Mq bTP02Bih0lz72574L//j7Dn7kFJEXYhXJ/egAg/Plof9xSsApWyr2bCw8STGxgEOI5YAC3npdrmpA F/OBg5JTY+9x+4Vp4HN9riDcON39wpfVVjMI69skOVOj0MIpkaXD/oI/KvEtSighv9+UytyBJfWGx aWLABA7Rk7c7Zxu2AS4YTzEpfi0L/a8xuU2OYJGpvlZYXJgB9G+1+1HNPMy3HeQWHAMvgUa1nmBj6 ZEPzB0252e2M1djB6LEjJk244MzgZ8yn+EtiGM6JaUfSlsprDKpDdMxkyL8x79WH/uaHNJtjd5T45 mwzwILvn/u8CgAO6xGHhCgDMEWynTMA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nN5KP-00GjtE-DC; Thu, 24 Feb 2022 04:02:05 +0000 Received: from mail-pj1-x104a.google.com ([2607:f8b0:4864:20::104a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nN5KN-00GjsS-0i for linux-um@lists.infradead.org; Thu, 24 Feb 2022 04:02:04 +0000 Received: by mail-pj1-x104a.google.com with SMTP id g12-20020a17090a714c00b001bc25476de3so546524pjs.6 for ; Wed, 23 Feb 2022 20:02:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:message-id:mime-version:subject:from:to:cc; bh=/9e1BpdB18N/h+O03rFt/auxApxhf9ck1ZQG4GiU3UM=; b=piKec3kie+4DnNUYnTAYNFqpevp6bwLv9gBwl5X2YzCuHC2QFmonycThgTFzxHayPX cDkrMKmg1cP3qaQeh7sSD4XlzzenLJkZhLxCNZfl/SyU4Ho1O12AUvRg7hbWqC6XiuYD jw0y8Vug/jqutE/znce2SmhYis8BVIBOpnniiCxkZEuY3m46aPt2ePKkFdlA/6APnRFv Izz0EZA5xp2/lzBMYlKKoR+RqM6wpfTms8wcZA7iSP37GGolY1wzC0kgT1p/cvmiZrKM qb7xiKC3bw6I/zH8kW9oW0HDmeeF6yiSOggDZolqRwNJAdhswLWRkcI6i2CD9ovy/Dzm 8p2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=/9e1BpdB18N/h+O03rFt/auxApxhf9ck1ZQG4GiU3UM=; b=0ESnKhYinZY4I0cPbkTL9i1XfU+ZsG94dwKm2Dt3FmyCWNdrkPSEW4QKGE8juq1T2i GkYbLxfzb6fwRczh3d9LIt0Uz1Hx9zhshVRoIGwyaq9e+MnBYr6Pes3YipHMu6abV+DL OWuyLdKd0AZ/+dqMKwFDds36h+pKfYi8vLrIGgs8MyfPg/CevLRg+5Xc8RaN27yFpxO8 6oGH9ST7Qx7Dnq7S4tSuQ4rkql2ybeXCVaq55W/5HxDRV0yhZWpE4g3NW/Benry9WFNv oX9e/K8pyDXCoazWqFhpQrTfjdQ9e+lvP0w5Iycm3O1VQ9zAScsfz742rg3JevgjyC68 Uopg== X-Gm-Message-State: AOAM533dIQ2IQhjgTME1j9UAIuqMclpeVt5vFGZqGujo0rmds9ksK//D FoVhabcg0owuYxQ1JO4Qhbuw0Z1Lav1HyQ== X-Google-Smtp-Source: ABdhPJx5XQBhtipfvGHOKjMWiAqgM+qv4WY1PGgppKx1Sv6Oro+4x0AMafffT1Gdzfns0sPsldgKqZwC98ekTA== X-Received: from slicestar.c.googlers.com ([fda3:e722:ac3:cc00:4f:4b78:c0a8:20a1]) (user=davidgow job=sendgmr) by 2002:a17:902:a701:b0:14d:5a15:ebaf with SMTP id w1-20020a170902a70100b0014d5a15ebafmr903268plq.33.1645675321064; Wed, 23 Feb 2022 20:02:01 -0800 (PST) Date: Thu, 24 Feb 2022 12:01:37 +0800 Message-Id: <20220224040136.1595119-1-davidgow@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.35.1.473.g83b2b277ed-goog Subject: [PATCH] firmware: google: Properly state IOMEM dependency From: David Gow To: Julius Werner , Greg Kroah-Hartman , Ben Hutchings Cc: David Gow , linux-kernel@vger.kernel.org, linux-um@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220223_200203_086980_193C13E9 X-CRM114-Status: GOOD ( 12.86 ) X-Spam-Score: -7.7 (-------) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: The Google Coreboot implementation requires IOMEM functions (memmremap, memunmap, devm_memremap), but does not specify this is its Kconfig. This results in build errors when IOMEM is not enabled, such [...] Content analysis details: (-7.7 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:104a listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -7.5 USER_IN_DEF_DKIM_WL From: address is in the default DKIM white-list -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.0 DKIMWL_WL_MED DKIMwl.org - Medium trust sender X-BeenThere: linux-um@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-um" Errors-To: linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org The Google Coreboot implementation requires IOMEM functions (memmremap, memunmap, devm_memremap), but does not specify this is its Kconfig. This results in build errors when IOMEM is not enabled, such as on some UML configurations: /usr/bin/ld: drivers/firmware/google/coreboot_table.o: in function `coreboot_table_probe': coreboot_table.c:(.text+0x311): undefined reference to `memremap' /usr/bin/ld: coreboot_table.c:(.text+0x34e): undefined reference to `memunmap' /usr/bin/ld: drivers/firmware/google/memconsole-coreboot.o: in function `memconsole_probe': memconsole-coreboot.c:(.text+0x12d): undefined reference to `memremap' /usr/bin/ld: memconsole-coreboot.c:(.text+0x17e): undefined reference to `devm_memremap' /usr/bin/ld: memconsole-coreboot.c:(.text+0x191): undefined reference to `memunmap' /usr/bin/ld: drivers/firmware/google/vpd.o: in function `vpd_section_destroy.isra.0': vpd.c:(.text+0x300): undefined reference to `memunmap' /usr/bin/ld: drivers/firmware/google/vpd.o: in function `vpd_section_init': vpd.c:(.text+0x382): undefined reference to `memremap' /usr/bin/ld: vpd.c:(.text+0x459): undefined reference to `memunmap' /usr/bin/ld: drivers/firmware/google/vpd.o: in function `vpd_probe': vpd.c:(.text+0x59d): undefined reference to `memremap' /usr/bin/ld: vpd.c:(.text+0x5d3): undefined reference to `memunmap' collect2: error: ld returned 1 exit status Signed-off-by: David Gow Acked-By: anton ivanov Acked-By: Julius Werner --- drivers/firmware/google/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firmware/google/Kconfig b/drivers/firmware/google/Kconfig index 931544c9f63d..7ac866a985c6 100644 --- a/drivers/firmware/google/Kconfig +++ b/drivers/firmware/google/Kconfig @@ -21,7 +21,7 @@ config GOOGLE_SMI config GOOGLE_COREBOOT_TABLE tristate "Coreboot Table Access" - depends on ACPI || OF + depends on IOMEM && (ACPI || OF) help This option enables the coreboot_table module, which provides other firmware modules access to the coreboot table. The coreboot table