Skip to content

Commit

Permalink
genirq: Remove compat code
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Gleixner <[email protected]>
  • Loading branch information
KAGA-KOKO committed Mar 29, 2011
1 parent dced35a commit 0c6f8a8
Show file tree
Hide file tree
Showing 14 changed files with 25 additions and 452 deletions.
117 changes: 0 additions & 117 deletions include/linux/irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,18 +92,6 @@ enum {
IRQ_NO_BALANCING = (1 << 13),
IRQ_MOVE_PCNTXT = (1 << 14),
IRQ_NESTED_THREAD = (1 << 15),

#ifndef CONFIG_GENERIC_HARDIRQS_NO_COMPAT
IRQ_INPROGRESS = (1 << 16),
IRQ_REPLAY = (1 << 17),
IRQ_WAITING = (1 << 18),
IRQ_DISABLED = (1 << 19),
IRQ_PENDING = (1 << 20),
IRQ_MASKED = (1 << 21),
IRQ_MOVE_PENDING = (1 << 22),
IRQ_AFFINITY_SET = (1 << 23),
IRQ_WAKEUP = (1 << 24),
#endif
};

#define IRQF_MODIFY_MASK \
Expand Down Expand Up @@ -321,28 +309,6 @@ static inline void irqd_clr_chained_irq_inprogress(struct irq_data *d)
*/
struct irq_chip {
const char *name;
#ifndef CONFIG_GENERIC_HARDIRQS_NO_DEPRECATED
unsigned int (*startup)(unsigned int irq);
void (*shutdown)(unsigned int irq);
void (*enable)(unsigned int irq);
void (*disable)(unsigned int irq);

void (*ack)(unsigned int irq);
void (*mask)(unsigned int irq);
void (*mask_ack)(unsigned int irq);
void (*unmask)(unsigned int irq);
void (*eoi)(unsigned int irq);

void (*end)(unsigned int irq);
int (*set_affinity)(unsigned int irq,
const struct cpumask *dest);
int (*retrigger)(unsigned int irq);
int (*set_type)(unsigned int irq, unsigned int flow_type);
int (*set_wake)(unsigned int irq, unsigned int on);

void (*bus_lock)(unsigned int irq);
void (*bus_sync_unlock)(unsigned int irq);
#endif
unsigned int (*irq_startup)(struct irq_data *data);
void (*irq_shutdown)(struct irq_data *data);
void (*irq_enable)(struct irq_data *data);
Expand Down Expand Up @@ -589,89 +555,6 @@ static inline struct msi_desc *irq_data_get_msi(struct irq_data *d)
return d->msi_desc;
}

#ifndef CONFIG_GENERIC_HARDIRQS_NO_COMPAT
/* Please do not use: Use the replacement functions instead */
static inline int set_irq_chip(unsigned int irq, struct irq_chip *chip)
{
return irq_set_chip(irq, chip);
}
static inline int set_irq_data(unsigned int irq, void *data)
{
return irq_set_handler_data(irq, data);
}
static inline int set_irq_chip_data(unsigned int irq, void *data)
{
return irq_set_chip_data(irq, data);
}
static inline int set_irq_type(unsigned int irq, unsigned int type)
{
return irq_set_irq_type(irq, type);
}
static inline int set_irq_msi(unsigned int irq, struct msi_desc *entry)
{
return irq_set_msi_desc(irq, entry);
}
static inline struct irq_chip *get_irq_chip(unsigned int irq)
{
return irq_get_chip(irq);
}
static inline void *get_irq_chip_data(unsigned int irq)
{
return irq_get_chip_data(irq);
}
static inline void *get_irq_data(unsigned int irq)
{
return irq_get_handler_data(irq);
}
static inline void *irq_data_get_irq_data(struct irq_data *d)
{
return irq_data_get_irq_handler_data(d);
}
static inline struct msi_desc *get_irq_msi(unsigned int irq)
{
return irq_get_msi_desc(irq);
}
static inline void set_irq_noprobe(unsigned int irq)
{
irq_set_noprobe(irq);
}
static inline void set_irq_probe(unsigned int irq)
{
irq_set_probe(irq);
}
static inline void set_irq_nested_thread(unsigned int irq, int nest)
{
irq_set_nested_thread(irq, nest);
}
static inline void
set_irq_chip_and_handler_name(unsigned int irq, struct irq_chip *chip,
irq_flow_handler_t handle, const char *name)
{
irq_set_chip_and_handler_name(irq, chip, handle, name);
}
static inline void
set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip,
irq_flow_handler_t handle)
{
irq_set_chip_and_handler(irq, chip, handle);
}
static inline void
__set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained,
const char *name)
{
__irq_set_handler(irq, handle, is_chained, name);
}
static inline void set_irq_handler(unsigned int irq, irq_flow_handler_t handle)
{
irq_set_handler(irq, handle);
}
static inline void
set_irq_chained_handler(unsigned int irq, irq_flow_handler_t handle)
{
irq_set_chained_handler(irq, handle);
}
#endif

int irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node);
void irq_free_descs(unsigned int irq, unsigned int cnt);
int irq_reserve_irqs(unsigned int from, unsigned int cnt);
Expand Down
60 changes: 1 addition & 59 deletions include/linux/irqdesc.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,44 +35,15 @@ struct timer_rand_state;
* @name: flow handler name for /proc/interrupts output
*/
struct irq_desc {

#ifdef CONFIG_GENERIC_HARDIRQS_NO_DEPRECATED
struct irq_data irq_data;
#else
/*
* This union will go away, once we fixed the direct access to
* irq_desc all over the place. The direct fields are a 1:1
* overlay of irq_data.
*/
union {
struct irq_data irq_data;
struct {
unsigned int irq;
unsigned int node;
unsigned int pad_do_not_even_think_about_it;
struct irq_chip *chip;
void *handler_data;
void *chip_data;
struct msi_desc *msi_desc;
#ifdef CONFIG_SMP
cpumask_var_t affinity;
#endif
};
};
#endif

struct timer_rand_state *timer_rand_state;
unsigned int __percpu *kstat_irqs;
irq_flow_handler_t handle_irq;
#ifdef CONFIG_IRQ_PREFLOW_FASTEOI
irq_preflow_handler_t preflow_handler;
#endif
struct irqaction *action; /* IRQ action list */
#ifdef CONFIG_GENERIC_HARDIRQS_NO_COMPAT
unsigned int status_use_accessors;
#else
unsigned int status; /* IRQ status */
#endif
unsigned int core_internal_state__do_not_mess_with_it;
unsigned int depth; /* nested irq disables */
unsigned int wake_depth; /* nested wake enables */
Expand Down Expand Up @@ -127,27 +98,6 @@ static inline struct msi_desc *irq_desc_get_msi_desc(struct irq_desc *desc)
return desc->irq_data.msi_desc;
}

#ifndef CONFIG_GENERIC_HARDIRQS_NO_COMPAT
static inline struct irq_chip *get_irq_desc_chip(struct irq_desc *desc)
{
return irq_desc_get_chip(desc);
}
static inline void *get_irq_desc_data(struct irq_desc *desc)
{
return irq_desc_get_handler_data(desc);
}

static inline void *get_irq_desc_chip_data(struct irq_desc *desc)
{
return irq_desc_get_chip_data(desc);
}

static inline struct msi_desc *get_irq_desc_msi(struct irq_desc *desc)
{
return irq_desc_get_msi_desc(desc);
}
#endif

/*
* Architectures call this to let the generic IRQ layer
* handle an interrupt. If the descriptor is attached to an
Expand Down Expand Up @@ -194,21 +144,13 @@ __irq_set_chip_handler_name_locked(unsigned int irq, struct irq_chip *chip,
desc->name = name;
}

#ifndef CONFIG_GENERIC_HARDIRQS_NO_COMPAT
static inline void __set_irq_handler_unlocked(int irq,
irq_flow_handler_t handler)
{
__irq_set_handler_locked(irq, handler);
}

static inline int irq_balancing_disabled(unsigned int irq)
{
struct irq_desc *desc;

desc = irq_to_desc(irq);
return desc->status & IRQ_NO_BALANCING_MASK;
return desc->status_use_accessors & IRQ_NO_BALANCING_MASK;
}
#endif

static inline void
irq_set_lockdep_class(unsigned int irq, struct lock_class_key *class)
Expand Down
4 changes: 0 additions & 4 deletions kernel/irq/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ menu "IRQ subsystem"
config GENERIC_HARDIRQS
def_bool y

# Select this to disable the deprecated stuff
config GENERIC_HARDIRQS_NO_DEPRECATED
bool

config GENERIC_HARDIRQS_NO_COMPAT
bool

Expand Down
4 changes: 1 addition & 3 deletions kernel/irq/autoprobe.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,8 @@ unsigned long probe_irq_on(void)
raw_spin_lock_irq(&desc->lock);
if (!desc->action && irq_settings_can_probe(desc)) {
desc->istate |= IRQS_AUTODETECT | IRQS_WAITING;
if (irq_startup(desc)) {
irq_compat_set_pending(desc);
if (irq_startup(desc))
desc->istate |= IRQS_PENDING;
}
}
raw_spin_unlock_irq(&desc->lock);
}
Expand Down
Loading

0 comments on commit 0c6f8a8

Please sign in to comment.