Date: Wed, 31 Jan 2018 07:17:56 -0800 From: Nathan Whitehorn <nwhitehorn@freebsd.org> To: Wojciech Macek <wma@freebsd.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r328616 - head/sys/powerpc/aim Message-ID: <61ee6038-9a49-5e9d-f916-8c36d69976a3@freebsd.org> In-Reply-To: <201801310642.w0V6g1Am099107@repo.freebsd.org> References: <201801310642.w0V6g1Am099107@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Thanks! Since PSL_HV is only defined on powerpc64, you also need some #ifdef here or the ppc32 kernel build will break. Also, the comment is longer than 80 characters. -Nathan On 01/30/18 22:42, Wojciech Macek wrote: > Author: wma > Date: Wed Jan 31 06:42:01 2018 > New Revision: 328616 > URL: https://svnweb.freebsd.org/changeset/base/328616 > > Log: > PowerNV: fix compilation on non-NV platforms > > Submitted by: Wojciech Macek <wma@semihalf.com> > Obtained from: Semihalf > Sponsored by: IBM, QCM Technologies > > Modified: > head/sys/powerpc/aim/mp_cpudep.c > > Modified: head/sys/powerpc/aim/mp_cpudep.c > ============================================================================== > --- head/sys/powerpc/aim/mp_cpudep.c Wed Jan 31 05:07:43 2018 (r328615) > +++ head/sys/powerpc/aim/mp_cpudep.c Wed Jan 31 06:42:01 2018 (r328616) > @@ -85,13 +85,15 @@ cpudep_ap_early_bootstrap(void) > break; > case IBMPOWER8: > case IBMPOWER8E: > - isync(); > - /* Direct interrupts to SRR instead of HSRR and reset LPCR otherwise */ > - mtspr(SPR_LPID, 0); > - isync(); > + if (mfmsr() & PSL_HV) { > + isync(); > + /* Direct interrupts to SRR instead of HSRR and reset LPCR otherwise */ > + mtspr(SPR_LPID, 0); > + isync(); > > - mtspr(SPR_LPCR, LPCR_LPES); > - isync(); > + mtspr(SPR_LPCR, LPCR_LPES); > + isync(); > + } > break; > } > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?61ee6038-9a49-5e9d-f916-8c36d69976a3>