Commit 40d50cf7ca956183f3a573bc21082e1c7d04fa7b
Committed by
Benjamin Herrenschmidt
1 parent
990d89c663
Exists in
master
and in
7 other branches
powerpc: Make "intspec" pointers in irq_host->xlate() const
Writing a driver using SCLPC on the MPC5200B I detected, that the intspec arrays to map irqs to Linux virq cannot be const, because the mapping and xlate functions only take non const pointers. All those functions do not modify the intspec, so a const pointer could be used. Signed-off-by: Roman Fietze <roman.fietze@telemotive.de> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Showing 21 changed files with 23 additions and 23 deletions Side-by-side Diff
- arch/powerpc/include/asm/irq.h
- arch/powerpc/kernel/irq.c
- arch/powerpc/platforms/52xx/media5200.c
- arch/powerpc/platforms/52xx/mpc52xx_gpt.c
- arch/powerpc/platforms/52xx/mpc52xx_pic.c
- arch/powerpc/platforms/85xx/socrates_fpga_pic.c
- arch/powerpc/platforms/86xx/gef_pic.c
- arch/powerpc/platforms/cell/beat_interrupt.c
- arch/powerpc/platforms/cell/interrupt.c
- arch/powerpc/platforms/cell/spider-pic.c
- arch/powerpc/platforms/powermac/pic.c
- arch/powerpc/platforms/pseries/xics.c
- arch/powerpc/sysdev/cpm2_pic.c
- arch/powerpc/sysdev/i8259.c
- arch/powerpc/sysdev/ipic.c
- arch/powerpc/sysdev/mpc8xx_pic.c
- arch/powerpc/sysdev/mpic.c
- arch/powerpc/sysdev/qe_lib/qe_ic.c
- arch/powerpc/sysdev/tsi108_pci.c
- arch/powerpc/sysdev/uic.c
- arch/powerpc/sysdev/xilinx_intc.c
arch/powerpc/include/asm/irq.h
... | ... | @@ -100,7 +100,7 @@ |
100 | 100 | * interrupt controller has for that line) |
101 | 101 | */ |
102 | 102 | int (*xlate)(struct irq_host *h, struct device_node *ctrler, |
103 | - u32 *intspec, unsigned int intsize, | |
103 | + const u32 *intspec, unsigned int intsize, | |
104 | 104 | irq_hw_number_t *out_hwirq, unsigned int *out_type); |
105 | 105 | }; |
106 | 106 | |
... | ... | @@ -314,7 +314,7 @@ |
314 | 314 | * of the of_irq_map_*() functions. |
315 | 315 | */ |
316 | 316 | extern unsigned int irq_create_of_mapping(struct device_node *controller, |
317 | - u32 *intspec, unsigned int intsize); | |
317 | + const u32 *intspec, unsigned int intsize); | |
318 | 318 | |
319 | 319 | /** |
320 | 320 | * irq_of_parse_and_map - Parse and Map an interrupt into linux virq space |
arch/powerpc/kernel/irq.c
... | ... | @@ -725,7 +725,7 @@ |
725 | 725 | EXPORT_SYMBOL_GPL(irq_create_mapping); |
726 | 726 | |
727 | 727 | unsigned int irq_create_of_mapping(struct device_node *controller, |
728 | - u32 *intspec, unsigned int intsize) | |
728 | + const u32 *intspec, unsigned int intsize) | |
729 | 729 | { |
730 | 730 | struct irq_host *host; |
731 | 731 | irq_hw_number_t hwirq; |
arch/powerpc/platforms/52xx/media5200.c
arch/powerpc/platforms/52xx/mpc52xx_gpt.c
arch/powerpc/platforms/52xx/mpc52xx_pic.c
... | ... | @@ -355,7 +355,7 @@ |
355 | 355 | * mpc52xx_irqhost_xlate - translate virq# from device tree interrupts property |
356 | 356 | */ |
357 | 357 | static int mpc52xx_irqhost_xlate(struct irq_host *h, struct device_node *ct, |
358 | - u32 *intspec, unsigned int intsize, | |
358 | + const u32 *intspec, unsigned int intsize, | |
359 | 359 | irq_hw_number_t *out_hwirq, |
360 | 360 | unsigned int *out_flags) |
361 | 361 | { |
arch/powerpc/platforms/85xx/socrates_fpga_pic.c
... | ... | @@ -253,7 +253,7 @@ |
253 | 253 | } |
254 | 254 | |
255 | 255 | static int socrates_fpga_pic_host_xlate(struct irq_host *h, |
256 | - struct device_node *ct, u32 *intspec, unsigned int intsize, | |
256 | + struct device_node *ct, const u32 *intspec, unsigned int intsize, | |
257 | 257 | irq_hw_number_t *out_hwirq, unsigned int *out_flags) |
258 | 258 | { |
259 | 259 | struct socrates_fpga_irq_info *fpga_irq = &fpga_irqs[intspec[0]]; |
arch/powerpc/platforms/86xx/gef_pic.c
arch/powerpc/platforms/cell/beat_interrupt.c
... | ... | @@ -166,11 +166,11 @@ |
166 | 166 | * Note: We have only 1 entry to translate. |
167 | 167 | */ |
168 | 168 | static int beatic_pic_host_xlate(struct irq_host *h, struct device_node *ct, |
169 | - u32 *intspec, unsigned int intsize, | |
169 | + const u32 *intspec, unsigned int intsize, | |
170 | 170 | irq_hw_number_t *out_hwirq, |
171 | 171 | unsigned int *out_flags) |
172 | 172 | { |
173 | - u64 *intspec2 = (u64 *)intspec; | |
173 | + const u64 *intspec2 = (const u64 *)intspec; | |
174 | 174 | |
175 | 175 | *out_hwirq = *intspec2; |
176 | 176 | *out_flags |= IRQ_TYPE_LEVEL_LOW; |
arch/powerpc/platforms/cell/interrupt.c
arch/powerpc/platforms/cell/spider-pic.c
arch/powerpc/platforms/powermac/pic.c
arch/powerpc/platforms/pseries/xics.c
arch/powerpc/sysdev/cpm2_pic.c
... | ... | @@ -218,7 +218,7 @@ |
218 | 218 | } |
219 | 219 | |
220 | 220 | static int cpm2_pic_host_xlate(struct irq_host *h, struct device_node *ct, |
221 | - u32 *intspec, unsigned int intsize, | |
221 | + const u32 *intspec, unsigned int intsize, | |
222 | 222 | irq_hw_number_t *out_hwirq, unsigned int *out_flags) |
223 | 223 | { |
224 | 224 | *out_hwirq = intspec[0]; |
arch/powerpc/sysdev/i8259.c
... | ... | @@ -198,7 +198,7 @@ |
198 | 198 | } |
199 | 199 | |
200 | 200 | static int i8259_host_xlate(struct irq_host *h, struct device_node *ct, |
201 | - u32 *intspec, unsigned int intsize, | |
201 | + const u32 *intspec, unsigned int intsize, | |
202 | 202 | irq_hw_number_t *out_hwirq, unsigned int *out_flags) |
203 | 203 | { |
204 | 204 | static unsigned char map_isa_senses[4] = { |
arch/powerpc/sysdev/ipic.c
arch/powerpc/sysdev/mpc8xx_pic.c
... | ... | @@ -130,7 +130,7 @@ |
130 | 130 | |
131 | 131 | |
132 | 132 | static int mpc8xx_pic_host_xlate(struct irq_host *h, struct device_node *ct, |
133 | - u32 *intspec, unsigned int intsize, | |
133 | + const u32 *intspec, unsigned int intsize, | |
134 | 134 | irq_hw_number_t *out_hwirq, unsigned int *out_flags) |
135 | 135 | { |
136 | 136 | static unsigned char map_pic_senses[4] = { |
arch/powerpc/sysdev/mpic.c
arch/powerpc/sysdev/qe_lib/qe_ic.c
arch/powerpc/sysdev/tsi108_pci.c
... | ... | @@ -384,7 +384,7 @@ |
384 | 384 | }; |
385 | 385 | |
386 | 386 | static int pci_irq_host_xlate(struct irq_host *h, struct device_node *ct, |
387 | - u32 *intspec, unsigned int intsize, | |
387 | + const u32 *intspec, unsigned int intsize, | |
388 | 388 | irq_hw_number_t *out_hwirq, unsigned int *out_flags) |
389 | 389 | { |
390 | 390 | *out_hwirq = intspec[0]; |
arch/powerpc/sysdev/uic.c
arch/powerpc/sysdev/xilinx_intc.c
... | ... | @@ -148,7 +148,7 @@ |
148 | 148 | * xilinx_intc_xlate - translate virq# from device tree interrupts property |
149 | 149 | */ |
150 | 150 | static int xilinx_intc_xlate(struct irq_host *h, struct device_node *ct, |
151 | - u32 *intspec, unsigned int intsize, | |
151 | + const u32 *intspec, unsigned int intsize, | |
152 | 152 | irq_hw_number_t *out_hwirq, |
153 | 153 | unsigned int *out_flags) |
154 | 154 | { |