diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-07-14 20:27:44 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-07-14 20:27:44 -0400 |
commit | 6f7dd68b755b215deda5188a2c13c00f4776ea66 (patch) | |
tree | 2a63c972ac89d7ae290910d5c6b1c6300ccbafd5 /arch/powerpc/platforms | |
parent | ea4c1a7e14051e2ba81fc7dc02e3d55bfb2d7548 (diff) | |
parent | 95f72d1ed41a66f1c1c29c24d479de81a0bea36f (diff) |
Merge branch 'lmb-to-memblock' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
* 'lmb-to-memblock' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
lmb: rename to memblock
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r-- | arch/powerpc/platforms/85xx/corenet_ds.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/mpc8536_ds.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/mpc85xx_ds.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/mpc85xx_mds.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/iommu.c | 10 | ||||
-rw-r--r-- | arch/powerpc/platforms/embedded6xx/wii.c | 12 | ||||
-rw-r--r-- | arch/powerpc/platforms/maple/setup.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/pasemi/iommu.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/powermac/setup.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/ps3/htab.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/ps3/mm.c | 6 | ||||
-rw-r--r-- | arch/powerpc/platforms/ps3/os-area.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/hotplug-memory.c | 38 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/iommu.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/phyp_dump.c | 4 |
16 files changed, 54 insertions, 54 deletions
diff --git a/arch/powerpc/platforms/85xx/corenet_ds.c b/arch/powerpc/platforms/85xx/corenet_ds.c index 534c2ecc89d..2ab338c9ac3 100644 --- a/arch/powerpc/platforms/85xx/corenet_ds.c +++ b/arch/powerpc/platforms/85xx/corenet_ds.c | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <linux/kdev_t.h> | 16 | #include <linux/kdev_t.h> |
17 | #include <linux/delay.h> | 17 | #include <linux/delay.h> |
18 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
19 | #include <linux/lmb.h> | 19 | #include <linux/memblock.h> |
20 | 20 | ||
21 | #include <asm/system.h> | 21 | #include <asm/system.h> |
22 | #include <asm/time.h> | 22 | #include <asm/time.h> |
@@ -100,7 +100,7 @@ void __init corenet_ds_setup_arch(void) | |||
100 | #endif | 100 | #endif |
101 | 101 | ||
102 | #ifdef CONFIG_SWIOTLB | 102 | #ifdef CONFIG_SWIOTLB |
103 | if (lmb_end_of_DRAM() > max) { | 103 | if (memblock_end_of_DRAM() > max) { |
104 | ppc_swiotlb_enable = 1; | 104 | ppc_swiotlb_enable = 1; |
105 | set_pci_dma_ops(&swiotlb_dma_ops); | 105 | set_pci_dma_ops(&swiotlb_dma_ops); |
106 | ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb; | 106 | ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb; |
diff --git a/arch/powerpc/platforms/85xx/mpc8536_ds.c b/arch/powerpc/platforms/85xx/mpc8536_ds.c index 004b7d36cdb..f79f2f10214 100644 --- a/arch/powerpc/platforms/85xx/mpc8536_ds.c +++ b/arch/powerpc/platforms/85xx/mpc8536_ds.c | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <linux/seq_file.h> | 17 | #include <linux/seq_file.h> |
18 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
19 | #include <linux/of_platform.h> | 19 | #include <linux/of_platform.h> |
20 | #include <linux/lmb.h> | 20 | #include <linux/memblock.h> |
21 | 21 | ||
22 | #include <asm/system.h> | 22 | #include <asm/system.h> |
23 | #include <asm/time.h> | 23 | #include <asm/time.h> |
@@ -94,7 +94,7 @@ static void __init mpc8536_ds_setup_arch(void) | |||
94 | #endif | 94 | #endif |
95 | 95 | ||
96 | #ifdef CONFIG_SWIOTLB | 96 | #ifdef CONFIG_SWIOTLB |
97 | if (lmb_end_of_DRAM() > max) { | 97 | if (memblock_end_of_DRAM() > max) { |
98 | ppc_swiotlb_enable = 1; | 98 | ppc_swiotlb_enable = 1; |
99 | set_pci_dma_ops(&swiotlb_dma_ops); | 99 | set_pci_dma_ops(&swiotlb_dma_ops); |
100 | ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb; | 100 | ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb; |
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platforms/85xx/mpc85xx_ds.c index 544011a562f..8190bc25bf2 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c | |||
@@ -20,7 +20,7 @@ | |||
20 | #include <linux/seq_file.h> | 20 | #include <linux/seq_file.h> |
21 | #include <linux/interrupt.h> | 21 | #include <linux/interrupt.h> |
22 | #include <linux/of_platform.h> | 22 | #include <linux/of_platform.h> |
23 | #include <linux/lmb.h> | 23 | #include <linux/memblock.h> |
24 | 24 | ||
25 | #include <asm/system.h> | 25 | #include <asm/system.h> |
26 | #include <asm/time.h> | 26 | #include <asm/time.h> |
@@ -190,7 +190,7 @@ static void __init mpc85xx_ds_setup_arch(void) | |||
190 | #endif | 190 | #endif |
191 | 191 | ||
192 | #ifdef CONFIG_SWIOTLB | 192 | #ifdef CONFIG_SWIOTLB |
193 | if (lmb_end_of_DRAM() > max) { | 193 | if (memblock_end_of_DRAM() > max) { |
194 | ppc_swiotlb_enable = 1; | 194 | ppc_swiotlb_enable = 1; |
195 | set_pci_dma_ops(&swiotlb_dma_ops); | 195 | set_pci_dma_ops(&swiotlb_dma_ops); |
196 | ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb; | 196 | ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb; |
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/arch/powerpc/platforms/85xx/mpc85xx_mds.c index 8fe87fc6148..494513682d7 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c | |||
@@ -33,7 +33,7 @@ | |||
33 | #include <linux/of_platform.h> | 33 | #include <linux/of_platform.h> |
34 | #include <linux/of_device.h> | 34 | #include <linux/of_device.h> |
35 | #include <linux/phy.h> | 35 | #include <linux/phy.h> |
36 | #include <linux/lmb.h> | 36 | #include <linux/memblock.h> |
37 | 37 | ||
38 | #include <asm/system.h> | 38 | #include <asm/system.h> |
39 | #include <asm/atomic.h> | 39 | #include <asm/atomic.h> |
@@ -325,7 +325,7 @@ static void __init mpc85xx_mds_setup_arch(void) | |||
325 | #endif /* CONFIG_QUICC_ENGINE */ | 325 | #endif /* CONFIG_QUICC_ENGINE */ |
326 | 326 | ||
327 | #ifdef CONFIG_SWIOTLB | 327 | #ifdef CONFIG_SWIOTLB |
328 | if (lmb_end_of_DRAM() > max) { | 328 | if (memblock_end_of_DRAM() > max) { |
329 | ppc_swiotlb_enable = 1; | 329 | ppc_swiotlb_enable = 1; |
330 | set_pci_dma_ops(&swiotlb_dma_ops); | 330 | set_pci_dma_ops(&swiotlb_dma_ops); |
331 | ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb; | 331 | ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb; |
diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c index 2aa69a69bcc..b11c3535f35 100644 --- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c +++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | |||
@@ -19,7 +19,7 @@ | |||
19 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
20 | #include <linux/seq_file.h> | 20 | #include <linux/seq_file.h> |
21 | #include <linux/of_platform.h> | 21 | #include <linux/of_platform.h> |
22 | #include <linux/lmb.h> | 22 | #include <linux/memblock.h> |
23 | 23 | ||
24 | #include <asm/system.h> | 24 | #include <asm/system.h> |
25 | #include <asm/time.h> | 25 | #include <asm/time.h> |
@@ -103,7 +103,7 @@ mpc86xx_hpcn_setup_arch(void) | |||
103 | #endif | 103 | #endif |
104 | 104 | ||
105 | #ifdef CONFIG_SWIOTLB | 105 | #ifdef CONFIG_SWIOTLB |
106 | if (lmb_end_of_DRAM() > max) { | 106 | if (memblock_end_of_DRAM() > max) { |
107 | ppc_swiotlb_enable = 1; | 107 | ppc_swiotlb_enable = 1; |
108 | set_pci_dma_ops(&swiotlb_dma_ops); | 108 | set_pci_dma_ops(&swiotlb_dma_ops); |
109 | ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb; | 109 | ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb; |
diff --git a/arch/powerpc/platforms/cell/iommu.c b/arch/powerpc/platforms/cell/iommu.c index 4326b737d91..3712900471b 100644 --- a/arch/powerpc/platforms/cell/iommu.c +++ b/arch/powerpc/platforms/cell/iommu.c | |||
@@ -29,7 +29,7 @@ | |||
29 | #include <linux/of.h> | 29 | #include <linux/of.h> |
30 | #include <linux/of_platform.h> | 30 | #include <linux/of_platform.h> |
31 | #include <linux/slab.h> | 31 | #include <linux/slab.h> |
32 | #include <linux/lmb.h> | 32 | #include <linux/memblock.h> |
33 | 33 | ||
34 | #include <asm/prom.h> | 34 | #include <asm/prom.h> |
35 | #include <asm/iommu.h> | 35 | #include <asm/iommu.h> |
@@ -845,10 +845,10 @@ static int __init cell_iommu_init_disabled(void) | |||
845 | /* If we found a DMA window, we check if it's big enough to enclose | 845 | /* If we found a DMA window, we check if it's big enough to enclose |
846 | * all of physical memory. If not, we force enable IOMMU | 846 | * all of physical memory. If not, we force enable IOMMU |
847 | */ | 847 | */ |
848 | if (np && size < lmb_end_of_DRAM()) { | 848 | if (np && size < memblock_end_of_DRAM()) { |
849 | printk(KERN_WARNING "iommu: force-enabled, dma window" | 849 | printk(KERN_WARNING "iommu: force-enabled, dma window" |
850 | " (%ldMB) smaller than total memory (%lldMB)\n", | 850 | " (%ldMB) smaller than total memory (%lldMB)\n", |
851 | size >> 20, lmb_end_of_DRAM() >> 20); | 851 | size >> 20, memblock_end_of_DRAM() >> 20); |
852 | return -ENODEV; | 852 | return -ENODEV; |
853 | } | 853 | } |
854 | 854 | ||
@@ -1064,7 +1064,7 @@ static int __init cell_iommu_fixed_mapping_init(void) | |||
1064 | } | 1064 | } |
1065 | 1065 | ||
1066 | fbase = _ALIGN_UP(fbase, 1 << IO_SEGMENT_SHIFT); | 1066 | fbase = _ALIGN_UP(fbase, 1 << IO_SEGMENT_SHIFT); |
1067 | fsize = lmb_phys_mem_size(); | 1067 | fsize = memblock_phys_mem_size(); |
1068 | 1068 | ||
1069 | if ((fbase + fsize) <= 0x800000000ul) | 1069 | if ((fbase + fsize) <= 0x800000000ul) |
1070 | hbase = 0; /* use the device tree window */ | 1070 | hbase = 0; /* use the device tree window */ |
@@ -1169,7 +1169,7 @@ static int __init cell_iommu_init(void) | |||
1169 | * Note: should we make sure we have the IOMMU actually disabled ? | 1169 | * Note: should we make sure we have the IOMMU actually disabled ? |
1170 | */ | 1170 | */ |
1171 | if (iommu_is_off || | 1171 | if (iommu_is_off || |
1172 | (!iommu_force_on && lmb_end_of_DRAM() <= 0x80000000ull)) | 1172 | (!iommu_force_on && memblock_end_of_DRAM() <= 0x80000000ull)) |
1173 | if (cell_iommu_init_disabled() == 0) | 1173 | if (cell_iommu_init_disabled() == 0) |
1174 | goto bail; | 1174 | goto bail; |
1175 | 1175 | ||
diff --git a/arch/powerpc/platforms/embedded6xx/wii.c b/arch/powerpc/platforms/embedded6xx/wii.c index 174a04ac480..5cdcc7c8d97 100644 --- a/arch/powerpc/platforms/embedded6xx/wii.c +++ b/arch/powerpc/platforms/embedded6xx/wii.c | |||
@@ -20,7 +20,7 @@ | |||
20 | #include <linux/seq_file.h> | 20 | #include <linux/seq_file.h> |
21 | #include <linux/kexec.h> | 21 | #include <linux/kexec.h> |
22 | #include <linux/of_platform.h> | 22 | #include <linux/of_platform.h> |
23 | #include <linux/lmb.h> | 23 | #include <linux/memblock.h> |
24 | #include <mm/mmu_decl.h> | 24 | #include <mm/mmu_decl.h> |
25 | 25 | ||
26 | #include <asm/io.h> | 26 | #include <asm/io.h> |
@@ -65,7 +65,7 @@ static int __init page_aligned(unsigned long x) | |||
65 | 65 | ||
66 | void __init wii_memory_fixups(void) | 66 | void __init wii_memory_fixups(void) |
67 | { | 67 | { |
68 | struct lmb_property *p = lmb.memory.region; | 68 | struct memblock_property *p = memblock.memory.region; |
69 | 69 | ||
70 | /* | 70 | /* |
71 | * This is part of a workaround to allow the use of two | 71 | * This is part of a workaround to allow the use of two |
@@ -77,7 +77,7 @@ void __init wii_memory_fixups(void) | |||
77 | * between both ranges. | 77 | * between both ranges. |
78 | */ | 78 | */ |
79 | 79 | ||
80 | BUG_ON(lmb.memory.cnt != 2); | 80 | BUG_ON(memblock.memory.cnt != 2); |
81 | BUG_ON(!page_aligned(p[0].base) || !page_aligned(p[1].base)); | 81 | BUG_ON(!page_aligned(p[0].base) || !page_aligned(p[1].base)); |
82 | 82 | ||
83 | p[0].size = _ALIGN_DOWN(p[0].size, PAGE_SIZE); | 83 | p[0].size = _ALIGN_DOWN(p[0].size, PAGE_SIZE); |
@@ -92,11 +92,11 @@ void __init wii_memory_fixups(void) | |||
92 | 92 | ||
93 | p[0].size += wii_hole_size + p[1].size; | 93 | p[0].size += wii_hole_size + p[1].size; |
94 | 94 | ||
95 | lmb.memory.cnt = 1; | 95 | memblock.memory.cnt = 1; |
96 | lmb_analyze(); | 96 | memblock_analyze(); |
97 | 97 | ||
98 | /* reserve the hole */ | 98 | /* reserve the hole */ |
99 | lmb_reserve(wii_hole_start, wii_hole_size); | 99 | memblock_reserve(wii_hole_start, wii_hole_size); |
100 | 100 | ||
101 | /* allow ioremapping the address space in the hole */ | 101 | /* allow ioremapping the address space in the hole */ |
102 | __allow_ioremap_reserved = 1; | 102 | __allow_ioremap_reserved = 1; |
diff --git a/arch/powerpc/platforms/maple/setup.c b/arch/powerpc/platforms/maple/setup.c index 39df70529d2..3fff8d979b4 100644 --- a/arch/powerpc/platforms/maple/setup.c +++ b/arch/powerpc/platforms/maple/setup.c | |||
@@ -41,7 +41,7 @@ | |||
41 | #include <linux/smp.h> | 41 | #include <linux/smp.h> |
42 | #include <linux/bitops.h> | 42 | #include <linux/bitops.h> |
43 | #include <linux/of_device.h> | 43 | #include <linux/of_device.h> |
44 | #include <linux/lmb.h> | 44 | #include <linux/memblock.h> |
45 | 45 | ||
46 | #include <asm/processor.h> | 46 | #include <asm/processor.h> |
47 | #include <asm/sections.h> | 47 | #include <asm/sections.h> |
diff --git a/arch/powerpc/platforms/pasemi/iommu.c b/arch/powerpc/platforms/pasemi/iommu.c index 7b1d608ea3c..1f9fb2c5776 100644 --- a/arch/powerpc/platforms/pasemi/iommu.c +++ b/arch/powerpc/platforms/pasemi/iommu.c | |||
@@ -204,7 +204,7 @@ int __init iob_init(struct device_node *dn) | |||
204 | pr_debug(" -> %s\n", __func__); | 204 | pr_debug(" -> %s\n", __func__); |
205 | 205 | ||
206 | /* Allocate a spare page to map all invalid IOTLB pages. */ | 206 | /* Allocate a spare page to map all invalid IOTLB pages. */ |
207 | tmp = lmb_alloc(IOBMAP_PAGE_SIZE, IOBMAP_PAGE_SIZE); | 207 | tmp = memblock_alloc(IOBMAP_PAGE_SIZE, IOBMAP_PAGE_SIZE); |
208 | if (!tmp) | 208 | if (!tmp) |
209 | panic("IOBMAP: Cannot allocate spare page!"); | 209 | panic("IOBMAP: Cannot allocate spare page!"); |
210 | /* Empty l1 is marked invalid */ | 210 | /* Empty l1 is marked invalid */ |
@@ -275,7 +275,7 @@ void __init alloc_iobmap_l2(void) | |||
275 | return; | 275 | return; |
276 | #endif | 276 | #endif |
277 | /* For 2G space, 8x64 pages (2^21 bytes) is max total l2 size */ | 277 | /* For 2G space, 8x64 pages (2^21 bytes) is max total l2 size */ |
278 | iob_l2_base = (u32 *)abs_to_virt(lmb_alloc_base(1UL<<21, 1UL<<21, 0x80000000)); | 278 | iob_l2_base = (u32 *)abs_to_virt(memblock_alloc_base(1UL<<21, 1UL<<21, 0x80000000)); |
279 | 279 | ||
280 | printk(KERN_INFO "IOBMAP L2 allocated at: %p\n", iob_l2_base); | 280 | printk(KERN_INFO "IOBMAP L2 allocated at: %p\n", iob_l2_base); |
281 | } | 281 | } |
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c index f1d0132ebcc..9deb274841f 100644 --- a/arch/powerpc/platforms/powermac/setup.c +++ b/arch/powerpc/platforms/powermac/setup.c | |||
@@ -51,7 +51,7 @@ | |||
51 | #include <linux/suspend.h> | 51 | #include <linux/suspend.h> |
52 | #include <linux/of_device.h> | 52 | #include <linux/of_device.h> |
53 | #include <linux/of_platform.h> | 53 | #include <linux/of_platform.h> |
54 | #include <linux/lmb.h> | 54 | #include <linux/memblock.h> |
55 | 55 | ||
56 | #include <asm/reg.h> | 56 | #include <asm/reg.h> |
57 | #include <asm/sections.h> | 57 | #include <asm/sections.h> |
@@ -619,7 +619,7 @@ static int __init pmac_probe(void) | |||
619 | * driver needs that. We have to allocate it now. We allocate 4k | 619 | * driver needs that. We have to allocate it now. We allocate 4k |
620 | * (1 small page) for now. | 620 | * (1 small page) for now. |
621 | */ | 621 | */ |
622 | smu_cmdbuf_abs = lmb_alloc_base(4096, 4096, 0x80000000UL); | 622 | smu_cmdbuf_abs = memblock_alloc_base(4096, 4096, 0x80000000UL); |
623 | #endif /* CONFIG_PMAC_SMU */ | 623 | #endif /* CONFIG_PMAC_SMU */ |
624 | 624 | ||
625 | return 1; | 625 | return 1; |
diff --git a/arch/powerpc/platforms/ps3/htab.c b/arch/powerpc/platforms/ps3/htab.c index 1e8a1e39dfe..2c0ed87f202 100644 --- a/arch/powerpc/platforms/ps3/htab.c +++ b/arch/powerpc/platforms/ps3/htab.c | |||
@@ -19,7 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/lmb.h> | 22 | #include <linux/memblock.h> |
23 | 23 | ||
24 | #include <asm/machdep.h> | 24 | #include <asm/machdep.h> |
25 | #include <asm/prom.h> | 25 | #include <asm/prom.h> |
diff --git a/arch/powerpc/platforms/ps3/mm.c b/arch/powerpc/platforms/ps3/mm.c index 7925751e464..c2045880e67 100644 --- a/arch/powerpc/platforms/ps3/mm.c +++ b/arch/powerpc/platforms/ps3/mm.c | |||
@@ -21,7 +21,7 @@ | |||
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
23 | #include <linux/memory_hotplug.h> | 23 | #include <linux/memory_hotplug.h> |
24 | #include <linux/lmb.h> | 24 | #include <linux/memblock.h> |
25 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
26 | 26 | ||
27 | #include <asm/cell-regs.h> | 27 | #include <asm/cell-regs.h> |
@@ -318,8 +318,8 @@ static int __init ps3_mm_add_memory(void) | |||
318 | return result; | 318 | return result; |
319 | } | 319 | } |
320 | 320 | ||
321 | lmb_add(start_addr, map.r1.size); | 321 | memblock_add(start_addr, map.r1.size); |
322 | lmb_analyze(); | 322 | memblock_analyze(); |
323 | 323 | ||
324 | result = online_pages(start_pfn, nr_pages); | 324 | result = online_pages(start_pfn, nr_pages); |
325 | 325 | ||
diff --git a/arch/powerpc/platforms/ps3/os-area.c b/arch/powerpc/platforms/ps3/os-area.c index dd521a181f2..5b759b66959 100644 --- a/arch/powerpc/platforms/ps3/os-area.c +++ b/arch/powerpc/platforms/ps3/os-area.c | |||
@@ -24,7 +24,7 @@ | |||
24 | #include <linux/fs.h> | 24 | #include <linux/fs.h> |
25 | #include <linux/syscalls.h> | 25 | #include <linux/syscalls.h> |
26 | #include <linux/ctype.h> | 26 | #include <linux/ctype.h> |
27 | #include <linux/lmb.h> | 27 | #include <linux/memblock.h> |
28 | #include <linux/of.h> | 28 | #include <linux/of.h> |
29 | #include <linux/slab.h> | 29 | #include <linux/slab.h> |
30 | 30 | ||
@@ -723,7 +723,7 @@ static void os_area_queue_work(void) | |||
723 | * flash to a high address in the boot memory region and then puts that RAM | 723 | * flash to a high address in the boot memory region and then puts that RAM |
724 | * address and the byte count into the repository for retrieval by the guest. | 724 | * address and the byte count into the repository for retrieval by the guest. |
725 | * We copy the data we want into a static variable and allow the memory setup | 725 | * We copy the data we want into a static variable and allow the memory setup |
726 | * by the HV to be claimed by the lmb manager. | 726 | * by the HV to be claimed by the memblock manager. |
727 | * | 727 | * |
728 | * The os area mirror will not be available to a second stage kernel, and | 728 | * The os area mirror will not be available to a second stage kernel, and |
729 | * the header verify will fail. In this case, the saved_params values will | 729 | * the header verify will fail. In this case, the saved_params values will |
diff --git a/arch/powerpc/platforms/pseries/hotplug-memory.c b/arch/powerpc/platforms/pseries/hotplug-memory.c index 01e7b5bb3c1..deab5f94609 100644 --- a/arch/powerpc/platforms/pseries/hotplug-memory.c +++ b/arch/powerpc/platforms/pseries/hotplug-memory.c | |||
@@ -10,14 +10,14 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/of.h> | 12 | #include <linux/of.h> |
13 | #include <linux/lmb.h> | 13 | #include <linux/memblock.h> |
14 | #include <linux/vmalloc.h> | 14 | #include <linux/vmalloc.h> |
15 | #include <asm/firmware.h> | 15 | #include <asm/firmware.h> |
16 | #include <asm/machdep.h> | 16 | #include <asm/machdep.h> |
17 | #include <asm/pSeries_reconfig.h> | 17 | #include <asm/pSeries_reconfig.h> |
18 | #include <asm/sparsemem.h> | 18 | #include <asm/sparsemem.h> |
19 | 19 | ||
20 | static int pseries_remove_lmb(unsigned long base, unsigned int lmb_size) | 20 | static int pseries_remove_memblock(unsigned long base, unsigned int memblock_size) |
21 | { | 21 | { |
22 | unsigned long start, start_pfn; | 22 | unsigned long start, start_pfn; |
23 | struct zone *zone; | 23 | struct zone *zone; |
@@ -26,7 +26,7 @@ static int pseries_remove_lmb(unsigned long base, unsigned int lmb_size) | |||
26 | start_pfn = base >> PAGE_SHIFT; | 26 | start_pfn = base >> PAGE_SHIFT; |
27 | 27 | ||
28 | if (!pfn_valid(start_pfn)) { | 28 | if (!pfn_valid(start_pfn)) { |
29 | lmb_remove(base, lmb_size); | 29 | memblock_remove(base, memblock_size); |
30 | return 0; | 30 | return 0; |
31 | } | 31 | } |
32 | 32 | ||
@@ -41,20 +41,20 @@ static int pseries_remove_lmb(unsigned long base, unsigned int lmb_size) | |||
41 | * to sysfs "state" file and we can't remove sysfs entries | 41 | * to sysfs "state" file and we can't remove sysfs entries |
42 | * while writing to it. So we have to defer it to here. | 42 | * while writing to it. So we have to defer it to here. |
43 | */ | 43 | */ |
44 | ret = __remove_pages(zone, start_pfn, lmb_size >> PAGE_SHIFT); | 44 | ret = __remove_pages(zone, start_pfn, memblock_size >> PAGE_SHIFT); |
45 | if (ret) | 45 | if (ret) |
46 | return ret; | 46 | return ret; |
47 | 47 | ||
48 | /* | 48 | /* |
49 | * Update memory regions for memory remove | 49 | * Update memory regions for memory remove |
50 | */ | 50 | */ |
51 | lmb_remove(base, lmb_size); | 51 | memblock_remove(base, memblock_size); |
52 | 52 | ||
53 | /* | 53 | /* |
54 | * Remove htab bolted mappings for this section of memory | 54 | * Remove htab bolted mappings for this section of memory |
55 | */ | 55 | */ |
56 | start = (unsigned long)__va(base); | 56 | start = (unsigned long)__va(base); |
57 | ret = remove_section_mapping(start, start + lmb_size); | 57 | ret = remove_section_mapping(start, start + memblock_size); |
58 | 58 | ||
59 | /* Ensure all vmalloc mappings are flushed in case they also | 59 | /* Ensure all vmalloc mappings are flushed in case they also |
60 | * hit that section of memory | 60 | * hit that section of memory |
@@ -69,7 +69,7 @@ static int pseries_remove_memory(struct device_node *np) | |||
69 | const char *type; | 69 | const char *type; |
70 | const unsigned int *regs; | 70 | const unsigned int *regs; |
71 | unsigned long base; | 71 | unsigned long base; |
72 | unsigned int lmb_size; | 72 | unsigned int memblock_size; |
73 | int ret = -EINVAL; | 73 | int ret = -EINVAL; |
74 | 74 | ||
75 | /* | 75 | /* |
@@ -80,16 +80,16 @@ static int pseries_remove_memory(struct device_node *np) | |||
80 | return 0; | 80 | return 0; |
81 | 81 | ||
82 | /* | 82 | /* |
83 | * Find the bae address and size of the lmb | 83 | * Find the bae address and size of the memblock |
84 | */ | 84 | */ |
85 | regs = of_get_property(np, "reg", NULL); | 85 | regs = of_get_property(np, "reg", NULL); |
86 | if (!regs) | 86 | if (!regs) |
87 | return ret; | 87 | return ret; |
88 | 88 | ||
89 | base = *(unsigned long *)regs; | 89 | base = *(unsigned long *)regs; |
90 | lmb_size = regs[3]; | 90 | memblock_size = regs[3]; |
91 | 91 | ||
92 | ret = pseries_remove_lmb(base, lmb_size); | 92 | ret = pseries_remove_memblock(base, memblock_size); |
93 | return ret; | 93 | return ret; |
94 | } | 94 | } |
95 | 95 | ||
@@ -98,7 +98,7 @@ static int pseries_add_memory(struct device_node *np) | |||
98 | const char *type; | 98 | const char *type; |
99 | const unsigned int *regs; | 99 | const unsigned int *regs; |
100 | unsigned long base; | 100 | unsigned long base; |
101 | unsigned int lmb_size; | 101 | unsigned int memblock_size; |
102 | int ret = -EINVAL; | 102 | int ret = -EINVAL; |
103 | 103 | ||
104 | /* | 104 | /* |
@@ -109,43 +109,43 @@ static int pseries_add_memory(struct device_node *np) | |||
109 | return 0; | 109 | return 0; |
110 | 110 | ||
111 | /* | 111 | /* |
112 | * Find the base and size of the lmb | 112 | * Find the base and size of the memblock |
113 | */ | 113 | */ |
114 | regs = of_get_property(np, "reg", NULL); | 114 | regs = of_get_property(np, "reg", NULL); |
115 | if (!regs) | 115 | if (!regs) |
116 | return ret; | 116 | return ret; |
117 | 117 | ||
118 | base = *(unsigned long *)regs; | 118 | base = *(unsigned long *)regs; |
119 | lmb_size = regs[3]; | 119 | memblock_size = regs[3]; |
120 | 120 | ||
121 | /* | 121 | /* |
122 | * Update memory region to represent the memory add | 122 | * Update memory region to represent the memory add |
123 | */ | 123 | */ |
124 | ret = lmb_add(base, lmb_size); | 124 | ret = memblock_add(base, memblock_size); |
125 | return (ret < 0) ? -EINVAL : 0; | 125 | return (ret < 0) ? -EINVAL : 0; |
126 | } | 126 | } |
127 | 127 | ||
128 | static int pseries_drconf_memory(unsigned long *base, unsigned int action) | 128 | static int pseries_drconf_memory(unsigned long *base, unsigned int action) |
129 | { | 129 | { |
130 | struct device_node *np; | 130 | struct device_node *np; |
131 | const unsigned long *lmb_size; | 131 | const unsigned long *memblock_size; |
132 | int rc; | 132 | int rc; |
133 | 133 | ||
134 | np = of_find_node_by_path("/ibm,dynamic-reconfiguration-memory"); | 134 | np = of_find_node_by_path("/ibm,dynamic-reconfiguration-memory"); |
135 | if (!np) | 135 | if (!np) |
136 | return -EINVAL; | 136 | return -EINVAL; |
137 | 137 | ||
138 | lmb_size = of_get_property(np, "ibm,lmb-size", NULL); | 138 | memblock_size = of_get_property(np, "ibm,memblock-size", NULL); |
139 | if (!lmb_size) { | 139 | if (!memblock_size) { |
140 | of_node_put(np); | 140 | of_node_put(np); |
141 | return -EINVAL; | 141 | return -EINVAL; |
142 | } | 142 | } |
143 | 143 | ||
144 | if (action == PSERIES_DRCONF_MEM_ADD) { | 144 | if (action == PSERIES_DRCONF_MEM_ADD) { |
145 | rc = lmb_add(*base, *lmb_size); | 145 | rc = memblock_add(*base, *memblock_size); |
146 | rc = (rc < 0) ? -EINVAL : 0; | 146 | rc = (rc < 0) ? -EINVAL : 0; |
147 | } else if (action == PSERIES_DRCONF_MEM_REMOVE) { | 147 | } else if (action == PSERIES_DRCONF_MEM_REMOVE) { |
148 | rc = pseries_remove_lmb(*base, *lmb_size); | 148 | rc = pseries_remove_memblock(*base, *memblock_size); |
149 | } else { | 149 | } else { |
150 | rc = -EINVAL; | 150 | rc = -EINVAL; |
151 | } | 151 | } |
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c index d26182d42cb..395848e30c5 100644 --- a/arch/powerpc/platforms/pseries/iommu.c +++ b/arch/powerpc/platforms/pseries/iommu.c | |||
@@ -66,7 +66,7 @@ static int tce_build_pSeries(struct iommu_table *tbl, long index, | |||
66 | tcep = ((u64 *)tbl->it_base) + index; | 66 | tcep = ((u64 *)tbl->it_base) + index; |
67 | 67 | ||
68 | while (npages--) { | 68 | while (npages--) { |
69 | /* can't move this out since we might cross LMB boundary */ | 69 | /* can't move this out since we might cross MEMBLOCK boundary */ |
70 | rpn = (virt_to_abs(uaddr)) >> TCE_SHIFT; | 70 | rpn = (virt_to_abs(uaddr)) >> TCE_SHIFT; |
71 | *tcep = proto_tce | (rpn & TCE_RPN_MASK) << TCE_RPN_SHIFT; | 71 | *tcep = proto_tce | (rpn & TCE_RPN_MASK) << TCE_RPN_SHIFT; |
72 | 72 | ||
diff --git a/arch/powerpc/platforms/pseries/phyp_dump.c b/arch/powerpc/platforms/pseries/phyp_dump.c index 7ebd9e88d36..6e7742da007 100644 --- a/arch/powerpc/platforms/pseries/phyp_dump.c +++ b/arch/powerpc/platforms/pseries/phyp_dump.c | |||
@@ -255,12 +255,12 @@ void invalidate_last_dump(struct phyp_dump_header *ph, unsigned long addr) | |||
255 | 255 | ||
256 | /* ------------------------------------------------- */ | 256 | /* ------------------------------------------------- */ |
257 | /** | 257 | /** |
258 | * release_memory_range -- release memory previously lmb_reserved | 258 | * release_memory_range -- release memory previously memblock_reserved |
259 | * @start_pfn: starting physical frame number | 259 | * @start_pfn: starting physical frame number |
260 | * @nr_pages: number of pages to free. | 260 | * @nr_pages: number of pages to free. |
261 | * | 261 | * |
262 | * This routine will release memory that had been previously | 262 | * This routine will release memory that had been previously |
263 | * lmb_reserved in early boot. The released memory becomes | 263 | * memblock_reserved in early boot. The released memory becomes |
264 | * available for genreal use. | 264 | * available for genreal use. |
265 | */ | 265 | */ |
266 | static void release_memory_range(unsigned long start_pfn, | 266 | static void release_memory_range(unsigned long start_pfn, |