Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp915512iob; Wed, 4 May 2022 10:33:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwOlKO5BkQ/al47Lj3SS1iXzPfFTlgsbglMG0NZVj+WViDbsOKBY0zsS00BKNGoOj8fKL5L X-Received: by 2002:a17:90a:191a:b0:1dc:a3d3:f579 with SMTP id 26-20020a17090a191a00b001dca3d3f579mr687552pjg.30.1651685589641; Wed, 04 May 2022 10:33:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651685589; cv=none; d=google.com; s=arc-20160816; b=J+uc36q+DeIDHmyh+FuUIcQ7R7bfYhVGQ13HM+52kCNcnbO99KRULkiwZvvGhSsd9k q+eZNcd5fb7lzDQdblW3cSREBKvtK+ybmuc+Pd/PJhXn2FISKP2I/m0UX8mt/e16rLrE bimOAVDs/mSMBi9lEpUKAF930E2BxjOtxfME3tlx/rqyExIQnsYTW2R5Rk0G/nyyyIt0 XrYtzf+07HIXRRmeu7bda+2TjkHKmY4tCFy++PKzgok6yZlq+L9JpA4F92qs9wcN0Nh9 6GQutpVIWPyQXRUeO9/fzbcGydZvforQ+yuT7A109XZpwMGlDpZAYt0ykpbnzPUoTtoB K5Fw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=Kd2h53WJhSBZytXZ8JaKjhgwa4bB3vMeQKdpQ+Eb3vw=; b=d+3QzPGrBXkmKGQMwhtoE0kc3IJzin7MBsVOGn9xUP1nwO249mT+Sy+WNjxGC7gHXz AvecCEpGmvxa8HLhmfhc2UGWgnrNR2g8gLKQlwnNeQC2l58Nf16HmiJG18cTs+a1NWvE lQmgKIZxA++6gQLV/bPn8CVl8v4JfsrTU6h9M/3fELO+5Dq2EiuQMnTOLUamLHUYvfLw 3GFtn8tUPNB+NiY+X++WJQKV9Yj44rmQCXZ98queLC+8yxCwKSJu9ipeHlYw9M4cdmbg uJ+Iz29314ywBAhMbIkFEpSouBhrqWf2gguBVbgUoxhXO7lvU7rJLBpxuGs41MrBIx6s xeeA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m7-20020a17090a5a4700b001ca35559ee4si4644100pji.21.2022.05.04.10.32.48; Wed, 04 May 2022 10:33:09 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349249AbiEDMGf (ORCPT + 99 others); Wed, 4 May 2022 08:06:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229830AbiEDMGb (ORCPT ); Wed, 4 May 2022 08:06:31 -0400 Received: from gloria.sntech.de (gloria.sntech.de [185.11.138.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D63A201B5; Wed, 4 May 2022 05:02:54 -0700 (PDT) Received: from ip5b412258.dynamic.kabel-deutschland.de ([91.65.34.88] helo=diego.localnet) by gloria.sntech.de with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nmDiP-0001Qi-Em; Wed, 04 May 2022 14:02:45 +0200 From: Heiko =?ISO-8859-1?Q?St=FCbner?= To: Arnd Bergmann , linux-riscv@lists.infradead.org Cc: guoren@kernel.org, peterz@infradead.org, mingo@redhat.com, Will Deacon , longman@redhat.com, boqun.feng@gmail.com, jonas@southpole.se, stefan.kristiansson@saunalahti.fi, shorne@gmail.com, Paul Walmsley , Palmer Dabbelt , aou@eecs.berkeley.edu, Arnd Bergmann , Greg KH , sudipm.mukherjee@gmail.com, macro@orcam.me.uk, jszhang@kernel.org, linux-csky@vger.kernel.org, linux-kernel@vger.kernel.org, openrisc@lists.librecores.org, linux-riscv@lists.infradead.org, linux-arch@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Palmer Dabbelt , Palmer Dabbelt Subject: Re: [PATCH v4 5/7] RISC-V: Move to generic spinlocks Date: Wed, 04 May 2022 14:02:44 +0200 Message-ID: <3428595.iIbC2pHGDl@diego> In-Reply-To: <20220430153626.30660-6-palmer@rivosinc.com> References: <20220430153626.30660-1-palmer@rivosinc.com> <20220430153626.30660-6-palmer@rivosinc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_NONE, T_SCC_BODY_TEXT_LINE,T_SPF_HELO_TEMPERROR 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 Am Samstag, 30. April 2022, 17:36:24 CEST schrieb Palmer Dabbelt: > From: Palmer Dabbelt > > Our existing spinlocks aren't fair and replacing them has been on the > TODO list for a long time. This moves to the recently-introduced ticket > spinlocks, which are simple enough that they are likely to be correct > and fast on the vast majority of extant implementations. > > This introduces a horrible hack that allows us to split out the spinlock > conversion from the rwlock conversion. We have to do the spinlocks > first because qrwlock needs fair spinlocks, but we don't want to pollute > the asm-generic code to support the generic spinlocks without qrwlocks. > Thus we pollute the RISC-V code, but just until the next commit as it's > all going away. > > Signed-off-by: Palmer Dabbelt on riscv64+riscv32 qemu, beaglev and d1-nezha Tested-by: Heiko Stuebner