OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

78 lines
2.6 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../musl/0009-fix-regression-disabling-use-of-pause-instruction-fo.patch
  5. # Copyright (C) 2016 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. From 5c3412d22555d03a1c00578ba8faaa8dc9206420 Mon Sep 17 00:00:00 2001
  17. From: Rich Felker <dalias@aerifal.cx>
  18. Date: Tue, 29 Mar 2016 21:22:52 -0400
  19. Subject: [PATCH] fix regression disabling use of pause instruction for x86
  20. a_spin
  21. commits e24984efd5c6ac5ea8e6cb6cd914fa8435d458bc and
  22. 16b55298dc4b6a54d287d7494e04542667ef8861 inadvertently disabled the
  23. a_spin implementations for i386, x86_64, and x32 by defining a macro
  24. named a_pause instead of a_spin. this should not have caused any
  25. functional regression, but it inhibited cpu relaxation while spinning
  26. for locks.
  27. bug reported by George Kulakowski.
  28. ---
  29. arch/i386/atomic_arch.h | 2 +-
  30. arch/x32/atomic_arch.h | 2 +-
  31. arch/x86_64/atomic_arch.h | 2 +-
  32. 3 files changed, 3 insertions(+), 3 deletions(-)
  33. diff --git a/arch/i386/atomic_arch.h b/arch/i386/atomic_arch.h
  34. index 6e67c4c..2b1a049 100644
  35. --- a/arch/i386/atomic_arch.h
  36. +++ b/arch/i386/atomic_arch.h
  37. @@ -71,7 +71,7 @@ static inline void a_barrier()
  38. __asm__ __volatile__( "" : : : "memory" );
  39. }
  40. -#define a_pause a_pause
  41. +#define a_spin a_spin
  42. static inline void a_spin()
  43. {
  44. __asm__ __volatile__( "pause" : : : "memory" );
  45. diff --git a/arch/x32/atomic_arch.h b/arch/x32/atomic_arch.h
  46. index 26098d3..7daf4ae 100644
  47. --- a/arch/x32/atomic_arch.h
  48. +++ b/arch/x32/atomic_arch.h
  49. @@ -87,7 +87,7 @@ static inline void a_barrier()
  50. __asm__ __volatile__( "" : : : "memory" );
  51. }
  52. -#define a_pause a_pause
  53. +#define a_spin a_spin
  54. static inline void a_spin()
  55. {
  56. __asm__ __volatile__( "pause" : : : "memory" );
  57. diff --git a/arch/x86_64/atomic_arch.h b/arch/x86_64/atomic_arch.h
  58. index 9f47f80..55fc6fb 100644
  59. --- a/arch/x86_64/atomic_arch.h
  60. +++ b/arch/x86_64/atomic_arch.h
  61. @@ -96,7 +96,7 @@ static inline void a_barrier()
  62. __asm__ __volatile__( "" : : : "memory" );
  63. }
  64. -#define a_pause a_pause
  65. +#define a_spin a_spin
  66. static inline void a_spin()
  67. {
  68. __asm__ __volatile__( "pause" : : : "memory" );
  69. --
  70. 2.7.4