Print this page
4804 apix & pcplusmp are nearly warning free already
Tentatively Reviewed by: Robert Mustacchi <rm@joyent.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/i86pc/io/pcplusmp/apic.c
          +++ new/usr/src/uts/i86pc/io/pcplusmp/apic.c
↓ open down ↓ 207 lines elided ↑ open up ↑
 208  208  static struct   psm_info apic_psm_info = {
 209  209          PSM_INFO_VER01_7,                       /* version */
 210  210          PSM_OWN_EXCLUSIVE,                      /* ownership */
 211  211          (struct psm_ops *)&apic_ops,            /* operation */
 212  212          APIC_PCPLUSMP_NAME,                     /* machine name */
 213  213          "pcplusmp v1.4 compatible",
 214  214  };
 215  215  
 216  216  static void *apic_hdlp;
 217  217  
 218      -/*
 219      - * apic_let_idle_redistribute can have the following values:
 220      - * 0 - If clock decremented it from 1 to 0, clock has to call redistribute.
 221      - * apic_redistribute_lock prevents multiple idle cpus from redistributing
 222      - */
 223      -int     apic_num_idle_redistributions = 0;
 224      -static  int apic_let_idle_redistribute = 0;
 225      -
 226  218  /* to gather intr data and redistribute */
 227  219  static void apic_redistribute_compute(void);
 228  220  
 229  221  /*
 230  222   *      This is the loadable module wrapper
 231  223   */
 232  224  
 233  225  int
 234  226  _init(void)
 235  227  {
↓ open down ↓ 555 lines elided ↑ open up ↑
 791  783   * type == -1 indicates it is an internal request. Do not change
 792  784   * resv_vector for these requests
 793  785   */
 794  786  static int
 795  787  apic_get_ipivect(int ipl, int type)
 796  788  {
 797  789          uchar_t vector;
 798  790          int irq;
 799  791  
 800  792          if ((irq = apic_allocate_irq(APIC_VECTOR(ipl))) != -1) {
 801      -                if (vector = apic_allocate_vector(ipl, irq, 1)) {
      793 +                if ((vector = apic_allocate_vector(ipl, irq, 1))) {
 802  794                          apic_irq_table[irq]->airq_mps_intr_index =
 803  795                              RESERVE_INDEX;
 804  796                          apic_irq_table[irq]->airq_vector = vector;
 805  797                          if (type != -1) {
 806  798                                  apic_resv_vector[ipl] = vector;
 807  799                          }
 808  800                          return (irq);
 809  801                  }
 810  802          }
 811  803          apic_error |= APIC_ERR_GET_IPIVECT_FAIL;
↓ open down ↓ 536 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX