aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kernel.h
diff options
context:
space:
mode:
authorWANG Cong <xiyou.wangcong@gmail.com>2011-07-25 20:13:02 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-07-25 23:57:14 -0400
commit9d00f92f437f0ff682876cab9f2d94cf3b6e5d17 (patch)
treec5557822a4cdd93336cfacb08e14dde163a1855a /include/linux/kernel.h
parenta0e44d4a7a3935afe425ec8dd1a5b63895e1f9c3 (diff)
include/linux/kernel.h: fix a headers_check warning
Fix the warning: usr/include/linux/kernel.h:65: userspace cannot reference function or variable defined in the kernel As Michal noted, BUILD_BUG_ON stuffs should be moved under #ifdef __KERNEL__. Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com> Cc: Michal Marek <mmarek@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/kernel.h')
-rw-r--r--include/linux/kernel.h47
1 files changed, 24 insertions, 23 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 567a6f7bbeed..bf66f068368b 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -646,29 +646,6 @@ static inline void ftrace_dump(enum ftrace_dump_mode oops_dump_mode) { }
646 const typeof( ((type *)0)->member ) *__mptr = (ptr); \ 646 const typeof( ((type *)0)->member ) *__mptr = (ptr); \
647 (type *)( (char *)__mptr - offsetof(type,member) );}) 647 (type *)( (char *)__mptr - offsetof(type,member) );})
648 648
649struct sysinfo;
650extern int do_sysinfo(struct sysinfo *info);
651
652#endif /* __KERNEL__ */
653
654#define SI_LOAD_SHIFT 16
655struct sysinfo {
656 long uptime; /* Seconds since boot */
657 unsigned long loads[3]; /* 1, 5, and 15 minute load averages */
658 unsigned long totalram; /* Total usable main memory size */
659 unsigned long freeram; /* Available memory size */
660 unsigned long sharedram; /* Amount of shared memory */
661 unsigned long bufferram; /* Memory used by buffers */
662 unsigned long totalswap; /* Total swap space size */
663 unsigned long freeswap; /* swap space still available */
664 unsigned short procs; /* Number of current processes */
665 unsigned short pad; /* explicit padding for m68k */
666 unsigned long totalhigh; /* Total high memory size */
667 unsigned long freehigh; /* Available high memory size */
668 unsigned int mem_unit; /* Memory unit size in bytes */
669 char _f[20-2*sizeof(long)-sizeof(int)]; /* Padding: libc5 uses this.. */
670};
671
672#ifdef __CHECKER__ 649#ifdef __CHECKER__
673#define BUILD_BUG_ON_NOT_POWER_OF_2(n) 650#define BUILD_BUG_ON_NOT_POWER_OF_2(n)
674#define BUILD_BUG_ON_ZERO(e) (0) 651#define BUILD_BUG_ON_ZERO(e) (0)
@@ -714,6 +691,30 @@ extern int __build_bug_on_failed;
714#endif 691#endif
715#endif /* __CHECKER__ */ 692#endif /* __CHECKER__ */
716 693
694
695struct sysinfo;
696extern int do_sysinfo(struct sysinfo *info);
697
698#endif /* __KERNEL__ */
699
700#define SI_LOAD_SHIFT 16
701struct sysinfo {
702 long uptime; /* Seconds since boot */
703 unsigned long loads[3]; /* 1, 5, and 15 minute load averages */
704 unsigned long totalram; /* Total usable main memory size */
705 unsigned long freeram; /* Available memory size */
706 unsigned long sharedram; /* Amount of shared memory */
707 unsigned long bufferram; /* Memory used by buffers */
708 unsigned long totalswap; /* Total swap space size */
709 unsigned long freeswap; /* swap space still available */
710 unsigned short procs; /* Number of current processes */
711 unsigned short pad; /* explicit padding for m68k */
712 unsigned long totalhigh; /* Total high memory size */
713 unsigned long freehigh; /* Available high memory size */
714 unsigned int mem_unit; /* Memory unit size in bytes */
715 char _f[20-2*sizeof(long)-sizeof(int)]; /* Padding: libc5 uses this.. */
716};
717
717/* Trap pasters of __FUNCTION__ at compile-time */ 718/* Trap pasters of __FUNCTION__ at compile-time */
718#define __FUNCTION__ (__func__) 719#define __FUNCTION__ (__func__)
719 720