Skip to content

Commit bc46b7c

Browse files
committed
Merge tag 's390-6.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull s390 updates from Alexander Gordeev: - Standardize on the __ASSEMBLER__ macro that is provided by GCC and Clang compilers and replace __ASSEMBLY__ with __ASSEMBLER__ in both uapi and non-uapi headers - Explicitly include <linux/export.h> in architecture and driver files which contain an EXPORT_SYMBOL() and remove the include from the files which do not contain the EXPORT_SYMBOL() - Use the full title of "z/Architecture Principles of Operation" manual and the name of a section where facility bits are listed - Use -D__DISABLE_EXPORTS for files in arch/s390/boot to avoid unnecessary slowing down of the build and confusing external kABI tools that process symtypes data - Print additional unrecoverable machine check information to make the root cause analysis easier - Move cmpxchg_user_key() handling to uaccess library code, since the generated code is large anyway and there is no benefit if it is inlined - Fix a problem when cmpxchg_user_key() is executing a code with a non-default key: if a system is IPL-ed with "LOAD NORMAL", and the previous system used storage keys where the fetch-protection bit was set for some pages, and the cmpxchg_user_key() is located within such page, a protection exception happens - Either the external call or emergency signal order is used to send an IPI to a remote CPU. Use the external order only, since it is at least as good and sometimes even better, than the emergency signal - In case of an early crash the early program check handler prints more or less random value of the last breaking event address, since it is not initialized properly. Copy the last breaking event address from the lowcore to pt_regs to address this - During STP synchronization check udelay() can not be used, since the first CPU modifies tod_clock_base and get_tod_clock_monotonic() might return a non-monotonic time. Instead, busy-loop on other CPUs, while the the first CPU actually handles the synchronization operation - When debugging the early kernel boot using QEMU with the -S flag and GDB attached, skip the decompressor and start directly in kernel - Rename PAI Crypto event 4210 according to z16 and z17 "z/Architecture Principles of Operation" manual - Remove the in-kernel time steering support in favour of the new s390 PTP driver, which allows the kernel clock steered more precisely - Remove a possible false-positive warning in pte_free_defer(), which could be triggered in a valid case KVM guest process is initializing * tag 's390-6.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (29 commits) s390/mm: Remove possible false-positive warning in pte_free_defer() s390/stp: Default to enabled s390/stp: Remove leap second support s390/time: Remove in-kernel time steering s390/sclp: Use monotonic clock in sclp_sync_wait() s390/smp: Use monotonic clock in smp_emergency_stop() s390/time: Use monotonic clock in get_cycles() s390/pai_crypto: Rename PAI Crypto event 4210 scripts/gdb/symbols: make lx-symbols skip the s390 decompressor s390/boot: Introduce jump_to_kernel() function s390/stp: Remove udelay from stp_sync_clock() s390/early: Copy last breaking event address to pt_regs s390/smp: Remove conditional emergency signal order code usage s390/uaccess: Merge cmpxchg_user_key() inline assemblies s390/uaccess: Prevent kprobes on cmpxchg_user_key() functions s390/uaccess: Initialize code pages executed with non-default access key s390/skey: Provide infrastructure for executing with non-default access key s390/uaccess: Make cmpxchg_user_key() library code s390/page: Add memory clobber to page_set_storage_key() s390/page: Cleanup page_set_storage_key() inline assemblies ...
2 parents 98e8f2c + 5647f61 commit bc46b7c

File tree

133 files changed

+602
-430
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+602
-430
lines changed

arch/s390/appldata/appldata_base.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#define KMSG_COMPONENT "appldata"
1313
#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
1414

15+
#include <linux/export.h>
1516
#include <linux/module.h>
1617
#include <linux/sched/stat.h>
1718
#include <linux/init.h>

arch/s390/boot/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ CC_FLAGS_MARCH_MINIMUM := -march=z10
1919

2020
KBUILD_AFLAGS := $(filter-out $(CC_FLAGS_MARCH),$(KBUILD_AFLAGS_DECOMPRESSOR))
2121
KBUILD_CFLAGS := $(filter-out $(CC_FLAGS_MARCH),$(KBUILD_CFLAGS_DECOMPRESSOR))
22-
KBUILD_AFLAGS += $(CC_FLAGS_MARCH_MINIMUM)
23-
KBUILD_CFLAGS += $(CC_FLAGS_MARCH_MINIMUM)
22+
KBUILD_AFLAGS += $(CC_FLAGS_MARCH_MINIMUM) -D__DISABLE_EXPORTS
23+
KBUILD_CFLAGS += $(CC_FLAGS_MARCH_MINIMUM) -D__DISABLE_EXPORTS
2424

2525
CFLAGS_sclp_early_core.o += -I$(srctree)/drivers/s390/char
2626

2727
obj-y := head.o als.o startup.o physmem_info.o ipl_parm.o ipl_report.o vmem.o
2828
obj-y += string.o ebcdic.o sclp_early_core.o mem.o ipl_vmparm.o cmdline.o
2929
obj-y += version.o pgm_check.o ctype.o ipl_data.o relocs.o alternative.o
30-
obj-y += uv.o printk.o
30+
obj-y += uv.o printk.o trampoline.o
3131
obj-$(CONFIG_RANDOMIZE_BASE) += kaslr.o
3232
obj-y += $(if $(CONFIG_KERNEL_UNCOMPRESSED),,decompressor.o) info.o
3333
obj-$(CONFIG_KERNEL_ZSTD) += clz_ctz.o

arch/s390/boot/als.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ static void facility_mismatch(void)
6565
boot_emerg("The Linux kernel requires more recent processor hardware\n");
6666
boot_emerg("Detected machine-type number: %4x\n", id.machine);
6767
print_missing_facilities();
68-
boot_emerg("See Principles of Operations for facility bits\n");
68+
boot_emerg("See z/Architecture Principles of Operation - Facility Indications\n");
6969
disabled_wait();
7070
}
7171

arch/s390/boot/boot.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
#define IPL_START 0x200
88

9-
#ifndef __ASSEMBLY__
9+
#ifndef __ASSEMBLER__
1010

1111
#include <linux/printk.h>
1212
#include <asm/physmem_info.h>
@@ -74,6 +74,7 @@ void print_stacktrace(unsigned long sp);
7474
void error(char *m);
7575
int get_random(unsigned long limit, unsigned long *value);
7676
void boot_rb_dump(void);
77+
void __noreturn jump_to_kernel(psw_t *psw);
7778

7879
#ifndef boot_fmt
7980
#define boot_fmt(fmt) fmt
@@ -121,5 +122,5 @@ static inline bool intersects(unsigned long addr0, unsigned long size0,
121122
{
122123
return addr0 + size0 > addr1 && addr1 + size1 > addr0;
123124
}
124-
#endif /* __ASSEMBLY__ */
125+
#endif /* __ASSEMBLER__ */
125126
#endif /* BOOT_BOOT_H */

arch/s390/boot/ipl_data.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ struct ipl_lowcore {
1616
struct ccw0 ccwpgm[2]; /* 0x0008 */
1717
u8 fill[56]; /* 0x0018 */
1818
struct ccw0 ccwpgmcc[20]; /* 0x0050 */
19-
u8 pad_0xf0[0x01a0-0x00f0]; /* 0x00f0 */
19+
u8 pad_0xf0[0x0140-0x00f0]; /* 0x00f0 */
20+
psw_t svc_old_psw; /* 0x0140 */
21+
u8 pad_0x150[0x01a0-0x0150]; /* 0x0150 */
2022
psw_t restart_psw; /* 0x01a0 */
2123
psw_t external_new_psw; /* 0x01b0 */
2224
psw_t svc_new_psw; /* 0x01c0 */
@@ -75,6 +77,11 @@ static struct ipl_lowcore ipl_lowcore __used __section(".ipldata") = {
7577
[18] = CCW0(CCW_CMD_READ_IPL, 0x690, 0x50, CCW_FLAG_SLI | CCW_FLAG_CC),
7678
[19] = CCW0(CCW_CMD_READ_IPL, 0x6e0, 0x50, CCW_FLAG_SLI),
7779
},
80+
/*
81+
* Let the GDB's lx-symbols command find the jump_to_kernel symbol
82+
* without having to load decompressor symbols.
83+
*/
84+
.svc_old_psw = { .mask = 0, .addr = (unsigned long)jump_to_kernel },
7885
.restart_psw = { .mask = 0, .addr = IPL_START, },
7986
.external_new_psw = { .mask = PSW_MASK_DISABLED, .addr = __LC_EXT_NEW_PSW, },
8087
.svc_new_psw = { .mask = PSW_MASK_DISABLED, .addr = __LC_SVC_NEW_PSW, },

arch/s390/boot/startup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,5 +642,5 @@ void startup_kernel(void)
642642
psw.addr = __kaslr_offset + vmlinux.entry;
643643
psw.mask = PSW_KERNEL_BITS;
644644
boot_debug("Starting kernel at: 0x%016lx\n", psw.addr);
645-
__load_psw(psw);
645+
jump_to_kernel(&psw);
646646
}

arch/s390/boot/trampoline.S

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
2+
3+
#include <linux/linkage.h>
4+
5+
# This function is identical to __load_psw(), but the lx-symbols GDB command
6+
# puts a breakpoint on it, so it needs to be kept separate.
7+
SYM_CODE_START(jump_to_kernel)
8+
lpswe 0(%r2)
9+
SYM_CODE_END(jump_to_kernel)

arch/s390/crypto/arch_random.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* Author(s): Harald Freudenberger
77
*/
88

9+
#include <linux/export.h>
910
#include <linux/kernel.h>
1011
#include <linux/atomic.h>
1112
#include <linux/random.h>

arch/s390/crypto/sha_common.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
*/
1010

1111
#include <crypto/internal/hash.h>
12+
#include <linux/export.h>
1213
#include <linux/module.h>
1314
#include <asm/cpacf.h>
1415
#include "sha.h"

arch/s390/include/asm/alternative.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
ALT_TYPE_SPEC << ALT_TYPE_SHIFT | \
5252
(facility) << ALT_DATA_SHIFT)
5353

54-
#ifndef __ASSEMBLY__
54+
#ifndef __ASSEMBLER__
5555

5656
#include <linux/types.h>
5757
#include <linux/stddef.h>
@@ -183,7 +183,7 @@ static inline void apply_alternatives(struct alt_instr *start, struct alt_instr
183183
/* Use this macro if clobbers are needed without inputs. */
184184
#define ASM_NO_INPUT_CLOBBER(clobber...) : clobber
185185

186-
#else /* __ASSEMBLY__ */
186+
#else /* __ASSEMBLER__ */
187187

188188
/*
189189
* Issue one struct alt_instr descriptor entry (need to put it into
@@ -233,6 +233,6 @@ static inline void apply_alternatives(struct alt_instr *start, struct alt_instr
233233
.popsection
234234
.endm
235235

236-
#endif /* __ASSEMBLY__ */
236+
#endif /* __ASSEMBLER__ */
237237

238238
#endif /* _ASM_S390_ALTERNATIVE_H */

0 commit comments

Comments
 (0)