Message ID | 20240725193355.1436005-2-Frank.Li@nxp.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EA73CC3DA5D for <linux-arm-kernel@archiver.kernel.org>; Thu, 25 Jul 2024 19:35:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=QekM0muMH05kCvJf8WblyLADqXuVT928CCeuFdA9sLQ=; b=TCthpadv2tRHV9MFn2WrZwHtlS ccV0rFJNQLtdTsM0K4EiMFhgn3u9r4QKJ/iPp6jJG+6dZFXLOZHKW3Aa53JbPafA5I7AH1qkggew/ 7Y8tsEm4bu0Q2x9m95mjHc+L0NBiA0sLtZec9uV+iC3Omxf9pi3GYhrnc3HlHk+MMWZCm5+jYfaVX MVHVn8Ntaw+n1yfOmCktNf5QG/oecdn5KwiRx0iCYnjC72cMZg0YCzi0aSbahaJf7Zx9jJ8PMZAwO XIz0HDU/oX9dymgDI+dMQKQomu7rOkqMq4d5fKc/GyeN9ivT6gWLcel2JgyAuAmtGew4hJ8MlLqbq IXvfm5UA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sX4F0-00000001udp-1mFM; Thu, 25 Jul 2024 19:35:06 +0000 Received: from mail-northeuropeazlp170110001.outbound.protection.outlook.com ([2a01:111:f403:c200::1] helo=DB3PR0202CU003.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sX4EH-00000001uRQ-3xvH for linux-arm-kernel@lists.infradead.org; Thu, 25 Jul 2024 19:34:23 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=X++lXOunx0+JwbNTWv4z2lHMxxC0EiIRi3RD16AP5Mm3BNeOTZEIPgQJnZyJOKtWkwCS82JdfU1feZ5foZNoJ8HMEyoFi3PubLPJyPAnVIR+Hivyu4kUZuAuN3MHIErT9keWTvk2lhfP8BkW1Y7lE/WH9h+T13Zxg8HDpkNXqIz39GwkblCaw930FwilLQeugGmpR83y0omaor3qffmq0IsHN3Cq8lPuUPyityoCvHe2SniVJSlrHVE4BHiBFAK4r1hWWwFM2Hlkfq99JrywAgR2It96X6w3A2ktFdJfN7x3tHht2+EclMX8DqjrsriracF837nwq7Jjp7TOvqgTEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=QekM0muMH05kCvJf8WblyLADqXuVT928CCeuFdA9sLQ=; b=InBOwHTS2yL08D+tGBvsgvVhsJ9SbeUEj5WbednLh9ueUgUtQYv9ITHbDWH09bFlOm/GTOceY/UEE4ebH6ll8vf4X365CuyrGTgzej76Nr6vnHu3sOKlCWgdg7Np8pwEHU49K3HnbEnpbmwvRUFBelZXU6lkWxzt+WjohYPMqY9AVMgEdimxRsjZIzCT2FO2pMsRSap4M75b2c2zNJhQp8vTRESDqKWsa9P1BPjOqeTOIEG5jN6yOhNPNUlMY0aJq8wzts4u74PkiQh3h0IYkxbrL75iPZP5agThY3boW4NmicIgOa5TMTvwleVDFgkBpHIFLAxxVk+B+Roii8Or+A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QekM0muMH05kCvJf8WblyLADqXuVT928CCeuFdA9sLQ=; b=YUiGqi9kZ3OTlaKxsRNxstbyeord1vBTwdzwCF4dCAXyWtxMJrwFhRr/0uEaKak1Q/3KrgA8ikJMfKk/VqWjknTxoaN1hJum/wPJKxhIJ7hMZEvedjGthz/ZcsAlL4lzhkFe0HkWHltEohI0HXriJk9xfQaxezsiOn54Kq+c4S4xuKxWcMsah3ECGhxezKASHn/pxBzkkXIRvAL0PCCTsDcxQ3QEVB0Aepk9RPFtFHlKeefHanlqh0Or5xMOpfbdEa+4N4mgZwjZkWENgMaFkLvq5Ek5pg3zZUfZZD7qVLTp973Icvo8PlJEZaaWKci4PNttcttKdLxuwmRPF+x00g== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by DU2PR04MB8791.eurprd04.prod.outlook.com (2603:10a6:10:2e2::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.28; Thu, 25 Jul 2024 19:34:18 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06%5]) with mapi id 15.20.7784.017; Thu, 25 Jul 2024 19:34:18 +0000 From: Frank Li <Frank.Li@nxp.com> To: Daniel Lezcano <daniel.lezcano@linaro.org>, Thomas Gleixner <tglx@linutronix.de>, Shawn Guo <shawnguo@kernel.org>, Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix Kernel Team <kernel@pengutronix.de>, Fabio Estevam <festevam@gmail.com>, Dong Aisheng <aisheng.dong@nxp.com>, linux-kernel@vger.kernel.org (open list:CLOCKSOURCE, CLOCKEVENT DRIVERS), imx@lists.linux.dev (open list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE), linux-arm-kernel@lists.infradead.org (moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE) Cc: imx@lists.linux.dev Subject: [PATCH 2/2] clocksource: imx-tpm: fix next event not taking effect sometime Date: Thu, 25 Jul 2024 15:33:55 -0400 Message-Id: <20240725193355.1436005-2-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240725193355.1436005-1-Frank.Li@nxp.com> References: <20240725193355.1436005-1-Frank.Li@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: BYAPR02CA0062.namprd02.prod.outlook.com (2603:10b6:a03:54::39) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|DU2PR04MB8791:EE_ X-MS-Office365-Filtering-Correlation-Id: 84afb012-8043-4962-4822-08dcace0c647 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|52116014|376014|366016|921020|38350700014; X-Microsoft-Antispam-Message-Info: LEca3I948bmu0rln+7GYQKdMzly8aZZt1KFYLsf6cvn50iS07rstr2SsAiGQRajzM8ytZVb4BPhINdMQzTwMfFvTKWc3y6NFebyeC3hFjIkAdnUXzCvKHAaewstoRFT6SAgV0JysyENPcytdNiAz9z0OQ7y6YddaTkpJfXcLJ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f7HvoiWAquBjUQNraULehv+CrgOCSGY7lZwHJIcYbeqIXRHQ+bnAEyq++282ZbV8+1eggNqOdskTlPZR9kOEJQXCItOe8oOlyuHKcnKCdj6hio3ukX4a0HlePxyZ5yEr6fdVNAt5K4rA7zsA27d0V3WRCJDkS/CKZlsQqh0OdiC2uFXAQIFxIFAYu8JSvv5u8+SSgT2lJc6qlG9eTNaGU= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9642.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(52116014)(376014)(366016)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: GubiVGbbOSZu+31szOseyVpSAYeEWuIO7BGIt6n3CpedbUcNGqigE38cPJ38MSWkbCugnULHloUdHqFUkc9eoTb83zBvRCYAqJvrlNupK3+G+04/fz3MyHZGge0p7cnQ7d0YlajhwCy+gFY8w6qZh4McInQTggK/ekH92aimheCXgO3Q4XATn5dh7NuErR3Lwzj/s+/k4ePQWHDbg200wrNXag4FEu4d8YSqpiq8T+m7IYDaHaDoqD8en7vl11ldDpx7vI6fNR8RI3cgX0/KAnZrcC2tnYty5xU79S0pQiH460EGzRZyRLSF4jDMbuZ52ad9B7bSA3V7ZpG/6zhXESyGdhWg1hslVfnQCc8Ejq3O4J2P/wLhXYGt6Tl1wijquOWgac3heFcSVz66+/4XtUMbhi1wLbPso+51vJmXBCaAtrBYRbvMlkItujr/cKmqwBON1DRVcMOAHH9RuyRRY1C8f+3C4c4ZVnXNAOBwdHlIeea4v2DJ0D29dlHbacjhG8PGUKZNFW28v18t+n9zwkPg5Gzw492poV45aSyI6n643viePo5iTm34uzkC6bEfj0AYOwYPjPY7alGqYAegwVvC+h0PaH2oNTPne/MKQas9DLa79f8xzRU4Ex5EvNeVUaZgA4Mo/AVOQlyBABWpyGDrccxNa8wn//nizA/pXewJkrt4LAyCNZIyk4WujOAfvLDk38AEXfg53DbB9c56+yDqSZYtY1bsozNmidWLAiRBJClRW4k74TJYIGlmtduNcwgj1PxdIe1kSdRBpFfh6bhLPHTr52Ea6vCPWLPVQ+Hk3QKkbkRi75C0OBPXnh55yVwO/hnnyef4/o6GccovjR298PywFVIbvavJdp0qE8Cqj4dw9ikbod81ZTS0EeSxVjY1sf1j1jRjL1Bz/TLozLMPyDLmkgr4GLKY9FCSLetpg7AMtXmUC+E6/ncqqniHD/Gk55iBrviQmSMJq+3lGcpZExAmY1KI7aEU1gY2s3a4PeWFms+/dgyMeS55lFK99LXn8jxfwIonHztsIPx/qOcEaRG8eYC1toi7GftA3jCI4NfB6sxSLd722fvcdcdV/icX86SLTyR3HmW7lGXPi5igxPV6N6QNv0rd6aKMEjOzpjkcnxhT4RrTHSrqSmlLnHWPCD3fk/lhOBeor/sit0xAoRo28iQ0NILSYiV2i1a7wIPFVLIvT/KO1L/Xmhqa5QKV55XxkVWTI5N1GiSRF5ZKxArnZ+30WcfR9VxbLWafwgfbCZSgUJfmBQMqpadnl+gpCEz18VHzJupNrIZnFy4nsgz9z3u+77lWw2SGvFFt9JlKJtY8621QCSYl78lSenqrsfsAZ9saKCWzMYGnBpMcxu8JXLy0Ef+RYSbQAokgeoiizbQxC0yYveKg5IS+vcsQnT4qGyBeBmxWZmwSUtVbXPpehdsmiMCX1dHLW3RnR4V4YWuX4BzwpyKxyb30Hr506vJTTmmkG2U/Fy2+j427YsLThkQUgtbrjw0fK3QIhtkgTG3fY7vlZpx7aKpkXXMsHetABwnkYXK2eGF3MJCbiTQ79BkAA4gOVIceTj4U8MJzcgyG4pa/QvN7/6/X X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 84afb012-8043-4962-4822-08dcace0c647 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jul 2024 19:34:18.0473 (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: PBFz4uLvPccRwA6JRAqvRxe7FDzWf3Pc43NzrcfsuSQzMQ8kWjs5UgjBNinAlsQudX851z+/pY0y3D5dlV/KpA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8791 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240725_123422_014541_A4E5A5FF X-CRM114-Status: GOOD ( 15.72 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
[1/2] clocksource: imx-tpm: fix return -ETIME when delta exceeds INT_MAX
|
expand
|
diff --git a/drivers/clocksource/timer-imx-tpm.c b/drivers/clocksource/timer-imx-tpm.c index cd23caf1e5999..92c025b70eb62 100644 --- a/drivers/clocksource/timer-imx-tpm.c +++ b/drivers/clocksource/timer-imx-tpm.c @@ -90,6 +90,14 @@ static int tpm_set_next_event(unsigned long delta, writel(next, timer_base + TPM_C0V); now = tpm_read_counter(); + /* + * Need to wait CNT increase at least 1 cycle to make sure + * the C0V has been updated into HW. + */ + if ((next & 0xffffffff) != readl(timer_base + TPM_C0V)) + while (now == tpm_read_counter()) + ; + /* * NOTE: We observed in a very small probability, the bus fabric * contention between GPU and A7 may results a few cycles delay