aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc64')
-rw-r--r--arch/sparc64/kernel/sysfs.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/arch/sparc64/kernel/sysfs.c b/arch/sparc64/kernel/sysfs.c
index e885034a6b73..84e5ce146713 100644
--- a/arch/sparc64/kernel/sysfs.c
+++ b/arch/sparc64/kernel/sysfs.c
@@ -14,7 +14,8 @@
14static DEFINE_PER_CPU(struct hv_mmu_statistics, mmu_stats) __attribute__((aligned(64))); 14static DEFINE_PER_CPU(struct hv_mmu_statistics, mmu_stats) __attribute__((aligned(64)));
15 15
16#define SHOW_MMUSTAT_ULONG(NAME) \ 16#define SHOW_MMUSTAT_ULONG(NAME) \
17static ssize_t show_##NAME(struct sys_device *dev, char *buf) \ 17static ssize_t show_##NAME(struct sys_device *dev, \
18 struct sysdev_attribute *attr, char *buf) \
18{ \ 19{ \
19 struct hv_mmu_statistics *p = &per_cpu(mmu_stats, dev->id); \ 20 struct hv_mmu_statistics *p = &per_cpu(mmu_stats, dev->id); \
20 return sprintf(buf, "%lu\n", p->NAME); \ 21 return sprintf(buf, "%lu\n", p->NAME); \
@@ -135,13 +136,16 @@ static unsigned long write_mmustat_enable(unsigned long val)
135 return sun4v_mmustat_conf(ra, &orig_ra); 136 return sun4v_mmustat_conf(ra, &orig_ra);
136} 137}
137 138
138static ssize_t show_mmustat_enable(struct sys_device *s, char *buf) 139static ssize_t show_mmustat_enable(struct sys_device *s,
140 struct sysdev_attribute *attr, char *buf)
139{ 141{
140 unsigned long val = run_on_cpu(s->id, read_mmustat_enable, 0); 142 unsigned long val = run_on_cpu(s->id, read_mmustat_enable, 0);
141 return sprintf(buf, "%lx\n", val); 143 return sprintf(buf, "%lx\n", val);
142} 144}
143 145
144static ssize_t store_mmustat_enable(struct sys_device *s, const char *buf, size_t count) 146static ssize_t store_mmustat_enable(struct sys_device *s,
147 struct sysdev_attribute *attr, const char *buf,
148 size_t count)
145{ 149{
146 unsigned long val, err; 150 unsigned long val, err;
147 int ret = sscanf(buf, "%ld", &val); 151 int ret = sscanf(buf, "%ld", &val);
@@ -179,14 +183,16 @@ static void unregister_mmu_stats(struct sys_device *s)
179#endif 183#endif
180 184
181#define SHOW_CPUDATA_ULONG_NAME(NAME, MEMBER) \ 185#define SHOW_CPUDATA_ULONG_NAME(NAME, MEMBER) \
182static ssize_t show_##NAME(struct sys_device *dev, char *buf) \ 186static ssize_t show_##NAME(struct sys_device *dev, \
187 struct sysdev_attribute *attr, char *buf) \
183{ \ 188{ \
184 cpuinfo_sparc *c = &cpu_data(dev->id); \ 189 cpuinfo_sparc *c = &cpu_data(dev->id); \
185 return sprintf(buf, "%lu\n", c->MEMBER); \ 190 return sprintf(buf, "%lu\n", c->MEMBER); \
186} 191}
187 192
188#define SHOW_CPUDATA_UINT_NAME(NAME, MEMBER) \ 193#define SHOW_CPUDATA_UINT_NAME(NAME, MEMBER) \
189static ssize_t show_##NAME(struct sys_device *dev, char *buf) \ 194static ssize_t show_##NAME(struct sys_device *dev, \
195 struct sysdev_attribute *attr, char *buf) \
190{ \ 196{ \
191 cpuinfo_sparc *c = &cpu_data(dev->id); \ 197 cpuinfo_sparc *c = &cpu_data(dev->id); \
192 return sprintf(buf, "%u\n", c->MEMBER); \ 198 return sprintf(buf, "%u\n", c->MEMBER); \