Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1617222pxb; Mon, 11 Oct 2021 09:34:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJztM2VMM1k8lfZOop8pTes2a3v9R6p8d0S23BfZFBYiyZw5IR9kS4fIsBQEm9lA83/mAWEY X-Received: by 2002:a05:6402:2684:: with SMTP id w4mr42517165edd.108.1633970051033; Mon, 11 Oct 2021 09:34:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633970051; cv=none; d=google.com; s=arc-20160816; b=IpNfiTl0H3xtI3BqiDsLq/nJdqmJCXDeaclpm1vUW5Imm6zgOkOcdBbT9g+6NX3QNC IvjgSdqU13NtbZ3gUk2+kmh7p/t6mHhEvPxPAWvv4PNySkU8DQ8vwMQFNAn/Q4O0IkRn TuJIKq746dbtpqvPkfIHsdHNTqfD5Yaen4gFBPCP05VtPfPTsD8qZXz3oyH29ysVVdPv asmP0PqpVjSlJg4rqL7uin/LWrjdHmOkdVoU5SOfU2ewYKa8yJu7g3iE23EJSIE0aEjh ezn7iekvyjNQwYd/F81Gtr0gOtkjMhBtOKIIGVn25NsRCgmxhlkbAbVDYa3Un4FJXkNl 3E9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=kzwXf18kAuqfUQYlFMB3V00fvy0OSfABSi41z1BPqx4=; b=vzUYC+yqMHY6VrHaBA+c5FMDpm8jWG4oIvF0qnpwqE4h8HPQJIwgj49AwUZLWWkx4T J28TpsJaV864ybj0KgDVIlldzOIqF0UuJ3V1cZw7niC4de1JU1eFefu8cjiNZ/iIe1B4 gOYCDNPwOXv7k8u9x77D1efdAcjO7yYgBmE5QD1DA+Ek0nO+xwS36IADsPBnWkFz1g/Q R7K3stFYhYKYZNojAkNMPhdHO9h5P332fRh39LmeCysKu5Kzq0spQ1gh2lyhO09oKnNY k09e+n6tgZAR4rAFojs+BjPyP62SExVKGYFTo5PkX82gxDetdgFjFqjYTo+ueUv1Pp7K 9dRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=FOv59uLD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v5si16238727edi.595.2021.10.11.09.33.47; Mon, 11 Oct 2021 09:34:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=FOv59uLD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238110AbhJKOAD (ORCPT + 99 others); Mon, 11 Oct 2021 10:00:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:50200 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238254AbhJKN6X (ORCPT ); Mon, 11 Oct 2021 09:58:23 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 06E5A61078; Mon, 11 Oct 2021 13:54:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1633960494; bh=GgDRqfBeQMUhgmLcfjsJRYdlUheZeSWZePX/uUDmz4c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FOv59uLDEl6LnOSsOuLO4HwypJHLSgpUgYXKe7zBOW5gke6Niba7D5ijyCldQO4uz GqH21qX6LYBdeYj90yf9STxEI9TFfpxNrGaBWjRwNPciaohBLWKNm9TVqT/Q8uv4Xt yx1CyW9DI5AMz6FpYCgFE6at31h6sJ2AP8D/Pzzk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Max Filippov , Sasha Levin Subject: [PATCH 5.10 33/83] xtensa: call irqchip_init only when CONFIG_USE_OF is selected Date: Mon, 11 Oct 2021 15:45:53 +0200 Message-Id: <20211011134509.516979963@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211011134508.362906295@linuxfoundation.org> References: <20211011134508.362906295@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Max Filippov [ Upstream commit 6489f8d0e1d93a3603d8dad8125797559e4cf2a2 ] During boot time kernel configured with OF=y but USE_OF=n displays the following warnings and hangs shortly after starting userspace: ------------[ cut here ]------------ WARNING: CPU: 0 PID: 0 at kernel/irq/irqdomain.c:695 irq_create_mapping_affinity+0x29/0xc0 irq_create_mapping_affinity(, 6) called with NULL domain CPU: 0 PID: 0 Comm: swapper Not tainted 5.15.0-rc3-00001-gd67ed2510d28 #30 Call Trace: __warn+0x69/0xc4 warn_slowpath_fmt+0x6c/0x94 irq_create_mapping_affinity+0x29/0xc0 local_timer_setup+0x40/0x88 time_init+0xb1/0xe8 start_kernel+0x31d/0x3f4 _startup+0x13b/0x13b ---[ end trace 1e6630e1c5eda35b ]--- ------------[ cut here ]------------ WARNING: CPU: 0 PID: 0 at arch/xtensa/kernel/time.c:141 local_timer_setup+0x58/0x88 error: can't map timer irq CPU: 0 PID: 0 Comm: swapper Tainted: G W 5.15.0-rc3-00001-gd67ed2510d28 #30 Call Trace: __warn+0x69/0xc4 warn_slowpath_fmt+0x6c/0x94 local_timer_setup+0x58/0x88 time_init+0xb1/0xe8 start_kernel+0x31d/0x3f4 _startup+0x13b/0x13b ---[ end trace 1e6630e1c5eda35c ]--- Failed to request irq 0 (timer) Fix that by calling irqchip_init only when CONFIG_USE_OF is selected and calling legacy interrupt controller init otherwise. Fixes: da844a81779e ("xtensa: add device trees support") Signed-off-by: Max Filippov Signed-off-by: Sasha Levin --- arch/xtensa/kernel/irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/xtensa/kernel/irq.c b/arch/xtensa/kernel/irq.c index a48bf2d10ac2..80cc9770a8d2 100644 --- a/arch/xtensa/kernel/irq.c +++ b/arch/xtensa/kernel/irq.c @@ -145,7 +145,7 @@ unsigned xtensa_get_ext_irq_no(unsigned irq) void __init init_IRQ(void) { -#ifdef CONFIG_OF +#ifdef CONFIG_USE_OF irqchip_init(); #else #ifdef CONFIG_HAVE_SMP -- 2.33.0