Magellan Linux

Annotation of /trunk/kernel-alx/patches-3.14/0114-3.14.15-all-fixes.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2506 - (hide annotations) (download)
Fri Oct 17 07:55:45 2014 UTC (9 years, 8 months ago) by niro
File size: 28288 byte(s)
-patches for 3.14
1 niro 2506 diff --git a/Makefile b/Makefile
2     index 230c7f694ab7..188523e9e880 100644
3     --- a/Makefile
4     +++ b/Makefile
5     @@ -1,6 +1,6 @@
6     VERSION = 3
7     PATCHLEVEL = 14
8     -SUBLEVEL = 14
9     +SUBLEVEL = 15
10     EXTRAVERSION =
11     NAME = Remembering Coco
12    
13     @@ -639,6 +639,8 @@ KBUILD_CFLAGS += -fomit-frame-pointer
14     endif
15     endif
16    
17     +KBUILD_CFLAGS += $(call cc-option, -fno-var-tracking-assignments)
18     +
19     ifdef CONFIG_DEBUG_INFO
20     KBUILD_CFLAGS += -g
21     KBUILD_AFLAGS += -Wa,--gdwarf-2
22     diff --git a/arch/parisc/include/uapi/asm/signal.h b/arch/parisc/include/uapi/asm/signal.h
23     index a2fa297196bc..f5645d6a89f2 100644
24     --- a/arch/parisc/include/uapi/asm/signal.h
25     +++ b/arch/parisc/include/uapi/asm/signal.h
26     @@ -69,8 +69,6 @@
27     #define SA_NOMASK SA_NODEFER
28     #define SA_ONESHOT SA_RESETHAND
29    
30     -#define SA_RESTORER 0x04000000 /* obsolete -- ignored */
31     -
32     #define MINSIGSTKSZ 2048
33     #define SIGSTKSZ 8192
34    
35     diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c
36     index a48bc79a111f..184d305af3e7 100644
37     --- a/arch/s390/kernel/ptrace.c
38     +++ b/arch/s390/kernel/ptrace.c
39     @@ -323,9 +323,14 @@ static int __poke_user(struct task_struct *child, addr_t addr, addr_t data)
40     unsigned long mask = PSW_MASK_USER;
41    
42     mask |= is_ri_task(child) ? PSW_MASK_RI : 0;
43     - if ((data & ~mask) != PSW_USER_BITS)
44     + if ((data ^ PSW_USER_BITS) & ~mask)
45     + /* Invalid psw mask. */
46     + return -EINVAL;
47     + if ((data & PSW_MASK_ASC) == PSW_ASC_HOME)
48     + /* Invalid address-space-control bits */
49     return -EINVAL;
50     if ((data & PSW_MASK_EA) && !(data & PSW_MASK_BA))
51     + /* Invalid addressing mode bits */
52     return -EINVAL;
53     }
54     *(addr_t *)((addr_t) &task_pt_regs(child)->psw + addr) = data;
55     @@ -661,9 +666,12 @@ static int __poke_user_compat(struct task_struct *child,
56    
57     mask |= is_ri_task(child) ? PSW32_MASK_RI : 0;
58     /* Build a 64 bit psw mask from 31 bit mask. */
59     - if ((tmp & ~mask) != PSW32_USER_BITS)
60     + if ((tmp ^ PSW32_USER_BITS) & ~mask)
61     /* Invalid psw mask. */
62     return -EINVAL;
63     + if ((data & PSW32_MASK_ASC) == PSW32_ASC_HOME)
64     + /* Invalid address-space-control bits */
65     + return -EINVAL;
66     regs->psw.mask = (regs->psw.mask & ~PSW_MASK_USER) |
67     (regs->psw.mask & PSW_MASK_BA) |
68     (__u64)(tmp & mask) << 32;
69     diff --git a/arch/x86/boot/header.S b/arch/x86/boot/header.S
70     index ec3b8ba68096..04da6c2194ba 100644
71     --- a/arch/x86/boot/header.S
72     +++ b/arch/x86/boot/header.S
73     @@ -91,10 +91,9 @@ bs_die:
74    
75     .section ".bsdata", "a"
76     bugger_off_msg:
77     - .ascii "Direct floppy boot is not supported. "
78     - .ascii "Use a boot loader program instead.\r\n"
79     + .ascii "Use a boot loader.\r\n"
80     .ascii "\n"
81     - .ascii "Remove disk and press any key to reboot ...\r\n"
82     + .ascii "Remove disk and press any key to reboot...\r\n"
83     .byte 0
84    
85     #ifdef CONFIG_EFI_STUB
86     @@ -108,7 +107,7 @@ coff_header:
87     #else
88     .word 0x8664 # x86-64
89     #endif
90     - .word 3 # nr_sections
91     + .word 4 # nr_sections
92     .long 0 # TimeDateStamp
93     .long 0 # PointerToSymbolTable
94     .long 1 # NumberOfSymbols
95     @@ -250,6 +249,25 @@ section_table:
96     .word 0 # NumberOfLineNumbers
97     .long 0x60500020 # Characteristics (section flags)
98    
99     + #
100     + # The offset & size fields are filled in by build.c.
101     + #
102     + .ascii ".bss"
103     + .byte 0
104     + .byte 0
105     + .byte 0
106     + .byte 0
107     + .long 0
108     + .long 0x0
109     + .long 0 # Size of initialized data
110     + # on disk
111     + .long 0x0
112     + .long 0 # PointerToRelocations
113     + .long 0 # PointerToLineNumbers
114     + .word 0 # NumberOfRelocations
115     + .word 0 # NumberOfLineNumbers
116     + .long 0xc8000080 # Characteristics (section flags)
117     +
118     #endif /* CONFIG_EFI_STUB */
119    
120     # Kernel attributes; used by setup. This is part 1 of the
121     diff --git a/arch/x86/boot/tools/build.c b/arch/x86/boot/tools/build.c
122     index 8e15b22391fc..3dafaeb9f549 100644
123     --- a/arch/x86/boot/tools/build.c
124     +++ b/arch/x86/boot/tools/build.c
125     @@ -142,7 +142,7 @@ static void usage(void)
126    
127     #ifdef CONFIG_EFI_STUB
128    
129     -static void update_pecoff_section_header(char *section_name, u32 offset, u32 size)
130     +static void update_pecoff_section_header_fields(char *section_name, u32 vma, u32 size, u32 datasz, u32 offset)
131     {
132     unsigned int pe_header;
133     unsigned short num_sections;
134     @@ -163,10 +163,10 @@ static void update_pecoff_section_header(char *section_name, u32 offset, u32 siz
135     put_unaligned_le32(size, section + 0x8);
136    
137     /* section header vma field */
138     - put_unaligned_le32(offset, section + 0xc);
139     + put_unaligned_le32(vma, section + 0xc);
140    
141     /* section header 'size of initialised data' field */
142     - put_unaligned_le32(size, section + 0x10);
143     + put_unaligned_le32(datasz, section + 0x10);
144    
145     /* section header 'file offset' field */
146     put_unaligned_le32(offset, section + 0x14);
147     @@ -178,6 +178,11 @@ static void update_pecoff_section_header(char *section_name, u32 offset, u32 siz
148     }
149     }
150    
151     +static void update_pecoff_section_header(char *section_name, u32 offset, u32 size)
152     +{
153     + update_pecoff_section_header_fields(section_name, offset, size, size, offset);
154     +}
155     +
156     static void update_pecoff_setup_and_reloc(unsigned int size)
157     {
158     u32 setup_offset = 0x200;
159     @@ -202,9 +207,6 @@ static void update_pecoff_text(unsigned int text_start, unsigned int file_sz)
160    
161     pe_header = get_unaligned_le32(&buf[0x3c]);
162    
163     - /* Size of image */
164     - put_unaligned_le32(file_sz, &buf[pe_header + 0x50]);
165     -
166     /*
167     * Size of code: Subtract the size of the first sector (512 bytes)
168     * which includes the header.
169     @@ -219,6 +221,22 @@ static void update_pecoff_text(unsigned int text_start, unsigned int file_sz)
170     update_pecoff_section_header(".text", text_start, text_sz);
171     }
172    
173     +static void update_pecoff_bss(unsigned int file_sz, unsigned int init_sz)
174     +{
175     + unsigned int pe_header;
176     + unsigned int bss_sz = init_sz - file_sz;
177     +
178     + pe_header = get_unaligned_le32(&buf[0x3c]);
179     +
180     + /* Size of uninitialized data */
181     + put_unaligned_le32(bss_sz, &buf[pe_header + 0x24]);
182     +
183     + /* Size of image */
184     + put_unaligned_le32(init_sz, &buf[pe_header + 0x50]);
185     +
186     + update_pecoff_section_header_fields(".bss", file_sz, bss_sz, 0, 0);
187     +}
188     +
189     #endif /* CONFIG_EFI_STUB */
190    
191    
192     @@ -270,6 +288,9 @@ int main(int argc, char ** argv)
193     int fd;
194     void *kernel;
195     u32 crc = 0xffffffffUL;
196     +#ifdef CONFIG_EFI_STUB
197     + unsigned int init_sz;
198     +#endif
199    
200     /* Defaults for old kernel */
201     #ifdef CONFIG_X86_32
202     @@ -343,7 +364,9 @@ int main(int argc, char ** argv)
203     put_unaligned_le32(sys_size, &buf[0x1f4]);
204    
205     #ifdef CONFIG_EFI_STUB
206     - update_pecoff_text(setup_sectors * 512, sz + i + ((sys_size * 16) - sz));
207     + update_pecoff_text(setup_sectors * 512, i + (sys_size * 16));
208     + init_sz = get_unaligned_le32(&buf[0x260]);
209     + update_pecoff_bss(i + (sys_size * 16), init_sz);
210    
211     #ifdef CONFIG_X86_64 /* Yes, this is really how we defined it :( */
212     efi_stub_entry -= 0x200;
213     diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S
214     index 6491353cc9aa..c87810b1b557 100644
215     --- a/arch/x86/kernel/entry_32.S
216     +++ b/arch/x86/kernel/entry_32.S
217     @@ -433,8 +433,8 @@ sysenter_do_call:
218     cmpl $(NR_syscalls), %eax
219     jae sysenter_badsys
220     call *sys_call_table(,%eax,4)
221     - movl %eax,PT_EAX(%esp)
222     sysenter_after_call:
223     + movl %eax,PT_EAX(%esp)
224     LOCKDEP_SYS_EXIT
225     DISABLE_INTERRUPTS(CLBR_ANY)
226     TRACE_IRQS_OFF
227     @@ -514,6 +514,7 @@ ENTRY(system_call)
228     jae syscall_badsys
229     syscall_call:
230     call *sys_call_table(,%eax,4)
231     +syscall_after_call:
232     movl %eax,PT_EAX(%esp) # store the return value
233     syscall_exit:
234     LOCKDEP_SYS_EXIT
235     @@ -683,12 +684,12 @@ syscall_fault:
236     END(syscall_fault)
237    
238     syscall_badsys:
239     - movl $-ENOSYS,PT_EAX(%esp)
240     - jmp syscall_exit
241     + movl $-ENOSYS,%eax
242     + jmp syscall_after_call
243     END(syscall_badsys)
244    
245     sysenter_badsys:
246     - movl $-ENOSYS,PT_EAX(%esp)
247     + movl $-ENOSYS,%eax
248     jmp sysenter_after_call
249     END(syscall_badsys)
250     CFI_ENDPROC
251     diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
252     index dd0dd2d4ceca..d8f80e733cf8 100644
253     --- a/block/blk-cgroup.c
254     +++ b/block/blk-cgroup.c
255     @@ -859,6 +859,13 @@ void blkcg_drain_queue(struct request_queue *q)
256     {
257     lockdep_assert_held(q->queue_lock);
258    
259     + /*
260     + * @q could be exiting and already have destroyed all blkgs as
261     + * indicated by NULL root_blkg. If so, don't confuse policies.
262     + */
263     + if (!q->root_blkg)
264     + return;
265     +
266     blk_throtl_drain(q);
267     }
268    
269     diff --git a/block/blk-tag.c b/block/blk-tag.c
270     index 3f33d8672268..a185b86741e5 100644
271     --- a/block/blk-tag.c
272     +++ b/block/blk-tag.c
273     @@ -27,18 +27,15 @@ struct request *blk_queue_find_tag(struct request_queue *q, int tag)
274     EXPORT_SYMBOL(blk_queue_find_tag);
275    
276     /**
277     - * __blk_free_tags - release a given set of tag maintenance info
278     + * blk_free_tags - release a given set of tag maintenance info
279     * @bqt: the tag map to free
280     *
281     - * Tries to free the specified @bqt. Returns true if it was
282     - * actually freed and false if there are still references using it
283     + * Drop the reference count on @bqt and frees it when the last reference
284     + * is dropped.
285     */
286     -static int __blk_free_tags(struct blk_queue_tag *bqt)
287     +void blk_free_tags(struct blk_queue_tag *bqt)
288     {
289     - int retval;
290     -
291     - retval = atomic_dec_and_test(&bqt->refcnt);
292     - if (retval) {
293     + if (atomic_dec_and_test(&bqt->refcnt)) {
294     BUG_ON(find_first_bit(bqt->tag_map, bqt->max_depth) <
295     bqt->max_depth);
296    
297     @@ -50,9 +47,8 @@ static int __blk_free_tags(struct blk_queue_tag *bqt)
298    
299     kfree(bqt);
300     }
301     -
302     - return retval;
303     }
304     +EXPORT_SYMBOL(blk_free_tags);
305    
306     /**
307     * __blk_queue_free_tags - release tag maintenance info
308     @@ -69,28 +65,13 @@ void __blk_queue_free_tags(struct request_queue *q)
309     if (!bqt)
310     return;
311    
312     - __blk_free_tags(bqt);
313     + blk_free_tags(bqt);
314    
315     q->queue_tags = NULL;
316     queue_flag_clear_unlocked(QUEUE_FLAG_QUEUED, q);
317     }
318    
319     /**
320     - * blk_free_tags - release a given set of tag maintenance info
321     - * @bqt: the tag map to free
322     - *
323     - * For externally managed @bqt frees the map. Callers of this
324     - * function must guarantee to have released all the queues that
325     - * might have been using this tag map.
326     - */
327     -void blk_free_tags(struct blk_queue_tag *bqt)
328     -{
329     - if (unlikely(!__blk_free_tags(bqt)))
330     - BUG();
331     -}
332     -EXPORT_SYMBOL(blk_free_tags);
333     -
334     -/**
335     * blk_queue_free_tags - release tag maintenance info
336     * @q: the request queue for the device
337     *
338     diff --git a/block/compat_ioctl.c b/block/compat_ioctl.c
339     index fbd5a67cb773..a0926a6094b2 100644
340     --- a/block/compat_ioctl.c
341     +++ b/block/compat_ioctl.c
342     @@ -690,6 +690,7 @@ long compat_blkdev_ioctl(struct file *file, unsigned cmd, unsigned long arg)
343     case BLKROSET:
344     case BLKDISCARD:
345     case BLKSECDISCARD:
346     + case BLKZEROOUT:
347     /*
348     * the ones below are implemented in blkdev_locked_ioctl,
349     * but we call blkdev_ioctl, which gets the lock for us
350     diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
351     index 9aa42998d757..b54f8b3c7924 100644
352     --- a/drivers/ata/ahci.c
353     +++ b/drivers/ata/ahci.c
354     @@ -457,6 +457,7 @@ static const struct pci_device_id ahci_pci_tbl[] = {
355    
356     /* Promise */
357     { PCI_VDEVICE(PROMISE, 0x3f20), board_ahci }, /* PDC42819 */
358     + { PCI_VDEVICE(PROMISE, 0x3781), board_ahci }, /* FastTrak TX8660 ahci-mode */
359    
360     /* Asmedia */
361     { PCI_VDEVICE(ASMEDIA, 0x0601), board_ahci }, /* ASM1060 */
362     diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
363     index 62fda16c8377..f7616036663b 100644
364     --- a/drivers/ata/libata-core.c
365     +++ b/drivers/ata/libata-core.c
366     @@ -4787,6 +4787,10 @@ void swap_buf_le16(u16 *buf, unsigned int buf_words)
367     * ata_qc_new - Request an available ATA command, for queueing
368     * @ap: target port
369     *
370     + * Some ATA host controllers may implement a queue depth which is less
371     + * than ATA_MAX_QUEUE. So we shouldn't allocate a tag which is beyond
372     + * the hardware limitation.
373     + *
374     * LOCKING:
375     * None.
376     */
377     @@ -4794,14 +4798,15 @@ void swap_buf_le16(u16 *buf, unsigned int buf_words)
378     static struct ata_queued_cmd *ata_qc_new(struct ata_port *ap)
379     {
380     struct ata_queued_cmd *qc = NULL;
381     + unsigned int max_queue = ap->host->n_tags;
382     unsigned int i, tag;
383    
384     /* no command while frozen */
385     if (unlikely(ap->pflags & ATA_PFLAG_FROZEN))
386     return NULL;
387    
388     - for (i = 0; i < ATA_MAX_QUEUE; i++) {
389     - tag = (i + ap->last_tag + 1) % ATA_MAX_QUEUE;
390     + for (i = 0, tag = ap->last_tag + 1; i < max_queue; i++, tag++) {
391     + tag = tag < max_queue ? tag : 0;
392    
393     /* the last tag is reserved for internal command. */
394     if (tag == ATA_TAG_INTERNAL)
395     @@ -6103,6 +6108,7 @@ void ata_host_init(struct ata_host *host, struct device *dev,
396     {
397     spin_lock_init(&host->lock);
398     mutex_init(&host->eh_mutex);
399     + host->n_tags = ATA_MAX_QUEUE - 1;
400     host->dev = dev;
401     host->ops = ops;
402     }
403     @@ -6184,6 +6190,8 @@ int ata_host_register(struct ata_host *host, struct scsi_host_template *sht)
404     {
405     int i, rc;
406    
407     + host->n_tags = clamp(sht->can_queue, 1, ATA_MAX_QUEUE - 1);
408     +
409     /* host must have been started */
410     if (!(host->flags & ATA_HOST_STARTED)) {
411     dev_err(host->dev, "BUG: trying to register unstarted host\n");
412     diff --git a/drivers/base/platform.c b/drivers/base/platform.c
413     index 3c51eb0bd659..9dbf4ef2b2a3 100644
414     --- a/drivers/base/platform.c
415     +++ b/drivers/base/platform.c
416     @@ -89,8 +89,13 @@ int platform_get_irq(struct platform_device *dev, unsigned int num)
417     return dev->archdata.irqs[num];
418     #else
419     struct resource *r;
420     - if (IS_ENABLED(CONFIG_OF_IRQ) && dev->dev.of_node)
421     - return of_irq_get(dev->dev.of_node, num);
422     + if (IS_ENABLED(CONFIG_OF_IRQ) && dev->dev.of_node) {
423     + int ret;
424     +
425     + ret = of_irq_get(dev->dev.of_node, num);
426     + if (ret >= 0 || ret == -EPROBE_DEFER)
427     + return ret;
428     + }
429    
430     r = platform_get_resource(dev, IORESOURCE_IRQ, num);
431    
432     diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c
433     index 270f68a6b724..7164045c06e4 100644
434     --- a/drivers/gpu/drm/radeon/cik.c
435     +++ b/drivers/gpu/drm/radeon/cik.c
436     @@ -2219,6 +2219,7 @@ static void cik_tiling_mode_table_init(struct radeon_device *rdev)
437     gb_tile_moden = 0;
438     break;
439     }
440     + rdev->config.cik.macrotile_mode_array[reg_offset] = gb_tile_moden;
441     WREG32(GB_MACROTILE_MODE0 + (reg_offset * 4), gb_tile_moden);
442     }
443     } else if (num_pipe_configs == 8) {
444     @@ -7270,6 +7271,7 @@ static inline u32 cik_get_ih_wptr(struct radeon_device *rdev)
445     tmp = RREG32(IH_RB_CNTL);
446     tmp |= IH_WPTR_OVERFLOW_CLEAR;
447     WREG32(IH_RB_CNTL, tmp);
448     + wptr &= ~RB_OVERFLOW;
449     }
450     return (wptr & rdev->ih.ptr_mask);
451     }
452     diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c
453     index 64108dbc7d45..4b3c5f7ae63b 100644
454     --- a/drivers/gpu/drm/radeon/evergreen.c
455     +++ b/drivers/gpu/drm/radeon/evergreen.c
456     @@ -4763,6 +4763,7 @@ static u32 evergreen_get_ih_wptr(struct radeon_device *rdev)
457     tmp = RREG32(IH_RB_CNTL);
458     tmp |= IH_WPTR_OVERFLOW_CLEAR;
459     WREG32(IH_RB_CNTL, tmp);
460     + wptr &= ~RB_OVERFLOW;
461     }
462     return (wptr & rdev->ih.ptr_mask);
463     }
464     diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c
465     index f28ab840cc23..788f602e8989 100644
466     --- a/drivers/gpu/drm/radeon/r600.c
467     +++ b/drivers/gpu/drm/radeon/r600.c
468     @@ -3795,6 +3795,7 @@ static u32 r600_get_ih_wptr(struct radeon_device *rdev)
469     tmp = RREG32(IH_RB_CNTL);
470     tmp |= IH_WPTR_OVERFLOW_CLEAR;
471     WREG32(IH_RB_CNTL, tmp);
472     + wptr &= ~RB_OVERFLOW;
473     }
474     return (wptr & rdev->ih.ptr_mask);
475     }
476     diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c
477     index cb7508dc94f3..ea93393374df 100644
478     --- a/drivers/gpu/drm/radeon/si.c
479     +++ b/drivers/gpu/drm/radeon/si.c
480     @@ -6098,6 +6098,7 @@ static inline u32 si_get_ih_wptr(struct radeon_device *rdev)
481     tmp = RREG32(IH_RB_CNTL);
482     tmp |= IH_WPTR_OVERFLOW_CLEAR;
483     WREG32(IH_RB_CNTL, tmp);
484     + wptr &= ~RB_OVERFLOW;
485     }
486     return (wptr & rdev->ih.ptr_mask);
487     }
488     diff --git a/drivers/hwmon/smsc47m192.c b/drivers/hwmon/smsc47m192.c
489     index efee4c59239f..34b9a601ad07 100644
490     --- a/drivers/hwmon/smsc47m192.c
491     +++ b/drivers/hwmon/smsc47m192.c
492     @@ -86,7 +86,7 @@ static inline u8 IN_TO_REG(unsigned long val, int n)
493     */
494     static inline s8 TEMP_TO_REG(int val)
495     {
496     - return clamp_val(SCALE(val, 1, 1000), -128000, 127000);
497     + return SCALE(clamp_val(val, -128000, 127000), 1, 1000);
498     }
499    
500     static inline int TEMP_FROM_REG(s8 val)
501     @@ -384,6 +384,8 @@ static ssize_t set_vrm(struct device *dev, struct device_attribute *attr,
502     err = kstrtoul(buf, 10, &val);
503     if (err)
504     return err;
505     + if (val > 255)
506     + return -EINVAL;
507    
508     data->vrm = val;
509     return count;
510     diff --git a/drivers/input/input.c b/drivers/input/input.c
511     index 1c4c0db05550..29ca0bb4f561 100644
512     --- a/drivers/input/input.c
513     +++ b/drivers/input/input.c
514     @@ -257,9 +257,10 @@ static int input_handle_abs_event(struct input_dev *dev,
515     }
516    
517     static int input_get_disposition(struct input_dev *dev,
518     - unsigned int type, unsigned int code, int value)
519     + unsigned int type, unsigned int code, int *pval)
520     {
521     int disposition = INPUT_IGNORE_EVENT;
522     + int value = *pval;
523    
524     switch (type) {
525    
526     @@ -357,6 +358,7 @@ static int input_get_disposition(struct input_dev *dev,
527     break;
528     }
529    
530     + *pval = value;
531     return disposition;
532     }
533    
534     @@ -365,7 +367,7 @@ static void input_handle_event(struct input_dev *dev,
535     {
536     int disposition;
537    
538     - disposition = input_get_disposition(dev, type, code, value);
539     + disposition = input_get_disposition(dev, type, code, &value);
540    
541     if ((disposition & INPUT_PASS_TO_DEVICE) && dev->event)
542     dev->event(dev, type, code, value);
543     diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
544     index ec772d962f06..ef9e0b8a9aa7 100644
545     --- a/drivers/input/mouse/synaptics.c
546     +++ b/drivers/input/mouse/synaptics.c
547     @@ -132,7 +132,8 @@ static const struct min_max_quirk min_max_pnpid_table[] = {
548     1232, 5710, 1156, 4696
549     },
550     {
551     - (const char * const []){"LEN0034", "LEN0036", "LEN2004", NULL},
552     + (const char * const []){"LEN0034", "LEN0036", "LEN2002",
553     + "LEN2004", NULL},
554     1024, 5112, 2024, 4832
555     },
556     {
557     @@ -168,7 +169,7 @@ static const char * const topbuttonpad_pnp_ids[] = {
558     "LEN0049",
559     "LEN2000",
560     "LEN2001", /* Edge E431 */
561     - "LEN2002",
562     + "LEN2002", /* Edge E531 */
563     "LEN2003",
564     "LEN2004", /* L440 */
565     "LEN2005",
566     diff --git a/drivers/media/dvb-frontends/tda10071.c b/drivers/media/dvb-frontends/tda10071.c
567     index 8ad3a57cf640..287b977862e2 100644
568     --- a/drivers/media/dvb-frontends/tda10071.c
569     +++ b/drivers/media/dvb-frontends/tda10071.c
570     @@ -667,6 +667,7 @@ static int tda10071_set_frontend(struct dvb_frontend *fe)
571     struct dtv_frontend_properties *c = &fe->dtv_property_cache;
572     int ret, i;
573     u8 mode, rolloff, pilot, inversion, div;
574     + fe_modulation_t modulation;
575    
576     dev_dbg(&priv->i2c->dev, "%s: delivery_system=%d modulation=%d " \
577     "frequency=%d symbol_rate=%d inversion=%d pilot=%d " \
578     @@ -701,10 +702,13 @@ static int tda10071_set_frontend(struct dvb_frontend *fe)
579    
580     switch (c->delivery_system) {
581     case SYS_DVBS:
582     + modulation = QPSK;
583     rolloff = 0;
584     pilot = 2;
585     break;
586     case SYS_DVBS2:
587     + modulation = c->modulation;
588     +
589     switch (c->rolloff) {
590     case ROLLOFF_20:
591     rolloff = 2;
592     @@ -749,7 +753,7 @@ static int tda10071_set_frontend(struct dvb_frontend *fe)
593    
594     for (i = 0, mode = 0xff; i < ARRAY_SIZE(TDA10071_MODCOD); i++) {
595     if (c->delivery_system == TDA10071_MODCOD[i].delivery_system &&
596     - c->modulation == TDA10071_MODCOD[i].modulation &&
597     + modulation == TDA10071_MODCOD[i].modulation &&
598     c->fec_inner == TDA10071_MODCOD[i].fec) {
599     mode = TDA10071_MODCOD[i].val;
600     dev_dbg(&priv->i2c->dev, "%s: mode found=%02x\n",
601     diff --git a/drivers/media/usb/hdpvr/hdpvr-video.c b/drivers/media/usb/hdpvr/hdpvr-video.c
602     index 0500c4175d5f..6bce01a674f9 100644
603     --- a/drivers/media/usb/hdpvr/hdpvr-video.c
604     +++ b/drivers/media/usb/hdpvr/hdpvr-video.c
605     @@ -82,7 +82,7 @@ static void hdpvr_read_bulk_callback(struct urb *urb)
606     }
607    
608     /*=========================================================================*/
609     -/* bufffer bits */
610     +/* buffer bits */
611    
612     /* function expects dev->io_mutex to be hold by caller */
613     int hdpvr_cancel_queue(struct hdpvr_device *dev)
614     @@ -926,7 +926,7 @@ static int hdpvr_s_ctrl(struct v4l2_ctrl *ctrl)
615     case V4L2_CID_MPEG_AUDIO_ENCODING:
616     if (dev->flags & HDPVR_FLAG_AC3_CAP) {
617     opt->audio_codec = ctrl->val;
618     - return hdpvr_set_audio(dev, opt->audio_input,
619     + return hdpvr_set_audio(dev, opt->audio_input + 1,
620     opt->audio_codec);
621     }
622     return 0;
623     @@ -1198,7 +1198,7 @@ int hdpvr_register_videodev(struct hdpvr_device *dev, struct device *parent,
624     v4l2_ctrl_new_std_menu(hdl, &hdpvr_ctrl_ops,
625     V4L2_CID_MPEG_AUDIO_ENCODING,
626     ac3 ? V4L2_MPEG_AUDIO_ENCODING_AC3 : V4L2_MPEG_AUDIO_ENCODING_AAC,
627     - 0x7, V4L2_MPEG_AUDIO_ENCODING_AAC);
628     + 0x7, ac3 ? dev->options.audio_codec : V4L2_MPEG_AUDIO_ENCODING_AAC);
629     v4l2_ctrl_new_std_menu(hdl, &hdpvr_ctrl_ops,
630     V4L2_CID_MPEG_VIDEO_ENCODING,
631     V4L2_MPEG_VIDEO_ENCODING_MPEG_4_AVC, 0x3,
632     diff --git a/drivers/media/v4l2-core/v4l2-dv-timings.c b/drivers/media/v4l2-core/v4l2-dv-timings.c
633     index a2e257970fec..78d99b137d91 100644
634     --- a/drivers/media/v4l2-core/v4l2-dv-timings.c
635     +++ b/drivers/media/v4l2-core/v4l2-dv-timings.c
636     @@ -595,10 +595,10 @@ struct v4l2_fract v4l2_calc_aspect_ratio(u8 hor_landscape, u8 vert_portrait)
637     aspect.denominator = 9;
638     } else if (ratio == 34) {
639     aspect.numerator = 4;
640     - aspect.numerator = 3;
641     + aspect.denominator = 3;
642     } else if (ratio == 68) {
643     aspect.numerator = 15;
644     - aspect.numerator = 9;
645     + aspect.denominator = 9;
646     } else {
647     aspect.numerator = hor_landscape + 99;
648     aspect.denominator = 100;
649     diff --git a/drivers/parport/Kconfig b/drivers/parport/Kconfig
650     index 2872ece81f35..44333bd8f908 100644
651     --- a/drivers/parport/Kconfig
652     +++ b/drivers/parport/Kconfig
653     @@ -5,6 +5,12 @@
654     # Parport configuration.
655     #
656    
657     +config ARCH_MIGHT_HAVE_PC_PARPORT
658     + bool
659     + help
660     + Select this config option from the architecture Kconfig if
661     + the architecture might have PC parallel port hardware.
662     +
663     menuconfig PARPORT
664     tristate "Parallel port support"
665     depends on HAS_IOMEM
666     @@ -31,12 +37,6 @@ menuconfig PARPORT
667    
668     If unsure, say Y.
669    
670     -config ARCH_MIGHT_HAVE_PC_PARPORT
671     - bool
672     - help
673     - Select this config option from the architecture Kconfig if
674     - the architecture might have PC parallel port hardware.
675     -
676     if PARPORT
677    
678     config PARPORT_PC
679     diff --git a/drivers/staging/media/omap4iss/Kconfig b/drivers/staging/media/omap4iss/Kconfig
680     index b9fe753969bd..15940f8fdd24 100644
681     --- a/drivers/staging/media/omap4iss/Kconfig
682     +++ b/drivers/staging/media/omap4iss/Kconfig
683     @@ -1,6 +1,6 @@
684     config VIDEO_OMAP4
685     bool "OMAP 4 Camera support"
686     - depends on VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API && I2C && ARCH_OMAP4
687     + depends on VIDEO_V4L2=y && VIDEO_V4L2_SUBDEV_API && I2C=y && ARCH_OMAP4
688     select VIDEOBUF2_DMA_CONTIG
689     ---help---
690     Driver for an OMAP 4 ISS controller.
691     diff --git a/fs/coredump.c b/fs/coredump.c
692     index 0b2528fb640e..a93f7e6ea4cf 100644
693     --- a/fs/coredump.c
694     +++ b/fs/coredump.c
695     @@ -306,7 +306,7 @@ static int zap_threads(struct task_struct *tsk, struct mm_struct *mm,
696     if (unlikely(nr < 0))
697     return nr;
698    
699     - tsk->flags = PF_DUMPCORE;
700     + tsk->flags |= PF_DUMPCORE;
701     if (atomic_read(&mm->mm_users) == nr + 1)
702     goto done;
703     /*
704     diff --git a/fs/namei.c b/fs/namei.c
705     index 8274c8d39b03..bdea10963aa5 100644
706     --- a/fs/namei.c
707     +++ b/fs/namei.c
708     @@ -2247,9 +2247,10 @@ done:
709     goto out;
710     }
711     path->dentry = dentry;
712     - path->mnt = mntget(nd->path.mnt);
713     + path->mnt = nd->path.mnt;
714     if (should_follow_link(dentry, nd->flags & LOOKUP_FOLLOW))
715     return 1;
716     + mntget(path->mnt);
717     follow_mount(path);
718     error = 0;
719     out:
720     diff --git a/fs/nfs/nfs3acl.c b/fs/nfs/nfs3acl.c
721     index 871d6eda8dba..8f854dde4150 100644
722     --- a/fs/nfs/nfs3acl.c
723     +++ b/fs/nfs/nfs3acl.c
724     @@ -247,3 +247,46 @@ const struct xattr_handler *nfs3_xattr_handlers[] = {
725     &posix_acl_default_xattr_handler,
726     NULL,
727     };
728     +
729     +static int
730     +nfs3_list_one_acl(struct inode *inode, int type, const char *name, void *data,
731     + size_t size, ssize_t *result)
732     +{
733     + struct posix_acl *acl;
734     + char *p = data + *result;
735     +
736     + acl = get_acl(inode, type);
737     + if (!acl)
738     + return 0;
739     +
740     + posix_acl_release(acl);
741     +
742     + *result += strlen(name);
743     + *result += 1;
744     + if (!size)
745     + return 0;
746     + if (*result > size)
747     + return -ERANGE;
748     +
749     + strcpy(p, name);
750     + return 0;
751     +}
752     +
753     +ssize_t
754     +nfs3_listxattr(struct dentry *dentry, char *data, size_t size)
755     +{
756     + struct inode *inode = dentry->d_inode;
757     + ssize_t result = 0;
758     + int error;
759     +
760     + error = nfs3_list_one_acl(inode, ACL_TYPE_ACCESS,
761     + POSIX_ACL_XATTR_ACCESS, data, size, &result);
762     + if (error)
763     + return error;
764     +
765     + error = nfs3_list_one_acl(inode, ACL_TYPE_DEFAULT,
766     + POSIX_ACL_XATTR_DEFAULT, data, size, &result);
767     + if (error)
768     + return error;
769     + return result;
770     +}
771     diff --git a/fs/nfs/nfs3proc.c b/fs/nfs/nfs3proc.c
772     index a462ef0fb5d6..8a18b4a0a4ee 100644
773     --- a/fs/nfs/nfs3proc.c
774     +++ b/fs/nfs/nfs3proc.c
775     @@ -926,7 +926,7 @@ static const struct inode_operations nfs3_dir_inode_operations = {
776     .getattr = nfs_getattr,
777     .setattr = nfs_setattr,
778     #ifdef CONFIG_NFS_V3_ACL
779     - .listxattr = generic_listxattr,
780     + .listxattr = nfs3_listxattr,
781     .getxattr = generic_getxattr,
782     .setxattr = generic_setxattr,
783     .removexattr = generic_removexattr,
784     @@ -940,7 +940,7 @@ static const struct inode_operations nfs3_file_inode_operations = {
785     .getattr = nfs_getattr,
786     .setattr = nfs_setattr,
787     #ifdef CONFIG_NFS_V3_ACL
788     - .listxattr = generic_listxattr,
789     + .listxattr = nfs3_listxattr,
790     .getxattr = generic_getxattr,
791     .setxattr = generic_setxattr,
792     .removexattr = generic_removexattr,
793     diff --git a/include/linux/libata.h b/include/linux/libata.h
794     index 3fee55e73e5e..e13b3aef0b0c 100644
795     --- a/include/linux/libata.h
796     +++ b/include/linux/libata.h
797     @@ -593,6 +593,7 @@ struct ata_host {
798     struct device *dev;
799     void __iomem * const *iomap;
800     unsigned int n_ports;
801     + unsigned int n_tags; /* nr of NCQ tags */
802     void *private_data;
803     struct ata_port_operations *ops;
804     unsigned long flags;
805     diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
806     index 7e259b2bdf44..71136720ffa1 100644
807     --- a/kernel/trace/trace.c
808     +++ b/kernel/trace/trace.c
809     @@ -811,7 +811,7 @@ static struct {
810     { trace_clock_local, "local", 1 },
811     { trace_clock_global, "global", 1 },
812     { trace_clock_counter, "counter", 0 },
813     - { trace_clock_jiffies, "uptime", 1 },
814     + { trace_clock_jiffies, "uptime", 0 },
815     { trace_clock, "perf", 1 },
816     ARCH_TRACE_CLOCKS
817     };
818     diff --git a/kernel/trace/trace_clock.c b/kernel/trace/trace_clock.c
819     index 26dc348332b7..57b67b1f24d1 100644
820     --- a/kernel/trace/trace_clock.c
821     +++ b/kernel/trace/trace_clock.c
822     @@ -59,13 +59,14 @@ u64 notrace trace_clock(void)
823    
824     /*
825     * trace_jiffy_clock(): Simply use jiffies as a clock counter.
826     + * Note that this use of jiffies_64 is not completely safe on
827     + * 32-bit systems. But the window is tiny, and the effect if
828     + * we are affected is that we will have an obviously bogus
829     + * timestamp on a trace event - i.e. not life threatening.
830     */
831     u64 notrace trace_clock_jiffies(void)
832     {
833     - u64 jiffy = jiffies - INITIAL_JIFFIES;
834     -
835     - /* Return nsecs */
836     - return (u64)jiffies_to_usecs(jiffy) * 1000ULL;
837     + return jiffies_64_to_clock_t(jiffies_64 - INITIAL_JIFFIES);
838     }
839    
840     /*
841     diff --git a/mm/hugetlb.c b/mm/hugetlb.c
842     index 30dd6265a141..923f38e62bcf 100644
843     --- a/mm/hugetlb.c
844     +++ b/mm/hugetlb.c
845     @@ -2422,6 +2422,7 @@ int copy_hugetlb_page_range(struct mm_struct *dst, struct mm_struct *src,
846     } else {
847     if (cow)
848     huge_ptep_set_wrprotect(src, addr, src_pte);
849     + entry = huge_ptep_get(src_pte);
850     ptepage = pte_page(entry);
851     get_page(ptepage);
852     page_dup_rmap(ptepage);
853     diff --git a/mm/slab_common.c b/mm/slab_common.c
854     index 1ec3c619ba04..f149e6724411 100644
855     --- a/mm/slab_common.c
856     +++ b/mm/slab_common.c
857     @@ -56,7 +56,7 @@ static int kmem_cache_sanity_check(struct mem_cgroup *memcg, const char *name,
858     continue;
859     }
860    
861     -#if !defined(CONFIG_SLUB) || !defined(CONFIG_SLUB_DEBUG_ON)
862     +#if !defined(CONFIG_SLUB)
863     /*
864     * For simplicity, we won't check this in the list of memcg
865     * caches. We have control over memcg naming, and if there
866     diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
867     index 4fe2e6e2bc76..e6283464a8e6 100644
868     --- a/net/wireless/nl80211.c
869     +++ b/net/wireless/nl80211.c
870     @@ -1450,18 +1450,17 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *dev,
871     }
872     CMD(start_p2p_device, START_P2P_DEVICE);
873     CMD(set_mcast_rate, SET_MCAST_RATE);
874     +#ifdef CONFIG_NL80211_TESTMODE
875     + CMD(testmode_cmd, TESTMODE);
876     +#endif
877     if (state->split) {
878     CMD(crit_proto_start, CRIT_PROTOCOL_START);
879     CMD(crit_proto_stop, CRIT_PROTOCOL_STOP);
880     if (dev->wiphy.flags & WIPHY_FLAG_HAS_CHANNEL_SWITCH)
881     CMD(channel_switch, CHANNEL_SWITCH);
882     + CMD(set_qos_map, SET_QOS_MAP);
883     }
884     - CMD(set_qos_map, SET_QOS_MAP);
885     -
886     -#ifdef CONFIG_NL80211_TESTMODE
887     - CMD(testmode_cmd, TESTMODE);
888     -#endif
889     -
890     + /* add into the if now */
891     #undef CMD
892    
893     if (dev->ops->connect || dev->ops->auth) {