treewide: drop no-op prefetch() calls
authorRasmus Villemoes <ravi@prevas.dk>
Wed, 7 May 2025 12:12:44 +0000 (14:12 +0200)
committerTom Rini <trini@konsulko.com>
Wed, 18 Jun 2025 14:05:04 +0000 (08:05 -0600)
These all end up using the no-op prefetch() defined in linux/list.h,
because the only possible real implementation is in
arch/mips/include/asm/processor.h, which is behing
CONFIG_CPU_HAS_PREFETCH which is nowhere defined.

In order to be able to drop that fallback definition from list.h,
first remove all uses.

Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
drivers/net/mvpp2.c
drivers/net/octeontx/nicvf_main.c
drivers/usb/gadget/at91_udc.c
drivers/usb/musb-new/musb_core.c

index ae545fe..184c1f9 100644 (file)
@@ -3876,7 +3876,6 @@ mvpp2_rxq_next_desc_get(struct mvpp2_rx_queue *rxq)
        int rx_desc = rxq->next_desc_to_proc;
 
        rxq->next_desc_to_proc = MVPP2_QUEUE_NEXT_DESC(rxq, rx_desc);
-       prefetch(rxq->descs + rxq->next_desc_to_proc);
        return rxq->descs + rx_desc;
 }
 
index 6e4d0a0..27d0327 100644 (file)
@@ -279,8 +279,6 @@ int nicvf_cq_handler(struct nicvf *nic, void **ppkt, int *pkt_len)
                cq_desc = (struct cqe_rx_t *)GET_CQ_DESC(cq, cqe_head);
                cqe_head++;
                cqe_head &= (cq->dmem.q_len - 1);
-               /* Initiate prefetch for next descriptor */
-               prefetch((struct cqe_rx_t *)GET_CQ_DESC(cq, cqe_head));
 
                switch (cq_desc->cqe_type) {
                case CQE_TYPE_RX:
index 86b2cbf..b3c780a 100644 (file)
@@ -228,7 +228,6 @@ static int write_fifo(struct at91_ep *ep, struct at91_request *req)
        }
 
        buf = req->req.buf + req->req.actual;
-       prefetch(buf);
        total = req->req.length - req->req.actual;
        if (ep->ep.maxpacket < total) {
                count = ep->ep.maxpacket;
index 6375be7..a14b127 100644 (file)
@@ -223,8 +223,6 @@ void musb_write_fifo(struct musb_hw_ep *hw_ep, u16 len, const u8 *src)
        struct musb *musb = hw_ep->musb;
        void __iomem *fifo = hw_ep->fifo;
 
-       prefetch((u8 *)src);
-
        dev_dbg(musb->controller, "%cX ep%d fifo %p count %d buf %p\n",
                        'T', hw_ep->epnum, fifo, len, src);