aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/Kconfig4
-rw-r--r--arch/powerpc/configs/ps3_defconfig29
-rw-r--r--arch/powerpc/kernel/legacy_serial.c2
-rw-r--r--arch/powerpc/kernel/lparcfg.c2
-rw-r--r--arch/powerpc/kernel/nvram_64.c2
-rw-r--r--arch/powerpc/kernel/proc_ppc64.c3
-rw-r--r--arch/powerpc/kernel/prom.c2
-rw-r--r--arch/powerpc/kernel/rtas-proc.c14
-rw-r--r--arch/powerpc/kernel/rtas_flash.c9
-rw-r--r--arch/powerpc/kernel/sys_ppc32.c67
-rw-r--r--arch/powerpc/kernel/udbg.c2
-rw-r--r--arch/powerpc/kernel/vmlinux.lds.S4
-rw-r--r--arch/powerpc/platforms/cell/spufs/file.c40
-rw-r--r--arch/powerpc/platforms/cell/spufs/inode.c6
-rw-r--r--arch/powerpc/platforms/cell/spufs/spufs.h2
-rw-r--r--arch/powerpc/platforms/iseries/lpevents.c2
-rw-r--r--arch/powerpc/platforms/iseries/mf.c6
-rw-r--r--arch/powerpc/platforms/iseries/proc.c2
-rw-r--r--arch/powerpc/platforms/iseries/viopath.c2
-rw-r--r--arch/powerpc/platforms/powermac/setup.c4
-rw-r--r--arch/powerpc/platforms/ps3/Kconfig11
-rw-r--r--arch/powerpc/platforms/ps3/htab.c6
-rw-r--r--arch/powerpc/platforms/ps3/setup.c42
-rw-r--r--arch/powerpc/platforms/pseries/eeh.c2
-rw-r--r--arch/powerpc/platforms/pseries/hvCall_inst.c2
-rw-r--r--arch/powerpc/platforms/pseries/reconfig.c3
-rw-r--r--arch/powerpc/platforms/pseries/rtasd.c2
-rw-r--r--arch/powerpc/platforms/pseries/scanlog.c2
28 files changed, 144 insertions, 130 deletions
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index f08e80a0bf0a..0088c5ebca78 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -977,6 +977,10 @@ config ISA
977 have an IBM RS/6000 or pSeries machine or a PReP machine, say Y. If 977 have an IBM RS/6000 or pSeries machine or a PReP machine, say Y. If
978 you have an embedded board, consult your board documentation. 978 you have an embedded board, consult your board documentation.
979 979
980config ZONE_DMA
981 bool
982 default y
983
980config GENERIC_ISA_DMA 984config GENERIC_ISA_DMA
981 bool 985 bool
982 depends on PPC64 || POWER4 || 6xx && !CPM2 986 depends on PPC64 || POWER4 || 6xx && !CPM2
diff --git a/arch/powerpc/configs/ps3_defconfig b/arch/powerpc/configs/ps3_defconfig
index ec644b34a082..0345a2ceec59 100644
--- a/arch/powerpc/configs/ps3_defconfig
+++ b/arch/powerpc/configs/ps3_defconfig
@@ -163,6 +163,7 @@ CONFIG_PS3_HTAB_SIZE=20
163# CONFIG_PS3_DYNAMIC_DMA is not set 163# CONFIG_PS3_DYNAMIC_DMA is not set
164CONFIG_PS3_USE_LPAR_ADDR=y 164CONFIG_PS3_USE_LPAR_ADDR=y
165CONFIG_PS3_VUART=y 165CONFIG_PS3_VUART=y
166CONFIG_PS3_PS3AV=y
166 167
167# 168#
168# Kernel options 169# Kernel options
@@ -611,14 +612,40 @@ CONFIG_GEN_RTC=y
611# Graphics support 612# Graphics support
612# 613#
613# CONFIG_FIRMWARE_EDID is not set 614# CONFIG_FIRMWARE_EDID is not set
614# CONFIG_FB is not set 615CONFIG_FB=y
616CONFIG_FB_CFB_FILLRECT=y
617CONFIG_FB_CFB_COPYAREA=y
618CONFIG_FB_CFB_IMAGEBLIT=y
619# CONFIG_FB_MACMODES is not set
620# CONFIG_FB_BACKLIGHT is not set
621# CONFIG_FB_MODE_HELPERS is not set
622# CONFIG_FB_TILEBLITTING is not set
623# CONFIG_FB_OF is not set
624# CONFIG_FB_VGA16 is not set
625# CONFIG_FB_S1D13XXX is not set
615# CONFIG_FB_IBM_GXT4500 is not set 626# CONFIG_FB_IBM_GXT4500 is not set
627CONFIG_FB_PS3=y
628CONFIG_FB_PS3_DEFAULT_SIZE_M=18
629# CONFIG_FB_VIRTUAL is not set
616 630
617# 631#
618# Console display driver support 632# Console display driver support
619# 633#
620# CONFIG_VGA_CONSOLE is not set 634# CONFIG_VGA_CONSOLE is not set
621CONFIG_DUMMY_CONSOLE=y 635CONFIG_DUMMY_CONSOLE=y
636CONFIG_FRAMEBUFFER_CONSOLE=y
637# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
638# CONFIG_FONTS is not set
639CONFIG_FONT_8x8=y
640CONFIG_FONT_8x16=y
641
642#
643# Logo configuration
644#
645CONFIG_LOGO=y
646# CONFIG_LOGO_LINUX_MONO is not set
647# CONFIG_LOGO_LINUX_VGA16 is not set
648CONFIG_LOGO_LINUX_CLUT224=y
622# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 649# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
623 650
624# 651#
diff --git a/arch/powerpc/kernel/legacy_serial.c b/arch/powerpc/kernel/legacy_serial.c
index 5e6ddfa474c0..89f46f377922 100644
--- a/arch/powerpc/kernel/legacy_serial.c
+++ b/arch/powerpc/kernel/legacy_serial.c
@@ -498,7 +498,7 @@ static int __init check_legacy_serial_console(void)
498 DBG(" -> check_legacy_serial_console()\n"); 498 DBG(" -> check_legacy_serial_console()\n");
499 499
500 /* The user has requested a console so this is already set up. */ 500 /* The user has requested a console so this is already set up. */
501 if (strstr(saved_command_line, "console=")) { 501 if (strstr(boot_command_line, "console=")) {
502 DBG(" console was specified !\n"); 502 DBG(" console was specified !\n");
503 return -EBUSY; 503 return -EBUSY;
504 } 504 }
diff --git a/arch/powerpc/kernel/lparcfg.c b/arch/powerpc/kernel/lparcfg.c
index 0de5a08cf9b0..89486b631284 100644
--- a/arch/powerpc/kernel/lparcfg.c
+++ b/arch/powerpc/kernel/lparcfg.c
@@ -571,7 +571,7 @@ static int lparcfg_open(struct inode *inode, struct file *file)
571 return single_open(file, lparcfg_data, NULL); 571 return single_open(file, lparcfg_data, NULL);
572} 572}
573 573
574struct file_operations lparcfg_fops = { 574const struct file_operations lparcfg_fops = {
575 .owner = THIS_MODULE, 575 .owner = THIS_MODULE,
576 .read = seq_read, 576 .read = seq_read,
577 .write = lparcfg_write, 577 .write = lparcfg_write,
diff --git a/arch/powerpc/kernel/nvram_64.c b/arch/powerpc/kernel/nvram_64.c
index 869cebbba967..f9676f52c6d8 100644
--- a/arch/powerpc/kernel/nvram_64.c
+++ b/arch/powerpc/kernel/nvram_64.c
@@ -179,7 +179,7 @@ static int dev_nvram_ioctl(struct inode *inode, struct file *file,
179 } 179 }
180} 180}
181 181
182struct file_operations nvram_fops = { 182const struct file_operations nvram_fops = {
183 .owner = THIS_MODULE, 183 .owner = THIS_MODULE,
184 .llseek = dev_nvram_llseek, 184 .llseek = dev_nvram_llseek,
185 .read = dev_nvram_read, 185 .read = dev_nvram_read,
diff --git a/arch/powerpc/kernel/proc_ppc64.c b/arch/powerpc/kernel/proc_ppc64.c
index dd7001cacf75..f78dfce1b771 100644
--- a/arch/powerpc/kernel/proc_ppc64.c
+++ b/arch/powerpc/kernel/proc_ppc64.c
@@ -33,7 +33,7 @@ static ssize_t page_map_read( struct file *file, char __user *buf, size_t nbytes
33 loff_t *ppos); 33 loff_t *ppos);
34static int page_map_mmap( struct file *file, struct vm_area_struct *vma ); 34static int page_map_mmap( struct file *file, struct vm_area_struct *vma );
35 35
36static struct file_operations page_map_fops = { 36static const struct file_operations page_map_fops = {
37 .llseek = page_map_seek, 37 .llseek = page_map_seek,
38 .read = page_map_read, 38 .read = page_map_read,
39 .mmap = page_map_mmap 39 .mmap = page_map_mmap
@@ -71,7 +71,6 @@ static int __init proc_ppc64_init(void)
71 pde = create_proc_entry("ppc64/systemcfg", S_IFREG|S_IRUGO, NULL); 71 pde = create_proc_entry("ppc64/systemcfg", S_IFREG|S_IRUGO, NULL);
72 if (!pde) 72 if (!pde)
73 return 1; 73 return 1;
74 pde->nlink = 1;
75 pde->data = vdso_data; 74 pde->data = vdso_data;
76 pde->size = PAGE_SIZE; 75 pde->size = PAGE_SIZE;
77 pde->proc_fops = &page_map_fops; 76 pde->proc_fops = &page_map_fops;
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index 3be52d693eca..3e86e6e0f778 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -991,7 +991,7 @@ void __init early_init_devtree(void *params)
991 of_scan_flat_dt(early_init_dt_scan_memory, NULL); 991 of_scan_flat_dt(early_init_dt_scan_memory, NULL);
992 992
993 /* Save command line for /proc/cmdline and then parse parameters */ 993 /* Save command line for /proc/cmdline and then parse parameters */
994 strlcpy(saved_command_line, cmd_line, COMMAND_LINE_SIZE); 994 strlcpy(boot_command_line, cmd_line, COMMAND_LINE_SIZE);
995 parse_early_param(); 995 parse_early_param();
996 996
997 /* Reserve LMB regions used by kernel, initrd, dt, etc... */ 997 /* Reserve LMB regions used by kernel, initrd, dt, etc... */
diff --git a/arch/powerpc/kernel/rtas-proc.c b/arch/powerpc/kernel/rtas-proc.c
index 2fe82abf1c52..6cbf2ae5d7aa 100644
--- a/arch/powerpc/kernel/rtas-proc.c
+++ b/arch/powerpc/kernel/rtas-proc.c
@@ -160,7 +160,7 @@ static int sensors_open(struct inode *inode, struct file *file)
160 return single_open(file, ppc_rtas_sensors_show, NULL); 160 return single_open(file, ppc_rtas_sensors_show, NULL);
161} 161}
162 162
163struct file_operations ppc_rtas_sensors_operations = { 163const struct file_operations ppc_rtas_sensors_operations = {
164 .open = sensors_open, 164 .open = sensors_open,
165 .read = seq_read, 165 .read = seq_read,
166 .llseek = seq_lseek, 166 .llseek = seq_lseek,
@@ -172,7 +172,7 @@ static int poweron_open(struct inode *inode, struct file *file)
172 return single_open(file, ppc_rtas_poweron_show, NULL); 172 return single_open(file, ppc_rtas_poweron_show, NULL);
173} 173}
174 174
175struct file_operations ppc_rtas_poweron_operations = { 175const struct file_operations ppc_rtas_poweron_operations = {
176 .open = poweron_open, 176 .open = poweron_open,
177 .read = seq_read, 177 .read = seq_read,
178 .llseek = seq_lseek, 178 .llseek = seq_lseek,
@@ -185,7 +185,7 @@ static int progress_open(struct inode *inode, struct file *file)
185 return single_open(file, ppc_rtas_progress_show, NULL); 185 return single_open(file, ppc_rtas_progress_show, NULL);
186} 186}
187 187
188struct file_operations ppc_rtas_progress_operations = { 188const struct file_operations ppc_rtas_progress_operations = {
189 .open = progress_open, 189 .open = progress_open,
190 .read = seq_read, 190 .read = seq_read,
191 .llseek = seq_lseek, 191 .llseek = seq_lseek,
@@ -198,7 +198,7 @@ static int clock_open(struct inode *inode, struct file *file)
198 return single_open(file, ppc_rtas_clock_show, NULL); 198 return single_open(file, ppc_rtas_clock_show, NULL);
199} 199}
200 200
201struct file_operations ppc_rtas_clock_operations = { 201const struct file_operations ppc_rtas_clock_operations = {
202 .open = clock_open, 202 .open = clock_open,
203 .read = seq_read, 203 .read = seq_read,
204 .llseek = seq_lseek, 204 .llseek = seq_lseek,
@@ -211,7 +211,7 @@ static int tone_freq_open(struct inode *inode, struct file *file)
211 return single_open(file, ppc_rtas_tone_freq_show, NULL); 211 return single_open(file, ppc_rtas_tone_freq_show, NULL);
212} 212}
213 213
214struct file_operations ppc_rtas_tone_freq_operations = { 214const struct file_operations ppc_rtas_tone_freq_operations = {
215 .open = tone_freq_open, 215 .open = tone_freq_open,
216 .read = seq_read, 216 .read = seq_read,
217 .llseek = seq_lseek, 217 .llseek = seq_lseek,
@@ -224,7 +224,7 @@ static int tone_volume_open(struct inode *inode, struct file *file)
224 return single_open(file, ppc_rtas_tone_volume_show, NULL); 224 return single_open(file, ppc_rtas_tone_volume_show, NULL);
225} 225}
226 226
227struct file_operations ppc_rtas_tone_volume_operations = { 227const struct file_operations ppc_rtas_tone_volume_operations = {
228 .open = tone_volume_open, 228 .open = tone_volume_open,
229 .read = seq_read, 229 .read = seq_read,
230 .llseek = seq_lseek, 230 .llseek = seq_lseek,
@@ -237,7 +237,7 @@ static int rmo_buf_open(struct inode *inode, struct file *file)
237 return single_open(file, ppc_rtas_rmo_buf_show, NULL); 237 return single_open(file, ppc_rtas_rmo_buf_show, NULL);
238} 238}
239 239
240struct file_operations ppc_rtas_rmo_buf_ops = { 240const struct file_operations ppc_rtas_rmo_buf_ops = {
241 .open = rmo_buf_open, 241 .open = rmo_buf_open,
242 .read = seq_read, 242 .read = seq_read,
243 .llseek = seq_lseek, 243 .llseek = seq_lseek,
diff --git a/arch/powerpc/kernel/rtas_flash.c b/arch/powerpc/kernel/rtas_flash.c
index 0c4fcd34bfe5..f72118c0844f 100644
--- a/arch/powerpc/kernel/rtas_flash.c
+++ b/arch/powerpc/kernel/rtas_flash.c
@@ -702,13 +702,12 @@ static int initialize_flash_pde_data(const char *rtas_call_name,
702} 702}
703 703
704static struct proc_dir_entry *create_flash_pde(const char *filename, 704static struct proc_dir_entry *create_flash_pde(const char *filename,
705 struct file_operations *fops) 705 const struct file_operations *fops)
706{ 706{
707 struct proc_dir_entry *ent = NULL; 707 struct proc_dir_entry *ent = NULL;
708 708
709 ent = create_proc_entry(filename, S_IRUSR | S_IWUSR, NULL); 709 ent = create_proc_entry(filename, S_IRUSR | S_IWUSR, NULL);
710 if (ent != NULL) { 710 if (ent != NULL) {
711 ent->nlink = 1;
712 ent->proc_fops = fops; 711 ent->proc_fops = fops;
713 ent->owner = THIS_MODULE; 712 ent->owner = THIS_MODULE;
714 } 713 }
@@ -716,21 +715,21 @@ static struct proc_dir_entry *create_flash_pde(const char *filename,
716 return ent; 715 return ent;
717} 716}
718 717
719static struct file_operations rtas_flash_operations = { 718static const struct file_operations rtas_flash_operations = {
720 .read = rtas_flash_read, 719 .read = rtas_flash_read,
721 .write = rtas_flash_write, 720 .write = rtas_flash_write,
722 .open = rtas_excl_open, 721 .open = rtas_excl_open,
723 .release = rtas_flash_release, 722 .release = rtas_flash_release,
724}; 723};
725 724
726static struct file_operations manage_flash_operations = { 725static const struct file_operations manage_flash_operations = {
727 .read = manage_flash_read, 726 .read = manage_flash_read,
728 .write = manage_flash_write, 727 .write = manage_flash_write,
729 .open = rtas_excl_open, 728 .open = rtas_excl_open,
730 .release = rtas_excl_release, 729 .release = rtas_excl_release,
731}; 730};
732 731
733static struct file_operations validate_flash_operations = { 732static const struct file_operations validate_flash_operations = {
734 .read = validate_flash_read, 733 .read = validate_flash_read,
735 .write = validate_flash_write, 734 .write = validate_flash_write,
736 .open = rtas_excl_open, 735 .open = rtas_excl_open,
diff --git a/arch/powerpc/kernel/sys_ppc32.c b/arch/powerpc/kernel/sys_ppc32.c
index 03a2a2f30d66..673e8d9df7f5 100644
--- a/arch/powerpc/kernel/sys_ppc32.c
+++ b/arch/powerpc/kernel/sys_ppc32.c
@@ -198,73 +198,6 @@ static inline long put_tv32(struct compat_timeval __user *o, struct timeval *i)
198 __put_user(i->tv_usec, &o->tv_usec))); 198 __put_user(i->tv_usec, &o->tv_usec)));
199} 199}
200 200
201struct sysinfo32 {
202 s32 uptime;
203 u32 loads[3];
204 u32 totalram;
205 u32 freeram;
206 u32 sharedram;
207 u32 bufferram;
208 u32 totalswap;
209 u32 freeswap;
210 unsigned short procs;
211 unsigned short pad;
212 u32 totalhigh;
213 u32 freehigh;
214 u32 mem_unit;
215 char _f[20-2*sizeof(int)-sizeof(int)];
216};
217
218asmlinkage long compat_sys_sysinfo(struct sysinfo32 __user *info)
219{
220 struct sysinfo s;
221 int ret, err;
222 int bitcount=0;
223 mm_segment_t old_fs = get_fs ();
224
225 /* The __user cast is valid due to set_fs() */
226 set_fs (KERNEL_DS);
227 ret = sys_sysinfo((struct sysinfo __user *)&s);
228 set_fs (old_fs);
229
230 /* Check to see if any memory value is too large for 32-bit and
231 * scale down if needed.
232 */
233 if ((s.totalram >> 32) || (s.totalswap >> 32)) {
234 while (s.mem_unit < PAGE_SIZE) {
235 s.mem_unit <<= 1;
236 bitcount++;
237 }
238 s.totalram >>=bitcount;
239 s.freeram >>= bitcount;
240 s.sharedram >>= bitcount;
241 s.bufferram >>= bitcount;
242 s.totalswap >>= bitcount;
243 s.freeswap >>= bitcount;
244 s.totalhigh >>= bitcount;
245 s.freehigh >>= bitcount;
246 }
247
248 err = put_user (s.uptime, &info->uptime);
249 err |= __put_user (s.loads[0], &info->loads[0]);
250 err |= __put_user (s.loads[1], &info->loads[1]);
251 err |= __put_user (s.loads[2], &info->loads[2]);
252 err |= __put_user (s.totalram, &info->totalram);
253 err |= __put_user (s.freeram, &info->freeram);
254 err |= __put_user (s.sharedram, &info->sharedram);
255 err |= __put_user (s.bufferram, &info->bufferram);
256 err |= __put_user (s.totalswap, &info->totalswap);
257 err |= __put_user (s.freeswap, &info->freeswap);
258 err |= __put_user (s.procs, &info->procs);
259 err |= __put_user (s.totalhigh, &info->totalhigh);
260 err |= __put_user (s.freehigh, &info->freehigh);
261 err |= __put_user (s.mem_unit, &info->mem_unit);
262 if (err)
263 return -EFAULT;
264
265 return ret;
266}
267
268 201
269 202
270 203
diff --git a/arch/powerpc/kernel/udbg.c b/arch/powerpc/kernel/udbg.c
index 8f5afdbad0d5..194a93eeb3e7 100644
--- a/arch/powerpc/kernel/udbg.c
+++ b/arch/powerpc/kernel/udbg.c
@@ -150,7 +150,7 @@ void __init disable_early_printk(void)
150{ 150{
151 if (!early_console_initialized) 151 if (!early_console_initialized)
152 return; 152 return;
153 if (strstr(saved_command_line, "udbg-immortal")) { 153 if (strstr(boot_command_line, "udbg-immortal")) {
154 printk(KERN_INFO "early console immortal !\n"); 154 printk(KERN_INFO "early console immortal !\n");
155 return; 155 return;
156 } 156 }
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S
index 04b8e71bf5b0..7eefeb4a30e7 100644
--- a/arch/powerpc/kernel/vmlinux.lds.S
+++ b/arch/powerpc/kernel/vmlinux.lds.S
@@ -131,14 +131,14 @@ SECTIONS
131 __stop___fw_ftr_fixup = .; 131 __stop___fw_ftr_fixup = .;
132 } 132 }
133#endif 133#endif
134 134#ifdef CONFIG_BLK_DEV_INITRD
135 . = ALIGN(PAGE_SIZE); 135 . = ALIGN(PAGE_SIZE);
136 .init.ramfs : { 136 .init.ramfs : {
137 __initramfs_start = .; 137 __initramfs_start = .;
138 *(.init.ramfs) 138 *(.init.ramfs)
139 __initramfs_end = .; 139 __initramfs_end = .;
140 } 140 }
141 141#endif
142#ifdef CONFIG_PPC32 142#ifdef CONFIG_PPC32
143 . = ALIGN(32); 143 . = ALIGN(32);
144#else 144#else
diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c
index 347eff56fcbd..af9e9455a706 100644
--- a/arch/powerpc/platforms/cell/spufs/file.c
+++ b/arch/powerpc/platforms/cell/spufs/file.c
@@ -144,7 +144,7 @@ spufs_mem_mmap(struct file *file, struct vm_area_struct *vma)
144 return 0; 144 return 0;
145} 145}
146 146
147static struct file_operations spufs_mem_fops = { 147static const struct file_operations spufs_mem_fops = {
148 .open = spufs_mem_open, 148 .open = spufs_mem_open,
149 .read = spufs_mem_read, 149 .read = spufs_mem_read,
150 .write = spufs_mem_write, 150 .write = spufs_mem_write,
@@ -249,7 +249,7 @@ static int spufs_cntl_open(struct inode *inode, struct file *file)
249 spufs_cntl_set, "0x%08lx"); 249 spufs_cntl_set, "0x%08lx");
250} 250}
251 251
252static struct file_operations spufs_cntl_fops = { 252static const struct file_operations spufs_cntl_fops = {
253 .open = spufs_cntl_open, 253 .open = spufs_cntl_open,
254 .release = simple_attr_close, 254 .release = simple_attr_close,
255 .read = simple_attr_read, 255 .read = simple_attr_read,
@@ -309,7 +309,7 @@ spufs_regs_write(struct file *file, const char __user *buffer,
309 return ret; 309 return ret;
310} 310}
311 311
312static struct file_operations spufs_regs_fops = { 312static const struct file_operations spufs_regs_fops = {
313 .open = spufs_regs_open, 313 .open = spufs_regs_open,
314 .read = spufs_regs_read, 314 .read = spufs_regs_read,
315 .write = spufs_regs_write, 315 .write = spufs_regs_write,
@@ -360,7 +360,7 @@ spufs_fpcr_write(struct file *file, const char __user * buffer,
360 return ret; 360 return ret;
361} 361}
362 362
363static struct file_operations spufs_fpcr_fops = { 363static const struct file_operations spufs_fpcr_fops = {
364 .open = spufs_regs_open, 364 .open = spufs_regs_open,
365 .read = spufs_fpcr_read, 365 .read = spufs_fpcr_read,
366 .write = spufs_fpcr_write, 366 .write = spufs_fpcr_write,
@@ -426,7 +426,7 @@ static ssize_t spufs_mbox_read(struct file *file, char __user *buf,
426 return count; 426 return count;
427} 427}
428 428
429static struct file_operations spufs_mbox_fops = { 429static const struct file_operations spufs_mbox_fops = {
430 .open = spufs_pipe_open, 430 .open = spufs_pipe_open,
431 .read = spufs_mbox_read, 431 .read = spufs_mbox_read,
432}; 432};
@@ -452,7 +452,7 @@ static ssize_t spufs_mbox_stat_read(struct file *file, char __user *buf,
452 return 4; 452 return 4;
453} 453}
454 454
455static struct file_operations spufs_mbox_stat_fops = { 455static const struct file_operations spufs_mbox_stat_fops = {
456 .open = spufs_pipe_open, 456 .open = spufs_pipe_open,
457 .read = spufs_mbox_stat_read, 457 .read = spufs_mbox_stat_read,
458}; 458};
@@ -559,7 +559,7 @@ static unsigned int spufs_ibox_poll(struct file *file, poll_table *wait)
559 return mask; 559 return mask;
560} 560}
561 561
562static struct file_operations spufs_ibox_fops = { 562static const struct file_operations spufs_ibox_fops = {
563 .open = spufs_pipe_open, 563 .open = spufs_pipe_open,
564 .read = spufs_ibox_read, 564 .read = spufs_ibox_read,
565 .poll = spufs_ibox_poll, 565 .poll = spufs_ibox_poll,
@@ -585,7 +585,7 @@ static ssize_t spufs_ibox_stat_read(struct file *file, char __user *buf,
585 return 4; 585 return 4;
586} 586}
587 587
588static struct file_operations spufs_ibox_stat_fops = { 588static const struct file_operations spufs_ibox_stat_fops = {
589 .open = spufs_pipe_open, 589 .open = spufs_pipe_open,
590 .read = spufs_ibox_stat_read, 590 .read = spufs_ibox_stat_read,
591}; 591};
@@ -692,7 +692,7 @@ static unsigned int spufs_wbox_poll(struct file *file, poll_table *wait)
692 return mask; 692 return mask;
693} 693}
694 694
695static struct file_operations spufs_wbox_fops = { 695static const struct file_operations spufs_wbox_fops = {
696 .open = spufs_pipe_open, 696 .open = spufs_pipe_open,
697 .write = spufs_wbox_write, 697 .write = spufs_wbox_write,
698 .poll = spufs_wbox_poll, 698 .poll = spufs_wbox_poll,
@@ -718,7 +718,7 @@ static ssize_t spufs_wbox_stat_read(struct file *file, char __user *buf,
718 return 4; 718 return 4;
719} 719}
720 720
721static struct file_operations spufs_wbox_stat_fops = { 721static const struct file_operations spufs_wbox_stat_fops = {
722 .open = spufs_pipe_open, 722 .open = spufs_pipe_open,
723 .read = spufs_wbox_stat_read, 723 .read = spufs_wbox_stat_read,
724}; 724};
@@ -823,7 +823,7 @@ static int spufs_signal1_mmap(struct file *file, struct vm_area_struct *vma)
823 return 0; 823 return 0;
824} 824}
825 825
826static struct file_operations spufs_signal1_fops = { 826static const struct file_operations spufs_signal1_fops = {
827 .open = spufs_signal1_open, 827 .open = spufs_signal1_open,
828 .read = spufs_signal1_read, 828 .read = spufs_signal1_read,
829 .write = spufs_signal1_write, 829 .write = spufs_signal1_write,
@@ -934,7 +934,7 @@ static int spufs_signal2_mmap(struct file *file, struct vm_area_struct *vma)
934#define spufs_signal2_mmap NULL 934#define spufs_signal2_mmap NULL
935#endif /* !SPUFS_MMAP_4K */ 935#endif /* !SPUFS_MMAP_4K */
936 936
937static struct file_operations spufs_signal2_fops = { 937static const struct file_operations spufs_signal2_fops = {
938 .open = spufs_signal2_open, 938 .open = spufs_signal2_open,
939 .read = spufs_signal2_read, 939 .read = spufs_signal2_read,
940 .write = spufs_signal2_write, 940 .write = spufs_signal2_write,
@@ -1037,7 +1037,7 @@ static int spufs_mss_open(struct inode *inode, struct file *file)
1037 return nonseekable_open(inode, file); 1037 return nonseekable_open(inode, file);
1038} 1038}
1039 1039
1040static struct file_operations spufs_mss_fops = { 1040static const struct file_operations spufs_mss_fops = {
1041 .open = spufs_mss_open, 1041 .open = spufs_mss_open,
1042 .mmap = spufs_mss_mmap, 1042 .mmap = spufs_mss_mmap,
1043}; 1043};
@@ -1076,7 +1076,7 @@ static int spufs_psmap_open(struct inode *inode, struct file *file)
1076 return nonseekable_open(inode, file); 1076 return nonseekable_open(inode, file);
1077} 1077}
1078 1078
1079static struct file_operations spufs_psmap_fops = { 1079static const struct file_operations spufs_psmap_fops = {
1080 .open = spufs_psmap_open, 1080 .open = spufs_psmap_open,
1081 .mmap = spufs_psmap_mmap, 1081 .mmap = spufs_psmap_mmap,
1082}; 1082};
@@ -1393,7 +1393,7 @@ static int spufs_mfc_fasync(int fd, struct file *file, int on)
1393 return fasync_helper(fd, file, on, &ctx->mfc_fasync); 1393 return fasync_helper(fd, file, on, &ctx->mfc_fasync);
1394} 1394}
1395 1395
1396static struct file_operations spufs_mfc_fops = { 1396static const struct file_operations spufs_mfc_fops = {
1397 .open = spufs_mfc_open, 1397 .open = spufs_mfc_open,
1398 .read = spufs_mfc_read, 1398 .read = spufs_mfc_read,
1399 .write = spufs_mfc_write, 1399 .write = spufs_mfc_write,
@@ -1650,7 +1650,7 @@ static ssize_t spufs_mbox_info_read(struct file *file, char __user *buf,
1650 return ret; 1650 return ret;
1651} 1651}
1652 1652
1653static struct file_operations spufs_mbox_info_fops = { 1653static const struct file_operations spufs_mbox_info_fops = {
1654 .open = spufs_info_open, 1654 .open = spufs_info_open,
1655 .read = spufs_mbox_info_read, 1655 .read = spufs_mbox_info_read,
1656 .llseek = generic_file_llseek, 1656 .llseek = generic_file_llseek,
@@ -1688,7 +1688,7 @@ static ssize_t spufs_ibox_info_read(struct file *file, char __user *buf,
1688 return ret; 1688 return ret;
1689} 1689}
1690 1690
1691static struct file_operations spufs_ibox_info_fops = { 1691static const struct file_operations spufs_ibox_info_fops = {
1692 .open = spufs_info_open, 1692 .open = spufs_info_open,
1693 .read = spufs_ibox_info_read, 1693 .read = spufs_ibox_info_read,
1694 .llseek = generic_file_llseek, 1694 .llseek = generic_file_llseek,
@@ -1729,7 +1729,7 @@ static ssize_t spufs_wbox_info_read(struct file *file, char __user *buf,
1729 return ret; 1729 return ret;
1730} 1730}
1731 1731
1732static struct file_operations spufs_wbox_info_fops = { 1732static const struct file_operations spufs_wbox_info_fops = {
1733 .open = spufs_info_open, 1733 .open = spufs_info_open,
1734 .read = spufs_wbox_info_read, 1734 .read = spufs_wbox_info_read,
1735 .llseek = generic_file_llseek, 1735 .llseek = generic_file_llseek,
@@ -1779,7 +1779,7 @@ static ssize_t spufs_dma_info_read(struct file *file, char __user *buf,
1779 return ret; 1779 return ret;
1780} 1780}
1781 1781
1782static struct file_operations spufs_dma_info_fops = { 1782static const struct file_operations spufs_dma_info_fops = {
1783 .open = spufs_info_open, 1783 .open = spufs_info_open,
1784 .read = spufs_dma_info_read, 1784 .read = spufs_dma_info_read,
1785}; 1785};
@@ -1830,7 +1830,7 @@ static ssize_t spufs_proxydma_info_read(struct file *file, char __user *buf,
1830 return ret; 1830 return ret;
1831} 1831}
1832 1832
1833static struct file_operations spufs_proxydma_info_fops = { 1833static const struct file_operations spufs_proxydma_info_fops = {
1834 .open = spufs_info_open, 1834 .open = spufs_info_open,
1835 .read = spufs_proxydma_info_read, 1835 .read = spufs_proxydma_info_read,
1836}; 1836};
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c
index 738b9244382f..8079983ef94f 100644
--- a/arch/powerpc/platforms/cell/spufs/inode.c
+++ b/arch/powerpc/platforms/cell/spufs/inode.c
@@ -220,11 +220,11 @@ static int spufs_dir_close(struct inode *inode, struct file *file)
220 return dcache_dir_close(inode, file); 220 return dcache_dir_close(inode, file);
221} 221}
222 222
223struct inode_operations spufs_dir_inode_operations = { 223const struct inode_operations spufs_dir_inode_operations = {
224 .lookup = simple_lookup, 224 .lookup = simple_lookup,
225}; 225};
226 226
227struct file_operations spufs_context_fops = { 227const struct file_operations spufs_context_fops = {
228 .open = dcache_dir_open, 228 .open = dcache_dir_open,
229 .release = spufs_dir_close, 229 .release = spufs_dir_close,
230 .llseek = dcache_dir_lseek, 230 .llseek = dcache_dir_lseek,
@@ -372,7 +372,7 @@ static int spufs_gang_close(struct inode *inode, struct file *file)
372 return dcache_dir_close(inode, file); 372 return dcache_dir_close(inode, file);
373} 373}
374 374
375struct file_operations spufs_gang_fops = { 375const struct file_operations spufs_gang_fops = {
376 .open = dcache_dir_open, 376 .open = dcache_dir_open,
377 .release = spufs_gang_close, 377 .release = spufs_gang_close,
378 .llseek = dcache_dir_lseek, 378 .llseek = dcache_dir_lseek,
diff --git a/arch/powerpc/platforms/cell/spufs/spufs.h b/arch/powerpc/platforms/cell/spufs/spufs.h
index 70fb13395c04..56864469215e 100644
--- a/arch/powerpc/platforms/cell/spufs/spufs.h
+++ b/arch/powerpc/platforms/cell/spufs/spufs.h
@@ -149,7 +149,7 @@ long spufs_run_spu(struct file *file,
149 struct spu_context *ctx, u32 *npc, u32 *status); 149 struct spu_context *ctx, u32 *npc, u32 *status);
150long spufs_create(struct nameidata *nd, 150long spufs_create(struct nameidata *nd,
151 unsigned int flags, mode_t mode); 151 unsigned int flags, mode_t mode);
152extern struct file_operations spufs_context_fops; 152extern const struct file_operations spufs_context_fops;
153 153
154/* gang management */ 154/* gang management */
155struct spu_gang *alloc_spu_gang(void); 155struct spu_gang *alloc_spu_gang(void);
diff --git a/arch/powerpc/platforms/iseries/lpevents.c b/arch/powerpc/platforms/iseries/lpevents.c
index c1f4502a3c6a..91df52a1899a 100644
--- a/arch/powerpc/platforms/iseries/lpevents.c
+++ b/arch/powerpc/platforms/iseries/lpevents.c
@@ -308,7 +308,7 @@ static int proc_lpevents_open(struct inode *inode, struct file *file)
308 return single_open(file, proc_lpevents_show, NULL); 308 return single_open(file, proc_lpevents_show, NULL);
309} 309}
310 310
311static struct file_operations proc_lpevents_operations = { 311static const struct file_operations proc_lpevents_operations = {
312 .open = proc_lpevents_open, 312 .open = proc_lpevents_open,
313 .read = seq_read, 313 .read = seq_read,
314 .llseek = seq_lseek, 314 .llseek = seq_lseek,
diff --git a/arch/powerpc/platforms/iseries/mf.c b/arch/powerpc/platforms/iseries/mf.c
index 1ad0e4aaad1a..b1187d95e3b2 100644
--- a/arch/powerpc/platforms/iseries/mf.c
+++ b/arch/powerpc/platforms/iseries/mf.c
@@ -1224,7 +1224,7 @@ out:
1224 return rc; 1224 return rc;
1225} 1225}
1226 1226
1227static struct file_operations proc_vmlinux_operations = { 1227static const struct file_operations proc_vmlinux_operations = {
1228 .write = proc_mf_change_vmlinux, 1228 .write = proc_mf_change_vmlinux,
1229}; 1229};
1230 1230
@@ -1253,7 +1253,6 @@ static int __init mf_proc_init(void)
1253 ent = create_proc_entry("cmdline", S_IFREG|S_IRUSR|S_IWUSR, mf); 1253 ent = create_proc_entry("cmdline", S_IFREG|S_IRUSR|S_IWUSR, mf);
1254 if (!ent) 1254 if (!ent)
1255 return 1; 1255 return 1;
1256 ent->nlink = 1;
1257 ent->data = (void *)(long)i; 1256 ent->data = (void *)(long)i;
1258 ent->read_proc = proc_mf_dump_cmdline; 1257 ent->read_proc = proc_mf_dump_cmdline;
1259 ent->write_proc = proc_mf_change_cmdline; 1258 ent->write_proc = proc_mf_change_cmdline;
@@ -1264,7 +1263,6 @@ static int __init mf_proc_init(void)
1264 ent = create_proc_entry("vmlinux", S_IFREG|S_IWUSR, mf); 1263 ent = create_proc_entry("vmlinux", S_IFREG|S_IWUSR, mf);
1265 if (!ent) 1264 if (!ent)
1266 return 1; 1265 return 1;
1267 ent->nlink = 1;
1268 ent->data = (void *)(long)i; 1266 ent->data = (void *)(long)i;
1269 ent->proc_fops = &proc_vmlinux_operations; 1267 ent->proc_fops = &proc_vmlinux_operations;
1270 } 1268 }
@@ -1272,7 +1270,6 @@ static int __init mf_proc_init(void)
1272 ent = create_proc_entry("side", S_IFREG|S_IRUSR|S_IWUSR, mf_proc_root); 1270 ent = create_proc_entry("side", S_IFREG|S_IRUSR|S_IWUSR, mf_proc_root);
1273 if (!ent) 1271 if (!ent)
1274 return 1; 1272 return 1;
1275 ent->nlink = 1;
1276 ent->data = (void *)0; 1273 ent->data = (void *)0;
1277 ent->read_proc = proc_mf_dump_side; 1274 ent->read_proc = proc_mf_dump_side;
1278 ent->write_proc = proc_mf_change_side; 1275 ent->write_proc = proc_mf_change_side;
@@ -1280,7 +1277,6 @@ static int __init mf_proc_init(void)
1280 ent = create_proc_entry("src", S_IFREG|S_IRUSR|S_IWUSR, mf_proc_root); 1277 ent = create_proc_entry("src", S_IFREG|S_IRUSR|S_IWUSR, mf_proc_root);
1281 if (!ent) 1278 if (!ent)
1282 return 1; 1279 return 1;
1283 ent->nlink = 1;
1284 ent->data = (void *)0; 1280 ent->data = (void *)0;
1285 ent->read_proc = proc_mf_dump_src; 1281 ent->read_proc = proc_mf_dump_src;
1286 ent->write_proc = proc_mf_change_src; 1282 ent->write_proc = proc_mf_change_src;
diff --git a/arch/powerpc/platforms/iseries/proc.c b/arch/powerpc/platforms/iseries/proc.c
index b54e37101e69..f2cde4180204 100644
--- a/arch/powerpc/platforms/iseries/proc.c
+++ b/arch/powerpc/platforms/iseries/proc.c
@@ -101,7 +101,7 @@ static int proc_titantod_open(struct inode *inode, struct file *file)
101 return single_open(file, proc_titantod_show, NULL); 101 return single_open(file, proc_titantod_show, NULL);
102} 102}
103 103
104static struct file_operations proc_titantod_operations = { 104static const struct file_operations proc_titantod_operations = {
105 .open = proc_titantod_open, 105 .open = proc_titantod_open,
106 .read = seq_read, 106 .read = seq_read,
107 .llseek = seq_lseek, 107 .llseek = seq_lseek,
diff --git a/arch/powerpc/platforms/iseries/viopath.c b/arch/powerpc/platforms/iseries/viopath.c
index a6799ed34a66..e2100ece9c65 100644
--- a/arch/powerpc/platforms/iseries/viopath.c
+++ b/arch/powerpc/platforms/iseries/viopath.c
@@ -173,7 +173,7 @@ static int proc_viopath_open(struct inode *inode, struct file *file)
173 return single_open(file, proc_viopath_show, NULL); 173 return single_open(file, proc_viopath_show, NULL);
174} 174}
175 175
176static struct file_operations proc_viopath_operations = { 176static const struct file_operations proc_viopath_operations = {
177 .open = proc_viopath_open, 177 .open = proc_viopath_open,
178 .read = seq_read, 178 .read = seq_read,
179 .llseek = seq_lseek, 179 .llseek = seq_lseek,
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c
index d949e9df41ef..651fa424ea06 100644
--- a/arch/powerpc/platforms/powermac/setup.c
+++ b/arch/powerpc/platforms/powermac/setup.c
@@ -506,8 +506,8 @@ void note_bootable_part(dev_t dev, int part, int goodness)
506 if ((goodness <= current_root_goodness) && 506 if ((goodness <= current_root_goodness) &&
507 ROOT_DEV != DEFAULT_ROOT_DEVICE) 507 ROOT_DEV != DEFAULT_ROOT_DEVICE)
508 return; 508 return;
509 p = strstr(saved_command_line, "root="); 509 p = strstr(boot_command_line, "root=");
510 if (p != NULL && (p == saved_command_line || p[-1] == ' ')) 510 if (p != NULL && (p == boot_command_line || p[-1] == ' '))
511 return; 511 return;
512 512
513 if (!found_boot) { 513 if (!found_boot) {
diff --git a/arch/powerpc/platforms/ps3/Kconfig b/arch/powerpc/platforms/ps3/Kconfig
index de52ec4e9e58..4be3943d1c0d 100644
--- a/arch/powerpc/platforms/ps3/Kconfig
+++ b/arch/powerpc/platforms/ps3/Kconfig
@@ -51,4 +51,15 @@ config PS3_VUART
51 including the System Manager and AV Settings. In 51 including the System Manager and AV Settings. In
52 general, all users will say Y. 52 general, all users will say Y.
53 53
54config PS3_PS3AV
55 tristate "PS3 AV settings driver"
56 depends on PPC_PS3
57 select PS3_VUART
58 default y
59 help
60 Include support for the PS3 AV Settings driver.
61
62 This support is required for graphics and sound. In
63 general, all users will say Y or M.
64
54endmenu 65endmenu
diff --git a/arch/powerpc/platforms/ps3/htab.c b/arch/powerpc/platforms/ps3/htab.c
index a4b5a1bc60f4..e12e59fea13a 100644
--- a/arch/powerpc/platforms/ps3/htab.c
+++ b/arch/powerpc/platforms/ps3/htab.c
@@ -2,7 +2,7 @@
2 * PS3 pagetable management routines. 2 * PS3 pagetable management routines.
3 * 3 *
4 * Copyright (C) 2006 Sony Computer Entertainment Inc. 4 * Copyright (C) 2006 Sony Computer Entertainment Inc.
5 * Copyright 2006 Sony Corp. 5 * Copyright 2006, 2007 Sony Corporation
6 * 6 *
7 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by 8 * it under the terms of the GNU General Public License as published by
@@ -24,6 +24,7 @@
24#include <asm/lmb.h> 24#include <asm/lmb.h>
25#include <asm/udbg.h> 25#include <asm/udbg.h>
26#include <asm/lv1call.h> 26#include <asm/lv1call.h>
27#include <asm/ps3fb.h>
27 28
28#include "platform.h" 29#include "platform.h"
29 30
@@ -233,6 +234,9 @@ static void ps3_hpte_invalidate(unsigned long slot, unsigned long va,
233 234
234static void ps3_hpte_clear(void) 235static void ps3_hpte_clear(void)
235{ 236{
237 /* Make sure to clean up the frame buffer device first */
238 ps3fb_cleanup();
239
236 lv1_unmap_htab(htab_addr); 240 lv1_unmap_htab(htab_addr);
237} 241}
238 242
diff --git a/arch/powerpc/platforms/ps3/setup.c b/arch/powerpc/platforms/ps3/setup.c
index e62505e18813..13d669a8ecae 100644
--- a/arch/powerpc/platforms/ps3/setup.c
+++ b/arch/powerpc/platforms/ps3/setup.c
@@ -24,6 +24,7 @@
24#include <linux/root_dev.h> 24#include <linux/root_dev.h>
25#include <linux/console.h> 25#include <linux/console.h>
26#include <linux/kexec.h> 26#include <linux/kexec.h>
27#include <linux/bootmem.h>
27 28
28#include <asm/machdep.h> 29#include <asm/machdep.h>
29#include <asm/firmware.h> 30#include <asm/firmware.h>
@@ -80,6 +81,46 @@ static void ps3_panic(char *str)
80 for (;;) ; 81 for (;;) ;
81} 82}
82 83
84
85static void prealloc(struct ps3_prealloc *p)
86{
87 if (!p->size)
88 return;
89
90 p->address = __alloc_bootmem(p->size, p->align, __pa(MAX_DMA_ADDRESS));
91 if (!p->address) {
92 printk(KERN_ERR "%s: Cannot allocate %s\n", __FUNCTION__,
93 p->name);
94 return;
95 }
96
97 printk(KERN_INFO "%s: %lu bytes at %p\n", p->name, p->size,
98 p->address);
99}
100
101#ifdef CONFIG_FB_PS3
102struct ps3_prealloc ps3fb_videomemory = {
103 .name = "ps3fb videomemory",
104 .size = CONFIG_FB_PS3_DEFAULT_SIZE_M*1024*1024,
105 .align = 1024*1024 /* the GPU requires 1 MiB alignment */
106};
107#define prealloc_ps3fb_videomemory() prealloc(&ps3fb_videomemory)
108
109static int __init early_parse_ps3fb(char *p)
110{
111 if (!p)
112 return 1;
113
114 ps3fb_videomemory.size = _ALIGN_UP(memparse(p, &p),
115 ps3fb_videomemory.align);
116 return 0;
117}
118early_param("ps3fb", early_parse_ps3fb);
119#else
120#define prealloc_ps3fb_videomemory() do { } while (0)
121#endif
122
123
83static void __init ps3_setup_arch(void) 124static void __init ps3_setup_arch(void)
84{ 125{
85 union ps3_firmware_version v; 126 union ps3_firmware_version v;
@@ -101,6 +142,7 @@ static void __init ps3_setup_arch(void)
101 conswitchp = &dummy_con; 142 conswitchp = &dummy_con;
102#endif 143#endif
103 144
145 prealloc_ps3fb_videomemory();
104 ppc_md.power_save = ps3_power_save; 146 ppc_md.power_save = ps3_power_save;
105 147
106 DBG(" <- %s:%d\n", __func__, __LINE__); 148 DBG(" <- %s:%d\n", __func__, __LINE__);
diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c
index 9437f48cc9e7..6cedbc002e0f 100644
--- a/arch/powerpc/platforms/pseries/eeh.c
+++ b/arch/powerpc/platforms/pseries/eeh.c
@@ -1078,7 +1078,7 @@ static int proc_eeh_open(struct inode *inode, struct file *file)
1078 return single_open(file, proc_eeh_show, NULL); 1078 return single_open(file, proc_eeh_show, NULL);
1079} 1079}
1080 1080
1081static struct file_operations proc_eeh_operations = { 1081static const struct file_operations proc_eeh_operations = {
1082 .open = proc_eeh_open, 1082 .open = proc_eeh_open,
1083 .read = seq_read, 1083 .read = seq_read,
1084 .llseek = seq_lseek, 1084 .llseek = seq_lseek,
diff --git a/arch/powerpc/platforms/pseries/hvCall_inst.c b/arch/powerpc/platforms/pseries/hvCall_inst.c
index 3ddc04925d50..eae51ef9af24 100644
--- a/arch/powerpc/platforms/pseries/hvCall_inst.c
+++ b/arch/powerpc/platforms/pseries/hvCall_inst.c
@@ -90,7 +90,7 @@ static int hcall_inst_seq_open(struct inode *inode, struct file *file)
90 return rc; 90 return rc;
91} 91}
92 92
93static struct file_operations hcall_inst_seq_fops = { 93static const struct file_operations hcall_inst_seq_fops = {
94 .open = hcall_inst_seq_open, 94 .open = hcall_inst_seq_open,
95 .read = seq_read, 95 .read = seq_read,
96 .llseek = seq_lseek, 96 .llseek = seq_lseek,
diff --git a/arch/powerpc/platforms/pseries/reconfig.c b/arch/powerpc/platforms/pseries/reconfig.c
index 4ad33e41b008..5aa97aff3391 100644
--- a/arch/powerpc/platforms/pseries/reconfig.c
+++ b/arch/powerpc/platforms/pseries/reconfig.c
@@ -499,7 +499,7 @@ out:
499 return rv ? rv : count; 499 return rv ? rv : count;
500} 500}
501 501
502static struct file_operations ofdt_fops = { 502static const struct file_operations ofdt_fops = {
503 .write = ofdt_write 503 .write = ofdt_write
504}; 504};
505 505
@@ -513,7 +513,6 @@ static int proc_ppc64_create_ofdt(void)
513 513
514 ent = create_proc_entry("ppc64/ofdt", S_IWUSR, NULL); 514 ent = create_proc_entry("ppc64/ofdt", S_IWUSR, NULL);
515 if (ent) { 515 if (ent) {
516 ent->nlink = 1;
517 ent->data = NULL; 516 ent->data = NULL;
518 ent->size = 0; 517 ent->size = 0;
519 ent->proc_fops = &ofdt_fops; 518 ent->proc_fops = &ofdt_fops;
diff --git a/arch/powerpc/platforms/pseries/rtasd.c b/arch/powerpc/platforms/pseries/rtasd.c
index 8ca2612221d6..77d0937d5c07 100644
--- a/arch/powerpc/platforms/pseries/rtasd.c
+++ b/arch/powerpc/platforms/pseries/rtasd.c
@@ -331,7 +331,7 @@ static unsigned int rtas_log_poll(struct file *file, poll_table * wait)
331 return 0; 331 return 0;
332} 332}
333 333
334struct file_operations proc_rtas_log_operations = { 334const struct file_operations proc_rtas_log_operations = {
335 .read = rtas_log_read, 335 .read = rtas_log_read,
336 .poll = rtas_log_poll, 336 .poll = rtas_log_poll,
337 .open = rtas_log_open, 337 .open = rtas_log_open,
diff --git a/arch/powerpc/platforms/pseries/scanlog.c b/arch/powerpc/platforms/pseries/scanlog.c
index 45368a57d7dd..8e1ef168e2dd 100644
--- a/arch/powerpc/platforms/pseries/scanlog.c
+++ b/arch/powerpc/platforms/pseries/scanlog.c
@@ -184,7 +184,7 @@ static int scanlog_release(struct inode * inode, struct file * file)
184 return 0; 184 return 0;
185} 185}
186 186
187struct file_operations scanlog_fops = { 187const struct file_operations scanlog_fops = {
188 .owner = THIS_MODULE, 188 .owner = THIS_MODULE,
189 .read = scanlog_read, 189 .read = scanlog_read,
190 .write = scanlog_write, 190 .write = scanlog_write,