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

 - A fix for a CMA change that broke booting guests with > 2G RAM on
   Power8 hosts.

 - Fix the RTAS call filter to allow a special case that applications
   rely on.

 - A change to our execve path, to make the execve syscall exit
   tracepoint work.

 - Three fixes to wire up our various RNGs earlier in boot so they're
   available for use in the initial seeding in random_init().

 - A build fix for when KASAN is enabled along with
   STRUCTLEAK_BYREF_ALL.

Thanks to Andrew Donnellan, Aneesh Kumar K.V, Christophe Leroy, Jason
Donenfeld, Nathan Lynch, Naveen N. Rao, Sathvika Vasireddy, Sumit
Dubey2, Tyrel Datwyler, and Zi Yan.

* tag 'powerpc-5.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
  powerpc/powernv: wire up rng during setup_arch
  powerpc/prom_init: Fix build failure with GCC_PLUGIN_STRUCTLEAK_BYREF_ALL and KASAN
  powerpc/rtas: Allow ibm,platform-dump RTAS call with null buffer address
  powerpc: Enable execve syscall exit tracepoint
  powerpc/pseries: wire up rng during setup_arch()
  powerpc/microwatt: wire up rng during setup_arch()
  powerpc/mm: Move CMA reservations after initmem_init()
parents 393ed5d8 f3eac426
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1855,7 +1855,7 @@ void start_thread(struct pt_regs *regs, unsigned long start, unsigned long sp)
		tm_reclaim_current(0);
#endif

	memset(regs->gpr, 0, sizeof(regs->gpr));
	memset(&regs->gpr[1], 0, sizeof(regs->gpr) - sizeof(regs->gpr[0]));
	regs->ctr = 0;
	regs->link = 0;
	regs->xer = 0;
+1 −1
Original line number Diff line number Diff line
@@ -2302,7 +2302,7 @@ static void __init prom_init_stdout(void)

static int __init prom_find_machine_type(void)
{
	char compat[256];
	static char compat[256] __prombss;
	int len, i = 0;
#ifdef CONFIG_PPC64
	phandle rtas;
+10 −1
Original line number Diff line number Diff line
@@ -1071,7 +1071,7 @@ static struct rtas_filter rtas_filters[] __ro_after_init = {
	{ "get-time-of-day", -1, -1, -1, -1, -1 },
	{ "ibm,get-vpd", -1, 0, -1, 1, 2 },
	{ "ibm,lpar-perftools", -1, 2, 3, -1, -1 },
	{ "ibm,platform-dump", -1, 4, 5, -1, -1 },
	{ "ibm,platform-dump", -1, 4, 5, -1, -1 },		/* Special cased */
	{ "ibm,read-slot-reset-state", -1, -1, -1, -1, -1 },
	{ "ibm,scan-log-dump", -1, 0, 1, -1, -1 },
	{ "ibm,set-dynamic-indicator", -1, 2, -1, -1, -1 },
@@ -1120,6 +1120,15 @@ static bool block_rtas_call(int token, int nargs,
				size = 1;

			end = base + size - 1;

			/*
			 * Special case for ibm,platform-dump - NULL buffer
			 * address is used to indicate end of dump processing
			 */
			if (!strcmp(f->name, "ibm,platform-dump") &&
			    base == 0)
				return false;

			if (!in_rmo_buf(base, end))
				goto err;
		}
+7 −6
Original line number Diff line number Diff line
@@ -935,12 +935,6 @@ void __init setup_arch(char **cmdline_p)
	/* Print various info about the machine that has been gathered so far. */
	print_system_info();

	/* Reserve large chunks of memory for use by CMA for KVM. */
	kvm_cma_reserve();

	/*  Reserve large chunks of memory for us by CMA for hugetlb */
	gigantic_hugetlb_cma_reserve();

	klp_init_thread_info(&init_task);

	setup_initial_init_mm(_stext, _etext, _edata, _end);
@@ -955,6 +949,13 @@ void __init setup_arch(char **cmdline_p)

	initmem_init();

	/*
	 * Reserve large chunks of memory for use by CMA for KVM and hugetlb. These must
	 * be called after initmem_init(), so that pageblock_order is initialised.
	 */
	kvm_cma_reserve();
	gigantic_hugetlb_cma_reserve();

	early_memtest(min_low_pfn << PAGE_SHIFT, max_low_pfn << PAGE_SHIFT);

	if (ppc_md.setup_arch)
+7 −0
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _MICROWATT_H
#define _MICROWATT_H

void microwatt_rng_init(void);

#endif /* _MICROWATT_H */
Loading