All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] powerpc/pseries: Report DLPAR capabilities
@ 2017-01-11 17:00 Nathan Fontenot
  2017-02-02 11:45 ` Michael Ellerman
  0 siblings, 1 reply; 2+ messages in thread
From: Nathan Fontenot @ 2017-01-11 17:00 UTC (permalink / raw)
  To: linuxppc-dev

As we add the ability to do DLPAR of additional devices through
the sysfs interface we need to know which devices are supported.
This adds the reporting of supported devices with a comma separated
list reported in the existing /sys/kernel/dlpar.

Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
---
 arch/powerpc/platforms/pseries/dlpar.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/platforms/pseries/dlpar.c b/arch/powerpc/platforms/pseries/dlpar.c
index 76caa4a..1152590 100644
--- a/arch/powerpc/platforms/pseries/dlpar.c
+++ b/arch/powerpc/platforms/pseries/dlpar.c
@@ -551,7 +551,13 @@ static ssize_t dlpar_store(struct class *class, struct class_attribute *attr,
 	return rc ? rc : count;
 }
 
-static CLASS_ATTR(dlpar, S_IWUSR, NULL, dlpar_store);
+static ssize_t dlpar_show(struct class *class, struct class_attribute *attr,
+			  char *buf)
+{
+	return sprintf(buf, "%s\n", "memory,cpu");
+}
+
+static CLASS_ATTR(dlpar, S_IWUSR | S_IRUSR, dlpar_show, dlpar_store);
 
 static int __init pseries_dlpar_init(void)
 {

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

* Re: powerpc/pseries: Report DLPAR capabilities
  2017-01-11 17:00 [PATCH] powerpc/pseries: Report DLPAR capabilities Nathan Fontenot
@ 2017-02-02 11:45 ` Michael Ellerman
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2017-02-02 11:45 UTC (permalink / raw)
  To: Nathan Fontenot, linuxppc-dev

On Wed, 2017-01-11 at 17:00:58 UTC, Nathan Fontenot wrote:
> As we add the ability to do DLPAR of additional devices through
> the sysfs interface we need to know which devices are supported.
> This adds the reporting of supported devices with a comma separated
> list reported in the existing /sys/kernel/dlpar.
> 
> Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/673bc4354d42731018494bb69d63b6

cheers

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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-11 17:00 [PATCH] powerpc/pseries: Report DLPAR capabilities Nathan Fontenot
2017-02-02 11:45 ` 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.