Received: by 2002:a05:6a10:5594:0:0:0:0 with SMTP id ee20csp110854pxb; Mon, 25 Apr 2022 06:47:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxHkhcVZ1Jt1IPWrGdwSctCCVkpwx2Wtc/7y8qFAqw1ZLORIIvTIrB1OhuqKUV0uSLCcRv1 X-Received: by 2002:a50:baa8:0:b0:415:b0bc:6353 with SMTP id x37-20020a50baa8000000b00415b0bc6353mr19213515ede.220.1650894449449; Mon, 25 Apr 2022 06:47:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650894449; cv=none; d=google.com; s=arc-20160816; b=bk87AKhLtGttt5fiDlWCrc0H4RkoBf3Bu2wQT35MGVOH0Xp2DVz6SaKLyzd3NF3apJ wgtkQmBM0bLvBu9ybEADaXPSxTxwLGsrRAvJoSUU+InvzzrMSQh+mi3WuQVOr6YP3vXH hqRFL03SN7M38DcCG8F34Z1+ETY5rlO0EJroQlPU8sgNXBzJBDtsjMtKI8XiiYvGWOB+ xhReJBh1YYoCSJVagzhPAx3y8Z5+4/9Ybhs9XgowqxfAlZQS3N72IVqiPcZHyk4yH4CW e6o0S/tLtoKul0gTDJxwCI/khNnLmcB4UD1M6XYOVon5TYqTPdH3ZbYdSp226ufRdH+B V6Ew== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=TXYIklbwVTudoyn6gGg7WItO1l90JuFKxWIJK3hfkBE=; b=xy9TDxHHuXavo5oT3Ei3HuxkxCJr1ny5CV9olSxMt/q8Gp/E7g6hW4sUiOxv6CorJS eh0Un52RC7nB2EtpFdMRyZb6Ij3lV7Clo3mtpZD3+1ZmEH/pfhUMB59wdEkTvwumi323 hy2kMfoIn1EZ9Nn3KPDOcvaiTAgc64g/et3Al2m3b7QIpjuobe6h4pzoSN85JIqRykMN hT1rz9KM68jiPEecEFVuzNvbqiAiygeZwFd1VwrcAK5AnOtEJtESTVRiAvM5/EDGWg9O /VxjMO44o9qZB+3CmpNtRb2MnPwSc/nA22n7eDMZr68LMzT2iijNCH6cU3KJFnYJl3Va Ta9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HwrLXtpx; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qh10-20020a170906ecaa00b006e81bcea1e5si13337159ejb.731.2022.04.25.06.47.03; Mon, 25 Apr 2022 06:47:29 -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=@kernel.org header.s=k20201202 header.b=HwrLXtpx; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235113AbiDYLlF (ORCPT + 99 others); Mon, 25 Apr 2022 07:41:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232917AbiDYLk6 (ORCPT ); Mon, 25 Apr 2022 07:40:58 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A795325E83 for ; Mon, 25 Apr 2022 04:37:53 -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 4359F61243 for ; Mon, 25 Apr 2022 11:37:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 77DEBC385A7; Mon, 25 Apr 2022 11:37:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1650886672; bh=7h3ha01iKrve+RU9wcrPWPSP0bROV5CrSg/3niiwVbc=; h=From:To:Cc:Subject:Date:From; b=HwrLXtpx6yfaiP5sNx363mun1Ja2V01rRSIHAjHiziqsuylrAOAZMxiavmucoERJ3 tSIBfp65eWfDvZCRaF/RL5xnE/NG4gSyOb2y1p11xkhYTbKRQRIm10yEx0SNfkJRzL RSA6aZOQLl6NGTAvRoB/wFuQArygi7d5bx6QkTnblxYM6gx8mqDql7mC2tpkUdD3O7 nlOUNVr7rIhUamjkS+pxdhj+w6Vjp6zlKAUB2LM5xdIwIr57K2Xz8KgO2CsDeCdMOu qCQidebpWn3Vua2rCwvHQAw15urBfCS1P1vWTd23qYgGJrLUkVS4FHvI5Fx1hubvu4 AfsTYWJKXx6Vw== Received: by pali.im (Postfix) id 7E2EF4A32; Mon, 25 Apr 2022 13:37:49 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Thomas Gleixner , Marc Zyngier Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] irqchip/armada-370-xp: Do not touch Performance Counter Overflow on A375, A38x, A39x Date: Mon, 25 Apr 2022 13:37:05 +0200 Message-Id: <20220425113706.29310-1-pali@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 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 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 Register ARMADA_370_XP_INT_FABRIC_MASK_OFFS is Armada 370 and XP specific and on new Armada platforms it has different meaning. It does not configure Performance Counter Overflow interrupt masking. So do not touch this register on non-A370/XP platforms (A375, A38x and A39x). Signed-off-by: Pali Rohár Cc: stable@vger.kernel.org --- drivers/irqchip/irq-armada-370-xp.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-armada-370-xp.c index 5b8d571c041d..1120084cba09 100644 --- a/drivers/irqchip/irq-armada-370-xp.c +++ b/drivers/irqchip/irq-armada-370-xp.c @@ -308,7 +308,16 @@ static inline int armada_370_xp_msi_init(struct device_node *node, static void armada_xp_mpic_perf_init(void) { - unsigned long cpuid = cpu_logical_map(smp_processor_id()); + unsigned long cpuid; + + /* + * This Performance Counter Overflow interrupt is specific for + * Armada 370 and XP. It is not available on Armada 375, 38x and 39x. + */ + if (!of_machine_is_compatible("marvell,armada-370-xp")) + return; + + cpuid = cpu_logical_map(smp_processor_id()); /* Enable Performance Counter Overflow interrupts */ writel(ARMADA_370_XP_INT_CAUSE_PERF(cpuid), -- 2.20.1