Skip to content

Commit 6e4ae92

Browse files
Li Zhonggregkh
authored andcommitted
powerpc/mm: Fix compile error of pgtable-ppc64.h
commit fd120dc upstream. It seems that forward declaration couldn't work well with typedef, use struct spinlock directly to avoiding following build errors: In file included from include/linux/spinlock.h:81, from include/linux/seqlock.h:35, from include/linux/time.h:5, from include/uapi/linux/timex.h:56, from include/linux/timex.h:56, from include/linux/sched.h:17, from arch/powerpc/kernel/asm-offsets.c:17: include/linux/spinlock_types.h:76: error: redefinition of typedef 'spinlock_t' /root/linux-next/arch/powerpc/include/asm/pgtable-ppc64.h:563: note: previous declaration of 'spinlock_t' was here Signed-off-by: Li Zhong <zhong@linux.vnet.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent cba4fba commit 6e4ae92

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎arch/powerpc/include/asm/pgtable-ppc64.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -560,9 +560,9 @@ extern void pmdp_invalidate(struct vm_area_struct *vma, unsigned long address,
560560
pmd_t *pmdp);
561561

562562
#define pmd_move_must_withdraw pmd_move_must_withdraw
563-
typedef struct spinlock spinlock_t;
564-
static inline int pmd_move_must_withdraw(spinlock_t *new_pmd_ptl,
565-
spinlock_t *old_pmd_ptl)
563+
struct spinlock;
564+
static inline int pmd_move_must_withdraw(struct spinlock *new_pmd_ptl,
565+
struct spinlock *old_pmd_ptl)
566566
{
567567
/*
568568
* Archs like ppc64 use pgtable to store per pmd

0 commit comments

Comments
 (0)