Date: Tue, 15 Aug 2017 11:20:58 +0800 From: Sepherosa Ziehau <sepherosa@gmail.com> To: Jung-uk Kim <jkim@freebsd.org> Cc: src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r322523 - in stable/10/sys: amd64/amd64 amd64/include x86/x86 Message-ID: <CAMOc5cxb-nWmCr4ar4DLywQ=B6w5T3GxxLTYwvZ1E-Fb4YPjzA@mail.gmail.com> In-Reply-To: <201708142346.v7ENkACH028018@repo.freebsd.org> References: <201708142346.v7ENkACH028018@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Thank you! On Tue, Aug 15, 2017 at 7:46 AM, Jung-uk Kim <jkim@freebsd.org> wrote: > Author: jkim > Date: Mon Aug 14 23:46:10 2017 > New Revision: 322523 > URL: https://svnweb.freebsd.org/changeset/base/322523 > > Log: > MFC: r322323 > > Split identify_cpu() into two functions for amd64 as we do for i386. This > fixes a regression introduced in r322205. > > Approved by: re (marius) > > Modified: > stable/10/sys/amd64/amd64/machdep.c > stable/10/sys/amd64/include/md_var.h > stable/10/sys/x86/x86/identcpu.c > Directory Properties: > stable/10/ (props changed) > > Modified: stable/10/sys/amd64/amd64/machdep.c > ============================================================================== > --- stable/10/sys/amd64/amd64/machdep.c Mon Aug 14 22:38:54 2017 (r322522) > +++ stable/10/sys/amd64/amd64/machdep.c Mon Aug 14 23:46:10 2017 (r322523) > @@ -1853,6 +1853,7 @@ hammer_time(u_int64_t modulep, u_int64_t physfree) > ksym_end = MD_FETCH(kmdp, MODINFOMD_ESYM, uintptr_t); > #endif > > + identify_cpu(); > identify_hypervisor(); > > /* Init basic tunables, hz etc */ > @@ -1950,7 +1951,7 @@ hammer_time(u_int64_t modulep, u_int64_t physfree) > MODINFO_METADATA | MODINFOMD_EFI_MAP) != NULL) > vty_set_preferred(VTY_VT); > > - identify_cpu(); /* Final stage of CPU initialization */ > + finishidentcpu(); /* Final stage of CPU initialization */ > initializecpu(); /* Initialize CPU registers */ > initializecpucache(); > > > Modified: stable/10/sys/amd64/include/md_var.h > ============================================================================== > --- stable/10/sys/amd64/include/md_var.h Mon Aug 14 22:38:54 2017 (r322522) > +++ stable/10/sys/amd64/include/md_var.h Mon Aug 14 23:46:10 2017 (r322523) > @@ -119,6 +119,7 @@ void fsbase_load_fault(void) __asm(__STRING(fsbase_loa > void gsbase_load_fault(void) __asm(__STRING(gsbase_load_fault)); > void dump_add_page(vm_paddr_t); > void dump_drop_page(vm_paddr_t); > +void finishidentcpu(void); > void identify_cpu(void); > void identify_hypervisor(void); > void initializecpu(void); > > Modified: stable/10/sys/x86/x86/identcpu.c > ============================================================================== > --- stable/10/sys/x86/x86/identcpu.c Mon Aug 14 22:38:54 2017 (r322522) > +++ stable/10/sys/x86/x86/identcpu.c Mon Aug 14 23:46:10 2017 (r322523) > @@ -1346,23 +1346,12 @@ fix_cpuid(void) > return (false); > } > > -/* > - * Final stage of CPU identification. > - */ > -#ifdef __i386__ > +#ifdef __amd64__ > void > -finishidentcpu(void) > -#else > -void > identify_cpu(void) > -#endif > { > - u_int regs[4], cpu_stdext_disable; > -#ifdef __i386__ > - u_char ccr3; > -#endif > + u_int regs[4]; > > -#ifdef __amd64__ > do_cpuid(0, regs); > cpu_high = regs[0]; > ((u_int *)&cpu_vendor)[0] = regs[1]; > @@ -1375,6 +1364,18 @@ identify_cpu(void) > cpu_procinfo = regs[1]; > cpu_feature = regs[3]; > cpu_feature2 = regs[2]; > +} > +#endif > + > +/* > + * Final stage of CPU identification. > + */ > +void > +finishidentcpu(void) > +{ > + u_int regs[4], cpu_stdext_disable; > +#ifdef __i386__ > + u_char ccr3; > #endif > > cpu_vendor_id = find_cpu_vendor_id(); > _______________________________________________ > svn-src-all@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" -- Tomorrow Will Never Die
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAMOc5cxb-nWmCr4ar4DLywQ=B6w5T3GxxLTYwvZ1E-Fb4YPjzA>