Re: [chrony-dev] [PATCH v1] rtc: handle uninitialized RTC |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-dev Archives
]
- To: "mlichvar@xxxxxxxxxx" <mlichvar@xxxxxxxxxx>
- Subject: Re: [chrony-dev] [PATCH v1] rtc: handle uninitialized RTC
- From: SCHNEIDER Johannes <johannes.schneider@xxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 1 Jul 2024 07:50:09 +0000
- Accept-language: en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=leica-geosystems.com; dmarc=pass action=none header.from=leica-geosystems.com; dkim=pass header.d=leica-geosystems.com; arc=none
- 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=9q2fSEveHqNW7l7VvQKmUCzTAbZUJVygUluKiq3tXKQ=; b=IFp1xhN+lg/lZ7iRs24hH9HwdrtHlBj9h5H+nYDygTW1zK4SvHsA9tclwfS+5QPqgYCPn/ovQM7Cw1FA8WP/GYBWkTXiWiXCbv5zXoZBiLcKGc/RTQABxEkRfa6vvqGPu/b3iY8j9SqLCBQd0ddRjD9+5twTyv5BVOGYXP3GEEpg4mKD32Qrd2w1rUrbgoeKvSOlIuEejYvoQRTIO8wy/mOc93wHG51XPUgr2etfufBG1PrBESsCVUOcmJZrQBc4zu0f6V4+HxUAw84ZZw2vb9nRXssxAW8CzdETkZEiqEWEfuPgHNDr8x0KoNozdER8vMx0EA9CR3JT+3rv2ri4uw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PgtIQwbl+C/pezc6H6YHGRSt/Q+1KTKnXt9iHzT/EFMmt2XGhf6ilJxHUvP/oEiiUOMkDoc4SF38YR5keORNw+q2Oa5lGuNwhzKNKyCq7hBGq7XrwzpdkRuS+95z2biX1Vompmy3/lkl1RDVQH2oFIV/pIQdoKLB0QqwtNCVJozQLHMMLBETnaLV7UJKAmnqQVXS8EjwymmkQKfPl9F43Yakrn5/Uiyb8XGEZtZIOYbJutgubiRa5HsmBKBHKB0i7YCEeE0SzXna1fzgSV8mIXkLL6maAbxzVDQMDwDTAAq/YYsC4Q/GZfXuvTCgri6X9PMLn/77mTdAVGQ6MR3M9w==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=leica-geosystems.com;
- Cc: "chrony-dev@xxxxxxxxxxxxxxxxxxxx" <chrony-dev@xxxxxxxxxxxxxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leica-geosystems.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9q2fSEveHqNW7l7VvQKmUCzTAbZUJVygUluKiq3tXKQ=; b=kTph0ccy1NgOnAlVzCXkMVdAcQnkez12XsHCe/DJ59Wo8+LOiIBKFZ4WtnyMMWUTG9NFxdjvXvMssEWTFzW7xJ2TzsVyTMAvcI5xFZ+2tSUnLEhurJ6dermSZPoT4vpMrGTQKLZvhQnNlcyEqbJj1kcKtqGsNFcVuZ1vW/rgt2Q=
- Msip_labels:
- Thread-index: AQHayv7A1O0rw95wkE+SXi578KidCLHhfyCAgAAAhtU=
- Thread-topic: [chrony-dev] [PATCH v1] rtc: handle uninitialized RTC
Hoi,
no there wasn't a kernel side discussion;
On a system where chrony is running it holds the rtc device/file-handle, e.g. has exclusive access and manages the RTC -> there are no other applications reading/handling the RTC.
So this patch adds the missing "userspace handling" for this uninitialized RTC corner case.
gruß
Johannes
________________________________________
From: Miroslav Lichvar <mlichvar@xxxxxxxxxx>
Sent: Monday, July 1, 2024 09:44
To: chrony-dev@xxxxxxxxxxxxxxxxxxxx
Subject: Re: [chrony-dev] [PATCH v1] rtc: handle uninitialized RTC
[You don't often get email from mlichvar@xxxxxxxxxx. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
This email is not from Hexagon’s Office 365 instance. Please be careful while clicking links, opening attachments, or replying to this email.
On Sun, Jun 30, 2024 at 05:04:00PM +0200, Johannes Schneider wrote:
> Add a configuration option for an "initialization year/timestamp"
> chornyd can use to start an uninitialized RTC, so that the RTC driver
> can continue its start up, and chrony could later trim the RTC to an
> accurate date.
>
> Without this 'kick-off', on systems where the RTC would return -EINVAL
> when being queried either for features, or just being read, chronyd
> would be unable to start the RTC driver ("513 RTC driver not running")
> and hence could/would not set it.
>
> An example RTC where this is the case is RX8130 (of the ds1307
> family), which would return -EINVAL *until* the internal oscillator is
> started by writing a valid date to it.
Wouldn't all applications reading RTC need this patch? I think this
should be addressed in the kernel driver instead. Was there a
discussion about that?
--
Miroslav Lichvar
--
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble? Email listmaster@xxxxxxxxxxxxxxxxxxxx.
--
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble? Email listmaster@xxxxxxxxxxxxxxxxxxxx.