2 * Copyright (C) 1995-2001 Russell King
3 * 2001-2002 Keith Owens
6 * Generate definitions needed by assembly language modules.
7 * This code generates raw asm output which is post-processed to extract
8 * and format the required data.
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
15 #include <linux/config.h>
16 #include <linux/sched.h>
19 #include <asm/pgtable.h>
20 #include <asm/uaccess.h>
23 * Make sure that the compiler and target are compatible.
25 #if defined(__APCS_32__) && defined(CONFIG_CPU_26)
26 #error Sorry, your compiler targets APCS-32 but this kernel requires APCS-26
28 #if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 95)
29 #error Sorry, your compiler is known to miscompile kernels. Only use gcc 2.95.3 and later.
31 #if __GNUC__ == 2 && __GNUC_MINOR__ == 95
32 /* shame we can't detect the .1 or .2 releases */
33 #warning GCC 2.95.2 and earlier miscompiles kernels.
36 /* Use marker if you need to separate the values later */
38 #define DEFINE(sym, val) \
39 asm volatile("\n->" #sym " %0 " #val : : "i" (val))
41 #define BLANK() asm volatile("\n->" : : )
45 DEFINE(TSK_ACTIVE_MM, offsetof(struct task_struct, active_mm));
47 DEFINE(VMA_VM_MM, offsetof(struct vm_area_struct, vm_mm));
48 DEFINE(VMA_VM_FLAGS, offsetof(struct vm_area_struct, vm_flags));
50 DEFINE(VM_EXEC, VM_EXEC);
53 DEFINE(PAGE_PRESENT, _PAGE_PRESENT);
54 DEFINE(PAGE_READONLY, _PAGE_READONLY);
55 DEFINE(PAGE_NOT_USER, _PAGE_NOT_USER);
56 DEFINE(PAGE_OLD, _PAGE_OLD);
57 DEFINE(PAGE_CLEAN, _PAGE_CLEAN);
59 DEFINE(PAGE_SZ, PAGE_SIZE);
61 DEFINE(SYS_ERROR0, 0x9f0000);