]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branch 'for-2.6.25' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus...
authorLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 7 Feb 2008 17:02:26 +0000 (09:02 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 7 Feb 2008 17:02:26 +0000 (09:02 -0800)
* 'for-2.6.25' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (69 commits)
  [POWERPC] Add SPE registers to core dumps
  [POWERPC] Use regset code for compat PTRACE_*REGS* calls
  [POWERPC] Use generic compat_sys_ptrace
  [POWERPC] Use generic compat_ptrace_request
  [POWERPC] Use generic ptrace peekdata/pokedata
  [POWERPC] Use regset code for PTRACE_*REGS* requests
  [POWERPC] Switch to generic compat_binfmt_elf code
  [POWERPC] Switch to using user_regset-based core dumps
  [POWERPC] Add user_regset compat support
  [POWERPC] Add user_regset_view definitions
  [POWERPC] Use user_regset accessors for GPRs
  [POWERPC] ptrace accessors for special regs MSR and TRAP
  [POWERPC] Use user_regset accessors for SPE regs
  [POWERPC] Use user_regset accessors for altivec regs
  [POWERPC] Use user_regset accessors for FP regs
  [POWERPC] mpc52xx: fix compile error introduce when rebasing patch
  [POWERPC] 4xx: PCIe indirect DCR spinlock fix.
  [POWERPC] Add missing native dcr dcr_ind_lock spinlock
  [POWERPC] 4xx: Fix offset value on Warp board
  [POWERPC] 4xx: Add 440EPx Sequoia ehci dts entry
  ...

1  2 
arch/powerpc/mm/mem.c
arch/powerpc/mm/numa.c
drivers/char/Kconfig
drivers/char/Makefile
drivers/serial/Kconfig
drivers/serial/uartlite.c
include/asm-powerpc/system.h
include/linux/elf.h

diff --combined arch/powerpc/mm/mem.c
index ff5debf5eeddcef097b30b06e5ae97c5b4d4d833,c7d7bd43a251a2feeedfa89a6f8a33e0687dacb4..93a5c53e3423fe7c5663b411cfe53cd82da73ad9
@@@ -220,13 -220,12 +220,13 @@@ void __init do_init_bootmem(void
                                     lmb_size_bytes(&lmb.reserved, i) - 1;
                if (addr < total_lowmem)
                        reserve_bootmem(lmb.reserved.region[i].base,
 -                                      lmb_size_bytes(&lmb.reserved, i));
 +                                      lmb_size_bytes(&lmb.reserved, i),
 +                                      BOOTMEM_DEFAULT);
                else if (lmb.reserved.region[i].base < total_lowmem) {
                        unsigned long adjusted_size = total_lowmem -
                                      lmb.reserved.region[i].base;
                        reserve_bootmem(lmb.reserved.region[i].base,
 -                                      adjusted_size);
 +                                      adjusted_size, BOOTMEM_DEFAULT);
                }
        }
  #else
        /* reserve the sections we're already using */
        for (i = 0; i < lmb.reserved.cnt; i++)
                reserve_bootmem(lmb.reserved.region[i].base,
 -                              lmb_size_bytes(&lmb.reserved, i));
 +                              lmb_size_bytes(&lmb.reserved, i),
 +                              BOOTMEM_DEFAULT);
  
  #endif
        /* XXX need to clip this if using highmem? */
@@@ -485,7 -483,12 +485,12 @@@ void update_mmu_cache(struct vm_area_st
                 */
                _tlbie(address, 0 /* 8xx doesn't care about PID */);
  #endif
-               if (!PageReserved(page)
+               /* The _PAGE_USER test should really be _PAGE_EXEC, but
+                * older glibc versions execute some code from no-exec
+                * pages, which for now we are supporting.  If exec-only
+                * pages are ever implemented, this will have to change.
+                */
+               if (!PageReserved(page) && (pte_val(pte) & _PAGE_USER)
                    && !test_bit(PG_arch_1, &page->flags)) {
                        if (vma->vm_mm == current->active_mm) {
                                __flush_dcache_icache((void *) address);
diff --combined arch/powerpc/mm/numa.c
index bc60322d2436d6dca4d224db01c1d475dd394af3,e9139d267ea47c0477a8388b2defdb2e8553b38a..a300d254aac6518dc473ecf405bebf6943b6bfeb
@@@ -24,6 -24,8 +24,8 @@@
  
  static int numa_enabled = 1;
  
+ static char *cmdline __initdata;
  static int numa_debug;
  #define dbg(args...) if (numa_debug) { printk(KERN_INFO args); }
  
@@@ -39,6 -41,53 +41,53 @@@ static bootmem_data_t __initdata plat_n
  static int min_common_depth;
  static int n_mem_addr_cells, n_mem_size_cells;
  
+ static int __cpuinit fake_numa_create_new_node(unsigned long end_pfn,
+                                               unsigned int *nid)
+ {
+       unsigned long long mem;
+       char *p = cmdline;
+       static unsigned int fake_nid;
+       static unsigned long long curr_boundary;
+       /*
+        * Modify node id, iff we started creating NUMA nodes
+        * We want to continue from where we left of the last time
+        */
+       if (fake_nid)
+               *nid = fake_nid;
+       /*
+        * In case there are no more arguments to parse, the
+        * node_id should be the same as the last fake node id
+        * (we've handled this above).
+        */
+       if (!p)
+               return 0;
+       mem = memparse(p, &p);
+       if (!mem)
+               return 0;
+       if (mem < curr_boundary)
+               return 0;
+       curr_boundary = mem;
+       if ((end_pfn << PAGE_SHIFT) > mem) {
+               /*
+                * Skip commas and spaces
+                */
+               while (*p == ',' || *p == ' ' || *p == '\t')
+                       p++;
+               cmdline = p;
+               fake_nid++;
+               *nid = fake_nid;
+               dbg("created new fake_node with id %d\n", fake_nid);
+               return 1;
+       }
+       return 0;
+ }
  static void __cpuinit map_cpu_to_node(int cpu, int node)
  {
        numa_cpu_lookup_table[cpu] = node;
@@@ -344,6 -393,9 +393,9 @@@ static void __init parse_drconf_memory(
                        if (nid == 0xffff || nid >= MAX_NUMNODES)
                                nid = default_nid;
                }
+               fake_numa_create_new_node(((start + lmb_size) >> PAGE_SHIFT),
+                                               &nid);
                node_set_online(nid);
  
                size = numa_enforce_memory_limit(start, lmb_size);
@@@ -429,6 -481,8 +481,8 @@@ new_range
                nid = of_node_to_nid_single(memory);
                if (nid < 0)
                        nid = default_nid;
+               fake_numa_create_new_node(((start + size) >> PAGE_SHIFT), &nid);
                node_set_online(nid);
  
                if (!(size = numa_enforce_memory_limit(start, size))) {
@@@ -461,7 -515,7 +515,7 @@@ static void __init setup_nonnuma(void
        unsigned long top_of_ram = lmb_end_of_DRAM();
        unsigned long total_ram = lmb_phys_mem_size();
        unsigned long start_pfn, end_pfn;
-       unsigned int i;
+       unsigned int i, nid = 0;
  
        printk(KERN_DEBUG "Top of RAM: 0x%lx, Total RAM: 0x%lx\n",
               top_of_ram, total_ram);
        for (i = 0; i < lmb.memory.cnt; ++i) {
                start_pfn = lmb.memory.region[i].base >> PAGE_SHIFT;
                end_pfn = start_pfn + lmb_size_pages(&lmb.memory, i);
-               add_active_range(0, start_pfn, end_pfn);
+               fake_numa_create_new_node(end_pfn, &nid);
+               add_active_range(nid, start_pfn, end_pfn);
+               node_set_online(nid);
        }
-       node_set_online(0);
  }
  
  void __init dump_numa_cpu_topology(void)
@@@ -675,7 -731,7 +731,7 @@@ void __init do_init_bootmem(void
                                dbg("reserve_bootmem %lx %lx\n", physbase,
                                    size);
                                reserve_bootmem_node(NODE_DATA(nid), physbase,
 -                                                   size);
 +                                                   size, BOOTMEM_DEFAULT);
                        }
                }
  
@@@ -702,6 -758,10 +758,10 @@@ static int __init early_numa(char *p
        if (strstr(p, "debug"))
                numa_debug = 1;
  
+       p = strstr(p, "fake=");
+       if (p)
+               cmdline = p + strlen("fake=");
        return 0;
  }
  early_param("numa", early_numa);
diff --combined drivers/char/Kconfig
index 7927fd0faca34a5b8c1a9c45c0df3cc3c17d2bf2,be8371ac30869d3f0671e14dfe99594f9d5eda5b..f01ac9a07bf5533a7b8917775aff88f0eb5ff901
@@@ -194,6 -194,17 +194,6 @@@ config MOXA_INTELLI
          module will be called moxa.
  
  config MOXA_SMARTIO
 -      tristate "Moxa SmartIO support (OBSOLETE)"
 -      depends on SERIAL_NONSTANDARD
 -      help
 -        Say Y here if you have a Moxa SmartIO multiport serial card.
 -
 -        This driver can also be built as a module ( = code which can be
 -        inserted in and removed from the running kernel whenever you want).
 -        The module will be called mxser. If you want to do that, say M
 -        here.
 -
 -config MOXA_SMARTIO_NEW
        tristate "Moxa SmartIO support v. 2.0"
        depends on SERIAL_NONSTANDARD && (PCI || EISA || ISA)
        help
          changes finally resulting in PCI probing.
  
          This driver can also be built as a module. The module will be called
 -        mxser_new. If you want to do that, say M here.
 +        mxser. If you want to do that, say M here.
  
  config ISI
        tristate "Multi-Tech multiport card support (EXPERIMENTAL)"
@@@ -265,7 -276,7 +265,7 @@@ config N_HDL
  
  config RISCOM8
        tristate "SDL RISCom/8 card support"
 -      depends on SERIAL_NONSTANDARD && BROKEN_ON_SMP
 +      depends on SERIAL_NONSTANDARD
        help
          This is a driver for the SDL Communications RISCom/8 multiport card,
          which gives you many serial ports. You would need something like
@@@ -754,7 -765,7 +754,7 @@@ config JS_RT
  
  config SGI_DS1286
        tristate "SGI DS1286 RTC support"
 -      depends on SGI_IP22
 +      depends on SGI_HAS_DS1286
        help
          If you say Y here and create a character special file /dev/rtc with
          major number 10 and minor number 135 using mknod ("man mknod"), you
@@@ -830,6 -841,16 +830,16 @@@ config DTL
          To compile this driver as a module, choose M here: the
          module will be called dtlk.
  
+ config XILINX_HWICAP
+       tristate "Xilinx HWICAP Support"
+       depends on XILINX_VIRTEX
+       help
+         This option enables support for Xilinx Internal Configuration
+         Access Port (ICAP) driver.  The ICAP is used on Xilinx Virtex
+         FPGA platforms to partially reconfigure the FPGA at runtime.
+         If unsure, say N.
  config R3964
        tristate "Siemens R3964 line discipline"
        ---help---
diff --combined drivers/char/Makefile
index 4396e37b3d0fd4e71b4b351b3f2ba7823d489ab6,686fabbd85cd3ed08f37183a23cf45e9845b6f09..5407b7615614b8864c6c81c259b04283598eedc1
@@@ -33,6 -33,7 +33,6 @@@ obj-$(CONFIG_MOXA_INTELLIO)   += moxa.
  obj-$(CONFIG_A2232)           += ser_a2232.o generic_serial.o
  obj-$(CONFIG_ATARI_DSP56K)    += dsp56k.o
  obj-$(CONFIG_MOXA_SMARTIO)    += mxser.o
 -obj-$(CONFIG_MOXA_SMARTIO_NEW)        += mxser_new.o
  obj-$(CONFIG_COMPUTONE)               += ip2/
  obj-$(CONFIG_RISCOM8)         += riscom8.o
  obj-$(CONFIG_ISI)             += isicom.o
@@@ -76,6 -77,7 +76,7 @@@ obj-$(CONFIG_EFI_RTC)         += efirtc.
  obj-$(CONFIG_SGI_DS1286)      += ds1286.o
  obj-$(CONFIG_SGI_IP27_RTC)    += ip27-rtc.o
  obj-$(CONFIG_DS1302)          += ds1302.o
+ obj-$(CONFIG_XILINX_HWICAP)   += xilinx_hwicap/
  ifeq ($(CONFIG_GENERIC_NVRAM),y)
    obj-$(CONFIG_NVRAM) += generic_nvram.o
  else
diff --combined drivers/serial/Kconfig
index 50d6e2214ddfe7e4080affde7b1b7d1419fcc464,ddfb1eab736371a6676ccdd637d197865b32ea2f..84a054d7e9865aec10da1601a7e3f4deba7635c7
@@@ -465,24 -465,20 +465,24 @@@ config SERIAL_D
        bool "DECstation DZ serial driver"
        depends on MACH_DECSTATION && 32BIT
        select SERIAL_CORE
 -      help
 -        DZ11-family serial controllers for VAXstations, including the
 -        DC7085, M7814, and M7819.
 +      default y
 +      ---help---
 +        DZ11-family serial controllers for DECstations and VAXstations,
 +        including the DC7085, M7814, and M7819.
  
  config SERIAL_DZ_CONSOLE
        bool "Support console on DECstation DZ serial driver"
        depends on SERIAL_DZ=y
        select SERIAL_CORE_CONSOLE
 -      help
 +      default y
 +      ---help---
          If you say Y here, it will be possible to use a serial port as the
          system console (the system console is the device which receives all
          kernel messages and warnings and which allows logins in single user
 -        mode).  Note that the firmware uses ttyS0 as the serial console on
 -        the Maxine and ttyS2 on the others.
 +        mode).
 +
 +        Note that the firmware uses ttyS3 as the serial console on
 +        DECstations that use this driver.
  
          If unsure, say Y.
  
@@@ -881,15 -877,15 +881,15 @@@ config SERIAL_SUNH
          systems.  Say Y if you want to be able to use this device.
  
  config SERIAL_IP22_ZILOG
 -      tristate "IP22 Zilog8530 serial support"
 -      depends on SGI_IP22
 +      tristate "SGI Zilog8530 serial support"
 +      depends on SGI_HAS_ZILOG
        select SERIAL_CORE
        help
 -        This driver supports the Zilog8530 serial ports found on SGI IP22
 +        This driver supports the Zilog8530 serial ports found on SGI
          systems.  Say Y or M if you want to be able to these serial ports.
  
  config SERIAL_IP22_ZILOG_CONSOLE
 -      bool "Console on IP22 Zilog8530 serial port"
 +      bool "Console on SGI Zilog8530 serial port"
        depends on SERIAL_IP22_ZILOG=y
        select SERIAL_CORE_CONSOLE
  
@@@ -1142,17 -1138,17 +1142,17 @@@ config SERIAL_SGI_L1_CONSOL
                say Y.  Otherwise, say N.
  
  config SERIAL_MPC52xx
-       tristate "Freescale MPC52xx family PSC serial support"
-       depends on PPC_MPC52xx
+       tristate "Freescale MPC52xx/MPC512x family PSC serial support"
+       depends on PPC_MPC52xx || PPC_MPC512x
        select SERIAL_CORE
        help
-         This drivers support the MPC52xx PSC serial ports. If you would
-         like to use them, you must answer Y or M to this option. Not that
+         This driver supports MPC52xx and MPC512x PSC serial ports. If you would
+         like to use them, you must answer Y or M to this option. Note that
          for use as console, it must be included in kernel and not as a
          module.
  
  config SERIAL_MPC52xx_CONSOLE
-       bool "Console on a Freescale MPC52xx family PSC serial port"
+       bool "Console on a Freescale MPC52xx/MPC512x family PSC serial port"
        depends on SERIAL_MPC52xx=y
        select SERIAL_CORE_CONSOLE
        help
          of the Freescale MPC52xx family as a console.
  
  config SERIAL_MPC52xx_CONSOLE_BAUD
-       int "Freescale MPC52xx family PSC serial port baud"
+       int "Freescale MPC52xx/MPC512x family PSC serial port baud"
        depends on SERIAL_MPC52xx_CONSOLE=y
        default "9600"
        help
@@@ -1322,19 -1318,4 +1322,19 @@@ config SERIAL_Q
          This driver supports the QE serial ports on Freescale embedded
          PowerPC that contain a QUICC Engine.
  
 +config SERIAL_SC26XX
 +      tristate "SC2681/SC2692 serial port support"
 +      depends on SNI_RM
 +      select SERIAL_CORE
 +      help
 +        This is a driver for the onboard serial ports of
 +        older RM400 machines.
 +
 +config SERIAL_SC26XX_CONSOLE
 +      bool "Console on SC2681/SC2692 serial port"
 +      depends on SERIAL_SC26XX
 +      select SERIAL_CORE_CONSOLE
 +      help
 +        Support for Console on SC2681/SC2692 serial ports.
 +
  endmenu
index bacf68dca01a04443a4f849d6dffb421a9883775,1a7bccebd50322ad0b3201864e00bea9006ea075..4e06ab6bcb6e80c15c5f71b723e912f9e7f53d08
  #include <linux/tty.h>
  #include <linux/delay.h>
  #include <linux/interrupt.h>
+ #include <linux/init.h>
  #include <asm/io.h>
  #if defined(CONFIG_OF)
+ #include <linux/of.h>
  #include <linux/of_device.h>
  #include <linux/of_platform.h>
+ /* Match table for of_platform binding */
+ static struct of_device_id ulite_of_match[] __devinitdata = {
+       { .compatible = "xlnx,opb-uartlite-1.00.b", },
+       { .compatible = "xlnx,xps-uartlite-1.00.a", },
+       {}
+ };
+ MODULE_DEVICE_TABLE(of, ulite_of_match);
  #endif
  
  #define ULITE_NAME            "ttyUL"
@@@ -142,7 -153,7 +153,7 @@@ static int ulite_transmit(struct uart_p
  
  static irqreturn_t ulite_isr(int irq, void *dev_id)
  {
 -      struct uart_port *port = (struct uart_port *)dev_id;
 +      struct uart_port *port = dev_id;
        int busy;
  
        do {
@@@ -275,6 -286,9 +286,9 @@@ static void ulite_release_port(struct u
  
  static int ulite_request_port(struct uart_port *port)
  {
+       pr_debug("ulite console: port=%p; port->mapbase=%x\n",
+                port, port->mapbase);
        if (!request_mem_region(port->mapbase, ULITE_REGION, "uartlite")) {
                dev_err(port->dev, "Memory region busy\n");
                return -EBUSY;
@@@ -375,32 -389,6 +389,6 @@@ static void ulite_console_write(struct 
                spin_unlock_irqrestore(&port->lock, flags);
  }
  
- #if defined(CONFIG_OF)
- static inline void __init ulite_console_of_find_device(int id)
- {
-       struct device_node *np;
-       struct resource res;
-       const unsigned int *of_id;
-       int rc;
-       for_each_compatible_node(np, NULL, "xilinx,uartlite") {
-               of_id = of_get_property(np, "port-number", NULL);
-               if ((!of_id) || (*of_id != id))
-                       continue;
-               rc = of_address_to_resource(np, 0, &res);
-               if (rc)
-                       continue;
-               ulite_ports[id].mapbase = res.start;
-               of_node_put(np);
-               return;
-       }
- }
- #else /* CONFIG_OF */
- static inline void __init ulite_console_of_find_device(int id) { /* do nothing */ }
- #endif /* CONFIG_OF */
  static int __init ulite_console_setup(struct console *co, char *options)
  {
        struct uart_port *port;
  
        port = &ulite_ports[co->index];
  
-       /* Check if it is an OF device */
-       if (!port->mapbase)
-               ulite_console_of_find_device(co->index);
-       /* Do we have a device now? */
+       /* Has the device been initialized yet? */
        if (!port->mapbase) {
                pr_debug("console on ttyUL%i not present\n", co->index);
                return -ENODEV;
@@@ -617,13 -601,6 +601,6 @@@ static int __devexit ulite_of_remove(st
        return ulite_release(&op->dev);
  }
  
- /* Match table for of_platform binding */
- static struct of_device_id __devinit ulite_of_match[] = {
-       { .type = "serial", .compatible = "xilinx,uartlite", },
-       {},
- };
- MODULE_DEVICE_TABLE(of, ulite_of_match);
  static struct of_platform_driver ulite_of_driver = {
        .owner = THIS_MODULE,
        .name = "uartlite",
index 2a65ae6372048b684ca06b39f4981fb88eb4943d,8d37283db032153dfb53ab504c32cd3878e10828..29552ff182aa161204490d48bb26d9ec1e613e2e
@@@ -65,7 -65,7 +65,7 @@@
  struct task_struct;
  struct pt_regs;
  
- #ifdef CONFIG_DEBUGGER
+ #if defined(CONFIG_DEBUGGER) || defined(CONFIG_KEXEC)
  
  extern int (*__debugger)(struct pt_regs *regs);
  extern int (*__debugger_ipi)(struct pt_regs *regs);
@@@ -463,7 -463,7 +463,7 @@@ __cmpxchg_local(volatile void *ptr, uns
        return old;
  }
  
 -#define cmpxchg(ptr,o,n)                                               \
 +#define cmpxchg(ptr, o, n)                                             \
    ({                                                                   \
       __typeof__(*(ptr)) _o_ = (o);                                     \
       __typeof__(*(ptr)) _n_ = (n);                                     \
    })
  
  
 -#define cmpxchg_local(ptr,o,n)                                                 \
 +#define cmpxchg_local(ptr, o, n)                                       \
    ({                                                                   \
       __typeof__(*(ptr)) _o_ = (o);                                     \
       __typeof__(*(ptr)) _n_ = (n);                                     \
   */
  #define NET_IP_ALIGN  0
  #define NET_SKB_PAD   L1_CACHE_BYTES
 +
 +#define cmpxchg64(ptr, o, n)                                          \
 +  ({                                                                  \
 +      BUILD_BUG_ON(sizeof(*(ptr)) != 8);                              \
 +      cmpxchg((ptr), (o), (n));                                       \
 +  })
 +#define cmpxchg64_local(ptr, o, n)                                    \
 +  ({                                                                  \
 +      BUILD_BUG_ON(sizeof(*(ptr)) != 8);                              \
 +      cmpxchg_local((ptr), (o), (n));                                 \
 +  })
 +#else
 +#include <asm-generic/cmpxchg-local.h>
 +#define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n))
  #endif
  
  #define arch_align_stack(x) (x)
diff --combined include/linux/elf.h
index ed98c761bae7f77afbe772506d2d0f75a9a95b92,30eb6fbd5323851523a0c2d8033424b86f93eedf..bad1b16ec49a73f432ed27a0c97131205f726c29
@@@ -3,9 -3,7 +3,9 @@@
  
  #include <linux/types.h>
  #include <linux/elf-em.h>
 +#ifdef __KERNEL__
  #include <asm/elf.h>
 +#endif
  
  struct file;
  
@@@ -357,6 -355,7 +357,7 @@@ typedef struct elf64_shdr 
  #define NT_AUXV               6
  #define NT_PRXFPREG     0x46e62b7f      /* copied from gdb5.1/include/elf/common.h */
  #define NT_PPC_VMX    0x100           /* PowerPC Altivec/VMX registers */
+ #define NT_PPC_SPE    0x101           /* PowerPC SPE/EVR registers */
  #define NT_386_TLS    0x200           /* i386 TLS slots (struct user_desc) */