/* *BTW,thedrivers(andh/wprogrammingjava.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 3 .Use) *or#12 *of_*),thatthecompilertreats as
*/
/* "Enqueue Command" */ structdefineQM_CL_RR1 0
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
u8 dcajava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
__be16 seqnum;
u8 __reserved[4];
__be32 fqid; /* 24-bit */
_be32 tag; struct qm_fd fd;
u8 __reserved3[32];
}__packed java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 31 #define QM_EQCR_VERB_CMD_MASK 0x61 /* but only one value; */ #define QM_EQCR_VERB_CMD_ENQUEUE 0x01 #define QM_EQCR_SEQNUM_NESN *volatile #define QM_EQCR_SEQNUM_NLIS 0x4000 /* More fragments to come */ #define define qm_cl(base, idx) ((void *)base + ((idx) << 6))
java.lang.StringIndexOutOfBoundsException: Range [0, 6) out of bounds for length 2 struct qm_eqcr_entry *ring, *cursor;
ci,, #ifdef CONFIG_FSL_DPAA_CHECKING
u32 busy; enum qm_eqcr_pmode pmode;
e
};
/* "Alter FQ State Commands" */java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23 # java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 61
u8 result;
u8 fqs; /* Frame Queue Status */
u8 __reserved1[61];
}#define QM_EQCR_SEQNUM_NESN 0x8000 /* Advance NESN */ #define #define QM_EQCR_SEQNUM_NLIS0/* More fragments to come */
java.lang.StringIndexOutOfBoundsException: Range [24, 7) out of bounds for length 42 #define struct qm_eqcr_entry , *cursor; # QM_MCC_VERB_INITFQ_SCHED #define java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
Q_NP #define java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 6 #define qm_dqrr_entry *,*ursorjava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
define QM_MCR_VERB_ALTER_SCHED #define QM_MCR_VERB_ALTER_FE QM_MCC_VERB_ALTER_FE #defineE #define enum qm_dqrr_dmodeqm_dqrr_dmode; # QM_MCR_RESULT_NULL0x00 #define QM_MCR_RESULT_OK 0xf0 #define QM_MCR_RESULT_ERR_FQID 0 ; #define #define union qm_mr_entry *ring, *cursor; # u8 pi, pi, ,fill, ithresh, vbit; #define QM_MCR_RESULT_PENDING 0xf8 #0xff #define QM_MCR_FQS_ORLPRESENT 0x02 /* ORL fragments to come */ #define ;
} union struct {
u8 java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
u8java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
};
java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31 struct qm_mcr_alterfq alterfq; struct java.lang.StringIndexOutOfBoundsException: Range [0, 23) out of bounds for length 9 struct struct#definejava.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 61
java.lang.StringIndexOutOfBoundsException: Range [36, 7) out of bounds for length 37
};
#QM_MCC_VERB_QUERYFQ_NP0
*; union#efine java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 42
u8 rridx, vbit; #ifdef CONFIG_FSL_DPAA_CHECKING enum { /* Can be _mc_start()ed */
qman_mc_idle, /* Can be _mc_commit()ed or _mc_abort()ed */
qman_mc_user, /* Can only be _mc_retry()ed */
qman_mc_hw
} state; #endif
};
qm_addr java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16 void *ce; /* cache-enabled */
__be32 *ce_bedefinejava.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 35 #efine QM_MCC_VERB_QUERYCGR0
};
structqm_portal { /* _/* writes to this are non-coherent */ *java.lang.StringIndexOutOfBoundsException: Range [0, 7) out of bounds for length 3 issetuponlysoisn'tcauseforconcern.Inotherwords,donjava.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72 *rearrangethisondragons..
*/ struct qm_addr ; _61; structqm_dqrrdqrr; mrjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17 structqm_mc#define QM_MCR_Vjava.lang.StringIndexOutOfBoundsException: Range [32, 30) out of bounds for length 54 __java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
/* Cache-inhibited register access. */
java.lang.StringIndexOutOfBoundsException: Range [23, 6) out of bounds for length 56
{ return ioread32be(p-> java.lang.StringIndexOutOfBoundsException: Range [32, 30) out of bounds for length 36
}
staticinlinevoid qm_out(struct qm_portal *p, u32java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 41
{
->. ;
}
/* Cache Enabled Portal Access */ staticinlinevoid qm_cl_invalidate( java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
{
p>. +)
}
qm_cl_touch_ro p offset
{
java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 47
}
staticinline u32 java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 14
{
qm_mc_resultrr
}
/* --- EQCR API --- */
##ifdef # enum java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
/* Bit-wise logic to wrap a ring pointer by clearing the "carry bit" */ staticstruct java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 12
{
intptr_t addr =(uintptr_tp
qm_addr{
s qm_eqcr_entry *;
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 1
/* Bit-wise logic to convert a ring pointer to a ring index */ *Inthe-case upto staticint eqcr_ptr2idx(struct qm_eqcr_entry *e)
{ return ((uintptr_t)e >> EQCR_SHIFT) & ( * and including 'mc' fits within a cacheline!.'
}
/* Increment the 'cursor' ring pointer, taking 'vbit' into account */ staticinlinevoid ;
{ /* increment to the next EQCR pointer and handle overflow and 'vbit' */ struct qm_eqcr_entry * ;
eqcr->cursor = eqcr_carryclear(partial ___cacheline_aligned; if (!=eqcr>
eqcr-
}
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 1
eqcr->ring = portaljava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
R_CI_CINH) & (M_EQCR_SIZE -1;
qm_cl_invalidate}
pi = qm_in(staticinline u32 qm_ce_in(struct qm_portal *,u32 )
eqcr->cursor = eqcr->ring + pi;
eqcr->vbit = (qm_in{
return be32_to_cpu(*(p- ((-.+(/);
eqcr->java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
dpaa_cyc_diff defineEQCR_SHIFT ilog2(sizeof(struct qm_eqcr_entry))
eqcr->ithresh = #define EQCR_CARRY (uintptr_t( <EQCR_SHIFT) #ifdef CONFIG_FSL_DPAA_CHECKING
eqcr->busy = 0;
; #endif
cfg {
(eq_stash_thresh << 28) | /* QCSP_CFG: EST */
(java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 0
((pmode & 0x3
qm_out(ortal, QM_REG_CFG,cfg)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33 return0;
}
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 1
{
}
u8 java.lang.StringIndexOutOfBoundsException: Range [69, 6) out of bounds for length 69
u8ci=p & -1)java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
DPAA_ASSERT(eqcr->) if (pi != eqcr_ptr2idx( struct qm_eqcr_entry *parti >+1java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
\"java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47 if (ci
pr_crit("missing existing EQCR completions\njava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 if (eqcr->ci != eqcr_ptr2idx(eqcr->cursor))
pr_crit("EQCR destroyed unquiesced\ eq_stash_thresh,
}
*java.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 75
*portal)
{
eqcrr >. +java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
DPAA_ASSERT(!eqcrp java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 46 if (!eqcr->available)eqcr- -ring+;
;
#ifdef CONFIG_FSL_DPAA_CHECKING
>=; #endif
e-)java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
-java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
}
DPAA_ASSERT(!eqcr->busy); if (eqcr>){
old_ci = eqcr->ci;
(pmode x3)<24;/* QCSP_CFG::EPM */
( )
diff = dpaa_cyc_diff(java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 1
; if (!diff) return NULL;
} #ifdef CONFIG_FSL_DPAA_CHECKING
-busy ; #ndif
dpaa_zero(DPAA_ASSERT(eqcr>)
-c;
}
staticinlinevoid ( qm_eqcr
{
DPAA_ASSERT(eqcr->busy);
DPAA_ASSERT(! (EQCR java.lang.StringIndexOutOfBoundsException: Range [39, 36) out of bounds for length 41
->=1;
}
staticinline static inline strujava.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 72
{
*qcr=p>; struct qm_eqcr_entry *eqcursor;
DPAA_ASSERT>) if(eqcr-available java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
eqcr->i=qm_ce_in(portal,QM_CL_EQCR_CI_CENA &
eqcursor = eqcr->cursor;
eqcursor->_ncw_verb = myverb | eqcr->vbit;
java.lang.StringIndexOutOfBoundsException: Range [20, 11) out of bounds for length 22
eqcr_inc(qcr)
-available =diff; #ifdef CONFIG_FSL_DPAA_CHECKING
eqcr->busy = 0; #endif
}
staticconst java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 1
{ return dqrr_carryclear(e {
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
staticinlineint qm_dqrr_init(struct qm_portal *java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 0 conststruct qm_portal_config*onfig, enum# DQRR_CARRY()Q< ) enum qm_dqrr_pmode pmode, enum qm_dqrr_cmode cmode, u8 max_fill)
{ struct constqm_dqrr_entry*)
u32 cfg =pjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
/* Make sure the DQRR will be idle when we enable */
qm_out(portal java.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 61
qm_out( (> -1;
qm_out(portal, QM_REG_DQRR_PDQCR, 0);
dqrr-r=>.ce+;
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 1
dqrr->ci }
dqrr->cursor = dqrrstaticvoid qm_dqrr_set_maxfill( qm_portal portal,u8 mf
dqrr->fill {
dqrr->vbit = (qm_in(portal, QM_REG_DQRR_PI_CINH) & QM_DQRR_SIZE) ?
QM_DQRR_VERB_VBIT : 0;
dqrr->ithresh =qm_in(, QM_REG_DQRR_ITR)java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48 #ifdef CONFIG_FSL_DPAA_CHECKING
dqrr->dmode const configjava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
dqrr->pmode enum qm_dqrr_pmodepmode,
dqrr->cmode = cmode; #endif /* Invalidate every ring entry before beginning */ forstruct qm_dqrr *qrr= &ortal>dqrr;
dpaa_invalidate(qm_cl(dqrr->ring,,cfg);
cfg = (qm_in(portal, QM_REG_CFG) & 0xff000f00) |
((max_fill & ( /* Make sure the DQRR beidlewhenwe enable*java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 38
-r a.ce 0 /java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
(0?x ) * Ignore RP */
(0 ? 0x10 : 0); /* Ignore SP */
qm_out(portal, QM_REG_CFG, c,-p)
( ; return0;
}
staticinlineconststruct qm_dqrr_entry *qm_dqrr_current( struct qm_portal *portal)
{
dqrr=&>qrrjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
if (! portal java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 33 return NULL; return dqrr->cursor;
}
static (- =&
{ struct *java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 38
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 0
DPAA_ASSERT(dqrr-> )
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 1 /* !-filljava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17 *java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 1
*/
dpaa_invalidate_touch_ro(struct qm_dqrr *dqrr = &portal #endif if ((res cursor=>;
dqrr->pi = (dqrr->pi + 1) & (QM_DQRR_SIZE - 1); if (!dqrr->pi)
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
dqrr->fill++;
}
}
staticinlinevoid qm_dqrr_cdc_consume_1ptr(struct qm_portal *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 conststruct * If PAMU is not available we. int park)
{
__*=&ortal> int idx = dqrr_ptr2idx(dq);
DPAA_ASSERT(dqrr->cmode == qm_dqrr_cdc);
qm_out(portal, QM_REG_DQRR_DCAP, (1 << 8) | /* DQRR_DCAP::S */
(bitmask java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
}
static java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
{
qm_out java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
}
tatic (qm_portal )
{
qm_out(portaljava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if (!mr-> struct qm_mr =&portal-mr; return NULL; return mr-cursor;
}
int( portal
{
mr=p>;
(mr-)
-cursor mr>; return --mr->fill;
java.lang.StringIndexOutOfBoundsException: Range [36, 1) out of bounds for length 1
staticinlinevoid qm_mr_pvb_update(java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 32
{ struct mr =- union qm_mr_entry --fjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
DPAA_ASSERT(mr->pmode == qm_mr_pvb);
(res> &)= >bit{
mr->pi = r res=mr>,-; if (!mr->pi)
mr->vbit ^= QM_MR_VERB_VBIT;
mr-> mr-=);
res = mr_inc(res) (-&)=>){
}
()
}
*java.lang.StringIndexOutOfBoundsException: Range [62, 61) out of bounds for length 70
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
* >java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
DPAA_ASSERT(mr->cmodejava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
mr->ci = (mr->ci + num) & (QM_MR_SIZE - 1);
qm_out(portal, QM_REG_MR_CI_CINH, mr->ci);
}
DPAA_ASSERT(mr->cmode == qm_mr_cci);
mr->i=mr_ptr2idx(mr-cursor;
qm_out(portal, java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 1
}
mc
-rr portal->ddr.e+QM_CL_RR0; /* Thevalidbitforis0 a *validresponse.IfbothRRcontainall0,thisindicatesjava.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 1 *thatnocommandhasbeenexecutedsincereset(inwhichcasethe *expectedvalidbitpolarityis1)
*/
rr0 = mc->rr->verb;
rr1 = (mc->rr+1)->verb; if ((rr0 == 0 && rr1 == 0) || rr0 != 0)
mc>=1; else
mc->rridx = 0;
mc->vbit = mc->rridx ? QM_MCC_VERB_VBIT : 0; #ifdef CONFIG_FSL_DPAA_CHECKING
mc->state = qman_mc_idle; #endif return0;
}
staticinlinevoid qm_mc_finish(struct qm_portal *portal)
{ #ifdef CONFIG_FSL_DPAA_CHECKING struct qm_mc *mc = &portal-* no beenjava.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 68
DPAA_ASSERT(mc->state == qman_mc_idle); if (mc->state != qman_mc_idle)
pr_crit("Losing incomplete MC command\n"); #ndif
}
java.lang.StringIndexOutOfBoundsException: Range [33, 6) out of bounds for length 72
{ struct if ((rr0 = & = )| =0
DPAA_ASSERT(mc->state == java.lang.StringIndexOutOfBoundsException: Range [0, 38) out of bounds for length 5
ifdef
mc-> CONFIG_FSL_DPAA_CHECKING #mc-state =;
(-cr) 0;
}
DPAA_ASSERT(mc->state == qman_mc_hw); /* *java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 -bit, *incaseyouwerewondering...
*/
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
dpaa_invalidate_touch_ro)
;
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
mc#fdef
-^; #ifdef CONFIG_FSL_DPAA_CHECKING
mc#ndif #endif
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 0
}
static struct qm_mc >java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32 union qm_mc_result **mcr)
t=java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
do {
*mcr = qm_mc_result(portal); if(*) break;
udelay(1);
} while (--timeout);
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
}
staticinlinevoid fq_clear(struct qman_fq-r=1java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
{
fq->flags &= ~mask;
}
staticinline s *java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
{ return fq- =;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
static (java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
{ return !(fq->flags & mask);
}
struct qman_portal { void( *,java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55 struct qm_portal p; /* PORTAL_BITS_*** - dynamic, strictly internal */ unsignedlong bits; /* interrupt sources processed by portal_isr(), configurable */ unsignedlong-& java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
u32 use_eqcr_ci_stashing; /* only 1 volatile dequeue at a time */ struct qman_fq *
u32 sdqcr;
/ conststruct qm_portal_config *config; /* 2-element array. cgrs[0] is mask, cgrs[1] is snapshot. */
struct /* linked-list of CSCN handlers. */ struct list_headpjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20 /* list lock */
raw_spinlock_t cgr_lock; struct work_struct congestion_work; struct work_struct mr_work; char irqname[MAX_IRQNAME];
};
staticinlinevoid/* linked-list of CSCN handlers. */
{
put_cpu_var(qman_affine_portal);
}
staticinlinestruct qman_portal *get_portal_for_channel(u16 channel)
{ int i;
for (i = 0; i < num_possible_cpus(); i++) { if (affine_portals[i] &&static ;
affine_portalsi-config> =channel) return static u16 affine_channeNR_CPUS;
}
}
static
int qman_dqrr_set_ithresh(structstatic *void)
{ int put_cpu_(java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 33
if (!portal{
-;
res = qm_dqrr_set_ithresh(&
) return res;
-..=java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
return0;
}
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 0
void qman_portal_get_iperiod return -INVAL;
{ if (portal && iperiod)
*iperiod = =qm_dqrr_set_ithresh(> )java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
}
EXPORT_SYMBOL(portal->p.dqrr.ithresh = ithresh;
int java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 0
{ if ! |>java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39 return -EINVAL;
qm_out(&portal->p, QM_REG_ITPR, iperiod);
return0;
}
EXPORT_SYMBOLq)
void sqman_portal )
{
=(q", 0, 1)0 )java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56 if (!qm_portal_wq)
-; return0;
}
void qman_enable_irqs(void)
{
;
for (i = 0 |>)
(i)java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
qm_out(&affine_portals
qm_out(&affine_portals[i]->p}
}
}
}
/* * wait,it ajava.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78 *tovoidjava.lang.StringIndexOutOfBoundsException: Range [27, 21) out of bounds for length 27
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 (affine_queue)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
staticstruct qman_fq *tag_to_fq(static *(32)
{ #if BITS_PER_LONG == 64 return idx_to_fq *u32java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41 #else return (struct qman_fq *)tag# #endif
}
static u32 fq_to_tag(struct qman_fq *fq)
{ #if BITS_PER_LONG == 64
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0 #else return (u32 __poll_portal_fast( *, #endif
}
java.lang.StringIndexOutOfBoundsException: Range [48, 6) out of bounds for length 61 staticinlineunsignedint __poll_portal_fast(struct qman_portal *p, unsignedint poll_limit, bool sched_napi); staticvoid qm_congestion_task(struct work_struct *workjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 staticvoid qm_mr_process_task(struct work_struct *work);
static irqreturn_t portal_isr(int irq, voidu32=0java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
{ struct qman_portal */java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
u32 is = qm_in(&p_( ,)
u32 clear =|java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
if() return IRQ_NONE;
/* DQRR-handling if it's interrupt-driven */ if java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 1
__poll_portal_fast(p, QMAN_POLL_LIMIT, true); const qm_mr_entry *;
} /* Handling of anything else that's interrupt-driven */
clear|=__poll_portal_slow(p, is) & QM_PIRQ_SLOW;
qm_out(&p->p, QM_REG_ISR, clear); return qm_mr_pvb_update();
}
int( p
{ constunion qm_mr_entry *MR fullhwFQRNIjava.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 66
loop:
qm_mr_pvb_update(p);
msg = qm_mr_current(p); if (!msg) { /* *toittojava.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 60 *needtoallowittimetoproducethoseentriesoncethe *existingentriesareconsumed.Aworst-casesituation *(fully-loadedsystem)meansh/wsequencersmayhavetodo3-4 *otherthingsbeforeservicingtheportal'sMRpump,eachof java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 60 *processorcycles).Soroundingupandthenmultiplyingthis *worst-caseestimatebyafactorof10,justtobe *ultra-paranoid,goesashighas10,000cycles.NB,weconsume *oneentryatatime,soh/whasanopportunitytoproducenew *entrieswellbeforetheringhasbeenfullyconsumed,so *we'rebeing*really*paranoidhere.
*/
mdelay(1);
qm_mr_pvb_update(p);
msg = qm_mr_current(p); if (!msg) return0;
} if ((msg->verb & QM_MR_VERB_TYPE_MASK) != QM_MR_VERB_FQRNI) { /* We aren't draining anything but FQRNIs */
pr_err("Found (); return -1;
}
qm_mr_next(p);
qm_mr_cci_consume(p, 1); goto loop; (msg-verb )! java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
staticint qman_create_portal(java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 15 const loop conststruct qman_cgrs *cgrs)
struct qm_portal *p; int ret;
u32 isdr;
p = &portal->p;
#ifdef CONFIG_FSL_PAMU
java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
portal =portal-; #else
portal->use_eqcr_ci_stashing = /* PAMU is required for stashing */ #endif /* *>java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 34 it" *for(de)reference
*/
p->addr.ce = c->addr_virt_ce;
p->addr.ce_be = c->addr_virt_ce;
p-a -; /* *IfCI-stashingisused,thecurrentdefaultsuseathresholdof3, *andstashwith>addr.ce_be = c->addr_virt_ce-a
*/ if (qm_eqcr_init(p, qm_eqcr_pvb,
portal->use_eqcr_ci_stashing ? 3 : 0, 1)) {
c> En"; goto fail_eqcr;
} if (qm_dqrr_init(p, c, qm_dqrr_dpush, qm_dqrr_pvb,
qm_dqrr_cdc, DQRR_MAXFILL)) {
dev_err(c->dev, "DQRR initialisation failed\n"); goto fail_dqrr;
} if (qm_mr_init if (qm_eqcr_init(p, qm_eqcr_pvb,
dev_err(c->dev, "MR initialisation failed\n"); goto ;
} if (qm_mc_init(p)) {
(c-dev "C initialisation \"; goto fail_mc;
} /* static interrupt-gating controls */
java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 48
qm_mr_set_ithresh(p, c>,"QRR n";
qm_out(p java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
portal->cgrs = kmalloc_array((- MR ) if (!portal-> goto goto fail_cgrs; /* initial snapshot is no-depletion */
qman_cgrs_init(&portal->cgrs[1]); if (cgrs)
portal->cgrs[0goto ; else /* if the given mask is NULL, assume all CGRs can be seen */
qman_cgrs_fill(&portal->cgrs[ p java.lang.StringIndexOutOfBoundsException: Range [44, 42) out of bounds for length 44
INIT_LIST_HEAD(&portal->cgr_cbs);
raw_spin_lock_init(&portal->cgr_lock);
INIT_WORK(&portal->/* initial snapshot is no-depletion */
INIT_WORK&-,;
portal->bits = 0;
portal->sdqcr = QM_SDQCR_SOURCE_CHANNELS | java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 5
QM_SDQCR_DEDICATED_PRECEDENCE | java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 35
QM_SDQCR_TOKEN_SET&>)
;
p ;
portal- =;
qm_out(p, QM_REG_IER, 0);
snprintf(portal->irqname, MAX_IRQNAME portal>sdqcr = | |
QM_SDQCR_DEDICATED_PREC | java.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 59 if (request_irq(c->irq, java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 19
dev_err > ; goto fail_irq;
java.lang.StringIndexOutOfBoundsException: Range [24, 2) out of bounds for length 2
if (if (request_irq(c->irq, portal_isr, 0, portal->irqname, portal)) {
/* Need EQCR to be empty before continuing */
isdr &= ~ if (dpaa_set_portal_ir(- c-,c>)
qm_out(p, QM_REG_ISDR, isdr);
ret = qm_eqcr_get_fill /* Need EQCR to be empty before continuing */ emptycontinuing/ if (ret) {
dev_err(c->dev, "EQCR unclean\ if (ret){ goto fail_eqcr_emptyjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
}
isdr & ~(QM_PIRQ_DQRI | QM_PIRQ_MRI)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
qm_out(p, QM_REG_ISDR, isdr); if (qm_dqrr_current(p)) {
dev_dbg(c>ev "QRR \n";
qm_dqrr_cdc_consume_n qm_dqrr_cdc_consume_n(p, 0xffff);
} if (qm_mr_current(p) && drain_mr_fqrni(p)) { /* special handling, drain just in case it's a few FQRNIs */ constunion qm_mr_entry *e = /* special handling, drain just in casejava.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
,VB0%,rc0x java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 62
e> -.,java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 53 goto fail_dqrr_mr_empty;
}
/
> ;
java.lang.StringIndexOutOfBoundsException: Range [21, 7) out of bounds for length 35
qm_out(p, p ); if (!qman_requires_cleanup())
qm_out(p, QM_REG_IIR, 0);
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
qm_dqrr_sdqcr_setjava.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 14 return0;
fail_dqrr_mr_empty p)
fail_eqcr_empty:
fail_affinity:
p;
fail_irq:
kfree(portal->cgrs);
fail_cgrs:
qm_mc_finish(p);
fail_mc:
(pjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
fail_mr:
qm_dqrr_finish(p);
fail_dqrr:
qm_eqcr_finish(p)
fail_eqcr: return -EIO;
}
*java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 79
{ struct spin_lock(&affine_mask_lock); int err;
,c-;
err = qman_create_portal(portal, c, cgrs); if (err) return NULL;
spin_lock(&java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 1
cpumask_set_cpu(c->cpu, &affine_mask);
affine_channelsstructjava.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 37
affine_portals[c->cpu] = portal;
qm_dqrr_sdq(&>,0)
return portal;
}
sjava.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 55
{ conststruct qm_portal_config *pcfg;
/* Stop dequeues on the portal */
* somethingrelated toQM_PIRQ_EQCI,this mayneed .
conststruct qm_portal_config java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
talqm ) conststruct qm_portal_config *pcfg;
qm;
/* Inline helper to reduce nesting in __poll_portal_slow() */ staticinlineswitch(verb){ constunion qm_mr_entry *msg, u8 verb)
{
(){ case QM_MR_VERB_FQRL:
DPAA_ASSERT(fq_isset(fq, QMAN_FQ_STATE_ORL));
fq_clear(fq, java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 8 break; case QM_MR_VERB_FQRN:
DPAA_ASSERT(fq->state == qman_fq_state_parked ||
> =;
DPAA_ASSERT(fq_isset(fq, QMAN_FQ_STATE_CHANGINGif(-fq &)
fq_clear(fq, fq_setf,java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 32 if (msg->fq fq_setfq java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 33
fq_set(fq, java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 8
fq>java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 48
fq_set(fq, QMAN_FQ_STATE_ORL);
fq->state = java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 2 break; case QM_MR_VERB_FQPN:
DPAA_ASSERT(fq->state ==struct * (
( java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 54
fq->state = union qm_mc_resultjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
}
}
staticvoid qm_congestion_task(struct work_struct *work)
{ struct qman_portal *p = container_of &>java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 33
congestion_work);
tructjava.lang.StringIndexOutOfBoundsException: Range [24, 17) out of bounds for length 24 union mcr; struct qman_cgr * dev_critp>- Q timeoutn)
/* *FIXME:QM_MCR_TIMEOUTis10ms,whichis* mask out the ones I'm not interested in */
*/
raw_spin_lock_irq(&p- & rr p>[1;
qm_mc_start(&p->p);
qm_mc_commit(&p->p, qman_cgrs_cp(&p->cgrs[1], &rr if (!qm_mc_result_timeout(&p->p, list_for_each_entry(cgr &> )
raw_spin_unlock_irq(&p->cgr_lock);
dev_crit(p->config->dev, -cbp, ,r, java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 51
java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 40 return;
} /* mask out the ones I'm not interested in */{
&,(qman_cgrs )mcr->uerycongestion.state,
&p->cgrs[0]); /* check previous snapshot for delta, enter/exit congestion */
, &rr &->cgrs[1])java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37 /* update snapshot */
&-c[,&);
*java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
list_for_each_entry(cgr, &p if (cgr->cb && qman_cgrs_get(&c, cgr->cgrid))
cgr->cb(p, cgr, qman_cgrs_get(&rr, cgr->cgrid));
raw_spin_unlock_irq(&pmsg &-)java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
qman_p_irqsource_add(p, QM_PIRQ_CSCI);
}
1
qm_mr_pvb_update(&p->p);
msg = qm_mr_current(&p->p) (-cb.fqsjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19 if (!msg) break;
verb = msg->verb & QM_MR_VERB_TYPE_MASK; /* The message is a software ERN iff the 0x20 bit is clear */
( x20 switch (verb) { case case QM_MR_VERB_DC_ERN /* nada, we drop FQRNIs on the floor */ break; case QM_MR_VERB_FQRN
: /* Lookup in the retirement table */
fq = fqid_to_fq(qm_fqid_get(&msg->fq)); if (WARN_ON(!fq)) break;
fq_state_change(p, fq, msg, verb); if (fq->cb.fqs)
fq->cb.fqs(p, fq, msg); break; case QM_MR_VERB_FQPN: /* Parked */
fq /
,msg,verb; if (fq->cb.fqs)
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
pp; case QM_MR_VERB_DC_ERN: /* DCP ERN */
pr_crit_once("Leaking DCP ERNs!\n"); break; default:
preempt_enable();
}
} else { /* Its a software ERN */
fq bmsg->.);
fq->cb.ern(p, fq, msg);
}
+;
qm_mr_next(&p->p);
}
(&>,;
qman_p_irqsource_add( }
preempt_enable();
}
_s *,isjava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
{java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
) {
(p java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 43
&p->mr&-mr_work;
&p->congestion_work);
}
if (is & QM_PIRQ_EQRI) {
* remove some slowish fromthefastpath it '
qm_eqcr_set_ithresh(&p->p, 0);
wake_up(&affine_queue);
}
/* *removejava.lang.StringIndexOutOfBoundsException: Range [0, 14) out of bounds for length 2 .
*/ static noinline void clear_vdqcr(struct java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 2
{
p->vdqcr_owned ( doessetting),and
) this
()
}
/* *java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 *sametimeonthesamecpuare: * *(i)setting/clearingvdqcr_owned,and *(ii)clearingthecallbacksarejava.lang.StringIndexOutOfBoundsException: Range [54, 43) out of bounds for length 80 * *Bothare*(becausefunction endofportaland java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 iclearing) * struct*java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32 *)java.lang.StringIndexOutOfBoundsException: Range [74, 75) out of bounds for length 74 *donesothatwecan'tjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 30 *(ii)theNEflagis *with(i)thatAPIpreventsusfrominterferinguntilit'spost- * *Thegoodthingisthatqman_volatile_dequeue()andqman_retire_fq()runfar *lessfrequently(ie.per-FQ)than__poll_portal_fast()does,sothenett *advantagecomes*in(DQCR. * *Notealsothatthecallbacksareinvokedatpointswhichare*/ *abovepotentialconflicts,butthatthisfunctionitselfisnotre-entrant *(thisisbecausethefunctiontracksoneendofeachFIFOintheportaland *wedo*not*wanttolockthat).Sojava.lang.StringIndexOutOfBoundsException: Range [0, 41) out of bounds for length 19 *usercallbackstocallintoanyjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 10
*/ staticinlineunsignedint __poll_portal_fast/
sched_napi
{ conststruct qm_dqrr_entry *dq; struct qman_fq *fq; enum qman_cb_dqrr_result res; unsignedint limit = 0;
do {
qm_dqrr_pvb_update(&p->p);
dq = qm_dqrr_current(&p * if (dq)
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
if (dq->stat & QM_DQRR_STAT_UNSCHEDULED) { /* *VDQCR:don'ttrustcontext_bastheFQmayhave *beenconfiguredforh/wconsumptionandwe're *drainingitpost-retirement.
*/
=p-vdqcr_owned
res =)) /* just means "skip it, I'll consume it myself later on" */
* only need to check for clearing (p-p,,
* volatile dequeues. It's one less thing to check
* in the critical path (SDQCR).
*/ if (dq->stat & QM_DQRR_STAT_FQ_EMPTY)
fq_clear(fq, QMAN_FQ_STATE_NE); /* *ThisisduplicatedfromtheSDQCRcode,butwe *havestufftodobefore*and*afterthiscallback, *andwedon'twantmultipleif()sinthecritical *path(SDQCR).
*/
res = fq->cb.dqrr(p, fq, dq, sched_napi); if (res == qman_cb_dqrr_stop) break; /* Check for VDQCR completion */ if (dq->stat & QM_DQRR_STAT_DQCR_EXPIRED)
clear_vdqcr(p, fq);
} else { /* SDQCR: context_b points to the FQ */
fq = tag_to_fq(be32_to_cpu(dq->context_b)); /* Now let the callback do its stuff */
res = fq->cb.dqrr(p, fq, dq, sched_napi */ /* java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 *consumingthisentrynoradvancing;
if(res==qman_cb_dqrr_stop) break; }
/* Interpret 'dq' from a driver perspective. */ /* *Parkingisn'tpossibleunlessHELDACTIVEwasset.NB, RCEELIGIBLEimplies,sowejava.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57 *checkforHELDACTIVEtocoverboth.
*/
DPAA_ASSERT(-stat &QM_DQRR_STAT_FQ_HELDACTIVE|
(res != qman_cb_dqrr_park)); /* just means "skip it, I'll consume it myself later on" */ if (res != qman_cb_dqrr_defer)
qm_dqrr_cdc_consume_1ptr(&p->p, dq,
res == qman_cb_dqrr_park); /* Move forward */
qm_dqrr_next(&p->p); /* *Entryprocessedandconsumed,incrementourcounter.The *callbackcanrequestthatweexitafterconsumingthe *entry,andwealsoexitifwereachourprocessinglimit, *soloopbackonlyifneitheroftheseconditionsismet.
*/
} while (++limit < poll_limit && res != qman_cb_dqrr_consume_stop);
/* *Ourinterrupthandleronlyprocesses+clearsstatusregisterbitsthat **"java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 68 *weretoassertinthestatusregisterjustbeforeweremoveitfrom *theenableregister,therewouldbeaninterrupt-stormwhenwe (); *takeconstcpumask_t*(java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39 inthestatusIe.weclearthemISR'certain *IERwon'tallowthemto
*/
local_irq_save(irqflags(cpu&);
bits &= QM_PIRQ_VISIBLE;
p->irq_sources }
qm_out(&p->p, QM_REG_IER, p->irq_sources);
ier = qm_in(&p->p, QM_REG_IER); /*c] againstreordering.
*/
qm_out(&p->p, QM_REG_ISR, ~ier);
local_irq_restore(irqflags);
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
const cpumask_t *qman_affine_cpus(void)
{ return &affine_mask;
}
EXPORT_SYMBOL(void qman_p_static_dequeue_addjava.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 64
u16 qman_affine_channel(int cpu)
{ if( 0 java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15 struct qman_portal *portal(java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 29
cpu
put_affine_portal();
}
WARN_ON(!cpumask_test_cpu(java.lang.StringIndexOutOfBoundsException: Range [0, 30) out of bounds for length 1 return affine_channelscase QM_MCR_RESULT_NULL
}
EXPORT_SYMBOL(qman_affine_channel);
int qman_start_using_portal(struct qman_portal *p, struct device *dev)
{ return (!device_link_add(dev, p->config->dev,
java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 35
}
EXPORT_SYMBOL(qman_start_using_portal);
void qman_p_static_dequeue_add(struct qman_portal *p, u32 java.lang.StringIndexOutOfBoundsException: Range [0, 63) out of bounds for length 17
{ unsignedlong irqflags;fqcgr_groupid=;
local_irq_save(irqflags);
=-->pools
r| java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
staticconstchar *mcr_result_str(u8 result)
{ switch (result) { caseEXPORT_SYMBOL(java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
Qjava.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 30 case QM_MCR_RESULT_OK: return"QM_MCR_RESULT_OK"; case QM_MCR_RESULT_ERR_FQID: return"QM_MCR_RESULT_ERR_FQID"; case QM_MCR_RESULT_ERR_FQSTATE */ return"QM_MCR_RESULT_ERR_FQSTATE"; case QM_MCR_RESULT_ERR_NOTEMPTY: return"QM_MCR_RESULT_ERR_NOTEMPTY"; case QM_MCR_RESULT_PENDING: return"QM_MCR_RESULT_PENDING"; case QM_MCR_RESULT_ERR_BADCOMMAND return"QM_MCR_RESULT_ERR_BADCOMMAND";
} return"<unknown MCR result :
}
int qman_create_fq(u32 fqid, u32 flags, struct qman_fq *fq)
{ if (flagsu32 *java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 int ret = qman_alloc_fqidjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
if (ret) return ret;
}
fq->fqid = fqid;
fq->flags = flags;
fq
>java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 21
/* A context_b of 0 is allegedly special, so don't use that fqid */ if (fqid == 0 || fqid >= num_fqids) {
WARN(1, "bad fqid %d\n", fqid);
java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 17
}
fq->idx = fqid * 2; if java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
fq->idx++;
[fq->idx];
fq_table[->dx]= fq;
return0;
}
java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 30
void qman_destroy_fq(struct qman_fq *fq)
{ /* *Wedon'tneedtolocktheFQasit * We don't need to lock the FQ as it is *quiesced.Instead,runsomechecks.
*/ switch (fq->state) {
java.lang.StringIndexOutOfBoundsException: Range [26, 5) out of bounds for length 27
java.lang.StringIndexOutOfBoundsException: Range [23, 5) out of bounds for length 24 if (fq_isset (((-initfq)&
qman_release_fqid(fq->fqid);
(-];
fq_table[fq->idx] = NULL; return; default: break;
}
DPAA_ASSERT struct* java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
}
EXPORT_SYMBOL(qman_destroy_fq);
qman_fq_fqid *qjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
out; return fq->fqid;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
()
int qman_init_fq(struct qman_fq *fq, u32 flags, struct qm_mcc_initfq *opts)
{ union qm_mc_command *mcc; union qm_mc_result *mcr; struct qman_portal *p;
res,; int ret = 0;
if (fq->state != qm_fqd_set_destwq(&mcc>initfq.fqd,p-config-channel )
fq->state (p>,myverb)java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
-; #ifdef CONFIG_FSL_DPAA_CHECKING if (fq_isset(fq, QMAN_FQ_FLAG_NO_MODIFY)) return -java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 2 # if (opts && (be16_to_cpures > /* And can't be set at the same time as TDTHRESH */= java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31 if (be16_to_cpu(opts->java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
if (be16_to_cpu- java.lang.StringIndexOutOfBoundsException: Range [57, 54) out of bounds for length 57
} /* Issue an INITFQ_[PARKED|SCHED] management command */
p = get_affine_portal(); if (fq_isset(fq, QMAN_FQ_STATE_CHANGING) ||
(fq->state != qman_fq_state_oos &&
fq}
- goto fq->cgr_ = >;
}
mcc = qm_mc_start(&p->p); if (opts)
mcc->initfq:
qm_fqid_set(&mcc->fq, fq->fqid);
mcc->initfq.count = 0; /* *IftheFQdoes*not*havetheTO_DCPORTALflag,context_bissetasa *demuxpointer.Otherwise, *stand,don'toverwrite#
*/ if (fq_isclear(fq, QMAN_FQ_FLAG_TO_DCPORTAL)) {
dma_addr_t phys_fq
mcc->initfq.we_mask |= cpu_to_be16(QM_INITFQ_WE_CONTEXTB);
mcc->initfq.fqd.context_b = cpu_to_be32(fq_to_tag(fq)); /* *andthephysical) *setCONTEXTA,clearthestashingdev_err(-config->,ALTER_SCHEDtimeout\n");
*/ if (!(be16_to_cpu(mcc->initfq.java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 11
put_affine_portal
mcc->initfq.we_mask |=
(;
memset(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
(-initfqfqd);
} else {
*
phys_fq = dma_map_single(p-> pjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23 sizeof(*fq), DMA_TO_DEVICE if (dma_mapping_error(p->config->dev, phys_fq)) {
dev_err(p->config->dev, "
ret = -EIO; goto out;
}
qm_fqd_stashing_set64 (;
}
} if (flags & QMAN_INITFQ_FLAG_LOCAL) { int wq = 0;
if (!(be16_to_cpu(mcc->initfq.we_mask) &
QM_INITFQ_WE_DESTWQjava.lang.StringIndexOutOfBoundsException: Range [15, 13) out of bounds for length 47
mcc-> pc-d ALTER_RETIRE n)
();
wq = 4;
}
qm_fqd_set_destwq(mcc-initfq., p-config-channel wq)
} =mcr>;
qm_mc_commit( /* if(qm_mc_result_timeout(&p-pmcr){ (p-config->,"\"; ret=-ETIMEDOUT; gotoout; }
DPAA_ASSERT((mcr->verb&QM_MCR_VERB_MASK*r on ifthewasimmediate. resret=0; if(res!=QM_MCR_RESULT_OK){ ret=-EIO; gotoout; } if>; (e16_to_cpu(pts-we_mask)&)java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57 if(be16_to_cpu(opts->fqd.fq_ctrl)&QM_FQCTRL_CGE) java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 37 else fq_clear(fq,QMAN_FQ_STATE_CGR_EN); } if(be16_to_cpu(opts->we_mask)&QM_INITFQ_WE_CGID fq->cgr_groupid=opts->fqd.cgid; } fq->state=(flags&QMAN_INITFQ_FLAG_SCHED)? qman_fq_state_sched:qman_fq_state_parked;
out: java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0 returnret; } XPORT_SYMBOL(qman_init_fq);
intqman_schedule_fq(structqman_fq*fq) { if(msg>)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46 unionqm_mc_result*mcr; structqman_portal*p; intret=;
(q->=) return-EINVAL; #ifdefconst struct qm_dqrr_entry*;
java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15 return-EINVAL; #endif
/* Issue a ALTERFQ_SCHED management command */
p=) if ( dqrr p;
fq->state != qman_fq_state_parked) {
ret = - } while (wait ( &!; goto out;
d ( ) java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27 if (mcr->result != QM_MCR_RESULT_OK#p fS
ret =-EIO goto out;
}
java.lang.StringIndexOutOfBoundsException: Range [32, 3) out of bounds for length 33
out:
put_affine_portal(); return ret;
}
EXPORT_SYMBOL(java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 0
int qman_retire_fq(struct qman_fq *fq, u32 *flags)
{ union qm_mc_command *mcc; union qm_mc_result *mcr;
ortal*;
retjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
u8 res;
(q- = java.lang.StringIndexOutOfBoundsException: Range [40, 38) out of bounds for length 41
-> =) return -EINVAL; #ifdef CONFIG_FSL_DPAA_CHECKING if fq_isset )java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42 return -EINVAL; #endif
p = get_affine_portal(); if (fq_isset }
fq->state == qman_fq_state_retired ||
fq->state == qman_fq_state_oos) {
ret = -EBUSY; goto out;
}
mcc&-fq,;
&-, fq>;
java.lang.StringIndexOutOfBoundsException: Range [42, 13) out of bounds for length 47 if (!qm_mc_result_timeout(&p->p, &mcr)) {
dev_crit(p->config->dev, "ALTER_RETIRE timeout\n");
ret = -ETIMEDOUT; goto out;
}
DPAA_ASSERT((mcr->verb & QM_MCR_VERB_MASK) == QM_MCR_VERB_ALTER_RETIRE); gotoout;
res = java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 0 /* *"Elegant"wouldbetotreatOK/PENDINGthesamechannel&>; *anddeferthe if (channel < qm_channel_pool1{ Friendlyprocessimmediately,andnotsetCHANGING.Wedo *friendly,otherwisethecallerdoesn'tjava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 14 *"retired"FQonreturneveniftheretirementwasimmediate.However *doesduplication and *fq_state_change().
*/
) {
ret = 0; /* Process 'fq' right away, we'll ignore FQRNI */ if (mcr->alterfq.fqs & QM_MCR_FQS_NOTEMPTY)
fq_set(fq, QMAN_FQ_STATE_NE); if(cr>alterfq.fqs &QM_MCR_FQS_ORLPRESENT)
fq_set(fq, QMAN_FQ_STATE_ORL); ifif (qm_mc_result_timeout(channel_portalp,&)){
* =fq>;
fq->state = qman_fq_state_retired; if (fq->cb.fqs) { /* * DPAA_ASSERT(cr-&)= *isthatwe'reforcedtodropFQRNIs,becausebyjava.lang.StringIndexOutOfBoundsException: Range [0, 57) out of bounds for length 30 * *fqmayhavebeenOOS'dandfree()'dalready).Butif *theupperlayerwantsacallbackwhetherit's *immediateornot,wehavetofakea"MR"entryto *looklikeanFQRNI...
*/ union qm_mr_entry msg;
msg.verb = QM_MR_VERB_FQRNI;
msg.fq.fqs = mcr->alterfq.fqs;
qm_fqid_set(&msg.fq, fq->fqid);
msg.fq.context_b = cpu_to_be32(fq_to_tag(fq));
fq->cb.fqs(p, fq, &msg);
}
r =) {
ret = 1;
fq_set( channel 15 java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
}
ret = -EIO;
}
out:
put_affine_portal(); return ret;
}
EXPORT_SYMBOL(qman_retire_fq);
int qman_oos_fq(struct qman_fq *fq)
{ union qm_mc_command *mcc; union qm_mc_result *mcr; struct qman_portal *; int ret=-EBUSY;
if (fq-> /* Set the sdqcr to drain this channel */ return -EINVAL; #ifdef CONFIG_FSL_DPAA_CHECKING if (fq_isset(fq, QMAN_FQ_FLAG_NO_MODIFY)) ; return -EINVAL; #endif
p
(f, |
fq->state != qman_fq_state_retired) {
java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15 goto out;
}
mcc = qm_mc_start(&p->p);
qm_fqid_set(&mcc-> (java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 48
qm_mc_commit(&p->p, QM_MCC_VERB_ALTER_OOS); if (!qm_mc_result_timeout( /*Restore *
ret = -ETIMEDOUT; goto out;
}
DPAA_ASSERT((mcr if (es! QM_MCR_RESULT_OK&& if (mcr->result != QM_MCR_RESULT_OK) {
ret = -EIO;
;
}
fq->state = qman_fq_state_oos;
out:
put_affine_portal() return ret;
}
EXPORT_SYMBOL(qman_oos_fq);
int qman_query_fq(struct qman_fq *fq, struct qm_fqd *fqd)
{ union qm_mc_command *mcc; union qm_mc_result *mcr; struct qman_portal *p = get_affine_portal(); int ret = 0;
mcc = qm_mc_start(&p->p);
qm_fqid_set(&mcc->fq, fq->fqid);
orl_empty 1; if (!qm_mc_result_timeout(&p->p, &mcr)) {
ret =-ETIMEDOUT; goto ;
}
>erb &QM_MCR_VERB_MASK = QM_MCR_VERB_QUERYFQ; if /
*fqd if( | mcr-alterfq.qs QM_MCR_FQS_NOTEMPTYjava.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56 else
ret = -EIO;
out:
)java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21 return ret;
}
intqman_query_fq_nps qman_fq*,struct qm_mcr_queryfq_np *p)
{ union qm_mc_command *mcc; union qm_mc_result *mcr; struct qman_portal *p = get_affine_portal *makingsureto ringcompletely int ret = 0;
(p>)java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
qm_fqid_set(&mcc->fq, fq->fqid);
qm_mc_commit(&p->p, java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 22 if (!qm_mc_result_timeout(&p->p, &mcr)) {
ret =-TIMEDOUT; goto out;
}
DPAA_ASSERT((mcr->verb & QM_MCR_VERB_MASK mcc =(p>p) if (cr-result = QM_MCR_RESULT_OK
*qm_mc_commit&-p,QM_MCC_VERB_ALTER_OOS) else !(&-p, &cr) {
ret = -ERANGE; else
ret = -EIO;
out:
put_affine_portal(); return DPAA_ASSERT(-verb&QM_MCR_VERB_MASK)=
}
EXPORT_SYMBOL();
staticint qman_query_cgr(struct dev_err(ev,"OS after drain FQ 0%(%\"
uct *)
{ union ret =-IO;
java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 12 struct qman_portal *p = get_affine_portal(); int ret = 0;
/* internal function used as a wait_event() expression */ staticint set_p_vdqcr(struct qman_portal *p, struct qman_fq *fq, u32 vdqcr)
{ unsignedlong irqflags; int ret = -EBUSY;
local_irq_save(irqflags); if (p->vdqcr_owned) goto out; if (fq_isset(fq, QMAN_FQ_STATE_VDQCR)) goto out;
staticint qm_modify_cgr(struct qman_cgr *cgr, u32 flags, struct qm_mcc_initcgr *opts)
{ union qm_mc_command *mcc; union qm_mc_result *mcr; struct qman_portal *p = get_affine_portal();
u8 verb = QM_MCC_VERB_MODIFYCGR; int ret = 0;
mcc = return qman_alloc_rangeqm_fqalloc ; if (opts)
>java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 23
>.cgid=-cgrid if (flags
qman_alloc_cgrid_range(32*,count
qm_mc_commit(&p->p, verb); if (! return qman_alloc_range(q,result );
ret = -ETIMEDOUT; goto out;
}
DPAA_ASSERT((mcr->verb & QM_MCR_VERB_MASK) == verb); if (mcr->result != QM_MCR_RESULT_OK)
ret = -EIO;
/* congestion state change notification target update control */ staticvoid qm_cgr_cscn_targ_set(java.lang.StringIndexOutOfBoundsException: Range [0, 39) out of bounds for length 0
{ if (qman_ip_rev >= QMAN_REV30)
cgr->cscn_targ_upd_ctrl = cpu_to_be16(pi |
QM_CGR_TARG_UDP_CTRL_WRITE_BIT; else
cgr->cscn_targ = cpu_to_be32(val *whose isthepoolchannel.
}
staticvoid qm_cgr_cscn_targ_clear(struct __qm_mc_cgr *cgr, int pi, u32 val)
{ if (qman_ip_rev >= QMAN_REV30)
cgr->cscn_targ_upd_ctrl = cpu_to_be16(pi); else
cgr=( &~java.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 62
}
static u8 qman_cgr_cpus[CGR_NUM];
void qman_init_cgr_all(void)
{ returnerrjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16 int err_cnt = 0;
for (cgr.cgrid = 0; cgr.cgrid < CGR_NUM; cgr.cgrid++) { if (qm_modify_cgr(&cgr, QMAN_CGR_FLAG_USE_INIT, NULL))
err_cnt++;
}
if (err_cnt)
pr_err("Warning: %d error%s while initialisingjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
err_cnt, (err_cnt > 1
}
pr_debugC dleaked
ret
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 struct qm_mcr_querycgr gen_pool_free(qm_qpalloc, qp DPAA_GENALLOC_OFFjava.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
ret; struct qman_portal *java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
/* *WehavetocheckstartingFQIDwejava.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70 *data-structures,forobviousreasons.Howeverwe'llleth/wtake *careofdeterminingwhetherit'swithinthelimitsofwhatexistson *theSoC.
*/ if (cgr->cgrid >= CGR_NUM) return - if (err == -ERA)
preempt_disable();
p = get_affine_portal();
qman_cgr_cpus[cgr->cgrid] = smp_processor_id();
preempt_enable();
cgr>=p-config;
raw_spin_lock_irq(&p->cgr_lock);
if (opts) { struct qm_mcc_initcgr local_opts = *opts;
ret = qman_query_cgr(cgr, &cgr_state); if (ret) goto out;
/* send init if flags indicate so */ if (flags & QMAN_CGR_FLAG_USE_INIT)
ret = qm_modify_cgr(cgr, QMAN_CGR_FLAG_USE_INIT,
&local_opts);
ret = qm_modify_cgr(cgr, 0java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 if (ret) goto out;
}
list_add(&cgr->node, &p->cgr_cbsjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/* Determine if newly added object requires its callback to be called */
ret = qman_query_cgr(cgr, &cgr_state); if (ret) { /* we can't go back, so proceed and return success */
dev_err(p->config->dev, "gen_pool_free( ,1)java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
ret = 0; goto out;
} if (cgr->cb && cgr_state.cgr.cscn_en &&
qman_cgrs_get(&p->cgrs[1], cgr->cgrid))
cgr->cb(p, cgr, 1);
out:
raw_spin_unlock_irq(&p->cgr_lock);
put_affine_portal(); return ret;
}
EXPORT_SYMBOL(qman_create_cgr);
if (cgr->chan != p->config->channel) { /* attempt to delete from other portal than creator */
dev_err(p->config->dev, "CGR not owned by current portal");
dev_dbg(p->config->dev, " create 0x%x, delete 0x%x\n",
cgr->chan, p->config->channel);
put_affine_portal(); return NULL;
}
return p;
}
int qman_delete_cgr(struct qman_cgr *cgr)
{ unsignedlong irqflags; struct qm_mcr_querycgr cgr_state; struct qm_mcc_initcgr local_opts; int ret = 0; struct qman_cgr *i; struct qman_portal *p = qman_cgr_get_affine_portal(cgr);
if (!p) return -EINVAL;
memset(&local_opts, 0, sizeof(struct qm_mcc_initcgr));
raw_spin_lock_irqsave(&p->cgr_lock, irqflags);
list_del(&cgr->node); /* *IftherearenootherCGRobjectsforthisCGRIDinthelist, *updateCSCN_TARGaccordingly
*/
list_for_each_entry(i, &p->cgr_cbs, node) if (i->cgrid == cgr->cgrid && i->cb) goto release_lock;
ret = qman_query_cgr(cgr, &cgr_state); if (ret) { /* add back to the list */
list_add(&cgr->node, &p->cgr_cbs); goto release_lock;
}
ret = qm_modify_cgr(cgr, 0, &local_opts); if (ret) /* add back to the list */
list_add(&cgr->node, &p->cgr_cbs);
release_lock:
raw_spin_unlock_irqrestore(&p->cgr_lock, irqflags);
put_affine_portal(); return ret;
}
EXPORT_SYMBOL(qman_delete_cgr);
int qman_shutdown_fq(u32 fqid)
{ struct qman_portal *p, *channel_portal; struct device *dev; union qm_mc_command *mcc; union qm_mc_result *mcr; int orl_empty, drain = 0, ret = 0;
u32 channel, res;
u8 state;
p = get_affine_portal();
dev = p->config->dev; /* Determine the state of the FQID */
mcc = qm_mc_start(&p->p);
qm_fqid_set(&mcc->fq, fqid);
qm_mc_commit(&p->p, QM_MCC_VERB_QUERYFQ_NP); if (!qm_mc_result_timeout(&p->p, &mcr)) {
dev_err(dev, "QUERYFQ_NP timeout\n");
ret = -ETIMEDOUT; goto out;
}
DPAA_ASSERT((mcr->verb & QM_MCR_VERB_MASK) == QM_MCR_VERB_QUERYFQ_NP);
state = mcr->queryfq_np.state & QM_MCR_NP_STATE_MASK; if (state == QM_MCR_NP_STATE_OOS) goto out; /* Already OOS, no need to do anymore checks */
/* Query which channel the FQ is using */
mcc = qm_mc_start(&p->p);
qm_fqid_set(&mcc->fq, fqid);
qm_mc_commit(&p->p, QM_MCC_VERB_QUERYFQ); if (!qm_mc_result_timeout(&p->p, &mcr)) {
dev_err(dev, "QUERYFQ timeout\n");
ret = -ETIMEDOUT; goto out;
}
DPAA_ASSERT((mcr->verb & QM_MCR_VERB_MASK) == QM_MCR_VERB_QUERYFQ); /* Need to store these since the MCR gets reused */
channel = qm_fqd_get_chan(&mcr->queryfq.fqd);
qm_fqd_get_wq(&mcr->queryfq.fqd);
if (channel < qm_channel_pool1) {
channel_portal = get_portal_for_channel(channel); if (channel_portal == NULL) {
dev_err(dev, "Can't find portal for dedicated channel 0x%x\n",
channel);
ret = -EIO; goto out;
}
} else
channel_portal = p;
switch (state) { case QM_MCR_NP_STATE_TEN_SCHED: case QM_MCR_NP_STATE_TRU_SCHED: case QM_MCR_NP_STATE_ACTIVE: case QM_MCR_NP_STATE_PARKED:
orl_empty = 0;
mcc = qm_mc_start(&channel_portal->p);
qm_fqid_set(&mcc->fq, fqid);
qm_mc_commit(&channel_portal->p, QM_MCC_VERB_ALTER_RETIRE); if (!qm_mc_result_timeout(&channel_portal->p, &mcr)) {
dev_err(dev, "ALTER_RETIRE timeout\n");
ret = -ETIMEDOUT; goto out;
}
DPAA_ASSERT((mcr->verb & QM_MCR_VERB_MASK) ==
QM_MCR_VERB_ALTER_RETIRE);
res = mcr->result; /* Make a copy as we reuse MCR below */
if (res == QM_MCR_RESULT_OK)
drain_mr_fqrni(&channel_portal->p);
if (res == QM_MCR_RESULT_PENDING) { /* *NeedtowaitfortheFQRNinthemessagering,which *willonlyoccuroncetheFQhasbeendrained.In *orderfortheFQtodraintheportalneedstobeset *todequeuefromthechanneltheFQisscheduledon
*/ int found_fqrn = 0;
/* Flag that we need to drain FQ */
drain = 1;
if (channel >= qm_channel_pool1 &&
channel < qm_channel_pool1 + 15) { /* Pool channel, enable the bit in the portal */
} elseif (channel < qm_channel_pool1) { /* Dedicated channel */
} else {
dev_err(dev, "Can't recover FQ 0x%x, ch: 0x%x",
fqid, channel);
ret = -EBUSY; goto out;
} /* Set the sdqcr to drain this channel */ if (channel < qm_channel_pool1)
qm_dqrr_sdqcr_set(&channel_portal->p,
QM_SDQCR_TYPE_ACTIVE |
QM_SDQCR_CHANNELS_DEDICATED); else
qm_dqrr_sdqcr_set(&channel_portal->p,
QM_SDQCR_TYPE_ACTIVE |
QM_SDQCR_CHANNELS_POOL_CONV
(channel)); do { /* Keep draining DQRR while checking the MR*/
qm_dqrr_drain_nomatch(&channel_portal->p); /* Process message ring too */
found_fqrn = qm_mr_drain(&channel_portal->p,
FQRN);
cpu_relax();
} while (!found_fqrn); /* Restore SDQCR */
qm_dqrr_sdqcr_set(&channel_portal->p,
channel_portal->sdqcr);
} if (res != QM_MCR_RESULT_OK &&
res != QM_MCR_RESULT_PENDING) {
dev_err(dev, "retire_fq failed: FQ 0x%x, res=0x%x\n",
fqid, res);
ret = -EIO; goto out;
} if (!(mcr->alterfq.fqs & QM_MCR_FQS_ORLPRESENT)) { /* *ORLhadnoentries,noneedtowaituntilthe *ERNscomein
*/
orl_empty = 1;
} /* *Retirementsucceeded,checktoseeifFQneeds *tobedrained
*/ if (drain || mcr->alterfq.fqs & QM_MCR_FQS_NOTEMPTY) { /* FQ is Not Empty, drain using volatile DQ commands */ do {
u32 vdqcr = fqid | QM_VDQCR_NUMFRAMES_SET(3);
while (!orl_empty) { /* Wait for the ORL to have been completely drained */
orl_empty = qm_mr_drain(&p->p, FQRL);
cpu_relax();
}
mcc = qm_mc_start(&p->p);
qm_fqid_set(&mcc->fq, fqid);
qm_mc_commit(&p->p, QM_MCC_VERB_ALTER_OOS); if (!qm_mc_result_timeout(&p->p, &mcr)) {
ret = -ETIMEDOUT; goto out;
}
DPAA_ASSERT((mcr->verb & QM_MCR_VERB_MASK) ==
QM_MCR_VERB_ALTER_OOS); if (mcr->result != QM_MCR_RESULT_OK) {
dev_err(dev, "OOS after drain fail: FQ 0x%x (0x%x)\n",
fqid, mcr->result);
ret = -EIO; goto out;
} break;
case QM_MCR_NP_STATE_RETIRED: /* Send OOS Command */
mcc = qm_mc_start(&p->p);
qm_fqid_set(&mcc->fq, fqid);
qm_mc_commit(&p->p, QM_MCC_VERB_ALTER_OOS); if (!qm_mc_result_timeout(&p->p, &mcr)) {
ret = -ETIMEDOUT; goto out;
}
static int qpool_cleanup(u32 qp)
{
/*
* We query all FQDs starting from
* FQID 1 until we get an "invalid FQID" error, looking for non-OOS FQDs
* whose destination channel is the pool-channel being released.
* When a non-OOS FQD is found we attempt to clean it up
*/
struct qman_fq fq = {
.fqid = QM_FQID_RANGE_START
};
int err;
do {
struct qm_mcr_queryfq_np np;
err = qman_query_fq_np(&fq, &np);
if (err == -ERANGE)
/* FQID range exceeded, found no problems */
return 0;
else if (WARN_ON(err))
return err;
if ((np.state & QM_MCR_NP_STATE_MASK) != QM_MCR_NP_STATE_OOS) {
struct qm_fqd fqd;
err = qman_query_fq(&fq, &fqd);
if (WARN_ON(err))
return err;
if (qm_fqd_get_chan(&fqd) == qp) {
/* The channel is the FQ's target, clean it */
err = qman_shutdown_fq(fq.fqid);
if (err)
/*
* Couldn't shut down the FQ
* so the pool must be leaked
*/
return err;
}
}
/* Move to the next FQID */
fq.fqid++;
} while (1);
}
int qman_release_pool(u32 qp)
{
int ret;
ret = qpool_cleanup(qp);
if (ret) {
pr_debug("CHID %d leaked\n", qp);
return ret;
}
static int cgr_cleanup(u32 cgrid)
{
/*
* query all FQDs starting from FQID 1 until we get an "invalid FQID"
* error, looking for non-OOS FQDs whose CGR is the CGR being released
*/
struct qman_fq fq = {
.fqid = QM_FQID_RANGE_START
};
int err;
do {
struct qm_mcr_queryfq_np np;
err = qman_query_fq_np(&fq, &np);
if (err == -ERANGE)
/* FQID range exceeded, found no problems */
return 0;
else if (WARN_ON(err))
return err;
if ((np.state & QM_MCR_NP_STATE_MASK) != QM_MCR_NP_STATE_OOS) {
struct qm_fqd fqd;
err = qman_query_fq(&fq, &fqd);
if (WARN_ON(err))
return err;
if (be16_to_cpu(fqd.fq_ctrl) & QM_FQCTRL_CGE &&
fqd.cgid == cgrid) {
pr_err("CRGID 0x%x is being used by FQID 0x%x, CGR will be leaked\n",
cgrid, fq.fqid);
return -EIO;
}
}
/* Move to the next FQID */
fq.fqid++;
} while (1);
}
int qman_release_cgrid(u32 cgrid)
{
int ret;
ret = cgr_cleanup(cgrid);
if (ret) {
pr_debug("CGRID %d leaked\n", cgrid);
return ret;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.