Skip to content

Commit

Permalink
Merge branch 'merge' into next
Browse files Browse the repository at this point in the history
Merge recent fixes to lparcfg so subsequent patches can move
the whole file to arch/powerpc/platforms/pseries
ozbenh committed Aug 28, 2013
2 parents 13906db + d220980 commit 1042092
Showing 4 changed files with 22 additions and 15 deletions.
1 change: 1 addition & 0 deletions arch/powerpc/Kconfig
Original file line number Diff line number Diff line change
@@ -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 changes: 10 additions & 0 deletions arch/powerpc/include/asm/page.h
Original file line number Diff line number Diff line change
@@ -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,
22 changes: 9 additions & 13 deletions arch/powerpc/kernel/lparcfg.c
Original file line number Diff line number Diff line change
@@ -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);
4 changes: 2 additions & 2 deletions drivers/tty/hvc/hvsi_lib.c
Original file line number Diff line number Diff line change
@@ -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))

0 comments on commit 1042092

Please sign in to comment.