1. 20 9月, 2011 2 次提交
    • S
      powerpc/32: Pass device tree address as u64 to machine_init · 6dece0eb
      Scott Wood 提交于
      u64 is used rather than phys_addr_t to keep things simple, as
      this is called from assembly code.
      
      Update callers to pass a 64-bit address in r3/r4.  Other unused
      register assignments that were once parameters to machine_init
      are dropped.
      
      For FSL BookE, look up the physical address of the device tree from the
      effective address passed in r3 by the loader.  This is required for
      situations where memory does not start at zero (due to AMP or IOMMU-less
      virtualization), and thus the IMA doesn't start at zero, and thus the
      device tree effective address does not equal the physical address.
      Signed-off-by: NScott Wood <scottwood@freescale.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      6dece0eb
    • B
      powerpc: Hugetlb for BookE · 41151e77
      Becky Bruce 提交于
      Enable hugepages on Freescale BookE processors.  This allows the kernel to
      use huge TLB entries to map pages, which can greatly reduce the number of
      TLB misses and the amount of TLB thrashing experienced by applications with
      large memory footprints.  Care should be taken when using this on FSL
      processors, as the number of large TLB entries supported by the core is low
      (16-64) on current processors.
      
      The supported set of hugepage sizes include 4m, 16m, 64m, 256m, and 1g.
      Page sizes larger than the max zone size are called "gigantic" pages and
      must be allocated on the command line (and cannot be deallocated).
      
      This is currently only fully implemented for Freescale 32-bit BookE
      processors, but there is some infrastructure in the code for
      64-bit BooKE.
      Signed-off-by: NBecky Bruce <beckyb@kernel.crashing.org>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      41151e77
  2. 12 7月, 2011 2 次提交
  3. 23 6月, 2011 1 次提交
  4. 31 3月, 2011 1 次提交
  5. 29 11月, 2010 1 次提交
  6. 14 10月, 2010 1 次提交
  7. 25 5月, 2010 3 次提交
  8. 17 5月, 2010 1 次提交
    • L
      powerpc/fsl-booke: Fix InstructionTLBError execute permission check · 78e2e68a
      Li Yang 提交于
      In CONFIG_PTE_64BIT the PTE format has unique permission bits for user
      and supervisor execute.  However on !CONFIG_PTE_64BIT we overload the
      supervisor bit to imply user execute with _PAGE_USER set.  This allows
      us to use the same permission check mask for user or supervisor code on
      !CONFIG_PTE_64BIT.
      
      However, on CONFIG_PTE_64BIT we map _PAGE_EXEC to _PAGE_BAP_UX so we
      need a different permission mask based on the fault coming from a kernel
      address or user space.
      
      Without unique permission masks we see issues like the following with
      modules:
      
      Unable to handle kernel paging request for instruction fetch
      Faulting instruction address: 0xf938d040
      Oops: Kernel access of bad area, sig: 11 [#1]
      Signed-off-by: NLi Yang <leoli@freescale.com>
      Signed-off-by: NJin Qing <b24347@freescale.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      78e2e68a
  9. 14 5月, 2010 1 次提交
    • L
      powerpc/fsl-booke: Fix InstructionTLBError execute permission check · fa6bd996
      Li Yang 提交于
      In CONFIG_PTE_64BIT the PTE format has unique permission bits for user
      and supervisor execute.  However on !CONFIG_PTE_64BIT we overload the
      supervisor bit to imply user execute with _PAGE_USER set.  This allows
      us to use the same permission check mask for user or supervisor code on
      !CONFIG_PTE_64BIT.
      
      However, on CONFIG_PTE_64BIT we map _PAGE_EXEC to _PAGE_BAP_UX so we
      need a different permission mask based on the fault coming from a kernel
      address or user space.
      
      Without unique permission masks we see issues like the following with
      modules:
      
      Unable to handle kernel paging request for instruction fetch
      Faulting instruction address: 0xf938d040
      Oops: Kernel access of bad area, sig: 11 [#1]
      Signed-off-by: NLi Yang <leoli@freescale.com>
      Signed-off-by: NJin Qing <b24347@freescale.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      fa6bd996
  10. 19 3月, 2010 1 次提交
  11. 17 3月, 2010 1 次提交
  12. 18 2月, 2010 1 次提交
  13. 21 11月, 2009 1 次提交
  14. 02 9月, 2009 1 次提交
  15. 27 8月, 2009 1 次提交
    • B
      powerpc/mm: Cleanup handling of execute permission · ea3cc330
      Benjamin Herrenschmidt 提交于
      This is an attempt at cleaning up a bit the way we handle execute
      permission on powerpc. _PAGE_HWEXEC is gone, _PAGE_EXEC is now only
      defined by CPUs that can do something with it, and the myriad of
      #ifdef's in the I$/D$ coherency code is reduced to 2 cases that
      hopefully should cover everything.
      
      The logic on BookE is a little bit different than what it was though
      not by much. Since now, _PAGE_EXEC will be set by the generic code
      for executable pages, we need to filter out if they are unclean and
      recover it. However, I don't expect the code to be more bloated than
      it already was in that area due to that change.
      
      I could boast that this brings proper enforcing of per-page execute
      permissions to all BookE and 40x but in fact, we've had that now for
      some time as a side effect of my previous rework in that area (and
      I didn't even know it :-) We would only enable execute permission if
      the page was cache clean and we would only cache clean it if we took
      and exec fault. Since we now enforce that the later only work if
      VM_EXEC is part of the VMA flags, we de-fact already enforce per-page
      execute permissions... Unless I missed something
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      ea3cc330
  16. 20 8月, 2009 1 次提交
    • B
      powerpc: Use names rather than numbers for SPRGs (v2) · ee43eb78
      Benjamin Herrenschmidt 提交于
      The kernel uses SPRG registers for various purposes, typically in
      low level assembly code as scratch registers or to hold per-cpu
      global infos such as the PACA or the current thread_info pointer.
      
      We want to be able to easily shuffle the usage of those registers
      as some implementations have specific constraints realted to some
      of them, for example, some have userspace readable aliases, etc..
      and the current choice isn't always the best.
      
      This patch should not change any code generation, and replaces the
      usage of SPRN_SPRGn everywhere in the kernel with a named replacement
      and adds documentation next to the definition of the names as to
      what those are used for on each processor family.
      
      The only parts that still use the original numbers are bits of KVM
      or suspend/resume code that just blindly needs to save/restore all
      the SPRGs.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      ee43eb78
  17. 27 4月, 2009 1 次提交
  18. 23 2月, 2009 1 次提交
  19. 13 2月, 2009 1 次提交
    • K
      powerpc/fsl-booke: Add new ISA 2.06 page sizes and MAS defines · d66c82ea
      Kumar Gala 提交于
      The Power ISA 2.06 added power of two page sizes to the embedded MMU
      architecture.  Its done it such a way to be code compatiable with the
      existing HW.  Made the minor code changes to support both power of two
      and power of four page sizes.  Also added some new MAS bits and macros
      that are defined as part of the 2.06 ISA.  Renamed some things to use
      the 'Book-3e' concept to convey the new MMU that is based on the
      Freescale Book-E MMU programming model.
      
      Note, its still invalid to try and use a page size that isn't supported
      by cpu.
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      d66c82ea
  20. 29 1月, 2009 1 次提交
    • K
      powerpc/fsl-booke: Cleanup init/exception setup to be runtime · 105c31df
      Kumar Gala 提交于
      We currently have a few variants of fsl-booke processors (e500v1, e500v2,
      e500mc, and e200).  They all have minor differences that we had previously
      been handling via ifdefs.
      
      To move towards having this support the following changes have been made:
      
      * PID1, PID2 only exist on e500v1 & e500v2 and should not be accessed on
        e500mc or e200.  We use MMUCFG[NPIDS] to determine which case we are
        since we only touch PID1/2 in extremely early init code.
      
      * Not all IVORs exist on all the processors so introduce cpu_setup
        functions for each variant to setup the proper IVORs that are either
        unique or exist but have some variations between the processors
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      105c31df
  21. 14 1月, 2009 1 次提交
  22. 08 1月, 2009 2 次提交
  23. 21 12月, 2008 1 次提交
  24. 03 12月, 2008 4 次提交
    • K
      powerpc/85xx: Add support for SMP initialization · d5b26db2
      Kumar Gala 提交于
      Added 85xx specifc smp_ops structure.  We use ePAPR style boot release
      and the MPIC for IPIs at this point.
      
      Additionally added routines for secondary cpu entry and initializtion.
      Signed-off-by: NAndy Fleming <afleming@freescale.com>
      Signed-off-by: NTrent Piepho <tpiepho@freescale.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      d5b26db2
    • K
      powerpc/85xx: minor head_fsl_booke.S cleanup · 06b90969
      Kumar Gala 提交于
      Removed unused branch labels
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      06b90969
    • T
      powerpc: Better setup of boot page TLB entry · b3898895
      Trent Piepho 提交于
      The initial TLB mapping for the kernel boot didn't set the memory coherent
      attribute, MAS2[M], in SMP mode.
      
      If this code supported booting a secondary processor, which it doesn't yet,
      but if it did, then when a secondary processor boots, it would probably signal
      the primary processor by setting a variable called something like
      __secondary_hold_acknowledge.  However, due to the lack of the M bit, the
      primary processor would not snoop the transaction (even if a transaction were
      broadcast).  If primary CPU's L1 D-cache had a copy, it would not be flushed
      and the CPU would never see the ack.  Which would have resulted in the primary
      CPU spinning for a long time, perhaps a full second before it gives up, while
      it would have waited for the ack from the secondary CPU that it wouldn't have
      been able to see because of the stale cache.
      
      The value of MAS2 for the boot page TLB1 entry is a compile time constant,
      so there is no need to calculate it in powerpc assembly language.
      
      Also, from the MPC8572 manual section 6.12.5.3, "Bits that represent
      offsets within a page are ignored and should be cleared." Existing code
      didn't clear them, this code does.
      
      The same when the page of KERNELBASE is found; we don't need to use asm to
      mask the lower 12 bits off.
      
      In the code that computes the address to rfi from, don't hard code the
      offset to 24 bytes, but have the assembler figure that out for us.
      Signed-off-by: NTrent Piepho <tpiepho@freescale.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      b3898895
    • L
      powerpc: Add SPE/EFP math emulation for E500v1/v2 processors. · 6a800f36
      Liu Yu 提交于
      This patch add the handlers of SPE/EFP exceptions.
      The code is used to emulate float point arithmetic,
      when MSR(SPE) is enabled and receive EFP data interrupt or EFP round interrupt.
      
      This patch has no conflict with or dependence on FP math-emu.
      
      The code has been tested by TestFloat.
      
      Now the code doesn't support SPE/EFP instructions emulation
      (it won't be called when receive program interrupt),
      but it could be easily added.
      Signed-off-by: NLiu Yu <yu.liu@freescale.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      6a800f36
  25. 14 10月, 2008 1 次提交
  26. 25 9月, 2008 1 次提交
    • B
      POWERPC: Allow 32-bit hashed pgtable code to support 36-bit physical · 4ee7084e
      Becky Bruce 提交于
      This rearranges a bit of code, and adds support for
      36-bit physical addressing for configs that use a
      hashed page table.  The 36b physical support is not
      enabled by default on any config - it must be
      explicitly enabled via the config system.
      
      This patch *only* expands the page table code to accomodate
      large physical addresses on 32-bit systems and enables the
      PHYS_64BIT config option for 86xx.  It does *not*
      allow you to boot a board with more than about 3.5GB of
      RAM - for that, SWIOTLB support is also required (and
      coming soon).
      Signed-off-by: NBecky Bruce <becky.bruce@freescale.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      4ee7084e
  27. 20 9月, 2008 1 次提交
  28. 17 7月, 2008 2 次提交
  29. 26 6月, 2008 1 次提交
  30. 19 6月, 2008 1 次提交
    • K
      powerpc/booke: Add support for new e500mc core · 3dfa8773
      Kumar Gala 提交于
      The new e500mc core from Freescale is based on the e500v2 but with the
      following changes:
      
      * Supports only the Enhanced Debug Architecture (DSRR0/1, etc)
      * Floating Point
      * No SPE
      * Supports lwsync
      * Doorbell Exceptions
      * Hypervisor
      * Cache line size is now 64-bytes (e500v1/v2 have a 32-byte cache line)
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      3dfa8773
  31. 03 6月, 2008 1 次提交