RE: [PATCH 1/2] virtio_ring: fix error - unknown type name 'spinlock_t'

From
Cai,Huoqing <hidden>
Date
2021-07-19 05:15:06
Also in
lkml
Reply to
Cai Huoqing, 2021-07-14
Is it a error,  try “make virtio” in the path of linux/tools/ with config VHOST_IOTLB=n

-----Original Message-----
From: Cai,Huoqing <redacted> 
Sent: 2021年7月14日 10:29
To: sgarzare@redhat.com; mst@redhat.com; <redacted>
Cc: <redacted>; <redacted>; Cai,Huoqing <redacted>
Subject: [PATCH 1/2] virtio_ring: fix error - unknown type name 'spinlock_t'

when run "make virtio" in linux/tools,
the error: unknown type name 'spinlock_t' occurs

Signed-off-by: Cai Huoqing <redacted>
---
 include/linux/vringh.h | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/include/linux/vringh.h b/include/linux/vringh.h index 84db7b8f912f..ff21c2643792 100644
--- a/include/linux/vringh.h
+++ b/include/linux/vringh.h
@@ -43,11 +43,13 @@ struct vringh {
        /* The vring (note: it may contain user pointers!) */
        struct vring vring;

+#if IS_REACHABLE(CONFIG_VHOST_IOTLB)
        /* IOTLB for this vring */
        struct vhost_iotlb *iotlb;

        /* spinlock to synchronize IOTLB accesses */
        spinlock_t *iotlb_lock;
+#endif

        /* The function to call to notify the guest about added buffers */
        void (*notify)(struct vringh *);
--
2.25.1

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Thread (4 messages) 4 messages, 1 author, last reply 2021-07-19
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help