Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp300569ybh; Tue, 17 Mar 2020 23:42:58 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsd6AGGf6gMX60gAf5jLhM9J6GjcHBrJoIp5hg7eu/Aw2+yxAMCiqQfNrepOxtNO22DJZA7 X-Received: by 2002:a9d:7458:: with SMTP id p24mr2686521otk.197.1584513777933; Tue, 17 Mar 2020 23:42:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584513777; cv=none; d=google.com; s=arc-20160816; b=S0IuhseL4TDj+XeDWfOtg19uSiV79Ai8wJpNfA4FedRvhRUAHYZVnjE4+SznTUSMVg fMA77jzXyu/RN6H5y8vHHZkp9fYm0XqpKtgwPNU1gN0YcaJlUXzd2v9feRvjsHa+llnK E7BH5VesGT59DyBkk84Zi/Bx4fQ7vWZfbf8wFDQYcq/CnbRBuIG6povYrOEeiAWFGcWI yuLvAlYGHsK6lf14LWC09jHZuU+KxI3pVODS7257lR9kPL3kpyxTkP4i/0kMptqw+EEf Fi1ujOnuOdebVWWWV6b70j4nOUzsfKlHcS1kGRSYKJZMTwfaiTnti8mnUGYBhCEu9TSx MHEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:subject:message-id:cc:to:from :dkim-signature; bh=/2lzGckd44y7J3i8bIgDra9A9mus3vdjKhhw5nanvI0=; b=TDlNtnv9uENU9Jlq8WR0WfoTvtysQgWQdZ281GMgTUyUc1nh3vhstKPAn/5JqtN2r6 5hkTo8w4bSUGdPq1Ap5zrFqMMZSBSJc7s6D0+3j2imTp4goVtqu/g+tOAUybP7mpLjEN e3XPAP92edSr5WWyT0AC6oQjUnLpr9cX361/gCQ+bGqNlM/B1HWwAsvQ91KEdp1DIoJ6 W8JTs8eia+u8Cni6OYVIS3Ad8x/BiO4wqV6kTIlczC8SraO9ay0ExzRorAkLY0UXwTgx vHkLyDG5PiEGQ1mBEJ3XRJaxNHzt4xDhCSV9HqDMFrzepA8HDcLX7SeFAPPbxO2r1mUV c3DQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@flygoat.com header.s=mail header.b=ciYYdVSY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=flygoat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q25si2968891ota.36.2020.03.17.23.42.43; Tue, 17 Mar 2020 23:42:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@flygoat.com header.s=mail header.b=ciYYdVSY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=flygoat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727364AbgCRGZU (ORCPT + 99 others); Wed, 18 Mar 2020 02:25:20 -0400 Received: from sender3-op-o12.zoho.com.cn ([124.251.121.243]:17807 "EHLO sender3-op-o12.zoho.com.cn" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726553AbgCRGZU (ORCPT ); Wed, 18 Mar 2020 02:25:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1584512654; s=mail; d=flygoat.com; i=jiaxun.yang@flygoat.com; h=From:To:Cc:Message-ID:Subject:Date:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Content-Type; bh=/2lzGckd44y7J3i8bIgDra9A9mus3vdjKhhw5nanvI0=; b=ciYYdVSYv6tAjfIljGfljjbd7GQsFMx8YX3U8buZr1Btt+T1Z1AIPRg4AtW2eg5P 2SW8meUntsvbxMOB5sKqnZEA4t7+5DaSGYt3TIV6INf3MsN0m/lv09YA98ZKBo+2cQk ws0vT+a+xOCVLanGYPGdarmRwkQWBxStUHPIr4Jk= Received: from localhost.localdomain (39.155.141.144 [39.155.141.144]) by mx.zoho.com.cn with SMTPS id 1584512653356165.17200962856293; Wed, 18 Mar 2020 14:24:13 +0800 (CST) From: Jiaxun Yang To: linux-mips@vger.kernel.org Cc: Jiaxun Yang , Huacai Chen , Thomas Gleixner , Jason Cooper , Marc Zyngier , Rob Herring , Mark Rutland , Ralf Baechle , Paul Burton , Greg Kroah-Hartman , Allison Randal , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Message-ID: <20200318062102.8145-7-jiaxun.yang@flygoat.com> Subject: [PATCH v5 06/11] irqchip: mips-cpu: Convert to simple domain Date: Wed, 18 Mar 2020 14:20:34 +0800 X-Mailer: git-send-email 2.26.0.rc2 In-Reply-To: <20200318062102.8145-1-jiaxun.yang@flygoat.com> References: <20200318062102.8145-1-jiaxun.yang@flygoat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoCNMailClient: External Content-Type: text/plain; charset=utf8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The old code is using legacy domain to setup irq_domain for CPU interrupts which requires irq_desc to be preallocated. However, when MIPS_CPU_IRQ_BASE >=3D 16, irq_desc for CPU IRQs may end up unallocated and lead to incorrect behavior. Thus we convert the legacy domain to simple domain which can allocate irq_d= esc during initialization. Co-developed-by: Huacai Chen Signed-off-by: Jiaxun Yang --- drivers/irqchip/irq-mips-cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-mips-cpu.c b/drivers/irqchip/irq-mips-cpu.= c index 95d4fd8f7a96..c3cf7fa76424 100644 --- a/drivers/irqchip/irq-mips-cpu.c +++ b/drivers/irqchip/irq-mips-cpu.c @@ -251,7 +251,7 @@ static void __init __mips_cpu_irq_init(struct device_no= de *of_node) =09clear_c0_status(ST0_IM); =09clear_c0_cause(CAUSEF_IP); =20 -=09irq_domain =3D irq_domain_add_legacy(of_node, 8, MIPS_CPU_IRQ_BASE, 0, +=09irq_domain =3D irq_domain_add_simple(of_node, 8, MIPS_CPU_IRQ_BASE, =09=09=09=09=09 &mips_cpu_intc_irq_domain_ops, =09=09=09=09=09 NULL); =09if (!irq_domain) --=20 2.26.0.rc2