Skip to content

Commit

Permalink
Merge branch 'vmalloc' of git://git.linaro.org/people/nico/linux into…
Browse files Browse the repository at this point in the history
… devel-stable
  • Loading branch information
Russell King committed Dec 5, 2011
2 parents 742eaa6 + 0af362f commit 73829af
Show file tree
Hide file tree
Showing 96 changed files with 179 additions and 1,406 deletions.
11 changes: 5 additions & 6 deletions Documentation/arm/memory.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,14 @@ ffc00000 ffefffff DMA memory mapping region. Memory returned
ff000000 ffbfffff Reserved for future expansion of DMA
mapping region.

VMALLOC_END feffffff Free for platform use, recommended.
VMALLOC_END must be aligned to a 2MB
boundary.

VMALLOC_START VMALLOC_END-1 vmalloc() / ioremap() space.
Memory returned by vmalloc/ioremap will
be dynamically placed in this region.
VMALLOC_START may be based upon the value
of the high_memory variable.
Machine specific static mappings are also
located here through iotable_init().
VMALLOC_START is based upon the value
of the high_memory variable, and VMALLOC_END
is equal to 0xff000000.

PAGE_OFFSET high_memory-1 Kernel direct-mapped RAM region.
This maps the platforms RAM, and typically
Expand Down
13 changes: 7 additions & 6 deletions arch/arm/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#else

#include <asm/memory.h>
#include <mach/vmalloc.h>
#include <asm/pgtable-hwdef.h>

#include <asm/pgtable-2level.h>
Expand All @@ -33,14 +32,16 @@
* any out-of-bounds memory accesses will hopefully be caught.
* The vmalloc() routines leaves a hole of 4kB between each vmalloced
* area for the same reason. ;)
*
* Note that platforms may override VMALLOC_START, but they must provide
* VMALLOC_END. VMALLOC_END defines the (exclusive) limit of this space,
* which may not overlap IO space.
*/
#ifndef VMALLOC_START
#define VMALLOC_OFFSET (8*1024*1024)
#define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))
#define VMALLOC_END 0xff000000UL

/* This is a temporary hack until shmobile's DMA area size is sorted out */
#ifdef CONFIG_ARCH_SHMOBILE
#warning "SH-Mobile's consistent DMA size conflicts with VMALLOC_END by 144MB"
#undef VMALLOC_END
#define VMALLOC_END 0xF6000000UL
#endif

#define LIBRARY_TEXT_START 0x0c000000
Expand Down
8 changes: 8 additions & 0 deletions arch/arm/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include <linux/memblock.h>
#include <linux/bug.h>
#include <linux/compiler.h>
#include <linux/sort.h>

#include <asm/unified.h>
#include <asm/cpu.h>
Expand Down Expand Up @@ -890,6 +891,12 @@ static struct machine_desc * __init setup_machine_tags(unsigned int nr)
return mdesc;
}

static int __init meminfo_cmp(const void *_a, const void *_b)
{
const struct membank *a = _a, *b = _b;
long cmp = bank_pfn_start(a) - bank_pfn_start(b);
return cmp < 0 ? -1 : cmp > 0 ? 1 : 0;
}

void __init setup_arch(char **cmdline_p)
{
Expand Down Expand Up @@ -918,6 +925,7 @@ void __init setup_arch(char **cmdline_p)

parse_early_param();

sort(&meminfo.bank, meminfo.nr_banks, sizeof(meminfo.bank[0]), meminfo_cmp, NULL);
sanity_check_meminfo();
arm_memblock_init(&meminfo, mdesc);

Expand Down
8 changes: 0 additions & 8 deletions arch/arm/mach-at91/include/mach/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,6 @@

#ifndef __ASSEMBLY__

#ifndef CONFIG_ARCH_AT91X40
#define __arch_ioremap at91_ioremap
#define __arch_iounmap at91_iounmap
#endif

void __iomem *at91_ioremap(unsigned long phys, size_t size, unsigned int type);
void at91_iounmap(volatile void __iomem *addr);

static inline unsigned int at91_sys_read(unsigned int reg_offset)
{
void __iomem *addr = (void __iomem *)AT91_VA_BASE_SYS;
Expand Down
28 changes: 0 additions & 28 deletions arch/arm/mach-at91/include/mach/vmalloc.h

This file was deleted.

18 changes: 0 additions & 18 deletions arch/arm/mach-at91/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,24 +73,6 @@ static struct map_desc at91_io_desc __initdata = {
.type = MT_DEVICE,
};

void __iomem *at91_ioremap(unsigned long p, size_t size, unsigned int type)
{
if (p >= AT91_BASE_SYS && p <= (AT91_BASE_SYS + SZ_16K - 1))
return (void __iomem *)AT91_IO_P2V(p);

return __arm_ioremap_caller(p, size, type, __builtin_return_address(0));
}
EXPORT_SYMBOL(at91_ioremap);

void at91_iounmap(volatile void __iomem *addr)
{
unsigned long virt = (unsigned long)addr;

if (virt >= VMALLOC_START && virt < VMALLOC_END)
__iounmap(addr);
}
EXPORT_SYMBOL(at91_iounmap);

#define AT91_DBGU0 0xfffff200
#define AT91_DBGU1 0xffffee00

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-bcmring/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -1615,7 +1615,7 @@ DMA_MemType_t dma_mem_type(void *addr)
{
unsigned long addrVal = (unsigned long)addr;

if (addrVal >= VMALLOC_END) {
if (addrVal >= CONSISTENT_BASE) {
/* NOTE: DMA virtual memory space starts at 0xFFxxxxxx */

/* dma_alloc_xxx pages are physically and virtually contiguous */
Expand Down
25 changes: 0 additions & 25 deletions arch/arm/mach-bcmring/include/mach/vmalloc.h

This file was deleted.

20 changes: 0 additions & 20 deletions arch/arm/mach-clps711x/include/mach/vmalloc.h

This file was deleted.

11 changes: 0 additions & 11 deletions arch/arm/mach-cns3xxx/include/mach/vmalloc.h

This file was deleted.

2 changes: 1 addition & 1 deletion arch/arm/mach-davinci/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#

# Common objects
obj-y := time.o clock.o serial.o io.o psc.o \
obj-y := time.o clock.o serial.o psc.o \
dma.o usb.o common.o sram.o aemif.o

obj-$(CONFIG_DAVINCI_MUX) += mux.o
Expand Down
8 changes: 0 additions & 8 deletions arch/arm/mach-davinci/include/mach/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,4 @@
#define __mem_pci(a) (a)
#define __mem_isa(a) (a)

#ifndef __ASSEMBLER__
#define __arch_ioremap davinci_ioremap
#define __arch_iounmap davinci_iounmap

void __iomem *davinci_ioremap(unsigned long phys, size_t size,
unsigned int type);
void davinci_iounmap(volatile void __iomem *addr);
#endif
#endif /* __ASM_ARCH_IO_H */
14 changes: 0 additions & 14 deletions arch/arm/mach-davinci/include/mach/vmalloc.h

This file was deleted.

48 changes: 0 additions & 48 deletions arch/arm/mach-davinci/io.c

This file was deleted.

2 changes: 0 additions & 2 deletions arch/arm/mach-dove/include/mach/dove.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
#ifndef __ASM_ARCH_DOVE_H
#define __ASM_ARCH_DOVE_H

#include <mach/vmalloc.h>

/*
* Marvell Dove address maps.
*
Expand Down
5 changes: 0 additions & 5 deletions arch/arm/mach-dove/include/mach/vmalloc.h

This file was deleted.

10 changes: 0 additions & 10 deletions arch/arm/mach-ebsa110/include/mach/vmalloc.h

This file was deleted.

5 changes: 0 additions & 5 deletions arch/arm/mach-ep93xx/include/mach/vmalloc.h

This file was deleted.

22 changes: 0 additions & 22 deletions arch/arm/mach-exynos/include/mach/vmalloc.h

This file was deleted.

10 changes: 0 additions & 10 deletions arch/arm/mach-footbridge/include/mach/vmalloc.h

This file was deleted.

10 changes: 0 additions & 10 deletions arch/arm/mach-gemini/include/mach/vmalloc.h

This file was deleted.

10 changes: 0 additions & 10 deletions arch/arm/mach-h720x/include/mach/vmalloc.h

This file was deleted.

1 change: 0 additions & 1 deletion arch/arm/mach-highbank/include/mach/vmalloc.h

This file was deleted.

Loading

0 comments on commit 73829af

Please sign in to comment.