Re: [PATCH 1/2] rtc/ia64: remove legacy efirtc driver

2019-10-23 Thread Luck, Tony
On Wed, Oct 23, 2019 at 05:01:58PM +0200, Arnd Bergmann wrote:
> There are two EFI RTC drivers, the original drivers/char/efirtc.c
> driver and the more modern drivers/rtc/rtc-efi.c.
> 
> Both implement the same interface, but the new one does so
> in a more portable way.
> 
> Move everything over to that one and remove the old one.

The new one is more talkative that the old one. I see this extra
line on the console when I boot ia64:

rtc-efi rtc-efi: setting system clock to 2019-10-23T18:30:23 UTC (1571855423)

That seems somewhat useful & informative (though the repeated "rtc-efi"
at the start of the line is redundant).

Acked-by: Tony Luck 

-Tony


Re: [PATCH 1/2] rtc/ia64: remove legacy efirtc driver

2019-10-23 Thread Alexandre Belloni
On 23/10/2019 17:01:58+0200, Arnd Bergmann wrote:
> There are two EFI RTC drivers, the original drivers/char/efirtc.c
> driver and the more modern drivers/rtc/rtc-efi.c.
> 
> Both implement the same interface, but the new one does so
> in a more portable way.
> 
> Move everything over to that one and remove the old one.
> 
> Cc: linux-i...@vger.kernel.org
> Cc: Fenghua Yu 
> Cc: Tony Luck 
> Cc: Stephane Eranian 
> Signed-off-by: Arnd Bergmann 
Acked-by: Alexandre Belloni 

> ---
> This was last discussed in early 2018 in
> https://lore.kernel.org/lkml/CAK8P3a0QZNY+K+V1HG056xCerz=_l2jh5ufz+2lwkdqkw5z...@mail.gmail.com/
> 
> Nobody ever replied there, so let's try this instead.
> If there is any reason to keep the driver after all,
> please let us know.
> ---
>  arch/ia64/configs/bigsur_defconfig|   3 +-
>  arch/ia64/configs/generic_defconfig   |   3 +-
>  arch/ia64/configs/gensparse_defconfig |   3 +-
>  arch/ia64/configs/tiger_defconfig |   3 +-
>  arch/ia64/configs/zx1_defconfig   |   3 +-
>  drivers/char/Kconfig  |   4 -
>  drivers/char/Makefile |   1 -
>  drivers/char/efirtc.c | 366 --
>  include/linux/miscdevice.h|   2 +-
>  9 files changed, 11 insertions(+), 377 deletions(-)
>  delete mode 100644 drivers/char/efirtc.c
> 
> diff --git a/arch/ia64/configs/bigsur_defconfig 
> b/arch/ia64/configs/bigsur_defconfig
> index b630bd7351c4..f3ba813a5b80 100644
> --- a/arch/ia64/configs/bigsur_defconfig
> +++ b/arch/ia64/configs/bigsur_defconfig
> @@ -57,7 +57,8 @@ CONFIG_SERIAL_8250_CONSOLE=y
>  CONFIG_SERIAL_8250_EXTENDED=y
>  CONFIG_SERIAL_8250_SHARE_IRQ=y
>  # CONFIG_HW_RANDOM is not set
> -CONFIG_EFI_RTC=y
> +CONFIG_RTC_CLASS=y
> +CONFIG_RTC_DRV_EFI=y
>  CONFIG_I2C=y
>  CONFIG_I2C_CHARDEV=y
>  CONFIG_AGP=m
> diff --git a/arch/ia64/configs/generic_defconfig 
> b/arch/ia64/configs/generic_defconfig
> index 661d90b3e148..cb267a07c57f 100644
> --- a/arch/ia64/configs/generic_defconfig
> +++ b/arch/ia64/configs/generic_defconfig
> @@ -94,7 +94,8 @@ CONFIG_SERIAL_8250_NR_UARTS=6
>  CONFIG_SERIAL_8250_EXTENDED=y
>  CONFIG_SERIAL_8250_SHARE_IRQ=y
>  # CONFIG_HW_RANDOM is not set
> -CONFIG_EFI_RTC=y
> +CONFIG_RTC_CLASS=y
> +CONFIG_RTC_DRV_EFI=y
>  CONFIG_RAW_DRIVER=m
>  CONFIG_HPET=y
>  CONFIG_AGP=m
> diff --git a/arch/ia64/configs/gensparse_defconfig 
> b/arch/ia64/configs/gensparse_defconfig
> index 7844e6a956a4..7e25f2f031b6 100644
> --- a/arch/ia64/configs/gensparse_defconfig
> +++ b/arch/ia64/configs/gensparse_defconfig
> @@ -82,7 +82,8 @@ CONFIG_SERIAL_8250_NR_UARTS=6
>  CONFIG_SERIAL_8250_EXTENDED=y
>  CONFIG_SERIAL_8250_SHARE_IRQ=y
>  # CONFIG_HW_RANDOM is not set
> -CONFIG_EFI_RTC=y
> +CONFIG_RTC_CLASS=y
> +CONFIG_RTC_DRV_EFI=y
>  CONFIG_RAW_DRIVER=m
>  CONFIG_HPET=y
>  CONFIG_AGP=m
> diff --git a/arch/ia64/configs/tiger_defconfig 
> b/arch/ia64/configs/tiger_defconfig
> index 1d6e2a01452b..3f486d5bdc2d 100644
> --- a/arch/ia64/configs/tiger_defconfig
> +++ b/arch/ia64/configs/tiger_defconfig
> @@ -86,7 +86,8 @@ CONFIG_SERIAL_8250_NR_UARTS=6
>  CONFIG_SERIAL_8250_EXTENDED=y
>  CONFIG_SERIAL_8250_SHARE_IRQ=y
>  # CONFIG_HW_RANDOM is not set
> -CONFIG_EFI_RTC=y
> +CONFIG_RTC_CLASS=y
> +CONFIG_RTC_DRV_EFI=y
>  CONFIG_RAW_DRIVER=m
>  CONFIG_HPET=y
>  CONFIG_AGP=m
> diff --git a/arch/ia64/configs/zx1_defconfig b/arch/ia64/configs/zx1_defconfig
> index 8c92e095f8bb..70788a500448 100644
> --- a/arch/ia64/configs/zx1_defconfig
> +++ b/arch/ia64/configs/zx1_defconfig
> @@ -69,7 +69,8 @@ CONFIG_SERIAL_8250_NR_UARTS=8
>  CONFIG_SERIAL_8250_EXTENDED=y
>  CONFIG_SERIAL_8250_SHARE_IRQ=y
>  # CONFIG_HW_RANDOM is not set
> -CONFIG_EFI_RTC=y
> +CONFIG_RTC_CLASS=y
> +CONFIG_RTC_DRV_EFI=y
>  CONFIG_I2C_CHARDEV=y
>  CONFIG_AGP=y
>  CONFIG_AGP_HP_ZX1=y
> diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
> index df0fc997dc3e..dabbf3f519c6 100644
> --- a/drivers/char/Kconfig
> +++ b/drivers/char/Kconfig
> @@ -297,10 +297,6 @@ config JS_RTC
> To compile this driver as a module, choose M here: the
> module will be called js-rtc.
>  
> -config EFI_RTC
> - bool "EFI Real Time Clock Services"
> - depends on IA64
> -
>  endif # RTC_LIB
>  
>  config DTLK
> diff --git a/drivers/char/Makefile b/drivers/char/Makefile
> index 7c5ea6f9df14..abe3138b1f5a 100644
> --- a/drivers/char/Makefile
> +++ b/drivers/char/Makefile
> @@ -22,7 +22,6 @@ obj-$(CONFIG_APPLICOM)  += applicom.o
>  obj-$(CONFIG_SONYPI) += sonypi.o
>  obj-$(CONFIG_RTC)+= rtc.o
>  obj-$(CONFIG_HPET)   += hpet.o
> -obj-$(CONFIG_EFI_RTC)+= efirtc.o
>  obj-$(CONFIG_XILINX_HWICAP)  += xilinx_hwicap/
>  obj-$(CONFIG_NVRAM)  += nvram.o
>  obj-$(CONFIG_TOSHIBA)+= toshiba.o
> diff --git a/drivers/char/efirtc.c b/drivers/char/efirtc.c
> deleted file mode 100644
> index 4f73064d0c6f..
> --- a/drivers/char/efirtc.c
> +++ /dev/null
> @@ -1,366 +0,0 @@
> -// SPDX-License-Iden