submit.c (8f47d1a5e545f903cd049c42da31a3be36178447) | submit.c (42d279f9137ab7d5503836baec2739284b278d8f) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* Copyright(c) 2019 Intel Corporation. All rights rsvd. */ 3#include <linux/init.h> 4#include <linux/kernel.h> 5#include <linux/module.h> 6#include <linux/pci.h> 7#include <uapi/linux/idxd.h> 8#include "idxd.h" --- 55 unchanged lines hidden (view full) --- 64 sbitmap_clear_bit(&wq->sbmap, desc->id); 65 wake_up(&wq->submit_waitq); 66} 67 68int idxd_submit_desc(struct idxd_wq *wq, struct idxd_desc *desc) 69{ 70 struct idxd_device *idxd = wq->idxd; 71 int vec = desc->hw->int_handle; | 1// SPDX-License-Identifier: GPL-2.0 2/* Copyright(c) 2019 Intel Corporation. All rights rsvd. */ 3#include <linux/init.h> 4#include <linux/kernel.h> 5#include <linux/module.h> 6#include <linux/pci.h> 7#include <uapi/linux/idxd.h> 8#include "idxd.h" --- 55 unchanged lines hidden (view full) --- 64 sbitmap_clear_bit(&wq->sbmap, desc->id); 65 wake_up(&wq->submit_waitq); 66} 67 68int idxd_submit_desc(struct idxd_wq *wq, struct idxd_desc *desc) 69{ 70 struct idxd_device *idxd = wq->idxd; 71 int vec = desc->hw->int_handle; |
72 void __iomem *portal; |
|
72 73 if (idxd->state != IDXD_DEV_ENABLED) 74 return -EIO; 75 | 73 74 if (idxd->state != IDXD_DEV_ENABLED) 75 return -EIO; 76 |
77 portal = wq->dportal + idxd_get_wq_portal_offset(IDXD_PORTAL_UNLIMITED); |
|
76 /* 77 * The wmb() flushes writes to coherent DMA data before possibly 78 * triggering a DMA read. The wmb() is necessary even on UP because 79 * the recipient is a device. 80 */ 81 wmb(); | 78 /* 79 * The wmb() flushes writes to coherent DMA data before possibly 80 * triggering a DMA read. The wmb() is necessary even on UP because 81 * the recipient is a device. 82 */ 83 wmb(); |
82 iosubmit_cmds512(wq->dportal, desc->hw, 1); | 84 iosubmit_cmds512(portal, desc->hw, 1); |
83 84 /* 85 * Pending the descriptor to the lockless list for the irq_entry 86 * that we designated the descriptor to. 87 */ 88 if (desc->hw->flags & IDXD_OP_FLAG_RCI) 89 llist_add(&desc->llnode, 90 &idxd->irq_entries[vec].pending_llist); 91 92 return 0; 93} | 85 86 /* 87 * Pending the descriptor to the lockless list for the irq_entry 88 * that we designated the descriptor to. 89 */ 90 if (desc->hw->flags & IDXD_OP_FLAG_RCI) 91 llist_add(&desc->llnode, 92 &idxd->irq_entries[vec].pending_llist); 93 94 return 0; 95} |