Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp449657iog; Mon, 13 Jun 2022 06:12:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJysd65H+TIGdV2F9VJAj4tABznoFNrqgBhACY7r0n53NrAMhzqWO56QpVrn+//aSi+CFnY2 X-Received: by 2002:a05:6402:2381:b0:42d:c8fe:d7fe with SMTP id j1-20020a056402238100b0042dc8fed7femr64407399eda.248.1655125932352; Mon, 13 Jun 2022 06:12:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655125932; cv=none; d=google.com; s=arc-20160816; b=Fm2hmR49IHFYgmPN26FmdQEcOuYualu54DLYMWRLQhm48TfeLZD5zh+ey1UmN98/Dz wBgRWOLhHZarpbT9X+GyU/fkX5ZuToAozYOYccmhCN3gFSBcttAx/QxC0EPGni/uIySE w+f34fu8rXczg1KvNq6p5AVZDY/s9CV4S5CDUurldeEgS2KbtxHqUA6M++/TS6MZrUyp 48NcflWqJkhy/SY+/OtbxLca7pcEwXVGf7iI7r2t1aUCYb2ibv9rKFj81avCEVXADqfp 2PFyXQeICcB2eE0mEJ1Lfg5xPowNxdtdAYNk3OK+yD2p19Ahp+znmhgXRtXXzXwXk1uI JJdQ== 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=bs9sBqyxgpJAGWCr9pS7rKxwDF5MTOWiA5LdU/x7ZUI=; b=ybwB0GtXAXr4DbFROk23eO1doLAl/tTbWEaakghC11Axz1aPdA9OXhFG1DpOxWUFhq ws96zNSr+89XuFZGi+kAdPpO2eSeZVMrnUK3TzUiELr/YAv8I108J2yzPNSZiMchKW86 2HeMwdQfqden9/UHMGZi+4pLy2BKP/07JTg4xVrpxgeJa82pHUjkmpaWnZeFUTYqvERa gU4cqeLBMuEUMBQoaG3QKXyAYzfVMEk4+o4AIPYJzW9TJl6K1ydwCGVJl0avjuHYnTwa UF7iUsucHlyZvW/3mGlmZdq7Fcr8DHfI6W0lQSLgzzufzoyWC2P6KFobriXx4X3V+/Jo /r8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=peOfQymv; 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=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jg28-20020a170907971c00b006fe9db42071si9051048ejc.720.2022.06.13.06.11.47; Mon, 13 Jun 2022 06:12:12 -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=@linuxfoundation.org header.s=korg header.b=peOfQymv; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243396AbiFMKZS (ORCPT + 99 others); Mon, 13 Jun 2022 06:25:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243788AbiFMKXh (ORCPT ); Mon, 13 Jun 2022 06:23:37 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD49322B3E; Mon, 13 Jun 2022 03:18:02 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D409460AE8; Mon, 13 Jun 2022 10:18:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E7F6AC3411C; Mon, 13 Jun 2022 10:18:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655115481; bh=6DOaBqWZgF3ZygfXGC9a6G2mGUNb1R7lhLVGKD1gqy8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=peOfQymv5MyEsevG/UGRCAe6I9E/TQ8oU3dQiXocBlp3wV2CvqqEDkraqmSI7Ve/2 rraGyiouSIw7mv835KEamTvvnD0l6L9f9q9nV1zMsKnWmqVqrO1PXrbKlzqTmF6Az9 TBZ3qi/F85VWiVdbqSCjX1QB6CIdhv4bleS4lzlw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Max Filippov Subject: [PATCH 4.9 092/167] irqchip: irq-xtensa-mx: fix initial IRQ affinity Date: Mon, 13 Jun 2022 12:09:26 +0200 Message-Id: <20220613094902.511252942@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613094840.720778945@linuxfoundation.org> References: <20220613094840.720778945@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 From: Max Filippov commit a255ee29252066d621df5d6b420bf534c6ba5bc0 upstream. When irq-xtensa-mx chip is used in non-SMP configuration its irq_set_affinity callback is not called leaving IRQ affinity set empty. As a result IRQ delivery does not work in that configuration. Initialize IRQ affinity of the xtensa MX interrupt distributor to CPU 0 for all external IRQ lines. Cc: stable@vger.kernel.org Signed-off-by: Max Filippov Signed-off-by: Greg Kroah-Hartman --- drivers/irqchip/irq-xtensa-mx.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) --- a/drivers/irqchip/irq-xtensa-mx.c +++ b/drivers/irqchip/irq-xtensa-mx.c @@ -139,14 +139,25 @@ static struct irq_chip xtensa_mx_irq_chi .irq_set_affinity = xtensa_mx_irq_set_affinity, }; +static void __init xtensa_mx_init_common(struct irq_domain *root_domain) +{ + unsigned int i; + + irq_set_default_host(root_domain); + secondary_init_irq(); + + /* Initialize default IRQ routing to CPU 0 */ + for (i = 0; i < XCHAL_NUM_EXTINTERRUPTS; ++i) + set_er(1, MIROUT(i)); +} + int __init xtensa_mx_init_legacy(struct device_node *interrupt_parent) { struct irq_domain *root_domain = irq_domain_add_legacy(NULL, NR_IRQS - 1, 1, 0, &xtensa_mx_irq_domain_ops, &xtensa_mx_irq_chip); - irq_set_default_host(root_domain); - secondary_init_irq(); + xtensa_mx_init_common(root_domain); return 0; } @@ -156,8 +167,7 @@ static int __init xtensa_mx_init(struct struct irq_domain *root_domain = irq_domain_add_linear(np, NR_IRQS, &xtensa_mx_irq_domain_ops, &xtensa_mx_irq_chip); - irq_set_default_host(root_domain); - secondary_init_irq(); + xtensa_mx_init_common(root_domain); return 0; } IRQCHIP_DECLARE(xtensa_mx_irq_chip, "cdns,xtensa-mx", xtensa_mx_init);