Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 276582
b: refs/heads/master
c: 0c90547
h: refs/heads/master
v: v3
  • Loading branch information
Chris Metcalf committed Dec 3, 2011
1 parent 86a0885 commit 717bcdd
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 21 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 781a5e92bc3b666bc5752e3ce7e977978c2f64e9
refs/heads/master: 0c90547b4a3fcee184db4d54ffc1a4fb17fd54d6
10 changes: 0 additions & 10 deletions trunk/arch/tile/include/asm/irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,6 @@ enum {
*/
void tile_irq_activate(unsigned int irq, int tile_irq_type);

/*
* For onboard, non-PCI (e.g. TILE_IRQ_PERCPU) devices, drivers know
* how to use enable/disable_percpu_irq() to manage interrupts on each
* core. We can't use the generic enable/disable_irq() because they
* use a single reference count per irq, rather than per cpu per irq.
*/
void enable_percpu_irq(unsigned int irq);
void disable_percpu_irq(unsigned int irq);


void setup_irq_regs(void);

#endif /* _ASM_TILE_IRQ_H */
16 changes: 8 additions & 8 deletions trunk/arch/tile/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,28 +152,26 @@ void tile_dev_intr(struct pt_regs *regs, int intnum)
* Remove an irq from the disabled mask. If we're in an interrupt
* context, defer enabling the HW interrupt until we leave.
*/
void enable_percpu_irq(unsigned int irq)
static void tile_irq_chip_enable(struct irq_data *d)
{
get_cpu_var(irq_disable_mask) &= ~(1UL << irq);
get_cpu_var(irq_disable_mask) &= ~(1UL << d->irq);
if (__get_cpu_var(irq_depth) == 0)
unmask_irqs(1UL << irq);
unmask_irqs(1UL << d->irq);
put_cpu_var(irq_disable_mask);
}
EXPORT_SYMBOL(enable_percpu_irq);

/*
* Add an irq to the disabled mask. We disable the HW interrupt
* immediately so that there's no possibility of it firing. If we're
* in an interrupt context, the return path is careful to avoid
* unmasking a newly disabled interrupt.
*/
void disable_percpu_irq(unsigned int irq)
static void tile_irq_chip_disable(struct irq_data *d)
{
get_cpu_var(irq_disable_mask) |= (1UL << irq);
mask_irqs(1UL << irq);
get_cpu_var(irq_disable_mask) |= (1UL << d->irq);
mask_irqs(1UL << d->irq);
put_cpu_var(irq_disable_mask);
}
EXPORT_SYMBOL(disable_percpu_irq);

/* Mask an interrupt. */
static void tile_irq_chip_mask(struct irq_data *d)
Expand Down Expand Up @@ -209,6 +207,8 @@ static void tile_irq_chip_eoi(struct irq_data *d)

static struct irq_chip tile_irq_chip = {
.name = "tile_irq_chip",
.irq_enable = tile_irq_chip_enable,
.irq_disable = tile_irq_chip_disable,
.irq_ack = tile_irq_chip_ack,
.irq_eoi = tile_irq_chip_eoi,
.irq_mask = tile_irq_chip_mask,
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/ethernet/tile/tilepro.c
Original file line number Diff line number Diff line change
Expand Up @@ -926,7 +926,7 @@ static int tile_net_poll(struct napi_struct *napi, int budget)
goto done;

/* Re-enable the ingress interrupt. */
enable_percpu_irq(priv->intr_id);
enable_percpu_irq(priv->intr_id, 0);

/* HACK: Avoid the "rotting packet" problem (see above). */
if (qup->__packet_receive_read !=
Expand Down Expand Up @@ -1296,7 +1296,7 @@ static void tile_net_open_enable(void *dev_ptr)
info->napi_enabled = true;

/* Enable the ingress interrupt. */
enable_percpu_irq(priv->intr_id);
enable_percpu_irq(priv->intr_id, 0);
}


Expand Down

0 comments on commit 717bcdd

Please sign in to comment.