aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2007-09-13 11:24:25 -0400
committerPaul Mackerras <paulus@samba.org>2007-09-13 11:24:25 -0400
commitb2315372eac9cd9f622c32a93e323cf6f0f03462 (patch)
tree9e1faa7cdcddf5d90bec4fb9523742d4cce699a1 /drivers/char
parent5326152fa182b0a16e4abf913ce403e3c7ab53b7 (diff)
parentc87ce65868bbf9bbea9c3f112ff8315302daf8f2 (diff)
Merge branch 'linux-2.6' into for-2.6.24
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/agp/intel-agp.c10
-rw-r--r--drivers/char/hpet.c3
-rw-r--r--drivers/char/tty_ioctl.c4
3 files changed, 14 insertions, 3 deletions
diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c
index 2c9ca2c64628..7c69bf259caa 100644
--- a/drivers/char/agp/intel-agp.c
+++ b/drivers/char/agp/intel-agp.c
@@ -506,6 +506,11 @@ static void intel_i830_init_gtt_entries(void)
506 break; 506 break;
507 } 507 }
508 } else { 508 } else {
509 /* G33's GTT stolen memory is separate from gfx data
510 * stolen memory.
511 */
512 if (IS_G33)
513 size = 0;
509 switch (gmch_ctrl & I830_GMCH_GMS_MASK) { 514 switch (gmch_ctrl & I830_GMCH_GMS_MASK) {
510 case I855_GMCH_GMS_STOLEN_1M: 515 case I855_GMCH_GMS_STOLEN_1M:
511 gtt_entries = MB(1) - KB(size); 516 gtt_entries = MB(1) - KB(size);
@@ -914,6 +919,7 @@ static int intel_i915_create_gatt_table(struct agp_bridge_data *bridge)
914 struct aper_size_info_fixed *size; 919 struct aper_size_info_fixed *size;
915 int num_entries; 920 int num_entries;
916 u32 temp, temp2; 921 u32 temp, temp2;
922 int gtt_map_size = 256 * 1024;
917 923
918 size = agp_bridge->current_size; 924 size = agp_bridge->current_size;
919 page_order = size->page_order; 925 page_order = size->page_order;
@@ -923,7 +929,9 @@ static int intel_i915_create_gatt_table(struct agp_bridge_data *bridge)
923 pci_read_config_dword(intel_private.pcidev, I915_MMADDR, &temp); 929 pci_read_config_dword(intel_private.pcidev, I915_MMADDR, &temp);
924 pci_read_config_dword(intel_private.pcidev, I915_PTEADDR,&temp2); 930 pci_read_config_dword(intel_private.pcidev, I915_PTEADDR,&temp2);
925 931
926 intel_private.gtt = ioremap(temp2, 256 * 1024); 932 if (IS_G33)
933 gtt_map_size = 1024 * 1024; /* 1M on G33 */
934 intel_private.gtt = ioremap(temp2, gtt_map_size);
927 if (!intel_private.gtt) 935 if (!intel_private.gtt)
928 return -ENOMEM; 936 return -ENOMEM;
929 937
diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c
index 77bf4aa217a8..7ecffc9c738f 100644
--- a/drivers/char/hpet.c
+++ b/drivers/char/hpet.c
@@ -909,6 +909,8 @@ int hpet_alloc(struct hpet_data *hdp)
909 909
910 hpetp->hp_delta = hpet_calibrate(hpetp); 910 hpetp->hp_delta = hpet_calibrate(hpetp);
911 911
912/* This clocksource driver currently only works on ia64 */
913#ifdef CONFIG_IA64
912 if (!hpet_clocksource) { 914 if (!hpet_clocksource) {
913 hpet_mctr = (void __iomem *)&hpetp->hp_hpet->hpet_mc; 915 hpet_mctr = (void __iomem *)&hpetp->hp_hpet->hpet_mc;
914 CLKSRC_FSYS_MMIO_SET(clocksource_hpet.fsys_mmio, hpet_mctr); 916 CLKSRC_FSYS_MMIO_SET(clocksource_hpet.fsys_mmio, hpet_mctr);
@@ -918,6 +920,7 @@ int hpet_alloc(struct hpet_data *hdp)
918 hpetp->hp_clocksource = &clocksource_hpet; 920 hpetp->hp_clocksource = &clocksource_hpet;
919 hpet_clocksource = &clocksource_hpet; 921 hpet_clocksource = &clocksource_hpet;
920 } 922 }
923#endif
921 924
922 return 0; 925 return 0;
923} 926}
diff --git a/drivers/char/tty_ioctl.c b/drivers/char/tty_ioctl.c
index 3423e9ee6481..4a8969cef315 100644
--- a/drivers/char/tty_ioctl.c
+++ b/drivers/char/tty_ioctl.c
@@ -796,14 +796,14 @@ int n_tty_ioctl(struct tty_struct * tty, struct file * file,
796 retval = inq_canon(tty); 796 retval = inq_canon(tty);
797 return put_user(retval, (unsigned int __user *) arg); 797 return put_user(retval, (unsigned int __user *) arg);
798 case TIOCGLCKTRMIOS: 798 case TIOCGLCKTRMIOS:
799 if (kernel_termios_to_user_termios((struct termios __user *)arg, real_tty->termios_locked)) 799 if (kernel_termios_to_user_termios_1((struct termios __user *)arg, real_tty->termios_locked))
800 return -EFAULT; 800 return -EFAULT;
801 return 0; 801 return 0;
802 802
803 case TIOCSLCKTRMIOS: 803 case TIOCSLCKTRMIOS:
804 if (!capable(CAP_SYS_ADMIN)) 804 if (!capable(CAP_SYS_ADMIN))
805 return -EPERM; 805 return -EPERM;
806 if (user_termios_to_kernel_termios(real_tty->termios_locked, (struct termios __user *) arg)) 806 if (user_termios_to_kernel_termios_1(real_tty->termios_locked, (struct termios __user *) arg))
807 return -EFAULT; 807 return -EFAULT;
808 return 0; 808 return 0;
809 809