diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-28 15:02:27 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-28 15:02:27 -0400 |
commit | 1fdb24e969110fafea36d3b393bea438f702c87f (patch) | |
tree | 47a1dfef8a259e7922285315f8a02d31b4efe2f1 /arch/arm/include/asm | |
parent | f362f98e7c445643d27c610bb7a86b79727b592e (diff) | |
parent | 531a6a941745e1e045dd2a6bd09e1dc01247a5f3 (diff) |
Merge branch 'devel-stable' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm
* 'devel-stable' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm: (178 commits)
ARM: 7139/1: fix compilation with CONFIG_ARM_ATAG_DTB_COMPAT and large TEXT_OFFSET
ARM: gic, local timers: use the request_percpu_irq() interface
ARM: gic: consolidate PPI handling
ARM: switch from NO_MACH_MEMORY_H to NEED_MACH_MEMORY_H
ARM: mach-s5p64x0: remove mach/memory.h
ARM: mach-s3c64xx: remove mach/memory.h
ARM: plat-mxc: remove mach/memory.h
ARM: mach-prima2: remove mach/memory.h
ARM: mach-zynq: remove mach/memory.h
ARM: mach-bcmring: remove mach/memory.h
ARM: mach-davinci: remove mach/memory.h
ARM: mach-pxa: remove mach/memory.h
ARM: mach-ixp4xx: remove mach/memory.h
ARM: mach-h720x: remove mach/memory.h
ARM: mach-vt8500: remove mach/memory.h
ARM: mach-s5pc100: remove mach/memory.h
ARM: mach-tegra: remove mach/memory.h
ARM: plat-tcc: remove mach/memory.h
ARM: mach-mmp: remove mach/memory.h
ARM: mach-cns3xxx: remove mach/memory.h
...
Fix up mostly pretty trivial conflicts in:
- arch/arm/Kconfig
- arch/arm/include/asm/localtimer.h
- arch/arm/kernel/Makefile
- arch/arm/mach-shmobile/board-ap4evb.c
- arch/arm/mach-u300/core.c
- arch/arm/mm/dma-mapping.c
- arch/arm/mm/proc-v7.S
- arch/arm/plat-omap/Kconfig
largely due to some CONFIG option renaming (ie CONFIG_PM_SLEEP ->
CONFIG_ARM_CPU_SUSPEND for the arm-specific suspend code etc) and
addition of NEED_MACH_MEMORY_H next to HAVE_IDE.
Diffstat (limited to 'arch/arm/include/asm')
-rw-r--r-- | arch/arm/include/asm/dma-mapping.h | 7 | ||||
-rw-r--r-- | arch/arm/include/asm/entry-macro-multi.S | 7 | ||||
-rw-r--r-- | arch/arm/include/asm/hardirq.h | 3 | ||||
-rw-r--r-- | arch/arm/include/asm/hardware/entry-macro-gic.S | 19 | ||||
-rw-r--r-- | arch/arm/include/asm/hardware/gic.h | 9 | ||||
-rw-r--r-- | arch/arm/include/asm/hw_breakpoint.h | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/localtimer.h | 22 | ||||
-rw-r--r-- | arch/arm/include/asm/mach/arch.h | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/mach/map.h | 1 | ||||
-rw-r--r-- | arch/arm/include/asm/memory.h | 18 | ||||
-rw-r--r-- | arch/arm/include/asm/pgtable.h | 3 | ||||
-rw-r--r-- | arch/arm/include/asm/pmu.h | 93 | ||||
-rw-r--r-- | arch/arm/include/asm/proc-fns.h | 8 | ||||
-rw-r--r-- | arch/arm/include/asm/smp.h | 5 | ||||
-rw-r--r-- | arch/arm/include/asm/smp_twd.h | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/suspend.h | 17 |
16 files changed, 124 insertions, 94 deletions
diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h index 28b7ee8d7398..cb3b7c981c4b 100644 --- a/arch/arm/include/asm/dma-mapping.h +++ b/arch/arm/include/asm/dma-mapping.h | |||
@@ -205,6 +205,13 @@ extern void *dma_alloc_writecombine(struct device *, size_t, dma_addr_t *, | |||
205 | int dma_mmap_writecombine(struct device *, struct vm_area_struct *, | 205 | int dma_mmap_writecombine(struct device *, struct vm_area_struct *, |
206 | void *, dma_addr_t, size_t); | 206 | void *, dma_addr_t, size_t); |
207 | 207 | ||
208 | /* | ||
209 | * This can be called during boot to increase the size of the consistent | ||
210 | * DMA region above it's default value of 2MB. It must be called before the | ||
211 | * memory allocator is initialised, i.e. before any core_initcall. | ||
212 | */ | ||
213 | extern void __init init_consistent_dma_size(unsigned long size); | ||
214 | |||
208 | 215 | ||
209 | #ifdef CONFIG_DMABOUNCE | 216 | #ifdef CONFIG_DMABOUNCE |
210 | /* | 217 | /* |
diff --git a/arch/arm/include/asm/entry-macro-multi.S b/arch/arm/include/asm/entry-macro-multi.S index 2f1e2098dfe7..88d61815f0c0 100644 --- a/arch/arm/include/asm/entry-macro-multi.S +++ b/arch/arm/include/asm/entry-macro-multi.S | |||
@@ -25,13 +25,6 @@ | |||
25 | movne r1, sp | 25 | movne r1, sp |
26 | adrne lr, BSYM(1b) | 26 | adrne lr, BSYM(1b) |
27 | bne do_IPI | 27 | bne do_IPI |
28 | |||
29 | #ifdef CONFIG_LOCAL_TIMERS | ||
30 | test_for_ltirq r0, r2, r6, lr | ||
31 | movne r0, sp | ||
32 | adrne lr, BSYM(1b) | ||
33 | bne do_local_timer | ||
34 | #endif | ||
35 | #endif | 28 | #endif |
36 | 9997: | 29 | 9997: |
37 | .endm | 30 | .endm |
diff --git a/arch/arm/include/asm/hardirq.h b/arch/arm/include/asm/hardirq.h index 89ad1805e579..ddf07a92a6c8 100644 --- a/arch/arm/include/asm/hardirq.h +++ b/arch/arm/include/asm/hardirq.h | |||
@@ -9,9 +9,6 @@ | |||
9 | 9 | ||
10 | typedef struct { | 10 | typedef struct { |
11 | unsigned int __softirq_pending; | 11 | unsigned int __softirq_pending; |
12 | #ifdef CONFIG_LOCAL_TIMERS | ||
13 | unsigned int local_timer_irqs; | ||
14 | #endif | ||
15 | #ifdef CONFIG_SMP | 12 | #ifdef CONFIG_SMP |
16 | unsigned int ipi_irqs[NR_IPI]; | 13 | unsigned int ipi_irqs[NR_IPI]; |
17 | #endif | 14 | #endif |
diff --git a/arch/arm/include/asm/hardware/entry-macro-gic.S b/arch/arm/include/asm/hardware/entry-macro-gic.S index c115b82fe80a..74ebc803904d 100644 --- a/arch/arm/include/asm/hardware/entry-macro-gic.S +++ b/arch/arm/include/asm/hardware/entry-macro-gic.S | |||
@@ -22,15 +22,11 @@ | |||
22 | * interrupt controller spec. To wit: | 22 | * interrupt controller spec. To wit: |
23 | * | 23 | * |
24 | * Interrupts 0-15 are IPI | 24 | * Interrupts 0-15 are IPI |
25 | * 16-28 are reserved | 25 | * 16-31 are local. We allow 30 to be used for the watchdog. |
26 | * 29-31 are local. We allow 30 to be used for the watchdog. | ||
27 | * 32-1020 are global | 26 | * 32-1020 are global |
28 | * 1021-1022 are reserved | 27 | * 1021-1022 are reserved |
29 | * 1023 is "spurious" (no interrupt) | 28 | * 1023 is "spurious" (no interrupt) |
30 | * | 29 | * |
31 | * For now, we ignore all local interrupts so only return an interrupt if it's | ||
32 | * between 30 and 1020. The test_for_ipi routine below will pick up on IPIs. | ||
33 | * | ||
34 | * A simple read from the controller will tell us the number of the highest | 30 | * A simple read from the controller will tell us the number of the highest |
35 | * priority enabled interrupt. We then just need to check whether it is in the | 31 | * priority enabled interrupt. We then just need to check whether it is in the |
36 | * valid range for an IRQ (30-1020 inclusive). | 32 | * valid range for an IRQ (30-1020 inclusive). |
@@ -43,7 +39,7 @@ | |||
43 | 39 | ||
44 | ldr \tmp, =1021 | 40 | ldr \tmp, =1021 |
45 | bic \irqnr, \irqstat, #0x1c00 | 41 | bic \irqnr, \irqstat, #0x1c00 |
46 | cmp \irqnr, #29 | 42 | cmp \irqnr, #15 |
47 | cmpcc \irqnr, \irqnr | 43 | cmpcc \irqnr, \irqnr |
48 | cmpne \irqnr, \tmp | 44 | cmpne \irqnr, \tmp |
49 | cmpcs \irqnr, \irqnr | 45 | cmpcs \irqnr, \irqnr |
@@ -62,14 +58,3 @@ | |||
62 | strcc \irqstat, [\base, #GIC_CPU_EOI] | 58 | strcc \irqstat, [\base, #GIC_CPU_EOI] |
63 | cmpcs \irqnr, \irqnr | 59 | cmpcs \irqnr, \irqnr |
64 | .endm | 60 | .endm |
65 | |||
66 | /* As above, this assumes that irqstat and base are preserved.. */ | ||
67 | |||
68 | .macro test_for_ltirq, irqnr, irqstat, base, tmp | ||
69 | bic \irqnr, \irqstat, #0x1c00 | ||
70 | mov \tmp, #0 | ||
71 | cmp \irqnr, #29 | ||
72 | moveq \tmp, #1 | ||
73 | streq \irqstat, [\base, #GIC_CPU_EOI] | ||
74 | cmp \tmp, #0 | ||
75 | .endm | ||
diff --git a/arch/arm/include/asm/hardware/gic.h b/arch/arm/include/asm/hardware/gic.h index 435d3f86c708..14867e12f205 100644 --- a/arch/arm/include/asm/hardware/gic.h +++ b/arch/arm/include/asm/hardware/gic.h | |||
@@ -40,12 +40,19 @@ void gic_init(unsigned int, unsigned int, void __iomem *, void __iomem *); | |||
40 | void gic_secondary_init(unsigned int); | 40 | void gic_secondary_init(unsigned int); |
41 | void gic_cascade_irq(unsigned int gic_nr, unsigned int irq); | 41 | void gic_cascade_irq(unsigned int gic_nr, unsigned int irq); |
42 | void gic_raise_softirq(const struct cpumask *mask, unsigned int irq); | 42 | void gic_raise_softirq(const struct cpumask *mask, unsigned int irq); |
43 | void gic_enable_ppi(unsigned int); | ||
44 | 43 | ||
45 | struct gic_chip_data { | 44 | struct gic_chip_data { |
46 | unsigned int irq_offset; | 45 | unsigned int irq_offset; |
47 | void __iomem *dist_base; | 46 | void __iomem *dist_base; |
48 | void __iomem *cpu_base; | 47 | void __iomem *cpu_base; |
48 | #ifdef CONFIG_CPU_PM | ||
49 | u32 saved_spi_enable[DIV_ROUND_UP(1020, 32)]; | ||
50 | u32 saved_spi_conf[DIV_ROUND_UP(1020, 16)]; | ||
51 | u32 saved_spi_target[DIV_ROUND_UP(1020, 4)]; | ||
52 | u32 __percpu *saved_ppi_enable; | ||
53 | u32 __percpu *saved_ppi_conf; | ||
54 | #endif | ||
55 | unsigned int gic_irqs; | ||
49 | }; | 56 | }; |
50 | #endif | 57 | #endif |
51 | 58 | ||
diff --git a/arch/arm/include/asm/hw_breakpoint.h b/arch/arm/include/asm/hw_breakpoint.h index f389b2704d82..c190bc992f0e 100644 --- a/arch/arm/include/asm/hw_breakpoint.h +++ b/arch/arm/include/asm/hw_breakpoint.h | |||
@@ -50,6 +50,7 @@ static inline void decode_ctrl_reg(u32 reg, | |||
50 | #define ARM_DEBUG_ARCH_V6_1 2 | 50 | #define ARM_DEBUG_ARCH_V6_1 2 |
51 | #define ARM_DEBUG_ARCH_V7_ECP14 3 | 51 | #define ARM_DEBUG_ARCH_V7_ECP14 3 |
52 | #define ARM_DEBUG_ARCH_V7_MM 4 | 52 | #define ARM_DEBUG_ARCH_V7_MM 4 |
53 | #define ARM_DEBUG_ARCH_V7_1 5 | ||
53 | 54 | ||
54 | /* Breakpoint */ | 55 | /* Breakpoint */ |
55 | #define ARM_BREAKPOINT_EXECUTE 0 | 56 | #define ARM_BREAKPOINT_EXECUTE 0 |
@@ -57,6 +58,7 @@ static inline void decode_ctrl_reg(u32 reg, | |||
57 | /* Watchpoints */ | 58 | /* Watchpoints */ |
58 | #define ARM_BREAKPOINT_LOAD 1 | 59 | #define ARM_BREAKPOINT_LOAD 1 |
59 | #define ARM_BREAKPOINT_STORE 2 | 60 | #define ARM_BREAKPOINT_STORE 2 |
61 | #define ARM_FSR_ACCESS_MASK (1 << 11) | ||
60 | 62 | ||
61 | /* Privilege Levels */ | 63 | /* Privilege Levels */ |
62 | #define ARM_BREAKPOINT_PRIV 1 | 64 | #define ARM_BREAKPOINT_PRIV 1 |
diff --git a/arch/arm/include/asm/localtimer.h b/arch/arm/include/asm/localtimer.h index 6fd955d34c65..c6a18424888e 100644 --- a/arch/arm/include/asm/localtimer.h +++ b/arch/arm/include/asm/localtimer.h | |||
@@ -11,6 +11,7 @@ | |||
11 | #define __ASM_ARM_LOCALTIMER_H | 11 | #define __ASM_ARM_LOCALTIMER_H |
12 | 12 | ||
13 | #include <linux/errno.h> | 13 | #include <linux/errno.h> |
14 | #include <linux/interrupt.h> | ||
14 | 15 | ||
15 | struct clock_event_device; | 16 | struct clock_event_device; |
16 | 17 | ||
@@ -19,31 +20,20 @@ struct clock_event_device; | |||
19 | */ | 20 | */ |
20 | void percpu_timer_setup(void); | 21 | void percpu_timer_setup(void); |
21 | 22 | ||
22 | /* | ||
23 | * Called from assembly, this is the local timer IRQ handler | ||
24 | */ | ||
25 | asmlinkage void do_local_timer(struct pt_regs *); | ||
26 | |||
27 | /* | ||
28 | * Called from C code | ||
29 | */ | ||
30 | void handle_local_timer(struct pt_regs *); | ||
31 | |||
32 | #ifdef CONFIG_LOCAL_TIMERS | 23 | #ifdef CONFIG_LOCAL_TIMERS |
33 | 24 | ||
34 | #ifdef CONFIG_HAVE_ARM_TWD | 25 | #ifdef CONFIG_HAVE_ARM_TWD |
35 | 26 | ||
36 | #include "smp_twd.h" | 27 | #include "smp_twd.h" |
37 | 28 | ||
38 | #define local_timer_ack() twd_timer_ack() | 29 | #define local_timer_stop(c) twd_timer_stop((c)) |
39 | 30 | ||
40 | #else | 31 | #else |
41 | 32 | ||
42 | /* | 33 | /* |
43 | * Platform provides this to acknowledge a local timer IRQ. | 34 | * Stop the local timer |
44 | * Returns true if the local timer IRQ is to be processed. | ||
45 | */ | 35 | */ |
46 | int local_timer_ack(void); | 36 | void local_timer_stop(struct clock_event_device *); |
47 | 37 | ||
48 | #endif | 38 | #endif |
49 | 39 | ||
@@ -58,6 +48,10 @@ static inline int local_timer_setup(struct clock_event_device *evt) | |||
58 | { | 48 | { |
59 | return -ENXIO; | 49 | return -ENXIO; |
60 | } | 50 | } |
51 | |||
52 | static inline void local_timer_stop(struct clock_event_device *evt) | ||
53 | { | ||
54 | } | ||
61 | #endif | 55 | #endif |
62 | 56 | ||
63 | #endif | 57 | #endif |
diff --git a/arch/arm/include/asm/mach/arch.h b/arch/arm/include/asm/mach/arch.h index c5699987fa98..7d19425dd496 100644 --- a/arch/arm/include/asm/mach/arch.h +++ b/arch/arm/include/asm/mach/arch.h | |||
@@ -17,7 +17,7 @@ struct sys_timer; | |||
17 | struct machine_desc { | 17 | struct machine_desc { |
18 | unsigned int nr; /* architecture number */ | 18 | unsigned int nr; /* architecture number */ |
19 | const char *name; /* architecture name */ | 19 | const char *name; /* architecture name */ |
20 | unsigned long boot_params; /* tagged list */ | 20 | unsigned long atag_offset; /* tagged list (relative) */ |
21 | const char **dt_compat; /* array of device tree | 21 | const char **dt_compat; /* array of device tree |
22 | * 'compatible' strings */ | 22 | * 'compatible' strings */ |
23 | 23 | ||
diff --git a/arch/arm/include/asm/mach/map.h b/arch/arm/include/asm/mach/map.h index d2fedb5aeb1f..b36f3654bf54 100644 --- a/arch/arm/include/asm/mach/map.h +++ b/arch/arm/include/asm/mach/map.h | |||
@@ -29,6 +29,7 @@ struct map_desc { | |||
29 | #define MT_MEMORY_NONCACHED 11 | 29 | #define MT_MEMORY_NONCACHED 11 |
30 | #define MT_MEMORY_DTCM 12 | 30 | #define MT_MEMORY_DTCM 12 |
31 | #define MT_MEMORY_ITCM 13 | 31 | #define MT_MEMORY_ITCM 13 |
32 | #define MT_MEMORY_SO 14 | ||
32 | 33 | ||
33 | #ifdef CONFIG_MMU | 34 | #ifdef CONFIG_MMU |
34 | extern void iotable_init(struct map_desc *, int); | 35 | extern void iotable_init(struct map_desc *, int); |
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h index 441fc4fe8263..a8997d71084e 100644 --- a/arch/arm/include/asm/memory.h +++ b/arch/arm/include/asm/memory.h | |||
@@ -16,9 +16,12 @@ | |||
16 | #include <linux/compiler.h> | 16 | #include <linux/compiler.h> |
17 | #include <linux/const.h> | 17 | #include <linux/const.h> |
18 | #include <linux/types.h> | 18 | #include <linux/types.h> |
19 | #include <mach/memory.h> | ||
20 | #include <asm/sizes.h> | 19 | #include <asm/sizes.h> |
21 | 20 | ||
21 | #ifdef CONFIG_NEED_MACH_MEMORY_H | ||
22 | #include <mach/memory.h> | ||
23 | #endif | ||
24 | |||
22 | /* | 25 | /* |
23 | * Allow for constants defined here to be used from assembly code | 26 | * Allow for constants defined here to be used from assembly code |
24 | * by prepending the UL suffix only with actual C code compilation. | 27 | * by prepending the UL suffix only with actual C code compilation. |
@@ -77,16 +80,7 @@ | |||
77 | */ | 80 | */ |
78 | #define IOREMAP_MAX_ORDER 24 | 81 | #define IOREMAP_MAX_ORDER 24 |
79 | 82 | ||
80 | /* | ||
81 | * Size of DMA-consistent memory region. Must be multiple of 2M, | ||
82 | * between 2MB and 14MB inclusive. | ||
83 | */ | ||
84 | #ifndef CONSISTENT_DMA_SIZE | ||
85 | #define CONSISTENT_DMA_SIZE SZ_2M | ||
86 | #endif | ||
87 | |||
88 | #define CONSISTENT_END (0xffe00000UL) | 83 | #define CONSISTENT_END (0xffe00000UL) |
89 | #define CONSISTENT_BASE (CONSISTENT_END - CONSISTENT_DMA_SIZE) | ||
90 | 84 | ||
91 | #else /* CONFIG_MMU */ | 85 | #else /* CONFIG_MMU */ |
92 | 86 | ||
@@ -193,7 +187,11 @@ static inline unsigned long __phys_to_virt(unsigned long x) | |||
193 | #endif | 187 | #endif |
194 | 188 | ||
195 | #ifndef PHYS_OFFSET | 189 | #ifndef PHYS_OFFSET |
190 | #ifdef PLAT_PHYS_OFFSET | ||
196 | #define PHYS_OFFSET PLAT_PHYS_OFFSET | 191 | #define PHYS_OFFSET PLAT_PHYS_OFFSET |
192 | #else | ||
193 | #define PHYS_OFFSET UL(CONFIG_PHYS_OFFSET) | ||
194 | #endif | ||
197 | #endif | 195 | #endif |
198 | 196 | ||
199 | /* | 197 | /* |
diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h index 8ade1840c6f2..9451dce3a553 100644 --- a/arch/arm/include/asm/pgtable.h +++ b/arch/arm/include/asm/pgtable.h | |||
@@ -101,6 +101,9 @@ extern pgprot_t pgprot_kernel; | |||
101 | #define pgprot_writecombine(prot) \ | 101 | #define pgprot_writecombine(prot) \ |
102 | __pgprot_modify(prot, L_PTE_MT_MASK, L_PTE_MT_BUFFERABLE) | 102 | __pgprot_modify(prot, L_PTE_MT_MASK, L_PTE_MT_BUFFERABLE) |
103 | 103 | ||
104 | #define pgprot_stronglyordered(prot) \ | ||
105 | __pgprot_modify(prot, L_PTE_MT_MASK, L_PTE_MT_UNCACHED) | ||
106 | |||
104 | #ifdef CONFIG_ARM_DMA_MEM_BUFFERABLE | 107 | #ifdef CONFIG_ARM_DMA_MEM_BUFFERABLE |
105 | #define pgprot_dmacoherent(prot) \ | 108 | #define pgprot_dmacoherent(prot) \ |
106 | __pgprot_modify(prot, L_PTE_MT_MASK, L_PTE_MT_BUFFERABLE | L_PTE_XN) | 109 | __pgprot_modify(prot, L_PTE_MT_MASK, L_PTE_MT_BUFFERABLE | L_PTE_XN) |
diff --git a/arch/arm/include/asm/pmu.h b/arch/arm/include/asm/pmu.h index b7e82c4aced6..71d99b83cdb9 100644 --- a/arch/arm/include/asm/pmu.h +++ b/arch/arm/include/asm/pmu.h | |||
@@ -13,7 +13,12 @@ | |||
13 | #define __ARM_PMU_H__ | 13 | #define __ARM_PMU_H__ |
14 | 14 | ||
15 | #include <linux/interrupt.h> | 15 | #include <linux/interrupt.h> |
16 | #include <linux/perf_event.h> | ||
16 | 17 | ||
18 | /* | ||
19 | * Types of PMUs that can be accessed directly and require mutual | ||
20 | * exclusion between profiling tools. | ||
21 | */ | ||
17 | enum arm_pmu_type { | 22 | enum arm_pmu_type { |
18 | ARM_PMU_DEVICE_CPU = 0, | 23 | ARM_PMU_DEVICE_CPU = 0, |
19 | ARM_NUM_PMU_DEVICES, | 24 | ARM_NUM_PMU_DEVICES, |
@@ -37,21 +42,17 @@ struct arm_pmu_platdata { | |||
37 | * reserve_pmu() - reserve the hardware performance counters | 42 | * reserve_pmu() - reserve the hardware performance counters |
38 | * | 43 | * |
39 | * Reserve the hardware performance counters in the system for exclusive use. | 44 | * Reserve the hardware performance counters in the system for exclusive use. |
40 | * The platform_device for the system is returned on success, ERR_PTR() | 45 | * Returns 0 on success or -EBUSY if the lock is already held. |
41 | * encoded error on failure. | ||
42 | */ | 46 | */ |
43 | extern struct platform_device * | 47 | extern int |
44 | reserve_pmu(enum arm_pmu_type type); | 48 | reserve_pmu(enum arm_pmu_type type); |
45 | 49 | ||
46 | /** | 50 | /** |
47 | * release_pmu() - Relinquish control of the performance counters | 51 | * release_pmu() - Relinquish control of the performance counters |
48 | * | 52 | * |
49 | * Release the performance counters and allow someone else to use them. | 53 | * Release the performance counters and allow someone else to use them. |
50 | * Callers must have disabled the counters and released IRQs before calling | ||
51 | * this. The platform_device returned from reserve_pmu() must be passed as | ||
52 | * a cookie. | ||
53 | */ | 54 | */ |
54 | extern int | 55 | extern void |
55 | release_pmu(enum arm_pmu_type type); | 56 | release_pmu(enum arm_pmu_type type); |
56 | 57 | ||
57 | /** | 58 | /** |
@@ -68,24 +69,78 @@ init_pmu(enum arm_pmu_type type); | |||
68 | 69 | ||
69 | #include <linux/err.h> | 70 | #include <linux/err.h> |
70 | 71 | ||
71 | static inline struct platform_device * | ||
72 | reserve_pmu(enum arm_pmu_type type) | ||
73 | { | ||
74 | return ERR_PTR(-ENODEV); | ||
75 | } | ||
76 | |||
77 | static inline int | 72 | static inline int |
78 | release_pmu(enum arm_pmu_type type) | 73 | reserve_pmu(enum arm_pmu_type type) |
79 | { | 74 | { |
80 | return -ENODEV; | 75 | return -ENODEV; |
81 | } | 76 | } |
82 | 77 | ||
83 | static inline int | 78 | static inline void |
84 | init_pmu(enum arm_pmu_type type) | 79 | release_pmu(enum arm_pmu_type type) { } |
85 | { | ||
86 | return -ENODEV; | ||
87 | } | ||
88 | 80 | ||
89 | #endif /* CONFIG_CPU_HAS_PMU */ | 81 | #endif /* CONFIG_CPU_HAS_PMU */ |
90 | 82 | ||
83 | #ifdef CONFIG_HW_PERF_EVENTS | ||
84 | |||
85 | /* The events for a given PMU register set. */ | ||
86 | struct pmu_hw_events { | ||
87 | /* | ||
88 | * The events that are active on the PMU for the given index. | ||
89 | */ | ||
90 | struct perf_event **events; | ||
91 | |||
92 | /* | ||
93 | * A 1 bit for an index indicates that the counter is being used for | ||
94 | * an event. A 0 means that the counter can be used. | ||
95 | */ | ||
96 | unsigned long *used_mask; | ||
97 | |||
98 | /* | ||
99 | * Hardware lock to serialize accesses to PMU registers. Needed for the | ||
100 | * read/modify/write sequences. | ||
101 | */ | ||
102 | raw_spinlock_t pmu_lock; | ||
103 | }; | ||
104 | |||
105 | struct arm_pmu { | ||
106 | struct pmu pmu; | ||
107 | enum arm_perf_pmu_ids id; | ||
108 | enum arm_pmu_type type; | ||
109 | cpumask_t active_irqs; | ||
110 | const char *name; | ||
111 | irqreturn_t (*handle_irq)(int irq_num, void *dev); | ||
112 | void (*enable)(struct hw_perf_event *evt, int idx); | ||
113 | void (*disable)(struct hw_perf_event *evt, int idx); | ||
114 | int (*get_event_idx)(struct pmu_hw_events *hw_events, | ||
115 | struct hw_perf_event *hwc); | ||
116 | int (*set_event_filter)(struct hw_perf_event *evt, | ||
117 | struct perf_event_attr *attr); | ||
118 | u32 (*read_counter)(int idx); | ||
119 | void (*write_counter)(int idx, u32 val); | ||
120 | void (*start)(void); | ||
121 | void (*stop)(void); | ||
122 | void (*reset)(void *); | ||
123 | int (*map_event)(struct perf_event *event); | ||
124 | int num_events; | ||
125 | atomic_t active_events; | ||
126 | struct mutex reserve_mutex; | ||
127 | u64 max_period; | ||
128 | struct platform_device *plat_device; | ||
129 | struct pmu_hw_events *(*get_hw_events)(void); | ||
130 | }; | ||
131 | |||
132 | #define to_arm_pmu(p) (container_of(p, struct arm_pmu, pmu)) | ||
133 | |||
134 | int __init armpmu_register(struct arm_pmu *armpmu, char *name, int type); | ||
135 | |||
136 | u64 armpmu_event_update(struct perf_event *event, | ||
137 | struct hw_perf_event *hwc, | ||
138 | int idx, int overflow); | ||
139 | |||
140 | int armpmu_event_set_period(struct perf_event *event, | ||
141 | struct hw_perf_event *hwc, | ||
142 | int idx); | ||
143 | |||
144 | #endif /* CONFIG_HW_PERF_EVENTS */ | ||
145 | |||
91 | #endif /* __ARM_PMU_H__ */ | 146 | #endif /* __ARM_PMU_H__ */ |
diff --git a/arch/arm/include/asm/proc-fns.h b/arch/arm/include/asm/proc-fns.h index 633d1cb84d87..9e92cb205e65 100644 --- a/arch/arm/include/asm/proc-fns.h +++ b/arch/arm/include/asm/proc-fns.h | |||
@@ -81,6 +81,10 @@ extern void cpu_dcache_clean_area(void *, int); | |||
81 | extern void cpu_do_switch_mm(unsigned long pgd_phys, struct mm_struct *mm); | 81 | extern void cpu_do_switch_mm(unsigned long pgd_phys, struct mm_struct *mm); |
82 | extern void cpu_set_pte_ext(pte_t *ptep, pte_t pte, unsigned int ext); | 82 | extern void cpu_set_pte_ext(pte_t *ptep, pte_t pte, unsigned int ext); |
83 | extern void cpu_reset(unsigned long addr) __attribute__((noreturn)); | 83 | extern void cpu_reset(unsigned long addr) __attribute__((noreturn)); |
84 | |||
85 | /* These three are private to arch/arm/kernel/suspend.c */ | ||
86 | extern void cpu_do_suspend(void *); | ||
87 | extern void cpu_do_resume(void *); | ||
84 | #else | 88 | #else |
85 | #define cpu_proc_init processor._proc_init | 89 | #define cpu_proc_init processor._proc_init |
86 | #define cpu_proc_fin processor._proc_fin | 90 | #define cpu_proc_fin processor._proc_fin |
@@ -89,6 +93,10 @@ extern void cpu_reset(unsigned long addr) __attribute__((noreturn)); | |||
89 | #define cpu_dcache_clean_area processor.dcache_clean_area | 93 | #define cpu_dcache_clean_area processor.dcache_clean_area |
90 | #define cpu_set_pte_ext processor.set_pte_ext | 94 | #define cpu_set_pte_ext processor.set_pte_ext |
91 | #define cpu_do_switch_mm processor.switch_mm | 95 | #define cpu_do_switch_mm processor.switch_mm |
96 | |||
97 | /* These three are private to arch/arm/kernel/suspend.c */ | ||
98 | #define cpu_do_suspend processor.do_suspend | ||
99 | #define cpu_do_resume processor.do_resume | ||
92 | #endif | 100 | #endif |
93 | 101 | ||
94 | extern void cpu_resume(void); | 102 | extern void cpu_resume(void); |
diff --git a/arch/arm/include/asm/smp.h b/arch/arm/include/asm/smp.h index 0a17b62538c2..1e5717afc4ac 100644 --- a/arch/arm/include/asm/smp.h +++ b/arch/arm/include/asm/smp.h | |||
@@ -99,9 +99,4 @@ extern void platform_cpu_enable(unsigned int cpu); | |||
99 | extern void arch_send_call_function_single_ipi(int cpu); | 99 | extern void arch_send_call_function_single_ipi(int cpu); |
100 | extern void arch_send_call_function_ipi_mask(const struct cpumask *mask); | 100 | extern void arch_send_call_function_ipi_mask(const struct cpumask *mask); |
101 | 101 | ||
102 | /* | ||
103 | * show local interrupt info | ||
104 | */ | ||
105 | extern void show_local_irqs(struct seq_file *, int); | ||
106 | |||
107 | #endif /* ifndef __ASM_ARM_SMP_H */ | 102 | #endif /* ifndef __ASM_ARM_SMP_H */ |
diff --git a/arch/arm/include/asm/smp_twd.h b/arch/arm/include/asm/smp_twd.h index fed9981fba08..ef9ffba97ad8 100644 --- a/arch/arm/include/asm/smp_twd.h +++ b/arch/arm/include/asm/smp_twd.h | |||
@@ -22,7 +22,7 @@ struct clock_event_device; | |||
22 | 22 | ||
23 | extern void __iomem *twd_base; | 23 | extern void __iomem *twd_base; |
24 | 24 | ||
25 | int twd_timer_ack(void); | ||
26 | void twd_timer_setup(struct clock_event_device *); | 25 | void twd_timer_setup(struct clock_event_device *); |
26 | void twd_timer_stop(struct clock_event_device *); | ||
27 | 27 | ||
28 | #endif | 28 | #endif |
diff --git a/arch/arm/include/asm/suspend.h b/arch/arm/include/asm/suspend.h index b0e4e1a02318..1c0a551ae375 100644 --- a/arch/arm/include/asm/suspend.h +++ b/arch/arm/include/asm/suspend.h | |||
@@ -1,22 +1,7 @@ | |||
1 | #ifndef __ASM_ARM_SUSPEND_H | 1 | #ifndef __ASM_ARM_SUSPEND_H |
2 | #define __ASM_ARM_SUSPEND_H | 2 | #define __ASM_ARM_SUSPEND_H |
3 | 3 | ||
4 | #include <asm/memory.h> | ||
5 | #include <asm/tlbflush.h> | ||
6 | |||
7 | extern void cpu_resume(void); | 4 | extern void cpu_resume(void); |
8 | 5 | extern int cpu_suspend(unsigned long, int (*)(unsigned long)); | |
9 | /* | ||
10 | * Hide the first two arguments to __cpu_suspend - these are an implementation | ||
11 | * detail which platform code shouldn't have to know about. | ||
12 | */ | ||
13 | static inline int cpu_suspend(unsigned long arg, int (*fn)(unsigned long)) | ||
14 | { | ||
15 | extern int __cpu_suspend(int, long, unsigned long, | ||
16 | int (*)(unsigned long)); | ||
17 | int ret = __cpu_suspend(0, PHYS_OFFSET - PAGE_OFFSET, arg, fn); | ||
18 | flush_tlb_all(); | ||
19 | return ret; | ||
20 | } | ||
21 | 6 | ||
22 | #endif | 7 | #endif |