aboutsummaryrefslogtreecommitdiffstats
path: root/dpdk/dpdk-16.04_patches/0010-Fix-O0-clang-build.patch
blob: 2ce0e7c856b96f2622ddd666a55a41698fad21c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From 2b82c248638bba6e98ecf388c6e0b1f5f0b44028 Mon Sep 17 00:00:00 2001
From: Damjan Marion <damarion@cisco.com>
Date: Tue, 26 Apr 2016 12:36:52 +0200
Subject: [PATCH] Fix -O0 clang build

Signed-off-by: Damjan Marion <damarion@cisco.com>
---
 lib/librte_eal/common/include/arch/x86/rte_rtm.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/librte_eal/common/include/arch/x86/rte_rtm.h b/lib/librte_eal/common/include/arch/x86/rte_rtm.h
index d935641..30c1969 100644
--- a/lib/librte_eal/common/include/arch/x86/rte_rtm.h
+++ b/lib/librte_eal/common/include/arch/x86/rte_rtm.h
@@ -50,11 +50,14 @@ void rte_xend(void)
 	 asm volatile(".byte 0x0f,0x01,0xd5" ::: "memory");
 }
 
+#define rte_xabort(x) asm volatile(".byte 0xc6,0xf8,%P0" :: "i" (x) : "memory")
+#if 0
 static __attribute__((__always_inline__)) inline
 void rte_xabort(const unsigned int status)
 {
 	asm volatile(".byte 0xc6,0xf8,%P0" :: "i" (status) : "memory");
 }
+#endif
 
 static __attribute__((__always_inline__)) inline
 int rte_xtest(void)
-- 
2.7.4
person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include <vlib/vlib.h> #include <vnet/pg/pg.h> /* Global main structure. */ pg_main_t pg_main; static clib_error_t * pg_init (vlib_main_t * vm) { clib_error_t *error; pg_main_t *pg = &pg_main; vlib_thread_main_t *vtm = vlib_get_thread_main (); u32 num_threads = 1 /* main thread */ + vtm->n_threads; pg->if_index_by_if_id = hash_create (0, sizeof (uword)); if ((error = vlib_call_init_function (vm, vnet_main_init))) goto done; if ((error = vlib_call_init_function (vm, pg_cli_init))) goto done; vec_validate (pg->replay_buffers_by_thread, num_threads); done: return error; } VLIB_INIT_FUNCTION (pg_init); /* * fd.io coding-style-patch-verification: ON * * Local Variables: * eval: (c-set-style "gnu") * End: */