Skip to content

Commit

Permalink
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/gi…
Browse files Browse the repository at this point in the history
…t/kyle/parisc-2.6

* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6:
  [PARISC] make ptr_to_pide() static
  [PARISC] head.S: section mismatch fixes
  [PARISC] add back Crestone Peak cpu
  [PARISC] futex: special case cmpxchg NULL in kernel space
  [PARISC] clean up show_stack
  [PARISC] add pa8900 CPUs to hardware inventory
  [PARISC] clean up include/asm-parisc/elf.h
  [PARISC] move defconfig to arch/parisc/configs/
  [PARISC] add back AD1889 MAINTAINERS entry
  [PARISC] pdc_console: fix bizarre panic on boot
  [PARISC] dump_stack in show_regs
  [PARISC] pdc_stable: fix compile errors
  [PARISC] remove unused pdc_iodc_printf function
  [PARISC] bump __NR_syscalls
  [PARISC] unbreak pgalloc.h
  [PARISC] move VMALLOC_* definitions to fixmap.h
  [PARISC] wire up timerfd syscalls
  [PARISC] remove old timerfd syscall
  • Loading branch information
Linus Torvalds committed Mar 16, 2008
2 parents 9a9e0d6 + 56ee0cf commit 69d1d52
Show file tree
Hide file tree
Showing 18 changed files with 125 additions and 65 deletions.
9 changes: 9 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,15 @@ L: linux-acpi@vger.kernel.org
W: http://www.lesswatts.org/projects/acpi/
S: Maintained

AD1889 ALSA SOUND DRIVER
P: Kyle McMartin
M: kyle@parisc-linux.org
P: Thibaut Varene
M: T-Bone@parisc-linux.org
W: http://wiki.parisc-linux.org/AD1889
L: linux-parisc@vger.kernel.org
S: Maintained

ADM1025 HARDWARE MONITOR DRIVER
P: Jean Delvare
M: khali@linux-fr.org
Expand Down
3 changes: 3 additions & 0 deletions arch/parisc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
# Modified for PA-RISC Linux by Paul Lahaie, Alex deVries,
# Mike Shaver, Helge Deller and Martin K. Petersen
#

KBUILD_DEFCONFIG := default_defconfig

NM = sh $(srctree)/arch/parisc/nm
CHECKFLAGS += -D__hppa__=1

Expand Down
File renamed without changes.
27 changes: 17 additions & 10 deletions arch/parisc/kernel/firmware.c
Original file line number Diff line number Diff line change
Expand Up @@ -1080,6 +1080,9 @@ void pdc_io_reset_devices(void)
spin_unlock_irqrestore(&pdc_lock, flags);
}

/* locked by pdc_console_lock */
static int __attribute__((aligned(8))) iodc_retbuf[32];
static char __attribute__((aligned(64))) iodc_dbuf[4096];

/**
* pdc_iodc_print - Console print using IODC.
Expand All @@ -1091,24 +1094,20 @@ void pdc_io_reset_devices(void)
* Since the HP console requires CR+LF to perform a 'newline', we translate
* "\n" to "\r\n".
*/
int pdc_iodc_print(unsigned char *str, unsigned count)
int pdc_iodc_print(const unsigned char *str, unsigned count)
{
/* XXX Should we spinlock posx usage */
static int posx; /* for simple TAB-Simulation... */
int __attribute__((aligned(8))) iodc_retbuf[32];
char __attribute__((aligned(64))) iodc_dbuf[4096];
unsigned int i;
unsigned long flags;

memset(iodc_dbuf, 0, 4096);
for (i = 0; i < count && i < 2048;) {
for (i = 0; i < count && i < 79;) {
switch(str[i]) {
case '\n':
iodc_dbuf[i+0] = '\r';
iodc_dbuf[i+1] = '\n';
i += 2;
posx = 0;
break;
goto print;
case '\t':
while (posx & 7) {
iodc_dbuf[i] = ' ';
Expand All @@ -1124,6 +1123,16 @@ int pdc_iodc_print(unsigned char *str, unsigned count)
}
}

/* if we're at the end of line, and not already inserting a newline,
* insert one anyway. iodc console doesn't claim to support >79 char
* lines. don't account for this in the return value.
*/
if (i == 79 && iodc_dbuf[i-1] != '\n') {
iodc_dbuf[i+0] = '\r';
iodc_dbuf[i+1] = '\n';
}

print:
spin_lock_irqsave(&pdc_lock, flags);
real32_call(PAGE0->mem_cons.iodc_io,
(unsigned long)PAGE0->mem_cons.hpa, ENTRY_IO_COUT,
Expand All @@ -1142,11 +1151,9 @@ int pdc_iodc_print(unsigned char *str, unsigned count)
*/
int pdc_iodc_getc(void)
{
unsigned long flags;
static int __attribute__((aligned(8))) iodc_retbuf[32];
static char __attribute__((aligned(64))) iodc_dbuf[4096];
int ch;
int status;
unsigned long flags;

/* Bail if no console input device. */
if (!PAGE0->mem_kbd.iodc_io)
Expand Down
13 changes: 12 additions & 1 deletion arch/parisc/kernel/hardware.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,18 @@ static struct hp_hardware hp_hardware_list[] __devinitdata = {
{HPHW_NPROC,0x887,0x4,0x91,"Storm Peak Slow"},
{HPHW_NPROC,0x888,0x4,0x91,"Storm Peak Fast DC-"},
{HPHW_NPROC,0x889,0x4,0x91,"Storm Peak Fast"},
{HPHW_NPROC,0x88A,0x4,0x91,"Crestone Peak"},
{HPHW_NPROC,0x88A,0x4,0x91,"Crestone Peak Slow"},
{HPHW_NPROC,0x88C,0x4,0x91,"Orca Mako+"},
{HPHW_NPROC,0x88D,0x4,0x91,"Rainier/Medel Mako+ Slow"},
{HPHW_NPROC,0x88E,0x4,0x91,"Rainier/Medel Mako+ Fast"},
{HPHW_NPROC,0x894,0x4,0x91,"Mt. Hamilton Fast Mako+"},
{HPHW_NPROC,0x895,0x4,0x91,"Storm Peak Slow Mako+"},
{HPHW_NPROC,0x896,0x4,0x91,"Storm Peak Fast Mako+"},
{HPHW_NPROC,0x897,0x4,0x91,"Storm Peak DC- Slow Mako+"},
{HPHW_NPROC,0x898,0x4,0x91,"Storm Peak DC- Fast Mako+"},
{HPHW_NPROC,0x899,0x4,0x91,"Mt. Hamilton Slow Mako+"},
{HPHW_NPROC,0x89B,0x4,0x91,"Crestone Peak Mako+ Slow"},
{HPHW_NPROC,0x89C,0x4,0x91,"Crestone Peak Mako+ Fast"},
{HPHW_A_DIRECT, 0x004, 0x0000D, 0x00, "Arrakis MUX"},
{HPHW_A_DIRECT, 0x005, 0x0000D, 0x00, "Dyun Kiuh MUX"},
{HPHW_A_DIRECT, 0x006, 0x0000D, 0x00, "Baat Kiuh AP/MUX (40299B)"},
Expand Down
7 changes: 4 additions & 3 deletions arch/parisc/kernel/head.S
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,19 @@
#include <asm/pgtable.h>

#include <linux/linkage.h>
#include <linux/init.h>

.level LEVEL

.data
__INITDATA
ENTRY(boot_args)
.word 0 /* arg0 */
.word 0 /* arg1 */
.word 0 /* arg2 */
.word 0 /* arg3 */
END(boot_args)

.text
.section .text.head
.align 4
.import init_thread_union,data
.import fault_vector_20,code /* IVA parisc 2.0 32 bit */
Expand Down Expand Up @@ -343,7 +344,7 @@ smp_slave_stext:
ENDPROC(stext)

#ifndef CONFIG_64BIT
.data
.section .data.read_mostly

.align 4
.export $global$,data
Expand Down
30 changes: 16 additions & 14 deletions arch/parisc/kernel/pdc_cons.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,28 +52,30 @@
#include <linux/tty.h>
#include <asm/pdc.h> /* for iodc_call() proto and friends */

static spinlock_t pdc_console_lock = SPIN_LOCK_UNLOCKED;

static void pdc_console_write(struct console *co, const char *s, unsigned count)
{
pdc_iodc_print(s, count);
int i = 0;
unsigned long flags;

spin_lock_irqsave(&pdc_console_lock, flags);
do {
i += pdc_iodc_print(s + i, count - i);
} while (i < count);
spin_unlock_irqrestore(&pdc_console_lock, flags);
}

void pdc_printf(const char *fmt, ...)
int pdc_console_poll_key(struct console *co)
{
va_list args;
char buf[1024];
int i, len;

va_start(args, fmt);
len = vscnprintf(buf, sizeof(buf), fmt, args);
va_end(args);
int c;
unsigned long flags;

pdc_iodc_print(buf, len);
}
spin_lock_irqsave(&pdc_console_lock, flags);
c = pdc_iodc_getc();
spin_unlock_irqrestore(&pdc_console_lock, flags);

int pdc_console_poll_key(struct console *co)
{
return pdc_iodc_getc();
return c;
}

static int pdc_console_setup(struct console *co, char *options)
Expand Down
5 changes: 4 additions & 1 deletion arch/parisc/kernel/syscall_table.S
Original file line number Diff line number Diff line change
Expand Up @@ -401,9 +401,12 @@
ENTRY_COMP(kexec_load) /* 300 */
ENTRY_COMP(utimensat)
ENTRY_COMP(signalfd)
ENTRY_COMP(timerfd)
ENTRY_SAME(ni_syscall) /* was timerfd */
ENTRY_SAME(eventfd)
ENTRY_COMP(fallocate) /* 305 */
ENTRY_SAME(timerfd_create)
ENTRY_COMP(timerfd_settime)
ENTRY_COMP(timerfd_gettime)

/* Nothing yet */

Expand Down
25 changes: 22 additions & 3 deletions arch/parisc/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@
DEFINE_SPINLOCK(pa_dbit_lock);
#endif

void parisc_show_stack(struct task_struct *t, unsigned long *sp,
struct pt_regs *regs);

static int printbinary(char *buf, unsigned long x, int nbits)
{
unsigned long mask = 1UL << (nbits - 1);
Expand Down Expand Up @@ -148,6 +151,8 @@ void show_regs(struct pt_regs *regs)
print_symbol(" IAOQ[1]: %s\n", regs->iaoq[1]);
printk(level);
print_symbol(" RP(r2): %s\n", regs->gr[2]);

parisc_show_stack(current, NULL, regs);
}


Expand Down Expand Up @@ -181,11 +186,19 @@ static void do_show_stack(struct unwind_frame_info *info)
printk("\n");
}

void show_stack(struct task_struct *task, unsigned long *s)
void parisc_show_stack(struct task_struct *task, unsigned long *sp,
struct pt_regs *regs)
{
struct unwind_frame_info info;
struct task_struct *t;

t = task ? task : current;
if (regs) {
unwind_frame_init(&info, t, regs);
goto show_stack;
}

if (!task) {
if (t == current) {
unsigned long sp;

HERE:
Expand All @@ -201,12 +214,18 @@ void show_stack(struct task_struct *task, unsigned long *s)
unwind_frame_init(&info, current, &r);
}
} else {
unwind_frame_init_from_blocked_task(&info, task);
unwind_frame_init_from_blocked_task(&info, t);
}

show_stack:
do_show_stack(&info);
}

void show_stack(struct task_struct *t, unsigned long *sp)
{
return parisc_show_stack(t, sp, NULL);
}

int is_valid_bugaddr(unsigned long iaoq)
{
return 1;
Expand Down
6 changes: 3 additions & 3 deletions drivers/parisc/pdc_stable.c
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ static ssize_t pdcs_autoboot_write(struct kobject *kobj,
struct kobj_attribute *attr,
const char *buf, size_t count)
{
return pdcs_auto_write(kset, attr, buf, count, PF_AUTOBOOT);
return pdcs_auto_write(kobj, attr, buf, count, PF_AUTOBOOT);
}

/**
Expand All @@ -845,7 +845,7 @@ static ssize_t pdcs_autosearch_write(struct kobject *kobj,
struct kobj_attribute *attr,
const char *buf, size_t count)
{
return pdcs_auto_write(kset, attr, buf, count, PF_AUTOSEARCH);
return pdcs_auto_write(kobj, attr, buf, count, PF_AUTOSEARCH);
}

/**
Expand Down Expand Up @@ -1066,7 +1066,7 @@ pdc_stable_init(void)
}

/* Don't forget the root entries */
error = sysfs_create_group(stable_kobj, pdcs_attr_group);
error = sysfs_create_group(stable_kobj, &pdcs_attr_group);

/* register the paths kset as a child of the stable kset */
paths_kset = kset_create_and_add("paths", NULL, stable_kobj);
Expand Down
4 changes: 2 additions & 2 deletions drivers/parisc/sba_iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,8 @@ sba_dump_sg( struct ioc *ioc, struct scatterlist *startsg, int nents)
#define RESMAP_MASK(n) (~0UL << (BITS_PER_LONG - (n)))
#define RESMAP_IDX_MASK (sizeof(unsigned long) - 1)

unsigned long ptr_to_pide(struct ioc *ioc, unsigned long *res_ptr,
unsigned int bitshiftcnt)
static unsigned long ptr_to_pide(struct ioc *ioc, unsigned long *res_ptr,
unsigned int bitshiftcnt)
{
return (((unsigned long)res_ptr - (unsigned long)ioc->res_map) << 3)
+ bitshiftcnt;
Expand Down
22 changes: 10 additions & 12 deletions include/asm-parisc/elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ typedef struct elf64_fdesc {
/*
* The following definitions are those for 32-bit ELF binaries on a 32-bit
* kernel and for 64-bit binaries on a 64-bit kernel. To run 32-bit binaries
* on a 64-bit kernel, arch/parisc64/kernel/binfmt_elf32.c defines these
* on a 64-bit kernel, arch/parisc/kernel/binfmt_elf32.c defines these
* macros appropriately and then #includes binfmt_elf.c, which then includes
* this file.
*/
Expand All @@ -216,26 +216,25 @@ typedef struct elf64_fdesc {
* Note that this header file is used by default in fs/binfmt_elf.c. So
* the following macros are for the default case. However, for the 64
* bit kernel we also support 32 bit parisc binaries. To do that
* arch/parisc64/kernel/binfmt_elf32.c defines its own set of these
* arch/parisc/kernel/binfmt_elf32.c defines its own set of these
* macros, and then it includes fs/binfmt_elf.c to provide an alternate
* elf binary handler for 32 bit binaries (on the 64 bit kernel).
*/
#ifdef CONFIG_64BIT
#define ELF_CLASS ELFCLASS64
#define ELF_CLASS ELFCLASS64
#else
#define ELF_CLASS ELFCLASS32
#endif

typedef unsigned long elf_greg_t;

/* This yields a string that ld.so will use to load implementation
specific libraries for optimization. This is more specific in
intent than poking at uname or /proc/cpuinfo.
For the moment, we have only optimizations for the Intel generations,
but that could change... */
/*
* This yields a string that ld.so will use to load implementation
* specific libraries for optimization. This is more specific in
* intent than poking at uname or /proc/cpuinfo.
*/

#define ELF_PLATFORM ("PARISC\0" /*+((boot_cpu_data.x86-3)*5) */)
#define ELF_PLATFORM ("PARISC\0")

#define SET_PERSONALITY(ex, ibcs2) \
current->personality = PER_LINUX; \
Expand Down Expand Up @@ -310,7 +309,7 @@ struct pt_regs; /* forward declaration... */
#define ELF_OSABI ELFOSABI_LINUX

/* %r23 is set by ld.so to a pointer to a function which might be
registered using atexit. This provides a mean for the dynamic
registered using atexit. This provides a means for the dynamic
linker to call DT_FINI functions for shared libraries that have
been loaded before the code runs.
Expand Down Expand Up @@ -339,6 +338,5 @@ struct pt_regs; /* forward declaration... */
but it's not easy, and we've already done it here. */

#define ELF_HWCAP 0
/* (boot_cpu_data.x86_capability) */

#endif
9 changes: 8 additions & 1 deletion include/asm-parisc/fixmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,11 @@
#define KERNEL_MAP_START (GATEWAY_PAGE_SIZE)
#define KERNEL_MAP_END (TMPALIAS_MAP_START)

#endif
#ifndef __ASSEMBLY__
extern void *vmalloc_start;
#define PCXL_DMA_MAP_SIZE (8*1024*1024)
#define VMALLOC_START ((unsigned long)vmalloc_start)
#define VMALLOC_END (KERNEL_MAP_END)
#endif /*__ASSEMBLY__*/

#endif /*_ASM_FIXMAP_H*/
10 changes: 8 additions & 2 deletions include/asm-parisc/futex.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval)
int err = 0;
int uval;

/* futex.c wants to do a cmpxchg_inatomic on kernel NULL, which is
* our gateway page, and causes no end of trouble...
*/
if (segment_eq(KERNEL_DS, get_fs()) && !uaddr)
return -EFAULT;

if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int)))
return -EFAULT;

Expand All @@ -67,5 +73,5 @@ futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval)
return uval;
}

#endif
#endif
#endif /*__KERNEL__*/
#endif /*_ASM_PARISC_FUTEX_H*/
Loading

0 comments on commit 69d1d52

Please sign in to comment.