Skip to content

Commit

Permalink
MIPS: Move 'gic_present' to common location.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Steven J. Hill authored and Ralf Baechle committed May 9, 2013
1 parent 451b001 commit ff86714
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion arch/mips/include/asm/gic.h
Original file line number Diff line number Diff line change
Expand Up @@ -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[];
Expand Down
1 change: 1 addition & 0 deletions arch/mips/kernel/irq-gic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
3 changes: 1 addition & 2 deletions arch/mips/kernel/smp-mt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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 |
Expand Down
1 change: 0 additions & 1 deletion arch/mips/mti-malta/malta-int.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
1 change: 0 additions & 1 deletion arch/mips/mti-sead3/sead3-int.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#define SEAD_CONFIG_BASE 0x1b100110
#define SEAD_CONFIG_SIZE 4

int gic_present;
static unsigned long sead3_config_reg;

/*
Expand Down

0 comments on commit ff86714

Please sign in to comment.