summaryrefslogtreecommitdiffstats
path: root/arch/arm/mm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mm')
-rw-r--r--arch/arm/mm/consistent.c19
-rw-r--r--arch/arm/mm/fault-armv.c4
-rw-r--r--arch/arm/mm/fault-common.c2
-rw-r--r--arch/arm/mm/mm-armv.c8
-rw-r--r--arch/arm/mm/mm-nexuspci.c20
5 files changed, 36 insertions, 17 deletions
diff --git a/arch/arm/mm/consistent.c b/arch/arm/mm/consistent.c
index 7101b2936..76d1a5c74 100644
--- a/arch/arm/mm/consistent.c
+++ b/arch/arm/mm/consistent.c
@@ -1,13 +1,14 @@
/*
* Dynamic DMA mapping support.
*/
-
+#include <linux/config.h>
#include <linux/types.h>
#include <linux/mm.h>
#include <linux/string.h>
#include <linux/vmalloc.h>
#include <linux/interrupt.h>
#include <linux/errno.h>
+#include <linux/pci.h>
#include <asm/io.h>
#include <asm/pgalloc.h>
@@ -49,6 +50,22 @@ no_page:
return NULL;
}
+void *pci_alloc_consistent(struct pci_dev *hwdev, size_t size, dma_addr_t *handle)
+{
+ void *__ret;
+ int __gfp = GFP_KERNEL;
+
+#ifdef CONFIG_PCI
+ if ((hwdev) == NULL ||
+ (hwdev)->dma_mask != 0xffffffff)
+#endif
+ __gfp |= GFP_DMA;
+
+ __ret = consistent_alloc(__gfp, (size),
+ (handle));
+ return __ret;
+}
+
/*
* free a page as defined by the above mapping. We expressly forbid
* calling this from interrupt context.
diff --git a/arch/arm/mm/fault-armv.c b/arch/arm/mm/fault-armv.c
index 5151591b8..4a23d14bd 100644
--- a/arch/arm/mm/fault-armv.c
+++ b/arch/arm/mm/fault-armv.c
@@ -351,7 +351,7 @@ do_sect_fault(unsigned long addr, int error_code, struct pt_regs *regs)
#endif
-static struct fsr_info {
+static const struct fsr_info {
int (*fn)(unsigned long addr, int error_code, struct pt_regs *regs);
int sig;
char *name;
@@ -384,7 +384,7 @@ static struct fsr_info {
asmlinkage void
do_DataAbort(unsigned long addr, int fsr, int error_code, struct pt_regs *regs)
{
- struct fsr_info *inf;
+ const struct fsr_info *inf;
if (user_mode(regs) && addr == regs->ARM_pc) {
static int first = 1;
diff --git a/arch/arm/mm/fault-common.c b/arch/arm/mm/fault-common.c
index d04808ffa..c34c37203 100644
--- a/arch/arm/mm/fault-common.c
+++ b/arch/arm/mm/fault-common.c
@@ -6,7 +6,7 @@
*/
#include <linux/config.h>
-extern void die(const char *msg, struct pt_regs *regs, unsigned int err);
+extern void die(const char *msg, struct pt_regs *regs, int err);
/*
* This is useful to dump out the page tables associated with
diff --git a/arch/arm/mm/mm-armv.c b/arch/arm/mm/mm-armv.c
index 92007d975..ddc69089a 100644
--- a/arch/arm/mm/mm-armv.c
+++ b/arch/arm/mm/mm-armv.c
@@ -60,6 +60,8 @@ __setup("noalign", noalign_setup);
__setup("nocache", nocache_setup);
__setup("nowb", nowrite_setup);
+#define FIRST_KERNEL_PGD_NR (FIRST_USER_PGD_NR + USER_PTRS_PER_PGD)
+
/*
* need to get a 16k page for level 1
*/
@@ -71,9 +73,9 @@ pgd_t *get_pgd_slow(void)
if (pgd) {
pgd_t *init = pgd_offset_k(0);
- memzero(pgd, USER_PTRS_PER_PGD * sizeof(pgd_t));
- memcpy(pgd + USER_PTRS_PER_PGD, init + USER_PTRS_PER_PGD,
- (PTRS_PER_PGD - USER_PTRS_PER_PGD) * sizeof(pgd_t));
+ memzero(pgd, FIRST_KERNEL_PGD_NR * sizeof(pgd_t));
+ memcpy(pgd + FIRST_KERNEL_PGD_NR, init + FIRST_KERNEL_PGD_NR,
+ (PTRS_PER_PGD - FIRST_KERNEL_PGD_NR) * sizeof(pgd_t));
clean_cache_area(pgd, PTRS_PER_PGD * sizeof(pgd_t));
/*
diff --git a/arch/arm/mm/mm-nexuspci.c b/arch/arm/mm/mm-nexuspci.c
index 5b66faa51..ccb6c8a5c 100644
--- a/arch/arm/mm/mm-nexuspci.c
+++ b/arch/arm/mm/mm-nexuspci.c
@@ -2,9 +2,9 @@
* arch/arm/mm/mm-nexuspci.c
* from arch/arm/mm/mm-ebsa110.c
*
- * Extra MM routines for the NexusPCI architecture
+ * Extra MM routines for the FTV/PCI architecture
*
- * Copyright (C) 1998 Phil Blundell
+ * Copyright (C) 1998-1999 Phil Blundell
* Copyright (C) 1998-1999 Russell King
*/
@@ -18,14 +18,14 @@
#include "map.h"
-#define SIZE(x) (sizeof(x) / sizeof(x[0]))
-
-const struct map_desc io_desc[] __initdata = {
- { 0xfff00000, 0x10000000, 0x00001000, DOMAIN_IO, 0, 1, 0, 0 },
- { 0xffe00000, 0x20000000, 0x00001000, DOMAIN_IO, 0, 1, 0, 0 },
- { 0xffc00000, 0x60000000, 0x00001000, DOMAIN_IO, 0, 1, 0, 0 },
- { 0xfe000000, 0x80000000, 0x00100000, DOMAIN_IO, 0, 1, 0, 0 },
- { 0xfd000000, 0x88000000, 0x00100000, DOMAIN_IO, 0, 1, 0, 0 }
+struct map_desc io_desc[] __initdata = {
+ { INTCONT_BASE, INTCONT_START, 0x00001000, DOMAIN_IO, 0, 1, 0, 0 },
+ { PLX_BASE, PLX_START, 0x00001000, DOMAIN_IO, 0, 1, 0, 0 },
+ { PCIO_BASE, PLX_IO_START, 0x00100000, DOMAIN_IO, 0, 1, 0, 0 },
+ { DUART_BASE, DUART_START, 0x00001000, DOMAIN_IO, 0, 1, 0, 0 },
+ { STATUS_BASE, STATUS_START, 0x00001000, DOMAIN_IO, 0, 1, 0, 0 }
};
+#define SIZE(x) (sizeof(x) / sizeof(x[0]))
+
unsigned int __initdata io_desc_size = SIZE(io_desc);