diff options
-rw-r--r-- | Documentation/local_ops.txt | 23 | ||||
-rw-r--r-- | arch/alpha/math-emu/math.c | 2 | ||||
-rw-r--r-- | arch/cris/arch-v10/vmlinux.lds.S | 33 | ||||
-rw-r--r-- | drivers/cpufreq/cpufreq_conservative.c | 4 | ||||
-rw-r--r-- | drivers/cpufreq/cpufreq_ondemand.c | 5 | ||||
-rw-r--r-- | drivers/cpufreq/cpufreq_userspace.c | 4 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-core.c | 3 | ||||
-rw-r--r-- | drivers/pnp/pnpacpi/rsparser.c | 2 | ||||
-rw-r--r-- | drivers/video/modedb.c | 4 | ||||
-rw-r--r-- | fs/hfs/btree.c | 7 | ||||
-rw-r--r-- | fs/jbd/transaction.c | 2 | ||||
-rw-r--r-- | include/asm-cris/page.h | 7 | ||||
-rw-r--r-- | kernel/kmod.c | 13 | ||||
-rw-r--r-- | mm/memory.c | 2 | ||||
-rw-r--r-- | mm/page_alloc.c | 2 |
15 files changed, 52 insertions, 61 deletions
diff --git a/Documentation/local_ops.txt b/Documentation/local_ops.txt index 1a45f11e64..4269a1105b 100644 --- a/Documentation/local_ops.txt +++ b/Documentation/local_ops.txt | |||
@@ -68,29 +68,6 @@ typedef struct { atomic_long_t a; } local_t; | |||
68 | variable can be read when reading some _other_ cpu's variables. | 68 | variable can be read when reading some _other_ cpu's variables. |
69 | 69 | ||
70 | 70 | ||
71 | * Rules to follow when using local atomic operations | ||
72 | |||
73 | - Variables touched by local ops must be per cpu variables. | ||
74 | - _Only_ the CPU owner of these variables must write to them. | ||
75 | - This CPU can use local ops from any context (process, irq, softirq, nmi, ...) | ||
76 | to update its local_t variables. | ||
77 | - Preemption (or interrupts) must be disabled when using local ops in | ||
78 | process context to make sure the process won't be migrated to a | ||
79 | different CPU between getting the per-cpu variable and doing the | ||
80 | actual local op. | ||
81 | - When using local ops in interrupt context, no special care must be | ||
82 | taken on a mainline kernel, since they will run on the local CPU with | ||
83 | preemption already disabled. I suggest, however, to explicitly | ||
84 | disable preemption anyway to make sure it will still work correctly on | ||
85 | -rt kernels. | ||
86 | - Reading the local cpu variable will provide the current copy of the | ||
87 | variable. | ||
88 | - Reads of these variables can be done from any CPU, because updates to | ||
89 | "long", aligned, variables are always atomic. Since no memory | ||
90 | synchronization is done by the writer CPU, an outdated copy of the | ||
91 | variable can be read when reading some _other_ cpu's variables. | ||
92 | |||
93 | |||
94 | * How to use local atomic operations | 71 | * How to use local atomic operations |
95 | 72 | ||
96 | #include <linux/percpu.h> | 73 | #include <linux/percpu.h> |
diff --git a/arch/alpha/math-emu/math.c b/arch/alpha/math-emu/math.c index ae79dd970b..58c2669a1d 100644 --- a/arch/alpha/math-emu/math.c +++ b/arch/alpha/math-emu/math.c | |||
@@ -225,7 +225,7 @@ alpha_fp_emul (unsigned long pc) | |||
225 | FP_UNPACK_SP(SB, &vb); | 225 | FP_UNPACK_SP(SB, &vb); |
226 | DR_c = DB_c; | 226 | DR_c = DB_c; |
227 | DR_s = DB_s; | 227 | DR_s = DB_s; |
228 | DR_e = DB_e; | 228 | DR_e = DB_e + (1024 - 128); |
229 | DR_f = SB_f << (52 - 23); | 229 | DR_f = SB_f << (52 - 23); |
230 | goto pack_d; | 230 | goto pack_d; |
231 | } | 231 | } |
diff --git a/arch/cris/arch-v10/vmlinux.lds.S b/arch/cris/arch-v10/vmlinux.lds.S index 9859d49d08..97a7876ed6 100644 --- a/arch/cris/arch-v10/vmlinux.lds.S +++ b/arch/cris/arch-v10/vmlinux.lds.S | |||
@@ -9,7 +9,8 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <asm-generic/vmlinux.lds.h> | 11 | #include <asm-generic/vmlinux.lds.h> |
12 | 12 | #include <asm/page.h> | |
13 | |||
13 | jiffies = jiffies_64; | 14 | jiffies = jiffies_64; |
14 | SECTIONS | 15 | SECTIONS |
15 | { | 16 | { |
@@ -23,7 +24,7 @@ SECTIONS | |||
23 | _stext = .; | 24 | _stext = .; |
24 | __stext = .; | 25 | __stext = .; |
25 | .text : { | 26 | .text : { |
26 | *(.text) | 27 | TEXT_TEXT |
27 | SCHED_TEXT | 28 | SCHED_TEXT |
28 | LOCK_TEXT | 29 | LOCK_TEXT |
29 | *(.fixup) | 30 | *(.fixup) |
@@ -49,10 +50,10 @@ SECTIONS | |||
49 | __edata = . ; /* End of data section */ | 50 | __edata = . ; /* End of data section */ |
50 | _edata = . ; | 51 | _edata = . ; |
51 | 52 | ||
52 | . = ALIGN(8192); /* init_task and stack, must be aligned */ | 53 | . = ALIGN(PAGE_SIZE); /* init_task and stack, must be aligned */ |
53 | .data.init_task : { *(.data.init_task) } | 54 | .data.init_task : { *(.data.init_task) } |
54 | 55 | ||
55 | . = ALIGN(8192); /* Init code and data */ | 56 | . = ALIGN(PAGE_SIZE); /* Init code and data */ |
56 | __init_begin = .; | 57 | __init_begin = .; |
57 | .init.text : { | 58 | .init.text : { |
58 | _sinittext = .; | 59 | _sinittext = .; |
@@ -66,13 +67,7 @@ SECTIONS | |||
66 | __setup_end = .; | 67 | __setup_end = .; |
67 | .initcall.init : { | 68 | .initcall.init : { |
68 | __initcall_start = .; | 69 | __initcall_start = .; |
69 | *(.initcall1.init); | 70 | INITCALLS |
70 | *(.initcall2.init); | ||
71 | *(.initcall3.init); | ||
72 | *(.initcall4.init); | ||
73 | *(.initcall5.init); | ||
74 | *(.initcall6.init); | ||
75 | *(.initcall7.init); | ||
76 | __initcall_end = .; | 71 | __initcall_end = .; |
77 | } | 72 | } |
78 | 73 | ||
@@ -88,16 +83,18 @@ SECTIONS | |||
88 | __initramfs_start = .; | 83 | __initramfs_start = .; |
89 | *(.init.ramfs) | 84 | *(.init.ramfs) |
90 | __initramfs_end = .; | 85 | __initramfs_end = .; |
91 | /* We fill to the next page, so we can discard all init | ||
92 | pages without needing to consider what payload might be | ||
93 | appended to the kernel image. */ | ||
94 | FILL (0); | ||
95 | . = ALIGN (8192); | ||
96 | } | 86 | } |
97 | #endif | 87 | #endif |
98 | |||
99 | __vmlinux_end = .; /* last address of the physical file */ | 88 | __vmlinux_end = .; /* last address of the physical file */ |
100 | __init_end = .; | 89 | |
90 | /* | ||
91 | * We fill to the next page, so we can discard all init | ||
92 | * pages without needing to consider what payload might be | ||
93 | * appended to the kernel image. | ||
94 | */ | ||
95 | . = ALIGN(PAGE_SIZE); | ||
96 | |||
97 | __init_end = .; | ||
101 | 98 | ||
102 | __data_end = . ; /* Move to _edata ? */ | 99 | __data_end = . ; /* Move to _edata ? */ |
103 | __bss_start = .; /* BSS */ | 100 | __bss_start = .; /* BSS */ |
diff --git a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c index 1bba99747f..5d3a04ba6a 100644 --- a/drivers/cpufreq/cpufreq_conservative.c +++ b/drivers/cpufreq/cpufreq_conservative.c | |||
@@ -603,5 +603,9 @@ MODULE_DESCRIPTION ("'cpufreq_conservative' - A dynamic cpufreq governor for " | |||
603 | "optimised for use in a battery environment"); | 603 | "optimised for use in a battery environment"); |
604 | MODULE_LICENSE ("GPL"); | 604 | MODULE_LICENSE ("GPL"); |
605 | 605 | ||
606 | #ifdef CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE | ||
607 | fs_initcall(cpufreq_gov_dbs_init); | ||
608 | #else | ||
606 | module_init(cpufreq_gov_dbs_init); | 609 | module_init(cpufreq_gov_dbs_init); |
610 | #endif | ||
607 | module_exit(cpufreq_gov_dbs_exit); | 611 | module_exit(cpufreq_gov_dbs_exit); |
diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c index 369f445951..d2af20dda3 100644 --- a/drivers/cpufreq/cpufreq_ondemand.c +++ b/drivers/cpufreq/cpufreq_ondemand.c | |||
@@ -610,6 +610,9 @@ MODULE_DESCRIPTION("'cpufreq_ondemand' - A dynamic cpufreq governor for " | |||
610 | "Low Latency Frequency Transition capable processors"); | 610 | "Low Latency Frequency Transition capable processors"); |
611 | MODULE_LICENSE("GPL"); | 611 | MODULE_LICENSE("GPL"); |
612 | 612 | ||
613 | #ifdef CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND | ||
614 | fs_initcall(cpufreq_gov_dbs_init); | ||
615 | #else | ||
613 | module_init(cpufreq_gov_dbs_init); | 616 | module_init(cpufreq_gov_dbs_init); |
617 | #endif | ||
614 | module_exit(cpufreq_gov_dbs_exit); | 618 | module_exit(cpufreq_gov_dbs_exit); |
615 | |||
diff --git a/drivers/cpufreq/cpufreq_userspace.c b/drivers/cpufreq/cpufreq_userspace.c index 51bedab6c8..f8cdde4bf6 100644 --- a/drivers/cpufreq/cpufreq_userspace.c +++ b/drivers/cpufreq/cpufreq_userspace.c | |||
@@ -231,5 +231,9 @@ MODULE_AUTHOR ("Dominik Brodowski <linux@brodo.de>, Russell King <rmk@arm.linux. | |||
231 | MODULE_DESCRIPTION ("CPUfreq policy governor 'userspace'"); | 231 | MODULE_DESCRIPTION ("CPUfreq policy governor 'userspace'"); |
232 | MODULE_LICENSE ("GPL"); | 232 | MODULE_LICENSE ("GPL"); |
233 | 233 | ||
234 | #ifdef CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE | ||
234 | fs_initcall(cpufreq_gov_userspace_init); | 235 | fs_initcall(cpufreq_gov_userspace_init); |
236 | #else | ||
237 | module_init(cpufreq_gov_userspace_init); | ||
238 | #endif | ||
235 | module_exit(cpufreq_gov_userspace_exit); | 239 | module_exit(cpufreq_gov_userspace_exit); |
diff --git a/drivers/media/video/saa7134/saa7134-core.c b/drivers/media/video/saa7134/saa7134-core.c index 4fd187ac9d..4f0a9157ec 100644 --- a/drivers/media/video/saa7134/saa7134-core.c +++ b/drivers/media/video/saa7134/saa7134-core.c | |||
@@ -1202,9 +1202,8 @@ static int saa7134_suspend(struct pci_dev *pci_dev , pm_message_t state) | |||
1202 | 1202 | ||
1203 | static int saa7134_resume(struct pci_dev *pci_dev) | 1203 | static int saa7134_resume(struct pci_dev *pci_dev) |
1204 | { | 1204 | { |
1205 | |||
1206 | struct saa7134_dev *dev = pci_get_drvdata(pci_dev); | 1205 | struct saa7134_dev *dev = pci_get_drvdata(pci_dev); |
1207 | unsigned int flags; | 1206 | unsigned long flags; |
1208 | 1207 | ||
1209 | pci_restore_state(pci_dev); | 1208 | pci_restore_state(pci_dev); |
1210 | pci_set_power_state(pci_dev, PCI_D0); | 1209 | pci_set_power_state(pci_dev, PCI_D0); |
diff --git a/drivers/pnp/pnpacpi/rsparser.c b/drivers/pnp/pnpacpi/rsparser.c index f7b8648acb..6b9840cce0 100644 --- a/drivers/pnp/pnpacpi/rsparser.c +++ b/drivers/pnp/pnpacpi/rsparser.c | |||
@@ -215,6 +215,7 @@ static void pnpacpi_parse_allocated_ioresource(struct pnp_resource_table *res, | |||
215 | } else if (!warned) { | 215 | } else if (!warned) { |
216 | printk(KERN_ERR "pnpacpi: exceeded the max number of IO " | 216 | printk(KERN_ERR "pnpacpi: exceeded the max number of IO " |
217 | "resources: %d \n", PNP_MAX_PORT); | 217 | "resources: %d \n", PNP_MAX_PORT); |
218 | warned = 1; | ||
218 | } | 219 | } |
219 | } | 220 | } |
220 | 221 | ||
@@ -242,6 +243,7 @@ static void pnpacpi_parse_allocated_memresource(struct pnp_resource_table *res, | |||
242 | } else if (!warned) { | 243 | } else if (!warned) { |
243 | printk(KERN_ERR "pnpacpi: exceeded the max number of mem " | 244 | printk(KERN_ERR "pnpacpi: exceeded the max number of mem " |
244 | "resources: %d\n", PNP_MAX_MEM); | 245 | "resources: %d\n", PNP_MAX_MEM); |
246 | warned = 1; | ||
245 | } | 247 | } |
246 | } | 248 | } |
247 | 249 | ||
diff --git a/drivers/video/modedb.c b/drivers/video/modedb.c index 8d81ef019c..08d0725522 100644 --- a/drivers/video/modedb.c +++ b/drivers/video/modedb.c | |||
@@ -259,6 +259,10 @@ static const struct fb_videomode modedb[] = { | |||
259 | /* 1366x768, 60 Hz, 47.403 kHz hsync, WXGA 16:9 aspect ratio */ | 259 | /* 1366x768, 60 Hz, 47.403 kHz hsync, WXGA 16:9 aspect ratio */ |
260 | NULL, 60, 1366, 768, 13806, 120, 10, 14, 3, 32, 5, | 260 | NULL, 60, 1366, 768, 13806, 120, 10, 14, 3, 32, 5, |
261 | 0, FB_VMODE_NONINTERLACED | 261 | 0, FB_VMODE_NONINTERLACED |
262 | }, { | ||
263 | /* 1280x800, 60 Hz, 47.403 kHz hsync, WXGA 16:10 aspect ratio */ | ||
264 | NULL, 60, 1280, 800, 12048, 200, 64, 24, 1, 136, 3, | ||
265 | 0, FB_VMODE_NONINTERLACED | ||
262 | }, | 266 | }, |
263 | }; | 267 | }; |
264 | 268 | ||
diff --git a/fs/hfs/btree.c b/fs/hfs/btree.c index 31284c77bb..110dd3515d 100644 --- a/fs/hfs/btree.c +++ b/fs/hfs/btree.c | |||
@@ -61,7 +61,7 @@ struct hfs_btree *hfs_btree_open(struct super_block *sb, u32 id, btree_keycmp ke | |||
61 | mapping = tree->inode->i_mapping; | 61 | mapping = tree->inode->i_mapping; |
62 | page = read_mapping_page(mapping, 0, NULL); | 62 | page = read_mapping_page(mapping, 0, NULL); |
63 | if (IS_ERR(page)) | 63 | if (IS_ERR(page)) |
64 | goto free_tree; | 64 | goto free_inode; |
65 | 65 | ||
66 | /* Load the header */ | 66 | /* Load the header */ |
67 | head = (struct hfs_btree_header_rec *)(kmap(page) + sizeof(struct hfs_bnode_desc)); | 67 | head = (struct hfs_btree_header_rec *)(kmap(page) + sizeof(struct hfs_bnode_desc)); |
@@ -99,11 +99,12 @@ struct hfs_btree *hfs_btree_open(struct super_block *sb, u32 id, btree_keycmp ke | |||
99 | page_cache_release(page); | 99 | page_cache_release(page); |
100 | return tree; | 100 | return tree; |
101 | 101 | ||
102 | fail_page: | 102 | fail_page: |
103 | page_cache_release(page); | 103 | page_cache_release(page); |
104 | free_tree: | 104 | free_inode: |
105 | tree->inode->i_mapping->a_ops = &hfs_aops; | 105 | tree->inode->i_mapping->a_ops = &hfs_aops; |
106 | iput(tree->inode); | 106 | iput(tree->inode); |
107 | free_tree: | ||
107 | kfree(tree); | 108 | kfree(tree); |
108 | return NULL; | 109 | return NULL; |
109 | } | 110 | } |
diff --git a/fs/jbd/transaction.c b/fs/jbd/transaction.c index 08ff6c7028..038ed74361 100644 --- a/fs/jbd/transaction.c +++ b/fs/jbd/transaction.c | |||
@@ -288,10 +288,12 @@ handle_t *journal_start(journal_t *journal, int nblocks) | |||
288 | jbd_free_handle(handle); | 288 | jbd_free_handle(handle); |
289 | current->journal_info = NULL; | 289 | current->journal_info = NULL; |
290 | handle = ERR_PTR(err); | 290 | handle = ERR_PTR(err); |
291 | goto out; | ||
291 | } | 292 | } |
292 | 293 | ||
293 | lock_acquire(&handle->h_lockdep_map, 0, 0, 0, 2, _THIS_IP_); | 294 | lock_acquire(&handle->h_lockdep_map, 0, 0, 0, 2, _THIS_IP_); |
294 | 295 | ||
296 | out: | ||
295 | return handle; | 297 | return handle; |
296 | } | 298 | } |
297 | 299 | ||
diff --git a/include/asm-cris/page.h b/include/asm-cris/page.h index 0648e3153f..b84353ef69 100644 --- a/include/asm-cris/page.h +++ b/include/asm-cris/page.h | |||
@@ -4,14 +4,11 @@ | |||
4 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
5 | 5 | ||
6 | #include <asm/arch/page.h> | 6 | #include <asm/arch/page.h> |
7 | #include <linux/const.h> | ||
7 | 8 | ||
8 | /* PAGE_SHIFT determines the page size */ | 9 | /* PAGE_SHIFT determines the page size */ |
9 | #define PAGE_SHIFT 13 | 10 | #define PAGE_SHIFT 13 |
10 | #ifndef __ASSEMBLY__ | 11 | #define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT) |
11 | #define PAGE_SIZE (1UL << PAGE_SHIFT) | ||
12 | #else | ||
13 | #define PAGE_SIZE (1 << PAGE_SHIFT) | ||
14 | #endif | ||
15 | #define PAGE_MASK (~(PAGE_SIZE-1)) | 12 | #define PAGE_MASK (~(PAGE_SIZE-1)) |
16 | 13 | ||
17 | #define clear_page(page) memset((void *)(page), 0, PAGE_SIZE) | 14 | #define clear_page(page) memset((void *)(page), 0, PAGE_SIZE) |
diff --git a/kernel/kmod.c b/kernel/kmod.c index c6a4f8aebe..bb7df2a28b 100644 --- a/kernel/kmod.c +++ b/kernel/kmod.c | |||
@@ -451,13 +451,11 @@ int call_usermodehelper_exec(struct subprocess_info *sub_info, | |||
451 | enum umh_wait wait) | 451 | enum umh_wait wait) |
452 | { | 452 | { |
453 | DECLARE_COMPLETION_ONSTACK(done); | 453 | DECLARE_COMPLETION_ONSTACK(done); |
454 | int retval; | 454 | int retval = 0; |
455 | 455 | ||
456 | helper_lock(); | 456 | helper_lock(); |
457 | if (sub_info->path[0] == '\0') { | 457 | if (sub_info->path[0] == '\0') |
458 | retval = 0; | ||
459 | goto out; | 458 | goto out; |
460 | } | ||
461 | 459 | ||
462 | if (!khelper_wq || usermodehelper_disabled) { | 460 | if (!khelper_wq || usermodehelper_disabled) { |
463 | retval = -EBUSY; | 461 | retval = -EBUSY; |
@@ -468,13 +466,14 @@ int call_usermodehelper_exec(struct subprocess_info *sub_info, | |||
468 | sub_info->wait = wait; | 466 | sub_info->wait = wait; |
469 | 467 | ||
470 | queue_work(khelper_wq, &sub_info->work); | 468 | queue_work(khelper_wq, &sub_info->work); |
471 | if (wait == UMH_NO_WAIT) /* task has freed sub_info */ | 469 | if (wait == UMH_NO_WAIT) /* task has freed sub_info */ |
472 | return 0; | 470 | goto unlock; |
473 | wait_for_completion(&done); | 471 | wait_for_completion(&done); |
474 | retval = sub_info->retval; | 472 | retval = sub_info->retval; |
475 | 473 | ||
476 | out: | 474 | out: |
477 | call_usermodehelper_freeinfo(sub_info); | 475 | call_usermodehelper_freeinfo(sub_info); |
476 | unlock: | ||
478 | helper_unlock(); | 477 | helper_unlock(); |
479 | return retval; | 478 | return retval; |
480 | } | 479 | } |
diff --git a/mm/memory.c b/mm/memory.c index 4bf0b6d0eb..6dd1cd88bf 100644 --- a/mm/memory.c +++ b/mm/memory.c | |||
@@ -392,6 +392,7 @@ struct page *vm_normal_page(struct vm_area_struct *vma, unsigned long addr, pte_ | |||
392 | return NULL; | 392 | return NULL; |
393 | } | 393 | } |
394 | 394 | ||
395 | #ifdef CONFIG_DEBUG_VM | ||
395 | /* | 396 | /* |
396 | * Add some anal sanity checks for now. Eventually, | 397 | * Add some anal sanity checks for now. Eventually, |
397 | * we should just do "return pfn_to_page(pfn)", but | 398 | * we should just do "return pfn_to_page(pfn)", but |
@@ -402,6 +403,7 @@ struct page *vm_normal_page(struct vm_area_struct *vma, unsigned long addr, pte_ | |||
402 | print_bad_pte(vma, pte, addr); | 403 | print_bad_pte(vma, pte, addr); |
403 | return NULL; | 404 | return NULL; |
404 | } | 405 | } |
406 | #endif | ||
405 | 407 | ||
406 | /* | 408 | /* |
407 | * NOTE! We still have PageReserved() pages in the page | 409 | * NOTE! We still have PageReserved() pages in the page |
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index e1028fae3e..b2838c24e5 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -2566,7 +2566,7 @@ static void __meminit zone_init_free_lists(struct pglist_data *pgdat, | |||
2566 | memmap_init_zone((size), (nid), (zone), (start_pfn), MEMMAP_EARLY) | 2566 | memmap_init_zone((size), (nid), (zone), (start_pfn), MEMMAP_EARLY) |
2567 | #endif | 2567 | #endif |
2568 | 2568 | ||
2569 | static int __devinit zone_batchsize(struct zone *zone) | 2569 | static int zone_batchsize(struct zone *zone) |
2570 | { | 2570 | { |
2571 | int batch; | 2571 | int batch; |
2572 | 2572 | ||