Skip to content

Commit aabfea8

Browse files
committed
Merge tag 's390-5.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull more s390 updates from Vasily Gorbik: - Fix integer overflow during stack frame unwind with invalid backchain. - Cleanup unused symbol export in zcrypt code. - Fix MIO addressing control activation in PCI code and expose its usage via sysfs. - Fix kernel image signature verification report presence detection. - Fix irq registration in vfio-ap code. - Add CPU measurement counters for newer machines. - Add base DASD thin provisioning support and code cleanups. * tag 's390-5.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (21 commits) s390/unwind: avoid int overflow in outside_of_stack s390/zcrypt: remove the exporting of ap_query_configuration s390/pci: add mio_enabled attribute s390: fix setting of mio addressing control s390/ipl: Fix detection of has_secure attribute s390: vfio-ap: fix irq registration s390/cpumf: Add extended counter set definitions for model 8561 and 8562 s390/dasd: Handle out-of-space constraint s390/dasd: Add discard support for ESE volumes s390/dasd: Use ALIGN_DOWN macro s390/dasd: Make dasd_setup_queue() a discipline function s390/dasd: Add new ioctl to release space s390/dasd: Add dasd_sleep_on_queue_interruptible() s390/dasd: Add missing intensity definition s390/dasd: Fix whitespace s390/dasd: Add dynamic formatting support for ESE volumes s390/dasd: Recognise data for ESE volumes s390/dasd: Put sub-order definitions in a separate section s390/dasd: Make layout analysis ESE compatible s390/dasd: Remove old defines and function ...
2 parents 7181feb + 9a15919 commit aabfea8

22 files changed

Lines changed: 1547 additions & 256 deletions

‎arch/s390/include/asm/pci_insn.h‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -143,14 +143,4 @@ static inline int zpci_set_irq_ctrl(u16 ctl, u8 isc)
143143
return __zpci_set_irq_ctrl(ctl, isc, &iib);
144144
}
145145

146-
#ifdef CONFIG_PCI
147-
static inline void enable_mio_ctl(void)
148-
{
149-
if (static_branch_likely(&have_mio))
150-
__ctl_set_bit(2, 5);
151-
}
152-
#else /* CONFIG_PCI */
153-
static inline void enable_mio_ctl(void) {}
154-
#endif /* CONFIG_PCI */
155-
156146
#endif

‎arch/s390/include/asm/sclp.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ struct sclp_info {
8080
unsigned char has_gisaf : 1;
8181
unsigned char has_diag318 : 1;
8282
unsigned char has_sipl : 1;
83-
unsigned char has_sipl_g2 : 1;
8483
unsigned char has_dirq : 1;
8584
unsigned int ibc;
8685
unsigned int mtid;

‎arch/s390/include/uapi/asm/dasd.h‎

Lines changed: 79 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2-
/*
2+
/*
33
* Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com>
44
* Bugreports.to..: <Linux390@de.ibm.com>
55
* Copyright IBM Corp. 1999, 2000
@@ -21,40 +21,40 @@
2121

2222
#define DASD_API_VERSION 6
2323

24-
/*
24+
/*
2525
* struct dasd_information2_t
2626
* represents any data about the device, which is visible to userspace.
2727
* including foramt and featueres.
2828
*/
2929
typedef struct dasd_information2_t {
30-
unsigned int devno; /* S/390 devno */
31-
unsigned int real_devno; /* for aliases */
32-
unsigned int schid; /* S/390 subchannel identifier */
33-
unsigned int cu_type : 16; /* from SenseID */
34-
unsigned int cu_model : 8; /* from SenseID */
35-
unsigned int dev_type : 16; /* from SenseID */
36-
unsigned int dev_model : 8; /* from SenseID */
37-
unsigned int open_count;
38-
unsigned int req_queue_len;
39-
unsigned int chanq_len; /* length of chanq */
40-
char type[4]; /* from discipline.name, 'none' for unknown */
41-
unsigned int status; /* current device level */
42-
unsigned int label_block; /* where to find the VOLSER */
43-
unsigned int FBA_layout; /* fixed block size (like AIXVOL) */
44-
unsigned int characteristics_size;
45-
unsigned int confdata_size;
46-
char characteristics[64]; /* from read_device_characteristics */
47-
char configuration_data[256]; /* from read_configuration_data */
48-
unsigned int format; /* format info like formatted/cdl/ldl/... */
49-
unsigned int features; /* dasd features like 'ro',... */
50-
unsigned int reserved0; /* reserved for further use ,... */
51-
unsigned int reserved1; /* reserved for further use ,... */
52-
unsigned int reserved2; /* reserved for further use ,... */
53-
unsigned int reserved3; /* reserved for further use ,... */
54-
unsigned int reserved4; /* reserved for further use ,... */
55-
unsigned int reserved5; /* reserved for further use ,... */
56-
unsigned int reserved6; /* reserved for further use ,... */
57-
unsigned int reserved7; /* reserved for further use ,... */
30+
unsigned int devno; /* S/390 devno */
31+
unsigned int real_devno; /* for aliases */
32+
unsigned int schid; /* S/390 subchannel identifier */
33+
unsigned int cu_type : 16; /* from SenseID */
34+
unsigned int cu_model : 8; /* from SenseID */
35+
unsigned int dev_type : 16; /* from SenseID */
36+
unsigned int dev_model : 8; /* from SenseID */
37+
unsigned int open_count;
38+
unsigned int req_queue_len;
39+
unsigned int chanq_len; /* length of chanq */
40+
char type[4]; /* from discipline.name, 'none' for unknown */
41+
unsigned int status; /* current device level */
42+
unsigned int label_block; /* where to find the VOLSER */
43+
unsigned int FBA_layout; /* fixed block size (like AIXVOL) */
44+
unsigned int characteristics_size;
45+
unsigned int confdata_size;
46+
char characteristics[64]; /* from read_device_characteristics */
47+
char configuration_data[256]; /* from read_configuration_data */
48+
unsigned int format; /* format info like formatted/cdl/ldl/... */
49+
unsigned int features; /* dasd features like 'ro',... */
50+
unsigned int reserved0; /* reserved for further use ,... */
51+
unsigned int reserved1; /* reserved for further use ,... */
52+
unsigned int reserved2; /* reserved for further use ,... */
53+
unsigned int reserved3; /* reserved for further use ,... */
54+
unsigned int reserved4; /* reserved for further use ,... */
55+
unsigned int reserved5; /* reserved for further use ,... */
56+
unsigned int reserved6; /* reserved for further use ,... */
57+
unsigned int reserved7; /* reserved for further use ,... */
5858
} dasd_information2_t;
5959

6060
/*
@@ -92,34 +92,34 @@ typedef struct dasd_information2_t {
9292

9393
#define DASD_PARTN_BITS 2
9494

95-
/*
95+
/*
9696
* struct dasd_information_t
9797
* represents any data about the data, which is visible to userspace
9898
*/
9999
typedef struct dasd_information_t {
100-
unsigned int devno; /* S/390 devno */
101-
unsigned int real_devno; /* for aliases */
102-
unsigned int schid; /* S/390 subchannel identifier */
103-
unsigned int cu_type : 16; /* from SenseID */
104-
unsigned int cu_model : 8; /* from SenseID */
105-
unsigned int dev_type : 16; /* from SenseID */
106-
unsigned int dev_model : 8; /* from SenseID */
107-
unsigned int open_count;
108-
unsigned int req_queue_len;
109-
unsigned int chanq_len; /* length of chanq */
110-
char type[4]; /* from discipline.name, 'none' for unknown */
111-
unsigned int status; /* current device level */
112-
unsigned int label_block; /* where to find the VOLSER */
113-
unsigned int FBA_layout; /* fixed block size (like AIXVOL) */
114-
unsigned int characteristics_size;
115-
unsigned int confdata_size;
116-
char characteristics[64]; /* from read_device_characteristics */
117-
char configuration_data[256]; /* from read_configuration_data */
100+
unsigned int devno; /* S/390 devno */
101+
unsigned int real_devno; /* for aliases */
102+
unsigned int schid; /* S/390 subchannel identifier */
103+
unsigned int cu_type : 16; /* from SenseID */
104+
unsigned int cu_model : 8; /* from SenseID */
105+
unsigned int dev_type : 16; /* from SenseID */
106+
unsigned int dev_model : 8; /* from SenseID */
107+
unsigned int open_count;
108+
unsigned int req_queue_len;
109+
unsigned int chanq_len; /* length of chanq */
110+
char type[4]; /* from discipline.name, 'none' for unknown */
111+
unsigned int status; /* current device level */
112+
unsigned int label_block; /* where to find the VOLSER */
113+
unsigned int FBA_layout; /* fixed block size (like AIXVOL) */
114+
unsigned int characteristics_size;
115+
unsigned int confdata_size;
116+
char characteristics[64]; /* from read_device_characteristics */
117+
char configuration_data[256]; /* from read_configuration_data */
118118
} dasd_information_t;
119119

120120
/*
121121
* Read Subsystem Data - Performance Statistics
122-
*/
122+
*/
123123
typedef struct dasd_rssd_perf_stats_t {
124124
unsigned char invalid:1;
125125
unsigned char format:3;
@@ -154,21 +154,21 @@ typedef struct dasd_rssd_perf_stats_t {
154154
unsigned char reseved2[96];
155155
} __attribute__((packed)) dasd_rssd_perf_stats_t;
156156

157-
/*
157+
/*
158158
* struct profile_info_t
159-
* holds the profinling information
159+
* holds the profinling information
160160
*/
161161
typedef struct dasd_profile_info_t {
162-
unsigned int dasd_io_reqs; /* number of requests processed at all */
163-
unsigned int dasd_io_sects; /* number of sectors processed at all */
164-
unsigned int dasd_io_secs[32]; /* histogram of request's sizes */
165-
unsigned int dasd_io_times[32]; /* histogram of requests's times */
166-
unsigned int dasd_io_timps[32]; /* histogram of requests's times per sector */
167-
unsigned int dasd_io_time1[32]; /* histogram of time from build to start */
168-
unsigned int dasd_io_time2[32]; /* histogram of time from start to irq */
169-
unsigned int dasd_io_time2ps[32]; /* histogram of time from start to irq */
170-
unsigned int dasd_io_time3[32]; /* histogram of time from irq to end */
171-
unsigned int dasd_io_nr_req[32]; /* histogram of # of requests in chanq */
162+
unsigned int dasd_io_reqs; /* number of requests processed at all */
163+
unsigned int dasd_io_sects; /* number of sectors processed at all */
164+
unsigned int dasd_io_secs[32]; /* histogram of request's sizes */
165+
unsigned int dasd_io_times[32]; /* histogram of requests's times */
166+
unsigned int dasd_io_timps[32]; /* histogram of requests's times per sector */
167+
unsigned int dasd_io_time1[32]; /* histogram of time from build to start */
168+
unsigned int dasd_io_time2[32]; /* histogram of time from start to irq */
169+
unsigned int dasd_io_time2ps[32]; /* histogram of time from start to irq */
170+
unsigned int dasd_io_time3[32]; /* histogram of time from irq to end */
171+
unsigned int dasd_io_nr_req[32]; /* histogram of # of requests in chanq */
172172
} dasd_profile_info_t;
173173

174174
/*
@@ -189,10 +189,12 @@ typedef struct format_data_t {
189189
* 3/11: also write home address
190190
* 4/12: invalidate track
191191
*/
192-
#define DASD_FMT_INT_FMT_R0 1 /* write record zero */
193-
#define DASD_FMT_INT_FMT_HA 2 /* write home address, also set FMT_R0 ! */
194-
#define DASD_FMT_INT_INVAL 4 /* invalidate tracks */
195-
#define DASD_FMT_INT_COMPAT 8 /* use OS/390 compatible disk layout */
192+
#define DASD_FMT_INT_FMT_R0 1 /* write record zero */
193+
#define DASD_FMT_INT_FMT_HA 2 /* write home address, also set FMT_R0 ! */
194+
#define DASD_FMT_INT_INVAL 4 /* invalidate tracks */
195+
#define DASD_FMT_INT_COMPAT 8 /* use OS/390 compatible disk layout */
196+
#define DASD_FMT_INT_FMT_NOR0 16 /* remove permission to write record zero */
197+
#define DASD_FMT_INT_ESE_FULL 32 /* release space for entire volume */
196198

197199
/*
198200
* struct format_check_t
@@ -225,7 +227,7 @@ typedef struct format_check_t {
225227
/* If key-length was != 0 */
226228
#define DASD_FMT_ERR_KEY_LENGTH 5
227229

228-
/*
230+
/*
229231
* struct attrib_data_t
230232
* represents the operation (cache) bits for the device.
231233
* Used in DE to influence caching of the DASD.
@@ -281,23 +283,23 @@ struct dasd_snid_ioctl_data {
281283
* Here ist how the ioctl-nr should be used:
282284
* 0 - 31 DASD driver itself
283285
* 32 - 239 still open
284-
* 240 - 255 reserved for EMC
286+
* 240 - 255 reserved for EMC
285287
*******************************************************************************/
286288

287289
/* Disable the volume (for Linux) */
288-
#define BIODASDDISABLE _IO(DASD_IOCTL_LETTER,0)
290+
#define BIODASDDISABLE _IO(DASD_IOCTL_LETTER,0)
289291
/* Enable the volume (for Linux) */
290-
#define BIODASDENABLE _IO(DASD_IOCTL_LETTER,1)
292+
#define BIODASDENABLE _IO(DASD_IOCTL_LETTER,1)
291293
/* Issue a reserve/release command, rsp. */
292294
#define BIODASDRSRV _IO(DASD_IOCTL_LETTER,2) /* reserve */
293295
#define BIODASDRLSE _IO(DASD_IOCTL_LETTER,3) /* release */
294296
#define BIODASDSLCK _IO(DASD_IOCTL_LETTER,4) /* steal lock */
295297
/* reset profiling information of a device */
296298
#define BIODASDPRRST _IO(DASD_IOCTL_LETTER,5)
297299
/* Quiesce IO on device */
298-
#define BIODASDQUIESCE _IO(DASD_IOCTL_LETTER,6)
300+
#define BIODASDQUIESCE _IO(DASD_IOCTL_LETTER,6)
299301
/* Resume IO on device */
300-
#define BIODASDRESUME _IO(DASD_IOCTL_LETTER,7)
302+
#define BIODASDRESUME _IO(DASD_IOCTL_LETTER,7)
301303
/* Abort all I/O on a device */
302304
#define BIODASDABORTIO _IO(DASD_IOCTL_LETTER, 240)
303305
/* Allow I/O on a device */
@@ -315,13 +317,15 @@ struct dasd_snid_ioctl_data {
315317
/* Performance Statistics Read */
316318
#define BIODASDPSRD _IOR(DASD_IOCTL_LETTER,4,dasd_rssd_perf_stats_t)
317319
/* Get Attributes (cache operations) */
318-
#define BIODASDGATTR _IOR(DASD_IOCTL_LETTER,5,attrib_data_t)
320+
#define BIODASDGATTR _IOR(DASD_IOCTL_LETTER,5,attrib_data_t)
319321

320322

321323
/* #define BIODASDFORMAT _IOW(IOCTL_LETTER,0,format_data_t) , deprecated */
322-
#define BIODASDFMT _IOW(DASD_IOCTL_LETTER,1,format_data_t)
324+
#define BIODASDFMT _IOW(DASD_IOCTL_LETTER,1,format_data_t)
323325
/* Set Attributes (cache operations) */
324-
#define BIODASDSATTR _IOW(DASD_IOCTL_LETTER,2,attrib_data_t)
326+
#define BIODASDSATTR _IOW(DASD_IOCTL_LETTER,2,attrib_data_t)
327+
/* Release Allocated Space */
328+
#define BIODASDRAS _IOW(DASD_IOCTL_LETTER, 3, format_data_t)
325329

326330
/* Get Sense Path Group ID (SNID) data */
327331
#define BIODASDSNID _IOWR(DASD_IOCTL_LETTER, 1, struct dasd_snid_ioctl_data)

‎arch/s390/kernel/early.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
#include <asm/sclp.h>
3131
#include <asm/facility.h>
3232
#include <asm/boot_data.h>
33-
#include <asm/pci_insn.h>
3433
#include "entry.h"
3534

3635
/*
@@ -236,7 +235,6 @@ static __init void detect_machine_facilities(void)
236235
clock_comparator_max = -1ULL >> 1;
237236
__ctl_set_bit(0, 53);
238237
}
239-
enable_mio_ctl();
240238
}
241239

242240
static inline void save_vector_registers(void)

‎arch/s390/kernel/ipl.c‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -286,12 +286,7 @@ static struct kobj_attribute sys_ipl_secure_attr =
286286
static ssize_t ipl_has_secure_show(struct kobject *kobj,
287287
struct kobj_attribute *attr, char *page)
288288
{
289-
if (MACHINE_IS_LPAR)
290-
return sprintf(page, "%i\n", !!sclp.has_sipl);
291-
else if (MACHINE_IS_VM)
292-
return sprintf(page, "%i\n", !!sclp.has_sipl_g2);
293-
else
294-
return sprintf(page, "%i\n", 0);
289+
return sprintf(page, "%i\n", !!sclp.has_sipl);
295290
}
296291

297292
static struct kobj_attribute sys_ipl_has_secure_attr =

‎arch/s390/kernel/perf_cpum_cf_events.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,8 @@ __init const struct attribute_group **cpumf_cf_event_group(void)
624624
break;
625625
case 0x3906:
626626
case 0x3907:
627+
case 0x8561:
628+
case 0x8562:
627629
model = cpumcf_z14_pmu_event_attr;
628630
break;
629631
default:

‎arch/s390/kernel/unwind_bc.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ EXPORT_SYMBOL_GPL(unwind_get_return_address);
2020
static bool outside_of_stack(struct unwind_state *state, unsigned long sp)
2121
{
2222
return (sp <= state->sp) ||
23-
(sp + sizeof(struct stack_frame) > state->stack_info.end);
23+
(sp > state->stack_info.end - sizeof(struct stack_frame));
2424
}
2525

2626
static bool update_stack_info(struct unwind_state *state, unsigned long sp)

‎arch/s390/pci/pci.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -890,8 +890,10 @@ static int __init pci_base_init(void)
890890
if (!test_facility(69) || !test_facility(71))
891891
return 0;
892892

893-
if (test_facility(153) && !s390_pci_no_mio)
893+
if (test_facility(153) && !s390_pci_no_mio) {
894894
static_branch_enable(&have_mio);
895+
ctl_set_bit(2, 5);
896+
}
895897

896898
rc = zpci_debug_init();
897899
if (rc)

‎arch/s390/pci/pci_sysfs.c‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,15 @@ zpci_attr(segment1, "0x%02x\n", pfip[1]);
3737
zpci_attr(segment2, "0x%02x\n", pfip[2]);
3838
zpci_attr(segment3, "0x%02x\n", pfip[3]);
3939

40+
static ssize_t mio_enabled_show(struct device *dev,
41+
struct device_attribute *attr, char *buf)
42+
{
43+
struct zpci_dev *zdev = to_zpci(to_pci_dev(dev));
44+
45+
return sprintf(buf, zpci_use_mio(zdev) ? "1\n" : "0\n");
46+
}
47+
static DEVICE_ATTR_RO(mio_enabled);
48+
4049
static ssize_t recover_store(struct device *dev, struct device_attribute *attr,
4150
const char *buf, size_t count)
4251
{
@@ -115,6 +124,7 @@ static struct attribute *zpci_dev_attrs[] = {
115124
&dev_attr_vfn.attr,
116125
&dev_attr_uid.attr,
117126
&dev_attr_recover.attr,
127+
&dev_attr_mio_enabled.attr,
118128
NULL,
119129
};
120130
static struct attribute_group zpci_attr_group = {

0 commit comments

Comments
 (0)