diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/irq/manage.c | 5 | ||||
-rw-r--r-- | kernel/lockdep.c | 22 | ||||
-rw-r--r-- | kernel/panic.c | 2 | ||||
-rw-r--r-- | kernel/ptrace.c | 4 | ||||
-rw-r--r-- | kernel/time/clocksource.c | 3 | ||||
-rw-r--r-- | kernel/time/timekeeping.c | 7 |
6 files changed, 26 insertions, 17 deletions
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index 7e2e7dd4cd2f..2734eca59243 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c | |||
@@ -109,10 +109,9 @@ int irq_set_affinity(unsigned int irq, const struct cpumask *cpumask) | |||
109 | spin_lock_irqsave(&desc->lock, flags); | 109 | spin_lock_irqsave(&desc->lock, flags); |
110 | 110 | ||
111 | #ifdef CONFIG_GENERIC_PENDING_IRQ | 111 | #ifdef CONFIG_GENERIC_PENDING_IRQ |
112 | if (desc->status & IRQ_MOVE_PCNTXT || desc->status & IRQ_DISABLED) { | 112 | if (desc->status & IRQ_MOVE_PCNTXT) |
113 | cpumask_copy(desc->affinity, cpumask); | ||
114 | desc->chip->set_affinity(irq, cpumask); | 113 | desc->chip->set_affinity(irq, cpumask); |
115 | } else { | 114 | else { |
116 | desc->status |= IRQ_MOVE_PENDING; | 115 | desc->status |= IRQ_MOVE_PENDING; |
117 | cpumask_copy(desc->pending_mask, cpumask); | 116 | cpumask_copy(desc->pending_mask, cpumask); |
118 | } | 117 | } |
diff --git a/kernel/lockdep.c b/kernel/lockdep.c index b0f011866969..accb40cdb12a 100644 --- a/kernel/lockdep.c +++ b/kernel/lockdep.c | |||
@@ -2490,13 +2490,20 @@ static int mark_lock(struct task_struct *curr, struct held_lock *this, | |||
2490 | void lockdep_init_map(struct lockdep_map *lock, const char *name, | 2490 | void lockdep_init_map(struct lockdep_map *lock, const char *name, |
2491 | struct lock_class_key *key, int subclass) | 2491 | struct lock_class_key *key, int subclass) |
2492 | { | 2492 | { |
2493 | if (unlikely(!debug_locks)) | 2493 | lock->class_cache = NULL; |
2494 | #ifdef CONFIG_LOCK_STAT | ||
2495 | lock->cpu = raw_smp_processor_id(); | ||
2496 | #endif | ||
2497 | |||
2498 | if (DEBUG_LOCKS_WARN_ON(!name)) { | ||
2499 | lock->name = "NULL"; | ||
2494 | return; | 2500 | return; |
2501 | } | ||
2502 | |||
2503 | lock->name = name; | ||
2495 | 2504 | ||
2496 | if (DEBUG_LOCKS_WARN_ON(!key)) | 2505 | if (DEBUG_LOCKS_WARN_ON(!key)) |
2497 | return; | 2506 | return; |
2498 | if (DEBUG_LOCKS_WARN_ON(!name)) | ||
2499 | return; | ||
2500 | /* | 2507 | /* |
2501 | * Sanity check, the lock-class key must be persistent: | 2508 | * Sanity check, the lock-class key must be persistent: |
2502 | */ | 2509 | */ |
@@ -2505,12 +2512,11 @@ void lockdep_init_map(struct lockdep_map *lock, const char *name, | |||
2505 | DEBUG_LOCKS_WARN_ON(1); | 2512 | DEBUG_LOCKS_WARN_ON(1); |
2506 | return; | 2513 | return; |
2507 | } | 2514 | } |
2508 | lock->name = name; | ||
2509 | lock->key = key; | 2515 | lock->key = key; |
2510 | lock->class_cache = NULL; | 2516 | |
2511 | #ifdef CONFIG_LOCK_STAT | 2517 | if (unlikely(!debug_locks)) |
2512 | lock->cpu = raw_smp_processor_id(); | 2518 | return; |
2513 | #endif | 2519 | |
2514 | if (subclass) | 2520 | if (subclass) |
2515 | register_lock_class(lock, subclass, 1); | 2521 | register_lock_class(lock, subclass, 1); |
2516 | } | 2522 | } |
diff --git a/kernel/panic.c b/kernel/panic.c index 934fb377f4b3..3dcaa1661357 100644 --- a/kernel/panic.c +++ b/kernel/panic.c | |||
@@ -221,7 +221,7 @@ void add_taint(unsigned flag) | |||
221 | * post-warning case. | 221 | * post-warning case. |
222 | */ | 222 | */ |
223 | if (flag != TAINT_CRAP && flag != TAINT_WARN && __debug_locks_off()) | 223 | if (flag != TAINT_CRAP && flag != TAINT_WARN && __debug_locks_off()) |
224 | printk(KERN_WARNING "Disabling lockdep due to kernel taint\n"); | 224 | printk(KERN_WARNING "Disabling lock debugging due to kernel taint\n"); |
225 | 225 | ||
226 | set_bit(flag, &tainted_mask); | 226 | set_bit(flag, &tainted_mask); |
227 | } | 227 | } |
diff --git a/kernel/ptrace.c b/kernel/ptrace.c index dfcd83ceee3b..0692ab5a0d67 100644 --- a/kernel/ptrace.c +++ b/kernel/ptrace.c | |||
@@ -188,7 +188,7 @@ int ptrace_attach(struct task_struct *task) | |||
188 | /* Protect exec's credential calculations against our interference; | 188 | /* Protect exec's credential calculations against our interference; |
189 | * SUID, SGID and LSM creds get determined differently under ptrace. | 189 | * SUID, SGID and LSM creds get determined differently under ptrace. |
190 | */ | 190 | */ |
191 | retval = mutex_lock_interruptible(¤t->cred_exec_mutex); | 191 | retval = mutex_lock_interruptible(&task->cred_exec_mutex); |
192 | if (retval < 0) | 192 | if (retval < 0) |
193 | goto out; | 193 | goto out; |
194 | 194 | ||
@@ -232,7 +232,7 @@ repeat: | |||
232 | bad: | 232 | bad: |
233 | write_unlock_irqrestore(&tasklist_lock, flags); | 233 | write_unlock_irqrestore(&tasklist_lock, flags); |
234 | task_unlock(task); | 234 | task_unlock(task); |
235 | mutex_unlock(¤t->cred_exec_mutex); | 235 | mutex_unlock(&task->cred_exec_mutex); |
236 | out: | 236 | out: |
237 | return retval; | 237 | return retval; |
238 | } | 238 | } |
diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c index ecfd7b5187e0..80189f6f1c5a 100644 --- a/kernel/time/clocksource.c +++ b/kernel/time/clocksource.c | |||
@@ -402,9 +402,6 @@ int clocksource_register(struct clocksource *c) | |||
402 | unsigned long flags; | 402 | unsigned long flags; |
403 | int ret; | 403 | int ret; |
404 | 404 | ||
405 | /* save mult_orig on registration */ | ||
406 | c->mult_orig = c->mult; | ||
407 | |||
408 | spin_lock_irqsave(&clocksource_lock, flags); | 405 | spin_lock_irqsave(&clocksource_lock, flags); |
409 | ret = clocksource_enqueue(c); | 406 | ret = clocksource_enqueue(c); |
410 | if (!ret) | 407 | if (!ret) |
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 687dff49f6e7..e97c50f8458b 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c | |||
@@ -77,6 +77,10 @@ static void clocksource_forward_now(void) | |||
77 | clock->cycle_last = cycle_now; | 77 | clock->cycle_last = cycle_now; |
78 | 78 | ||
79 | nsec = cyc2ns(clock, cycle_delta); | 79 | nsec = cyc2ns(clock, cycle_delta); |
80 | |||
81 | /* If arch requires, add in gettimeoffset() */ | ||
82 | nsec += arch_gettimeoffset(); | ||
83 | |||
80 | timespec_add_ns(&xtime, nsec); | 84 | timespec_add_ns(&xtime, nsec); |
81 | 85 | ||
82 | nsec = ((s64)cycle_delta * clock->mult_orig) >> clock->shift; | 86 | nsec = ((s64)cycle_delta * clock->mult_orig) >> clock->shift; |
@@ -111,6 +115,9 @@ void getnstimeofday(struct timespec *ts) | |||
111 | /* convert to nanoseconds: */ | 115 | /* convert to nanoseconds: */ |
112 | nsecs = cyc2ns(clock, cycle_delta); | 116 | nsecs = cyc2ns(clock, cycle_delta); |
113 | 117 | ||
118 | /* If arch requires, add in gettimeoffset() */ | ||
119 | nsecs += arch_gettimeoffset(); | ||
120 | |||
114 | } while (read_seqretry(&xtime_lock, seq)); | 121 | } while (read_seqretry(&xtime_lock, seq)); |
115 | 122 | ||
116 | timespec_add_ns(ts, nsecs); | 123 | timespec_add_ns(ts, nsecs); |