Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[S390] remove redundant stack check option

Newer gcc versions offer an architecture-independent option to check
the stack size and warn if it reaches a certain limit. This option
already existed for s390 by using -mwarn-dynamicstack. Since one
stack check option is enough remove the s390 specific stack check
but keep the option that warns about dynamic stack usage because
that is not covered by the generic option.

Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>

authored by

Jan Glauber and committed by
Martin Schwidefsky
2c190da4 521cb40b

+6 -17
+5 -15
arch/s390/Kconfig
··· 341 341 The minimum size for the stack guard should be 256 for 31 bit and 342 342 512 for 64 bit. 343 343 344 - config WARN_STACK 344 + config WARN_DYNAMIC_STACK 345 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 347 help 348 - This option enables the compiler options -mwarn-framesize and 349 - -mwarn-dynamicstack. If the compiler supports these options it 350 - will generate warnings for function which either use alloca or 351 - create a stack frame bigger than CONFIG_WARN_STACK_SIZE. 348 + This option enables the compiler option -mwarn-dynamicstack. If the 349 + compiler supports this options generates warnings for functions 350 + that dynamically allocate stack space using alloca. 352 351 353 352 Say N if you are unsure. 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 353 364 354 config ARCH_POPULATES_NODE_MAP 365 355 def_bool y
+1 -2
arch/s390/Makefile
··· 80 80 endif 81 81 82 82 ifeq ($(call cc-option-yn,-mwarn-dynamicstack),y) 83 - cflags-$(CONFIG_WARN_STACK) += -mwarn-dynamicstack 84 - cflags-$(CONFIG_WARN_STACK) += -mwarn-framesize=$(CONFIG_WARN_STACK_SIZE) 83 + cflags-$(CONFIG_WARN_DYNAMIC_STACK) += -mwarn-dynamicstack 85 84 endif 86 85 87 86 KBUILD_CFLAGS += -mbackchain -msoft-float $(cflags-y)