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

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [uclinux/] [uClinux-2.0.x/] [fs/] [umsdos/] [check.c] - Blame information for rev 1765

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 199 simons
/*
2
 * linux/fs/umsdos/check.c
3
 *
4
 *
5
 */
6
 
7
#include <linux/signal.h>
8
#include <linux/sched.h>
9
#include <linux/head.h>
10
#include <linux/kernel.h>
11
#include <linux/errno.h>
12
#include <linux/string.h>
13
#include <linux/types.h>
14
#include <linux/ptrace.h>
15
#include <linux/mman.h>
16
#include <linux/mm.h>
17
 
18
#include <asm/system.h>
19
 
20
static int check_one_table(struct pde * page_dir)
21
{
22
        if (pgd_none(*page_dir))
23
                return 0;
24
        if (pgd_bad(*page_dir))
25
                return 1;
26
        return 0;
27
}
28
 
29
/*
30
 * This function checks all page tables of "current"
31
 */
32
void check_page_tables(void)
33
{
34
        struct pgd * pg_dir;
35
        static int err = 0;
36
 
37
        int stack_level = (long)(&pg_dir)-current->kernel_stack_page;
38
        if (stack_level < 1500) printk ("** %d ** ",stack_level);
39
        pg_dir = PAGE_DIR_OFFSET(current, 0);
40
        if (err == 0) {
41
                int i;
42
                for (i = 0 ; i < PTRS_PER_PAGE ; i++,page_dir++){
43
                        int notok = check_one_table(page_dir);
44
                        if (notok){
45
                                err++;
46
                                printk ("|%d:%08lx| ",i, page_dir->pgd);
47
                        }
48
                }
49
                if (err) printk ("\nErreur MM %d\n",err);
50
        }
51
}

powered by: WebSVN 2.1.0

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