#include <linux/stringify.h>
#include <linux/delay.h>
#include <linux/initrd.h>
-#include <linux/bitops.h>
#include <asm/prom.h>
#include <asm/rtas.h>
#include <asm/lmb.h>
#include <asm/system.h>
#include <asm/mmu.h>
#include <asm/pgtable.h>
+#include <asm/bitops.h>
#include <asm/naca.h>
#include <asm/pci.h>
#include <asm/iommu.h>
#include <asm/btext.h>
#include <asm/sections.h>
#include <asm/machdep.h>
+#include "open_pic.h"
#ifdef DEBUG
#define DBG(fmt...) udbg_printf(fmt)
if (rp != 0 && l >= sizeof(struct isa_reg_property)) {
i = 0;
adr = (struct address_range *) mem_start;
- while ((l -= sizeof(struct isa_reg_property)) >= 0) {
+ while ((l -= sizeof(struct reg_property)) >= 0) {
if (!measure_only) {
adr[i].space = rp[i].space;
adr[i].address = rp[i].address;
strlcpy(cmd_line, p, min(l, COMMAND_LINE_SIZE));
}
#ifdef CONFIG_CMDLINE
- if (l == 0 || (l == 1 && (*p) == 0))
+ if (l == 0) /* dbl check */
strlcpy(cmd_line, CONFIG_CMDLINE, COMMAND_LINE_SIZE);
#endif /* CONFIG_CMDLINE */
}
}
- if (initial_boot_params && initial_boot_params->version >= 2) {
- /* version 2 of the kexec param format adds the phys cpuid
- * of booted proc.
- */
- boot_cpuid_phys = initial_boot_params->boot_cpuid_phys;
- boot_cpuid = 0;
- } else {
- /* Check if it's the boot-cpu, set it's hw index in paca now */
- if (get_flat_dt_prop(node, "linux,boot-cpu", NULL) != NULL) {
- u32 *prop = get_flat_dt_prop(node, "reg", NULL);
- set_hard_smp_processor_id(0, prop == NULL ? 0 : *prop);
- boot_cpuid_phys = get_hard_smp_processor_id(0);
- }
+ /* Check if it's the boot-cpu, set it's hw index in paca now */
+ if (get_flat_dt_prop(node, "linux,boot-cpu", NULL) != NULL) {
+ u32 *prop = get_flat_dt_prop(node, "reg", NULL);
+ paca[0].hw_cpu_id = prop == NULL ? 0 : *prop;
}
return 0;
scan_flat_dt(early_init_dt_scan_memory, NULL);
lmb_analyze();
systemcfg->physicalMemorySize = lmb_phys_mem_size();
- lmb_reserve(0, __pa(klimit));
DBG("Phys. mem: %lx\n", systemcfg->physicalMemorySize);
* Work out the sense (active-low level / active-high edge)
* of each interrupt from the device tree.
*/
-void __init prom_get_irq_senses(unsigned char *senses, int off, int max)
+void __init
+prom_get_irq_senses(unsigned char *senses, int off, int max)
{
struct device_node *np;
int i, j;
for (j = 0; j < np->n_intrs; j++) {
i = np->intrs[j].line;
if (i >= off && i < max)
- senses[i-off] = np->intrs[j].sense ?
- IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE :
- IRQ_SENSE_EDGE | IRQ_POLARITY_POSITIVE;
+ senses[i-off] = np->intrs[j].sense;
}
}
}
if (strcmp(node->name, "pci") == 0 &&
get_property(node, "ibm,dma-window", NULL)) {
node->bussubno = node->busno;
- iommu_devnode_init_pSeries(node);
+ iommu_devnode_init(node);
} else
node->iommu_table = parent->iommu_table;
#endif /* CONFIG_PPC_PSERIES */
return 0;
}
-/*
- * Prepare an OF node for removal from system
- */
-static void of_cleanup_node(struct device_node *np)
-{
- if (np->iommu_table && get_property(np, "ibm,dma-window", NULL))
- iommu_free_table(np);
-}
-
/*
* Remove an OF device node from the system.
* Caller should have already "gotten" np.
return -EBUSY;
}
- of_cleanup_node(np);
-
write_lock(&devtree_lock);
OF_MARK_STALE(np);
remove_node_proc_entries(np);