From nobody Sat Jun 27 23:10:27 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 06B2CC4332F for ; Fri, 18 Feb 2022 07:58:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232255AbiBRH6U (ORCPT ); Fri, 18 Feb 2022 02:58:20 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:45732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232242AbiBRH6Q (ORCPT ); Fri, 18 Feb 2022 02:58:16 -0500 Received: from mail-yw1-x1149.google.com (mail-yw1-x1149.google.com [IPv6:2607:f8b0:4864:20::1149]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7386616111F for ; Thu, 17 Feb 2022 23:57:59 -0800 (PST) Received: by mail-yw1-x1149.google.com with SMTP id 00721157ae682-2d6b40fc9bdso28535837b3.13 for ; Thu, 17 Feb 2022 23:57:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc:content-transfer-encoding; bh=nLaO1ES61pLgsguF+4DTJU+VhEtdELLQod+MClOiJ5Q=; b=QgOXTfy53ySH2/dyIH2l+tfO/OAsBlufB2qIsHbOmsYYbDw2UXU5AZ/cacVONQRqg6 52vlpV9EeMa5fdyh5Fk8iRKC9yDjyuCi6ouKKXFaMSCHNee6X67xQ9TwArpL1yia/ZUS gy91I4oai27l+/Z1dyQgqME/KV9QVE+0bVeo7eOAnRe+Ck/rAQlzQcnfR99Eo3jnpjCT 9zCAz3b35ihKFwof2zBnUOPq1EfT7CKgi2FOSdBqFKH95ccdlzJo8Bixva0dE2CAued7 1PVgntfAs6raojL01pZRNYSqcm9LYs/jkwR4YG9Tk4LzOVe4JcVX1TJM9C611NXmkyG9 QBYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc:content-transfer-encoding; bh=nLaO1ES61pLgsguF+4DTJU+VhEtdELLQod+MClOiJ5Q=; b=0fsxf8SPQ1XjsP/QzU+HvCqhPUweWrSkHp67quxU5xW9NBA/u/CMKu5RkpOIQaznpw gSb2KsUX6VpiiYhTwnLJukShC4WvBiPKDaGhawTNwg9u9Kjj3xyj7UdpQnh32iVrWyuW FMHU8rBSeMB6XOhvRtQnjCITpZ3VddsI9K92LiQeRy9AlvRQq5rd7EpZrqqWpduX4SlI 4suxPhRLRHqgXC2DHsYtQceq7lsn2e5vQe+Kd+59fFi0BwjyXsZY0U2TpEi6S66S1Zq7 R5exDEyeRLF8MEven0DFLDsFbNOzNOpxoPP91deN5CI0vCAnALLnOYap4z5g1yfDbTbw BcwQ== X-Gm-Message-State: AOAM532PvdoZ1v6X9EIH0200OH3WMQB0PsY9X2BDleSrdKqEvlsapss2 /1W/mgGKSKlhgNKSCDEI8YJs2YA4/9nUcA== X-Google-Smtp-Source: ABdhPJy2Cw5Ad+CWrEChO3m15k6rfDvFDIW8eMR878jYte+bmMTWDNc8tAipvJmzYUhsBJaIzCB+wr+3RPHBUw== X-Received: from slicestar.c.googlers.com ([fda3:e722:ac3:cc00:4f:4b78:c0a8:20a1]) (user=davidgow job=sendgmr) by 2002:a81:8543:0:b0:2d0:2d5c:c07f with SMTP id v64-20020a818543000000b002d02d5cc07fmr6684543ywf.111.1645171078671; Thu, 17 Feb 2022 23:57:58 -0800 (PST) Date: Fri, 18 Feb 2022 15:57:24 +0800 In-Reply-To: <20220218075727.2737623-1-davidgow@google.com> Message-Id: <20220218075727.2737623-2-davidgow@google.com> Mime-Version: 1.0 References: <20220218075727.2737623-1-davidgow@google.com> X-Mailer: git-send-email 2.35.1.265.g69c8d7142f-goog Subject: [PATCH 1/4] drm/amdgpu: Fix compilation under UML From: David Gow To: Jeff Dike , Richard Weinberger , Anton Ivanov , Shuah Khan , Brendan Higgins , Randy Dunlap Cc: linux-um@lists.infradead.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, kunit-dev@googlegroups.com, linux-kselftest@vger.kernel.org, linux-rdma@vger.kernel.org, x86@kernel.org, felix.kuehling@amd.com, linux-kernel@vger.kernel.org, David Gow Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Randy Dunlap cpuinfo_x86 and its associated macros are not available under ARCH=3Dum, even though CONFIG_X86_64 is defined. This patch (and discussion) were originally posted here: https://lkml.org/lkml/2022/1/24/1547 This produces the following build errors: ../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:1556:9: note: in exp= ansion of macro =E2=80=98cpu_data=E2=80=99 return cpu_data(first_cpu_of_numa_node).apicid; ^~~~~~~~ ../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:1560:1: error: contr= ol reaches end of non-void function [-Werror=3Dreturn-type] ../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_crat.c: In function =E2=80=98kf= d_fill_iolink_info_for_cpu=E2=80=99: ../arch/um/include/asm/processor-generic.h:103:19: error: called object is = not a function or function pointer #define cpu_data (&boot_cpu_data) ~^~~~~~~~~~~~~~~ ../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_crat.c:1688:27: note: in expans= ion of macro =E2=80=98cpu_data=E2=80=99 struct cpuinfo_x86 *c =3D &cpu_data(0); ^~~~~~~~ ../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_crat.c:1691:7: error: dereferen= cing pointer to incomplete type =E2=80=98struct cpuinfo_x86=E2=80=99 if (c->x86_vendor =3D=3D X86_VENDOR_AMD) ^~ ../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_crat.c:1691:23: error: =E2=80= =98X86_VENDOR_AMD=E2=80=99 undeclared (first use in this function); did you= mean =E2=80=98X86_VENDOR_ANY=E2=80=99? if (c->x86_vendor =3D=3D X86_VENDOR_AMD) ^~~~~~~~~~~~~~ X86_VENDOR_ANY ../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_crat.c: In function =E2=80=98kf= d_create_vcrat_image_cpu=E2=80=99: ../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_crat.c:1742:11: warning: unused= variable =E2=80=98entries=E2=80=99 [-Wunused-variable] uint32_t entries =3D 0; Signed-off-by: Randy Dunlap Signed-off-by: David Gow --- drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 6 +++--- drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_crat.c b/drivers/gpu/drm/amd/am= dkfd/kfd_crat.c index 9624bbe8b501..b1e2d117be3d 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_crat.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_crat.c @@ -1682,7 +1682,7 @@ static int kfd_fill_mem_info_for_cpu(int numa_node_id= , int *avail_size, return 0; } =20 -#ifdef CONFIG_X86_64 +#if defined(CONFIG_X86_64) && !defined(CONFIG_UML) static int kfd_fill_iolink_info_for_cpu(int numa_node_id, int *avail_size, uint32_t *num_entries, struct crat_subtype_iolink *sub_type_hdr) @@ -1741,7 +1741,7 @@ static int kfd_create_vcrat_image_cpu(void *pcrat_ima= ge, size_t *size) struct crat_subtype_generic *sub_type_hdr; int avail_size =3D *size; int numa_node_id; -#ifdef CONFIG_X86_64 +#if defined(CONFIG_X86_64) && !defined(CONFIG_UML) uint32_t entries =3D 0; #endif int ret =3D 0; @@ -1806,7 +1806,7 @@ static int kfd_create_vcrat_image_cpu(void *pcrat_ima= ge, size_t *size) sub_type_hdr->length); =20 /* Fill in Subtype: IO Link */ -#ifdef CONFIG_X86_64 +#if defined(CONFIG_X86_64) && !defined(CONFIG_UML) ret =3D kfd_fill_iolink_info_for_cpu(numa_node_id, &avail_size, &entries, (struct crat_subtype_iolink *)sub_type_hdr); diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c b/drivers/gpu/drm/am= d/amdkfd/kfd_topology.c index 948fbb39336e..b38fc530ffe2 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c @@ -1552,7 +1552,7 @@ static int kfd_cpumask_to_apic_id(const struct cpumas= k *cpumask) first_cpu_of_numa_node =3D cpumask_first(cpumask); if (first_cpu_of_numa_node >=3D nr_cpu_ids) return -1; -#ifdef CONFIG_X86_64 +#if defined(CONFIG_X86_64) && !defined(CONFIG_UML) return cpu_data(first_cpu_of_numa_node).apicid; #else return first_cpu_of_numa_node; --=20 2.35.1.265.g69c8d7142f-goog From nobody Sat Jun 27 23:10:27 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C198DC433F5 for ; Fri, 18 Feb 2022 07:58:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232271AbiBRH6Y (ORCPT ); Fri, 18 Feb 2022 02:58:24 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:46016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232257AbiBRH6T (ORCPT ); Fri, 18 Feb 2022 02:58:19 -0500 Received: from mail-yw1-x114a.google.com (mail-yw1-x114a.google.com [IPv6:2607:f8b0:4864:20::114a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88DD3161126 for ; Thu, 17 Feb 2022 23:58:03 -0800 (PST) Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-2d11b6259adso36591087b3.19 for ; Thu, 17 Feb 2022 23:58:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=7R2K/W8nkggK1CJfPpQftpPmnn35SzGH4U6ga+9D7QQ=; b=V+xlF6qh6PP/HMyXbXzf7qS3SXtT2e2Zoo2s9HHCNL5egQM9rIMawyFSb8Ck3LfwA5 X2PDtPb4B41RUBMfC53NXkmR01khgouCtY7ufZ8nImmPIdsQeCYpJScdMsdiL67euac7 qeL1eOg1Ft+dXUhi7ilG7/B94k93I+51LINTfDl0LEdOed7L+X/iTVGsv4gBykmKduLH zfc9gPYFlLKcTC+N1/G8sBoai9qpugRP5wp2kS2Z0qjBAHrwCGGvICeoI1wCj0/sYzx4 I/Xk9CutaMf0v7CcxiLDDdxBmur+yOzVl42FB7lj1RA7MFHPAP5lxjz0Q4EeFFyYLtPk 7C6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=7R2K/W8nkggK1CJfPpQftpPmnn35SzGH4U6ga+9D7QQ=; b=V/rXVUtIp8Xyjhh4rTmjtBWtqGmd9/f4XrnKaCOZgxDvI+vTlxLAH7X97Xi5kZUpwM QPF0Ne84ppDwbOY03BwZZfQT86UJbnIofoGtRDUdwO6m/Y/bQRBjcTrloubDSjXVSl0a MXU0LDq09j8ahLk74KWCM2tOUDYLL6JvYo+1SX+CoeZW4edHvgI4uYP6UCvtyT6yhLlB NwvfPJUE/qsgyQb5TSEmEAT8pNX1qJ2Xzfh8d9e/TgUdK873vjXGRh29Cge+vZIBpsbq n5CZbMc3cnWO+Kp1ETfU4SQNAkuLSOmVTeZmNEFVcq8AlKENdn5BpSlOQmI3L/DzHjjo AmyA== X-Gm-Message-State: AOAM533wGwwgDXCvDIaalytHdqwfw5KctPQZM245uvHgJvgaB8eHO5J7 V6nF1CtgCZKYyX0fhJK70lA2VxTX7z+u8A== X-Google-Smtp-Source: ABdhPJwRyBr1QVgpmKaKId2Xs4Ti+wE4zEnLnzEuBxqhMYKF29LS22m3wSG1jSe6jV4DAclduKLzF34NZOIuaQ== X-Received: from slicestar.c.googlers.com ([fda3:e722:ac3:cc00:4f:4b78:c0a8:20a1]) (user=davidgow job=sendgmr) by 2002:a05:690c:9e:b0:2d6:c96d:bf01 with SMTP id be30-20020a05690c009e00b002d6c96dbf01mr767575ywb.421.1645171082793; Thu, 17 Feb 2022 23:58:02 -0800 (PST) Date: Fri, 18 Feb 2022 15:57:25 +0800 In-Reply-To: <20220218075727.2737623-1-davidgow@google.com> Message-Id: <20220218075727.2737623-3-davidgow@google.com> Mime-Version: 1.0 References: <20220218075727.2737623-1-davidgow@google.com> X-Mailer: git-send-email 2.35.1.265.g69c8d7142f-goog Subject: [PATCH 2/4] drm/amdgpu: Make smu7_hwmgr build on UML From: David Gow To: Jeff Dike , Richard Weinberger , Anton Ivanov , Shuah Khan , Brendan Higgins , Randy Dunlap Cc: David Gow , linux-um@lists.infradead.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, kunit-dev@googlegroups.com, linux-kselftest@vger.kernel.org, linux-rdma@vger.kernel.org, x86@kernel.org, felix.kuehling@amd.com, linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The User-Mode-Linux architecture (with the x86_64 subarch) defines CONFIG_X86_64, but doesn't expose the cpuinfo_x86 struct (instead there's a cpuinfo_um struct). In order to allow UML to build with allyesconfig, only check cpuinfo_x86 on non-UML architectures. Fixes: b3dc549986 ("mdgpu: Disable PCIE_DPM on Intel RKL Platform") Signed-off-by: David Gow --- drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c b/drivers/= gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c index a1e11037831a..a162552f7845 100644 --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c @@ -1738,7 +1738,7 @@ static int smu7_disable_dpm_tasks(struct pp_hwmgr *hw= mgr) =20 static bool intel_core_rkl_chk(void) { -#if IS_ENABLED(CONFIG_X86_64) +#if IS_ENABLED(CONFIG_X86_64) && !defined(CONFIG_UML) struct cpuinfo_x86 *c =3D &cpu_data(0); =20 return (c->x86 =3D=3D 6 && c->x86_model =3D=3D INTEL_FAM6_ROCKETLAKE); --=20 2.35.1.265.g69c8d7142f-goog From nobody Sat Jun 27 23:10:27 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EB718C43217 for ; Fri, 18 Feb 2022 07:58:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232260AbiBRH6d (ORCPT ); Fri, 18 Feb 2022 02:58:33 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:46600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232272AbiBRH63 (ORCPT ); Fri, 18 Feb 2022 02:58:29 -0500 Received: from mail-pl1-x649.google.com (mail-pl1-x649.google.com [IPv6:2607:f8b0:4864:20::649]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5F9917BCD8 for ; Thu, 17 Feb 2022 23:58:07 -0800 (PST) Received: by mail-pl1-x649.google.com with SMTP id r19-20020a170902be1300b0014edf03f82eso3223916pls.20 for ; Thu, 17 Feb 2022 23:58:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=j0CZufvSyGMkqIs03zWz3SOrzF5QkxrcKJyKN+3F6DU=; b=DnvEEpeLGT7C5chE/iFqLg1oxG7vGRUWbZEgwmeFp5/uBfxwHZ4WKh+ARdG0TZevOn S8V+kTXByBAPADfiBUy8qdYWtbxpPbyjuahrqoW5Y+jx4Ka3f2ix+XYBDPLErajyCmGc WhsTS3GeBvKSmJU24IW3jl4Eitt4U8L46TqvxavzKDg0M7fao2jGz5UhpxjTsQKN5dwB 3pcbMsevsoyi2PABytqDtcFfB+sDZF7+PctoUcSKimkNVz6fqrYV63g+hOOmzfycxYWD GeQLc8fwAtfGcxSsJO76HpBCHUOMxWvmRj95XUCGtf7GYhrl8yZF035C7XUfj6JbBWPA VPkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=j0CZufvSyGMkqIs03zWz3SOrzF5QkxrcKJyKN+3F6DU=; b=egLOonhMNgrFXc+7fDUVgtRXxgO3Ep8+Mke0kL4mFb330WbRfxACWf+8+4b6RgQcG9 lpshdkopucRslLRQ3zbhqWwWdx9i4mhtGfxBQxTEgr+pbI/OVxuL1awz+YSOhzoFR8v9 1pS2fEeQfVSwXDJxLhpRCnvEU4K7WKEg6jTfcSFT0Y+PkfOa+L0Zhadtm/13UUF+iN1M UDt5eS0/EY6igB6Fd/i7uF0h7Rja6vhwOdhPxNOEuEFIYwxoLAeBFof+5BXi7jUUxsM3 1KE8NQATkPwXy7dDL8weqCRW8FMY6n3KXWNKC9ME/DCS/udEJy9T11a5vZ5nlkb3p3Fm RLfg== X-Gm-Message-State: AOAM532SdOeNzqdRP3xSVOsuX3bkJd3wE0HEClVVKxFjvScvnbX1soCW IFTuvt1kZCVq7WWER8JAtORMGNyIkMZEIQ== X-Google-Smtp-Source: ABdhPJweI7iurcA3Hbq+nFlKuGo4v8cSMtTOOIZv9Y5cBs/yQBBEnAM5KLK3GgPSvT5VxuN+hAiv//qPBNXQEg== X-Received: from slicestar.c.googlers.com ([fda3:e722:ac3:cc00:4f:4b78:c0a8:20a1]) (user=davidgow job=sendgmr) by 2002:a17:90a:581:b0:1b9:b85e:94df with SMTP id i1-20020a17090a058100b001b9b85e94dfmr7115153pji.195.1645171087194; Thu, 17 Feb 2022 23:58:07 -0800 (PST) Date: Fri, 18 Feb 2022 15:57:26 +0800 In-Reply-To: <20220218075727.2737623-1-davidgow@google.com> Message-Id: <20220218075727.2737623-4-davidgow@google.com> Mime-Version: 1.0 References: <20220218075727.2737623-1-davidgow@google.com> X-Mailer: git-send-email 2.35.1.265.g69c8d7142f-goog Subject: [PATCH 3/4] IB/qib: Compile under User-Mode Linux From: David Gow To: Jeff Dike , Richard Weinberger , Anton Ivanov , Shuah Khan , Brendan Higgins , Randy Dunlap Cc: David Gow , linux-um@lists.infradead.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, kunit-dev@googlegroups.com, linux-kselftest@vger.kernel.org, linux-rdma@vger.kernel.org, x86@kernel.org, felix.kuehling@amd.com, linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The User-Mode-Linux architecture (with the x86_64 subarch) defines CONFIG_X86_64, but doesn't expose the cpuinfo_x86 struct (instead there's a cpuinfo_um struct). In order to allow UML to build with allyesconfig, only check cpuinfo_x86 on non-UML architectures. Signed-off-by: David Gow --- drivers/infiniband/hw/qib/qib_wc_x86_64.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/infiniband/hw/qib/qib_wc_x86_64.c b/drivers/infiniband= /hw/qib/qib_wc_x86_64.c index edd0ddbd4481..76fef1321c26 100644 --- a/drivers/infiniband/hw/qib/qib_wc_x86_64.c +++ b/drivers/infiniband/hw/qib/qib_wc_x86_64.c @@ -146,5 +146,9 @@ void qib_disable_wc(struct qib_devdata *dd) */ int qib_unordered_wc(void) { +#ifndef CONFIG_UML return boot_cpu_data.x86_vendor !=3D X86_VENDOR_AMD; +#else + return 0; +#endif } --=20 2.35.1.265.g69c8d7142f-goog From nobody Sat Jun 27 23:10:27 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 02579C433F5 for ; Fri, 18 Feb 2022 07:58:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232272AbiBRH6g (ORCPT ); Fri, 18 Feb 2022 02:58:36 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:47216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232303AbiBRH63 (ORCPT ); Fri, 18 Feb 2022 02:58:29 -0500 Received: from mail-yw1-x1149.google.com (mail-yw1-x1149.google.com [IPv6:2607:f8b0:4864:20::1149]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55FA51928E2 for ; Thu, 17 Feb 2022 23:58:12 -0800 (PST) Received: by mail-yw1-x1149.google.com with SMTP id 00721157ae682-2d07ae1145aso36298517b3.4 for ; Thu, 17 Feb 2022 23:58:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc:content-transfer-encoding; bh=URNN4JDAS2rJK/SsmuwfW0pd7j7Yza7iayBlpkhGFLc=; b=EBGQU4gek4jI2VHo57UusHs/wBde2oMRrnCtCmvYuBRGiig/b+r8mypTt+pMzb70F+ eui57kZL0D/54jmqGjPrmsWd0gCCmIddw38zfF9pbmDCKJlhAdFSEiYaxzW6GmFO49Yu 4RQaHEq87uRGZVdETZV+edy95vXUKC33J17G8BU6e3WahR+nFckwqtWorOj6MMQ/YOvZ gl2yOMRPf+OuLe+iUFLdgXX42Wt9q4ukxNsPwtPrcQkgE8bBuiANjsLn54dhHyW0HIeI DXlmWM+XgNzhDKEWkVKRqXrhzm++Sv6+QkC4DoMdzkdUGfb51BKxH9jR5kdWZcjQ0pa2 EbYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc:content-transfer-encoding; bh=URNN4JDAS2rJK/SsmuwfW0pd7j7Yza7iayBlpkhGFLc=; b=k1b8JFQAk7qcrdOKuSW7RpMvMEIOUutSEhEARhNYssIGibBFtdSKJ8bQPxX0x633Pr rAuaIBhCU1xImZggnhKGzlmtpbudb9WsLHDhR0/UD/DpkzZsLLlRa7/uDZQkPA7lEg3z uyqBZ2/RLbi4EwoZNeFFrUk6HiTYvg/PSszqiHUQjrNR29XSpL/U5nwQoO1B65zFeVEJ LXeq9WX3k4NXH5OzRZMvDWwrA8WxlQ7gHdu8e2vLXVaO0vi5O+nsv2qQwBCGMFMcryy2 pjJJ5z/Fj8iEOFeUf9E6zdD0aB/TLy9l+kcoehMBv0iO2/5baWsRfLTFaQaEIYxUUXLs 9tSw== X-Gm-Message-State: AOAM5317g7DZuJcnz2BaeYsurp8LcZ+RKMWnmkrmyFDTbmbv2TUY59If c4mnLGcAE0lQMjL3IAtBL4jaMc1WFzXetg== X-Google-Smtp-Source: ABdhPJzkXNI0mIB4QIL1eB63wzi9+92ViwlJdKnUh9PGSnuYSdteX3Ps478m374ivFv5Kh1qd98wF5JtWHxwTw== X-Received: from slicestar.c.googlers.com ([fda3:e722:ac3:cc00:4f:4b78:c0a8:20a1]) (user=davidgow job=sendgmr) by 2002:a81:f611:0:b0:2cf:aa3c:ab17 with SMTP id w17-20020a81f611000000b002cfaa3cab17mr658303ywm.410.1645171091604; Thu, 17 Feb 2022 23:58:11 -0800 (PST) Date: Fri, 18 Feb 2022 15:57:27 +0800 In-Reply-To: <20220218075727.2737623-1-davidgow@google.com> Message-Id: <20220218075727.2737623-5-davidgow@google.com> Mime-Version: 1.0 References: <20220218075727.2737623-1-davidgow@google.com> X-Mailer: git-send-email 2.35.1.265.g69c8d7142f-goog Subject: [PATCH 4/4] kunit: tool: Disable broken options for --alltests From: David Gow To: Jeff Dike , Richard Weinberger , Anton Ivanov , Shuah Khan , Brendan Higgins , Randy Dunlap Cc: David Gow , linux-um@lists.infradead.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, kunit-dev@googlegroups.com, linux-kselftest@vger.kernel.org, linux-rdma@vger.kernel.org, x86@kernel.org, felix.kuehling@amd.com, linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" There are a number of Kconfig options which break compilation under UML with allyesconfig. As kunit_tool's --alltests option is based on allyesconfig a= nd UML, we need to update the list of broken options to make --alltests build again. Note that, while this does build again, it still segfaults on startup, so more work remains to be done. They are: - CONFIG_VFIO_PCI: Needs ioport_map/ioport_unmap. - CONFIG_INFINIBAND_RDMAVT: Needs cpuinfo_x86 and __copy_user_nocache - CONFIG_BNXT: Failing under UML with -Werror ERROR:root:../drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c: In function = =E2=80=98bnxt_ptp_enable=E2=80=99: ../drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c:400:43: error: array subsc= ript 255 is above array bounds of =E2=80=98struct pps_pin[4]=E2=80=99 [-Wer= ror=3Darray-bounds] 400 | ptp->pps_info.pins[pin_id].event =3D BNXT_P= PS_EVENT_EXTERNAL; | ~~~~~~~~~~~~~~~~~~^~~~~~~~ - CONFIG_PATA_CS5535: Needs MSR access (__tracepoint_{read,write}_msr) - CONFIG_VDPA: Enables CONFIG_DMA_OPS, which is unimplemented. ('dma_ops' i= s not defined) These are all issues which should be investigated properly and the corresponding options either fixed or disabled under UML. Having this list of broken options should act as a good to-do list here, and will allow these issues to be worked on independently, and other tests to work in the meantime. Signed-off-by: David Gow --- tools/testing/kunit/configs/broken_on_uml.config | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/testing/kunit/configs/broken_on_uml.config b/tools/testi= ng/kunit/configs/broken_on_uml.config index 690870043ac0..546482b0bc4d 100644 --- a/tools/testing/kunit/configs/broken_on_uml.config +++ b/tools/testing/kunit/configs/broken_on_uml.config @@ -42,3 +42,8 @@ # CONFIG_ADI_AXI_ADC is not set # CONFIG_DEBUG_PAGEALLOC is not set # CONFIG_PAGE_POISONING is not set +# CONFIG_VFIO_PCI is not set +# CONFIG_INFINIBAND_RDMAVT is not set +# CONFIG_BNXT is not set +# CONFIG_PATA_CS5535 is not set +# CONFIG_VDPA is not set --=20 2.35.1.265.g69c8d7142f-goog