Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Christoph Lameter | 37487a5 | 2008-04-29 01:03:49 -0700 | [diff] [blame] | 2 | #ifndef __LINUX_KBUILD_H |
| 3 | #define __LINUX_KBUILD_H |
| 4 | |
| 5 | #define DEFINE(sym, val) \ |
Jeroen Hofstee | cf0c3e6 | 2017-04-21 15:21:11 +0900 | [diff] [blame] | 6 | asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val)) |
Christoph Lameter | 37487a5 | 2008-04-29 01:03:49 -0700 | [diff] [blame] | 7 | |
Jeroen Hofstee | cf0c3e6 | 2017-04-21 15:21:11 +0900 | [diff] [blame] | 8 | #define BLANK() asm volatile("\n.ascii \"->\"" : : ) |
Christoph Lameter | 37487a5 | 2008-04-29 01:03:49 -0700 | [diff] [blame] | 9 | |
| 10 | #define OFFSET(sym, str, mem) \ |
| 11 | DEFINE(sym, offsetof(struct str, mem)) |
| 12 | |
| 13 | #define COMMENT(x) \ |
Jeroen Hofstee | cf0c3e6 | 2017-04-21 15:21:11 +0900 | [diff] [blame] | 14 | asm volatile("\n.ascii \"->#" x "\"") |
Christoph Lameter | 37487a5 | 2008-04-29 01:03:49 -0700 | [diff] [blame] | 15 | |
| 16 | #endif |