Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 116441
b: refs/heads/master
c: efa2559
h: refs/heads/master
i:
  116439: 654beb9
v: v3
  • Loading branch information
Yinghai Lu authored and Ingo Molnar committed Oct 16, 2008
1 parent d1e665a commit 5d4203c
Show file tree
Hide file tree
Showing 4 changed files with 128 additions and 118 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8ea5371baa82db452a8d93e9977b418d30944e32
refs/heads/master: efa2559f65167989f1893cb065e3126d4f13ba60
5 changes: 5 additions & 0 deletions trunk/arch/x86/kernel/apic_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include <asm/smp.h>
#include <asm/mtrr.h>
#include <asm/mpspec.h>
#include <asm/desc.h>
#include <asm/hpet.h>
#include <asm/pgalloc.h>
#include <asm/nmi.h>
Expand All @@ -59,6 +60,10 @@ int x2apic_preenabled;
int local_apic_timer_c2_ok;
EXPORT_SYMBOL_GPL(local_apic_timer_c2_ok);

int first_system_vector = 0xfe;

char system_vectors[NR_VECTORS] = { [0 ... NR_VECTORS-1] = SYS_VECTOR_FREE};

/*
* Debug level, exported for io_apic.c
*/
Expand Down
79 changes: 37 additions & 42 deletions trunk/arch/x86/kernel/io_apic_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,24 +54,22 @@

#define __apicdebuginit(type) static type __init

int (*ioapic_renumber_irq)(int ioapic, int irq);
atomic_t irq_mis_count;

/* Where if anywhere is the i8259 connect in external int mode */
static struct { int pin, apic; } ioapic_i8259 = { -1, -1 };

static DEFINE_SPINLOCK(ioapic_lock);
static DEFINE_SPINLOCK(vector_lock);

int timer_through_8259 __initdata;

/*
* Is the SiS APIC rmw bug present ?
* -1 = don't know, 0 = no, 1 = yes
*/
int sis_apic_bug = -1;

static DEFINE_SPINLOCK(ioapic_lock);
static DEFINE_SPINLOCK(vector_lock);

int first_free_entry;
/*
* Rough estimation of how many shared IRQs there are, can
* be changed anytime.
*/
int pin_map_size;

/*
* # of IRQ routing registers
*/
Expand All @@ -93,7 +91,15 @@ int mp_bus_id_to_type[MAX_MP_BUSSES];

DECLARE_BITMAP(mp_bus_not_pci, MAX_MP_BUSSES);

static int disable_timer_pin_1 __initdata;
int skip_ioapic_setup;

static int __init parse_noapic(char *arg)
{
/* disable IO-APIC */
disable_ioapic_setup();
return 0;
}
early_param("noapic", parse_noapic);

struct irq_cfg;
struct irq_pin_list;
Expand Down Expand Up @@ -268,13 +274,6 @@ static struct irq_cfg *irq_cfg_alloc(unsigned int irq)
return cfg;
}

static int assign_irq_vector(int irq, cpumask_t mask);
/*
* Rough estimation of how many shared IRQs there are, can
* be changed anytime.
*/
int pin_map_size;

/*
* This is performance-critical, we want to do it O(1)
*
Expand Down Expand Up @@ -465,6 +464,9 @@ static void __target_IO_APIC_irq(unsigned int irq, unsigned int dest, u8 vector)
entry = entry->next;
}
}

static int assign_irq_vector(int irq, cpumask_t mask);

static void set_ioapic_affinity_irq(unsigned int irq, cpumask_t mask)
{
struct irq_cfg *cfg;
Expand Down Expand Up @@ -677,7 +679,6 @@ void send_IPI_self(int vector)
#define MAX_PIRQS 8
static int pirq_entries [MAX_PIRQS];
static int pirqs_enabled;
int skip_ioapic_setup;

static int __init ioapic_pirq_setup(char *str)
{
Expand Down Expand Up @@ -981,6 +982,7 @@ static inline int irq_trigger(int idx)
return MPBIOS_trigger(idx);
}

int (*ioapic_renumber_irq)(int ioapic, int irq);
static int pin_2_irq(int idx, int apic, int pin)
{
int irq, i;
Expand Down Expand Up @@ -1621,6 +1623,9 @@ __apicdebuginit(int) print_all_ICs(void)
fs_initcall(print_all_ICs);


/* Where if anywhere is the i8259 connect in external int mode */
static struct { int pin, apic; } ioapic_i8259 = { -1, -1 };

static void __init enable_IO_APIC(void)
{
union IO_APIC_reg_01 reg_01;
Expand Down Expand Up @@ -1998,6 +2003,7 @@ static void ack_apic_edge(unsigned int irq)
ack_APIC_irq();
}

atomic_t irq_mis_count;
static void ack_apic_level(unsigned int irq)
{
unsigned long v;
Expand Down Expand Up @@ -2208,6 +2214,17 @@ static inline void __init unlock_ExtINT_logic(void)
ioapic_write_entry(apic, pin, entry0);
}

static int disable_timer_pin_1 __initdata;

static int __init parse_disable_timer_pin_1(char *arg)
{
disable_timer_pin_1 = 1;
return 0;
}
early_param("disable_timer_pin_1", parse_disable_timer_pin_1);

int timer_through_8259 __initdata;

/*
* This code may look a bit paranoid, but it's supposed to cooperate with
* a wide range of boards and BIOS bugs. Fortunately only the timer IRQ
Expand Down Expand Up @@ -2983,28 +3000,6 @@ void __init setup_ioapic_dest(void)
}
#endif

static int __init parse_disable_timer_pin_1(char *arg)
{
disable_timer_pin_1 = 1;
return 0;
}
early_param("disable_timer_pin_1", parse_disable_timer_pin_1);

static int __init parse_enable_timer_pin_1(char *arg)
{
disable_timer_pin_1 = -1;
return 0;
}
early_param("enable_timer_pin_1", parse_enable_timer_pin_1);

static int __init parse_noapic(char *arg)
{
/* disable IO-APIC */
disable_ioapic_setup();
return 0;
}
early_param("noapic", parse_noapic);

void __init ioapic_init_mappings(void)
{
unsigned long ioapic_phys, idx = FIX_IO_APIC_BASE_0;
Expand Down
Loading

0 comments on commit 5d4203c

Please sign in to comment.