#define __raw_readl(p) (*(const volatile unsigned int *)(p))
#define __raw_writel(v, p) {*(volatile unsigned int *)(p) = (v); }
-/* memcpy() stuff - when you know alignments in advance */
-#ifdef CONFIG_TRY_BETTER_MEMCPY
-static inline void copy_words(void *dest, const void *src, size_t sz)
-{
- u32 *__dest = dest;
- const u32 *__src = src;
- size_t __sz = sz >> 2;
-
- QBMAN_BUG_ON((unsigned long)dest & 0x3);
- QBMAN_BUG_ON((unsigned long)src & 0x3);
- QBMAN_BUG_ON(sz & 0x3);
- while (__sz--)
- *(__dest++) = *(__src++);
-}
-
-static inline void copy_shorts(void *dest, const void *src, size_t sz)
-{
- u16 *__dest = dest;
- const u16 *__src = src;
- size_t __sz = sz >> 1;
-
- QBMAN_BUG_ON((unsigned long)dest & 0x1);
- QBMAN_BUG_ON((unsigned long)src & 0x1);
- QBMAN_BUG_ON(sz & 0x1);
- while (__sz--)
- *(__dest++) = *(__src++);
-}
-
-static inline void copy_bytes(void *dest, const void *src, size_t sz)
-{
- u8 *__dest = dest;
- const u8 *__src = src;
-
- while (sz--)
- *(__dest++) = *(__src++);
-}
-#else
-#define copy_words memcpy
-#define copy_shorts memcpy
-#define copy_bytes memcpy
-#endif
-
/* Completion stuff */
#define DECLARE_COMPLETION(n) int n = 0
#define complete(n) { *n = 1; }
return -EBUSY;
p = qbman_cena_write_start_wo_shadow(&s->sys,
QBMAN_CENA_SWP_EQCR(EQAR_IDX(eqar)));
- word_copy(&p[1], &cl[1], 7);
- word_copy(&p[8], fd, sizeof(*fd) >> 2);
+ memcpy(&p[1], &cl[1], 28);
+ memcpy(&p[8], fd, sizeof(*fd));
/* Set the verb byte, have to substitute in the valid-bit */
lwsync();
p[0] = cl[0] | EQAR_VB(eqar);
p = qbman_cena_write_start_wo_shadow(&s->sys,
QBMAN_CENA_SWP_EQCR(s->eqcr.pi & 7));
- word_copy(&p[1], &cl[1], 7);
- word_copy(&p[8], fd, sizeof(*fd) >> 2);
+ memcpy(&p[1], &cl[1], 28);
+ memcpy(&p[8], fd, sizeof(*fd));
lwsync();
/* Set the verb byte, have to substitute in the valid-bit */
p[0] = cl[0] | s->eqcr.pi_vb;
}
p = qbman_cena_write_start_wo_shadow(&s->sys,
QBMAN_CENA_SWP_EQCR((s->eqcr.pi/* +burst_index */) & 7));
- /* word_copy(&p[1], &cl[1], 7); */
memcpy(&p[1], &cl[1], 7 * 4);
- /* word_copy(&p[8], fd, sizeof(*fd) >> 2); */
memcpy(&p[8], fd, sizeof(struct qbman_fd));
/* lwsync(); */
*/
qb_attr_code_encode(&code_pull_token, cl, s->desc.idx + 1);
p = qbman_cena_write_start_wo_shadow(&s->sys, QBMAN_CENA_SWP_VDQCR);
- word_copy(&p[1], &cl[1], 3);
+ memcpy(&p[1], &cl[1], 12);
/* Set the verb byte, have to substitute in the valid-bit */
lwsync();
p[0] = cl[0] | s->vdq.valid_bit;