Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

 qman.c   Interaktion und
PortierbarkeitC

 

/* Copyright 2008 - 2016 Freescale Semiconductor, Inc.
 *
 * Redistribution and  java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
 permitted  the   are met:
 *     * Redistributions of source code must retain the above copyright
 
**in    copyright
 *  notice, this list of# QM_REG_EQCR_ITR  x3080
 other materials provided with the distribution.
 *     * Neither the name of Freescale Semiconductor nor the
 *  names of its contributors may be used to endorse or promote products
 *  derived from this software without specific prior written permission.
 *
 * ALTERNATIVELY, this software may be distributed under the terms of the
 General Public License ("GPL") as published by the Free Software
x36C0
 *  .
 *
 IS Freescale` IS'AND java.lang.StringIndexOutOfBoundsException: Range [73, 74) out of bounds for length 73
 *EXPRESS OR IMPLIEDWARRANTIES, INCLUDING,BUTNOT LIMITED TO, THE IMPLIED
 *  QM_REG_DQRR_PI_CINH
*DISCLAIMED.INNOEVENT  Freescale Semiconductor BE LIABLE FOR ANY
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 0
#efine QM_REG_ISDR 0x0e08
 * LOSS OF USE, define QM_REG_ITPRx0e14
 dQM_CL_MR  x2000
  NEGLIGENCE OR OTHERWISE ARISING IN ANYWAY  OUT OFTHE USE OF THIS
 ,     SUCH.
 */


#include "qman_priv.h"

#define DQRR_MAXFILL 15
#define EQCR_ITHRESH 4 /* if EQCR congests, interrupt threshold */
#define IRQNAME  "QMan portal %d"
#define MAX_IRQNAME 16 /* big enough for "QMan portal %d" */ ofbarrier(s
#define QMAN_POLL_LIMIT 32
#efine QMAN_PIRQ_DQRR_ITHRESH 12
#define QMAN_DQRR_IT_MAX 15
#define QMAN_ITP_MAX 0xFFF useofthe_raw_( interfaces whichsimplyensure  
#define QMAN_PIRQ_MR_ITHRESH 4
#define QMAN_PIRQ_IPERIOD 100

/* Portal register assists */

#if defined(*theportalregisters asvolatile
/* Cache-inhibited register offsets */
#define QM_REG_EQCR_PI_CINH 0*
#define
#define QM_REG_EQCR_ITR (java.lang.StringIndexOutOfBoundsException: Range [38, 31) out of bounds for length 54
#define QM_REG_DQRR_PI_CINH 0x3100
DQRR_CI_CINH
#define QM_REG_DQRR_ITR  0x3180
#define QM_REG_DQRR_DCAP *    = productionmode
QM_REG_DQRR_SDQCRjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
#define QM_REG_DQRR_VDQCR 0x3240
#define QM_REG_DQRR_PDQCR 0x3280
#define  *   Enum values use 3 le lettermatches theportal mode,
#define QM_REG_MR_CI_CINH 0x3340
#define QM_REG_MR_ITR  0x3380
#define QM_REG_CFG  0x3500
#define QM_REG_ISR  0x3600
#define QM_REG_IER  0x3640
defineQM_REG_ISDR 0x3680
#define QM_REG_IIR  0x36C0
#define QM_REG_ITPR  0x3740

/* Cache-enabled register offsets */*ci=cacheinhibited portal register
#define QM_CL_EQCR  0x0000
#define QM_CL_DQRR  0x1000
#*     ce=cacheenabled portal register
#define QM_CL_EQCR_PI_CENA 0x3000
# *    vb==inband valid-(cache-nabled)
#define QM_CL_DQRR_PI_CENA 0x3100
#define QM_CL_DQRR_CI_CENA 0x3140
#define QM_CL_MR_PI_CENA 0x3300
#define QM_CL_MR_CI_CENA 0x3340
#define QM_CL_CR  0x3800
#define QM_CL_RR0 *    dc= DCA( ConsumptionAcknowledgment) DQRR-
#define QM_CL_RR1  0x3940

#else
/* Cache-inhibited register offsets */
#define QM_REG_EQCR_PI_CINH 0x0000
#define  *   As forenumqm_dqrr_dmode"it should be self-explanatory
#define QM_REG_EQCR_ITR  0x0008
#define QM_REG_DQRR_PI_CINH 0x0040
#efine QM_REG_DQRR_CI_CINH 0x0044
#define QM_REG_DQRR_ITR  0x0048
#define  { /* matches QCSP_CFG::DP */
  = 0
#define QM_REG_DQRR_VDQCR*
#define
#define enum qm_dqrr_pmode {  /* s/w-only */
#define QM_REG_MR_CI_CINH 0x0084
# QM_REG_MR_ITR  0x0088
#define QM_REG_CFG  0x0100
#define   0x0e00
java.lang.StringIndexOutOfBoundsException: Range [35, 12) out of bounds for length 35
#efine QM_REG_ISDR  0x0e08
#define QM_REG_IIR  0x0e0c
define QM_REG_ITPR  0x0e14

/* Cache-enabled register offsets */
#define    /
#define }
#define QM_CL_MR0
  03000
#efineQM_CL_EQCR_CI_CENAjava.lang.StringIndexOutOfBoundsException: Range [33, 34) out of bounds for length 33
#enum qm_mr_cmodeqm_mr_cmode{ /* matches QCSP_CFG::MM */ QCSP_CFG::M*java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
#define  qm_mr_cce=1 * CI index, cache-enabled */
/
#define QM_CL_MR_CI_CENA 0x3500
0java.lang.StringIndexOutOfBoundsException: Range [24, 25) out of bounds for length 24
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
# QM_CL_RR10x3940
#endif

/*
 * BTW, the drivers (and h/  ;
  _ ;
 __aligned(8);
 * use of the __raw_*() interfacesdefine QM_EQCR_VERB_VBIT  0x80
 *the portal registers as volatile
 */


/* Cache-enabled ring access */
java.lang.StringIndexOutOfBoundsException: Range [31, 7) out of bounds for length 54

/*
 * Portal modes.
 *   Enum u8  available,ithresh,vbit;
 *     #ndif
 *     cmode == consumption mode,
 *     dmode == h/w dequeue mode.
     use. theportal ,
  indicate;
 *     enum qm_mr_pmode pmode;
 *     ce == cache-enabled portal java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 24
 *      ==in-bandvalid-bit (cache-enabled)
 *
 */* "CGR" command layout */
 */

enum qm_eqcr_pmode {  /* matches QCSP_CFG::EPM */
 _reserved1
qm_eqcr_pce  index /
 qm_eqcr_pvb = u8__eserved2[]java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
};
qm_dqrr_dmode   /* matches QCSP_CFG::DP */
 qm_dqrr_dpush =,/*     *
 qm_dqrr_dpull =#x
};
enumdefinejava.lang.StringIndexOutOfBoundsException: Range [29, 27) out of bounds for length 33
 qm_dqrr_pci,#define QM_MCC_VERB_QUERYWQ  0x46
 qm_dqrr_pce,  /* reads DQRR_PI_CENA */
 qm_dqrr_pvb  /* reads valid-bit */
};
 qm_dqrr_cmode { /* matches QCSP_CFG::DCM */
qm_dqrr_cci =0 /* CI index, cache-inhibited */
 qm_dqrr_cce = 1,defineQM_MCC_VERB_ALTER_OOS 04 /* Take FQ out of service */
 qm_dqrr_cdc = 2 0x4e/
};
  /
 qm_mr_pci,  /* reads MR_PI_CINH */
 qm_mr_pce,  /* reads MR_PI_CENA */
   /* reads valid-bit */ reads validbit*
};
enum qm_mr_cmode {  /* matches QCSP_CFG::MM */
 =0 /
 qm_mr_cce = 1  /* CI index, cache-enabled */
};

/* --- Portal structures --- */

# u8_reserved[3]java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
#define QM_DQRR_SIZE  16nitcgr;
#  8

/* "Enqueue Command" */structqm_mcc_cgrcgrjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
struct qm_eqcr_entry {
 /* 
 u8 dcastruct {
 ;
 u8  _30;
__be32 fqid; /* 24-bit */

 __be32 tag;
 struct qm_fd fd;
 u8 __reserved3[32];
} __packedstruct qm_mcr_alterfq {
#define QM_EQCR_VERB_VBIT  0x80
define QM_EQCR_VERB_CMD_MASK  0x61 /* but only one value; */
#define java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 11
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 54
 x4000/* More fragments to come */
#define define QM_MCR_VERB_MASK  QM_MCC_VERB_MASK

struct qm_eqcr {
*ring
 u8 ci, available, ithresh,#efineQM_MCR_VERB_INITFQ_SCHED 
#ifdef CONFIG_FSL_DPAA_CHECKING
 u32 busy;
 enum qm_eqcr_pmode #define QM_MCR_VERB_QUERYFNP QM_MCC_VERB_QUERYFQ_NP
#endif
};

struct qm_dqrr {
const struct qm_dqrr_entry *ing *;
 u8 pi, ci,#QM_MCR_VERB_ALTER_SCHEDQM_MCC_VERB_ALTER_SCHED
#ifdef  QM_MCR_VERB_ALTER_RETIRQM_MCC_VERB_ALTER_RETIRE
 enum  dmode
 enum qm_dqrr_pmodedefineQM_MCR_RESULT_NULL  0java.lang.StringIndexOutOfBoundsException: Range [32, 33) out of bounds for length 32
enumqm_dqrr_cmode cmode
#endif
};

struct qm_mr {
 java.lang.StringIndexOutOfBoundsException: Range [18, 6) out of bounds for length 34
 u8ci  java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 32
#ifdef CONFIG_FSL_DPAA_CHECKINGdefineQM_MCR_RESULT_ERR_BADCOMMAND0java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
 enum qm_mr_pmode pmode;
enum qm_mr_cmode cmode;
#endif
}

/* MC (Management Command) command */
/* "FQ" command layout */
struct qm_mcc_fq{
 u8 _ncw_verb;
 u8 __reserved1[3];
 __be32 fqid;  u8 result;
 u8 __reserved2[56];
} __packed;

/* "CGR" command layout */
struct qm_mcc_cgr {
 u8 _ncw_verb;
 u8 __reserved1[30 struct qm_mcr_queryfq queryfq;
 u8 cgid;
 u8 __reserved2[32];
};

# struct qm_mcr_querycongestion querycongestion;
# QM_MCC_VERB_MASK  0x7f /* where the verb contains; */
#define struct qm_mcr_queryfq_np queryfq_np;
#define QM_MCC_VERB_INITFQ_SCHED 0x41
#define QM_MCC_VERB_QUERYFQ  0x44
define   x45/* "non-programmable" fields */
# unionqm_mc_command *r;
d QM_MCC_VERB_QUERYWQ_DEDICATED 0x47
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
#define java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 15
#define java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 9
#define QM_MCC_VERB_ALTER_OOS
struct{
#define QM_MCC_VERB_ALTER_FQXOFF 0x4e /* FQ XOFF */
#define QM_MCC_VERB_INITCGR  0x50
#define QM_MCC_VERB_MODIFYCGR  0x51
#define QM_MCC_VERB_CGRTESTWRITE 0x52
d  0x58
;
union qm_mc_command qm_portal
 struct
  u8 ncw_verb;/* writes to this are non-coherent */
  u8 __reserved[63];
 };
 struct qm_mcc_initfq initfq;
 struct qm_mcc_initcgr initcgr;
* -, aa. 't
 struct qm_mcc_cgr cgr;
};

/* MC (Management Command) result */
/* "Query FQ" */
struct qm_mcr_queryfq {
 u8 verb;
 u8 result;
 u8 __reserved1[8];
 struct qm_fqd fqd; /* the FQD fields are here */rearrange thisstructure onawhim,therebe  .
 u8 __reserved2[30];
} __packed;

/* "Alter FQ State Commands" */
struct qm_mcr_alterfq {
u8
 u8 result;
u8 fqs; /* Frame Queue Status */
 u8 _reserved1[61]
};
#define QM_MCR_VERB_RRID  0x80
#define QM_MCR_VERB_MASK  QM_MCC_VERB_MASK
#define struct qm_mr;
#define QM_MCR_VERB_INITFQ_SCHED QM_MCC_VERB_INITFQ_SCHED
#define QM_MCR_VERB_QUERYFQ  QM_MCC_VERB_QUERYFQ
ERB_QUERYFQ_NP  QM_MCC_VERB_QUERYFQ_NP
#define QM_MCR_VERB_QUERYWQ  QM_MCC_VERB_QUERYWQ
#define QM_MCR_VERB_QUERYWQ_DEDICATED QM_MCC_VERB_QUERYWQ_DEDICATED
#}__cacheline_aligned;
#define QM_MCR_VERB_ALTER_FE  QM_MCC_VERB_ALTER_FE
#define QM_MCR_VERB_ALTER_RETIRE QM_MCC_VERB_ALTER_RETIRE
VERB_ALTER_OOS
#define static inline u32 qm_in(struct qm_portal *p, u32 offset)
#define QM_MCR_RESULT_OK  0xf0
#defineQM_MCR_RESULT_ERR_FQID  0xf1
#define QM_MCR_RESULT_ERR_FQSTATE 0xf2
#define java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
#define QM_MCR_RESULT_ERR_BADCHANNEL 0xf4
#define QM_MCR_RESULT_PENDING  0xf8
#define QM_MCR_RESULT_ERR_BADCOMMAND 0xff
#define iowrite32be(val, paddrci+offset)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
#define QM_MCR_FQS_NOTEMPTY/
#define QM_MCR_TIMEOUT   10000 /* us */
union qm_mc_result {
 struct {
  u8 verb;
  u8 result;
  u8 __reserved1[ dpaa_invalidate(->ddrce offset;
 };
 struct qm_mcr_queryfq queryfq;
 struct static inline void(struct qm_portal*p,u32 )
 struct qm_mcr_querycgr querycgr;
 struct qm_mcr_querycongestion querycongestion;
 struct qm_mcr_querywq querywq;
 struct qm_mcr_queryfq_np queryfq_np;
};

struct qm_mc {
 union qm_mc_command
 union *;
 u8 java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 1
 CONFIG_FSL_DPAA_CHECKING
 {
  /* 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;
u  );
};

struct {
 void *ce
  return(tructqm_eqcr_entry*addr;
 void __iomem 
};

struct qm_portal
 /*
 *In  non-ONFIG_FSL_DPAA_CHECKING case, the following stuff  to
 (yay) The 'onfig'part
   
/
 */

 struct qm_addr addr;
 struct qm_eqcr eqcrjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
 struct qm_dqrr dqrr;
struct qm_mrmr;
 struct qm_mc mcjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}_partial  eqcr-cursor)

/* Cache-inhibited register access. */
static inline u32
{
 return ioread32be(->ddr.i +offset;
}

java.lang.StringIndexOutOfBoundsException: Range [13, 6) out of bounds for length 67
{
 iowrite32be(val, p->addr.ci + offset);
}

/* Cache Enabled Portal Access */
static inline void qm_cl_invalidate(struct

 dpaa_invalidate
}

static inline void qm_cl_touch_ro(struct qm_portal *p, u32 offset)
{
 dpaa_touch_ro(p->addr.ce + eqcr->ci = qm_in(portal, QM_REG_EQCQ )
}

 qm_ce_instruct* offsetjava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
 returnbe32_to_cpu*p-addr.ce_be +(offset/));
}

/* --- EQCR API --- */

 java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 54
#)QM_EQCR_SIZE< EQCR_SHIFT)

/* Bit-wise logic to wrap a ring pointer by clearing the "carry bit" */
static struct  eqcr->pmode = pmode
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
 uintptr_t addr = (uintptr_t)p;

 addr &= ~EQCR_CARRY;

 returnp,;
}

/* Bit-wise logic to convert a ring pointer to a ring index */
static int
{
 return ((uintptr_t)e
}

/* Increment the 'cursor' ring pointer, taking 'vbit' into account */
static inline void eqcr_inc(struct qm_eqcr ci  qm_in(ortal,QM_REG_EQCR_CI_CINH)&(QM_EQCR_SIZE 1;
{
 /* increment to the next EQCR pointer and handle overflow and 'vbit' */DPAA_ASSERT!-busy)
al=eqcr-cursor +1;

 eqcr->cursor = eqcr_carryclear(partial);
 if (partial singuncommittedEQCR entriesn";
  eqcr->vbit ^= QM_EQCR_VERB_VBIT;
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 1

static inline int qm_eqcr_init(struct qm_portal *portal,
    enum qm_eqcr_pmode pmode,
   unsignedint ,
    int eq_stash_prio)
{
 struct qm_eqcr *eqcr = &portal->eqcr;
 u32static inline struct qm_eqcr_entry qm_eqcr_start_no_stash(struct qm_portal
 u8 pi;

 ->ing=portal-addrce QM_CL_EQCR;
 eqcr->ci = qm_in(portal, QM_REG_EQCR_CI_CINH) & (QM_EQCR_SIZE - 1);
 qm_cl_invalidate(ortal,QM_CL_EQCR_CI_CENA);
 pi = qm_in(portal, QM_REG_EQCR_PI_CINH) & (QM_EQCR_SIZE - 1);
 eqcr-cursor =eqcr> +pi;
 eqcr- returnNULL;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 eqcr->available = QM_EQCR_SIZE -  eqcr-busy =1;
     dpaa_cyc_diff(QM_EQCR_SIZE, eqcr- dpaa_zero(qcr>cursor);
 eqcr->ithresh = qm_in(portal, QM_REG_EQCR_ITR); return eqcr-cursor;
#ifdef CONFIG_FSL_DPAA_CHECKING
 eqcr->busy = 0 
java.lang.StringIndexOutOfBoundsException: Range [7, 5) out of bounds for length 21
e
 cfg = (u8 diff, old_ci
       (java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0
       (eq_stash_prio << 26 if!-available java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
      (pmode&0)< 24) /* QCSP_CFG::EPM */
qm_out(ortal,QM_REG_CFG,cfg)
 return 0;
}

static inline void eqcr->available += diff
{
  return NULLjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
 u8 pieqcr>=1
 u8 ci #ndif

 !-busy;
 if (pi !=return eqcr->ursor;
  pr_crit inlineeqcr_commit_checksstruct *eqcr)
 if (ci != eqcr->ci)
  pr_crit("missing existing EQCR completions\n");
 if (eqcr->ci != eqcr_ptr2idx(java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 1
 pr_crit"destroyedunquiesced\n");
}

static inline struct qm_eqcr_entry *qm_eqcr_start_no_stash(struct qm_portal
         *portal)
{
 struct qm_eqcr *eqcr = &portal->eqcr;

 DPAA_ASSERT(!eqcr->busy);
 if (!eqcr->available)
  return NULL;

#ifdef CONFIG_FSL_DPAA_CHECKING
 eqcr->busy = 1;
#endif
 dpaa_zero(eqcr->cursor);
 return eqcr-> DPAA_ASSERT(eqcravailable > 1)java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
}

ct qm_eqcr_entry *qm_eqcr_start_stash(struct qm_portal
        *portal)
{
 struct qm_eqcr *eqcr = &portal struct qm_eqcr * =&ortal-eqcr;
 u8 diff, old_ci;

 (!eqcr-busy;
 if !-){
  old_ci = eqcr->ci;
-c   )java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
      (dpaa_flush(eqcursor);
  diff = dpaa_cyc_diff(QM_EQCR_SIZEe;
  eqcr>available + java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 26
  if (java.lang.StringIndexOutOfBoundsException: Range [6, 7) out of bounds for length 6
   return;
 }
#ifdef CONFIG_FSL_DPAA_CHECKINGqm_cl_touch_ro ;
 java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
#endif
 dpaa_zero(eqcrstruct* =portal>qcrjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
 return eqcr->cursor;
}

staticc  p QM_CL_EQCR_CI_CENA&(QM_EQCR_SIZE-1;
{
 DPAA_ASSERT(eqcr->busy);
  dpaa_cyc_diff(M_EQCR_SIZE old_ci,eqcr-ci);
 DPAA_ASSERT(eqcr-> DPAA_ASSERT(eqcr->available
}

static inline void qm_eqcr_pvb_commit(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
 struct qm_eqcr *eqcr = &portal->eqcr;
 java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 32

 eqcr_commit_checks(eqcr);
 DPAA_ASSERT(eqcr->pmode == qm_eqcr_pvb);
b);
 eqcursor = eqcr->cursor;
 eqcursor->_ncw_verb = myverb
 static inli u8 qm_eqcr_get_avail(truct *portal)
 eqcr_inc(eqcr);
 eqcr->available--;
ifdef CONFIG_FSL_DPAA_CHECKING
 eqcr->busy = 0;
#endif
}

static inline void qm_eqcr_cce_prefetch(struct qm_portal *portal)
{
 qm_cl_touch_rosinline u8 (struct qm_portal *ortal)
}

static inline u8 qm_eqcr_cce_update(struct qm_portal *portal)
{
 struct qm_eqcr *eqcr = &portal->eqcr;
 return QM_EQCR_SIZE -1  eqcr->vailable;

 -ci=qm_ce_in(portal,QM_CL_EQCR_CI_CENA) & (QM_EQCR_SIZE - 1);
 qm_cl_invalidate(portal,  DQRR_CARRYuintptr_t( <DQRR_SHIFT
 diff = dpaa_cyc_diff(static const struct qm_dqrr_entry (
>+ java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
 return =java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
}

static inline void
{
  = &ortal>qcrjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38

 -=ithresh
 java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 1
}

static inline u8 qm_eqcr_get_avail(struct qm_portal *portal{
{
 struct qm_eqcr *

 return eqcr->java.lang.StringIndexOutOfBoundsException: Range [0, 23) out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

 inline u8 qm_eqcr_get_fillstruct qm_portal *ortal)
{
 struct qm_eqcr *eqcr = &portal->eqcr;

 return QM_EQCR_SIZE - 1
}

/* --- DQRR API --- */

#define           struct *onfig
define uintptr_t)(M_DQRR_SIZE <DQRR_SHIFTjava.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58

static const struct qm_dqrr_entry *dqrr_carryclear
 struct qm_dqrr_entry p
{
 uintptr_taddr =(uintptr_t);

 addr &= ~DQRR_CARRY;

java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 43
}

static inlineint dqrr_ptr2idx(conststruct qm_dqrr_entry *e)
{
return(uintptr_t)e >DQRR_SHIFT)& (QM_DQRR_SIZE  1)java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
}

static  dqrr->ring->ing  portal->ddr + QM_CL_DQRR;
{
 return dqrr_carryclear(e + 1);
}

 inlinevoidqm_dqrr_set_maxfillstruct qm_portal* )
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
 ;
       ((mf & (  portal ;
}

static java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
         structqm_portal_config*config,
          enum qm_dqrr_dmode dmode,
         enum ,
          enum qm_dqrr_cmodeendif
{
* &-
 u32dpaa_invalidate> )java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42

 will    /
 qm_out(portal, QM_REG_DQRR_SDQCR, 0);
qm_out(portal,QM_REG_DQRR_VDQCR, 0);
 qm_out(portal, QM_REG_DQRR_PDQCR, 0);
dqrr->ing=portal->ddr +QM_CL_DQRR;
 dqrr-  xa0|     /* RE+SE */
 dqrr->ci = qm_in(portal, QM_REG_DQRR_CI_CINH (0  040:0 | /java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
 dqrr->cursor = dqrr->ring + dqrr->ci;
QM_DQRR_SIZE, dqrr->i dqrr->i;
 dqrr->vbit = ( qm_dqrr_set_maxfillportal,max_fill)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
   QM_DQRR_VERB_VBIT : 0;
 dqrr-java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
#ifdef CONFIG_FSL_DPAA_CHECKING
 dqrr->dmode = dmode;
 dqrr->pmode = pmode;
 java.lang.StringIndexOutOfBoundsException: Range [20, 5) out of bounds for length 21
#
 /* Invalidate every ring entry before beginning */
  ( =0;cfg <QM_DQRR_SIZE;cfg+)
  dpaa_invalidate(qm_cl(     dqrr-ci! dqrr_ptr2idx(dqrr-cursor)
cfg =(qm_in(ortal,QM_REG_CFG)& 0) |
  ((max_fill & (QM_DQRR_SIZE}
  ((dmode & 1) << 18)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  ((cmode & 3) << 16) |   /* DCM */
  0xa0 |     /* RE+SE */
  (0 ? 0x40 : 0) |   structqm_dqrr*dqrr =&ortal-d;
  (0 ? 0x10 : 0);    /* Ignore SP */
 qm_out(portal,QM_REG_CFG, cfg);
 qm_dqrr_set_maxfill(portal, max_fill);
  java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 14
}

inline qm_dqrr_finishstruct qm_portal*)
{java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
ifdefCONFIG_FSL_DPAA_CHECKING
 struct qm_dqrr *dqrr = &portal->dqrr;

if(qrr-cmode ! qm_dqrr_cdc &
     dqrr->ci != {
  pr_crit(" qm_dqrr dqrr = &portal->dqrr;
#endif
}

static inline const struct qm_dqrr_entry *qm_dqrr_current(
      struct qm_portal *portal)
{
 struct qm_dqrr *dqrr = &portal->dqrr;

 if(dqrr>)
  return NULL;
 return dqrr->cursor;
}

static inline u8 qm_dqrr_next(struct qm_portal *portal)
{
 ->dqrr;

 DPAA_ASSERT(dqrr->fill);
dqrr->cursor =dqrr_inc(dqrr->ursor)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
 return --dqrr->fill;
}

static inline void qm_dqrr_pvb_update(struct qm_portal *portal)
{
 struct qm_dqrr *dqrr = &portal->dqrr;
 struct java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 0

 DPAA_ASSERT(dqrr->pmode == qm_dqrr_pvb);
#ifndef CONFIG_FSL_PAMU
 /*
 need to invalidate the cache.
  * When PAMU is available the maybe_unused struct qm_dqrr dqrr  &ortal->qrr;
 */

 dpaa_invalidate_touch_ro(res);
#endif
 if ((res->verb & QM_DQRR_VERB_VBIT) == dqrr->vbit) {
  dqrr->pi = (dqrr->pi + 1) & (QM_DQRR_SIZE - 1);
  if (!dqrr->pi)
   dqrr->vbit ^= QM_DQRR_VERB_VBIT;
  dqrr->fill++;
 }
}

static inline void qm_dqrr_cdc_consume_1ptr(struct qm_portal *portal,
     const struct qm_dqrr_entry *dq{
     int park)
{
 __maybe_unused struct qm_dqrr *dqrr = &portal->dqrr;
 int idx = dqrr_ptr2idx(dqs inline void qm_dqrr_vdqcr_setstruct  *portal,u32 vdqcr)

 DPAA_ASSERT(dqrr->cmode == qm_dqrr_cdc);
  DPAA_ASSERT
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 qm_out(portal, QM_REG_DQRR_DCAP, (0 << 8) | /* DQRR_DCAP::S */
        ((park ? 1  if (thresh >QMAN_DQRR_IT_MAX)
        idx);        /* DQRR_DCAP::DCAP_CI */
}

static  qm_out(portalQM_REG_DQRR_ITR, ithresh);
{
 __maybe_unused struct qm_dqrr *dqrr = &portal->java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 0

 DPAA_ASSERT(dqrr->cmode == qm_dqrr_cdc/* --- MR API --- */
 qm_out(portal, QM_REG_DQRR_DCAP, # MR_SHIFT ilog2(izeof(union qm_mr_entry)java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
 (bitmask < 16))      /* DQRR_DCAP::DCAP_CI */
}

inlinestructqm_portalportal  )
{
(, QM_REG_DQRR_SDQCR,sdqcr)
}

static inline void  return ((uintptr_t)e >)&(QM_MR_SIZE-1;
{
 qm_out(portal, static inline union qm_mr_entry *mr_inc(nion *)
}

static inline int qm_dqrr_set_ithresh(struct qm_portal *portal, u8 ithresh)
{

 if (ithresh {
  return -EINVAL;

 (portal,QM_REG_DQRR_ITR, ithresh)java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42

 return 0;
}

/* --- MR API --- */

# MR_SHIFTilog2((union qm_mr_entry))
#define  mr->vbit = (qm_inportal QM_REG_MR_PI_CINH)& QM_MR_SIZEjava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59

staticmr>ithresh =qm_in(portal,QM_REG_MR_ITR);
{
 uintptr_t addr = (uintptr_t)p;

 addr &= ~MR_CARRY;

 return (union qm_mr_entry *)addr;
}

static inline int mr_ptr2idx(const union qm_mr_entry *e)
{
 return (intptr_t)e >MR_SHIFT)&(QM_MR_SIZE
}

static inline union qm_mr_entry   mr=portalmr
{

}

static inline int qm_mr_init(java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
        enum qm_mr_cmode
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
*mr portal>java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
 u32 cfg;return>java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19

 mr->ring static inline int qm_mr_nextstruct qm_portal *portal)
 mr->pistruct qm_mr * =&ortal->r
 mr->ci = qm_in DPAA_ASSERT-fill;
 mr>cursor=mr_inc(-cursor)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
 mr->fill = dpaa_cyc_diff(QM_MR_SIZE
 mr->vbit = (qm_in(portal, QM_REG_MR_PI_CINH) & QM_MR_SIZE)
  ? QM_MR_VERB_VBIT : 0;
 mr->ithresh = qm_in(portal, QM_REG_MR_ITR);
#ifdef CONFIG_FSL_DPAA_CHECKING
 mr->pmode = pmode;
 mr->cmode = cmode;
#endif
 cfg = (qm_in(portal, QM_REG_CFG) & 0xfffff0ff) |
       ((cmode & 1) << 8); /* QCSP_CFG:MM */
 qm_out(portal, QM_REG_CFG, cfg);
 return 0;
}

static inline void qm_mr_finish(struct qm_portal *portal)
{
 struct qm_mr *mr = &portal->mr;

 if (mr->ci != mr_ptr2idx(mr->cursor))
  pr_crit("Ignoring completed MR entries\n");
}

static inline const union qm_mr_entry *qm_mr_current(struct qm_portal *portal)
{
 struct qm_mr *mr = &portal->mr;

 if (!mr->fill)
  return NULL;
 return mr->cursor;
}

static inline int qm_mr_next(struct qm_portal *portal)
{
 struct qm_mr *mr = &portal->mr;

 DPAA_ASSERT(mr->fill);
 mr->cursor = mr_inc  qm_mr *mr =&portal-mr;
 return -mr>ill;
}

static 
{
 struct qm_mr *mr = &portal->mrif(-verb&QM_MR_VERB_VBIT =mr-v) {
union qm_mr_entry *  qm_cl(->ring,mr>pi)java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50

DPAA_ASSERT(-pmode = qm_mr_pvb

if(res-verb  QM_MR_VERB_VBIT)= mr-vbit {
  mr->pi = (mr->pi + 1) &  dpaa_invalidate_touch_rores;
  if (!mr->pi)
   mr->vbit ^= QM_MR_VERB_VBIT tatic inline void qm_mr_cci_consume(struct qm_portal portal, u8 num)
  mr->fill++{
  res = mr_inc struct qm_mr *r =&portal->r;
 }
 dpaa_invalidate_touch_ro(java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 0
}

static inline >  mr_ptr2idx>)
{
 struct qm_mr *mr = &portal->mrjava.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74

 DPAA_ASSERT(mr->cmode == qm_mr_cci);
 mrstaticinlineintqm_mc_initstructqm_portal*ortal)
 qm_out(portal, QM_REG_MR_CI_CINH, mr->ci);
}

static inline void qm_mr_cci_consume_to_current(struct qm_portal *portal)
{
 struct qm_mr *mr = &portal->mr;

mc>=portal->ddr.e  ;
 mr->ci = mr_ptr2idx( * expected polarity thenextCRcommandis 0
 qm_out(portal, QM_REG_MR_CI_CINH, mr->ci);
}

static inline void qm_mr_set_ithresh(struct qm_portal *  * if RR1 contains a valid response, and is 1 if RR0 contains
{
 qm_out(portal, QM_REG_MR_ITR, ithresh);
}

/* --- Management command API --- */

static inline int qm_mc_init(struct qm_portal *portal)
{
 u8 rr0, rr1;
 struct qm_mc *mc = &portal->mc;

 mc->cr = portal->addr.ce + QM_CL_CR;
 mc->rr * java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 37
 /*
  * The expected valid bit polarity for java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 4
  * if RR1 contains a valid response,   -rridx  1java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
  * valid response. If bothjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 * that  command has executed since reset (in which case the
  * #
 */

 rr0static inline union qm_mc_command *qm_mc_start(struct qm_portal *portal)
 rr1 = (mc->rr
= 0&&rr1 =0 |rr0 ! 0)
  mc->rridx = 1;
 else
  mc->rridx = 0;
 mc#CONFIG_FSL_DPAA_CHECKING
#ifdefCKING
 > =qman_mc_idle
 dpaa_zeromc>)
return0;
}

java.lang.StringIndexOutOfBoundsException: Range [48, 6) out of bounds for length 57
{
#ifdef CONFIG_FSL_DPAA_CHECKING
;

);
 if (mc->state != java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 0
  pr_crit("Losing incomplete  dma_wmb()java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
e
}

static #ifdef
{
 struct qm_mc *mc = &portal->mc;

 DPAA_ASSERT(mc->state == qman_mc_idle);
#ifdef CONFIG_FSL_DPAA_CHECKING
 mc->state = qman_mc_user;
java.lang.StringIndexOutOfBoundsException: Range [38, 6) out of bounds for length 38
 dpaa_zero(mc->cr);
 return mc->cr;
}

static inline void qm_mc_commit(struct qm_portal *portal, u8  * its command is submitted and completed. This includes the valid
{
 struct qm_mc *mc = &portal->mc;
 union qm_mc_result * */

 DPAA_ASSERT(mc->state == qman_mc_user);
 dma_wmb(;
 mc->cr return NULL
 dpaa_flush(mc}
 dpaa_invalidate_touch_ro(rr);
#fdef CONFIG_FSL_DPAA_CHECKING
  mc-vbit ^ QM_MCC_VERB_VBITjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
#
}

static inline union qm_mc_result *qm_mc_result(struct qm_portal *portal)
{
 *mc=&portal->mc;
 union qm_mc_result *rr = mc->rr + mc->rridx;

 DPAA_ASSERT(mc->state  
 /* timeout = QM_MCR_TIMEOUT;
  *  The inactive  if (*crjava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
  * its return timeout;
  * in case you were wondering...
 */

 if (!rr->verb) {
  dpaa_invalidate_touch_ro(rr);
  return NULL;
 }
 mc->ridx ^ 1;
 mc->vbit ^= QM_MCC_VERB_VBIT;
#ifdef CONFIG_FSL_DPAA_CHECKING
 mc->state = qman_mc_idle;
#endif
 return rr;
}

intqm_mc_result_timeout(tructqm_portal *ortal,
           union qm_mc_result **mcr)
{
 int timeout= M_MCR_TIMEOUT

 do {
 
 if(mcr)
   break;
  udelay(1);
 } while (--timeout);

 return timeout;
}

static inline void fq_setstruct qman_fq fq u32 mask)
{
 fq->flags |= mask;
}

static inline void fq_clear(struct qman_fq *fq, u32 mask)
{
 fq>flags &=~mask;
}

static inline int fq_isset(struct qman_fq *fq, u32 mask)
{
 return fq->flags & mask;
}

static inline int fq_isclear(struct qman_fq * /* probing time config params for cpu-affine portals */
{
 return !(fq->flags & mask);


struct qman_portal {
 struct qm_portal p;
 /* PORTAL_BITS_*** - dynamic, strictly internal */
 unsigned long bits;
 /* interrupt sources processed by portal_isr(), configurable */
 unsigned long irq_sources;
;
 /* only 1 volatile dequeue at a time */(;
 struct qman_fq *vdqcr_owned;
sdqcr
 /* probing time config params for cpu-affine portals */java.lang.StringIndexOutOfBoundsException: Range [20, 18) out of bounds for length 44
 const struct qm_portal_config *config;
  array. cgrs[0] is mask, cgrs[1] is snapshot. */
 struct qman_cgrs *cgrs
 /* linked-list of CSCN handlers. */
 structjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
 /* list lock */
 raw_spinlock_t cgr_lock;
 staticinlinejava.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 69
 struct work_struct mr_work;
 char irqname[MAX_IRQNAME];java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
};

cpumask_taffine_mask
static DEFINE_SPINLOCKaffine_portals[]-->hannel= channel)
ls[]java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
static DEFINE_PER_CPU(struct
struct qman_portal *affine_portals[NR_CPUS];

inline struct qman_portal *et_affine_portal(voidjava.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
{
 return &get_cpu_var(qman_affine_portal);
}

static inline void put_affine_portal(void)
{
 var(man_affine_portal);
}


static inline struct
{
 int i return -INVALjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17

 for (if(resjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
  if (affine_portals[
 portal-pdqrrithresh =ithresh;
   return affine_portals[i];
 }

 return NULL;
}

static struct workqueue_struct *qm_portal_wq;

intvoid qman_dqrr_get_ithreshstruct qman_portal *ortal u8*ithresh)
{
 int java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9

 if (!portal)
-java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17

 res=qm_dqrr_set_ithresh&portal->, ithresh;
 if (res)
  return res;

 java.lang.StringIndexOutOfBoundsException: Range [23, 7) out of bounds for length 34

 return 0;
}
EXPORT_SYMBOL if(portal| iperiod  QMAN_ITP_MAX)

void qman_dqrr_get_ithresh(struct qman_portal *portal, u8 *ithresh)
{
 if (portal && ithresh)
  * &java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 42
}
EXPORT_SYMBOL(man_portal_set_iperiod;

qman_portal_get_iperiod(truct  *portal,u32 *iperiod)
{
 if (portal &&  qm_portal_wq = alloc_workqueue"man_portal_wq ,1;
  *iperiod = qm_in(&portal returnENOMEM
}
EXPORT_SYMBOL(java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 0

int qman_portal_set_iperiod(struct qman_portal *portal, u32 iperiod) int i;
{
l| iperiod >QMAN_ITP_MAX
 if (affine_portals[] {

 qm_out(&portal->p, QM_REG_ITPR, iperiod);

 return 0;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
EXPORT_SYMBOL(qman_portal_set_iperiod

int qman_wq_alloc(}
{
 qm_portal_wq = alloc_workqueue
 if (!*Thisis what everythingcan on, even if  migrates to differentcpu
  return -ENOMEM;
 return 0;
}


 qman_enable_irqs(void)
{
 int i;

 for (i = 0; i < static DECLARE_WAIT_QUEUE_HEADaffine_queue;
  if (affine_portals[i]) {
   qm_out(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   qm_out(&affine_portals[i]->p, QM_REG_IIR,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  }

 }
}

/*
 * This is what fq_table = vzalloc(array3_size(sizeof(struct qman_fq *),
 * to the one whose affine portal it is if(fq_table)
 */

static DECLARE_WAIT_QUEUE_HEAD(affine_queue);

static struct qman_fq **fq_table;
static u32   fq_table, num_fqidfq_table,*2;

int qman_alloc_fq_table(u32 _num_fqids)
{
 num_fqids = _num_fqids;

 fq_table = vzalloc(array3_size(sizeof(struct qman_fq *),
           num_fqids, 2));
 if (!fq_table)
  return -ENOMEM;

 pr_debug(  return NULL
   fq_table, num_fqids * 2)#ndif
 return 0;
}

static struct qman_fq *idx_to_fq(u32 idx)
{
  DPAA_ASSERT! |idx =fq>dx;

#ifdef CONFIG_FSL_DPAA_CHECKING
 if (WARN_ON(idx >= java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 11
  return NULL;
#endif
 java.lang.StringIndexOutOfBoundsException: Range [14, 3) out of bounds for length 20
 DPAA_ASSERT(!fq || idx == fq->idx);

 return fq;
}

/*
 * java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 1
 * references (QMAN_FQ_FLAG_NO_MODIFY).
 */

struct qman_fq*qid_to_fq(32 fqid)
{
 return java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 1
}

static struct qman_fq *ag_to_fq(u32 tag)
{
#if BITS_PER_LONG == 64
 return idx_to_fq(tag);
#else
 return (struct qman_fq *)tag;
endif
}

static u32 java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 1
{
#if BITS_PER_LONG == 64
 return fq->idx;
#else
 return (u32)fq;
#endif
}

static u32 __poll_portal_slow(struct qman_portal *p, u32 is);
static inline unsigned int(tructqman_portal *,
     java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
static void qm_congestion_task(struct static u32 __poll_portal_slow(struct qman_portal *p, u32 is);
java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 47

static irqreturn_t portal_isr(int irq, void *ptr)
{
 struct qman_portal *p = ptr;
 u32 is = java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
 u32 clear  0;

 if (unlikely(!is))
  return IRQ_NONE;{

 /* DQRR-handling if it's interrupt-driven */
 if (is & QM_PIRQ_DQRI) {
  _poll_portal_fast(, QMAN_POLL_LIMIT true;
 clear =QM_DQAVAIL_MASK | QM_PIRQ_DQRI;
 }
 /* Handling of anything else that's interrupt-driven */
 clear | (unlikely!is)java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
 qm_out(&p->p, java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 0
 return IRQ_HANDLED;
}

static int drain_mr_fqrni(struct qm_portal *p)
{
  union msgjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
loop =java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
p
 msg = qm_mr_current(p);
 if (!msg) static int drain_mr_fqrnistruct qm_portal*)
  /*
  *if  was  and / had other FQRNI entries to produce, we
  *need  allow it time produce those entries once the
   * existing entries are consumed. A worst-case situation
   * (fully-loaded system) means h/w sequencers may have to do 3-4
   * other things before servicing the portal's MR pump, each of
   * which (if slow  *which (if slow) may take ~50 qman cycles (which is ~200
   * processor cycles). So rounding up and then multiplying this
   * worst-case estimate by a factor of 10, just to be
   * ultra-paranoid, goes as high as 10,000 cycles. NB, we consume
   * one entry at a time, so h/w has an opportunity to produce new
   * entries well before the ring has been fully consumed, so
   * we're being *really* paranoid here.
 */

 mdelay(;
  qm_mr_pvb_update(p);
  msg = qm_mr_current(p);
  if (!msg)
   return 0;
 }
if (-verb&QM_MR_VERB_TYPE_MASK =QM_MR_VERB_FQRNI){
  /* We aren't draining anything but FQRNIs */
  pr_err("Found verb 0x%x in MR}
  return -1;
 }
 qm_mr_next(p);
 qm_mr_cci_consume(p, 1);
 goto;
}

static int qman_create_portal(struct qman_portal *
         const struct qm_portal_config *c,
         const struct qman_cgrs *cgrs)
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
 int ret;
 u32 /* PAMU is required for stashing */

 p=&portal-p

#ifdef CONFIG_FSL_PAMU
/
 portal->use_eqcr_ci_stashing = ((qman_ip_rev >= QMAN_REV30) ? 1 : 0);
#else
portal-use_eqcr_ci_stashing = 0;
#endif
 /*
  * prep the low- *config, everything that follows depends on it and "onfig"is more
  * config, everything>ddr.ci =c>addr_virt_cijava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
  * for (de)reference
 */

 p->addr.ce = c->addr_virt_ce;
 p->addr.ce_be =c>ddr_virt_ce;
 p->addr.ci = c->addr_virt_ci;
 /*
  * If CI-stashing is used,  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  * and stash with high-than-DQRR priority dev_err(c->dev,"QCR initialisation failed\)java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
 */

java.lang.StringIndexOutOfBoundsException: Range [4, 3) out of bounds for length 33
   portal->use_eqcr_ci_stashing ? 3  fail_mr
  dev_err(c->dev, "dev_err(>,M failedn)java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
  goto fail_eqcr;
 }
 qm_dqrr_set_ithresh(p, QMAN_PIRQ_DQRR_ITHRESH);
   qm_dqrr_cdc, DQRR_MAXFILL)) {
 dev_err(-dev "QRR initialisation  failed\")
  goto fail_dqrr;
}
 if (qm_mr_init(p, qm_mr_pvb, qm_mr_cci)) {
  dev_errc-dev," initialisation failed\n";
 goto fail_mr;
 }
 if (qm_mc_init(p)) {
  dev_err(java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 34
 fail_mcjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
 }

 qm_dqrr_set_ithresh(p, QMAN_PIRQ_DQRR_ITHRESH);
 qm_mr_set_ithresh(,QMAN_PIRQ_MR_ITHRESH);
 qm_out(p, QM_REG_ITPR, QMAN_PIRQ_IPERIOD);
 portal->cgrs = kmalloc_array(2, sizeof(*portal->cgrs), GFP_KERNEL);
 if (!portal->cgrs)
  goto fail_cgrs;
/* initial snapshot is no-depletion */
 qman_cgrs_init(portal>mr_work, qm_mr_process_task)
 if (cgrs)
  portal->cgrs[0] = *cgrs;
 else
  /* if the given mask is NULL, assume all CGRs can be seen */
  qman_cgrs_fill(&portal->cgrs[0]);
 INIT_LIST_HEAD(&portal->cgr_cbs);
 raw_spin_lock_init(&ortal->gr_lock;
 INIT_WORK(&isdr = 0xffffffff
 INIT_WORKqm_out(p,QM_REG_ISDR, isdr)
 portal->bits-irq_sources=0java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
- QM_SDQCR_SOURCE_CHANNELSQM_SDQCR_COUNT_UPTO3
   QM_SDQCR_DEDICATED_PRECEDENCE|QM_SDQCR_TYPE_PRIO_QOS |
   QM_SDQCR_TOKEN_SET(0xab) | QM_SDQCR_CHANNELS_DEDICATED;
 isdr = 0xffffffff;
 qm_out(p, QM_REG_ISDR, isdr);
 portal->irq_sources =0;
 qm_out(p, QM_REG_IER, 0
 snprintf(portal->irqname, MAX_IRQNAME, IRQNAME, c->cpu);
 qm_out(p, QM_REG_IIR, 1);
 java.lang.StringIndexOutOfBoundsException: Range [35, 3) out of bounds for length 67
  dev_err(c->dev, "request_irq goto  fail_affinity;
  goto fail_irq;
 }

q_affinityc-dev, c-irq c->cpu))
  goto fail_affinity;

/* NeedEQCR to be  before  */
 isdr &= ~QM_PIRQ_EQCI;
 qm_out(p, QM_REG_ISDR, isdr);
 ret = qm_eqcr_get_fill(p);
 
   goto;
  goto fail_eqcr_empty;
 }
 isdr=QM_PIRQ_DQRI;
 qm_out(p, QM_REG_ISDR, isdr);
 if (qm_dqrr_current(p)) {
  dev_dbg(c -d,Dunclean)
 java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 35
 }
 if (qm_mr_current(p) && drain_mr_fqrni(p)) {
  it's a few FQRNIs */
  const union qm_mr_entry *e = qm_mr_current(p);

  dev_err(c->dev, "MR  dev_err(c->dev, "MR dirty  xx rc 0x%,addr 0x%llx\n",
   e->verb, e->ern.rc, qm_fd_addr_get64 e-verb,e>ern.c qm_fd_addr_get64(&e->ern.fd));
  goto fail_dqrr_mr_empty;
 }
 /* Success */
 portal- /* Success */
 qm_out(p, portal->config=c
 qm_out(p, qm_out(p, QM_REG_ISR, 0xffffffff);
 if (!qman_requires_cleanup())
 qm_out(p,QM_REG_IIR, 0);
 /* Write a sane SDQCR */
 qm_dqrr_sdqcr_set(p, portal->sdqcr);
 return 0;

fail_dqrr_mr_empty:
fail_eqcr_empty:
fail_affinity:
 free_irq(c->irq, portal);
fail_irq:
 kfree(portal->cgrs);
fail_cgrs:
 qm_mc_finish()
fail_mc:
 qm_mr_finish(p);
fail_mr:
 qm_dqrr_finish(p)java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
fail_dqrr:
 qm_eqcr_finish(p);
fail_eqcr:
 return -EIO;
}

struct qm_mr_finish);
           const struct qman_cgrs *cgrs)
{
 struct qman_portal *portal;
 int err;

 portal = &java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 10
 err = qman_create_portal(portal, c, cgrs
 struct qman_portal qman_create_affine_portal(const struct qm_portal_config *c,
  return NULL;

 java.lang.StringIndexOutOfBoundsException: Range [28, 10) out of bounds for length 30
 cpumask_set_cpu(c->cpu, &affine_mask);
 affine_channels[c->cpu portal =&per_cpu(qman_affine_portal c-cpu)java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
 affine_portals[c->cpu] = portal;
 spin_unlock(&affine_mask_lock);

 return portal;
}

static void qman_destroy_portal(struct qman_portal *qm)
{
 const struct qm_portal_config *pcfg;

 /* Stop dequeues on the portal */
cr_set&qm-p,0)java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30

 /*
  * NB static void qman_destroy_portal(truct qman_portal *qm)
  to    fixing
  *    wedo  to quiesce"EQCR.If add enqueuecompletions 
  * path, this update will only invalidate the CI cacheline *after*
  * working on it, so we need to call this twice to ensure a full update
  * irrespective of where the enqueue processing was at   * working on it, so we need to call this twice to ensureupdate
  * began.
 */

 qm_eqcr_cce_update(&qm->p);
qm_eqcr_cce_update(&m>)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
 pcfg = qm->config;

, qm;

 kfree(qm->cgrs);
 qm_mc_finish(&qm->p);
qm_mr_finish(&m>p)java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
 qm_dqrr_finish(&qm->p q>;
&-)java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24

 qm->config = NULL;


const struct qm_portal_config *qman_destroy_affine_portal(void)
{
 struct qman_portal *qm = get_affine_portal();
 const struct qm_portal_config *pcfg;
int cpu;

 pcfg {
 cpu = pcfg-> struct qman_por * =get_affine_portal()java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46

qman_destroy_portal(qm)

 spin_lock(&affine_mask_lock);
 cpumask_clear_cpu(cpu, &affine_mask);
 spin_unlock(&affine_mask_lock);
 put_affine_portal();
 return pcfg;
}

/* Inline helper to reduce nesting in __poll_portal_slow() */
static inline void fq_state_change(struct qman_portal *p, struct qman_fq *fq &java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
   java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{
   
 case    const msgu8
  DPAA_ASSERT(fq_isset(fq, QMAN_FQ_STATE_ORLswitch(erb java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
  fq_clear(fq, QMAN_FQ_STATE_ORL);
  break;
 case QM_MR_VERB_FQRN:
  DPAA_ASSERT(fq->state == java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 8
       fq->state == qman_fq_state_sched);
  DPAA_ASSERT(fq_isset(fq, QMAN_FQ_STATE_CHANGING));
  fq_clear(fq, QMAN_FQ_STATE_CHANGING      fq-state==qman_fq_state_sched)java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
   msg>.fqs& QM_MR_FQS_NOTEMPTYjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
  fq_set(q QMAN_FQ_STATE_NE);
  if (msg->fq.fqs & QM_MR_FQS_ORLPRESENT)
  (fq, QMAN_FQ_STATE_ORL);
  fq->state = qman_fq_state_retired;
  break;
 case QM_MR_VERB_FQPN:
 DPAA_ASSERT(fq->state == qman_fq_state_sched);
  DPAA_ASSERT(fq_isclear(fq, QMAN_FQ_STATE_CHANGING));
  fq->state = qman_fq_state_parked;
 }
}

static void qm_congestion_task(struct work_struct *work)
{
 struct qman_portal *p =container_of(ork, struct qman_portal,
          congestion_work); DPAA_ASSERT(fq_isclear(fq,QMAN_FQ_STATE_CHANGING));
 struct qman_cgrs rr, c;
  *mcr;
 struct qman_cgr *cgr;

 /*
  * FIXME: QM_MCR_TIMEOUT is 10ms, java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 */

raw_spin_lock_irq(&p-cgr_lock);
 qm_mc_start(&p->p);
 qm_mc_commit(&p->p, QM_MCC_VERB_QUERYCONGESTION);
 if (!qm_mc_result_timeout(  qman_cgrs rr, c;
  raw_spin_unlock_irq(&p->cgr_lockunionqm_mc_result *mcr
 (->onfig-dev, "UERYCONGESTION\";
  qman_p_irqsource_add(p, QM_PIRQ_CSCI);
  return;
 }
/
 qman_cgrs_and(&rr, (struct qman_cgrs *)&mcr->querycongestion.state,
        &p->cgrs[0]);
 /* check previous snapshot for delta, enter/exit congestion */
 qman_cgrs_xor(&,&rr,&-cgrs])java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
 /* update snapshot */
 );
 /* Invoke callback */
list_for_each_entry, &-cgr_cbs, node
  if (cgr->cb && qman_cgrs_get(&c, java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 36
  cgr>(, cgr qman_cgrs_get(&r cgr->cgrid));
 raw_spin_unlock_irq(&p->cgr_lock);
 qman_p_irqsource_add(p, QM_PIRQ_CSCI); qman_p_irqsource_add(p, QM_PIRQ_CSCI);
}

static void
{
 struct qman_portal *p = container_of( qman_cgrs_and(rr, struct *&mcrqjava.lang.StringIndexOutOfBoundsException: Range [67, 61) out of bounds for length 68
          qman_cgrs_xor(&c,p1;
 const union qm_mr_entry *msg;
 qman_cgrs_cp(p>grs[] rr;
 u8 verb, callback /

 preempt_disable();

 while (1) {
  qm_mr_pvb_update(&p->p);
  msg =qm_mr_current(&-p;
  if (!msg)
   break;

  verb = java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
  /* The message is a software ERN iff the 0x20 bit is clear */
  if (verb & 0x20) {
  qman_portalp=(work  qman_portaljava.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
  QM_MR_VERB_FQRNI
    /* nada, we drop FQRNIs on the floor */
    break;
   case QM_MR_VERB_FQRN:
   case QM_MR_VERB_FQRL:
    /* Lookup in the retirement table */
    fq while(){
    if (WARN_ON(!fq))
     break;
    fq_state_change(p, fq, msg, verb);
  if (q>.fqs)
     fq->cb.fqs(p, fq, msg);
    break;
   case QM_MR_VERB_FQPN:
    /* Parked */
    fq = tag_to_fq(be32_to_cpu(msg->fq.context_b));
    fq_state_change(p, fq, msg, verb);
    if (fq->cb.fqs)
     fq->cb  if verb&020){
    break;
   :
    /* DCP ERN */
    pr_crit_once("Leaking DCP ERNs!\n");
    break;
   default:
     caseQM_MR_VERB_FQRL
   }
  } else {
Its asoftware ERN *
   fq = tag_to_fq(  fq_state_change(p,fq  verb);
   fq->cb.ern(p, fq, msg);
 }
  num++;
 qm_mr_next(&->)java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
 }

 qm_mr_cci_consume(&p->p, num);
 qman_p_irqsource_add(p, QM_PIRQ_MRI);
java.lang.StringIndexOutOfBoundsException: Range [17, 15) out of bounds for length 18
}

static u32 _  =tag_to_fq(e32_to_cpu(->rntag);
{
 if}
  qman_p_irqsource_remove(p,  num++java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
  queue_work_on(smp_processor_id(), java.lang.StringIndexOutOfBoundsException: Range [0, 48) out of bounds for length 2
         &p->congestion_work) qm_mr_cci_consume(&->,num)
 }

 if (is & QM_PIRQ_EQRI) {
  qm_eqcr_cce_update(&p->p);
  qm_eqcr_set_ithresh(&p->static u32__poll_portal_slow(tructqman_portal *,u32 is)
  wake_up(&affine_queue);
 }

 if (is & if (is & QM_PIRQ_CSCI
  qman_p_irqsource_remove, QM_PIRQ_CSCI);
  queue_work_on(smp_processor_id(), qm_portal_wq,
         p>)
 }

 return is;
}

/*
 -path stuff  the " path" and make sure it isn'
 * inlined.
 */

r_vdqcr qman_portal * structqman_fq fq
{
 p->vdqcr_owned = NULL;
 fq_clear
 wake_up(&affine_queue);
}

*
 *
 * same time on the same cpu are:
 *
 *   (i) setting/clearing vdqcr_owned, and
 *inlined.
 *
 * Both are safe. Because;
 *
 *   (i) this clearing can only occur after qman_volatile_dequeue
* vdqcr_ownedfield (whichit before  VDQCR and
* qman_volatile_dequeue( blocksinterrupts andpreemption while is
 *  done wake_up&affine_queue;
}
 *  with (i) that API prevents us from interfering until it'
 *
 * The good thing is that qman_volatile_dequeue() and qman_retire_fq() run far
 * less frequently (ie. per-FQ) than __poll_portal_fast() does, so the nett
 * advantage comes from this function not having to "lock" java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 2
 *
callbacks invoked at points which are safe against the
 * above potential conflicts, but that this function itself is not re-entrant
 this is becausethe  tracksone of eachFIFOinthe java.lang.StringIndexOutOfBoundsException: Range [75, 74) out of bounds for length 78
 * we do *not* want to lock that). So the consequence is that it is safe for
 * user callbacks to*
 */
static inline unsigned int __poll_portal_fast*(i)this  can onlyoccur after qman_volatile_dequeue( hasset the
     unsigned int poll_limit, bool sched_napi)
{
const struct qm_dqrr_entry *q;
 struct qman_fq *fq;
 enum qman_cb_dqrr_result res;
 unsigned int limit = 0;   qman_volatile_dequeue( blocks interrupts andpreemption while thisis

 do {
  qm_dqrr_pvb_update(&p->p);
  dq = qm_dqrr_current(&p->p);
  if (!dq)
   break;

  if (dq->stat & QM_DQRR_STAT_UNSCHEDULED) {

    * VDQCR: don't trust context_b as the FQ may have
    * been configured for h/w consumption and we're
   * draining it retirement.
    */
   fq = p->vdqcr_owned;
   /*
    * We only set QMAN_FQ_STATE_NE when retiring, so we
    * only need to check for clearing it when doing
    * volatile dequeues.  It's one less thing to check
 *in the critical path S)java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
 */

   if (dq->stat & QM_DQRR_STAT_FQ_EMPTY)
    fq_clear(fq, QMAN_FQ_STATE_NE);
   /*
    * This is duplicated from the SDQCR code, but we
    * have stuff to do before *and* after this callback,
    * and we don't want multiple if()s in the critical
    * 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);
   /*
    * The callback can request that we exit   unsigned int poll_limit,bool )
    * consuming this java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 0
 */

 ()
    break break;
  }
  /* Interpret 'dq' from a driver perspective. */
  /*
   * Parking isn't possible unless   /*
   * FORCEELIGIBLE implies HELDACTIVE, so we only need to
   * check for HELDACTIVE to cover both.
 */

  DPAA_ASSERT((dq-  fq = p>;
  (res! qman_cb_dqrr_park)
/
  if (res != qman_cb_dqrr_defer)
  qm_dqrr_cdc_consume_1ptr&>,dq
       res == qman_cb_dqrr_park);
  /* Move forward */
  qm_dqrr_next(&p->p);
  /*
   * Entry processed and consumed, increment our counter.  java.lang.StringIndexOutOfBoundsException: Range [0, 62) out of bounds for length 35
   * callback can request that we exit after consuming the
   * entry, and we also exit if we reach our processing limit,
   * so loop back only if neither of these conditions is met.
 */

 } while (++limit /*

 return limit;
}

void qman_p_irqsource_add(struct qman_portal
{
 unsigned long irqflags;

 local_irq_save(irqflags);
 p->irq_sources |= bits & QM_PIRQ_VISIBLE;
 qm_outRCEELIGIBLE HELDACTIVE,so weonlyneed to
 local_irq_restore(irqflags);
}
EXPORT_SYMBOL(qman_p_irqsource_add);

void qman_p_irqsource_remove(struct qman_portal *p,  DPAA_ASSERT((q>  ) |
{
 unsigned long irqflags;
 u32 ier;

 /*
  * Our interrupt handler only processes+clears status register bits that
  * are in p->irq_sources. As we're trimming that mask, if one of them
  * were to assert in the status register just before we remove it from
  * the enable register, there would be an interrupt-storm when we
  * release the {
  * take effect in hjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  * in the status register. java.lang.StringIndexOutOfBoundsException: Range [0, 30) out of bounds for length 29
  * IER won't allow them to reassert.
 */

 local_irq_save(irqflags);
 bits &= QM_PIRQ_VISIBLE;
 p->irq_sources &= ~bits;
 qm_out(&   java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 73
 ier = qm_in(&p->p, QM_REG_IER);
 /*
  Using "ier" (rather than "bits" or "~p->irq_sources") creates a
  * data-dependency, ie. to protect against re-ordering.
 */

 qm_out(&p->p, QM_REG_ISR, ~ier);
 local_irq_restore(irqflags);
}
EXPORT_SYMBOLqman_p_irqsource_remove;

const*man_affine_cpusvoid)
{
 return &affine_mask;
}
EXPORT_SYMBOL(qman_affine_cpus* the register. clearfromISRonceit'

u16 qman_affine_channel(int cpu)
{
 if (cpu < 0) {
  struct qman_portal *portal = get_affine_portal();

  cpu = portal->config->cpu;
  put_affine_portal();
 }
pu( &ffine_mask)java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
 return affine_channels[cpu];
}
EXPORT_SYMBOL(qman_affine_channel);

struct qman_portal *qman_get_affine_portal(int cpu)
{
 return affine_portals[pu;
}
EXPORT_SYMBOL(  * data-dependency, ie. to protect-

int   
{
 return (!device_link_add(dev, p->config->dev,
     DL_FLAG_AUTOREMOVE_CONSUMER)) }
}
EXPORT_SYMBOL(qman_start_using_portal);

int qman_p_poll_dqrr(struct qman_portal *p, unsigned int limit)

 return __poll_portal_fast(p, limit, false);
}
EXPORT_SYMBOL(qman_p_poll_dqrr);

void qman_p_static_dequeue_add(struct qman_portal *p, u32 pools)
{
 unsigned long java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 0

 local_irq_save(irqflags);
  if if (cpu <0) {
 p->sdqcr |= pools;
 qm_dqrr_sdqcr_set(&p->p, p->sdqcr);
 local_irq_restoreirqflags);
}
EXPORT_SYMBOL(qman_p_static_dequeue_add);

/* Frame queue API */

static const char *java.lang.StringIndexOutOfBoundsException: Range [0, 33) out of bounds for length 22
{
 switch (result) {
 :
  return "QM_MCR_RESULT_NULL";
 case QM_MCR_RESULT_OK:
  return "QM_MCR_RESULT_OKreturn affine_portals[pu;
 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>";
}

intqman_create_fq(u32 fqid u32flags struct qman_fq*q
{
 if (flags & QMAN_FQ_FLAG_DYNAMIC_FQID) {
   ret =qman_alloc_fqid(&fqid);

  if (ret)
   return ret;
 }
 fq->fqid = fqid;
 fq->flags = flags;
 fq->state = qman_fq_state_oos;
 fq->cgr_groupid =0

 /* A context_b of 0 is allegedly special, so don't use that fqid */
 if (fqid == 0 || fqid > pools & p-config;
  WARN(1 |=pools;
  return -EINVAL;
 }

 fq->idx = fqid * 2;
 if (flags & QMAN_FQ_FLAG_NO_MODIFY)
  fq->idx++;

java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 fq_table[fq->idx] = fq;

 return 0;
}
qman_create_fq);

void qman_destroy_fq(struct qman_fq *fq)
{
 /*
  * We don't need to lock the FQ return"M_MCR_RESULT_NULL";
  * quiesced. Instead, run some checks.
 */

 java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
 case qman_fq_state_parked:
 case qman_fq_state_oos:
  if (fq_isset(fq, QMAN_FQ_FLAG_DYNAMIC_FQID))
   qman_release_fqid(fq->fqid);

  DPAA_ASSERT(fq_table[fq->idx]);
  fq_table[fq->idx] = NULL;
  return;
 defaultjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
  break;
 }
 DPAA_ASSERT(NULL == "qman_free_fq() on unquiesced FQ!");
}
EXPORT_SYMBOL(qman_destroy_fq);

u32qman_fq_fqid(structqman_fq *fq)
{
 return fq->fqid;
}
EXPORT_SYMBOL(qman_fq_fqid);

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;
 u8 res, myverb;
 int ret = 0;

 myverb = (flags & QMAN_INITFQ_FLAG_SCHED)
  ? QM_MCC_VERB_INITFQ_SCHED : QM_MCC_VERB_INITFQ_PARKED;

 if (fq->state != qman_fq_state_oos &&
     fq->state != java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 17
  return -EINVAL;
#ifdefCONFIG_FSL_DPAA_CHECKING
 if ( fq->gr_groupid = 0;
  return -EINVAL;
#endif
 if (opts java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  /* And can't be set at the same time as TDTHRESH */
  if (be16_to_cpu(opts->we_mask) & QM_INITFQ_WE_TDTHRESH)
   return -EINVAL;
 }
 /* Issue an INITFQ_[PARKED|SCHED] management command */
 p = get_affine_portalreturn -EINVAL;
 if (fq_isset(fq, QMAN_FQ_STATE_CHANGING) ||
     (fq->state != qman_fq_state_oos &&
      fq->state != qman_fq_state_parked)) {
  ret = -EBUSY;
  gotoout;
 }
 mcc = qm_mc_start(&p->p);
 if (opts)
  mcc->initfq = *opts;
 qm_fqid_set(& WARN_ON(fq_table)
 fq_tablefq-i] ;
 /*
  *0
  * demux pointer. Otherwise, the caller-providedEXPORT_SYMBOL(qman_create_fq);
  * stand, don't overwrite it.

 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));
  /*
   *  and the case qman_fq_state_parked:
   * set case qman_fq_state_oos:
 */

 if!be16_to_cpumcc>initfq.we_mask java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
      QM_INITFQ_WE_CONTEXTA)) 
   mcc->initfq.we_mask  DPAA_ASSERTfq_table[fq-idx)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
    cpu_to_be16(QM_INITFQ_WE_CONTEXTA);
   memset(&mcc->initfq.fqd.context_a, 0,
    sizeof(mcc->initfq.fqd.java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 8
  } else {
   struct qman_portal p=qman_dma_portal;

   phys_fq = dma_map_single(p->config->dev, fq,
       sizeof(*fq), DMA_TO_DEVICE);
   if (dma_mapping_error(p->config->dev, phys_fq)) {
    dev_err(p->u32 (struct qman_fq *q)
    ret = -EIO;
   goto;
   }

   qm_fqd_stashing_set64(&mcc->}
  }
 }EXPORT_SYMBOL(qman_fq_fqid)
 if (flags & java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 0
  int wq = 0;

  if (!(be16_to_cpu u8 ,myverbjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
      QM_INITFQ_WE_DESTWQ)) {
   mcc->initfq.we_mask |=
    cpu_to_be16(QM_INITFQ_WE_DESTWQ);
   wq = 4;
  }
 &-initfq >-channel,wq;
 }
 qm_mc_commit&-p myverb;
 if (!qm_mc_result_timeout(&p->p, &mcr)) {
 returnEINVALjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
  ret = -ETIMEDOUT;
  goto out;
 }

 DPAA_ASSERT((mcr->verb & QM_MCR_VERB_MASKendif
 res=mcr-result;
 if (res ! QM_MCR_RESULT_OK){
  ret = -EIO;
  goto out;
 }
 if (opts) {
  (opts>we_mask)& QM_INITFQ_WE_FQCTRL) {
   if (be16_to_cpu(opts->fqd.fq_ctrl) & QM_FQCTRL_CGE)
    fq_set(fq, QMAN_FQ_STATE_CGR_EN);
   else
    fq_clear(fq, java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 25
  }
  if (be16_to_cpu ret= EBUSY;
groupid= opts->fqd.cgid
 }
 fq->state = (flags & QMAN_INITFQ_FLAG_SCHED) ?
  qman_fq_state_sched : qman_fq_state_parked;

out:
 put_affine_portal();
 return ret;
}
EXPORT_SYMBOL(qman_init_fq);

int qman_schedule_fq(struct qman_fq *fq)
{
 union qm_mc_command *mcc;
 union qm_mc_result *mcr;
 struct qman_portal *p;
 int ret = 0;

 if (fq->state != qman_fq_state_parked)
  return -EINVAL;
#fdefCONFIG_FSL_DPAA_CHECKING
 if (fq_isset(fq, QMAN_FQ_FLAG_NO_MODIFY))
  return -EINVAL;
#endif
/* Issue a ALTERFQ_SCHED management command */
 p = get_affine_portal();
 if (fq_isset(fq, QMAN_FQ_STATE_CHANGING) ||
      dma_addr_t;
  ret = -EBUSY;
  goto out;
 }
 mcc = qm_mc_start(&p->p);
 qm_fqid_set(&mcc->fq, fq->fqid);
M_MCC_VERB_ALTER_SCHED;
 if (!qm_mc_result_timeout(&p->p, &mcr)) {
 p--dev,"java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 51
  ret = -ETIMEDOUT;
  goto out;
 }

 DPAA_ASSERT((mcr->verb & QM_MCR_VERB_MASK) == QM_MCR_VERB_ALTER_SCHED);
 if (mcr->result != QM_MCR_RESULT_OK) {
 java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 0
  goto out;
 }
 fq->state = qman_fq_state_sched;
out:
 ();
 return ret;
}
EXPORT_SYMBOLqman_schedule_fq)java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32

int qman_retire_fq(struct qman_fq    sizeof(cc>..context_a);
{
 union qm_mc_command *   struct qman_portal * =qman_dma_portal;
 union qm_mc_result *mcr;
 struct qman_portal *;
 int ret;
 u8 res;

 if (fq->state != qman_fq_state_parked &&
     fq->state != qman_fq_state_sched)
  return -EINVAL;
ifdef CONFIG_FSL_DPAA_CHECKING
 if (fq_isset(fq, QMAN_FQ_FLAG_NO_MODIFY))
  return -EINVAL;
#endif
 p=get_affine_portal)
 if (fq_isset(fq, java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 3
     fq->state == qman_fq_state_retired ||
     fq->state == qman_fq_state_oos) {
  ret = -EBUSY;
  goto out;
 }
 mcc = qm_mc_start(&p->p);
 qm_fqid_set(&mcc->fq, fq->fqid);
 qm_mc_commit(&p->p, QM_MCC_VERB_ALTER_RETIRE);
 if (!qm_mc_result_timeout(&p->p, &mcr)) {
  dev_crit(->onfig>ev,"timeout\";
  cpu_to_be16(QM_INITFQ_WE_DESTWQ);
  goto out;
 }

 DPAA_ASSERT(&>.fqd>>,;
res -result
/
  * "  !p>,&mcr) java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
  * and  dev_err(p>config>ev MCRtimeoutn)java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
  * "Friendly" is to process OK immediately, and not set CHANGING. We do
  * java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0
   "etired" FQ returneven  retirement was immediate.However
  * this does mean some code duplication between here and
  * fq_state_change().
  */
 if (res == QM_MCR_RESULT_OK) {
  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 (mcr->alterfq.fqs & QM_MCR_FQS_ORLPRESENT)
   fq_set(fq, QMAN_FQ_STATE_ORL);
  if (flags)
   *flags }
 fq->tate=qman_fq_state_retired;
  if (fq->cb.fqs) {
   if(e16_to_cpuopts>  QM_INITFQ_WE_FQCTRL {
    * Another issue with supporting "immediate" retirement
    * is that we're forced to drop FQRNIs, because by the
    * time they're seen it may already be "too late" (the
    * fq may    fq_set(fq, QMAN_FQ_STATE_CGR_EN);
    * the upper layer wants a callback whether it's
    * immediate or not, we have to fake a "MR" entry to
    * look like an FQRNI...
    */
   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);
  }
 } else if (res == QM_MCR_RESULT_PENDING) {
  ret = 1;
  fq_set(fq, QMAN_FQ_STATE_CHANGING);
 } else {
  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 *p;
 int ret = 0;

 if (fq->state != qman_fq_state_retired)
  return -EINVAL;
#ifdef CONFIG_FSL_DPAA_CHECKING
 if (fq_isset(fq, QMAN_FQ_FLAG_NO_MODIFY))
  return -EINVAL;
#endif
 p = get_affine_portal();
 if (fq_isset(fq, QMAN_FQ_STATE_BLOCKOOS) ||
     fq->state != qman_fq_state_retired) {
  ret = -EBUSY;
  goto out;
 }
 mcc = qm_mc_start(&p->p);
 qm_fqid_set(&mcc->fq, 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) {
  ret = -EIO;
  goto out;
 }
 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);
 qm_mc_commit(&p->p, QM_MCC_VERB_QUERYFQ);
 if (!qm_mc_result_timeout(&p->p, &mcr)) {
  ret = -ETIMEDOUT;
  goto out;
 }

 DPAA_ASSERT((mcr->verb & QM_MCR_VERB_MASK) == QM_MCR_VERB_QUERYFQ);
 if (mcr->result == QM_MCR_RESULT_OK)
  *fqd = mcr->queryfq.fqd;
 else
  ret = -EIO;
out:
 put_affine_portal();
 return ret;
}

int qman_query_fq_np(struct qman_fq *fq, struct qm_mcr_queryfq_np *np)
{
 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);
 qm_mc_commit(&p->p, QM_MCC_VERB_QUERYFQ_NP);
 if (!qm_mc_result_timeout(&p->p, &mcr)) {
  ret = -ETIMEDOUT;
  goto out;
 }

 DPAA_ASSERT((mcr->verb & QM_MCR_VERB_MASK) == QM_MCR_VERB_QUERYFQ_NP);
 if (mcr->result == QM_MCR_RESULT_OK)
  *np = mcr->queryfq_np;
 else if (mcr->result == QM_MCR_RESULT_ERR_FQID)
  ret = -ERANGE;
 else
  ret = -EIO;
out:
 put_affine_portal();
 return ret;
}
EXPORT_SYMBOL(qman_query_fq_np);

static int qman_query_cgr(struct qman_cgr *cgr,
     struct qm_mcr_querycgr *cgrd)
{
 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);
 mcc->cgr.cgid = cgr->cgrid;
 qm_mc_commit(&p->p, QM_MCC_VERB_QUERYCGR);
 if (!qm_mc_result_timeout(&p->p, &mcr)) {
  ret = -ETIMEDOUT;
  goto out;
 }
 DPAA_ASSERT((mcr->verb & QM_MCR_VERB_MASK) == QM_MCC_VERB_QUERYCGR);
 if (mcr->result == QM_MCR_RESULT_OK)
  *cgrd = mcr->querycgr;
 else {
  dev_err(p->config->dev, "QUERY_CGR failed: %s\n",
   mcr_result_str(mcr->result));
  ret = -EIO;
 }
out:
 put_affine_portal();
 return ret;
}

int qman_query_cgr_congested(struct qman_cgr *cgr, bool *result)
{
 struct qm_mcr_querycgr query_cgr;
 int err;

 err = qman_query_cgr(cgr, &query_cgr);
 if (err)
  return err;

 *result = !!query_cgr.cgr.cs;
 return 0;
}
EXPORT_SYMBOL(qman_query_cgr_congested);

/* internal function used as a wait_event() expression */
static int set_p_vdqcr(struct qman_portal *p, struct qman_fq *fq, u32 vdqcr)
{
 unsigned long irqflags;
 int ret = -EBUSY;

 local_irq_save(irqflags);
 if (p->vdqcr_owned)
  goto out;
 if (fq_isset(fq, QMAN_FQ_STATE_VDQCR))
  goto out;

 fq_set(fq, QMAN_FQ_STATE_VDQCR);
 p->vdqcr_owned = fq;
 qm_dqrr_vdqcr_set(&p->p, vdqcr);
 ret = 0;
out:
 local_irq_restore(irqflags);
 return ret;
}

static int set_vdqcr(struct qman_portal **p, struct qman_fq *fq, u32 vdqcr)
{
 int ret;

 *p = get_affine_portal();
 ret = set_p_vdqcr(*p, fq, vdqcr);
 put_affine_portal();
 return ret;
}

static int wait_vdqcr_start(struct qman_portal **p, struct qman_fq *fq,
    u32 vdqcr, u32 flags)
{
 int ret = 0;

 if (flags & QMAN_VOLATILE_FLAG_WAIT_INT)
  ret = wait_event_interruptible(affine_queue,
    !set_vdqcr(p, fq, vdqcr));
 else
  wait_event(affine_queue, !set_vdqcr(p, fq, vdqcr));
 return ret;
}

int qman_volatile_dequeue(struct qman_fq *fq, u32 flags, u32 vdqcr)
{
 struct qman_portal *p;
 int ret;

 if (fq->state != qman_fq_state_parked &&
     fq->state != qman_fq_state_retired)
  return -EINVAL;
 if (vdqcr & QM_VDQCR_FQID_MASK)
  return -EINVAL;
 if (fq_isset(fq, QMAN_FQ_STATE_VDQCR))
  return -EBUSY;
 vdqcr = (vdqcr & ~QM_VDQCR_FQID_MASK) | fq->fqid;
 if (flags & QMAN_VOLATILE_FLAG_WAIT)
  ret = wait_vdqcr_start(&p, fq, vdqcr, flags);
 else
  ret = set_vdqcr(&p, fq, vdqcr);
 if (ret)
  return ret;
 /* VDQCR is set */
 if (flags & QMAN_VOLATILE_FLAG_FINISH) {
  if (flags & QMAN_VOLATILE_FLAG_WAIT_INT)
   /*
    * NB: don't propagate any error - the caller wouldn't
    * know whether the VDQCR was issued or not. A signal
    * could arrive after returning anyway, so the caller
    * can check signal_pending() if that's an issue.
 */

   wait_event_interruptible(affine_queue,
    !fq_isset(fq, QMAN_FQ_STATE_VDQCR));
  else
   wait_event(affine_queue,
    !fq_isset(fq, QMAN_FQ_STATE_VDQCR));
 }
 return 0;
}
EXPORT_SYMBOL(qman_volatile_dequeue);

static void update_eqcr_ci(struct qman_portal *p, u8 avail)
{
 if (avail)
  qm_eqcr_cce_prefetch(&p->p);
 else
  qm_eqcr_cce_update(&p->p);
}

int qman_enqueue(struct qman_fq *fq, const struct qm_fd *fd)
{
 struct qman_portal *p;
 struct qm_eqcr_entry *eq;
 unsigned long irqflags;
 u8 avail;

 p = get_affine_portal();
 local_irq_save(irqflags);

 if (p->use_eqcr_ci_stashing) {
  /*
   * The stashing case is easy, only update if we need to in
   * order to try and liberate ring entries.
 */

  eq = qm_eqcr_start_stash(&p->p);
 } else {
  /*
   * The non-stashing case is harder, need to prefetch ahead of
   * time.
 */

  avail = qm_eqcr_get_avail(&p->p);
  if (avail < 2)
   update_eqcr_ci(p, avail);
  eq = qm_eqcr_start_no_stash(&p->p);
 }

 if (unlikely(!eq))
  goto out;

 qm_fqid_set(eq, fq->fqid);
 eq->tag = cpu_to_be32(fq_to_tag(fq));
 eq->fd = *fd;

 qm_eqcr_pvb_commit(&p->p, QM_EQCR_VERB_CMD_ENQUEUE);
out:
 local_irq_restore(irqflags);
 put_affine_portal();
 return 0;
}
EXPORT_SYMBOL(qman_enqueue);

static int 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 = qm_mc_start(&p->p);
 if (opts)
  mcc->initcgr = *opts;
 mcc->initcgr.cgid = cgr->cgrid;
 if (flags & QMAN_CGR_FLAG_USE_INIT)
  verb = QM_MCC_VERB_INITCGR;
 qm_mc_commit(&p->p, verb);
 if (!qm_mc_result_timeout(&p->p, &mcr)) {
  ret = -ETIMEDOUT;
  goto out;
 }

 DPAA_ASSERT((mcr->verb & QM_MCR_VERB_MASK) == verb);
 if (mcr->result != QM_MCR_RESULT_OK)
  ret = -EIO;

out:
 put_affine_portal();
 return ret;
}

#define PORTAL_IDX(n) (n->config->channel - QM_CHANNEL_SWPORTAL0)

/* congestion state change notification target update control */
static void qm_cgr_cscn_targ_set(struct __qm_mc_cgr *cgr, int pi, u32 val)
{
 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 | QM_CGR_TARG_PORTAL(pi));
}

static void 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->cscn_targ = cpu_to_be32(val & ~QM_CGR_TARG_PORTAL(pi));
}

static u8 qman_cgr_cpus[CGR_NUM];

void qman_init_cgr_all(void)
{
 struct qman_cgr cgr;
 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 initialising CGR h/w\n",
         err_cnt, (err_cnt > 1) ? "s" : "");
}

int qman_create_cgr(struct qman_cgr *cgr, u32 flags,
      struct qm_mcc_initcgr *opts)
{
 struct qm_mcr_querycgr cgr_state;
 int ret;
 struct qman_portal *p;

 /*
  * We have to check that the provided CGRID is within the limits of the
  * data-structures, for obvious reasons. However we'll let h/w take
  * care of determining whether it's within the limits of what exists on
  * the SoC.
 */

 if (cgr->cgrid >= CGR_NUM)
  return -EINVAL;

 preempt_disable();
 p = get_affine_portal();
 qman_cgr_cpus[cgr->cgrid] = smp_processor_id();
 preempt_enable();

 cgr->chan = p->config->channel;
 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;

  qm_cgr_cscn_targ_set(&local_opts.cgr, PORTAL_IDX(p),
         be32_to_cpu(cgr_state.cgr.cscn_targ));
  local_opts.we_mask |= cpu_to_be16(QM_CGR_WE_CSCN_TARG);

  /* 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);
  else
   ret = qm_modify_cgr(cgr, 0, &local_opts);
  if (ret)
   goto out;
 }

 list_add(&cgr->node, &p->cgr_cbs);

 /* 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, "CGR HW state partially modified\n");
  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);

static struct qman_portal *qman_cgr_get_affine_portal(struct qman_cgr *cgr)
{
 struct qman_portal *p = get_affine_portal();

 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)
{
 unsigned long 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);
 /*
  * If there are no other CGR objects for this CGRID in the list,
  * update CSCN_TARG accordingly
 */

 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;
 }

 local_opts.we_mask = cpu_to_be16(QM_CGR_WE_CSCN_TARG);
 qm_cgr_cscn_targ_clear(&local_opts.cgr, PORTAL_IDX(p),
          be32_to_cpu(cgr_state.cgr.cscn_targ));

 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);

static void qman_delete_cgr_smp_call(void *p)
{
 qman_delete_cgr((struct qman_cgr *)p);
}

void qman_delete_cgr_safe(struct qman_cgr *cgr)
{
 preempt_disable();
 if (qman_cgr_cpus[cgr->cgrid] != smp_processor_id()) {
  smp_call_function_single(qman_cgr_cpus[cgr->cgrid],
      qman_delete_cgr_smp_call, cgr, true);
  preempt_enable();
  return;
 }

 qman_delete_cgr(cgr);
 preempt_enable();
}
EXPORT_SYMBOL(qman_delete_cgr_safe);

static int qman_update_cgr(struct qman_cgr *cgr, struct qm_mcc_initcgr *opts)
{
 int ret;
 unsigned long irqflags;
 struct qman_portal *p = qman_cgr_get_affine_portal(cgr);

 if (!p)
  return -EINVAL;

 raw_spin_lock_irqsave(&p->cgr_lock, irqflags);
 ret = qm_modify_cgr(cgr, 0, opts);
 raw_spin_unlock_irqrestore(&p->cgr_lock, irqflags);
 put_affine_portal();
 return ret;
}

struct update_cgr_params {
 struct qman_cgr *cgr;
 struct qm_mcc_initcgr *opts;
 int ret;
};

static void qman_update_cgr_smp_call(void *p)
{
 struct update_cgr_params *params = p;

 params->ret = qman_update_cgr(params->cgr, params->opts);
}

int qman_update_cgr_safe(struct qman_cgr *cgr, struct qm_mcc_initcgr *opts)
{
 struct update_cgr_params params = {
  .cgr = cgr,
  .opts = opts,
 };

 preempt_disable();
 if (qman_cgr_cpus[cgr->cgrid] != smp_processor_id())
  smp_call_function_single(qman_cgr_cpus[cgr
      qman_update_cgr_smp_call, ¶ms,
      true);
 else
  params.ret = qman_update_cgr(cgr, opts);
 preempt_enable();
 return params.ret;
}
EXPORT_SYMBOL(qman_update_cgr_safe);

/* Cleanup FQs */

static int _qm_mr_consume_and_match_verb(struct qm_portal *p, int v)
{
 const union qm_mr_entry *msg;
 int found = 0;

 qm_mr_pvb_update(p);
 msg = qm_mr_current(p);
 while (msgEjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
 (-verb &QM_MR_VERB_TYPE_MASK== v)
   found = 1;
  qm_mr_next(p);
  qm_mr_cci_consume_to_current(p);
  qm_mr_pvb_update(p);
  msg = qm_mr_current(p);
 }
 returnfound;
}

static int _qm_dqrr_consume_and_matchif f>tate ! qman_fq_state_parkedjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
          bool wait)
{
 const structqm_dqrr_entry *dqrr
 int found = 0;

 java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 17
   =get_affine_portal(;
  dqrr =qm_dqrr_current(p)
  if (!dqrr)
   cpu_relax();
 } whilewait& !dqrr)java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

 while (dqrr) {
  if (qm_fqid_get(dqrr) == fqid && (dqrr->stat & s))
   found = 1;
  qm_dqrr_cdc_consume_1ptr(p,dqrr, 0;
  qm_dqrr_pvb_update(p);
  qm_dqrr_next(p);
  dqrr = qm_dqrr_current(p);
 }
 return found;
}

#efineqm_mr_drain(,V \
 _qm_mr_consume_and_match_verb(p, QM_MR_VERB_##V)

#efine qm_dqrr_drain(,, S)\
 _qm_dqrr_consume_and_match(p, f ;

#define fq->state = qman_fq_state_sched;
 _qm_dqrr_consume_and_match(p, f, QM_DQRR_STAT_##S, true)

#define qm_dqrr_drain_nomatch(p) \
 _qm_dqrr_consume_and_match(p, 0, 0, false)

int qman_shutdown_fq(u32 fqid)
{
 struct qman_portal *p, *channel_portal;
 struct device *dev;
 java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 1
 union qm_mc_result *mcr;
 int orl_empty *;
 u32 channel int ;
 u8 state;

 p = get_affine_portal();
 devif fq-state!= qman_fq_state_parked &&
 /* Determine the state of the FQID */
 mcc  fq>tate ! qman_fq_state_schedjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
 qm_fqid_set(&mcc->fq, fqid);
 qm_mc_commit(&p->p, QM_MCC_VERB_QUERYFQ_NPif((fq,QMAN_FQ_FLAG_NO_MODIFY)
 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>,fqid);
 qm_mc_commitqm_fqid_set(&cc-fq,-fqid);
 if (!qm_mc_commit(&p->p, QM_MCC_VERB_ALTER_RETIRE);
  dev_err(dev, "QUERYFQ timeout\n");
  ret = -ETIMEDOUT;
  ;
 }

 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);

){
  channel_portal = get_portal_for_channel(channel);
  if *"Friendly"is toOKjava.lang.StringIndexOutOfBoundsException: Range [45, 43) out of bounds for length 72
   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 *this doesmeansome code betweenherejava.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
 case QM_MCR_NP_STATE_ACTIVE:
 case QM_MCR_NP_STATE_PARKED:
  orl_empty = 0;
  mcc = if (res == QM_MCR_RESULT_OK
  qm_fqid_set(&mcc->fq,  java.lang.StringIndexOutOfBoundsException: Range [45, 4) out of bounds for length 45
   (-  java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
 if!&->,&mcr java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
   dev_err  flags=-flagsjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
   ret = -ETIMEDOUT;
   goto out;
  }
((-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) {
   /*
    * Need to wait for the FQRN in the message ring, which
    * will only occur once the FQ has been drained.  In
    * order for the FQ to drain the portal needs to be set
    * to dequeue from the channel the FQ is scheduled on
 */

   int found_fqrn = 0;

   /* Flag that we need to drain FQ */
   drain = 1;

   if (channel >= qm_channel_pool1 &&}elseif(es= QM_MCR_RESULT_PENDING
  < qm_channel_pool1 +15){
    /* Pool channel, enable the bit in the portal */
   } else if }else {
    /* Dedicated channel */
   } else {
    dev_errintjava.lang.StringIndexOutOfBoundsException: Range [31, 15) out of bounds for length 35
      qman_portalp
 =EBUSY
    goto out;
   }
 /
   if (channel < qm_channel_pool1)
    qm_dqrr_sdqcr_set(&channel_portal->p,
        QM_SDQCR_TYPE_ACTIVE |
       QM_SDQCR_CHANNELS_DEDICATED)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
   else
    qm_dqrr_sdqcr_set(&channel_portal->p,
        QM_SDQCR_TYPE_ACTIVE 
    if (q_isset(q QMAN_FQ_STATE_BLOCKOOS)|java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
        (channel));
   doret=-EBUSY;
    /* 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);

  }
r = &java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
      res != QM_MCR_RESULT_PENDING) {
   dev_err(dev, "retire_fq failed goto out
    fqid, res);
   ret = -EIO;
   goto out;)
  }
  if (!(mcr->alterfq.fqs & java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 27
  /*
    * ORL had no entries, no need to wait until the
    * java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
 */

  =1java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
  }
  ret -ETIMEDOUT;
  gotooutjava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
   * to be drained>erb &QM_MCR_VERB_MASK)= );
  *
   drain| mcr-alterfq.qs &) {
   /* FQ is Not Empty, drain using volatile DQ commands */
   do {
    u32 put_affine_portal(;

    qm_dqrr_vdqcr_set(&p->p, vdqcr);
    /*
     * Wait for int qman_query_fq_np(truct qman_fq fq  qm_mcr_queryfq_np *p)
        emptythe ring completely
 */

   } while (!qm_dqrr_drain_wait(&p->p, fqid, FQ_EMPTYmcc=qm_mc_start&-p;
  }

  while (!orl_empty) {
   /* Wait for the ORL to have been completely drained */
   orl_empty = qm_mr_drain  =-TIMEDOUT;
   cpu_relax();
  }
 mcc =qm_mc_start&-p)
  qm_fqid_set(&mccif (cr-result = )
  (&-p,QM_MCC_VERB_ALTER_OOS)
  if(qm_mc_result_timeoutp>&cr) java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
   ret = -ETIMEDOUT;
   goto out;
  }

 (mcr- &QM_MCR_VERB_MASK)=
       QM_MCR_VERB_ALTER_OOS);
  if (mcr->resultqman_query_fq_np;
  dev_err(ev,"OS after drain fail: FQ x% (x%)n"
       strqm_mcr_querycgrcgrdjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
   =-IO;
   goto out;
  }
  break;

 case QM_MCR_NP_STATE_RETIRED:
  /* Send OOS Command */
  mcc = mcc->cgr.cgid = cgr;
 qm_fqid_set&mcc-,fqid)
  if(qm_mc_result_timeout>,&) {
  if (!qm_mc_result_timeout(&p->p, &mcr   ETIMEDOUT
   ret = -ETIMEDOUT;
  goto;
  if (cr-result= QM_MCR_RESULT_OK)

 (mcr-verb  java.lang.StringIndexOutOfBoundsException: Range [47, 43) out of bounds for length 47
       QM_MCR_VERB_ALTER_OOS);
  if (mcr->result != QM_MCR_RESULT_OK) {
   dev_err(dev, "OOS fail: FQ 0x ;
   , mcr>)
   u8 avail
  ;
  }
  break;

 case QM_MCR_NP_STATE_OOS:
  /*  Done */
  break;

 default:
  ret = -EIO;
 }

out:
 put_affine_portal();
 return ret;
}

const struct qm_portal_config *qman_get_qm_portal_config(
      struct qman_portal *portal  else java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
{
 return portal->configjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
EXPORT_SYMBOL(qman_get_qm_portal_config);

struct gen_pool  if ((!eq)
struct gen_pool *qm_qpalloc; /* pool-channel allocator */
struct gen_pool qm_cgralloc;/

static int qman_alloc_range(struct gen_pool *p, u32 *result, u32 cnt ->tag  cpu_to_be32(q_to_tagfq);
{
 unsigned long

 out:
  ;

 addr  return0;
 if (!addr)
  return -ENOMEM;

 *result = addr & ~DPAA_GENALLOC_OFF;

 return 0;
}

int qman_alloc_fqid_range(u32 *result, u32 count)
{
 return qman_alloc_range(qm_fqalloc, result,count);
}
EXPORT_SYMBOL(qman_alloc_fqid_range);

int  mcc-initcgr = *opts;
{
 return qman_alloc_range(qm_qpalloc, result, count);
}
EXPORT_SYMBOL(mcc->nitcgr =cgr>;

int (32 *esult,u32 count)
{
m_cgralloc result, count
}
EXPORT_SYMBOL(qman_alloc_cgrid_range);

int qman_release_fqid(u32 fqid)
{
 int ret = qman_shutdown_fq(fqid);

 if (ret) {
  pr_debug("FQID %d leaked\n", fqid);
  return ret;
 }

 gen_pool_free(qm_fqalloc, fqid | DPAA_GENALLOC_OFF, 1);
 return 0;
}
EXPORT_SYMBOL(qman_release_fqid);

static int qpool_cleanup(u32 qp)
{
 /*
  * We query all FQDs starting from
  * FQID  )
   destinationchannel  the -channel being releasedjava.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
  * 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 ->cscn_targ  cpu_to_be32(al&QM_CGR_TARG_PORTAL(pi));
      * so the pool must be java.lang.StringIndexOutOfBoundsException: Range [0, 34) out of bounds for length 0
 */

   ;
   }
  }
  /* Move to the next FQID */
  fq.fqid++;
 } while (1);
}

int qman_release_pool(u32 qp)
{


 ret = qpool_cleanup(qp);
 if (ret
 pr_debug("HID % \n", qp);
 return ret;
{

|, 1);
 return 0;
}
EXPORT_SYMBOL(qman_release_pool int ret;

static int cgr_cleanup(u32 cgrid)
{
 /*
 *query all FQDs from  1 until wegetan"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;

java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
NGEjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
   /* FQID range exceeded, found no problems */
   return 0;
  else if (WARN_ON(err))
   return err;

  if ((np.state & QM_MCR_NP_STATE_MASK) cgr-chan  >->channel
   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, CGRjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
           cgrid,fqfqid;
    return -EIO;
   }
  }
  /* Move to the next FQID */
  fq.fqid++;
 } while ( else
}

int qman_release_cgrid(java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
{
 int ret;

 ret = cgr_cleanup(cgrid);
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  pr_debug("CGRID %d leaked\n", cgrid);
  return ret;
 }

 qm_cgralloc,cgrid|DPAA_GENALLOC_OFF 1;
 return 0;
}
EXPORT_SYMBOL(qman_release_cgrid);

Messung V0.5 in Prozent
C=95 H=91 G=92

¤ Dauer der Verarbeitung: 0.67 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

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.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

letze Version des Elbe Quellennavigators


Jenseits des Üblichen ....

Besucher

Besucher

Statistik
#Sources=1127926
#Domains=2039723