Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp5435434iob; Mon, 9 May 2022 16:44:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkB/ZJdmkIwPOg+kRxSnaT/n5RKWyE9pOcT36D3loxrYxPj1S9RpsxxfpnYCHPnu/mtXcF X-Received: by 2002:a17:902:e842:b0:15e:d449:fd03 with SMTP id t2-20020a170902e84200b0015ed449fd03mr18719111plg.60.1652139859500; Mon, 09 May 2022 16:44:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652139859; cv=none; d=google.com; s=arc-20160816; b=pqI84m4KH8bBBW+fzkbEya9Cx5cm4oBhADD8gwyS8JcWAHzwRnebdSNGHOpbIBx3qE 3snXUruv1kYjKPStAj9fHNNvHW9bAcLAjNhhdxB+uAOXuetht4TQTgVWs46R/QGQusDI ojTKiaVO4SMFyHx11haPPEf3Wwga/YjMO9nVUuDS2OibW0o0f0KBVdL6jA331RT0zoqW /ZfjzJXTZNFNUDHRSJ2gmQAeDESpGJriD8TZizMoNQRMFcSTNxCFCUJJNmqrkGBHacg9 Wmqph4sbQj3LyJ35VBIVyjvxHBTzsexUrbRMruEyrSdxcNOdCfjpFgM6e3Bg9AEbGZkn FTjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:from:cc:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject :dkim-signature; bh=pWbw2Mwy88SDSkfpA4D7g/Rmsq9eS9lL/9r9k9KvO7g=; b=TW+lgQaV1xEtRsgHZ5qgwEeeWpzyi56BdMs+N9dFsUlhhGoWTT7qlSfCl2mOKm2Kux 2BkeFSPvs6vngdxAUuBOOr/RTz8eLuK3N/6/pNsX2MOwBbfzI0L0fyqwoT1pAtn5SsJg gEkTl3jOxcxb0J9HvVML37/MCZFPoHpcK/Zo/aCvZCikm2rcdUXb9GBB3EbE2K3bWtBA oEXGpyE4rwhEb2CEG9BAH7mB5/2HiD6Q3V0spsTr27rPGBGg/M60QM43YtcTuez8XpEU F31OpbEaAGxjr1QPxZFE8+GbBpRtOMLR16qC7J2A3NQIaVRcoGqE/p8W1OGAmRiUG2UA 8R+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20210112.gappssmtp.com header.s=20210112 header.b=aKb0kPhW; 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 a190-20020a624dc7000000b004fa3a8e002csi15486245pfb.227.2022.05.09.16.43.59; Mon, 09 May 2022 16:44:19 -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; dkim=pass header.i=@rivosinc-com.20210112.gappssmtp.com header.s=20210112 header.b=aKb0kPhW; 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 S231778AbiEIWgd (ORCPT + 99 others); Mon, 9 May 2022 18:36:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231760AbiEIWgW (ORCPT ); Mon, 9 May 2022 18:36:22 -0400 Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A04E72B9C99 for ; Mon, 9 May 2022 15:32:27 -0700 (PDT) Received: by mail-pf1-x430.google.com with SMTP id 204so10628933pfx.3 for ; Mon, 09 May 2022 15:32:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20210112.gappssmtp.com; s=20210112; h=subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding:cc:from:to; bh=pWbw2Mwy88SDSkfpA4D7g/Rmsq9eS9lL/9r9k9KvO7g=; b=aKb0kPhWVd5eMpmlkl9NknitMxg8gh5oazT3otM1H7wNssSLITeEgVYd3fLrFpqhAN 6lW7y7N8edPrk+YAtulN/xaP8NiOVNXKZAi6KA0NNveYzfnxDp9ggPIafs2mYWMuEWpF yisEk6Vl9il9YEGMryMzMjf2wBlPJtypJNMiXj/O7kxrK4628fYPSch836eJYFLJD5Wl OrKTh30iRJgEMKA4TvqbYiX+DIHWjjGEmbm+VHeiIrDIZkzUjvIVMUmJT2O64m4s1rq4 s75jC01yaX0ljYX5/96b4XICWLQpDnMGWrtzgp0A1FvhK7kRpUekOBDbUefjzvvkL2IY V5Zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:cc:from:to; bh=pWbw2Mwy88SDSkfpA4D7g/Rmsq9eS9lL/9r9k9KvO7g=; b=8PIvpr+kiaOrtkaOOdvmEIHkLv/8Ys8OyTF9hUDJOsCpURbqWAwnF3OcfWwRdrjxeP 8a/f0GmT84M3lS3JGGF+ysvKeC4ICUPg0JSl2JImu41Yip+r9JC2V+XtPuWqRGgQl7O7 sm2o6OcC39TLqrJ3Cqv3F1Gz3YztbhsY664J8dXOXfCE4mykJhk0usgNH5C1jmkimYqL t2nN5d3QKfphUW3FBQICH1R7wQxcyWy6A4Af1P4dlCaOS1oxvo7If4B9gYik44i1yt9d 6LQYbAEUL1tzLNxy73mEeak7ZfDQivKCbXuZt/wRLTgT9YJtfFxFJoXtIfm+4gZ6dkXA yyjA== X-Gm-Message-State: AOAM533sarm/BzJsuqxi3hff2NVg2KwG+otvTzenZPKOCI0anohvzuOe WlzKTl4KaXQayCEHrwFlt6bOrA== X-Received: by 2002:a05:6a02:10d:b0:381:f4c8:ad26 with SMTP id bg13-20020a056a02010d00b00381f4c8ad26mr14585787pgb.135.1652135546996; Mon, 09 May 2022 15:32:26 -0700 (PDT) Received: from localhost (76-210-143-223.lightspeed.sntcca.sbcglobal.net. [76.210.143.223]) by smtp.gmail.com with ESMTPSA id w19-20020a1709029a9300b0015e8d4eb1ddsm407885plp.39.2022.05.09.15.32.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 15:32:26 -0700 (PDT) Subject: [PATCH v5 3/7] asm-generic: qrwlock: Document the spinlock fairness requirements Date: Mon, 9 May 2022 15:29:52 -0700 Message-Id: <20220509222956.2886-4-palmer@rivosinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220509222956.2886-1-palmer@rivosinc.com> References: <20220509222956.2886-1-palmer@rivosinc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 , macro@orcam.me.uk, Greg KH , sudipm.mukherjee@gmail.com, 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 From: Palmer Dabbelt To: Arnd Bergmann X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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-kernel@vger.kernel.org From: Palmer Dabbelt I could only find the fairness requirements documented as the C code, this calls them out in a comment just to be a bit more explicit. Reviewed-by: Arnd Bergmann --- include/asm-generic/qrwlock.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/asm-generic/qrwlock.h b/include/asm-generic/qrwlock.h index 7ae0ece07b4e..24ae09c1db9f 100644 --- a/include/asm-generic/qrwlock.h +++ b/include/asm-generic/qrwlock.h @@ -2,6 +2,10 @@ /* * Queue read/write lock * + * These use generic atomic and locking routines, but depend on a fair spinlock + * implementation in order to be fair themselves. The implementation in + * asm-generic/spinlock.h meets these requirements. + * * (C) Copyright 2013-2014 Hewlett-Packard Development Company, L.P. * * Authors: Waiman Long -- 2.34.1