aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2008-05-09 06:12:06 -0400
committerPaul Mackerras <paulus@samba.org>2008-05-09 06:12:06 -0400
commit2a5f2e3e6cd1ce9fb3f8b186b6bc9aa1f1497a92 (patch)
treeb2306840f227972a7c9d4a2b75e516fe81358ce8 /arch/powerpc/platforms
parent02539d71fa98d5737bb668b02286c76241e4bac9 (diff)
parent78be76476a34a77f0ea9db2f78ba46a2b0fd5ab5 (diff)
Merge branch 'for-2.6.26' of master.kernel.org:/pub/scm/linux/kernel/git/jwboyer/powerpc-4xx into merge
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r--arch/powerpc/platforms/cell/spufs/coredump.c1
-rw-r--r--arch/powerpc/platforms/cell/spufs/sched.c3
-rw-r--r--arch/powerpc/platforms/cell/spufs/sputrace.c3
-rw-r--r--arch/powerpc/platforms/iseries/lpevents.c8
-rw-r--r--arch/powerpc/platforms/iseries/mf.c6
-rw-r--r--arch/powerpc/platforms/iseries/proc.c8
-rw-r--r--arch/powerpc/platforms/iseries/viopath.c7
-rw-r--r--arch/powerpc/platforms/pseries/eeh.c10
-rw-r--r--arch/powerpc/platforms/pseries/reconfig.c7
-rw-r--r--arch/powerpc/platforms/pseries/rtasd.c7
-rw-r--r--arch/powerpc/platforms/pseries/scanlog.c19
11 files changed, 20 insertions, 59 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/coredump.c b/arch/powerpc/platforms/cell/spufs/coredump.c
index b962c3ab470c..af116aadba10 100644
--- a/arch/powerpc/platforms/cell/spufs/coredump.c
+++ b/arch/powerpc/platforms/cell/spufs/coredump.c
@@ -22,6 +22,7 @@
22 22
23#include <linux/elf.h> 23#include <linux/elf.h>
24#include <linux/file.h> 24#include <linux/file.h>
25#include <linux/fdtable.h>
25#include <linux/fs.h> 26#include <linux/fs.h>
26#include <linux/list.h> 27#include <linux/list.h>
27#include <linux/module.h> 28#include <linux/module.h>
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c
index 8a05ac863a27..2e411f23462b 100644
--- a/arch/powerpc/platforms/cell/spufs/sched.c
+++ b/arch/powerpc/platforms/cell/spufs/sched.c
@@ -1068,10 +1068,9 @@ int __init spu_sched_init(void)
1068 1068
1069 mod_timer(&spuloadavg_timer, 0); 1069 mod_timer(&spuloadavg_timer, 0);
1070 1070
1071 entry = create_proc_entry("spu_loadavg", 0, NULL); 1071 entry = proc_create("spu_loadavg", 0, NULL, &spu_loadavg_fops);
1072 if (!entry) 1072 if (!entry)
1073 goto out_stop_kthread; 1073 goto out_stop_kthread;
1074 entry->proc_fops = &spu_loadavg_fops;
1075 1074
1076 pr_debug("spusched: tick: %d, min ticks: %d, default ticks: %d\n", 1075 pr_debug("spusched: tick: %d, min ticks: %d, default ticks: %d\n",
1077 SPUSCHED_TICK, MIN_SPU_TIMESLICE, DEF_SPU_TIMESLICE); 1076 SPUSCHED_TICK, MIN_SPU_TIMESLICE, DEF_SPU_TIMESLICE);
diff --git a/arch/powerpc/platforms/cell/spufs/sputrace.c b/arch/powerpc/platforms/cell/spufs/sputrace.c
index b9c79eda3359..53202422ba72 100644
--- a/arch/powerpc/platforms/cell/spufs/sputrace.c
+++ b/arch/powerpc/platforms/cell/spufs/sputrace.c
@@ -201,10 +201,9 @@ static int __init sputrace_init(void)
201 if (!sputrace_log) 201 if (!sputrace_log)
202 goto out; 202 goto out;
203 203
204 entry = create_proc_entry("sputrace", S_IRUSR, NULL); 204 entry = proc_create("sputrace", S_IRUSR, NULL, &sputrace_fops);
205 if (!entry) 205 if (!entry)
206 goto out_free_log; 206 goto out_free_log;
207 entry->proc_fops = &sputrace_fops;
208 207
209 for (i = 0; i < ARRAY_SIZE(spu_probes); i++) { 208 for (i = 0; i < ARRAY_SIZE(spu_probes); i++) {
210 struct spu_probe *p = &spu_probes[i]; 209 struct spu_probe *p = &spu_probes[i];
diff --git a/arch/powerpc/platforms/iseries/lpevents.c b/arch/powerpc/platforms/iseries/lpevents.c
index e5b40e3e0082..b0f8a857ec02 100644
--- a/arch/powerpc/platforms/iseries/lpevents.c
+++ b/arch/powerpc/platforms/iseries/lpevents.c
@@ -330,15 +330,11 @@ static const struct file_operations proc_lpevents_operations = {
330 330
331static int __init proc_lpevents_init(void) 331static int __init proc_lpevents_init(void)
332{ 332{
333 struct proc_dir_entry *e;
334
335 if (!firmware_has_feature(FW_FEATURE_ISERIES)) 333 if (!firmware_has_feature(FW_FEATURE_ISERIES))
336 return 0; 334 return 0;
337 335
338 e = create_proc_entry("iSeries/lpevents", S_IFREG|S_IRUGO, NULL); 336 proc_create("iSeries/lpevents", S_IFREG|S_IRUGO, NULL,
339 if (e) 337 &proc_lpevents_operations);
340 e->proc_fops = &proc_lpevents_operations;
341
342 return 0; 338 return 0;
343} 339}
344__initcall(proc_lpevents_init); 340__initcall(proc_lpevents_init);
diff --git a/arch/powerpc/platforms/iseries/mf.c b/arch/powerpc/platforms/iseries/mf.c
index c0f2433bc16e..1dc7295746da 100644
--- a/arch/powerpc/platforms/iseries/mf.c
+++ b/arch/powerpc/platforms/iseries/mf.c
@@ -1255,11 +1255,11 @@ static int __init mf_proc_init(void)
1255 if (i == 3) /* no vmlinux entry for 'D' */ 1255 if (i == 3) /* no vmlinux entry for 'D' */
1256 continue; 1256 continue;
1257 1257
1258 ent = create_proc_entry("vmlinux", S_IFREG|S_IWUSR, mf); 1258 ent = proc_create_data("vmlinux", S_IFREG|S_IWUSR, mf,
1259 &proc_vmlinux_operations,
1260 (void *)(long)i);
1259 if (!ent) 1261 if (!ent)
1260 return 1; 1262 return 1;
1261 ent->data = (void *)(long)i;
1262 ent->proc_fops = &proc_vmlinux_operations;
1263 } 1263 }
1264 1264
1265 ent = create_proc_entry("side", S_IFREG|S_IRUSR|S_IWUSR, mf_proc_root); 1265 ent = create_proc_entry("side", S_IFREG|S_IRUSR|S_IWUSR, mf_proc_root);
diff --git a/arch/powerpc/platforms/iseries/proc.c b/arch/powerpc/platforms/iseries/proc.c
index f2cde4180204..91f4c6cd4b99 100644
--- a/arch/powerpc/platforms/iseries/proc.c
+++ b/arch/powerpc/platforms/iseries/proc.c
@@ -110,15 +110,11 @@ static const struct file_operations proc_titantod_operations = {
110 110
111static int __init iseries_proc_init(void) 111static int __init iseries_proc_init(void)
112{ 112{
113 struct proc_dir_entry *e;
114
115 if (!firmware_has_feature(FW_FEATURE_ISERIES)) 113 if (!firmware_has_feature(FW_FEATURE_ISERIES))
116 return 0; 114 return 0;
117 115
118 e = create_proc_entry("iSeries/titanTod", S_IFREG|S_IRUGO, NULL); 116 proc_create("iSeries/titanTod", S_IFREG|S_IRUGO, NULL,
119 if (e) 117 &proc_titantod_operations);
120 e->proc_fops = &proc_titantod_operations;
121
122 return 0; 118 return 0;
123} 119}
124__initcall(iseries_proc_init); 120__initcall(iseries_proc_init);
diff --git a/arch/powerpc/platforms/iseries/viopath.c b/arch/powerpc/platforms/iseries/viopath.c
index df23331eb25c..49ff4dc422b7 100644
--- a/arch/powerpc/platforms/iseries/viopath.c
+++ b/arch/powerpc/platforms/iseries/viopath.c
@@ -180,15 +180,10 @@ static const struct file_operations proc_viopath_operations = {
180 180
181static int __init vio_proc_init(void) 181static int __init vio_proc_init(void)
182{ 182{
183 struct proc_dir_entry *e;
184
185 if (!firmware_has_feature(FW_FEATURE_ISERIES)) 183 if (!firmware_has_feature(FW_FEATURE_ISERIES))
186 return 0; 184 return 0;
187 185
188 e = create_proc_entry("iSeries/config", 0, NULL); 186 proc_create("iSeries/config", 0, NULL, &proc_viopath_operations);
189 if (e)
190 e->proc_fops = &proc_viopath_operations;
191
192 return 0; 187 return 0;
193} 188}
194__initcall(vio_proc_init); 189__initcall(vio_proc_init);
diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c
index a3fd56b186e6..6f544ba4b37f 100644
--- a/arch/powerpc/platforms/pseries/eeh.c
+++ b/arch/powerpc/platforms/pseries/eeh.c
@@ -1259,14 +1259,8 @@ static const struct file_operations proc_eeh_operations = {
1259 1259
1260static int __init eeh_init_proc(void) 1260static int __init eeh_init_proc(void)
1261{ 1261{
1262 struct proc_dir_entry *e; 1262 if (machine_is(pseries))
1263 1263 proc_create("ppc64/eeh", 0, NULL, &proc_eeh_operations);
1264 if (machine_is(pseries)) {
1265 e = create_proc_entry("ppc64/eeh", 0, NULL);
1266 if (e)
1267 e->proc_fops = &proc_eeh_operations;
1268 }
1269
1270 return 0; 1264 return 0;
1271} 1265}
1272__initcall(eeh_init_proc); 1266__initcall(eeh_init_proc);
diff --git a/arch/powerpc/platforms/pseries/reconfig.c b/arch/powerpc/platforms/pseries/reconfig.c
index ac75c10de278..75769aae41d5 100644
--- a/arch/powerpc/platforms/pseries/reconfig.c
+++ b/arch/powerpc/platforms/pseries/reconfig.c
@@ -512,12 +512,9 @@ static int proc_ppc64_create_ofdt(void)
512 if (!machine_is(pseries)) 512 if (!machine_is(pseries))
513 return 0; 513 return 0;
514 514
515 ent = create_proc_entry("ppc64/ofdt", S_IWUSR, NULL); 515 ent = proc_create("ppc64/ofdt", S_IWUSR, NULL, &ofdt_fops);
516 if (ent) { 516 if (ent)
517 ent->data = NULL;
518 ent->size = 0; 517 ent->size = 0;
519 ent->proc_fops = &ofdt_fops;
520 }
521 518
522 return 0; 519 return 0;
523} 520}
diff --git a/arch/powerpc/platforms/pseries/rtasd.c b/arch/powerpc/platforms/pseries/rtasd.c
index befadd4f9524..7d3e2b0bd4d2 100644
--- a/arch/powerpc/platforms/pseries/rtasd.c
+++ b/arch/powerpc/platforms/pseries/rtasd.c
@@ -468,10 +468,9 @@ static int __init rtas_init(void)
468 return -ENOMEM; 468 return -ENOMEM;
469 } 469 }
470 470
471 entry = create_proc_entry("ppc64/rtas/error_log", S_IRUSR, NULL); 471 entry = proc_create("ppc64/rtas/error_log", S_IRUSR, NULL,
472 if (entry) 472 &proc_rtas_log_operations);
473 entry->proc_fops = &proc_rtas_log_operations; 473 if (!entry)
474 else
475 printk(KERN_ERR "Failed to create error_log proc entry\n"); 474 printk(KERN_ERR "Failed to create error_log proc entry\n");
476 475
477 if (kernel_thread(rtasd, NULL, CLONE_FS) < 0) 476 if (kernel_thread(rtasd, NULL, CLONE_FS) < 0)
diff --git a/arch/powerpc/platforms/pseries/scanlog.c b/arch/powerpc/platforms/pseries/scanlog.c
index bec3803f0618..417eca79df69 100644
--- a/arch/powerpc/platforms/pseries/scanlog.c
+++ b/arch/powerpc/platforms/pseries/scanlog.c
@@ -55,11 +55,6 @@ static ssize_t scanlog_read(struct file *file, char __user *buf,
55 dp = PDE(inode); 55 dp = PDE(inode);
56 data = (unsigned int *)dp->data; 56 data = (unsigned int *)dp->data;
57 57
58 if (!data) {
59 printk(KERN_ERR "scanlog: read failed no data\n");
60 return -EIO;
61 }
62
63 if (count > RTAS_DATA_BUF_SIZE) 58 if (count > RTAS_DATA_BUF_SIZE)
64 count = RTAS_DATA_BUF_SIZE; 59 count = RTAS_DATA_BUF_SIZE;
65 60
@@ -146,11 +141,6 @@ static int scanlog_open(struct inode * inode, struct file * file)
146 struct proc_dir_entry *dp = PDE(inode); 141 struct proc_dir_entry *dp = PDE(inode);
147 unsigned int *data = (unsigned int *)dp->data; 142 unsigned int *data = (unsigned int *)dp->data;
148 143
149 if (!data) {
150 printk(KERN_ERR "scanlog: open failed no data\n");
151 return -EIO;
152 }
153
154 if (data[0] != 0) { 144 if (data[0] != 0) {
155 /* This imperfect test stops a second copy of the 145 /* This imperfect test stops a second copy of the
156 * data (or a reset while data is being copied) 146 * data (or a reset while data is being copied)
@@ -168,10 +158,6 @@ static int scanlog_release(struct inode * inode, struct file * file)
168 struct proc_dir_entry *dp = PDE(inode); 158 struct proc_dir_entry *dp = PDE(inode);
169 unsigned int *data = (unsigned int *)dp->data; 159 unsigned int *data = (unsigned int *)dp->data;
170 160
171 if (!data) {
172 printk(KERN_ERR "scanlog: release failed no data\n");
173 return -EIO;
174 }
175 data[0] = 0; 161 data[0] = 0;
176 162
177 return 0; 163 return 0;
@@ -200,12 +186,11 @@ static int __init scanlog_init(void)
200 if (!data) 186 if (!data)
201 goto err; 187 goto err;
202 188
203 ent = proc_create("ppc64/rtas/scan-log-dump", S_IRUSR, NULL, 189 ent = proc_create_data("ppc64/rtas/scan-log-dump", S_IRUSR, NULL,
204 &scanlog_fops); 190 &scanlog_fops, data);
205 if (!ent) 191 if (!ent)
206 goto err; 192 goto err;
207 193
208 ent->data = data;
209 proc_ppc64_scan_log_dump = ent; 194 proc_ppc64_scan_log_dump = ent;
210 195
211 return 0; 196 return 0;