Loading Documentation/powerpc/booting-without-of.txt +8 −0 Original line number Diff line number Diff line Loading @@ -880,6 +880,10 @@ address which can extend beyond that limit. - device_type : Should be "soc" - ranges : Should be defined as specified in 1) to describe the translation of SOC addresses for memory mapped SOC registers. - bus-frequency: Contains the bus frequency for the SOC node. Typically, the value of this field is filled in by the boot loader. Recommended properties: Loading Loading @@ -919,6 +923,7 @@ SOC. device_type = "soc"; ranges = <00000000 e0000000 00100000> reg = <e0000000 00003000>; bus-frequency = <0>; } Loading Loading @@ -1170,6 +1175,8 @@ platforms are moved over to use the flattened-device-tree model. mdio@24520 { reg = <24520 20>; device_type = "mdio"; compatible = "gianfar"; ethernet-phy@0 { ...... Loading Loading @@ -1317,6 +1324,7 @@ not necessary as they are usually the same as the root node. device_type = "soc"; ranges = <00000000 e0000000 00100000> reg = <e0000000 00003000>; bus-frequency = <0>; mdio@24520 { reg = <24520 20>; Loading arch/powerpc/kernel/fpu.S +1 −1 Original line number Diff line number Diff line Loading @@ -66,7 +66,7 @@ _GLOBAL(load_up_fpu) #else ld r4,PACACURRENT(r13) addi r5,r4,THREAD /* Get THREAD */ ld r4,THREAD_FPEXC_MODE(r5) lwz r4,THREAD_FPEXC_MODE(r5) ori r12,r12,MSR_FP or r12,r12,r4 std r12,_MSR(r1) Loading arch/powerpc/kernel/head_64.S +3 −2 Original line number Diff line number Diff line Loading @@ -749,11 +749,12 @@ iSeries_secondary_smp_loop: .globl decrementer_iSeries_masked decrementer_iSeries_masked: /* We may not have a valid TOC pointer in here. */ li r11,1 ld r12,PACALPPACAPTR(r13) stb r11,LPPACADECRINT(r12) LOAD_REG_ADDRBASE(r12,tb_ticks_per_jiffy) lwz r12,ADDROFF(tb_ticks_per_jiffy)(r12) LOAD_REG_IMMEDIATE(r12, tb_ticks_per_jiffy) lwz r12,0(r12) mtspr SPRN_DEC,r12 /* fall through */ Loading arch/powerpc/kernel/iommu.c +6 −3 Original line number Diff line number Diff line Loading @@ -334,9 +334,6 @@ int iommu_map_sg(struct device *dev, struct iommu_table *tbl, spin_unlock_irqrestore(&(tbl->it_lock), flags); /* Make sure updates are seen by hardware */ mb(); DBG("mapped %d elements:\n", outcount); /* For the sake of iommu_unmap_sg, we clear out the length in the Loading @@ -347,6 +344,10 @@ int iommu_map_sg(struct device *dev, struct iommu_table *tbl, outs->dma_address = DMA_ERROR_CODE; outs->dma_length = 0; } /* Make sure updates are seen by hardware */ mb(); return outcount; failure: Loading @@ -358,6 +359,8 @@ int iommu_map_sg(struct device *dev, struct iommu_table *tbl, npages = (PAGE_ALIGN(s->dma_address + s->dma_length) - vaddr) >> PAGE_SHIFT; __iommu_free(tbl, vaddr, npages); s->dma_address = DMA_ERROR_CODE; s->dma_length = 0; } } spin_unlock_irqrestore(&(tbl->it_lock), flags); Loading arch/powerpc/kernel/prom.c +35 −3 Original line number Diff line number Diff line Loading @@ -491,7 +491,12 @@ void __init finish_device_tree(void) size = 16; finish_node(allnodes, &size, 1); size -= 16; if (0 == size) end = start = 0; else end = start = (unsigned long)__va(lmb_alloc(size, 128)); finish_node(allnodes, &end, 0); BUG_ON(end != start + size); Loading Loading @@ -1398,8 +1403,8 @@ struct device_node *of_find_node_by_name(struct device_node *from, read_lock(&devtree_lock); np = from ? from->allnext : allnodes; for (; np != 0; np = np->allnext) if (np->name != 0 && strcasecmp(np->name, name) == 0 for (; np != NULL; np = np->allnext) if (np->name != NULL && strcasecmp(np->name, name) == 0 && of_node_get(np)) break; if (from) Loading Loading @@ -1917,3 +1922,30 @@ int prom_update_property(struct device_node *np, return 0; } #ifdef CONFIG_KEXEC /* We may have allocated the flat device tree inside the crash kernel region * in prom_init. If so we need to move it out into regular memory. */ void kdump_move_device_tree(void) { unsigned long start, end; struct boot_param_header *new; start = __pa((unsigned long)initial_boot_params); end = start + initial_boot_params->totalsize; if (end < crashk_res.start || start > crashk_res.end) return; new = (struct boot_param_header*) __va(lmb_alloc(initial_boot_params->totalsize, PAGE_SIZE)); memcpy(new, initial_boot_params, initial_boot_params->totalsize); initial_boot_params = new; DBG("Flat device tree blob moved to %p\n", initial_boot_params); /* XXX should we unreserve the old DT? */ } #endif /* CONFIG_KEXEC */ Loading
Documentation/powerpc/booting-without-of.txt +8 −0 Original line number Diff line number Diff line Loading @@ -880,6 +880,10 @@ address which can extend beyond that limit. - device_type : Should be "soc" - ranges : Should be defined as specified in 1) to describe the translation of SOC addresses for memory mapped SOC registers. - bus-frequency: Contains the bus frequency for the SOC node. Typically, the value of this field is filled in by the boot loader. Recommended properties: Loading Loading @@ -919,6 +923,7 @@ SOC. device_type = "soc"; ranges = <00000000 e0000000 00100000> reg = <e0000000 00003000>; bus-frequency = <0>; } Loading Loading @@ -1170,6 +1175,8 @@ platforms are moved over to use the flattened-device-tree model. mdio@24520 { reg = <24520 20>; device_type = "mdio"; compatible = "gianfar"; ethernet-phy@0 { ...... Loading Loading @@ -1317,6 +1324,7 @@ not necessary as they are usually the same as the root node. device_type = "soc"; ranges = <00000000 e0000000 00100000> reg = <e0000000 00003000>; bus-frequency = <0>; mdio@24520 { reg = <24520 20>; Loading
arch/powerpc/kernel/fpu.S +1 −1 Original line number Diff line number Diff line Loading @@ -66,7 +66,7 @@ _GLOBAL(load_up_fpu) #else ld r4,PACACURRENT(r13) addi r5,r4,THREAD /* Get THREAD */ ld r4,THREAD_FPEXC_MODE(r5) lwz r4,THREAD_FPEXC_MODE(r5) ori r12,r12,MSR_FP or r12,r12,r4 std r12,_MSR(r1) Loading
arch/powerpc/kernel/head_64.S +3 −2 Original line number Diff line number Diff line Loading @@ -749,11 +749,12 @@ iSeries_secondary_smp_loop: .globl decrementer_iSeries_masked decrementer_iSeries_masked: /* We may not have a valid TOC pointer in here. */ li r11,1 ld r12,PACALPPACAPTR(r13) stb r11,LPPACADECRINT(r12) LOAD_REG_ADDRBASE(r12,tb_ticks_per_jiffy) lwz r12,ADDROFF(tb_ticks_per_jiffy)(r12) LOAD_REG_IMMEDIATE(r12, tb_ticks_per_jiffy) lwz r12,0(r12) mtspr SPRN_DEC,r12 /* fall through */ Loading
arch/powerpc/kernel/iommu.c +6 −3 Original line number Diff line number Diff line Loading @@ -334,9 +334,6 @@ int iommu_map_sg(struct device *dev, struct iommu_table *tbl, spin_unlock_irqrestore(&(tbl->it_lock), flags); /* Make sure updates are seen by hardware */ mb(); DBG("mapped %d elements:\n", outcount); /* For the sake of iommu_unmap_sg, we clear out the length in the Loading @@ -347,6 +344,10 @@ int iommu_map_sg(struct device *dev, struct iommu_table *tbl, outs->dma_address = DMA_ERROR_CODE; outs->dma_length = 0; } /* Make sure updates are seen by hardware */ mb(); return outcount; failure: Loading @@ -358,6 +359,8 @@ int iommu_map_sg(struct device *dev, struct iommu_table *tbl, npages = (PAGE_ALIGN(s->dma_address + s->dma_length) - vaddr) >> PAGE_SHIFT; __iommu_free(tbl, vaddr, npages); s->dma_address = DMA_ERROR_CODE; s->dma_length = 0; } } spin_unlock_irqrestore(&(tbl->it_lock), flags); Loading
arch/powerpc/kernel/prom.c +35 −3 Original line number Diff line number Diff line Loading @@ -491,7 +491,12 @@ void __init finish_device_tree(void) size = 16; finish_node(allnodes, &size, 1); size -= 16; if (0 == size) end = start = 0; else end = start = (unsigned long)__va(lmb_alloc(size, 128)); finish_node(allnodes, &end, 0); BUG_ON(end != start + size); Loading Loading @@ -1398,8 +1403,8 @@ struct device_node *of_find_node_by_name(struct device_node *from, read_lock(&devtree_lock); np = from ? from->allnext : allnodes; for (; np != 0; np = np->allnext) if (np->name != 0 && strcasecmp(np->name, name) == 0 for (; np != NULL; np = np->allnext) if (np->name != NULL && strcasecmp(np->name, name) == 0 && of_node_get(np)) break; if (from) Loading Loading @@ -1917,3 +1922,30 @@ int prom_update_property(struct device_node *np, return 0; } #ifdef CONFIG_KEXEC /* We may have allocated the flat device tree inside the crash kernel region * in prom_init. If so we need to move it out into regular memory. */ void kdump_move_device_tree(void) { unsigned long start, end; struct boot_param_header *new; start = __pa((unsigned long)initial_boot_params); end = start + initial_boot_params->totalsize; if (end < crashk_res.start || start > crashk_res.end) return; new = (struct boot_param_header*) __va(lmb_alloc(initial_boot_params->totalsize, PAGE_SIZE)); memcpy(new, initial_boot_params, initial_boot_params->totalsize); initial_boot_params = new; DBG("Flat device tree blob moved to %p\n", initial_boot_params); /* XXX should we unreserve the old DT? */ } #endif /* CONFIG_KEXEC */