Gentoo Archives: gentoo-commits

From: "Daniel Drake (dsd)" <dsd@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] linux-patches r1378 - genpatches-2.6/trunk/2.6.26
Date: Wed, 19 Nov 2008 11:07:47
Message-Id: E1L2kuP-0006vT-Gp@stork.gentoo.org
1 Author: dsd
2 Date: 2008-11-19 11:07:39 +0000 (Wed, 19 Nov 2008)
3 New Revision: 1378
4
5 Added:
6 genpatches-2.6/trunk/2.6.26/2905_clockevents-resume-regression.patch
7 Modified:
8 genpatches-2.6/trunk/2.6.26/0000_README
9 Log:
10 Fix clockevents-related resume regression, thanks to Olivier Crete in bug #245927
11
12 Modified: genpatches-2.6/trunk/2.6.26/0000_README
13 ===================================================================
14 --- genpatches-2.6/trunk/2.6.26/0000_README 2008-11-17 15:04:33 UTC (rev 1377)
15 +++ genpatches-2.6/trunk/2.6.26/0000_README 2008-11-19 11:07:39 UTC (rev 1378)
16 @@ -39,33 +39,33 @@
17 Individual Patch Descriptions:
18 --------------------------------------------------------------------------
19
20 -Patch: 1000_linux-2.6.26.1.patch
21 -From: http://www.kernel.org
22 -Desc: Linux 2.6.26.1
23 +Patch: 1000_linux-2.6.26.1.patch
24 +From: http://www.kernel.org
25 +Desc: Linux 2.6.26.1
26
27 -Patch: 1001_linux-2.6.26.2.patch
28 -From: http://www.kernel.org
29 -Desc: Linux 2.6.26.2
30 +Patch: 1001_linux-2.6.26.2.patch
31 +From: http://www.kernel.org
32 +Desc: Linux 2.6.26.2
33
34 -Patch: 1002_linux-2.6.26.3.patch
35 -From: http://www.kernel.org
36 -Desc: Linux 2.6.26.3
37 +Patch: 1002_linux-2.6.26.3.patch
38 +From: http://www.kernel.org
39 +Desc: Linux 2.6.26.3
40
41 -Patch: 1003_linux-2.6.26.4.patch
42 -From: http://www.kernel.org
43 -Desc: Linux 2.6.26.4
44 +Patch: 1003_linux-2.6.26.4.patch
45 +From: http://www.kernel.org
46 +Desc: Linux 2.6.26.4
47
48 -Patch: 1004_linux-2.6.26.5.patch
49 -From: http://www.kernel.org
50 -Desc: Linux 2.6.26.5
51 +Patch: 1004_linux-2.6.26.5.patch
52 +From: http://www.kernel.org
53 +Desc: Linux 2.6.26.5
54
55 -Patch: 1005_linux-2.6.26.6.patch
56 -From: http://www.kernel.org
57 -Desc: Linux 2.6.26.6
58 +Patch: 1005_linux-2.6.26.6.patch
59 +From: http://www.kernel.org
60 +Desc: Linux 2.6.26.6
61
62 -Patch: 1502_wan-sbni_ioctl-add-missing-capability-checks.patch
63 -From: http://www.kernel.org
64 -Desc: Adds missing capability checks in drivers/net/wan/sbni.c -> sbni_ioctl()
65 +Patch: 1502_wan-sbni_ioctl-add-missing-capability-checks.patch
66 +From: http://www.kernel.org
67 +Desc: Adds missing capability checks in drivers/net/wan/sbni.c -> sbni_ioctl()
68
69 Patch: 1900_UTC-timestamp-option.patch
70 From: http://bugs.gentoo.org/233307
71 @@ -79,6 +79,10 @@
72 From: http://www.kernel.org
73 Desc: Makefile patch
74
75 +Patch: 2905_clockevents-resume-regression.patch
76 +From: http://bugs.gentoo.org/245927
77 +Desc: Fix clockevents-related resume regression
78 +
79 Patch: 4105_dm-bbr.patch
80 From: EVMS 2.5.2
81 Desc: Bad block relocation support for LiveCD users
82
83 Added: genpatches-2.6/trunk/2.6.26/2905_clockevents-resume-regression.patch
84 ===================================================================
85 --- genpatches-2.6/trunk/2.6.26/2905_clockevents-resume-regression.patch (rev 0)
86 +++ genpatches-2.6/trunk/2.6.26/2905_clockevents-resume-regression.patch 2008-11-19 11:07:39 UTC (rev 1378)
87 @@ -0,0 +1,135 @@
88 +
89 +Revert 2 patches to fix https://bugs.gentoo.org/show_bug.cgi?id=245927
90 +
91 +From: Thomas Gleixner <tglx@××××××××××.de>
92 +Date: Sat, 6 Sep 2008 01:01:45 +0000 (+0200)
93 +Subject: clockevents: broadcast fixup possible waiters
94 +X-Git-Tag: v2.6.26.6~27
95 +X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fstable%2Flinux-2.6-stable.git;a=commitdiff_plain;h=92741d2d653769b582015c6a379e7b46e113435d
96 +
97 +clockevents: broadcast fixup possible waiters
98 +
99 +commit 7300711e8c6824fcfbd42a126980ff50439d8dd0 upstream
100 +
101 +Until the C1E patches arrived there where no users of periodic broadcast
102 +before switching to oneshot mode. Now we need to trigger a possible
103 +waiter for a periodic broadcast when switching to oneshot mode.
104 +Otherwise we can starve them for ever.
105 +
106 +
107 +
108 +and
109 +
110 +
111 +From: Thomas Gleixner <tglx@××××××××××.de>
112 +Date: Wed, 3 Sep 2008 21:37:08 +0000 (+0000)
113 +Subject: clockevents: prevent multiple init/shutdown
114 +X-Git-Tag: v2.6.26.6~30
115 +X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fstable%2Flinux-2.6-stable.git;a=commitdiff_plain;h=7f0a673a75d3f9f50a64f83055b71be67526efd7
116 +
117 +clockevents: prevent multiple init/shutdown
118 +
119 +commit 9c17bcda991000351cb2373f78be7e4b1c44caa3 upstream
120 +
121 +While chasing the C1E/HPET bugreports I went through the clock events
122 +code inch by inch and found that the broadcast device can be initialized
123 +and shutdown multiple times. Multiple shutdowns are not critical, but
124 +useless waste of time. Multiple initializations are simply broken. Another
125 +CPU might have the device in use already after the first initialization and
126 +the second init could just render it unusable again.
127 +
128 +
129 +
130 +
131 +Index: linux-2.6.26-gentoo-r3/kernel/time/tick-broadcast.c
132 +===================================================================
133 +--- linux-2.6.26-gentoo-r3.orig/kernel/time/tick-broadcast.c
134 ++++ linux-2.6.26-gentoo-r3/kernel/time/tick-broadcast.c
135 +@@ -209,7 +209,7 @@ static void tick_do_broadcast_on_off(voi
136 + struct clock_event_device *bc, *dev;
137 + struct tick_device *td;
138 + unsigned long flags, *reason = why;
139 +- int cpu, bc_stopped;
140 ++ int cpu;
141 +
142 + spin_lock_irqsave(&tick_broadcast_lock, flags);
143 +
144 +@@ -227,8 +227,6 @@ static void tick_do_broadcast_on_off(voi
145 + if (!tick_device_is_functional(dev))
146 + goto out;
147 +
148 +- bc_stopped = cpus_empty(tick_broadcast_mask);
149 +-
150 + switch (*reason) {
151 + case CLOCK_EVT_NOTIFY_BROADCAST_ON:
152 + case CLOCK_EVT_NOTIFY_BROADCAST_FORCE:
153 +@@ -250,10 +248,9 @@ static void tick_do_broadcast_on_off(voi
154 + break;
155 + }
156 +
157 +- if (cpus_empty(tick_broadcast_mask)) {
158 +- if (!bc_stopped)
159 +- clockevents_set_mode(bc, CLOCK_EVT_MODE_SHUTDOWN);
160 +- } else if (bc_stopped) {
161 ++ if (cpus_empty(tick_broadcast_mask))
162 ++ clockevents_set_mode(bc, CLOCK_EVT_MODE_SHUTDOWN);
163 ++ else {
164 + if (tick_broadcast_device.mode == TICKDEV_MODE_PERIODIC)
165 + tick_broadcast_start_periodic(bc);
166 + else
167 +@@ -490,52 +487,14 @@ static void tick_broadcast_clear_oneshot
168 + cpu_clear(cpu, tick_broadcast_oneshot_mask);
169 + }
170 +
171 +-static void tick_broadcast_init_next_event(cpumask_t *mask, ktime_t expires)
172 +-{
173 +- struct tick_device *td;
174 +- int cpu;
175 +-
176 +- for_each_cpu_mask_nr(cpu, *mask) {
177 +- td = &per_cpu(tick_cpu_device, cpu);
178 +- if (td->evtdev)
179 +- td->evtdev->next_event = expires;
180 +- }
181 +-}
182 +-
183 + /**
184 + * tick_broadcast_setup_oneshot - setup the broadcast device
185 + */
186 + void tick_broadcast_setup_oneshot(struct clock_event_device *bc)
187 + {
188 +- /* Set it up only once ! */
189 +- if (bc->event_handler != tick_handle_oneshot_broadcast) {
190 +- int was_periodic = bc->mode == CLOCK_EVT_MODE_PERIODIC;
191 +- int cpu = smp_processor_id();
192 +- cpumask_t mask;
193 +-
194 +- bc->event_handler = tick_handle_oneshot_broadcast;
195 +- clockevents_set_mode(bc, CLOCK_EVT_MODE_ONESHOT);
196 +-
197 +- /* Take the do_timer update */
198 +- tick_do_timer_cpu = cpu;
199 +-
200 +- /*
201 +- * We must be careful here. There might be other CPUs
202 +- * waiting for periodic broadcast. We need to set the
203 +- * oneshot_mask bits for those and program the
204 +- * broadcast device to fire.
205 +- */
206 +- mask = tick_broadcast_mask;
207 +- cpu_clear(cpu, mask);
208 +- cpus_or(tick_broadcast_oneshot_mask,
209 +- tick_broadcast_oneshot_mask, mask);
210 +-
211 +- if (was_periodic && !cpus_empty(mask)) {
212 +- tick_broadcast_init_next_event(&mask, tick_next_period);
213 +- tick_broadcast_set_event(tick_next_period, 1);
214 +- } else
215 +- bc->next_event.tv64 = KTIME_MAX;
216 +- }
217 ++ bc->event_handler = tick_handle_oneshot_broadcast;
218 ++ clockevents_set_mode(bc, CLOCK_EVT_MODE_ONESHOT);
219 ++ bc->next_event.tv64 = KTIME_MAX;
220 + }
221 +
222 + /*