summaryrefslogtreecommitdiff
path: root/arch/sparc64
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-09-08 15:39:30 -0700
committerDavid S. Miller <davem@davemloft.net>2008-09-08 15:39:30 -0700
commit98d86c091534f35c4bab294451ae6bccab8e9075 (patch)
tree98c9f0b80bb078405cf173f1d5cc91c72e77082d /arch/sparc64
parentd875a4b0ffad754e6d89fa561ea7dcdd79c9508b (diff)
parent4d084617fb0d025c42c242362d1f27d337e2d407 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
Conflicts: arch/sparc/kernel/of_device.c
Diffstat (limited to 'arch/sparc64')
-rw-r--r--arch/sparc64/Kconfig1
-rw-r--r--arch/sparc64/kernel/of_device.c20
-rw-r--r--arch/sparc64/kernel/smp.c14
-rw-r--r--arch/sparc64/mm/init.c2
4 files changed, 22 insertions, 15 deletions
diff --git a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig
index 4a90809b40fb..5446e2a499b1 100644
--- a/arch/sparc64/Kconfig
+++ b/arch/sparc64/Kconfig
@@ -254,6 +254,7 @@ endmenu
config NUMA
bool "NUMA support"
+ depends on SMP
config NODES_SHIFT
int
diff --git a/arch/sparc64/kernel/of_device.c b/arch/sparc64/kernel/of_device.c
index c15bcdf75c0d..5c4fbc23aeea 100644
--- a/arch/sparc64/kernel/of_device.c
+++ b/arch/sparc64/kernel/of_device.c
@@ -119,7 +119,7 @@ struct of_bus {
int *addrc, int *sizec);
int (*map)(u32 *addr, const u32 *range,
int na, int ns, int pna);
- unsigned int (*get_flags)(const u32 *addr);
+ unsigned long (*get_flags)(const u32 *addr, unsigned long);
};
/*
@@ -179,8 +179,10 @@ static int of_bus_default_map(u32 *addr, const u32 *range,
return 0;
}
-static unsigned int of_bus_default_get_flags(const u32 *addr)
+static unsigned long of_bus_default_get_flags(const u32 *addr, unsigned long flags)
{
+ if (flags)
+ return flags;
return IORESOURCE_MEM;
}
@@ -272,17 +274,21 @@ static int of_bus_pci_map(u32 *addr, const u32 *range,
return 0;
}
-static unsigned int of_bus_pci_get_flags(const u32 *addr)
+static unsigned long of_bus_pci_get_flags(const u32 *addr, unsigned long flags)
{
- unsigned int flags = 0;
u32 w = addr[0];
+ /* For PCI, we override whatever child busses may have used. */
+ flags = 0;
switch((w >> 24) & 0x03) {
case 0x01:
flags |= IORESOURCE_IO;
+ break;
+
case 0x02: /* 32 bits */
case 0x03: /* 64 bits */
flags |= IORESOURCE_MEM;
+ break;
}
if (w & 0x40000000)
flags |= IORESOURCE_PREFETCH;
@@ -510,10 +516,10 @@ static void __init build_device_resources(struct of_device *op,
int pna, pns;
size = of_read_addr(reg + na, ns);
- flags = bus->get_flags(reg);
-
memcpy(addr, reg, na * 4);
+ flags = bus->get_flags(addr, 0);
+
if (use_1to1_mapping(pp)) {
result = of_read_addr(addr, na);
goto build_res;
@@ -538,6 +544,8 @@ static void __init build_device_resources(struct of_device *op,
dna, dns, pna))
break;
+ flags = pbus->get_flags(addr, flags);
+
dna = pna;
dns = pns;
dbus = pbus;
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c
index 743ccad61c60..2be166c544ca 100644
--- a/arch/sparc64/kernel/smp.c
+++ b/arch/sparc64/kernel/smp.c
@@ -80,8 +80,6 @@ void smp_bogo(struct seq_file *m)
i, cpu_data(i).clock_tick);
}
-static __cacheline_aligned_in_smp DEFINE_SPINLOCK(call_lock);
-
extern void setup_sparc64_timer(void);
static volatile unsigned long callin_flag = 0;
@@ -120,9 +118,9 @@ void __cpuinit smp_callin(void)
while (!cpu_isset(cpuid, smp_commenced_mask))
rmb();
- spin_lock(&call_lock);
+ ipi_call_lock();
cpu_set(cpuid, cpu_online_map);
- spin_unlock(&call_lock);
+ ipi_call_unlock();
/* idle thread is expected to have preempt disabled */
preempt_disable();
@@ -1305,10 +1303,6 @@ int __cpu_disable(void)
c->core_id = 0;
c->proc_id = -1;
- spin_lock(&call_lock);
- cpu_clear(cpu, cpu_online_map);
- spin_unlock(&call_lock);
-
smp_wmb();
/* Make sure no interrupts point to this cpu. */
@@ -1318,6 +1312,10 @@ int __cpu_disable(void)
mdelay(1);
local_irq_disable();
+ ipi_call_lock();
+ cpu_clear(cpu, cpu_online_map);
+ ipi_call_unlock();
+
return 0;
}
diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c
index 7c3c81f60a6e..4fb9de00fc8a 100644
--- a/arch/sparc64/mm/init.c
+++ b/arch/sparc64/mm/init.c
@@ -1875,7 +1875,7 @@ static int pavail_rescan_ents __initdata;
* memory list again, and make sure it provides at least as much
* memory as 'pavail' does.
*/
-static void setup_valid_addr_bitmap_from_pavail(void)
+static void __init setup_valid_addr_bitmap_from_pavail(void)
{
int i;