MIPS: Move 'gic_present' to common location.
authorSteven J. Hill <Steven.Hill@imgtec.com>
Wed, 10 Apr 2013 21:27:04 +0000 (16:27 -0500)
committerRalf Baechle <ralf@linux-mips.org>
Thu, 9 May 2013 15:55:20 +0000 (17:55 +0200)
Move the global variable 'gic_present' to be defined in the file
'arch/mips/kernel/irq-gic.c' instead of defining it individually
for each platform making use of the GIC. Also change the type to
be an unsigned integer instead of signed.

Signed-off-by: Steven J. Hill <Steven.Hill@imgtec.com>
arch/mips/include/asm/gic.h
arch/mips/kernel/irq-gic.c
arch/mips/kernel/smp-mt.c
arch/mips/mti-malta/malta-int.c
arch/mips/mti-sead3/sead3-int.c

index bdc9786ab5a7bcbf278b3fe1f77a73ae49dd2767..a05f97db0735a2895ac00e8d52cefd69cdcff913 100644 (file)
@@ -359,7 +359,7 @@ struct gic_shared_intr_map {
 /* Mapped interrupt to pin X, then GIC will generate the vector (X+1). */
 #define GIC_PIN_TO_VEC_OFFSET  (1)
 
-extern int gic_present;
+extern unsigned int gic_present;
 extern unsigned long _gic_base;
 extern unsigned int gic_irq_base;
 extern unsigned int gic_irq_flags[];
index 485e6a961b317ea0f6778b04e57c8c08d3ad8c02..130aec6f0644515e7809a1a5af2d9e3018551735 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/hardirq.h>
 #include <asm-generic/bitops/find.h>
 
+unsigned int gic_present;
 unsigned long _gic_base;
 unsigned int gic_irq_base;
 unsigned int gic_irq_flags[GIC_NUM_INTRS];
index bfede063d96a52e3dd8f12aedf67f15468d7c3aa..3e5164c11cacabe66ea021cb29c979b93d920e00 100644 (file)
@@ -34,6 +34,7 @@
 #include <asm/mipsregs.h>
 #include <asm/mipsmtregs.h>
 #include <asm/mips_mt.h>
+#include <asm/gic.h>
 
 static void __init smvp_copy_vpe_config(void)
 {
@@ -151,8 +152,6 @@ static void vsmp_send_ipi_mask(const struct cpumask *mask, unsigned int action)
 static void __cpuinit vsmp_init_secondary(void)
 {
 #ifdef CONFIG_IRQ_GIC
-       extern int gic_present;
-
        /* This is Malta specific: IPI,performance and timer interrupts */
        if (gic_present)
                change_c0_status(ST0_IM, STATUSF_IP3 | STATUSF_IP4 |
index e364af70e6cf5cc255a9be51ca569d7cb911dbf0..8e840c20629eb04a19d35b52b6d87f1aa9e13f25 100644 (file)
@@ -47,7 +47,6 @@
 #include <asm/setup.h>
 
 int gcmp_present = -1;
-int gic_present;
 static unsigned long _msc01_biu_base;
 static unsigned long _gcmp_base;
 static unsigned int ipi_map[NR_CPUS];
index e26e08274fc5b32a898ccdc40c8c346ec2a9d7d8..6a560ac03def0db5f2a794529998cf5e39ad1887 100644 (file)
@@ -20,7 +20,6 @@
 #define SEAD_CONFIG_BASE               0x1b100110
 #define SEAD_CONFIG_SIZE               4
 
-int gic_present;
 static unsigned long sead3_config_reg;
 
 /*