1. 05 Nov, 2008 1 commit
  2. 30 Oct, 2008 5 commits
    • Kumar Gala's avatar
      powerpc/mpic: Fix regression caused by change of default IRQ affinity · 3c10c9c4
      Kumar Gala authored
      The Freescale implementation of MPIC only allows a single CPU destination
      for non-IPI interrupts.  We add a flag to the mpic_init to distinquish
      these variants of MPIC.  We pull in the irq_choose_cpu from sparc64 to
      select a single CPU as the destination of the interrupt.
      This is to deal with the fact that the default smp affinity was
      changed by commit 18404756
      Expose default irq affinity mask (take 3)") to be all CPUs.
      Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
    • Mark Nelson's avatar
      powerpc: Update remaining dma_mapping_ops to use map/unmap_page · f9226d57
      Mark Nelson authored
      After the merge of the 32 and 64bit DMA code, dma_direct_ops lost
      their map/unmap_single() functions but gained map/unmap_page().  This
      caused a problem for Cell because Cell's dma_iommu_fixed_ops called
      the dma_direct_ops if the fixed linear mapping was to be used or the
      iommu ops if the dynamic window was to be used.  So in order to fix
      this problem we need to update the 64bit DMA code to use
      First, we update the generic IOMMU code so that iommu_map_single()
      becomes iommu_map_page() and iommu_unmap_single() becomes
      iommu_unmap_page().  Then we propagate these changes up through all
      the callers of these two functions and in the process update all the
      dma_mapping_ops so that they have map/unmap_page rahter than
      map/unmap_single.  We can do this because on 64bit there is no HIGHMEM
      memory so map/unmap_page ends up performing exactly the same function
      as map/unmap_single, just taking different arguments.
      This has no affect on drivers because the dma_map_single_attrs() just
      ends up calling the map_page() function of the appropriate
      dma_mapping_ops and similarly the dma_unmap_single_attrs() calls
      This fixes an oops on Cell blades, which oops on boot without this
      because they call dma_direct_ops.map_single, which is NULL.
      Signed-off-by: default avatarMark Nelson <markn@au1.ibm.com>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
    • Nathan Fontenot's avatar
      powerpc/pci: Properly allocate bus resources for hotplug PHBs · e90a1318
      Nathan Fontenot authored
      Resources for PHB's that are dynamically added to a system are not
      properly allocated in the resource tree.
      Not having these resources allocated causes an oops when removing
      the PHB when we try to release them.
      The diff appears a bit messy, this is mainly due to moving everything
      one tab to the left in the pcibios_allocate_bus_resources routine.
      The functionality change in this routine is only that the
      list_for_each_entry() loop is pulled out and moved to the necessary
      calling routine.
      Signed-off-by: default avatarNathan Fontenot <nfont@austin.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
    • Milton Miller's avatar
      powerpc: Use is_kdump_kernel() · 62a8bd6c
      Milton Miller authored
      linux/crash_dump.h defines is_kdump_kernel() to be used by code that
      needs to know if the previous kernel crashed instead of a (clean) boot
      or reboot.
      This updates the just added powerpc code to use it.  This is needed
      for the next commit, which will remove __kdump_flag.
      Signed-off-by: default avatarMilton Miller <miltonm@bga.com>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
    • Milton Miller's avatar
      powerpc: Kexec exit should not use magic numbers · 1767c8f3
      Milton Miller authored
      Commit 54622f10
       ("powerpc: Support for
      relocatable kdump kernel") added a magic flag value in a register to
      tell purgatory that it should be a panic kernel.  This part is wrong
      and is reverted by this commit.
      The kernel gets a list of memory blocks and a entry point from user space.
      Its job is to copy the blocks into place and then branch to the designated
      entry point (after turning "off" the mmu).
      The user space tool inserts a trampoline, called purgatory, that runs
      before the user supplied code.   Its job is to establish the entry
      environment for the new kernel or other application based on the contents
      of memory.  The purgatory code is compiled and embedded in the tool,
      where it is later patched using the elf symbol table using elf symbols.
      Since the tool knows it is creating a purgatory that will run after a
      kernel crash, it should just patch purgatory (or the kernel directly)
      if something needs to happen.
      Signed-off-by: default avatarMilton Miller <miltonm@bga.com>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
  3. 22 Oct, 2008 1 commit
  4. 21 Oct, 2008 1 commit
    • Mohan Kumar M's avatar
      powerpc: Support for relocatable kdump kernel · 54622f10
      Mohan Kumar M authored
      This adds relocatable kernel support for kdump. With this one can
      use the same regular kernel to capture the kdump. A signature (0xfeed1234)
      is passed in r6 from panic code to the next kernel through kexec_sequence
      and purgatory code. The signature is used to differentiate between
      kdump kernel and non-kdump kernels.
      The purgatory code compares the signature and sets the __kdump_flag in
      head_64.S.  During the boot up, kernel code checks __kdump_flag and if it
      is set, the kernel will behave as relocatable kdump kernel. This kernel
      will boot at the address where it was loaded by kexec-tools ie. at the
      address reserved through crashkernel boot parameter.
      CONFIG_CRASH_DUMP depends on CONFIG_RELOCATABLE option to build kdump
      kernel as relocatable. So the same kernel can be used as production and
      kdump kernel.
      This patch incorporates the changes suggested by Paul Mackerras to avoid
      GOT use and to avoid two copies of the code.
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      Signed-off-by: default avatarMohan Kumar M <mohan@in.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
  5. 20 Oct, 2008 6 commits
  6. 16 Oct, 2008 2 commits
    • Martin Schwidefsky's avatar
      [PATCH] remove unused ibcs2/PER_SVR4 in SET_PERSONALITY · 0b592682
      Martin Schwidefsky authored
      The SET_PERSONALITY macro is always called with a second argument of 0.
      Remove the ibcs argument and the various tests to set the PER_SVR4
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
    • Stephen Rothwell's avatar
      powerpc: fix linux-next build failure · 463baa8a
      Stephen Rothwell authored
      Today's linux-next build (powerpc allyesconfig) failed like this:
      In file included from arch/powerpc/include/asm/mmu-hash64.h:17,
                       from arch/powerpc/include/asm/mmu.h:8,
                       from arch/powerpc/include/asm/pgtable.h:8,
                       from arch/powerpc/mm/slb.c:20:
      arch/powerpc/include/asm/page.h:76: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'memstart_addr'
      arch/powerpc/include/asm/page.h:77: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'kernstart_addr'
      Caused by commit 600715dc
       ("generic: add
      phys_addr_t for holding physical addresses") from the tip-core tree.
      This only fails if CONFIG_RELOCATABLE is set.
      So include that instead of asm/types.h in asm/page.h for
      the CONFIG_RELOCATABLE case.
      Signed-off-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Cc: ppc-dev <linuxppc-dev@ozlabs.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Jeremy Fitzhardinge <jeremy@goop.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
  7. 15 Oct, 2008 4 commits
  8. 13 Oct, 2008 2 commits
  9. 12 Oct, 2008 1 commit
  10. 08 Oct, 2008 1 commit
  11. 02 Oct, 2008 1 commit
  12. 01 Oct, 2008 1 commit
    • Kumar Gala's avatar
      powerpc/math-emu: Use kernel generic math-emu code · d2b194ed
      Kumar Gala authored
      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: default avatarKumar Gala <galak@kernel.crashing.org>
  13. 30 Sep, 2008 1 commit
  14. 24 Sep, 2008 7 commits
  15. 23 Sep, 2008 1 commit
    • Srinivasa Ds's avatar
      signals: demultiplexing SIGTRAP signal · da654b74
      Srinivasa Ds authored
      Currently a SIGTRAP can denote any one of below reasons.
      	- Breakpoint hit
      	- H/W debug register hit
      	- Single step
      	- Signal sent through kill() or rasie()
      Architectures like powerpc/parisc provides infrastructure to demultiplex
      SIGTRAP signal by passing down the information for receiving SIGTRAP through
      si_code of siginfot_t structure. Here is an attempt is generalise this
      infrastructure by extending it to x86 and x86_64 archs.
      Signed-off-by: default avatarSrinivasa DS <srinivasa@in.ibm.com>
      Cc: Roland McGrath <roland@redhat.com>
      Cc: akpm@linux-foundation.org
      Cc: paulus@samba.org
      Cc: linuxppc-dev@ozlabs.org
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
  16. 17 Sep, 2008 1 commit
  17. 15 Sep, 2008 4 commits
    • Sebastien Dugue's avatar
      powerpc: Separate the irq radix tree insertion and lookup · 967e012e
      Sebastien Dugue authored
      irq_radix_revmap() currently serves 2 purposes, irq mapping lookup
      and insertion which happen in interrupt and process context respectively.
      Separate the function into its 2 components, one for lookup only and one
      for insertion only.
      Fix the only user of the revmap tree (XICS) to use the new functions.
      Also, move the insertion into the radix tree of those irqs that were
      requested before it was initialized at said tree initialization.
      Mutual exclusion between the tree initialization and readers/writers is
      handled via a state variable (revmap_trees_allocated) set to 1 when the tree
      has been initialized and set to 2 after the already requested irqs have been
      inserted in the tree by the init path. This state is checked before any reader
      or writer access just like we used to check for tree.gfp_mask != 0 before.
      Finally, now that we're not any longer inserting nodes into the radix-tree
      in interrupt context, turn the GFP_ATOMIC allocations into GFP_KERNEL ones.
      Signed-off-by: default avatarSebastien Dugue <sebastien.dugue@bull.net>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Michael Ellerman <michael@ellerman.id.au>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
    • Christoph Hellwig's avatar
      powerpc: Use sys_pause for 32-bit pause entry point · d6c93adb
      Christoph Hellwig authored
      sys32_pause is a useless copy of the generic sys_pause.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Acked-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
    • Paul Mackerras's avatar
      powerpc: Make the 64-bit kernel as a position-independent executable · 549e8152
      Paul Mackerras authored
      This implements CONFIG_RELOCATABLE for 64-bit by making the kernel as
      a position-independent executable (PIE) when it is set.  This involves
      processing the dynamic relocations in the image in the early stages of
      booting, even if the kernel is being run at the address it is linked at,
      since the linker does not necessarily fill in words in the image for
      which there are dynamic relocations.  (In fact the linker does fill in
      such words for 64-bit executables, though not for 32-bit executables,
      so in principle we could avoid calling relocate() entirely when we're
      running a 64-bit kernel at the linked address.)
      The dynamic relocations are processed by a new function relocate(addr),
      where the addr parameter is the virtual address where the image will be
      run.  In fact we call it twice; once before calling prom_init, and again
      when starting the main kernel.  This means that reloc_offset() returns
      0 in prom_init (since it has been relocated to the address it is running
      at), which necessitated a few adjustments.
      This also changes __va and __pa to use an equivalent definition that is
      simpler.  With the relocatable kernel, PAGE_OFFSET and MEMORY_START are
      constants (for 64-bit) whereas PHYSICAL_START is a variable (and
      KERNELBASE ideally should be too, but isn't yet).
      With this, relocatable kernels still copy themselves down to physical
      address 0 and run there.
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
    • Paul Mackerras's avatar
      powerpc: Use LOAD_REG_IMMEDIATE only for constants on 64-bit · e31aa453
      Paul Mackerras authored
      Using LOAD_REG_IMMEDIATE to get the address of kernel symbols
      generates 5 instructions where LOAD_REG_ADDR can do it in one,
      and will generate R_PPC64_ADDR16_* relocations in the output when
      we get to making the kernel as a position-independent executable,
      which we'd rather not have to handle.  This changes various bits
      of assembly code to use LOAD_REG_ADDR when we need to get the
      address of a symbol, or to use suitable position-independent code
      for cases where we can't access the TOC for various reasons, or
      if we're not running at the address we were linked at.
      It also cleans up a few minor things; there's no reason to save and
      restore SRR0/1 around RTAS calls, __mmu_off can get the return
      address from LR more conveniently than the caller can supply it in
      R4 (and we already assume elsewhere that EA == RA if the MMU is on
      in early boot), and enable_64b_mode was using 5 instructions where
      2 would do.
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>