|
Revision tags: v6.15, v6.15-rc7, v6.15-rc6, v6.15-rc5, v6.15-rc4, v6.15-rc3, v6.15-rc2, v6.15-rc1, v6.14 |
|
| #
1f266fd7 |
| 20-Mar-2025 |
Heiko Carstens <[email protected]> |
s390/lowcore: Remove unused machine_flags
The machine_flags member in struct lowcore is not used anymore. Remove it.
Reviewed-by: Sven Schnelle <[email protected]> Signed-off-by: Heiko Carstens <
s390/lowcore: Remove unused machine_flags
The machine_flags member in struct lowcore is not used anymore. Remove it.
Reviewed-by: Sven Schnelle <[email protected]> Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
show more ...
|
|
Revision tags: v6.14-rc7, v6.14-rc6, v6.14-rc5, v6.14-rc4, v6.14-rc3, v6.14-rc2 |
|
| #
841f35a0 |
| 07-Feb-2025 |
Heiko Carstens <[email protected]> |
s390/bear: Convert cpu_has_bear() to cpu feature function
Get rid of the cpu_has_bear jump label and convert cpu_has_bear() to a cpu feature function using test_facility() and with that use a static
s390/bear: Convert cpu_has_bear() to cpu feature function
Get rid of the cpu_has_bear jump label and convert cpu_has_bear() to a cpu feature function using test_facility() and with that use a static branch.
Reviewed-by: Vasily Gorbik <[email protected]> Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
show more ...
|
| #
52109a06 |
| 07-Feb-2025 |
Heiko Carstens <[email protected]> |
s390: Convert MACHINE_IS_[LPAR|VM|KVM], etc, machine_is_[lpar|vm|kvm]()
Move machine type detection to the decompressor and use static branches to implement and use machine_is_[lpar|vm|kvm]() instea
s390: Convert MACHINE_IS_[LPAR|VM|KVM], etc, machine_is_[lpar|vm|kvm]()
Move machine type detection to the decompressor and use static branches to implement and use machine_is_[lpar|vm|kvm]() instead of a runtime check via MACHINE_IS_[LPAR|VM|KVM].
Reviewed-by: Vasily Gorbik <[email protected]> Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
show more ...
|
| #
e4da8249 |
| 07-Feb-2025 |
Heiko Carstens <[email protected]> |
s390/lowcore: Convert relocated lowcore alternative to machine feature
Convert the explicit relocated lowcore alternative type to a more generic machine feature. This only reduces the number of alte
s390/lowcore: Convert relocated lowcore alternative to machine feature
Convert the explicit relocated lowcore alternative type to a more generic machine feature. This only reduces the number of alternative types, but has no impact on code generation.
Reviewed-by: Vasily Gorbik <[email protected]> Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
show more ...
|
| #
3f5eede6 |
| 07-Feb-2025 |
Heiko Carstens <[email protected]> |
s390/cpufeature: Convert MACHINE_HAS_EDAT2 to cpu_has_edat2()
Convert MACHINE_HAS_... to cpu_has_...() which uses test_facility() instead of testing the machine_flags lowcore member if the feature i
s390/cpufeature: Convert MACHINE_HAS_EDAT2 to cpu_has_edat2()
Convert MACHINE_HAS_... to cpu_has_...() which uses test_facility() instead of testing the machine_flags lowcore member if the feature is present.
test_facility() generates better code since it results in a static branch without accessing memory. The branch is patched via alternatives by the decompressor depending on the availability of the required facility.
Reviewed-by: Vasily Gorbik <[email protected]> Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
show more ...
|
|
Revision tags: v6.14-rc1 |
|
| #
3bcc8a1a |
| 20-Jan-2025 |
Heiko Carstens <[email protected]> |
s390/sclp: Initialize sclp subsystem via arch_cpu_finalize_init()
With the switch to GENERIC_CPU_DEVICES an early call to the sclp subsystem was added to smp_prepare_cpus(). This will usually succee
s390/sclp: Initialize sclp subsystem via arch_cpu_finalize_init()
With the switch to GENERIC_CPU_DEVICES an early call to the sclp subsystem was added to smp_prepare_cpus(). This will usually succeed since the sclp subsystem is implicitly initialized early enough if an sclp based console is present.
If no such console is present the initialization happens with an arch_initcall(); in such cases calls to the sclp subsystem will fail. For CPU detection this means that the fallback sigp loop will be used permanently to detect CPUs instead of the preferred READ_CPU_INFO sclp request.
Fix this by adding an explicit early sclp_init() call via arch_cpu_finalize_init().
Reported-by: Sheshu Ramanandan <[email protected]> Fixes: 4a39f12e753d ("s390/smp: Switch to GENERIC_CPU_DEVICES") Reviewed-by: Peter Oberparleiter <[email protected]> Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Alexander Gordeev <[email protected]>
show more ...
|
|
Revision tags: v6.13, v6.13-rc7, v6.13-rc6, v6.13-rc5, v6.13-rc4, v6.13-rc3 |
|
| #
d7bebcb4 |
| 11-Dec-2024 |
Vasily Gorbik <[email protected]> |
s390: Optimize __pa/__va when RANDOMIZE_IDENTITY_BASE is off
Use a zero identity base when CONFIG_RANDOMIZE_IDENTITY_BASE is off, slightly optimizing __pa/__va calculations.
Signed-off-by: Vasily G
s390: Optimize __pa/__va when RANDOMIZE_IDENTITY_BASE is off
Use a zero identity base when CONFIG_RANDOMIZE_IDENTITY_BASE is off, slightly optimizing __pa/__va calculations.
Signed-off-by: Vasily Gorbik <[email protected]> Acked-by: Alexander Gordeev <[email protected]> Signed-off-by: Alexander Gordeev <[email protected]>
show more ...
|
| #
9688b17b |
| 11-Dec-2024 |
Vasily Gorbik <[email protected]> |
s390/boot: Add physmem tracking debug support
Introduce boot_debug() calls to track memory detection, online ranges, reserved areas, and allocations (except for VMEM allocations, which are too frequ
s390/boot: Add physmem tracking debug support
Introduce boot_debug() calls to track memory detection, online ranges, reserved areas, and allocations (except for VMEM allocations, which are too frequent). Instead introduce dump_physmem_reserved() function which prints out full memory tracking information. This helps in debugging early boot memory handling.
Signed-off-by: Vasily Gorbik <[email protected]> Acked-by: Heiko Carstens <[email protected]> Signed-off-by: Alexander Gordeev <[email protected]>
show more ...
|
|
Revision tags: v6.13-rc2, v6.13-rc1 |
|
| #
70309dc7 |
| 29-Nov-2024 |
Vasily Gorbik <[email protected]> |
s390/boot: Add timestamps to early boot messages
When CONFIG_PRINTK_TIME is enabled, add timestamps to boot messages in the same format as regular printk. Timestamps appear only with earlyprintk and
s390/boot: Add timestamps to early boot messages
When CONFIG_PRINTK_TIME is enabled, add timestamps to boot messages in the same format as regular printk. Timestamps appear only with earlyprintk and are stored in the boot messages ring buffer, but are not propagated to main kernel messages (if earlyprintk is not enabled). This prevents double timestamps in the output.
Signed-off-by: Vasily Gorbik <[email protected]> Acked-by: Heiko Carstens <[email protected]> Signed-off-by: Alexander Gordeev <[email protected]>
show more ...
|
| #
b79015ae |
| 22-Nov-2024 |
Vasily Gorbik <[email protected]> |
s390/boot: Add prefix filtering to bootdebug messages
Enhance boot debugging by allowing the "bootdebug" kernel parameter to accept an optional comma-separated list of prefixes. Only debug messages
s390/boot: Add prefix filtering to bootdebug messages
Enhance boot debugging by allowing the "bootdebug" kernel parameter to accept an optional comma-separated list of prefixes. Only debug messages starting with these prefixes will be printed during boot. For example:
bootdebug=startup,vmem
Not specifying a filter for the "bootdebug" parameter prints all debug messages. The `boot_fmt` macro can be defined to set a common prefix:
#define boot_fmt(fmt) "startup: " fmt
Signed-off-by: Vasily Gorbik <[email protected]> Acked-by: Heiko Carstens <[email protected]> Signed-off-by: Alexander Gordeev <[email protected]>
show more ...
|
| #
d20d8e51 |
| 20-Nov-2024 |
Vasily Gorbik <[email protected]> |
s390/boot: Add bootdebug option to control debug messages
Suppress decompressor debug messages by default, similar to regular kernel debug messages that require 'DEBUG' or 'dyndbg' to be enabled (de
s390/boot: Add bootdebug option to control debug messages
Suppress decompressor debug messages by default, similar to regular kernel debug messages that require 'DEBUG' or 'dyndbg' to be enabled (depending on CONFIG_DYNAMIC_DEBUG). Introduce a 'bootdebug' option to enable printing these messages when needed.
All messages are still stored in the boot ring buffer regardless.
To enable boot debug messages:
bootdebug debug
Or combine with 'earlyprintk' to print them without delay:
bootdebug debug earlyprintk
Signed-off-by: Vasily Gorbik <[email protected]> Acked-by: Heiko Carstens <[email protected]> Signed-off-by: Alexander Gordeev <[email protected]>
show more ...
|
| #
c09f8d0a |
| 20-Nov-2024 |
Vasily Gorbik <[email protected]> |
s390/boot: Defer boot messages when earlyprintk is not enabled
When earlyprintk is not specified, boot messages are only stored in a ring buffer to be printed later by printk when console driver is
s390/boot: Defer boot messages when earlyprintk is not enabled
When earlyprintk is not specified, boot messages are only stored in a ring buffer to be printed later by printk when console driver is registered.
Critical messages from boot_emerg() are always printed immediately, even without earlyprintk.
Signed-off-by: Vasily Gorbik <[email protected]> Acked-by: Heiko Carstens <[email protected]> Signed-off-by: Alexander Gordeev <[email protected]>
show more ...
|
| #
c6f23979 |
| 02-Jan-2025 |
Guo Weikang <[email protected]> |
mm/memblock: add memblock_alloc_or_panic interface
Before SLUB initialization, various subsystems used memblock_alloc to allocate memory. In most cases, when memory allocation fails, an immediate p
mm/memblock: add memblock_alloc_or_panic interface
Before SLUB initialization, various subsystems used memblock_alloc to allocate memory. In most cases, when memory allocation fails, an immediate panic is required. To simplify this behavior and reduce repetitive checks, introduce `memblock_alloc_or_panic`. This function ensures that memory allocation failures result in a panic automatically, improving code readability and consistency across subsystems that require this behavior.
[[email protected]: arch/s390: save_area_alloc default failure behavior changed to panic] Link: https://lkml.kernel.org/r/[email protected] Link: https://lore.kernel.org/lkml/[email protected]/ Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Guo Weikang <[email protected]> Acked-by: Geert Uytterhoeven <[email protected]> [m68k] Reviewed-by: Alexander Gordeev <[email protected]> [s390] Acked-by: Mike Rapoport (Microsoft) <[email protected]> Cc: Alexander Gordeev <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
show more ...
|
| #
f8107a8b |
| 09-Dec-2024 |
Heiko Carstens <[email protected]> |
s390/mm: Simplify noexec page protection handling
By default page protection definitions like PAGE_RX have the _PAGE_NOEXEC bit set. For older machines without the instruction execution protection f
s390/mm: Simplify noexec page protection handling
By default page protection definitions like PAGE_RX have the _PAGE_NOEXEC bit set. For older machines without the instruction execution protection facility this bit is not allowed to be used in page table entries, and therefore must be removed.
This is done at a couple of page table walkers, but also at some but not all page table modification functions like ptep_modify_prot_commit(). Avoid all of this and change the page, segment and region3 protection definitions so that the noexec bit is masked out automatically if the instruction execution-protection facility is not available. This is similar to what also various other architectures do which had to solve the same problem.
Reviewed-by: Gerald Schaefer <[email protected]> Acked-by: Alexander Gordeev <[email protected]> Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Alexander Gordeev <[email protected]>
show more ...
|
| #
912a0d35 |
| 10-Dec-2024 |
Vasily Gorbik <[email protected]> |
s390: Remove __bootdata annotations from declarations
For consistency, remove the `__bootdata` and `__bootdata_preserved` section annotations from variable declarations in header files. Section anno
s390: Remove __bootdata annotations from declarations
For consistency, remove the `__bootdata` and `__bootdata_preserved` section annotations from variable declarations in header files. Section annotations should be applied to definitions, not declarations. This change moves the annotations to the variable definitions in the corresponding source files.
Acked-by: Heiko Carstens <[email protected]> Acked-by: Alexander Gordeev <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]> Signed-off-by: Alexander Gordeev <[email protected]>
show more ...
|
| #
7ad00750 |
| 02-Dec-2024 |
Heiko Carstens <[email protected]> |
s390/setup: Cleanup stack_alloc() and stack_free()
Some small cleanups to stack_alloc() and stack_free():
- Rename ret to stack to reflect what the variable is used for - Whitespace removal
Review
s390/setup: Cleanup stack_alloc() and stack_free()
Some small cleanups to stack_alloc() and stack_free():
- Rename ret to stack to reflect what the variable is used for - Whitespace removal
Reviewed-by: Vasily Gorbik <[email protected]> Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Alexander Gordeev <[email protected]>
show more ...
|
| #
27939d6c |
| 02-Dec-2024 |
Heiko Carstens <[email protected]> |
s390/Kconfig: Select VMAP_STACK unconditionally
There is no point in supporting !VMAP_STACK kernel builds. VMAP_STACK has proven to work since many years. Also, since KASAN_VMALLOC is supported, ker
s390/Kconfig: Select VMAP_STACK unconditionally
There is no point in supporting !VMAP_STACK kernel builds. VMAP_STACK has proven to work since many years. Also, since KASAN_VMALLOC is supported, kernels built with !VMAP_STACK are completely untested.
Therefore select VMAP_STACK unconditionally and remove all config options and code required for !VMAP_STACK builds.
Acked-by: Christian Borntraeger <[email protected]> Reviewed-by: Vasily Gorbik <[email protected]> Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Alexander Gordeev <[email protected]>
show more ...
|
|
Revision tags: v6.12, v6.12-rc7, v6.12-rc6, v6.12-rc5, v6.12-rc4, v6.12-rc3, v6.12-rc2, v6.12-rc1, v6.11, v6.11-rc7, v6.11-rc6, v6.11-rc5, v6.11-rc4, v6.11-rc3 |
|
| #
a3ca27c4 |
| 09-Aug-2024 |
Alexander Gordeev <[email protected]> |
s390/mm: Prevent lowcore vs identity mapping overlap
The identity mapping position in virtual memory is randomized together with the kernel mapping. That position can never overlap with the lowcore
s390/mm: Prevent lowcore vs identity mapping overlap
The identity mapping position in virtual memory is randomized together with the kernel mapping. That position can never overlap with the lowcore even when the lowcore is relocated.
Prevent overlapping with the lowcore to allow independent positioning of the identity mapping. With the current value of the alternative lowcore address of 0x70000 the overlap could happen in case the identity mapping is placed at zero.
This is a prerequisite for uncoupling of randomization base of kernel image and identity mapping in virtual memory.
Acked-by: Vasily Gorbik <[email protected]> Signed-off-by: Alexander Gordeev <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
show more ...
|
|
Revision tags: v6.11-rc2, v6.11-rc1 |
|
| #
5ade5be4 |
| 22-Jul-2024 |
Sven Schnelle <[email protected]> |
s390: Add infrastructure to patch lowcore accesses
The s390 architecture defines two special per-CPU data pages called the "prefix area". In s390-linux terminology this is usually called "lowcore".
s390: Add infrastructure to patch lowcore accesses
The s390 architecture defines two special per-CPU data pages called the "prefix area". In s390-linux terminology this is usually called "lowcore". This memory area contains system configuration data like old/new PSW's for system call/interrupt/machine check handlers and lots of other data. It is normally mapped to logical address 0. This area can only be accessed when in supervisor mode.
This means that kernel code can dereference NULL pointers, because accesses to address 0 are allowed. Parts of lowcore can be write protected, but read accesses and write accesses outside of the write protected areas are not caught.
To remove this limitation for debugging and testing, remap lowcore to another address and define a function get_lowcore() which simply returns the address where lowcore is mapped at. This would normally introduce a pointer dereference (=memory read). As lowcore is used for several very often used variables, add code to patch this function during runtime, so we avoid the memory reads.
For C code get_lowcore() has to be used, for assembly code it is the GET_LC macro. When using this macro/function a reference is added to alternative patching. All these locations will be patched to the actual lowcore location when the kernel is booted or a module is loaded.
To make debugging/bisecting problems easier, this patch adds all the infrastructure but the lowcore address is still hardwired to 0. This way the code can be converted on a per function basis, and the functionality is enabled in a patch after all the functions have been converted.
Note that this requires at least z16 because the old lpsw instruction only allowed a 12 bit displacement. z16 introduced lpswey which allows 20 bits (signed), so the lowcore can effectively be mapped from address 0 - 0x7e000. To use 0x7e000 as address, a 6 byte lgfi instruction would have to be used in the alternative. To save two bytes, llilh can be used, but this only allows to set bits 16-31 of the address. In order to use the llilh instruction, use 0x70000 as alternative lowcore address. This is still large enough to catch NULL pointer dereferences into large arrays.
Reviewed-by: Heiko Carstens <[email protected]> Signed-off-by: Sven Schnelle <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
show more ...
|
| #
beb8cee0 |
| 16-Jul-2024 |
Heiko Carstens <[email protected]> |
s390/alternatives: Remove alternative facility list
The alternative and the normal facility list are always identical. Remove the alternative facility list, which allows to simplify the alternatives
s390/alternatives: Remove alternative facility list
The alternative and the normal facility list are always identical. Remove the alternative facility list, which allows to simplify the alternatives code.
Acked-by: Alexander Gordeev <[email protected]> Tested-by: Sven Schnelle <[email protected]> Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
show more ...
|
| #
d3604ffb |
| 16-Jul-2024 |
Sven Schnelle <[email protected]> |
s390: Move CIF flags to struct pcpu
To allow testing flags for offline CPUs, move the CIF flags to struct pcpu. To avoid having to calculate the array index for each access, add a pointer to the pcp
s390: Move CIF flags to struct pcpu
To allow testing flags for offline CPUs, move the CIF flags to struct pcpu. To avoid having to calculate the array index for each access, add a pointer to the pcpu member for the current cpu to lowcore.
Reviewed-by: Heiko Carstens <[email protected]> Signed-off-by: Sven Schnelle <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
show more ...
|
|
Revision tags: v6.10 |
|
| #
e188e5d5 |
| 11-Jul-2024 |
Vasily Gorbik <[email protected]> |
s390/setup: Fix __pa/__va for modules under non-GPL licenses
The struct vm_layout contains fields used in __pa/__va calculations. Such fundamental things have to be exported with EXPORT_SYMBOL to av
s390/setup: Fix __pa/__va for modules under non-GPL licenses
The struct vm_layout contains fields used in __pa/__va calculations. Such fundamental things have to be exported with EXPORT_SYMBOL to avoid breakages of out-of-tree modules under non-GPL licenses.
Fixes: 7de0446f0b26 ("s390/boot: Make identity mapping base address explicit") Acked-by: Heiko Carstens <[email protected]> Acked-by: Alexander Gordeev <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
show more ...
|
|
Revision tags: v6.10-rc7, v6.10-rc6, v6.10-rc5, v6.10-rc4 |
|
| #
208da1d5 |
| 10-Jun-2024 |
Sven Schnelle <[email protected]> |
s390: Replace S390_lowcore by get_lowcore()
Replace all S390_lowcore usages in arch/s390/ by get_lowcore().
Acked-by: Heiko Carstens <[email protected]> Signed-off-by: Sven Schnelle <[email protected]
s390: Replace S390_lowcore by get_lowcore()
Replace all S390_lowcore usages in arch/s390/ by get_lowcore().
Acked-by: Heiko Carstens <[email protected]> Signed-off-by: Sven Schnelle <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
show more ...
|
|
Revision tags: v6.10-rc3, v6.10-rc2, v6.10-rc1 |
|
| #
e7dec0b7 |
| 15-May-2024 |
Sven Schnelle <[email protected]> |
s390/boot: Remove alt_stfle_fac_list from decompressor
It is nowhere used in the decompressor, therefore remove it.
Fixes: 17e89e1340a3 ("s390/facilities: move stfl information from lowcore to glob
s390/boot: Remove alt_stfle_fac_list from decompressor
It is nowhere used in the decompressor, therefore remove it.
Fixes: 17e89e1340a3 ("s390/facilities: move stfl information from lowcore to global data") Reviewed-by: Heiko Carstens <[email protected]> Signed-off-by: Sven Schnelle <[email protected]> Signed-off-by: Heiko Carstens <[email protected]>
show more ...
|
|
Revision tags: v6.9, v6.9-rc7, v6.9-rc6, v6.9-rc5, v6.9-rc4, v6.9-rc3, v6.9-rc2, v6.9-rc1, v6.8, v6.8-rc7, v6.8-rc6, v6.8-rc5, v6.8-rc4, v6.8-rc3, v6.8-rc2, v6.8-rc1, v6.7, v6.7-rc8, v6.7-rc7, v6.7-rc6, v6.7-rc5, v6.7-rc4, v6.7-rc3, v6.7-rc2, v6.7-rc1, v6.6, v6.6-rc7, v6.6-rc6, v6.6-rc5, v6.6-rc4, v6.6-rc3, v6.6-rc2, v6.6-rc1, v6.5, v6.5-rc7, v6.5-rc6 |
|
| #
5fb50fa6 |
| 11-Aug-2023 |
Alexander Gordeev <[email protected]> |
s390/boot: Make .amode31 section address range explicit
This is a preparatory rework to allow uncoupling virtual and physical addresses spaces.
Introduce .amode31 section address range AMODE31_STAR
s390/boot: Make .amode31 section address range explicit
This is a preparatory rework to allow uncoupling virtual and physical addresses spaces.
Introduce .amode31 section address range AMODE31_START and AMODE31_END macros for later use.
Acked-by: Heiko Carstens <[email protected]> Signed-off-by: Alexander Gordeev <[email protected]>
show more ...
|