1. 09 1月, 2006 3 次提交
    • K
      [PATCH] powerpc: moved ipic code to arch/powerpc · 1cd8e506
      Kumar Gala 提交于
      Moved 83xx and QUICC Engine interrupt handling code into arch/powerpc
      as a precursor of getting 83xx sub-arch building in arch/powerpc.
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      1cd8e506
    • 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
    • A
      [PATCH] PPC_PREP: remove unneeded exports · afcc2472
      Adrian Bunk 提交于
      This patch removes the EXPORT_SYMBOL'ed but completely unused variable
      ucSystemType and removes the unneeded EXPORT_SYMBOL(_prep_type).
      Signed-off-by: NAdrian Bunk <bunk@stusta.de>
      Acked-by: NTom Rini <trini@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      afcc2472
  2. 07 1月, 2006 9 次提交
  3. 20 12月, 2005 1 次提交
  4. 17 12月, 2005 1 次提交
  5. 12 12月, 2005 2 次提交
  6. 05 12月, 2005 1 次提交
    • P
      ppc: Build in all three of powermac, PREP and CHRP support · b6d78157
      Paul Mackerras 提交于
      This reverts commit da0825fd, making
      it so that if you select CONFIG_PPC_MULTIPLATFORM you get support
      for PMAC, PREP and CHRP built in.
      
      The reason for not allowing PMAC, PREP and CHRP to be selected
      individually for ARCH=ppc is that there is too much interdependency
      between them in the platform support code.  For example, CHRP uses
      the PMAC nvram code.
      
      Configuring with ARCH=powerpc does allow you to select support for
      PMAC and CHRP separately.  Support for PREP is not there yet but
      should be there soon.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      b6d78157
  7. 02 12月, 2005 2 次提交
  8. 30 11月, 2005 2 次提交
    • P
      [PATCH] ppc: fix floating point register corruption · 9f232a12
      Paolo Galtieri 提交于
      I recently discovered a bug on PPC which causes the floating point
      registers to get corrupted when CONFIG_PREEMPT=y.
      
      The problem occurred while running a multi threaded Java application that
      does floating point.  The problem could be reproduced in anywhere from 2 to
      6 hours.  With the patch I have included below it ran for over a week
      without failure.
      Signed-off-by: NPaolo Galtieri <pgaltieri@mvista.com>
      Cc: Kumar Gala <galak@gate.crashing.org>
      Cc: Matt Porter <mporter@kernel.crashing.org>
      Cc: Tom Rini <trini@kernel.crashing.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      9f232a12
    • P
      [PATCH] ppc: fix floating point register corruption · 8117ce76
      Paolo Galtieri 提交于
      I recently discovered a bug on PPC which causes the floating point
      registers to get corrupted when CONFIG_PREEMPT=y.
      
      The problem occurred while running a multi threaded Java application that
      does floating point.  The problem could be reproduced in anywhere from 2 to
      6 hours.  With the patch I have included below it ran for over a week
      without failure.
      Signed-off-by: NPaolo Galtieri <pgaltieri@mvista.com>
      Cc: Kumar Gala <galak@gate.crashing.org>
      Cc: Matt Porter <mporter@kernel.crashing.org>
      Cc: Tom Rini <trini@kernel.crashing.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      8117ce76
  9. 29 11月, 2005 1 次提交
  10. 18 11月, 2005 5 次提交
  11. 16 11月, 2005 3 次提交
    • B
      [PATCH] ppc: Fix build with CONFIG_CHRP not set · d3ed6583
      Benjamin Herrenschmidt 提交于
      Building ARCH=ppc for multiplatforms with CONFIG_CHRP not set fails
      due to some unshielded code in xmon
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      d3ed6583
    • B
      [PATCH] ppc: Fix boot with yaboot with ARCH=ppc · de93f0d6
      Benjamin Herrenschmidt 提交于
      The merge of machine types broke boot with yaboot & ARCH=ppc due to the
      old code still retreiving the old-syle machine type passed in by yaboot.
      This patch fixes it by translating those old numbers. Since that whole
      mecanism is deprecated, this is a temporary fix until ARCH=ppc uses the
      new prom_init that the merged architecture now uses for both ppc32 and
      ppc64 (after 2.6.15)
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      de93f0d6
    • M
      [PATCH] ppc32 8xx: update_mmu_cache() needs unconditional tlbie · eb07d964
      Marcelo Tosatti 提交于
      Currently 8xx fails to boot due to endless pagefaults.
      
      Seems the bug is exposed by the change which avoids flushing the
      TLB when not necessary (in case the pte has not changed), introduced
      recently:
      
      __handle_mm_fault():
      
              entry = pte_mkyoung(entry);
              if (!pte_same(old_entry, entry)) {
                      ptep_set_access_flags(vma, address, pte, entry, write_access);
                      update_mmu_cache(vma, address, entry);
                      lazy_mmu_prot_update(entry);
              } else {
                      /*
                       * This is needed only for protection faults but the arch code
                       * is not yet telling us if this is a protection fault or not.
                       * This still avoids useless tlb flushes for .text page faults
                       * with threads.
                       */
                      if (write_access)
                              flush_tlb_page(vma, address);
              }
      
      The "update_mmu_cache()" call was unconditional before, which caused the TLB
      to be flushed by:
      
              if (pfn_valid(pfn)) {
                      struct page *page = pfn_to_page(pfn);
                      if (!PageReserved(page)
                          && !test_bit(PG_arch_1, &page->flags)) {
                              if (vma->vm_mm == current->active_mm) {
      #ifdef CONFIG_8xx
                              /* On 8xx, cache control instructions (particularly 
                               * "dcbst" from flush_dcache_icache) fault as write 
                               * operation if there is an unpopulated TLB entry 
                               * for the address in question. To workaround that, 
                               * we invalidate the TLB here, thus avoiding dcbst 
                               * misbehaviour.
                               */
                                      _tlbie(address);
      #endif
                                      __flush_dcache_icache((void *) address);
                              } else
                                      flush_dcache_icache_page(page);
                              set_bit(PG_arch_1, &page->flags);
                      }
      
      Which worked to due to pure luck: PG_arch_1 was always unset before, but
      now it isnt.
      
      The root of the problem are the changes against the 8xx TLB handlers introduced
      during v2.6. What happens is the TLBMiss handlers load the zeroed pte into
      the TLB, causing the TLBError handler to be invoked (thats two TLB faults per 
      pagefault), which then jumps to the generic MM code to setup the pte.
      
      The bug is that the zeroed TLB is not invalidated (the same reason
      for the "dcbst" misbehaviour), resulting in infinite TLBError faults.
      
      The "two exception" approach requires a TLB flush (to nuke the zeroed TLB)
      at each PTE update for correct behaviour:
      Signed-off-by: NMarcelo Tosatti <marcelo.tosatti@cyclades.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      eb07d964
  12. 14 11月, 2005 3 次提交
  13. 11 11月, 2005 3 次提交
  14. 10 11月, 2005 4 次提交
    • P
      [PATCH] powerpc: merge code values for identifying platforms · 799d6046
      Paul Mackerras 提交于
      This patch merges platform codes.  systemcfg->platform is no longer used,
      systemcfg use in general is deprecated as much as possible (and renamed
      _systemcfg before it gets completely moved elsewhere in a future patch),
      _machine is now used on ppc64 along as ppc32.  Platform codes aren't gone
      yet but we are getting a step closer. A bunch of asm code in head[_64].S
      is also turned into C code.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      799d6046
    • D
      [PATCH] powerpc: Consolidate asm compatibility macros · 3ddfbcf1
      David Gibson 提交于
      This patch consolidates macros used to generate assembly for
      compatibility across different CPUs or configs.  A new header,
      asm-powerpc/asm-compat.h contains the main compatibility macros.  It
      uses some preprocessor magic to make the macros suitable both for use
      in .S files, and in inline asm in .c files.  Headers (bitops.h,
      uaccess.h, atomic.h, bug.h) which had their own such compatibility
      macros are changed to use asm-compat.h.
      
      ppc_asm.h is now for use in .S files *only*, and a #error enforces
      that.  As such, we're a lot more careless about namespace pollution
      here than in asm-compat.h.
      
      While we're at it, this patch adds a call to the PPC405_ERR77 macro in
      futex.h which should have had it already, but didn't.
      
      Built and booted on pSeries, Maple and iSeries (ARCH=powerpc).  Built
      for 32-bit powermac (ARCH=powerpc) and Walnut (ARCH=ppc).
      Signed-off-by: NDavid Gibson <dwg@au1.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      3ddfbcf1
    • 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
    • P
      ppc/powerpc: workarounds for old Open Firmware versions · a23414be
      Paul Mackerras 提交于
      This adds code to work around some problems with old versions of
      Open Firmware, such as on the early powermacs (7500 etc.) and the
      "Longtrail" CHRP machine.  On these machines we have to claim
      the physical and virtual address ranges explicitly when claiming
      memory and then set up a V->P mapping.
      
      The Longtrail has more problems: setprop doesn't work, and we have
      to set an "allow-reclaim" variable to 0 in order to get claim on
      physical memory ranges to fail if the memory is already claimed.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      a23414be