diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-12 11:51:56 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-12 11:51:56 -0500 |
| commit | 42cf0f203e877cc7e502883d43b3f72149033d86 (patch) | |
| tree | 3658297d62f28d7bfaa148099b08001aa9904229 /include/linux | |
| parent | a2f0bb03f7c499e3db72c70a62b1aa5c55d6a82b (diff) | |
| parent | df9ab9771c64f5229843bfe2a20fe0ee6ac59fc1 (diff) | |
Merge branch 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm
Pull ARM updates from Russell King:
- clang assembly fixes from Ard
- optimisations and cleanups for Aurora L2 cache support
- efficient L2 cache support for secure monitor API on Exynos SoCs
- debug menu cleanup from Daniel Thompson to allow better behaviour for
multiplatform kernels
- StrongARM SA11x0 conversion to irq domains, and pxa_timer
- kprobes updates for older ARM CPUs
- move probes support out of arch/arm/kernel to arch/arm/probes
- add inline asm support for the rbit (reverse bits) instruction
- provide an ARM mode secondary CPU entry point (for Qualcomm CPUs)
- remove the unused ARMv3 user access code
- add driver_override support to AMBA Primecell bus
* 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm: (55 commits)
ARM: 8256/1: driver coamba: add device binding path 'driver_override'
ARM: 8301/1: qcom: Use secondary_startup_arm()
ARM: 8302/1: Add a secondary_startup that assumes ARM mode
ARM: 8300/1: teach __asmeq that r11 == fp and r12 == ip
ARM: kprobes: Fix compilation error caused by superfluous '*'
ARM: 8297/1: cache-l2x0: optimize aurora range operations
ARM: 8296/1: cache-l2x0: clean up aurora cache handling
ARM: 8284/1: sa1100: clear RCSR_SMR on resume
ARM: 8283/1: sa1100: collie: clear PWER register on machine init
ARM: 8282/1: sa1100: use handle_domain_irq
ARM: 8281/1: sa1100: move GPIO-related IRQ code to gpio driver
ARM: 8280/1: sa1100: switch to irq_domain_add_simple()
ARM: 8279/1: sa1100: merge both GPIO irqdomains
ARM: 8278/1: sa1100: split irq handling for low GPIOs
ARM: 8291/1: replace magic number with PAGE_SHIFT macro in fixup_pv code
ARM: 8290/1: decompressor: fix a wrong comment
ARM: 8286/1: mm: Fix dma_contiguous_reserve comment
ARM: 8248/1: pm: remove outdated comment
ARM: 8274/1: Fix DEBUG_LL for multi-platform kernels (without PL01X)
ARM: 8273/1: Seperate DEBUG_UART_PHYS from DEBUG_LL on EP93XX
...
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/amba/bus.h | 13 | ||||
| -rw-r--r-- | include/linux/bitrev.h | 77 | ||||
| -rw-r--r-- | include/linux/kprobes.h | 3 |
3 files changed, 84 insertions, 9 deletions
diff --git a/include/linux/amba/bus.h b/include/linux/amba/bus.h index 2afc618b15ce..50fc66868402 100644 --- a/include/linux/amba/bus.h +++ b/include/linux/amba/bus.h | |||
| @@ -33,6 +33,7 @@ struct amba_device { | |||
| 33 | struct clk *pclk; | 33 | struct clk *pclk; |
| 34 | unsigned int periphid; | 34 | unsigned int periphid; |
| 35 | unsigned int irq[AMBA_NR_IRQS]; | 35 | unsigned int irq[AMBA_NR_IRQS]; |
| 36 | char *driver_override; | ||
| 36 | }; | 37 | }; |
| 37 | 38 | ||
| 38 | struct amba_driver { | 39 | struct amba_driver { |
| @@ -92,11 +93,15 @@ struct amba_device *amba_find_device(const char *, struct device *, unsigned int | |||
| 92 | int amba_request_regions(struct amba_device *, const char *); | 93 | int amba_request_regions(struct amba_device *, const char *); |
| 93 | void amba_release_regions(struct amba_device *); | 94 | void amba_release_regions(struct amba_device *); |
| 94 | 95 | ||
| 95 | #define amba_pclk_enable(d) \ | 96 | static inline int amba_pclk_enable(struct amba_device *dev) |
| 96 | (IS_ERR((d)->pclk) ? 0 : clk_enable((d)->pclk)) | 97 | { |
| 98 | return clk_enable(dev->pclk); | ||
| 99 | } | ||
| 97 | 100 | ||
| 98 | #define amba_pclk_disable(d) \ | 101 | static inline void amba_pclk_disable(struct amba_device *dev) |
| 99 | do { if (!IS_ERR((d)->pclk)) clk_disable((d)->pclk); } while (0) | 102 | { |
| 103 | clk_disable(dev->pclk); | ||
| 104 | } | ||
| 100 | 105 | ||
| 101 | static inline int amba_pclk_prepare(struct amba_device *dev) | 106 | static inline int amba_pclk_prepare(struct amba_device *dev) |
| 102 | { | 107 | { |
diff --git a/include/linux/bitrev.h b/include/linux/bitrev.h index 7ffe03f4693d..fb790b8449c1 100644 --- a/include/linux/bitrev.h +++ b/include/linux/bitrev.h | |||
| @@ -3,14 +3,83 @@ | |||
| 3 | 3 | ||
| 4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
| 5 | 5 | ||
| 6 | extern u8 const byte_rev_table[256]; | 6 | #ifdef CONFIG_HAVE_ARCH_BITREVERSE |
| 7 | #include <asm/bitrev.h> | ||
| 8 | |||
| 9 | #define __bitrev32 __arch_bitrev32 | ||
| 10 | #define __bitrev16 __arch_bitrev16 | ||
| 11 | #define __bitrev8 __arch_bitrev8 | ||
| 7 | 12 | ||
| 8 | static inline u8 bitrev8(u8 byte) | 13 | #else |
| 14 | extern u8 const byte_rev_table[256]; | ||
| 15 | static inline u8 __bitrev8(u8 byte) | ||
| 9 | { | 16 | { |
| 10 | return byte_rev_table[byte]; | 17 | return byte_rev_table[byte]; |
| 11 | } | 18 | } |
| 12 | 19 | ||
| 13 | extern u16 bitrev16(u16 in); | 20 | static inline u16 __bitrev16(u16 x) |
| 14 | extern u32 bitrev32(u32 in); | 21 | { |
| 22 | return (__bitrev8(x & 0xff) << 8) | __bitrev8(x >> 8); | ||
| 23 | } | ||
| 24 | |||
| 25 | static inline u32 __bitrev32(u32 x) | ||
| 26 | { | ||
| 27 | return (__bitrev16(x & 0xffff) << 16) | __bitrev16(x >> 16); | ||
| 28 | } | ||
| 29 | |||
| 30 | #endif /* CONFIG_HAVE_ARCH_BITREVERSE */ | ||
| 31 | |||
| 32 | #define __constant_bitrev32(x) \ | ||
| 33 | ({ \ | ||
| 34 | u32 __x = x; \ | ||
| 35 | __x = (__x >> 16) | (__x << 16); \ | ||
| 36 | __x = ((__x & (u32)0xFF00FF00UL) >> 8) | ((__x & (u32)0x00FF00FFUL) << 8); \ | ||
| 37 | __x = ((__x & (u32)0xF0F0F0F0UL) >> 4) | ((__x & (u32)0x0F0F0F0FUL) << 4); \ | ||
| 38 | __x = ((__x & (u32)0xCCCCCCCCUL) >> 2) | ((__x & (u32)0x33333333UL) << 2); \ | ||
| 39 | __x = ((__x & (u32)0xAAAAAAAAUL) >> 1) | ((__x & (u32)0x55555555UL) << 1); \ | ||
| 40 | __x; \ | ||
| 41 | }) | ||
| 42 | |||
| 43 | #define __constant_bitrev16(x) \ | ||
| 44 | ({ \ | ||
| 45 | u16 __x = x; \ | ||
| 46 | __x = (__x >> 8) | (__x << 8); \ | ||
| 47 | __x = ((__x & (u16)0xF0F0U) >> 4) | ((__x & (u16)0x0F0FU) << 4); \ | ||
| 48 | __x = ((__x & (u16)0xCCCCU) >> 2) | ((__x & (u16)0x3333U) << 2); \ | ||
| 49 | __x = ((__x & (u16)0xAAAAU) >> 1) | ((__x & (u16)0x5555U) << 1); \ | ||
| 50 | __x; \ | ||
| 51 | }) | ||
| 52 | |||
| 53 | #define __constant_bitrev8(x) \ | ||
| 54 | ({ \ | ||
| 55 | u8 __x = x; \ | ||
| 56 | __x = (__x >> 4) | (__x << 4); \ | ||
| 57 | __x = ((__x & (u8)0xCCU) >> 2) | ((__x & (u8)0x33U) << 2); \ | ||
| 58 | __x = ((__x & (u8)0xAAU) >> 1) | ((__x & (u8)0x55U) << 1); \ | ||
| 59 | __x; \ | ||
| 60 | }) | ||
| 61 | |||
| 62 | #define bitrev32(x) \ | ||
| 63 | ({ \ | ||
| 64 | u32 __x = x; \ | ||
| 65 | __builtin_constant_p(__x) ? \ | ||
| 66 | __constant_bitrev32(__x) : \ | ||
| 67 | __bitrev32(__x); \ | ||
| 68 | }) | ||
| 69 | |||
| 70 | #define bitrev16(x) \ | ||
| 71 | ({ \ | ||
| 72 | u16 __x = x; \ | ||
| 73 | __builtin_constant_p(__x) ? \ | ||
| 74 | __constant_bitrev16(__x) : \ | ||
| 75 | __bitrev16(__x); \ | ||
| 76 | }) | ||
| 15 | 77 | ||
| 78 | #define bitrev8(x) \ | ||
| 79 | ({ \ | ||
| 80 | u8 __x = x; \ | ||
| 81 | __builtin_constant_p(__x) ? \ | ||
| 82 | __constant_bitrev8(__x) : \ | ||
| 83 | __bitrev8(__x) ; \ | ||
| 84 | }) | ||
| 16 | #endif /* _LINUX_BITREV_H */ | 85 | #endif /* _LINUX_BITREV_H */ |
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h index 5297f9fa0ef2..1ab54754a86d 100644 --- a/include/linux/kprobes.h +++ b/include/linux/kprobes.h | |||
| @@ -308,7 +308,8 @@ struct optimized_kprobe { | |||
| 308 | /* Architecture dependent functions for direct jump optimization */ | 308 | /* Architecture dependent functions for direct jump optimization */ |
| 309 | extern int arch_prepared_optinsn(struct arch_optimized_insn *optinsn); | 309 | extern int arch_prepared_optinsn(struct arch_optimized_insn *optinsn); |
| 310 | extern int arch_check_optimized_kprobe(struct optimized_kprobe *op); | 310 | extern int arch_check_optimized_kprobe(struct optimized_kprobe *op); |
| 311 | extern int arch_prepare_optimized_kprobe(struct optimized_kprobe *op); | 311 | extern int arch_prepare_optimized_kprobe(struct optimized_kprobe *op, |
| 312 | struct kprobe *orig); | ||
| 312 | extern void arch_remove_optimized_kprobe(struct optimized_kprobe *op); | 313 | extern void arch_remove_optimized_kprobe(struct optimized_kprobe *op); |
| 313 | extern void arch_optimize_kprobes(struct list_head *oplist); | 314 | extern void arch_optimize_kprobes(struct list_head *oplist); |
| 314 | extern void arch_unoptimize_kprobes(struct list_head *oplist, | 315 | extern void arch_unoptimize_kprobes(struct list_head *oplist, |
