Patches contributed by Eötvös Lorand University
commit c4e2b432d5b57e2faaeea048079b31c243079647
Merge: a234aa9ecdf4 72b623c73685
Author: Ingo Molnar <mingo@elte.hu>
Date: Tue Feb 17 11:29:53 2009 +0100
Merge branches 'tracing/hw-branch-tracing' and 'tracing/power-tracer' into tracing/core
commit 37a25424252b6cff4dd4b1937ab6a1dbfcadabcc
Author: Ingo Molnar <mingo@elte.hu>
Date: Mon Feb 16 15:32:23 2009 +0100
perfcounters: fix acpi_idle_do_entry() workaround
Fix merge error in drivers/acpi/processor_idle.c. This
resulted in non-working perfcounters on certain Nehalem
systems.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index 259f6e806314..08def2f20cd9 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -826,12 +826,9 @@ static inline void acpi_idle_do_entry(struct acpi_processor_cx *cx)
{
u64 perf_flags;
- u64 pctrl;
-
/* Don't trace irqs off for idle */
stop_critical_timings();
perf_flags = hw_perf_save_disable();
- pctrl = hw_perf_save_disable();
if (cx->entry_method == ACPI_CSTATE_FFH) {
/* Call into architectural FFH based C-state */
acpi_processor_ffh_cstate_enter(cx);
@@ -847,7 +844,6 @@ static inline void acpi_idle_do_entry(struct acpi_processor_cx *cx)
unused = inl(acpi_gbl_FADT.xpm_timer_block.address);
}
hw_perf_restore(perf_flags);
- hw_perf_restore(pctrl);
start_critical_timings();
}
commit 73ca2f8380311115723c7afe811f3ed1f0ba945e
Author: Ingo Molnar <mingo@elte.hu>
Date: Mon Feb 16 01:08:17 2009 +0100
perfcounters: remove duplicate definition of LOCAL_PERF_VECTOR
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/arch/x86/include/asm/irq_vectors.h b/arch/x86/include/asm/irq_vectors.h
index b66b518ff000..b07278c55e9e 100644
--- a/arch/x86/include/asm/irq_vectors.h
+++ b/arch/x86/include/asm/irq_vectors.h
@@ -111,11 +111,6 @@
*/
#define LOCAL_PERF_VECTOR 0xee
-/*
- * Performance monitoring interrupt vector:
- */
-#define LOCAL_PERF_VECTOR 0xee
-
/*
* First APIC vector available to drivers: (vectors 0x30-0xee) we
* start at 0x31(0x41) to spread out vectors evenly between priority
commit 6700ec65c207068a81a535e9dca616fefac21671
Author: Ingo Molnar <mingo@elte.hu>
Date: Sun Feb 15 21:18:17 2009 +0100
lockdep: annotate reclaim context (__GFP_NOFS), fix
Impact: fix build warning
Fix:
mm/vmscan.c: In function ‘kswapd’:
mm/vmscan.c:1969: warning: ISO C90 forbids mixed declarations and code
node_to_cpumask_ptr(cpumask, pgdat->node_id), has a side-effect: it
defines the 'cpumask' local variable as well, so it has to go into
the variable definition section.
Sidenote: it might make sense to make this purpose of these macros
more apparent, by naming them the standard way, such as:
DEFINE_node_to_cpumask_ptr(cpumask, pgdat->node_id);
(But that is outside the scope of this patch.)
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Mike Travis <travis@sgi.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Nick Piggin <npiggin@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 303eb658b50b..cf8441345277 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1963,11 +1963,10 @@ static int kswapd(void *p)
struct reclaim_state reclaim_state = {
.reclaimed_slab = 0,
};
+ node_to_cpumask_ptr(cpumask, pgdat->node_id);
lockdep_set_current_reclaim_state(GFP_KERNEL);
- node_to_cpumask_ptr(cpumask, pgdat->node_id);
-
if (!cpumask_empty(cpumask))
set_cpus_allowed_ptr(tsk, cpumask);
current->reclaim_state = &reclaim_state;
commit 5274f8354d6a1ed9d6688e6a89b705b94aa1b6e9
Merge: ad0b0fd554df a0490fa35dc0 d2f8d7ee1a9b
Author: Ingo Molnar <mingo@elte.hu>
Date: Sun Feb 15 21:15:16 2009 +0100
Merge branch 'sched/urgent'; commit 'v2.6.29-rc5' into sched/core
commit 72b623c73685e86b70a51855e1058ebc98a9f6ed
Merge: 9abd60304816 b5f9fd0f8a05
Author: Ingo Molnar <mingo@elte.hu>
Date: Sun Feb 15 20:43:03 2009 +0100
Merge branch 'tip/tracing/ftrace' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into tracing/power-tracer
commit 9abd60304816a5b0fd9e51034f78e3eaed89f901
Merge: 5fb896a4e916 f9aa28adfc6a
Author: Ingo Molnar <mingo@elte.hu>
Date: Sun Feb 15 20:08:55 2009 +0100
Merge branches 'tracing/ftrace' and 'tracing/urgent' into tracing/core
Conflicts:
kernel/trace/trace_mmiotrace.c
commit ae88a23b32fa7e0dc9fa7ce735966e68eb41b0bc
Author: Ingo Molnar <mingo@elte.hu>
Date: Sun Feb 15 11:29:50 2009 +0100
irq: refactor and clean up the free_irq() code flow
Impact: cleanup
- separate out the loop from the actual freeing logic, this wins us
two indentation levels allowing a number of followup prettifications
- turn the WARN_ON() into a more informative WARN().
- clean up the comments and the code flow some more
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 8f4bc61f0df9..7a954b860c07 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -575,72 +575,79 @@ int setup_irq(unsigned int irq, struct irqaction *act)
void free_irq(unsigned int irq, void *dev_id)
{
struct irq_desc *desc = irq_to_desc(irq);
- struct irqaction **p;
+ struct irqaction *action, **p, **pp;
unsigned long flags;
- WARN_ON(in_interrupt());
+ WARN(in_interrupt(), "Trying to free IRQ %d from IRQ context!\n", irq);
if (!desc)
return;
spin_lock_irqsave(&desc->lock, flags);
+
+ /*
+ * There can be multiple actions per IRQ descriptor, find the right
+ * one based on the dev_id:
+ */
p = &desc->action;
for (;;) {
- struct irqaction *action = *p;
+ action = *p;
+ pp = p;
+
+ if (!action) {
+ WARN(1, "Trying to free already-free IRQ %d\n", irq);
+ spin_unlock_irqrestore(&desc->lock, flags);
+
+ return;
+ }
- if (action) {
- struct irqaction **pp = p;
+ p = &action->next;
+ if (action->dev_id != dev_id)
+ continue;
- p = &action->next;
- if (action->dev_id != dev_id)
- continue;
+ break;
+ }
- /* Found it - now remove it from the list of entries */
- *pp = action->next;
+ /* Found it - now remove it from the list of entries: */
+ *pp = action->next;
- /* Currently used only by UML, might disappear one day.*/
+ /* Currently used only by UML, might disappear one day: */
#ifdef CONFIG_IRQ_RELEASE_METHOD
- if (desc->chip->release)
- desc->chip->release(irq, dev_id);
+ if (desc->chip->release)
+ desc->chip->release(irq, dev_id);
#endif
- if (!desc->action) {
- desc->status |= IRQ_DISABLED;
- if (desc->chip->shutdown)
- desc->chip->shutdown(irq);
- else
- desc->chip->disable(irq);
- }
- spin_unlock_irqrestore(&desc->lock, flags);
- unregister_handler_proc(irq, action);
+ /* If this was the last handler, shut down the IRQ line: */
+ if (!desc->action) {
+ desc->status |= IRQ_DISABLED;
+ if (desc->chip->shutdown)
+ desc->chip->shutdown(irq);
+ else
+ desc->chip->disable(irq);
+ }
+ spin_unlock_irqrestore(&desc->lock, flags);
+
+ unregister_handler_proc(irq, action);
+
+ /* Make sure it's not being used on another CPU: */
+ synchronize_irq(irq);
- /* Make sure it's not being used on another CPU */
- synchronize_irq(irq);
-#ifdef CONFIG_DEBUG_SHIRQ
- /*
- * It's a shared IRQ -- the driver ought to be
- * prepared for it to happen even now it's
- * being freed, so let's make sure.... We do
- * this after actually deregistering it, to
- * make sure that a 'real' IRQ doesn't run in
- * parallel with our fake
- */
- if (action->flags & IRQF_SHARED) {
- local_irq_save(flags);
- action->handler(irq, dev_id);
- local_irq_restore(flags);
- }
-#endif
- kfree(action);
- return;
- }
- printk(KERN_ERR "Trying to free already-free IRQ %d\n", irq);
#ifdef CONFIG_DEBUG_SHIRQ
- dump_stack();
-#endif
- spin_unlock_irqrestore(&desc->lock, flags);
- return;
+ /*
+ * It's a shared IRQ -- the driver ought to be prepared for an IRQ
+ * event to happen even now it's being freed, so let's make sure that
+ * is so by doing an extra call to the handler ....
+ *
+ * ( We do this after actually deregistering it, to make sure that a
+ * 'real' IRQ doesn't run in * parallel with our fake. )
+ */
+ if (action->flags & IRQF_SHARED) {
+ local_irq_save(flags);
+ action->handler(irq, dev_id);
+ local_irq_restore(flags);
}
+#endif
+ kfree(action);
}
EXPORT_SYMBOL(free_irq);
commit 327ec5699c29454322d0136375f717f509c145b6
Author: Ingo Molnar <mingo@elte.hu>
Date: Sun Feb 15 11:21:37 2009 +0100
irq: clean up manage.c
- make printk message git-greppable
- fix a few style details
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 1c5055069170..8f4bc61f0df9 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -397,7 +397,7 @@ int __irq_set_trigger(struct irq_desc *desc, unsigned int irq,
* allocate special interrupts that are part of the architecture.
*/
static int
-__setup_irq(unsigned int irq, struct irq_desc * desc, struct irqaction *new)
+__setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
{
struct irqaction *old, **p;
const char *old_name = NULL;
@@ -687,11 +687,12 @@ int request_irq(unsigned int irq, irq_handler_t handler,
* the behavior is classified as "will not fix" so we need to
* start nudging drivers away from using that idiom.
*/
- if ((irqflags & (IRQF_SHARED|IRQF_DISABLED))
- == (IRQF_SHARED|IRQF_DISABLED))
- pr_warning("IRQ %d/%s: IRQF_DISABLED is not "
- "guaranteed on shared IRQs\n",
- irq, devname);
+ if ((irqflags & (IRQF_SHARED|IRQF_DISABLED)) ==
+ (IRQF_SHARED|IRQF_DISABLED)) {
+ pr_warning(
+ "IRQ %d/%s: IRQF_DISABLED is not guaranteed on shared IRQs\n",
+ irq, devname);
+ }
#ifdef CONFIG_LOCKDEP
/*
commit b69bc3967445169ea4dc11171118b414eafab271
Merge: c466ed2e4337 d2f8d7ee1a9b
Author: Ingo Molnar <mingo@elte.hu>
Date: Sun Feb 15 09:00:18 2009 +0100
Merge commit 'v2.6.29-rc5' into x86/apic