Received: by 2002:a19:f614:0:0:0:0:0 with SMTP id x20csp62037lfe; Fri, 15 Apr 2022 19:35:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxtsoiCQqI0NDgI+Sqx5BM0AVpbwJjj2+qUwoq6bYwG7Xc3DGsrDsHdqdgocGm+YWfaNy6/ X-Received: by 2002:a63:d906:0:b0:39c:c4ca:32b1 with SMTP id r6-20020a63d906000000b0039cc4ca32b1mr1441193pgg.408.1650076506111; Fri, 15 Apr 2022 19:35:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650076506; cv=none; d=google.com; s=arc-20160816; b=b7dELHg7/uAAa/OMrEahJBPiOJNcb+Mfpwb0zSsSog4JjDVnfz/UaaseMR+wE0Ripo S0X9ctbn48vHXVPESQhjwttuHUzGYdgAn1YMG2wXGsFalIC2bdFQe0zMNUQosIzi5crF bAUEqjBma+fsu/otxV/0anwWJSO3vPBciftqexiVFZNXaYkzbo7VxR67yY4kMDCCvRZn k91Yd7a07g3Gtmx04KrgxQZ4K26KR+64Xux9epqNfwK+k6iLGwqSqXYrR7v1voS6SFwK r/PEFivf5NKY5JBdxIcaS9ijyBSbJ0s69OFy+4vIlzDcdYuDwEHgn1OF5n4pcEEq/mAr +yWQ== 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=aNAirJTBFxtBXx1A+Sr72i+IS3qZ1nSSN1DrLQUanrHaFQ1Uw8huA0xLzlMby4t3r3 abNyk6dah7b8/8U3GZz1tByTlSl1OBhwz6Bvf2o2NgqrXxAyq+dprYD4HfgPzPGTr78w LsPWhDDNjinNG68whFxzXJKowI20hjxtoPo/HzbA+FP0bDG49F5pKhX6ei5CYiNATir9 KraykSl4MxAH0eAfzgOwt25CBpZP8oybfQlBm3BgxshKQ1zWE6Gokp0JgrvWxawLQYkM uaFsbnExxhyvhl3rtGiPJAVA8/fN9Y4jRTcnKj42tQh00iUDMW0lSjzEvOVjEPyPbdfx TuWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20210112.gappssmtp.com header.s=20210112 header.b="CnWghtB/"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id j3-20020a637a43000000b003816043ef44si3121434pgn.313.2022.04.15.19.35.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 19:35:06 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20210112.gappssmtp.com header.s=20210112 header.b="CnWghtB/"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D794412C256; Fri, 15 Apr 2022 18:44:46 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241147AbiDNWIA (ORCPT + 99 others); Thu, 14 Apr 2022 18:08:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245017AbiDNWHq (ORCPT ); Thu, 14 Apr 2022 18:07:46 -0400 Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB428AD134 for ; Thu, 14 Apr 2022 15:05:18 -0700 (PDT) Received: by mail-pj1-x1034.google.com with SMTP id 2so6301783pjw.2 for ; Thu, 14 Apr 2022 15:05:18 -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=CnWghtB/dN2XPpzq+zptNtM2MAL+NMPVHYsMQgwsTW7iLpCdsO92al51pP1s30INYy rwF44VxtoSsNlb8TLR6+PvivGyCZ5apI54By81gsXp8b4zJytpT14My0wRS1/XqlEqjn 9c60+wgJ448Ym18jElwrZxwugKHQ2CLL8h38oEC7pO1P/00c1v34g1qQ6JgcV2POF6XJ qT35OQ8QyKY5rNXOS1abuXba/eh8yrBZrITli2mG/rjIegR5xxQLu6j+6zg8d/wJOC96 t/JZMK7hUZ/uW4d5apxoZB276EgBxBgsh8TDMlVDZJzUdBERoLCAWxBKRYX15Cr0EDe1 B80g== 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=gumRlgpxksQT8l+tpTcGHqRlSOEBDUPk8mK9oYU4C/v1Zdx8z0DgFt3yRwPSpl35QW MflzRfA22aSSKIxMY8DjfhnoH/heR5PGuhxEtqRyqESSKN7u9iFen9PXFO7Jl1wOdrOs EmJgtm8vHzbvA+u+Ke/q8z9Cdzww0vDYRaxndY/UbWg3M9wXsG/hCThSWBNGVLElqdR1 LY4hO+paTGWTz3w58H4dJT4k2GdBYr5qkxKB2Kj+Z31YZXu5Ff71EByVbhR7FrssJtcm A0iYb6NiiSQOBb2/+uxwSEThYSt+lknc3CUsSL5IofR0GRHIACURSfcp40LklGXV4ET+ H+Cg== X-Gm-Message-State: AOAM531w7CGVpJWNrmnyxfVnlY7RRQ9jaV7WCo+7tZVw2Dg1LhJFDviq CdEQNCe0eM1UDOxdBshMK/DFPw== X-Received: by 2002:a17:902:eb82:b0:158:8feb:86d6 with SMTP id q2-20020a170902eb8200b001588feb86d6mr13587063plg.26.1649973918225; Thu, 14 Apr 2022 15:05:18 -0700 (PDT) Received: from localhost ([12.3.194.138]) by smtp.gmail.com with ESMTPSA id e10-20020a17090a630a00b001c685cfd9d1sm2715141pjj.20.2022.04.14.15.05.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Apr 2022 15:05:17 -0700 (PDT) Subject: [PATCH v3 3/7] asm-generic: qrwlock: Document the spinlock fairness requirements Date: Thu, 14 Apr 2022 15:02:10 -0700 Message-Id: <20220414220214.24556-4-palmer@rivosinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220414220214.24556-1-palmer@rivosinc.com> References: <20220414220214.24556-1-palmer@rivosinc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Cc: peterz@infradead.org, mingo@redhat.com, Will Deacon , longman@redhat.com, boqun.feng@gmail.com, jonas@southpole.se, stefan.kristiansson@saunalahti.fi, Paul Walmsley , Palmer Dabbelt , aou@eecs.berkeley.edu, Arnd Bergmann , macro@orcam.me.uk, Greg KH , sudipm.mukherjee@gmail.com, wangkefeng.wang@huawei.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, Palmer Dabbelt From: Palmer Dabbelt To: Arnd Bergmann , heiko@sntech.de, guoren@kernel.org, shorne@gmail.com X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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