From: Robert Jarzmik <robert.jarzmik@free.fr>
To: Rob Herring <robh@kernel.org>
Cc: Russell King <linux@arm.linux.org.uk>,
Alexandre Belloni <alexandre.belloni@free-electrons.com>,
Eric Miao <eric.y.miao@gmail.com>,
Haojian Zhuang <haojian.zhuang@gmail.com>,
Alessandro Zummo <a.zummo@towertech.it>,
rtc-linux@googlegroups.com, Arnd Bergmann <arnd@arndb.de>,
"linux-arm-kernel\@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v4 0/6] SA1100/PXA RTC clean-up
Date: Sat, 06 Jun 2015 23:25:25 +0200 [thread overview]
Message-ID: <87wpzg4ji2.fsf@belgarion.home> (raw)
In-Reply-To: <CAL_JsqJnj+JLFoUmE6COqhr83_H0n1=Bdk_wYnMZEzsZRu=aew@mail.gmail.com> (Rob Herring's message of "Fri, 5 Jun 2015 16:28:00 -0500")
Rob Herring <robh@kernel.org> writes:
>>>> - you explain in the commit message that from a userland perspective, nothing
>>>> changes, except that the RTC IP will change, and any dependency on a
>>>
>>> The IP does not change here. rtc0 is still going to be the SA1100 RTC
>>> being registered first. The only change will be the addition of rtc1.
>> For boards which were only using rtc-pxa.c (as mioa701 for example), they relied
>> on the fact that rtc0 == pxa_rtc. Their time is stored in PXA IP. Therefore,
>> each of their hwclock will end up on sa1100-rtc instead of pxa-rtc.
>>
>> So for these boards, ie. for all boards where only rtc-pxa.c was used, the IP
>> addressed changes from a casual userspace perspective.
>
> Okay, so this is the case where the time will be wrong.
>
> I could remove the select of the sa1100-rtc and do an empty function
> for sa1100_rtc_init. This would preserve current behavior.
Please don't. I only ask for a sentence in the commit message.
>>>> bootloader fidling with RTC should be considered as a source of regression.
>>>
>>> I'm not sure that I follow.
>> Let's talk about how a double boot windows + linux box works.
>> The bootloader ensures that :
>> - sa1100-rtc holds the number of seconds since the OS start (think jiffies)
>> - pxa-rtc holds the wall clock time
>>
>> Upon each reboot, sa1100-rtc is checked to see how much time has passed. If an
>> "oustanding number" is detected, for example 10 years, the firmware resets the
>> data partition.
>>
>> Now think what will happen when this change will be commited, upon the first
>> reboot after the linux kernel has change sa1100-rtc time.
>
> That would be bad. But on these platforms, the kernel has been using
> both RTCs right? Presumably on platforms only using 1 of the RTCs, the
> bootloader does not touch the RTCs.
No, the kernel has been using only pxa-rtc. The sa1100-rtc is not used, and yet
it accounts the passed time in it.
On platforms where all the OSes use only 1 RTC, the bootloader only touches one
RTC, that's correct. Or said differently : the bootloader touches the union of
all the RTCs the OSes it launches do touch.
>> All of this to say maintainers should be forwarned at least. After that, up to
>> them to react.
Cheers.
--
Robert
next prev parent reply other threads:[~2015-06-06 21:25 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-13 15:02 [rtc-linux] [PATCH v4 0/6] SA1100/PXA RTC clean-up Rob Herring
2015-05-13 15:02 ` [rtc-linux] [PATCH v4 1/6] rtc: sa1100: prepare to share sa1100_rtc_ops Rob Herring
2015-05-13 15:02 ` [rtc-linux] [PATCH v4 2/6] rtc: pxa: convert to use shared sa1100 functions Rob Herring
2015-05-13 15:02 ` [rtc-linux] [PATCH v4 3/6] ARM: pxa: add memory resource to SA1100 RTC device Rob Herring
2015-05-13 15:02 ` [rtc-linux] [PATCH v4 4/6] rtc: sa1100/pxa: convert to run-time register mapping Rob Herring
2015-05-13 15:02 ` [rtc-linux] [PATCH v4 5/6] ARM: sa1100: remove unused RTC register definitions Rob Herring
2015-05-13 15:02 ` [rtc-linux] [PATCH v4 6/6] ARM: mmp: " Rob Herring
2015-05-15 11:13 ` [PATCH v4 0/6] SA1100/PXA RTC clean-up Robert Jarzmik
2015-05-18 13:18 ` [rtc-linux] " Rob Herring
2015-05-18 18:43 ` Robert Jarzmik
2015-06-03 5:31 ` [rtc-linux] " Rob Herring
2015-06-05 19:43 ` Robert Jarzmik
2015-06-05 21:28 ` [rtc-linux] " Rob Herring
2015-06-06 21:25 ` Robert Jarzmik [this message]
2015-06-08 16:52 ` Rob Herring
2015-06-14 8:11 ` Robert Jarzmik
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=87wpzg4ji2.fsf@belgarion.home \
--to=robert.jarzmik@free.fr \
--cc=a.zummo@towertech.it \
--cc=alexandre.belloni@free-electrons.com \
--cc=arnd@arndb.de \
--cc=eric.y.miao@gmail.com \
--cc=haojian.zhuang@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux@arm.linux.org.uk \
--cc=robh@kernel.org \
--cc=rtc-linux@googlegroups.com \
/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