Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2256135iof; Wed, 8 Jun 2022 00:37:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzRinDQA3phcDL3j/av+d0LvKXUvcjB7QcHqVRKIFa6U8r7xdX9oO8/cSfCx2pmFLsqicC X-Received: by 2002:a17:90b:1b07:b0:1e8:41d8:fa2 with SMTP id nu7-20020a17090b1b0700b001e841d80fa2mr26480972pjb.204.1654673823069; Wed, 08 Jun 2022 00:37:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654673823; cv=none; d=google.com; s=arc-20160816; b=Z5Fj9jl6qHARNlqoERTr9OmZezvz8IfXfCvtJoyv2lB6JfFTFOfjtQL1MeghxvhF/Q jRyd8CIVgFURxiMKM/MJNr6cjO7Yw8/99qXrRR4UmHSTWEUOkw3XJUaQBcHATOgK4Ukj jgmFDe1DzL+/39NyvIXNUlrnsm7UPBo0NxyzE6m+Hf3PSREaTzqWcja6DDQOCiE10YES XoPTITmhqSvTTJQSLtnQ0no1+hQqiskD38f5W/55gYG00e/wfuQUeBYTgNaB30DccU2f 04jmaLfa+BHi/v6uX8IScSiwp+YNYy+IHm+KS8OpQgEI/4LJCc5ljSs3kTiaX2rHEIqf p32g== 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=Uy6FkspnT3DnWQiXZsvcPZJ74OtZ+8OMQl8fGcBNVBA=; b=amTqyhLni1UQtMPvRp/H+ZVxjrI+8ElEPFHPX1ajIc961nCcMgdLGKCR85wAw4tW0M YcHod2veaOE+EqkaxW2qF720trB6XBgpvOH1CYvePoeA4WhZE88bdWa1xfD73sFN8Yrc o6TMvfsnAZC7oC9dLInouWbPUSJ8Rg0gbU9ln1I5NnhcXmVsC23XDwxFUFhXEgVgqX8Y 8OjpACHd7DUnm7XY0VVgNKv6R70zlVoBeG3xBqXrftreaIrm4aiVjiMukSy0WdFcVQn0 zRcIr5UJtl66YqNeXJt7VwLKBioO7SykFVVckViAQgjKsurPgVm4mYRgyAIeTl62v4Dk H29A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="A83+bTD/"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id h190-20020a636cc7000000b003fe0ab0238esi4544206pgc.310.2022.06.08.00.37.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 00:37:03 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="A83+bTD/"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 08504248267; Wed, 8 Jun 2022 00:08:05 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350229AbiFGSFe (ORCPT + 99 others); Tue, 7 Jun 2022 14:05:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349054AbiFGRqo (ORCPT ); Tue, 7 Jun 2022 13:46:44 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 657512728; Tue, 7 Jun 2022 10:36:19 -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 ams.source.kernel.org (Postfix) with ESMTPS id E1BAEB822B3; Tue, 7 Jun 2022 17:36:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4863DC385A5; Tue, 7 Jun 2022 17:36:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654623376; bh=Z2Rg58H6WDvcZdH9B/nMDIno5SexIFF77zf26ZQUojA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A83+bTD/eM+ZSKSuDde7k2z0P4UCBg0e0Ax7n52zcNOP7m2gctSgz18MS/T7fjcsZ sXRuAlK7Cn9qnkTdTg6ppL1JgUp7tMdj/WsIHkLIOk2KV2YUnT/ZIVHeVXTVaTwpl9 aRYPsvRl9xSJ3WS1UhPHgQEbJVMiY4zaja4BbC5k= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Max Filippov Subject: [PATCH 5.10 395/452] irqchip: irq-xtensa-mx: fix initial IRQ affinity Date: Tue, 7 Jun 2022 19:04:12 +0200 Message-Id: <20220607164920.333045886@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607164908.521895282@linuxfoundation.org> References: <20220607164908.521895282@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=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 @@ -151,14 +151,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; } @@ -168,8 +179,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);