1. 29 11月, 2010 1 次提交
  2. 31 8月, 2010 1 次提交
  3. 15 6月, 2010 1 次提交
  4. 25 5月, 2010 1 次提交
    • S
      powerpc/kexec: Add support for FSL-BookE · b3df895a
      Sebastian Andrzej Siewior 提交于
      This adds support kexec on FSL-BookE where the MMU can not be simply
      switched off. The code borrows the initial MMU-setup code to create the
      identical mapping mapping. The only difference to the original boot code
      is the size of the mapping(s) and the executeable address.
      The kexec code maps the first 2 GiB of memory in 256 MiB steps. This
      should work also on e500v1 boxes.
      SMP support is still not available.
      
      (Kumar: Added minor change to build to ifdef CONFIG_PPC_STD_MMU_64 some
      code that was PPC64 specific)
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      b3df895a
  5. 05 5月, 2010 1 次提交
  6. 09 12月, 2009 1 次提交
  7. 27 8月, 2009 1 次提交
    • J
      powerpc: Fix __flush_icache_range on 44x · 14d75752
      Josh Boyer 提交于
      The ptrace POKETEXT interface allows a process to modify the text pages of
      a child process being ptraced, usually to insert breakpoints via trap
      instructions.  The kernel eventually calls copy_to_user_page, which in turn
      calls __flush_icache_range to invalidate the icache lines for the child
      process.
      
      However, this function does not work on 44x due to the icache being virtually
      indexed.  This was noticed by a breakpoint being triggered after it had been
      cleared by ltrace on a 440EPx board.  The convenient solution is to do a
      flash invalidate of the icache in the __flush_icache_range function.
      Signed-off-by: NJosh Boyer <jwboyer@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      14d75752
  8. 29 12月, 2008 1 次提交
  9. 21 12月, 2008 2 次提交
  10. 18 12月, 2008 1 次提交
    • D
      powerpc/fsl-booke: Fix the miss interrupt restore · 28707af0
      Dave Liu 提交于
      The commit e5e774d8
      powerpc/fsl-booke: Fix problem with _tlbil_va being interrupted
      introduce one issue. that casue the problem like this:
      
      Kernel BUG at c00b19fc [verbose debug info unavailable]
      Oops: Exception in kernel mode, sig: 5 [#1]
      MPC8572 DS
      Modules linked in:
      NIP: c00b19fc LR: c00b1c34 CTR: c0064e88
      REGS: ef02b7b0 TRAP: 0700   Not tainted  (2.6.28-rc8-00057-g1bda7128)
      MSR: 00021000 <ME>  CR: 44048028  XER: 20000000
      TASK = ef02c000[1] 'init' THREAD: ef02a000
      GPR00: 00000001 ef02b860 ef02c000 eec201a0 c0dec2c0 00000000 000078a1 00000400
      GPR08: c00b4e40 000078a1 c048ec00 a1780000 44048028 ecd26917 00000001 ef02b948
      GPR16: ffffffea 0000020c 00000000 00000000 00000003 0000000a 00000000 000078a1
      GPR24: eec201a0 00000000 ed849000 00000400 ef02b95c 00000001 ef02b978 ef02b984
      NIP [c00b19fc] __find_get_block+0x24/0x238
      LR [c00b1c34] __getblk+0x24/0x2a0
      Call Trace:
      [ef02b860] [c017b768] generic_make_request+0x290/0x328 (unreliable)
      [ef02b8b0] [c00b1c34] __getblk+0x24/0x2a0
      [ef02b910] [c00b4ae4] __bread+0x14/0xf8
      [ef02b920] [c00fc228] ext2_get_branch+0xf0/0x138
      [ef02b940] [c00fcc88] ext2_get_block+0xb8/0x828
      [ef02ba00] [c00bbdc8] do_mpage_readpage+0x188/0x808
      [ef02bac0] [c00bc5b4] mpage_readpages+0xec/0x144
      [ef02bb50] [c00fba38] ext2_readpages+0x24/0x34
      [ef02bb60] [c006ade0] __do_page_cache_readahead+0x150/0x230
      [ef02bbb0] [c0064bdc] filemap_fault+0x31c/0x3e0
      [ef02bbf0] [c00728b8] __do_fault+0x60/0x5b0
      [ef02bc50] [c0011e0c] do_page_fault+0x2d8/0x4c4
      [ef02bd10] [c000ed90] handle_page_fault+0xc/0x80
      [ef02bdd0] [c00c7adc] set_brk+0x74/0x9c
      [ef02bdf0] [c00c9274] load_elf_binary+0x70c/0x1180
      [ef02be70] [c00945f0] search_binary_handler+0xa8/0x274
      [ef02bea0] [c0095818] do_execve+0x19c/0x1d4
      [ef02bed0] [c000766c] sys_execve+0x58/0x84
      [ef02bef0] [c000e950] ret_from_syscall+0x0/0x3c
      [ef02bfb0] [c009c6fc] sys_dup+0x24/0x6c
      [ef02bfc0] [c0001e04] init_post+0xb0/0xf0
      [ef02bfd0] [c046c1ac] kernel_init+0xcc/0xf4
      [ef02bff0] [c000e6d0] kernel_thread+0x4c/0x68
      Instruction dump:
      4bffffa4 813f000c 4bffffac 9421ffb0 7c0802a6 7d800026 90010054 bf210034
      91810030 7c0000a6 68008000 54008ffe <0f000000> 3d20c04e 3b29ffb8 38000008
      
      The issue was the beqlr returns early but we haven't reenabled interrupts.
      Signed-off-by: NDave Liu <daveliu@freescale.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      28707af0
  11. 14 12月, 2008 1 次提交
    • K
      powerpc/fsl-booke: Fix problem with _tlbil_va being interrupted · e5e774d8
      Kumar Gala 提交于
      An example calling sequence which we did see:
      
      copy_user_highpage -> kmap_atomic -> flush_tlb_page -> _tlbil_va
      
      We got interrupted after setting up the MAS registers before the
      tlbwe and the interrupt handler that caused the interrupt also did
      a kmap_atomic (ide code) and thus on returning from the interrupt
      the MAS registers no longer contained the proper values.
      
      Since we dont save/restore MAS registers for normal interrupts we
      need to disable interrupts in _tlbil_va to ensure atomicity.
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      e5e774d8
  12. 09 11月, 2008 1 次提交
    • K
      powerpc/fsl-booke: Fix synchronization bug w/local tlb invalidates · b41d6fee
      Kumar Gala 提交于
      The implemetation of _tlbil_pid() on Freescale Book-E cores needs
      an msync & isync after we flash invalidate the TLBs.  This was causing
      the following oops reported by Sebastian Andrzej Siewior:
      
        VFS: Mounted root (nfs filesystem) readonly.
        Freeing unused kernel memory: 148k init
        BUG: sleeping function called from invalid context at /home/bigeasy/git/linux-2.6-powerpc/mm/mmap.c:234
        in_atomic():1, irqs_disabled():0
        Call Trace:
        [df189df0] [c0007160] show_stack+0x48/0x148 (unreliable)
        [df189e30] [c0029480] __might_sleep+0xf0/0x100
        [df189e40] [c0070ac0] remove_vma+0x28/0x98
        [df189e50] [c0070c1c] exit_mmap+0xec/0x128
        [df189e80] [c002d2f4] mmput+0x54/0xec
        [df189ea0] [c0030b6c] exit_mm+0x10c/0x120
        [df189ed0] [c003288c] do_exit+0x1ac/0x6e8
        [df189f20] [c0032e48] do_group_exit+0x80/0xac
        [df189f40] [c000e9dc] ret_from_syscall+0x0/0x3c
        BUG: scheduling while atomic: udevd/956/0x10000002
        Modules linked in:
        Call Trace:
        [df189df0] [c0007160] show_stack+0x48/0x148 (unreliable)
        [df189e30] [c002ac88] __schedule_bug+0x58/0x6c
        [df189e40] [c023e6cc] schedule+0xa8/0x4a8
        [df189e90] [c002ad6c] __cond_resched+0x38/0x64
        [df189ea0] [c023ebc8] _cond_resched+0x3c/0x58
        [df189eb0] [c0030e70] put_files_struct+0x90/0xec
        [df189ed0] [c00328a8] do_exit+0x1c8/0x6e8
        [df189f20] [c0032e48] do_group_exit+0x80/0xac
        [df189f40] [c000e9dc] ret_from_syscall+0x0/0x3c
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      b41d6fee
  13. 10 10月, 2008 1 次提交
  14. 25 9月, 2008 1 次提交
    • K
      powerpc: Introduce local (non-broadcast) forms of tlb invalidates · 0ba3418b
      Kumar Gala 提交于
      Introduced a new set of low level tlb invalidate functions that do not
      broadcast invalidates on the bus:
      
      _tlbil_all - invalidate all
      _tlbil_pid - invalidate based on process id (or mm context)
      _tlbil_va  - invalidate based on virtual address (ea + pid)
      
      On non-SMP configs _tlbil_all should be functionally equivalent to _tlbia and
      _tlbil_va should be functionally equivalent to _tlbie.
      
      The intent of this change is to handle SMP based invalidates via IPIs instead
      of broadcasts as the mechanism scales better for larger number of cores.
      
      On e500 (fsl-booke mmu) based cores move to using MMUCSR for invalidate alls
      and tlbsx/tlbwe for invalidate virtual address.
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      0ba3418b
  15. 18 8月, 2008 1 次提交
  16. 26 6月, 2008 1 次提交
    • K
      powerpc/kprobes: Some minor fixes · b76e59d1
      Kumar Gala 提交于
      * Mark __flush_icache_range as a function that can't be probed since its
        used by the kprobe code.
      
      * Fix an issue with single stepping and async exceptions.  We need to
        ensure that we dont get an async exception (external, decrementer, etc)
        while we are attempting to single step the probe point.
      
        Added a check to ensure we only handle a single step if its really
        intended for the instruction in question.
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      b76e59d1
  17. 29 4月, 2008 1 次提交
    • K
      [POWERPC] Add IRQSTACKS support on ppc32 · 85218827
      Kumar Gala 提交于
      This makes it possible to use separate stacks for hard and soft IRQs
      on 32-bit powerpc as well as on 64-bit.  The code for 32-bit is just
      the 32-bit analog of the 64-bit code.
      
      * Added allocation and initialization of the irq stacks.  We limit the
        stacks to be in lowmem for ppc32.
      * Implemented ppc32 versions of call_do_softirq() and call_handle_irq()
        to switch the stack pointers
      * Reworked how we do stack overflow detection.  We now keep around the
        limit of the stack in the thread_struct and compare against the limit
        to see if we've overflowed.  We can now use this on ppc64 if desired.
      
      [ paulus@samba.org: Fixed bug on 6xx where we need to reload r9 with the
        thread_info pointer. ]
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      85218827
  18. 24 4月, 2008 1 次提交
  19. 13 3月, 2008 1 次提交
  20. 29 1月, 2008 1 次提交
  21. 24 12月, 2007 1 次提交
  22. 11 12月, 2007 1 次提交
  23. 01 11月, 2007 2 次提交
    • B
      [POWERPC] 4xx: Deal with 44x virtually tagged icache · b98ac05d
      Benjamin Herrenschmidt 提交于
      The 44x family has an interesting "feature" which is a virtually
      tagged instruction cache (yuck !). So far, we haven't dealt with
      it properly, which means we've been mostly lucky or people didn't
      report the problems, unless people have been running custom patches
      in their distro...
      
      This is an attempt at fixing it properly. I chose to do it by
      setting a global flag whenever we change a PTE that was previously
      marked executable, and flush the entire instruction cache upon
      return to user space when that happens.
      
      This is a bit heavy handed, but it's hard to do more fine grained
      flushes as the icbi instruction, on those processor, for some very
      strange reasons (since the cache is virtually mapped) still requires
      a valid TLB entry for reading in the target address space, which
      isn't something I want to deal with.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NJosh Boyer <jwboyer@linux.vnet.ibm.com>
      b98ac05d
    • B
      [POWERPC] 4xx: Fix 4xx flush_tlb_page() · e701d269
      Benjamin Herrenschmidt 提交于
      On 4xx CPUs, the current implementation of flush_tlb_page() uses
      a low level _tlbie() assembly function that only works for the
      current PID. Thus, invalidations caused by, for example, a COW
      fault triggered by get_user_pages() from a different context will
      not work properly, causing among other things, gdb breakpoints
      to fail.
      
      This patch adds a "pid" argument to _tlbie() on 4xx processors,
      and uses it to flush entries in the right context. FSL BookE
      also gets the argument but it seems they don't need it (their
      tlbivax form ignores the PID when invalidating according to the
      document I have).
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Acked-by: NKumar Gala <galak@kernel.crashing.org>
      Signed-off-by: NJosh Boyer <jwboyer@linux.vnet.ibm.com>
      e701d269
  24. 15 8月, 2007 1 次提交
    • D
      [POWERPC] Fix small race in 44x tlbie function · aa1cf632
      David Gibson 提交于
      The 440 family of processors don't have a tlbie instruction.  So, we
      implement TLB invalidates by explicitly searching the TLB with tlbsx.,
      then clobbering the relevant entry, if any.  Unfortunately the PID for
      the search needs to be stored in the MMUCR register, which is also
      used by the TLB miss handler.  Interrupts were enabled in _tlbie(), so
      an interrupt between loading the MMUCR and the tlbsx could cause
      incorrect search results, and thus a failure to invalide TLB entries
      which needed to be invalidated.
      
      This fixes the problem in both arch/ppc and arch/powerpc by inhibiting
      interrupts (even critical and debug interrupts) across the relevant
      instructions.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Acked-by: NJosh Boyer <jwboyer@linux.vnet.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      aa1cf632
  25. 14 6月, 2007 1 次提交
    • D
      [POWERPC] Merge CPU features pertaining to icache coherency · 4508dc21
      David Gibson 提交于
      Currently the powerpc kernel has a 64-bit only feature,
      COHERENT_ICACHE used for those CPUS which maintain icache/dcache
      coherency in hardware (POWER5, essentially).  It also has a feature,
      SPLIT_ID_CACHE, which is used on CPUs which have separate i and
      d-caches, which is to say everything except 601 and Freescale E200.
      
      In nearly all the places we check the SPLIT_ID_CACHE, what we actually
      care about is whether the i and d-caches are coherent (which they will
      be, trivially, if they're the same cache).
      
      This tries to clarify the situation a little.  The COHERENT_ICACHE
      feature becomes availble on 32-bit and is set for all CPUs where i and
      d-cache are effectively coherent, whether this is due to special logic
      (POWER5) or because they're unified.  We check this, instead of
      SPLIT_ID_CACHE nearly everywhere.
      
      The SPLIT_ID_CACHE feature itself is replaced by a UNIFIED_ID_CACHE
      feature with reversed sense, set only on 601 and Freescale E200.  In
      the two places (one Freescale BookE specific) where we really care
      whether it's a unified cache, not whether they're coherent, we check
      this feature.  The CPUs with unified cache are so few, we could
      consider replacing this feature bit with explicit checks against the
      PVR.
      
      This will make unifying the 32-bit and 64-bit cache flush code a
      little more straightforward.
      Signed-off-by: NDavid Gibson <dwg@au1.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      4508dc21
  26. 22 3月, 2007 1 次提交
  27. 25 10月, 2006 1 次提交
  28. 02 10月, 2006 1 次提交
    • A
      [PATCH] rename the provided execve functions to kernel_execve · 3db03b4a
      Arnd Bergmann 提交于
      Some architectures provide an execve function that does not set errno, but
      instead returns the result code directly.  Rename these to kernel_execve to
      get the right semantics there.  Moreover, there is no reasone for any of these
      architectures to still provide __KERNEL_SYSCALLS__ or _syscallN macros, so
      remove these right away.
      
      [akpm@osdl.org: build fix]
      [bunk@stusta.de: build fix]
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Andi Kleen <ak@muc.de>
      Acked-by: NPaul Mackerras <paulus@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: Ian Molton <spyro@f2s.com>
      Cc: Mikael Starvik <starvik@axis.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Cc: Hirokazu Takata <takata.hirokazu@renesas.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Kyle McMartin <kyle@mcmartin.ca>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
      Cc: Richard Curnow <rc@rc0.org.uk>
      Cc: William Lee Irwin III <wli@holomorphy.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Cc: Miles Bader <uclinux-v850@lsi.nec.co.jp>
      Cc: Chris Zankel <chris@zankel.net>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Signed-off-by: NAdrian Bunk <bunk@stusta.de>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      3db03b4a
  29. 01 7月, 2006 1 次提交
  30. 28 6月, 2006 1 次提交
  31. 19 5月, 2006 1 次提交
  32. 13 1月, 2006 1 次提交
    • D
      [PATCH] powerpc: Cleanup LOADADDR etc. asm macros · e58c3495
      David Gibson 提交于
      This patch consolidates the variety of macros used for loading 32 or
      64-bit constants in assembler (LOADADDR, LOADBASE, SET_REG_TO_*).  The
      idea is to make the set of macros consistent across 32 and 64 bit and
      to make it more obvious which is the appropriate one to use in a given
      situation.  The new macros and their semantics are described in the
      comments in ppc_asm.h.
      
      In the process, we change several places that were unnecessarily using
      immediate loads on ppc64 to use the GOT/TOC.  Likewise we cleanup a
      couple of places where we were clumsily subtracting PAGE_OFFSET with
      asm instructions to use assemble-time arithmetic or the toreal() macro
      instead.
      Signed-off-by: NDavid Gibson <dwg@au1.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      e58c3495
  33. 09 1月, 2006 1 次提交
    • 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
  34. 18 11月, 2005 1 次提交
    • P
      powerpc: Fix delay functions for 601 processors · 6defa38b
      Paul Mackerras 提交于
      My earlier merge of delay.h introduced a timebase-based udelay for
      32-bit machines but also broke the 601, which doesn't have the
      timebase register.  This fixes it by using the 601's RTC register on
      the 601, and also moves __delay() and udelay() to be out-of-line in
      arch/powerpc/kernel/time.c.  These functions aren't really performance
      critical, after all.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      6defa38b
  35. 10 11月, 2005 1 次提交
    • D
      [PATCH] powerpc: Merge cacheflush.h and cache.h · 26ef5c09
      David Gibson 提交于
      The ppc32 and ppc64 versions of cacheflush.h were almost identical.
      The two versions of cache.h are fairly similar, except for a bunch of
      register definitions in the ppc32 version which probably belong better
      elsewhere.  This patch, therefore, merges both headers.  Notable
      points:
      	- there are several functions in cacheflush.h which exist only
      on ppc32 or only on ppc64.  These are handled by #ifdef for now, but
      these should probably be consolidated, along with the actual code
      behind them later.
      	- Confusingly, both ppc32 and ppc64 have a
      flush_dcache_range(), but they're subtly different: it uses dcbf on
      ppc32 and dcbst on ppc64, ppc64 has a flush_inval_dcache_range() which
      uses dcbf.  These too should be merged and consolidated later.
      	- Also flush_dcache_range() was defined in cacheflush.h on
      ppc64, and in cache.h on ppc32.  In the merged version it's in
      cacheflush.h
      	- On ppc32 flush_icache_range() is a normal function from
      misc.S.  On ppc64, it was wrapper, testing a feature bit before
      calling __flush_icache_range() which does the actual flush.  This
      patch takes the ppc64 approach, which amounts to no change on ppc32,
      since CPU_FTR_COHERENT_ICACHE will never be set there, but does mean
      renaming flush_icache_range() to __flush_icache_range() in
      arch/ppc/kernel/misc.S and arch/powerpc/kernel/misc_32.S
      	- The PReP register info from asm-ppc/cache.h has moved to
      arch/ppc/platforms/prep_setup.c
      	- The 8xx register info from asm-ppc/cache.h has moved to a
      new asm-powerpc/reg_8xx.h, included from reg.h
      	- flush_dcache_all() was defined on ppc32 (only), but was
      never called (although it was exported).  Thus this patch removes it
      from cacheflush.h and from ARCH=powerpc (misc_32.S) entirely.  It's
      left in ARCH=ppc for now, with the prototype moved to ppc_ksyms.c.
      
      Built for Walnut (ARCH=ppc), 32-bit multiplatform (pmac, CHRP and PReP
      ARCH=ppc, pmac and CHRP ARCH=powerpc).  Built and booted on POWER5
      LPAR (ARCH=powerpc and ARCH=ppc64).
      
      Built for 32-bit powermac (ARCH=ppc and ARCH=powerpc).  Built and
      booted on POWER5 LPAR (ARCH=powerpc and ARCH=ppc64).  Built and booted
      on G5 (ARCH=powerpc)
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      26ef5c09
  36. 27 10月, 2005 1 次提交
    • D
      [PATCH] powerpc: Fix handling of fpscr on 64-bit · 25c8a78b
      David Gibson 提交于
      The recent merge of fpu.S broken the handling of fpscr for
      ARCH=powerpc and CONFIG_PPC64=y.  FP registers could be corrupted,
      leading to strange random application crashes.
      
      The confusion arises, because the thread_struct has (and requires) a
      64-bit area to save the fpscr, because we use load/store double
      instructions to get it in to/out of the FPU.  However, only the low
      32-bits are actually used, so we want to treat it as a 32-bit quantity
      when manipulating its bits to avoid extra load/stores on 32-bit.  This
      patch replaces the current definition with a structure of two 32-bit
      quantities (pad and val), to clarify things as much as is possible.
      The 'val' field is used when manipulating bits, the structure itself
      is used when obtaining the address for loading/unloading the value
      from the FPU.
      
      While we're at it, consolidate the 4 (!) almost identical versions of
      cvt_fd() and cvt_df() (arch/ppc/kernel/misc.S,
      arch/ppc64/kernel/misc.S, arch/powerpc/kernel/misc_32.S,
      arch/powerpc/kernel/misc_64.S) into a single version in fpu.S.  The
      new version takes a pointer to thread_struct and applies the correct
      offset itself, rather than a pointer to the fpscr field itself, again
      to avoid confusion as to which is the correct field to use.
      
      Finally, this patch makes ARCH=ppc64 also use the consolidated fpu.S
      code, which it previously did not.
      
      Built for G5 (ARCH=ppc64 and ARCH=powerpc), 32-bit powermac (ARCH=ppc
      and ARCH=powerpc) and Walnut (ARCH=ppc, CONFIG_MATH_EMULATION=y).
      Booted on G5 (ARCH=powerpc) and things which previously fell over no
      longer do.
      Signed-off-by: NDavid Gibson <dwg@au1.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      25c8a78b
  37. 20 10月, 2005 1 次提交
    • P
      powerpc: Merge time.c and asm/time.h. · f2783c15
      Paul Mackerras 提交于
      We now use the merged time.c for both 32-bit and 64-bit compilation
      with ARCH=powerpc, and for ARCH=ppc64, but not for ARCH=ppc32.
      This removes setup_default_decr (folds its function into time_init)
      and moves wakeup_decrementer into time.c.  This also makes an
      asm-powerpc/rtc.h.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      f2783c15
  38. 17 10月, 2005 1 次提交