1. 04 12月, 2006 6 次提交
    • S
    • B
      [POWERPC] Merge 32 and 64 bits asm-powerpc/io.h · 68a64357
      Benjamin Herrenschmidt 提交于
      powerpc: Merge 32 and 64 bits asm-powerpc/io.h
      
      The rework on io.h done for the new hookable accessors made it easier,
      so I just finished the work and merged 32 and 64 bits io.h for arch/powerpc.
      
      arch/ppc still uses the old version in asm-ppc, there is just too much gunk
      in there that I really can't be bothered trying to cleanup.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      68a64357
    • B
      [POWERPC] Allow hooking of PCI MMIO & PIO accessors on 64 bits · 4cb3cee0
      Benjamin Herrenschmidt 提交于
      This patch reworks the way iSeries hooks on PCI IO operations (both MMIO
      and PIO) and provides a generic way for other platforms to do so (we
      have need to do that for various other platforms).
      
      While reworking the IO ops, I ended up doing some spring cleaning in
      io.h and eeh.h which I might want to split into 2 or 3 patches (among
      others, eeh.h had a lot of useless stuff in it).
      
      A side effect is that EEH for PIO should work now (it used to pass IO
      ports down to the eeh address check functions which is bogus).
      
      Also, new are MMIO "repeat" ops, which other archs like ARM already had,
      and that we have too now: readsb, readsw, readsl, writesb, writesw,
      writesl.
      
      In the long run, I might also make EEH use the hooks instead
      of wrapping at the toplevel, which would make things even cleaner and
      relegate EEH completely in platforms/iseries, but we have to measure the
      performance impact there (though it's really only on MMIO reads)
      
      Since I also need to hook on ioremap, I shuffled the functions a bit
      there. I introduced ioremap_flags() to use by drivers who want to pass
      explicit flags to ioremap (and it can be hooked). The old __ioremap() is
      still there as a low level and cannot be hooked, thus drivers who use it
      should migrate unless they know they want the low level version.
      
      The patch "arch provides generic iomap missing accessors" (should be
      number 4 in this series) is a pre-requisite to provide full iomap
      API support with this patch.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      4cb3cee0
    • B
      [POWERPC] Refactor 64 bits DMA operations · 12d04eef
      Benjamin Herrenschmidt 提交于
      This patch completely refactors DMA operations for 64 bits powerpc. 32 bits
      is untouched for now.
      
      We use the new dev_archdata structure to add the dma operations pointer
      and associated data to struct device. While at it, we also add the OF node
      pointer and numa node. In the future, we might want to look into merging
      that with pci_dn as well.
      
      The old vio, pci-iommu and pci-direct DMA ops are gone. They are now replaced
      by a set of generic iommu and direct DMA ops (non PCI specific) that can be
      used by bus types. The toplevel implementation is now inline.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      12d04eef
    • B
      [POWERPC] Souped-up of_platform_device support · 7eebde70
      Benjamin Herrenschmidt 提交于
      This patch first splits of_device.c and of_platform.c, the later containing
      the bits relative to of_platform_device's. On the "breaks" side of things,
      drivers uisng of_platform_device(s) need to include asm/of_platform.h now
      and of_(un)register_driver is now of_(un)register_platform_driver.
      
      In addition to a few utility functions to locate of_platform_device(s),
      the main new addition is of_platform_bus_probe() which allows the platform
      code to trigger an automatic creation of of_platform_devices for a whole
      tree of devices.
      
      The function acts based on the type of the various "parent" devices encountered
      from a provided root, using either a default known list of bus types that can be
      "probed" or a passed-in list. It will only register devices on busses matching
      that list, which mean that typically, it will not register PCI devices, as
      expected (since they will be picked up by the PCI layer).
      
      This will be used by Cell platforms using 4xx-type IOs in the Axon bridge
      and can be used by any embedded-type device as well.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      7eebde70
    • B
      [POWERPC] Generic DCR infrastructure · 4c75a6f4
      Benjamin Herrenschmidt 提交于
      This patch adds new dcr_map/dcr_read/dcr_write accessors for DCRs that
      can be used by drivers to transparently address either native DCRs or
      memory mapped DCRs. The implementation for memory mapped DCRs is done
      after the binding being currently worked on for SLOF and the Axon
      chipset. This patch enables it for the cell native platform
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      4c75a6f4
  2. 13 11月, 2006 1 次提交
  3. 01 11月, 2006 1 次提交
    • A
      [POWERPC] Fix oprofile support for e500 in arch/powerpc · dd6c89f6
      Andy Fleming 提交于
      Fixed a compile error in building the 85xx support with oprofile, and in
      the process cleaned up some issues with the fsl_booke performance monitor
      code.
      
      * Reorganized FSL Book-E performance monitoring code so that the 7450
        wouldn't be built if the e500 was, and cleaned it up so it was more
        self-contained.
      
      * Added a cpu_setup function for FSL Book-E.  The original
        cpu_setup function prototype had no arguments, assuming that
        the reg_setup function would copy the required information into
        variables which represented the registers.  This was silly for
        e500, since it has 1 register per counter (rather than 3 for
        all counters), so the code has been restructured to have
        cpu_setup take the current counter config array as an argument,
        with op_powerpc_setup() invoking op_powerpc_cpu_setup() through
        on_each_cpu(), and op_powerpc_cpu_setup() invoking the
        model-specific cpu_setup function with an argument.  The
        argument is ignored on all other platforms at present.
      
      * Fixed a confusing line where a trinary operator only had two
        arguments
      Signed-off-by: NAndrew Fleming <afleming@freescale.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      dd6c89f6
  4. 20 9月, 2006 1 次提交
  5. 12 9月, 2006 1 次提交
  6. 25 8月, 2006 1 次提交
  7. 17 8月, 2006 1 次提交
  8. 28 6月, 2006 1 次提交
  9. 18 4月, 2006 1 次提交
    • P
      powerpc: Use correct sequence for putting CPU into nap mode · f39224a8
      Paul Mackerras 提交于
      We weren't using the recommended sequence for putting the CPU into
      nap mode.  When I changed the idle loop, for some reason 7447A cpus
      started hanging when we put them into nap mode.  Changing to the
      recommended sequence fixes that.
      
      The complexity here is that the recommended sequence is a loop that
      keeps putting the cpu back into nap mode.  Clearly we need some way
      to break out of the loop when an interrupt (external interrupt,
      decrementer, performance monitor) occurs.  Here we use a bit in
      the thread_info struct to indicate that we need this, and the exception
      entry code notices this and arranges for the exception to return
      to the value in the link register, thus breaking out of the loop.
      We use a new `local_flags' field in the thread_info which we can
      alter without needing to use an atomic update sequence.
      
      The PPC970 has the same recommended sequence, so we do the same thing
      there too.
      
      This also fixes a bug in the kernel stack overflow handling code on
      32-bit, since it was causing a value that we needed in a register to
      get trashed.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      f39224a8
  10. 27 3月, 2006 5 次提交
  11. 10 2月, 2006 1 次提交
  12. 15 1月, 2006 1 次提交
  13. 12 1月, 2006 1 次提交
  14. 11 1月, 2006 2 次提交
    • M
      [PATCH] powerpc: Don't build crash.c for PPC32 · 97b1b999
      Michael Ellerman 提交于
      arch/powerpc/kernel/crash.c isn't safe for PPC32 (yet?), so don't build it.
      
      Built with CONFIG_KEXEC=y for pmac32_defconfig, pseries_defconfig,
      and g5_defconfig.
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      97b1b999
    • C
      [PATCH] sanitize building of fs/compat_ioctl.c · e6a6d2ef
      Christoph Hellwig 提交于
      Now that all these entries in the arch ioctl32.c files are gone [1], we can
      build fs/compat_ioctl.c as a normal object and kill tons of cruft.  We need a
      special do_ioctl32_pointer handler for s390 so the compat_ptr call is done.
      This is not needed but harmless on all other architectures.  Also remove some
      superflous includes in fs/compat_ioctl.c
      
      Tested on ppc64.
      
      [1] parisc still had it's PPP handler left, which is not fully correct
          for ppp and besides that ppp uses the generic SIOCPRIV ioctl so it'd
          kick in for all netdevice users.  We can introduce a proper handler
          in one of the next patch series by adding a compat_ioctl method to
          struct net_device but for now let's just kill it - parisc doesn't
          compile in mainline anyway and I don't want this to block this
          patchset.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Cc: Matthew Wilcox <willy@debian.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      e6a6d2ef
  15. 10 1月, 2006 1 次提交
  16. 09 1月, 2006 10 次提交
    • P
      powerpc: unbreak iSeries compilation again · be42d5fa
      Paul Mackerras 提交于
      We don't set CONFIG_PPC_MULTIPLATFORM on iSeries (yet).  Avoid
      compiling in the prom_init stuff on iSeries.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      be42d5fa
    • P
      powerpc: set CONFIG_PPC_OF=y always for ARCH=powerpc · 0a498d96
      Paul Mackerras 提交于
      The CONFIG_PPC_OF symbol is used to mean that the firmware device tree
      access functions are available.  Since we always have a device tree
      with ARCH=powerpc, make CONFIG_PPC_OF always Y for ARCH=powerpc.
      
      This fixes some compile errors reported by Kumar Gala, but in a
      different way to his patch.  This also makes prom_parse.o be compiled
      only if CONFIG_PPC_OF so that non-OF ARCH=ppc platforms will compile.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      0a498d96
    • K
      [PATCH] powerpc: Call find_legacy_serial_ports() if we enable CONFIG_SERIAL_8250 · 79e7bac0
      Kumar Gala 提交于
      In setup_arch and setup_system call find_legacy_serial_ports() if we
      build in support for 8250 serial ports instead of basing it on PPC_MULTIPLATFORM.
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      79e7bac0
    • M
      [PATCH] powerpc: Add arch dependent basic infrastructure for Kdump. · cc532915
      Michael Ellerman 提交于
      Implementing the machine_crash_shutdown which will be called by
      crash_kexec (called in case of a panic, sysrq etc.). Disable the
      interrupts, shootdown cpus using debugger IPI and collect regs
      for all CPUs.
      
      elfcorehdr= specifies the location of elf core header stored by
      the crashed kernel. This command line option will be passed by
      the kexec-tools to capture kernel.
      
      savemaxmem= specifies the actual memory size that the first kernel
      has and this value will be used for dumping in the capture kernel.
      This command line option will be passed by the kexec-tools to
      capture kernel.
      Signed-off-by: NHaren Myneni <haren@us.ibm.com>
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      cc532915
    • M
      [PATCH] powerpc: Reroute interrupts from 0 + offset to PHYSICAL_START + offset · 0cc4746c
      Michael Ellerman 提交于
      Regardless of where the kernel's linked we always get interrupts at low
      addresses. This patch creates a trampoline in the first 3 pages of memory,
      where interrupts land, and patches those addresses to jump into the real
      kernel code at PHYSICAL_START.
      
      We also need to reserve the trampoline code and a bit more in prom.c
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      0cc4746c
    • B
      [PATCH] powerpc: Unify udbg (#2) · 51d3082f
      Benjamin Herrenschmidt 提交于
      This patch unifies udbg for both ppc32 and ppc64 when building the
      merged achitecture. xmon now has a single "back end". The powermac udbg
      stuff gets enriched with some ADB capabilities and btext output. In
      addition, the early_init callback is now called on ppc32 as well,
      approx. in the same order as ppc64 regarding device-tree manipulations.
      The init sequences of ppc32 and ppc64 are getting closer, I'll unify
      them in a later patch.
      
      For now, you can force udbg to the scc using "sccdbg" or to btext using
      "btextdbg" on powermacs. I'll implement a cleaner way of forcing udbg
      output to something else than the autodetected OF output device in a
      later patch.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      51d3082f
    • B
      [PATCH] powerpc: serial port discovery (#2) · 463ce0e1
      Benjamin Herrenschmidt 提交于
      This moves the discovery of legacy serial ports to a separate file,
      makes it common to ppc32 and ppc64, and reworks it to use the new OF
      address translators to get to the ports early. This new version can also
      detect some PCI serial cards using legacy chips and will probably match
      those discovered port with the default console choice.
      
      Only ppc64 gets udbg still yet, unifying udbg isn't finished yet.
      
      It also adds some speed-probing code to udbg so that the default console
      can come up at the same speed it was set to by the firmware.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      463ce0e1
    • B
      [PATCH] powerpc: Add OF address parsing code (#2) · d1405b86
      Benjamin Herrenschmidt 提交于
      Parsing addresses extracted from Open Firmware isn't a simple matter. We
      have various bits of code that try to do it in various place, including
      some heuristics in prom.c that pre-parse addresses at boot and fill
      device-nodes "addrs", but those are dodgy at best and I want to
      deprecate them. So this patch introduces a new set of routines that
      should be capable of parsing most types of addresses and translating
      them into CPU physical addresses. It currently works for things on PCI
      busses and ISA busses and should work on "standard" busses like the root
      bus or the MacIO bus that don't put funky flags in addresses. If you
      have other bus types that do use funky flags, you'll have to add new bus
      type translators, which is fairly easy.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      d1405b86
    • H
      [PATCH] powerpc: IBMEBUS bus support · d7a30103
      Heiko J Schick 提交于
      This patch adds the necessary core bus support used by device drivers
      that sit on the IBM GX bus on modern pSeries machines like the Galaxy
      infiniband for example. It provide transparent DMA ops (the low level
      driver works with virtual addresses directly) along with a simple bus
      layer using the Open Firmware matching routines.
      Signed-off-by: NHeiko J Schick <schickhj@de.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      d7a30103
    • M
      [PATCH] powerpc: Merge kexec · 3d1229d6
      Michael Ellerman 提交于
      This patch merges, to some extent, the PPC32 and PPC64 kexec implementations.
      
      We adopt the PPC32 approach of having ppc_md callbacks for the kexec functions.
      The current PPC64 implementation becomes the "default" implementation for PPC64
      which platforms can select if they need no special treatment.
      
      I've added these default callbacks to pseries/maple/cell/powermac, this means
      iSeries no longer supports kexec - but it never worked anyway.
      
      I've renamed PPC32's machine_kexec_simple to default_machine_kexec, inline with
      PPC64. Judging by the comments it might be better named machine_kexec_non_of,
      or something, but at the moment it's the only implementation for PPC32 so it's
      the "default".
      
      Kexec requires machine_shutdown(), which is in machine_kexec.c on PPC32, but we
      already have in setup-common.c on powerpc. All this does is call
      ppc_md.nvram_sync, which only powermac implements, so instead make
      machine_shutdown a ppc_md member and have it call core99_nvram_sync directly
      on powermac.
      
      I've also stuck relocate_kernel.S into misc_32.S for powerpc.
      
      Built for ARCH=ppc, and 32 & 64 bit ARCH=powerpc, with KEXEC=y/n. Booted on
      P5 LPAR and successfully kexec'ed.
      
      Should apply on top of 493f25ef.
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      3d1229d6
  17. 18 11月, 2005 2 次提交
  18. 14 11月, 2005 2 次提交
  19. 11 11月, 2005 1 次提交
    • B
      [PATCH] powerpc: Merge vdso's and add vdso support to 32 bits kernel · a7f290da
      Benjamin Herrenschmidt 提交于
      This patch moves the vdso's to arch/powerpc, adds support for the 32
      bits vdso to the 32 bits kernel, rename systemcfg (finally !), and adds
      some new (still untested) routines to both vdso's: clock_gettime() with
      support for CLOCK_REALTIME and CLOCK_MONOTONIC, clock_getres() (same
      clocks) and get_tbfreq() for glibc to retreive the timebase frequency.
      
      Tom,Steve: The implementation of get_tbfreq() I've done for 32 bits
      returns a long long (r3, r4) not a long. This is such that if we ever
      add support for >4Ghz timebases on ppc32, the userland interface won't
      have to change.
      
      I have tested gettimeofday() using some glibc patches in both ppc32 and
      ppc64 kernels using 32 bits userland (I haven't had a chance to test a
      64 bits userland yet, but the implementation didn't change and was
      tested earlier). I haven't tested yet the new functions.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      a7f290da