• Home
  • Raw
  • Download

Lines Matching full:queue

21 #define QUEUE_STAT1_EMPTY		1 /* queue status bits */
37 /* queue interrupt request conditions */
51 u32 statne_h; /* 0x418 - queue nearly empty */
52 u32 statf_h; /* 0x41C - queue full */
60 void qmgr_set_irq(unsigned int queue, int src,
62 void qmgr_enable_irq(unsigned int queue);
63 void qmgr_disable_irq(unsigned int queue);
70 int qmgr_request_queue(unsigned int queue, unsigned int len /* dwords */,
75 int __qmgr_request_queue(unsigned int queue, unsigned int len /* dwords */,
78 #define qmgr_request_queue(queue, len, nearly_empty_watermark, \ argument
80 __qmgr_request_queue(queue, len, nearly_empty_watermark, \
84 void qmgr_release_queue(unsigned int queue);
87 static inline void qmgr_put_entry(unsigned int queue, u32 val) in qmgr_put_entry() argument
91 BUG_ON(!qmgr_queue_descs[queue]); /* not yet requested */ in qmgr_put_entry()
93 printk(KERN_DEBUG "Queue %s(%i) put %X\n", in qmgr_put_entry()
94 qmgr_queue_descs[queue], queue, val); in qmgr_put_entry()
96 __raw_writel(val, &qmgr_regs->acc[queue][0]); in qmgr_put_entry()
99 static inline u32 qmgr_get_entry(unsigned int queue) in qmgr_get_entry() argument
103 val = __raw_readl(&qmgr_regs->acc[queue][0]); in qmgr_get_entry()
105 BUG_ON(!qmgr_queue_descs[queue]); /* not yet requested */ in qmgr_get_entry()
107 printk(KERN_DEBUG "Queue %s(%i) get %X\n", in qmgr_get_entry()
108 qmgr_queue_descs[queue], queue, val); in qmgr_get_entry()
113 static inline int __qmgr_get_stat1(unsigned int queue) in __qmgr_get_stat1() argument
116 return (__raw_readl(&qmgr_regs->stat1[queue >> 3]) in __qmgr_get_stat1()
117 >> ((queue & 7) << 2)) & 0xF; in __qmgr_get_stat1()
120 static inline int __qmgr_get_stat2(unsigned int queue) in __qmgr_get_stat2() argument
123 BUG_ON(queue >= HALF_QUEUES); in __qmgr_get_stat2()
124 return (__raw_readl(&qmgr_regs->stat2[queue >> 4]) in __qmgr_get_stat2()
125 >> ((queue & 0xF) << 1)) & 0x3; in __qmgr_get_stat2()
129 * qmgr_stat_empty() - checks if a hardware queue is empty
130 * @queue: queue number
132 * Returns non-zero value if the queue is empty.
134 static inline int qmgr_stat_empty(unsigned int queue) in qmgr_stat_empty() argument
136 BUG_ON(queue >= HALF_QUEUES); in qmgr_stat_empty()
137 return __qmgr_get_stat1(queue) & QUEUE_STAT1_EMPTY; in qmgr_stat_empty()
141 * qmgr_stat_below_low_watermark() - checks if a queue is below low watermark
142 * @queue: queue number
144 * Returns non-zero value if the queue is below low watermark.
146 static inline int qmgr_stat_below_low_watermark(unsigned int queue) in qmgr_stat_below_low_watermark() argument
149 if (queue >= HALF_QUEUES) in qmgr_stat_below_low_watermark()
151 (queue - HALF_QUEUES)) & 0x01; in qmgr_stat_below_low_watermark()
152 return __qmgr_get_stat1(queue) & QUEUE_STAT1_NEARLY_EMPTY; in qmgr_stat_below_low_watermark()
156 * qmgr_stat_above_high_watermark() - checks if a queue is above high watermark
157 * @queue: queue number
159 * Returns non-zero value if the queue is above high watermark
161 static inline int qmgr_stat_above_high_watermark(unsigned int queue) in qmgr_stat_above_high_watermark() argument
163 BUG_ON(queue >= HALF_QUEUES); in qmgr_stat_above_high_watermark()
164 return __qmgr_get_stat1(queue) & QUEUE_STAT1_NEARLY_FULL; in qmgr_stat_above_high_watermark()
168 * qmgr_stat_full() - checks if a hardware queue is full
169 * @queue: queue number
171 * Returns non-zero value if the queue is full.
173 static inline int qmgr_stat_full(unsigned int queue) in qmgr_stat_full() argument
176 if (queue >= HALF_QUEUES) in qmgr_stat_full()
178 (queue - HALF_QUEUES)) & 0x01; in qmgr_stat_full()
179 return __qmgr_get_stat1(queue) & QUEUE_STAT1_FULL; in qmgr_stat_full()
183 * qmgr_stat_underflow() - checks if a hardware queue experienced underflow
184 * @queue: queue number
186 * Returns non-zero value if the queue experienced underflow.
188 static inline int qmgr_stat_underflow(unsigned int queue) in qmgr_stat_underflow() argument
190 return __qmgr_get_stat2(queue) & QUEUE_STAT2_UNDERFLOW; in qmgr_stat_underflow()
194 * qmgr_stat_overflow() - checks if a hardware queue experienced overflow
195 * @queue: queue number
197 * Returns non-zero value if the queue experienced overflow.
199 static inline int qmgr_stat_overflow(unsigned int queue) in qmgr_stat_overflow() argument
201 return __qmgr_get_stat2(queue) & QUEUE_STAT2_OVERFLOW; in qmgr_stat_overflow()