[v5,1/5] x86/init: Make get/set_rtc_noop() public

Message ID 1681192532-15460-2-git-send-email-ssengar@linux.microsoft.com
State New
Headers
Series Hyper-V VTL support |

Commit Message

Saurabh Singh Sengar April 11, 2023, 5:55 a.m. UTC
  Make get/set_rtc_noop() to be public so that they can be used
in other modules as well.

Co-developed-by: Tianyu Lan <tiala@microsoft.com>
Signed-off-by: Tianyu Lan <tiala@microsoft.com>
Signed-off-by: Saurabh Sengar <ssengar@linux.microsoft.com>
Reviewed-by: Wei Liu <wei.liu@kernel.org>
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
---
 arch/x86/include/asm/x86_init.h | 2 ++
 arch/x86/kernel/x86_init.c      | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)
  

Comments

Wei Liu April 13, 2023, 1:16 a.m. UTC | #1
On Mon, Apr 10, 2023 at 10:55:28PM -0700, Saurabh Sengar wrote:
> Make get/set_rtc_noop() to be public so that they can be used
> in other modules as well.
> 
> Co-developed-by: Tianyu Lan <tiala@microsoft.com>
> Signed-off-by: Tianyu Lan <tiala@microsoft.com>
> Signed-off-by: Saurabh Sengar <ssengar@linux.microsoft.com>
> Reviewed-by: Wei Liu <wei.liu@kernel.org>
> Reviewed-by: Michael Kelley <mikelley@microsoft.com>

x86 maintainers, can you please ack or nack this patch?

This looks trivially correct, but I don't want to apply this patch
without an ack since this is under arch/x86.

Thanks,
Wei.

> ---
>  arch/x86/include/asm/x86_init.h | 2 ++
>  arch/x86/kernel/x86_init.c      | 4 ++--
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/x86/include/asm/x86_init.h b/arch/x86/include/asm/x86_init.h
> index acc20ae4079d..88085f369ff6 100644
> --- a/arch/x86/include/asm/x86_init.h
> +++ b/arch/x86/include/asm/x86_init.h
> @@ -330,5 +330,7 @@ extern void x86_init_uint_noop(unsigned int unused);
>  extern bool bool_x86_init_noop(void);
>  extern void x86_op_int_noop(int cpu);
>  extern bool x86_pnpbios_disabled(void);
> +extern int set_rtc_noop(const struct timespec64 *now);
> +extern void get_rtc_noop(struct timespec64 *now);
>  
>  #endif
> diff --git a/arch/x86/kernel/x86_init.c b/arch/x86/kernel/x86_init.c
> index 95be3831df73..d82f4fa2f1bf 100644
> --- a/arch/x86/kernel/x86_init.c
> +++ b/arch/x86/kernel/x86_init.c
> @@ -33,8 +33,8 @@ static int __init iommu_init_noop(void) { return 0; }
>  static void iommu_shutdown_noop(void) { }
>  bool __init bool_x86_init_noop(void) { return false; }
>  void x86_op_int_noop(int cpu) { }
> -static __init int set_rtc_noop(const struct timespec64 *now) { return -EINVAL; }
> -static __init void get_rtc_noop(struct timespec64 *now) { }
> +int set_rtc_noop(const struct timespec64 *now) { return -EINVAL; }
> +void get_rtc_noop(struct timespec64 *now) { }
>  
>  static __initconst const struct of_device_id of_cmos_match[] = {
>  	{ .compatible = "motorola,mc146818" },
> -- 
> 2.34.1
>
  
Borislav Petkov April 13, 2023, 9:19 a.m. UTC | #2
On Thu, Apr 13, 2023 at 01:16:07AM +0000, Wei Liu wrote:
> On Mon, Apr 10, 2023 at 10:55:28PM -0700, Saurabh Sengar wrote:
> > Make get/set_rtc_noop() to be public so that they can be used
> > in other modules as well.
> > 
> > Co-developed-by: Tianyu Lan <tiala@microsoft.com>
> > Signed-off-by: Tianyu Lan <tiala@microsoft.com>
> > Signed-off-by: Saurabh Sengar <ssengar@linux.microsoft.com>
> > Reviewed-by: Wei Liu <wei.liu@kernel.org>
> > Reviewed-by: Michael Kelley <mikelley@microsoft.com>
> 
> x86 maintainers, can you please ack or nack this patch?

Acked-by: Borislav Petkov (AMD) <bp@alien8.de>
  
Wei Liu April 13, 2023, 3:34 p.m. UTC | #3
On Thu, Apr 13, 2023 at 11:19:42AM +0200, Borislav Petkov wrote:
> On Thu, Apr 13, 2023 at 01:16:07AM +0000, Wei Liu wrote:
> > On Mon, Apr 10, 2023 at 10:55:28PM -0700, Saurabh Sengar wrote:
> > > Make get/set_rtc_noop() to be public so that they can be used
> > > in other modules as well.
> > > 
> > > Co-developed-by: Tianyu Lan <tiala@microsoft.com>
> > > Signed-off-by: Tianyu Lan <tiala@microsoft.com>
> > > Signed-off-by: Saurabh Sengar <ssengar@linux.microsoft.com>
> > > Reviewed-by: Wei Liu <wei.liu@kernel.org>
> > > Reviewed-by: Michael Kelley <mikelley@microsoft.com>
> > 
> > x86 maintainers, can you please ack or nack this patch?
> 
> Acked-by: Borislav Petkov (AMD) <bp@alien8.de>

Thank you very much!
  
Borislav Petkov April 13, 2023, 3:37 p.m. UTC | #4
On Thu, Apr 13, 2023 at 03:34:33PM +0000, Wei Liu wrote:
> On Thu, Apr 13, 2023 at 11:19:42AM +0200, Borislav Petkov wrote:
> > On Thu, Apr 13, 2023 at 01:16:07AM +0000, Wei Liu wrote:
> > > On Mon, Apr 10, 2023 at 10:55:28PM -0700, Saurabh Sengar wrote:
> > > > Make get/set_rtc_noop() to be public so that they can be used
> > > > in other modules as well.
> > > > 
> > > > Co-developed-by: Tianyu Lan <tiala@microsoft.com>
> > > > Signed-off-by: Tianyu Lan <tiala@microsoft.com>
> > > > Signed-off-by: Saurabh Sengar <ssengar@linux.microsoft.com>
> > > > Reviewed-by: Wei Liu <wei.liu@kernel.org>
> > > > Reviewed-by: Michael Kelley <mikelley@microsoft.com>
> > > 
> > > x86 maintainers, can you please ack or nack this patch?
> > 
> > Acked-by: Borislav Petkov (AMD) <bp@alien8.de>
> 
> Thank you very much!

Just a heads up:

https://git.kernel.org/tip/775d3c514c5b2763a50ab7839026d7561795924d

and that one is a fix so it'll go to Linus now.

Which means, you'll have to use Linus' tree with that fix as a base and
queue everything ontop.
  
Wei Liu April 13, 2023, 3:39 p.m. UTC | #5
On Thu, Apr 13, 2023 at 05:37:53PM +0200, Borislav Petkov wrote:
> On Thu, Apr 13, 2023 at 03:34:33PM +0000, Wei Liu wrote:
> > On Thu, Apr 13, 2023 at 11:19:42AM +0200, Borislav Petkov wrote:
> > > On Thu, Apr 13, 2023 at 01:16:07AM +0000, Wei Liu wrote:
> > > > On Mon, Apr 10, 2023 at 10:55:28PM -0700, Saurabh Sengar wrote:
> > > > > Make get/set_rtc_noop() to be public so that they can be used
> > > > > in other modules as well.
> > > > > 
> > > > > Co-developed-by: Tianyu Lan <tiala@microsoft.com>
> > > > > Signed-off-by: Tianyu Lan <tiala@microsoft.com>
> > > > > Signed-off-by: Saurabh Sengar <ssengar@linux.microsoft.com>
> > > > > Reviewed-by: Wei Liu <wei.liu@kernel.org>
> > > > > Reviewed-by: Michael Kelley <mikelley@microsoft.com>
> > > > 
> > > > x86 maintainers, can you please ack or nack this patch?
> > > 
> > > Acked-by: Borislav Petkov (AMD) <bp@alien8.de>
> > 
> > Thank you very much!
> 
> Just a heads up:
> 
> https://git.kernel.org/tip/775d3c514c5b2763a50ab7839026d7561795924d
> 
> and that one is a fix so it'll go to Linus now.
> 
> Which means, you'll have to use Linus' tree with that fix as a base and
> queue everything ontop.

Okay, understood. Thanks.

> 
> -- 
> Regards/Gruss,
>     Boris.
> 
> https://people.kernel.org/tglx/notes-about-netiquette
  

Patch

diff --git a/arch/x86/include/asm/x86_init.h b/arch/x86/include/asm/x86_init.h
index acc20ae4079d..88085f369ff6 100644
--- a/arch/x86/include/asm/x86_init.h
+++ b/arch/x86/include/asm/x86_init.h
@@ -330,5 +330,7 @@  extern void x86_init_uint_noop(unsigned int unused);
 extern bool bool_x86_init_noop(void);
 extern void x86_op_int_noop(int cpu);
 extern bool x86_pnpbios_disabled(void);
+extern int set_rtc_noop(const struct timespec64 *now);
+extern void get_rtc_noop(struct timespec64 *now);
 
 #endif
diff --git a/arch/x86/kernel/x86_init.c b/arch/x86/kernel/x86_init.c
index 95be3831df73..d82f4fa2f1bf 100644
--- a/arch/x86/kernel/x86_init.c
+++ b/arch/x86/kernel/x86_init.c
@@ -33,8 +33,8 @@  static int __init iommu_init_noop(void) { return 0; }
 static void iommu_shutdown_noop(void) { }
 bool __init bool_x86_init_noop(void) { return false; }
 void x86_op_int_noop(int cpu) { }
-static __init int set_rtc_noop(const struct timespec64 *now) { return -EINVAL; }
-static __init void get_rtc_noop(struct timespec64 *now) { }
+int set_rtc_noop(const struct timespec64 *now) { return -EINVAL; }
+void get_rtc_noop(struct timespec64 *now) { }
 
 static __initconst const struct of_device_id of_cmos_match[] = {
 	{ .compatible = "motorola,mc146818" },