diff options
| -rw-r--r-- | arch/arm/Makefile | 1 | ||||
| -rw-r--r-- | arch/arm/mm/Kconfig | 19 | ||||
| -rw-r--r-- | arch/arm/mm/Makefile | 2 | ||||
| -rw-r--r-- | arch/arm/mm/copypage-xsc3.S | 97 | ||||
| -rw-r--r-- | arch/arm/mm/mm-armv.c | 3 | ||||
| -rw-r--r-- | arch/arm/mm/proc-xsc3.S | 498 | ||||
| -rw-r--r-- | include/asm-arm/cacheflush.h | 8 | ||||
| -rw-r--r-- | include/asm-arm/domain.h | 18 | ||||
| -rw-r--r-- | include/asm-arm/page.h | 9 | ||||
| -rw-r--r-- | include/asm-arm/proc-fns.h | 8 | ||||
| -rw-r--r-- | include/asm-arm/system.h | 19 |
11 files changed, 680 insertions, 2 deletions
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 99c0d32371..0f571d3d2f 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
| @@ -57,6 +57,7 @@ tune-$(CONFIG_CPU_ARM926T) :=-mtune=arm9tdmi | |||
| 57 | tune-$(CONFIG_CPU_SA110) :=-mtune=strongarm110 | 57 | tune-$(CONFIG_CPU_SA110) :=-mtune=strongarm110 |
| 58 | tune-$(CONFIG_CPU_SA1100) :=-mtune=strongarm1100 | 58 | tune-$(CONFIG_CPU_SA1100) :=-mtune=strongarm1100 |
| 59 | tune-$(CONFIG_CPU_XSCALE) :=$(call cc-option,-mtune=xscale,-mtune=strongarm110) -Wa,-mcpu=xscale | 59 | tune-$(CONFIG_CPU_XSCALE) :=$(call cc-option,-mtune=xscale,-mtune=strongarm110) -Wa,-mcpu=xscale |
| 60 | tune-$(CONFIG_CPU_XSC3) :=$(call cc-option,-mtune=xscale,-mtune=strongarm110) -Wa,-mcpu=xscale | ||
| 60 | tune-$(CONFIG_CPU_V6) :=$(call cc-option,-mtune=arm1136j-s,-mtune=strongarm) | 61 | tune-$(CONFIG_CPU_V6) :=$(call cc-option,-mtune=arm1136j-s,-mtune=strongarm) |
| 61 | 62 | ||
| 62 | ifeq ($(CONFIG_AEABI),y) | 63 | ifeq ($(CONFIG_AEABI),y) |
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index e680c5fd93..c55b739e10 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig | |||
| @@ -239,6 +239,17 @@ config CPU_XSCALE | |||
| 239 | select CPU_CACHE_VIVT | 239 | select CPU_CACHE_VIVT |
| 240 | select CPU_TLB_V4WBI | 240 | select CPU_TLB_V4WBI |
| 241 | 241 | ||
| 242 | # XScale Core Version 3 | ||
| 243 | config CPU_XSC3 | ||
| 244 | bool | ||
| 245 | depends on ARCH_IXP23XX | ||
| 246 | default y | ||
| 247 | select CPU_32v5 | ||
| 248 | select CPU_ABRT_EV5T | ||
| 249 | select CPU_CACHE_VIVT | ||
| 250 | select CPU_TLB_V4WBI | ||
| 251 | select IO_36 | ||
| 252 | |||
| 242 | # ARMv6 | 253 | # ARMv6 |
| 243 | config CPU_V6 | 254 | config CPU_V6 |
| 244 | bool "Support ARM V6 processor" | 255 | bool "Support ARM V6 processor" |
| @@ -361,11 +372,17 @@ config CPU_TLB_V4WBI | |||
| 361 | config CPU_TLB_V6 | 372 | config CPU_TLB_V6 |
| 362 | bool | 373 | bool |
| 363 | 374 | ||
| 375 | # | ||
| 376 | # CPU supports 36-bit I/O | ||
| 377 | # | ||
| 378 | config IO_36 | ||
| 379 | bool | ||
| 380 | |||
| 364 | comment "Processor Features" | 381 | comment "Processor Features" |
| 365 | 382 | ||
| 366 | config ARM_THUMB | 383 | config ARM_THUMB |
| 367 | bool "Support Thumb user binaries" | 384 | bool "Support Thumb user binaries" |
| 368 | depends on CPU_ARM720T || CPU_ARM920T || CPU_ARM922T || CPU_ARM925T || CPU_ARM926T || CPU_ARM1020 || CPU_ARM1020E || CPU_ARM1022 || CPU_ARM1026 || CPU_XSCALE || CPU_V6 | 385 | depends on CPU_ARM720T || CPU_ARM920T || CPU_ARM922T || CPU_ARM925T || CPU_ARM926T || CPU_ARM1020 || CPU_ARM1020E || CPU_ARM1022 || CPU_ARM1026 || CPU_XSCALE || CPU_XSC3 || CPU_V6 |
| 369 | default y | 386 | default y |
| 370 | help | 387 | help |
| 371 | Say Y if you want to include kernel support for running user space | 388 | Say Y if you want to include kernel support for running user space |
diff --git a/arch/arm/mm/Makefile b/arch/arm/mm/Makefile index ffe73ba2bf..07a5385057 100644 --- a/arch/arm/mm/Makefile +++ b/arch/arm/mm/Makefile | |||
| @@ -30,6 +30,7 @@ obj-$(CONFIG_CPU_COPY_V4WB) += copypage-v4wb.o | |||
| 30 | obj-$(CONFIG_CPU_COPY_V6) += copypage-v6.o mmu.o | 30 | obj-$(CONFIG_CPU_COPY_V6) += copypage-v6.o mmu.o |
| 31 | obj-$(CONFIG_CPU_SA1100) += copypage-v4mc.o | 31 | obj-$(CONFIG_CPU_SA1100) += copypage-v4mc.o |
| 32 | obj-$(CONFIG_CPU_XSCALE) += copypage-xscale.o | 32 | obj-$(CONFIG_CPU_XSCALE) += copypage-xscale.o |
| 33 | obj-$(CONFIG_CPU_XSC3) += copypage-xsc3.o | ||
| 33 | 34 | ||
| 34 | obj-$(CONFIG_CPU_TLB_V3) += tlb-v3.o | 35 | obj-$(CONFIG_CPU_TLB_V3) += tlb-v3.o |
| 35 | obj-$(CONFIG_CPU_TLB_V4WT) += tlb-v4.o | 36 | obj-$(CONFIG_CPU_TLB_V4WT) += tlb-v4.o |
| @@ -51,4 +52,5 @@ obj-$(CONFIG_CPU_ARM1026) += proc-arm1026.o | |||
| 51 | obj-$(CONFIG_CPU_SA110) += proc-sa110.o | 52 | obj-$(CONFIG_CPU_SA110) += proc-sa110.o |
| 52 | obj-$(CONFIG_CPU_SA1100) += proc-sa1100.o | 53 | obj-$(CONFIG_CPU_SA1100) += proc-sa1100.o |
| 53 | obj-$(CONFIG_CPU_XSCALE) += proc-xscale.o | 54 | obj-$(CONFIG_CPU_XSCALE) += proc-xscale.o |
| 55 | obj-$(CONFIG_CPU_XSC3) += proc-xsc3.o | ||
| 54 | obj-$(CONFIG_CPU_V6) += proc-v6.o | 56 | obj-$(CONFIG_CPU_V6) += proc-v6.o |
diff --git a/arch/arm/mm/copypage-xsc3.S b/arch/arm/mm/copypage-xsc3.S new file mode 100644 index 0000000000..9a2cb4332b --- /dev/null +++ b/arch/arm/mm/copypage-xsc3.S | |||
| @@ -0,0 +1,97 @@ | |||
| 1 | /* | ||
| 2 | * linux/arch/arm/lib/copypage-xsc3.S | ||
| 3 | * | ||
| 4 | * Copyright (C) 2004 Intel Corp. | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License version 2 as | ||
| 8 | * published by the Free Software Foundation. | ||
| 9 | * | ||
| 10 | * Adapted for 3rd gen XScale core, no more mini-dcache | ||
| 11 | * Author: Matt Gilbert (matthew.m.gilbert@intel.com) | ||
| 12 | */ | ||
| 13 | |||
| 14 | #include <linux/linkage.h> | ||
| 15 | #include <linux/init.h> | ||
| 16 | #include <asm/asm-offsets.h> | ||
| 17 | |||
| 18 | /* | ||
| 19 | * General note: | ||
| 20 | * We don't really want write-allocate cache behaviour for these functions | ||
| 21 | * since that will just eat through 8K of the cache. | ||
| 22 | */ | ||
| 23 | |||
| 24 | .text | ||
| 25 | .align 5 | ||
| 26 | /* | ||
| 27 | * XSC3 optimised copy_user_page | ||
| 28 | * r0 = destination | ||
| 29 | * r1 = source | ||
| 30 | * r2 = virtual user address of ultimate destination page | ||
| 31 | * | ||
| 32 | * The source page may have some clean entries in the cache already, but we | ||
| 33 | * can safely ignore them - break_cow() will flush them out of the cache | ||
| 34 | * if we eventually end up using our copied page. | ||
| 35 | * | ||
| 36 | */ | ||
| 37 | ENTRY(xsc3_mc_copy_user_page) | ||
| 38 | stmfd sp!, {r4, r5, lr} | ||
| 39 | mov lr, #PAGE_SZ/64-1 | ||
| 40 | |||
| 41 | pld [r1, #0] | ||
| 42 | pld [r1, #32] | ||
| 43 | 1: pld [r1, #64] | ||
| 44 | pld [r1, #96] | ||
| 45 | |||
| 46 | 2: ldrd r2, [r1], #8 | ||
| 47 | mov ip, r0 | ||
| 48 | ldrd r4, [r1], #8 | ||
| 49 | mcr p15, 0, ip, c7, c6, 1 @ invalidate | ||
| 50 | strd r2, [r0], #8 | ||
| 51 | ldrd r2, [r1], #8 | ||
| 52 | strd r4, [r0], #8 | ||
| 53 | ldrd r4, [r1], #8 | ||
| 54 | strd r2, [r0], #8 | ||
| 55 | strd r4, [r0], #8 | ||
| 56 | ldrd r2, [r1], #8 | ||
| 57 | mov ip, r0 | ||
| 58 | ldrd r4, [r1], #8 | ||
| 59 | mcr p15, 0, ip, c7, c6, 1 @ invalidate | ||
| 60 | strd r2, [r0], #8 | ||
| 61 | ldrd r2, [r1], #8 | ||
| 62 | subs lr, lr, #1 | ||
| 63 | strd r4, [r0], #8 | ||
| 64 | ldrd r4, [r1], #8 | ||
| 65 | strd r2, [r0], #8 | ||
| 66 | strd r4, [r0], #8 | ||
| 67 | bgt 1b | ||
| 68 | beq 2b | ||
| 69 | |||
| 70 | ldmfd sp!, {r4, r5, pc} | ||
| 71 | |||
| 72 | .align 5 | ||
| 73 | /* | ||
| 74 | * XScale optimised clear_user_page | ||
| 75 | * r0 = destination | ||
| 76 | * r1 = virtual user address of ultimate destination page | ||
| 77 | */ | ||
| 78 | ENTRY(xsc3_mc_clear_user_page) | ||
| 79 | mov r1, #PAGE_SZ/32 | ||
| 80 | mov r2, #0 | ||
| 81 | mov r3, #0 | ||
| 82 | 1: mcr p15, 0, r0, c7, c6, 1 @ invalidate line | ||
| 83 | strd r2, [r0], #8 | ||
| 84 | strd r2, [r0], #8 | ||
| 85 | strd r2, [r0], #8 | ||
| 86 | strd r2, [r0], #8 | ||
| 87 | subs r1, r1, #1 | ||
| 88 | bne 1b | ||
| 89 | mov pc, lr | ||
| 90 | |||
| 91 | __INITDATA | ||
| 92 | |||
| 93 | .type xsc3_mc_user_fns, #object | ||
| 94 | ENTRY(xsc3_mc_user_fns) | ||
| 95 | .long xsc3_mc_clear_user_page | ||
| 96 | .long xsc3_mc_copy_user_page | ||
| 97 | .size xsc3_mc_user_fns, . - xsc3_mc_user_fns | ||
diff --git a/arch/arm/mm/mm-armv.c b/arch/arm/mm/mm-armv.c index ef8d30a185..5e5d05bcad 100644 --- a/arch/arm/mm/mm-armv.c +++ b/arch/arm/mm/mm-armv.c | |||
| @@ -557,7 +557,8 @@ void __init create_mapping(struct map_desc *md) | |||
| 557 | * supersections are only allocated for domain 0 regardless | 557 | * supersections are only allocated for domain 0 regardless |
| 558 | * of the actual domain assignments in use. | 558 | * of the actual domain assignments in use. |
| 559 | */ | 559 | */ |
| 560 | if (cpu_architecture() >= CPU_ARCH_ARMv6 && domain == 0) { | 560 | if ((cpu_architecture() >= CPU_ARCH_ARMv6 || cpu_is_xsc3()) |
| 561 | && domain == 0) { | ||
| 561 | /* | 562 | /* |
| 562 | * Align to supersection boundary if !high pages. | 563 | * Align to supersection boundary if !high pages. |
| 563 | * High pages have already been checked for proper | 564 | * High pages have already been checked for proper |
diff --git a/arch/arm/mm/proc-xsc3.S b/arch/arm/mm/proc-xsc3.S new file mode 100644 index 0000000000..f90513e9af --- /dev/null +++ b/arch/arm/mm/proc-xsc3.S | |||
| @@ -0,0 +1,498 @@ | |||
| 1 | /* | ||
| 2 | * linux/arch/arm/mm/proc-xsc3.S | ||
| 3 | * | ||
| 4 | * Original Author: Matthew Gilbert | ||
| 5 | * Current Maintainer: Deepak Saxena <dsaxena@plexity.net> | ||
| 6 | * | ||
| 7 | * Copyright 2004 (C) Intel Corp. | ||
| 8 | * Copyright 2005 (c) MontaVista Software, Inc. | ||
| 9 | * | ||
| 10 | * This program is free software; you can redistribute it and/or modify | ||
| 11 | * it under the terms of the GNU General Public License version 2 as | ||
| 12 | * published by the Free Software Foundation. | ||
| 13 | * | ||
| 14 | * MMU functions for the Intel XScale3 Core (XSC3). The XSC3 core is an | ||
| 15 | * extension to Intel's original XScale core that adds the following | ||
| 16 | * features: | ||
| 17 | * | ||
| 18 | * - ARMv6 Supersections | ||
| 19 | * - Low Locality Reference pages (replaces mini-cache) | ||
