OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [arch/] [ppc64/] [kernel/] [checks.c] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1275 phoenix
/*
2
 * Copyright 2001 PPC 64 Team, IBM Corp
3
 *
4
 * This program is free software; you can redistribute it and/or
5
 * modify it under the terms of the GNU General Public License
6
 * as published by the Free Software Foundation; either version
7
 * 2 of the License, or (at your option) any later version.
8
 */
9
 
10
#include <linux/errno.h>
11
#include <linux/sched.h>
12
#include <linux/kernel.h>
13
#include <linux/mm.h>
14
#include <linux/smp.h>
15
#include <linux/smp_lock.h>
16
#include <linux/stddef.h>
17
#include <linux/unistd.h>
18
#include <linux/ptrace.h>
19
#include <linux/slab.h>
20
#include <linux/user.h>
21
#include <linux/a.out.h>
22
 
23
#include <asm/pgtable.h>
24
#include <asm/uaccess.h>
25
#include <asm/system.h>
26
#include <asm/io.h>
27
 
28
/*
29
 * Do various before compile checks of data structures
30
 *
31
 * This is invoked when you do a make checks
32
 * Is this enough or are there more things that we would like to do here?
33
 * -- tgall
34
 */
35
int main(void)
36
{
37
        int ret = 0;
38
#if 0
39
        if ( sizeof(struct thread_struct) % 16 )
40
        {
41
                printf("Thread struct is not modulo 16 bytes: "
42
                        "%d bytes total, %d bytes off\n",
43
                        sizeof(struct thread_struct),
44
                        sizeof(struct thread_struct)%16);
45
                ret = -1;
46
        }
47
#endif  
48
 
49
        if ( sizeof(struct pt_regs) % 16 )
50
        {
51
                printf("pt_regs struct is not modulo 16 bytes: "
52
                        "%d bytes total, %d bytes off\n",
53
                        sizeof(struct pt_regs),
54
                        sizeof(struct pt_regs)%16);
55
                ret = -1;
56
 
57
        }
58
 
59
        printf("Task size        : %d bytes\n"
60
               "Tss size         : %d bytes\n"
61
               "pt_regs size     : %d bytes\n"
62
               "Kernel stack size: %d bytes\n",
63
               sizeof(struct task_struct), sizeof(struct thread_struct),
64
               sizeof(struct pt_regs),
65
               sizeof(union task_union) - sizeof(struct task_struct));
66
        return ret;
67
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.