Print this page
patch fix-compile2


 275          * userland can issue rdtsc, and initialize the TSC_AUX value
 276          * (the cpuid) for the rdtscp instruction on appropriately
 277          * capable hardware.
 278          */
 279         if (is_x86_feature(x86_featureset, X86FSET_TSC))
 280                 setcr4(getcr4() & ~CR4_TSD);
 281 
 282         if (is_x86_feature(x86_featureset, X86FSET_TSCP))
 283                 (void) wrmsr(MSR_AMD_TSCAUX, 0);
 284 
 285         if (is_x86_feature(x86_featureset, X86FSET_DE))
 286                 setcr4(getcr4() | CR4_DE);
 287 #endif /* __xpv */
 288 
 289         /*
 290          * initialize t0
 291          */
 292         t0.t_stk = (caddr_t)rp - MINFRAME;
 293         t0.t_stkbase = t0stack;
 294         t0.t_pri = maxclsyspri - 3;
 295         t0.t_schedflag = TS_LOAD | TS_DONT_SWAP;
 296         t0.t_procp = &p0;
 297         t0.t_plockp = &p0lock.pl_lock;
 298         t0.t_lwp = &lwp0;
 299         t0.t_forw = &t0;
 300         t0.t_back = &t0;
 301         t0.t_next = &t0;
 302         t0.t_prev = &t0;
 303         t0.t_cpu = cpu[0];
 304         t0.t_disp_queue = &cpu0_disp;
 305         t0.t_bind_cpu = PBIND_NONE;
 306         t0.t_bind_pset = PS_NONE;
 307         t0.t_bindflag = (uchar_t)default_binding_mode;
 308         t0.t_cpupart = &cp_default;
 309         t0.t_clfuncs = &sys_classfuncs.thread;
 310         t0.t_copyops = NULL;
 311         THREAD_ONPROC(&t0, CPU);
 312 
 313         lwp0.lwp_thread = &t0;
 314         lwp0.lwp_regs = (void *)rp;
 315         lwp0.lwp_procp = &p0;




 275          * userland can issue rdtsc, and initialize the TSC_AUX value
 276          * (the cpuid) for the rdtscp instruction on appropriately
 277          * capable hardware.
 278          */
 279         if (is_x86_feature(x86_featureset, X86FSET_TSC))
 280                 setcr4(getcr4() & ~CR4_TSD);
 281 
 282         if (is_x86_feature(x86_featureset, X86FSET_TSCP))
 283                 (void) wrmsr(MSR_AMD_TSCAUX, 0);
 284 
 285         if (is_x86_feature(x86_featureset, X86FSET_DE))
 286                 setcr4(getcr4() | CR4_DE);
 287 #endif /* __xpv */
 288 
 289         /*
 290          * initialize t0
 291          */
 292         t0.t_stk = (caddr_t)rp - MINFRAME;
 293         t0.t_stkbase = t0stack;
 294         t0.t_pri = maxclsyspri - 3;
 295         t0.t_schedflag = 0;
 296         t0.t_procp = &p0;
 297         t0.t_plockp = &p0lock.pl_lock;
 298         t0.t_lwp = &lwp0;
 299         t0.t_forw = &t0;
 300         t0.t_back = &t0;
 301         t0.t_next = &t0;
 302         t0.t_prev = &t0;
 303         t0.t_cpu = cpu[0];
 304         t0.t_disp_queue = &cpu0_disp;
 305         t0.t_bind_cpu = PBIND_NONE;
 306         t0.t_bind_pset = PS_NONE;
 307         t0.t_bindflag = (uchar_t)default_binding_mode;
 308         t0.t_cpupart = &cp_default;
 309         t0.t_clfuncs = &sys_classfuncs.thread;
 310         t0.t_copyops = NULL;
 311         THREAD_ONPROC(&t0, CPU);
 312 
 313         lwp0.lwp_thread = &t0;
 314         lwp0.lwp_regs = (void *)rp;
 315         lwp0.lwp_procp = &p0;