Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 35539
b: refs/heads/master
c: 0d6c7ae
h: refs/heads/master
i:
  35537: 4dcd739
  35535: 85ba616
v: v3
  • Loading branch information
Yasuyuki Kozakai authored and David S. Miller committed Sep 25, 2006
1 parent eb7c972 commit f91a030
Show file tree
Hide file tree
Showing 38 changed files with 117 additions and 171 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: 7b29122f9ec54db5c38a66a11127d94db0817c17
refs/heads/master: 0d6c7ae22d4fadbc83677ea1a6144eea8911e319
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: 16 additions & 4 deletions trunk/arch/sparc64/solaris/misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -736,23 +736,28 @@ 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;

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

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

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

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

6 changes: 4 additions & 2 deletions trunk/arch/sparc64/solaris/socksys.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ 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 @@ -198,7 +199,8 @@ int __init init_socksys(void)
return 0;
}

void __exit cleanup_socksys(void)
void
cleanup_socksys(void)
{
if (unregister_chrdev(30, "socksys"))
printk ("Couldn't unregister socksys character device\n");
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/ata/pata_pdc2027x.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ MODULE_DEVICE_TABLE(pci, pdc2027x_pci_tbl);
* @ap: Port
* @offset: offset from mmio base
*/
static inline void __iomem *port_mmio(struct ata_port *ap, unsigned int offset)
static inline void* port_mmio(struct ata_port *ap, unsigned int offset)
{
return ap->host->mmio_base + ap->port_no * 0x100 + offset;
}
Expand All @@ -253,7 +253,7 @@ static inline void __iomem *port_mmio(struct ata_port *ap, unsigned int offset)
* @adev: device
* @offset: offset from mmio base
*/
static inline void __iomem *dev_mmio(struct ata_port *ap, struct ata_device *adev, unsigned int offset)
static inline void* dev_mmio(struct ata_port *ap, struct ata_device *adev, unsigned int offset)
{
u8 adj = (adev->devno) ? 0x08 : 0x00;
return port_mmio(ap, offset) + adj;
Expand Down Expand Up @@ -758,7 +758,7 @@ static int __devinit pdc2027x_init_one(struct pci_dev *pdev, const struct pci_de

struct ata_probe_ent *probe_ent = NULL;
unsigned long base;
void __iomem *mmio_base;
void *mmio_base;
int rc;

if (!printed_version++)
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
Loading

0 comments on commit f91a030

Please sign in to comment.