Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6
authorLinus Torvalds <torvalds@linux-foundation.org>
Sun, 16 Mar 2008 17:48:23 +0000 (10:48 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 16 Mar 2008 17:48:23 +0000 (10:48 -0700)
* '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

18 files changed:
MAINTAINERS
arch/parisc/Makefile
arch/parisc/configs/default_defconfig [moved from arch/parisc/defconfig with 100% similarity]
arch/parisc/kernel/firmware.c
arch/parisc/kernel/hardware.c
arch/parisc/kernel/head.S
arch/parisc/kernel/pdc_cons.c
arch/parisc/kernel/syscall_table.S
arch/parisc/kernel/traps.c
drivers/parisc/pdc_stable.c
drivers/parisc/sba_iommu.c
include/asm-parisc/elf.h
include/asm-parisc/fixmap.h
include/asm-parisc/futex.h
include/asm-parisc/pdc.h
include/asm-parisc/pgalloc.h
include/asm-parisc/pgtable.h
include/asm-parisc/unistd.h

index 0f95a4a..6d628fb 100644 (file)
@@ -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
index e574de4..5ddad7b 100644 (file)
@@ -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
 
index 4ab83d5..7177a6c 100644 (file)
@@ -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.
@@ -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] = ' ';
@@ -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,
@@ -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)
index 84b9611..f48a640 100644 (file)
@@ -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)"}, 
index a7b8859..ec2482d 100644 (file)
 #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 */
@@ -31,7 +32,7 @@ ENTRY(boot_args)
        .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 */
@@ -343,7 +344,7 @@ smp_slave_stext:
 ENDPROC(stext)
 
 #ifndef CONFIG_64BIT
-       .data
+       .section .data.read_mostly
 
        .align  4
        .export $global$,data
index 33b1f84..ccb6809 100644 (file)
 #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)
index 117438e..6b5ac38 100644 (file)
        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 */
 
index 99fd569..9dc6dc4 100644 (file)
@@ -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);
@@ -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);
 }
 
 
@@ -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:
@@ -201,12 +214,18 @@ HERE:
                        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;
index de34aa9..f9f9a5f 100644 (file)
@@ -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);
 }
 
 /**
@@ -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);
 }
 
 /**
@@ -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);
index bdbe780..8c4d2c1 100644 (file)
@@ -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;
index ce0c0d8..d0a4a82 100644 (file)
@@ -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.
  */
@@ -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; \
@@ -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.
 
@@ -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
index a5caf4b..de3fe3a 100644 (file)
 #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*/
index dbee6e6..fdc6d05 100644 (file)
@@ -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;
 
@@ -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*/
index deda8c3..9eaa794 100644 (file)
@@ -645,8 +645,7 @@ int pdc_soft_power_button(int sw_control);
 void pdc_io_reset(void);
 void pdc_io_reset_devices(void);
 int pdc_iodc_getc(void);
-int pdc_iodc_print(unsigned char *str, unsigned count);
-void pdc_printf(const char *fmt, ...);
+int pdc_iodc_print(const unsigned char *str, unsigned count);
 
 void pdc_emergency_unlock(void);
 int pdc_sti_call(unsigned long func, unsigned long flags,
index 3996dfc..fc987a1 100644 (file)
@@ -138,10 +138,10 @@ static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte)
        free_page((unsigned long)pte);
 }
 
-static inline void pte_free_kernel(struct mm_struct *mm, struct page *pte)
+static inline void pte_free(struct mm_struct *mm, struct page *pte)
 {
        pgtable_page_dtor(pte);
-       pte_free_kernel(page_address((pte));
+       pte_free_kernel(mm, page_address(pte));
 }
 
 #define check_pgt_cache()      do { } while (0)
index cd0fa4f..dc86adb 100644 (file)
 
 #define FIRST_USER_ADDRESS     0
 
-#ifndef __ASSEMBLY__
-extern  void *vmalloc_start;
-#define PCXL_DMA_MAP_SIZE   (8*1024*1024)
-#define VMALLOC_START   ((unsigned long)vmalloc_start)
-/* this is a fixmap remnant, see fixmap.h */
-#define VMALLOC_END    (KERNEL_MAP_END)
-#endif
-
 /* NB: The tlb miss handlers make certain assumptions about the order */
 /*     of the following bits, so be careful (One example, bits 25-31  */
 /*     are moved together in one instruction).                        */
index 081b4ae..a7d857f 100644 (file)
 #define __NR_timerfd           (__NR_Linux + 303)
 #define __NR_eventfd           (__NR_Linux + 304)
 #define __NR_fallocate         (__NR_Linux + 305)
+#define __NR_timerfd_create    (__NR_Linux + 306)
+#define __NR_timerfd_settime   (__NR_Linux + 307)
+#define __NR_timerfd_gettime   (__NR_Linux + 308)
 
-#define __NR_Linux_syscalls    (__NR_fallocate + 1)
+#define __NR_Linux_syscalls    (__NR_timerfd_gettime + 1)
 
 
 #define __IGNORE_select                /* newselect */