Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2198888iof; Tue, 7 Jun 2022 22:59:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyRjFRf+eV/AJmGDV6MkzjHjIUDPPnhPzxZG77e34p+TcijRx/fIwoXGD7cBfHmg2M1dkzV X-Received: by 2002:a05:6a00:2188:b0:50d:b093:12a2 with SMTP id h8-20020a056a00218800b0050db09312a2mr32871710pfi.84.1654667977144; Tue, 07 Jun 2022 22:59:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654667977; cv=none; d=google.com; s=arc-20160816; b=T5utmCdFJM2fuZeEIAa/jozigiEORsZoOkVR8A16XePb+r3JYLCneEqImRyVILX8zJ /PRjMUAd4WJ+H/UgbItMWusuETpsomc98SEh/SV1SFi/tWIF3ziVk4vLjCTEGi76Qmbj oKy/hxk4+St9+AnfCngcmZd8p5pAx9+ijaRHFsOKmZAL9jrBPA/CA8uXhSK+6zfEd4hv AIxxh0D9tam1MoTmcXob39zvEZV7e4kTkxniuh0SBIYewX18440hMifInAa44d9vpErP +Bs5AhKPgpgFZm3aWo80FkOoJdnzJ+a3jlwbbj6i/YUv6ED/P0w0yKRfLIe2rlREsKVi /nyw== 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=sRzjykwLw6VQlcnaNqLtTL5MIj71MpBpev9t6fES9U2kOEooZZRHMx/LPhV/nBZ+Ri IIMfcYqeDAWUvm77d+D7rdlhl4t6j6xPjM7zQXmVyn3pD1fk8jEB368hWLPamptmxAHp N4BiIKnRQvnXB/ceIdfWVSO7lT8a2WWPrJxqJp1+2idv5XBk2Gr5bu2lJDQdP8vgoWYb HcTR1PBq9IzuiEmU3f/NkyxmRmiipFjVLJKFyFUDcRpzXvuujjpKByaQsL35oH2C3qwF SwtIziazuGLE8k7rdun7eN9RgMuHaOpunqNTV2ZZT/XsgW8c2juderEugY859T8ury8N YNiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ONtncR4A; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id d4-20020a63a704000000b003fde4906c9esi7833474pgf.74.2022.06.07.22.59.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 22:59:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ONtncR4A; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A8C431FF60E; Tue, 7 Jun 2022 22:26:33 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1384014AbiFHBPT (ORCPT + 99 others); Tue, 7 Jun 2022 21:15:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1385533AbiFGWbf (ORCPT ); Tue, 7 Jun 2022 18:31:35 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61F21279378; Tue, 7 Jun 2022 12:24:46 -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 B69F06077B; Tue, 7 Jun 2022 19:24:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C547CC385A2; Tue, 7 Jun 2022 19:24:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654629885; bh=Z2Rg58H6WDvcZdH9B/nMDIno5SexIFF77zf26ZQUojA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ONtncR4ABwL7YI7uVlIOz1E6PfjlNr8MDHbERrp8rskP2mAYb8vezY5wVl/W4QPdu EKlm1Vd6E01EOBU+N1Vc/xy+QnsorokEyunCkl9I3PV0a0OkBIlLZZ/fym0lr6N/T+ iM5Ci64CF+xw9CP5cGRmTHarNbetW0RGbRdmW6OA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Max Filippov Subject: [PATCH 5.18 811/879] irqchip: irq-xtensa-mx: fix initial IRQ affinity Date: Tue, 7 Jun 2022 19:05:29 +0200 Message-Id: <20220607165026.397816882@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@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);