Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp225916ybb; Tue, 24 Mar 2020 21:00:59 -0700 (PDT) X-Google-Smtp-Source: ADFU+vutwRvkZg9PLR6sUjfY6lX5dOYRAQ5CduTRJ3QkOGTUou9txi76WaEENtbo1PF+qKFbM8rB X-Received: by 2002:a9d:7d89:: with SMTP id j9mr969710otn.47.1585108859031; Tue, 24 Mar 2020 21:00:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585108859; cv=none; d=google.com; s=arc-20160816; b=UB/yXuGWNIhUEy6qVpQwRh+ZZIVCizQeyDuEpO/sibfh0hLB6CbjOGTmjb9rRX6u3q 5PX7niFU59pWafJN+3n5zNONXBlX2mcgeWc3048UwS6WEe52DZ98AcASgM3ZRz+bLfqq /Udv+z8H49lqAnVvNPBFlDR3tkX780TKqNM9sV0L1N57BDmu4ap5Q1ze4UxV8CFNGKdq DCjWhWzsN+tBQttjZG0DSx58EHX28Cn67z/2rkvjxL4ltRw6HeIUmJagj0W3F93C3DRx RonnGuq+Vb76jzDgQ9sULAIen5xHJUmxJ0a3FBJSqrSrGqX+PX0uV+Qu8c/z+57Vbbq7 vTXg== 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=NuRfXCZxBaCO32O9oMXV7Tlb2T/c2IgMGdJC0/GooPQ=; b=QL5MSlaNV93LwXFPJDG1pHdU/H5PFL1by4XxfFjXLDdvmlOJOdcNIKzon3E00d959C HUOd0PnZHIzCSZMH9IBHfXfi2BeGREHcWL7zOdSbG66PvrxzqDrKORBW0mlwLPL8Z/K4 K57UoWC4cy/i/uJfcOGvOe82HVCiU21n/8BOwLaF62WMGcEj32YOHQTMhw8GEtTFjX1Z dwjOeRQyX/vkjTxWXDojVZ7d6UPxP8qwIxXFlAuQyK/qd7UNqTi3vcgnhrIODWvu9TR+ guPvCpx/EkkWwexyiw4GBQuT6ugdMRO/OQ4epBgKR/nV3WGGlctJRj3CwW4kn8xwwj/C AKZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@flygoat.com header.s=mail header.b=DkKv4VCG; 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 j192si9677893oih.233.2020.03.24.21.00.46; Tue, 24 Mar 2020 21:00:59 -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=DkKv4VCG; 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 S1725939AbgCYEAI (ORCPT + 99 others); Wed, 25 Mar 2020 00:00:08 -0400 Received: from sender3-op-o12.zoho.com.cn ([124.251.121.243]:17801 "EHLO sender3-op-o12.zoho.com.cn" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725263AbgCYEAI (ORCPT ); Wed, 25 Mar 2020 00:00:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1585108748; 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=NuRfXCZxBaCO32O9oMXV7Tlb2T/c2IgMGdJC0/GooPQ=; b=DkKv4VCGoL4pAFmexdTZsRrs6KNp4v4YGFMQwVXCqeZBYCof5AFzh8/oVI3Ndqc0 pW4ppzmC2Bidrpjjk/jrcaWhc+hk9KkIOwPAEBl9PQGZM1y5JISSXFB7qCWylxbqcaE I+loniFh41CPURIxv6G8T/joi7m6ZTRSG3j/GnNE= Received: from localhost.localdomain (39.155.141.144 [39.155.141.144]) by mx.zoho.com.cn with SMTPS id 1585108746857884.0267978010179; Wed, 25 Mar 2020 11:59:06 +0800 (CST) From: Jiaxun Yang To: linux-mips@vger.kernel.org Cc: Jiaxun Yang , Huacai Chen , Marc Zyngier , Thomas Gleixner , Jason Cooper , Rob Herring , Mark Rutland , Thomas Bogendoerfer , Mauro Carvalho Chehab , "David S. Miller" , Greg Kroah-Hartman , Jonathan Cameron , Andy Shevchenko , Allison Randal , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Message-ID: <20200325035537.156911-7-jiaxun.yang@flygoat.com> Subject: [PATCH v8 06/11] irqchip: mips-cpu: Convert to simple domain Date: Wed, 25 Mar 2020 11:54:59 +0800 X-Mailer: git-send-email 2.26.0.rc2 In-Reply-To: <20200325035537.156911-1-jiaxun.yang@flygoat.com> References: <20200325035537.156911-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_desc during initialization. Signed-off-by: Jiaxun Yang Co-developed-by: Huacai Chen Signed-off-by: Huacai Chen Reviewed-by: Marc Zyngier --- 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