Skip to content

Commit 1c7d0c3

Browse files
committed
Merge tag 's390-6.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull s390 updates from Vasily Gorbik: - Remove restrictions on PAI NNPA and crypto counters, enabling concurrent per-task and system-wide sampling and counting events - Switch to GENERIC_CPU_DEVICES by setting up the CPU present mask in the architecture code and letting the generic code handle CPU bring-up - Add support for the diag204 busy indication facility to prevent undesirable blocking during hypervisor logical CPU utilization queries. Implement results caching - Improve the handling of Store Data SCLP events by suppressing unnecessary warning, preventing buffer release in I/O during failures, and adding timeout handling for Store Data requests to address potential firmware issues - Provide optimized __arch_hweight*() implementations - Remove the unnecessary CPU KOBJ_CHANGE uevents generated during topology updates, as they are unused and also not present on other architectures - Cleanup atomic_ops, optimize __atomic_set() for small values and __atomic_cmpxchg_bool() for compilers supporting flag output constraint - Couple of cleanups for KVM: - Move and improve KVM struct definitions for DAT tables from gaccess.c to a new header - Pass the asce as parameter to sie64a() - Make the crdte() and cspg() page table handling wrappers return a boolean to indicate success, like the other existing "compare and swap" wrappers - Add documentation for HWCAP flags - Switch to obtaining total RAM pages from memblock instead of totalram_pages() during mm init, to ensure correct calculation of zero page size, when defer_init is enabled - Refactor lowcore access and switch to using the get_lowcore() function instead of the S390_lowcore macro - Cleanups for PG_arch_1 and folio handling in UV and hugetlb code - Add missing MODULE_DESCRIPTION() macros - Fix VM_FAULT_HWPOISON handling in do_exception() * tag 's390-6.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (54 commits) s390/mm: Fix VM_FAULT_HWPOISON handling in do_exception() s390/kvm: Move bitfields for dat tables s390/entry: Pass the asce as parameter to sie64a() s390/sthyi: Use cached data when diag is busy s390/sthyi: Move diag operations s390/hypfs_diag: Diag204 busy loop s390/diag: Add busy-indication-facility requirements s390/diag: Diag204 add busy return errno s390/diag: Return errno's from diag204 s390/sclp: Diag204 busy indication facility detection s390/atomic_ops: Make use of flag output constraint s390/atomic_ops: Improve __atomic_set() for small values s390/atomic_ops: Use symbolic names s390/smp: Switch to GENERIC_CPU_DEVICES s390/hwcaps: Add documentation for HWCAP flags s390/pgtable: Make crdte() and cspg() return a value s390/topology: Remove CPU KOBJ_CHANGE uevents s390/sclp: Add timeout to Store Data requests s390/sclp: Prevent release of buffer in I/O s390/sclp: Suppress unnecessary Store Data warning ...
2 parents dde1a0e + df39038 commit 1c7d0c3

Some content is hidden

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

88 files changed

+1202
-773
lines changed

arch/s390/Kconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ config ARCH_PROC_KCORE_TEXT
2121
def_bool y
2222

2323
config GENERIC_HWEIGHT
24-
def_bool y
24+
def_bool !HAVE_MARCH_Z196_FEATURES
2525

2626
config GENERIC_BUG
2727
def_bool y if BUG
@@ -142,6 +142,7 @@ config S390
142142
select FUNCTION_ALIGNMENT_8B if CC_IS_GCC
143143
select FUNCTION_ALIGNMENT_16B if !CC_IS_GCC
144144
select GENERIC_ALLOCATOR
145+
select GENERIC_CPU_DEVICES
145146
select GENERIC_CPU_AUTOPROBE
146147
select GENERIC_CPU_VULNERABILITIES
147148
select GENERIC_ENTRY

arch/s390/boot/ipl_parm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ static inline int __diag308(unsigned long subcode, void *addr)
5151
: [r1] "+&d" (r1.pair),
5252
[reg1] "=&d" (reg1),
5353
[reg2] "=&a" (reg2),
54-
"+Q" (S390_lowcore.program_new_psw),
54+
"+Q" (get_lowcore()->program_new_psw),
5555
"=Q" (old)
5656
: [subcode] "d" (subcode),
5757
[psw_old] "a" (&old),
58-
[psw_pgm] "a" (&S390_lowcore.program_new_psw)
58+
[psw_pgm] "a" (&get_lowcore()->program_new_psw)
5959
: "cc", "memory");
6060
return r1.odd;
6161
}

arch/s390/boot/ipl_report.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ int read_ipl_report(void)
106106
* the IPL parameter list, then align the address to a double
107107
* word boundary.
108108
*/
109-
tmp = (unsigned long) S390_lowcore.ipl_parmblock_ptr;
109+
tmp = (unsigned long)get_lowcore()->ipl_parmblock_ptr;
110110
pl_hdr = (struct ipl_pl_hdr *) tmp;
111111
tmp = (tmp + pl_hdr->len + 7) & -8UL;
112112
rl_hdr = (struct ipl_rl_hdr *) tmp;

arch/s390/boot/pgm_check_info.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -145,22 +145,22 @@ void print_stacktrace(unsigned long sp)
145145

146146
void print_pgm_check_info(void)
147147
{
148-
unsigned long *gpregs = (unsigned long *)S390_lowcore.gpregs_save_area;
149-
struct psw_bits *psw = &psw_bits(S390_lowcore.psw_save_area);
148+
unsigned long *gpregs = (unsigned long *)get_lowcore()->gpregs_save_area;
149+
struct psw_bits *psw = &psw_bits(get_lowcore()->psw_save_area);
150150

151151
decompressor_printk("Linux version %s\n", kernel_version);
152152
if (!is_prot_virt_guest() && early_command_line[0])
153153
decompressor_printk("Kernel command line: %s\n", early_command_line);
154154
decompressor_printk("Kernel fault: interruption code %04x ilc:%x\n",
155-
S390_lowcore.pgm_code, S390_lowcore.pgm_ilc >> 1);
155+
get_lowcore()->pgm_code, get_lowcore()->pgm_ilc >> 1);
156156
if (kaslr_enabled()) {
157157
decompressor_printk("Kernel random base: %lx\n", __kaslr_offset);
158158
decompressor_printk("Kernel random base phys: %lx\n", __kaslr_offset_phys);
159159
}
160160
decompressor_printk("PSW : %016lx %016lx (%pS)\n",
161-
S390_lowcore.psw_save_area.mask,
162-
S390_lowcore.psw_save_area.addr,
163-
(void *)S390_lowcore.psw_save_area.addr);
161+
get_lowcore()->psw_save_area.mask,
162+
get_lowcore()->psw_save_area.addr,
163+
(void *)get_lowcore()->psw_save_area.addr);
164164
decompressor_printk(
165165
" R:%x T:%x IO:%x EX:%x Key:%x M:%x W:%x P:%x AS:%x CC:%x PM:%x RI:%x EA:%x\n",
166166
psw->per, psw->dat, psw->io, psw->ext, psw->key, psw->mcheck,
@@ -174,8 +174,8 @@ void print_pgm_check_info(void)
174174
gpregs[8], gpregs[9], gpregs[10], gpregs[11]);
175175
decompressor_printk(" %016lx %016lx %016lx %016lx\n",
176176
gpregs[12], gpregs[13], gpregs[14], gpregs[15]);
177-
print_stacktrace(S390_lowcore.gpregs_save_area[15]);
177+
print_stacktrace(get_lowcore()->gpregs_save_area[15]);
178178
decompressor_printk("Last Breaking-Event-Address:\n");
179-
decompressor_printk(" [<%016lx>] %pS\n", (unsigned long)S390_lowcore.pgm_last_break,
180-
(void *)S390_lowcore.pgm_last_break);
179+
decompressor_printk(" [<%016lx>] %pS\n", (unsigned long)get_lowcore()->pgm_last_break,
180+
(void *)get_lowcore()->pgm_last_break);
181181
}

arch/s390/boot/physmem_info.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,11 @@ static int __diag260(unsigned long rx1, unsigned long rx2)
8181
[reg2] "=&a" (reg2),
8282
[rc] "+&d" (rc),
8383
[ry] "+&d" (ry),
84-
"+Q" (S390_lowcore.program_new_psw),
84+
"+Q" (get_lowcore()->program_new_psw),
8585
"=Q" (old)
8686
: [rx] "d" (rx.pair),
8787
[psw_old] "a" (&old),
88-
[psw_pgm] "a" (&S390_lowcore.program_new_psw)
88+
[psw_pgm] "a" (&get_lowcore()->program_new_psw)
8989
: "cc", "memory");
9090
return rc == 0 ? ry : -1;
9191
}
@@ -129,10 +129,10 @@ static int tprot(unsigned long addr)
129129
: [reg1] "=&d" (reg1),
130130
[reg2] "=&a" (reg2),
131131
[rc] "+&d" (rc),
132-
"=Q" (S390_lowcore.program_new_psw.addr),
132+
"=Q" (get_lowcore()->program_new_psw.addr),
133133
"=Q" (old)
134134
: [psw_old] "a" (&old),
135-
[psw_pgm] "a" (&S390_lowcore.program_new_psw),
135+
[psw_pgm] "a" (&get_lowcore()->program_new_psw),
136136
[addr] "a" (addr)
137137
: "cc", "memory");
138138
return rc;

arch/s390/boot/startup.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ static int cmma_test_essa(void)
7878
[reg2] "=&a" (reg2),
7979
[rc] "+&d" (rc),
8080
[tmp] "=&d" (tmp),
81-
"+Q" (S390_lowcore.program_new_psw),
81+
"+Q" (get_lowcore()->program_new_psw),
8282
"=Q" (old)
8383
: [psw_old] "a" (&old),
84-
[psw_pgm] "a" (&S390_lowcore.program_new_psw),
84+
[psw_pgm] "a" (&get_lowcore()->program_new_psw),
8585
[cmd] "i" (ESSA_GET_STATE)
8686
: "cc", "memory");
8787
return rc;
@@ -101,10 +101,10 @@ static void cmma_init(void)
101101

102102
static void setup_lpp(void)
103103
{
104-
S390_lowcore.current_pid = 0;
105-
S390_lowcore.lpp = LPP_MAGIC;
104+
get_lowcore()->current_pid = 0;
105+
get_lowcore()->lpp = LPP_MAGIC;
106106
if (test_facility(40))
107-
lpp(&S390_lowcore.lpp);
107+
lpp(&get_lowcore()->lpp);
108108
}
109109

110110
#ifdef CONFIG_KERNEL_UNCOMPRESSED
@@ -501,7 +501,7 @@ void startup_kernel(void)
501501
* Save KASLR offset for early dumps, before vmcore_info is set.
502502
* Mark as uneven to distinguish from real vmcore_info pointer.
503503
*/
504-
S390_lowcore.vmcore_info = __kaslr_offset_phys ? __kaslr_offset_phys | 0x1UL : 0;
504+
get_lowcore()->vmcore_info = __kaslr_offset_phys ? __kaslr_offset_phys | 0x1UL : 0;
505505

506506
/*
507507
* Jump to the decompressed kernel entry point and switch DAT mode on.

arch/s390/boot/vmem.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -476,13 +476,13 @@ void setup_vmem(unsigned long kernel_start, unsigned long kernel_end, unsigned l
476476

477477
kasan_populate_shadow(kernel_start, kernel_end);
478478

479-
S390_lowcore.kernel_asce.val = swapper_pg_dir | asce_bits;
480-
S390_lowcore.user_asce = s390_invalid_asce;
479+
get_lowcore()->kernel_asce.val = swapper_pg_dir | asce_bits;
480+
get_lowcore()->user_asce = s390_invalid_asce;
481481

482-
local_ctl_load(1, &S390_lowcore.kernel_asce);
483-
local_ctl_load(7, &S390_lowcore.user_asce);
484-
local_ctl_load(13, &S390_lowcore.kernel_asce);
482+
local_ctl_load(1, &get_lowcore()->kernel_asce);
483+
local_ctl_load(7, &get_lowcore()->user_asce);
484+
local_ctl_load(13, &get_lowcore()->kernel_asce);
485485

486-
init_mm.context.asce = S390_lowcore.kernel_asce.val;
486+
init_mm.context.asce = get_lowcore()->kernel_asce.val;
487487
init_mm.pgd = init_mm_pgd;
488488
}

arch/s390/crypto/crc32-vx.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,7 @@ module_cpu_feature_match(S390_CPU_FEATURE_VXRS, crc_vx_mod_init);
297297
module_exit(crc_vx_mod_exit);
298298

299299
MODULE_AUTHOR("Hendrik Brueckner <[email protected]>");
300+
MODULE_DESCRIPTION("CRC-32 algorithms using z/Architecture Vector Extension Facility");
300301
MODULE_LICENSE("GPL");
301302

302303
MODULE_ALIAS_CRYPTO("crc32");

arch/s390/hypfs/hypfs_dbfs.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ static ssize_t dbfs_read(struct file *file, char __user *buf,
3939
return 0;
4040

4141
df = file_inode(file)->i_private;
42-
mutex_lock(&df->lock);
42+
if (mutex_lock_interruptible(&df->lock))
43+
return -ERESTARTSYS;
44+
4345
data = hypfs_dbfs_data_alloc(df);
4446
if (!data) {
4547
mutex_unlock(&df->lock);

arch/s390/hypfs/hypfs_diag.c

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,22 @@ static int diag204_probe(void)
140140

141141
int diag204_store(void *buf, int pages)
142142
{
143+
unsigned long subcode;
143144
int rc;
144145

145-
rc = diag204((unsigned long)diag204_store_sc |
146-
(unsigned long)diag204_get_info_type(), pages, buf);
147-
return rc < 0 ? -EOPNOTSUPP : 0;
146+
subcode = diag204_get_info_type();
147+
subcode |= diag204_store_sc;
148+
if (diag204_has_bif())
149+
subcode |= DIAG204_BIF_BIT;
150+
while (1) {
151+
rc = diag204(subcode, pages, buf);
152+
if (rc != -EBUSY)
153+
break;
154+
if (signal_pending(current))
155+
return -ERESTARTSYS;
156+
schedule_timeout_interruptible(DIAG204_BUSY_WAIT);
157+
}
158+
return rc < 0 ? rc : 0;
148159
}
149160

150161
struct dbfs_d204_hdr {

0 commit comments

Comments
 (0)