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

Merge branch 'devel-stable' into for-linus

Conflicts:
arch/arm/kernel/setup.c
arch/arm/mach-shmobile/board-kota2.c

+3461 -4216
+5 -6
Documentation/arm/memory.txt
··· 51 51 ff000000 ffbfffff Reserved for future expansion of DMA 52 52 mapping region. 53 53 54 - VMALLOC_END feffffff Free for platform use, recommended. 55 - VMALLOC_END must be aligned to a 2MB 56 - boundary. 57 - 58 54 VMALLOC_START VMALLOC_END-1 vmalloc() / ioremap() space. 59 55 Memory returned by vmalloc/ioremap will 60 56 be dynamically placed in this region. 61 - VMALLOC_START may be based upon the value 62 - of the high_memory variable. 57 + Machine specific static mappings are also 58 + located here through iotable_init(). 59 + VMALLOC_START is based upon the value 60 + of the high_memory variable, and VMALLOC_END 61 + is equal to 0xff000000. 63 62 64 63 PAGE_OFFSET high_memory-1 Kernel direct-mapped RAM region. 65 64 This maps the platforms RAM, and typically
+4
Documentation/devicetree/bindings/arm/gic.txt
··· 42 42 - interrupts : Interrupt source of the parent interrupt controller. Only 43 43 present on secondary GICs. 44 44 45 + - cpu-offset : per-cpu offset within the distributor and cpu interface 46 + regions, used when the GIC doesn't have banked registers. The offset is 47 + cpu-offset * cpu-nr. 48 + 45 49 Example: 46 50 47 51 intc: interrupt-controller@fff11000 {
+29
Documentation/devicetree/bindings/arm/vic.txt
··· 1 + * ARM Vectored Interrupt Controller 2 + 3 + One or more Vectored Interrupt Controllers (VIC's) can be connected in an ARM 4 + system for interrupt routing. For multiple controllers they can either be 5 + nested or have the outputs wire-OR'd together. 6 + 7 + Required properties: 8 + 9 + - compatible : should be one of 10 + "arm,pl190-vic" 11 + "arm,pl192-vic" 12 + - interrupt-controller : Identifies the node as an interrupt controller 13 + - #interrupt-cells : The number of cells to define the interrupts. Must be 1 as 14 + the VIC has no configuration options for interrupt sources. The cell is a u32 15 + and defines the interrupt number. 16 + - reg : The register bank for the VIC. 17 + 18 + Optional properties: 19 + 20 + - interrupts : Interrupt source for parent controllers if the VIC is nested. 21 + 22 + Example: 23 + 24 + vic0: interrupt-controller@60000 { 25 + compatible = "arm,pl192-vic"; 26 + interrupt-controller; 27 + #interrupt-cells = <1>; 28 + reg = <0x60000 0x1000>; 29 + };
+24 -6
arch/arm/Kconfig
··· 342 342 select ARM_AMBA 343 343 select ARM_GIC 344 344 select ARM_TIMER_SP804 345 + select CACHE_L2X0 345 346 select CLKDEV_LOOKUP 346 347 select CPU_V7 347 348 select GENERIC_CLOCKEVENTS 348 349 select HAVE_ARM_SCU 350 + select HAVE_SMP 349 351 select USE_OF 350 352 help 351 353 Support for the Calxeda Highbank SoC based boards. ··· 365 363 select CPU_V6K 366 364 select GENERIC_CLOCKEVENTS 367 365 select ARM_GIC 366 + select MIGHT_HAVE_CACHE_L2X0 368 367 select MIGHT_HAVE_PCI 369 368 select PCI_DOMAINS if PCI 370 369 help ··· 386 383 select GENERIC_CLOCKEVENTS 387 384 select CLKDEV_LOOKUP 388 385 select GENERIC_IRQ_CHIP 386 + select MIGHT_HAVE_CACHE_L2X0 389 387 select USE_OF 390 388 select ZONE_DMA 391 389 help ··· 639 635 select GENERIC_GPIO 640 636 select HAVE_CLK 641 637 select HAVE_SCHED_CLOCK 638 + select HAVE_SMP 639 + select MIGHT_HAVE_CACHE_L2X0 642 640 select ARCH_HAS_CPUFREQ 643 641 help 644 642 This enables support for NVIDIA Tegra based systems (Tegra APX, ··· 710 704 select HAVE_CLK 711 705 select CLKDEV_LOOKUP 712 706 select HAVE_MACH_CLKDEV 707 + select HAVE_SMP 713 708 select GENERIC_CLOCKEVENTS 709 + select MIGHT_HAVE_CACHE_L2X0 714 710 select NO_IOPORT 715 711 select SPARSE_IRQ 716 712 select MULTI_IRQ_HANDLER ··· 914 906 select CLKDEV_LOOKUP 915 907 select ARCH_REQUIRE_GPIOLIB 916 908 select ARCH_HAS_CPUFREQ 909 + select HAVE_SMP 910 + select MIGHT_HAVE_CACHE_L2X0 917 911 help 918 912 Support for ST-Ericsson's Ux500 architecture 919 913 ··· 926 916 select CPU_ARM926T 927 917 select CLKDEV_LOOKUP 928 918 select GENERIC_CLOCKEVENTS 919 + select MIGHT_HAVE_CACHE_L2X0 929 920 select ARCH_REQUIRE_GPIOLIB 930 921 help 931 922 Support for the Nomadik platform by ST-Ericsson ··· 986 975 select ARM_GIC 987 976 select ARM_AMBA 988 977 select ICST 978 + select MIGHT_HAVE_CACHE_L2X0 989 979 select USE_OF 990 980 help 991 981 Support for Xilinx Zynq ARM Cortex A9 Platform ··· 1453 1441 1454 1442 source "kernel/time/Kconfig" 1455 1443 1444 + config HAVE_SMP 1445 + bool 1446 + help 1447 + This option should be selected by machines which have an SMP- 1448 + capable CPU. 1449 + 1450 + The only effect of this option is to make the SMP-related 1451 + options available to the user for configuration. 1452 + 1456 1453 config SMP 1457 1454 bool "Symmetric Multi-Processing" 1458 1455 depends on CPU_V6K || CPU_V7 1459 1456 depends on GENERIC_CLOCKEVENTS 1460 - depends on REALVIEW_EB_ARM11MP || REALVIEW_EB_A9MP || \ 1461 - MACH_REALVIEW_PB11MP || MACH_REALVIEW_PBX || ARCH_OMAP4 || \ 1462 - ARCH_EXYNOS4 || ARCH_TEGRA || ARCH_U8500 || ARCH_VEXPRESS_CA9X4 || \ 1463 - ARCH_MSM_SCORPIONMP || ARCH_SHMOBILE || ARCH_HIGHBANK || SOC_IMX6Q 1457 + depends on HAVE_SMP 1464 1458 depends on MMU 1465 1459 select USE_GENERIC_SMP_HELPERS 1466 1460 select HAVE_ARM_SCU if !ARCH_MSM_SCORPIONMP ··· 2006 1988 2007 1989 config XIP_KERNEL 2008 1990 bool "Kernel Execute-In-Place from ROM" 2009 - depends on !ZBOOT_ROM 1991 + depends on !ZBOOT_ROM && !ARM_LPAE 2010 1992 help 2011 1993 Execute-In-Place allows the kernel to run from non-volatile storage 2012 1994 directly addressable by the CPU, such as NOR flash. This saves RAM ··· 2036 2018 2037 2019 config KEXEC 2038 2020 bool "Kexec system call (EXPERIMENTAL)" 2039 - depends on EXPERIMENTAL 2021 + depends on EXPERIMENTAL && (!SMP || HOTPLUG_CPU) 2040 2022 help 2041 2023 kexec is a system call that implements the ability to shutdown your 2042 2024 current kernel, and to start another kernel. It is like a reboot
+1
arch/arm/boot/compressed/head.S
··· 659 659 mcrne p15, 0, r3, c2, c0, 0 @ load page table pointer 660 660 mcrne p15, 0, r1, c3, c0, 0 @ load domain access control 661 661 #endif 662 + mcr p15, 0, r0, c7, c5, 4 @ ISB 662 663 mcr p15, 0, r0, c1, c0, 0 @ load control register 663 664 mrc p15, 0, r0, c1, c0, 0 @ and read it back 664 665 mov r0, #0
+6
arch/arm/common/Kconfig
··· 1 1 config ARM_GIC 2 2 select IRQ_DOMAIN 3 + select MULTI_IRQ_HANDLER 4 + bool 5 + 6 + config GIC_NON_BANKED 3 7 bool 4 8 5 9 config ARM_VIC 10 + select IRQ_DOMAIN 11 + select MULTI_IRQ_HANDLER 6 12 bool 7 13 8 14 config ARM_VIC_NR
+141 -24
arch/arm/common/gic.c
··· 40 40 #include <linux/slab.h> 41 41 42 42 #include <asm/irq.h> 43 + #include <asm/exception.h> 43 44 #include <asm/mach/irq.h> 44 45 #include <asm/hardware/gic.h> 45 46 46 - static DEFINE_RAW_SPINLOCK(irq_controller_lock); 47 + union gic_base { 48 + void __iomem *common_base; 49 + void __percpu __iomem **percpu_base; 50 + }; 47 51 48 - /* Address of GIC 0 CPU interface */ 49 - void __iomem *gic_cpu_base_addr __read_mostly; 52 + struct gic_chip_data { 53 + unsigned int irq_offset; 54 + union gic_base dist_base; 55 + union gic_base cpu_base; 56 + #ifdef CONFIG_CPU_PM 57 + u32 saved_spi_enable[DIV_ROUND_UP(1020, 32)]; 58 + u32 saved_spi_conf[DIV_ROUND_UP(1020, 16)]; 59 + u32 saved_spi_target[DIV_ROUND_UP(1020, 4)]; 60 + u32 __percpu *saved_ppi_enable; 61 + u32 __percpu *saved_ppi_conf; 62 + #endif 63 + #ifdef CONFIG_IRQ_DOMAIN 64 + struct irq_domain domain; 65 + #endif 66 + unsigned int gic_irqs; 67 + #ifdef CONFIG_GIC_NON_BANKED 68 + void __iomem *(*get_base)(union gic_base *); 69 + #endif 70 + }; 71 + 72 + static DEFINE_RAW_SPINLOCK(irq_controller_lock); 50 73 51 74 /* 52 75 * Supported arch specific GIC irq extension. ··· 90 67 91 68 static struct gic_chip_data gic_data[MAX_GIC_NR] __read_mostly; 92 69 70 + #ifdef CONFIG_GIC_NON_BANKED 71 + static void __iomem *gic_get_percpu_base(union gic_base *base) 72 + { 73 + return *__this_cpu_ptr(base->percpu_base); 74 + } 75 + 76 + static void __iomem *gic_get_common_base(union gic_base *base) 77 + { 78 + return base->common_base; 79 + } 80 + 81 + static inline void __iomem *gic_data_dist_base(struct gic_chip_data *data) 82 + { 83 + return data->get_base(&data->dist_base); 84 + } 85 + 86 + static inline void __iomem *gic_data_cpu_base(struct gic_chip_data *data) 87 + { 88 + return data->get_base(&data->cpu_base); 89 + } 90 + 91 + static inline void gic_set_base_accessor(struct gic_chip_data *data, 92 + void __iomem *(*f)(union gic_base *)) 93 + { 94 + data->get_base = f; 95 + } 96 + #else 97 + #define gic_data_dist_base(d) ((d)->dist_base.common_base) 98 + #define gic_data_cpu_base(d) ((d)->cpu_base.common_base) 99 + #define gic_set_base_accessor(d,f) 100 + #endif 101 + 93 102 static inline void __iomem *gic_dist_base(struct irq_data *d) 94 103 { 95 104 struct gic_chip_data *gic_data = irq_data_get_irq_chip_data(d); 96 - return gic_data->dist_base; 105 + return gic_data_dist_base(gic_data); 97 106 } 98 107 99 108 static inline void __iomem *gic_cpu_base(struct irq_data *d) 100 109 { 101 110 struct gic_chip_data *gic_data = irq_data_get_irq_chip_data(d); 102 - return gic_data->cpu_base; 111 + return gic_data_cpu_base(gic_data); 103 112 } 104 113 105 114 static inline unsigned int gic_irq(struct irq_data *d) ··· 270 215 #define gic_set_wake NULL 271 216 #endif 272 217 218 + asmlinkage void __exception_irq_entry gic_handle_irq(struct pt_regs *regs) 219 + { 220 + u32 irqstat, irqnr; 221 + struct gic_chip_data *gic = &gic_data[0]; 222 + void __iomem *cpu_base = gic_data_cpu_base(gic); 223 + 224 + do { 225 + irqstat = readl_relaxed(cpu_base + GIC_CPU_INTACK); 226 + irqnr = irqstat & ~0x1c00; 227 + 228 + if (likely(irqnr > 15 && irqnr < 1021)) { 229 + irqnr = irq_domain_to_irq(&gic->domain, irqnr); 230 + handle_IRQ(irqnr, regs); 231 + continue; 232 + } 233 + if (irqnr < 16) { 234 + writel_relaxed(irqstat, cpu_base + GIC_CPU_EOI); 235 + #ifdef CONFIG_SMP 236 + handle_IPI(irqnr, regs); 237 + #endif 238 + continue; 239 + } 240 + break; 241 + } while (1); 242 + } 243 + 273 244 static void gic_handle_cascade_irq(unsigned int irq, struct irq_desc *desc) 274 245 { 275 246 struct gic_chip_data *chip_data = irq_get_handler_data(irq); ··· 306 225 chained_irq_enter(chip, desc); 307 226 308 227 raw_spin_lock(&irq_controller_lock); 309 - status = readl_relaxed(chip_data->cpu_base + GIC_CPU_INTACK); 228 + status = readl_relaxed(gic_data_cpu_base(chip_data) + GIC_CPU_INTACK); 310 229 raw_spin_unlock(&irq_controller_lock); 311 230 312 231 gic_irq = (status & 0x3ff); ··· 351 270 u32 cpumask; 352 271 unsigned int gic_irqs = gic->gic_irqs; 353 272 struct irq_domain *domain = &gic->domain; 354 - void __iomem *base = gic->dist_base; 273 + void __iomem *base = gic_data_dist_base(gic); 355 274 u32 cpu = 0; 356 275 357 276 #ifdef CONFIG_SMP ··· 411 330 412 331 static void __cpuinit gic_cpu_init(struct gic_chip_data *gic) 413 332 { 414 - void __iomem *dist_base = gic->dist_base; 415 - void __iomem *base = gic->cpu_base; 333 + void __iomem *dist_base = gic_data_dist_base(gic); 334 + void __iomem *base = gic_data_cpu_base(gic); 416 335 int i; 417 336 418 337 /* ··· 449 368 BUG(); 450 369 451 370 gic_irqs = gic_data[gic_nr].gic_irqs; 452 - dist_base = gic_data[gic_nr].dist_base; 371 + dist_base = gic_data_dist_base(&gic_data[gic_nr]); 453 372 454 373 if (!dist_base) 455 374 return; ··· 484 403 BUG(); 485 404 486 405 gic_irqs = gic_data[gic_nr].gic_irqs; 487 - dist_base = gic_data[gic_nr].dist_base; 406 + dist_base = gic_data_dist_base(&gic_data[gic_nr]); 488 407 489 408 if (!dist_base) 490 409 return; ··· 520 439 if (gic_nr >= MAX_GIC_NR) 521 440 BUG(); 522 441 523 - dist_base = gic_data[gic_nr].dist_base; 524 - cpu_base = gic_data[gic_nr].cpu_base; 442 + dist_base = gic_data_dist_base(&gic_data[gic_nr]); 443 + cpu_base = gic_data_cpu_base(&gic_data[gic_nr]); 525 444 526 445 if (!dist_base || !cpu_base) 527 446 return; ··· 546 465 if (gic_nr >= MAX_GIC_NR) 547 466 BUG(); 548 467 549 - dist_base = gic_data[gic_nr].dist_base; 550 - cpu_base = gic_data[gic_nr].cpu_base; 468 + dist_base = gic_data_dist_base(&gic_data[gic_nr]); 469 + cpu_base = gic_data_cpu_base(&gic_data[gic_nr]); 551 470 552 471 if (!dist_base || !cpu_base) 553 472 return; ··· 572 491 int i; 573 492 574 493 for (i = 0; i < MAX_GIC_NR; i++) { 494 + #ifdef CONFIG_GIC_NON_BANKED 495 + /* Skip over unused GICs */ 496 + if (!gic_data[i].get_base) 497 + continue; 498 + #endif 575 499 switch (cmd) { 576 500 case CPU_PM_ENTER: 577 501 gic_cpu_save(i); ··· 650 564 #endif 651 565 }; 652 566 653 - void __init gic_init(unsigned int gic_nr, int irq_start, 654 - void __iomem *dist_base, void __iomem *cpu_base) 567 + void __init gic_init_bases(unsigned int gic_nr, int irq_start, 568 + void __iomem *dist_base, void __iomem *cpu_base, 569 + u32 percpu_offset) 655 570 { 656 571 struct gic_chip_data *gic; 657 572 struct irq_domain *domain; ··· 662 575 663 576 gic = &gic_data[gic_nr]; 664 577 domain = &gic->domain; 665 - gic->dist_base = dist_base; 666 - gic->cpu_base = cpu_base; 578 + #ifdef CONFIG_GIC_NON_BANKED 579 + if (percpu_offset) { /* Frankein-GIC without banked registers... */ 580 + unsigned int cpu; 581 + 582 + gic->dist_base.percpu_base = alloc_percpu(void __iomem *); 583 + gic->cpu_base.percpu_base = alloc_percpu(void __iomem *); 584 + if (WARN_ON(!gic->dist_base.percpu_base || 585 + !gic->cpu_base.percpu_base)) { 586 + free_percpu(gic->dist_base.percpu_base); 587 + free_percpu(gic->cpu_base.percpu_base); 588 + return; 589 + } 590 + 591 + for_each_possible_cpu(cpu) { 592 + unsigned long offset = percpu_offset * cpu_logical_map(cpu); 593 + *per_cpu_ptr(gic->dist_base.percpu_base, cpu) = dist_base + offset; 594 + *per_cpu_ptr(gic->cpu_base.percpu_base, cpu) = cpu_base + offset; 595 + } 596 + 597 + gic_set_base_accessor(gic, gic_get_percpu_base); 598 + } else 599 + #endif 600 + { /* Normal, sane GIC... */ 601 + WARN(percpu_offset, 602 + "GIC_NON_BANKED not enabled, ignoring %08x offset!", 603 + percpu_offset); 604 + gic->dist_base.common_base = dist_base; 605 + gic->cpu_base.common_base = cpu_base; 606 + gic_set_base_accessor(gic, gic_get_common_base); 607 + } 667 608 668 609 /* 669 610 * For primary GICs, skip over SGIs. ··· 699 584 */ 700 585 domain->hwirq_base = 32; 701 586 if (gic_nr == 0) { 702 - gic_cpu_base_addr = cpu_base; 703 - 704 587 if ((irq_start & 31) > 0) { 705 588 domain->hwirq_base = 16; 706 589 if (irq_start != -1) ··· 710 597 * Find out how many interrupts are supported. 711 598 * The GIC only supports up to 1020 interrupt sources. 712 599 */ 713 - gic_irqs = readl_relaxed(dist_base + GIC_DIST_CTR) & 0x1f; 600 + gic_irqs = readl_relaxed(gic_data_dist_base(gic) + GIC_DIST_CTR) & 0x1f; 714 601 gic_irqs = (gic_irqs + 1) * 32; 715 602 if (gic_irqs > 1020) 716 603 gic_irqs = 1020; ··· 758 645 dsb(); 759 646 760 647 /* this always happens on GIC0 */ 761 - writel_relaxed(map << 16 | irq, gic_data[0].dist_base + GIC_DIST_SOFTINT); 648 + writel_relaxed(map << 16 | irq, gic_data_dist_base(&gic_data[0]) + GIC_DIST_SOFTINT); 762 649 } 763 650 #endif 764 651 ··· 769 656 { 770 657 void __iomem *cpu_base; 771 658 void __iomem *dist_base; 659 + u32 percpu_offset; 772 660 int irq; 773 661 struct irq_domain *domain = &gic_data[gic_cnt].domain; 774 662 ··· 782 668 cpu_base = of_iomap(node, 1); 783 669 WARN(!cpu_base, "unable to map gic cpu registers\n"); 784 670 671 + if (of_property_read_u32(node, "cpu-offset", &percpu_offset)) 672 + percpu_offset = 0; 673 + 785 674 domain->of_node = of_node_get(node); 786 675 787 - gic_init(gic_cnt, -1, dist_base, cpu_base); 676 + gic_init_bases(gic_cnt, -1, dist_base, cpu_base, percpu_offset); 788 677 789 678 if (parent) { 790 679 irq = irq_of_parse_and_map(node, 0);
+118 -30
arch/arm/common/vic.c
··· 19 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 20 */ 21 21 22 + #include <linux/export.h> 22 23 #include <linux/init.h> 23 24 #include <linux/list.h> 24 25 #include <linux/io.h> 26 + #include <linux/irqdomain.h> 27 + #include <linux/of.h> 28 + #include <linux/of_address.h> 29 + #include <linux/of_irq.h> 25 30 #include <linux/syscore_ops.h> 26 31 #include <linux/device.h> 27 32 #include <linux/amba/bus.h> 28 33 34 + #include <asm/exception.h> 29 35 #include <asm/mach/irq.h> 30 36 #include <asm/hardware/vic.h> 31 37 32 - #ifdef CONFIG_PM 33 38 /** 34 39 * struct vic_device - VIC PM device 35 40 * @irq: The IRQ number for the base of the VIC. ··· 45 40 * @int_enable: Save for VIC_INT_ENABLE. 46 41 * @soft_int: Save for VIC_INT_SOFT. 47 42 * @protect: Save for VIC_PROTECT. 43 + * @domain: The IRQ domain for the VIC. 48 44 */ 49 45 struct vic_device { 50 46 void __iomem *base; ··· 56 50 u32 int_enable; 57 51 u32 soft_int; 58 52 u32 protect; 53 + struct irq_domain domain; 59 54 }; 60 55 61 56 /* we cannot allocate memory when VICs are initially registered */ 62 57 static struct vic_device vic_devices[CONFIG_ARM_VIC_NR]; 63 58 64 59 static int vic_id; 65 - #endif /* CONFIG_PM */ 66 60 67 61 /** 68 62 * vic_init2 - common initialisation code ··· 162 156 return 0; 163 157 } 164 158 late_initcall(vic_pm_init); 159 + #endif /* CONFIG_PM */ 165 160 166 161 /** 167 - * vic_pm_register - Register a VIC for later power management control 162 + * vic_register() - Register a VIC. 168 163 * @base: The base address of the VIC. 169 164 * @irq: The base IRQ for the VIC. 170 165 * @resume_sources: bitmask of interrupts allowed for resume sources. 166 + * @node: The device tree node associated with the VIC. 171 167 * 172 168 * Register the VIC with the system device tree so that it can be notified 173 169 * of suspend and resume requests and ensure that the correct actions are 174 170 * taken to re-instate the settings on resume. 171 + * 172 + * This also configures the IRQ domain for the VIC. 175 173 */ 176 - static void __init vic_pm_register(void __iomem *base, unsigned int irq, u32 resume_sources) 174 + static void __init vic_register(void __iomem *base, unsigned int irq, 175 + u32 resume_sources, struct device_node *node) 177 176 { 178 177 struct vic_device *v; 179 178 180 - if (vic_id >= ARRAY_SIZE(vic_devices)) 179 + if (vic_id >= ARRAY_SIZE(vic_devices)) { 181 180 printk(KERN_ERR "%s: too few VICs, increase CONFIG_ARM_VIC_NR\n", __func__); 182 - else { 183 - v = &vic_devices[vic_id]; 184 - v->base = base; 185 - v->resume_sources = resume_sources; 186 - v->irq = irq; 187 - vic_id++; 181 + return; 188 182 } 183 + 184 + v = &vic_devices[vic_id]; 185 + v->base = base; 186 + v->resume_sources = resume_sources; 187 + v->irq = irq; 188 + vic_id++; 189 + 190 + v->domain.irq_base = irq; 191 + v->domain.nr_irq = 32; 192 + #ifdef CONFIG_OF_IRQ 193 + v->domain.of_node = of_node_get(node); 194 + #endif /* CONFIG_OF */ 195 + v->domain.ops = &irq_domain_simple_ops; 196 + irq_domain_add(&v->domain); 189 197 } 190 - #else 191 - static inline void vic_pm_register(void __iomem *base, unsigned int irq, u32 arg1) { } 192 - #endif /* CONFIG_PM */ 193 198 194 199 static void vic_ack_irq(struct irq_data *d) 195 200 { 196 201 void __iomem *base = irq_data_get_irq_chip_data(d); 197 - unsigned int irq = d->irq & 31; 202 + unsigned int irq = d->hwirq; 198 203 writel(1 << irq, base + VIC_INT_ENABLE_CLEAR); 199 204 /* moreover, clear the soft-triggered, in case it was the reason */ 200 205 writel(1 << irq, base + VIC_INT_SOFT_CLEAR); ··· 214 197 static void vic_mask_irq(struct irq_data *d) 215 198 { 216 199 void __iomem *base = irq_data_get_irq_chip_data(d); 217 - unsigned int irq = d->irq & 31; 200 + unsigned int irq = d->hwirq; 218 201 writel(1 << irq, base + VIC_INT_ENABLE_CLEAR); 219 202 } 220 203 221 204 static void vic_unmask_irq(struct irq_data *d) 222 205 { 223 206 void __iomem *base = irq_data_get_irq_chip_data(d); 224 - unsigned int irq = d->irq & 31; 207 + unsigned int irq = d->hwirq; 225 208 writel(1 << irq, base + VIC_INT_ENABLE); 226 209 } 227 210 ··· 243 226 static int vic_set_wake(struct irq_data *d, unsigned int on) 244 227 { 245 228 struct vic_device *v = vic_from_irq(d->irq); 246 - unsigned int off = d->irq & 31; 229 + unsigned int off = d->hwirq; 247 230 u32 bit = 1 << off; 248 231 249 232 if (!v) ··· 318 301 * and 020 within the page. We call this "second block". 319 302 */ 320 303 static void __init vic_init_st(void __iomem *base, unsigned int irq_start, 321 - u32 vic_sources) 304 + u32 vic_sources, struct device_node *node) 322 305 { 323 306 unsigned int i; 324 307 int vic_2nd_block = ((unsigned long)base & ~PAGE_MASK) != 0; ··· 345 328 } 346 329 347 330 vic_set_irq_sources(base, irq_start, vic_sources); 331 + vic_register(base, irq_start, 0, node); 348 332 } 349 333 350 - /** 351 - * vic_init - initialise a vectored interrupt controller 352 - * @base: iomem base address 353 - * @irq_start: starting interrupt number, must be muliple of 32 354 - * @vic_sources: bitmask of interrupt sources to allow 355 - * @resume_sources: bitmask of interrupt sources to allow for resume 356 - */ 357 - void __init vic_init(void __iomem *base, unsigned int irq_start, 358 - u32 vic_sources, u32 resume_sources) 334 + static void __init __vic_init(void __iomem *base, unsigned int irq_start, 335 + u32 vic_sources, u32 resume_sources, 336 + struct device_node *node) 359 337 { 360 338 unsigned int i; 361 339 u32 cellid = 0; ··· 368 356 369 357 switch(vendor) { 370 358 case AMBA_VENDOR_ST: 371 - vic_init_st(base, irq_start, vic_sources); 359 + vic_init_st(base, irq_start, vic_sources, node); 372 360 return; 373 361 default: 374 362 printk(KERN_WARNING "VIC: unknown vendor, continuing anyways\n"); ··· 387 375 388 376 vic_set_irq_sources(base, irq_start, vic_sources); 389 377 390 - vic_pm_register(base, irq_start, resume_sources); 378 + vic_register(base, irq_start, resume_sources, node); 379 + } 380 + 381 + /** 382 + * vic_init() - initialise a vectored interrupt controller 383 + * @base: iomem base address 384 + * @irq_start: starting interrupt number, must be muliple of 32 385 + * @vic_sources: bitmask of interrupt sources to allow 386 + * @resume_sources: bitmask of interrupt sources to allow for resume 387 + */ 388 + void __init vic_init(void __iomem *base, unsigned int irq_start, 389 + u32 vic_sources, u32 resume_sources) 390 + { 391 + __vic_init(base, irq_start, vic_sources, resume_sources, NULL); 392 + } 393 + 394 + #ifdef CONFIG_OF 395 + int __init vic_of_init(struct device_node *node, struct device_node *parent) 396 + { 397 + void __iomem *regs; 398 + int irq_base; 399 + 400 + if (WARN(parent, "non-root VICs are not supported")) 401 + return -EINVAL; 402 + 403 + regs = of_iomap(node, 0); 404 + if (WARN_ON(!regs)) 405 + return -EIO; 406 + 407 + irq_base = irq_alloc_descs(-1, 0, 32, numa_node_id()); 408 + if (WARN_ON(irq_base < 0)) 409 + goto out_unmap; 410 + 411 + __vic_init(regs, irq_base, ~0, ~0, node); 412 + 413 + return 0; 414 + 415 + out_unmap: 416 + iounmap(regs); 417 + 418 + return -EIO; 419 + } 420 + #endif /* CONFIG OF */ 421 + 422 + /* 423 + * Handle each interrupt in a single VIC. Returns non-zero if we've 424 + * handled at least one interrupt. This does a single read of the 425 + * status register and handles all interrupts in order from LSB first. 426 + */ 427 + static int handle_one_vic(struct vic_device *vic, struct pt_regs *regs) 428 + { 429 + u32 stat, irq; 430 + int handled = 0; 431 + 432 + stat = readl_relaxed(vic->base + VIC_IRQ_STATUS); 433 + while (stat) { 434 + irq = ffs(stat) - 1; 435 + handle_IRQ(irq_domain_to_irq(&vic->domain, irq), regs); 436 + stat &= ~(1 << irq); 437 + handled = 1; 438 + } 439 + 440 + return handled; 441 + } 442 + 443 + /* 444 + * Keep iterating over all registered VIC's until there are no pending 445 + * interrupts. 446 + */ 447 + asmlinkage void __exception_irq_entry vic_handle_irq(struct pt_regs *regs) 448 + { 449 + int i, handled; 450 + 451 + do { 452 + for (i = 0, handled = 0; i < vic_id; ++i) 453 + handled |= handle_one_vic(&vic_devices[i], regs); 454 + } while (handled); 391 455 }
+11
arch/arm/include/asm/assembler.h
··· 187 187 #endif 188 188 189 189 /* 190 + * Instruction barrier 191 + */ 192 + .macro instr_sync 193 + #if __LINUX_ARM_ARCH__ >= 7 194 + isb 195 + #elif __LINUX_ARM_ARCH__ == 6 196 + mcr p15, 0, r0, c7, c5, 4 197 + #endif 198 + .endm 199 + 200 + /* 190 201 * SMP data memory barrier 191 202 */ 192 203 .macro smp_dmb mode
+179
arch/arm/include/asm/cti.h
··· 1 + #ifndef __ASMARM_CTI_H 2 + #define __ASMARM_CTI_H 3 + 4 + #include <asm/io.h> 5 + 6 + /* The registers' definition is from section 3.2 of 7 + * Embedded Cross Trigger Revision: r0p0 8 + */ 9 + #define CTICONTROL 0x000 10 + #define CTISTATUS 0x004 11 + #define CTILOCK 0x008 12 + #define CTIPROTECTION 0x00C 13 + #define CTIINTACK 0x010 14 + #define CTIAPPSET 0x014 15 + #define CTIAPPCLEAR 0x018 16 + #define CTIAPPPULSE 0x01c 17 + #define CTIINEN 0x020 18 + #define CTIOUTEN 0x0A0 19 + #define CTITRIGINSTATUS 0x130 20 + #define CTITRIGOUTSTATUS 0x134 21 + #define CTICHINSTATUS 0x138 22 + #define CTICHOUTSTATUS 0x13c 23 + #define CTIPERIPHID0 0xFE0 24 + #define CTIPERIPHID1 0xFE4 25 + #define CTIPERIPHID2 0xFE8 26 + #define CTIPERIPHID3 0xFEC 27 + #define CTIPCELLID0 0xFF0 28 + #define CTIPCELLID1 0xFF4 29 + #define CTIPCELLID2 0xFF8 30 + #define CTIPCELLID3 0xFFC 31 + 32 + /* The below are from section 3.6.4 of 33 + * CoreSight v1.0 Architecture Specification 34 + */ 35 + #define LOCKACCESS 0xFB0 36 + #define LOCKSTATUS 0xFB4 37 + 38 + /* write this value to LOCKACCESS will unlock the module, and 39 + * other value will lock the module 40 + */ 41 + #define LOCKCODE 0xC5ACCE55 42 + 43 + /** 44 + * struct cti - cross trigger interface struct 45 + * @base: mapped virtual address for the cti base 46 + * @irq: irq number for the cti 47 + * @trig_out_for_irq: triger out number which will cause 48 + * the @irq happen 49 + * 50 + * cti struct used to operate cti registers. 51 + */ 52 + struct cti { 53 + void __iomem *base; 54 + int irq; 55 + int trig_out_for_irq; 56 + }; 57 + 58 + /** 59 + * cti_init - initialize the cti instance 60 + * @cti: cti instance 61 + * @base: mapped virtual address for the cti base 62 + * @irq: irq number for the cti 63 + * @trig_out: triger out number which will cause 64 + * the @irq happen 65 + * 66 + * called by machine code to pass the board dependent 67 + * @base, @irq and @trig_out to cti. 68 + */ 69 + static inline void cti_init(struct cti *cti, 70 + void __iomem *base, int irq, int trig_out) 71 + { 72 + cti->base = base; 73 + cti->irq = irq; 74 + cti->trig_out_for_irq = trig_out; 75 + } 76 + 77 + /** 78 + * cti_map_trigger - use the @chan to map @trig_in to @trig_out 79 + * @cti: cti instance 80 + * @trig_in: trigger in number 81 + * @trig_out: trigger out number 82 + * @channel: channel number 83 + * 84 + * This function maps one trigger in of @trig_in to one trigger 85 + * out of @trig_out using the channel @chan. 86 + */ 87 + static inline void cti_map_trigger(struct cti *cti, 88 + int trig_in, int trig_out, int chan) 89 + { 90 + void __iomem *base = cti->base; 91 + unsigned long val; 92 + 93 + val = __raw_readl(base + CTIINEN + trig_in * 4); 94 + val |= BIT(chan); 95 + __raw_writel(val, base + CTIINEN + trig_in * 4); 96 + 97 + val = __raw_readl(base + CTIOUTEN + trig_out * 4); 98 + val |= BIT(chan); 99 + __raw_writel(val, base + CTIOUTEN + trig_out * 4); 100 + } 101 + 102 + /** 103 + * cti_enable - enable the cti module 104 + * @cti: cti instance 105 + * 106 + * enable the cti module 107 + */ 108 + static inline void cti_enable(struct cti *cti) 109 + { 110 + __raw_writel(0x1, cti->base + CTICONTROL); 111 + } 112 + 113 + /** 114 + * cti_disable - disable the cti module 115 + * @cti: cti instance 116 + * 117 + * enable the cti module 118 + */ 119 + static inline void cti_disable(struct cti *cti) 120 + { 121 + __raw_writel(0, cti->base + CTICONTROL); 122 + } 123 + 124 + /** 125 + * cti_irq_ack - clear the cti irq 126 + * @cti: cti instance 127 + * 128 + * clear the cti irq 129 + */ 130 + static inline void cti_irq_ack(struct cti *cti) 131 + { 132 + void __iomem *base = cti->base; 133 + unsigned long val; 134 + 135 + val = __raw_readl(base + CTIINTACK); 136 + val |= BIT(cti->trig_out_for_irq); 137 + __raw_writel(val, base + CTIINTACK); 138 + } 139 + 140 + /** 141 + * cti_unlock - unlock cti module 142 + * @cti: cti instance 143 + * 144 + * unlock the cti module, or else any writes to the cti 145 + * module is not allowed. 146 + */ 147 + static inline void cti_unlock(struct cti *cti) 148 + { 149 + void __iomem *base = cti->base; 150 + unsigned long val; 151 + 152 + val = __raw_readl(base + LOCKSTATUS); 153 + 154 + if (val & 1) { 155 + val = LOCKCODE; 156 + __raw_writel(val, base + LOCKACCESS); 157 + } 158 + } 159 + 160 + /** 161 + * cti_lock - lock cti module 162 + * @cti: cti instance 163 + * 164 + * lock the cti module, so any writes to the cti 165 + * module will be not allowed. 166 + */ 167 + static inline void cti_lock(struct cti *cti) 168 + { 169 + void __iomem *base = cti->base; 170 + unsigned long val; 171 + 172 + val = __raw_readl(base + LOCKSTATUS); 173 + 174 + if (!(val & 1)) { 175 + val = ~LOCKCODE; 176 + __raw_writel(val, base + LOCKACCESS); 177 + } 178 + } 179 + #endif
-57
arch/arm/include/asm/entry-macro-vic2.S
··· 1 - /* arch/arm/include/asm/entry-macro-vic2.S 2 - * 3 - * Originally arch/arm/mach-s3c6400/include/mach/entry-macro.S 4 - * 5 - * Copyright 2008 Openmoko, Inc. 6 - * Copyright 2008 Simtec Electronics 7 - * http://armlinux.simtec.co.uk/ 8 - * Ben Dooks <ben@simtec.co.uk> 9 - * 10 - * Low-level IRQ helper macros for a device with two VICs 11 - * 12 - * This file is licensed under the terms of the GNU General Public 13 - * License version 2. This program is licensed "as is" without any 14 - * warranty of any kind, whether express or implied. 15 - */ 16 - 17 - /* This should be included from <mach/entry-macro.S> with the necessary 18 - * defines for virtual addresses and IRQ bases for the two vics. 19 - * 20 - * The code needs the following defined: 21 - * IRQ_VIC0_BASE IRQ number of VIC0's first IRQ 22 - * IRQ_VIC1_BASE IRQ number of VIC1's first IRQ 23 - * VA_VIC0 Virtual address of VIC0 24 - * VA_VIC1 Virtual address of VIC1 25 - * 26 - * Note, code assumes VIC0's virtual address is an ARM immediate constant 27 - * away from VIC1. 28 - */ 29 - 30 - #include <asm/hardware/vic.h> 31 - 32 - .macro disable_fiq 33 - .endm 34 - 35 - .macro get_irqnr_preamble, base, tmp 36 - ldr \base, =VA_VIC0 37 - .endm 38 - 39 - .macro arch_ret_to_user, tmp1, tmp2 40 - .endm 41 - 42 - .macro get_irqnr_and_base, irqnr, irqstat, base, tmp 43 - 44 - @ check the vic0 45 - mov \irqnr, #IRQ_VIC0_BASE + 31 46 - ldr \irqstat, [ \base, # VIC_IRQ_STATUS ] 47 - teq \irqstat, #0 48 - 49 - @ otherwise try vic1 50 - addeq \tmp, \base, #(VA_VIC1 - VA_VIC0) 51 - addeq \irqnr, \irqnr, #(IRQ_VIC1_BASE - IRQ_VIC0_BASE) 52 - ldreq \irqstat, [ \tmp, # VIC_IRQ_STATUS ] 53 - teqeq \irqstat, #0 54 - 55 - clzne \irqstat, \irqstat 56 - subne \irqnr, \irqnr, \irqstat 57 - .endm
-60
arch/arm/include/asm/hardware/entry-macro-gic.S
··· 1 - /* 2 - * arch/arm/include/asm/hardware/entry-macro-gic.S 3 - * 4 - * Low-level IRQ helper macros for GIC 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 - 11 - #include <asm/hardware/gic.h> 12 - 13 - #ifndef HAVE_GET_IRQNR_PREAMBLE 14 - .macro get_irqnr_preamble, base, tmp 15 - ldr \base, =gic_cpu_base_addr 16 - ldr \base, [\base] 17 - .endm 18 - #endif 19 - 20 - /* 21 - * The interrupt numbering scheme is defined in the 22 - * interrupt controller spec. To wit: 23 - * 24 - * Interrupts 0-15 are IPI 25 - * 16-31 are local. We allow 30 to be used for the watchdog. 26 - * 32-1020 are global 27 - * 1021-1022 are reserved 28 - * 1023 is "spurious" (no interrupt) 29 - * 30 - * A simple read from the controller will tell us the number of the highest 31 - * priority enabled interrupt. We then just need to check whether it is in the 32 - * valid range for an IRQ (30-1020 inclusive). 33 - */ 34 - 35 - .macro get_irqnr_and_base, irqnr, irqstat, base, tmp 36 - 37 - ldr \irqstat, [\base, #GIC_CPU_INTACK] 38 - /* bits 12-10 = src CPU, 9-0 = int # */ 39 - 40 - ldr \tmp, =1021 41 - bic \irqnr, \irqstat, #0x1c00 42 - cmp \irqnr, #15 43 - cmpcc \irqnr, \irqnr 44 - cmpne \irqnr, \tmp 45 - cmpcs \irqnr, \irqnr 46 - .endm 47 - 48 - /* We assume that irqstat (the raw value of the IRQ acknowledge 49 - * register) is preserved from the macro above. 50 - * If there is an IPI, we immediately signal end of interrupt on the 51 - * controller, since this requires the original irqstat value which 52 - * we won't easily be able to recreate later. 53 - */ 54 - 55 - .macro test_for_ipi, irqnr, irqstat, base, tmp 56 - bic \irqnr, \irqstat, #0x1c00 57 - cmp \irqnr, #16 58 - strcc \irqstat, [\base, #GIC_CPU_EOI] 59 - cmpcs \irqnr, \irqnr 60 - .endm
+9 -17
arch/arm/include/asm/hardware/gic.h
··· 36 36 #include <linux/irqdomain.h> 37 37 struct device_node; 38 38 39 - extern void __iomem *gic_cpu_base_addr; 40 39 extern struct irq_chip gic_arch_extn; 41 40 42 - void gic_init(unsigned int, int, void __iomem *, void __iomem *); 41 + void gic_init_bases(unsigned int, int, void __iomem *, void __iomem *, 42 + u32 offset); 43 43 int gic_of_init(struct device_node *node, struct device_node *parent); 44 44 void gic_secondary_init(unsigned int); 45 + void gic_handle_irq(struct pt_regs *regs); 45 46 void gic_cascade_irq(unsigned int gic_nr, unsigned int irq); 46 47 void gic_raise_softirq(const struct cpumask *mask, unsigned int irq); 47 48 48 - struct gic_chip_data { 49 - void __iomem *dist_base; 50 - void __iomem *cpu_base; 51 - #ifdef CONFIG_CPU_PM 52 - u32 saved_spi_enable[DIV_ROUND_UP(1020, 32)]; 53 - u32 saved_spi_conf[DIV_ROUND_UP(1020, 16)]; 54 - u32 saved_spi_target[DIV_ROUND_UP(1020, 4)]; 55 - u32 __percpu *saved_ppi_enable; 56 - u32 __percpu *saved_ppi_conf; 57 - #endif 58 - #ifdef CONFIG_IRQ_DOMAIN 59 - struct irq_domain domain; 60 - #endif 61 - unsigned int gic_irqs; 62 - }; 49 + static inline void gic_init(unsigned int nr, int start, 50 + void __iomem *dist , void __iomem *cpu) 51 + { 52 + gic_init_bases(nr, start, dist, cpu, 0); 53 + } 54 + 63 55 #endif 64 56 65 57 #endif
+10 -2
arch/arm/include/asm/hardware/vic.h
··· 41 41 #define VIC_PL192_VECT_ADDR 0xF00 42 42 43 43 #ifndef __ASSEMBLY__ 44 - void vic_init(void __iomem *base, unsigned int irq_start, u32 vic_sources, u32 resume_sources); 45 - #endif 44 + #include <linux/compiler.h> 45 + #include <linux/types.h> 46 46 47 + struct device_node; 48 + struct pt_regs; 49 + 50 + void vic_init(void __iomem *base, unsigned int irq_start, u32 vic_sources, u32 resume_sources); 51 + int vic_of_init(struct device_node *node, struct device_node *parent); 52 + void vic_handle_irq(struct pt_regs *regs); 53 + 54 + #endif /* __ASSEMBLY__ */ 47 55 #endif
+14
arch/arm/include/asm/idmap.h
··· 1 + #ifndef __ASM_IDMAP_H 2 + #define __ASM_IDMAP_H 3 + 4 + #include <linux/compiler.h> 5 + #include <asm/pgtable.h> 6 + 7 + /* Tag a function as requiring to be executed via an identity mapping. */ 8 + #define __idmap __section(.idmap.text) noinline notrace 9 + 10 + extern pgd_t *idmap_pgd; 11 + 12 + void setup_mm_for_reboot(void); 13 + 14 + #endif /* __ASM_IDMAP_H */
+5 -4
arch/arm/include/asm/mach/arch.h
··· 31 31 unsigned int video_start; /* start of video RAM */ 32 32 unsigned int video_end; /* end of video RAM */ 33 33 34 - unsigned int reserve_lp0 :1; /* never has lp0 */ 35 - unsigned int reserve_lp1 :1; /* never has lp1 */ 36 - unsigned int reserve_lp2 :1; /* never has lp2 */ 37 - unsigned int soft_reboot :1; /* soft reboot */ 34 + unsigned char reserve_lp0 :1; /* never has lp0 */ 35 + unsigned char reserve_lp1 :1; /* never has lp1 */ 36 + unsigned char reserve_lp2 :1; /* never has lp2 */ 37 + char restart_mode; /* default restart mode */ 38 38 void (*fixup)(struct tag *, char **, 39 39 struct meminfo *); 40 40 void (*reserve)(void);/* reserve mem blocks */ ··· 46 46 #ifdef CONFIG_MULTI_IRQ_HANDLER 47 47 void (*handle_irq)(struct pt_regs *); 48 48 #endif 49 + void (*restart)(char, const char *); 49 50 }; 50 51 51 52 /*
+4
arch/arm/include/asm/page.h
··· 151 151 #define clear_page(page) memset((void *)(page), 0, PAGE_SIZE) 152 152 extern void copy_page(void *to, const void *from); 153 153 154 + #ifdef CONFIG_ARM_LPAE 155 + #include <asm/pgtable-3level-types.h> 156 + #else 154 157 #include <asm/pgtable-2level-types.h> 158 + #endif 155 159 156 160 #endif /* CONFIG_MMU */ 157 161
-3
arch/arm/include/asm/perf_event.h
··· 32 32 extern enum arm_perf_pmu_ids 33 33 armpmu_get_pmu_id(void); 34 34 35 - extern int 36 - armpmu_get_max_events(void); 37 - 38 35 #endif /* __ARM_PERF_EVENT_H__ */
+25 -1
arch/arm/include/asm/pgalloc.h
··· 25 25 #define _PAGE_USER_TABLE (PMD_TYPE_TABLE | PMD_BIT4 | PMD_DOMAIN(DOMAIN_USER)) 26 26 #define _PAGE_KERNEL_TABLE (PMD_TYPE_TABLE | PMD_BIT4 | PMD_DOMAIN(DOMAIN_KERNEL)) 27 27 28 + #ifdef CONFIG_ARM_LPAE 29 + 30 + static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long addr) 31 + { 32 + return (pmd_t *)get_zeroed_page(GFP_KERNEL | __GFP_REPEAT); 33 + } 34 + 35 + static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd) 36 + { 37 + BUG_ON((unsigned long)pmd & (PAGE_SIZE-1)); 38 + free_page((unsigned long)pmd); 39 + } 40 + 41 + static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd) 42 + { 43 + set_pud(pud, __pud(__pa(pmd) | PMD_TYPE_TABLE)); 44 + } 45 + 46 + #else /* !CONFIG_ARM_LPAE */ 47 + 28 48 /* 29 49 * Since we have only two-level page tables, these are trivial 30 50 */ 31 51 #define pmd_alloc_one(mm,addr) ({ BUG(); ((pmd_t *)2); }) 32 52 #define pmd_free(mm, pmd) do { } while (0) 33 - #define pgd_populate(mm,pmd,pte) BUG() 53 + #define pud_populate(mm,pmd,pte) BUG() 54 + 55 + #endif /* CONFIG_ARM_LPAE */ 34 56 35 57 extern pgd_t *pgd_alloc(struct mm_struct *mm); 36 58 extern void pgd_free(struct mm_struct *mm, pgd_t *pgd); ··· 131 109 { 132 110 pmdval_t pmdval = (pte + PTE_HWTABLE_OFF) | prot; 133 111 pmdp[0] = __pmd(pmdval); 112 + #ifndef CONFIG_ARM_LPAE 134 113 pmdp[1] = __pmd(pmdval + 256 * sizeof(pte_t)); 114 + #endif 135 115 flush_pmd_entry(pmdp); 136 116 } 137 117
+41
arch/arm/include/asm/pgtable-2level.h
··· 140 140 #define L_PTE_MT_DEV_CACHED (_AT(pteval_t, 0x0b) << 2) /* 1011 */ 141 141 #define L_PTE_MT_MASK (_AT(pteval_t, 0x0f) << 2) 142 142 143 + #ifndef __ASSEMBLY__ 144 + 145 + /* 146 + * The "pud_xxx()" functions here are trivial when the pmd is folded into 147 + * the pud: the pud entry is never bad, always exists, and can't be set or 148 + * cleared. 149 + */ 150 + #define pud_none(pud) (0) 151 + #define pud_bad(pud) (0) 152 + #define pud_present(pud) (1) 153 + #define pud_clear(pudp) do { } while (0) 154 + #define set_pud(pud,pudp) do { } while (0) 155 + 156 + static inline pmd_t *pmd_offset(pud_t *pud, unsigned long addr) 157 + { 158 + return (pmd_t *)pud; 159 + } 160 + 161 + #define pmd_bad(pmd) (pmd_val(pmd) & 2) 162 + 163 + #define copy_pmd(pmdpd,pmdps) \ 164 + do { \ 165 + pmdpd[0] = pmdps[0]; \ 166 + pmdpd[1] = pmdps[1]; \ 167 + flush_pmd_entry(pmdpd); \ 168 + } while (0) 169 + 170 + #define pmd_clear(pmdp) \ 171 + do { \ 172 + pmdp[0] = __pmd(0); \ 173 + pmdp[1] = __pmd(0); \ 174 + clean_pmd_entry(pmdp); \ 175 + } while (0) 176 + 177 + /* we don't need complex calculations here as the pmd is folded into the pgd */ 178 + #define pmd_addr_end(addr,end) (end) 179 + 180 + #define set_pte_ext(ptep,pte,ext) cpu_set_pte_ext(ptep,pte,ext) 181 + 182 + #endif /* __ASSEMBLY__ */ 183 + 143 184 #endif /* _ASM_PGTABLE_2LEVEL_H */
+77
arch/arm/include/asm/pgtable-3level-hwdef.h
··· 1 + /* 2 + * arch/arm/include/asm/pgtable-3level-hwdef.h 3 + * 4 + * Copyright (C) 2011 ARM Ltd. 5 + * Author: Catalin Marinas <catalin.marinas@arm.com> 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 + * This program is distributed in the hope that it will be useful, 12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 + * GNU General Public License for more details. 15 + * 16 + * You should have received a copy of the GNU General Public License 17 + * along with this program; if not, write to the Free Software 18 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 + */ 20 + #ifndef _ASM_PGTABLE_3LEVEL_HWDEF_H 21 + #define _ASM_PGTABLE_3LEVEL_HWDEF_H 22 + 23 + /* 24 + * Hardware page table definitions. 25 + * 26 + * + Level 1/2 descriptor 27 + * - common 28 + */ 29 + #define PMD_TYPE_MASK (_AT(pmdval_t, 3) << 0) 30 + #define PMD_TYPE_FAULT (_AT(pmdval_t, 0) << 0) 31 + #define PMD_TYPE_TABLE (_AT(pmdval_t, 3) << 0) 32 + #define PMD_TYPE_SECT (_AT(pmdval_t, 1) << 0) 33 + #define PMD_BIT4 (_AT(pmdval_t, 0)) 34 + #define PMD_DOMAIN(x) (_AT(pmdval_t, 0)) 35 + 36 + /* 37 + * - section 38 + */ 39 + #define PMD_SECT_BUFFERABLE (_AT(pmdval_t, 1) << 2) 40 + #define PMD_SECT_CACHEABLE (_AT(pmdval_t, 1) << 3) 41 + #define PMD_SECT_S (_AT(pmdval_t, 3) << 8) 42 + #define PMD_SECT_AF (_AT(pmdval_t, 1) << 10) 43 + #define PMD_SECT_nG (_AT(pmdval_t, 1) << 11) 44 + #define PMD_SECT_XN (_AT(pmdval_t, 1) << 54) 45 + #define PMD_SECT_AP_WRITE (_AT(pmdval_t, 0)) 46 + #define PMD_SECT_AP_READ (_AT(pmdval_t, 0)) 47 + #define PMD_SECT_TEX(x) (_AT(pmdval_t, 0)) 48 + 49 + /* 50 + * AttrIndx[2:0] encoding (mapping attributes defined in the MAIR* registers). 51 + */ 52 + #define PMD_SECT_UNCACHED (_AT(pmdval_t, 0) << 2) /* strongly ordered */ 53 + #define PMD_SECT_BUFFERED (_AT(pmdval_t, 1) << 2) /* normal non-cacheable */ 54 + #define PMD_SECT_WT (_AT(pmdval_t, 2) << 2) /* normal inner write-through */ 55 + #define PMD_SECT_WB (_AT(pmdval_t, 3) << 2) /* normal inner write-back */ 56 + #define PMD_SECT_WBWA (_AT(pmdval_t, 7) << 2) /* normal inner write-alloc */ 57 + 58 + /* 59 + * + Level 3 descriptor (PTE) 60 + */ 61 + #define PTE_TYPE_MASK (_AT(pteval_t, 3) << 0) 62 + #define PTE_TYPE_FAULT (_AT(pteval_t, 0) << 0) 63 + #define PTE_TYPE_PAGE (_AT(pteval_t, 3) << 0) 64 + #define PTE_BUFFERABLE (_AT(pteval_t, 1) << 2) /* AttrIndx[0] */ 65 + #define PTE_CACHEABLE (_AT(pteval_t, 1) << 3) /* AttrIndx[1] */ 66 + #define PTE_EXT_SHARED (_AT(pteval_t, 3) << 8) /* SH[1:0], inner shareable */ 67 + #define PTE_EXT_AF (_AT(pteval_t, 1) << 10) /* Access Flag */ 68 + #define PTE_EXT_NG (_AT(pteval_t, 1) << 11) /* nG */ 69 + #define PTE_EXT_XN (_AT(pteval_t, 1) << 54) /* XN */ 70 + 71 + /* 72 + * 40-bit physical address supported. 73 + */ 74 + #define PHYS_MASK_SHIFT (40) 75 + #define PHYS_MASK ((1ULL << PHYS_MASK_SHIFT) - 1) 76 + 77 + #endif
+70
arch/arm/include/asm/pgtable-3level-types.h
··· 1 + /* 2 + * arch/arm/include/asm/pgtable-3level-types.h 3 + * 4 + * Copyright (C) 2011 ARM Ltd. 5 + * Author: Catalin Marinas <catalin.marinas@arm.com> 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 + * This program is distributed in the hope that it will be useful, 12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 + * GNU General Public License for more details. 15 + * 16 + * You should have received a copy of the GNU General Public License 17 + * along with this program; if not, write to the Free Software 18 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 + */ 20 + #ifndef _ASM_PGTABLE_3LEVEL_TYPES_H 21 + #define _ASM_PGTABLE_3LEVEL_TYPES_H 22 + 23 + #include <asm/types.h> 24 + 25 + typedef u64 pteval_t; 26 + typedef u64 pmdval_t; 27 + typedef u64 pgdval_t; 28 + 29 + #undef STRICT_MM_TYPECHECKS 30 + 31 + #ifdef STRICT_MM_TYPECHECKS 32 + 33 + /* 34 + * These are used to make use of C type-checking.. 35 + */ 36 + typedef struct { pteval_t pte; } pte_t; 37 + typedef struct { pmdval_t pmd; } pmd_t; 38 + typedef struct { pgdval_t pgd; } pgd_t; 39 + typedef struct { pteval_t pgprot; } pgprot_t; 40 + 41 + #define pte_val(x) ((x).pte) 42 + #define pmd_val(x) ((x).pmd) 43 + #define pgd_val(x) ((x).pgd) 44 + #define pgprot_val(x) ((x).pgprot) 45 + 46 + #define __pte(x) ((pte_t) { (x) } ) 47 + #define __pmd(x) ((pmd_t) { (x) } ) 48 + #define __pgd(x) ((pgd_t) { (x) } ) 49 + #define __pgprot(x) ((pgprot_t) { (x) } ) 50 + 51 + #else /* !STRICT_MM_TYPECHECKS */ 52 + 53 + typedef pteval_t pte_t; 54 + typedef pmdval_t pmd_t; 55 + typedef pgdval_t pgd_t; 56 + typedef pteval_t pgprot_t; 57 + 58 + #define pte_val(x) (x) 59 + #define pmd_val(x) (x) 60 + #define pgd_val(x) (x) 61 + #define pgprot_val(x) (x) 62 + 63 + #define __pte(x) (x) 64 + #define __pmd(x) (x) 65 + #define __pgd(x) (x) 66 + #define __pgprot(x) (x) 67 + 68 + #endif /* STRICT_MM_TYPECHECKS */ 69 + 70 + #endif /* _ASM_PGTABLE_3LEVEL_TYPES_H */
+155
arch/arm/include/asm/pgtable-3level.h
··· 1 + /* 2 + * arch/arm/include/asm/pgtable-3level.h 3 + * 4 + * Copyright (C) 2011 ARM Ltd. 5 + * Author: Catalin Marinas <catalin.marinas@arm.com> 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 + * This program is distributed in the hope that it will be useful, 12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 + * GNU General Public License for more details. 15 + * 16 + * You should have received a copy of the GNU General Public License 17 + * along with this program; if not, write to the Free Software 18 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 + */ 20 + #ifndef _ASM_PGTABLE_3LEVEL_H 21 + #define _ASM_PGTABLE_3LEVEL_H 22 + 23 + /* 24 + * With LPAE, there are 3 levels of page tables. Each level has 512 entries of 25 + * 8 bytes each, occupying a 4K page. The first level table covers a range of 26 + * 512GB, each entry representing 1GB. Since we are limited to 4GB input 27 + * address range, only 4 entries in the PGD are used. 28 + * 29 + * There are enough spare bits in a page table entry for the kernel specific 30 + * state. 31 + */ 32 + #define PTRS_PER_PTE 512 33 + #define PTRS_PER_PMD 512 34 + #define PTRS_PER_PGD 4 35 + 36 + #define PTE_HWTABLE_PTRS (PTRS_PER_PTE) 37 + #define PTE_HWTABLE_OFF (0) 38 + #define PTE_HWTABLE_SIZE (PTRS_PER_PTE * sizeof(u64)) 39 + 40 + /* 41 + * PGDIR_SHIFT determines the size a top-level page table entry can map. 42 + */ 43 + #define PGDIR_SHIFT 30 44 + 45 + /* 46 + * PMD_SHIFT determines the size a middle-level page table entry can map. 47 + */ 48 + #define PMD_SHIFT 21 49 + 50 + #define PMD_SIZE (1UL << PMD_SHIFT) 51 + #define PMD_MASK (~(PMD_SIZE-1)) 52 + #define PGDIR_SIZE (1UL << PGDIR_SHIFT) 53 + #define PGDIR_MASK (~(PGDIR_SIZE-1)) 54 + 55 + /* 56 + * section address mask and size definitions. 57 + */ 58 + #define SECTION_SHIFT 21 59 + #define SECTION_SIZE (1UL << SECTION_SHIFT) 60 + #define SECTION_MASK (~(SECTION_SIZE-1)) 61 + 62 + #define USER_PTRS_PER_PGD (PAGE_OFFSET / PGDIR_SIZE) 63 + 64 + /* 65 + * "Linux" PTE definitions for LPAE. 66 + * 67 + * These bits overlap with the hardware bits but the naming is preserved for 68 + * consistency with the classic page table format. 69 + */ 70 + #define L_PTE_PRESENT (_AT(pteval_t, 3) << 0) /* Valid */ 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 + #define L_PTE_USER (_AT(pteval_t, 1) << 6) /* AP[1] */ 75 + #define L_PTE_RDONLY (_AT(pteval_t, 1) << 7) /* AP[2] */ 76 + #define L_PTE_SHARED (_AT(pteval_t, 3) << 8) /* SH[1:0], inner shareable */ 77 + #define L_PTE_YOUNG (_AT(pteval_t, 1) << 10) /* AF */ 78 + #define L_PTE_XN (_AT(pteval_t, 1) << 54) /* XN */ 79 + #define L_PTE_DIRTY (_AT(pteval_t, 1) << 55) /* unused */ 80 + #define L_PTE_SPECIAL (_AT(pteval_t, 1) << 56) /* unused */ 81 + 82 + /* 83 + * To be used in assembly code with the upper page attributes. 84 + */ 85 + #define L_PTE_XN_HIGH (1 << (54 - 32)) 86 + #define L_PTE_DIRTY_HIGH (1 << (55 - 32)) 87 + 88 + /* 89 + * AttrIndx[2:0] encoding (mapping attributes defined in the MAIR* registers). 90 + */ 91 + #define L_PTE_MT_UNCACHED (_AT(pteval_t, 0) << 2) /* strongly ordered */ 92 + #define L_PTE_MT_BUFFERABLE (_AT(pteval_t, 1) << 2) /* normal non-cacheable */ 93 + #define L_PTE_MT_WRITETHROUGH (_AT(pteval_t, 2) << 2) /* normal inner write-through */ 94 + #define L_PTE_MT_WRITEBACK (_AT(pteval_t, 3) << 2) /* normal inner write-back */ 95 + #define L_PTE_MT_WRITEALLOC (_AT(pteval_t, 7) << 2) /* normal inner write-alloc */ 96 + #define L_PTE_MT_DEV_SHARED (_AT(pteval_t, 4) << 2) /* device */ 97 + #define L_PTE_MT_DEV_NONSHARED (_AT(pteval_t, 4) << 2) /* device */ 98 + #define L_PTE_MT_DEV_WC (_AT(pteval_t, 1) << 2) /* normal non-cacheable */ 99 + #define L_PTE_MT_DEV_CACHED (_AT(pteval_t, 3) << 2) /* normal inner write-back */ 100 + #define L_PTE_MT_MASK (_AT(pteval_t, 7) << 2) 101 + 102 + /* 103 + * Software PGD flags. 104 + */ 105 + #define L_PGD_SWAPPER (_AT(pgdval_t, 1) << 55) /* swapper_pg_dir entry */ 106 + 107 + #ifndef __ASSEMBLY__ 108 + 109 + #define pud_none(pud) (!pud_val(pud)) 110 + #define pud_bad(pud) (!(pud_val(pud) & 2)) 111 + #define pud_present(pud) (pud_val(pud)) 112 + 113 + #define pud_clear(pudp) \ 114 + do { \ 115 + *pudp = __pud(0); \ 116 + clean_pmd_entry(pudp); \ 117 + } while (0) 118 + 119 + #define set_pud(pudp, pud) \ 120 + do { \ 121 + *pudp = pud; \ 122 + flush_pmd_entry(pudp); \ 123 + } while (0) 124 + 125 + static inline pmd_t *pud_page_vaddr(pud_t pud) 126 + { 127 + return __va(pud_val(pud) & PHYS_MASK & (s32)PAGE_MASK); 128 + } 129 + 130 + /* Find an entry in the second-level page table.. */ 131 + #define pmd_index(addr) (((addr) >> PMD_SHIFT) & (PTRS_PER_PMD - 1)) 132 + static inline pmd_t *pmd_offset(pud_t *pud, unsigned long addr) 133 + { 134 + return (pmd_t *)pud_page_vaddr(*pud) + pmd_index(addr); 135 + } 136 + 137 + #define pmd_bad(pmd) (!(pmd_val(pmd) & 2)) 138 + 139 + #define copy_pmd(pmdpd,pmdps) \ 140 + do { \ 141 + *pmdpd = *pmdps; \ 142 + flush_pmd_entry(pmdpd); \ 143 + } while (0) 144 + 145 + #define pmd_clear(pmdp) \ 146 + do { \ 147 + *pmdp = __pmd(0); \ 148 + clean_pmd_entry(pmdp); \ 149 + } while (0) 150 + 151 + #define set_pte_ext(ptep,pte,ext) cpu_set_pte_ext(ptep,__pte(pte_val(pte)|(ext))) 152 + 153 + #endif /* __ASSEMBLY__ */ 154 + 155 + #endif /* _ASM_PGTABLE_3LEVEL_H */
+4
arch/arm/include/asm/pgtable-hwdef.h
··· 10 10 #ifndef _ASMARM_PGTABLE_HWDEF_H 11 11 #define _ASMARM_PGTABLE_HWDEF_H 12 12 13 + #ifdef CONFIG_ARM_LPAE 14 + #include <asm/pgtable-3level-hwdef.h> 15 + #else 13 16 #include <asm/pgtable-2level-hwdef.h> 17 + #endif 14 18 15 19 #endif
+7 -47
arch/arm/include/asm/pgtable.h
··· 11 11 #define _ASMARM_PGTABLE_H 12 12 13 13 #include <linux/const.h> 14 - #include <asm-generic/4level-fixup.h> 15 14 #include <asm/proc-fns.h> 16 15 17 16 #ifndef CONFIG_MMU 18 17 18 + #include <asm-generic/4level-fixup.h> 19 19 #include "pgtable-nommu.h" 20 20 21 21 #else 22 22 23 + #include <asm-generic/pgtable-nopud.h> 23 24 #include <asm/memory.h> 24 - #include <mach/vmalloc.h> 25 25 #include <asm/pgtable-hwdef.h> 26 26 27 + #ifdef CONFIG_ARM_LPAE 28 + #include <asm/pgtable-3level.h> 29 + #else 27 30 #include <asm/pgtable-2level.h> 31 + #endif 28 32 29 33 /* 30 34 * Just any arbitrary offset to the start of the vmalloc VM area: the ··· 37 33 * any out-of-bounds memory accesses will hopefully be caught. 38 34 * The vmalloc() routines leaves a hole of 4kB between each vmalloced 39 35 * area for the same reason. ;) 40 - * 41 - * Note that platforms may override VMALLOC_START, but they must provide 42 - * VMALLOC_END. VMALLOC_END defines the (exclusive) limit of this space, 43 - * which may not overlap IO space. 44 36 */ 45 - #ifndef VMALLOC_START 46 37 #define VMALLOC_OFFSET (8*1024*1024) 47 38 #define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) 48 - #endif 39 + #define VMALLOC_END 0xff000000UL 49 40 50 41 #define LIBRARY_TEXT_START 0x0c000000 51 42 ··· 162 163 /* to find an entry in a kernel page-table-directory */ 163 164 #define pgd_offset_k(addr) pgd_offset(&init_mm, addr) 164 165 165 - /* 166 - * The "pgd_xxx()" functions here are trivial for a folded two-level 167 - * setup: the pgd is never bad, and a pmd always exists (as it's folded 168 - * into the pgd entry) 169 - */ 170 - #define pgd_none(pgd) (0) 171 - #define pgd_bad(pgd) (0) 172 - #define pgd_present(pgd) (1) 173 - #define pgd_clear(pgdp) do { } while (0) 174 - #define set_pgd(pgd,pgdp) do { } while (0) 175 - #define set_pud(pud,pudp) do { } while (0) 176 - 177 - 178 - /* Find an entry in the second-level page table.. */ 179 - #define pmd_offset(dir, addr) ((pmd_t *)(dir)) 180 - 181 166 #define pmd_none(pmd) (!pmd_val(pmd)) 182 167 #define pmd_present(pmd) (pmd_val(pmd)) 183 - #define pmd_bad(pmd) (pmd_val(pmd) & 2) 184 - 185 - #define copy_pmd(pmdpd,pmdps) \ 186 - do { \ 187 - pmdpd[0] = pmdps[0]; \ 188 - pmdpd[1] = pmdps[1]; \ 189 - flush_pmd_entry(pmdpd); \ 190 - } while (0) 191 - 192 - #define pmd_clear(pmdp) \ 193 - do { \ 194 - pmdp[0] = __pmd(0); \ 195 - pmdp[1] = __pmd(0); \ 196 - clean_pmd_entry(pmdp); \ 197 - } while (0) 198 168 199 169 static inline pte_t *pmd_page_vaddr(pmd_t pmd) 200 170 { ··· 171 203 } 172 204 173 205 #define pmd_page(pmd) pfn_to_page(__phys_to_pfn(pmd_val(pmd) & PHYS_MASK)) 174 - 175 - /* we don't need complex calculations here as the pmd is folded into the pgd */ 176 - #define pmd_addr_end(addr,end) (end) 177 - 178 206 179 207 #ifndef CONFIG_HIGHPTE 180 208 #define __pte_map(pmd) pmd_page_vaddr(*(pmd)) ··· 193 229 #define pte_page(pte) pfn_to_page(pte_pfn(pte)) 194 230 #define mk_pte(page,prot) pfn_pte(page_to_pfn(page), prot) 195 231 196 - #define set_pte_ext(ptep,pte,ext) cpu_set_pte_ext(ptep,pte,ext) 197 232 #define pte_clear(mm,addr,ptep) set_pte_ext(ptep, __pte(0), 0) 198 233 199 234 #if __LINUX_ARM_ARCH__ < 6 ··· 309 346 remap_pfn_range(vma, from, pfn, size, prot) 310 347 311 348 #define pgtable_cache_init() do { } while (0) 312 - 313 - void identity_mapping_add(pgd_t *, unsigned long, unsigned long); 314 - void identity_mapping_del(pgd_t *, unsigned long, unsigned long); 315 349 316 350 #endif /* !__ASSEMBLY__ */ 317 351
+12 -3
arch/arm/include/asm/pmu.h
··· 27 27 /* 28 28 * struct arm_pmu_platdata - ARM PMU platform data 29 29 * 30 - * @handle_irq: an optional handler which will be called from the interrupt and 31 - * passed the address of the low level handler, and can be used to implement 32 - * any platform specific handling before or after calling it. 30 + * @handle_irq: an optional handler which will be called from the 31 + * interrupt and passed the address of the low level handler, 32 + * and can be used to implement any platform specific handling 33 + * before or after calling it. 34 + * @enable_irq: an optional handler which will be called after 35 + * request_irq and be used to handle some platform specific 36 + * irq enablement 37 + * @disable_irq: an optional handler which will be called before 38 + * free_irq and be used to handle some platform specific 39 + * irq disablement 33 40 */ 34 41 struct arm_pmu_platdata { 35 42 irqreturn_t (*handle_irq)(int irq, void *dev, 36 43 irq_handler_t pmu_handler); 44 + void (*enable_irq)(int irq); 45 + void (*disable_irq)(int irq); 37 46 }; 38 47 39 48 #ifdef CONFIG_CPU_HAS_PMU
+21
arch/arm/include/asm/proc-fns.h
··· 65 65 * Set a possibly extended PTE. Non-extended PTEs should 66 66 * ignore 'ext'. 67 67 */ 68 + #ifdef CONFIG_ARM_LPAE 69 + void (*set_pte_ext)(pte_t *ptep, pte_t pte); 70 + #else 68 71 void (*set_pte_ext)(pte_t *ptep, pte_t pte, unsigned int ext); 72 + #endif 69 73 70 74 /* Suspend/resume */ 71 75 unsigned int suspend_size; ··· 83 79 extern int cpu_do_idle(void); 84 80 extern void cpu_dcache_clean_area(void *, int); 85 81 extern void cpu_do_switch_mm(unsigned long pgd_phys, struct mm_struct *mm); 82 + #ifdef CONFIG_ARM_LPAE 83 + extern void cpu_set_pte_ext(pte_t *ptep, pte_t pte); 84 + #else 86 85 extern void cpu_set_pte_ext(pte_t *ptep, pte_t pte, unsigned int ext); 86 + #endif 87 87 extern void cpu_reset(unsigned long addr) __attribute__((noreturn)); 88 88 89 89 /* These three are private to arch/arm/kernel/suspend.c */ ··· 115 107 116 108 #define cpu_switch_mm(pgd,mm) cpu_do_switch_mm(virt_to_phys(pgd),mm) 117 109 110 + #ifdef CONFIG_ARM_LPAE 111 + #define cpu_get_pgd() \ 112 + ({ \ 113 + unsigned long pg, pg2; \ 114 + __asm__("mrrc p15, 0, %0, %1, c2" \ 115 + : "=r" (pg), "=r" (pg2) \ 116 + : \ 117 + : "cc"); \ 118 + pg &= ~(PTRS_PER_PGD*sizeof(pgd_t)-1); \ 119 + (pgd_t *)phys_to_virt(pg); \ 120 + }) 121 + #else 118 122 #define cpu_get_pgd() \ 119 123 ({ \ 120 124 unsigned long pg; \ ··· 135 115 pg &= ~0x3fff; \ 136 116 (pgd_t *)phys_to_virt(pg); \ 137 117 }) 118 + #endif 138 119 139 120 #endif 140 121
+1 -107
arch/arm/include/asm/sched_clock.h
··· 8 8 #ifndef ASM_SCHED_CLOCK 9 9 #define ASM_SCHED_CLOCK 10 10 11 - #include <linux/kernel.h> 12 - #include <linux/types.h> 13 - 14 - struct clock_data { 15 - u64 epoch_ns; 16 - u32 epoch_cyc; 17 - u32 epoch_cyc_copy; 18 - u32 mult; 19 - u32 shift; 20 - }; 21 - 22 - #define DEFINE_CLOCK_DATA(name) struct clock_data name 23 - 24 - static inline u64 cyc_to_ns(u64 cyc, u32 mult, u32 shift) 25 - { 26 - return (cyc * mult) >> shift; 27 - } 28 - 29 - /* 30 - * Atomically update the sched_clock epoch. Your update callback will 31 - * be called from a timer before the counter wraps - read the current 32 - * counter value, and call this function to safely move the epochs 33 - * forward. Only use this from the update callback. 34 - */ 35 - static inline void update_sched_clock(struct clock_data *cd, u32 cyc, u32 mask) 36 - { 37 - unsigned long flags; 38 - u64 ns = cd->epoch_ns + 39 - cyc_to_ns((cyc - cd->epoch_cyc) & mask, cd->mult, cd->shift); 40 - 41 - /* 42 - * Write epoch_cyc and epoch_ns in a way that the update is 43 - * detectable in cyc_to_fixed_sched_clock(). 44 - */ 45 - raw_local_irq_save(flags); 46 - cd->epoch_cyc = cyc; 47 - smp_wmb(); 48 - cd->epoch_ns = ns; 49 - smp_wmb(); 50 - cd->epoch_cyc_copy = cyc; 51 - raw_local_irq_restore(flags); 52 - } 53 - 54 - /* 55 - * If your clock rate is known at compile time, using this will allow 56 - * you to optimize the mult/shift loads away. This is paired with 57 - * init_fixed_sched_clock() to ensure that your mult/shift are correct. 58 - */ 59 - static inline unsigned long long cyc_to_fixed_sched_clock(struct clock_data *cd, 60 - u32 cyc, u32 mask, u32 mult, u32 shift) 61 - { 62 - u64 epoch_ns; 63 - u32 epoch_cyc; 64 - 65 - /* 66 - * Load the epoch_cyc and epoch_ns atomically. We do this by 67 - * ensuring that we always write epoch_cyc, epoch_ns and 68 - * epoch_cyc_copy in strict order, and read them in strict order. 69 - * If epoch_cyc and epoch_cyc_copy are not equal, then we're in 70 - * the middle of an update, and we should repeat the load. 71 - */ 72 - do { 73 - epoch_cyc = cd->epoch_cyc; 74 - smp_rmb(); 75 - epoch_ns = cd->epoch_ns; 76 - smp_rmb(); 77 - } while (epoch_cyc != cd->epoch_cyc_copy); 78 - 79 - return epoch_ns + cyc_to_ns((cyc - epoch_cyc) & mask, mult, shift); 80 - } 81 - 82 - /* 83 - * Otherwise, you need to use this, which will obtain the mult/shift 84 - * from the clock_data structure. Use init_sched_clock() with this. 85 - */ 86 - static inline unsigned long long cyc_to_sched_clock(struct clock_data *cd, 87 - u32 cyc, u32 mask) 88 - { 89 - return cyc_to_fixed_sched_clock(cd, cyc, mask, cd->mult, cd->shift); 90 - } 91 - 92 - /* 93 - * Initialize the clock data - calculate the appropriate multiplier 94 - * and shift. Also setup a timer to ensure that the epoch is refreshed 95 - * at the appropriate time interval, which will call your update 96 - * handler. 97 - */ 98 - void init_sched_clock(struct clock_data *, void (*)(void), 99 - unsigned int, unsigned long); 100 - 101 - /* 102 - * Use this initialization function rather than init_sched_clock() if 103 - * you're using cyc_to_fixed_sched_clock, which will warn if your 104 - * constants are incorrect. 105 - */ 106 - static inline void init_fixed_sched_clock(struct clock_data *cd, 107 - void (*update)(void), unsigned int bits, unsigned long rate, 108 - u32 mult, u32 shift) 109 - { 110 - init_sched_clock(cd, update, bits, rate); 111 - if (cd->mult != mult || cd->shift != shift) { 112 - pr_crit("sched_clock: wrong multiply/shift: %u>>%u vs calculated %u>>%u\n" 113 - "sched_clock: fix multiply/shift to avoid scheduler hiccups\n", 114 - mult, shift, cd->mult, cd->shift); 115 - } 116 - } 117 - 118 11 extern void sched_clock_postinit(void); 12 + extern void setup_sched_clock(u32 (*read)(void), int bits, unsigned long rate); 119 13 120 14 #endif
+9
arch/arm/include/asm/system.h
··· 80 80 void arm_notify_die(const char *str, struct pt_regs *regs, struct siginfo *info, 81 81 unsigned long err, unsigned long trap); 82 82 83 + #ifdef CONFIG_ARM_LPAE 84 + #define FAULT_CODE_ALIGNMENT 33 85 + #define FAULT_CODE_DEBUG 34 86 + #else 87 + #define FAULT_CODE_ALIGNMENT 1 88 + #define FAULT_CODE_DEBUG 2 89 + #endif 90 + 83 91 void hook_fault_code(int nr, int (*fn)(unsigned long, unsigned int, 84 92 struct pt_regs *), 85 93 int sig, int code, const char *name); ··· 109 101 extern void cpu_init(void); 110 102 111 103 void arm_machine_restart(char mode, const char *cmd); 104 + void soft_restart(unsigned long); 112 105 extern void (*arm_pm_restart)(char str, const char *cmd); 113 106 114 107 #define UDBG_UNDEFINED (1 << 0)
+11 -1
arch/arm/include/asm/tlb.h
··· 202 202 tlb_remove_page(tlb, pte); 203 203 } 204 204 205 + static inline void __pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmdp, 206 + unsigned long addr) 207 + { 208 + #ifdef CONFIG_ARM_LPAE 209 + tlb_add_flush(tlb, addr); 210 + tlb_remove_page(tlb, virt_to_page(pmdp)); 211 + #endif 212 + } 213 + 205 214 #define pte_free_tlb(tlb, ptep, addr) __pte_free_tlb(tlb, ptep, addr) 206 - #define pmd_free_tlb(tlb, pmdp, addr) pmd_free((tlb)->mm, pmdp) 215 + #define pmd_free_tlb(tlb, pmdp, addr) __pmd_free_tlb(tlb, pmdp, addr) 216 + #define pud_free_tlb(tlb, pudp, addr) pud_free((tlb)->mm, pudp) 207 217 208 218 #define tlb_migrate_finish(mm) do { } while (0) 209 219
+3 -4
arch/arm/kernel/entry-armv.S
··· 36 36 #ifdef CONFIG_MULTI_IRQ_HANDLER 37 37 ldr r1, =handle_arch_irq 38 38 mov r0, sp 39 - ldr r1, [r1] 40 39 adr lr, BSYM(9997f) 41 - teq r1, #0 42 - movne pc, r1 43 - #endif 40 + ldr pc, [r1] 41 + #else 44 42 arch_irq_handler_default 43 + #endif 45 44 9997: 46 45 .endm 47 46
+55 -10
arch/arm/kernel/head.S
··· 39 39 #error KERNEL_RAM_VADDR must start at 0xXXXX8000 40 40 #endif 41 41 42 + #ifdef CONFIG_ARM_LPAE 43 + /* LPAE requires an additional page for the PGD */ 44 + #define PG_DIR_SIZE 0x5000 45 + #define PMD_ORDER 3 46 + #else 42 47 #define PG_DIR_SIZE 0x4000 43 48 #define PMD_ORDER 2 49 + #endif 44 50 45 51 .globl swapper_pg_dir 46 52 .equ swapper_pg_dir, KERNEL_RAM_VADDR - PG_DIR_SIZE ··· 170 164 teq r0, r6 171 165 bne 1b 172 166 167 + #ifdef CONFIG_ARM_LPAE 168 + /* 169 + * Build the PGD table (first level) to point to the PMD table. A PGD 170 + * entry is 64-bit wide. 171 + */ 172 + mov r0, r4 173 + add r3, r4, #0x1000 @ first PMD table address 174 + orr r3, r3, #3 @ PGD block type 175 + mov r6, #4 @ PTRS_PER_PGD 176 + mov r7, #1 << (55 - 32) @ L_PGD_SWAPPER 177 + 1: str r3, [r0], #4 @ set bottom PGD entry bits 178 + str r7, [r0], #4 @ set top PGD entry bits 179 + add r3, r3, #0x1000 @ next PMD table 180 + subs r6, r6, #1 181 + bne 1b 182 + 183 + add r4, r4, #0x1000 @ point to the PMD tables 184 + #endif 185 + 173 186 ldr r7, [r10, #PROCINFO_MM_MMUFLAGS] @ mm_mmuflags 174 187 175 188 /* 176 189 * Create identity mapping to cater for __enable_mmu. 177 190 * This identity mapping will be removed by paging_init(). 178 191 */ 179 - adr r0, __enable_mmu_loc 192 + adr r0, __turn_mmu_on_loc 180 193 ldmia r0, {r3, r5, r6} 181 194 sub r0, r0, r3 @ virt->phys offset 182 - add r5, r5, r0 @ phys __enable_mmu 183 - add r6, r6, r0 @ phys __enable_mmu_end 195 + add r5, r5, r0 @ phys __turn_mmu_on 196 + add r6, r6, r0 @ phys __turn_mmu_on_end 184 197 mov r5, r5, lsr #SECTION_SHIFT 185 198 mov r6, r6, lsr #SECTION_SHIFT 186 199 ··· 244 219 #endif 245 220 246 221 /* 247 - * Then map boot params address in r2 or 248 - * the first 1MB of ram if boot params address is not specified. 222 + * Then map boot params address in r2 or the first 1MB (2MB with LPAE) 223 + * of ram if boot params address is not specified. 249 224 */ 250 225 mov r0, r2, lsr #SECTION_SHIFT 251 226 movs r0, r0, lsl #SECTION_SHIFT ··· 276 251 mov r3, r7, lsr #SECTION_SHIFT 277 252 ldr r7, [r10, #PROCINFO_IO_MMUFLAGS] @ io_mmuflags 278 253 orr r3, r7, r3, lsl #SECTION_SHIFT 254 + #ifdef CONFIG_ARM_LPAE 255 + mov r7, #1 << (54 - 32) @ XN 256 + #else 257 + orr r3, r3, #PMD_SECT_XN 258 + #endif 279 259 1: str r3, [r0], #4 260 + #ifdef CONFIG_ARM_LPAE 261 + str r7, [r0], #4 262 + #endif 280 263 add r3, r3, #1 << SECTION_SHIFT 281 264 cmp r0, r6 282 265 blo 1b ··· 316 283 str r3, [r0] 317 284 #endif 318 285 #endif 286 + #ifdef CONFIG_ARM_LPAE 287 + sub r4, r4, #0x1000 @ point to the PGD table 288 + #endif 319 289 mov pc, lr 320 290 ENDPROC(__create_page_tables) 321 291 .ltorg 322 292 .align 323 - __enable_mmu_loc: 293 + __turn_mmu_on_loc: 324 294 .long . 325 - .long __enable_mmu 326 - .long __enable_mmu_end 295 + .long __turn_mmu_on 296 + .long __turn_mmu_on_end 327 297 328 298 #if defined(CONFIG_SMP) 329 299 __CPUINIT ··· 410 374 #ifdef CONFIG_CPU_ICACHE_DISABLE 411 375 bic r0, r0, #CR_I 412 376 #endif 377 + #ifdef CONFIG_ARM_LPAE 378 + mov r5, #0 379 + mcrr p15, 0, r4, r5, c2 @ load TTBR0 380 + #else 413 381 mov r5, #(domain_val(DOMAIN_USER, DOMAIN_MANAGER) | \ 414 382 domain_val(DOMAIN_KERNEL, DOMAIN_MANAGER) | \ 415 383 domain_val(DOMAIN_TABLE, DOMAIN_MANAGER) | \ 416 384 domain_val(DOMAIN_IO, DOMAIN_CLIENT)) 417 385 mcr p15, 0, r5, c3, c0, 0 @ load domain access register 418 386 mcr p15, 0, r4, c2, c0, 0 @ load page table pointer 387 + #endif 419 388 b __turn_mmu_on 420 389 ENDPROC(__enable_mmu) 421 390 ··· 439 398 * other registers depend on the function called upon completion 440 399 */ 441 400 .align 5 442 - __turn_mmu_on: 401 + .pushsection .idmap.text, "ax" 402 + ENTRY(__turn_mmu_on) 443 403 mov r0, r0 404 + instr_sync 444 405 mcr p15, 0, r0, c1, c0, 0 @ write control reg 445 406 mrc p15, 0, r3, c0, c0, 0 @ read id reg 407 + instr_sync 446 408 mov r3, r3 447 409 mov r3, r13 448 410 mov pc, r3 449 - __enable_mmu_end: 411 + __turn_mmu_on_end: 450 412 ENDPROC(__turn_mmu_on) 413 + .popsection 451 414 452 415 453 416 #ifdef CONFIG_SMP_ON_UP
+4 -4
arch/arm/kernel/hw_breakpoint.c
··· 1016 1016 } 1017 1017 1018 1018 /* Register debug fault handler. */ 1019 - hook_fault_code(2, hw_breakpoint_pending, SIGTRAP, TRAP_HWBKPT, 1020 - "watchpoint debug exception"); 1021 - hook_ifault_code(2, hw_breakpoint_pending, SIGTRAP, TRAP_HWBKPT, 1022 - "breakpoint debug exception"); 1019 + hook_fault_code(FAULT_CODE_DEBUG, hw_breakpoint_pending, SIGTRAP, 1020 + TRAP_HWBKPT, "watchpoint debug exception"); 1021 + hook_ifault_code(FAULT_CODE_DEBUG, hw_breakpoint_pending, SIGTRAP, 1022 + TRAP_HWBKPT, "breakpoint debug exception"); 1023 1023 1024 1024 /* Register hotplug notifier. */ 1025 1025 register_cpu_notifier(&dbg_reset_nb);
+3 -12
arch/arm/kernel/machine_kexec.c
··· 12 12 #include <asm/mmu_context.h> 13 13 #include <asm/cacheflush.h> 14 14 #include <asm/mach-types.h> 15 + #include <asm/system.h> 15 16 16 17 extern const unsigned char relocate_new_kernel[]; 17 18 extern const unsigned int relocate_new_kernel_size; 18 - 19 - extern void setup_mm_for_reboot(char mode); 20 19 21 20 extern unsigned long kexec_start_address; 22 21 extern unsigned long kexec_indirection_page; ··· 110 111 111 112 if (kexec_reinit) 112 113 kexec_reinit(); 113 - local_irq_disable(); 114 - local_fiq_disable(); 115 - setup_mm_for_reboot(0); /* mode is not used, so just pass 0*/ 116 - flush_cache_all(); 117 - outer_flush_all(); 118 - outer_disable(); 119 - cpu_proc_fin(); 120 - outer_inv_all(); 121 - flush_cache_all(); 122 - cpu_reset(reboot_code_buffer_phys); 114 + 115 + soft_restart(reboot_code_buffer_phys); 123 116 }
+9 -10
arch/arm/kernel/perf_event.c
··· 59 59 } 60 60 EXPORT_SYMBOL_GPL(armpmu_get_pmu_id); 61 61 62 - int 63 - armpmu_get_max_events(void) 62 + int perf_num_counters(void) 64 63 { 65 64 int max_events = 0; 66 65 ··· 67 68 max_events = cpu_pmu->num_events; 68 69 69 70 return max_events; 70 - } 71 - EXPORT_SYMBOL_GPL(armpmu_get_max_events); 72 - 73 - int perf_num_counters(void) 74 - { 75 - return armpmu_get_max_events(); 76 71 } 77 72 EXPORT_SYMBOL_GPL(perf_num_counters); 78 73 ··· 373 380 { 374 381 int i, irq, irqs; 375 382 struct platform_device *pmu_device = armpmu->plat_device; 383 + struct arm_pmu_platdata *plat = 384 + dev_get_platdata(&pmu_device->dev); 376 385 377 386 irqs = min(pmu_device->num_resources, num_possible_cpus()); 378 387 ··· 382 387 if (!cpumask_test_and_clear_cpu(i, &armpmu->active_irqs)) 383 388 continue; 384 389 irq = platform_get_irq(pmu_device, i); 385 - if (irq >= 0) 390 + if (irq >= 0) { 391 + if (plat && plat->disable_irq) 392 + plat->disable_irq(irq); 386 393 free_irq(irq, armpmu); 394 + } 387 395 } 388 396 389 397 release_pmu(armpmu->type); ··· 446 448 irq); 447 449 armpmu_release_hardware(armpmu); 448 450 return err; 449 - } 451 + } else if (plat && plat->enable_irq) 452 + plat->enable_irq(irq); 450 453 451 454 cpumask_set_cpu(i, &armpmu->active_irqs); 452 455 }
+18 -14
arch/arm/kernel/perf_event_v6.c
··· 65 65 * accesses/misses in hardware. 66 66 */ 67 67 static const unsigned armv6_perf_map[PERF_COUNT_HW_MAX] = { 68 - [PERF_COUNT_HW_CPU_CYCLES] = ARMV6_PERFCTR_CPU_CYCLES, 69 - [PERF_COUNT_HW_INSTRUCTIONS] = ARMV6_PERFCTR_INSTR_EXEC, 70 - [PERF_COUNT_HW_CACHE_REFERENCES] = HW_OP_UNSUPPORTED, 71 - [PERF_COUNT_HW_CACHE_MISSES] = HW_OP_UNSUPPORTED, 72 - [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV6_PERFCTR_BR_EXEC, 73 - [PERF_COUNT_HW_BRANCH_MISSES] = ARMV6_PERFCTR_BR_MISPREDICT, 74 - [PERF_COUNT_HW_BUS_CYCLES] = HW_OP_UNSUPPORTED, 68 + [PERF_COUNT_HW_CPU_CYCLES] = ARMV6_PERFCTR_CPU_CYCLES, 69 + [PERF_COUNT_HW_INSTRUCTIONS] = ARMV6_PERFCTR_INSTR_EXEC, 70 + [PERF_COUNT_HW_CACHE_REFERENCES] = HW_OP_UNSUPPORTED, 71 + [PERF_COUNT_HW_CACHE_MISSES] = HW_OP_UNSUPPORTED, 72 + [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV6_PERFCTR_BR_EXEC, 73 + [PERF_COUNT_HW_BRANCH_MISSES] = ARMV6_PERFCTR_BR_MISPREDICT, 74 + [PERF_COUNT_HW_BUS_CYCLES] = HW_OP_UNSUPPORTED, 75 + [PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = ARMV6_PERFCTR_IBUF_STALL, 76 + [PERF_COUNT_HW_STALLED_CYCLES_BACKEND] = ARMV6_PERFCTR_LSU_FULL_STALL, 75 77 }; 76 78 77 79 static const unsigned armv6_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] ··· 220 218 * accesses/misses in hardware. 221 219 */ 222 220 static const unsigned armv6mpcore_perf_map[PERF_COUNT_HW_MAX] = { 223 - [PERF_COUNT_HW_CPU_CYCLES] = ARMV6MPCORE_PERFCTR_CPU_CYCLES, 224 - [PERF_COUNT_HW_INSTRUCTIONS] = ARMV6MPCORE_PERFCTR_INSTR_EXEC, 225 - [PERF_COUNT_HW_CACHE_REFERENCES] = HW_OP_UNSUPPORTED, 226 - [PERF_COUNT_HW_CACHE_MISSES] = HW_OP_UNSUPPORTED, 227 - [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV6MPCORE_PERFCTR_BR_EXEC, 228 - [PERF_COUNT_HW_BRANCH_MISSES] = ARMV6MPCORE_PERFCTR_BR_MISPREDICT, 229 - [PERF_COUNT_HW_BUS_CYCLES] = HW_OP_UNSUPPORTED, 221 + [PERF_COUNT_HW_CPU_CYCLES] = ARMV6MPCORE_PERFCTR_CPU_CYCLES, 222 + [PERF_COUNT_HW_INSTRUCTIONS] = ARMV6MPCORE_PERFCTR_INSTR_EXEC, 223 + [PERF_COUNT_HW_CACHE_REFERENCES] = HW_OP_UNSUPPORTED, 224 + [PERF_COUNT_HW_CACHE_MISSES] = HW_OP_UNSUPPORTED, 225 + [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV6MPCORE_PERFCTR_BR_EXEC, 226 + [PERF_COUNT_HW_BRANCH_MISSES] = ARMV6MPCORE_PERFCTR_BR_MISPREDICT, 227 + [PERF_COUNT_HW_BUS_CYCLES] = HW_OP_UNSUPPORTED, 228 + [PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = ARMV6MPCORE_PERFCTR_IBUF_STALL, 229 + [PERF_COUNT_HW_STALLED_CYCLES_BACKEND] = ARMV6MPCORE_PERFCTR_LSU_FULL_STALL, 230 230 }; 231 231 232 232 static const unsigned armv6mpcore_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
+151 -248
arch/arm/kernel/perf_event_v7.c
··· 28 28 * they are not available. 29 29 */ 30 30 enum armv7_perf_types { 31 - ARMV7_PERFCTR_PMNC_SW_INCR = 0x00, 32 - ARMV7_PERFCTR_IFETCH_MISS = 0x01, 33 - ARMV7_PERFCTR_ITLB_MISS = 0x02, 34 - ARMV7_PERFCTR_DCACHE_REFILL = 0x03, /* L1 */ 35 - ARMV7_PERFCTR_DCACHE_ACCESS = 0x04, /* L1 */ 36 - ARMV7_PERFCTR_DTLB_REFILL = 0x05, 37 - ARMV7_PERFCTR_DREAD = 0x06, 38 - ARMV7_PERFCTR_DWRITE = 0x07, 39 - ARMV7_PERFCTR_INSTR_EXECUTED = 0x08, 40 - ARMV7_PERFCTR_EXC_TAKEN = 0x09, 41 - ARMV7_PERFCTR_EXC_EXECUTED = 0x0A, 42 - ARMV7_PERFCTR_CID_WRITE = 0x0B, 43 - /* ARMV7_PERFCTR_PC_WRITE is equivalent to HW_BRANCH_INSTRUCTIONS. 31 + ARMV7_PERFCTR_PMNC_SW_INCR = 0x00, 32 + ARMV7_PERFCTR_L1_ICACHE_REFILL = 0x01, 33 + ARMV7_PERFCTR_ITLB_REFILL = 0x02, 34 + ARMV7_PERFCTR_L1_DCACHE_REFILL = 0x03, 35 + ARMV7_PERFCTR_L1_DCACHE_ACCESS = 0x04, 36 + ARMV7_PERFCTR_DTLB_REFILL = 0x05, 37 + ARMV7_PERFCTR_MEM_READ = 0x06, 38 + ARMV7_PERFCTR_MEM_WRITE = 0x07, 39 + ARMV7_PERFCTR_INSTR_EXECUTED = 0x08, 40 + ARMV7_PERFCTR_EXC_TAKEN = 0x09, 41 + ARMV7_PERFCTR_EXC_EXECUTED = 0x0A, 42 + ARMV7_PERFCTR_CID_WRITE = 0x0B, 43 + 44 + /* 45 + * ARMV7_PERFCTR_PC_WRITE is equivalent to HW_BRANCH_INSTRUCTIONS. 44 46 * It counts: 45 - * - all branch instructions, 47 + * - all (taken) branch instructions, 46 48 * - instructions that explicitly write the PC, 47 49 * - exception generating instructions. 48 50 */ 49 - ARMV7_PERFCTR_PC_WRITE = 0x0C, 50 - ARMV7_PERFCTR_PC_IMM_BRANCH = 0x0D, 51 - ARMV7_PERFCTR_PC_PROC_RETURN = 0x0E, 52 - ARMV7_PERFCTR_UNALIGNED_ACCESS = 0x0F, 51 + ARMV7_PERFCTR_PC_WRITE = 0x0C, 52 + ARMV7_PERFCTR_PC_IMM_BRANCH = 0x0D, 53 + ARMV7_PERFCTR_PC_PROC_RETURN = 0x0E, 54 + ARMV7_PERFCTR_MEM_UNALIGNED_ACCESS = 0x0F, 55 + ARMV7_PERFCTR_PC_BRANCH_MIS_PRED = 0x10, 56 + ARMV7_PERFCTR_CLOCK_CYCLES = 0x11, 57 + ARMV7_PERFCTR_PC_BRANCH_PRED = 0x12, 53 58 54 59 /* These events are defined by the PMUv2 supplement (ARM DDI 0457A). */ 55 - ARMV7_PERFCTR_PC_BRANCH_MIS_PRED = 0x10, 56 - ARMV7_PERFCTR_CLOCK_CYCLES = 0x11, 57 - ARMV7_PERFCTR_PC_BRANCH_PRED = 0x12, 58 - ARMV7_PERFCTR_MEM_ACCESS = 0x13, 59 - ARMV7_PERFCTR_L1_ICACHE_ACCESS = 0x14, 60 - ARMV7_PERFCTR_L1_DCACHE_WB = 0x15, 61 - ARMV7_PERFCTR_L2_DCACHE_ACCESS = 0x16, 62 - ARMV7_PERFCTR_L2_DCACHE_REFILL = 0x17, 63 - ARMV7_PERFCTR_L2_DCACHE_WB = 0x18, 64 - ARMV7_PERFCTR_BUS_ACCESS = 0x19, 65 - ARMV7_PERFCTR_MEMORY_ERROR = 0x1A, 66 - ARMV7_PERFCTR_INSTR_SPEC = 0x1B, 67 - ARMV7_PERFCTR_TTBR_WRITE = 0x1C, 68 - ARMV7_PERFCTR_BUS_CYCLES = 0x1D, 60 + ARMV7_PERFCTR_MEM_ACCESS = 0x13, 61 + ARMV7_PERFCTR_L1_ICACHE_ACCESS = 0x14, 62 + ARMV7_PERFCTR_L1_DCACHE_WB = 0x15, 63 + ARMV7_PERFCTR_L2_CACHE_ACCESS = 0x16, 64 + ARMV7_PERFCTR_L2_CACHE_REFILL = 0x17, 65 + ARMV7_PERFCTR_L2_CACHE_WB = 0x18, 66 + ARMV7_PERFCTR_BUS_ACCESS = 0x19, 67 + ARMV7_PERFCTR_MEM_ERROR = 0x1A, 68 + ARMV7_PERFCTR_INSTR_SPEC = 0x1B, 69 + ARMV7_PERFCTR_TTBR_WRITE = 0x1C, 70 + ARMV7_PERFCTR_BUS_CYCLES = 0x1D, 69 71 70 - ARMV7_PERFCTR_CPU_CYCLES = 0xFF 72 + ARMV7_PERFCTR_CPU_CYCLES = 0xFF 71 73 }; 72 74 73 75 /* ARMv7 Cortex-A8 specific event types */ 74 76 enum armv7_a8_perf_types { 75 - ARMV7_PERFCTR_WRITE_BUFFER_FULL = 0x40, 76 - ARMV7_PERFCTR_L2_STORE_MERGED = 0x41, 77 - ARMV7_PERFCTR_L2_STORE_BUFF = 0x42, 78 - ARMV7_PERFCTR_L2_ACCESS = 0x43, 79 - ARMV7_PERFCTR_L2_CACH_MISS = 0x44, 80 - ARMV7_PERFCTR_AXI_READ_CYCLES = 0x45, 81 - ARMV7_PERFCTR_AXI_WRITE_CYCLES = 0x46, 82 - ARMV7_PERFCTR_MEMORY_REPLAY = 0x47, 83 - ARMV7_PERFCTR_UNALIGNED_ACCESS_REPLAY = 0x48, 84 - ARMV7_PERFCTR_L1_DATA_MISS = 0x49, 85 - ARMV7_PERFCTR_L1_INST_MISS = 0x4A, 86 - ARMV7_PERFCTR_L1_DATA_COLORING = 0x4B, 87 - ARMV7_PERFCTR_L1_NEON_DATA = 0x4C, 88 - ARMV7_PERFCTR_L1_NEON_CACH_DATA = 0x4D, 89 - ARMV7_PERFCTR_L2_NEON = 0x4E, 90 - ARMV7_PERFCTR_L2_NEON_HIT = 0x4F, 91 - ARMV7_PERFCTR_L1_INST = 0x50, 92 - ARMV7_PERFCTR_PC_RETURN_MIS_PRED = 0x51, 93 - ARMV7_PERFCTR_PC_BRANCH_FAILED = 0x52, 94 - ARMV7_PERFCTR_PC_BRANCH_TAKEN = 0x53, 95 - ARMV7_PERFCTR_PC_BRANCH_EXECUTED = 0x54, 96 - ARMV7_PERFCTR_OP_EXECUTED = 0x55, 97 - ARMV7_PERFCTR_CYCLES_INST_STALL = 0x56, 98 - ARMV7_PERFCTR_CYCLES_INST = 0x57, 99 - ARMV7_PERFCTR_CYCLES_NEON_DATA_STALL = 0x58, 100 - ARMV7_PERFCTR_CYCLES_NEON_INST_STALL = 0x59, 101 - ARMV7_PERFCTR_NEON_CYCLES = 0x5A, 102 - 103 - ARMV7_PERFCTR_PMU0_EVENTS = 0x70, 104 - ARMV7_PERFCTR_PMU1_EVENTS = 0x71, 105 - ARMV7_PERFCTR_PMU_EVENTS = 0x72, 77 + ARMV7_A8_PERFCTR_L2_CACHE_ACCESS = 0x43, 78 + ARMV7_A8_PERFCTR_L2_CACHE_REFILL = 0x44, 79 + ARMV7_A8_PERFCTR_L1_ICACHE_ACCESS = 0x50, 80 + ARMV7_A8_PERFCTR_STALL_ISIDE = 0x56, 106 81 }; 107 82 108 83 /* ARMv7 Cortex-A9 specific event types */ 109 84 enum armv7_a9_perf_types { 110 - ARMV7_PERFCTR_JAVA_HW_BYTECODE_EXEC = 0x40, 111 - ARMV7_PERFCTR_JAVA_SW_BYTECODE_EXEC = 0x41, 112 - ARMV7_PERFCTR_JAZELLE_BRANCH_EXEC = 0x42, 113 - 114 - ARMV7_PERFCTR_COHERENT_LINE_MISS = 0x50, 115 - ARMV7_PERFCTR_COHERENT_LINE_HIT = 0x51, 116 - 117 - ARMV7_PERFCTR_ICACHE_DEP_STALL_CYCLES = 0x60, 118 - ARMV7_PERFCTR_DCACHE_DEP_STALL_CYCLES = 0x61, 119 - ARMV7_PERFCTR_TLB_MISS_DEP_STALL_CYCLES = 0x62, 120 - ARMV7_PERFCTR_STREX_EXECUTED_PASSED = 0x63, 121 - ARMV7_PERFCTR_STREX_EXECUTED_FAILED = 0x64, 122 - ARMV7_PERFCTR_DATA_EVICTION = 0x65, 123 - ARMV7_PERFCTR_ISSUE_STAGE_NO_INST = 0x66, 124 - ARMV7_PERFCTR_ISSUE_STAGE_EMPTY = 0x67, 125 - ARMV7_PERFCTR_INST_OUT_OF_RENAME_STAGE = 0x68, 126 - 127 - ARMV7_PERFCTR_PREDICTABLE_FUNCT_RETURNS = 0x6E, 128 - 129 - ARMV7_PERFCTR_MAIN_UNIT_EXECUTED_INST = 0x70, 130 - ARMV7_PERFCTR_SECOND_UNIT_EXECUTED_INST = 0x71, 131 - ARMV7_PERFCTR_LD_ST_UNIT_EXECUTED_INST = 0x72, 132 - ARMV7_PERFCTR_FP_EXECUTED_INST = 0x73, 133 - ARMV7_PERFCTR_NEON_EXECUTED_INST = 0x74, 134 - 135 - ARMV7_PERFCTR_PLD_FULL_DEP_STALL_CYCLES = 0x80, 136 - ARMV7_PERFCTR_DATA_WR_DEP_STALL_CYCLES = 0x81, 137 - ARMV7_PERFCTR_ITLB_MISS_DEP_STALL_CYCLES = 0x82, 138 - ARMV7_PERFCTR_DTLB_MISS_DEP_STALL_CYCLES = 0x83, 139 - ARMV7_PERFCTR_MICRO_ITLB_MISS_DEP_STALL_CYCLES = 0x84, 140 - ARMV7_PERFCTR_MICRO_DTLB_MISS_DEP_STALL_CYCLES = 0x85, 141 - ARMV7_PERFCTR_DMB_DEP_STALL_CYCLES = 0x86, 142 - 143 - ARMV7_PERFCTR_INTGR_CLK_ENABLED_CYCLES = 0x8A, 144 - ARMV7_PERFCTR_DATA_ENGINE_CLK_EN_CYCLES = 0x8B, 145 - 146 - ARMV7_PERFCTR_ISB_INST = 0x90, 147 - ARMV7_PERFCTR_DSB_INST = 0x91, 148 - ARMV7_PERFCTR_DMB_INST = 0x92, 149 - ARMV7_PERFCTR_EXT_INTERRUPTS = 0x93, 150 - 151 - ARMV7_PERFCTR_PLE_CACHE_LINE_RQST_COMPLETED = 0xA0, 152 - ARMV7_PERFCTR_PLE_CACHE_LINE_RQST_SKIPPED = 0xA1, 153 - ARMV7_PERFCTR_PLE_FIFO_FLUSH = 0xA2, 154 - ARMV7_PERFCTR_PLE_RQST_COMPLETED = 0xA3, 155 - ARMV7_PERFCTR_PLE_FIFO_OVERFLOW = 0xA4, 156 - ARMV7_PERFCTR_PLE_RQST_PROG = 0xA5 85 + ARMV7_A9_PERFCTR_INSTR_CORE_RENAME = 0x68, 86 + ARMV7_A9_PERFCTR_STALL_ICACHE = 0x60, 87 + ARMV7_A9_PERFCTR_STALL_DISPATCH = 0x66, 157 88 }; 158 89 159 90 /* ARMv7 Cortex-A5 specific event types */ 160 91 enum armv7_a5_perf_types { 161 - ARMV7_PERFCTR_IRQ_TAKEN = 0x86, 162 - ARMV7_PERFCTR_FIQ_TAKEN = 0x87, 163 - 164 - ARMV7_PERFCTR_EXT_MEM_RQST = 0xc0, 165 - ARMV7_PERFCTR_NC_EXT_MEM_RQST = 0xc1, 166 - ARMV7_PERFCTR_PREFETCH_LINEFILL = 0xc2, 167 - ARMV7_PERFCTR_PREFETCH_LINEFILL_DROP = 0xc3, 168 - ARMV7_PERFCTR_ENTER_READ_ALLOC = 0xc4, 169 - ARMV7_PERFCTR_READ_ALLOC = 0xc5, 170 - 171 - ARMV7_PERFCTR_STALL_SB_FULL = 0xc9, 92 + ARMV7_A5_PERFCTR_PREFETCH_LINEFILL = 0xc2, 93 + ARMV7_A5_PERFCTR_PREFETCH_LINEFILL_DROP = 0xc3, 172 94 }; 173 95 174 96 /* ARMv7 Cortex-A15 specific event types */ 175 97 enum armv7_a15_perf_types { 176 - ARMV7_PERFCTR_L1_DCACHE_READ_ACCESS = 0x40, 177 - ARMV7_PERFCTR_L1_DCACHE_WRITE_ACCESS = 0x41, 178 - ARMV7_PERFCTR_L1_DCACHE_READ_REFILL = 0x42, 179 - ARMV7_PERFCTR_L1_DCACHE_WRITE_REFILL = 0x43, 98 + ARMV7_A15_PERFCTR_L1_DCACHE_ACCESS_READ = 0x40, 99 + ARMV7_A15_PERFCTR_L1_DCACHE_ACCESS_WRITE = 0x41, 100 + ARMV7_A15_PERFCTR_L1_DCACHE_REFILL_READ = 0x42, 101 + ARMV7_A15_PERFCTR_L1_DCACHE_REFILL_WRITE = 0x43, 180 102 181 - ARMV7_PERFCTR_L1_DTLB_READ_REFILL = 0x4C, 182 - ARMV7_PERFCTR_L1_DTLB_WRITE_REFILL = 0x4D, 103 + ARMV7_A15_PERFCTR_DTLB_REFILL_L1_READ = 0x4C, 104 + ARMV7_A15_PERFCTR_DTLB_REFILL_L1_WRITE = 0x4D, 183 105 184 - ARMV7_PERFCTR_L2_DCACHE_READ_ACCESS = 0x50, 185 - ARMV7_PERFCTR_L2_DCACHE_WRITE_ACCESS = 0x51, 186 - ARMV7_PERFCTR_L2_DCACHE_READ_REFILL = 0x52, 187 - ARMV7_PERFCTR_L2_DCACHE_WRITE_REFILL = 0x53, 106 + ARMV7_A15_PERFCTR_L2_CACHE_ACCESS_READ = 0x50, 107 + ARMV7_A15_PERFCTR_L2_CACHE_ACCESS_WRITE = 0x51, 108 + ARMV7_A15_PERFCTR_L2_CACHE_REFILL_READ = 0x52, 109 + ARMV7_A15_PERFCTR_L2_CACHE_REFILL_WRITE = 0x53, 188 110 189 - ARMV7_PERFCTR_SPEC_PC_WRITE = 0x76, 111 + ARMV7_A15_PERFCTR_PC_WRITE_SPEC = 0x76, 190 112 }; 191 113 192 114 /* ··· 119 197 * accesses/misses in hardware. 120 198 */ 121 199 static const unsigned armv7_a8_perf_map[PERF_COUNT_HW_MAX] = { 122 - [PERF_COUNT_HW_CPU_CYCLES] = ARMV7_PERFCTR_CPU_CYCLES, 123 - [PERF_COUNT_HW_INSTRUCTIONS] = ARMV7_PERFCTR_INSTR_EXECUTED, 124 - [PERF_COUNT_HW_CACHE_REFERENCES] = HW_OP_UNSUPPORTED, 125 - [PERF_COUNT_HW_CACHE_MISSES] = HW_OP_UNSUPPORTED, 126 - [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV7_PERFCTR_PC_WRITE, 127 - [PERF_COUNT_HW_BRANCH_MISSES] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, 128 - [PERF_COUNT_HW_BUS_CYCLES] = ARMV7_PERFCTR_CLOCK_CYCLES, 200 + [PERF_COUNT_HW_CPU_CYCLES] = ARMV7_PERFCTR_CPU_CYCLES, 201 + [PERF_COUNT_HW_INSTRUCTIONS] = ARMV7_PERFCTR_INSTR_EXECUTED, 202 + [PERF_COUNT_HW_CACHE_REFERENCES] = ARMV7_PERFCTR_L1_DCACHE_ACCESS, 203 + [PERF_COUNT_HW_CACHE_MISSES] = ARMV7_PERFCTR_L1_DCACHE_REFILL, 204 + [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV7_PERFCTR_PC_WRITE, 205 + [PERF_COUNT_HW_BRANCH_MISSES] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, 206 + [PERF_COUNT_HW_BUS_CYCLES] = HW_OP_UNSUPPORTED, 207 + [PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = ARMV7_A8_PERFCTR_STALL_ISIDE, 208 + [PERF_COUNT_HW_STALLED_CYCLES_BACKEND] = HW_OP_UNSUPPORTED, 129 209 }; 130 210 131 211 static const unsigned armv7_a8_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] ··· 141 217 * combined. 142 218 */ 143 219 [C(OP_READ)] = { 144 - [C(RESULT_ACCESS)] = ARMV7_PERFCTR_DCACHE_ACCESS, 145 - [C(RESULT_MISS)] = ARMV7_PERFCTR_DCACHE_REFILL, 220 + [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_DCACHE_ACCESS, 221 + [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_DCACHE_REFILL, 146 222 }, 147 223 [C(OP_WRITE)] = { 148 - [C(RESULT_ACCESS)] = ARMV7_PERFCTR_DCACHE_ACCESS, 149 - [C(RESULT_MISS)] = ARMV7_PERFCTR_DCACHE_REFILL, 224 + [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_DCACHE_ACCESS, 225 + [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_DCACHE_REFILL, 150 226 }, 151 227 [C(OP_PREFETCH)] = { 152 228 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, ··· 155 231 }, 156 232 [C(L1I)] = { 157 233 [C(OP_READ)] = { 158 - [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_INST, 159 - [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_INST_MISS, 234 + [C(RESULT_ACCESS)] = ARMV7_A8_PERFCTR_L1_ICACHE_ACCESS, 235 + [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, 160 236 }, 161 237 [C(OP_WRITE)] = { 162 - [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_INST, 163 - [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_INST_MISS, 238 + [C(RESULT_ACCESS)] = ARMV7_A8_PERFCTR_L1_ICACHE_ACCESS, 239 + [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, 164 240 }, 165 241 [C(OP_PREFETCH)] = { 166 242 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, ··· 169 245 }, 170 246 [C(LL)] = { 171 247 [C(OP_READ)] = { 172 - [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L2_ACCESS, 173 - [C(RESULT_MISS)] = ARMV7_PERFCTR_L2_CACH_MISS, 248 + [C(RESULT_ACCESS)] = ARMV7_A8_PERFCTR_L2_CACHE_ACCESS, 249 + [C(RESULT_MISS)] = ARMV7_A8_PERFCTR_L2_CACHE_REFILL, 174 250 }, 175 251 [C(OP_WRITE)] = { 176 - [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L2_ACCESS, 177 - [C(RESULT_MISS)] = ARMV7_PERFCTR_L2_CACH_MISS, 252 + [C(RESULT_ACCESS)] = ARMV7_A8_PERFCTR_L2_CACHE_ACCESS, 253 + [C(RESULT_MISS)] = ARMV7_A8_PERFCTR_L2_CACHE_REFILL, 178 254 }, 179 255 [C(OP_PREFETCH)] = { 180 256 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, ··· 198 274 [C(ITLB)] = { 199 275 [C(OP_READ)] = { 200 276 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, 201 - [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_MISS, 277 + [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_REFILL, 202 278 }, 203 279 [C(OP_WRITE)] = { 204 280 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, 205 - [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_MISS, 281 + [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_REFILL, 206 282 }, 207 283 [C(OP_PREFETCH)] = { 208 284 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, ··· 211 287 }, 212 288 [C(BPU)] = { 213 289 [C(OP_READ)] = { 214 - [C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_WRITE, 215 - [C(RESULT_MISS)] 216 - = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, 290 + [C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_BRANCH_PRED, 291 + [C(RESULT_MISS)] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, 217 292 }, 218 293 [C(OP_WRITE)] = { 219 - [C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_WRITE, 220 - [C(RESULT_MISS)] 221 - = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, 294 + [C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_BRANCH_PRED, 295 + [C(RESULT_MISS)] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, 222 296 }, 223 297 [C(OP_PREFETCH)] = { 224 298 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, ··· 243 321 * Cortex-A9 HW events mapping 244 322 */ 245 323 static const unsigned armv7_a9_perf_map[PERF_COUNT_HW_MAX] = { 246 - [PERF_COUNT_HW_CPU_CYCLES] = ARMV7_PERFCTR_CPU_CYCLES, 247 - [PERF_COUNT_HW_INSTRUCTIONS] = 248 - ARMV7_PERFCTR_INST_OUT_OF_RENAME_STAGE, 249 - [PERF_COUNT_HW_CACHE_REFERENCES] = ARMV7_PERFCTR_DCACHE_ACCESS, 250 - [PERF_COUNT_HW_CACHE_MISSES] = ARMV7_PERFCTR_DCACHE_REFILL, 251 - [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV7_PERFCTR_PC_WRITE, 252 - [PERF_COUNT_HW_BRANCH_MISSES] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, 253 - [PERF_COUNT_HW_BUS_CYCLES] = ARMV7_PERFCTR_CLOCK_CYCLES, 324 + [PERF_COUNT_HW_CPU_CYCLES] = ARMV7_PERFCTR_CPU_CYCLES, 325 + [PERF_COUNT_HW_INSTRUCTIONS] = ARMV7_A9_PERFCTR_INSTR_CORE_RENAME, 326 + [PERF_COUNT_HW_CACHE_REFERENCES] = ARMV7_PERFCTR_L1_DCACHE_ACCESS, 327 + [PERF_COUNT_HW_CACHE_MISSES] = ARMV7_PERFCTR_L1_DCACHE_REFILL, 328 + [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV7_PERFCTR_PC_WRITE, 329 + [PERF_COUNT_HW_BRANCH_MISSES] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, 330 + [PERF_COUNT_HW_BUS_CYCLES] = HW_OP_UNSUPPORTED, 331 + [PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = ARMV7_A9_PERFCTR_STALL_ICACHE, 332 + [PERF_COUNT_HW_STALLED_CYCLES_BACKEND] = ARMV7_A9_PERFCTR_STALL_DISPATCH, 254 333 }; 255 334 256 335 static const unsigned armv7_a9_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] ··· 265 342 * combined. 266 343 */ 267 344 [C(OP_READ)] = { 268 - [C(RESULT_ACCESS)] = ARMV7_PERFCTR_DCACHE_ACCESS, 269 - [C(RESULT_MISS)] = ARMV7_PERFCTR_DCACHE_REFILL, 345 + [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_DCACHE_ACCESS, 346 + [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_DCACHE_REFILL, 270 347 }, 271 348 [C(OP_WRITE)] = { 272 - [C(RESULT_ACCESS)] = ARMV7_PERFCTR_DCACHE_ACCESS, 273 - [C(RESULT_MISS)] = ARMV7_PERFCTR_DCACHE_REFILL, 349 + [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_DCACHE_ACCESS, 350 + [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_DCACHE_REFILL, 274 351 }, 275 352 [C(OP_PREFETCH)] = { 276 353 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, ··· 280 357 [C(L1I)] = { 281 358 [C(OP_READ)] = { 282 359 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, 283 - [C(RESULT_MISS)] = ARMV7_PERFCTR_IFETCH_MISS, 360 + [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, 284 361 }, 285 362 [C(OP_WRITE)] = { 286 363 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, 287 - [C(RESULT_MISS)] = ARMV7_PERFCTR_IFETCH_MISS, 364 + [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, 288 365 }, 289 366 [C(OP_PREFETCH)] = { 290 367 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, ··· 322 399 [C(ITLB)] = { 323 400 [C(OP_READ)] = { 324 401 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, 325 - [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_MISS, 402 + [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_REFILL, 326 403 }, 327 404 [C(OP_WRITE)] = { 328 405 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, 329 - [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_MISS, 406 + [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_REFILL, 330 407 }, 331 408 [C(OP_PREFETCH)] = { 332 409 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, ··· 335 412 }, 336 413 [C(BPU)] = { 337 414 [C(OP_READ)] = { 338 - [C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_WRITE, 339 - [C(RESULT_MISS)] 340 - = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, 415 + [C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_BRANCH_PRED, 416 + [C(RESULT_MISS)] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, 341 417 }, 342 418 [C(OP_WRITE)] = { 343 - [C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_WRITE, 344 - [C(RESULT_MISS)] 345 - = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, 419 + [C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_BRANCH_PRED, 420 + [C(RESULT_MISS)] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, 346 421 }, 347 422 [C(OP_PREFETCH)] = { 348 423 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, ··· 367 446 * Cortex-A5 HW events mapping 368 447 */ 369 448 static const unsigned armv7_a5_perf_map[PERF_COUNT_HW_MAX] = { 370 - [PERF_COUNT_HW_CPU_CYCLES] = ARMV7_PERFCTR_CPU_CYCLES, 371 - [PERF_COUNT_HW_INSTRUCTIONS] = ARMV7_PERFCTR_INSTR_EXECUTED, 372 - [PERF_COUNT_HW_CACHE_REFERENCES] = HW_OP_UNSUPPORTED, 373 - [PERF_COUNT_HW_CACHE_MISSES] = HW_OP_UNSUPPORTED, 374 - [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV7_PERFCTR_PC_WRITE, 375 - [PERF_COUNT_HW_BRANCH_MISSES] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, 376 - [PERF_COUNT_HW_BUS_CYCLES] = HW_OP_UNSUPPORTED, 449 + [PERF_COUNT_HW_CPU_CYCLES] = ARMV7_PERFCTR_CPU_CYCLES, 450 + [PERF_COUNT_HW_INSTRUCTIONS] = ARMV7_PERFCTR_INSTR_EXECUTED, 451 + [PERF_COUNT_HW_CACHE_REFERENCES] = ARMV7_PERFCTR_L1_DCACHE_ACCESS, 452 + [PERF_COUNT_HW_CACHE_MISSES] = ARMV7_PERFCTR_L1_DCACHE_REFILL, 453 + [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV7_PERFCTR_PC_WRITE, 454 + [PERF_COUNT_HW_BRANCH_MISSES] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, 455 + [PERF_COUNT_HW_BUS_CYCLES] = HW_OP_UNSUPPORTED, 456 + [PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = HW_OP_UNSUPPORTED, 457 + [PERF_COUNT_HW_STALLED_CYCLES_BACKEND] = HW_OP_UNSUPPORTED, 377 458 }; 378 459 379 460 static const unsigned armv7_a5_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] ··· 383 460 [PERF_COUNT_HW_CACHE_RESULT_MAX] = { 384 461 [C(L1D)] = { 385 462 [C(OP_READ)] = { 386 - [C(RESULT_ACCESS)] 387 - = ARMV7_PERFCTR_DCACHE_ACCESS, 388 - [C(RESULT_MISS)] 389 - = ARMV7_PERFCTR_DCACHE_REFILL, 463 + [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_DCACHE_ACCESS, 464 + [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_DCACHE_REFILL, 390 465 }, 391 466 [C(OP_WRITE)] = { 392 - [C(RESULT_ACCESS)] 393 - = ARMV7_PERFCTR_DCACHE_ACCESS, 394 - [C(RESULT_MISS)] 395 - = ARMV7_PERFCTR_DCACHE_REFILL, 467 + [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_DCACHE_ACCESS, 468 + [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_DCACHE_REFILL, 396 469 }, 397 470 [C(OP_PREFETCH)] = { 398 - [C(RESULT_ACCESS)] 399 - = ARMV7_PERFCTR_PREFETCH_LINEFILL, 400 - [C(RESULT_MISS)] 401 - = ARMV7_PERFCTR_PREFETCH_LINEFILL_DROP, 471 + [C(RESULT_ACCESS)] = ARMV7_A5_PERFCTR_PREFETCH_LINEFILL, 472 + [C(RESULT_MISS)] = ARMV7_A5_PERFCTR_PREFETCH_LINEFILL_DROP, 402 473 }, 403 474 }, 404 475 [C(L1I)] = { 405 476 [C(OP_READ)] = { 406 477 [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_ICACHE_ACCESS, 407 - [C(RESULT_MISS)] = ARMV7_PERFCTR_IFETCH_MISS, 478 + [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, 408 479 }, 409 480 [C(OP_WRITE)] = { 410 481 [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_ICACHE_ACCESS, 411 - [C(RESULT_MISS)] = ARMV7_PERFCTR_IFETCH_MISS, 482 + [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, 412 483 }, 413 484 /* 414 485 * The prefetch counters don't differentiate between the I 415 486 * side and the D side. 416 487 */ 417 488 [C(OP_PREFETCH)] = { 418 - [C(RESULT_ACCESS)] 419 - = ARMV7_PERFCTR_PREFETCH_LINEFILL, 420 - [C(RESULT_MISS)] 421 - = ARMV7_PERFCTR_PREFETCH_LINEFILL_DROP, 489 + [C(RESULT_ACCESS)] = ARMV7_A5_PERFCTR_PREFETCH_LINEFILL, 490 + [C(RESULT_MISS)] = ARMV7_A5_PERFCTR_PREFETCH_LINEFILL_DROP, 422 491 }, 423 492 }, 424 493 [C(LL)] = { ··· 444 529 [C(ITLB)] = { 445 530 [C(OP_READ)] = { 446 531 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, 447 - [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_MISS, 532 + [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_REFILL, 448 533 }, 449 534 [C(OP_WRITE)] = { 450 535 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, 451 - [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_MISS, 536 + [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_REFILL, 452 537 }, 453 538 [C(OP_PREFETCH)] = { 454 539 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, ··· 458 543 [C(BPU)] = { 459 544 [C(OP_READ)] = { 460 545 [C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_BRANCH_PRED, 461 - [C(RESULT_MISS)] 462 - = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, 546 + [C(RESULT_MISS)] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, 463 547 }, 464 548 [C(OP_WRITE)] = { 465 549 [C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_BRANCH_PRED, 466 - [C(RESULT_MISS)] 467 - = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, 550 + [C(RESULT_MISS)] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, 468 551 }, 469 552 [C(OP_PREFETCH)] = { 470 553 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, ··· 475 562 * Cortex-A15 HW events mapping 476 563 */ 477 564 static const unsigned armv7_a15_perf_map[PERF_COUNT_HW_MAX] = { 478 - [PERF_COUNT_HW_CPU_CYCLES] = ARMV7_PERFCTR_CPU_CYCLES, 479 - [PERF_COUNT_HW_INSTRUCTIONS] = ARMV7_PERFCTR_INSTR_EXECUTED, 480 - [PERF_COUNT_HW_CACHE_REFERENCES] = HW_OP_UNSUPPORTED, 481 - [PERF_COUNT_HW_CACHE_MISSES] = HW_OP_UNSUPPORTED, 482 - [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV7_PERFCTR_SPEC_PC_WRITE, 483 - [PERF_COUNT_HW_BRANCH_MISSES] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, 484 - [PERF_COUNT_HW_BUS_CYCLES] = ARMV7_PERFCTR_BUS_CYCLES, 565 + [PERF_COUNT_HW_CPU_CYCLES] = ARMV7_PERFCTR_CPU_CYCLES, 566 + [PERF_COUNT_HW_INSTRUCTIONS] = ARMV7_PERFCTR_INSTR_EXECUTED, 567 + [PERF_COUNT_HW_CACHE_REFERENCES] = ARMV7_PERFCTR_L1_DCACHE_ACCESS, 568 + [PERF_COUNT_HW_CACHE_MISSES] = ARMV7_PERFCTR_L1_DCACHE_REFILL, 569 + [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV7_A15_PERFCTR_PC_WRITE_SPEC, 570 + [PERF_COUNT_HW_BRANCH_MISSES] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, 571 + [PERF_COUNT_HW_BUS_CYCLES] = ARMV7_PERFCTR_BUS_CYCLES, 572 + [PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = HW_OP_UNSUPPORTED, 573 + [PERF_COUNT_HW_STALLED_CYCLES_BACKEND] = HW_OP_UNSUPPORTED, 485 574 }; 486 575 487 576 static const unsigned armv7_a15_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] ··· 491 576 [PERF_COUNT_HW_CACHE_RESULT_MAX] = { 492 577 [C(L1D)] = { 493 578 [C(OP_READ)] = { 494 - [C(RESULT_ACCESS)] 495 - = ARMV7_PERFCTR_L1_DCACHE_READ_ACCESS, 496 - [C(RESULT_MISS)] 497 - = ARMV7_PERFCTR_L1_DCACHE_READ_REFILL, 579 + [C(RESULT_ACCESS)] = ARMV7_A15_PERFCTR_L1_DCACHE_ACCESS_READ, 580 + [C(RESULT_MISS)] = ARMV7_A15_PERFCTR_L1_DCACHE_REFILL_READ, 498 581 }, 499 582 [C(OP_WRITE)] = { 500 - [C(RESULT_ACCESS)] 501 - = ARMV7_PERFCTR_L1_DCACHE_WRITE_ACCESS, 502 - [C(RESULT_MISS)] 503 - = ARMV7_PERFCTR_L1_DCACHE_WRITE_REFILL, 583 + [C(RESULT_ACCESS)] = ARMV7_A15_PERFCTR_L1_DCACHE_ACCESS_WRITE, 584 + [C(RESULT_MISS)] = ARMV7_A15_PERFCTR_L1_DCACHE_REFILL_WRITE, 504 585 }, 505 586 [C(OP_PREFETCH)] = { 506 587 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, ··· 512 601 */ 513 602 [C(OP_READ)] = { 514 603 [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_ICACHE_ACCESS, 515 - [C(RESULT_MISS)] = ARMV7_PERFCTR_IFETCH_MISS, 604 + [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, 516 605 }, 517 606 [C(OP_WRITE)] = { 518 607 [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_ICACHE_ACCESS, 519 - [C(RESULT_MISS)] = ARMV7_PERFCTR_IFETCH_MISS, 608 + [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, 520 609 }, 521 610 [C(OP_PREFETCH)] = { 522 611 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, ··· 525 614 }, 526 615 [C(LL)] = { 527 616 [C(OP_READ)] = { 528 - [C(RESULT_ACCESS)] 529 - = ARMV7_PERFCTR_L2_DCACHE_READ_ACCESS, 530 - [C(RESULT_MISS)] 531 - = ARMV7_PERFCTR_L2_DCACHE_READ_REFILL, 617 + [C(RESULT_ACCESS)] = ARMV7_A15_PERFCTR_L2_CACHE_ACCESS_READ, 618 + [C(RESULT_MISS)] = ARMV7_A15_PERFCTR_L2_CACHE_REFILL_READ, 532 619 }, 533 620 [C(OP_WRITE)] = { 534 - [C(RESULT_ACCESS)] 535 - = ARMV7_PERFCTR_L2_DCACHE_WRITE_ACCESS, 536 - [C(RESULT_MISS)] 537 - = ARMV7_PERFCTR_L2_DCACHE_WRITE_REFILL, 621 + [C(RESULT_ACCESS)] = ARMV7_A15_PERFCTR_L2_CACHE_ACCESS_WRITE, 622 + [C(RESULT_MISS)] = ARMV7_A15_PERFCTR_L2_CACHE_REFILL_WRITE, 538 623 }, 539 624 [C(OP_PREFETCH)] = { 540 625 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, ··· 540 633 [C(DTLB)] = { 541 634 [C(OP_READ)] = { 542 635 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, 543 - [C(RESULT_MISS)] 544 - = ARMV7_PERFCTR_L1_DTLB_READ_REFILL, 636 + [C(RESULT_MISS)] = ARMV7_A15_PERFCTR_DTLB_REFILL_L1_READ, 545 637 }, 546 638 [C(OP_WRITE)] = { 547 639 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, 548 - [C(RESULT_MISS)] 549 - = ARMV7_PERFCTR_L1_DTLB_WRITE_REFILL, 640 + [C(RESULT_MISS)] = ARMV7_A15_PERFCTR_DTLB_REFILL_L1_WRITE, 550 641 }, 551 642 [C(OP_PREFETCH)] = { 552 643 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, ··· 554 649 [C(ITLB)] = { 555 650 [C(OP_READ)] = { 556 651 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, 557 - [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_MISS, 652 + [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_REFILL, 558 653 }, 559 654 [C(OP_WRITE)] = { 560 655 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, 561 - [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_MISS, 656 + [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_REFILL, 562 657 }, 563 658 [C(OP_PREFETCH)] = { 564 659 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, ··· 568 663 [C(BPU)] = { 569 664 [C(OP_READ)] = { 570 665 [C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_BRANCH_PRED, 571 - [C(RESULT_MISS)] 572 - = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, 666 + [C(RESULT_MISS)] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, 573 667 }, 574 668 [C(OP_WRITE)] = { 575 669 [C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_BRANCH_PRED, 576 - [C(RESULT_MISS)] 577 - = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, 670 + [C(RESULT_MISS)] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, 578 671 }, 579 672 [C(OP_PREFETCH)] = { 580 673 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
+9 -7
arch/arm/kernel/perf_event_xscale.c
··· 48 48 }; 49 49 50 50 static const unsigned xscale_perf_map[PERF_COUNT_HW_MAX] = { 51 - [PERF_COUNT_HW_CPU_CYCLES] = XSCALE_PERFCTR_CCNT, 52 - [PERF_COUNT_HW_INSTRUCTIONS] = XSCALE_PERFCTR_INSTRUCTION, 53 - [PERF_COUNT_HW_CACHE_REFERENCES] = HW_OP_UNSUPPORTED, 54 - [PERF_COUNT_HW_CACHE_MISSES] = HW_OP_UNSUPPORTED, 55 - [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = XSCALE_PERFCTR_BRANCH, 56 - [PERF_COUNT_HW_BRANCH_MISSES] = XSCALE_PERFCTR_BRANCH_MISS, 57 - [PERF_COUNT_HW_BUS_CYCLES] = HW_OP_UNSUPPORTED, 51 + [PERF_COUNT_HW_CPU_CYCLES] = XSCALE_PERFCTR_CCNT, 52 + [PERF_COUNT_HW_INSTRUCTIONS] = XSCALE_PERFCTR_INSTRUCTION, 53 + [PERF_COUNT_HW_CACHE_REFERENCES] = HW_OP_UNSUPPORTED, 54 + [PERF_COUNT_HW_CACHE_MISSES] = HW_OP_UNSUPPORTED, 55 + [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = XSCALE_PERFCTR_BRANCH, 56 + [PERF_COUNT_HW_BRANCH_MISSES] = XSCALE_PERFCTR_BRANCH_MISS, 57 + [PERF_COUNT_HW_BUS_CYCLES] = HW_OP_UNSUPPORTED, 58 + [PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = XSCALE_PERFCTR_ICACHE_NO_DELIVER, 59 + [PERF_COUNT_HW_STALLED_CYCLES_BACKEND] = HW_OP_UNSUPPORTED, 58 60 }; 59 61 60 62 static const unsigned xscale_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
+60 -23
arch/arm/kernel/process.c
··· 57 57 "ARM" , "Thumb" , "Jazelle", "ThumbEE" 58 58 }; 59 59 60 - extern void setup_mm_for_reboot(char mode); 60 + extern void setup_mm_for_reboot(void); 61 61 62 62 static volatile int hlt_counter; 63 63 ··· 92 92 __setup("nohlt", nohlt_setup); 93 93 __setup("hlt", hlt_setup); 94 94 95 - void arm_machine_restart(char mode, const char *cmd) 96 - { 97 - /* Disable interrupts first */ 98 - local_irq_disable(); 99 - local_fiq_disable(); 95 + extern void call_with_stack(void (*fn)(void *), void *arg, void *sp); 96 + typedef void (*phys_reset_t)(unsigned long); 100 97 101 - /* 102 - * Tell the mm system that we are going to reboot - 103 - * we may need it to insert some 1:1 mappings so that 104 - * soft boot works. 105 - */ 106 - setup_mm_for_reboot(mode); 98 + /* 99 + * A temporary stack to use for CPU reset. This is static so that we 100 + * don't clobber it with the identity mapping. When running with this 101 + * stack, any references to the current task *will not work* so you 102 + * should really do as little as possible before jumping to your reset 103 + * code. 104 + */ 105 + static u64 soft_restart_stack[16]; 106 + 107 + static void __soft_restart(void *addr) 108 + { 109 + phys_reset_t phys_reset; 110 + 111 + /* Take out a flat memory mapping. */ 112 + setup_mm_for_reboot(); 107 113 108 114 /* Clean and invalidate caches */ 109 115 flush_cache_all(); ··· 120 114 /* Push out any further dirty data, and ensure cache is empty */ 121 115 flush_cache_all(); 122 116 123 - /* 124 - * Now call the architecture specific reboot code. 125 - */ 126 - arch_reset(mode, cmd); 117 + /* Switch to the identity mapping. */ 118 + phys_reset = (phys_reset_t)(unsigned long)virt_to_phys(cpu_reset); 119 + phys_reset((unsigned long)addr); 127 120 128 - /* 129 - * Whoops - the architecture was unable to reboot. 130 - * Tell the user! 131 - */ 132 - mdelay(1000); 133 - printk("Reboot failed -- System halted\n"); 134 - while (1); 121 + /* Should never get here. */ 122 + BUG(); 123 + } 124 + 125 + void soft_restart(unsigned long addr) 126 + { 127 + u64 *stack = soft_restart_stack + ARRAY_SIZE(soft_restart_stack); 128 + 129 + /* Disable interrupts first */ 130 + local_irq_disable(); 131 + local_fiq_disable(); 132 + 133 + /* Disable the L2 if we're the last man standing. */ 134 + if (num_online_cpus() == 1) 135 + outer_disable(); 136 + 137 + /* Change to the new stack and continue with the reset. */ 138 + call_with_stack(__soft_restart, (void *)addr, (void *)stack); 139 + 140 + /* Should never get here. */ 141 + BUG(); 142 + } 143 + 144 + void arm_machine_restart(char mode, const char *cmd) 145 + { 146 + /* Disable interrupts first */ 147 + local_irq_disable(); 148 + local_fiq_disable(); 149 + 150 + /* Call the architecture specific reboot code. */ 151 + arch_reset(mode, cmd); 135 152 } 136 153 137 154 /* ··· 282 253 void machine_restart(char *cmd) 283 254 { 284 255 machine_shutdown(); 256 + 285 257 arm_pm_restart(reboot_mode, cmd); 258 + 259 + /* Give a grace period for failure to restart of 1s */ 260 + mdelay(1000); 261 + 262 + /* Whoops - the platform was unable to reboot. Tell the user! */ 263 + printk("Reboot failed -- System halted\n"); 264 + while (1); 286 265 } 287 266 288 267 void __show_regs(struct pt_regs *regs)
+105 -13
arch/arm/kernel/sched_clock.c
··· 14 14 15 15 #include <asm/sched_clock.h> 16 16 17 + struct clock_data { 18 + u64 epoch_ns; 19 + u32 epoch_cyc; 20 + u32 epoch_cyc_copy; 21 + u32 mult; 22 + u32 shift; 23 + }; 24 + 17 25 static void sched_clock_poll(unsigned long wrap_ticks); 18 26 static DEFINE_TIMER(sched_clock_timer, sched_clock_poll, 0, 0); 19 - static void (*sched_clock_update_fn)(void); 27 + 28 + static struct clock_data cd = { 29 + .mult = NSEC_PER_SEC / HZ, 30 + }; 31 + 32 + static u32 __read_mostly sched_clock_mask = 0xffffffff; 33 + 34 + static u32 notrace jiffy_sched_clock_read(void) 35 + { 36 + return (u32)(jiffies - INITIAL_JIFFIES); 37 + } 38 + 39 + static u32 __read_mostly (*read_sched_clock)(void) = jiffy_sched_clock_read; 40 + 41 + static inline u64 cyc_to_ns(u64 cyc, u32 mult, u32 shift) 42 + { 43 + return (cyc * mult) >> shift; 44 + } 45 + 46 + static unsigned long long cyc_to_sched_clock(u32 cyc, u32 mask) 47 + { 48 + u64 epoch_ns; 49 + u32 epoch_cyc; 50 + 51 + /* 52 + * Load the epoch_cyc and epoch_ns atomically. We do this by 53 + * ensuring that we always write epoch_cyc, epoch_ns and 54 + * epoch_cyc_copy in strict order, and read them in strict order. 55 + * If epoch_cyc and epoch_cyc_copy are not equal, then we're in 56 + * the middle of an update, and we should repeat the load. 57 + */ 58 + do { 59 + epoch_cyc = cd.epoch_cyc; 60 + smp_rmb(); 61 + epoch_ns = cd.epoch_ns; 62 + smp_rmb(); 63 + } while (epoch_cyc != cd.epoch_cyc_copy); 64 + 65 + return epoch_ns + cyc_to_ns((cyc - epoch_cyc) & mask, cd.mult, cd.shift); 66 + } 67 + 68 + /* 69 + * Atomically update the sched_clock epoch. 70 + */ 71 + static void notrace update_sched_clock(void) 72 + { 73 + unsigned long flags; 74 + u32 cyc; 75 + u64 ns; 76 + 77 + cyc = read_sched_clock(); 78 + ns = cd.epoch_ns + 79 + cyc_to_ns((cyc - cd.epoch_cyc) & sched_clock_mask, 80 + cd.mult, cd.shift); 81 + /* 82 + * Write epoch_cyc and epoch_ns in a way that the update is 83 + * detectable in cyc_to_fixed_sched_clock(). 84 + */ 85 + raw_local_irq_save(flags); 86 + cd.epoch_cyc = cyc; 87 + smp_wmb(); 88 + cd.epoch_ns = ns; 89 + smp_wmb(); 90 + cd.epoch_cyc_copy = cyc; 91 + raw_local_irq_restore(flags); 92 + } 20 93 21 94 static void sched_clock_poll(unsigned long wrap_ticks) 22 95 { 23 96 mod_timer(&sched_clock_timer, round_jiffies(jiffies + wrap_ticks)); 24 - sched_clock_update_fn(); 97 + update_sched_clock(); 25 98 } 26 99 27 - void __init init_sched_clock(struct clock_data *cd, void (*update)(void), 28 - unsigned int clock_bits, unsigned long rate) 100 + void __init setup_sched_clock(u32 (*read)(void), int bits, unsigned long rate) 29 101 { 30 102 unsigned long r, w; 31 103 u64 res, wrap; 32 104 char r_unit; 33 105 34 - sched_clock_update_fn = update; 106 + BUG_ON(bits > 32); 107 + WARN_ON(!irqs_disabled()); 108 + WARN_ON(read_sched_clock != jiffy_sched_clock_read); 109 + read_sched_clock = read; 110 + sched_clock_mask = (1 << bits) - 1; 35 111 36 112 /* calculate the mult/shift to convert counter ticks to ns. */ 37 - clocks_calc_mult_shift(&cd->mult, &cd->shift, rate, NSEC_PER_SEC, 0); 113 + clocks_calc_mult_shift(&cd.mult, &cd.shift, rate, NSEC_PER_SEC, 0); 38 114 39 115 r = rate; 40 116 if (r >= 4000000) { 41 117 r /= 1000000; 42 118 r_unit = 'M'; 43 - } else { 119 + } else if (r >= 1000) { 44 120 r /= 1000; 45 121 r_unit = 'k'; 46 - } 122 + } else 123 + r_unit = ' '; 47 124 48 125 /* calculate how many ns until we wrap */ 49 - wrap = cyc_to_ns((1ULL << clock_bits) - 1, cd->mult, cd->shift); 126 + wrap = cyc_to_ns((1ULL << bits) - 1, cd.mult, cd.shift); 50 127 do_div(wrap, NSEC_PER_MSEC); 51 128 w = wrap; 52 129 53 130 /* calculate the ns resolution of this counter */ 54 - res = cyc_to_ns(1ULL, cd->mult, cd->shift); 131 + res = cyc_to_ns(1ULL, cd.mult, cd.shift); 55 132 pr_info("sched_clock: %u bits at %lu%cHz, resolution %lluns, wraps every %lums\n", 56 - clock_bits, r, r_unit, res, w); 133 + bits, r, r_unit, res, w); 57 134 58 135 /* 59 136 * Start the timer to keep sched_clock() properly updated and 60 137 * sets the initial epoch. 61 138 */ 62 139 sched_clock_timer.data = msecs_to_jiffies(w - (w / 10)); 63 - update(); 140 + update_sched_clock(); 64 141 65 142 /* 66 143 * Ensure that sched_clock() starts off at 0ns 67 144 */ 68 - cd->epoch_ns = 0; 145 + cd.epoch_ns = 0; 146 + 147 + pr_debug("Registered %pF as sched_clock source\n", read); 148 + } 149 + 150 + unsigned long long notrace sched_clock(void) 151 + { 152 + u32 cyc = read_sched_clock(); 153 + return cyc_to_sched_clock(cyc, sched_clock_mask); 69 154 } 70 155 71 156 void __init sched_clock_postinit(void) 72 157 { 158 + /* 159 + * If no sched_clock function has been provided at that point, 160 + * make it the final one one. 161 + */ 162 + if (read_sched_clock == jiffy_sched_clock_read) 163 + setup_sched_clock(jiffy_sched_clock_read, 32, HZ); 164 + 73 165 sched_clock_poll(sched_clock_timer.data); 74 166 }
+13 -2
arch/arm/kernel/setup.c
··· 31 31 #include <linux/memblock.h> 32 32 #include <linux/bug.h> 33 33 #include <linux/compiler.h> 34 + #include <linux/sort.h> 34 35 35 36 #include <asm/unified.h> 36 37 #include <asm/cpu.h> ··· 891 890 return mdesc; 892 891 } 893 892 893 + static int __init meminfo_cmp(const void *_a, const void *_b) 894 + { 895 + const struct membank *a = _a, *b = _b; 896 + long cmp = bank_pfn_start(a) - bank_pfn_start(b); 897 + return cmp < 0 ? -1 : cmp > 0 ? 1 : 0; 898 + } 894 899 895 900 void __init setup_arch(char **cmdline_p) 896 901 { ··· 915 908 arm_dma_zone_size = mdesc->dma_zone_size; 916 909 } 917 910 #endif 918 - if (mdesc->soft_reboot) 919 - reboot_setup("s"); 911 + if (mdesc->restart_mode) 912 + reboot_setup(&mdesc->restart_mode); 920 913 921 914 init_mm.start_code = (unsigned long) _text; 922 915 init_mm.end_code = (unsigned long) _etext; ··· 929 922 930 923 parse_early_param(); 931 924 925 + sort(&meminfo.bank, meminfo.nr_banks, sizeof(meminfo.bank[0]), meminfo_cmp, NULL); 932 926 sanity_check_meminfo(); 933 927 arm_memblock_init(&meminfo, mdesc); 934 928 935 929 paging_init(mdesc); 936 930 request_standard_resources(mdesc); 931 + 932 + if (mdesc->restart) 933 + arm_pm_restart = mdesc->restart; 937 934 938 935 unflatten_device_tree(); 939 936
+4
arch/arm/kernel/sleep.S
··· 54 54 * r0 = control register value 55 55 */ 56 56 .align 5 57 + .pushsection .idmap.text,"ax" 57 58 ENTRY(cpu_resume_mmu) 58 59 ldr r3, =cpu_resume_after_mmu 60 + instr_sync 59 61 mcr p15, 0, r0, c1, c0, 0 @ turn on MMU, I-cache, etc 60 62 mrc p15, 0, r0, c0, c0, 0 @ read id reg 63 + instr_sync 61 64 mov r0, r0 62 65 mov r0, r0 63 66 mov pc, r3 @ jump to virtual address 64 67 ENDPROC(cpu_resume_mmu) 68 + .popsection 65 69 cpu_resume_after_mmu: 66 70 bl cpu_init @ restore the und/abt/irq banked regs 67 71 mov r0, #0 @ return zero on success
+6 -30
arch/arm/kernel/smp.c
··· 31 31 #include <asm/cpu.h> 32 32 #include <asm/cputype.h> 33 33 #include <asm/exception.h> 34 + #include <asm/idmap.h> 34 35 #include <asm/topology.h> 35 36 #include <asm/mmu_context.h> 36 37 #include <asm/pgtable.h> ··· 62 61 { 63 62 struct cpuinfo_arm *ci = &per_cpu(cpu_data, cpu); 64 63 struct task_struct *idle = ci->idle; 65 - pgd_t *pgd; 66 64 int ret; 67 65 68 66 /* ··· 84 84 } 85 85 86 86 /* 87 - * Allocate initial page tables to allow the new CPU to 88 - * enable the MMU safely. This essentially means a set 89 - * of our "standard" page tables, with the addition of 90 - * a 1:1 mapping for the physical address of the kernel. 91 - */ 92 - pgd = pgd_alloc(&init_mm); 93 - if (!pgd) 94 - return -ENOMEM; 95 - 96 - if (PHYS_OFFSET != PAGE_OFFSET) { 97 - #ifndef CONFIG_HOTPLUG_CPU 98 - identity_mapping_add(pgd, __pa(__init_begin), __pa(__init_end)); 99 - #endif 100 - identity_mapping_add(pgd, __pa(_stext), __pa(_etext)); 101 - identity_mapping_add(pgd, __pa(_sdata), __pa(_edata)); 102 - } 103 - 104 - /* 105 87 * We need to tell the secondary core where to find 106 88 * its stack and the page tables. 107 89 */ 108 90 secondary_data.stack = task_stack_page(idle) + THREAD_START_SP; 109 - secondary_data.pgdir = virt_to_phys(pgd); 91 + secondary_data.pgdir = virt_to_phys(idmap_pgd); 110 92 secondary_data.swapper_pg_dir = virt_to_phys(swapper_pg_dir); 111 93 __cpuc_flush_dcache_area(&secondary_data, sizeof(secondary_data)); 112 94 outer_clean_range(__pa(&secondary_data), __pa(&secondary_data + 1)); ··· 123 141 124 142 secondary_data.stack = NULL; 125 143 secondary_data.pgdir = 0; 126 - 127 - if (PHYS_OFFSET != PAGE_OFFSET) { 128 - #ifndef CONFIG_HOTPLUG_CPU 129 - identity_mapping_del(pgd, __pa(__init_begin), __pa(__init_end)); 130 - #endif 131 - identity_mapping_del(pgd, __pa(_stext), __pa(_etext)); 132 - identity_mapping_del(pgd, __pa(_sdata), __pa(_edata)); 133 - } 134 - 135 - pgd_free(&init_mm, pgd); 136 144 137 145 return ret; 138 146 } ··· 521 549 522 550 local_fiq_disable(); 523 551 local_irq_disable(); 552 + 553 + #ifdef CONFIG_HOTPLUG_CPU 554 + platform_cpu_kill(cpu); 555 + #endif 524 556 525 557 while (1) 526 558 cpu_relax();
+3 -15
arch/arm/kernel/suspend.c
··· 1 1 #include <linux/init.h> 2 2 3 + #include <asm/idmap.h> 3 4 #include <asm/pgalloc.h> 4 5 #include <asm/pgtable.h> 5 6 #include <asm/memory.h> 6 7 #include <asm/suspend.h> 7 8 #include <asm/tlbflush.h> 8 - 9 - static pgd_t *suspend_pgd; 10 9 11 10 extern int __cpu_suspend(unsigned long, int (*)(unsigned long)); 12 11 extern void cpu_resume_mmu(void); ··· 20 21 *save_ptr = virt_to_phys(ptr); 21 22 22 23 /* This must correspond to the LDM in cpu_resume() assembly */ 23 - *ptr++ = virt_to_phys(suspend_pgd); 24 + *ptr++ = virt_to_phys(idmap_pgd); 24 25 *ptr++ = sp; 25 26 *ptr++ = virt_to_phys(cpu_do_resume); 26 27 ··· 41 42 struct mm_struct *mm = current->active_mm; 42 43 int ret; 43 44 44 - if (!suspend_pgd) 45 + if (!idmap_pgd) 45 46 return -EINVAL; 46 47 47 48 /* ··· 58 59 59 60 return ret; 60 61 } 61 - 62 - static int __init cpu_suspend_init(void) 63 - { 64 - suspend_pgd = pgd_alloc(&init_mm); 65 - if (suspend_pgd) { 66 - unsigned long addr = virt_to_phys(cpu_resume_mmu); 67 - identity_mapping_add(suspend_pgd, addr, addr + SECTION_SIZE); 68 - } 69 - return suspend_pgd ? 0 : -ENOMEM; 70 - } 71 - core_initcall(cpu_suspend_init);
+7
arch/arm/kernel/vmlinux.lds.S
··· 13 13 *(.proc.info.init) \ 14 14 VMLINUX_SYMBOL(__proc_info_end) = .; 15 15 16 + #define IDMAP_TEXT \ 17 + ALIGN_FUNCTION(); \ 18 + VMLINUX_SYMBOL(__idmap_text_start) = .; \ 19 + *(.idmap.text) \ 20 + VMLINUX_SYMBOL(__idmap_text_end) = .; 21 + 16 22 #ifdef CONFIG_HOTPLUG_CPU 17 23 #define ARM_CPU_DISCARD(x) 18 24 #define ARM_CPU_KEEP(x) x ··· 98 92 SCHED_TEXT 99 93 LOCK_TEXT 100 94 KPROBES_TEXT 95 + IDMAP_TEXT 101 96 #ifdef CONFIG_MMU 102 97 *(.fixup) 103 98 #endif
+2 -1
arch/arm/lib/Makefile
··· 13 13 testchangebit.o testclearbit.o testsetbit.o \ 14 14 ashldi3.o ashrdi3.o lshrdi3.o muldi3.o \ 15 15 ucmpdi2.o lib1funcs.o div64.o \ 16 - io-readsb.o io-writesb.o io-readsl.o io-writesl.o 16 + io-readsb.o io-writesb.o io-readsl.o io-writesl.o \ 17 + call_with_stack.o 17 18 18 19 mmu-y := clear_user.o copy_page.o getuser.o putuser.o 19 20
+44
arch/arm/lib/call_with_stack.S
··· 1 + /* 2 + * arch/arm/lib/call_with_stack.S 3 + * 4 + * Copyright (C) 2011 ARM Ltd. 5 + * Written by Will Deacon <will.deacon@arm.com> 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 + * This program is distributed in the hope that it will be useful, 12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 + * GNU General Public License for more details. 15 + * 16 + * You should have received a copy of the GNU General Public License 17 + * along with this program; if not, write to the Free Software 18 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 + */ 20 + 21 + #include <linux/linkage.h> 22 + #include <asm/assembler.h> 23 + 24 + /* 25 + * void call_with_stack(void (*fn)(void *), void *arg, void *sp) 26 + * 27 + * Change the stack to that pointed at by sp, then invoke fn(arg) with 28 + * the new stack. 29 + */ 30 + ENTRY(call_with_stack) 31 + str sp, [r2, #-4]! 32 + str lr, [r2, #-4]! 33 + 34 + mov sp, r2 35 + mov r2, r0 36 + mov r0, r1 37 + 38 + adr lr, BSYM(1f) 39 + mov pc, r2 40 + 41 + 1: ldr lr, [sp] 42 + ldr sp, [sp, #4] 43 + mov pc, lr 44 + ENDPROC(call_with_stack)
-8
arch/arm/mach-at91/include/mach/io.h
··· 30 30 31 31 #ifndef __ASSEMBLY__ 32 32 33 - #ifndef CONFIG_ARCH_AT91X40 34 - #define __arch_ioremap at91_ioremap 35 - #define __arch_iounmap at91_iounmap 36 - #endif 37 - 38 - void __iomem *at91_ioremap(unsigned long phys, size_t size, unsigned int type); 39 - void at91_iounmap(volatile void __iomem *addr); 40 - 41 33 static inline unsigned int at91_sys_read(unsigned int reg_offset) 42 34 { 43 35 void __iomem *addr = (void __iomem *)AT91_VA_BASE_SYS;
-28
arch/arm/mach-at91/include/mach/vmalloc.h
··· 1 - /* 2 - * arch/arm/mach-at91/include/mach/vmalloc.h 3 - * 4 - * Copyright (C) 2003 SAN People 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 as published by 8 - * the Free Software Foundation; either version 2 of the License, or 9 - * (at your option) any later version. 10 - * 11 - * This program is distributed in the hope that it will be useful, 12 - * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 - * GNU General Public License for more details. 15 - * 16 - * You should have received a copy of the GNU General Public License 17 - * along with this program; if not, write to the Free Software 18 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 - */ 20 - 21 - #ifndef __ASM_ARCH_VMALLOC_H 22 - #define __ASM_ARCH_VMALLOC_H 23 - 24 - #include <mach/hardware.h> 25 - 26 - #define VMALLOC_END (AT91_VIRT_BASE & PGDIR_MASK) 27 - 28 - #endif
-18
arch/arm/mach-at91/setup.c
··· 73 73 .type = MT_DEVICE, 74 74 }; 75 75 76 - void __iomem *at91_ioremap(unsigned long p, size_t size, unsigned int type) 77 - { 78 - if (p >= AT91_BASE_SYS && p <= (AT91_BASE_SYS + SZ_16K - 1)) 79 - return (void __iomem *)AT91_IO_P2V(p); 80 - 81 - return __arm_ioremap_caller(p, size, type, __builtin_return_address(0)); 82 - } 83 - EXPORT_SYMBOL(at91_ioremap); 84 - 85 - void at91_iounmap(volatile void __iomem *addr) 86 - { 87 - unsigned long virt = (unsigned long)addr; 88 - 89 - if (virt >= VMALLOC_START && virt < VMALLOC_END) 90 - __iounmap(addr); 91 - } 92 - EXPORT_SYMBOL(at91_iounmap); 93 - 94 76 #define AT91_DBGU0 0xfffff200 95 77 #define AT91_DBGU1 0xffffee00 96 78
+1 -1
arch/arm/mach-bcmring/dma.c
··· 1615 1615 { 1616 1616 unsigned long addrVal = (unsigned long)addr; 1617 1617 1618 - if (addrVal >= VMALLOC_END) { 1618 + if (addrVal >= CONSISTENT_BASE) { 1619 1619 /* NOTE: DMA virtual memory space starts at 0xFFxxxxxx */ 1620 1620 1621 1621 /* dma_alloc_xxx pages are physically and virtually contiguous */
-25
arch/arm/mach-bcmring/include/mach/vmalloc.h
··· 1 - /* 2 - * 3 - * Copyright (C) 2000 Russell King. 4 - * 5 - * This program is free software; you can redistribute it and/or modify 6 - * it under the terms of the GNU General Public License as published by 7 - * the Free Software Foundation; either version 2 of the License, or 8 - * (at your option) any later version. 9 - * 10 - * This program is distributed in the hope that it will be useful, 11 - * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 - * GNU General Public License for more details. 14 - * 15 - * You should have received a copy of the GNU General Public License 16 - * along with this program; if not, write to the Free Software 17 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 - */ 19 - 20 - /* 21 - * Move VMALLOC_END to 0xf0000000 so that the vm space can range from 22 - * 0xe0000000 to 0xefffffff. This gives us 256 MB of vm space and handles 23 - * larger physical memory designs better. 24 - */ 25 - #define VMALLOC_END 0xf0000000UL
+1 -1
arch/arm/mach-clps711x/Makefile
··· 4 4 5 5 # Object file lists. 6 6 7 - obj-y := irq.o mm.o time.o 7 + obj-y := common.o 8 8 obj-m := 9 9 obj-n := 10 10 obj- :=
+222
arch/arm/mach-clps711x/common.c
··· 1 + /* 2 + * linux/arch/arm/mach-clps711x/core.c 3 + * 4 + * Core support for the CLPS711x-based machines. 5 + * 6 + * Copyright (C) 2001,2011 Deep Blue Solutions Ltd 7 + * 8 + * This program is free software; you can redistribute it and/or modify 9 + * it under the terms of the GNU General Public License as published by 10 + * the Free Software Foundation; either version 2 of the License, or 11 + * (at your option) any later version. 12 + * 13 + * This program is distributed in the hope that it will be useful, 14 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 + * GNU General Public License for more details. 17 + * 18 + * You should have received a copy of the GNU General Public License 19 + * along with this program; if not, write to the Free Software 20 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 + */ 22 + #include <linux/kernel.h> 23 + #include <linux/mm.h> 24 + #include <linux/init.h> 25 + #include <linux/interrupt.h> 26 + #include <linux/io.h> 27 + #include <linux/irq.h> 28 + #include <linux/sched.h> 29 + #include <linux/timex.h> 30 + 31 + #include <asm/sizes.h> 32 + #include <mach/hardware.h> 33 + #include <asm/irq.h> 34 + #include <asm/leds.h> 35 + #include <asm/pgtable.h> 36 + #include <asm/page.h> 37 + #include <asm/mach/map.h> 38 + #include <asm/mach/time.h> 39 + #include <asm/hardware/clps7111.h> 40 + 41 + /* 42 + * This maps the generic CLPS711x registers 43 + */ 44 + static struct map_desc clps711x_io_desc[] __initdata = { 45 + { 46 + .virtual = CLPS7111_VIRT_BASE, 47 + .pfn = __phys_to_pfn(CLPS7111_PHYS_BASE), 48 + .length = SZ_1M, 49 + .type = MT_DEVICE 50 + } 51 + }; 52 + 53 + void __init clps711x_map_io(void) 54 + { 55 + iotable_init(clps711x_io_desc, ARRAY_SIZE(clps711x_io_desc)); 56 + } 57 + 58 + static void int1_mask(struct irq_data *d) 59 + { 60 + u32 intmr1; 61 + 62 + intmr1 = clps_readl(INTMR1); 63 + intmr1 &= ~(1 << d->irq); 64 + clps_writel(intmr1, INTMR1); 65 + } 66 + 67 + static void int1_ack(struct irq_data *d) 68 + { 69 + u32 intmr1; 70 + 71 + intmr1 = clps_readl(INTMR1); 72 + intmr1 &= ~(1 << d->irq); 73 + clps_writel(intmr1, INTMR1); 74 + 75 + switch (d->irq) { 76 + case IRQ_CSINT: clps_writel(0, COEOI); break; 77 + case IRQ_TC1OI: clps_writel(0, TC1EOI); break; 78 + case IRQ_TC2OI: clps_writel(0, TC2EOI); break; 79 + case IRQ_RTCMI: clps_writel(0, RTCEOI); break; 80 + case IRQ_TINT: clps_writel(0, TEOI); break; 81 + case IRQ_UMSINT: clps_writel(0, UMSEOI); break; 82 + } 83 + } 84 + 85 + static void int1_unmask(struct irq_data *d) 86 + { 87 + u32 intmr1; 88 + 89 + intmr1 = clps_readl(INTMR1); 90 + intmr1 |= 1 << d->irq; 91 + clps_writel(intmr1, INTMR1); 92 + } 93 + 94 + static struct irq_chip int1_chip = { 95 + .irq_ack = int1_ack, 96 + .irq_mask = int1_mask, 97 + .irq_unmask = int1_unmask, 98 + }; 99 + 100 + static void int2_mask(struct irq_data *d) 101 + { 102 + u32 intmr2; 103 + 104 + intmr2 = clps_readl(INTMR2); 105 + intmr2 &= ~(1 << (d->irq - 16)); 106 + clps_writel(intmr2, INTMR2); 107 + } 108 + 109 + static void int2_ack(struct irq_data *d) 110 + { 111 + u32 intmr2; 112 + 113 + intmr2 = clps_readl(INTMR2); 114 + intmr2 &= ~(1 << (d->irq - 16)); 115 + clps_writel(intmr2, INTMR2); 116 + 117 + switch (d->irq) { 118 + case IRQ_KBDINT: clps_writel(0, KBDEOI); break; 119 + } 120 + } 121 + 122 + static void int2_unmask(struct irq_data *d) 123 + { 124 + u32 intmr2; 125 + 126 + intmr2 = clps_readl(INTMR2); 127 + intmr2 |= 1 << (d->irq - 16); 128 + clps_writel(intmr2, INTMR2); 129 + } 130 + 131 + static struct irq_chip int2_chip = { 132 + .irq_ack = int2_ack, 133 + .irq_mask = int2_mask, 134 + .irq_unmask = int2_unmask, 135 + }; 136 + 137 + void __init clps711x_init_irq(void) 138 + { 139 + unsigned int i; 140 + 141 + for (i = 0; i < NR_IRQS; i++) { 142 + if (INT1_IRQS & (1 << i)) { 143 + irq_set_chip_and_handler(i, &int1_chip, 144 + handle_level_irq); 145 + set_irq_flags(i, IRQF_VALID | IRQF_PROBE); 146 + } 147 + if (INT2_IRQS & (1 << i)) { 148 + irq_set_chip_and_handler(i, &int2_chip, 149 + handle_level_irq); 150 + set_irq_flags(i, IRQF_VALID | IRQF_PROBE); 151 + } 152 + } 153 + 154 + /* 155 + * Disable interrupts 156 + */ 157 + clps_writel(0, INTMR1); 158 + clps_writel(0, INTMR2); 159 + 160 + /* 161 + * Clear down any pending interrupts 162 + */ 163 + clps_writel(0, COEOI); 164 + clps_writel(0, TC1EOI); 165 + clps_writel(0, TC2EOI); 166 + clps_writel(0, RTCEOI); 167 + clps_writel(0, TEOI); 168 + clps_writel(0, UMSEOI); 169 + clps_writel(0, SYNCIO); 170 + clps_writel(0, KBDEOI); 171 + } 172 + 173 + /* 174 + * gettimeoffset() returns time since last timer tick, in usecs. 175 + * 176 + * 'LATCH' is hwclock ticks (see CLOCK_TICK_RATE in timex.h) per jiffy. 177 + * 'tick' is usecs per jiffy. 178 + */ 179 + static unsigned long clps711x_gettimeoffset(void) 180 + { 181 + unsigned long hwticks; 182 + hwticks = LATCH - (clps_readl(TC2D) & 0xffff); /* since last underflow */ 183 + return (hwticks * (tick_nsec / 1000)) / LATCH; 184 + } 185 + 186 + /* 187 + * IRQ handler for the timer 188 + */ 189 + static irqreturn_t p720t_timer_interrupt(int irq, void *dev_id) 190 + { 191 + timer_tick(); 192 + return IRQ_HANDLED; 193 + } 194 + 195 + static struct irqaction clps711x_timer_irq = { 196 + .name = "CLPS711x Timer Tick", 197 + .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, 198 + .handler = p720t_timer_interrupt, 199 + }; 200 + 201 + static void __init clps711x_timer_init(void) 202 + { 203 + struct timespec tv; 204 + unsigned int syscon; 205 + 206 + syscon = clps_readl(SYSCON1); 207 + syscon |= SYSCON1_TC2S | SYSCON1_TC2M; 208 + clps_writel(syscon, SYSCON1); 209 + 210 + clps_writel(LATCH-1, TC2D); /* 512kHz / 100Hz - 1 */ 211 + 212 + setup_irq(IRQ_TC2OI, &clps711x_timer_irq); 213 + 214 + tv.tv_nsec = 0; 215 + tv.tv_sec = clps_readl(RTCDR); 216 + do_settimeofday(&tv); 217 + } 218 + 219 + struct sys_timer clps711x_timer = { 220 + .init = clps711x_timer_init, 221 + .offset = clps711x_gettimeoffset, 222 + };
+1 -1
arch/arm/mach-clps711x/include/mach/system.h
··· 34 34 35 35 static inline void arch_reset(char mode, const char *cmd) 36 36 { 37 - cpu_reset(0); 37 + soft_restart(0); 38 38 } 39 39 40 40 #endif
-20
arch/arm/mach-clps711x/include/mach/vmalloc.h
··· 1 - /* 2 - * arch/arm/mach-clps711x/include/mach/vmalloc.h 3 - * 4 - * Copyright (C) 2000 Deep Blue Solutions Ltd. 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 as published by 8 - * the Free Software Foundation; either version 2 of the License, or 9 - * (at your option) any later version. 10 - * 11 - * This program is distributed in the hope that it will be useful, 12 - * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 - * GNU General Public License for more details. 15 - * 16 - * You should have received a copy of the GNU General Public License 17 - * along with this program; if not, write to the Free Software 18 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 - */ 20 - #define VMALLOC_END 0xd0000000UL
-143
arch/arm/mach-clps711x/irq.c
··· 1 - /* 2 - * linux/arch/arm/mach-clps711x/irq.c 3 - * 4 - * Copyright (C) 2000 Deep Blue Solutions Ltd. 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 as published by 8 - * the Free Software Foundation; either version 2 of the License, or 9 - * (at your option) any later version. 10 - * 11 - * This program is distributed in the hope that it will be useful, 12 - * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 - * GNU General Public License for more details. 15 - * 16 - * You should have received a copy of the GNU General Public License 17 - * along with this program; if not, write to the Free Software 18 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 - */ 20 - #include <linux/init.h> 21 - #include <linux/list.h> 22 - #include <linux/io.h> 23 - 24 - #include <asm/mach/irq.h> 25 - #include <mach/hardware.h> 26 - #include <asm/irq.h> 27 - 28 - #include <asm/hardware/clps7111.h> 29 - 30 - static void int1_mask(struct irq_data *d) 31 - { 32 - u32 intmr1; 33 - 34 - intmr1 = clps_readl(INTMR1); 35 - intmr1 &= ~(1 << d->irq); 36 - clps_writel(intmr1, INTMR1); 37 - } 38 - 39 - static void int1_ack(struct irq_data *d) 40 - { 41 - u32 intmr1; 42 - 43 - intmr1 = clps_readl(INTMR1); 44 - intmr1 &= ~(1 << d->irq); 45 - clps_writel(intmr1, INTMR1); 46 - 47 - switch (d->irq) { 48 - case IRQ_CSINT: clps_writel(0, COEOI); break; 49 - case IRQ_TC1OI: clps_writel(0, TC1EOI); break; 50 - case IRQ_TC2OI: clps_writel(0, TC2EOI); break; 51 - case IRQ_RTCMI: clps_writel(0, RTCEOI); break; 52 - case IRQ_TINT: clps_writel(0, TEOI); break; 53 - case IRQ_UMSINT: clps_writel(0, UMSEOI); break; 54 - } 55 - } 56 - 57 - static void int1_unmask(struct irq_data *d) 58 - { 59 - u32 intmr1; 60 - 61 - intmr1 = clps_readl(INTMR1); 62 - intmr1 |= 1 << d->irq; 63 - clps_writel(intmr1, INTMR1); 64 - } 65 - 66 - static struct irq_chip int1_chip = { 67 - .irq_ack = int1_ack, 68 - .irq_mask = int1_mask, 69 - .irq_unmask = int1_unmask, 70 - }; 71 - 72 - static void int2_mask(struct irq_data *d) 73 - { 74 - u32 intmr2; 75 - 76 - intmr2 = clps_readl(INTMR2); 77 - intmr2 &= ~(1 << (d->irq - 16)); 78 - clps_writel(intmr2, INTMR2); 79 - } 80 - 81 - static void int2_ack(struct irq_data *d) 82 - { 83 - u32 intmr2; 84 - 85 - intmr2 = clps_readl(INTMR2); 86 - intmr2 &= ~(1 << (d->irq - 16)); 87 - clps_writel(intmr2, INTMR2); 88 - 89 - switch (d->irq) { 90 - case IRQ_KBDINT: clps_writel(0, KBDEOI); break; 91 - } 92 - } 93 - 94 - static void int2_unmask(struct irq_data *d) 95 - { 96 - u32 intmr2; 97 - 98 - intmr2 = clps_readl(INTMR2); 99 - intmr2 |= 1 << (d->irq - 16); 100 - clps_writel(intmr2, INTMR2); 101 - } 102 - 103 - static struct irq_chip int2_chip = { 104 - .irq_ack = int2_ack, 105 - .irq_mask = int2_mask, 106 - .irq_unmask = int2_unmask, 107 - }; 108 - 109 - void __init clps711x_init_irq(void) 110 - { 111 - unsigned int i; 112 - 113 - for (i = 0; i < NR_IRQS; i++) { 114 - if (INT1_IRQS & (1 << i)) { 115 - irq_set_chip_and_handler(i, &int1_chip, 116 - handle_level_irq); 117 - set_irq_flags(i, IRQF_VALID | IRQF_PROBE); 118 - } 119 - if (INT2_IRQS & (1 << i)) { 120 - irq_set_chip_and_handler(i, &int2_chip, 121 - handle_level_irq); 122 - set_irq_flags(i, IRQF_VALID | IRQF_PROBE); 123 - } 124 - } 125 - 126 - /* 127 - * Disable interrupts 128 - */ 129 - clps_writel(0, INTMR1); 130 - clps_writel(0, INTMR2); 131 - 132 - /* 133 - * Clear down any pending interrupts 134 - */ 135 - clps_writel(0, COEOI); 136 - clps_writel(0, TC1EOI); 137 - clps_writel(0, TC2EOI); 138 - clps_writel(0, RTCEOI); 139 - clps_writel(0, TEOI); 140 - clps_writel(0, UMSEOI); 141 - clps_writel(0, SYNCIO); 142 - clps_writel(0, KBDEOI); 143 - }
-48
arch/arm/mach-clps711x/mm.c
··· 1 - /* 2 - * linux/arch/arm/mach-clps711x/mm.c 3 - * 4 - * Generic MM setup for the CLPS711x-based machines. 5 - * 6 - * Copyright (C) 2001 Deep Blue Solutions Ltd 7 - * 8 - * This program is free software; you can redistribute it and/or modify 9 - * it under the terms of the GNU General Public License as published by 10 - * the Free Software Foundation; either version 2 of the License, or 11 - * (at your option) any later version. 12 - * 13 - * This program is distributed in the hope that it will be useful, 14 - * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 - * GNU General Public License for more details. 17 - * 18 - * You should have received a copy of the GNU General Public License 19 - * along with this program; if not, write to the Free Software 20 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 - */ 22 - #include <linux/kernel.h> 23 - #include <linux/mm.h> 24 - #include <linux/init.h> 25 - 26 - #include <asm/sizes.h> 27 - #include <mach/hardware.h> 28 - #include <asm/pgtable.h> 29 - #include <asm/page.h> 30 - #include <asm/mach/map.h> 31 - #include <asm/hardware/clps7111.h> 32 - 33 - /* 34 - * This maps the generic CLPS711x registers 35 - */ 36 - static struct map_desc clps711x_io_desc[] __initdata = { 37 - { 38 - .virtual = CLPS7111_VIRT_BASE, 39 - .pfn = __phys_to_pfn(CLPS7111_PHYS_BASE), 40 - .length = SZ_1M, 41 - .type = MT_DEVICE 42 - } 43 - }; 44 - 45 - void __init clps711x_map_io(void) 46 - { 47 - iotable_init(clps711x_io_desc, ARRAY_SIZE(clps711x_io_desc)); 48 - }
-84
arch/arm/mach-clps711x/time.c
··· 1 - /* 2 - * linux/arch/arm/mach-clps711x/time.c 3 - * 4 - * Copyright (C) 2001 Deep Blue Solutions Ltd. 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 - * This program is distributed in the hope that it will be useful, 11 - * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 - * GNU General Public License for more details. 14 - * 15 - * You should have received a copy of the GNU General Public License 16 - * along with this program; if not, write to the Free Software 17 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 - */ 19 - #include <linux/timex.h> 20 - #include <linux/init.h> 21 - #include <linux/interrupt.h> 22 - #include <linux/irq.h> 23 - #include <linux/sched.h> 24 - #include <linux/io.h> 25 - 26 - #include <mach/hardware.h> 27 - #include <asm/irq.h> 28 - #include <asm/leds.h> 29 - #include <asm/hardware/clps7111.h> 30 - 31 - #include <asm/mach/time.h> 32 - 33 - 34 - /* 35 - * gettimeoffset() returns time since last timer tick, in usecs. 36 - * 37 - * 'LATCH' is hwclock ticks (see CLOCK_TICK_RATE in timex.h) per jiffy. 38 - * 'tick' is usecs per jiffy. 39 - */ 40 - static unsigned long clps711x_gettimeoffset(void) 41 - { 42 - unsigned long hwticks; 43 - hwticks = LATCH - (clps_readl(TC2D) & 0xffff); /* since last underflow */ 44 - return (hwticks * (tick_nsec / 1000)) / LATCH; 45 - } 46 - 47 - /* 48 - * IRQ handler for the timer 49 - */ 50 - static irqreturn_t 51 - p720t_timer_interrupt(int irq, void *dev_id) 52 - { 53 - timer_tick(); 54 - return IRQ_HANDLED; 55 - } 56 - 57 - static struct irqaction clps711x_timer_irq = { 58 - .name = "CLPS711x Timer Tick", 59 - .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, 60 - .handler = p720t_timer_interrupt, 61 - }; 62 - 63 - static void __init clps711x_timer_init(void) 64 - { 65 - struct timespec tv; 66 - unsigned int syscon; 67 - 68 - syscon = clps_readl(SYSCON1); 69 - syscon |= SYSCON1_TC2S | SYSCON1_TC2M; 70 - clps_writel(syscon, SYSCON1); 71 - 72 - clps_writel(LATCH-1, TC2D); /* 512kHz / 100Hz - 1 */ 73 - 74 - setup_irq(IRQ_TC2OI, &clps711x_timer_irq); 75 - 76 - tv.tv_nsec = 0; 77 - tv.tv_sec = clps_readl(RTCDR); 78 - do_settimeofday(&tv); 79 - } 80 - 81 - struct sys_timer clps711x_timer = { 82 - .init = clps711x_timer_init, 83 - .offset = clps711x_gettimeoffset, 84 - };
+2
arch/arm/mach-cns3xxx/cns3420vb.c
··· 26 26 #include <linux/mtd/partitions.h> 27 27 #include <asm/setup.h> 28 28 #include <asm/mach-types.h> 29 + #include <asm/hardware/gic.h> 29 30 #include <asm/mach/arch.h> 30 31 #include <asm/mach/map.h> 31 32 #include <asm/mach/time.h> ··· 202 201 .map_io = cns3420_map_io, 203 202 .init_irq = cns3xxx_init_irq, 204 203 .timer = &cns3xxx_timer, 204 + .handle_irq = gic_handle_irq, 205 205 .init_machine = cns3420_init, 206 206 MACHINE_END
-2
arch/arm/mach-cns3xxx/include/mach/entry-macro.S
··· 8 8 * published by the Free Software Foundation. 9 9 */ 10 10 11 - #include <asm/hardware/entry-macro-gic.S> 12 - 13 11 .macro disable_fiq 14 12 .endm 15 13
-11
arch/arm/mach-cns3xxx/include/mach/vmalloc.h
··· 1 - /* 2 - * Copyright 2000 Russell King. 3 - * Copyright 2003 ARM Limited 4 - * Copyright 2008 Cavium Networks 5 - * 6 - * This file 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 - 11 - #define VMALLOC_END 0xd8000000UL
+1 -1
arch/arm/mach-davinci/Makefile
··· 4 4 # 5 5 6 6 # Common objects 7 - obj-y := time.o clock.o serial.o io.o psc.o \ 7 + obj-y := time.o clock.o serial.o psc.o \ 8 8 dma.o usb.o common.o sram.o aemif.o 9 9 10 10 obj-$(CONFIG_DAVINCI_MUX) += mux.o
-8
arch/arm/mach-davinci/include/mach/io.h
··· 21 21 #define __mem_pci(a) (a) 22 22 #define __mem_isa(a) (a) 23 23 24 - #ifndef __ASSEMBLER__ 25 - #define __arch_ioremap davinci_ioremap 26 - #define __arch_iounmap davinci_iounmap 27 - 28 - void __iomem *davinci_ioremap(unsigned long phys, size_t size, 29 - unsigned int type); 30 - void davinci_iounmap(volatile void __iomem *addr); 31 - #endif 32 24 #endif /* __ASM_ARCH_IO_H */
-14
arch/arm/mach-davinci/include/mach/vmalloc.h
··· 1 - /* 2 - * DaVinci vmalloc definitions 3 - * 4 - * Author: Kevin Hilman, MontaVista Software, Inc. <source@mvista.com> 5 - * 6 - * 2007 (c) MontaVista Software, Inc. This file is licensed under 7 - * the terms of the GNU General Public License version 2. This program 8 - * is licensed "as is" without any warranty of any kind, whether express 9 - * or implied. 10 - */ 11 - #include <mach/hardware.h> 12 - 13 - /* Allow vmalloc range until the IO virtual range minus a 2M "hole" */ 14 - #define VMALLOC_END (IO_VIRT - (2<<20))
-48
arch/arm/mach-davinci/io.c
··· 1 - /* 2 - * DaVinci I/O mapping code 3 - * 4 - * Copyright (C) 2005-2006 Texas Instruments 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 - 11 - #include <linux/module.h> 12 - #include <linux/io.h> 13 - 14 - #include <asm/tlb.h> 15 - #include <asm/mach/map.h> 16 - 17 - #include <mach/common.h> 18 - 19 - /* 20 - * Intercept ioremap() requests for addresses in our fixed mapping regions. 21 - */ 22 - void __iomem *davinci_ioremap(unsigned long p, size_t size, unsigned int type) 23 - { 24 - struct map_desc *desc = davinci_soc_info.io_desc; 25 - int desc_num = davinci_soc_info.io_desc_num; 26 - int i; 27 - 28 - for (i = 0; i < desc_num; i++, desc++) { 29 - unsigned long iophys = __pfn_to_phys(desc->pfn); 30 - unsigned long iosize = desc->length; 31 - 32 - if (p >= iophys && (p + size) <= (iophys + iosize)) 33 - return __io(desc->virtual + p - iophys); 34 - } 35 - 36 - return __arm_ioremap_caller(p, size, type, 37 - __builtin_return_address(0)); 38 - } 39 - EXPORT_SYMBOL(davinci_ioremap); 40 - 41 - void davinci_iounmap(volatile void __iomem *addr) 42 - { 43 - unsigned long virt = (unsigned long)addr; 44 - 45 - if (virt >= VMALLOC_START && virt < VMALLOC_END) 46 - __iounmap(addr); 47 - } 48 - EXPORT_SYMBOL(davinci_iounmap);
-2
arch/arm/mach-dove/include/mach/dove.h
··· 11 11 #ifndef __ASM_ARCH_DOVE_H 12 12 #define __ASM_ARCH_DOVE_H 13 13 14 - #include <mach/vmalloc.h> 15 - 16 14 /* 17 15 * Marvell Dove address maps. 18 16 *
-5
arch/arm/mach-dove/include/mach/vmalloc.h
··· 1 - /* 2 - * arch/arm/mach-dove/include/mach/vmalloc.h 3 - */ 4 - 5 - #define VMALLOC_END 0xfd800000UL
+1 -1
arch/arm/mach-ebsa110/core.c
··· 283 283 .atag_offset = 0x400, 284 284 .reserve_lp0 = 1, 285 285 .reserve_lp2 = 1, 286 - .soft_reboot = 1, 286 + .restart_mode = 's', 287 287 .map_io = ebsa110_map_io, 288 288 .init_irq = ebsa110_init_irq, 289 289 .timer = &ebsa110_timer,
+1 -1
arch/arm/mach-ebsa110/include/mach/system.h
··· 34 34 asm volatile ("mcr p15, 0, ip, c15, c1, 2" : : : "cc"); 35 35 } 36 36 37 - #define arch_reset(mode, cmd) cpu_reset(0x80000000) 37 + #define arch_reset(mode, cmd) soft_restart(0x80000000) 38 38 39 39 #endif
-10
arch/arm/mach-ebsa110/include/mach/vmalloc.h
··· 1 - /* 2 - * arch/arm/mach-ebsa110/include/mach/vmalloc.h 3 - * 4 - * Copyright (C) 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 - #define VMALLOC_END 0xdf000000UL
+2
arch/arm/mach-ep93xx/adssphere.c
··· 16 16 17 17 #include <mach/hardware.h> 18 18 19 + #include <asm/hardware/vic.h> 19 20 #include <asm/mach-types.h> 20 21 #include <asm/mach/arch.h> 21 22 ··· 37 36 .atag_offset = 0x100, 38 37 .map_io = ep93xx_map_io, 39 38 .init_irq = ep93xx_init_irq, 39 + .handle_irq = vic_handle_irq, 40 40 .timer = &ep93xx_timer, 41 41 .init_machine = adssphere_init_machine, 42 42 MACHINE_END
+9
arch/arm/mach-ep93xx/edb93xx.c
··· 39 39 #include <mach/ep93xx_spi.h> 40 40 #include <mach/gpio-ep93xx.h> 41 41 42 + #include <asm/hardware/vic.h> 42 43 #include <asm/mach-types.h> 43 44 #include <asm/mach/arch.h> 44 45 ··· 251 250 .atag_offset = 0x100, 252 251 .map_io = ep93xx_map_io, 253 252 .init_irq = ep93xx_init_irq, 253 + .handle_irq = vic_handle_irq, 254 254 .timer = &ep93xx_timer, 255 255 .init_machine = edb93xx_init_machine, 256 256 MACHINE_END ··· 263 261 .atag_offset = 0x100, 264 262 .map_io = ep93xx_map_io, 265 263 .init_irq = ep93xx_init_irq, 264 + .handle_irq = vic_handle_irq, 266 265 .timer = &ep93xx_timer, 267 266 .init_machine = edb93xx_init_machine, 268 267 MACHINE_END ··· 275 272 .atag_offset = 0x100, 276 273 .map_io = ep93xx_map_io, 277 274 .init_irq = ep93xx_init_irq, 275 + .handle_irq = vic_handle_irq, 278 276 .timer = &ep93xx_timer, 279 277 .init_machine = edb93xx_init_machine, 280 278 MACHINE_END ··· 287 283 .atag_offset = 0x100, 288 284 .map_io = ep93xx_map_io, 289 285 .init_irq = ep93xx_init_irq, 286 + .handle_irq = vic_handle_irq, 290 287 .timer = &ep93xx_timer, 291 288 .init_machine = edb93xx_init_machine, 292 289 MACHINE_END ··· 299 294 .atag_offset = 0x100, 300 295 .map_io = ep93xx_map_io, 301 296 .init_irq = ep93xx_init_irq, 297 + .handle_irq = vic_handle_irq, 302 298 .timer = &ep93xx_timer, 303 299 .init_machine = edb93xx_init_machine, 304 300 MACHINE_END ··· 311 305 .atag_offset = 0x100, 312 306 .map_io = ep93xx_map_io, 313 307 .init_irq = ep93xx_init_irq, 308 + .handle_irq = vic_handle_irq, 314 309 .timer = &ep93xx_timer, 315 310 .init_machine = edb93xx_init_machine, 316 311 MACHINE_END ··· 323 316 .atag_offset = 0x100, 324 317 .map_io = ep93xx_map_io, 325 318 .init_irq = ep93xx_init_irq, 319 + .handle_irq = vic_handle_irq, 326 320 .timer = &ep93xx_timer, 327 321 .init_machine = edb93xx_init_machine, 328 322 MACHINE_END ··· 335 327 .atag_offset = 0x100, 336 328 .map_io = ep93xx_map_io, 337 329 .init_irq = ep93xx_init_irq, 330 + .handle_irq = vic_handle_irq, 338 331 .timer = &ep93xx_timer, 339 332 .init_machine = edb93xx_init_machine, 340 333 MACHINE_END
+2
arch/arm/mach-ep93xx/gesbc9312.c
··· 16 16 17 17 #include <mach/hardware.h> 18 18 19 + #include <asm/hardware/vic.h> 19 20 #include <asm/mach-types.h> 20 21 #include <asm/mach/arch.h> 21 22 ··· 37 36 .atag_offset = 0x100, 38 37 .map_io = ep93xx_map_io, 39 38 .init_irq = ep93xx_init_irq, 39 + .handle_irq = vic_handle_irq, 40 40 .timer = &ep93xx_timer, 41 41 .init_machine = gesbc9312_init_machine, 42 42 MACHINE_END
-42
arch/arm/mach-ep93xx/include/mach/entry-macro.S
··· 9 9 * the Free Software Foundation; either version 2 of the License, or (at 10 10 * your option) any later version. 11 11 */ 12 - #include <mach/ep93xx-regs.h> 13 12 14 13 .macro disable_fiq 15 14 .endm 16 15 17 - .macro get_irqnr_preamble, base, tmp 18 - .endm 19 - 20 16 .macro arch_ret_to_user, tmp1, tmp2 21 - .endm 22 - 23 - .macro get_irqnr_and_base, irqnr, irqstat, base, tmp 24 - ldr \base, =(EP93XX_AHB_VIRT_BASE) 25 - orr \base, \base, #0x000b0000 26 - mov \irqnr, #0 27 - ldr \irqstat, [\base] @ lower 32 interrupts 28 - cmp \irqstat, #0 29 - bne 1001f 30 - 31 - eor \base, \base, #0x00070000 32 - ldr \irqstat, [\base] @ upper 32 interrupts 33 - cmp \irqstat, #0 34 - beq 1002f 35 - mov \irqnr, #0x20 36 - 37 - 1001: 38 - movs \tmp, \irqstat, lsl #16 39 - movne \irqstat, \tmp 40 - addeq \irqnr, \irqnr, #16 41 - 42 - movs \tmp, \irqstat, lsl #8 43 - movne \irqstat, \tmp 44 - addeq \irqnr, \irqnr, #8 45 - 46 - movs \tmp, \irqstat, lsl #4 47 - movne \irqstat, \tmp 48 - addeq \irqnr, \irqnr, #4 49 - 50 - movs \tmp, \irqstat, lsl #2 51 - movne \irqstat, \tmp 52 - addeq \irqnr, \irqnr, #2 53 - 54 - movs \tmp, \irqstat, lsl #1 55 - addeq \irqnr, \irqnr, #1 56 - orrs \base, \base, #1 57 - 58 - 1002: 59 17 .endm
-2
arch/arm/mach-ep93xx/include/mach/system.h
··· 11 11 12 12 static inline void arch_reset(char mode, const char *cmd) 13 13 { 14 - local_irq_disable(); 15 - 16 14 /* 17 15 * Set then clear the SWRST bit to initiate a software reset 18 16 */
-5
arch/arm/mach-ep93xx/include/mach/vmalloc.h
··· 1 - /* 2 - * arch/arm/mach-ep93xx/include/mach/vmalloc.h 3 - */ 4 - 5 - #define VMALLOC_END 0xfe800000UL
+5
arch/arm/mach-ep93xx/micro9.c
··· 18 18 19 19 #include <mach/hardware.h> 20 20 21 + #include <asm/hardware/vic.h> 21 22 #include <asm/mach-types.h> 22 23 #include <asm/mach/arch.h> 23 24 ··· 81 80 .atag_offset = 0x100, 82 81 .map_io = ep93xx_map_io, 83 82 .init_irq = ep93xx_init_irq, 83 + .handle_irq = vic_handle_irq, 84 84 .timer = &ep93xx_timer, 85 85 .init_machine = micro9_init_machine, 86 86 MACHINE_END ··· 93 91 .atag_offset = 0x100, 94 92 .map_io = ep93xx_map_io, 95 93 .init_irq = ep93xx_init_irq, 94 + .handle_irq = vic_handle_irq, 96 95 .timer = &ep93xx_timer, 97 96 .init_machine = micro9_init_machine, 98 97 MACHINE_END ··· 105 102 .atag_offset = 0x100, 106 103 .map_io = ep93xx_map_io, 107 104 .init_irq = ep93xx_init_irq, 105 + .handle_irq = vic_handle_irq, 108 106 .timer = &ep93xx_timer, 109 107 .init_machine = micro9_init_machine, 110 108 MACHINE_END ··· 117 113 .atag_offset = 0x100, 118 114 .map_io = ep93xx_map_io, 119 115 .init_irq = ep93xx_init_irq, 116 + .handle_irq = vic_handle_irq, 120 117 .timer = &ep93xx_timer, 121 118 .init_machine = micro9_init_machine, 122 119 MACHINE_END
+2
arch/arm/mach-ep93xx/simone.c
··· 25 25 #include <mach/fb.h> 26 26 #include <mach/gpio-ep93xx.h> 27 27 28 + #include <asm/hardware/vic.h> 28 29 #include <asm/mach-types.h> 29 30 #include <asm/mach/arch.h> 30 31 ··· 81 80 .atag_offset = 0x100, 82 81 .map_io = ep93xx_map_io, 83 82 .init_irq = ep93xx_init_irq, 83 + .handle_irq = vic_handle_irq, 84 84 .timer = &ep93xx_timer, 85 85 .init_machine = simone_init_machine, 86 86 MACHINE_END
+2
arch/arm/mach-ep93xx/snappercl15.c
··· 31 31 #include <mach/fb.h> 32 32 #include <mach/gpio-ep93xx.h> 33 33 34 + #include <asm/hardware/vic.h> 34 35 #include <asm/mach-types.h> 35 36 #include <asm/mach/arch.h> 36 37 ··· 178 177 .atag_offset = 0x100, 179 178 .map_io = ep93xx_map_io, 180 179 .init_irq = ep93xx_init_irq, 180 + .handle_irq = vic_handle_irq, 181 181 .timer = &ep93xx_timer, 182 182 .init_machine = snappercl15_init_machine, 183 183 MACHINE_END
+2
arch/arm/mach-ep93xx/ts72xx.c
··· 23 23 #include <mach/hardware.h> 24 24 #include <mach/ts72xx.h> 25 25 26 + #include <asm/hardware/vic.h> 26 27 #include <asm/mach-types.h> 27 28 #include <asm/mach/map.h> 28 29 #include <asm/mach/arch.h> ··· 248 247 .atag_offset = 0x100, 249 248 .map_io = ts72xx_map_io, 250 249 .init_irq = ep93xx_init_irq, 250 + .handle_irq = vic_handle_irq, 251 251 .timer = &ep93xx_timer, 252 252 .init_machine = ts72xx_init_machine, 253 253 MACHINE_END
+2
arch/arm/mach-exynos/Kconfig
··· 17 17 18 18 config ARCH_EXYNOS4 19 19 bool "SAMSUNG EXYNOS4" 20 + select HAVE_SMP 21 + select MIGHT_HAVE_CACHE_L2X0 20 22 help 21 23 Samsung EXYNOS4 SoCs based systems 22 24
+3 -17
arch/arm/mach-exynos/cpu.c
··· 15 15 #include <asm/mach/irq.h> 16 16 17 17 #include <asm/proc-fns.h> 18 + #include <asm/exception.h> 18 19 #include <asm/hardware/cache-l2x0.h> 19 20 #include <asm/hardware/gic.h> 20 21 ··· 33 32 34 33 #include <mach/regs-irq.h> 35 34 #include <mach/regs-pmu.h> 36 - 37 - unsigned int gic_bank_offset __read_mostly; 38 35 39 36 extern int combiner_init(unsigned int combiner_nr, void __iomem *base, 40 37 unsigned int irq_start); ··· 201 202 exynos4_setup_clocks(); 202 203 } 203 204 204 - static void exynos4_gic_irq_fix_base(struct irq_data *d) 205 - { 206 - struct gic_chip_data *gic_data = irq_data_get_irq_chip_data(d); 207 - 208 - gic_data->cpu_base = S5P_VA_GIC_CPU + 209 - (gic_bank_offset * smp_processor_id()); 210 - 211 - gic_data->dist_base = S5P_VA_GIC_DIST + 212 - (gic_bank_offset * smp_processor_id()); 213 - } 214 - 215 205 void __init exynos4_init_irq(void) 216 206 { 217 207 int irq; 208 + unsigned int gic_bank_offset; 218 209 219 210 gic_bank_offset = soc_is_exynos4412() ? 0x4000 : 0x8000; 220 211 221 - gic_init(0, IRQ_PPI(0), S5P_VA_GIC_DIST, S5P_VA_GIC_CPU); 222 - gic_arch_extn.irq_eoi = exynos4_gic_irq_fix_base; 223 - gic_arch_extn.irq_unmask = exynos4_gic_irq_fix_base; 224 - gic_arch_extn.irq_mask = exynos4_gic_irq_fix_base; 212 + gic_init_bases(0, IRQ_PPI(0), S5P_VA_GIC_DIST, S5P_VA_GIC_CPU, gic_bank_offset); 225 213 226 214 for (irq = 0; irq < MAX_COMBINER_NR; irq++) { 227 215
-75
arch/arm/mach-exynos/include/mach/entry-macro.S
··· 9 9 * warranty of any kind, whether express or implied. 10 10 */ 11 11 12 - #include <mach/hardware.h> 13 - #include <mach/map.h> 14 - #include <asm/hardware/gic.h> 15 - 16 12 .macro disable_fiq 17 13 .endm 18 14 19 - .macro get_irqnr_preamble, base, tmp 20 - mov \tmp, #0 21 - 22 - mrc p15, 0, \base, c0, c0, 5 23 - and \base, \base, #3 24 - cmp \base, #0 25 - beq 1f 26 - 27 - ldr \tmp, =gic_bank_offset 28 - ldr \tmp, [\tmp] 29 - cmp \base, #1 30 - beq 1f 31 - 32 - cmp \base, #2 33 - addeq \tmp, \tmp, \tmp 34 - addne \tmp, \tmp, \tmp, LSL #1 35 - 36 - 1: ldr \base, =gic_cpu_base_addr 37 - ldr \base, [\base] 38 - add \base, \base, \tmp 39 - .endm 40 - 41 15 .macro arch_ret_to_user, tmp1, tmp2 42 - .endm 43 - 44 - /* 45 - * The interrupt numbering scheme is defined in the 46 - * interrupt controller spec. To wit: 47 - * 48 - * Interrupts 0-15 are IPI 49 - * 16-28 are reserved 50 - * 29-31 are local. We allow 30 to be used for the watchdog. 51 - * 32-1020 are global 52 - * 1021-1022 are reserved 53 - * 1023 is "spurious" (no interrupt) 54 - * 55 - * For now, we ignore all local interrupts so only return an interrupt if it's 56 - * between 30 and 1020. The test_for_ipi routine below will pick up on IPIs. 57 - * 58 - * A simple read from the controller will tell us the number of the highest 59 - * priority enabled interrupt. We then just need to check whether it is in the 60 - * valid range for an IRQ (30-1020 inclusive). 61 - */ 62 - 63 - .macro get_irqnr_and_base, irqnr, irqstat, base, tmp 64 - 65 - ldr \irqstat, [\base, #GIC_CPU_INTACK] /* bits 12-10 = src CPU, 9-0 = int # */ 66 - 67 - ldr \tmp, =1021 68 - 69 - bic \irqnr, \irqstat, #0x1c00 70 - 71 - cmp \irqnr, #15 72 - cmpcc \irqnr, \irqnr 73 - cmpne \irqnr, \tmp 74 - cmpcs \irqnr, \irqnr 75 - addne \irqnr, \irqnr, #32 76 - 77 - .endm 78 - 79 - /* We assume that irqstat (the raw value of the IRQ acknowledge 80 - * register) is preserved from the macro above. 81 - * If there is an IPI, we immediately signal end of interrupt on the 82 - * controller, since this requires the original irqstat value which 83 - * we won't easily be able to recreate later. 84 - */ 85 - 86 - .macro test_for_ipi, irqnr, irqstat, base, tmp 87 - bic \irqnr, \irqstat, #0x1c00 88 - cmp \irqnr, #16 89 - strcc \irqstat, [\base, #GIC_CPU_EOI] 90 - cmpcs \irqnr, \irqnr 91 16 .endm
-22
arch/arm/mach-exynos/include/mach/vmalloc.h
··· 1 - /* linux/arch/arm/mach-exynos4/include/mach/vmalloc.h 2 - * 3 - * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd. 4 - * http://www.samsung.com 5 - * 6 - * Copyright 2010 Ben Dooks <ben-linux@fluff.org> 7 - * 8 - * Based on arch/arm/mach-s5p6440/include/mach/vmalloc.h 9 - * 10 - * This program is free software; you can redistribute it and/or modify 11 - * it under the terms of the GNU General Public License version 2 as 12 - * published by the Free Software Foundation. 13 - * 14 - * EXYNOS4 vmalloc definition 15 - */ 16 - 17 - #ifndef __ASM_ARCH_VMALLOC_H 18 - #define __ASM_ARCH_VMALLOC_H __FILE__ 19 - 20 - #define VMALLOC_END 0xF6000000UL 21 - 22 - #endif /* __ASM_ARCH_VMALLOC_H */
+2
arch/arm/mach-exynos/mach-armlex4210.c
··· 16 16 #include <linux/smsc911x.h> 17 17 18 18 #include <asm/mach/arch.h> 19 + #include <asm/hardware/gic.h> 19 20 #include <asm/mach-types.h> 20 21 21 22 #include <plat/cpu.h> ··· 211 210 .atag_offset = 0x100, 212 211 .init_irq = exynos4_init_irq, 213 212 .map_io = armlex4210_map_io, 213 + .handle_irq = gic_handle_irq, 214 214 .init_machine = armlex4210_machine_init, 215 215 .timer = &exynos4_timer, 216 216 MACHINE_END
+2
arch/arm/mach-exynos/mach-nuri.c
··· 32 32 #include <media/v4l2-mediabus.h> 33 33 34 34 #include <asm/mach/arch.h> 35 + #include <asm/hardware/gic.h> 35 36 #include <asm/mach-types.h> 36 37 37 38 #include <plat/adc.h> ··· 1334 1333 .atag_offset = 0x100, 1335 1334 .init_irq = exynos4_init_irq, 1336 1335 .map_io = nuri_map_io, 1336 + .handle_irq = gic_handle_irq, 1337 1337 .init_machine = nuri_machine_init, 1338 1338 .timer = &exynos4_timer, 1339 1339 .reserve = &nuri_reserve,
+2
arch/arm/mach-exynos/mach-origen.c
··· 22 22 #include <linux/lcd.h> 23 23 24 24 #include <asm/mach/arch.h> 25 + #include <asm/hardware/gic.h> 25 26 #include <asm/mach-types.h> 26 27 27 28 #include <video/platform_lcd.h> ··· 695 694 .atag_offset = 0x100, 696 695 .init_irq = exynos4_init_irq, 697 696 .map_io = origen_map_io, 697 + .handle_irq = gic_handle_irq, 698 698 .init_machine = origen_machine_init, 699 699 .timer = &exynos4_timer, 700 700 .reserve = &origen_reserve,
+3
arch/arm/mach-exynos/mach-smdk4x12.c
··· 21 21 #include <linux/serial_core.h> 22 22 23 23 #include <asm/mach/arch.h> 24 + #include <asm/hardware/gic.h> 24 25 #include <asm/mach-types.h> 25 26 26 27 #include <plat/backlight.h> ··· 288 287 .atag_offset = 0x100, 289 288 .init_irq = exynos4_init_irq, 290 289 .map_io = smdk4x12_map_io, 290 + .handle_irq = gic_handle_irq, 291 291 .init_machine = smdk4x12_machine_init, 292 292 .timer = &exynos4_timer, 293 293 MACHINE_END ··· 299 297 .atag_offset = 0x100, 300 298 .init_irq = exynos4_init_irq, 301 299 .map_io = smdk4x12_map_io, 300 + .handle_irq = gic_handle_irq, 302 301 .init_machine = smdk4x12_machine_init, 303 302 .timer = &exynos4_timer, 304 303 MACHINE_END
+3
arch/arm/mach-exynos/mach-smdkv310.c
··· 21 21 #include <linux/pwm_backlight.h> 22 22 23 23 #include <asm/mach/arch.h> 24 + #include <asm/hardware/gic.h> 24 25 #include <asm/mach-types.h> 25 26 26 27 #include <video/platform_lcd.h> ··· 376 375 .atag_offset = 0x100, 377 376 .init_irq = exynos4_init_irq, 378 377 .map_io = smdkv310_map_io, 378 + .handle_irq = gic_handle_irq, 379 379 .init_machine = smdkv310_machine_init, 380 380 .timer = &exynos4_timer, 381 381 .reserve = &smdkv310_reserve, ··· 387 385 .atag_offset = 0x100, 388 386 .init_irq = exynos4_init_irq, 389 387 .map_io = smdkv310_map_io, 388 + .handle_irq = gic_handle_irq, 390 389 .init_machine = smdkv310_machine_init, 391 390 .timer = &exynos4_timer, 392 391 MACHINE_END
+2
arch/arm/mach-exynos/mach-universal_c210.c
··· 24 24 #include <linux/i2c/atmel_mxt_ts.h> 25 25 26 26 #include <asm/mach/arch.h> 27 + #include <asm/hardware/gic.h> 27 28 #include <asm/mach-types.h> 28 29 29 30 #include <plat/regs-serial.h> ··· 1059 1058 .atag_offset = 0x100, 1060 1059 .init_irq = exynos4_init_irq, 1061 1060 .map_io = universal_map_io, 1061 + .handle_irq = gic_handle_irq, 1062 1062 .init_machine = universal_machine_init, 1063 1063 .timer = &exynos4_timer, 1064 1064 .reserve = &universal_reserve,
+1 -27
arch/arm/mach-exynos/platsmp.c
··· 32 32 33 33 #include <plat/cpu.h> 34 34 35 - extern unsigned int gic_bank_offset; 36 35 extern void exynos4_secondary_startup(void); 37 36 38 37 #define CPU1_BOOT_REG (samsung_rev() == EXYNOS4210_REV_1_1 ? \ ··· 64 65 65 66 static DEFINE_SPINLOCK(boot_lock); 66 67 67 - static void __cpuinit exynos4_gic_secondary_init(void) 68 - { 69 - void __iomem *dist_base = S5P_VA_GIC_DIST + 70 - (gic_bank_offset * smp_processor_id()); 71 - void __iomem *cpu_base = S5P_VA_GIC_CPU + 72 - (gic_bank_offset * smp_processor_id()); 73 - int i; 74 - 75 - /* 76 - * Deal with the banked PPI and SGI interrupts - disable all 77 - * PPI interrupts, ensure all SGI interrupts are enabled. 78 - */ 79 - __raw_writel(0xffff0000, dist_base + GIC_DIST_ENABLE_CLEAR); 80 - __raw_writel(0x0000ffff, dist_base + GIC_DIST_ENABLE_SET); 81 - 82 - /* 83 - * Set priority on PPI and SGI interrupts 84 - */ 85 - for (i = 0; i < 32; i += 4) 86 - __raw_writel(0xa0a0a0a0, dist_base + GIC_DIST_PRI + i * 4 / 4); 87 - 88 - __raw_writel(0xf0, cpu_base + GIC_CPU_PRIMASK); 89 - __raw_writel(1, cpu_base + GIC_CPU_CTRL); 90 - } 91 - 92 68 void __cpuinit platform_secondary_init(unsigned int cpu) 93 69 { 94 70 /* ··· 71 97 * core (e.g. timer irq), then they will not have been enabled 72 98 * for us: do so 73 99 */ 74 - exynos4_gic_secondary_init(); 100 + gic_secondary_init(0); 75 101 76 102 /* 77 103 * let the primary processor know we're out of the
+1 -1
arch/arm/mach-footbridge/cats-hw.c
··· 86 86 MACHINE_START(CATS, "Chalice-CATS") 87 87 /* Maintainer: Philip Blundell */ 88 88 .atag_offset = 0x100, 89 - .soft_reboot = 1, 89 + .restart_mode = 's', 90 90 .fixup = fixup_cats, 91 91 .map_io = footbridge_map_io, 92 92 .init_irq = footbridge_init_irq,
+1 -1
arch/arm/mach-footbridge/include/mach/system.h
··· 24 24 /* 25 25 * Jump into the ROM 26 26 */ 27 - cpu_reset(0x41000000); 27 + soft_restart(0x41000000); 28 28 } else { 29 29 if (machine_is_netwinder()) { 30 30 /* open up the SuperIO chip
-10
arch/arm/mach-footbridge/include/mach/vmalloc.h
··· 1 - /* 2 - * arch/arm/mach-footbridge/include/mach/vmalloc.h 3 - * 4 - * This program is free software; you can redistribute it and/or modify 5 - * it under the terms of the GNU General Public License version 2 as 6 - * published by the Free Software Foundation. 7 - */ 8 - 9 - 10 - #define VMALLOC_END 0xf0000000UL
-10
arch/arm/mach-gemini/include/mach/vmalloc.h
··· 1 - /* 2 - * Copyright (C) 2008-2009 Paulius Zaleckas <paulius.zaleckas@teltonika.lt> 3 - * 4 - * This program is free software; you can redistribute it and/or modify 5 - * it under the terms of the GNU General Public License as published by 6 - * the Free Software Foundation; either version 2 of the License, or 7 - * (at your option) any later version. 8 - */ 9 - 10 - #define VMALLOC_END 0xf0000000UL
-10
arch/arm/mach-h720x/include/mach/vmalloc.h
··· 1 - /* 2 - * arch/arm/mach-h720x/include/mach/vmalloc.h 3 - */ 4 - 5 - #ifndef __ARCH_ARM_VMALLOC_H 6 - #define __ARCH_ARM_VMALLOC_H 7 - 8 - #define VMALLOC_END 0xd0000000UL 9 - 10 - #endif
+1
arch/arm/mach-highbank/highbank.c
··· 144 144 .map_io = highbank_map_io, 145 145 .init_irq = highbank_init_irq, 146 146 .timer = &highbank_timer, 147 + .handle_irq = gic_handle_irq, 147 148 .init_machine = highbank_init, 148 149 .dt_compat = highbank_match, 149 150 MACHINE_END
-2
arch/arm/mach-highbank/include/mach/entry-macro.S
··· 1 - #include <asm/hardware/entry-macro-gic.S> 2 - 3 1 .macro disable_fiq 4 2 .endm 5 3
-1
arch/arm/mach-highbank/include/mach/vmalloc.h
··· 1 - #define VMALLOC_END 0xFEE00000UL
+1 -1
arch/arm/mach-imx/Kconfig
··· 596 596 config SOC_IMX6Q 597 597 bool "i.MX6 Quad support" 598 598 select ARM_GIC 599 - select CACHE_L2X0 600 599 select CPU_V7 601 600 select HAVE_ARM_SCU 602 601 select HAVE_IMX_GPC 603 602 select HAVE_IMX_MMDC 604 603 select HAVE_IMX_SRC 604 + select HAVE_SMP 605 605 select USE_OF 606 606 607 607 help
-20
arch/arm/mach-integrator/include/mach/vmalloc.h
··· 1 - /* 2 - * arch/arm/mach-integrator/include/mach/vmalloc.h 3 - * 4 - * Copyright (C) 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 as published by 8 - * the Free Software Foundation; either version 2 of the License, or 9 - * (at your option) any later version. 10 - * 11 - * This program is distributed in the hope that it will be useful, 12 - * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 - * GNU General Public License for more details. 15 - * 16 - * You should have received a copy of the GNU General Public License 17 - * along with this program; if not, write to the Free Software 18 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 - */ 20 - #define VMALLOC_END 0xd0000000UL
-4
arch/arm/mach-iop13xx/include/mach/vmalloc.h
··· 1 - #ifndef _VMALLOC_H_ 2 - #define _VMALLOC_H_ 3 - #define VMALLOC_END 0xfa000000UL 4 - #endif
-7
arch/arm/mach-iop32x/include/mach/io.h
··· 13 13 14 14 #include <asm/hardware/iop3xx.h> 15 15 16 - extern void __iomem *__iop3xx_ioremap(unsigned long cookie, size_t size, 17 - unsigned int mtype); 18 - extern void __iop3xx_iounmap(void __iomem *addr); 19 - 20 16 #define IO_SPACE_LIMIT 0xffffffff 21 17 #define __io(p) ((void __iomem *)IOP3XX_PCI_IO_PHYS_TO_VIRT(p)) 22 18 #define __mem_pci(a) (a) 23 - 24 - #define __arch_ioremap __iop3xx_ioremap 25 - #define __arch_iounmap __iop3xx_iounmap 26 19 27 20 #endif
+1 -3
arch/arm/mach-iop32x/include/mach/system.h
··· 18 18 19 19 static inline void arch_reset(char mode, const char *cmd) 20 20 { 21 - local_irq_disable(); 22 - 23 21 if (machine_is_n2100()) { 24 22 gpio_line_set(N2100_HARDWARE_RESET, GPIO_LOW); 25 23 gpio_line_config(N2100_HARDWARE_RESET, GPIO_OUT); ··· 28 30 *IOP3XX_PCSR = 0x30; 29 31 30 32 /* Jump into ROM at address 0 */ 31 - cpu_reset(0); 33 + soft_restart(0); 32 34 }
-5
arch/arm/mach-iop32x/include/mach/vmalloc.h
··· 1 - /* 2 - * arch/arm/mach-iop32x/include/mach/vmalloc.h 3 - */ 4 - 5 - #define VMALLOC_END 0xfe000000UL
-7
arch/arm/mach-iop33x/include/mach/io.h
··· 13 13 14 14 #include <asm/hardware/iop3xx.h> 15 15 16 - extern void __iomem *__iop3xx_ioremap(unsigned long cookie, size_t size, 17 - unsigned int mtype); 18 - extern void __iop3xx_iounmap(void __iomem *addr); 19 - 20 16 #define IO_SPACE_LIMIT 0xffffffff 21 17 #define __io(p) ((void __iomem *)IOP3XX_PCI_IO_PHYS_TO_VIRT(p)) 22 18 #define __mem_pci(a) (a) 23 - 24 - #define __arch_ioremap __iop3xx_ioremap 25 - #define __arch_iounmap __iop3xx_iounmap 26 19 27 20 #endif
+1 -1
arch/arm/mach-iop33x/include/mach/system.h
··· 19 19 *IOP3XX_PCSR = 0x30; 20 20 21 21 /* Jump into ROM at address 0 */ 22 - cpu_reset(0); 22 + soft_restart(0); 23 23 }
-5
arch/arm/mach-iop33x/include/mach/vmalloc.h
··· 1 - /* 2 - * arch/arm/mach-iop33x/include/mach/vmalloc.h 3 - */ 4 - 5 - #define VMALLOC_END 0xfe000000UL
-2
arch/arm/mach-ixp2000/include/mach/system.h
··· 19 19 20 20 static inline void arch_reset(char mode, const char *cmd) 21 21 { 22 - local_irq_disable(); 23 - 24 22 /* 25 23 * Reset flash banking register so that we are pointing at 26 24 * RedBoot bank.
-20
arch/arm/mach-ixp2000/include/mach/vmalloc.h
··· 1 - /* 2 - * arch/arm/mach-ixp2000/include/mach/vmalloc.h 3 - * 4 - * Author: Naeem Afzal <naeem.m.afzal@intel.com> 5 - * 6 - * Copyright 2002 Intel Corp. 7 - * 8 - * This program is free software; you can redistribute it and/or modify it 9 - * under the terms of the GNU General Public License as published by the 10 - * Free Software Foundation; either version 2 of the License, or (at your 11 - * option) any later version. 12 - * 13 - * Just any arbitrary offset to the start of the vmalloc VM area: the 14 - * current 8MB value just means that there will be a 8MB "hole" after the 15 - * physical memory until the kernel virtual memory starts. That means that 16 - * any out-of-bounds memory accesses will hopefully be caught. 17 - * The vmalloc() routines leaves a hole of 4kB between each vmalloced 18 - * area for the same reason. ;) 19 - */ 20 - #define VMALLOC_END 0xfb000000UL
-29
arch/arm/mach-ixp23xx/include/mach/io.h
··· 20 20 #define __io(p) ((void __iomem*)((p) + IXP23XX_PCI_IO_VIRT)) 21 21 #define __mem_pci(a) (a) 22 22 23 - static inline void __iomem * 24 - ixp23xx_ioremap(unsigned long addr, unsigned long size, unsigned int mtype) 25 - { 26 - if (addr >= IXP23XX_PCI_MEM_START && 27 - addr <= IXP23XX_PCI_MEM_START + IXP23XX_PCI_MEM_SIZE) { 28 - if (addr + size > IXP23XX_PCI_MEM_START + IXP23XX_PCI_MEM_SIZE) 29 - return NULL; 30 - 31 - return (void __iomem *) 32 - ((addr - IXP23XX_PCI_MEM_START) + IXP23XX_PCI_MEM_VIRT); 33 - } 34 - 35 - return __arm_ioremap(addr, size, mtype); 36 - } 37 - 38 - static inline void 39 - ixp23xx_iounmap(void __iomem *addr) 40 - { 41 - if ((((u32)addr) >= IXP23XX_PCI_MEM_VIRT) && 42 - (((u32)addr) < IXP23XX_PCI_MEM_VIRT + IXP23XX_PCI_MEM_SIZE)) 43 - return; 44 - 45 - __iounmap(addr); 46 - } 47 - 48 - #define __arch_ioremap ixp23xx_ioremap 49 - #define __arch_iounmap ixp23xx_iounmap 50 - 51 - 52 23 #endif
-10
arch/arm/mach-ixp23xx/include/mach/vmalloc.h
··· 1 - /* 2 - * arch/arm/mach-ixp23xx/include/mach/vmalloc.h 3 - * 4 - * Copyright (c) 2005 MontaVista Software, Inc. 5 - * 6 - * NPU mappings end at 0xf0000000 and we allocate 64MB for board 7 - * specific static I/O. 8 - */ 9 - 10 - #define VMALLOC_END (0xec000000UL)
+3 -13
arch/arm/mach-ixp4xx/common.c
··· 17 17 #include <linux/mm.h> 18 18 #include <linux/init.h> 19 19 #include <linux/serial.h> 20 - #include <linux/sched.h> 21 20 #include <linux/tty.h> 22 21 #include <linux/platform_device.h> 23 22 #include <linux/serial_core.h> ··· 402 403 /* 403 404 * sched_clock() 404 405 */ 405 - static DEFINE_CLOCK_DATA(cd); 406 - 407 - unsigned long long notrace sched_clock(void) 406 + static u32 notrace ixp4xx_read_sched_clock(void) 408 407 { 409 - u32 cyc = *IXP4XX_OSTS; 410 - return cyc_to_sched_clock(&cd, cyc, (u32)~0); 411 - } 412 - 413 - static void notrace ixp4xx_update_sched_clock(void) 414 - { 415 - u32 cyc = *IXP4XX_OSTS; 416 - update_sched_clock(&cd, cyc, (u32)~0); 408 + return *IXP4XX_OSTS; 417 409 } 418 410 419 411 /* ··· 420 430 EXPORT_SYMBOL(ixp4xx_timer_freq); 421 431 static void __init ixp4xx_clocksource_init(void) 422 432 { 423 - init_sched_clock(&cd, ixp4xx_update_sched_clock, 32, ixp4xx_timer_freq); 433 + setup_sched_clock(ixp4xx_read_sched_clock, 32, ixp4xx_timer_freq); 424 434 425 435 clocksource_mmio_init(NULL, "OSTS", ixp4xx_timer_freq, 200, 32, 426 436 ixp4xx_clocksource_read);
+1 -1
arch/arm/mach-ixp4xx/include/mach/system.h
··· 26 26 { 27 27 if ( 1 && mode == 's') { 28 28 /* Jump into ROM at address 0 */ 29 - cpu_reset(0); 29 + soft_restart(0); 30 30 } else { 31 31 /* Use on-chip reset capability */ 32 32
-5
arch/arm/mach-ixp4xx/include/mach/vmalloc.h
··· 1 - /* 2 - * arch/arm/mach-ixp4xx/include/mach/vmalloc.h 3 - */ 4 - #define VMALLOC_END (0xff000000UL) 5 -
-25
arch/arm/mach-kirkwood/include/mach/io.h
··· 19 19 + KIRKWOOD_PCIE_IO_VIRT_BASE); 20 20 } 21 21 22 - static inline void __iomem * 23 - __arch_ioremap(unsigned long paddr, size_t size, unsigned int mtype) 24 - { 25 - void __iomem *retval; 26 - unsigned long offs = paddr - KIRKWOOD_REGS_PHYS_BASE; 27 - if (mtype == MT_DEVICE && size && offs < KIRKWOOD_REGS_SIZE && 28 - size <= KIRKWOOD_REGS_SIZE && offs + size <= KIRKWOOD_REGS_SIZE) { 29 - retval = (void __iomem *)KIRKWOOD_REGS_VIRT_BASE + offs; 30 - } else { 31 - retval = __arm_ioremap(paddr, size, mtype); 32 - } 33 - 34 - return retval; 35 - } 36 - 37 - static inline void 38 - __arch_iounmap(void __iomem *addr) 39 - { 40 - if (addr < (void __iomem *)KIRKWOOD_REGS_VIRT_BASE || 41 - addr >= (void __iomem *)(KIRKWOOD_REGS_VIRT_BASE + KIRKWOOD_REGS_SIZE)) 42 - __iounmap(addr); 43 - } 44 - 45 - #define __arch_ioremap __arch_ioremap 46 - #define __arch_iounmap __arch_iounmap 47 22 #define __io(a) __io(a) 48 23 #define __mem_pci(a) (a) 49 24
-5
arch/arm/mach-kirkwood/include/mach/vmalloc.h
··· 1 - /* 2 - * arch/arm/mach-kirkwood/include/mach/vmalloc.h 3 - */ 4 - 5 - #define VMALLOC_END 0xfe800000UL
+1 -1
arch/arm/mach-ks8695/include/mach/system.h
··· 32 32 unsigned int reg; 33 33 34 34 if (mode == 's') 35 - cpu_reset(0); 35 + soft_restart(0); 36 36 37 37 /* disable timer0 */ 38 38 reg = __raw_readl(KS8695_TMR_VA + KS8695_TMCON);
-19
arch/arm/mach-ks8695/include/mach/vmalloc.h
··· 1 - /* 2 - * arch/arm/mach-ks8695/include/mach/vmalloc.h 3 - * 4 - * Copyright (C) 2006 Ben Dooks 5 - * Copyright (C) 2006 Simtec Electronics <linux@simtec.co.uk> 6 - * 7 - * KS8695 vmalloc definition 8 - * 9 - * This program is free software; you can redistribute it and/or modify 10 - * it under the terms of the GNU General Public License version 2 as 11 - * published by the Free Software Foundation. 12 - */ 13 - 14 - #ifndef __ASM_ARCH_VMALLOC_H 15 - #define __ASM_ARCH_VMALLOC_H 16 - 17 - #define VMALLOC_END (KS8695_IO_VA & PGDIR_MASK) 18 - 19 - #endif
-3
arch/arm/mach-lpc32xx/include/mach/system.h
··· 33 33 case 'h': 34 34 printk(KERN_CRIT "RESET: Rebooting system\n"); 35 35 36 - /* Disable interrupts */ 37 - local_irq_disable(); 38 - 39 36 lpc32xx_watchdog_reset(); 40 37 break; 41 38
-24
arch/arm/mach-lpc32xx/include/mach/vmalloc.h
··· 1 - /* 2 - * arch/arm/mach-lpc32xx/include/mach/vmalloc.h 3 - * 4 - * Author: Kevin Wells <kevin.wells@nxp.com> 5 - * 6 - * Copyright (C) 2010 NXP Semiconductors 7 - * 8 - * This program is free software; you can redistribute it and/or modify 9 - * it under the terms of the GNU General Public License as published by 10 - * the Free Software Foundation; either version 2 of the License, or 11 - * (at your option) any later version. 12 - * 13 - * This program is distributed in the hope that it will be useful, 14 - * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 - * GNU General Public License for more details. 17 - */ 18 - 19 - #ifndef __ASM_ARCH_VMALLOC_H 20 - #define __ASM_ARCH_VMALLOC_H 21 - 22 - #define VMALLOC_END 0xF0000000UL 23 - 24 - #endif
+2 -2
arch/arm/mach-mmp/include/mach/system.h
··· 19 19 static inline void arch_reset(char mode, const char *cmd) 20 20 { 21 21 if (cpu_is_pxa168()) 22 - cpu_reset(0xffff0000); 22 + soft_restart(0xffff0000); 23 23 else 24 - cpu_reset(0); 24 + soft_restart(0); 25 25 } 26 26 #endif /* __ASM_MACH_SYSTEM_H */
-5
arch/arm/mach-mmp/include/mach/vmalloc.h
··· 1 - /* 2 - * linux/arch/arm/mach-mmp/include/mach/vmalloc.h 3 - */ 4 - 5 - #define VMALLOC_END 0xfe000000UL
+3 -13
arch/arm/mach-mmp/time.c
··· 25 25 26 26 #include <linux/io.h> 27 27 #include <linux/irq.h> 28 - #include <linux/sched.h> 29 28 30 29 #include <asm/sched_clock.h> 31 30 #include <mach/addr-map.h> ··· 41 42 #define MAX_DELTA (0xfffffffe) 42 43 #define MIN_DELTA (16) 43 44 44 - static DEFINE_CLOCK_DATA(cd); 45 - 46 45 /* 47 46 * FIXME: the timer needs some delay to stablize the counter capture 48 47 */ ··· 56 59 return __raw_readl(TIMERS_VIRT_BASE + TMR_CVWR(1)); 57 60 } 58 61 59 - unsigned long long notrace sched_clock(void) 62 + static u32 notrace mmp_read_sched_clock(void) 60 63 { 61 - u32 cyc = timer_read(); 62 - return cyc_to_sched_clock(&cd, cyc, (u32)~0); 63 - } 64 - 65 - static void notrace mmp_update_sched_clock(void) 66 - { 67 - u32 cyc = timer_read(); 68 - update_sched_clock(&cd, cyc, (u32)~0); 64 + return timer_read(); 69 65 } 70 66 71 67 static irqreturn_t timer_interrupt(int irq, void *dev_id) ··· 191 201 { 192 202 timer_config(); 193 203 194 - init_sched_clock(&cd, mmp_update_sched_clock, 32, CLOCK_TICK_RATE); 204 + setup_sched_clock(mmp_read_sched_clock, 32, CLOCK_TICK_RATE); 195 205 196 206 ckevt.mult = div_sc(CLOCK_TICK_RATE, NSEC_PER_SEC, ckevt.shift); 197 207 ckevt.max_delta_ns = clockevent_delta2ns(MAX_DELTA, &ckevt);
+1
arch/arm/mach-msm/Kconfig
··· 67 67 bool 68 68 config ARCH_MSM_SCORPIONMP 69 69 bool 70 + select HAVE_SMP 70 71 71 72 config ARCH_MSM_ARM11 72 73 bool
+2
arch/arm/mach-msm/board-msm8960.c
··· 99 99 .map_io = msm8960_map_io, 100 100 .init_irq = msm8960_init_irq, 101 101 .timer = &msm_timer, 102 + .handle_irq = gic_handle_irq, 102 103 .init_machine = msm8960_sim_init, 103 104 MACHINE_END 104 105 ··· 109 108 .map_io = msm8960_map_io, 110 109 .init_irq = msm8960_init_irq, 111 110 .timer = &msm_timer, 111 + .handle_irq = gic_handle_irq, 112 112 .init_machine = msm8960_rumi3_init, 113 113 MACHINE_END 114 114
+4
arch/arm/mach-msm/board-msm8x60.c
··· 108 108 .reserve = msm8x60_reserve, 109 109 .map_io = msm8x60_map_io, 110 110 .init_irq = msm8x60_init_irq, 111 + .handle_irq = gic_handle_irq, 111 112 .init_machine = msm8x60_init, 112 113 .timer = &msm_timer, 113 114 MACHINE_END ··· 118 117 .reserve = msm8x60_reserve, 119 118 .map_io = msm8x60_map_io, 120 119 .init_irq = msm8x60_init_irq, 120 + .handle_irq = gic_handle_irq, 121 121 .init_machine = msm8x60_init, 122 122 .timer = &msm_timer, 123 123 MACHINE_END ··· 128 126 .reserve = msm8x60_reserve, 129 127 .map_io = msm8x60_map_io, 130 128 .init_irq = msm8x60_init_irq, 129 + .handle_irq = gic_handle_irq, 131 130 .init_machine = msm8x60_init, 132 131 .timer = &msm_timer, 133 132 MACHINE_END ··· 138 135 .reserve = msm8x60_reserve, 139 136 .map_io = msm8x60_map_io, 140 137 .init_irq = msm8x60_init_irq, 138 + .handle_irq = gic_handle_irq, 141 139 .init_machine = msm8x60_init, 142 140 .timer = &msm_timer, 143 141 MACHINE_END
-17
arch/arm/mach-msm/include/mach/entry-macro-qgic.S
··· 1 - /* 2 - * Low-level IRQ helper macros 3 - * 4 - * Copyright (c) 2010, Code Aurora Forum. All rights reserved. 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 - 11 - #include <asm/hardware/entry-macro-gic.S> 12 - 13 - .macro disable_fiq 14 - .endm 15 - 16 - .macro arch_ret_to_user, tmp1, tmp2 17 - .endm
-37
arch/arm/mach-msm/include/mach/entry-macro-vic.S
··· 1 - /* 2 - * Copyright (C) 2007 Google, Inc. 3 - * Author: Brian Swetland <swetland@google.com> 4 - * 5 - * This software is licensed under the terms of the GNU General Public 6 - * License version 2, as published by the Free Software Foundation, and 7 - * may be copied, distributed, and modified under those terms. 8 - * 9 - * This program is distributed in the hope that it will be useful, 10 - * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 - * GNU General Public License for more details. 13 - * 14 - */ 15 - 16 - #include <mach/msm_iomap.h> 17 - 18 - .macro disable_fiq 19 - .endm 20 - 21 - .macro get_irqnr_preamble, base, tmp 22 - @ enable imprecise aborts 23 - cpsie a 24 - mov \base, #MSM_VIC_BASE 25 - .endm 26 - 27 - .macro arch_ret_to_user, tmp1, tmp2 28 - .endm 29 - 30 - .macro get_irqnr_and_base, irqnr, irqstat, base, tmp 31 - @ 0xD0 has irq# or old irq# if the irq has been handled 32 - @ 0xD4 has irq# or -1 if none pending *but* if you just 33 - @ read 0xD4 you never get the first irq for some reason 34 - ldr \irqnr, [\base, #0xD0] 35 - ldr \irqnr, [\base, #0xD4] 36 - cmp \irqnr, #0xffffffff 37 - .endm
+23 -4
arch/arm/mach-msm/include/mach/entry-macro.S
··· 16 16 * 17 17 */ 18 18 19 - #if defined(CONFIG_ARM_GIC) 20 - #include <mach/entry-macro-qgic.S> 21 - #else 22 - #include <mach/entry-macro-vic.S> 19 + .macro disable_fiq 20 + .endm 21 + 22 + .macro arch_ret_to_user, tmp1, tmp2 23 + .endm 24 + 25 + #if !defined(CONFIG_ARM_GIC) 26 + #include <mach/msm_iomap.h> 27 + 28 + .macro get_irqnr_preamble, base, tmp 29 + @ enable imprecise aborts 30 + cpsie a 31 + mov \base, #MSM_VIC_BASE 32 + .endm 33 + 34 + .macro get_irqnr_and_base, irqnr, irqstat, base, tmp 35 + @ 0xD0 has irq# or old irq# if the irq has been handled 36 + @ 0xD4 has irq# or -1 if none pending *but* if you just 37 + @ read 0xD4 you never get the first irq for some reason 38 + ldr \irqnr, [\base, #0xD0] 39 + ldr \irqnr, [\base, #0xD4] 40 + cmp \irqnr, #0xffffffff 41 + .endm 23 42 #endif
-22
arch/arm/mach-msm/include/mach/vmalloc.h
··· 1 - /* arch/arm/mach-msm/include/mach/vmalloc.h 2 - * 3 - * Copyright (C) 2007 Google, Inc. 4 - * 5 - * This software is licensed under the terms of the GNU General Public 6 - * License version 2, as published by the Free Software Foundation, and 7 - * may be copied, distributed, and modified under those terms. 8 - * 9 - * This program is distributed in the hope that it will be useful, 10 - * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 - * GNU General Public License for more details. 13 - * 14 - */ 15 - 16 - #ifndef __ASM_ARCH_MSM_VMALLOC_H 17 - #define __ASM_ARCH_MSM_VMALLOC_H 18 - 19 - #define VMALLOC_END 0xd0000000UL 20 - 21 - #endif 22 -
-5
arch/arm/mach-mv78xx0/include/mach/vmalloc.h
··· 1 - /* 2 - * arch/arm/mach-mv78xx0/include/mach/vmalloc.h 3 - */ 4 - 5 - #define VMALLOC_END 0xfe000000UL
-22
arch/arm/mach-mxs/include/mach/vmalloc.h
··· 1 - /* 2 - * Copyright (C) 2000 Russell King. 3 - * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. 4 - * 5 - * This program is free software; you can redistribute it and/or modify 6 - * it under the terms of the GNU General Public License as published by 7 - * the Free Software Foundation; either version 2 of the License, or 8 - * (at your option) any later version. 9 - * 10 - * This program is distributed in the hope that it will be useful, 11 - * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 - * GNU General Public License for more details. 14 - */ 15 - 16 - #ifndef __MACH_MXS_VMALLOC_H__ 17 - #define __MACH_MXS_VMALLOC_H__ 18 - 19 - /* vmalloc ending address */ 20 - #define VMALLOC_END 0xf4000000UL 21 - 22 - #endif /* __MACH_MXS_VMALLOC_H__ */
+1 -1
arch/arm/mach-mxs/system.c
··· 53 53 mdelay(50); 54 54 55 55 /* We'll take a jump through zero as a poor second */ 56 - cpu_reset(0); 56 + soft_restart(0); 57 57 } 58 58 59 59 static int __init mxs_arch_reset_init(void)
-13
arch/arm/mach-netx/include/mach/entry-macro.S
··· 18 18 * along with this program; if not, write to the Free Software 19 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 20 */ 21 - #include <mach/hardware.h> 22 21 23 22 .macro disable_fiq 24 23 .endm 25 24 26 - .macro get_irqnr_preamble, base, tmp 27 - ldr \base, =io_p2v(0x001ff000) 28 - .endm 29 - 30 25 .macro arch_ret_to_user, tmp1, tmp2 31 26 .endm 32 - 33 - .macro get_irqnr_and_base, irqnr, irqstat, base, tmp 34 - ldr \irqstat, [\base, #0] 35 - clz \irqnr, \irqstat 36 - rsb \irqnr, \irqnr, #31 37 - cmp \irqstat, #0 38 - .endm 39 -
-19
arch/arm/mach-netx/include/mach/vmalloc.h
··· 1 - /* 2 - * arch/arm/mach-netx/include/mach/vmalloc.h 3 - * 4 - * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix 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 8 - * as published by the Free Software Foundation. 9 - * 10 - * This program is distributed in the hope that it will be useful, 11 - * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 - * GNU General Public License for more details. 14 - * 15 - * You should have received a copy of the GNU General Public License 16 - * along with this program; if not, write to the Free Software 17 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 - */ 19 - #define VMALLOC_END 0xd0000000UL
+2
arch/arm/mach-netx/nxdb500.c
··· 28 28 #include <mach/hardware.h> 29 29 #include <asm/mach-types.h> 30 30 #include <asm/mach/arch.h> 31 + #include <asm/hardware/vic.h> 31 32 #include <mach/netx-regs.h> 32 33 #include <mach/eth.h> 33 34 ··· 204 203 .atag_offset = 0x100, 205 204 .map_io = netx_map_io, 206 205 .init_irq = netx_init_irq, 206 + .handle_irq = vic_handle_irq, 207 207 .timer = &netx_timer, 208 208 .init_machine = nxdb500_init, 209 209 MACHINE_END
+2
arch/arm/mach-netx/nxdkn.c
··· 28 28 #include <mach/hardware.h> 29 29 #include <asm/mach-types.h> 30 30 #include <asm/mach/arch.h> 31 + #include <asm/hardware/vic.h> 31 32 #include <mach/netx-regs.h> 32 33 #include <mach/eth.h> 33 34 ··· 97 96 .atag_offset = 0x100, 98 97 .map_io = netx_map_io, 99 98 .init_irq = netx_init_irq, 99 + .handle_irq = vic_handle_irq, 100 100 .timer = &netx_timer, 101 101 .init_machine = nxdkn_init, 102 102 MACHINE_END
+2
arch/arm/mach-netx/nxeb500hmi.c
··· 28 28 #include <mach/hardware.h> 29 29 #include <asm/mach-types.h> 30 30 #include <asm/mach/arch.h> 31 + #include <asm/hardware/vic.h> 31 32 #include <mach/netx-regs.h> 32 33 #include <mach/eth.h> 33 34 ··· 181 180 .atag_offset = 0x100, 182 181 .map_io = netx_map_io, 183 182 .init_irq = netx_init_irq, 183 + .handle_irq = vic_handle_irq, 184 184 .timer = &netx_timer, 185 185 .init_machine = nxeb500hmi_init, 186 186 MACHINE_END
+2
arch/arm/mach-nomadik/board-nhk8815.c
··· 21 21 #include <linux/mtd/onenand.h> 22 22 #include <linux/mtd/partitions.h> 23 23 #include <linux/io.h> 24 + #include <asm/hardware/vic.h> 24 25 #include <asm/sizes.h> 25 26 #include <asm/mach-types.h> 26 27 #include <asm/mach/arch.h> ··· 281 280 .atag_offset = 0x100, 282 281 .map_io = cpu8815_map_io, 283 282 .init_irq = cpu8815_init_irq, 283 + .handle_irq = vic_handle_irq, 284 284 .timer = &nomadik_timer, 285 285 .init_machine = nhk8815_platform_init, 286 286 MACHINE_END
-30
arch/arm/mach-nomadik/include/mach/entry-macro.S
··· 6 6 * warranty of any kind, whether express or implied. 7 7 */ 8 8 9 - #include <mach/hardware.h> 10 - #include <mach/irqs.h> 11 - 12 9 .macro disable_fiq 13 10 .endm 14 11 15 - .macro get_irqnr_preamble, base, tmp 16 - ldr \base, =IO_ADDRESS(NOMADIK_IC_BASE) 17 - .endm 18 - 19 12 .macro arch_ret_to_user, tmp1, tmp2 20 - .endm 21 - 22 - .macro get_irqnr_and_base, irqnr, irqstat, base, tmp 23 - 24 - /* This stanza gets the irq mask from one of two status registers */ 25 - mov \irqnr, #0 26 - ldr \irqstat, [\base, #VIC_REG_IRQSR0] @ get masked status 27 - cmp \irqstat, #0 28 - bne 1001f 29 - add \irqnr, \irqnr, #32 30 - ldr \irqstat, [\base, #VIC_REG_IRQSR1] @ get masked status 31 - 32 - 1001: tst \irqstat, #15 33 - bne 1002f 34 - add \irqnr, \irqnr, #4 35 - movs \irqstat, \irqstat, lsr #4 36 - bne 1001b 37 - 1002: tst \irqstat, #1 38 - bne 1003f 39 - add \irqnr, \irqnr, #1 40 - movs \irqstat, \irqstat, lsr #1 41 - bne 1002b 42 - 1003: /* EQ will be set if no irqs pending */ 43 13 .endm
-2
arch/arm/mach-nomadik/include/mach/vmalloc.h
··· 1 - 2 - #define VMALLOC_END 0xe8000000UL
+1 -1
arch/arm/mach-omap1/board-ams-delta.c
··· 35 35 #include <plat/mux.h> 36 36 #include <plat/usb.h> 37 37 #include <plat/board.h> 38 - #include <plat/common.h> 38 + #include "common.h" 39 39 #include <mach/camera.h> 40 40 41 41 #include <mach/ams-delta-fiq.h>
+1 -1
arch/arm/mach-omap1/board-fsample.c
··· 32 32 #include <plat/flash.h> 33 33 #include <plat/fpga.h> 34 34 #include <plat/keypad.h> 35 - #include <plat/common.h> 35 + #include "common.h" 36 36 #include <plat/board.h> 37 37 38 38 /* fsample is pretty close to p2-sample */
+1 -1
arch/arm/mach-omap1/board-generic.c
··· 25 25 #include <plat/mux.h> 26 26 #include <plat/usb.h> 27 27 #include <plat/board.h> 28 - #include <plat/common.h> 28 + #include "common.h" 29 29 30 30 /* assume no Mini-AB port */ 31 31
+1 -1
arch/arm/mach-omap1/board-h2.c
··· 43 43 #include <plat/irda.h> 44 44 #include <plat/usb.h> 45 45 #include <plat/keypad.h> 46 - #include <plat/common.h> 46 + #include "common.h" 47 47 #include <plat/flash.h> 48 48 49 49 #include "board-h2.h"
+1 -1
arch/arm/mach-omap1/board-h3.c
··· 45 45 #include <plat/usb.h> 46 46 #include <plat/keypad.h> 47 47 #include <plat/dma.h> 48 - #include <plat/common.h> 48 + #include "common.h" 49 49 #include <plat/flash.h> 50 50 51 51 #include "board-h3.h"
+1 -1
arch/arm/mach-omap1/board-htcherald.c
··· 41 41 #include <asm/mach/arch.h> 42 42 43 43 #include <plat/omap7xx.h> 44 - #include <plat/common.h> 44 + #include "common.h" 45 45 #include <plat/board.h> 46 46 #include <plat/keypad.h> 47 47 #include <plat/usb.h>
+1 -1
arch/arm/mach-omap1/board-innovator.c
··· 37 37 #include <plat/tc.h> 38 38 #include <plat/usb.h> 39 39 #include <plat/keypad.h> 40 - #include <plat/common.h> 40 + #include "common.h" 41 41 #include <plat/mmc.h> 42 42 43 43 /* At OMAP1610 Innovator the Ethernet is directly connected to CS1 */
+1 -1
arch/arm/mach-omap1/board-nokia770.c
··· 30 30 #include <plat/usb.h> 31 31 #include <plat/board.h> 32 32 #include <plat/keypad.h> 33 - #include <plat/common.h> 33 + #include "common.h" 34 34 #include <plat/hwa742.h> 35 35 #include <plat/lcd_mipid.h> 36 36 #include <plat/mmc.h>
+1 -1
arch/arm/mach-omap1/board-osk.c
··· 51 51 #include <plat/usb.h> 52 52 #include <plat/mux.h> 53 53 #include <plat/tc.h> 54 - #include <plat/common.h> 54 + #include "common.h" 55 55 56 56 /* At OMAP5912 OSK the Ethernet is directly connected to CS1 */ 57 57 #define OMAP_OSK_ETHR_START 0x04800300
+1 -1
arch/arm/mach-omap1/board-palmte.c
··· 41 41 #include <plat/board.h> 42 42 #include <plat/irda.h> 43 43 #include <plat/keypad.h> 44 - #include <plat/common.h> 44 + #include "common.h" 45 45 46 46 #define PALMTE_USBDETECT_GPIO 0 47 47 #define PALMTE_USB_OR_DC_GPIO 1
+1 -1
arch/arm/mach-omap1/board-palmtt.c
··· 39 39 #include <plat/board.h> 40 40 #include <plat/irda.h> 41 41 #include <plat/keypad.h> 42 - #include <plat/common.h> 42 + #include "common.h" 43 43 44 44 #include <linux/spi/spi.h> 45 45 #include <linux/spi/ads7846.h>
+1 -1
arch/arm/mach-omap1/board-palmz71.c
··· 41 41 #include <plat/board.h> 42 42 #include <plat/irda.h> 43 43 #include <plat/keypad.h> 44 - #include <plat/common.h> 44 + #include "common.h" 45 45 46 46 #include <linux/spi/spi.h> 47 47 #include <linux/spi/ads7846.h>
+1 -1
arch/arm/mach-omap1/board-perseus2.c
··· 32 32 #include <plat/fpga.h> 33 33 #include <plat/flash.h> 34 34 #include <plat/keypad.h> 35 - #include <plat/common.h> 35 + #include "common.h" 36 36 #include <plat/board.h> 37 37 38 38 static const unsigned int p2_keymap[] = {
+1 -1
arch/arm/mach-omap1/board-sx1.c
··· 40 40 #include <plat/usb.h> 41 41 #include <plat/tc.h> 42 42 #include <plat/board.h> 43 - #include <plat/common.h> 43 + #include "common.h" 44 44 #include <plat/keypad.h> 45 45 #include <plat/board-sx1.h> 46 46
+1 -1
arch/arm/mach-omap1/board-voiceblue.c
··· 34 34 #include <asm/mach/map.h> 35 35 36 36 #include <plat/board-voiceblue.h> 37 - #include <plat/common.h> 37 + #include "common.h" 38 38 #include <plat/flash.h> 39 39 #include <plat/mux.h> 40 40 #include <plat/tc.h>
+61
arch/arm/mach-omap1/common.h
··· 1 + /* 2 + * 3 + * Header for code common to all OMAP1 machines. 4 + * 5 + * This program is free software; you can redistribute it and/or modify it 6 + * under the terms of the GNU General Public License as published by the 7 + * Free Software Foundation; either version 2 of the License, or (at your 8 + * option) any later version. 9 + * 10 + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED 11 + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 12 + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 13 + * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 14 + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 15 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 16 + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 17 + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 18 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 19 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 20 + * 21 + * You should have received a copy of the GNU General Public License along 22 + * with this program; if not, write to the Free Software Foundation, Inc., 23 + * 675 Mass Ave, Cambridge, MA 02139, USA. 24 + */ 25 + 26 + #ifndef __ARCH_ARM_MACH_OMAP1_COMMON_H 27 + #define __ARCH_ARM_MACH_OMAP1_COMMON_H 28 + 29 + #include <plat/common.h> 30 + 31 + #if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850) 32 + void omap7xx_map_io(void); 33 + #else 34 + static inline void omap7xx_map_io(void) 35 + { 36 + } 37 + #endif 38 + 39 + #ifdef CONFIG_ARCH_OMAP15XX 40 + void omap15xx_map_io(void); 41 + #else 42 + static inline void omap15xx_map_io(void) 43 + { 44 + } 45 + #endif 46 + 47 + #ifdef CONFIG_ARCH_OMAP16XX 48 + void omap16xx_map_io(void); 49 + #else 50 + static inline void omap16xx_map_io(void) 51 + { 52 + } 53 + #endif 54 + 55 + void omap1_init_early(void); 56 + void omap1_init_irq(void); 57 + 58 + extern struct sys_timer omap1_timer; 59 + extern bool omap_32k_timer_init(void); 60 + 61 + #endif /* __ARCH_ARM_MACH_OMAP1_COMMON_H */
+1 -1
arch/arm/mach-omap1/devices.c
··· 22 22 #include <mach/hardware.h> 23 23 #include <asm/mach/map.h> 24 24 25 - #include <plat/common.h> 25 + #include "common.h" 26 26 #include <plat/tc.h> 27 27 #include <plat/board.h> 28 28 #include <plat/mux.h>
-20
arch/arm/mach-omap1/include/mach/vmalloc.h
··· 1 - /* 2 - * arch/arm/mach-omap1/include/mach/vmalloc.h 3 - * 4 - * Copyright (C) 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 as published by 8 - * the Free Software Foundation; either version 2 of the License, or 9 - * (at your option) any later version. 10 - * 11 - * This program is distributed in the hope that it will be useful, 12 - * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 - * GNU General Public License for more details. 15 - * 16 - * You should have received a copy of the GNU General Public License 17 - * along with this program; if not, write to the Free Software 18 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 - */ 20 - #define VMALLOC_END 0xd8000000UL
-1
arch/arm/mach-omap1/io.c
··· 121 121 void omap1_init_early(void) 122 122 { 123 123 omap_check_revision(); 124 - omap_ioremap_init(); 125 124 126 125 /* REVISIT: Refer to OMAP5910 Errata, Advisory SYS_1: "Timeout Abort 127 126 * on a Posted Write in the TIPB Bridge".
+5 -55
arch/arm/mach-omap1/time.c
··· 37 37 #include <linux/init.h> 38 38 #include <linux/delay.h> 39 39 #include <linux/interrupt.h> 40 - #include <linux/sched.h> 41 40 #include <linux/spinlock.h> 42 41 #include <linux/clk.h> 43 42 #include <linux/err.h> ··· 53 54 #include <asm/mach/irq.h> 54 55 #include <asm/mach/time.h> 55 56 56 - #include <plat/common.h> 57 + #include "common.h" 57 58 58 59 #ifdef CONFIG_OMAP_MPU_TIMER 59 60 ··· 189 190 * --------------------------------------------------------------------------- 190 191 */ 191 192 192 - static DEFINE_CLOCK_DATA(cd); 193 - 194 - static inline unsigned long long notrace _omap_mpu_sched_clock(void) 193 + static u32 notrace omap_mpu_read_sched_clock(void) 195 194 { 196 - u32 cyc = ~omap_mpu_timer_read(1); 197 - return cyc_to_sched_clock(&cd, cyc, (u32)~0); 198 - } 199 - 200 - #ifndef CONFIG_OMAP_32K_TIMER 201 - unsigned long long notrace sched_clock(void) 202 - { 203 - return _omap_mpu_sched_clock(); 204 - } 205 - #else 206 - static unsigned long long notrace omap_mpu_sched_clock(void) 207 - { 208 - return _omap_mpu_sched_clock(); 209 - } 210 - #endif 211 - 212 - static void notrace mpu_update_sched_clock(void) 213 - { 214 - u32 cyc = ~omap_mpu_timer_read(1); 215 - update_sched_clock(&cd, cyc, (u32)~0); 195 + return ~omap_mpu_timer_read(1); 216 196 } 217 197 218 198 static void __init omap_init_clocksource(unsigned long rate) ··· 201 223 "%s: can't register clocksource!\n"; 202 224 203 225 omap_mpu_timer_start(1, ~0, 1); 204 - init_sched_clock(&cd, mpu_update_sched_clock, 32, rate); 226 + setup_sched_clock(omap_mpu_read_sched_clock, 32, rate); 205 227 206 228 if (clocksource_mmio_init(&timer->read_tim, "mpu_timer2", rate, 207 229 300, 32, clocksource_mmio_readl_down)) ··· 232 254 } 233 255 #endif /* CONFIG_OMAP_MPU_TIMER */ 234 256 235 - #if defined(CONFIG_OMAP_MPU_TIMER) && defined(CONFIG_OMAP_32K_TIMER) 236 - static unsigned long long (*preferred_sched_clock)(void); 237 - 238 - unsigned long long notrace sched_clock(void) 239 - { 240 - if (!preferred_sched_clock) 241 - return 0; 242 - 243 - return preferred_sched_clock(); 244 - } 245 - 246 - static inline void preferred_sched_clock_init(bool use_32k_sched_clock) 247 - { 248 - if (use_32k_sched_clock) 249 - preferred_sched_clock = omap_32k_sched_clock; 250 - else 251 - preferred_sched_clock = omap_mpu_sched_clock; 252 - } 253 - #else 254 - static inline void preferred_sched_clock_init(bool use_32k_sched_clcok) 255 - { 256 - } 257 - #endif 258 - 259 257 static inline int omap_32k_timer_usable(void) 260 258 { 261 259 int res = false; ··· 253 299 */ 254 300 static void __init omap1_timer_init(void) 255 301 { 256 - if (omap_32k_timer_usable()) { 257 - preferred_sched_clock_init(1); 258 - } else { 302 + if (!omap_32k_timer_usable()) 259 303 omap_mpu_timer_init(); 260 - preferred_sched_clock_init(0); 261 - } 262 304 } 263 305 264 306 struct sys_timer omap1_timer = {
+1 -1
arch/arm/mach-omap1/timer32k.c
··· 52 52 #include <asm/irq.h> 53 53 #include <asm/mach/irq.h> 54 54 #include <asm/mach/time.h> 55 - #include <plat/common.h> 55 + #include "common.h" 56 56 #include <plat/dmtimer.h> 57 57 58 58 /*
+4
arch/arm/mach-omap2/Kconfig
··· 25 25 depends on ARCH_OMAP2PLUS 26 26 default y 27 27 select CPU_V6 28 + select MULTI_IRQ_HANDLER 28 29 29 30 config ARCH_OMAP3 30 31 bool "TI OMAP3" ··· 37 36 select ARCH_HAS_OPP 38 37 select PM_OPP if PM 39 38 select ARM_CPU_SUSPEND if PM 39 + select MULTI_IRQ_HANDLER 40 40 41 41 config ARCH_OMAP4 42 42 bool "TI OMAP4" 43 43 default y 44 44 depends on ARCH_OMAP2PLUS 45 + select CACHE_L2X0 45 46 select CPU_V7 46 47 select ARM_GIC 48 + select HAVE_SMP 47 49 select LOCAL_TIMERS if SMP 48 50 select PL310_ERRATA_588369 49 51 select PL310_ERRATA_727915
+2 -1
arch/arm/mach-omap2/board-2430sdp.c
··· 34 34 #include <asm/mach/map.h> 35 35 36 36 #include <plat/board.h> 37 - #include <plat/common.h> 37 + #include "common.h" 38 38 #include <plat/gpmc.h> 39 39 #include <plat/usb.h> 40 40 #include <plat/gpmc-smc91x.h> ··· 301 301 .map_io = omap243x_map_io, 302 302 .init_early = omap2430_init_early, 303 303 .init_irq = omap2_init_irq, 304 + .handle_irq = omap2_intc_handle_irq, 304 305 .init_machine = omap_2430sdp_init, 305 306 .timer = &omap2_timer, 306 307 MACHINE_END
+2 -1
arch/arm/mach-omap2/board-3430sdp.c
··· 33 33 #include <plat/mcspi.h> 34 34 #include <plat/board.h> 35 35 #include <plat/usb.h> 36 - #include <plat/common.h> 36 + #include "common.h" 37 37 #include <plat/dma.h> 38 38 #include <plat/gpmc.h> 39 39 #include <video/omapdss.h> ··· 728 728 .map_io = omap3_map_io, 729 729 .init_early = omap3430_init_early, 730 730 .init_irq = omap3_init_irq, 731 + .handle_irq = omap3_intc_handle_irq, 731 732 .init_machine = omap_3430sdp_init, 732 733 .timer = &omap3_timer, 733 734 MACHINE_END
+2 -1
arch/arm/mach-omap2/board-3630sdp.c
··· 16 16 #include <asm/mach-types.h> 17 17 #include <asm/mach/arch.h> 18 18 19 - #include <plat/common.h> 19 + #include "common.h" 20 20 #include <plat/board.h> 21 21 #include <plat/gpmc-smc91x.h> 22 22 #include <plat/usb.h> ··· 215 215 .map_io = omap3_map_io, 216 216 .init_early = omap3630_init_early, 217 217 .init_irq = omap3_init_irq, 218 + .handle_irq = omap3_intc_handle_irq, 218 219 .init_machine = omap_sdp_init, 219 220 .timer = &omap3_timer, 220 221 MACHINE_END
+3 -2
arch/arm/mach-omap2/board-4430sdp.c
··· 27 27 #include <linux/leds_pwm.h> 28 28 29 29 #include <mach/hardware.h> 30 - #include <mach/omap4-common.h> 30 + #include <asm/hardware/gic.h> 31 31 #include <asm/mach-types.h> 32 32 #include <asm/mach/arch.h> 33 33 #include <asm/mach/map.h> 34 34 35 35 #include <plat/board.h> 36 - #include <plat/common.h> 36 + #include "common.h" 37 37 #include <plat/usb.h> 38 38 #include <plat/mmc.h> 39 39 #include <plat/omap4-keypad.h> ··· 984 984 .map_io = omap4_map_io, 985 985 .init_early = omap4430_init_early, 986 986 .init_irq = gic_init_irq, 987 + .handle_irq = gic_handle_irq, 987 988 .init_machine = omap_4430sdp_init, 988 989 .timer = &omap4_timer, 989 990 MACHINE_END
+2 -1
arch/arm/mach-omap2/board-am3517crane.c
··· 27 27 #include <asm/mach/map.h> 28 28 29 29 #include <plat/board.h> 30 - #include <plat/common.h> 30 + #include "common.h" 31 31 #include <plat/usb.h> 32 32 33 33 #include "mux.h" ··· 98 98 .map_io = omap3_map_io, 99 99 .init_early = am35xx_init_early, 100 100 .init_irq = omap3_init_irq, 101 + .handle_irq = omap3_intc_handle_irq, 101 102 .init_machine = am3517_crane_init, 102 103 .timer = &omap3_timer, 103 104 MACHINE_END
+2 -1
arch/arm/mach-omap2/board-am3517evm.c
··· 32 32 #include <asm/mach/map.h> 33 33 34 34 #include <plat/board.h> 35 - #include <plat/common.h> 35 + #include "common.h" 36 36 #include <plat/usb.h> 37 37 #include <video/omapdss.h> 38 38 #include <video/omap-panel-generic-dpi.h> ··· 491 491 .map_io = omap3_map_io, 492 492 .init_early = am35xx_init_early, 493 493 .init_irq = omap3_init_irq, 494 + .handle_irq = omap3_intc_handle_irq, 494 495 .init_machine = am3517_evm_init, 495 496 .timer = &omap3_timer, 496 497 MACHINE_END
+2 -1
arch/arm/mach-omap2/board-apollon.c
··· 37 37 #include <plat/led.h> 38 38 #include <plat/usb.h> 39 39 #include <plat/board.h> 40 - #include <plat/common.h> 40 + #include "common.h" 41 41 #include <plat/gpmc.h> 42 42 43 43 #include <video/omapdss.h> ··· 354 354 .map_io = omap242x_map_io, 355 355 .init_early = omap2420_init_early, 356 356 .init_irq = omap2_init_irq, 357 + .handle_irq = omap2_intc_handle_irq, 357 358 .init_machine = omap_apollon_init, 358 359 .timer = &omap2_timer, 359 360 MACHINE_END
+3 -1
arch/arm/mach-omap2/board-cm-t35.c
··· 37 37 #include <asm/mach/map.h> 38 38 39 39 #include <plat/board.h> 40 - #include <plat/common.h> 40 + #include "common.h" 41 41 #include <plat/nand.h> 42 42 #include <plat/gpmc.h> 43 43 #include <plat/usb.h> ··· 634 634 .map_io = omap3_map_io, 635 635 .init_early = omap35xx_init_early, 636 636 .init_irq = omap3_init_irq, 637 + .handle_irq = omap3_intc_handle_irq, 637 638 .init_machine = cm_t35_init, 638 639 .timer = &omap3_timer, 639 640 MACHINE_END ··· 645 644 .map_io = omap3_map_io, 646 645 .init_early = omap3630_init_early, 647 646 .init_irq = omap3_init_irq, 647 + .handle_irq = omap3_intc_handle_irq, 648 648 .init_machine = cm_t3730_init, 649 649 .timer = &omap3_timer, 650 650 MACHINE_END
+2 -1
arch/arm/mach-omap2/board-cm-t3517.c
··· 39 39 #include <asm/mach/map.h> 40 40 41 41 #include <plat/board.h> 42 - #include <plat/common.h> 42 + #include "common.h" 43 43 #include <plat/usb.h> 44 44 #include <plat/nand.h> 45 45 #include <plat/gpmc.h> ··· 299 299 .map_io = omap3_map_io, 300 300 .init_early = am35xx_init_early, 301 301 .init_irq = omap3_init_irq, 302 + .handle_irq = omap3_intc_handle_irq, 302 303 .init_machine = cm_t3517_init, 303 304 .timer = &omap3_timer, 304 305 MACHINE_END
+2 -1
arch/arm/mach-omap2/board-devkit8000.c
··· 41 41 #include <asm/mach/flash.h> 42 42 43 43 #include <plat/board.h> 44 - #include <plat/common.h> 44 + #include "common.h" 45 45 #include <plat/gpmc.h> 46 46 #include <plat/nand.h> 47 47 #include <plat/usb.h> ··· 660 660 .map_io = omap3_map_io, 661 661 .init_early = omap35xx_init_early, 662 662 .init_irq = omap3_init_irq, 663 + .handle_irq = omap3_intc_handle_irq, 663 664 .init_machine = devkit8000_init, 664 665 .timer = &omap3_secure_timer, 665 666 MACHINE_END
+2 -2
arch/arm/mach-omap2/board-generic.c
··· 20 20 #include <asm/mach/arch.h> 21 21 22 22 #include <plat/board.h> 23 - #include <plat/common.h> 24 - #include <mach/omap4-common.h> 23 + #include "common.h" 25 24 #include "common-board-devices.h" 26 25 27 26 /* ··· 121 122 .map_io = omap243x_map_io, 122 123 .init_early = omap2430_init_early, 123 124 .init_irq = omap2_init_irq, 125 + .handle_irq = omap2_intc_handle_irq, 124 126 .init_machine = omap_generic_init, 125 127 .timer = &omap2_timer, 126 128 .dt_compat = omap243x_boards_compat,
+2 -1
arch/arm/mach-omap2/board-h4.c
··· 34 34 35 35 #include <plat/usb.h> 36 36 #include <plat/board.h> 37 - #include <plat/common.h> 37 + #include "common.h" 38 38 #include <plat/menelaus.h> 39 39 #include <plat/dma.h> 40 40 #include <plat/gpmc.h> ··· 396 396 .map_io = omap242x_map_io, 397 397 .init_early = omap2420_init_early, 398 398 .init_irq = omap2_init_irq, 399 + .handle_irq = omap2_intc_handle_irq, 399 400 .init_machine = omap_h4_init, 400 401 .timer = &omap2_timer, 401 402 MACHINE_END
+3 -1
arch/arm/mach-omap2/board-igep0020.c
··· 28 28 #include <asm/mach/arch.h> 29 29 30 30 #include <plat/board.h> 31 - #include <plat/common.h> 31 + #include "common.h" 32 32 #include <plat/gpmc.h> 33 33 #include <plat/usb.h> 34 34 #include <video/omapdss.h> ··· 672 672 .map_io = omap3_map_io, 673 673 .init_early = omap35xx_init_early, 674 674 .init_irq = omap3_init_irq, 675 + .handle_irq = omap3_intc_handle_irq, 675 676 .init_machine = igep_init, 676 677 .timer = &omap3_timer, 677 678 MACHINE_END ··· 683 682 .map_io = omap3_map_io, 684 683 .init_early = omap35xx_init_early, 685 684 .init_irq = omap3_init_irq, 685 + .handle_irq = omap3_intc_handle_irq, 686 686 .init_machine = igep_init, 687 687 .timer = &omap3_timer, 688 688 MACHINE_END
+2 -1
arch/arm/mach-omap2/board-ldp.c
··· 36 36 37 37 #include <plat/mcspi.h> 38 38 #include <plat/board.h> 39 - #include <plat/common.h> 39 + #include "common.h" 40 40 #include <plat/gpmc.h> 41 41 #include <mach/board-zoom.h> 42 42 ··· 434 434 .map_io = omap3_map_io, 435 435 .init_early = omap3430_init_early, 436 436 .init_irq = omap3_init_irq, 437 + .handle_irq = omap3_intc_handle_irq, 437 438 .init_machine = omap_ldp_init, 438 439 .timer = &omap3_timer, 439 440 MACHINE_END
+4 -1
arch/arm/mach-omap2/board-n8x0.c
··· 26 26 #include <asm/mach-types.h> 27 27 28 28 #include <plat/board.h> 29 - #include <plat/common.h> 29 + #include "common.h" 30 30 #include <plat/menelaus.h> 31 31 #include <mach/irqs.h> 32 32 #include <plat/mcspi.h> ··· 689 689 .map_io = omap242x_map_io, 690 690 .init_early = omap2420_init_early, 691 691 .init_irq = omap2_init_irq, 692 + .handle_irq = omap2_intc_handle_irq, 692 693 .init_machine = n8x0_init_machine, 693 694 .timer = &omap2_timer, 694 695 MACHINE_END ··· 700 699 .map_io = omap242x_map_io, 701 700 .init_early = omap2420_init_early, 702 701 .init_irq = omap2_init_irq, 702 + .handle_irq = omap2_intc_handle_irq, 703 703 .init_machine = n8x0_init_machine, 704 704 .timer = &omap2_timer, 705 705 MACHINE_END ··· 711 709 .map_io = omap242x_map_io, 712 710 .init_early = omap2420_init_early, 713 711 .init_irq = omap2_init_irq, 712 + .handle_irq = omap2_intc_handle_irq, 714 713 .init_machine = n8x0_init_machine, 715 714 .timer = &omap2_timer, 716 715 MACHINE_END
+2 -1
arch/arm/mach-omap2/board-omap3beagle.c
··· 40 40 #include <asm/mach/flash.h> 41 41 42 42 #include <plat/board.h> 43 - #include <plat/common.h> 43 + #include "common.h" 44 44 #include <video/omapdss.h> 45 45 #include <video/omap-panel-dvi.h> 46 46 #include <plat/gpmc.h> ··· 559 559 .map_io = omap3_map_io, 560 560 .init_early = omap3_init_early, 561 561 .init_irq = omap3_init_irq, 562 + .handle_irq = omap3_intc_handle_irq, 562 563 .init_machine = omap3_beagle_init, 563 564 .timer = &omap3_secure_timer, 564 565 MACHINE_END
+2 -1
arch/arm/mach-omap2/board-omap3evm.c
··· 43 43 44 44 #include <plat/board.h> 45 45 #include <plat/usb.h> 46 - #include <plat/common.h> 46 + #include "common.h" 47 47 #include <plat/mcspi.h> 48 48 #include <video/omapdss.h> 49 49 #include <video/omap-panel-dvi.h> ··· 681 681 .map_io = omap3_map_io, 682 682 .init_early = omap35xx_init_early, 683 683 .init_irq = omap3_init_irq, 684 + .handle_irq = omap3_intc_handle_irq, 684 685 .init_machine = omap3_evm_init, 685 686 .timer = &omap3_timer, 686 687 MACHINE_END
+3 -1
arch/arm/mach-omap2/board-omap3logic.c
··· 40 40 41 41 #include <plat/mux.h> 42 42 #include <plat/board.h> 43 - #include <plat/common.h> 43 + #include "common.h" 44 44 #include <plat/gpmc-smsc911x.h> 45 45 #include <plat/gpmc.h> 46 46 #include <plat/sdrc.h> ··· 208 208 .map_io = omap3_map_io, 209 209 .init_early = omap35xx_init_early, 210 210 .init_irq = omap3_init_irq, 211 + .handle_irq = omap3_intc_handle_irq, 211 212 .init_machine = omap3logic_init, 212 213 .timer = &omap3_timer, 213 214 MACHINE_END ··· 218 217 .map_io = omap3_map_io, 219 218 .init_early = omap35xx_init_early, 220 219 .init_irq = omap3_init_irq, 220 + .handle_irq = omap3_intc_handle_irq, 221 221 .init_machine = omap3logic_init, 222 222 .timer = &omap3_timer, 223 223 MACHINE_END
+2 -1
arch/arm/mach-omap2/board-omap3pandora.c
··· 41 41 #include <asm/mach/map.h> 42 42 43 43 #include <plat/board.h> 44 - #include <plat/common.h> 44 + #include "common.h" 45 45 #include <mach/hardware.h> 46 46 #include <plat/mcspi.h> 47 47 #include <plat/usb.h> ··· 606 606 .map_io = omap3_map_io, 607 607 .init_early = omap35xx_init_early, 608 608 .init_irq = omap3_init_irq, 609 + .handle_irq = omap3_intc_handle_irq, 609 610 .init_machine = omap3pandora_init, 610 611 .timer = &omap3_timer, 611 612 MACHINE_END
+2 -1
arch/arm/mach-omap2/board-omap3stalker.c
··· 35 35 #include <asm/mach/flash.h> 36 36 37 37 #include <plat/board.h> 38 - #include <plat/common.h> 38 + #include "common.h" 39 39 #include <plat/gpmc.h> 40 40 #include <plat/nand.h> 41 41 #include <plat/usb.h> ··· 454 454 .map_io = omap3_map_io, 455 455 .init_early = omap35xx_init_early, 456 456 .init_irq = omap3_init_irq, 457 + .handle_irq = omap3_intc_handle_irq, 457 458 .init_machine = omap3_stalker_init, 458 459 .timer = &omap3_secure_timer, 459 460 MACHINE_END
+2 -1
arch/arm/mach-omap2/board-omap3touchbook.c
··· 44 44 #include <asm/mach/flash.h> 45 45 46 46 #include <plat/board.h> 47 - #include <plat/common.h> 47 + #include "common.h" 48 48 #include <plat/gpmc.h> 49 49 #include <plat/nand.h> 50 50 #include <plat/usb.h> ··· 381 381 .map_io = omap3_map_io, 382 382 .init_early = omap3430_init_early, 383 383 .init_irq = omap3_init_irq, 384 + .handle_irq = omap3_intc_handle_irq, 384 385 .init_machine = omap3_touchbook_init, 385 386 .timer = &omap3_secure_timer, 386 387 MACHINE_END
+3 -2
arch/arm/mach-omap2/board-omap4panda.c
··· 30 30 #include <linux/wl12xx.h> 31 31 32 32 #include <mach/hardware.h> 33 - #include <mach/omap4-common.h> 33 + #include <asm/hardware/gic.h> 34 34 #include <asm/mach-types.h> 35 35 #include <asm/mach/arch.h> 36 36 #include <asm/mach/map.h> 37 37 #include <video/omapdss.h> 38 38 39 39 #include <plat/board.h> 40 - #include <plat/common.h> 40 + #include "common.h" 41 41 #include <plat/usb.h> 42 42 #include <plat/mmc.h> 43 43 #include <video/omap-panel-dvi.h> ··· 577 577 .map_io = omap4_map_io, 578 578 .init_early = omap4430_init_early, 579 579 .init_irq = gic_init_irq, 580 + .handle_irq = gic_handle_irq, 580 581 .init_machine = omap4_panda_init, 581 582 .timer = &omap4_timer, 582 583 MACHINE_END
+2 -1
arch/arm/mach-omap2/board-overo.c
··· 43 43 #include <asm/mach/map.h> 44 44 45 45 #include <plat/board.h> 46 - #include <plat/common.h> 46 + #include "common.h" 47 47 #include <video/omapdss.h> 48 48 #include <video/omap-panel-generic-dpi.h> 49 49 #include <video/omap-panel-dvi.h> ··· 562 562 .map_io = omap3_map_io, 563 563 .init_early = omap35xx_init_early, 564 564 .init_irq = omap3_init_irq, 565 + .handle_irq = omap3_intc_handle_irq, 565 566 .init_machine = overo_init, 566 567 .timer = &omap3_timer, 567 568 MACHINE_END
+2 -1
arch/arm/mach-omap2/board-rm680.c
··· 25 25 #include <plat/mmc.h> 26 26 #include <plat/usb.h> 27 27 #include <plat/gpmc.h> 28 - #include <plat/common.h> 28 + #include "common.h" 29 29 #include <plat/onenand.h> 30 30 31 31 #include "mux.h" ··· 149 149 .map_io = omap3_map_io, 150 150 .init_early = omap3630_init_early, 151 151 .init_irq = omap3_init_irq, 152 + .handle_irq = omap3_intc_handle_irq, 152 153 .init_machine = rm680_init, 153 154 .timer = &omap3_timer, 154 155 MACHINE_END
+1 -1
arch/arm/mach-omap2/board-rx51-peripherals.c
··· 27 27 28 28 #include <plat/mcspi.h> 29 29 #include <plat/board.h> 30 - #include <plat/common.h> 30 + #include "common.h" 31 31 #include <plat/dma.h> 32 32 #include <plat/gpmc.h> 33 33 #include <plat/onenand.h>
+2 -1
arch/arm/mach-omap2/board-rx51.c
··· 25 25 26 26 #include <plat/mcspi.h> 27 27 #include <plat/board.h> 28 - #include <plat/common.h> 28 + #include "common.h" 29 29 #include <plat/dma.h> 30 30 #include <plat/gpmc.h> 31 31 #include <plat/usb.h> ··· 127 127 .map_io = omap3_map_io, 128 128 .init_early = omap3430_init_early, 129 129 .init_irq = omap3_init_irq, 130 + .handle_irq = omap3_intc_handle_irq, 130 131 .init_machine = rx51_init, 131 132 .timer = &omap3_timer, 132 133 MACHINE_END
+1 -1
arch/arm/mach-omap2/board-ti8168evm.c
··· 22 22 23 23 #include <plat/irqs.h> 24 24 #include <plat/board.h> 25 - #include <plat/common.h> 25 + #include "common.h" 26 26 27 27 static struct omap_board_config_kernel ti8168_evm_config[] __initdata = { 28 28 };
+1 -1
arch/arm/mach-omap2/board-zoom-peripherals.c
··· 24 24 #include <asm/mach/arch.h> 25 25 #include <asm/mach/map.h> 26 26 27 - #include <plat/common.h> 27 + #include "common.h" 28 28 #include <plat/usb.h> 29 29 30 30 #include <mach/board-zoom.h>
+3 -1
arch/arm/mach-omap2/board-zoom.c
··· 21 21 #include <asm/mach-types.h> 22 22 #include <asm/mach/arch.h> 23 23 24 - #include <plat/common.h> 24 + #include "common.h" 25 25 #include <plat/board.h> 26 26 #include <plat/usb.h> 27 27 ··· 135 135 .map_io = omap3_map_io, 136 136 .init_early = omap3430_init_early, 137 137 .init_irq = omap3_init_irq, 138 + .handle_irq = omap3_intc_handle_irq, 138 139 .init_machine = omap_zoom_init, 139 140 .timer = &omap3_timer, 140 141 MACHINE_END ··· 146 145 .map_io = omap3_map_io, 147 146 .init_early = omap3630_init_early, 148 147 .init_irq = omap3_init_irq, 148 + .handle_irq = omap3_intc_handle_irq, 149 149 .init_machine = omap_zoom_init, 150 150 .timer = &omap3_timer, 151 151 MACHINE_END
+1 -1
arch/arm/mach-omap2/cm2xxx_3xxx.c
··· 18 18 #include <linux/err.h> 19 19 #include <linux/io.h> 20 20 21 - #include <plat/common.h> 21 + #include "common.h" 22 22 23 23 #include "cm.h" 24 24 #include "cm2xxx_3xxx.h"
+1 -1
arch/arm/mach-omap2/cm44xx.c
··· 18 18 #include <linux/err.h> 19 19 #include <linux/io.h> 20 20 21 - #include <plat/common.h> 21 + #include "common.h" 22 22 23 23 #include "cm.h" 24 24 #include "cm1_44xx.h"
+1 -1
arch/arm/mach-omap2/cminst44xx.c
··· 20 20 #include <linux/err.h> 21 21 #include <linux/io.h> 22 22 23 - #include <plat/common.h> 23 + #include "common.h" 24 24 25 25 #include "cm.h" 26 26 #include "cm1_44xx.h"
+1 -1
arch/arm/mach-omap2/common.c
··· 17 17 #include <linux/clk.h> 18 18 #include <linux/io.h> 19 19 20 - #include <plat/common.h> 20 + #include "common.h" 21 21 #include <plat/board.h> 22 22 #include <plat/mux.h> 23 23
+185
arch/arm/mach-omap2/common.h
··· 1 + /* 2 + * Header for code common to all OMAP2+ machines. 3 + * 4 + * This program is free software; you can redistribute it and/or modify it 5 + * under the terms of the GNU General Public License as published by the 6 + * Free Software Foundation; either version 2 of the License, or (at your 7 + * option) any later version. 8 + * 9 + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED 10 + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 11 + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 12 + * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 13 + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 14 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 15 + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 16 + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 17 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 18 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 19 + * 20 + * You should have received a copy of the GNU General Public License along 21 + * with this program; if not, write to the Free Software Foundation, Inc., 22 + * 675 Mass Ave, Cambridge, MA 02139, USA. 23 + */ 24 + 25 + #ifndef __ARCH_ARM_MACH_OMAP2PLUS_COMMON_H 26 + #define __ARCH_ARM_MACH_OMAP2PLUS_COMMON_H 27 + 28 + #include <linux/delay.h> 29 + #include <plat/common.h> 30 + 31 + #ifdef CONFIG_SOC_OMAP2420 32 + extern void omap242x_map_common_io(void); 33 + #else 34 + static inline void omap242x_map_common_io(void) 35 + { 36 + } 37 + #endif 38 + 39 + #ifdef CONFIG_SOC_OMAP2430 40 + extern void omap243x_map_common_io(void); 41 + #else 42 + static inline void omap243x_map_common_io(void) 43 + { 44 + } 45 + #endif 46 + 47 + #ifdef CONFIG_ARCH_OMAP3 48 + extern void omap34xx_map_common_io(void); 49 + #else 50 + static inline void omap34xx_map_common_io(void) 51 + { 52 + } 53 + #endif 54 + 55 + #ifdef CONFIG_SOC_OMAPTI816X 56 + extern void omapti816x_map_common_io(void); 57 + #else 58 + static inline void omapti816x_map_common_io(void) 59 + { 60 + } 61 + #endif 62 + 63 + #ifdef CONFIG_ARCH_OMAP4 64 + extern void omap44xx_map_common_io(void); 65 + #else 66 + static inline void omap44xx_map_common_io(void) 67 + { 68 + } 69 + #endif 70 + 71 + extern void omap2_init_common_infrastructure(void); 72 + 73 + extern struct sys_timer omap2_timer; 74 + extern struct sys_timer omap3_timer; 75 + extern struct sys_timer omap3_secure_timer; 76 + extern struct sys_timer omap4_timer; 77 + 78 + void omap2420_init_early(void); 79 + void omap2430_init_early(void); 80 + void omap3430_init_early(void); 81 + void omap35xx_init_early(void); 82 + void omap3630_init_early(void); 83 + void omap3_init_early(void); /* Do not use this one */ 84 + void am35xx_init_early(void); 85 + void ti816x_init_early(void); 86 + void omap4430_init_early(void); 87 + 88 + /* 89 + * IO bases for various OMAP processors 90 + * Except the tap base, rest all the io bases 91 + * listed are physical addresses. 92 + */ 93 + struct omap_globals { 94 + u32 class; /* OMAP class to detect */ 95 + void __iomem *tap; /* Control module ID code */ 96 + void __iomem *sdrc; /* SDRAM Controller */ 97 + void __iomem *sms; /* SDRAM Memory Scheduler */ 98 + void __iomem *ctrl; /* System Control Module */ 99 + void __iomem *ctrl_pad; /* PAD Control Module */ 100 + void __iomem *prm; /* Power and Reset Management */ 101 + void __iomem *cm; /* Clock Management */ 102 + void __iomem *cm2; 103 + }; 104 + 105 + void omap2_set_globals_242x(void); 106 + void omap2_set_globals_243x(void); 107 + void omap2_set_globals_3xxx(void); 108 + void omap2_set_globals_443x(void); 109 + void omap2_set_globals_ti816x(void); 110 + 111 + /* These get called from omap2_set_globals_xxxx(), do not call these */ 112 + void omap2_set_globals_tap(struct omap_globals *); 113 + void omap2_set_globals_sdrc(struct omap_globals *); 114 + void omap2_set_globals_control(struct omap_globals *); 115 + void omap2_set_globals_prcm(struct omap_globals *); 116 + 117 + void omap242x_map_io(void); 118 + void omap243x_map_io(void); 119 + void omap3_map_io(void); 120 + void omap4_map_io(void); 121 + 122 + /** 123 + * omap_test_timeout - busy-loop, testing a condition 124 + * @cond: condition to test until it evaluates to true 125 + * @timeout: maximum number of microseconds in the timeout 126 + * @index: loop index (integer) 127 + * 128 + * Loop waiting for @cond to become true or until at least @timeout 129 + * microseconds have passed. To use, define some integer @index in the 130 + * calling code. After running, if @index == @timeout, then the loop has 131 + * timed out. 132 + */ 133 + #define omap_test_timeout(cond, timeout, index) \ 134 + ({ \ 135 + for (index = 0; index < timeout; index++) { \ 136 + if (cond) \ 137 + break; \ 138 + udelay(1); \ 139 + } \ 140 + }) 141 + 142 + extern struct device *omap2_get_mpuss_device(void); 143 + extern struct device *omap2_get_iva_device(void); 144 + extern struct device *omap2_get_l3_device(void); 145 + extern struct device *omap4_get_dsp_device(void); 146 + 147 + void omap2_init_irq(void); 148 + void omap3_init_irq(void); 149 + void ti816x_init_irq(void); 150 + extern int omap_irq_pending(void); 151 + void omap_intc_save_context(void); 152 + void omap_intc_restore_context(void); 153 + void omap3_intc_suspend(void); 154 + void omap3_intc_prepare_idle(void); 155 + void omap3_intc_resume_idle(void); 156 + void omap2_intc_handle_irq(struct pt_regs *regs); 157 + void omap3_intc_handle_irq(struct pt_regs *regs); 158 + 159 + /* 160 + * wfi used in low power code. Directly opcode is used instead 161 + * of instruction to avoid mulit-omap build break 162 + */ 163 + #ifdef CONFIG_THUMB2_KERNEL 164 + #define do_wfi() __asm__ __volatile__ ("wfi" : : : "memory") 165 + #else 166 + #define do_wfi() \ 167 + __asm__ __volatile__ (".word 0xe320f003" : : : "memory") 168 + #endif 169 + 170 + #ifdef CONFIG_CACHE_L2X0 171 + extern void __iomem *l2cache_base; 172 + #endif 173 + 174 + extern void __init gic_init_irq(void); 175 + extern void omap_smc1(u32 fn, u32 arg); 176 + 177 + #ifdef CONFIG_SMP 178 + /* Needed for secondary core boot */ 179 + extern void omap_secondary_startup(void); 180 + extern u32 omap_modify_auxcoreboot0(u32 set_mask, u32 clear_mask); 181 + extern void omap_auxcoreboot_addr(u32 cpu_addr); 182 + extern u32 omap_read_auxcoreboot0(void); 183 + #endif 184 + 185 + #endif /* __ARCH_ARM_MACH_OMAP2PLUS_COMMON_H */
+1 -1
arch/arm/mach-omap2/control.c
··· 15 15 #include <linux/kernel.h> 16 16 #include <linux/io.h> 17 17 18 - #include <plat/common.h> 18 + #include "common.h" 19 19 #include <plat/sdrc.h> 20 20 21 21 #include "cm-regbits-34xx.h"
+1
arch/arm/mach-omap2/cpuidle34xx.c
··· 34 34 35 35 #include "pm.h" 36 36 #include "control.h" 37 + #include "common.h" 37 38 38 39 #ifdef CONFIG_CPU_IDLE 39 40
+2 -1
arch/arm/mach-omap2/display.c
··· 22 22 #include <linux/io.h> 23 23 #include <linux/clk.h> 24 24 #include <linux/err.h> 25 + #include <linux/delay.h> 25 26 26 27 #include <video/omapdss.h> 27 28 #include <plat/omap_hwmod.h> 28 29 #include <plat/omap_device.h> 29 30 #include <plat/omap-pm.h> 30 - #include <plat/common.h> 31 + #include "common.h" 31 32 32 33 #include "control.h" 33 34 #include "display.h"
+1 -1
arch/arm/mach-omap2/i2c.c
··· 21 21 22 22 #include <plat/cpu.h> 23 23 #include <plat/i2c.h> 24 - #include <plat/common.h> 24 + #include "common.h" 25 25 #include <plat/omap_hwmod.h> 26 26 27 27 #include "mux.h"
+1 -1
arch/arm/mach-omap2/id.c
··· 21 21 22 22 #include <asm/cputype.h> 23 23 24 - #include <plat/common.h> 24 + #include "common.h" 25 25 #include <plat/cpu.h> 26 26 27 27 #include <mach/id.h>
-137
arch/arm/mach-omap2/include/mach/entry-macro.S
··· 10 10 * License version 2. This program is licensed "as is" without any 11 11 * warranty of any kind, whether express or implied. 12 12 */ 13 - #include <mach/hardware.h> 14 - #include <mach/io.h> 15 - #include <mach/irqs.h> 16 - #include <asm/hardware/gic.h> 17 - 18 - #include <plat/omap24xx.h> 19 - #include <plat/omap34xx.h> 20 - #include <plat/omap44xx.h> 21 - 22 - #include <plat/multi.h> 23 - 24 - #define OMAP2_IRQ_BASE OMAP2_L4_IO_ADDRESS(OMAP24XX_IC_BASE) 25 - #define OMAP3_IRQ_BASE OMAP2_L4_IO_ADDRESS(OMAP34XX_IC_BASE) 26 - #define OMAP4_IRQ_BASE OMAP2_L4_IO_ADDRESS(OMAP44XX_GIC_CPU_BASE) 27 - #define INTCPS_SIR_IRQ_OFFSET 0x0040 /* omap2/3 active interrupt offset */ 28 - #define ACTIVEIRQ_MASK 0x7f /* omap2/3 active interrupt bits */ 29 13 30 14 .macro disable_fiq 31 15 .endm 32 16 33 17 .macro arch_ret_to_user, tmp1, tmp2 34 18 .endm 35 - 36 - /* 37 - * Unoptimized irq functions for multi-omap2, 3 and 4 38 - */ 39 - 40 - #ifdef MULTI_OMAP2 41 - /* 42 - * Configure the interrupt base on the first interrupt. 43 - * See also omap_irq_base_init for setting omap_irq_base. 44 - */ 45 - .macro get_irqnr_preamble, base, tmp 46 - ldr \base, =omap_irq_base @ irq base address 47 - ldr \base, [\base, #0] @ irq base value 48 - .endm 49 - 50 - /* Check the pending interrupts. Note that base already set */ 51 - .macro get_irqnr_and_base, irqnr, irqstat, base, tmp 52 - tst \base, #0x100 @ gic address? 53 - bne 4401f @ found gic 54 - 55 - /* Handle omap2 and omap3 */ 56 - ldr \irqnr, [\base, #0x98] /* IRQ pending reg 1 */ 57 - cmp \irqnr, #0x0 58 - bne 9998f 59 - ldr \irqnr, [\base, #0xb8] /* IRQ pending reg 2 */ 60 - cmp \irqnr, #0x0 61 - bne 9998f 62 - ldr \irqnr, [\base, #0xd8] /* IRQ pending reg 3 */ 63 - cmp \irqnr, #0x0 64 - bne 9998f 65 - 66 - /* 67 - * ti816x has additional IRQ pending register. Checking this 68 - * register on omap2 & omap3 has no effect (read as 0). 69 - */ 70 - ldr \irqnr, [\base, #0xf8] /* IRQ pending reg 4 */ 71 - cmp \irqnr, #0x0 72 - 9998: 73 - ldrne \irqnr, [\base, #INTCPS_SIR_IRQ_OFFSET] 74 - and \irqnr, \irqnr, #ACTIVEIRQ_MASK /* Clear spurious bits */ 75 - b 9999f 76 - 77 - /* Handle omap4 */ 78 - 4401: ldr \irqstat, [\base, #GIC_CPU_INTACK] 79 - ldr \tmp, =1021 80 - bic \irqnr, \irqstat, #0x1c00 81 - cmp \irqnr, #15 82 - cmpcc \irqnr, \irqnr 83 - cmpne \irqnr, \tmp 84 - cmpcs \irqnr, \irqnr 85 - 9999: 86 - .endm 87 - 88 - #ifdef CONFIG_SMP 89 - /* We assume that irqstat (the raw value of the IRQ acknowledge 90 - * register) is preserved from the macro above. 91 - * If there is an IPI, we immediately signal end of interrupt 92 - * on the controller, since this requires the original irqstat 93 - * value which we won't easily be able to recreate later. 94 - */ 95 - 96 - .macro test_for_ipi, irqnr, irqstat, base, tmp 97 - bic \irqnr, \irqstat, #0x1c00 98 - cmp \irqnr, #16 99 - it cc 100 - strcc \irqstat, [\base, #GIC_CPU_EOI] 101 - it cs 102 - cmpcs \irqnr, \irqnr 103 - .endm 104 - #endif /* CONFIG_SMP */ 105 - 106 - #else /* MULTI_OMAP2 */ 107 - 108 - 109 - /* 110 - * Optimized irq functions for omap2, 3 and 4 111 - */ 112 - 113 - #if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) 114 - .macro get_irqnr_preamble, base, tmp 115 - #ifdef CONFIG_ARCH_OMAP2 116 - ldr \base, =OMAP2_IRQ_BASE 117 - #else 118 - ldr \base, =OMAP3_IRQ_BASE 119 - #endif 120 - .endm 121 - 122 - /* Check the pending interrupts. Note that base already set */ 123 - .macro get_irqnr_and_base, irqnr, irqstat, base, tmp 124 - ldr \irqnr, [\base, #0x98] /* IRQ pending reg 1 */ 125 - cmp \irqnr, #0x0 126 - bne 9999f 127 - ldr \irqnr, [\base, #0xb8] /* IRQ pending reg 2 */ 128 - cmp \irqnr, #0x0 129 - bne 9999f 130 - ldr \irqnr, [\base, #0xd8] /* IRQ pending reg 3 */ 131 - cmp \irqnr, #0x0 132 - #ifdef CONFIG_SOC_OMAPTI816X 133 - bne 9999f 134 - ldr \irqnr, [\base, #0xf8] /* IRQ pending reg 4 */ 135 - cmp \irqnr, #0x0 136 - #endif 137 - 9999: 138 - ldrne \irqnr, [\base, #INTCPS_SIR_IRQ_OFFSET] 139 - and \irqnr, \irqnr, #ACTIVEIRQ_MASK /* Clear spurious bits */ 140 - 141 - .endm 142 - #endif 143 - 144 - 145 - #ifdef CONFIG_ARCH_OMAP4 146 - #define HAVE_GET_IRQNR_PREAMBLE 147 - #include <asm/hardware/entry-macro-gic.S> 148 - 149 - .macro get_irqnr_preamble, base, tmp 150 - ldr \base, =OMAP4_IRQ_BASE 151 - .endm 152 - 153 - #endif 154 - 155 - #endif /* MULTI_OMAP2 */
-43
arch/arm/mach-omap2/include/mach/omap4-common.h
··· 1 - /* 2 - * omap4-common.h: OMAP4 specific common header file 3 - * 4 - * Copyright (C) 2010 Texas Instruments, Inc. 5 - * 6 - * Author: 7 - * Santosh Shilimkar <santosh.shilimkar@ti.com> 8 - * 9 - * This program is free software; you can redistribute it and/or modify 10 - * it under the terms of the GNU General Public License version 2 as 11 - * published by the Free Software Foundation. 12 - */ 13 - #ifndef OMAP_ARCH_OMAP4_COMMON_H 14 - #define OMAP_ARCH_OMAP4_COMMON_H 15 - 16 - /* 17 - * wfi used in low power code. Directly opcode is used instead 18 - * of instruction to avoid mulit-omap build break 19 - */ 20 - #ifdef CONFIG_THUMB2_KERNEL 21 - #define do_wfi() __asm__ __volatile__ ("wfi" : : : "memory") 22 - #else 23 - #define do_wfi() \ 24 - __asm__ __volatile__ (".word 0xe320f003" : : : "memory") 25 - #endif 26 - 27 - #ifdef CONFIG_CACHE_L2X0 28 - extern void __iomem *l2cache_base; 29 - #endif 30 - 31 - extern void __iomem *gic_dist_base_addr; 32 - 33 - extern void __init gic_init_irq(void); 34 - extern void omap_smc1(u32 fn, u32 arg); 35 - 36 - #ifdef CONFIG_SMP 37 - /* Needed for secondary core boot */ 38 - extern void omap_secondary_startup(void); 39 - extern u32 omap_modify_auxcoreboot0(u32 set_mask, u32 clear_mask); 40 - extern void omap_auxcoreboot_addr(u32 cpu_addr); 41 - extern u32 omap_read_auxcoreboot0(void); 42 - #endif 43 - #endif
-20
arch/arm/mach-omap2/include/mach/vmalloc.h
··· 1 - /* 2 - * arch/arm/plat-omap/include/mach/vmalloc.h 3 - * 4 - * Copyright (C) 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 as published by 8 - * the Free Software Foundation; either version 2 of the License, or 9 - * (at your option) any later version. 10 - * 11 - * This program is distributed in the hope that it will be useful, 12 - * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 - * GNU General Public License for more details. 15 - * 16 - * You should have received a copy of the GNU General Public License 17 - * along with this program; if not, write to the Free Software 18 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 - */ 20 - #define VMALLOC_END 0xf8000000UL
+2 -6
arch/arm/mach-omap2/io.c
··· 35 35 #include "clock3xxx.h" 36 36 #include "clock44xx.h" 37 37 38 - #include <plat/common.h> 38 + #include "common.h" 39 39 #include <plat/omap-pm.h> 40 40 #include "voltage.h" 41 41 #include "powerdomain.h" ··· 43 43 #include "clockdomain.h" 44 44 #include <plat/omap_hwmod.h> 45 45 #include <plat/multi.h> 46 - #include <plat/common.h> 46 + #include "common.h" 47 47 48 48 /* 49 49 * The machine specific code may provide the extra mapping besides the ··· 316 316 return omap_hwmod_set_postsetup_state(oh, *(u8 *)data); 317 317 } 318 318 319 - /* See irq.c, omap4-common.c and entry-macro.S */ 320 - void __iomem *omap_irq_base; 321 - 322 319 static void __init omap_common_init_early(void) 323 320 { 324 321 omap2_check_revision(); 325 - omap_ioremap_init(); 326 322 omap_init_consistent_dma_size(); 327 323 } 328 324
+51
arch/arm/mach-omap2/irq.c
··· 15 15 #include <linux/interrupt.h> 16 16 #include <linux/io.h> 17 17 #include <mach/hardware.h> 18 + #include <asm/exception.h> 18 19 #include <asm/mach/irq.h> 19 20 20 21 ··· 35 34 #define INTC_PENDING_IRQ0 0x0098 36 35 /* Number of IRQ state bits in each MIR register */ 37 36 #define IRQ_BITS_PER_REG 32 37 + 38 + #define OMAP2_IRQ_BASE OMAP2_L4_IO_ADDRESS(OMAP24XX_IC_BASE) 39 + #define OMAP3_IRQ_BASE OMAP2_L4_IO_ADDRESS(OMAP34XX_IC_BASE) 40 + #define INTCPS_SIR_IRQ_OFFSET 0x0040 /* omap2/3 active interrupt offset */ 41 + #define ACTIVEIRQ_MASK 0x7f /* omap2/3 active interrupt bits */ 38 42 39 43 /* 40 44 * OMAP2 has a number of different interrupt controllers, each interrupt ··· 149 143 150 144 static void __init omap_init_irq(u32 base, int nr_irqs) 151 145 { 146 + void __iomem *omap_irq_base; 152 147 unsigned long nr_of_irqs = 0; 153 148 unsigned int nr_banks = 0; 154 149 int i, j; ··· 196 189 void __init ti816x_init_irq(void) 197 190 { 198 191 omap_init_irq(OMAP34XX_IC_BASE, 128); 192 + } 193 + 194 + static inline void omap_intc_handle_irq(void __iomem *base_addr, struct pt_regs *regs) 195 + { 196 + u32 irqnr; 197 + 198 + do { 199 + irqnr = readl_relaxed(base_addr + 0x98); 200 + if (irqnr) 201 + goto out; 202 + 203 + irqnr = readl_relaxed(base_addr + 0xb8); 204 + if (irqnr) 205 + goto out; 206 + 207 + irqnr = readl_relaxed(base_addr + 0xd8); 208 + #ifdef CONFIG_SOC_OMAPTI816X 209 + if (irqnr) 210 + goto out; 211 + irqnr = readl_relaxed(base_addr + 0xf8); 212 + #endif 213 + 214 + out: 215 + if (!irqnr) 216 + break; 217 + 218 + irqnr = readl_relaxed(base_addr + INTCPS_SIR_IRQ_OFFSET); 219 + irqnr &= ACTIVEIRQ_MASK; 220 + 221 + if (irqnr) 222 + handle_IRQ(irqnr, regs); 223 + } while (irqnr); 224 + } 225 + 226 + asmlinkage void __exception_irq_entry omap2_intc_handle_irq(struct pt_regs *regs) 227 + { 228 + void __iomem *base_addr = OMAP2_IRQ_BASE; 229 + omap_intc_handle_irq(base_addr, regs); 199 230 } 200 231 201 232 #ifdef CONFIG_ARCH_OMAP3 ··· 307 262 { 308 263 /* Re-enable autoidle */ 309 264 intc_bank_write_reg(1, &irq_banks[0], INTC_SYSCONFIG); 265 + } 266 + 267 + asmlinkage void __exception_irq_entry omap3_intc_handle_irq(struct pt_regs *regs) 268 + { 269 + void __iomem *base_addr = OMAP3_IRQ_BASE; 270 + omap_intc_handle_irq(base_addr, regs); 310 271 } 311 272 #endif /* CONFIG_ARCH_OMAP3 */
+2 -1
arch/arm/mach-omap2/omap-hotplug.c
··· 19 19 #include <linux/smp.h> 20 20 21 21 #include <asm/cacheflush.h> 22 - #include <mach/omap4-common.h> 22 + 23 + #include "common.h" 23 24 24 25 int platform_cpu_kill(unsigned int cpu) 25 26 {
+2 -1
arch/arm/mach-omap2/omap-smp.c
··· 24 24 #include <asm/hardware/gic.h> 25 25 #include <asm/smp_scu.h> 26 26 #include <mach/hardware.h> 27 - #include <mach/omap4-common.h> 27 + 28 + #include "common.h" 28 29 29 30 /* SCU base address */ 30 31 static void __iomem *scu_base;
+5 -4
arch/arm/mach-omap2/omap4-common.c
··· 22 22 #include <plat/irqs.h> 23 23 24 24 #include <mach/hardware.h> 25 - #include <mach/omap4-common.h> 25 + 26 + #include "common.h" 26 27 27 28 #ifdef CONFIG_CACHE_L2X0 28 29 void __iomem *l2cache_base; 29 30 #endif 30 31 31 - void __iomem *gic_dist_base_addr; 32 - 33 - 34 32 void __init gic_init_irq(void) 35 33 { 34 + void __iomem *omap_irq_base; 35 + void __iomem *gic_dist_base_addr; 36 + 36 37 /* Static mapping, never released */ 37 38 gic_dist_base_addr = ioremap(OMAP44XX_GIC_DIST_BASE, SZ_4K); 38 39 BUG_ON(!gic_dist_base_addr);
+1 -1
arch/arm/mach-omap2/omap_hwmod.c
··· 137 137 #include <linux/mutex.h> 138 138 #include <linux/spinlock.h> 139 139 140 - #include <plat/common.h> 140 + #include "common.h" 141 141 #include <plat/cpu.h> 142 142 #include "clockdomain.h" 143 143 #include "powerdomain.h"
+1 -1
arch/arm/mach-omap2/pm.c
··· 18 18 19 19 #include <plat/omap-pm.h> 20 20 #include <plat/omap_device.h> 21 - #include <plat/common.h> 21 + #include "common.h" 22 22 23 23 #include "voltage.h" 24 24 #include "powerdomain.h"
+1
arch/arm/mach-omap2/pm24xx.c
··· 42 42 #include <plat/dma.h> 43 43 #include <plat/board.h> 44 44 45 + #include "common.h" 45 46 #include "prm2xxx_3xxx.h" 46 47 #include "prm-regbits-24xx.h" 47 48 #include "cm2xxx_3xxx.h"
+1
arch/arm/mach-omap2/pm34xx.c
··· 42 42 #include <plat/gpmc.h> 43 43 #include <plat/dma.h> 44 44 45 + #include "common.h" 45 46 #include "cm2xxx_3xxx.h" 46 47 #include "cm-regbits-34xx.h" 47 48 #include "prm-regbits-34xx.h"
+1 -1
arch/arm/mach-omap2/pm44xx.c
··· 16 16 #include <linux/err.h> 17 17 #include <linux/slab.h> 18 18 19 + #include "common.h" 19 20 #include "powerdomain.h" 20 - #include <mach/omap4-common.h> 21 21 22 22 struct power_state { 23 23 struct powerdomain *pwrdm;
+1 -1
arch/arm/mach-omap2/prcm.c
··· 26 26 #include <linux/export.h> 27 27 28 28 #include <mach/system.h> 29 - #include <plat/common.h> 29 + #include "common.h" 30 30 #include <plat/prcm.h> 31 31 #include <plat/irqs.h> 32 32
+1 -1
arch/arm/mach-omap2/prcm_mpu44xx.c
··· 15 15 #include <linux/err.h> 16 16 #include <linux/io.h> 17 17 18 - #include <plat/common.h> 18 + #include "common.h" 19 19 20 20 #include "prcm_mpu44xx.h" 21 21 #include "cm-regbits-44xx.h"
+1 -1
arch/arm/mach-omap2/prm2xxx_3xxx.c
··· 16 16 #include <linux/err.h> 17 17 #include <linux/io.h> 18 18 19 - #include <plat/common.h> 19 + #include "common.h" 20 20 #include <plat/cpu.h> 21 21 #include <plat/prcm.h> 22 22
+1 -1
arch/arm/mach-omap2/prm44xx.c
··· 17 17 #include <linux/err.h> 18 18 #include <linux/io.h> 19 19 20 - #include <plat/common.h> 20 + #include "common.h" 21 21 #include <plat/cpu.h> 22 22 #include <plat/prcm.h> 23 23
+1 -1
arch/arm/mach-omap2/prminst44xx.c
··· 16 16 #include <linux/err.h> 17 17 #include <linux/io.h> 18 18 19 - #include <plat/common.h> 19 + #include "common.h" 20 20 21 21 #include "prm44xx.h" 22 22 #include "prminst44xx.h"
+1 -1
arch/arm/mach-omap2/sdram-nokia.c
··· 18 18 #include <linux/io.h> 19 19 20 20 #include <plat/io.h> 21 - #include <plat/common.h> 21 + #include "common.h" 22 22 #include <plat/clock.h> 23 23 #include <plat/sdrc.h> 24 24
+1 -1
arch/arm/mach-omap2/sdrc.c
··· 23 23 #include <linux/clk.h> 24 24 #include <linux/io.h> 25 25 26 - #include <plat/common.h> 26 + #include "common.h" 27 27 #include <plat/clock.h> 28 28 #include <plat/sram.h> 29 29
+1 -1
arch/arm/mach-omap2/sdrc2xxx.c
··· 24 24 #include <linux/clk.h> 25 25 #include <linux/io.h> 26 26 27 - #include <plat/common.h> 27 + #include "common.h" 28 28 #include <plat/clock.h> 29 29 #include <plat/sram.h> 30 30
+1 -1
arch/arm/mach-omap2/serial.c
··· 33 33 #include <plat/omap-serial.h> 34 34 #endif 35 35 36 - #include <plat/common.h> 36 + #include "common.h" 37 37 #include <plat/board.h> 38 38 #include <plat/clock.h> 39 39 #include <plat/dma.h>
+1 -1
arch/arm/mach-omap2/smartreflex.c
··· 26 26 #include <linux/slab.h> 27 27 #include <linux/pm_runtime.h> 28 28 29 - #include <plat/common.h> 29 + #include "common.h" 30 30 31 31 #include "pm.h" 32 32 #include "smartreflex.h"
+5 -17
arch/arm/mach-omap2/timer.c
··· 41 41 #include <plat/dmtimer.h> 42 42 #include <asm/localtimer.h> 43 43 #include <asm/sched_clock.h> 44 - #include <plat/common.h> 44 + #include "common.h" 45 45 #include <plat/omap_hwmod.h> 46 46 #include <plat/omap_device.h> 47 47 #include <plat/omap-pm.h> ··· 254 254 /* 255 255 * clocksource 256 256 */ 257 - static DEFINE_CLOCK_DATA(cd); 258 257 static cycle_t clocksource_read_cycles(struct clocksource *cs) 259 258 { 260 259 return (cycle_t)__omap_dm_timer_read_counter(&clksrc, 1); ··· 267 268 .flags = CLOCK_SOURCE_IS_CONTINUOUS, 268 269 }; 269 270 270 - static void notrace dmtimer_update_sched_clock(void) 271 + static u32 notrace dmtimer_read_sched_clock(void) 271 272 { 272 - u32 cyc; 273 - 274 - cyc = __omap_dm_timer_read_counter(&clksrc, 1); 275 - 276 - update_sched_clock(&cd, cyc, (u32)~0); 277 - } 278 - 279 - unsigned long long notrace sched_clock(void) 280 - { 281 - u32 cyc = 0; 282 - 283 273 if (clksrc.reserved) 284 - cyc = __omap_dm_timer_read_counter(&clksrc, 1); 274 + return __omap_dm_timer_read_counter(clksrc.io_base, 1); 285 275 286 - return cyc_to_sched_clock(&cd, cyc, (u32)~0); 276 + return 0; 287 277 } 288 278 289 279 /* Setup free-running counter for clocksource */ ··· 289 301 290 302 __omap_dm_timer_load_start(&clksrc, 291 303 OMAP_TIMER_CTRL_ST | OMAP_TIMER_CTRL_AR, 0, 1); 292 - init_sched_clock(&cd, dmtimer_update_sched_clock, 32, clksrc.rate); 304 + setup_sched_clock(dmtimer_read_sched_clock, 32, clksrc.rate); 293 305 294 306 if (clocksource_register_hz(&clocksource_gpt, clksrc.rate)) 295 307 pr_err("Could not register clocksource %s\n",
+1 -1
arch/arm/mach-omap2/vc3xxx_data.c
··· 18 18 #include <linux/err.h> 19 19 #include <linux/init.h> 20 20 21 - #include <plat/common.h> 21 + #include "common.h" 22 22 23 23 #include "prm-regbits-34xx.h" 24 24 #include "voltage.h"
+1 -1
arch/arm/mach-omap2/vc44xx_data.c
··· 18 18 #include <linux/err.h> 19 19 #include <linux/init.h> 20 20 21 - #include <plat/common.h> 21 + #include "common.h" 22 22 23 23 #include "prm44xx.h" 24 24 #include "prm-regbits-44xx.h"
+1 -1
arch/arm/mach-omap2/voltage.c
··· 27 27 #include <linux/slab.h> 28 28 #include <linux/clk.h> 29 29 30 - #include <plat/common.h> 30 + #include "common.h" 31 31 32 32 #include "prm-regbits-34xx.h" 33 33 #include "prm-regbits-44xx.h"
+1 -1
arch/arm/mach-omap2/voltagedomains3xxx_data.c
··· 18 18 #include <linux/err.h> 19 19 #include <linux/init.h> 20 20 21 - #include <plat/common.h> 21 + #include "common.h" 22 22 #include <plat/cpu.h> 23 23 24 24 #include "prm-regbits-34xx.h"
+1 -1
arch/arm/mach-omap2/voltagedomains44xx_data.c
··· 21 21 #include <linux/err.h> 22 22 #include <linux/init.h> 23 23 24 - #include <plat/common.h> 24 + #include "common.h" 25 25 26 26 #include "prm-regbits-44xx.h" 27 27 #include "prm44xx.h"
+1 -1
arch/arm/mach-omap2/vp.c
··· 1 1 #include <linux/kernel.h> 2 2 #include <linux/init.h> 3 3 4 - #include <plat/common.h> 4 + #include "common.h" 5 5 6 6 #include "voltage.h" 7 7 #include "vp.h"
+1 -1
arch/arm/mach-omap2/vp3xxx_data.c
··· 19 19 #include <linux/err.h> 20 20 #include <linux/init.h> 21 21 22 - #include <plat/common.h> 22 + #include "common.h" 23 23 24 24 #include "prm-regbits-34xx.h" 25 25 #include "voltage.h"
+1 -1
arch/arm/mach-omap2/vp44xx_data.c
··· 19 19 #include <linux/err.h> 20 20 #include <linux/init.h> 21 21 22 - #include <plat/common.h> 22 + #include "common.h" 23 23 24 24 #include "prm44xx.h" 25 25 #include "prm-regbits-44xx.h"
-25
arch/arm/mach-orion5x/include/mach/io.h
··· 15 15 16 16 #define IO_SPACE_LIMIT 0xffffffff 17 17 18 - static inline void __iomem * 19 - __arch_ioremap(unsigned long paddr, size_t size, unsigned int mtype) 20 - { 21 - void __iomem *retval; 22 - unsigned long offs = paddr - ORION5X_REGS_PHYS_BASE; 23 - if (mtype == MT_DEVICE && size && offs < ORION5X_REGS_SIZE && 24 - size <= ORION5X_REGS_SIZE && offs + size <= ORION5X_REGS_SIZE) { 25 - retval = (void __iomem *)ORION5X_REGS_VIRT_BASE + offs; 26 - } else { 27 - retval = __arm_ioremap(paddr, size, mtype); 28 - } 29 - 30 - return retval; 31 - } 32 - 33 - static inline void 34 - __arch_iounmap(void __iomem *addr) 35 - { 36 - if (addr < (void __iomem *)ORION5X_REGS_VIRT_BASE || 37 - addr >= (void __iomem *)(ORION5X_REGS_VIRT_BASE + ORION5X_REGS_SIZE)) 38 - __iounmap(addr); 39 - } 40 - 41 - #define __arch_ioremap __arch_ioremap 42 - #define __arch_iounmap __arch_iounmap 43 18 #define __io(a) __typesafe_io(a) 44 19 #define __mem_pci(a) (a) 45 20
-5
arch/arm/mach-orion5x/include/mach/vmalloc.h
··· 1 - /* 2 - * arch/arm/mach-orion5x/include/mach/vmalloc.h 3 - */ 4 - 5 - #define VMALLOC_END 0xfd800000UL
+4 -5
arch/arm/mach-picoxcell/common.c
··· 11 11 #include <linux/irqdomain.h> 12 12 #include <linux/of.h> 13 13 #include <linux/of_address.h> 14 + #include <linux/of_irq.h> 14 15 #include <linux/of_platform.h> 15 16 16 17 #include <asm/mach/arch.h> ··· 34 33 }; 35 34 36 35 static const struct of_device_id vic_of_match[] __initconst = { 37 - { .compatible = "arm,pl192-vic" }, 36 + { .compatible = "arm,pl192-vic", .data = vic_of_init, }, 38 37 { /* Sentinel */ } 39 38 }; 40 39 41 40 static void __init picoxcell_init_irq(void) 42 41 { 43 - vic_init(IO_ADDRESS(PICOXCELL_VIC0_BASE), 0, ~0, 0); 44 - vic_init(IO_ADDRESS(PICOXCELL_VIC1_BASE), 32, ~0, 0); 45 - irq_domain_generate_simple(vic_of_match, PICOXCELL_VIC0_BASE, 0); 46 - irq_domain_generate_simple(vic_of_match, PICOXCELL_VIC1_BASE, 32); 42 + of_irq_init(vic_of_match); 47 43 } 48 44 49 45 DT_MACHINE_START(PICOXCELL, "Picochip picoXcell") 50 46 .map_io = picoxcell_map_io, 51 47 .nr_irqs = ARCH_NR_IRQS, 52 48 .init_irq = picoxcell_init_irq, 49 + .handle_irq = vic_handle_irq, 53 50 .timer = &picoxcell_timer, 54 51 .init_machine = picoxcell_init_machine, 55 52 .dt_compat = picoxcell_dt_match,
+4 -7
arch/arm/mach-picoxcell/include/mach/entry-macro.S
··· 9 9 * License version 2. This program is licensed "as is" without any 10 10 * warranty of any kind, whether express or implied. 11 11 */ 12 - #include <mach/hardware.h> 13 - #include <mach/irqs.h> 14 - #include <mach/map.h> 12 + .macro disable_fiq 13 + .endm 15 14 16 - #define VA_VIC0 IO_ADDRESS(PICOXCELL_VIC0_BASE) 17 - #define VA_VIC1 IO_ADDRESS(PICOXCELL_VIC1_BASE) 18 - 19 - #include <asm/entry-macro-vic2.S> 15 + .macro arch_ret_to_user, tmp1, tmp2 16 + .endm
-14
arch/arm/mach-picoxcell/include/mach/vmalloc.h
··· 1 - /* 2 - * Copyright (c) 2011 Picochip Ltd., Jamie Iles 3 - * 4 - * This program is free software; you can redistribute it and/or modify 5 - * it under the terms of the GNU General Public License as published by 6 - * the Free Software Foundation; either version 2 of the License, or 7 - * (at your option) any later version. 8 - * 9 - * This program is distributed in the hope that it will be useful, 10 - * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 - * GNU General Public License for more details. 13 - */ 14 - #define VMALLOC_END 0xfe000000UL
+3 -14
arch/arm/mach-picoxcell/time.c
··· 11 11 #include <linux/of.h> 12 12 #include <linux/of_address.h> 13 13 #include <linux/of_irq.h> 14 - #include <linux/sched.h> 15 14 16 15 #include <asm/mach/time.h> 17 16 #include <asm/sched_clock.h> ··· 65 66 dw_apb_clocksource_register(cs); 66 67 } 67 68 68 - static DEFINE_CLOCK_DATA(cd); 69 69 static void __iomem *sched_io_base; 70 70 71 - unsigned long long notrace sched_clock(void) 71 + unsigned u32 notrace picoxcell_read_sched_clock(void) 72 72 { 73 - cycle_t cyc = sched_io_base ? __raw_readl(sched_io_base) : 0; 74 - 75 - return cyc_to_sched_clock(&cd, cyc, (u32)~0); 76 - } 77 - 78 - static void notrace picoxcell_update_sched_clock(void) 79 - { 80 - cycle_t cyc = sched_io_base ? __raw_readl(sched_io_base) : 0; 81 - 82 - update_sched_clock(&cd, cyc, (u32)~0); 73 + return __raw_readl(sched_io_base); 83 74 } 84 75 85 76 static const struct of_device_id picoxcell_rtc_ids[] __initconst = { ··· 89 100 timer_get_base_and_rate(sched_timer, &sched_io_base, &rate); 90 101 of_node_put(sched_timer); 91 102 92 - init_sched_clock(&cd, picoxcell_update_sched_clock, 32, rate); 103 + setup_sched_clock(picoxcell_read_sched_clock, 32, rate); 93 104 } 94 105 95 106 static const struct of_device_id picoxcell_timer_ids[] __initconst = {
+1 -1
arch/arm/mach-pnx4008/include/mach/system.h
··· 32 32 33 33 static inline void arch_reset(char mode, const char *cmd) 34 34 { 35 - cpu_reset(0); 35 + soft_restart(0); 36 36 } 37 37 38 38 #endif
-20
arch/arm/mach-pnx4008/include/mach/vmalloc.h
··· 1 - /* 2 - * arch/arm/mach-pnx4008/include/mach/vmalloc.h 3 - * 4 - * Author: Vitaly Wool <source@mvista.com> 5 - * 6 - * 2006 (c) MontaVista Software, Inc. This file is licensed under 7 - * the terms of the GNU General Public License version 2. This program 8 - * is licensed "as is" without any warranty of any kind, whether express 9 - * or implied. 10 - */ 11 - 12 - /* 13 - * Just any arbitrary offset to the start of the vmalloc VM area: the 14 - * current 8MB value just means that there will be a 8MB "hole" after the 15 - * physical memory until the kernel virtual memory starts. That means that 16 - * any out-of-bounds memory accesses will hopefully be caught. 17 - * The vmalloc() routines leaves a hole of 4kB between each vmalloced 18 - * area for the same reason. ;) 19 - */ 20 - #define VMALLOC_END 0xd0000000UL
+4 -2
arch/arm/mach-prima2/include/mach/map.h
··· 9 9 #ifndef __MACH_PRIMA2_MAP_H__ 10 10 #define __MACH_PRIMA2_MAP_H__ 11 11 12 - #include <mach/vmalloc.h> 12 + #include <linux/const.h> 13 13 14 - #define SIRFSOC_VA(x) (VMALLOC_END + ((x) & 0x00FFF000)) 14 + #define SIRFSOC_VA_BASE _AC(0xFEC00000, UL) 15 + 16 + #define SIRFSOC_VA(x) (SIRFSOC_VA_BASE + ((x) & 0x00FFF000)) 15 17 16 18 #endif
-16
arch/arm/mach-prima2/include/mach/vmalloc.h
··· 1 - /* 2 - * arch/arm/ach-prima2/include/mach/vmalloc.h 3 - * 4 - * Copyright (c) 2010 – 2011 Cambridge Silicon Radio Limited, a CSR plc group company. 5 - * 6 - * Licensed under GPLv2 or later. 7 - */ 8 - 9 - #ifndef __MACH_VMALLOC_H 10 - #define __MACH_VMALLOC_H 11 - 12 - #include <linux/const.h> 13 - 14 - #define VMALLOC_END _AC(0xFEC00000, UL) 15 - 16 - #endif
-36
arch/arm/mach-pxa/include/mach/entry-macro.S
··· 7 7 * License version 2. This program is licensed "as is" without any 8 8 * warranty of any kind, whether express or implied. 9 9 */ 10 - #include <mach/hardware.h> 11 - #include <mach/irqs.h> 12 10 13 11 .macro disable_fiq 14 12 .endm 15 13 16 - .macro get_irqnr_preamble, base, tmp 17 - .endm 18 - 19 14 .macro arch_ret_to_user, tmp1, tmp2 20 - .endm 21 - 22 - .macro get_irqnr_and_base, irqnr, irqstat, base, tmp 23 - mrc p15, 0, \tmp, c0, c0, 0 @ CPUID 24 - mov \tmp, \tmp, lsr #13 25 - and \tmp, \tmp, #0x7 @ Core G 26 - cmp \tmp, #1 27 - bhi 1002f 28 - 29 - @ Core Generation 1 (PXA25x) 30 - mov \base, #io_p2v(0x40000000) @ IIR Ctl = 0x40d00000 31 - add \base, \base, #0x00d00000 32 - ldr \irqstat, [\base, #0] @ ICIP 33 - ldr \irqnr, [\base, #4] @ ICMR 34 - 35 - ands \irqnr, \irqstat, \irqnr 36 - beq 1001f 37 - rsb \irqstat, \irqnr, #0 38 - and \irqstat, \irqstat, \irqnr 39 - clz \irqnr, \irqstat 40 - rsb \irqnr, \irqnr, #(31 + PXA_IRQ(0)) 41 - b 1001f 42 - 1002: 43 - @ Core Generation 2 (PXA27x) or Core Generation 3 (PXA3xx) 44 - mrc p6, 0, \irqstat, c5, c0, 0 @ ICHP 45 - tst \irqstat, #0x80000000 46 - beq 1001f 47 - bic \irqstat, \irqstat, #0x80000000 48 - mov \irqnr, \irqstat, lsr #16 49 - add \irqnr, \irqnr, #(PXA_IRQ(0)) 50 - 1001: 51 15 .endm
-11
arch/arm/mach-pxa/include/mach/vmalloc.h
··· 1 - /* 2 - * arch/arm/mach-pxa/include/mach/vmalloc.h 3 - * 4 - * Author: Nicolas Pitre 5 - * Copyright: (C) 2001 MontaVista Software Inc. 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 - #define VMALLOC_END (0xe8000000UL)
+1
arch/arm/mach-pxa/mioa701.c
··· 752 752 753 753 MACHINE_START(MIOA701, "MIO A701") 754 754 .atag_offset = 0x100, 755 + .restart_mode = 's', 755 756 .map_io = &pxa27x_map_io, 756 757 .init_irq = &pxa27x_init_irq, 757 758 .handle_irq = &pxa27x_handle_irq,
-6
arch/arm/mach-pxa/poodle.c
··· 420 420 arm_machine_restart('h', NULL); 421 421 } 422 422 423 - static void poodle_restart(char mode, const char *cmd) 424 - { 425 - arm_machine_restart('h', cmd); 426 - } 427 - 428 423 static void __init poodle_init(void) 429 424 { 430 425 int ret = 0; 431 426 432 427 pm_power_off = poodle_poweroff; 433 - arm_pm_restart = poodle_restart; 434 428 435 429 PCFR |= PCFR_OPDE; 436 430
+1 -1
arch/arm/mach-pxa/reset.c
··· 88 88 switch (mode) { 89 89 case 's': 90 90 /* Jump into ROM at address 0 */ 91 - cpu_reset(0); 91 + soft_restart(0); 92 92 break; 93 93 case 'g': 94 94 do_gpio_reset();
+3
arch/arm/mach-pxa/spitz.c
··· 982 982 983 983 #ifdef CONFIG_MACH_SPITZ 984 984 MACHINE_START(SPITZ, "SHARP Spitz") 985 + .restart_mode = 'g', 985 986 .fixup = spitz_fixup, 986 987 .map_io = pxa27x_map_io, 987 988 .init_irq = pxa27x_init_irq, ··· 994 993 995 994 #ifdef CONFIG_MACH_BORZOI 996 995 MACHINE_START(BORZOI, "SHARP Borzoi") 996 + .restart_mode = 'g', 997 997 .fixup = spitz_fixup, 998 998 .map_io = pxa27x_map_io, 999 999 .init_irq = pxa27x_init_irq, ··· 1006 1004 1007 1005 #ifdef CONFIG_MACH_AKITA 1008 1006 MACHINE_START(AKITA, "SHARP Akita") 1007 + .restart_mode = 'g', 1009 1008 .fixup = spitz_fixup, 1010 1009 .map_io = pxa27x_map_io, 1011 1010 .init_irq = pxa27x_init_irq,
+3 -12
arch/arm/mach-pxa/time.c
··· 16 16 #include <linux/init.h> 17 17 #include <linux/interrupt.h> 18 18 #include <linux/clockchips.h> 19 - #include <linux/sched.h> 20 19 21 20 #include <asm/div64.h> 22 21 #include <asm/mach/irq.h> ··· 31 32 * long as there is always less than 582 seconds between successive 32 33 * calls to sched_clock() which should always be the case in practice. 33 34 */ 34 - static DEFINE_CLOCK_DATA(cd); 35 35 36 - unsigned long long notrace sched_clock(void) 36 + static u32 notrace pxa_read_sched_clock(void) 37 37 { 38 - u32 cyc = OSCR; 39 - return cyc_to_sched_clock(&cd, cyc, (u32)~0); 40 - } 41 - 42 - static void notrace pxa_update_sched_clock(void) 43 - { 44 - u32 cyc = OSCR; 45 - update_sched_clock(&cd, cyc, (u32)~0); 38 + return OSCR; 46 39 } 47 40 48 41 ··· 110 119 OIER = 0; 111 120 OSSR = OSSR_M0 | OSSR_M1 | OSSR_M2 | OSSR_M3; 112 121 113 - init_sched_clock(&cd, pxa_update_sched_clock, 32, clock_tick_rate); 122 + setup_sched_clock(pxa_read_sched_clock, 32, clock_tick_rate); 114 123 115 124 clockevents_calc_mult_shift(&ckevt_pxa_osmr0, clock_tick_rate, 4); 116 125 ckevt_pxa_osmr0.max_delta_ns =
+1
arch/arm/mach-pxa/tosa.c
··· 970 970 } 971 971 972 972 MACHINE_START(TOSA, "SHARP Tosa") 973 + .restart_mode = 'g', 973 974 .fixup = fixup_tosa, 974 975 .map_io = pxa25x_map_io, 975 976 .nr_irqs = TOSA_NR_IRQS,
+9
arch/arm/mach-realview/Kconfig
··· 12 12 bool "Support Multicore Cortex-A9 Tile" 13 13 depends on MACH_REALVIEW_EB 14 14 select CPU_V7 15 + select HAVE_SMP 16 + select MIGHT_HAVE_CACHE_L2X0 15 17 help 16 18 Enable support for the Cortex-A9MPCore tile fitted to the 17 19 Realview(R) Emulation Baseboard platform. ··· 23 21 depends on MACH_REALVIEW_EB 24 22 select CPU_V6K 25 23 select ARCH_HAS_BARRIERS if SMP 24 + select HAVE_SMP 25 + select MIGHT_HAVE_CACHE_L2X0 26 26 help 27 27 Enable support for the ARM11MPCore tile fitted to the Realview(R) 28 28 Emulation Baseboard platform. ··· 43 39 select CPU_V6K 44 40 select ARM_GIC 45 41 select HAVE_PATA_PLATFORM 42 + select HAVE_SMP 43 + select MIGHT_HAVE_CACHE_L2X0 46 44 select ARCH_HAS_BARRIERS if SMP 47 45 help 48 46 Include support for the ARM(R) RealView(R) Platform Baseboard for ··· 57 51 select CPU_V6 58 52 select ARM_GIC 59 53 select HAVE_TCM 54 + select MIGHT_HAVE_CACHE_L2X0 60 55 help 61 56 Include support for the ARM(R) RealView(R) Platform Baseboard for 62 57 ARM1176JZF-S. ··· 85 78 bool "Support RealView(R) Platform Baseboard Explore" 86 79 select ARM_GIC 87 80 select HAVE_PATA_PLATFORM 81 + select HAVE_SMP 82 + select MIGHT_HAVE_CACHE_L2X0 88 83 select ARCH_SPARSEMEM_ENABLE if CPU_V7 && !REALVIEW_HIGH_PHYS_OFFSET 89 84 select ZONE_DMA if SPARSEMEM 90 85 help
-2
arch/arm/mach-realview/include/mach/entry-macro.S
··· 7 7 * License version 2. This program is licensed "as is" without any 8 8 * warranty of any kind, whether express or implied. 9 9 */ 10 - #include <mach/hardware.h> 11 - #include <asm/hardware/entry-macro-gic.S> 12 10 13 11 .macro disable_fiq 14 12 .endm
-21
arch/arm/mach-realview/include/mach/vmalloc.h
··· 1 - /* 2 - * arch/arm/mach-realview/include/mach/vmalloc.h 3 - * 4 - * Copyright (C) 2003 ARM Limited 5 - * Copyright (C) 2000 Russell King. 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 as published by 9 - * the Free Software Foundation; either version 2 of the License, or 10 - * (at your option) any later version. 11 - * 12 - * This program is distributed in the hope that it will be useful, 13 - * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 - * GNU General Public License for more details. 16 - * 17 - * You should have received a copy of the GNU General Public License 18 - * along with this program; if not, write to the Free Software 19 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 - */ 21 - #define VMALLOC_END 0xf8000000UL
+3 -2
arch/arm/mach-realview/realview_eb.c
··· 91 91 92 92 static struct map_desc realview_eb11mp_io_desc[] __initdata = { 93 93 { 94 - .virtual = IO_ADDRESS(REALVIEW_EB11MP_GIC_CPU_BASE), 95 - .pfn = __phys_to_pfn(REALVIEW_EB11MP_GIC_CPU_BASE), 94 + .virtual = IO_ADDRESS(REALVIEW_EB11MP_SCU_BASE), 95 + .pfn = __phys_to_pfn(REALVIEW_EB11MP_SCU_BASE), 96 96 .length = SZ_4K, 97 97 .type = MT_DEVICE, 98 98 }, { ··· 469 469 .init_early = realview_init_early, 470 470 .init_irq = gic_init_irq, 471 471 .timer = &realview_eb_timer, 472 + .handle_irq = gic_handle_irq, 472 473 .init_machine = realview_eb_init, 473 474 #ifdef CONFIG_ZONE_DMA 474 475 .dma_zone_size = SZ_256M,
+1
arch/arm/mach-realview/realview_pb1176.c
··· 392 392 .init_early = realview_init_early, 393 393 .init_irq = gic_init_irq, 394 394 .timer = &realview_pb1176_timer, 395 + .handle_irq = gic_handle_irq, 395 396 .init_machine = realview_pb1176_init, 396 397 #ifdef CONFIG_ZONE_DMA 397 398 .dma_zone_size = SZ_256M,
+1
arch/arm/mach-realview/realview_pb11mp.c
··· 366 366 .init_early = realview_init_early, 367 367 .init_irq = gic_init_irq, 368 368 .timer = &realview_pb11mp_timer, 369 + .handle_irq = gic_handle_irq, 369 370 .init_machine = realview_pb11mp_init, 370 371 #ifdef CONFIG_ZONE_DMA 371 372 .dma_zone_size = SZ_256M,
+1
arch/arm/mach-realview/realview_pba8.c
··· 316 316 .init_early = realview_init_early, 317 317 .init_irq = gic_init_irq, 318 318 .timer = &realview_pba8_timer, 319 + .handle_irq = gic_handle_irq, 319 320 .init_machine = realview_pba8_init, 320 321 #ifdef CONFIG_ZONE_DMA 321 322 .dma_zone_size = SZ_256M,
+3 -2
arch/arm/mach-realview/realview_pbx.c
··· 98 98 99 99 static struct map_desc realview_local_io_desc[] __initdata = { 100 100 { 101 - .virtual = IO_ADDRESS(REALVIEW_PBX_TILE_GIC_CPU_BASE), 102 - .pfn = __phys_to_pfn(REALVIEW_PBX_TILE_GIC_CPU_BASE), 101 + .virtual = IO_ADDRESS(REALVIEW_PBX_TILE_SCU_BASE), 102 + .pfn = __phys_to_pfn(REALVIEW_PBX_TILE_SCU_BASE), 103 103 .length = SZ_4K, 104 104 .type = MT_DEVICE, 105 105 }, { ··· 399 399 .init_early = realview_init_early, 400 400 .init_irq = gic_init_irq, 401 401 .timer = &realview_pbx_timer, 402 + .handle_irq = gic_handle_irq, 402 403 .init_machine = realview_pbx_init, 403 404 #ifdef CONFIG_ZONE_DMA 404 405 .dma_zone_size = SZ_256M,
+1 -1
arch/arm/mach-rpc/include/mach/system.h
··· 23 23 /* 24 24 * Jump into the ROM 25 25 */ 26 - cpu_reset(0); 26 + soft_restart(0); 27 27 }
-10
arch/arm/mach-rpc/include/mach/vmalloc.h
··· 1 - /* 2 - * arch/arm/mach-rpc/include/mach/vmalloc.h 3 - * 4 - * Copyright (C) 1997 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 - #define VMALLOC_END 0xdc000000UL
+2 -2
arch/arm/mach-s3c2410/include/mach/system-reset.h
··· 19 19 arch_reset(char mode, const char *cmd) 20 20 { 21 21 if (mode == 's') { 22 - cpu_reset(0); 22 + soft_restart(0); 23 23 } 24 24 25 25 if (s3c24xx_reset_hook) ··· 28 28 arch_wdt_reset(); 29 29 30 30 /* we'll take a jump through zero as a poor second */ 31 - cpu_reset(0); 31 + soft_restart(0); 32 32 }
-20
arch/arm/mach-s3c2410/include/mach/vmalloc.h
··· 1 - /* arch/arm/mach-s3c2410/include/mach/vmalloc.h 2 - * 3 - * from arch/arm/mach-iop3xx/include/mach/vmalloc.h 4 - * 5 - * Copyright (c) 2003 Simtec Electronics <linux@simtec.co.uk> 6 - * http://www.simtec.co.uk/products/SWLINUX/ 7 - * 8 - * This program is free software; you can redistribute it and/or modify 9 - * it under the terms of the GNU General Public License version 2 as 10 - * published by the Free Software Foundation. 11 - * 12 - * S3C2410 vmalloc definition 13 - */ 14 - 15 - #ifndef __ASM_ARCH_VMALLOC_H 16 - #define __ASM_ARCH_VMALLOC_H 17 - 18 - #define VMALLOC_END 0xF6000000UL 19 - 20 - #endif /* __ASM_ARCH_VMALLOC_H */
+4 -3
arch/arm/mach-s3c64xx/include/mach/entry-macro.S
··· 12 12 * warranty of any kind, whether express or implied. 13 13 */ 14 14 15 - #include <mach/map.h> 16 - #include <mach/irqs.h> 15 + .macro disable_fiq 16 + .endm 17 17 18 - #include <asm/entry-macro-vic2.S> 18 + .macro arch_ret_to_user, tmp1, tmp2 19 + .endm
+1 -1
arch/arm/mach-s3c64xx/include/mach/system.h
··· 24 24 arch_wdt_reset(); 25 25 26 26 /* if all else fails, or mode was for soft, jump to 0 */ 27 - cpu_reset(0); 27 + soft_restart(0); 28 28 } 29 29 30 30 #endif /* __ASM_ARCH_IRQ_H */
-20
arch/arm/mach-s3c64xx/include/mach/vmalloc.h
··· 1 - /* arch/arm/mach-s3c64xx/include/mach/vmalloc.h 2 - * 3 - * from arch/arm/mach-iop3xx/include/mach/vmalloc.h 4 - * 5 - * Copyright (c) 2003 Simtec Electronics <linux@simtec.co.uk> 6 - * http://www.simtec.co.uk/products/SWLINUX/ 7 - * 8 - * This program is free software; you can redistribute it and/or modify 9 - * it under the terms of the GNU General Public License version 2 as 10 - * published by the Free Software Foundation. 11 - * 12 - * S3C6400 vmalloc definition 13 - */ 14 - 15 - #ifndef __ASM_ARCH_VMALLOC_H 16 - #define __ASM_ARCH_VMALLOC_H 17 - 18 - #define VMALLOC_END 0xF6000000UL 19 - 20 - #endif /* __ASM_ARCH_VMALLOC_H */
+2
arch/arm/mach-s3c64xx/mach-anw6410.c
··· 30 30 31 31 #include <video/platform_lcd.h> 32 32 33 + #include <asm/hardware/vic.h> 33 34 #include <asm/mach/arch.h> 34 35 #include <asm/mach/map.h> 35 36 #include <asm/mach/irq.h> ··· 237 236 .atag_offset = 0x100, 238 237 239 238 .init_irq = s3c6410_init_irq, 239 + .handle_irq = vic_handle_irq, 240 240 .map_io = anw6410_map_io, 241 241 .init_machine = anw6410_machine_init, 242 242 .timer = &s3c24xx_timer,
+2
arch/arm/mach-s3c64xx/mach-crag6410.c
··· 37 37 #include <linux/mfd/wm831x/irq.h> 38 38 #include <linux/mfd/wm831x/gpio.h> 39 39 40 + #include <asm/hardware/vic.h> 40 41 #include <asm/mach/arch.h> 41 42 #include <asm/mach-types.h> 42 43 ··· 712 711 /* Maintainer: Mark Brown <broonie@opensource.wolfsonmicro.com> */ 713 712 .atag_offset = 0x100, 714 713 .init_irq = s3c6410_init_irq, 714 + .handle_irq = vic_handle_irq, 715 715 .map_io = crag6410_map_io, 716 716 .init_machine = crag6410_machine_init, 717 717 .timer = &s3c24xx_timer,
+2
arch/arm/mach-s3c64xx/mach-hmt.c
··· 29 29 #include <mach/hardware.h> 30 30 #include <mach/map.h> 31 31 32 + #include <asm/hardware/vic.h> 32 33 #include <asm/irq.h> 33 34 #include <asm/mach-types.h> 34 35 ··· 268 267 /* Maintainer: Peter Korsgaard <jacmet@sunsite.dk> */ 269 268 .atag_offset = 0x100, 270 269 .init_irq = s3c6410_init_irq, 270 + .handle_irq = vic_handle_irq, 271 271 .map_io = hmt_map_io, 272 272 .init_machine = hmt_machine_init, 273 273 .timer = &s3c24xx_timer,
+2
arch/arm/mach-s3c64xx/mach-mini6410.c
··· 24 24 #include <linux/serial_core.h> 25 25 #include <linux/types.h> 26 26 27 + #include <asm/hardware/vic.h> 27 28 #include <asm/mach-types.h> 28 29 #include <asm/mach/arch.h> 29 30 #include <asm/mach/map.h> ··· 346 345 /* Maintainer: Darius Augulis <augulis.darius@gmail.com> */ 347 346 .atag_offset = 0x100, 348 347 .init_irq = s3c6410_init_irq, 348 + .handle_irq = vic_handle_irq, 349 349 .map_io = mini6410_map_io, 350 350 .init_machine = mini6410_machine_init, 351 351 .timer = &s3c24xx_timer,
+2
arch/arm/mach-s3c64xx/mach-ncp.c
··· 25 25 26 26 #include <video/platform_lcd.h> 27 27 28 + #include <asm/hardware/vic.h> 28 29 #include <asm/mach/arch.h> 29 30 #include <asm/mach/map.h> 30 31 #include <asm/mach/irq.h> ··· 100 99 /* Maintainer: Samsung Electronics */ 101 100 .atag_offset = 0x100, 102 101 .init_irq = s3c6410_init_irq, 102 + .handle_irq = vic_handle_irq, 103 103 .map_io = ncp_map_io, 104 104 .init_machine = ncp_machine_init, 105 105 .timer = &s3c24xx_timer,
+2
arch/arm/mach-s3c64xx/mach-real6410.c
··· 25 25 #include <linux/serial_core.h> 26 26 #include <linux/types.h> 27 27 28 + #include <asm/hardware/vic.h> 28 29 #include <asm/mach-types.h> 29 30 #include <asm/mach/arch.h> 30 31 #include <asm/mach/map.h> ··· 327 326 .atag_offset = 0x100, 328 327 329 328 .init_irq = s3c6410_init_irq, 329 + .handle_irq = vic_handle_irq, 330 330 .map_io = real6410_map_io, 331 331 .init_machine = real6410_machine_init, 332 332 .timer = &s3c24xx_timer,
+2
arch/arm/mach-s3c64xx/mach-smartq5.c
··· 17 17 #include <linux/leds.h> 18 18 #include <linux/platform_device.h> 19 19 20 + #include <asm/hardware/vic.h> 20 21 #include <asm/mach-types.h> 21 22 #include <asm/mach/arch.h> 22 23 ··· 149 148 /* Maintainer: Maurus Cuelenaere <mcuelenaere AT gmail DOT com> */ 150 149 .atag_offset = 0x100, 151 150 .init_irq = s3c6410_init_irq, 151 + .handle_irq = vic_handle_irq, 152 152 .map_io = smartq_map_io, 153 153 .init_machine = smartq5_machine_init, 154 154 .timer = &s3c24xx_timer,
+2
arch/arm/mach-s3c64xx/mach-smartq7.c
··· 17 17 #include <linux/leds.h> 18 18 #include <linux/platform_device.h> 19 19 20 + #include <asm/hardware/vic.h> 20 21 #include <asm/mach-types.h> 21 22 #include <asm/mach/arch.h> 22 23 ··· 165 164 /* Maintainer: Maurus Cuelenaere <mcuelenaere AT gmail DOT com> */ 166 165 .atag_offset = 0x100, 167 166 .init_irq = s3c6410_init_irq, 167 + .handle_irq = vic_handle_irq, 168 168 .map_io = smartq_map_io, 169 169 .init_machine = smartq7_machine_init, 170 170 .timer = &s3c24xx_timer,
+2
arch/arm/mach-s3c64xx/mach-smdk6400.c
··· 22 22 23 23 #include <asm/mach-types.h> 24 24 25 + #include <asm/hardware/vic.h> 25 26 #include <asm/mach/arch.h> 26 27 #include <asm/mach/map.h> 27 28 #include <asm/mach/irq.h> ··· 89 88 .atag_offset = 0x100, 90 89 91 90 .init_irq = s3c6400_init_irq, 91 + .handle_irq = vic_handle_irq, 92 92 .map_io = smdk6400_map_io, 93 93 .init_machine = smdk6400_machine_init, 94 94 .timer = &s3c24xx_timer,
+2
arch/arm/mach-s3c64xx/mach-smdk6410.c
··· 43 43 44 44 #include <video/platform_lcd.h> 45 45 46 + #include <asm/hardware/vic.h> 46 47 #include <asm/mach/arch.h> 47 48 #include <asm/mach/map.h> 48 49 #include <asm/mach/irq.h> ··· 701 700 .atag_offset = 0x100, 702 701 703 702 .init_irq = s3c6410_init_irq, 703 + .handle_irq = vic_handle_irq, 704 704 .map_io = smdk6410_map_io, 705 705 .init_machine = smdk6410_machine_init, 706 706 .timer = &s3c24xx_timer,
+4 -3
arch/arm/mach-s5p64x0/include/mach/entry-macro.S
··· 10 10 * published by the Free Software Foundation. 11 11 */ 12 12 13 - #include <mach/map.h> 14 - #include <plat/irqs.h> 13 + .macro disable_fiq 14 + .endm 15 15 16 - #include <asm/entry-macro-vic2.S> 16 + .macro arch_ret_to_user, tmp1, tmp2 17 + .endm
-20
arch/arm/mach-s5p64x0/include/mach/vmalloc.h
··· 1 - /* linux/arch/arm/mach-s5p64x0/include/mach/vmalloc.h 2 - * 3 - * Copyright (c) 2010 Samsung Electronics Co., Ltd. 4 - * http://www.samsung.com 5 - * 6 - * Copyright 2010 Ben Dooks <ben-linux@fluff.org> 7 - * 8 - * This program is free software; you can redistribute it and/or modify 9 - * it under the terms of the GNU General Public License version 2 as 10 - * published by the Free Software Foundation. 11 - * 12 - * S3C6400 vmalloc definition 13 - */ 14 - 15 - #ifndef __ASM_ARCH_VMALLOC_H 16 - #define __ASM_ARCH_VMALLOC_H 17 - 18 - #define VMALLOC_END 0xF6000000UL 19 - 20 - #endif /* __ASM_ARCH_VMALLOC_H */
+2
arch/arm/mach-s5p64x0/mach-smdk6440.c
··· 27 27 28 28 #include <video/platform_lcd.h> 29 29 30 + #include <asm/hardware/vic.h> 30 31 #include <asm/mach/arch.h> 31 32 #include <asm/mach/map.h> 32 33 #include <asm/irq.h> ··· 243 242 .atag_offset = 0x100, 244 243 245 244 .init_irq = s5p6440_init_irq, 245 + .handle_irq = vic_handle_irq, 246 246 .map_io = smdk6440_map_io, 247 247 .init_machine = smdk6440_machine_init, 248 248 .timer = &s5p_timer,
+2
arch/arm/mach-s5p64x0/mach-smdk6450.c
··· 27 27 28 28 #include <video/platform_lcd.h> 29 29 30 + #include <asm/hardware/vic.h> 30 31 #include <asm/mach/arch.h> 31 32 #include <asm/mach/map.h> 32 33 #include <asm/irq.h> ··· 263 262 .atag_offset = 0x100, 264 263 265 264 .init_irq = s5p6450_init_irq, 265 + .handle_irq = vic_handle_irq, 266 266 .map_io = smdk6450_map_io, 267 267 .init_machine = smdk6450_machine_init, 268 268 .timer = &s5p_timer,
-25
arch/arm/mach-s5pc100/include/mach/entry-macro.S
··· 12 12 * warranty of any kind, whether express or implied. 13 13 */ 14 14 15 - #include <asm/hardware/vic.h> 16 - #include <mach/map.h> 17 - #include <plat/irqs.h> 18 - 19 15 .macro disable_fiq 20 16 .endm 21 17 22 18 .macro get_irqnr_preamble, base, tmp 23 - ldr \base, =VA_VIC0 24 19 .endm 25 20 26 21 .macro arch_ret_to_user, tmp1, tmp2 27 22 .endm 28 23 29 24 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp 30 - 31 - @ check the vic0 32 - mov \irqnr, # S5P_IRQ_OFFSET + 31 33 - ldr \irqstat, [ \base, # VIC_IRQ_STATUS ] 34 - teq \irqstat, #0 35 - 36 - @ otherwise try vic1 37 - addeq \tmp, \base, #(VA_VIC1 - VA_VIC0) 38 - addeq \irqnr, \irqnr, #32 39 - ldreq \irqstat, [ \tmp, # VIC_IRQ_STATUS ] 40 - teqeq \irqstat, #0 41 - 42 - @ otherwise try vic2 43 - addeq \tmp, \base, #(VA_VIC2 - VA_VIC0) 44 - addeq \irqnr, \irqnr, #32 45 - ldreq \irqstat, [ \tmp, # VIC_IRQ_STATUS ] 46 - teqeq \irqstat, #0 47 - 48 - clzne \irqstat, \irqstat 49 - subne \irqnr, \irqnr, \irqstat 50 25 .endm
-17
arch/arm/mach-s5pc100/include/mach/vmalloc.h
··· 1 - /* arch/arm/mach-s5pc100/include/mach/vmalloc.h 2 - * 3 - * Copyright 2010 Ben Dooks <ben-linux@fluff.org> 4 - * 5 - * This program is free software; you can redistribute it and/or modify 6 - * it under the terms of the GNU General Public License version 2 as 7 - * published by the Free Software Foundation. 8 - * 9 - * S3C6400 vmalloc definition 10 - */ 11 - 12 - #ifndef __ASM_ARCH_VMALLOC_H 13 - #define __ASM_ARCH_VMALLOC_H 14 - 15 - #define VMALLOC_END 0xF6000000UL 16 - 17 - #endif /* __ASM_ARCH_VMALLOC_H */
+2
arch/arm/mach-s5pc100/mach-smdkc100.c
··· 25 25 #include <linux/input.h> 26 26 #include <linux/pwm_backlight.h> 27 27 28 + #include <asm/hardware/vic.h> 28 29 #include <asm/mach/arch.h> 29 30 #include <asm/mach/map.h> 30 31 ··· 251 250 /* Maintainer: Byungho Min <bhmin@samsung.com> */ 252 251 .atag_offset = 0x100, 253 252 .init_irq = s5pc100_init_irq, 253 + .handle_irq = vic_handle_irq, 254 254 .map_io = smdkc100_map_io, 255 255 .init_machine = smdkc100_machine_init, 256 256 .timer = &s3c24xx_timer,
-37
arch/arm/mach-s5pv210/include/mach/entry-macro.S
··· 10 10 * published by the Free Software Foundation. 11 11 */ 12 12 13 - #include <asm/hardware/vic.h> 14 - #include <mach/map.h> 15 - #include <plat/irqs.h> 16 - 17 13 .macro disable_fiq 18 14 .endm 19 15 20 - .macro get_irqnr_preamble, base, tmp 21 - ldr \base, =VA_VIC0 22 - .endm 23 - 24 16 .macro arch_ret_to_user, tmp1, tmp2 25 - .endm 26 - 27 - .macro get_irqnr_and_base, irqnr, irqstat, base, tmp 28 - 29 - @ check the vic0 30 - mov \irqnr, # S5P_IRQ_OFFSET + 31 31 - ldr \irqstat, [ \base, # VIC_IRQ_STATUS ] 32 - teq \irqstat, #0 33 - 34 - @ otherwise try vic1 35 - addeq \tmp, \base, #(VA_VIC1 - VA_VIC0) 36 - addeq \irqnr, \irqnr, #32 37 - ldreq \irqstat, [ \tmp, # VIC_IRQ_STATUS ] 38 - teqeq \irqstat, #0 39 - 40 - @ otherwise try vic2 41 - addeq \tmp, \base, #(VA_VIC2 - VA_VIC0) 42 - addeq \irqnr, \irqnr, #32 43 - ldreq \irqstat, [ \tmp, # VIC_IRQ_STATUS ] 44 - teqeq \irqstat, #0 45 - 46 - @ otherwise try vic3 47 - addeq \tmp, \base, #(VA_VIC3 - VA_VIC0) 48 - addeq \irqnr, \irqnr, #32 49 - ldreq \irqstat, [ \tmp, # VIC_IRQ_STATUS ] 50 - teqeq \irqstat, #0 51 - 52 - clzne \irqstat, \irqstat 53 - subne \irqnr, \irqnr, \irqstat 54 17 .endm
-22
arch/arm/mach-s5pv210/include/mach/vmalloc.h
··· 1 - /* linux/arch/arm/mach-s5p6442/include/mach/vmalloc.h 2 - * 3 - * Copyright 2010 Ben Dooks <ben-linux@fluff.org> 4 - * 5 - * Copyright (c) 2010 Samsung Electronics Co., Ltd. 6 - * http://www.samsung.com/ 7 - * 8 - * Based on arch/arm/mach-s5p6442/include/mach/vmalloc.h 9 - * 10 - * S5PV210 vmalloc definition 11 - * 12 - * This program is free software; you can redistribute it and/or modify 13 - * it under the terms of the GNU General Public License version 2 as 14 - * published by the Free Software Foundation. 15 - */ 16 - 17 - #ifndef __ASM_ARCH_VMALLOC_H 18 - #define __ASM_ARCH_VMALLOC_H __FILE__ 19 - 20 - #define VMALLOC_END 0xF6000000UL 21 - 22 - #endif /* __ASM_ARCH_VMALLOC_H */
+2
arch/arm/mach-s5pv210/mach-aquila.c
··· 22 22 #include <linux/input.h> 23 23 #include <linux/gpio.h> 24 24 25 + #include <asm/hardware/vic.h> 25 26 #include <asm/mach/arch.h> 26 27 #include <asm/mach/map.h> 27 28 #include <asm/setup.h> ··· 681 680 Kyungmin Park <kyungmin.park@samsung.com> */ 682 681 .atag_offset = 0x100, 683 682 .init_irq = s5pv210_init_irq, 683 + .handle_irq = vic_handle_irq, 684 684 .map_io = aquila_map_io, 685 685 .init_machine = aquila_machine_init, 686 686 .timer = &s5p_timer,
+2
arch/arm/mach-s5pv210/mach-goni.c
··· 27 27 #include <linux/gpio.h> 28 28 #include <linux/interrupt.h> 29 29 30 + #include <asm/hardware/vic.h> 30 31 #include <asm/mach/arch.h> 31 32 #include <asm/mach/map.h> 32 33 #include <asm/setup.h> ··· 957 956 /* Maintainers: Kyungmin Park <kyungmin.park@samsung.com> */ 958 957 .atag_offset = 0x100, 959 958 .init_irq = s5pv210_init_irq, 959 + .handle_irq = vic_handle_irq, 960 960 .map_io = goni_map_io, 961 961 .init_machine = goni_machine_init, 962 962 .timer = &s5p_timer,
+2
arch/arm/mach-s5pv210/mach-smdkc110.c
··· 15 15 #include <linux/i2c.h> 16 16 #include <linux/sysdev.h> 17 17 18 + #include <asm/hardware/vic.h> 18 19 #include <asm/mach/arch.h> 19 20 #include <asm/mach/map.h> 20 21 #include <asm/setup.h> ··· 139 138 /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */ 140 139 .atag_offset = 0x100, 141 140 .init_irq = s5pv210_init_irq, 141 + .handle_irq = vic_handle_irq, 142 142 .map_io = smdkc110_map_io, 143 143 .init_machine = smdkc110_machine_init, 144 144 .timer = &s5p_timer,
+2
arch/arm/mach-s5pv210/mach-smdkv210.c
··· 20 20 #include <linux/delay.h> 21 21 #include <linux/pwm_backlight.h> 22 22 23 + #include <asm/hardware/vic.h> 23 24 #include <asm/mach/arch.h> 24 25 #include <asm/mach/map.h> 25 26 #include <asm/setup.h> ··· 317 316 /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */ 318 317 .atag_offset = 0x100, 319 318 .init_irq = s5pv210_init_irq, 319 + .handle_irq = vic_handle_irq, 320 320 .map_io = smdkv210_map_io, 321 321 .init_machine = smdkv210_machine_init, 322 322 .timer = &s5p_timer,
+2
arch/arm/mach-s5pv210/mach-torbreck.c
··· 14 14 #include <linux/init.h> 15 15 #include <linux/serial_core.h> 16 16 17 + #include <asm/hardware/vic.h> 17 18 #include <asm/mach/arch.h> 18 19 #include <asm/mach/map.h> 19 20 #include <asm/setup.h> ··· 128 127 /* Maintainer: Hyunchul Ko <ghcstop@gmail.com> */ 129 128 .atag_offset = 0x100, 130 129 .init_irq = s5pv210_init_irq, 130 + .handle_irq = vic_handle_irq, 131 131 .map_io = torbreck_map_io, 132 132 .init_machine = torbreck_machine_init, 133 133 .timer = &s5p_timer,
+1 -1
arch/arm/mach-sa1100/include/mach/system.h
··· 14 14 { 15 15 if (mode == 's') { 16 16 /* Jump into ROM at address 0 */ 17 - cpu_reset(0); 17 + soft_restart(0); 18 18 } else { 19 19 /* Use on-chip reset capability */ 20 20 RSRR = RSRR_SWR;
-4
arch/arm/mach-sa1100/include/mach/vmalloc.h
··· 1 - /* 2 - * arch/arm/mach-sa1100/include/mach/vmalloc.h 3 - */ 4 - #define VMALLOC_END (0xe8000000UL)
+3 -25
arch/arm/mach-sa1100/time.c
··· 12 12 #include <linux/errno.h> 13 13 #include <linux/interrupt.h> 14 14 #include <linux/irq.h> 15 - #include <linux/sched.h> /* just for sched_clock() - funny that */ 16 15 #include <linux/timex.h> 17 16 #include <linux/clockchips.h> 18 17 ··· 19 20 #include <asm/sched_clock.h> 20 21 #include <mach/hardware.h> 21 22 22 - /* 23 - * This is the SA11x0 sched_clock implementation. 24 - */ 25 - static DEFINE_CLOCK_DATA(cd); 26 - 27 - /* 28 - * Constants generated by clocks_calc_mult_shift(m, s, 3.6864MHz, 29 - * NSEC_PER_SEC, 60). 30 - * This gives a resolution of about 271ns and a wrap period of about 19min. 31 - */ 32 - #define SC_MULT 2275555556u 33 - #define SC_SHIFT 23 34 - 35 - unsigned long long notrace sched_clock(void) 23 + static u32 notrace sa1100_read_sched_clock(void) 36 24 { 37 - u32 cyc = OSCR; 38 - return cyc_to_fixed_sched_clock(&cd, cyc, (u32)~0, SC_MULT, SC_SHIFT); 39 - } 40 - 41 - static void notrace sa1100_update_sched_clock(void) 42 - { 43 - u32 cyc = OSCR; 44 - update_sched_clock(&cd, cyc, (u32)~0); 25 + return OSCR; 45 26 } 46 27 47 28 #define MIN_OSCR_DELTA 2 ··· 88 109 OIER = 0; 89 110 OSSR = OSSR_M0 | OSSR_M1 | OSSR_M2 | OSSR_M3; 90 111 91 - init_fixed_sched_clock(&cd, sa1100_update_sched_clock, 32, 92 - 3686400, SC_MULT, SC_SHIFT); 112 + setup_sched_clock(sa1100_read_sched_clock, 32, 3686400); 93 113 94 114 clockevents_calc_mult_shift(&ckevt_sa1100_osmr0, 3686400, 4); 95 115 ckevt_sa1100_osmr0.max_delta_ns =
-1
arch/arm/mach-shark/core.c
··· 29 29 void arch_reset(char mode, const char *cmd) 30 30 { 31 31 short temp; 32 - local_irq_disable(); 33 32 /* Reset the Machine via pc[3] of the sequoia chipset */ 34 33 outw(0x09,0x24); 35 34 temp=inw(0x26);
-4
arch/arm/mach-shark/include/mach/vmalloc.h
··· 1 - /* 2 - * arch/arm/mach-shark/include/mach/vmalloc.h 3 - */ 4 - #define VMALLOC_END 0xd0000000UL
-1
arch/arm/mach-shmobile/Makefile
··· 28 28 obj-$(CONFIG_ARCH_SH7367) += entry-intc.o 29 29 obj-$(CONFIG_ARCH_SH7377) += entry-intc.o 30 30 obj-$(CONFIG_ARCH_SH7372) += entry-intc.o 31 - obj-$(CONFIG_ARCH_SH73A0) += entry-gic.o 32 31 33 32 # PM objects 34 33 obj-$(CONFIG_SUSPEND) += suspend.o
+1 -3
arch/arm/mach-shmobile/board-ag5evm.c
··· 466 466 static void __init ag5evm_map_io(void) 467 467 { 468 468 iotable_init(ag5evm_io_desc, ARRAY_SIZE(ag5evm_io_desc)); 469 - /* DMA memory at 0xf6000000 - 0xffdfffff */ 470 - init_consistent_dma_size(158 << 20); 471 469 472 470 /* setup early devices and console here as well */ 473 471 sh73a0_add_early_devices(); ··· 607 609 .map_io = ag5evm_map_io, 608 610 .nr_irqs = NR_IRQS_LEGACY, 609 611 .init_irq = sh73a0_init_irq, 610 - .handle_irq = shmobile_handle_irq_gic, 612 + .handle_irq = gic_handle_irq, 611 613 .init_machine = ag5evm_init, 612 614 .timer = &ag5evm_timer, 613 615 MACHINE_END
-2
arch/arm/mach-shmobile/board-ap4evb.c
··· 1172 1172 static void __init ap4evb_map_io(void) 1173 1173 { 1174 1174 iotable_init(ap4evb_io_desc, ARRAY_SIZE(ap4evb_io_desc)); 1175 - /* DMA memory at 0xf6000000 - 0xffdfffff */ 1176 - init_consistent_dma_size(158 << 20); 1177 1175 1178 1176 /* setup early devices and console here as well */ 1179 1177 sh7372_add_early_devices();
-2
arch/arm/mach-shmobile/board-g3evm.c
··· 261 261 static void __init g3evm_map_io(void) 262 262 { 263 263 iotable_init(g3evm_io_desc, ARRAY_SIZE(g3evm_io_desc)); 264 - /* DMA memory at 0xf6000000 - 0xffdfffff */ 265 - init_consistent_dma_size(158 << 20); 266 264 267 265 /* setup early devices and console here as well */ 268 266 sh7367_add_early_devices();
-2
arch/arm/mach-shmobile/board-g4evm.c
··· 275 275 static void __init g4evm_map_io(void) 276 276 { 277 277 iotable_init(g4evm_io_desc, ARRAY_SIZE(g4evm_io_desc)); 278 - /* DMA memory at 0xf6000000 - 0xffdfffff */ 279 - init_consistent_dma_size(158 << 20); 280 278 281 279 /* setup early devices and console here as well */ 282 280 sh7377_add_early_devices();
+1 -1
arch/arm/mach-shmobile/board-kota2.c
··· 551 551 .map_io = kota2_map_io, 552 552 .nr_irqs = NR_IRQS_LEGACY, 553 553 .init_irq = sh73a0_init_irq, 554 - .handle_irq = shmobile_handle_irq_gic, 554 + .handle_irq = gic_handle_irq, 555 555 .init_machine = kota2_init, 556 556 .timer = &kota2_timer, 557 557 MACHINE_END
-2
arch/arm/mach-shmobile/board-mackerel.c
··· 1390 1390 static void __init mackerel_map_io(void) 1391 1391 { 1392 1392 iotable_init(mackerel_io_desc, ARRAY_SIZE(mackerel_io_desc)); 1393 - /* DMA memory at 0xf6000000 - 0xffdfffff */ 1394 - init_consistent_dma_size(158 << 20); 1395 1393 1396 1394 /* setup early devices and console here as well */ 1397 1395 sh7372_add_early_devices();
-18
arch/arm/mach-shmobile/entry-gic.S
··· 1 - /* 2 - * ARM Interrupt demux handler using GIC 3 - * 4 - * Copyright (C) 2010 Magnus Damm 5 - * Copyright (C) 2011 Paul Mundt 6 - * Copyright (C) 2010 - 2011 Renesas Solutions Corp. 7 - * 8 - * This file is licensed under the terms of the GNU General Public 9 - * License version 2. This program is licensed "as is" without any 10 - * warranty of any kind, whether express or implied. 11 - */ 12 - 13 - #include <asm/assembler.h> 14 - #include <asm/entry-macro-multi.S> 15 - #include <asm/hardware/gic.h> 16 - #include <asm/hardware/entry-macro-gic.S> 17 - 18 - arch_irq_handler shmobile_handle_irq_gic
-1
arch/arm/mach-shmobile/include/mach/common.h
··· 7 7 struct clk; 8 8 extern int clk_init(void); 9 9 extern void shmobile_handle_irq_intc(struct pt_regs *); 10 - extern void shmobile_handle_irq_gic(struct pt_regs *); 11 10 extern struct platform_suspend_ops shmobile_suspend_ops; 12 11 struct cpuidle_driver; 13 12 extern void (*shmobile_cpuidle_modes[])(void);
-9
arch/arm/mach-shmobile/include/mach/entry-macro.S
··· 18 18 .macro disable_fiq 19 19 .endm 20 20 21 - .macro get_irqnr_preamble, base, tmp 22 - .endm 23 - 24 - .macro get_irqnr_and_base, irqnr, irqstat, base, tmp 25 - .endm 26 - 27 - .macro test_for_ipi, irqnr, irqstat, base, tmp 28 - .endm 29 - 30 21 .macro arch_ret_to_user, tmp1, tmp2 31 22 .endm
+1 -1
arch/arm/mach-shmobile/include/mach/system.h
··· 8 8 9 9 static inline void arch_reset(char mode, const char *cmd) 10 10 { 11 - cpu_reset(0); 11 + soft_restart(0); 12 12 } 13 13 14 14 #endif
-7
arch/arm/mach-shmobile/include/mach/vmalloc.h
··· 1 - #ifndef __ASM_MACH_VMALLOC_H 2 - #define __ASM_MACH_VMALLOC_H 3 - 4 - /* Vmalloc at ... - 0xe5ffffff */ 5 - #define VMALLOC_END 0xe6000000UL 6 - 7 - #endif /* __ASM_MACH_VMALLOC_H */
-27
arch/arm/mach-spear3xx/include/mach/entry-macro.S
··· 11 11 * warranty of any kind, whether express or implied. 12 12 */ 13 13 14 - #include <asm/hardware/vic.h> 15 - #include <mach/hardware.h> 16 - 17 14 .macro disable_fiq 18 15 .endm 19 16 20 - .macro get_irqnr_preamble, base, tmp 21 - .endm 22 - 23 17 .macro arch_ret_to_user, tmp1, tmp2 24 - .endm 25 - 26 - .macro get_irqnr_and_base, irqnr, irqstat, base, tmp 27 - ldr \base, =VA_SPEAR3XX_ML1_VIC_BASE 28 - ldr \irqstat, [\base, #VIC_IRQ_STATUS] @ get status 29 - teq \irqstat, #0 30 - beq 1001f @ this will set/reset 31 - @ zero register 32 - /* 33 - * Following code will find bit position of least significang 34 - * bit set in irqstat, using following equation 35 - * least significant bit set in n = (n & ~(n-1)) 36 - */ 37 - sub \tmp, \irqstat, #1 @ tmp = irqstat - 1 38 - mvn \tmp, \tmp @ tmp = ~tmp 39 - and \irqstat, \irqstat, \tmp @ irqstat &= tmp 40 - /* Now, irqstat is = bit no. of 1st bit set in vic irq status */ 41 - clz \tmp, \irqstat @ tmp = leading zeros 42 - rsb \irqnr, \tmp, #0x1F @ irqnr = 32 - tmp - 1 43 - 44 - 1001: /* EQ will be set if no irqs pending */ 45 18 .endm
-19
arch/arm/mach-spear3xx/include/mach/vmalloc.h
··· 1 - /* 2 - * arch/arm/mach-spear3xx/include/mach/vmalloc.h 3 - * 4 - * Defining Vmalloc area for SPEAr3xx machine family 5 - * 6 - * Copyright (C) 2009 ST Microelectronics 7 - * Viresh Kumar<viresh.kumar@st.com> 8 - * 9 - * This file is licensed under the terms of the GNU General Public 10 - * License version 2. This program is licensed "as is" without any 11 - * warranty of any kind, whether express or implied. 12 - */ 13 - 14 - #ifndef __MACH_VMALLOC_H 15 - #define __MACH_VMALLOC_H 16 - 17 - #include <plat/vmalloc.h> 18 - 19 - #endif /* __MACH_VMALLOC_H */
+2
arch/arm/mach-spear3xx/spear300_evb.c
··· 11 11 * warranty of any kind, whether express or implied. 12 12 */ 13 13 14 + #include <asm/hardware/vic.h> 14 15 #include <asm/mach/arch.h> 15 16 #include <asm/mach-types.h> 16 17 #include <mach/generic.h> ··· 68 67 .atag_offset = 0x100, 69 68 .map_io = spear3xx_map_io, 70 69 .init_irq = spear3xx_init_irq, 70 + .handle_irq = vic_handle_irq, 71 71 .timer = &spear3xx_timer, 72 72 .init_machine = spear300_evb_init, 73 73 MACHINE_END
+2
arch/arm/mach-spear3xx/spear310_evb.c
··· 11 11 * warranty of any kind, whether express or implied. 12 12 */ 13 13 14 + #include <asm/hardware/vic.h> 14 15 #include <asm/mach/arch.h> 15 16 #include <asm/mach-types.h> 16 17 #include <mach/generic.h> ··· 74 73 .atag_offset = 0x100, 75 74 .map_io = spear3xx_map_io, 76 75 .init_irq = spear3xx_init_irq, 76 + .handle_irq = vic_handle_irq, 77 77 .timer = &spear3xx_timer, 78 78 .init_machine = spear310_evb_init, 79 79 MACHINE_END
+2
arch/arm/mach-spear3xx/spear320_evb.c
··· 11 11 * warranty of any kind, whether express or implied. 12 12 */ 13 13 14 + #include <asm/hardware/vic.h> 14 15 #include <asm/mach/arch.h> 15 16 #include <asm/mach-types.h> 16 17 #include <mach/generic.h> ··· 72 71 .atag_offset = 0x100, 73 72 .map_io = spear3xx_map_io, 74 73 .init_irq = spear3xx_init_irq, 74 + .handle_irq = vic_handle_irq, 75 75 .timer = &spear3xx_timer, 76 76 .init_machine = spear320_evb_init, 77 77 MACHINE_END
-36
arch/arm/mach-spear6xx/include/mach/entry-macro.S
··· 11 11 * warranty of any kind, whether express or implied. 12 12 */ 13 13 14 - #include <asm/hardware/vic.h> 15 - #include <mach/hardware.h> 16 - 17 14 .macro disable_fiq 18 15 .endm 19 16 20 - .macro get_irqnr_preamble, base, tmp 21 - .endm 22 - 23 17 .macro arch_ret_to_user, tmp1, tmp2 24 - .endm 25 - 26 - .macro get_irqnr_and_base, irqnr, irqstat, base, tmp 27 - ldr \base, =VA_SPEAR6XX_CPU_VIC_PRI_BASE 28 - ldr \irqstat, [\base, #VIC_IRQ_STATUS] @ get status 29 - mov \irqnr, #0 30 - teq \irqstat, #0 31 - bne 1001f 32 - ldr \base, =VA_SPEAR6XX_CPU_VIC_SEC_BASE 33 - ldr \irqstat, [\base, #VIC_IRQ_STATUS] @ get status 34 - teq \irqstat, #0 35 - beq 1002f @ this will set/reset 36 - @ zero register 37 - mov \irqnr, #32 38 - 1001: 39 - /* 40 - * Following code will find bit position of least significang 41 - * bit set in irqstat, using following equation 42 - * least significant bit set in n = (n & ~(n-1)) 43 - */ 44 - sub \tmp, \irqstat, #1 @ tmp = irqstat - 1 45 - mvn \tmp, \tmp @ tmp = ~tmp 46 - and \irqstat, \irqstat, \tmp @ irqstat &= tmp 47 - /* Now, irqstat is = bit no. of 1st bit set in vic irq status */ 48 - clz \tmp, \irqstat @ tmp = leading zeros 49 - 50 - rsb \tmp, \tmp, #0x1F @ tmp = 32 - tmp - 1 51 - add \irqnr, \irqnr, \tmp 52 - 53 - 1002: /* EQ will be set if no irqs pending */ 54 18 .endm
-19
arch/arm/mach-spear6xx/include/mach/vmalloc.h
··· 1 - /* 2 - * arch/arm/mach-spear6xx/include/mach/vmalloc.h 3 - * 4 - * Defining Vmalloc area for SPEAr6xx machine family 5 - * 6 - * Copyright (C) 2009 ST Microelectronics 7 - * Rajeev Kumar<rajeev-dlh.kumar@st.com> 8 - * 9 - * This file is licensed under the terms of the GNU General Public 10 - * License version 2. This program is licensed "as is" without any 11 - * warranty of any kind, whether express or implied. 12 - */ 13 - 14 - #ifndef __MACH_VMALLOC_H 15 - #define __MACH_VMALLOC_H 16 - 17 - #include <plat/vmalloc.h> 18 - 19 - #endif /* __MACH_VMALLOC_H */
+2
arch/arm/mach-spear6xx/spear600_evb.c
··· 11 11 * warranty of any kind, whether express or implied. 12 12 */ 13 13 14 + #include <asm/hardware/vic.h> 14 15 #include <asm/mach/arch.h> 15 16 #include <asm/mach-types.h> 16 17 #include <mach/generic.h> ··· 47 46 .atag_offset = 0x100, 48 47 .map_io = spear6xx_map_io, 49 48 .init_irq = spear6xx_init_irq, 49 + .handle_irq = vic_handle_irq, 50 50 .timer = &spear6xx_timer, 51 51 .init_machine = spear600_evb_init, 52 52 MACHINE_END
+2
arch/arm/mach-tegra/board-dt.c
··· 32 32 #include <linux/i2c.h> 33 33 #include <linux/i2c-tegra.h> 34 34 35 + #include <asm/hardware/gic.h> 35 36 #include <asm/mach-types.h> 36 37 #include <asm/mach/arch.h> 37 38 #include <asm/mach/time.h> ··· 131 130 .map_io = tegra_map_common_io, 132 131 .init_early = tegra_init_early, 133 132 .init_irq = tegra_init_irq, 133 + .handle_irq = gic_handle_irq, 134 134 .timer = &tegra_timer, 135 135 .init_machine = tegra_dt_init, 136 136 .dt_compat = tegra_dt_board_compat,
+2
arch/arm/mach-tegra/board-harmony.c
··· 31 31 #include <asm/mach-types.h> 32 32 #include <asm/mach/arch.h> 33 33 #include <asm/mach/time.h> 34 + #include <asm/hardware/gic.h> 34 35 #include <asm/setup.h> 35 36 36 37 #include <mach/tegra_wm8903_pdata.h> ··· 188 187 .map_io = tegra_map_common_io, 189 188 .init_early = tegra_init_early, 190 189 .init_irq = tegra_init_irq, 190 + .handle_irq = gic_handle_irq, 191 191 .timer = &tegra_timer, 192 192 .init_machine = tegra_harmony_init, 193 193 MACHINE_END
+2
arch/arm/mach-tegra/board-paz00.c
··· 29 29 #include <linux/gpio.h> 30 30 #include <linux/rfkill-gpio.h> 31 31 32 + #include <asm/hardware/gic.h> 32 33 #include <asm/mach-types.h> 33 34 #include <asm/mach/arch.h> 34 35 #include <asm/mach/time.h> ··· 191 190 .map_io = tegra_map_common_io, 192 191 .init_early = tegra_init_early, 193 192 .init_irq = tegra_init_irq, 193 + .handle_irq = gic_handle_irq, 194 194 .timer = &tegra_timer, 195 195 .init_machine = tegra_paz00_init, 196 196 MACHINE_END
+4
arch/arm/mach-tegra/board-seaboard.c
··· 34 34 35 35 #include <asm/mach-types.h> 36 36 #include <asm/mach/arch.h> 37 + #include <asm/hardware/gic.h> 37 38 38 39 #include "board.h" 39 40 #include "board-seaboard.h" ··· 285 284 .map_io = tegra_map_common_io, 286 285 .init_early = tegra_init_early, 287 286 .init_irq = tegra_init_irq, 287 + .handle_irq = gic_handle_irq, 288 288 .timer = &tegra_timer, 289 289 .init_machine = tegra_seaboard_init, 290 290 MACHINE_END ··· 295 293 .map_io = tegra_map_common_io, 296 294 .init_early = tegra_init_early, 297 295 .init_irq = tegra_init_irq, 296 + .handle_irq = gic_handle_irq, 298 297 .timer = &tegra_timer, 299 298 .init_machine = tegra_kaen_init, 300 299 MACHINE_END ··· 305 302 .map_io = tegra_map_common_io, 306 303 .init_early = tegra_init_early, 307 304 .init_irq = tegra_init_irq, 305 + .handle_irq = gic_handle_irq, 308 306 .timer = &tegra_timer, 309 307 .init_machine = tegra_wario_init, 310 308 MACHINE_END
+2
arch/arm/mach-tegra/board-trimslice.c
··· 26 26 #include <linux/i2c.h> 27 27 #include <linux/gpio.h> 28 28 29 + #include <asm/hardware/gic.h> 29 30 #include <asm/mach-types.h> 30 31 #include <asm/mach/arch.h> 31 32 #include <asm/setup.h> ··· 177 176 .map_io = tegra_map_common_io, 178 177 .init_early = tegra_init_early, 179 178 .init_irq = tegra_init_irq, 179 + .handle_irq = gic_handle_irq, 180 180 .timer = &tegra_timer, 181 181 .init_machine = tegra_trimslice_init, 182 182 MACHINE_END
+2 -20
arch/arm/mach-tegra/include/mach/entry-macro.S
··· 12 12 * GNU General Public License for more details. 13 13 * 14 14 */ 15 - #include <mach/iomap.h> 16 - #include <mach/io.h> 17 - 18 - #if defined(CONFIG_ARM_GIC) 19 - #define HAVE_GET_IRQNR_PREAMBLE 20 - #include <asm/hardware/entry-macro-gic.S> 21 - 22 - /* Uses the GIC interrupt controller built into the cpu */ 23 - #define ICTRL_BASE (IO_CPU_VIRT + 0x100) 24 15 25 16 .macro disable_fiq 26 17 .endm 27 18 28 - .macro get_irqnr_preamble, base, tmp 29 - movw \base, #(ICTRL_BASE & 0x0000ffff) 30 - movt \base, #((ICTRL_BASE & 0xffff0000) >> 16) 19 + .macro arch_ret_to_user, tmp1, tmp2 31 20 .endm 32 21 33 - .macro arch_ret_to_user, tmp1, tmp2 34 - .endm 35 - #else 22 + #if !defined(CONFIG_ARM_GIC) 36 23 /* legacy interrupt controller for AP16 */ 37 - .macro disable_fiq 38 - .endm 39 24 40 25 .macro get_irqnr_preamble, base, tmp 41 26 @ enable imprecise aborts ··· 29 44 mov \base, #0xf0000000 30 45 orr \base, #0x00100000 31 46 orr \base, #0x0000f000 32 - .endm 33 - 34 - .macro arch_ret_to_user, tmp1, tmp2 35 47 .endm 36 48 37 49 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
-6
arch/arm/mach-tegra/include/mach/io.h
··· 71 71 72 72 #ifndef __ASSEMBLER__ 73 73 74 - #define __arch_ioremap tegra_ioremap 75 - #define __arch_iounmap tegra_iounmap 76 - 77 - void __iomem *tegra_ioremap(unsigned long phys, size_t size, unsigned int type); 78 - void tegra_iounmap(volatile void __iomem *addr); 79 - 80 74 #define IO_ADDRESS(n) (IO_TO_VIRT(n)) 81 75 82 76 #ifdef CONFIG_TEGRA_PCI
-28
arch/arm/mach-tegra/include/mach/vmalloc.h
··· 1 - /* 2 - * arch/arm/mach-tegra/include/mach/vmalloc.h 3 - * 4 - * Copyright (C) 2010 Google, Inc. 5 - * 6 - * Author: 7 - * Colin Cross <ccross@google.com> 8 - * Erik Gilling <konkers@google.com> 9 - * 10 - * This software is licensed under the terms of the GNU General Public 11 - * License version 2, as published by the Free Software Foundation, and 12 - * may be copied, distributed, and modified under those terms. 13 - * 14 - * This program is distributed in the hope that it will be useful, 15 - * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 - * GNU General Public License for more details. 18 - * 19 - */ 20 - 21 - #ifndef __MACH_TEGRA_VMALLOC_H 22 - #define __MACH_TEGRA_VMALLOC_H 23 - 24 - #include <asm/sizes.h> 25 - 26 - #define VMALLOC_END 0xFE000000UL 27 - 28 - #endif
-21
arch/arm/mach-tegra/io.c
··· 60 60 { 61 61 iotable_init(tegra_io_desc, ARRAY_SIZE(tegra_io_desc)); 62 62 } 63 - 64 - /* 65 - * Intercept ioremap() requests for addresses in our fixed mapping regions. 66 - */ 67 - void __iomem *tegra_ioremap(unsigned long p, size_t size, unsigned int type) 68 - { 69 - void __iomem *v = IO_ADDRESS(p); 70 - if (v == NULL) 71 - v = __arm_ioremap(p, size, type); 72 - return v; 73 - } 74 - EXPORT_SYMBOL(tegra_ioremap); 75 - 76 - void tegra_iounmap(volatile void __iomem *addr) 77 - { 78 - unsigned long virt = (unsigned long)addr; 79 - 80 - if (virt >= VMALLOC_START && virt < VMALLOC_END) 81 - __iounmap(addr); 82 - } 83 - EXPORT_SYMBOL(tegra_iounmap);
+3 -21
arch/arm/mach-tegra/timer.c
··· 19 19 20 20 #include <linux/init.h> 21 21 #include <linux/err.h> 22 - #include <linux/sched.h> 23 22 #include <linux/time.h> 24 23 #include <linux/interrupt.h> 25 24 #include <linux/irq.h> ··· 105 106 .set_mode = tegra_timer_set_mode, 106 107 }; 107 108 108 - static DEFINE_CLOCK_DATA(cd); 109 - 110 - /* 111 - * Constants generated by clocks_calc_mult_shift(m, s, 1MHz, NSEC_PER_SEC, 60). 112 - * This gives a resolution of about 1us and a wrap period of about 1h11min. 113 - */ 114 - #define SC_MULT 4194304000u 115 - #define SC_SHIFT 22 116 - 117 - unsigned long long notrace sched_clock(void) 109 + static u32 notrace tegra_read_sched_clock(void) 118 110 { 119 - u32 cyc = timer_readl(TIMERUS_CNTR_1US); 120 - return cyc_to_fixed_sched_clock(&cd, cyc, (u32)~0, SC_MULT, SC_SHIFT); 121 - } 122 - 123 - static void notrace tegra_update_sched_clock(void) 124 - { 125 - u32 cyc = timer_readl(TIMERUS_CNTR_1US); 126 - update_sched_clock(&cd, cyc, (u32)~0); 111 + return timer_readl(TIMERUS_CNTR_1US); 127 112 } 128 113 129 114 /* ··· 201 218 WARN(1, "Unknown clock rate"); 202 219 } 203 220 204 - init_fixed_sched_clock(&cd, tegra_update_sched_clock, 32, 205 - 1000000, SC_MULT, SC_SHIFT); 221 + setup_sched_clock(tegra_read_sched_clock, 32, 1000000); 206 222 207 223 if (clocksource_mmio_init(timer_reg_base + TIMERUS_CNTR_1US, 208 224 "timer_us", 1000000, 300, 32, clocksource_mmio_readl_up)) {
-24
arch/arm/mach-u300/include/mach/entry-macro.S
··· 8 8 * Low-level IRQ helper macros for ST-Ericsson U300 9 9 * Author: Linus Walleij <linus.walleij@stericsson.com> 10 10 */ 11 - #include <mach/hardware.h> 12 - #include <asm/hardware/vic.h> 13 11 14 12 .macro disable_fiq 15 13 .endm 16 14 17 - .macro get_irqnr_preamble, base, tmp 18 - .endm 19 - 20 15 .macro arch_ret_to_user, tmp1, tmp2 21 - .endm 22 - 23 - .macro get_irqnr_and_base, irqnr, irqstat, base, tmp 24 - ldr \base, = U300_AHB_PER_VIRT_BASE-U300_AHB_PER_PHYS_BASE+U300_INTCON0_BASE 25 - ldr \irqstat, [\base, #VIC_IRQ_STATUS] @ get masked status 26 - mov \irqnr, #0 27 - teq \irqstat, #0 28 - bne 1002f 29 - 1001: ldr \base, = U300_AHB_PER_VIRT_BASE-U300_AHB_PER_PHYS_BASE+U300_INTCON1_BASE 30 - ldr \irqstat, [\base, #VIC_IRQ_STATUS] @ get masked status 31 - mov \irqnr, #32 32 - teq \irqstat, #0 33 - beq 1003f 34 - 1002: tst \irqstat, #1 35 - bne 1003f 36 - add \irqnr, \irqnr, #1 37 - movs \irqstat, \irqstat, lsr #1 38 - bne 1002b 39 - 1003: /* EQ will be set if no irqs pending */ 40 16 .endm
-2
arch/arm/mach-u300/include/mach/system.h
··· 27 27 case 's': 28 28 case 'h': 29 29 printk(KERN_CRIT "RESET: shutting down/rebooting system\n"); 30 - /* Disable interrupts */ 31 - local_irq_disable(); 32 30 #ifdef CONFIG_COH901327_WATCHDOG 33 31 coh901327_watchdog_reset(); 34 32 #endif
-12
arch/arm/mach-u300/include/mach/vmalloc.h
··· 1 - /* 2 - * 3 - * arch/arm/mach-u300/include/mach/vmalloc.h 4 - * 5 - * 6 - * Copyright (C) 2006-2009 ST-Ericsson AB 7 - * License terms: GNU General Public License (GPL) version 2 8 - * Virtual memory allocations 9 - * End must be above the I/O registers and on an even 2MiB boundary. 10 - * Author: Linus Walleij <linus.walleij@stericsson.com> 11 - */ 12 - #define VMALLOC_END 0xfe800000UL
+3 -12
arch/arm/mach-u300/timer.c
··· 9 9 * Author: Linus Walleij <linus.walleij@stericsson.com> 10 10 */ 11 11 #include <linux/interrupt.h> 12 - #include <linux/sched.h> 13 12 #include <linux/time.h> 14 13 #include <linux/timex.h> 15 14 #include <linux/clockchips.h> ··· 336 337 * this wraps around for now, since it is just a relative time 337 338 * stamp. (Inspired by OMAP implementation.) 338 339 */ 339 - static DEFINE_CLOCK_DATA(cd); 340 340 341 - unsigned long long notrace sched_clock(void) 341 + static u32 notrace u300_read_sched_clock(void) 342 342 { 343 - u32 cyc = readl(U300_TIMER_APP_VBASE + U300_TIMER_APP_GPT2CC); 344 - return cyc_to_sched_clock(&cd, cyc, (u32)~0); 345 - } 346 - 347 - static void notrace u300_update_sched_clock(void) 348 - { 349 - u32 cyc = readl(U300_TIMER_APP_VBASE + U300_TIMER_APP_GPT2CC); 350 - update_sched_clock(&cd, cyc, (u32)~0); 343 + return readl(U300_TIMER_APP_VBASE + U300_TIMER_APP_GPT2CC); 351 344 } 352 345 353 346 ··· 357 366 clk_enable(clk); 358 367 rate = clk_get_rate(clk); 359 368 360 - init_sched_clock(&cd, u300_update_sched_clock, 32, rate); 369 + setup_sched_clock(u300_read_sched_clock, 32, rate); 361 370 362 371 /* 363 372 * Disable the "OS" and "DD" timers - these are designed for Symbian!
+2
arch/arm/mach-u300/u300.c
··· 19 19 #include <linux/io.h> 20 20 #include <mach/hardware.h> 21 21 #include <mach/platform.h> 22 + #include <asm/hardware/vic.h> 22 23 #include <asm/mach-types.h> 23 24 #include <asm/mach/arch.h> 24 25 #include <asm/memory.h> ··· 50 49 .atag_offset = BOOT_PARAMS_OFFSET, 51 50 .map_io = u300_map_io, 52 51 .init_irq = u300_init_irq, 52 + .handle_irq = vic_handle_irq, 53 53 .timer = &u300_timer, 54 54 .init_machine = u300_init_machine, 55 55 MACHINE_END
+4
arch/arm/mach-ux500/board-mop500.c
··· 33 33 #include <linux/leds.h> 34 34 #include <asm/mach-types.h> 35 35 #include <asm/mach/arch.h> 36 + #include <asm/hardware/gic.h> 36 37 37 38 #include <plat/i2c.h> 38 39 #include <plat/ste_dma40.h> ··· 696 695 .init_irq = ux500_init_irq, 697 696 /* we re-use nomadik timer here */ 698 697 .timer = &ux500_timer, 698 + .handle_irq = gic_handle_irq, 699 699 .init_machine = mop500_init_machine, 700 700 MACHINE_END 701 701 ··· 705 703 .map_io = u8500_map_io, 706 704 .init_irq = ux500_init_irq, 707 705 .timer = &ux500_timer, 706 + .handle_irq = gic_handle_irq, 708 707 .init_machine = hrefv60_init_machine, 709 708 MACHINE_END 710 709 ··· 715 712 .init_irq = ux500_init_irq, 716 713 /* we re-use nomadik timer here */ 717 714 .timer = &ux500_timer, 715 + .handle_irq = gic_handle_irq, 718 716 .init_machine = snowball_init_machine, 719 717 MACHINE_END
+2
arch/arm/mach-ux500/board-u5500.c
··· 12 12 #include <linux/i2c.h> 13 13 #include <linux/mfd/ab5500/ab5500.h> 14 14 15 + #include <asm/hardware/gic.h> 15 16 #include <asm/mach/arch.h> 16 17 #include <asm/mach-types.h> 17 18 ··· 150 149 .map_io = u5500_map_io, 151 150 .init_irq = ux500_init_irq, 152 151 .timer = &ux500_timer, 152 + .handle_irq = gic_handle_irq, 153 153 .init_machine = u5500_init_machine, 154 154 MACHINE_END
+2 -3
arch/arm/mach-ux500/cpu-db5500.c
··· 30 30 }; 31 31 32 32 static struct map_desc u5500_io_desc[] __initdata = { 33 - __IO_DEV_DESC(U5500_GIC_CPU_BASE, SZ_4K), 33 + /* SCU base also covers GIC CPU BASE and TWD with its 4K page */ 34 + __IO_DEV_DESC(U5500_SCU_BASE, SZ_4K), 34 35 __IO_DEV_DESC(U5500_GIC_DIST_BASE, SZ_4K), 35 36 __IO_DEV_DESC(U5500_L2CC_BASE, SZ_4K), 36 - __IO_DEV_DESC(U5500_TWD_BASE, SZ_4K), 37 37 __IO_DEV_DESC(U5500_MTU0_BASE, SZ_4K), 38 - __IO_DEV_DESC(U5500_SCU_BASE, SZ_4K), 39 38 __IO_DEV_DESC(U5500_BACKUPRAM0_BASE, SZ_8K), 40 39 41 40 __IO_DEV_DESC(U5500_GPIO0_BASE, SZ_4K),
+2 -3
arch/arm/mach-ux500/cpu-db8500.c
··· 35 35 }; 36 36 37 37 static struct map_desc u8500_io_desc[] __initdata = { 38 - __IO_DEV_DESC(U8500_GIC_CPU_BASE, SZ_4K), 38 + /* SCU base also covers GIC CPU BASE and TWD with its 4K page */ 39 + __IO_DEV_DESC(U8500_SCU_BASE, SZ_4K), 39 40 __IO_DEV_DESC(U8500_GIC_DIST_BASE, SZ_4K), 40 41 __IO_DEV_DESC(U8500_L2CC_BASE, SZ_4K), 41 - __IO_DEV_DESC(U8500_TWD_BASE, SZ_4K), 42 42 __IO_DEV_DESC(U8500_MTU0_BASE, SZ_4K), 43 - __IO_DEV_DESC(U8500_SCU_BASE, SZ_4K), 44 43 __IO_DEV_DESC(U8500_BACKUPRAM0_BASE, SZ_8K), 45 44 46 45 __IO_DEV_DESC(U8500_CLKRST1_BASE, SZ_4K),
-2
arch/arm/mach-ux500/include/mach/entry-macro.S
··· 10 10 * License version 2. This program is licensed "as is" without any 11 11 * warranty of any kind, whether express or implied. 12 12 */ 13 - #include <mach/hardware.h> 14 - #include <asm/hardware/entry-macro-gic.S> 15 13 16 14 .macro disable_fiq 17 15 .endm
-18
arch/arm/mach-ux500/include/mach/vmalloc.h
··· 1 - /* 2 - * Copyright (C) 2009 ST-Ericsson 3 - * 4 - * This program is free software; you can redistribute it and/or modify 5 - * it under the terms of the GNU General Public License as published by 6 - * the Free Software Foundation; either version 2 of the License, or 7 - * (at your option) any later version. 8 - * 9 - * This program is distributed in the hope that it will be useful, 10 - * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 - * GNU General Public License for more details. 13 - * 14 - * You should have received a copy of the GNU General Public License 15 - * along with this program; if not, write to the Free Software 16 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 - */ 18 - #define VMALLOC_END 0xf0000000UL
-5
arch/arm/mach-versatile/core.c
··· 141 141 }, 142 142 #ifdef CONFIG_MACH_VERSATILE_AB 143 143 { 144 - .virtual = IO_ADDRESS(VERSATILE_GPIO0_BASE), 145 - .pfn = __phys_to_pfn(VERSATILE_GPIO0_BASE), 146 - .length = SZ_4K, 147 - .type = MT_DEVICE 148 - }, { 149 144 .virtual = IO_ADDRESS(VERSATILE_IB2_BASE), 150 145 .pfn = __phys_to_pfn(VERSATILE_IB2_BASE), 151 146 .length = SZ_64M,
-30
arch/arm/mach-versatile/include/mach/entry-macro.S
··· 7 7 * License version 2. This program is licensed "as is" without any 8 8 * warranty of any kind, whether express or implied. 9 9 */ 10 - #include <mach/hardware.h> 11 - #include <mach/platform.h> 12 - #include <asm/hardware/vic.h> 13 10 14 11 .macro disable_fiq 15 12 .endm 16 13 17 - .macro get_irqnr_preamble, base, tmp 18 - ldr \base, =IO_ADDRESS(VERSATILE_VIC_BASE) 19 - .endm 20 - 21 14 .macro arch_ret_to_user, tmp1, tmp2 22 15 .endm 23 - 24 - .macro get_irqnr_and_base, irqnr, irqstat, base, tmp 25 - ldr \irqstat, [\base, #VIC_IRQ_STATUS] @ get masked status 26 - mov \irqnr, #0 27 - teq \irqstat, #0 28 - beq 1003f 29 - 30 - 1001: tst \irqstat, #15 31 - bne 1002f 32 - add \irqnr, \irqnr, #4 33 - movs \irqstat, \irqstat, lsr #4 34 - bne 1001b 35 - 1002: tst \irqstat, #1 36 - bne 1003f 37 - add \irqnr, \irqnr, #1 38 - movs \irqstat, \irqstat, lsr #1 39 - bne 1002b 40 - 1003: /* EQ will be set if no irqs pending */ 41 - 42 - @ clz \irqnr, \irqstat 43 - @1003: /* EQ will be set if we reach MAXIRQNUM */ 44 - .endm 45 -
-21
arch/arm/mach-versatile/include/mach/vmalloc.h
··· 1 - /* 2 - * arch/arm/mach-versatile/include/mach/vmalloc.h 3 - * 4 - * Copyright (C) 2003 ARM Limited 5 - * Copyright (C) 2000 Russell King. 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 as published by 9 - * the Free Software Foundation; either version 2 of the License, or 10 - * (at your option) any later version. 11 - * 12 - * This program is distributed in the hope that it will be useful, 13 - * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 - * GNU General Public License for more details. 16 - * 17 - * You should have received a copy of the GNU General Public License 18 - * along with this program; if not, write to the Free Software 19 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 - */ 21 - #define VMALLOC_END 0xd8000000UL
+2
arch/arm/mach-versatile/versatile_ab.c
··· 27 27 28 28 #include <mach/hardware.h> 29 29 #include <asm/irq.h> 30 + #include <asm/hardware/vic.h> 30 31 #include <asm/mach-types.h> 31 32 32 33 #include <asm/mach/arch.h> ··· 40 39 .map_io = versatile_map_io, 41 40 .init_early = versatile_init_early, 42 41 .init_irq = versatile_init_irq, 42 + .handle_irq = vic_handle_irq, 43 43 .timer = &versatile_timer, 44 44 .init_machine = versatile_init, 45 45 MACHINE_END
+2
arch/arm/mach-versatile/versatile_dt.c
··· 24 24 #include <linux/init.h> 25 25 #include <linux/of_irq.h> 26 26 #include <linux/of_platform.h> 27 + #include <asm/hardware/vic.h> 27 28 #include <asm/mach-types.h> 28 29 #include <asm/mach/arch.h> 29 30 ··· 46 45 .map_io = versatile_map_io, 47 46 .init_early = versatile_init_early, 48 47 .init_irq = versatile_init_irq, 48 + .handle_irq = vic_handle_irq, 49 49 .timer = &versatile_timer, 50 50 .init_machine = versatile_dt_init, 51 51 .dt_compat = versatile_dt_match,
+2
arch/arm/mach-versatile/versatile_pb.c
··· 28 28 #include <linux/io.h> 29 29 30 30 #include <mach/hardware.h> 31 + #include <asm/hardware/vic.h> 31 32 #include <asm/irq.h> 32 33 #include <asm/mach-types.h> 33 34 ··· 108 107 .map_io = versatile_map_io, 109 108 .init_early = versatile_init_early, 110 109 .init_irq = versatile_init_irq, 110 + .handle_irq = vic_handle_irq, 111 111 .timer = &versatile_timer, 112 112 .init_machine = versatile_pb_init, 113 113 MACHINE_END
+2
arch/arm/mach-vexpress/Kconfig
··· 8 8 select ARM_ERRATA_720789 9 9 select ARM_ERRATA_751472 10 10 select ARM_ERRATA_753970 11 + select HAVE_SMP 12 + select MIGHT_HAVE_CACHE_L2X0 11 13 12 14 endmenu
-2
arch/arm/mach-vexpress/include/mach/entry-macro.S
··· 1 - #include <asm/hardware/entry-macro-gic.S> 2 - 3 1 .macro disable_fiq 4 2 .endm 5 3
-21
arch/arm/mach-vexpress/include/mach/vmalloc.h
··· 1 - /* 2 - * arch/arm/mach-vexpress/include/mach/vmalloc.h 3 - * 4 - * Copyright (C) 2003 ARM Limited 5 - * Copyright (C) 2000 Russell King. 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 as published by 9 - * the Free Software Foundation; either version 2 of the License, or 10 - * (at your option) any later version. 11 - * 12 - * This program is distributed in the hope that it will be useful, 13 - * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 - * GNU General Public License for more details. 16 - * 17 - * You should have received a copy of the GNU General Public License 18 - * along with this program; if not, write to the Free Software 19 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 - */ 21 - #define VMALLOC_END 0xf8000000UL
+2
arch/arm/mach-vexpress/v2m.c
··· 23 23 #include <asm/hardware/arm_timer.h> 24 24 #include <asm/hardware/timer-sp.h> 25 25 #include <asm/hardware/sp810.h> 26 + #include <asm/hardware/gic.h> 26 27 27 28 #include <mach/ct-ca9x4.h> 28 29 #include <mach/motherboard.h> ··· 449 448 .init_early = v2m_init_early, 450 449 .init_irq = v2m_init_irq, 451 450 .timer = &v2m_timer, 451 + .handle_irq = gic_handle_irq, 452 452 .init_machine = v2m_init, 453 453 MACHINE_END
-20
arch/arm/mach-vt8500/include/mach/vmalloc.h
··· 1 - /* 2 - * arch/arm/mach-vt8500/include/mach/vmalloc.h 3 - * 4 - * Copyright (C) 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 as published by 8 - * the Free Software Foundation; either version 2 of the License, or 9 - * (at your option) any later version. 10 - * 11 - * This program is distributed in the hope that it will be useful, 12 - * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 - * GNU General Public License for more details. 15 - * 16 - * You should have received a copy of the GNU General Public License 17 - * along with this program; if not, write to the Free Software 18 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 - */ 20 - #define VMALLOC_END 0xd0000000UL
+1 -1
arch/arm/mach-w90x900/include/mach/system.h
··· 33 33 { 34 34 if (mode == 's') { 35 35 /* Jump into ROM at address 0 */ 36 - cpu_reset(0); 36 + soft_restart(0); 37 37 } else { 38 38 __raw_writel(WTE | WTRE | WTCLK, WTCR); 39 39 }
-23
arch/arm/mach-w90x900/include/mach/vmalloc.h
··· 1 - /* 2 - * arch/arm/mach-w90x900/include/mach/vmalloc.h 3 - * 4 - * Copyright (c) 2008 Nuvoton technology corporation 5 - * All rights reserved. 6 - * 7 - * Wan ZongShun <mcuos.com@gmail.com> 8 - * 9 - * Based on arch/arm/mach-s3c2410/include/mach/vmalloc.h 10 - * 11 - * This program is free software; you can redistribute it and/or modify 12 - * it under the terms of the GNU General Public License as published by 13 - * the Free Software Foundation; either version 2 of the License, or 14 - * (at your option) any later version. 15 - * 16 - */ 17 - 18 - #ifndef __ASM_ARCH_VMALLOC_H 19 - #define __ASM_ARCH_VMALLOC_H 20 - 21 - #define VMALLOC_END (0xe0000000UL) 22 - 23 - #endif /* __ASM_ARCH_VMALLOC_H */
+2
arch/arm/mach-w90x900/irq.c
··· 28 28 #include <mach/hardware.h> 29 29 #include <mach/regs-irq.h> 30 30 31 + #include "nuc9xx.h" 32 + 31 33 struct group_irq { 32 34 unsigned long gpen; 33 35 unsigned int enabled;
+1 -8
arch/arm/mach-w90x900/nuc910.h
··· 12 12 * published by the Free Software Foundation. 13 13 * 14 14 */ 15 - 16 - struct map_desc; 17 - struct sys_timer; 18 - 19 - /* core initialisation functions */ 20 - 21 - extern void nuc900_init_irq(void); 22 - extern struct sys_timer nuc900_timer; 15 + #include "nuc9xx.h" 23 16 24 17 /* extern file from nuc910.c */ 25 18
+1 -8
arch/arm/mach-w90x900/nuc950.h
··· 12 12 * published by the Free Software Foundation. 13 13 * 14 14 */ 15 - 16 - struct map_desc; 17 - struct sys_timer; 18 - 19 - /* core initialisation functions */ 20 - 21 - extern void nuc900_init_irq(void); 22 - extern struct sys_timer nuc900_timer; 15 + #include "nuc9xx.h" 23 16 24 17 /* extern file from nuc950.c */ 25 18
+1 -8
arch/arm/mach-w90x900/nuc960.h
··· 12 12 * published by the Free Software Foundation. 13 13 * 14 14 */ 15 - 16 - struct map_desc; 17 - struct sys_timer; 18 - 19 - /* core initialisation functions */ 20 - 21 - extern void nuc900_init_irq(void); 22 - extern struct sys_timer nuc900_timer; 15 + #include "nuc9xx.h" 23 16 24 17 /* extern file from nuc960.c */ 25 18
+23
arch/arm/mach-w90x900/nuc9xx.h
··· 1 + /* 2 + * arch/arm/mach-w90x900/nuc9xx.h 3 + * 4 + * Copied from nuc910.h, which had: 5 + * 6 + * Copyright (c) 2008 Nuvoton corporation 7 + * 8 + * Header file for NUC900 CPU support 9 + * 10 + * Wan ZongShun <mcuos.com@gmail.com> 11 + * 12 + * This program is free software; you can redistribute it and/or modify 13 + * it under the terms of the GNU General Public License version 2 as 14 + * published by the Free Software Foundation. 15 + * 16 + */ 17 + struct map_desc; 18 + struct sys_timer; 19 + 20 + /* core initialisation functions */ 21 + 22 + extern void nuc900_init_irq(void); 23 + extern struct sys_timer nuc900_timer;
+2
arch/arm/mach-w90x900/time.c
··· 33 33 #include <mach/map.h> 34 34 #include <mach/regs-timer.h> 35 35 36 + #include "nuc9xx.h" 37 + 36 38 #define RESETINT 0x1f 37 39 #define PERIOD (0x01 << 27) 38 40 #define ONESHOT (0x00 << 27)
+1
arch/arm/mach-zynq/common.c
··· 112 112 MACHINE_START(XILINX_EP107, "Xilinx Zynq Platform") 113 113 .map_io = xilinx_map_io, 114 114 .init_irq = xilinx_irq_init, 115 + .handle_irq = gic_handle_irq, 115 116 .init_machine = xilinx_init_machine, 116 117 .timer = &xttcpss_sys_timer, 117 118 .dt_compat = xilinx_dt_match,
-3
arch/arm/mach-zynq/include/mach/entry-macro.S
··· 20 20 * GNU General Public License for more details. 21 21 */ 22 22 23 - #include <mach/hardware.h> 24 - #include <asm/hardware/entry-macro-gic.S> 25 - 26 23 .macro disable_fiq 27 24 .endm 28 25
-20
arch/arm/mach-zynq/include/mach/vmalloc.h
··· 1 - /* arch/arm/mach-zynq/include/mach/vmalloc.h 2 - * 3 - * Copyright (C) 2011 Xilinx 4 - * 5 - * This software is licensed under the terms of the GNU General Public 6 - * License version 2, as published by the Free Software Foundation, and 7 - * may be copied, distributed, and modified under those terms. 8 - * 9 - * This program is distributed in the hope that it will be useful, 10 - * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 - * GNU General Public License for more details. 13 - */ 14 - 15 - #ifndef __MACH_VMALLOC_H__ 16 - #define __MACH_VMALLOC_H__ 17 - 18 - #define VMALLOC_END 0xE0000000UL 19 - 20 - #endif
+33 -7
arch/arm/mm/Kconfig
··· 629 629 630 630 comment "Processor Features" 631 631 632 + config ARM_LPAE 633 + bool "Support for the Large Physical Address Extension" 634 + depends on MMU && CPU_V7 635 + help 636 + Say Y if you have an ARMv7 processor supporting the LPAE page 637 + table format and you would like to access memory beyond the 638 + 4GB limit. The resulting kernel image will not run on 639 + processors without the LPA extension. 640 + 641 + If unsure, say N. 642 + 643 + config ARCH_PHYS_ADDR_T_64BIT 644 + def_bool ARM_LPAE 645 + 646 + config ARCH_DMA_ADDR_T_64BIT 647 + bool 648 + 632 649 config ARM_THUMB 633 650 bool "Support Thumb user binaries" 634 651 depends on CPU_ARM720T || CPU_ARM740T || CPU_ARM920T || CPU_ARM922T || CPU_ARM925T || CPU_ARM926T || CPU_ARM940T || CPU_ARM946E || CPU_ARM1020 || CPU_ARM1020E || CPU_ARM1022 || CPU_ARM1026 || CPU_XSCALE || CPU_XSC3 || CPU_MOHAWK || CPU_V6 || CPU_V6K || CPU_V7 || CPU_FEROCEON ··· 833 816 Say Y here to use the Feroceon L2 cache in writethrough mode. 834 817 Unless you specifically require this, say N for writeback mode. 835 818 819 + config MIGHT_HAVE_CACHE_L2X0 820 + bool 821 + help 822 + This option should be selected by machines which have a L2x0 823 + or PL310 cache controller, but where its use is optional. 824 + 825 + The only effect of this option is to make CACHE_L2X0 and 826 + related options available to the user for configuration. 827 + 828 + Boards or SoCs which always require the cache controller 829 + support to be present should select CACHE_L2X0 directly 830 + instead of this option, thus preventing the user from 831 + inadvertently configuring a broken kernel. 832 + 836 833 config CACHE_L2X0 837 - bool "Enable the L2x0 outer cache controller" 838 - depends on REALVIEW_EB_ARM11MP || MACH_REALVIEW_PB11MP || MACH_REALVIEW_PB1176 || \ 839 - REALVIEW_EB_A9MP || ARCH_IMX_V6_V7 || MACH_REALVIEW_PBX || \ 840 - ARCH_NOMADIK || ARCH_OMAP4 || ARCH_EXYNOS4 || ARCH_TEGRA || \ 841 - ARCH_U8500 || ARCH_VEXPRESS_CA9X4 || ARCH_SHMOBILE || \ 842 - ARCH_PRIMA2 || ARCH_ZYNQ || ARCH_CNS3XXX || ARCH_HIGHBANK 843 - default y 834 + bool "Enable the L2x0 outer cache controller" if MIGHT_HAVE_CACHE_L2X0 835 + default MIGHT_HAVE_CACHE_L2X0 844 836 select OUTER_CACHE 845 837 select OUTER_CACHE_SYNC 846 838 help
+1 -1
arch/arm/mm/alignment.c
··· 968 968 ai_usermode = safe_usermode(ai_usermode, false); 969 969 } 970 970 971 - hook_fault_code(1, do_alignment, SIGBUS, BUS_ADRALN, 971 + hook_fault_code(FAULT_CODE_ALIGNMENT, do_alignment, SIGBUS, BUS_ADRALN, 972 972 "alignment exception"); 973 973 974 974 /*
+17 -2
arch/arm/mm/context.c
··· 22 22 DEFINE_PER_CPU(struct mm_struct *, current_mm); 23 23 #endif 24 24 25 + #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)); \ 34 + } 35 + #else 36 + #define cpu_set_asid(asid) \ 37 + asm(" mcr p15, 0, %0, c13, c0, 1\n" : : "r" (asid)) 38 + #endif 39 + 25 40 /* 26 41 * We fork()ed a process, and we need a new context for the child 27 42 * to run in. We reserve version 0 for initial tasks so we will ··· 52 37 static void flush_context(void) 53 38 { 54 39 /* set the reserved ASID before flushing the TLB */ 55 - asm("mcr p15, 0, %0, c13, c0, 1\n" : : "r" (0)); 40 + cpu_set_asid(0); 56 41 isb(); 57 42 local_flush_tlb_all(); 58 43 if (icache_is_vivt_asid_tagged()) { ··· 114 99 set_mm_context(mm, asid); 115 100 116 101 /* set the new ASID */ 117 - asm("mcr p15, 0, %0, c13, c0, 1\n" : : "r" (mm->context.id)); 102 + cpu_set_asid(mm->context.id); 118 103 isb(); 119 104 } 120 105
+19 -92
arch/arm/mm/fault.c
··· 27 27 28 28 #include "fault.h" 29 29 30 - /* 31 - * Fault status register encodings. We steal bit 31 for our own purposes. 32 - */ 33 - #define FSR_LNX_PF (1 << 31) 34 - #define FSR_WRITE (1 << 11) 35 - #define FSR_FS4 (1 << 10) 36 - #define FSR_FS3_0 (15) 37 - 38 - static inline int fsr_fs(unsigned int fsr) 39 - { 40 - return (fsr & FSR_FS3_0) | (fsr & FSR_FS4) >> 6; 41 - } 42 - 43 30 #ifdef CONFIG_MMU 44 31 45 32 #ifdef CONFIG_KPROBES ··· 110 123 111 124 pte = pte_offset_map(pmd, addr); 112 125 printk(", *pte=%08llx", (long long)pte_val(*pte)); 126 + #ifndef CONFIG_ARM_LPAE 113 127 printk(", *ppte=%08llx", 114 128 (long long)pte_val(pte[PTE_HWTABLE_PTRS])); 129 + #endif 115 130 pte_unmap(pte); 116 131 } while(0); 117 132 ··· 450 461 pmd = pmd_offset(pud, addr); 451 462 pmd_k = pmd_offset(pud_k, addr); 452 463 464 + #ifdef CONFIG_ARM_LPAE 465 + /* 466 + * Only one hardware entry per PMD with LPAE. 467 + */ 468 + index = 0; 469 + #else 453 470 /* 454 471 * On ARM one Linux PGD entry contains two hardware entries (see page 455 472 * tables layout in pgtable.h). We normally guarantee that we always ··· 465 470 * for the first of pair. 466 471 */ 467 472 index = (addr >> SECTION_SHIFT) & 1; 473 + #endif 468 474 if (pmd_none(pmd_k[index])) 469 475 goto bad_area; 470 476 ··· 505 509 return 1; 506 510 } 507 511 508 - static struct fsr_info { 512 + struct fsr_info { 509 513 int (*fn)(unsigned long addr, unsigned int fsr, struct pt_regs *regs); 510 514 int sig; 511 515 int code; 512 516 const char *name; 513 - } fsr_info[] = { 514 - /* 515 - * The following are the standard ARMv3 and ARMv4 aborts. ARMv5 516 - * defines these to be "precise" aborts. 517 - */ 518 - { do_bad, SIGSEGV, 0, "vector exception" }, 519 - { do_bad, SIGBUS, BUS_ADRALN, "alignment exception" }, 520 - { do_bad, SIGKILL, 0, "terminal exception" }, 521 - { do_bad, SIGBUS, BUS_ADRALN, "alignment exception" }, 522 - { do_bad, SIGBUS, 0, "external abort on linefetch" }, 523 - { do_translation_fault, SIGSEGV, SEGV_MAPERR, "section translation fault" }, 524 - { do_bad, SIGBUS, 0, "external abort on linefetch" }, 525 - { do_page_fault, SIGSEGV, SEGV_MAPERR, "page translation fault" }, 526 - { do_bad, SIGBUS, 0, "external abort on non-linefetch" }, 527 - { do_bad, SIGSEGV, SEGV_ACCERR, "section domain fault" }, 528 - { do_bad, SIGBUS, 0, "external abort on non-linefetch" }, 529 - { do_bad, SIGSEGV, SEGV_ACCERR, "page domain fault" }, 530 - { do_bad, SIGBUS, 0, "external abort on translation" }, 531 - { do_sect_fault, SIGSEGV, SEGV_ACCERR, "section permission fault" }, 532 - { do_bad, SIGBUS, 0, "external abort on translation" }, 533 - { do_page_fault, SIGSEGV, SEGV_ACCERR, "page permission fault" }, 534 - /* 535 - * The following are "imprecise" aborts, which are signalled by bit 536 - * 10 of the FSR, and may not be recoverable. These are only 537 - * supported if the CPU abort handler supports bit 10. 538 - */ 539 - { do_bad, SIGBUS, 0, "unknown 16" }, 540 - { do_bad, SIGBUS, 0, "unknown 17" }, 541 - { do_bad, SIGBUS, 0, "unknown 18" }, 542 - { do_bad, SIGBUS, 0, "unknown 19" }, 543 - { do_bad, SIGBUS, 0, "lock abort" }, /* xscale */ 544 - { do_bad, SIGBUS, 0, "unknown 21" }, 545 - { do_bad, SIGBUS, BUS_OBJERR, "imprecise external abort" }, /* xscale */ 546 - { do_bad, SIGBUS, 0, "unknown 23" }, 547 - { do_bad, SIGBUS, 0, "dcache parity error" }, /* xscale */ 548 - { do_bad, SIGBUS, 0, "unknown 25" }, 549 - { do_bad, SIGBUS, 0, "unknown 26" }, 550 - { do_bad, SIGBUS, 0, "unknown 27" }, 551 - { do_bad, SIGBUS, 0, "unknown 28" }, 552 - { do_bad, SIGBUS, 0, "unknown 29" }, 553 - { do_bad, SIGBUS, 0, "unknown 30" }, 554 - { do_bad, SIGBUS, 0, "unknown 31" } 555 517 }; 518 + 519 + /* FSR definition */ 520 + #ifdef CONFIG_ARM_LPAE 521 + #include "fsr-3level.c" 522 + #else 523 + #include "fsr-2level.c" 524 + #endif 556 525 557 526 void __init 558 527 hook_fault_code(int nr, int (*fn)(unsigned long, unsigned int, struct pt_regs *), ··· 554 593 arm_notify_die("", regs, &info, fsr, 0); 555 594 } 556 595 557 - 558 - static struct fsr_info ifsr_info[] = { 559 - { do_bad, SIGBUS, 0, "unknown 0" }, 560 - { do_bad, SIGBUS, 0, "unknown 1" }, 561 - { do_bad, SIGBUS, 0, "debug event" }, 562 - { do_bad, SIGSEGV, SEGV_ACCERR, "section access flag fault" }, 563 - { do_bad, SIGBUS, 0, "unknown 4" }, 564 - { do_translation_fault, SIGSEGV, SEGV_MAPERR, "section translation fault" }, 565 - { do_bad, SIGSEGV, SEGV_ACCERR, "page access flag fault" }, 566 - { do_page_fault, SIGSEGV, SEGV_MAPERR, "page translation fault" }, 567 - { do_bad, SIGBUS, 0, "external abort on non-linefetch" }, 568 - { do_bad, SIGSEGV, SEGV_ACCERR, "section domain fault" }, 569 - { do_bad, SIGBUS, 0, "unknown 10" }, 570 - { do_bad, SIGSEGV, SEGV_ACCERR, "page domain fault" }, 571 - { do_bad, SIGBUS, 0, "external abort on translation" }, 572 - { do_sect_fault, SIGSEGV, SEGV_ACCERR, "section permission fault" }, 573 - { do_bad, SIGBUS, 0, "external abort on translation" }, 574 - { do_page_fault, SIGSEGV, SEGV_ACCERR, "page permission fault" }, 575 - { do_bad, SIGBUS, 0, "unknown 16" }, 576 - { do_bad, SIGBUS, 0, "unknown 17" }, 577 - { do_bad, SIGBUS, 0, "unknown 18" }, 578 - { do_bad, SIGBUS, 0, "unknown 19" }, 579 - { do_bad, SIGBUS, 0, "unknown 20" }, 580 - { do_bad, SIGBUS, 0, "unknown 21" }, 581 - { do_bad, SIGBUS, 0, "unknown 22" }, 582 - { do_bad, SIGBUS, 0, "unknown 23" }, 583 - { do_bad, SIGBUS, 0, "unknown 24" }, 584 - { do_bad, SIGBUS, 0, "unknown 25" }, 585 - { do_bad, SIGBUS, 0, "unknown 26" }, 586 - { do_bad, SIGBUS, 0, "unknown 27" }, 587 - { do_bad, SIGBUS, 0, "unknown 28" }, 588 - { do_bad, SIGBUS, 0, "unknown 29" }, 589 - { do_bad, SIGBUS, 0, "unknown 30" }, 590 - { do_bad, SIGBUS, 0, "unknown 31" }, 591 - }; 592 - 593 596 void __init 594 597 hook_ifault_code(int nr, int (*fn)(unsigned long, unsigned int, struct pt_regs *), 595 598 int sig, int code, const char *name) ··· 586 661 arm_notify_die("", regs, &info, ifsr, 0); 587 662 } 588 663 664 + #ifndef CONFIG_ARM_LPAE 589 665 static int __init exceptions_init(void) 590 666 { 591 667 if (cpu_architecture() >= CPU_ARCH_ARMv6) { ··· 609 683 } 610 684 611 685 arch_initcall(exceptions_init); 686 + #endif
+26 -1
arch/arm/mm/fault.h
··· 1 - void do_bad_area(unsigned long addr, unsigned int fsr, struct pt_regs *regs); 1 + #ifndef __ARCH_ARM_FAULT_H 2 + #define __ARCH_ARM_FAULT_H 2 3 4 + /* 5 + * Fault status register encodings. We steal bit 31 for our own purposes. 6 + */ 7 + #define FSR_LNX_PF (1 << 31) 8 + #define FSR_WRITE (1 << 11) 9 + #define FSR_FS4 (1 << 10) 10 + #define FSR_FS3_0 (15) 11 + #define FSR_FS5_0 (0x3f) 12 + 13 + #ifdef CONFIG_ARM_LPAE 14 + static inline int fsr_fs(unsigned int fsr) 15 + { 16 + return fsr & FSR_FS5_0; 17 + } 18 + #else 19 + static inline int fsr_fs(unsigned int fsr) 20 + { 21 + return (fsr & FSR_FS3_0) | (fsr & FSR_FS4) >> 6; 22 + } 23 + #endif 24 + 25 + void do_bad_area(unsigned long addr, unsigned int fsr, struct pt_regs *regs); 3 26 unsigned long search_exception_table(unsigned long addr); 27 + 28 + #endif /* __ARCH_ARM_FAULT_H */
+78
arch/arm/mm/fsr-2level.c
··· 1 + static struct fsr_info fsr_info[] = { 2 + /* 3 + * The following are the standard ARMv3 and ARMv4 aborts. ARMv5 4 + * defines these to be "precise" aborts. 5 + */ 6 + { do_bad, SIGSEGV, 0, "vector exception" }, 7 + { do_bad, SIGBUS, BUS_ADRALN, "alignment exception" }, 8 + { do_bad, SIGKILL, 0, "terminal exception" }, 9 + { do_bad, SIGBUS, BUS_ADRALN, "alignment exception" }, 10 + { do_bad, SIGBUS, 0, "external abort on linefetch" }, 11 + { do_translation_fault, SIGSEGV, SEGV_MAPERR, "section translation fault" }, 12 + { do_bad, SIGBUS, 0, "external abort on linefetch" }, 13 + { do_page_fault, SIGSEGV, SEGV_MAPERR, "page translation fault" }, 14 + { do_bad, SIGBUS, 0, "external abort on non-linefetch" }, 15 + { do_bad, SIGSEGV, SEGV_ACCERR, "section domain fault" }, 16 + { do_bad, SIGBUS, 0, "external abort on non-linefetch" }, 17 + { do_bad, SIGSEGV, SEGV_ACCERR, "page domain fault" }, 18 + { do_bad, SIGBUS, 0, "external abort on translation" }, 19 + { do_sect_fault, SIGSEGV, SEGV_ACCERR, "section permission fault" }, 20 + { do_bad, SIGBUS, 0, "external abort on translation" }, 21 + { do_page_fault, SIGSEGV, SEGV_ACCERR, "page permission fault" }, 22 + /* 23 + * The following are "imprecise" aborts, which are signalled by bit 24 + * 10 of the FSR, and may not be recoverable. These are only 25 + * supported if the CPU abort handler supports bit 10. 26 + */ 27 + { do_bad, SIGBUS, 0, "unknown 16" }, 28 + { do_bad, SIGBUS, 0, "unknown 17" }, 29 + { do_bad, SIGBUS, 0, "unknown 18" }, 30 + { do_bad, SIGBUS, 0, "unknown 19" }, 31 + { do_bad, SIGBUS, 0, "lock abort" }, /* xscale */ 32 + { do_bad, SIGBUS, 0, "unknown 21" }, 33 + { do_bad, SIGBUS, BUS_OBJERR, "imprecise external abort" }, /* xscale */ 34 + { do_bad, SIGBUS, 0, "unknown 23" }, 35 + { do_bad, SIGBUS, 0, "dcache parity error" }, /* xscale */ 36 + { do_bad, SIGBUS, 0, "unknown 25" }, 37 + { do_bad, SIGBUS, 0, "unknown 26" }, 38 + { do_bad, SIGBUS, 0, "unknown 27" }, 39 + { do_bad, SIGBUS, 0, "unknown 28" }, 40 + { do_bad, SIGBUS, 0, "unknown 29" }, 41 + { do_bad, SIGBUS, 0, "unknown 30" }, 42 + { do_bad, SIGBUS, 0, "unknown 31" }, 43 + }; 44 + 45 + static struct fsr_info ifsr_info[] = { 46 + { do_bad, SIGBUS, 0, "unknown 0" }, 47 + { do_bad, SIGBUS, 0, "unknown 1" }, 48 + { do_bad, SIGBUS, 0, "debug event" }, 49 + { do_bad, SIGSEGV, SEGV_ACCERR, "section access flag fault" }, 50 + { do_bad, SIGBUS, 0, "unknown 4" }, 51 + { do_translation_fault, SIGSEGV, SEGV_MAPERR, "section translation fault" }, 52 + { do_bad, SIGSEGV, SEGV_ACCERR, "page access flag fault" }, 53 + { do_page_fault, SIGSEGV, SEGV_MAPERR, "page translation fault" }, 54 + { do_bad, SIGBUS, 0, "external abort on non-linefetch" }, 55 + { do_bad, SIGSEGV, SEGV_ACCERR, "section domain fault" }, 56 + { do_bad, SIGBUS, 0, "unknown 10" }, 57 + { do_bad, SIGSEGV, SEGV_ACCERR, "page domain fault" }, 58 + { do_bad, SIGBUS, 0, "external abort on translation" }, 59 + { do_sect_fault, SIGSEGV, SEGV_ACCERR, "section permission fault" }, 60 + { do_bad, SIGBUS, 0, "external abort on translation" }, 61 + { do_page_fault, SIGSEGV, SEGV_ACCERR, "page permission fault" }, 62 + { do_bad, SIGBUS, 0, "unknown 16" }, 63 + { do_bad, SIGBUS, 0, "unknown 17" }, 64 + { do_bad, SIGBUS, 0, "unknown 18" }, 65 + { do_bad, SIGBUS, 0, "unknown 19" }, 66 + { do_bad, SIGBUS, 0, "unknown 20" }, 67 + { do_bad, SIGBUS, 0, "unknown 21" }, 68 + { do_bad, SIGBUS, 0, "unknown 22" }, 69 + { do_bad, SIGBUS, 0, "unknown 23" }, 70 + { do_bad, SIGBUS, 0, "unknown 24" }, 71 + { do_bad, SIGBUS, 0, "unknown 25" }, 72 + { do_bad, SIGBUS, 0, "unknown 26" }, 73 + { do_bad, SIGBUS, 0, "unknown 27" }, 74 + { do_bad, SIGBUS, 0, "unknown 28" }, 75 + { do_bad, SIGBUS, 0, "unknown 29" }, 76 + { do_bad, SIGBUS, 0, "unknown 30" }, 77 + { do_bad, SIGBUS, 0, "unknown 31" }, 78 + };
+68
arch/arm/mm/fsr-3level.c
··· 1 + static struct fsr_info fsr_info[] = { 2 + { do_bad, SIGBUS, 0, "unknown 0" }, 3 + { do_bad, SIGBUS, 0, "unknown 1" }, 4 + { do_bad, SIGBUS, 0, "unknown 2" }, 5 + { do_bad, SIGBUS, 0, "unknown 3" }, 6 + { do_bad, SIGBUS, 0, "reserved translation fault" }, 7 + { do_translation_fault, SIGSEGV, SEGV_MAPERR, "level 1 translation fault" }, 8 + { do_translation_fault, SIGSEGV, SEGV_MAPERR, "level 2 translation fault" }, 9 + { do_page_fault, SIGSEGV, SEGV_MAPERR, "level 3 translation fault" }, 10 + { do_bad, SIGBUS, 0, "reserved access flag fault" }, 11 + { do_bad, SIGSEGV, SEGV_ACCERR, "level 1 access flag fault" }, 12 + { do_bad, SIGSEGV, SEGV_ACCERR, "level 2 access flag fault" }, 13 + { do_page_fault, SIGSEGV, SEGV_ACCERR, "level 3 access flag fault" }, 14 + { do_bad, SIGBUS, 0, "reserved permission fault" }, 15 + { do_bad, SIGSEGV, SEGV_ACCERR, "level 1 permission fault" }, 16 + { do_sect_fault, SIGSEGV, SEGV_ACCERR, "level 2 permission fault" }, 17 + { do_page_fault, SIGSEGV, SEGV_ACCERR, "level 3 permission fault" }, 18 + { do_bad, SIGBUS, 0, "synchronous external abort" }, 19 + { do_bad, SIGBUS, 0, "asynchronous external abort" }, 20 + { do_bad, SIGBUS, 0, "unknown 18" }, 21 + { do_bad, SIGBUS, 0, "unknown 19" }, 22 + { do_bad, SIGBUS, 0, "synchronous abort (translation table walk)" }, 23 + { do_bad, SIGBUS, 0, "synchronous abort (translation table walk)" }, 24 + { do_bad, SIGBUS, 0, "synchronous abort (translation table walk)" }, 25 + { do_bad, SIGBUS, 0, "synchronous abort (translation table walk)" }, 26 + { do_bad, SIGBUS, 0, "synchronous parity error" }, 27 + { do_bad, SIGBUS, 0, "asynchronous parity error" }, 28 + { do_bad, SIGBUS, 0, "unknown 26" }, 29 + { do_bad, SIGBUS, 0, "unknown 27" }, 30 + { do_bad, SIGBUS, 0, "synchronous parity error (translation table walk" }, 31 + { do_bad, SIGBUS, 0, "synchronous parity error (translation table walk" }, 32 + { do_bad, SIGBUS, 0, "synchronous parity error (translation table walk" }, 33 + { do_bad, SIGBUS, 0, "synchronous parity error (translation table walk" }, 34 + { do_bad, SIGBUS, 0, "unknown 32" }, 35 + { do_bad, SIGBUS, BUS_ADRALN, "alignment fault" }, 36 + { do_bad, SIGBUS, 0, "debug event" }, 37 + { do_bad, SIGBUS, 0, "unknown 35" }, 38 + { do_bad, SIGBUS, 0, "unknown 36" }, 39 + { do_bad, SIGBUS, 0, "unknown 37" }, 40 + { do_bad, SIGBUS, 0, "unknown 38" }, 41 + { do_bad, SIGBUS, 0, "unknown 39" }, 42 + { do_bad, SIGBUS, 0, "unknown 40" }, 43 + { do_bad, SIGBUS, 0, "unknown 41" }, 44 + { do_bad, SIGBUS, 0, "unknown 42" }, 45 + { do_bad, SIGBUS, 0, "unknown 43" }, 46 + { do_bad, SIGBUS, 0, "unknown 44" }, 47 + { do_bad, SIGBUS, 0, "unknown 45" }, 48 + { do_bad, SIGBUS, 0, "unknown 46" }, 49 + { do_bad, SIGBUS, 0, "unknown 47" }, 50 + { do_bad, SIGBUS, 0, "unknown 48" }, 51 + { do_bad, SIGBUS, 0, "unknown 49" }, 52 + { do_bad, SIGBUS, 0, "unknown 50" }, 53 + { do_bad, SIGBUS, 0, "unknown 51" }, 54 + { do_bad, SIGBUS, 0, "implementation fault (lockdown abort)" }, 55 + { do_bad, SIGBUS, 0, "unknown 53" }, 56 + { do_bad, SIGBUS, 0, "unknown 54" }, 57 + { do_bad, SIGBUS, 0, "unknown 55" }, 58 + { do_bad, SIGBUS, 0, "unknown 56" }, 59 + { do_bad, SIGBUS, 0, "unknown 57" }, 60 + { do_bad, SIGBUS, 0, "implementation fault (coprocessor abort)" }, 61 + { do_bad, SIGBUS, 0, "unknown 59" }, 62 + { do_bad, SIGBUS, 0, "unknown 60" }, 63 + { do_bad, SIGBUS, 0, "unknown 61" }, 64 + { do_bad, SIGBUS, 0, "unknown 62" }, 65 + { do_bad, SIGBUS, 0, "unknown 63" }, 66 + }; 67 + 68 + #define ifsr_info fsr_info
+62 -39
arch/arm/mm/idmap.c
··· 1 1 #include <linux/kernel.h> 2 2 3 3 #include <asm/cputype.h> 4 + #include <asm/idmap.h> 4 5 #include <asm/pgalloc.h> 5 6 #include <asm/pgtable.h> 7 + #include <asm/sections.h> 6 8 9 + pgd_t *idmap_pgd; 10 + 11 + #ifdef CONFIG_ARM_LPAE 12 + static void idmap_add_pmd(pud_t *pud, unsigned long addr, unsigned long end, 13 + unsigned long prot) 14 + { 15 + pmd_t *pmd; 16 + unsigned long next; 17 + 18 + if (pud_none_or_clear_bad(pud) || (pud_val(*pud) & L_PGD_SWAPPER)) { 19 + pmd = pmd_alloc_one(&init_mm, addr); 20 + if (!pmd) { 21 + pr_warning("Failed to allocate identity pmd.\n"); 22 + return; 23 + } 24 + pud_populate(&init_mm, pud, pmd); 25 + pmd += pmd_index(addr); 26 + } else 27 + pmd = pmd_offset(pud, addr); 28 + 29 + do { 30 + next = pmd_addr_end(addr, end); 31 + *pmd = __pmd((addr & PMD_MASK) | prot); 32 + flush_pmd_entry(pmd); 33 + } while (pmd++, addr = next, addr != end); 34 + } 35 + #else /* !CONFIG_ARM_LPAE */ 7 36 static void idmap_add_pmd(pud_t *pud, unsigned long addr, unsigned long end, 8 37 unsigned long prot) 9 38 { ··· 44 15 pmd[1] = __pmd(addr); 45 16 flush_pmd_entry(pmd); 46 17 } 18 + #endif /* CONFIG_ARM_LPAE */ 47 19 48 20 static void idmap_add_pud(pgd_t *pgd, unsigned long addr, unsigned long end, 49 21 unsigned long prot) ··· 58 28 } while (pud++, addr = next, addr != end); 59 29 } 60 30 61 - void identity_mapping_add(pgd_t *pgd, unsigned long addr, unsigned long end) 31 + static void identity_mapping_add(pgd_t *pgd, unsigned long addr, unsigned long end) 62 32 { 63 33 unsigned long prot, next; 64 34 65 - prot = PMD_TYPE_SECT | PMD_SECT_AP_WRITE; 35 + prot = PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_SECT_AF; 66 36 if (cpu_architecture() <= CPU_ARCH_ARMv5TEJ && !cpu_is_xscale()) 67 37 prot |= PMD_BIT4; 68 38 ··· 73 43 } while (pgd++, addr = next, addr != end); 74 44 } 75 45 76 - #ifdef CONFIG_SMP 77 - static void idmap_del_pmd(pud_t *pud, unsigned long addr, unsigned long end) 46 + extern char __idmap_text_start[], __idmap_text_end[]; 47 + 48 + static int __init init_static_idmap(void) 78 49 { 79 - pmd_t *pmd = pmd_offset(pud, addr); 80 - pmd_clear(pmd); 50 + phys_addr_t idmap_start, idmap_end; 51 + 52 + idmap_pgd = pgd_alloc(&init_mm); 53 + if (!idmap_pgd) 54 + return -ENOMEM; 55 + 56 + /* Add an identity mapping for the physical address of the section. */ 57 + idmap_start = virt_to_phys((void *)__idmap_text_start); 58 + idmap_end = virt_to_phys((void *)__idmap_text_end); 59 + 60 + pr_info("Setting up static identity map for 0x%llx - 0x%llx\n", 61 + (long long)idmap_start, (long long)idmap_end); 62 + identity_mapping_add(idmap_pgd, idmap_start, idmap_end); 63 + 64 + return 0; 81 65 } 82 - 83 - static void idmap_del_pud(pgd_t *pgd, unsigned long addr, unsigned long end) 84 - { 85 - pud_t *pud = pud_offset(pgd, addr); 86 - unsigned long next; 87 - 88 - do { 89 - next = pud_addr_end(addr, end); 90 - idmap_del_pmd(pud, addr, next); 91 - } while (pud++, addr = next, addr != end); 92 - } 93 - 94 - void identity_mapping_del(pgd_t *pgd, unsigned long addr, unsigned long end) 95 - { 96 - unsigned long next; 97 - 98 - pgd += pgd_index(addr); 99 - do { 100 - next = pgd_addr_end(addr, end); 101 - idmap_del_pud(pgd, addr, next); 102 - } while (pgd++, addr = next, addr != end); 103 - } 104 - #endif 66 + early_initcall(init_static_idmap); 105 67 106 68 /* 107 - * In order to soft-boot, we need to insert a 1:1 mapping in place of 108 - * the user-mode pages. This will then ensure that we have predictable 109 - * results when turning the mmu off 69 + * In order to soft-boot, we need to switch to a 1:1 mapping for the 70 + * cpu_reset functions. This will then ensure that we have predictable 71 + * results when turning off the mmu. 110 72 */ 111 - void setup_mm_for_reboot(char mode) 73 + void setup_mm_for_reboot(void) 112 74 { 113 - /* 114 - * We need to access to user-mode page tables here. For kernel threads 115 - * we don't have any user-mode mappings so we use the context that we 116 - * "borrowed". 117 - */ 118 - identity_mapping_add(current->active_mm->pgd, 0, TASK_SIZE); 75 + /* Clean and invalidate L1. */ 76 + flush_cache_all(); 77 + 78 + /* Switch to the identity mapping. */ 79 + cpu_switch_mm(idmap_pgd, &init_mm); 80 + 81 + /* Flush the TLB. */ 119 82 local_flush_tlb_all(); 120 83 }
+8 -32
arch/arm/mm/init.c
··· 20 20 #include <linux/highmem.h> 21 21 #include <linux/gfp.h> 22 22 #include <linux/memblock.h> 23 - #include <linux/sort.h> 24 23 25 24 #include <asm/mach-types.h> 26 25 #include <asm/prom.h> ··· 133 134 } 134 135 135 136 static void __init find_limits(unsigned long *min, unsigned long *max_low, 136 - unsigned long *max_high) 137 + unsigned long *max_high) 137 138 { 138 139 struct meminfo *mi = &meminfo; 139 140 int i; 140 141 141 - *min = -1UL; 142 - *max_low = *max_high = 0; 143 - 144 - for_each_bank (i, mi) { 145 - struct membank *bank = &mi->bank[i]; 146 - unsigned long start, end; 147 - 148 - start = bank_pfn_start(bank); 149 - end = bank_pfn_end(bank); 150 - 151 - if (*min > start) 152 - *min = start; 153 - if (*max_high < end) 154 - *max_high = end; 155 - if (bank->highmem) 156 - continue; 157 - if (*max_low < end) 158 - *max_low = end; 159 - } 142 + /* This assumes the meminfo array is properly sorted */ 143 + *min = bank_pfn_start(&mi->bank[0]); 144 + for_each_bank (i, mi) 145 + if (mi->bank[i].highmem) 146 + break; 147 + *max_low = bank_pfn_end(&mi->bank[i - 1]); 148 + *max_high = bank_pfn_end(&mi->bank[mi->nr_banks - 1]); 160 149 } 161 150 162 151 static void __init arm_bootmem_init(unsigned long start_pfn, ··· 306 319 } 307 320 #endif 308 321 309 - static int __init meminfo_cmp(const void *_a, const void *_b) 310 - { 311 - const struct membank *a = _a, *b = _b; 312 - long cmp = bank_pfn_start(a) - bank_pfn_start(b); 313 - return cmp < 0 ? -1 : cmp > 0 ? 1 : 0; 314 - } 315 - 316 322 void __init arm_memblock_init(struct meminfo *mi, struct machine_desc *mdesc) 317 323 { 318 324 int i; 319 - 320 - sort(&meminfo.bank, meminfo.nr_banks, sizeof(meminfo.bank[0]), meminfo_cmp, NULL); 321 325 322 326 memblock_init(); 323 327 for (i = 0; i < mi->nr_banks; i++) ··· 380 402 * for memmap_init_zone(), otherwise all PFNs are invalid. 381 403 */ 382 404 arm_bootmem_free(min, max_low, max_high); 383 - 384 - high_memory = __va(((phys_addr_t)max_low << PAGE_SHIFT) - 1) + 1; 385 405 386 406 /* 387 407 * This doesn't seem to be used by the Linux memory manager any
+75 -44
arch/arm/mm/ioremap.c
··· 36 36 #include <asm/mach/map.h> 37 37 #include "mm.h" 38 38 39 - /* 40 - * Used by ioremap() and iounmap() code to mark (super)section-mapped 41 - * I/O regions in vm_struct->flags field. 42 - */ 43 - #define VM_ARM_SECTION_MAPPING 0x80000000 44 - 45 39 int ioremap_page(unsigned long virt, unsigned long phys, 46 40 const struct mem_type *mtype) 47 41 { ··· 58 64 } while (seq != init_mm.context.kvm_seq); 59 65 } 60 66 61 - #ifndef CONFIG_SMP 67 + #if !defined(CONFIG_SMP) && !defined(CONFIG_ARM_LPAE) 62 68 /* 63 69 * Section support is unsafe on SMP - If you iounmap and ioremap a region, 64 70 * the other CPUs will not see this change until their next context switch. ··· 73 79 { 74 80 unsigned long addr = virt, end = virt + (size & ~(SZ_1M - 1)); 75 81 pgd_t *pgd; 82 + pud_t *pud; 83 + pmd_t *pmdp; 76 84 77 85 flush_cache_vunmap(addr, end); 78 86 pgd = pgd_offset_k(addr); 87 + pud = pud_offset(pgd, addr); 88 + pmdp = pmd_offset(pud, addr); 79 89 do { 80 - pmd_t pmd, *pmdp = pmd_offset(pgd, addr); 90 + pmd_t pmd = *pmdp; 81 91 82 - pmd = *pmdp; 83 92 if (!pmd_none(pmd)) { 84 93 /* 85 94 * Clear the PMD from the page table, and ··· 101 104 pte_free_kernel(&init_mm, pmd_page_vaddr(pmd)); 102 105 } 103 106 104 - addr += PGDIR_SIZE; 105 - pgd++; 107 + addr += PMD_SIZE; 108 + pmdp += 2; 106 109 } while (addr < end); 107 110 108 111 /* ··· 121 124 { 122 125 unsigned long addr = virt, end = virt + size; 123 126 pgd_t *pgd; 127 + pud_t *pud; 128 + pmd_t *pmd; 124 129 125 130 /* 126 131 * Remove and free any PTE-based mapping, and ··· 131 132 unmap_area_sections(virt, size); 132 133 133 134 pgd = pgd_offset_k(addr); 135 + pud = pud_offset(pgd, addr); 136 + pmd = pmd_offset(pud, addr); 134 137 do { 135 - pmd_t *pmd = pmd_offset(pgd, addr); 136 - 137 138 pmd[0] = __pmd(__pfn_to_phys(pfn) | type->prot_sect); 138 139 pfn += SZ_1M >> PAGE_SHIFT; 139 140 pmd[1] = __pmd(__pfn_to_phys(pfn) | type->prot_sect); 140 141 pfn += SZ_1M >> PAGE_SHIFT; 141 142 flush_pmd_entry(pmd); 142 143 143 - addr += PGDIR_SIZE; 144 - pgd++; 144 + addr += PMD_SIZE; 145 + pmd += 2; 145 146 } while (addr < end); 146 147 147 148 return 0; ··· 153 154 { 154 155 unsigned long addr = virt, end = virt + size; 155 156 pgd_t *pgd; 157 + pud_t *pud; 158 + pmd_t *pmd; 156 159 157 160 /* 158 161 * Remove and free any PTE-based mapping, and ··· 163 162 unmap_area_sections(virt, size); 164 163 165 164 pgd = pgd_offset_k(virt); 165 + pud = pud_offset(pgd, addr); 166 + pmd = pmd_offset(pud, addr); 166 167 do { 167 168 unsigned long super_pmd_val, i; 168 169 ··· 173 170 super_pmd_val |= ((pfn >> (32 - PAGE_SHIFT)) & 0xf) << 20; 174 171 175 172 for (i = 0; i < 8; i++) { 176 - pmd_t *pmd = pmd_offset(pgd, addr); 177 - 178 173 pmd[0] = __pmd(super_pmd_val); 179 174 pmd[1] = __pmd(super_pmd_val); 180 175 flush_pmd_entry(pmd); 181 176 182 - addr += PGDIR_SIZE; 183 - pgd++; 177 + addr += PMD_SIZE; 178 + pmd += 2; 184 179 } 185 180 186 181 pfn += SUPERSECTION_SIZE >> PAGE_SHIFT; ··· 196 195 unsigned long addr; 197 196 struct vm_struct * area; 198 197 198 + #ifndef CONFIG_ARM_LPAE 199 199 /* 200 200 * High mappings must be supersection aligned 201 201 */ 202 202 if (pfn >= 0x100000 && (__pfn_to_phys(pfn) & ~SUPERSECTION_MASK)) 203 203 return NULL; 204 - 205 - /* 206 - * Don't allow RAM to be mapped - this causes problems with ARMv6+ 207 - */ 208 - if (WARN_ON(pfn_valid(pfn))) 209 - return NULL; 204 + #endif 210 205 211 206 type = get_mem_type(mtype); 212 207 if (!type) ··· 213 216 */ 214 217 size = PAGE_ALIGN(offset + size); 215 218 219 + /* 220 + * Try to reuse one of the static mapping whenever possible. 221 + */ 222 + read_lock(&vmlist_lock); 223 + for (area = vmlist; area; area = area->next) { 224 + if (!size || (sizeof(phys_addr_t) == 4 && pfn >= 0x100000)) 225 + break; 226 + if (!(area->flags & VM_ARM_STATIC_MAPPING)) 227 + continue; 228 + if ((area->flags & VM_ARM_MTYPE_MASK) != VM_ARM_MTYPE(mtype)) 229 + continue; 230 + if (__phys_to_pfn(area->phys_addr) > pfn || 231 + __pfn_to_phys(pfn) + size-1 > area->phys_addr + area->size-1) 232 + continue; 233 + /* we can drop the lock here as we know *area is static */ 234 + read_unlock(&vmlist_lock); 235 + addr = (unsigned long)area->addr; 236 + addr += __pfn_to_phys(pfn) - area->phys_addr; 237 + return (void __iomem *) (offset + addr); 238 + } 239 + read_unlock(&vmlist_lock); 240 + 241 + /* 242 + * Don't allow RAM to be mapped - this causes problems with ARMv6+ 243 + */ 244 + if (WARN_ON(pfn_valid(pfn))) 245 + return NULL; 246 + 216 247 area = get_vm_area_caller(size, VM_IOREMAP, caller); 217 248 if (!area) 218 249 return NULL; 219 250 addr = (unsigned long)area->addr; 220 251 221 - #ifndef CONFIG_SMP 252 + #if !defined(CONFIG_SMP) && !defined(CONFIG_ARM_LPAE) 222 253 if (DOMAIN_IO == 0 && 223 254 (((cpu_architecture() >= CPU_ARCH_ARMv6) && (get_cr() & CR_XP)) || 224 255 cpu_is_xsc3()) && pfn >= 0x100000 && ··· 338 313 void __iounmap(volatile void __iomem *io_addr) 339 314 { 340 315 void *addr = (void *)(PAGE_MASK & (unsigned long)io_addr); 341 - #ifndef CONFIG_SMP 342 - struct vm_struct **p, *tmp; 316 + struct vm_struct *vm; 343 317 344 - /* 345 - * If this is a section based mapping we need to handle it 346 - * specially as the VM subsystem does not know how to handle 347 - * such a beast. We need the lock here b/c we need to clear 348 - * all the mappings before the area can be reclaimed 349 - * by someone else. 350 - */ 351 - write_lock(&vmlist_lock); 352 - for (p = &vmlist ; (tmp = *p) ; p = &tmp->next) { 353 - if ((tmp->flags & VM_IOREMAP) && (tmp->addr == addr)) { 354 - if (tmp->flags & VM_ARM_SECTION_MAPPING) { 355 - unmap_area_sections((unsigned long)tmp->addr, 356 - tmp->size); 357 - } 318 + read_lock(&vmlist_lock); 319 + for (vm = vmlist; vm; vm = vm->next) { 320 + if (vm->addr > addr) 321 + break; 322 + if (!(vm->flags & VM_IOREMAP)) 323 + continue; 324 + /* If this is a static mapping we must leave it alone */ 325 + if ((vm->flags & VM_ARM_STATIC_MAPPING) && 326 + (vm->addr <= addr) && (vm->addr + vm->size > addr)) { 327 + read_unlock(&vmlist_lock); 328 + return; 329 + } 330 + #if !defined(CONFIG_SMP) && !defined(CONFIG_ARM_LPAE) 331 + /* 332 + * If this is a section based mapping we need to handle it 333 + * specially as the VM subsystem does not know how to handle 334 + * such a beast. 335 + */ 336 + if ((vm->addr == addr) && 337 + (vm->flags & VM_ARM_SECTION_MAPPING)) { 338 + unmap_area_sections((unsigned long)vm->addr, vm->size); 358 339 break; 359 340 } 360 - } 361 - write_unlock(&vmlist_lock); 362 341 #endif 342 + } 343 + read_unlock(&vmlist_lock); 363 344 364 345 vunmap(addr); 365 346 }
+14
arch/arm/mm/mm.h
··· 21 21 22 22 extern void __flush_dcache_page(struct address_space *mapping, struct page *page); 23 23 24 + /* 25 + * ARM specific vm_struct->flags bits. 26 + */ 27 + 28 + /* (super)section-mapped I/O regions used by ioremap()/iounmap() */ 29 + #define VM_ARM_SECTION_MAPPING 0x80000000 30 + 31 + /* permanent static mappings from iotable_init() */ 32 + #define VM_ARM_STATIC_MAPPING 0x40000000 33 + 34 + /* mapping type (attributes) for permanent static mappings */ 35 + #define VM_ARM_MTYPE(mt) ((mt) << 20) 36 + #define VM_ARM_MTYPE_MASK (0x1f << 20) 37 + 24 38 #endif 25 39 26 40 #ifdef CONFIG_ZONE_DMA
+82 -15
arch/arm/mm/mmu.c
··· 15 15 #include <linux/nodemask.h> 16 16 #include <linux/memblock.h> 17 17 #include <linux/fs.h> 18 + #include <linux/vmalloc.h> 18 19 19 20 #include <asm/cputype.h> 20 21 #include <asm/sections.h> ··· 151 150 } 152 151 early_param("nowb", early_nowrite); 153 152 153 + #ifndef CONFIG_ARM_LPAE 154 154 static int __init early_ecc(char *p) 155 155 { 156 156 if (memcmp(p, "on", 2) == 0) ··· 161 159 return 0; 162 160 } 163 161 early_param("ecc", early_ecc); 162 + #endif 164 163 165 164 static int __init noalign_setup(char *__unused) 166 165 { ··· 231 228 .prot_sect = PMD_TYPE_SECT | PMD_SECT_XN, 232 229 .domain = DOMAIN_KERNEL, 233 230 }, 231 + #ifndef CONFIG_ARM_LPAE 234 232 [MT_MINICLEAN] = { 235 233 .prot_sect = PMD_TYPE_SECT | PMD_SECT_XN | PMD_SECT_MINICACHE, 236 234 .domain = DOMAIN_KERNEL, 237 235 }, 236 + #endif 238 237 [MT_LOW_VECTORS] = { 239 238 .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | 240 239 L_PTE_RDONLY, ··· 434 429 * ARMv6 and above have extended page tables. 435 430 */ 436 431 if (cpu_arch >= CPU_ARCH_ARMv6 && (cr & CR_XP)) { 432 + #ifndef CONFIG_ARM_LPAE 437 433 /* 438 434 * Mark cache clean areas and XIP ROM read only 439 435 * from SVC mode and no access from userspace. ··· 442 436 mem_types[MT_ROM].prot_sect |= PMD_SECT_APX|PMD_SECT_AP_WRITE; 443 437 mem_types[MT_MINICLEAN].prot_sect |= PMD_SECT_APX|PMD_SECT_AP_WRITE; 444 438 mem_types[MT_CACHECLEAN].prot_sect |= PMD_SECT_APX|PMD_SECT_AP_WRITE; 439 + #endif 445 440 446 441 if (is_smp()) { 447 442 /* ··· 480 473 } else { 481 474 mem_types[MT_MEMORY_NONCACHED].prot_sect |= PMD_SECT_BUFFERABLE; 482 475 } 476 + 477 + #ifdef CONFIG_ARM_LPAE 478 + /* 479 + * Do not generate access flag faults for the kernel mappings. 480 + */ 481 + for (i = 0; i < ARRAY_SIZE(mem_types); i++) { 482 + mem_types[i].prot_pte |= PTE_EXT_AF; 483 + mem_types[i].prot_sect |= PMD_SECT_AF; 484 + } 485 + kern_pgprot |= PTE_EXT_AF; 486 + vecs_pgprot |= PTE_EXT_AF; 487 + #endif 483 488 484 489 for (i = 0; i < 16; i++) { 485 490 unsigned long v = pgprot_val(protection_map[i]); ··· 548 529 549 530 #define vectors_base() (vectors_high() ? 0xffff0000 : 0) 550 531 551 - static void __init *early_alloc(unsigned long sz) 532 + static void __init *early_alloc_aligned(unsigned long sz, unsigned long align) 552 533 { 553 - void *ptr = __va(memblock_alloc(sz, sz)); 534 + void *ptr = __va(memblock_alloc(sz, align)); 554 535 memset(ptr, 0, sz); 555 536 return ptr; 537 + } 538 + 539 + static void __init *early_alloc(unsigned long sz) 540 + { 541 + return early_alloc_aligned(sz, sz); 556 542 } 557 543 558 544 static pte_t * __init early_pte_alloc(pmd_t *pmd, unsigned long addr, unsigned long prot) ··· 596 572 if (((addr | end | phys) & ~SECTION_MASK) == 0) { 597 573 pmd_t *p = pmd; 598 574 575 + #ifndef CONFIG_ARM_LPAE 599 576 if (addr & SECTION_SIZE) 600 577 pmd++; 578 + #endif 601 579 602 580 do { 603 581 *pmd = __pmd(phys | type->prot_sect); ··· 629 603 } while (pud++, addr = next, addr != end); 630 604 } 631 605 606 + #ifndef CONFIG_ARM_LPAE 632 607 static void __init create_36bit_mapping(struct map_desc *md, 633 608 const struct mem_type *type) 634 609 { ··· 689 662 pgd += SUPERSECTION_SIZE >> PGDIR_SHIFT; 690 663 } while (addr != end); 691 664 } 665 + #endif /* !CONFIG_ARM_LPAE */ 692 666 693 667 /* 694 668 * Create the page directory entries and any necessary ··· 713 685 } 714 686 715 687 if ((md->type == MT_DEVICE || md->type == MT_ROM) && 716 - md->virtual >= PAGE_OFFSET && md->virtual < VMALLOC_END) { 688 + md->virtual >= PAGE_OFFSET && 689 + (md->virtual < VMALLOC_START || md->virtual >= VMALLOC_END)) { 717 690 printk(KERN_WARNING "BUG: mapping for 0x%08llx" 718 - " at 0x%08lx overlaps vmalloc space\n", 691 + " at 0x%08lx out of vmalloc space\n", 719 692 (long long)__pfn_to_phys((u64)md->pfn), md->virtual); 720 693 } 721 694 722 695 type = &mem_types[md->type]; 723 696 697 + #ifndef CONFIG_ARM_LPAE 724 698 /* 725 699 * Catch 36-bit addresses 726 700 */ ··· 730 700 create_36bit_mapping(md, type); 731 701 return; 732 702 } 703 + #endif 733 704 734 705 addr = md->virtual & PAGE_MASK; 735 706 phys = __pfn_to_phys(md->pfn); ··· 760 729 */ 761 730 void __init iotable_init(struct map_desc *io_desc, int nr) 762 731 { 763 - int i; 732 + struct map_desc *md; 733 + struct vm_struct *vm; 764 734 765 - for (i = 0; i < nr; i++) 766 - create_mapping(io_desc + i); 735 + if (!nr) 736 + return; 737 + 738 + vm = early_alloc_aligned(sizeof(*vm) * nr, __alignof__(*vm)); 739 + 740 + for (md = io_desc; nr; md++, nr--) { 741 + create_mapping(md); 742 + vm->addr = (void *)(md->virtual & PAGE_MASK); 743 + vm->size = PAGE_ALIGN(md->length + (md->virtual & ~PAGE_MASK)); 744 + vm->phys_addr = __pfn_to_phys(md->pfn); 745 + vm->flags = VM_IOREMAP | VM_ARM_STATIC_MAPPING; 746 + vm->flags |= VM_ARM_MTYPE(md->type); 747 + vm->caller = iotable_init; 748 + vm_area_add_early(vm++); 749 + } 767 750 } 768 751 769 - static void * __initdata vmalloc_min = (void *)(VMALLOC_END - SZ_128M); 752 + static void * __initdata vmalloc_min = 753 + (void *)(VMALLOC_END - (240 << 20) - VMALLOC_OFFSET); 770 754 771 755 /* 772 756 * vmalloc=size forces the vmalloc area to be exactly 'size' 773 757 * bytes. This can be used to increase (or decrease) the vmalloc 774 - * area - the default is 128m. 758 + * area - the default is 240m. 775 759 */ 776 760 static int __init early_vmalloc(char *arg) 777 761 { ··· 821 775 struct membank *bank = &meminfo.bank[j]; 822 776 *bank = meminfo.bank[i]; 823 777 778 + if (bank->start > ULONG_MAX) 779 + highmem = 1; 780 + 824 781 #ifdef CONFIG_HIGHMEM 825 782 if (__va(bank->start) >= vmalloc_min || 826 783 __va(bank->start) < (void *)PAGE_OFFSET) ··· 835 786 * Split those memory banks which are partially overlapping 836 787 * the vmalloc area greatly simplifying things later. 837 788 */ 838 - if (__va(bank->start) < vmalloc_min && 789 + if (!highmem && __va(bank->start) < vmalloc_min && 839 790 bank->size > vmalloc_min - __va(bank->start)) { 840 791 if (meminfo.nr_banks >= NR_BANKS) { 841 792 printk(KERN_CRIT "NR_BANKS too low, " ··· 854 805 } 855 806 #else 856 807 bank->highmem = highmem; 808 + 809 + /* 810 + * Highmem banks not allowed with !CONFIG_HIGHMEM. 811 + */ 812 + if (highmem) { 813 + printk(KERN_NOTICE "Ignoring RAM at %.8llx-%.8llx " 814 + "(!CONFIG_HIGHMEM).\n", 815 + (unsigned long long)bank->start, 816 + (unsigned long long)bank->start + bank->size - 1); 817 + continue; 818 + } 857 819 858 820 /* 859 821 * Check whether this memory bank would entirely overlap ··· 920 860 } 921 861 #endif 922 862 meminfo.nr_banks = j; 863 + high_memory = __va(lowmem_limit - 1) + 1; 923 864 memblock_set_current_limit(lowmem_limit); 924 865 } 925 866 ··· 951 890 952 891 /* 953 892 * Clear out all the kernel space mappings, except for the first 954 - * memory bank, up to the end of the vmalloc region. 893 + * memory bank, up to the vmalloc region. 955 894 */ 956 895 for (addr = __phys_to_virt(end); 957 - addr < VMALLOC_END; addr += PMD_SIZE) 896 + addr < VMALLOC_START; addr += PMD_SIZE) 958 897 pmd_clear(pmd_off_k(addr)); 959 898 } 960 899 900 + #ifdef CONFIG_ARM_LPAE 901 + /* the first page is reserved for pgd */ 902 + #define SWAPPER_PG_DIR_SIZE (PAGE_SIZE + \ 903 + PTRS_PER_PGD * PTRS_PER_PMD * sizeof(pmd_t)) 904 + #else 961 905 #define SWAPPER_PG_DIR_SIZE (PTRS_PER_PGD * sizeof(pgd_t)) 906 + #endif 962 907 963 908 /* 964 909 * Reserve the special regions of memory ··· 987 920 } 988 921 989 922 /* 990 - * Set up device the mappings. Since we clear out the page tables for all 991 - * mappings above VMALLOC_END, we will remove any debug device mappings. 923 + * Set up the device mappings. Since we clear out the page tables for all 924 + * mappings above VMALLOC_START, we will remove any debug device mappings. 992 925 * This means you have to be careful how you debug this function, or any 993 926 * called function. This means you can't use any function or debugging 994 927 * method which may touch any device, otherwise the kernel _will_ crash. ··· 1003 936 */ 1004 937 vectors_page = early_alloc(PAGE_SIZE); 1005 938 1006 - for (addr = VMALLOC_END; addr; addr += PMD_SIZE) 939 + for (addr = VMALLOC_START; addr; addr += PMD_SIZE) 1007 940 pmd_clear(pmd_off_k(addr)); 1008 941 1009 942 /*
+3 -1
arch/arm/mm/nommu.c
··· 29 29 30 30 void __init sanity_check_meminfo(void) 31 31 { 32 + phys_addr_t end = bank_phys_end(&meminfo.bank[meminfo.nr_banks - 1]); 33 + high_memory = __va(end - 1) + 1; 32 34 } 33 35 34 36 /* ··· 45 43 /* 46 44 * We don't need to do anything here for nommu machines. 47 45 */ 48 - void setup_mm_for_reboot(char mode) 46 + void setup_mm_for_reboot(void) 49 47 { 50 48 } 51 49
+47 -4
arch/arm/mm/pgd.c
··· 10 10 #include <linux/mm.h> 11 11 #include <linux/gfp.h> 12 12 #include <linux/highmem.h> 13 + #include <linux/slab.h> 13 14 14 15 #include <asm/pgalloc.h> 15 16 #include <asm/page.h> 16 17 #include <asm/tlbflush.h> 17 18 18 19 #include "mm.h" 20 + 21 + #ifdef CONFIG_ARM_LPAE 22 + #define __pgd_alloc() kmalloc(PTRS_PER_PGD * sizeof(pgd_t), GFP_KERNEL) 23 + #define __pgd_free(pgd) kfree(pgd) 24 + #else 25 + #define __pgd_alloc() (pgd_t *)__get_free_pages(GFP_KERNEL, 2) 26 + #define __pgd_free(pgd) free_pages((unsigned long)pgd, 2) 27 + #endif 19 28 20 29 /* 21 30 * need to get a 16k page for level 1 ··· 36 27 pmd_t *new_pmd, *init_pmd; 37 28 pte_t *new_pte, *init_pte; 38 29 39 - new_pgd = (pgd_t *)__get_free_pages(GFP_KERNEL, 2); 30 + new_pgd = __pgd_alloc(); 40 31 if (!new_pgd) 41 32 goto no_pgd; 42 33 ··· 51 42 52 43 clean_dcache_area(new_pgd, PTRS_PER_PGD * sizeof(pgd_t)); 53 44 45 + #ifdef CONFIG_ARM_LPAE 46 + /* 47 + * Allocate PMD table for modules and pkmap mappings. 48 + */ 49 + new_pud = pud_alloc(mm, new_pgd + pgd_index(MODULES_VADDR), 50 + MODULES_VADDR); 51 + if (!new_pud) 52 + goto no_pud; 53 + 54 + new_pmd = pmd_alloc(mm, new_pud, 0); 55 + if (!new_pmd) 56 + goto no_pmd; 57 + #endif 58 + 54 59 if (!vectors_high()) { 55 60 /* 56 61 * On ARM, first page must always be allocated since it 57 - * contains the machine vectors. 62 + * contains the machine vectors. The vectors are always high 63 + * with LPAE. 58 64 */ 59 65 new_pud = pud_alloc(mm, new_pgd, 0); 60 66 if (!new_pud) ··· 98 74 no_pmd: 99 75 pud_free(mm, new_pud); 100 76 no_pud: 101 - free_pages((unsigned long)new_pgd, 2); 77 + __pgd_free(new_pgd); 102 78 no_pgd: 103 79 return NULL; 104 80 } ··· 135 111 pgd_clear(pgd); 136 112 pud_free(mm, pud); 137 113 no_pgd: 138 - free_pages((unsigned long) pgd_base, 2); 114 + #ifdef CONFIG_ARM_LPAE 115 + /* 116 + * Free modules/pkmap or identity pmd tables. 117 + */ 118 + for (pgd = pgd_base; pgd < pgd_base + PTRS_PER_PGD; pgd++) { 119 + if (pgd_none_or_clear_bad(pgd)) 120 + continue; 121 + if (pgd_val(*pgd) & L_PGD_SWAPPER) 122 + continue; 123 + pud = pud_offset(pgd, 0); 124 + if (pud_none_or_clear_bad(pud)) 125 + continue; 126 + pmd = pmd_offset(pud, 0); 127 + pud_clear(pud); 128 + pmd_free(mm, pmd); 129 + pgd_clear(pgd); 130 + pud_free(mm, pud); 131 + } 132 + #endif 133 + __pgd_free(pgd_base); 139 134 }
+3
arch/arm/mm/proc-arm1020.S
··· 95 95 * loc: location to jump to for soft reset 96 96 */ 97 97 .align 5 98 + .pushsection .idmap.text, "ax" 98 99 ENTRY(cpu_arm1020_reset) 99 100 mov ip, #0 100 101 mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches ··· 108 107 bic ip, ip, #0x1100 @ ...i...s........ 109 108 mcr p15, 0, ip, c1, c0, 0 @ ctrl register 110 109 mov pc, r0 110 + ENDPROC(cpu_arm1020_reset) 111 + .popsection 111 112 112 113 /* 113 114 * cpu_arm1020_do_idle()
+3
arch/arm/mm/proc-arm1020e.S
··· 95 95 * loc: location to jump to for soft reset 96 96 */ 97 97 .align 5 98 + .pushsection .idmap.text, "ax" 98 99 ENTRY(cpu_arm1020e_reset) 99 100 mov ip, #0 100 101 mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches ··· 108 107 bic ip, ip, #0x1100 @ ...i...s........ 109 108 mcr p15, 0, ip, c1, c0, 0 @ ctrl register 110 109 mov pc, r0 110 + ENDPROC(cpu_arm1020e_reset) 111 + .popsection 111 112 112 113 /* 113 114 * cpu_arm1020e_do_idle()
+3
arch/arm/mm/proc-arm1022.S
··· 84 84 * loc: location to jump to for soft reset 85 85 */ 86 86 .align 5 87 + .pushsection .idmap.text, "ax" 87 88 ENTRY(cpu_arm1022_reset) 88 89 mov ip, #0 89 90 mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches ··· 97 96 bic ip, ip, #0x1100 @ ...i...s........ 98 97 mcr p15, 0, ip, c1, c0, 0 @ ctrl register 99 98 mov pc, r0 99 + ENDPROC(cpu_arm1022_reset) 100 + .popsection 100 101 101 102 /* 102 103 * cpu_arm1022_do_idle()
+3
arch/arm/mm/proc-arm1026.S
··· 84 84 * loc: location to jump to for soft reset 85 85 */ 86 86 .align 5 87 + .pushsection .idmap.text, "ax" 87 88 ENTRY(cpu_arm1026_reset) 88 89 mov ip, #0 89 90 mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches ··· 97 96 bic ip, ip, #0x1100 @ ...i...s........ 98 97 mcr p15, 0, ip, c1, c0, 0 @ ctrl register 99 98 mov pc, r0 99 + ENDPROC(cpu_arm1026_reset) 100 + .popsection 100 101 101 102 /* 102 103 * cpu_arm1026_do_idle()
+4
arch/arm/mm/proc-arm6_7.S
··· 225 225 * Params : r0 = address to jump to 226 226 * Notes : This sets up everything for a reset 227 227 */ 228 + .pushsection .idmap.text, "ax" 228 229 ENTRY(cpu_arm6_reset) 229 230 ENTRY(cpu_arm7_reset) 230 231 mov r1, #0 ··· 236 235 mov r1, #0x30 237 236 mcr p15, 0, r1, c1, c0, 0 @ turn off MMU etc 238 237 mov pc, r0 238 + ENDPROC(cpu_arm6_reset) 239 + ENDPROC(cpu_arm7_reset) 240 + .popsection 239 241 240 242 __CPUINIT 241 243
+3
arch/arm/mm/proc-arm720.S
··· 101 101 * Params : r0 = address to jump to 102 102 * Notes : This sets up everything for a reset 103 103 */ 104 + .pushsection .idmap.text, "ax" 104 105 ENTRY(cpu_arm720_reset) 105 106 mov ip, #0 106 107 mcr p15, 0, ip, c7, c7, 0 @ invalidate cache ··· 113 112 bic ip, ip, #0x2100 @ ..v....s........ 114 113 mcr p15, 0, ip, c1, c0, 0 @ ctrl register 115 114 mov pc, r0 115 + ENDPROC(cpu_arm720_reset) 116 + .popsection 116 117 117 118 __CPUINIT 118 119
+3
arch/arm/mm/proc-arm740.S
··· 49 49 * Params : r0 = address to jump to 50 50 * Notes : This sets up everything for a reset 51 51 */ 52 + .pushsection .idmap.text, "ax" 52 53 ENTRY(cpu_arm740_reset) 53 54 mov ip, #0 54 55 mcr p15, 0, ip, c7, c0, 0 @ invalidate cache ··· 57 56 bic ip, ip, #0x0000000c @ ............wc.. 58 57 mcr p15, 0, ip, c1, c0, 0 @ ctrl register 59 58 mov pc, r0 59 + ENDPROC(cpu_arm740_reset) 60 + .popsection 60 61 61 62 __CPUINIT 62 63
+3
arch/arm/mm/proc-arm7tdmi.S
··· 45 45 * Params : loc(r0) address to jump to 46 46 * Purpose : Sets up everything for a reset and jump to the location for soft reset. 47 47 */ 48 + .pushsection .idmap.text, "ax" 48 49 ENTRY(cpu_arm7tdmi_reset) 49 50 mov pc, r0 51 + ENDPROC(cpu_arm7tdmi_reset) 52 + .popsection 50 53 51 54 __CPUINIT 52 55
+3
arch/arm/mm/proc-arm920.S
··· 85 85 * loc: location to jump to for soft reset 86 86 */ 87 87 .align 5 88 + .pushsection .idmap.text, "ax" 88 89 ENTRY(cpu_arm920_reset) 89 90 mov ip, #0 90 91 mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches ··· 98 97 bic ip, ip, #0x1100 @ ...i...s........ 99 98 mcr p15, 0, ip, c1, c0, 0 @ ctrl register 100 99 mov pc, r0 100 + ENDPROC(cpu_arm920_reset) 101 + .popsection 101 102 102 103 /* 103 104 * cpu_arm920_do_idle()
+3
arch/arm/mm/proc-arm922.S
··· 87 87 * loc: location to jump to for soft reset 88 88 */ 89 89 .align 5 90 + .pushsection .idmap.text, "ax" 90 91 ENTRY(cpu_arm922_reset) 91 92 mov ip, #0 92 93 mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches ··· 100 99 bic ip, ip, #0x1100 @ ...i...s........ 101 100 mcr p15, 0, ip, c1, c0, 0 @ ctrl register 102 101 mov pc, r0 102 + ENDPROC(cpu_arm922_reset) 103 + .popsection 103 104 104 105 /* 105 106 * cpu_arm922_do_idle()
+3
arch/arm/mm/proc-arm925.S
··· 108 108 * loc: location to jump to for soft reset 109 109 */ 110 110 .align 5 111 + .pushsection .idmap.text, "ax" 111 112 ENTRY(cpu_arm925_reset) 112 113 /* Send software reset to MPU and DSP */ 113 114 mov ip, #0xff000000 ··· 116 115 orr ip, ip, #0x0000ce00 117 116 mov r4, #1 118 117 strh r4, [ip, #0x10] 118 + ENDPROC(cpu_arm925_reset) 119 + .popsection 119 120 120 121 mov ip, #0 121 122 mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches
+3
arch/arm/mm/proc-arm926.S
··· 77 77 * loc: location to jump to for soft reset 78 78 */ 79 79 .align 5 80 + .pushsection .idmap.text, "ax" 80 81 ENTRY(cpu_arm926_reset) 81 82 mov ip, #0 82 83 mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches ··· 90 89 bic ip, ip, #0x1100 @ ...i...s........ 91 90 mcr p15, 0, ip, c1, c0, 0 @ ctrl register 92 91 mov pc, r0 92 + ENDPROC(cpu_arm926_reset) 93 + .popsection 93 94 94 95 /* 95 96 * cpu_arm926_do_idle()
+3
arch/arm/mm/proc-arm940.S
··· 48 48 * Params : r0 = address to jump to 49 49 * Notes : This sets up everything for a reset 50 50 */ 51 + .pushsection .idmap.text, "ax" 51 52 ENTRY(cpu_arm940_reset) 52 53 mov ip, #0 53 54 mcr p15, 0, ip, c7, c5, 0 @ flush I cache ··· 59 58 bic ip, ip, #0x00001000 @ i-cache 60 59 mcr p15, 0, ip, c1, c0, 0 @ ctrl register 61 60 mov pc, r0 61 + ENDPROC(cpu_arm940_reset) 62 + .popsection 62 63 63 64 /* 64 65 * cpu_arm940_do_idle()
+3
arch/arm/mm/proc-arm946.S
··· 55 55 * Params : r0 = address to jump to 56 56 * Notes : This sets up everything for a reset 57 57 */ 58 + .pushsection .idmap.text, "ax" 58 59 ENTRY(cpu_arm946_reset) 59 60 mov ip, #0 60 61 mcr p15, 0, ip, c7, c5, 0 @ flush I cache ··· 66 65 bic ip, ip, #0x00001000 @ i-cache 67 66 mcr p15, 0, ip, c1, c0, 0 @ ctrl register 68 67 mov pc, r0 68 + ENDPROC(cpu_arm946_reset) 69 + .popsection 69 70 70 71 /* 71 72 * cpu_arm946_do_idle()
+3
arch/arm/mm/proc-arm9tdmi.S
··· 45 45 * Params : loc(r0) address to jump to 46 46 * Purpose : Sets up everything for a reset and jump to the location for soft reset. 47 47 */ 48 + .pushsection .idmap.text, "ax" 48 49 ENTRY(cpu_arm9tdmi_reset) 49 50 mov pc, r0 51 + ENDPROC(cpu_arm9tdmi_reset) 52 + .popsection 50 53 51 54 __CPUINIT 52 55
+3
arch/arm/mm/proc-fa526.S
··· 57 57 * loc: location to jump to for soft reset 58 58 */ 59 59 .align 4 60 + .pushsection .idmap.text, "ax" 60 61 ENTRY(cpu_fa526_reset) 61 62 /* TODO: Use CP8 if possible... */ 62 63 mov ip, #0 ··· 74 73 nop 75 74 nop 76 75 mov pc, r0 76 + ENDPROC(cpu_fa526_reset) 77 + .popsection 77 78 78 79 /* 79 80 * cpu_fa526_do_idle()
+3
arch/arm/mm/proc-feroceon.S
··· 98 98 * loc: location to jump to for soft reset 99 99 */ 100 100 .align 5 101 + .pushsection .idmap.text, "ax" 101 102 ENTRY(cpu_feroceon_reset) 102 103 mov ip, #0 103 104 mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches ··· 111 110 bic ip, ip, #0x1100 @ ...i...s........ 112 111 mcr p15, 0, ip, c1, c0, 0 @ ctrl register 113 112 mov pc, r0 113 + ENDPROC(cpu_feroceon_reset) 114 + .popsection 114 115 115 116 /* 116 117 * cpu_feroceon_do_idle()
+3 -2
arch/arm/mm/proc-macros.S
··· 91 91 #if L_PTE_SHARED != PTE_EXT_SHARED 92 92 #error PTE shared bit mismatch 93 93 #endif 94 - #if (L_PTE_XN+L_PTE_USER+L_PTE_RDONLY+L_PTE_DIRTY+L_PTE_YOUNG+\ 95 - L_PTE_FILE+L_PTE_PRESENT) > L_PTE_SHARED 94 + #if !defined (CONFIG_ARM_LPAE) && \ 95 + (L_PTE_XN+L_PTE_USER+L_PTE_RDONLY+L_PTE_DIRTY+L_PTE_YOUNG+\ 96 + L_PTE_FILE+L_PTE_PRESENT) > L_PTE_SHARED 96 97 #error Invalid Linux PTE bit settings 97 98 #endif 98 99 #endif /* CONFIG_MMU */
+3
arch/arm/mm/proc-mohawk.S
··· 69 69 * (same as arm926) 70 70 */ 71 71 .align 5 72 + .pushsection .idmap.text, "ax" 72 73 ENTRY(cpu_mohawk_reset) 73 74 mov ip, #0 74 75 mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches ··· 80 79 bic ip, ip, #0x1100 @ ...i...s........ 81 80 mcr p15, 0, ip, c1, c0, 0 @ ctrl register 82 81 mov pc, r0 82 + ENDPROC(cpu_mohawk_reset) 83 + .popsection 83 84 84 85 /* 85 86 * cpu_mohawk_do_idle()
+3
arch/arm/mm/proc-sa110.S
··· 62 62 * loc: location to jump to for soft reset 63 63 */ 64 64 .align 5 65 + .pushsection .idmap.text, "ax" 65 66 ENTRY(cpu_sa110_reset) 66 67 mov ip, #0 67 68 mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches ··· 75 74 bic ip, ip, #0x1100 @ ...i...s........ 76 75 mcr p15, 0, ip, c1, c0, 0 @ ctrl register 77 76 mov pc, r0 77 + ENDPROC(cpu_sa110_reset) 78 + .popsection 78 79 79 80 /* 80 81 * cpu_sa110_do_idle(type)
+3
arch/arm/mm/proc-sa1100.S
··· 70 70 * loc: location to jump to for soft reset 71 71 */ 72 72 .align 5 73 + .pushsection .idmap.text, "ax" 73 74 ENTRY(cpu_sa1100_reset) 74 75 mov ip, #0 75 76 mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches ··· 83 82 bic ip, ip, #0x1100 @ ...i...s........ 84 83 mcr p15, 0, ip, c1, c0, 0 @ ctrl register 85 84 mov pc, r0 85 + ENDPROC(cpu_sa1100_reset) 86 + .popsection 86 87 87 88 /* 88 89 * cpu_sa1100_do_idle(type)
+3
arch/arm/mm/proc-v6.S
··· 55 55 * - loc - location to jump to for soft reset 56 56 */ 57 57 .align 5 58 + .pushsection .idmap.text, "ax" 58 59 ENTRY(cpu_v6_reset) 59 60 mrc p15, 0, r1, c1, c0, 0 @ ctrl register 60 61 bic r1, r1, #0x1 @ ...............m ··· 63 62 mov r1, #0 64 63 mcr p15, 0, r1, c7, c5, 4 @ ISB 65 64 mov pc, r0 65 + ENDPROC(cpu_v6_reset) 66 + .popsection 66 67 67 68 /* 68 69 * cpu_v6_do_idle()
+171
arch/arm/mm/proc-v7-2level.S
··· 1 + /* 2 + * arch/arm/mm/proc-v7-2level.S 3 + * 4 + * Copyright (C) 2001 Deep Blue Solutions Ltd. 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 + 11 + #define TTB_S (1 << 1) 12 + #define TTB_RGN_NC (0 << 3) 13 + #define TTB_RGN_OC_WBWA (1 << 3) 14 + #define TTB_RGN_OC_WT (2 << 3) 15 + #define TTB_RGN_OC_WB (3 << 3) 16 + #define TTB_NOS (1 << 5) 17 + #define TTB_IRGN_NC ((0 << 0) | (0 << 6)) 18 + #define TTB_IRGN_WBWA ((0 << 0) | (1 << 6)) 19 + #define TTB_IRGN_WT ((1 << 0) | (0 << 6)) 20 + #define TTB_IRGN_WB ((1 << 0) | (1 << 6)) 21 + 22 + /* PTWs cacheable, inner WB not shareable, outer WB not shareable */ 23 + #define TTB_FLAGS_UP TTB_IRGN_WB|TTB_RGN_OC_WB 24 + #define PMD_FLAGS_UP PMD_SECT_WB 25 + 26 + /* PTWs cacheable, inner WBWA shareable, outer WBWA not shareable */ 27 + #define TTB_FLAGS_SMP TTB_IRGN_WBWA|TTB_S|TTB_NOS|TTB_RGN_OC_WBWA 28 + #define PMD_FLAGS_SMP PMD_SECT_WBWA|PMD_SECT_S 29 + 30 + /* 31 + * cpu_v7_switch_mm(pgd_phys, tsk) 32 + * 33 + * Set the translation table base pointer to be pgd_phys 34 + * 35 + * - pgd_phys - physical address of new TTB 36 + * 37 + * It is assumed that: 38 + * - we are not using split page tables 39 + */ 40 + ENTRY(cpu_v7_switch_mm) 41 + #ifdef CONFIG_MMU 42 + mov r2, #0 43 + ldr r1, [r1, #MM_CONTEXT_ID] @ get mm->context.id 44 + ALT_SMP(orr r0, r0, #TTB_FLAGS_SMP) 45 + ALT_UP(orr r0, r0, #TTB_FLAGS_UP) 46 + #ifdef CONFIG_ARM_ERRATA_430973 47 + mcr p15, 0, r2, c7, c5, 6 @ flush BTAC/BTB 48 + #endif 49 + #ifdef CONFIG_ARM_ERRATA_754322 50 + dsb 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 + mcr p15, 0, r1, c13, c0, 1 @ set context ID 60 + isb 61 + #endif 62 + mov pc, lr 63 + ENDPROC(cpu_v7_switch_mm) 64 + 65 + /* 66 + * cpu_v7_set_pte_ext(ptep, pte) 67 + * 68 + * Set a level 2 translation table entry. 69 + * 70 + * - ptep - pointer to level 2 translation table entry 71 + * (hardware version is stored at +2048 bytes) 72 + * - pte - PTE value to store 73 + * - ext - value for extended PTE bits 74 + */ 75 + ENTRY(cpu_v7_set_pte_ext) 76 + #ifdef CONFIG_MMU 77 + str r1, [r0] @ linux version 78 + 79 + bic r3, r1, #0x000003f0 80 + bic r3, r3, #PTE_TYPE_MASK 81 + orr r3, r3, r2 82 + orr r3, r3, #PTE_EXT_AP0 | 2 83 + 84 + tst r1, #1 << 4 85 + orrne r3, r3, #PTE_EXT_TEX(1) 86 + 87 + eor r1, r1, #L_PTE_DIRTY 88 + tst r1, #L_PTE_RDONLY | L_PTE_DIRTY 89 + orrne r3, r3, #PTE_EXT_APX 90 + 91 + tst r1, #L_PTE_USER 92 + orrne r3, r3, #PTE_EXT_AP1 93 + #ifdef CONFIG_CPU_USE_DOMAINS 94 + @ allow kernel read/write access to read-only user pages 95 + tstne r3, #PTE_EXT_APX 96 + bicne r3, r3, #PTE_EXT_APX | PTE_EXT_AP0 97 + #endif 98 + 99 + tst r1, #L_PTE_XN 100 + orrne r3, r3, #PTE_EXT_XN 101 + 102 + tst r1, #L_PTE_YOUNG 103 + tstne r1, #L_PTE_PRESENT 104 + moveq r3, #0 105 + 106 + ARM( str r3, [r0, #2048]! ) 107 + THUMB( add r0, r0, #2048 ) 108 + THUMB( str r3, [r0] ) 109 + mcr p15, 0, r0, c7, c10, 1 @ flush_pte 110 + #endif 111 + mov pc, lr 112 + ENDPROC(cpu_v7_set_pte_ext) 113 + 114 + /* 115 + * Memory region attributes with SCTLR.TRE=1 116 + * 117 + * n = TEX[0],C,B 118 + * TR = PRRR[2n+1:2n] - memory type 119 + * IR = NMRR[2n+1:2n] - inner cacheable property 120 + * OR = NMRR[2n+17:2n+16] - outer cacheable property 121 + * 122 + * n TR IR OR 123 + * UNCACHED 000 00 124 + * BUFFERABLE 001 10 00 00 125 + * WRITETHROUGH 010 10 10 10 126 + * WRITEBACK 011 10 11 11 127 + * reserved 110 128 + * WRITEALLOC 111 10 01 01 129 + * DEV_SHARED 100 01 130 + * DEV_NONSHARED 100 01 131 + * DEV_WC 001 10 132 + * DEV_CACHED 011 10 133 + * 134 + * Other attributes: 135 + * 136 + * DS0 = PRRR[16] = 0 - device shareable property 137 + * DS1 = PRRR[17] = 1 - device shareable property 138 + * NS0 = PRRR[18] = 0 - normal shareable property 139 + * NS1 = PRRR[19] = 1 - normal shareable property 140 + * NOS = PRRR[24+n] = 1 - not outer shareable 141 + */ 142 + .equ PRRR, 0xff0a81a8 143 + .equ NMRR, 0x40e040e0 144 + 145 + /* 146 + * Macro for setting up the TTBRx and TTBCR registers. 147 + * - \ttb0 and \ttb1 updated with the corresponding flags. 148 + */ 149 + .macro v7_ttb_setup, zero, ttbr0, ttbr1, tmp 150 + mcr p15, 0, \zero, c2, c0, 2 @ TTB control register 151 + ALT_SMP(orr \ttbr0, \ttbr0, #TTB_FLAGS_SMP) 152 + ALT_UP(orr \ttbr0, \ttbr0, #TTB_FLAGS_UP) 153 + ALT_SMP(orr \ttbr1, \ttbr1, #TTB_FLAGS_SMP) 154 + ALT_UP(orr \ttbr1, \ttbr1, #TTB_FLAGS_UP) 155 + mcr p15, 0, \ttbr1, c2, c0, 1 @ load TTB1 156 + .endm 157 + 158 + __CPUINIT 159 + 160 + /* AT 161 + * TFR EV X F I D LR S 162 + * .EEE ..EE PUI. .T.T 4RVI ZWRS BLDP WCAM 163 + * rxxx rrxx xxx0 0101 xxxx xxxx x111 xxxx < forced 164 + * 1 0 110 0011 1100 .111 1101 < we want 165 + */ 166 + .align 2 167 + .type v7_crval, #object 168 + v7_crval: 169 + crval clear=0x0120c302, mmuset=0x10c03c7d, ucset=0x00c01c7c 170 + 171 + .previous
+150
arch/arm/mm/proc-v7-3level.S
··· 1 + /* 2 + * arch/arm/mm/proc-v7-3level.S 3 + * 4 + * Copyright (C) 2001 Deep Blue Solutions Ltd. 5 + * Copyright (C) 2011 ARM Ltd. 6 + * Author: Catalin Marinas <catalin.marinas@arm.com> 7 + * based on arch/arm/mm/proc-v7-2level.S 8 + * 9 + * This program is free software; you can redistribute it and/or modify 10 + * it under the terms of the GNU General Public License version 2 as 11 + * published by the Free Software Foundation. 12 + * 13 + * This program is distributed in the hope that it will be useful, 14 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 + * GNU General Public License for more details. 17 + * 18 + * You should have received a copy of the GNU General Public License 19 + * along with this program; if not, write to the Free Software 20 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 + */ 22 + 23 + #define TTB_IRGN_NC (0 << 8) 24 + #define TTB_IRGN_WBWA (1 << 8) 25 + #define TTB_IRGN_WT (2 << 8) 26 + #define TTB_IRGN_WB (3 << 8) 27 + #define TTB_RGN_NC (0 << 10) 28 + #define TTB_RGN_OC_WBWA (1 << 10) 29 + #define TTB_RGN_OC_WT (2 << 10) 30 + #define TTB_RGN_OC_WB (3 << 10) 31 + #define TTB_S (3 << 12) 32 + #define TTB_EAE (1 << 31) 33 + 34 + /* PTWs cacheable, inner WB not shareable, outer WB not shareable */ 35 + #define TTB_FLAGS_UP (TTB_IRGN_WB|TTB_RGN_OC_WB) 36 + #define PMD_FLAGS_UP (PMD_SECT_WB) 37 + 38 + /* PTWs cacheable, inner WBWA shareable, outer WBWA not shareable */ 39 + #define TTB_FLAGS_SMP (TTB_IRGN_WBWA|TTB_S|TTB_RGN_OC_WBWA) 40 + #define PMD_FLAGS_SMP (PMD_SECT_WBWA|PMD_SECT_S) 41 + 42 + /* 43 + * cpu_v7_switch_mm(pgd_phys, tsk) 44 + * 45 + * Set the translation table base pointer to be pgd_phys (physical address of 46 + * the new TTB). 47 + */ 48 + ENTRY(cpu_v7_switch_mm) 49 + #ifdef CONFIG_MMU 50 + ldr r1, [r1, #MM_CONTEXT_ID] @ get mm->context.id 51 + and r3, r1, #0xff 52 + mov r3, r3, lsl #(48 - 32) @ ASID 53 + mcrr p15, 0, r0, r3, c2 @ set TTB 0 54 + isb 55 + #endif 56 + mov pc, lr 57 + ENDPROC(cpu_v7_switch_mm) 58 + 59 + /* 60 + * cpu_v7_set_pte_ext(ptep, pte) 61 + * 62 + * Set a level 2 translation table entry. 63 + * - ptep - pointer to level 3 translation table entry 64 + * - pte - PTE value to store (64-bit in r2 and r3) 65 + */ 66 + ENTRY(cpu_v7_set_pte_ext) 67 + #ifdef CONFIG_MMU 68 + tst r2, #L_PTE_PRESENT 69 + beq 1f 70 + tst r3, #1 << (55 - 32) @ L_PTE_DIRTY 71 + orreq r2, #L_PTE_RDONLY 72 + 1: strd r2, r3, [r0] 73 + mcr p15, 0, r0, c7, c10, 1 @ flush_pte 74 + #endif 75 + mov pc, lr 76 + ENDPROC(cpu_v7_set_pte_ext) 77 + 78 + /* 79 + * Memory region attributes for LPAE (defined in pgtable-3level.h): 80 + * 81 + * n = AttrIndx[2:0] 82 + * 83 + * n MAIR 84 + * UNCACHED 000 00000000 85 + * BUFFERABLE 001 01000100 86 + * DEV_WC 001 01000100 87 + * WRITETHROUGH 010 10101010 88 + * WRITEBACK 011 11101110 89 + * DEV_CACHED 011 11101110 90 + * DEV_SHARED 100 00000100 91 + * DEV_NONSHARED 100 00000100 92 + * unused 101 93 + * unused 110 94 + * WRITEALLOC 111 11111111 95 + */ 96 + .equ PRRR, 0xeeaa4400 @ MAIR0 97 + .equ NMRR, 0xff000004 @ MAIR1 98 + 99 + /* 100 + * Macro for setting up the TTBRx and TTBCR registers. 101 + * - \ttbr1 updated. 102 + */ 103 + .macro v7_ttb_setup, zero, ttbr0, ttbr1, tmp 104 + ldr \tmp, =swapper_pg_dir @ swapper_pg_dir virtual address 105 + cmp \ttbr1, \tmp @ PHYS_OFFSET > PAGE_OFFSET? (branch below) 106 + mrc p15, 0, \tmp, c2, c0, 2 @ TTB control register 107 + orr \tmp, \tmp, #TTB_EAE 108 + ALT_SMP(orr \tmp, \tmp, #TTB_FLAGS_SMP) 109 + ALT_UP(orr \tmp, \tmp, #TTB_FLAGS_UP) 110 + ALT_SMP(orr \tmp, \tmp, #TTB_FLAGS_SMP << 16) 111 + ALT_UP(orr \tmp, \tmp, #TTB_FLAGS_UP << 16) 112 + /* 113 + * TTBR0/TTBR1 split (PAGE_OFFSET): 114 + * 0x40000000: T0SZ = 2, T1SZ = 0 (not used) 115 + * 0x80000000: T0SZ = 0, T1SZ = 1 116 + * 0xc0000000: T0SZ = 0, T1SZ = 2 117 + * 118 + * Only use this feature if PHYS_OFFSET <= PAGE_OFFSET, otherwise 119 + * booting secondary CPUs would end up using TTBR1 for the identity 120 + * mapping set up in TTBR0. 121 + */ 122 + bhi 9001f @ PHYS_OFFSET > PAGE_OFFSET? 123 + orr \tmp, \tmp, #(((PAGE_OFFSET >> 30) - 1) << 16) @ TTBCR.T1SZ 124 + #if defined CONFIG_VMSPLIT_2G 125 + /* PAGE_OFFSET == 0x80000000, T1SZ == 1 */ 126 + add \ttbr1, \ttbr1, #1 << 4 @ skip two L1 entries 127 + #elif defined CONFIG_VMSPLIT_3G 128 + /* PAGE_OFFSET == 0xc0000000, T1SZ == 2 */ 129 + add \ttbr1, \ttbr1, #4096 * (1 + 3) @ only L2 used, skip pgd+3*pmd 130 + #endif 131 + /* CONFIG_VMSPLIT_1G does not need TTBR1 adjustment */ 132 + 9001: mcr p15, 0, \tmp, c2, c0, 2 @ TTB control register 133 + mcrr p15, 1, \ttbr1, \zero, c2 @ load TTBR1 134 + .endm 135 + 136 + __CPUINIT 137 + 138 + /* 139 + * AT 140 + * TFR EV X F IHD LR S 141 + * .EEE ..EE PUI. .TAT 4RVI ZWRS BLDP WCAM 142 + * rxxx rrxx xxx0 0101 xxxx xxxx x111 xxxx < forced 143 + * 11 0 110 1 0011 1100 .111 1101 < we want 144 + */ 145 + .align 2 146 + .type v7_crval, #object 147 + v7_crval: 148 + crval clear=0x0120c302, mmuset=0x30c23c7d, ucset=0x00c01c7c 149 + 150 + .previous
+22 -157
arch/arm/mm/proc-v7.S
··· 19 19 20 20 #include "proc-macros.S" 21 21 22 - #define TTB_S (1 << 1) 23 - #define TTB_RGN_NC (0 << 3) 24 - #define TTB_RGN_OC_WBWA (1 << 3) 25 - #define TTB_RGN_OC_WT (2 << 3) 26 - #define TTB_RGN_OC_WB (3 << 3) 27 - #define TTB_NOS (1 << 5) 28 - #define TTB_IRGN_NC ((0 << 0) | (0 << 6)) 29 - #define TTB_IRGN_WBWA ((0 << 0) | (1 << 6)) 30 - #define TTB_IRGN_WT ((1 << 0) | (0 << 6)) 31 - #define TTB_IRGN_WB ((1 << 0) | (1 << 6)) 32 - 33 - /* PTWs cacheable, inner WB not shareable, outer WB not shareable */ 34 - #define TTB_FLAGS_UP TTB_IRGN_WB|TTB_RGN_OC_WB 35 - #define PMD_FLAGS_UP PMD_SECT_WB 36 - 37 - /* PTWs cacheable, inner WBWA shareable, outer WBWA not shareable */ 38 - #define TTB_FLAGS_SMP TTB_IRGN_WBWA|TTB_S|TTB_NOS|TTB_RGN_OC_WBWA 39 - #define PMD_FLAGS_SMP PMD_SECT_WBWA|PMD_SECT_S 22 + #ifdef CONFIG_ARM_LPAE 23 + #include "proc-v7-3level.S" 24 + #else 25 + #include "proc-v7-2level.S" 26 + #endif 40 27 41 28 ENTRY(cpu_v7_proc_init) 42 29 mov pc, lr ··· 50 63 * caches disabled. 51 64 */ 52 65 .align 5 66 + .pushsection .idmap.text, "ax" 53 67 ENTRY(cpu_v7_reset) 54 68 mrc p15, 0, r1, c1, c0, 0 @ ctrl register 55 69 bic r1, r1, #0x1 @ ...............m ··· 59 71 isb 60 72 mov pc, r0 61 73 ENDPROC(cpu_v7_reset) 74 + .popsection 62 75 63 76 /* 64 77 * cpu_v7_do_idle() ··· 86 97 mov pc, lr 87 98 ENDPROC(cpu_v7_dcache_clean_area) 88 99 89 - /* 90 - * cpu_v7_switch_mm(pgd_phys, tsk) 91 - * 92 - * Set the translation table base pointer to be pgd_phys 93 - * 94 - * - pgd_phys - physical address of new TTB 95 - * 96 - * It is assumed that: 97 - * - we are not using split page tables 98 - */ 99 - ENTRY(cpu_v7_switch_mm) 100 - #ifdef CONFIG_MMU 101 - mov r2, #0 102 - ldr r1, [r1, #MM_CONTEXT_ID] @ get mm->context.id 103 - ALT_SMP(orr r0, r0, #TTB_FLAGS_SMP) 104 - ALT_UP(orr r0, r0, #TTB_FLAGS_UP) 105 - #ifdef CONFIG_ARM_ERRATA_430973 106 - mcr p15, 0, r2, c7, c5, 6 @ flush BTAC/BTB 107 - #endif 108 - #ifdef CONFIG_ARM_ERRATA_754322 109 - dsb 110 - #endif 111 - mcr p15, 0, r2, c13, c0, 1 @ set reserved context ID 112 - isb 113 - 1: mcr p15, 0, r0, c2, c0, 0 @ set TTB 0 114 - isb 115 - #ifdef CONFIG_ARM_ERRATA_754322 116 - dsb 117 - #endif 118 - mcr p15, 0, r1, c13, c0, 1 @ set context ID 119 - isb 120 - #endif 121 - mov pc, lr 122 - ENDPROC(cpu_v7_switch_mm) 123 - 124 - /* 125 - * cpu_v7_set_pte_ext(ptep, pte) 126 - * 127 - * Set a level 2 translation table entry. 128 - * 129 - * - ptep - pointer to level 2 translation table entry 130 - * (hardware version is stored at +2048 bytes) 131 - * - pte - PTE value to store 132 - * - ext - value for extended PTE bits 133 - */ 134 - ENTRY(cpu_v7_set_pte_ext) 135 - #ifdef CONFIG_MMU 136 - str r1, [r0] @ linux version 137 - 138 - bic r3, r1, #0x000003f0 139 - bic r3, r3, #PTE_TYPE_MASK 140 - orr r3, r3, r2 141 - orr r3, r3, #PTE_EXT_AP0 | 2 142 - 143 - tst r1, #1 << 4 144 - orrne r3, r3, #PTE_EXT_TEX(1) 145 - 146 - eor r1, r1, #L_PTE_DIRTY 147 - tst r1, #L_PTE_RDONLY | L_PTE_DIRTY 148 - orrne r3, r3, #PTE_EXT_APX 149 - 150 - tst r1, #L_PTE_USER 151 - orrne r3, r3, #PTE_EXT_AP1 152 - #ifdef CONFIG_CPU_USE_DOMAINS 153 - @ allow kernel read/write access to read-only user pages 154 - tstne r3, #PTE_EXT_APX 155 - bicne r3, r3, #PTE_EXT_APX | PTE_EXT_AP0 156 - #endif 157 - 158 - tst r1, #L_PTE_XN 159 - orrne r3, r3, #PTE_EXT_XN 160 - 161 - tst r1, #L_PTE_YOUNG 162 - tstne r1, #L_PTE_PRESENT 163 - moveq r3, #0 164 - 165 - ARM( str r3, [r0, #2048]! ) 166 - THUMB( add r0, r0, #2048 ) 167 - THUMB( str r3, [r0] ) 168 - mcr p15, 0, r0, c7, c10, 1 @ flush_pte 169 - #endif 170 - mov pc, lr 171 - ENDPROC(cpu_v7_set_pte_ext) 172 - 173 100 string cpu_v7_name, "ARMv7 Processor" 174 101 .align 175 102 176 - /* 177 - * Memory region attributes with SCTLR.TRE=1 178 - * 179 - * n = TEX[0],C,B 180 - * TR = PRRR[2n+1:2n] - memory type 181 - * IR = NMRR[2n+1:2n] - inner cacheable property 182 - * OR = NMRR[2n+17:2n+16] - outer cacheable property 183 - * 184 - * n TR IR OR 185 - * UNCACHED 000 00 186 - * BUFFERABLE 001 10 00 00 187 - * WRITETHROUGH 010 10 10 10 188 - * WRITEBACK 011 10 11 11 189 - * reserved 110 190 - * WRITEALLOC 111 10 01 01 191 - * DEV_SHARED 100 01 192 - * DEV_NONSHARED 100 01 193 - * DEV_WC 001 10 194 - * DEV_CACHED 011 10 195 - * 196 - * Other attributes: 197 - * 198 - * DS0 = PRRR[16] = 0 - device shareable property 199 - * DS1 = PRRR[17] = 1 - device shareable property 200 - * NS0 = PRRR[18] = 0 - normal shareable property 201 - * NS1 = PRRR[19] = 1 - normal shareable property 202 - * NOS = PRRR[24+n] = 1 - not outer shareable 203 - */ 204 - .equ PRRR, 0xff0a81a8 205 - .equ NMRR, 0x40e040e0 206 - 207 103 /* Suspend/resume support: derived from arch/arm/mach-s5pv210/sleep.S */ 208 104 .globl cpu_v7_suspend_size 209 - .equ cpu_v7_suspend_size, 4 * 7 105 + .equ cpu_v7_suspend_size, 4 * 8 210 106 #ifdef CONFIG_ARM_CPU_SUSPEND 211 107 ENTRY(cpu_v7_do_suspend) 212 108 stmfd sp!, {r4 - r10, lr} ··· 100 226 stmia r0!, {r4 - r5} 101 227 mrc p15, 0, r6, c3, c0, 0 @ Domain ID 102 228 mrc p15, 0, r7, c2, c0, 1 @ TTB 1 229 + mrc p15, 0, r11, c2, c0, 2 @ TTB control register 103 230 mrc p15, 0, r8, c1, c0, 0 @ Control register 104 231 mrc p15, 0, r9, c1, c0, 1 @ Auxiliary control register 105 232 mrc p15, 0, r10, c1, c0, 2 @ Co-processor access control 106 - stmia r0, {r6 - r10} 233 + stmia r0, {r6 - r11} 107 234 ldmfd sp!, {r4 - r10, pc} 108 235 ENDPROC(cpu_v7_do_suspend) 109 236 ··· 116 241 ldmia r0!, {r4 - r5} 117 242 mcr p15, 0, r4, c13, c0, 0 @ FCSE/PID 118 243 mcr p15, 0, r5, c13, c0, 3 @ User r/o thread ID 119 - ldmia r0, {r6 - r10} 244 + ldmia r0, {r6 - r11} 120 245 mcr p15, 0, r6, c3, c0, 0 @ Domain ID 246 + #ifndef CONFIG_ARM_LPAE 121 247 ALT_SMP(orr r1, r1, #TTB_FLAGS_SMP) 122 248 ALT_UP(orr r1, r1, #TTB_FLAGS_UP) 249 + #endif 123 250 mcr p15, 0, r1, c2, c0, 0 @ TTB 0 124 251 mcr p15, 0, r7, c2, c0, 1 @ TTB 1 125 - mcr p15, 0, ip, c2, c0, 2 @ TTB control register 252 + mcr p15, 0, r11, c2, c0, 2 @ TTB control register 126 253 mrc p15, 0, r4, c1, c0, 1 @ Read Auxiliary control register 127 254 teq r4, r9 @ Is it already set? 128 255 mcrne p15, 0, r9, c1, c0, 1 @ No, so write it ··· 257 380 dsb 258 381 #ifdef CONFIG_MMU 259 382 mcr p15, 0, r10, c8, c7, 0 @ invalidate I + D TLBs 260 - mcr p15, 0, r10, c2, c0, 2 @ TTB control register 261 - ALT_SMP(orr r4, r4, #TTB_FLAGS_SMP) 262 - ALT_UP(orr r4, r4, #TTB_FLAGS_UP) 263 - ALT_SMP(orr r8, r8, #TTB_FLAGS_SMP) 264 - ALT_UP(orr r8, r8, #TTB_FLAGS_UP) 265 - mcr p15, 0, r8, c2, c0, 1 @ load TTB1 383 + v7_ttb_setup r10, r4, r8, r5 @ TTBCR, TTBRx setup 266 384 ldr r5, =PRRR @ PRRR 267 385 ldr r6, =NMRR @ NMRR 268 386 mcr p15, 0, r5, c10, c2, 0 @ write PRRR ··· 279 407 mov pc, lr @ return to head.S:__ret 280 408 ENDPROC(__v7_setup) 281 409 282 - /* AT 283 - * TFR EV X F I D LR S 284 - * .EEE ..EE PUI. .T.T 4RVI ZWRS BLDP WCAM 285 - * rxxx rrxx xxx0 0101 xxxx xxxx x111 xxxx < forced 286 - * 1 0 110 0011 1100 .111 1101 < we want 287 - */ 288 - .type v7_crval, #object 289 - v7_crval: 290 - crval clear=0x0120c302, mmuset=0x10c03c7d, ucset=0x00c01c7c 291 - 410 + .align 2 292 411 __v7_setup_stack: 293 412 .space 4 * 11 @ 11 registers 294 413 ··· 301 438 */ 302 439 .macro __v7_proc initfunc, mm_mmuflags = 0, io_mmuflags = 0, hwcaps = 0 303 440 ALT_SMP(.long PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_SECT_AP_READ | \ 304 - PMD_FLAGS_SMP | \mm_mmuflags) 441 + PMD_SECT_AF | PMD_FLAGS_SMP | \mm_mmuflags) 305 442 ALT_UP(.long PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_SECT_AP_READ | \ 306 - PMD_FLAGS_UP | \mm_mmuflags) 307 - .long PMD_TYPE_SECT | PMD_SECT_XN | PMD_SECT_AP_WRITE | \ 308 - PMD_SECT_AP_READ | \io_mmuflags 443 + PMD_SECT_AF | PMD_FLAGS_UP | \mm_mmuflags) 444 + .long PMD_TYPE_SECT | PMD_SECT_AP_WRITE | \ 445 + PMD_SECT_AP_READ | PMD_SECT_AF | \io_mmuflags 309 446 W(b) \initfunc 310 447 .long cpu_arch_name 311 448 .long cpu_elf_name ··· 318 455 .long v7_cache_fns 319 456 .endm 320 457 458 + #ifndef CONFIG_ARM_LPAE 321 459 /* 322 460 * ARM Ltd. Cortex A5 processor. 323 461 */ ··· 348 484 .long 0xff0ffff0 349 485 __v7_proc __v7_ca9mp_setup 350 486 .size __v7_ca9mp_proc_info, . - __v7_ca9mp_proc_info 487 + #endif /* CONFIG_ARM_LPAE */ 351 488 352 489 /* 353 490 * ARM Ltd. Cortex A15 processor.
+3
arch/arm/mm/proc-xsc3.S
··· 105 105 * loc: location to jump to for soft reset 106 106 */ 107 107 .align 5 108 + .pushsection .idmap.text, "ax" 108 109 ENTRY(cpu_xsc3_reset) 109 110 mov r1, #PSR_F_BIT|PSR_I_BIT|SVC_MODE 110 111 msr cpsr_c, r1 @ reset CPSR ··· 120 119 @ already containing those two last instructions to survive. 121 120 mcr p15, 0, ip, c8, c7, 0 @ invalidate I and D TLBs 122 121 mov pc, r0 122 + ENDPROC(cpu_xsc3_reset) 123 + .popsection 123 124 124 125 /* 125 126 * cpu_xsc3_do_idle()
+3
arch/arm/mm/proc-xscale.S
··· 142 142 * Beware PXA270 erratum E7. 143 143 */ 144 144 .align 5 145 + .pushsection .idmap.text, "ax" 145 146 ENTRY(cpu_xscale_reset) 146 147 mov r1, #PSR_F_BIT|PSR_I_BIT|SVC_MODE 147 148 msr cpsr_c, r1 @ reset CPSR ··· 161 160 @ already containing those two last instructions to survive. 162 161 mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs 163 162 mov pc, r0 163 + ENDPROC(cpu_xscale_reset) 164 + .popsection 164 165 165 166 /* 166 167 * cpu_xscale_do_idle()
-2
arch/arm/plat-iop/Makefile
··· 10 10 obj-$(CONFIG_ARCH_IOP32X) += pci.o 11 11 obj-$(CONFIG_ARCH_IOP32X) += setup.o 12 12 obj-$(CONFIG_ARCH_IOP32X) += time.o 13 - obj-$(CONFIG_ARCH_IOP32X) += io.o 14 13 obj-$(CONFIG_ARCH_IOP32X) += cp6.o 15 14 obj-$(CONFIG_ARCH_IOP32X) += adma.o 16 15 obj-$(CONFIG_ARCH_IOP32X) += pmu.o ··· 20 21 obj-$(CONFIG_ARCH_IOP33X) += pci.o 21 22 obj-$(CONFIG_ARCH_IOP33X) += setup.o 22 23 obj-$(CONFIG_ARCH_IOP33X) += time.o 23 - obj-$(CONFIG_ARCH_IOP33X) += io.o 24 24 obj-$(CONFIG_ARCH_IOP33X) += cp6.o 25 25 obj-$(CONFIG_ARCH_IOP33X) += adma.o 26 26 obj-$(CONFIG_ARCH_IOP33X) += pmu.o
-59
arch/arm/plat-iop/io.c
··· 1 - /* 2 - * iop3xx custom ioremap implementation 3 - * Copyright (c) 2006, Intel Corporation. 4 - * 5 - * This program is free software; you can redistribute it and/or modify it 6 - * under the terms and conditions of the GNU General Public License, 7 - * version 2, as published by the Free Software Foundation. 8 - * 9 - * This program is distributed in the hope it will be useful, but WITHOUT 10 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 - * more details. 13 - * 14 - * You should have received a copy of the GNU General Public License along with 15 - * this program; if not, write to the Free Software Foundation, Inc., 59 Temple 16 - * Place - Suite 330, Boston, MA 02111-1307 USA. 17 - * 18 - */ 19 - #include <linux/kernel.h> 20 - #include <linux/module.h> 21 - #include <linux/io.h> 22 - #include <mach/hardware.h> 23 - 24 - void * __iomem __iop3xx_ioremap(unsigned long cookie, size_t size, 25 - unsigned int mtype) 26 - { 27 - void __iomem * retval; 28 - 29 - switch (cookie) { 30 - case IOP3XX_PCI_LOWER_IO_PA ... IOP3XX_PCI_UPPER_IO_PA: 31 - retval = (void *) IOP3XX_PCI_IO_PHYS_TO_VIRT(cookie); 32 - break; 33 - case IOP3XX_PERIPHERAL_PHYS_BASE ... IOP3XX_PERIPHERAL_UPPER_PA: 34 - retval = (void *) IOP3XX_PMMR_PHYS_TO_VIRT(cookie); 35 - break; 36 - default: 37 - retval = __arm_ioremap_caller(cookie, size, mtype, 38 - __builtin_return_address(0)); 39 - } 40 - 41 - return retval; 42 - } 43 - EXPORT_SYMBOL(__iop3xx_ioremap); 44 - 45 - void __iop3xx_iounmap(void __iomem *addr) 46 - { 47 - extern void __iounmap(volatile void __iomem *addr); 48 - 49 - switch ((u32) addr) { 50 - case IOP3XX_PCI_LOWER_IO_VA ... IOP3XX_PCI_UPPER_IO_VA: 51 - case IOP3XX_PERIPHERAL_VIRT_BASE ... IOP3XX_PERIPHERAL_UPPER_VA: 52 - goto skip; 53 - } 54 - __iounmap(addr); 55 - 56 - skip: 57 - return; 58 - } 59 - EXPORT_SYMBOL(__iop3xx_iounmap);
+3 -13
arch/arm/plat-iop/time.c
··· 18 18 #include <linux/time.h> 19 19 #include <linux/init.h> 20 20 #include <linux/timex.h> 21 - #include <linux/sched.h> 22 21 #include <linux/io.h> 23 22 #include <linux/clocksource.h> 24 23 #include <linux/clockchips.h> ··· 51 52 .flags = CLOCK_SOURCE_IS_CONTINUOUS, 52 53 }; 53 54 54 - static DEFINE_CLOCK_DATA(cd); 55 - 56 55 /* 57 56 * IOP sched_clock() implementation via its clocksource. 58 57 */ 59 - unsigned long long notrace sched_clock(void) 58 + static u32 notrace iop_read_sched_clock(void) 60 59 { 61 - u32 cyc = 0xffffffffu - read_tcr1(); 62 - return cyc_to_sched_clock(&cd, cyc, (u32)~0); 63 - } 64 - 65 - static void notrace iop_update_sched_clock(void) 66 - { 67 - u32 cyc = 0xffffffffu - read_tcr1(); 68 - update_sched_clock(&cd, cyc, (u32)~0); 60 + return 0xffffffffu - read_tcr1(); 69 61 } 70 62 71 63 /* ··· 142 152 { 143 153 u32 timer_ctl; 144 154 145 - init_sched_clock(&cd, iop_update_sched_clock, 32, tick_rate); 155 + setup_sched_clock(iop_read_sched_clock, 32, tick_rate); 146 156 147 157 ticks_per_jiffy = DIV_ROUND_CLOSEST(tick_rate, HZ); 148 158 iop_tick_rate = tick_rate;
+1
arch/arm/plat-mxc/Kconfig
··· 20 20 bool "i.MX3, i.MX6" 21 21 select AUTO_ZRELADDR if !ZBOOT_ROM 22 22 select ARM_PATCH_PHYS_VIRT 23 + select MIGHT_HAVE_CACHE_L2X0 23 24 help 24 25 This enables support for systems based on the Freescale i.MX3 and i.MX6 25 26 family.
-1
arch/arm/plat-mxc/Makefile
··· 5 5 # Common support 6 6 obj-y := clock.o time.o devices.o cpu.o system.o irq-common.o 7 7 8 - obj-$(CONFIG_ARM_GIC) += gic.o 9 8 obj-$(CONFIG_MXC_TZIC) += tzic.o 10 9 obj-$(CONFIG_MXC_AVIC) += avic.o 11 10
-41
arch/arm/plat-mxc/gic.c
··· 1 - /* 2 - * Copyright 2011 Freescale Semiconductor, Inc. 3 - * Copyright 2011 Linaro Ltd. 4 - * 5 - * The code contained herein is licensed under the GNU General Public 6 - * License. You may obtain a copy of the GNU General Public License 7 - * Version 2 or later at the following locations: 8 - * 9 - * http://www.opensource.org/licenses/gpl-license.html 10 - * http://www.gnu.org/copyleft/gpl.html 11 - */ 12 - 13 - #include <linux/io.h> 14 - #include <asm/exception.h> 15 - #include <asm/localtimer.h> 16 - #include <asm/hardware/gic.h> 17 - #ifdef CONFIG_SMP 18 - #include <asm/smp.h> 19 - #endif 20 - 21 - asmlinkage void __exception_irq_entry gic_handle_irq(struct pt_regs *regs) 22 - { 23 - u32 irqstat, irqnr; 24 - 25 - do { 26 - irqstat = readl_relaxed(gic_cpu_base_addr + GIC_CPU_INTACK); 27 - irqnr = irqstat & 0x3ff; 28 - if (irqnr == 1023) 29 - break; 30 - 31 - if (irqnr > 15 && irqnr < 1021) 32 - handle_IRQ(irqnr, regs); 33 - #ifdef CONFIG_SMP 34 - else { 35 - writel_relaxed(irqstat, gic_cpu_base_addr + 36 - GIC_CPU_EOI); 37 - handle_IPI(irqnr, regs); 38 - } 39 - #endif 40 - } while (1); 41 - }
-1
arch/arm/plat-mxc/include/mach/common.h
··· 89 89 90 90 void avic_handle_irq(struct pt_regs *); 91 91 void tzic_handle_irq(struct pt_regs *); 92 - void gic_handle_irq(struct pt_regs *); 93 92 94 93 #define imx1_handle_irq avic_handle_irq 95 94 #define imx21_handle_irq avic_handle_irq
-11
arch/arm/plat-mxc/include/mach/entry-macro.S
··· 9 9 * published by the Free Software Foundation. 10 10 */ 11 11 12 - /* Unused, we use CONFIG_MULTI_IRQ_HANDLER */ 13 - 14 12 .macro disable_fiq 15 13 .endm 16 14 17 - .macro get_irqnr_preamble, base, tmp 18 - .endm 19 - 20 15 .macro arch_ret_to_user, tmp1, tmp2 21 - .endm 22 - 23 - .macro get_irqnr_and_base, irqnr, irqstat, base, tmp 24 - .endm 25 - 26 - .macro test_for_ipi, irqnr, irqstat, base, tmp 27 16 .endm
-2
arch/arm/plat-mxc/include/mach/mx1.h
··· 12 12 #ifndef __MACH_MX1_H__ 13 13 #define __MACH_MX1_H__ 14 14 15 - #include <mach/vmalloc.h> 16 - 17 15 /* 18 16 * Memory map 19 17 */
-22
arch/arm/plat-mxc/include/mach/vmalloc.h
··· 1 - /* 2 - * Copyright (C) 2000 Russell King. 3 - * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. 4 - * 5 - * This program is free software; you can redistribute it and/or modify 6 - * it under the terms of the GNU General Public License as published by 7 - * the Free Software Foundation; either version 2 of the License, or 8 - * (at your option) any later version. 9 - * 10 - * This program is distributed in the hope that it will be useful, 11 - * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 - * GNU General Public License for more details. 14 - */ 15 - 16 - #ifndef __ASM_ARCH_MXC_VMALLOC_H__ 17 - #define __ASM_ARCH_MXC_VMALLOC_H__ 18 - 19 - /* vmalloc ending address */ 20 - #define VMALLOC_END 0xf4000000UL 21 - 22 - #endif /* __ASM_ARCH_MXC_VMALLOC_H__ */
+1 -1
arch/arm/plat-mxc/system.c
··· 71 71 mdelay(50); 72 72 73 73 /* we'll take a jump through zero as a poor second */ 74 - cpu_reset(0); 74 + soft_restart(0); 75 75 } 76 76 77 77 void mxc_arch_reset_init(void __iomem *base)
+3 -12
arch/arm/plat-mxc/time.c
··· 108 108 109 109 static void __iomem *sched_clock_reg; 110 110 111 - static DEFINE_CLOCK_DATA(cd); 112 - unsigned long long notrace sched_clock(void) 111 + static u32 notrace mxc_read_sched_clock(void) 113 112 { 114 - cycle_t cyc = sched_clock_reg ? __raw_readl(sched_clock_reg) : 0; 115 - 116 - return cyc_to_sched_clock(&cd, cyc, (u32)~0); 117 - } 118 - 119 - static void notrace mxc_update_sched_clock(void) 120 - { 121 - cycle_t cyc = sched_clock_reg ? __raw_readl(sched_clock_reg) : 0; 122 - update_sched_clock(&cd, cyc, (u32)~0); 113 + return sched_clock_reg ? __raw_readl(sched_clock_reg) : 0; 123 114 } 124 115 125 116 static int __init mxc_clocksource_init(struct clk *timer_clk) ··· 120 129 121 130 sched_clock_reg = reg; 122 131 123 - init_sched_clock(&cd, mxc_update_sched_clock, 32, c); 132 + setup_sched_clock(mxc_read_sched_clock, 32, c); 124 133 return clocksource_mmio_init(reg, "mxc_timer1", c, 200, 32, 125 134 clocksource_mmio_readl_up); 126 135 }
+5 -15
arch/arm/plat-nomadik/timer.c
··· 17 17 #include <linux/clk.h> 18 18 #include <linux/jiffies.h> 19 19 #include <linux/err.h> 20 - #include <linux/sched.h> 21 20 #include <asm/mach/time.h> 22 21 #include <asm/sched_clock.h> 23 22 ··· 78 79 * local implementation which uses the clocksource to get some 79 80 * better resolution when scheduling the kernel. 80 81 */ 81 - static DEFINE_CLOCK_DATA(cd); 82 - 83 - unsigned long long notrace sched_clock(void) 82 + static u32 notrace nomadik_read_sched_clock(void) 84 83 { 85 - u32 cyc; 86 - 87 84 if (unlikely(!mtu_base)) 88 85 return 0; 89 86 90 - cyc = -readl(mtu_base + MTU_VAL(0)); 91 - return cyc_to_sched_clock(&cd, cyc, (u32)~0); 92 - } 93 - 94 - static void notrace nomadik_update_sched_clock(void) 95 - { 96 - u32 cyc = -readl(mtu_base + MTU_VAL(0)); 97 - update_sched_clock(&cd, cyc, (u32)~0); 87 + return -readl(mtu_base + MTU_VAL(0)); 98 88 } 99 89 #endif 100 90 ··· 219 231 rate, 200, 32, clocksource_mmio_readl_down)) 220 232 pr_err("timer: failed to initialize clock source %s\n", 221 233 "mtu_0"); 234 + 222 235 #ifdef CONFIG_NOMADIK_MTU_SCHED_CLOCK 223 - init_sched_clock(&cd, nomadik_update_sched_clock, 32, rate); 236 + setup_sched_clock(nomadik_read_sched_clock, 32, rate); 224 237 #endif 238 + 225 239 /* Timer 1 is used for events */ 226 240 227 241 clockevents_calc_mult_shift(&nmdk_clkevt, rate, MTU_MIN_RANGE);
+1 -1
arch/arm/plat-omap/Makefile
··· 4 4 5 5 # Common support 6 6 obj-y := common.o sram.o clock.o devices.o dma.o mux.o \ 7 - usb.o fb.o io.o counter_32k.o 7 + usb.o fb.o counter_32k.o 8 8 obj-m := 9 9 obj-n := 10 10 obj- :=
+8
arch/arm/plat-omap/common.c
··· 14 14 #include <linux/kernel.h> 15 15 #include <linux/init.h> 16 16 #include <linux/io.h> 17 + #include <linux/dma-mapping.h> 17 18 #include <linux/omapfb.h> 18 19 19 20 #include <plat/common.h> ··· 66 65 omapfb_reserve_sdram_memblock(); 67 66 omap_vram_reserve_sdram_memblock(); 68 67 omap_dsp_reserve_sdram_memblock(); 68 + } 69 + 70 + void __init omap_init_consistent_dma_size(void) 71 + { 72 + #ifdef CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE 73 + init_consistent_dma_size(CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE << 20); 74 + #endif 69 75 }
+3 -37
arch/arm/plat-omap/counter_32k.c
··· 17 17 #include <linux/clk.h> 18 18 #include <linux/err.h> 19 19 #include <linux/io.h> 20 - #include <linux/sched.h> 21 20 #include <linux/clocksource.h> 22 21 23 22 #include <asm/sched_clock.h> ··· 36 37 37 38 #define OMAP16XX_TIMER_32K_SYNCHRONIZED 0xfffbc410 38 39 39 - /* 40 - * Returns current time from boot in nsecs. It's OK for this to wrap 41 - * around for now, as it's just a relative time stamp. 42 - */ 43 - static DEFINE_CLOCK_DATA(cd); 44 - 45 - /* 46 - * Constants generated by clocks_calc_mult_shift(m, s, 32768, NSEC_PER_SEC, 60). 47 - * This gives a resolution of about 30us and a wrap period of about 36hrs. 48 - */ 49 - #define SC_MULT 4000000000u 50 - #define SC_SHIFT 17 51 - 52 - static inline unsigned long long notrace _omap_32k_sched_clock(void) 40 + static u32 notrace omap_32k_read_sched_clock(void) 53 41 { 54 - u32 cyc = timer_32k_base ? __raw_readl(timer_32k_base) : 0; 55 - return cyc_to_fixed_sched_clock(&cd, cyc, (u32)~0, SC_MULT, SC_SHIFT); 56 - } 57 - 58 - #if defined(CONFIG_OMAP_32K_TIMER) && !defined(CONFIG_OMAP_MPU_TIMER) 59 - unsigned long long notrace sched_clock(void) 60 - { 61 - return _omap_32k_sched_clock(); 62 - } 63 - #else 64 - unsigned long long notrace omap_32k_sched_clock(void) 65 - { 66 - return _omap_32k_sched_clock(); 67 - } 68 - #endif 69 - 70 - static void notrace omap_update_sched_clock(void) 71 - { 72 - u32 cyc = timer_32k_base ? __raw_readl(timer_32k_base) : 0; 73 - update_sched_clock(&cd, cyc, (u32)~0); 42 + return timer_32k_base ? __raw_readl(timer_32k_base) : 0; 74 43 } 75 44 76 45 /** ··· 114 147 clocksource_mmio_readl_up)) 115 148 printk(err, "32k_counter"); 116 149 117 - init_fixed_sched_clock(&cd, omap_update_sched_clock, 32, 118 - 32768, SC_MULT, SC_SHIFT); 150 + setup_sched_clock(omap_32k_read_sched_clock, 32, 32768); 119 151 } 120 152 return 0; 121 153 }
-83
arch/arm/plat-omap/include/plat/common.h
··· 27 27 #ifndef __ARCH_ARM_MACH_OMAP_COMMON_H 28 28 #define __ARCH_ARM_MACH_OMAP_COMMON_H 29 29 30 - #include <linux/delay.h> 31 - 32 30 #include <plat/i2c.h> 33 31 #include <plat/omap_hwmod.h> 34 32 35 - struct sys_timer; 36 - 37 - extern void omap_map_common_io(void); 38 - extern struct sys_timer omap1_timer; 39 - extern struct sys_timer omap2_timer; 40 - extern struct sys_timer omap3_timer; 41 - extern struct sys_timer omap3_secure_timer; 42 - extern struct sys_timer omap4_timer; 43 - extern bool omap_32k_timer_init(void); 44 33 extern int __init omap_init_clocksource_32k(void); 45 - extern unsigned long long notrace omap_32k_sched_clock(void); 46 34 47 35 extern void omap_reserve(void); 48 - 49 - void omap2420_init_early(void); 50 - void omap2430_init_early(void); 51 - void omap3430_init_early(void); 52 - void omap35xx_init_early(void); 53 - void omap3630_init_early(void); 54 - void omap3_init_early(void); /* Do not use this one */ 55 - void am35xx_init_early(void); 56 - void ti816x_init_early(void); 57 - void omap4430_init_early(void); 58 - 59 36 extern int omap_dss_reset(struct omap_hwmod *); 60 37 61 38 void omap_sram_init(void); 62 - 63 - /* 64 - * IO bases for various OMAP processors 65 - * Except the tap base, rest all the io bases 66 - * listed are physical addresses. 67 - */ 68 - struct omap_globals { 69 - u32 class; /* OMAP class to detect */ 70 - void __iomem *tap; /* Control module ID code */ 71 - void __iomem *sdrc; /* SDRAM Controller */ 72 - void __iomem *sms; /* SDRAM Memory Scheduler */ 73 - void __iomem *ctrl; /* System Control Module */ 74 - void __iomem *ctrl_pad; /* PAD Control Module */ 75 - void __iomem *prm; /* Power and Reset Management */ 76 - void __iomem *cm; /* Clock Management */ 77 - void __iomem *cm2; 78 - }; 79 - 80 - void omap2_set_globals_242x(void); 81 - void omap2_set_globals_243x(void); 82 - void omap2_set_globals_3xxx(void); 83 - void omap2_set_globals_443x(void); 84 - void omap2_set_globals_ti816x(void); 85 - 86 - /* These get called from omap2_set_globals_xxxx(), do not call these */ 87 - void omap2_set_globals_tap(struct omap_globals *); 88 - void omap2_set_globals_sdrc(struct omap_globals *); 89 - void omap2_set_globals_control(struct omap_globals *); 90 - void omap2_set_globals_prcm(struct omap_globals *); 91 - 92 - void omap242x_map_io(void); 93 - void omap243x_map_io(void); 94 - void omap3_map_io(void); 95 - void omap4_map_io(void); 96 - 97 - 98 - /** 99 - * omap_test_timeout - busy-loop, testing a condition 100 - * @cond: condition to test until it evaluates to true 101 - * @timeout: maximum number of microseconds in the timeout 102 - * @index: loop index (integer) 103 - * 104 - * Loop waiting for @cond to become true or until at least @timeout 105 - * microseconds have passed. To use, define some integer @index in the 106 - * calling code. After running, if @index == @timeout, then the loop has 107 - * timed out. 108 - */ 109 - #define omap_test_timeout(cond, timeout, index) \ 110 - ({ \ 111 - for (index = 0; index < timeout; index++) { \ 112 - if (cond) \ 113 - break; \ 114 - udelay(1); \ 115 - } \ 116 - }) 117 - 118 - extern struct device *omap2_get_mpuss_device(void); 119 - extern struct device *omap2_get_iva_device(void); 120 - extern struct device *omap2_get_l3_device(void); 121 - extern struct device *omap4_get_dsp_device(void); 122 39 123 40 #endif /* __ARCH_ARM_MACH_OMAP_COMMON_H */
-76
arch/arm/plat-omap/include/plat/io.h
··· 247 247 * NOTE: Please use ioremap + __raw_read/write where possible instead of these 248 248 */ 249 249 250 - void omap_ioremap_init(void); 251 - 252 250 extern u8 omap_readb(u32 pa); 253 251 extern u16 omap_readw(u32 pa); 254 252 extern u32 omap_readl(u32 pa); ··· 255 257 extern void omap_writel(u32 v, u32 pa); 256 258 257 259 struct omap_sdrc_params; 258 - 259 - #if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850) 260 - void omap7xx_map_io(void); 261 - #else 262 - static inline void omap_map_io(void) 263 - { 264 - } 265 - #endif 266 - 267 - #ifdef CONFIG_ARCH_OMAP15XX 268 - void omap15xx_map_io(void); 269 - #else 270 - static inline void omap15xx_map_io(void) 271 - { 272 - } 273 - #endif 274 - 275 - #ifdef CONFIG_ARCH_OMAP16XX 276 - void omap16xx_map_io(void); 277 - #else 278 - static inline void omap16xx_map_io(void) 279 - { 280 - } 281 - #endif 282 - 283 - void omap1_init_early(void); 284 - 285 - #ifdef CONFIG_SOC_OMAP2420 286 - extern void omap242x_map_common_io(void); 287 - #else 288 - static inline void omap242x_map_common_io(void) 289 - { 290 - } 291 - #endif 292 - 293 - #ifdef CONFIG_SOC_OMAP2430 294 - extern void omap243x_map_common_io(void); 295 - #else 296 - static inline void omap243x_map_common_io(void) 297 - { 298 - } 299 - #endif 300 - 301 - #ifdef CONFIG_ARCH_OMAP3 302 - extern void omap34xx_map_common_io(void); 303 - #else 304 - static inline void omap34xx_map_common_io(void) 305 - { 306 - } 307 - #endif 308 - 309 - #ifdef CONFIG_SOC_OMAPTI816X 310 - extern void omapti816x_map_common_io(void); 311 - #else 312 - static inline void omapti816x_map_common_io(void) 313 - { 314 - } 315 - #endif 316 - 317 - #ifdef CONFIG_ARCH_OMAP4 318 - extern void omap44xx_map_common_io(void); 319 - #else 320 - static inline void omap44xx_map_common_io(void) 321 - { 322 - } 323 - #endif 324 - 325 - extern void omap2_init_common_infrastructure(void); 326 260 extern void omap_sdrc_init(struct omap_sdrc_params *sdrc_cs0, 327 261 struct omap_sdrc_params *sdrc_cs1); 328 - 329 - #define __arch_ioremap omap_ioremap 330 - #define __arch_iounmap omap_iounmap 331 - 332 - void __iomem *omap_ioremap(unsigned long phys, size_t size, unsigned int type); 333 - void omap_iounmap(volatile void __iomem *addr); 334 262 335 263 extern void __init omap_init_consistent_dma_size(void); 336 264
-14
arch/arm/plat-omap/include/plat/irqs.h
··· 436 436 #define INTCPS_NR_MIR_REGS 3 437 437 #define INTCPS_NR_IRQS 96 438 438 439 - #ifndef __ASSEMBLY__ 440 - extern void __iomem *omap_irq_base; 441 - void omap1_init_irq(void); 442 - void omap2_init_irq(void); 443 - void omap3_init_irq(void); 444 - void ti816x_init_irq(void); 445 - extern int omap_irq_pending(void); 446 - void omap_intc_save_context(void); 447 - void omap_intc_restore_context(void); 448 - void omap3_intc_suspend(void); 449 - void omap3_intc_prepare_idle(void); 450 - void omap3_intc_resume_idle(void); 451 - #endif 452 - 453 439 #include <mach/hardware.h> 454 440 455 441 #ifdef CONFIG_FIQ
-159
arch/arm/plat-omap/io.c
··· 1 - /* 2 - * Common io.c file 3 - * This file is created by Russell King <rmk+kernel@arm.linux.org.uk> 4 - * 5 - * Copyright (C) 2009 Texas Instruments 6 - * Added OMAP4 support - Santosh Shilimkar <santosh.shilimkar@ti.com> 7 - * 8 - * This program is free software; you can redistribute it and/or modify 9 - * it under the terms of the GNU General Public License version 2 as 10 - * published by the Free Software Foundation. 11 - */ 12 - #include <linux/module.h> 13 - #include <linux/io.h> 14 - #include <linux/mm.h> 15 - #include <linux/dma-mapping.h> 16 - 17 - #include <plat/omap7xx.h> 18 - #include <plat/omap1510.h> 19 - #include <plat/omap16xx.h> 20 - #include <plat/omap24xx.h> 21 - #include <plat/omap34xx.h> 22 - #include <plat/omap44xx.h> 23 - 24 - #define BETWEEN(p,st,sz) ((p) >= (st) && (p) < ((st) + (sz))) 25 - #define XLATE(p,pst,vst) ((void __iomem *)((p) - (pst) + (vst))) 26 - 27 - static int initialized; 28 - 29 - /* 30 - * Intercept ioremap() requests for addresses in our fixed mapping regions. 31 - */ 32 - void __iomem *omap_ioremap(unsigned long p, size_t size, unsigned int type) 33 - { 34 - 35 - WARN(!initialized, "Do not use ioremap before init_early\n"); 36 - 37 - #ifdef CONFIG_ARCH_OMAP1 38 - if (cpu_class_is_omap1()) { 39 - if (BETWEEN(p, OMAP1_IO_PHYS, OMAP1_IO_SIZE)) 40 - return XLATE(p, OMAP1_IO_PHYS, OMAP1_IO_VIRT); 41 - } 42 - if (cpu_is_omap7xx()) { 43 - if (BETWEEN(p, OMAP7XX_DSP_BASE, OMAP7XX_DSP_SIZE)) 44 - return XLATE(p, OMAP7XX_DSP_BASE, OMAP7XX_DSP_START); 45 - 46 - if (BETWEEN(p, OMAP7XX_DSPREG_BASE, OMAP7XX_DSPREG_SIZE)) 47 - return XLATE(p, OMAP7XX_DSPREG_BASE, 48 - OMAP7XX_DSPREG_START); 49 - } 50 - if (cpu_is_omap15xx()) { 51 - if (BETWEEN(p, OMAP1510_DSP_BASE, OMAP1510_DSP_SIZE)) 52 - return XLATE(p, OMAP1510_DSP_BASE, OMAP1510_DSP_START); 53 - 54 - if (BETWEEN(p, OMAP1510_DSPREG_BASE, OMAP1510_DSPREG_SIZE)) 55 - return XLATE(p, OMAP1510_DSPREG_BASE, 56 - OMAP1510_DSPREG_START); 57 - } 58 - if (cpu_is_omap16xx()) { 59 - if (BETWEEN(p, OMAP16XX_DSP_BASE, OMAP16XX_DSP_SIZE)) 60 - return XLATE(p, OMAP16XX_DSP_BASE, OMAP16XX_DSP_START); 61 - 62 - if (BETWEEN(p, OMAP16XX_DSPREG_BASE, OMAP16XX_DSPREG_SIZE)) 63 - return XLATE(p, OMAP16XX_DSPREG_BASE, 64 - OMAP16XX_DSPREG_START); 65 - } 66 - #endif 67 - #ifdef CONFIG_ARCH_OMAP2 68 - if (cpu_is_omap24xx()) { 69 - if (BETWEEN(p, L3_24XX_PHYS, L3_24XX_SIZE)) 70 - return XLATE(p, L3_24XX_PHYS, L3_24XX_VIRT); 71 - if (BETWEEN(p, L4_24XX_PHYS, L4_24XX_SIZE)) 72 - return XLATE(p, L4_24XX_PHYS, L4_24XX_VIRT); 73 - } 74 - if (cpu_is_omap2420()) { 75 - if (BETWEEN(p, DSP_MEM_2420_PHYS, DSP_MEM_2420_SIZE)) 76 - return XLATE(p, DSP_MEM_2420_PHYS, DSP_MEM_2420_VIRT); 77 - if (BETWEEN(p, DSP_IPI_2420_PHYS, DSP_IPI_2420_SIZE)) 78 - return XLATE(p, DSP_IPI_2420_PHYS, DSP_IPI_2420_SIZE); 79 - if (BETWEEN(p, DSP_MMU_2420_PHYS, DSP_MMU_2420_SIZE)) 80 - return XLATE(p, DSP_MMU_2420_PHYS, DSP_MMU_2420_VIRT); 81 - } 82 - if (cpu_is_omap2430()) { 83 - if (BETWEEN(p, L4_WK_243X_PHYS, L4_WK_243X_SIZE)) 84 - return XLATE(p, L4_WK_243X_PHYS, L4_WK_243X_VIRT); 85 - if (BETWEEN(p, OMAP243X_GPMC_PHYS, OMAP243X_GPMC_SIZE)) 86 - return XLATE(p, OMAP243X_GPMC_PHYS, OMAP243X_GPMC_VIRT); 87 - if (BETWEEN(p, OMAP243X_SDRC_PHYS, OMAP243X_SDRC_SIZE)) 88 - return XLATE(p, OMAP243X_SDRC_PHYS, OMAP243X_SDRC_VIRT); 89 - if (BETWEEN(p, OMAP243X_SMS_PHYS, OMAP243X_SMS_SIZE)) 90 - return XLATE(p, OMAP243X_SMS_PHYS, OMAP243X_SMS_VIRT); 91 - } 92 - #endif 93 - #ifdef CONFIG_ARCH_OMAP3 94 - if (cpu_is_ti816x()) { 95 - if (BETWEEN(p, L4_34XX_PHYS, L4_34XX_SIZE)) 96 - return XLATE(p, L4_34XX_PHYS, L4_34XX_VIRT); 97 - } else if (cpu_is_omap34xx()) { 98 - if (BETWEEN(p, L3_34XX_PHYS, L3_34XX_SIZE)) 99 - return XLATE(p, L3_34XX_PHYS, L3_34XX_VIRT); 100 - if (BETWEEN(p, L4_34XX_PHYS, L4_34XX_SIZE)) 101 - return XLATE(p, L4_34XX_PHYS, L4_34XX_VIRT); 102 - if (BETWEEN(p, OMAP34XX_GPMC_PHYS, OMAP34XX_GPMC_SIZE)) 103 - return XLATE(p, OMAP34XX_GPMC_PHYS, OMAP34XX_GPMC_VIRT); 104 - if (BETWEEN(p, OMAP343X_SMS_PHYS, OMAP343X_SMS_SIZE)) 105 - return XLATE(p, OMAP343X_SMS_PHYS, OMAP343X_SMS_VIRT); 106 - if (BETWEEN(p, OMAP343X_SDRC_PHYS, OMAP343X_SDRC_SIZE)) 107 - return XLATE(p, OMAP343X_SDRC_PHYS, OMAP343X_SDRC_VIRT); 108 - if (BETWEEN(p, L4_PER_34XX_PHYS, L4_PER_34XX_SIZE)) 109 - return XLATE(p, L4_PER_34XX_PHYS, L4_PER_34XX_VIRT); 110 - if (BETWEEN(p, L4_EMU_34XX_PHYS, L4_EMU_34XX_SIZE)) 111 - return XLATE(p, L4_EMU_34XX_PHYS, L4_EMU_34XX_VIRT); 112 - } 113 - #endif 114 - #ifdef CONFIG_ARCH_OMAP4 115 - if (cpu_is_omap44xx()) { 116 - if (BETWEEN(p, L3_44XX_PHYS, L3_44XX_SIZE)) 117 - return XLATE(p, L3_44XX_PHYS, L3_44XX_VIRT); 118 - if (BETWEEN(p, L4_44XX_PHYS, L4_44XX_SIZE)) 119 - return XLATE(p, L4_44XX_PHYS, L4_44XX_VIRT); 120 - if (BETWEEN(p, OMAP44XX_GPMC_PHYS, OMAP44XX_GPMC_SIZE)) 121 - return XLATE(p, OMAP44XX_GPMC_PHYS, OMAP44XX_GPMC_VIRT); 122 - if (BETWEEN(p, OMAP44XX_EMIF1_PHYS, OMAP44XX_EMIF1_SIZE)) 123 - return XLATE(p, OMAP44XX_EMIF1_PHYS, \ 124 - OMAP44XX_EMIF1_VIRT); 125 - if (BETWEEN(p, OMAP44XX_EMIF2_PHYS, OMAP44XX_EMIF2_SIZE)) 126 - return XLATE(p, OMAP44XX_EMIF2_PHYS, \ 127 - OMAP44XX_EMIF2_VIRT); 128 - if (BETWEEN(p, OMAP44XX_DMM_PHYS, OMAP44XX_DMM_SIZE)) 129 - return XLATE(p, OMAP44XX_DMM_PHYS, OMAP44XX_DMM_VIRT); 130 - if (BETWEEN(p, L4_PER_44XX_PHYS, L4_PER_44XX_SIZE)) 131 - return XLATE(p, L4_PER_44XX_PHYS, L4_PER_44XX_VIRT); 132 - if (BETWEEN(p, L4_EMU_44XX_PHYS, L4_EMU_44XX_SIZE)) 133 - return XLATE(p, L4_EMU_44XX_PHYS, L4_EMU_44XX_VIRT); 134 - } 135 - #endif 136 - return __arm_ioremap_caller(p, size, type, __builtin_return_address(0)); 137 - } 138 - EXPORT_SYMBOL(omap_ioremap); 139 - 140 - void omap_iounmap(volatile void __iomem *addr) 141 - { 142 - unsigned long virt = (unsigned long)addr; 143 - 144 - if (virt >= VMALLOC_START && virt < VMALLOC_END) 145 - __iounmap(addr); 146 - } 147 - EXPORT_SYMBOL(omap_iounmap); 148 - 149 - void __init omap_init_consistent_dma_size(void) 150 - { 151 - #ifdef CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE 152 - init_consistent_dma_size(CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE << 20); 153 - #endif 154 - } 155 - 156 - void __init omap_ioremap_init(void) 157 - { 158 - initialized++; 159 - }
+3 -18
arch/arm/plat-orion/time.c
··· 12 12 */ 13 13 14 14 #include <linux/kernel.h> 15 - #include <linux/sched.h> 16 15 #include <linux/timer.h> 17 16 #include <linux/clockchips.h> 18 17 #include <linux/interrupt.h> ··· 59 60 * Orion's sched_clock implementation. It has a resolution of 60 61 * at least 7.5ns (133MHz TCLK). 61 62 */ 62 - static DEFINE_CLOCK_DATA(cd); 63 63 64 - unsigned long long notrace sched_clock(void) 64 + static u32 notrace orion_read_sched_clock(void) 65 65 { 66 - u32 cyc = ~readl(timer_base + TIMER0_VAL_OFF); 67 - return cyc_to_sched_clock(&cd, cyc, (u32)~0); 68 - } 69 - 70 - 71 - static void notrace orion_update_sched_clock(void) 72 - { 73 - u32 cyc = ~readl(timer_base + TIMER0_VAL_OFF); 74 - update_sched_clock(&cd, cyc, (u32)~0); 75 - } 76 - 77 - static void __init setup_sched_clock(unsigned long tclk) 78 - { 79 - init_sched_clock(&cd, orion_update_sched_clock, 32, tclk); 66 + return ~readl(timer_base + TIMER0_VAL_OFF); 80 67 } 81 68 82 69 /* ··· 202 217 /* 203 218 * Set scale and timer for sched_clock. 204 219 */ 205 - setup_sched_clock(tclk); 220 + setup_sched_clock(orion_read_sched_clock, 32, tclk); 206 221 207 222 /* 208 223 * Setup free-running clocksource timer (interrupts
+1
arch/arm/plat-s5p/Kconfig
··· 11 11 default y 12 12 select ARM_VIC if !ARCH_EXYNOS4 13 13 select ARM_GIC if ARCH_EXYNOS4 14 + select GIC_NON_BANKED if ARCH_EXYNOS4 14 15 select NO_IOPORT 15 16 select ARCH_REQUIRE_GPIOLIB 16 17 select S3C_GPIO_TRACK
+3 -16
arch/arm/plat-s5p/s5p-time.c
··· 10 10 * published by the Free Software Foundation. 11 11 */ 12 12 13 - #include <linux/sched.h> 14 13 #include <linux/interrupt.h> 15 14 #include <linux/irq.h> 16 15 #include <linux/err.h> ··· 320 321 * this wraps around for now, since it is just a relative time 321 322 * stamp. (Inspired by U300 implementation.) 322 323 */ 323 - static DEFINE_CLOCK_DATA(cd); 324 - 325 - unsigned long long notrace sched_clock(void) 324 + static u32 notrace s5p_read_sched_clock(void) 326 325 { 327 326 void __iomem *reg = s5p_timer_reg(); 328 327 329 328 if (!reg) 330 329 return 0; 331 330 332 - return cyc_to_sched_clock(&cd, ~__raw_readl(reg), (u32)~0); 333 - } 334 - 335 - static void notrace s5p_update_sched_clock(void) 336 - { 337 - void __iomem *reg = s5p_timer_reg(); 338 - 339 - if (!reg) 340 - return; 341 - 342 - update_sched_clock(&cd, ~__raw_readl(reg), (u32)~0); 331 + return ~__raw_readl(reg); 343 332 } 344 333 345 334 static void __init s5p_clocksource_init(void) ··· 345 358 s5p_time_setup(timer_source.source_id, TCNT_MAX); 346 359 s5p_time_start(timer_source.source_id, PERIODIC); 347 360 348 - init_sched_clock(&cd, s5p_update_sched_clock, 32, clock_rate); 361 + setup_sched_clock(s5p_read_sched_clock, 32, clock_rate); 349 362 350 363 if (clocksource_mmio_init(s5p_timer_reg(), "s5p_clocksource_timer", 351 364 clock_rate, 250, 32, clocksource_mmio_readl_down))
+1 -1
arch/arm/plat-spear/include/plat/system.h
··· 31 31 { 32 32 if (mode == 's') { 33 33 /* software reset, Jump into ROM at address 0 */ 34 - cpu_reset(0); 34 + soft_restart(0); 35 35 } else { 36 36 /* hardware reset, Use on-chip reset capability */ 37 37 sysctl_soft_reset((void __iomem *)VA_SPEAR_SYS_CTRL_BASE);
-19
arch/arm/plat-spear/include/plat/vmalloc.h
··· 1 - /* 2 - * arch/arm/plat-spear/include/plat/vmalloc.h 3 - * 4 - * Defining Vmalloc area for SPEAr platform 5 - * 6 - * Copyright (C) 2009 ST Microelectronics 7 - * Viresh Kumar<viresh.kumar@st.com> 8 - * 9 - * This file is licensed under the terms of the GNU General Public 10 - * License version 2. This program is licensed "as is" without any 11 - * warranty of any kind, whether express or implied. 12 - */ 13 - 14 - #ifndef __PLAT_VMALLOC_H 15 - #define __PLAT_VMALLOC_H 16 - 17 - #define VMALLOC_END 0xF0000000UL 18 - 19 - #endif /* __PLAT_VMALLOC_H */
-10
arch/arm/plat-tcc/include/mach/vmalloc.h
··· 1 - /* 2 - * Author: <linux@telechips.com> 3 - * Created: June 10, 2008 4 - * 5 - * Copyright (C) 2000 Russell King. 6 - * Copyright (C) 2008-2009 Telechips 7 - * 8 - * Licensed under the terms of the GPL v2. 9 - */ 10 - #define VMALLOC_END 0xf0000000UL
+6 -23
arch/arm/plat-versatile/sched-clock.c
··· 18 18 * along with this program; if not, write to the Free Software 19 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 20 */ 21 + #include <linux/kernel.h> 21 22 #include <linux/io.h> 22 - #include <linux/sched.h> 23 23 24 24 #include <asm/sched_clock.h> 25 25 #include <plat/sched_clock.h> 26 26 27 - static DEFINE_CLOCK_DATA(cd); 28 27 static void __iomem *ctr; 29 28 30 - /* 31 - * Constants generated by clocks_calc_mult_shift(m, s, 24MHz, NSEC_PER_SEC, 60). 32 - * This gives a resolution of about 41ns and a wrap period of about 178s. 33 - */ 34 - #define SC_MULT 2796202667u 35 - #define SC_SHIFT 26 36 - 37 - unsigned long long notrace sched_clock(void) 29 + static u32 notrace versatile_read_sched_clock(void) 38 30 { 39 - if (ctr) { 40 - u32 cyc = readl(ctr); 41 - return cyc_to_fixed_sched_clock(&cd, cyc, (u32)~0, 42 - SC_MULT, SC_SHIFT); 43 - } else 44 - return 0; 45 - } 31 + if (ctr) 32 + return readl(ctr); 46 33 47 - static void notrace versatile_update_sched_clock(void) 48 - { 49 - u32 cyc = readl(ctr); 50 - update_sched_clock(&cd, cyc, (u32)~0); 34 + return 0; 51 35 } 52 36 53 37 void __init versatile_sched_clock_init(void __iomem *reg, unsigned long rate) 54 38 { 55 39 ctr = reg; 56 - init_fixed_sched_clock(&cd, versatile_update_sched_clock, 57 - 32, rate, SC_MULT, SC_SHIFT); 40 + setup_sched_clock(versatile_read_sched_clock, 32, rate); 58 41 }
+3 -13
drivers/clocksource/clksrc-dbx500-prcmu.c
··· 58 58 }; 59 59 60 60 #ifdef CONFIG_CLKSRC_DBX500_PRCMU_SCHED_CLOCK 61 - static DEFINE_CLOCK_DATA(cd); 62 61 63 - unsigned long long notrace sched_clock(void) 62 + static u32 notrace dbx500_prcmu_sched_clock_read(void) 64 63 { 65 - u32 cyc; 66 - 67 64 if (unlikely(!clksrc_dbx500_timer_base)) 68 65 return 0; 69 66 70 - cyc = clksrc_dbx500_prcmu_read(&clocksource_dbx500_prcmu); 71 - 72 - return cyc_to_sched_clock(&cd, cyc, (u32)~0); 67 + return clksrc_dbx500_prcmu_read(&clocksource_dbx500_prcmu); 73 68 } 74 69 75 - static void notrace clksrc_dbx500_prcmu_update_sched_clock(void) 76 - { 77 - u32 cyc = clksrc_dbx500_prcmu_read(&clocksource_dbx500_prcmu); 78 - update_sched_clock(&cd, cyc, (u32)~0); 79 - } 80 70 #endif 81 71 82 72 void __init clksrc_dbx500_prcmu_init(void __iomem *base) ··· 87 97 clksrc_dbx500_timer_base + PRCMU_TIMER_REF); 88 98 } 89 99 #ifdef CONFIG_CLKSRC_DBX500_PRCMU_SCHED_CLOCK 90 - init_sched_clock(&cd, clksrc_dbx500_prcmu_update_sched_clock, 100 + setup_sched_clock(dbx500_prcmu_sched_clock_read, 91 101 32, RATE_32K); 92 102 #endif 93 103 clocksource_calc_mult_shift(&clocksource_dbx500_prcmu,
+2 -1
include/linux/irqdomain.h
··· 91 91 92 92 extern void irq_domain_add(struct irq_domain *domain); 93 93 extern void irq_domain_del(struct irq_domain *domain); 94 + 95 + extern struct irq_domain_ops irq_domain_simple_ops; 94 96 #endif /* CONFIG_IRQ_DOMAIN */ 95 97 96 98 #if defined(CONFIG_IRQ_DOMAIN) && defined(CONFIG_OF_IRQ) 97 - extern struct irq_domain_ops irq_domain_simple_ops; 98 99 extern void irq_domain_add_simple(struct device_node *controller, int irq_base); 99 100 extern void irq_domain_generate_simple(const struct of_device_id *match, 100 101 u64 phys_base, unsigned int irq_start);
+1
include/linux/vmalloc.h
··· 131 131 */ 132 132 extern rwlock_t vmlist_lock; 133 133 extern struct vm_struct *vmlist; 134 + extern __init void vm_area_add_early(struct vm_struct *vm); 134 135 extern __init void vm_area_register_early(struct vm_struct *vm, size_t align); 135 136 136 137 #ifdef CONFIG_SMP
+7 -5
kernel/irq/irqdomain.c
··· 143 143 return 0; 144 144 } 145 145 146 - struct irq_domain_ops irq_domain_simple_ops = { 147 - .dt_translate = irq_domain_simple_dt_translate, 148 - }; 149 - EXPORT_SYMBOL_GPL(irq_domain_simple_ops); 150 - 151 146 /** 152 147 * irq_domain_create_simple() - Set up a 'simple' translation range 153 148 */ ··· 177 182 } 178 183 EXPORT_SYMBOL_GPL(irq_domain_generate_simple); 179 184 #endif /* CONFIG_OF_IRQ */ 185 + 186 + struct irq_domain_ops irq_domain_simple_ops = { 187 + #ifdef CONFIG_OF_IRQ 188 + .dt_translate = irq_domain_simple_dt_translate, 189 + #endif /* CONFIG_OF_IRQ */ 190 + }; 191 + EXPORT_SYMBOL_GPL(irq_domain_simple_ops);
+27 -2
mm/vmalloc.c
··· 1118 1118 EXPORT_SYMBOL(vm_map_ram); 1119 1119 1120 1120 /** 1121 + * vm_area_add_early - add vmap area early during boot 1122 + * @vm: vm_struct to add 1123 + * 1124 + * This function is used to add fixed kernel vm area to vmlist before 1125 + * vmalloc_init() is called. @vm->addr, @vm->size, and @vm->flags 1126 + * should contain proper values and the other fields should be zero. 1127 + * 1128 + * DO NOT USE THIS FUNCTION UNLESS YOU KNOW WHAT YOU'RE DOING. 1129 + */ 1130 + void __init vm_area_add_early(struct vm_struct *vm) 1131 + { 1132 + struct vm_struct *tmp, **p; 1133 + 1134 + BUG_ON(vmap_initialized); 1135 + for (p = &vmlist; (tmp = *p) != NULL; p = &tmp->next) { 1136 + if (tmp->addr >= vm->addr) { 1137 + BUG_ON(tmp->addr < vm->addr + vm->size); 1138 + break; 1139 + } else 1140 + BUG_ON(tmp->addr + tmp->size > vm->addr); 1141 + } 1142 + vm->next = *p; 1143 + *p = vm; 1144 + } 1145 + 1146 + /** 1121 1147 * vm_area_register_early - register vmap area early during boot 1122 1148 * @vm: vm_struct to register 1123 1149 * @align: requested alignment ··· 1165 1139 1166 1140 vm->addr = (void *)addr; 1167 1141 1168 - vm->next = vmlist; 1169 - vmlist = vm; 1142 + vm_area_add_early(vm); 1170 1143 } 1171 1144 1172 1145 void __init vmalloc_init(void)