fix to allow usb modules to compile
[linux-2.4.21-pre4.git] / arch / ppc / kernel / checks.c
1 /*
2  * BK Id: SCCS/s.checks.c 1.9 11/16/01 12:28:23 dgibson
3  */
4 #include <linux/errno.h>
5 #include <linux/sched.h>
6 #include <linux/kernel.h>
7 #include <linux/mm.h>
8 #include <linux/smp.h>
9 #include <linux/smp_lock.h>
10 #include <linux/stddef.h>
11 #include <linux/unistd.h>
12 #include <linux/ptrace.h>
13 #include <linux/slab.h>
14 #include <linux/user.h>
15 #include <linux/a.out.h>
16
17 #include <asm/pgtable.h>
18 #include <asm/uaccess.h>
19 #include <asm/system.h>
20 #include <asm/io.h>
21
22 int printf(const char *, ...);
23
24 /*
25  * Do various before compile checks of data structures
26  * -- Cort
27  */
28 int main(void)
29 {
30         int ret = 0;
31 #if 0
32         if ( sizeof(struct thread_struct) % 16 )
33         {
34                 printf("Thread struct is not modulo 16 bytes: "
35                         "%d bytes total, %d bytes off\n",
36                         sizeof(struct thread_struct),
37                         sizeof(struct thread_struct)%16);
38                 ret = -1;
39         }
40 #endif  
41
42         if ( sizeof(struct pt_regs) % 16 )
43         {
44                 printf("pt_regs struct is not modulo 16 bytes: "
45                         "%d bytes total, %d bytes off\n",
46                         sizeof(struct pt_regs),
47                         sizeof(struct pt_regs)%16);
48                 ret = -1;
49                 
50         }
51
52         printf("Task size        : %d bytes\n"
53                "Tss size         : %d bytes\n"
54                "pt_regs size     : %d bytes\n"
55                "Kernel stack size: %d bytes\n",
56                sizeof(struct task_struct), sizeof(struct thread_struct),
57                sizeof(struct pt_regs),
58                sizeof(union task_union) - sizeof(struct task_struct));
59         return ret;
60 }