aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_44xx_data.c18
-rw-r--r--arch/mips/include/asm/page.h2
-rw-r--r--arch/parisc/Makefile6
-rw-r--r--arch/parisc/include/asm/cacheflush.h5
-rw-r--r--arch/parisc/include/asm/pgtable.h47
-rw-r--r--arch/parisc/include/asm/uaccess.h14
-rw-r--r--arch/parisc/kernel/cache.c5
-rw-r--r--arch/parisc/kernel/parisc_ksyms.c2
-rw-r--r--arch/parisc/lib/Makefile3
-rw-r--r--arch/parisc/lib/ucmpdi2.c25
-rw-r--r--arch/sparc/mm/tlb.c3
-rw-r--r--arch/x86/boot/compressed/eboot.c4
-rw-r--r--crypto/algif_hash.c2
-rw-r--r--crypto/algif_skcipher.c1
-rw-r--r--drivers/firmware/efivars.c12
-rw-r--r--drivers/gpio/gpio-pxa.c7
-rw-r--r--drivers/media/dvb-frontends/mb86a20s.c2
-rw-r--r--drivers/media/pci/cx25821/cx25821-video.c2
-rw-r--r--drivers/tty/tty_io.c18
-rw-r--r--fs/aio.c2
-rw-r--r--kernel/.gitignore1
-rw-r--r--kernel/events/core.c2
-rw-r--r--mm/nommu.c10
-rw-r--r--sound/soc/codecs/wm8994.c1
-rw-r--r--sound/soc/davinci/davinci-mcasp.c7
-rw-r--r--sound/soc/soc-dapm.c4
27 files changed, 140 insertions, 67 deletions
diff --git a/Makefile b/Makefile
index 46263d808876..8fe69916e726 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
1VERSION = 3 1VERSION = 3
2PATCHLEVEL = 9 2PATCHLEVEL = 9
3SUBLEVEL = 0 3SUBLEVEL = 0
4EXTRAVERSION = -rc8 4EXTRAVERSION =
5NAME = Unicycling Gorilla 5NAME = Unicycling Gorilla
6 6
7# *DOCUMENTATION* 7# *DOCUMENTATION*
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index 9e0576569e07..eaba9dc91a0d 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -2714,16 +2714,22 @@ static struct omap_ocp2scp_dev ocp2scp_dev_attr[] = {
2714 { } 2714 { }
2715}; 2715};
2716 2716
2717static struct omap_hwmod_opt_clk ocp2scp_usb_phy_opt_clks[] = {
2718 { .role = "48mhz", .clk = "ocp2scp_usb_phy_phy_48m" },
2719};
2720
2721/* ocp2scp_usb_phy */ 2717/* ocp2scp_usb_phy */
2722static struct omap_hwmod omap44xx_ocp2scp_usb_phy_hwmod = { 2718static struct omap_hwmod omap44xx_ocp2scp_usb_phy_hwmod = {
2723 .name = "ocp2scp_usb_phy", 2719 .name = "ocp2scp_usb_phy",
2724 .class = &omap44xx_ocp2scp_hwmod_class, 2720 .class = &omap44xx_ocp2scp_hwmod_class,
2725 .clkdm_name = "l3_init_clkdm", 2721 .clkdm_name = "l3_init_clkdm",
2726 .main_clk = "func_48m_fclk", 2722 /*
2723 * ocp2scp_usb_phy_phy_48m is provided by the OMAP4 PRCM IP
2724 * block as an "optional clock," and normally should never be
2725 * specified as the main_clk for an OMAP IP block. However it
2726 * turns out that this clock is actually the main clock for
2727 * the ocp2scp_usb_phy IP block:
2728 * http://lists.infradead.org/pipermail/linux-arm-kernel/2012-September/119943.html
2729 * So listing ocp2scp_usb_phy_phy_48m as a main_clk here seems
2730 * to be the best workaround.
2731 */
2732 .main_clk = "ocp2scp_usb_phy_phy_48m",
2727 .prcm = { 2733 .prcm = {
2728 .omap4 = { 2734 .omap4 = {
2729 .clkctrl_offs = OMAP4_CM_L3INIT_USBPHYOCP2SCP_CLKCTRL_OFFSET, 2735 .clkctrl_offs = OMAP4_CM_L3INIT_USBPHYOCP2SCP_CLKCTRL_OFFSET,
@@ -2732,8 +2738,6 @@ static struct omap_hwmod omap44xx_ocp2scp_usb_phy_hwmod = {
2732 }, 2738 },
2733 }, 2739 },
2734 .dev_attr = ocp2scp_dev_attr, 2740 .dev_attr = ocp2scp_dev_attr,
2735 .opt_clks = ocp2scp_usb_phy_opt_clks,
2736 .opt_clks_cnt = ARRAY_SIZE(ocp2scp_usb_phy_opt_clks),
2737}; 2741};
2738 2742
2739/* 2743/*
diff --git a/arch/mips/include/asm/page.h b/arch/mips/include/asm/page.h
index 99fc547af9d3..eab99e536b5c 100644
--- a/arch/mips/include/asm/page.h
+++ b/arch/mips/include/asm/page.h
@@ -31,7 +31,7 @@
31#define PAGE_SHIFT 16 31#define PAGE_SHIFT 16
32#endif 32#endif
33#define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT) 33#define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT)
34#define PAGE_MASK (~(PAGE_SIZE - 1)) 34#define PAGE_MASK (~((1 << PAGE_SHIFT) - 1))
35 35
36#ifdef CONFIG_MIPS_HUGE_TLB_SUPPORT 36#ifdef CONFIG_MIPS_HUGE_TLB_SUPPORT
37#define HPAGE_SHIFT (PAGE_SHIFT + PAGE_SHIFT - 3) 37#define HPAGE_SHIFT (PAGE_SHIFT + PAGE_SHIFT - 3)
diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile
index 01d95e2f0581..113e28206503 100644
--- a/arch/parisc/Makefile
+++ b/arch/parisc/Makefile
@@ -65,8 +65,10 @@ ifndef CONFIG_FUNCTION_TRACER
65endif 65endif
66 66
67# Use long jumps instead of long branches (needed if your linker fails to 67# Use long jumps instead of long branches (needed if your linker fails to
68# link a too big vmlinux executable) 68# link a too big vmlinux executable). Not enabled for building modules.
69cflags-$(CONFIG_MLONGCALLS) += -mlong-calls 69ifdef CONFIG_MLONGCALLS
70KBUILD_CFLAGS_KERNEL += -mlong-calls
71endif
70 72
71# select which processor to optimise for 73# select which processor to optimise for
72cflags-$(CONFIG_PA7100) += -march=1.1 -mschedule=7100 74cflags-$(CONFIG_PA7100) += -march=1.1 -mschedule=7100
diff --git a/arch/parisc/include/asm/cacheflush.h b/arch/parisc/include/asm/cacheflush.h
index 79f694f3ad9b..f0e2784e7cca 100644
--- a/arch/parisc/include/asm/cacheflush.h
+++ b/arch/parisc/include/asm/cacheflush.h
@@ -140,7 +140,10 @@ static inline void *kmap(struct page *page)
140 return page_address(page); 140 return page_address(page);
141} 141}
142 142
143#define kunmap(page) kunmap_parisc(page_address(page)) 143static inline void kunmap(struct page *page)
144{
145 kunmap_parisc(page_address(page));
146}
144 147
145static inline void *kmap_atomic(struct page *page) 148static inline void *kmap_atomic(struct page *page)
146{ 149{
diff --git a/arch/parisc/include/asm/pgtable.h b/arch/parisc/include/asm/pgtable.h
index 7df49fad29f9..1e40d7f86be3 100644
--- a/arch/parisc/include/asm/pgtable.h
+++ b/arch/parisc/include/asm/pgtable.h
@@ -16,6 +16,8 @@
16#include <asm/processor.h> 16#include <asm/processor.h>
17#include <asm/cache.h> 17#include <asm/cache.h>
18 18
19extern spinlock_t pa_dbit_lock;
20
19/* 21/*
20 * kern_addr_valid(ADDR) tests if ADDR is pointing to valid kernel 22 * kern_addr_valid(ADDR) tests if ADDR is pointing to valid kernel
21 * memory. For the return value to be meaningful, ADDR must be >= 23 * memory. For the return value to be meaningful, ADDR must be >=
@@ -44,8 +46,11 @@ extern void purge_tlb_entries(struct mm_struct *, unsigned long);
44 46
45#define set_pte_at(mm, addr, ptep, pteval) \ 47#define set_pte_at(mm, addr, ptep, pteval) \
46 do { \ 48 do { \
49 unsigned long flags; \
50 spin_lock_irqsave(&pa_dbit_lock, flags); \
47 set_pte(ptep, pteval); \ 51 set_pte(ptep, pteval); \
48 purge_tlb_entries(mm, addr); \ 52 purge_tlb_entries(mm, addr); \
53 spin_unlock_irqrestore(&pa_dbit_lock, flags); \
49 } while (0) 54 } while (0)
50 55
51#endif /* !__ASSEMBLY__ */ 56#endif /* !__ASSEMBLY__ */
@@ -435,48 +440,46 @@ extern void update_mmu_cache(struct vm_area_struct *, unsigned long, pte_t *);
435 440
436static inline int ptep_test_and_clear_young(struct vm_area_struct *vma, unsigned long addr, pte_t *ptep) 441static inline int ptep_test_and_clear_young(struct vm_area_struct *vma, unsigned long addr, pte_t *ptep)
437{ 442{
438#ifdef CONFIG_SMP 443 pte_t pte;
444 unsigned long flags;
445
439 if (!pte_young(*ptep)) 446 if (!pte_young(*ptep))
440 return 0; 447 return 0;
441 return test_and_clear_bit(xlate_pabit(_PAGE_ACCESSED_BIT), &pte_val(*ptep)); 448
442#else 449 spin_lock_irqsave(&pa_dbit_lock, flags);
443 pte_t pte = *ptep; 450 pte = *ptep;
444 if (!pte_young(pte)) 451 if (!pte_young(pte)) {
452 spin_unlock_irqrestore(&pa_dbit_lock, flags);
445 return 0; 453 return 0;
446 set_pte_at(vma->vm_mm, addr, ptep, pte_mkold(pte)); 454 }
455 set_pte(ptep, pte_mkold(pte));
456 purge_tlb_entries(vma->vm_mm, addr);
457 spin_unlock_irqrestore(&pa_dbit_lock, flags);
447 return 1; 458 return 1;
448#endif
449} 459}
450 460
451extern spinlock_t pa_dbit_lock;
452
453struct mm_struct; 461struct mm_struct;
454static inline pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) 462static inline pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
455{ 463{
456 pte_t old_pte; 464 pte_t old_pte;
465 unsigned long flags;
457 466
458 spin_lock(&pa_dbit_lock); 467 spin_lock_irqsave(&pa_dbit_lock, flags);
459 old_pte = *ptep; 468 old_pte = *ptep;
460 pte_clear(mm,addr,ptep); 469 pte_clear(mm,addr,ptep);
461 spin_unlock(&pa_dbit_lock); 470 purge_tlb_entries(mm, addr);
471 spin_unlock_irqrestore(&pa_dbit_lock, flags);
462 472
463 return old_pte; 473 return old_pte;
464} 474}
465 475
466static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, pte_t *ptep) 476static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
467{ 477{
468#ifdef CONFIG_SMP 478 unsigned long flags;
469 unsigned long new, old; 479 spin_lock_irqsave(&pa_dbit_lock, flags);
470 480 set_pte(ptep, pte_wrprotect(*ptep));
471 do {
472 old = pte_val(*ptep);
473 new = pte_val(pte_wrprotect(__pte (old)));
474 } while (cmpxchg((unsigned long *) ptep, old, new) != old);
475 purge_tlb_entries(mm, addr); 481 purge_tlb_entries(mm, addr);
476#else 482 spin_unlock_irqrestore(&pa_dbit_lock, flags);
477 pte_t old_pte = *ptep;
478 set_pte_at(mm, addr, ptep, pte_wrprotect(old_pte));
479#endif
480} 483}
481 484
482#define pte_same(A,B) (pte_val(A) == pte_val(B)) 485#define pte_same(A,B) (pte_val(A) == pte_val(B))
diff --git a/arch/parisc/include/asm/uaccess.h b/arch/parisc/include/asm/uaccess.h
index 4ba2c93770f1..e0a82358517e 100644
--- a/arch/parisc/include/asm/uaccess.h
+++ b/arch/parisc/include/asm/uaccess.h
@@ -181,30 +181,24 @@ struct exception_data {
181#if !defined(CONFIG_64BIT) 181#if !defined(CONFIG_64BIT)
182 182
183#define __put_kernel_asm64(__val,ptr) do { \ 183#define __put_kernel_asm64(__val,ptr) do { \
184 u64 __val64 = (u64)(__val); \
185 u32 hi = (__val64) >> 32; \
186 u32 lo = (__val64) & 0xffffffff; \
187 __asm__ __volatile__ ( \ 184 __asm__ __volatile__ ( \
188 "\n1:\tstw %2,0(%1)" \ 185 "\n1:\tstw %2,0(%1)" \
189 "\n2:\tstw %3,4(%1)\n\t" \ 186 "\n2:\tstw %R2,4(%1)\n\t" \
190 ASM_EXCEPTIONTABLE_ENTRY(1b,fixup_put_user_skip_2)\ 187 ASM_EXCEPTIONTABLE_ENTRY(1b,fixup_put_user_skip_2)\
191 ASM_EXCEPTIONTABLE_ENTRY(2b,fixup_put_user_skip_1)\ 188 ASM_EXCEPTIONTABLE_ENTRY(2b,fixup_put_user_skip_1)\
192 : "=r"(__pu_err) \ 189 : "=r"(__pu_err) \
193 : "r"(ptr), "r"(hi), "r"(lo), "0"(__pu_err) \ 190 : "r"(ptr), "r"(__val), "0"(__pu_err) \
194 : "r1"); \ 191 : "r1"); \
195} while (0) 192} while (0)
196 193
197#define __put_user_asm64(__val,ptr) do { \ 194#define __put_user_asm64(__val,ptr) do { \
198 u64 __val64 = (u64)(__val); \
199 u32 hi = (__val64) >> 32; \
200 u32 lo = (__val64) & 0xffffffff; \
201 __asm__ __volatile__ ( \ 195 __asm__ __volatile__ ( \
202 "\n1:\tstw %2,0(%%sr3,%1)" \ 196 "\n1:\tstw %2,0(%%sr3,%1)" \
203 "\n2:\tstw %3,4(%%sr3,%1)\n\t" \ 197 "\n2:\tstw %R2,4(%%sr3,%1)\n\t" \
204 ASM_EXCEPTIONTABLE_ENTRY(1b,fixup_put_user_skip_2)\ 198 ASM_EXCEPTIONTABLE_ENTRY(1b,fixup_put_user_skip_2)\
205 ASM_EXCEPTIONTABLE_ENTRY(2b,fixup_put_user_skip_1)\ 199 ASM_EXCEPTIONTABLE_ENTRY(2b,fixup_put_user_skip_1)\
206 : "=r"(__pu_err) \ 200 : "=r"(__pu_err) \
207 : "r"(ptr), "r"(hi), "r"(lo), "0"(__pu_err) \ 201 : "r"(ptr), "r"(__val), "0"(__pu_err) \
208 : "r1"); \ 202 : "r1"); \
209} while (0) 203} while (0)
210 204
diff --git a/arch/parisc/kernel/cache.c b/arch/parisc/kernel/cache.c
index 4b12890642eb..83ded26cad06 100644
--- a/arch/parisc/kernel/cache.c
+++ b/arch/parisc/kernel/cache.c
@@ -421,14 +421,11 @@ void purge_tlb_entries(struct mm_struct *mm, unsigned long addr)
421 /* Note: purge_tlb_entries can be called at startup with 421 /* Note: purge_tlb_entries can be called at startup with
422 no context. */ 422 no context. */
423 423
424 /* Disable preemption while we play with %sr1. */
425 preempt_disable();
426 mtsp(mm->context, 1);
427 purge_tlb_start(flags); 424 purge_tlb_start(flags);
425 mtsp(mm->context, 1);
428 pdtlb(addr); 426 pdtlb(addr);
429 pitlb(addr); 427 pitlb(addr);
430 purge_tlb_end(flags); 428 purge_tlb_end(flags);
431 preempt_enable();
432} 429}
433EXPORT_SYMBOL(purge_tlb_entries); 430EXPORT_SYMBOL(purge_tlb_entries);
434 431
diff --git a/arch/parisc/kernel/parisc_ksyms.c b/arch/parisc/kernel/parisc_ksyms.c
index 6795dc6c995f..568b2c61ea02 100644
--- a/arch/parisc/kernel/parisc_ksyms.c
+++ b/arch/parisc/kernel/parisc_ksyms.c
@@ -120,11 +120,13 @@ extern void __ashrdi3(void);
120extern void __ashldi3(void); 120extern void __ashldi3(void);
121extern void __lshrdi3(void); 121extern void __lshrdi3(void);
122extern void __muldi3(void); 122extern void __muldi3(void);
123extern void __ucmpdi2(void);
123 124
124EXPORT_SYMBOL(__ashrdi3); 125EXPORT_SYMBOL(__ashrdi3);
125EXPORT_SYMBOL(__ashldi3); 126EXPORT_SYMBOL(__ashldi3);
126EXPORT_SYMBOL(__lshrdi3); 127EXPORT_SYMBOL(__lshrdi3);
127EXPORT_SYMBOL(__muldi3); 128EXPORT_SYMBOL(__muldi3);
129EXPORT_SYMBOL(__ucmpdi2);
128 130
129asmlinkage void * __canonicalize_funcptr_for_compare(void *); 131asmlinkage void * __canonicalize_funcptr_for_compare(void *);
130EXPORT_SYMBOL(__canonicalize_funcptr_for_compare); 132EXPORT_SYMBOL(__canonicalize_funcptr_for_compare);
diff --git a/arch/parisc/lib/Makefile b/arch/parisc/lib/Makefile
index 5f2e6904d14a..5651536ac733 100644
--- a/arch/parisc/lib/Makefile
+++ b/arch/parisc/lib/Makefile
@@ -2,6 +2,7 @@
2# Makefile for parisc-specific library files 2# Makefile for parisc-specific library files
3# 3#
4 4
5lib-y := lusercopy.o bitops.o checksum.o io.o memset.o fixup.o memcpy.o 5lib-y := lusercopy.o bitops.o checksum.o io.o memset.o fixup.o memcpy.o \
6 ucmpdi2.o
6 7
7obj-y := iomap.o 8obj-y := iomap.o
diff --git a/arch/parisc/lib/ucmpdi2.c b/arch/parisc/lib/ucmpdi2.c
new file mode 100644
index 000000000000..149c016f32c5
--- /dev/null
+++ b/arch/parisc/lib/ucmpdi2.c
@@ -0,0 +1,25 @@
1#include <linux/module.h>
2
3union ull_union {
4 unsigned long long ull;
5 struct {
6 unsigned int high;
7 unsigned int low;
8 } ui;
9};
10
11int __ucmpdi2(unsigned long long a, unsigned long long b)
12{
13 union ull_union au = {.ull = a};
14 union ull_union bu = {.ull = b};
15
16 if (au.ui.high < bu.ui.high)
17 return 0;
18 else if (au.ui.high > bu.ui.high)
19 return 2;
20 if (au.ui.low < bu.ui.low)
21 return 0;
22 else if (au.ui.low > bu.ui.low)
23 return 2;
24 return 1;
25}
diff --git a/arch/sparc/mm/tlb.c b/arch/sparc/mm/tlb.c
index 272aa4f7657e..83d89bcb44af 100644
--- a/arch/sparc/mm/tlb.c
+++ b/arch/sparc/mm/tlb.c
@@ -87,7 +87,7 @@ static void tlb_batch_add_one(struct mm_struct *mm, unsigned long vaddr,
87 if (!tb->active) { 87 if (!tb->active) {
88 global_flush_tlb_page(mm, vaddr); 88 global_flush_tlb_page(mm, vaddr);
89 flush_tsb_user_page(mm, vaddr); 89 flush_tsb_user_page(mm, vaddr);
90 return; 90 goto out;
91 } 91 }
92 92
93 if (nr == 0) 93 if (nr == 0)
@@ -98,6 +98,7 @@ static void tlb_batch_add_one(struct mm_struct *mm, unsigned long vaddr,
98 if (nr >= TLB_BATCH_NR) 98 if (nr >= TLB_BATCH_NR)
99 flush_tlb_pending(); 99 flush_tlb_pending();
100 100
101out:
101 put_cpu_var(tlb_batch); 102 put_cpu_var(tlb_batch);
102} 103}
103 104
diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c
index 8615f7581820..35ee62fccf98 100644
--- a/arch/x86/boot/compressed/eboot.c
+++ b/arch/x86/boot/compressed/eboot.c
@@ -258,7 +258,7 @@ static efi_status_t setup_efi_vars(struct boot_params *params)
258 u64 store_size, remaining_size, var_size; 258 u64 store_size, remaining_size, var_size;
259 efi_status_t status; 259 efi_status_t status;
260 260
261 if (!sys_table->runtime->query_variable_info) 261 if (sys_table->runtime->hdr.revision < EFI_2_00_SYSTEM_TABLE_REVISION)
262 return EFI_UNSUPPORTED; 262 return EFI_UNSUPPORTED;
263 263
264 data = (struct setup_data *)(unsigned long)params->hdr.setup_data; 264 data = (struct setup_data *)(unsigned long)params->hdr.setup_data;
@@ -266,7 +266,7 @@ static efi_status_t setup_efi_vars(struct boot_params *params)
266 while (data && data->next) 266 while (data && data->next)
267 data = (struct setup_data *)(unsigned long)data->next; 267 data = (struct setup_data *)(unsigned long)data->next;
268 268
269 status = efi_call_phys4(sys_table->runtime->query_variable_info, 269 status = efi_call_phys4((void *)sys_table->runtime->query_variable_info,
270 EFI_VARIABLE_NON_VOLATILE | 270 EFI_VARIABLE_NON_VOLATILE |
271 EFI_VARIABLE_BOOTSERVICE_ACCESS | 271 EFI_VARIABLE_BOOTSERVICE_ACCESS |
272 EFI_VARIABLE_RUNTIME_ACCESS, &store_size, 272 EFI_VARIABLE_RUNTIME_ACCESS, &store_size,
diff --git a/crypto/algif_hash.c b/crypto/algif_hash.c
index ef5356cd280a..0262210cad38 100644
--- a/crypto/algif_hash.c
+++ b/crypto/algif_hash.c
@@ -161,6 +161,8 @@ static int hash_recvmsg(struct kiocb *unused, struct socket *sock,
161 else if (len < ds) 161 else if (len < ds)
162 msg->msg_flags |= MSG_TRUNC; 162 msg->msg_flags |= MSG_TRUNC;
163 163
164 msg->msg_namelen = 0;
165
164 lock_sock(sk); 166 lock_sock(sk);
165 if (ctx->more) { 167 if (ctx->more) {
166 ctx->more = 0; 168 ctx->more = 0;
diff --git a/crypto/algif_skcipher.c b/crypto/algif_skcipher.c
index 6a6dfc062d2a..a1c4f0a55583 100644
--- a/crypto/algif_skcipher.c
+++ b/crypto/algif_skcipher.c
@@ -432,6 +432,7 @@ static int skcipher_recvmsg(struct kiocb *unused, struct socket *sock,
432 long copied = 0; 432 long copied = 0;
433 433
434 lock_sock(sk); 434 lock_sock(sk);
435 msg->msg_namelen = 0;
435 for (iov = msg->msg_iov, iovlen = msg->msg_iovlen; iovlen > 0; 436 for (iov = msg->msg_iov, iovlen = msg->msg_iovlen; iovlen > 0;
436 iovlen--, iov++) { 437 iovlen--, iov++) {
437 unsigned long seglen = iov->iov_len; 438 unsigned long seglen = iov->iov_len;
diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c
index 182ce9471175..f4baa11d3644 100644
--- a/drivers/firmware/efivars.c
+++ b/drivers/firmware/efivars.c
@@ -1628,10 +1628,11 @@ static ssize_t efivar_delete(struct file *filp, struct kobject *kobj,
1628 return count; 1628 return count;
1629} 1629}
1630 1630
1631static bool variable_is_present(efi_char16_t *variable_name, efi_guid_t *vendor) 1631static bool variable_is_present(struct efivars *efivars,
1632 efi_char16_t *variable_name,
1633 efi_guid_t *vendor)
1632{ 1634{
1633 struct efivar_entry *entry, *n; 1635 struct efivar_entry *entry, *n;
1634 struct efivars *efivars = &__efivars;
1635 unsigned long strsize1, strsize2; 1636 unsigned long strsize1, strsize2;
1636 bool found = false; 1637 bool found = false;
1637 1638
@@ -1703,8 +1704,8 @@ static void efivar_update_sysfs_entries(struct work_struct *work)
1703 if (status != EFI_SUCCESS) { 1704 if (status != EFI_SUCCESS) {
1704 break; 1705 break;
1705 } else { 1706 } else {
1706 if (!variable_is_present(variable_name, 1707 if (!variable_is_present(efivars,
1707 &vendor)) { 1708 variable_name, &vendor)) {
1708 found = true; 1709 found = true;
1709 break; 1710 break;
1710 } 1711 }
@@ -2008,7 +2009,8 @@ int register_efivars(struct efivars *efivars,
2008 * we'll ever see a different variable name, 2009 * we'll ever see a different variable name,
2009 * and may end up looping here forever. 2010 * and may end up looping here forever.
2010 */ 2011 */
2011 if (variable_is_present(variable_name, &vendor_guid)) { 2012 if (variable_is_present(efivars, variable_name,
2013 &vendor_guid)) {
2012 dup_variable_bug(variable_name, &vendor_guid, 2014 dup_variable_bug(variable_name, &vendor_guid,
2013 variable_name_size); 2015 variable_name_size);
2014 status = EFI_NOT_FOUND; 2016 status = EFI_NOT_FOUND;
diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c
index 9cc108d2b770..8325f580c0f1 100644
--- a/drivers/gpio/gpio-pxa.c
+++ b/drivers/gpio/gpio-pxa.c
@@ -642,7 +642,12 @@ static struct platform_driver pxa_gpio_driver = {
642 .of_match_table = of_match_ptr(pxa_gpio_dt_ids), 642 .of_match_table = of_match_ptr(pxa_gpio_dt_ids),
643 }, 643 },
644}; 644};
645module_platform_driver(pxa_gpio_driver); 645
646static int __init pxa_gpio_init(void)
647{
648 return platform_driver_register(&pxa_gpio_driver);
649}
650postcore_initcall(pxa_gpio_init);
646 651
647#ifdef CONFIG_PM 652#ifdef CONFIG_PM
648static int pxa_gpio_suspend(void) 653static int pxa_gpio_suspend(void)
diff --git a/drivers/media/dvb-frontends/mb86a20s.c b/drivers/media/dvb-frontends/mb86a20s.c
index f19cd7367040..4faaf8053f26 100644
--- a/drivers/media/dvb-frontends/mb86a20s.c
+++ b/drivers/media/dvb-frontends/mb86a20s.c
@@ -610,7 +610,7 @@ static void mb86a20s_layer_bitrate(struct dvb_frontend *fe, u32 layer,
610 __func__, 'A' + layer, segment * isdbt_rate[m][f][i]/1000, 610 __func__, 'A' + layer, segment * isdbt_rate[m][f][i]/1000,
611 rate, rate); 611 rate, rate);
612 612
613 state->estimated_rate[i] = rate; 613 state->estimated_rate[layer] = rate;
614} 614}
615 615
616 616
diff --git a/drivers/media/pci/cx25821/cx25821-video.c b/drivers/media/pci/cx25821/cx25821-video.c
index d4de021dc844..31ce7698acb9 100644
--- a/drivers/media/pci/cx25821/cx25821-video.c
+++ b/drivers/media/pci/cx25821/cx25821-video.c
@@ -461,7 +461,7 @@ int cx25821_video_register(struct cx25821_dev *dev)
461 461
462 spin_lock_init(&dev->slock); 462 spin_lock_init(&dev->slock);
463 463
464 for (i = 0; i < MAX_VID_CHANNEL_NUM - 1; ++i) { 464 for (i = 0; i < VID_CHANNEL_NUM; ++i) {
465 cx25821_init_controls(dev, i); 465 cx25821_init_controls(dev, i);
466 466
467 cx25821_risc_stopper(dev->pci, &dev->channels[i].vidq.stopper, 467 cx25821_risc_stopper(dev->pci, &dev->channels[i].vidq.stopper,
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index 05400acbc456..b0452688308c 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -941,6 +941,14 @@ void start_tty(struct tty_struct *tty)
941 941
942EXPORT_SYMBOL(start_tty); 942EXPORT_SYMBOL(start_tty);
943 943
944static void tty_update_time(struct timespec *time)
945{
946 unsigned long sec = get_seconds();
947 sec -= sec % 60;
948 if ((long)(sec - time->tv_sec) > 0)
949 time->tv_sec = sec;
950}
951
944/** 952/**
945 * tty_read - read method for tty device files 953 * tty_read - read method for tty device files
946 * @file: pointer to tty file 954 * @file: pointer to tty file
@@ -960,10 +968,11 @@ static ssize_t tty_read(struct file *file, char __user *buf, size_t count,
960 loff_t *ppos) 968 loff_t *ppos)
961{ 969{
962 int i; 970 int i;
971 struct inode *inode = file_inode(file);
963 struct tty_struct *tty = file_tty(file); 972 struct tty_struct *tty = file_tty(file);
964 struct tty_ldisc *ld; 973 struct tty_ldisc *ld;
965 974
966 if (tty_paranoia_check(tty, file_inode(file), "tty_read")) 975 if (tty_paranoia_check(tty, inode, "tty_read"))
967 return -EIO; 976 return -EIO;
968 if (!tty || (test_bit(TTY_IO_ERROR, &tty->flags))) 977 if (!tty || (test_bit(TTY_IO_ERROR, &tty->flags)))
969 return -EIO; 978 return -EIO;
@@ -977,6 +986,9 @@ static ssize_t tty_read(struct file *file, char __user *buf, size_t count,
977 i = -EIO; 986 i = -EIO;
978 tty_ldisc_deref(ld); 987 tty_ldisc_deref(ld);
979 988
989 if (i > 0)
990 tty_update_time(&inode->i_atime);
991
980 return i; 992 return i;
981} 993}
982 994
@@ -1077,8 +1089,10 @@ static inline ssize_t do_tty_write(
1077 break; 1089 break;
1078 cond_resched(); 1090 cond_resched();
1079 } 1091 }
1080 if (written) 1092 if (written) {
1093 tty_update_time(&file_inode(file)->i_mtime);
1081 ret = written; 1094 ret = written;
1095 }
1082out: 1096out:
1083 tty_write_unlock(tty); 1097 tty_write_unlock(tty);
1084 return ret; 1098 return ret;
diff --git a/fs/aio.c b/fs/aio.c
index 3f941f2a3059..1dc8786f4588 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -1029,9 +1029,9 @@ static int aio_read_evt(struct kioctx *ioctx, struct io_event *ent)
1029 spin_unlock(&info->ring_lock); 1029 spin_unlock(&info->ring_lock);
1030 1030
1031out: 1031out:
1032 kunmap_atomic(ring);
1033 dprintk("leaving aio_read_evt: %d h%lu t%lu\n", ret, 1032 dprintk("leaving aio_read_evt: %d h%lu t%lu\n", ret,
1034 (unsigned long)ring->head, (unsigned long)ring->tail); 1033 (unsigned long)ring->head, (unsigned long)ring->tail);
1034 kunmap_atomic(ring);
1035 return ret; 1035 return ret;
1036} 1036}
1037 1037
diff --git a/kernel/.gitignore b/kernel/.gitignore
index ab4f1090f437..b3097bde4e9c 100644
--- a/kernel/.gitignore
+++ b/kernel/.gitignore
@@ -4,3 +4,4 @@
4config_data.h 4config_data.h
5config_data.gz 5config_data.gz
6timeconst.h 6timeconst.h
7hz.bc
diff --git a/kernel/events/core.c b/kernel/events/core.c
index 4d3124b39277..9fcb0944f071 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -4596,6 +4596,7 @@ void perf_event_comm(struct task_struct *task)
4596 struct perf_event_context *ctx; 4596 struct perf_event_context *ctx;
4597 int ctxn; 4597 int ctxn;
4598 4598
4599 rcu_read_lock();
4599 for_each_task_context_nr(ctxn) { 4600 for_each_task_context_nr(ctxn) {
4600 ctx = task->perf_event_ctxp[ctxn]; 4601 ctx = task->perf_event_ctxp[ctxn];
4601 if (!ctx) 4602 if (!ctx)
@@ -4603,6 +4604,7 @@ void perf_event_comm(struct task_struct *task)
4603 4604
4604 perf_event_enable_on_exec(ctx); 4605 perf_event_enable_on_exec(ctx);
4605 } 4606 }
4607 rcu_read_unlock();
4606 4608
4607 if (!atomic_read(&nr_comm_events)) 4609 if (!atomic_read(&nr_comm_events))
4608 return; 4610 return;
diff --git a/mm/nommu.c b/mm/nommu.c
index 2f3ea749c318..e001768b14e8 100644
--- a/mm/nommu.c
+++ b/mm/nommu.c
@@ -1838,6 +1838,16 @@ int remap_pfn_range(struct vm_area_struct *vma, unsigned long addr,
1838} 1838}
1839EXPORT_SYMBOL(remap_pfn_range); 1839EXPORT_SYMBOL(remap_pfn_range);
1840 1840
1841int vm_iomap_memory(struct vm_area_struct *vma, phys_addr_t start, unsigned long len)
1842{
1843 unsigned long pfn = start >> PAGE_SHIFT;
1844 unsigned long vm_len = vma->vm_end - vma->vm_start;
1845
1846 pfn += vma->vm_pgoff;
1847 return io_remap_pfn_range(vma, vma->vm_start, pfn, vm_len, vma->vm_page_prot);
1848}
1849EXPORT_SYMBOL(vm_iomap_memory);
1850
1841int remap_vmalloc_range(struct vm_area_struct *vma, void *addr, 1851int remap_vmalloc_range(struct vm_area_struct *vma, void *addr,
1842 unsigned long pgoff) 1852 unsigned long pgoff)
1843{ 1853{
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
index 14094f558e03..1eb152cb1097 100644
--- a/sound/soc/codecs/wm8994.c
+++ b/sound/soc/codecs/wm8994.c
@@ -2882,6 +2882,7 @@ static int wm8994_aif3_hw_params(struct snd_pcm_substream *substream,
2882 default: 2882 default:
2883 return 0; 2883 return 0;
2884 } 2884 }
2885 break;
2885 default: 2886 default:
2886 return 0; 2887 return 0;
2887 } 2888 }
diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c
index 8b85049daab0..56ecfc72f2e9 100644
--- a/sound/soc/davinci/davinci-mcasp.c
+++ b/sound/soc/davinci/davinci-mcasp.c
@@ -505,7 +505,10 @@ static int davinci_mcasp_set_dai_fmt(struct snd_soc_dai *cpu_dai,
505 mcasp_set_bits(base + DAVINCI_MCASP_ACLKRCTL_REG, ACLKRE); 505 mcasp_set_bits(base + DAVINCI_MCASP_ACLKRCTL_REG, ACLKRE);
506 mcasp_set_bits(base + DAVINCI_MCASP_RXFMCTL_REG, AFSRE); 506 mcasp_set_bits(base + DAVINCI_MCASP_RXFMCTL_REG, AFSRE);
507 507
508 mcasp_set_bits(base + DAVINCI_MCASP_PDIR_REG, ACLKX | AFSX); 508 mcasp_set_bits(base + DAVINCI_MCASP_PDIR_REG,
509 ACLKX | ACLKR);
510 mcasp_set_bits(base + DAVINCI_MCASP_PDIR_REG,
511 AFSX | AFSR);
509 break; 512 break;
510 case SND_SOC_DAIFMT_CBM_CFS: 513 case SND_SOC_DAIFMT_CBM_CFS:
511 /* codec is clock master and frame slave */ 514 /* codec is clock master and frame slave */
@@ -565,7 +568,7 @@ static int davinci_mcasp_set_dai_fmt(struct snd_soc_dai *cpu_dai,
565 mcasp_set_bits(base + DAVINCI_MCASP_ACLKXCTL_REG, ACLKXPOL); 568 mcasp_set_bits(base + DAVINCI_MCASP_ACLKXCTL_REG, ACLKXPOL);
566 mcasp_clr_bits(base + DAVINCI_MCASP_TXFMCTL_REG, FSXPOL); 569 mcasp_clr_bits(base + DAVINCI_MCASP_TXFMCTL_REG, FSXPOL);
567 570
568 mcasp_clr_bits(base + DAVINCI_MCASP_ACLKRCTL_REG, ACLKRPOL); 571 mcasp_set_bits(base + DAVINCI_MCASP_ACLKRCTL_REG, ACLKRPOL);
569 mcasp_clr_bits(base + DAVINCI_MCASP_RXFMCTL_REG, FSRPOL); 572 mcasp_clr_bits(base + DAVINCI_MCASP_RXFMCTL_REG, FSRPOL);
570 break; 573 break;
571 574
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 21779a6a781a..a80c883bb8be 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -1095,9 +1095,9 @@ int dapm_clock_event(struct snd_soc_dapm_widget *w,
1095 1095
1096#ifdef CONFIG_HAVE_CLK 1096#ifdef CONFIG_HAVE_CLK
1097 if (SND_SOC_DAPM_EVENT_ON(event)) { 1097 if (SND_SOC_DAPM_EVENT_ON(event)) {
1098 return clk_enable(w->clk); 1098 return clk_prepare_enable(w->clk);
1099 } else { 1099 } else {
1100 clk_disable(w->clk); 1100 clk_disable_unprepare(w->clk);
1101 return 0; 1101 return 0;
1102 } 1102 }
1103#endif 1103#endif