From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D45873469E0 for ; Mon, 13 Apr 2026 14:52:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776091930; cv=none; b=YQ50jZqSwAa99oXkYAO3I9qCbIdFhS+YoJLtVM7bcUivxk6XK0vk3+Zh02yATF5grKwkrviKY/4gyN7KhscpbqhU/EfYV1C3efQQcYXYL8VsOz+g8H4Cx/q9e8csKZtfQPTIsFbhoEO0itmPF9SDdBUp5G91ic43nmMLTkycq+E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776091930; c=relaxed/simple; bh=1N0Ic5mYUVLGnYhpTIZaTdXVn9fN+yf3lS+ceRSqyvo=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=P/D1YO8KXIdGsu+qsH67qiRZou7qMk9zCJdF13oCUcnz3gcTBfiYG0ZGv8BS03VMAjUT47a2GGYweiHfyMeDkbBHbDqZPz8SH++ONm8RlypKK9Z1p5WJIzyB4zqo3LBaWRsIeS1IKTtuOqkn459R1c6EEYJmmgMMMdKvrM4jV+I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=HAcNiDnL; arc=none smtp.client-ip=209.85.167.48 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.b="HAcNiDnL" Received: by mail-lf1-f48.google.com with SMTP id 2adb3069b0e04-5a283c44478so7061646e87.3 for ; Mon, 13 Apr 2026 07:52:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1776091927; x=1776696727; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=nhtm5HeXPEPA+7QwbI5rKeED2HyI8ZR2koXSJnjMflc=; b=HAcNiDnLQ5QaRDdDIdvKu4ka6q4Kd2NFGGsjYZz4e/a90ekQt0mUVCYjTjjSehpqzO a8k5pO+31vftXVym/J/+PZVUoDEgyO3w02GfdMtTSBa5MXRZtfDBrK5cqhgsgevF8I08 jwqTJKL+YRhx6v4Mknm3EteMoek3kLViNLlGDpexcxaxT3cKDOWV05gzpYfVDGpqk7To mOh/4yr7KV2zjZg5ElFklv8CpXTF1waRkgRugRqBi5FmDyxJ5fIOEb6iPaHgRr/RFBbr zpEY0kzCajG+9qWskxO69U3ZxhBDKWIit2qBFyRskVrhmgs1CsP1psx2jjmY0tMNNszk PkLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776091927; x=1776696727; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=nhtm5HeXPEPA+7QwbI5rKeED2HyI8ZR2koXSJnjMflc=; b=pJ2hD321ppnuDXjiAyiYLAByhFQ4NUEbigUL6vf+2F3l7r77n05rJsD7BhMQX5Us4W DIyWVI4gkHHnfmx34TKfE8G5J5HlSTZOxr03CzQT/1VzgQB8TwFpErKgIo9Dovf3oJgJ curfZcBTjCXdnCDGRJNmQraUjaXqZKoIm0IdOEfdoPuY2ZZJzK8e+NhArmfd7hx2xuTh GWycnytiBwCcn3oklDAxq8asWa+Yfa37me2/R3a7BO7XAC5vuJ8+rY8KJbPQTTP+RsIc 6wORSQKnFgFAV6IphR7ie17geG/gQa4CLMSqDkoG4lMkw334SkuIVVZeJvY3w1QM/Skz GGxw== X-Forwarded-Encrypted: i=1; AFNElJ/wj8uL81GmpXweCkNsl0zWnc4w8ILLhcfVsW285exXICq348x0Q+yNzSmVwcfF1tB3SOm/OoI3dPrdqv0=@vger.kernel.org X-Gm-Message-State: AOJu0Yz5iKXjn9a4ufYxxMr+RY9Rd2izFw5wfgrb0m+YlKcW06O3swqV pkGuv3YZobVVQLT51N3aujP7PwxGMOEZfxvs2gNKf3mKoc6iyuI/x3rT X-Gm-Gg: AeBDieu0FLal8ky0dyE7bZIRZZw7uADBon4DmiSeaY8cPL1WVNV16RaYuL4ensEGdSb 1Rw0CVoUzdu7FJsMDT8CWne8RVJGwpu6Hx4u/OQvdrz48NQcLjOr7CkLqKoyWqjIO4it7ZOX8Oq O91XFxu5JPMOF9Se5H8839WX5+DipiLeWczM3xV+5LrUesXug5c03jii+KxEkOR96dQvuJxI40B BjSCc3KJPDuuUeJbRSY1mJ4erKZ/z0P8GVEnL23ET0ZP90sCS5R8P5Iv7ZW7WQBDvaXQYFnd0L3 YT8Zy40kr9gtvYnh8RSF9b4j3FWhDKjDX/NhiheF1YHrvCXcvDVjRdLIE8JX9uOtA6xIhMCGYjx WyFKr8svf+8BA8CqgD2nFrlsyex/02X3ijsuNkSyvKi2rPLQwBu+p8OaiPvzCEVSQZtFZODCAlp qkRDwgiSD5BDBCEg0y9SZ7uTHDOrLhUfb+NOgJeVgbP/cNPMOR+bgAwRl+s7Q9BFLA+7CVJOD1e XlxFrCTHLrr4/mHgfHJ X-Received: by 2002:a05:6512:2551:b0:5a3:f2e8:68ad with SMTP id 2adb3069b0e04-5a3f2e86985mr2703397e87.40.1776091926462; Mon, 13 Apr 2026 07:52:06 -0700 (PDT) Received: from ?IPV6:2a00:1fa0:48f9:47d7:d220:9351:3e7c:f662? ([2a00:1fa0:48f9:47d7:d220:9351:3e7c:f662]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5a3eeee120csm2590881e87.48.2026.04.13.07.52.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 13 Apr 2026 07:52:04 -0700 (PDT) Message-ID: <6ef275d9-af82-4d30-be41-bd70e384be1a@gmail.com> Date: Mon, 13 Apr 2026 17:52:02 +0300 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/2] clocksource: timer-econet-en751221: fix IRQ ack storm on interrupt handler To: kpursoty@proton.me, "linux-kernel@vger.kernel.org" , "daniel.lezcano@linaro.org" , "tglx@linutronix.de" Cc: "linux-mips@vger.kernel.org" , "tsbogend@alpha.franken.de" , "cjd@cjdns.fr" References: Content-Language: en-US From: Sergey Shtylyov In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 4/13/26 1:12 PM, kpursoty@proton.me wrote: > The interrupt handler acked by writing the current count back to compare: > > iowrite32(ioread32(reg_count(cpu)), reg_compare(cpu)); > > Since the interrupt fires when count >= compare, and the counter advances > past the written value before the MMIO write reaches the peripheral, the > condition re-asserts on the same bus cycle. This causes a tight IRQ storm > on CPU0, stalling boot at T=62s (measured: boot never progresses past > clockevents registration). > > The EcoNet GPL kernel (arch/mips/econet/time2.c, cputmr_timer_ack()) acks > by writing the *next* deadline, which puts count < compare and clears the > pending condition. Write U32_MAX (unreachable before set_next_event() > programs the real deadline), consistent with cevt_dev_init() which also > writes U32_MAX to park the compare register at init. > > Fixes: 3b4c33ac87d0 ("clocksource/drivers: Add EcoNet Timer HPT driver") > Signed-off-by: Kervin Pursoty > --- > drivers/clocksource/timer-econet-en751221.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/clocksource/timer-econet-en751221.c b/drivers/clocksource/timer-econet-en751221.c > --- a/drivers/clocksource/timer-econet-en751221.c > +++ b/drivers/clocksource/timer-econet-en751221.c > @@ -68,7 +68,9 @@ static irqreturn_t cevt_interrupt(int irq, void *dev_id) > if (!cevt_is_pending(cpu)) > return IRQ_NONE; > > - iowrite32(ioread32(reg_count(cpu)), reg_compare(cpu)); > + /* Ack: write a future value so count < compare, clearing the pending > + * condition. set_next_event() will program the real deadline. */ The multiline comments in the kernel (with a little exception of the networking) should be formatter like this: /* * blah blah blah */ [...] MBR, Sergey