Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
xcap
xcap-capability-linux
Commits
7ef4de17
Commit
7ef4de17
authored
Nov 28, 2008
by
Russell King
Committed by
Russell King
Nov 28, 2008
Browse files
Merge branch 'highmem' into devel
Conflicts: arch/arm/mach-clps7500/include/mach/memory.h
parents
f412b09f
b5ee9002
Changes
67
Hide whitespace changes
Inline
Side-by-side
arch/arm/include/asm/memory.h
View file @
7ef4de17
...
...
@@ -112,10 +112,8 @@
* private definitions which should NOT be used outside memory.h
* files. Use virt_to_phys/phys_to_virt/__pa/__va instead.
*/
#ifndef __virt_to_phys
#define __virt_to_phys(x) ((x) - PAGE_OFFSET + PHYS_OFFSET)
#define __phys_to_virt(x) ((x) - PHYS_OFFSET + PAGE_OFFSET)
#endif
/*
* Convert a physical address to a Page Frame Number and back
...
...
@@ -180,6 +178,11 @@ static inline void *phys_to_virt(unsigned long x)
* memory. Use of these is *deprecated* (and that doesn't mean
* use the __ prefixed forms instead.) See dma-mapping.h.
*/
#ifndef __virt_to_bus
#define __virt_to_bus __virt_to_phys
#define __bus_to_virt __phys_to_virt
#endif
static
inline
__deprecated
unsigned
long
virt_to_bus
(
void
*
x
)
{
return
__virt_to_bus
((
unsigned
long
)
x
);
...
...
arch/arm/include/asm/page.h
View file @
7ef4de17
...
...
@@ -108,30 +108,36 @@
#error Unknown user operations model
#endif
struct
page
;
struct
cpu_user_fns
{
void
(
*
cpu_clear_user_page
)(
void
*
p
,
unsigned
long
use
r
);
void
(
*
cpu_copy_user_page
)(
void
*
to
,
const
void
*
from
,
unsigned
long
use
r
);
void
(
*
cpu_clear_user_
high
page
)(
struct
page
*
page
,
unsigned
long
vadd
r
);
void
(
*
cpu_copy_user_
high
page
)(
struct
page
*
to
,
struct
page
*
from
,
unsigned
long
vadd
r
);
};
#ifdef MULTI_USER
extern
struct
cpu_user_fns
cpu_user
;
#define __cpu_clear_user_page cpu_user.cpu_clear_user_page
#define __cpu_copy_user_page cpu_user.cpu_copy_user_page
#define __cpu_clear_user_
high
page cpu_user.cpu_clear_user_
high
page
#define __cpu_copy_user_
high
page cpu_user.cpu_copy_user_
high
page
#else
#define __cpu_clear_user_page __glue(_USER,_clear_user_page)
#define __cpu_copy_user_page __glue(_USER,_copy_user_page)
#define __cpu_clear_user_
high
page __glue(_USER,_clear_user_
high
page)
#define __cpu_copy_user_
high
page __glue(_USER,_copy_user_
high
page)
extern
void
__cpu_clear_user_page
(
void
*
p
,
unsigned
long
use
r
);
extern
void
__cpu_copy_user_page
(
void
*
to
,
const
void
*
from
,
unsigned
long
use
r
);
extern
void
__cpu_clear_user_
high
page
(
struct
page
*
page
,
unsigned
long
vadd
r
);
extern
void
__cpu_copy_user_
high
page
(
struct
page
*
to
,
struct
page
*
from
,
unsigned
long
vadd
r
);
#endif
#define clear_user_page(addr,vaddr,pg) __cpu_clear_user_page(addr, vaddr)
#define copy_user_page(to,from,vaddr,pg) __cpu_copy_user_page(to, from, vaddr)
#define clear_user_highpage(page,vaddr) \
__cpu_clear_user_highpage(page, vaddr)
#define __HAVE_ARCH_COPY_USER_HIGHPAGE
#define copy_user_highpage(to,from,vaddr,vma) \
__cpu_copy_user_highpage(to, from, vaddr)
#define clear_page(page) memset((void *)(page), 0, PAGE_SIZE)
extern
void
copy_page
(
void
*
to
,
const
void
*
from
);
...
...
arch/arm/include/asm/setup.h
View file @
7ef4de17
...
...
@@ -209,9 +209,11 @@ struct meminfo {
struct
membank
bank
[
NR_BANKS
];
};
extern
struct
meminfo
meminfo
;
#define for_each_nodebank(iter,mi,no) \
for (iter = 0; iter < mi->nr_banks; iter++) \
if (mi->bank[iter].node == no)
for (iter = 0; iter <
(
mi
)
->nr_banks; iter++) \
if
(
(mi
)
->bank[iter].node == no)
#define bank_pfn_start(bank) __phys_to_pfn((bank)->start)
#define bank_pfn_end(bank) __phys_to_pfn((bank)->start + (bank)->size)
...
...
arch/arm/kernel/setup.c
View file @
7ef4de17
...
...
@@ -59,7 +59,7 @@ static int __init fpe_setup(char *line)
__setup
(
"fpe="
,
fpe_setup
);
#endif
extern
void
paging_init
(
struct
meminfo
*
,
struct
machine_desc
*
desc
);
extern
void
paging_init
(
struct
machine_desc
*
desc
);
extern
void
reboot_setup
(
char
*
str
);
extern
void
_text
,
_etext
,
__data_start
,
_edata
,
_end
;
...
...
@@ -112,7 +112,6 @@ static struct stack stacks[NR_CPUS];
char
elf_platform
[
ELF_PLATFORM_SIZE
];
EXPORT_SYMBOL
(
elf_platform
);
static
struct
meminfo
meminfo
__initdata
=
{
0
,
};
static
const
char
*
cpu_name
;
static
const
char
*
machine_name
;
static
char
__initdata
command_line
[
COMMAND_LINE_SIZE
];
...
...
@@ -367,21 +366,34 @@ static struct machine_desc * __init setup_machine(unsigned int nr)
return
list
;
}
static
void
__init
arm_add_memory
(
unsigned
long
start
,
unsigned
long
size
)
static
int
__init
arm_add_memory
(
unsigned
long
start
,
unsigned
long
size
)
{
struct
membank
*
bank
;
struct
membank
*
bank
=
&
meminfo
.
bank
[
meminfo
.
nr_banks
];
if
(
meminfo
.
nr_banks
>=
NR_BANKS
)
{
printk
(
KERN_CRIT
"NR_BANKS too low, "
"ignoring memory at %#lx
\n
"
,
start
);
return
-
EINVAL
;
}
/*
* Ensure that start/size are aligned to a page boundary.
* Size is appropriately rounded down, start is rounded up.
*/
size
-=
start
&
~
PAGE_MASK
;
bank
=
&
meminfo
.
bank
[
meminfo
.
nr_banks
++
];
bank
->
start
=
PAGE_ALIGN
(
start
);
bank
->
size
=
size
&
PAGE_MASK
;
bank
->
node
=
PHYS_TO_NID
(
start
);
/*
* Check whether this memory region has non-zero size or
* invalid node number.
*/
if
(
bank
->
size
==
0
||
bank
->
node
>=
MAX_NUMNODES
)
return
-
EINVAL
;
meminfo
.
nr_banks
++
;
return
0
;
}
/*
...
...
@@ -539,14 +551,7 @@ __tagtable(ATAG_CORE, parse_tag_core);
static
int
__init
parse_tag_mem32
(
const
struct
tag
*
tag
)
{
if
(
meminfo
.
nr_banks
>=
NR_BANKS
)
{
printk
(
KERN_WARNING
"Ignoring memory bank 0x%08x size %dKB
\n
"
,
tag
->
u
.
mem
.
start
,
tag
->
u
.
mem
.
size
/
1024
);
return
-
EINVAL
;
}
arm_add_memory
(
tag
->
u
.
mem
.
start
,
tag
->
u
.
mem
.
size
);
return
0
;
return
arm_add_memory
(
tag
->
u
.
mem
.
start
,
tag
->
u
.
mem
.
size
);
}
__tagtable
(
ATAG_MEM
,
parse_tag_mem32
);
...
...
@@ -718,7 +723,7 @@ void __init setup_arch(char **cmdline_p)
memcpy
(
boot_command_line
,
from
,
COMMAND_LINE_SIZE
);
boot_command_line
[
COMMAND_LINE_SIZE
-
1
]
=
'\0'
;
parse_cmdline
(
cmdline_p
,
from
);
paging_init
(
&
meminfo
,
mdesc
);
paging_init
(
mdesc
);
request_standard_resources
(
&
meminfo
,
mdesc
);
#ifdef CONFIG_SMP
...
...
arch/arm/mach-aaec2000/include/mach/memory.h
View file @
7ef4de17
...
...
@@ -14,9 +14,6 @@
#define PHYS_OFFSET UL(0xf0000000)
#define __virt_to_bus(x) __virt_to_phys(x)
#define __bus_to_virt(x) __phys_to_virt(x)
/*
* The nodes are the followings:
*
...
...
arch/arm/mach-at91/include/mach/memory.h
View file @
7ef4de17
...
...
@@ -25,15 +25,4 @@
#define PHYS_OFFSET (AT91_SDRAM_BASE)
/*
* Virtual view <-> DMA view memory address translations
* virt_to_bus: Used to translate the virtual address to an
* address suitable to be passed to set_dma_addr
* bus_to_virt: Used to convert an address for DMA operations
* to an address that the kernel can use.
*/
#define __virt_to_bus(x) __virt_to_phys(x)
#define __bus_to_virt(x) __phys_to_virt(x)
#endif
arch/arm/mach-clps711x/include/mach/memory.h
View file @
7ef4de17
...
...
@@ -26,25 +26,7 @@
*/
#define PHYS_OFFSET UL(0xc0000000)
/*
* Virtual view <-> DMA view memory address translations
* virt_to_bus: Used to translate the virtual address to an
* address suitable to be passed to set_dma_addr
* bus_to_virt: Used to convert an address for DMA operations
* to an address that the kernel can use.
*/
#if defined(CONFIG_ARCH_CDB89712)
#define __virt_to_bus(x) (x)
#define __bus_to_virt(x) (x)
#elif defined (CONFIG_ARCH_AUTCPU12)
#define __virt_to_bus(x) (x)
#define __bus_to_virt(x) (x)
#else
#if !defined(CONFIG_ARCH_CDB89712) && !defined (CONFIG_ARCH_AUTCPU12)
#define __virt_to_bus(x) ((x) - PAGE_OFFSET)
#define __bus_to_virt(x) ((x) + PAGE_OFFSET)
...
...
arch/arm/mach-davinci/include/mach/memory.h
View file @
7ef4de17
...
...
@@ -55,10 +55,4 @@ __arch_adjust_zones(int node, unsigned long *size, unsigned long *holes)
#endif
/*
* Bus address is physical address
*/
#define __virt_to_bus(x) __virt_to_phys(x)
#define __bus_to_virt(x) __phys_to_virt(x)
#endif
/* __ASM_ARCH_MEMORY_H */
arch/arm/mach-ebsa110/include/mach/memory.h
View file @
7ef4de17
...
...
@@ -21,13 +21,6 @@
*/
#define PHYS_OFFSET UL(0x00000000)
/*
* We keep this 1:1 so that we don't interfere
* with the PCMCIA memory regions
*/
#define __virt_to_bus(x) (x)
#define __bus_to_virt(x) (x)
/*
* Cache flushing area - SRAM
*/
...
...
arch/arm/mach-ep93xx/include/mach/memory.h
View file @
7ef4de17
...
...
@@ -7,8 +7,4 @@
#define PHYS_OFFSET UL(0x00000000)
#define __bus_to_virt(x) __phys_to_virt(x)
#define __virt_to_bus(x) __virt_to_phys(x)
#endif
arch/arm/mach-footbridge/include/mach/memory.h
View file @
7ef4de17
...
...
@@ -30,9 +30,18 @@
extern
unsigned
long
__virt_to_bus
(
unsigned
long
);
extern
unsigned
long
__bus_to_virt
(
unsigned
long
);
#endif
#define __virt_to_bus __virt_to_bus
#define __bus_to_virt __bus_to_virt
#elif defined(CONFIG_FOOTBRIDGE_HOST)
/*
* The footbridge is programmed to expose the system RAM at the corresponding
* address. So, if PAGE_OFFSET is 0xc0000000, RAM appears at 0xe0000000.
* If 0x80000000, then its exposed at 0xa0000000 on the bus. etc.
* The only requirement is that the RAM isn't placed at bus address 0 which
* would clash with VGA cards.
*/
#define __virt_to_bus(x) ((x) - 0xe0000000)
#define __bus_to_virt(x) ((x) + 0xe0000000)
...
...
arch/arm/mach-h720x/include/mach/memory.h
View file @
7ef4de17
...
...
@@ -7,23 +7,6 @@
#ifndef __ASM_ARCH_MEMORY_H
#define __ASM_ARCH_MEMORY_H
/*
* Page offset:
* ( 0xc0000000UL )
*/
#define PHYS_OFFSET UL(0x40000000)
/*
* Virtual view <-> DMA view memory address translations
* virt_to_bus: Used to translate the virtual address to an
* address suitable to be passed to set_dma_addr
* bus_to_virt: Used to convert an address for DMA operations
* to an address that the kernel can use.
*
* There is something to do here later !, Mar 2000, Jungjun Kim
*/
#define __virt_to_bus(x) __virt_to_phys(x)
#define __bus_to_virt(x) __phys_to_virt(x)
#endif
arch/arm/mach-imx/include/mach/memory.h
View file @
7ef4de17
...
...
@@ -23,14 +23,4 @@
#define PHYS_OFFSET UL(0x08000000)
/*
* Virtual view <-> DMA view memory address translations
* virt_to_bus: Used to translate the virtual address to an
* address suitable to be passed to set_dma_addr
* bus_to_virt: Used to convert an address for DMA operations
* to an address that the kernel can use.
*/
#define __virt_to_bus(x) (x - PAGE_OFFSET + PHYS_OFFSET)
#define __bus_to_virt(x) (x - PHYS_OFFSET + PAGE_OFFSET)
#endif
arch/arm/mach-integrator/include/mach/memory.h
View file @
7ef4de17
...
...
@@ -24,15 +24,8 @@
* Physical DRAM offset.
*/
#define PHYS_OFFSET UL(0x00000000)
#define BUS_OFFSET UL(0x80000000)
/*
* Virtual view <-> DMA view memory address translations
* virt_to_bus: Used to translate the virtual address to an
* address suitable to be passed to set_dma_addr
* bus_to_virt: Used to convert an address for DMA operations
* to an address that the kernel can use.
*/
#define BUS_OFFSET UL(0x80000000)
#define __virt_to_bus(x) (x - PAGE_OFFSET + BUS_OFFSET)
#define __bus_to_virt(x) (x - BUS_OFFSET + PAGE_OFFSET)
...
...
arch/arm/mach-iop13xx/include/mach/memory.h
View file @
7ef4de17
...
...
@@ -16,18 +16,6 @@
#define IOP13XX_PMMR_P_START (IOP13XX_PMMR_PHYS_MEM_BASE)
#define IOP13XX_PMMR_P_END (IOP13XX_PMMR_PHYS_MEM_BASE + IOP13XX_PMMR_SIZE)
/*
* Virtual view <-> PCI DMA view memory address translations
* virt_to_bus: Used to translate the virtual address to an
* address suitable to be passed to set_dma_addr
* bus_to_virt: Used to convert an address for DMA operations
* to an address that the kernel can use.
*/
/* RAM has 1:1 mapping on the PCIe/x Busses */
#define __virt_to_bus(x) (__virt_to_phys(x))
#define __bus_to_virt(x) (__phys_to_virt(x))
static
inline
dma_addr_t
__virt_to_lbus
(
unsigned
long
x
)
{
return
x
+
IOP13XX_PMMR_PHYS_MEM_BASE
-
IOP13XX_PMMR_VIRT_MEM_BASE
;
...
...
@@ -55,7 +43,7 @@ static inline unsigned long __lbus_to_virt(dma_addr_t x)
if (is_lbus_device(dev) && __is_lbus_dma(__dma)) \
__virt = __lbus_to_virt(__dma); \
else \
__virt = __
bu
s_to_virt(__dma); \
__virt = __
phy
s_to_virt(__dma); \
(void *)__virt; \
})
...
...
@@ -66,7 +54,7 @@ static inline unsigned long __lbus_to_virt(dma_addr_t x)
if (is_lbus_device(dev) && __is_lbus_virt(__virt)) \
__dma = __virt_to_lbus(__virt); \
else \
__dma = __virt_to_
bu
s(__virt); \
__dma = __virt_to_
phy
s(__virt); \
__dma; \
})
...
...
arch/arm/mach-iop32x/include/mach/memory.h
View file @
7ef4de17
...
...
@@ -12,15 +12,4 @@
*/
#define PHYS_OFFSET UL(0xa0000000)
/*
* Virtual view <-> PCI DMA view memory address translations
* virt_to_bus: Used to translate the virtual address to an
* address suitable to be passed to set_dma_addr
* bus_to_virt: Used to convert an address for DMA operations
* to an address that the kernel can use.
*/
#define __virt_to_bus(x) (__virt_to_phys(x))
#define __bus_to_virt(x) (__phys_to_virt(x))
#endif
arch/arm/mach-iop33x/include/mach/memory.h
View file @
7ef4de17
...
...
@@ -12,15 +12,4 @@
*/
#define PHYS_OFFSET UL(0x00000000)
/*
* Virtual view <-> PCI DMA view memory address translations
* virt_to_bus: Used to translate the virtual address to an
* address suitable to be passed to set_dma_addr
* bus_to_virt: Used to convert an address for DMA operations
* to an address that the kernel can use.
*/
#define __virt_to_bus(x) (__virt_to_phys(x))
#define __bus_to_virt(x) (__phys_to_virt(x))
#endif
arch/arm/mach-ixp2000/include/mach/memory.h
View file @
7ef4de17
...
...
@@ -15,13 +15,6 @@
#define PHYS_OFFSET UL(0x00000000)
/*
* Virtual view <-> DMA view memory address translations
* virt_to_bus: Used to translate the virtual address to an
* address suitable to be passed to set_dma_addr
* bus_to_virt: Used to convert an address for DMA operations
* to an address that the kernel can use.
*/
#include
<mach/ixp2000-regs.h>
#define __virt_to_bus(v) \
...
...
arch/arm/mach-ixp23xx/include/mach/memory.h
View file @
7ef4de17
...
...
@@ -19,16 +19,6 @@
*/
#define PHYS_OFFSET (0x00000000)
/*
* Virtual view <-> DMA view memory address translations
* virt_to_bus: Used to translate the virtual address to an
* address suitable to be passed to set_dma_addr
* bus_to_virt: Used to convert an address for DMA operations
* to an address that the kernel can use.
*/
#ifndef __ASSEMBLY__
#define __virt_to_bus(v) \
({ unsigned int ret; \
ret = ((__virt_to_phys(v) - 0x00000000) + \
...
...
@@ -43,6 +33,3 @@
#define arch_is_coherent() 1
#endif
#endif
arch/arm/mach-ixp4xx/include/mach/memory.h
View file @
7ef4de17
...
...
@@ -25,16 +25,4 @@ void ixp4xx_adjust_zones(int node, unsigned long *size, unsigned long *holes);
#endif
/*
* Virtual view <-> DMA view memory address translations
* virt_to_bus: Used to translate the virtual address to an
* address suitable to be passed to set_dma_addr
* bus_to_virt: Used to convert an address for DMA operations
* to an address that the kernel can use.
*
* These are dummies for now.
*/
#define __virt_to_bus(x) __virt_to_phys(x)
#define __bus_to_virt(x) __phys_to_virt(x)
#endif
Prev
1
2
3
4
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment