mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexander Komrakov <alexander.komrakov@broadcom.com>
To: linux-kernel@vger.kernel.org
Cc: giometti@enneenne.com,
	alexander komrakov <alexander.komrakov@broadcom.com>
Subject: [PATCH 1/1] Signed-off-by: alexander komrakov <alexander.komrakov@broadcom.com> Replacing ktime_get_ts64 by ktime_get_boottime_ts64 because elapsedRealtime includes time spent in sleep and pps should be also including sleep time.
Date: Sun,  9 Jan 2022 20:22:14 -0800	[thread overview]
Message-ID: <20220110042214.1289369-2-alexander.komrakov@broadcom.com> (raw)
In-Reply-To: <20220110042214.1289369-1-alexander.komrakov@broadcom.com>

[-- Attachment #1: Type: text/plain, Size: 1370 bytes --]

From: alexander komrakov <alexander.komrakov@broadcom.com>

---
 drivers/pps/kapi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pps/kapi.c b/drivers/pps/kapi.c
index 149c29e498fc..6d1fbe4a8c40 100644
--- a/drivers/pps/kapi.c
+++ b/drivers/pps/kapi.c
@@ -38,7 +38,7 @@ static __u64 clock_gettime(struct pps_ktime *kt)
 {
 	struct timespec64 ts = { .tv_sec = 0, .tv_nsec = 0 };
 
-	ktime_get_ts64(&ts);
+	ktime_get_boottime_ts64(&ts);
 	kt->sec = ts.tv_sec;
 	kt->nsec = ts.tv_nsec;
 	return (__u64) ts.tv_sec * NANOSEC_PER_SEC + ts.tv_nsec;
-- 
2.25.1


-- 
This electronic communication and the information and any files transmitted 
with it, or attached to it, are confidential and are intended solely for 
the use of the individual or entity to whom it is addressed and may contain 
information that is confidential, legally privileged, protected by privacy 
laws, or otherwise restricted from disclosure to anyone else. If you are 
not the intended recipient or the person responsible for delivering the 
e-mail to the intended recipient, you are hereby notified that any use, 
copying, distributing, dissemination, forwarding, printing, or copying of 
this e-mail is strictly prohibited. If you received this e-mail in error, 
please return the e-mail to the sender, delete it from your computer, and 
destroy any printed copy of it.

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4222 bytes --]

      reply	other threads:[~2022-01-10  4:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-10  4:22 [PATCH 1/1] Calculate the monotonic clock from the timespec clock to generate PPS elapsed real-time event value and stores the result into /sys/class/pps/pps0/assert_elapsed Alexander Komrakov
2022-01-10  4:22 ` Alexander Komrakov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220110042214.1289369-2-alexander.komrakov@broadcom.com \
    --to=alexander.komrakov@broadcom.com \
    --cc=giometti@enneenne.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®