[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200529211440.GX37466@atomide.com>
Date: Fri, 29 May 2020 14:14:40 -0700
From: Tony Lindgren <tony@...mide.com>
To: Arnd Bergmann <arnd@...db.de>
Cc: SoC Team <soc@...nel.org>, Olof Johansson <olof@...om.net>,
Stefan Agner <stefan@...er.ch>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
linux-omap <linux-omap@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] ARM: omap2: fix omap5_realtime_timer_init definition
* Arnd Bergmann <arnd@...db.de> [200529 21:09]:
> On Fri, May 29, 2020 at 10:44 PM Tony Lindgren <tony@...mide.com> wrote:
> >
> > * Arnd Bergmann <arnd@...db.de> [200529 20:18]:
> > > There is one more regression introduced by the last build fix:
> >
> > Argh.. I did run make randconfig for like 10 builds
> > after the last fix.
> >
> > > Address this by removing the now obsolete #ifdefs in that file and
> > > just building the entire file based on the flag that controls the
> > > omap5_realtime_timer_init function declaration.
> >
> > I think this will introduce other randconfig build failures
> > as SOC_HAS_REALTIME_COUNTER is bool in Kconfig.
>
> I did a few hundred randconfig builds with the patch and have
> not yet seen any further problems.
Ah right, it works for randconfig builds now but won't boot :)
> > We still need to call omap5_realtime_timer_init() even if
> > SOC_HAS_REALTIME_COUNTER is not set.
>
> This is what's in the header file:
>
> #ifdef CONFIG_SOC_HAS_REALTIME_COUNTER
> extern void omap5_realtime_timer_init(void);
> #else
> static inline void omap5_realtime_timer_init(void)
> {
> }
> #endif
>
> In fact, the inline stub is what that caused the regression,
> so I think it's ok with my patch.
To me it seems not having SOC_HAS_REALTIME_COUNTER will
cause omap5_realtime_timer_init() not get called?
That initializes clocks and calls timer_probe(). So this
will result in non-booting system AFAIK, the header
file stub should no rely CONFIG_SOC_HAS_REALTIME_COUNTER
also, but rather ! CONFIG_SOC_OMAP5 || CONFIG_SOC_DRA7XX.
Also the Makefile change at least seems wrong, that
can't rely on CONFIG_SOC_HAS_REALTIME_COUNTER.
Regards,
Tony
Powered by blists - more mailing lists