Message ID | 20211201125030.2307746-1-peng.fan@oss.nxp.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/2] clocksource/drivers/imx-sysctr: mark two variable with __ro_after_init | expand |
On Wed, Dec 01, 2021 at 08:50:29PM +0800, Peng Fan (OSS) wrote: > From: Peng Fan <peng.fan@nxp.com> > > sys_ctr_base and cmpcr will not be updated after init, so mark > as __ro_after_init. > > Cc: Kees Cook <keescook@chromium.org> > Signed-off-by: Peng Fan <peng.fan@nxp.com> Always nice to get more of these. :) Reviewed-by: Kees Cook <keescook@chromium.org> Thanks! -Kees > --- > drivers/clocksource/timer-imx-sysctr.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/clocksource/timer-imx-sysctr.c b/drivers/clocksource/timer-imx-sysctr.c > index 18b90fc56bfc..2b309af11266 100644 > --- a/drivers/clocksource/timer-imx-sysctr.c > +++ b/drivers/clocksource/timer-imx-sysctr.c > @@ -20,8 +20,8 @@ > > #define SYS_CTR_CLK_DIV 0x3 > > -static void __iomem *sys_ctr_base; > -static u32 cmpcr; > +static void __iomem *sys_ctr_base __ro_after_init; > +static u32 cmpcr __ro_after_init; > > static void sysctr_timer_enable(bool enable) > { > -- > 2.25.1 >
On 01/12/2021 13:50, Peng Fan (OSS) wrote: > From: Peng Fan <peng.fan@nxp.com> > > sys_ctr_base and cmpcr will not be updated after init, so mark > as __ro_after_init. > > Cc: Kees Cook <keescook@chromium.org> > Signed-off-by: Peng Fan <peng.fan@nxp.com> > --- > drivers/clocksource/timer-imx-sysctr.c | 4 ++-- Applied, thanks
Hi Daniel, > Subject: Re: [PATCH 1/2] clocksource/drivers/imx-sysctr: mark two variable > with __ro_after_init > > On 01/12/2021 13:50, Peng Fan (OSS) wrote: > > From: Peng Fan <peng.fan@nxp.com> > > > > sys_ctr_base and cmpcr will not be updated after init, so mark as > > __ro_after_init. > > > > Cc: Kees Cook <keescook@chromium.org> > > Signed-off-by: Peng Fan <peng.fan@nxp.com> > > --- > > drivers/clocksource/timer-imx-sysctr.c | 4 ++-- > > Applied, thanks I not see this patch in your tree. https://git.linaro.org/people/daniel.lezcano/linux.git/log/?h=timers/drivers/next Thanks, Peng. > > > -- > <https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.l > inaro.org%2F&data=04%7C01%7Cpeng.fan%40nxp.com%7C380f2f0784 > d247c95a2408d9bb15f12b%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0% > 7C0%7C637746525178346096%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC > 4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000& > amp;sdata=09OwJe9RQhLb20On45Q1Pb2R%2BdvHcAmqPWRffJCkyTo%3D& > amp;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%7C380f2f0784d247c95a2408d9bb15f12b%7C686ea1d3bc2b4c6fa92cd9 > 9c5c301635%7C0%7C0%7C637746525178346096%7CUnknown%7CTWFpbG > Zsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6 > Mn0%3D%7C3000&sdata=oupiLK7WS1N%2BWKGzzNjP%2FpErz4QxIjlvC > 0xIY7s1E7Y%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% > 7C380f2f0784d247c95a2408d9bb15f12b%7C686ea1d3bc2b4c6fa92cd99c5c3 > 01635%7C0%7C0%7C637746525178346096%7CUnknown%7CTWFpbGZsb3d > 8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0% > 3D%7C3000&sdata=xepxUkFReOujXx0GAKU%2BvTFzfwjxkIwFj6UndjeOJ > gY%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% > 7C380f2f0784d247c95a2408d9bb15f12b%7C686ea1d3bc2b4c6fa92cd99c5c3 > 01635%7C0%7C0%7C637746525178356054%7CUnknown%7CTWFpbGZsb3d > 8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0% > 3D%7C3000&sdata=62SdTlTWr%2FZP2pr7gIx0fGqE30SQR0SKFbOTbPFZd > %2BQ%3D&reserved=0> Blog
On 14/12/2021 09:25, Peng Fan wrote: > Hi Daniel, > >> Subject: Re: [PATCH 1/2] clocksource/drivers/imx-sysctr: mark two variable >> with __ro_after_init >> >> On 01/12/2021 13:50, Peng Fan (OSS) wrote: >>> From: Peng Fan <peng.fan@nxp.com> >>> >>> sys_ctr_base and cmpcr will not be updated after init, so mark as >>> __ro_after_init. >>> >>> Cc: Kees Cook <keescook@chromium.org> >>> Signed-off-by: Peng Fan <peng.fan@nxp.com> >>> --- >>> drivers/clocksource/timer-imx-sysctr.c | 4 ++-- >> >> Applied, thanks > > I not see this patch in your tree. > https://git.linaro.org/people/daniel.lezcano/linux.git/log/?h=timers/drivers/next You should see it now Thanks -- Daniel
diff --git a/drivers/clocksource/timer-imx-sysctr.c b/drivers/clocksource/timer-imx-sysctr.c index 18b90fc56bfc..2b309af11266 100644 --- a/drivers/clocksource/timer-imx-sysctr.c +++ b/drivers/clocksource/timer-imx-sysctr.c @@ -20,8 +20,8 @@ #define SYS_CTR_CLK_DIV 0x3 -static void __iomem *sys_ctr_base; -static u32 cmpcr; +static void __iomem *sys_ctr_base __ro_after_init; +static u32 cmpcr __ro_after_init; static void sysctr_timer_enable(bool enable) {