From: Andreas Schwab <schwab@linux-m68k.org>
To: Mathieu Malaterre <malat@debian.org>
Cc: Arnd Bergmann <arnd@arndb.de>, Paul Mackerras <paulus@samba.org>,
Michael Ellerman <mpe@ellerman.id.au>,
Geert Uytterhoeven <geert@linux-m68k.org>,
funaho@jurai.org,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
gerg@linux-m68k.org, linux-m68k@lists.linux-m68k.org,
linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
LKML <linux-kernel@vger.kernel.org>,
y2038@lists.linaro.org, Meelis Roos <mroos@linux.ee>,
Alexandre Belloni <alexandre.belloni@free-electrons.com>
Subject: Re: [PATCH 1/3] powerpc: mac: fix rtc read functions
Date: Mon, 18 Jun 2018 22:04:49 +0200 [thread overview]
Message-ID: <87efh3hndq.fsf@igel.home> (raw)
In-Reply-To: <CA+7wUswcgxLz_GAqkyVLpdAmTNEPUZ-cXJ8Ej7Xx9+OgjGUo=Q@mail.gmail.com> (Mathieu Malaterre's message of "Mon, 18 Jun 2018 21:10:06 +0200")
On Jun 18 2018, Mathieu Malaterre <malat@debian.org> wrote:
> Sadly, trying again today does not work anymore. Adding some printk
> just before WARN_ON:
>
> +printk(KERN_ERR " rtc DBG pmu_get_time1: %lld %d %lld \n", now,
> RTC_OFFSET, now - RTC_OFFSET );
> +printk(KERN_ERR " rtc DBG pmu_get_time2: %x %x %x %x %d \n",
> req.reply[0], req.reply[1], req.reply[2], req.reply[3] ,
> req.reply_len);
>
> leads to:
>
> [ 0.000000] rtc DBG pmu_get_time1: 14096662 2082844800 -2068748138
> [ 0.000000] rtc DBG pmu_get_time2: 0 d7 19 16 4
A good value would have 0xd7 in the first byte. The problem is that
pmu_set_rtc_time is also broken, and leads to an invalid time value
stored in the RTC. Since pmu_request is a varargs function passing
values of type time64_t without casting won't work.
You need to reset your RTC before you can continue.
I think the right fix is to change nowtime in pmu_set_rtc_time and
cuda_set_rtc_time back to unsigned int (or to u32).
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
next prev parent reply other threads:[~2018-06-18 20:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-18 14:05 [PATCH 1/3] powerpc: mac: fix rtc read functions Arnd Bergmann
2018-06-18 14:05 ` [PATCH 2/3] m68k: mac: use time64_t in RTC handling Arnd Bergmann
2018-06-18 16:55 ` kbuild test robot
2018-06-18 14:05 ` [PATCH 3/3] m68k: remove unused set_clock_mmss() helpers Arnd Bergmann
2018-06-19 13:07 ` Greg Ungerer
2018-06-18 19:10 ` [PATCH 1/3] powerpc: mac: fix rtc read functions Mathieu Malaterre
2018-06-18 20:04 ` Andreas Schwab [this message]
2018-06-19 5:47 ` Mathieu Malaterre
2018-06-19 10:18 ` Arnd Bergmann
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=87efh3hndq.fsf@igel.home \
--to=schwab@linux-m68k.org \
--cc=alexandre.belloni@free-electrons.com \
--cc=arnd@arndb.de \
--cc=benh@kernel.crashing.org \
--cc=funaho@jurai.org \
--cc=geert@linux-m68k.org \
--cc=gerg@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=malat@debian.org \
--cc=mpe@ellerman.id.au \
--cc=mroos@linux.ee \
--cc=paulus@samba.org \
--cc=y2038@lists.linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.