1. 06 Jul, 2009 2 commits
  2. 26 Jun, 2009 23 commits
    • Benjamin Herrenschmidt's avatar
      fd0cca75
    • Adrian Reber's avatar
      powerpc/rtas: Fix watchdog driver temperature read functionality · 5ba762c9
      Adrian Reber authored
      Using the RTAS watchdog driver to read out the temperature crashes
      on a PXCAB:
      
      Unable to handle kernel paging request for data at address 0xfe347b50
      Faulting instruction address: 0xc00000000001af64
      Oops: Kernel access of bad area, sig: 11 [#1]
      
      The wrong usage of "(void *)__pa(&temperature)" in rtas_call() is
      removed by using the function rtas_get_sensor() which does the
      right thing.
      Signed-off-by: default avatarAdrian Reber <adrian@lisas.de>
      Acked-by: default avatarUtz Bacher <utz.bacher@de.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      5ba762c9
    • Benjamin Herrenschmidt's avatar
      powerpc/mm: Fix potential access to freed pages when using hugetlbfs · 6c16a74d
      Benjamin Herrenschmidt authored
      When using 64k page sizes, our PTE pages are split in two halves,
      the second half containing the "extension" used to keep track of
      individual 4k pages when not using HW 64k pages.
      
      However, our page tables used for hugetlb have a slightly different
      format and don't carry that "second half".
      
      Our code that batched PTEs to be invalidated unconditionally reads
      the "second half" (to put it into the batch), which means that when
      called to invalidate hugetlb PTEs, it will access unrelated memory.
      
      It breaks when CONFIG_DEBUG_PAGEALLOC is enabled.
      
      This fixes it by only accessing the second half when the _PAGE_COMBO
      bit is set in the first half, which indicates that we are dealing with
      a "combo" page which represents 16x4k subpages. Anything else shouldn't
      have this bit set and thus not require loading from the second half.
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      6c16a74d
    • Benjamin Herrenschmidt's avatar
      powerpc/440: Fix warning early debug code · f694cda8
      Benjamin Herrenschmidt authored
      The function udbg_44x_as1_flush() has the wrong prototype causing
      a warning when enabling 440 early debug.
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      f694cda8
    • Benjamin Herrenschmidt's avatar
      powerpc/of: Fix usage of dev_set_name() in of_device_alloc() · 03c01aa7
      Benjamin Herrenschmidt authored
      dev_set_name() takes a format string, so use it properly and avoid
      a warning with recent gcc's
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      03c01aa7
    • Benjamin Herrenschmidt's avatar
      powerpc/pasemi: Use raw spinlock in SMP TB sync · 6893ce6c
      Benjamin Herrenschmidt authored
      spin_lock() can hang if called while the timebase is frozen,
      so use a raw lock instead, also disable interrupts while
      at it.
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      6893ce6c
    • Benjamin Herrenschmidt's avatar
      powerpc: Use one common impl. of RTAS timebase sync and use raw spinlock · c4007a2f
      Benjamin Herrenschmidt authored
      Several platforms use their own copy of what is essentially the same code,
      using RTAS to synchronize the timebases when bringing up new CPUs. This
      moves it all into a single common implementation and additionally
      turns the spinlock into a raw spinlock since the former can rely on
      the timebase not being frozen when spinlock debugging is enabled, and finally
      masks interrupts while the timebase is disabled.
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      c4007a2f
    • Benjamin Herrenschmidt's avatar
      powerpc/rtas: Turn rtas lock into a raw spinlock · f97bb36f
      Benjamin Herrenschmidt authored
      RTAS currently uses a normal spinlock. However it can be called from
      contexts where this is not necessarily a good idea. For example, it
      can be called while syncing timebases, with the core timebase being
      frozen. Unfortunately, that will deadlock in case of lock contention
      when spinlock debugging is enabled as the spin lock debugging code
      will try to use __delay() which ... relies on the timebase being
      enabled.
      
      Also RTAS can be used in some low level IRQ handling code path so it
      may as well be a raw spinlock for -rt sake.
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      f97bb36f
    • Benjamin Herrenschmidt's avatar
      powerpc: Add irqtrace support for 32-bit powerpc · 5d38902c
      Benjamin Herrenschmidt authored
      Based on initial work from: Dale Farnsworth <dale@farnsworth.org>
      
      Add the low level irq tracing hooks for 32-bit powerpc needed
      to enable full lockdep functionality.
      
      The approach taken to deal with the code in entry_32.S is that
      we don't trace all the transitions of MSR:EE when we just turn
      it off to peek at TI_FLAGS without races. Only when we are
      calling into C code or returning from exceptions with a state
      that have changed from what lockdep thinks.
      
      There's a little bugger though: If we take an exception that
      keeps interrupts enabled (such as an alignment exception) while
      interrupts are enabled, we will call trace_hardirqs_on() on the
      way back spurriously. Not a big deal, but to get rid of it would
      require remembering in pt_regs that the exception was one of the
      type that kept interrupts enabled which we don't know at this
      stage. (Well, we could test all cases for regs->trap but that
      sucks too much).
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Tested-by: default avatarKumar Gala <galak@kernel.crashing.org>
      5d38902c
    • Sonny Rao's avatar
      powerpc/BSR: Fix BSR to allow mmap of small BSR on 64k kernel · 04a85d12
      Sonny Rao authored
      On Mon, Nov 17, 2008 at 01:26:13AM -0600, Sonny Rao wrote:
      > On Fri, Nov 07, 2008 at 04:28:29PM +1100, Paul Mackerras wrote:
      > > Sonny Rao writes:
      > >
      > > > Fix the BSR driver to allow small BSR devices, which are limited to a
      > > > single 4k space, on a 64k page kernel.  Previously the driver would
      > > > reject the mmap since the size was smaller than PAGESIZE (or because
      > > > the size was greater than the size of the device).  Now, we check for
      > > > this case use remap_4k_pfn(). Also, take out code to set vm_flags,
      > > > as the remap_pfn functions will do this for us.
      > >
      > > Thanks.
      > >
      > > Do we know that the BSR size will always be 4k if it's not a multiple
      > > of 64k?  Is it possible that we could get 8k, 16k or 32k or BSRs?
      > > If it is possible, what does the user need to be able to do?  Do they
      > > just want to map 4k, or might then want to map the whole thing?
      >
      >
      > Hi Paul, I took a look at changing the driver to reject a request for
      > mapping more than a single 4k page, however the only indication we get
      > of the requested size in the mmap function is the vma size, and this
      > is always one page at minimum.  So, it's not possible to determine if
      > the user wants one 4k page or more.  As I noted in my first response,
      > there is only one case where this is even possible and I don't think
      > it is a significant concern.
      >
      > I did notice that I left out the check to see if the user is trying to
      > map more than the device length, so I fixed that.  Here's the revised
      > patch.
      
      Alright, I've reworked this now so that if we get one of these cases
      where there's a bsr that's > 4k and < 64k on a 64k kernel we'll only
      advertise that it is a 4k BSR to userspace.  I think this is the best
      solution since user programs are only supposed to look at sysfs to
      determine how much can be mapped, and libbsr does this as well.
      
      Please consider for 2.6.31 as a fix, thanks.
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      04a85d12
    • Sonny Rao's avatar
      powerpc/BSR: add 4096 byte BSR size · e4031d52
      Sonny Rao authored
      Add a 4096 byte BSR size which will be used on new machines.  Also, remove
      the warning when we run into an unknown size, as this can spam the kernel
      log excessively.
      Signed-off-by: default avatarSonny Rao <sonnyrao@us.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      e4031d52
    • Benjamin Herrenschmidt's avatar
      powerpc: Map more memory early on 601 processors · 4a5cbf17
      Benjamin Herrenschmidt authored
      The 32-bit kernel relies on some memory being mapped covering
      the kernel text,data and bss at least, early during boot before
      the full MMU setup is done. On 32-bit "classic" processors, this
      is done using BAT registers.
      
      On 601, the size of BATs is limited to 8M and we use 2 of them
      for that initial mapping. This can become quite tight when enabling
      features like lockdep, so let's use a 3rd one to bump that mapping
      from 16M to 24M. We keep the 4th BAT free as it can be useful for
      debugging early boot code to map things like serial ports.
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      4a5cbf17
    • Benjamin Herrenschmidt's avatar
      powerpc/pmac: Fix DMA ops for MacIO devices · 3514141a
      Benjamin Herrenschmidt authored
      The macio_dev's created to map devices inside the MacIO ASICs
      don't have proper dma_ops. This causes crashes on some machines
      since the SCSI code calls dma_map_* on our behalf using the
      device we hang from.
      
      This fixes it by copying the parent PCI device dma_ops into
      the macio_dev when creating it.
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      3514141a
    • Benjamin Herrenschmidt's avatar
      powerpc/mm: Make k(un)map_atomic out of line · 850f6ac3
      Benjamin Herrenschmidt authored
      Those functions are way too big to be inline, besides, kmap_atomic()
      wants to call debug_kmap_atomic() which isn't exported for modules
      and causes module link failures.
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      850f6ac3
    • Kumar Gala's avatar
      powerpc: Fix mpic alloc warning · 85355bb2
      Kumar Gala authored
      Since we can use kmalloc earlier we are getting the following since the
      mpic_alloc() code calls alloc_bootmem().  Move to using kzalloc() to
      remove the warning.
      
      ------------[ cut here ]------------
      Badness at c0583248 [verbose debug info unavailable]
      NIP: c0583248 LR: c0583210 CTR: 00000004
      REGS: c0741de0 TRAP: 0700   Not tainted  (2.6.30-06736-g12a31df)
      MSR: 00021000 <ME,CE>  CR: 22024024  XER: 00000000
      TASK = c070d3b8[0] 'swapper' THREAD: c0740000 CPU: 0
      <6>GPR00: 00000001 c0741e90 c070d3b8 00000001 00000210 00000020 3fffffff 00000000
      <6>GPR08: 00000000 c0c85700 c04f8c40 0000002d 22044022 1004a388 7ffd9400 00000000
      <6>GPR16: 00000000 7ffcd100 7ffcd100 7ffcd100 c04f8c40 00000000 c059f62c c075a0c0
      <6>GPR24: c059f648 00000000 0000000f 00000210 00000020 00000000 3fffffff 00000210
      NIP [c0583248] alloc_arch_preferred_bootmem+0x50/0x80
      LR [c0583210] alloc_arch_preferred_bootmem+0x18/0x80
      Call Trace:
      [c0741e90] [c07343b0] devtree_lock+0x0/0x24 (unreliable)
      [c0741ea0] [c0583b14] ___alloc_bootmem_nopanic+0x54/0x108
      [c0741ee0] [c0583e18] ___alloc_bootmem+0x18/0x50
      [c0741ef0] [c057b9cc] mpic_alloc+0x48/0x710
      [c0741f40] [c057ecf4] mpc85xx_ds_pic_init+0x190/0x1b8
      [c0741f90] [c057633c] init_IRQ+0x24/0x34
      [c0741fa0] [c05738b8] start_kernel+0x260/0x3dc
      [c0741ff0] [c00003c8] skpinv+0x2e0/0x31c
      Instruction dump:
      409e001c 7c030378 80010014 83e1000c 38210010 7c0803a6 4e800020 3d20c0c8
      39295700 80090004 7c000034 5400d97e <0f000000> 2f800000 409e001c 38800000
      
      BenH: Changed to use GFP_KERNEL, the allocator will do the right thing
      Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      85355bb2
    • Kumar Gala's avatar
      powerpc: Fix output from show_regs · a2367194
      Kumar Gala authored
      For some reason we've had an explicit KERN_INFO for GPR dumps.  With
      recent changes we get output like:
      
      <6>GPR00: 00000000 ef855eb0 ef858000 00000001 000000d0 f1000000 ffbc8000 ffffffff
      
      The KERN_INFO is causing the <6>.  Don't see any reason to keep it
      around.
      Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      a2367194
    • Benjamin Herrenschmidt's avatar
      powerpc/pmac: Fix issues with PowerMac "PowerSurge" SMP · 7ccbe504
      Benjamin Herrenschmidt authored
      The old PowerSurge SMP (ie, dual or quad 604 machines) code has
      numerous issues in modern world.
      
      One is cpu_possible_map is set too late (the device-tree is bogus)
      so we fail to allocate the interrupt stacks and crash. Another
      problem is the fact the timebase is frozen by the bringup of the
      second CPU so the delays in the generic code will hang, we need
      to move some of the calling procedure to inside the powermac code.
      
      This makes it boot again for me
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      7ccbe504
    • Gerhard Pircher's avatar
      powerpc/amigaone: Limit ISA I/O range to 4k in the device tree · 6bb2ae53
      Gerhard Pircher authored
      The kernel reserves the I/O address space from 0x0 to 0xfff for legacy
      ISA devices. Change the ranges property for the PCI2ISA bridge to match
      the kernels behavior, even if the ranges property isn't used for now.
      Signed-off-by: default avatarGerhard Pircher <gerhard_pircher@gmx.net>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      6bb2ae53
    • Sean MacLennan's avatar
      powerpc/warp: Platform fix for i2c change · 3984114f
      Sean MacLennan authored
      A change to the i2c subsystem breaks the warp platform code. The patch
      is cleaner anyway, the old way was a bit crufty.
      
      For those with keen eyes, the gratuitous change in the string from
      PIKA to Warp is just so the logs look a bit nicer. The following two
      lines tend to be printed one after another.
      
        Warp POST OK
        Warp DTM thread running.
      
      Yeah, this will be the third patch to warp.c submitted in this
      release....
      
      Cheers,
         Sean
      
      The i2c_client struct changed, breaking the code that looked for the ad7414
      chip. Use the new of_find_i2c_device_by_node function added in 2.6.29.
      Signed-off-by: default avatarSean MacLennan <smaclennan@pikatech.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      3984114f
    • Jon Smirl's avatar
      powerpc: Have git ignore generated files from dtc compile · b810c6ec
      Jon Smirl authored
      Have git ignore generated files from dtc compile
      Signed-off-by: default avatarJon Smirl <jonsmirl@gmail.com>
      Acked-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      Acked-by: default avatarSean MacLennan <smaclennan@pikatech.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      b810c6ec
    • Benjamin Herrenschmidt's avatar
      powerpc/mpic: Fix mapping of "DCR" based MPIC variants · 5a2642f6
      Benjamin Herrenschmidt authored
      Commit 31207dab
      "Fix incorrect allocation of interrupt rev-map"
      introduced a regression crashing on boot on machines using
      a "DCR" based MPIC, such as the Cell blades.
      
      The reason is that the irq host data structure is initialized
      much later as a result of that patch, causing our calls to
      mpic_map() do be done before we have a host setup.
      
      Unfortunately, this breaks _mpic_map_dcr() which uses the
      mpic->irqhost to get to the device node.
      
      This fixes it by, instead, passing the device node explicitely
      to mpic_map().
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Acked-by: default avatarAkira Tsukamoto <akirat@rd.scei.sony.co.jp>
      5a2642f6
    • Michael Ellerman's avatar
      powerpc: Swiotlb breaks pseries · 6f0b1c60
      Michael Ellerman authored
      Turning on SWIOTLB selects or enables PPC_NEED_DMA_SYNC_OPS, which means
      we get the non empty versions of dma_sync_* in asm/dma-mapping.h
      
      On my pseries machine the dma_ops have no such routines and we die with
      a null pointer - this patch gets it booting, is there a more elegant way
      to do it?
      Signed-off-by: default avatarMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      6f0b1c60
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 · 987fed3b
      Linus Torvalds authored
      * 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (28 commits)
        drm: remove unused #include <linux/version.h>'s
        drm/radeon: fix driver initialization order so radeon kms can be builtin
        drm: Fix shifts which were miscalculated when converting from bitfields.
        drm/radeon: Clear surface registers at initialization time.
        drm/radeon: Don't initialize acceleration related fields of struct fb_info.
        drm/radeon: fix radeon kms framebuffer device
        drm/i915: initialize fence registers to zero when loading GEM
        drm/i915: Fix HDMI regression introduced in new chipset support
        drm/i915: fix LFP data fetch
        drm/i915: set TV detection mode when tv is already connected
        drm/i915: Catch up to obj_priv->page_list rename in disabled debug code.
        drm/i915: Fix size_t handling in off-by-default debug printfs
        drm/i915: Don't change the blank/sync width when calculating scaled modes
        drm/i915: Add support for changing LVDS panel fitting using an output property.
        drm/i915: correct suspend/resume ordering
        drm/i915: Add missing dependency on Intel AGP support.
        drm/i915: Generate 2MHz clock for display port aux channel I/O. Retry I/O.
        drm/i915: Clarify error returns from display port aux channel I/O
        drm/i915: Add CLKCFG register definition
        drm/i915: Split array of DAC limits into separate structures.
        ...
      987fed3b
  3. 25 Jun, 2009 9 commits
  4. 24 Jun, 2009 6 commits