The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH v2] arch/powerpc: Remove unused cede related functions
@ 2024-05-14 13:24 Gautam Menghani
  2024-05-15  5:23 ` Naveen N Rao
  2024-06-20 12:49 ` Michael Ellerman
  0 siblings, 2 replies; 3+ messages in thread
From: Gautam Menghani @ 2024-05-14 13:24 UTC (permalink / raw)
  To: mpe, npiggin, christophe.leroy, naveen.n.rao
  Cc: Gautam Menghani, linuxppc-dev, linux-kernel, aboorvad

Remove extended_cede_processor() and its helpers as
extended_cede_processor() has no callers since
commit 48f6e7f6d948("powerpc/pseries: remove cede offline state for CPUs")

Signed-off-by: Gautam Menghani <gautam@linux.ibm.com>
---
v1 -> v2:
1. Remove helpers of extended_cede_processor()

 arch/powerpc/include/asm/plpar_wrappers.h | 28 -----------------------
 1 file changed, 28 deletions(-)

diff --git a/arch/powerpc/include/asm/plpar_wrappers.h b/arch/powerpc/include/asm/plpar_wrappers.h
index b3ee44a40c2f..71648c126970 100644
--- a/arch/powerpc/include/asm/plpar_wrappers.h
+++ b/arch/powerpc/include/asm/plpar_wrappers.h
@@ -18,16 +18,6 @@ static inline long poll_pending(void)
 	return plpar_hcall_norets(H_POLL_PENDING);
 }
 
-static inline u8 get_cede_latency_hint(void)
-{
-	return get_lppaca()->cede_latency_hint;
-}
-
-static inline void set_cede_latency_hint(u8 latency_hint)
-{
-	get_lppaca()->cede_latency_hint = latency_hint;
-}
-
 static inline long cede_processor(void)
 {
 	/*
@@ -37,24 +27,6 @@ static inline long cede_processor(void)
 	return plpar_hcall_norets_notrace(H_CEDE);
 }
 
-static inline long extended_cede_processor(unsigned long latency_hint)
-{
-	long rc;
-	u8 old_latency_hint = get_cede_latency_hint();
-
-	set_cede_latency_hint(latency_hint);
-
-	rc = cede_processor();
-
-	/* Ensure that H_CEDE returns with IRQs on */
-	if (WARN_ON(IS_ENABLED(CONFIG_PPC_IRQ_SOFT_MASK_DEBUG) && !(mfmsr() & MSR_EE)))
-		__hard_irq_enable();
-
-	set_cede_latency_hint(old_latency_hint);
-
-	return rc;
-}
-
 static inline long vpa_call(unsigned long flags, unsigned long cpu,
 		unsigned long vpa)
 {
-- 
2.45.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] arch/powerpc: Remove unused cede related functions
  2024-05-14 13:24 [PATCH v2] arch/powerpc: Remove unused cede related functions Gautam Menghani
@ 2024-05-15  5:23 ` Naveen N Rao
  2024-06-20 12:49 ` Michael Ellerman
  1 sibling, 0 replies; 3+ messages in thread
From: Naveen N Rao @ 2024-05-15  5:23 UTC (permalink / raw)
  To: Gautam Menghani
  Cc: mpe, npiggin, christophe.leroy, aboorvad, linuxppc-dev,
	linux-kernel

On Tue, May 14, 2024 at 06:54:55PM GMT, Gautam Menghani wrote:
> Remove extended_cede_processor() and its helpers as
> extended_cede_processor() has no callers since
> commit 48f6e7f6d948("powerpc/pseries: remove cede offline state for CPUs")
> 
> Signed-off-by: Gautam Menghani <gautam@linux.ibm.com>
> ---
> v1 -> v2:
> 1. Remove helpers of extended_cede_processor()

Acked-by: Naveen N Rao <naveen@kernel.org>

> 
>  arch/powerpc/include/asm/plpar_wrappers.h | 28 -----------------------
>  1 file changed, 28 deletions(-)
> 
> diff --git a/arch/powerpc/include/asm/plpar_wrappers.h b/arch/powerpc/include/asm/plpar_wrappers.h
> index b3ee44a40c2f..71648c126970 100644
> --- a/arch/powerpc/include/asm/plpar_wrappers.h
> +++ b/arch/powerpc/include/asm/plpar_wrappers.h
> @@ -18,16 +18,6 @@ static inline long poll_pending(void)
>  	return plpar_hcall_norets(H_POLL_PENDING);
>  }
>  
> -static inline u8 get_cede_latency_hint(void)
> -{
> -	return get_lppaca()->cede_latency_hint;
> -}
> -
> -static inline void set_cede_latency_hint(u8 latency_hint)
> -{
> -	get_lppaca()->cede_latency_hint = latency_hint;
> -}
> -
>  static inline long cede_processor(void)
>  {
>  	/*
> @@ -37,24 +27,6 @@ static inline long cede_processor(void)
>  	return plpar_hcall_norets_notrace(H_CEDE);
>  }
>  
> -static inline long extended_cede_processor(unsigned long latency_hint)
> -{
> -	long rc;
> -	u8 old_latency_hint = get_cede_latency_hint();
> -
> -	set_cede_latency_hint(latency_hint);
> -
> -	rc = cede_processor();
> -
> -	/* Ensure that H_CEDE returns with IRQs on */
> -	if (WARN_ON(IS_ENABLED(CONFIG_PPC_IRQ_SOFT_MASK_DEBUG) && !(mfmsr() & MSR_EE)))
> -		__hard_irq_enable();
> -
> -	set_cede_latency_hint(old_latency_hint);
> -
> -	return rc;
> -}
> -
>  static inline long vpa_call(unsigned long flags, unsigned long cpu,
>  		unsigned long vpa)
>  {
> -- 
> 2.45.0
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] arch/powerpc: Remove unused cede related functions
  2024-05-14 13:24 [PATCH v2] arch/powerpc: Remove unused cede related functions Gautam Menghani
  2024-05-15  5:23 ` Naveen N Rao
@ 2024-06-20 12:49 ` Michael Ellerman
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Ellerman @ 2024-06-20 12:49 UTC (permalink / raw)
  To: mpe, npiggin, christophe.leroy, naveen.n.rao, Gautam Menghani
  Cc: linuxppc-dev, linux-kernel, aboorvad

On Tue, 14 May 2024 18:54:55 +0530, Gautam Menghani wrote:
> Remove extended_cede_processor() and its helpers as
> extended_cede_processor() has no callers since
> commit 48f6e7f6d948("powerpc/pseries: remove cede offline state for CPUs")
> 
> 

Applied to powerpc/next.

[1/1] arch/powerpc: Remove unused cede related functions
      https://git.kernel.org/powerpc/c/214f33fcf656bf1be3f9f03d58fda067cdf7eecc

cheers

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-06-20 12:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-14 13:24 [PATCH v2] arch/powerpc: Remove unused cede related functions Gautam Menghani
2024-05-15  5:23 ` Naveen N Rao
2024-06-20 12:49 ` Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox