Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bed38c3e authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull powerpc fixes from Michael Ellerman:
 "An assortment of non-regression fixes that have accumulated since the
  start of the merge window.

   - A fix for a user triggerable oops on machines where transactional
     memory is disabled, eg. Power9 bare metal, Power8 with TM disabled
     on the command line, or all Power7 or earlier machines.

   - Three fixes for handling of PMU and power saving registers when
     running nested KVM on Power9.

   - Two fixes for bugs found while stress testing the XIVE interrupt
     controller code, also on Power9.

   - A fix to allow guests to boot under Qemu/KVM on Power9 using the
     the Hash MMU with >= 1TB of memory.

   - Two fixes for bugs in the recent DMA cleanup, one of which could
     lead to checkstops.

   - And finally three fixes for the PAPR SCM nvdimm driver.

  Thanks to: Alexey Kardashevskiy, Andrea Arcangeli, Cédric Le Goater,
  Christoph Hellwig, David Gibson, Gautham R. Shenoy, Michael Neuling,
  Oliver O'Halloran, Satheesh Rajendran, Shawn Anastasio, Suraj Jitindar
  Singh, Vaibhav Jain"

* tag 'powerpc-5.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
  powerpc/papr_scm: Force a scm-unbind if initial scm-bind fails
  powerpc/papr_scm: Update drc_pmem_unbind() to use H_SCM_UNBIND_ALL
  powerpc/pseries: Update SCM hcall op-codes in hvcall.h
  powerpc/tm: Fix oops on sigreturn on systems without TM
  powerpc/dma: Fix invalid DMA mmap behavior
  KVM: PPC: Book3S HV: XIVE: fix rollback when kvmppc_xive_create fails
  powerpc/xive: Fix loop exit-condition in xive_find_target_in_mask()
  powerpc: fix off by one in max_zone_pfn initialization for ZONE_DMA
  KVM: PPC: Book3S HV: Save and restore guest visible PSSCR bits on pseries
  powerpc/pmu: Set pmcregs_in_use in paca when running as LPAR
  KVM: PPC: Book3S HV: Always save guest pmu for guest capable of nesting
  powerpc/mm: Limit rma_size to 1TB when running without HV mode
parents 76260774 3a855b7a
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -121,6 +121,7 @@ config PPC
	select ARCH_32BIT_OFF_T if PPC32
	select ARCH_32BIT_OFF_T if PPC32
	select ARCH_HAS_DEBUG_VIRTUAL
	select ARCH_HAS_DEBUG_VIRTUAL
	select ARCH_HAS_DEVMEM_IS_ALLOWED
	select ARCH_HAS_DEVMEM_IS_ALLOWED
	select ARCH_HAS_DMA_MMAP_PGPROT
	select ARCH_HAS_ELF_RANDOMIZE
	select ARCH_HAS_ELF_RANDOMIZE
	select ARCH_HAS_FORTIFY_SOURCE
	select ARCH_HAS_FORTIFY_SOURCE
	select ARCH_HAS_GCOV_PROFILE_ALL
	select ARCH_HAS_GCOV_PROFILE_ALL
+8 −3
Original line number Original line Diff line number Diff line
@@ -302,9 +302,14 @@
#define H_SCM_UNBIND_MEM        0x3F0
#define H_SCM_UNBIND_MEM        0x3F0
#define H_SCM_QUERY_BLOCK_MEM_BINDING 0x3F4
#define H_SCM_QUERY_BLOCK_MEM_BINDING 0x3F4
#define H_SCM_QUERY_LOGICAL_MEM_BINDING 0x3F8
#define H_SCM_QUERY_LOGICAL_MEM_BINDING 0x3F8
#define H_SCM_MEM_QUERY	        0x3FC
#define H_SCM_UNBIND_ALL        0x3FC
#define H_SCM_BLOCK_CLEAR       0x400
#define H_SCM_HEALTH            0x400
#define MAX_HCALL_OPCODE	H_SCM_BLOCK_CLEAR
#define H_SCM_PERFORMANCE_STATS 0x418
#define MAX_HCALL_OPCODE	H_SCM_PERFORMANCE_STATS

/* Scope args for H_SCM_UNBIND_ALL */
#define H_UNBIND_SCOPE_ALL (0x1)
#define H_UNBIND_SCOPE_DRC (0x2)


/* H_VIOCTL functions */
/* H_VIOCTL functions */
#define H_GET_VIOA_DUMP_SIZE	0x01
#define H_GET_VIOA_DUMP_SIZE	0x01
+2 −3
Original line number Original line Diff line number Diff line
@@ -27,11 +27,10 @@ static inline void ppc_set_pmu_inuse(int inuse)
#ifdef CONFIG_PPC_PSERIES
#ifdef CONFIG_PPC_PSERIES
		get_lppaca()->pmcregs_in_use = inuse;
		get_lppaca()->pmcregs_in_use = inuse;
#endif
#endif
	} else {
	}
#ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE
#ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE
	get_paca()->pmcregs_in_use = inuse;
	get_paca()->pmcregs_in_use = inuse;
#endif
#endif
	}
#endif
#endif
}
}


+2 −1
Original line number Original line Diff line number Diff line
@@ -49,7 +49,8 @@ obj-y := cputable.o ptrace.o syscalls.o \
				   signal.o sysfs.o cacheinfo.o time.o \
				   signal.o sysfs.o cacheinfo.o time.o \
				   prom.o traps.o setup-common.o \
				   prom.o traps.o setup-common.o \
				   udbg.o misc.o io.o misc_$(BITS).o \
				   udbg.o misc.o io.o misc_$(BITS).o \
				   of_platform.o prom_parse.o
				   of_platform.o prom_parse.o \
				   dma-common.o
obj-$(CONFIG_PPC64)		+= setup_64.o sys_ppc32.o \
obj-$(CONFIG_PPC64)		+= setup_64.o sys_ppc32.o \
				   signal_64.o ptrace32.o \
				   signal_64.o ptrace32.o \
				   paca.o nvram_64.o firmware.o
				   paca.o nvram_64.o firmware.o
+17 −0
Original line number Original line Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Contains common dma routines for all powerpc platforms.
 *
 * Copyright (C) 2019 Shawn Anastasio.
 */

#include <linux/mm.h>
#include <linux/dma-noncoherent.h>

pgprot_t arch_dma_mmap_pgprot(struct device *dev, pgprot_t prot,
		unsigned long attrs)
{
	if (!dev_is_dma_coherent(dev))
		return pgprot_noncached(prot);
	return prot;
}
Loading