Skip to contentSkip to conversation

Compile handle_percpu_irq even for uniprocessor kernels

PATCH In review Ralf Baechle 2 participants 2 messages Sep 27, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Compile handle_percpu_irq even for uniprocessor kernels

Compiling handle_percpu_irq only on uniprocessor generates an artificial special case so a typical use like:

  set_irq_chip_and_handler(irq, &some_irq_type, handle_percpu_irq);

needs to be conditionally compiled only on SMP systems as well and an alternative UP construct is usually needed - for no good reason.

---
This fixes uniprocessor configurations for some MIPS SMP systems.

kernel/irq/chip.c +0 -3
index f1a73f0..9b5dff6 100644
@@ -503,7 +503,6 @@ out_unlock:
 	spin_unlock(&desc->lock);
 }
 
-#ifdef CONFIG_SMP
 /**
  *	handle_percpu_IRQ - Per CPU local irq handler
  *	@irq:	the interrupt number
@@ -529,8 +528,6 @@ handle_percpu_irq(unsigned int irq, struct irq_desc *desc)
 		desc->chip->eoi(irq);
 }
 
-#endif /* CONFIG_SMP */
-
 void
 __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained,
 		  const char *name)
Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · Ralf Baechle

Compiling handle_percpu_irq only on uniprocessor generates an artificial special case so a typical use like:

  set_irq_chip_and_handler(irq, &some_irq_type, handle_percpu_irq);

needs to be conditionally compiled only on SMP systems as well and an alternative UP construct is usually needed - for no good reason.

Makes sense.

Quoted 29 lines

---
This fixes uniprocessor configurations for some MIPS SMP systems.

kernel/irq/chip.c +0 -4
index f1a73f0..9b5dff6 100644
@@ -503,7 +503,6 @@ out_unlock:
 	spin_unlock(&desc->lock);
 }
 
-#ifdef CONFIG_SMP
 /**
  *	handle_percpu_IRQ - Per CPU local irq handler
  *	@irq:	the interrupt number
@@ -529,8 +528,6 @@ handle_percpu_irq(unsigned int irq, struct irq_desc *desc)
 		desc->chip->eoi(irq);
 }
 
-#endif /* CONFIG_SMP */
-
 void
 __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained,
 		  const char *name)
-

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/