[PATCH] fix miscompiling with GCC 4.5 -finline-functions

Previous thread: [PATCH] perf: fix perf_event.h header usage by Stephane Eranian on Tuesday, January 4, 2011 - 7:30 am. (3 messages)

Next thread: [RFC][PATCH 0/3] Refactoring sched_entity and sched_rt_entity. by Dario Faggioli on Tuesday, January 4, 2011 - 8:55 am. (15 messages)
From: Dzianis Kahanovich
Date: Tuesday, January 4, 2011 - 8:17 am

Fixing broken automatic inlining for GCC 4.5+  (breaks build with
-finline-functions or -O3 on x86_*).

Signed-off-by: Dzianis Kahanovich <mahatma@eu.by>
---
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -569,7 +569,7 @@ static inline void ept_sync_individual_a
 	}
 }

-static unsigned long vmcs_readl(unsigned long field)
+static noinline unsigned long vmcs_readl(unsigned long field)
 {
 	unsigned long value = 0;

--- a/drivers/media/radio/radio-aimslab.c
+++ b/drivers/media/radio/radio-aimslab.c
@@ -71,7 +71,7 @@ static struct rtrack rtrack_card;

 /* local things */

-static void sleep_delay(long n)
+static noinline void sleep_delay(long n)
 {
 	/* Sleep nicely for 'n' uS */
 	int d = n / msecs_to_jiffies(1000);
--
WBR, Dzianis Kahanovich AKA Denis Kaganovich, http://mahatma.bspu.unibel.by/
--

Previous thread: [PATCH] perf: fix perf_event.h header usage by Stephane Eranian on Tuesday, January 4, 2011 - 7:30 am. (3 messages)

Next thread: [RFC][PATCH 0/3] Refactoring sched_entity and sched_rt_entity. by Dario Faggioli on Tuesday, January 4, 2011 - 8:55 am. (15 messages)