1. 14 8月, 2014 1 次提交
    • M
      xtensa: implement clear_user_highpage and copy_user_highpage · a91902db
      Max Filippov 提交于
      Existing clear_user_page and copy_user_page cannot be used with highmem
      because they calculate physical page address from its virtual address
      and do it incorrectly in case of high memory page mapped with
      kmap_atomic. Also kmap is not needed, as most likely userspace mapping
      color would be different from the kmapped color.
      
      Provide clear_user_highpage and copy_user_highpage functions that
      determine if temporary mapping is needed for the pages. Move most of the
      logic of the former clear_user_page and copy_user_page to
      xtensa/mm/cache.c only leaving temporary mapping setup, invalidation and
      clearing/copying in the xtensa/mm/misc.S. Rename these functions to
      clear_page_alias and copy_page_alias.
      Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
      a91902db
  2. 19 12月, 2012 1 次提交
  3. 25 5月, 2011 1 次提交
  4. 12 6月, 2009 1 次提交
  5. 03 4月, 2009 2 次提交
    • J
      xtensa: nommu support · e5083a63
      Johannes Weiner 提交于
      Add support for !CONFIG_MMU setups.
      Signed-off-by: NJohannes Weiner <jw@emlix.com>
      Signed-off-by: NChris Zankel <chris@zankel.net>
      e5083a63
    • J
      xtensa: cope with ram beginning at higher addresses · c947a585
      Johannes Weiner 提交于
      The current assumption of the memory code is that the first RAM PFN in
      the system is 0.
      
      Adjust the relevant code to play well with setups where memory starts
      at higher addresses, indicated by PLATFORM_DEFAULT_MEM_START.
      
      The new memory model looks like this:
      
      +----------+--+----------------------+----------------+
      |          |  |                      |                |
      |          |  |         RAM          |                |
      |          |  |                      |                |
      +----------+--+----------------------+----------------+
      |          |  |                      |                |
      +- PFN 0   |  +- min_low_pfn         +- max_low_pfn   +- max_pfn
                 |
                 +- ARCH_PFN_OFFSET
                 +- PLATFORM_DEFAULT_MEM_START >> PAGE_SIZE
      
      The memory map contains pages starting from pfn ARCH_PFN_OFFSET up to
      max_low_pfn.  The only zone used right now will span exactly the same
      region.
      
      Usually, ARCH_PFN_OFFSET and min_low_pfn are the same value.  Handle
      them separately for robustness.  Gapping pages will be in the memory
      map but marked as reserved and won't be touched.
      Signed-off-by: NJohannes Weiner <jw@emlix.com>
      Signed-off-by: NChris Zankel <chris@zankel.net>
      c947a585
  6. 07 11月, 2008 1 次提交
  7. 25 7月, 2008 1 次提交
    • A
      PAGE_ALIGN(): correctly handle 64-bit values on 32-bit architectures · 27ac792c
      Andrea Righi 提交于
      On 32-bit architectures PAGE_ALIGN() truncates 64-bit values to the 32-bit
      boundary. For example:
      
      	u64 val = PAGE_ALIGN(size);
      
      always returns a value < 4GB even if size is greater than 4GB.
      
      The problem resides in PAGE_MASK definition (from include/asm-x86/page.h for
      example):
      
      #define PAGE_SHIFT      12
      #define PAGE_SIZE       (_AC(1,UL) << PAGE_SHIFT)
      #define PAGE_MASK       (~(PAGE_SIZE-1))
      ...
      #define PAGE_ALIGN(addr)       (((addr)+PAGE_SIZE-1)&PAGE_MASK)
      
      The "~" is performed on a 32-bit value, so everything in "and" with
      PAGE_MASK greater than 4GB will be truncated to the 32-bit boundary.
      Using the ALIGN() macro seems to be the right way, because it uses
      typeof(addr) for the mask.
      
      Also move the PAGE_ALIGN() definitions out of include/asm-*/page.h in
      include/linux/mm.h.
      
      See also lkml discussion: http://lkml.org/lkml/2008/6/11/237
      
      [akpm@linux-foundation.org: fix drivers/media/video/uvc/uvc_queue.c]
      [akpm@linux-foundation.org: fix v850]
      [akpm@linux-foundation.org: fix powerpc]
      [akpm@linux-foundation.org: fix arm]
      [akpm@linux-foundation.org: fix mips]
      [akpm@linux-foundation.org: fix drivers/media/video/pvrusb2/pvrusb2-dvb.c]
      [akpm@linux-foundation.org: fix drivers/mtd/maps/uclinux.c]
      [akpm@linux-foundation.org: fix powerpc]
      Signed-off-by: NAndrea Righi <righi.andrea@gmail.com>
      Cc: <linux-arch@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      27ac792c
  8. 09 2月, 2008 1 次提交
    • M
      CONFIG_HIGHPTE vs. sub-page page tables. · 2f569afd
      Martin Schwidefsky 提交于
      Background: I've implemented 1K/2K page tables for s390.  These sub-page
      page tables are required to properly support the s390 virtualization
      instruction with KVM.  The SIE instruction requires that the page tables
      have 256 page table entries (pte) followed by 256 page status table entries
      (pgste).  The pgstes are only required if the process is using the SIE
      instruction.  The pgstes are updated by the hardware and by the hypervisor
      for a number of reasons, one of them is dirty and reference bit tracking.
      To avoid wasting memory the standard pte table allocation should return
      1K/2K (31/64 bit) and 2K/4K if the process is using SIE.
      
      Problem: Page size on s390 is 4K, page table size is 1K or 2K.  That means
      the s390 version for pte_alloc_one cannot return a pointer to a struct
      page.  Trouble is that with the CONFIG_HIGHPTE feature on x86 pte_alloc_one
      cannot return a pointer to a pte either, since that would require more than
      32 bit for the return value of pte_alloc_one (and the pte * would not be
      accessible since its not kmapped).
      
      Solution: The only solution I found to this dilemma is a new typedef: a
      pgtable_t.  For s390 pgtable_t will be a (pte *) - to be introduced with a
      later patch.  For everybody else it will be a (struct page *).  The
      additional problem with the initialization of the ptl lock and the
      NR_PAGETABLE accounting is solved with a constructor pgtable_page_ctor and
      a destructor pgtable_page_dtor.  The page table allocation and free
      functions need to call these two whenever a page table page is allocated or
      freed.  pmd_populate will get a pgtable_t instead of a struct page pointer.
       To get the pgtable_t back from a pmd entry that has been installed with
      pmd_populate a new function pmd_pgtable is added.  It replaces the pmd_page
      call in free_pte_range and apply_to_pte_range.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: <linux-arch@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2f569afd
  9. 08 2月, 2008 1 次提交
  10. 28 8月, 2007 2 次提交
    • C
      [XTENSA] Add support for cache-aliasing · 6656920b
      Chris Zankel 提交于
      Add support for processors that have cache-aliasing issues, such as
      the Stretch S5000 processor. Cache-aliasing means that the size of
      the cache (for one way) is larger than the page size, thus, a page
      can end up in several places in cache depending on the virtual to
      physical translation. The method used here is to map a user page
      temporarily through the auto-refill way 0 and of of the DTLB.
      We probably will want to revisit this issue and use a better
      approach with kmap/kunmap.
      Signed-off-by: NChris Zankel <chris@zankel.net>
      6656920b
    • C
      [XTENSA] Use the generic version of get_order · 26465f2f
      Chris Zankel 提交于
      Use the generic version of get_order for processor configurations that
      don't have the 'nsa/nsau' instructions.
      Signed-off-by: NChris Zankel <chris@zankel.net>
      26465f2f
  11. 01 6月, 2007 1 次提交
    • C
      [XTENSA] clean-up header files · de4f6e5b
      Chris Zankel 提交于
      The header files in the asm-xtensa directory are not clean and
      'make headers_check' fails. This is a first patch to fix most of
      the header files. It removes unnecessary include statements and
      adds some that are required for building the kernel. The linker
      script required some updates or the linking stage would fail.
      Signed-off-by: NChris Zankel <chris@zankel.net>
      de4f6e5b
  12. 11 12月, 2006 1 次提交
  13. 26 4月, 2006 1 次提交
  14. 28 3月, 2006 1 次提交
  15. 05 9月, 2005 1 次提交
  16. 24 6月, 2005 1 次提交