Print this page
8620 pcplusmp shouldn't support x2APIC mode
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/i86pc/io/pcplusmp/apic_common.c
          +++ new/usr/src/uts/i86pc/io/pcplusmp/apic_common.c
↓ open down ↓ 15 lines elided ↑ open up ↑
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
  24   24   */
  25   25  /*
  26      - * Copyright (c) 2013, Joyent, Inc.  All rights reserved.
       26 + * Copyright (c) 2017, Joyent, Inc.  All rights reserved.
  27   27   * Copyright (c) 2016 by Delphix. All rights reserved.
  28   28   */
  29   29  
  30   30  /*
  31   31   * PSMI 1.1 extensions are supported only in 2.6 and later versions.
  32   32   * PSMI 1.2 extensions are supported only in 2.7 and later versions.
  33   33   * PSMI 1.3 and 1.4 extensions are supported in Solaris 10.
  34   34   * PSMI 1.5 extensions are supported in Solaris Nevada.
  35   35   * PSMI 1.6 extensions are supported in Solaris Nevada.
  36   36   * PSMI 1.7 extensions are supported in Solaris Nevada.
↓ open down ↓ 84 lines elided ↑ open up ↑
 121  121  int apic_enable_cpcovf_intr = 1;
 122  122  
 123  123  /* vector at which CMCI interrupts come in */
 124  124  int apic_cmci_vect;
 125  125  extern int cmi_enable_cmci;
 126  126  extern void cmi_cmci_trap(void);
 127  127  
 128  128  kmutex_t cmci_cpu_setup_lock;   /* protects cmci_cpu_setup_registered */
 129  129  int cmci_cpu_setup_registered;
 130  130  
 131      -/* number of CPUs in power-on transition state */
 132      -static int apic_poweron_cnt = 0;
 133  131  lock_t apic_mode_switch_lock;
 134  132  
 135  133  /*
 136  134   * Patchable global variables.
 137  135   */
 138  136  int     apic_forceload = 0;
 139  137  
 140  138  int     apic_coarse_hrtime = 1;         /* 0 - use accurate slow gethrtime() */
 141  139  
 142  140  int     apic_flat_model = 0;            /* 0 - clustered. 1 - flat */
↓ open down ↓ 1306 lines elided ↑ open up ↑
1449 1447                  if (apic_cpu_in_range(acid) &&
1450 1448                      (apic_cpus[acid].aci_status & flag)) {
1451 1449                          break;
1452 1450                  }
1453 1451          }
1454 1452  
1455 1453          ASSERT((apic_cpus[acid].aci_status & flag) != 0);
1456 1454          return (acid);
1457 1455  }
1458 1456  
1459      -/*
1460      - * Switch between safe and x2APIC IPI sending method.
1461      - * CPU may power on in xapic mode or x2apic mode. If CPU needs to send IPI to
1462      - * other CPUs before entering x2APIC mode, it still needs to xAPIC method.
1463      - * Before sending StartIPI to target CPU, psm_send_ipi will be changed to
1464      - * apic_common_send_ipi, which detects current local APIC mode and use right
1465      - * method to send IPI. If some CPUs fail to start up, apic_poweron_cnt
1466      - * won't return to zero, so apic_common_send_ipi will always be used.
1467      - * psm_send_ipi can't be simply changed back to x2apic_send_ipi if some CPUs
1468      - * failed to start up because those failed CPUs may recover itself later at
1469      - * unpredictable time.
1470      - */
1471      -void
1472      -apic_switch_ipi_callback(boolean_t enter)
1473      -{
1474      -        ulong_t iflag;
1475      -        struct psm_ops *pops = psmops;
1476      -
1477      -        iflag = intr_clear();
1478      -        lock_set(&apic_mode_switch_lock);
1479      -        if (enter) {
1480      -                ASSERT(apic_poweron_cnt >= 0);
1481      -                if (apic_poweron_cnt == 0) {
1482      -                        pops->psm_send_ipi = apic_common_send_ipi;
1483      -                        send_dirintf = pops->psm_send_ipi;
1484      -                }
1485      -                apic_poweron_cnt++;
1486      -        } else {
1487      -                ASSERT(apic_poweron_cnt > 0);
1488      -                apic_poweron_cnt--;
1489      -                if (apic_poweron_cnt == 0) {
1490      -                        pops->psm_send_ipi = x2apic_send_ipi;
1491      -                        send_dirintf = pops->psm_send_ipi;
1492      -                }
1493      -        }
1494      -        lock_clear(&apic_mode_switch_lock);
1495      -        intr_restore(iflag);
1496      -}
1497      -
1498 1457  void
1499 1458  apic_intrmap_init(int apic_mode)
1500 1459  {
1501 1460          int suppress_brdcst_eoi = 0;
1502 1461  
1503 1462          /*
1504 1463           * Intel Software Developer's Manual 3A, 10.12.7:
1505 1464           *
1506 1465           * Routing of device interrupts to local APIC units operating in
1507 1466           * x2APIC mode requires use of the interrupt-remapping architecture
↓ open down ↓ 241 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX