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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rc203soc/] [sw/] [uClinux/] [mmnommu/] [vmalloc.c] - Blame information for rev 1777

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

Line No. Rev Author Line
1 1634 jcastillo
/*
2
 *  linux/mm/vmalloc.c
3
 *
4
 *  Copyright (C) 1993  Linus Torvalds
5
 */
6
 
7
/*
8
 * uClinux revisions for NO_MM
9
 * Copyright (C) 1998  Kenneth Albanowski <kjahds@kjahds.com>,
10
 *                     The Silver Hammer Group, Ltd.
11
 * Copyright (C) 1999  D. Jeff Dionne <jeff@uclinux.org>,
12
 *                     Rt-Control, Inc.
13
 */
14
 
15
#include <asm/system.h>
16
 
17
#include <linux/signal.h>
18
#include <linux/sched.h>
19
#include <linux/head.h>
20
#include <linux/kernel.h>
21
#include <linux/errno.h>
22
#include <linux/types.h>
23
#include <linux/malloc.h>
24
#include <linux/mm.h>
25
 
26
/*
27
 * These routines just punt in a flat address space
28
 */
29
 
30
void vfree(void * addr)
31
{
32
        kfree(addr);
33
}
34
 
35
void * vmalloc(unsigned long size)
36
{
37
        return kmalloc(size, GFP_KERNEL);
38
}
39
 
40
/*
41
 * In a flat address space, there is no translation needed
42
 */
43
void * vremap(unsigned long offset, unsigned long size)
44
{
45
        return (void*)offset;
46
}
47
 
48
int vread(char *buf, char *addr, int count)
49
{
50
        memcpy_tofs(buf, addr, count);
51
        return count;
52
}

powered by: WebSVN 2.1.0

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