From 1c4b023f83198038bd97667e8d30dd90cf886acd Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sat, 14 Apr 2012 12:56:36 +0000 Subject: [PATCH] ib_srpt: Only enable the recently added gcc workaround for gcc 4.6 and earlier git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4211 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- srpt/src/ib_srpt.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/srpt/src/ib_srpt.c b/srpt/src/ib_srpt.c index d020a4642..1f8166c89 100644 --- a/srpt/src/ib_srpt.c +++ b/srpt/src/ib_srpt.c @@ -2005,7 +2005,10 @@ static int srpt_compl_thread(void *arg) BUG_ON(!ch); set_current_state(TASK_INTERRUPTIBLE); +#if defined(__GNUC__) && ((__GNUC__ -0) * 100 + __GNUC_MINOR__ -0) <= 406 + /* See also http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52925. */ barrier(); +#endif while (ch->state < CH_LIVE) { srpt_process_completion(ch->cq, ch, SCST_CONTEXT_THREAD, SCST_CONTEXT_DIRECT); @@ -2018,7 +2021,10 @@ static int srpt_compl_thread(void *arg) ch->rtu_received = true; set_current_state(TASK_INTERRUPTIBLE); +#if defined(__GNUC__) && ((__GNUC__ -0) * 100 + __GNUC_MINOR__ -0) <= 406 + /* See also http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52925. */ barrier(); +#endif while (!ch->last_wqe_received) { srpt_process_completion(ch->cq, ch, SCST_CONTEXT_THREAD, SCST_CONTEXT_DIRECT);