Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp169146rwl; Tue, 4 Apr 2023 21:25:57 -0700 (PDT) X-Google-Smtp-Source: AKy350bo8HCCsJW3itKEJcYgeZN3RRq0q+FR8p5YsJ5xBOnn/pTTQEW+jKjTjmu1FXHxBwYaOj6l X-Received: by 2002:a05:6402:27cb:b0:502:c397:adc8 with SMTP id c11-20020a05640227cb00b00502c397adc8mr685892ede.1.1680668757588; Tue, 04 Apr 2023 21:25:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680668757; cv=none; d=google.com; s=arc-20160816; b=R4LYHoJ3uUj3GiTmGbjmZAVYyr2UvkT+HgSADckVYQsWI3nIIEfLyMEGWKMXC7sfwB hZ9iHa4BddlApCc8klspxJ4W3i7bv0UyDJO1ASNFfGws+tkucTxcFT3sR+fKdxlyqr3P gWg9CqsqsHI+4EuldmBZw2xKEpc8Op03kR3NmF+KpQNQRrZAnvhb1Jxp8uXAmOV8It0+ f8Qws4NH/MCPH+DFq8lFLUfNLXsuphpCuy9YZe0BX60P4bp55BsQd0d00OoXSN5DlESp g5V1xpD2UKeb1y742WtHKrkjF+Y85LPYFbdQa9PDCIa9YUwK1KWaH4oTs3tVmq5ieYTD eBHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=/BjpitaAtSgkqnnZepwdAnWUHtXKGCm4ypPOIBhTYG4=; b=PmNVxMlybxc5v8yq7BgPDQshA/2+YOKshSffsIHHXvc16W6FOr+BaT9WFMBP1ZoKYR cxeXO0uHhunw129yOnNbMBOikO2Zh9lxumC1/sQwNXRkozPb/2ZXoIJvjHNNZ+mYK+Xo FeDpnOOJwhU0qm2SVEDf1kjcLRDNNyEI8jhxUcDi28gAIjXfrfBILyKo1wse/2+Ucygh DnZhVezlnoseYlWKCDtLk/J9QlXjhcEu1XbP4ant+raCcPqvQ0GOTJffFjZYEC2YJQ5A zOPbT6D5dokqMNgrQuk5XgwU74pU+HUKYhsdCiw0aLIzye6lkCaOG7vIDPGHaIVM+ygT bySg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@jrtc27.com header.s=gmail.jrtc27.user header.b=e4BiLC+K; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d3-20020a05640208c300b00501da1db818si9742652edz.408.2023.04.04.21.25.05; Tue, 04 Apr 2023 21:25:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-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=@jrtc27.com header.s=gmail.jrtc27.user header.b=e4BiLC+K; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236559AbjDEETm (ORCPT + 99 others); Wed, 5 Apr 2023 00:19:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236770AbjDEETl (ORCPT ); Wed, 5 Apr 2023 00:19:41 -0400 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5BB910CC for ; Tue, 4 Apr 2023 21:19:38 -0700 (PDT) Received: by mail-wr1-x430.google.com with SMTP id y14so34877462wrq.4 for ; Tue, 04 Apr 2023 21:19:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jrtc27.com; s=gmail.jrtc27.user; t=1680668377; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=/BjpitaAtSgkqnnZepwdAnWUHtXKGCm4ypPOIBhTYG4=; b=e4BiLC+K4OYu8TIu0STxll21APg+0MALOyXN2SMFNO5cMHrJpvXOAIvzfiUxo2q+V5 WDvHh+QslH4AhH+2TjZuYkNkEaTLztytVL2f0UYCH/TmJEd/0TAAlr//N84HDPO+XfkD bvPR0eoq113cOieEQrQOeDXLnxrzu4Jx3aEwesqPJ349gVeRWz3Da6iqV4pSU/2Y4iNt MnRmqCgCxV0aZLY7aaRW/N/kl8M1sH1Tu+WzfPMLUDgArZTNBjGppJ3nUd1FX9TI0JaZ seEVGGKFa1LrcmSBIBRzX4kFY1havHXXvqCKrIitnLfe41G3TACDVnWYFtLdpqNQBFsi ii4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680668377; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/BjpitaAtSgkqnnZepwdAnWUHtXKGCm4ypPOIBhTYG4=; b=GniReL8v3vOCo8uzeUmDPG5XRReM8meNc9ToJtL0srHOy9c+AmMyLvCxIlEBuZRY2n sdzGcCl2QfWJz9MKevBnLLk84ucabOJqIRbsIDSLz/WdQaGCpyJKVn1vDcEZHizCW/pZ sapmi5gDyQg+sajVyueqTIbHYZ5DS+5sNf+ZlSZJC0Jr0lV9KBuc+Y2dDcPbt4FjGbmD 7eEnS0hrb5vNyFhh6/ynbTRu4BhPHQSfIcRjdareH/2DCWyIR2X+d9sxA8tJSO+d8oqS N1Y7kWxIXBZ6yfscCXK4Kax3TaFTcszDcfIWkT8RMJlDh82qXFYrH5JumkpOULCp0dFK 7rAg== X-Gm-Message-State: AAQBX9cdukcBjGr+3dEaJ0Uz912YyS0nnUN0yZK8uAmRngah912ac2D+ L5N1r6FluzyVMBtyjcwAyjqERw== X-Received: by 2002:a5d:6b91:0:b0:2e5:9101:e3af with SMTP id n17-20020a5d6b91000000b002e59101e3afmr3411038wrx.31.1680668377340; Tue, 04 Apr 2023 21:19:37 -0700 (PDT) Received: from smtpclient.apple (global-5-142.n-2.net.cam.ac.uk. [131.111.5.142]) by smtp.gmail.com with ESMTPSA id t12-20020a7bc3cc000000b003ee42696acesm797550wmj.16.2023.04.04.21.19.36 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Apr 2023 21:19:36 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: [PATCH V4 22/23] platform/surface: Disable for RISC-V From: Jessica Clarke In-Reply-To: <20230404182037.863533-23-sunilvl@ventanamicro.com> Date: Wed, 5 Apr 2023 05:19:35 +0100 Cc: linux-doc@vger.kernel.org, Linux Kernel Mailing List , linux-riscv , linux-acpi@vger.kernel.org, linux-crypto@vger.kernel.org, platform-driver-x86@vger.kernel.org, llvm@lists.linux.dev, Weili Qian , Albert Ou , Herbert Xu , Tom Rix , Jonathan Corbet , Marc Zyngier , Daniel Lezcano , Nick Desaulniers , Mark Gross , Hans de Goede , Zhou Wang , Palmer Dabbelt , Paul Walmsley , "Rafael J . Wysocki" , Nathan Chancellor , Thomas Gleixner , Maximilian Luz , "David S . Miller" , Len Brown Content-Transfer-Encoding: quoted-printable Message-Id: References: <20230404182037.863533-1-sunilvl@ventanamicro.com> <20230404182037.863533-23-sunilvl@ventanamicro.com> To: Sunil V L X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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-crypto@vger.kernel.org On 4 Apr 2023, at 19:20, Sunil V L wrote: >=20 > With CONFIG_ACPI enabled for RISC-V, this driver gets enabled > in allmodconfig build. However, RISC-V doesn't support sub-word > atomics which is used by this driver. Why not? Compilers and libatomic do, so surely the Linux kernel should too. > Due to this, the build fails > with below error. >=20 > In function =C3=A2=E2=82=AC=CB=9Cssh_seq_next=C3=A2=E2=82=AC=E2=84=A2, > inlined from =C3=A2=E2=82=AC=CB=9Cssam_request_write_data=C3=A2=E2=82= =AC=E2=84=A2 at drivers/platform/surface/aggregator/controller.c:1483:8: > ././include/linux/compiler_types.h:399:45: error: call to = =C3=A2=E2=82=AC=CB=9C__compiletime_assert_335=C3=A2=E2=82=AC=E2=84=A2 = declared with attribute error: BUILD_BUG failed > 399 | _compiletime_assert(condition, msg, = __compiletime_assert_, __COUNTER__) > | ^ > ./include/linux/compiler.h:78:45: note: in definition of macro = =C3=A2=E2=82=AC=CB=9Cunlikely=C3=A2=E2=82=AC=E2=84=A2 > 78 | # define unlikely(x) __builtin_expect(!!(x), 0) > | ^ > ././include/linux/compiler_types.h:387:9: note: in expansion of macro = =C3=A2=E2=82=AC=CB=9C__compiletime_assert=C3=A2=E2=82=AC=E2=84=A2 > 387 | __compiletime_assert(condition, msg, prefix, suffix) > | ^~~~~~~~~~~~~~~~~~~~ > ././include/linux/compiler_types.h:399:9: note: in expansion of macro = =C3=A2=E2=82=AC=CB=9C_compiletime_assert=C3=A2=E2=82=AC=E2=84=A2 > 399 | _compiletime_assert(condition, msg, = __compiletime_assert_, __COUNTER__) > | ^~~~~~~~~~~~~~~~~~~ > ./include/linux/build_bug.h:39:37: note: in expansion of macro = =C3=A2=E2=82=AC=CB=9Ccompiletime_assert=C3=A2=E2=82=AC=E2=84=A2 > 39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), = msg) > | ^~~~~~~~~~~~~~~~~~ > ./include/linux/build_bug.h:59:21: note: in expansion of macro = =C3=A2=E2=82=AC=CB=9CBUILD_BUG_ON_MSG=C3=A2=E2=82=AC=E2=84=A2 > 59 | #define BUILD_BUG() BUILD_BUG_ON_MSG(1, "BUILD_BUG failed") > | ^~~~~~~~~~~~~~~~ > ./arch/riscv/include/asm/cmpxchg.h:335:17: note: in expansion of macro = =C3=A2=E2=82=AC=CB=9CBUILD_BUG=C3=A2=E2=82=AC=E2=84=A2 > 335 | BUILD_BUG(); = \ > | ^~~~~~~~~ > ./arch/riscv/include/asm/cmpxchg.h:344:30: note: in expansion of macro = =C3=A2=E2=82=AC=CB=9C__cmpxchg=C3=A2=E2=82=AC=E2=84=A2 > 344 | (__typeof__(*(ptr))) __cmpxchg((ptr), = \ > | ^~~~~~~~~ > ./include/linux/atomic/atomic-instrumented.h:1916:9: note: in = expansion of macro =C3=A2=E2=82=AC=CB=9Carch_cmpxchg=C3=A2=E2=82=AC=E2=84=A2= > 1916 | arch_cmpxchg(__ai_ptr, __VA_ARGS__); \ > | ^~~~~~~~~~~~ > drivers/platform/surface/aggregator/controller.c:61:32: note: in = expansion of macro =C3=A2=E2=82=AC=CB=9Ccmpxchg=C3=A2=E2=82=AC=E2=84=A2 > 61 | while (unlikely((ret =3D cmpxchg(&c->value, old, new)) = !=3D old)) { > | ^~~~~~~ >=20 > So, disable this driver for RISC-V even when ACPI is enabled for now. >=20 > Signed-off-by: Sunil V L > --- > drivers/platform/surface/aggregator/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/drivers/platform/surface/aggregator/Kconfig = b/drivers/platform/surface/aggregator/Kconfig > index c114f9dd5fe1..88afc38ffdc5 100644 > --- a/drivers/platform/surface/aggregator/Kconfig > +++ b/drivers/platform/surface/aggregator/Kconfig > @@ -4,7 +4,7 @@ > menuconfig SURFACE_AGGREGATOR > tristate "Microsoft Surface System Aggregator Module Subsystem = and Drivers" > depends on SERIAL_DEV_BUS > - depends on ACPI > + depends on ACPI && !RISCV If you insist on doing this, at least make it some new config variable that=E2=80=99s self-documenting and means this automatically gets = re-enabled when arch/riscv fixes this deficiency? Hard-coding arch lists like this seems like a terrible anti-pattern. Jess > select CRC_CCITT > help > The Surface System Aggregator Module (Surface SAM or SSAM) is = an > --=20 > 2.34.1 >=20 >=20 > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv