diff options
| -rw-r--r-- | drivers/char/rtc.c | 6 | ||||
| -rw-r--r-- | drivers/ide/pci/generic.c | 8 | ||||
| -rw-r--r-- | drivers/pci/msi.c | 4 | ||||
| -rw-r--r-- | drivers/pci/quirks.c | 49 | ||||
| -rw-r--r-- | fs/file.c | 6 | ||||
| -rw-r--r-- | fs/proc/kcore.c | 2 | ||||
| -rw-r--r-- | fs/sysfs/inode.c | 12 | ||||
| -rw-r--r-- | include/asm-frv/processor.h | 3 | ||||
| -rw-r--r-- | include/asm-h8300/processor.h | 3 | ||||
| -rw-r--r-- | include/asm-m68knommu/processor.h | 3 | ||||
| -rw-r--r-- | include/asm-sh/processor.h | 3 | ||||
| -rw-r--r-- | include/asm-sh64/processor.h | 3 | ||||
| -rw-r--r-- | include/asm-v850/processor.h | 3 | ||||
| -rw-r--r-- | include/asm-xtensa/processor.h | 3 | ||||
| -rw-r--r-- | kernel/sys.c | 2 |
15 files changed, 94 insertions, 16 deletions
diff --git a/drivers/char/rtc.c b/drivers/char/rtc.c index 6ccc364c08df..6e6a7c7a7eff 100644 --- a/drivers/char/rtc.c +++ b/drivers/char/rtc.c | |||
| @@ -1245,7 +1245,7 @@ static int rtc_proc_open(struct inode *inode, struct file *file) | |||
| 1245 | 1245 | ||
| 1246 | void rtc_get_rtc_time(struct rtc_time *rtc_tm) | 1246 | void rtc_get_rtc_time(struct rtc_time *rtc_tm) |
| 1247 | { | 1247 | { |
| 1248 | unsigned long uip_watchdog = jiffies; | 1248 | unsigned long uip_watchdog = jiffies, flags; |
| 1249 | unsigned char ctrl; | 1249 | unsigned char ctrl; |
| 1250 | #ifdef CONFIG_MACH_DECSTATION | 1250 | #ifdef CONFIG_MACH_DECSTATION |
| 1251 | unsigned int real_year; | 1251 | unsigned int real_year; |
| @@ -1272,7 +1272,7 @@ void rtc_get_rtc_time(struct rtc_time *rtc_tm) | |||
| 1272 | * RTC has RTC_DAY_OF_WEEK, we should usually ignore it, as it is | 1272 | * RTC has RTC_DAY_OF_WEEK, we should usually ignore it, as it is |
| 1273 | * only updated by the RTC when initially set to a non-zero value. | 1273 | * only updated by the RTC when initially set to a non-zero value. |
| 1274 | */ | 1274 | */ |
| 1275 | spin_lock_irq(&rtc_lock); | 1275 | spin_lock_irqsave(&rtc_lock, flags); |
| 1276 | rtc_tm->tm_sec = CMOS_READ(RTC_SECONDS); | 1276 | rtc_tm->tm_sec = CMOS_READ(RTC_SECONDS); |
| 1277 | rtc_tm->tm_min = CMOS_READ(RTC_MINUTES); | 1277 | rtc_tm->tm_min = CMOS_READ(RTC_MINUTES); |
| 1278 | rtc_tm->tm_hour = CMOS_READ(RTC_HOURS); | 1278 | rtc_tm->tm_hour = CMOS_READ(RTC_HOURS); |
| @@ -1286,7 +1286,7 @@ void rtc_get_rtc_time(struct rtc_time *rtc_tm) | |||
| 1286 | real_year = CMOS_READ(RTC_DEC_YEAR); | 1286 | real_year = CMOS_READ(RTC_DEC_YEAR); |
| 1287 | #endif | 1287 | #endif |
| 1288 | ctrl = CMOS_READ(RTC_CONTROL); | 1288 | ctrl = CMOS_READ(RTC_CONTROL); |
| 1289 | spin_unlock_irq(&rtc_lock); | 1289 | spin_unlock_irqrestore(&rtc_lock, flags); |
| 1290 | 1290 | ||
| 1291 | if (!(ctrl & RTC_DM_BINARY) || RTC_ALWAYS_BCD) | 1291 | if (!(ctrl & RTC_DM_BINARY) || RTC_ALWAYS_BCD) |
| 1292 | { | 1292 | { |
diff --git a/drivers/ide/pci/generic.c b/drivers/ide/pci/generic.c index f82e82109728..2f962cfa3f7f 100644 --- a/drivers/ide/pci/generic.c +++ b/drivers/ide/pci/generic.c | |||
| @@ -212,6 +212,9 @@ static int __devinit generic_init_one(struct pci_dev *dev, const struct pci_devi | |||
| 212 | (!(PCI_FUNC(dev->devfn) & 1))) | 212 | (!(PCI_FUNC(dev->devfn) & 1))) |
| 213 | goto out; | 213 | goto out; |
| 214 | 214 | ||
| 215 | if (dev->vendor == PCI_VENDOR_ID_JMICRON && PCI_FUNC(dev->devfn) != 1) | ||
| 216 | goto out; | ||
| 217 | |||
| 215 | pci_read_config_word(dev, PCI_COMMAND, &command); | 218 | pci_read_config_word(dev, PCI_COMMAND, &command); |
| 216 | if (!(command & PCI_COMMAND_IO)) { | 219 | if (!(command & PCI_COMMAND_IO)) { |
| 217 | printk(KERN_INFO "Skipping disabled %s IDE controller.\n", d->name); | 220 | printk(KERN_INFO "Skipping disabled %s IDE controller.\n", d->name); |
| @@ -239,6 +242,11 @@ static struct pci_device_id generic_pci_tbl[] = { | |||
| 239 | { PCI_VENDOR_ID_TOSHIBA,PCI_DEVICE_ID_TOSHIBA_PICCOLO_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 12}, | 242 | { PCI_VENDOR_ID_TOSHIBA,PCI_DEVICE_ID_TOSHIBA_PICCOLO_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 12}, |
| 240 | { PCI_VENDOR_ID_TOSHIBA,PCI_DEVICE_ID_TOSHIBA_PICCOLO_2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 13}, | 243 | { PCI_VENDOR_ID_TOSHIBA,PCI_DEVICE_ID_TOSHIBA_PICCOLO_2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 13}, |
| 241 | { PCI_VENDOR_ID_NETCELL,PCI_DEVICE_ID_REVOLUTION, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 14}, | 244 | { PCI_VENDOR_ID_NETCELL,PCI_DEVICE_ID_REVOLUTION, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 14}, |
| 245 | { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB361, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 15}, | ||
| 246 | { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB363, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 16}, | ||
| 247 | { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB365, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 17}, | ||
| 248 | { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB366, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 18}, | ||
| 249 | { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB368, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 19}, | ||
| 242 | /* Must come last. If you add entries adjust this table appropriately and the init_one code */ | 250 | /* Must come last. If you add entries adjust this table appropriately and the init_one code */ |
| 243 | { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_STORAGE_IDE << 8, 0xFFFFFF00UL, 0}, | 251 | { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_STORAGE_IDE << 8, 0xFFFFFF00UL, 0}, |
| 244 | { 0, }, | 252 | { 0, }, |
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index 36bc7c415af7..a83c1f5735d6 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c | |||
| @@ -47,13 +47,13 @@ msi_register(struct msi_ops *ops) | |||
| 47 | 47 | ||
| 48 | static void msi_cache_ctor(void *p, kmem_cache_t *cache, unsigned long flags) | 48 | static void msi_cache_ctor(void *p, kmem_cache_t *cache, unsigned long flags) |
| 49 | { | 49 | { |
| 50 | memset(p, 0, NR_IRQS * sizeof(struct msi_desc)); | 50 | memset(p, 0, sizeof(struct msi_desc)); |
| 51 | } | 51 | } |
| 52 | 52 | ||
| 53 | static int msi_cache_init(void) | 53 | static int msi_cache_init(void) |
| 54 | { | 54 | { |
| 55 | msi_cachep = kmem_cache_create("msi_cache", | 55 | msi_cachep = kmem_cache_create("msi_cache", |
| 56 | NR_IRQS * sizeof(struct msi_desc), | 56 | sizeof(struct msi_desc), |
| 57 | 0, SLAB_HWCACHE_ALIGN, msi_cache_ctor, NULL); | 57 | 0, SLAB_HWCACHE_ALIGN, msi_cache_ctor, NULL); |
| 58 | if (!msi_cachep) | 58 | if (!msi_cachep) |
| 59 | return -ENOMEM; | 59 | return -ENOMEM; |
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index e9a57afa1a08..de3bbc88fb26 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c | |||
| @@ -1175,6 +1175,55 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_962, quirk_sis_96x_ | |||
| 1175 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_963, quirk_sis_96x_smbus ); | 1175 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_963, quirk_sis_96x_smbus ); |
| 1176 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_LPC, quirk_sis_96x_smbus ); | 1176 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_LPC, quirk_sis_96x_smbus ); |
| 1177 | 1177 | ||
| 1178 | #if defined(CONFIG_SCSI_SATA) || defined(CONFIG_SCSI_SATA_MODULE) | ||
| 1179 | |||
| 1180 | /* | ||
| 1181 | * If we are using libata we can drive this chip properly but must | ||
| 1182 | * do this early on to make the additional device appear during | ||
| 1183 | * the PCI scanning. | ||
| 1184 | */ | ||
| 1185 | |||
| 1186 | static void __devinit quirk_jmicron_dualfn(struct pci_dev *pdev) | ||
| 1187 | { | ||
| 1188 | u32 conf; | ||
| 1189 | u8 hdr; | ||
| 1190 | |||
| 1191 | /* Only poke fn 0 */ | ||
| 1192 | if (PCI_FUNC(pdev->devfn)) | ||
| 1193 | return; | ||
| 1194 | |||
| 1195 | switch(pdev->device) { | ||
| 1196 | case PCI_DEVICE_ID_JMICRON_JMB365: | ||
| 1197 | case PCI_DEVICE_ID_JMICRON_JMB366: | ||
| 1198 | /* Redirect IDE second PATA port to the right spot */ | ||
| 1199 | pci_read_config_dword(pdev, 0x80, &conf); | ||
| 1200 | conf |= (1 << 24); | ||
| 1201 | /* Fall through */ | ||
| 1202 | pci_write_config_dword(pdev, 0x80, conf); | ||
| 1203 | case PCI_DEVICE_ID_JMICRON_JMB361: | ||
| 1204 | case PCI_DEVICE_ID_JMICRON_JMB363: | ||
| 1205 | pci_read_config_dword(pdev, 0x40, &conf); | ||
| 1206 | /* Enable dual function mode, AHCI on fn 0, IDE fn1 */ | ||
| 1207 | /* Set the class codes correctly and then direct IDE 0 */ | ||
| 1208 | conf &= ~0x000F0200; /* Clear bit 9 and 16-19 */ | ||
| 1209 | conf |= 0x00C20002; /* Set bit 1, 17, 22, 23 */ | ||
| 1210 | pci_write_config_dword(pdev, 0x40, conf); | ||
| 1211 | |||
| 1212 | /* Reconfigure so that the PCI scanner discovers the | ||
| 1213 | device is now multifunction */ | ||
| 1214 | |||
| 1215 | pci_read_config_byte(pdev, PCI_HEADER_TYPE, &hdr); | ||
| 1216 | pdev->hdr_type = hdr & 0x7f; | ||
| 1217 | pdev->multifunction = !!(hdr & 0x80); | ||
| 1218 | |||
| 1219 | break; | ||
| 1220 | } | ||
| 1221 | } | ||
| 1222 | |||
| 1223 | DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, quirk_jmicron_dualfn); | ||
| 1224 | |||
| 1225 | #endif | ||
| 1226 | |||
| 1178 | #ifdef CONFIG_X86_IO_APIC | 1227 | #ifdef CONFIG_X86_IO_APIC |
| 1179 | static void __init quirk_alder_ioapic(struct pci_dev *pdev) | 1228 | static void __init quirk_alder_ioapic(struct pci_dev *pdev) |
| 1180 | { | 1229 | { |
| @@ -240,7 +240,7 @@ static struct fdtable *alloc_fdtable(int nr) | |||
| 240 | if (!fdt) | 240 | if (!fdt) |
| 241 | goto out; | 241 | goto out; |
| 242 | 242 | ||
| 243 | nfds = max_t(int, 8 * L1_CACHE_BYTES, roundup_pow_of_two(nfds)); | 243 | nfds = max_t(int, 8 * L1_CACHE_BYTES, roundup_pow_of_two(nr + 1)); |
| 244 | if (nfds > NR_OPEN) | 244 | if (nfds > NR_OPEN) |
| 245 | nfds = NR_OPEN; | 245 | nfds = NR_OPEN; |
| 246 | 246 | ||
| @@ -273,11 +273,13 @@ static struct fdtable *alloc_fdtable(int nr) | |||
| 273 | } while (nfds <= nr); | 273 | } while (nfds <= nr); |
| 274 | new_fds = alloc_fd_array(nfds); | 274 | new_fds = alloc_fd_array(nfds); |
| 275 | if (!new_fds) | 275 | if (!new_fds) |
| 276 | goto out; | 276 | goto out2; |
| 277 | fdt->fd = new_fds; | 277 | fdt->fd = new_fds; |
| 278 | fdt->max_fds = nfds; | 278 | fdt->max_fds = nfds; |
| 279 | fdt->free_files = NULL; | 279 | fdt->free_files = NULL; |
| 280 | return fdt; | 280 | return fdt; |
| 281 | out2: | ||
| 282 | nfds = fdt->max_fdset; | ||
| 281 | out: | 283 | out: |
| 282 | if (new_openset) | 284 | if (new_openset) |
| 283 | free_fdset(new_openset, nfds); | 285 | free_fdset(new_openset, nfds); |
diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c index 8d6d85d7400f..6a984f64edd7 100644 --- a/fs/proc/kcore.c +++ b/fs/proc/kcore.c | |||
| @@ -382,7 +382,7 @@ read_kcore(struct file *file, char __user *buffer, size_t buflen, loff_t *fpos) | |||
| 382 | */ | 382 | */ |
| 383 | if (n) { | 383 | if (n) { |
| 384 | if (clear_user(buffer + tsz - n, | 384 | if (clear_user(buffer + tsz - n, |
| 385 | tsz - n)) | 385 | n)) |
| 386 | return -EFAULT; | 386 | return -EFAULT; |
| 387 | } | 387 | } |
| 388 | } else { | 388 | } else { |
diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c index 5e0e31cc46f5..9889e54e1f13 100644 --- a/fs/sysfs/inode.c +++ b/fs/sysfs/inode.c | |||
| @@ -109,6 +109,17 @@ static inline void set_inode_attr(struct inode * inode, struct iattr * iattr) | |||
| 109 | inode->i_ctime = iattr->ia_ctime; | 109 | inode->i_ctime = iattr->ia_ctime; |
| 110 | } | 110 | } |
| 111 | 111 | ||
| 112 | |||
| 113 | /* | ||
| 114 | * sysfs has a different i_mutex lock order behavior for i_mutex than other | ||
| 115 | * filesystems; sysfs i_mutex is called in many places with subsystem locks | ||
| 116 | * held. At the same time, many of the VFS locking rules do not apply to | ||
| 117 | * sysfs at all (cross directory rename for example). To untangle this mess | ||
| 118 | * (which gives false positives in lockdep), we're giving sysfs inodes their | ||
| 119 | * own class for i_mutex. | ||
| 120 | */ | ||
| 121 | static struct lock_class_key sysfs_inode_imutex_key; | ||
| 122 | |||
| 112 | struct inode * sysfs_new_inode(mode_t mode, struct sysfs_dirent * sd) | 123 | struct inode * sysfs_new_inode(mode_t mode, struct sysfs_dirent * sd) |
| 113 | { | 124 | { |
| 114 | struct inode * inode = new_inode(sysfs_sb); | 125 | struct inode * inode = new_inode(sysfs_sb); |
| @@ -118,6 +129,7 @@ struct inode * sysfs_new_inode(mode_t mode, struct sysfs_dirent * sd) | |||
| 118 | inode->i_mapping->a_ops = &sysfs_aops; | 129 | inode->i_mapping->a_ops = &sysfs_aops; |
| 119 | inode->i_mapping->backing_dev_info = &sysfs_backing_dev_info; | 130 | inode->i_mapping->backing_dev_info = &sysfs_backing_dev_info; |
| 120 | inode->i_op = &sysfs_inode_operations; | 131 | inode->i_op = &sysfs_inode_operations; |
| 132 | lockdep_set_class(&inode->i_mutex, &sysfs_inode_imutex_key); | ||
| 121 | 133 | ||
| 122 | if (sd->s_iattr) { | 134 | if (sd->s_iattr) { |
| 123 | /* sysfs_dirent has non-default attributes | 135 | /* sysfs_dirent has non-default attributes |
diff --git a/include/asm-frv/processor.h b/include/asm-frv/processor.h index 1c4dba1c5f57..3744f2e47f48 100644 --- a/include/asm-frv/processor.h +++ b/include/asm-frv/processor.h | |||
| @@ -21,6 +21,7 @@ | |||
| 21 | */ | 21 | */ |
| 22 | #define current_text_addr() ({ __label__ _l; _l: &&_l;}) | 22 | #define current_text_addr() ({ __label__ _l; _l: &&_l;}) |
| 23 | 23 | ||
| 24 | #include <linux/compiler.h> | ||
| 24 | #include <linux/linkage.h> | 25 | #include <linux/linkage.h> |
| 25 | #include <asm/sections.h> | 26 | #include <asm/sections.h> |
| 26 | #include <asm/segment.h> | 27 | #include <asm/segment.h> |
| @@ -139,7 +140,7 @@ unsigned long get_wchan(struct task_struct *p); | |||
| 139 | extern struct task_struct *alloc_task_struct(void); | 140 | extern struct task_struct *alloc_task_struct(void); |
| 140 | extern void free_task_struct(struct task_struct *p); | 141 | extern void free_task_struct(struct task_struct *p); |
| 141 | 142 | ||
| 142 | #define cpu_relax() do { } while (0) | 143 | #define cpu_relax() barrier() |
| 143 | 144 | ||
| 144 | /* data cache prefetch */ | 145 | /* data cache prefetch */ |
| 145 | #define ARCH_HAS_PREFETCH | 146 | #define ARCH_HAS_PREFETCH |
diff --git a/include/asm-h8300/processor.h b/include/asm-h8300/processor.h index c7e2f454b83a..99b664aa2083 100644 --- a/include/asm-h8300/processor.h +++ b/include/asm-h8300/processor.h | |||
| @@ -17,6 +17,7 @@ | |||
| 17 | */ | 17 | */ |
| 18 | #define current_text_addr() ({ __label__ _l; _l: &&_l;}) | 18 | #define current_text_addr() ({ __label__ _l; _l: &&_l;}) |
| 19 | 19 | ||
| 20 | #include <linux/compiler.h> | ||
| 20 | #include <asm/segment.h> | 21 | #include <asm/segment.h> |
| 21 | #include <asm/fpu.h> | 22 | #include <asm/fpu.h> |
| 22 | #include <asm/ptrace.h> | 23 | #include <asm/ptrace.h> |
| @@ -129,6 +130,6 @@ unsigned long get_wchan(struct task_struct *p); | |||
| 129 | eip; }) | 130 | eip; }) |
| 130 | #define KSTK_ESP(tsk) ((tsk) == current ? rdusp() : (tsk)->thread.usp) | 131 | #define KSTK_ESP(tsk) ((tsk) == current ? rdusp() : (tsk)->thread.usp) |
| 131 | 132 | ||
| 132 | #define cpu_relax() do { } while (0) | 133 | #define cpu_relax() barrier() |
| 133 | 134 | ||
| 134 | #endif | 135 | #endif |
diff --git a/include/asm-m68knommu/processor.h b/include/asm-m68knommu/processor.h index 0ee158e09abb..9d3a1bf41231 100644 --- a/include/asm-m68knommu/processor.h +++ b/include/asm-m68knommu/processor.h | |||
| @@ -13,6 +13,7 @@ | |||
| 13 | */ | 13 | */ |
| 14 | #define current_text_addr() ({ __label__ _l; _l: &&_l;}) | 14 | #define current_text_addr() ({ __label__ _l; _l: &&_l;}) |
| 15 | 15 | ||
| 16 | #include <linux/compiler.h> | ||
| 16 | #include <linux/threads.h> | 17 | #include <linux/threads.h> |
| 17 | #include <asm/types.h> | 18 | #include <asm/types.h> |
| 18 | #include <asm/segment.h> | 19 | #include <asm/segment.h> |
| @@ -137,6 +138,6 @@ unsigned long get_wchan(struct task_struct *p); | |||
| 137 | eip; }) | 138 | eip; }) |
| 138 | #define KSTK_ESP(tsk) ((tsk) == current ? rdusp() : (tsk)->thread.usp) | 139 | #define KSTK_ESP(tsk) ((tsk) == current ? rdusp() : (tsk)->thread.usp) |
| 139 | 140 | ||
| 140 | #define cpu_relax() do { } while (0) | 141 | #define cpu_relax() barrier() |
| 141 | 142 | ||
| 142 | #endif | 143 | #endif |
diff --git a/include/asm-sh/processor.h b/include/asm-sh/processor.h index fa5bd2d8803e..eeb0f48bb99e 100644 --- a/include/asm-sh/processor.h +++ b/include/asm-sh/processor.h | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | #define __ASM_SH_PROCESSOR_H | 9 | #define __ASM_SH_PROCESSOR_H |
| 10 | #ifdef __KERNEL__ | 10 | #ifdef __KERNEL__ |
| 11 | 11 | ||
| 12 | #include <linux/compiler.h> | ||
| 12 | #include <asm/page.h> | 13 | #include <asm/page.h> |
| 13 | #include <asm/types.h> | 14 | #include <asm/types.h> |
| 14 | #include <asm/cache.h> | 15 | #include <asm/cache.h> |
| @@ -263,7 +264,7 @@ extern unsigned long get_wchan(struct task_struct *p); | |||
| 263 | #define KSTK_ESP(tsk) ((tsk)->thread.sp) | 264 | #define KSTK_ESP(tsk) ((tsk)->thread.sp) |
| 264 | 265 | ||
| 265 | #define cpu_sleep() __asm__ __volatile__ ("sleep" : : : "memory") | 266 | #define cpu_sleep() __asm__ __volatile__ ("sleep" : : : "memory") |
| 266 | #define cpu_relax() do { } while (0) | 267 | #define cpu_relax() barrier() |
| 267 | 268 | ||
| 268 | #endif /* __KERNEL__ */ | 269 | #endif /* __KERNEL__ */ |
| 269 | #endif /* __ASM_SH_PROCESSOR_H */ | 270 | #endif /* __ASM_SH_PROCESSOR_H */ |
diff --git a/include/asm-sh64/processor.h b/include/asm-sh64/processor.h index 1bf252dad824..eb2bee4b47b9 100644 --- a/include/asm-sh64/processor.h +++ b/include/asm-sh64/processor.h | |||
| @@ -22,6 +22,7 @@ | |||
| 22 | #include <asm/cache.h> | 22 | #include <asm/cache.h> |
| 23 | #include <asm/registers.h> | 23 | #include <asm/registers.h> |
| 24 | #include <linux/threads.h> | 24 | #include <linux/threads.h> |
| 25 | #include <linux/compiler.h> | ||
| 25 | 26 | ||
| 26 | /* | 27 | /* |
| 27 | * Default implementation of macro that returns current | 28 | * Default implementation of macro that returns current |
| @@ -279,7 +280,7 @@ extern unsigned long get_wchan(struct task_struct *p); | |||
| 279 | #define KSTK_EIP(tsk) ((tsk)->thread.pc) | 280 | #define KSTK_EIP(tsk) ((tsk)->thread.pc) |
| 280 | #define KSTK_ESP(tsk) ((tsk)->thread.sp) | 281 | #define KSTK_ESP(tsk) ((tsk)->thread.sp) |
| 281 | 282 | ||
| 282 | #define cpu_relax() do { } while (0) | 283 | #define cpu_relax() barrier() |
| 283 | 284 | ||
| 284 | #endif /* __ASSEMBLY__ */ | 285 | #endif /* __ASSEMBLY__ */ |
| 285 | #endif /* __ASM_SH64_PROCESSOR_H */ | 286 | #endif /* __ASM_SH64_PROCESSOR_H */ |
diff --git a/include/asm-v850/processor.h b/include/asm-v850/processor.h index 6965b66ccaed..979e3467f9af 100644 --- a/include/asm-v850/processor.h +++ b/include/asm-v850/processor.h | |||
| @@ -18,6 +18,7 @@ | |||
| 18 | #include <linux/thread_info.h> | 18 | #include <linux/thread_info.h> |
| 19 | #endif | 19 | #endif |
| 20 | 20 | ||
| 21 | #include <linux/compiler.h> | ||
| 21 | #include <asm/ptrace.h> | 22 | #include <asm/ptrace.h> |
| 22 | #include <asm/entry.h> | 23 | #include <asm/entry.h> |
| 23 | 24 | ||
| @@ -106,7 +107,7 @@ unsigned long get_wchan (struct task_struct *p); | |||
| 106 | #define KSTK_ESP(task) task_sp (task) | 107 | #define KSTK_ESP(task) task_sp (task) |
| 107 | 108 | ||
| 108 | 109 | ||
| 109 | #define cpu_relax() ((void)0) | 110 | #define cpu_relax() barrier() |
| 110 | 111 | ||
| 111 | 112 | ||
| 112 | #else /* __ASSEMBLY__ */ | 113 | #else /* __ASSEMBLY__ */ |
diff --git a/include/asm-xtensa/processor.h b/include/asm-xtensa/processor.h index d1d72ad36f08..8b96e77c9d82 100644 --- a/include/asm-xtensa/processor.h +++ b/include/asm-xtensa/processor.h | |||
| @@ -20,6 +20,7 @@ | |||
| 20 | #include <xtensa/config/tie.h> | 20 | #include <xtensa/config/tie.h> |
| 21 | #include <xtensa/config/system.h> | 21 | #include <xtensa/config/system.h> |
| 22 | 22 | ||
| 23 | #include <linux/compiler.h> | ||
| 23 | #include <asm/ptrace.h> | 24 | #include <asm/ptrace.h> |
| 24 | #include <asm/types.h> | 25 | #include <asm/types.h> |
| 25 | #include <asm/coprocessor.h> | 26 | #include <asm/coprocessor.h> |
| @@ -191,7 +192,7 @@ extern unsigned long get_wchan(struct task_struct *p); | |||
| 191 | #define KSTK_EIP(tsk) (task_pt_regs(tsk)->pc) | 192 | #define KSTK_EIP(tsk) (task_pt_regs(tsk)->pc) |
| 192 | #define KSTK_ESP(tsk) (task_pt_regs(tsk)->areg[1]) | 193 | #define KSTK_ESP(tsk) (task_pt_regs(tsk)->areg[1]) |
| 193 | 194 | ||
| 194 | #define cpu_relax() do { } while (0) | 195 | #define cpu_relax() barrier() |
| 195 | 196 | ||
| 196 | /* Special register access. */ | 197 | /* Special register access. */ |
| 197 | 198 | ||
diff --git a/kernel/sys.c b/kernel/sys.c index dbb3b9c7ea64..e236f98f7ec5 100644 --- a/kernel/sys.c +++ b/kernel/sys.c | |||
| @@ -1983,7 +1983,7 @@ asmlinkage long sys_prctl(int option, unsigned long arg2, unsigned long arg3, | |||
| 1983 | error = current->mm->dumpable; | 1983 | error = current->mm->dumpable; |
| 1984 | break; | 1984 | break; |
| 1985 | case PR_SET_DUMPABLE: | 1985 | case PR_SET_DUMPABLE: |
| 1986 | if (arg2 < 0 || arg2 > 2) { | 1986 | if (arg2 < 0 || arg2 > 1) { |
| 1987 | error = -EINVAL; | 1987 | error = -EINVAL; |
| 1988 | break; | 1988 | break; |
| 1989 | } | 1989 | } |
