diff options
| author | Thomas Gleixner <tglx@linutronix.de> | 2014-09-14 09:34:38 -0400 |
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2014-09-14 09:35:36 -0400 |
| commit | db985cbd67c45f875ef43cb5febfaa8cbd203c27 (patch) | |
| tree | 63542d05b1c0f730ec1ad5f915dc4eb3c015e616 /include/asm-generic | |
| parent | c6f1224573c3b609bd8073b39f496637a16cc06f (diff) | |
| parent | 468a903c0e5147e3f93187f0b808a3ef957fd00e (diff) | |
Merge tag 'irqchip-core-3.18' of git://git.infradead.org/users/jcooper/linux into irq/core
irqchip core changes for v3.18
- renesas: suspend to RAM, runtime PM, cleanups and DT binding docs
- keystone: add new driver
- hip04: add Hisilicon HiP04 driver (without touching irq-gic.c)
- gic: Use defines instead of magic number, preserve v2 bybass bits
- handle_domain_irq: common low level interrupt entry handler
Diffstat (limited to 'include/asm-generic')
| -rw-r--r-- | include/asm-generic/gpio.h | 3 | ||||
| -rw-r--r-- | include/asm-generic/io-64-nonatomic-hi-lo.h | 14 | ||||
| -rw-r--r-- | include/asm-generic/io-64-nonatomic-lo-hi.h | 14 | ||||
| -rw-r--r-- | include/asm-generic/pci-dma-compat.h | 8 | ||||
| -rw-r--r-- | include/asm-generic/percpu.h | 410 | ||||
| -rw-r--r-- | include/asm-generic/vmlinux.lds.h | 5 |
6 files changed, 381 insertions, 73 deletions
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h index 23e364538ab5..c1d4105e1c1d 100644 --- a/include/asm-generic/gpio.h +++ b/include/asm-generic/gpio.h | |||
| @@ -110,9 +110,6 @@ static inline int __gpio_to_irq(unsigned gpio) | |||
| 110 | return gpiod_to_irq(gpio_to_desc(gpio)); | 110 | return gpiod_to_irq(gpio_to_desc(gpio)); |
| 111 | } | 111 | } |
| 112 | 112 | ||
| 113 | extern int gpio_lock_as_irq(struct gpio_chip *chip, unsigned int offset); | ||
| 114 | extern void gpio_unlock_as_irq(struct gpio_chip *chip, unsigned int offset); | ||
| 115 | |||
| 116 | extern int gpio_request_one(unsigned gpio, unsigned long flags, const char *label); | 113 | extern int gpio_request_one(unsigned gpio, unsigned long flags, const char *label); |
| 117 | extern int gpio_request_array(const struct gpio *array, size_t num); | 114 | extern int gpio_request_array(const struct gpio *array, size_t num); |
| 118 | extern void gpio_free_array(const struct gpio *array, size_t num); | 115 | extern void gpio_free_array(const struct gpio *array, size_t num); |
diff --git a/include/asm-generic/io-64-nonatomic-hi-lo.h b/include/asm-generic/io-64-nonatomic-hi-lo.h index a6806a94250d..2e29d13fc154 100644 --- a/include/asm-generic/io-64-nonatomic-hi-lo.h +++ b/include/asm-generic/io-64-nonatomic-hi-lo.h | |||
| @@ -4,8 +4,7 @@ | |||
| 4 | #include <linux/io.h> | 4 | #include <linux/io.h> |
| 5 | #include <asm-generic/int-ll64.h> | 5 | #include <asm-generic/int-ll64.h> |
| 6 | 6 | ||
| 7 | #ifndef readq | 7 | static inline __u64 hi_lo_readq(const volatile void __iomem *addr) |
| 8 | static inline __u64 readq(const volatile void __iomem *addr) | ||
| 9 | { | 8 | { |
| 10 | const volatile u32 __iomem *p = addr; | 9 | const volatile u32 __iomem *p = addr; |
| 11 | u32 low, high; | 10 | u32 low, high; |
| @@ -15,14 +14,19 @@ static inline __u64 readq(const volatile void __iomem *addr) | |||
| 15 | 14 | ||
| 16 | return low + ((u64)high << 32); | 15 | return low + ((u64)high << 32); |
| 17 | } | 16 | } |
| 18 | #endif | ||
| 19 | 17 | ||
| 20 | #ifndef writeq | 18 | static inline void hi_lo_writeq(__u64 val, volatile void __iomem *addr) |
| 21 | static inline void writeq(__u64 val, volatile void __iomem *addr) | ||
| 22 | { | 19 | { |
| 23 | writel(val >> 32, addr + 4); | 20 | writel(val >> 32, addr + 4); |
| 24 | writel(val, addr); | 21 | writel(val, addr); |
| 25 | } | 22 | } |
| 23 | |||
| 24 | #ifndef readq | ||
| 25 | #define readq hi_lo_readq | ||
| 26 | #endif | ||
| 27 | |||
| 28 | #ifndef writeq | ||
| 29 | #define writeq hi_lo_writeq | ||
| 26 | #endif | 30 | #endif |
| 27 | 31 | ||
| 28 | #endif /* _ASM_IO_64_NONATOMIC_HI_LO_H_ */ | 32 | #endif /* _ASM_IO_64_NONATOMIC_HI_LO_H_ */ |
diff --git a/include/asm-generic/io-64-nonatomic-lo-hi.h b/include/asm-generic/io-64-nonatomic-lo-hi.h index ca546b1ff8b5..0efacff0a1ce 100644 --- a/include/asm-generic/io-64-nonatomic-lo-hi.h +++ b/include/asm-generic/io-64-nonatomic-lo-hi.h | |||
| @@ -4,8 +4,7 @@ | |||
| 4 | #include <linux/io.h> | 4 | #include <linux/io.h> |
| 5 | #include <asm-generic/int-ll64.h> | 5 | #include <asm-generic/int-ll64.h> |
| 6 | 6 | ||
| 7 | #ifndef readq | 7 | static inline __u64 lo_hi_readq(const volatile void __iomem *addr) |
| 8 | static inline __u64 readq(const volatile void __iomem *addr) | ||
| 9 | { | 8 | { |
| 10 | const volatile u32 __iomem *p = addr; | 9 | const volatile u32 __iomem *p = addr; |
| 11 | u32 low, high; | 10 | u32 low, high; |
| @@ -15,14 +14,19 @@ static inline __u64 readq(const volatile void __iomem *addr) | |||
| 15 | 14 | ||
| 16 | return low + ((u64)high << 32); | 15 | return low + ((u64)high << 32); |
| 17 | } | 16 | } |
| 18 | #endif | ||
| 19 | 17 | ||
| 20 | #ifndef writeq | 18 | static inline void lo_hi_writeq(__u64 val, volatile void __iomem *addr) |
| 21 | static inline void writeq(__u64 val, volatile void __iomem *addr) | ||
| 22 | { | 19 | { |
| 23 | writel(val, addr); | 20 | writel(val, addr); |
| 24 | writel(val >> 32, addr + 4); | 21 | writel(val >> 32, addr + 4); |
| 25 | } | 22 | } |
| 23 | |||
| 24 | #ifndef readq | ||
| 25 | #define readq lo_hi_readq | ||
| 26 | #endif | ||
| 27 | |||
| 28 | #ifndef writeq | ||
| 29 | #define writeq lo_hi_writeq | ||
| 26 | #endif | 30 | #endif |
| 27 | 31 | ||
| 28 | #endif /* _ASM_IO_64_NONATOMIC_LO_HI_H_ */ | 32 | #endif /* _ASM_IO_64_NONATOMIC_LO_HI_H_ */ |
diff --git a/include/asm-generic/pci-dma-compat.h b/include/asm-generic/pci-dma-compat.h index 1437b7da09b2..c110843fc53b 100644 --- a/include/asm-generic/pci-dma-compat.h +++ b/include/asm-generic/pci-dma-compat.h | |||
| @@ -19,6 +19,14 @@ pci_alloc_consistent(struct pci_dev *hwdev, size_t size, | |||
| 19 | return dma_alloc_coherent(hwdev == NULL ? NULL : &hwdev->dev, size, dma_handle, GFP_ATOMIC); | 19 | return dma_alloc_coherent(hwdev == NULL ? NULL : &hwdev->dev, size, dma_handle, GFP_ATOMIC); |
| 20 | } | 20 | } |
| 21 | 21 | ||
| 22 | static inline void * | ||
| 23 | pci_zalloc_consistent(struct pci_dev *hwdev, size_t size, | ||
| 24 | dma_addr_t *dma_handle) | ||
| 25 | { | ||
| 26 | return dma_zalloc_coherent(hwdev == NULL ? NULL : &hwdev->dev, | ||
| 27 | size, dma_handle, GFP_ATOMIC); | ||
| 28 | } | ||
| 29 | |||
| 22 | static inline void | 30 | static inline void |
| 23 | pci_free_consistent(struct pci_dev *hwdev, size_t size, | 31 | pci_free_consistent(struct pci_dev *hwdev, size_t size, |
| 24 | void *vaddr, dma_addr_t dma_handle) | 32 | void *vaddr, dma_addr_t dma_handle) |
diff --git a/include/asm-generic/percpu.h b/include/asm-generic/percpu.h index 0703aa75b5e8..4d9f233c4ba8 100644 --- a/include/asm-generic/percpu.h +++ b/include/asm-generic/percpu.h | |||
| @@ -36,93 +36,385 @@ extern unsigned long __per_cpu_offset[NR_CPUS]; | |||
| 36 | #endif | 36 | #endif |
| 37 | 37 | ||
| 38 | /* | 38 | /* |
| 39 | * Add a offset to a pointer but keep the pointer as is. | 39 | * Arch may define arch_raw_cpu_ptr() to provide more efficient address |
| 40 | * | 40 | * translations for raw_cpu_ptr(). |
| 41 | * Only S390 provides its own means of moving the pointer. | ||
| 42 | */ | 41 | */ |
| 43 | #ifndef SHIFT_PERCPU_PTR | 42 | #ifndef arch_raw_cpu_ptr |
| 44 | /* Weird cast keeps both GCC and sparse happy. */ | 43 | #define arch_raw_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, __my_cpu_offset) |
| 45 | #define SHIFT_PERCPU_PTR(__p, __offset) ({ \ | ||
| 46 | __verify_pcpu_ptr((__p)); \ | ||
| 47 | RELOC_HIDE((typeof(*(__p)) __kernel __force *)(__p), (__offset)); \ | ||
| 48 | }) | ||
| 49 | #endif | 44 | #endif |
| 50 | 45 | ||
| 51 | /* | 46 | #ifdef CONFIG_HAVE_SETUP_PER_CPU_AREA |
| 52 | * A percpu variable may point to a discarded regions. The following are | 47 | extern void setup_per_cpu_areas(void); |
| 53 | * established ways to produce a usable pointer from the percpu variable | ||
| 54 | * offset. | ||
| 55 | */ | ||
| 56 | #define per_cpu(var, cpu) \ | ||
| 57 | (*SHIFT_PERCPU_PTR(&(var), per_cpu_offset(cpu))) | ||
| 58 | |||
| 59 | #ifndef raw_cpu_ptr | ||
| 60 | #define raw_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, __my_cpu_offset) | ||
| 61 | #endif | 48 | #endif |
| 62 | #ifdef CONFIG_DEBUG_PREEMPT | 49 | |
| 63 | #define this_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, my_cpu_offset) | 50 | #endif /* SMP */ |
| 51 | |||
| 52 | #ifndef PER_CPU_BASE_SECTION | ||
| 53 | #ifdef CONFIG_SMP | ||
| 54 | #define PER_CPU_BASE_SECTION ".data..percpu" | ||
| 64 | #else | 55 | #else |
| 65 | #define this_cpu_ptr(ptr) raw_cpu_ptr(ptr) | 56 | #define PER_CPU_BASE_SECTION ".data" |
| 57 | #endif | ||
| 66 | #endif | 58 | #endif |
| 67 | 59 | ||
| 68 | #define __get_cpu_var(var) (*this_cpu_ptr(&(var))) | 60 | #ifndef PER_CPU_ATTRIBUTES |
| 69 | #define __raw_get_cpu_var(var) (*raw_cpu_ptr(&(var))) | 61 | #define PER_CPU_ATTRIBUTES |
| 62 | #endif | ||
| 70 | 63 | ||
| 71 | #ifdef CONFIG_HAVE_SETUP_PER_CPU_AREA | 64 | #ifndef PER_CPU_DEF_ATTRIBUTES |
| 72 | extern void setup_per_cpu_areas(void); | 65 | #define PER_CPU_DEF_ATTRIBUTES |
| 73 | #endif | 66 | |
