rpms/kernel/F-10 linux-2.6-compile-fixes.patch,1.185,1.186
Chuck Ebbert
cebbert at fedoraproject.org
Sun Feb 8 20:29:54 UTC 2009
- Previous message: rpms/perl-SVK/devel perl-SVK.spec,1.12,1.13
- Next message: rpms/rhpxl/devel .cvsignore, 1.61, 1.62 import.log, 1.1, 1.2 rhpxl.spec, 1.83, 1.84 sources, 1.68, 1.69
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: cebbert
Update of /cvs/pkgs/rpms/kernel/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv16702
Modified Files:
linux-2.6-compile-fixes.patch
Log Message:
really fix btrfs build on ppc64
linux-2.6-compile-fixes.patch:
Index: linux-2.6-compile-fixes.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-10/linux-2.6-compile-fixes.patch,v
retrieving revision 1.185
retrieving revision 1.186
diff -u -r1.185 -r1.186
--- linux-2.6-compile-fixes.patch 8 Feb 2009 17:57:39 -0000 1.185
+++ linux-2.6-compile-fixes.patch 8 Feb 2009 20:29:54 -0000 1.186
@@ -4,23 +4,77 @@
# Please add the errors from gcc before the diffs to save others having
# to do a compile to figure out what your diff is fixing. Thanks.
#
+From: Kyle McMartin <kyle at redhat.com>
+Architectures other than mips and x86 are not using ticket
+spinlocks. Therefore, the contention on the lock is meaningless,
+since there is nobody known to be waiting on it (arguably /fairly/
+unfair locks) Dummy it out to return 0 on other architectures.
+
+Signed-off-by: Kyle McMartin <kyle at redhat.com>
+---
+
+fixes:
btrfs does not build on ppc64
http://marc.info/?l=linux-kernel&m=123404002114219&w=2
fs/btrfs/locking.c: In function 'btrfs_path_lock_waiting':
fs/btrfs/locking.c:254: error: implicit declaration of function '__raw_spin_is_contended'
-Index: linux-2.6.28.noarch/fs/btrfs/locking.c
-===================================================================
---- linux-2.6.28.noarch.orig/fs/btrfs/locking.c
-+++ linux-2.6.28.noarch/fs/btrfs/locking.c
-@@ -241,6 +241,9 @@ int btrfs_tree_locked(struct extent_buff
- * btrfs_search_slot uses this to decide if it should drop its locks
- * before doing something expensive like allocating free blocks for cow.
- */
-+#ifndef __raw_spin_is_contended
-+#define spin_is_contended(x) (0)
-+#endif
- int btrfs_path_lock_waiting(struct btrfs_path *path, int level)
+ arch/mips/include/asm/spinlock.h | 1 +
+ arch/x86/include/asm/paravirt.h | 1 +
+ arch/x86/include/asm/spinlock.h | 1 +
+ include/linux/spinlock.h | 5 +++++
+ 4 files changed, 8 insertions(+), 0 deletions(-)
+diff --git a/arch/mips/include/asm/spinlock.h b/arch/mips/include/asm/spinlock.h
+index 1a1f320..0884947 100644
+--- a/arch/mips/include/asm/spinlock.h
++++ b/arch/mips/include/asm/spinlock.h
+@@ -51,6 +51,7 @@ static inline int __raw_spin_is_contended(raw_spinlock_t *lock)
+
+ return (((counters >> 14) - counters) & 0x1fff) > 1;
+ }
++#define __raw_spin_is_contended __raw_spin_is_contended
+
+ static inline void __raw_spin_lock(raw_spinlock_t *lock)
+ {
+diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h
+index ba3e2ff..c09a141 100644
+--- a/arch/x86/include/asm/paravirt.h
++++ b/arch/x86/include/asm/paravirt.h
+@@ -1402,6 +1402,7 @@ static inline int __raw_spin_is_contended(struct raw_spinlock *lock)
+ {
+ return PVOP_CALL1(int, pv_lock_ops.spin_is_contended, lock);
+ }
++#define __raw_spin_is_contended __raw_spin_is_contended
+
+ static __always_inline void __raw_spin_lock(struct raw_spinlock *lock)
+ {
+diff --git a/arch/x86/include/asm/spinlock.h b/arch/x86/include/asm/spinlock.h
+index d17c919..8247e94 100644
+--- a/arch/x86/include/asm/spinlock.h
++++ b/arch/x86/include/asm/spinlock.h
+@@ -245,6 +245,7 @@ static inline int __raw_spin_is_contended(raw_spinlock_t *lock)
+ {
+ return __ticket_spin_is_contended(lock);
+ }
++#define __raw_spin_is_contended __raw_spin_is_contended
+
+ static __always_inline void __raw_spin_lock(raw_spinlock_t *lock)
{
- int i;
+diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h
+index e0c0fcc..a0c66a2 100644
+--- a/include/linux/spinlock.h
++++ b/include/linux/spinlock.h
+@@ -124,7 +124,12 @@ do { \
+ #ifdef CONFIG_GENERIC_LOCKBREAK
+ #define spin_is_contended(lock) ((lock)->break_lock)
+ #else
++
++#ifdef __raw_spin_is_contended
+ #define spin_is_contended(lock) __raw_spin_is_contended(&(lock)->raw_lock)
++#else
++#define spin_is_contended(lock) (((void)(lock), 0))
++#endif /*__raw_spin_is_contended*/
+ #endif
+
+ /**
- Previous message: rpms/perl-SVK/devel perl-SVK.spec,1.12,1.13
- Next message: rpms/rhpxl/devel .cvsignore, 1.61, 1.62 import.log, 1.1, 1.2 rhpxl.spec, 1.83, 1.84 sources, 1.68, 1.69
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list