1. 04 12月, 2006 1 次提交
    • B
      [POWERPC] Make pci_read_irq_line the default · f90bb153
      Benjamin Herrenschmidt 提交于
      This patch reworks the way IRQs are fixed up on PCI for arch powerpc.
      
      It makes pci_read_irq_line() called by default in the PCI code for
      devices that are probed, and add an optional per-device fixup in
      ppc_md for platforms that really need to correct what they obtain
      from pci_read_irq_line().
      
      It also removes ppc_md.irq_bus_setup which was only used by pSeries
      and should not be needed anymore.
      
      I've also removed the pSeries s7a workaround as it can't work with
      the current interrupt code anyway. I'm trying to get one of these
      machines working so I can test a proper fix for that problem.
      
      I also haven't updated the old-style fixup code from 85xx_cds.c
      because it's actually buggy :) It assigns pci_dev->irq hard coded
      numbers which is no good with the new IRQ mapping code. It should
      at least use irq_create_mapping(NULL, hard_coded_number); and possibly
      also set_irq_type() to set them as level low.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      f90bb153
  2. 02 12月, 2006 1 次提交
  3. 30 11月, 2006 1 次提交
  4. 22 11月, 2006 3 次提交
  5. 15 11月, 2006 1 次提交
    • H
      [PATCH] hugetlb: prepare_hugepage_range check offset too · 68589bc3
      Hugh Dickins 提交于
      (David:)
      
      If hugetlbfs_file_mmap() returns a failure to do_mmap_pgoff() - for example,
      because the given file offset is not hugepage aligned - then do_mmap_pgoff
      will go to the unmap_and_free_vma backout path.
      
      But at this stage the vma hasn't been marked as hugepage, and the backout path
      will call unmap_region() on it.  That will eventually call down to the
      non-hugepage version of unmap_page_range().  On ppc64, at least, that will
      cause serious problems if there are any existing hugepage pagetable entries in
      the vicinity - for example if there are any other hugepage mappings under the
      same PUD.  unmap_page_range() will trigger a bad_pud() on the hugepage pud
      entries.  I suspect this will also cause bad problems on ia64, though I don't
      have a machine to test it on.
      
      (Hugh:)
      
      prepare_hugepage_range() should check file offset alignment when it checks
      virtual address and length, to stop MAP_FIXED with a bad huge offset from
      unmapping before it fails further down.  PowerPC should apply the same
      prepare_hugepage_range alignment checks as ia64 and all the others do.
      
      Then none of the alignment checks in hugetlbfs_file_mmap are required (nor
      is the check for too small a mapping); but even so, move up setting of
      VM_HUGETLB and add a comment to warn of what David Gibson discovered - if
      hugetlbfs_file_mmap fails before setting it, do_mmap_pgoff's unmap_region
      when unwinding from error will go the non-huge way, which may cause bad
      behaviour on architectures (powerpc and ia64) which segregate their huge
      mappings into a separate region of the address space.
      Signed-off-by: NHugh Dickins <hugh@veritas.com>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Acked-by: NAdam Litke <agl@us.ibm.com>
      Acked-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      68589bc3
  6. 13 11月, 2006 14 次提交
  7. 10 11月, 2006 3 次提交
  8. 09 11月, 2006 1 次提交
  9. 02 11月, 2006 1 次提交
  10. 01 11月, 2006 7 次提交
    • B
      [POWERPC] Make alignment exception always check exception table · 4393c4f6
      Benjamin Herrenschmidt 提交于
      The alignment exception used to only check the exception table for
      -EFAULT, not for other errors. That opens an oops window if we can
      coerce the kernel into getting an alignment exception for other reasons
      in what would normally be a user-protected accessor, which can be done
      via some of the futex ops. This fixes it by always checking the
      exception tables.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      4393c4f6
    • G
      [POWERPC] Disallow kprobes on emulate_step and branch_taken · 0d69a052
      Gui,Jian 提交于
      On powerpc, probing on emulate_step function will crash 2.6.18.1 when
      it is triggered.
      
      When kprobe is triggered, emulate_step() is on its kernel path and
      will cause recursive kprobe fault.  And branch_taken() is called
      in emulate_step().  This disallows kprobes on both of them.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      0d69a052
    • H
      [POWERPC] Make high hugepage areas preempt safe · 96268889
      Hugh Dickins 提交于
      Checking source for other get_paca()->field preemption dangers found that
      open_high_hpage_areas does a structure copy into its paca while preemption
      is enabled: unsafe however gcc accomplishes it.  Just remove that copy:
      it's done safely afterwards by on_each_cpu, as in open_low_hpage_areas.
      Signed-off-by: NHugh Dickins <hugh@veritas.com>
      Acked-by: NDavid Gibson <dwg@au1.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      96268889
    • T
      [POWERPC] qe_lib: qe_issue_cmd writes wrong value to CECDR · 302439d2
      Timur Tabi 提交于
      Changed qe_issue_cmd() to write cmd_input to the CECDR unmodified.  It
      was treating cmd_input as a virtual address and tried to convert it to
      a physical address.
      Signed-off-by: NTimur Tabi <timur@freescale.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      302439d2
    • L
      [POWERPC] Use 4kB iommu pages even on 64kB-page systems · 5d2efba6
      Linas Vepstas 提交于
      The 10Gigabit ethernet device drivers appear to be able to chew
      up all 256MB of TCE mappings on pSeries systems, as evidenced by
      numerous error messages:
      
       iommu_alloc failed, tbl c0000000010d5c48 vaddr c0000000d875eff0 npages 1
      
      Some experimentation indicates that this is essentially because
      one 1500 byte ethernet MTU gets mapped as a 64K DMA region when
      the large 64K pages are enabled. Thus, it doesn't take much to
      exhaust all of the available DMA mappings for a high-speed card.
      
      This patch changes the iommu allocator to work with its own
      unique, distinct page size. Although the patch is long, its
      actually quite simple: it just #defines a distinct IOMMU_PAGE_SIZE
      and then uses this in all the places that matter.
      
      As a side effect, it also dramatically improves network performance
      on platforms with H-calls on iommu translation inserts/removes (since
      we no longer call it 16 times for a 1500 bytes packet when the iommu HW
      is still 4k).
      
      In the future, we might want to make the IOMMU_PAGE_SIZE a variable
      in the iommu_table instance, thus allowing support for different HW
      page sizes in the iommu itself.
      Signed-off-by: NLinas Vepstas <linas@austin.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Acked-by: NOlof Johansson <olof@lixom.net>
      Acked-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      5d2efba6
    • 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
    • B
      [POWERPC] Fix various offb issues · 441cbd8d
      Benjamin Herrenschmidt 提交于
      This patch fixes a few issues in offb:
      
       - A test was inverted causing the palette hack to never work
      (no device node was passed down to the init function)
      
       - Some cards seem to have their assigned-addresses property in a random
      order, thus we need to try using of_get_pci_address() first, which will
      fail if it's not a PCI device, and fallback to of_get_address() in that
      case. of_get_pci_address() properly parsees assigned-addresses to test
      the BAR number and thus will get it right whatever the order is.
      
       - Some cards (like GXT4500) provide a linebytes of 0xffffffff in the
      device-tree which does no good. This patch handles that by using the
      screen width when that happens. (Also fixes btext.c while at it).
      
       - Add detection of the GXT4500 in addition to the GXT2000 for the
      palette hacks (we use the same hack, palette is linear in register space
      at offset 0x6000).
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      441cbd8d
  11. 28 10月, 2006 1 次提交
  12. 26 10月, 2006 1 次提交
  13. 25 10月, 2006 5 次提交
    • C
      [POWERPC] cell: add cpufreq driver for Cell BE processor · 36ca4ba4
      Christian Krafft 提交于
      This patch adds a cpufreq backend driver to enable frequency scaling on cell.
      Signed-off-by: NChristian Krafft <krafft@de.ibm.com>
      Signed-off-by: NArnd Bergmann <arnd.bergmann@de.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      36ca4ba4
    • M
      [POWERPC] add support for dumping spu info from xmon · a8984970
      Michael Ellerman 提交于
      This patch adds a command to xmon for dumping information about
      spu structs. The command is 'sf' for "spu fields" perhaps, and
      takes the spu number as an argument. This is the same value as the
      spu->number field, or the "phys-id" value of a context when it is
      bound to a physical spu.
      
      We try to catch memory errors as we dump each field, hopefully this
      will make the command reasonably robust, but YMMV. If people see a
      need we can easily add more fields to the dump in future.
      
      Output looks something like this:
      
      0:mon> sf 0
      Dumping spu fields at address c00000001ffd9e80:
        number                  = 0x0
        name                    = spe
        devnode->full_name      = /cpus/PowerPC,BE@0/spes/spe@0
        nid                     = 0x0
        local_store_phys        = 0x20000000000
        local_store             = 0xd0000800801e0000
        ls_size                 = 0x0
        isrc                    = 0x4
        node                    = 0x0
        flags                   = 0x0
        dar                     = 0x0
        dsisr                   = 0x0
        class_0_pending         = 0
        irqs[0]                 = 0x16
        irqs[1]                 = 0x17
        irqs[2]                 = 0x24
        slb_replace             = 0x0
        pid                     = 0
        prio                    = 0
        mm                      = 0x0000000000000000
        ctx                     = 0x0000000000000000
        rq                      = 0x0000000000000000
        timestamp               = 0x0000000000000000
        problem_phys            = 0x20000040000
        problem                 = 0xd000080080220000
        problem->spu_runcntl_RW = 0x0
        problem->spu_status_R   = 0x0
        problem->spu_npc_RW     = 0x0
        priv1                   = 0xd000080080240000
        priv1->mfc_sr1_RW       = 0x33
        priv2                   = 0xd000080080250000
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: NArnd Bergmann <arnd.bergmann@de.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      a8984970
    • M
      [POWERPC] add support for stopping spus from xmon · ff8a8f25
      Michael Ellerman 提交于
      This patch adds support for stopping, and restarting, spus
      from xmon. We use the spu master runcntl bit to stop execution,
      this is apparently the "right" way to control spu execution and
      spufs will be changed in the future to use this bit.
      
      Testing has shown that to restart execution we have to turn the
      master runcntl bit on and also rewrite the spu runcntl bit, even
      if it is already set to 1 (running).
      
      Stopping spus is triggered by the xmon command 'ss' - "spus stop"
      perhaps. Restarting them is triggered via 'sr'. Restart doesn't
      start execution on spus unless they were running prior to being
      stopped by xmon.
      
      Walking the spu->full_list in xmon after a panic, would mean
      corruption of any spu struct would make all the others
      inaccessible. To avoid this, and also to make the next patch
      easier, we cache pointers to all spus during boot.
      
      We attempt to catch and recover from errors while stopping and
      restarting the spus, but as with most xmon functionality there are
      no guarantees that performing these operations won't crash xmon
      itself.
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: NArnd Bergmann <arnd.bergmann@de.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      ff8a8f25
    • A
      [POWERPC] cell: use ppc_md->power_save instead of cbe_idle_loop · 302eca18
      arnd@arndb.de 提交于
      This moves the cell idle function to use the default cpu_idle
      with a special power_save callback, like all other platforms
      except iSeries already do.
      
      It also makes it possible to disable this power_save function
      with a new powerpc-specific boot option "powersave=off".
      Signed-off-by: NArnd Bergmann <arnd.bergmann@de.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      302eca18
    • C
      [POWERPC] cell: add temperature to SPU and CPU sysfs entries · b3d7dc19
      Christian Krafft 提交于
      This patch adds a module that registers sysfs attributes to CPU and SPU
      containing the temperature of the CBE.
      
      They can be found under
      /sys/devices/system/spu/cpuX/thermal/temperature[0|1]
      /sys/devices/system/spu/spuX/thermal/temperature
      
      The temperature is read from the on-chip temperature sensors.
      Signed-off-by: NChristian Krafft <krafft@de.ibm.com>
      Signed-off-by: NArnd Bergmann <arnd.bergmann@de.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      b3d7dc19