diff options
| author | Josef 'Jeff' Sipek <josef.sipek@nexenta.com> | 2014-04-25 17:46:49 -0400 | 
|---|---|---|
| committer | Dan McDonald <danmcd@omniti.com> | 2014-04-29 11:18:17 -0400 | 
| commit | 9b1d70f8223c4278acf4ca60eaf5dd285f72eeee (patch) | |
| tree | 8393e5604700f63bdf01144e3c85b04e089653e1 /usr/src | |
| parent | a833a696f1726fd5d95ded0820612f465a2dad8d (diff) | |
| download | illumos-joyent-9b1d70f8223c4278acf4ca60eaf5dd285f72eeee.tar.gz | |
4805 apic_mode global should be an enum
Reviewed by: Robert Mustacchi <rm@joyent.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Diffstat (limited to 'usr/src')
| -rw-r--r-- | usr/src/uts/i86pc/io/pcplusmp/apic_regops.c | 2 | ||||
| -rw-r--r-- | usr/src/uts/i86pc/sys/apic.h | 12 | 
2 files changed, 8 insertions, 6 deletions
| diff --git a/usr/src/uts/i86pc/io/pcplusmp/apic_regops.c b/usr/src/uts/i86pc/io/pcplusmp/apic_regops.c index c50fa98045..03e669b44a 100644 --- a/usr/src/uts/i86pc/io/pcplusmp/apic_regops.c +++ b/usr/src/uts/i86pc/io/pcplusmp/apic_regops.c @@ -61,7 +61,7 @@ static void local_x2apic_write_int_cmd(uint32_t cpu_id, uint32_t cmd1);   * -----------------------------------------------------------   */  int	x2apic_enable = 1; -int 	apic_mode = LOCAL_APIC;		/* Default mode is Local APIC */ +apic_mode_t apic_mode = LOCAL_APIC;	/* Default mode is Local APIC */  /* Uses MMIO (Memory Mapped IO) */  static apic_reg_ops_t local_apic_regs_ops = { diff --git a/usr/src/uts/i86pc/sys/apic.h b/usr/src/uts/i86pc/sys/apic.h index b632cea09c..8a87760456 100644 --- a/usr/src/uts/i86pc/sys/apic.h +++ b/usr/src/uts/i86pc/sys/apic.h @@ -103,10 +103,12 @@ extern "C" {  #define	APIC_DIVIDE_REG		0xf8  /* Various mode for local APIC. Modes are mutually exclusive  */ -#define	APIC_IS_DISABLED	0x0 -#define	APIC_MODE_NOTSET	0x1 -#define	LOCAL_APIC		0x2 -#define	LOCAL_X2APIC		0x3 +typedef enum apic_mode { +	APIC_IS_DISABLED = 0, +	APIC_MODE_NOTSET, +	LOCAL_APIC, +	LOCAL_X2APIC +} apic_mode_t;  /* x2APIC SELF IPI Register */  #define	X2APIC_SELF_IPI		0xFC @@ -865,7 +867,7 @@ extern int apic_sci_vect;  extern int apic_hpet_vect;  extern uchar_t apic_ipls[];  extern apic_reg_ops_t *apic_reg_ops; -extern int apic_mode; +extern apic_mode_t apic_mode;  extern void x2apic_update_psm();  extern void apic_change_ops();  extern void apic_common_send_ipi(int, int); | 
