Re: [for-next][PATCH 2/2] atomic64: Use arch_spin_locks instead of raw_spin_locks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 22 Jan 2025 18:57:01 +0100
Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:

> If I followed the maze right, then I get something like:
> 
> raw_spin_lock_irqsave(lock, flags)
>   local_irq_save(flags);
>   preempt_disable();
>   arch_spin_lock(lock);
>   mmiowb_spin_lock();
> 
> 
> And here you leave out that preempt_disable() and mmiowb stuff. The
> former is fine because local_irq_save() already makes things
> non-preemptible and there are no irq-state games. The mmiowb thing is
> fine because nothing inside this critical section cares about mmio.

Ah, yeah. OK, I don't plan on adding the preempt_disable() either as again,
this is really just an emulation of atomic64 for architectures that do not
support it.

I'll resend this with an updated change log.

Thanks for the review.

-- Steve




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux