Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp933474rdh; Sun, 24 Sep 2023 19:38:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEa1NVzwYdDgXcI978giDtwSl4Iu04bArJhpi0hNTbwETxTE3Lh6Yz0GNznhrdszt9PrKql X-Received: by 2002:a05:6a21:328e:b0:12e:98a3:77b7 with SMTP id yt14-20020a056a21328e00b0012e98a377b7mr3720065pzb.59.1695609505697; Sun, 24 Sep 2023 19:38:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1695609505; cv=pass; d=google.com; s=arc-20160816; b=v62W6iXr+dyWKUf0xD63WKz934xBJtayTUt/8bnZAcV4l6irhG0r5KakVWqg+X+aHK DmdpzaIs90qIQGus3dlSzdXupdFM0mQaDPV+slkW7aroDczIusnw/KokrVJMGrfK+EdY 3vft54wkgKNzMpKhTeZJHfs2GPupwn7qZQi2unk3sL5z7qDN2loH/Ek8Rh5CHsqkJcbw lgddcy08xisTzQFGN180uTwHsE0A6R5S3JxTg1SzU9FxyJuY2QmpdhwolN2zF8yg0qvX LZd4L8hSoC4Al6NOogYlK6cd+geb1Urv8YipZEmtKKwuicB+ykA3aGekrYc0WTQCzU5v NEvg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=FU5xGq5gjCnJlgVU5AMwAVPhsAbL+7DOFa1lyTvVIfo=; fh=SdwD1JPj7VqGbnZ3tCcakFOYZJj03syIir0hGyAFt8Y=; b=D/WO5dROGj7znuXnin7OKl1I0xRGOo0t/ZepvadeaOSQiQHiiCvHC360e13ohDT9vK jkHkilw2Tam6o6WK4jHyNHgG6R6ha2oU3Cxkp81/QBDfjrxCljq7CwX6rhf8bOXQSydC knsbrOWUHlIqOsXp35SYUr0VvNWiuQmdEivTgnLa1oIEkQoKCUVANQV9QtR+kZI8xbUN Riw/9qtJRSIga8WswA7899phq5xl05E0bMuqpjEwYkke2cZl8We///OtbcRh/VyKF7E1 6uXOJbCQnX/CkVeebme1Y5ZJlc9os6+RVzNjjH8JE/aTna2I1A8yfLsp35Bu9y6teR8g vSJA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@jaguarmicro.com header.s=selector2 header.b=K7oEj7+3; arc=pass (i=1 spf=pass spfdomain=jaguarmicro.com dkim=pass dkdomain=jaguarmicro.com dmarc=pass fromdomain=jaguarmicro.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=jaguarmicro.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id u11-20020a170902e5cb00b001bdd35033f7si9579575plf.366.2023.09.24.19.38.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Sep 2023 19:38:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@jaguarmicro.com header.s=selector2 header.b=K7oEj7+3; arc=pass (i=1 spf=pass spfdomain=jaguarmicro.com dkim=pass dkdomain=jaguarmicro.com dmarc=pass fromdomain=jaguarmicro.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=jaguarmicro.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id D83F78029237; Sun, 24 Sep 2023 19:38:23 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231732AbjIYCi1 (ORCPT + 99 others); Sun, 24 Sep 2023 22:38:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230029AbjIYCi0 (ORCPT ); Sun, 24 Sep 2023 22:38:26 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2054.outbound.protection.outlook.com [40.107.255.54]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6DC0CD3 for ; Sun, 24 Sep 2023 19:38:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZQTqs3Vu2478CzF8FCI0bHa2wrm2f0IsCZ7caQdhBF37io06fIv/jVelpUaB3qk318ZBxylBgSjefRpyF4LAC0hxAn/C7+UKrX3OndfpdG39szKkkW6L2+M/SssoHRtp2QFrslTVdVDQeDKV00PkbTnJTzaRGUXMAH2Sc2eFJpIn0zA8CPImK23k0ni8UtSgGzxfy7MZjWfdW/85efPYGtUd5ii0BexcZtJlGSlhXorJgOS9vpsPGOIBF+qOyh4xEx9IGO1KGpp2Hq2oCEl0d3tIrNIlBXv+pehj5ErKPLCTjW5M88cKi03SyrqBycJYtM46RHpWIfwV99Rn9hWslw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=FU5xGq5gjCnJlgVU5AMwAVPhsAbL+7DOFa1lyTvVIfo=; b=nJAjWHEspjnnPUsLNG9GM84iSVcAY/rdMbj7h4icfSk4VJUsBEaEBmvo2p99Cbxp1b7NygjSvBHiCGlSdyFNGwoHf4OSXTIJ1cChDEJDEfNytOVrNzeiDyKzBx6aQ9Ha4E/q0gBGF294GzYhoZboRcOY/wnM5x+7XMyLfyf9PQEtb9pOGJYD0GsQhYDcOQUZYeLavyeqOeLD708OMAHiG7VuoCd0evejeNSe6yn+xpBSCWTehS+ZutuR3dH+oZgy7lPd8sLG+l2Fno15kMyAZ7wM9geEjjNu7saX+D9PkZU7rk5E+Or0miwnKXmDQNaBTjrMA4DzvSeRL6NuFZfdGA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=jaguarmicro.com; dmarc=pass action=none header.from=jaguarmicro.com; dkim=pass header.d=jaguarmicro.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jaguarmicro.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FU5xGq5gjCnJlgVU5AMwAVPhsAbL+7DOFa1lyTvVIfo=; b=K7oEj7+3lGH/Ffp2WTXc/YZiienBt7MKqydSUB3l7xYitW4VXqQ+dHlNbzP6dITXVjL7pUlhf+4qhDiVyRa8SDUYYehJTzjMMean15XKc2lU0juhVZ5ZcnSLdUPeWqq9IS57fKRCN11/vqJXdQVs9D9yW8pSaN6uvNO/bocE+1Ym/Lt8oChOofRAWbFD6R2VWf6YswPzyVH6wjIbYo+W18xc+S2rr64zuRJYSETnjC5etAkw1aw31ObKvfIGG0y5S0S8+5Ki95PnUoWPClvJ/Quo1+3O17WVaVGLn886EZNtcoHY8nrzDO7JW0McUwIBg4l52bJlHNBTBe3yKYa7aw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=jaguarmicro.com; Received: from KL1PR0601MB5773.apcprd06.prod.outlook.com (2603:1096:820:b1::13) by PUZPR06MB5850.apcprd06.prod.outlook.com (2603:1096:301:fa::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.28; Mon, 25 Sep 2023 02:38:14 +0000 Received: from KL1PR0601MB5773.apcprd06.prod.outlook.com ([fe80::dcd7:b551:2d36:b7ee]) by KL1PR0601MB5773.apcprd06.prod.outlook.com ([fe80::dcd7:b551:2d36:b7ee%4]) with mapi id 15.20.6813.027; Mon, 25 Sep 2023 02:38:14 +0000 From: Rex Nie To: tglx@linutronix.de, maz@kernel.org Cc: linux-kernel@vger.kernel.org, Rex Nie Subject: [PATCH] irqchip/gic-v3: move reading of GICR_TYPER later Date: Mon, 25 Sep 2023 10:34:08 +0800 Message-Id: <20230925023408.1441-1-rex.nie@jaguarmicro.com> X-Mailer: git-send-email 2.39.0.windows.2 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG3P274CA0020.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:be::32) To KL1PR0601MB5773.apcprd06.prod.outlook.com (2603:1096:820:b1::13) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: KL1PR0601MB5773:EE_|PUZPR06MB5850:EE_ X-MS-Office365-Filtering-Correlation-Id: d8e9b1e2-03ce-4fad-7d30-08dbbd707742 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: S9pfa6jo+Ysxws08cM1Oi1heblFqmwAKubTjnSIc337ecSvkxVC5HztSUZzm6az9ZIOGD8nvpcZ/RLY3m45VdoKawvzU9k72kWVfiDb5xnlmM2AcdG69HJdChidSp0SI9bWkF6q6xE2DO4qdQdP5ld2u1W8HY+vMhmyTrOVmwQ3UQSUUBN74nGBqSRL+3dOqrLRYOcXbKtz3B7ATCWsCpuF2z+Zl2B7C8/gypLYmFhRGqjGoW7Qb5KNgPwESnHIVgdTJRRVLN9SvwXQkJIjTWHgt2gLspzNjXc6Z84bjxOqBJJYsRkn87/YilciCJsVEFyVMurzwnlqQo/V2gLTe2lquuhQkdKshl14jMmabASGICki1ggtzj2Sp2l6G37cDKfRxTWGompZGY7UwLTWgyiJITCt36gabkbXOl5z4rdEMsy/pmoRXQ8Qn5RPorQWgCXa6pZjOJYA7LYOPxPTmZwbnQVDUmwIb5KCC+wIA35iEHEdoFf56aVK4uHbROIhzf7hqLPiMpLH0fPfG90ZySkn6KTkfs3Sj31cIAg/TbEPy01M0Fzn8EV+a6kPoNcSzX5/gTc5pOKbEupX/MSvg0kdqrFBkIzbcAKk791+suhbGygsCFFKGm+MUiCOp9dP2 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:KL1PR0601MB5773.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(396003)(136003)(346002)(376002)(39830400003)(366004)(230922051799003)(451199024)(1800799009)(186009)(316002)(41300700001)(26005)(2906002)(5660300002)(8676002)(66556008)(478600001)(44832011)(66476007)(66946007)(4326008)(8936002)(6486002)(6666004)(6506007)(52116002)(6512007)(107886003)(36756003)(1076003)(2616005)(83380400001)(38100700002)(38350700002)(86362001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?j6EpDMDTAPWn4CjhnHe/Y+wa+QjV5D6tjpbsCYzKtQMCQdW8SVlzvKhdR6x0?= =?us-ascii?Q?nX5M7ZVXyw0MyFxO8/pE8fjkvkk7wAkyMRoEJIpBeYET9CnmeU84sassOX+D?= =?us-ascii?Q?vdKFNgljQYqdhSspxJMoZI1+XhiV4VDoFMs0eu9E2J4joj3vJ6iAIn90cT0p?= =?us-ascii?Q?yOEKRZxNAes2y83Xlslxld+ShVdA595/EeYX3AR56y8ZhmaIbu7emtn7K2xm?= =?us-ascii?Q?YOMsciOCa0VVjKZclgN+9VnXGBTcigVaS9kihJ/caW4Mt2u8loTDSKOq9xsE?= =?us-ascii?Q?Yx8rSWYJnoRvvLEnAlswdnR5VejRpPKIuSJRnC9b2OZ64gphhd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lgtqMPOl6SkchQ7fmbrdedZXepnN95OwxrrIdszx2cJ5DYr1?= =?us-ascii?Q?y349k1IUqGppDb4Unh54qhk8lpV4Ai6UXU79WWG2cFjx5CiO2HjTZPyaET3n?= =?us-ascii?Q?Ttw+ufq0twvACu4f3OhLCg3dndi+ajtxqqit6VmgD8R35g7NRdf0Chqty2pi?= =?us-ascii?Q?z0j6ku/FbepRsVVNk+rKjWPO6k+eXphcAXdPSRthLsAyF7r5mq4Toy4Hk9a6?= =?us-ascii?Q?BIbCyfVxls6GmWBlPM1a4diOiVEpVFnW9l24bIN25KCnRcPzDgi09EAbo7oH?= =?us-ascii?Q?LeiTHqqOQ9vsbJkuclz+Wf3Zf8KRBWrOgUEG701g+COB11/NlbkEcP2Oeiej?= =?us-ascii?Q?/V2rWH3/iXEIFhDunJo+1xwcKaIJmjvH8mVQp3OVXk5eCH22iK/PfwNHkghB?= =?us-ascii?Q?Tg=3D=3D?= X-OriginatorOrg: jaguarmicro.com X-MS-Exchange-CrossTenant-Network-Message-Id: d8e9b1e2-03ce-4fad-7d30-08dbbd707742 X-MS-Exchange-CrossTenant-AuthSource: KL1PR0601MB5773.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Sep 2023 02:38:13.9743 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 1e45a5c2-d3e1-46b3-a0e6-c5ebf6d8ba7b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 111RN+rKmw/BeGHiS4vGX+hp31otBzbVz715rVE9eQIuQ8fhhkHMjoc9zGh5/vXDph8uv0axG0Aa0aGjNKNSnw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PUZPR06MB5850 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sun, 24 Sep 2023 19:38:24 -0700 (PDT) This changeset will reduce one reading of GICR_TYPER register when any of next 2 condictions meets: 1. found redistributor for current cpu 2. single_redist is true for gic_data.redist_regions[i] Signed-off-by: Rex Nie --- drivers/irqchip/irq-gic-v3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c index eedfa8e9f077..d08a4773f631 100644 --- a/drivers/irqchip/irq-gic-v3.c +++ b/drivers/irqchip/irq-gic-v3.c @@ -982,7 +982,6 @@ static int gic_iterate_rdists(int (*fn)(struct redist_region *, void __iomem *)) } do { - typer = gic_read_typer(ptr + GICR_TYPER); ret = fn(gic_data.redist_regions + i, ptr); if (!ret) return 0; @@ -990,6 +989,7 @@ static int gic_iterate_rdists(int (*fn)(struct redist_region *, void __iomem *)) if (gic_data.redist_regions[i].single_redist) break; + typer = gic_read_typer(ptr + GICR_TYPER); if (gic_data.redist_stride) { ptr += gic_data.redist_stride; } else { -- 2.34.1