Received: by 2002:a05:6520:1682:b0:147:d1a0:b502 with SMTP id ck2csp5595968lkb; Mon, 11 Oct 2021 09:38:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxPM7T85sPSEeQsdY2pt5z6dgehDvSbINjuZ1WeGCWyGmKUuDpGpcIIY0TUIjwNbeymAyQb X-Received: by 2002:aa7:9f92:0:b0:44d:bd1:98b2 with SMTP id z18-20020aa79f92000000b0044d0bd198b2mr9789251pfr.82.1633970299581; Mon, 11 Oct 2021 09:38:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633970299; cv=none; d=google.com; s=arc-20160816; b=X35Y99o67J3OA/0O2h8HzarKX9RRGmMMBJAaEjBrO70hQ1QRkFqHFTpmuGGsMqm6Pu jqKJL7qsY4p1P8gJtBiQV4g0lZuB6AHNMoERjWRuE3wMzjiEyi9QTtS9W/uTQQknCa8q C6umfhLzK0QuuUbigFA7/0Iac2dOXZf8JX/UYKWpj1UIjz+JA8pqJ7Hzn/4pUftDzNyL VR0S9Be0fGhoSdJv4XE5mDAdTRFDnbKtP9moxZSODxLAai4yQyyKHAZavsBIW+VA3gL4 5SKW1+gx1wxnOImNOS222juZRflOKE2AB1ecxu/HMojse2h+jBv10lIqjB2RCzu03nam E39A== 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=kSwkiKYS0qccmUIBqIa57F9jMxOT1Y3NstZGaWRsKI6QkM5/SD099u8IEL5LX+qh8C G1nsVW44VHe6JXpTW7fyKxuZPAwfRxLQtY9Drp+S48ewQB8/1lQEAWIGKIf2x0QPmNmA OI0aeo1g6b/4+DyqqZHQfXW1VL7uR/+JOCDAR8CZYh4xxk9ZmxCDo7y8539n76XR3n7u fl4iEjv3pEN7fKUys81PenGraQ3WmwTj+k17FOWoQ5YCsW651vrtEBg9KVzCyiRvG8Qm ICKw1ca/ihxW/FhHbMymjOX1dEPiXDTmmyCYKMv/rpo1YGiBoXShP/W0nrhbFwrveziV CZGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=nGaoEsJ0; 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 r11si9853171plr.110.2021.10.11.09.38.06; Mon, 11 Oct 2021 09:38:19 -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=nGaoEsJ0; 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 S239096AbhJKORx (ORCPT + 99 others); Mon, 11 Oct 2021 10:17:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:38590 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244369AbhJKOPR (ORCPT ); Mon, 11 Oct 2021 10:15:17 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7EE516127C; Mon, 11 Oct 2021 14:05:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1633961110; bh=GgDRqfBeQMUhgmLcfjsJRYdlUheZeSWZePX/uUDmz4c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nGaoEsJ0o9cXVwbRyu/iYUwAnDHfAiQDnq2hlw6qWSaBhTASVqEjOMPGc0//6xIwf wRp4ecPtI9WhaVA7kWjpUkiRhD3dFd5c1PYT7H6Son2AvT/7CFCd70yhQMBy5gIa1r nN1JYGv6F4zuwFkY8rb32S6s/hlOKDaQE/wfg1Vs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Max Filippov , Sasha Levin Subject: [PATCH 4.19 11/28] xtensa: call irqchip_init only when CONFIG_USE_OF is selected Date: Mon, 11 Oct 2021 15:47:01 +0200 Message-Id: <20211011134641.077223735@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211011134640.711218469@linuxfoundation.org> References: <20211011134640.711218469@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