diff options
| author | Mark Brown <broonie@linaro.org> | 2014-07-27 12:57:04 -0400 |
|---|---|---|
| committer | Jason Cooper <jason@lakedaemon.net> | 2014-08-17 12:56:11 -0400 |
| commit | ddc86821ee2ce3367fdb116e7334751087f78c56 (patch) | |
| tree | aff7ac95d6aa07be743503d309b4e401071fd6b6 | |
| parent | 7d1311b93e58ed55f3a31cc8f94c4b8fe988a2b9 (diff) | |
irqchip: gic-v3: Only define gic_peek_irq() when building SMP
If building with CONFIG_SMP disbled (for example, with allnoconfig) then
GCC complains that the static function gic_peek_irq() is defined but not
used since the only reference is in the SMP initialisation code. Fix this
by moving the function definition inside the ifdef.
Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Link: https://lkml.kernel.org/r/1406480224-24628-1-git-send-email-broonie@kernel.org
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
| -rw-r--r-- | drivers/irqchip/irq-gic-v3.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c index 57eaa5a0b1e3..41b98ba7ffd1 100644 --- a/drivers/irqchip/irq-gic-v3.c +++ b/drivers/irqchip/irq-gic-v3.c | |||
| @@ -200,19 +200,6 @@ static void gic_poke_irq(struct irq_data *d, u32 offset) | |||
| 200 | rwp_wait(); | 200 | rwp_wait(); |
| 201 | } | 201 | } |
| 202 | 202 | ||
| 203 | static int gic_peek_irq(struct irq_data *d, u32 offset) | ||
| 204 | { | ||
| 205 | u32 mask = 1 << (gic_irq(d) % 32); | ||
| 206 | void __iomem *base; | ||
| 207 | |||
| 208 | if (gic_irq_in_rdist(d)) | ||
| 209 | base = gic_data_rdist_sgi_base(); | ||
| 210 | else | ||
| 211 | base = gic_data.dist_base; | ||
| 212 | |||
| 213 | return !!(readl_relaxed(base + offset + (gic_irq(d) / 32) * 4) & mask); | ||
| 214 | } | ||
| 215 | |||
| 216 | static void gic_mask_irq(struct irq_data *d) | 203 | static void gic_mask_irq(struct irq_data *d) |
| 217 | { | 204 | { |
| 218 | gic_poke_irq(d, GICD_ICENABLER); | 205 | gic_poke_irq(d, GICD_ICENABLER); |
| @@ -401,6 +388,19 @@ static void gic_cpu_init(void) | |||
| 401 | } | 388 | } |
| 402 | 389 | ||
| 403 | #ifdef CONFIG_SMP | 390 | #ifdef CONFIG_SMP |
| 391 | static int gic_peek_irq(struct irq_data *d, u32 offset) | ||
| 392 | { | ||
| 393 | u32 mask = 1 << (gic_irq(d) % 32); | ||
| 394 | void __iomem *base; | ||
| 395 | |||
| 396 | if (gic_irq_in_rdist(d)) | ||
| 397 | base = gic_data_rdist_sgi_base(); | ||
| 398 | else | ||
| 399 | base = gic_data.dist_base; | ||
| 400 | |||
| 401 | return !!(readl_relaxed(base + offset + (gic_irq(d) / 32) * 4) & mask); | ||
| 402 | } | ||
| 403 | |||
| 404 | static int gic_secondary_init(struct notifier_block *nfb, | 404 | static int gic_secondary_init(struct notifier_block *nfb, |
| 405 | unsigned long action, void *hcpu) | 405 | unsigned long action, void *hcpu) |
| 406 | { | 406 | { |
