1. 15 7月, 2019 1 次提交
  2. 08 6月, 2019 1 次提交
    • S
      parisc: add dynamic ftrace · 6ca63662
      Sven Schnelle 提交于
      This patch implements dynamic ftrace for PA-RISC. The required mcount
      call sequences can get pretty long, so instead of patching the
      whole call sequence out of the functions, we are using
      -fpatchable-function-entry from gcc. This puts a configurable amount of
      NOPS before/at the start of the function. Taking do_sys_open() as example,
      which would look like this when the call is patched out:
      
      1036b248:       08 00 02 40     nop
      1036b24c:       08 00 02 40     nop
      1036b250:       08 00 02 40     nop
      1036b254:       08 00 02 40     nop
      
      1036b258 <do_sys_open>:
      1036b258:       08 00 02 40     nop
      1036b25c:       08 03 02 41     copy r3,r1
      1036b260:       6b c2 3f d9     stw rp,-14(sp)
      1036b264:       08 1e 02 43     copy sp,r3
      1036b268:       6f c1 01 00     stw,ma r1,80(sp)
      
      When ftrace gets enabled for this function the kernel will patch these
      NOPs to:
      
      1036b248:       10 19 57 20     <address of ftrace>
      1036b24c:       6f c1 00 80     stw,ma r1,40(sp)
      1036b250:       48 21 3f d1     ldw -18(r1),r1
      1036b254:       e8 20 c0 02     bv,n r0(r1)
      
      1036b258 <do_sys_open>:
      1036b258:       e8 3f 1f df     b,l,n .-c,r1
      1036b25c:       08 03 02 41     copy r3,r1
      1036b260:       6b c2 3f d9     stw rp,-14(sp)
      1036b264:       08 1e 02 43     copy sp,r3
      1036b268:       6f c1 01 00     stw,ma r1,80(sp)
      
      So the first NOP in do_sys_open() will be patched to jump backwards into
      some minimal trampoline code which pushes a stackframe, saves r1 which
      holds the return address, loads the address of the real ftrace function,
      and branches to that location. For 64 Bit things are getting a bit more
      complicated (and longer) because we must make sure that the address of
      ftrace location is 8 byte aligned, and the offset passed to ldd for
      fetching the address is 8 byte aligned as well.
      
      Note that gcc has a bug which misplaces the function label, and needs a
      patch to make dynamic ftrace work. See
      https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90751 for details.
      Signed-off-by: NSven Schnelle <svens@stackframe.org>
      Signed-off-by: NHelge Deller <deller@gmx.de>
      6ca63662
  3. 20 5月, 2019 2 次提交
  4. 06 5月, 2019 1 次提交
  5. 04 5月, 2019 4 次提交
  6. 03 4月, 2019 1 次提交
    • W
      locking/rwsem: Remove rwsem-spinlock.c & use rwsem-xadd.c for all archs · 390a0c62
      Waiman Long 提交于
      Currently, we have two different implementation of rwsem:
      
       1) CONFIG_RWSEM_GENERIC_SPINLOCK (rwsem-spinlock.c)
       2) CONFIG_RWSEM_XCHGADD_ALGORITHM (rwsem-xadd.c)
      
      As we are going to use a single generic implementation for rwsem-xadd.c
      and no architecture-specific code will be needed, there is no point
      in keeping two different implementations of rwsem. In most cases, the
      performance of rwsem-spinlock.c will be worse. It also doesn't get all
      the performance tuning and optimizations that had been implemented in
      rwsem-xadd.c over the years.
      
      For simplication, we are going to remove rwsem-spinlock.c and make all
      architectures use a single implementation of rwsem - rwsem-xadd.c.
      
      All references to RWSEM_GENERIC_SPINLOCK and RWSEM_XCHGADD_ALGORITHM
      in the code are removed.
      Suggested-by: NPeter Zijlstra <peterz@infradead.org>
      Signed-off-by: NWaiman Long <longman@redhat.com>
      Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Acked-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Davidlohr Bueso <dave@stgolabs.net>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Tim Chen <tim.c.chen@linux.intel.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-c6x-dev@linux-c6x.org
      Cc: linux-m68k@lists.linux-m68k.org
      Cc: linux-riscv@lists.infradead.org
      Cc: linux-um@lists.infradead.org
      Cc: linux-xtensa@linux-xtensa.org
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: nios2-dev@lists.rocketboards.org
      Cc: openrisc@lists.librecores.org
      Cc: uclinux-h8-devel@lists.sourceforge.jp
      Link: https://lkml.kernel.org/r/20190322143008.21313-3-longman@redhat.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      390a0c62
  7. 19 2月, 2019 1 次提交
    • Y
      32-bit userspace ABI: introduce ARCH_32BIT_OFF_T config option · 942fa985
      Yury Norov 提交于
      All new 32-bit architectures should have 64-bit userspace off_t type, but
      existing architectures has 32-bit ones.
      
      To enforce the rule, new config option is added to arch/Kconfig that defaults
      ARCH_32BIT_OFF_T to be disabled for new 32-bit architectures. All existing
      32-bit architectures enable it explicitly.
      
      New option affects force_o_largefile() behaviour. Namely, if userspace
      off_t is 64-bits long, we have no reason to reject user to open big files.
      
      Note that even if architectures has only 64-bit off_t in the kernel
      (arc, c6x, h8300, hexagon, nios2, openrisc, and unicore32),
      a libc may use 32-bit off_t, and therefore want to limit the file size
      to 4GB unless specified differently in the open flags.
      Signed-off-by: NYury Norov <ynorov@caviumnetworks.com>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NYury Norov <ynorov@marvell.com>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      942fa985
  8. 14 12月, 2018 1 次提交
  9. 06 12月, 2018 1 次提交
  10. 23 11月, 2018 1 次提交
  11. 31 10月, 2018 2 次提交
  12. 20 9月, 2018 1 次提交
  13. 13 8月, 2018 2 次提交
  14. 11 8月, 2018 1 次提交
  15. 09 8月, 2018 1 次提交
  16. 02 8月, 2018 3 次提交
  17. 28 6月, 2018 2 次提交
    • H
      parisc: Default to 4 SMP CPUs · 435d34c7
      Helge Deller 提交于
      I haven't seen any real SMP machine yet with > 4 CPUs (we don't suport
      SuperDomes yet), so reducing the default maximum number of CPUs may speed up
      various bitop functions which depend on number of CPUs in the system.
      
      bload-o-meter on a typical 64-bit kernel shows:
      
      Data: add/remove: 0/0 grow/shrink: 0/10 up/down: 0/-3724 (-3724)
      Total: Before=1910404, After=1906680, chg -0.19%
      
      Code: add/remove: 0/2 grow/shrink: 42/38 up/down: 2320/-3500 (-1180)
      Total: Before=11053099, After=11051919, chg -0.01%
      Signed-off-by: NHelge Deller <deller@gmx.de>
      435d34c7
    • H
      parisc: Mark 16kB and 64kB page sizes BROKEN · 1c971f39
      Helge Deller 提交于
      A full boot only succeeds with 4kB page sizes currently.
      For 16kB and 64kB page size support somone needs to fix the LBA PCI code
      at least, so mark those broken for now.
      Signed-off-by: NHelge Deller <deller@gmx.de>
      1c971f39
  18. 15 6月, 2018 1 次提交
  19. 09 5月, 2018 2 次提交
  20. 11 4月, 2018 1 次提交
    • H
      parisc: Switch to generic COMPAT_BINFMT_ELF · 71d577db
      Helge Deller 提交于
      Drop our own compat binfmt implementation in
      arch/parisc/kernel/binfmt_elf32.c in favour of the generic
      implementation with CONFIG_COMPAT_BINFMT_ELF.
      
      While cleaning up the dependencies, I noticed that ELF_PLATFORM was strangely
      defined: On a 32-bit kernel, it was defined to "PARISC", while when running in
      compat mode on a 64-bit kernel it was defined to "PARISC32". Since it doesn't
      seem to be used in glibc yet, it's now defined in both cases to "PARISC". In
      any case, it can be distinguished because it's either a 32-bit or a 64-bit ELF
      file.
      Signed-off-by: NHelge Deller <deller@gmx.de>
      71d577db
  21. 28 3月, 2018 1 次提交
  22. 17 11月, 2017 2 次提交
  23. 02 11月, 2017 1 次提交
    • G
      License cleanup: add SPDX GPL-2.0 license identifier to files with no license · b2441318
      Greg Kroah-Hartman 提交于
      Many source files in the tree are missing licensing information, which
      makes it harder for compliance tools to determine the correct license.
      
      By default all files without license information are under the default
      license of the kernel, which is GPL version 2.
      
      Update the files which contain no license information with the 'GPL-2.0'
      SPDX license identifier.  The SPDX identifier is a legally binding
      shorthand, which can be used instead of the full boiler plate text.
      
      This patch is based on work done by Thomas Gleixner and Kate Stewart and
      Philippe Ombredanne.
      
      How this work was done:
      
      Patches were generated and checked against linux-4.14-rc6 for a subset of
      the use cases:
       - file had no licensing information it it.
       - file was a */uapi/* one with no licensing information in it,
       - file was a */uapi/* one with existing licensing information,
      
      Further patches will be generated in subsequent months to fix up cases
      where non-standard license headers were used, and references to license
      had to be inferred by heuristics based on keywords.
      
      The analysis to determine which SPDX License Identifier to be applied to
      a file was done in a spreadsheet of side by side results from of the
      output of two independent scanners (ScanCode & Windriver) producing SPDX
      tag:value files created by Philippe Ombredanne.  Philippe prepared the
      base worksheet, and did an initial spot review of a few 1000 files.
      
      The 4.13 kernel was the starting point of the analysis with 60,537 files
      assessed.  Kate Stewart did a file by file comparison of the scanner
      results in the spreadsheet to determine which SPDX license identifier(s)
      to be applied to the file. She confirmed any determination that was not
      immediately clear with lawyers working with the Linux Foundation.
      
      Criteria used to select files for SPDX license identifier tagging was:
       - Files considered eligible had to be source code files.
       - Make and config files were included as candidates if they contained >5
         lines of source
       - File already had some variant of a license header in it (even if <5
         lines).
      
      All documentation files were explicitly excluded.
      
      The following heuristics were used to determine which SPDX license
      identifiers to apply.
      
       - when both scanners couldn't find any license traces, file was
         considered to have no license information in it, and the top level
         COPYING file license applied.
      
         For non */uapi/* files that summary was:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|-------
         GPL-2.0                                              11139
      
         and resulted in the first patch in this series.
      
         If that file was a */uapi/* path one, it was "GPL-2.0 WITH
         Linux-syscall-note" otherwise it was "GPL-2.0".  Results of that was:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|-------
         GPL-2.0 WITH Linux-syscall-note                        930
      
         and resulted in the second patch in this series.
      
       - if a file had some form of licensing information in it, and was one
         of the */uapi/* ones, it was denoted with the Linux-syscall-note if
         any GPL family license was found in the file or had no licensing in
         it (per prior point).  Results summary:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|------
         GPL-2.0 WITH Linux-syscall-note                       270
         GPL-2.0+ WITH Linux-syscall-note                      169
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause)    21
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)    17
         LGPL-2.1+ WITH Linux-syscall-note                      15
         GPL-1.0+ WITH Linux-syscall-note                       14
         ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause)    5
         LGPL-2.0+ WITH Linux-syscall-note                       4
         LGPL-2.1 WITH Linux-syscall-note                        3
         ((GPL-2.0 WITH Linux-syscall-note) OR MIT)              3
         ((GPL-2.0 WITH Linux-syscall-note) AND MIT)             1
      
         and that resulted in the third patch in this series.
      
       - when the two scanners agreed on the detected license(s), that became
         the concluded license(s).
      
       - when there was disagreement between the two scanners (one detected a
         license but the other didn't, or they both detected different
         licenses) a manual inspection of the file occurred.
      
       - In most cases a manual inspection of the information in the file
         resulted in a clear resolution of the license that should apply (and
         which scanner probably needed to revisit its heuristics).
      
       - When it was not immediately clear, the license identifier was
         confirmed with lawyers working with the Linux Foundation.
      
       - If there was any question as to the appropriate license identifier,
         the file was flagged for further research and to be revisited later
         in time.
      
      In total, over 70 hours of logged manual review was done on the
      spreadsheet to determine the SPDX license identifiers to apply to the
      source files by Kate, Philippe, Thomas and, in some cases, confirmation
      by lawyers working with the Linux Foundation.
      
      Kate also obtained a third independent scan of the 4.13 code base from
      FOSSology, and compared selected files where the other two scanners
      disagreed against that SPDX file, to see if there was new insights.  The
      Windriver scanner is based on an older version of FOSSology in part, so
      they are related.
      
      Thomas did random spot checks in about 500 files from the spreadsheets
      for the uapi headers and agreed with SPDX license identifier in the
      files he inspected. For the non-uapi files Thomas did random spot checks
      in about 15000 files.
      
      In initial set of patches against 4.14-rc6, 3 files were found to have
      copy/paste license identifier errors, and have been fixed to reflect the
      correct identifier.
      
      Additionally Philippe spent 10 hours this week doing a detailed manual
      inspection and review of the 12,461 patched files from the initial patch
      version early this week with:
       - a full scancode scan run, collecting the matched texts, detected
         license ids and scores
       - reviewing anything where there was a license detected (about 500+
         files) to ensure that the applied SPDX license was correct
       - reviewing anything where there was no detection but the patch license
         was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
         SPDX license was correct
      
      This produced a worksheet with 20 files needing minor correction.  This
      worksheet was then exported into 3 different .csv files for the
      different types of files to be modified.
      
      These .csv files were then reviewed by Greg.  Thomas wrote a script to
      parse the csv files and add the proper SPDX tag to the file, in the
      format that the file expected.  This script was further refined by Greg
      based on the output to detect more types of files automatically and to
      distinguish between header and source .c files (which need different
      comment types.)  Finally Greg ran the script using the .csv files to
      generate the patches.
      Reviewed-by: NKate Stewart <kstewart@linuxfoundation.org>
      Reviewed-by: NPhilippe Ombredanne <pombredanne@nexb.com>
      Reviewed-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b2441318
  24. 23 9月, 2017 1 次提交
    • H
      parisc: Reintroduce option to gzip-compress the kernel · af21b01d
      Helge Deller 提交于
      By adding the feature to build the kernel as self-extracting
      executeable, the possibility to simply compress the kernel with gzip was
      lost.
      
      This patch now reintroduces this possibilty again and leaves it up to
      the user to decide how the kernel should be built.
      
      The palo bootloader is able to natively load both formats.
      Signed-off-by: NHelge Deller <deller@gmx.de>
      af21b01d
  25. 09 9月, 2017 1 次提交
  26. 22 8月, 2017 3 次提交
  27. 31 7月, 2017 1 次提交
    • B
      parisc: Define CONFIG_CPU_BIG_ENDIAN · 74ad3d28
      Babu Moger 提交于
      While working on enabling queued rwlock on SPARC, found this following
      code in include/asm-generic/qrwlock.h which uses CONFIG_CPU_BIG_ENDIAN
      to clear a byte.
      
      static inline u8 *__qrwlock_write_byte(struct qrwlock *lock)
       {
      	return (u8 *)lock + 3 * IS_BUILTIN(CONFIG_CPU_BIG_ENDIAN);
       }
      
      Problem is many of the fixed big endian architectures don't define
      CPU_BIG_ENDIAN and clears the wrong byte.
      
      Define CPU_BIG_ENDIAN for parisc architecture to fix it.
      Signed-off-by: NBabu Moger <babu.moger@oracle.com>
      Signed-off-by: NHelge Deller <deller@gmx.de>
      74ad3d28