/[linux-patches]/genpatches-2.6/tags/3.0-30/1021_linux-3.0.22.patch
Gentoo

Contents of /genpatches-2.6/tags/3.0-30/1021_linux-3.0.22.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2206 - (show annotations) (download)
Mon Sep 17 18:58:14 2012 UTC (2 years ago) by mpagano
File size: 12697 byte(s)
3.0-30 release
1 diff --git a/Makefile b/Makefile
2 index d5f0598..a5b2253 100644
3 --- a/Makefile
4 +++ b/Makefile
5 @@ -1,6 +1,6 @@
6 VERSION = 3
7 PATCHLEVEL = 0
8 -SUBLEVEL = 21
9 +SUBLEVEL = 22
10 EXTRAVERSION =
11 NAME = Sneaky Weasel
12
13 diff --git a/arch/x86/pci/xen.c b/arch/x86/pci/xen.c
14 index f567965..6e96e65 100644
15 --- a/arch/x86/pci/xen.c
16 +++ b/arch/x86/pci/xen.c
17 @@ -308,7 +308,7 @@ int __init pci_xen_init(void)
18
19 int __init pci_xen_hvm_init(void)
20 {
21 - if (!xen_feature(XENFEAT_hvm_pirqs))
22 + if (!xen_have_vector_callback || !xen_feature(XENFEAT_hvm_pirqs))
23 return 0;
24
25 #ifdef CONFIG_ACPI
26 diff --git a/crypto/sha512_generic.c b/crypto/sha512_generic.c
27 index 88f160b..107f6f7 100644
28 --- a/crypto/sha512_generic.c
29 +++ b/crypto/sha512_generic.c
30 @@ -31,11 +31,6 @@ static inline u64 Maj(u64 x, u64 y, u64 z)
31 return (x & y) | (z & (x | y));
32 }
33
34 -static inline u64 RORu64(u64 x, u64 y)
35 -{
36 - return (x >> y) | (x << (64 - y));
37 -}
38 -
39 static const u64 sha512_K[80] = {
40 0x428a2f98d728ae22ULL, 0x7137449123ef65cdULL, 0xb5c0fbcfec4d3b2fULL,
41 0xe9b5dba58189dbbcULL, 0x3956c25bf348b538ULL, 0x59f111f1b605d019ULL,
42 @@ -66,10 +61,10 @@ static const u64 sha512_K[80] = {
43 0x5fcb6fab3ad6faecULL, 0x6c44198c4a475817ULL,
44 };
45
46 -#define e0(x) (RORu64(x,28) ^ RORu64(x,34) ^ RORu64(x,39))
47 -#define e1(x) (RORu64(x,14) ^ RORu64(x,18) ^ RORu64(x,41))
48 -#define s0(x) (RORu64(x, 1) ^ RORu64(x, 8) ^ (x >> 7))
49 -#define s1(x) (RORu64(x,19) ^ RORu64(x,61) ^ (x >> 6))
50 +#define e0(x) (ror64(x,28) ^ ror64(x,34) ^ ror64(x,39))
51 +#define e1(x) (ror64(x,14) ^ ror64(x,18) ^ ror64(x,41))
52 +#define s0(x) (ror64(x, 1) ^ ror64(x, 8) ^ (x >> 7))
53 +#define s1(x) (ror64(x,19) ^ ror64(x,61) ^ (x >> 6))
54
55 static inline void LOAD_OP(int I, u64 *W, const u8 *input)
56 {
57 @@ -78,7 +73,7 @@ static inline void LOAD_OP(int I, u64 *W, const u8 *input)
58
59 static inline void BLEND_OP(int I, u64 *W)
60 {
61 - W[I % 16] += s1(W[(I-2) % 16]) + W[(I-7) % 16] + s0(W[(I-15) % 16]);
62 + W[I & 15] += s1(W[(I-2) & 15]) + W[(I-7) & 15] + s0(W[(I-15) & 15]);
63 }
64
65 static void
66 @@ -89,46 +84,42 @@ sha512_transform(u64 *state, const u8 *input)
67 int i;
68 u64 W[16];
69
70 - /* load the input */
71 - for (i = 0; i < 16; i++)
72 - LOAD_OP(i, W, input);
73 -
74 /* load the state into our registers */
75 a=state[0]; b=state[1]; c=state[2]; d=state[3];
76 e=state[4]; f=state[5]; g=state[6]; h=state[7];
77
78 -#define SHA512_0_15(i, a, b, c, d, e, f, g, h) \
79 - t1 = h + e1(e) + Ch(e, f, g) + sha512_K[i] + W[i]; \
80 - t2 = e0(a) + Maj(a, b, c); \
81 - d += t1; \
82 - h = t1 + t2
83 -
84 -#define SHA512_16_79(i, a, b, c, d, e, f, g, h) \
85 - BLEND_OP(i, W); \
86 - t1 = h + e1(e) + Ch(e, f, g) + sha512_K[i] + W[(i)%16]; \
87 - t2 = e0(a) + Maj(a, b, c); \
88 - d += t1; \
89 - h = t1 + t2
90 -
91 - for (i = 0; i < 16; i += 8) {
92 - SHA512_0_15(i, a, b, c, d, e, f, g, h);
93 - SHA512_0_15(i + 1, h, a, b, c, d, e, f, g);
94 - SHA512_0_15(i + 2, g, h, a, b, c, d, e, f);
95 - SHA512_0_15(i + 3, f, g, h, a, b, c, d, e);
96 - SHA512_0_15(i + 4, e, f, g, h, a, b, c, d);
97 - SHA512_0_15(i + 5, d, e, f, g, h, a, b, c);
98 - SHA512_0_15(i + 6, c, d, e, f, g, h, a, b);
99 - SHA512_0_15(i + 7, b, c, d, e, f, g, h, a);
100 - }
101 - for (i = 16; i < 80; i += 8) {
102 - SHA512_16_79(i, a, b, c, d, e, f, g, h);
103 - SHA512_16_79(i + 1, h, a, b, c, d, e, f, g);
104 - SHA512_16_79(i + 2, g, h, a, b, c, d, e, f);
105 - SHA512_16_79(i + 3, f, g, h, a, b, c, d, e);
106 - SHA512_16_79(i + 4, e, f, g, h, a, b, c, d);
107 - SHA512_16_79(i + 5, d, e, f, g, h, a, b, c);
108 - SHA512_16_79(i + 6, c, d, e, f, g, h, a, b);
109 - SHA512_16_79(i + 7, b, c, d, e, f, g, h, a);
110 + /* now iterate */
111 + for (i=0; i<80; i+=8) {
112 + if (!(i & 8)) {
113 + int j;
114 +
115 + if (i < 16) {
116 + /* load the input */
117 + for (j = 0; j < 16; j++)
118 + LOAD_OP(i + j, W, input);
119 + } else {
120 + for (j = 0; j < 16; j++) {
121 + BLEND_OP(i + j, W);
122 + }
123 + }
124 + }
125 +
126 + t1 = h + e1(e) + Ch(e,f,g) + sha512_K[i ] + W[(i & 15)];
127 + t2 = e0(a) + Maj(a,b,c); d+=t1; h=t1+t2;
128 + t1 = g + e1(d) + Ch(d,e,f) + sha512_K[i+1] + W[(i & 15) + 1];
129 + t2 = e0(h) + Maj(h,a,b); c+=t1; g=t1+t2;
130 + t1 = f + e1(c) + Ch(c,d,e) + sha512_K[i+2] + W[(i & 15) + 2];
131 + t2 = e0(g) + Maj(g,h,a); b+=t1; f=t1+t2;
132 + t1 = e + e1(b) + Ch(b,c,d) + sha512_K[i+3] + W[(i & 15) + 3];
133 + t2 = e0(f) + Maj(f,g,h); a+=t1; e=t1+t2;
134 + t1 = d + e1(a) + Ch(a,b,c) + sha512_K[i+4] + W[(i & 15) + 4];
135 + t2 = e0(e) + Maj(e,f,g); h+=t1; d=t1+t2;
136 + t1 = c + e1(h) + Ch(h,a,b) + sha512_K[i+5] + W[(i & 15) + 5];
137 + t2 = e0(d) + Maj(d,e,f); g+=t1; c=t1+t2;
138 + t1 = b + e1(g) + Ch(g,h,a) + sha512_K[i+6] + W[(i & 15) + 6];
139 + t2 = e0(c) + Maj(c,d,e); f+=t1; b=t1+t2;
140 + t1 = a + e1(f) + Ch(f,g,h) + sha512_K[i+7] + W[(i & 15) + 7];
141 + t2 = e0(b) + Maj(b,c,d); e+=t1; a=t1+t2;
142 }
143
144 state[0] += a; state[1] += b; state[2] += c; state[3] += d;
145 diff --git a/drivers/gpio/pca953x.c b/drivers/gpio/pca953x.c
146 index 0451d7a..532f690 100644
147 --- a/drivers/gpio/pca953x.c
148 +++ b/drivers/gpio/pca953x.c
149 @@ -437,7 +437,7 @@ static irqreturn_t pca953x_irq_handler(int irq, void *devid)
150
151 do {
152 level = __ffs(pending);
153 - generic_handle_irq(level + chip->irq_base);
154 + handle_nested_irq(level + chip->irq_base);
155
156 pending &= ~(1 << level);
157 } while (pending);
158 @@ -481,8 +481,8 @@ static int pca953x_irq_setup(struct pca953x_chip *chip,
159 int irq = lvl + chip->irq_base;
160
161 irq_set_chip_data(irq, chip);
162 - irq_set_chip_and_handler(irq, &pca953x_irq_chip,
163 - handle_simple_irq);
164 + irq_set_chip(irq, &pca953x_irq_chip);
165 + irq_set_nested_thread(irq, true);
166 #ifdef CONFIG_ARM
167 set_irq_flags(irq, IRQF_VALID);
168 #else
169 diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
170 index b28f7bd..21257f8 100644
171 --- a/drivers/gpu/drm/i915/intel_lvds.c
172 +++ b/drivers/gpu/drm/i915/intel_lvds.c
173 @@ -714,6 +714,14 @@ static const struct dmi_system_id intel_no_lvds[] = {
174 },
175 {
176 .callback = intel_no_lvds_dmi_callback,
177 + .ident = "AOpen i45GMx-I",
178 + .matches = {
179 + DMI_MATCH(DMI_BOARD_VENDOR, "AOpen"),
180 + DMI_MATCH(DMI_BOARD_NAME, "i45GMx-I"),
181 + },
182 + },
183 + {
184 + .callback = intel_no_lvds_dmi_callback,
185 .ident = "Aopen i945GTt-VFA",
186 .matches = {
187 DMI_MATCH(DMI_PRODUCT_VERSION, "AO00001JW"),
188 diff --git a/drivers/hwmon/f75375s.c b/drivers/hwmon/f75375s.c
189 index 95cbfb3..e4ab491 100644
190 --- a/drivers/hwmon/f75375s.c
191 +++ b/drivers/hwmon/f75375s.c
192 @@ -159,7 +159,7 @@ static inline void f75375_write8(struct i2c_client *client, u8 reg,
193 static inline void f75375_write16(struct i2c_client *client, u8 reg,
194 u16 value)
195 {
196 - int err = i2c_smbus_write_byte_data(client, reg, (value << 8));
197 + int err = i2c_smbus_write_byte_data(client, reg, (value >> 8));
198 if (err)
199 return;
200 i2c_smbus_write_byte_data(client, reg + 1, (value & 0xFF));
201 @@ -311,7 +311,7 @@ static int set_pwm_enable_direct(struct i2c_client *client, int nr, int val)
202 fanmode |= (3 << FAN_CTRL_MODE(nr));
203 break;
204 case 2: /* AUTOMATIC*/
205 - fanmode |= (2 << FAN_CTRL_MODE(nr));
206 + fanmode |= (1 << FAN_CTRL_MODE(nr));
207 break;
208 case 3: /* fan speed */
209 break;
210 diff --git a/include/linux/bitops.h b/include/linux/bitops.h
211 index a3ef66a..fc8a3ff 100644
212 --- a/include/linux/bitops.h
213 +++ b/include/linux/bitops.h
214 @@ -50,6 +50,26 @@ static inline unsigned long hweight_long(unsigned long w)
215 }
216
217 /**
218 + * rol64 - rotate a 64-bit value left
219 + * @word: value to rotate
220 + * @shift: bits to roll
221 + */
222 +static inline __u64 rol64(__u64 word, unsigned int shift)
223 +{
224 + return (word << shift) | (word >> (64 - shift));
225 +}
226 +
227 +/**
228 + * ror64 - rotate a 64-bit value right
229 + * @word: value to rotate
230 + * @shift: bits to roll
231 + */
232 +static inline __u64 ror64(__u64 word, unsigned int shift)
233 +{
234 + return (word >> shift) | (word << (64 - shift));
235 +}
236 +
237 +/**
238 * rol32 - rotate a 32-bit value left
239 * @word: value to rotate
240 * @shift: bits to roll
241 diff --git a/include/linux/proportions.h b/include/linux/proportions.h
242 index cf793bb..22653d7 100644
243 --- a/include/linux/proportions.h
244 +++ b/include/linux/proportions.h
245 @@ -81,7 +81,11 @@ void prop_inc_percpu(struct prop_descriptor *pd, struct prop_local_percpu *pl)
246 * Limit the time part in order to ensure there are some bits left for the
247 * cycle counter and fraction multiply.
248 */
249 +#if BITS_PER_LONG == 32
250 #define PROP_MAX_SHIFT (3*BITS_PER_LONG/4)
251 +#else
252 +#define PROP_MAX_SHIFT (BITS_PER_LONG/2)
253 +#endif
254
255 #define PROP_FRAC_SHIFT (BITS_PER_LONG - PROP_MAX_SHIFT - 1)
256 #define PROP_FRAC_BASE (1UL << PROP_FRAC_SHIFT)
257 diff --git a/include/trace/events/writeback.h b/include/trace/events/writeback.h
258 index 4e249b9..9b60c6f 100644
259 --- a/include/trace/events/writeback.h
260 +++ b/include/trace/events/writeback.h
261 @@ -23,7 +23,10 @@ DECLARE_EVENT_CLASS(writeback_work_class,
262 __field(int, for_background)
263 ),
264 TP_fast_assign(
265 - strncpy(__entry->name, dev_name(bdi->dev), 32);
266 + struct device *dev = bdi->dev;
267 + if (!dev)
268 + dev = default_backing_dev_info.dev;
269 + strncpy(__entry->name, dev_name(dev), 32);
270 __entry->nr_pages = work->nr_pages;
271 __entry->sb_dev = work->sb ? work->sb->s_dev : 0;
272 __entry->sync_mode = work->sync_mode;
273 diff --git a/kernel/relay.c b/kernel/relay.c
274 index 859ea5a..2c242fb 100644
275 --- a/kernel/relay.c
276 +++ b/kernel/relay.c
277 @@ -164,10 +164,14 @@ depopulate:
278 */
279 static struct rchan_buf *relay_create_buf(struct rchan *chan)
280 {
281 - struct rchan_buf *buf = kzalloc(sizeof(struct rchan_buf), GFP_KERNEL);
282 - if (!buf)
283 + struct rchan_buf *buf;
284 +
285 + if (chan->n_subbufs > UINT_MAX / sizeof(size_t *))
286 return NULL;
287
288 + buf = kzalloc(sizeof(struct rchan_buf), GFP_KERNEL);
289 + if (!buf)
290 + return NULL;
291 buf->padding = kmalloc(chan->n_subbufs * sizeof(size_t *), GFP_KERNEL);
292 if (!buf->padding)
293 goto free_buf;
294 @@ -574,6 +578,8 @@ struct rchan *relay_open(const char *base_filename,
295
296 if (!(subbuf_size && n_subbufs))
297 return NULL;
298 + if (subbuf_size > UINT_MAX / n_subbufs)
299 + return NULL;
300
301 chan = kzalloc(sizeof(struct rchan), GFP_KERNEL);
302 if (!chan)
303 diff --git a/mm/slub.c b/mm/slub.c
304 index 35f351f..0d0901e 100644
305 --- a/mm/slub.c
306 +++ b/mm/slub.c
307 @@ -1818,6 +1818,11 @@ static void *__slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node,
308 if (unlikely(!node_match(c, node)))
309 goto another_slab;
310
311 + /* must check again c->freelist in case of cpu migration or IRQ */
312 + object = c->freelist;
313 + if (object)
314 + goto update_freelist;
315 +
316 stat(s, ALLOC_REFILL);
317
318 load_freelist:
319 @@ -1827,6 +1832,7 @@ load_freelist:
320 if (kmem_cache_debug(s))
321 goto debug;
322
323 +update_freelist:
324 c->freelist = get_freepointer(s, object);
325 page->inuse = page->objects;
326 page->freelist = NULL;
327 diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
328 index 378bd67..4100065 100644
329 --- a/net/mac80211/rx.c
330 +++ b/net/mac80211/rx.c
331 @@ -610,7 +610,7 @@ static void ieee80211_sta_reorder_release(struct ieee80211_hw *hw,
332 index = seq_sub(tid_agg_rx->head_seq_num, tid_agg_rx->ssn) %
333 tid_agg_rx->buf_size;
334 if (!tid_agg_rx->reorder_buf[index] &&
335 - tid_agg_rx->stored_mpdu_num > 1) {
336 + tid_agg_rx->stored_mpdu_num) {
337 /*
338 * No buffers ready to be released, but check whether any
339 * frames in the reorder buffer have timed out.
340 diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c
341 index 6c896db..2e799a9 100644
342 --- a/sound/pci/intel8x0.c
343 +++ b/sound/pci/intel8x0.c
344 @@ -2076,6 +2076,12 @@ static struct ac97_quirk ac97_quirks[] __devinitdata = {
345 },
346 {
347 .subvendor = 0x161f,
348 + .subdevice = 0x202f,
349 + .name = "Gateway M520",
350 + .type = AC97_TUNE_INV_EAPD
351 + },
352 + {
353 + .subvendor = 0x161f,
354 .subdevice = 0x203a,
355 .name = "Gateway 4525GZ", /* AD1981B */
356 .type = AC97_TUNE_INV_EAPD
357 diff --git a/tools/perf/bench/mem-memcpy-x86-64-asm.S b/tools/perf/bench/mem-memcpy-x86-64-asm.S
358 index a57b66e..185a96d 100644
359 --- a/tools/perf/bench/mem-memcpy-x86-64-asm.S
360 +++ b/tools/perf/bench/mem-memcpy-x86-64-asm.S
361 @@ -1,2 +1,8 @@
362
363 #include "../../../arch/x86/lib/memcpy_64.S"
364 +/*
365 + * We need to provide note.GNU-stack section, saying that we want
366 + * NOT executable stack. Otherwise the final linking will assume that
367 + * the ELF stack should not be restricted at all and set it RWX.
368 + */
369 +.section .note.GNU-stack,"",@progbits
370 diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
371 index 0239eb8..ad2183c 100644
372 --- a/tools/perf/util/evsel.c
373 +++ b/tools/perf/util/evsel.c
374 @@ -348,6 +348,7 @@ int perf_event__parse_sample(const union perf_event *event, u64 type,
375
376 data->cpu = data->pid = data->tid = -1;
377 data->stream_id = data->id = data->time = -1ULL;
378 + data->period = 1;
379
380 if (event->header.type != PERF_RECORD_SAMPLE) {
381 if (!sample_id_all)

  ViewVC Help
Powered by ViewVC 1.1.20