Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp8417178rwr; Thu, 11 May 2023 00:32:44 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4xIuoaAZYPcm7H5eL4cvhxQ12OLxFFlpfp9syuwRberm9PZXOIRLGg2FtkMTo4+qUYiMcU X-Received: by 2002:a17:902:ee8a:b0:1ac:6c26:c32f with SMTP id a10-20020a170902ee8a00b001ac6c26c32fmr15827062pld.46.1683790363752; Thu, 11 May 2023 00:32:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683790363; cv=none; d=google.com; s=arc-20160816; b=htk+f9PRIZeHrF7vb69s2MIkIJsM5Zblr4DghQSFv2h5asnc6TFhqrbOSKg09Z8lxy dfF+xTTHw9RNNLdYGrqgih0HVwn/+aQNAYjDIFp1ppVs96KMPt93tA5N/4wzhMBrXCqI 0J2TecCgGFLA/RwfnAtTfcGwed/wTcSALzZBDE20uAjzsElTbCFC1/Y2MVdfVewmZjYc v33yqHgh4w6vOpWpoqudplc271zplHpkGYHsXFFHY3IMt3Mh60mq0RDc6rSOPqNpWocT sOvtEfiWuS2tzGIm+tSazF2HxegA6cPfobdI7kB4qgZ6Qrv63uADLcZZI4N3Uh/FCMLs E1eQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id; bh=zETykTXBopDTEGOTs5LzBGEnUomXYzvg146Cc/fCEUk=; b=LVrIzNSUyFCDdHgKgGb31Le1lG5cEg8oLl/HrpzZF+87x1yQKB4PDFv4hJy+Dhzbju 9JxfvzgK6DhmhWcpR17xXsny4XlQ12W54tVspIYFlX5BpYTduFsJE49i2hUT/JpgqzDj 4MDbBljfeLmp8enHeUqxNp9teCc9ESpDSxXAhXaP/YmVdgqXwDlMDTuzZLRHc1KYWmDP xQR8DZYr05LHrM6zJTsburudfVmv2FhFKvEsU8i+CiFhChegrwjzvar4aFKkFPiXNFS7 gwcNGgUjk5+BZw03cRYH51Tf02dOcdQm1zHGiHHGBY9PjnIMVM55pOIsDGzR9Gb1ZFWa crDA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x4-20020a170902b40400b001a6ade4c8c2si5665194plr.142.2023.05.11.00.32.28; Thu, 11 May 2023 00:32:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237644AbjEKHXW convert rfc822-to-8bit (ORCPT + 99 others); Thu, 11 May 2023 03:23:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237369AbjEKHXC (ORCPT ); Thu, 11 May 2023 03:23:02 -0400 Received: from outpost1.zedat.fu-berlin.de (outpost1.zedat.fu-berlin.de [130.133.4.66]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 59AA11A2 for ; Thu, 11 May 2023 00:22:34 -0700 (PDT) Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost.zedat.fu-berlin.de (Exim 4.95) with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (envelope-from ) id 1px0d2-000aVW-T1; Thu, 11 May 2023 09:22:20 +0200 Received: from p5b13addc.dip0.t-ipconnect.de ([91.19.173.220] helo=[192.168.178.81]) by inpost2.zedat.fu-berlin.de (Exim 4.95) with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (envelope-from ) id 1px0d2-003MJK-M2; Thu, 11 May 2023 09:22:20 +0200 Message-ID: <3c76bea5e45a5ae9ea58b3ff87f9971955a3a021.camel@physik.fu-berlin.de> Subject: Re: [PATCH] irqchip/jcore-aic: Fix missing allocation of IRQ descriptors From: John Paul Adrian Glaubitz To: Marc Zyngier Cc: Thomas Gleixner , Rich Felker , linux-kernel@vger.kernel.org Date: Thu, 11 May 2023 09:22:20 +0200 In-Reply-To: <479a18513b9d8c6e8ccb96093a0f0dd7@kernel.org> References: <20230510163343.43090-1-glaubitz@physik.fu-berlin.de> <479a18513b9d8c6e8ccb96093a0f0dd7@kernel.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.48.1 MIME-Version: 1.0 X-Original-Sender: glaubitz@physik.fu-berlin.de X-Originating-IP: 91.19.173.220 X-ZEDAT-Hint: PO X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jason! On Thu, 2023-05-11 at 07:56 +0100, Marc Zyngier wrote: > On 2023-05-10 17:33, John Paul Adrian Glaubitz wrote: > > The initialization function for the J-Core AIC aic_irq_of_init() is > > currently missing the call to irq_alloc_descs() which allocates and > > initializes all the IRQ descriptors. Add missing function call and > > return the error code from irq_alloc_descs() in case the allocation > > fails. > > > > Fixes: 981b58f66cfc ("irqchip/jcore-aic: Add J-Core AIC driver") > > Signed-off-by: John Paul Adrian Glaubitz > > --- > > drivers/irqchip/irq-jcore-aic.c | 7 +++++++ > > 1 file changed, 7 insertions(+) > > > > diff --git a/drivers/irqchip/irq-jcore-aic.c > > b/drivers/irqchip/irq-jcore-aic.c > > index 5f47d8ee4ae3..b9dcc8e78c75 100644 > > --- a/drivers/irqchip/irq-jcore-aic.c > > +++ b/drivers/irqchip/irq-jcore-aic.c > > @@ -68,6 +68,7 @@ static int __init aic_irq_of_init(struct device_node > > *node, > > unsigned min_irq = JCORE_AIC2_MIN_HWIRQ; > > unsigned dom_sz = JCORE_AIC_MAX_HWIRQ+1; > > struct irq_domain *domain; > > + int ret; > > > > pr_info("Initializing J-Core AIC\n"); > > > > @@ -100,6 +101,12 @@ static int __init aic_irq_of_init(struct > > device_node *node, > > jcore_aic.irq_unmask = noop; > > jcore_aic.name = "AIC"; > > > > + ret = irq_alloc_descs(-1, min_irq, dom_sz - min_irq, > > + of_node_to_nid(node)); > > + > > + if (ret < 0) > > + return ret; > > + > > domain = irq_domain_add_legacy(node, dom_sz - min_irq, min_irq, > > min_irq, > > &jcore_aic_irqdomain_ops, > > &jcore_aic); > > [- Jason] > > It really begs the question: how has it ever been working before? Users already used a locally patched kernel to work around this problem. > Is there any plan to modernise the port and get it to allocate > irq_descs on demand, as we do on most architectures? Yes, there are plans to modernize the port. We're first working on upstreaming all kinds of patches that have been queuing up over the time. Adrian -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer `. `' Physicist `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913