From patchwork Fri Feb 18 07:57:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Gow X-Patchwork-Id: 12751044 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 953E1C433EF for ; Fri, 18 Feb 2022 07:58:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232288AbiBRH6b (ORCPT ); Fri, 18 Feb 2022 02:58:31 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:47122 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232292AbiBRH63 (ORCPT ); Fri, 18 Feb 2022 02:58:29 -0500 Received: from mail-pj1-x104a.google.com (mail-pj1-x104a.google.com [IPv6:2607:f8b0:4864:20::104a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8F4817BCFD for ; Thu, 17 Feb 2022 23:58:07 -0800 (PST) Received: by mail-pj1-x104a.google.com with SMTP id ay10-20020a17090b030a00b001b8a4029ba0so7975195pjb.5 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=wrgNtAU0bMxhpTJ5iJ0aErdJzhojkdNDTl3MtE80uPNxMQPVfOd/6DXUXcgbuqJv+5 fyGDOcCZ9CKzhGnzBuYufEDJv8aEDEEkH9SwMP6fQft3JSW1u1CD8Qqco4UE3u2oqc1j nayNuIvhFE13ddYOK1zuVEkT4w68sdDEbvCyWAXgdFt72R+WUcnQOxf9u7BZEVV8vOZW 0yOjIAYMyfI/e/ujtph/nWGgTgpsTfU8gFCiERdwS047FllNjFLPdQmxnhJqn4qHDuFk lxFAQZaSckcZ5Bi5RGshHK3qcvR2+TkdgXtdvWLM25QDSh8Smecdxq5ah2lrB3CCnySV k9pg== X-Gm-Message-State: AOAM530dLB15vlbcbi1Df3H253mPjkA2fZ5ozGbhp4W9X52fTdqAR7Ip 4dIpn09W3xhXrSWKnMy9o8ykyVhoEqaIoQ== 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-rdma@vger.kernel.org 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 != X86_VENDOR_AMD; +#else + return 0; +#endif }