Skip to contentSkip to conversation

powerpc/powernv: Enable reading and updating of system parameters

DISCUSSION Dave Jones 1 participant 1 message Apr 3, 2014 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Dave Jones

author
#1 lore raw
Quoted 13 lines · Linux Kernel
Gitweb:     http://git.kernel.org/linus/;a=commit;h=4029cd66545f0a45258eda5313b7559bfeaaaae4
Commit:     4029cd66545f0a45258eda5313b7559bfeaaaae4
Parent:     8d724823220862ce289be3b50119235e03537597
Author:     Neelesh Gupta <[email protected]>
AuthorDate: Fri Mar 7 11:02:09 2014 +0530
Committer:  Benjamin Herrenschmidt <[email protected]>
CommitDate: Mon Mar 24 09:47:30 2014 +1100

powerpc/powernv: Enable reading and updating of system parameters

This patch enables reading and updating of system parameters through OPAL call.

...

Review

Quoted 13 lines
(quoted diff) +13 -0
+		/* If the parameter is read-only or read-write */
+		switch (perm[i] & 3) {
+		case OPAL_SYSPARAM_READ:
+			attr[i].kobj_attr.attr.mode = S_IRUGO;
+			break;
+		case OPAL_SYSPARAM_WRITE:
+			attr[i].kobj_attr.attr.mode = S_IWUGO;
+			break;
+		case OPAL_SYSPARAM_RW:
+			attr[i].kobj_attr.attr.mode = S_IRUGO | S_IWUGO;
+			break;
+		default:
+			break;

Is world-writable really appropriate for this ?

Dave