1. 13 10月, 2008 1 次提交
    • M
      powerpc/xics: EOI unmapped irqs after disabling them · 8767e9ba
      Milton Miller 提交于
      When reciving an irq vector that does not have a linux mapping, the kernel
      prints a message and calls RTAS to disable the irq source.   Previously
      the kernel did not EOI the interrupt, causing the source to think it is
      still being processed by software.  While this does add an additional
      layer of protection against interrupt storms had RTAS failed to disable
      the source, it also prevents the interrupt from working when a driver
      later enables it.  (We could alternatively send an EOI on startup, but
      that strategy would likely fail on an emulated xics.)
      
      All interrupts should be disabled when the kernel starts, but this can
      be observed if a driver does not shutdown an interrupt in its reboot
      hook before starting a new kernel with kexec.
      
      Michael reports this can be reproduced trivially by banging the keyboard
      while kexec'ing on a P5 LPAR: even though the hvc_console driver request's
      the console irq later in boot, the console is non-functional because
      we're receiving no console interrupts.
      
      Reported-By: Michael Ellerman
      Signed-off-by: NMilton Miller <miltonm@bga.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      8767e9ba
  2. 10 10月, 2008 11 次提交
    • B
      Merge commit 'jk/jk-merge' · bb3d55e2
      Benjamin Herrenschmidt 提交于
      bb3d55e2
    • J
      powerpc: Reserve in bootmem lmb reserved regions that cross NUMA nodes · 8f64e1f2
      Jon Tollefson 提交于
      If there are multiple reserved memory blocks via lmb_reserve() that are
      contiguous addresses and on different NUMA nodes we are losing track of which
      address ranges to reserve in bootmem on which node.  I discovered this
      when I recently got to try 16GB huge pages on a system with more then 2 nodes.
      
      When scanning the device tree in early boot we call lmb_reserve() with
      the addresses of the 16G pages that we find so that the memory doesn't
      get used for something else.  For example the addresses for the pages
      could be 4000000000, 4400000000, 4800000000, 4C00000000, etc - 8 pages,
      one on each of eight nodes.  In the lmb after all the pages have been
      reserved it will look something like the following:
      
      lmb_dump_all:
          memory.cnt            = 0x2
          memory.size           = 0x3e80000000
          memory.region[0x0].base       = 0x0
                            .size     = 0x1e80000000
          memory.region[0x1].base       = 0x4000000000
                            .size     = 0x2000000000
          reserved.cnt          = 0x5
          reserved.size         = 0x3e80000000
          reserved.region[0x0].base       = 0x0
                            .size     = 0x7b5000
          reserved.region[0x1].base       = 0x2a00000
                            .size     = 0x78c000
          reserved.region[0x2].base       = 0x328c000
                            .size     = 0x43000
          reserved.region[0x3].base       = 0xf4e8000
                            .size     = 0xb18000
          reserved.region[0x4].base       = 0x4000000000
                            .size     = 0x2000000000
      
      The reserved.region[0x4] contains the 16G pages.  In
      arch/powerpc/mm/num.c: do_init_bootmem() we loop through each of the
      node numbers looking for the reserved regions that belong to the
      particular node.  It is not able to identify region 0x4 as being a part
      of each of the 8 nodes.  It is assuming that a reserved region is only
      on a single node.
      
      This patch takes out the reserved region loop from inside
      the loop that goes over each node.  It looks up the active region containing
      the start of the reserved region.  If it extends past that active region then
      it adjusts the size and gets the next active region containing it.
      Signed-off-by: NJon Tollefson <kniht@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      8f64e1f2
    • P
      powerpc: Sync RPA note in zImage with kernel's RPA note · 91a00302
      Paul Mackerras 提交于
      Commit 9b09c6d9 ("powerpc: Change the
      default link address for pSeries zImage kernels") changed the
      real-base value in the CHRP note added by the addnote program from
      12MB to 32MB to give more space for Open Firmware to load the zImage.
      (The real-base value says where we want OF to position itself in
      memory.)  However, this change was ineffective on most pSeries
      machines, because the RPA note added by addnote has the "ignore me"
      flag set to 1.  This was intended to tell OF to ignore just the RPA
      note, but has the side effect of also making OF ignore the CHRP note
      (at least on most pSeries machines).
      
      To solve this we have to set the "ignore me" flag to 0 in the RPA
      note.  (We can't just omit the RPA note because that is equivalent to
      having an RPA note with default values, and the default values are not
      what we want.)  However, then we have to make sure the values in the
      zImage's RPA note match up with the values that the kernel supplies
      later in prom_init.c with either the ibm,client-architecture-support
      call or the process-elf-header call in prom_send_capabilities().
      
      So this sets the "ignore me" flag in the RPA note in addnote to 0, and
      adjusts the RPA note values in addnote.c and in prom_init.c to be
      consistent with each other and with the values in ibm_architecture_vec.
      
      However, since the wrapper is independent of the kernel, this doesn't
      ensure that the notes will stay consistent.  To ensure that, this adds
      code to addnote.c so that it can extract the kernel's RPA note from
      the kernel binary and put that in the zImage.  To that end, we put the
      kernel's fake ELF header (which contains the kernel's RPA note) into
      its own section, and arrange for wrapper to pull out that section with
      objcopy and pass it to addnote, which then extracts the RPA note from
      it and transfers it to the zImage.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      91a00302
    • G
      powerpc/of-bindings: Don't support linux,<modalias> "compatible" values · 58f467ce
      Grant Likely 提交于
      Compatible property values in the form linux,<modalias> is not documented
      anywhere and using it leaks Linux implementation details into the device
      tree data (which is bad).  Remove support for compatible values of this
      form.
      
      If any platforms exist which depended on this code (and I don't know of
      any), then they can be fixed up by adding legacy translations to the
      lookup table in this file.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      58f467ce
    • J
      powerpc: Fix error path in kernel_thread function · 41c2e949
      Josh Poimboeuf 提交于
      The powerpc 32-bit and 64-bit kernel_thread functions don't properly
      propagate errors being returned by the clone syscall.  (In the case of
      error, the syscall exit code returns a positive errno in r3 and sets
      the CR0[SO] bit.)
      
      This patch fixes that by negating r3 if CR0[SO] is set after the syscall.
      Signed-off-by: NJosh Poimboeuf <jpoimboe@us.ibm.com>
      Signed-off-by: NJosh Boyer <jwboyer@linux.vnet.ibm.com>
      Acked-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      41c2e949
    • R
      powerpc/cell/oprofile: Fix test on overlay_tbl_offset in vma_map · 99c84066
      Roel Kluin 提交于
      Offset is unsigned and when an address isn't found in the vma map
      vma_map_lookup() returns the vma physical address + 0x10000000.
      
      vma_map_lookup used to return 0xffffffff on a failed lookup, but
      a change was made to return the vma physical address + 0x10000000
      There are two callers of vam_map_lookup: one of them correctly
      deals with this new return value, but the other (below) did not.
      Signed-off-by: NRoel Kluin <12o3l@tiscali.nl>
      Acked-by: NMaynard Johnson <maynardj@us.ibm.com>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      99c84066
    • A
      powerpc: Fix no interrupt handling in pata_of_platform · 4538d0ca
      Anton Vorontsov 提交于
      When no interrupt is specified the pata_of_platform fills the irq_res
      resource with -1, which is wrong to do for two reasons:
      
      1. By definition, 'no irq' should be IRQ 0, not some negative integer;
      2. pata_platform checks for irq_res.start > 0, but since irq_res.start
         is unsigned type, the check will be true for `-1'.
      Reported-by: NSteven A. Falco <sfalco@harris.com>
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      4538d0ca
    • N
      powerpc: Oops in pseries_lmb_remove() · 9fd3f88c
      Nathan Fontenot 提交于
      Testing hotplug memory remove has revealed that we can oops in
      pseries_lmb_remove().  The incorrect shift causes a NULL pointer
      dereference in the page_zone() inline routine.
      
      I have only been able to reproduce the oops on kernels with large pages
      enabled.
      
      Tested on Power5 and Power6 with and without large pages enabled.
      Signed-off-by: NNathan Fontenot <nfont@austin.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      9fd3f88c
    • K
      powerpc/spufs: add a missing mutex_unlock · 6747c2ee
      Kou Ishizaki 提交于
      A mutex_unlock(&gang->aff_mutex) in spufs_create_context() is missing
      in case spufs_context_open() fails.  As a result, spu_create syscall
      and spu_get_idle() may block.
      
      This patch adds the mutex_unlock.
      Signed-off-by: NKou Ishizaki <kou.ishizaki@toshiba.co.jp>
      Signed-off-by: NJeremy Kerr <jk@ozlabs.org>
      Acked-by: NAndre Detsch <adetsch@br.ibm.com>
      6747c2ee
    • J
      powerpc/spufs: use inc_nlink · ba0b996d
      Jeremy Kerr 提交于
      Style change: use inc_nlink instead of incrementing i_nlink directly
      Signed-off-by: NJeremy Kerr <jk@ozlabs.org>
      ba0b996d
    • J
      powerpc/spufs: set nlink count for spufs root correctly · e2ed6e4d
      Jeremy Kerr 提交于
      Currently, an empty spufs root inode has nlink count of 1. However,
      the directory has two links; / -> spu and /spu/ -> .
      
      This change increments the link count of the root inode in spufs.
      Signed-off-by: NJeremy Kerr <jk@ozlabs.org>
      e2ed6e4d
  3. 07 10月, 2008 11 次提交
  4. 03 10月, 2008 4 次提交
  5. 02 10月, 2008 3 次提交
  6. 01 10月, 2008 1 次提交
    • K
      powerpc/math-emu: Use kernel generic math-emu code · d2b194ed
      Kumar Gala 提交于
      The math emulation code is centered around a set of generic macros that
      provide the core of the emulation that are shared by the various
      architectures and other projects (like glibc).  Each arch implements its
      own sfp-machine.h to specific various arch specific details.
      
      For historic reasons that are now lost the powerpc math-emu code had
      its own version of the common headers.  This moves us to using the
      kernel generic version and thus getting fixes when those are updated.
      
      Also cleaned up exception/error reporting from the FP emulation functions.
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      d2b194ed
  7. 30 9月, 2008 3 次提交
  8. 29 9月, 2008 3 次提交
  9. 25 9月, 2008 3 次提交