From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F2185336893 for ; Fri, 27 Mar 2026 11:03:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774609419; cv=none; b=q+FFJTzlVuQEaFPdD9g4M44K47vef9QxNWtsCMeD/15sth9nTovituqKyBWp4aFaK9UIl535hPd0j6evLnh2VKleob96N+RsOsYhpavqef51nCcEbrhv/jT5y2Ge4mrG/uAaFK9Fn1gqR+Zj/CzrI65TTghTggRMvqWgzlWSsCg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774609419; c=relaxed/simple; bh=KtlMGG9bNSSpoAkOaAh97/scnM+90xol3v5foQVItTg=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=bqKOcKN8xrJynC7TsaXdxImXfN5Vy6xa5KEOww7d+AJaXUny/f8XTvOfi9DIhxDO+RiGxJ3E6Lo/3WG/Gb23q2NAceFpcBCyjJohlgdGnNpRHLwR1exOaypfrwaUE1Ng+JcTWS41E1NU+pU4v4MPDY2qtUHq8OoeYfYEE3wbEsU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gpYETFIw; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="gpYETFIw" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A56D9C19423; Fri, 27 Mar 2026 11:03:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1774609418; bh=KtlMGG9bNSSpoAkOaAh97/scnM+90xol3v5foQVItTg=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=gpYETFIwiK7n1cWoBi4BJDz5Yh1YQc+3PQENs6dIl9Qg88xbzYoNKq2N8gY+zvQn8 IfGnOEvKXdFDM2BKNhmssGckamR6KV1uC8eG+mUIgwTx6WqzoVaotnU0MPUIvbHhkE MO2E2onOWWz84orRA8eATr1+Rh/IRjhRibSC637q81tFnDvqpG+plgnt6bzU9wb4Dg grzU8Q+oBz9exhpEzXshipfCIVRk+NqHvndStENZ5M4KRLQUHNs6HUWN3qlDdCejb9 cRhynH3y7JAyTavbyvSgo/PtQJsjPm0wvZ4bWfXhcC1mVozm0Ci8gwYQ56EngqGr1O XjT2ckQDqr2cg== From: Thomas Gleixner To: Florian Fainelli , Radu Rendec , LKML Cc: x86@kernel.org, Dmitry Ilvokhin , Jan Kiszka , Kieran Bingham Subject: Re: [patch v2 04/14] x86/irq: Make irqstats array based In-Reply-To: <5251d937-b737-48a0-8b14-ab375d28e341@broadcom.com> References: <20260320131108.344376329@kernel.org> <20260320132102.297759330@kernel.org> <874im5gfzp.ffs@tglx> <871ph9ges3.ffs@tglx> <87bjgbed38.ffs@tglx> <88fb8efc-6a00-484f-ad9f-6b7c3bf1506e@broadcom.com> <878qbeevdm.ffs@tglx> <5251d937-b737-48a0-8b14-ab375d28e341@broadcom.com> Date: Fri, 27 Mar 2026 12:03:34 +0100 Message-ID: <871ph5cz5l.ffs@tglx> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Florian! On Thu, Mar 26 2026 at 16:00, Florian Fainelli wrote: > On 3/26/26 03:29, Thomas Gleixner wrote: >> So if Radu hadn't noticed and pointed it out, I wouldn't have known >> about it at all. > > Yes that's a fair point and it has been a complaint of mine whenever I > had to use the GDB scripts because they get out of sync so easily with > the code they are trying to parse, at some point it's not even fun. > > This should still apply if you want to take it: > > https://lore.kernel.org/all/20250625231053.1134589-6-florian.fainelli@broadcom.com/ That's just delegating something unenforcable, not automatically testable to other maintainers. So it's not solving anything. You want something which breaks the build for the submitter so that he needs to go and fix up the gdb script or at least ask for help if he can't figure it out on his own. If he does not build with debug enabled the CI robots will catch it and send him back to the drawing board. > As far as ensuring that the C/Rust code stays in sync with GDB at > compile time, did not have any bright idea about how to do that. Add parseable annotation into each of the snake scripts: class kernel_dep(object): def __init__(self, name, member=None, config=None, type=TYPE_VAR) self.name = name self.member = member self.config = config self.type = type and per unit you add: kernel_dependencies = [ kernel_dep(TYPE_VAR, 'nr_irqs'), kernel_dep(TYPE_VAR, 'irq_stat', '__nmi_count', 'CONFIG_X86'), kernel_dep('irq_chip', 'name', type=TYPE_STRUCT), .... ] or something daft like that. I'm 100% sure that real snake experts will come up with a way more elegant solution, but you get the idea. Then have a script which collects this information from the source files and validates it against the debug information in vmlinux. Obviously this would allow you to validate the snake code against those dependencies as well. The first two entries would have caught both changes I made, the array conversion of irq_stat and the rename of nr_irqs. Hmm? Thanks, tglx