[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RFC PATCH 02/12] xue: annotate functions with cf_check



Annotate indirectly called functions for IBT.

Signed-off-by: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
---
 xen/drivers/char/xue.c | 12 ++++++------
 xen/include/xue.h      | 24 ++++++++++++------------
 2 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/xen/drivers/char/xue.c b/xen/drivers/char/xue.c
index 8aefae482b71..98334090c078 100644
--- a/xen/drivers/char/xue.c
+++ b/xen/drivers/char/xue.c
@@ -39,7 +39,7 @@ struct xue_uart {
 static struct xue_uart xue_uart;
 static struct xue_ops xue_ops;
 
-static void xue_uart_poll(void *data)
+static void cf_check xue_uart_poll(void *data)
 {
     struct serial_port *port = data;
     struct xue_uart *uart = port->uart;
@@ -56,13 +56,13 @@ static void xue_uart_poll(void *data)
     set_timer(&uart->timer, NOW() + MICROSECS(XUE_POLL_INTERVAL));
 }
 
-static void __init xue_uart_init_preirq(struct serial_port *port)
+static void __init cf_check xue_uart_init_preirq(struct serial_port *port)
 {
     struct xue_uart *uart = port->uart;
     uart->lock = &port->tx_lock;
 }
 
-static void __init xue_uart_init_postirq(struct serial_port *port)
+static void __init cf_check xue_uart_init_postirq(struct serial_port *port)
 {
     struct xue_uart *uart = port->uart;
 
@@ -71,7 +71,7 @@ static void __init xue_uart_init_postirq(struct serial_port 
*port)
     set_timer(&uart->timer, NOW() + MILLISECS(1));
 }
 
-static int xue_uart_tx_ready(struct serial_port *port)
+static int cf_check xue_uart_tx_ready(struct serial_port *port)
 {
     struct xue_uart *uart = port->uart;
     struct xue *xue = &uart->xue;
@@ -79,13 +79,13 @@ static int xue_uart_tx_ready(struct serial_port *port)
     return XUE_WORK_RING_CAP - xue_work_ring_size(&xue->dbc_owork);
 }
 
-static void xue_uart_putc(struct serial_port *port, char c)
+static void cf_check xue_uart_putc(struct serial_port *port, char c)
 {
     struct xue_uart *uart = port->uart;
     xue_putc(&uart->xue, c);
 }
 
-static inline void xue_uart_flush(struct serial_port *port)
+static inline void cf_check xue_uart_flush(struct serial_port *port)
 {
     s_time_t goal;
     struct xue_uart *uart = port->uart;
diff --git a/xen/include/xue.h b/xen/include/xue.h
index 66f7d66447f3..7515244f6af3 100644
--- a/xen/include/xue.h
+++ b/xen/include/xue.h
@@ -684,45 +684,45 @@ static inline void xue_sys_clflush(void *sys, void *ptr)
 #define xue_error(...) printk("xue error: " __VA_ARGS__)
 #define XUE_SYSID xue_sysid_xen
 
-static inline int xue_sys_init(void *sys) { return 1; }
-static inline void xue_sys_sfence(void *sys) { wmb(); }
-static inline void xue_sys_lfence(void *sys) { rmb(); }
-static inline void xue_sys_unmap_xhc(void *sys, void *virt, uint64_t count) {}
-static inline void xue_sys_free_dma(void *sys, void *addr, uint64_t order) {}
+static inline int cf_check xue_sys_init(void *sys) { return 1; }
+static inline void cf_check xue_sys_sfence(void *sys) { wmb(); }
+static inline void cf_check xue_sys_lfence(void *sys) { rmb(); }
+static inline void cf_check xue_sys_unmap_xhc(void *sys, void *virt, uint64_t 
count) {}
+static inline void cf_check xue_sys_free_dma(void *sys, void *addr, uint64_t 
order) {}
 
-static inline void xue_sys_pause(void *sys)
+static inline void cf_check xue_sys_pause(void *sys)
 {
     (void)sys;
     __asm volatile("pause" ::: "memory");
 }
 
-static inline void xue_sys_clflush(void *sys, void *ptr)
+static inline void cf_check xue_sys_clflush(void *sys, void *ptr)
 {
     (void)sys;
     __asm volatile("clflush %0" : "+m"(*(volatile char *)ptr));
 }
 
-static inline void *xue_sys_alloc_dma(void *sys, uint64_t order)
+static inline void *cf_check xue_sys_alloc_dma(void *sys, uint64_t order)
 {
     return NULL;
 }
 
-static inline uint32_t xue_sys_ind(void *sys, uint32_t port)
+static inline uint32_t cf_check xue_sys_ind(void *sys, uint32_t port)
 {
     return inl(port);
 }
 
-static inline void xue_sys_outd(void *sys, uint32_t port, uint32_t data)
+static inline void cf_check xue_sys_outd(void *sys, uint32_t port, uint32_t 
data)
 {
     outl(data, port);
 }
 
-static inline uint64_t xue_sys_virt_to_dma(void *sys, const void *virt)
+static inline uint64_t cf_check xue_sys_virt_to_dma(void *sys, const void 
*virt)
 {
     return virt_to_maddr(virt);
 }
 
-static void *xue_sys_map_xhc(void *sys, uint64_t phys, uint64_t size)
+static void *cf_check xue_sys_map_xhc(void *sys, uint64_t phys, uint64_t size)
 {
     size_t i;
 
-- 
git-series 0.9.1



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.