- Nov 30, 2021
-
-
Helge Deller authored
Default KBUILD_IMAGE to $(boot)/bzImage if a self-extracting (CONFIG_PARISC_SELF_EXTRACT=y) kernel is to be built. This fixes the bindeb-pkg make target. Signed-off-by:
Helge Deller <deller@gmx.de> Cc: <stable@vger.kernel.org> # v4.14+
-
- Oct 24, 2021
-
-
Masahiro Yamada authored
Documentation/kbuild/makefiles.rst suggests to use "archclean" for cleaning arch/$(SRCARCH)/boot/, but it is not a hard requirement. Since commit d92cc4d5 ("kbuild: require all architectures to have arch/$(SRCARCH)/Kbuild"), we can use the "subdir- += boot" trick for all architectures. This can take advantage of the parallel option (-j) for "make clean". I also cleaned up the comments in arch/$(SRCARCH)/Makefile. The "archdep" target no longer exists. Signed-off-by:
Masahiro Yamada <masahiroy@kernel.org> Reviewed-by:
Kees Cook <keescook@chromium.org> Acked-by:
Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
-
- Sep 01, 2021
-
-
Masahiro Yamada authored
Commit 23243c1a ("arch: use cross_compiling to check whether it is a cross build or not") broke 64-bit parisc builds on 32-bit parisc systems. Helge mentioned: - 64-bit parisc userspace is not supported yet [1] - hppa gcc does not support "-m64" flag [2] That means, parisc developers working on a 32-bit parisc machine need to use hppa64-linux-gnu-gcc (cross compiler) for building the 64-bit parisc kernel. After the offending commit, gcc is used in such a case because both $(SRCARCH) and $(SUBARCH) are 'parisc', hence cross_compiling is unset. A correct way is to introduce ARCH=parisc64 because building the 64-bit parisc kernel on a 32-bit parisc system is not exactly a native build, but rather a semi-cross build. [1]: https://lore.kernel.org/linux-parisc/5dfd81eb-c8ca-b7f5-e80e-8632767c022d@gmx.de/#t [2]: https://lore.kernel.org/linux-parisc/89515325-fc21-31da-d238-6f7a9abbf9a0@gmx.de/ Fixes: 23243c1a ("arch: use cross_compiling to check whether it is a cross build or not") Signed-off-by:
Masahiro Yamada <masahiroy@kernel.org> Reported-by:
Meelis Roos <mroos@linux.ee> Tested-by:
Meelis Roos <mroos@linux.ee> Cc: <stable@vger.kernel.org> # v5.13+ Signed-off-by:
Helge Deller <deller@gmx.de>
-
- Aug 30, 2021
-
-
Masahiro Yamada authored
Use obj-y to clean up Makefile. Signed-off-by:
Masahiro Yamada <masahiroy@kernel.org> Signed-off-by:
Helge Deller <deller@gmx.de>
-
- May 05, 2021
-
-
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:
Masahiro Yamada <masahiroy@kernel.org> Acked-by:
Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Helge Deller <deller@gmx.de> # parisc Acked-by: Max Filippov <jcmvbkbc@gmail.com> # xtensa
-
- Jan 29, 2021
-
-
Viresh Kumar authored
The "oprofile" user-space tools don't use the kernel OPROFILE support any more, and haven't in a long time. User-space has been converted to the perf interfaces. Remove the old oprofile's architecture specific support. Suggested-by:
Christoph Hellwig <hch@infradead.org> Suggested-by:
Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by:
Viresh Kumar <viresh.kumar@linaro.org> Acked-by:
Robert Richter <rric@kernel.org> Acked-by:
William Cohen <wcohen@redhat.com> Acked-by:
Al Viro <viro@zeniv.linux.org.uk> Acked-by:
Thomas Gleixner <tglx@linutronix.de> Acked-by: Helge Deller <deller@gmx.de> # parisc
-
- Jun 11, 2020
-
-
Denis Efremov authored
Redefine GZIP, BZIP2, LZOP variables as KGZIP, KBZIP2, KLZOP resp. GZIP, BZIP2, LZOP env variables are reserved by the tools. The original attempt to redefine them internally doesn't work in makefiles/scripts intercall scenarios, e.g., "make GZIP=gzip bindeb-pkg" and results in broken builds. There can be other broken build commands because of this, so the universal solution is to use non-reserved env variables for the compression tools. Fixes: 8dfb61dc ("kbuild: add variables for compression tools") Signed-off-by:
Denis Efremov <efremov@linux.com> Tested-by:
Guenter Roeck <linux@roeck-us.net> Signed-off-by:
Masahiro Yamada <masahiroy@kernel.org>
-
- Jun 06, 2020
-
-
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:
Denis Efremov <efremov@linux.com> Signed-off-by:
Masahiro Yamada <masahiroy@kernel.org>
-
- May 10, 2020
-
-
Helge Deller authored
Avoid error messages when running 'make ARCH=parisc clean'. Noticed-by:
Masahiro Yamada <masahiroy@kernel.org> Signed-off-by:
Helge Deller <deller@gmx.de>
-
- Mar 27, 2020
-
-
Helge Deller authored
Fix the recursive loop when running "make ARCH=parisc defconfig". Fixes: 84669923 ("parisc: Regenerate parisc defconfigs") Noticed-by:
Guenter Roeck <linux@roeck-us.net> Tested-by:
Guenter Roeck <linux@roeck-us.net> Signed-off-by:
Helge Deller <deller@gmx.de>
-
- Nov 06, 2019
-
-
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:
Mark Rutland <mark.rutland@arm.com> Acked-by:
Helge Deller <deller@gmx.de> Acked-by:
Steven Rostedt (VMware) <rostedt@goodmis.org> Reviewed-by:
Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by:
Torsten Duwe <duwe@suse.de> Tested-by:
Amit Daniel Kachhap <amit.kachhap@arm.com> Tested-by:
Sven Schnelle <svens@stackframe.org> Tested-by:
Torsten 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
-
- Aug 21, 2019
-
-
Masahiro Yamada authored
Currently, the timestamp of module linker scripts are not checked. Add them to the dependency of modules so they are correctly rebuilt. Signed-off-by:
Masahiro Yamada <yamada.masahiro@socionext.com>
-
- Aug 01, 2019
-
-
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:
James Bottomley <James.Bottomley@HansenPartnership.com> Cc: stable@vger.kernel.org # v4.20+ Signed-off-by:
Helge Deller <deller@gmx.de>
-
- Jul 31, 2019
-
-
Masahiro Yamada authored
'default_defconfig' is an awkward name since 'defconfig' is the default. Let's simply say 'defconfig' like other architectures. You can drop the KBUILD_DEFCONFIG define by following the standard naming. Signed-off-by:
Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by:
Helge Deller <deller@gmx.de>
-
- Jul 10, 2019
-
-
Masahiro Yamada authored
Replace $(src) and $(obj) with $(srctree) and $(objtree), respectively. Signed-off-by:
Masahiro Yamada <yamada.masahiro@socionext.com>
-
- Jun 08, 2019
-
-
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:
Sven Schnelle <svens@stackframe.org> Signed-off-by:
Helge Deller <deller@gmx.de>
-
- Dec 10, 2018
-
-
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:
Firoz Khan <firoz.khan@linaro.org> Acked-by:
Helge Deller <deller@gmx.de> Signed-off-by:
Helge Deller <deller@gmx.de>
-
- Dec 02, 2018
-
-
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:
Frank Scheiner <frank.scheiner@web.de> Fixes: 24b6c225 ("parisc: Build kernel without -ffunction-sections") Cc: <stable@vger.kernel.org> # v4.18+ Signed-off-by:
Helge Deller <deller@gmx.de>
-
- Oct 17, 2018
-
-
Masahiro Yamada authored
Commit cafa0010 ("Raise the minimum required gcc version to 4.6") bumped the minimum GCC version to 4.6 for all architectures. The version check in arch/parisc/Makefile is obsolete now. Signed-off-by:
Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by:
Helge Deller <deller@gmx.de>
-
- Jun 29, 2018
-
-
Helge Deller authored
As suggested by Nick Piggin it seems we can drop the -ffunction-sections compile flag, now that the kernel uses thin archives. Testing with 32- and 64-bit kernel showed no difference in kernel size. Suggested-by:
Nicholas Piggin <npiggin@gmail.com> Signed-off-by:
Helge Deller <deller@gmx.de>
-
- Jun 01, 2018
-
-
Luc Van Oostenryck authored
By default, sparse assumes a 64bit machine when compiled on x86-64 and 32bit when compiled on anything else. This can of course create all sort of problems for the other archs, like issuing false warnings ('shift too big (32) for type unsigned long'), or worse, failing to emit legitimate warnings. Fix this by adding the -m32/-m64 flag, depending on CONFIG_64BIT, to CHECKFLAGS in the main Makefile (and so for all archs). Also, remove the now unneeded -m32/-m64 in arch specific Makefiles. Signed-off-by:
Luc Van Oostenryck <luc.vanoostenryck@gmail.com> Signed-off-by:
Masahiro Yamada <yamada.masahiro@socionext.com>
-
- May 29, 2018
-
-
Luc Van Oostenryck authored
The kernel depends on macros like __BYTE_ORDER__, __BIG_ENDIAN__ or __LITTLE_ENDIAN__. OTOH, sparse doesn't know about the endianness of the kernel and by default uses the same as the machine on which sparse was built. Ensure that sparse can predefine the macros corresponding to how the kernel was configured by adding -m{big,little}-endian to CHECKFLAGS in the main Makefile (and so for all archs). Also, remove the equivalent done in arch specific Makefiles. Signed-off-by:
Luc Van Oostenryck <luc.vanoostenryck@gmail.com> Signed-off-by:
Masahiro Yamada <yamada.masahiro@socionext.com>
-
- Apr 18, 2018
-
-
Helge Deller authored
Debian uses "make all" to build the Linux kernel, thus to be able to use the self-decompressing kernel as default debian kernel we need to make bzImage the default build target. Signed-off-by:
Helge Deller <deller@gmx.de>
-
- Nov 17, 2017
-
-
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:
Luc Van Oostenryck <luc.vanoostenryck@gmail.com> Signed-off-by:
Helge Deller <deller@gmx.de>
-
- Sep 22, 2017
-
-
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:
Helge Deller <deller@gmx.de>
-
- Aug 22, 2017
-
-
Helge Deller authored
Signed-off-by:
Helge Deller <deller@gmx.de>
-
- Apr 14, 2016
-
-
Helge Deller authored
Fix the FTRACE function tracer for 32- and 64-bit kernel. The former code was horribly broken. Reimplement most coding in assembly and utilize optimizations, e.g. put mcount() and ftrace_stub() into one L1 cacheline. Signed-off-by:
Helge Deller <deller@gmx.de>
-
- Feb 16, 2015
-
-
Helge Deller authored
Signed-off-by:
Helge Deller <deller@gmx.de>
-
- Jan 09, 2015
-
-
Masahiro Yamada authored
The macros cc-version, cc-fullversion and ld-version take no argument. It is not necessary to add $(call ...) to invoke them. Signed-off-by:
Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Helge Deller <deller@gmx.de> [parisc] Signed-off-by:
Michal Marek <mmarek@suse.cz>
-
- Sep 23, 2014
-
-
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:
John David Anglin <dave.anglin@bell.net> Cc: stable@vger.kernel.org # v3.0+ Signed-off-by:
Helge Deller <deller@gmx.de>
-
- Nov 07, 2013
-
-
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:
Helge Deller <deller@gmx.de>
-
- Jul 09, 2013
-
-
Helge Deller authored
The latest PA-RISC Boot Loader (palo) allows loading of gzip compressed vmlinuz kernels. So let's now switch to build a vmlinuz file when we build a palo boot image. PALO version 1.9 (or higher) is required for this which is available at git://git.kernel.org/pub/scm/linux/kernel/git/deller/palo.git Signed-off-by:
Helge Deller <deller@gmx.de> Cc: <stable@vger.kernel.org> # 3.10
-
- Jun 01, 2013
-
-
Paul Bolle authored
There's a Makefile line setting cflags for CONFIG_PA7100. But that Kconfig macro doesn't exist. There is a Kconfig symbol PA7000, which covers both PA7000 and PA7100 processors. So let's use the corresponding Kconfig macro. Signed-off-by:
Paul Bolle <pebolle@tiscali.nl> Signed-off-by:
Helge Deller <deller@gmx.de>
-
- May 13, 2013
-
-
Helge Deller authored
People/distros vary how they prefix the toolchain name for 64bit builds. Rather than enforce one convention over another, add a for loop which does a search for all the general prefixes. For 64bit builds, we now search for (in order): hppa64-unknown-linux-gnu hppa64-linux-gnu hppa64-linux For 32bit builds, we look for: hppa-unknown-linux-gnu hppa-linux-gnu hppa-linux hppa2.0-unknown-linux-gnu hppa2.0-linux-gnu hppa2.0-linux hppa1.1-unknown-linux-gnu hppa1.1-linux-gnu hppa1.1-linux This patch was initiated by Mike Frysinger, with feedback from Jeroen Roovers, John David Anglin and Helge Deller. Signed-off-by:
Mike Frysinger <vapier@gentoo.org> Signed-off-by:
Jeroen Roovers <jer@gentoo.org> Signed-off-by:
John David Anglin <dave.anglin@bell.net> Signed-off-by:
Helge Deller <deller@gmx.de>
-
- May 06, 2013
-
-
Mike Frysinger authored
The ifeq operator does not accept globs, so this little bit of code will never match (unless uname literally prints out "parsic*"). Rewrite to use a pattern matching operator so that NATIVE is set to 1 on parisc. Signed-off-by:
Mike Frysinger <vapier@gentoo.org> Signed-off-by:
Helge Deller <deller@gmx.de>
-
- Apr 25, 2013
-
-
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:
Helge Deller <deller@gmx.de>
-
- Mar 02, 2013
-
-
Rolf Eike Beer authored
PA-RISC is the only arch that installs the modules when installing the kernel. Signed-off-by:
Rolf Eike Beer <eike-kernel@sf-tec.de> Signed-off-by:
Helge Deller <deller@gmx.de>
-
- Feb 20, 2013
-
-
Helge Deller authored
When building a 64bit kernel which includes all necessary drivers and filesystems the vmlinux kernel often gets so huge, that the linker won't be able to resolve the branch stubs. This patch overcomes this limit by providing an option to compile the kernel with the -mlong-calls compiler option. Signed-off-by:
Helge Deller <deller@gmx.de>
-
Helge Deller authored
The current Makefile will only choose the hppa64 cross compiler when running natively on hppa in a 32bit userspace. This patch additionally chooses the correct 32/64 bit hppa compiler even when doing real cross compiling to hppa/hppa64 from another architecture. Signed-off-by:
Helge Deller <deller@gmx.de>
-
- Jun 05, 2012
-
-
James Bottomley authored
Sam broke this with commit 1f2bfbd0 Author: Sam Ravnborg <sam@ravnborg.org> Date: Sat May 5 10:18:41 2012 +0200 kbuild: link of vmlinux moved to a script But we should be deriving the location of libgcc in the same way as all the other archs, so fix by adding a LIBGCC variable which is evaluated in the makefile Signed-off-by:
James Bottomley <JBottomley@Parallels.com>
-