Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp3213178iob; Sun, 1 May 2022 09:50:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxRs8P76ZUM4i8cJ71pqx6aXJxv26N9HCJZ9ix1kRATAHlTILodhv2GS1F8j5S3/XcD1Zk+ X-Received: by 2002:a05:6512:16a7:b0:445:862e:a1ba with SMTP id bu39-20020a05651216a700b00445862ea1bamr6331552lfb.85.1651423833686; Sun, 01 May 2022 09:50:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651423833; cv=none; d=google.com; s=arc-20160816; b=KgFyi0tVs6djixclGre9EKmekqLcP7CaGSr72K0goaMNUe9ZGq2Au5yVg/8gaPVeoF 0d6pCDk530kN8PGHBfjwMUErEWCPjb0L1uH23vqO9B87EANvIsDfDA99Q5igRkK0q5MC N45VJLvK4/2zNBF3BidVw/0Z1kX5utpH0Y4GKWIovsPtc3jnysCL/9K6mNx55z9P2mfu qBw1U31e3dvHowUz1vil8mTHzFVCm1E+XsHIOOcR/J299PzlB5ajnaXrkEvkY54NrALC vsIiCER/lv2dQTpw5eA3Jy8vYg34U2q2B5VInzCCbUGjcT8QH8VrEBLONLKJpem5ci48 3tuA== 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=GsO1g7Ro+rsf0io9vopg1aQfP2P2g91oLlrkEyQDXiM=; b=fOXgEINUD+tAiyd6BotWG59DTWt4EH2LaXqlW6cMH5dZ/8NJ/qFjKtLJNwQpPu8Z+z PQIGuMQeDULMy4Rc32b2lyRbCOC8BIwE5PBhCJD4B0xHIkQ5jXa/of2AbRv6zvZc3Mj2 9ga2coQuT/JjrTOXK2vXrqxbRWuK7C3nusiobl2V4AlufHicVChrE+LTQBeE4QFUilGC CdpfLVt7e4/JdWDVEuHHkybsH37NPoYmxOzJ5Z7HyVwRDbVePc2diwkcNd7afMpYhN+7 9PtGZeVwIgR+KoIPf/afisMU1xNzWruSNNMsgMjkPCxqC3A7ZXSkheEuQSbXEHb/Du53 ANqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20210112.gappssmtp.com header.s=20210112 header.b=kF7TN9WB; 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 p25-20020a2e9ad9000000b0024f09d55b2fsi13017767ljj.370.2022.05.01.09.50.06; Sun, 01 May 2022 09:50:33 -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=kF7TN9WB; 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 S1382982AbiD3Pl6 (ORCPT + 99 others); Sat, 30 Apr 2022 11:41:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1382955AbiD3PlY (ORCPT ); Sat, 30 Apr 2022 11:41:24 -0400 Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CF1BA0BDF for ; Sat, 30 Apr 2022 08:37:57 -0700 (PDT) Received: by mail-pj1-x102c.google.com with SMTP id gj17-20020a17090b109100b001d8b390f77bso12922607pjb.1 for ; Sat, 30 Apr 2022 08:37:57 -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=GsO1g7Ro+rsf0io9vopg1aQfP2P2g91oLlrkEyQDXiM=; b=kF7TN9WBue7gogtLcWCSwM/BfmlmiiSeL5p6P+r9TFf7mJTPo7V03Vb2pERNLvb7OE aRiiolMYojHxd4x5cQCGpG9H2wT2LX9AGbU77WuAKd7VD9xTc7yVRQuxr9CmreoFTg1r PvNjg/njaujbrqAe+WzlaHXAa3YGjcCyPClqxCArzRUK1f4wnu8wIGOKQzuuPux3fanL dNudXAVOCI0w1bdRz0Bat3QH8ewK8iAbnP04kEkDwytD4R2TvR69JqSwtluXppkeLWp+ iJKg4ylgLJ4xSXkYkJB/5TkTjMKtqArr+XkBvDHr/ZIlgr8RD4A5+MLPtRKEzg0pyefW MJ6Q== 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=GsO1g7Ro+rsf0io9vopg1aQfP2P2g91oLlrkEyQDXiM=; b=SztZCg7Irw9DEZqONvxSKesn6z0ZcEF6APu61/lpWngVny6pAg1mr9gHQBjLrhZOdB 7QL7/GXN24KtnfS3LCjCiYGqT5pN73PUYKEbW2jp5hRXly9fLl0oUEyYc9np8hzR9WTM 3X9WbEX4zmrBJA8YRGrZBKTjcmFO0m0kdpU+7QOyDsavpsH0+zn5wbzkAjwWwHjb34Iv fY4fWzRtOUraGFgCfixPMiVu1BBBHemlhrwj3rcITri3JRVcTDIXX3MERqeuL9Gh3E7k GuhLiCEGt/iQLn3ZnTfrTLaD0ljFgHXpY67ILP3p7c4nu4ysvJo9IauuwSTC9A87gb7k BTYA== X-Gm-Message-State: AOAM5308ViM4rX0k2TCv3lgDAXYZtin/wPBjqDvxDwKONS80D0U01bxv qDLA161WEpm/VXzo4ZqYABpuh2cuDln5yQ== X-Received: by 2002:a17:902:8d8e:b0:159:4f6:c4aa with SMTP id v14-20020a1709028d8e00b0015904f6c4aamr4142558plo.115.1651333076544; Sat, 30 Apr 2022 08:37:56 -0700 (PDT) Received: from localhost (76-210-143-223.lightspeed.sntcca.sbcglobal.net. [76.210.143.223]) by smtp.gmail.com with ESMTPSA id m2-20020a17090a2c0200b001d7761ee6fcsm12923373pjd.3.2022.04.30.08.37.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Apr 2022 08:37:56 -0700 (PDT) Subject: [PATCH v4 3/7] asm-generic: qrwlock: Document the spinlock fairness requirements Date: Sat, 30 Apr 2022 08:36:22 -0700 Message-Id: <20220430153626.30660-4-palmer@rivosinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220430153626.30660-1-palmer@rivosinc.com> References: <20220430153626.30660-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 , 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 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 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. Signed-off-by: Palmer Dabbelt --- 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