diff options
-rw-r--r-- | arch/powerpc/include/asm/hvcall.h | 22 | ||||
-rw-r--r-- | arch/powerpc/include/asm/irqflags.h | 5 | ||||
-rw-r--r-- | arch/powerpc/include/asm/mmu_context.h | 1 | ||||
-rw-r--r-- | arch/powerpc/include/asm/systbl.h | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/head_32.S | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/lparcfg.c | 5 | ||||
-rw-r--r-- | arch/powerpc/kernel/misc_32.S | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/module.c | 15 | ||||
-rw-r--r-- | arch/powerpc/kernel/sys_ppc32.c | 57 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/plpar_wrappers.h | 27 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/setup.c | 28 | ||||
-rw-r--r-- | arch/sparc64/mm/init.c | 30 | ||||
-rw-r--r-- | drivers/mmc/host/s3cmci.c | 17 | ||||
-rw-r--r-- | drivers/mmc/host/sdricoh_cs.c | 1 | ||||
-rw-r--r-- | include/linux/security.h | 2 | ||||
-rw-r--r-- | lib/lmb.c | 2 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 45 |
17 files changed, 158 insertions, 105 deletions
diff --git a/arch/powerpc/include/asm/hvcall.h b/arch/powerpc/include/asm/hvcall.h index fbe2932fa9e9..6251a4b10be7 100644 --- a/arch/powerpc/include/asm/hvcall.h +++ b/arch/powerpc/include/asm/hvcall.h | |||
@@ -291,6 +291,28 @@ struct hvcall_mpp_data { | |||
291 | }; | 291 | }; |
292 | 292 | ||
293 | int h_get_mpp(struct hvcall_mpp_data *); | 293 | int h_get_mpp(struct hvcall_mpp_data *); |
294 | |||
295 | #ifdef CONFIG_PPC_PSERIES | ||
296 | extern int CMO_PrPSP; | ||
297 | extern int CMO_SecPSP; | ||
298 | extern unsigned long CMO_PageSize; | ||
299 | |||
300 | static inline int cmo_get_primary_psp(void) | ||
301 | { | ||
302 | return CMO_PrPSP; | ||
303 | } | ||
304 | |||
305 | static inline int cmo_get_secondary_psp(void) | ||
306 | { | ||
307 | return CMO_SecPSP; | ||
308 | } | ||
309 | |||
310 | static inline unsigned long cmo_get_page_size(void) | ||
311 | { | ||
312 | return CMO_PageSize; | ||
313 | } | ||
314 | #endif /* CONFIG_PPC_PSERIES */ | ||
315 | |||
294 | #endif /* __ASSEMBLY__ */ | 316 | #endif /* __ASSEMBLY__ */ |
295 | #endif /* __KERNEL__ */ | 317 | #endif /* __KERNEL__ */ |
296 | #endif /* _ASM_POWERPC_HVCALL_H */ | 318 | #endif /* _ASM_POWERPC_HVCALL_H */ |
diff --git a/arch/powerpc/include/asm/irqflags.h b/arch/powerpc/include/asm/irqflags.h index 17ba3a881bfd..5f68ecfdf516 100644 --- a/arch/powerpc/include/asm/irqflags.h +++ b/arch/powerpc/include/asm/irqflags.h | |||
@@ -20,7 +20,7 @@ | |||
20 | #define TRACE_ENABLE_INTS bl .trace_hardirqs_on | 20 | #define TRACE_ENABLE_INTS bl .trace_hardirqs_on |
21 | #define TRACE_DISABLE_INTS bl .trace_hardirqs_off | 21 | #define TRACE_DISABLE_INTS bl .trace_hardirqs_off |
22 | #define TRACE_AND_RESTORE_IRQ_PARTIAL(en,skip) \ | 22 | #define TRACE_AND_RESTORE_IRQ_PARTIAL(en,skip) \ |
23 | cmpdi en, 0; \ | 23 | cmpdi en,0; \ |
24 | bne 95f; \ | 24 | bne 95f; \ |
25 | stb en,PACASOFTIRQEN(r13); \ | 25 | stb en,PACASOFTIRQEN(r13); \ |
26 | bl .trace_hardirqs_off; \ | 26 | bl .trace_hardirqs_off; \ |
@@ -29,7 +29,8 @@ | |||
29 | li en,1; | 29 | li en,1; |
30 | #define TRACE_AND_RESTORE_IRQ(en) \ | 30 | #define TRACE_AND_RESTORE_IRQ(en) \ |
31 | TRACE_AND_RESTORE_IRQ_PARTIAL(en,96f); \ | 31 | TRACE_AND_RESTORE_IRQ_PARTIAL(en,96f); \ |
32 | 96: stb en,PACASOFTIRQEN(r13) | 32 | stb en,PACASOFTIRQEN(r13); \ |
33 | 96: | ||
33 | #else | 34 | #else |
34 | #define TRACE_ENABLE_INTS | 35 | #define TRACE_ENABLE_INTS |
35 | #define TRACE_DISABLE_INTS | 36 | #define TRACE_DISABLE_INTS |
diff --git a/arch/powerpc/include/asm/mmu_context.h b/arch/powerpc/include/asm/mmu_context.h index 9102b8bf0ead..6b993ef452ff 100644 --- a/arch/powerpc/include/asm/mmu_context.h +++ b/arch/powerpc/include/asm/mmu_context.h | |||
@@ -147,7 +147,6 @@ static inline void get_mmu_context(struct mm_struct *mm) | |||
147 | static inline int init_new_context(struct task_struct *t, struct mm_struct *mm) | 147 | static inline int init_new_context(struct task_struct *t, struct mm_struct *mm) |
148 | { | 148 | { |
149 | mm->context.id = NO_CONTEXT; | 149 | mm->context.id = NO_CONTEXT; |
150 | mm->context.vdso_base = 0; | ||
151 | return 0; | 150 | return 0; |
152 | } | 151 | } |
153 | 152 | ||
diff --git a/arch/powerpc/include/asm/systbl.h b/arch/powerpc/include/asm/systbl.h index e084272ed1c2..f6cc7a43b4fa 100644 --- a/arch/powerpc/include/asm/systbl.h +++ b/arch/powerpc/include/asm/systbl.h | |||
@@ -92,7 +92,7 @@ COMPAT_SYS_SPU(readlink) | |||
92 | SYSCALL(uselib) | 92 | SYSCALL(uselib) |
93 | SYSCALL(swapon) | 93 | SYSCALL(swapon) |
94 | SYSCALL(reboot) | 94 | SYSCALL(reboot) |
95 | SYSX(sys_ni_syscall,old32_readdir,old_readdir) | 95 | SYSX(sys_ni_syscall,compat_sys_old_readdir,old_readdir) |
96 | SYSCALL_SPU(mmap) | 96 | SYSCALL_SPU(mmap) |
97 | SYSCALL_SPU(munmap) | 97 | SYSCALL_SPU(munmap) |
98 | SYSCALL_SPU(truncate) | 98 | SYSCALL_SPU(truncate) |
diff --git a/arch/powerpc/kernel/head_32.S b/arch/powerpc/kernel/head_32.S index 99ee2f0f0f2b..8bb657519299 100644 --- a/arch/powerpc/kernel/head_32.S +++ b/arch/powerpc/kernel/head_32.S | |||
@@ -1155,7 +1155,7 @@ flush_tlbs: | |||
1155 | lis r10, 0x40 | 1155 | lis r10, 0x40 |
1156 | 1: addic. r10, r10, -0x1000 | 1156 | 1: addic. r10, r10, -0x1000 |
1157 | tlbie r10 | 1157 | tlbie r10 |
1158 | blt 1b | 1158 | bgt 1b |
1159 | sync | 1159 | sync |
1160 | blr | 1160 | blr |
1161 | 1161 | ||
diff --git a/arch/powerpc/kernel/lparcfg.c b/arch/powerpc/kernel/lparcfg.c index 1a09719c7628..b3eef30b5131 100644 --- a/arch/powerpc/kernel/lparcfg.c +++ b/arch/powerpc/kernel/lparcfg.c | |||
@@ -416,6 +416,8 @@ static void pseries_cmo_data(struct seq_file *m) | |||
416 | unsigned long cmo_faults = 0; | 416 | unsigned long cmo_faults = 0; |
417 | unsigned long cmo_fault_time = 0; | 417 | unsigned long cmo_fault_time = 0; |
418 | 418 | ||
419 | seq_printf(m, "cmo_enabled=%d\n", firmware_has_feature(FW_FEATURE_CMO)); | ||
420 | |||
419 | if (!firmware_has_feature(FW_FEATURE_CMO)) | 421 | if (!firmware_has_feature(FW_FEATURE_CMO)) |
420 | return; | 422 | return; |
421 | 423 | ||
@@ -427,6 +429,9 @@ static void pseries_cmo_data(struct seq_file *m) | |||
427 | seq_printf(m, "cmo_faults=%lu\n", cmo_faults); | 429 | seq_printf(m, "cmo_faults=%lu\n", cmo_faults); |
428 | seq_printf(m, "cmo_fault_time_usec=%lu\n", | 430 | seq_printf(m, "cmo_fault_time_usec=%lu\n", |
429 | cmo_fault_time / tb_ticks_per_usec); | 431 | cmo_fault_time / tb_ticks_per_usec); |
432 | seq_printf(m, "cmo_primary_psp=%d\n", cmo_get_primary_psp()); | ||
433 | seq_printf(m, "cmo_secondary_psp=%d\n", cmo_get_secondary_psp()); | ||
434 | seq_printf(m, "cmo_page_size=%lu\n", cmo_get_page_size()); | ||
430 | } | 435 | } |
431 | 436 | ||
432 | static int pseries_lparcfg_data(struct seq_file *m, void *v) | 437 | static int pseries_lparcfg_data(struct seq_file *m, void *v) |
diff --git a/arch/powerpc/kernel/misc_32.S b/arch/powerpc/kernel/misc_32.S index 6321ae36f729..7a6dfbca7682 100644 --- a/arch/powerpc/kernel/misc_32.S +++ b/arch/powerpc/kernel/misc_32.S | |||
@@ -899,7 +899,7 @@ relocate_new_kernel: | |||
899 | 899 | ||
900 | /* set a new stack at the bottom of our page... */ | 900 | /* set a new stack at the bottom of our page... */ |
901 | /* (not really needed now) */ | 901 | /* (not really needed now) */ |
902 | addi r1, r4, KEXEC_CONTROL_CODE_SIZE - 8 /* for LR Save+Back Chain */ | 902 | addi r1, r4, KEXEC_CONTROL_PAGE_SIZE - 8 /* for LR Save+Back Chain */ |
903 | stw r0, 0(r1) | 903 | stw r0, 0(r1) |
904 | 904 | ||
905 | /* Do the copies */ | 905 | /* Do the copies */ |
diff --git a/arch/powerpc/kernel/module.c b/arch/powerpc/kernel/module.c index af07003573c4..7ff292475269 100644 --- a/arch/powerpc/kernel/module.c +++ b/arch/powerpc/kernel/module.c | |||
@@ -99,18 +99,3 @@ void module_arch_cleanup(struct module *mod) | |||
99 | { | 99 | { |
100 | module_bug_cleanup(mod); | 100 | module_bug_cleanup(mod); |
101 | } | 101 | } |
102 | |||
103 | struct bug_entry *module_find_bug(unsigned long bugaddr) | ||
104 | { | ||
105 | struct mod_arch_specific *mod; | ||
106 | unsigned int i; | ||
107 | struct bug_entry *bug; | ||
108 | |||
109 | list_for_each_entry(mod, &module_bug_list, bug_list) { | ||
110 | bug = mod->bug_table; | ||
111 | for (i = 0; i < mod->num_bugs; ++i, ++bug) | ||
112 | if (bugaddr == bug->bug_addr) | ||
113 | return bug; | ||
114 | } | ||
115 | return NULL; | ||
116 | } | ||
diff --git a/arch/powerpc/kernel/sys_ppc32.c b/arch/powerpc/kernel/sys_ppc32.c index 709f8cb8bfca..d98634c76060 100644 --- a/arch/powerpc/kernel/sys_ppc32.c +++ b/arch/powerpc/kernel/sys_ppc32.c | |||
@@ -52,63 +52,6 @@ | |||
52 | #include <asm/ppc-pci.h> | 52 | #include <asm/ppc-pci.h> |
53 | #include <asm/syscalls.h> | 53 | #include <asm/syscalls.h> |
54 | 54 | ||
55 | struct old_linux_dirent32 { | ||
56 | u32 d_ino; | ||
57 | u32 d_offset; | ||
58 | unsigned short d_namlen; | ||
59 | char d_name[1]; | ||
60 | }; | ||
61 | |||
62 | struct readdir_callback32 { | ||
63 | struct old_linux_dirent32 __user * dirent; | ||
64 | int count; | ||
65 | }; | ||
66 | |||
67 | static int fillonedir(void * __buf, const char * name, int namlen, | ||
68 | off_t offset, u64 ino, unsigned int d_type) | ||
69 | { | ||
70 | struct readdir_callback32 * buf = (struct readdir_callback32 *) __buf; | ||
71 | struct old_linux_dirent32 __user * dirent; | ||
72 | ino_t d_ino; | ||
73 | |||
74 | if (buf->count) | ||
75 | return -EINVAL; | ||
76 | d_ino = ino; | ||
77 | if (sizeof(d_ino) < sizeof(ino) && d_ino != ino) | ||
78 | return -EOVERFLOW; | ||
79 | buf->count++; | ||
80 | dirent = buf->dirent; | ||
81 | put_user(d_ino, &dirent->d_ino); | ||
82 | put_user(offset, &dirent->d_offset); | ||
83 | put_user(namlen, &dirent->d_namlen); | ||
84 | copy_to_user(dirent->d_name, name, namlen); | ||
85 | put_user(0, dirent->d_name + namlen); | ||
86 | return 0; | ||
87 | } | ||
88 | |||
89 | asmlinkage int old32_readdir(unsigned int fd, struct old_linux_dirent32 __user *dirent, unsigned int count) | ||
90 | { | ||
91 | int error = -EBADF; | ||
92 | struct file * file; | ||
93 | struct readdir_callback32 buf; | ||
94 | |||
95 | file = fget(fd); | ||
96 | if (!file) | ||
97 | goto out; | ||
98 | |||
99 | buf.count = 0; | ||
100 | buf.dirent = dirent; | ||
101 | |||
102 | error = vfs_readdir(file, (filldir_t)fillonedir, &buf); | ||
103 | if (error < 0) | ||
104 | goto out_putf; | ||
105 | error = buf.count; | ||
106 | |||
107 | out_putf: | ||
108 | fput(file); | ||
109 | out: | ||
110 | return error; | ||
111 | } | ||
112 | 55 | ||
113 | asmlinkage long ppc32_select(u32 n, compat_ulong_t __user *inp, | 56 | asmlinkage long ppc32_select(u32 n, compat_ulong_t __user *inp, |
114 | compat_ulong_t __user *outp, compat_ulong_t __user *exp, | 57 | compat_ulong_t __user *outp, compat_ulong_t __user *exp, |
diff --git a/arch/powerpc/platforms/pseries/plpar_wrappers.h b/arch/powerpc/platforms/pseries/plpar_wrappers.h index a437267c6bf8..d967c1893ab5 100644 --- a/arch/powerpc/platforms/pseries/plpar_wrappers.h +++ b/arch/powerpc/platforms/pseries/plpar_wrappers.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _PSERIES_PLPAR_WRAPPERS_H | 2 | #define _PSERIES_PLPAR_WRAPPERS_H |
3 | 3 | ||
4 | #include <asm/hvcall.h> | 4 | #include <asm/hvcall.h> |
5 | #include <asm/page.h> | ||
5 | 6 | ||
6 | static inline long poll_pending(void) | 7 | static inline long poll_pending(void) |
7 | { | 8 | { |
@@ -44,12 +45,34 @@ static inline long register_slb_shadow(unsigned long cpu, unsigned long vpa) | |||
44 | 45 | ||
45 | static inline long plpar_page_set_loaned(unsigned long vpa) | 46 | static inline long plpar_page_set_loaned(unsigned long vpa) |
46 | { | 47 | { |
47 | return plpar_hcall_norets(H_PAGE_INIT, H_PAGE_SET_LOANED, vpa, 0); | 48 | unsigned long cmo_page_sz = cmo_get_page_size(); |
49 | long rc = 0; | ||
50 | int i; | ||
51 | |||
52 | for (i = 0; !rc && i < PAGE_SIZE; i += cmo_page_sz) | ||
53 | rc = plpar_hcall_norets(H_PAGE_INIT, H_PAGE_SET_LOANED, vpa + i, 0); | ||
54 | |||
55 | for (i -= cmo_page_sz; rc && i != 0; i -= cmo_page_sz) | ||
56 | plpar_hcall_norets(H_PAGE_INIT, H_PAGE_SET_ACTIVE, | ||
57 | vpa + i - cmo_page_sz, 0); | ||
58 | |||
59 | return rc; | ||
48 | } | 60 | } |
49 | 61 | ||
50 | static inline long plpar_page_set_active(unsigned long vpa) | 62 | static inline long plpar_page_set_active(unsigned long vpa) |
51 | { | 63 | { |
52 | return plpar_hcall_norets(H_PAGE_INIT, H_PAGE_SET_ACTIVE, vpa, 0); | 64 | unsigned long cmo_page_sz = cmo_get_page_size(); |
65 | long rc = 0; | ||
66 | int i; | ||
67 | |||
68 | for (i = 0; !rc && i < PAGE_SIZE; i += cmo_page_sz) | ||
69 | rc = plpar_hcall_norets(H_PAGE_INIT, H_PAGE_SET_ACTIVE, vpa + i, 0); | ||
70 | |||
71 | for (i -= cmo_page_sz; rc && i != 0; i -= cmo_page_sz) | ||
72 | plpar_hcall_norets(H_PAGE_INIT, H_PAGE_SET_LOANED, | ||
73 | vpa + i - cmo_page_sz, 0); | ||
74 | |||
75 | return rc; | ||
53 | } | 76 | } |
54 | 77 | ||
55 | extern void vpa_init(int cpu); | 78 | extern void vpa_init(int cpu); |
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index 063a0d2fba30..3ce8a139b85d 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c | |||
@@ -68,6 +68,9 @@ | |||
68 | #include "plpar_wrappers.h" | 68 | #include "plpar_wrappers.h" |
69 | #include "pseries.h" | 69 | #include "pseries.h" |
70 | 70 | ||
71 | int CMO_PrPSP = -1; | ||
72 | int CMO_SecPSP = -1; | ||
73 | unsigned long CMO_PageSize = (ASM_CONST(1) << IOMMU_PAGE_SHIFT); | ||
71 | 74 | ||
72 | int fwnmi_active; /* TRUE if an FWNMI handler is present */ | 75 | int fwnmi_active; /* TRUE if an FWNMI handler is present */ |
73 | 76 | ||
@@ -325,8 +328,7 @@ void pSeries_cmo_feature_init(void) | |||
325 | { | 328 | { |
326 | char *ptr, *key, *value, *end; | 329 | char *ptr, *key, *value, *end; |
327 | int call_status; | 330 | int call_status; |
328 | int PrPSP = -1; | 331 | int page_order = IOMMU_PAGE_SHIFT; |
329 | int SecPSP = -1; | ||
330 | 332 | ||
331 | pr_debug(" -> fw_cmo_feature_init()\n"); | 333 | pr_debug(" -> fw_cmo_feature_init()\n"); |
332 | spin_lock(&rtas_data_buf_lock); | 334 | spin_lock(&rtas_data_buf_lock); |
@@ -365,21 +367,31 @@ void pSeries_cmo_feature_init(void) | |||
365 | break; | 367 | break; |
366 | } | 368 | } |
367 | 369 | ||
368 | if (0 == strcmp(key, "PrPSP")) | 370 | if (0 == strcmp(key, "CMOPageSize")) |
369 | PrPSP = simple_strtol(value, NULL, 10); | 371 | page_order = simple_strtol(value, NULL, 10); |
372 | else if (0 == strcmp(key, "PrPSP")) | ||
373 | CMO_PrPSP = simple_strtol(value, NULL, 10); | ||
370 | else if (0 == strcmp(key, "SecPSP")) | 374 | else if (0 == strcmp(key, "SecPSP")) |
371 | SecPSP = simple_strtol(value, NULL, 10); | 375 | CMO_SecPSP = simple_strtol(value, NULL, 10); |
372 | value = key = ptr + 1; | 376 | value = key = ptr + 1; |
373 | } | 377 | } |
374 | ptr++; | 378 | ptr++; |
375 | } | 379 | } |
376 | 380 | ||
377 | if (PrPSP != -1 || SecPSP != -1) { | 381 | /* Page size is returned as the power of 2 of the page size, |
382 | * convert to the page size in bytes before returning | ||
383 | */ | ||
384 | CMO_PageSize = 1 << page_order; | ||
385 | pr_debug("CMO_PageSize = %lu\n", CMO_PageSize); | ||
386 | |||
387 | if (CMO_PrPSP != -1 || CMO_SecPSP != -1) { | ||
378 | pr_info("CMO enabled\n"); | 388 | pr_info("CMO enabled\n"); |
379 | pr_debug("CMO enabled, PrPSP=%d, SecPSP=%d\n", PrPSP, SecPSP); | 389 | pr_debug("CMO enabled, PrPSP=%d, SecPSP=%d\n", CMO_PrPSP, |
390 | CMO_SecPSP); | ||
380 | powerpc_firmware_features |= FW_FEATURE_CMO; | 391 | powerpc_firmware_features |= FW_FEATURE_CMO; |
381 | } else | 392 | } else |
382 | pr_debug("CMO not enabled, PrPSP=%d, SecPSP=%d\n", PrPSP, SecPSP); | 393 | pr_debug("CMO not enabled, PrPSP=%d, SecPSP=%d\n", CMO_PrPSP, |
394 | CMO_SecPSP); | ||
383 | spin_unlock(&rtas_data_buf_lock); | 395 | spin_unlock(&rtas_data_buf_lock); |
384 | pr_debug(" <- fw_cmo_feature_init()\n"); | 396 | pr_debug(" <- fw_cmo_feature_init()\n"); |
385 | } | 397 | } |
diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c index 217de3ea29e8..b4aeb0f696dc 100644 --- a/arch/sparc64/mm/init.c +++ b/arch/sparc64/mm/init.c | |||
@@ -796,6 +796,9 @@ static unsigned long nid_range(unsigned long start, unsigned long end, | |||
796 | start += PAGE_SIZE; | 796 | start += PAGE_SIZE; |
797 | } | 797 | } |
798 | 798 | ||
799 | if (start > end) | ||
800 | start = end; | ||
801 | |||
799 | return start; | 802 | return start; |
800 | } | 803 | } |
801 | #else | 804 | #else |
@@ -1723,8 +1726,7 @@ void __init paging_init(void) | |||
1723 | 1726 | ||
1724 | find_ramdisk(phys_base); | 1727 | find_ramdisk(phys_base); |
1725 | 1728 | ||
1726 | if (cmdline_memory_size) | 1729 | lmb_enforce_memory_limit(cmdline_memory_size); |
1727 | lmb_enforce_memory_limit(phys_base + cmdline_memory_size); | ||
1728 | 1730 | ||
1729 | lmb_analyze(); | 1731 | lmb_analyze(); |
1730 | lmb_dump_all(); | 1732 | lmb_dump_all(); |
@@ -1961,6 +1963,15 @@ void __init mem_init(void) | |||
1961 | void free_initmem(void) | 1963 | void free_initmem(void) |
1962 | { | 1964 | { |
1963 | unsigned long addr, initend; | 1965 | unsigned long addr, initend; |
1966 | int do_free = 1; | ||
1967 | |||
1968 | /* If the physical memory maps were trimmed by kernel command | ||
1969 | * line options, don't even try freeing this initmem stuff up. | ||
1970 | * The kernel image could have been in the trimmed out region | ||
1971 | * and if so the freeing below will free invalid page structs. | ||
1972 | */ | ||
1973 | if (cmdline_memory_size) | ||
1974 | do_free = 0; | ||
1964 | 1975 | ||
1965 | /* | 1976 | /* |
1966 | * The init section is aligned to 8k in vmlinux.lds. Page align for >8k pagesizes. | 1977 | * The init section is aligned to 8k in vmlinux.lds. Page align for >8k pagesizes. |
@@ -1975,13 +1986,16 @@ void free_initmem(void) | |||
1975 | ((unsigned long) __va(kern_base)) - | 1986 | ((unsigned long) __va(kern_base)) - |
1976 | ((unsigned long) KERNBASE)); | 1987 | ((unsigned long) KERNBASE)); |
1977 | memset((void *)addr, POISON_FREE_INITMEM, PAGE_SIZE); | 1988 | memset((void *)addr, POISON_FREE_INITMEM, PAGE_SIZE); |
1978 | p = virt_to_page(page); | ||
1979 | 1989 | ||
1980 | ClearPageReserved(p); | 1990 | if (do_free) { |
1981 | init_page_count(p); | 1991 | p = virt_to_page(page); |
1982 | __free_page(p); | 1992 | |
1983 | num_physpages++; | 1993 | ClearPageReserved(p); |
1984 | totalram_pages++; | 1994 | init_page_count(p); |
1995 | __free_page(p); | ||
1996 | num_physpages++; | ||
1997 | totalram_pages++; | ||
1998 | } | ||
1985 | } | 1999 | } |
1986 | } | 2000 | } |
1987 | 2001 | ||
diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c index 7c994e1ae276..ae16d845d746 100644 --- a/drivers/mmc/host/s3cmci.c +++ b/drivers/mmc/host/s3cmci.c | |||
@@ -595,8 +595,9 @@ static irqreturn_t s3cmci_irq_cd(int irq, void *dev_id) | |||
595 | return IRQ_HANDLED; | 595 | return IRQ_HANDLED; |
596 | } | 596 | } |
597 | 597 | ||
598 | void s3cmci_dma_done_callback(struct s3c2410_dma_chan *dma_ch, void *buf_id, | 598 | static void s3cmci_dma_done_callback(struct s3c2410_dma_chan *dma_ch, |
599 | int size, enum s3c2410_dma_buffresult result) | 599 | void *buf_id, int size, |
600 | enum s3c2410_dma_buffresult result) | ||
600 | { | 601 | { |
601 | struct s3cmci_host *host = buf_id; | 602 | struct s3cmci_host *host = buf_id; |
602 | unsigned long iflags; | 603 | unsigned long iflags; |
@@ -740,8 +741,8 @@ request_done: | |||
740 | mmc_request_done(host->mmc, mrq); | 741 | mmc_request_done(host->mmc, mrq); |
741 | } | 742 | } |
742 | 743 | ||
743 | 744 | static void s3cmci_dma_setup(struct s3cmci_host *host, | |
744 | void s3cmci_dma_setup(struct s3cmci_host *host, enum s3c2410_dmasrc source) | 745 | enum s3c2410_dmasrc source) |
745 | { | 746 | { |
746 | static enum s3c2410_dmasrc last_source = -1; | 747 | static enum s3c2410_dmasrc last_source = -1; |
747 | static int setup_ok; | 748 | static int setup_ok; |
@@ -1003,8 +1004,9 @@ static void s3cmci_send_request(struct mmc_host *mmc) | |||
1003 | enable_irq(host->irq); | 1004 | enable_irq(host->irq); |
1004 | } | 1005 | } |
1005 | 1006 | ||
1006 | static int s3cmci_card_present(struct s3cmci_host *host) | 1007 | static int s3cmci_card_present(struct mmc_host *mmc) |
1007 | { | 1008 | { |
1009 | struct s3cmci_host *host = mmc_priv(mmc); | ||
1008 | struct s3c24xx_mci_pdata *pdata = host->pdata; | 1010 | struct s3c24xx_mci_pdata *pdata = host->pdata; |
1009 | int ret; | 1011 | int ret; |
1010 | 1012 | ||
@@ -1023,7 +1025,7 @@ static void s3cmci_request(struct mmc_host *mmc, struct mmc_request *mrq) | |||
1023 | host->cmd_is_stop = 0; | 1025 | host->cmd_is_stop = 0; |
1024 | host->mrq = mrq; | 1026 | host->mrq = mrq; |
1025 | 1027 | ||
1026 | if (s3cmci_card_present(host) == 0) { | 1028 | if (s3cmci_card_present(mmc) == 0) { |
1027 | dbg(host, dbg_err, "%s: no medium present\n", __func__); | 1029 | dbg(host, dbg_err, "%s: no medium present\n", __func__); |
1028 | host->mrq->cmd->error = -ENOMEDIUM; | 1030 | host->mrq->cmd->error = -ENOMEDIUM; |
1029 | mmc_request_done(mmc, mrq); | 1031 | mmc_request_done(mmc, mrq); |
@@ -1138,6 +1140,7 @@ static struct mmc_host_ops s3cmci_ops = { | |||
1138 | .request = s3cmci_request, | 1140 | .request = s3cmci_request, |
1139 | .set_ios = s3cmci_set_ios, | 1141 | .set_ios = s3cmci_set_ios, |
1140 | .get_ro = s3cmci_get_ro, | 1142 | .get_ro = s3cmci_get_ro, |
1143 | .get_cd = s3cmci_card_present, | ||
1141 | }; | 1144 | }; |
1142 | 1145 | ||
1143 | static struct s3c24xx_mci_pdata s3cmci_def_pdata = { | 1146 | static struct s3c24xx_mci_pdata s3cmci_def_pdata = { |
@@ -1206,7 +1209,7 @@ static int __devinit s3cmci_probe(struct platform_device *pdev, int is2440) | |||
1206 | } | 1209 | } |
1207 | 1210 | ||
1208 | host->base = ioremap(host->mem->start, RESSIZE(host->mem)); | 1211 | host->base = ioremap(host->mem->start, RESSIZE(host->mem)); |
1209 | if (host->base == 0) { | 1212 | if (!host->base) { |
1210 | dev_err(&pdev->dev, "failed to ioremap() io memory region.\n"); | 1213 | dev_err(&pdev->dev, "failed to ioremap() io memory region.\n"); |
1211 | ret = -EINVAL; | 1214 | ret = -EINVAL; |
1212 | goto probe_free_mem_region; | 1215 | goto probe_free_mem_region; |
diff --git a/drivers/mmc/host/sdricoh_cs.c b/drivers/mmc/host/sdricoh_cs.c index f99e9f721629..1df44d966bdb 100644 --- a/drivers/mmc/host/sdricoh_cs.c +++ b/drivers/mmc/host/sdricoh_cs.c | |||
@@ -29,7 +29,6 @@ | |||
29 | #include <linux/pci.h> | 29 | #include <linux/pci.h> |
30 | #include <linux/ioport.h> | 30 | #include <linux/ioport.h> |
31 | #include <linux/scatterlist.h> | 31 | #include <linux/scatterlist.h> |
32 | #include <linux/version.h> | ||
33 | 32 | ||
34 | #include <pcmcia/cs_types.h> | 33 | #include <pcmcia/cs_types.h> |
35 | #include <pcmcia/cs.h> | 34 | #include <pcmcia/cs.h> |
diff --git a/include/linux/security.h b/include/linux/security.h index 2ee5ecfb2393..80c4d002864c 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -1755,7 +1755,7 @@ static inline int security_ptrace_may_access(struct task_struct *child, | |||
1755 | return cap_ptrace_may_access(child, mode); | 1755 | return cap_ptrace_may_access(child, mode); |
1756 | } | 1756 | } |
1757 | 1757 | ||
1758 | static inline int security_ptrace_traceme(struct task_struct *child) | 1758 | static inline int security_ptrace_traceme(struct task_struct *parent) |
1759 | { | 1759 | { |
1760 | return cap_ptrace_traceme(parent); | 1760 | return cap_ptrace_traceme(parent); |
1761 | } | 1761 | } |
@@ -462,6 +462,8 @@ void __init lmb_enforce_memory_limit(u64 memory_limit) | |||
462 | if (lmb.memory.region[0].size < lmb.rmo_size) | 462 | if (lmb.memory.region[0].size < lmb.rmo_size) |
463 | lmb.rmo_size = lmb.memory.region[0].size; | 463 | lmb.rmo_size = lmb.memory.region[0].size; |
464 | 464 | ||
465 | memory_limit = lmb_end_of_DRAM(); | ||
466 | |||
465 | /* And truncate any reserves above the limit also. */ | 467 | /* And truncate any reserves above the limit also. */ |
466 | for (i = 0; i < lmb.reserved.cnt; i++) { | 468 | for (i = 0; i < lmb.reserved.cnt; i++) { |
467 | p = &lmb.reserved.region[i]; | 469 | p = &lmb.reserved.region[i]; |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index add4e87e0b20..b80e725432f0 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -6437,6 +6437,39 @@ static void alc882_auto_init_analog_input(struct hda_codec *codec) | |||
6437 | } | 6437 | } |
6438 | } | 6438 | } |
6439 | 6439 | ||
6440 | static void alc882_auto_init_input_src(struct hda_codec *codec) | ||
6441 | { | ||
6442 | struct alc_spec *spec = codec->spec; | ||
6443 | const struct hda_input_mux *imux = spec->input_mux; | ||
6444 | int c; | ||
6445 | |||
6446 | for (c = 0; c < spec->num_adc_nids; c++) { | ||
6447 | hda_nid_t conn_list[HDA_MAX_NUM_INPUTS]; | ||
6448 | hda_nid_t nid = spec->capsrc_nids[c]; | ||
6449 | int conns, mute, idx, item; | ||
6450 | |||
6451 | conns = snd_hda_get_connections(codec, nid, conn_list, | ||
6452 | ARRAY_SIZE(conn_list)); | ||
6453 | if (conns < 0) | ||
6454 | continue; | ||
6455 | for (idx = 0; idx < conns; idx++) { | ||
6456 | /* if the current connection is the selected one, | ||
6457 | * unmute it as default - otherwise mute it | ||
6458 | */ | ||
6459 | mute = AMP_IN_MUTE(idx); | ||
6460 | for (item = 0; item < imux->num_items; item++) { | ||
6461 | if (imux->items[item].index == idx) { | ||
6462 | if (spec->cur_mux[c] == item) | ||
6463 | mute = AMP_IN_UNMUTE(idx); | ||
6464 | break; | ||
6465 | } | ||
6466 | } | ||
6467 | snd_hda_codec_write(codec, nid, 0, | ||
6468 | AC_VERB_SET_AMP_GAIN_MUTE, mute); | ||
6469 | } | ||
6470 | } | ||
6471 | } | ||
6472 | |||
6440 | /* add mic boosts if needed */ | 6473 | /* add mic boosts if needed */ |
6441 | static int alc_auto_add_mic_boost(struct hda_codec *codec) | 6474 | static int alc_auto_add_mic_boost(struct hda_codec *codec) |
6442 | { | 6475 | { |
@@ -6491,6 +6524,7 @@ static void alc882_auto_init(struct hda_codec *codec) | |||
6491 | alc882_auto_init_multi_out(codec); | 6524 | alc882_auto_init_multi_out(codec); |
6492 | alc882_auto_init_hp_out(codec); | 6525 | alc882_auto_init_hp_out(codec); |
6493 | alc882_auto_init_analog_input(codec); | 6526 | alc882_auto_init_analog_input(codec); |
6527 | alc882_auto_init_input_src(codec); | ||
6494 | if (spec->unsol_event) | 6528 | if (spec->unsol_event) |
6495 | alc_sku_automute(codec); | 6529 | alc_sku_automute(codec); |
6496 | } | 6530 | } |
@@ -8285,6 +8319,8 @@ static void alc883_auto_init_analog_input(struct hda_codec *codec) | |||
8285 | } | 8319 | } |
8286 | } | 8320 | } |
8287 | 8321 | ||
8322 | #define alc883_auto_init_input_src alc882_auto_init_input_src | ||
8323 | |||
8288 | /* almost identical with ALC880 parser... */ | 8324 | /* almost identical with ALC880 parser... */ |
8289 | static int alc883_parse_auto_config(struct hda_codec *codec) | 8325 | static int alc883_parse_auto_config(struct hda_codec *codec) |
8290 | { | 8326 | { |
@@ -8315,6 +8351,7 @@ static void alc883_auto_init(struct hda_codec *codec) | |||
8315 | alc883_auto_init_multi_out(codec); | 8351 | alc883_auto_init_multi_out(codec); |
8316 | alc883_auto_init_hp_out(codec); | 8352 | alc883_auto_init_hp_out(codec); |
8317 | alc883_auto_init_analog_input(codec); | 8353 | alc883_auto_init_analog_input(codec); |
8354 | alc883_auto_init_input_src(codec); | ||
8318 | if (spec->unsol_event) | 8355 | if (spec->unsol_event) |
8319 | alc_sku_automute(codec); | 8356 | alc_sku_automute(codec); |
8320 | } | 8357 | } |
@@ -9663,6 +9700,7 @@ static int alc262_parse_auto_config(struct hda_codec *codec) | |||
9663 | #define alc262_auto_init_multi_out alc882_auto_init_multi_out | 9700 | #define alc262_auto_init_multi_out alc882_auto_init_multi_out |
9664 | #define alc262_auto_init_hp_out alc882_auto_init_hp_out | 9701 | #define alc262_auto_init_hp_out alc882_auto_init_hp_out |
9665 | #define alc262_auto_init_analog_input alc882_auto_init_analog_input | 9702 | #define alc262_auto_init_analog_input alc882_auto_init_analog_input |
9703 | #define alc262_auto_init_input_src alc882_auto_init_input_src | ||
9666 | 9704 | ||
9667 | 9705 | ||
9668 | /* init callback for auto-configuration model -- overriding the default init */ | 9706 | /* init callback for auto-configuration model -- overriding the default init */ |
@@ -9672,6 +9710,7 @@ static void alc262_auto_init(struct hda_codec *codec) | |||
9672 | alc262_auto_init_multi_out(codec); | 9710 | alc262_auto_init_multi_out(codec); |
9673 | alc262_auto_init_hp_out(codec); | 9711 | alc262_auto_init_hp_out(codec); |
9674 | alc262_auto_init_analog_input(codec); | 9712 | alc262_auto_init_analog_input(codec); |
9713 | alc262_auto_init_input_src(codec); | ||
9675 | if (spec->unsol_event) | 9714 | if (spec->unsol_event) |
9676 | alc_sku_automute(codec); | 9715 | alc_sku_automute(codec); |
9677 | } | 9716 | } |
@@ -13330,6 +13369,8 @@ static void alc861vd_auto_init_analog_input(struct hda_codec *codec) | |||
13330 | } | 13369 | } |
13331 | } | 13370 | } |
13332 | 13371 | ||
13372 | #define alc861vd_auto_init_input_src alc882_auto_init_input_src | ||
13373 | |||
13333 | #define alc861vd_idx_to_mixer_vol(nid) ((nid) + 0x02) | 13374 | #define alc861vd_idx_to_mixer_vol(nid) ((nid) + 0x02) |
13334 | #define alc861vd_idx_to_mixer_switch(nid) ((nid) + 0x0c) | 13375 | #define alc861vd_idx_to_mixer_switch(nid) ((nid) + 0x0c) |
13335 | 13376 | ||
@@ -13512,6 +13553,7 @@ static void alc861vd_auto_init(struct hda_codec *codec) | |||
13512 | alc861vd_auto_init_multi_out(codec); | 13553 | alc861vd_auto_init_multi_out(codec); |
13513 | alc861vd_auto_init_hp_out(codec); | 13554 | alc861vd_auto_init_hp_out(codec); |
13514 | alc861vd_auto_init_analog_input(codec); | 13555 | alc861vd_auto_init_analog_input(codec); |
13556 | alc861vd_auto_init_input_src(codec); | ||
13515 | if (spec->unsol_event) | 13557 | if (spec->unsol_event) |
13516 | alc_sku_automute(codec); | 13558 | alc_sku_automute(codec); |
13517 | } | 13559 | } |
@@ -14677,6 +14719,8 @@ static void alc662_auto_init_analog_input(struct hda_codec *codec) | |||
14677 | } | 14719 | } |
14678 | } | 14720 | } |
14679 | 14721 | ||
14722 | #define alc662_auto_init_input_src alc882_auto_init_input_src | ||
14723 | |||
14680 | static int alc662_parse_auto_config(struct hda_codec *codec) | 14724 | static int alc662_parse_auto_config(struct hda_codec *codec) |
14681 | { | 14725 | { |
14682 | struct alc_spec *spec = codec->spec; | 14726 | struct alc_spec *spec = codec->spec; |
@@ -14733,6 +14777,7 @@ static void alc662_auto_init(struct hda_codec *codec) | |||
14733 | alc662_auto_init_multi_out(codec); | 14777 | alc662_auto_init_multi_out(codec); |
14734 | alc662_auto_init_hp_out(codec); | 14778 | alc662_auto_init_hp_out(codec); |
14735 | alc662_auto_init_analog_input(codec); | 14779 | alc662_auto_init_analog_input(codec); |
14780 | alc662_auto_init_input_src(codec); | ||
14736 | if (spec->unsol_event) | 14781 | if (spec->unsol_event) |
14737 | alc_sku_automute(codec); | 14782 | alc_sku_automute(codec); |
14738 | } | 14783 | } |