From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AC7411E0B66 for ; Mon, 20 Jan 2025 16:57:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737392267; cv=none; b=lf/Y26JJ3UPrVbTov4qKBzxbIu+I0wlRJd6B9CNtHZ8JBOWR9ug5H/xtXfNW4UR1HDXg5X35PeBQTBwKPBLp7OLWk1pswR2pDoveTet1W/MbcTyk2D6IH+RmGr3inx71dAJsueoEFw9j0oF6Y02hpZ9FpjIcUihTi7bG5uNa4jI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737392267; c=relaxed/simple; bh=SqjoCDkD1SN2qV2m1JTwb9QCvFsre6swx+d6ag3Pw0A=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=lbvSqGpETCzUPdKf4U5ifcOJvTnzRED7a+wLmPfa1ce/auAttuogqiIiA4My8x+4Sgraw7nZathoX3Ci/ADitUYZL6qCarFs3rOXiZTkJPQEOWqVnncGC4m03cROXs3UnGT6+USoBjPohSj/m+j4wYBbaUj7NHffsxADecGzNHY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=E95gNjlK; arc=none smtp.client-ip=209.85.221.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="E95gNjlK" Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-3862f32a33eso2141793f8f.3 for ; Mon, 20 Jan 2025 08:57:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1737392264; x=1737997064; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=Zmh3LjgDXuCrewk1sEnTYAx0gKWpB7//JCbiu/mkB5g=; b=E95gNjlKseWCtG2v0bdJUeL27NrVU+xbKe5VoBaNE+a4+z5jFNt7ktJnDiKnLLF1UK HworgXFBAqOqmn6+eEX0RToEGkFY8rBdIA93VbJx+EMRKyuyGrx95J2k9Ivt9yascbU9 om6nwt/YQHGBd0VaOzsbUp5GeVLCIlQDkiw846JcyrnPP7YF2p4kd+hmcr9fWygktM5K 13eUn/5eOiSNXykP51sIKzlUp8csD30G/W+8LpyF0DHIYtYwr2RA9fQpxYlLMDShxPTl fjszmoC6W8XtVqyos5NA093aN99jAyqC2CEkKq7m9WG1YfgxS7LkeYGR7DwOOv66xxCk MF5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737392264; x=1737997064; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Zmh3LjgDXuCrewk1sEnTYAx0gKWpB7//JCbiu/mkB5g=; b=ao3SmpO1vs1TlrjQg+JMtzQWNzLxLWtR6jVxIlHSWY0BTv8sooa8T3Vto/m/2Gmf8a FQytbpN9C5AIQLHmkKpcRvLJfHfvyfaZF4uz3k4wF+SVgbOvX80zwWRBrrPcfY92XWNn abgwByfdk+h7PWzzgFPUeDhO1qZkjXeBMa6AsU2TSwMJkqErlnKKWu8vE/XDnB8NF7aT Vo6zMHoPHwYH3YAHIXuhrGITPAeQxkAXrpviEF8470SG/c/DKRIDd15Iw3goid8f/PbQ 2sWL3TQ0+ZYM/CY6N0Wkrrr8WjcEtOfWAOAE1MwCHyjcKklNTPiG2ZsMbw72zxPzpbDe sylA== X-Forwarded-Encrypted: i=1; AJvYcCUt4eElFRHXHnYucyOfXghjUcV1tCI9Wdcw7t3Yxp1TtvQ0IhHjdjuWNEFaZ/Xivjw9fue2JHbYJPkT7DE=@vger.kernel.org X-Gm-Message-State: AOJu0YyUqHEilnMthNBX3NIBVzg7xmOlWm1xfpyq91Dx75NoryhZ8mw4 uAFN93pZcnBBF+8gyZN6XYQIPYEXuWPkGtNSGf/67u1pA47DSUDD X-Gm-Gg: ASbGncvjwD3wfLHMrxrZO+KX70oaviwc3xF1iTnj1GJstHGHm50/3MkV0mJBVUPPD6j DGDympS7BS54efhU1snpPI6A26GWWWBGOBdY2ta+GAfMLCQVvOIFGzK01bDXNVQYx7up/HxXVbX A8rSXc5Id7DWRR8lskllGS4Mv0meKOZRxKJoNOcmhxhkp+qFiAIr0OmHul/XtegaJeInbZEewrc g8VLTIndLCOzUKakRY/7aHW4Fq13AWYqy7JzCTUoShqY5QwSzn8ippVQLCR1mnNPOFXRg== X-Google-Smtp-Source: AGHT+IGKu75VIea+1l0gG8qAVWHWQ1vof/as9Ss0ZtV+hV3fly0gKZ/gd8EVS7Mq9SG8yWFL+kGiqQ== X-Received: by 2002:a5d:6c65:0:b0:38a:888c:676f with SMTP id ffacd0b85a97d-38bf565f13bmr14009180f8f.15.1737392263729; Mon, 20 Jan 2025 08:57:43 -0800 (PST) Received: from eichest-laptop ([2a02:168:af72:0:cc96:d269:5cab:960d]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38bf3214c5csm10978409f8f.8.2025.01.20.08.57.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jan 2025 08:57:43 -0800 (PST) Date: Mon, 20 Jan 2025 17:57:41 +0100 From: Stefan Eichenberger To: Thomas Gleixner Cc: andrew@lunn.ch, gregory.clement@bootlin.com, sebastian.hesselbarth@gmail.com, shivamurthy.shastri@linutronix.de, anna-maria@linutronix.de, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1] irqchip/irq-mvebu-icu: Fix irq_set_type for sei and nsr Message-ID: References: <20241217111623.92625-1-eichest@gmail.com> <87frlkcx2b.ffs@tglx> <87tt9ya2qy.ffs@tglx> <87cyghan60.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; charset=us-ascii Content-Disposition: inline In-Reply-To: <87cyghan60.ffs@tglx> On Mon, Jan 20, 2025 at 09:45:43AM +0100, Thomas Gleixner wrote: > On Fri, Jan 17 2025 at 19:03, Stefan Eichenberger wrote: > > It seems that irq_chip_set_type_parent is not failing. By adding some > > debug messages to kernel/irq/manage.c I found that irqd_get_trigger_type > > returns IRQF_TRIGGER_RISING even though it should return > > IRQF_TRIGGER_HIGH according to the device tree. Maybe this was fixed > > between 6.10 and 6.12 but I need to analyze that again in more detail. > > The trigger type is fixed up in mvebu_icu_irq_domain_translate(), but > that should be the same with the new code in mvebu_icu_translate(). > > Can you instrument mvebu_icu_translate() and validate that it is > > 1) Invoked at all > > 2) The type fixup is done: > > if (msi_data->subset_data->icu_group == ICU_GRP_SEI) > *type = IRQ_TYPE_EDGE_RISING; Thanks a lot for pointing me in the right direction. I think I found what is going on. My instrumentation showed that we still end up in that function but the translation does not work. I think the reason is that the msi_data conversion is wrong. The following patch would solve the issue: diff --git a/drivers/irqchip/irq-mvebu-icu.c b/drivers/irqchip/irq-mvebu-icu.c index b337f6c05f18..4eebed39880a 100644 --- a/drivers/irqchip/irq-mvebu-icu.c +++ b/drivers/irqchip/irq-mvebu-icu.c @@ -68,7 +68,8 @@ static int mvebu_icu_translate(struct irq_domain *d, struct irq_fwspec *fwspec, unsigned long *hwirq, unsigned int *type) { unsigned int param_count = static_branch_unlikely(&legacy_bindings) ? 3 : 2; - struct mvebu_icu_msi_data *msi_data = d->host_data; + struct msi_domain_info *info = d->host_data; + struct mvebu_icu_msi_data *msi_data = info->chip_data; struct mvebu_icu *icu = msi_data->icu; /* Check the count of the parameters in dt */ Do you agree with that fix? If so I will prepare a proper patch. Thanks for your help, regards, Stefan