X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=include%2Fasm-mips%2Fsmtc_ipi.h;h=8ce51757434051d6daa0af76a5a8dd5680304096;hb=ca6f12c67ed19718cf37d0f531af9438de85b70c;hp=55f3419f65465892f35630c3a32b730866ed77e1;hpb=fe6af6faec078ec8137631f24cb541f9918244f0;p=linux-2.6-omap-h63xx.git diff --git a/include/asm-mips/smtc_ipi.h b/include/asm-mips/smtc_ipi.h index 55f3419f654..8ce51757434 100644 --- a/include/asm-mips/smtc_ipi.h +++ b/include/asm-mips/smtc_ipi.h @@ -4,6 +4,8 @@ #ifndef __ASM_SMTC_IPI_H #define __ASM_SMTC_IPI_H +#include + //#define SMTC_IPI_DEBUG #ifdef SMTC_IPI_DEBUG @@ -32,6 +34,7 @@ struct smtc_ipi { #define LINUX_SMP_IPI 1 #define SMTC_CLOCK_TICK 2 +#define IRQ_AFFINITY_IPI 3 /* * A queue of IPI messages @@ -46,7 +49,7 @@ struct smtc_ipi_q { static inline void smtc_ipi_nq(struct smtc_ipi_q *q, struct smtc_ipi *p) { - long flags; + unsigned long flags; spin_lock_irqsave(&q->lock, flags); if (q->head == NULL) @@ -63,12 +66,10 @@ static inline void smtc_ipi_nq(struct smtc_ipi_q *q, struct smtc_ipi *p) spin_unlock_irqrestore(&q->lock, flags); } -static inline struct smtc_ipi *smtc_ipi_dq(struct smtc_ipi_q *q) +static inline struct smtc_ipi *__smtc_ipi_dq(struct smtc_ipi_q *q) { struct smtc_ipi *p; - long flags; - spin_lock_irqsave(&q->lock, flags); if (q->head == NULL) p = NULL; else { @@ -79,13 +80,25 @@ static inline struct smtc_ipi *smtc_ipi_dq(struct smtc_ipi_q *q) if (q->head == NULL) q->tail = NULL; } + + return p; +} + +static inline struct smtc_ipi *smtc_ipi_dq(struct smtc_ipi_q *q) +{ + unsigned long flags; + struct smtc_ipi *p; + + spin_lock_irqsave(&q->lock, flags); + p = __smtc_ipi_dq(q); spin_unlock_irqrestore(&q->lock, flags); + return p; } static inline void smtc_ipi_req(struct smtc_ipi_q *q, struct smtc_ipi *p) { - long flags; + unsigned long flags; spin_lock_irqsave(&q->lock, flags); if (q->head == NULL) { @@ -101,7 +114,7 @@ static inline void smtc_ipi_req(struct smtc_ipi_q *q, struct smtc_ipi *p) static inline int smtc_ipi_qdepth(struct smtc_ipi_q *q) { - long flags; + unsigned long flags; int retval; spin_lock_irqsave(&q->lock, flags);