Print this page
4805 apic_mode global should be an enum

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/i86pc/sys/apic.h
          +++ new/usr/src/uts/i86pc/sys/apic.h
↓ open down ↓ 95 lines elided ↑ open up ↑
  96   96  
  97   97  /* Current Count Register */
  98   98  #define APIC_CURR_COUNT         0xe4
  99   99  #define APIC_CURR_ADD           0x39    /* used for remote read command */
 100  100  #define CURR_COUNT_OFFSET       (sizeof (int32_t) * APIC_CURR_COUNT)
 101  101  
 102  102  /* Divider Configuration Register */
 103  103  #define APIC_DIVIDE_REG         0xf8
 104  104  
 105  105  /* Various mode for local APIC. Modes are mutually exclusive  */
 106      -#define APIC_IS_DISABLED        0x0
 107      -#define APIC_MODE_NOTSET        0x1
 108      -#define LOCAL_APIC              0x2
 109      -#define LOCAL_X2APIC            0x3
      106 +typedef enum apic_mode {
      107 +        APIC_IS_DISABLED = 0,
      108 +        APIC_MODE_NOTSET,
      109 +        LOCAL_APIC,
      110 +        LOCAL_X2APIC
      111 +} apic_mode_t;
 110  112  
 111  113  /* x2APIC SELF IPI Register */
 112  114  #define X2APIC_SELF_IPI         0xFC
 113  115  
 114  116  /* General x2APIC constants used at various places */
 115  117  #define APIC_SVR_SUPPRESS_BROADCAST_EOI         0x1000
 116  118  #define APIC_DIRECTED_EOI_BIT                   0x1000000
 117  119  
 118  120  /* IRR register */
 119  121  #define APIC_IRR_REG            0x80
↓ open down ↓ 738 lines elided ↑ open up ↑
 858  860  extern int apic_enable_acpi;
 859  861  extern int apic_nproc;
 860  862  extern int apic_max_nproc;
 861  863  extern int apic_next_bind_cpu;
 862  864  extern int apic_redistribute_sample_interval;
 863  865  extern int apic_multi_msi_enable;
 864  866  extern int apic_sci_vect;
 865  867  extern int apic_hpet_vect;
 866  868  extern uchar_t apic_ipls[];
 867  869  extern apic_reg_ops_t *apic_reg_ops;
 868      -extern int apic_mode;
      870 +extern apic_mode_t apic_mode;
 869  871  extern void x2apic_update_psm();
 870  872  extern void apic_change_ops();
 871  873  extern void apic_common_send_ipi(int, int);
 872  874  extern void apic_set_directed_EOI_handler();
 873  875  extern int apic_directed_EOI_supported();
 874  876  
 875  877  extern apic_intrmap_ops_t *apic_vt_ops;
 876  878  
 877  879  #ifdef  __cplusplus
 878  880  }
 879  881  #endif
 880  882  
 881  883  #endif  /* _SYS_APIC_APIC_H */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX