diff options
-rw-r--r-- | arch/s390/Kconfig | 20 | ||||
-rw-r--r-- | arch/s390/Makefile | 3 |
2 files changed, 6 insertions, 17 deletions
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index 636bcb81d068..271a02f821c0 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig | |||
@@ -341,26 +341,16 @@ config STACK_GUARD | |||
341 | The minimum size for the stack guard should be 256 for 31 bit and | 341 | The minimum size for the stack guard should be 256 for 31 bit and |
342 | 512 for 64 bit. | 342 | 512 for 64 bit. |
343 | 343 | ||
344 | config WARN_STACK | 344 | config WARN_DYNAMIC_STACK |
345 | def_bool n | 345 | def_bool n |
346 | prompt "Emit compiler warnings for function with broken stack usage" | 346 | prompt "Emit compiler warnings for function with dynamic stack usage" |
347 | help | 347 | help |
348 | This option enables the compiler options -mwarn-framesize and | 348 | This option enables the compiler option -mwarn-dynamicstack. If the |
349 | -mwarn-dynamicstack. If the compiler supports these options it | 349 | compiler supports this options generates warnings for functions |
350 | will generate warnings for function which either use alloca or | 350 | that dynamically allocate stack space using alloca. |
351 | create a stack frame bigger than CONFIG_WARN_STACK_SIZE. | ||
352 | 351 | ||
353 | Say N if you are unsure. | 352 | Say N if you are unsure. |
354 | 353 | ||
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 | 354 | config ARCH_POPULATES_NODE_MAP |
365 | def_bool y | 355 | def_bool y |
366 | 356 | ||
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) |