Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm

* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm:
[ARM] 4017/1: [Jornada7xx] - Updating Jornada720.c
[ARM] 3992/1: i.MX/MX1 CPU Frequency scaling support
[ARM] Provide a method to alter the control register
[ARM] 4016/1: prefetch macro is wrong wrt gcc's "delete-null-pointer-checks"
[ARM] Remove empty fixup function
[ARM] 4014/1: include drivers/hid/Kconfig
[ARM] 4013/1: clocksource driver for netx
[ARM] 4012/1: Clocksource for pxa
[ARM] Clean up ioremap code
[ARM] Unuse another Linux PTE bit
[ARM] Clean up KERNEL_RAM_ADDR
[ARM] Add sys_*at syscalls
[ARM] 4004/1: S3C24XX: UDC remove implict addition of VA to regs
[ARM] Formalise the ARMv6 processor name string
[ARM] Handle HWCAP_VFP in VFP support code
[ARM] 4011/1: AT91SAM9260: Fix compilation with NAND driver
[ARM] 4010/1: AT91SAM9260-EK board: Prepare for MACB Ethernet support

+814 -254
+12 -1
arch/arm/Kconfig
··· 740 741 endmenu 742 743 - if (ARCH_SA1100 || ARCH_INTEGRATOR || ARCH_OMAP) 744 745 menu "CPU Frequency scaling" 746 ··· 766 For details, take a look at <file:Documentation/cpu-freq>. 767 768 If in doubt, say Y. 769 770 endmenu 771 ··· 953 source "drivers/video/Kconfig" 954 955 source "sound/Kconfig" 956 957 source "drivers/usb/Kconfig" 958
··· 740 741 endmenu 742 743 + if (ARCH_SA1100 || ARCH_INTEGRATOR || ARCH_OMAP || ARCH_IMX ) 744 745 menu "CPU Frequency scaling" 746 ··· 766 For details, take a look at <file:Documentation/cpu-freq>. 767 768 If in doubt, say Y. 769 + 770 + config CPU_FREQ_IMX 771 + tristate "CPUfreq driver for i.MX CPUs" 772 + depends on ARCH_IMX && CPU_FREQ 773 + default n 774 + help 775 + This enables the CPUfreq driver for i.MX CPUs. 776 + 777 + If in doubt, say N. 778 779 endmenu 780 ··· 944 source "drivers/video/Kconfig" 945 946 source "sound/Kconfig" 947 + 948 + source "drivers/hid/Kconfig" 949 950 source "drivers/usb/Kconfig" 951
+13
arch/arm/kernel/calls.S
··· 331 CALL(sys_mbind) 332 /* 320 */ CALL(sys_get_mempolicy) 333 CALL(sys_set_mempolicy) 334 #ifndef syscalls_counted 335 .equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls 336 #define syscalls_counted
··· 331 CALL(sys_mbind) 332 /* 320 */ CALL(sys_get_mempolicy) 333 CALL(sys_set_mempolicy) 334 + CALL(sys_openat) 335 + CALL(sys_mkdirat) 336 + CALL(sys_mknodat) 337 + /* 325 */ CALL(sys_fchownat) 338 + CALL(sys_futimesat) 339 + CALL(sys_fstatat64) 340 + CALL(sys_unlinkat) 341 + CALL(sys_renameat) 342 + /* 330 */ CALL(sys_linkat) 343 + CALL(sys_symlinkat) 344 + CALL(sys_readlinkat) 345 + CALL(sys_fchmodat) 346 + CALL(sys_faccessat) 347 #ifndef syscalls_counted 348 .equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls 349 #define syscalls_counted
+10 -9
arch/arm/kernel/head.S
··· 22 #include <asm/thread_info.h> 23 #include <asm/system.h> 24 25 - #define KERNEL_RAM_ADDR (PAGE_OFFSET + TEXT_OFFSET) 26 27 /* 28 * swapper_pg_dir is the virtual address of the initial page table. 29 - * We place the page tables 16K below KERNEL_RAM_ADDR. Therefore, we must 30 - * make sure that KERNEL_RAM_ADDR is correctly set. Currently, we expect 31 * the least significant 16 bits to be 0x8000, but we could probably 32 - * relax this restriction to KERNEL_RAM_ADDR >= PAGE_OFFSET + 0x4000. 33 */ 34 - #if (KERNEL_RAM_ADDR & 0xffff) != 0x8000 35 - #error KERNEL_RAM_ADDR must start at 0xXXXX8000 36 #endif 37 38 .globl swapper_pg_dir 39 - .equ swapper_pg_dir, KERNEL_RAM_ADDR - 0x4000 40 41 .macro pgtbl, rd 42 - ldr \rd, =(__virt_to_phys(KERNEL_RAM_ADDR - 0x4000)) 43 .endm 44 45 #ifdef CONFIG_XIP_KERNEL 46 #define TEXTADDR XIP_VIRT_ADDR(CONFIG_XIP_PHYS_ADDR) 47 #else 48 - #define TEXTADDR KERNEL_RAM_ADDR 49 #endif 50 51 /*
··· 22 #include <asm/thread_info.h> 23 #include <asm/system.h> 24 25 + #define KERNEL_RAM_VADDR (PAGE_OFFSET + TEXT_OFFSET) 26 + #define KERNEL_RAM_PADDR (PHYS_OFFSET + TEXT_OFFSET) 27 28 /* 29 * swapper_pg_dir is the virtual address of the initial page table. 30 + * We place the page tables 16K below KERNEL_RAM_VADDR. Therefore, we must 31 + * make sure that KERNEL_RAM_VADDR is correctly set. Currently, we expect 32 * the least significant 16 bits to be 0x8000, but we could probably 33 + * relax this restriction to KERNEL_RAM_VADDR >= PAGE_OFFSET + 0x4000. 34 */ 35 + #if (KERNEL_RAM_VADDR & 0xffff) != 0x8000 36 + #error KERNEL_RAM_VADDR must start at 0xXXXX8000 37 #endif 38 39 .globl swapper_pg_dir 40 + .equ swapper_pg_dir, KERNEL_RAM_VADDR - 0x4000 41 42 .macro pgtbl, rd 43 + ldr \rd, =(KERNEL_RAM_PADDR - 0x4000) 44 .endm 45 46 #ifdef CONFIG_XIP_KERNEL 47 #define TEXTADDR XIP_VIRT_ADDR(CONFIG_XIP_PHYS_ADDR) 48 #else 49 + #define TEXTADDR KERNEL_RAM_VADDR 50 #endif 51 52 /*
-3
arch/arm/kernel/setup.c
··· 354 #ifndef CONFIG_ARM_THUMB 355 elf_hwcap &= ~HWCAP_THUMB; 356 #endif 357 - #ifndef CONFIG_VFP 358 - elf_hwcap &= ~HWCAP_VFP; 359 - #endif 360 361 cpu_proc_init(); 362 }
··· 354 #ifndef CONFIG_ARM_THUMB 355 elf_hwcap &= ~HWCAP_THUMB; 356 #endif 357 358 cpu_proc_init(); 359 }
+1
arch/arm/mach-at91rm9200/at91sam9260_devices.c
··· 18 #include <asm/arch/gpio.h> 19 #include <asm/arch/at91sam9260.h> 20 #include <asm/arch/at91sam926x_mc.h> 21 22 #include "generic.h" 23
··· 18 #include <asm/arch/gpio.h> 19 #include <asm/arch/at91sam9260.h> 20 #include <asm/arch/at91sam926x_mc.h> 21 + #include <asm/arch/at91sam9260_matrix.h> 22 23 #include "generic.h" 24
+1
arch/arm/mach-at91rm9200/board-sam9260ek.c
··· 119 * MACB Ethernet device 120 */ 121 static struct __initdata eth_platform_data ek_macb_data = { 122 .is_rmii = 1, 123 }; 124
··· 119 * MACB Ethernet device 120 */ 121 static struct __initdata eth_platform_data ek_macb_data = { 122 + .phy_irq_pin = AT91_PIN_PA7, 123 .is_rmii = 1, 124 }; 125
+2
arch/arm/mach-imx/Makefile
··· 9 10 obj-y += irq.o time.o dma.o generic.o 11 12 # Specific board support 13 obj-$(CONFIG_ARCH_MX1ADS) += mx1ads.o 14
··· 9 10 obj-y += irq.o time.o dma.o generic.o 11 12 + obj-$(CONFIG_CPU_FREQ_IMX) += cpufreq.o 13 + 14 # Specific board support 15 obj-$(CONFIG_ARCH_MX1ADS) += mx1ads.o 16
+287
arch/arm/mach-imx/cpufreq.c
···
··· 1 + /* 2 + * cpu.c: clock scaling for the iMX 3 + * 4 + * Copyright (C) 2000 2001, The Delft University of Technology 5 + * Copyright (c) 2004 Sascha Hauer <sascha@saschahauer.de> 6 + * Copyright (C) 2006 Inky Lung <ilung@cwlinux.com> 7 + * Copyright (C) 2006 Pavel Pisa, PiKRON <ppisa@pikron.com> 8 + * 9 + * Based on SA1100 version written by: 10 + * - Johan Pouwelse (J.A.Pouwelse@its.tudelft.nl): initial version 11 + * - Erik Mouw (J.A.K.Mouw@its.tudelft.nl): 12 + * 13 + * This program is free software; you can redistribute it and/or modify 14 + * it under the terms of the GNU General Public License as published by 15 + * the Free Software Foundation; either version 2 of the License, or 16 + * (at your option) any later version. 17 + * 18 + * This program is distributed in the hope that it will be useful, 19 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 + * GNU General Public License for more details. 22 + * 23 + * You should have received a copy of the GNU General Public License 24 + * along with this program; if not, write to the Free Software 25 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 26 + * 27 + */ 28 + 29 + /*#define DEBUG*/ 30 + 31 + #include <linux/kernel.h> 32 + #include <linux/types.h> 33 + #include <linux/init.h> 34 + #include <linux/cpufreq.h> 35 + #include <asm/system.h> 36 + 37 + #include <asm/hardware.h> 38 + 39 + #include "generic.h" 40 + 41 + #ifndef __val2mfld 42 + #define __val2mfld(mask,val) (((mask)&~((mask)<<1))*(val)&(mask)) 43 + #endif 44 + #ifndef __mfld2val 45 + #define __mfld2val(mask,val) (((val)&(mask))/((mask)&~((mask)<<1))) 46 + #endif 47 + 48 + #define CR_920T_CLOCK_MODE 0xC0000000 49 + #define CR_920T_FASTBUS_MODE 0x00000000 50 + #define CR_920T_ASYNC_MODE 0xC0000000 51 + 52 + static u32 mpctl0_at_boot; 53 + 54 + static void imx_set_async_mode(void) 55 + { 56 + adjust_cr(CR_920T_CLOCK_MODE, CR_920T_ASYNC_MODE); 57 + } 58 + 59 + static void imx_set_fastbus_mode(void) 60 + { 61 + adjust_cr(CR_920T_CLOCK_MODE, CR_920T_FASTBUS_MODE); 62 + } 63 + 64 + static void imx_set_mpctl0(u32 mpctl0) 65 + { 66 + unsigned long flags; 67 + 68 + if (mpctl0 == 0) { 69 + local_irq_save(flags); 70 + CSCR &= ~CSCR_MPEN; 71 + local_irq_restore(flags); 72 + return; 73 + } 74 + 75 + local_irq_save(flags); 76 + MPCTL0 = mpctl0; 77 + CSCR |= CSCR_MPEN; 78 + local_irq_restore(flags); 79 + } 80 + 81 + /** 82 + * imx_compute_mpctl - compute new PLL parameters 83 + * @new_mpctl: pointer to location assigned by new PLL control register value 84 + * @cur_mpctl: current PLL control register parameters 85 + * @freq: required frequency in Hz 86 + * @relation: is one of %CPUFREQ_RELATION_L (supremum) 87 + * and %CPUFREQ_RELATION_H (infimum) 88 + */ 89 + long imx_compute_mpctl(u32 *new_mpctl, u32 cur_mpctl, unsigned long freq, int relation) 90 + { 91 + u32 f_ref = (CSCR & CSCR_SYSTEM_SEL) ? 16000000 : (CLK32 * 512); 92 + u32 mfi; 93 + u32 mfn; 94 + u32 mfd; 95 + u32 pd; 96 + unsigned long long ll; 97 + long l; 98 + long quot; 99 + 100 + /* Fdppl=2*Fref*(MFI+MFN/(MFD+1))/(PD+1) */ 101 + /* PD=<0,15>, MFD=<1,1023>, MFI=<5,15> MFN=<0,1022> */ 102 + 103 + if (cur_mpctl) { 104 + mfd = ((cur_mpctl >> 16) & 0x3ff) + 1; 105 + pd = ((cur_mpctl >> 26) & 0xf) + 1; 106 + } else { 107 + pd=2; mfd=313; 108 + } 109 + 110 + /* pd=2; mfd=313; mfi=8; mfn=183; */ 111 + /* (MFI+MFN/(MFD)) = Fdppl / (2*Fref) * (PD); */ 112 + 113 + quot = (f_ref + (1 << 9)) >> 10; 114 + l = (freq * pd + quot) / (2 * quot); 115 + mfi = l >> 10; 116 + mfn = ((l & ((1 << 10) - 1)) * mfd + (1 << 9)) >> 10; 117 + 118 + mfd -= 1; 119 + pd -= 1; 120 + 121 + *new_mpctl = ((mfi & 0xf) << 10) | (mfn & 0x3ff) | ((mfd & 0x3ff) << 16) 122 + | ((pd & 0xf) << 26); 123 + 124 + ll = 2 * (unsigned long long)f_ref * ( (mfi<<16) + (mfn<<16) / (mfd+1) ); 125 + quot = (pd+1) * (1<<16); 126 + ll += quot / 2; 127 + do_div(ll, quot); 128 + freq = ll; 129 + 130 + pr_debug(KERN_DEBUG "imx: new PLL parameters pd=%d mfd=%d mfi=%d mfn=%d, freq=%ld\n", 131 + pd, mfd, mfi, mfn, freq); 132 + 133 + return freq; 134 + } 135 + 136 + 137 + static int imx_verify_speed(struct cpufreq_policy *policy) 138 + { 139 + if (policy->cpu != 0) 140 + return -EINVAL; 141 + 142 + cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq, policy->cpuinfo.max_freq); 143 + 144 + return 0; 145 + } 146 + 147 + static unsigned int imx_get_speed(unsigned int cpu) 148 + { 149 + unsigned int freq; 150 + unsigned int cr; 151 + unsigned int cscr; 152 + unsigned int bclk_div; 153 + 154 + if (cpu) 155 + return 0; 156 + 157 + cscr = CSCR; 158 + bclk_div = __mfld2val(CSCR_BCLK_DIV, cscr) + 1; 159 + cr = get_cr(); 160 + 161 + if((cr & CR_920T_CLOCK_MODE) == CR_920T_FASTBUS_MODE) { 162 + freq = imx_get_system_clk(); 163 + freq = (freq + bclk_div/2) / bclk_div; 164 + } else { 165 + freq = imx_get_mcu_clk(); 166 + if (cscr & CSCR_MPU_PRESC) 167 + freq /= 2; 168 + } 169 + 170 + freq = (freq + 500) / 1000; 171 + 172 + return freq; 173 + } 174 + 175 + static int imx_set_target(struct cpufreq_policy *policy, 176 + unsigned int target_freq, 177 + unsigned int relation) 178 + { 179 + struct cpufreq_freqs freqs; 180 + u32 mpctl0 = 0; 181 + u32 cscr; 182 + unsigned long flags; 183 + long freq; 184 + long sysclk; 185 + unsigned int bclk_div = 1; 186 + 187 + freq = target_freq * 1000; 188 + 189 + pr_debug(KERN_DEBUG "imx: requested frequency %ld Hz, mpctl0 at boot 0x%08x\n", 190 + freq, mpctl0_at_boot); 191 + 192 + sysclk = imx_get_system_clk(); 193 + 194 + if (freq > sysclk + 1000000) { 195 + freq = imx_compute_mpctl(&mpctl0, mpctl0_at_boot, freq, relation); 196 + if (freq < 0) { 197 + printk(KERN_WARNING "imx: target frequency %ld Hz cannot be set\n", freq); 198 + return -EINVAL; 199 + } 200 + } else { 201 + if(freq + 1000 < sysclk) { 202 + if (relation == CPUFREQ_RELATION_L) 203 + bclk_div = (sysclk - 1000) / freq; 204 + else 205 + bclk_div = (sysclk + freq + 1000) / freq; 206 + 207 + if(bclk_div > 16) 208 + bclk_div = 16; 209 + } 210 + freq = (sysclk + bclk_div / 2) / bclk_div; 211 + } 212 + 213 + freqs.old = imx_get_speed(0); 214 + freqs.new = (freq + 500) / 1000; 215 + freqs.cpu = 0; 216 + freqs.flags = 0; 217 + 218 + cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); 219 + 220 + local_irq_save(flags); 221 + 222 + imx_set_fastbus_mode(); 223 + 224 + imx_set_mpctl0(mpctl0); 225 + 226 + cscr = CSCR; 227 + cscr &= ~CSCR_BCLK_DIV; 228 + cscr |= __val2mfld(CSCR_BCLK_DIV, bclk_div - 1); 229 + CSCR = cscr; 230 + 231 + if(mpctl0) { 232 + CSCR |= CSCR_MPLL_RESTART; 233 + 234 + /* Wait until MPLL is stablized */ 235 + while( CSCR & CSCR_MPLL_RESTART ); 236 + 237 + imx_set_async_mode(); 238 + } 239 + 240 + local_irq_restore(flags); 241 + 242 + cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); 243 + 244 + pr_debug(KERN_INFO "imx: set frequency %ld Hz, running from %s\n", 245 + freq, mpctl0? "MPLL": "SPLL"); 246 + 247 + return 0; 248 + } 249 + 250 + static int __init imx_cpufreq_driver_init(struct cpufreq_policy *policy) 251 + { 252 + printk(KERN_INFO "i.MX cpu freq change driver v1.0\n"); 253 + 254 + if (policy->cpu != 0) 255 + return -EINVAL; 256 + 257 + policy->cur = policy->min = policy->max = imx_get_speed(0); 258 + policy->governor = CPUFREQ_DEFAULT_GOVERNOR; 259 + policy->cpuinfo.min_freq = 8000; 260 + policy->cpuinfo.max_freq = 200000; 261 + policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; 262 + return 0; 263 + } 264 + 265 + static struct cpufreq_driver imx_driver = { 266 + .flags = CPUFREQ_STICKY, 267 + .verify = imx_verify_speed, 268 + .target = imx_set_target, 269 + .get = imx_get_speed, 270 + .init = imx_cpufreq_driver_init, 271 + .name = "imx", 272 + }; 273 + 274 + static int __init imx_cpufreq_init(void) 275 + { 276 + 277 + mpctl0_at_boot = 0; 278 + 279 + if((CSCR & CSCR_MPEN) && 280 + ((get_cr() & CR_920T_CLOCK_MODE) != CR_920T_FASTBUS_MODE)) 281 + mpctl0_at_boot = MPCTL0; 282 + 283 + return cpufreq_register_driver(&imx_driver); 284 + } 285 + 286 + arch_initcall(imx_cpufreq_init); 287 +
+30 -12
arch/arm/mach-netx/time.c
··· 19 20 #include <linux/init.h> 21 #include <linux/interrupt.h> 22 23 #include <asm/hardware.h> 24 #include <asm/io.h> 25 #include <asm/mach/time.h> 26 #include <asm/arch/netx-regs.h> 27 - 28 - /* 29 - * Returns number of us since last clock interrupt. Note that interrupts 30 - * will have been disabled by do_gettimeoffset() 31 - */ 32 - static unsigned long netx_gettimeoffset(void) 33 - { 34 - return readl(NETX_GPIO_COUNTER_CURRENT(0)) / 100; 35 - } 36 37 /* 38 * IRQ handler for the timer ··· 36 write_seqlock(&xtime_lock); 37 38 timer_tick(); 39 write_sequnlock(&xtime_lock); 40 41 /* acknowledge interrupt */ ··· 45 return IRQ_HANDLED; 46 } 47 48 - 49 static struct irqaction netx_timer_irq = { 50 .name = "NetX Timer Tick", 51 .flags = IRQF_DISABLED | IRQF_TIMER, 52 .handler = netx_timer_interrupt, 53 }; 54 55 /* ··· 87 NETX_GPIO_COUNTER_CTRL(0)); 88 89 setup_irq(NETX_IRQ_TIMER0, &netx_timer_irq); 90 } 91 92 struct sys_timer netx_timer = { 93 - .init = netx_timer_init, 94 - .offset = netx_gettimeoffset, 95 };
··· 19 20 #include <linux/init.h> 21 #include <linux/interrupt.h> 22 + #include <linux/irq.h> 23 + #include <linux/clocksource.h> 24 25 #include <asm/hardware.h> 26 #include <asm/io.h> 27 #include <asm/mach/time.h> 28 #include <asm/arch/netx-regs.h> 29 30 /* 31 * IRQ handler for the timer ··· 43 write_seqlock(&xtime_lock); 44 45 timer_tick(); 46 + 47 write_sequnlock(&xtime_lock); 48 49 /* acknowledge interrupt */ ··· 51 return IRQ_HANDLED; 52 } 53 54 static struct irqaction netx_timer_irq = { 55 .name = "NetX Timer Tick", 56 .flags = IRQF_DISABLED | IRQF_TIMER, 57 .handler = netx_timer_interrupt, 58 + }; 59 + 60 + cycle_t netx_get_cycles(void) 61 + { 62 + return readl(NETX_GPIO_COUNTER_CURRENT(1)); 63 + } 64 + 65 + static struct clocksource clocksource_netx = { 66 + .name = "netx_timer", 67 + .rating = 200, 68 + .read = netx_get_cycles, 69 + .mask = CLOCKSOURCE_MASK(32), 70 + .shift = 20, 71 + .is_continuous = 1, 72 }; 73 74 /* ··· 80 NETX_GPIO_COUNTER_CTRL(0)); 81 82 setup_irq(NETX_IRQ_TIMER0, &netx_timer_irq); 83 + 84 + /* Setup timer one for clocksource */ 85 + writel(0, NETX_GPIO_COUNTER_CTRL(1)); 86 + writel(0, NETX_GPIO_COUNTER_CURRENT(1)); 87 + writel(0xFFFFFFFF, NETX_GPIO_COUNTER_MAX(1)); 88 + 89 + writel(NETX_GPIO_COUNTER_CTRL_RUN, 90 + NETX_GPIO_COUNTER_CTRL(1)); 91 + 92 + clocksource_netx.mult = 93 + clocksource_hz2mult(CLOCK_TICK_RATE, clocksource_netx.shift); 94 + clocksource_register(&clocksource_netx); 95 } 96 97 struct sys_timer netx_timer = { 98 + .init = netx_timer_init, 99 };
+23 -22
arch/arm/mach-pxa/time.c
··· 18 #include <linux/signal.h> 19 #include <linux/errno.h> 20 #include <linux/sched.h> 21 22 #include <asm/system.h> 23 #include <asm/hardware.h> ··· 47 } 48 RCNR = current_time; 49 return 0; 50 - } 51 - 52 - /* IRQs are disabled before entering here from do_gettimeofday() */ 53 - static unsigned long pxa_gettimeoffset (void) 54 - { 55 - long ticks_to_match, elapsed, usec; 56 - 57 - /* Get ticks before next timer match */ 58 - ticks_to_match = OSMR0 - OSCR; 59 - 60 - /* We need elapsed ticks since last match */ 61 - elapsed = LATCH - ticks_to_match; 62 - 63 - /* don't get fooled by the workaround in pxa_timer_interrupt() */ 64 - if (elapsed <= 0) 65 - return 0; 66 - 67 - /* Now convert them to usec */ 68 - usec = (unsigned long)(elapsed * (tick_nsec / 1000))/LATCH; 69 - 70 - return usec; 71 } 72 73 #ifdef CONFIG_NO_IDLE_HZ ··· 101 .handler = pxa_timer_interrupt, 102 }; 103 104 static void __init pxa_timer_init(void) 105 { 106 struct timespec tv; ··· 133 OIER = OIER_E0; /* enable match on timer 0 to cause interrupts */ 134 OSMR0 = OSCR + LATCH; /* set initial match */ 135 local_irq_restore(flags); 136 } 137 138 #ifdef CONFIG_NO_IDLE_HZ ··· 213 .init = pxa_timer_init, 214 .suspend = pxa_timer_suspend, 215 .resume = pxa_timer_resume, 216 - .offset = pxa_gettimeoffset, 217 #ifdef CONFIG_NO_IDLE_HZ 218 .dyn_tick = &pxa_dyn_tick, 219 #endif
··· 18 #include <linux/signal.h> 19 #include <linux/errno.h> 20 #include <linux/sched.h> 21 + #include <linux/clocksource.h> 22 23 #include <asm/system.h> 24 #include <asm/hardware.h> ··· 46 } 47 RCNR = current_time; 48 return 0; 49 } 50 51 #ifdef CONFIG_NO_IDLE_HZ ··· 121 .handler = pxa_timer_interrupt, 122 }; 123 124 + cycle_t pxa_get_cycles(void) 125 + { 126 + return OSCR; 127 + } 128 + 129 + static struct clocksource clocksource_pxa = { 130 + .name = "pxa_timer", 131 + .rating = 200, 132 + .read = pxa_get_cycles, 133 + .mask = CLOCKSOURCE_MASK(32), 134 + .shift = 20, 135 + .is_continuous = 1, 136 + }; 137 + 138 static void __init pxa_timer_init(void) 139 { 140 struct timespec tv; ··· 139 OIER = OIER_E0; /* enable match on timer 0 to cause interrupts */ 140 OSMR0 = OSCR + LATCH; /* set initial match */ 141 local_irq_restore(flags); 142 + 143 + /* on PXA OSCR runs continiously and is not written to, so we can use it 144 + * as clock source directly. 145 + */ 146 + clocksource_pxa.mult = 147 + clocksource_hz2mult(CLOCK_TICK_RATE, clocksource_pxa.shift); 148 + clocksource_register(&clocksource_pxa); 149 + 150 } 151 152 #ifdef CONFIG_NO_IDLE_HZ ··· 211 .init = pxa_timer_init, 212 .suspend = pxa_timer_suspend, 213 .resume = pxa_timer_resume, 214 #ifdef CONFIG_NO_IDLE_HZ 215 .dyn_tick = &pxa_dyn_tick, 216 #endif
-5
arch/arm/mach-pxa/trizeps4.c
··· 393 .pxafb_backlight_power = board_backlight_power, 394 }; 395 396 - static void __init trizeps4_fixup(struct machine_desc *desc, struct tag *tags, char **cmdline, struct meminfo *mi) 397 - { 398 - } 399 - 400 static void __init trizeps4_init(void) 401 { 402 platform_add_devices(trizeps4_devices, ARRAY_SIZE(trizeps4_devices)); ··· 465 .phys_io = 0x40000000, 466 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, 467 .boot_params = TRIZEPS4_SDRAM_BASE + 0x100, 468 - .fixup = trizeps4_fixup, 469 .init_machine = trizeps4_init, 470 .map_io = trizeps4_map_io, 471 .init_irq = pxa_init_irq,
··· 393 .pxafb_backlight_power = board_backlight_power, 394 }; 395 396 static void __init trizeps4_init(void) 397 { 398 platform_add_devices(trizeps4_devices, ARRAY_SIZE(trizeps4_devices)); ··· 469 .phys_io = 0x40000000, 470 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, 471 .boot_params = TRIZEPS4_SDRAM_BASE + 0x100, 472 .init_machine = trizeps4_init, 473 .map_io = trizeps4_map_io, 474 .init_irq = pxa_init_irq,
+204 -25
arch/arm/mach-sa1100/jornada720.c
··· 1 /* 2 * linux/arch/arm/mach-sa1100/jornada720.c 3 */ 4 5 #include <linux/init.h> ··· 20 #include <linux/ioport.h> 21 #include <linux/mtd/mtd.h> 22 #include <linux/mtd/partitions.h> 23 24 #include <asm/hardware.h> 25 #include <asm/hardware/sa1111.h> 26 #include <asm/irq.h> 27 #include <asm/mach-types.h> 28 #include <asm/setup.h> 29 - 30 #include <asm/mach/arch.h> 31 #include <asm/mach/flash.h> 32 #include <asm/mach/map.h> ··· 34 35 #include "generic.h" 36 37 38 - #define JORTUCR_VAL 0x20000400 39 40 static struct resource sa1111_resources[] = { 41 [0] = { 42 - .start = 0x40000000, 43 - .end = 0x40001fff, 44 .flags = IORESOURCE_MEM, 45 }, 46 [1] = { ··· 220 .resource = sa1111_resources, 221 }; 222 223 static struct platform_device *devices[] __initdata = { 224 &sa1111_device, 225 }; 226 227 static int __init jornada720_init(void) 228 { ··· 243 244 if (machine_is_jornada720()) { 245 GPDR |= GPIO_GPIO20; 246 - TUCR = JORTUCR_VAL; /* set the oscillator out to the SA-1101 */ 247 - 248 GPSR = GPIO_GPIO20; 249 udelay(1); 250 GPCR = GPIO_GPIO20; 251 udelay(1); 252 GPSR = GPIO_GPIO20; 253 udelay(20); 254 - 255 - /* LDD4 is speaker, LDD3 is microphone */ 256 - PPSR &= ~(PPC_LDD3 | PPC_LDD4); 257 - PPDR |= PPC_LDD3 | PPC_LDD4; 258 259 ret = platform_add_devices(devices, ARRAY_SIZE(devices)); 260 } ··· 262 263 static struct map_desc jornada720_io_desc[] __initdata = { 264 { /* Epson registers */ 265 - .virtual = 0xf0000000, 266 - .pfn = __phys_to_pfn(0x48000000), 267 - .length = 0x00100000, 268 .type = MT_DEVICE 269 }, { /* Epson frame buffer */ 270 - .virtual = 0xf1000000, 271 - .pfn = __phys_to_pfn(0x48200000), 272 - .length = 0x00100000, 273 .type = MT_DEVICE 274 }, { /* SA-1111 */ 275 - .virtual = 0xf4000000, 276 - .pfn = __phys_to_pfn(0x40000000), 277 - .length = 0x00100000, 278 .type = MT_DEVICE 279 } 280 }; ··· 283 { 284 sa1100_map_io(); 285 iotable_init(jornada720_io_desc, ARRAY_SIZE(jornada720_io_desc)); 286 - 287 sa1100_register_uart(0, 3); 288 sa1100_register_uart(1, 1); 289 } ··· 293 .name = "JORNADA720 boot firmware", 294 .size = 0x00040000, 295 .offset = 0, 296 - .mask_flags = MTD_WRITEABLE, /* force read-only */ 297 }, { 298 .name = "JORNADA720 kernel", 299 .size = 0x000c0000, ··· 316 .offset = 0x00540000, 317 }, { 318 .name = "JORNADA720 usr local", 319 - .size = 0, /* will expand to the end of the flash */ 320 .offset = 0x00d00000, 321 } 322 }; ··· 324 static void jornada720_set_vpp(int vpp) 325 { 326 if (vpp) 327 - PPSR |= 0x80; 328 else 329 - PPSR &= ~0x80; 330 - PPDR |= 0x80; 331 } 332 333 static struct flash_platform_data jornada720_flash_data = {
··· 1 /* 2 * linux/arch/arm/mach-sa1100/jornada720.c 3 + * 4 + * HP Jornada720 init code 5 + * 6 + * Copyright (C) 2006 Filip Zyzniewski <filip.zyzniewski@tefnet.pl> 7 + * Copyright (C) 2005 Michael Gernoth <michael@gernoth.net> 8 + * 9 + * This program is free software; you can redistribute it and/or modify 10 + * it under the terms of the GNU General Public License version 2 as 11 + * published by the Free Software Foundation. 12 + * 13 */ 14 15 #include <linux/init.h> ··· 10 #include <linux/ioport.h> 11 #include <linux/mtd/mtd.h> 12 #include <linux/mtd/partitions.h> 13 + #include <video/s1d13xxxfb.h> 14 15 #include <asm/hardware.h> 16 #include <asm/hardware/sa1111.h> 17 #include <asm/irq.h> 18 #include <asm/mach-types.h> 19 #include <asm/setup.h> 20 #include <asm/mach/arch.h> 21 #include <asm/mach/flash.h> 22 #include <asm/mach/map.h> ··· 24 25 #include "generic.h" 26 27 + /* 28 + * HP Documentation referred in this file: 29 + * http://www.jlime.com/downloads/development/docs/jornada7xx/jornada720.txt 30 + */ 31 32 + /* line 110 of HP's doc */ 33 + #define TUCR_VAL 0x20000400 34 + 35 + /* memory space (line 52 of HP's doc) */ 36 + #define SA1111REGSTART 0x40000000 37 + #define SA1111REGLEN 0x00001fff 38 + #define EPSONREGSTART 0x48000000 39 + #define EPSONREGLEN 0x00100000 40 + #define EPSONFBSTART 0x48200000 41 + /* 512kB framebuffer */ 42 + #define EPSONFBLEN 512*1024 43 + 44 + static struct s1d13xxxfb_regval s1d13xxxfb_initregs[] = { 45 + /* line 344 of HP's doc */ 46 + {0x0001,0x00}, // Miscellaneous Register 47 + {0x01FC,0x00}, // Display Mode Register 48 + {0x0004,0x00}, // General IO Pins Configuration Register 0 49 + {0x0005,0x00}, // General IO Pins Configuration Register 1 50 + {0x0008,0x00}, // General IO Pins Control Register 0 51 + {0x0009,0x00}, // General IO Pins Control Register 1 52 + {0x0010,0x01}, // Memory Clock Configuration Register 53 + {0x0014,0x11}, // LCD Pixel Clock Configuration Register 54 + {0x0018,0x01}, // CRT/TV Pixel Clock Configuration Register 55 + {0x001C,0x01}, // MediaPlug Clock Configuration Register 56 + {0x001E,0x01}, // CPU To Memory Wait State Select Register 57 + {0x0020,0x00}, // Memory Configuration Register 58 + {0x0021,0x45}, // DRAM Refresh Rate Register 59 + {0x002A,0x01}, // DRAM Timings Control Register 0 60 + {0x002B,0x03}, // DRAM Timings Control Register 1 61 + {0x0030,0x1c}, // Panel Type Register 62 + {0x0031,0x00}, // MOD Rate Register 63 + {0x0032,0x4F}, // LCD Horizontal Display Width Register 64 + {0x0034,0x07}, // LCD Horizontal Non-Display Period Register 65 + {0x0035,0x01}, // TFT FPLINE Start Position Register 66 + {0x0036,0x0B}, // TFT FPLINE Pulse Width Register 67 + {0x0038,0xEF}, // LCD Vertical Display Height Register 0 68 + {0x0039,0x00}, // LCD Vertical Display Height Register 1 69 + {0x003A,0x13}, // LCD Vertical Non-Display Period Register 70 + {0x003B,0x0B}, // TFT FPFRAME Start Position Register 71 + {0x003C,0x01}, // TFT FPFRAME Pulse Width Register 72 + {0x0040,0x05}, // LCD Display Mode Register (2:4bpp,3:8bpp,5:16bpp) 73 + {0x0041,0x00}, // LCD Miscellaneous Register 74 + {0x0042,0x00}, // LCD Display Start Address Register 0 75 + {0x0043,0x00}, // LCD Display Start Address Register 1 76 + {0x0044,0x00}, // LCD Display Start Address Register 2 77 + {0x0046,0x80}, // LCD Memory Address Offset Register 0 78 + {0x0047,0x02}, // LCD Memory Address Offset Register 1 79 + {0x0048,0x00}, // LCD Pixel Panning Register 80 + {0x004A,0x00}, // LCD Display FIFO High Threshold Control Register 81 + {0x004B,0x00}, // LCD Display FIFO Low Threshold Control Register 82 + {0x0050,0x4F}, // CRT/TV Horizontal Display Width Register 83 + {0x0052,0x13}, // CRT/TV Horizontal Non-Display Period Register 84 + {0x0053,0x01}, // CRT/TV HRTC Start Position Register 85 + {0x0054,0x0B}, // CRT/TV HRTC Pulse Width Register 86 + {0x0056,0xDF}, // CRT/TV Vertical Display Height Register 0 87 + {0x0057,0x01}, // CRT/TV Vertical Display Height Register 1 88 + {0x0058,0x2B}, // CRT/TV Vertical Non-Display Period Register 89 + {0x0059,0x09}, // CRT/TV VRTC Start Position Register 90 + {0x005A,0x01}, // CRT/TV VRTC Pulse Width Register 91 + {0x005B,0x10}, // TV Output Control Register 92 + {0x0060,0x03}, // CRT/TV Display Mode Register (2:4bpp,3:8bpp,5:16bpp) 93 + {0x0062,0x00}, // CRT/TV Display Start Address Register 0 94 + {0x0063,0x00}, // CRT/TV Display Start Address Register 1 95 + {0x0064,0x00}, // CRT/TV Display Start Address Register 2 96 + {0x0066,0x40}, // CRT/TV Memory Address Offset Register 0 97 + {0x0067,0x01}, // CRT/TV Memory Address Offset Register 1 98 + {0x0068,0x00}, // CRT/TV Pixel Panning Register 99 + {0x006A,0x00}, // CRT/TV Display FIFO High Threshold Control Register 100 + {0x006B,0x00}, // CRT/TV Display FIFO Low Threshold Control Register 101 + {0x0070,0x00}, // LCD Ink/Cursor Control Register 102 + {0x0071,0x01}, // LCD Ink/Cursor Start Address Register 103 + {0x0072,0x00}, // LCD Cursor X Position Register 0 104 + {0x0073,0x00}, // LCD Cursor X Position Register 1 105 + {0x0074,0x00}, // LCD Cursor Y Position Register 0 106 + {0x0075,0x00}, // LCD Cursor Y Position Register 1 107 + {0x0076,0x00}, // LCD Ink/Cursor Blue Color 0 Register 108 + {0x0077,0x00}, // LCD Ink/Cursor Green Color 0 Register 109 + {0x0078,0x00}, // LCD Ink/Cursor Red Color 0 Register 110 + {0x007A,0x1F}, // LCD Ink/Cursor Blue Color 1 Register 111 + {0x007B,0x3F}, // LCD Ink/Cursor Green Color 1 Register 112 + {0x007C,0x1F}, // LCD Ink/Cursor Red Color 1 Register 113 + {0x007E,0x00}, // LCD Ink/Cursor FIFO Threshold Register 114 + {0x0080,0x00}, // CRT/TV Ink/Cursor Control Register 115 + {0x0081,0x01}, // CRT/TV Ink/Cursor Start Address Register 116 + {0x0082,0x00}, // CRT/TV Cursor X Position Register 0 117 + {0x0083,0x00}, // CRT/TV Cursor X Position Register 1 118 + {0x0084,0x00}, // CRT/TV Cursor Y Position Register 0 119 + {0x0085,0x00}, // CRT/TV Cursor Y Position Register 1 120 + {0x0086,0x00}, // CRT/TV Ink/Cursor Blue Color 0 Register 121 + {0x0087,0x00}, // CRT/TV Ink/Cursor Green Color 0 Register 122 + {0x0088,0x00}, // CRT/TV Ink/Cursor Red Color 0 Register 123 + {0x008A,0x1F}, // CRT/TV Ink/Cursor Blue Color 1 Register 124 + {0x008B,0x3F}, // CRT/TV Ink/Cursor Green Color 1 Register 125 + {0x008C,0x1F}, // CRT/TV Ink/Cursor Red Color 1 Register 126 + {0x008E,0x00}, // CRT/TV Ink/Cursor FIFO Threshold Register 127 + {0x0100,0x00}, // BitBlt Control Register 0 128 + {0x0101,0x00}, // BitBlt Control Register 1 129 + {0x0102,0x00}, // BitBlt ROP Code/Color Expansion Register 130 + {0x0103,0x00}, // BitBlt Operation Register 131 + {0x0104,0x00}, // BitBlt Source Start Address Register 0 132 + {0x0105,0x00}, // BitBlt Source Start Address Register 1 133 + {0x0106,0x00}, // BitBlt Source Start Address Register 2 134 + {0x0108,0x00}, // BitBlt Destination Start Address Register 0 135 + {0x0109,0x00}, // BitBlt Destination Start Address Register 1 136 + {0x010A,0x00}, // BitBlt Destination Start Address Register 2 137 + {0x010C,0x00}, // BitBlt Memory Address Offset Register 0 138 + {0x010D,0x00}, // BitBlt Memory Address Offset Register 1 139 + {0x0110,0x00}, // BitBlt Width Register 0 140 + {0x0111,0x00}, // BitBlt Width Register 1 141 + {0x0112,0x00}, // BitBlt Height Register 0 142 + {0x0113,0x00}, // BitBlt Height Register 1 143 + {0x0114,0x00}, // BitBlt Background Color Register 0 144 + {0x0115,0x00}, // BitBlt Background Color Register 1 145 + {0x0118,0x00}, // BitBlt Foreground Color Register 0 146 + {0x0119,0x00}, // BitBlt Foreground Color Register 1 147 + {0x01E0,0x00}, // Look-Up Table Mode Register 148 + {0x01E2,0x00}, // Look-Up Table Address Register 149 + /* not sure, wouldn't like to mess with the driver */ 150 + {0x01E4,0x00}, // Look-Up Table Data Register 151 + /* jornada doc says 0x00, but I trust the driver */ 152 + {0x01F0,0x10}, // Power Save Configuration Register 153 + {0x01F1,0x00}, // Power Save Status Register 154 + {0x01F4,0x00}, // CPU-to-Memory Access Watchdog Timer Register 155 + {0x01FC,0x01}, // Display Mode Register(0x01:LCD, 0x02:CRT, 0x03:LCD&CRT) 156 + }; 157 + 158 + static struct s1d13xxxfb_pdata s1d13xxxfb_data = { 159 + .initregs = s1d13xxxfb_initregs, 160 + .initregssize = ARRAY_SIZE(s1d13xxxfb_initregs), 161 + .platform_init_video = NULL 162 + }; 163 + 164 + static struct resource s1d13xxxfb_resources[] = { 165 + [0] = { 166 + .start = EPSONFBSTART, 167 + .end = EPSONFBSTART + EPSONFBLEN, 168 + .flags = IORESOURCE_MEM, 169 + }, 170 + [1] = { 171 + .start = EPSONREGSTART, 172 + .end = EPSONREGSTART + EPSONREGLEN, 173 + .flags = IORESOURCE_MEM, 174 + } 175 + }; 176 + 177 + static struct platform_device s1d13xxxfb_device = { 178 + .name = S1D_DEVICENAME, 179 + .id = 0, 180 + .dev = { 181 + .platform_data = &s1d13xxxfb_data, 182 + }, 183 + .num_resources = ARRAY_SIZE(s1d13xxxfb_resources), 184 + .resource = s1d13xxxfb_resources, 185 + }; 186 187 static struct resource sa1111_resources[] = { 188 [0] = { 189 + .start = SA1111REGSTART, 190 + .end = SA1111REGSTART + SA1111REGLEN, 191 .flags = IORESOURCE_MEM, 192 }, 193 [1] = { ··· 53 .resource = sa1111_resources, 54 }; 55 56 + static struct platform_device jornada720_mcu_device = { 57 + .name = "jornada720_mcu", 58 + .id = -1, 59 + }; 60 + 61 static struct platform_device *devices[] __initdata = { 62 &sa1111_device, 63 + &jornada720_mcu_device, 64 + &s1d13xxxfb_device, 65 }; 66 + 67 + /* a stub for now, we theoretically cannot suspend without a flashboard */ 68 + int pm_suspend(suspend_state_t state) 69 + { 70 + return -1; 71 + } 72 73 static int __init jornada720_init(void) 74 { ··· 63 64 if (machine_is_jornada720()) { 65 GPDR |= GPIO_GPIO20; 66 + /* oscillator setup (line 116 of HP's doc) */ 67 + TUCR = TUCR_VAL; 68 + /* resetting SA1111 (line 118 of HP's doc) */ 69 GPSR = GPIO_GPIO20; 70 udelay(1); 71 GPCR = GPIO_GPIO20; 72 udelay(1); 73 GPSR = GPIO_GPIO20; 74 udelay(20); 75 76 ret = platform_add_devices(devices, ARRAY_SIZE(devices)); 77 } ··· 85 86 static struct map_desc jornada720_io_desc[] __initdata = { 87 { /* Epson registers */ 88 + .virtual = 0xf0000000, 89 + .pfn = __phys_to_pfn(EPSONREGSTART), 90 + .length = EPSONREGLEN, 91 .type = MT_DEVICE 92 }, { /* Epson frame buffer */ 93 + .virtual = 0xf1000000, 94 + .pfn = __phys_to_pfn(EPSONFBSTART), 95 + .length = EPSONFBLEN, 96 .type = MT_DEVICE 97 }, { /* SA-1111 */ 98 + .virtual = 0xf4000000, 99 + .pfn = __phys_to_pfn(SA1111REGSTART), 100 + .length = SA1111REGLEN, 101 .type = MT_DEVICE 102 } 103 }; ··· 106 { 107 sa1100_map_io(); 108 iotable_init(jornada720_io_desc, ARRAY_SIZE(jornada720_io_desc)); 109 + 110 sa1100_register_uart(0, 3); 111 sa1100_register_uart(1, 1); 112 } ··· 116 .name = "JORNADA720 boot firmware", 117 .size = 0x00040000, 118 .offset = 0, 119 + .mask_flags = MTD_WRITEABLE, /* force read-only */ 120 }, { 121 .name = "JORNADA720 kernel", 122 .size = 0x000c0000, ··· 139 .offset = 0x00540000, 140 }, { 141 .name = "JORNADA720 usr local", 142 + .size = 0, /* will expand to the end of the flash */ 143 .offset = 0x00d00000, 144 } 145 }; ··· 147 static void jornada720_set_vpp(int vpp) 148 { 149 if (vpp) 150 + /* enabling flash write (line 470 of HP's doc) */ 151 + PPSR |= PPC_LDD7; 152 else 153 + /* disabling flash write (line 470 of HP's doc) */ 154 + PPSR &= ~PPC_LDD7; 155 + PPDR |= PPC_LDD7; 156 } 157 158 static struct flash_platform_data jornada720_flash_data = {
+1 -1
arch/arm/mm/consistent.c
··· 238 * x86 does not mark the pages reserved... 239 */ 240 SetPageReserved(page); 241 - set_pte(pte, mk_pte(page, prot)); 242 page++; 243 pte++; 244 off++;
··· 238 * x86 does not mark the pages reserved... 239 */ 240 SetPageReserved(page); 241 + set_pte_ext(pte, mk_pte(page, prot), 0); 242 page++; 243 pte++; 244 off++;
+1 -1
arch/arm/mm/copypage-v4mc.c
··· 71 { 72 spin_lock(&minicache_lock); 73 74 - set_pte(TOP_PTE(0xffff8000), pfn_pte(__pa(kfrom) >> PAGE_SHIFT, minicache_pgprot)); 75 flush_tlb_kernel_page(0xffff8000); 76 77 mc_copy_user_page((void *)0xffff8000, kto);
··· 71 { 72 spin_lock(&minicache_lock); 73 74 + set_pte_ext(TOP_PTE(0xffff8000), pfn_pte(__pa(kfrom) >> PAGE_SHIFT, minicache_pgprot), 0); 75 flush_tlb_kernel_page(0xffff8000); 76 77 mc_copy_user_page((void *)0xffff8000, kto);
+3 -3
arch/arm/mm/copypage-v6.c
··· 70 */ 71 spin_lock(&v6_lock); 72 73 - set_pte(TOP_PTE(from_address) + offset, pfn_pte(__pa(kfrom) >> PAGE_SHIFT, PAGE_KERNEL)); 74 - set_pte(TOP_PTE(to_address) + offset, pfn_pte(__pa(kto) >> PAGE_SHIFT, PAGE_KERNEL)); 75 76 from = from_address + (offset << PAGE_SHIFT); 77 to = to_address + (offset << PAGE_SHIFT); ··· 110 */ 111 spin_lock(&v6_lock); 112 113 - set_pte(TOP_PTE(to_address) + offset, pfn_pte(__pa(kaddr) >> PAGE_SHIFT, PAGE_KERNEL)); 114 flush_tlb_kernel_page(to); 115 clear_page((void *)to); 116
··· 70 */ 71 spin_lock(&v6_lock); 72 73 + set_pte_ext(TOP_PTE(from_address) + offset, pfn_pte(__pa(kfrom) >> PAGE_SHIFT, PAGE_KERNEL), 0); 74 + set_pte_ext(TOP_PTE(to_address) + offset, pfn_pte(__pa(kto) >> PAGE_SHIFT, PAGE_KERNEL), 0); 75 76 from = from_address + (offset << PAGE_SHIFT); 77 to = to_address + (offset << PAGE_SHIFT); ··· 110 */ 111 spin_lock(&v6_lock); 112 113 + set_pte_ext(TOP_PTE(to_address) + offset, pfn_pte(__pa(kaddr) >> PAGE_SHIFT, PAGE_KERNEL), 0); 114 flush_tlb_kernel_page(to); 115 clear_page((void *)to); 116
+1 -1
arch/arm/mm/copypage-xscale.c
··· 93 { 94 spin_lock(&minicache_lock); 95 96 - set_pte(TOP_PTE(COPYPAGE_MINICACHE), pfn_pte(__pa(kfrom) >> PAGE_SHIFT, minicache_pgprot)); 97 flush_tlb_kernel_page(COPYPAGE_MINICACHE); 98 99 mc_copy_user_page((void *)COPYPAGE_MINICACHE, kto);
··· 93 { 94 spin_lock(&minicache_lock); 95 96 + set_pte_ext(TOP_PTE(COPYPAGE_MINICACHE), pfn_pte(__pa(kfrom) >> PAGE_SHIFT, minicache_pgprot), 0); 97 flush_tlb_kernel_page(COPYPAGE_MINICACHE); 98 99 mc_copy_user_page((void *)COPYPAGE_MINICACHE, kto);
+1 -1
arch/arm/mm/fault-armv.c
··· 61 if (pte_present(entry) && pte_val(entry) & shared_pte_mask) { 62 flush_cache_page(vma, address, pte_pfn(entry)); 63 pte_val(entry) &= ~shared_pte_mask; 64 - set_pte(pte, entry); 65 flush_tlb_page(vma, address); 66 ret = 1; 67 }
··· 61 if (pte_present(entry) && pte_val(entry) & shared_pte_mask) { 62 flush_cache_page(vma, address, pte_pfn(entry)); 63 pte_val(entry) &= ~shared_pte_mask; 64 + set_pte_at(vma->vm_mm, address, pte, entry); 65 flush_tlb_page(vma, address); 66 ret = 1; 67 }
+1 -1
arch/arm/mm/flush.c
··· 26 unsigned long to = ALIAS_FLUSH_START + (CACHE_COLOUR(vaddr) << PAGE_SHIFT); 27 const int zero = 0; 28 29 - set_pte(TOP_PTE(to), pfn_pte(pfn, PAGE_KERNEL)); 30 flush_tlb_kernel_page(to); 31 32 asm( "mcrr p15, 0, %1, %0, c14\n"
··· 26 unsigned long to = ALIAS_FLUSH_START + (CACHE_COLOUR(vaddr) << PAGE_SHIFT); 27 const int zero = 0; 28 29 + set_pte_ext(TOP_PTE(to), pfn_pte(pfn, PAGE_KERNEL), 0); 30 flush_tlb_kernel_page(to); 31 32 asm( "mcrr p15, 0, %1, %0, c14\n"
+41 -59
arch/arm/mm/ioremap.c
··· 38 */ 39 #define VM_ARM_SECTION_MAPPING 0x80000000 40 41 - static inline void 42 - remap_area_pte(pte_t * pte, unsigned long address, unsigned long size, 43 - unsigned long phys_addr, pgprot_t pgprot) 44 { 45 - unsigned long end; 46 47 - address &= ~PMD_MASK; 48 - end = address + size; 49 - if (end > PMD_SIZE) 50 - end = PMD_SIZE; 51 - BUG_ON(address >= end); 52 do { 53 if (!pte_none(*pte)) 54 goto bad; 55 56 - set_pte(pte, pfn_pte(phys_addr >> PAGE_SHIFT, pgprot)); 57 - address += PAGE_SIZE; 58 phys_addr += PAGE_SIZE; 59 - pte++; 60 - } while (address && (address < end)); 61 - return; 62 63 bad: 64 - printk("remap_area_pte: page already exists\n"); 65 BUG(); 66 } 67 68 - static inline int 69 - remap_area_pmd(pmd_t * pmd, unsigned long address, unsigned long size, 70 - unsigned long phys_addr, unsigned long flags) 71 { 72 - unsigned long end; 73 - pgprot_t pgprot; 74 75 - address &= ~PGDIR_MASK; 76 - end = address + size; 77 78 - if (end > PGDIR_SIZE) 79 - end = PGDIR_SIZE; 80 - 81 - phys_addr -= address; 82 - BUG_ON(address >= end); 83 - 84 - pgprot = __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | L_PTE_WRITE | flags); 85 do { 86 - pte_t * pte = pte_alloc_kernel(pmd, address); 87 - if (!pte) 88 - return -ENOMEM; 89 - remap_area_pte(pte, address, end - address, address + phys_addr, pgprot); 90 - address = (address + PMD_SIZE) & PMD_MASK; 91 - pmd++; 92 - } while (address && (address < end)); 93 - return 0; 94 } 95 96 - static int 97 - remap_area_pages(unsigned long start, unsigned long pfn, 98 - unsigned long size, unsigned long flags) 99 { 100 - unsigned long address = start; 101 - unsigned long end = start + size; 102 unsigned long phys_addr = __pfn_to_phys(pfn); 103 int err = 0; 104 - pgd_t * dir; 105 106 - phys_addr -= address; 107 - dir = pgd_offset(&init_mm, address); 108 - BUG_ON(address >= end); 109 do { 110 - pmd_t *pmd = pmd_alloc(&init_mm, dir, address); 111 - if (!pmd) { 112 - err = -ENOMEM; 113 break; 114 - } 115 - if (remap_area_pmd(pmd, address, end - address, 116 - phys_addr + address, flags)) { 117 - err = -ENOMEM; 118 - break; 119 - } 120 - 121 - address = (address + PGDIR_SIZE) & PGDIR_MASK; 122 - dir++; 123 - } while (address && (address < end)); 124 125 return err; 126 }
··· 38 */ 39 #define VM_ARM_SECTION_MAPPING 0x80000000 40 41 + static int remap_area_pte(pmd_t *pmd, unsigned long addr, unsigned long end, 42 + unsigned long phys_addr, pgprot_t prot) 43 { 44 + pte_t *pte; 45 46 + pte = pte_alloc_kernel(pmd, addr); 47 + if (!pte) 48 + return -ENOMEM; 49 + 50 do { 51 if (!pte_none(*pte)) 52 goto bad; 53 54 + set_pte_ext(pte, pfn_pte(phys_addr >> PAGE_SHIFT, prot), 0); 55 phys_addr += PAGE_SIZE; 56 + } while (pte++, addr += PAGE_SIZE, addr != end); 57 + return 0; 58 59 bad: 60 + printk(KERN_CRIT "remap_area_pte: page already exists\n"); 61 BUG(); 62 } 63 64 + static inline int remap_area_pmd(pgd_t *pgd, unsigned long addr, 65 + unsigned long end, unsigned long phys_addr, 66 + pgprot_t prot) 67 { 68 + unsigned long next; 69 + pmd_t *pmd; 70 + int ret = 0; 71 72 + pmd = pmd_alloc(&init_mm, pgd, addr); 73 + if (!pmd) 74 + return -ENOMEM; 75 76 do { 77 + next = pmd_addr_end(addr, end); 78 + ret = remap_area_pte(pmd, addr, next, phys_addr, prot); 79 + if (ret) 80 + return ret; 81 + phys_addr += next - addr; 82 + } while (pmd++, addr = next, addr != end); 83 + return ret; 84 } 85 86 + static int remap_area_pages(unsigned long start, unsigned long pfn, 87 + unsigned long size, unsigned long flags) 88 { 89 + unsigned long addr = start; 90 + unsigned long next, end = start + size; 91 unsigned long phys_addr = __pfn_to_phys(pfn); 92 + pgprot_t prot = __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | 93 + L_PTE_DIRTY | L_PTE_WRITE | flags); 94 + pgd_t *pgd; 95 int err = 0; 96 97 + BUG_ON(addr >= end); 98 + pgd = pgd_offset_k(addr); 99 do { 100 + next = pgd_addr_end(addr, end); 101 + err = remap_area_pmd(pgd, addr, next, phys_addr, prot); 102 + if (err) 103 break; 104 + phys_addr += next - addr; 105 + } while (pgd++, addr = next, addr != end); 106 107 return err; 108 }
+1 -7
arch/arm/mm/mmu.c
··· 294 mem_types[MT_DEVICE].prot_pte |= L_PTE_BUFFERABLE; 295 mem_types[MT_DEVICE].prot_sect |= PMD_SECT_BUFFERED; 296 297 - /* 298 - * User pages need to be mapped with the ASID 299 - * (iow, non-global) 300 - */ 301 - user_pgprot |= L_PTE_ASID; 302 - 303 #ifdef CONFIG_SMP 304 /* 305 * Mark memory with the "shared" attribute for SMP systems ··· 402 } 403 ptep = pte_offset_kernel(pmdp, virt); 404 405 - set_pte(ptep, pfn_pte(phys >> PAGE_SHIFT, prot)); 406 } 407 408 /*
··· 294 mem_types[MT_DEVICE].prot_pte |= L_PTE_BUFFERABLE; 295 mem_types[MT_DEVICE].prot_sect |= PMD_SECT_BUFFERED; 296 297 #ifdef CONFIG_SMP 298 /* 299 * Mark memory with the "shared" attribute for SMP systems ··· 408 } 409 ptep = pte_offset_kernel(pmdp, virt); 410 411 + set_pte_ext(ptep, pfn_pte(phys >> PAGE_SHIFT, prot), 0); 412 } 413 414 /*
+1 -1
arch/arm/mm/pgd.c
··· 57 58 init_pmd = pmd_offset(init_pgd, 0); 59 init_pte = pte_offset_map_nested(init_pmd, 0); 60 - set_pte(new_pte, *init_pte); 61 pte_unmap_nested(init_pte); 62 pte_unmap(new_pte); 63 }
··· 57 58 init_pmd = pmd_offset(init_pgd, 0); 59 init_pte = pte_offset_map_nested(init_pmd, 0); 60 + set_pte_ext(new_pte, *init_pte, 0); 61 pte_unmap_nested(init_pte); 62 pte_unmap(new_pte); 63 }
+2 -2
arch/arm/mm/proc-arm1020.S
··· 397 * Set a PTE and flush it out 398 */ 399 .align 5 400 - ENTRY(cpu_arm1020_set_pte) 401 #ifdef CONFIG_MMU 402 str r1, [r0], #-2048 @ linux version 403 ··· 477 .word cpu_arm1020_do_idle 478 .word cpu_arm1020_dcache_clean_area 479 .word cpu_arm1020_switch_mm 480 - .word cpu_arm1020_set_pte 481 .size arm1020_processor_functions, . - arm1020_processor_functions 482 483 .section ".rodata"
··· 397 * Set a PTE and flush it out 398 */ 399 .align 5 400 + ENTRY(cpu_arm1020_set_pte_ext) 401 #ifdef CONFIG_MMU 402 str r1, [r0], #-2048 @ linux version 403 ··· 477 .word cpu_arm1020_do_idle 478 .word cpu_arm1020_dcache_clean_area 479 .word cpu_arm1020_switch_mm 480 + .word cpu_arm1020_set_pte_ext 481 .size arm1020_processor_functions, . - arm1020_processor_functions 482 483 .section ".rodata"
+2 -2
arch/arm/mm/proc-arm1020e.S
··· 381 * Set a PTE and flush it out 382 */ 383 .align 5 384 - ENTRY(cpu_arm1020e_set_pte) 385 #ifdef CONFIG_MMU 386 str r1, [r0], #-2048 @ linux version 387 ··· 458 .word cpu_arm1020e_do_idle 459 .word cpu_arm1020e_dcache_clean_area 460 .word cpu_arm1020e_switch_mm 461 - .word cpu_arm1020e_set_pte 462 .size arm1020e_processor_functions, . - arm1020e_processor_functions 463 464 .section ".rodata"
··· 381 * Set a PTE and flush it out 382 */ 383 .align 5 384 + ENTRY(cpu_arm1020e_set_pte_ext) 385 #ifdef CONFIG_MMU 386 str r1, [r0], #-2048 @ linux version 387 ··· 458 .word cpu_arm1020e_do_idle 459 .word cpu_arm1020e_dcache_clean_area 460 .word cpu_arm1020e_switch_mm 461 + .word cpu_arm1020e_set_pte_ext 462 .size arm1020e_processor_functions, . - arm1020e_processor_functions 463 464 .section ".rodata"
+3 -3
arch/arm/mm/proc-arm1022.S
··· 358 mov pc, lr 359 360 /* 361 - * cpu_arm1022_set_pte(ptep, pte) 362 * 363 * Set a PTE and flush it out 364 */ 365 .align 5 366 - ENTRY(cpu_arm1022_set_pte) 367 #ifdef CONFIG_MMU 368 str r1, [r0], #-2048 @ linux version 369 ··· 441 .word cpu_arm1022_do_idle 442 .word cpu_arm1022_dcache_clean_area 443 .word cpu_arm1022_switch_mm 444 - .word cpu_arm1022_set_pte 445 .size arm1022_processor_functions, . - arm1022_processor_functions 446 447 .section ".rodata"
··· 358 mov pc, lr 359 360 /* 361 + * cpu_arm1022_set_pte_ext(ptep, pte, ext) 362 * 363 * Set a PTE and flush it out 364 */ 365 .align 5 366 + ENTRY(cpu_arm1022_set_pte_ext) 367 #ifdef CONFIG_MMU 368 str r1, [r0], #-2048 @ linux version 369 ··· 441 .word cpu_arm1022_do_idle 442 .word cpu_arm1022_dcache_clean_area 443 .word cpu_arm1022_switch_mm 444 + .word cpu_arm1022_set_pte_ext 445 .size arm1022_processor_functions, . - arm1022_processor_functions 446 447 .section ".rodata"
+3 -3
arch/arm/mm/proc-arm1026.S
··· 347 mov pc, lr 348 349 /* 350 - * cpu_arm1026_set_pte(ptep, pte) 351 * 352 * Set a PTE and flush it out 353 */ 354 .align 5 355 - ENTRY(cpu_arm1026_set_pte) 356 #ifdef CONFIG_MMU 357 str r1, [r0], #-2048 @ linux version 358 ··· 436 .word cpu_arm1026_do_idle 437 .word cpu_arm1026_dcache_clean_area 438 .word cpu_arm1026_switch_mm 439 - .word cpu_arm1026_set_pte 440 .size arm1026_processor_functions, . - arm1026_processor_functions 441 442 .section .rodata
··· 347 mov pc, lr 348 349 /* 350 + * cpu_arm1026_set_pte_ext(ptep, pte, ext) 351 * 352 * Set a PTE and flush it out 353 */ 354 .align 5 355 + ENTRY(cpu_arm1026_set_pte_ext) 356 #ifdef CONFIG_MMU 357 str r1, [r0], #-2048 @ linux version 358 ··· 436 .word cpu_arm1026_do_idle 437 .word cpu_arm1026_dcache_clean_area 438 .word cpu_arm1026_switch_mm 439 + .word cpu_arm1026_set_pte_ext 440 .size arm1026_processor_functions, . - arm1026_processor_functions 441 442 .section .rodata
+5 -5
arch/arm/mm/proc-arm6_7.S
··· 209 mov pc, lr 210 211 /* 212 - * Function: arm6_7_set_pte(pte_t *ptep, pte_t pte) 213 * Params : r0 = Address to set 214 * : r1 = value to set 215 * Purpose : Set a PTE and flush it out of any WB cache 216 */ 217 .align 5 218 - ENTRY(cpu_arm6_set_pte) 219 - ENTRY(cpu_arm7_set_pte) 220 #ifdef CONFIG_MMU 221 str r1, [r0], #-2048 @ linux version 222 ··· 299 .word cpu_arm6_do_idle 300 .word cpu_arm6_dcache_clean_area 301 .word cpu_arm6_switch_mm 302 - .word cpu_arm6_set_pte 303 .size arm6_processor_functions, . - arm6_processor_functions 304 305 /* ··· 315 .word cpu_arm7_do_idle 316 .word cpu_arm7_dcache_clean_area 317 .word cpu_arm7_switch_mm 318 - .word cpu_arm7_set_pte 319 .size arm7_processor_functions, . - arm7_processor_functions 320 321 .section ".rodata"
··· 209 mov pc, lr 210 211 /* 212 + * Function: arm6_7_set_pte_ext(pte_t *ptep, pte_t pte, unsigned int ext) 213 * Params : r0 = Address to set 214 * : r1 = value to set 215 * Purpose : Set a PTE and flush it out of any WB cache 216 */ 217 .align 5 218 + ENTRY(cpu_arm6_set_pte_ext) 219 + ENTRY(cpu_arm7_set_pte_ext) 220 #ifdef CONFIG_MMU 221 str r1, [r0], #-2048 @ linux version 222 ··· 299 .word cpu_arm6_do_idle 300 .word cpu_arm6_dcache_clean_area 301 .word cpu_arm6_switch_mm 302 + .word cpu_arm6_set_pte_ext 303 .size arm6_processor_functions, . - arm6_processor_functions 304 305 /* ··· 315 .word cpu_arm7_do_idle 316 .word cpu_arm7_dcache_clean_area 317 .word cpu_arm7_switch_mm 318 + .word cpu_arm7_set_pte_ext 319 .size arm7_processor_functions, . - arm7_processor_functions 320 321 .section ".rodata"
+3 -3
arch/arm/mm/proc-arm720.S
··· 88 mov pc, lr 89 90 /* 91 - * Function: arm720_set_pte(pte_t *ptep, pte_t pte) 92 * Params : r0 = Address to set 93 * : r1 = value to set 94 * Purpose : Set a PTE and flush it out of any WB cache 95 */ 96 .align 5 97 - ENTRY(cpu_arm720_set_pte) 98 #ifdef CONFIG_MMU 99 str r1, [r0], #-2048 @ linux version 100 ··· 204 .word cpu_arm720_do_idle 205 .word cpu_arm720_dcache_clean_area 206 .word cpu_arm720_switch_mm 207 - .word cpu_arm720_set_pte 208 .size arm720_processor_functions, . - arm720_processor_functions 209 210 .section ".rodata"
··· 88 mov pc, lr 89 90 /* 91 + * Function: arm720_set_pte_ext(pte_t *ptep, pte_t pte, unsigned int ext) 92 * Params : r0 = Address to set 93 * : r1 = value to set 94 * Purpose : Set a PTE and flush it out of any WB cache 95 */ 96 .align 5 97 + ENTRY(cpu_arm720_set_pte_ext) 98 #ifdef CONFIG_MMU 99 str r1, [r0], #-2048 @ linux version 100 ··· 204 .word cpu_arm720_do_idle 205 .word cpu_arm720_dcache_clean_area 206 .word cpu_arm720_switch_mm 207 + .word cpu_arm720_set_pte_ext 208 .size arm720_processor_functions, . - arm720_processor_functions 209 210 .section ".rodata"
+3 -3
arch/arm/mm/proc-arm920.S
··· 344 mov pc, lr 345 346 /* 347 - * cpu_arm920_set_pte(ptep, pte) 348 * 349 * Set a PTE and flush it out 350 */ 351 .align 5 352 - ENTRY(cpu_arm920_set_pte) 353 #ifdef CONFIG_MMU 354 str r1, [r0], #-2048 @ linux version 355 ··· 423 .word cpu_arm920_do_idle 424 .word cpu_arm920_dcache_clean_area 425 .word cpu_arm920_switch_mm 426 - .word cpu_arm920_set_pte 427 .size arm920_processor_functions, . - arm920_processor_functions 428 429 .section ".rodata"
··· 344 mov pc, lr 345 346 /* 347 + * cpu_arm920_set_pte(ptep, pte, ext) 348 * 349 * Set a PTE and flush it out 350 */ 351 .align 5 352 + ENTRY(cpu_arm920_set_pte_ext) 353 #ifdef CONFIG_MMU 354 str r1, [r0], #-2048 @ linux version 355 ··· 423 .word cpu_arm920_do_idle 424 .word cpu_arm920_dcache_clean_area 425 .word cpu_arm920_switch_mm 426 + .word cpu_arm920_set_pte_ext 427 .size arm920_processor_functions, . - arm920_processor_functions 428 429 .section ".rodata"
+3 -3
arch/arm/mm/proc-arm922.S
··· 348 mov pc, lr 349 350 /* 351 - * cpu_arm922_set_pte(ptep, pte) 352 * 353 * Set a PTE and flush it out 354 */ 355 .align 5 356 - ENTRY(cpu_arm922_set_pte) 357 #ifdef CONFIG_MMU 358 str r1, [r0], #-2048 @ linux version 359 ··· 427 .word cpu_arm922_do_idle 428 .word cpu_arm922_dcache_clean_area 429 .word cpu_arm922_switch_mm 430 - .word cpu_arm922_set_pte 431 .size arm922_processor_functions, . - arm922_processor_functions 432 433 .section ".rodata"
··· 348 mov pc, lr 349 350 /* 351 + * cpu_arm922_set_pte_ext(ptep, pte, ext) 352 * 353 * Set a PTE and flush it out 354 */ 355 .align 5 356 + ENTRY(cpu_arm922_set_pte_ext) 357 #ifdef CONFIG_MMU 358 str r1, [r0], #-2048 @ linux version 359 ··· 427 .word cpu_arm922_do_idle 428 .word cpu_arm922_dcache_clean_area 429 .word cpu_arm922_switch_mm 430 + .word cpu_arm922_set_pte_ext 431 .size arm922_processor_functions, . - arm922_processor_functions 432 433 .section ".rodata"
+3 -3
arch/arm/mm/proc-arm925.S
··· 391 mov pc, lr 392 393 /* 394 - * cpu_arm925_set_pte(ptep, pte) 395 * 396 * Set a PTE and flush it out 397 */ 398 .align 5 399 - ENTRY(cpu_arm925_set_pte) 400 #ifdef CONFIG_MMU 401 str r1, [r0], #-2048 @ linux version 402 ··· 490 .word cpu_arm925_do_idle 491 .word cpu_arm925_dcache_clean_area 492 .word cpu_arm925_switch_mm 493 - .word cpu_arm925_set_pte 494 .size arm925_processor_functions, . - arm925_processor_functions 495 496 .section ".rodata"
··· 391 mov pc, lr 392 393 /* 394 + * cpu_arm925_set_pte_ext(ptep, pte, ext) 395 * 396 * Set a PTE and flush it out 397 */ 398 .align 5 399 + ENTRY(cpu_arm925_set_pte_ext) 400 #ifdef CONFIG_MMU 401 str r1, [r0], #-2048 @ linux version 402 ··· 490 .word cpu_arm925_do_idle 491 .word cpu_arm925_dcache_clean_area 492 .word cpu_arm925_switch_mm 493 + .word cpu_arm925_set_pte_ext 494 .size arm925_processor_functions, . - arm925_processor_functions 495 496 .section ".rodata"
+4 -4
arch/arm/mm/proc-arm926.S
··· 348 mov pc, lr 349 350 /* 351 - * cpu_arm926_set_pte(ptep, pte) 352 * 353 * Set a PTE and flush it out 354 */ 355 .align 5 356 - ENTRY(cpu_arm926_set_pte) 357 #ifdef CONFIG_MMU 358 str r1, [r0], #-2048 @ linux version 359 ··· 439 .word cpu_arm926_do_idle 440 .word cpu_arm926_dcache_clean_area 441 .word cpu_arm926_switch_mm 442 - .word cpu_arm926_set_pte 443 .size arm926_processor_functions, . - arm926_processor_functions 444 445 .section ".rodata" ··· 480 b __arm926_setup 481 .long cpu_arch_name 482 .long cpu_elf_name 483 - .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_VFP|HWCAP_EDSP|HWCAP_JAVA 484 .long cpu_arm926_name 485 .long arm926_processor_functions 486 .long v4wbi_tlb_fns
··· 348 mov pc, lr 349 350 /* 351 + * cpu_arm926_set_pte_ext(ptep, pte, ext) 352 * 353 * Set a PTE and flush it out 354 */ 355 .align 5 356 + ENTRY(cpu_arm926_set_pte_ext) 357 #ifdef CONFIG_MMU 358 str r1, [r0], #-2048 @ linux version 359 ··· 439 .word cpu_arm926_do_idle 440 .word cpu_arm926_dcache_clean_area 441 .word cpu_arm926_switch_mm 442 + .word cpu_arm926_set_pte_ext 443 .size arm926_processor_functions, . - arm926_processor_functions 444 445 .section ".rodata" ··· 480 b __arm926_setup 481 .long cpu_arch_name 482 .long cpu_elf_name 483 + .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP|HWCAP_JAVA 484 .long cpu_arm926_name 485 .long arm926_processor_functions 486 .long v4wbi_tlb_fns
+3 -3
arch/arm/mm/proc-sa110.S
··· 146 #endif 147 148 /* 149 - * cpu_sa110_set_pte(ptep, pte) 150 * 151 * Set a PTE and flush it out 152 */ 153 .align 5 154 - ENTRY(cpu_sa110_set_pte) 155 #ifdef CONFIG_MMU 156 str r1, [r0], #-2048 @ linux version 157 ··· 222 .word cpu_sa110_do_idle 223 .word cpu_sa110_dcache_clean_area 224 .word cpu_sa110_switch_mm 225 - .word cpu_sa110_set_pte 226 .size sa110_processor_functions, . - sa110_processor_functions 227 228 .section ".rodata"
··· 146 #endif 147 148 /* 149 + * cpu_sa110_set_pte_ext(ptep, pte, ext) 150 * 151 * Set a PTE and flush it out 152 */ 153 .align 5 154 + ENTRY(cpu_sa110_set_pte_ext) 155 #ifdef CONFIG_MMU 156 str r1, [r0], #-2048 @ linux version 157 ··· 222 .word cpu_sa110_do_idle 223 .word cpu_sa110_dcache_clean_area 224 .word cpu_sa110_switch_mm 225 + .word cpu_sa110_set_pte_ext 226 .size sa110_processor_functions, . - sa110_processor_functions 227 228 .section ".rodata"
+3 -3
arch/arm/mm/proc-sa1100.S
··· 159 #endif 160 161 /* 162 - * cpu_sa1100_set_pte(ptep, pte) 163 * 164 * Set a PTE and flush it out 165 */ 166 .align 5 167 - ENTRY(cpu_sa1100_set_pte) 168 #ifdef CONFIG_MMU 169 str r1, [r0], #-2048 @ linux version 170 ··· 237 .word cpu_sa1100_do_idle 238 .word cpu_sa1100_dcache_clean_area 239 .word cpu_sa1100_switch_mm 240 - .word cpu_sa1100_set_pte 241 .size sa1100_processor_functions, . - sa1100_processor_functions 242 243 .section ".rodata"
··· 159 #endif 160 161 /* 162 + * cpu_sa1100_set_pte_ext(ptep, pte, ext) 163 * 164 * Set a PTE and flush it out 165 */ 166 .align 5 167 + ENTRY(cpu_sa1100_set_pte_ext) 168 #ifdef CONFIG_MMU 169 str r1, [r0], #-2048 @ linux version 170 ··· 237 .word cpu_sa1100_do_idle 238 .word cpu_sa1100_dcache_clean_area 239 .word cpu_sa1100_switch_mm 240 + .word cpu_sa1100_set_pte_ext 241 .size sa1100_processor_functions, . - sa1100_processor_functions 242 243 .section ".rodata"
+1 -1
arch/arm/mm/proc-syms.c
··· 17 18 #ifndef MULTI_CPU 19 EXPORT_SYMBOL(cpu_dcache_clean_area); 20 - EXPORT_SYMBOL(cpu_set_pte); 21 #else 22 EXPORT_SYMBOL(processor); 23 #endif
··· 17 18 #ifndef MULTI_CPU 19 EXPORT_SYMBOL(cpu_dcache_clean_area); 20 + EXPORT_SYMBOL(cpu_set_pte_ext); 21 #else 22 EXPORT_SYMBOL(processor); 23 #endif
+18 -21
arch/arm/mm/proc-v6.S
··· 103 mov pc, lr 104 105 /* 106 - * cpu_v6_set_pte(ptep, pte) 107 * 108 * Set a level 2 translation table entry. 109 * 110 * - ptep - pointer to level 2 translation table entry 111 * (hardware version is stored at -1024 bytes) 112 * - pte - PTE value to store 113 * 114 * Permissions: 115 * YUWD APX AP1 AP0 SVC User ··· 122 * 11x0 0 1 0 r/w r/o 123 * 1111 0 1 1 r/w r/w 124 */ 125 - ENTRY(cpu_v6_set_pte) 126 #ifdef CONFIG_MMU 127 str r1, [r0], #-2048 @ linux version 128 129 - bic r2, r1, #0x000003f0 130 - bic r2, r2, #0x00000003 131 - orr r2, r2, #PTE_EXT_AP0 | 2 132 133 tst r1, #L_PTE_WRITE 134 tstne r1, #L_PTE_DIRTY 135 - orreq r2, r2, #PTE_EXT_APX 136 137 tst r1, #L_PTE_USER 138 - orrne r2, r2, #PTE_EXT_AP1 139 - tstne r2, #PTE_EXT_APX 140 - bicne r2, r2, #PTE_EXT_APX | PTE_EXT_AP0 141 142 tst r1, #L_PTE_YOUNG 143 - biceq r2, r2, #PTE_EXT_APX | PTE_EXT_AP_MASK 144 145 tst r1, #L_PTE_EXEC 146 - orreq r2, r2, #PTE_EXT_XN 147 148 tst r1, #L_PTE_PRESENT 149 - moveq r2, #0 150 151 - str r2, [r0] 152 mcr p15, 0, r0, c7, c10, 1 @ flush_pte 153 #endif 154 mov pc, lr ··· 158 159 160 cpu_v6_name: 161 - .asciz "Some Random V6 Processor" 162 .align 163 164 .section ".text.init", #alloc, #execinstr ··· 209 #endif 210 mcr p15, 0, r4, c2, c0, 1 @ load TTB1 211 #endif /* CONFIG_MMU */ 212 - #ifdef CONFIG_VFP 213 - mrc p15, 0, r0, c1, c0, 2 214 - orr r0, r0, #(0xf << 20) 215 - mcr p15, 0, r0, c1, c0, 2 @ Enable full access to VFP 216 - #endif 217 adr r5, v6_crval 218 ldmia r5, {r5, r6} 219 mrc p15, 0, r0, c1, c0, 0 @ read control register ··· 235 .word cpu_v6_do_idle 236 .word cpu_v6_dcache_clean_area 237 .word cpu_v6_switch_mm 238 - .word cpu_v6_set_pte 239 .size v6_processor_functions, . - v6_processor_functions 240 241 .type cpu_arch_name, #object ··· 270 b __v6_setup 271 .long cpu_arch_name 272 .long cpu_elf_name 273 - .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_VFP|HWCAP_EDSP|HWCAP_JAVA 274 .long cpu_v6_name 275 .long v6_processor_functions 276 .long v6wbi_tlb_fns
··· 103 mov pc, lr 104 105 /* 106 + * cpu_v6_set_pte_ext(ptep, pte, ext) 107 * 108 * Set a level 2 translation table entry. 109 * 110 * - ptep - pointer to level 2 translation table entry 111 * (hardware version is stored at -1024 bytes) 112 * - pte - PTE value to store 113 + * - ext - value for extended PTE bits 114 * 115 * Permissions: 116 * YUWD APX AP1 AP0 SVC User ··· 121 * 11x0 0 1 0 r/w r/o 122 * 1111 0 1 1 r/w r/w 123 */ 124 + ENTRY(cpu_v6_set_pte_ext) 125 #ifdef CONFIG_MMU 126 str r1, [r0], #-2048 @ linux version 127 128 + bic r3, r1, #0x000003f0 129 + bic r3, r3, #0x00000003 130 + orr r3, r3, r2 131 + orr r3, r3, #PTE_EXT_AP0 | 2 132 133 tst r1, #L_PTE_WRITE 134 tstne r1, #L_PTE_DIRTY 135 + orreq r3, r3, #PTE_EXT_APX 136 137 tst r1, #L_PTE_USER 138 + orrne r3, r3, #PTE_EXT_AP1 139 + tstne r3, #PTE_EXT_APX 140 + bicne r3, r3, #PTE_EXT_APX | PTE_EXT_AP0 141 142 tst r1, #L_PTE_YOUNG 143 + biceq r3, r3, #PTE_EXT_APX | PTE_EXT_AP_MASK 144 145 tst r1, #L_PTE_EXEC 146 + orreq r3, r3, #PTE_EXT_XN 147 148 tst r1, #L_PTE_PRESENT 149 + moveq r3, #0 150 151 + str r3, [r0] 152 mcr p15, 0, r0, c7, c10, 1 @ flush_pte 153 #endif 154 mov pc, lr ··· 156 157 158 cpu_v6_name: 159 + .asciz "ARMv6-compatible processor" 160 .align 161 162 .section ".text.init", #alloc, #execinstr ··· 207 #endif 208 mcr p15, 0, r4, c2, c0, 1 @ load TTB1 209 #endif /* CONFIG_MMU */ 210 adr r5, v6_crval 211 ldmia r5, {r5, r6} 212 mrc p15, 0, r0, c1, c0, 0 @ read control register ··· 238 .word cpu_v6_do_idle 239 .word cpu_v6_dcache_clean_area 240 .word cpu_v6_switch_mm 241 + .word cpu_v6_set_pte_ext 242 .size v6_processor_functions, . - v6_processor_functions 243 244 .type cpu_arch_name, #object ··· 273 b __v6_setup 274 .long cpu_arch_name 275 .long cpu_elf_name 276 + .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP|HWCAP_JAVA 277 .long cpu_v6_name 278 .long v6_processor_functions 279 .long v6wbi_tlb_fns
+3 -3
arch/arm/mm/proc-xsc3.S
··· 357 cpwait_ret lr, ip 358 359 /* 360 - * cpu_xsc3_set_pte(ptep, pte) 361 * 362 * Set a PTE and flush it out 363 * 364 */ 365 .align 5 366 - ENTRY(cpu_xsc3_set_pte) 367 str r1, [r0], #-2048 @ linux version 368 369 bic r2, r1, #0xff0 @ Keep C, B bits ··· 457 .word cpu_xsc3_do_idle 458 .word cpu_xsc3_dcache_clean_area 459 .word cpu_xsc3_switch_mm 460 - .word cpu_xsc3_set_pte 461 .size xsc3_processor_functions, . - xsc3_processor_functions 462 463 .section ".rodata"
··· 357 cpwait_ret lr, ip 358 359 /* 360 + * cpu_xsc3_set_pte_ext(ptep, pte, ext) 361 * 362 * Set a PTE and flush it out 363 * 364 */ 365 .align 5 366 + ENTRY(cpu_xsc3_set_pte_ext) 367 str r1, [r0], #-2048 @ linux version 368 369 bic r2, r1, #0xff0 @ Keep C, B bits ··· 457 .word cpu_xsc3_do_idle 458 .word cpu_xsc3_dcache_clean_area 459 .word cpu_xsc3_switch_mm 460 + .word cpu_xsc3_set_pte_ext 461 .size xsc3_processor_functions, . - xsc3_processor_functions 462 463 .section ".rodata"
+3 -3
arch/arm/mm/proc-xscale.S
··· 421 cpwait_ret lr, ip 422 423 /* 424 - * cpu_xscale_set_pte(ptep, pte) 425 * 426 * Set a PTE and flush it out 427 * 428 * Errata 40: must set memory to write-through for user read-only pages. 429 */ 430 .align 5 431 - ENTRY(cpu_xscale_set_pte) 432 str r1, [r0], #-2048 @ linux version 433 434 bic r2, r1, #0xff0 ··· 529 .word cpu_xscale_do_idle 530 .word cpu_xscale_dcache_clean_area 531 .word cpu_xscale_switch_mm 532 - .word cpu_xscale_set_pte 533 .size xscale_processor_functions, . - xscale_processor_functions 534 535 .section ".rodata"
··· 421 cpwait_ret lr, ip 422 423 /* 424 + * cpu_xscale_set_pte_ext(ptep, pte, ext) 425 * 426 * Set a PTE and flush it out 427 * 428 * Errata 40: must set memory to write-through for user read-only pages. 429 */ 430 .align 5 431 + ENTRY(cpu_xscale_set_pte_ext) 432 str r1, [r0], #-2048 @ linux version 433 434 bic r2, r1, #0xff0 ··· 529 .word cpu_xscale_do_idle 530 .word cpu_xscale_dcache_clean_area 531 .word cpu_xscale_switch_mm 532 + .word cpu_xscale_set_pte_ext 533 .size xscale_processor_functions, . - xscale_processor_functions 534 535 .section ".rodata"
+25 -1
arch/arm/vfp/vfpmodule.c
··· 263 if (exceptions) 264 vfp_raise_exceptions(exceptions, trigger, orig_fpscr, regs); 265 } 266 - 267 /* 268 * VFP support code initialisation. 269 */ 270 static int __init vfp_init(void) 271 { 272 unsigned int vfpsid; 273 274 /* 275 * First check that there is a VFP that we can use. ··· 292 printk(KERN_INFO "VFP support v0.3: "); 293 if (VFP_arch) { 294 printk("not present\n"); 295 } else if (vfpsid & FPSID_NODOUBLE) { 296 printk("no double precision support\n"); 297 } else { ··· 308 (vfpsid & FPSID_PART_MASK) >> FPSID_PART_BIT, 309 (vfpsid & FPSID_VARIANT_MASK) >> FPSID_VARIANT_BIT, 310 (vfpsid & FPSID_REV_MASK) >> FPSID_REV_BIT); 311 vfp_vector = vfp_support_entry; 312 313 thread_register_notifier(&vfp_notifier_block); 314 } 315 return 0; 316 }
··· 263 if (exceptions) 264 vfp_raise_exceptions(exceptions, trigger, orig_fpscr, regs); 265 } 266 + 267 /* 268 * VFP support code initialisation. 269 */ 270 static int __init vfp_init(void) 271 { 272 unsigned int vfpsid; 273 + unsigned int cpu_arch = cpu_architecture(); 274 + u32 access = 0; 275 + 276 + if (cpu_arch >= CPU_ARCH_ARMv6) { 277 + access = get_copro_access(); 278 + 279 + /* 280 + * Enable full access to VFP (cp10 and cp11) 281 + */ 282 + set_copro_access(access | CPACC_FULL(10) | CPACC_FULL(11)); 283 + } 284 285 /* 286 * First check that there is a VFP that we can use. ··· 281 printk(KERN_INFO "VFP support v0.3: "); 282 if (VFP_arch) { 283 printk("not present\n"); 284 + 285 + /* 286 + * Restore the copro access register. 287 + */ 288 + if (cpu_arch >= CPU_ARCH_ARMv6) 289 + set_copro_access(access); 290 } else if (vfpsid & FPSID_NODOUBLE) { 291 printk("no double precision support\n"); 292 } else { ··· 291 (vfpsid & FPSID_PART_MASK) >> FPSID_PART_BIT, 292 (vfpsid & FPSID_VARIANT_MASK) >> FPSID_VARIANT_BIT, 293 (vfpsid & FPSID_REV_MASK) >> FPSID_REV_BIT); 294 + 295 vfp_vector = vfp_support_entry; 296 297 thread_register_notifier(&vfp_notifier_block); 298 + 299 + /* 300 + * We detected VFP, and the support code is 301 + * in place; report VFP support to userspace. 302 + */ 303 + elf_hwcap |= HWCAP_VFP; 304 } 305 return 0; 306 }
+7 -3
include/asm-arm/arch-imx/imx-regs.h
··· 41 42 /* PLL registers */ 43 #define CSCR __REG(IMX_PLL_BASE) /* Clock Source Control Register */ 44 - #define CSCR_SYSTEM_SEL (1<<16) 45 46 #define MPCTL0 __REG(IMX_PLL_BASE + 0x4) /* MCU PLL Control Register 0 */ 47 #define MPCTL1 __REG(IMX_PLL_BASE + 0x8) /* MCU PLL and System Clock Register 1 */ 48 #define SPCTL0 __REG(IMX_PLL_BASE + 0xc) /* System PLL Control Register 0 */ 49 #define SPCTL1 __REG(IMX_PLL_BASE + 0x10) /* System PLL Control Register 1 */ 50 #define PCDR __REG(IMX_PLL_BASE + 0x20) /* Peripheral Clock Divider Register */ 51 - 52 - #define CSCR_MPLL_RESTART (1<<21) 53 54 /* 55 * GPIO Module and I/O Multiplexer
··· 41 42 /* PLL registers */ 43 #define CSCR __REG(IMX_PLL_BASE) /* Clock Source Control Register */ 44 + #define CSCR_SPLL_RESTART (1<<22) 45 + #define CSCR_MPLL_RESTART (1<<21) 46 + #define CSCR_SYSTEM_SEL (1<<16) 47 + #define CSCR_BCLK_DIV (0xf<<10) 48 + #define CSCR_MPU_PRESC (1<<15) 49 + #define CSCR_SPEN (1<<1) 50 + #define CSCR_MPEN (1<<0) 51 52 #define MPCTL0 __REG(IMX_PLL_BASE + 0x4) /* MCU PLL Control Register 0 */ 53 #define MPCTL1 __REG(IMX_PLL_BASE + 0x8) /* MCU PLL and System Clock Register 1 */ 54 #define SPCTL0 __REG(IMX_PLL_BASE + 0xc) /* System PLL Control Register 0 */ 55 #define SPCTL1 __REG(IMX_PLL_BASE + 0x10) /* System PLL Control Register 1 */ 56 #define PCDR __REG(IMX_PLL_BASE + 0x20) /* Peripheral Clock Divider Register */ 57 58 /* 59 * GPIO Module and I/O Multiplexer
+3 -4
include/asm-arm/arch-s3c2410/regs-udc.h
··· 11 #ifndef __ASM_ARCH_REGS_UDC_H 12 #define __ASM_ARCH_REGS_UDC_H 13 14 - 15 - #define S3C2410_USBDREG(x) ((x) + S3C24XX_VA_USBDEV) 16 17 #define S3C2410_UDC_FUNC_ADDR_REG S3C2410_USBDREG(0x0140) 18 #define S3C2410_UDC_PWR_REG S3C2410_USBDREG(0x0144) ··· 135 #define S3C2410_UDC_OCSR2_ISO (1<<6) // R/W 136 #define S3C2410_UDC_OCSR2_DMAIEN (1<<5) // R/W 137 138 - #define S3C2410_UDC_SETIX(x) \ 139 - __raw_writel(S3C2410_UDC_INDEX_ ## x, S3C2410_UDC_INDEX_REG); 140 141 142 #define S3C2410_UDC_EP0_CSR_OPKRDY (1<<0)
··· 11 #ifndef __ASM_ARCH_REGS_UDC_H 12 #define __ASM_ARCH_REGS_UDC_H 13 14 + #define S3C2410_USBDREG(x) (x) 15 16 #define S3C2410_UDC_FUNC_ADDR_REG S3C2410_USBDREG(0x0140) 17 #define S3C2410_UDC_PWR_REG S3C2410_USBDREG(0x0144) ··· 136 #define S3C2410_UDC_OCSR2_ISO (1<<6) // R/W 137 #define S3C2410_UDC_OCSR2_DMAIEN (1<<5) // R/W 138 139 + #define S3C2410_UDC_SETIX(base,x) \ 140 + writel(S3C2410_UDC_INDEX_ ## x, base+S3C2410_UDC_INDEX_REG); 141 142 143 #define S3C2410_UDC_EP0_CSR_OPKRDY (1<<0)
+4 -3
include/asm-arm/cpu-multi32.h
··· 50 */ 51 void (*switch_mm)(unsigned long pgd_phys, struct mm_struct *mm); 52 /* 53 - * Set a PTE 54 */ 55 - void (*set_pte)(pte_t *ptep, pte_t pte); 56 } processor; 57 58 #define cpu_proc_init() processor._proc_init() ··· 61 #define cpu_reset(addr) processor.reset(addr) 62 #define cpu_do_idle() processor._do_idle() 63 #define cpu_dcache_clean_area(addr,sz) processor.dcache_clean_area(addr,sz) 64 - #define cpu_set_pte(ptep, pte) processor.set_pte(ptep, pte) 65 #define cpu_do_switch_mm(pgd,mm) processor.switch_mm(pgd,mm)
··· 50 */ 51 void (*switch_mm)(unsigned long pgd_phys, struct mm_struct *mm); 52 /* 53 + * Set a possibly extended PTE. Non-extended PTEs should 54 + * ignore 'ext'. 55 */ 56 + void (*set_pte_ext)(pte_t *ptep, pte_t pte, unsigned int ext); 57 } processor; 58 59 #define cpu_proc_init() processor._proc_init() ··· 60 #define cpu_reset(addr) processor.reset(addr) 61 #define cpu_do_idle() processor._do_idle() 62 #define cpu_dcache_clean_area(addr,sz) processor.dcache_clean_area(addr,sz) 63 + #define cpu_set_pte_ext(ptep,pte,ext) processor.set_pte_ext(ptep,pte,ext) 64 #define cpu_do_switch_mm(pgd,mm) processor.switch_mm(pgd,mm)
+2 -2
include/asm-arm/cpu-single.h
··· 28 #define cpu_do_idle __cpu_fn(CPU_NAME,_do_idle) 29 #define cpu_dcache_clean_area __cpu_fn(CPU_NAME,_dcache_clean_area) 30 #define cpu_do_switch_mm __cpu_fn(CPU_NAME,_switch_mm) 31 - #define cpu_set_pte __cpu_fn(CPU_NAME,_set_pte) 32 33 #include <asm/page.h> 34 ··· 40 extern int cpu_do_idle(void); 41 extern void cpu_dcache_clean_area(void *, int); 42 extern void cpu_do_switch_mm(unsigned long pgd_phys, struct mm_struct *mm); 43 - extern void cpu_set_pte(pte_t *ptep, pte_t pte); 44 extern void cpu_reset(unsigned long addr) __attribute__((noreturn));
··· 28 #define cpu_do_idle __cpu_fn(CPU_NAME,_do_idle) 29 #define cpu_dcache_clean_area __cpu_fn(CPU_NAME,_dcache_clean_area) 30 #define cpu_do_switch_mm __cpu_fn(CPU_NAME,_switch_mm) 31 + #define cpu_set_pte_ext __cpu_fn(CPU_NAME,_set_pte_ext) 32 33 #include <asm/page.h> 34 ··· 40 extern int cpu_do_idle(void); 41 extern void cpu_dcache_clean_area(void *, int); 42 extern void cpu_do_switch_mm(unsigned long pgd_phys, struct mm_struct *mm); 43 + extern void cpu_set_pte_ext(pte_t *ptep, pte_t pte, unsigned int ext); 44 extern void cpu_reset(unsigned long addr) __attribute__((noreturn));
+7 -4
include/asm-arm/pgtable.h
··· 21 22 #include <asm/memory.h> 23 #include <asm/arch/vmalloc.h> 24 25 /* 26 * Just any arbitrary offset to the start of the vmalloc VM area: the ··· 171 #define L_PTE_EXEC (1 << 6) 172 #define L_PTE_DIRTY (1 << 7) 173 #define L_PTE_SHARED (1 << 10) /* shared(v6), coherent(xsc3) */ 174 - #define L_PTE_ASID (1 << 11) /* non-global (use ASID, v6) */ 175 176 #ifndef __ASSEMBLY__ 177 ··· 228 #define pfn_pte(pfn,prot) (__pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot))) 229 230 #define pte_none(pte) (!pte_val(pte)) 231 - #define pte_clear(mm,addr,ptep) set_pte_at((mm),(addr),(ptep), __pte(0)) 232 #define pte_page(pte) (pfn_to_page(pte_pfn(pte))) 233 #define pte_offset_kernel(dir,addr) (pmd_page_vaddr(*(dir)) + __pte_index(addr)) 234 #define pte_offset_map(dir,addr) (pmd_page_vaddr(*(dir)) + __pte_index(addr)) ··· 236 #define pte_unmap(pte) do { } while (0) 237 #define pte_unmap_nested(pte) do { } while (0) 238 239 - #define set_pte(ptep, pte) cpu_set_pte(ptep,pte) 240 - #define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) 241 242 /* 243 * The following only work if pte_present() is true.
··· 21 22 #include <asm/memory.h> 23 #include <asm/arch/vmalloc.h> 24 + #include <asm/pgtable-hwdef.h> 25 26 /* 27 * Just any arbitrary offset to the start of the vmalloc VM area: the ··· 170 #define L_PTE_EXEC (1 << 6) 171 #define L_PTE_DIRTY (1 << 7) 172 #define L_PTE_SHARED (1 << 10) /* shared(v6), coherent(xsc3) */ 173 174 #ifndef __ASSEMBLY__ 175 ··· 228 #define pfn_pte(pfn,prot) (__pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot))) 229 230 #define pte_none(pte) (!pte_val(pte)) 231 + #define pte_clear(mm,addr,ptep) set_pte_ext(ptep, __pte(0), 0) 232 #define pte_page(pte) (pfn_to_page(pte_pfn(pte))) 233 #define pte_offset_kernel(dir,addr) (pmd_page_vaddr(*(dir)) + __pte_index(addr)) 234 #define pte_offset_map(dir,addr) (pmd_page_vaddr(*(dir)) + __pte_index(addr)) ··· 236 #define pte_unmap(pte) do { } while (0) 237 #define pte_unmap_nested(pte) do { } while (0) 238 239 + #define set_pte_ext(ptep,pte,ext) cpu_set_pte_ext(ptep,pte,ext) 240 + 241 + #define set_pte_at(mm,addr,ptep,pteval) do { \ 242 + set_pte_ext(ptep, pteval, (addr) >= PAGE_OFFSET ? 0 : PTE_EXT_NG); \ 243 + } while (0) 244 245 /* 246 * The following only work if pte_present() is true.
+8 -8
include/asm-arm/processor.h
··· 103 #if __LINUX_ARM_ARCH__ >= 5 104 105 #define ARCH_HAS_PREFETCH 106 - #define prefetch(ptr) \ 107 - ({ \ 108 - __asm__ __volatile__( \ 109 - "pld\t%0" \ 110 - : \ 111 - : "o" (*(char *)(ptr)) \ 112 - : "cc"); \ 113 - }) 114 115 #define ARCH_HAS_PREFETCHW 116 #define prefetchw(ptr) prefetch(ptr)
··· 103 #if __LINUX_ARM_ARCH__ >= 5 104 105 #define ARCH_HAS_PREFETCH 106 + static inline void prefetch(const void *ptr) 107 + { 108 + __asm__ __volatile__( 109 + "pld\t%0" 110 + : 111 + : "o" (*(char *)ptr) 112 + : "cc"); 113 + } 114 115 #define ARCH_HAS_PREFETCHW 116 #define prefetchw(ptr) prefetch(ptr)
+49 -12
include/asm-arm/system.h
··· 139 #define cpu_is_xscale() 1 140 #endif 141 142 - #define set_cr(x) \ 143 - __asm__ __volatile__( \ 144 - "mcr p15, 0, %0, c1, c0, 0 @ set CR" \ 145 - : : "r" (x) : "cc") 146 147 - #define get_cr() \ 148 - ({ \ 149 - unsigned int __val; \ 150 - __asm__ __volatile__( \ 151 - "mrc p15, 0, %0, c1, c0, 0 @ get CR" \ 152 - : "=r" (__val) : : "cc"); \ 153 - __val; \ 154 - }) 155 156 extern unsigned long cr_no_alignment; /* defined in entry-armv.S */ 157 extern unsigned long cr_alignment; /* defined in entry-armv.S */ 158 159 #define UDBG_UNDEFINED (1 << 0) 160 #define UDBG_SYSCALL (1 << 1)
··· 139 #define cpu_is_xscale() 1 140 #endif 141 142 + static inline unsigned int get_cr(void) 143 + { 144 + unsigned int val; 145 + asm("mrc p15, 0, %0, c1, c0, 0 @ get CR" : "=r" (val) : : "cc"); 146 + return val; 147 + } 148 149 + static inline void set_cr(unsigned int val) 150 + { 151 + asm volatile("mcr p15, 0, %0, c1, c0, 0 @ set CR" 152 + : : "r" (val) : "cc"); 153 + } 154 + 155 + #define CPACC_FULL(n) (3 << (n * 2)) 156 + #define CPACC_SVC(n) (1 << (n * 2)) 157 + #define CPACC_DISABLE(n) (0 << (n * 2)) 158 + 159 + static inline unsigned int get_copro_access(void) 160 + { 161 + unsigned int val; 162 + asm("mrc p15, 0, %0, c1, c0, 2 @ get copro access" 163 + : "=r" (val) : : "cc"); 164 + return val; 165 + } 166 + 167 + static inline void set_copro_access(unsigned int val) 168 + { 169 + asm volatile("mcr p15, 0, %0, c1, c0, 2 @ set copro access" 170 + : : "r" (val) : "cc"); 171 + } 172 173 extern unsigned long cr_no_alignment; /* defined in entry-armv.S */ 174 extern unsigned long cr_alignment; /* defined in entry-armv.S */ 175 + 176 + #ifndef CONFIG_SMP 177 + static inline void adjust_cr(unsigned long mask, unsigned long set) 178 + { 179 + unsigned long flags, cr; 180 + 181 + mask &= ~CR_A; 182 + 183 + set &= mask; 184 + 185 + local_irq_save(flags); 186 + 187 + cr_no_alignment = (cr_no_alignment & ~mask) | set; 188 + cr_alignment = (cr_alignment & ~mask) | set; 189 + 190 + set_cr((get_cr() & ~mask) | set); 191 + 192 + local_irq_restore(flags); 193 + } 194 + #endif 195 196 #define UDBG_UNDEFINED (1 << 0) 197 #define UDBG_SYSCALL (1 << 1)
+13
include/asm-arm/unistd.h
··· 347 #define __NR_mbind (__NR_SYSCALL_BASE+319) 348 #define __NR_get_mempolicy (__NR_SYSCALL_BASE+320) 349 #define __NR_set_mempolicy (__NR_SYSCALL_BASE+321) 350 351 /* 352 * The following SWIs are ARM private.
··· 347 #define __NR_mbind (__NR_SYSCALL_BASE+319) 348 #define __NR_get_mempolicy (__NR_SYSCALL_BASE+320) 349 #define __NR_set_mempolicy (__NR_SYSCALL_BASE+321) 350 + #define __NR_openat (__NR_SYSCALL_BASE+322) 351 + #define __NR_mkdirat (__NR_SYSCALL_BASE+323) 352 + #define __NR_mknodat (__NR_SYSCALL_BASE+324) 353 + #define __NR_fchownat (__NR_SYSCALL_BASE+325) 354 + #define __NR_futimesat (__NR_SYSCALL_BASE+326) 355 + #define __NR_fstatat64 (__NR_SYSCALL_BASE+327) 356 + #define __NR_unlinkat (__NR_SYSCALL_BASE+328) 357 + #define __NR_renameat (__NR_SYSCALL_BASE+329) 358 + #define __NR_linkat (__NR_SYSCALL_BASE+330) 359 + #define __NR_symlinkat (__NR_SYSCALL_BASE+331) 360 + #define __NR_readlinkat (__NR_SYSCALL_BASE+332) 361 + #define __NR_fchmodat (__NR_SYSCALL_BASE+333) 362 + #define __NR_faccessat (__NR_SYSCALL_BASE+334) 363 364 /* 365 * The following SWIs are ARM private.