/* * Hypertransport interrupt support */ static void target_ht_irq(unsigned int irq, unsigned int dest, u8 vector) { struct ht_irq_msg msg; fetch_ht_irq_msg(irq, &msg); msg.address_lo &= ~(HT_IRQ_LOW_VECTOR_MASK | HT_IRQ_LOW_DEST_ID_MASK); msg.address_hi &= ~(HT_IRQ_HIGH_DEST_ID_MASK); msg.address_lo |= HT_IRQ_LOW_VECTOR(vector) | HT_IRQ_LOW_DEST_ID(dest); msg.address_hi |= HT_IRQ_HIGH_DEST_ID(dest); write_ht_irq_msg(irq, &msg); }
/* * Hypertransport interrupt support */ static int ht_set_affinity(struct irq_data *data, const struct cpumask *mask, bool force) { struct irq_data *parent = data->parent_data; int ret; ret = parent->chip->irq_set_affinity(parent, mask, force); if (ret >= 0) { struct ht_irq_msg msg; struct irq_cfg *cfg = irqd_cfg(data); fetch_ht_irq_msg(data->irq, &msg); msg.address_lo &= ~(HT_IRQ_LOW_VECTOR_MASK | HT_IRQ_LOW_DEST_ID_MASK); msg.address_lo |= HT_IRQ_LOW_VECTOR(cfg->vector) | HT_IRQ_LOW_DEST_ID(cfg->dest_apicid); msg.address_hi &= ~(HT_IRQ_HIGH_DEST_ID_MASK); msg.address_hi |= HT_IRQ_HIGH_DEST_ID(cfg->dest_apicid); write_ht_irq_msg(data->irq, &msg); } return ret; }