From patchwork Fri Jun 9 07:55:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 105368 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp789017vqr; Fri, 9 Jun 2023 01:15:22 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7Z2EpmkljRnQBOmaBx1rRRj/MbP2ta1iIR02dS8gNkkKFZD5cQmngRcKE4b6HQFwl38K67 X-Received: by 2002:a05:6358:c519:b0:129:c1bf:9f4e with SMTP id fb25-20020a056358c51900b00129c1bf9f4emr639214rwb.28.1686298522118; Fri, 09 Jun 2023 01:15:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686298522; cv=none; d=google.com; s=arc-20160816; b=Kble4Pg/k13/nsprLMxexdMf8fV7LiigaXvHtf211kx9mC4gz8YpitwtuEoSjKsIdd EIYlapAqBqB7tseDgxewoKP2Fw4ZRn3SOPXHXZXT2D1Dpo4OfWpPLyIiENs1flNQEqUb ZK4vJehkzBoCGtpZpbOT1rBLChBG/73eSxsd2os/wY4Hm1VoNNeoL35S9Yfs9kTnhaMy Ok87q9VnWRUhe9E8gDqxys4CWoC2DAZnMYl/5+9vlBDU9XstXu0B9rUJsIZnz0bSqEv9 A2VNCi5AMKqy2VjqkwEWmYfBUMSqGpmRMihTfQ53+nNj0bQxUkokb+giSXEp7zyabyKm ygtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=Q6FqFH1BcUytgqX4QKu6xifdNtfoGeELk4tAxVMyGeg=; b=XK3Op5me8odfl19kex5zcKGeW1kkGZeIohXnCLNplkiFSr2YX8HCfFBJWcYke5V5iE N4YgGzCJiHo7A7hznaeyNGT0yN6fIY9hobkK5CbPs7R2rveqP7YsoFLajRfr0wXOunwz Mg2VG+YSwVtq/GG5++LZkLsPiPYwpxBMvOKvSCbBlyTD8x1rQmUSRhh2zbUu2TiNx7ld 1juS2aY4qR1mk5zNs88mU06f8nUGinfy6W0BQ07ZvmTH95q5QVZJUTFWMMRVulplO4aN ddHJ9m7qklI5aln+hauy6Ywa2OOzhxQkWUD4L+gGV+pZzoncusgPTRGIZj7bogQpy89D MiNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=HXuE+w7D; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n184-20020a6327c1000000b00543a89c95c2si2254107pgn.207.2023.06.09.01.15.07; Fri, 09 Jun 2023 01:15:22 -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=@linutronix.de header.s=2020 header.b=HXuE+w7D; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238937AbjFIH4I (ORCPT + 99 others); Fri, 9 Jun 2023 03:56:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239372AbjFIHzy (ORCPT ); Fri, 9 Jun 2023 03:55:54 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6CB141BE2; Fri, 9 Jun 2023 00:55:25 -0700 (PDT) Date: Fri, 09 Jun 2023 07:55:14 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1686297315; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Q6FqFH1BcUytgqX4QKu6xifdNtfoGeELk4tAxVMyGeg=; b=HXuE+w7Dm3yxc6KfeAmuQen4ZEiCLEoqXCE0+BoFCME8c6NxNHkGWj7xNYAvuUPJ8ynbHp yZ/XUYYlZ0kxxpC0v9oXm2w2NgGecWrkUMYYy2z8XGBZE+FZo4bp44sQWYaqZ4CfpOsoTm kBoEYqZYdMQbosbu1pJ1KjYkRwRanzJFKe+Mg0CTBcsLeIfdpMhmCeYnYRJDW+yXPu+SpE WdenkcA5OOMnURRdC9WdsBAnTVkh+meAnPJBgZ9+Rn6gDlc+qU5uX8MfEfmKnDqPpGejaN s/OL6kZe/xsyPf8C2BuKgT/XzFR1kS9k3rKPA5YC/gMGXN+SfdaUTyR3OOV9uQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1686297315; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Q6FqFH1BcUytgqX4QKu6xifdNtfoGeELk4tAxVMyGeg=; b=bXlnvLXqk8XNGDfJmxMlGjIHwA/9V4Ihxb29PCFQIl/LZqG74lptlhlNyL7qohJa+kC1OI 6nxePkJoApN2rFDw== From: "tip-bot2 for Peter Zijlstra" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/core] arm64/arch_timer: Fix MMIO byteswap Cc: Mark Rutland , "Peter Zijlstra (Intel)" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230606080614.GB905437@hirez.programming.kicks-ass.net> References: <20230606080614.GB905437@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Message-ID: <168629731478.404.15268928192840800699.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768212158805752996?= X-GMAIL-MSGID: =?utf-8?q?1768212158805752996?= The following commit has been merged into the sched/core branch of tip: Commit-ID: 5416bf1cf5602ab3a38b4c0d15ccec1ca4199633 Gitweb: https://git.kernel.org/tip/5416bf1cf5602ab3a38b4c0d15ccec1ca4199633 Author: Peter Zijlstra AuthorDate: Tue, 06 Jun 2023 10:06:14 +02:00 Committer: Peter Zijlstra CommitterDate: Tue, 06 Jun 2023 10:19:51 +02:00 arm64/arch_timer: Fix MMIO byteswap The readl_relaxed() to __raw_readl() change meant to loose the instrumentation, but also (inadvertently) lost the byteswap. Fixes: 24ee7607b286 ("arm64/arch_timer: Provide noinstr sched_clock_read() functions") Reported-by: Mark Rutland Signed-off-by: Peter Zijlstra (Intel) Acked-by: Mark Rutland Link: https://lkml.kernel.org/r/20230606080614.GB905437@hirez.programming.kicks-ass.net --- drivers/clocksource/arm_arch_timer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c index b23d23b..e733a2a 100644 --- a/drivers/clocksource/arm_arch_timer.c +++ b/drivers/clocksource/arm_arch_timer.c @@ -776,9 +776,9 @@ static noinstr u64 arch_counter_get_cnt_mem(struct arch_timer *t, int offset_lo) u32 cnt_lo, cnt_hi, tmp_hi; do { - cnt_hi = __raw_readl(t->base + offset_lo + 4); - cnt_lo = __raw_readl(t->base + offset_lo); - tmp_hi = __raw_readl(t->base + offset_lo + 4); + cnt_hi = __le32_to_cpu((__le32 __force)__raw_readl(t->base + offset_lo + 4)); + cnt_lo = __le32_to_cpu((__le32 __force)__raw_readl(t->base + offset_lo)); + tmp_hi = __le32_to_cpu((__le32 __force)__raw_readl(t->base + offset_lo + 4)); } while (cnt_hi != tmp_hi); return ((u64) cnt_hi << 32) | cnt_lo;