From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-189.mta0.migadu.com (out-189.mta0.migadu.com [91.218.175.189]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6CD7223F439 for ; Mon, 17 Nov 2025 02:13:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.189 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763345621; cv=none; b=ODkpniqI2P0XElGKnj/60Ch2lFb+LRaEwCQxQTt99MzRJeCUHelTe6MoOTAq0nvki8iVxfMZ48VauA+w+/QljAHvtRhYzWA+7GDqh86m1BNKKtZr5Ds0N5tQ73t8/y7Bht2xK0uOnPVdr7IoCXxFKg4VYkW+nyUJG31HTZKKOSc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763345621; c=relaxed/simple; bh=CX7Sn3bOAkR5j+MrEwUA/dLEAvcprLmxrUcKX8PjxJ0=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type; b=fIZAlvPlKmWM1kFaB5/CWoN/Gk80nX6fGFp+PFTw+j5C0E5EtCydX6SxLrAFE2Y6WZ+QxFV+JF14n5UHyO1hPJoCYmgq9T5B0OmoFaMei7dCGXI9en1nJWYG35iVuvUPVuy7d95Affxz3ooWSt6dIQ4Bc13L4uQfk0HAXjhJxZc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=lQ5JiOel; arc=none smtp.client-ip=91.218.175.189 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="lQ5JiOel" Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1763345612; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9bRlceZO1C6R5p58rYRLtXjrtmiq3B0PMRv5qsrWzJ4=; b=lQ5JiOely5tHyGp2pAH8z5p5pbcr3zVr7pDjZVelZ51U+TMw9mXWes4IPp64XMDa273P1K QDdFxm+S0bKeuiHP5f56NS+ckIz8eWbHpVyAmtzT9rB02m+tC73zNxxQEq3I2QhKjHqM0b LUEqj65XO5k4hBvudXphSzjc8TZnGF0= Date: Mon, 17 Nov 2025 10:13:24 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH V2] clocksource/drivers/rda: Add sched_clock_register for RDA8810PL SoC To: mani@kernel.org, daniel.lezcano@linaro.org, tglx@linutronix.de, linux-arm-kernel@lists.infradead.org, linux-unisoc@lists.infradead.org, linux-kernel@vger.kernel.org, enlin.mu@unisoc.com References: <20251107063347.3692-1-enlin.mu@linux.dev> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: "enlin.mu" In-Reply-To: <20251107063347.3692-1-enlin.mu@linux.dev> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT Hi Everyone Who can help review this patch? thanks On 2025/11/7 14:33, Enlin Mu wrote: > From: Enlin Mu > > The current system log timestamp accuracy is tick, which can not > meet the usage requirements and needs to reach nanoseconds. > Therefore, the sched_clock_register funciton needs to be add. > > Signed-off-by: Enlin Mu > --- > drivers/clocksource/timer-rda.c | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/drivers/clocksource/timer-rda.c b/drivers/clocksource/timer-rda.c > index fd1199c189bf..0be8e05970e2 100644 > --- a/drivers/clocksource/timer-rda.c > +++ b/drivers/clocksource/timer-rda.c > @@ -13,6 +13,7 @@ > > #include > #include > +#include > > #include "timer-of.h" > > @@ -153,7 +154,7 @@ static struct timer_of rda_ostimer_of = { > }, > }; > > -static u64 rda_hwtimer_read(struct clocksource *cs) > +static u64 rda_hwtimer_clocksource_read(void) > { > void __iomem *base = timer_of_base(&rda_ostimer_of); > u32 lo, hi; > @@ -167,6 +168,11 @@ static u64 rda_hwtimer_read(struct clocksource *cs) > return ((u64)hi << 32) | lo; > } > > +static u64 rda_hwtimer_read(struct clocksource *cs) > +{ > + return rda_hwtimer_clocksource_read(); > +} > + > static struct clocksource rda_hwtimer_clocksource = { > .name = "rda-timer", > .rating = 400, > @@ -185,6 +191,7 @@ static int __init rda_timer_init(struct device_node *np) > return ret; > > clocksource_register_hz(&rda_hwtimer_clocksource, rate); > + sched_clock_register(rda_hwtimer_clocksource_read, 64, rate); > > clockevents_config_and_register(&rda_ostimer_of.clkevt, rate, > 0x2, UINT_MAX);