From d25360895c488f019e4c65dc13bc6e5362ba1e33 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Thu, 17 Jan 2008 15:49:49 -0800 Subject: [PATCH] --- yaml --- r: 75537 b: refs/heads/master c: abde3dff2496d9d44a218cf8e2a17c2383f20b22 h: refs/heads/master i: 75535: 74d44091557b5b7b1998b63bcf9d4fcecad1495b v: v3 --- [refs] | 2 +- trunk/Documentation/local_ops.txt | 23 ------------- trunk/arch/alpha/math-emu/math.c | 2 +- trunk/arch/cris/arch-v10/vmlinux.lds.S | 33 +++++++++---------- trunk/drivers/cpufreq/cpufreq_conservative.c | 4 +++ trunk/drivers/cpufreq/cpufreq_ondemand.c | 5 ++- trunk/drivers/cpufreq/cpufreq_userspace.c | 4 +++ .../media/video/saa7134/saa7134-core.c | 3 +- trunk/drivers/pnp/pnpacpi/rsparser.c | 2 ++ trunk/drivers/video/modedb.c | 4 +++ trunk/fs/hfs/btree.c | 7 ++-- trunk/fs/jbd/transaction.c | 2 ++ trunk/include/asm-cris/page.h | 7 ++-- trunk/kernel/kmod.c | 13 ++++---- trunk/mm/memory.c | 2 ++ trunk/mm/page_alloc.c | 2 +- 16 files changed, 53 insertions(+), 62 deletions(-) diff --git a/[refs] b/[refs] index e8fb314d695c..c80d4bcd493d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6320bcebc0ee0bafc61f293bec2d0809171f6b1d +refs/heads/master: abde3dff2496d9d44a218cf8e2a17c2383f20b22 diff --git a/trunk/Documentation/local_ops.txt b/trunk/Documentation/local_ops.txt index 1a45f11e645e..4269a1105b37 100644 --- a/trunk/Documentation/local_ops.txt +++ b/trunk/Documentation/local_ops.txt @@ -45,29 +45,6 @@ long fails. The definition looks like : typedef struct { atomic_long_t a; } local_t; -* Rules to follow when using local atomic operations - -- Variables touched by local ops must be per cpu variables. -- _Only_ the CPU owner of these variables must write to them. -- This CPU can use local ops from any context (process, irq, softirq, nmi, ...) - to update its local_t variables. -- Preemption (or interrupts) must be disabled when using local ops in - process context to make sure the process won't be migrated to a - different CPU between getting the per-cpu variable and doing the - actual local op. -- When using local ops in interrupt context, no special care must be - taken on a mainline kernel, since they will run on the local CPU with - preemption already disabled. I suggest, however, to explicitly - disable preemption anyway to make sure it will still work correctly on - -rt kernels. -- Reading the local cpu variable will provide the current copy of the - variable. -- Reads of these variables can be done from any CPU, because updates to - "long", aligned, variables are always atomic. Since no memory - synchronization is done by the writer CPU, an outdated copy of the - variable can be read when reading some _other_ cpu's variables. - - * Rules to follow when using local atomic operations - Variables touched by local ops must be per cpu variables. diff --git a/trunk/arch/alpha/math-emu/math.c b/trunk/arch/alpha/math-emu/math.c index ae79dd970b02..58c2669a1dd4 100644 --- a/trunk/arch/alpha/math-emu/math.c +++ b/trunk/arch/alpha/math-emu/math.c @@ -225,7 +225,7 @@ alpha_fp_emul (unsigned long pc) FP_UNPACK_SP(SB, &vb); DR_c = DB_c; DR_s = DB_s; - DR_e = DB_e; + DR_e = DB_e + (1024 - 128); DR_f = SB_f << (52 - 23); goto pack_d; } diff --git a/trunk/arch/cris/arch-v10/vmlinux.lds.S b/trunk/arch/cris/arch-v10/vmlinux.lds.S index 9859d49d088b..97a7876ed681 100644 --- a/trunk/arch/cris/arch-v10/vmlinux.lds.S +++ b/trunk/arch/cris/arch-v10/vmlinux.lds.S @@ -9,7 +9,8 @@ */ #include - +#include + jiffies = jiffies_64; SECTIONS { @@ -23,7 +24,7 @@ SECTIONS _stext = .; __stext = .; .text : { - *(.text) + TEXT_TEXT SCHED_TEXT LOCK_TEXT *(.fixup) @@ -49,10 +50,10 @@ SECTIONS __edata = . ; /* End of data section */ _edata = . ; - . = ALIGN(8192); /* init_task and stack, must be aligned */ + . = ALIGN(PAGE_SIZE); /* init_task and stack, must be aligned */ .data.init_task : { *(.data.init_task) } - . = ALIGN(8192); /* Init code and data */ + . = ALIGN(PAGE_SIZE); /* Init code and data */ __init_begin = .; .init.text : { _sinittext = .; @@ -66,13 +67,7 @@ SECTIONS __setup_end = .; .initcall.init : { __initcall_start = .; - *(.initcall1.init); - *(.initcall2.init); - *(.initcall3.init); - *(.initcall4.init); - *(.initcall5.init); - *(.initcall6.init); - *(.initcall7.init); + INITCALLS __initcall_end = .; } @@ -88,16 +83,18 @@ SECTIONS __initramfs_start = .; *(.init.ramfs) __initramfs_end = .; - /* We fill to the next page, so we can discard all init - pages without needing to consider what payload might be - appended to the kernel image. */ - FILL (0); - . = ALIGN (8192); } #endif - __vmlinux_end = .; /* last address of the physical file */ - __init_end = .; + + /* + * We fill to the next page, so we can discard all init + * pages without needing to consider what payload might be + * appended to the kernel image. + */ + . = ALIGN(PAGE_SIZE); + + __init_end = .; __data_end = . ; /* Move to _edata ? */ __bss_start = .; /* BSS */ diff --git a/trunk/drivers/cpufreq/cpufreq_conservative.c b/trunk/drivers/cpufreq/cpufreq_conservative.c index 1bba99747f5b..5d3a04ba6ad2 100644 --- a/trunk/drivers/cpufreq/cpufreq_conservative.c +++ b/trunk/drivers/cpufreq/cpufreq_conservative.c @@ -603,5 +603,9 @@ MODULE_DESCRIPTION ("'cpufreq_conservative' - A dynamic cpufreq governor for " "optimised for use in a battery environment"); MODULE_LICENSE ("GPL"); +#ifdef CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE +fs_initcall(cpufreq_gov_dbs_init); +#else module_init(cpufreq_gov_dbs_init); +#endif module_exit(cpufreq_gov_dbs_exit); diff --git a/trunk/drivers/cpufreq/cpufreq_ondemand.c b/trunk/drivers/cpufreq/cpufreq_ondemand.c index 369f44595150..d2af20dda382 100644 --- a/trunk/drivers/cpufreq/cpufreq_ondemand.c +++ b/trunk/drivers/cpufreq/cpufreq_ondemand.c @@ -610,6 +610,9 @@ MODULE_DESCRIPTION("'cpufreq_ondemand' - A dynamic cpufreq governor for " "Low Latency Frequency Transition capable processors"); MODULE_LICENSE("GPL"); +#ifdef CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND +fs_initcall(cpufreq_gov_dbs_init); +#else module_init(cpufreq_gov_dbs_init); +#endif module_exit(cpufreq_gov_dbs_exit); - diff --git a/trunk/drivers/cpufreq/cpufreq_userspace.c b/trunk/drivers/cpufreq/cpufreq_userspace.c index 51bedab6c808..f8cdde4bf6cd 100644 --- a/trunk/drivers/cpufreq/cpufreq_userspace.c +++ b/trunk/drivers/cpufreq/cpufreq_userspace.c @@ -231,5 +231,9 @@ MODULE_AUTHOR ("Dominik Brodowski , Russell King inode->i_mapping; page = read_mapping_page(mapping, 0, NULL); if (IS_ERR(page)) - goto free_tree; + goto free_inode; /* Load the header */ 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 page_cache_release(page); return tree; - fail_page: +fail_page: page_cache_release(page); - free_tree: +free_inode: tree->inode->i_mapping->a_ops = &hfs_aops; iput(tree->inode); +free_tree: kfree(tree); return NULL; } diff --git a/trunk/fs/jbd/transaction.c b/trunk/fs/jbd/transaction.c index 08ff6c7028cc..038ed7436199 100644 --- a/trunk/fs/jbd/transaction.c +++ b/trunk/fs/jbd/transaction.c @@ -288,10 +288,12 @@ handle_t *journal_start(journal_t *journal, int nblocks) jbd_free_handle(handle); current->journal_info = NULL; handle = ERR_PTR(err); + goto out; } lock_acquire(&handle->h_lockdep_map, 0, 0, 0, 2, _THIS_IP_); +out: return handle; } diff --git a/trunk/include/asm-cris/page.h b/trunk/include/asm-cris/page.h index 0648e3153f81..b84353ef6998 100644 --- a/trunk/include/asm-cris/page.h +++ b/trunk/include/asm-cris/page.h @@ -4,14 +4,11 @@ #ifdef __KERNEL__ #include +#include /* PAGE_SHIFT determines the page size */ #define PAGE_SHIFT 13 -#ifndef __ASSEMBLY__ -#define PAGE_SIZE (1UL << PAGE_SHIFT) -#else -#define PAGE_SIZE (1 << PAGE_SHIFT) -#endif +#define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT) #define PAGE_MASK (~(PAGE_SIZE-1)) #define clear_page(page) memset((void *)(page), 0, PAGE_SIZE) diff --git a/trunk/kernel/kmod.c b/trunk/kernel/kmod.c index c6a4f8aebeba..bb7df2a28bd7 100644 --- a/trunk/kernel/kmod.c +++ b/trunk/kernel/kmod.c @@ -451,13 +451,11 @@ int call_usermodehelper_exec(struct subprocess_info *sub_info, enum umh_wait wait) { DECLARE_COMPLETION_ONSTACK(done); - int retval; + int retval = 0; helper_lock(); - if (sub_info->path[0] == '\0') { - retval = 0; + if (sub_info->path[0] == '\0') goto out; - } if (!khelper_wq || usermodehelper_disabled) { retval = -EBUSY; @@ -468,13 +466,14 @@ int call_usermodehelper_exec(struct subprocess_info *sub_info, sub_info->wait = wait; queue_work(khelper_wq, &sub_info->work); - if (wait == UMH_NO_WAIT) /* task has freed sub_info */ - return 0; + if (wait == UMH_NO_WAIT) /* task has freed sub_info */ + goto unlock; wait_for_completion(&done); retval = sub_info->retval; - out: +out: call_usermodehelper_freeinfo(sub_info); +unlock: helper_unlock(); return retval; } diff --git a/trunk/mm/memory.c b/trunk/mm/memory.c index 4bf0b6d0eb2a..6dd1cd88bfb6 100644 --- a/trunk/mm/memory.c +++ b/trunk/mm/memory.c @@ -392,6 +392,7 @@ struct page *vm_normal_page(struct vm_area_struct *vma, unsigned long addr, pte_ return NULL; } +#ifdef CONFIG_DEBUG_VM /* * Add some anal sanity checks for now. Eventually, * 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_ print_bad_pte(vma, pte, addr); return NULL; } +#endif /* * NOTE! We still have PageReserved() pages in the page diff --git a/trunk/mm/page_alloc.c b/trunk/mm/page_alloc.c index e1028fae3ebb..b2838c24e582 100644 --- a/trunk/mm/page_alloc.c +++ b/trunk/mm/page_alloc.c @@ -2566,7 +2566,7 @@ static void __meminit zone_init_free_lists(struct pglist_data *pgdat, memmap_init_zone((size), (nid), (zone), (start_pfn), MEMMAP_EARLY) #endif -static int __devinit zone_batchsize(struct zone *zone) +static int zone_batchsize(struct zone *zone) { int batch;