Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753257AbbLNIn3 (ORCPT ); Mon, 14 Dec 2015 03:43:29 -0500 Received: from down.free-electrons.com ([37.187.137.238]:40410 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752779AbbLNIn0 (ORCPT ); Mon, 14 Dec 2015 03:43:26 -0500 Date: Mon, 14 Dec 2015 09:43:24 +0100 From: "maxime.ripard@free-electrons.com" To: Vineet Gupta Cc: Marc Zyngier , Daniel Lezcano , Jason Cooper , Peter Zijlstra , Thomas Gleixner , arcml , lkml Subject: Re: percpu irq APIs and perf Message-ID: <20151214084324.GE19456@lukather> References: <56694C0E.5050707@arm.com> <566AB24C.3040407@arm.com> <566ABF86.9030308@synopsys.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="WK3l2KTTmXPVedZ6" Content-Disposition: inline In-Reply-To: <566ABF86.9030308@synopsys.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2901 Lines: 80 --WK3l2KTTmXPVedZ6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Fri, Dec 11, 2015 at 05:50:22PM +0530, Vineet Gupta wrote: > >> (2) It seems that disabling autoen by default for percpu irq makes sen= se as > >> evident from drivers/net/ethernet/marvell/mvneta.c where users want to= control > >> this. However the comment there is misleading > >> > >> /* Even though the documentation says that request_percpu_irq > >> * doesn't enable the interrupts automatically, it actually > >> * does so on the local CPU. > >> * > >> * Make sure it's disabled. > >> */ > >> > >> Either sme core code is clearing NOAUTOEN or calling enable_precpu_irq= () making > >> request_percpu_irq() enable it. > >=20 > > If that's the case, this is a bug. Nobody should enable that interrupt > > until the driver has chosen to do so. >=20 > Perhaps Maxim can shed more light as this seems to be his comment. I don't really have the full context here, but we did this in order to allow RX queue interrupts to be enabled on a particular CPU. The IP was supposed to do that by itself, but we hadn't figure that out at the time. So what we ended up doing is disabling the interrupts by default and then enable it only on the CPU meant to receive the queue interrupts. What we found out doing so was that the per-cpu interrupts were enabled on the cpu calling request_percpu_irq, and so that's why it ended up with that comment. I also fixed the documentation accordingly in a1b7febd725a. Maxime --=20 Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com --WK3l2KTTmXPVedZ6 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJWboEsAAoJEBx+YmzsjxAgdbUQAIby9cSUo5V81QpPUiBUSqR5 xsGtURiVI7GrJUJ/QJIFMrFRMr5LuN2v0TERC5P936hqlqO56xtcNwjpBuGQO7Lb tM002F2/GtTRPNWhsMXdRfLyeU7z0kGgKXFfBYgug6wg9oFqsE+Gsg62ntLElJm8 FDDyDhwpsd3PrulvY2l6dcBFdt2CVDcPuswsr4R71sANWpTj0YnBK6paECraJfJT yIyHXkMAOF5doZJ1BpfUq3n7nCE0atO54TOWjR23g75xjhDgEMSrSYBmFLHe7Lyk 6hCxnhM3P8GGhFI4WzWk3KiG3RJoWXYcAuiojEt2epO42xj4u4GN004IoR5e0TLF JbQLIxrDL+XUpOJdYjmNUVjOHkV0clcR7dpM+fWUfCmVg7vkQ3PipwBbrLsrtCAa rfzFLmIY9nt0ERjeEyf2nYAIZui3VG3pF7Bz86jbBkRMfAB19ZEozSBTCAf5GpU9 7pjRs4Ik90Djip12tHL00E7UhS+AspYoyB3CaRT0HLnGaGIxBJqoSFH/DxMA02yI W6ui4Pd2vncKrKFRUV0uD1GBvErlNKx56AWCnqjRy4xagyd5iAQ/xuy0OC0DNaVW 7KKJCzXJCvtww6Oemd899UCquEuZj+MH2nmC0usRC3OhJJ3dDh2VT8esXqWANMLQ VbrB07P46VA3DOWxqlzx =B8wh -----END PGP SIGNATURE----- --WK3l2KTTmXPVedZ6-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/