diff options
author | KalimochoAz <calimochoazucarado@gmail.com> | 2012-04-02 22:49:12 +0200 |
---|---|---|
committer | KalimochoAz <calimochoazucarado@gmail.com> | 2012-04-02 22:49:12 +0200 |
commit | 65e6f0b461da6590830416b104c665f147f13178 (patch) | |
tree | cce33e89918b1763fda0f7806d2f39cfa0e7ebb5 /kernel | |
parent | d8ca466b14410314d0c1dbe58ad57c44d789cd25 (diff) | |
parent | 8aa122f38398503c72a83f15c815e84e6e6e6890 (diff) | |
download | kernel_samsung_crespo-65e6f0b461da6590830416b104c665f147f13178.zip kernel_samsung_crespo-65e6f0b461da6590830416b104c665f147f13178.tar.gz kernel_samsung_crespo-65e6f0b461da6590830416b104c665f147f13178.tar.bz2 |
Merge branch 'linux-3.0.y' into cm.ics
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/futex.c | 19 | ||||
-rw-r--r-- | kernel/irq/chip.c | 3 | ||||
-rw-r--r-- | kernel/irq/manage.c | 2 | ||||
-rw-r--r-- | kernel/module.c | 3 | ||||
-rw-r--r-- | kernel/power/hibernate.c | 7 | ||||
-rw-r--r-- | kernel/time/ntp.c | 2 |
6 files changed, 21 insertions, 15 deletions
diff --git a/kernel/futex.c b/kernel/futex.c index e6160fa..6e57b21 100644 --- a/kernel/futex.c +++ b/kernel/futex.c @@ -2641,6 +2641,16 @@ long do_futex(u32 __user *uaddr, int op, u32 val, ktime_t *timeout, } switch (cmd) { + case FUTEX_LOCK_PI: + case FUTEX_UNLOCK_PI: + case FUTEX_TRYLOCK_PI: + case FUTEX_WAIT_REQUEUE_PI: + case FUTEX_CMP_REQUEUE_PI: + if (!futex_cmpxchg_enabled) + return -ENOSYS; + } + + switch (cmd) { case FUTEX_WAIT: val3 = FUTEX_BITSET_MATCH_ANY; case FUTEX_WAIT_BITSET: @@ -2661,16 +2671,13 @@ long do_futex(u32 __user *uaddr, int op, u32 val, ktime_t *timeout, ret = futex_wake_op(uaddr, flags, uaddr2, val, val2, val3); break; case FUTEX_LOCK_PI: - if (futex_cmpxchg_enabled) - ret = futex_lock_pi(uaddr, flags, val, timeout, 0); + ret = futex_lock_pi(uaddr, flags, val, timeout, 0); break; case FUTEX_UNLOCK_PI: - if (futex_cmpxchg_enabled) - ret = futex_unlock_pi(uaddr, flags); + ret = futex_unlock_pi(uaddr, flags); break; case FUTEX_TRYLOCK_PI: - if (futex_cmpxchg_enabled) - ret = futex_lock_pi(uaddr, flags, 0, timeout, 1); + ret = futex_lock_pi(uaddr, flags, 0, timeout, 1); break; case FUTEX_WAIT_REQUEUE_PI: val3 = FUTEX_BITSET_MATCH_ANY; diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index cd770d0..3863523 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c @@ -61,8 +61,7 @@ int irq_set_irq_type(unsigned int irq, unsigned int type) return -EINVAL; type &= IRQ_TYPE_SENSE_MASK; - if (type != IRQ_TYPE_NONE) - ret = __irq_set_trigger(desc, irq, type); + ret = __irq_set_trigger(desc, irq, type); irq_put_desc_busunlock(desc, flags); return ret; } diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index e4eedb1..df8136f 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c @@ -770,7 +770,7 @@ static int irq_thread(void *data) struct irqaction *action); int wake; - if (force_irqthreads & test_bit(IRQTF_FORCED_THREAD, + if (force_irqthreads && test_bit(IRQTF_FORCED_THREAD, &action->thread_flags)) handler_fn = irq_forced_thread_fn; else diff --git a/kernel/module.c b/kernel/module.c index 795bdc7..b9d0667 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -2290,8 +2290,7 @@ static int copy_and_check(struct load_info *info, return -ENOEXEC; /* Suck in entire file: we'll want most of it. */ - /* vmalloc barfs on "unusual" numbers. Check here */ - if (len > 64 * 1024 * 1024 || (hdr = vmalloc(len)) == NULL) + if ((hdr = vmalloc(len)) == NULL) return -ENOMEM; if (copy_from_user(hdr, umod, len) != 0) { diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c index 8f7b1db..8884c27 100644 --- a/kernel/power/hibernate.c +++ b/kernel/power/hibernate.c @@ -623,7 +623,7 @@ int hibernate(void) /* Allocate memory management structures */ error = create_basic_memory_bitmaps(); if (error) - goto Exit; + goto Enable_umh; printk(KERN_INFO "PM: Syncing filesystems ... "); sys_sync(); @@ -631,7 +631,7 @@ int hibernate(void) error = prepare_processes(); if (error) - goto Finish; + goto Free_bitmaps; if (hibernation_test(TEST_FREEZER)) goto Thaw; @@ -663,8 +663,9 @@ int hibernate(void) Thaw: thaw_processes(); - Finish: + Free_bitmaps: free_basic_memory_bitmaps(); + Enable_umh: usermodehelper_enable(); Exit: pm_notifier_call_chain(PM_POST_HIBERNATION); diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c index f6117a4..4b85a7a 100644 --- a/kernel/time/ntp.c +++ b/kernel/time/ntp.c @@ -275,7 +275,7 @@ static inline s64 ntp_update_offset_fll(s64 offset64, long secs) time_status |= STA_MODE; - return div_s64(offset64 << (NTP_SCALE_SHIFT - SHIFT_FLL), secs); + return div64_long(offset64 << (NTP_SCALE_SHIFT - SHIFT_FLL), secs); } static void ntp_update_offset(long offset) |