Skip to content

Commit

Permalink
add noinline_for_stack
Browse files Browse the repository at this point in the history
People are adding `noinline' in various places to prevent excess stack
consumption due to gcc inlining.  But once this is done, it is quite unobvious
why the `noinline' is present in the code.  We can comment each and every
site, or we can use noinline_for_stack.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed Mar 5, 2008
1 parent e8ed857 commit 735c4fb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/linux/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,12 @@ extern void __chk_io_ptr(const volatile void __iomem *);
#define noinline
#endif

/*
* Rather then using noinline to prevent stack consumption, use
* noinline_for_stack instead. For documentaiton reasons.
*/
#define noinline_for_stack noinline

#ifndef __always_inline
#define __always_inline inline
#endif
Expand Down

0 comments on commit 735c4fb

Please sign in to comment.