1. 07 Oct, 2006 1 commit
  2. 04 Oct, 2006 4 commits
    • Arnd Bergmann's avatar
      [POWERPC] spufs: support new OF device tree format · 7650f2f2
      Arnd Bergmann authored
      
      
      The properties we used traditionally in the device tree are somewhat
      nonstandard.  This adds support for a more conventional format using
      'interrupts' and 'reg' properties.
      
      The interrupts are specified in three cells (class 0, 1 and 2) and
      registered at the interrupt-parent.
      
      The reg property contains either three or four register areas in the
      order 'local-store', 'problem', 'priv2', and 'priv1', so the priv1 one
      can be left out in case of hypervisor driven systems that access these
      through hcalls.
      Signed-off-by: default avatarArnd Bergmann <arnd.bergmann@de.ibm.com>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      7650f2f2
    • Arnd Bergmann's avatar
      [POWERPC] spufs: remove support for ancient firmware · 772920e5
      Arnd Bergmann authored
      
      
      Any firmware that still uses the 'spc' nodes already
      stopped running for other reasons, so let's get rid of this.
      Signed-off-by: default avatarArnd Bergmann <arnd.bergmann@de.ibm.com>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      772920e5
    • Arnd Bergmann's avatar
      [POWERPC] spufs: implement error event delivery to user space · 9add11da
      Arnd Bergmann authored
      
      
      This tries to fix spufs so we have an interface closer to what is
      specified in the man page for events returned in the third argument of
      spu_run.
      
      Fortunately, libspe has never been using the returned contents of that
      register, as they were the same as the return code of spu_run (duh!).
      
      Unlike the specification that we never implemented correctly, we now
      require a SPU_CREATE_EVENTS_ENABLED flag passed to spu_create, in
      order to get the new behavior. When this flag is not passed, spu_run
      will simply ignore the third argument now.
      Signed-off-by: default avatarArnd Bergmann <arnd.bergmann@de.ibm.com>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      9add11da
    • Mark Nutter's avatar
      [POWERPC] spufs: scheduler support for NUMA. · a68cf983
      Mark Nutter authored
      
      
      This patch adds NUMA support to the the spufs scheduler.
      
      The new arch/powerpc/platforms/cell/spufs/sched.c is greatly
      simplified, in an attempt to reduce complexity while adding
      support for NUMA scheduler domains.  SPUs are allocated starting
      from the calling thread's node, moving to others as supported by
      current->cpus_allowed.  Preemption is gone as it was buggy, but
      should be re-enabled in another patch when stable.
      
      The new arch/powerpc/platforms/cell/spu_base.c maintains idle
      lists on a per-node basis, and allows caller to specify which
      node(s) an SPU should be allocated from, while passing -1 tells
      spu_alloc() that any node is allowed.
      
      Since the patch removes the currently implemented preemptive
      scheduling, it is technically a regression, but practically
      all users have since migrated to this version, as it is
      part of the IBM SDK and the yellowdog distribution, so there
      is not much point holding it back while the new preemptive
      scheduling patch gets delayed further.
      Signed-off-by: default avatarArnd Bergmann <arnd.bergmann@de.ibm.com>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      a68cf983
  3. 03 Oct, 2006 1 commit
    • Benjamin Herrenschmidt's avatar
      [POWERPC] Cell interrupt rework · 2e194583
      Benjamin Herrenschmidt authored
      
      
      This patch reworks the cell iic interrupt handling so that:
      
       - Node ID is back in the interrupt number (only one IRQ host is created
      for all nodes). This allows interrupts from sources on another node to
      be routed non-locally. This will allow possibly one day to fix maxcpus=1
      or 2 and still get interrupts from devices on BE 1. (A bit more fixing
      is needed for that) and it will allow us to implement actual affinity
      control of external interrupts.
      
       - Added handling of the IO exceptions interrupts (badly named, but I
      re-used the name initially used by STI). Those are the interrupts
      exposed by IIC_ISR and IIC_IRR, such as the IOC translation exception,
      performance monitor, etc... Those get their special numbers in the IRQ
      number space and are internally implemented as a cascade on unit 0xe,
      class 1 of each node.
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Acked-by: default avatarArnd Bergmann <arnd.bergmann@de.ibm.com>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      2e194583
  4. 25 Sep, 2006 1 commit
  5. 30 Jul, 2006 1 commit
  6. 10 Jul, 2006 1 commit
    • Benjamin Herrenschmidt's avatar
      [PATCH] powerpc: fix trigger handling in the new irq code · 6e99e458
      Benjamin Herrenschmidt authored
      
      
      This patch slightly reworks the new irq code to fix a small design error.  I
      removed the passing of the trigger to the map() calls entirely, it was not a
      good idea to have one call do two different things.  It also fixes a couple of
      corner cases.
      
      Mapping a linux virtual irq to a physical irq now does only that.  Setting the
      trigger is a different action which has a different call.
      
      The main changes are:
      
      - I no longer call host->ops->map() for an already mapped irq, I just return
        the virtual number that was already mapped.  It was called before to give an
        opportunity to change the trigger, but that was causing issues as that could
        happen while the interrupt was in use by a device, and because of the
        trigger change, map would potentially muck around with things in a racy way.
         That was causing much burden on a given's controller implementation of
        map() to get it right.  This is much simpler now.  map() is only called on
        the initial mapping of an irq, meaning that you know that this irq is _not_
        being used.  You can initialize the hardware if you want (though you don't
        have to).
      
      - Controllers that can handle different type of triggers (level/edge/etc...)
        now implement the standard irq_chip->set_type() call as defined by the
        generic code.  That means that you can use the standard set_irq_type() to
        configure an irq line manually if you wish or (though I don't like that
        interface), pass explicit trigger flags to request_irq() as defined by the
        generic kernel interfaces.  Also, using those interfaces guarantees that
        your controller set_type callback is called with the descriptor lock held,
        thus providing locking against activity on the same interrupt (including
        mask/unmask/etc...) automatically.  A result is that, for example, MPIC's
        own map() implementation calls irq_set_type(NONE) to configure the hardware
        to the default triggers.
      
      - To allow the above, the irq_map array entry for the new mapped interrupt
        is now set before map() callback is called for the controller.
      
      - The irq_create_of_mapping() (also used by irq_of_parse_and_map()) function
        for mapping interrupts from the device-tree now also call the separate
        set_irq_type(), and only does so if there is a change in the trigger type.
      
      - While I was at it, I changed pci_read_irq_line() (which is the helper I
        would expect most archs to use in their pcibios_fixup() to get the PCI
        interrupt routing from the device tree) to also handle a fallback when the
        DT mapping fails consisting of reading the PCI_INTERRUPT_PIN to know wether
        the device has an interrupt at all, and the the PCI_INTERRUPT_LINE to get an
        interrupt number from the device.  That number is then mapped using the
        default controller, and the trigger is set to level low.  That default
        behaviour works for several platforms that don't have a proper interrupt
        tree like Pegasos.  If it doesn't work for your platform, then either
        provide a proper interrupt tree from the firmware so that fallback isn't
        needed, or don't call pci_read_irq_line()
      
      - Add back a bit that got dropped by my main rework patch for properly
        clearing pending IPIs on pSeries when using a kexec
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      6e99e458
  7. 03 Jul, 2006 1 commit
    • Benjamin Herrenschmidt's avatar
      [POWERPC] Add new interrupt mapping core and change platforms to use it · 0ebfff14
      Benjamin Herrenschmidt authored
      
      
      This adds the new irq remapper core and removes the old one.  Because
      there are some fundamental conflicts with the old code, like the value
      of NO_IRQ which I'm now setting to 0 (as per discussions with Linus),
      etc..., this commit also changes the relevant platform and driver code
      over to use the new remapper (so as not to cause difficulties later
      in bisecting).
      
      This patch removes the old pre-parsing of the open firmware interrupt
      tree along with all the bogus assumptions it made to try to renumber
      interrupts according to the platform. This is all to be handled by the
      new code now.
      
      For the pSeries XICS interrupt controller, a single remapper host is
      created for the whole machine regardless of how many interrupt
      presentation and source controllers are found, and it's set to match
      any device node that isn't a 8259.  That works fine on pSeries and
      avoids having to deal with some of the complexities of split source
      controllers vs. presentation controllers in the pSeries device trees.
      
      The powerpc i8259 PIC driver now always requests the legacy interrupt
      range. It also has the feature of being able to match any device node
      (including NULL) if passed no device node as an input. That will help
      porting over platforms with broken device-trees like Pegasos who don't
      have a proper interrupt tree.
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      0ebfff14
  8. 02 Jul, 2006 1 commit
  9. 27 Jun, 2006 1 commit
  10. 20 Jun, 2006 7 commits
  11. 01 May, 2006 2 commits
  12. 28 Apr, 2006 1 commit
  13. 26 Mar, 2006 4 commits
    • Arnd Bergmann's avatar
      [PATCH] spufs: Fix endless protection fault on LS writes by SPE. · 79c227a9
      Arnd Bergmann authored
      
      
      If an SPE attempts a DMA put to a local store after already doing
      a get, the kernel must update the HW PTE to allow the write access.
      This case was not being handled correctly.
      
      From: Mike Kistler <mkistler@us.ibm.com>
      Signed-off-by: default avatarMike Kistler <mkistler@us.ibm.com>
      Signed-off-by: default avatarArnd Bergmann <arnd.bergmann@de.ibm.com>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      79c227a9
    • Mark Nutter's avatar
      [PATCH] spufs: enable SPE problem state MMIO access. · 6df10a82
      Mark Nutter authored
      
      
      This patch is layered on top of CONFIG_SPARSEMEM
      and is patterned after direct mapping of LS.
      
      This patch allows mmap() of the following regions:
      "mfc", which represents the area from [0x3000 - 0x3fff];
      "cntl", which represents the area from [0x4000 - 0x4fff];
      "signal1" which begins at offset 0x14000; "signal2" which
      begins at offset 0x1c000.
      
      The signal1 & signal2 files may be mmap()'d by regular user
      processes.  The cntl and mfc file, on the other hand, may
      only be accessed if the owning process has CAP_SYS_RAWIO,
      because they have the potential to confuse the kernel
      with regard to parallel access to the same files with
      regular file operations: the kernel always holds a spinlock
      when accessing registers in these areas to serialize them,
      which can not be guaranteed with user mmaps,
      Signed-off-by: default avatarArnd Bergmann <arnd.bergmann@de.ibm.com>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      6df10a82
    • Arnd Bergmann's avatar
      [PATCH] spufs: implement mfc access for PPE-side DMA · a33a7d73
      Arnd Bergmann authored
      
      
      This patch adds a new file called 'mfc' to each spufs directory.
      The file accepts DMA commands that are a subset of what would
      be legal DMA commands for problem state register access. Upon
      reading the file, a bitmask is returned with the completed
      tag groups set.
      
      The file is meant to be used from an abstraction in libspe
      that is added by a different patch.
      
      From the kernel perspective, this means a process can now
      offload a memory copy from or into an SPE local store
      without having to run code on the SPE itself.
      
      The transfer will only be performed while the SPE is owned
      by one thread that is waiting in the spu_run system call
      and the data will be transferred into that thread's
      address space, independent of which thread started the
      transfer.
      Signed-off-by: default avatarArnd Bergmann <arnd.bergmann@de.ibm.com>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      a33a7d73
    • Ingo Molnar's avatar
      [PATCH] sem2mutex: misc static one-file mutexes · 14cc3e2b
      Ingo Molnar authored
      
      
      Semaphore to mutex conversion.
      
      The conversion was generated via scripts, and the result was validated
      automatically via a script as well.
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Cc: Dave Jones <davej@codemonkey.org.uk>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Jens Axboe <axboe@suse.de>
      Cc: Neil Brown <neilb@cse.unsw.edu.au>
      Acked-by: default avatarAlasdair G Kergon <agk@redhat.com>
      Cc: Greg KH <greg@kroah.com>
      Cc: Dominik Brodowski <linux@dominikbrodowski.net>
      Cc: Adam Belay <ambx1@neo.rr.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      14cc3e2b
  14. 08 Jan, 2006 12 commits