Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1743681rwd; Sun, 21 May 2023 05:32:40 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7jYpyLPPUfnJFjCtFUbKcES7Ol2dvTz0aEXs7gdPbfNonxypz40rvXjG0Ywq74GNmefrux X-Received: by 2002:a05:6a20:1451:b0:101:8d3d:81b6 with SMTP id a17-20020a056a20145100b001018d3d81b6mr8256436pzi.25.1684672360171; Sun, 21 May 2023 05:32:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684672360; cv=none; d=google.com; s=arc-20160816; b=rKooikRYXnKd4mYFeKNk0T3g7NZb+QfkBs4TKSkVXKqzHJeeEHmg1NpKSfoppiiIJg lZZZ3yB+qyWMj43jZE5Wtmw11o49F9eckn0Z9XENr4UEmeKXDXeTE2zgr8sxHxD9gwkF 2dUrLzouEYrYpOqQshHlEP2GRBSHkqGq2EniF2R5pTg8jf63p8dIkTHJQjXw01/lPZUg Vd+q6QEc6gkmA3suQpdN4JQ+Por0rHVoAjJzxDDHaInhGJlM29yljbGgXakY0jHoLBIU Ter8u/99B+tpKDbVJoY0dvDsI+vin+m2ft/4Jfxm7iZY4GsTjbp5KnictnFoOdezZ4dK 8U0Q== 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 :message-id:date:subject:cc:to:from; bh=/RuzFKVl+QUEHLM7zKauAcPQFrNTvJTHTi/MlBJIFaA=; b=UbRLt3ZO0ranrlFbbCq0LE0s3bYQuD+hTbnDeBQiJ4w8dL+da2KbG/PO/ZGqn49trJ IG5mBSnN1E8LlTwK2z7nuREAscGopOOrje02qsV6T0gK/NcntIZeehtz5DxG8Juu4wDv rFf5A+z7uaAdieU3Am60U2d3EKpZ6R2T76ps70gpynv8hxPn9RjaxB0PNy/7SGDsteRB cFgiVVBpTmZq6oFzpLUDKBFpHwW0FLOiyaICzcrf1exgWwJEsQ6KR3A32ObUMQ007b26 bPjEIOpJ0FM09CSPg2lHX03gaLzp0gV+8JZPwzc83X6ZvgdVhp2THnc+3oT9gKNgyRry Dr2w== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=sntech.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i2-20020a633c42000000b00535a71508f3si3079169pgn.77.2023.05.21.05.32.27; Sun, 21 May 2023 05:32:40 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=sntech.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231163AbjEULug (ORCPT + 99 others); Sun, 21 May 2023 07:50:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231157AbjEULti (ORCPT ); Sun, 21 May 2023 07:49:38 -0400 Received: from gloria.sntech.de (gloria.sntech.de [185.11.138.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D31710F8 for ; Sun, 21 May 2023 04:47:24 -0700 (PDT) Received: from ip5b412278.dynamic.kabel-deutschland.de ([91.65.34.120] helo=phil.lan) by gloria.sntech.de with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1q0hWu-0008T6-Os; Sun, 21 May 2023 13:47:16 +0200 From: Heiko Stuebner To: linux-riscv@lists.infradead.org, palmer@dabbelt.com, paul.walmsley@sifive.com Cc: linux-kernel@vger.kernel.org, christoph.muellner@vrull.eu, David.Laight@ACULAB.COM, Heiko Stuebner Subject: [PATCH v3 0/2] Add Zawrs support and use it for spinlocks Date: Sun, 21 May 2023 13:47:13 +0200 Message-Id: <20230521114715.955823-1-heiko.stuebner@vrull.eu> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS, 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 From: Heiko Stuebner Zawrs [0] was ratified in november 2022 [1], so I've resurrect the patch adding Zawrs support for spinlocks and adapted it to recent kernel changes. Also incorporated are the nice comments David Laight provided on v2. Changes since v2: - Rebase on top of 6.4-rc1 - Adapt to changed alternatives Kconfig handling - Adapt to changed cpufeature extension handling - Address review comments from David Laight - better handling for 32/64bit cases (less ifdefery) - less macros calling macros - don't duplicate __smp_load_reserved_relaxed in __smp_load_reserved_aquire Changes since v1: - Fixing type checking code for 32/64-bit values - Adjustments according to the specification change - Adding "depends on !XIP_KERNEL" to RISCV_ISA_ZAWRS [0] https://github.com/riscv/riscv-zawrs/blob/main/zawrs.adoc [1] https://github.com/riscv/riscv-zawrs/commit/9ff54f7e7fcd95cf1b111d2e54276ff1183bcd37 Christoph Müllner (1): riscv: Add Zawrs support for spinlocks Heiko Stuebner (1): riscv: don't include kernel.h into alternative.h arch/riscv/Kconfig | 10 +++++ arch/riscv/include/asm/alternative.h | 1 - arch/riscv/include/asm/barrier.h | 64 ++++++++++++++++++++++++++++ arch/riscv/include/asm/errata_list.h | 14 ++++++ arch/riscv/include/asm/hwcap.h | 1 + arch/riscv/kernel/cpu.c | 1 + arch/riscv/kernel/cpufeature.c | 1 + 7 files changed, 91 insertions(+), 1 deletion(-) -- 2.39.0