Commit 3203a08c authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull powerpc updates from Madhavan Srinivasan:

 - powerpc support for huge pfnmaps

 - Cleanups to use masked user access

 - Rework pnv_ioda_pick_m64_pe() to use better bitmap API

 - Convert powerpc to AUDIT_ARCH_COMPAT_GENERIC

 - Backup region offset update to eflcorehdr

 - Fixes for wii/ps3 platform

 - Implement JIT support for private stack in powerpc

 - Implement JIT support for fsession in powerpc64 trampoline

 - Add support for instruction array and indirect jump in powerpc

 - Misc selftest fixes and cleanups

Thanks to Abhishek Dubey, Aditya Gupta, Alex Williamson, Amit Machhiwal,
Andrew Donnellan, Bartosz Golaszewski, Cédric Le Goater, Chen Ni,
Christophe Leroy (CS GROUP), Hari Bathini, J. Neuschäfer, Mukesh Kumar
Chaurasiya (IBM), Nam Cao, Nilay Shroff, Pavithra Prakash, Randy Dunlap,
Ritesh Harjani (IBM), Shrikanth Hegde, Sourabh Jain, Vaibhav Jain,
Venkat Rao Bagalkote, and Yury Norov (NVIDIA)

* tag 'powerpc-7.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (47 commits)
  mailmap: Add entry for Andrew Donnellan
  powerpc32/bpf: fix loading fsession func metadata using PPC_LI32
  selftest/bpf: Enable gotox tests for powerpc64
  powerpc64/bpf: Add support for indirect jump
  selftest/bpf: Enable instruction array test for powerpc
  powerpc/bpf: Add support for instruction array
  powerpc32/bpf: Add fsession support
  powerpc64/bpf: Implement fsession support
  selftests/bpf: Enable private stack tests for powerpc64
  powerpc64/bpf: Implement JIT support for private stack
  powerpc: pci-ioda: Optimize pnv_ioda_pick_m64_pe()
  powerpc: pci-ioda: use bitmap_alloc() in pnv_ioda_pick_m64_pe()
  powerpc/net: Inline checksum wrappers and convert to scoped user access
  powerpc/sstep: Convert to scoped user access
  powerpc/align: Convert emulate_spe() to scoped user access
  powerpc/ptrace: Convert gpr32_set_common_user() to scoped user access
  powerpc/futex: Use masked user access
  powerpc/audit: Convert powerpc to AUDIT_ARCH_COMPAT_GENERIC
  cpuidle: powerpc: avoid double clear when breaking snooze
  powerpc/ps3: spu.c: fix enum and Return kernel-doc warnings
  ...
parents e6b162a6 b80777ae
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -75,6 +75,9 @@ Andreas Herrmann <aherrman@de.ibm.com>
Andreas Hindborg <a.hindborg@kernel.org> <a.hindborg@samsung.com>
Andrej Shadura <andrew.shadura@collabora.co.uk>
Andrej Shadura <andrew@shadura.me> <andrew@beldisplaytech.com>
Andrew Donnellan <andrew+kernel@donnellan.id.au> <andrew@donnellan.id.au>
Andrew Donnellan <andrew+kernel@donnellan.id.au> <ajd@linux.ibm.com>
Andrew Donnellan <andrew+kernel@donnellan.id.au> <andrew.donnellan@au1.ibm.com>
Andrew Morton <akpm@linux-foundation.org>
Andrew Murray <amurray@thegoodpenguin.co.uk> <amurray@embedded-bits.co.uk>
Andrew Murray <amurray@thegoodpenguin.co.uk> <andrew.murray@arm.com>
+2 −4
Original line number Diff line number Diff line
@@ -172,6 +172,7 @@ config PPC
	select ARCH_STACKWALK
	select ARCH_SUPPORTS_ATOMIC_RMW
	select ARCH_SUPPORTS_DEBUG_PAGEALLOC	if PPC_BOOK3S || PPC_8xx
	select ARCH_SUPPORTS_HUGE_PFNMAP	if PPC_BOOK3S_64 && TRANSPARENT_HUGEPAGE
	select ARCH_SUPPORTS_PAGE_TABLE_CHECK	if !HUGETLB_PAGE
	select ARCH_SUPPORTS_SCHED_MC		if SMP
	select ARCH_SUPPORTS_SCHED_SMT		if PPC64 && SMP
@@ -188,6 +189,7 @@ config PPC
	select ARCH_WANT_OPTIMIZE_DAX_VMEMMAP	if PPC_RADIX_MMU
	select ARCH_WANTS_MODULES_DATA_IN_VMALLOC	if PPC_BOOK3S_32 || PPC_8xx
	select ARCH_WEAK_RELEASE_ACQUIRE
	select AUDIT_ARCH_COMPAT_GENERIC
	select BINFMT_ELF
	select BUILDTIME_TABLE_SORT
	select CLONE_BACKWARDS
@@ -370,10 +372,6 @@ config GENERIC_TBSYNC
	bool
	default y if PPC32 && SMP

config AUDIT_ARCH
	bool
	default y

config GENERIC_BUG
	bool
	default y
+4 −4
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ chosen {
		bootargs = "root=/dev/mmcblk0p2 rootwait udbg-immortal";
	};

	memory {
	memory@0 {
		device_type = "memory";
		reg = <0x00000000 0x01800000	/* MEM1 24MB 1T-SRAM */
		       0x10000000 0x04000000>;	/* MEM2 64MB GDDR3 */
@@ -246,7 +246,7 @@ gpio-leds {
		compatible = "gpio-leds";

		/* This is the blue LED in the disk drive slot */
		drive-slot {
		led-0 {
			label = "wii:blue:drive_slot";
			gpios = <&GPIO 5 GPIO_ACTIVE_HIGH>;
			panic-indicator;
@@ -256,13 +256,13 @@ drive-slot {
	gpio-keys {
		compatible = "gpio-keys";

		power {
		button-power {
			label = "Power Button";
			gpios = <&GPIO 0 GPIO_ACTIVE_HIGH>;
			linux,code = <KEY_POWER>;
		};

		eject {
		button-eject {
			label = "Eject Button";
			gpios = <&GPIO 6 GPIO_ACTIVE_HIGH>;
			linux,code = <KEY_EJECTCD>;
+40 −3
Original line number Diff line number Diff line
@@ -107,8 +107,8 @@
 * in here, on radix we expect them to be zero.
 */
#define _HPAGE_CHG_MASK (PTE_RPN_MASK | _PAGE_HPTEFLAGS | _PAGE_DIRTY | \
			 _PAGE_ACCESSED | H_PAGE_THP_HUGE | _PAGE_PTE | \
			 _PAGE_SOFT_DIRTY)
			 _PAGE_ACCESSED | H_PAGE_THP_HUGE | _PAGE_SPECIAL | \
			 _PAGE_PTE | _PAGE_SOFT_DIRTY)
/*
 * user access blocked by key
 */
@@ -1289,6 +1289,29 @@ static inline pud_t pud_mkhuge(pud_t pud)
	return pud;
}

#ifdef CONFIG_ARCH_SUPPORTS_PMD_PFNMAP
static inline bool pmd_special(pmd_t pmd)
{
	return pte_special(pmd_pte(pmd));
}

static inline pmd_t pmd_mkspecial(pmd_t pmd)
{
	return pte_pmd(pte_mkspecial(pmd_pte(pmd)));
}
#endif

#ifdef CONFIG_ARCH_SUPPORTS_PUD_PFNMAP
static inline bool pud_special(pud_t pud)
{
	return pte_special(pud_pte(pud));
}

static inline pud_t pud_mkspecial(pud_t pud)
{
	return pte_pud(pte_mkspecial(pud_pte(pud)));
}
#endif

#define __HAVE_ARCH_PMDP_SET_ACCESS_FLAGS
extern int pmdp_set_access_flags(struct vm_area_struct *vma,
@@ -1313,12 +1336,27 @@ static inline pmd_t pmdp_huge_get_and_clear(struct mm_struct *mm,
{
	pmd_t old_pmd;

	/*
	 * Non-present PMDs can be migration entries or device-private THP
	 * entries. This can happen at 2 places:
	 * - When the address space is being unmapped zap_huge_pmd(), and we
	 *   encounter non-present pmds.
	 * - migrate_vma_collect_huge_pmd() could calls this during migration
	 *   of device-private pmd entries.
	 */
	if (!pmd_present(*pmdp)) {
		old_pmd = READ_ONCE(*pmdp);
		pmd_clear(pmdp);
		goto out;
	}

	if (radix_enabled()) {
		old_pmd = radix__pmdp_huge_get_and_clear(mm, addr, pmdp);
	} else {
		old_pmd = hash__pmdp_huge_get_and_clear(mm, addr, pmdp);
	}

out:
	page_table_check_pmd_clear(mm, addr, old_pmd);

	return old_pmd;
@@ -1400,7 +1438,6 @@ static inline bool arch_needs_pgtable_deposit(void)
		return false;
	return true;
}
extern void serialize_against_pte_lookup(struct mm_struct *mm);

#endif /* CONFIG_TRANSPARENT_HUGEPAGE */

+0 −1
Original line number Diff line number Diff line
@@ -92,7 +92,6 @@ extern void radix__flush_tlb_page_psize(struct mm_struct *mm, unsigned long vmad
#define radix__flush_tlb_page(vma,addr)	radix__local_flush_tlb_page(vma,addr)
#define radix__flush_tlb_page_psize(mm,addr,p) radix__local_flush_tlb_page_psize(mm,addr,p)
#endif
extern void radix__flush_tlb_pwc(struct mmu_gather *tlb, unsigned long addr);
extern void radix__flush_tlb_collapsed_pmd(struct mm_struct *mm, unsigned long addr);
extern void radix__flush_tlb_all(void);

Loading