Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp2472851iob; Sat, 30 Apr 2022 09:25:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwE1UHtujd2ELG81CL1ETkXnvpGQZ11Opls7uOqg07Uf6SI9CH3CcvYacxKLn5VrEd6v5Lw X-Received: by 2002:a65:60c1:0:b0:39d:9c28:909a with SMTP id r1-20020a6560c1000000b0039d9c28909amr3605345pgv.352.1651335903040; Sat, 30 Apr 2022 09:25:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651335903; cv=none; d=google.com; s=arc-20160816; b=aP+9FNPxgY6BTf5e1iTy+PxrynkixFSLwIZxQID5sxntHhYXD+0uXwCcG3Cy+3hvoe IvNfWMCBq0xU+K+WGNsNU9R8TPQYKQ8KfcV5VAuqzIfJGbOFDTRI+vkUnJfe0MK3viYh 5gc4Jng1yfxBhSUUQhv+MkeZhfWw72H3YVNSvKPS14lcuKqJKyO3fU7l6rX96yE/chE0 nV2Dvis17htXKkf9wdFdEkEre8AwYZ1trvKrk17UQ8BlE1vZenIynw85UcywtqSZp024 6GJBxIRHein+yjsYeS4kdQBo5E0Q2vKh7idNGz0US6NOhXwjhhKLRDuFKCx3C78yxejO UYzQ== 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:message-id:date:subject:dkim-signature; bh=np4HtbwGSB6iapeRruj8GZIUHuBuKuckcGYZnwyb7bo=; b=rQiYnv2/xyzDf6ZA0eY3nGem8jtWsyTvy5d3mktgVvG48nm/cINqGcbbU6elfoXviV wPpzTI3iNpXpFApnlsfgXZcE9Lp2rLE8yKMB9+IQryy/7m2yvGI4jh4X9WSq0B+fztga /IkDcAlZL49k72HeeiYw5pbhf3/T4TeIUKZhdJJ+e4GxkeAdA41aGwdrOCd45xkvWlNw s9yNqgnxQDv4Flb1k3h79m/EIDYuYgjq+uXEHKCdkFUvRvANJ+YY/FwXyRZg/OjCvQm4 m+46qUTjhasEnDHBQ8Zsom9XnwXIan3tiUHoTPoxFP+lykWz1yO0HCGZa+mM1CROl6PR nsfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20210112.gappssmtp.com header.s=20210112 header.b=InNn+tkd; 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 c13-20020a170902848d00b0015d29ba7843si9383245plo.262.2022.04.30.09.24.46; Sat, 30 Apr 2022 09:25:03 -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=InNn+tkd; 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 S242748AbiD3PlR (ORCPT + 99 others); Sat, 30 Apr 2022 11:41:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233113AbiD3PlP (ORCPT ); Sat, 30 Apr 2022 11:41:15 -0400 Received: from mail-pg1-x531.google.com (mail-pg1-x531.google.com [IPv6:2607:f8b0:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7EBCAA0BC3 for ; Sat, 30 Apr 2022 08:37:53 -0700 (PDT) Received: by mail-pg1-x531.google.com with SMTP id z21so8667642pgj.1 for ; Sat, 30 Apr 2022 08:37:53 -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:mime-version:content-transfer-encoding:cc :from:to; bh=np4HtbwGSB6iapeRruj8GZIUHuBuKuckcGYZnwyb7bo=; b=InNn+tkdTs6CYKbpqgE/Kt+T2kH9K4dNAnuziT6CNc1awAKVpLsBeXBEdSF55QM/8k udH4gEcsFOVPawephKUVFL/54PfXCMPmAorXXpszoBfjsIKvSI3jL3yHoCz/uqq1IJn+ kVWFjf9c9lRBSJV5yXZBkvE8w4q0dL/oOu8lTnq28UsvEJQY0CH45LEYkuv+wRNYsTLP Eyvd+DTwR/Od3TwiXZX3NEqkZmEX32Za9+ZkVKeQEHjNlAk+KM4nrwQUJ54ndJvbu69L pGF/VGp+Zznm318sUZMvZlp/aR/nsxWR0vlR5TvJIrQjJvM+dt17gI1NbWJzGbD5zNqR 3vVw== 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:mime-version :content-transfer-encoding:cc:from:to; bh=np4HtbwGSB6iapeRruj8GZIUHuBuKuckcGYZnwyb7bo=; b=sAI6UdJvF/b3w/B21KLDB4uTtLhdWvuTtQvL3ZQdXIrVRMLvFxZydeijiCpVestvY3 7HQUgp54hR7b2zj2Qh64v1i5iBgl2WMXZo3lEHKGenS1Rq6x6Tlajxd6LdYUHbZ+w0Nt O++dnjlMi1A1GYxHi5kuqbxf1mAMRPe48mXFkThtANlJ/2GYwlvkoPIkigdWRve1vbTa nguM5IR7ox/DWT8UQaYh5tALcIUv70pNO5AOHpx0FDVPd7hrTpUHl13BRFqMRRt5qv1l FcUVL4fZfDBkbwX12SEmbD8DUPsVLJlaRhQ4KXhE2Q7MKPZ4UzNTg3APfHGJtULCTja7 Nr6w== X-Gm-Message-State: AOAM530R9Ogr0WLVRH6kwSBf0hpvWnZCKYM21ZnGHGJEkyryHM67kovt RiyL8TC0KRwSTfeOy8fghzqmFg== X-Received: by 2002:a63:5606:0:b0:3ab:84d3:cfbe with SMTP id k6-20020a635606000000b003ab84d3cfbemr3521738pgb.191.1651333072975; Sat, 30 Apr 2022 08:37:52 -0700 (PDT) Received: from localhost (76-210-143-223.lightspeed.sntcca.sbcglobal.net. [76.210.143.223]) by smtp.gmail.com with ESMTPSA id p2-20020a17090ad30200b001cd4989feb7sm17264343pju.3.2022.04.30.08.37.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Apr 2022 08:37:52 -0700 (PDT) Subject: [PATCH v4 0/7] Generic Ticket Spinlocks Date: Sat, 30 Apr 2022 08:36:19 -0700 Message-Id: <20220430153626.30660-1-palmer@rivosinc.com> X-Mailer: git-send-email 2.34.1 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 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 Comments on the v3 looked pretty straight-forward, essentially just that RCsc issue I'd missed from the v2 and some cleanups. A part of the discussion some additional possible cleanups came up related to the qrwlock headers, but I hadn't looked at those yet and I had already handled everything else. This went on the back burner, but given that LoongArch appears to want to use it for their new port I think it's best to just run with this and defer the other cleanups until later. I've placed the whole patch set at palmer/tspinlock-v4, and also tagged the asm-generic bits as generic-ticket-spinlocks-v4. Ideally I'd like to take that, along with the RISC-V patches, into my tree as there's some RISC-V specific testing before things land in linux-next. This passes all my testing, but I'll hold off until merging things anywhere else to make sure everyone has time to look. There's no rush on my end for this one, but I don't want to block LoongArch so I'll try to stay a bit more on top of this one. Changes since v3 <20220414220214.24556-1-palmer@rivosinc.com>: * Added a smp_mb() in the lock slow-path, to make sure that is RCsc. * Fixed the header guards. Changes since v2 <20220319035457.2214979-1-guoren@kernel.org>: * Picked up Peter's SOBs, which were posted on the v1. * Re-ordered the first two patches, as they * Re-worded the RISC-V qrwlock patch, as it was a bit mushy. I also added a blurb in the qrwlock's top comment about this dependency. * Picked up Stafford's fix for big-endian systems, which I have not tested as I don't have one (at least easily availiable, I think the BE MIPS systems are still in that pile in my garage). * Call the generic version , as there's really no utility to the version that only errors out. Changes since v1 <20220316232600.20419-1-palmer@rivosinc.com>: * Follow Arnd suggestion to make the patch series more generic. * Add csky in the series. * Combine RISC-V's two patches into one. * Modify openrisc's patch to suit the new generic version.