Commit bbd265b5 authored by Russell King's avatar Russell King

[ARM] Fix various build errors in bk-cur

- Make ioremap.c compile
- Fix armv4_early_abort -> v4_early_abort
- Fix MT_MINICACHE -> MT_MINICLEAN
- Add MAP_POPULATE and MAP_NONBLOCK for ARM
- Fix last remaining usage of kstat.irqs[cpu]
- Add support for .init.initramfs section
parent 37e093c1
...@@ -305,7 +305,7 @@ do_level_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) ...@@ -305,7 +305,7 @@ do_level_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs)
desc->chip->ack(irq); desc->chip->ack(irq);
if (likely(desc->enabled)) { if (likely(desc->enabled)) {
kstat.irqs[cpu][irq]++; kstat_cpu(cpu).irqs[irq]++;
/* /*
* Return with this interrupt masked if no action * Return with this interrupt masked if no action
......
...@@ -8,9 +8,7 @@ ...@@ -8,9 +8,7 @@
* Hacked for ARM by Phil Blundell <philb@gnu.org> * Hacked for ARM by Phil Blundell <philb@gnu.org>
* Hacked to allow all architectures to build, and various cleanups * Hacked to allow all architectures to build, and various cleanups
* by Russell King * by Russell King
*/ *
/*
* This allows a driver to remap an arbitrary region of bus memory into * This allows a driver to remap an arbitrary region of bus memory into
* virtual space. One should *only* use readl, writel, memcpy_toio and * virtual space. One should *only* use readl, writel, memcpy_toio and
* so on with such remapped areas. * so on with such remapped areas.
...@@ -21,11 +19,6 @@ ...@@ -21,11 +19,6 @@
* two 2GB chunks and mapping only one at a time into processor memory. * two 2GB chunks and mapping only one at a time into processor memory.
* We use MMU protection domains to trap any attempt to access the bank * We use MMU protection domains to trap any attempt to access the bank
* that is not currently mapped. (This isn't fully implemented yet.) * that is not currently mapped. (This isn't fully implemented yet.)
*
* DC21285 currently has a bug in that the PCI address extension
* register affects the address of any writes waiting in the outbound
* FIFO. Unfortunately, it is not possible to tell the DC21285 to
* flush this - flushing the area causes the bus to lock.
*/ */
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/mm.h> #include <linux/mm.h>
...@@ -34,6 +27,7 @@ ...@@ -34,6 +27,7 @@
#include <asm/page.h> #include <asm/page.h>
#include <asm/pgalloc.h> #include <asm/pgalloc.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/tlbflush.h>
static inline void remap_area_pte(pte_t * pte, unsigned long address, unsigned long size, static inline void remap_area_pte(pte_t * pte, unsigned long address, unsigned long size,
unsigned long phys_addr, pgprot_t pgprot) unsigned long phys_addr, pgprot_t pgprot)
...@@ -76,7 +70,7 @@ static inline int remap_area_pmd(pmd_t * pmd, unsigned long address, unsigned lo ...@@ -76,7 +70,7 @@ static inline int remap_area_pmd(pmd_t * pmd, unsigned long address, unsigned lo
pgprot = __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | L_PTE_WRITE | flags); pgprot = __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | L_PTE_WRITE | flags);
do { do {
pte_t * pte = pte_alloc(&init_mm, pmd, address); pte_t * pte = pte_alloc_kernel(&init_mm, pmd, address);
if (!pte) if (!pte)
return -ENOMEM; return -ENOMEM;
remap_area_pte(pte, address, end - address, address + phys_addr, pgprot); remap_area_pte(pte, address, end - address, address + phys_addr, pgprot);
...@@ -129,7 +123,9 @@ static int remap_area_pages(unsigned long address, unsigned long phys_addr, ...@@ -129,7 +123,9 @@ static int remap_area_pages(unsigned long address, unsigned long phys_addr,
* 'flags' are the extra L_PTE_ flags that you want to specify for this * 'flags' are the extra L_PTE_ flags that you want to specify for this
* mapping. See include/asm-arm/proc-armv/pgtable.h for more information. * mapping. See include/asm-arm/proc-armv/pgtable.h for more information.
*/ */
void * __ioremap(unsigned long phys_addr, size_t size, unsigned long flags) void *
__ioremap(unsigned long phys_addr, size_t size, unsigned long flags,
unsigned long align)
{ {
void * addr; void * addr;
struct vm_struct * area; struct vm_struct * area;
......
...@@ -279,7 +279,7 @@ static void __init build_mem_type_table(void) ...@@ -279,7 +279,7 @@ static void __init build_mem_type_table(void)
if (cpu_arch < CPU_ARCH_ARMv5) { if (cpu_arch < CPU_ARCH_ARMv5) {
writealloc = 0; writealloc = 0;
ecc = 0; ecc = 0;
mem_types[MT_MINICACHE].prot_sect &= ~PMD_SECT_TEX(1); mem_types[MT_MINICLEAN].prot_sect &= ~PMD_SECT_TEX(1);
} }
if (writethrough) { if (writethrough) {
......
...@@ -561,7 +561,7 @@ cpu_sa110_info: ...@@ -561,7 +561,7 @@ cpu_sa110_info:
*/ */
.type sa1100_processor_functions, #object .type sa1100_processor_functions, #object
ENTRY(sa1100_processor_functions) ENTRY(sa1100_processor_functions)
.word armv4_early_abort .word v4_early_abort
.word cpu_sa1100_check_bugs .word cpu_sa1100_check_bugs
.word cpu_sa1100_proc_init .word cpu_sa1100_proc_init
.word cpu_sa1100_proc_fin .word cpu_sa1100_proc_fin
......
...@@ -35,6 +35,10 @@ SECTIONS ...@@ -35,6 +35,10 @@ SECTIONS
*(.initcall6.init) *(.initcall6.init)
*(.initcall7.init) *(.initcall7.init)
__initcall_end = .; __initcall_end = .;
. = ALIGN(32);
__initramfs_start = .;
*(.init.initramfs)
__initramfs_end = .;
. = ALIGN(4096); . = ALIGN(4096);
__init_end = .; __init_end = .;
} }
......
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
#define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */
#define MAP_LOCKED 0x2000 /* pages are locked */ #define MAP_LOCKED 0x2000 /* pages are locked */
#define MAP_NORESERVE 0x4000 /* don't check for reservations */ #define MAP_NORESERVE 0x4000 /* don't check for reservations */
#define MAP_POPULATE 0x8000 /* populate (prefault) page tables */
#define MAP_NONBLOCK 0x10000 /* do not block on IO */
#define MS_ASYNC 1 /* sync memory asynchronously */ #define MS_ASYNC 1 /* sync memory asynchronously */
#define MS_INVALIDATE 2 /* invalidate the caches */ #define MS_INVALIDATE 2 /* invalidate the caches */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment