Re: [PATCH 2/2] module: fix building stats for 32-bit targets

Luis Chamberlain
2023-04-17T23:28:37Z

On Tue, Apr 18, 2023 at 12:49:29AM +0200, Arnd Bergmann wrote:
> On Tue, Apr 18, 2023, at 00:15, Luis Chamberlain wrote:
> > On Tue, Apr 18, 2023 at 12:02:47AM +0200, Arnd Bergmann wrote:
> >> I have no idea if there is a risk of these variables actually
> >> overflowing 'long' on 32-bit machines. If they provably can't, it
> >> would be better to do the opposite patch.
> >
> > I had originally used atomic64_t and added a debugfs knob for it but
> > Linus had advised against it because its not a stat we care too much
> > on 32-bit and atomic64 is nasty on 32-bit [0].
> >
> > So I went with atomic_long and the cast becuase we're just reading.
> >
> > Is there a way to fix this without doing the fully jump? If not oh well.
>
> I've sent a v2 now that does it the other way round, which is
> clearly much more efficient. Have only done minimal build testing
> so far, but it passes the randconfigs that failed before.

Thanks! You're too fast.

Luis