Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 75537
b: refs/heads/master
c: abde3df
h: refs/heads/master
i:
  75535: 74d4409
v: v3
  • Loading branch information
Linus Torvalds committed Jan 17, 2008
1 parent b12056b commit d253608
Show file tree
Hide file tree
Showing 16 changed files with 53 additions and 62 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6320bcebc0ee0bafc61f293bec2d0809171f6b1d
refs/heads/master: abde3dff2496d9d44a218cf8e2a17c2383f20b22
23 changes: 0 additions & 23 deletions trunk/Documentation/local_ops.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/alpha/math-emu/math.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
33 changes: 15 additions & 18 deletions trunk/arch/cris/arch-v10/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
*/

#include <asm-generic/vmlinux.lds.h>

#include <asm/page.h>

jiffies = jiffies_64;
SECTIONS
{
Expand All @@ -23,7 +24,7 @@ SECTIONS
_stext = .;
__stext = .;
.text : {
*(.text)
TEXT_TEXT
SCHED_TEXT
LOCK_TEXT
*(.fixup)
Expand All @@ -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 = .;
Expand All @@ -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 = .;
}

Expand All @@ -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 */
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/cpufreq/cpufreq_conservative.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
5 changes: 4 additions & 1 deletion trunk/drivers/cpufreq/cpufreq_ondemand.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

4 changes: 4 additions & 0 deletions trunk/drivers/cpufreq/cpufreq_userspace.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,5 +231,9 @@ MODULE_AUTHOR ("Dominik Brodowski <linux@brodo.de>, Russell King <rmk@arm.linux.
MODULE_DESCRIPTION ("CPUfreq policy governor 'userspace'");
MODULE_LICENSE ("GPL");

#ifdef CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE
fs_initcall(cpufreq_gov_userspace_init);
#else
module_init(cpufreq_gov_userspace_init);
#endif
module_exit(cpufreq_gov_userspace_exit);
3 changes: 1 addition & 2 deletions trunk/drivers/media/video/saa7134/saa7134-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1202,9 +1202,8 @@ static int saa7134_suspend(struct pci_dev *pci_dev , pm_message_t state)

static int saa7134_resume(struct pci_dev *pci_dev)
{

struct saa7134_dev *dev = pci_get_drvdata(pci_dev);
unsigned int flags;
unsigned long flags;

pci_restore_state(pci_dev);
pci_set_power_state(pci_dev, PCI_D0);
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/pnp/pnpacpi/rsparser.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ static void pnpacpi_parse_allocated_ioresource(struct pnp_resource_table *res,
} else if (!warned) {
printk(KERN_ERR "pnpacpi: exceeded the max number of IO "
"resources: %d \n", PNP_MAX_PORT);
warned = 1;
}
}

Expand Down Expand Up @@ -242,6 +243,7 @@ static void pnpacpi_parse_allocated_memresource(struct pnp_resource_table *res,
} else if (!warned) {
printk(KERN_ERR "pnpacpi: exceeded the max number of mem "
"resources: %d\n", PNP_MAX_MEM);
warned = 1;
}
}

Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/video/modedb.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,10 @@ static const struct fb_videomode modedb[] = {
/* 1366x768, 60 Hz, 47.403 kHz hsync, WXGA 16:9 aspect ratio */
NULL, 60, 1366, 768, 13806, 120, 10, 14, 3, 32, 5,
0, FB_VMODE_NONINTERLACED
}, {
/* 1280x800, 60 Hz, 47.403 kHz hsync, WXGA 16:10 aspect ratio */
NULL, 60, 1280, 800, 12048, 200, 64, 24, 1, 136, 3,
0, FB_VMODE_NONINTERLACED
},
};

Expand Down
7 changes: 4 additions & 3 deletions trunk/fs/hfs/btree.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ struct hfs_btree *hfs_btree_open(struct super_block *sb, u32 id, btree_keycmp ke
mapping = tree->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));
Expand Down Expand Up @@ -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;
}
Expand Down
2 changes: 2 additions & 0 deletions trunk/fs/jbd/transaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
7 changes: 2 additions & 5 deletions trunk/include/asm-cris/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,11 @@
#ifdef __KERNEL__

#include <asm/arch/page.h>
#include <linux/const.h>

/* 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)
Expand Down
13 changes: 6 additions & 7 deletions trunk/kernel/kmod.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}
Expand Down
2 changes: 2 additions & 0 deletions trunk/mm/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion trunk/mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit d253608

Please sign in to comment.