Skip to content
Snippets Groups Projects
  1. Nov 30, 2021
  2. Oct 24, 2021
  3. Sep 01, 2021
  4. Aug 30, 2021
  5. May 05, 2021
    • Masahiro Yamada's avatar
      arch: use cross_compiling to check whether it is a cross build or not · 23243c1a
      Masahiro Yamada authored
      
      'cross_compiling' is defined by the top Makefile and available for
      arch Makefiles to check whether it is a cross build or not. A good
      thing is the variable name 'cross_compiling' is self-documenting.
      
      This is a simple replacement for m68k, mips, sh, for which $(ARCH)
      and $(SRCARCH) always match.
      
      No functional change is intended for xtensa, either.
      
      This is rather a fix for parisc because arch/parisc/Makefile defines
      UTS_MATCHINE depending on CONFIG_64BIT, therefore cc-cross-prefix
      is not working in Kconfig time.
      
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Acked-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Acked-by: Helge Deller <deller@gmx.de>  # parisc
      Acked-by: Max Filippov <jcmvbkbc@gmail.com> # xtensa
      23243c1a
  6. Jan 29, 2021
  7. Jun 11, 2020
  8. Jun 06, 2020
    • Denis Efremov's avatar
      kbuild: add variables for compression tools · 8dfb61dc
      Denis Efremov authored
      
      Allow user to use alternative implementations of compression tools,
      such as pigz, pbzip2, pxz. For example, multi-threaded tools to
      speed up the build:
      $ make GZIP=pigz BZIP2=pbzip2
      
      Variables _GZIP, _BZIP2, _LZOP are used internally because original env
      vars are reserved by the tools. The use of GZIP in gzip tool is obsolete
      since 2015. However, alternative implementations (e.g., pigz) still rely
      on it. BZIP2, BZIP, LZOP vars are not obsolescent.
      
      The credit goes to @grsecurity.
      
      As a sidenote, for multi-threaded lzma, xz compression one can use:
      $ export XZ_OPT="--threads=0"
      
      Signed-off-by: default avatarDenis Efremov <efremov@linux.com>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      8dfb61dc
  9. May 10, 2020
  10. Mar 27, 2020
  11. Nov 06, 2019
    • Mark Rutland's avatar
      module/ftrace: handle patchable-function-entry · a1326b17
      Mark Rutland authored
      
      When using patchable-function-entry, the compiler will record the
      callsites into a section named "__patchable_function_entries" rather
      than "__mcount_loc". Let's abstract this difference behind a new
      FTRACE_CALLSITE_SECTION, so that architectures don't have to handle this
      explicitly (e.g. with custom module linker scripts).
      
      As parisc currently handles this explicitly, it is fixed up accordingly,
      with its custom linker script removed. Since FTRACE_CALLSITE_SECTION is
      only defined when DYNAMIC_FTRACE is selected, the parisc module loading
      code is updated to only use the definition in that case. When
      DYNAMIC_FTRACE is not selected, modules shouldn't have this section, so
      this removes some redundant work in that case.
      
      To make sure that this is keep up-to-date for modules and the main
      kernel, a comment is added to vmlinux.lds.h, with the existing ifdeffery
      simplified for legibility.
      
      I built parisc generic-{32,64}bit_defconfig with DYNAMIC_FTRACE enabled,
      and verified that the section made it into the .ko files for modules.
      
      Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
      Acked-by: default avatarHelge Deller <deller@gmx.de>
      Acked-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
      Reviewed-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
      Reviewed-by: default avatarTorsten Duwe <duwe@suse.de>
      Tested-by: default avatarAmit Daniel Kachhap <amit.kachhap@arm.com>
      Tested-by: default avatarSven Schnelle <svens@stackframe.org>
      Tested-by: default avatarTorsten Duwe <duwe@suse.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: James E.J. Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: Jessica Yu <jeyu@kernel.org>
      Cc: linux-parisc@vger.kernel.org
      a1326b17
  12. Aug 21, 2019
  13. Aug 01, 2019
    • James Bottomley's avatar
      parisc: Add archclean Makefile target · f2c5ed0d
      James Bottomley authored
      
      Apparently we don't have an archclean target in our
      arch/parisc/Makefile, so files in there never get cleaned out by make
      mrproper.  This, in turn means that the sizes.h file in
      arch/parisc/boot/compressed never gets removed and worse, when you
      transition to an O=build/parisc[64] build model it overrides the
      generated file.  The upshot being my bzImage was building with a SZ_end
      that was too small.
      
      I fixed it by making mrproper clean everything.
      
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: stable@vger.kernel.org # v4.20+
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      f2c5ed0d
  14. Jul 31, 2019
  15. Jul 10, 2019
  16. Jun 08, 2019
    • Sven Schnelle's avatar
      parisc: add dynamic ftrace · 6ca63662
      Sven Schnelle authored
      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: default avatarSven Schnelle <svens@stackframe.org>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      6ca63662
  17. Dec 10, 2018
    • Firoz Khan's avatar
      parisc: generate uapi header and system call table files · 575afc4d
      Firoz Khan authored
      
      System call table generation script must be run to gener-
      ate unistd_32/64.h and syscall_table_32/64/c32.h files.
      This patch will have changes which will invokes the script.
      
      This patch will generate unistd_32/64.h and syscall_table-
      _32/64/c32.h files by the syscall table generation script
      invoked by parisc/Makefile and the generated files against
      the removed files must be identical.
      
      The generated uapi header file will be included in uapi/-
      asm/unistd.h and generated system call table header file
      will be included by kernel/syscall.S file.
      
      Signed-off-by: default avatarFiroz Khan <firoz.khan@linaro.org>
      Acked-by: default avatarHelge Deller <deller@gmx.de>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      575afc4d
  18. Dec 02, 2018
    • Helge Deller's avatar
      parisc: Enable -ffunction-sections for modules on 32-bit kernel · 1e8249b8
      Helge Deller authored
      
      Frank Schreiner reported, that since kernel 4.18 he faces sysfs-warnings
      when loading modules on a 32-bit kernel. Here is one such example:
      
       sysfs: cannot create duplicate filename '/module/nfs/sections/.text'
       CPU: 0 PID: 98 Comm: modprobe Not tainted 4.18.0-2-parisc #1 Debian 4.18.10-2
       Backtrace:
        [<1017ce2c>] show_stack+0x3c/0x50
        [<107a7210>] dump_stack+0x28/0x38
        [<103f900c>] sysfs_warn_dup+0x88/0xac
        [<103f8b1c>] sysfs_add_file_mode_ns+0x164/0x1d0
        [<103f9e70>] internal_create_group+0x11c/0x304
        [<103fa0a0>] sysfs_create_group+0x48/0x60
        [<1022abe8>] load_module.constprop.35+0x1f9c/0x23b8
        [<1022b278>] sys_finit_module+0xd0/0x11c
        [<101831dc>] syscall_exit+0x0/0x14
      
      This warning gets triggered by the fact, that due to commit 24b6c225
      ("parisc: Build kernel without -ffunction-sections") we now get multiple .text
      sections in the kernel modules for which sysfs_create_group() can't create
      multiple virtual files.
      
      This patch works around the problem by re-enabling the -ffunction-sections
      compiler option for modules, while keeping it disabled for the non-module
      kernel code.
      
      Reported-by: default avatarFrank Scheiner <frank.scheiner@web.de>
      Fixes: 24b6c225 ("parisc: Build kernel without -ffunction-sections")
      Cc: <stable@vger.kernel.org> # v4.18+
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      1e8249b8
  19. Oct 17, 2018
  20. Jun 29, 2018
  21. Jun 01, 2018
  22. May 29, 2018
  23. Apr 18, 2018
  24. Nov 17, 2017
    • Luc Van Oostenryck's avatar
      parisc: Pass endianness info to sparse · 3744d988
      Luc Van Oostenryck authored
      
      parisc is big-endian only but sparse assumes the same endianness as the
      building machine.
      This is problematic for code which expect __BYTE_ORDER__ being correctly
      predefined by the compiler which sparse can then pre-process differently
      from what gcc would.
      
      Fix this by letting sparse know about the architecture endianness.
      
      To: James Bottomley <jejb@parisc-linux.org>
      To: Helge Deller <deller@gmx.de>
      CC: linux-parisc@vger.kernel.org
      Signed-off-by: default avatarLuc Van Oostenryck <luc.vanoostenryck@gmail.com>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      3744d988
  25. Sep 22, 2017
    • Helge Deller's avatar
      parisc: Reintroduce option to gzip-compress the kernel · af21b01d
      Helge Deller authored
      
      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: default avatarHelge Deller <deller@gmx.de>
      af21b01d
  26. Aug 22, 2017
  27. Apr 14, 2016
  28. Feb 16, 2015
  29. Jan 09, 2015
  30. Sep 23, 2014
    • John David Anglin's avatar
      parisc: Only use -mfast-indirect-calls option for 32-bit kernel builds · d26a7730
      John David Anglin authored
      
      In spite of what the GCC manual says, the -mfast-indirect-calls has
      never been supported in the 64-bit parisc compiler. Indirect calls have
      always been done using function descriptors irrespective of the
      -mfast-indirect-calls option.
      
      Recently, it was noticed that a function descriptor was always requested
      when the -mfast-indirect-calls option was specified. This caused
      problems when the option was used in  application code and doesn't make
      any sense because the whole point of the option is to avoid using a
      function descriptor for indirect calls.
      
      Fixing this broke 64-bit kernel builds.
      
      I will fix GCC but for now we need the attached change. This results in
      the same kernel code as before.
      
      Signed-off-by: default avatarJohn David Anglin <dave.anglin@bell.net>
      Cc: stable@vger.kernel.org  # v3.0+
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      d26a7730
  31. Nov 07, 2013
    • Helge Deller's avatar
      parisc: make "make install" not depend on vmlinux · b0756b5a
      Helge Deller authored
      Install targets (install, zinstall, uinstall) on parisc have a
      dependency to vmlinux. This may cause parts of the kernel to be rebuilt
      during installation. We must avoid this since this may run as root.
      Install targets "ABSOLUTELY MUST NOT MODIFY THE SOURCE TREE." as Linus
      emphasized this in:
      
      http://lkml.org/lkml/2013/7/10/600
      
      
      
      So on parisc and maybe other archs we need the same as for x86:
      
      1648e4f8 x86, kbuild: make "make install" not depend on vmlinux
      
      This parisc patch was inspired by:
      
      19514fc6 arm, kbuild: make "make install" not depend on vmlinux
      
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      b0756b5a
  32. Jul 09, 2013
  33. Jun 01, 2013
  34. May 13, 2013
  35. May 06, 2013
  36. Apr 25, 2013
    • Helge Deller's avatar
      parisc: disable -mlong-calls compiler option for kernel modules · cf71130d
      Helge Deller authored
      
      CONFIG_MLONGCALLS was introduced in commit
      ec758f98 to overcome linker issues when linking
      huge linux kernels, e.g. with many modules linked in.
      
      But in the kernel module loader there is no support yet for the new relocation
      types, which is why modules built with -mlong-calls can't be loaded.
      Furthermore, for modules long calls are not really necessary, since we already
      use stub sections which resolve long distance calls.
      
      So, let's just disable this compiler option when compiling kernel modules.
      
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      cf71130d
  37. Mar 02, 2013
  38. Feb 20, 2013
  39. Jun 05, 2012
Loading