Commit a78d7dce authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull powerpc fixes from Michael Ellerman:

 - Fix a deadlock in the powerpc qspinlock MCS queue logic

 - Fix the return type of pgd_val() to not truncate 64-bit PTEs on 85xx

 - Allow the check for dynamic relocations in the VDSO to work correctly

 - Make mmu_pte_psize static to fix a build error

Thanks to Christophe Leroy, Nysal Jan K.A., Nicholas Piggin, Geetika
Moolchandani, Jijo Varghese, and Vaishnavi Bhat.

* tag 'powerpc-6.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
  powerpc/qspinlock: Fix deadlock in MCS queue
  powerpc/mm: Fix return type of pgd_val()
  powerpc/vdso: Don't discard rela sections
  powerpc/64e: Define mmu_pte_psize static
parents d45111e5 734ad0af
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@
#define USER_PTRS_PER_PGD	(TASK_SIZE / PGDIR_SIZE)

#define pgd_ERROR(e) \
	pr_err("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, pgd_val(e))
	pr_err("%s:%d: bad pgd %08llx.\n", __FILE__, __LINE__, (unsigned long long)pgd_val(e))

/*
 * This is the bottom of the PKMAP area with HIGHMEM or an arbitrary
@@ -170,7 +170,7 @@ static inline void pmd_clear(pmd_t *pmdp)
#define pmd_pfn(pmd)		(pmd_val(pmd) >> PAGE_SHIFT)
#else
#define pmd_page_vaddr(pmd)	\
	((const void *)(pmd_val(pmd) & ~(PTE_TABLE_SIZE - 1)))
	((const void *)((unsigned long)pmd_val(pmd) & ~(PTE_TABLE_SIZE - 1)))
#define pmd_pfn(pmd)		(__pa(pmd_val(pmd)) >> PAGE_SHIFT)
#endif

+9 −3
Original line number Diff line number Diff line
@@ -49,16 +49,22 @@ static inline unsigned long pud_val(pud_t x)
#endif /* CONFIG_PPC64 */

/* PGD level */
#if defined(CONFIG_PPC_E500) && defined(CONFIG_PTE_64BIT)
#if defined(CONFIG_PPC_85xx) && defined(CONFIG_PTE_64BIT)
typedef struct { unsigned long long pgd; } pgd_t;

static inline unsigned long long pgd_val(pgd_t x)
{
	return x.pgd;
}
#else
typedef struct { unsigned long pgd; } pgd_t;
#endif
#define __pgd(x)	((pgd_t) { (x) })

static inline unsigned long pgd_val(pgd_t x)
{
	return x.pgd;
}
#endif
#define __pgd(x)	((pgd_t) { (x) })

/* Page protection bits */
typedef struct { unsigned long pgprot; } pgprot_t;
+3 −1
Original line number Diff line number Diff line
@@ -74,6 +74,8 @@ SECTIONS
	.got		: { *(.got) }			:text
	.plt		: { *(.plt) }

	.rela.dyn	: { *(.rela .rela*) }

	_end = .;
	__end = .;
	PROVIDE(end = .);
@@ -87,7 +89,7 @@ SECTIONS
		*(.branch_lt)
		*(.data .data.* .gnu.linkonce.d.* .sdata*)
		*(.bss .sbss .dynbss .dynsbss)
		*(.got1 .glink .iplt .rela*)
		*(.got1 .glink .iplt)
	}
}

+2 −2
Original line number Diff line number Diff line
@@ -69,7 +69,7 @@ SECTIONS
	.eh_frame_hdr	: { *(.eh_frame_hdr) }		:text	:eh_frame_hdr
	.eh_frame	: { KEEP (*(.eh_frame)) }	:text
	.gcc_except_table : { *(.gcc_except_table) }
	.rela.dyn ALIGN(8) : { *(.rela.dyn) }
	.rela.dyn ALIGN(8) : { *(.rela .rela*) }

	.got ALIGN(8)	: { *(.got .toc) }

@@ -86,7 +86,7 @@ SECTIONS
		*(.data .data.* .gnu.linkonce.d.* .sdata*)
		*(.bss .sbss .dynbss .dynsbss)
		*(.opd)
		*(.glink .iplt .plt .rela*)
		*(.glink .iplt .plt)
	}
}

+9 −1
Original line number Diff line number Diff line
@@ -697,7 +697,15 @@ static __always_inline void queued_spin_lock_mcs_queue(struct qspinlock *lock, b
	}

release:
	qnodesp->count--; /* release the node */
	/*
	 * Clear the lock before releasing the node, as another CPU might see stale
	 * values if an interrupt occurs after we increment qnodesp->count
	 * but before node->lock is initialized. The barrier ensures that
	 * there are no further stores to the node after it has been released.
	 */
	node->lock = NULL;
	barrier();
	qnodesp->count--;
}

void queued_spin_lock_slowpath(struct qspinlock *lock)
Loading