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

[Xen-changelog] [linux-2.6.18-xen] mutex: __used is needed for function referenced only from inline asm


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-linux-2.6.18-xen <patchbot@xxxxxxx>
  • Date: Fri, 20 Dec 2013 15:44:02 +0000
  • Delivery-date: Fri, 20 Dec 2013 15:44:09 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Török Edwin <edwintorok@xxxxxxxxx>
# Date 1387553825 -3600
# Node ID 777c424881e19f8f0c3106fd795873c536d93798
# Parent  738b5b5d1473fa6216061e2b01a04eaf32065c2c
mutex: __used is needed for function referenced only from inline asm

Impact: fix build failure on llvm-gcc-4.2

According to the gcc manual, the 'used' attribute should be applied to
functions referenced only from inline assembly.
This fixes a build failure with llvm-gcc-4.2, which deleted
__mutex_lock_slowpath, __mutex_unlock_slowpath.

Signed-off-by: Török Edwin <edwintorok@xxxxxxxxx>
Signed-off-by: Ingo Molnar <mingo@xxxxxxx>

upstream commit 7918baa555140989eeee1270f48533987d48fdba
(it's really __attribute_used__ in our old tree)

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Committed-by: Jan Beulich <jbeulich@xxxxxxxx>
---


diff -r 738b5b5d1473 -r 777c424881e1 kernel/mutex.c
--- a/kernel/mutex.c    Fri Dec 20 15:39:29 2013 +0100
+++ b/kernel/mutex.c    Fri Dec 20 16:37:05 2013 +0100
@@ -57,7 +57,7 @@ EXPORT_SYMBOL(__mutex_init);
  * We also put the fastpath first in the kernel image, to make sure the
  * branch is predicted by the CPU as default-untaken.
  */
-static void fastcall noinline __sched
+static void fastcall noinline __attribute_used__ __sched
 __mutex_lock_slowpath(atomic_t *lock_count);
 
 /***
@@ -93,7 +93,7 @@ void inline fastcall __sched mutex_lock(
 
 EXPORT_SYMBOL(mutex_lock);
 
-static void fastcall noinline __sched
+static void fastcall noinline __attribute_used__ __sched
 __mutex_unlock_slowpath(atomic_t *lock_count);
 
 /***
@@ -189,7 +189,7 @@ __mutex_lock_common(struct mutex *lock, 
        return 0;
 }
 
-static void fastcall noinline __sched
+static void fastcall noinline __attribute_used__ __sched
 __mutex_lock_slowpath(atomic_t *lock_count)
 {
        struct mutex *lock = container_of(lock_count, struct mutex, count);
@@ -248,7 +248,7 @@ __mutex_unlock_common_slowpath(atomic_t 
 /*
  * Release the lock, slowpath:
  */
-static fastcall noinline void
+static void fastcall noinline __attribute_used__
 __mutex_unlock_slowpath(atomic_t *lock_count)
 {
        __mutex_unlock_common_slowpath(lock_count, 1);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

 


Rackspace

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