diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-17 13:10:49 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-17 13:10:49 -0400 |
commit | 31598e8713ef501c8f6aad2e2ec8a9457e8877c1 (patch) | |
tree | 255d16a18cbfa78d15486eba07e03b222ddb5f77 /arch/s390 | |
parent | 241eb95600be194f6b59b85c0bf41194694ebdf1 (diff) | |
parent | 6966727db1389f4926c6fa6e87a600112a5658b9 (diff) |
Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
[S390] kexec: Disable ftrace during kexec
[S390] support XZ compressed kernel
[S390] css_bus_type: make it static
[S390] css_driver: remove duplicate members
[S390] css: remove subchannel private
[S390] css: move chsc_private to drv_data
[S390] css: move io_private to drv_data
[S390] cio: move cdev pointer to io_subchannel_private
[S390] cio: move options to io_sch_private
[S390] cio: move asms to generic header
[S390] cio: move orb definitions to separate header
[S390] Write protect module text and RO data
[S390] dasd: get rid of compile warning
[S390] remove superfluous check from do_IRQ
[S390] remove redundant stack check option
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/Kconfig | 21 | ||||
-rw-r--r-- | arch/s390/Kconfig.debug | 3 | ||||
-rw-r--r-- | arch/s390/Makefile | 3 | ||||
-rw-r--r-- | arch/s390/boot/compressed/Makefile | 6 | ||||
-rw-r--r-- | arch/s390/boot/compressed/misc.c | 5 | ||||
-rw-r--r-- | arch/s390/include/asm/cacheflush.h | 4 | ||||
-rw-r--r-- | arch/s390/kernel/machine_kexec.c | 2 | ||||
-rw-r--r-- | arch/s390/mm/Makefile | 1 | ||||
-rw-r--r-- | arch/s390/mm/pageattr.c | 55 |
9 files changed, 82 insertions, 18 deletions
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index 636bcb81d068..2508a6f31588 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig | |||
@@ -85,6 +85,7 @@ config S390 | |||
85 | select HAVE_KERNEL_BZIP2 | 85 | select HAVE_KERNEL_BZIP2 |
86 | select HAVE_KERNEL_LZMA | 86 | select HAVE_KERNEL_LZMA |
87 | select HAVE_KERNEL_LZO | 87 | select HAVE_KERNEL_LZO |
88 | select HAVE_KERNEL_XZ | ||
88 | select HAVE_GET_USER_PAGES_FAST | 89 | select HAVE_GET_USER_PAGES_FAST |
89 | select HAVE_ARCH_MUTEX_CPU_RELAX | 90 | select HAVE_ARCH_MUTEX_CPU_RELAX |
90 | select ARCH_INLINE_SPIN_TRYLOCK | 91 | select ARCH_INLINE_SPIN_TRYLOCK |
@@ -341,26 +342,16 @@ config STACK_GUARD | |||
341 | The minimum size for the stack guard should be 256 for 31 bit and | 342 | The minimum size for the stack guard should be 256 for 31 bit and |
342 | 512 for 64 bit. | 343 | 512 for 64 bit. |
343 | 344 | ||
344 | config WARN_STACK | 345 | config WARN_DYNAMIC_STACK |
345 | def_bool n | 346 | def_bool n |
346 | prompt "Emit compiler warnings for function with broken stack usage" | 347 | prompt "Emit compiler warnings for function with dynamic stack usage" |
347 | help | 348 | help |
348 | This option enables the compiler options -mwarn-framesize and | 349 | This option enables the compiler option -mwarn-dynamicstack. If the |
349 | -mwarn-dynamicstack. If the compiler supports these options it | 350 | compiler supports this options generates warnings for functions |
350 | will generate warnings for function which either use alloca or | 351 | that dynamically allocate stack space using alloca. |
351 | create a stack frame bigger than CONFIG_WARN_STACK_SIZE. | ||
352 | 352 | ||
353 | Say N if you are unsure. | 353 | Say N if you are unsure. |
354 | 354 | ||
355 | config WARN_STACK_SIZE | ||
356 | int "Maximum frame size considered safe (128-2048)" | ||
357 | range 128 2048 | ||
358 | depends on WARN_STACK | ||
359 | default "2048" | ||
360 | help | ||
361 | This allows you to specify the maximum frame size a function may | ||
362 | have without the compiler complaining about it. | ||
363 | |||
364 | config ARCH_POPULATES_NODE_MAP | 355 | config ARCH_POPULATES_NODE_MAP |
365 | def_bool y | 356 | def_bool y |
366 | 357 | ||
diff --git a/arch/s390/Kconfig.debug b/arch/s390/Kconfig.debug index 2b380df95606..d76cef3fef37 100644 --- a/arch/s390/Kconfig.debug +++ b/arch/s390/Kconfig.debug | |||
@@ -31,4 +31,7 @@ config DEBUG_STRICT_USER_COPY_CHECKS | |||
31 | 31 | ||
32 | If unsure, or if you run an older (pre 4.4) gcc, say N. | 32 | If unsure, or if you run an older (pre 4.4) gcc, say N. |
33 | 33 | ||
34 | config DEBUG_SET_MODULE_RONX | ||
35 | def_bool y | ||
36 | depends on MODULES | ||
34 | endmenu | 37 | endmenu |
diff --git a/arch/s390/Makefile b/arch/s390/Makefile index d5b8a6ade525..27a0b5df5ead 100644 --- a/arch/s390/Makefile +++ b/arch/s390/Makefile | |||
@@ -80,8 +80,7 @@ endif | |||
80 | endif | 80 | endif |
81 | 81 | ||
82 | ifeq ($(call cc-option-yn,-mwarn-dynamicstack),y) | 82 | ifeq ($(call cc-option-yn,-mwarn-dynamicstack),y) |
83 | cflags-$(CONFIG_WARN_STACK) += -mwarn-dynamicstack | 83 | cflags-$(CONFIG_WARN_DYNAMIC_STACK) += -mwarn-dynamicstack |
84 | cflags-$(CONFIG_WARN_STACK) += -mwarn-framesize=$(CONFIG_WARN_STACK_SIZE) | ||
85 | endif | 84 | endif |
86 | 85 | ||
87 | KBUILD_CFLAGS += -mbackchain -msoft-float $(cflags-y) | 86 | KBUILD_CFLAGS += -mbackchain -msoft-float $(cflags-y) |
diff --git a/arch/s390/boot/compressed/Makefile b/arch/s390/boot/compressed/Makefile index 1c999f726a58..10e22c4ec4a7 100644 --- a/arch/s390/boot/compressed/Makefile +++ b/arch/s390/boot/compressed/Makefile | |||
@@ -7,7 +7,8 @@ | |||
7 | BITS := $(if $(CONFIG_64BIT),64,31) | 7 | BITS := $(if $(CONFIG_64BIT),64,31) |
8 | 8 | ||
9 | targets := vmlinux.lds vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 \ | 9 | targets := vmlinux.lds vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 \ |
10 | vmlinux.bin.lzma vmlinux.bin.lzo misc.o piggy.o sizes.h head$(BITS).o | 10 | vmlinux.bin.xz vmlinux.bin.lzma vmlinux.bin.lzo misc.o piggy.o \ |
11 | sizes.h head$(BITS).o | ||
11 | 12 | ||
12 | KBUILD_CFLAGS := -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2 | 13 | KBUILD_CFLAGS := -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2 |
13 | KBUILD_CFLAGS += $(cflags-y) | 14 | KBUILD_CFLAGS += $(cflags-y) |
@@ -48,6 +49,7 @@ suffix-$(CONFIG_KERNEL_GZIP) := gz | |||
48 | suffix-$(CONFIG_KERNEL_BZIP2) := bz2 | 49 | suffix-$(CONFIG_KERNEL_BZIP2) := bz2 |
49 | suffix-$(CONFIG_KERNEL_LZMA) := lzma | 50 | suffix-$(CONFIG_KERNEL_LZMA) := lzma |
50 | suffix-$(CONFIG_KERNEL_LZO) := lzo | 51 | suffix-$(CONFIG_KERNEL_LZO) := lzo |
52 | suffix-$(CONFIG_KERNEL_XZ) := xz | ||
51 | 53 | ||
52 | $(obj)/vmlinux.bin.gz: $(vmlinux.bin.all-y) | 54 | $(obj)/vmlinux.bin.gz: $(vmlinux.bin.all-y) |
53 | $(call if_changed,gzip) | 55 | $(call if_changed,gzip) |
@@ -57,6 +59,8 @@ $(obj)/vmlinux.bin.lzma: $(vmlinux.bin.all-y) | |||
57 | $(call if_changed,lzma) | 59 | $(call if_changed,lzma) |
58 | $(obj)/vmlinux.bin.lzo: $(vmlinux.bin.all-y) | 60 | $(obj)/vmlinux.bin.lzo: $(vmlinux.bin.all-y) |
59 | $(call if_changed,lzo) | 61 | $(call if_changed,lzo) |
62 | $(obj)/vmlinux.bin.xz: $(vmlinux.bin.all-y) | ||
63 | $(call if_changed,xzkern) | ||
60 | 64 | ||
61 | LDFLAGS_piggy.o := -r --format binary --oformat $(LD_BFD) -T | 65 | LDFLAGS_piggy.o := -r --format binary --oformat $(LD_BFD) -T |
62 | $(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix-y) | 66 | $(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix-y) |
diff --git a/arch/s390/boot/compressed/misc.c b/arch/s390/boot/compressed/misc.c index 2751b3a8a66f..028f23ea81d1 100644 --- a/arch/s390/boot/compressed/misc.c +++ b/arch/s390/boot/compressed/misc.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #undef memset | 19 | #undef memset |
20 | #undef memcpy | 20 | #undef memcpy |
21 | #undef memmove | 21 | #undef memmove |
22 | #define memmove memmove | ||
22 | #define memzero(s, n) memset((s), 0, (n)) | 23 | #define memzero(s, n) memset((s), 0, (n)) |
23 | 24 | ||
24 | /* Symbols defined by linker scripts */ | 25 | /* Symbols defined by linker scripts */ |
@@ -54,6 +55,10 @@ static unsigned long free_mem_end_ptr; | |||
54 | #include "../../../../lib/decompress_unlzo.c" | 55 | #include "../../../../lib/decompress_unlzo.c" |
55 | #endif | 56 | #endif |
56 | 57 | ||
58 | #ifdef CONFIG_KERNEL_XZ | ||
59 | #include "../../../../lib/decompress_unxz.c" | ||
60 | #endif | ||
61 | |||
57 | extern _sclp_print_early(const char *); | 62 | extern _sclp_print_early(const char *); |
58 | 63 | ||
59 | int puts(const char *s) | 64 | int puts(const char *s) |
diff --git a/arch/s390/include/asm/cacheflush.h b/arch/s390/include/asm/cacheflush.h index 7e1f77620624..43a5c78046db 100644 --- a/arch/s390/include/asm/cacheflush.h +++ b/arch/s390/include/asm/cacheflush.h | |||
@@ -8,4 +8,8 @@ | |||
8 | void kernel_map_pages(struct page *page, int numpages, int enable); | 8 | void kernel_map_pages(struct page *page, int numpages, int enable); |
9 | #endif | 9 | #endif |
10 | 10 | ||
11 | int set_memory_ro(unsigned long addr, int numpages); | ||
12 | int set_memory_rw(unsigned long addr, int numpages); | ||
13 | int set_memory_nx(unsigned long addr, int numpages); | ||
14 | |||
11 | #endif /* _S390_CACHEFLUSH_H */ | 15 | #endif /* _S390_CACHEFLUSH_H */ |
diff --git a/arch/s390/kernel/machine_kexec.c b/arch/s390/kernel/machine_kexec.c index a922d51df6bf..b09b9c62573e 100644 --- a/arch/s390/kernel/machine_kexec.c +++ b/arch/s390/kernel/machine_kexec.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/kexec.h> | 12 | #include <linux/kexec.h> |
13 | #include <linux/delay.h> | 13 | #include <linux/delay.h> |
14 | #include <linux/reboot.h> | 14 | #include <linux/reboot.h> |
15 | #include <linux/ftrace.h> | ||
15 | #include <asm/cio.h> | 16 | #include <asm/cio.h> |
16 | #include <asm/setup.h> | 17 | #include <asm/setup.h> |
17 | #include <asm/pgtable.h> | 18 | #include <asm/pgtable.h> |
@@ -71,6 +72,7 @@ static void __machine_kexec(void *data) | |||
71 | 72 | ||
72 | void machine_kexec(struct kimage *image) | 73 | void machine_kexec(struct kimage *image) |
73 | { | 74 | { |
75 | tracer_disable(); | ||
74 | smp_send_stop(); | 76 | smp_send_stop(); |
75 | smp_switch_to_ipl_cpu(__machine_kexec, image); | 77 | smp_switch_to_ipl_cpu(__machine_kexec, image); |
76 | } | 78 | } |
diff --git a/arch/s390/mm/Makefile b/arch/s390/mm/Makefile index 6fbc6f3fbdf2..d98fe9004a52 100644 --- a/arch/s390/mm/Makefile +++ b/arch/s390/mm/Makefile | |||
@@ -6,3 +6,4 @@ obj-y := init.o fault.o extmem.o mmap.o vmem.o pgtable.o maccess.o \ | |||
6 | page-states.o gup.o | 6 | page-states.o gup.o |
7 | obj-$(CONFIG_CMM) += cmm.o | 7 | obj-$(CONFIG_CMM) += cmm.o |
8 | obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o | 8 | obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o |
9 | obj-$(CONFIG_DEBUG_SET_MODULE_RONX) += pageattr.o | ||
diff --git a/arch/s390/mm/pageattr.c b/arch/s390/mm/pageattr.c new file mode 100644 index 000000000000..122ffbd08ce0 --- /dev/null +++ b/arch/s390/mm/pageattr.c | |||
@@ -0,0 +1,55 @@ | |||
1 | /* | ||
2 | * Copyright IBM Corp. 2011 | ||
3 | * Author(s): Jan Glauber <jang@linux.vnet.ibm.com> | ||
4 | */ | ||
5 | #include <linux/module.h> | ||
6 | #include <linux/mm.h> | ||
7 | #include <linux/hugetlb.h> | ||
8 | #include <asm/pgtable.h> | ||
9 | |||
10 | static void change_page_attr(unsigned long addr, int numpages, | ||
11 | pte_t (*set) (pte_t)) | ||
12 | { | ||
13 | pte_t *ptep, pte; | ||
14 | pmd_t *pmdp; | ||
15 | pud_t *pudp; | ||
16 | pgd_t *pgdp; | ||
17 | int i; | ||
18 | |||
19 | for (i = 0; i < numpages; i++) { | ||
20 | pgdp = pgd_offset(&init_mm, addr); | ||
21 | pudp = pud_offset(pgdp, addr); | ||
22 | pmdp = pmd_offset(pudp, addr); | ||
23 | if (pmd_huge(*pmdp)) { | ||
24 | WARN_ON_ONCE(1); | ||
25 | continue; | ||
26 | } | ||
27 | ptep = pte_offset_kernel(pmdp, addr + i * PAGE_SIZE); | ||
28 | |||
29 | pte = *ptep; | ||
30 | pte = set(pte); | ||
31 | ptep_invalidate(&init_mm, addr + i * PAGE_SIZE, ptep); | ||
32 | *ptep = pte; | ||
33 | } | ||
34 | } | ||
35 | |||
36 | int set_memory_ro(unsigned long addr, int numpages) | ||
37 | { | ||
38 | change_page_attr(addr, numpages, pte_wrprotect); | ||
39 | return 0; | ||
40 | } | ||
41 | EXPORT_SYMBOL_GPL(set_memory_ro); | ||
42 | |||
43 | int set_memory_rw(unsigned long addr, int numpages) | ||
44 | { | ||
45 | change_page_attr(addr, numpages, pte_mkwrite); | ||
46 | return 0; | ||
47 | } | ||
48 | EXPORT_SYMBOL_GPL(set_memory_rw); | ||
49 | |||
50 | /* not possible */ | ||
51 | int set_memory_nx(unsigned long addr, int numpages) | ||
52 | { | ||
53 | return 0; | ||
54 | } | ||
55 | EXPORT_SYMBOL_GPL(set_memory_nx); | ||