You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'vmalloc' of git://git.linaro.org/people/nico/linux into devel-stable
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#else
|
||||
|
||||
#include <asm/memory.h>
|
||||
#include <mach/vmalloc.h>
|
||||
#include <asm/pgtable-hwdef.h>
|
||||
|
||||
#include <asm/pgtable-2level.h>
|
||||
@@ -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
|
||||
|
||||
@@ -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>
|
||||
@@ -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)
|
||||
{
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
/*
|
||||
* arch/arm/mach-at91/include/mach/vmalloc.h
|
||||
*
|
||||
* Copyright (C) 2003 SAN People
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef __ASM_ARCH_VMALLOC_H
|
||||
#define __ASM_ARCH_VMALLOC_H
|
||||
|
||||
#include <mach/hardware.h>
|
||||
|
||||
#define VMALLOC_END (AT91_VIRT_BASE & PGDIR_MASK)
|
||||
|
||||
#endif
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (C) 2000 Russell King.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/*
|
||||
* Move VMALLOC_END to 0xf0000000 so that the vm space can range from
|
||||
* 0xe0000000 to 0xefffffff. This gives us 256 MB of vm space and handles
|
||||
* larger physical memory designs better.
|
||||
*/
|
||||
#define VMALLOC_END 0xf0000000UL
|
||||
@@ -1,20 +0,0 @@
|
||||
/*
|
||||
* arch/arm/mach-clps711x/include/mach/vmalloc.h
|
||||
*
|
||||
* Copyright (C) 2000 Deep Blue Solutions Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
#define VMALLOC_END 0xd0000000UL
|
||||
@@ -1,11 +0,0 @@
|
||||
/*
|
||||
* Copyright 2000 Russell King.
|
||||
* Copyright 2003 ARM Limited
|
||||
* Copyright 2008 Cavium Networks
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License, Version 2, as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#define VMALLOC_END 0xd8000000UL
|
||||
@@ -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
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
/*
|
||||
* DaVinci vmalloc definitions
|
||||
*
|
||||
* Author: Kevin Hilman, MontaVista Software, Inc. <source@mvista.com>
|
||||
*
|
||||
* 2007 (c) MontaVista Software, Inc. This file is licensed under
|
||||
* the terms of the GNU General Public License version 2. This program
|
||||
* is licensed "as is" without any warranty of any kind, whether express
|
||||
* or implied.
|
||||
*/
|
||||
#include <mach/hardware.h>
|
||||
|
||||
/* Allow vmalloc range until the IO virtual range minus a 2M "hole" */
|
||||
#define VMALLOC_END (IO_VIRT - (2<<20))
|
||||
@@ -1,48 +0,0 @@
|
||||
/*
|
||||
* DaVinci I/O mapping code
|
||||
*
|
||||
* Copyright (C) 2005-2006 Texas Instruments
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/io.h>
|
||||
|
||||
#include <asm/tlb.h>
|
||||
#include <asm/mach/map.h>
|
||||
|
||||
#include <mach/common.h>
|
||||
|
||||
/*
|
||||
* Intercept ioremap() requests for addresses in our fixed mapping regions.
|
||||
*/
|
||||
void __iomem *davinci_ioremap(unsigned long p, size_t size, unsigned int type)
|
||||
{
|
||||
struct map_desc *desc = davinci_soc_info.io_desc;
|
||||
int desc_num = davinci_soc_info.io_desc_num;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < desc_num; i++, desc++) {
|
||||
unsigned long iophys = __pfn_to_phys(desc->pfn);
|
||||
unsigned long iosize = desc->length;
|
||||
|
||||
if (p >= iophys && (p + size) <= (iophys + iosize))
|
||||
return __io(desc->virtual + p - iophys);
|
||||
}
|
||||
|
||||
return __arm_ioremap_caller(p, size, type,
|
||||
__builtin_return_address(0));
|
||||
}
|
||||
EXPORT_SYMBOL(davinci_ioremap);
|
||||
|
||||
void davinci_iounmap(volatile void __iomem *addr)
|
||||
{
|
||||
unsigned long virt = (unsigned long)addr;
|
||||
|
||||
if (virt >= VMALLOC_START && virt < VMALLOC_END)
|
||||
__iounmap(addr);
|
||||
}
|
||||
EXPORT_SYMBOL(davinci_iounmap);
|
||||
@@ -11,8 +11,6 @@
|
||||
#ifndef __ASM_ARCH_DOVE_H
|
||||
#define __ASM_ARCH_DOVE_H
|
||||
|
||||
#include <mach/vmalloc.h>
|
||||
|
||||
/*
|
||||
* Marvell Dove address maps.
|
||||
*
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
/*
|
||||
* arch/arm/mach-dove/include/mach/vmalloc.h
|
||||
*/
|
||||
|
||||
#define VMALLOC_END 0xfd800000UL
|
||||
@@ -1,10 +0,0 @@
|
||||
/*
|
||||
* arch/arm/mach-ebsa110/include/mach/vmalloc.h
|
||||
*
|
||||
* Copyright (C) 1998 Russell King
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
#define VMALLOC_END 0xdf000000UL
|
||||
@@ -1,5 +0,0 @@
|
||||
/*
|
||||
* arch/arm/mach-ep93xx/include/mach/vmalloc.h
|
||||
*/
|
||||
|
||||
#define VMALLOC_END 0xfe800000UL
|
||||
@@ -1,22 +0,0 @@
|
||||
/* linux/arch/arm/mach-exynos4/include/mach/vmalloc.h
|
||||
*
|
||||
* Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
|
||||
* http://www.samsung.com
|
||||
*
|
||||
* Copyright 2010 Ben Dooks <ben-linux@fluff.org>
|
||||
*
|
||||
* Based on arch/arm/mach-s5p6440/include/mach/vmalloc.h
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* EXYNOS4 vmalloc definition
|
||||
*/
|
||||
|
||||
#ifndef __ASM_ARCH_VMALLOC_H
|
||||
#define __ASM_ARCH_VMALLOC_H __FILE__
|
||||
|
||||
#define VMALLOC_END 0xF6000000UL
|
||||
|
||||
#endif /* __ASM_ARCH_VMALLOC_H */
|
||||
@@ -1,10 +0,0 @@
|
||||
/*
|
||||
* arch/arm/mach-footbridge/include/mach/vmalloc.h
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
|
||||
#define VMALLOC_END 0xf0000000UL
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user