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

Commit 10420921 authored by Benjamin Herrenschmidt's avatar Benjamin Herrenschmidt
Browse files

Merge branch 'merge' into next

Merge recent fixes to lparcfg so subsequent patches can move
the whole file to arch/powerpc/platforms/pseries
parents 13906db6 d220980b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -999,6 +999,7 @@ config RELOCATABLE
	  must live at a different physical address than the primary
	  kernel.

# This value must have zeroes in the bottom 60 bits otherwise lots will break
config PAGE_OFFSET
	hex
	default "0xc000000000000000"
+10 −0
Original line number Diff line number Diff line
@@ -211,9 +211,19 @@ extern long long virt_phys_offset;
#define __va(x) ((void *)(unsigned long)((phys_addr_t)(x) + VIRT_PHYS_OFFSET))
#define __pa(x) ((unsigned long)(x) - VIRT_PHYS_OFFSET)
#else
#ifdef CONFIG_PPC64
/*
 * gcc miscompiles (unsigned long)(&static_var) - PAGE_OFFSET
 * with -mcmodel=medium, so we use & and | instead of - and + on 64-bit.
 */
#define __va(x) ((void *)(unsigned long)((phys_addr_t)(x) | PAGE_OFFSET))
#define __pa(x) ((unsigned long)(x) & 0x0fffffffffffffffUL)

#else /* 32-bit, non book E */
#define __va(x) ((void *)(unsigned long)((phys_addr_t)(x) + PAGE_OFFSET - MEMORY_START))
#define __pa(x) ((unsigned long)(x) - PAGE_OFFSET + MEMORY_START)
#endif
#endif

/*
 * Unfortunately the PLT is in the BSS in the PPC32 ELF ABI,
+9 −13
Original line number Diff line number Diff line
@@ -35,7 +35,13 @@
#include <asm/vdso_datapage.h>
#include <asm/vio.h>
#include <asm/mmu.h>
#include <asm/machdep.h>


/*
 * This isn't a module but we expose that to userspace
 * via /proc so leave the definitions here
 */
#define MODULE_VERS "1.9"
#define MODULE_NAME "lparcfg"

@@ -419,7 +425,8 @@ static void parse_em_data(struct seq_file *m)
{
	unsigned long retbuf[PLPAR_HCALL_BUFSIZE];

	if (plpar_hcall(H_GET_EM_PARMS, retbuf) == H_SUCCESS)
	if (firmware_has_feature(FW_FEATURE_LPAR) &&
	    plpar_hcall(H_GET_EM_PARMS, retbuf) == H_SUCCESS)
		seq_printf(m, "power_mode_data=%016lx\n", retbuf[0]);
}

@@ -679,7 +686,6 @@ static int lparcfg_open(struct inode *inode, struct file *file)
}

static const struct file_operations lparcfg_fops = {
	.owner		= THIS_MODULE,
	.read		= seq_read,
	.write		= lparcfg_write,
	.open		= lparcfg_open,
@@ -701,14 +707,4 @@ static int __init lparcfg_init(void)
	}
	return 0;
}

static void __exit lparcfg_cleanup(void)
{
	remove_proc_subtree("powerpc/lparcfg", NULL);
}

module_init(lparcfg_init);
module_exit(lparcfg_cleanup);
MODULE_DESCRIPTION("Interface for LPAR configuration data");
MODULE_AUTHOR("Dave Engebretsen");
MODULE_LICENSE("GPL");
machine_device_initcall(pseries, lparcfg_init);
+2 −2
Original line number Diff line number Diff line
@@ -341,8 +341,8 @@ void hvsilib_establish(struct hvsi_priv *pv)

	pr_devel("HVSI@%x:   ... waiting handshake\n", pv->termno);

	/* Try for up to 200s */
	for (timeout = 0; timeout < 20; timeout++) {
	/* Try for up to 400ms */
	for (timeout = 0; timeout < 40; timeout++) {
		if (pv->established)
			goto established;
		if (!hvsi_get_packet(pv))