Print this page
XXXX pat_sync is clever enough to check for X86FSET_PAT


 927         extern void init_cpu_syscall(struct cpu *cp);
 928 
 929         PMD(PMD_SX, ("%s() called\n", str))
 930 
 931         PMD(PMD_SX, ("%s() #0 cp->cpu_base_spl %d\n", str,
 932             cp->cpu_base_spl))
 933 
 934         mutex_enter(&cpu_lock);
 935         if (cp == i_cpr_bootcpu()) {
 936                 mutex_exit(&cpu_lock);
 937                 PMD(PMD_SX,
 938                     ("%s() called on bootcpu nothing to do!\n", str))
 939                 return;
 940         }
 941         mutex_exit(&cpu_lock);
 942 
 943         /*
 944          * We need to Sync PAT with cpu0's PAT. We have to do
 945          * this with interrupts disabled.
 946          */
 947         if (is_x86_feature(x86_featureset, X86FSET_PAT))
 948                 pat_sync();
 949 
 950         /*
 951          * If we use XSAVE, we need to restore XFEATURE_ENABLE_MASK register.
 952          */
 953         if (fp_save_mech == FP_XSAVE) {
 954                 setup_xfem();
 955         }
 956 
 957         /*
 958          * Initialize this CPU's syscall handlers
 959          */
 960         init_cpu_syscall(cp);
 961 
 962         PMD(PMD_SX, ("%s() #1 cp->cpu_base_spl %d\n", str, cp->cpu_base_spl))
 963 
 964         /*
 965          * Do not need to call cpuid_pass2(), cpuid_pass3(), cpuid_pass4() or
 966          * init_cpu_info(), since the work that they do is only needed to
 967          * be done once at boot time




 927         extern void init_cpu_syscall(struct cpu *cp);
 928 
 929         PMD(PMD_SX, ("%s() called\n", str))
 930 
 931         PMD(PMD_SX, ("%s() #0 cp->cpu_base_spl %d\n", str,
 932             cp->cpu_base_spl))
 933 
 934         mutex_enter(&cpu_lock);
 935         if (cp == i_cpr_bootcpu()) {
 936                 mutex_exit(&cpu_lock);
 937                 PMD(PMD_SX,
 938                     ("%s() called on bootcpu nothing to do!\n", str))
 939                 return;
 940         }
 941         mutex_exit(&cpu_lock);
 942 
 943         /*
 944          * We need to Sync PAT with cpu0's PAT. We have to do
 945          * this with interrupts disabled.
 946          */

 947         pat_sync();
 948 
 949         /*
 950          * If we use XSAVE, we need to restore XFEATURE_ENABLE_MASK register.
 951          */
 952         if (fp_save_mech == FP_XSAVE) {
 953                 setup_xfem();
 954         }
 955 
 956         /*
 957          * Initialize this CPU's syscall handlers
 958          */
 959         init_cpu_syscall(cp);
 960 
 961         PMD(PMD_SX, ("%s() #1 cp->cpu_base_spl %d\n", str, cp->cpu_base_spl))
 962 
 963         /*
 964          * Do not need to call cpuid_pass2(), cpuid_pass3(), cpuid_pass4() or
 965          * init_cpu_info(), since the work that they do is only needed to
 966          * be done once at boot time