Linux Kernel
3.7.1
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
arch
s390
include
asm
io.h
Go to the documentation of this file.
1
/*
2
* S390 version
3
* Copyright IBM Corp. 1999
4
* Author(s): Martin Schwidefsky (
[email protected]
)
5
*
6
* Derived from "include/asm-i386/io.h"
7
*/
8
9
#ifndef _S390_IO_H
10
#define _S390_IO_H
11
12
#include <asm/page.h>
13
14
#define IO_SPACE_LIMIT 0xffffffff
15
16
/*
17
* Change virtual addresses to physical addresses and vv.
18
* These are pretty trivial
19
*/
20
static
inline
unsigned
long
virt_to_phys
(
volatile
void
*
address
)
21
{
22
unsigned
long
real_address;
23
asm
volatile
(
24
" lra %0,0(%1)\n"
25
" jz 0f\n"
26
" la %0,0\n"
27
"0:"
28
:
"=a"
(real_address) :
"a"
(address) :
"cc"
);
29
return
real_address;
30
}
31
32
static
inline
void
*
phys_to_virt
(
unsigned
long
address
)
33
{
34
return
(
void
*)
address
;
35
}
36
37
void
*
xlate_dev_mem_ptr
(
unsigned
long
phys
);
38
void
unxlate_dev_mem_ptr
(
unsigned
long
phys
,
void
*
addr
);
39
40
/*
41
* Convert a virtual cached pointer to an uncached pointer
42
*/
43
#define xlate_dev_kmem_ptr(p) p
44
45
#endif
Generated on Thu Jan 10 2013 12:49:48 for Linux Kernel by
1.8.2