Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 34ffdb72 authored by Ingo Molnar's avatar Ingo Molnar Committed by Linus Torvalds
Browse files

[PATCH] genirq: cleanup: reduce irq_desc_t use, mark it obsolete



Cleanup: remove irq_desc_t use from the generic IRQ code, and mark it
obsolete.

Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 06fcb0c6
Loading
Loading
Loading
Loading
+13 −5
Original line number Original line Diff line number Diff line
@@ -68,7 +68,7 @@ typedef struct hw_interrupt_type hw_irq_controller;
 *
 *
 * Pad this out to 32 bytes for cache and indexing reasons.
 * Pad this out to 32 bytes for cache and indexing reasons.
 */
 */
typedef struct irq_desc {
struct irq_desc {
	hw_irq_controller *chip;
	hw_irq_controller *chip;
	void *chip_data;
	void *chip_data;
	struct irqaction *action;	/* IRQ action list */
	struct irqaction *action;	/* IRQ action list */
@@ -83,11 +83,19 @@ typedef struct irq_desc {
#if defined(CONFIG_GENERIC_PENDING_IRQ) || defined(CONFIG_IRQBALANCE)
#if defined(CONFIG_GENERIC_PENDING_IRQ) || defined(CONFIG_IRQBALANCE)
	unsigned int move_irq;		/* Flag need to re-target intr dest*/
	unsigned int move_irq;		/* Flag need to re-target intr dest*/
#endif
#endif
} ____cacheline_aligned irq_desc_t;
} ____cacheline_aligned;


extern irq_desc_t irq_desc [NR_IRQS];
extern struct irq_desc irq_desc[NR_IRQS];


#include <asm/hw_irq.h> /* the arch dependent stuff */
/*
 * Migration helpers for obsolete names, they will go away:
 */
typedef struct irq_desc		irq_desc_t;

/*
 * Pick up the arch-dependent methods:
 */
#include <asm/hw_irq.h>


extern int setup_irq(unsigned int irq, struct irqaction *new);
extern int setup_irq(unsigned int irq, struct irqaction *new);


@@ -188,7 +196,7 @@ extern irqreturn_t handle_IRQ_event(unsigned int irq, struct pt_regs *regs,
 */
 */
extern fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs);
extern fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs);


extern void note_interrupt(unsigned int irq, irq_desc_t *desc,
extern void note_interrupt(unsigned int irq, struct irq_desc *desc,
			   int action_ret, struct pt_regs *regs);
			   int action_ret, struct pt_regs *regs);
extern int can_request_irq(unsigned int irq, unsigned long irqflags);
extern int can_request_irq(unsigned int irq, unsigned long irqflags);


+3 −3
Original line number Original line Diff line number Diff line
@@ -27,8 +27,8 @@ static DEFINE_MUTEX(probing_active);
 */
 */
unsigned long probe_irq_on(void)
unsigned long probe_irq_on(void)
{
{
	struct irq_desc *desc;
	unsigned long mask;
	unsigned long mask;
	irq_desc_t *desc;
	unsigned int i;
	unsigned int i;


	mutex_lock(&probing_active);
	mutex_lock(&probing_active);
@@ -116,7 +116,7 @@ unsigned int probe_irq_mask(unsigned long val)


	mask = 0;
	mask = 0;
	for (i = 0; i < NR_IRQS; i++) {
	for (i = 0; i < NR_IRQS; i++) {
		irq_desc_t *desc = irq_desc + i;
		struct irq_desc *desc = irq_desc + i;
		unsigned int status;
		unsigned int status;


		spin_lock_irq(&desc->lock);
		spin_lock_irq(&desc->lock);
@@ -159,7 +159,7 @@ int probe_irq_off(unsigned long val)
	int i, irq_found = 0, nr_irqs = 0;
	int i, irq_found = 0, nr_irqs = 0;


	for (i = 0; i < NR_IRQS; i++) {
	for (i = 0; i < NR_IRQS; i++) {
		irq_desc_t *desc = irq_desc + i;
		struct irq_desc *desc = irq_desc + i;
		unsigned int status;
		unsigned int status;


		spin_lock_irq(&desc->lock);
		spin_lock_irq(&desc->lock);
+2 −2
Original line number Original line Diff line number Diff line
@@ -28,7 +28,7 @@
 *
 *
 * Controller mappings for all interrupt sources:
 * Controller mappings for all interrupt sources:
 */
 */
irq_desc_t irq_desc[NR_IRQS] __cacheline_aligned = {
struct irq_desc irq_desc[NR_IRQS] __cacheline_aligned = {
	[0 ... NR_IRQS-1] = {
	[0 ... NR_IRQS-1] = {
		.status = IRQ_DISABLED,
		.status = IRQ_DISABLED,
		.chip = &no_irq_type,
		.chip = &no_irq_type,
@@ -110,7 +110,7 @@ irqreturn_t handle_IRQ_event(unsigned int irq, struct pt_regs *regs,
 */
 */
fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs)
fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs)
{
{
	irq_desc_t *desc = irq_desc + irq;
	struct irq_desc *desc = irq_desc + irq;
	struct irqaction *action;
	struct irqaction *action;
	unsigned int status;
	unsigned int status;


+3 −3
Original line number Original line Diff line number Diff line
@@ -57,7 +57,7 @@ EXPORT_SYMBOL(synchronize_irq);
 */
 */
void disable_irq_nosync(unsigned int irq)
void disable_irq_nosync(unsigned int irq)
{
{
	irq_desc_t *desc = irq_desc + irq;
	struct irq_desc *desc = irq_desc + irq;
	unsigned long flags;
	unsigned long flags;


	if (irq >= NR_IRQS)
	if (irq >= NR_IRQS)
@@ -86,7 +86,7 @@ EXPORT_SYMBOL(disable_irq_nosync);
 */
 */
void disable_irq(unsigned int irq)
void disable_irq(unsigned int irq)
{
{
	irq_desc_t *desc = irq_desc + irq;
	struct irq_desc *desc = irq_desc + irq;


	if (irq >= NR_IRQS)
	if (irq >= NR_IRQS)
		return;
		return;
@@ -109,7 +109,7 @@ EXPORT_SYMBOL(disable_irq);
 */
 */
void enable_irq(unsigned int irq)
void enable_irq(unsigned int irq)
{
{
	irq_desc_t *desc = irq_desc + irq;
	struct irq_desc *desc = irq_desc + irq;
	unsigned long flags;
	unsigned long flags;


	if (irq >= NR_IRQS)
	if (irq >= NR_IRQS)
+2 −2
Original line number Original line Diff line number Diff line
@@ -3,7 +3,7 @@


void set_pending_irq(unsigned int irq, cpumask_t mask)
void set_pending_irq(unsigned int irq, cpumask_t mask)
{
{
	irq_desc_t *desc = irq_desc + irq;
	struct irq_desc *desc = irq_desc + irq;
	unsigned long flags;
	unsigned long flags;


	spin_lock_irqsave(&desc->lock, flags);
	spin_lock_irqsave(&desc->lock, flags);
@@ -14,8 +14,8 @@ void set_pending_irq(unsigned int irq, cpumask_t mask)


void move_native_irq(int irq)
void move_native_irq(int irq)
{
{
	struct irq_desc *desc = irq_desc + irq;
	cpumask_t tmp;
	cpumask_t tmp;
	irq_desc_t *desc = irq_desc + irq;


	if (likely(!desc->move_irq))
	if (likely(!desc->move_irq))
		return;
		return;
Loading