Commit 37487a56 authored by Christoph Lameter's avatar Christoph Lameter Committed by Linus Torvalds

Add kbuild.h that contains common definitions for kbuild users

The same definitions are used for the bounds logic and the asm-offsets.h
generation by kbuild.  Put them into include/linux/kbuild.h file.

Also add a new feature


which can be used to insert lines of ocmments into asm-offsets.h and

Cc: Sam Ravnborg <>
Signed-off-by: default avatarChristoph Lameter <>
Cc: Ingo Molnar <>
Cc: Thomas Gleixner <>
Cc: Ralf Baechle <>
Cc: Jay Estabrook <>
Cc: Ivan Kokshaysky <>
Cc: Richard Henderson <>
Cc: "Luck, Tony" <>
Cc: Russell King <>
Cc: Chris Zankel <>
Cc: David S. Miller <>
Cc: Haavard Skinnemoen <>
Cc: Bryan Wu <>
Cc: Mike Frysinger <>
Cc: Yoshinori Sato <>
Cc: Geert Uytterhoeven <>
Cc: Roman Zippel <>
Cc: Greg Ungerer <>
Cc: David Howells <>
Cc: Kyle McMartin <>
Cc: Grant Grundler <>
Cc: Matthew Wilcox <>
Cc: Paul Mackerras <>
Cc: Benjamin Herrenschmidt <>
Cc: Martin Schwidefsky <>
Cc: Heiko Carstens <>
Cc: Paul Mundt <>
Cc: Miles Bader <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 39fa0031
#ifndef __LINUX_KBUILD_H
#define __LINUX_KBUILD_H
#define DEFINE(sym, val) \
asm volatile("\n->" #sym " %0 " #val : : "i" (val))
#define BLANK() asm volatile("\n->" : : )
#define OFFSET(sym, str, mem) \
DEFINE(sym, offsetof(struct str, mem))
#define COMMENT(x) \
asm volatile("\n->#" x)
......@@ -8,11 +8,7 @@
/* Include headers that define the enum constants of interest */
#include <linux/page-flags.h>
#include <linux/mmzone.h>
#define DEFINE(sym, val) \
asm volatile("\n->" #sym " %0 " #val : : "i" (val))
#define BLANK() asm volatile("\n->" : : )
#include <linux/kbuild.h>
void foo(void)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment