From: Arnd Bergmann <arnd@arndb.de>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>,
geert@linux-m68k.org, deller@gmx.de, benh@kernel.crashing.org,
dalias@libc.org, dhowells@redhat.com,
linux-alpha@vger.kernel.org, a.zummo@towertech.it,
linux-kernel@vger.kernel.org, linux-parisc@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org, linux-sh@vger.kernel.org,
linux-m68k@lists.linux-m68k.org, rtc-linux@googlegroups.com,
linux-arch@vger.kernel.org
Subject: Re: [PATCH v3 12/16] rtc: powerpc: provide rtc_class_ops directly
Date: Tue, 03 May 2016 12:29:21 +0200 [thread overview]
Message-ID: <3723014.RkUgaFBZte@wuerfel> (raw)
In-Reply-To: <1462248309.12788.4.camel@ellerman.id.au>
On Tuesday 03 May 2016 14:05:09 Michael Ellerman wrote:
> On Thu, 2016-04-28 at 00:34 +0200, Arnd Bergmann wrote:
>
> > The rtc-generic driver provides an architecture specific
> > wrapper on top of the generic rtc_class_ops abstraction,
> > and powerpc has another abstraction on top, which is a bit
> > silly.
> >
> > This changes the powerpc rtc-generic device to provide its
> > rtc_class_ops directly, to reduce the number of layers
> > by one.
> >
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > ---
> > arch/powerpc/kernel/time.c | 29 ++++++++++++++++++++++++++++-
> > drivers/rtc/rtc-generic.c | 2 +-
> > 2 files changed, 29 insertions(+), 2 deletions(-)
>
> If this hits linux-next it will go through my automated boot testing, which
> hopefully would be sufficient to catch any bugs in this patch, cross fingers.
>
> I don't know jack about all the layers of RTC mess, so my ack is basically
> worthless here. But if you like you can have one anyway
>
> Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Thanks!
The main thing that could use testing here is for patch 12/16 to see if
/sbin/hwclock can still read and write the time on a machine that
uses one of the genrtc backends on powerpc, this includes
rtas_get_rtc_time, mpc8xx_get_rtc_time, maple_get_rtc_time,
ps3_get_rtc_time and pmac_get_rtc_time. Testing on a pSeries with rtas
should be sufficient, and if I made a mistake, it probably fails
spectacularly.
Just for reference, if anyone ever wants to clean this up further on
powerpc to remove all of the rtc handling from architecture code,
it has gotten easier after my series:
- The update_persistent_clock() and read_persistent_clock() callbacks
are now unnecessary: as long as the RTC driver is built into the
kernel, drivers/rtc/hctosys.c takes care of setting the initial
time (otherwise user space has to do it), and the other users
(ntp and suspend/resume) will work fine whenever an rtc driver
is loaded. Obviously you will want to test the kernel better after
removing the two functions.
- Once they are gone, the only users of the ppc_md.{get,set}_rtc_time
callbacks are in the "const struct rtc_class_ops rtc_generic_ops".
You can move them into the five files implementing those callbacks
and call the functions directly to get rid of the function pointers.
- Lastly, after that is done, you basically have five independent
rtc device drivers that can get moved to drivers/rtc and converted
into regular platform drivers. Instead of registering the fake
"rtc-generic" device, you then register the one that is actually
there like arch/powerpc/sysdev/rtc_cmos_setup.c already does, or
use the one that gets created from DT.
Arnd
next prev parent reply other threads:[~2016-05-03 10:30 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-27 22:34 [PATCH v3 00/16] genrtc removal Arnd Bergmann
2016-04-27 22:34 ` [PATCH v3 01/16] rtc: cmos: remove empty asm/mc146818rtc.h files Arnd Bergmann
2016-04-27 22:34 ` [PATCH v3 02/16] rtc: cmos: move mc146818rtc code out of asm-generic/rtc.h Arnd Bergmann
2016-04-27 22:34 ` [PATCH v3 03/16] char/genrtc: x86: remove remnants of asm/rtc.h Arnd Bergmann
2016-04-27 22:34 ` [PATCH v3 04/16] rtc: sh: provide rtc_class_ops directly Arnd Bergmann
2016-04-27 23:21 ` Rich Felker
2016-04-28 7:21 ` Geert Uytterhoeven
2016-04-28 9:08 ` Arnd Bergmann
2016-04-28 9:38 ` Arnd Bergmann
2016-04-27 22:34 ` [PATCH v3 05/16] char/genrtc: remove alpha support Arnd Bergmann
2016-04-27 22:34 ` [PATCH v3 06/16] char/genrtc: remove mn10300 support Arnd Bergmann
2016-04-27 22:34 ` [PATCH v3 07/16] rtc: parisc: provide rtc_class_ops directly Arnd Bergmann
2016-04-27 22:34 ` [PATCH v3 08/16] char/genrtc: remove parisc support Arnd Bergmann
2016-04-27 22:34 ` [PATCH v3 09/16] rtc: m68k: provide rtc_class_ops directly Arnd Bergmann
2016-04-27 23:04 ` Arnd Bergmann
2016-04-27 22:34 ` [PATCH v3 10/16] rtc: m68k: provide ioctl for q40 Arnd Bergmann
2016-04-27 22:34 ` [PATCH v3 11/16] char/genrtc: remove m68k support Arnd Bergmann
2016-04-27 22:34 ` [PATCH v3 12/16] rtc: powerpc: provide rtc_class_ops directly Arnd Bergmann
2016-05-03 4:05 ` Michael Ellerman
2016-05-03 10:29 ` Arnd Bergmann [this message]
2016-04-27 22:34 ` [PATCH v3 13/16] char/genrtc: remove powerpc support Arnd Bergmann
2016-04-28 7:25 ` Geert Uytterhoeven
2016-04-28 9:39 ` Arnd Bergmann
2016-04-27 22:34 ` [PATCH v3 14/16] rtc: generic: remove get_rtc_time/set_rtc_time wrappers Arnd Bergmann
2016-04-27 22:34 ` [PATCH v3 15/16] char/genrtc: remove asm-generic/rtc.h from mips Arnd Bergmann
2016-04-27 22:34 ` [PATCH v3 16/16] char/genrtc: remove the rest of the driver Arnd Bergmann
2016-04-28 7:48 ` [PATCH v3 00/16] genrtc removal Geert Uytterhoeven
2016-05-02 8:45 ` Geert Uytterhoeven
2016-05-03 7:24 ` Alexandre Belloni
2016-05-03 10:05 ` Arnd Bergmann
2016-05-29 23:37 ` Alexandre Belloni
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=3723014.RkUgaFBZte@wuerfel \
--to=arnd@arndb.de \
--cc=a.zummo@towertech.it \
--cc=alexandre.belloni@free-electrons.com \
--cc=benh@kernel.crashing.org \
--cc=dalias@libc.org \
--cc=deller@gmx.de \
--cc=dhowells@redhat.com \
--cc=geert@linux-m68k.org \
--cc=linux-alpha@vger.kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=linux-parisc@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--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;
as well as URLs for NNTP newsgroup(s).