aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/sh/boards/mach-se/7724/setup.c38
-rw-r--r--arch/sh/include/asm/perf_counter.h2
-rw-r--r--drivers/serial/sh-sci.c11
-rw-r--r--drivers/usb/host/Kconfig4
-rw-r--r--drivers/video/atafb.c5
-rw-r--r--drivers/video/fbmem.c2
-rw-r--r--drivers/video/fbsysfs.c3
-rw-r--r--drivers/video/hitfb.c66
-rw-r--r--drivers/video/i810/i810_main.c3
-rw-r--r--drivers/video/matrox/matroxfb_base.c2
-rw-r--r--drivers/video/matrox/matroxfb_crtc2.c6
-rw-r--r--drivers/video/sh_mobile_lcdcfb.c40
-rw-r--r--drivers/video/sm501fb.c2
-rw-r--r--drivers/video/w100fb.c2
-rw-r--r--fs/afs/mntpt.c1
-rw-r--r--fs/namespace.c1
-rw-r--r--fs/nfs/getroot.c1
-rw-r--r--fs/reiserfs/super.c1
-rw-r--r--include/linux/elfcore.h5
-rw-r--r--include/linux/mnt_namespace.h13
-rw-r--r--kernel/exit.c1
-rw-r--r--kernel/fork.c1
-rw-r--r--kernel/kmod.c1
23 files changed, 133 insertions, 78 deletions
diff --git a/arch/sh/boards/mach-se/7724/setup.c b/arch/sh/boards/mach-se/7724/setup.c
index c050a8d76dfd..8fed45a2fb85 100644
--- a/arch/sh/boards/mach-se/7724/setup.c
+++ b/arch/sh/boards/mach-se/7724/setup.c
@@ -19,6 +19,7 @@
19#include <linux/smc91x.h> 19#include <linux/smc91x.h>
20#include <linux/gpio.h> 20#include <linux/gpio.h>
21#include <linux/input.h> 21#include <linux/input.h>
22#include <linux/usb/r8a66597.h>
22#include <video/sh_mobile_lcdc.h> 23#include <video/sh_mobile_lcdc.h>
23#include <media/sh_mobile_ceu.h> 24#include <media/sh_mobile_ceu.h>
24#include <asm/io.h> 25#include <asm/io.h>
@@ -302,6 +303,34 @@ static struct platform_device sh_eth_device = {
302 .resource = sh_eth_resources, 303 .resource = sh_eth_resources,
303}; 304};
304 305
306static struct r8a66597_platdata sh7724_usb0_host_data = {
307};
308
309static struct resource sh7724_usb0_host_resources[] = {
310 [0] = {
311 .start = 0xa4d80000,
312 .end = 0xa4d800ff,
313 .flags = IORESOURCE_MEM,
314 },
315 [1] = {
316 .start = 65,
317 .end = 65,
318 .flags = IORESOURCE_IRQ | IRQF_TRIGGER_LOW,
319 },
320};
321
322static struct platform_device sh7724_usb0_host_device = {
323 .name = "r8a66597_hcd",
324 .id = 0,
325 .dev = {
326 .dma_mask = NULL, /* not use dma */
327 .coherent_dma_mask = 0xffffffff,
328 .platform_data = &sh7724_usb0_host_data,
329 },
330 .num_resources = ARRAY_SIZE(sh7724_usb0_host_resources),
331 .resource = sh7724_usb0_host_resources,
332};
333
305static struct platform_device *ms7724se_devices[] __initdata = { 334static struct platform_device *ms7724se_devices[] __initdata = {
306 &heartbeat_device, 335 &heartbeat_device,
307 &smc91x_eth_device, 336 &smc91x_eth_device,
@@ -311,6 +340,7 @@ static struct platform_device *ms7724se_devices[] __initdata = {
311 &ceu1_device, 340 &ceu1_device,
312 &keysc_device, 341 &keysc_device,
313 &sh_eth_device, 342 &sh_eth_device,
343 &sh7724_usb0_host_device,
314}; 344};
315 345
316#define EEPROM_OP 0xBA206000 346#define EEPROM_OP 0xBA206000
@@ -364,6 +394,7 @@ static void __init sh_eth_init(void)
364#define SW4140 0xBA201000 394#define SW4140 0xBA201000
365#define FPGA_OUT 0xBA200400 395#define FPGA_OUT 0xBA200400
366#define PORT_HIZA 0xA4050158 396#define PORT_HIZA 0xA4050158
397#define PORT_MSELCRB 0xA4050182
367 398
368#define SW41_A 0x0100 399#define SW41_A 0x0100
369#define SW41_B 0x0200 400#define SW41_B 0x0200
@@ -373,6 +404,7 @@ static void __init sh_eth_init(void)
373#define SW41_F 0x2000 404#define SW41_F 0x2000
374#define SW41_G 0x4000 405#define SW41_G 0x4000
375#define SW41_H 0x8000 406#define SW41_H 0x8000
407
376static int __init devices_setup(void) 408static int __init devices_setup(void)
377{ 409{
378 u16 sw = ctrl_inw(SW4140); /* select camera, monitor */ 410 u16 sw = ctrl_inw(SW4140); /* select camera, monitor */
@@ -385,6 +417,12 @@ static int __init devices_setup(void)
385 (1 << 14)), /* RMII */ 417 (1 << 14)), /* RMII */
386 FPGA_OUT); 418 FPGA_OUT);
387 419
420 /* turn on USB clocks, use external clock */
421 ctrl_outw((ctrl_inw(PORT_MSELCRB) & ~0xc000) | 0x8000, PORT_MSELCRB);
422
423 /* enable USB0 port */
424 ctrl_outw(0x0600, 0xa40501d4);
425
388 /* enable IRQ 0,1,2 */ 426 /* enable IRQ 0,1,2 */
389 gpio_request(GPIO_FN_INTC_IRQ0, NULL); 427 gpio_request(GPIO_FN_INTC_IRQ0, NULL);
390 gpio_request(GPIO_FN_INTC_IRQ1, NULL); 428 gpio_request(GPIO_FN_INTC_IRQ1, NULL);
diff --git a/arch/sh/include/asm/perf_counter.h b/arch/sh/include/asm/perf_counter.h
index 61c2b40c802c..d8e6bb9c0ccc 100644
--- a/arch/sh/include/asm/perf_counter.h
+++ b/arch/sh/include/asm/perf_counter.h
@@ -4,4 +4,6 @@
4/* SH only supports software counters through this interface. */ 4/* SH only supports software counters through this interface. */
5static inline void set_perf_counter_pending(void) {} 5static inline void set_perf_counter_pending(void) {}
6 6
7#define PERF_COUNTER_INDEX_OFFSET 0
8
7#endif /* __ASM_SH_PERF_COUNTER_H */ 9#endif /* __ASM_SH_PERF_COUNTER_H */
diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c
index 66f52674ca0c..8e2feb563347 100644
--- a/drivers/serial/sh-sci.c
+++ b/drivers/serial/sh-sci.c
@@ -707,24 +707,25 @@ static irqreturn_t sci_br_interrupt(int irq, void *ptr)
707 707
708static irqreturn_t sci_mpxed_interrupt(int irq, void *ptr) 708static irqreturn_t sci_mpxed_interrupt(int irq, void *ptr)
709{ 709{
710 unsigned short ssr_status, scr_status; 710 unsigned short ssr_status, scr_status, err_enabled;
711 struct uart_port *port = ptr; 711 struct uart_port *port = ptr;
712 irqreturn_t ret = IRQ_NONE; 712 irqreturn_t ret = IRQ_NONE;
713 713
714 ssr_status = sci_in(port, SCxSR); 714 ssr_status = sci_in(port, SCxSR);
715 scr_status = sci_in(port, SCSCR); 715 scr_status = sci_in(port, SCSCR);
716 err_enabled = scr_status & (SCI_CTRL_FLAGS_REIE | SCI_CTRL_FLAGS_RIE);
716 717
717 /* Tx Interrupt */ 718 /* Tx Interrupt */
718 if ((ssr_status & 0x0020) && (scr_status & SCI_CTRL_FLAGS_TIE)) 719 if ((ssr_status & SCxSR_TDxE(port)) && (scr_status & SCI_CTRL_FLAGS_TIE))
719 ret = sci_tx_interrupt(irq, ptr); 720 ret = sci_tx_interrupt(irq, ptr);
720 /* Rx Interrupt */ 721 /* Rx Interrupt */
721 if ((ssr_status & 0x0002) && (scr_status & SCI_CTRL_FLAGS_RIE)) 722 if ((ssr_status & SCxSR_RDxF(port)) && (scr_status & SCI_CTRL_FLAGS_RIE))
722 ret = sci_rx_interrupt(irq, ptr); 723 ret = sci_rx_interrupt(irq, ptr);
723 /* Error Interrupt */ 724 /* Error Interrupt */
724 if ((ssr_status & 0x0080) && (scr_status & SCI_CTRL_FLAGS_REIE)) 725 if ((ssr_status & SCxSR_ERRORS(port)) && err_enabled)
725 ret = sci_er_interrupt(irq, ptr); 726 ret = sci_er_interrupt(irq, ptr);
726 /* Break Interrupt */ 727 /* Break Interrupt */
727 if ((ssr_status & 0x0010) && (scr_status & SCI_CTRL_FLAGS_REIE)) 728 if ((ssr_status & SCxSR_BRK(port)) && err_enabled)
728 ret = sci_br_interrupt(irq, ptr); 729 ret = sci_br_interrupt(irq, ptr);
729 730
730 return ret; 731 return ret;
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index 1576a0520adf..0c03471f0d41 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -337,10 +337,10 @@ config USB_R8A66597_HCD
337 337
338config SUPERH_ON_CHIP_R8A66597 338config SUPERH_ON_CHIP_R8A66597
339 boolean "Enable SuperH on-chip R8A66597 USB" 339 boolean "Enable SuperH on-chip R8A66597 USB"
340 depends on USB_R8A66597_HCD && (CPU_SUBTYPE_SH7366 || CPU_SUBTYPE_SH7723) 340 depends on USB_R8A66597_HCD && (CPU_SUBTYPE_SH7366 || CPU_SUBTYPE_SH7723 || CPU_SUBTYPE_SH7724)
341 help 341 help
342 This driver enables support for the on-chip R8A66597 in the 342 This driver enables support for the on-chip R8A66597 in the
343 SH7366 and SH7723 processors. 343 SH7366, SH7723 and SH7724 processors.
344 344
345config USB_WHCI_HCD 345config USB_WHCI_HCD
346 tristate "Wireless USB Host Controller Interface (WHCI) driver (EXPERIMENTAL)" 346 tristate "Wireless USB Host Controller Interface (WHCI) driver (EXPERIMENTAL)"
diff --git a/drivers/video/atafb.c b/drivers/video/atafb.c
index 497ff8af03ed..8cd279be74e5 100644
--- a/drivers/video/atafb.c
+++ b/drivers/video/atafb.c
@@ -2405,6 +2405,9 @@ static int do_fb_set_var(struct fb_var_screeninfo *var, int isactive)
2405 return 0; 2405 return 0;
2406} 2406}
2407 2407
2408/* fbhw->encode_fix() must be called with fb_info->mm_lock held
2409 * if it is called after the register_framebuffer() - not a case here
2410 */
2408static int atafb_get_fix(struct fb_fix_screeninfo *fix, struct fb_info *info) 2411static int atafb_get_fix(struct fb_fix_screeninfo *fix, struct fb_info *info)
2409{ 2412{
2410 struct atafb_par par; 2413 struct atafb_par par;
@@ -2414,9 +2417,7 @@ static int atafb_get_fix(struct fb_fix_screeninfo *fix, struct fb_info *info)
2414 if (err) 2417 if (err)
2415 return err; 2418 return err;
2416 memset(fix, 0, sizeof(struct fb_fix_screeninfo)); 2419 memset(fix, 0, sizeof(struct fb_fix_screeninfo));
2417 mutex_lock(&info->mm_lock);
2418 err = fbhw->encode_fix(fix, &par); 2420 err = fbhw->encode_fix(fix, &par);
2419 mutex_unlock(&info->mm_lock);
2420 return err; 2421 return err;
2421} 2422}
2422 2423
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index 53eb39652791..53ea05645ff8 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -1513,6 +1513,8 @@ register_framebuffer(struct fb_info *fb_info)
1513 if (!registered_fb[i]) 1513 if (!registered_fb[i])
1514 break; 1514 break;
1515 fb_info->node = i; 1515 fb_info->node = i;
1516 mutex_init(&fb_info->lock);
1517 mutex_init(&fb_info->mm_lock);
1516 1518
1517 fb_info->dev = device_create(fb_class, fb_info->device, 1519 fb_info->dev = device_create(fb_class, fb_info->device,
1518 MKDEV(FB_MAJOR, i), NULL, "fb%d", i); 1520 MKDEV(FB_MAJOR, i), NULL, "fb%d", i);
diff --git a/drivers/video/fbsysfs.c b/drivers/video/fbsysfs.c
index afc04df39a03..d4a2c11d9809 100644
--- a/drivers/video/fbsysfs.c
+++ b/drivers/video/fbsysfs.c
@@ -62,9 +62,6 @@ struct fb_info *framebuffer_alloc(size_t size, struct device *dev)
62 mutex_init(&info->bl_curve_mutex); 62 mutex_init(&info->bl_curve_mutex);
63#endif 63#endif
64 64
65 mutex_init(&info->lock);
66 mutex_init(&info->mm_lock);
67
68 return info; 65 return info;
69#undef PADDING 66#undef PADDING
70#undef BYTES_PER_LONG 67#undef BYTES_PER_LONG
diff --git a/drivers/video/hitfb.c b/drivers/video/hitfb.c
index 020db7fc9153..e7116a6d82d3 100644
--- a/drivers/video/hitfb.c
+++ b/drivers/video/hitfb.c
@@ -44,9 +44,6 @@ static struct fb_fix_screeninfo hitfb_fix __initdata = {
44 .accel = FB_ACCEL_NONE, 44 .accel = FB_ACCEL_NONE,
45}; 45};
46 46
47static u32 pseudo_palette[16];
48static struct fb_info fb_info;
49
50static inline void hitfb_accel_wait(void) 47static inline void hitfb_accel_wait(void)
51{ 48{
52 while (fb_readw(HD64461_GRCFGR) & HD64461_GRCFGR_ACCSTATUS) ; 49 while (fb_readw(HD64461_GRCFGR) & HD64461_GRCFGR_ACCSTATUS) ;
@@ -331,6 +328,8 @@ static struct fb_ops hitfb_ops = {
331static int __init hitfb_probe(struct platform_device *dev) 328static int __init hitfb_probe(struct platform_device *dev)
332{ 329{
333 unsigned short lcdclor, ldr3, ldvndr; 330 unsigned short lcdclor, ldr3, ldvndr;
331 struct fb_info *info;
332 int ret;
334 333
335 if (fb_get_options("hitfb", NULL)) 334 if (fb_get_options("hitfb", NULL))
336 return -ENODEV; 335 return -ENODEV;
@@ -384,32 +383,53 @@ static int __init hitfb_probe(struct platform_device *dev)
384 break; 383 break;
385 } 384 }
386 385
387 fb_info.fbops = &hitfb_ops; 386 info = framebuffer_alloc(sizeof(u32) * 16, &dev->dev);
388 fb_info.var = hitfb_var; 387 if (unlikely(!info))
389 fb_info.fix = hitfb_fix; 388 return -ENOMEM;
390 fb_info.pseudo_palette = pseudo_palette; 389
391 fb_info.flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN | 390 info->fbops = &hitfb_ops;
391 info->var = hitfb_var;
392 info->fix = hitfb_fix;
393 info->pseudo_palette = info->par;
394 info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN |
392 FBINFO_HWACCEL_FILLRECT | FBINFO_HWACCEL_COPYAREA; 395 FBINFO_HWACCEL_FILLRECT | FBINFO_HWACCEL_COPYAREA;
393 396
394 fb_info.screen_base = (void *)hitfb_fix.smem_start; 397 info->screen_base = (void *)hitfb_fix.smem_start;
395 398
396 fb_alloc_cmap(&fb_info.cmap, 256, 0); 399 ret = fb_alloc_cmap(&info->cmap, 256, 0);
400 if (unlikely(ret < 0))
401 goto err_fb;
397 402
398 if (register_framebuffer(&fb_info) < 0) 403 ret = register_framebuffer(info);
399 return -EINVAL; 404 if (unlikely(ret < 0))
405 goto err;
406
407 platform_set_drvdata(dev, info);
400 408
401 printk(KERN_INFO "fb%d: %s frame buffer device\n", 409 printk(KERN_INFO "fb%d: %s frame buffer device\n",
402 fb_info.node, fb_info.fix.id); 410 info->node, info->fix.id);
411
403 return 0; 412 return 0;
413
414err:
415 fb_dealloc_cmap(&info->cmap);
416err_fb:
417 framebuffer_release(info);
418 return ret;
404} 419}
405 420
406static int __exit hitfb_remove(struct platform_device *dev) 421static int __exit hitfb_remove(struct platform_device *dev)
407{ 422{
408 return unregister_framebuffer(&fb_info); 423 struct fb_info *info = platform_get_drvdata(dev);
424
425 unregister_framebuffer(info);
426 fb_dealloc_cmap(&info->cmap);
427 framebuffer_release(info);
428
429 return 0;
409} 430}
410 431
411#ifdef CONFIG_PM 432static int hitfb_suspend(struct device *dev)
412static int hitfb_suspend(struct platform_device *dev, pm_message_t state)
413{ 433{
414 u16 v; 434 u16 v;
415 435
@@ -421,7 +441,7 @@ static int hitfb_suspend(struct platform_device *dev, pm_message_t state)
421 return 0; 441 return 0;
422} 442}
423 443
424static int hitfb_resume(struct platform_device *dev) 444static int hitfb_resume(struct device *dev)
425{ 445{
426 u16 v; 446 u16 v;
427 447
@@ -435,17 +455,19 @@ static int hitfb_resume(struct platform_device *dev)
435 455
436 return 0; 456 return 0;
437} 457}
438#endif 458
459static struct dev_pm_ops hitfb_dev_pm_ops = {
460 .suspend = hitfb_suspend,
461 .resume = hitfb_resume,
462};
439 463
440static struct platform_driver hitfb_driver = { 464static struct platform_driver hitfb_driver = {
441 .probe = hitfb_probe, 465 .probe = hitfb_probe,
442 .remove = __exit_p(hitfb_remove), 466 .remove = __exit_p(hitfb_remove),
443#ifdef CONFIG_PM
444 .suspend = hitfb_suspend,
445 .resume = hitfb_resume,
446#endif
447 .driver = { 467 .driver = {
448 .name = "hitfb", 468 .name = "hitfb",
469 .owner = THIS_MODULE,
470 .pm = &hitfb_dev_pm_ops,
449 }, 471 },
450}; 472};
451 473
diff --git a/drivers/video/i810/i810_main.c b/drivers/video/i810/i810_main.c
index 71960672d721..5743ea25e818 100644
--- a/drivers/video/i810/i810_main.c
+++ b/drivers/video/i810/i810_main.c
@@ -2060,8 +2060,7 @@ static int __devinit i810fb_init_pci (struct pci_dev *dev,
2060 2060
2061 fb_var_to_videomode(&mode, &info->var); 2061 fb_var_to_videomode(&mode, &info->var);
2062 fb_add_videomode(&mode, &info->modelist); 2062 fb_add_videomode(&mode, &info->modelist);
2063 encode_fix(&info->fix, info); 2063
2064
2065 i810fb_init_ringbuffer(info); 2064 i810fb_init_ringbuffer(info);
2066 err = register_framebuffer(info); 2065 err = register_framebuffer(info);
2067 2066
diff --git a/drivers/video/matrox/matroxfb_base.c b/drivers/video/matrox/matroxfb_base.c
index 76bc51b616d1..0c1049b308bf 100644
--- a/drivers/video/matrox/matroxfb_base.c
+++ b/drivers/video/matrox/matroxfb_base.c
@@ -1876,7 +1876,6 @@ static int initMatrox2(WPMINFO struct board* b){
1876 } 1876 }
1877 matroxfb_init_fix(PMINFO2); 1877 matroxfb_init_fix(PMINFO2);
1878 ACCESS_FBINFO(fbcon.screen_base) = vaddr_va(ACCESS_FBINFO(video.vbase)); 1878 ACCESS_FBINFO(fbcon.screen_base) = vaddr_va(ACCESS_FBINFO(video.vbase));
1879 matroxfb_update_fix(PMINFO2);
1880 /* Normalize values (namely yres_virtual) */ 1879 /* Normalize values (namely yres_virtual) */
1881 matroxfb_check_var(&vesafb_defined, &ACCESS_FBINFO(fbcon)); 1880 matroxfb_check_var(&vesafb_defined, &ACCESS_FBINFO(fbcon));
1882 /* And put it into "current" var. Do NOT program hardware yet, or we'll not take over 1881 /* And put it into "current" var. Do NOT program hardware yet, or we'll not take over
@@ -2083,7 +2082,6 @@ static int matroxfb_probe(struct pci_dev* pdev, const struct pci_device_id* dumm
2083 spin_lock_init(&ACCESS_FBINFO(lock.accel)); 2082 spin_lock_init(&ACCESS_FBINFO(lock.accel));
2084 init_rwsem(&ACCESS_FBINFO(crtc2.lock)); 2083 init_rwsem(&ACCESS_FBINFO(crtc2.lock));
2085 init_rwsem(&ACCESS_FBINFO(altout.lock)); 2084 init_rwsem(&ACCESS_FBINFO(altout.lock));
2086 mutex_init(&ACCESS_FBINFO(fbcon).lock);
2087 mutex_init(&ACCESS_FBINFO(fbcon).mm_lock); 2085 mutex_init(&ACCESS_FBINFO(fbcon).mm_lock);
2088 ACCESS_FBINFO(irq_flags) = 0; 2086 ACCESS_FBINFO(irq_flags) = 0;
2089 init_waitqueue_head(&ACCESS_FBINFO(crtc1.vsync.wait)); 2087 init_waitqueue_head(&ACCESS_FBINFO(crtc1.vsync.wait));
diff --git a/drivers/video/matrox/matroxfb_crtc2.c b/drivers/video/matrox/matroxfb_crtc2.c
index 909e10a11898..ebcb5c6b4962 100644
--- a/drivers/video/matrox/matroxfb_crtc2.c
+++ b/drivers/video/matrox/matroxfb_crtc2.c
@@ -289,16 +289,18 @@ static int matroxfb_dh_release(struct fb_info* info, int user) {
289#undef m2info 289#undef m2info
290} 290}
291 291
292/*
293 * This function is called before the register_framebuffer so
294 * no locking is needed.
295 */
292static void matroxfb_dh_init_fix(struct matroxfb_dh_fb_info *m2info) 296static void matroxfb_dh_init_fix(struct matroxfb_dh_fb_info *m2info)
293{ 297{
294 struct fb_fix_screeninfo *fix = &m2info->fbcon.fix; 298 struct fb_fix_screeninfo *fix = &m2info->fbcon.fix;
295 299
296 strcpy(fix->id, "MATROX DH"); 300 strcpy(fix->id, "MATROX DH");
297 301
298 mutex_lock(&m2info->fbcon.mm_lock);
299 fix->smem_start = m2info->video.base; 302 fix->smem_start = m2info->video.base;
300 fix->smem_len = m2info->video.len_usable; 303 fix->smem_len = m2info->video.len_usable;
301 mutex_unlock(&m2info->fbcon.mm_lock);
302 fix->ypanstep = 1; 304 fix->ypanstep = 1;
303 fix->ywrapstep = 0; 305 fix->ywrapstep = 0;
304 fix->xpanstep = 8; /* TBD */ 306 fix->xpanstep = 8; /* TBD */
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c
index da983b720f08..8f24564f77b0 100644
--- a/drivers/video/sh_mobile_lcdcfb.c
+++ b/drivers/video/sh_mobile_lcdcfb.c
@@ -31,7 +31,7 @@ struct sh_mobile_lcdc_chan {
31 unsigned long enabled; /* ME and SE in LDCNT2R */ 31 unsigned long enabled; /* ME and SE in LDCNT2R */
32 struct sh_mobile_lcdc_chan_cfg cfg; 32 struct sh_mobile_lcdc_chan_cfg cfg;
33 u32 pseudo_palette[PALETTE_NR]; 33 u32 pseudo_palette[PALETTE_NR];
34 struct fb_info info; 34 struct fb_info *info;
35 dma_addr_t dma_handle; 35 dma_addr_t dma_handle;
36 struct fb_deferred_io defio; 36 struct fb_deferred_io defio;
37 struct scatterlist *sglist; 37 struct scatterlist *sglist;
@@ -442,22 +442,22 @@ static int sh_mobile_lcdc_start(struct sh_mobile_lcdc_priv *priv)
442 /* set bpp format in PKF[4:0] */ 442 /* set bpp format in PKF[4:0] */
443 tmp = lcdc_read_chan(ch, LDDFR); 443 tmp = lcdc_read_chan(ch, LDDFR);
444 tmp &= ~(0x0001001f); 444 tmp &= ~(0x0001001f);
445 tmp |= (priv->ch[k].info.var.bits_per_pixel == 16) ? 3 : 0; 445 tmp |= (ch->info->var.bits_per_pixel == 16) ? 3 : 0;
446 lcdc_write_chan(ch, LDDFR, tmp); 446 lcdc_write_chan(ch, LDDFR, tmp);
447 447
448 /* point out our frame buffer */ 448 /* point out our frame buffer */
449 lcdc_write_chan(ch, LDSA1R, ch->info.fix.smem_start); 449 lcdc_write_chan(ch, LDSA1R, ch->info->fix.smem_start);
450 450
451 /* set line size */ 451 /* set line size */
452 lcdc_write_chan(ch, LDMLSR, ch->info.fix.line_length); 452 lcdc_write_chan(ch, LDMLSR, ch->info->fix.line_length);
453 453
454 /* setup deferred io if SYS bus */ 454 /* setup deferred io if SYS bus */
455 tmp = ch->cfg.sys_bus_cfg.deferred_io_msec; 455 tmp = ch->cfg.sys_bus_cfg.deferred_io_msec;
456 if (ch->ldmt1r_value & (1 << 12) && tmp) { 456 if (ch->ldmt1r_value & (1 << 12) && tmp) {
457 ch->defio.deferred_io = sh_mobile_lcdc_deferred_io; 457 ch->defio.deferred_io = sh_mobile_lcdc_deferred_io;
458 ch->defio.delay = msecs_to_jiffies(tmp); 458 ch->defio.delay = msecs_to_jiffies(tmp);
459 ch->info.fbdefio = &ch->defio; 459 ch->info->fbdefio = &ch->defio;
460 fb_deferred_io_init(&ch->info); 460 fb_deferred_io_init(ch->info);
461 461
462 /* one-shot mode */ 462 /* one-shot mode */
463 lcdc_write_chan(ch, LDSM1R, 1); 463 lcdc_write_chan(ch, LDSM1R, 1);
@@ -503,12 +503,12 @@ static void sh_mobile_lcdc_stop(struct sh_mobile_lcdc_priv *priv)
503 * flush frame, and wait for frame end interrupt 503 * flush frame, and wait for frame end interrupt
504 * clean up deferred io and enable clock 504 * clean up deferred io and enable clock
505 */ 505 */
506 if (ch->info.fbdefio) { 506 if (ch->info->fbdefio) {
507 ch->frame_end = 0; 507 ch->frame_end = 0;
508 schedule_delayed_work(&ch->info.deferred_work, 0); 508 schedule_delayed_work(&ch->info->deferred_work, 0);
509 wait_event(ch->frame_end_wait, ch->frame_end); 509 wait_event(ch->frame_end_wait, ch->frame_end);
510 fb_deferred_io_cleanup(&ch->info); 510 fb_deferred_io_cleanup(ch->info);
511 ch->info.fbdefio = NULL; 511 ch->info->fbdefio = NULL;
512 sh_mobile_lcdc_clk_on(priv); 512 sh_mobile_lcdc_clk_on(priv);
513 } 513 }
514 514
@@ -817,9 +817,16 @@ static int __init sh_mobile_lcdc_probe(struct platform_device *pdev)
817 priv->base = ioremap_nocache(res->start, (res->end - res->start) + 1); 817 priv->base = ioremap_nocache(res->start, (res->end - res->start) + 1);
818 818
819 for (i = 0; i < j; i++) { 819 for (i = 0; i < j; i++) {
820 info = &priv->ch[i].info;
821 cfg = &priv->ch[i].cfg; 820 cfg = &priv->ch[i].cfg;
822 821
822 priv->ch[i].info = framebuffer_alloc(0, &pdev->dev);
823 if (!priv->ch[i].info) {
824 dev_err(&pdev->dev, "unable to allocate fb_info\n");
825 error = -ENOMEM;
826 break;
827 }
828
829 info = priv->ch[i].info;
823 info->fbops = &sh_mobile_lcdc_ops; 830 info->fbops = &sh_mobile_lcdc_ops;
824 info->var.xres = info->var.xres_virtual = cfg->lcd_cfg.xres; 831 info->var.xres = info->var.xres_virtual = cfg->lcd_cfg.xres;
825 info->var.yres = info->var.yres_virtual = cfg->lcd_cfg.yres; 832 info->var.yres = info->var.yres_virtual = cfg->lcd_cfg.yres;
@@ -872,7 +879,7 @@ static int __init sh_mobile_lcdc_probe(struct platform_device *pdev)
872 for (i = 0; i < j; i++) { 879 for (i = 0; i < j; i++) {
873 struct sh_mobile_lcdc_chan *ch = priv->ch + i; 880 struct sh_mobile_lcdc_chan *ch = priv->ch + i;
874 881
875 info = &ch->info; 882 info = ch->info;
876 883
877 if (info->fbdefio) { 884 if (info->fbdefio) {
878 priv->ch->sglist = vmalloc(sizeof(struct scatterlist) * 885 priv->ch->sglist = vmalloc(sizeof(struct scatterlist) *
@@ -915,15 +922,15 @@ static int sh_mobile_lcdc_remove(struct platform_device *pdev)
915 int i; 922 int i;
916 923
917 for (i = 0; i < ARRAY_SIZE(priv->ch); i++) 924 for (i = 0; i < ARRAY_SIZE(priv->ch); i++)
918 if (priv->ch[i].info.dev) 925 if (priv->ch[i].info->dev)
919 unregister_framebuffer(&priv->ch[i].info); 926 unregister_framebuffer(priv->ch[i].info);
920 927
921 sh_mobile_lcdc_stop(priv); 928 sh_mobile_lcdc_stop(priv);
922 929
923 for (i = 0; i < ARRAY_SIZE(priv->ch); i++) { 930 for (i = 0; i < ARRAY_SIZE(priv->ch); i++) {
924 info = &priv->ch[i].info; 931 info = priv->ch[i].info;
925 932
926 if (!info->device) 933 if (!info || !info->device)
927 continue; 934 continue;
928 935
929 if (priv->ch[i].sglist) 936 if (priv->ch[i].sglist)
@@ -932,6 +939,7 @@ static int sh_mobile_lcdc_remove(struct platform_device *pdev)
932 dma_free_coherent(&pdev->dev, info->fix.smem_len, 939 dma_free_coherent(&pdev->dev, info->fix.smem_len,
933 info->screen_base, priv->ch[i].dma_handle); 940 info->screen_base, priv->ch[i].dma_handle);
934 fb_dealloc_cmap(&info->cmap); 941 fb_dealloc_cmap(&info->cmap);
942 framebuffer_release(info);
935 } 943 }
936 944
937#ifdef CONFIG_HAVE_CLK 945#ifdef CONFIG_HAVE_CLK
diff --git a/drivers/video/sm501fb.c b/drivers/video/sm501fb.c
index 98f24f0ec00d..16d4f4c7d52b 100644
--- a/drivers/video/sm501fb.c
+++ b/drivers/video/sm501fb.c
@@ -1624,6 +1624,8 @@ static int __devinit sm501fb_start_one(struct sm501fb_info *info,
1624 if (!fbi) 1624 if (!fbi)
1625 return 0; 1625 return 0;
1626 1626
1627 mutex_init(&info->fb[head]->mm_lock);
1628
1627 ret = sm501fb_init_fb(info->fb[head], head, drvname); 1629 ret = sm501fb_init_fb(info->fb[head], head, drvname);
1628 if (ret) { 1630 if (ret) {
1629 dev_err(info->dev, "cannot initialise fb %s\n", drvname); 1631 dev_err(info->dev, "cannot initialise fb %s\n", drvname);
diff --git a/drivers/video/w100fb.c b/drivers/video/w100fb.c
index 8a141c2c637b..2376f688ec8b 100644
--- a/drivers/video/w100fb.c
+++ b/drivers/video/w100fb.c
@@ -748,8 +748,6 @@ int __init w100fb_probe(struct platform_device *pdev)
748 goto out; 748 goto out;
749 } 749 }
750 750
751 w100fb_set_par(info);
752
753 if (register_framebuffer(info) < 0) { 751 if (register_framebuffer(info) < 0) {
754 err = -EINVAL; 752 err = -EINVAL;
755 goto out; 753 goto out;
diff --git a/fs/afs/mntpt.c b/fs/afs/mntpt.c
index c52be53f6946..5ffb570cd3a8 100644
--- a/fs/afs/mntpt.c
+++ b/fs/afs/mntpt.c
@@ -17,7 +17,6 @@
17#include <linux/pagemap.h> 17#include <linux/pagemap.h>
18#include <linux/mount.h> 18#include <linux/mount.h>
19#include <linux/namei.h> 19#include <linux/namei.h>
20#include <linux/mnt_namespace.h>
21#include "internal.h" 20#include "internal.h"
22 21
23 22
diff --git a/fs/namespace.c b/fs/namespace.c
index 3dc283fd4716..277c28a63ead 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -22,6 +22,7 @@
22#include <linux/seq_file.h> 22#include <linux/seq_file.h>
23#include <linux/mnt_namespace.h> 23#include <linux/mnt_namespace.h>
24#include <linux/namei.h> 24#include <linux/namei.h>
25#include <linux/nsproxy.h>
25#include <linux/security.h> 26#include <linux/security.h>
26#include <linux/mount.h> 27#include <linux/mount.h>
27#include <linux/ramfs.h> 28#include <linux/ramfs.h>
diff --git a/fs/nfs/getroot.c b/fs/nfs/getroot.c
index 46177cb87064..b35d2a616066 100644
--- a/fs/nfs/getroot.c
+++ b/fs/nfs/getroot.c
@@ -30,7 +30,6 @@
30#include <linux/nfs_idmap.h> 30#include <linux/nfs_idmap.h>
31#include <linux/vfs.h> 31#include <linux/vfs.h>
32#include <linux/namei.h> 32#include <linux/namei.h>
33#include <linux/mnt_namespace.h>
34#include <linux/security.h> 33#include <linux/security.h>
35 34
36#include <asm/system.h> 35#include <asm/system.h>
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
index d3aeb061612b..7adea74d6a8a 100644
--- a/fs/reiserfs/super.c
+++ b/fs/reiserfs/super.c
@@ -24,7 +24,6 @@
24#include <linux/exportfs.h> 24#include <linux/exportfs.h>
25#include <linux/quotaops.h> 25#include <linux/quotaops.h>
26#include <linux/vfs.h> 26#include <linux/vfs.h>
27#include <linux/mnt_namespace.h>
28#include <linux/mount.h> 27#include <linux/mount.h>
29#include <linux/namei.h> 28#include <linux/namei.h>
30#include <linux/crc32.h> 29#include <linux/crc32.h>
diff --git a/include/linux/elfcore.h b/include/linux/elfcore.h
index 03ec16779802..00d6a68d0421 100644
--- a/include/linux/elfcore.h
+++ b/include/linux/elfcore.h
@@ -122,10 +122,9 @@ static inline void elf_core_copy_kernel_regs(elf_gregset_t *elfregs, struct pt_r
122 122
123static inline int elf_core_copy_task_regs(struct task_struct *t, elf_gregset_t* elfregs) 123static inline int elf_core_copy_task_regs(struct task_struct *t, elf_gregset_t* elfregs)
124{ 124{
125#ifdef ELF_CORE_COPY_TASK_REGS 125#if defined (ELF_CORE_COPY_TASK_REGS)
126
127 return ELF_CORE_COPY_TASK_REGS(t, elfregs); 126 return ELF_CORE_COPY_TASK_REGS(t, elfregs);
128#else 127#elif defined (task_pt_regs)
129 elf_core_copy_regs(elfregs, task_pt_regs(t)); 128 elf_core_copy_regs(elfregs, task_pt_regs(t));
130#endif 129#endif
131 return 0; 130 return 0;
diff --git a/include/linux/mnt_namespace.h b/include/linux/mnt_namespace.h
index 3beb2592b03f..d74785c2393a 100644
--- a/include/linux/mnt_namespace.h
+++ b/include/linux/mnt_namespace.h
@@ -2,10 +2,9 @@
2#define _NAMESPACE_H_ 2#define _NAMESPACE_H_
3#ifdef __KERNEL__ 3#ifdef __KERNEL__
4 4
5#include <linux/mount.h> 5#include <linux/path.h>
6#include <linux/sched.h>
7#include <linux/nsproxy.h>
8#include <linux/seq_file.h> 6#include <linux/seq_file.h>
7#include <linux/wait.h>
9 8
10struct mnt_namespace { 9struct mnt_namespace {
11 atomic_t count; 10 atomic_t count;
@@ -28,14 +27,6 @@ extern struct mnt_namespace *create_mnt_ns(struct vfsmount *mnt);
28extern struct mnt_namespace *copy_mnt_ns(unsigned long, struct mnt_namespace *, 27extern struct mnt_namespace *copy_mnt_ns(unsigned long, struct mnt_namespace *,
29 struct fs_struct *); 28 struct fs_struct *);
30extern void put_mnt_ns(struct mnt_namespace *ns); 29extern void put_mnt_ns(struct mnt_namespace *ns);
31
32static inline void exit_mnt_ns(struct task_struct *p)
33{
34 struct mnt_namespace *ns = p->nsproxy->mnt_ns;
35 if (ns)
36 put_mnt_ns(ns);
37}
38
39static inline void get_mnt_ns(struct mnt_namespace *ns) 30static inline void get_mnt_ns(struct mnt_namespace *ns)
40{ 31{
41 atomic_inc(&ns->count); 32 atomic_inc(&ns->count);
diff --git a/kernel/exit.c b/kernel/exit.c
index 628d41f0dd54..869dc221733e 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -12,7 +12,6 @@
12#include <linux/completion.h> 12#include <linux/completion.h>
13#include <linux/personality.h> 13#include <linux/personality.h>
14#include <linux/tty.h> 14#include <linux/tty.h>
15#include <linux/mnt_namespace.h>
16#include <linux/iocontext.h> 15#include <linux/iocontext.h>
17#include <linux/key.h> 16#include <linux/key.h>
18#include <linux/security.h> 17#include <linux/security.h>
diff --git a/kernel/fork.c b/kernel/fork.c
index 467746b3f0aa..bd2959228871 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -17,7 +17,6 @@
17#include <linux/module.h> 17#include <linux/module.h>
18#include <linux/vmalloc.h> 18#include <linux/vmalloc.h>
19#include <linux/completion.h> 19#include <linux/completion.h>
20#include <linux/mnt_namespace.h>
21#include <linux/personality.h> 20#include <linux/personality.h>
22#include <linux/mempolicy.h> 21#include <linux/mempolicy.h>
23#include <linux/sem.h> 22#include <linux/sem.h>
diff --git a/kernel/kmod.c b/kernel/kmod.c
index 7e95bedb2bfc..385c31a1bdbf 100644
--- a/kernel/kmod.c
+++ b/kernel/kmod.c
@@ -24,7 +24,6 @@
24#include <linux/unistd.h> 24#include <linux/unistd.h>
25#include <linux/kmod.h> 25#include <linux/kmod.h>
26#include <linux/slab.h> 26#include <linux/slab.h>
27#include <linux/mnt_namespace.h>
28#include <linux/completion.h> 27#include <linux/completion.h>
29#include <linux/file.h> 28#include <linux/file.h>
30#include <linux/fdtable.h> 29#include <linux/fdtable.h>