Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 35535
b: refs/heads/master
c: a4c0291
h: refs/heads/master
i:
  35533: f0ae4a5
  35531: 8f71c90
  35527: 3082519
  35519: e9c549f
v: v3
  • Loading branch information
David S. Miller committed Sep 25, 2006
1 parent 54b45f8 commit 85ba616
Show file tree
Hide file tree
Showing 15 changed files with 26 additions and 107 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: b7de567bf3187ccf776e2fe0e241593cdcba5459
refs/heads/master: a4c0291aa942dceddabe23bf2b74addb958d0964
6 changes: 1 addition & 5 deletions trunk/arch/i386/kernel/smpboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -642,13 +642,9 @@ static void map_cpu_to_logical_apicid(void)
{
int cpu = smp_processor_id();
int apicid = logical_smp_processor_id();
int node = apicid_to_node(apicid);

if (!node_online(node))
node = first_online_node;

cpu_2_logical_apicid[cpu] = apicid;
map_cpu_to_node(cpu, node);
map_cpu_to_node(cpu, apicid_to_node(apicid));
}

static void unmap_cpu_to_logical_apicid(int cpu)
Expand Down
7 changes: 2 additions & 5 deletions trunk/arch/i386/mm/boot_ioremap.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,8 @@
*/

#define BOOT_PTE_PTRS (PTRS_PER_PTE*2)

static unsigned long boot_pte_index(unsigned long vaddr)
{
return __pa(vaddr) >> PAGE_SHIFT;
}
#define boot_pte_index(address) \
(((address) >> PAGE_SHIFT) & (BOOT_PTE_PTRS - 1))

static inline boot_pte_t* boot_vaddr_to_pte(void *address)
{
Expand Down
13 changes: 5 additions & 8 deletions trunk/arch/ia64/kernel/acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -771,19 +771,16 @@ int acpi_map_cpu2node(acpi_handle handle, int cpu, long physid)
{
#ifdef CONFIG_ACPI_NUMA
int pxm_id;
int nid;

pxm_id = acpi_get_pxm(handle);

/*
* We don't have cpu-only-node hotadd. But if the system equips
* SRAT table, pxm is already found and node is ready.
* So, just pxm_to_nid(pxm) is OK.
* This code here is for the system which doesn't have full SRAT
* table for possible cpus.
* Assuming that the container driver would have set the proximity
* domain and would have initialized pxm_to_node(pxm_id) && pxm_flag
*/
nid = acpi_map_pxm_to_node(pxm_id);
node_cpuid[cpu].nid = (pxm_id < 0) ? 0 : pxm_to_node(pxm_id);

node_cpuid[cpu].phys_id = physid;
node_cpuid[cpu].nid = nid;
#endif
return (0);
}
Expand Down
34 changes: 3 additions & 31 deletions trunk/arch/ia64/kernel/numa.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,36 +29,6 @@ EXPORT_SYMBOL(cpu_to_node_map);

cpumask_t node_to_cpu_mask[MAX_NUMNODES] __cacheline_aligned;

void __cpuinit map_cpu_to_node(int cpu, int nid)
{
int oldnid;
if (nid < 0) { /* just initialize by zero */
cpu_to_node_map[cpu] = 0;
return;
}
/* sanity check first */
oldnid = cpu_to_node_map[cpu];
if (cpu_isset(cpu, node_to_cpu_mask[oldnid])) {
return; /* nothing to do */
}
/* we don't have cpu-driven node hot add yet...
In usual case, node is created from SRAT at boot time. */
if (!node_online(nid))
nid = first_online_node;
cpu_to_node_map[cpu] = nid;
cpu_set(cpu, node_to_cpu_mask[nid]);
return;
}

void __cpuinit unmap_cpu_from_node(int cpu, int nid)
{
WARN_ON(!cpu_isset(cpu, node_to_cpu_mask[nid]));
WARN_ON(cpu_to_node_map[cpu] != nid);
cpu_to_node_map[cpu] = 0;
cpu_clear(cpu, node_to_cpu_mask[nid]);
}


/**
* build_cpu_to_node_map - setup cpu to node and node to cpumask arrays
*
Expand All @@ -79,6 +49,8 @@ void __init build_cpu_to_node_map(void)
node = node_cpuid[i].nid;
break;
}
map_cpu_to_node(cpu, node);
cpu_to_node_map[cpu] = (node >= 0) ? node : 0;
if (node >= 0)
cpu_set(cpu, node_to_cpu_mask[node]);
}
}
6 changes: 1 addition & 5 deletions trunk/arch/ia64/kernel/topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ int arch_register_cpu(int num)
*/
if (!can_cpei_retarget() && is_cpu_cpei_target(num))
sysfs_cpus[num].cpu.no_control = 1;
#ifdef CONFIG_NUMA
map_cpu_to_node(num, node_cpuid[num].nid);
#endif
#endif

return register_cpu(&sysfs_cpus[num].cpu, num);
Expand All @@ -48,8 +45,7 @@ int arch_register_cpu(int num)

void arch_unregister_cpu(int num)
{
unregister_cpu(&sysfs_cpus[num].cpu);
unmap_cpu_from_node(num, cpu_to_node(num));
return unregister_cpu(&sysfs_cpus[num].cpu);
}
EXPORT_SYMBOL(arch_register_cpu);
EXPORT_SYMBOL(arch_unregister_cpu);
Expand Down
20 changes: 4 additions & 16 deletions trunk/arch/sparc64/solaris/misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -736,28 +736,23 @@ struct exec_domain solaris_exec_domain = {

extern int init_socksys(void);

#ifdef MODULE

MODULE_AUTHOR("Jakub Jelinek (jj@ultra.linux.cz), Patrik Rak (prak3264@ss1000.ms.mff.cuni.cz)");
MODULE_DESCRIPTION("Solaris binary emulation module");
MODULE_LICENSE("GPL");

#ifdef __sparc_v9__
extern u32 tl0_solaris[8];
#define update_ttable(x) \
tl0_solaris[3] = (((long)(x) - (long)tl0_solaris - 3) >> 2) | 0x40000000; \
wmb(); \
__asm__ __volatile__ ("flush %0" : : "r" (&tl0_solaris[3]))
#else
#endif

extern u32 solaris_sparc_syscall[];
extern u32 solaris_syscall[];
extern void cleanup_socksys(void);

extern u32 entry64_personality_patch;

int init_module(void)
static int __init solaris_init(void)
{
int ret;

Expand All @@ -777,19 +772,12 @@ int init_module(void)
return 0;
}

void cleanup_module(void)
static void __exit solaris_exit(void)
{
update_ttable(solaris_syscall);
cleanup_socksys();
unregister_exec_domain(&solaris_exec_domain);
}

#else
int init_solaris_emul(void)
{
register_exec_domain(&solaris_exec_domain);
init_socksys();
return 0;
}
#endif

module_init(solaris_init);
module_exit(solaris_exit);
6 changes: 2 additions & 4 deletions trunk/arch/sparc64/solaris/socksys.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,7 @@ static struct file_operations socksys_fops = {
.release = socksys_release,
};

int __init
init_socksys(void)
int __init init_socksys(void)
{
int ret;
struct file * file;
Expand Down Expand Up @@ -199,8 +198,7 @@ init_socksys(void)
return 0;
}

void
cleanup_socksys(void)
void __exit cleanup_socksys(void)
{
if (unregister_chrdev(30, "socksys"))
printk ("Couldn't unregister socksys character device\n");
Expand Down
5 changes: 2 additions & 3 deletions trunk/drivers/char/rtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,11 @@ static const unsigned char days_in_mo[] =
*/
static inline unsigned char rtc_is_updating(void)
{
unsigned long flags;
unsigned char uip;

spin_lock_irqsave(&rtc_lock, flags);
spin_lock_irq(&rtc_lock);
uip = (CMOS_READ(RTC_FREQ_SELECT) & RTC_UIP);
spin_unlock_irqrestore(&rtc_lock, flags);
spin_unlock_irq(&rtc_lock);
return uip;
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/video/videodev.c
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,7 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
break;
}

if (index < 0 || index >= vfd->tvnormsize) {
if (index<=0 || index >= vfd->tvnormsize) {
ret=-EINVAL;
break;
}
Expand Down
12 changes: 0 additions & 12 deletions trunk/drivers/video/fbsysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -397,12 +397,6 @@ static ssize_t store_bl_curve(struct class_device *class_device,
u8 tmp_curve[FB_BACKLIGHT_LEVELS];
unsigned int i;

/* Some drivers don't use framebuffer_alloc(), but those also
* don't have backlights.
*/
if (!fb_info || !fb_info->bl_dev)
return -ENODEV;

if (count != (FB_BACKLIGHT_LEVELS / 8 * 24))
return -EINVAL;

Expand Down Expand Up @@ -436,12 +430,6 @@ static ssize_t show_bl_curve(struct class_device *class_device, char *buf)
ssize_t len = 0;
unsigned int i;

/* Some drivers don't use framebuffer_alloc(), but those also
* don't have backlights.
*/
if (!fb_info || !fb_info->bl_dev)
return -ENODEV;

mutex_lock(&fb_info->bl_mutex);
for (i = 0; i < FB_BACKLIGHT_LEVELS; i += 8)
len += snprintf(&buf[len], PAGE_SIZE,
Expand Down
6 changes: 3 additions & 3 deletions trunk/fs/autofs4/expire.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ static inline int autofs4_can_expire(struct dentry *dentry,

if (!do_now) {
/* Too young to die */
if (!timeout || time_after(ino->last_used + timeout, now))
if (time_after(ino->last_used + timeout, now))
return 0;

/* update last_used here :-
Expand Down Expand Up @@ -253,7 +253,7 @@ static struct dentry *autofs4_expire_direct(struct super_block *sb,
struct dentry *root = dget(sb->s_root);
int do_now = how & AUTOFS_EXP_IMMEDIATE;

if (!root)
if (!sbi->exp_timeout || !root)
return NULL;

now = jiffies;
Expand Down Expand Up @@ -293,7 +293,7 @@ static struct dentry *autofs4_expire_indirect(struct super_block *sb,
int do_now = how & AUTOFS_EXP_IMMEDIATE;
int exp_leaves = how & AUTOFS_EXP_LEAVES;

if (!root)
if ( !sbi->exp_timeout || !root )
return NULL;

now = jiffies;
Expand Down
4 changes: 0 additions & 4 deletions trunk/include/asm-ia64/numa.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,6 @@ extern int paddr_to_nid(unsigned long paddr);

#define local_nodeid (cpu_to_node_map[smp_processor_id()])

extern void map_cpu_to_node(int cpu, int nid);
extern void unmap_cpu_from_node(int cpu, int nid);


#else /* !CONFIG_NUMA */

#define paddr_to_nid(addr) 0
Expand Down
6 changes: 0 additions & 6 deletions trunk/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -1054,12 +1054,6 @@ static int mod_sysfs_setup(struct module *mod,
{
int err;

if (!module_subsys.kset.subsys) {
printk(KERN_ERR "%s: module_subsys not initialized\n",
mod->name);
err = -EINVAL;
goto out;
}
memset(&mod->mkobj.kobj, 0, sizeof(mod->mkobj.kobj));
err = kobject_set_name(&mod->mkobj.kobj, "%s", mod->name);
if (err)
Expand Down
4 changes: 1 addition & 3 deletions trunk/mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1845,10 +1845,8 @@ static inline void free_zone_pagesets(int cpu)
for_each_zone(zone) {
struct per_cpu_pageset *pset = zone_pcp(zone, cpu);

/* Free per_cpu_pageset if it is slab allocated */
if (pset != &boot_pageset[cpu])
kfree(pset);
zone_pcp(zone, cpu) = NULL;
kfree(pset);
}
}

Expand Down

0 comments on commit 85ba616

Please sign in to comment.