All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] powerpc/pseries: advertise Hot Plug Event support to firmware
@ 2017-02-21  1:12 Michael Roth
  2017-02-21 15:49 ` Nathan Fontenot
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Michael Roth @ 2017-02-21  1:12 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Michael Ellerman, Nathan Fontenot, David Gibson

With the inclusion of:

  powerpc/pseries: Implement indexed-count hotplug memory remove
  powerpc/pseries: Implement indexed-count hotplug memory add

we now have complete handling of the RTAS hotplug event format
as described by PAPR via ACR "PAPR Changes for Hotplug RTAS Events".

This capability is indicated by byte 6, bit 5 of architecture
option vector 5, and allows for greater control over cpu/memory/pci
hot plug/unplug operations.

Existing pseries kernels will utilize this capability based on the
existence of the /event-sources/hot-plug-events DT property, so we
only need to advertise it via CAS and do not need a corresponding
FW_FEATURE_* value to test for.

Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Cc: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 arch/powerpc/include/asm/prom.h | 1 +
 arch/powerpc/kernel/prom_init.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
index 2c8001c..4a90634 100644
--- a/arch/powerpc/include/asm/prom.h
+++ b/arch/powerpc/include/asm/prom.h
@@ -153,6 +153,7 @@ struct of_drconf_cell {
 #define OV5_XCMO		0x0440	/* Page Coalescing */
 #define OV5_TYPE1_AFFINITY	0x0580	/* Type 1 NUMA affinity */
 #define OV5_PRRN		0x0540	/* Platform Resource Reassignment */
+#define OV5_HP_EVT		0x0604	/* Hot Plug Event support */
 #define OV5_RESIZE_HPT		0x0601	/* Hash Page Table resizing */
 #define OV5_PFO_HW_RNG		0x1180	/* PFO Random Number Generator */
 #define OV5_PFO_HW_842		0x1140	/* PFO Compression Accelerator */
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index f3c8799..1a835e7 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -839,7 +839,7 @@ struct ibm_arch_vec __cacheline_aligned ibm_architecture_vec = {
 		0,
 #endif
 		.associativity = OV5_FEAT(OV5_TYPE1_AFFINITY) | OV5_FEAT(OV5_PRRN),
-		.bin_opts = OV5_FEAT(OV5_RESIZE_HPT),
+		.bin_opts = OV5_FEAT(OV5_RESIZE_HPT) | OV5_FEAT(OV5_HP_EVT),
 		.micro_checkpoint = 0,
 		.reserved0 = 0,
 		.max_cpus = cpu_to_be32(NR_CPUS),	/* number of cores supported */
-- 
2.7.4

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

* Re: [PATCH] powerpc/pseries: advertise Hot Plug Event support to firmware
  2017-02-21  1:12 [PATCH] powerpc/pseries: advertise Hot Plug Event support to firmware Michael Roth
@ 2017-02-21 15:49 ` Nathan Fontenot
  2017-02-22  0:58 ` David Gibson
  2017-02-27 10:11 ` Michael Ellerman
  2 siblings, 0 replies; 4+ messages in thread
From: Nathan Fontenot @ 2017-02-21 15:49 UTC (permalink / raw)
  To: Michael Roth, linuxppc-dev; +Cc: David Gibson

On 02/20/2017 07:12 PM, Michael Roth wrote:
> With the inclusion of:
> 
>   powerpc/pseries: Implement indexed-count hotplug memory remove
>   powerpc/pseries: Implement indexed-count hotplug memory add
> 
> we now have complete handling of the RTAS hotplug event format
> as described by PAPR via ACR "PAPR Changes for Hotplug RTAS Events".
> 
> This capability is indicated by byte 6, bit 5 of architecture
> option vector 5, and allows for greater control over cpu/memory/pci
> hot plug/unplug operations.
> 
> Existing pseries kernels will utilize this capability based on the
> existence of the /event-sources/hot-plug-events DT property, so we
> only need to advertise it via CAS and do not need a corresponding
> FW_FEATURE_* value to test for.
> 
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: Nathan Fontenot <nfont@linux.vnet.ibm.com>
> Cc: David Gibson <david@gibson.dropbear.id.au>
> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>

Reviewed-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>

> ---
>  arch/powerpc/include/asm/prom.h | 1 +
>  arch/powerpc/kernel/prom_init.c | 2 +-
>  2 files changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
> index 2c8001c..4a90634 100644
> --- a/arch/powerpc/include/asm/prom.h
> +++ b/arch/powerpc/include/asm/prom.h
> @@ -153,6 +153,7 @@ struct of_drconf_cell {
>  #define OV5_XCMO		0x0440	/* Page Coalescing */
>  #define OV5_TYPE1_AFFINITY	0x0580	/* Type 1 NUMA affinity */
>  #define OV5_PRRN		0x0540	/* Platform Resource Reassignment */
> +#define OV5_HP_EVT		0x0604	/* Hot Plug Event support */
>  #define OV5_RESIZE_HPT		0x0601	/* Hash Page Table resizing */
>  #define OV5_PFO_HW_RNG		0x1180	/* PFO Random Number Generator */
>  #define OV5_PFO_HW_842		0x1140	/* PFO Compression Accelerator */
> diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
> index f3c8799..1a835e7 100644
> --- a/arch/powerpc/kernel/prom_init.c
> +++ b/arch/powerpc/kernel/prom_init.c
> @@ -839,7 +839,7 @@ struct ibm_arch_vec __cacheline_aligned ibm_architecture_vec = {
>  		0,
>  #endif
>  		.associativity = OV5_FEAT(OV5_TYPE1_AFFINITY) | OV5_FEAT(OV5_PRRN),
> -		.bin_opts = OV5_FEAT(OV5_RESIZE_HPT),
> +		.bin_opts = OV5_FEAT(OV5_RESIZE_HPT) | OV5_FEAT(OV5_HP_EVT),
>  		.micro_checkpoint = 0,
>  		.reserved0 = 0,
>  		.max_cpus = cpu_to_be32(NR_CPUS),	/* number of cores supported */
> 

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

* Re: [PATCH] powerpc/pseries: advertise Hot Plug Event support to firmware
  2017-02-21  1:12 [PATCH] powerpc/pseries: advertise Hot Plug Event support to firmware Michael Roth
  2017-02-21 15:49 ` Nathan Fontenot
@ 2017-02-22  0:58 ` David Gibson
  2017-02-27 10:11 ` Michael Ellerman
  2 siblings, 0 replies; 4+ messages in thread
From: David Gibson @ 2017-02-22  0:58 UTC (permalink / raw)
  To: Michael Roth; +Cc: linuxppc-dev, Michael Ellerman, Nathan Fontenot

[-- Attachment #1: Type: text/plain, Size: 2703 bytes --]

On Mon, Feb 20, 2017 at 07:12:18PM -0600, Michael Roth wrote:
> With the inclusion of:
> 
>   powerpc/pseries: Implement indexed-count hotplug memory remove
>   powerpc/pseries: Implement indexed-count hotplug memory add
> 
> we now have complete handling of the RTAS hotplug event format
> as described by PAPR via ACR "PAPR Changes for Hotplug RTAS Events".
> 
> This capability is indicated by byte 6, bit 5 of architecture
> option vector 5, and allows for greater control over cpu/memory/pci
> hot plug/unplug operations.
> 
> Existing pseries kernels will utilize this capability based on the
> existence of the /event-sources/hot-plug-events DT property, so we
> only need to advertise it via CAS and do not need a corresponding
> FW_FEATURE_* value to test for.
> 
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: Nathan Fontenot <nfont@linux.vnet.ibm.com>
> Cc: David Gibson <david@gibson.dropbear.id.au>
> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>

Reviewed-by: David Gibson <david@gibson.dropbear.id.au>

> ---
>  arch/powerpc/include/asm/prom.h | 1 +
>  arch/powerpc/kernel/prom_init.c | 2 +-
>  2 files changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
> index 2c8001c..4a90634 100644
> --- a/arch/powerpc/include/asm/prom.h
> +++ b/arch/powerpc/include/asm/prom.h
> @@ -153,6 +153,7 @@ struct of_drconf_cell {
>  #define OV5_XCMO		0x0440	/* Page Coalescing */
>  #define OV5_TYPE1_AFFINITY	0x0580	/* Type 1 NUMA affinity */
>  #define OV5_PRRN		0x0540	/* Platform Resource Reassignment */
> +#define OV5_HP_EVT		0x0604	/* Hot Plug Event support */
>  #define OV5_RESIZE_HPT		0x0601	/* Hash Page Table resizing */
>  #define OV5_PFO_HW_RNG		0x1180	/* PFO Random Number Generator */
>  #define OV5_PFO_HW_842		0x1140	/* PFO Compression Accelerator */
> diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
> index f3c8799..1a835e7 100644
> --- a/arch/powerpc/kernel/prom_init.c
> +++ b/arch/powerpc/kernel/prom_init.c
> @@ -839,7 +839,7 @@ struct ibm_arch_vec __cacheline_aligned ibm_architecture_vec = {
>  		0,
>  #endif
>  		.associativity = OV5_FEAT(OV5_TYPE1_AFFINITY) | OV5_FEAT(OV5_PRRN),
> -		.bin_opts = OV5_FEAT(OV5_RESIZE_HPT),
> +		.bin_opts = OV5_FEAT(OV5_RESIZE_HPT) | OV5_FEAT(OV5_HP_EVT),
>  		.micro_checkpoint = 0,
>  		.reserved0 = 0,
>  		.max_cpus = cpu_to_be32(NR_CPUS),	/* number of cores supported */

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: powerpc/pseries: advertise Hot Plug Event support to firmware
  2017-02-21  1:12 [PATCH] powerpc/pseries: advertise Hot Plug Event support to firmware Michael Roth
  2017-02-21 15:49 ` Nathan Fontenot
  2017-02-22  0:58 ` David Gibson
@ 2017-02-27 10:11 ` Michael Ellerman
  2 siblings, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2017-02-27 10:11 UTC (permalink / raw)
  To: Michael Roth, linuxppc-dev; +Cc: David Gibson, Nathan Fontenot

On Tue, 2017-02-21 at 01:12:18 UTC, Michael Roth wrote:
> With the inclusion of:
> 
>   powerpc/pseries: Implement indexed-count hotplug memory remove
>   powerpc/pseries: Implement indexed-count hotplug memory add
> 
> we now have complete handling of the RTAS hotplug event format
> as described by PAPR via ACR "PAPR Changes for Hotplug RTAS Events".
> 
> This capability is indicated by byte 6, bit 5 of architecture
> option vector 5, and allows for greater control over cpu/memory/pci
> hot plug/unplug operations.
> 
> Existing pseries kernels will utilize this capability based on the
> existence of the /event-sources/hot-plug-events DT property, so we
> only need to advertise it via CAS and do not need a corresponding
> FW_FEATURE_* value to test for.
> 
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: Nathan Fontenot <nfont@linux.vnet.ibm.com>
> Cc: David Gibson <david@gibson.dropbear.id.au>
> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/3dbbaf200f532e01e56168b8339f29

cheers

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

end of thread, other threads:[~2017-02-27 10:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-21  1:12 [PATCH] powerpc/pseries: advertise Hot Plug Event support to firmware Michael Roth
2017-02-21 15:49 ` Nathan Fontenot
2017-02-22  0:58 ` David Gibson
2017-02-27 10:11 ` Michael Ellerman

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.