Skip to content

Commit

Permalink
Merge master.kernel.org:/pub/scm/linux/kernel/git/paulus/ppc64-2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Linus Torvalds committed Sep 12, 2005
2 parents 1df5c10 + 2d909d0 commit 26cda98
Show file tree
Hide file tree
Showing 28 changed files with 795 additions and 273 deletions.
2 changes: 1 addition & 1 deletion arch/ppc64/kernel/iSeries_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ unsigned long __init find_and_init_phbs(void)
phb = (struct pci_controller *)kmalloc(sizeof(struct pci_controller), GFP_KERNEL);
if (phb == NULL)
return -ENOMEM;
pci_setup_pci_controller(phb);
pci_setup_pci_controller(phb);

phb->pci_mem_offset = phb->local_number = bus;
phb->first_busno = bus;
Expand Down
56 changes: 28 additions & 28 deletions arch/ppc64/kernel/maple_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ static void __init setup_u3_agp(struct pci_controller* hose)
* the reg address cell, we shall fix that by killing struct
* reg_property and using some accessor functions instead
*/
hose->first_busno = 0xf0;
hose->first_busno = 0xf0;
hose->last_busno = 0xff;
hose->ops = &u3_agp_pci_ops;
hose->cfg_addr = ioremap(0xf0000000 + 0x800000, 0x1000);
Expand Down Expand Up @@ -315,24 +315,24 @@ static int __init add_bridge(struct device_node *dev)
char* disp_name;
int *bus_range;
int primary = 1;
struct property *of_prop;
struct property *of_prop;

DBG("Adding PCI host bridge %s\n", dev->full_name);

bus_range = (int *) get_property(dev, "bus-range", &len);
if (bus_range == NULL || len < 2 * sizeof(int)) {
printk(KERN_WARNING "Can't get bus-range for %s, assume bus 0\n",
dev->full_name);
}
bus_range = (int *) get_property(dev, "bus-range", &len);
if (bus_range == NULL || len < 2 * sizeof(int)) {
printk(KERN_WARNING "Can't get bus-range for %s, assume bus 0\n",
dev->full_name);
}

hose = alloc_bootmem(sizeof(struct pci_controller));
if (hose == NULL)
return -ENOMEM;
pci_setup_pci_controller(hose);
pci_setup_pci_controller(hose);

hose->arch_data = dev;
hose->first_busno = bus_range ? bus_range[0] : 0;
hose->last_busno = bus_range ? bus_range[1] : 0xff;
hose->arch_data = dev;
hose->first_busno = bus_range ? bus_range[0] : 0;
hose->last_busno = bus_range ? bus_range[1] : 0xff;

of_prop = alloc_bootmem(sizeof(struct property) +
sizeof(hose->global_number));
Expand All @@ -346,25 +346,25 @@ static int __init add_bridge(struct device_node *dev)
}

disp_name = NULL;
if (device_is_compatible(dev, "u3-agp")) {
setup_u3_agp(hose);
disp_name = "U3-AGP";
primary = 0;
} else if (device_is_compatible(dev, "u3-ht")) {
setup_u3_ht(hose);
disp_name = "U3-HT";
primary = 1;
}
printk(KERN_INFO "Found %s PCI host bridge. Firmware bus number: %d->%d\n",
disp_name, hose->first_busno, hose->last_busno);

/* Interpret the "ranges" property */
/* This also maps the I/O region and sets isa_io/mem_base */
pci_process_bridge_OF_ranges(hose, dev);
if (device_is_compatible(dev, "u3-agp")) {
setup_u3_agp(hose);
disp_name = "U3-AGP";
primary = 0;
} else if (device_is_compatible(dev, "u3-ht")) {
setup_u3_ht(hose);
disp_name = "U3-HT";
primary = 1;
}
printk(KERN_INFO "Found %s PCI host bridge. Firmware bus number: %d->%d\n",
disp_name, hose->first_busno, hose->last_busno);

/* Interpret the "ranges" property */
/* This also maps the I/O region and sets isa_io/mem_base */
pci_process_bridge_OF_ranges(hose, dev);
pci_setup_phb_io(hose, primary);

/* Fixup "bus-range" OF property */
fixup_bus_range(dev);
/* Fixup "bus-range" OF property */
fixup_bus_range(dev);

return 0;
}
Expand Down
8 changes: 8 additions & 0 deletions arch/ppc64/kernel/pSeries_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -590,13 +590,21 @@ static int pseries_shared_idle(void)
return 0;
}

static int pSeries_pci_probe_mode(struct pci_bus *bus)
{
if (systemcfg->platform & PLATFORM_LPAR)
return PCI_PROBE_DEVTREE;
return PCI_PROBE_NORMAL;
}

struct machdep_calls __initdata pSeries_md = {
.probe = pSeries_probe,
.setup_arch = pSeries_setup_arch,
.init_early = pSeries_init_early,
.get_cpuinfo = pSeries_get_cpuinfo,
.log_error = pSeries_log_error,
.pcibios_fixup = pSeries_final_fixup,
.pci_probe_mode = pSeries_pci_probe_mode,
.irq_bus_setup = pSeries_irq_bus_setup,
.restart = rtas_restart,
.power_off = rtas_power_off,
Expand Down
13 changes: 11 additions & 2 deletions arch/ppc64/kernel/pSeries_smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ static inline int __devinit smp_startup_cpu(unsigned int lcpu)
unsigned long start_here = __pa((u32)*((unsigned long *)
pSeries_secondary_smp_init));
unsigned int pcpu;
int start_cpu;

if (cpu_isset(lcpu, of_spin_map))
/* Already started by OF and sitting in spin loop */
Expand All @@ -282,12 +283,20 @@ static inline int __devinit smp_startup_cpu(unsigned int lcpu)
/* Fixup atomic count: it exited inside IRQ handler. */
paca[lcpu].__current->thread_info->preempt_count = 0;

status = rtas_call(rtas_token("start-cpu"), 3, 1, NULL,
pcpu, start_here, lcpu);
/*
* If the RTAS start-cpu token does not exist then presume the
* cpu is already spinning.
*/
start_cpu = rtas_token("start-cpu");
if (start_cpu == RTAS_UNKNOWN_SERVICE)
return 1;

status = rtas_call(start_cpu, 3, 1, NULL, pcpu, start_here, lcpu);
if (status != 0) {
printk(KERN_ERR "start-cpu failed: %i\n", status);
return 0;
}

return 1;
}

Expand Down
Loading

0 comments on commit 26cda98

Please sign in to comment.