From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) (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 E8B6138BF68 for ; Thu, 26 Feb 2026 08:59:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.193 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772096395; cv=none; b=ZKd9jY06K5x0FtisFSTAjN+nlSn/iRiFIgN4Y3/M4cw6MMjgdlFKvHcX26DTbjiSY85OcFx7cf9Rw95AnvGNubF5GtVfuRmutU7qmQkhvWbAETKTkJki8wIXi9cpfFnmABdiN25trYN9CxnvyZhbKVYEVIWyVKB4jI3IkEh5w3w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772096395; c=relaxed/simple; bh=ES1D1oba7az5v+T30vEqUPfH+fqnaFq21Y5X9YWmDjA=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=UGr3jqKoIIxsMpM58Rw8iDrb+cc+1TQ8OIbiA7WRm++8MjJp5KPvJKcvDm+B2GJinpEe93510rYLbT9m762rFJcG/dmOzemqcc7DgR4f0cF7TNgZSFB5hXYG3UzpgIyUrUxQXfDfE8Q4u/ZxbbWnJOicPnpr4wocQrKLJKO9dBw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=xenomai.org; spf=pass smtp.mailfrom=xenomai.org; dkim=pass (2048-bit key) header.d=xenomai.org header.i=@xenomai.org header.b=YAnOUxl/; arc=none smtp.client-ip=217.70.183.193 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=xenomai.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=xenomai.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=xenomai.org header.i=@xenomai.org header.b="YAnOUxl/" Received: by mail.gandi.net (Postfix) with ESMTPSA id C4E66444C4; Thu, 26 Feb 2026 08:59:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xenomai.org; s=gm1; t=1772096392; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=jD4IlrlRd9c+m+83wBDa+HqE2CBJ5klvKOq5iPAoIH0=; b=YAnOUxl/Gul/73E6wlVliBJCAICk6OlgR6SLfydKIkEGEJtFkFACIoUAgYysP2wEHAiUWq 4mgb0keRmcAtX/335GZcsM4Wdb99c7vFGbdnD0Z01ian8Ve/1ra694BJRFqhsd6rQT4WbI wVK4OL30qBT3HQ7R/ANmFUONWfC5vIzi2BO1Kw2WiTxGcwItDhySrJl9A9E1AYy91T8VqK k5DusPAHy6stOwFQyh7PaD+pXasLjpDyWygGdWnzudbRW7gclgGCLiJXC6ecvHhKmUU3Tt dkiGgVCJvTcc3AIFE+dxPrw5/N+L8xrKxYgyMpquPxX6rgQVpOqcpclf7XFY4Q== From: Philippe Gerum To: Jan Kiszka Cc: Florian Bezdeka , Xenomai Subject: Re: [PATCH v2 1/3] cobalt: Prepare for new signature of __request_percpu_irq() in 6.19 In-Reply-To: <7861cc51-136f-447e-9bc5-ffd429049429@siemens.com> (Jan Kiszka's message of "Wed, 25 Feb 2026 20:08:09 +0100") References: <20260220-wip-flo-prepare-for-6-19-v2-0-222effb01976@siemens.com> <20260220-wip-flo-prepare-for-6-19-v2-1-222effb01976@siemens.com> <871pi8ydsa.fsf@xenomai.org> <7861cc51-136f-447e-9bc5-ffd429049429@siemens.com> User-Agent: mu4e 1.12.12; emacs 30.2 Date: Thu, 26 Feb 2026 09:59:51 +0100 Message-ID: <87v7fjx4l4.fsf@xenomai.org> Precedence: bulk X-Mailing-List: xenomai@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: rpm@xenomai.org X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddvgeehiedvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufgjfhgffffkgggtsehttdertddtredtnecuhfhrohhmpefrhhhilhhiphhpvgcuifgvrhhumhcuoehrphhmseigvghnohhmrghirdhorhhgqeenucggtffrrghtthgvrhhnpedvlefhvdehkeduheevleegiedtueejgfekhfeijeefvdeijeekgeeigfejhfekgeenucfkphepvdgrtddumegvtdgrmedulegsmeeftggutdemleeklegrmeehtgegsgemsgejfhhfmegsrghfnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvdgrtddumegvtdgrmedulegsmeeftggutdemleeklegrmeehtgegsgemsgejfhhfmegsrghfpdhhvghlohepphihrhhopdhmrghilhhfrhhomheprhhpmhesgigvnhhomhgrihdrohhrghdpqhhiugepveeggfeiieeggeegveegpdhmohguvgepshhmthhpohhuthdpnhgspghrtghpthhtohepfedprhgtphhtthhopeigvghnohhmrghisehlihhsthhsrdhlihhnuhigrdguvghvpdhrtghpthhtohepfhhlohhrihgrnhdrsggviiguvghkrgesshhivghmvghnshdrtghomhdprhgtphhtthhopehjrghnrdhkihhsiihkrgesshhivghmvghnshdrtghomh Jan Kiszka writes: > On 25.02.26 17:43, Philippe Gerum wrote: >> Jan Kiszka writes: >> >>> On 24.02.26 22:11, Jan Kiszka wrote: >>>> On 20.02.26 12:27, Florian Bezdeka wrote: >>>>> The signature of __request_percpu_irq() got one additional affinity >>>>> parameter in 6.19 and 7.0 will remove the function entirely. >>>>> >>>>> Dovetail 6.19 will introduce a new dovetail specific service called >>>>> request_percpu_irq_affinity_flags() that allows us to set flags and >>>>> affinity at the same time. >>>>> >>>>> It might happen that older Dovetail versions get the new API via >>>>> backports, so the re-#definement for older kernels might get >>>>> obsolete earlier than dropping support for Dovetail < 6.19. >>>>> >>>>> Signed-off-by: Florian Bezdeka >>>>> --- >>>>> include/cobalt/kernel/dovetail/pipeline/irq.h | 6 ++++++ >>>>> include/cobalt/kernel/dovetail/pipeline/pipeline.h | 9 ++++----- >>>>> include/cobalt/kernel/dovetail/pipeline/sirq.h | 9 ++++----- >>>>> kernel/cobalt/dovetail/tick.c | 8 ++++---- >>>>> 4 files changed, 18 insertions(+), 14 deletions(-) >>>>> >>>>> diff --git a/include/cobalt/kernel/dovetail/pipeline/irq.h b/include/cobalt/kernel/dovetail/pipeline/irq.h >>>>> index 55d9b8ff17cd08e5e8c09aec393a1e23736c1b76..df0b8ceb05c25d655a331d238e7ef8ac8a6afeea 100644 >>>>> --- a/include/cobalt/kernel/dovetail/pipeline/irq.h >>>>> +++ b/include/cobalt/kernel/dovetail/pipeline/irq.h >>>>> @@ -5,6 +5,12 @@ >>>>> #ifndef _COBALT_KERNEL_DOVETAIL_IRQ_H >>>>> #define _COBALT_KERNEL_DOVETAIL_IRQ_H >>>>> >>>>> +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 19, 0) >>>>> +#define request_percpu_irq_affinity_flags(irq, handler, flags, devname, \ >>>>> + affinity, dev_id) \ >>>>> + __request_percpu_irq(irq, handler, flags, devname, dev_id) >>>> >>>> BTW, this effectively invalidates the affinity parameter. Before we >>>> could make use of it, we would have to backport the dovetail function to >>>> older kernels as well (6.1 right now). >>>> >>> >>> For the time being, I would like to have a WARN_ON_ONCE(affinity != >>> NULL) in the wrapper so that we have a chance to detect future overuse >>> of the new API. >>> >>>> At the same time, we seem to be forced to create all the OOB interrupts >>>> on all the cores anyway, even when supported_cpus is set to a smaller >>>> set. I do not recall why that is the case, I just vaguely remember >>>> having asked this before. And as long as it is required, the new >>>> affinity parameter will remain NULL. >>> >>> Would still be interesting to recap this aspect, both for classic cobalt >>> (supported_cpus) but also the evl core (oobcpus). Even if the lock >>> contention in the absence of a global nklock is not there anymore, I >>> guess there would be value in not having to proxy the timer on cores >>> that do not host RT workload. But evl is currently requesting the proxy >>> for all cpus as well, isn't it? >> >> Only on the evl_oob_cpus set (tick_install_proxy()). >> > > But per-cpu interrupts are requested for all cores, no? > Yes, but no tick events should be flowing on the non-oob cores since there is no _active_ runqueue on those (although all runqueues are initialized to recover from user misconfiguration of process affinity). IOW, the evl core can and will use request_percpu_irq_affinity_flags() when available. -- Philippe.