]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
powerpc/pseries: Report DLPAR capabilities
authorNathan Fontenot <nfont@linux.vnet.ibm.com>
Wed, 11 Jan 2017 17:00:58 +0000 (12:00 -0500)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 2 Feb 2017 09:36:58 +0000 (20:36 +1100)
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>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/pseries/dlpar.c

index 5cb2e4beffc513b910bb8a67c79e937b3d02ed4b..d3a81e746fc48c3d06b30728cc2c4164487f1b85 100644 (file)
@@ -551,7 +551,13 @@ dlpar_store_out:
        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)
 {