From patchwork Sat Jun 17 07:02:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 109426 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1828907vqr; Sat, 17 Jun 2023 00:20:23 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7aC03VZkam4hFzrSJuu4HQg+wbGvGEom+GovduMW5fZdx7uHGpOUDDZ5Ig2XS9F4lRbHlg X-Received: by 2002:a17:902:9891:b0:1b2:439f:aa6f with SMTP id s17-20020a170902989100b001b2439faa6fmr2669787plp.44.1686986422985; Sat, 17 Jun 2023 00:20:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686986422; cv=none; d=google.com; s=arc-20160816; b=mco0TRcM29bG880oegGPffTGK1Ffsdb4QuiYf8eEnIHmTrEND3WOtt+ECE6ciQIBJ+ GZcrJiomI1jDgShX3W9AnfoHI5BtpkFop9Gyz/wHKQL4vyea0XR9wBpLLyAw0eG+dKt3 DYNfdtiGDyWplBr1X+xA7CAoIYsY9GH1VczYBNtzW99223dkStQP92/Li58LOiBrH2ut pNyy1amt7zeYUz6Ug/havKJ1jbktraP6b9yoa26QdvRFUwf+mPz5susUA2a/bUoEIoD+ WfYHu+4W5ZY8yvyNnOznlNDMogIH7R/qIwutKzqqlIcXyBcL8+Q7yr8ji+VT7prSvGJY dMAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=X6HC5wxQcIEqAgSQJdb+UHn0VmVyLap03X1VIiek8n0=; b=vkBNEEpTAsxheILGxVnwMMPcPOUd7hIUUbrG7UKrqVUGK7/aOoQJyOGDIirm6zWbS4 zxDqYEGbf8gACy9YPFBrV3F/OHsf4+13EIbGJkP/b84fusafAGBc8KFbmaI8tjoEWrdl XFP2DEjv7q8L6PtgDIjtnQfcs/deBklmC35trxndDtBI/pD5GUINkvI9AK4Zg7fe7J6m DBemgqzrBC7HFWOXw04jV/fbRmDPjQr7eHYRKtPBZAML0RvbSqbp64HYXVkebuKLOBjH tiX5GjkXty7ZPEvz9FT4csEebjrdnxpmC5+O0Ody5n49GYggM+AVJsLp+qkOIYFaAZWX 3H5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=T+js6W1H; dkim=neutral (no key) header.i=@linutronix.de; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u6-20020a170902e5c600b001ac7ea55768si17588981plf.499.2023.06.17.00.20.09; Sat, 17 Jun 2023 00:20:22 -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; dkim=pass header.i=@linutronix.de header.s=2020 header.b=T+js6W1H; dkim=neutral (no key) header.i=@linutronix.de; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232909AbjFQHCw (ORCPT + 99 others); Sat, 17 Jun 2023 03:02:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229667AbjFQHCt (ORCPT ); Sat, 17 Jun 2023 03:02:49 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83809199F for ; Sat, 17 Jun 2023 00:02:48 -0700 (PDT) Date: Sat, 17 Jun 2023 07:02:46 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1686985367; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=X6HC5wxQcIEqAgSQJdb+UHn0VmVyLap03X1VIiek8n0=; b=T+js6W1HnY8TYaiyhLEu0eJnKbvr33ciR71ohSJfhLKCuJQHe0zLB25CNlnZEI3imZCkWE Rv/LWwY4FAgmh8+X+o250R+/6nBoQYDzuBJS3iWM8I2NY5zm6YnTlmovbg/wk33zUygnWo DvltwBtvD4QVd4DzyPGXSwvaLbNXGRoCaDyu3t5VcbbI+vUkF9IvLLIaWpaE0017Qr0lDL 9cgYYyH4uYa5n+SIRRJ/uXO2wnmOzcjPLtVubAXwF+qbEYb6Fzb+iqSh64FgBb8MV6w96d R6kgSByhvnvhArcukl/TmdBphJhSss/RoidRZ3M9jtcrhj3lpQFkhYMBYm4NuA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1686985367; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=X6HC5wxQcIEqAgSQJdb+UHn0VmVyLap03X1VIiek8n0=; b=/+EtQbT6+8pK0YopFX5C8mU7LzxT2AcaRCgeqMX5VpxiNjwZQoLx3YqBteENpcHAU2opx8 /XD+Rm5UhaTIkWAQ== From: "irqchip-bot for John Paul Adrian Glaubitz" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-kernel@vger.kernel.org Subject: [irqchip: irq/irqchip-next] irqchip/jcore-aic: Fix missing allocation of IRQ descriptors Cc: John Paul Adrian Glaubitz , Rob Landley , Marc Zyngier , tglx@linutronix.de In-Reply-To: <20230510163343.43090-1-glaubitz@physik.fu-berlin.de> References: <20230510163343.43090-1-glaubitz@physik.fu-berlin.de> MIME-Version: 1.0 Message-ID: <168698536627.404.550156100246054585.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765525805672477165?= X-GMAIL-MSGID: =?utf-8?q?1768933475507448855?= The following commit has been merged into the irq/irqchip-next branch of irqchip: Commit-ID: 4848229494a323eeaab62eee5574ef9f7de80374 Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/4848229494a323eeaab62eee5574ef9f7de80374 Author: John Paul Adrian Glaubitz AuthorDate: Wed, 10 May 2023 18:33:42 +02:00 Committer: Marc Zyngier CommitterDate: Sat, 17 Jun 2023 07:54:48 +01:00 irqchip/jcore-aic: Fix missing allocation of IRQ descriptors 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 Tested-by: Rob Landley Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230510163343.43090-1-glaubitz@physik.fu-berlin.de --- 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 5f47d8e..b9dcc8e 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);