patches-3.8.13-rt13.tar.xz

md5sum:
c5ae96e450dd2f435b935ec13bfa4ec9  patches-3.8.13-rt13.tar.xz

Announce:
 ------------
 Dear RT Folks,

 I'm pleased to announce the 3.8.13-rt13 release.

 changes since v3.8.13-rt12:
 - added a patch from Paul Gortmaker to use raw_spin_lock instead of bit
   spinlocks list_bl.h

 The delta patch against v3.8.13-rt12 is appended below and can be found here:

   https://www.kernel.org/pub/linux/kernel/projects/rt/3.8/incr/patch-3.8.13-rt12-rt13.patch.xz

 The RT patch against 3.8.13 can be found here:

   https://www.kernel.org/pub/linux/kernel/projects/rt/3.8/patch-3.8.13-rt13.patch.xz

 The split quilt queue is available at:

   https://www.kernel.org/pub/linux/kernel/projects/rt/3.8/patches-3.8.13-rt13.tar.xz

 Sebastian
 ------------

http://marc.info/?l=linux-rt-users&m=137242343620462&w=2

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
diff --git a/patches/acpi-rt-Convert-acpi_gbl_hardware-lock-back-to-a-raw.patch b/patches/acpi-rt-Convert-acpi_gbl_hardware-lock-back-to-a-raw.patch
index 629c238..d42feea 100644
--- a/patches/acpi-rt-Convert-acpi_gbl_hardware-lock-back-to-a-raw.patch
+++ b/patches/acpi-rt-Convert-acpi_gbl_hardware-lock-back-to-a-raw.patch
@@ -65,18 +65,16 @@
 Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
 ---
- drivers/acpi/acpica/acglobal.h  |  2 +-
- drivers/acpi/acpica/hwregs.c    |  4 ++--
- drivers/acpi/acpica/hwxface.c   |  4 ++--
- drivers/acpi/acpica/utmutex.c   |  4 ++--
- include/acpi/platform/aclinux.h | 14 ++++++++++++++
+ drivers/acpi/acpica/acglobal.h  |    2 +-
+ drivers/acpi/acpica/hwregs.c    |    4 ++--
+ drivers/acpi/acpica/hwxface.c   |    4 ++--
+ drivers/acpi/acpica/utmutex.c   |    4 ++--
+ include/acpi/platform/aclinux.h |   14 ++++++++++++++
  5 files changed, 21 insertions(+), 7 deletions(-)
 
-diff --git a/drivers/acpi/acpica/acglobal.h b/drivers/acpi/acpica/acglobal.h
-index 64472e4..26b3cc7 100644
 --- a/drivers/acpi/acpica/acglobal.h
 +++ b/drivers/acpi/acpica/acglobal.h
-@@ -231,7 +231,7 @@ ACPI_EXTERN u8 acpi_gbl_global_lock_pending;
+@@ -231,7 +231,7 @@ ACPI_EXTERN u8 acpi_gbl_global_lock_pend
   * interrupt level
   */
  ACPI_EXTERN acpi_spinlock acpi_gbl_gpe_lock;	/* For GPE data structs and registers */
@@ -85,11 +83,9 @@
  
  /*****************************************************************************
   *
-diff --git a/drivers/acpi/acpica/hwregs.c b/drivers/acpi/acpica/hwregs.c
-index f4e5750..1feedd3 100644
 --- a/drivers/acpi/acpica/hwregs.c
 +++ b/drivers/acpi/acpica/hwregs.c
-@@ -270,14 +270,14 @@ acpi_status acpi_hw_clear_acpi_status(void)
+@@ -270,14 +270,14 @@ acpi_status acpi_hw_clear_acpi_status(vo
  			  ACPI_BITMASK_ALL_FIXED_STATUS,
  			  ACPI_FORMAT_UINT64(acpi_gbl_xpm1a_status.address)));
  
@@ -106,11 +102,9 @@
  
  	if (ACPI_FAILURE(status))
  		goto exit;
-diff --git a/drivers/acpi/acpica/hwxface.c b/drivers/acpi/acpica/hwxface.c
-index 05a154c..9e2d253 100644
 --- a/drivers/acpi/acpica/hwxface.c
 +++ b/drivers/acpi/acpica/hwxface.c
-@@ -365,7 +365,7 @@ acpi_status acpi_write_bit_register(u32 register_id, u32 value)
+@@ -365,7 +365,7 @@ acpi_status acpi_write_bit_register(u32
  		return_ACPI_STATUS(AE_BAD_PARAMETER);
  	}
  
@@ -119,7 +113,7 @@
  
  	/*
  	 * At this point, we know that the parent register is one of the
-@@ -426,7 +426,7 @@ acpi_status acpi_write_bit_register(u32 register_id, u32 value)
+@@ -426,7 +426,7 @@ acpi_status acpi_write_bit_register(u32
  
  unlock_and_exit:
  
@@ -128,11 +122,9 @@
  	return_ACPI_STATUS(status);
  }
  
-diff --git a/drivers/acpi/acpica/utmutex.c b/drivers/acpi/acpica/utmutex.c
-index 5ccf57c..db85f08 100644
 --- a/drivers/acpi/acpica/utmutex.c
 +++ b/drivers/acpi/acpica/utmutex.c
-@@ -88,7 +88,7 @@ acpi_status acpi_ut_mutex_initialize(void)
+@@ -88,7 +88,7 @@ acpi_status acpi_ut_mutex_initialize(voi
  		return_ACPI_STATUS (status);
  	}
  
@@ -150,8 +142,6 @@
  
  	/* Delete the reader/writer lock */
  
-diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h
-index 85d5d8f..59445e5 100644
 --- a/include/acpi/platform/aclinux.h
 +++ b/include/acpi/platform/aclinux.h
 @@ -72,6 +72,7 @@
@@ -162,7 +152,7 @@
  #define acpi_cpu_flags                      unsigned long
  
  #else /* !__KERNEL__ */
-@@ -175,6 +176,19 @@ static inline void *acpi_os_acquire_object(acpi_cache_t * cache)
+@@ -175,6 +176,19 @@ static inline void *acpi_os_acquire_obje
  	lock ? AE_OK : AE_NO_MEMORY;				\
  })
  
@@ -182,6 +172,3 @@
  #endif /* __KERNEL__ */
  
  #endif /* __ACLINUX_H__ */
--- 
-1.8.3.1
-
diff --git a/patches/gpu-i915-allow-the-user-not-to-do-the-wbinvd.patch b/patches/gpu-i915-allow-the-user-not-to-do-the-wbinvd.patch
index a44c7c2..2769abe 100644
--- a/patches/gpu-i915-allow-the-user-not-to-do-the-wbinvd.patch
+++ b/patches/gpu-i915-allow-the-user-not-to-do-the-wbinvd.patch
@@ -14,11 +14,9 @@
 Cc: stable-rt@vger.kernel.org
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
 ---
- drivers/gpu/drm/i915/i915_gem.c | 17 +++++++++++++++--
+ drivers/gpu/drm/i915/i915_gem.c |   17 +++++++++++++++--
  1 file changed, 15 insertions(+), 2 deletions(-)
 
-diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
-index 339540d..dce41f4 100644
 --- a/drivers/gpu/drm/i915/i915_gem.c
 +++ b/drivers/gpu/drm/i915/i915_gem.c
 @@ -35,6 +35,7 @@
@@ -29,7 +27,7 @@
  
  static void i915_gem_object_flush_gtt_write_domain(struct drm_i915_gem_object *obj);
  static void i915_gem_object_flush_cpu_write_domain(struct drm_i915_gem_object *obj);
-@@ -2656,6 +2657,10 @@ static inline int fence_number(struct drm_i915_private *dev_priv,
+@@ -2656,6 +2657,10 @@ static inline int fence_number(struct dr
  	return fence - dev_priv->fence_regs;
  }
  
@@ -40,7 +38,7 @@
  static void i915_gem_write_fence__ipi(void *data)
  {
  	wbinvd();
-@@ -2679,8 +2684,16 @@ static void i915_gem_object_update_fence(struct drm_i915_gem_object *obj,
+@@ -2679,8 +2684,16 @@ static void i915_gem_object_update_fence
  	 * on each processor in order to manually flush all memory
  	 * transactions before updating the fence register.
  	 */
@@ -59,6 +57,3 @@
  	i915_gem_write_fence(dev, fence_reg, enable ? obj : NULL);
  
  	if (enable) {
--- 
-1.8.3.1
-
diff --git a/patches/list_bl.h-make-list-head-locking-RT-safe.patch b/patches/list_bl.h-make-list-head-locking-RT-safe.patch
new file mode 100644
index 0000000..1335681
--- /dev/null
+++ b/patches/list_bl.h-make-list-head-locking-RT-safe.patch
@@ -0,0 +1,111 @@
+From 7535006a0bec6db17fe9c6b6656f2b0ffb0dc7c9 Mon Sep 17 00:00:00 2001
+From: Paul Gortmaker <paul.gortmaker@windriver.com>
+Date: Fri, 21 Jun 2013 15:07:25 -0400
+Subject: [PATCH] list_bl.h: make list head locking RT safe
+
+As per changes in include/linux/jbd_common.h for avoiding the
+bit_spin_locks on RT ("fs: jbd/jbd2: Make state lock and journal
+head lock rt safe") we do the same thing here.
+
+We use the non atomic __set_bit and __clear_bit inside the scope of
+the lock to preserve the ability of the existing LIST_DEBUG code to
+use the zero'th bit in the sanity checks.
+
+As a bit spinlock, we had no lockdep visibility into the usage
+of the list head locking.  Now, if we were to implement it as a
+standard non-raw spinlock, we would see:
+
+BUG: sleeping function called from invalid context at kernel/rtmutex.c:658
+in_atomic(): 1, irqs_disabled(): 0, pid: 122, name: udevd
+5 locks held by udevd/122:
+ #0:  (&sb->s_type->i_mutex_key#7/1){+.+.+.}, at: [<ffffffff811967e8>] lock_rename+0xe8/0xf0
+ #1:  (rename_lock){+.+...}, at: [<ffffffff811a277c>] d_move+0x2c/0x60
+ #2:  (&dentry->d_lock){+.+...}, at: [<ffffffff811a0763>] dentry_lock_for_move+0xf3/0x130
+ #3:  (&dentry->d_lock/2){+.+...}, at: [<ffffffff811a0734>] dentry_lock_for_move+0xc4/0x130
+ #4:  (&dentry->d_lock/3){+.+...}, at: [<ffffffff811a0747>] dentry_lock_for_move+0xd7/0x130
+Pid: 122, comm: udevd Not tainted 3.4.47-rt62 #7
+Call Trace:
+ [<ffffffff810b9624>] __might_sleep+0x134/0x1f0
+ [<ffffffff817a24d4>] rt_spin_lock+0x24/0x60
+ [<ffffffff811a0c4c>] __d_shrink+0x5c/0xa0
+ [<ffffffff811a1b2d>] __d_drop+0x1d/0x40
+ [<ffffffff811a24be>] __d_move+0x8e/0x320
+ [<ffffffff811a278e>] d_move+0x3e/0x60
+ [<ffffffff81199598>] vfs_rename+0x198/0x4c0
+ [<ffffffff8119b093>] sys_renameat+0x213/0x240
+ [<ffffffff817a2de5>] ? _raw_spin_unlock+0x35/0x60
+ [<ffffffff8107781c>] ? do_page_fault+0x1ec/0x4b0
+ [<ffffffff817a32ca>] ? retint_swapgs+0xe/0x13
+ [<ffffffff813eb0e6>] ? trace_hardirqs_on_thunk+0x3a/0x3f
+ [<ffffffff8119b0db>] sys_rename+0x1b/0x20
+ [<ffffffff817a3b96>] system_call_fastpath+0x1a/0x1f
+
+Since we are only taking the lock during short lived list operations,
+lets assume for now that it being raw won't be a significant latency
+concern.
+
+Cc: stable-rt@vger.kernel.org
+Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+---
+ include/linux/list_bl.h |   24 ++++++++++++++++++++++--
+ 1 file changed, 22 insertions(+), 2 deletions(-)
+
+--- a/include/linux/list_bl.h
++++ b/include/linux/list_bl.h
+@@ -2,6 +2,7 @@
+ #define _LINUX_LIST_BL_H
+ 
+ #include <linux/list.h>
++#include <linux/spinlock.h>
+ #include <linux/bit_spinlock.h>
+ 
+ /*
+@@ -32,13 +33,22 @@
+ 
+ struct hlist_bl_head {
+ 	struct hlist_bl_node *first;
++#ifdef CONFIG_PREEMPT_RT_BASE
++	raw_spinlock_t lock;
++#endif
+ };
+ 
+ struct hlist_bl_node {
+ 	struct hlist_bl_node *next, **pprev;
+ };
+-#define INIT_HLIST_BL_HEAD(ptr) \
+-	((ptr)->first = NULL)
++
++static inline void INIT_HLIST_BL_HEAD(struct hlist_bl_head *h)
++{
++	h->first = NULL;
++#ifdef CONFIG_PREEMPT_RT_BASE
++	raw_spin_lock_init(&h->lock);
++#endif
++}
+ 
+ static inline void INIT_HLIST_BL_NODE(struct hlist_bl_node *h)
+ {
+@@ -117,12 +127,22 @@ static inline void hlist_bl_del_init(str
+ 
+ static inline void hlist_bl_lock(struct hlist_bl_head *b)
+ {
++#ifndef CONFIG_PREEMPT_RT_BASE
+ 	bit_spin_lock(0, (unsigned long *)b);
++#else
++	raw_spin_lock(&b->lock);
++	__set_bit(0, (unsigned long *)b);
++#endif
+ }
+ 
+ static inline void hlist_bl_unlock(struct hlist_bl_head *b)
+ {
++#ifndef CONFIG_PREEMPT_RT_BASE
+ 	__bit_spin_unlock(0, (unsigned long *)b);
++#else
++	__clear_bit(0, (unsigned long *)b);
++	raw_spin_unlock(&b->lock);
++#endif
+ }
+ 
+ /**
diff --git a/patches/localversion.patch b/patches/localversion.patch
index 6e5d965..88925b7 100644
--- a/patches/localversion.patch
+++ b/patches/localversion.patch
@@ -12,4 +12,4 @@
 --- /dev/null
 +++ b/localversion-rt
 @@ -0,0 +1 @@
-+-rt12
++-rt13
diff --git a/patches/series b/patches/series
index c1003f7..9925713 100644
--- a/patches/series
+++ b/patches/series
@@ -248,6 +248,7 @@
 mm-cgroup-page-bit-spinlock.patch
 fs-replace-bh_uptodate_lock-for-rt.patch
 fs-jbd-replace-bh_state-lock.patch
+list_bl.h-make-list-head-locking-RT-safe.patch
 
 # GENIRQ
 genirq-nodebug-shirq.patch