aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2005-08-15 16:02:50 -0400
committerLen Brown <len.brown@intel.com>2005-08-15 16:02:50 -0400
commitfb80cbee4c4bfeaeb2ff6611beecfb9a2443da90 (patch)
tree6e412d032cca4ddb50b8628b4bbecea120d316a7
parentb857c730d4e960d1876ff56ce5c4bd81ea9ff5ae (diff)
parent3edea4833a1efcd43e1dff082bc8001fdfe74b34 (diff)
Merge ../from-linus
-rw-r--r--drivers/video/fbmem.c4
-rw-r--r--drivers/video/intelfb/intelfbdrv.c50
-rw-r--r--fs/inotify.c2
-rw-r--r--fs/namei.c3
-rw-r--r--include/linux/fsnotify.h6
-rw-r--r--include/linux/inotify.h4
6 files changed, 40 insertions, 29 deletions
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index d2e19f6dd72c..4ff853fbe0be 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -628,7 +628,7 @@ fb_pan_display(struct fb_info *info, struct fb_var_screeninfo *var)
628int 628int
629fb_set_var(struct fb_info *info, struct fb_var_screeninfo *var) 629fb_set_var(struct fb_info *info, struct fb_var_screeninfo *var)
630{ 630{
631 int err; 631 int err, flags = info->flags;
632 632
633 if (var->activate & FB_ACTIVATE_INV_MODE) { 633 if (var->activate & FB_ACTIVATE_INV_MODE) {
634 struct fb_videomode mode1, mode2; 634 struct fb_videomode mode1, mode2;
@@ -682,7 +682,7 @@ fb_set_var(struct fb_info *info, struct fb_var_screeninfo *var)
682 !list_empty(&info->modelist)) 682 !list_empty(&info->modelist))
683 err = fb_add_videomode(&mode, &info->modelist); 683 err = fb_add_videomode(&mode, &info->modelist);
684 684
685 if (!err && info->flags & FBINFO_MISC_USEREVENT) { 685 if (!err && (flags & FBINFO_MISC_USEREVENT)) {
686 struct fb_event event; 686 struct fb_event event;
687 687
688 info->flags &= ~FBINFO_MISC_USEREVENT; 688 info->flags &= ~FBINFO_MISC_USEREVENT;
diff --git a/drivers/video/intelfb/intelfbdrv.c b/drivers/video/intelfb/intelfbdrv.c
index 298bc9cd99e7..a112a1786855 100644
--- a/drivers/video/intelfb/intelfbdrv.c
+++ b/drivers/video/intelfb/intelfbdrv.c
@@ -583,23 +583,6 @@ intelfb_pci_register(struct pci_dev *pdev, const struct pci_device_id *ent)
583 return -ENODEV; 583 return -ENODEV;
584 } 584 }
585 585
586 /* Map the fb and MMIO regions */
587 dinfo->aperture.virtual = (u8 __iomem *)ioremap_nocache
588 (dinfo->aperture.physical, dinfo->aperture.size);
589 if (!dinfo->aperture.virtual) {
590 ERR_MSG("Cannot remap FB region.\n");
591 cleanup(dinfo);
592 return -ENODEV;
593 }
594 dinfo->mmio_base =
595 (u8 __iomem *)ioremap_nocache(dinfo->mmio_base_phys,
596 INTEL_REG_SIZE);
597 if (!dinfo->mmio_base) {
598 ERR_MSG("Cannot remap MMIO region.\n");
599 cleanup(dinfo);
600 return -ENODEV;
601 }
602
603 /* Get the chipset info. */ 586 /* Get the chipset info. */
604 dinfo->pci_chipset = pdev->device; 587 dinfo->pci_chipset = pdev->device;
605 588
@@ -630,9 +613,15 @@ intelfb_pci_register(struct pci_dev *pdev, const struct pci_device_id *ent)
630 dinfo->accel = 0; 613 dinfo->accel = 0;
631 } 614 }
632 615
616 if (MB(voffset) < stolen_size)
617 offset = (stolen_size >> 12);
618 else
619 offset = ROUND_UP_TO_PAGE(MB(voffset))/GTT_PAGE_SIZE;
620
633 /* Framebuffer parameters - Use all the stolen memory if >= vram */ 621 /* Framebuffer parameters - Use all the stolen memory if >= vram */
634 if (ROUND_UP_TO_PAGE(stolen_size) >= MB(vram)) { 622 if (ROUND_UP_TO_PAGE(stolen_size) >= ((offset << 12) + MB(vram))) {
635 dinfo->fb.size = ROUND_UP_TO_PAGE(stolen_size); 623 dinfo->fb.size = ROUND_UP_TO_PAGE(stolen_size);
624 dinfo->fb.offset = 0;
636 dinfo->fbmem_gart = 0; 625 dinfo->fbmem_gart = 0;
637 } else { 626 } else {
638 dinfo->fb.size = MB(vram); 627 dinfo->fb.size = MB(vram);
@@ -663,11 +652,6 @@ intelfb_pci_register(struct pci_dev *pdev, const struct pci_device_id *ent)
663 return -ENODEV; 652 return -ENODEV;
664 } 653 }
665 654
666 if (MB(voffset) < stolen_size)
667 offset = (stolen_size >> 12);
668 else
669 offset = ROUND_UP_TO_PAGE(MB(voffset))/GTT_PAGE_SIZE;
670
671 /* set the mem offsets - set them after the already used pages */ 655 /* set the mem offsets - set them after the already used pages */
672 if (dinfo->accel) { 656 if (dinfo->accel) {
673 dinfo->ring.offset = offset + gtt_info.current_memory; 657 dinfo->ring.offset = offset + gtt_info.current_memory;
@@ -682,6 +666,26 @@ intelfb_pci_register(struct pci_dev *pdev, const struct pci_device_id *ent)
682 + (dinfo->cursor.size >> 12); 666 + (dinfo->cursor.size >> 12);
683 } 667 }
684 668
669 /* Map the fb and MMIO regions */
670 /* ioremap only up to the end of used aperture */
671 dinfo->aperture.virtual = (u8 __iomem *)ioremap_nocache
672 (dinfo->aperture.physical, (dinfo->fb.offset << 12)
673 + dinfo->fb.size);
674 if (!dinfo->aperture.virtual) {
675 ERR_MSG("Cannot remap FB region.\n");
676 cleanup(dinfo);
677 return -ENODEV;
678 }
679
680 dinfo->mmio_base =
681 (u8 __iomem *)ioremap_nocache(dinfo->mmio_base_phys,
682 INTEL_REG_SIZE);
683 if (!dinfo->mmio_base) {
684 ERR_MSG("Cannot remap MMIO region.\n");
685 cleanup(dinfo);
686 return -ENODEV;
687 }
688
685 /* Allocate memories (which aren't stolen) */ 689 /* Allocate memories (which aren't stolen) */
686 if (dinfo->accel) { 690 if (dinfo->accel) {
687 if (!(dinfo->gtt_ring_mem = 691 if (!(dinfo->gtt_ring_mem =
diff --git a/fs/inotify.c b/fs/inotify.c
index 27ebcac5e07f..868901b1e779 100644
--- a/fs/inotify.c
+++ b/fs/inotify.c
@@ -402,7 +402,7 @@ static struct inotify_watch *create_watch(struct inotify_device *dev,
402 return ERR_PTR(ret); 402 return ERR_PTR(ret);
403 } 403 }
404 404
405 dev->last_wd = ret; 405 dev->last_wd = watch->wd;
406 watch->mask = mask; 406 watch->mask = mask;
407 atomic_set(&watch->count, 0); 407 atomic_set(&watch->count, 0);
408 INIT_LIST_HEAD(&watch->d_list); 408 INIT_LIST_HEAD(&watch->d_list);
diff --git a/fs/namei.c b/fs/namei.c
index 57046d98a746..b85f158aef0c 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -2216,7 +2216,8 @@ int vfs_rename(struct inode *old_dir, struct dentry *old_dentry,
2216 error = vfs_rename_other(old_dir,old_dentry,new_dir,new_dentry); 2216 error = vfs_rename_other(old_dir,old_dentry,new_dir,new_dentry);
2217 if (!error) { 2217 if (!error) {
2218 const char *new_name = old_dentry->d_name.name; 2218 const char *new_name = old_dentry->d_name.name;
2219 fsnotify_move(old_dir, new_dir, old_name, new_name, is_dir, new_dentry->d_inode); 2219 fsnotify_move(old_dir, new_dir, old_name, new_name, is_dir,
2220 new_dentry->d_inode, old_dentry->d_inode);
2220 } 2221 }
2221 fsnotify_oldname_free(old_name); 2222 fsnotify_oldname_free(old_name);
2222 2223
diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h
index 602c305c8585..03b8e7932b83 100644
--- a/include/linux/fsnotify.h
+++ b/include/linux/fsnotify.h
@@ -21,7 +21,7 @@
21 */ 21 */
22static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir, 22static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir,
23 const char *old_name, const char *new_name, 23 const char *old_name, const char *new_name,
24 int isdir, struct inode *target) 24 int isdir, struct inode *target, struct inode *source)
25{ 25{
26 u32 cookie = inotify_get_cookie(); 26 u32 cookie = inotify_get_cookie();
27 27
@@ -41,6 +41,10 @@ static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir,
41 inotify_inode_queue_event(target, IN_DELETE_SELF, 0, NULL); 41 inotify_inode_queue_event(target, IN_DELETE_SELF, 0, NULL);
42 inotify_inode_is_dead(target); 42 inotify_inode_is_dead(target);
43 } 43 }
44
45 if (source) {
46 inotify_inode_queue_event(source, IN_MOVE_SELF, 0, NULL);
47 }
44} 48}
45 49
46/* 50/*
diff --git a/include/linux/inotify.h b/include/linux/inotify.h
index a40c2bf0408e..93bb3afe646b 100644
--- a/include/linux/inotify.h
+++ b/include/linux/inotify.h
@@ -35,6 +35,7 @@ struct inotify_event {
35#define IN_CREATE 0x00000100 /* Subfile was created */ 35#define IN_CREATE 0x00000100 /* Subfile was created */
36#define IN_DELETE 0x00000200 /* Subfile was deleted */ 36#define IN_DELETE 0x00000200 /* Subfile was deleted */
37#define IN_DELETE_SELF 0x00000400 /* Self was deleted */ 37#define IN_DELETE_SELF 0x00000400 /* Self was deleted */
38#define IN_MOVE_SELF 0x00000800 /* Self was moved */
38 39
39/* the following are legal events. they are sent as needed to any watch */ 40/* the following are legal events. they are sent as needed to any watch */
40#define IN_UNMOUNT 0x00002000 /* Backing fs was unmounted */ 41#define IN_UNMOUNT 0x00002000 /* Backing fs was unmounted */
@@ -56,7 +57,8 @@ struct inotify_event {
56 */ 57 */
57#define IN_ALL_EVENTS (IN_ACCESS | IN_MODIFY | IN_ATTRIB | IN_CLOSE_WRITE | \ 58#define IN_ALL_EVENTS (IN_ACCESS | IN_MODIFY | IN_ATTRIB | IN_CLOSE_WRITE | \
58 IN_CLOSE_NOWRITE | IN_OPEN | IN_MOVED_FROM | \ 59 IN_CLOSE_NOWRITE | IN_OPEN | IN_MOVED_FROM | \
59 IN_MOVED_TO | IN_DELETE | IN_CREATE | IN_DELETE_SELF) 60 IN_MOVED_TO | IN_DELETE | IN_CREATE | IN_DELETE_SELF | \
61 IN_MOVE_SELF)
60 62
61#ifdef __KERNEL__ 63#ifdef __KERNEL__
62 64