From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Ellerman Subject: Re: [PATCH v3 3/6] powerpc: move spinlock implementation to simple_spinlock Date: Thu, 09 Jul 2020 20:15:51 +1000 Message-ID: <87a709vvs8.fsf@mpe.ellerman.id.au> References: <20200706043540.1563616-1-npiggin@gmail.com> <20200706043540.1563616-4-npiggin@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: In-Reply-To: <20200706043540.1563616-4-npiggin@gmail.com> Sender: linux-arch-owner@vger.kernel.org To: linuxppc-dev@lists.ozlabs.org Cc: Nicholas Piggin , Will Deacon , Peter Zijlstra , Boqun Feng , Ingo Molnar , Waiman Long , Anton Blanchard , linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, kvm-ppc@vger.kernel.org, linux-arch@vger.kernel.org List-Id: virtualization@lists.linuxfoundation.org Nicholas Piggin writes: > To prepare for queued spinlocks. This is a simple rename except to update > preprocessor guard name and a file reference. > > Signed-off-by: Nicholas Piggin > --- > arch/powerpc/include/asm/simple_spinlock.h | 292 ++++++++++++++++++ > .../include/asm/simple_spinlock_types.h | 21 ++ > arch/powerpc/include/asm/spinlock.h | 285 +---------------- > arch/powerpc/include/asm/spinlock_types.h | 12 +- > 4 files changed, 315 insertions(+), 295 deletions(-) > create mode 100644 arch/powerpc/include/asm/simple_spinlock.h > create mode 100644 arch/powerpc/include/asm/simple_spinlock_types.h > > diff --git a/arch/powerpc/include/asm/simple_spinlock.h b/arch/powerpc/include/asm/simple_spinlock.h > new file mode 100644 > index 000000000000..e048c041c4a9 > --- /dev/null > +++ b/arch/powerpc/include/asm/simple_spinlock.h > @@ -0,0 +1,292 @@ > +/* SPDX-License-Identifier: GPL-2.0-or-later */ > +#ifndef __ASM_SIMPLE_SPINLOCK_H > +#define __ASM_SIMPLE_SPINLOCK_H _ASM_POWERPC_SIMPLE_SPINLOCK_H > +#ifdef __KERNEL__ Shouldn't be necessary. > +/* > + * Simple spin lock operations. > + * > + * Copyright (C) 2001-2004 Paul Mackerras , IBM > + * Copyright (C) 2001 Anton Blanchard , IBM > + * Copyright (C) 2002 Dave Engebretsen , IBM > + * Rework to support virtual processors > + * > + * Type of int is used as a full 64b word is not necessary. > + * > + * (the type definitions are in asm/simple_spinlock_types.h) > + */ > +#include > +#include > +#ifdef CONFIG_PPC64 > +#include > +#endif I don't think paca.h needs a CONFIG_PPC64 guard, it contains one. I know you're just moving the code, but still nice to cleanup slightly along the way. cheers