[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DU0PR04MB9417992CCF80CAA4CF78F8EF886C9@DU0PR04MB9417.eurprd04.prod.outlook.com>
Date: Sun, 5 Dec 2021 12:53:51 +0000
From: Peng Fan <peng.fan@....com>
To: Daniel Lezcano <daniel.lezcano@...aro.org>,
"Peng Fan (OSS)" <peng.fan@....nxp.com>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"shawnguo@...nel.org" <shawnguo@...nel.org>,
"s.hauer@...gutronix.de" <s.hauer@...gutronix.de>
CC: "kernel@...gutronix.de" <kernel@...gutronix.de>,
"festevam@...il.com" <festevam@...il.com>,
dl-linux-imx <linux-imx@....com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"van.freenix@...il.com" <van.freenix@...il.com>
Subject: RE: [PATCH 2/2] clocksource: timer-imx-sysctr: set cpumask to
cpu_possible_mask
> Subject: Re: [PATCH 2/2] clocksource: timer-imx-sysctr: set cpumask to
> cpu_possible_mask
>
> On 01/12/2021 13:50, Peng Fan (OSS) wrote:
> > From: Peng Fan <peng.fan@....com>
> >
> > Actually we have CLOCK_EVT_FEAT_DYNIRQ, the irq affinity will be
> > runtime changed and no issue. But the system counter timer is not tied
> > to CPU0, so use cpu_possible_mask here.
>
> Did you mean:
>
> "There is no reason to tie the system counter timer to CPU0, change its
> affinity to cpu_possible_mask.
>
> Moreover, the timer has the flag CLOCK_EVT_FEAT_DYNIRQ set, changing to
> cpu_possibl_mask will reduce the number of wakeups related to the system
> timer"
The syctr interrupt could be set affinity to any cores in the SoC. Default affinity
is set to cpu 0.
This timer will be used as broadcast timer on all the i.MX SoCs. Because DYNIRQ
flag set, the core time framework will runtime set the interrupt affinity to the cores
that needs to wake up and the cpumask will runtime set to the core that will be
wake up. So even the sysctr initialization use cpumask 0, there is no issue,
the current patch is just use cpu_possible_mask to show the fact that the
timer supports routed to all the cpu cores and nothing else.
Thanks,
Peng.
>
> ?
>
> Note you may want to explain why 'there is no reason'
>
>
> > Signed-off-by: Peng Fan <peng.fan@....com>
> > ---
> > drivers/clocksource/timer-imx-sysctr.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/clocksource/timer-imx-sysctr.c
> > b/drivers/clocksource/timer-imx-sysctr.c
> > index 2b309af11266..55a8e198d2a1 100644
> > --- a/drivers/clocksource/timer-imx-sysctr.c
> > +++ b/drivers/clocksource/timer-imx-sysctr.c
> > @@ -119,7 +119,7 @@ static struct timer_of to_sysctr = {
> >
> > static void __init sysctr_clockevent_init(void) {
> > - to_sysctr.clkevt.cpumask = cpumask_of(0);
> > + to_sysctr.clkevt.cpumask = cpu_possible_mask;
> >
> > clockevents_config_and_register(&to_sysctr.clkevt,
> > timer_of_rate(&to_sysctr),
> >
>
>
> --
> <https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.l
> inaro.org%2F&data=04%7C01%7Cpeng.fan%40nxp.com%7C1fec86efbd5
> 4498106c508d9b57d9e2a%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%
> 7C0%7C637740373391832133%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC
> 4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&
> amp;sdata=q98PLDpC8h7jt%2BjvCeXZAf2F5ZzJsMMS613OSHmjDr0%3D&am
> p;reserved=0> Linaro.org │ Open source software for ARM SoCs
>
> Follow Linaro:
> <https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.f
> acebook.com%2Fpages%2FLinaro&data=04%7C01%7Cpeng.fan%40nxp.
> com%7C1fec86efbd54498106c508d9b57d9e2a%7C686ea1d3bc2b4c6fa92cd
> 99c5c301635%7C0%7C0%7C637740373391832133%7CUnknown%7CTWFpb
> GZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI
> 6Mn0%3D%7C3000&sdata=KmuInvkOIYTEcR4sFHhEbQSJczarvwwm8slI
> GfjCa70%3D&reserved=0> Facebook |
> <https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Ftwitter
> .com%2F%23!%2Flinaroorg&data=04%7C01%7Cpeng.fan%40nxp.com%
> 7C1fec86efbd54498106c508d9b57d9e2a%7C686ea1d3bc2b4c6fa92cd99c5c
> 301635%7C0%7C0%7C637740373391832133%7CUnknown%7CTWFpbGZsb3
> d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0
> %3D%7C3000&sdata=mS9fXmEPB1798JRJWfhEpXcbdWfRiSb5%2FH6cz7
> 9rl8E%3D&reserved=0> Twitter |
> <https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.l
> inaro.org%2Flinaro-blog%2F&data=04%7C01%7Cpeng.fan%40nxp.com%
> 7C1fec86efbd54498106c508d9b57d9e2a%7C686ea1d3bc2b4c6fa92cd99c5c
> 301635%7C0%7C0%7C637740373391832133%7CUnknown%7CTWFpbGZsb3
> d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0
> %3D%7C3000&sdata=%2BlsiYye7ZBW8jClBsZbSHkcbD0hqvvvx0H9SAlUV
> e7U%3D&reserved=0> Blog
Powered by blists - more mailing lists