1. 13 5月, 2016 4 次提交
    • P
      MIPS: mm: Fix MIPS32 36b physical addressing (alchemy, netlogic) · 7b2cb64f
      Paul Burton 提交于
      There are 2 distinct cases in which a kernel for a MIPS32 CPU
      (CONFIG_CPU_MIPS32=y) may use 64 bit physical addresses
      (CONFIG_PHYS_ADDR_T_64BIT=y):
      
        - 36 bit physical addressing as used by RMI Alchemy & Netlogic XLP/XLR
          CPUs.
      
        - MIPS32r5 eXtended Physical Addressing (XPA).
      
      These 2 cases are distinct in that they require different behaviour from
      the kernel - the EntryLo registers have different formats. Until Linux
      v4.1 we only supported the first case, with code conditional upon the 2
      aforementioned Kconfig variables being set. Commit c5b36783 ("MIPS:
      Add support for XPA.") added support for the second case, but did so by
      modifying the code that existed for the first case rather than treating
      the 2 cases as distinct. Since the EntryLo registers have different
      formats this breaks the 36 bit Alchemy/XLP/XLR case. Fix this by
      splitting the 2 cases, with XPA cases now being conditional upon
      CONFIG_XPA and the non-XPA case matching the code as it existed prior to
      commit c5b36783 ("MIPS: Add support for XPA.").
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Reported-by: NManuel Lauss <manuel.lauss@gmail.com>
      Tested-by: NManuel Lauss <manuel.lauss@gmail.com>
      Fixes: c5b36783 ("MIPS: Add support for XPA.")
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: David Daney <david.daney@cavium.com>
      Cc: Huacai Chen <chenhc@lemote.com>
      Cc: Maciej W. Rozycki <macro@linux-mips.org>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
      Cc: David Hildenbrand <dahi@linux.vnet.ibm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Alex Smith <alex.smith@imgtec.com>
      Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: stable@vger.kernel.org # v4.1+
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/13119/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      7b2cb64f
    • P
      MIPS: mm: Standardise on _PAGE_NO_READ, drop _PAGE_READ · 780602d7
      Paul Burton 提交于
      Ever since support for RI/XI was implemented by commit 6dd9344c
      ("MIPS: Implement Read Inhibit/eXecute Inhibit") we've had a mixture of
      _PAGE_READ & _PAGE_NO_READ bits. Rather than keep both around, switch
      away from using _PAGE_READ to determine page presence & instead invert
      the use to _PAGE_NO_READ. Wherever we formerly had no definition for
      _PAGE_NO_READ, change what was _PAGE_READ to _PAGE_NO_READ. The end
      result is that we consistently use _PAGE_NO_READ to determine whether a
      page is readable, regardless of whether RI/XI is implemented.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Reviewed-by: NJames Hogan <james.hogan@imgtec.com>
      Cc: David Daney <david.daney@cavium.com>
      Cc: Huacai Chen <chenhc@lemote.com>
      Cc: Maciej W. Rozycki <macro@linux-mips.org>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Alex Smith <alex.smith@imgtec.com>
      Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/13116/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      780602d7
    • P
      MIPS: Use enums to make asm/pgtable-bits.h readable · 69497700
      Paul Burton 提交于
      asm/pgtable-bits.h has grown to become an unreadable mess of #ifdef
      directives defining bits conditionally upon other bits all at the
      preprocessing stage, for no good reason.
      
      Instead of having quite so many #ifdef's, simply use enums to provide
      sequential numbering for bit shifts, without having to keep track
      manually of what the last bit defined was. Masks are defined separately,
      after the shifts, which allows for most of their definitions to be
      reused for all systems rather than duplicated.
      
      This patch is not intended to make any behavioural change to the code -
      all bits should be used in the same way they were before this patch.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Reviewed-by: NJames Hogan <james.hogan@imgtec.com>
      Cc: Maciej W. Rozycki <macro@linux-mips.org>
      Cc: Alex Smith <alex.smith@imgtec.com>
      Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/13115/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      69497700
    • P
      MIPS: Remove redundant asm/pgtable-bits.h inclusions · 253f0d4a
      Paul Burton 提交于
      asm/pgtable-bits.h is included in 2 assembly files and thus has to
      ifdef around C code, however nothing defined by the header is used
      in either of the assembly files that include it.
      
      Remove the redundant inclusions such that asm/pgtable-bits.h doesn't
      need to #ifdef around C code, for cleanliness and in preparation for
      later patches which will add more C.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Reviewed-by: NJames Hogan <james.hogan@imgtec.com>
      Cc: Maciej W. Rozycki <macro@linux-mips.org>
      Cc: Jonas Gorski <jogo@openwrt.org>
      Cc: Alex Smith <alex.smith@imgtec.com>
      Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/13114/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      253f0d4a
  2. 16 1月, 2016 1 次提交
    • K
      mips, thp: remove infrastructure for handling splitting PMDs · b2787370
      Kirill A. Shutemov 提交于
      With new refcounting we don't need to mark PMDs splitting.  Let's drop
      code to handle this.
      
      pmdp_splitting_flush() is not needed too: on splitting PMD we will do
      pmdp_clear_flush() + set_pte_at().  pmdp_clear_flush() will do IPI as
      needed for fast_gup.
      Signed-off-by: NKirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Sasha Levin <sasha.levin@oracle.com>
      Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      Cc: Jerome Marchand <jmarchan@redhat.com>
      Cc: Vlastimil Babka <vbabka@suse.cz>
      Cc: Andrea Arcangeli <aarcange@redhat.com>
      Cc: Hugh Dickins <hughd@google.com>
      Cc: Dave Hansen <dave.hansen@intel.com>
      Cc: Mel Gorman <mgorman@suse.de>
      Cc: Rik van Riel <riel@redhat.com>
      Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
      Cc: Steve Capper <steve.capper@linaro.org>
      Cc: Johannes Weiner <hannes@cmpxchg.org>
      Cc: Michal Hocko <mhocko@suse.cz>
      Cc: Christoph Lameter <cl@linux.com>
      Cc: David Rientjes <rientjes@google.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b2787370
  3. 03 9月, 2015 1 次提交
  4. 30 8月, 2015 1 次提交
    • M
      MIPS: pgtable-bits.h: Correct _PAGE_GLOBAL_SHIFT build failure · 1cfa8de2
      Maciej W. Rozycki 提交于
      Correct a build failure introduced by be0c37c9 [MIPS: Rearrange PTE bits
      into fixed positions.]:
      
      In file included from ./arch/mips/include/asm/io.h:27:0,
                       from ./arch/mips/include/asm/page.h:176,
                       from include/linux/mm_types.h:15,
                       from include/linux/sched.h:27,
                       from include/linux/ptrace.h:5,
                       from arch/mips/kernel/cpu-probe.c:16:
      ./arch/mips/include/asm/pgtable-bits.h:164:0: error: "_PAGE_GLOBAL_SHIFT" redefined [-Werror]
       #define _PAGE_GLOBAL_SHIFT (_PAGE_MODIFIED_SHIFT + 1)
       ^
      ./arch/mips/include/asm/pgtable-bits.h:141:0: note: this is the location of the previous definition
       #define _PAGE_GLOBAL_SHIFT (_PAGE_SPLITTING_SHIFT + 1)
       ^
      cc1: all warnings being treated as errors
      make[2]: *** [arch/mips/kernel/cpu-probe.o] Error 1
      
      for 64BIT/CPU_MIPSR1/MIPS_HUGE_TLB_SUPPORT configurations.  Remove the
      scattered double `_PAGE_NO_EXEC_SHIFT' and `_PAGE_GLOBAL_SHIFT' macro
      definitions and rearrange them so that the respective macros these
      definitions are based on are also those used for guarding conditionals.
      
      [ralf@linux-mips.org: resolved conflicts and updated commments.]
      Signed-off-by: NMaciej W. Rozycki <macro@linux-mips.org>
      Cc: Steven J. Hill <Steven.Hill@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/9960/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      1cfa8de2
  5. 09 6月, 2015 1 次提交
  6. 20 3月, 2015 1 次提交
  7. 18 3月, 2015 1 次提交
    • S
      MIPS: Rearrange PTE bits into fixed positions. · be0c37c9
      Steven J. Hill 提交于
      This patch rearranges the PTE bits into fixed positions for R2
      and later cores. In the past, the TLB handling code did runtime
      checking of RI/XI and adjusted the shifts and rotates in order
      to fit the largest PFN value into the PTE. The checking now
      occurs when building the TLB handler, thus eliminating those
      checks. These new arrangements also define the largest possible
      PFN value that can fit in the PTE. HUGE page support is only
      available for 64-bit cores. Layouts of the PTE bits are now:
      
         64-bit, R1 or earlier:     CCC D V G [S H] M A W R P
         32-bit, R1 or earler:      CCC D V G M A W R P
         64-bit, R2 or later:       CCC D V G RI/R XI [S H] M A W P
         32-bit, R2 or later:       CCC D V G RI/R XI M A W P
      
      [ralf@linux-mips.org: Fix another build error *rant* *rant*]
      Signed-off-by: NSteven J. Hill <Steven.Hill@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/9353/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      be0c37c9
  8. 20 2月, 2015 1 次提交
  9. 11 2月, 2015 1 次提交
  10. 25 11月, 2014 2 次提交
  11. 22 9月, 2014 2 次提交
  12. 01 4月, 2014 1 次提交
    • H
      MIPS: Loongson: Add basic Loongson-3 definition · 152ebb44
      Huacai Chen 提交于
      Loongson-3 is a multi-core MIPS family CPU, it support MIPS64R2 fully.
      Loongson-3 has the same IMP field (0x6300) as Loongson-2.
      
      Loongson-3 has a hardware-maintained cache, system software doesn't
      need to maintain coherency.
      
      Loongson-3A is the first revision of Loongson-3, and it is the quad-
      core version of Loongson-2G. Loongson-3A has a simplified version named
      Loongson-2Gq, the main difference between Loongson-3A/2Gq is 3A has two
      HyperTransport controller but 2Gq has only one. HT0 is used for cross-
      chip interconnection and HT1 is used to link PCI bus. Therefore, 2Gq
      cannot support NUMA but 3A can. For software, Loongson-2Gq is simply
      identified as Loongson-3A.
      
      Exsisting Loongson family CPUs:
      Loongson-1: Loongson-1A, Loongson-1B, they are 32-bit MIPS CPUs.
      Loongson-2: Loongson-2E, Loongson-2F, Loongson-2G, they are 64-bit
                  single-core MIPS CPUs.
      Loongson-3: Loongson-3A(including so-called Loongson-2Gq), they are
                  64-bit multi-core MIPS CPUs.
      Signed-off-by: NHuacai Chen <chenhc@lemote.com>
      Signed-off-by: NHongliang Tao <taohl@lemote.com>
      Signed-off-by: NHua Yan <yanh@lemote.com>
      Tested-by: NAlex Smith <alex.smith@imgtec.com>
      Reviewed-by: NAlex Smith <alex.smith@imgtec.com>
      Cc: John Crispin <john@phrozen.org>
      Cc: Steven J. Hill <Steven.Hill@imgtec.com>
      Cc: Aurelien Jarno <aurelien@aurel32.net>
      Cc: linux-mips@linux-mips.org
      Cc: Fuxin Zhang <zhangfx@lemote.com>
      Cc: Zhangjin Wu <wuzhangjin@gmail.com>
      Patchwork: https://patchwork.linux-mips.org/patch/6629/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      152ebb44
  13. 01 2月, 2013 2 次提交
  14. 14 12月, 2012 1 次提交
  15. 12 12月, 2012 2 次提交
  16. 26 11月, 2012 1 次提交
    • R
      MIPS: tlbex: Better debug output. · a2c763e0
      Ralf Baechle 提交于
      Pgtable bits are assigned dynamically depending on processor feature and
      statically based on kernel configuration.  To make sense out of the
      disassembled TLB exception handlers a list of the actual assignments
      used for a particular configuration and hardware setup can be very useful.
      
      Output the actual TLB exception handlers in a format that simplifies their
      post processsing from dmesg output.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      a2c763e0
  17. 14 9月, 2012 1 次提交
  18. 27 2月, 2010 1 次提交
    • D
      MIPS: Implement Read Inhibit/eXecute Inhibit · 6dd9344c
      David Daney 提交于
      The SmartMIPS ASE specifies how Read Inhibit (RI) and eXecute Inhibit
      (XI) bits in the page tables work.  The upper two bits of EntryLo{0,1}
      are RI and XI when the feature is enabled in the PageGrain register.
      SmartMIPS only covers 32-bit systems.  Cavium Octeon+ extends this to
      64-bit systems by continuing to place the RI and XI bits in the top of
      EntryLo even when EntryLo is 64-bits wide.
      
      Because we need to carry the RI and XI bits in the PTE, the layout of
      the PTE is changed.  There is a two instruction overhead in the TLB
      refill hot path to get the EntryLo bits into the proper position.
      Also the TLB load exception has to probe the TLB to check if RI or XI
      caused the exception.
      
      Also of note is that the layout of the PTE bits is done at compile and
      runtime rather than statically.  In the 32-bit case this allows for
      the same number of PFN bits as before the patch as the _PAGE_HUGE is
      not supported in 32-bit kernels (we have _PAGE_NO_EXEC and
      _PAGE_NO_READ instead of _PAGE_READ and _PAGE_HUGE).
      
      The patch is tested on Cavium Octeon+, but should also work on 32-bit
      systems with the Smart-MIPS ASE.
      Signed-off-by: NDavid Daney <ddaney@caviumnetworks.com>
      To: linux-mips@linux-mips.org
      Patchwork: http://patchwork.linux-mips.org/patch/952/
      Patchwork: http://patchwork.linux-mips.org/patch/956/
      Patchwork: http://patchwork.linux-mips.org/patch/962/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      6dd9344c
  19. 17 6月, 2009 1 次提交
  20. 11 10月, 2008 1 次提交
  21. 16 6月, 2008 1 次提交
  22. 29 4月, 2008 3 次提交
  23. 26 4月, 2006 1 次提交
  24. 30 10月, 2005 1 次提交
  25. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4