Skip to content

Commit

Permalink
Merge branch 'master' into upstream-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Garzik committed Jul 24, 2006
2 parents 8419dc8 + abb5a5c commit b71426e
Show file tree
Hide file tree
Showing 242 changed files with 2,028 additions and 1,973 deletions.
4 changes: 1 addition & 3 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -1676,10 +1676,8 @@ L: linux-kernel@vger.kernel.org
S: Maintained

LAPB module
P: Henner Eisen
M: eis@baty.hanse.de
L: linux-x25@vger.kernel.org
S: Maintained
S: Orphan

LASI 53c700 driver for PARISC
P: James E.J. Bottomley
Expand Down
4 changes: 2 additions & 2 deletions arch/s390/kernel/head31.S
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ startup_continue:
.Lbss_end: .long _end
.Lparmaddr: .long PARMAREA
.Lsccbaddr: .long .Lsccb
.align 4096
.org 0x12000
.Lsccb:
.hword 0x1000 # length, one page
.byte 0x00,0x00,0x00
Expand All @@ -290,7 +290,7 @@ startup_continue:
.Lscpincr2:
.quad 0x00
.fill 3984,1,0
.align 4096
.org 0x13000

#ifdef CONFIG_SHARED_KERNEL
.org 0x100000
Expand Down
4 changes: 2 additions & 2 deletions arch/s390/kernel/head64.S
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ startup_continue:
.Lparmaddr:
.quad PARMAREA

.align 4096
.org 0x12000
.Lsccb:
.hword 0x1000 # length, one page
.byte 0x00,0x00,0x00
Expand All @@ -285,7 +285,7 @@ startup_continue:
.Lscpincr2:
.quad 0x00
.fill 3984,1,0
.align 4096
.org 0x13000

#ifdef CONFIG_SHARED_KERNEL
.org 0x100000
Expand Down
46 changes: 36 additions & 10 deletions arch/s390/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -877,31 +877,57 @@ static struct bin_attribute ipl_scp_data_attr = {

static decl_subsys(ipl, NULL, NULL);

static int ipl_register_fcp_files(void)
{
int rc;

rc = sysfs_create_group(&ipl_subsys.kset.kobj,
&ipl_fcp_attr_group);
if (rc)
goto out;
rc = sysfs_create_bin_file(&ipl_subsys.kset.kobj,
&ipl_parameter_attr);
if (rc)
goto out_ipl_parm;
rc = sysfs_create_bin_file(&ipl_subsys.kset.kobj,
&ipl_scp_data_attr);
if (!rc)
goto out;

sysfs_remove_bin_file(&ipl_subsys.kset.kobj, &ipl_parameter_attr);

out_ipl_parm:
sysfs_remove_group(&ipl_subsys.kset.kobj, &ipl_fcp_attr_group);
out:
return rc;
}

static int __init
ipl_device_sysfs_register(void) {
int rc;

rc = firmware_register(&ipl_subsys);
if (rc)
return rc;
goto out;

switch (get_ipl_type()) {
case ipl_type_ccw:
sysfs_create_group(&ipl_subsys.kset.kobj, &ipl_ccw_attr_group);
rc = sysfs_create_group(&ipl_subsys.kset.kobj,
&ipl_ccw_attr_group);
break;
case ipl_type_fcp:
sysfs_create_group(&ipl_subsys.kset.kobj, &ipl_fcp_attr_group);
sysfs_create_bin_file(&ipl_subsys.kset.kobj,
&ipl_parameter_attr);
sysfs_create_bin_file(&ipl_subsys.kset.kobj,
&ipl_scp_data_attr);
rc = ipl_register_fcp_files();
break;
default:
sysfs_create_group(&ipl_subsys.kset.kobj,
&ipl_unknown_attr_group);
rc = sysfs_create_group(&ipl_subsys.kset.kobj,
&ipl_unknown_attr_group);
break;
}
return 0;

if (rc)
firmware_unregister(&ipl_subsys);
out:
return rc;
}

__initcall(ipl_device_sysfs_register);
25 changes: 7 additions & 18 deletions arch/sparc/kernel/devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

#include <asm/page.h>
#include <asm/oplib.h>
#include <asm/prom.h>
#include <asm/smp.h>
#include <asm/system.h>
#include <asm/cpudata.h>
Expand All @@ -34,12 +35,6 @@ static int check_cpu_node(int nd, int *cur_inst,
int (*compare)(int, int, void *), void *compare_arg,
int *prom_node, int *mid)
{
char node_str[128];

prom_getstring(nd, "device_type", node_str, sizeof(node_str));
if (strcmp(node_str, "cpu"))
return -ENODEV;

if (!compare(nd, *cur_inst, compare_arg)) {
if (prom_node)
*prom_node = nd;
Expand All @@ -59,20 +54,14 @@ static int check_cpu_node(int nd, int *cur_inst,
static int __cpu_find_by(int (*compare)(int, int, void *), void *compare_arg,
int *prom_node, int *mid)
{
int nd, cur_inst, err;
struct device_node *dp;
int cur_inst;

nd = prom_root_node;
cur_inst = 0;

err = check_cpu_node(nd, &cur_inst, compare, compare_arg,
prom_node, mid);
if (!err)
return 0;

nd = prom_getchild(nd);
while ((nd = prom_getsibling(nd)) != 0) {
err = check_cpu_node(nd, &cur_inst, compare, compare_arg,
prom_node, mid);
for_each_node_by_type(dp, "cpu") {
int err = check_cpu_node(dp->node, &cur_inst,
compare, compare_arg,
prom_node, mid);
if (!err)
return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion arch/sparc/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ void handler_irq(int irq, struct pt_regs * regs)
disable_pil_irq(irq);
#ifdef CONFIG_SMP
/* Only rotate on lower priority IRQ's (scsi, ethernet, etc.). */
if(irq < 10)
if((sparc_cpu_model==sun4m) && (irq < 10))
smp4m_irq_rotate(cpu);
#endif
action = sparc_irq[irq].action;
Expand Down
34 changes: 31 additions & 3 deletions arch/sparc/kernel/of_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -596,14 +596,41 @@ static struct of_device * __init scan_one_device(struct device_node *dp,
static int pil_to_sbus[] = {
0, 0, 1, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0, 0,
};
struct device_node *busp = dp->parent;
struct device_node *io_unit, *sbi = dp->parent;
struct linux_prom_registers *regs;
int board = of_getintprop_default(busp, "board#", 0);
int slot;
int board, slot;

while (sbi) {
if (!strcmp(sbi->name, "sbi"))
break;

sbi = sbi->parent;
}
if (!sbi)
goto build_resources;

regs = of_get_property(dp, "reg", NULL);
if (!regs)
goto build_resources;

slot = regs->which_io;

/* If SBI's parent is not io-unit or the io-unit lacks
* a "board#" property, something is very wrong.
*/
if (!sbi->parent || strcmp(sbi->parent->name, "io-unit")) {
printk("%s: Error, parent is not io-unit.\n",
sbi->full_name);
goto build_resources;
}
io_unit = sbi->parent;
board = of_getintprop_default(io_unit, "board#", -1);
if (board == -1) {
printk("%s: Error, lacks board# property.\n",
io_unit->full_name);
goto build_resources;
}

for (i = 0; i < op->num_irqs; i++) {
int this_irq = op->irqs[i];
int sbusl = pil_to_sbus[this_irq];
Expand All @@ -617,6 +644,7 @@ static struct of_device * __init scan_one_device(struct device_node *dp,
}
}

build_resources:
build_device_resources(op, parent);

op->dev.parent = parent;
Expand Down
9 changes: 6 additions & 3 deletions arch/sparc/kernel/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,7 @@ static struct property * __init build_one_prop(phandle node, char *prev, char *s
static struct property *tmp = NULL;
struct property *p;
int len;
const char *name;

if (tmp) {
p = tmp;
Expand All @@ -456,19 +457,21 @@ static struct property * __init build_one_prop(phandle node, char *prev, char *s

p->name = (char *) (p + 1);
if (special_name) {
strcpy(p->name, special_name);
p->length = special_len;
p->value = prom_early_alloc(special_len);
memcpy(p->value, special_val, special_len);
} else {
if (prev == NULL) {
prom_firstprop(node, p->name);
name = prom_firstprop(node, NULL);
} else {
prom_nextprop(node, prev, p->name);
name = prom_nextprop(node, prev, NULL);
}
if (strlen(p->name) == 0) {
if (strlen(name) == 0) {
tmp = p;
return NULL;
}
strcpy(p->name, name);
p->length = prom_getproplen(node, p->name);
if (p->length <= 0) {
p->length = 0;
Expand Down
96 changes: 89 additions & 7 deletions arch/sparc/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ void __cpuinit smp_store_cpu_info(int id)
void __init smp_cpus_done(unsigned int max_cpus)
{
extern void smp4m_smp_done(void);
extern void smp4d_smp_done(void);
unsigned long bogosum = 0;
int cpu, num;

Expand All @@ -100,8 +101,34 @@ void __init smp_cpus_done(unsigned int max_cpus)
num, bogosum/(500000/HZ),
(bogosum/(5000/HZ))%100);

BUG_ON(sparc_cpu_model != sun4m);
smp4m_smp_done();
switch(sparc_cpu_model) {
case sun4:
printk("SUN4\n");
BUG();
break;
case sun4c:
printk("SUN4C\n");
BUG();
break;
case sun4m:
smp4m_smp_done();
break;
case sun4d:
smp4d_smp_done();
break;
case sun4e:
printk("SUN4E\n");
BUG();
break;
case sun4u:
printk("SUN4U\n");
BUG();
break;
default:
printk("UNKNOWN!\n");
BUG();
break;
};
}

void cpu_panic(void)
Expand Down Expand Up @@ -267,9 +294,9 @@ int setup_profiling_timer(unsigned int multiplier)
void __init smp_prepare_cpus(unsigned int max_cpus)
{
extern void smp4m_boot_cpus(void);
extern void smp4d_boot_cpus(void);
int i, cpuid, extra;

BUG_ON(sparc_cpu_model != sun4m);
printk("Entering SMP Mode...\n");

extra = 0;
Expand All @@ -283,7 +310,34 @@ void __init smp_prepare_cpus(unsigned int max_cpus)

smp_store_cpu_info(boot_cpu_id);

smp4m_boot_cpus();
switch(sparc_cpu_model) {
case sun4:
printk("SUN4\n");
BUG();
break;
case sun4c:
printk("SUN4C\n");
BUG();
break;
case sun4m:
smp4m_boot_cpus();
break;
case sun4d:
smp4d_boot_cpus();
break;
case sun4e:
printk("SUN4E\n");
BUG();
break;
case sun4u:
printk("SUN4U\n");
BUG();
break;
default:
printk("UNKNOWN!\n");
BUG();
break;
};
}

/* Set this up early so that things like the scheduler can init
Expand Down Expand Up @@ -323,9 +377,37 @@ void __init smp_prepare_boot_cpu(void)
int __cpuinit __cpu_up(unsigned int cpu)
{
extern int smp4m_boot_one_cpu(int);
int ret;

ret = smp4m_boot_one_cpu(cpu);
extern int smp4d_boot_one_cpu(int);
int ret=0;

switch(sparc_cpu_model) {
case sun4:
printk("SUN4\n");
BUG();
break;
case sun4c:
printk("SUN4C\n");
BUG();
break;
case sun4m:
ret = smp4m_boot_one_cpu(cpu);
break;
case sun4d:
ret = smp4d_boot_one_cpu(cpu);
break;
case sun4e:
printk("SUN4E\n");
BUG();
break;
case sun4u:
printk("SUN4U\n");
BUG();
break;
default:
printk("UNKNOWN!\n");
BUG();
break;
};

if (!ret) {
cpu_set(cpu, smp_commenced_mask);
Expand Down
1 change: 0 additions & 1 deletion arch/sparc/kernel/sparc_ksyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ EXPORT_SYMBOL(prom_node_has_property);
EXPORT_SYMBOL(prom_setprop);
EXPORT_SYMBOL(saved_command_line);
EXPORT_SYMBOL(prom_apply_obio_ranges);
EXPORT_SYMBOL(prom_getname);
EXPORT_SYMBOL(prom_feval);
EXPORT_SYMBOL(prom_getbool);
EXPORT_SYMBOL(prom_getstring);
Expand Down
Loading

0 comments on commit b71426e

Please sign in to comment.