Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm

Pull core ARM updates from Russell King:
"This is the bulk of the core ARM updates for this merge window.
Included in here is a different way to handle the VIVT cache flushing
on context switch, which should allow scheduler folk to remove a
special case in their core code.

We have architectured timer support here, which is a set of timers
specified by the ARM architecture for future SoCs. So we should see
less variability in timer design going forward.

The last big thing here is my cleanup to the way we handle PCI across
ARM, fixing some oddities in some platforms which hadn't realised
there was a way to deal with their private data already built in to
our PCI backend.

I've also removed support for the ARMv3 architecture; it hasn't worked
properly for years so it seems pointless to keep it around."

* 'for-linus' of git://git.linaro.org/people/rmk/linux-arm: (47 commits)
ARM: PCI: remove per-pci_hw list of buses
ARM: PCI: dove/kirkwood/mv78xx0: use sys->private_data
ARM: PCI: provide a default bus scan implementation
ARM: PCI: get rid of pci_std_swizzle()
ARM: PCI: versatile: fix PCI interrupt setup
ARM: PCI: integrator: use common PCI swizzle
ARM: 7416/1: LPAE: Remove unused L_PTE_(BUFFERABLE|CACHEABLE) macros
ARM: 7415/1: vfp: convert printk's to pr_*'s
ARM: decompressor: avoid speculative prefetch from non-RAM areas
ARM: Remove ARMv3 support from decompressor
ARM: 7413/1: move read_{boot,persistent}_clock to the architecture level
ARM: Remove support for ARMv3 ARM610 and ARM710 CPUs
ARM: 7363/1: DEBUG_LL: limit early mapping to the minimum
ARM: 7391/1: versatile: add some auxdata for device trees
ARM: 7389/2: plat-versatile: modernize FPGA IRQ controller
AMBA: get rid of last two uses of NO_IRQ
ARM: 7408/1: cacheflush: return error to userspace when flushing syscall fails
ARM: 7409/1: Do not call flush_cache_user_range with mmap_sem held
ARM: 7404/1: cmpxchg64: use atomic64 and local64 routines for cmpxchg64
ARM: 7347/1: SCU: use cpu_logical_map for per-CPU low power mode
...

+1460 -2454
+27
Documentation/devicetree/bindings/arm/arch_timer.txt
··· 1 + * ARM architected timer 2 + 3 + ARM Cortex-A7 and Cortex-A15 have a per-core architected timer, which 4 + provides per-cpu timers. 5 + 6 + The timer is attached to a GIC to deliver its per-processor interrupts. 7 + 8 + ** Timer node properties: 9 + 10 + - compatible : Should at least contain "arm,armv7-timer". 11 + 12 + - interrupts : Interrupt list for secure, non-secure, virtual and 13 + hypervisor timers, in that order. 14 + 15 + - clock-frequency : The frequency of the main counter, in Hz. Optional. 16 + 17 + Example: 18 + 19 + timer { 20 + compatible = "arm,cortex-a15-timer", 21 + "arm,armv7-timer"; 22 + interrupts = <1 13 0xf08>, 23 + <1 14 0xf08>, 24 + <1 11 0xf08>, 25 + <1 10 0xf08>; 26 + clock-frequency = <100000000>; 27 + };
+10 -12
arch/arm/Kconfig
··· 11 11 select HAVE_OPROFILE if (HAVE_PERF_EVENTS) 12 12 select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL 13 13 select HAVE_ARCH_KGDB 14 + select HAVE_ARCH_TRACEHOOK 14 15 select HAVE_KPROBES if !XIP_KERNEL 15 16 select HAVE_KRETPROBES if (HAVE_KPROBES) 16 17 select HAVE_FUNCTION_TRACER if (!XIP_KERNEL) ··· 31 30 select HAVE_HW_BREAKPOINT if (PERF_EVENTS && (CPU_V6 || CPU_V6K || CPU_V7)) 32 31 select HAVE_C_RECORDMCOUNT 33 32 select HAVE_GENERIC_HARDIRQS 33 + select HARDIRQS_SW_RESEND 34 + select GENERIC_IRQ_PROBE 34 35 select GENERIC_IRQ_SHOW 35 36 select CPU_PM if (SUSPEND || CPU_IDLE) 36 37 select GENERIC_PCI_IOMAP ··· 126 123 default y 127 124 128 125 config TRACE_IRQFLAGS_SUPPORT 129 - bool 130 - default y 131 - 132 - config HARDIRQS_SW_RESEND 133 - bool 134 - default y 135 - 136 - config GENERIC_IRQ_PROBE 137 126 bool 138 127 default y 139 128 ··· 275 280 select NEED_MACH_IO_H 276 281 select NEED_MACH_MEMORY_H 277 282 select SPARSE_IRQ 283 + select MULTI_IRQ_HANDLER 278 284 help 279 285 Support for ARM's Integrator platform. 280 286 ··· 628 632 select CLKDEV_LOOKUP 629 633 select GENERIC_CLOCKEVENTS 630 634 select GPIO_PXA 631 - select TICK_ONESHOT 632 635 select PLAT_PXA 633 636 select SPARSE_IRQ 634 637 select GENERIC_ALLOCATOR ··· 711 716 select ARCH_REQUIRE_GPIOLIB 712 717 select GENERIC_CLOCKEVENTS 713 718 select GPIO_PXA 714 - select TICK_ONESHOT 715 719 select PLAT_PXA 716 720 select SPARSE_IRQ 717 721 select AUTO_ZRELADDR ··· 777 783 select CPU_FREQ 778 784 select GENERIC_CLOCKEVENTS 779 785 select CLKDEV_LOOKUP 780 - select TICK_ONESHOT 781 786 select ARCH_REQUIRE_GPIOLIB 782 787 select HAVE_IDE 783 788 select NEED_MACH_MEMORY_H ··· 1545 1552 help 1546 1553 This option enables support for the ARM system coherency unit 1547 1554 1555 + config ARM_ARCH_TIMER 1556 + bool "Architected timer support" 1557 + depends on CPU_V7 1558 + help 1559 + This option enables support for the ARM architected timer 1560 + 1548 1561 config HAVE_ARM_TWD 1549 1562 bool 1550 1563 depends on SMP 1551 - select TICK_ONESHOT 1552 1564 help 1553 1565 This options enables support for the ARM timer and watchdog unit 1554 1566
-2
arch/arm/Makefile
··· 70 70 arch-$(CONFIG_CPU_32v3) :=-D__LINUX_ARM_ARCH__=3 -march=armv3 71 71 72 72 # This selects how we optimise for the processor. 73 - tune-$(CONFIG_CPU_ARM610) :=-mtune=arm610 74 - tune-$(CONFIG_CPU_ARM710) :=-mtune=arm710 75 73 tune-$(CONFIG_CPU_ARM7TDMI) :=-mtune=arm7tdmi 76 74 tune-$(CONFIG_CPU_ARM720T) :=-mtune=arm7tdmi 77 75 tune-$(CONFIG_CPU_ARM740T) :=-mtune=arm7tdmi
+21 -50
arch/arm/boot/compressed/head.S
··· 567 567 mcr p15, 0, r0, c7, c0, 0 @ invalidate whole cache v3 568 568 mov pc, lr 569 569 570 + #ifdef CONFIG_CPU_DCACHE_WRITETHROUGH 571 + #define CB_BITS 0x08 572 + #else 573 + #define CB_BITS 0x0c 574 + #endif 575 + 570 576 __setup_mmu: sub r3, r4, #16384 @ Page directory size 571 577 bic r3, r3, #0xff @ Align the pointer 572 578 bic r3, r3, #0x3f00 ··· 584 578 mov r9, r0, lsr #18 585 579 mov r9, r9, lsl #18 @ start of RAM 586 580 add r10, r9, #0x10000000 @ a reasonable RAM size 587 - mov r1, #0x12 588 - orr r1, r1, #3 << 10 581 + mov r1, #0x12 @ XN|U + section mapping 582 + orr r1, r1, #3 << 10 @ AP=11 589 583 add r2, r3, #16384 590 584 1: cmp r1, r9 @ if virt > start of RAM 591 - #ifdef CONFIG_CPU_DCACHE_WRITETHROUGH 592 - orrhs r1, r1, #0x08 @ set cacheable 593 - #else 594 - orrhs r1, r1, #0x0c @ set cacheable, bufferable 595 - #endif 596 - cmp r1, r10 @ if virt > end of RAM 597 - bichs r1, r1, #0x0c @ clear cacheable, bufferable 585 + cmphs r10, r1 @ && end of RAM > virt 586 + bic r1, r1, #0x1c @ clear XN|U + C + B 587 + orrlo r1, r1, #0x10 @ Set XN|U for non-RAM 588 + orrhs r1, r1, r6 @ set RAM section settings 598 589 str r1, [r0], #4 @ 1:1 mapping 599 590 add r1, r1, #1048576 600 591 teq r0, r2 ··· 602 599 * so there is no map overlap problem for up to 1 MB compressed kernel. 603 600 * If the execution is in RAM then we would only be duplicating the above. 604 601 */ 605 - mov r1, #0x1e 602 + orr r1, r6, #0x04 @ ensure B is set for this 606 603 orr r1, r1, #3 << 10 607 604 mov r2, pc 608 605 mov r2, r2, lsr #20 ··· 623 620 __armv4_mmu_cache_on: 624 621 mov r12, lr 625 622 #ifdef CONFIG_MMU 623 + mov r6, #CB_BITS | 0x12 @ U 626 624 bl __setup_mmu 627 625 mov r0, #0 628 626 mcr p15, 0, r0, c7, c10, 4 @ drain write buffer ··· 645 641 #ifdef CONFIG_MMU 646 642 mrc p15, 0, r11, c0, c1, 4 @ read ID_MMFR0 647 643 tst r11, #0xf @ VMSA 644 + movne r6, #CB_BITS | 0x02 @ !XN 648 645 blne __setup_mmu 649 646 mov r0, #0 650 647 mcr p15, 0, r0, c7, c10, 4 @ drain write buffer ··· 660 655 orr r0, r0, #1 << 25 @ big-endian page tables 661 656 #endif 662 657 orrne r0, r0, #1 @ MMU enabled 663 - movne r1, #-1 658 + movne r1, #0xfffffffd @ domain 0 = client 664 659 mcrne p15, 0, r3, c2, c0, 0 @ load page table pointer 665 660 mcrne p15, 0, r1, c3, c0, 0 @ load domain access control 666 661 #endif ··· 673 668 674 669 __fa526_cache_on: 675 670 mov r12, lr 671 + mov r6, #CB_BITS | 0x12 @ U 676 672 bl __setup_mmu 677 673 mov r0, #0 678 674 mcr p15, 0, r0, c7, c7, 0 @ Invalidate whole cache ··· 684 678 bl __common_mmu_cache_on 685 679 mov r0, #0 686 680 mcr p15, 0, r0, c8, c7, 0 @ flush UTLB 687 - mov pc, r12 688 - 689 - __arm6_mmu_cache_on: 690 - mov r12, lr 691 - bl __setup_mmu 692 - mov r0, #0 693 - mcr p15, 0, r0, c7, c0, 0 @ invalidate whole cache v3 694 - mcr p15, 0, r0, c5, c0, 0 @ invalidate whole TLB v3 695 - mov r0, #0x30 696 - bl __common_mmu_cache_on 697 - mov r0, #0 698 - mcr p15, 0, r0, c5, c0, 0 @ invalidate whole TLB v3 699 681 mov pc, r12 700 682 701 683 __common_mmu_cache_on: ··· 750 756 .align 2 751 757 .type proc_types,#object 752 758 proc_types: 753 - .word 0x41560600 @ ARM6/610 754 - .word 0xffffffe0 755 - W(b) __arm6_mmu_cache_off @ works, but slow 756 - W(b) __arm6_mmu_cache_off 757 - mov pc, lr 758 - THUMB( nop ) 759 - @ b __arm6_mmu_cache_on @ untested 760 - @ b __arm6_mmu_cache_off 761 - @ b __armv3_mmu_cache_flush 762 - 763 759 .word 0x00000000 @ old ARM ID 764 760 .word 0x0000f000 765 761 mov pc, lr ··· 761 777 762 778 .word 0x41007000 @ ARM7/710 763 779 .word 0xfff8fe00 764 - W(b) __arm7_mmu_cache_off 765 - W(b) __arm7_mmu_cache_off 780 + mov pc, lr 781 + THUMB( nop ) 782 + mov pc, lr 783 + THUMB( nop ) 766 784 mov pc, lr 767 785 THUMB( nop ) 768 786 ··· 962 976 mcr p15, 0, r0, c7, c10, 4 @ DSB 963 977 mcr p15, 0, r0, c7, c5, 4 @ ISB 964 978 mov pc, r12 965 - 966 - __arm6_mmu_cache_off: 967 - mov r0, #0x00000030 @ ARM6 control reg. 968 - b __armv3_mmu_cache_off 969 - 970 - __arm7_mmu_cache_off: 971 - mov r0, #0x00000070 @ ARM7 control reg. 972 - b __armv3_mmu_cache_off 973 - 974 - __armv3_mmu_cache_off: 975 - mcr p15, 0, r0, c1, c0, 0 @ turn MMU and cache off 976 - mov r0, #0 977 - mcr p15, 0, r0, c7, c0, 0 @ invalidate whole cache v3 978 - mcr p15, 0, r0, c5, c0, 0 @ invalidate whole TLB v3 979 - mov pc, lr 980 979 981 980 /* 982 981 * Clean and flush the cache to maintain consistency.
+1 -6
arch/arm/common/it8152.c
··· 222 222 return PCIBIOS_SUCCESSFUL; 223 223 } 224 224 225 - static struct pci_ops it8152_ops = { 225 + struct pci_ops it8152_ops = { 226 226 .read = it8152_pci_read_config, 227 227 .write = it8152_pci_write_config, 228 228 }; ··· 345 345 pci_write_config_byte(dev, PCI_LATENCY_TIMER, lat); 346 346 } 347 347 348 - 349 - struct pci_bus * __init it8152_pci_scan_bus(int nr, struct pci_sys_data *sys) 350 - { 351 - return pci_scan_root_bus(NULL, nr, &it8152_ops, sys, &sys->resources); 352 - } 353 348 354 349 EXPORT_SYMBOL(dma_set_coherent_mask);
+1 -10
arch/arm/common/via82c505.c
··· 51 51 return PCIBIOS_SUCCESSFUL; 52 52 } 53 53 54 - static struct pci_ops via82c505_ops = { 54 + struct pci_ops via82c505_ops = { 55 55 .read = via82c505_read_config, 56 56 .write = via82c505_write_config, 57 57 }; ··· 80 80 int __init via82c505_setup(int nr, struct pci_sys_data *sys) 81 81 { 82 82 return (nr == 0); 83 - } 84 - 85 - struct pci_bus * __init via82c505_scan_bus(int nr, struct pci_sys_data *sysdata) 86 - { 87 - if (nr == 0) 88 - return pci_scan_root_bus(NULL, 0, &via82c505_ops, sysdata, 89 - &sysdata->resources); 90 - 91 - return NULL; 92 83 }
+31 -25
arch/arm/common/vic.c
··· 39 39 * struct vic_device - VIC PM device 40 40 * @irq: The IRQ number for the base of the VIC. 41 41 * @base: The register base for the VIC. 42 + * @valid_sources: A bitmask of valid interrupts 42 43 * @resume_sources: A bitmask of interrupts for resume. 43 44 * @resume_irqs: The IRQs enabled for resume. 44 45 * @int_select: Save for VIC_INT_SELECT. ··· 51 50 struct vic_device { 52 51 void __iomem *base; 53 52 int irq; 53 + u32 valid_sources; 54 54 u32 resume_sources; 55 55 u32 resume_irqs; 56 56 u32 int_select; ··· 166 164 late_initcall(vic_pm_init); 167 165 #endif /* CONFIG_PM */ 168 166 167 + static struct irq_chip vic_chip; 168 + 169 + static int vic_irqdomain_map(struct irq_domain *d, unsigned int irq, 170 + irq_hw_number_t hwirq) 171 + { 172 + struct vic_device *v = d->host_data; 173 + 174 + /* Skip invalid IRQs, only register handlers for the real ones */ 175 + if (!(v->valid_sources & (1 << hwirq))) 176 + return -ENOTSUPP; 177 + irq_set_chip_and_handler(irq, &vic_chip, handle_level_irq); 178 + irq_set_chip_data(irq, v->base); 179 + set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); 180 + return 0; 181 + } 182 + 183 + static struct irq_domain_ops vic_irqdomain_ops = { 184 + .map = vic_irqdomain_map, 185 + .xlate = irq_domain_xlate_onetwocell, 186 + }; 187 + 169 188 /** 170 189 * vic_register() - Register a VIC. 171 190 * @base: The base address of the VIC. 172 191 * @irq: The base IRQ for the VIC. 192 + * @valid_sources: bitmask of valid interrupts 173 193 * @resume_sources: bitmask of interrupts allowed for resume sources. 174 194 * @node: The device tree node associated with the VIC. 175 195 * ··· 202 178 * This also configures the IRQ domain for the VIC. 203 179 */ 204 180 static void __init vic_register(void __iomem *base, unsigned int irq, 205 - u32 resume_sources, struct device_node *node) 181 + u32 valid_sources, u32 resume_sources, 182 + struct device_node *node) 206 183 { 207 184 struct vic_device *v; 208 185 ··· 214 189 215 190 v = &vic_devices[vic_id]; 216 191 v->base = base; 192 + v->valid_sources = valid_sources; 217 193 v->resume_sources = resume_sources; 218 194 v->irq = irq; 219 195 vic_id++; 220 - v->domain = irq_domain_add_legacy(node, 32, irq, 0, 221 - &irq_domain_simple_ops, v); 196 + v->domain = irq_domain_add_legacy(node, fls(valid_sources), irq, 0, 197 + &vic_irqdomain_ops, v); 222 198 } 223 199 224 200 static void vic_ack_irq(struct irq_data *d) ··· 313 287 } 314 288 } 315 289 316 - static void __init vic_set_irq_sources(void __iomem *base, 317 - unsigned int irq_start, u32 vic_sources) 318 - { 319 - unsigned int i; 320 - 321 - for (i = 0; i < 32; i++) { 322 - if (vic_sources & (1 << i)) { 323 - unsigned int irq = irq_start + i; 324 - 325 - irq_set_chip_and_handler(irq, &vic_chip, 326 - handle_level_irq); 327 - irq_set_chip_data(irq, base); 328 - set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); 329 - } 330 - } 331 - } 332 - 333 290 /* 334 291 * The PL190 cell from ARM has been modified by ST to handle 64 interrupts. 335 292 * The original cell has 32 interrupts, while the modified one has 64, ··· 347 338 writel(32, base + VIC_PL190_DEF_VECT_ADDR); 348 339 } 349 340 350 - vic_set_irq_sources(base, irq_start, vic_sources); 351 - vic_register(base, irq_start, 0, node); 341 + vic_register(base, irq_start, vic_sources, 0, node); 352 342 } 353 343 354 344 void __init __vic_init(void __iomem *base, unsigned int irq_start, ··· 387 379 388 380 vic_init2(base); 389 381 390 - vic_set_irq_sources(base, irq_start, vic_sources); 391 - 392 - vic_register(base, irq_start, resume_sources, node); 382 + vic_register(base, irq_start, vic_sources, resume_sources, node); 393 383 } 394 384 395 385 /**
-2
arch/arm/configs/rpc_defconfig
··· 8 8 CONFIG_MODULE_UNLOAD=y 9 9 # CONFIG_BLK_DEV_BSG is not set 10 10 CONFIG_ARCH_RPC=y 11 - CONFIG_CPU_ARM610=y 12 - CONFIG_CPU_ARM710=y 13 11 CONFIG_CPU_SA110=y 14 12 CONFIG_ZBOOT_ROM_TEXT=0x0 15 13 CONFIG_ZBOOT_ROM_BSS=0x0
+19
arch/arm/include/asm/arch_timer.h
··· 1 + #ifndef __ASMARM_ARCH_TIMER_H 2 + #define __ASMARM_ARCH_TIMER_H 3 + 4 + #ifdef CONFIG_ARM_ARCH_TIMER 5 + int arch_timer_of_register(void); 6 + int arch_timer_sched_clock_init(void); 7 + #else 8 + static inline int arch_timer_of_register(void) 9 + { 10 + return -ENXIO; 11 + } 12 + 13 + static inline int arch_timer_sched_clock_init(void) 14 + { 15 + return -ENXIO; 16 + } 17 + #endif 18 + 19 + #endif
+3 -3
arch/arm/include/asm/cacheflush.h
··· 101 101 void (*flush_user_range)(unsigned long, unsigned long, unsigned int); 102 102 103 103 void (*coherent_kern_range)(unsigned long, unsigned long); 104 - void (*coherent_user_range)(unsigned long, unsigned long); 104 + int (*coherent_user_range)(unsigned long, unsigned long); 105 105 void (*flush_kern_dcache_area)(void *, size_t); 106 106 107 107 void (*dma_map_area)(const void *, size_t, int); ··· 142 142 extern void __cpuc_flush_user_all(void); 143 143 extern void __cpuc_flush_user_range(unsigned long, unsigned long, unsigned int); 144 144 extern void __cpuc_coherent_kern_range(unsigned long, unsigned long); 145 - extern void __cpuc_coherent_user_range(unsigned long, unsigned long); 145 + extern int __cpuc_coherent_user_range(unsigned long, unsigned long); 146 146 extern void __cpuc_flush_dcache_area(void *, size_t); 147 147 148 148 /* ··· 249 249 * Harvard caches are synchronised for the user space address range. 250 250 * This is used for the ARM private sys_cacheflush system call. 251 251 */ 252 - #define flush_cache_user_range(vma,start,end) \ 252 + #define flush_cache_user_range(start,end) \ 253 253 __cpuc_coherent_user_range((start) & PAGE_MASK, PAGE_ALIGN(end)) 254 254 255 255 /*
+12 -59
arch/arm/include/asm/cmpxchg.h
··· 229 229 (unsigned long)(n), \ 230 230 sizeof(*(ptr)))) 231 231 232 - #ifndef CONFIG_CPU_V6 /* min ARCH >= ARMv6K */ 232 + #define cmpxchg64(ptr, o, n) \ 233 + ((__typeof__(*(ptr)))atomic64_cmpxchg(container_of((ptr), \ 234 + atomic64_t, \ 235 + counter), \ 236 + (unsigned long)(o), \ 237 + (unsigned long)(n))) 233 238 234 - /* 235 - * Note : ARMv7-M (currently unsupported by Linux) does not support 236 - * ldrexd/strexd. If ARMv7-M is ever supported by the Linux kernel, it should 237 - * not be allowed to use __cmpxchg64. 238 - */ 239 - static inline unsigned long long __cmpxchg64(volatile void *ptr, 240 - unsigned long long old, 241 - unsigned long long new) 242 - { 243 - register unsigned long long oldval asm("r0"); 244 - register unsigned long long __old asm("r2") = old; 245 - register unsigned long long __new asm("r4") = new; 246 - unsigned long res; 247 - 248 - do { 249 - asm volatile( 250 - " @ __cmpxchg8\n" 251 - " ldrexd %1, %H1, [%2]\n" 252 - " mov %0, #0\n" 253 - " teq %1, %3\n" 254 - " teqeq %H1, %H3\n" 255 - " strexdeq %0, %4, %H4, [%2]\n" 256 - : "=&r" (res), "=&r" (oldval) 257 - : "r" (ptr), "Ir" (__old), "r" (__new) 258 - : "memory", "cc"); 259 - } while (res); 260 - 261 - return oldval; 262 - } 263 - 264 - static inline unsigned long long __cmpxchg64_mb(volatile void *ptr, 265 - unsigned long long old, 266 - unsigned long long new) 267 - { 268 - unsigned long long ret; 269 - 270 - smp_mb(); 271 - ret = __cmpxchg64(ptr, old, new); 272 - smp_mb(); 273 - 274 - return ret; 275 - } 276 - 277 - #define cmpxchg64(ptr,o,n) \ 278 - ((__typeof__(*(ptr)))__cmpxchg64_mb((ptr), \ 279 - (unsigned long long)(o), \ 280 - (unsigned long long)(n))) 281 - 282 - #define cmpxchg64_local(ptr,o,n) \ 283 - ((__typeof__(*(ptr)))__cmpxchg64((ptr), \ 284 - (unsigned long long)(o), \ 285 - (unsigned long long)(n))) 286 - 287 - #else /* min ARCH = ARMv6 */ 288 - 289 - #define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n)) 290 - 291 - #endif 239 + #define cmpxchg64_local(ptr, o, n) \ 240 + ((__typeof__(*(ptr)))local64_cmpxchg(container_of((ptr), \ 241 + local64_t, \ 242 + a), \ 243 + (unsigned long)(o), \ 244 + (unsigned long)(n))) 292 245 293 246 #endif /* __LINUX_ARM_ARCH__ >= 6 */ 294 247
-8
arch/arm/include/asm/glue-df.h
··· 31 31 #undef CPU_DABORT_HANDLER 32 32 #undef MULTI_DABORT 33 33 34 - #if defined(CONFIG_CPU_ARM610) 35 - # ifdef CPU_DABORT_HANDLER 36 - # define MULTI_DABORT 1 37 - # else 38 - # define CPU_DABORT_HANDLER cpu_arm6_data_abort 39 - # endif 40 - #endif 41 - 42 34 #if defined(CONFIG_CPU_ARM710) 43 35 # ifdef CPU_DABORT_HANDLER 44 36 # define MULTI_DABORT 1
-18
arch/arm/include/asm/glue-proc.h
··· 23 23 * CPU_NAME - the prefix for CPU related functions 24 24 */ 25 25 26 - #ifdef CONFIG_CPU_ARM610 27 - # ifdef CPU_NAME 28 - # undef MULTI_CPU 29 - # define MULTI_CPU 30 - # else 31 - # define CPU_NAME cpu_arm6 32 - # endif 33 - #endif 34 - 35 26 #ifdef CONFIG_CPU_ARM7TDMI 36 27 # ifdef CPU_NAME 37 28 # undef MULTI_CPU 38 29 # define MULTI_CPU 39 30 # else 40 31 # define CPU_NAME cpu_arm7tdmi 41 - # endif 42 - #endif 43 - 44 - #ifdef CONFIG_CPU_ARM710 45 - # ifdef CPU_NAME 46 - # undef MULTI_CPU 47 - # define MULTI_CPU 48 - # else 49 - # define CPU_NAME cpu_arm7 50 32 # endif 51 33 #endif 52 34
+1 -1
arch/arm/include/asm/hardware/it8152.h
··· 110 110 extern void it8152_init_irq(void); 111 111 extern int it8152_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin); 112 112 extern int it8152_pci_setup(int nr, struct pci_sys_data *sys); 113 - extern struct pci_bus *it8152_pci_scan_bus(int nr, struct pci_sys_data *sys); 113 + extern struct pci_ops it8152_ops; 114 114 115 115 #endif /* __ASM_HARDWARE_IT8152_H */
+6 -11
arch/arm/include/asm/mach/pci.h
··· 12 12 #define __ASM_MACH_PCI_H 13 13 14 14 struct pci_sys_data; 15 + struct pci_ops; 15 16 struct pci_bus; 16 17 17 18 struct hw_pci { 18 19 #ifdef CONFIG_PCI_DOMAINS 19 20 int domain; 20 21 #endif 21 - struct list_head buses; 22 + struct pci_ops *ops; 22 23 int nr_controllers; 23 24 int (*setup)(int nr, struct pci_sys_data *); 24 25 struct pci_bus *(*scan)(int nr, struct pci_sys_data *); ··· 46 45 u8 (*swizzle)(struct pci_dev *, u8 *); 47 46 /* IRQ mapping */ 48 47 int (*map_irq)(const struct pci_dev *, u8, u8); 49 - struct hw_pci *hw; 50 48 void *private_data; /* platform controller private data */ 51 49 }; 52 - 53 - /* 54 - * This is the standard PCI-PCI bridge swizzling algorithm. 55 - */ 56 - #define pci_std_swizzle pci_common_swizzle 57 50 58 51 /* 59 52 * Call this with your hw_pci struct to initialise the PCI system. ··· 57 62 /* 58 63 * PCI controllers 59 64 */ 65 + extern struct pci_ops iop3xx_ops; 60 66 extern int iop3xx_pci_setup(int nr, struct pci_sys_data *); 61 - extern struct pci_bus *iop3xx_pci_scan_bus(int nr, struct pci_sys_data *); 62 67 extern void iop3xx_pci_preinit(void); 63 68 extern void iop3xx_pci_preinit_cond(void); 64 69 70 + extern struct pci_ops dc21285_ops; 65 71 extern int dc21285_setup(int nr, struct pci_sys_data *); 66 - extern struct pci_bus *dc21285_scan_bus(int nr, struct pci_sys_data *); 67 72 extern void dc21285_preinit(void); 68 73 extern void dc21285_postinit(void); 69 74 75 + extern struct pci_ops via82c505_ops; 70 76 extern int via82c505_setup(int nr, struct pci_sys_data *); 71 - extern struct pci_bus *via82c505_scan_bus(int nr, struct pci_sys_data *); 72 77 extern void via82c505_init(void *sysdata); 73 78 79 + extern struct pci_ops pci_v3_ops; 74 80 extern int pci_v3_setup(int nr, struct pci_sys_data *); 75 - extern struct pci_bus *pci_v3_scan_bus(int nr, struct pci_sys_data *); 76 81 extern void pci_v3_preinit(void); 77 82 extern void pci_v3_postinit(void); 78 83
+5
arch/arm/include/asm/mach/time.h
··· 42 42 43 43 extern void timer_tick(void); 44 44 45 + struct timespec; 46 + typedef void (*clock_access_fn)(struct timespec *); 47 + extern int register_persistent_clock(clock_access_fn read_boot, 48 + clock_access_fn read_persistent); 49 + 45 50 #endif
-7
arch/arm/include/asm/mmu.h
··· 34 34 35 35 #endif 36 36 37 - /* 38 - * switch_mm() may do a full cache flush over the context switch, 39 - * so enable interrupts over the context switch to avoid high 40 - * latency. 41 - */ 42 - #define __ARCH_WANT_INTERRUPTS_ON_CTXSW 43 - 44 37 #endif
+79 -25
arch/arm/include/asm/mmu_context.h
··· 43 43 #define ASID_FIRST_VERSION (1 << ASID_BITS) 44 44 45 45 extern unsigned int cpu_last_asid; 46 - #ifdef CONFIG_SMP 47 - DECLARE_PER_CPU(struct mm_struct *, current_mm); 48 - #endif 49 46 50 47 void __init_new_context(struct task_struct *tsk, struct mm_struct *mm); 51 48 void __new_context(struct mm_struct *mm); 49 + void cpu_set_reserved_ttbr0(void); 52 50 53 - static inline void check_context(struct mm_struct *mm) 51 + static inline void switch_new_context(struct mm_struct *mm) 54 52 { 55 - /* 56 - * This code is executed with interrupts enabled. Therefore, 57 - * mm->context.id cannot be updated to the latest ASID version 58 - * on a different CPU (and condition below not triggered) 59 - * without first getting an IPI to reset the context. The 60 - * alternative is to take a read_lock on mm->context.id_lock 61 - * (after changing its type to rwlock_t). 62 - */ 63 - if (unlikely((mm->context.id ^ cpu_last_asid) >> ASID_BITS)) 64 - __new_context(mm); 53 + unsigned long flags; 65 54 55 + __new_context(mm); 56 + 57 + local_irq_save(flags); 58 + cpu_switch_mm(mm->pgd, mm); 59 + local_irq_restore(flags); 60 + } 61 + 62 + static inline void check_and_switch_context(struct mm_struct *mm, 63 + struct task_struct *tsk) 64 + { 66 65 if (unlikely(mm->context.kvm_seq != init_mm.context.kvm_seq)) 67 66 __check_kvm_seq(mm); 67 + 68 + /* 69 + * Required during context switch to avoid speculative page table 70 + * walking with the wrong TTBR. 71 + */ 72 + cpu_set_reserved_ttbr0(); 73 + 74 + if (!((mm->context.id ^ cpu_last_asid) >> ASID_BITS)) 75 + /* 76 + * The ASID is from the current generation, just switch to the 77 + * new pgd. This condition is only true for calls from 78 + * context_switch() and interrupts are already disabled. 79 + */ 80 + cpu_switch_mm(mm->pgd, mm); 81 + else if (irqs_disabled()) 82 + /* 83 + * Defer the new ASID allocation until after the context 84 + * switch critical region since __new_context() cannot be 85 + * called with interrupts disabled (it sends IPIs). 86 + */ 87 + set_ti_thread_flag(task_thread_info(tsk), TIF_SWITCH_MM); 88 + else 89 + /* 90 + * That is a direct call to switch_mm() or activate_mm() with 91 + * interrupts enabled and a new context. 92 + */ 93 + switch_new_context(mm); 68 94 } 69 95 70 96 #define init_new_context(tsk,mm) (__init_new_context(tsk,mm),0) 71 97 72 - #else 73 - 74 - static inline void check_context(struct mm_struct *mm) 98 + #define finish_arch_post_lock_switch \ 99 + finish_arch_post_lock_switch 100 + static inline void finish_arch_post_lock_switch(void) 75 101 { 102 + if (test_and_clear_thread_flag(TIF_SWITCH_MM)) 103 + switch_new_context(current->mm); 104 + } 105 + 106 + #else /* !CONFIG_CPU_HAS_ASID */ 107 + 76 108 #ifdef CONFIG_MMU 109 + 110 + static inline void check_and_switch_context(struct mm_struct *mm, 111 + struct task_struct *tsk) 112 + { 77 113 if (unlikely(mm->context.kvm_seq != init_mm.context.kvm_seq)) 78 114 __check_kvm_seq(mm); 79 - #endif 115 + 116 + if (irqs_disabled()) 117 + /* 118 + * cpu_switch_mm() needs to flush the VIVT caches. To avoid 119 + * high interrupt latencies, defer the call and continue 120 + * running with the old mm. Since we only support UP systems 121 + * on non-ASID CPUs, the old mm will remain valid until the 122 + * finish_arch_post_lock_switch() call. 123 + */ 124 + set_ti_thread_flag(task_thread_info(tsk), TIF_SWITCH_MM); 125 + else 126 + cpu_switch_mm(mm->pgd, mm); 80 127 } 128 + 129 + #define finish_arch_post_lock_switch \ 130 + finish_arch_post_lock_switch 131 + static inline void finish_arch_post_lock_switch(void) 132 + { 133 + if (test_and_clear_thread_flag(TIF_SWITCH_MM)) { 134 + struct mm_struct *mm = current->mm; 135 + cpu_switch_mm(mm->pgd, mm); 136 + } 137 + } 138 + 139 + #endif /* CONFIG_MMU */ 81 140 82 141 #define init_new_context(tsk,mm) 0 83 142 84 - #endif 143 + #endif /* CONFIG_CPU_HAS_ASID */ 85 144 86 145 #define destroy_context(mm) do { } while(0) 87 146 ··· 178 119 __flush_icache_all(); 179 120 #endif 180 121 if (!cpumask_test_and_set_cpu(cpu, mm_cpumask(next)) || prev != next) { 181 - #ifdef CONFIG_SMP 182 - struct mm_struct **crt_mm = &per_cpu(current_mm, cpu); 183 - *crt_mm = next; 184 - #endif 185 - check_context(next); 186 - cpu_switch_mm(next->pgd, next); 122 + check_and_switch_context(next, tsk); 187 123 if (cache_is_vivt()) 188 124 cpumask_clear_cpu(cpu, mm_cpumask(prev)); 189 125 }
-9
arch/arm/include/asm/page.h
··· 34 34 * processor(s) we're building for. 35 35 * 36 36 * We have the following to choose from: 37 - * v3 - ARMv3 38 37 * v4wt - ARMv4 with writethrough cache, without minicache 39 38 * v4wb - ARMv4 with writeback cache, without minicache 40 39 * v4_mc - ARMv4 with minicache ··· 42 43 */ 43 44 #undef _USER 44 45 #undef MULTI_USER 45 - 46 - #ifdef CONFIG_CPU_COPY_V3 47 - # ifdef _USER 48 - # define MULTI_USER 1 49 - # else 50 - # define _USER v3 51 - # endif 52 - #endif 53 46 54 47 #ifdef CONFIG_CPU_COPY_V4WT 55 48 # ifdef _USER
-2
arch/arm/include/asm/pgtable-3level.h
··· 69 69 */ 70 70 #define L_PTE_PRESENT (_AT(pteval_t, 3) << 0) /* Valid */ 71 71 #define L_PTE_FILE (_AT(pteval_t, 1) << 2) /* only when !PRESENT */ 72 - #define L_PTE_BUFFERABLE (_AT(pteval_t, 1) << 2) /* AttrIndx[0] */ 73 - #define L_PTE_CACHEABLE (_AT(pteval_t, 1) << 3) /* AttrIndx[1] */ 74 72 #define L_PTE_USER (_AT(pteval_t, 1) << 6) /* AP[1] */ 75 73 #define L_PTE_RDONLY (_AT(pteval_t, 1) << 7) /* AP[2] */ 76 74 #define L_PTE_SHARED (_AT(pteval_t, 3) << 8) /* SH[1:0], inner shareable */
+5
arch/arm/include/asm/ptrace.h
··· 249 249 return regs->ARM_sp; 250 250 } 251 251 252 + static inline unsigned long user_stack_pointer(struct pt_regs *regs) 253 + { 254 + return regs->ARM_sp; 255 + } 256 + 252 257 #endif /* __KERNEL__ */ 253 258 254 259 #endif /* __ASSEMBLY__ */
+93
arch/arm/include/asm/syscall.h
··· 1 + /* 2 + * Access to user system call parameters and results 3 + * 4 + * See asm-generic/syscall.h for descriptions of what we must do here. 5 + */ 6 + 7 + #ifndef _ASM_ARM_SYSCALL_H 8 + #define _ASM_ARM_SYSCALL_H 9 + 10 + #include <linux/err.h> 11 + 12 + extern const unsigned long sys_call_table[]; 13 + 14 + static inline int syscall_get_nr(struct task_struct *task, 15 + struct pt_regs *regs) 16 + { 17 + return task_thread_info(task)->syscall; 18 + } 19 + 20 + static inline void syscall_rollback(struct task_struct *task, 21 + struct pt_regs *regs) 22 + { 23 + regs->ARM_r0 = regs->ARM_ORIG_r0; 24 + } 25 + 26 + static inline long syscall_get_error(struct task_struct *task, 27 + struct pt_regs *regs) 28 + { 29 + unsigned long error = regs->ARM_r0; 30 + return IS_ERR_VALUE(error) ? error : 0; 31 + } 32 + 33 + static inline long syscall_get_return_value(struct task_struct *task, 34 + struct pt_regs *regs) 35 + { 36 + return regs->ARM_r0; 37 + } 38 + 39 + static inline void syscall_set_return_value(struct task_struct *task, 40 + struct pt_regs *regs, 41 + int error, long val) 42 + { 43 + regs->ARM_r0 = (long) error ? error : val; 44 + } 45 + 46 + #define SYSCALL_MAX_ARGS 7 47 + 48 + static inline void syscall_get_arguments(struct task_struct *task, 49 + struct pt_regs *regs, 50 + unsigned int i, unsigned int n, 51 + unsigned long *args) 52 + { 53 + if (i + n > SYSCALL_MAX_ARGS) { 54 + unsigned long *args_bad = args + SYSCALL_MAX_ARGS - i; 55 + unsigned int n_bad = n + i - SYSCALL_MAX_ARGS; 56 + pr_warning("%s called with max args %d, handling only %d\n", 57 + __func__, i + n, SYSCALL_MAX_ARGS); 58 + memset(args_bad, 0, n_bad * sizeof(args[0])); 59 + n = SYSCALL_MAX_ARGS - i; 60 + } 61 + 62 + if (i == 0) { 63 + args[0] = regs->ARM_ORIG_r0; 64 + args++; 65 + i++; 66 + n--; 67 + } 68 + 69 + memcpy(args, &regs->ARM_r0 + i, n * sizeof(args[0])); 70 + } 71 + 72 + static inline void syscall_set_arguments(struct task_struct *task, 73 + struct pt_regs *regs, 74 + unsigned int i, unsigned int n, 75 + const unsigned long *args) 76 + { 77 + if (i + n > SYSCALL_MAX_ARGS) { 78 + pr_warning("%s called with max args %d, handling only %d\n", 79 + __func__, i + n, SYSCALL_MAX_ARGS); 80 + n = SYSCALL_MAX_ARGS - i; 81 + } 82 + 83 + if (i == 0) { 84 + regs->ARM_ORIG_r0 = args[0]; 85 + args++; 86 + i++; 87 + n--; 88 + } 89 + 90 + memcpy(&regs->ARM_r0 + i, args, n * sizeof(args[0])); 91 + } 92 + 93 + #endif /* _ASM_ARM_SYSCALL_H */
+1
arch/arm/include/asm/thread_info.h
··· 153 153 #define TIF_MEMDIE 18 /* is terminating due to OOM killer */ 154 154 #define TIF_RESTORE_SIGMASK 20 155 155 #define TIF_SECCOMP 21 156 + #define TIF_SWITCH_MM 22 /* deferred switch_mm */ 156 157 157 158 #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) 158 159 #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
+2 -19
arch/arm/include/asm/tlbflush.h
··· 65 65 #define MULTI_TLB 1 66 66 #endif 67 67 68 - #define v3_tlb_flags (TLB_V3_FULL | TLB_V3_PAGE) 69 - 70 - #ifdef CONFIG_CPU_TLB_V3 71 - # define v3_possible_flags v3_tlb_flags 72 - # define v3_always_flags v3_tlb_flags 73 - # ifdef _TLB 74 - # define MULTI_TLB 1 75 - # else 76 - # define _TLB v3 77 - # endif 78 - #else 79 - # define v3_possible_flags 0 80 - # define v3_always_flags (-1UL) 81 - #endif 82 - 83 68 #define v4_tlb_flags (TLB_V4_U_FULL | TLB_V4_U_PAGE) 84 69 85 70 #ifdef CONFIG_CPU_TLB_V4WT ··· 283 298 * implemented the "%?" method, but this has been discontinued due to too 284 299 * many people getting it wrong. 285 300 */ 286 - #define possible_tlb_flags (v3_possible_flags | \ 287 - v4_possible_flags | \ 301 + #define possible_tlb_flags (v4_possible_flags | \ 288 302 v4wbi_possible_flags | \ 289 303 fr_possible_flags | \ 290 304 v4wb_possible_flags | \ ··· 291 307 v6wbi_possible_flags | \ 292 308 v7wbi_possible_flags) 293 309 294 - #define always_tlb_flags (v3_always_flags & \ 295 - v4_always_flags & \ 310 + #define always_tlb_flags (v4_always_flags & \ 296 311 v4wbi_always_flags & \ 297 312 fr_always_flags & \ 298 313 v4wb_always_flags & \
+1
arch/arm/kernel/Makefile
··· 34 34 obj-$(CONFIG_SMP) += smp.o smp_tlb.o 35 35 obj-$(CONFIG_HAVE_ARM_SCU) += smp_scu.o 36 36 obj-$(CONFIG_HAVE_ARM_TWD) += smp_twd.o 37 + obj-$(CONFIG_ARM_ARCH_TIMER) += arch_timer.o 37 38 obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o insn.o 38 39 obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o insn.o 39 40 obj-$(CONFIG_JUMP_LABEL) += jump_label.o insn.o patch.o
+350
arch/arm/kernel/arch_timer.c
··· 1 + /* 2 + * linux/arch/arm/kernel/arch_timer.c 3 + * 4 + * Copyright (C) 2011 ARM Ltd. 5 + * All Rights Reserved 6 + * 7 + * This program is free software; you can redistribute it and/or modify 8 + * it under the terms of the GNU General Public License version 2 as 9 + * published by the Free Software Foundation. 10 + */ 11 + #include <linux/init.h> 12 + #include <linux/kernel.h> 13 + #include <linux/delay.h> 14 + #include <linux/device.h> 15 + #include <linux/smp.h> 16 + #include <linux/cpu.h> 17 + #include <linux/jiffies.h> 18 + #include <linux/clockchips.h> 19 + #include <linux/interrupt.h> 20 + #include <linux/of_irq.h> 21 + #include <linux/io.h> 22 + 23 + #include <asm/cputype.h> 24 + #include <asm/localtimer.h> 25 + #include <asm/arch_timer.h> 26 + #include <asm/system_info.h> 27 + #include <asm/sched_clock.h> 28 + 29 + static unsigned long arch_timer_rate; 30 + static int arch_timer_ppi; 31 + static int arch_timer_ppi2; 32 + 33 + static struct clock_event_device __percpu **arch_timer_evt; 34 + 35 + /* 36 + * Architected system timer support. 37 + */ 38 + 39 + #define ARCH_TIMER_CTRL_ENABLE (1 << 0) 40 + #define ARCH_TIMER_CTRL_IT_MASK (1 << 1) 41 + #define ARCH_TIMER_CTRL_IT_STAT (1 << 2) 42 + 43 + #define ARCH_TIMER_REG_CTRL 0 44 + #define ARCH_TIMER_REG_FREQ 1 45 + #define ARCH_TIMER_REG_TVAL 2 46 + 47 + static void arch_timer_reg_write(int reg, u32 val) 48 + { 49 + switch (reg) { 50 + case ARCH_TIMER_REG_CTRL: 51 + asm volatile("mcr p15, 0, %0, c14, c2, 1" : : "r" (val)); 52 + break; 53 + case ARCH_TIMER_REG_TVAL: 54 + asm volatile("mcr p15, 0, %0, c14, c2, 0" : : "r" (val)); 55 + break; 56 + } 57 + 58 + isb(); 59 + } 60 + 61 + static u32 arch_timer_reg_read(int reg) 62 + { 63 + u32 val; 64 + 65 + switch (reg) { 66 + case ARCH_TIMER_REG_CTRL: 67 + asm volatile("mrc p15, 0, %0, c14, c2, 1" : "=r" (val)); 68 + break; 69 + case ARCH_TIMER_REG_FREQ: 70 + asm volatile("mrc p15, 0, %0, c14, c0, 0" : "=r" (val)); 71 + break; 72 + case ARCH_TIMER_REG_TVAL: 73 + asm volatile("mrc p15, 0, %0, c14, c2, 0" : "=r" (val)); 74 + break; 75 + default: 76 + BUG(); 77 + } 78 + 79 + return val; 80 + } 81 + 82 + static irqreturn_t arch_timer_handler(int irq, void *dev_id) 83 + { 84 + struct clock_event_device *evt = *(struct clock_event_device **)dev_id; 85 + unsigned long ctrl; 86 + 87 + ctrl = arch_timer_reg_read(ARCH_TIMER_REG_CTRL); 88 + if (ctrl & ARCH_TIMER_CTRL_IT_STAT) { 89 + ctrl |= ARCH_TIMER_CTRL_IT_MASK; 90 + arch_timer_reg_write(ARCH_TIMER_REG_CTRL, ctrl); 91 + evt->event_handler(evt); 92 + return IRQ_HANDLED; 93 + } 94 + 95 + return IRQ_NONE; 96 + } 97 + 98 + static void arch_timer_disable(void) 99 + { 100 + unsigned long ctrl; 101 + 102 + ctrl = arch_timer_reg_read(ARCH_TIMER_REG_CTRL); 103 + ctrl &= ~ARCH_TIMER_CTRL_ENABLE; 104 + arch_timer_reg_write(ARCH_TIMER_REG_CTRL, ctrl); 105 + } 106 + 107 + static void arch_timer_set_mode(enum clock_event_mode mode, 108 + struct clock_event_device *clk) 109 + { 110 + switch (mode) { 111 + case CLOCK_EVT_MODE_UNUSED: 112 + case CLOCK_EVT_MODE_SHUTDOWN: 113 + arch_timer_disable(); 114 + break; 115 + default: 116 + break; 117 + } 118 + } 119 + 120 + static int arch_timer_set_next_event(unsigned long evt, 121 + struct clock_event_device *unused) 122 + { 123 + unsigned long ctrl; 124 + 125 + ctrl = arch_timer_reg_read(ARCH_TIMER_REG_CTRL); 126 + ctrl |= ARCH_TIMER_CTRL_ENABLE; 127 + ctrl &= ~ARCH_TIMER_CTRL_IT_MASK; 128 + 129 + arch_timer_reg_write(ARCH_TIMER_REG_TVAL, evt); 130 + arch_timer_reg_write(ARCH_TIMER_REG_CTRL, ctrl); 131 + 132 + return 0; 133 + } 134 + 135 + static int __cpuinit arch_timer_setup(struct clock_event_device *clk) 136 + { 137 + /* Be safe... */ 138 + arch_timer_disable(); 139 + 140 + clk->features = CLOCK_EVT_FEAT_ONESHOT; 141 + clk->name = "arch_sys_timer"; 142 + clk->rating = 450; 143 + clk->set_mode = arch_timer_set_mode; 144 + clk->set_next_event = arch_timer_set_next_event; 145 + clk->irq = arch_timer_ppi; 146 + 147 + clockevents_config_and_register(clk, arch_timer_rate, 148 + 0xf, 0x7fffffff); 149 + 150 + *__this_cpu_ptr(arch_timer_evt) = clk; 151 + 152 + enable_percpu_irq(clk->irq, 0); 153 + if (arch_timer_ppi2) 154 + enable_percpu_irq(arch_timer_ppi2, 0); 155 + 156 + return 0; 157 + } 158 + 159 + /* Is the optional system timer available? */ 160 + static int local_timer_is_architected(void) 161 + { 162 + return (cpu_architecture() >= CPU_ARCH_ARMv7) && 163 + ((read_cpuid_ext(CPUID_EXT_PFR1) >> 16) & 0xf) == 1; 164 + } 165 + 166 + static int arch_timer_available(void) 167 + { 168 + unsigned long freq; 169 + 170 + if (!local_timer_is_architected()) 171 + return -ENXIO; 172 + 173 + if (arch_timer_rate == 0) { 174 + arch_timer_reg_write(ARCH_TIMER_REG_CTRL, 0); 175 + freq = arch_timer_reg_read(ARCH_TIMER_REG_FREQ); 176 + 177 + /* Check the timer frequency. */ 178 + if (freq == 0) { 179 + pr_warn("Architected timer frequency not available\n"); 180 + return -EINVAL; 181 + } 182 + 183 + arch_timer_rate = freq; 184 + } 185 + 186 + pr_info_once("Architected local timer running at %lu.%02luMHz.\n", 187 + arch_timer_rate / 1000000, (arch_timer_rate / 10000) % 100); 188 + return 0; 189 + } 190 + 191 + static inline cycle_t arch_counter_get_cntpct(void) 192 + { 193 + u32 cvall, cvalh; 194 + 195 + asm volatile("mrrc p15, 0, %0, %1, c14" : "=r" (cvall), "=r" (cvalh)); 196 + 197 + return ((cycle_t) cvalh << 32) | cvall; 198 + } 199 + 200 + static inline cycle_t arch_counter_get_cntvct(void) 201 + { 202 + u32 cvall, cvalh; 203 + 204 + asm volatile("mrrc p15, 1, %0, %1, c14" : "=r" (cvall), "=r" (cvalh)); 205 + 206 + return ((cycle_t) cvalh << 32) | cvall; 207 + } 208 + 209 + static u32 notrace arch_counter_get_cntvct32(void) 210 + { 211 + cycle_t cntvct = arch_counter_get_cntvct(); 212 + 213 + /* 214 + * The sched_clock infrastructure only knows about counters 215 + * with at most 32bits. Forget about the upper 24 bits for the 216 + * time being... 217 + */ 218 + return (u32)(cntvct & (u32)~0); 219 + } 220 + 221 + static cycle_t arch_counter_read(struct clocksource *cs) 222 + { 223 + return arch_counter_get_cntpct(); 224 + } 225 + 226 + static struct clocksource clocksource_counter = { 227 + .name = "arch_sys_counter", 228 + .rating = 400, 229 + .read = arch_counter_read, 230 + .mask = CLOCKSOURCE_MASK(56), 231 + .flags = CLOCK_SOURCE_IS_CONTINUOUS, 232 + }; 233 + 234 + static void __cpuinit arch_timer_stop(struct clock_event_device *clk) 235 + { 236 + pr_debug("arch_timer_teardown disable IRQ%d cpu #%d\n", 237 + clk->irq, smp_processor_id()); 238 + disable_percpu_irq(clk->irq); 239 + if (arch_timer_ppi2) 240 + disable_percpu_irq(arch_timer_ppi2); 241 + arch_timer_set_mode(CLOCK_EVT_MODE_UNUSED, clk); 242 + } 243 + 244 + static struct local_timer_ops arch_timer_ops __cpuinitdata = { 245 + .setup = arch_timer_setup, 246 + .stop = arch_timer_stop, 247 + }; 248 + 249 + static struct clock_event_device arch_timer_global_evt; 250 + 251 + static int __init arch_timer_register(void) 252 + { 253 + int err; 254 + 255 + err = arch_timer_available(); 256 + if (err) 257 + return err; 258 + 259 + arch_timer_evt = alloc_percpu(struct clock_event_device *); 260 + if (!arch_timer_evt) 261 + return -ENOMEM; 262 + 263 + clocksource_register_hz(&clocksource_counter, arch_timer_rate); 264 + 265 + err = request_percpu_irq(arch_timer_ppi, arch_timer_handler, 266 + "arch_timer", arch_timer_evt); 267 + if (err) { 268 + pr_err("arch_timer: can't register interrupt %d (%d)\n", 269 + arch_timer_ppi, err); 270 + goto out_free; 271 + } 272 + 273 + if (arch_timer_ppi2) { 274 + err = request_percpu_irq(arch_timer_ppi2, arch_timer_handler, 275 + "arch_timer", arch_timer_evt); 276 + if (err) { 277 + pr_err("arch_timer: can't register interrupt %d (%d)\n", 278 + arch_timer_ppi2, err); 279 + arch_timer_ppi2 = 0; 280 + goto out_free_irq; 281 + } 282 + } 283 + 284 + err = local_timer_register(&arch_timer_ops); 285 + if (err) { 286 + /* 287 + * We couldn't register as a local timer (could be 288 + * because we're on a UP platform, or because some 289 + * other local timer is already present...). Try as a 290 + * global timer instead. 291 + */ 292 + arch_timer_global_evt.cpumask = cpumask_of(0); 293 + err = arch_timer_setup(&arch_timer_global_evt); 294 + } 295 + 296 + if (err) 297 + goto out_free_irq; 298 + 299 + return 0; 300 + 301 + out_free_irq: 302 + free_percpu_irq(arch_timer_ppi, arch_timer_evt); 303 + if (arch_timer_ppi2) 304 + free_percpu_irq(arch_timer_ppi2, arch_timer_evt); 305 + 306 + out_free: 307 + free_percpu(arch_timer_evt); 308 + 309 + return err; 310 + } 311 + 312 + static const struct of_device_id arch_timer_of_match[] __initconst = { 313 + { .compatible = "arm,armv7-timer", }, 314 + {}, 315 + }; 316 + 317 + int __init arch_timer_of_register(void) 318 + { 319 + struct device_node *np; 320 + u32 freq; 321 + 322 + np = of_find_matching_node(NULL, arch_timer_of_match); 323 + if (!np) { 324 + pr_err("arch_timer: can't find DT node\n"); 325 + return -ENODEV; 326 + } 327 + 328 + /* Try to determine the frequency from the device tree or CNTFRQ */ 329 + if (!of_property_read_u32(np, "clock-frequency", &freq)) 330 + arch_timer_rate = freq; 331 + 332 + arch_timer_ppi = irq_of_parse_and_map(np, 0); 333 + arch_timer_ppi2 = irq_of_parse_and_map(np, 1); 334 + pr_info("arch_timer: found %s irqs %d %d\n", 335 + np->name, arch_timer_ppi, arch_timer_ppi2); 336 + 337 + return arch_timer_register(); 338 + } 339 + 340 + int __init arch_timer_sched_clock_init(void) 341 + { 342 + int err; 343 + 344 + err = arch_timer_available(); 345 + if (err) 346 + return err; 347 + 348 + setup_sched_clock(arch_counter_get_cntvct32, 32, arch_timer_rate); 349 + return 0; 350 + }
+26 -11
arch/arm/kernel/bios32.c
··· 374 374 #endif 375 375 376 376 /* 377 - * Swizzle the device pin each time we cross a bridge. 378 - * This might update pin and returns the slot number. 377 + * Swizzle the device pin each time we cross a bridge. If a platform does 378 + * not provide a swizzle function, we perform the standard PCI swizzling. 379 + * 380 + * The default swizzling walks up the bus tree one level at a time, applying 381 + * the standard swizzle function at each step, stopping when it finds the PCI 382 + * root bus. This will return the slot number of the bridge device on the 383 + * root bus and the interrupt pin on that device which should correspond 384 + * with the downstream device interrupt. 385 + * 386 + * Platforms may override this, in which case the slot and pin returned 387 + * depend entirely on the platform code. However, please note that the 388 + * PCI standard swizzle is implemented on plug-in cards and Cardbus based 389 + * PCI extenders, so it can not be ignored. 379 390 */ 380 391 static u8 __devinit pcibios_swizzle(struct pci_dev *dev, u8 *pin) 381 392 { 382 393 struct pci_sys_data *sys = dev->sysdata; 383 - int slot = 0, oldpin = *pin; 394 + int slot, oldpin = *pin; 384 395 385 396 if (sys->swizzle) 386 397 slot = sys->swizzle(dev, pin); 398 + else 399 + slot = pci_common_swizzle(dev, pin); 387 400 388 401 if (debug_pci) 389 402 printk("PCI: %s swizzling pin %d => pin %d slot %d\n", ··· 423 410 return irq; 424 411 } 425 412 426 - static void __init pcibios_init_hw(struct hw_pci *hw) 413 + static void __init pcibios_init_hw(struct hw_pci *hw, struct list_head *head) 427 414 { 428 415 struct pci_sys_data *sys = NULL; 429 416 int ret; ··· 437 424 #ifdef CONFIG_PCI_DOMAINS 438 425 sys->domain = hw->domain; 439 426 #endif 440 - sys->hw = hw; 441 427 sys->busnr = busnr; 442 428 sys->swizzle = hw->swizzle; 443 429 sys->map_irq = hw->map_irq; ··· 452 440 &iomem_resource, sys->mem_offset); 453 441 } 454 442 455 - sys->bus = hw->scan(nr, sys); 443 + if (hw->scan) 444 + sys->bus = hw->scan(nr, sys); 445 + else 446 + sys->bus = pci_scan_root_bus(NULL, sys->busnr, 447 + hw->ops, sys, &sys->resources); 456 448 457 449 if (!sys->bus) 458 450 panic("PCI: unable to scan bus!"); 459 451 460 452 busnr = sys->bus->subordinate + 1; 461 453 462 - list_add(&sys->node, &hw->buses); 454 + list_add(&sys->node, head); 463 455 } else { 464 456 kfree(sys); 465 457 if (ret < 0) ··· 475 459 void __init pci_common_init(struct hw_pci *hw) 476 460 { 477 461 struct pci_sys_data *sys; 478 - 479 - INIT_LIST_HEAD(&hw->buses); 462 + LIST_HEAD(head); 480 463 481 464 pci_add_flags(PCI_REASSIGN_ALL_RSRC); 482 465 if (hw->preinit) 483 466 hw->preinit(); 484 - pcibios_init_hw(hw); 467 + pcibios_init_hw(hw, &head); 485 468 if (hw->postinit) 486 469 hw->postinit(); 487 470 488 471 pci_fixup_irqs(pcibios_swizzle, pcibios_map_irq); 489 472 490 - list_for_each_entry(sys, &hw->buses, node) { 473 + list_for_each_entry(sys, &head, node) { 491 474 struct pci_bus *bus = sys->bus; 492 475 493 476 if (!pci_has_flag(PCI_PROBE_ONLY)) {
-4
arch/arm/kernel/entry-armv.S
··· 556 556 #endif 557 557 tst r0, #0x08000000 @ only CDP/CPRT/LDC/STC have bit 27 558 558 tstne r0, #0x04000000 @ bit 26 set on both ARM and Thumb-2 559 - #if defined(CONFIG_CPU_ARM610) || defined(CONFIG_CPU_ARM710) 560 - and r8, r0, #0x0f000000 @ mask out op-code bits 561 - teqne r8, #0x0f000000 @ SWI (ARM6/7 bug)? 562 - #endif 563 559 moveq pc, lr 564 560 get_thread_info r10 @ get current thread 565 561 and r8, r0, #0x00000f00 @ mask out CP number
-28
arch/arm/kernel/entry-common.S
··· 335 335 *----------------------------------------------------------------------------- 336 336 */ 337 337 338 - /* If we're optimising for StrongARM the resulting code won't 339 - run on an ARM7 and we can save a couple of instructions. 340 - --pb */ 341 - #ifdef CONFIG_CPU_ARM710 342 - #define A710(code...) code 343 - .Larm710bug: 344 - ldmia sp, {r0 - lr}^ @ Get calling r0 - lr 345 - mov r0, r0 346 - add sp, sp, #S_FRAME_SIZE 347 - subs pc, lr, #4 348 - #else 349 - #define A710(code...) 350 - #endif 351 - 352 338 .align 5 353 339 ENTRY(vector_swi) 354 340 sub sp, sp, #S_FRAME_SIZE ··· 365 379 ldreq r10, [lr, #-4] @ get SWI instruction 366 380 #else 367 381 ldr r10, [lr, #-4] @ get SWI instruction 368 - A710( and ip, r10, #0x0f000000 @ check for SWI ) 369 - A710( teq ip, #0x0f000000 ) 370 - A710( bne .Larm710bug ) 371 382 #endif 372 383 #ifdef CONFIG_CPU_ENDIAN_BE8 373 384 rev r10, r10 @ little endian instruction ··· 375 392 /* 376 393 * Pure EABI user space always put syscall number into scno (r7). 377 394 */ 378 - A710( ldr ip, [lr, #-4] @ get SWI instruction ) 379 - A710( and ip, ip, #0x0f000000 @ check for SWI ) 380 - A710( teq ip, #0x0f000000 ) 381 - A710( bne .Larm710bug ) 382 - 383 395 #elif defined(CONFIG_ARM_THUMB) 384 - 385 396 /* Legacy ABI only, possibly thumb mode. */ 386 397 tst r8, #PSR_T_BIT @ this is SPSR from save_user_regs 387 398 addne scno, r7, #__NR_SYSCALL_BASE @ put OS number in 388 399 ldreq scno, [lr, #-4] 389 400 390 401 #else 391 - 392 402 /* Legacy ABI only. */ 393 403 ldr scno, [lr, #-4] @ get SWI instruction 394 - A710( and ip, scno, #0x0f000000 @ check for SWI ) 395 - A710( teq ip, #0x0f000000 ) 396 - A710( bne .Larm710bug ) 397 - 398 404 #endif 399 405 400 406 #ifdef CONFIG_ALIGNMENT_TRAP
+1 -8
arch/arm/kernel/head.S
··· 277 277 mov r3, r3, lsl #PMD_ORDER 278 278 279 279 add r0, r4, r3 280 - rsb r3, r3, #0x4000 @ PTRS_PER_PGD*sizeof(long) 281 - cmp r3, #0x0800 @ limit to 512MB 282 - movhi r3, #0x0800 283 - add r6, r0, r3 284 280 mov r3, r7, lsr #SECTION_SHIFT 285 281 ldr r7, [r10, #PROCINFO_IO_MMUFLAGS] @ io_mmuflags 286 282 orr r3, r7, r3, lsl #SECTION_SHIFT ··· 285 289 #else 286 290 orr r3, r3, #PMD_SECT_XN 287 291 #endif 288 - 1: str r3, [r0], #4 292 + str r3, [r0], #4 289 293 #ifdef CONFIG_ARM_LPAE 290 294 str r7, [r0], #4 291 295 #endif 292 - add r3, r3, #1 << SECTION_SHIFT 293 - cmp r0, r6 294 - blo 1b 295 296 296 297 #else /* CONFIG_DEBUG_ICEDCC || CONFIG_DEBUG_SEMIHOSTING */ 297 298 /* we don't need any serial debugging mappings */
+6 -15
arch/arm/kernel/ptrace.c
··· 24 24 #include <linux/hw_breakpoint.h> 25 25 #include <linux/regset.h> 26 26 #include <linux/audit.h> 27 + #include <linux/tracehook.h> 27 28 28 29 #include <asm/pgtable.h> 29 30 #include <asm/traps.h> ··· 919 918 920 919 if (!test_thread_flag(TIF_SYSCALL_TRACE)) 921 920 return scno; 922 - if (!(current->ptrace & PT_PTRACED)) 923 - return scno; 924 921 925 922 current_thread_info()->syscall = scno; 926 923 ··· 929 930 ip = regs->ARM_ip; 930 931 regs->ARM_ip = why; 931 932 932 - /* the 0x80 provides a way for the tracing parent to distinguish 933 - between a syscall stop and SIGTRAP delivery */ 934 - ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) 935 - ? 0x80 : 0)); 936 - /* 937 - * this isn't the same as continuing with a signal, but it will do 938 - * for normal use. strace only continues with a signal if the 939 - * stopping signal is not SIGTRAP. -brl 940 - */ 941 - if (current->exit_code) { 942 - send_sig(current->exit_code, current, 1); 943 - current->exit_code = 0; 944 - } 933 + if (why) 934 + tracehook_report_syscall_exit(regs, 0); 935 + else if (tracehook_report_syscall_entry(regs)) 936 + current_thread_info()->syscall = -1; 937 + 945 938 regs->ARM_ip = ip; 946 939 947 940 return current_thread_info()->syscall;
+2
arch/arm/kernel/signal.c
··· 589 589 */ 590 590 block_sigmask(ka, sig); 591 591 592 + tracehook_signal_handler(sig, info, ka, regs, 0); 593 + 592 594 return 0; 593 595 } 594 596
+3
arch/arm/kernel/smp.c
··· 454 454 #ifdef CONFIG_LOCAL_TIMERS 455 455 int local_timer_register(struct local_timer_ops *ops) 456 456 { 457 + if (!is_smp() || !setup_max_cpus) 458 + return -ENXIO; 459 + 457 460 if (lt_ops) 458 461 return -EBUSY; 459 462
+2 -1
arch/arm/kernel/smp_scu.c
··· 11 11 #include <linux/init.h> 12 12 #include <linux/io.h> 13 13 14 + #include <asm/smp_plat.h> 14 15 #include <asm/smp_scu.h> 15 16 #include <asm/cacheflush.h> 16 17 #include <asm/cputype.h> ··· 75 74 int scu_power_mode(void __iomem *scu_base, unsigned int mode) 76 75 { 77 76 unsigned int val; 78 - int cpu = smp_processor_id(); 77 + int cpu = cpu_logical_map(smp_processor_id()); 79 78 80 79 if (mode > 3 || mode == 1 || cpu > 3) 81 80 return -EINVAL;
+2 -2
arch/arm/kernel/thumbee.c
··· 20 20 #include <linux/kernel.h> 21 21 #include <linux/init.h> 22 22 23 + #include <asm/cputype.h> 23 24 #include <asm/system_info.h> 24 25 #include <asm/thread_notify.h> 25 26 ··· 68 67 if (cpu_arch < CPU_ARCH_ARMv7) 69 68 return 0; 70 69 71 - /* processor feature register 0 */ 72 - asm("mrc p15, 0, %0, c0, c1, 0\n" : "=r" (pfr0)); 70 + pfr0 = read_cpuid_ext(CPUID_EXT_PFR0); 73 71 if ((pfr0 & 0x0000f000) != 0x00001000) 74 72 return 0; 75 73
+36
arch/arm/kernel/time.c
··· 110 110 } 111 111 #endif 112 112 113 + static void dummy_clock_access(struct timespec *ts) 114 + { 115 + ts->tv_sec = 0; 116 + ts->tv_nsec = 0; 117 + } 118 + 119 + static clock_access_fn __read_persistent_clock = dummy_clock_access; 120 + static clock_access_fn __read_boot_clock = dummy_clock_access;; 121 + 122 + void read_persistent_clock(struct timespec *ts) 123 + { 124 + __read_persistent_clock(ts); 125 + } 126 + 127 + void read_boot_clock(struct timespec *ts) 128 + { 129 + __read_boot_clock(ts); 130 + } 131 + 132 + int __init register_persistent_clock(clock_access_fn read_boot, 133 + clock_access_fn read_persistent) 134 + { 135 + /* Only allow the clockaccess functions to be registered once */ 136 + if (__read_persistent_clock == dummy_clock_access && 137 + __read_boot_clock == dummy_clock_access) { 138 + if (read_boot) 139 + __read_boot_clock = read_boot; 140 + if (read_persistent) 141 + __read_persistent_clock = read_persistent; 142 + 143 + return 0; 144 + } 145 + 146 + return -EINVAL; 147 + } 148 + 113 149 #if defined(CONFIG_PM) && !defined(CONFIG_GENERIC_CLOCKEVENTS) 114 150 static int timer_suspend(void) 115 151 {
+6 -5
arch/arm/kernel/traps.c
··· 479 479 return regs->ARM_r0; 480 480 } 481 481 482 - static inline void 482 + static inline int 483 483 do_cache_op(unsigned long start, unsigned long end, int flags) 484 484 { 485 485 struct mm_struct *mm = current->active_mm; 486 486 struct vm_area_struct *vma; 487 487 488 488 if (end < start || flags) 489 - return; 489 + return -EINVAL; 490 490 491 491 down_read(&mm->mmap_sem); 492 492 vma = find_vma(mm, start); ··· 496 496 if (end > vma->vm_end) 497 497 end = vma->vm_end; 498 498 499 - flush_cache_user_range(vma, start, end); 499 + up_read(&mm->mmap_sem); 500 + return flush_cache_user_range(start, end); 500 501 } 501 502 up_read(&mm->mmap_sem); 503 + return -EINVAL; 502 504 } 503 505 504 506 /* ··· 546 544 * the specified region). 547 545 */ 548 546 case NR(cacheflush): 549 - do_cache_op(regs->ARM_r0, regs->ARM_r1, regs->ARM_r2); 550 - return 0; 547 + return do_cache_op(regs->ARM_r0, regs->ARM_r1, regs->ARM_r2); 551 548 552 549 case NR(usr26): 553 550 if (!(elf_hwcap & HWCAP_26BIT))
+3 -20
arch/arm/lib/Makefile
··· 17 17 call_with_stack.o 18 18 19 19 mmu-y := clear_user.o copy_page.o getuser.o putuser.o 20 - 21 - # the code in uaccess.S is not preemption safe and 22 - # probably faster on ARMv3 only 23 - ifeq ($(CONFIG_PREEMPT),y) 24 - mmu-y += copy_from_user.o copy_to_user.o 25 - else 26 - ifneq ($(CONFIG_CPU_32v3),y) 27 - mmu-y += copy_from_user.o copy_to_user.o 28 - else 29 - mmu-y += uaccess.o 30 - endif 31 - endif 20 + mmu-y += copy_from_user.o copy_to_user.o 32 21 33 22 # using lib_ here won't override already available weak symbols 34 23 obj-$(CONFIG_UACCESS_WITH_MEMCPY) += uaccess_with_memcpy.o 35 24 36 - lib-$(CONFIG_MMU) += $(mmu-y) 37 - 38 - ifeq ($(CONFIG_CPU_32v3),y) 39 - lib-y += io-readsw-armv3.o io-writesw-armv3.o 40 - else 41 - lib-y += io-readsw-armv4.o io-writesw-armv4.o 42 - endif 43 - 25 + lib-$(CONFIG_MMU) += $(mmu-y) 26 + lib-y += io-readsw-armv4.o io-writesw-armv4.o 44 27 lib-$(CONFIG_ARCH_RPC) += ecard.o io-acorn.o floppydma.o 45 28 lib-$(CONFIG_ARCH_SHARK) += io-shark.o 46 29
-106
arch/arm/lib/io-readsw-armv3.S
··· 1 - /* 2 - * linux/arch/arm/lib/io-readsw-armv3.S 3 - * 4 - * Copyright (C) 1995-2000 Russell King 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 - #include <linux/linkage.h> 11 - #include <asm/assembler.h> 12 - 13 - .Linsw_bad_alignment: 14 - adr r0, .Linsw_bad_align_msg 15 - mov r2, lr 16 - b panic 17 - .Linsw_bad_align_msg: 18 - .asciz "insw: bad buffer alignment (0x%p, lr=0x%08lX)\n" 19 - .align 20 - 21 - .Linsw_align: tst r1, #1 22 - bne .Linsw_bad_alignment 23 - 24 - ldr r3, [r0] 25 - strb r3, [r1], #1 26 - mov r3, r3, lsr #8 27 - strb r3, [r1], #1 28 - 29 - subs r2, r2, #1 30 - moveq pc, lr 31 - 32 - ENTRY(__raw_readsw) 33 - teq r2, #0 @ do we have to check for the zero len? 34 - moveq pc, lr 35 - tst r1, #3 36 - bne .Linsw_align 37 - 38 - .Linsw_aligned: mov ip, #0xff 39 - orr ip, ip, ip, lsl #8 40 - stmfd sp!, {r4, r5, r6, lr} 41 - 42 - subs r2, r2, #8 43 - bmi .Lno_insw_8 44 - 45 - .Linsw_8_lp: ldr r3, [r0] 46 - and r3, r3, ip 47 - ldr r4, [r0] 48 - orr r3, r3, r4, lsl #16 49 - 50 - ldr r4, [r0] 51 - and r4, r4, ip 52 - ldr r5, [r0] 53 - orr r4, r4, r5, lsl #16 54 - 55 - ldr r5, [r0] 56 - and r5, r5, ip 57 - ldr r6, [r0] 58 - orr r5, r5, r6, lsl #16 59 - 60 - ldr r6, [r0] 61 - and r6, r6, ip 62 - ldr lr, [r0] 63 - orr r6, r6, lr, lsl #16 64 - 65 - stmia r1!, {r3 - r6} 66 - 67 - subs r2, r2, #8 68 - bpl .Linsw_8_lp 69 - 70 - tst r2, #7 71 - ldmeqfd sp!, {r4, r5, r6, pc} 72 - 73 - .Lno_insw_8: tst r2, #4 74 - beq .Lno_insw_4 75 - 76 - ldr r3, [r0] 77 - and r3, r3, ip 78 - ldr r4, [r0] 79 - orr r3, r3, r4, lsl #16 80 - 81 - ldr r4, [r0] 82 - and r4, r4, ip 83 - ldr r5, [r0] 84 - orr r4, r4, r5, lsl #16 85 - 86 - stmia r1!, {r3, r4} 87 - 88 - .Lno_insw_4: tst r2, #2 89 - beq .Lno_insw_2 90 - 91 - ldr r3, [r0] 92 - and r3, r3, ip 93 - ldr r4, [r0] 94 - orr r3, r3, r4, lsl #16 95 - 96 - str r3, [r1], #4 97 - 98 - .Lno_insw_2: tst r2, #1 99 - ldrne r3, [r0] 100 - strneb r3, [r1], #1 101 - movne r3, r3, lsr #8 102 - strneb r3, [r1] 103 - 104 - ldmfd sp!, {r4, r5, r6, pc} 105 - 106 -
-126
arch/arm/lib/io-writesw-armv3.S
··· 1 - /* 2 - * linux/arch/arm/lib/io-writesw-armv3.S 3 - * 4 - * Copyright (C) 1995-2000 Russell King 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 - #include <linux/linkage.h> 11 - #include <asm/assembler.h> 12 - 13 - .Loutsw_bad_alignment: 14 - adr r0, .Loutsw_bad_align_msg 15 - mov r2, lr 16 - b panic 17 - .Loutsw_bad_align_msg: 18 - .asciz "outsw: bad buffer alignment (0x%p, lr=0x%08lX)\n" 19 - .align 20 - 21 - .Loutsw_align: tst r1, #1 22 - bne .Loutsw_bad_alignment 23 - 24 - add r1, r1, #2 25 - 26 - ldr r3, [r1, #-4] 27 - mov r3, r3, lsr #16 28 - orr r3, r3, r3, lsl #16 29 - str r3, [r0] 30 - subs r2, r2, #1 31 - moveq pc, lr 32 - 33 - ENTRY(__raw_writesw) 34 - teq r2, #0 @ do we have to check for the zero len? 35 - moveq pc, lr 36 - tst r1, #3 37 - bne .Loutsw_align 38 - 39 - stmfd sp!, {r4, r5, r6, lr} 40 - 41 - subs r2, r2, #8 42 - bmi .Lno_outsw_8 43 - 44 - .Loutsw_8_lp: ldmia r1!, {r3, r4, r5, r6} 45 - 46 - mov ip, r3, lsl #16 47 - orr ip, ip, ip, lsr #16 48 - str ip, [r0] 49 - 50 - mov ip, r3, lsr #16 51 - orr ip, ip, ip, lsl #16 52 - str ip, [r0] 53 - 54 - mov ip, r4, lsl #16 55 - orr ip, ip, ip, lsr #16 56 - str ip, [r0] 57 - 58 - mov ip, r4, lsr #16 59 - orr ip, ip, ip, lsl #16 60 - str ip, [r0] 61 - 62 - mov ip, r5, lsl #16 63 - orr ip, ip, ip, lsr #16 64 - str ip, [r0] 65 - 66 - mov ip, r5, lsr #16 67 - orr ip, ip, ip, lsl #16 68 - str ip, [r0] 69 - 70 - mov ip, r6, lsl #16 71 - orr ip, ip, ip, lsr #16 72 - str ip, [r0] 73 - 74 - mov ip, r6, lsr #16 75 - orr ip, ip, ip, lsl #16 76 - str ip, [r0] 77 - 78 - subs r2, r2, #8 79 - bpl .Loutsw_8_lp 80 - 81 - tst r2, #7 82 - ldmeqfd sp!, {r4, r5, r6, pc} 83 - 84 - .Lno_outsw_8: tst r2, #4 85 - beq .Lno_outsw_4 86 - 87 - ldmia r1!, {r3, r4} 88 - 89 - mov ip, r3, lsl #16 90 - orr ip, ip, ip, lsr #16 91 - str ip, [r0] 92 - 93 - mov ip, r3, lsr #16 94 - orr ip, ip, ip, lsl #16 95 - str ip, [r0] 96 - 97 - mov ip, r4, lsl #16 98 - orr ip, ip, ip, lsr #16 99 - str ip, [r0] 100 - 101 - mov ip, r4, lsr #16 102 - orr ip, ip, ip, lsl #16 103 - str ip, [r0] 104 - 105 - .Lno_outsw_4: tst r2, #2 106 - beq .Lno_outsw_2 107 - 108 - ldr r3, [r1], #4 109 - 110 - mov ip, r3, lsl #16 111 - orr ip, ip, ip, lsr #16 112 - str ip, [r0] 113 - 114 - mov ip, r3, lsr #16 115 - orr ip, ip, ip, lsl #16 116 - str ip, [r0] 117 - 118 - .Lno_outsw_2: tst r2, #1 119 - 120 - ldrne r3, [r1] 121 - 122 - movne ip, r3, lsl #16 123 - orrne ip, ip, ip, lsr #16 124 - strne ip, [r0] 125 - 126 - ldmfd sp!, {r4, r5, r6, pc}
-564
arch/arm/lib/uaccess.S
··· 1 - /* 2 - * linux/arch/arm/lib/uaccess.S 3 - * 4 - * Copyright (C) 1995, 1996,1997,1998 Russell King 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 - * Routines to block copy data to/from user memory 11 - * These are highly optimised both for the 4k page size 12 - * and for various alignments. 13 - */ 14 - #include <linux/linkage.h> 15 - #include <asm/assembler.h> 16 - #include <asm/errno.h> 17 - #include <asm/domain.h> 18 - 19 - .text 20 - 21 - #define PAGE_SHIFT 12 22 - 23 - /* Prototype: int __copy_to_user(void *to, const char *from, size_t n) 24 - * Purpose : copy a block to user memory from kernel memory 25 - * Params : to - user memory 26 - * : from - kernel memory 27 - * : n - number of bytes to copy 28 - * Returns : Number of bytes NOT copied. 29 - */ 30 - 31 - .Lc2u_dest_not_aligned: 32 - rsb ip, ip, #4 33 - cmp ip, #2 34 - ldrb r3, [r1], #1 35 - USER( TUSER( strb) r3, [r0], #1) @ May fault 36 - ldrgeb r3, [r1], #1 37 - USER( TUSER( strgeb) r3, [r0], #1) @ May fault 38 - ldrgtb r3, [r1], #1 39 - USER( TUSER( strgtb) r3, [r0], #1) @ May fault 40 - sub r2, r2, ip 41 - b .Lc2u_dest_aligned 42 - 43 - ENTRY(__copy_to_user) 44 - stmfd sp!, {r2, r4 - r7, lr} 45 - cmp r2, #4 46 - blt .Lc2u_not_enough 47 - ands ip, r0, #3 48 - bne .Lc2u_dest_not_aligned 49 - .Lc2u_dest_aligned: 50 - 51 - ands ip, r1, #3 52 - bne .Lc2u_src_not_aligned 53 - /* 54 - * Seeing as there has to be at least 8 bytes to copy, we can 55 - * copy one word, and force a user-mode page fault... 56 - */ 57 - 58 - .Lc2u_0fupi: subs r2, r2, #4 59 - addmi ip, r2, #4 60 - bmi .Lc2u_0nowords 61 - ldr r3, [r1], #4 62 - USER( TUSER( str) r3, [r0], #4) @ May fault 63 - mov ip, r0, lsl #32 - PAGE_SHIFT @ On each page, use a ld/st??t instruction 64 - rsb ip, ip, #0 65 - movs ip, ip, lsr #32 - PAGE_SHIFT 66 - beq .Lc2u_0fupi 67 - /* 68 - * ip = max no. of bytes to copy before needing another "strt" insn 69 - */ 70 - cmp r2, ip 71 - movlt ip, r2 72 - sub r2, r2, ip 73 - subs ip, ip, #32 74 - blt .Lc2u_0rem8lp 75 - 76 - .Lc2u_0cpy8lp: ldmia r1!, {r3 - r6} 77 - stmia r0!, {r3 - r6} @ Shouldnt fault 78 - ldmia r1!, {r3 - r6} 79 - subs ip, ip, #32 80 - stmia r0!, {r3 - r6} @ Shouldnt fault 81 - bpl .Lc2u_0cpy8lp 82 - 83 - .Lc2u_0rem8lp: cmn ip, #16 84 - ldmgeia r1!, {r3 - r6} 85 - stmgeia r0!, {r3 - r6} @ Shouldnt fault 86 - tst ip, #8 87 - ldmneia r1!, {r3 - r4} 88 - stmneia r0!, {r3 - r4} @ Shouldnt fault 89 - tst ip, #4 90 - ldrne r3, [r1], #4 91 - TUSER( strne) r3, [r0], #4 @ Shouldnt fault 92 - ands ip, ip, #3 93 - beq .Lc2u_0fupi 94 - .Lc2u_0nowords: teq ip, #0 95 - beq .Lc2u_finished 96 - .Lc2u_nowords: cmp ip, #2 97 - ldrb r3, [r1], #1 98 - USER( TUSER( strb) r3, [r0], #1) @ May fault 99 - ldrgeb r3, [r1], #1 100 - USER( TUSER( strgeb) r3, [r0], #1) @ May fault 101 - ldrgtb r3, [r1], #1 102 - USER( TUSER( strgtb) r3, [r0], #1) @ May fault 103 - b .Lc2u_finished 104 - 105 - .Lc2u_not_enough: 106 - movs ip, r2 107 - bne .Lc2u_nowords 108 - .Lc2u_finished: mov r0, #0 109 - ldmfd sp!, {r2, r4 - r7, pc} 110 - 111 - .Lc2u_src_not_aligned: 112 - bic r1, r1, #3 113 - ldr r7, [r1], #4 114 - cmp ip, #2 115 - bgt .Lc2u_3fupi 116 - beq .Lc2u_2fupi 117 - .Lc2u_1fupi: subs r2, r2, #4 118 - addmi ip, r2, #4 119 - bmi .Lc2u_1nowords 120 - mov r3, r7, pull #8 121 - ldr r7, [r1], #4 122 - orr r3, r3, r7, push #24 123 - USER( TUSER( str) r3, [r0], #4) @ May fault 124 - mov ip, r0, lsl #32 - PAGE_SHIFT 125 - rsb ip, ip, #0 126 - movs ip, ip, lsr #32 - PAGE_SHIFT 127 - beq .Lc2u_1fupi 128 - cmp r2, ip 129 - movlt ip, r2 130 - sub r2, r2, ip 131 - subs ip, ip, #16 132 - blt .Lc2u_1rem8lp 133 - 134 - .Lc2u_1cpy8lp: mov r3, r7, pull #8 135 - ldmia r1!, {r4 - r7} 136 - subs ip, ip, #16 137 - orr r3, r3, r4, push #24 138 - mov r4, r4, pull #8 139 - orr r4, r4, r5, push #24 140 - mov r5, r5, pull #8 141 - orr r5, r5, r6, push #24 142 - mov r6, r6, pull #8 143 - orr r6, r6, r7, push #24 144 - stmia r0!, {r3 - r6} @ Shouldnt fault 145 - bpl .Lc2u_1cpy8lp 146 - 147 - .Lc2u_1rem8lp: tst ip, #8 148 - movne r3, r7, pull #8 149 - ldmneia r1!, {r4, r7} 150 - orrne r3, r3, r4, push #24 151 - movne r4, r4, pull #8 152 - orrne r4, r4, r7, push #24 153 - stmneia r0!, {r3 - r4} @ Shouldnt fault 154 - tst ip, #4 155 - movne r3, r7, pull #8 156 - ldrne r7, [r1], #4 157 - orrne r3, r3, r7, push #24 158 - TUSER( strne) r3, [r0], #4 @ Shouldnt fault 159 - ands ip, ip, #3 160 - beq .Lc2u_1fupi 161 - .Lc2u_1nowords: mov r3, r7, get_byte_1 162 - teq ip, #0 163 - beq .Lc2u_finished 164 - cmp ip, #2 165 - USER( TUSER( strb) r3, [r0], #1) @ May fault 166 - movge r3, r7, get_byte_2 167 - USER( TUSER( strgeb) r3, [r0], #1) @ May fault 168 - movgt r3, r7, get_byte_3 169 - USER( TUSER( strgtb) r3, [r0], #1) @ May fault 170 - b .Lc2u_finished 171 - 172 - .Lc2u_2fupi: subs r2, r2, #4 173 - addmi ip, r2, #4 174 - bmi .Lc2u_2nowords 175 - mov r3, r7, pull #16 176 - ldr r7, [r1], #4 177 - orr r3, r3, r7, push #16 178 - USER( TUSER( str) r3, [r0], #4) @ May fault 179 - mov ip, r0, lsl #32 - PAGE_SHIFT 180 - rsb ip, ip, #0 181 - movs ip, ip, lsr #32 - PAGE_SHIFT 182 - beq .Lc2u_2fupi 183 - cmp r2, ip 184 - movlt ip, r2 185 - sub r2, r2, ip 186 - subs ip, ip, #16 187 - blt .Lc2u_2rem8lp 188 - 189 - .Lc2u_2cpy8lp: mov r3, r7, pull #16 190 - ldmia r1!, {r4 - r7} 191 - subs ip, ip, #16 192 - orr r3, r3, r4, push #16 193 - mov r4, r4, pull #16 194 - orr r4, r4, r5, push #16 195 - mov r5, r5, pull #16 196 - orr r5, r5, r6, push #16 197 - mov r6, r6, pull #16 198 - orr r6, r6, r7, push #16 199 - stmia r0!, {r3 - r6} @ Shouldnt fault 200 - bpl .Lc2u_2cpy8lp 201 - 202 - .Lc2u_2rem8lp: tst ip, #8 203 - movne r3, r7, pull #16 204 - ldmneia r1!, {r4, r7} 205 - orrne r3, r3, r4, push #16 206 - movne r4, r4, pull #16 207 - orrne r4, r4, r7, push #16 208 - stmneia r0!, {r3 - r4} @ Shouldnt fault 209 - tst ip, #4 210 - movne r3, r7, pull #16 211 - ldrne r7, [r1], #4 212 - orrne r3, r3, r7, push #16 213 - TUSER( strne) r3, [r0], #4 @ Shouldnt fault 214 - ands ip, ip, #3 215 - beq .Lc2u_2fupi 216 - .Lc2u_2nowords: mov r3, r7, get_byte_2 217 - teq ip, #0 218 - beq .Lc2u_finished 219 - cmp ip, #2 220 - USER( TUSER( strb) r3, [r0], #1) @ May fault 221 - movge r3, r7, get_byte_3 222 - USER( TUSER( strgeb) r3, [r0], #1) @ May fault 223 - ldrgtb r3, [r1], #0 224 - USER( TUSER( strgtb) r3, [r0], #1) @ May fault 225 - b .Lc2u_finished 226 - 227 - .Lc2u_3fupi: subs r2, r2, #4 228 - addmi ip, r2, #4 229 - bmi .Lc2u_3nowords 230 - mov r3, r7, pull #24 231 - ldr r7, [r1], #4 232 - orr r3, r3, r7, push #8 233 - USER( TUSER( str) r3, [r0], #4) @ May fault 234 - mov ip, r0, lsl #32 - PAGE_SHIFT 235 - rsb ip, ip, #0 236 - movs ip, ip, lsr #32 - PAGE_SHIFT 237 - beq .Lc2u_3fupi 238 - cmp r2, ip 239 - movlt ip, r2 240 - sub r2, r2, ip 241 - subs ip, ip, #16 242 - blt .Lc2u_3rem8lp 243 - 244 - .Lc2u_3cpy8lp: mov r3, r7, pull #24 245 - ldmia r1!, {r4 - r7} 246 - subs ip, ip, #16 247 - orr r3, r3, r4, push #8 248 - mov r4, r4, pull #24 249 - orr r4, r4, r5, push #8 250 - mov r5, r5, pull #24 251 - orr r5, r5, r6, push #8 252 - mov r6, r6, pull #24 253 - orr r6, r6, r7, push #8 254 - stmia r0!, {r3 - r6} @ Shouldnt fault 255 - bpl .Lc2u_3cpy8lp 256 - 257 - .Lc2u_3rem8lp: tst ip, #8 258 - movne r3, r7, pull #24 259 - ldmneia r1!, {r4, r7} 260 - orrne r3, r3, r4, push #8 261 - movne r4, r4, pull #24 262 - orrne r4, r4, r7, push #8 263 - stmneia r0!, {r3 - r4} @ Shouldnt fault 264 - tst ip, #4 265 - movne r3, r7, pull #24 266 - ldrne r7, [r1], #4 267 - orrne r3, r3, r7, push #8 268 - TUSER( strne) r3, [r0], #4 @ Shouldnt fault 269 - ands ip, ip, #3 270 - beq .Lc2u_3fupi 271 - .Lc2u_3nowords: mov r3, r7, get_byte_3 272 - teq ip, #0 273 - beq .Lc2u_finished 274 - cmp ip, #2 275 - USER( TUSER( strb) r3, [r0], #1) @ May fault 276 - ldrgeb r3, [r1], #1 277 - USER( TUSER( strgeb) r3, [r0], #1) @ May fault 278 - ldrgtb r3, [r1], #0 279 - USER( TUSER( strgtb) r3, [r0], #1) @ May fault 280 - b .Lc2u_finished 281 - ENDPROC(__copy_to_user) 282 - 283 - .pushsection .fixup,"ax" 284 - .align 0 285 - 9001: ldmfd sp!, {r0, r4 - r7, pc} 286 - .popsection 287 - 288 - /* Prototype: unsigned long __copy_from_user(void *to,const void *from,unsigned long n); 289 - * Purpose : copy a block from user memory to kernel memory 290 - * Params : to - kernel memory 291 - * : from - user memory 292 - * : n - number of bytes to copy 293 - * Returns : Number of bytes NOT copied. 294 - */ 295 - .Lcfu_dest_not_aligned: 296 - rsb ip, ip, #4 297 - cmp ip, #2 298 - USER( TUSER( ldrb) r3, [r1], #1) @ May fault 299 - strb r3, [r0], #1 300 - USER( TUSER( ldrgeb) r3, [r1], #1) @ May fault 301 - strgeb r3, [r0], #1 302 - USER( TUSER( ldrgtb) r3, [r1], #1) @ May fault 303 - strgtb r3, [r0], #1 304 - sub r2, r2, ip 305 - b .Lcfu_dest_aligned 306 - 307 - ENTRY(__copy_from_user) 308 - stmfd sp!, {r0, r2, r4 - r7, lr} 309 - cmp r2, #4 310 - blt .Lcfu_not_enough 311 - ands ip, r0, #3 312 - bne .Lcfu_dest_not_aligned 313 - .Lcfu_dest_aligned: 314 - ands ip, r1, #3 315 - bne .Lcfu_src_not_aligned 316 - 317 - /* 318 - * Seeing as there has to be at least 8 bytes to copy, we can 319 - * copy one word, and force a user-mode page fault... 320 - */ 321 - 322 - .Lcfu_0fupi: subs r2, r2, #4 323 - addmi ip, r2, #4 324 - bmi .Lcfu_0nowords 325 - USER( TUSER( ldr) r3, [r1], #4) 326 - str r3, [r0], #4 327 - mov ip, r1, lsl #32 - PAGE_SHIFT @ On each page, use a ld/st??t instruction 328 - rsb ip, ip, #0 329 - movs ip, ip, lsr #32 - PAGE_SHIFT 330 - beq .Lcfu_0fupi 331 - /* 332 - * ip = max no. of bytes to copy before needing another "strt" insn 333 - */ 334 - cmp r2, ip 335 - movlt ip, r2 336 - sub r2, r2, ip 337 - subs ip, ip, #32 338 - blt .Lcfu_0rem8lp 339 - 340 - .Lcfu_0cpy8lp: ldmia r1!, {r3 - r6} @ Shouldnt fault 341 - stmia r0!, {r3 - r6} 342 - ldmia r1!, {r3 - r6} @ Shouldnt fault 343 - subs ip, ip, #32 344 - stmia r0!, {r3 - r6} 345 - bpl .Lcfu_0cpy8lp 346 - 347 - .Lcfu_0rem8lp: cmn ip, #16 348 - ldmgeia r1!, {r3 - r6} @ Shouldnt fault 349 - stmgeia r0!, {r3 - r6} 350 - tst ip, #8 351 - ldmneia r1!, {r3 - r4} @ Shouldnt fault 352 - stmneia r0!, {r3 - r4} 353 - tst ip, #4 354 - TUSER( ldrne) r3, [r1], #4 @ Shouldnt fault 355 - strne r3, [r0], #4 356 - ands ip, ip, #3 357 - beq .Lcfu_0fupi 358 - .Lcfu_0nowords: teq ip, #0 359 - beq .Lcfu_finished 360 - .Lcfu_nowords: cmp ip, #2 361 - USER( TUSER( ldrb) r3, [r1], #1) @ May fault 362 - strb r3, [r0], #1 363 - USER( TUSER( ldrgeb) r3, [r1], #1) @ May fault 364 - strgeb r3, [r0], #1 365 - USER( TUSER( ldrgtb) r3, [r1], #1) @ May fault 366 - strgtb r3, [r0], #1 367 - b .Lcfu_finished 368 - 369 - .Lcfu_not_enough: 370 - movs ip, r2 371 - bne .Lcfu_nowords 372 - .Lcfu_finished: mov r0, #0 373 - add sp, sp, #8 374 - ldmfd sp!, {r4 - r7, pc} 375 - 376 - .Lcfu_src_not_aligned: 377 - bic r1, r1, #3 378 - USER( TUSER( ldr) r7, [r1], #4) @ May fault 379 - cmp ip, #2 380 - bgt .Lcfu_3fupi 381 - beq .Lcfu_2fupi 382 - .Lcfu_1fupi: subs r2, r2, #4 383 - addmi ip, r2, #4 384 - bmi .Lcfu_1nowords 385 - mov r3, r7, pull #8 386 - USER( TUSER( ldr) r7, [r1], #4) @ May fault 387 - orr r3, r3, r7, push #24 388 - str r3, [r0], #4 389 - mov ip, r1, lsl #32 - PAGE_SHIFT 390 - rsb ip, ip, #0 391 - movs ip, ip, lsr #32 - PAGE_SHIFT 392 - beq .Lcfu_1fupi 393 - cmp r2, ip 394 - movlt ip, r2 395 - sub r2, r2, ip 396 - subs ip, ip, #16 397 - blt .Lcfu_1rem8lp 398 - 399 - .Lcfu_1cpy8lp: mov r3, r7, pull #8 400 - ldmia r1!, {r4 - r7} @ Shouldnt fault 401 - subs ip, ip, #16 402 - orr r3, r3, r4, push #24 403 - mov r4, r4, pull #8 404 - orr r4, r4, r5, push #24 405 - mov r5, r5, pull #8 406 - orr r5, r5, r6, push #24 407 - mov r6, r6, pull #8 408 - orr r6, r6, r7, push #24 409 - stmia r0!, {r3 - r6} 410 - bpl .Lcfu_1cpy8lp 411 - 412 - .Lcfu_1rem8lp: tst ip, #8 413 - movne r3, r7, pull #8 414 - ldmneia r1!, {r4, r7} @ Shouldnt fault 415 - orrne r3, r3, r4, push #24 416 - movne r4, r4, pull #8 417 - orrne r4, r4, r7, push #24 418 - stmneia r0!, {r3 - r4} 419 - tst ip, #4 420 - movne r3, r7, pull #8 421 - USER( TUSER( ldrne) r7, [r1], #4) @ May fault 422 - orrne r3, r3, r7, push #24 423 - strne r3, [r0], #4 424 - ands ip, ip, #3 425 - beq .Lcfu_1fupi 426 - .Lcfu_1nowords: mov r3, r7, get_byte_1 427 - teq ip, #0 428 - beq .Lcfu_finished 429 - cmp ip, #2 430 - strb r3, [r0], #1 431 - movge r3, r7, get_byte_2 432 - strgeb r3, [r0], #1 433 - movgt r3, r7, get_byte_3 434 - strgtb r3, [r0], #1 435 - b .Lcfu_finished 436 - 437 - .Lcfu_2fupi: subs r2, r2, #4 438 - addmi ip, r2, #4 439 - bmi .Lcfu_2nowords 440 - mov r3, r7, pull #16 441 - USER( TUSER( ldr) r7, [r1], #4) @ May fault 442 - orr r3, r3, r7, push #16 443 - str r3, [r0], #4 444 - mov ip, r1, lsl #32 - PAGE_SHIFT 445 - rsb ip, ip, #0 446 - movs ip, ip, lsr #32 - PAGE_SHIFT 447 - beq .Lcfu_2fupi 448 - cmp r2, ip 449 - movlt ip, r2 450 - sub r2, r2, ip 451 - subs ip, ip, #16 452 - blt .Lcfu_2rem8lp 453 - 454 - 455 - .Lcfu_2cpy8lp: mov r3, r7, pull #16 456 - ldmia r1!, {r4 - r7} @ Shouldnt fault 457 - subs ip, ip, #16 458 - orr r3, r3, r4, push #16 459 - mov r4, r4, pull #16 460 - orr r4, r4, r5, push #16 461 - mov r5, r5, pull #16 462 - orr r5, r5, r6, push #16 463 - mov r6, r6, pull #16 464 - orr r6, r6, r7, push #16 465 - stmia r0!, {r3 - r6} 466 - bpl .Lcfu_2cpy8lp 467 - 468 - .Lcfu_2rem8lp: tst ip, #8 469 - movne r3, r7, pull #16 470 - ldmneia r1!, {r4, r7} @ Shouldnt fault 471 - orrne r3, r3, r4, push #16 472 - movne r4, r4, pull #16 473 - orrne r4, r4, r7, push #16 474 - stmneia r0!, {r3 - r4} 475 - tst ip, #4 476 - movne r3, r7, pull #16 477 - USER( TUSER( ldrne) r7, [r1], #4) @ May fault 478 - orrne r3, r3, r7, push #16 479 - strne r3, [r0], #4 480 - ands ip, ip, #3 481 - beq .Lcfu_2fupi 482 - .Lcfu_2nowords: mov r3, r7, get_byte_2 483 - teq ip, #0 484 - beq .Lcfu_finished 485 - cmp ip, #2 486 - strb r3, [r0], #1 487 - movge r3, r7, get_byte_3 488 - strgeb r3, [r0], #1 489 - USER( TUSER( ldrgtb) r3, [r1], #0) @ May fault 490 - strgtb r3, [r0], #1 491 - b .Lcfu_finished 492 - 493 - .Lcfu_3fupi: subs r2, r2, #4 494 - addmi ip, r2, #4 495 - bmi .Lcfu_3nowords 496 - mov r3, r7, pull #24 497 - USER( TUSER( ldr) r7, [r1], #4) @ May fault 498 - orr r3, r3, r7, push #8 499 - str r3, [r0], #4 500 - mov ip, r1, lsl #32 - PAGE_SHIFT 501 - rsb ip, ip, #0 502 - movs ip, ip, lsr #32 - PAGE_SHIFT 503 - beq .Lcfu_3fupi 504 - cmp r2, ip 505 - movlt ip, r2 506 - sub r2, r2, ip 507 - subs ip, ip, #16 508 - blt .Lcfu_3rem8lp 509 - 510 - .Lcfu_3cpy8lp: mov r3, r7, pull #24 511 - ldmia r1!, {r4 - r7} @ Shouldnt fault 512 - orr r3, r3, r4, push #8 513 - mov r4, r4, pull #24 514 - orr r4, r4, r5, push #8 515 - mov r5, r5, pull #24 516 - orr r5, r5, r6, push #8 517 - mov r6, r6, pull #24 518 - orr r6, r6, r7, push #8 519 - stmia r0!, {r3 - r6} 520 - subs ip, ip, #16 521 - bpl .Lcfu_3cpy8lp 522 - 523 - .Lcfu_3rem8lp: tst ip, #8 524 - movne r3, r7, pull #24 525 - ldmneia r1!, {r4, r7} @ Shouldnt fault 526 - orrne r3, r3, r4, push #8 527 - movne r4, r4, pull #24 528 - orrne r4, r4, r7, push #8 529 - stmneia r0!, {r3 - r4} 530 - tst ip, #4 531 - movne r3, r7, pull #24 532 - USER( TUSER( ldrne) r7, [r1], #4) @ May fault 533 - orrne r3, r3, r7, push #8 534 - strne r3, [r0], #4 535 - ands ip, ip, #3 536 - beq .Lcfu_3fupi 537 - .Lcfu_3nowords: mov r3, r7, get_byte_3 538 - teq ip, #0 539 - beq .Lcfu_finished 540 - cmp ip, #2 541 - strb r3, [r0], #1 542 - USER( TUSER( ldrgeb) r3, [r1], #1) @ May fault 543 - strgeb r3, [r0], #1 544 - USER( TUSER( ldrgtb) r3, [r1], #1) @ May fault 545 - strgtb r3, [r0], #1 546 - b .Lcfu_finished 547 - ENDPROC(__copy_from_user) 548 - 549 - .pushsection .fixup,"ax" 550 - .align 0 551 - /* 552 - * We took an exception. r0 contains a pointer to 553 - * the byte not copied. 554 - */ 555 - 9001: ldr r2, [sp], #4 @ void *to 556 - sub r2, r0, r2 @ bytes copied 557 - ldr r1, [sp], #4 @ unsigned long count 558 - subs r4, r1, r2 @ bytes left to copy 559 - movne r1, r4 560 - blne __memzero 561 - mov r0, r4 562 - ldmfd sp!, {r4 - r7, pc} 563 - .popsection 564 -
+2 -10
arch/arm/mach-cns3xxx/pcie.c
··· 166 166 .write = cns3xxx_pci_write_config, 167 167 }; 168 168 169 - static struct pci_bus *cns3xxx_pci_scan_bus(int nr, struct pci_sys_data *sys) 170 - { 171 - return pci_scan_root_bus(NULL, sys->busnr, &cns3xxx_pcie_ops, sys, 172 - &sys->resources); 173 - } 174 - 175 169 static int cns3xxx_pcie_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) 176 170 { 177 171 struct cns3xxx_pcie *cnspci = pdev_to_cnspci(dev); ··· 215 221 .irqs = { IRQ_CNS3XXX_PCIE0_RC, IRQ_CNS3XXX_PCIE0_DEVICE, }, 216 222 .hw_pci = { 217 223 .domain = 0, 218 - .swizzle = pci_std_swizzle, 219 224 .nr_controllers = 1, 225 + .ops = &cns3xxx_pcie_ops, 220 226 .setup = cns3xxx_pci_setup, 221 - .scan = cns3xxx_pci_scan_bus, 222 227 .map_irq = cns3xxx_pcie_map_irq, 223 228 }, 224 229 }, ··· 257 264 .irqs = { IRQ_CNS3XXX_PCIE1_RC, IRQ_CNS3XXX_PCIE1_DEVICE, }, 258 265 .hw_pci = { 259 266 .domain = 1, 260 - .swizzle = pci_std_swizzle, 261 267 .nr_controllers = 1, 268 + .ops = &cns3xxx_pcie_ops, 262 269 .setup = cns3xxx_pci_setup, 263 - .scan = cns3xxx_pci_scan_bus, 264 270 .map_irq = cns3xxx_pcie_map_irq, 265 271 }, 266 272 },
+7 -17
arch/arm/mach-dove/pcie.c
··· 43 43 return 0; 44 44 45 45 pp = &pcie_port[nr]; 46 + sys->private_data = pp; 46 47 pp->root_bus_nr = sys->busnr; 47 48 48 49 /* ··· 94 93 return 1; 95 94 } 96 95 97 - static struct pcie_port *bus_to_port(int bus) 98 - { 99 - int i; 100 - 101 - for (i = num_pcie_ports - 1; i >= 0; i--) { 102 - int rbus = pcie_port[i].root_bus_nr; 103 - if (rbus != -1 && rbus <= bus) 104 - break; 105 - } 106 - 107 - return i >= 0 ? pcie_port + i : NULL; 108 - } 109 - 110 96 static int pcie_valid_config(struct pcie_port *pp, int bus, int dev) 111 97 { 112 98 /* ··· 109 121 static int pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where, 110 122 int size, u32 *val) 111 123 { 112 - struct pcie_port *pp = bus_to_port(bus->number); 124 + struct pci_sys_data *sys = bus->sysdata; 125 + struct pcie_port *pp = sys->private_data; 113 126 unsigned long flags; 114 127 int ret; 115 128 ··· 129 140 static int pcie_wr_conf(struct pci_bus *bus, u32 devfn, 130 141 int where, int size, u32 val) 131 142 { 132 - struct pcie_port *pp = bus_to_port(bus->number); 143 + struct pci_sys_data *sys = bus->sysdata; 144 + struct pcie_port *pp = sys->private_data; 133 145 unsigned long flags; 134 146 int ret; 135 147 ··· 184 194 185 195 static int __init dove_pcie_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) 186 196 { 187 - struct pcie_port *pp = bus_to_port(dev->bus->number); 197 + struct pci_sys_data *sys = dev->sysdata; 198 + struct pcie_port *pp = sys->private_data; 188 199 189 200 return pp->index ? IRQ_DOVE_PCIE1 : IRQ_DOVE_PCIE0; 190 201 } 191 202 192 203 static struct hw_pci dove_pci __initdata = { 193 204 .nr_controllers = 2, 194 - .swizzle = pci_std_swizzle, 195 205 .setup = dove_pcie_setup, 196 206 .scan = dove_pcie_scan_bus, 197 207 .map_irq = dove_pcie_map_irq,
+7 -2
arch/arm/mach-footbridge/cats-pci.c
··· 16 16 /* cats host-specific stuff */ 17 17 static int irqmap_cats[] __initdata = { IRQ_PCI, IRQ_IN0, IRQ_IN1, IRQ_IN3 }; 18 18 19 + static u8 cats_no_swizzle(struct pci_dev *dev, u8 *pin) 20 + { 21 + return 0; 22 + } 23 + 19 24 static int __init cats_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) 20 25 { 21 26 if (dev->irq >= 255) ··· 44 39 * cards being used (ie, pci-pci bridge based cards)? 45 40 */ 46 41 static struct hw_pci cats_pci __initdata = { 47 - .swizzle = NULL, 42 + .swizzle = cats_no_swizzle, 48 43 .map_irq = cats_map_irq, 49 44 .nr_controllers = 1, 45 + .ops = &dc21285_ops, 50 46 .setup = dc21285_setup, 51 - .scan = dc21285_scan_bus, 52 47 .preinit = dc21285_preinit, 53 48 .postinit = dc21285_postinit, 54 49 };
+1 -6
arch/arm/mach-footbridge/dc21285.c
··· 129 129 return PCIBIOS_SUCCESSFUL; 130 130 } 131 131 132 - static struct pci_ops dc21285_ops = { 132 + struct pci_ops dc21285_ops = { 133 133 .read = dc21285_read_config, 134 134 .write = dc21285_write_config, 135 135 }; ··· 282 282 pci_add_resource_offset(&sys->resources, &res[1], sys->mem_offset); 283 283 284 284 return 1; 285 - } 286 - 287 - struct pci_bus * __init dc21285_scan_bus(int nr, struct pci_sys_data *sys) 288 - { 289 - return pci_scan_root_bus(NULL, 0, &dc21285_ops, sys, &sys->resources); 290 285 } 291 286 292 287 #define dc21285_request_irq(_a, _b, _c, _d, _e) \
+1 -2
arch/arm/mach-footbridge/ebsa285-pci.c
··· 29 29 } 30 30 31 31 static struct hw_pci ebsa285_pci __initdata = { 32 - .swizzle = pci_std_swizzle, 33 32 .map_irq = ebsa285_map_irq, 34 33 .nr_controllers = 1, 34 + .ops = &dc21285_ops, 35 35 .setup = dc21285_setup, 36 - .scan = dc21285_scan_bus, 37 36 .preinit = dc21285_preinit, 38 37 .postinit = dc21285_postinit, 39 38 };
+1 -2
arch/arm/mach-footbridge/netwinder-pci.c
··· 43 43 } 44 44 45 45 static struct hw_pci netwinder_pci __initdata = { 46 - .swizzle = pci_std_swizzle, 47 46 .map_irq = netwinder_map_irq, 48 47 .nr_controllers = 1, 48 + .ops = &dc21285_ops, 49 49 .setup = dc21285_setup, 50 - .scan = dc21285_scan_bus, 51 50 .preinit = dc21285_preinit, 52 51 .postinit = dc21285_postinit, 53 52 };
+1 -1
arch/arm/mach-footbridge/personal-pci.c
··· 41 41 static struct hw_pci personal_server_pci __initdata = { 42 42 .map_irq = personal_server_map_irq, 43 43 .nr_controllers = 1, 44 + .ops = &dc21285_ops, 44 45 .setup = dc21285_setup, 45 - .scan = dc21285_scan_bus, 46 46 .preinit = dc21285_preinit, 47 47 .postinit = dc21285_postinit, 48 48 };
+7 -15
arch/arm/mach-integrator/impd1.c
··· 398 398 struct impd1_device *idev = impd1_devs + i; 399 399 struct amba_device *d; 400 400 unsigned long pc_base; 401 + char devname[32]; 401 402 402 403 pc_base = dev->resource.start + idev->offset; 403 - 404 - d = amba_device_alloc(NULL, pc_base, SZ_4K); 405 - if (!d) 404 + snprintf(devname, 32, "lm%x:%5.5lx", dev->id, idev->offset >> 12); 405 + d = amba_ahb_device_add(&dev->dev, devname, pc_base, SZ_4K, 406 + dev->irq, dev->irq, 407 + idev->platform_data, idev->id); 408 + if (IS_ERR(d)) { 409 + dev_err(&dev->dev, "unable to register device: %ld\n", PTR_ERR(d)); 406 410 continue; 407 - 408 - dev_set_name(&d->dev, "lm%x:%5.5lx", dev->id, idev->offset >> 12); 409 - d->dev.parent = &dev->dev; 410 - d->irq[0] = dev->irq; 411 - d->irq[1] = dev->irq; 412 - d->periphid = idev->id; 413 - d->dev.platform_data = idev->platform_data; 414 - 415 - ret = amba_device_add(d, &dev->resource); 416 - if (ret) { 417 - dev_err(&d->dev, "unable to register device: %d\n", ret); 418 - amba_device_put(d); 419 411 } 420 412 } 421 413
-39
arch/arm/mach-integrator/include/mach/entry-macro.S
··· 1 - /* 2 - * arch/arm/mach-integrator/include/mach/entry-macro.S 3 - * 4 - * Low-level IRQ helper macros for Integrator platforms 5 - * 6 - * This file is licensed under the terms of the GNU General Public 7 - * License version 2. This program is licensed "as is" without any 8 - * warranty of any kind, whether express or implied. 9 - */ 10 - #include <mach/hardware.h> 11 - #include <mach/platform.h> 12 - #include <mach/irqs.h> 13 - 14 - .macro get_irqnr_preamble, base, tmp 15 - .endm 16 - 17 - .macro get_irqnr_and_base, irqnr, irqstat, base, tmp 18 - /* FIXME: should not be using soo many LDRs here */ 19 - ldr \base, =IO_ADDRESS(INTEGRATOR_IC_BASE) 20 - mov \irqnr, #IRQ_PIC_START 21 - ldr \irqstat, [\base, #IRQ_STATUS] @ get masked status 22 - ldr \base, =IO_ADDRESS(INTEGRATOR_HDR_BASE) 23 - teq \irqstat, #0 24 - ldreq \irqstat, [\base, #(INTEGRATOR_HDR_IC_OFFSET+IRQ_STATUS)] 25 - moveq \irqnr, #IRQ_CIC_START 26 - 27 - 1001: tst \irqstat, #15 28 - bne 1002f 29 - add \irqnr, \irqnr, #4 30 - movs \irqstat, \irqstat, lsr #4 31 - bne 1001b 32 - 1002: tst \irqstat, #1 33 - bne 1003f 34 - add \irqnr, \irqnr, #1 35 - movs \irqstat, \irqstat, lsr #1 36 - bne 1002b 37 - 1003: /* EQ will be set if no irqs pending */ 38 - .endm 39 -
+31 -32
arch/arm/mach-integrator/include/mach/irqs.h
··· 22 22 /* 23 23 * Interrupt numbers 24 24 */ 25 - #define IRQ_PIC_START 0 26 - #define IRQ_SOFTINT 0 27 - #define IRQ_UARTINT0 1 28 - #define IRQ_UARTINT1 2 29 - #define IRQ_KMIINT0 3 30 - #define IRQ_KMIINT1 4 31 - #define IRQ_TIMERINT0 5 32 - #define IRQ_TIMERINT1 6 33 - #define IRQ_TIMERINT2 7 34 - #define IRQ_RTCINT 8 35 - #define IRQ_AP_EXPINT0 9 36 - #define IRQ_AP_EXPINT1 10 37 - #define IRQ_AP_EXPINT2 11 38 - #define IRQ_AP_EXPINT3 12 39 - #define IRQ_AP_PCIINT0 13 40 - #define IRQ_AP_PCIINT1 14 41 - #define IRQ_AP_PCIINT2 15 42 - #define IRQ_AP_PCIINT3 16 43 - #define IRQ_AP_V3INT 17 44 - #define IRQ_AP_CPINT0 18 45 - #define IRQ_AP_CPINT1 19 46 - #define IRQ_AP_LBUSTIMEOUT 20 47 - #define IRQ_AP_APCINT 21 48 - #define IRQ_CP_CLCDCINT 22 49 - #define IRQ_CP_MMCIINT0 23 50 - #define IRQ_CP_MMCIINT1 24 51 - #define IRQ_CP_AACIINT 25 52 - #define IRQ_CP_CPPLDINT 26 53 - #define IRQ_CP_ETHINT 27 54 - #define IRQ_CP_TSPENINT 28 55 - #define IRQ_PIC_END 31 25 + #define IRQ_PIC_START 1 26 + #define IRQ_SOFTINT 1 27 + #define IRQ_UARTINT0 2 28 + #define IRQ_UARTINT1 3 29 + #define IRQ_KMIINT0 4 30 + #define IRQ_KMIINT1 5 31 + #define IRQ_TIMERINT0 6 32 + #define IRQ_TIMERINT1 7 33 + #define IRQ_TIMERINT2 8 34 + #define IRQ_RTCINT 9 35 + #define IRQ_AP_EXPINT0 10 36 + #define IRQ_AP_EXPINT1 11 37 + #define IRQ_AP_EXPINT2 12 38 + #define IRQ_AP_EXPINT3 13 39 + #define IRQ_AP_PCIINT0 14 40 + #define IRQ_AP_PCIINT1 15 41 + #define IRQ_AP_PCIINT2 16 42 + #define IRQ_AP_PCIINT3 17 43 + #define IRQ_AP_V3INT 18 44 + #define IRQ_AP_CPINT0 19 45 + #define IRQ_AP_CPINT1 20 46 + #define IRQ_AP_LBUSTIMEOUT 21 47 + #define IRQ_AP_APCINT 22 48 + #define IRQ_CP_CLCDCINT 23 49 + #define IRQ_CP_MMCIINT0 24 50 + #define IRQ_CP_MMCIINT1 25 51 + #define IRQ_CP_AACIINT 26 52 + #define IRQ_CP_CPPLDINT 27 53 + #define IRQ_CP_ETHINT 28 54 + #define IRQ_CP_TSPENINT 29 55 + #define IRQ_PIC_END 29 56 56 57 57 #define IRQ_CIC_START 32 58 58 #define IRQ_CM_SOFTINT 32 ··· 80 80 81 81 #define NR_IRQS_INTEGRATOR_AP 34 82 82 #define NR_IRQS_INTEGRATOR_CP 47 83 -
+3 -7
arch/arm/mach-integrator/integrator_ap.c
··· 162 162 163 163 #define INTEGRATOR_SC_VALID_INT 0x003fffff 164 164 165 - static struct fpga_irq_data sc_irq_data = { 166 - .base = VA_IC_BASE, 167 - .irq_start = 0, 168 - .chip.name = "SC", 169 - }; 170 - 171 165 static void __init ap_init_irq(void) 172 166 { 173 167 /* Disable all interrupts initially. */ ··· 172 178 writel(-1, VA_IC_BASE + IRQ_ENABLE_CLEAR); 173 179 writel(-1, VA_IC_BASE + FIQ_ENABLE_CLEAR); 174 180 175 - fpga_irq_init(-1, INTEGRATOR_SC_VALID_INT, &sc_irq_data); 181 + fpga_irq_init(VA_IC_BASE, "SC", IRQ_PIC_START, 182 + -1, INTEGRATOR_SC_VALID_INT, NULL); 176 183 } 177 184 178 185 #ifdef CONFIG_PM ··· 473 478 .nr_irqs = NR_IRQS_INTEGRATOR_AP, 474 479 .init_early = integrator_init_early, 475 480 .init_irq = ap_init_irq, 481 + .handle_irq = fpga_handle_irq, 476 482 .timer = &ap_timer, 477 483 .init_machine = ap_init, 478 484 .restart = integrator_restart,
+10 -23
arch/arm/mach-integrator/integrator_cp.c
··· 143 143 iotable_init(intcp_io_desc, ARRAY_SIZE(intcp_io_desc)); 144 144 } 145 145 146 - static struct fpga_irq_data cic_irq_data = { 147 - .base = INTCP_VA_CIC_BASE, 148 - .irq_start = IRQ_CIC_START, 149 - .chip.name = "CIC", 150 - }; 151 - 152 - static struct fpga_irq_data pic_irq_data = { 153 - .base = INTCP_VA_PIC_BASE, 154 - .irq_start = IRQ_PIC_START, 155 - .chip.name = "PIC", 156 - }; 157 - 158 - static struct fpga_irq_data sic_irq_data = { 159 - .base = INTCP_VA_SIC_BASE, 160 - .irq_start = IRQ_SIC_START, 161 - .chip.name = "SIC", 162 - }; 163 - 164 146 static void __init intcp_init_irq(void) 165 147 { 166 - u32 pic_mask, sic_mask; 148 + u32 pic_mask, cic_mask, sic_mask; 167 149 150 + /* These masks are for the HW IRQ registers */ 168 151 pic_mask = ~((~0u) << (11 - IRQ_PIC_START)); 169 152 pic_mask |= (~((~0u) << (29 - 22))) << 22; 153 + cic_mask = ~((~0u) << (1 + IRQ_CIC_END - IRQ_CIC_START)); 170 154 sic_mask = ~((~0u) << (1 + IRQ_SIC_END - IRQ_SIC_START)); 171 155 172 156 /* ··· 163 179 writel(sic_mask, INTCP_VA_SIC_BASE + IRQ_ENABLE_CLEAR); 164 180 writel(sic_mask, INTCP_VA_SIC_BASE + FIQ_ENABLE_CLEAR); 165 181 166 - fpga_irq_init(-1, pic_mask, &pic_irq_data); 182 + fpga_irq_init(INTCP_VA_PIC_BASE, "PIC", IRQ_PIC_START, 183 + -1, pic_mask, NULL); 167 184 168 - fpga_irq_init(-1, ~((~0u) << (1 + IRQ_CIC_END - IRQ_CIC_START)), 169 - &cic_irq_data); 185 + fpga_irq_init(INTCP_VA_CIC_BASE, "CIC", IRQ_CIC_START, 186 + -1, cic_mask, NULL); 170 187 171 - fpga_irq_init(IRQ_CP_CPPLDINT, sic_mask, &sic_irq_data); 188 + fpga_irq_init(INTCP_VA_SIC_BASE, "SIC", IRQ_SIC_START, 189 + IRQ_CP_CPPLDINT, sic_mask, NULL); 172 190 } 173 191 174 192 /* ··· 453 467 .nr_irqs = NR_IRQS_INTEGRATOR_CP, 454 468 .init_early = intcp_init_early, 455 469 .init_irq = intcp_init_irq, 470 + .handle_irq = fpga_handle_irq, 456 471 .timer = &cp_timer, 457 472 .init_machine = intcp_init, 458 473 .restart = integrator_restart,
+4 -15
arch/arm/mach-integrator/pci.c
··· 70 70 */ 71 71 static u8 __init integrator_swizzle(struct pci_dev *dev, u8 *pinp) 72 72 { 73 - int pin = *pinp; 73 + if (*pinp == 0) 74 + *pinp = 1; 74 75 75 - if (pin == 0) 76 - pin = 1; 77 - 78 - while (dev->bus->self) { 79 - pin = pci_swizzle_interrupt_pin(dev, pin); 80 - /* 81 - * move up the chain of bridges, swizzling as we go. 82 - */ 83 - dev = dev->bus->self; 84 - } 85 - *pinp = pin; 86 - 87 - return PCI_SLOT(dev->devfn); 76 + return pci_common_swizzle(dev, pinp); 88 77 } 89 78 90 79 static int irq_tab[4] __initdata = { ··· 98 109 .map_irq = integrator_map_irq, 99 110 .setup = pci_v3_setup, 100 111 .nr_controllers = 1, 101 - .scan = pci_v3_scan_bus, 112 + .ops = &pci_v3_ops, 102 113 .preinit = pci_v3_preinit, 103 114 .postinit = pci_v3_postinit, 104 115 };
+1 -7
arch/arm/mach-integrator/pci_v3.c
··· 340 340 return PCIBIOS_SUCCESSFUL; 341 341 } 342 342 343 - static struct pci_ops pci_v3_ops = { 343 + struct pci_ops pci_v3_ops = { 344 344 .read = v3_read_config, 345 345 .write = v3_write_config, 346 346 }; ··· 486 486 } 487 487 488 488 return ret; 489 - } 490 - 491 - struct pci_bus * __init pci_v3_scan_bus(int nr, struct pci_sys_data *sys) 492 - { 493 - return pci_scan_root_bus(NULL, sys->busnr, &pci_v3_ops, sys, 494 - &sys->resources); 495 489 } 496 490 497 491 /*
-1
arch/arm/mach-iop13xx/iq81340mc.c
··· 54 54 } 55 55 56 56 static struct hw_pci iq81340mc_pci __initdata = { 57 - .swizzle = pci_std_swizzle, 58 57 .nr_controllers = 0, 59 58 .setup = iop13xx_pci_setup, 60 59 .map_irq = iq81340mc_pcix_map_irq,
-1
arch/arm/mach-iop13xx/iq81340sc.c
··· 56 56 } 57 57 58 58 static struct hw_pci iq81340sc_pci __initdata = { 59 - .swizzle = pci_std_swizzle, 60 59 .nr_controllers = 0, 61 60 .setup = iop13xx_pci_setup, 62 61 .scan = iop13xx_scan_bus,
+1 -2
arch/arm/mach-iop32x/em7210.c
··· 103 103 } 104 104 105 105 static struct hw_pci em7210_pci __initdata = { 106 - .swizzle = pci_std_swizzle, 107 106 .nr_controllers = 1, 107 + .ops = &iop3xx_ops, 108 108 .setup = iop3xx_pci_setup, 109 109 .preinit = iop3xx_pci_preinit, 110 - .scan = iop3xx_pci_scan_bus, 111 110 .map_irq = em7210_pci_map_irq, 112 111 }; 113 112
+1 -2
arch/arm/mach-iop32x/glantank.c
··· 96 96 } 97 97 98 98 static struct hw_pci glantank_pci __initdata = { 99 - .swizzle = pci_std_swizzle, 100 99 .nr_controllers = 1, 100 + .ops = &iop3xx_ops, 101 101 .setup = iop3xx_pci_setup, 102 102 .preinit = iop3xx_pci_preinit, 103 - .scan = iop3xx_pci_scan_bus, 104 103 .map_irq = glantank_pci_map_irq, 105 104 }; 106 105
+2 -4
arch/arm/mach-iop32x/iq31244.c
··· 130 130 } 131 131 132 132 static struct hw_pci ep80219_pci __initdata = { 133 - .swizzle = pci_std_swizzle, 134 133 .nr_controllers = 1, 134 + .ops = &iop3xx_ops, 135 135 .setup = iop3xx_pci_setup, 136 136 .preinit = iop3xx_pci_preinit, 137 - .scan = iop3xx_pci_scan_bus, 138 137 .map_irq = ep80219_pci_map_irq, 139 138 }; 140 139 ··· 165 166 } 166 167 167 168 static struct hw_pci iq31244_pci __initdata = { 168 - .swizzle = pci_std_swizzle, 169 169 .nr_controllers = 1, 170 + .ops = &iop3xx_ops, 170 171 .setup = iop3xx_pci_setup, 171 172 .preinit = iop3xx_pci_preinit, 172 - .scan = iop3xx_pci_scan_bus, 173 173 .map_irq = iq31244_pci_map_irq, 174 174 }; 175 175
+1 -2
arch/arm/mach-iop32x/iq80321.c
··· 101 101 } 102 102 103 103 static struct hw_pci iq80321_pci __initdata = { 104 - .swizzle = pci_std_swizzle, 105 104 .nr_controllers = 1, 105 + .ops = &iop3xx_ops, 106 106 .setup = iop3xx_pci_setup, 107 107 .preinit = iop3xx_pci_preinit_cond, 108 - .scan = iop3xx_pci_scan_bus, 109 108 .map_irq = iq80321_pci_map_irq, 110 109 }; 111 110
+1 -2
arch/arm/mach-iop32x/n2100.c
··· 114 114 } 115 115 116 116 static struct hw_pci n2100_pci __initdata = { 117 - .swizzle = pci_std_swizzle, 118 117 .nr_controllers = 1, 118 + .ops = &iop3xx_ops, 119 119 .setup = iop3xx_pci_setup, 120 120 .preinit = iop3xx_pci_preinit, 121 - .scan = iop3xx_pci_scan_bus, 122 121 .map_irq = n2100_pci_map_irq, 123 122 }; 124 123
+1 -2
arch/arm/mach-iop33x/iq80331.c
··· 84 84 } 85 85 86 86 static struct hw_pci iq80331_pci __initdata = { 87 - .swizzle = pci_std_swizzle, 88 87 .nr_controllers = 1, 88 + .ops = &iop3xx_ops, 89 89 .setup = iop3xx_pci_setup, 90 90 .preinit = iop3xx_pci_preinit_cond, 91 - .scan = iop3xx_pci_scan_bus, 92 91 .map_irq = iq80331_pci_map_irq, 93 92 }; 94 93
+1 -2
arch/arm/mach-iop33x/iq80332.c
··· 84 84 } 85 85 86 86 static struct hw_pci iq80332_pci __initdata = { 87 - .swizzle = pci_std_swizzle, 88 87 .nr_controllers = 1, 88 + .ops = &iop3xx_ops, 89 89 .setup = iop3xx_pci_setup, 90 90 .preinit = iop3xx_pci_preinit_cond, 91 - .scan = iop3xx_pci_scan_bus, 92 91 .map_irq = iq80332_pci_map_irq, 93 92 }; 94 93
+1 -8
arch/arm/mach-ixp2000/enp2611.c
··· 141 141 .write = enp2611_pci_write_config 142 142 }; 143 143 144 - static struct pci_bus * __init enp2611_pci_scan_bus(int nr, 145 - struct pci_sys_data *sys) 146 - { 147 - return pci_scan_root_bus(NULL, sys->busnr, &enp2611_pci_ops, sys, 148 - &sys->resources); 149 - } 150 - 151 144 static int __init enp2611_pci_map_irq(const struct pci_dev *dev, u8 slot, 152 145 u8 pin) 153 146 { ··· 173 180 174 181 struct hw_pci enp2611_pci __initdata = { 175 182 .nr_controllers = 1, 183 + .ops = &enp2611_pci_ops, 176 184 .setup = enp2611_pci_setup, 177 185 .preinit = enp2611_pci_preinit, 178 - .scan = enp2611_pci_scan_bus, 179 186 .map_irq = enp2611_pci_map_irq, 180 187 }; 181 188
+1 -1
arch/arm/mach-ixp2000/include/mach/platform.h
··· 127 127 128 128 struct pci_sys_data; 129 129 130 + extern struct pci_ops ixp2000_pci_ops; 130 131 u32 *ixp2000_pci_config_addr(unsigned int bus, unsigned int devfn, int where); 131 132 void ixp2000_pci_preinit(void); 132 133 int ixp2000_pci_setup(int, struct pci_sys_data*); 133 - struct pci_bus* ixp2000_pci_scan_bus(int, struct pci_sys_data*); 134 134 int ixp2000_pci_read_config(struct pci_bus*, unsigned int, int, int, u32 *); 135 135 int ixp2000_pci_write_config(struct pci_bus*, unsigned int, int, int, u32); 136 136
+1 -1
arch/arm/mach-ixp2000/ixdp2400.c
··· 146 146 147 147 static struct hw_pci ixdp2400_pci __initdata = { 148 148 .nr_controllers = 1, 149 + .ops = &ixp2000_pci_ops, 149 150 .setup = ixdp2400_pci_setup, 150 151 .preinit = ixdp2400_pci_preinit, 151 152 .postinit = ixdp2400_pci_postinit, 152 - .scan = ixp2000_pci_scan_bus, 153 153 .map_irq = ixdp2400_pci_map_irq, 154 154 }; 155 155
+1 -1
arch/arm/mach-ixp2000/ixdp2800.c
··· 246 246 247 247 struct __initdata hw_pci ixdp2800_pci __initdata = { 248 248 .nr_controllers = 1, 249 + .ops = &ixp2000_pci_ops, 249 250 .setup = ixdp2800_pci_setup, 250 251 .preinit = ixdp2800_pci_preinit, 251 252 .postinit = ixdp2800_pci_postinit, 252 - .scan = ixp2000_pci_scan_bus, 253 253 .map_irq = ixdp2800_pci_map_irq, 254 254 }; 255 255
+1 -1
arch/arm/mach-ixp2000/ixdp2x01.c
··· 327 327 328 328 struct hw_pci ixdp2x01_pci __initdata = { 329 329 .nr_controllers = 1, 330 + .ops = &ixp2000_pci_ops, 330 331 .setup = ixdp2x01_pci_setup, 331 332 .preinit = ixdp2x01_pci_preinit, 332 - .scan = ixp2000_pci_scan_bus, 333 333 .map_irq = ixdp2x01_pci_map_irq, 334 334 }; 335 335
+1 -7
arch/arm/mach-ixp2000/pci.c
··· 124 124 } 125 125 126 126 127 - static struct pci_ops ixp2000_pci_ops = { 127 + struct pci_ops ixp2000_pci_ops = { 128 128 .read = ixp2000_pci_read_config, 129 129 .write = ixp2000_pci_write_config 130 130 }; 131 - 132 - struct pci_bus *ixp2000_pci_scan_bus(int nr, struct pci_sys_data *sysdata) 133 - { 134 - return pci_scan_root_bus(NULL, sysdata->busnr, &ixp2000_pci_ops, 135 - sysdata, &sysdata->resources); 136 - } 137 131 138 132 139 133 int ixp2000_pci_abort_handler(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
+1 -1
arch/arm/mach-ixp23xx/include/mach/platform.h
··· 37 37 void ixp23xx_restart(char, const char *); 38 38 int ixp23xx_pci_setup(int, struct pci_sys_data *); 39 39 void ixp23xx_pci_preinit(void); 40 - struct pci_bus *ixp23xx_pci_scan_bus(int, struct pci_sys_data*); 40 + extern struct pci_ops ixp23xx_pci_ops; 41 41 void ixp23xx_pci_slave_init(void); 42 42 43 43 extern struct sys_timer ixp23xx_timer;
+1 -1
arch/arm/mach-ixp23xx/ixdp2351.c
··· 251 251 252 252 struct hw_pci ixdp2351_pci __initdata = { 253 253 .nr_controllers = 1, 254 + .ops = &ixp23xx_pci_ops, 254 255 .preinit = ixp23xx_pci_preinit, 255 256 .setup = ixp23xx_pci_setup, 256 - .scan = ixp23xx_pci_scan_bus, 257 257 .map_irq = ixdp2351_map_irq, 258 258 }; 259 259
-6
arch/arm/mach-ixp23xx/pci.c
··· 140 140 .write = ixp23xx_pci_write_config, 141 141 }; 142 142 143 - struct pci_bus *ixp23xx_pci_scan_bus(int nr, struct pci_sys_data *sysdata) 144 - { 145 - return pci_scan_root_bus(NULL, sysdata->busnr, &ixp23xx_pci_ops, 146 - sysdata, &sysdata->resources); 147 - } 148 - 149 143 int ixp23xx_pci_abort_handler(unsigned long addr, unsigned int fsr, struct pt_regs *regs) 150 144 { 151 145 volatile unsigned long temp;
+1 -1
arch/arm/mach-ixp23xx/roadrunner.c
··· 118 118 119 119 static struct hw_pci roadrunner_pci __initdata = { 120 120 .nr_controllers = 1, 121 + .ops = &ixp23xx_pci_ops, 121 122 .preinit = roadrunner_pci_preinit, 122 123 .setup = ixp23xx_pci_setup, 123 - .scan = ixp23xx_pci_scan_bus, 124 124 .map_irq = roadrunner_map_irq, 125 125 }; 126 126
+1 -2
arch/arm/mach-ixp4xx/avila-pci.c
··· 65 65 66 66 struct hw_pci avila_pci __initdata = { 67 67 .nr_controllers = 1, 68 + .ops = &ixp4xx_ops, 68 69 .preinit = avila_pci_preinit, 69 - .swizzle = pci_std_swizzle, 70 70 .setup = ixp4xx_setup, 71 - .scan = ixp4xx_scan_bus, 72 71 .map_irq = avila_map_irq, 73 72 }; 74 73
-6
arch/arm/mach-ixp4xx/common-pci.c
··· 480 480 return 1; 481 481 } 482 482 483 - struct pci_bus * __devinit ixp4xx_scan_bus(int nr, struct pci_sys_data *sys) 484 - { 485 - return pci_scan_root_bus(NULL, sys->busnr, &ixp4xx_ops, sys, 486 - &sys->resources); 487 - } 488 - 489 483 int dma_set_coherent_mask(struct device *dev, u64 mask) 490 484 { 491 485 if (mask >= SZ_64M - 1)
+1 -2
arch/arm/mach-ixp4xx/coyote-pci.c
··· 48 48 49 49 struct hw_pci coyote_pci __initdata = { 50 50 .nr_controllers = 1, 51 + .ops = &ixp4xx_ops, 51 52 .preinit = coyote_pci_preinit, 52 - .swizzle = pci_std_swizzle, 53 53 .setup = ixp4xx_setup, 54 - .scan = ixp4xx_scan_bus, 55 54 .map_irq = coyote_map_irq, 56 55 }; 57 56
+1 -2
arch/arm/mach-ixp4xx/dsmg600-pci.c
··· 62 62 63 63 struct hw_pci __initdata dsmg600_pci = { 64 64 .nr_controllers = 1, 65 + .ops = &ixp4xx_ops, 65 66 .preinit = dsmg600_pci_preinit, 66 - .swizzle = pci_std_swizzle, 67 67 .setup = ixp4xx_setup, 68 - .scan = ixp4xx_scan_bus, 69 68 .map_irq = dsmg600_map_irq, 70 69 }; 71 70
+1 -2
arch/arm/mach-ixp4xx/fsg-pci.c
··· 59 59 60 60 struct hw_pci fsg_pci __initdata = { 61 61 .nr_controllers = 1, 62 + .ops = &ixp4xx_ops, 62 63 .preinit = fsg_pci_preinit, 63 - .swizzle = pci_std_swizzle, 64 64 .setup = ixp4xx_setup, 65 - .scan = ixp4xx_scan_bus, 66 65 .map_irq = fsg_map_irq, 67 66 }; 68 67
+1 -2
arch/arm/mach-ixp4xx/gateway7001-pci.c
··· 47 47 48 48 struct hw_pci gateway7001_pci __initdata = { 49 49 .nr_controllers = 1, 50 + .ops = &ixp4xx_ops, 50 51 .preinit = gateway7001_pci_preinit, 51 - .swizzle = pci_std_swizzle, 52 52 .setup = ixp4xx_setup, 53 - .scan = ixp4xx_scan_bus, 54 53 .map_irq = gateway7001_map_irq, 55 54 }; 56 55
+1 -2
arch/arm/mach-ixp4xx/goramo_mlr.c
··· 473 473 474 474 static struct hw_pci gmlr_hw_pci __initdata = { 475 475 .nr_controllers = 1, 476 + .ops = &ixp4xx_ops, 476 477 .preinit = gmlr_pci_preinit, 477 478 .postinit = gmlr_pci_postinit, 478 - .swizzle = pci_std_swizzle, 479 479 .setup = ixp4xx_setup, 480 - .scan = ixp4xx_scan_bus, 481 480 .map_irq = gmlr_map_irq, 482 481 }; 483 482
+1 -2
arch/arm/mach-ixp4xx/gtwx5715-pci.c
··· 67 67 68 68 struct hw_pci gtwx5715_pci __initdata = { 69 69 .nr_controllers = 1, 70 + .ops = &ixp4xx_ops, 70 71 .preinit = gtwx5715_pci_preinit, 71 - .swizzle = pci_std_swizzle, 72 72 .setup = ixp4xx_setup, 73 - .scan = ixp4xx_scan_bus, 74 73 .map_irq = gtwx5715_map_irq, 75 74 }; 76 75
+1 -1
arch/arm/mach-ixp4xx/include/mach/platform.h
··· 130 130 extern void ixp4xx_pci_preinit(void); 131 131 struct pci_sys_data; 132 132 extern int ixp4xx_setup(int nr, struct pci_sys_data *sys); 133 - extern struct pci_bus *ixp4xx_scan_bus(int nr, struct pci_sys_data *sys); 133 + extern struct pci_ops ixp4xx_ops; 134 134 135 135 /* 136 136 * GPIO-functions
+1 -2
arch/arm/mach-ixp4xx/ixdp425-pci.c
··· 60 60 61 61 struct hw_pci ixdp425_pci __initdata = { 62 62 .nr_controllers = 1, 63 + .ops = &ixp4xx_ops, 63 64 .preinit = ixdp425_pci_preinit, 64 - .swizzle = pci_std_swizzle, 65 65 .setup = ixp4xx_setup, 66 - .scan = ixp4xx_scan_bus, 67 66 .map_irq = ixdp425_map_irq, 68 67 }; 69 68
+1 -2
arch/arm/mach-ixp4xx/ixdpg425-pci.c
··· 42 42 43 43 struct hw_pci ixdpg425_pci __initdata = { 44 44 .nr_controllers = 1, 45 + .ops = &ixp4xx_ops, 45 46 .preinit = ixdpg425_pci_preinit, 46 - .swizzle = pci_std_swizzle, 47 47 .setup = ixp4xx_setup, 48 - .scan = ixp4xx_scan_bus, 49 48 .map_irq = ixdpg425_map_irq, 50 49 }; 51 50
+1 -2
arch/arm/mach-ixp4xx/miccpt-pci.c
··· 61 61 62 62 struct hw_pci miccpt_pci __initdata = { 63 63 .nr_controllers = 1, 64 + .ops = &ixp4xx_ops, 64 65 .preinit = miccpt_pci_preinit, 65 - .swizzle = pci_std_swizzle, 66 66 .setup = ixp4xx_setup, 67 - .scan = ixp4xx_scan_bus, 68 67 .map_irq = miccpt_map_irq, 69 68 }; 70 69
+1 -2
arch/arm/mach-ixp4xx/nas100d-pci.c
··· 58 58 59 59 struct hw_pci __initdata nas100d_pci = { 60 60 .nr_controllers = 1, 61 + .ops = &ixp4xx_ops, 61 62 .preinit = nas100d_pci_preinit, 62 - .swizzle = pci_std_swizzle, 63 63 .setup = ixp4xx_setup, 64 - .scan = ixp4xx_scan_bus, 65 64 .map_irq = nas100d_map_irq, 66 65 }; 67 66
+1 -2
arch/arm/mach-ixp4xx/nslu2-pci.c
··· 54 54 55 55 struct hw_pci __initdata nslu2_pci = { 56 56 .nr_controllers = 1, 57 + .ops = &ixp4xx_ops, 57 58 .preinit = nslu2_pci_preinit, 58 - .swizzle = pci_std_swizzle, 59 59 .setup = ixp4xx_setup, 60 - .scan = ixp4xx_scan_bus, 61 60 .map_irq = nslu2_map_irq, 62 61 }; 63 62
+1 -2
arch/arm/mach-ixp4xx/vulcan-pci.c
··· 56 56 57 57 struct hw_pci vulcan_pci __initdata = { 58 58 .nr_controllers = 1, 59 + .ops = &ixp4xx_ops, 59 60 .preinit = vulcan_pci_preinit, 60 - .swizzle = pci_std_swizzle, 61 61 .setup = ixp4xx_setup, 62 - .scan = ixp4xx_scan_bus, 63 62 .map_irq = vulcan_map_irq, 64 63 }; 65 64
+1 -2
arch/arm/mach-ixp4xx/wg302v2-pci.c
··· 46 46 47 47 struct hw_pci wg302v2_pci __initdata = { 48 48 .nr_controllers = 1, 49 + .ops = &ixp4xx_ops, 49 50 .preinit = wg302v2_pci_preinit, 50 - .swizzle = pci_std_swizzle, 51 51 .setup = ixp4xx_setup, 52 - .scan = ixp4xx_scan_bus, 53 52 .map_irq = wg302v2_map_irq, 54 53 }; 55 54
+6 -10
arch/arm/mach-kirkwood/pcie.c
··· 44 44 static int pcie_port_map[2]; 45 45 static int num_pcie_ports; 46 46 47 - static inline struct pcie_port *bus_to_port(struct pci_bus *bus) 48 - { 49 - struct pci_sys_data *sys = bus->sysdata; 50 - return sys->private_data; 51 - } 52 - 53 47 static int pcie_valid_config(struct pcie_port *pp, int bus, int dev) 54 48 { 55 49 /* ··· 73 79 static int pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where, 74 80 int size, u32 *val) 75 81 { 76 - struct pcie_port *pp = bus_to_port(bus); 82 + struct pci_sys_data *sys = bus->sysdata; 83 + struct pcie_port *pp = sys->private_data; 77 84 unsigned long flags; 78 85 int ret; 79 86 ··· 93 98 static int pcie_wr_conf(struct pci_bus *bus, u32 devfn, 94 99 int where, int size, u32 val) 95 100 { 96 - struct pcie_port *pp = bus_to_port(bus); 101 + struct pci_sys_data *sys = bus->sysdata; 102 + struct pcie_port *pp = sys->private_data; 97 103 unsigned long flags; 98 104 int ret; 99 105 ··· 244 248 static int __init kirkwood_pcie_map_irq(const struct pci_dev *dev, u8 slot, 245 249 u8 pin) 246 250 { 247 - struct pcie_port *pp = bus_to_port(dev->bus); 251 + struct pci_sys_data *sys = dev->sysdata; 252 + struct pcie_port *pp = sys->private_data; 248 253 249 254 return pp->irq; 250 255 } 251 256 252 257 static struct hw_pci kirkwood_pci __initdata = { 253 - .swizzle = pci_std_swizzle, 254 258 .setup = kirkwood_pcie_setup, 255 259 .scan = kirkwood_pcie_scan_bus, 256 260 .map_irq = kirkwood_pcie_map_irq,
+1 -8
arch/arm/mach-ks8695/pci.c
··· 141 141 .write = ks8695_pci_writeconfig, 142 142 }; 143 143 144 - static struct pci_bus* __init ks8695_pci_scan_bus(int nr, struct pci_sys_data *sys) 145 - { 146 - return pci_scan_root_bus(NULL, sys->busnr, &ks8695_pci_ops, sys, 147 - &sys->resources); 148 - } 149 - 150 144 static struct resource pci_mem = { 151 145 .name = "PCI Memory space", 152 146 .start = KS8695_PCIMEM_PA, ··· 296 302 297 303 static struct hw_pci ks8695_pci __initdata = { 298 304 .nr_controllers = 1, 305 + .ops = &ks8695_pci_ops, 299 306 .preinit = ks8695_pci_preinit, 300 307 .setup = ks8695_pci_setup, 301 - .scan = ks8695_pci_scan_bus, 302 308 .postinit = NULL, 303 - .swizzle = pci_std_swizzle, 304 309 .map_irq = NULL, 305 310 }; 306 311
+7 -17
arch/arm/mach-mv78xx0/pcie.c
··· 147 147 return 0; 148 148 149 149 pp = &pcie_port[nr]; 150 + sys->private_data = pp; 150 151 pp->root_bus_nr = sys->busnr; 151 152 152 153 /* ··· 160 159 pci_add_resource_offset(&sys->resources, &pp->res[1], sys->mem_offset); 161 160 162 161 return 1; 163 - } 164 - 165 - static struct pcie_port *bus_to_port(int bus) 166 - { 167 - int i; 168 - 169 - for (i = num_pcie_ports - 1; i >= 0; i--) { 170 - int rbus = pcie_port[i].root_bus_nr; 171 - if (rbus != -1 && rbus <= bus) 172 - break; 173 - } 174 - 175 - return i >= 0 ? pcie_port + i : NULL; 176 162 } 177 163 178 164 static int pcie_valid_config(struct pcie_port *pp, int bus, int dev) ··· 177 189 static int pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where, 178 190 int size, u32 *val) 179 191 { 180 - struct pcie_port *pp = bus_to_port(bus->number); 192 + struct pci_sys_data *sys = bus->sysdata; 193 + struct pcie_port *pp = sys->private_data; 181 194 unsigned long flags; 182 195 int ret; 183 196 ··· 197 208 static int pcie_wr_conf(struct pci_bus *bus, u32 devfn, 198 209 int where, int size, u32 val) 199 210 { 200 - struct pcie_port *pp = bus_to_port(bus->number); 211 + struct pci_sys_data *sys = bus->sysdata; 212 + struct pcie_port *pp = sys->private_data; 201 213 unsigned long flags; 202 214 int ret; 203 215 ··· 253 263 static int __init mv78xx0_pcie_map_irq(const struct pci_dev *dev, u8 slot, 254 264 u8 pin) 255 265 { 256 - struct pcie_port *pp = bus_to_port(dev->bus->number); 266 + struct pci_sys_data *sys = dev->bus->sysdata; 267 + struct pcie_port *pp = sys->private_data; 257 268 258 269 return IRQ_MV78XX0_PCIE_00 + (pp->maj << 2) + pp->min; 259 270 } ··· 262 271 static struct hw_pci mv78xx0_pci __initdata = { 263 272 .nr_controllers = 8, 264 273 .preinit = mv78xx0_pcie_preinit, 265 - .swizzle = pci_std_swizzle, 266 274 .setup = mv78xx0_pcie_setup, 267 275 .scan = mv78xx0_pcie_scan_bus, 268 276 .map_irq = mv78xx0_pcie_map_irq,
+9 -3
arch/arm/mach-mxs/devices-mx23.h
··· 11 11 #include <mach/mx23.h> 12 12 #include <mach/devices-common.h> 13 13 #include <mach/mxsfb.h> 14 + #include <linux/amba/bus.h> 14 15 15 - extern const struct amba_device mx23_duart_device __initconst; 16 - #define mx23_add_duart() \ 17 - mxs_add_duart(&mx23_duart_device) 16 + static inline int mx23_add_duart(void) 17 + { 18 + struct amba_device *d; 19 + 20 + d = amba_ahb_device_add(NULL, "duart", MX23_DUART_BASE_ADDR, SZ_8K, 21 + MX23_INT_DUART, 0, 0, 0); 22 + return IS_ERR(d) ? PTR_ERR(d) : 0; 23 + } 18 24 19 25 extern const struct mxs_auart_data mx23_auart_data[] __initconst; 20 26 #define mx23_add_auart(id) mxs_add_auart(&mx23_auart_data[id])
+9 -3
arch/arm/mach-mxs/devices-mx28.h
··· 11 11 #include <mach/mx28.h> 12 12 #include <mach/devices-common.h> 13 13 #include <mach/mxsfb.h> 14 + #include <linux/amba/bus.h> 14 15 15 - extern const struct amba_device mx28_duart_device __initconst; 16 - #define mx28_add_duart() \ 17 - mxs_add_duart(&mx28_duart_device) 16 + static inline int mx28_add_duart(void) 17 + { 18 + struct amba_device *d; 19 + 20 + d = amba_ahb_device_add(NULL, "duart", MX28_DUART_BASE_ADDR, SZ_8K, 21 + MX28_INT_DUART, 0, 0, 0); 22 + return IS_ERR(d) ? PTR_ERR(d) : 0; 23 + } 18 24 19 25 extern const struct mxs_auart_data mx28_auart_data[] __initconst; 20 26 #define mx28_add_auart(id) mxs_add_auart(&mx28_auart_data[id])
-16
arch/arm/mach-mxs/devices.c
··· 75 75 return pdev; 76 76 } 77 77 78 - int __init mxs_add_amba_device(const struct amba_device *dev) 79 - { 80 - struct amba_device *adev = amba_device_alloc(dev->dev.init_name, 81 - dev->res.start, resource_size(&dev->res)); 82 - 83 - if (!adev) { 84 - pr_err("%s: failed to allocate memory", __func__); 85 - return -ENOMEM; 86 - } 87 - 88 - adev->irq[0] = dev->irq[0]; 89 - adev->irq[1] = dev->irq[1]; 90 - 91 - return amba_device_add(adev, &iomem_resource); 92 - } 93 - 94 78 struct device mxs_apbh_bus = { 95 79 .init_name = "mxs_apbh", 96 80 .parent = &platform_bus,
-1
arch/arm/mach-mxs/devices/Makefile
··· 1 - obj-$(CONFIG_MXS_HAVE_AMBA_DUART) += amba-duart.o 2 1 obj-$(CONFIG_MXS_HAVE_PLATFORM_AUART) += platform-auart.o 3 2 obj-y += platform-dma.o 4 3 obj-$(CONFIG_MXS_HAVE_PLATFORM_FEC) += platform-fec.o
-40
arch/arm/mach-mxs/devices/amba-duart.c
··· 1 - /* 2 - * Copyright (C) 2009-2010 Pengutronix 3 - * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> 4 - * 5 - * Copyright 2010 Freescale Semiconductor, Inc. All Rights Reserved. 6 - * 7 - * This program is free software; you can redistribute it and/or modify it under 8 - * the terms of the GNU General Public License version 2 as published by the 9 - * Free Software Foundation. 10 - */ 11 - #include <asm/irq.h> 12 - #include <mach/mx23.h> 13 - #include <mach/mx28.h> 14 - #include <mach/devices-common.h> 15 - 16 - #define MXS_AMBA_DUART_DEVICE(name, soc) \ 17 - const struct amba_device name##_device __initconst = { \ 18 - .dev = { \ 19 - .init_name = "duart", \ 20 - }, \ 21 - .res = { \ 22 - .start = soc ## _DUART_BASE_ADDR, \ 23 - .end = (soc ## _DUART_BASE_ADDR) + SZ_8K - 1, \ 24 - .flags = IORESOURCE_MEM, \ 25 - }, \ 26 - .irq = {soc ## _INT_DUART}, \ 27 - } 28 - 29 - #ifdef CONFIG_SOC_IMX23 30 - MXS_AMBA_DUART_DEVICE(mx23_duart, MX23); 31 - #endif 32 - 33 - #ifdef CONFIG_SOC_IMX28 34 - MXS_AMBA_DUART_DEVICE(mx28_duart, MX28); 35 - #endif 36 - 37 - int __init mxs_add_duart(const struct amba_device *dev) 38 - { 39 - return mxs_add_amba_device(dev); 40 - }
-5
arch/arm/mach-mxs/include/mach/devices-common.h
··· 27 27 name, id, res, num_resources, data, size_data, 0); 28 28 } 29 29 30 - int __init mxs_add_amba_device(const struct amba_device *dev); 31 - 32 - /* duart */ 33 - int __init mxs_add_duart(const struct amba_device *dev); 34 - 35 30 /* auart */ 36 31 struct mxs_auart_data { 37 32 int id;
-1
arch/arm/mach-orion5x/db88f5281-setup.c
··· 265 265 static struct hw_pci db88f5281_pci __initdata = { 266 266 .nr_controllers = 2, 267 267 .preinit = db88f5281_pci_preinit, 268 - .swizzle = pci_std_swizzle, 269 268 .setup = orion5x_pci_sys_setup, 270 269 .scan = orion5x_pci_sys_scan_bus, 271 270 .map_irq = db88f5281_pci_map_irq,
-1
arch/arm/mach-orion5x/dns323-setup.c
··· 86 86 87 87 static struct hw_pci dns323_pci __initdata = { 88 88 .nr_controllers = 2, 89 - .swizzle = pci_std_swizzle, 90 89 .setup = orion5x_pci_sys_setup, 91 90 .scan = orion5x_pci_sys_scan_bus, 92 91 .map_irq = dns323_pci_map_irq,
-1
arch/arm/mach-orion5x/kurobox_pro-setup.c
··· 138 138 139 139 static struct hw_pci kurobox_pro_pci __initdata = { 140 140 .nr_controllers = 2, 141 - .swizzle = pci_std_swizzle, 142 141 .setup = orion5x_pci_sys_setup, 143 142 .scan = orion5x_pci_sys_scan_bus, 144 143 .map_irq = kurobox_pro_pci_map_irq,
-1
arch/arm/mach-orion5x/mss2-setup.c
··· 89 89 90 90 static struct hw_pci mss2_pci __initdata = { 91 91 .nr_controllers = 2, 92 - .swizzle = pci_std_swizzle, 93 92 .setup = orion5x_pci_sys_setup, 94 93 .scan = orion5x_pci_sys_scan_bus, 95 94 .map_irq = mss2_pci_map_irq,
-1
arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c
··· 149 149 150 150 static struct hw_pci rd88f5181l_fxo_pci __initdata = { 151 151 .nr_controllers = 2, 152 - .swizzle = pci_std_swizzle, 153 152 .setup = orion5x_pci_sys_setup, 154 153 .scan = orion5x_pci_sys_scan_bus, 155 154 .map_irq = rd88f5181l_fxo_pci_map_irq,
-1
arch/arm/mach-orion5x/rd88f5181l-ge-setup.c
··· 161 161 162 162 static struct hw_pci rd88f5181l_ge_pci __initdata = { 163 163 .nr_controllers = 2, 164 - .swizzle = pci_std_swizzle, 165 164 .setup = orion5x_pci_sys_setup, 166 165 .scan = orion5x_pci_sys_scan_bus, 167 166 .map_irq = rd88f5181l_ge_pci_map_irq,
-1
arch/arm/mach-orion5x/rd88f5182-setup.c
··· 200 200 static struct hw_pci rd88f5182_pci __initdata = { 201 201 .nr_controllers = 2, 202 202 .preinit = rd88f5182_pci_preinit, 203 - .swizzle = pci_std_swizzle, 204 203 .setup = orion5x_pci_sys_setup, 205 204 .scan = orion5x_pci_sys_scan_bus, 206 205 .map_irq = rd88f5182_pci_map_irq,
-1
arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c
··· 102 102 103 103 static struct hw_pci rd88f6183ap_ge_pci __initdata = { 104 104 .nr_controllers = 2, 105 - .swizzle = pci_std_swizzle, 106 105 .setup = orion5x_pci_sys_setup, 107 106 .scan = orion5x_pci_sys_scan_bus, 108 107 .map_irq = orion5x_pci_map_irq,
-1
arch/arm/mach-orion5x/terastation_pro2-setup.c
··· 122 122 static struct hw_pci tsp2_pci __initdata = { 123 123 .nr_controllers = 2, 124 124 .preinit = tsp2_pci_preinit, 125 - .swizzle = pci_std_swizzle, 126 125 .setup = orion5x_pci_sys_setup, 127 126 .scan = orion5x_pci_sys_scan_bus, 128 127 .map_irq = tsp2_pci_map_irq,
-1
arch/arm/mach-orion5x/ts209-setup.c
··· 170 170 static struct hw_pci qnap_ts209_pci __initdata = { 171 171 .nr_controllers = 2, 172 172 .preinit = qnap_ts209_pci_preinit, 173 - .swizzle = pci_std_swizzle, 174 173 .setup = orion5x_pci_sys_setup, 175 174 .scan = orion5x_pci_sys_scan_bus, 176 175 .map_irq = qnap_ts209_pci_map_irq,
-1
arch/arm/mach-orion5x/ts409-setup.c
··· 140 140 141 141 static struct hw_pci qnap_ts409_pci __initdata = { 142 142 .nr_controllers = 2, 143 - .swizzle = pci_std_swizzle, 144 143 .setup = orion5x_pci_sys_setup, 145 144 .scan = orion5x_pci_sys_scan_bus, 146 145 .map_irq = qnap_ts409_pci_map_irq,
-1
arch/arm/mach-orion5x/wnr854t-setup.c
··· 155 155 156 156 static struct hw_pci wnr854t_pci __initdata = { 157 157 .nr_controllers = 2, 158 - .swizzle = pci_std_swizzle, 159 158 .setup = orion5x_pci_sys_setup, 160 159 .scan = orion5x_pci_sys_scan_bus, 161 160 .map_irq = wnr854t_pci_map_irq,
-1
arch/arm/mach-orion5x/wrt350n-v2-setup.c
··· 243 243 244 244 static struct hw_pci wrt350n_v2_pci __initdata = { 245 245 .nr_controllers = 2, 246 - .swizzle = pci_std_swizzle, 247 246 .setup = orion5x_pci_sys_setup, 248 247 .scan = orion5x_pci_sys_scan_bus, 249 248 .map_irq = wrt350n_v2_pci_map_irq,
+1 -2
arch/arm/mach-pxa/cm-x2xx-pci.c
··· 181 181 } 182 182 183 183 static struct hw_pci cmx2xx_pci __initdata = { 184 - .swizzle = pci_std_swizzle, 185 184 .map_irq = cmx2xx_pci_map_irq, 186 185 .nr_controllers = 1, 186 + .ops = &it8152_ops, 187 187 .setup = it8152_pci_setup, 188 - .scan = it8152_pci_scan_bus, 189 188 .preinit = cmx2xx_pci_preinit, 190 189 }; 191 190
+1 -7
arch/arm/mach-sa1100/pci-nanoengine.c
··· 129 129 return NANOENGINE_IRQ_GPIO_PCI; 130 130 } 131 131 132 - struct pci_bus * __init pci_nanoengine_scan_bus(int nr, struct pci_sys_data *sys) 133 - { 134 - return pci_scan_root_bus(NULL, sys->busnr, &pci_nano_ops, sys, 135 - &sys->resources); 136 - } 137 - 138 132 static struct resource pci_io_ports = 139 133 DEFINE_RES_IO_NAMED(0x400, 0x400, "PCI IO"); 140 134 ··· 268 274 static struct hw_pci nanoengine_pci __initdata = { 269 275 .map_irq = pci_nanoengine_map_irq, 270 276 .nr_controllers = 1, 271 - .scan = pci_nanoengine_scan_bus, 277 + .ops = &pci_nano_ops, 272 278 .setup = pci_nanoengine_setup, 273 279 }; 274 280
+1 -2
arch/arm/mach-shark/pci.c
··· 29 29 30 30 static struct hw_pci shark_pci __initdata = { 31 31 .setup = via82c505_setup, 32 - .swizzle = pci_std_swizzle, 33 32 .map_irq = shark_map_irq, 34 33 .nr_controllers = 1, 35 - .scan = via82c505_scan_bus, 34 + .ops = &via82c505_ops, 36 35 .preinit = via82c505_preinit, 37 36 }; 38 37
-1
arch/arm/mach-tegra/pcie.c
··· 475 475 .nr_controllers = 2, 476 476 .setup = tegra_pcie_setup, 477 477 .scan = tegra_pcie_scan_bus, 478 - .swizzle = pci_std_swizzle, 479 478 .map_irq = tegra_pcie_map_irq, 480 479 }; 481 480
+3 -2
arch/arm/mach-tegra/timer.c
··· 124 124 } 125 125 126 126 /* 127 - * read_persistent_clock - Return time from a persistent clock. 127 + * tegra_read_persistent_clock - Return time from a persistent clock. 128 128 * 129 129 * Reads the time from a source which isn't disabled during PM, the 130 130 * 32k sync timer. Convert the cycles elapsed since last read into ··· 133 133 * tegra_rtc driver could be executing to avoid race conditions 134 134 * on the RTC shadow register 135 135 */ 136 - void read_persistent_clock(struct timespec *ts) 136 + static void tegra_read_persistent_clock(struct timespec *ts) 137 137 { 138 138 u64 delta; 139 139 struct timespec *tsp = &persistent_ts; ··· 243 243 tegra_clockevent.irq = tegra_timer_irq.irq; 244 244 clockevents_register_device(&tegra_clockevent); 245 245 tegra_twd_init(); 246 + register_persistent_clock(NULL, tegra_read_persistent_clock); 246 247 } 247 248 248 249 struct sys_timer tegra_timer = {
-33
arch/arm/mach-ux500/devices-common.c
··· 11 11 #include <linux/irq.h> 12 12 #include <linux/slab.h> 13 13 #include <linux/platform_device.h> 14 - #include <linux/amba/bus.h> 15 14 16 15 #include <plat/gpio-nomadik.h> 17 16 18 17 #include <mach/hardware.h> 19 18 20 19 #include "devices-common.h" 21 - 22 - struct amba_device * 23 - dbx500_add_amba_device(struct device *parent, const char *name, 24 - resource_size_t base, int irq, void *pdata, 25 - unsigned int periphid) 26 - { 27 - struct amba_device *dev; 28 - int ret; 29 - 30 - dev = amba_device_alloc(name, base, SZ_4K); 31 - if (!dev) 32 - return ERR_PTR(-ENOMEM); 33 - 34 - dev->dma_mask = DMA_BIT_MASK(32); 35 - dev->dev.coherent_dma_mask = DMA_BIT_MASK(32); 36 - 37 - dev->irq[0] = irq; 38 - 39 - dev->periphid = periphid; 40 - 41 - dev->dev.platform_data = pdata; 42 - 43 - dev->dev.parent = parent; 44 - 45 - ret = amba_device_add(dev, &iomem_resource); 46 - if (ret) { 47 - amba_device_put(dev); 48 - return ERR_PTR(ret); 49 - } 50 - 51 - return dev; 52 - } 53 20 54 21 static struct platform_device * 55 22 dbx500_add_gpio(struct device *parent, int id, resource_size_t addr, int irq,
+10 -13
arch/arm/mach-ux500/devices-common.h
··· 11 11 #include <linux/platform_device.h> 12 12 #include <linux/dma-mapping.h> 13 13 #include <linux/sys_soc.h> 14 + #include <linux/amba/bus.h> 14 15 #include <plat/i2c.h> 15 - 16 - extern struct amba_device * 17 - dbx500_add_amba_device(struct device *parent, const char *name, 18 - resource_size_t base, int irq, void *pdata, 19 - unsigned int periphid); 20 16 21 17 struct spi_master_cntlr; 22 18 ··· 21 25 resource_size_t base, int irq, 22 26 struct spi_master_cntlr *pdata) 23 27 { 24 - return dbx500_add_amba_device(parent, name, base, irq, 25 - pdata, 0); 28 + return amba_ahb_device_add(parent, name, base, SZ_4K, irq, 0, 29 + pdata, 0); 26 30 } 27 31 28 32 static inline struct amba_device * ··· 30 34 int irq, struct spi_master_cntlr *pdata, 31 35 u32 periphid) 32 36 { 33 - return dbx500_add_amba_device(parent, name, base, irq, 34 - pdata, periphid); 37 + return amba_ahb_device_add(parent, name, base, SZ_4K, irq, 0, 38 + pdata, periphid); 35 39 } 36 40 37 41 struct mmci_platform_data; ··· 40 44 dbx500_add_sdi(struct device *parent, const char *name, resource_size_t base, 41 45 int irq, struct mmci_platform_data *pdata, u32 periphid) 42 46 { 43 - return dbx500_add_amba_device(parent, name, base, irq, 44 - pdata, periphid); 47 + return amba_ahb_device_add(parent, name, base, SZ_4K, irq, 0, 48 + pdata, periphid); 45 49 } 46 50 47 51 struct amba_pl011_data; ··· 50 54 dbx500_add_uart(struct device *parent, const char *name, resource_size_t base, 51 55 int irq, struct amba_pl011_data *pdata) 52 56 { 53 - return dbx500_add_amba_device(parent, name, base, irq, pdata, 0); 57 + return amba_ahb_device_add(parent, name, base, SZ_4K, irq, 0, pdata, 0); 54 58 } 55 59 56 60 struct nmk_i2c_controller; ··· 81 85 static inline struct amba_device * 82 86 dbx500_add_rtc(struct device *parent, resource_size_t base, int irq) 83 87 { 84 - return dbx500_add_amba_device(parent, "rtc-pl031", base, irq, NULL, 0); 88 + return amba_apb_device_add(parent, "rtc-pl031", base, SZ_4K, irq, 89 + 0, NULL, 0); 85 90 } 86 91 87 92 struct nmk_gpio_platform_data;
+1 -1
arch/arm/mach-ux500/devices-db8500.h
··· 31 31 db8500_add_ssp(struct device *parent, const char *name, resource_size_t base, 32 32 int irq, struct pl022_ssp_controller *pdata) 33 33 { 34 - return dbx500_add_amba_device(parent, name, base, irq, pdata, 0); 34 + return amba_ahb_device_add(parent, name, base, SZ_4K, irq, 0, pdata, 0); 35 35 } 36 36 37 37
+8 -10
arch/arm/mach-versatile/core.c
··· 66 66 #define VA_VIC_BASE __io_address(VERSATILE_VIC_BASE) 67 67 #define VA_SIC_BASE __io_address(VERSATILE_SIC_BASE) 68 68 69 - static struct fpga_irq_data sic_irq = { 70 - .base = VA_SIC_BASE, 71 - .irq_start = IRQ_SIC_START, 72 - .chip.name = "SIC", 73 - }; 74 - 75 69 #if 1 76 70 #define IRQ_MMCI0A IRQ_VICSOURCE22 77 71 #define IRQ_AACI IRQ_VICSOURCE24 ··· 99 105 100 106 writel(~0, VA_SIC_BASE + SIC_IRQ_ENABLE_CLEAR); 101 107 102 - fpga_irq_init(IRQ_VICSOURCE31, ~PIC_MASK, &sic_irq); 103 - irq_domain_generate_simple(sic_of_match, VERSATILE_SIC_BASE, IRQ_SIC_START); 108 + np = of_find_matching_node_by_address(NULL, sic_of_match, 109 + VERSATILE_SIC_BASE); 110 + 111 + fpga_irq_init(VA_SIC_BASE, "SIC", IRQ_SIC_START, 112 + IRQ_VICSOURCE31, ~PIC_MASK, np); 104 113 105 114 /* 106 115 * Interrupts on secondary controller from 0 to 8 are routed to ··· 663 666 * having a specific name. 664 667 */ 665 668 struct of_dev_auxdata versatile_auxdata_lookup[] __initdata = { 666 - OF_DEV_AUXDATA("arm,primecell", VERSATILE_MMCI0_BASE, "fpga:05", NULL), 669 + OF_DEV_AUXDATA("arm,primecell", VERSATILE_MMCI0_BASE, "fpga:05", &mmc0_plat_data), 667 670 OF_DEV_AUXDATA("arm,primecell", VERSATILE_KMI0_BASE, "fpga:06", NULL), 668 671 OF_DEV_AUXDATA("arm,primecell", VERSATILE_KMI1_BASE, "fpga:07", NULL), 669 672 OF_DEV_AUXDATA("arm,primecell", VERSATILE_UART3_BASE, "fpga:09", NULL), 673 + /* FIXME: this is buggy, the platform data is needed for this MMC instance too */ 670 674 OF_DEV_AUXDATA("arm,primecell", VERSATILE_MMCI1_BASE, "fpga:0b", NULL), 671 675 672 676 OF_DEV_AUXDATA("arm,primecell", VERSATILE_CLCD_BASE, "dev:20", &clcd_plat_data), 673 677 OF_DEV_AUXDATA("arm,primecell", VERSATILE_UART0_BASE, "dev:f1", NULL), 674 678 OF_DEV_AUXDATA("arm,primecell", VERSATILE_UART1_BASE, "dev:f2", NULL), 675 679 OF_DEV_AUXDATA("arm,primecell", VERSATILE_UART2_BASE, "dev:f3", NULL), 676 - OF_DEV_AUXDATA("arm,primecell", VERSATILE_SSP_BASE, "dev:f4", NULL), 680 + OF_DEV_AUXDATA("arm,primecell", VERSATILE_SSP_BASE, "dev:f4", &ssp0_plat_data), 677 681 678 682 #if 0 679 683 /*
+2 -11
arch/arm/mach-versatile/pci.c
··· 303 303 } 304 304 305 305 306 - struct pci_bus * __init pci_versatile_scan_bus(int nr, struct pci_sys_data *sys) 307 - { 308 - return pci_scan_root_bus(NULL, sys->busnr, &pci_versatile_ops, sys, 309 - &sys->resources); 310 - } 311 - 312 306 void __init pci_versatile_preinit(void) 313 307 { 314 308 pcibios_min_io = 0x44000000; ··· 333 339 * 26 1 29 334 340 * 27 1 30 335 341 */ 336 - irq = 27 + ((slot + pin - 1) & 3); 337 - 338 - printk("PCI map irq: slot %d, pin %d, devslot %d, irq: %d\n",slot,pin,devslot,irq); 342 + irq = 27 + ((slot - 24 + pin - 1) & 3); 339 343 340 344 return irq; 341 345 } 342 346 343 347 static struct hw_pci versatile_pci __initdata = { 344 - .swizzle = NULL, 345 348 .map_irq = versatile_map_irq, 346 349 .nr_controllers = 1, 350 + .ops = &pci_versatile_ops, 347 351 .setup = pci_versatile_setup, 348 - .scan = pci_versatile_scan_bus, 349 352 .preinit = pci_versatile_preinit, 350 353 }; 351 354
+7 -1
arch/arm/mach-vexpress/v2m.c
··· 19 19 #include <linux/clkdev.h> 20 20 #include <linux/mtd/physmap.h> 21 21 22 + #include <asm/arch_timer.h> 22 23 #include <asm/mach-types.h> 23 24 #include <asm/sizes.h> 25 + #include <asm/smp_twd.h> 24 26 #include <asm/mach/arch.h> 25 27 #include <asm/mach/map.h> 26 28 #include <asm/mach/time.h> ··· 618 616 } 619 617 620 618 clkdev_add_table(v2m_dt_lookups, ARRAY_SIZE(v2m_dt_lookups)); 621 - versatile_sched_clock_init(v2m_sysreg_base + V2M_SYS_24MHZ, 24000000); 622 619 } 623 620 624 621 static struct of_device_id vexpress_irq_match[] __initdata = { ··· 644 643 return; 645 644 node = of_find_node_by_path(path); 646 645 v2m_sp804_init(of_iomap(node, 0), irq_of_parse_and_map(node, 0)); 646 + if (arch_timer_of_register() != 0) 647 + twd_local_timer_of_register(); 648 + 649 + if (arch_timer_sched_clock_init() != 0) 650 + versatile_sched_clock_init(v2m_sysreg_base + V2M_SYS_24MHZ, 24000000); 647 651 } 648 652 649 653 static struct sys_timer v2m_dt_timer = {
+1 -45
arch/arm/mm/Kconfig
··· 4 4 # which CPUs we support in the kernel image, and the compiler instruction 5 5 # optimiser behaviour. 6 6 7 - # ARM610 8 - config CPU_ARM610 9 - bool "Support ARM610 processor" if ARCH_RPC 10 - select CPU_32v3 11 - select CPU_CACHE_V3 12 - select CPU_CACHE_VIVT 13 - select CPU_CP15_MMU 14 - select CPU_COPY_V3 if MMU 15 - select CPU_TLB_V3 if MMU 16 - select CPU_PABRT_LEGACY 17 - help 18 - The ARM610 is the successor to the ARM3 processor 19 - and was produced by VLSI Technology Inc. 20 - 21 - Say Y if you want support for the ARM610 processor. 22 - Otherwise, say N. 23 - 24 7 # ARM7TDMI 25 8 config CPU_ARM7TDMI 26 9 bool "Support ARM7TDMI processor" ··· 17 34 which has no memory control unit and cache. 18 35 19 36 Say Y if you want support for the ARM7TDMI processor. 20 - Otherwise, say N. 21 - 22 - # ARM710 23 - config CPU_ARM710 24 - bool "Support ARM710 processor" if ARCH_RPC 25 - select CPU_32v3 26 - select CPU_CACHE_V3 27 - select CPU_CACHE_VIVT 28 - select CPU_CP15_MMU 29 - select CPU_COPY_V3 if MMU 30 - select CPU_TLB_V3 if MMU 31 - select CPU_PABRT_LEGACY 32 - help 33 - A 32-bit RISC microprocessor based on the ARM7 processor core 34 - designed by Advanced RISC Machines Ltd. The ARM710 is the 35 - successor to the ARM610 processor. It was released in 36 - July 1994 by VLSI Technology Inc. 37 - 38 - Say Y if you want support for the ARM710 processor. 39 37 Otherwise, say N. 40 38 41 39 # ARM720T ··· 494 530 495 531 if MMU 496 532 # The copy-page model 497 - config CPU_COPY_V3 498 - bool 499 - 500 533 config CPU_COPY_V4WT 501 534 bool 502 535 ··· 510 549 bool 511 550 512 551 # This selects the TLB model 513 - config CPU_TLB_V3 514 - bool 515 - help 516 - ARM Architecture Version 3 TLB. 517 - 518 552 config CPU_TLB_V4WT 519 553 bool 520 554 help ··· 687 731 688 732 config CPU_ICACHE_DISABLE 689 733 bool "Disable I-Cache (I-bit)" 690 - depends on CPU_CP15 && !(CPU_ARM610 || CPU_ARM710 || CPU_ARM720T || CPU_ARM740T || CPU_XSCALE || CPU_XSC3) 734 + depends on CPU_CP15 && !(CPU_ARM720T || CPU_ARM740T || CPU_XSCALE || CPU_XSC3) 691 735 help 692 736 Say Y here to disable the processor instruction cache. Unless 693 737 you have a reason not to or are unsure, say N.
-4
arch/arm/mm/Makefile
··· 44 44 AFLAGS_cache-v6.o :=-Wa,-march=armv6 45 45 AFLAGS_cache-v7.o :=-Wa,-march=armv7-a 46 46 47 - obj-$(CONFIG_CPU_COPY_V3) += copypage-v3.o 48 47 obj-$(CONFIG_CPU_COPY_V4WT) += copypage-v4wt.o 49 48 obj-$(CONFIG_CPU_COPY_V4WB) += copypage-v4wb.o 50 49 obj-$(CONFIG_CPU_COPY_FEROCEON) += copypage-feroceon.o ··· 53 54 obj-$(CONFIG_CPU_XSC3) += copypage-xsc3.o 54 55 obj-$(CONFIG_CPU_COPY_FA) += copypage-fa.o 55 56 56 - obj-$(CONFIG_CPU_TLB_V3) += tlb-v3.o 57 57 obj-$(CONFIG_CPU_TLB_V4WT) += tlb-v4.o 58 58 obj-$(CONFIG_CPU_TLB_V4WB) += tlb-v4wb.o 59 59 obj-$(CONFIG_CPU_TLB_V4WBI) += tlb-v4wbi.o ··· 64 66 AFLAGS_tlb-v6.o :=-Wa,-march=armv6 65 67 AFLAGS_tlb-v7.o :=-Wa,-march=armv7-a 66 68 67 - obj-$(CONFIG_CPU_ARM610) += proc-arm6_7.o 68 - obj-$(CONFIG_CPU_ARM710) += proc-arm6_7.o 69 69 obj-$(CONFIG_CPU_ARM7TDMI) += proc-arm7tdmi.o 70 70 obj-$(CONFIG_CPU_ARM720T) += proc-arm720.o 71 71 obj-$(CONFIG_CPU_ARM740T) += proc-arm740.o
+1
arch/arm/mm/cache-v3.S
··· 78 78 * - end - virtual end address 79 79 */ 80 80 ENTRY(v3_coherent_user_range) 81 + mov r0, #0 81 82 mov pc, lr 82 83 83 84 /*
+1
arch/arm/mm/cache-v4.S
··· 88 88 * - end - virtual end address 89 89 */ 90 90 ENTRY(v4_coherent_user_range) 91 + mov r0, #0 91 92 mov pc, lr 92 93 93 94 /*
+3 -3
arch/arm/mm/cache-v4wb.S
··· 167 167 add r0, r0, #CACHE_DLINESIZE 168 168 cmp r0, r1 169 169 blo 1b 170 - mov ip, #0 171 - mcr p15, 0, ip, c7, c5, 0 @ invalidate I cache 172 - mcr p15, 0, ip, c7, c10, 4 @ drain WB 170 + mov r0, #0 171 + mcr p15, 0, r0, c7, c5, 0 @ invalidate I cache 172 + mcr p15, 0, r0, c7, c10, 4 @ drain WB 173 173 mov pc, lr 174 174 175 175
+1
arch/arm/mm/cache-v4wt.S
··· 125 125 add r0, r0, #CACHE_DLINESIZE 126 126 cmp r0, r1 127 127 blo 1b 128 + mov r0, #0 128 129 mov pc, lr 129 130 130 131 /*
+4 -6
arch/arm/mm/cache-v6.S
··· 12 12 #include <linux/linkage.h> 13 13 #include <linux/init.h> 14 14 #include <asm/assembler.h> 15 + #include <asm/errno.h> 15 16 #include <asm/unwind.h> 16 17 17 18 #include "proc-macros.S" ··· 136 135 1: 137 136 USER( mcr p15, 0, r0, c7, c10, 1 ) @ clean D line 138 137 add r0, r0, #CACHE_LINE_SIZE 139 - 2: 140 138 cmp r0, r1 141 139 blo 1b 142 140 #endif ··· 154 154 155 155 /* 156 156 * Fault handling for the cache operation above. If the virtual address in r0 157 - * isn't mapped, just try the next page. 157 + * isn't mapped, fail with -EFAULT. 158 158 */ 159 159 9001: 160 - mov r0, r0, lsr #12 161 - mov r0, r0, lsl #12 162 - add r0, r0, #4096 163 - b 2b 160 + mov r0, #-EFAULT 161 + mov pc, lr 164 162 UNWIND(.fnend ) 165 163 ENDPROC(v6_coherent_user_range) 166 164 ENDPROC(v6_coherent_kern_range)
+4 -6
arch/arm/mm/cache-v7.S
··· 13 13 #include <linux/linkage.h> 14 14 #include <linux/init.h> 15 15 #include <asm/assembler.h> 16 + #include <asm/errno.h> 16 17 #include <asm/unwind.h> 17 18 18 19 #include "proc-macros.S" ··· 199 198 add r12, r12, r2 200 199 cmp r12, r1 201 200 blo 2b 202 - 3: 203 201 mov r0, #0 204 202 ALT_SMP(mcr p15, 0, r0, c7, c1, 6) @ invalidate BTB Inner Shareable 205 203 ALT_UP(mcr p15, 0, r0, c7, c5, 6) @ invalidate BTB ··· 208 208 209 209 /* 210 210 * Fault handling for the cache operation above. If the virtual address in r0 211 - * isn't mapped, just try the next page. 211 + * isn't mapped, fail with -EFAULT. 212 212 */ 213 213 9001: 214 - mov r12, r12, lsr #12 215 - mov r12, r12, lsl #12 216 - add r12, r12, #4096 217 - b 3b 214 + mov r0, #-EFAULT 215 + mov pc, lr 218 216 UNWIND(.fnend ) 219 217 ENDPROC(v7_coherent_kern_range) 220 218 ENDPROC(v7_coherent_user_range)
+28 -29
arch/arm/mm/context.c
··· 18 18 19 19 static DEFINE_RAW_SPINLOCK(cpu_asid_lock); 20 20 unsigned int cpu_last_asid = ASID_FIRST_VERSION; 21 - #ifdef CONFIG_SMP 22 - DEFINE_PER_CPU(struct mm_struct *, current_mm); 23 - #endif 24 21 25 22 #ifdef CONFIG_ARM_LPAE 26 - #define cpu_set_asid(asid) { \ 27 - unsigned long ttbl, ttbh; \ 28 - asm volatile( \ 29 - " mrrc p15, 0, %0, %1, c2 @ read TTBR0\n" \ 30 - " mov %1, %2, lsl #(48 - 32) @ set ASID\n" \ 31 - " mcrr p15, 0, %0, %1, c2 @ set TTBR0\n" \ 32 - : "=&r" (ttbl), "=&r" (ttbh) \ 33 - : "r" (asid & ~ASID_MASK)); \ 23 + void cpu_set_reserved_ttbr0(void) 24 + { 25 + unsigned long ttbl = __pa(swapper_pg_dir); 26 + unsigned long ttbh = 0; 27 + 28 + /* 29 + * Set TTBR0 to swapper_pg_dir which contains only global entries. The 30 + * ASID is set to 0. 31 + */ 32 + asm volatile( 33 + " mcrr p15, 0, %0, %1, c2 @ set TTBR0\n" 34 + : 35 + : "r" (ttbl), "r" (ttbh)); 36 + isb(); 34 37 } 35 38 #else 36 - #define cpu_set_asid(asid) \ 37 - asm(" mcr p15, 0, %0, c13, c0, 1\n" : : "r" (asid)) 39 + void cpu_set_reserved_ttbr0(void) 40 + { 41 + u32 ttb; 42 + /* Copy TTBR1 into TTBR0 */ 43 + asm volatile( 44 + " mrc p15, 0, %0, c2, c0, 1 @ read TTBR1\n" 45 + " mcr p15, 0, %0, c2, c0, 0 @ set TTBR0\n" 46 + : "=r" (ttb)); 47 + isb(); 48 + } 38 49 #endif 39 50 40 51 /* 41 52 * We fork()ed a process, and we need a new context for the child 42 - * to run in. We reserve version 0 for initial tasks so we will 43 - * always allocate an ASID. The ASID 0 is reserved for the TTBR 44 - * register changing sequence. 53 + * to run in. 45 54 */ 46 55 void __init_new_context(struct task_struct *tsk, struct mm_struct *mm) 47 56 { ··· 60 51 61 52 static void flush_context(void) 62 53 { 63 - /* set the reserved ASID before flushing the TLB */ 64 - cpu_set_asid(0); 65 - isb(); 54 + cpu_set_reserved_ttbr0(); 66 55 local_flush_tlb_all(); 67 56 if (icache_is_vivt_asid_tagged()) { 68 57 __flush_icache_all(); ··· 105 98 { 106 99 unsigned int asid; 107 100 unsigned int cpu = smp_processor_id(); 108 - struct mm_struct *mm = per_cpu(current_mm, cpu); 109 - 110 - /* 111 - * Check if a current_mm was set on this CPU as it might still 112 - * be in the early booting stages and using the reserved ASID. 113 - */ 114 - if (!mm) 115 - return; 101 + struct mm_struct *mm = current->active_mm; 116 102 117 103 smp_rmb(); 118 104 asid = cpu_last_asid + cpu + 1; ··· 114 114 set_mm_context(mm, asid); 115 115 116 116 /* set the new ASID */ 117 - cpu_set_asid(mm->context.id); 118 - isb(); 117 + cpu_switch_mm(mm->pgd, mm); 119 118 } 120 119 121 120 #else
-81
arch/arm/mm/copypage-v3.c
··· 1 - /* 2 - * linux/arch/arm/mm/copypage-v3.c 3 - * 4 - * Copyright (C) 1995-1999 Russell King 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 - #include <linux/init.h> 11 - #include <linux/highmem.h> 12 - 13 - /* 14 - * ARMv3 optimised copy_user_highpage 15 - * 16 - * FIXME: do we need to handle cache stuff... 17 - */ 18 - static void __naked 19 - v3_copy_user_page(void *kto, const void *kfrom) 20 - { 21 - asm("\n\ 22 - stmfd sp!, {r4, lr} @ 2\n\ 23 - mov r2, %2 @ 1\n\ 24 - ldmia %0!, {r3, r4, ip, lr} @ 4+1\n\ 25 - 1: stmia %1!, {r3, r4, ip, lr} @ 4\n\ 26 - ldmia %0!, {r3, r4, ip, lr} @ 4+1\n\ 27 - stmia %1!, {r3, r4, ip, lr} @ 4\n\ 28 - ldmia %0!, {r3, r4, ip, lr} @ 4+1\n\ 29 - stmia %1!, {r3, r4, ip, lr} @ 4\n\ 30 - ldmia %0!, {r3, r4, ip, lr} @ 4\n\ 31 - subs r2, r2, #1 @ 1\n\ 32 - stmia %1!, {r3, r4, ip, lr} @ 4\n\ 33 - ldmneia %0!, {r3, r4, ip, lr} @ 4\n\ 34 - bne 1b @ 1\n\ 35 - ldmfd sp!, {r4, pc} @ 3" 36 - : 37 - : "r" (kfrom), "r" (kto), "I" (PAGE_SIZE / 64)); 38 - } 39 - 40 - void v3_copy_user_highpage(struct page *to, struct page *from, 41 - unsigned long vaddr, struct vm_area_struct *vma) 42 - { 43 - void *kto, *kfrom; 44 - 45 - kto = kmap_atomic(to); 46 - kfrom = kmap_atomic(from); 47 - v3_copy_user_page(kto, kfrom); 48 - kunmap_atomic(kfrom); 49 - kunmap_atomic(kto); 50 - } 51 - 52 - /* 53 - * ARMv3 optimised clear_user_page 54 - * 55 - * FIXME: do we need to handle cache stuff... 56 - */ 57 - void v3_clear_user_highpage(struct page *page, unsigned long vaddr) 58 - { 59 - void *ptr, *kaddr = kmap_atomic(page); 60 - asm volatile("\n\ 61 - mov r1, %2 @ 1\n\ 62 - mov r2, #0 @ 1\n\ 63 - mov r3, #0 @ 1\n\ 64 - mov ip, #0 @ 1\n\ 65 - mov lr, #0 @ 1\n\ 66 - 1: stmia %0!, {r2, r3, ip, lr} @ 4\n\ 67 - stmia %0!, {r2, r3, ip, lr} @ 4\n\ 68 - stmia %0!, {r2, r3, ip, lr} @ 4\n\ 69 - stmia %0!, {r2, r3, ip, lr} @ 4\n\ 70 - subs r1, r1, #1 @ 1\n\ 71 - bne 1b @ 1" 72 - : "=r" (ptr) 73 - : "0" (kaddr), "I" (PAGE_SIZE / 64) 74 - : "r1", "r2", "r3", "ip", "lr"); 75 - kunmap_atomic(kaddr); 76 - } 77 - 78 - struct cpu_user_fns v3_user_fns __initdata = { 79 - .cpu_clear_user_highpage = v3_clear_user_highpage, 80 - .cpu_copy_user_highpage = v3_copy_user_highpage, 81 - };
-3
arch/arm/mm/fault.c
··· 432 432 433 433 index = pgd_index(addr); 434 434 435 - /* 436 - * FIXME: CP15 C1 is write only on ARMv3 architectures. 437 - */ 438 435 pgd = cpu_get_pgd() + index; 439 436 pgd_k = init_mm.pgd + index; 440 437
+1
arch/arm/mm/proc-arm1020.S
··· 241 241 cmp r0, r1 242 242 blo 1b 243 243 mcr p15, 0, ip, c7, c10, 4 @ drain WB 244 + mov r0, #0 244 245 mov pc, lr 245 246 246 247 /*
+1
arch/arm/mm/proc-arm1020e.S
··· 235 235 cmp r0, r1 236 236 blo 1b 237 237 mcr p15, 0, ip, c7, c10, 4 @ drain WB 238 + mov r0, #0 238 239 mov pc, lr 239 240 240 241 /*
+1
arch/arm/mm/proc-arm1022.S
··· 224 224 cmp r0, r1 225 225 blo 1b 226 226 mcr p15, 0, ip, c7, c10, 4 @ drain WB 227 + mov r0, #0 227 228 mov pc, lr 228 229 229 230 /*
+1
arch/arm/mm/proc-arm1026.S
··· 218 218 cmp r0, r1 219 219 blo 1b 220 220 mcr p15, 0, ip, c7, c10, 4 @ drain WB 221 + mov r0, #0 221 222 mov pc, lr 222 223 223 224 /*
-327
arch/arm/mm/proc-arm6_7.S
··· 1 - /* 2 - * linux/arch/arm/mm/proc-arm6,7.S 3 - * 4 - * Copyright (C) 1997-2000 Russell King 5 - * hacked for non-paged-MM by Hyok S. Choi, 2003. 6 - * 7 - * This program is free software; you can redistribute it and/or modify 8 - * it under the terms of the GNU General Public License version 2 as 9 - * published by the Free Software Foundation. 10 - * 11 - * These are the low level assembler for performing cache and TLB 12 - * functions on the ARM610 & ARM710. 13 - */ 14 - #include <linux/linkage.h> 15 - #include <linux/init.h> 16 - #include <asm/assembler.h> 17 - #include <asm/asm-offsets.h> 18 - #include <asm/hwcap.h> 19 - #include <asm/pgtable-hwdef.h> 20 - #include <asm/pgtable.h> 21 - #include <asm/ptrace.h> 22 - 23 - #include "proc-macros.S" 24 - 25 - ENTRY(cpu_arm6_dcache_clean_area) 26 - ENTRY(cpu_arm7_dcache_clean_area) 27 - mov pc, lr 28 - 29 - /* 30 - * Function: arm6_7_data_abort () 31 - * 32 - * Params : r2 = pt_regs 33 - * : r4 = aborted context pc 34 - * : r5 = aborted context psr 35 - * 36 - * Purpose : obtain information about current aborted instruction 37 - * 38 - * Returns : r4-r5, r10-r11, r13 preserved 39 - */ 40 - 41 - ENTRY(cpu_arm7_data_abort) 42 - mrc p15, 0, r1, c5, c0, 0 @ get FSR 43 - mrc p15, 0, r0, c6, c0, 0 @ get FAR 44 - ldr r8, [r4] @ read arm instruction 45 - tst r8, #1 << 20 @ L = 0 -> write? 46 - orreq r1, r1, #1 << 11 @ yes. 47 - and r7, r8, #15 << 24 48 - add pc, pc, r7, lsr #22 @ Now branch to the relevant processing routine 49 - nop 50 - 51 - /* 0 */ b .data_unknown 52 - /* 1 */ b do_DataAbort @ swp 53 - /* 2 */ b .data_unknown 54 - /* 3 */ b .data_unknown 55 - /* 4 */ b .data_arm_lateldrpostconst @ ldr rd, [rn], #m 56 - /* 5 */ b .data_arm_lateldrpreconst @ ldr rd, [rn, #m] 57 - /* 6 */ b .data_arm_lateldrpostreg @ ldr rd, [rn], rm 58 - /* 7 */ b .data_arm_lateldrprereg @ ldr rd, [rn, rm] 59 - /* 8 */ b .data_arm_ldmstm @ ldm*a rn, <rlist> 60 - /* 9 */ b .data_arm_ldmstm @ ldm*b rn, <rlist> 61 - /* a */ b .data_unknown 62 - /* b */ b .data_unknown 63 - /* c */ b do_DataAbort @ ldc rd, [rn], #m @ Same as ldr rd, [rn], #m 64 - /* d */ b do_DataAbort @ ldc rd, [rn, #m] 65 - /* e */ b .data_unknown 66 - /* f */ 67 - .data_unknown: @ Part of jumptable 68 - mov r0, r4 69 - mov r1, r8 70 - b baddataabort 71 - 72 - ENTRY(cpu_arm6_data_abort) 73 - mrc p15, 0, r1, c5, c0, 0 @ get FSR 74 - mrc p15, 0, r0, c6, c0, 0 @ get FAR 75 - ldr r8, [r4] @ read arm instruction 76 - tst r8, #1 << 20 @ L = 0 -> write? 77 - orreq r1, r1, #1 << 11 @ yes. 78 - and r7, r8, #14 << 24 79 - teq r7, #8 << 24 @ was it ldm/stm 80 - bne do_DataAbort 81 - 82 - .data_arm_ldmstm: 83 - tst r8, #1 << 21 @ check writeback bit 84 - beq do_DataAbort @ no writeback -> no fixup 85 - mov r7, #0x11 86 - orr r7, r7, #0x1100 87 - and r6, r8, r7 88 - and r9, r8, r7, lsl #1 89 - add r6, r6, r9, lsr #1 90 - and r9, r8, r7, lsl #2 91 - add r6, r6, r9, lsr #2 92 - and r9, r8, r7, lsl #3 93 - add r6, r6, r9, lsr #3 94 - add r6, r6, r6, lsr #8 95 - add r6, r6, r6, lsr #4 96 - and r6, r6, #15 @ r6 = no. of registers to transfer. 97 - and r9, r8, #15 << 16 @ Extract 'n' from instruction 98 - ldr r7, [r2, r9, lsr #14] @ Get register 'Rn' 99 - tst r8, #1 << 23 @ Check U bit 100 - subne r7, r7, r6, lsl #2 @ Undo increment 101 - addeq r7, r7, r6, lsl #2 @ Undo decrement 102 - str r7, [r2, r9, lsr #14] @ Put register 'Rn' 103 - b do_DataAbort 104 - 105 - .data_arm_apply_r6_and_rn: 106 - and r9, r8, #15 << 16 @ Extract 'n' from instruction 107 - ldr r7, [r2, r9, lsr #14] @ Get register 'Rn' 108 - tst r8, #1 << 23 @ Check U bit 109 - subne r7, r7, r6 @ Undo incrmenet 110 - addeq r7, r7, r6 @ Undo decrement 111 - str r7, [r2, r9, lsr #14] @ Put register 'Rn' 112 - b do_DataAbort 113 - 114 - .data_arm_lateldrpreconst: 115 - tst r8, #1 << 21 @ check writeback bit 116 - beq do_DataAbort @ no writeback -> no fixup 117 - .data_arm_lateldrpostconst: 118 - movs r6, r8, lsl #20 @ Get offset 119 - beq do_DataAbort @ zero -> no fixup 120 - and r9, r8, #15 << 16 @ Extract 'n' from instruction 121 - ldr r7, [r2, r9, lsr #14] @ Get register 'Rn' 122 - tst r8, #1 << 23 @ Check U bit 123 - subne r7, r7, r6, lsr #20 @ Undo increment 124 - addeq r7, r7, r6, lsr #20 @ Undo decrement 125 - str r7, [r2, r9, lsr #14] @ Put register 'Rn' 126 - b do_DataAbort 127 - 128 - .data_arm_lateldrprereg: 129 - tst r8, #1 << 21 @ check writeback bit 130 - beq do_DataAbort @ no writeback -> no fixup 131 - .data_arm_lateldrpostreg: 132 - and r7, r8, #15 @ Extract 'm' from instruction 133 - ldr r6, [r2, r7, lsl #2] @ Get register 'Rm' 134 - mov r9, r8, lsr #7 @ get shift count 135 - ands r9, r9, #31 136 - and r7, r8, #0x70 @ get shift type 137 - orreq r7, r7, #8 @ shift count = 0 138 - add pc, pc, r7 139 - nop 140 - 141 - mov r6, r6, lsl r9 @ 0: LSL #!0 142 - b .data_arm_apply_r6_and_rn 143 - b .data_arm_apply_r6_and_rn @ 1: LSL #0 144 - nop 145 - b .data_unknown @ 2: MUL? 146 - nop 147 - b .data_unknown @ 3: MUL? 148 - nop 149 - mov r6, r6, lsr r9 @ 4: LSR #!0 150 - b .data_arm_apply_r6_and_rn 151 - mov r6, r6, lsr #32 @ 5: LSR #32 152 - b .data_arm_apply_r6_and_rn 153 - b .data_unknown @ 6: MUL? 154 - nop 155 - b .data_unknown @ 7: MUL? 156 - nop 157 - mov r6, r6, asr r9 @ 8: ASR #!0 158 - b .data_arm_apply_r6_and_rn 159 - mov r6, r6, asr #32 @ 9: ASR #32 160 - b .data_arm_apply_r6_and_rn 161 - b .data_unknown @ A: MUL? 162 - nop 163 - b .data_unknown @ B: MUL? 164 - nop 165 - mov r6, r6, ror r9 @ C: ROR #!0 166 - b .data_arm_apply_r6_and_rn 167 - mov r6, r6, rrx @ D: RRX 168 - b .data_arm_apply_r6_and_rn 169 - b .data_unknown @ E: MUL? 170 - nop 171 - b .data_unknown @ F: MUL? 172 - 173 - /* 174 - * Function: arm6_7_proc_init (void) 175 - * : arm6_7_proc_fin (void) 176 - * 177 - * Notes : This processor does not require these 178 - */ 179 - ENTRY(cpu_arm6_proc_init) 180 - ENTRY(cpu_arm7_proc_init) 181 - mov pc, lr 182 - 183 - ENTRY(cpu_arm6_proc_fin) 184 - ENTRY(cpu_arm7_proc_fin) 185 - mov r0, #0x31 @ ....S..DP...M 186 - mcr p15, 0, r0, c1, c0, 0 @ disable caches 187 - mov pc, lr 188 - 189 - ENTRY(cpu_arm6_do_idle) 190 - ENTRY(cpu_arm7_do_idle) 191 - mov pc, lr 192 - 193 - /* 194 - * Function: arm6_7_switch_mm(unsigned long pgd_phys) 195 - * Params : pgd_phys Physical address of page table 196 - * Purpose : Perform a task switch, saving the old processes state, and restoring 197 - * the new. 198 - */ 199 - ENTRY(cpu_arm6_switch_mm) 200 - ENTRY(cpu_arm7_switch_mm) 201 - #ifdef CONFIG_MMU 202 - mov r1, #0 203 - mcr p15, 0, r1, c7, c0, 0 @ flush cache 204 - mcr p15, 0, r0, c2, c0, 0 @ update page table ptr 205 - mcr p15, 0, r1, c5, c0, 0 @ flush TLBs 206 - #endif 207 - mov pc, lr 208 - 209 - /* 210 - * Function: arm6_7_set_pte_ext(pte_t *ptep, pte_t pte, unsigned int ext) 211 - * Params : r0 = Address to set 212 - * : r1 = value to set 213 - * Purpose : Set a PTE and flush it out of any WB cache 214 - */ 215 - .align 5 216 - ENTRY(cpu_arm6_set_pte_ext) 217 - ENTRY(cpu_arm7_set_pte_ext) 218 - #ifdef CONFIG_MMU 219 - armv3_set_pte_ext wc_disable=0 220 - #endif /* CONFIG_MMU */ 221 - mov pc, lr 222 - 223 - /* 224 - * Function: _arm6_7_reset 225 - * Params : r0 = address to jump to 226 - * Notes : This sets up everything for a reset 227 - */ 228 - .pushsection .idmap.text, "ax" 229 - ENTRY(cpu_arm6_reset) 230 - ENTRY(cpu_arm7_reset) 231 - mov r1, #0 232 - mcr p15, 0, r1, c7, c0, 0 @ flush cache 233 - #ifdef CONFIG_MMU 234 - mcr p15, 0, r1, c5, c0, 0 @ flush TLB 235 - #endif 236 - mov r1, #0x30 237 - mcr p15, 0, r1, c1, c0, 0 @ turn off MMU etc 238 - mov pc, r0 239 - ENDPROC(cpu_arm6_reset) 240 - ENDPROC(cpu_arm7_reset) 241 - .popsection 242 - 243 - __CPUINIT 244 - 245 - .type __arm6_setup, #function 246 - __arm6_setup: mov r0, #0 247 - mcr p15, 0, r0, c7, c0 @ flush caches on v3 248 - #ifdef CONFIG_MMU 249 - mcr p15, 0, r0, c5, c0 @ flush TLBs on v3 250 - mov r0, #0x3d @ . ..RS BLDP WCAM 251 - orr r0, r0, #0x100 @ . ..01 0011 1101 252 - #else 253 - mov r0, #0x3c @ . ..RS BLDP WCA. 254 - #endif 255 - mov pc, lr 256 - .size __arm6_setup, . - __arm6_setup 257 - 258 - .type __arm7_setup, #function 259 - __arm7_setup: mov r0, #0 260 - mcr p15, 0, r0, c7, c0 @ flush caches on v3 261 - #ifdef CONFIG_MMU 262 - mcr p15, 0, r0, c5, c0 @ flush TLBs on v3 263 - mcr p15, 0, r0, c3, c0 @ load domain access register 264 - mov r0, #0x7d @ . ..RS BLDP WCAM 265 - orr r0, r0, #0x100 @ . ..01 0111 1101 266 - #else 267 - mov r0, #0x7c @ . ..RS BLDP WCA. 268 - #endif 269 - mov pc, lr 270 - .size __arm7_setup, . - __arm7_setup 271 - 272 - __INITDATA 273 - 274 - @ define struct processor (see <asm/proc-fns.h> and proc-macros.S) 275 - define_processor_functions arm6, dabort=cpu_arm6_data_abort, pabort=legacy_pabort 276 - define_processor_functions arm7, dabort=cpu_arm7_data_abort, pabort=legacy_pabort 277 - 278 - .section ".rodata" 279 - 280 - string cpu_arch_name, "armv3" 281 - string cpu_elf_name, "v3" 282 - string cpu_arm6_name, "ARM6" 283 - string cpu_arm610_name, "ARM610" 284 - string cpu_arm7_name, "ARM7" 285 - string cpu_arm710_name, "ARM710" 286 - 287 - .align 288 - 289 - .section ".proc.info.init", #alloc, #execinstr 290 - 291 - .macro arm67_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req, \ 292 - cpu_mm_mmu_flags:req, cpu_flush:req, cpu_proc_funcs:req 293 - .type __\name\()_proc_info, #object 294 - __\name\()_proc_info: 295 - .long \cpu_val 296 - .long \cpu_mask 297 - .long \cpu_mm_mmu_flags 298 - .long PMD_TYPE_SECT | \ 299 - PMD_BIT4 | \ 300 - PMD_SECT_AP_WRITE | \ 301 - PMD_SECT_AP_READ 302 - b \cpu_flush 303 - .long cpu_arch_name 304 - .long cpu_elf_name 305 - .long HWCAP_SWP | HWCAP_26BIT 306 - .long \cpu_name 307 - .long \cpu_proc_funcs 308 - .long v3_tlb_fns 309 - .long v3_user_fns 310 - .long v3_cache_fns 311 - .size __\name\()_proc_info, . - __\name\()_proc_info 312 - .endm 313 - 314 - arm67_proc_info arm6, 0x41560600, 0xfffffff0, cpu_arm6_name, \ 315 - 0x00000c1e, __arm6_setup, arm6_processor_functions 316 - arm67_proc_info arm610, 0x41560610, 0xfffffff0, cpu_arm610_name, \ 317 - 0x00000c1e, __arm6_setup, arm6_processor_functions 318 - arm67_proc_info arm7, 0x41007000, 0xffffff00, cpu_arm7_name, \ 319 - 0x00000c1e, __arm7_setup, arm7_processor_functions 320 - arm67_proc_info arm710, 0x41007100, 0xfff8ff00, cpu_arm710_name, \ 321 - PMD_TYPE_SECT | \ 322 - PMD_SECT_BUFFERABLE | \ 323 - PMD_SECT_CACHEABLE | \ 324 - PMD_BIT4 | \ 325 - PMD_SECT_AP_WRITE | \ 326 - PMD_SECT_AP_READ, \ 327 - __arm7_setup, arm7_processor_functions
+1
arch/arm/mm/proc-arm920.S
··· 210 210 cmp r0, r1 211 211 blo 1b 212 212 mcr p15, 0, r0, c7, c10, 4 @ drain WB 213 + mov r0, #0 213 214 mov pc, lr 214 215 215 216 /*
+1
arch/arm/mm/proc-arm922.S
··· 212 212 cmp r0, r1 213 213 blo 1b 214 214 mcr p15, 0, r0, c7, c10, 4 @ drain WB 215 + mov r0, #0 215 216 mov pc, lr 216 217 217 218 /*
+1
arch/arm/mm/proc-arm925.S
··· 258 258 cmp r0, r1 259 259 blo 1b 260 260 mcr p15, 0, r0, c7, c10, 4 @ drain WB 261 + mov r0, #0 261 262 mov pc, lr 262 263 263 264 /*
+1
arch/arm/mm/proc-arm926.S
··· 221 221 cmp r0, r1 222 222 blo 1b 223 223 mcr p15, 0, r0, c7, c10, 4 @ drain WB 224 + mov r0, #0 224 225 mov pc, lr 225 226 226 227 /*
+3 -3
arch/arm/mm/proc-arm940.S
··· 160 160 * - size - region size 161 161 */ 162 162 ENTRY(arm940_flush_kern_dcache_area) 163 - mov ip, #0 163 + mov r0, #0 164 164 mov r1, #(CACHE_DSEGMENTS - 1) << 4 @ 4 segments 165 165 1: orr r3, r1, #(CACHE_DENTRIES - 1) << 26 @ 64 entries 166 166 2: mcr p15, 0, r3, c7, c14, 2 @ clean/flush D index ··· 168 168 bcs 2b @ entries 63 to 0 169 169 subs r1, r1, #1 << 4 170 170 bcs 1b @ segments 7 to 0 171 - mcr p15, 0, ip, c7, c5, 0 @ invalidate I cache 172 - mcr p15, 0, ip, c7, c10, 4 @ drain WB 171 + mcr p15, 0, r0, c7, c5, 0 @ invalidate I cache 172 + mcr p15, 0, r0, c7, c10, 4 @ drain WB 173 173 mov pc, lr 174 174 175 175 /*
+1
arch/arm/mm/proc-arm946.S
··· 190 190 cmp r0, r1 191 191 blo 1b 192 192 mcr p15, 0, r0, c7, c10, 4 @ drain WB 193 + mov r0, #0 193 194 mov pc, lr 194 195 195 196 /*
+1
arch/arm/mm/proc-feroceon.S
··· 232 232 cmp r0, r1 233 233 blo 1b 234 234 mcr p15, 0, r0, c7, c10, 4 @ drain WB 235 + mov r0, #0 235 236 mov pc, lr 236 237 237 238 /*
+1
arch/arm/mm/proc-mohawk.S
··· 193 193 cmp r0, r1 194 194 blo 1b 195 195 mcr p15, 0, r0, c7, c10, 4 @ drain WB 196 + mov r0, #0 196 197 mov pc, lr 197 198 198 199 /*
+2 -7
arch/arm/mm/proc-v7-2level.S
··· 49 49 #ifdef CONFIG_ARM_ERRATA_754322 50 50 dsb 51 51 #endif 52 - mcr p15, 0, r2, c13, c0, 1 @ set reserved context ID 53 - isb 54 - 1: mcr p15, 0, r0, c2, c0, 0 @ set TTB 0 55 - isb 56 - #ifdef CONFIG_ARM_ERRATA_754322 57 - dsb 58 - #endif 59 52 mcr p15, 0, r1, c13, c0, 1 @ set context ID 53 + isb 54 + mcr p15, 0, r0, c2, c0, 0 @ set TTB 0 60 55 isb 61 56 #endif 62 57 mov pc, lr
-48
arch/arm/mm/tlb-v3.S
··· 1 - /* 2 - * linux/arch/arm/mm/tlbv3.S 3 - * 4 - * Copyright (C) 1997-2002 Russell King 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 - * ARM architecture version 3 TLB handling functions. 11 - * 12 - * Processors: ARM610, ARM710. 13 - */ 14 - #include <linux/linkage.h> 15 - #include <linux/init.h> 16 - #include <asm/asm-offsets.h> 17 - #include <asm/tlbflush.h> 18 - #include "proc-macros.S" 19 - 20 - .align 5 21 - /* 22 - * v3_flush_user_tlb_range(start, end, mm) 23 - * 24 - * Invalidate a range of TLB entries in the specified address space. 25 - * 26 - * - start - range start address 27 - * - end - range end address 28 - * - mm - mm_struct describing address space 29 - */ 30 - .align 5 31 - ENTRY(v3_flush_user_tlb_range) 32 - vma_vm_mm r2, r2 33 - act_mm r3 @ get current->active_mm 34 - teq r2, r3 @ == mm ? 35 - movne pc, lr @ no, we dont do anything 36 - ENTRY(v3_flush_kern_tlb_range) 37 - bic r0, r0, #0x0ff 38 - bic r0, r0, #0xf00 39 - 1: mcr p15, 0, r0, c6, c0, 0 @ invalidate TLB entry 40 - add r0, r0, #PAGE_SZ 41 - cmp r0, r1 42 - blo 1b 43 - mov pc, lr 44 - 45 - __INITDATA 46 - 47 - /* define struct cpu_tlb_fns (see <asm/tlbflush.h> and proc-macros.S) */ 48 - define_tlb_functions v3, v3_tlb_flags
+1 -7
arch/arm/plat-iop/pci.c
··· 160 160 return PCIBIOS_SUCCESSFUL; 161 161 } 162 162 163 - static struct pci_ops iop3xx_ops = { 163 + struct pci_ops iop3xx_ops = { 164 164 .read = iop3xx_read_config, 165 165 .write = iop3xx_write_config, 166 166 }; ··· 218 218 pci_add_resource_offset(&sys->resources, &res[1], sys->mem_offset); 219 219 220 220 return 1; 221 - } 222 - 223 - struct pci_bus *iop3xx_pci_scan_bus(int nr, struct pci_sys_data *sys) 224 - { 225 - return pci_scan_root_bus(NULL, sys->busnr, &iop3xx_ops, sys, 226 - &sys->resources); 227 221 } 228 222 229 223 void __init iop3xx_atu_setup(void)
+4 -2
arch/arm/plat-omap/counter_32k.c
··· 19 19 #include <linux/io.h> 20 20 #include <linux/clocksource.h> 21 21 22 + #include <asm/mach/time.h> 22 23 #include <asm/sched_clock.h> 23 24 24 25 #include <plat/hardware.h> ··· 44 43 } 45 44 46 45 /** 47 - * read_persistent_clock - Return time from a persistent clock. 46 + * omap_read_persistent_clock - Return time from a persistent clock. 48 47 * 49 48 * Reads the time from a source which isn't disabled during PM, the 50 49 * 32k sync timer. Convert the cycles elapsed since last read into ··· 53 52 static struct timespec persistent_ts; 54 53 static cycles_t cycles, last_cycles; 55 54 static unsigned int persistent_mult, persistent_shift; 56 - void read_persistent_clock(struct timespec *ts) 55 + static void omap_read_persistent_clock(struct timespec *ts) 57 56 { 58 57 unsigned long long nsecs; 59 58 cycles_t delta; ··· 117 116 printk(err, "32k_counter"); 118 117 119 118 setup_sched_clock(omap_32k_read_sched_clock, 32, 32768); 119 + register_persistent_clock(NULL, omap_read_persistent_clock); 120 120 } 121 121 return 0; 122 122 }
+6
arch/arm/plat-versatile/Kconfig
··· 5 5 6 6 config PLAT_VERSATILE_FPGA_IRQ 7 7 bool 8 + select IRQ_DOMAIN 9 + 10 + config PLAT_VERSATILE_FPGA_IRQ_NR 11 + int 12 + default 4 13 + depends on PLAT_VERSATILE_FPGA_IRQ 8 14 9 15 config PLAT_VERSATILE_LEDS 10 16 def_bool y if LEDS_CLASS
+101 -15
arch/arm/plat-versatile/fpga-irq.c
··· 3 3 */ 4 4 #include <linux/irq.h> 5 5 #include <linux/io.h> 6 + #include <linux/irqdomain.h> 7 + #include <linux/module.h> 6 8 9 + #include <asm/exception.h> 7 10 #include <asm/mach/irq.h> 8 11 #include <plat/fpga-irq.h> 9 12 ··· 15 12 #define IRQ_ENABLE_SET 0x08 16 13 #define IRQ_ENABLE_CLEAR 0x0c 17 14 15 + /** 16 + * struct fpga_irq_data - irq data container for the FPGA IRQ controller 17 + * @base: memory offset in virtual memory 18 + * @irq_start: first IRQ number handled by this instance 19 + * @chip: chip container for this instance 20 + * @domain: IRQ domain for this instance 21 + * @valid: mask for valid IRQs on this controller 22 + * @used_irqs: number of active IRQs on this controller 23 + */ 24 + struct fpga_irq_data { 25 + void __iomem *base; 26 + unsigned int irq_start; 27 + struct irq_chip chip; 28 + u32 valid; 29 + struct irq_domain *domain; 30 + u8 used_irqs; 31 + }; 32 + 33 + /* we cannot allocate memory when the controllers are initially registered */ 34 + static struct fpga_irq_data fpga_irq_devices[CONFIG_PLAT_VERSATILE_FPGA_IRQ_NR]; 35 + static int fpga_irq_id; 36 + 18 37 static void fpga_irq_mask(struct irq_data *d) 19 38 { 20 39 struct fpga_irq_data *f = irq_data_get_irq_chip_data(d); 21 - u32 mask = 1 << (d->irq - f->irq_start); 40 + u32 mask = 1 << d->hwirq; 22 41 23 42 writel(mask, f->base + IRQ_ENABLE_CLEAR); 24 43 } ··· 48 23 static void fpga_irq_unmask(struct irq_data *d) 49 24 { 50 25 struct fpga_irq_data *f = irq_data_get_irq_chip_data(d); 51 - u32 mask = 1 << (d->irq - f->irq_start); 26 + u32 mask = 1 << d->hwirq; 52 27 53 28 writel(mask, f->base + IRQ_ENABLE_SET); 54 29 } ··· 66 41 do { 67 42 irq = ffs(status) - 1; 68 43 status &= ~(1 << irq); 69 - 70 - generic_handle_irq(irq + f->irq_start); 44 + generic_handle_irq(irq_find_mapping(f->domain, irq)); 71 45 } while (status); 72 46 } 73 47 74 - void __init fpga_irq_init(int parent_irq, u32 valid, struct fpga_irq_data *f) 48 + /* 49 + * Handle each interrupt in a single FPGA IRQ controller. Returns non-zero 50 + * if we've handled at least one interrupt. This does a single read of the 51 + * status register and handles all interrupts in order from LSB first. 52 + */ 53 + static int handle_one_fpga(struct fpga_irq_data *f, struct pt_regs *regs) 75 54 { 76 - unsigned int i; 55 + int handled = 0; 56 + int irq; 57 + u32 status; 77 58 59 + while ((status = readl(f->base + IRQ_STATUS))) { 60 + irq = ffs(status) - 1; 61 + handle_IRQ(irq_find_mapping(f->domain, irq), regs); 62 + handled = 1; 63 + } 64 + 65 + return handled; 66 + } 67 + 68 + /* 69 + * Keep iterating over all registered FPGA IRQ controllers until there are 70 + * no pending interrupts. 71 + */ 72 + asmlinkage void __exception_irq_entry fpga_handle_irq(struct pt_regs *regs) 73 + { 74 + int i, handled; 75 + 76 + do { 77 + for (i = 0, handled = 0; i < fpga_irq_id; ++i) 78 + handled |= handle_one_fpga(&fpga_irq_devices[i], regs); 79 + } while (handled); 80 + } 81 + 82 + static int fpga_irqdomain_map(struct irq_domain *d, unsigned int irq, 83 + irq_hw_number_t hwirq) 84 + { 85 + struct fpga_irq_data *f = d->host_data; 86 + 87 + /* Skip invalid IRQs, only register handlers for the real ones */ 88 + if (!(f->valid & (1 << hwirq))) 89 + return -ENOTSUPP; 90 + irq_set_chip_data(irq, f); 91 + irq_set_chip_and_handler(irq, &f->chip, 92 + handle_level_irq); 93 + set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); 94 + f->used_irqs++; 95 + return 0; 96 + } 97 + 98 + static struct irq_domain_ops fpga_irqdomain_ops = { 99 + .map = fpga_irqdomain_map, 100 + .xlate = irq_domain_xlate_onetwocell, 101 + }; 102 + 103 + void __init fpga_irq_init(void __iomem *base, const char *name, int irq_start, 104 + int parent_irq, u32 valid, struct device_node *node) 105 + { 106 + struct fpga_irq_data *f; 107 + 108 + if (fpga_irq_id >= ARRAY_SIZE(fpga_irq_devices)) { 109 + printk(KERN_ERR "%s: too few FPGA IRQ controllers, increase CONFIG_PLAT_VERSATILE_FPGA_IRQ_NR\n", __func__); 110 + return; 111 + } 112 + 113 + f = &fpga_irq_devices[fpga_irq_id]; 114 + f->base = base; 115 + f->irq_start = irq_start; 116 + f->chip.name = name; 78 117 f->chip.irq_ack = fpga_irq_mask; 79 118 f->chip.irq_mask = fpga_irq_mask; 80 119 f->chip.irq_unmask = fpga_irq_unmask; 120 + f->valid = valid; 81 121 82 122 if (parent_irq != -1) { 83 123 irq_set_handler_data(parent_irq, f); 84 124 irq_set_chained_handler(parent_irq, fpga_irq_handle); 85 125 } 86 126 87 - for (i = 0; i < 32; i++) { 88 - if (valid & (1 << i)) { 89 - unsigned int irq = f->irq_start + i; 127 + f->domain = irq_domain_add_legacy(node, fls(valid), f->irq_start, 0, 128 + &fpga_irqdomain_ops, f); 129 + pr_info("FPGA IRQ chip %d \"%s\" @ %p, %u irqs\n", 130 + fpga_irq_id, name, base, f->used_irqs); 90 131 91 - irq_set_chip_data(irq, f); 92 - irq_set_chip_and_handler(irq, &f->chip, 93 - handle_level_irq); 94 - set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); 95 - } 96 - } 132 + fpga_irq_id++; 97 133 }
+5 -6
arch/arm/plat-versatile/include/plat/fpga-irq.h
··· 1 1 #ifndef PLAT_FPGA_IRQ_H 2 2 #define PLAT_FPGA_IRQ_H 3 3 4 - struct fpga_irq_data { 5 - void __iomem *base; 6 - unsigned int irq_start; 7 - struct irq_chip chip; 8 - }; 4 + struct device_node; 5 + struct pt_regs; 9 6 10 - void fpga_irq_init(int, u32, struct fpga_irq_data *); 7 + void fpga_handle_irq(struct pt_regs *regs); 8 + void fpga_irq_init(void __iomem *, const char *, int, int, u32, 9 + struct device_node *node); 11 10 12 11 #endif
+271 -234
arch/arm/tools/mach-types
··· 16 16 # are merged into mainline or have been edited in the machine database 17 17 # within the last 12 months. References to machine_is_NAME() do not count! 18 18 # 19 - # Last update: Tue Dec 6 11:07:38 2011 19 + # Last update: Thu Apr 26 08:44:23 2012 20 20 # 21 21 # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number 22 22 # ··· 205 205 snapper_cl15 MACH_SNAPPER_CL15 SNAPPER_CL15 986 206 206 omap_palmz71 MACH_OMAP_PALMZ71 OMAP_PALMZ71 993 207 207 smdk2412 MACH_SMDK2412 SMDK2412 1009 208 + bkde303 MACH_BKDE303 BKDE303 1021 208 209 smdk2413 MACH_SMDK2413 SMDK2413 1022 209 210 aml_m5900 MACH_AML_M5900 AML_M5900 1024 210 211 balloon3 MACH_BALLOON3 BALLOON3 1029 ··· 382 381 at91sam9g10ek MACH_AT91SAM9G10EK AT91SAM9G10EK 2159 383 382 omap_4430sdp MACH_OMAP_4430SDP OMAP_4430SDP 2160 384 383 magx_zn5 MACH_MAGX_ZN5 MAGX_ZN5 2162 385 - btmavb101 MACH_BTMAVB101 BTMAVB101 2172 386 - btmawb101 MACH_BTMAWB101 BTMAWB101 2173 387 384 tx25 MACH_TX25 TX25 2177 388 385 omap3_torpedo MACH_OMAP3_TORPEDO OMAP3_TORPEDO 2178 389 386 anw6410 MACH_ANW6410 ANW6410 2183 ··· 396 397 net5big_v2 MACH_NET5BIG_V2 NET5BIG_V2 2206 397 398 inetspace_v2 MACH_INETSPACE_V2 INETSPACE_V2 2208 398 399 at91sam9g45ekes MACH_AT91SAM9G45EKES AT91SAM9G45EKES 2212 399 - pc7302 MACH_PC7302 PC7302 2220 400 400 spear600 MACH_SPEAR600 SPEAR600 2236 401 401 spear300 MACH_SPEAR300 SPEAR300 2237 402 402 lilly1131 MACH_LILLY1131 LILLY1131 2239 ··· 405 407 bigdisk MACH_BIGDISK BIGDISK 2283 406 408 at91sam9g20ek_2mmc MACH_AT91SAM9G20EK_2MMC AT91SAM9G20EK_2MMC 2288 407 409 bcmring MACH_BCMRING BCMRING 2289 408 - dp6xx MACH_DP6XX DP6XX 2302 409 410 mahimahi MACH_MAHIMAHI MAHIMAHI 2304 410 411 smdk6442 MACH_SMDK6442 SMDK6442 2324 411 412 openrd_base MACH_OPENRD_BASE OPENRD_BASE 2325 ··· 441 444 smartq5 MACH_SMARTQ5 SMARTQ5 2534 442 445 davinci_dm6467tevm MACH_DAVINCI_DM6467TEVM DAVINCI_DM6467TEVM 2548 443 446 mxt_td60 MACH_MXT_TD60 MXT_TD60 2550 444 - riot_bei2 MACH_RIOT_BEI2 RIOT_BEI2 2576 445 - riot_x37 MACH_RIOT_X37 RIOT_X37 2578 446 447 pca101 MACH_PCA101 PCA101 2595 447 448 capc7117 MACH_CAPC7117 CAPC7117 2612 448 449 icontrol MACH_ICONTROL ICONTROL 2624 ··· 455 460 aquila MACH_AQUILA AQUILA 2676 456 461 esata_sheevaplug MACH_ESATA_SHEEVAPLUG ESATA_SHEEVAPLUG 2678 457 462 msm7x30_surf MACH_MSM7X30_SURF MSM7X30_SURF 2679 458 - ea2478devkit MACH_EA2478DEVKIT EA2478DEVKIT 2683 459 463 terastation_wxl MACH_TERASTATION_WXL TERASTATION_WXL 2697 460 464 msm7x25_surf MACH_MSM7X25_SURF MSM7X25_SURF 2703 461 465 msm7x25_ffa MACH_MSM7X25_FFA MSM7X25_FFA 2704 ··· 473 479 msm8x60_surf MACH_MSM8X60_SURF MSM8X60_SURF 2755 474 480 msm8x60_sim MACH_MSM8X60_SIM MSM8X60_SIM 2756 475 481 tcc8000_sdk MACH_TCC8000_SDK TCC8000_SDK 2758 476 - nanos MACH_NANOS NANOS 2759 477 - stamp9g45 MACH_STAMP9G45 STAMP9G45 2761 478 482 cns3420vb MACH_CNS3420VB CNS3420VB 2776 479 483 omap4_panda MACH_OMAP4_PANDA OMAP4_PANDA 2791 480 484 ti8168evm MACH_TI8168EVM TI8168EVM 2800 ··· 482 490 eukrea_cpuimx51sd MACH_EUKREA_CPUIMX51SD EUKREA_CPUIMX51SD 2822 483 491 eukrea_cpuimx51 MACH_EUKREA_CPUIMX51 EUKREA_CPUIMX51 2823 484 492 smdkc210 MACH_SMDKC210 SMDKC210 2838 485 - pca102 MACH_PCA102 PCA102 2843 493 + pcaal1 MACH_PCAAL1 PCAAL1 2843 486 494 t5325 MACH_T5325 T5325 2846 487 495 income MACH_INCOME INCOME 2849 488 - vvbox_sdorig2 MACH_VVBOX_SDORIG2 VVBOX_SDORIG2 2857 489 - vvbox_sdlite2 MACH_VVBOX_SDLITE2 VVBOX_SDLITE2 2858 490 - vvbox_sdpro4 MACH_VVBOX_SDPRO4 VVBOX_SDPRO4 2859 491 496 mx257sx MACH_MX257SX MX257SX 2861 492 497 goni MACH_GONI GONI 2862 493 498 bv07 MACH_BV07 BV07 2882 ··· 493 504 miccpt MACH_MICCPT MICCPT 2886 494 505 mic256 MACH_MIC256 MIC256 2887 495 506 u5500 MACH_U5500 U5500 2890 507 + pov15hd MACH_POV15HD POV15HD 2910 496 508 linkstation_lschl MACH_LINKSTATION_LSCHL LINKSTATION_LSCHL 2913 497 509 smdkv310 MACH_SMDKV310 SMDKV310 2925 498 510 wm8505_7in_netbook MACH_WM8505_7IN_NETBOOK WM8505_7IN_NETBOOK 2928 ··· 527 537 mackerel MACH_MACKEREL MACKEREL 3211 528 538 kaen MACH_KAEN KAEN 3217 529 539 nokia_rm680 MACH_NOKIA_RM680 NOKIA_RM680 3220 530 - dm6446_adbox MACH_DM6446_ADBOX DM6446_ADBOX 3226 531 - quad_salsa MACH_QUAD_SALSA QUAD_SALSA 3227 532 - abb_gma_1_1 MACH_ABB_GMA_1_1 ABB_GMA_1_1 3228 533 - svcid MACH_SVCID SVCID 3229 534 540 msm8960_sim MACH_MSM8960_SIM MSM8960_SIM 3230 535 541 msm8960_rumi3 MACH_MSM8960_RUMI3 MSM8960_RUMI3 3231 536 - icon_g MACH_ICON_G ICON_G 3232 537 - mb3 MACH_MB3 MB3 3233 538 542 gsia18s MACH_GSIA18S GSIA18S 3234 539 - pivicc MACH_PIVICC PIVICC 3235 540 - pcm048 MACH_PCM048 PCM048 3236 541 - dds MACH_DDS DDS 3237 542 - chalten_xa1 MACH_CHALTEN_XA1 CHALTEN_XA1 3238 543 - ts48xx MACH_TS48XX TS48XX 3239 544 - tonga2_tfttimer MACH_TONGA2_TFTTIMER TONGA2_TFTTIMER 3240 545 - whistler MACH_WHISTLER WHISTLER 3241 546 - asl_phoenix MACH_ASL_PHOENIX ASL_PHOENIX 3242 547 - at91sam9263otlite MACH_AT91SAM9263OTLITE AT91SAM9263OTLITE 3243 548 - ddplug MACH_DDPLUG DDPLUG 3244 549 - d2plug MACH_D2PLUG D2PLUG 3245 550 - kzm9d MACH_KZM9D KZM9D 3246 551 - verdi_lte MACH_VERDI_LTE VERDI_LTE 3247 552 - nanozoom MACH_NANOZOOM NANOZOOM 3248 553 - dm3730_som_lv MACH_DM3730_SOM_LV DM3730_SOM_LV 3249 554 - dm3730_torpedo MACH_DM3730_TORPEDO DM3730_TORPEDO 3250 555 - anchovy MACH_ANCHOVY ANCHOVY 3251 556 - re2rev20 MACH_RE2REV20 RE2REV20 3253 557 - re2rev21 MACH_RE2REV21 RE2REV21 3254 558 - cns21xx MACH_CNS21XX CNS21XX 3255 559 - rider MACH_RIDER RIDER 3257 560 - nsk330 MACH_NSK330 NSK330 3258 561 - cns2133evb MACH_CNS2133EVB CNS2133EVB 3259 562 - z3_816x_mod MACH_Z3_816X_MOD Z3_816X_MOD 3260 563 - z3_814x_mod MACH_Z3_814X_MOD Z3_814X_MOD 3261 564 - beect MACH_BEECT BEECT 3262 565 - dma_thunderbug MACH_DMA_THUNDERBUG DMA_THUNDERBUG 3263 566 - omn_at91sam9g20 MACH_OMN_AT91SAM9G20 OMN_AT91SAM9G20 3264 567 - mx25_e2s_uc MACH_MX25_E2S_UC MX25_E2S_UC 3265 568 - mione MACH_MIONE MIONE 3266 569 - top9000_tcu MACH_TOP9000_TCU TOP9000_TCU 3267 570 - top9000_bsl MACH_TOP9000_BSL TOP9000_BSL 3268 571 - kingdom MACH_KINGDOM KINGDOM 3269 572 - armadillo460 MACH_ARMADILLO460 ARMADILLO460 3270 573 - lq2 MACH_LQ2 LQ2 3271 574 - sweda_tms2 MACH_SWEDA_TMS2 SWEDA_TMS2 3272 575 543 mx53_loco MACH_MX53_LOCO MX53_LOCO 3273 576 - acer_a8 MACH_ACER_A8 ACER_A8 3275 577 - acer_gauguin MACH_ACER_GAUGUIN ACER_GAUGUIN 3276 578 - guppy MACH_GUPPY GUPPY 3277 579 - mx61_ard MACH_MX61_ARD MX61_ARD 3278 580 544 tx53 MACH_TX53 TX53 3279 581 - omapl138_case_a3 MACH_OMAPL138_CASE_A3 OMAPL138_CASE_A3 3280 582 - uemd MACH_UEMD UEMD 3281 583 - ccwmx51mut MACH_CCWMX51MUT CCWMX51MUT 3282 584 - rockhopper MACH_ROCKHOPPER ROCKHOPPER 3283 585 545 encore MACH_ENCORE ENCORE 3284 586 - hkdkc100 MACH_HKDKC100 HKDKC100 3285 587 - ts42xx MACH_TS42XX TS42XX 3286 588 - aebl MACH_AEBL AEBL 3287 589 546 wario MACH_WARIO WARIO 3288 590 - gfs_spm MACH_GFS_SPM GFS_SPM 3289 591 547 cm_t3730 MACH_CM_T3730 CM_T3730 3290 592 - isc3 MACH_ISC3 ISC3 3291 593 - rascal MACH_RASCAL RASCAL 3292 594 548 hrefv60 MACH_HREFV60 HREFV60 3293 595 - tpt_2_0 MACH_TPT_2_0 TPT_2_0 3294 596 - splendor MACH_SPLENDOR SPLENDOR 3296 597 - msm8x60_qt MACH_MSM8X60_QT MSM8X60_QT 3298 598 - htc_hd_mini MACH_HTC_HD_MINI HTC_HD_MINI 3299 599 - athene MACH_ATHENE ATHENE 3300 600 - deep_r_ek_1 MACH_DEEP_R_EK_1 DEEP_R_EK_1 3301 601 - vivow_ct MACH_VIVOW_CT VIVOW_CT 3302 602 - nery_1000 MACH_NERY_1000 NERY_1000 3303 603 - rfl109145_ssrv MACH_RFL109145_SSRV RFL109145_SSRV 3304 604 - nmh MACH_NMH NMH 3305 605 - wn802t MACH_WN802T WN802T 3306 606 - dragonet MACH_DRAGONET DRAGONET 3307 607 - at91sam9263desk16l MACH_AT91SAM9263DESK16L AT91SAM9263DESK16L 3309 608 - bcmhana_sv MACH_BCMHANA_SV BCMHANA_SV 3310 609 - bcmhana_tablet MACH_BCMHANA_TABLET BCMHANA_TABLET 3311 610 - koi MACH_KOI KOI 3312 611 - ts4800 MACH_TS4800 TS4800 3313 612 - tqma9263 MACH_TQMA9263 TQMA9263 3314 613 - holiday MACH_HOLIDAY HOLIDAY 3315 614 - pcats_overlay MACH_PCATS_OVERLAY PCATS_OVERLAY 3317 615 - hwgw6410 MACH_HWGW6410 HWGW6410 3318 616 - shenzhou MACH_SHENZHOU SHENZHOU 3319 617 - cwme9210 MACH_CWME9210 CWME9210 3320 618 - cwme9210js MACH_CWME9210JS CWME9210JS 3321 619 - colibri_tegra2 MACH_COLIBRI_TEGRA2 COLIBRI_TEGRA2 3323 620 - w21 MACH_W21 W21 3324 621 - polysat1 MACH_POLYSAT1 POLYSAT1 3325 622 - dataway MACH_DATAWAY DATAWAY 3326 623 - cobral138 MACH_COBRAL138 COBRAL138 3327 624 - roverpcs8 MACH_ROVERPCS8 ROVERPCS8 3328 625 - marvelc MACH_MARVELC MARVELC 3329 626 - navefihid MACH_NAVEFIHID NAVEFIHID 3330 627 - dm365_cv100 MACH_DM365_CV100 DM365_CV100 3331 628 - able MACH_ABLE ABLE 3332 629 - legacy MACH_LEGACY LEGACY 3333 630 - icong MACH_ICONG ICONG 3334 631 - rover_g8 MACH_ROVER_G8 ROVER_G8 3335 632 - t5388p MACH_T5388P T5388P 3336 633 - dingo MACH_DINGO DINGO 3337 634 - goflexhome MACH_GOFLEXHOME GOFLEXHOME 3338 635 - lanreadyfn511 MACH_LANREADYFN511 LANREADYFN511 3340 636 - omap3_baia MACH_OMAP3_BAIA OMAP3_BAIA 3341 637 - omap3smartdisplay MACH_OMAP3SMARTDISPLAY OMAP3SMARTDISPLAY 3342 638 - xilinx MACH_XILINX XILINX 3343 639 - a2f MACH_A2F A2F 3344 640 - sky25 MACH_SKY25 SKY25 3345 641 - ccmx53 MACH_CCMX53 CCMX53 3346 642 - ccmx53js MACH_CCMX53JS CCMX53JS 3347 643 - ccwmx53 MACH_CCWMX53 CCWMX53 3348 644 - ccwmx53js MACH_CCWMX53JS CCWMX53JS 3349 645 - frisms MACH_FRISMS FRISMS 3350 646 - msm7x27a_ffa MACH_MSM7X27A_FFA MSM7X27A_FFA 3351 647 - msm7x27a_surf MACH_MSM7X27A_SURF MSM7X27A_SURF 3352 648 - msm7x27a_rumi3 MACH_MSM7X27A_RUMI3 MSM7X27A_RUMI3 3353 649 - dimmsam9g20 MACH_DIMMSAM9G20 DIMMSAM9G20 3354 650 - dimm_imx28 MACH_DIMM_IMX28 DIMM_IMX28 3355 651 - amk_a4 MACH_AMK_A4 AMK_A4 3356 652 - gnet_sgme MACH_GNET_SGME GNET_SGME 3357 653 - shooter_u MACH_SHOOTER_U SHOOTER_U 3358 654 - vmx53 MACH_VMX53 VMX53 3359 655 - rhino MACH_RHINO RHINO 3360 656 549 armlex4210 MACH_ARMLEX4210 ARMLEX4210 3361 657 - swarcoextmodem MACH_SWARCOEXTMODEM SWARCOEXTMODEM 3362 658 550 snowball MACH_SNOWBALL SNOWBALL 3363 659 - pcm049 MACH_PCM049 PCM049 3364 660 - vigor MACH_VIGOR VIGOR 3365 661 - oslo_amundsen MACH_OSLO_AMUNDSEN OSLO_AMUNDSEN 3366 662 - gsl_diamond MACH_GSL_DIAMOND GSL_DIAMOND 3367 663 - cv2201 MACH_CV2201 CV2201 3368 664 - cv2202 MACH_CV2202 CV2202 3369 665 - cv2203 MACH_CV2203 CV2203 3370 666 - vit_ibox MACH_VIT_IBOX VIT_IBOX 3371 667 - dm6441_esp MACH_DM6441_ESP DM6441_ESP 3372 668 - at91sam9x5ek MACH_AT91SAM9X5EK AT91SAM9X5EK 3373 669 - libra MACH_LIBRA LIBRA 3374 670 - easycrrh MACH_EASYCRRH EASYCRRH 3375 671 - tripel MACH_TRIPEL TRIPEL 3376 672 - endian_mini MACH_ENDIAN_MINI ENDIAN_MINI 3377 673 551 xilinx_ep107 MACH_XILINX_EP107 XILINX_EP107 3378 674 552 nuri MACH_NURI NURI 3379 675 - janus MACH_JANUS JANUS 3380 676 - ddnas MACH_DDNAS DDNAS 3381 677 - tag MACH_TAG TAG 3382 678 - tagw MACH_TAGW TAGW 3383 679 - nitrogen_vm_imx51 MACH_NITROGEN_VM_IMX51 NITROGEN_VM_IMX51 3384 680 - viprinet MACH_VIPRINET VIPRINET 3385 681 - bockw MACH_BOCKW BOCKW 3386 682 - eva2000 MACH_EVA2000 EVA2000 3387 683 - steelyard MACH_STEELYARD STEELYARD 3388 684 - nsslsboard MACH_NSSLSBOARD NSSLSBOARD 3392 685 - geneva_b5 MACH_GENEVA_B5 GENEVA_B5 3393 686 - spear1340 MACH_SPEAR1340 SPEAR1340 3394 687 - rexmas MACH_REXMAS REXMAS 3395 688 - msm8960_cdp MACH_MSM8960_CDP MSM8960_CDP 3396 689 - msm8960_fluid MACH_MSM8960_FLUID MSM8960_FLUID 3398 690 - msm8960_apq MACH_MSM8960_APQ MSM8960_APQ 3399 691 - helios_v2 MACH_HELIOS_V2 HELIOS_V2 3400 692 - mif10p MACH_MIF10P MIF10P 3401 693 - iam28 MACH_IAM28 IAM28 3402 694 - picasso MACH_PICASSO PICASSO 3403 695 - mr301a MACH_MR301A MR301A 3404 696 - notle MACH_NOTLE NOTLE 3405 697 - eelx2 MACH_EELX2 EELX2 3406 698 - moon MACH_MOON MOON 3407 699 - ruby MACH_RUBY RUBY 3408 700 - goldengate MACH_GOLDENGATE GOLDENGATE 3409 701 - ctbu_gen2 MACH_CTBU_GEN2 CTBU_GEN2 3410 702 - kmp_am17_01 MACH_KMP_AM17_01 KMP_AM17_01 3411 703 553 wtplug MACH_WTPLUG WTPLUG 3412 704 - mx27su2 MACH_MX27SU2 MX27SU2 3413 705 - nb31 MACH_NB31 NB31 3414 706 - hjsdu MACH_HJSDU HJSDU 3415 707 - td3_rev1 MACH_TD3_REV1 TD3_REV1 3416 708 - eag_ci4000 MACH_EAG_CI4000 EAG_CI4000 3417 709 - net5big_nand_v2 MACH_NET5BIG_NAND_V2 NET5BIG_NAND_V2 3418 710 - cpx2 MACH_CPX2 CPX2 3419 711 - net2big_nand_v2 MACH_NET2BIG_NAND_V2 NET2BIG_NAND_V2 3420 712 - ecuv5 MACH_ECUV5 ECUV5 3421 713 - hsgx6d MACH_HSGX6D HSGX6D 3422 714 - dawad7 MACH_DAWAD7 DAWAD7 3423 715 - sam9repeater MACH_SAM9REPEATER SAM9REPEATER 3424 716 - gt_i5700 MACH_GT_I5700 GT_I5700 3425 717 - ctera_plug_c2 MACH_CTERA_PLUG_C2 CTERA_PLUG_C2 3426 718 - marvelct MACH_MARVELCT MARVELCT 3427 719 - ag11005 MACH_AG11005 AG11005 3428 720 - vangogh MACH_VANGOGH VANGOGH 3430 721 - matrix505 MACH_MATRIX505 MATRIX505 3431 722 - oce_nigma MACH_OCE_NIGMA OCE_NIGMA 3432 723 - t55 MACH_T55 T55 3433 724 - bio3k MACH_BIO3K BIO3K 3434 725 - expressct MACH_EXPRESSCT EXPRESSCT 3435 726 - cardhu MACH_CARDHU CARDHU 3436 727 - aruba MACH_ARUBA ARUBA 3437 728 - bonaire MACH_BONAIRE BONAIRE 3438 729 - nuc700evb MACH_NUC700EVB NUC700EVB 3439 730 - nuc710evb MACH_NUC710EVB NUC710EVB 3440 731 - nuc740evb MACH_NUC740EVB NUC740EVB 3441 732 - nuc745evb MACH_NUC745EVB NUC745EVB 3442 733 - transcede MACH_TRANSCEDE TRANSCEDE 3443 734 - mora MACH_MORA MORA 3444 735 - nda_evm MACH_NDA_EVM NDA_EVM 3445 736 - timu MACH_TIMU TIMU 3446 737 - expressh MACH_EXPRESSH EXPRESSH 3447 738 554 veridis_a300 MACH_VERIDIS_A300 VERIDIS_A300 3448 739 - dm368_leopard MACH_DM368_LEOPARD DM368_LEOPARD 3449 740 - omap_mcop MACH_OMAP_MCOP OMAP_MCOP 3450 741 - tritip MACH_TRITIP TRITIP 3451 742 - sm1k MACH_SM1K SM1K 3452 743 - monch MACH_MONCH MONCH 3453 744 - curacao MACH_CURACAO CURACAO 3454 745 555 origen MACH_ORIGEN ORIGEN 3455 746 - epc10 MACH_EPC10 EPC10 3456 747 - sgh_i740 MACH_SGH_I740 SGH_I740 3457 748 - tuna MACH_TUNA TUNA 3458 749 - mx51_tulip MACH_MX51_TULIP MX51_TULIP 3459 750 - mx51_aster7 MACH_MX51_ASTER7 MX51_ASTER7 3460 751 - acro37xbrd MACH_ACRO37XBRD ACRO37XBRD 3461 752 - elke MACH_ELKE ELKE 3462 753 - sbc6000x MACH_SBC6000X SBC6000X 3463 754 - r1801e MACH_R1801E R1801E 3464 755 - h1600 MACH_H1600 H1600 3465 756 - mini210 MACH_MINI210 MINI210 3466 757 - mini8168 MACH_MINI8168 MINI8168 3467 758 - pc7308 MACH_PC7308 PC7308 3468 759 - kmm2m01 MACH_KMM2M01 KMM2M01 3470 760 - mx51erebus MACH_MX51EREBUS MX51EREBUS 3471 761 556 wm8650refboard MACH_WM8650REFBOARD WM8650REFBOARD 3472 762 - tuxrail MACH_TUXRAIL TUXRAIL 3473 763 - arthur MACH_ARTHUR ARTHUR 3474 764 - doorboy MACH_DOORBOY DOORBOY 3475 765 557 xarina MACH_XARINA XARINA 3476 766 - roverx7 MACH_ROVERX7 ROVERX7 3477 767 558 sdvr MACH_SDVR SDVR 3478 768 559 acer_maya MACH_ACER_MAYA ACER_MAYA 3479 769 560 pico MACH_PICO PICO 3480 ··· 770 999 amp MACH_AMP AMP 3709 771 1000 gnet_amp MACH_GNET_AMP GNET_AMP 3710 772 1001 toques MACH_TOQUES TOQUES 3711 1002 + apx4devkit MACH_APX4DEVKIT APX4DEVKIT 3712 773 1003 dct_storm MACH_DCT_STORM DCT_STORM 3713 774 1004 owl MACH_OWL OWL 3715 775 1005 cogent_csb1741 MACH_COGENT_CSB1741 COGENT_CSB1741 3716 ··· 835 1063 omap3_devkit8500 MACH_OMAP3_DEVKIT8500 OMAP3_DEVKIT8500 3779 836 1064 edgetd MACH_EDGETD EDGETD 3780 837 1065 copperyard MACH_COPPERYARD COPPERYARD 3781 838 - edge MACH_EDGE EDGE 3782 839 1066 edge_u MACH_EDGE_U EDGE_U 3783 840 1067 edge_td MACH_EDGE_TD EDGE_TD 3784 841 1068 wdss MACH_WDSS WDSS 3785 ··· 940 1169 pov2 MACH_POV2 POV2 3889 941 1170 ipod_touch_2g MACH_IPOD_TOUCH_2G IPOD_TOUCH_2G 3890 942 1171 da850_pqab MACH_DA850_PQAB DA850_PQAB 3891 1172 + fermi MACH_FERMI FERMI 3892 1173 + ccardwmx28 MACH_CCARDWMX28 CCARDWMX28 3893 1174 + ccardmx28 MACH_CCARDMX28 CCARDMX28 3894 1175 + fs20_fcm2050 MACH_FS20_FCM2050 FS20_FCM2050 3895 1176 + kinetis MACH_KINETIS KINETIS 3896 1177 + kai MACH_KAI KAI 3897 1178 + bcthb2 MACH_BCTHB2 BCTHB2 3898 1179 + inels3_cu MACH_INELS3_CU INELS3_CU 3899 1180 + da850_apollo MACH_DA850_APOLLO DA850_APOLLO 3901 1181 + tracnas MACH_TRACNAS TRACNAS 3902 1182 + mityarm335x MACH_MITYARM335X MITYARM335X 3903 1183 + xcgz7x MACH_XCGZ7X XCGZ7X 3904 1184 + cubox MACH_CUBOX CUBOX 3905 1185 + terminator MACH_TERMINATOR TERMINATOR 3906 1186 + eye03 MACH_EYE03 EYE03 3907 1187 + kota3 MACH_KOTA3 KOTA3 3908 1188 + pscpe MACH_PSCPE PSCPE 3910 1189 + akt1100 MACH_AKT1100 AKT1100 3911 1190 + pcaaxl2 MACH_PCAAXL2 PCAAXL2 3912 1191 + primodd_ct MACH_PRIMODD_CT PRIMODD_CT 3913 1192 + nsbc MACH_NSBC NSBC 3914 1193 + meson2_skt MACH_MESON2_SKT MESON2_SKT 3915 1194 + meson2_ref MACH_MESON2_REF MESON2_REF 3916 1195 + ccardwmx28js MACH_CCARDWMX28JS CCARDWMX28JS 3917 1196 + ccardmx28js MACH_CCARDMX28JS CCARDMX28JS 3918 1197 + indico MACH_INDICO INDICO 3919 1198 + msm8960dt MACH_MSM8960DT MSM8960DT 3920 1199 + primods MACH_PRIMODS PRIMODS 3921 1200 + beluga_m1388 MACH_BELUGA_M1388 BELUGA_M1388 3922 1201 + primotd MACH_PRIMOTD PRIMOTD 3923 1202 + varan_master MACH_VARAN_MASTER VARAN_MASTER 3924 1203 + primodd MACH_PRIMODD PRIMODD 3925 1204 + jetduo MACH_JETDUO JETDUO 3926 1205 + mx53_umobo MACH_MX53_UMOBO MX53_UMOBO 3927 1206 + trats MACH_TRATS TRATS 3928 1207 + starcraft MACH_STARCRAFT STARCRAFT 3929 1208 + qseven_tegra2 MACH_QSEVEN_TEGRA2 QSEVEN_TEGRA2 3930 1209 + lichee_sun4i_devbd MACH_LICHEE_SUN4I_DEVBD LICHEE_SUN4I_DEVBD 3931 1210 + movenow MACH_MOVENOW MOVENOW 3932 1211 + golf_u MACH_GOLF_U GOLF_U 3933 1212 + msm7627a_evb MACH_MSM7627A_EVB MSM7627A_EVB 3934 1213 + rambo MACH_RAMBO RAMBO 3935 1214 + golfu MACH_GOLFU GOLFU 3936 1215 + mango310 MACH_MANGO310 MANGO310 3937 1216 + dns343 MACH_DNS343 DNS343 3938 1217 + var_som_om44 MACH_VAR_SOM_OM44 VAR_SOM_OM44 3939 1218 + naon MACH_NAON NAON 3940 1219 + vp4000 MACH_VP4000 VP4000 3941 1220 + impcard MACH_IMPCARD IMPCARD 3942 1221 + smoovcam MACH_SMOOVCAM SMOOVCAM 3943 1222 + cobham3725 MACH_COBHAM3725 COBHAM3725 3944 1223 + cobham3730 MACH_COBHAM3730 COBHAM3730 3945 1224 + cobham3703 MACH_COBHAM3703 COBHAM3703 3946 1225 + quetzal MACH_QUETZAL QUETZAL 3947 1226 + apq8064_cdp MACH_APQ8064_CDP APQ8064_CDP 3948 1227 + apq8064_mtp MACH_APQ8064_MTP APQ8064_MTP 3949 1228 + apq8064_fluid MACH_APQ8064_FLUID APQ8064_FLUID 3950 1229 + apq8064_liquid MACH_APQ8064_LIQUID APQ8064_LIQUID 3951 1230 + mango210 MACH_MANGO210 MANGO210 3952 1231 + mango100 MACH_MANGO100 MANGO100 3953 1232 + mango24 MACH_MANGO24 MANGO24 3954 1233 + mango64 MACH_MANGO64 MANGO64 3955 1234 + nsa320 MACH_NSA320 NSA320 3956 1235 + elv_ccu2 MACH_ELV_CCU2 ELV_CCU2 3957 1236 + triton_x00 MACH_TRITON_X00 TRITON_X00 3958 1237 + triton_1500_2000 MACH_TRITON_1500_2000 TRITON_1500_2000 3959 1238 + pogoplugv4 MACH_POGOPLUGV4 POGOPLUGV4 3960 1239 + venus_cl MACH_VENUS_CL VENUS_CL 3961 1240 + vulcano_g20 MACH_VULCANO_G20 VULCANO_G20 3962 1241 + sgs_i9100 MACH_SGS_I9100 SGS_I9100 3963 1242 + stsv2 MACH_STSV2 STSV2 3964 1243 + csb1724 MACH_CSB1724 CSB1724 3965 1244 + omapl138_lcdk MACH_OMAPL138_LCDK OMAPL138_LCDK 3966 1245 + pvd_mx25 MACH_PVD_MX25 PVD_MX25 3968 1246 + meson6_skt MACH_MESON6_SKT MESON6_SKT 3969 1247 + meson6_ref MACH_MESON6_REF MESON6_REF 3970 1248 + pxm MACH_PXM PXM 3971 1249 + pogoplugv3 MACH_POGOPLUGV3 POGOPLUGV3 3973 1250 + mlp89626 MACH_MLP89626 MLP89626 3974 1251 + iomegahmndce MACH_IOMEGAHMNDCE IOMEGAHMNDCE 3975 1252 + pogoplugv3pci MACH_POGOPLUGV3PCI POGOPLUGV3PCI 3976 1253 + bntv250 MACH_BNTV250 BNTV250 3977 1254 + mx53_qseven MACH_MX53_QSEVEN MX53_QSEVEN 3978 1255 + gtl_it1100 MACH_GTL_IT1100 GTL_IT1100 3979 1256 + mx6q_sabresd MACH_MX6Q_SABRESD MX6Q_SABRESD 3980 1257 + mt4 MACH_MT4 MT4 3981 1258 + jumbo_d MACH_JUMBO_D JUMBO_D 3982 1259 + jumbo_i MACH_JUMBO_I JUMBO_I 3983 1260 + fs20_dmp MACH_FS20_DMP FS20_DMP 3984 1261 + dns320 MACH_DNS320 DNS320 3985 1262 + mx28bacos MACH_MX28BACOS MX28BACOS 3986 1263 + tl80 MACH_TL80 TL80 3987 1264 + polatis_nic_1001 MACH_POLATIS_NIC_1001 POLATIS_NIC_1001 3988 1265 + tely MACH_TELY TELY 3989 1266 + u8520 MACH_U8520 U8520 3990 1267 + manta MACH_MANTA MANTA 3991 1268 + mpq8064_cdp MACH_MPQ8064_CDP MPQ8064_CDP 3993 1269 + mpq8064_dtv MACH_MPQ8064_DTV MPQ8064_DTV 3995 1270 + dm368som MACH_DM368SOM DM368SOM 3996 1271 + gprisb2 MACH_GPRISB2 GPRISB2 3997 1272 + chammid MACH_CHAMMID CHAMMID 3998 1273 + seoul2 MACH_SEOUL2 SEOUL2 3999 1274 + omap4_nooktablet MACH_OMAP4_NOOKTABLET OMAP4_NOOKTABLET 4000 1275 + aalto MACH_AALTO AALTO 4001 1276 + metro MACH_METRO METRO 4002 1277 + cydm3730 MACH_CYDM3730 CYDM3730 4003 1278 + tqma53 MACH_TQMA53 TQMA53 4004 1279 + msm7627a_qrd3 MACH_MSM7627A_QRD3 MSM7627A_QRD3 4005 1280 + mx28_canby MACH_MX28_CANBY MX28_CANBY 4006 1281 + tiger MACH_TIGER TIGER 4007 1282 + pcats_9307_type_a MACH_PCATS_9307_TYPE_A PCATS_9307_TYPE_A 4008 1283 + pcats_9307_type_o MACH_PCATS_9307_TYPE_O PCATS_9307_TYPE_O 4009 1284 + pcats_9307_type_r MACH_PCATS_9307_TYPE_R PCATS_9307_TYPE_R 4010 1285 + streamplug MACH_STREAMPLUG STREAMPLUG 4011 1286 + icechicken_dev MACH_ICECHICKEN_DEV ICECHICKEN_DEV 4012 1287 + hedgehog MACH_HEDGEHOG HEDGEHOG 4013 1288 + yusend_obc MACH_YUSEND_OBC YUSEND_OBC 4014 1289 + imxninja MACH_IMXNINJA IMXNINJA 4015 1290 + omap4_jarod MACH_OMAP4_JAROD OMAP4_JAROD 4016 1291 + eco5_pk MACH_ECO5_PK ECO5_PK 4017 1292 + qj2440 MACH_QJ2440 QJ2440 4018 1293 + mx6q_mercury MACH_MX6Q_MERCURY MX6Q_MERCURY 4019 1294 + cm6810 MACH_CM6810 CM6810 4020 1295 + omap4_torpedo MACH_OMAP4_TORPEDO OMAP4_TORPEDO 4021 1296 + nsa310 MACH_NSA310 NSA310 4022 1297 + tmx536 MACH_TMX536 TMX536 4023 1298 + ktt20 MACH_KTT20 KTT20 4024 1299 + dragonix MACH_DRAGONIX DRAGONIX 4025 1300 + lungching MACH_LUNGCHING LUNGCHING 4026 1301 + bulogics MACH_BULOGICS BULOGICS 4027 1302 + mx535_sx MACH_MX535_SX MX535_SX 4028 1303 + ngui3250 MACH_NGUI3250 NGUI3250 4029 1304 + salutec_dac MACH_SALUTEC_DAC SALUTEC_DAC 4030 1305 + loco MACH_LOCO LOCO 4031 1306 + ctera_plug_usi MACH_CTERA_PLUG_USI CTERA_PLUG_USI 4032 1307 + scepter MACH_SCEPTER SCEPTER 4033 1308 + sga MACH_SGA SGA 4034 1309 + p_81_j5 MACH_P_81_J5 P_81_J5 4035 1310 + p_81_o4 MACH_P_81_O4 P_81_O4 4036 1311 + msm8625_surf MACH_MSM8625_SURF MSM8625_SURF 4037 1312 + carallon_shark MACH_CARALLON_SHARK CARALLON_SHARK 4038 1313 + ordog MACH_ORDOG ORDOG 4040 1314 + puente_io MACH_PUENTE_IO PUENTE_IO 4041 1315 + msm8625_evb MACH_MSM8625_EVB MSM8625_EVB 4042 1316 + ev_am1707 MACH_EV_AM1707 EV_AM1707 4043 1317 + ev_am1707e2 MACH_EV_AM1707E2 EV_AM1707E2 4044 1318 + ev_am3517e2 MACH_EV_AM3517E2 EV_AM3517E2 4045 1319 + calabria MACH_CALABRIA CALABRIA 4046 1320 + ev_imx287 MACH_EV_IMX287 EV_IMX287 4047 1321 + erau MACH_ERAU ERAU 4048 1322 + sichuan MACH_SICHUAN SICHUAN 4049 1323 + davinci_da850 MACH_DAVINCI_DA850 DAVINCI_DA850 4051 1324 + omap138_trunarc MACH_OMAP138_TRUNARC OMAP138_TRUNARC 4052 1325 + bcm4761 MACH_BCM4761 BCM4761 4053 1326 + picasso_e2 MACH_PICASSO_E2 PICASSO_E2 4054 1327 + picasso_mf MACH_PICASSO_MF PICASSO_MF 4055 1328 + miro MACH_MIRO MIRO 4056 1329 + at91sam9g20ewon3 MACH_AT91SAM9G20EWON3 AT91SAM9G20EWON3 4057 1330 + yoyo MACH_YOYO YOYO 4058 1331 + windjkl MACH_WINDJKL WINDJKL 4059 1332 + monarudo MACH_MONARUDO MONARUDO 4060 1333 + batan MACH_BATAN BATAN 4061 1334 + tadao MACH_TADAO TADAO 4062 1335 + baso MACH_BASO BASO 4063 1336 + mahon MACH_MAHON MAHON 4064 1337 + villec2 MACH_VILLEC2 VILLEC2 4065 1338 + asi1230 MACH_ASI1230 ASI1230 4066 1339 + alaska MACH_ALASKA ALASKA 4067 1340 + swarco_shdsl2 MACH_SWARCO_SHDSL2 SWARCO_SHDSL2 4068 1341 + oxrtu MACH_OXRTU OXRTU 4069 1342 + omap5_panda MACH_OMAP5_PANDA OMAP5_PANDA 4070 1343 + c8000 MACH_C8000 C8000 4072 1344 + bje_display3_5 MACH_BJE_DISPLAY3_5 BJE_DISPLAY3_5 4073 1345 + picomod7 MACH_PICOMOD7 PICOMOD7 4074 1346 + picocom5 MACH_PICOCOM5 PICOCOM5 4075 1347 + qblissa8 MACH_QBLISSA8 QBLISSA8 4076 1348 + armstonea8 MACH_ARMSTONEA8 ARMSTONEA8 4077 1349 + netdcu14 MACH_NETDCU14 NETDCU14 4078 1350 + at91sam9x5_epiphan MACH_AT91SAM9X5_EPIPHAN AT91SAM9X5_EPIPHAN 4079 1351 + p2u MACH_P2U P2U 4080 1352 + doris MACH_DORIS DORIS 4081 1353 + j49 MACH_J49 J49 4082 1354 + vdss2e MACH_VDSS2E VDSS2E 4083 1355 + vc300 MACH_VC300 VC300 4084 1356 + ns115_pad_test MACH_NS115_PAD_TEST NS115_PAD_TEST 4085 1357 + ns115_pad_ref MACH_NS115_PAD_REF NS115_PAD_REF 4086 1358 + ns115_phone_test MACH_NS115_PHONE_TEST NS115_PHONE_TEST 4087 1359 + ns115_phone_ref MACH_NS115_PHONE_REF NS115_PHONE_REF 4088 1360 + golfc MACH_GOLFC GOLFC 4089 1361 + xerox_olympus MACH_XEROX_OLYMPUS XEROX_OLYMPUS 4090 1362 + mx6sl_arm2 MACH_MX6SL_ARM2 MX6SL_ARM2 4091 1363 + csb1701_csb1726 MACH_CSB1701_CSB1726 CSB1701_CSB1726 4092 1364 + at91sam9xeek MACH_AT91SAM9XEEK AT91SAM9XEEK 4093 1365 + ebv210 MACH_EBV210 EBV210 4094 1366 + msm7627a_qrd7 MACH_MSM7627A_QRD7 MSM7627A_QRD7 4095 1367 + svthin MACH_SVTHIN SVTHIN 4096 1368 + duovero MACH_DUOVERO DUOVERO 4097 1369 + chupacabra MACH_CHUPACABRA CHUPACABRA 4098 1370 + scorpion MACH_SCORPION SCORPION 4099 1371 + davinci_he_hmi10 MACH_DAVINCI_HE_HMI10 DAVINCI_HE_HMI10 4100 1372 + topkick MACH_TOPKICK TOPKICK 4101 1373 + m3_auguestrush MACH_M3_AUGUESTRUSH M3_AUGUESTRUSH 4102 1374 + ipc335x MACH_IPC335X IPC335X 4103 1375 + sun4i MACH_SUN4I SUN4I 4104 1376 + imx233_olinuxino MACH_IMX233_OLINUXINO IMX233_OLINUXINO 4105 1377 + k2_wl MACH_K2_WL K2_WL 4106 1378 + k2_ul MACH_K2_UL K2_UL 4107 1379 + k2_cl MACH_K2_CL K2_CL 4108 1380 + minbari_w MACH_MINBARI_W MINBARI_W 4109 1381 + minbari_m MACH_MINBARI_M MINBARI_M 4110 1382 + k035 MACH_K035 K035 4111 1383 + ariel MACH_ARIEL ARIEL 4112 1384 + arielsaarc MACH_ARIELSAARC ARIELSAARC 4113 1385 + arieldkb MACH_ARIELDKB ARIELDKB 4114 1386 + armadillo810 MACH_ARMADILLO810 ARMADILLO810 4115 1387 + tam335x MACH_TAM335X TAM335X 4116 1388 + grouper MACH_GROUPER GROUPER 4117 1389 + mpcsa21_9g20 MACH_MPCSA21_9G20 MPCSA21_9G20 4118 1390 + m6u_cpu MACH_M6U_CPU M6U_CPU 4119 1391 + davinci_dp10 MACH_DAVINCI_DP10 DAVINCI_DP10 4120 1392 + ginkgo MACH_GINKGO GINKGO 4121 1393 + cgt_qmx6 MACH_CGT_QMX6 CGT_QMX6 4122 1394 + profpga MACH_PROFPGA PROFPGA 4123 1395 + acfx100oc MACH_ACFX100OC ACFX100OC 4124 1396 + acfx100nb MACH_ACFX100NB ACFX100NB 4125 1397 + capricorn MACH_CAPRICORN CAPRICORN 4126 1398 + pisces MACH_PISCES PISCES 4127 1399 + aries MACH_ARIES ARIES 4128 1400 + cancer MACH_CANCER CANCER 4129 1401 + leo MACH_LEO LEO 4130 1402 + virgo MACH_VIRGO VIRGO 4131 1403 + sagittarius MACH_SAGITTARIUS SAGITTARIUS 4132 1404 + devil MACH_DEVIL DEVIL 4133 1405 + ballantines MACH_BALLANTINES BALLANTINES 4134 1406 + omap3_procerusvpu MACH_OMAP3_PROCERUSVPU OMAP3_PROCERUSVPU 4135 1407 + my27 MACH_MY27 MY27 4136 1408 + sun6i MACH_SUN6I SUN6I 4137 1409 + sun5i MACH_SUN5I SUN5I 4138 1410 + mx512_mx MACH_MX512_MX MX512_MX 4139 1411 + kzm9g MACH_KZM9G KZM9G 4140 1412 + vdstbn MACH_VDSTBN VDSTBN 4141 1413 + cfa10036 MACH_CFA10036 CFA10036 4142 1414 + cfa10049 MACH_CFA10049 CFA10049 4143 1415 + pcm051 MACH_PCM051 PCM051 4144 1416 + vybrid_vf7xx MACH_VYBRID_VF7XX VYBRID_VF7XX 4145 1417 + vybrid_vf6xx MACH_VYBRID_VF6XX VYBRID_VF6XX 4146 1418 + vybrid_vf5xx MACH_VYBRID_VF5XX VYBRID_VF5XX 4147 1419 + vybrid_vf4xx MACH_VYBRID_VF4XX VYBRID_VF4XX 4148 1420 + aria_g25 MACH_ARIA_G25 ARIA_G25 4149 1421 + bcm21553 MACH_BCM21553 BCM21553 4150 1422 + smdk5410 MACH_SMDK5410 SMDK5410 4151 1423 + lpc18xx MACH_LPC18XX LPC18XX 4152 1424 + oratisparty MACH_ORATISPARTY ORATISPARTY 4153 1425 + qseven MACH_QSEVEN QSEVEN 4154 1426 + gmv_generic MACH_GMV_GENERIC GMV_GENERIC 4155 1427 + th_link_eth MACH_TH_LINK_ETH TH_LINK_ETH 4156 1428 + tn_muninn MACH_TN_MUNINN TN_MUNINN 4157 1429 + rampage MACH_RAMPAGE RAMPAGE 4158 1430 + visstrim_mv10 MACH_VISSTRIM_MV10 VISSTRIM_MV10 4159 1431 + mx28_wilma MACH_MX28_WILMA MX28_WILMA 4164 1432 + msm8625_ffa MACH_MSM8625_FFA MSM8625_FFA 4166 1433 + vpu101 MACH_VPU101 VPU101 4167 1434 + baileys MACH_BAILEYS BAILEYS 4169 1435 + familybox MACH_FAMILYBOX FAMILYBOX 4170 1436 + ensemble_mx35 MACH_ENSEMBLE_MX35 ENSEMBLE_MX35 4171 1437 + sc_sps_1 MACH_SC_SPS_1 SC_SPS_1 4172
+8 -8
arch/arm/vfp/vfpmodule.c
··· 241 241 { 242 242 int i; 243 243 244 - printk(KERN_ERR "VFP: Error: %s\n", reason); 245 - printk(KERN_ERR "VFP: EXC 0x%08x SCR 0x%08x INST 0x%08x\n", 244 + pr_err("VFP: Error: %s\n", reason); 245 + pr_err("VFP: EXC 0x%08x SCR 0x%08x INST 0x%08x\n", 246 246 fmrx(FPEXC), fmrx(FPSCR), inst); 247 247 for (i = 0; i < 32; i += 2) 248 - printk(KERN_ERR "VFP: s%2u: 0x%08x s%2u: 0x%08x\n", 248 + pr_err("VFP: s%2u: 0x%08x s%2u: 0x%08x\n", 249 249 i, vfp_get_float(i), i+1, vfp_get_float(i+1)); 250 250 } 251 251 ··· 452 452 453 453 /* if vfp is on, then save state for resumption */ 454 454 if (fpexc & FPEXC_EN) { 455 - printk(KERN_DEBUG "%s: saving vfp state\n", __func__); 455 + pr_debug("%s: saving vfp state\n", __func__); 456 456 vfp_save_state(&ti->vfpstate, fpexc); 457 457 458 458 /* disable, just in case */ ··· 664 664 barrier(); 665 665 vfp_vector = vfp_null_entry; 666 666 667 - printk(KERN_INFO "VFP support v0.3: "); 667 + pr_info("VFP support v0.3: "); 668 668 if (VFP_arch) 669 - printk("not present\n"); 669 + pr_cont("not present\n"); 670 670 else if (vfpsid & FPSID_NODOUBLE) { 671 - printk("no double precision support\n"); 671 + pr_cont("no double precision support\n"); 672 672 } else { 673 673 hotcpu_notifier(vfp_hotplug, 0); 674 674 675 675 VFP_arch = (vfpsid & FPSID_ARCH_MASK) >> FPSID_ARCH_BIT; /* Extract the architecture version */ 676 - printk("implementor %02x architecture %d part %02x variant %x rev %x\n", 676 + pr_cont("implementor %02x architecture %d part %02x variant %x rev %x\n", 677 677 (vfpsid & FPSID_IMPLEMENTER_MASK) >> FPSID_IMPLEMENTER_BIT, 678 678 (vfpsid & FPSID_ARCH_MASK) >> FPSID_ARCH_BIT, 679 679 (vfpsid & FPSID_PART_MASK) >> FPSID_PART_BIT,
+51 -2
drivers/amba/bus.c
··· 527 527 if (ret) 528 528 goto err_release; 529 529 530 - if (dev->irq[0] && dev->irq[0] != NO_IRQ) 530 + if (dev->irq[0]) 531 531 ret = device_create_file(&dev->dev, &dev_attr_irq0); 532 - if (ret == 0 && dev->irq[1] && dev->irq[1] != NO_IRQ) 532 + if (ret == 0 && dev->irq[1]) 533 533 ret = device_create_file(&dev->dev, &dev_attr_irq1); 534 534 if (ret == 0) 535 535 return ret; ··· 542 542 return ret; 543 543 } 544 544 EXPORT_SYMBOL_GPL(amba_device_add); 545 + 546 + static struct amba_device * 547 + amba_aphb_device_add(struct device *parent, const char *name, 548 + resource_size_t base, size_t size, int irq1, int irq2, 549 + void *pdata, unsigned int periphid, u64 dma_mask) 550 + { 551 + struct amba_device *dev; 552 + int ret; 553 + 554 + dev = amba_device_alloc(name, base, size); 555 + if (!dev) 556 + return ERR_PTR(-ENOMEM); 557 + 558 + dev->dma_mask = dma_mask; 559 + dev->dev.coherent_dma_mask = dma_mask; 560 + dev->irq[0] = irq1; 561 + dev->irq[1] = irq2; 562 + dev->periphid = periphid; 563 + dev->dev.platform_data = pdata; 564 + dev->dev.parent = parent; 565 + 566 + ret = amba_device_add(dev, &iomem_resource); 567 + if (ret) { 568 + amba_device_put(dev); 569 + return ERR_PTR(ret); 570 + } 571 + 572 + return dev; 573 + } 574 + 575 + struct amba_device * 576 + amba_apb_device_add(struct device *parent, const char *name, 577 + resource_size_t base, size_t size, int irq1, int irq2, 578 + void *pdata, unsigned int periphid) 579 + { 580 + return amba_aphb_device_add(parent, name, base, size, irq1, irq2, pdata, 581 + periphid, 0); 582 + } 583 + EXPORT_SYMBOL_GPL(amba_apb_device_add); 584 + 585 + struct amba_device * 586 + amba_ahb_device_add(struct device *parent, const char *name, 587 + resource_size_t base, size_t size, int irq1, int irq2, 588 + void *pdata, unsigned int periphid) 589 + { 590 + return amba_aphb_device_add(parent, name, base, size, irq1, irq2, pdata, 591 + periphid, ~0ULL); 592 + } 593 + EXPORT_SYMBOL_GPL(amba_ahb_device_add); 545 594 546 595 static void amba_device_initialize(struct amba_device *dev, const char *name) 547 596 {
+17 -1
drivers/mmc/host/mmci.c
··· 94 94 .signal_direction = true, 95 95 }; 96 96 97 + static struct variant_data variant_nomadik = { 98 + .fifosize = 16 * 4, 99 + .fifohalfsize = 8 * 4, 100 + .clkreg = MCI_CLK_ENABLE, 101 + .datalength_bits = 24, 102 + .sdio = true, 103 + .st_clkdiv = true, 104 + .pwrreg_powerup = MCI_PWR_ON, 105 + .signal_direction = true, 106 + }; 107 + 97 108 static struct variant_data variant_ux500 = { 98 109 .fifosize = 30 * 4, 99 110 .fifohalfsize = 8 * 4, ··· 1408 1397 if (ret) 1409 1398 goto unmap; 1410 1399 1411 - if (dev->irq[1] == NO_IRQ || !dev->irq[1]) 1400 + if (!dev->irq[1]) 1412 1401 host->singleirq = true; 1413 1402 else { 1414 1403 ret = request_irq(dev->irq[1], mmci_pio_irq, IRQF_SHARED, ··· 1578 1567 .id = 0x00180180, 1579 1568 .mask = 0x00ffffff, 1580 1569 .data = &variant_u300, 1570 + }, 1571 + { 1572 + .id = 0x10180180, 1573 + .mask = 0xf0ffffff, 1574 + .data = &variant_nomadik, 1581 1575 }, 1582 1576 { 1583 1577 .id = 0x00280180,
+8
include/linux/amba/bus.h
··· 63 63 void amba_device_put(struct amba_device *); 64 64 int amba_device_add(struct amba_device *, struct resource *); 65 65 int amba_device_register(struct amba_device *, struct resource *); 66 + struct amba_device *amba_apb_device_add(struct device *parent, const char *name, 67 + resource_size_t base, size_t size, 68 + int irq1, int irq2, void *pdata, 69 + unsigned int periphid); 70 + struct amba_device *amba_ahb_device_add(struct device *parent, const char *name, 71 + resource_size_t base, size_t size, 72 + int irq1, int irq2, void *pdata, 73 + unsigned int periphid); 66 74 void amba_device_unregister(struct amba_device *); 67 75 struct amba_device *amba_find_device(const char *, struct device *, unsigned int, unsigned int); 68 76 int amba_request_regions(struct amba_device *, const char *);