1. 30 7月, 2009 7 次提交
  2. 28 7月, 2009 1 次提交
    • B
      mm: Pass virtual address to [__]p{te,ud,md}_free_tlb() · 9e1b32ca
      Benjamin Herrenschmidt 提交于
      mm: Pass virtual address to [__]p{te,ud,md}_free_tlb()
      
      Upcoming paches to support the new 64-bit "BookE" powerpc architecture
      will need to have the virtual address corresponding to PTE page when
      freeing it, due to the way the HW table walker works.
      
      Basically, the TLB can be loaded with "large" pages that cover the whole
      virtual space (well, sort-of, half of it actually) represented by a PTE
      page, and which contain an "indirect" bit indicating that this TLB entry
      RPN points to an array of PTEs from which the TLB can then create direct
      entries. Thus, in order to invalidate those when PTE pages are deleted,
      we need the virtual address to pass to tlbilx or tlbivax instructions.
      
      The old trick of sticking it somewhere in the PTE page struct page sucks
      too much, the address is almost readily available in all call sites and
      almost everybody implemets these as macros, so we may as well add the
      argument everywhere. I added it to the pmd and pud variants for consistency.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Acked-by: David Howells <dhowells@redhat.com> [MN10300 & FRV]
      Acked-by: NNick Piggin <npiggin@suse.de>
      Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com> [s390]
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      9e1b32ca
  3. 15 7月, 2009 2 次提交
  4. 13 7月, 2009 1 次提交
  5. 11 7月, 2009 1 次提交
  6. 08 7月, 2009 11 次提交
  7. 05 7月, 2009 1 次提交
  8. 06 7月, 2009 2 次提交
  9. 01 7月, 2009 1 次提交
  10. 26 6月, 2009 13 次提交
    • B
      powerpc/mm: Fix potential access to freed pages when using hugetlbfs · 6c16a74d
      Benjamin Herrenschmidt 提交于
      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: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      6c16a74d
    • B
      powerpc/440: Fix warning early debug code · f694cda8
      Benjamin Herrenschmidt 提交于
      The function udbg_44x_as1_flush() has the wrong prototype causing
      a warning when enabling 440 early debug.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      f694cda8
    • B
      powerpc/of: Fix usage of dev_set_name() in of_device_alloc() · 03c01aa7
      Benjamin Herrenschmidt 提交于
      dev_set_name() takes a format string, so use it properly and avoid
      a warning with recent gcc's
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      03c01aa7
    • B
      powerpc/pasemi: Use raw spinlock in SMP TB sync · 6893ce6c
      Benjamin Herrenschmidt 提交于
      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: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      6893ce6c
    • B
      powerpc: Use one common impl. of RTAS timebase sync and use raw spinlock · c4007a2f
      Benjamin Herrenschmidt 提交于
      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: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      c4007a2f
    • B
      powerpc/rtas: Turn rtas lock into a raw spinlock · f97bb36f
      Benjamin Herrenschmidt 提交于
      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: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      f97bb36f
    • B
      powerpc: Add irqtrace support for 32-bit powerpc · 5d38902c
      Benjamin Herrenschmidt 提交于
      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: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Tested-by: NKumar Gala <galak@kernel.crashing.org>
      5d38902c
    • B
      powerpc: Map more memory early on 601 processors · 4a5cbf17
      Benjamin Herrenschmidt 提交于
      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: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      4a5cbf17
    • B
      powerpc/mm: Make k(un)map_atomic out of line · 850f6ac3
      Benjamin Herrenschmidt 提交于
      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: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      850f6ac3
    • K
      powerpc: Fix mpic alloc warning · 85355bb2
      Kumar Gala 提交于
      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: NKumar Gala <galak@kernel.crashing.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      85355bb2
    • K
      powerpc: Fix output from show_regs · a2367194
      Kumar Gala 提交于
      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: NKumar Gala <galak@kernel.crashing.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      a2367194
    • B
      powerpc/pmac: Fix issues with PowerMac "PowerSurge" SMP · 7ccbe504
      Benjamin Herrenschmidt 提交于
      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: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      7ccbe504
    • G
      powerpc/amigaone: Limit ISA I/O range to 4k in the device tree · 6bb2ae53
      Gerhard Pircher 提交于
      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: NGerhard Pircher <gerhard_pircher@gmx.net>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      6bb2ae53