1. 09 9月, 2017 1 次提交
    • M
      vga: optimise console scrolling · ac036f95
      Matthew Wilcox 提交于
      Where possible, call memset16(), memmove() or memcpy() instead of using
      open-coded loops.  I don't like the calling convention that uses a byte
      count instead of a count of u16s, but it's a little late to change that.
      Reduces code size of fbcon.o by almost 400 bytes on my laptop build.
      
      [akpm@linux-foundation.org: fix build]
      Link: http://lkml.kernel.org/r/20170720184539.31609-9-willy@infradead.orgSigned-off-by: NMatthew Wilcox <mawilcox@microsoft.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: David Miller <davem@davemloft.net>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>
      Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Matt Turner <mattst88@gmail.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Minchan Kim <minchan@kernel.org>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Russell King <rmk+kernel@armlinux.org.uk>
      Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ac036f95
  2. 06 9月, 2017 4 次提交
  3. 05 9月, 2017 5 次提交
  4. 04 9月, 2017 4 次提交
  5. 01 9月, 2017 1 次提交
  6. 30 8月, 2017 15 次提交
  7. 29 8月, 2017 10 次提交
    • P
      MIPS: CM: Use BIT/GENMASK for register fields, order & drop shifts · 93c5bba5
      Paul Burton 提交于
      There's no reason for us not to use BIT() & GENMASK() in asm/mips-cm.h
      when declaring macros corresponding to register fields. This patch
      modifies our definitions to do so.
      
      The *_SHF definitions are removed entirely - they duplicate information
      found in the masks, are infrequently used & can be replaced with use of
      __ffs() where needed.
      
      The *_MSK definitions then lose their _MSK suffix which is now somewhat
      redundant, and users are modified to match.
      
      The field definitions are moved to follow the appropriate register's
      accessor functions, which helps to keep the field definitions in order &
      to find the appropriate fields for a given register. Whilst here a
      comment is added describing each register & including its name, which is
      helpful both for linking the register back to hardware documentation &
      for grepping purposes.
      
      This also cleans up a couple of issues that became obvious as a result
      of making the changes described above:
      
        - We previously had definitions for GCR_Cx_RESET_EXT_BASE & a phony
          copy of that named GCR_RESET_EXT_BASE - a register which does not
          exist. The bad definitions were added by commit 497e803e ("MIPS:
          smp-cps: Ensure secondary cores start with EVA disabled") and made
          use of from boot_core(), which is now modified to use the
          GCR_Cx_RESET_EXT_BASE definitions.
      
        - We had a typo in CM_GCR_ERROR_CAUSE_ERRINGO_MSK - we now correctly
          define this as inFo rather than inGo.
      
      Now that we don't duplicate field information between _SHF & _MSK
      definitions, and keep the fields next to the register accessors, it will
      be much easier to spot & prevent any similar oddities being introduced
      in the future.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Acked-by: Thomas Gleixner <tglx@linutronix.de
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/17001/
      Patchwork: https://patchwork.linux-mips.org/patch/17216/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      93c5bba5
    • P
      MIPS: CM: Specify register size when generating accessors · b025d518
      Paul Burton 提交于
      Some CM registers are always 32 bits, or at least only use bits in the
      lower 32 bits of the register. For these registers it is wasteful for us
      to generate accessors which bother to check mips_cm_is64 & perform 64
      bit accesses.
      
      This patch modifies the accessor generation to take into account the
      size of the register, and for 32 bit registers we generate accessors
      which only ever perform 32 bit accesses. For 64 bit registers we either
      perform a 64 bit access or two 32 bit accesses, depending upon the value
      of mips_cm_is64. Doing this saves us ~1.5KiB of code in a generic 64r6el
      kernel, and perhaps more importantly simplifies various code paths.
      
      This removes the read64_gcr_* accessors, so mips_cm_error_report() is
      modified to stop using them & instead use the regular read_gcr_*
      accessors which will return 64 bit values from the 64 bit registers.
      
      The new accessor macros are placed in asm/mips-cps.h such that they can
      be shared by CPC & GIC code in later patches.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/17000/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      b025d518
    • P
      MIPS: CM: Rename mips_cm_base to mips_gcr_base · abe852ea
      Paul Burton 提交于
      We currently have a mips_cm_base variable which holds the base address
      of the Coherence Manager (CM) Global Configuration Registers (GCRs), and
      accessor functions which use the GCR in their names. This works fine,
      but gets in the way of sharing the code to generate the accessor
      functions with other blocks (ie. CPC & GIC) because that code would then
      need to separately handle the name of the base address variable & the
      name used in the accessor functions.
      
      In order to prepare for sharing the accessor generation code between CM,
      CPC & GIC code this patch renames mips_cm_base to mips_gcr_base such
      that the "gcr" portion is common to both the base address variable & the
      accessor function names.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/16999/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      abe852ea
    • A
      MIPS: math-emu: Add FP emu debugfs stats for individual instructions · 454854ac
      Aleksandar Markovic 提交于
      Add FP emulation debugfs statistics for individual instructions. The
      debugfs files that contain counter values are placed in a separate
      directory called "instructions". This means that the default path for
      these new stat is "/sys/kernel/debug/mips/fpuemustats/instructions".
      
      Each instruction counter is mapped to the debugfs file that has the
      same name as instruction name. The lowercase is choosen as more
      commonly used case for instruction names.
      
      One example of usage:
      
      mips_host::/sys/kernel/debug/mips/fpuemustats/instructions # grep "" *
      
      The shortened output of this command is:
      
      abs.d:34
      abs.s:5711
      add.d:10401
      add.s:399307
      bc1eqz:3199
      ...
      ...
      ...
      sub.s:167211
      trunc.l.d:375
      trunc.l.s:8054
      trunc.w.d:421
      trunc.w.s:27032
      
      The limitation of this patch is that it handles R6 FP emulation
      instructions only. There are altogether 114 handled instructions.
      Signed-off-by: NMiodrag Dinic <miodrag.dinic@imgtec.com>
      Signed-off-by: NGoran Ferenc <goran.ferenc@imgtec.com>
      Signed-off-by: NAleksandar Markovic <aleksandar.markovic@imgtec.com>
      Cc: Douglas Leung <douglas.leung@imgtec.com>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Maciej W. Rozycki <macro@imgtec.com>
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: Petar Jovanovic <petar.jovanovic@imgtec.com>
      Cc: Raghu Gandham <raghu.gandham@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/17145/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      454854ac
    • A
      MIPS: math-emu: Add FP emu debugfs statistics for branches · ae5f3f5b
      Aleksandar Markovic 提交于
      Add FP emu debugfs counter for branches.
      
      The new counter is displayed the same way as existing counter, and
      its default path is /sys/kernel/debug/mips/fpuemustats/.
      
      The limitation of this counter is that it counts only R6 branch
      instructions BC1NEZ and BC1EQZ.
      Signed-off-by: NMiodrag Dinic <miodrag.dinic@imgtec.com>
      Signed-off-by: NGoran Ferenc <goran.ferenc@imgtec.com>
      Signed-off-by: NAleksandar Markovic <aleksandar.markovic@imgtec.com>
      Cc: Douglas Leung <douglas.leung@imgtec.com>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Maciej W. Rozycki <macro@imgtec.com>
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: Petar Jovanovic <petar.jovanovic@imgtec.com>
      Cc: Raghu Gandham <raghu.gandham@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/17143/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      ae5f3f5b
    • P
      MIPS: math-emu: Correct user fault_addr type · 445a58ce
      Paul Burton 提交于
      The fault_addr argument to fpu_emulator_cop1Handler(), fpux_emu() and
      cop1Emulate() has up until now been declared as:
      
        void *__user *fault_addr
      
      This is essentially a pointer in user memory which points to a pointer
      to void. This is not the intent for our code, which is actually
      operating on a pointer to a pointer to void where the pointer to void is
      pointing at user memory. ie. the pointer is in kernel memory & points to
      user memory.
      
      This mismatch produces a lot of sparse warnings that look like this:
      
      arch/mips/math-emu/cp1emu.c:1485:45:
         warning: incorrect type in assignment (different address spaces)
            expected void *[noderef] <asn:1><noident>
            got unsigned int [noderef] [usertype] <asn:1>*[assigned] va
      
      Fix these by modifying the declaration of the fault_addr argument to:
      
        void __user **fault_addr
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: trivial@kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/17173/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      445a58ce
    • M
      MIPS: Alchemy: update cpu feature overrides · 60d5973c
      Manuel Lauss 提交于
      No advanced MIPS features for Alchemy.
      This patch shaves additional 43kB off the DB1300 kernel
      (~0.5% size reduction).
      Signed-off-by: NManuel Lauss <manuel.lauss@gmail.com>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/15286/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      60d5973c
    • P
      MIPS: Octeon: Expose support for mips32r1, mips32r2 and mips64r1 · 846fbcfe
      Petar Jovanovic 提交于
      Define Cavium Octeon as a CPU that has support for mips32r1, mips32r2 and
      mips64r1. This will affect show_cpuinfo() that will now correctly expose
      mips32r1, mips32r2 and mips64r1 as supported ISAs.
      Signed-off-by: NPetar Jovanovic <petar.jovanovic@rt-rk.com>
      Reviewed-by: NMaciej W. Rozycki <macro@imgtec.com>
      Acked-by: NDavid Daney <david.daney@cavium.com>
      Cc: petar.jovanovic@imgtec.com
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/15749/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      846fbcfe
    • D
      MIPS: NUMA: Remove the unused parent_node() macro · 42f1e641
      Dou Liyang 提交于
      Commit a7be6e5a ("mm: drop useless local parameters of
      __register_one_node()") removes the last user of parent_node().
      
      The parent_node() macros in both IP27 and Loongson64 are unnecessary.
      
      Remove it for cleanup.
      Reported-by: NMichael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: NDou Liyang <douly.fnst@cn.fujitsu.com>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/16873/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      42f1e641
    • P
      MIPS: Remove unused R6000 support · 3b2db173
      Paul Burton 提交于
      The kernel contains a small amount of incomplete code aimed at
      supporting old R6000 CPUs. This is:
      
        - Unused, as no machine selects CONFIG_SYS_HAS_CPU_R6000.
      
        - Broken, since there are glaring errors such as r6000_fpu.S moving
          the FCSR register to t1, then ignoring it & instead saving t0 into
          struct sigcontext...
      
        - A maintenance headache, since it's code that nobody can test which
          nevertheless imposes constraints on code which it shares with other
          machines.
      
      Remove this incomplete & broken R6000 CPU support in order to clean up
      and in preparation for changes which will no longer need to consider
      dragging the pretense of R6000 support along with them.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/16236/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      3b2db173