From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.171 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796448788; b=4WuyovEMWrmR3i0D3HXi1v8ggGwjPpvGg9zv6tjDmPEV74gvYBsxIn54/y5kbtbl+U5L Rz5erQTmIZ+YYCrhhDgus+W768uY742/vm0hcuOWiDwt/KfbN9sezP7LXZCQBx1D5+sGW 18KH7Bfuu8lR+24sv+Wl6ZwsunJLBpVSxzRNw0brynL31Lu6GLWUEKZYhNOtq5141sc5/ xhDNGNLvMzsBN83pRnmGP6NQYVlFvP94GscssP1f7ZWHKAm+msA6qMa3qPiAlZqK4d1TA iPKk/fRnZ+W7G9BFVQIg3Hyoq0a4i1Y+eHdkc66foo+5+T3LcljLpqQaDlBFeg4IkBw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796448788; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:Subject:Date:Message-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:X-B4-Tracking:X-Change-ID:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key; bh=y5yhg1whqnvGp+RsIHxuJmqRmHYht4FvMiUdpn+YTbE=; b=y/0x2wOKPAUt/TgIPCkFj0JJB8cBxvkvAxrMJxr1g2n3oNXkXBjS7Ur7YCslTfje78mm G/LHLj5MN+0R/yOxRkP6KkeAeThbBAk775SvJGLlJjg+YJkDxPh+yCXy15mJ97rznvkW0 2DBwC/ttVq5U3wrS8298dAk93Nuuiq0ZPuWuKPs2u0d4TKkPo8a7QLGZJHxoePuDf6zPS 8E8O2qhOq7T681loMkcl9Q3kTzgPDWmdaul7WGvEpVDhEz7xgT1D9FGi1TlK58qh8lG5E +54HXjkiuT5ZWCCimyp8AEtQGm9BvBoSF0k++Za6s4Nd5IlhusoYYykDxGBdEG6MhDw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=E8fvGhN5; arc=none smtp.remote-ip=209.85.128.171 Received: from mail-yw1-f171.google.com (mail-yw1-f171.google.com [209.85.128.171]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D7A7D606A32D for ; Sat, 5 Dec 2026 05:33:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org D7A7D606A32D Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=E8fvGhN5 Received: by mail-yw1-f171.google.com with SMTP id 00721157ae682-8b502b9b702so15698807b3.3 for ; Fri, 04 Dec 2026 21:33:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796448787; x=1797053587; darn=vger.kernel.org; h=cc:to:content-transfer-encoding:content-type:mime-version :message-id:date:subject:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=y5yhg1whqnvGp+RsIHxuJmqRmHYht4FvMiUdpn+YTbE=; b=E8fvGhN5eEoTuvRIKBaQYa8RaJxa1iJZoBGmJQx82jsWzARteegwZ1PXWwCEJWEsNb AFB+XsqB+7/3EdhO5yT5/2Fak58x0W8Z1tgCh6n4ToQXj1Ig4joWNMg3pblPqM5Dn6mN dvG2ENYmmwXa0/RKJif7wqKo/j2YysKzLk8m9nDU8kbVQDuDjM5QHg3wvZLX9Aq1g54D fE8KBBmZSv/0s0awHa2m1vFp6D9UU1PuneQ1LgpfpT2rEyGWjYoPpim9JbAGP8fw513m TfhqKczL5D0E2J8sybUV6ofdBKcsO+l0nmlRp8JtjHh4aLO1LisW0xhE8ugiMEHMkvFq fqTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796448787; x=1797053587; h=cc:to:content-transfer-encoding:content-type:mime-version :message-id:date:subject:from:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to:content-type; bh=y5yhg1whqnvGp+RsIHxuJmqRmHYht4FvMiUdpn+YTbE=; b=qXWaEPvbaJUB5qMdGc40enWTlTmDKo5e9Pbf9t/BAAo2Ngpoe/yPGrxj/+uitfzrLX iJiKrXGy1yGdsKT64AP/9NYmmQbsiwavh+xUFn+KbZnBDv39u9zApVIh+fCnkOCsDJDj HDouQrWV6Gou251F1/U3Q22j5ZyK4odr0YiJ8RxfR4HgHYWG6gjuHt5lmoweu8cquLLR 6EOSsvn1Xf5DLDwos8y111smPFowY7O8J+HDG/V04HZAELnfGCltGhuV8pxlyVDO+n0W LX67kmGoq6ag1RDFqwOJgw9bGpbgXd1Ohoy/IJyzpnctfGZgSNfvj622+lu4Ck7wN2RG 2DWg== X-Forwarded-Encrypted: i=1; AL+hErGVnwzkgUm4DqQnkB/Q8lKSXsIxhaiCVjLYbYkk8ykn3xUhUTNRGjceOuGl82fwDwr4DNHtJL+raoemKys=@vger.kernel.org X-Gm-Message-State: AB4q+uEMypta3JRRqGBE4vTf7FoNA9VQbouGIsjc6INMtS+SDwVMC6jL xuJ2o1O918gNFBUamBYgFPWWOherTf5uwZb3c3prLzfaB7H4xOdEFYVPedFKfYqM/Y8= X-Gm-Gg: AZFdTZebHGhdP7HuhkRFf3fdckpXmh2ijFPADk+4gPh4jtqv5YUrJUUwfO0ua5peUwQ xyTBPXr2wwB/znQL3FwgmR62atgHY8Y0kz10FIdb8yLlHrGgDzeif6a7+ixbiZHsuXdYMzlBd/z A0a7wOJn/xbDefTZgt45sPk98fnaSdif02sdsrtvobA6X8JdcxS24FkzjmAJz9JKKw9FTgsxLlN /WJg/wdunWuLsFPi6+bIVhXZocn/re0nmglxPUxCwQAJDX3+m2EfE7Ah9T7OCKCxOdrZqk/ti7M 26NIShBPf+YabzK1YvCSf+vbHr4LriO7Ym65qmfmDjobbyKrYoTidLhBjUw56eZdLze5wdQ9ey5 nBr+SDd5UTgDngiKz7exVWwkb5kxva0JehsWmJsWJ+fXJfPuWr140MiJtvBEoZPfv34K5gQuwjm 9ff0ywVWEjoSzO8xoklLGYSQFXBa3fhymnmbQQGdJ8oa60GsPHbfEj3goQpf8efurNVAy5fb5a1 D4go/CPSUSQoVc1ZlmjTFK0CTXkWjH4mrdWENwm6qVj946nHxxwl2gypSf0WE6f/208Xz2ggtn1 auBcHoOd5yo0Os9+NzwFlFMJPS4qFItHYq2iUZxEx6ZElr3aHQ9k4U6gbkDLdZZBAv3RCQRUSle n9sNLy+fqStpjR0noVta12NdWnNcvtf4V16PPSn6v0cPeWisd0tns/3OQ1d/ufpShO3GG+sHYOh Qc9jmoWNcZoSPWCuBeow== X-Received: by 2002:a05:690c:3010:b0:8b3:b358:f9fb with SMTP id 00721157ae682-8b66066fac8mr17301577b3.25.1796448786769; Fri, 04 Dec 2026 21:33:06 -0800 (PST) Received: from localhost (107-220-129-194.lightspeed.chrlnc.sbcglobal.net. [107.220.129.194]) by smtp.gmail.com with ESMTPSA id 00721157ae682-8b660e10477sm18935807b3.43.2026.12.04.21.33.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Dec 2026 21:33:06 -0800 (PST) From: Matt Turner Subject: [PATCH 0/2] alpha: Use rpcc as the clocksource on SMP and without WTINT Date: Sat, 05 Dec 2026 00:33:04 -0500 Message-Id: <20261205-alpha-rpcc-smp-v1-0-084c39baee43@gmail.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAAAAAAAC/yXMQQqDMBBA0avIrB0wg1rsVcRFmox1Sqsho0UQ7 27U5Vv8v4FyFFZ4ZhtE/ovKNCaYPAM32PHNKD4ZqKDaUFGi/YbBYgzOof4CVg013pfGk31AikL kXtZr2Ha3dXl92M3nBfb9AEPfdcxyAAAA X-Change-ID: 20261204-alpha-rpcc-smp-5929dd41d2a7 To: Richard Henderson , Magnus Lindholm Cc: linux-alpha@vger.kernel.org, linux-kernel@vger.kernel.org, Matt Turner X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=2093; i=mattst88@gmail.com; h=from:subject:message-id; bh=jNf9SeMCsdzsuONU5X1lT+ulhembkKNP36keBDbW1Rs=; b=owGbwMvMwCW25rVmCc8sv+mMp9WSGLKFFwme2/rxaJ7Auuh7Cvxpd4xOrn7On3ih8v1r8c85s RUfdqcnd3xkYRDjYpgppsgSt16RZVbbjqU+p6V/wcxhZQIZIi3SwAAELAx8uYl5pUY6Rnqm2oZ6 hkCGjlE8RE6PQSOzuLg0tUg3raDIIS+/JLEkMz+vWC+/IDWvIL1ALy0zrSQjI7+oOBVohF5eaom pq6ObkaGBiaWjhZmThaOpibOzk6GTm6Ojs6uTkaW5iYGzpaOJq6U5AxenAMw1ay4xMnTmvC5S2/ Nuzoxv3ht/mybPk2eIjNTT8ClzfMonn+PQ85mR4dnqbxXtUx9W7Px996PEGab1yTvNzn86lXWhW FfzzeaHDowA X-Developer-Key: i=mattst88@gmail.com; a=openpgp; fpr=3BB639E56F861FA2E86505690FDD682D974CA72A Alpha registers the rpcc clocksource only on uniprocessor machines and only without CONFIG_ALPHA_WTINT, which most SMP configurations enable. Every SMP machine other than QEMU therefore runs on the jiffies clocksource. Patch 1 makes the WTINT restriction a runtime decision. Not all PALcode implements WTINT; where it does not, do_entIF() already turns the call into a no-op, so the counter never stops and rpcc is safe to use. The Marvel firmware's Tru64 PALcode is one of these. Patch 2 lifts the uniprocessor restriction by measuring a per-CPU offset between the CPUs' cycle counters, as proposed for parisc's cr16 [1]. Firmware zeroes each counter separately when the CPU starts and only PALcode can write it, so the counters cannot be aligned directly. Tested on an ES47 (Marvel) with two 1.3 GHz EV7s, CONFIG_ALPHA_WTINT=y: rpcc: CPU1 offset 607373602 cycles (reference CPU0, round trip 963 cycles) clocksource: Switched to clocksource rpcc Two threads pinned to different CPUs, passing CLOCK_MONOTONIC readings back and forth, saw no backward step in 3 million round trips, both right after boot and after 21 minutes. A draft that remeasured the offsets every minute saw them move by at most 275 cycles over 20 minutes, with no trend, so the series measures only once, at boot. If the parisc patch lands too, the measurement could move into common code; I'm happy to do that as a follow-up. [1] https://patch.msgid.link/20261204-parisc-cr16-smp-v2-1-1e37fc62aae2@gmail.com --- Matt Turner (2): alpha: Use rpcc when WTINT is configured but not implemented alpha: Synchronize rpcc across CPUs on SMP arch/alpha/include/asm/hwrpb.h | 1 + arch/alpha/kernel/proto.h | 1 + arch/alpha/kernel/time.c | 235 ++++++++++++++++++++++++++++++++++++++--- arch/alpha/kernel/traps.c | 4 + 4 files changed, 227 insertions(+), 14 deletions(-) --- base-commit: 9437ee8b6cf607e883b36e44bd755968daaebd48 change-id: 20261204-alpha-rpcc-smp-5929dd41d2a7 Best regards, -- Matt Turner