On Tue, 2025-07-29 at 00:04 +0800, Tiwei Bie wrote:
> > > +++ b/arch/um/include/asm/spinlock.h
> > > @@ -0,0 +1,8 @@
> > > +/* SPDX-License-Identifier: GPL-2.0 */
> > > +#ifndef __ASM_UM_SPINLOCK_H
> > > +#define __ASM_UM_SPINLOCK_H
> > > +
> > > +#include <asm/processor.h>
> > > +#include <asm-generic/spinlock.h>
> > > +
> > > +#endif /* __ASM_UM_SPINLOCK_H */
> > 
> > Do we need this file? Maybe asm-generic should be including the right
> > things it needs?
> 
> I added this file to include asm/processor.h; otherwise, there would be
> a lot of compilation errors. Other architectures seem to do the same:
> 
> $ grep -r asm/processor.h arch/ | grep asm/spinlock.h
> arch/arm/include/asm/spinlock.h:#include <asm/processor.h>
> arch/alpha/include/asm/spinlock.h:#include <asm/processor.h>
> arch/arc/include/asm/spinlock.h:#include <asm/processor.h>
> arch/hexagon/include/asm/spinlock.h:#include <asm/processor.h>
> arch/parisc/include/asm/spinlock.h:#include <asm/processor.h>
> arch/x86/include/asm/spinlock.h:#include <asm/processor.h>
> arch/s390/include/asm/spinlock.h:#include <asm/processor.h>
> arch/mips/include/asm/spinlock.h:#include <asm/processor.h>
> arch/loongarch/include/asm/spinlock.h:#include <asm/processor.h>

Except for loongarch they all do something else too though. Feels to me
um (and loongarch) really shouldn't need that file.

> > I feel like probably this should at least for now be mutually exclusive
> > with time-travel= parameters, at least if it's not 1? Or perhaps only
> > with time-travel=ext?
> 
> Currently, the UML_TIME_TRAVEL_SUPPORT option depends on !SMP:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/um/Kconfig?h=v6.16#n218
> 
> so they can't be enabled at the same time during build.

Oops, sorry, missed that. Good. I didn't see anything particularly wrong
in the time code, but I'm sure it won't work there :)

johannes

Reply via email to