Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7982AC433F5 for ; Wed, 5 Jan 2022 12:44:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234869AbiAEMoA (ORCPT ); Wed, 5 Jan 2022 07:44:00 -0500 Received: from mail-eopbgr00064.outbound.protection.outlook.com ([40.107.0.64]:7495 "EHLO EUR02-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S234151AbiAEMn6 (ORCPT ); Wed, 5 Jan 2022 07:43:58 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Dz4im564Ufl4h5tqk4FlfDNtlGEZDV/2fEXo9D6ddK5+xi7eTIYQtPkNud8Kga2+pTWVyo4KimBsHWdiOzK3JeSZku9HzO/9yyHBBCcjpwxTuXMYzHkh6dt+vX3ClCHAPXifN0LfEip/XnxO0rkProBK1dn2xWmS7s18R5t7hpXIBX+J2MEGvipcCnObkAyR2Z3jg2glZzWnjY4DZBgFK006yIc2EUdAKmMJtRhfnoZZkOCxNowsoJh4maU8I39vR2qsU+SXGe1CnIiNwHiube4u9VHZfeXh/bnb6BjwVVqsqticNHQkmSqgDezGOLH4tgSrAsPcHNcDZ0VUPD0uRA== 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=uN+58AhILKS6ioR4TocAcVenr+lj/e8oodYT9k7S+ng=; b=PKt1wvo4X9kmQPd4AzoIFsqN5G/L2gPiqj0cFTWC3SR2ivg63p8g/n/iOWESXd8L5kvEOKvTm2irozgmpK3piTllYGtC6SReHrFwtVBR6UeBF0gIeD8srZ8NSa8qvGyZKdBkDjQZ1RVlGyLbJ219l/CbmYiT5i12LQXWCB2LQnez77vD5OMmf1bvdx5Eosf3uYUBRICh6DffBsrHlHsR6jsR8TUBJ6HMss7w8ARdqUlrDKa05Rjf01KOGJZGIgS2/8+bizk44JbdYE7PEjXa639N9uTO+vNS6k5Q5/ZfY4Nq/SBpW4Fu+gBq31CLclAOV7PMsWISka2shMtMl8rpIA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=uN+58AhILKS6ioR4TocAcVenr+lj/e8oodYT9k7S+ng=; b=NM5IEupNuUcIrL6OU9NWu1PIeLgphe7zEcYY/mZNY3GmHCDxcT34J7uc0oYy1WECVu5Hvjr71kCtPuCJuyxjqIjYwOgIfvF+F59jI6YFJp8j9Ewt3v4HRoX8p7WmcOYV/65HcoZsoglG4ZKwpCalpIEdCqYNNWP4e+YNNmjcE8s= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) by DB9PR04MB8494.eurprd04.prod.outlook.com (2603:10a6:10:2c6::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4867.7; Wed, 5 Jan 2022 12:43:55 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::d4dc:8c9a:55d0:81d8]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::d4dc:8c9a:55d0:81d8%3]) with mapi id 15.20.4844.015; Wed, 5 Jan 2022 12:43:55 +0000 From: "Peng Fan (OSS)" To: daniel.lezcano@linaro.org, tglx@linutronix.de Cc: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Peng Fan Subject: [PATCH] clocksource/drivers/imx-tpm: exclude sched clock for ARM64 Date: Wed, 5 Jan 2022 20:43:04 +0800 Message-Id: <20220105124304.3567629-1-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.25.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SI2PR01CA0047.apcprd01.prod.exchangelabs.com (2603:1096:4:193::10) To DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6ab6a07d-6a4a-4dc9-eef4-08d9d04908bf X-MS-TrafficTypeDiagnostic: DB9PR04MB8494:EE_ X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3631; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: be9y+4CVXnLwnooSBByq/EbcDP/z+/vDRY2cGdZGHjke2a5gKPZCIA8RGZjyZ9Ey/E9VJASuO1C1Vp7iu/lSJ4bZOYa447RgJDmRRIYsmu/wqe56gQ7dkkPHh0NvrFnm01rgshMaLxflzwZP/HFygf2OpH4+aQUEHifHStROOZapMKgkaPig1ASw+YxHHy3euKgvevaw8S0jIApSVmp7mYaRrE3zfxuf3ymfQ1IHNJMxEL69OB+4oYTFwDIn+PYVwws2Irh5/VAd4uzPTx1vvbBuMY4mJEiwt/xPvhaeH5PRlkF8T7rF5R4/zOh4yBbumKI/ypOpakNu63c3gniyNpeov/0G4GXZ/lHbtmDr/zi0SkUBfafXx6bhMEMyHGDz+8pWLMP94UKngz+bMfHmtQZZkTTQWmt3KNjBb96h/ER2BJ+OQGbHyFIn92lNbzUpQOfAqQJvJobMabVNl8N2T3OIAPrL1w/9PbR98fcSu26QL0yuJGGos7a3TSf3ucgR4N0ps577TIjORGjJ1IDTtGpNb89n2avhnYMPVlI4T3t66y76UnvglvxgENLlna2cNhPp8i4y51F/Y11e3U1zzcajpMozxBdWL6ivd3RbnYEK6g+/ijo03voO4+EEiy5hC7oeh5MEegJclnuDoQyueNcfCg1aqUA8JGx/GdryTq1m9rB3BPv6MlNTNgEkPrGUhv4Ms7Gq0mII+tEu+AuSZw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU0PR04MB9417.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(38100700002)(8676002)(5660300002)(2616005)(38350700002)(1076003)(86362001)(4326008)(186003)(6512007)(66476007)(66556008)(316002)(8936002)(508600001)(2906002)(52116002)(83380400001)(6506007)(6666004)(26005)(66946007)(6486002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?x8hEc8PRdziD92TeEFOfMAxE/v/OnT9YBnzwM8XVsgbHOhOm0UXopB9SK73K?= =?us-ascii?Q?RQz4xSOpY3FrGpXLy4xDP5GjfpJdiR/+eTNFd3Xy0Lt6FECe8ndrOc+qGktQ?= =?us-ascii?Q?3ujdBrgyiSVwrFzCGR5cWlEr9zgwTZt46LAXxR7rfnUQd3xSzYhXZBgwrtQS?= =?us-ascii?Q?3SmUiUj119i6rSfwpEI9J/gqaF226bRJn/I79ZYJkhh20PVMLKsAgEiMTuj/?= =?us-ascii?Q?PT2f6cZUQllR7GfdDyeSLwU7OP6/k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q?/J1g9tHCLNAq17nWxWEuhiDfjjzY5mzG+XfDcjcyTlpazRUZ8ZPvi1FNK9Jq?= =?us-ascii?Q?GoHqXmFEU2hH3RNsDLUo79H76fxiYkobNUTG/L46F9N9rNU8dgP4Oqm1etQ3?= =?us-ascii?Q?hQTly45hb0qErSOVeOY0rmJAQUMc/h7MwGHwk4GSSTVdTMj9itUv47bdZsmN?= =?us-ascii?Q?v3uUrQo/AV6Us+iJNBSlV+Yua3qAjyOD7cckHVQ5CoMLKLyXAfJVwjL4ZK8L?= =?us-ascii?Q?W4USsfTmLf/OwncfdZYEOZFIbNvZn0isJcEY7sN94MkGkoCOfcXpxc5Evahc?= =?us-ascii?Q?eV6aRBpN9pKZqOi1eMrz4VIq5H00FaTcV9dJpgcgNBh5iR9Y5mQBUZtzZqlm?= =?us-ascii?Q?uGqC82P7apr9vhrGHfFidfLZ1Fws6/bmfnZo9Erq4Pjrie/DWBdSaQkWwn4r?= =?us-ascii?Q?/5QS2SvGt9diJfLDBITNs9v8X5ucTsCosFDB7UWDdaxmedYWoSKhYdU5P6yx?= =?us-ascii?Q?lg/wIzy/szjEPzIPdB9fAKU=3D?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6ab6a07d-6a4a-4dc9-eef4-08d9d04908bf X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jan 2022 12:43:55.1527 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: wEP1+Skqfyf8X5kGq/PU0iNA924aiK4elCiiZo8ZiIN7ZuCKULbXYDzUlCO02L0ElUQzAbVelFiELexBLXcbJg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB8494 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Peng Fan For ARM64 platform such as i.MX8ULP which has ARMv8 generic timer as sched clock, which is much faster compared with tpm sched clock. Reading the tpm count register in i.MX8ULP requires about 290ns, this is slow and introduce scheduler latency. So exclude tpm sched clock for ARM64 platform. Signed-off-by: Peng Fan --- drivers/clocksource/timer-imx-tpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clocksource/timer-imx-tpm.c b/drivers/clocksource/timer-imx-tpm.c index 2cdc077a39f5..2bd530b9adc4 100644 --- a/drivers/clocksource/timer-imx-tpm.c +++ b/drivers/clocksource/timer-imx-tpm.c @@ -150,10 +150,10 @@ static int __init tpm_clocksource_init(void) tpm_delay_timer.read_current_timer = &tpm_read_current_timer; tpm_delay_timer.freq = timer_of_rate(&to_tpm) >> 3; register_current_timer_delay(&tpm_delay_timer); -#endif sched_clock_register(tpm_read_sched_clock, counter_width, timer_of_rate(&to_tpm) >> 3); +#endif return clocksource_mmio_init(timer_base + TPM_CNT, "imx-tpm", -- 2.25.1