aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-08-02 12:41:13 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-08-02 12:41:13 -0400
commitf7b32e4c021fd788f13f6785e17efbc3eb05b351 (patch)
tree540dda869ee5959c1260b9a3ecd495a7d7c51351
parent731c7d3a205ba89b475b2aa71b5f13dd6ae3de56 (diff)
parente64a5470dcd2900ab8f8f83638c00098b10e6300 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull more s390 updates from Martin Schwidefsky: - some cleanup for the hugetlbfs pte/pmd conversion functions - the code to check for the minimum CPU type is converted from assembler to C and an informational message is added in case the CPU is not new enough to run the kernel - bug fixes * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/ftrace/jprobes: Fix conflict between jprobes and function graph tracing s390: Define AT_VECTOR_SIZE_ARCH for ARCH_DLINFO s390/zcrypt: fix possible memory leak in ap_module_init() s390/numa: only set possible nodes within node_possible_map s390/als: fix compile with gcov enabled s390/facilities: do not generate DWORDS define anymore s390/als: print missing facilities on facility mismatch s390/als: print machine type on facility mismatch s390/als: convert architecture level set code to C s390/sclp: move uninitialized data to data section s390/zcrypt: Fix zcrypt suspend/resume behavior s390/cio: fix premature wakeup during chp configure s390/cio: convert cfg_lock mutex to spinlock s390/mm: clean up pte/pmd encoding
-rw-r--r--arch/s390/boot/compressed/Makefile2
-rw-r--r--arch/s390/include/asm/elf.h1
-rw-r--r--arch/s390/include/asm/pgtable.h20
-rw-r--r--arch/s390/include/uapi/asm/auxvec.h2
-rw-r--r--arch/s390/kernel/Makefile11
-rw-r--r--arch/s390/kernel/als.c124
-rw-r--r--arch/s390/kernel/entry.h2
-rw-r--r--arch/s390/kernel/head.S43
-rw-r--r--arch/s390/kernel/kprobes.c12
-rw-r--r--arch/s390/kernel/sclp.c5
-rw-r--r--arch/s390/mm/hugetlbpage.c52
-rw-r--r--arch/s390/numa/mode_emu.c4
-rw-r--r--arch/s390/numa/numa.c8
-rw-r--r--arch/s390/tools/gen_facilities.c1
-rw-r--r--drivers/s390/cio/chp.c60
-rw-r--r--drivers/s390/crypto/ap_bus.c50
-rw-r--r--drivers/s390/crypto/ap_bus.h1
-rw-r--r--drivers/s390/crypto/zcrypt_cex2a.c2
-rw-r--r--drivers/s390/crypto/zcrypt_cex4.c2
-rw-r--r--drivers/s390/crypto/zcrypt_pcixcc.c2
20 files changed, 305 insertions, 99 deletions
diff --git a/arch/s390/boot/compressed/Makefile b/arch/s390/boot/compressed/Makefile
index 98ec652cc332..13723c39e58e 100644
--- a/arch/s390/boot/compressed/Makefile
+++ b/arch/s390/boot/compressed/Makefile
@@ -18,7 +18,7 @@ KBUILD_CFLAGS += $(call cc-option,-ffreestanding)
18 18
19GCOV_PROFILE := n 19GCOV_PROFILE := n
20 20
21OBJECTS := $(addprefix $(objtree)/arch/s390/kernel/, head.o sclp.o ebcdic.o) 21OBJECTS := $(addprefix $(objtree)/arch/s390/kernel/, head.o sclp.o ebcdic.o als.o)
22OBJECTS += $(obj)/head.o $(obj)/misc.o $(obj)/piggy.o 22OBJECTS += $(obj)/head.o $(obj)/misc.o $(obj)/piggy.o
23 23
24LDFLAGS_vmlinux := --oformat $(LD_BFD) -e startup -T 24LDFLAGS_vmlinux := --oformat $(LD_BFD) -e startup -T
diff --git a/arch/s390/include/asm/elf.h b/arch/s390/include/asm/elf.h
index 563ab9f44874..1736c7d3c94c 100644
--- a/arch/s390/include/asm/elf.h
+++ b/arch/s390/include/asm/elf.h
@@ -225,6 +225,7 @@ do { \
225#define MMAP_ALIGN_MASK (is_compat_task() ? 0 : 0x7fUL) 225#define MMAP_ALIGN_MASK (is_compat_task() ? 0 : 0x7fUL)
226#define STACK_RND_MASK MMAP_RND_MASK 226#define STACK_RND_MASK MMAP_RND_MASK
227 227
228/* update AT_VECTOR_SIZE_ARCH if the number of NEW_AUX_ENT entries changes */
228#define ARCH_DLINFO \ 229#define ARCH_DLINFO \
229do { \ 230do { \
230 if (vdso_enabled) \ 231 if (vdso_enabled) \
diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h
index ea1533e07271..48d383af078f 100644
--- a/arch/s390/include/asm/pgtable.h
+++ b/arch/s390/include/asm/pgtable.h
@@ -242,8 +242,8 @@ static inline int is_module_addr(void *addr)
242 * swap .11..ttttt.0 242 * swap .11..ttttt.0
243 * prot-none, clean, old .11.xx0000.1 243 * prot-none, clean, old .11.xx0000.1
244 * prot-none, clean, young .11.xx0001.1 244 * prot-none, clean, young .11.xx0001.1
245 * prot-none, dirty, old .10.xx0010.1 245 * prot-none, dirty, old .11.xx0010.1
246 * prot-none, dirty, young .10.xx0011.1 246 * prot-none, dirty, young .11.xx0011.1
247 * read-only, clean, old .11.xx0100.1 247 * read-only, clean, old .11.xx0100.1
248 * read-only, clean, young .01.xx0101.1 248 * read-only, clean, young .01.xx0101.1
249 * read-only, dirty, old .11.xx0110.1 249 * read-only, dirty, old .11.xx0110.1
@@ -323,8 +323,8 @@ static inline int is_module_addr(void *addr)
323#define _SEGMENT_ENTRY_DIRTY 0x2000 /* SW segment dirty bit */ 323#define _SEGMENT_ENTRY_DIRTY 0x2000 /* SW segment dirty bit */
324#define _SEGMENT_ENTRY_YOUNG 0x1000 /* SW segment young bit */ 324#define _SEGMENT_ENTRY_YOUNG 0x1000 /* SW segment young bit */
325#define _SEGMENT_ENTRY_LARGE 0x0400 /* STE-format control, large page */ 325#define _SEGMENT_ENTRY_LARGE 0x0400 /* STE-format control, large page */
326#define _SEGMENT_ENTRY_READ 0x0002 /* SW segment read bit */ 326#define _SEGMENT_ENTRY_WRITE 0x0002 /* SW segment write bit */
327#define _SEGMENT_ENTRY_WRITE 0x0001 /* SW segment write bit */ 327#define _SEGMENT_ENTRY_READ 0x0001 /* SW segment read bit */
328 328
329#ifdef CONFIG_MEM_SOFT_DIRTY 329#ifdef CONFIG_MEM_SOFT_DIRTY
330#define _SEGMENT_ENTRY_SOFT_DIRTY 0x4000 /* SW segment soft dirty bit */ 330#define _SEGMENT_ENTRY_SOFT_DIRTY 0x4000 /* SW segment soft dirty bit */
@@ -335,15 +335,15 @@ static inline int is_module_addr(void *addr)
335/* 335/*
336 * Segment table and region3 table entry encoding 336 * Segment table and region3 table entry encoding
337 * (R = read-only, I = invalid, y = young bit): 337 * (R = read-only, I = invalid, y = young bit):
338 * dy..R...I...rw 338 * dy..R...I...wr
339 * prot-none, clean, old 00..1...1...00 339 * prot-none, clean, old 00..1...1...00
340 * prot-none, clean, young 01..1...1...00 340 * prot-none, clean, young 01..1...1...00
341 * prot-none, dirty, old 10..1...1...00 341 * prot-none, dirty, old 10..1...1...00
342 * prot-none, dirty, young 11..1...1...00 342 * prot-none, dirty, young 11..1...1...00
343 * read-only, clean, old 00..1...1...10 343 * read-only, clean, old 00..1...1...01
344 * read-only, clean, young 01..1...0...10 344 * read-only, clean, young 01..1...0...01
345 * read-only, dirty, old 10..1...1...10 345 * read-only, dirty, old 10..1...1...01
346 * read-only, dirty, young 11..1...0...10 346 * read-only, dirty, young 11..1...0...01
347 * read-write, clean, old 00..1...1...11 347 * read-write, clean, old 00..1...1...11
348 * read-write, clean, young 01..1...0...11 348 * read-write, clean, young 01..1...0...11
349 * read-write, dirty, old 10..0...1...11 349 * read-write, dirty, old 10..0...1...11
@@ -382,7 +382,7 @@ static inline int is_module_addr(void *addr)
382/* 382/*
383 * Page protection definitions. 383 * Page protection definitions.
384 */ 384 */
385#define PAGE_NONE __pgprot(_PAGE_PRESENT | _PAGE_INVALID) 385#define PAGE_NONE __pgprot(_PAGE_PRESENT | _PAGE_INVALID | _PAGE_PROTECT)
386#define PAGE_READ __pgprot(_PAGE_PRESENT | _PAGE_READ | \ 386#define PAGE_READ __pgprot(_PAGE_PRESENT | _PAGE_READ | \
387 _PAGE_INVALID | _PAGE_PROTECT) 387 _PAGE_INVALID | _PAGE_PROTECT)
388#define PAGE_WRITE __pgprot(_PAGE_PRESENT | _PAGE_READ | _PAGE_WRITE | \ 388#define PAGE_WRITE __pgprot(_PAGE_PRESENT | _PAGE_READ | _PAGE_WRITE | \
diff --git a/arch/s390/include/uapi/asm/auxvec.h b/arch/s390/include/uapi/asm/auxvec.h
index a1f153e89133..c53e08442255 100644
--- a/arch/s390/include/uapi/asm/auxvec.h
+++ b/arch/s390/include/uapi/asm/auxvec.h
@@ -3,4 +3,6 @@
3 3
4#define AT_SYSINFO_EHDR 33 4#define AT_SYSINFO_EHDR 33
5 5
6#define AT_VECTOR_SIZE_ARCH 1 /* entries in ARCH_DLINFO */
7
6#endif 8#endif
diff --git a/arch/s390/kernel/Makefile b/arch/s390/kernel/Makefile
index f37be37edd3a..3234817c7d47 100644
--- a/arch/s390/kernel/Makefile
+++ b/arch/s390/kernel/Makefile
@@ -4,6 +4,7 @@
4 4
5KCOV_INSTRUMENT_early.o := n 5KCOV_INSTRUMENT_early.o := n
6KCOV_INSTRUMENT_sclp.o := n 6KCOV_INSTRUMENT_sclp.o := n
7KCOV_INSTRUMENT_als.o := n
7 8
8ifdef CONFIG_FUNCTION_TRACER 9ifdef CONFIG_FUNCTION_TRACER
9# Don't trace early setup code and tracing code 10# Don't trace early setup code and tracing code
@@ -32,21 +33,25 @@ CFLAGS_ptrace.o += -DUTS_MACHINE='"$(UTS_MACHINE)"'
32CFLAGS_sysinfo.o += -w 33CFLAGS_sysinfo.o += -w
33 34
34# 35#
35# Use -march=z900 for sclp.c to be able to print an error message if 36# Use -march=z900 for sclp.c and als.c to be able to print an error
36# the kernel is started on a machine which is too old 37# message if the kernel is started on a machine which is too old
37# 38#
38CFLAGS_REMOVE_sclp.o = $(CC_FLAGS_FTRACE) 39CFLAGS_REMOVE_sclp.o = $(CC_FLAGS_FTRACE)
40CFLAGS_REMOVE_als.o = $(CC_FLAGS_FTRACE)
39ifneq ($(CC_FLAGS_MARCH),-march=z900) 41ifneq ($(CC_FLAGS_MARCH),-march=z900)
40CFLAGS_REMOVE_sclp.o += $(CC_FLAGS_MARCH) 42CFLAGS_REMOVE_sclp.o += $(CC_FLAGS_MARCH)
41CFLAGS_sclp.o += -march=z900 43CFLAGS_sclp.o += -march=z900
44CFLAGS_REMOVE_als.o += $(CC_FLAGS_MARCH)
45CFLAGS_als.o += -march=z900
42AFLAGS_REMOVE_head.o += $(CC_FLAGS_MARCH) 46AFLAGS_REMOVE_head.o += $(CC_FLAGS_MARCH)
43AFLAGS_head.o += -march=z900 47AFLAGS_head.o += -march=z900
44endif 48endif
45GCOV_PROFILE_sclp.o := n 49GCOV_PROFILE_sclp.o := n
50GCOV_PROFILE_als.o := n
46 51
47obj-y := traps.o time.o process.o base.o early.o setup.o idle.o vtime.o 52obj-y := traps.o time.o process.o base.o early.o setup.o idle.o vtime.o
48obj-y += processor.o sys_s390.o ptrace.o signal.o cpcmd.o ebcdic.o nmi.o 53obj-y += processor.o sys_s390.o ptrace.o signal.o cpcmd.o ebcdic.o nmi.o
49obj-y += debug.o irq.o ipl.o dis.o diag.o sclp.o vdso.o 54obj-y += debug.o irq.o ipl.o dis.o diag.o sclp.o vdso.o als.o
50obj-y += sysinfo.o jump_label.o lgr.o os_info.o machine_kexec.o pgm_check.o 55obj-y += sysinfo.o jump_label.o lgr.o os_info.o machine_kexec.o pgm_check.o
51obj-y += runtime_instr.o cache.o fpu.o dumpstack.o 56obj-y += runtime_instr.o cache.o fpu.o dumpstack.o
52obj-y += entry.o reipl.o relocate_kernel.o 57obj-y += entry.o reipl.o relocate_kernel.o
diff --git a/arch/s390/kernel/als.c b/arch/s390/kernel/als.c
new file mode 100644
index 000000000000..a16e9d1bf9e3
--- /dev/null
+++ b/arch/s390/kernel/als.c
@@ -0,0 +1,124 @@
1/*
2 * Copyright IBM Corp. 2016
3 */
4#include <linux/kernel.h>
5#include <linux/init.h>
6#include <asm/processor.h>
7#include <asm/facility.h>
8#include <asm/lowcore.h>
9#include <asm/sclp.h>
10#include "entry.h"
11
12/*
13 * The code within this file will be called very early. It may _not_
14 * access anything within the bss section, since that is not cleared
15 * yet and may contain data (e.g