Skip to content

Commit b3d6524

Browse files
committed
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull s390 updates from Martin Schwidefsky: - The remaining patches for the z13 machine support: kernel build option for z13, the cache synonym avoidance, SMT support, compare-and-delay for spinloops and the CES5S crypto adapater. - The ftrace support for function tracing with the gcc hotpatch option. This touches common code Makefiles, Steven is ok with the changes. - The hypfs file system gets an extension to access diagnose 0x0c data in user space for performance analysis for Linux running under z/VM. - The iucv hvc console gets wildcard spport for the user id filtering. - The cacheinfo code is converted to use the generic infrastructure. - Cleanup and bug fixes. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (42 commits) s390/process: free vx save area when releasing tasks s390/hypfs: Eliminate hypfs interval s390/hypfs: Add diagnose 0c support s390/cacheinfo: don't use smp_processor_id() in preemptible context s390/zcrypt: fixed domain scanning problem (again) s390/smp: increase maximum value of NR_CPUS to 512 s390/jump label: use different nop instruction s390/jump label: add sanity checks s390/mm: correct missing space when reporting user process faults s390/dasd: cleanup profiling s390/dasd: add locking for global_profile access s390/ftrace: hotpatch support for function tracing ftrace: let notrace function attribute disable hotpatching if necessary ftrace: allow architectures to specify ftrace compile options s390: reintroduce diag 44 calls for cpu_relax() s390/zcrypt: Add support for new crypto express (CEX5S) adapter. s390/zcrypt: Number of supported ap domains is not retrievable. s390/spinlock: add compare-and-delay to lock wait loops s390/tape: remove redundant if statement s390/hvc_iucv: add simple wildcard matches to the iucv allow filter ...
2 parents 07f80d4 + 6a039ea commit b3d6524

Some content is hidden

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

82 files changed

+1640
-1030
lines changed

Documentation/s390/Debugging390.txt

+237-256
Large diffs are not rendered by default.

Makefile

+5-1
Original file line numberDiff line numberDiff line change
@@ -726,10 +726,14 @@ KBUILD_CFLAGS += $(call cc-option, -femit-struct-debug-baseonly) \
726726
endif
727727

728728
ifdef CONFIG_FUNCTION_TRACER
729+
ifndef CC_FLAGS_FTRACE
730+
CC_FLAGS_FTRACE := -pg
731+
endif
732+
export CC_FLAGS_FTRACE
729733
ifdef CONFIG_HAVE_FENTRY
730734
CC_USING_FENTRY := $(call cc-option, -mfentry -DCC_USING_FENTRY)
731735
endif
732-
KBUILD_CFLAGS += -pg $(CC_USING_FENTRY)
736+
KBUILD_CFLAGS += $(CC_FLAGS_FTRACE) $(CC_USING_FENTRY)
733737
KBUILD_AFLAGS += $(CC_USING_FENTRY)
734738
ifdef CONFIG_DYNAMIC_FTRACE
735739
ifdef CONFIG_HAVE_C_RECORDMCOUNT

arch/s390/Kconfig

+34-8
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ config S390
6666
select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
6767
select ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS
6868
select ARCH_HAS_GCOV_PROFILE_ALL
69+
select ARCH_HAS_SG_CHAIN
6970
select ARCH_HAVE_NMI_SAFE_CMPXCHG
7071
select ARCH_INLINE_READ_LOCK
7172
select ARCH_INLINE_READ_LOCK_BH
@@ -116,7 +117,6 @@ config S390
116117
select HAVE_BPF_JIT if 64BIT && PACK_STACK
117118
select HAVE_CMPXCHG_DOUBLE
118119
select HAVE_CMPXCHG_LOCAL
119-
select HAVE_C_RECORDMCOUNT
120120
select HAVE_DEBUG_KMEMLEAK
121121
select HAVE_DYNAMIC_FTRACE if 64BIT
122122
select HAVE_DYNAMIC_FTRACE_WITH_REGS if 64BIT
@@ -151,7 +151,6 @@ config S390
151151
select TTY
152152
select VIRT_CPU_ACCOUNTING
153153
select VIRT_TO_BUS
154-
select ARCH_HAS_SG_CHAIN
155154

156155
config SCHED_OMIT_FRAME_POINTER
157156
def_bool y
@@ -185,6 +184,10 @@ config HAVE_MARCH_ZEC12_FEATURES
185184
def_bool n
186185
select HAVE_MARCH_Z196_FEATURES
187186

187+
config HAVE_MARCH_Z13_FEATURES
188+
def_bool n
189+
select HAVE_MARCH_ZEC12_FEATURES
190+
188191
choice
189192
prompt "Processor type"
190193
default MARCH_G5
@@ -244,6 +247,14 @@ config MARCH_ZEC12
244247
2827 series). The kernel will be slightly faster but will not work on
245248
older machines.
246249

250+
config MARCH_Z13
251+
bool "IBM z13"
252+
select HAVE_MARCH_Z13_FEATURES if 64BIT
253+
help
254+
Select this to enable optimizations for IBM z13 (2964 series).
255+
The kernel will be slightly faster but will not work on older
256+
machines.
257+
247258
endchoice
248259

249260
config MARCH_G5_TUNE
@@ -267,6 +278,9 @@ config MARCH_Z196_TUNE
267278
config MARCH_ZEC12_TUNE
268279
def_bool TUNE_ZEC12 || MARCH_ZEC12 && TUNE_DEFAULT
269280

281+
config MARCH_Z13_TUNE
282+
def_bool TUNE_Z13 || MARCH_Z13 && TUNE_DEFAULT
283+
270284
choice
271285
prompt "Tune code generation"
272286
default TUNE_DEFAULT
@@ -305,6 +319,9 @@ config TUNE_Z196
305319
config TUNE_ZEC12
306320
bool "IBM zBC12 and zEC12"
307321

322+
config TUNE_Z13
323+
bool "IBM z13"
324+
308325
endchoice
309326

310327
config 64BIT
@@ -356,14 +373,14 @@ config SMP
356373
Even if you don't know what to do here, say Y.
357374

358375
config NR_CPUS
359-
int "Maximum number of CPUs (2-256)"
360-
range 2 256
376+
int "Maximum number of CPUs (2-512)"
377+
range 2 512
361378
depends on SMP
362379
default "32" if !64BIT
363380
default "64" if 64BIT
364381
help
365382
This allows you to specify the maximum number of CPUs which this
366-
kernel will support. The maximum supported value is 256 and the
383+
kernel will support. The maximum supported value is 512 and the
367384
minimum value which makes sense is 2.
368385

369386
This is purely to save memory - each supported CPU adds
@@ -378,17 +395,26 @@ config HOTPLUG_CPU
378395
can be controlled through /sys/devices/system/cpu/cpu#.
379396
Say N if you want to disable CPU hotplug.
380397

398+
config SCHED_SMT
399+
def_bool n
400+
381401
config SCHED_MC
382402
def_bool n
383403

384404
config SCHED_BOOK
405+
def_bool n
406+
407+
config SCHED_TOPOLOGY
385408
def_bool y
386-
prompt "Book scheduler support"
409+
prompt "Topology scheduler support"
387410
depends on SMP
411+
select SCHED_SMT
388412
select SCHED_MC
413+
select SCHED_BOOK
389414
help
390-
Book scheduler support improves the CPU scheduler's decision making
391-
when dealing with machines that have several books.
415+
Topology scheduler support improves the CPU scheduler's decision
416+
making when dealing with machines that have multi-threading,
417+
multiple cores or multiple books.
392418

393419
source kernel/Kconfig.preempt
394420

arch/s390/Makefile

+12
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ mflags-$(CONFIG_MARCH_Z9_109) := -march=z9-109
4242
mflags-$(CONFIG_MARCH_Z10) := -march=z10
4343
mflags-$(CONFIG_MARCH_Z196) := -march=z196
4444
mflags-$(CONFIG_MARCH_ZEC12) := -march=zEC12
45+
mflags-$(CONFIG_MARCH_Z13) := -march=z13
4546

4647
aflags-y += $(mflags-y)
4748
cflags-y += $(mflags-y)
@@ -53,6 +54,7 @@ cflags-$(CONFIG_MARCH_Z9_109_TUNE) += -mtune=z9-109
5354
cflags-$(CONFIG_MARCH_Z10_TUNE) += -mtune=z10
5455
cflags-$(CONFIG_MARCH_Z196_TUNE) += -mtune=z196
5556
cflags-$(CONFIG_MARCH_ZEC12_TUNE) += -mtune=zEC12
57+
cflags-$(CONFIG_MARCH_Z13_TUNE) += -mtune=z13
5658

5759
#KBUILD_IMAGE is necessary for make rpm
5860
KBUILD_IMAGE :=arch/s390/boot/image
@@ -85,6 +87,16 @@ ifeq ($(call cc-option-yn,-mwarn-dynamicstack),y)
8587
cflags-$(CONFIG_WARN_DYNAMIC_STACK) += -mwarn-dynamicstack
8688
endif
8789

90+
ifdef CONFIG_FUNCTION_TRACER
91+
# make use of hotpatch feature if the compiler supports it
92+
cc_hotpatch := -mhotpatch=0,3
93+
ifeq ($(call cc-option-yn,$(cc_hotpatch)),y)
94+
CC_FLAGS_FTRACE := $(cc_hotpatch)
95+
KBUILD_AFLAGS += -DCC_USING_HOTPATCH
96+
KBUILD_CFLAGS += -DCC_USING_HOTPATCH
97+
endif
98+
endif
99+
88100
KBUILD_CFLAGS += -mbackchain -msoft-float $(cflags-y)
89101
KBUILD_CFLAGS += -pipe -fno-strength-reduce -Wno-sign-compare
90102
KBUILD_AFLAGS += $(aflags-y)

arch/s390/boot/compressed/misc.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
#include <asm/uaccess.h>
1010
#include <asm/page.h>
11+
#include <asm/sclp.h>
1112
#include <asm/ipl.h>
1213
#include "sizes.h"
1314

@@ -63,8 +64,6 @@ static unsigned long free_mem_end_ptr;
6364
#include "../../../../lib/decompress_unxz.c"
6465
#endif
6566

66-
extern _sclp_print_early(const char *);
67-
6867
static int puts(const char *s)
6968
{
7069
_sclp_print_early(s);

arch/s390/configs/default_defconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -555,14 +555,14 @@ CONFIG_DEBUG_OBJECTS_RCU_HEAD=y
555555
CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER=y
556556
CONFIG_SLUB_DEBUG_ON=y
557557
CONFIG_SLUB_STATS=y
558-
CONFIG_DEBUG_KMEMLEAK=y
559558
CONFIG_DEBUG_STACK_USAGE=y
560559
CONFIG_DEBUG_VM=y
561560
CONFIG_DEBUG_VM_RB=y
562561
CONFIG_MEMORY_NOTIFIER_ERROR_INJECT=m
563562
CONFIG_DEBUG_PER_CPU_MAPS=y
564563
CONFIG_DEBUG_SHIRQ=y
565564
CONFIG_DETECT_HUNG_TASK=y
565+
CONFIG_PANIC_ON_OOPS=y
566566
CONFIG_TIMER_STATS=y
567567
CONFIG_DEBUG_RT_MUTEXES=y
568568
CONFIG_DEBUG_WW_MUTEX_SLOWPATH=y

arch/s390/configs/gcov_defconfig

+1
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,7 @@ CONFIG_UNUSED_SYMBOLS=y
540540
CONFIG_MAGIC_SYSRQ=y
541541
CONFIG_DEBUG_KERNEL=y
542542
CONFIG_MEMORY_NOTIFIER_ERROR_INJECT=m
543+
CONFIG_PANIC_ON_OOPS=y
543544
CONFIG_TIMER_STATS=y
544545
CONFIG_RCU_TORTURE_TEST=m
545546
CONFIG_RCU_CPU_STALL_TIMEOUT=60

arch/s390/configs/performance_defconfig

+1
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,7 @@ CONFIG_FRAME_WARN=1024
537537
CONFIG_UNUSED_SYMBOLS=y
538538
CONFIG_MAGIC_SYSRQ=y
539539
CONFIG_DEBUG_KERNEL=y
540+
CONFIG_PANIC_ON_OOPS=y
540541
CONFIG_TIMER_STATS=y
541542
CONFIG_RCU_TORTURE_TEST=m
542543
CONFIG_RCU_CPU_STALL_TIMEOUT=60

arch/s390/configs/zfcpdump_defconfig

+1
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ CONFIG_PRINTK_TIME=y
7171
CONFIG_DEBUG_INFO=y
7272
CONFIG_DEBUG_FS=y
7373
CONFIG_DEBUG_KERNEL=y
74+
CONFIG_PANIC_ON_OOPS=y
7475
# CONFIG_SCHED_DEBUG is not set
7576
CONFIG_RCU_CPU_STALL_TIMEOUT=60
7677
# CONFIG_FTRACE is not set

arch/s390/crypto/aes_s390.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ static int aes_set_key(struct crypto_tfm *tfm, const u8 *in_key,
134134

135135
static void aes_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in)
136136
{
137-
const struct s390_aes_ctx *sctx = crypto_tfm_ctx(tfm);
137+
struct s390_aes_ctx *sctx = crypto_tfm_ctx(tfm);
138138

139139
if (unlikely(need_fallback(sctx->key_len))) {
140140
crypto_cipher_encrypt_one(sctx->fallback.cip, out, in);
@@ -159,7 +159,7 @@ static void aes_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in)
159159

160160
static void aes_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in)
161161
{
162-
const struct s390_aes_ctx *sctx = crypto_tfm_ctx(tfm);
162+
struct s390_aes_ctx *sctx = crypto_tfm_ctx(tfm);
163163

164164
if (unlikely(need_fallback(sctx->key_len))) {
165165
crypto_cipher_decrypt_one(sctx->fallback.cip, out, in);

arch/s390/defconfig

+1-6
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,15 @@ CONFIG_IKCONFIG_PROC=y
1414
CONFIG_CGROUPS=y
1515
CONFIG_CPUSETS=y
1616
CONFIG_CGROUP_CPUACCT=y
17-
CONFIG_RESOURCE_COUNTERS=y
1817
CONFIG_MEMCG=y
1918
CONFIG_MEMCG_SWAP=y
2019
CONFIG_CGROUP_SCHED=y
2120
CONFIG_RT_GROUP_SCHED=y
2221
CONFIG_BLK_CGROUP=y
2322
CONFIG_NAMESPACES=y
2423
CONFIG_BLK_DEV_INITRD=y
25-
CONFIG_RD_BZIP2=y
26-
CONFIG_RD_LZMA=y
27-
CONFIG_RD_XZ=y
28-
CONFIG_RD_LZO=y
29-
CONFIG_RD_LZ4=y
3024
CONFIG_EXPERT=y
25+
CONFIG_BPF_SYSCALL=y
3126
# CONFIG_COMPAT_BRK is not set
3227
CONFIG_PROFILING=y
3328
CONFIG_OPROFILE=y

arch/s390/hypfs/Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
obj-$(CONFIG_S390_HYPFS_FS) += s390_hypfs.o
66

77
s390_hypfs-objs := inode.o hypfs_diag.o hypfs_vm.o hypfs_dbfs.o hypfs_sprp.o
8+
s390_hypfs-objs += hypfs_diag0c.o

arch/s390/hypfs/hypfs.h

+4-3
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ extern int hypfs_vm_init(void);
3737
extern void hypfs_vm_exit(void);
3838
extern int hypfs_vm_create_files(struct dentry *root);
3939

40+
/* VM diagnose 0c */
41+
int hypfs_diag0c_init(void);
42+
void hypfs_diag0c_exit(void);
43+
4044
/* Set Partition-Resource Parameter */
4145
int hypfs_sprp_init(void);
4246
void hypfs_sprp_exit(void);
@@ -49,7 +53,6 @@ struct hypfs_dbfs_data {
4953
void *buf_free_ptr;
5054
size_t size;
5155
struct hypfs_dbfs_file *dbfs_file;
52-
struct kref kref;
5356
};
5457

5558
struct hypfs_dbfs_file {
@@ -61,8 +64,6 @@ struct hypfs_dbfs_file {
6164
unsigned long);
6265

6366
/* Private data for hypfs_dbfs.c */
64-
struct hypfs_dbfs_data *data;
65-
struct delayed_work data_free_work;
6667
struct mutex lock;
6768
struct dentry *dentry;
6869
};

arch/s390/hypfs/hypfs_dbfs.c

+12-37
Original file line numberDiff line numberDiff line change
@@ -17,33 +17,16 @@ static struct hypfs_dbfs_data *hypfs_dbfs_data_alloc(struct hypfs_dbfs_file *f)
1717
data = kmalloc(sizeof(*data), GFP_KERNEL);
1818
if (!data)
1919
return NULL;
20-
kref_init(&data->kref);
2120
data->dbfs_file = f;
2221
return data;
2322
}
2423

25-
static void hypfs_dbfs_data_free(struct kref *kref)
24+
static void hypfs_dbfs_data_free(struct hypfs_dbfs_data *data)
2625
{
27-
struct hypfs_dbfs_data *data;
28-
29-
data = container_of(kref, struct hypfs_dbfs_data, kref);
3026
data->dbfs_file->data_free(data->buf_free_ptr);
3127
kfree(data);
3228
}
3329

34-
static void data_free_delayed(struct work_struct *work)
35-
{
36-
struct hypfs_dbfs_data *data;
37-
struct hypfs_dbfs_file *df;
38-
39-
df = container_of(work, struct hypfs_dbfs_file, data_free_work.work);
40-
mutex_lock(&df->lock);
41-
data = df->data;
42-
df->data = NULL;
43-
mutex_unlock(&df->lock);
44-
kref_put(&data->kref, hypfs_dbfs_data_free);
45-
}
46-
4730
static ssize_t dbfs_read(struct file *file, char __user *buf,
4831
size_t size, loff_t *ppos)
4932
{
@@ -56,28 +39,21 @@ static ssize_t dbfs_read(struct file *file, char __user *buf,
5639

5740
df = file_inode(file)->i_private;
5841
mutex_lock(&df->lock);
59-
if (!df->data) {
60-
data = hypfs_dbfs_data_alloc(df);
61-
if (!data) {
62-
mutex_unlock(&df->lock);
63-
return -ENOMEM;
64-
}
65-
rc = df->data_create(&data->buf, &data->buf_free_ptr,
66-
&data->size);
67-
if (rc) {
68-
mutex_unlock(&df->lock);
69-
kfree(data);
70-
return rc;
71-
}
72-
df->data = data;
73-
schedule_delayed_work(&df->data_free_work, HZ);
42+
data = hypfs_dbfs_data_alloc(df);
43+
if (!data) {
44+
mutex_unlock(&df->lock);
45+
return -ENOMEM;
46+
}
47+
rc = df->data_create(&data->buf, &data->buf_free_ptr, &data->size);
48+
if (rc) {
49+
mutex_unlock(&df->lock);
50+
kfree(data);
51+
return rc;
7452
}
75-
data = df->data;
76-
kref_get(&data->kref);
7753
mutex_unlock(&df->lock);
7854

7955
rc = simple_read_from_buffer(buf, size, ppos, data->buf, data->size);
80-
kref_put(&data->kref, hypfs_dbfs_data_free);
56+
hypfs_dbfs_data_free(data);
8157
return rc;
8258
}
8359

@@ -108,7 +84,6 @@ int hypfs_dbfs_create_file(struct hypfs_dbfs_file *df)
10884
if (IS_ERR(df->dentry))
10985
return PTR_ERR(df->dentry);
11086
mutex_init(&df->lock);
111-
INIT_DELAYED_WORK(&df->data_free_work, data_free_delayed);
11287
return 0;
11388
}
11489

0 commit comments

Comments
 (0)