Date: Thu, 6 Jun 2019 17:54:18 +0200 (CEST) From: Arnaud YSMAL <arnaud.ysmal@stormshield.eu> To: Ian Lepore <ian@freebsd.org> Cc: freebsd-hackers <freebsd-hackers@freebsd.org> Subject: Re: hwpmc module does not work on armv6/armv7 Message-ID: <1767704859.3973852.1559836458545.JavaMail.zimbra@stormshield.eu> In-Reply-To: <ec8e69ebc58f8bddeec16995a5a28abf46a3e1a1.camel@freebsd.org> References: <1792534203.3920198.1559829382150.JavaMail.zimbra@stormshield.eu> <401683db73f04cecf12bd11f995480d7a54e9187.camel@freebsd.org> <1084915390.3960836.1559835169854.JavaMail.zimbra@stormshield.eu> <ec8e69ebc58f8bddeec16995a5a28abf46a3e1a1.camel@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
----- Le 6 Juin 19, =C3=A0 17:36, Ian Lepore ian@freebsd.org a =C3=A9crit : > On Thu, 2019-06-06 at 17:32 +0200, Arnaud YSMAL wrote: >> ----- Le 6 Juin 19, =C3=A0 17:22, Ian Lepore ian@freebsd.org a =C3=A9cri= t : >>=20 >> > On Thu, 2019-06-06 at 15:56 +0200, Arnaud YSMAL wrote: >> > > Hi, >> > >=20 >> > > On an armv6/armv7 box, trying to load the hwpmc module lead to an >> > > error message stating that the pmc_armv7_finalize symbol is >> > > undefined. >> > >=20 >> > > This can be fixed by adding this in sys/modules/hwpmc/Makefile : >> > >=20 >> > > .if ${MACHINE_ARCH:Marmv[67]*} !=3D "" >> > > SRCS+=3D hwpmc_armv7.c >> > > .endif >> > >=20 >> > > Does anyone see any reason for not having this? >> > >=20 >> > >=20 >> >=20 >> > No reason, that was just a bug. I've committed your fix as >> > r348741, >> > thanks! >>=20 >> Thank you. >>=20 >> Sorry for not spotting it earlier but, could you please fix the armv7 >> invariant build with this patch? >>=20 >>=20 >> diff --git a/sys/dev/hwpmc/hwpmc_armv7.c >> b/sys/dev/hwpmc/hwpmc_armv7.c >> index 0a601145f8d..d89b5ce302f 100644 >> --- a/sys/dev/hwpmc/hwpmc_armv7.c >> +++ b/sys/dev/hwpmc/hwpmc_armv7.c >> @@ -315,11 +315,12 @@ armv7_intr(struct trapframe *tf) >> int error; >> int reg, cpu; >> =20 >> + cpu =3D curcpu; >> + >> KASSERT(cpu >=3D 0 && cpu < pmc_cpu_max(), >> ("[armv7,%d] CPU %d out of range", __LINE__, cpu)); >> =20 >> retval =3D 0; >> - cpu =3D curcpu; >> pc =3D armv7_pcpu[cpu]; >> =20 >> for (ri =3D 0; ri < armv7_npmcs; ri++) { >>=20 >>=20 >=20 > Already did, right before I committed your change. :) Thanks. :) =20 > I've just heard on irc that there may be other trouble lurking in armv* > hwpmc, some kind of fallout from the changes in r334827. Manu is > looking into it, and will probably post something on the arm@ list when > he gets it figured out. Thank you for the information. >=20 > -- Ian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1767704859.3973852.1559836458545.JavaMail.zimbra>