[rt] Update to 3.2.26-rt39

This is a bit of a kluge, as Steven Rostedt is no longer providing
rebased tags in git.  There is one updated (23) and one new patch
(282) from 3.2.24-rt38-rebase, and the version bump patch that follows
the trivial merge of 3.2.26 and 3.2.24-rt38 (283).

The combined diff for this patch series appears to be the same (modulo
line numbers shifted by Debian patches) as that between 3.2.26 and
3.2.26-rt39.

svn path=/dists/sid/linux/; revision=19313
This commit is contained in:
Ben Hutchings 2012-08-07 05:50:17 +00:00
parent c65ef00232
commit d01a0bc616
7 changed files with 154 additions and 42 deletions

2
debian/changelog vendored
View File

@ -62,6 +62,8 @@ linux (3.2.26-1) UNRELEASED; urgency=low
- Change the audit message type from AUDIT_AVC (1400) to
AUDIT_ANON_LINK (1702)
* lirc_sir: make device registration work (Closes: #680762)
* [rt] Update to 3.2.26-rt39:
- time/rt: Fix up leap-second backport for RT changes
-- Ben Hutchings <ben@decadent.org.uk> Tue, 24 Jul 2012 02:20:37 +0100

View File

@ -1,7 +1,7 @@
From a0b5d92787bc37be58a70439b4399f0014840c3b Mon Sep 17 00:00:00 2001
From 6279b0161cf978d1c6c12a7991cc27676ad1fbc2 Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de>
Date: Thu, 1 Mar 2012 15:14:06 +0100
Subject: [PATCH 023/282] timekeeping: Split xtime_lock
Subject: [PATCH 023/283] timekeeping: Split xtime_lock
xtime_lock is going to be split apart in mainline, so we can shorten
the seqcount protected regions and avoid updating seqcount in some
@ -9,19 +9,17 @@ code pathes. This is a straight forward split, so we can avoid the
whole mess with raw seqlocks for RT.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
[bwh: Forward-ported to 3.2.24: adjust context; drop changes to
ntp_leap_second() function removed by commit
6b43ae8a619d17c4935c3320d2ef9e92bdeed05d ('ntp: Fix leap-second hrtimer
livelock')]
---
kernel/time/jiffies.c | 4 +-
kernel/time/ntp.c | 24 ++++++++----
kernel/time/ntp.c | 23 ++++++++---
kernel/time/tick-common.c | 10 +++--
kernel/time/tick-internal.h | 3 +-
kernel/time/tick-sched.c | 16 +++++---
kernel/time/timekeeping.c | 90 +++++++++++++++++++++++++------------------
6 files changed, 88 insertions(+), 59 deletions(-)
6 files changed, 89 insertions(+), 57 deletions(-)
diff --git a/kernel/time/jiffies.c b/kernel/time/jiffies.c
index a470154..21940eb 100644
--- a/kernel/time/jiffies.c
+++ b/kernel/time/jiffies.c
@@ -74,9 +74,9 @@ u64 get_jiffies_64(void)
@ -36,9 +34,30 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
return ret;
}
EXPORT_SYMBOL(get_jiffies_64);
diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c
index f1eb182..09079b7 100644
--- a/kernel/time/ntp.c
+++ b/kernel/time/ntp.c
@@ -623,7 +623,8 @@ int do_adjtimex(struct timex *txc)
@@ -362,6 +362,9 @@ int second_overflow(unsigned long secs)
int leap = 0;
s64 delta;
+ raw_spin_lock(&xtime_lock);
+ write_seqcount_begin(&xtime_seq);
+
/*
* Leap second processing. If in leap-insert state at the end of the
* day, the system clock is set back one second; if in leap-delete
@@ -402,6 +405,8 @@ int second_overflow(unsigned long secs)
break;
}
+ write_seqcount_end(&xtime_seq);
+ raw_spin_unlock(&xtime_lock);
/* Bump the maxerror field */
time_maxerror += MAXFREQ / NSEC_PER_USEC;
@@ -623,7 +628,8 @@ int do_adjtimex(struct timex *txc)
getnstimeofday(&ts);
@ -48,7 +67,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
if (txc->modes & ADJ_ADJTIME) {
long save_adjust = time_adjust;
@@ -665,7 +666,8 @@ int do_adjtimex(struct timex *txc)
@@ -665,7 +671,8 @@ int do_adjtimex(struct timex *txc)
/* fill PPS status fields */
pps_fill_timex(txc);
@ -58,7 +77,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
txc->time.tv_sec = ts.tv_sec;
txc->time.tv_usec = ts.tv_nsec;
@@ -863,7 +865,8 @@ void hardpps(const struct timespec *phas
@@ -863,7 +870,8 @@ void hardpps(const struct timespec *phase_ts, const struct timespec *raw_ts)
pts_norm = pps_normalize_ts(*phase_ts);
@ -68,7 +87,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
/* clear the error bits, they will be set again if needed */
time_status &= ~(STA_PPSJITTER | STA_PPSWANDER | STA_PPSERROR);
@@ -876,7 +879,8 @@ void hardpps(const struct timespec *phas
@@ -876,7 +884,8 @@ void hardpps(const struct timespec *phase_ts, const struct timespec *raw_ts)
* just start the frequency interval */
if (unlikely(pps_fbase.tv_sec == 0)) {
pps_fbase = *raw_ts;
@ -78,7 +97,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
return;
}
@@ -891,7 +895,8 @@ void hardpps(const struct timespec *phas
@@ -891,7 +900,8 @@ void hardpps(const struct timespec *phase_ts, const struct timespec *raw_ts)
time_status |= STA_PPSJITTER;
/* restart the frequency calibration interval */
pps_fbase = *raw_ts;
@ -88,7 +107,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
pr_err("hardpps: PPSJITTER: bad pulse\n");
return;
}
@@ -908,7 +913,8 @@ void hardpps(const struct timespec *phas
@@ -908,7 +918,8 @@ void hardpps(const struct timespec *phase_ts, const struct timespec *raw_ts)
hardpps_update_phase(pts_norm.nsec);
@ -98,6 +117,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
}
EXPORT_SYMBOL(hardpps);
diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c
index da6c9ec..39de540 100644
--- a/kernel/time/tick-common.c
+++ b/kernel/time/tick-common.c
@@ -63,13 +63,15 @@ int tick_is_oneshot_available(void)
@ -118,7 +139,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
}
update_process_times(user_mode(get_irq_regs()));
@@ -130,9 +132,9 @@ void tick_setup_periodic(struct clock_ev
@@ -130,9 +132,9 @@ void tick_setup_periodic(struct clock_event_device *dev, int broadcast)
ktime_t next;
do {
@ -130,18 +151,22 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
clockevents_set_mode(dev, CLOCK_EVT_MODE_ONESHOT);
diff --git a/kernel/time/tick-internal.h b/kernel/time/tick-internal.h
index 4e265b9..c91100d 100644
--- a/kernel/time/tick-internal.h
+++ b/kernel/time/tick-internal.h
@@ -141,4 +141,5 @@ static inline int tick_device_is_functio
@@ -141,4 +141,5 @@ static inline int tick_device_is_functional(struct clock_event_device *dev)
#endif
extern void do_timer(unsigned long ticks);
-extern seqlock_t xtime_lock;
+extern raw_spinlock_t xtime_lock;
+extern seqcount_t xtime_seq;
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index 9955ebd..f8d1e36 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -56,7 +56,8 @@ static void tick_do_update_jiffies64(kti
@@ -56,7 +56,8 @@ static void tick_do_update_jiffies64(ktime_t now)
return;
/* Reevalute with xtime_lock held */
@ -151,7 +176,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
delta = ktime_sub(now, last_jiffies_update);
if (delta.tv64 >= tick_period.tv64) {
@@ -79,7 +80,8 @@ static void tick_do_update_jiffies64(kti
@@ -79,7 +80,8 @@ static void tick_do_update_jiffies64(ktime_t now)
/* Keep the tick_next_period variable up to date */
tick_next_period = ktime_add(last_jiffies_update, tick_period);
}
@ -161,7 +186,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
}
/*
@@ -89,12 +91,14 @@ static ktime_t tick_init_jiffy_update(vo
@@ -89,12 +91,14 @@ static ktime_t tick_init_jiffy_update(void)
{
ktime_t period;
@ -178,7 +203,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
return period;
}
@@ -345,11 +349,11 @@ void tick_nohz_stop_sched_tick(int inidl
@@ -345,11 +349,11 @@ void tick_nohz_stop_sched_tick(int inidle)
ts->idle_calls++;
/* Read jiffies and the time when jiffies were updated last */
do {
@ -192,9 +217,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
if (rcu_needs_cpu(cpu) || printk_needs_cpu(cpu) ||
arch_needs_cpu(cpu)) {
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index 03e67d4..03493fd 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -139,8 +139,8 @@ static inline s64 timekeeping_get_ns_raw
@@ -139,8 +139,8 @@ static inline s64 timekeeping_get_ns_raw(void)
* This read-write spinlock protects us from races in SMP while
* playing with xtime.
*/
@ -257,7 +284,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
set_normalized_timespec(ts, ts->tv_sec + tomono.tv_sec,
ts->tv_nsec + tomono.tv_nsec + nsecs);
@@ -333,7 +333,7 @@ void getnstime_raw_and_real(struct times
@@ -333,7 +333,7 @@ void getnstime_raw_and_real(struct timespec *ts_raw, struct timespec *ts_real)
do {
u32 arch_offset;
@ -266,7 +293,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
*ts_raw = raw_time;
*ts_real = xtime;
@@ -346,7 +346,7 @@ void getnstime_raw_and_real(struct times
@@ -346,7 +346,7 @@ void getnstime_raw_and_real(struct timespec *ts_raw, struct timespec *ts_real)
nsecs_raw += arch_offset;
nsecs_real += arch_offset;
@ -275,7 +302,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
timespec_add_ns(ts_raw, nsecs_raw);
timespec_add_ns(ts_real, nsecs_real);
@@ -385,7 +385,8 @@ int do_settimeofday(const struct timespe
@@ -385,7 +385,8 @@ int do_settimeofday(const struct timespec *tv)
if ((unsigned long)tv->tv_nsec >= NSEC_PER_SEC)
return -EINVAL;
@ -285,7 +312,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
timekeeping_forward_now();
@@ -397,7 +398,8 @@ int do_settimeofday(const struct timespe
@@ -397,7 +398,8 @@ int do_settimeofday(const struct timespec *tv)
timekeeping_update(true);
@ -295,7 +322,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
/* signal hrtimers about time change */
clock_was_set();
@@ -421,7 +423,8 @@ int timekeeping_inject_offset(struct tim
@@ -421,7 +423,8 @@ int timekeeping_inject_offset(struct timespec *ts)
if ((unsigned long)ts->tv_nsec >= NSEC_PER_SEC)
return -EINVAL;
@ -305,7 +332,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
timekeeping_forward_now();
@@ -430,7 +433,8 @@ int timekeeping_inject_offset(struct tim
@@ -430,7 +433,8 @@ int timekeeping_inject_offset(struct timespec *ts)
timekeeping_update(true);
@ -315,7 +342,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
/* signal hrtimers about time change */
clock_was_set();
@@ -502,11 +506,11 @@ void getrawmonotonic(struct timespec *ts
@@ -502,11 +506,11 @@ void getrawmonotonic(struct timespec *ts)
s64 nsecs;
do {
@ -363,7 +390,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
}
/* time in seconds when suspend began */
@@ -659,14 +665,16 @@ void timekeeping_inject_sleeptime(struct
@@ -659,14 +665,16 @@ void timekeeping_inject_sleeptime(struct timespec *delta)
if (!(ts.tv_sec == 0 && ts.tv_nsec == 0))
return;
@ -422,7 +449,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
clockevents_notify(CLOCK_EVT_NOTIFY_SUSPEND, NULL);
clocksource_suspend();
@@ -1126,13 +1138,13 @@ void get_monotonic_boottime(struct times
@@ -1126,13 +1138,13 @@ void get_monotonic_boottime(struct timespec *ts)
WARN_ON(timekeeping_suspended);
do {
@ -438,7 +465,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
set_normalized_timespec(ts, ts->tv_sec + tomono.tv_sec + sleep.tv_sec,
ts->tv_nsec + tomono.tv_nsec + sleep.tv_nsec + nsecs);
@@ -1183,10 +1195,10 @@ struct timespec current_kernel_time(void
@@ -1183,10 +1195,10 @@ struct timespec current_kernel_time(void)
unsigned long seq;
do {
@ -451,7 +478,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
return now;
}
@@ -1198,11 +1210,11 @@ struct timespec get_monotonic_coarse(voi
@@ -1198,11 +1210,11 @@ struct timespec get_monotonic_coarse(void)
unsigned long seq;
do {
@ -465,7 +492,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
set_normalized_timespec(&now, now.tv_sec + mono.tv_sec,
now.tv_nsec + mono.tv_nsec);
@@ -1234,11 +1246,11 @@ void get_xtime_and_monotonic_and_sleep_o
@@ -1234,11 +1246,11 @@ void get_xtime_and_monotonic_and_sleep_offset(struct timespec *xtim,
unsigned long seq;
do {

View File

@ -0,0 +1,66 @@
From 363513520a462b2208bd8fd37a08c198c84d80e2 Mon Sep 17 00:00:00 2001
From: Steven Rostedt <rostedt@goodmis.org>
Date: Thu, 2 Aug 2012 18:56:52 -0400
Subject: [PATCH 282/283] time/rt: Fix up leap-second backport for RT changes
The leap-second backport broke RT, and a few changes had to be done.
1) The second_overflow now encompasses ntp_leap_second, and since
second_overflow is called with the xtime_lock held, we can not take that
lock either.
2) Change ktime_get_update_offsets() to use read_seqcount_begin() instead
of read_seq_begin() (and retry).
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
kernel/time/ntp.c | 6 ------
kernel/time/timekeeping.c | 4 ++--
2 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c
index 09079b7..4b63943 100644
--- a/kernel/time/ntp.c
+++ b/kernel/time/ntp.c
@@ -362,9 +362,6 @@ int second_overflow(unsigned long secs)
int leap = 0;
s64 delta;
- raw_spin_lock(&xtime_lock);
- write_seqcount_begin(&xtime_seq);
-
/*
* Leap second processing. If in leap-insert state at the end of the
* day, the system clock is set back one second; if in leap-delete
@@ -405,9 +402,6 @@ int second_overflow(unsigned long secs)
break;
}
- write_seqcount_end(&xtime_seq);
- raw_spin_unlock(&xtime_lock);
-
/* Bump the maxerror field */
time_maxerror += MAXFREQ / NSEC_PER_USEC;
if (time_maxerror > NTP_PHASE_LIMIT) {
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index 03493fd..991259a 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -1269,7 +1269,7 @@ ktime_t ktime_get_update_offsets(ktime_t *real, ktime_t *boot)
u64 secs, nsecs;
do {
- seq = read_seqbegin(&xtime_lock);
+ seq = read_seqcount_begin(&xtime_seq);
secs = xtime.tv_sec;
nsecs = xtime.tv_nsec;
@@ -1279,7 +1279,7 @@ ktime_t ktime_get_update_offsets(ktime_t *real, ktime_t *boot)
*real = offs_real;
*boot = offs_boot;
- } while (read_seqretry(&xtime_lock, seq));
+ } while (read_seqcount_retry(&xtime_seq, seq));
now = ktime_add_ns(ktime_set(secs, 0), nsecs);
now = ktime_sub(now, *real);

View File

@ -1,19 +1,16 @@
From 214b9416c8681625ff8090fa0d84d2f64c126057 Mon Sep 17 00:00:00 2001
From 0d0416ade8d0737e775738d92836fca39bd088e3 Mon Sep 17 00:00:00 2001
From: Steven Rostedt <srostedt@redhat.com>
Date: Tue, 17 Jul 2012 21:59:04 -0400
Subject: [PATCH 282/282] Linux 3.2.23-rt37 REBASE
Subject: [PATCH 283/283] Linux 3.2.24-rt38 REBASE
---
localversion-rt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/localversion-rt b/localversion-rt
index b2111a2..a3b2408 100644
index b2111a2..49bae8d 100644
--- a/localversion-rt
+++ b/localversion-rt
@@ -1 +1 @@
--rt24
+-rt37
--
1.7.10
+-rt38

View File

@ -0,0 +1,16 @@
From 69ebd1210e5fc6535320c9da4c6196b95fa0668c Mon Sep 17 00:00:00 2001
From: Steven Rostedt <srostedt@redhat.com>
Date: Mon, 6 Aug 2012 19:43:11 -0400
Subject: [PATCH] Linux 3.2.26-rt39
---
localversion-rt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/localversion-rt b/localversion-rt
index 49bae8d..5498386 100644
--- a/localversion-rt
+++ b/localversion-rt
@@ -1 +1 @@
--rt38
+-rt39

View File

@ -273,4 +273,6 @@
0277-perf-Make-swevent-hrtimer-run-in-irq-instead-of-soft.patch
0278-cpu-rt-Rework-cpu-down-for-PREEMPT_RT.patch
0279-cpu-rt-Fix-cpu_hotplug-variable-initialization.patch
0282-Linux-3.2.23-rt37-REBASE.patch
0282-time-rt-Fix-up-leap-second-backport-for-RT-changes.patch
0283-Linux-3.2.24-rt38-REBASE.patch
0284-Linux-3.2.26-rt39.patch

View File

@ -273,4 +273,6 @@ features/all/rt/0276-fs-jbd-pull-your-plug-when-waiting-for-space.patch
features/all/rt/0277-perf-Make-swevent-hrtimer-run-in-irq-instead-of-soft.patch
features/all/rt/0278-cpu-rt-Rework-cpu-down-for-PREEMPT_RT.patch
features/all/rt/0279-cpu-rt-Fix-cpu_hotplug-variable-initialization.patch
features/all/rt/0282-Linux-3.2.23-rt37-REBASE.patch
features/all/rt/0282-time-rt-Fix-up-leap-second-backport-for-RT-changes.patch
features/all/rt/0283-Linux-3.2.24-rt38-REBASE.patch
features/all/rt/0284-Linux-3.2.26-rt39.patch