aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/Kconfig6
-rw-r--r--arch/powerpc/Kconfig.debug7
-rw-r--r--arch/powerpc/Makefile4
-rw-r--r--arch/powerpc/boot/Makefile2
-rw-r--r--arch/powerpc/boot/addRamDisk.c311
-rw-r--r--arch/powerpc/boot/dts/lite5200.dts28
-rw-r--r--arch/powerpc/boot/dts/lite5200b.dts5
-rw-r--r--arch/powerpc/configs/40x/acadia_defconfig3
-rw-r--r--arch/powerpc/configs/40x/ep405_defconfig3
-rw-r--r--arch/powerpc/configs/40x/hcu4_defconfig3
-rw-r--r--arch/powerpc/configs/40x/kilauea_defconfig3
-rw-r--r--arch/powerpc/configs/40x/makalu_defconfig3
-rw-r--r--arch/powerpc/configs/40x/virtex_defconfig3
-rw-r--r--arch/powerpc/configs/40x/walnut_defconfig3
-rw-r--r--arch/powerpc/configs/44x/arches_defconfig3
-rw-r--r--arch/powerpc/configs/44x/bamboo_defconfig3
-rw-r--r--arch/powerpc/configs/44x/canyonlands_defconfig3
-rw-r--r--arch/powerpc/configs/44x/ebony_defconfig3
-rw-r--r--arch/powerpc/configs/44x/eiger_defconfig3
-rw-r--r--arch/powerpc/configs/44x/katmai_defconfig3
-rw-r--r--arch/powerpc/configs/44x/rainier_defconfig3
-rw-r--r--arch/powerpc/configs/44x/redwood_defconfig3
-rw-r--r--arch/powerpc/configs/44x/sam440ep_defconfig3
-rw-r--r--arch/powerpc/configs/44x/sequoia_defconfig3
-rw-r--r--arch/powerpc/configs/44x/taishan_defconfig3
-rw-r--r--arch/powerpc/configs/44x/virtex5_defconfig3
-rw-r--r--arch/powerpc/configs/52xx/cm5200_defconfig3
-rw-r--r--arch/powerpc/configs/52xx/lite5200b_defconfig3
-rw-r--r--arch/powerpc/configs/52xx/motionpro_defconfig3
-rw-r--r--arch/powerpc/configs/52xx/pcm030_defconfig3
-rw-r--r--arch/powerpc/configs/52xx/tqm5200_defconfig3
-rw-r--r--arch/powerpc/configs/86xx/gef_ppc9a_defconfig3
-rw-r--r--arch/powerpc/configs/86xx/gef_sbc310_defconfig3
-rw-r--r--arch/powerpc/configs/86xx/gef_sbc610_defconfig3
-rw-r--r--arch/powerpc/configs/86xx/mpc8610_hpcd_defconfig3
-rw-r--r--arch/powerpc/configs/86xx/mpc8641_hpcn_defconfig3
-rw-r--r--arch/powerpc/configs/86xx/sbc8641d_defconfig3
-rw-r--r--arch/powerpc/configs/adder875_defconfig3
-rw-r--r--arch/powerpc/configs/amigaone_defconfig3
-rw-r--r--arch/powerpc/configs/c2k_defconfig3
-rw-r--r--arch/powerpc/configs/cell_defconfig3
-rw-r--r--arch/powerpc/configs/celleb_defconfig3
-rw-r--r--arch/powerpc/configs/chrp32_defconfig3
-rw-r--r--arch/powerpc/configs/ep8248e_defconfig3
-rw-r--r--arch/powerpc/configs/ep88xc_defconfig3
-rw-r--r--arch/powerpc/configs/g5_defconfig3
-rw-r--r--arch/powerpc/configs/gamecube_defconfig3
-rw-r--r--arch/powerpc/configs/holly_defconfig1
-rw-r--r--arch/powerpc/configs/iseries_defconfig3
-rw-r--r--arch/powerpc/configs/linkstation_defconfig3
-rw-r--r--arch/powerpc/configs/maple_defconfig3
-rw-r--r--arch/powerpc/configs/mgcoge_defconfig3
-rw-r--r--arch/powerpc/configs/mgsuvd_defconfig3
-rw-r--r--arch/powerpc/configs/mpc512x_defconfig3
-rw-r--r--arch/powerpc/configs/mpc5200_defconfig3
-rw-r--r--arch/powerpc/configs/mpc7448_hpc2_defconfig3
-rw-r--r--arch/powerpc/configs/pasemi_defconfig3
-rw-r--r--arch/powerpc/configs/pmac32_defconfig3
-rw-r--r--arch/powerpc/configs/ppc40x_defconfig3
-rw-r--r--arch/powerpc/configs/ppc44x_defconfig3
-rw-r--r--arch/powerpc/configs/ppc64_defconfig3
-rw-r--r--arch/powerpc/configs/ppc64e_defconfig3
-rw-r--r--arch/powerpc/configs/pq2fads_defconfig3
-rw-r--r--arch/powerpc/configs/prpmc2800_defconfig3
-rw-r--r--arch/powerpc/configs/pseries_defconfig3
-rw-r--r--arch/powerpc/configs/storcenter_defconfig3
-rw-r--r--arch/powerpc/configs/wii_defconfig3
-rw-r--r--arch/powerpc/include/asm/abs_addr.h2
-rw-r--r--arch/powerpc/include/asm/cpm.h24
-rw-r--r--arch/powerpc/include/asm/cpm1.h3
-rw-r--r--arch/powerpc/include/asm/irq.h6
-rw-r--r--arch/powerpc/include/asm/kdump.h11
-rw-r--r--arch/powerpc/include/asm/lmb.h15
-rw-r--r--arch/powerpc/include/asm/memblock.h15
-rw-r--r--arch/powerpc/include/asm/ptrace.h32
-rw-r--r--arch/powerpc/kernel/btext.c2
-rw-r--r--arch/powerpc/kernel/crash.c4
-rw-r--r--arch/powerpc/kernel/crash_dump.c4
-rw-r--r--arch/powerpc/kernel/dma-swiotlb.c2
-rw-r--r--arch/powerpc/kernel/dma.c4
-rw-r--r--arch/powerpc/kernel/fsl_booke_entry_mapping.S4
-rw-r--r--arch/powerpc/kernel/irq.c17
-rw-r--r--arch/powerpc/kernel/machine_kexec.c12
-rw-r--r--arch/powerpc/kernel/machine_kexec_64.c18
-rw-r--r--arch/powerpc/kernel/misc_32.S2
-rw-r--r--arch/powerpc/kernel/misc_64.S2
-rw-r--r--arch/powerpc/kernel/paca.c8
-rw-r--r--arch/powerpc/kernel/perf_event.c5
-rw-r--r--arch/powerpc/kernel/process.c5
-rw-r--r--arch/powerpc/kernel/prom.c62
-rw-r--r--arch/powerpc/kernel/prom_init.c2
-rw-r--r--arch/powerpc/kernel/prom_init_check.sh6
-rw-r--r--arch/powerpc/kernel/rtas.c6
-rw-r--r--arch/powerpc/kernel/rtas_flash.c39
-rw-r--r--arch/powerpc/kernel/setup-common.c2
-rw-r--r--arch/powerpc/kernel/setup_32.c20
-rw-r--r--arch/powerpc/kernel/setup_64.c24
-rw-r--r--arch/powerpc/kernel/vdso.c4
-rw-r--r--arch/powerpc/lib/Makefile4
-rw-r--r--arch/powerpc/lib/crtsavres.S129
-rw-r--r--arch/powerpc/lib/feature-fixups.c17
-rw-r--r--arch/powerpc/mm/40x_mmu.c2
-rw-r--r--arch/powerpc/mm/hash_utils_64.c26
-rw-r--r--arch/powerpc/mm/init_32.c16
-rw-r--r--arch/powerpc/mm/init_64.c2
-rw-r--r--arch/powerpc/mm/mem.c78
-rw-r--r--arch/powerpc/mm/numa.c84
-rw-r--r--arch/powerpc/mm/pgtable_32.c10
-rw-r--r--arch/powerpc/mm/pgtable_64.c4
-rw-r--r--arch/powerpc/mm/ppc_mmu_32.c4
-rw-r--r--arch/powerpc/mm/stab.c4
-rw-r--r--arch/powerpc/mm/tlb_nohash.c4
-rw-r--r--arch/powerpc/platforms/52xx/mpc52xx_pm.c11
-rw-r--r--arch/powerpc/platforms/85xx/corenet_ds.c4
-rw-r--r--arch/powerpc/platforms/85xx/mpc8536_ds.c4
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_ds.c4
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_mds.c4
-rw-r--r--arch/powerpc/platforms/86xx/mpc86xx_hpcn.c4
-rw-r--r--arch/powerpc/platforms/cell/iommu.c10
-rw-r--r--arch/powerpc/platforms/embedded6xx/wii.c12
-rw-r--r--arch/powerpc/platforms/iseries/pci.c6
-rw-r--r--arch/powerpc/platforms/maple/setup.c2
-rw-r--r--arch/powerpc/platforms/pasemi/iommu.c4
-rw-r--r--arch/powerpc/platforms/powermac/setup.c4
-rw-r--r--arch/powerpc/platforms/ps3/htab.c2
-rw-r--r--arch/powerpc/platforms/ps3/mm.c6
-rw-r--r--arch/powerpc/platforms/ps3/os-area.c4
-rw-r--r--arch/powerpc/platforms/pseries/hotplug-memory.c38
-rw-r--r--arch/powerpc/platforms/pseries/iommu.c2
-rw-r--r--arch/powerpc/platforms/pseries/phyp_dump.c4
-rw-r--r--arch/powerpc/sysdev/dart_iommu.c8
-rw-r--r--arch/powerpc/sysdev/fsl_pci.c4
-rw-r--r--arch/powerpc/sysdev/micropatch.c30
-rw-r--r--arch/powerpc/sysdev/mpic.c2
134 files changed, 622 insertions, 834 deletions
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 328774bd41ee..2031a2846865 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -132,7 +132,7 @@ config PPC
132 select HAVE_ARCH_KGDB 132 select HAVE_ARCH_KGDB
133 select HAVE_KRETPROBES 133 select HAVE_KRETPROBES
134 select HAVE_ARCH_TRACEHOOK 134 select HAVE_ARCH_TRACEHOOK
135 select HAVE_LMB 135 select HAVE_MEMBLOCK
136 select HAVE_DMA_ATTRS 136 select HAVE_DMA_ATTRS
137 select HAVE_DMA_API_DEBUG 137 select HAVE_DMA_API_DEBUG
138 select USE_GENERIC_SMP_HELPERS if SMP 138 select USE_GENERIC_SMP_HELPERS if SMP
@@ -400,7 +400,7 @@ config IRQ_ALL_CPUS
400 400
401config SPARSE_IRQ 401config SPARSE_IRQ
402 bool "Support sparse irq numbering" 402 bool "Support sparse irq numbering"
403 default y 403 default n
404 help 404 help
405 This enables support for sparse irqs. This is useful for distro 405 This enables support for sparse irqs. This is useful for distro
406 kernels that want to define a high CONFIG_NR_CPUS value but still 406 kernels that want to define a high CONFIG_NR_CPUS value but still
@@ -409,7 +409,7 @@ config SPARSE_IRQ
409 ( Sparse IRQs can also be beneficial on NUMA boxes, as they spread 409 ( Sparse IRQs can also be beneficial on NUMA boxes, as they spread
410 out the irq_desc[] array in a more NUMA-friendly way. ) 410 out the irq_desc[] array in a more NUMA-friendly way. )
411 411
412 If you don't know what to do here, say Y. 412 If you don't know what to do here, say N.
413 413
414config NUMA 414config NUMA
415 bool "NUMA support" 415 bool "NUMA support"
diff --git a/arch/powerpc/Kconfig.debug b/arch/powerpc/Kconfig.debug
index 53696da4518f..2d38a50e66ba 100644
--- a/arch/powerpc/Kconfig.debug
+++ b/arch/powerpc/Kconfig.debug
@@ -135,13 +135,6 @@ config DEBUGGER
135 depends on KGDB || XMON 135 depends on KGDB || XMON
136 default y 136 default y
137 137
138config IRQSTACKS
139 bool "Use separate kernel stacks when processing interrupts"
140 help
141 If you say Y here the kernel will use separate kernel stacks
142 for handling hard and soft interrupts. This can help avoid
143 overflowing the process kernel stacks.
144
145config VIRQ_DEBUG 138config VIRQ_DEBUG
146 bool "Expose hardware/virtual IRQ mapping via debugfs" 139 bool "Expose hardware/virtual IRQ mapping via debugfs"
147 depends on DEBUG_FS 140 depends on DEBUG_FS
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 42dcd3f4ad7b..77cfe7a29e25 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -92,10 +92,10 @@ endif
92else 92else
93 KBUILD_CFLAGS += $(call cc-option,-mtune=power4) 93 KBUILD_CFLAGS += $(call cc-option,-mtune=power4)
94endif 94endif
95else
96LDFLAGS_MODULE += arch/powerpc/lib/crtsavres.o
97endif 95endif
98 96
97LDFLAGS_MODULE += arch/powerpc/lib/crtsavres.o
98
99ifeq ($(CONFIG_TUNE_CELL),y) 99ifeq ($(CONFIG_TUNE_CELL),y)
100 KBUILD_CFLAGS += $(call cc-option,-mtune=cell) 100 KBUILD_CFLAGS += $(call cc-option,-mtune=cell)
101endif 101endif
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index ad0df7d0a643..fae8192c8fcc 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -141,7 +141,7 @@ $(patsubst %.S,%.o, $(filter %.S, $(src-boot))): %.o: %.S FORCE
141$(obj)/wrapper.a: $(obj-wlib) FORCE 141$(obj)/wrapper.a: $(obj-wlib) FORCE
142 $(call if_changed,bootar) 142 $(call if_changed,bootar)
143 143
144hostprogs-y := addnote addRamDisk hack-coff mktree 144hostprogs-y := addnote hack-coff mktree
145 145
146targets += $(patsubst $(obj)/%,%,$(obj-boot) wrapper.a) 146targets += $(patsubst $(obj)/%,%,$(obj-boot) wrapper.a)
147extra-y := $(obj)/wrapper.a $(obj-plat) $(obj)/empty.o \ 147extra-y := $(obj)/wrapper.a $(obj-plat) $(obj)/empty.o \
diff --git a/arch/powerpc/boot/addRamDisk.c b/arch/powerpc/boot/addRamDisk.c
deleted file mode 100644
index 893f446cbd22..000000000000
--- a/arch/powerpc/boot/addRamDisk.c
+++ /dev/null
@@ -1,311 +0,0 @@
1#include <stdio.h>
2#include <stdlib.h>
3#include <netinet/in.h>
4#include <unistd.h>
5#include <sys/types.h>
6#include <sys/stat.h>
7#include <string.h>
8#include <elf.h>
9
10#define ElfHeaderSize (64 * 1024)
11#define ElfPages (ElfHeaderSize / 4096)
12#define KERNELBASE (0xc000000000000000)
13#define _ALIGN_UP(addr,size) (((addr)+((size)-1))&(~((size)-1)))
14
15struct addr_range {
16 unsigned long long addr;
17 unsigned long memsize;
18 unsigned long offset;
19};
20
21static int check_elf64(void *p, int size, struct addr_range *r)
22{
23 Elf64_Ehdr *elf64 = p;
24 Elf64_Phdr *elf64ph;
25
26 if (elf64->e_ident[EI_MAG0] != ELFMAG0 ||
27 elf64->e_ident[EI_MAG1] != ELFMAG1 ||
28 elf64->e_ident[EI_MAG2] != ELFMAG2 ||
29 elf64->e_ident[EI_MAG3] != ELFMAG3 ||
30 elf64->e_ident[EI_CLASS] != ELFCLASS64 ||
31 elf64->e_ident[EI_DATA] != ELFDATA2MSB ||
32 elf64->e_type != ET_EXEC || elf64->e_machine != EM_PPC64)
33 return 0;
34
35 if ((elf64->e_phoff + sizeof(Elf64_Phdr)) > size)
36 return 0;
37
38 elf64ph = (Elf64_Phdr *) ((unsigned long)elf64 +
39 (unsigned long)elf64->e_phoff);
40
41 r->memsize = (unsigned long)elf64ph->p_memsz;
42 r->offset = (unsigned long)elf64ph->p_offset;
43 r->addr = (unsigned long long)elf64ph->p_vaddr;
44
45#ifdef DEBUG
46 printf("PPC64 ELF file, ph:\n");
47 printf("p_type 0x%08x\n", elf64ph->p_type);
48 printf("p_flags 0x%08x\n", elf64ph->p_flags);
49 printf("p_offset 0x%016llx\n", elf64ph->p_offset);
50 printf("p_vaddr 0x%016llx\n", elf64ph->p_vaddr);
51 printf("p_paddr 0x%016llx\n", elf64ph->p_paddr);
52 printf("p_filesz 0x%016llx\n", elf64ph->p_filesz);
53 printf("p_memsz 0x%016llx\n", elf64ph->p_memsz);
54 printf("p_align 0x%016llx\n", elf64ph->p_align);
55 printf("... skipping 0x%08lx bytes of ELF header\n",
56 (unsigned long)elf64ph->p_offset);
57#endif
58
59 return 64;
60}
61static void get4k(FILE *file, char *buf )
62{
63 unsigned j;
64 unsigned num = fread(buf, 1, 4096, file);
65 for ( j=num; j<4096; ++j )
66 buf[j] = 0;
67}
68
69static void put4k(FILE *file, char *buf )
70{
71 fwrite(buf, 1, 4096, file);
72}
73
74static void death(const char *msg, FILE *fdesc, const char *fname)
75{
76 fprintf(stderr, msg);
77 fclose(fdesc);
78 unlink(fname);
79 exit(1);
80}
81
82int main(int argc, char **argv)
83{
84 char inbuf[4096];
85 struct addr_range vmlinux;
86 FILE *ramDisk;
87 FILE *inputVmlinux;
88 FILE *outputVmlinux;
89
90 char *rd_name, *lx_name, *out_name;
91
92 size_t i;
93 unsigned long ramFileLen;
94 unsigned long ramLen;
95 unsigned long roundR;
96 unsigned long offset_end;
97
98 unsigned long kernelLen;
99 unsigned long actualKernelLen;
100 unsigned long round;
101 unsigned long roundedKernelLen;
102 unsigned long ramStartOffs;
103 unsigned long ramPages;
104 unsigned long roundedKernelPages;
105 unsigned long hvReleaseData;
106 u_int32_t eyeCatcher = 0xc8a5d9c4;
107 unsigned long naca;
108 unsigned long xRamDisk;
109 unsigned long xRamDiskSize;
110 long padPages;
111
112
113 if (argc < 2) {
114 fprintf(stderr, "Name of RAM disk file missing.\n");
115 exit(1);
116 }
117 rd_name = argv[1];
118
119 if (argc < 3) {
120 fprintf(stderr, "Name of vmlinux file missing.\n");
121 exit(1);
122 }
123 lx_name = argv[2];
124
125 if (argc < 4) {
126 fprintf(stderr, "Name of vmlinux output file missing.\n");
127 exit(1);
128 }
129 out_name = argv[3];
130
131
132 ramDisk = fopen(rd_name, "r");
133 if ( ! ramDisk ) {
134 fprintf(stderr, "RAM disk file \"%s\" failed to open.\n", rd_name);
135 exit(1);
136 }
137
138 inputVmlinux = fopen(lx_name, "r");
139 if ( ! inputVmlinux ) {
140 fprintf(stderr, "vmlinux file \"%s\" failed to open.\n", lx_name);
141 exit(1);
142 }
143
144 outputVmlinux = fopen(out_name, "w+");
145 if ( ! outputVmlinux ) {
146 fprintf(stderr, "output vmlinux file \"%s\" failed to open.\n", out_name);
147 exit(1);
148 }
149
150 i = fread(inbuf, 1, sizeof(inbuf), inputVmlinux);
151 if (i != sizeof(inbuf)) {
152 fprintf(stderr, "can not read vmlinux file %s: %u\n", lx_name, i);
153 exit(1);
154 }
155
156 i = check_elf64(inbuf, sizeof(inbuf), &vmlinux);
157 if (i == 0) {
158 fprintf(stderr, "You must have a linux kernel specified as argv[2]\n");
159 exit(1);
160 }
161
162 /* Input Vmlinux file */
163 fseek(inputVmlinux, 0, SEEK_END);
164 kernelLen = ftell(inputVmlinux);
165 fseek(inputVmlinux, 0, SEEK_SET);
166 printf("kernel file size = %lu\n", kernelLen);
167
168 actualKernelLen = kernelLen - ElfHeaderSize;
169
170 printf("actual kernel length (minus ELF header) = %lu\n", actualKernelLen);
171
172 round = actualKernelLen % 4096;
173 roundedKernelLen = actualKernelLen;
174 if ( round )
175 roundedKernelLen += (4096 - round);
176 printf("Vmlinux length rounded up to a 4k multiple = %ld/0x%lx \n", roundedKernelLen, roundedKernelLen);
177 roundedKernelPages = roundedKernelLen / 4096;
178 printf("Vmlinux pages to copy = %ld/0x%lx \n", roundedKernelPages, roundedKernelPages);
179
180 offset_end = _ALIGN_UP(vmlinux.memsize, 4096);
181 /* calc how many pages we need to insert between the vmlinux and the start of the ram disk */
182 padPages = offset_end/4096 - roundedKernelPages;
183
184 /* Check and see if the vmlinux is already larger than _end in System.map */
185 if (padPages < 0) {
186 /* vmlinux is larger than _end - adjust the offset to the start of the embedded ram disk */
187 offset_end = roundedKernelLen;
188 printf("vmlinux is larger than _end indicates it needs to be - offset_end = %lx \n", offset_end);
189 padPages = 0;
190 printf("will insert %lx pages between the vmlinux and the start of the ram disk \n", padPages);
191 }
192 else {
193 /* _end is larger than vmlinux - use the offset to _end that we calculated from the system map */
194 printf("vmlinux is smaller than _end indicates is needed - offset_end = %lx \n", offset_end);
195 printf("will insert %lx pages between the vmlinux and the start of the ram disk \n", padPages);
196 }
197
198
199
200 /* Input Ram Disk file */
201 // Set the offset that the ram disk will be started at.
202 ramStartOffs = offset_end; /* determined from the input vmlinux file and the system map */
203 printf("Ram Disk will start at offset = 0x%lx \n", ramStartOffs);
204
205 fseek(ramDisk, 0, SEEK_END);
206 ramFileLen = ftell(ramDisk);
207 fseek(ramDisk, 0, SEEK_SET);
208 printf("%s file size = %ld/0x%lx \n", rd_name, ramFileLen, ramFileLen);
209
210 ramLen = ramFileLen;
211
212 roundR = 4096 - (ramLen % 4096);
213 if ( roundR ) {
214 printf("Rounding RAM disk file up to a multiple of 4096, adding %ld/0x%lx \n", roundR, roundR);
215 ramLen += roundR;
216 }
217
218 printf("Rounded RAM disk size is %ld/0x%lx \n", ramLen, ramLen);
219 ramPages = ramLen / 4096;
220 printf("RAM disk pages to copy = %ld/0x%lx\n", ramPages, ramPages);
221
222
223
224 // Copy 64K ELF header
225 for (i=0; i<(ElfPages); ++i) {
226 get4k( inputVmlinux, inbuf );
227 put4k( outputVmlinux, inbuf );
228 }
229
230 /* Copy the vmlinux (as full pages). */
231 fseek(inputVmlinux, ElfHeaderSize, SEEK_SET);
232 for ( i=0; i<roundedKernelPages; ++i ) {
233 get4k( inputVmlinux, inbuf );
234 put4k( outputVmlinux, inbuf );
235 }
236
237 /* Insert pad pages (if appropriate) that are needed between */
238 /* | the end of the vmlinux and the ram disk. */
239 for (i=0; i<padPages; ++i) {
240 memset(inbuf, 0, 4096);
241 put4k(outputVmlinux, inbuf);
242 }
243
244 /* Copy the ram disk (as full pages). */
245 for ( i=0; i<ramPages; ++i ) {
246 get4k( ramDisk, inbuf );
247 put4k( outputVmlinux, inbuf );
248 }
249
250 /* Close the input files */
251 fclose(ramDisk);
252 fclose(inputVmlinux);
253 /* And flush the written output file */
254 fflush(outputVmlinux);
255
256
257
258 /* Fixup the new vmlinux to contain the ram disk starting offset (xRamDisk) and the ram disk size (xRamDiskSize) */
259 /* fseek to the hvReleaseData pointer */
260 fseek(outputVmlinux, ElfHeaderSize + 0x24, SEEK_SET);
261 if (fread(&hvReleaseData, 4, 1, outputVmlinux) != 1) {
262 death("Could not read hvReleaseData pointer\n", outputVmlinux, out_name);
263 }
264 hvReleaseData = ntohl(hvReleaseData); /* Convert to native int */
265 printf("hvReleaseData is at %08lx\n", hvReleaseData);
266
267 /* fseek to the hvReleaseData */
268 fseek(outputVmlinux, ElfHeaderSize + hvReleaseData, SEEK_SET);
269 if (fread(inbuf, 0x40, 1, outputVmlinux) != 1) {
270 death("Could not read hvReleaseData\n", outputVmlinux, out_name);
271 }
272 /* Check hvReleaseData sanity */
273 if (memcmp(inbuf, &eyeCatcher, 4) != 0) {
274 death("hvReleaseData is invalid\n", outputVmlinux, out_name);
275 }
276 /* Get the naca pointer */
277 naca = ntohl(*((u_int32_t*) &inbuf[0x0C])) - KERNELBASE;
278 printf("Naca is at offset 0x%lx \n", naca);
279
280 /* fseek to the naca */
281 fseek(outputVmlinux, ElfHeaderSize + naca, SEEK_SET);
282 if (fread(inbuf, 0x18, 1, outputVmlinux) != 1) {
283 death("Could not read naca\n", outputVmlinux, out_name);
284 }
285 xRamDisk = ntohl(*((u_int32_t *) &inbuf[0x0c]));
286 xRamDiskSize = ntohl(*((u_int32_t *) &inbuf[0x14]));
287 /* Make sure a RAM disk isn't already present */
288 if ((xRamDisk != 0) || (xRamDiskSize != 0)) {
289 death("RAM disk is already attached to this kernel\n", outputVmlinux, out_name);
290 }
291 /* Fill in the values */
292 *((u_int32_t *) &inbuf[0x0c]) = htonl(ramStartOffs);
293 *((u_int32_t *) &inbuf[0x14]) = htonl(ramPages);
294
295 /* Write out the new naca */
296 fflush(outputVmlinux);
297 fseek(outputVmlinux, ElfHeaderSize + naca, SEEK_SET);
298 if (fwrite(inbuf, 0x18, 1, outputVmlinux) != 1) {
299 death("Could not write naca\n", outputVmlinux, out_name);
300 }
301 printf("Ram Disk of 0x%lx pages is attached to the kernel at offset 0x%08lx\n",
302 ramPages, ramStartOffs);
303
304 /* Done */
305 fclose(outputVmlinux);
306 /* Set permission to executable */
307 chmod(out_name, S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH);
308
309 return 0;
310}
311
diff --git a/arch/powerpc/boot/dts/lite5200.dts b/arch/powerpc/boot/dts/lite5200.dts
index 82ff2b13bc37..179a1785d645 100644
--- a/arch/powerpc/boot/dts/lite5200.dts
+++ b/arch/powerpc/boot/dts/lite5200.dts
@@ -134,12 +134,16 @@
134 compatible = "fsl,mpc5200-gpio"; 134 compatible = "fsl,mpc5200-gpio";
135 reg = <0xb00 0x40>; 135 reg = <0xb00 0x40>;
136 interrupts = <1 7 0>; 136 interrupts = <1 7 0>;
137 gpio-controller;
138 #gpio-cells = <2>;
137 }; 139 };
138 140
139 gpio@c00 { 141 gpio@c00 {
140 compatible = "fsl,mpc5200-gpio-wkup"; 142 compatible = "fsl,mpc5200-gpio-wkup";
141 reg = <0xc00 0x40>; 143 reg = <0xc00 0x40>;
142 interrupts = <1 8 0 0 3 0>; 144 interrupts = <1 8 0 0 3 0>;
145 gpio-controller;
146 #gpio-cells = <2>;
143 }; 147 };
144 148
145 spi@f00 { 149 spi@f00 {
@@ -230,8 +234,8 @@
230 reg = <0x3000 0x400>; // fec range, since we need to setup fec interrupts 234 reg = <0x3000 0x400>; // fec range, since we need to setup fec interrupts
231 interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co. 235 interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co.
232 236
233 phy0: ethernet-phy@1 { 237 phy0: ethernet-phy@0 {
234 reg = <1>; 238 reg = <0>;
235 }; 239 };
236 }; 240 };
237 241
@@ -255,7 +259,13 @@
255 compatible = "fsl,mpc5200-i2c","fsl-i2c"; 259 compatible = "fsl,mpc5200-i2c","fsl-i2c";
256 reg = <0x3d40 0x40>; 260 reg = <0x3d40 0x40>;
257 interrupts = <2 16 0>; 261 interrupts = <2 16 0>;
262
263 eeprom@50 {
264 compatible = "atmel,24c02";
265 reg = <0x50>;
266 };
258 }; 267 };
268
259 sram@8000 { 269 sram@8000 {
260 compatible = "fsl,mpc5200-sram"; 270 compatible = "fsl,mpc5200-sram";
261 reg = <0x8000 0x4000>; 271 reg = <0x8000 0x4000>;
@@ -281,4 +291,18 @@
281 0x02000000 0 0xa0000000 0xa0000000 0 0x10000000 291 0x02000000 0 0xa0000000 0xa0000000 0 0x10000000
282 0x01000000 0 0x00000000 0xb0000000 0 0x01000000>; 292 0x01000000 0 0x00000000 0xb0000000 0 0x01000000>;
283 }; 293 };
294
295 localbus {
296 compatible = "fsl,mpc5200-lpb","simple-bus";
297 #address-cells = <2>;
298 #size-cells = <1>;
299
300 ranges = <0 0 0xff000000 0x01000000>;
301
302 flash@0,0 {
303 compatible = "amd,am29lv652d", "cfi-flash";
304 reg = <0 0 0x01000000>;
305 bank-width = <1>;
306 };
307 };
284}; 308};
diff --git a/arch/powerpc/boot/dts/lite5200b.dts b/arch/powerpc/boot/dts/lite5200b.dts
index e45a63be3a86..59702ace900f 100644
--- a/arch/powerpc/boot/dts/lite5200b.dts
+++ b/arch/powerpc/boot/dts/lite5200b.dts
@@ -259,6 +259,11 @@
259 compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c"; 259 compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c";
260 reg = <0x3d40 0x40>; 260 reg = <0x3d40 0x40>;
261 interrupts = <2 16 0>; 261 interrupts = <2 16 0>;
262
263 eeprom@50 {
264 compatible = "atmel,24c02";
265 reg = <0x50>;
266 };
262 }; 267 };
263 268
264 sram@8000 { 269 sram@8000 {
diff --git a/arch/powerpc/configs/40x/acadia_defconfig b/arch/powerpc/configs/40x/acadia_defconfig
index 8e95f8d227b9..4aa17b676a3f 100644
--- a/arch/powerpc/configs/40x/acadia_defconfig
+++ b/arch/powerpc/configs/40x/acadia_defconfig
@@ -98,8 +98,7 @@ CONFIG_GROUP_SCHED=y
98CONFIG_USER_SCHED=y 98CONFIG_USER_SCHED=y
99# CONFIG_CGROUP_SCHED is not set 99# CONFIG_CGROUP_SCHED is not set
100# CONFIG_CGROUPS is not set 100# CONFIG_CGROUPS is not set
101CONFIG_SYSFS_DEPRECATED=y 101# CONFIG_SYSFS_DEPRECATED_V2 is not set
102CONFIG_SYSFS_DEPRECATED_V2=y
103# CONFIG_RELAY is not set 102# CONFIG_RELAY is not set
104# CONFIG_NAMESPACES is not set 103# CONFIG_NAMESPACES is not set
105CONFIG_BLK_DEV_INITRD=y 104CONFIG_BLK_DEV_INITRD=y
diff --git a/arch/powerpc/configs/40x/ep405_defconfig b/arch/powerpc/configs/40x/ep405_defconfig
index 918f23fd2b18..9a5f1ab777ed 100644
--- a/arch/powerpc/configs/40x/ep405_defconfig
+++ b/arch/powerpc/configs/40x/ep405_defconfig
@@ -98,8 +98,7 @@ CONFIG_FAIR_GROUP_SCHED=y
98CONFIG_USER_SCHED=y 98CONFIG_USER_SCHED=y
99# CONFIG_CGROUP_SCHED is not set 99# CONFIG_CGROUP_SCHED is not set
100# CONFIG_CGROUPS is not set 100# CONFIG_CGROUPS is not set
101CONFIG_SYSFS_DEPRECATED=y 101# CONFIG_SYSFS_DEPRECATED_V2 is not set
102CONFIG_SYSFS_DEPRECATED_V2=y
103# CONFIG_RELAY is not set 102# CONFIG_RELAY is not set
104# CONFIG_NAMESPACES is not set 103# CONFIG_NAMESPACES is not set
105CONFIG_BLK_DEV_INITRD=y 104CONFIG_BLK_DEV_INITRD=y
diff --git a/arch/powerpc/configs/40x/hcu4_defconfig b/arch/powerpc/configs/40x/hcu4_defconfig
index f87ef0382280..0b452135d1d4 100644
--- a/arch/powerpc/configs/40x/hcu4_defconfig
+++ b/arch/powerpc/configs/40x/hcu4_defconfig
@@ -98,8 +98,7 @@ CONFIG_FAIR_GROUP_SCHED=y
98CONFIG_USER_SCHED=y 98CONFIG_USER_SCHED=y
99# CONFIG_CGROUP_SCHED is not set 99# CONFIG_CGROUP_SCHED is not set
100# CONFIG_CGROUPS is not set 100# CONFIG_CGROUPS is not set
101CONFIG_SYSFS_DEPRECATED=y 101# CONFIG_SYSFS_DEPRECATED_V2 is not set
102CONFIG_SYSFS_DEPRECATED_V2=y
103# CONFIG_RELAY is not set 102# CONFIG_RELAY is not set
104# CONFIG_NAMESPACES is not set 103# CONFIG_NAMESPACES is not set
105CONFIG_BLK_DEV_INITRD=y 104CONFIG_BLK_DEV_INITRD=y
diff --git a/arch/powerpc/configs/40x/kilauea_defconfig b/arch/powerpc/configs/40x/kilauea_defconfig
index 19fbcb075376..4d2de0bed60e 100644
--- a/arch/powerpc/configs/40x/kilauea_defconfig
+++ b/arch/powerpc/configs/40x/kilauea_defconfig
@@ -98,8 +98,7 @@ CONFIG_GROUP_SCHED=y
98CONFIG_USER_SCHED=y 98CONFIG_USER_SCHED=y
99# CONFIG_CGROUP_SCHED is not set 99# CONFIG_CGROUP_SCHED is not set
100# CONFIG_CGROUPS is not set 100# CONFIG_CGROUPS is not set
101CONFIG_SYSFS_DEPRECATED=y 101# CONFIG_SYSFS_DEPRECATED_V2 is not set
102CONFIG_SYSFS_DEPRECATED_V2=y
103# CONFIG_RELAY is not set 102# CONFIG_RELAY is not set
104# CONFIG_NAMESPACES is not set 103# CONFIG_NAMESPACES is not set
105CONFIG_BLK_DEV_INITRD=y 104CONFIG_BLK_DEV_INITRD=y
diff --git a/arch/powerpc/configs/40x/makalu_defconfig b/arch/powerpc/configs/40x/makalu_defconfig
index eb41cd695979..a1f3f505e4a7 100644
--- a/arch/powerpc/configs/40x/makalu_defconfig
+++ b/arch/powerpc/configs/40x/makalu_defconfig
@@ -98,8 +98,7 @@ CONFIG_GROUP_SCHED=y
98CONFIG_USER_SCHED=y 98CONFIG_USER_SCHED=y
99# CONFIG_CGROUP_SCHED is not set 99# CONFIG_CGROUP_SCHED is not set
100# CONFIG_CGROUPS is not set 100# CONFIG_CGROUPS is not set
101CONFIG_SYSFS_DEPRECATED=y 101# CONFIG_SYSFS_DEPRECATED_V2 is not set
102CONFIG_SYSFS_DEPRECATED_V2=y
103# CONFIG_RELAY is not set 102# CONFIG_RELAY is not set
104# CONFIG_NAMESPACES is not set 103# CONFIG_NAMESPACES is not set
105CONFIG_BLK_DEV_INITRD=y 104CONFIG_BLK_DEV_INITRD=y
diff --git a/arch/powerpc/configs/40x/virtex_defconfig b/arch/powerpc/configs/40x/virtex_defconfig
index 416e79ac0711..c76313577140 100644
--- a/arch/powerpc/configs/40x/virtex_defconfig
+++ b/arch/powerpc/configs/40x/virtex_defconfig
@@ -77,8 +77,7 @@ CONFIG_IKCONFIG_PROC=y
77CONFIG_LOG_BUF_SHIFT=14 77CONFIG_LOG_BUF_SHIFT=14
78# CONFIG_GROUP_SCHED is not set 78# CONFIG_GROUP_SCHED is not set
79# CONFIG_CGROUPS is not set 79# CONFIG_CGROUPS is not set
80CONFIG_SYSFS_DEPRECATED=y 80# CONFIG_SYSFS_DEPRECATED_V2 is not set
81CONFIG_SYSFS_DEPRECATED_V2=y
82# CONFIG_RELAY is not set 81# CONFIG_RELAY is not set
83CONFIG_NAMESPACES=y 82CONFIG_NAMESPACES=y
84# CONFIG_UTS_NS is not set 83# CONFIG_UTS_NS is not set
diff --git a/arch/powerpc/configs/40x/walnut_defconfig b/arch/powerpc/configs/40x/walnut_defconfig
index bfff0eae39d2..6597b2f1d1a8 100644
--- a/arch/powerpc/configs/40x/walnut_defconfig
+++ b/arch/powerpc/configs/40x/walnut_defconfig
@@ -98,8 +98,7 @@ CONFIG_FAIR_GROUP_SCHED=y
98CONFIG_USER_SCHED=y 98CONFIG_USER_SCHED=y
99# CONFIG_CGROUP_SCHED is not set 99# CONFIG_CGROUP_SCHED is not set
100# CONFIG_CGROUPS is not set 100# CONFIG_CGROUPS is not set
101CONFIG_SYSFS_DEPRECATED=y 101# CONFIG_SYSFS_DEPRECATED_V2 is not set
102CONFIG_SYSFS_DEPRECATED_V2=y
103# CONFIG_RELAY is not set 102# CONFIG_RELAY is not set
104# CONFIG_NAMESPACES is not set 103# CONFIG_NAMESPACES is not set
105CONFIG_BLK_DEV_INITRD=y 104CONFIG_BLK_DEV_INITRD=y
diff --git a/arch/powerpc/configs/44x/arches_defconfig b/arch/powerpc/configs/44x/arches_defconfig
index 1f6d0490e28d..2d3dfb55fbed 100644
--- a/arch/powerpc/configs/44x/arches_defconfig
+++ b/arch/powerpc/configs/44x/arches_defconfig
@@ -98,8 +98,7 @@ CONFIG_RCU_FANOUT=32
98CONFIG_LOG_BUF_SHIFT=14 98CONFIG_LOG_BUF_SHIFT=14
99# CONFIG_GROUP_SCHED is not set 99# CONFIG_GROUP_SCHED is not set
100# CONFIG_CGROUPS is not set 100# CONFIG_CGROUPS is not set
101CONFIG_SYSFS_DEPRECATED=y 101# CONFIG_SYSFS_DEPRECATED_V2 is not set
102CONFIG_SYSFS_DEPRECATED_V2=y
103# CONFIG_RELAY is not set 102# CONFIG_RELAY is not set
104# CONFIG_NAMESPACES is not set 103# CONFIG_NAMESPACES is not set
105CONFIG_BLK_DEV_INITRD=y 104CONFIG_BLK_DEV_INITRD=y
diff --git a/arch/powerpc/configs/44x/bamboo_defconfig b/arch/powerpc/configs/44x/bamboo_defconfig
index 788faac6c27a..51a00c46df19 100644
--- a/arch/powerpc/configs/44x/bamboo_defconfig
+++ b/arch/powerpc/configs/44x/bamboo_defconfig
@@ -102,8 +102,7 @@ CONFIG_FAIR_GROUP_SCHED=y
102CONFIG_USER_SCHED=y 102CONFIG_USER_SCHED=y
103# CONFIG_CGROUP_SCHED is not set 103# CONFIG_CGROUP_SCHED is not set
104# CONFIG_CGROUPS is not set 104# CONFIG_CGROUPS is not set
105CONFIG_SYSFS_DEPRECATED=y 105# CONFIG_SYSFS_DEPRECATED_V2 is not set
106CONFIG_SYSFS_DEPRECATED_V2=y
107# CONFIG_RELAY is not set 106# CONFIG_RELAY is not set
108# CONFIG_NAMESPACES is not set 107# CONFIG_NAMESPACES is not set
109CONFIG_BLK_DEV_INITRD=y 108CONFIG_BLK_DEV_INITRD=y
diff --git a/arch/powerpc/configs/44x/canyonlands_defconfig b/arch/powerpc/configs/44x/canyonlands_defconfig
index 4ef8bcab61f8..1028b1bfb602 100644
--- a/arch/powerpc/configs/44x/canyonlands_defconfig
+++ b/arch/powerpc/configs/44x/canyonlands_defconfig
@@ -98,8 +98,7 @@ CONFIG_RCU_FANOUT=32
98CONFIG_LOG_BUF_SHIFT=14 98CONFIG_LOG_BUF_SHIFT=14
99# CONFIG_GROUP_SCHED is not set 99# CONFIG_GROUP_SCHED is not set
100# CONFIG_CGROUPS is not set 100# CONFIG_CGROUPS is not set
101CONFIG_SYSFS_DEPRECATED=y 101# CONFIG_SYSFS_DEPRECATED_V2 is not set
102CONFIG_SYSFS_DEPRECATED_V2=y
103# CONFIG_RELAY is not set 102# CONFIG_RELAY is not set
104# CONFIG_NAMESPACES is not set 103# CONFIG_NAMESPACES is not set
105CONFIG_BLK_DEV_INITRD=y 104CONFIG_BLK_DEV_INITRD=y
diff --git a/arch/powerpc/configs/44x/ebony_defconfig b/arch/powerpc/configs/44x/ebony_defconfig
index ca17b1496e32..69f5633cbd4f 100644
--- a/arch/powerpc/configs/44x/ebony_defconfig
+++ b/arch/powerpc/configs/44x/ebony_defconfig
@@ -101,8 +101,7 @@ CONFIG_FAIR_GROUP_SCHED=y
101CONFIG_USER_SCHED=y 101CONFIG_USER_SCHED=y
102# CONFIG_CGROUP_SCHED is not set 102# CONFIG_CGROUP_SCHED is not set
103# CONFIG_CGROUPS is not set 103# CONFIG_CGROUPS is not set
104CONFIG_SYSFS_DEPRECATED=y 104# CONFIG_SYSFS_DEPRECATED_V2 is not set
105CONFIG_SYSFS_DEPRECATED_V2=y
106# CONFIG_RELAY is not set 105# CONFIG_RELAY is not set
107# CONFIG_NAMESPACES is not set 106# CONFIG_NAMESPACES is not set
108CONFIG_BLK_DEV_INITRD=y 107CONFIG_BLK_DEV_INITRD=y
diff --git a/arch/powerpc/configs/44x/eiger_defconfig b/arch/powerpc/configs/44x/eiger_defconfig
index e3149bade0b2..dcd859c8b4a6 100644
--- a/arch/powerpc/configs/44x/eiger_defconfig
+++ b/arch/powerpc/configs/44x/eiger_defconfig
@@ -98,8 +98,7 @@ CONFIG_RCU_FANOUT=32
98CONFIG_LOG_BUF_SHIFT=14 98CONFIG_LOG_BUF_SHIFT=14
99# CONFIG_GROUP_SCHED is not set 99# CONFIG_GROUP_SCHED is not set
100# CONFIG_CGROUPS is not set 100# CONFIG_CGROUPS is not set
101CONFIG_SYSFS_DEPRECATED=y 101# CONFIG_SYSFS_DEPRECATED_V2 is not set
102CONFIG_SYSFS_DEPRECATED_V2=y
103# CONFIG_RELAY is not set 102# CONFIG_RELAY is not set
104# CONFIG_NAMESPACES is not set 103# CONFIG_NAMESPACES is not set
105CONFIG_BLK_DEV_INITRD=y 104CONFIG_BLK_DEV_INITRD=y
diff --git a/arch/powerpc/configs/44x/katmai_defconfig b/arch/powerpc/configs/44x/katmai_defconfig
index af244e1d255e..a2c24d1e051e 100644
--- a/arch/powerpc/configs/44x/katmai_defconfig
+++ b/arch/powerpc/configs/44x/katmai_defconfig
@@ -97,8 +97,7 @@ CONFIG_RCU_FANOUT=32
97CONFIG_LOG_BUF_SHIFT=14 97CONFIG_LOG_BUF_SHIFT=14
98# CONFIG_GROUP_SCHED is not set 98# CONFIG_GROUP_SCHED is not set
99# CONFIG_CGROUPS is not set 99# CONFIG_CGROUPS is not set
100CONFIG_SYSFS_DEPRECATED=y 100# CONFIG_SYSFS_DEPRECATED_V2 is not set
101CONFIG_SYSFS_DEPRECATED_V2=y
102# CONFIG_RELAY is not set 101# CONFIG_RELAY is not set
103# CONFIG_NAMESPACES is not set 102# CONFIG_NAMESPACES is not set
104CONFIG_BLK_DEV_INITRD=y 103CONFIG_BLK_DEV_INITRD=y
diff --git a/arch/powerpc/configs/44x/rainier_defconfig b/arch/powerpc/configs/44x/rainier_defconfig
index 8fed3b26af2e..3bb55b57077e 100644
--- a/arch/powerpc/configs/44x/rainier_defconfig
+++ b/arch/powerpc/configs/44x/rainier_defconfig
@@ -101,8 +101,7 @@ CONFIG_FAIR_GROUP_SCHED=y
101CONFIG_USER_SCHED=y 101CONFIG_USER_SCHED=y
102# CONFIG_CGROUP_SCHED is not set 102# CONFIG_CGROUP_SCHED is not set
103# CONFIG_CGROUPS is not set 103# CONFIG_CGROUPS is not set
104CONFIG_SYSFS_DEPRECATED=y 104# CONFIG_SYSFS_DEPRECATED_V2 is not set
105CONFIG_SYSFS_DEPRECATED_V2=y
106# CONFIG_RELAY is not set 105# CONFIG_RELAY is not set
107# CONFIG_NAMESPACES is not set 106# CONFIG_NAMESPACES is not set
108CONFIG_BLK_DEV_INITRD=y 107CONFIG_BLK_DEV_INITRD=y
diff --git a/arch/powerpc/configs/44x/redwood_defconfig b/arch/powerpc/configs/44x/redwood_defconfig
index a67ec91a28c3..684f40dc8a41 100644
--- a/arch/powerpc/configs/44x/redwood_defconfig
+++ b/arch/powerpc/configs/44x/redwood_defconfig
@@ -98,8 +98,7 @@ CONFIG_RCU_FANOUT=32
98CONFIG_LOG_BUF_SHIFT=14 98CONFIG_LOG_BUF_SHIFT=14
99# CONFIG_GROUP_SCHED is not set 99# CONFIG_GROUP_SCHED is not set
100# CONFIG_CGROUPS is not set 100# CONFIG_CGROUPS is not set
101CONFIG_SYSFS_DEPRECATED=y 101# CONFIG_SYSFS_DEPRECATED_V2 is not set
102CONFIG_SYSFS_DEPRECATED_V2=y
103# CONFIG_RELAY is not set 102# CONFIG_RELAY is not set
104# CONFIG_NAMESPACES is not set 103# CONFIG_NAMESPACES is not set
105CONFIG_BLK_DEV_INITRD=y 104CONFIG_BLK_DEV_INITRD=y
diff --git a/arch/powerpc/configs/44x/sam440ep_defconfig b/arch/powerpc/configs/44x/sam440ep_defconfig
index 886cb6aa6432..e202924e6173 100644
--- a/arch/powerpc/configs/44x/sam440ep_defconfig
+++ b/arch/powerpc/configs/44x/sam440ep_defconfig
@@ -103,8 +103,7 @@ CONFIG_FAIR_GROUP_SCHED=y
103CONFIG_USER_SCHED=y 103CONFIG_USER_SCHED=y
104# CONFIG_CGROUP_SCHED is not set 104# CONFIG_CGROUP_SCHED is not set
105# CONFIG_CGROUPS is not set 105# CONFIG_CGROUPS is not set
106CONFIG_SYSFS_DEPRECATED=y 106# CONFIG_SYSFS_DEPRECATED_V2 is not set
107CONFIG_SYSFS_DEPRECATED_V2=y
108# CONFIG_RELAY is not set 107# CONFIG_RELAY is not set
109# CONFIG_NAMESPACES is not set 108# CONFIG_NAMESPACES is not set
110CONFIG_BLK_DEV_INITRD=y 109CONFIG_BLK_DEV_INITRD=y
diff --git a/arch/powerpc/configs/44x/sequoia_defconfig b/arch/powerpc/configs/44x/sequoia_defconfig
index 1b2f41dbcafb..c348a4662a9e 100644
--- a/arch/powerpc/configs/44x/sequoia_defconfig
+++ b/arch/powerpc/configs/44x/sequoia_defconfig
@@ -102,8 +102,7 @@ CONFIG_GROUP_SCHED=y
102CONFIG_USER_SCHED=y 102CONFIG_USER_SCHED=y
103# CONFIG_CGROUP_SCHED is not set 103# CONFIG_CGROUP_SCHED is not set
104# CONFIG_CGROUPS is not set 104# CONFIG_CGROUPS is not set
105CONFIG_SYSFS_DEPRECATED=y 105# CONFIG_SYSFS_DEPRECATED_V2 is not set
106CONFIG_SYSFS_DEPRECATED_V2=y
107# CONFIG_RELAY is not set 106# CONFIG_RELAY is not set
108# CONFIG_NAMESPACES is not set 107# CONFIG_NAMESPACES is not set
109CONFIG_BLK_DEV_INITRD=y 108CONFIG_BLK_DEV_INITRD=y
diff --git a/arch/powerpc/configs/44x/taishan_defconfig b/arch/powerpc/configs/44x/taishan_defconfig
index 12041d355b8c..f4cb7e84cb83 100644
--- a/arch/powerpc/configs/44x/taishan_defconfig
+++ b/arch/powerpc/configs/44x/taishan_defconfig
@@ -101,8 +101,7 @@ CONFIG_FAIR_GROUP_SCHED=y
101CONFIG_USER_SCHED=y 101CONFIG_USER_SCHED=y
102# CONFIG_CGROUP_SCHED is not set 102# CONFIG_CGROUP_SCHED is not set
103# CONFIG_CGROUPS is not set 103# CONFIG_CGROUPS is not set
104CONFIG_SYSFS_DEPRECATED=y 104# CONFIG_SYSFS_DEPRECATED_V2 is not set
105CONFIG_SYSFS_DEPRECATED_V2=y
106# CONFIG_RELAY is not set 105# CONFIG_RELAY is not set
107# CONFIG_NAMESPACES is not set 106# CONFIG_NAMESPACES is not set
108CONFIG_BLK_DEV_INITRD=y 107CONFIG_BLK_DEV_INITRD=y
diff --git a/arch/powerpc/configs/44x/virtex5_defconfig b/arch/powerpc/configs/44x/virtex5_defconfig
index 2518b8568c70..c7ead0ec00bc 100644
--- a/arch/powerpc/configs/44x/virtex5_defconfig
+++ b/arch/powerpc/configs/44x/virtex5_defconfig
@@ -80,8 +80,7 @@ CONFIG_IKCONFIG_PROC=y
80CONFIG_LOG_BUF_SHIFT=14 80CONFIG_LOG_BUF_SHIFT=14
81# CONFIG_GROUP_SCHED is not set 81# CONFIG_GROUP_SCHED is not set
82# CONFIG_CGROUPS is not set 82# CONFIG_CGROUPS is not set
83CONFIG_SYSFS_DEPRECATED=y 83# CONFIG_SYSFS_DEPRECATED_V2 is not set
84CONFIG_SYSFS_DEPRECATED_V2=y
85# CONFIG_RELAY is not set 84# CONFIG_RELAY is not set
86CONFIG_NAMESPACES=y 85CONFIG_NAMESPACES=y
87# CONFIG_UTS_NS is not set 86# CONFIG_UTS_NS is not set
diff --git a/arch/powerpc/configs/52xx/cm5200_defconfig b/arch/powerpc/configs/52xx/cm5200_defconfig
index 218d49b36a0c..7664c83c17c2 100644
--- a/arch/powerpc/configs/52xx/cm5200_defconfig
+++ b/arch/powerpc/configs/52xx/cm5200_defconfig
@@ -95,8 +95,7 @@ CONFIG_RCU_FANOUT=32
95# CONFIG_IKCONFIG is not set 95# CONFIG_IKCONFIG is not set
96CONFIG_LOG_BUF_SHIFT=14 96CONFIG_LOG_BUF_SHIFT=14
97# CONFIG_CGROUPS is not set 97# CONFIG_CGROUPS is not set
98CONFIG_SYSFS_DEPRECATED=y 98# CONFIG_SYSFS_DEPRECATED_V2 is not set
99CONFIG_SYSFS_DEPRECATED_V2=y
100# CONFIG_RELAY is not set 99# CONFIG_RELAY is not set
101# CONFIG_NAMESPACES is not set 100# CONFIG_NAMESPACES is not set
102CONFIG_BLK_DEV_INITRD=y 101CONFIG_BLK_DEV_INITRD=y
diff --git a/arch/powerpc/configs/52xx/lite5200b_defconfig b/arch/powerpc/configs/52xx/lite5200b_defconfig
index 90492ff25232..eac7c17eef34 100644
--- a/arch/powerpc/configs/52xx/lite5200b_defconfig
+++ b/arch/powerpc/configs/52xx/lite5200b_defconfig
@@ -96,8 +96,7 @@ CONFIG_RCU_FANOUT=32
96# CONFIG_IKCONFIG is not set 96# CONFIG_IKCONFIG is not set
97CONFIG_LOG_BUF_SHIFT=14 97CONFIG_LOG_BUF_SHIFT=14
98# CONFIG_CGROUPS is not set 98# CONFIG_CGROUPS is not set
99CONFIG_SYSFS_DEPRECATED=y 99# CONFIG_SYSFS_DEPRECATED_V2 is not set
100CONFIG_SYSFS_DEPRECATED_V2=y
101# CONFIG_RELAY is not set 100# CONFIG_RELAY is not set
102# CONFIG_NAMESPACES is not set 101# CONFIG_NAMESPACES is not set
103CONFIG_BLK_DEV_INITRD=y 102CONFIG_BLK_DEV_INITRD=y
diff --git a/arch/powerpc/configs/52xx/motionpro_defconfig b/arch/powerpc/configs/52xx/motionpro_defconfig
index dffc8cac825f..27afb6ecdf61 100644
--- a/arch/powerpc/configs/52xx/motionpro_defconfig
+++ b/arch/powerpc/configs/52xx/motionpro_defconfig
@@ -95,8 +95,7 @@ CONFIG_RCU_FANOUT=32
95# CONFIG_IKCONFIG is not set 95# CONFIG_IKCONFIG is not set
96CONFIG_LOG_BUF_SHIFT=14 96CONFIG_LOG_BUF_SHIFT=14
97# CONFIG_CGROUPS is not set 97# CONFIG_CGROUPS is not set
98CONFIG_SYSFS_DEPRECATED=y 98# CONFIG_SYSFS_DEPRECATED_V2 is not set
99CONFIG_SYSFS_DEPRECATED_V2=y
100# CONFIG_RELAY is not set 99# CONFIG_RELAY is not set
101# CONFIG_NAMESPACES is not set 100# CONFIG_NAMESPACES is not set
102CONFIG_BLK_DEV_INITRD=y 101CONFIG_BLK_DEV_INITRD=y
diff --git a/arch/powerpc/configs/52xx/pcm030_defconfig b/arch/powerpc/configs/52xx/pcm030_defconfig
index 3cb2a522046a..5fe39ddb4e14 100644
--- a/arch/powerpc/configs/52xx/pcm030_defconfig
+++ b/arch/powerpc/configs/52xx/pcm030_defconfig
@@ -98,8 +98,7 @@ CONFIG_IKCONFIG=y
98CONFIG_IKCONFIG_PROC=y 98CONFIG_IKCONFIG_PROC=y
99CONFIG_LOG_BUF_SHIFT=14 99CONFIG_LOG_BUF_SHIFT=14
100# CONFIG_CGROUPS is not set 100# CONFIG_CGROUPS is not set
101CONFIG_SYSFS_DEPRECATED=y 101# CONFIG_SYSFS_DEPRECATED_V2 is not set
102CONFIG_SYSFS_DEPRECATED_V2=y
103# CONFIG_RELAY is not set 102# CONFIG_RELAY is not set
104# CONFIG_NAMESPACES is not set 103# CONFIG_NAMESPACES is not set
105# CONFIG_BLK_DEV_INITRD is not set 104# CONFIG_BLK_DEV_INITRD is not set
diff --git a/arch/powerpc/configs/52xx/tqm5200_defconfig b/arch/powerpc/configs/52xx/tqm5200_defconfig
index 96181c62abfa..a108b84c0074 100644
--- a/arch/powerpc/configs/52xx/tqm5200_defconfig
+++ b/arch/powerpc/configs/52xx/tqm5200_defconfig
@@ -95,8 +95,7 @@ CONFIG_RCU_FANOUT=32
95# CONFIG_IKCONFIG is not set 95# CONFIG_IKCONFIG is not set
96CONFIG_LOG_BUF_SHIFT=14 96CONFIG_LOG_BUF_SHIFT=14
97# CONFIG_CGROUPS is not set 97# CONFIG_CGROUPS is not set
98CONFIG_SYSFS_DEPRECATED=y 98# CONFIG_SYSFS_DEPRECATED_V2 is not set
99CONFIG_SYSFS_DEPRECATED_V2=y
100# CONFIG_RELAY is not set 99# CONFIG_RELAY is not set
101# CONFIG_NAMESPACES is not set 100# CONFIG_NAMESPACES is not set
102CONFIG_BLK_DEV_INITRD=y 101CONFIG_BLK_DEV_INITRD=y
diff --git a/arch/powerpc/configs/86xx/gef_ppc9a_defconfig b/arch/powerpc/configs/86xx/gef_ppc9a_defconfig
index 183c59c6d896..b728a7d64250 100644
--- a/arch/powerpc/configs/86xx/gef_ppc9a_defconfig
+++ b/arch/powerpc/configs/86xx/gef_ppc9a_defconfig
@@ -103,8 +103,7 @@ CONFIG_IKCONFIG=y
103CONFIG_IKCONFIG_PROC=y 103CONFIG_IKCONFIG_PROC=y
104CONFIG_LOG_BUF_SHIFT=14 104CONFIG_LOG_BUF_SHIFT=14
105# CONFIG_CGROUPS is not set 105# CONFIG_CGROUPS is not set
106CONFIG_SYSFS_DEPRECATED=y 106# CONFIG_SYSFS_DEPRECATED_V2 is not set
107CONFIG_SYSFS_DEPRECATED_V2=y
108CONFIG_RELAY=y 107CONFIG_RELAY=y
109# CONFIG_NAMESPACES is not set 108# CONFIG_NAMESPACES is not set
110CONFIG_BLK_DEV_INITRD=y 109CONFIG_BLK_DEV_INITRD=y
diff --git a/arch/powerpc/configs/86xx/gef_sbc310_defconfig b/arch/powerpc/configs/86xx/gef_sbc310_defconfig
index 1524d948a2ba..8e738de5f6a5 100644
--- a/arch/powerpc/configs/86xx/gef_sbc310_defconfig
+++ b/arch/powerpc/configs/86xx/gef_sbc310_defconfig
@@ -103,8 +103,7 @@ CONFIG_IKCONFIG=y
103CONFIG_IKCONFIG_PROC=y 103CONFIG_IKCONFIG_PROC=y
104CONFIG_LOG_BUF_SHIFT=14 104CONFIG_LOG_BUF_SHIFT=14
105# CONFIG_CGROUPS is not set 105# CONFIG_CGROUPS is not set
106CONFIG_SYSFS_DEPRECATED=y 106# CONFIG_SYSFS_DEPRECATED_V2 is not set
107CONFIG_SYSFS_DEPRECATED_V2=y
108CONFIG_RELAY=y 107CONFIG_RELAY=y
109# CONFIG_NAMESPACES is not set 108# CONFIG_NAMESPACES is not set
110CONFIG_BLK_DEV_INITRD=y 109CONFIG_BLK_DEV_INITRD=y
diff --git a/arch/powerpc/configs/86xx/gef_sbc610_defconfig b/arch/powerpc/configs/86xx/gef_sbc610_defconfig
index 767c204c0603..59bf9e27d7f2 100644
--- a/arch/powerpc/configs/86xx/gef_sbc610_defconfig
+++ b/arch/powerpc/configs/86xx/gef_sbc610_defconfig
@@ -103,8 +103,7 @@ CONFIG_IKCONFIG=y
103CONFIG_IKCONFIG_PROC=y 103CONFIG_IKCONFIG_PROC=y
104CONFIG_LOG_BUF_SHIFT=14 104CONFIG_LOG_BUF_SHIFT=14
105# CONFIG_CGROUPS is not set 105# CONFIG_CGROUPS is not set
106CONFIG_SYSFS_DEPRECATED=y 106# CONFIG_SYSFS_DEPRECATED_V2 is not set
107CONFIG_SYSFS_DEPRECATED_V2=y
108CONFIG_RELAY=y 107CONFIG_RELAY=y
109# CONFIG_NAMESPACES is not set 108# CONFIG_NAMESPACES is not set
110CONFIG_BLK_DEV_INITRD=y 109CONFIG_BLK_DEV_INITRD=y
diff --git a/arch/powerpc/configs/86xx/mpc8610_hpcd_defconfig b/arch/powerpc/configs/86xx/mpc8610_hpcd_defconfig
index 55b9e4e867ac..4e8b01e73245 100644
--- a/arch/powerpc/configs/86xx/mpc8610_hpcd_defconfig
+++ b/arch/powerpc/configs/86xx/mpc8610_hpcd_defconfig
@@ -98,8 +98,7 @@ CONFIG_IKCONFIG=y
98CONFIG_IKCONFIG_PROC=y 98CONFIG_IKCONFIG_PROC=y
99CONFIG_LOG_BUF_SHIFT=14 99CONFIG_LOG_BUF_SHIFT=14
100# CONFIG_CGROUPS is not set 100# CONFIG_CGROUPS is not set
101CONFIG_SYSFS_DEPRECATED=y 101# CONFIG_SYSFS_DEPRECATED_V2 is not set
102CONFIG_SYSFS_DEPRECATED_V2=y
103# CONFIG_RELAY is not set 102# CONFIG_RELAY is not set
104# CONFIG_NAMESPACES is not set 103# CONFIG_NAMESPACES is not set
105CONFIG_BLK_DEV_INITRD=y 104CONFIG_BLK_DEV_INITRD=y
diff --git a/arch/powerpc/configs/86xx/mpc8641_hpcn_defconfig b/arch/powerpc/configs/86xx/mpc8641_hpcn_defconfig
index 1be38eb05783..20fde6374aad 100644
--- a/arch/powerpc/configs/86xx/mpc8641_hpcn_defconfig
+++ b/arch/powerpc/configs/86xx/mpc8641_hpcn_defconfig
@@ -103,8 +103,7 @@ CONFIG_IKCONFIG=y
103CONFIG_IKCONFIG_PROC=y 103CONFIG_IKCONFIG_PROC=y
104CONFIG_LOG_BUF_SHIFT=14 104CONFIG_LOG_BUF_SHIFT=14
105# CONFIG_CGROUPS is not set 105# CONFIG_CGROUPS is not set
106CONFIG_SYSFS_DEPRECATED=y 106# CONFIG_SYSFS_DEPRECATED_V2 is not set
107CONFIG_SYSFS_DEPRECATED_V2=y
108# CONFIG_RELAY is not set 107# CONFIG_RELAY is not set
109# CONFIG_NAMESPACES is not set 108# CONFIG_NAMESPACES is not set
110CONFIG_BLK_DEV_INITRD=y 109CONFIG_BLK_DEV_INITRD=y
diff --git a/arch/powerpc/configs/86xx/sbc8641d_defconfig b/arch/powerpc/configs/86xx/sbc8641d_defconfig
index a63009457323..74f714d85936 100644
--- a/arch/powerpc/configs/86xx/sbc8641d_defconfig
+++ b/arch/powerpc/configs/86xx/sbc8641d_defconfig
@@ -102,8 +102,7 @@ CONFIG_IKCONFIG=y
102CONFIG_IKCONFIG_PROC=y 102CONFIG_IKCONFIG_PROC=y
103CONFIG_LOG_BUF_SHIFT=14 103CONFIG_LOG_BUF_SHIFT=14
104# CONFIG_CGROUPS is not set 104# CONFIG_CGROUPS is not set
105CONFIG_SYSFS_DEPRECATED=y 105# CONFIG_SYSFS_DEPRECATED_V2 is not set
106CONFIG_SYSFS_DEPRECATED_V2=y
107CONFIG_RELAY=y 106CONFIG_RELAY=y
108# CONFIG_NAMESPACES is not set 107# CONFIG_NAMESPACES is not set
109CONFIG_BLK_DEV_INITRD=y 108CONFIG_BLK_DEV_INITRD=y
diff --git a/arch/powerpc/configs/adder875_defconfig b/arch/powerpc/configs/adder875_defconfig
index 9f89d5c9c0be..a670cee255b9 100644
--- a/arch/powerpc/configs/adder875_defconfig
+++ b/arch/powerpc/configs/adder875_defconfig
@@ -92,8 +92,7 @@ CONFIG_RCU_FANOUT=32
92# CONFIG_IKCONFIG is not set 92# CONFIG_IKCONFIG is not set
93CONFIG_LOG_BUF_SHIFT=14 93CONFIG_LOG_BUF_SHIFT=14
94# CONFIG_CGROUPS is not set 94# CONFIG_CGROUPS is not set
95CONFIG_SYSFS_DEPRECATED=y 95# CONFIG_SYSFS_DEPRECATED_V2 is not set
96CONFIG_SYSFS_DEPRECATED_V2=y
97# CONFIG_RELAY is not set 96# CONFIG_RELAY is not set
98# CONFIG_NAMESPACES is not set 97# CONFIG_NAMESPACES is not set
99# CONFIG_BLK_DEV_INITRD is not set 98# CONFIG_BLK_DEV_INITRD is not set
diff --git a/arch/powerpc/configs/amigaone_defconfig b/arch/powerpc/configs/amigaone_defconfig
index b63cc38df6b1..851287e78fc3 100644
--- a/arch/powerpc/configs/amigaone_defconfig
+++ b/arch/powerpc/configs/amigaone_defconfig
@@ -87,8 +87,7 @@ CONFIG_IKCONFIG_PROC=y
87CONFIG_LOG_BUF_SHIFT=15 87CONFIG_LOG_BUF_SHIFT=15
88# CONFIG_GROUP_SCHED is not set 88# CONFIG_GROUP_SCHED is not set
89# CONFIG_CGROUPS is not set 89# CONFIG_CGROUPS is not set
90CONFIG_SYSFS_DEPRECATED=y 90# CONFIG_SYSFS_DEPRECATED_V2 is not set
91CONFIG_SYSFS_DEPRECATED_V2=y
92# CONFIG_RELAY is not set 91# CONFIG_RELAY is not set
93CONFIG_NAMESPACES=y 92CONFIG_NAMESPACES=y
94# CONFIG_UTS_NS is not set 93# CONFIG_UTS_NS is not set
diff --git a/arch/powerpc/configs/c2k_defconfig b/arch/powerpc/configs/c2k_defconfig
index 4ab6074db3cf..b429a655b541 100644
--- a/arch/powerpc/configs/c2k_defconfig
+++ b/arch/powerpc/configs/c2k_defconfig
@@ -102,8 +102,7 @@ CONFIG_RCU_FANOUT=32
102# CONFIG_IKCONFIG is not set 102# CONFIG_IKCONFIG is not set
103CONFIG_LOG_BUF_SHIFT=17 103CONFIG_LOG_BUF_SHIFT=17
104# CONFIG_CGROUPS is not set 104# CONFIG_CGROUPS is not set
105CONFIG_SYSFS_DEPRECATED=y 105# CONFIG_SYSFS_DEPRECATED_V2 is not set
106CONFIG_SYSFS_DEPRECATED_V2=y
107# CONFIG_RELAY is not set 106# CONFIG_RELAY is not set
108CONFIG_NAMESPACES=y 107CONFIG_NAMESPACES=y
109# CONFIG_UTS_NS is not set 108# CONFIG_UTS_NS is not set
diff --git a/arch/powerpc/configs/cell_defconfig b/arch/powerpc/configs/cell_defconfig
index c6d2baa7aaeb..943371954317 100644
--- a/arch/powerpc/configs/cell_defconfig
+++ b/arch/powerpc/configs/cell_defconfig
@@ -83,8 +83,7 @@ CONFIG_CPUSETS=y
83# CONFIG_CGROUP_SCHED is not set 83# CONFIG_CGROUP_SCHED is not set
84# CONFIG_CGROUP_CPUACCT is not set 84# CONFIG_CGROUP_CPUACCT is not set
85# CONFIG_RESOURCE_COUNTERS is not set 85# CONFIG_RESOURCE_COUNTERS is not set
86CONFIG_SYSFS_DEPRECATED=y 86# CONFIG_SYSFS_DEPRECATED_V2 is not set
87CONFIG_SYSFS_DEPRECATED_V2=y
88CONFIG_PROC_PID_CPUSET=y 87CONFIG_PROC_PID_CPUSET=y
89# CONFIG_RELAY is not set 88# CONFIG_RELAY is not set
90CONFIG_NAMESPACES=y 89CONFIG_NAMESPACES=y
diff --git a/arch/powerpc/configs/celleb_defconfig b/arch/powerpc/configs/celleb_defconfig
index d2123779512a..6be6c09eba6d 100644
--- a/arch/powerpc/configs/celleb_defconfig
+++ b/arch/powerpc/configs/celleb_defconfig
@@ -78,8 +78,7 @@ CONFIG_LOG_BUF_SHIFT=15
78# CONFIG_GROUP_SCHED is not set 78# CONFIG_GROUP_SCHED is not set
79# CONFIG_USER_SCHED is not set 79# CONFIG_USER_SCHED is not set
80# CONFIG_CGROUP_SCHED is not set 80# CONFIG_CGROUP_SCHED is not set
81CONFIG_SYSFS_DEPRECATED=y 81# CONFIG_SYSFS_DEPRECATED_V2 is not set
82CONFIG_SYSFS_DEPRECATED_V2=y
83# CONFIG_RELAY is not set 82# CONFIG_RELAY is not set
84CONFIG_NAMESPACES=y 83CONFIG_NAMESPACES=y
85# CONFIG_UTS_NS is not set 84# CONFIG_UTS_NS is not set
diff --git a/arch/powerpc/configs/chrp32_defconfig b/arch/powerpc/configs/chrp32_defconfig
index 5094a65a4493..2fdab660fce3 100644
--- a/arch/powerpc/configs/chrp32_defconfig
+++ b/arch/powerpc/configs/chrp32_defconfig
@@ -77,8 +77,7 @@ CONFIG_IKCONFIG_PROC=y
77CONFIG_LOG_BUF_SHIFT=15 77CONFIG_LOG_BUF_SHIFT=15
78# CONFIG_CGROUPS is not set 78# CONFIG_CGROUPS is not set
79# CONFIG_GROUP_SCHED is not set 79# CONFIG_GROUP_SCHED is not set
80CONFIG_SYSFS_DEPRECATED=y 80# CONFIG_SYSFS_DEPRECATED_V2 is not set
81CONFIG_SYSFS_DEPRECATED_V2=y
82# CONFIG_RELAY is not set 81# CONFIG_RELAY is not set
83CONFIG_NAMESPACES=y 82CONFIG_NAMESPACES=y
84# CONFIG_UTS_NS is not set 83# CONFIG_UTS_NS is not set
diff --git a/arch/powerpc/configs/ep8248e_defconfig b/arch/powerpc/configs/ep8248e_defconfig
index 81e904e9f392..6b708395a7c6 100644
--- a/arch/powerpc/configs/ep8248e_defconfig
+++ b/arch/powerpc/configs/ep8248e_defconfig
@@ -96,8 +96,7 @@ CONFIG_IKCONFIG=y
96CONFIG_IKCONFIG_PROC=y 96CONFIG_IKCONFIG_PROC=y
97CONFIG_LOG_BUF_SHIFT=14 97CONFIG_LOG_BUF_SHIFT=14
98# CONFIG_CGROUPS is not set 98# CONFIG_CGROUPS is not set
99CONFIG_SYSFS_DEPRECATED=y 99# CONFIG_SYSFS_DEPRECATED_V2 is not set
100CONFIG_SYSFS_DEPRECATED_V2=y
101# CONFIG_RELAY is not set 100# CONFIG_RELAY is not set
102# CONFIG_NAMESPACES is not set 101# CONFIG_NAMESPACES is not set
103# CONFIG_BLK_DEV_INITRD is not set 102# CONFIG_BLK_DEV_INITRD is not set
diff --git a/arch/powerpc/configs/ep88xc_defconfig b/arch/powerpc/configs/ep88xc_defconfig
index c5af46ef5f40..1cee889dd9ec 100644
--- a/arch/powerpc/configs/ep88xc_defconfig
+++ b/arch/powerpc/configs/ep88xc_defconfig
@@ -91,8 +91,7 @@ CONFIG_RCU_FANOUT=32
91# CONFIG_IKCONFIG is not set 91# CONFIG_IKCONFIG is not set
92CONFIG_LOG_BUF_SHIFT=14 92CONFIG_LOG_BUF_SHIFT=14
93# CONFIG_CGROUPS is not set 93# CONFIG_CGROUPS is not set
94CONFIG_SYSFS_DEPRECATED=y 94# CONFIG_SYSFS_DEPRECATED_V2 is not set
95CONFIG_SYSFS_DEPRECATED_V2=y
96# CONFIG_RELAY is not set 95# CONFIG_RELAY is not set
97# CONFIG_NAMESPACES is not set 96# CONFIG_NAMESPACES is not set
98# CONFIG_BLK_DEV_INITRD is not set 97# CONFIG_BLK_DEV_INITRD is not set
diff --git a/arch/powerpc/configs/g5_defconfig b/arch/powerpc/configs/g5_defconfig
index 826a65d3f002..57d3ffa3026a 100644
--- a/arch/powerpc/configs/g5_defconfig
+++ b/arch/powerpc/configs/g5_defconfig
@@ -82,8 +82,7 @@ CONFIG_IKCONFIG_PROC=y
82CONFIG_LOG_BUF_SHIFT=17 82CONFIG_LOG_BUF_SHIFT=17
83# CONFIG_CGROUPS is not set 83# CONFIG_CGROUPS is not set
84# CONFIG_GROUP_SCHED is not set 84# CONFIG_GROUP_SCHED is not set
85CONFIG_SYSFS_DEPRECATED=y 85# CONFIG_SYSFS_DEPRECATED_V2 is not set
86CONFIG_SYSFS_DEPRECATED_V2=y
87# CONFIG_RELAY is not set 86# CONFIG_RELAY is not set
88CONFIG_NAMESPACES=y 87CONFIG_NAMESPACES=y
89# CONFIG_UTS_NS is not set 88# CONFIG_UTS_NS is not set
diff --git a/arch/powerpc/configs/gamecube_defconfig b/arch/powerpc/configs/gamecube_defconfig
index 942e1193e9e4..1c2dbf07ac35 100644
--- a/arch/powerpc/configs/gamecube_defconfig
+++ b/arch/powerpc/configs/gamecube_defconfig
@@ -101,8 +101,7 @@ CONFIG_FAIR_GROUP_SCHED=y
101CONFIG_USER_SCHED=y 101CONFIG_USER_SCHED=y
102# CONFIG_CGROUP_SCHED is not set 102# CONFIG_CGROUP_SCHED is not set
103# CONFIG_CGROUPS is not set 103# CONFIG_CGROUPS is not set
104CONFIG_SYSFS_DEPRECATED=y 104# CONFIG_SYSFS_DEPRECATED_V2 is not set
105CONFIG_SYSFS_DEPRECATED_V2=y
106# CONFIG_RELAY is not set 105# CONFIG_RELAY is not set
107# CONFIG_NAMESPACES is not set 106# CONFIG_NAMESPACES is not set
108CONFIG_BLK_DEV_INITRD=y 107CONFIG_BLK_DEV_INITRD=y
diff --git a/arch/powerpc/configs/holly_defconfig b/arch/powerpc/configs/holly_defconfig
index a211a79959ca..a60d61bee48d 100644
--- a/arch/powerpc/configs/holly_defconfig
+++ b/arch/powerpc/configs/holly_defconfig
@@ -73,7 +73,6 @@ CONFIG_SYSVIPC_SYSCTL=y
73CONFIG_LOG_BUF_SHIFT=14 73CONFIG_LOG_BUF_SHIFT=14
74# CONFIG_CGROUPS is not set 74# CONFIG_CGROUPS is not set
75# CONFIG_FAIR_GROUP_SCHED is not set 75# CONFIG_FAIR_GROUP_SCHED is not set
76CONFIG_SYSFS_DEPRECATED=y
77# CONFIG_RELAY is not set 76# CONFIG_RELAY is not set
78CONFIG_BLK_DEV_INITRD=y 77CONFIG_BLK_DEV_INITRD=y
79CONFIG_INITRAMFS_SOURCE="" 78CONFIG_INITRAMFS_SOURCE=""
diff --git a/arch/powerpc/configs/iseries_defconfig b/arch/powerpc/configs/iseries_defconfig
index 76982c51a4c7..151c8e14f3ab 100644
--- a/arch/powerpc/configs/iseries_defconfig
+++ b/arch/powerpc/configs/iseries_defconfig
@@ -81,8 +81,7 @@ CONFIG_IKCONFIG_PROC=y
81CONFIG_LOG_BUF_SHIFT=17 81CONFIG_LOG_BUF_SHIFT=17
82# CONFIG_CGROUPS is not set 82# CONFIG_CGROUPS is not set
83# CONFIG_GROUP_SCHED is not set 83# CONFIG_GROUP_SCHED is not set
84CONFIG_SYSFS_DEPRECATED=y 84# CONFIG_SYSFS_DEPRECATED_V2 is not set
85CONFIG_SYSFS_DEPRECATED_V2=y
86# CONFIG_RELAY is not set 85# CONFIG_RELAY is not set
87CONFIG_NAMESPACES=y 86CONFIG_NAMESPACES=y
88# CONFIG_UTS_NS is not set 87# CONFIG_UTS_NS is not set
diff --git a/arch/powerpc/configs/linkstation_defconfig b/arch/powerpc/configs/linkstation_defconfig
index 588a2add393f..8ecacf74d3e5 100644
--- a/arch/powerpc/configs/linkstation_defconfig
+++ b/arch/powerpc/configs/linkstation_defconfig
@@ -97,8 +97,7 @@ CONFIG_IKCONFIG=y
97CONFIG_IKCONFIG_PROC=y 97CONFIG_IKCONFIG_PROC=y
98CONFIG_LOG_BUF_SHIFT=14 98CONFIG_LOG_BUF_SHIFT=14
99# CONFIG_CGROUPS is not set 99# CONFIG_CGROUPS is not set
100CONFIG_SYSFS_DEPRECATED=y 100# CONFIG_SYSFS_DEPRECATED_V2 is not set
101CONFIG_SYSFS_DEPRECATED_V2=y
102# CONFIG_RELAY is not set 101# CONFIG_RELAY is not set
103CONFIG_NAMESPACES=y 102CONFIG_NAMESPACES=y
104# CONFIG_UTS_NS is not set 103# CONFIG_UTS_NS is not set
diff --git a/arch/powerpc/configs/maple_defconfig b/arch/powerpc/configs/maple_defconfig
index 8b244003b9e1..dc50eec58e78 100644
--- a/arch/powerpc/configs/maple_defconfig
+++ b/arch/powerpc/configs/maple_defconfig
@@ -78,8 +78,7 @@ CONFIG_IKCONFIG_PROC=y
78CONFIG_LOG_BUF_SHIFT=17 78CONFIG_LOG_BUF_SHIFT=17
79# CONFIG_CGROUPS is not set 79# CONFIG_CGROUPS is not set
80# CONFIG_GROUP_SCHED is not set 80# CONFIG_GROUP_SCHED is not set
81CONFIG_SYSFS_DEPRECATED=y 81# CONFIG_SYSFS_DEPRECATED_V2 is not set
82CONFIG_SYSFS_DEPRECATED_V2=y
83# CONFIG_RELAY is not set 82# CONFIG_RELAY is not set
84CONFIG_NAMESPACES=y 83CONFIG_NAMESPACES=y
85# CONFIG_UTS_NS is not set 84# CONFIG_UTS_NS is not set
diff --git a/arch/powerpc/configs/mgcoge_defconfig b/arch/powerpc/configs/mgcoge_defconfig
index 0cbd56fe2e1e..b36ebb7e843e 100644
--- a/arch/powerpc/configs/mgcoge_defconfig
+++ b/arch/powerpc/configs/mgcoge_defconfig
@@ -96,8 +96,7 @@ CONFIG_IKCONFIG=y
96CONFIG_IKCONFIG_PROC=y 96CONFIG_IKCONFIG_PROC=y
97CONFIG_LOG_BUF_SHIFT=14 97CONFIG_LOG_BUF_SHIFT=14
98# CONFIG_CGROUPS is not set 98# CONFIG_CGROUPS is not set
99CONFIG_SYSFS_DEPRECATED=y 99# CONFIG_SYSFS_DEPRECATED_V2 is not set
100CONFIG_SYSFS_DEPRECATED_V2=y
101# CONFIG_RELAY is not set 100# CONFIG_RELAY is not set
102# CONFIG_NAMESPACES is not set 101# CONFIG_NAMESPACES is not set
103CONFIG_BLK_DEV_INITRD=y 102CONFIG_BLK_DEV_INITRD=y
diff --git a/arch/powerpc/configs/mgsuvd_defconfig b/arch/powerpc/configs/mgsuvd_defconfig
index c1be26151021..0dd5015ea81d 100644
--- a/arch/powerpc/configs/mgsuvd_defconfig
+++ b/arch/powerpc/configs/mgsuvd_defconfig
@@ -90,8 +90,7 @@ CONFIG_RCU_FANOUT=32
90# CONFIG_IKCONFIG is not set 90# CONFIG_IKCONFIG is not set
91CONFIG_LOG_BUF_SHIFT=17 91CONFIG_LOG_BUF_SHIFT=17
92# CONFIG_CGROUPS is not set 92# CONFIG_CGROUPS is not set
93CONFIG_SYSFS_DEPRECATED=y 93# CONFIG_SYSFS_DEPRECATED_V2 is not set
94CONFIG_SYSFS_DEPRECATED_V2=y
95# CONFIG_RELAY is not set 94# CONFIG_RELAY is not set
96# CONFIG_NAMESPACES is not set 95# CONFIG_NAMESPACES is not set
97CONFIG_BLK_DEV_INITRD=y 96CONFIG_BLK_DEV_INITRD=y
diff --git a/arch/powerpc/configs/mpc512x_defconfig b/arch/powerpc/configs/mpc512x_defconfig
index a04727295d46..aa2654e6edeb 100644
--- a/arch/powerpc/configs/mpc512x_defconfig
+++ b/arch/powerpc/configs/mpc512x_defconfig
@@ -97,8 +97,7 @@ CONFIG_RCU_FANOUT=32
97CONFIG_LOG_BUF_SHIFT=16 97CONFIG_LOG_BUF_SHIFT=16
98# CONFIG_GROUP_SCHED is not set 98# CONFIG_GROUP_SCHED is not set
99# CONFIG_CGROUPS is not set 99# CONFIG_CGROUPS is not set
100CONFIG_SYSFS_DEPRECATED=y 100# CONFIG_SYSFS_DEPRECATED_V2 is not set
101CONFIG_SYSFS_DEPRECATED_V2=y
102# CONFIG_RELAY is not set 101# CONFIG_RELAY is not set
103CONFIG_NAMESPACES=y 102CONFIG_NAMESPACES=y
104# CONFIG_UTS_NS is not set 103# CONFIG_UTS_NS is not set
diff --git a/arch/powerpc/configs/mpc5200_defconfig b/arch/powerpc/configs/mpc5200_defconfig
index 7012ac0134f0..f875ec21c91c 100644
--- a/arch/powerpc/configs/mpc5200_defconfig
+++ b/arch/powerpc/configs/mpc5200_defconfig
@@ -97,8 +97,7 @@ CONFIG_RCU_FANOUT=32
97# CONFIG_IKCONFIG is not set 97# CONFIG_IKCONFIG is not set
98CONFIG_LOG_BUF_SHIFT=14 98CONFIG_LOG_BUF_SHIFT=14
99# CONFIG_CGROUPS is not set 99# CONFIG_CGROUPS is not set
100CONFIG_SYSFS_DEPRECATED=y 100# CONFIG_SYSFS_DEPRECATED_V2 is not set
101CONFIG_SYSFS_DEPRECATED_V2=y
102# CONFIG_RELAY is not set 101# CONFIG_RELAY is not set
103CONFIG_NAMESPACES=y 102CONFIG_NAMESPACES=y
104# CONFIG_UTS_NS is not set 103# CONFIG_UTS_NS is not set
diff --git a/arch/powerpc/configs/mpc7448_hpc2_defconfig b/arch/powerpc/configs/mpc7448_hpc2_defconfig
index 27c63ceeb45a..b1e88fe1d9fb 100644
--- a/arch/powerpc/configs/mpc7448_hpc2_defconfig
+++ b/arch/powerpc/configs/mpc7448_hpc2_defconfig
@@ -95,8 +95,7 @@ CONFIG_RCU_FANOUT=32
95# CONFIG_IKCONFIG is not set 95# CONFIG_IKCONFIG is not set
96CONFIG_LOG_BUF_SHIFT=14 96CONFIG_LOG_BUF_SHIFT=14
97# CONFIG_CGROUPS is not set 97# CONFIG_CGROUPS is not set
98CONFIG_SYSFS_DEPRECATED=y 98# CONFIG_SYSFS_DEPRECATED_V2 is not set
99CONFIG_SYSFS_DEPRECATED_V2=y
100# CONFIG_RELAY is not set 99# CONFIG_RELAY is not set
101# CONFIG_NAMESPACES is not set 100# CONFIG_NAMESPACES is not set
102CONFIG_BLK_DEV_INITRD=y 101CONFIG_BLK_DEV_INITRD=y
diff --git a/arch/powerpc/configs/pasemi_defconfig b/arch/powerpc/configs/pasemi_defconfig
index 20ba0cfff8ba..74a7216183e8 100644
--- a/arch/powerpc/configs/pasemi_defconfig
+++ b/arch/powerpc/configs/pasemi_defconfig
@@ -98,8 +98,7 @@ CONFIG_RCU_FANOUT=64
98CONFIG_LOG_BUF_SHIFT=17 98CONFIG_LOG_BUF_SHIFT=17
99# CONFIG_GROUP_SCHED is not set 99# CONFIG_GROUP_SCHED is not set
100# CONFIG_CGROUPS is not set 100# CONFIG_CGROUPS is not set
101CONFIG_SYSFS_DEPRECATED=y 101# CONFIG_SYSFS_DEPRECATED_V2 is not set
102CONFIG_SYSFS_DEPRECATED_V2=y
103# CONFIG_RELAY is not set 102# CONFIG_RELAY is not set
104CONFIG_NAMESPACES=y 103CONFIG_NAMESPACES=y
105# CONFIG_UTS_NS is not set 104# CONFIG_UTS_NS is not set
diff --git a/arch/powerpc/configs/pmac32_defconfig b/arch/powerpc/configs/pmac32_defconfig
index ea8870a34482..753bb7912e28 100644
--- a/arch/powerpc/configs/pmac32_defconfig
+++ b/arch/powerpc/configs/pmac32_defconfig
@@ -93,8 +93,7 @@ CONFIG_IKCONFIG_PROC=y
93CONFIG_LOG_BUF_SHIFT=14 93CONFIG_LOG_BUF_SHIFT=14
94# CONFIG_GROUP_SCHED is not set 94# CONFIG_GROUP_SCHED is not set
95# CONFIG_CGROUPS is not set 95# CONFIG_CGROUPS is not set
96CONFIG_SYSFS_DEPRECATED=y 96# CONFIG_SYSFS_DEPRECATED_V2 is not set
97CONFIG_SYSFS_DEPRECATED_V2=y
98# CONFIG_RELAY is not set 97# CONFIG_RELAY is not set
99CONFIG_NAMESPACES=y 98CONFIG_NAMESPACES=y
100# CONFIG_UTS_NS is not set 99# CONFIG_UTS_NS is not set
diff --git a/arch/powerpc/configs/ppc40x_defconfig b/arch/powerpc/configs/ppc40x_defconfig
index 35b60683cde5..afb4d1bb2ba9 100644
--- a/arch/powerpc/configs/ppc40x_defconfig
+++ b/arch/powerpc/configs/ppc40x_defconfig
@@ -99,8 +99,7 @@ CONFIG_FAIR_GROUP_SCHED=y
99CONFIG_USER_SCHED=y 99CONFIG_USER_SCHED=y
100# CONFIG_CGROUP_SCHED is not set 100# CONFIG_CGROUP_SCHED is not set
101# CONFIG_CGROUPS is not set 101# CONFIG_CGROUPS is not set
102CONFIG_SYSFS_DEPRECATED=y 102# CONFIG_SYSFS_DEPRECATED_V2 is not set
103CONFIG_SYSFS_DEPRECATED_V2=y
104# CONFIG_RELAY is not set 103# CONFIG_RELAY is not set
105# CONFIG_NAMESPACES is not set 104# CONFIG_NAMESPACES is not set
106CONFIG_BLK_DEV_INITRD=y 105CONFIG_BLK_DEV_INITRD=y
diff --git a/arch/powerpc/configs/ppc44x_defconfig b/arch/powerpc/configs/ppc44x_defconfig
index 46f5c47e9f85..bd3d23fb4dd3 100644
--- a/arch/powerpc/configs/ppc44x_defconfig
+++ b/arch/powerpc/configs/ppc44x_defconfig
@@ -103,8 +103,7 @@ CONFIG_FAIR_GROUP_SCHED=y
103CONFIG_USER_SCHED=y 103CONFIG_USER_SCHED=y
104# CONFIG_CGROUP_SCHED is not set 104# CONFIG_CGROUP_SCHED is not set
105# CONFIG_CGROUPS is not set 105# CONFIG_CGROUPS is not set
106CONFIG_SYSFS_DEPRECATED=y 106# CONFIG_SYSFS_DEPRECATED_V2 is not set
107CONFIG_SYSFS_DEPRECATED_V2=y
108# CONFIG_RELAY is not set 107# CONFIG_RELAY is not set
109# CONFIG_NAMESPACES is not set 108# CONFIG_NAMESPACES is not set
110CONFIG_BLK_DEV_INITRD=y 109CONFIG_BLK_DEV_INITRD=y
diff --git a/arch/powerpc/configs/ppc64_defconfig b/arch/powerpc/configs/ppc64_defconfig
index dad617e2a88c..369f4e02c5dd 100644
--- a/arch/powerpc/configs/ppc64_defconfig
+++ b/arch/powerpc/configs/ppc64_defconfig
@@ -93,8 +93,7 @@ CONFIG_CPUSETS=y
93# CONFIG_GROUP_SCHED is not set 93# CONFIG_GROUP_SCHED is not set
94# CONFIG_CGROUP_CPUACCT is not set 94# CONFIG_CGROUP_CPUACCT is not set
95# CONFIG_RESOURCE_COUNTERS is not set 95# CONFIG_RESOURCE_COUNTERS is not set
96CONFIG_SYSFS_DEPRECATED=y 96# CONFIG_SYSFS_DEPRECATED_V2 is not set
97CONFIG_SYSFS_DEPRECATED_V2=y
98CONFIG_PROC_PID_CPUSET=y 97CONFIG_PROC_PID_CPUSET=y
99CONFIG_RELAY=y 98CONFIG_RELAY=y
100CONFIG_NAMESPACES=y 99CONFIG_NAMESPACES=y
diff --git a/arch/powerpc/configs/ppc64e_defconfig b/arch/powerpc/configs/ppc64e_defconfig
index 8195f1650cbf..403e82e2e83c 100644
--- a/arch/powerpc/configs/ppc64e_defconfig
+++ b/arch/powerpc/configs/ppc64e_defconfig
@@ -107,8 +107,7 @@ CONFIG_CPUSETS=y
107CONFIG_PROC_PID_CPUSET=y 107CONFIG_PROC_PID_CPUSET=y
108# CONFIG_CGROUP_CPUACCT is not set 108# CONFIG_CGROUP_CPUACCT is not set
109# CONFIG_RESOURCE_COUNTERS is not set 109# CONFIG_RESOURCE_COUNTERS is not set
110CONFIG_SYSFS_DEPRECATED=y 110# CONFIG_SYSFS_DEPRECATED_V2 is not set
111CONFIG_SYSFS_DEPRECATED_V2=y
112CONFIG_RELAY=y 111CONFIG_RELAY=y
113CONFIG_NAMESPACES=y 112CONFIG_NAMESPACES=y
114# CONFIG_UTS_NS is not set 113# CONFIG_UTS_NS is not set
diff --git a/arch/powerpc/configs/pq2fads_defconfig b/arch/powerpc/configs/pq2fads_defconfig
index 68c175ea427a..12c8ee8dd12b 100644
--- a/arch/powerpc/configs/pq2fads_defconfig
+++ b/arch/powerpc/configs/pq2fads_defconfig
@@ -96,8 +96,7 @@ CONFIG_IKCONFIG=y
96CONFIG_IKCONFIG_PROC=y 96CONFIG_IKCONFIG_PROC=y
97CONFIG_LOG_BUF_SHIFT=14 97CONFIG_LOG_BUF_SHIFT=14
98# CONFIG_CGROUPS is not set 98# CONFIG_CGROUPS is not set
99CONFIG_SYSFS_DEPRECATED=y 99# CONFIG_SYSFS_DEPRECATED_V2 is not set
100CONFIG_SYSFS_DEPRECATED_V2=y
101# CONFIG_RELAY is not set 100# CONFIG_RELAY is not set
102# CONFIG_NAMESPACES is not set 101# CONFIG_NAMESPACES is not set
103CONFIG_BLK_DEV_INITRD=y 102CONFIG_BLK_DEV_INITRD=y
diff --git a/arch/powerpc/configs/prpmc2800_defconfig b/arch/powerpc/configs/prpmc2800_defconfig
index 93f4505b5ac2..a18f597c6e5f 100644
--- a/arch/powerpc/configs/prpmc2800_defconfig
+++ b/arch/powerpc/configs/prpmc2800_defconfig
@@ -98,8 +98,7 @@ CONFIG_RCU_FANOUT=32
98# CONFIG_IKCONFIG is not set 98# CONFIG_IKCONFIG is not set
99CONFIG_LOG_BUF_SHIFT=14 99CONFIG_LOG_BUF_SHIFT=14
100# CONFIG_CGROUPS is not set 100# CONFIG_CGROUPS is not set
101CONFIG_SYSFS_DEPRECATED=y 101# CONFIG_SYSFS_DEPRECATED_V2 is not set
102CONFIG_SYSFS_DEPRECATED_V2=y
103# CONFIG_RELAY is not set 102# CONFIG_RELAY is not set
104CONFIG_NAMESPACES=y 103CONFIG_NAMESPACES=y
105# CONFIG_UTS_NS is not set 104# CONFIG_UTS_NS is not set
diff --git a/arch/powerpc/configs/pseries_defconfig b/arch/powerpc/configs/pseries_defconfig
index 16a14589bd40..16ae717d1958 100644
--- a/arch/powerpc/configs/pseries_defconfig
+++ b/arch/powerpc/configs/pseries_defconfig
@@ -92,8 +92,7 @@ CONFIG_CPUSETS=y
92# CONFIG_GROUP_SCHED is not set 92# CONFIG_GROUP_SCHED is not set
93CONFIG_CGROUP_CPUACCT=y 93CONFIG_CGROUP_CPUACCT=y
94# CONFIG_RESOURCE_COUNTERS is not set 94# CONFIG_RESOURCE_COUNTERS is not set
95CONFIG_SYSFS_DEPRECATED=y 95# CONFIG_SYSFS_DEPRECATED_V2 is not set
96CONFIG_SYSFS_DEPRECATED_V2=y
97CONFIG_PROC_PID_CPUSET=y 96CONFIG_PROC_PID_CPUSET=y
98CONFIG_RELAY=y 97CONFIG_RELAY=y
99CONFIG_NAMESPACES=y 98CONFIG_NAMESPACES=y
diff --git a/arch/powerpc/configs/storcenter_defconfig b/arch/powerpc/configs/storcenter_defconfig
index b1625801526e..01be0e207f40 100644
--- a/arch/powerpc/configs/storcenter_defconfig
+++ b/arch/powerpc/configs/storcenter_defconfig
@@ -95,8 +95,7 @@ CONFIG_RCU_FANOUT=32
95# CONFIG_IKCONFIG is not set 95# CONFIG_IKCONFIG is not set
96CONFIG_LOG_BUF_SHIFT=14 96CONFIG_LOG_BUF_SHIFT=14
97# CONFIG_CGROUPS is not set 97# CONFIG_CGROUPS is not set
98CONFIG_SYSFS_DEPRECATED=y 98# CONFIG_SYSFS_DEPRECATED_V2 is not set
99CONFIG_SYSFS_DEPRECATED_V2=y
100# CONFIG_RELAY is not set 99# CONFIG_RELAY is not set
101# CONFIG_NAMESPACES is not set 100# CONFIG_NAMESPACES is not set
102# CONFIG_BLK_DEV_INITRD is not set 101# CONFIG_BLK_DEV_INITRD is not set
diff --git a/arch/powerpc/configs/wii_defconfig b/arch/powerpc/configs/wii_defconfig
index c386828c639a..ee054f8118be 100644
--- a/arch/powerpc/configs/wii_defconfig
+++ b/arch/powerpc/configs/wii_defconfig
@@ -102,8 +102,7 @@ CONFIG_FAIR_GROUP_SCHED=y
102CONFIG_USER_SCHED=y 102CONFIG_USER_SCHED=y
103# CONFIG_CGROUP_SCHED is not set 103# CONFIG_CGROUP_SCHED is not set
104# CONFIG_CGROUPS is not set 104# CONFIG_CGROUPS is not set
105CONFIG_SYSFS_DEPRECATED=y 105# CONFIG_SYSFS_DEPRECATED_V2 is not set
106CONFIG_SYSFS_DEPRECATED_V2=y
107CONFIG_RELAY=y 106CONFIG_RELAY=y
108# CONFIG_NAMESPACES is not set 107# CONFIG_NAMESPACES is not set
109CONFIG_BLK_DEV_INITRD=y 108CONFIG_BLK_DEV_INITRD=y
diff --git a/arch/powerpc/include/asm/abs_addr.h b/arch/powerpc/include/asm/abs_addr.h
index 98324c5a8286..9a846efe6382 100644
--- a/arch/powerpc/include/asm/abs_addr.h
+++ b/arch/powerpc/include/asm/abs_addr.h
@@ -12,7 +12,7 @@
12 * 2 of the License, or (at your option) any later version. 12 * 2 of the License, or (at your option) any later version.
13 */ 13 */
14 14
15#include <linux/lmb.h> 15#include <linux/memblock.h>
16 16
17#include <asm/types.h> 17#include <asm/types.h>
18#include <asm/page.h> 18#include <asm/page.h>
diff --git a/arch/powerpc/include/asm/cpm.h b/arch/powerpc/include/asm/cpm.h
index 0835eb977ba9..e50323fe941f 100644
--- a/arch/powerpc/include/asm/cpm.h
+++ b/arch/powerpc/include/asm/cpm.h
@@ -7,6 +7,30 @@
7#include <linux/of.h> 7#include <linux/of.h>
8 8
9/* 9/*
10 * SPI Parameter RAM common to QE and CPM.
11 */
12struct spi_pram {
13 __be16 rbase; /* Rx Buffer descriptor base address */
14 __be16 tbase; /* Tx Buffer descriptor base address */
15 u8 rfcr; /* Rx function code */
16 u8 tfcr; /* Tx function code */
17 __be16 mrblr; /* Max receive buffer length */
18 __be32 rstate; /* Internal */
19 __be32 rdp; /* Internal */
20 __be16 rbptr; /* Internal */
21 __be16 rbc; /* Internal */
22 __be32 rxtmp; /* Internal */
23 __be32 tstate; /* Internal */
24 __be32 tdp; /* Internal */
25 __be16 tbptr; /* Internal */
26 __be16 tbc; /* Internal */
27 __be32 txtmp; /* Internal */
28 __be32 res; /* Tx temp. */
29 __be16 rpbase; /* Relocation pointer (CPM1 only) */
30 __be16 res1; /* Reserved */
31};
32
33/*
10 * USB Controller pram common to QE and CPM. 34 * USB Controller pram common to QE and CPM.
11 */ 35 */
12struct usb_ctlr { 36struct usb_ctlr {
diff --git a/arch/powerpc/include/asm/cpm1.h b/arch/powerpc/include/asm/cpm1.h
index 81b01192f440..bd07650dca56 100644
--- a/arch/powerpc/include/asm/cpm1.h
+++ b/arch/powerpc/include/asm/cpm1.h
@@ -17,6 +17,7 @@
17#ifndef __CPM1__ 17#ifndef __CPM1__
18#define __CPM1__ 18#define __CPM1__
19 19
20#include <linux/init.h>
20#include <asm/8xx_immap.h> 21#include <asm/8xx_immap.h>
21#include <asm/ptrace.h> 22#include <asm/ptrace.h>
22#include <asm/cpm.h> 23#include <asm/cpm.h>
@@ -54,7 +55,7 @@ extern cpm8xx_t __iomem *cpmp; /* Pointer to comm processor */
54 55
55extern void cpm_setbrg(uint brg, uint rate); 56extern void cpm_setbrg(uint brg, uint rate);
56 57
57extern void cpm_load_patch(cpm8xx_t *cp); 58extern void __init cpm_load_patch(cpm8xx_t *cp);
58 59
59extern void cpm_reset(void); 60extern void cpm_reset(void);
60 61
diff --git a/arch/powerpc/include/asm/irq.h b/arch/powerpc/include/asm/irq.h
index e054baef1845..ecba37a91749 100644
--- a/arch/powerpc/include/asm/irq.h
+++ b/arch/powerpc/include/asm/irq.h
@@ -358,7 +358,6 @@ extern void exc_lvl_ctx_init(void);
358#define exc_lvl_ctx_init() 358#define exc_lvl_ctx_init()
359#endif 359#endif
360 360
361#ifdef CONFIG_IRQSTACKS
362/* 361/*
363 * Per-cpu stacks for handling hard and soft interrupts. 362 * Per-cpu stacks for handling hard and soft interrupts.
364 */ 363 */
@@ -369,11 +368,6 @@ extern void irq_ctx_init(void);
369extern void call_do_softirq(struct thread_info *tp); 368extern void call_do_softirq(struct thread_info *tp);
370extern int call_handle_irq(int irq, void *p1, 369extern int call_handle_irq(int irq, void *p1,
371 struct thread_info *tp, void *func); 370 struct thread_info *tp, void *func);
372#else
373#define irq_ctx_init()
374
375#endif /* CONFIG_IRQSTACKS */
376
377extern void do_IRQ(struct pt_regs *regs); 371extern void do_IRQ(struct pt_regs *regs);
378 372
379#endif /* _ASM_IRQ_H */ 373#endif /* _ASM_IRQ_H */
diff --git a/arch/powerpc/include/asm/kdump.h b/arch/powerpc/include/asm/kdump.h
index 5ebfe5d3c61f..6857af58b02e 100644
--- a/arch/powerpc/include/asm/kdump.h
+++ b/arch/powerpc/include/asm/kdump.h
@@ -3,8 +3,17 @@
3 3
4#include <asm/page.h> 4#include <asm/page.h>
5 5
6/* Kdump kernel runs at 32 MB, change at your peril. */ 6/*
7 * If CONFIG_RELOCATABLE is enabled we can place the kdump kernel anywhere.
8 * To keep enough space in the RMO for the first stage kernel on 64bit, we
9 * place it at 64MB. If CONFIG_RELOCATABLE is not enabled we must place
10 * the second stage at 32MB.
11 */
12#if defined(CONFIG_RELOCATABLE) && defined(CONFIG_PPC64)
13#define KDUMP_KERNELBASE 0x4000000
14#else
7#define KDUMP_KERNELBASE 0x2000000 15#define KDUMP_KERNELBASE 0x2000000
16#endif
8 17
9/* How many bytes to reserve at zero for kdump. The reserve limit should 18/* How many bytes to reserve at zero for kdump. The reserve limit should
10 * be greater or equal to the trampoline's end address. 19 * be greater or equal to the trampoline's end address.
diff --git a/arch/powerpc/include/asm/lmb.h b/arch/powerpc/include/asm/lmb.h
deleted file mode 100644
index 6f5fdf0a19ae..000000000000
--- a/arch/powerpc/include/asm/lmb.h
+++ /dev/null
@@ -1,15 +0,0 @@
1#ifndef _ASM_POWERPC_LMB_H
2#define _ASM_POWERPC_LMB_H
3
4#include <asm/udbg.h>
5
6#define LMB_DBG(fmt...) udbg_printf(fmt)
7
8#ifdef CONFIG_PPC32
9extern phys_addr_t lowmem_end_addr;
10#define LMB_REAL_LIMIT lowmem_end_addr
11#else
12#define LMB_REAL_LIMIT 0
13#endif
14
15#endif /* _ASM_POWERPC_LMB_H */
diff --git a/arch/powerpc/include/asm/memblock.h b/arch/powerpc/include/asm/memblock.h
new file mode 100644
index 000000000000..3c29728b56b1
--- /dev/null
+++ b/arch/powerpc/include/asm/memblock.h
@@ -0,0 +1,15 @@
1#ifndef _ASM_POWERPC_MEMBLOCK_H
2#define _ASM_POWERPC_MEMBLOCK_H
3
4#include <asm/udbg.h>
5
6#define MEMBLOCK_DBG(fmt...) udbg_printf(fmt)
7
8#ifdef CONFIG_PPC32
9extern phys_addr_t lowmem_end_addr;
10#define MEMBLOCK_REAL_LIMIT lowmem_end_addr
11#else
12#define MEMBLOCK_REAL_LIMIT 0
13#endif
14
15#endif /* _ASM_POWERPC_MEMBLOCK_H */
diff --git a/arch/powerpc/include/asm/ptrace.h b/arch/powerpc/include/asm/ptrace.h
index 5d8be0416227..0175a676b34b 100644
--- a/arch/powerpc/include/asm/ptrace.h
+++ b/arch/powerpc/include/asm/ptrace.h
@@ -24,11 +24,7 @@
24 * 2 of the License, or (at your option) any later version. 24 * 2 of the License, or (at your option) any later version.
25 */ 25 */
26 26
27#ifdef __KERNEL__
28#include <linux/types.h> 27#include <linux/types.h>
29#else
30#include <stdint.h>
31#endif
32 28
33#ifndef __ASSEMBLY__ 29#ifndef __ASSEMBLY__
34 30
@@ -364,13 +360,13 @@ static inline unsigned long regs_get_kernel_stack_nth(struct pt_regs *regs,
364#ifndef __ASSEMBLY__ 360#ifndef __ASSEMBLY__
365 361
366struct ppc_debug_info { 362struct ppc_debug_info {
367 uint32_t version; /* Only version 1 exists to date */ 363 __u32 version; /* Only version 1 exists to date */
368 uint32_t num_instruction_bps; 364 __u32 num_instruction_bps;
369 uint32_t num_data_bps; 365 __u32 num_data_bps;
370 uint32_t num_condition_regs; 366 __u32 num_condition_regs;
371 uint32_t data_bp_alignment; 367 __u32 data_bp_alignment;
372 uint32_t sizeof_condition; /* size of the DVC register */ 368 __u32 sizeof_condition; /* size of the DVC register */
373 uint64_t features; 369 __u64 features;
374}; 370};
375 371
376#endif /* __ASSEMBLY__ */ 372#endif /* __ASSEMBLY__ */
@@ -386,13 +382,13 @@ struct ppc_debug_info {
386#ifndef __ASSEMBLY__ 382#ifndef __ASSEMBLY__
387 383
388struct ppc_hw_breakpoint { 384struct ppc_hw_breakpoint {
389 uint32_t version; /* currently, version must be 1 */ 385 __u32 version; /* currently, version must be 1 */
390 uint32_t trigger_type; /* only some combinations allowed */ 386 __u32 trigger_type; /* only some combinations allowed */
391 uint32_t addr_mode; /* address match mode */ 387 __u32 addr_mode; /* address match mode */
392 uint32_t condition_mode; /* break/watchpoint condition flags */ 388 __u32 condition_mode; /* break/watchpoint condition flags */
393 uint64_t addr; /* break/watchpoint address */ 389 __u64 addr; /* break/watchpoint address */
394 uint64_t addr2; /* range end or mask */ 390 __u64 addr2; /* range end or mask */
395 uint64_t condition_value; /* contents of the DVC register */ 391 __u64 condition_value; /* contents of the DVC register */
396}; 392};
397 393
398#endif /* __ASSEMBLY__ */ 394#endif /* __ASSEMBLY__ */
diff --git a/arch/powerpc/kernel/btext.c b/arch/powerpc/kernel/btext.c
index 26e58630ed7b..625942ae5585 100644
--- a/arch/powerpc/kernel/btext.c
+++ b/arch/powerpc/kernel/btext.c
@@ -7,7 +7,7 @@
7#include <linux/string.h> 7#include <linux/string.h>
8#include <linux/init.h> 8#include <linux/init.h>
9#include <linux/module.h> 9#include <linux/module.h>
10#include <linux/lmb.h> 10#include <linux/memblock.h>
11 11
12#include <asm/sections.h> 12#include <asm/sections.h>
13#include <asm/prom.h> 13#include <asm/prom.h>
diff --git a/arch/powerpc/kernel/crash.c b/arch/powerpc/kernel/crash.c
index b46f2e09bd81..417f7b05a9ce 100644
--- a/arch/powerpc/kernel/crash.c
+++ b/arch/powerpc/kernel/crash.c
@@ -24,7 +24,7 @@
24#include <linux/init.h> 24#include <linux/init.h>
25#include <linux/irq.h> 25#include <linux/irq.h>
26#include <linux/types.h> 26#include <linux/types.h>
27#include <linux/lmb.h> 27#include <linux/memblock.h>
28 28
29#include <asm/processor.h> 29#include <asm/processor.h>
30#include <asm/machdep.h> 30#include <asm/machdep.h>
@@ -447,7 +447,7 @@ void default_machine_crash_shutdown(struct pt_regs *regs)
447 crash_kexec_prepare_cpus(crashing_cpu); 447 crash_kexec_prepare_cpus(crashing_cpu);
448 cpu_set(crashing_cpu, cpus_in_crash); 448 cpu_set(crashing_cpu, cpus_in_crash);
449 crash_kexec_stop_spus(); 449 crash_kexec_stop_spus();
450#ifdef CONFIG_PPC_STD_MMU_64 450#if defined(CONFIG_PPC_STD_MMU_64) && defined(CONFIG_SMP)
451 crash_kexec_wait_realmode(crashing_cpu); 451 crash_kexec_wait_realmode(crashing_cpu);
452#endif 452#endif
453 if (ppc_md.kexec_cpu_down) 453 if (ppc_md.kexec_cpu_down)
diff --git a/arch/powerpc/kernel/crash_dump.c b/arch/powerpc/kernel/crash_dump.c
index 5fb667a60894..40f524643ba6 100644
--- a/arch/powerpc/kernel/crash_dump.c
+++ b/arch/powerpc/kernel/crash_dump.c
@@ -13,7 +13,7 @@
13 13
14#include <linux/crash_dump.h> 14#include <linux/crash_dump.h>
15#include <linux/bootmem.h> 15#include <linux/bootmem.h>
16#include <linux/lmb.h> 16#include <linux/memblock.h>
17#include <asm/code-patching.h> 17#include <asm/code-patching.h>
18#include <asm/kdump.h> 18#include <asm/kdump.h>
19#include <asm/prom.h> 19#include <asm/prom.h>
@@ -33,7 +33,7 @@ unsigned long long elfcorehdr_addr = ELFCORE_ADDR_MAX;
33#ifndef CONFIG_RELOCATABLE 33#ifndef CONFIG_RELOCATABLE
34void __init reserve_kdump_trampoline(void) 34void __init reserve_kdump_trampoline(void)
35{ 35{
36 lmb_reserve(0, KDUMP_RESERVE_LIMIT); 36 memblock_reserve(0, KDUMP_RESERVE_LIMIT);
37} 37}
38 38
39static void __init create_trampoline(unsigned long addr) 39static void __init create_trampoline(unsigned long addr)
diff --git a/arch/powerpc/kernel/dma-swiotlb.c b/arch/powerpc/kernel/dma-swiotlb.c
index e7fe218b8697..02f724f36753 100644
--- a/arch/powerpc/kernel/dma-swiotlb.c
+++ b/arch/powerpc/kernel/dma-swiotlb.c
@@ -71,7 +71,7 @@ static int ppc_swiotlb_bus_notify(struct notifier_block *nb,
71 sd->max_direct_dma_addr = 0; 71 sd->max_direct_dma_addr = 0;
72 72
73 /* May need to bounce if the device can't address all of DRAM */ 73 /* May need to bounce if the device can't address all of DRAM */
74 if ((dma_get_mask(dev) + 1) < lmb_end_of_DRAM()) 74 if ((dma_get_mask(dev) + 1) < memblock_end_of_DRAM())
75 set_dma_ops(dev, &swiotlb_dma_ops); 75 set_dma_ops(dev, &swiotlb_dma_ops);
76 76
77 return NOTIFY_DONE; 77 return NOTIFY_DONE;
diff --git a/arch/powerpc/kernel/dma.c b/arch/powerpc/kernel/dma.c
index 8d1de6f31d5a..84d6367ec003 100644
--- a/arch/powerpc/kernel/dma.c
+++ b/arch/powerpc/kernel/dma.c
@@ -9,7 +9,7 @@
9#include <linux/dma-mapping.h> 9#include <linux/dma-mapping.h>
10#include <linux/dma-debug.h> 10#include <linux/dma-debug.h>
11#include <linux/gfp.h> 11#include <linux/gfp.h>
12#include <linux/lmb.h> 12#include <linux/memblock.h>
13#include <asm/bug.h> 13#include <asm/bug.h>
14#include <asm/abs_addr.h> 14#include <asm/abs_addr.h>
15 15
@@ -89,7 +89,7 @@ static int dma_direct_dma_supported(struct device *dev, u64 mask)
89 /* Could be improved so platforms can set the limit in case 89 /* Could be improved so platforms can set the limit in case
90 * they have limited DMA windows 90 * they have limited DMA windows
91 */ 91 */
92 return mask >= (lmb_end_of_DRAM() - 1); 92 return mask >= (memblock_end_of_DRAM() - 1);
93#else 93#else
94 return 1; 94 return 1;
95#endif 95#endif
diff --git a/arch/powerpc/kernel/fsl_booke_entry_mapping.S b/arch/powerpc/kernel/fsl_booke_entry_mapping.S
index beb4d78a2304..a92c79be2728 100644
--- a/arch/powerpc/kernel/fsl_booke_entry_mapping.S
+++ b/arch/powerpc/kernel/fsl_booke_entry_mapping.S
@@ -205,8 +205,7 @@ next_tlb_setup:
205 bdnz+ next_tlb_setup 205 bdnz+ next_tlb_setup
206 206
207/* 7. Jump to our 1:1 mapping */ 207/* 7. Jump to our 1:1 mapping */
208 li r6, 0 208 mr r6, r25
209
210#else 209#else
211 #error You need to specify the mapping or not use this at all. 210 #error You need to specify the mapping or not use this at all.
212#endif 211#endif
@@ -217,7 +216,6 @@ next_tlb_setup:
2171: mflr r9 2161: mflr r9
218 rlwimi r6,r9,0,20,31 217 rlwimi r6,r9,0,20,31
219 addi r6,r6,(2f - 1b) 218 addi r6,r6,(2f - 1b)
220 add r6, r6, r25
221 mtspr SPRN_SRR0,r6 219 mtspr SPRN_SRR0,r6
222 mtspr SPRN_SRR1,r7 220 mtspr SPRN_SRR1,r7
223 rfi /* start execution out of TLB1[0] entry */ 221 rfi /* start execution out of TLB1[0] entry */
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index 30817d9b20cb..77be3d058a65 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -295,7 +295,10 @@ void fixup_irqs(const struct cpumask *map)
295 295
296 for_each_irq(irq) { 296 for_each_irq(irq) {
297 desc = irq_to_desc(irq); 297 desc = irq_to_desc(irq);
298 if (desc && desc->status & IRQ_PER_CPU) 298 if (!desc)
299 continue;
300
301 if (desc->status & IRQ_PER_CPU)
299 continue; 302 continue;
300 303
301 cpumask_and(mask, desc->affinity, map); 304 cpumask_and(mask, desc->affinity, map);
@@ -317,7 +320,6 @@ void fixup_irqs(const struct cpumask *map)
317} 320}
318#endif 321#endif
319 322
320#ifdef CONFIG_IRQSTACKS
321static inline void handle_one_irq(unsigned int irq) 323static inline void handle_one_irq(unsigned int irq)
322{ 324{
323 struct thread_info *curtp, *irqtp; 325 struct thread_info *curtp, *irqtp;
@@ -358,12 +360,6 @@ static inline void handle_one_irq(unsigned int irq)
358 if (irqtp->flags) 360 if (irqtp->flags)
359 set_bits(irqtp->flags, &curtp->flags); 361 set_bits(irqtp->flags, &curtp->flags);
360} 362}
361#else
362static inline void handle_one_irq(unsigned int irq)
363{
364 generic_handle_irq(irq);
365}
366#endif
367 363
368static inline void check_stack_overflow(void) 364static inline void check_stack_overflow(void)
369{ 365{
@@ -455,7 +451,6 @@ void exc_lvl_ctx_init(void)
455} 451}
456#endif 452#endif
457 453
458#ifdef CONFIG_IRQSTACKS
459struct thread_info *softirq_ctx[NR_CPUS] __read_mostly; 454struct thread_info *softirq_ctx[NR_CPUS] __read_mostly;
460struct thread_info *hardirq_ctx[NR_CPUS] __read_mostly; 455struct thread_info *hardirq_ctx[NR_CPUS] __read_mostly;
461 456
@@ -492,10 +487,6 @@ static inline void do_softirq_onstack(void)
492 irqtp->task = NULL; 487 irqtp->task = NULL;
493} 488}
494 489
495#else
496#define do_softirq_onstack() __do_softirq()
497#endif /* CONFIG_IRQSTACKS */
498
499void do_softirq(void) 490void do_softirq(void)
500{ 491{
501 unsigned long flags; 492 unsigned long flags;
diff --git a/arch/powerpc/kernel/machine_kexec.c b/arch/powerpc/kernel/machine_kexec.c
index bb3d893a8353..89f005116aac 100644
--- a/arch/powerpc/kernel/machine_kexec.c
+++ b/arch/powerpc/kernel/machine_kexec.c
@@ -12,7 +12,7 @@
12#include <linux/kexec.h> 12#include <linux/kexec.h>
13#include <linux/reboot.h> 13#include <linux/reboot.h>
14#include <linux/threads.h> 14#include <linux/threads.h>
15#include <linux/lmb.h> 15#include <linux/memblock.h>
16#include <linux/of.h> 16#include <linux/of.h>
17#include <asm/machdep.h> 17#include <asm/machdep.h>
18#include <asm/prom.h> 18#include <asm/prom.h>
@@ -66,11 +66,11 @@ void __init reserve_crashkernel(void)
66 unsigned long long crash_size, crash_base; 66 unsigned long long crash_size, crash_base;
67 int ret; 67 int ret;
68 68
69 /* this is necessary because of lmb_phys_mem_size() */ 69 /* this is necessary because of memblock_phys_mem_size() */
70 lmb_analyze(); 70 memblock_analyze();
71 71
72 /* use common parsing */ 72 /* use common parsing */
73 ret = parse_crashkernel(boot_command_line, lmb_phys_mem_size(), 73 ret = parse_crashkernel(boot_command_line, memblock_phys_mem_size(),
74 &crash_size, &crash_base); 74 &crash_size, &crash_base);
75 if (ret == 0 && crash_size > 0) { 75 if (ret == 0 && crash_size > 0) {
76 crashk_res.start = crash_base; 76 crashk_res.start = crash_base;
@@ -133,9 +133,9 @@ void __init reserve_crashkernel(void)
133 "for crashkernel (System RAM: %ldMB)\n", 133 "for crashkernel (System RAM: %ldMB)\n",
134 (unsigned long)(crash_size >> 20), 134 (unsigned long)(crash_size >> 20),
135 (unsigned long)(crashk_res.start >> 20), 135 (unsigned long)(crashk_res.start >> 20),
136 (unsigned long)(lmb_phys_mem_size() >> 20)); 136 (unsigned long)(memblock_phys_mem_size() >> 20));
137 137
138 lmb_reserve(crashk_res.start, crash_size); 138 memblock_reserve(crashk_res.start, crash_size);
139} 139}
140 140
141int overlaps_crashkernel(unsigned long start, unsigned long size) 141int overlaps_crashkernel(unsigned long start, unsigned long size)
diff --git a/arch/powerpc/kernel/machine_kexec_64.c b/arch/powerpc/kernel/machine_kexec_64.c
index 26f9900f773c..ed31a29c4ff7 100644
--- a/arch/powerpc/kernel/machine_kexec_64.c
+++ b/arch/powerpc/kernel/machine_kexec_64.c
@@ -182,28 +182,12 @@ static void kexec_prepare_cpus_wait(int wait_state)
182 182
183 my_cpu = get_cpu(); 183 my_cpu = get_cpu();
184 /* Make sure each CPU has atleast made it to the state we need */ 184 /* Make sure each CPU has atleast made it to the state we need */
185 for (i=0; i < NR_CPUS; i++) { 185 for_each_online_cpu(i) {
186 if (i == my_cpu) 186 if (i == my_cpu)
187 continue; 187 continue;
188 188
189 while (paca[i].kexec_state < wait_state) { 189 while (paca[i].kexec_state < wait_state) {
190 barrier(); 190 barrier();
191 if (!cpu_possible(i)) {
192 printk("kexec: cpu %d hw_cpu_id %d is not"
193 " possible, ignoring\n",
194 i, paca[i].hw_cpu_id);
195 break;
196 }
197 if (!cpu_online(i)) {
198 /* Fixme: this can be spinning in
199 * pSeries_secondary_wait with a paca
200 * waiting for it to go online.
201 */
202 printk("kexec: cpu %d hw_cpu_id %d is not"
203 " online, ignoring\n",
204 i, paca[i].hw_cpu_id);
205 break;
206 }
207 if (i != notified) { 191 if (i != notified) {
208 printk( "kexec: waiting for cpu %d (physical" 192 printk( "kexec: waiting for cpu %d (physical"
209 " %d) to enter %i state\n", 193 " %d) to enter %i state\n",
diff --git a/arch/powerpc/kernel/misc_32.S b/arch/powerpc/kernel/misc_32.S
index dc66d52dcff5..6bbd7a604d24 100644
--- a/arch/powerpc/kernel/misc_32.S
+++ b/arch/powerpc/kernel/misc_32.S
@@ -33,7 +33,6 @@
33 33
34 .text 34 .text
35 35
36#ifdef CONFIG_IRQSTACKS
37_GLOBAL(call_do_softirq) 36_GLOBAL(call_do_softirq)
38 mflr r0 37 mflr r0
39 stw r0,4(r1) 38 stw r0,4(r1)
@@ -56,7 +55,6 @@ _GLOBAL(call_handle_irq)
56 lwz r0,4(r1) 55 lwz r0,4(r1)
57 mtlr r0 56 mtlr r0
58 blr 57 blr
59#endif /* CONFIG_IRQSTACKS */
60 58
61/* 59/*
62 * This returns the high 64 bits of the product of two 64-bit numbers. 60 * This returns the high 64 bits of the product of two 64-bit numbers.
diff --git a/arch/powerpc/kernel/misc_64.S b/arch/powerpc/kernel/misc_64.S
index a2b18dffa03e..e5144906a56d 100644
--- a/arch/powerpc/kernel/misc_64.S
+++ b/arch/powerpc/kernel/misc_64.S
@@ -28,7 +28,6 @@
28 28
29 .text 29 .text
30 30
31#ifdef CONFIG_IRQSTACKS
32_GLOBAL(call_do_softirq) 31_GLOBAL(call_do_softirq)
33 mflr r0 32 mflr r0
34 std r0,16(r1) 33 std r0,16(r1)
@@ -52,7 +51,6 @@ _GLOBAL(call_handle_irq)
52 ld r0,16(r1) 51 ld r0,16(r1)
53 mtlr r0 52 mtlr r0
54 blr 53 blr
55#endif /* CONFIG_IRQSTACKS */
56 54
57 .section ".toc","aw" 55 .section ".toc","aw"
58PPC64_CACHES: 56PPC64_CACHES:
diff --git a/arch/powerpc/kernel/paca.c b/arch/powerpc/kernel/paca.c
index f88acf0218db..139a773853f4 100644
--- a/arch/powerpc/kernel/paca.c
+++ b/arch/powerpc/kernel/paca.c
@@ -9,7 +9,7 @@
9 9
10#include <linux/threads.h> 10#include <linux/threads.h>
11#include <linux/module.h> 11#include <linux/module.h>
12#include <linux/lmb.h> 12#include <linux/memblock.h>
13 13
14#include <asm/firmware.h> 14#include <asm/firmware.h>
15#include <asm/lppaca.h> 15#include <asm/lppaca.h>
@@ -117,7 +117,7 @@ void __init allocate_pacas(void)
117 * the first segment. On iSeries they must be within the area mapped 117 * the first segment. On iSeries they must be within the area mapped
118 * by the HV, which is HvPagesToMap * HVPAGESIZE bytes. 118 * by the HV, which is HvPagesToMap * HVPAGESIZE bytes.
119 */ 119 */
120 limit = min(0x10000000ULL, lmb.rmo_size); 120 limit = min(0x10000000ULL, memblock.rmo_size);
121 if (firmware_has_feature(FW_FEATURE_ISERIES)) 121 if (firmware_has_feature(FW_FEATURE_ISERIES))
122 limit = min(limit, HvPagesToMap * HVPAGESIZE); 122 limit = min(limit, HvPagesToMap * HVPAGESIZE);
123 123
@@ -128,7 +128,7 @@ void __init allocate_pacas(void)
128 128
129 paca_size = PAGE_ALIGN(sizeof(struct paca_struct) * nr_cpus); 129 paca_size = PAGE_ALIGN(sizeof(struct paca_struct) * nr_cpus);
130 130
131 paca = __va(lmb_alloc_base(paca_size, PAGE_SIZE, limit)); 131 paca = __va(memblock_alloc_base(paca_size, PAGE_SIZE, limit));
132 memset(paca, 0, paca_size); 132 memset(paca, 0, paca_size);
133 133
134 printk(KERN_DEBUG "Allocated %u bytes for %d pacas at %p\n", 134 printk(KERN_DEBUG "Allocated %u bytes for %d pacas at %p\n",
@@ -148,7 +148,7 @@ void __init free_unused_pacas(void)
148 if (new_size >= paca_size) 148 if (new_size >= paca_size)
149 return; 149 return;
150 150
151 lmb_free(__pa(paca) + new_size, paca_size - new_size); 151 memblock_free(__pa(paca) + new_size, paca_size - new_size);
152 152
153 printk(KERN_DEBUG "Freed %u bytes for unused pacas\n", 153 printk(KERN_DEBUG "Freed %u bytes for unused pacas\n",
154 paca_size - new_size); 154 paca_size - new_size);
diff --git a/arch/powerpc/kernel/perf_event.c b/arch/powerpc/kernel/perf_event.c
index 43b83c35cf54..5c14ffe51258 100644
--- a/arch/powerpc/kernel/perf_event.c
+++ b/arch/powerpc/kernel/perf_event.c
@@ -791,8 +791,11 @@ static void power_pmu_disable(struct perf_event *event)
791 cpuhw = &__get_cpu_var(cpu_hw_events); 791 cpuhw = &__get_cpu_var(cpu_hw_events);
792 for (i = 0; i < cpuhw->n_events; ++i) { 792 for (i = 0; i < cpuhw->n_events; ++i) {
793 if (event == cpuhw->event[i]) { 793 if (event == cpuhw->event[i]) {
794 while (++i < cpuhw->n_events) 794 while (++i < cpuhw->n_events) {
795 cpuhw->event[i-1] = cpuhw->event[i]; 795 cpuhw->event[i-1] = cpuhw->event[i];
796 cpuhw->events[i-1] = cpuhw->events[i];
797 cpuhw->flags[i-1] = cpuhw->flags[i];
798 }
796 --cpuhw->n_events; 799 --cpuhw->n_events;
797 ppmu->disable_pmc(event->hw.idx - 1, cpuhw->mmcr); 800 ppmu->disable_pmc(event->hw.idx - 1, cpuhw->mmcr);
798 if (event->hw.idx) { 801 if (event->hw.idx) {
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index 9d255b4f0a0e..773424df828a 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -1005,7 +1005,6 @@ out:
1005 return error; 1005 return error;
1006} 1006}
1007 1007
1008#ifdef CONFIG_IRQSTACKS
1009static inline int valid_irq_stack(unsigned long sp, struct task_struct *p, 1008static inline int valid_irq_stack(unsigned long sp, struct task_struct *p,
1010 unsigned long nbytes) 1009 unsigned long nbytes)
1011{ 1010{
@@ -1030,10 +1029,6 @@ static inline int valid_irq_stack(unsigned long sp, struct task_struct *p,
1030 return 0; 1029 return 0;
1031} 1030}
1032 1031
1033#else
1034#define valid_irq_stack(sp, p, nb) 0
1035#endif /* CONFIG_IRQSTACKS */
1036
1037int validate_sp(unsigned long sp, struct task_struct *p, 1032int validate_sp(unsigned long sp, struct task_struct *p,
1038 unsigned long nbytes) 1033 unsigned long nbytes)
1039{ 1034{
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index 05131d634e73..9d3953983fb7 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -31,7 +31,7 @@
31#include <linux/kexec.h> 31#include <linux/kexec.h>
32#include <linux/debugfs.h> 32#include <linux/debugfs.h>
33#include <linux/irq.h> 33#include <linux/irq.h>
34#include <linux/lmb.h> 34#include <linux/memblock.h>
35 35
36#include <asm/prom.h> 36#include <asm/prom.h>
37#include <asm/rtas.h> 37#include <asm/rtas.h>
@@ -98,7 +98,7 @@ static void __init move_device_tree(void)
98 98
99 if ((memory_limit && (start + size) > memory_limit) || 99 if ((memory_limit && (start + size) > memory_limit) ||
100 overlaps_crashkernel(start, size)) { 100 overlaps_crashkernel(start, size)) {
101 p = __va(lmb_alloc_base(size, PAGE_SIZE, lmb.rmo_size)); 101 p = __va(memblock_alloc_base(size, PAGE_SIZE, memblock.rmo_size));
102 memcpy(p, initial_boot_params, size); 102 memcpy(p, initial_boot_params, size);
103 initial_boot_params = (struct boot_param_header *)p; 103 initial_boot_params = (struct boot_param_header *)p;
104 DBG("Moved device tree to 0x%p\n", p); 104 DBG("Moved device tree to 0x%p\n", p);
@@ -411,13 +411,13 @@ static int __init early_init_dt_scan_drconf_memory(unsigned long node)
411{ 411{
412 __be32 *dm, *ls, *usm; 412 __be32 *dm, *ls, *usm;
413 unsigned long l, n, flags; 413 unsigned long l, n, flags;
414 u64 base, size, lmb_size; 414 u64 base, size, memblock_size;
415 unsigned int is_kexec_kdump = 0, rngs; 415 unsigned int is_kexec_kdump = 0, rngs;
416 416
417 ls = of_get_flat_dt_prop(node, "ibm,lmb-size", &l); 417 ls = of_get_flat_dt_prop(node, "ibm,memblock-size", &l);
418 if (ls == NULL || l < dt_root_size_cells * sizeof(__be32)) 418 if (ls == NULL || l < dt_root_size_cells * sizeof(__be32))
419 return 0; 419 return 0;
420 lmb_size = dt_mem_next_cell(dt_root_size_cells, &ls); 420 memblock_size = dt_mem_next_cell(dt_root_size_cells, &ls);
421 421
422 dm = of_get_flat_dt_prop(node, "ibm,dynamic-memory", &l); 422 dm = of_get_flat_dt_prop(node, "ibm,dynamic-memory", &l);
423 if (dm == NULL || l < sizeof(__be32)) 423 if (dm == NULL || l < sizeof(__be32))
@@ -442,11 +442,11 @@ static int __init early_init_dt_scan_drconf_memory(unsigned long node)
442 or if the block is not assigned to this partition (0x8) */ 442 or if the block is not assigned to this partition (0x8) */
443 if ((flags & 0x80) || !(flags & 0x8)) 443 if ((flags & 0x80) || !(flags & 0x8))
444 continue; 444 continue;
445 size = lmb_size; 445 size = memblock_size;
446 rngs = 1; 446 rngs = 1;
447 if (is_kexec_kdump) { 447 if (is_kexec_kdump) {
448 /* 448 /*
449 * For each lmb in ibm,dynamic-memory, a corresponding 449 * For each memblock in ibm,dynamic-memory, a corresponding
450 * entry in linux,drconf-usable-memory property contains 450 * entry in linux,drconf-usable-memory property contains
451 * a counter 'p' followed by 'p' (base, size) duple. 451 * a counter 'p' followed by 'p' (base, size) duple.
452 * Now read the counter from 452 * Now read the counter from
@@ -469,10 +469,10 @@ static int __init early_init_dt_scan_drconf_memory(unsigned long node)
469 if ((base + size) > 0x80000000ul) 469 if ((base + size) > 0x80000000ul)
470 size = 0x80000000ul - base; 470 size = 0x80000000ul - base;
471 } 471 }
472 lmb_add(base, size); 472 memblock_add(base, size);
473 } while (--rngs); 473 } while (--rngs);
474 } 474 }
475 lmb_dump_all(); 475 memblock_dump_all();
476 return 0; 476 return 0;
477} 477}
478#else 478#else
@@ -501,14 +501,14 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size)
501 } 501 }
502#endif 502#endif
503 503
504 lmb_add(base, size); 504 memblock_add(base, size);
505 505
506 memstart_addr = min((u64)memstart_addr, base); 506 memstart_addr = min((u64)memstart_addr, base);
507} 507}
508 508
509u64 __init early_init_dt_alloc_memory_arch(u64 size, u64 align) 509u64 __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
510{ 510{
511 return lmb_alloc(size, align); 511 return memblock_alloc(size, align);
512} 512}
513 513
514#ifdef CONFIG_BLK_DEV_INITRD 514#ifdef CONFIG_BLK_DEV_INITRD
@@ -534,12 +534,12 @@ static void __init early_reserve_mem(void)
534 /* before we do anything, lets reserve the dt blob */ 534 /* before we do anything, lets reserve the dt blob */
535 self_base = __pa((unsigned long)initial_boot_params); 535 self_base = __pa((unsigned long)initial_boot_params);
536 self_size = initial_boot_params->totalsize; 536 self_size = initial_boot_params->totalsize;
537 lmb_reserve(self_base, self_size); 537 memblock_reserve(self_base, self_size);
538 538
539#ifdef CONFIG_BLK_DEV_INITRD 539#ifdef CONFIG_BLK_DEV_INITRD
540 /* then reserve the initrd, if any */ 540 /* then reserve the initrd, if any */
541 if (initrd_start && (initrd_end > initrd_start)) 541 if (initrd_start && (initrd_end > initrd_start))
542 lmb_reserve(__pa(initrd_start), initrd_end - initrd_start); 542 memblock_reserve(__pa(initrd_start), initrd_end - initrd_start);
543#endif /* CONFIG_BLK_DEV_INITRD */ 543#endif /* CONFIG_BLK_DEV_INITRD */
544 544
545#ifdef CONFIG_PPC32 545#ifdef CONFIG_PPC32
@@ -560,7 +560,7 @@ static void __init early_reserve_mem(void)
560 if (base_32 == self_base && size_32 == self_size) 560 if (base_32 == self_base && size_32 == self_size)
561 continue; 561 continue;
562 DBG("reserving: %x -> %x\n", base_32, size_32); 562 DBG("reserving: %x -> %x\n", base_32, size_32);
563 lmb_reserve(base_32, size_32); 563 memblock_reserve(base_32, size_32);
564 } 564 }
565 return; 565 return;
566 } 566 }
@@ -571,7 +571,7 @@ static void __init early_reserve_mem(void)
571 if (size == 0) 571 if (size == 0)
572 break; 572 break;
573 DBG("reserving: %llx -> %llx\n", base, size); 573 DBG("reserving: %llx -> %llx\n", base, size);
574 lmb_reserve(base, size); 574 memblock_reserve(base, size);
575 } 575 }
576} 576}
577 577
@@ -594,7 +594,7 @@ static inline unsigned long phyp_dump_calculate_reserve_size(void)
594 return phyp_dump_info->reserve_bootvar; 594 return phyp_dump_info->reserve_bootvar;
595 595
596 /* divide by 20 to get 5% of value */ 596 /* divide by 20 to get 5% of value */
597 tmp = lmb_end_of_DRAM(); 597 tmp = memblock_end_of_DRAM();
598 do_div(tmp, 20); 598 do_div(tmp, 20);
599 599
600 /* round it down in multiples of 256 */ 600 /* round it down in multiples of 256 */
@@ -633,11 +633,11 @@ static void __init phyp_dump_reserve_mem(void)
633 if (phyp_dump_info->phyp_dump_is_active) { 633 if (phyp_dump_info->phyp_dump_is_active) {
634 /* Reserve *everything* above RMR.Area freed by userland tools*/ 634 /* Reserve *everything* above RMR.Area freed by userland tools*/
635 base = variable_reserve_size; 635 base = variable_reserve_size;
636 size = lmb_end_of_DRAM() - base; 636 size = memblock_end_of_DRAM() - base;
637 637
638 /* XXX crashed_ram_end is wrong, since it may be beyond 638 /* XXX crashed_ram_end is wrong, since it may be beyond
639 * the memory_limit, it will need to be adjusted. */ 639 * the memory_limit, it will need to be adjusted. */
640 lmb_reserve(base, size); 640 memblock_reserve(base, size);
641 641
642 phyp_dump_info->init_reserve_start = base; 642 phyp_dump_info->init_reserve_start = base;
643 phyp_dump_info->init_reserve_size = size; 643 phyp_dump_info->init_reserve_size = size;
@@ -645,8 +645,8 @@ static void __init phyp_dump_reserve_mem(void)
645 size = phyp_dump_info->cpu_state_size + 645 size = phyp_dump_info->cpu_state_size +
646 phyp_dump_info->hpte_region_size + 646 phyp_dump_info->hpte_region_size +
647 variable_reserve_size; 647 variable_reserve_size;
648 base = lmb_end_of_DRAM() - size; 648 base = memblock_end_of_DRAM() - size;
649 lmb_reserve(base, size); 649 memblock_reserve(base, size);
650 phyp_dump_info->init_reserve_start = base; 650 phyp_dump_info->init_reserve_start = base;
651 phyp_dump_info->init_reserve_size = size; 651 phyp_dump_info->init_reserve_size = size;
652 } 652 }
@@ -681,8 +681,8 @@ void __init early_init_devtree(void *params)
681 */ 681 */
682 of_scan_flat_dt(early_init_dt_scan_chosen, NULL); 682 of_scan_flat_dt(early_init_dt_scan_chosen, NULL);
683 683
684 /* Scan memory nodes and rebuild LMBs */ 684 /* Scan memory nodes and rebuild MEMBLOCKs */
685 lmb_init(); 685 memblock_init();
686 of_scan_flat_dt(early_init_dt_scan_root, NULL); 686 of_scan_flat_dt(early_init_dt_scan_root, NULL);
687 of_scan_flat_dt(early_init_dt_scan_memory_ppc, NULL); 687 of_scan_flat_dt(early_init_dt_scan_memory_ppc, NULL);
688 688
@@ -690,11 +690,11 @@ void __init early_init_devtree(void *params)
690 strlcpy(boot_command_line, cmd_line, COMMAND_LINE_SIZE); 690 strlcpy(boot_command_line, cmd_line, COMMAND_LINE_SIZE);
691 parse_early_param(); 691 parse_early_param();
692 692
693 /* Reserve LMB regions used by kernel, initrd, dt, etc... */ 693 /* Reserve MEMBLOCK regions used by kernel, initrd, dt, etc... */
694 lmb_reserve(PHYSICAL_START, __pa(klimit) - PHYSICAL_START); 694 memblock_reserve(PHYSICAL_START, __pa(klimit) - PHYSICAL_START);
695 /* If relocatable, reserve first 32k for interrupt vectors etc. */ 695 /* If relocatable, reserve first 32k for interrupt vectors etc. */
696 if (PHYSICAL_START > MEMORY_START) 696 if (PHYSICAL_START > MEMORY_START)
697 lmb_reserve(MEMORY_START, 0x8000); 697 memblock_reserve(MEMORY_START, 0x8000);
698 reserve_kdump_trampoline(); 698 reserve_kdump_trampoline();
699 reserve_crashkernel(); 699 reserve_crashkernel();
700 early_reserve_mem(); 700 early_reserve_mem();
@@ -706,17 +706,17 @@ void __init early_init_devtree(void *params)
706 706
707 /* Ensure that total memory size is page-aligned, because 707 /* Ensure that total memory size is page-aligned, because
708 * otherwise mark_bootmem() gets upset. */ 708 * otherwise mark_bootmem() gets upset. */
709 lmb_analyze(); 709 memblock_analyze();
710 memsize = lmb_phys_mem_size(); 710 memsize = memblock_phys_mem_size();
711 if ((memsize & PAGE_MASK) != memsize) 711 if ((memsize & PAGE_MASK) != memsize)
712 limit = memsize & PAGE_MASK; 712 limit = memsize & PAGE_MASK;
713 } 713 }
714 lmb_enforce_memory_limit(limit); 714 memblock_enforce_memory_limit(limit);
715 715
716 lmb_analyze(); 716 memblock_analyze();
717 lmb_dump_all(); 717 memblock_dump_all();
718 718
719 DBG("Phys. mem: %llx\n", lmb_phys_mem_size()); 719 DBG("Phys. mem: %llx\n", memblock_phys_mem_size());
720 720
721 /* We may need to relocate the flat tree, do it now. 721 /* We may need to relocate the flat tree, do it now.
722 * FIXME .. and the initrd too? */ 722 * FIXME .. and the initrd too? */
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index 97d4bd9442d3..3b6f8ae9b8cc 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -872,7 +872,7 @@ static void __init prom_send_capabilities(void)
872 "ibm_architecture_vec structure inconsistent: 0x%x !\n", 872 "ibm_architecture_vec structure inconsistent: 0x%x !\n",
873 *cores); 873 *cores);
874 } else { 874 } else {
875 *cores = NR_CPUS / prom_count_smt_threads(); 875 *cores = DIV_ROUND_UP(NR_CPUS, prom_count_smt_threads());
876 prom_printf("Max number of cores passed to firmware: 0x%x\n", 876 prom_printf("Max number of cores passed to firmware: 0x%x\n",
877 (unsigned long)*cores); 877 (unsigned long)*cores);
878 } 878 }
diff --git a/arch/powerpc/kernel/prom_init_check.sh b/arch/powerpc/kernel/prom_init_check.sh
index 1ac136b128f0..9f82f4937892 100644
--- a/arch/powerpc/kernel/prom_init_check.sh
+++ b/arch/powerpc/kernel/prom_init_check.sh
@@ -52,12 +52,18 @@ do
52 if [ "${UNDEF:0:9}" = "_restgpr_" ]; then 52 if [ "${UNDEF:0:9}" = "_restgpr_" ]; then
53 OK=1 53 OK=1
54 fi 54 fi
55 if [ "${UNDEF:0:10}" = "_restgpr0_" ]; then
56 OK=1
57 fi
55 if [ "${UNDEF:0:11}" = "_rest32gpr_" ]; then 58 if [ "${UNDEF:0:11}" = "_rest32gpr_" ]; then
56 OK=1 59 OK=1
57 fi 60 fi
58 if [ "${UNDEF:0:9}" = "_savegpr_" ]; then 61 if [ "${UNDEF:0:9}" = "_savegpr_" ]; then
59 OK=1 62 OK=1
60 fi 63 fi
64 if [ "${UNDEF:0:10}" = "_savegpr0_" ]; then
65 OK=1
66 fi
61 if [ "${UNDEF:0:11}" = "_save32gpr_" ]; then 67 if [ "${UNDEF:0:11}" = "_save32gpr_" ]; then
62 OK=1 68 OK=1
63 fi 69 fi
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c
index 0e1ec6f746f6..d0516dbee762 100644
--- a/arch/powerpc/kernel/rtas.c
+++ b/arch/powerpc/kernel/rtas.c
@@ -22,7 +22,7 @@
22#include <linux/smp.h> 22#include <linux/smp.h>
23#include <linux/completion.h> 23#include <linux/completion.h>
24#include <linux/cpumask.h> 24#include <linux/cpumask.h>
25#include <linux/lmb.h> 25#include <linux/memblock.h>
26#include <linux/slab.h> 26#include <linux/slab.h>
27 27
28#include <asm/prom.h> 28#include <asm/prom.h>
@@ -934,11 +934,11 @@ void __init rtas_initialize(void)
934 */ 934 */
935#ifdef CONFIG_PPC64 935#ifdef CONFIG_PPC64
936 if (machine_is(pseries) && firmware_has_feature(FW_FEATURE_LPAR)) { 936 if (machine_is(pseries) && firmware_has_feature(FW_FEATURE_LPAR)) {
937 rtas_region = min(lmb.rmo_size, RTAS_INSTANTIATE_MAX); 937 rtas_region = min(memblock.rmo_size, RTAS_INSTANTIATE_MAX);
938 ibm_suspend_me_token = rtas_token("ibm,suspend-me"); 938 ibm_suspend_me_token = rtas_token("ibm,suspend-me");
939 } 939 }
940#endif 940#endif
941 rtas_rmo_buf = lmb_alloc_base(RTAS_RMOBUF_MAX, PAGE_SIZE, rtas_region); 941 rtas_rmo_buf = memblock_alloc_base(RTAS_RMOBUF_MAX, PAGE_SIZE, rtas_region);
942 942
943#ifdef CONFIG_RTAS_ERROR_LOGGING 943#ifdef CONFIG_RTAS_ERROR_LOGGING
944 rtas_last_error_token = rtas_token("rtas-last-error"); 944 rtas_last_error_token = rtas_token("rtas-last-error");
diff --git a/arch/powerpc/kernel/rtas_flash.c b/arch/powerpc/kernel/rtas_flash.c
index bfc2abafac44..67a84d8f118d 100644
--- a/arch/powerpc/kernel/rtas_flash.c
+++ b/arch/powerpc/kernel/rtas_flash.c
@@ -94,12 +94,8 @@ struct flash_block_list {
94 struct flash_block_list *next; 94 struct flash_block_list *next;
95 struct flash_block blocks[FLASH_BLOCKS_PER_NODE]; 95 struct flash_block blocks[FLASH_BLOCKS_PER_NODE];
96}; 96};
97struct flash_block_list_header { /* just the header of flash_block_list */
98 unsigned long num_blocks;
99 struct flash_block_list *next;
100};
101 97
102static struct flash_block_list_header rtas_firmware_flash_list = {0, NULL}; 98static struct flash_block_list *rtas_firmware_flash_list;
103 99
104/* Use slab cache to guarantee 4k alignment */ 100/* Use slab cache to guarantee 4k alignment */
105static struct kmem_cache *flash_block_cache = NULL; 101static struct kmem_cache *flash_block_cache = NULL;
@@ -108,13 +104,14 @@ static struct kmem_cache *flash_block_cache = NULL;
108 104
109/* Local copy of the flash block list. 105/* Local copy of the flash block list.
110 * We only allow one open of the flash proc file and create this 106 * We only allow one open of the flash proc file and create this
111 * list as we go. This list will be put in the 107 * list as we go. The rtas_firmware_flash_list varable will be
112 * rtas_firmware_flash_list var once it is fully read. 108 * set once the data is fully read.
113 * 109 *
114 * For convenience as we build the list we use virtual addrs, 110 * For convenience as we build the list we use virtual addrs,
115 * we do not fill in the version number, and the length field 111 * we do not fill in the version number, and the length field
116 * is treated as the number of entries currently in the block 112 * is treated as the number of entries currently in the block
117 * (i.e. not a byte count). This is all fixed on release. 113 * (i.e. not a byte count). This is all fixed when calling
114 * the flash routine.
118 */ 115 */
119 116
120/* Status int must be first member of struct */ 117/* Status int must be first member of struct */
@@ -201,16 +198,16 @@ static int rtas_flash_release(struct inode *inode, struct file *file)
201 if (uf->flist) { 198 if (uf->flist) {
202 /* File was opened in write mode for a new flash attempt */ 199 /* File was opened in write mode for a new flash attempt */
203 /* Clear saved list */ 200 /* Clear saved list */
204 if (rtas_firmware_flash_list.next) { 201 if (rtas_firmware_flash_list) {
205 free_flash_list(rtas_firmware_flash_list.next); 202 free_flash_list(rtas_firmware_flash_list);
206 rtas_firmware_flash_list.next = NULL; 203 rtas_firmware_flash_list = NULL;
207 } 204 }
208 205
209 if (uf->status != FLASH_AUTH) 206 if (uf->status != FLASH_AUTH)
210 uf->status = flash_list_valid(uf->flist); 207 uf->status = flash_list_valid(uf->flist);
211 208
212 if (uf->status == FLASH_IMG_READY) 209 if (uf->status == FLASH_IMG_READY)
213 rtas_firmware_flash_list.next = uf->flist; 210 rtas_firmware_flash_list = uf->flist;
214 else 211 else
215 free_flash_list(uf->flist); 212 free_flash_list(uf->flist);
216 213
@@ -593,7 +590,7 @@ static void rtas_flash_firmware(int reboot_type)
593 unsigned long rtas_block_list; 590 unsigned long rtas_block_list;
594 int i, status, update_token; 591 int i, status, update_token;
595 592
596 if (rtas_firmware_flash_list.next == NULL) 593 if (rtas_firmware_flash_list == NULL)
597 return; /* nothing to do */ 594 return; /* nothing to do */
598 595
599 if (reboot_type != SYS_RESTART) { 596 if (reboot_type != SYS_RESTART) {
@@ -610,20 +607,25 @@ static void rtas_flash_firmware(int reboot_type)
610 return; 607 return;
611 } 608 }
612 609
613 /* NOTE: the "first" block list is a global var with no data 610 /*
614 * blocks in the kernel data segment. We do this because 611 * NOTE: the "first" block must be under 4GB, so we create
615 * we want to ensure this block_list addr is under 4GB. 612 * an entry with no data blocks in the reserved buffer in
613 * the kernel data segment.
616 */ 614 */
617 rtas_firmware_flash_list.num_blocks = 0; 615 spin_lock(&rtas_data_buf_lock);
618 flist = (struct flash_block_list *)&rtas_firmware_flash_list; 616 flist = (struct flash_block_list *)&rtas_data_buf[0];
617 flist->num_blocks = 0;
618 flist->next = rtas_firmware_flash_list;
619 rtas_block_list = virt_to_abs(flist); 619 rtas_block_list = virt_to_abs(flist);
620 if (rtas_block_list >= 4UL*1024*1024*1024) { 620 if (rtas_block_list >= 4UL*1024*1024*1024) {
621 printk(KERN_ALERT "FLASH: kernel bug...flash list header addr above 4GB\n"); 621 printk(KERN_ALERT "FLASH: kernel bug...flash list header addr above 4GB\n");
622 spin_unlock(&rtas_data_buf_lock);
622 return; 623 return;
623 } 624 }
624 625
625 printk(KERN_ALERT "FLASH: preparing saved firmware image for flash\n"); 626 printk(KERN_ALERT "FLASH: preparing saved firmware image for flash\n");
626 /* Update the block_list in place. */ 627 /* Update the block_list in place. */
628 rtas_firmware_flash_list = NULL; /* too hard to backout on error */
627 image_size = 0; 629 image_size = 0;
628 for (f = flist; f; f = next) { 630 for (f = flist; f; f = next) {
629 /* Translate data addrs to absolute */ 631 /* Translate data addrs to absolute */
@@ -664,6 +666,7 @@ static void rtas_flash_firmware(int reboot_type)
664 printk(KERN_ALERT "FLASH: unknown flash return code %d\n", status); 666 printk(KERN_ALERT "FLASH: unknown flash return code %d\n", status);
665 break; 667 break;
666 } 668 }
669 spin_unlock(&rtas_data_buf_lock);
667} 670}
668 671
669static void remove_flash_pde(struct proc_dir_entry *dp) 672static void remove_flash_pde(struct proc_dir_entry *dp)
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index 5e4d852f640c..b7e6c7e193ae 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -33,7 +33,7 @@
33#include <linux/serial_8250.h> 33#include <linux/serial_8250.h>
34#include <linux/debugfs.h> 34#include <linux/debugfs.h>
35#include <linux/percpu.h> 35#include <linux/percpu.h>
36#include <linux/lmb.h> 36#include <linux/memblock.h>
37#include <linux/of_platform.h> 37#include <linux/of_platform.h>
38#include <asm/io.h> 38#include <asm/io.h>
39#include <asm/paca.h> 39#include <asm/paca.h>
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
index 8f58986c2ad9..a10ffc85ada7 100644
--- a/arch/powerpc/kernel/setup_32.c
+++ b/arch/powerpc/kernel/setup_32.c
@@ -16,7 +16,7 @@
16#include <linux/root_dev.h> 16#include <linux/root_dev.h>
17#include <linux/cpu.h> 17#include <linux/cpu.h>
18#include <linux/console.h> 18#include <linux/console.h>
19#include <linux/lmb.h> 19#include <linux/memblock.h>
20 20
21#include <asm/io.h> 21#include <asm/io.h>
22#include <asm/prom.h> 22#include <asm/prom.h>
@@ -241,23 +241,19 @@ int __init ppc_init(void)
241 241
242arch_initcall(ppc_init); 242arch_initcall(ppc_init);
243 243
244#ifdef CONFIG_IRQSTACKS
245static void __init irqstack_early_init(void) 244static void __init irqstack_early_init(void)
246{ 245{
247 unsigned int i; 246 unsigned int i;
248 247
249 /* interrupt stacks must be in lowmem, we get that for free on ppc32 248 /* interrupt stacks must be in lowmem, we get that for free on ppc32
250 * as the lmb is limited to lowmem by LMB_REAL_LIMIT */ 249 * as the memblock is limited to lowmem by MEMBLOCK_REAL_LIMIT */
251 for_each_possible_cpu(i) { 250 for_each_possible_cpu(i) {
252 softirq_ctx[i] = (struct thread_info *) 251 softirq_ctx[i] = (struct thread_info *)
253 __va(lmb_alloc(THREAD_SIZE, THREAD_SIZE)); 252 __va(memblock_alloc(THREAD_SIZE, THREAD_SIZE));
254 hardirq_ctx[i] = (struct thread_info *) 253 hardirq_ctx[i] = (struct thread_info *)
255 __va(lmb_alloc(THREAD_SIZE, THREAD_SIZE)); 254 __va(memblock_alloc(THREAD_SIZE, THREAD_SIZE));
256 } 255 }
257} 256}
258#else
259#define irqstack_early_init()
260#endif
261 257
262#if defined(CONFIG_BOOKE) || defined(CONFIG_40x) 258#if defined(CONFIG_BOOKE) || defined(CONFIG_40x)
263static void __init exc_lvl_early_init(void) 259static void __init exc_lvl_early_init(void)
@@ -265,15 +261,15 @@ static void __init exc_lvl_early_init(void)
265 unsigned int i; 261 unsigned int i;
266 262
267 /* interrupt stacks must be in lowmem, we get that for free on ppc32 263 /* interrupt stacks must be in lowmem, we get that for free on ppc32
268 * as the lmb is limited to lowmem by LMB_REAL_LIMIT */ 264 * as the memblock is limited to lowmem by MEMBLOCK_REAL_LIMIT */
269 for_each_possible_cpu(i) { 265 for_each_possible_cpu(i) {
270 critirq_ctx[i] = (struct thread_info *) 266 critirq_ctx[i] = (struct thread_info *)
271 __va(lmb_alloc(THREAD_SIZE, THREAD_SIZE)); 267 __va(memblock_alloc(THREAD_SIZE, THREAD_SIZE));
272#ifdef CONFIG_BOOKE 268#ifdef CONFIG_BOOKE
273 dbgirq_ctx[i] = (struct thread_info *) 269 dbgirq_ctx[i] = (struct thread_info *)
274 __va(lmb_alloc(THREAD_SIZE, THREAD_SIZE)); 270 __va(memblock_alloc(THREAD_SIZE, THREAD_SIZE));
275 mcheckirq_ctx[i] = (struct thread_info *) 271 mcheckirq_ctx[i] = (struct thread_info *)
276 __va(lmb_alloc(THREAD_SIZE, THREAD_SIZE)); 272 __va(memblock_alloc(THREAD_SIZE, THREAD_SIZE));
277#endif 273#endif
278 } 274 }
279} 275}
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index f3fb5a79de52..d135f93cb0f6 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -34,7 +34,7 @@
34#include <linux/bootmem.h> 34#include <linux/bootmem.h>
35#include <linux/pci.h> 35#include <linux/pci.h>
36#include <linux/lockdep.h> 36#include <linux/lockdep.h>
37#include <linux/lmb.h> 37#include <linux/memblock.h>
38#include <asm/io.h> 38#include <asm/io.h>
39#include <asm/kdump.h> 39#include <asm/kdump.h>
40#include <asm/prom.h> 40#include <asm/prom.h>
@@ -158,7 +158,7 @@ static void __init setup_paca(struct paca_struct *new_paca)
158 * the CPU that ignores the top 2 bits of the address in real 158 * the CPU that ignores the top 2 bits of the address in real
159 * mode so we can access kernel globals normally provided we 159 * mode so we can access kernel globals normally provided we
160 * only toy with things in the RMO region. From here, we do 160 * only toy with things in the RMO region. From here, we do
161 * some early parsing of the device-tree to setup out LMB 161 * some early parsing of the device-tree to setup out MEMBLOCK
162 * data structures, and allocate & initialize the hash table 162 * data structures, and allocate & initialize the hash table
163 * and segment tables so we can start running with translation 163 * and segment tables so we can start running with translation
164 * enabled. 164 * enabled.
@@ -404,7 +404,7 @@ void __init setup_system(void)
404 404
405 printk("-----------------------------------------------------\n"); 405 printk("-----------------------------------------------------\n");
406 printk("ppc64_pft_size = 0x%llx\n", ppc64_pft_size); 406 printk("ppc64_pft_size = 0x%llx\n", ppc64_pft_size);
407 printk("physicalMemorySize = 0x%llx\n", lmb_phys_mem_size()); 407 printk("physicalMemorySize = 0x%llx\n", memblock_phys_mem_size());
408 if (ppc64_caches.dline_size != 0x80) 408 if (ppc64_caches.dline_size != 0x80)
409 printk("ppc64_caches.dcache_line_size = 0x%x\n", 409 printk("ppc64_caches.dcache_line_size = 0x%x\n",
410 ppc64_caches.dline_size); 410 ppc64_caches.dline_size);
@@ -432,7 +432,6 @@ static u64 slb0_limit(void)
432 return 1UL << SID_SHIFT; 432 return 1UL << SID_SHIFT;
433} 433}
434 434
435#ifdef CONFIG_IRQSTACKS
436static void __init irqstack_early_init(void) 435static void __init irqstack_early_init(void)
437{ 436{
438 u64 limit = slb0_limit(); 437 u64 limit = slb0_limit();
@@ -444,16 +443,13 @@ static void __init irqstack_early_init(void)
444 */ 443 */
445 for_each_possible_cpu(i) { 444 for_each_possible_cpu(i) {
446 softirq_ctx[i] = (struct thread_info *) 445 softirq_ctx[i] = (struct thread_info *)
447 __va(lmb_alloc_base(THREAD_SIZE, 446 __va(memblock_alloc_base(THREAD_SIZE,
448 THREAD_SIZE, limit)); 447 THREAD_SIZE, limit));
449 hardirq_ctx[i] = (struct thread_info *) 448 hardirq_ctx[i] = (struct thread_info *)
450 __va(lmb_alloc_base(THREAD_SIZE, 449 __va(memblock_alloc_base(THREAD_SIZE,
451 THREAD_SIZE, limit)); 450 THREAD_SIZE, limit));
452 } 451 }
453} 452}
454#else
455#define irqstack_early_init()
456#endif
457 453
458#ifdef CONFIG_PPC_BOOK3E 454#ifdef CONFIG_PPC_BOOK3E
459static void __init exc_lvl_early_init(void) 455static void __init exc_lvl_early_init(void)
@@ -462,11 +458,11 @@ static void __init exc_lvl_early_init(void)
462 458
463 for_each_possible_cpu(i) { 459 for_each_possible_cpu(i) {
464 critirq_ctx[i] = (struct thread_info *) 460 critirq_ctx[i] = (struct thread_info *)
465 __va(lmb_alloc(THREAD_SIZE, THREAD_SIZE)); 461 __va(memblock_alloc(THREAD_SIZE, THREAD_SIZE));
466 dbgirq_ctx[i] = (struct thread_info *) 462 dbgirq_ctx[i] = (struct thread_info *)
467 __va(lmb_alloc(THREAD_SIZE, THREAD_SIZE)); 463 __va(memblock_alloc(THREAD_SIZE, THREAD_SIZE));
468 mcheckirq_ctx[i] = (struct thread_info *) 464 mcheckirq_ctx[i] = (struct thread_info *)
469 __va(lmb_alloc(THREAD_SIZE, THREAD_SIZE)); 465 __va(memblock_alloc(THREAD_SIZE, THREAD_SIZE));
470 } 466 }
471} 467}
472#else 468#else
@@ -491,11 +487,11 @@ static void __init emergency_stack_init(void)
491 * bringup, we need to get at them in real mode. This means they 487 * bringup, we need to get at them in real mode. This means they
492 * must also be within the RMO region. 488 * must also be within the RMO region.
493 */ 489 */
494 limit = min(slb0_limit(), lmb.rmo_size); 490 limit = min(slb0_limit(), memblock.rmo_size);
495 491
496 for_each_possible_cpu(i) { 492 for_each_possible_cpu(i) {
497 unsigned long sp; 493 unsigned long sp;
498 sp = lmb_alloc_base(THREAD_SIZE, THREAD_SIZE, limit); 494 sp = memblock_alloc_base(THREAD_SIZE, THREAD_SIZE, limit);
499 sp += THREAD_SIZE; 495 sp += THREAD_SIZE;
500 paca[i].emergency_sp = __va(sp); 496 paca[i].emergency_sp = __va(sp);
501 } 497 }
diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c
index d84d19224a95..13002fe206e7 100644
--- a/arch/powerpc/kernel/vdso.c
+++ b/arch/powerpc/kernel/vdso.c
@@ -22,7 +22,7 @@
22#include <linux/elf.h> 22#include <linux/elf.h>
23#include <linux/security.h> 23#include <linux/security.h>
24#include <linux/bootmem.h> 24#include <linux/bootmem.h>
25#include <linux/lmb.h> 25#include <linux/memblock.h>
26 26
27#include <asm/pgtable.h> 27#include <asm/pgtable.h>
28#include <asm/system.h> 28#include <asm/system.h>
@@ -734,7 +734,7 @@ static int __init vdso_init(void)
734 vdso_data->platform = machine_is(iseries) ? 0x200 : 0x100; 734 vdso_data->platform = machine_is(iseries) ? 0x200 : 0x100;
735 if (firmware_has_feature(FW_FEATURE_LPAR)) 735 if (firmware_has_feature(FW_FEATURE_LPAR))
736 vdso_data->platform |= 1; 736 vdso_data->platform |= 1;
737 vdso_data->physicalMemorySize = lmb_phys_mem_size(); 737 vdso_data->physicalMemorySize = memblock_phys_mem_size();
738 vdso_data->dcache_size = ppc64_caches.dsize; 738 vdso_data->dcache_size = ppc64_caches.dsize;
739 vdso_data->dcache_line_size = ppc64_caches.dline_size; 739 vdso_data->dcache_line_size = ppc64_caches.dline_size;
740 vdso_data->icache_size = ppc64_caches.isize; 740 vdso_data->icache_size = ppc64_caches.isize;
diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile
index 3040dac18a37..111da1c03a11 100644
--- a/arch/powerpc/lib/Makefile
+++ b/arch/powerpc/lib/Makefile
@@ -12,8 +12,8 @@ CFLAGS_REMOVE_code-patching.o = -pg
12CFLAGS_REMOVE_feature-fixups.o = -pg 12CFLAGS_REMOVE_feature-fixups.o = -pg
13 13
14obj-y := string.o alloc.o \ 14obj-y := string.o alloc.o \
15 checksum_$(CONFIG_WORD_SIZE).o 15 checksum_$(CONFIG_WORD_SIZE).o crtsavres.o
16obj-$(CONFIG_PPC32) += div64.o copy_32.o crtsavres.o 16obj-$(CONFIG_PPC32) += div64.o copy_32.o
17obj-$(CONFIG_HAS_IOMEM) += devres.o 17obj-$(CONFIG_HAS_IOMEM) += devres.o
18 18
19obj-$(CONFIG_PPC64) += copypage_64.o copyuser_64.o \ 19obj-$(CONFIG_PPC64) += copypage_64.o copyuser_64.o \
diff --git a/arch/powerpc/lib/crtsavres.S b/arch/powerpc/lib/crtsavres.S
index 70a9cd8a3008..1c893f05d224 100644
--- a/arch/powerpc/lib/crtsavres.S
+++ b/arch/powerpc/lib/crtsavres.S
@@ -6,6 +6,7 @@
6 * Written By Michael Meissner 6 * Written By Michael Meissner
7 * 7 *
8 * Based on gcc/config/rs6000/crtsavres.asm from gcc 8 * Based on gcc/config/rs6000/crtsavres.asm from gcc
9 * 64 bit additions from reading the PPC elf64abi document.
9 * 10 *
10 * This file is free software; you can redistribute it and/or modify it 11 * This file is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License as published by the 12 * under the terms of the GNU General Public License as published by the
@@ -44,6 +45,8 @@
44 45
45#ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE 46#ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
46 47
48#ifndef CONFIG_PPC64
49
47/* Routines for saving integer registers, called by the compiler. */ 50/* Routines for saving integer registers, called by the compiler. */
48/* Called with r11 pointing to the stack header word of the caller of the */ 51/* Called with r11 pointing to the stack header word of the caller of the */
49/* function, just beyond the end of the integer save area. */ 52/* function, just beyond the end of the integer save area. */
@@ -226,4 +229,130 @@ _GLOBAL(_rest32gpr_31_x)
226 mtlr 0 229 mtlr 0
227 mr 1,11 230 mr 1,11
228 blr 231 blr
232
233#else /* CONFIG_PPC64 */
234
235.globl _savegpr0_14
236_savegpr0_14:
237 std r14,-144(r1)
238.globl _savegpr0_15
239_savegpr0_15:
240 std r15,-136(r1)
241.globl _savegpr0_16
242_savegpr0_16:
243 std r16,-128(r1)
244.globl _savegpr0_17
245_savegpr0_17:
246 std r17,-120(r1)
247.globl _savegpr0_18
248_savegpr0_18:
249 std r18,-112(r1)
250.globl _savegpr0_19
251_savegpr0_19:
252 std r19,-104(r1)
253.globl _savegpr0_20
254_savegpr0_20:
255 std r20,-96(r1)
256.globl _savegpr0_21
257_savegpr0_21:
258 std r21,-88(r1)
259.globl _savegpr0_22
260_savegpr0_22:
261 std r22,-80(r1)
262.globl _savegpr0_23
263_savegpr0_23:
264 std r23,-72(r1)
265.globl _savegpr0_24
266_savegpr0_24:
267 std r24,-64(r1)
268.globl _savegpr0_25
269_savegpr0_25:
270 std r25,-56(r1)
271.globl _savegpr0_26
272_savegpr0_26:
273 std r26,-48(r1)
274.globl _savegpr0_27
275_savegpr0_27:
276 std r27,-40(r1)
277.globl _savegpr0_28
278_savegpr0_28:
279 std r28,-32(r1)
280.globl _savegpr0_29
281_savegpr0_29:
282 std r29,-24(r1)
283.globl _savegpr0_30
284_savegpr0_30:
285 std r30,-16(r1)
286.globl _savegpr0_31
287_savegpr0_31:
288 std r31,-8(r1)
289 std r0,16(r1)
290 blr
291
292.globl _restgpr0_14
293_restgpr0_14:
294 ld r14,-144(r1)
295.globl _restgpr0_15
296_restgpr0_15:
297 ld r15,-136(r1)
298.globl _restgpr0_16
299_restgpr0_16:
300 ld r16,-128(r1)
301.globl _restgpr0_17
302_restgpr0_17:
303 ld r17,-120(r1)
304.globl _restgpr0_18
305_restgpr0_18:
306 ld r18,-112(r1)
307.globl _restgpr0_19
308_restgpr0_19:
309 ld r19,-104(r1)
310.globl _restgpr0_20
311_restgpr0_20:
312 ld r20,-96(r1)
313.globl _restgpr0_21
314_restgpr0_21:
315 ld r21,-88(r1)
316.globl _restgpr0_22
317_restgpr0_22:
318 ld r22,-80(r1)
319.globl _restgpr0_23
320_restgpr0_23:
321 ld r23,-72(r1)
322.globl _restgpr0_24
323_restgpr0_24:
324 ld r24,-64(r1)
325.globl _restgpr0_25
326_restgpr0_25:
327 ld r25,-56(r1)
328.globl _restgpr0_26
329_restgpr0_26:
330 ld r26,-48(r1)
331.globl _restgpr0_27
332_restgpr0_27:
333 ld r27,-40(r1)
334.globl _restgpr0_28
335_restgpr0_28:
336 ld r28,-32(r1)
337.globl _restgpr0_29
338_restgpr0_29:
339 ld r0,16(r1)
340 ld r29,-24(r1)
341 mtlr r0
342 ld r30,-16(r1)
343 ld r31,-8(r1)
344 blr
345
346.globl _restgpr0_30
347_restgpr0_30:
348 ld r30,-16(r1)
349.globl _restgpr0_31
350_restgpr0_31:
351 ld r0,16(r1)
352 ld r31,-8(r1)
353 mtlr r0
354 blr
355
356#endif /* CONFIG_PPC64 */
357
229#endif 358#endif
diff --git a/arch/powerpc/lib/feature-fixups.c b/arch/powerpc/lib/feature-fixups.c
index e640175b65ae..0d08d0171392 100644
--- a/arch/powerpc/lib/feature-fixups.c
+++ b/arch/powerpc/lib/feature-fixups.c
@@ -12,6 +12,7 @@
12 * 2 of the License, or (at your option) any later version. 12 * 2 of the License, or (at your option) any later version.
13 */ 13 */
14 14
15#include <linux/types.h>
15#include <linux/kernel.h> 16#include <linux/kernel.h>
16#include <linux/string.h> 17#include <linux/string.h>
17#include <linux/init.h> 18#include <linux/init.h>
@@ -288,8 +289,8 @@ static void test_alternative_case_with_external_branch(void)
288 289
289static void test_cpu_macros(void) 290static void test_cpu_macros(void)
290{ 291{
291 extern void ftr_fixup_test_FTR_macros; 292 extern u8 ftr_fixup_test_FTR_macros;
292 extern void ftr_fixup_test_FTR_macros_expected; 293 extern u8 ftr_fixup_test_FTR_macros_expected;
293 unsigned long size = &ftr_fixup_test_FTR_macros_expected - 294 unsigned long size = &ftr_fixup_test_FTR_macros_expected -
294 &ftr_fixup_test_FTR_macros; 295 &ftr_fixup_test_FTR_macros;
295 296
@@ -301,8 +302,8 @@ static void test_cpu_macros(void)
301static void test_fw_macros(void) 302static void test_fw_macros(void)
302{ 303{
303#ifdef CONFIG_PPC64 304#ifdef CONFIG_PPC64
304 extern void ftr_fixup_test_FW_FTR_macros; 305 extern u8 ftr_fixup_test_FW_FTR_macros;
305 extern void ftr_fixup_test_FW_FTR_macros_expected; 306 extern u8 ftr_fixup_test_FW_FTR_macros_expected;
306 unsigned long size = &ftr_fixup_test_FW_FTR_macros_expected - 307 unsigned long size = &ftr_fixup_test_FW_FTR_macros_expected -
307 &ftr_fixup_test_FW_FTR_macros; 308 &ftr_fixup_test_FW_FTR_macros;
308 309
@@ -314,10 +315,10 @@ static void test_fw_macros(void)
314 315
315static void test_lwsync_macros(void) 316static void test_lwsync_macros(void)
316{ 317{
317 extern void lwsync_fixup_test; 318 extern u8 lwsync_fixup_test;
318 extern void end_lwsync_fixup_test; 319 extern u8 end_lwsync_fixup_test;
319 extern void lwsync_fixup_test_expected_LWSYNC; 320 extern u8 lwsync_fixup_test_expected_LWSYNC;
320 extern void lwsync_fixup_test_expected_SYNC; 321 extern u8 lwsync_fixup_test_expected_SYNC;
321 unsigned long size = &end_lwsync_fixup_test - 322 unsigned long size = &end_lwsync_fixup_test -
322 &lwsync_fixup_test; 323 &lwsync_fixup_test;
323 324
diff --git a/arch/powerpc/mm/40x_mmu.c b/arch/powerpc/mm/40x_mmu.c
index 65abfcfaaa9e..1dc2fa5ce1bd 100644
--- a/arch/powerpc/mm/40x_mmu.c
+++ b/arch/powerpc/mm/40x_mmu.c
@@ -135,7 +135,7 @@ unsigned long __init mmu_mapin_ram(unsigned long top)
135 /* If the size of RAM is not an exact power of two, we may not 135 /* If the size of RAM is not an exact power of two, we may not
136 * have covered RAM in its entirety with 16 and 4 MiB 136 * have covered RAM in its entirety with 16 and 4 MiB
137 * pages. Consequently, restrict the top end of RAM currently 137 * pages. Consequently, restrict the top end of RAM currently
138 * allocable so that calls to the LMB to allocate PTEs for "tail" 138 * allocable so that calls to the MEMBLOCK to allocate PTEs for "tail"
139 * coverage with normal-sized pages (or other reasons) do not 139 * coverage with normal-sized pages (or other reasons) do not
140 * attempt to allocate outside the allowed range. 140 * attempt to allocate outside the allowed range.
141 */ 141 */
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c
index 3ecdcec0a39e..98f262de5585 100644
--- a/arch/powerpc/mm/hash_utils_64.c
+++ b/arch/powerpc/mm/hash_utils_64.c
@@ -31,7 +31,7 @@
31#include <linux/cache.h> 31#include <linux/cache.h>
32#include <linux/init.h> 32#include <linux/init.h>
33#include <linux/signal.h> 33#include <linux/signal.h>
34#include <linux/lmb.h> 34#include <linux/memblock.h>
35 35
36#include <asm/processor.h> 36#include <asm/processor.h>
37#include <asm/pgtable.h> 37#include <asm/pgtable.h>
@@ -384,8 +384,8 @@ static int __init htab_dt_scan_hugepage_blocks(unsigned long node,
384 printk(KERN_INFO "Huge page(16GB) memory: " 384 printk(KERN_INFO "Huge page(16GB) memory: "
385 "addr = 0x%lX size = 0x%lX pages = %d\n", 385 "addr = 0x%lX size = 0x%lX pages = %d\n",
386 phys_addr, block_size, expected_pages); 386 phys_addr, block_size, expected_pages);
387 if (phys_addr + (16 * GB) <= lmb_end_of_DRAM()) { 387 if (phys_addr + (16 * GB) <= memblock_end_of_DRAM()) {
388 lmb_reserve(phys_addr, block_size * expected_pages); 388 memblock_reserve(phys_addr, block_size * expected_pages);
389 add_gpage(phys_addr, block_size, expected_pages); 389 add_gpage(phys_addr, block_size, expected_pages);
390 } 390 }
391 return 0; 391 return 0;
@@ -458,7 +458,7 @@ static void __init htab_init_page_sizes(void)
458 * and we have at least 1G of RAM at boot 458 * and we have at least 1G of RAM at boot
459 */ 459 */
460 if (mmu_psize_defs[MMU_PAGE_16M].shift && 460 if (mmu_psize_defs[MMU_PAGE_16M].shift &&
461 lmb_phys_mem_size() >= 0x40000000) 461 memblock_phys_mem_size() >= 0x40000000)
462 mmu_vmemmap_psize = MMU_PAGE_16M; 462 mmu_vmemmap_psize = MMU_PAGE_16M;
463 else if (mmu_psize_defs[MMU_PAGE_64K].shift) 463 else if (mmu_psize_defs[MMU_PAGE_64K].shift)
464 mmu_vmemmap_psize = MMU_PAGE_64K; 464 mmu_vmemmap_psize = MMU_PAGE_64K;
@@ -520,7 +520,7 @@ static unsigned long __init htab_get_table_size(void)
520 return 1UL << ppc64_pft_size; 520 return 1UL << ppc64_pft_size;
521 521
522 /* round mem_size up to next power of 2 */ 522 /* round mem_size up to next power of 2 */
523 mem_size = lmb_phys_mem_size(); 523 mem_size = memblock_phys_mem_size();
524 rnd_mem_size = 1UL << __ilog2(mem_size); 524 rnd_mem_size = 1UL << __ilog2(mem_size);
525 if (rnd_mem_size < mem_size) 525 if (rnd_mem_size < mem_size)
526 rnd_mem_size <<= 1; 526 rnd_mem_size <<= 1;
@@ -627,7 +627,7 @@ static void __init htab_initialize(void)
627 else 627 else
628 limit = 0; 628 limit = 0;
629 629
630 table = lmb_alloc_base(htab_size_bytes, htab_size_bytes, limit); 630 table = memblock_alloc_base(htab_size_bytes, htab_size_bytes, limit);
631 631
632 DBG("Hash table allocated at %lx, size: %lx\n", table, 632 DBG("Hash table allocated at %lx, size: %lx\n", table,
633 htab_size_bytes); 633 htab_size_bytes);
@@ -647,9 +647,9 @@ static void __init htab_initialize(void)
647 prot = pgprot_val(PAGE_KERNEL); 647 prot = pgprot_val(PAGE_KERNEL);
648 648
649#ifdef CONFIG_DEBUG_PAGEALLOC 649#ifdef CONFIG_DEBUG_PAGEALLOC
650 linear_map_hash_count = lmb_end_of_DRAM() >> PAGE_SHIFT; 650 linear_map_hash_count = memblock_end_of_DRAM() >> PAGE_SHIFT;
651 linear_map_hash_slots = __va(lmb_alloc_base(linear_map_hash_count, 651 linear_map_hash_slots = __va(memblock_alloc_base(linear_map_hash_count,
652 1, lmb.rmo_size)); 652 1, memblock.rmo_size));
653 memset(linear_map_hash_slots, 0, linear_map_hash_count); 653 memset(linear_map_hash_slots, 0, linear_map_hash_count);
654#endif /* CONFIG_DEBUG_PAGEALLOC */ 654#endif /* CONFIG_DEBUG_PAGEALLOC */
655 655
@@ -659,16 +659,16 @@ static void __init htab_initialize(void)
659 */ 659 */
660 660
661 /* create bolted the linear mapping in the hash table */ 661 /* create bolted the linear mapping in the hash table */
662 for (i=0; i < lmb.memory.cnt; i++) { 662 for (i=0; i < memblock.memory.cnt; i++) {
663 base = (unsigned long)__va(lmb.memory.region[i].base); 663 base = (unsigned long)__va(memblock.memory.region[i].base);
664 size = lmb.memory.region[i].size; 664 size = memblock.memory.region[i].size;
665 665
666 DBG("creating mapping for region: %lx..%lx (prot: %lx)\n", 666 DBG("creating mapping for region: %lx..%lx (prot: %lx)\n",
667 base, size, prot); 667 base, size, prot);
668 668
669#ifdef CONFIG_U3_DART 669#ifdef CONFIG_U3_DART
670 /* Do not map the DART space. Fortunately, it will be aligned 670 /* Do not map the DART space. Fortunately, it will be aligned
671 * in such a way that it will not cross two lmb regions and 671 * in such a way that it will not cross two memblock regions and
672 * will fit within a single 16Mb page. 672 * will fit within a single 16Mb page.
673 * The DART space is assumed to be a full 16Mb region even if 673 * The DART space is assumed to be a full 16Mb region even if
674 * we only use 2Mb of that space. We will use more of it later 674 * we only use 2Mb of that space. We will use more of it later
diff --git a/arch/powerpc/mm/init_32.c b/arch/powerpc/mm/init_32.c
index 767333005eb4..6a6975dc2654 100644
--- a/arch/powerpc/mm/init_32.c
+++ b/arch/powerpc/mm/init_32.c
@@ -30,7 +30,7 @@
30#include <linux/highmem.h> 30#include <linux/highmem.h>
31#include <linux/initrd.h> 31#include <linux/initrd.h>
32#include <linux/pagemap.h> 32#include <linux/pagemap.h>
33#include <linux/lmb.h> 33#include <linux/memblock.h>
34#include <linux/gfp.h> 34#include <linux/gfp.h>
35 35
36#include <asm/pgalloc.h> 36#include <asm/pgalloc.h>
@@ -136,17 +136,17 @@ void __init MMU_init(void)
136 /* parse args from command line */ 136 /* parse args from command line */
137 MMU_setup(); 137 MMU_setup();
138 138
139 if (lmb.memory.cnt > 1) { 139 if (memblock.memory.cnt > 1) {
140#ifndef CONFIG_WII 140#ifndef CONFIG_WII
141 lmb.memory.cnt = 1; 141 memblock.memory.cnt = 1;
142 lmb_analyze(); 142 memblock_analyze();
143 printk(KERN_WARNING "Only using first contiguous memory region"); 143 printk(KERN_WARNING "Only using first contiguous memory region");
144#else 144#else
145 wii_memory_fixups(); 145 wii_memory_fixups();
146#endif 146#endif
147 } 147 }
148 148
149 total_lowmem = total_memory = lmb_end_of_DRAM() - memstart_addr; 149 total_lowmem = total_memory = memblock_end_of_DRAM() - memstart_addr;
150 lowmem_end_addr = memstart_addr + total_lowmem; 150 lowmem_end_addr = memstart_addr + total_lowmem;
151 151
152#ifdef CONFIG_FSL_BOOKE 152#ifdef CONFIG_FSL_BOOKE
@@ -161,8 +161,8 @@ void __init MMU_init(void)
161 lowmem_end_addr = memstart_addr + total_lowmem; 161 lowmem_end_addr = memstart_addr + total_lowmem;
162#ifndef CONFIG_HIGHMEM 162#ifndef CONFIG_HIGHMEM
163 total_memory = total_lowmem; 163 total_memory = total_lowmem;
164 lmb_enforce_memory_limit(lowmem_end_addr); 164 memblock_enforce_memory_limit(lowmem_end_addr);
165 lmb_analyze(); 165 memblock_analyze();
166#endif /* CONFIG_HIGHMEM */ 166#endif /* CONFIG_HIGHMEM */
167 } 167 }
168 168
@@ -200,7 +200,7 @@ void __init *early_get_page(void)
200 if (init_bootmem_done) { 200 if (init_bootmem_done) {
201 p = alloc_bootmem_pages(PAGE_SIZE); 201 p = alloc_bootmem_pages(PAGE_SIZE);
202 } else { 202 } else {
203 p = __va(lmb_alloc_base(PAGE_SIZE, PAGE_SIZE, 203 p = __va(memblock_alloc_base(PAGE_SIZE, PAGE_SIZE,
204 __initial_memory_limit_addr)); 204 __initial_memory_limit_addr));
205 } 205 }
206 return p; 206 return p;
diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c
index e267f223fdff..71f1415e2472 100644
--- a/arch/powerpc/mm/init_64.c
+++ b/arch/powerpc/mm/init_64.c
@@ -40,7 +40,7 @@
40#include <linux/nodemask.h> 40#include <linux/nodemask.h>
41#include <linux/module.h> 41#include <linux/module.h>
42#include <linux/poison.h> 42#include <linux/poison.h>
43#include <linux/lmb.h> 43#include <linux/memblock.h>
44#include <linux/hugetlb.h> 44#include <linux/hugetlb.h>
45#include <linux/slab.h> 45#include <linux/slab.h>
46 46
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
index 0f594d774bf7..1a84a8d00005 100644
--- a/arch/powerpc/mm/mem.c
+++ b/arch/powerpc/mm/mem.c
@@ -32,7 +32,7 @@
32#include <linux/initrd.h> 32#include <linux/initrd.h>
33#include <linux/pagemap.h> 33#include <linux/pagemap.h>
34#include <linux/suspend.h> 34#include <linux/suspend.h>
35#include <linux/lmb.h> 35#include <linux/memblock.h>
36#include <linux/hugetlb.h> 36#include <linux/hugetlb.h>
37 37
38#include <asm/pgalloc.h> 38#include <asm/pgalloc.h>
@@ -83,13 +83,13 @@ int page_is_ram(unsigned long pfn)
83#else 83#else
84 unsigned long paddr = (pfn << PAGE_SHIFT); 84 unsigned long paddr = (pfn << PAGE_SHIFT);
85 int i; 85 int i;
86 for (i=0; i < lmb.memory.cnt; i++) { 86 for (i=0; i < memblock.memory.cnt; i++) {
87 unsigned long base; 87 unsigned long base;
88 88
89 base = lmb.memory.region[i].base; 89 base = memblock.memory.region[i].base;
90 90
91 if ((paddr >= base) && 91 if ((paddr >= base) &&
92 (paddr < (base + lmb.memory.region[i].size))) { 92 (paddr < (base + memblock.memory.region[i].size))) {
93 return 1; 93 return 1;
94 } 94 }
95 } 95 }
@@ -142,14 +142,14 @@ int arch_add_memory(int nid, u64 start, u64 size)
142/* 142/*
143 * walk_memory_resource() needs to make sure there is no holes in a given 143 * walk_memory_resource() needs to make sure there is no holes in a given
144 * memory range. PPC64 does not maintain the memory layout in /proc/iomem. 144 * memory range. PPC64 does not maintain the memory layout in /proc/iomem.
145 * Instead it maintains it in lmb.memory structures. Walk through the 145 * Instead it maintains it in memblock.memory structures. Walk through the
146 * memory regions, find holes and callback for contiguous regions. 146 * memory regions, find holes and callback for contiguous regions.
147 */ 147 */
148int 148int
149walk_system_ram_range(unsigned long start_pfn, unsigned long nr_pages, 149walk_system_ram_range(unsigned long start_pfn, unsigned long nr_pages,
150 void *arg, int (*func)(unsigned long, unsigned long, void *)) 150 void *arg, int (*func)(unsigned long, unsigned long, void *))
151{ 151{
152 struct lmb_property res; 152 struct memblock_property res;
153 unsigned long pfn, len; 153 unsigned long pfn, len;
154 u64 end; 154 u64 end;
155 int ret = -1; 155 int ret = -1;
@@ -158,7 +158,7 @@ walk_system_ram_range(unsigned long start_pfn, unsigned long nr_pages,
158 res.size = (u64) nr_pages << PAGE_SHIFT; 158 res.size = (u64) nr_pages << PAGE_SHIFT;
159 159
160 end = res.base + res.size - 1; 160 end = res.base + res.size - 1;
161 while ((res.base < end) && (lmb_find(&res) >= 0)) { 161 while ((res.base < end) && (memblock_find(&res) >= 0)) {
162 pfn = (unsigned long)(res.base >> PAGE_SHIFT); 162 pfn = (unsigned long)(res.base >> PAGE_SHIFT);
163 len = (unsigned long)(res.size >> PAGE_SHIFT); 163 len = (unsigned long)(res.size >> PAGE_SHIFT);
164 ret = (*func)(pfn, len, arg); 164 ret = (*func)(pfn, len, arg);
@@ -184,8 +184,8 @@ void __init do_init_bootmem(void)
184 unsigned long total_pages; 184 unsigned long total_pages;
185 int boot_mapsize; 185 int boot_mapsize;
186 186
187 max_low_pfn = max_pfn = lmb_end_of_DRAM() >> PAGE_SHIFT; 187 max_low_pfn = max_pfn = memblock_end_of_DRAM() >> PAGE_SHIFT;
188 total_pages = (lmb_end_of_DRAM() - memstart_addr) >> PAGE_SHIFT; 188 total_pages = (memblock_end_of_DRAM() - memstart_addr) >> PAGE_SHIFT;
189#ifdef CONFIG_HIGHMEM 189#ifdef CONFIG_HIGHMEM
190 total_pages = total_lowmem >> PAGE_SHIFT; 190 total_pages = total_lowmem >> PAGE_SHIFT;
191 max_low_pfn = lowmem_end_addr >> PAGE_SHIFT; 191 max_low_pfn = lowmem_end_addr >> PAGE_SHIFT;
@@ -198,16 +198,16 @@ void __init do_init_bootmem(void)
198 */ 198 */
199 bootmap_pages = bootmem_bootmap_pages(total_pages); 199 bootmap_pages = bootmem_bootmap_pages(total_pages);
200 200
201 start = lmb_alloc(bootmap_pages << PAGE_SHIFT, PAGE_SIZE); 201 start = memblock_alloc(bootmap_pages << PAGE_SHIFT, PAGE_SIZE);
202 202
203 min_low_pfn = MEMORY_START >> PAGE_SHIFT; 203 min_low_pfn = MEMORY_START >> PAGE_SHIFT;
204 boot_mapsize = init_bootmem_node(NODE_DATA(0), start >> PAGE_SHIFT, min_low_pfn, max_low_pfn); 204 boot_mapsize = init_bootmem_node(NODE_DATA(0), start >> PAGE_SHIFT, min_low_pfn, max_low_pfn);
205 205
206 /* Add active regions with valid PFNs */ 206 /* Add active regions with valid PFNs */
207 for (i = 0; i < lmb.memory.cnt; i++) { 207 for (i = 0; i < memblock.memory.cnt; i++) {
208 unsigned long start_pfn, end_pfn; 208 unsigned long start_pfn, end_pfn;
209 start_pfn = lmb.memory.region[i].base >> PAGE_SHIFT; 209 start_pfn = memblock.memory.region[i].base >> PAGE_SHIFT;
210 end_pfn = start_pfn + lmb_size_pages(&lmb.memory, i); 210 end_pfn = start_pfn + memblock_size_pages(&memblock.memory, i);
211 add_active_range(0, start_pfn, end_pfn); 211 add_active_range(0, start_pfn, end_pfn);
212 } 212 }
213 213
@@ -218,17 +218,17 @@ void __init do_init_bootmem(void)
218 free_bootmem_with_active_regions(0, lowmem_end_addr >> PAGE_SHIFT); 218 free_bootmem_with_active_regions(0, lowmem_end_addr >> PAGE_SHIFT);
219 219
220 /* reserve the sections we're already using */ 220 /* reserve the sections we're already using */
221 for (i = 0; i < lmb.reserved.cnt; i++) { 221 for (i = 0; i < memblock.reserved.cnt; i++) {
222 unsigned long addr = lmb.reserved.region[i].base + 222 unsigned long addr = memblock.reserved.region[i].base +
223 lmb_size_bytes(&lmb.reserved, i) - 1; 223 memblock_size_bytes(&memblock.reserved, i) - 1;
224 if (addr < lowmem_end_addr) 224 if (addr < lowmem_end_addr)
225 reserve_bootmem(lmb.reserved.region[i].base, 225 reserve_bootmem(memblock.reserved.region[i].base,
226 lmb_size_bytes(&lmb.reserved, i), 226 memblock_size_bytes(&memblock.reserved, i),
227 BOOTMEM_DEFAULT); 227 BOOTMEM_DEFAULT);
228 else if (lmb.reserved.region[i].base < lowmem_end_addr) { 228 else if (memblock.reserved.region[i].base < lowmem_end_addr) {
229 unsigned long adjusted_size = lowmem_end_addr - 229 unsigned long adjusted_size = lowmem_end_addr -
230 lmb.reserved.region[i].base; 230 memblock.reserved.region[i].base;
231 reserve_bootmem(lmb.reserved.region[i].base, 231 reserve_bootmem(memblock.reserved.region[i].base,
232 adjusted_size, BOOTMEM_DEFAULT); 232 adjusted_size, BOOTMEM_DEFAULT);
233 } 233 }
234 } 234 }
@@ -236,9 +236,9 @@ void __init do_init_bootmem(void)
236 free_bootmem_with_active_regions(0, max_pfn); 236 free_bootmem_with_active_regions(0, max_pfn);
237 237
238 /* reserve the sections we're already using */ 238 /* reserve the sections we're already using */
239 for (i = 0; i < lmb.reserved.cnt; i++) 239 for (i = 0; i < memblock.reserved.cnt; i++)
240 reserve_bootmem(lmb.reserved.region[i].base, 240 reserve_bootmem(memblock.reserved.region[i].base,
241 lmb_size_bytes(&lmb.reserved, i), 241 memblock_size_bytes(&memblock.reserved, i),
242 BOOTMEM_DEFAULT); 242 BOOTMEM_DEFAULT);
243 243
244#endif 244#endif
@@ -251,20 +251,20 @@ void __init do_init_bootmem(void)
251/* mark pages that don't exist as nosave */ 251/* mark pages that don't exist as nosave */
252static int __init mark_nonram_nosave(void) 252static int __init mark_nonram_nosave(void)
253{ 253{
254 unsigned long lmb_next_region_start_pfn, 254 unsigned long memblock_next_region_start_pfn,
255 lmb_region_max_pfn; 255 memblock_region_max_pfn;
256 int i; 256 int i;
257 257
258 for (i = 0; i < lmb.memory.cnt - 1; i++) { 258 for (i = 0; i < memblock.memory.cnt - 1; i++) {
259 lmb_region_max_pfn = 259 memblock_region_max_pfn =
260 (lmb.memory.region[i].base >> PAGE_SHIFT) + 260 (memblock.memory.region[i].base >> PAGE_SHIFT) +
261 (lmb.memory.region[i].size >> PAGE_SHIFT); 261 (memblock.memory.region[i].size >> PAGE_SHIFT);
262 lmb_next_region_start_pfn = 262 memblock_next_region_start_pfn =
263 lmb.memory.region[i+1].base >> PAGE_SHIFT; 263 memblock.memory.region[i+1].base >> PAGE_SHIFT;
264 264
265 if (lmb_region_max_pfn < lmb_next_region_start_pfn) 265 if (memblock_region_max_pfn < memblock_next_region_start_pfn)
266 register_nosave_region(lmb_region_max_pfn, 266 register_nosave_region(memblock_region_max_pfn,
267 lmb_next_region_start_pfn); 267 memblock_next_region_start_pfn);
268 } 268 }
269 269
270 return 0; 270 return 0;
@@ -275,8 +275,8 @@ static int __init mark_nonram_nosave(void)
275 */ 275 */
276void __init paging_init(void) 276void __init paging_init(void)
277{ 277{
278 unsigned long total_ram = lmb_phys_mem_size(); 278 unsigned long total_ram = memblock_phys_mem_size();
279 phys_addr_t top_of_ram = lmb_end_of_DRAM(); 279 phys_addr_t top_of_ram = memblock_end_of_DRAM();
280 unsigned long max_zone_pfns[MAX_NR_ZONES]; 280 unsigned long max_zone_pfns[MAX_NR_ZONES];
281 281
282#ifdef CONFIG_PPC32 282#ifdef CONFIG_PPC32
@@ -327,7 +327,7 @@ void __init mem_init(void)
327 swiotlb_init(1); 327 swiotlb_init(1);
328#endif 328#endif
329 329
330 num_physpages = lmb.memory.size >> PAGE_SHIFT; 330 num_physpages = memblock.memory.size >> PAGE_SHIFT;
331 high_memory = (void *) __va(max_low_pfn * PAGE_SIZE); 331 high_memory = (void *) __va(max_low_pfn * PAGE_SIZE);
332 332
333#ifdef CONFIG_NEED_MULTIPLE_NODES 333#ifdef CONFIG_NEED_MULTIPLE_NODES
@@ -364,7 +364,7 @@ void __init mem_init(void)
364 highmem_mapnr = lowmem_end_addr >> PAGE_SHIFT; 364 highmem_mapnr = lowmem_end_addr >> PAGE_SHIFT;
365 for (pfn = highmem_mapnr; pfn < max_mapnr; ++pfn) { 365 for (pfn = highmem_mapnr; pfn < max_mapnr; ++pfn) {
366 struct page *page = pfn_to_page(pfn); 366 struct page *page = pfn_to_page(pfn);
367 if (lmb_is_reserved(pfn << PAGE_SHIFT)) 367 if (memblock_is_reserved(pfn << PAGE_SHIFT))
368 continue; 368 continue;
369 ClearPageReserved(page); 369 ClearPageReserved(page);
370 init_page_count(page); 370 init_page_count(page);
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index 80d110635d24..f47364585ecd 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -17,7 +17,7 @@
17#include <linux/nodemask.h> 17#include <linux/nodemask.h>
18#include <linux/cpu.h> 18#include <linux/cpu.h>
19#include <linux/notifier.h> 19#include <linux/notifier.h>
20#include <linux/lmb.h> 20#include <linux/memblock.h>
21#include <linux/of.h> 21#include <linux/of.h>
22#include <linux/pfn.h> 22#include <linux/pfn.h>
23#include <asm/sparsemem.h> 23#include <asm/sparsemem.h>
@@ -351,7 +351,7 @@ struct of_drconf_cell {
351#define DRCONF_MEM_RESERVED 0x00000080 351#define DRCONF_MEM_RESERVED 0x00000080
352 352
353/* 353/*
354 * Read the next lmb list entry from the ibm,dynamic-memory property 354 * Read the next memblock list entry from the ibm,dynamic-memory property
355 * and return the information in the provided of_drconf_cell structure. 355 * and return the information in the provided of_drconf_cell structure.
356 */ 356 */
357static void read_drconf_cell(struct of_drconf_cell *drmem, const u32 **cellp) 357static void read_drconf_cell(struct of_drconf_cell *drmem, const u32 **cellp)
@@ -372,8 +372,8 @@ static void read_drconf_cell(struct of_drconf_cell *drmem, const u32 **cellp)
372/* 372/*
373 * Retreive and validate the ibm,dynamic-memory property of the device tree. 373 * Retreive and validate the ibm,dynamic-memory property of the device tree.
374 * 374 *
375 * The layout of the ibm,dynamic-memory property is a number N of lmb 375 * The layout of the ibm,dynamic-memory property is a number N of memblock
376 * list entries followed by N lmb list entries. Each lmb list entry 376 * list entries followed by N memblock list entries. Each memblock list entry
377 * contains information as layed out in the of_drconf_cell struct above. 377 * contains information as layed out in the of_drconf_cell struct above.
378 */ 378 */
379static int of_get_drconf_memory(struct device_node *memory, const u32 **dm) 379static int of_get_drconf_memory(struct device_node *memory, const u32 **dm)
@@ -398,15 +398,15 @@ static int of_get_drconf_memory(struct device_node *memory, const u32 **dm)
398} 398}
399 399
400/* 400/*
401 * Retreive and validate the ibm,lmb-size property for drconf memory 401 * Retreive and validate the ibm,memblock-size property for drconf memory
402 * from the device tree. 402 * from the device tree.
403 */ 403 */
404static u64 of_get_lmb_size(struct device_node *memory) 404static u64 of_get_memblock_size(struct device_node *memory)
405{ 405{
406 const u32 *prop; 406 const u32 *prop;
407 u32 len; 407 u32 len;
408 408
409 prop = of_get_property(memory, "ibm,lmb-size", &len); 409 prop = of_get_property(memory, "ibm,memblock-size", &len);
410 if (!prop || len < sizeof(unsigned int)) 410 if (!prop || len < sizeof(unsigned int))
411 return 0; 411 return 0;
412 412
@@ -540,19 +540,19 @@ static unsigned long __init numa_enforce_memory_limit(unsigned long start,
540 unsigned long size) 540 unsigned long size)
541{ 541{
542 /* 542 /*
543 * We use lmb_end_of_DRAM() in here instead of memory_limit because 543 * We use memblock_end_of_DRAM() in here instead of memory_limit because
544 * we've already adjusted it for the limit and it takes care of 544 * we've already adjusted it for the limit and it takes care of
545 * having memory holes below the limit. Also, in the case of 545 * having memory holes below the limit. Also, in the case of
546 * iommu_is_off, memory_limit is not set but is implicitly enforced. 546 * iommu_is_off, memory_limit is not set but is implicitly enforced.
547 */ 547 */
548 548
549 if (start + size <= lmb_end_of_DRAM()) 549 if (start + size <= memblock_end_of_DRAM())
550 return size; 550 return size;
551 551
552 if (start >= lmb_end_of_DRAM()) 552 if (start >= memblock_end_of_DRAM())
553 return 0; 553 return 0;
554 554
555 return lmb_end_of_DRAM() - start; 555 return memblock_end_of_DRAM() - start;
556} 556}
557 557
558/* 558/*
@@ -562,7 +562,7 @@ static unsigned long __init numa_enforce_memory_limit(unsigned long start,
562static inline int __init read_usm_ranges(const u32 **usm) 562static inline int __init read_usm_ranges(const u32 **usm)
563{ 563{
564 /* 564 /*
565 * For each lmb in ibm,dynamic-memory a corresponding 565 * For each memblock in ibm,dynamic-memory a corresponding
566 * entry in linux,drconf-usable-memory property contains 566 * entry in linux,drconf-usable-memory property contains
567 * a counter followed by that many (base, size) duple. 567 * a counter followed by that many (base, size) duple.
568 * read the counter from linux,drconf-usable-memory 568 * read the counter from linux,drconf-usable-memory
@@ -578,7 +578,7 @@ static void __init parse_drconf_memory(struct device_node *memory)
578{ 578{
579 const u32 *dm, *usm; 579 const u32 *dm, *usm;
580 unsigned int n, rc, ranges, is_kexec_kdump = 0; 580 unsigned int n, rc, ranges, is_kexec_kdump = 0;
581 unsigned long lmb_size, base, size, sz; 581 unsigned long memblock_size, base, size, sz;
582 int nid; 582 int nid;
583 struct assoc_arrays aa; 583 struct assoc_arrays aa;
584 584
@@ -586,8 +586,8 @@ static void __init parse_drconf_memory(struct device_node *memory)
586 if (!n) 586 if (!n)
587 return; 587 return;
588 588
589 lmb_size = of_get_lmb_size(memory); 589 memblock_size = of_get_memblock_size(memory);
590 if (!lmb_size) 590 if (!memblock_size)
591 return; 591 return;
592 592
593 rc = of_get_assoc_arrays(memory, &aa); 593 rc = of_get_assoc_arrays(memory, &aa);
@@ -611,7 +611,7 @@ static void __init parse_drconf_memory(struct device_node *memory)
611 continue; 611 continue;
612 612
613 base = drmem.base_addr; 613 base = drmem.base_addr;
614 size = lmb_size; 614 size = memblock_size;
615 ranges = 1; 615 ranges = 1;
616 616
617 if (is_kexec_kdump) { 617 if (is_kexec_kdump) {
@@ -731,7 +731,7 @@ new_range:
731 } 731 }
732 732
733 /* 733 /*
734 * Now do the same thing for each LMB listed in the ibm,dynamic-memory 734 * Now do the same thing for each MEMBLOCK listed in the ibm,dynamic-memory
735 * property in the ibm,dynamic-reconfiguration-memory node. 735 * property in the ibm,dynamic-reconfiguration-memory node.
736 */ 736 */
737 memory = of_find_node_by_path("/ibm,dynamic-reconfiguration-memory"); 737 memory = of_find_node_by_path("/ibm,dynamic-reconfiguration-memory");
@@ -743,8 +743,8 @@ new_range:
743 743
744static void __init setup_nonnuma(void) 744static void __init setup_nonnuma(void)
745{ 745{
746 unsigned long top_of_ram = lmb_end_of_DRAM(); 746 unsigned long top_of_ram = memblock_end_of_DRAM();
747 unsigned long total_ram = lmb_phys_mem_size(); 747 unsigned long total_ram = memblock_phys_mem_size();
748 unsigned long start_pfn, end_pfn; 748 unsigned long start_pfn, end_pfn;
749 unsigned int i, nid = 0; 749 unsigned int i, nid = 0;
750 750
@@ -753,9 +753,9 @@ static void __init setup_nonnuma(void)
753 printk(KERN_DEBUG "Memory hole size: %ldMB\n", 753 printk(KERN_DEBUG "Memory hole size: %ldMB\n",
754 (top_of_ram - total_ram) >> 20); 754 (top_of_ram - total_ram) >> 20);
755 755
756 for (i = 0; i < lmb.memory.cnt; ++i) { 756 for (i = 0; i < memblock.memory.cnt; ++i) {
757 start_pfn = lmb.memory.region[i].base >> PAGE_SHIFT; 757 start_pfn = memblock.memory.region[i].base >> PAGE_SHIFT;
758 end_pfn = start_pfn + lmb_size_pages(&lmb.memory, i); 758 end_pfn = start_pfn + memblock_size_pages(&memblock.memory, i);
759 759
760 fake_numa_create_new_node(end_pfn, &nid); 760 fake_numa_create_new_node(end_pfn, &nid);
761 add_active_range(nid, start_pfn, end_pfn); 761 add_active_range(nid, start_pfn, end_pfn);
@@ -813,7 +813,7 @@ static void __init dump_numa_memory_topology(void)
813 813
814 count = 0; 814 count = 0;
815 815
816 for (i = 0; i < lmb_end_of_DRAM(); 816 for (i = 0; i < memblock_end_of_DRAM();
817 i += (1 << SECTION_SIZE_BITS)) { 817 i += (1 << SECTION_SIZE_BITS)) {
818 if (early_pfn_to_nid(i >> PAGE_SHIFT) == node) { 818 if (early_pfn_to_nid(i >> PAGE_SHIFT) == node) {
819 if (count == 0) 819 if (count == 0)
@@ -833,7 +833,7 @@ static void __init dump_numa_memory_topology(void)
833} 833}
834 834
835/* 835/*
836 * Allocate some memory, satisfying the lmb or bootmem allocator where 836 * Allocate some memory, satisfying the memblock or bootmem allocator where
837 * required. nid is the preferred node and end is the physical address of 837 * required. nid is the preferred node and end is the physical address of
838 * the highest address in the node. 838 * the highest address in the node.
839 * 839 *
@@ -847,11 +847,11 @@ static void __init *careful_zallocation(int nid, unsigned long size,
847 int new_nid; 847 int new_nid;
848 unsigned long ret_paddr; 848 unsigned long ret_paddr;
849 849
850 ret_paddr = __lmb_alloc_base(size, align, end_pfn << PAGE_SHIFT); 850 ret_paddr = __memblock_alloc_base(size, align, end_pfn << PAGE_SHIFT);
851 851
852 /* retry over all memory */ 852 /* retry over all memory */
853 if (!ret_paddr) 853 if (!ret_paddr)
854 ret_paddr = __lmb_alloc_base(size, align, lmb_end_of_DRAM()); 854 ret_paddr = __memblock_alloc_base(size, align, memblock_end_of_DRAM());
855 855
856 if (!ret_paddr) 856 if (!ret_paddr)
857 panic("numa.c: cannot allocate %lu bytes for node %d", 857 panic("numa.c: cannot allocate %lu bytes for node %d",
@@ -861,14 +861,14 @@ static void __init *careful_zallocation(int nid, unsigned long size,
861 861
862 /* 862 /*
863 * We initialize the nodes in numeric order: 0, 1, 2... 863 * We initialize the nodes in numeric order: 0, 1, 2...
864 * and hand over control from the LMB allocator to the 864 * and hand over control from the MEMBLOCK allocator to the
865 * bootmem allocator. If this function is called for 865 * bootmem allocator. If this function is called for
866 * node 5, then we know that all nodes <5 are using the 866 * node 5, then we know that all nodes <5 are using the
867 * bootmem allocator instead of the LMB allocator. 867 * bootmem allocator instead of the MEMBLOCK allocator.
868 * 868 *
869 * So, check the nid from which this allocation came 869 * So, check the nid from which this allocation came
870 * and double check to see if we need to use bootmem 870 * and double check to see if we need to use bootmem
871 * instead of the LMB. We don't free the LMB memory 871 * instead of the MEMBLOCK. We don't free the MEMBLOCK memory
872 * since it would be useless. 872 * since it would be useless.
873 */ 873 */
874 new_nid = early_pfn_to_nid(ret_paddr >> PAGE_SHIFT); 874 new_nid = early_pfn_to_nid(ret_paddr >> PAGE_SHIFT);
@@ -893,9 +893,9 @@ static void mark_reserved_regions_for_nid(int nid)
893 struct pglist_data *node = NODE_DATA(nid); 893 struct pglist_data *node = NODE_DATA(nid);
894 int i; 894 int i;
895 895
896 for (i = 0; i < lmb.reserved.cnt; i++) { 896 for (i = 0; i < memblock.reserved.cnt; i++) {
897 unsigned long physbase = lmb.reserved.region[i].base; 897 unsigned long physbase = memblock.reserved.region[i].base;
898 unsigned long size = lmb.reserved.region[i].size; 898 unsigned long size = memblock.reserved.region[i].size;
899 unsigned long start_pfn = physbase >> PAGE_SHIFT; 899 unsigned long start_pfn = physbase >> PAGE_SHIFT;
900 unsigned long end_pfn = PFN_UP(physbase + size); 900 unsigned long end_pfn = PFN_UP(physbase + size);
901 struct node_active_region node_ar; 901 struct node_active_region node_ar;
@@ -903,7 +903,7 @@ static void mark_reserved_regions_for_nid(int nid)
903 node->node_spanned_pages; 903 node->node_spanned_pages;
904 904
905 /* 905 /*
906 * Check to make sure that this lmb.reserved area is 906 * Check to make sure that this memblock.reserved area is
907 * within the bounds of the node that we care about. 907 * within the bounds of the node that we care about.
908 * Checking the nid of the start and end points is not 908 * Checking the nid of the start and end points is not
909 * sufficient because the reserved area could span the 909 * sufficient because the reserved area could span the
@@ -961,7 +961,7 @@ void __init do_init_bootmem(void)
961 int nid; 961 int nid;
962 962
963 min_low_pfn = 0; 963 min_low_pfn = 0;
964 max_low_pfn = lmb_end_of_DRAM() >> PAGE_SHIFT; 964 max_low_pfn = memblock_end_of_DRAM() >> PAGE_SHIFT;
965 max_pfn = max_low_pfn; 965 max_pfn = max_low_pfn;
966 966
967 if (parse_numa_properties()) 967 if (parse_numa_properties())
@@ -1038,7 +1038,7 @@ void __init paging_init(void)
1038{ 1038{
1039 unsigned long max_zone_pfns[MAX_NR_ZONES]; 1039 unsigned long max_zone_pfns[MAX_NR_ZONES];
1040 memset(max_zone_pfns, 0, sizeof(max_zone_pfns)); 1040 memset(max_zone_pfns, 0, sizeof(max_zone_pfns));
1041 max_zone_pfns[ZONE_DMA] = lmb_end_of_DRAM() >> PAGE_SHIFT; 1041 max_zone_pfns[ZONE_DMA] = memblock_end_of_DRAM() >> PAGE_SHIFT;
1042 free_area_init_nodes(max_zone_pfns); 1042 free_area_init_nodes(max_zone_pfns);
1043} 1043}
1044 1044
@@ -1072,7 +1072,7 @@ static int hot_add_drconf_scn_to_nid(struct device_node *memory,
1072{ 1072{
1073 const u32 *dm; 1073 const u32 *dm;
1074 unsigned int drconf_cell_cnt, rc; 1074 unsigned int drconf_cell_cnt, rc;
1075 unsigned long lmb_size; 1075 unsigned long memblock_size;
1076 struct assoc_arrays aa; 1076 struct assoc_arrays aa;
1077 int nid = -1; 1077 int nid = -1;
1078 1078
@@ -1080,8 +1080,8 @@ static int hot_add_drconf_scn_to_nid(struct device_node *memory,
1080 if (!drconf_cell_cnt) 1080 if (!drconf_cell_cnt)
1081 return -1; 1081 return -1;
1082 1082
1083 lmb_size = of_get_lmb_size(memory); 1083 memblock_size = of_get_memblock_size(memory);
1084 if (!lmb_size) 1084 if (!memblock_size)
1085 return -1; 1085 return -1;
1086 1086
1087 rc = of_get_assoc_arrays(memory, &aa); 1087 rc = of_get_assoc_arrays(memory, &aa);
@@ -1100,7 +1100,7 @@ static int hot_add_drconf_scn_to_nid(struct device_node *memory,
1100 continue; 1100 continue;
1101 1101
1102 if ((scn_addr < drmem.base_addr) 1102 if ((scn_addr < drmem.base_addr)
1103 || (scn_addr >= (drmem.base_addr + lmb_size))) 1103 || (scn_addr >= (drmem.base_addr + memblock_size)))
1104 continue; 1104 continue;
1105 1105
1106 nid = of_drconf_to_nid_single(&drmem, &aa); 1106 nid = of_drconf_to_nid_single(&drmem, &aa);
@@ -1113,7 +1113,7 @@ static int hot_add_drconf_scn_to_nid(struct device_node *memory,
1113/* 1113/*
1114 * Find the node associated with a hot added memory section for memory 1114 * Find the node associated with a hot added memory section for memory
1115 * represented in the device tree as a node (i.e. memory@XXXX) for 1115 * represented in the device tree as a node (i.e. memory@XXXX) for
1116 * each lmb. 1116 * each memblock.
1117 */ 1117 */
1118int hot_add_node_scn_to_nid(unsigned long scn_addr) 1118int hot_add_node_scn_to_nid(unsigned long scn_addr)
1119{ 1119{
@@ -1154,8 +1154,8 @@ int hot_add_node_scn_to_nid(unsigned long scn_addr)
1154 1154
1155/* 1155/*
1156 * Find the node associated with a hot added memory section. Section 1156 * Find the node associated with a hot added memory section. Section
1157 * corresponds to a SPARSEMEM section, not an LMB. It is assumed that 1157 * corresponds to a SPARSEMEM section, not an MEMBLOCK. It is assumed that
1158 * sections are fully contained within a single LMB. 1158 * sections are fully contained within a single MEMBLOCK.
1159 */ 1159 */
1160int hot_add_scn_to_nid(unsigned long scn_addr) 1160int hot_add_scn_to_nid(unsigned long scn_addr)
1161{ 1161{
diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c
index 9fc02dc72ce9..a87ead0138b4 100644
--- a/arch/powerpc/mm/pgtable_32.c
+++ b/arch/powerpc/mm/pgtable_32.c
@@ -26,7 +26,7 @@
26#include <linux/vmalloc.h> 26#include <linux/vmalloc.h>
27#include <linux/init.h> 27#include <linux/init.h>
28#include <linux/highmem.h> 28#include <linux/highmem.h>
29#include <linux/lmb.h> 29#include <linux/memblock.h>
30#include <linux/slab.h> 30#include <linux/slab.h>
31 31
32#include <asm/pgtable.h> 32#include <asm/pgtable.h>
@@ -115,11 +115,7 @@ pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long address)
115{ 115{
116 struct page *ptepage; 116 struct page *ptepage;
117 117
118#ifdef CONFIG_HIGHPTE
119 gfp_t flags = GFP_KERNEL | __GFP_HIGHMEM | __GFP_REPEAT | __GFP_ZERO;
120#else
121 gfp_t flags = GFP_KERNEL | __GFP_REPEAT | __GFP_ZERO; 118 gfp_t flags = GFP_KERNEL | __GFP_REPEAT | __GFP_ZERO;
122#endif
123 119
124 ptepage = alloc_pages(flags, 0); 120 ptepage = alloc_pages(flags, 0);
125 if (!ptepage) 121 if (!ptepage)
@@ -202,7 +198,7 @@ __ioremap_caller(phys_addr_t addr, unsigned long size, unsigned long flags,
202 * mem_init() sets high_memory so only do the check after that. 198 * mem_init() sets high_memory so only do the check after that.
203 */ 199 */
204 if (mem_init_done && (p < virt_to_phys(high_memory)) && 200 if (mem_init_done && (p < virt_to_phys(high_memory)) &&
205 !(__allow_ioremap_reserved && lmb_is_region_reserved(p, size))) { 201 !(__allow_ioremap_reserved && memblock_is_region_reserved(p, size))) {
206 printk("__ioremap(): phys addr 0x%llx is RAM lr %p\n", 202 printk("__ioremap(): phys addr 0x%llx is RAM lr %p\n",
207 (unsigned long long)p, __builtin_return_address(0)); 203 (unsigned long long)p, __builtin_return_address(0));
208 return NULL; 204 return NULL;
@@ -335,7 +331,7 @@ void __init mapin_ram(void)
335 s = mmu_mapin_ram(top); 331 s = mmu_mapin_ram(top);
336 __mapin_ram_chunk(s, top); 332 __mapin_ram_chunk(s, top);
337 333
338 top = lmb_end_of_DRAM(); 334 top = memblock_end_of_DRAM();
339 s = wii_mmu_mapin_mem2(top); 335 s = wii_mmu_mapin_mem2(top);
340 __mapin_ram_chunk(s, top); 336 __mapin_ram_chunk(s, top);
341 } 337 }
diff --git a/arch/powerpc/mm/pgtable_64.c b/arch/powerpc/mm/pgtable_64.c
index d050fc8d9714..21d6dfab7942 100644
--- a/arch/powerpc/mm/pgtable_64.c
+++ b/arch/powerpc/mm/pgtable_64.c
@@ -34,7 +34,7 @@
34#include <linux/vmalloc.h> 34#include <linux/vmalloc.h>
35#include <linux/init.h> 35#include <linux/init.h>
36#include <linux/bootmem.h> 36#include <linux/bootmem.h>
37#include <linux/lmb.h> 37#include <linux/memblock.h>
38#include <linux/slab.h> 38#include <linux/slab.h>
39 39
40#include <asm/pgalloc.h> 40#include <asm/pgalloc.h>
@@ -67,7 +67,7 @@ static void *early_alloc_pgtable(unsigned long size)
67 if (init_bootmem_done) 67 if (init_bootmem_done)
68 pt = __alloc_bootmem(size, size, __pa(MAX_DMA_ADDRESS)); 68 pt = __alloc_bootmem(size, size, __pa(MAX_DMA_ADDRESS));
69 else 69 else
70 pt = __va(lmb_alloc_base(size, size, 70 pt = __va(memblock_alloc_base(size, size,
71 __pa(MAX_DMA_ADDRESS))); 71 __pa(MAX_DMA_ADDRESS)));
72 memset(pt, 0, size); 72 memset(pt, 0, size);
73 73
diff --git a/arch/powerpc/mm/ppc_mmu_32.c b/arch/powerpc/mm/ppc_mmu_32.c
index f11c2cdcb0fe..f8a01829d64f 100644
--- a/arch/powerpc/mm/ppc_mmu_32.c
+++ b/arch/powerpc/mm/ppc_mmu_32.c
@@ -26,7 +26,7 @@
26#include <linux/mm.h> 26#include <linux/mm.h>
27#include <linux/init.h> 27#include <linux/init.h>
28#include <linux/highmem.h> 28#include <linux/highmem.h>
29#include <linux/lmb.h> 29#include <linux/memblock.h>
30 30
31#include <asm/prom.h> 31#include <asm/prom.h>
32#include <asm/mmu.h> 32#include <asm/mmu.h>
@@ -223,7 +223,7 @@ void __init MMU_init_hw(void)
223 * Find some memory for the hash table. 223 * Find some memory for the hash table.
224 */ 224 */
225 if ( ppc_md.progress ) ppc_md.progress("hash:find piece", 0x322); 225 if ( ppc_md.progress ) ppc_md.progress("hash:find piece", 0x322);
226 Hash = __va(lmb_alloc_base(Hash_size, Hash_size, 226 Hash = __va(memblock_alloc_base(Hash_size, Hash_size,
227 __initial_memory_limit_addr)); 227 __initial_memory_limit_addr));
228 cacheable_memzero(Hash, Hash_size); 228 cacheable_memzero(Hash, Hash_size);
229 _SDR1 = __pa(Hash) | SDR1_LOW_BITS; 229 _SDR1 = __pa(Hash) | SDR1_LOW_BITS;
diff --git a/arch/powerpc/mm/stab.c b/arch/powerpc/mm/stab.c
index 687fddaa24c5..446a01842a73 100644
--- a/arch/powerpc/mm/stab.c
+++ b/arch/powerpc/mm/stab.c
@@ -12,7 +12,7 @@
12 * 2 of the License, or (at your option) any later version. 12 * 2 of the License, or (at your option) any later version.
13 */ 13 */
14 14
15#include <linux/lmb.h> 15#include <linux/memblock.h>
16 16
17#include <asm/pgtable.h> 17#include <asm/pgtable.h>
18#include <asm/mmu.h> 18#include <asm/mmu.h>
@@ -252,7 +252,7 @@ void __init stabs_alloc(void)
252 if (cpu == 0) 252 if (cpu == 0)
253 continue; /* stab for CPU 0 is statically allocated */ 253 continue; /* stab for CPU 0 is statically allocated */
254 254
255 newstab = lmb_alloc_base(HW_PAGE_SIZE, HW_PAGE_SIZE, 255 newstab = memblock_alloc_base(HW_PAGE_SIZE, HW_PAGE_SIZE,
256 1<<SID_SHIFT); 256 1<<SID_SHIFT);
257 newstab = (unsigned long)__va(newstab); 257 newstab = (unsigned long)__va(newstab);
258 258
diff --git a/arch/powerpc/mm/tlb_nohash.c b/arch/powerpc/mm/tlb_nohash.c
index e81d5d67f834..d8695b02a968 100644
--- a/arch/powerpc/mm/tlb_nohash.c
+++ b/arch/powerpc/mm/tlb_nohash.c
@@ -34,7 +34,7 @@
34#include <linux/pagemap.h> 34#include <linux/pagemap.h>
35#include <linux/preempt.h> 35#include <linux/preempt.h>
36#include <linux/spinlock.h> 36#include <linux/spinlock.h>
37#include <linux/lmb.h> 37#include <linux/memblock.h>
38 38
39#include <asm/tlbflush.h> 39#include <asm/tlbflush.h>
40#include <asm/tlb.h> 40#include <asm/tlb.h>
@@ -426,7 +426,7 @@ static void __early_init_mmu(int boot_cpu)
426 /* Set the global containing the top of the linear mapping 426 /* Set the global containing the top of the linear mapping
427 * for use by the TLB miss code 427 * for use by the TLB miss code
428 */ 428 */
429 linear_map_top = lmb_end_of_DRAM(); 429 linear_map_top = memblock_end_of_DRAM();
430 430
431 /* A sync won't hurt us after mucking around with 431 /* A sync won't hurt us after mucking around with
432 * the MMU configuration 432 * the MMU configuration
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pm.c b/arch/powerpc/platforms/52xx/mpc52xx_pm.c
index a55b0b6813ed..76722532bd95 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_pm.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_pm.c
@@ -64,10 +64,19 @@ int mpc52xx_pm_prepare(void)
64 { .type = "builtin", .compatible = "mpc5200", }, /* efika */ 64 { .type = "builtin", .compatible = "mpc5200", }, /* efika */
65 {} 65 {}
66 }; 66 };
67 struct resource res;
67 68
68 /* map the whole register space */ 69 /* map the whole register space */
69 np = of_find_matching_node(NULL, immr_ids); 70 np = of_find_matching_node(NULL, immr_ids);
70 mbar = of_iomap(np, 0); 71
72 if (of_address_to_resource(np, 0, &res)) {
73 pr_err("mpc52xx_pm_prepare(): could not get IMMR address\n");
74 of_node_put(np);
75 return -ENOSYS;
76 }
77
78 mbar = ioremap(res.start, 0xc000); /* we should map whole region including SRAM */
79
71 of_node_put(np); 80 of_node_put(np);
72 if (!mbar) { 81 if (!mbar) {
73 pr_err("mpc52xx_pm_prepare(): could not map registers\n"); 82 pr_err("mpc52xx_pm_prepare(): could not map registers\n");
diff --git a/arch/powerpc/platforms/85xx/corenet_ds.c b/arch/powerpc/platforms/85xx/corenet_ds.c
index 534c2ecc89d9..2ab338c9ac37 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 004b7d36cdb7..f79f2f102141 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 544011a562fb..8190bc25bf27 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 8fe87fc61485..494513682d70 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 2aa69a69bcc8..b11c3535f350 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 4326b737d913..3712900471ba 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 174a04ac4806..5cdcc7c8d973 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
66void __init wii_memory_fixups(void) 66void __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/iseries/pci.c b/arch/powerpc/platforms/iseries/pci.c
index 3fc2e6494b8b..ab3962b0d246 100644
--- a/arch/powerpc/platforms/iseries/pci.c
+++ b/arch/powerpc/platforms/iseries/pci.c
@@ -445,7 +445,11 @@ void __init iSeries_pcibios_fixup_resources(struct pci_dev *pdev)
445 } 445 }
446 446
447 allocate_device_bars(pdev); 447 allocate_device_bars(pdev);
448 iseries_device_information(pdev, bus, *sub_bus); 448 if (likely(sub_bus))
449 iseries_device_information(pdev, bus, *sub_bus);
450 else
451 printk(KERN_ERR "PCI: Device node %s has missing or invalid "
452 "linux,subbus property\n", node->full_name);
449} 453}
450 454
451/* 455/*
diff --git a/arch/powerpc/platforms/maple/setup.c b/arch/powerpc/platforms/maple/setup.c
index 39df70529d29..3fff8d979b41 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 7b1d608ea3c8..1f9fb2c57761 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 f1d0132ebcc7..9deb274841f1 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 1e8a1e39dfe8..2c0ed87f2024 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 7925751e464a..c2045880e674 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 dd521a181f23..5b759b669598 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 01e7b5bb3c1d..deab5f946090 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
20static int pseries_remove_lmb(unsigned long base, unsigned int lmb_size) 20static 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
128static int pseries_drconf_memory(unsigned long *base, unsigned int action) 128static 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 d26182d42cbf..395848e30c52 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 7ebd9e88d369..6e7742da0072 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 */
266static void release_memory_range(unsigned long start_pfn, 266static void release_memory_range(unsigned long start_pfn,
diff --git a/arch/powerpc/sysdev/dart_iommu.c b/arch/powerpc/sysdev/dart_iommu.c
index c8b96ed7c015..559db2b846a9 100644
--- a/arch/powerpc/sysdev/dart_iommu.c
+++ b/arch/powerpc/sysdev/dart_iommu.c
@@ -36,7 +36,7 @@
36#include <linux/dma-mapping.h> 36#include <linux/dma-mapping.h>
37#include <linux/vmalloc.h> 37#include <linux/vmalloc.h>
38#include <linux/suspend.h> 38#include <linux/suspend.h>
39#include <linux/lmb.h> 39#include <linux/memblock.h>
40#include <linux/gfp.h> 40#include <linux/gfp.h>
41#include <asm/io.h> 41#include <asm/io.h>
42#include <asm/prom.h> 42#include <asm/prom.h>
@@ -232,7 +232,7 @@ static int __init dart_init(struct device_node *dart_node)
232 * that to work around what looks like a problem with the HT bridge 232 * that to work around what looks like a problem with the HT bridge
233 * prefetching into invalid pages and corrupting data 233 * prefetching into invalid pages and corrupting data
234 */ 234 */
235 tmp = lmb_alloc(DART_PAGE_SIZE, DART_PAGE_SIZE); 235 tmp = memblock_alloc(DART_PAGE_SIZE, DART_PAGE_SIZE);
236 dart_emptyval = DARTMAP_VALID | ((tmp >> DART_PAGE_SHIFT) & 236 dart_emptyval = DARTMAP_VALID | ((tmp >> DART_PAGE_SHIFT) &
237 DARTMAP_RPNMASK); 237 DARTMAP_RPNMASK);
238 238
@@ -407,7 +407,7 @@ void __init alloc_dart_table(void)
407 if (iommu_is_off) 407 if (iommu_is_off)
408 return; 408 return;
409 409
410 if (!iommu_force_on && lmb_end_of_DRAM() <= 0x40000000ull) 410 if (!iommu_force_on && memblock_end_of_DRAM() <= 0x40000000ull)
411 return; 411 return;
412 412
413 /* 512 pages (2MB) is max DART tablesize. */ 413 /* 512 pages (2MB) is max DART tablesize. */
@@ -416,7 +416,7 @@ void __init alloc_dart_table(void)
416 * will blow up an entire large page anyway in the kernel mapping 416 * will blow up an entire large page anyway in the kernel mapping
417 */ 417 */
418 dart_tablebase = (unsigned long) 418 dart_tablebase = (unsigned long)
419 abs_to_virt(lmb_alloc_base(1UL<<24, 1UL<<24, 0x80000000L)); 419 abs_to_virt(memblock_alloc_base(1UL<<24, 1UL<<24, 0x80000000L));
420 420
421 printk(KERN_INFO "DART table allocated at: %lx\n", dart_tablebase); 421 printk(KERN_INFO "DART table allocated at: %lx\n", dart_tablebase);
422} 422}
diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c
index a14760fe513a..356c6a0e1b23 100644
--- a/arch/powerpc/sysdev/fsl_pci.c
+++ b/arch/powerpc/sysdev/fsl_pci.c
@@ -23,7 +23,7 @@
23#include <linux/string.h> 23#include <linux/string.h>
24#include <linux/init.h> 24#include <linux/init.h>
25#include <linux/bootmem.h> 25#include <linux/bootmem.h>
26#include <linux/lmb.h> 26#include <linux/memblock.h>
27#include <linux/log2.h> 27#include <linux/log2.h>
28#include <linux/slab.h> 28#include <linux/slab.h>
29 29
@@ -190,7 +190,7 @@ static void __init setup_pci_atmu(struct pci_controller *hose,
190 pr_info("%s: PCICSRBAR @ 0x%x\n", name, pcicsrbar); 190 pr_info("%s: PCICSRBAR @ 0x%x\n", name, pcicsrbar);
191 191
192 /* Setup inbound mem window */ 192 /* Setup inbound mem window */
193 mem = lmb_end_of_DRAM(); 193 mem = memblock_end_of_DRAM();
194 sz = min(mem, paddr_lo); 194 sz = min(mem, paddr_lo);
195 mem_log = __ilog2_u64(sz); 195 mem_log = __ilog2_u64(sz);
196 196
diff --git a/arch/powerpc/sysdev/micropatch.c b/arch/powerpc/sysdev/micropatch.c
index d8d602840757..c0bb76ef7242 100644
--- a/arch/powerpc/sysdev/micropatch.c
+++ b/arch/powerpc/sysdev/micropatch.c
@@ -4,6 +4,7 @@
4 * also relocates SMC2, but this would require additional changes 4 * also relocates SMC2, but this would require additional changes
5 * to uart.c, so I am holding off on that for a moment. 5 * to uart.c, so I am holding off on that for a moment.
6 */ 6 */
7#include <linux/init.h>
7#include <linux/errno.h> 8#include <linux/errno.h>
8#include <linux/sched.h> 9#include <linux/sched.h>
9#include <linux/kernel.h> 10#include <linux/kernel.h>
@@ -16,6 +17,7 @@
16#include <asm/page.h> 17#include <asm/page.h>
17#include <asm/pgtable.h> 18#include <asm/pgtable.h>
18#include <asm/8xx_immap.h> 19#include <asm/8xx_immap.h>
20#include <asm/cpm.h>
19#include <asm/cpm1.h> 21#include <asm/cpm1.h>
20 22
21/* 23/*
@@ -24,7 +26,7 @@
24 26
25#ifdef CONFIG_I2C_SPI_UCODE_PATCH 27#ifdef CONFIG_I2C_SPI_UCODE_PATCH
26 28
27uint patch_2000[] = { 29static uint patch_2000[] __initdata = {
28 0x7FFFEFD9, 30 0x7FFFEFD9,
29 0x3FFD0000, 31 0x3FFD0000,
30 0x7FFB49F7, 32 0x7FFB49F7,
@@ -143,7 +145,7 @@ uint patch_2000[] = {
143 0x5F8247F8 145 0x5F8247F8
144}; 146};
145 147
146uint patch_2f00[] = { 148static uint patch_2f00[] __initdata = {
147 0x3E303430, 149 0x3E303430,
148 0x34343737, 150 0x34343737,
149 0xABF7BF9B, 151 0xABF7BF9B,
@@ -182,7 +184,7 @@ uint patch_2f00[] = {
182 184
183#ifdef CONFIG_I2C_SPI_SMC1_UCODE_PATCH 185#ifdef CONFIG_I2C_SPI_SMC1_UCODE_PATCH
184 186
185uint patch_2000[] = { 187static uint patch_2000[] __initdata = {
186 0x3fff0000, 188 0x3fff0000,
187 0x3ffd0000, 189 0x3ffd0000,
188 0x3ffb0000, 190 0x3ffb0000,
@@ -505,7 +507,7 @@ uint patch_2000[] = {
505 0x6079e2bb 507 0x6079e2bb
506}; 508};
507 509
508uint patch_2f00[] = { 510static uint patch_2f00[] __initdata = {
509 0x30303030, 511 0x30303030,
510 0x3e3e3434, 512 0x3e3e3434,
511 0xabbf9b99, 513 0xabbf9b99,
@@ -572,7 +574,7 @@ uint patch_2f00[] = {
572 0xf22f3f23 574 0xf22f3f23
573}; 575};
574 576
575uint patch_2e00[] = { 577static uint patch_2e00[] __initdata = {
576 0x27eeeeee, 578 0x27eeeeee,
577 0xeeeeeeee, 579 0xeeeeeeee,
578 0xeeeeeeee, 580 0xeeeeeeee,
@@ -598,7 +600,7 @@ uint patch_2e00[] = {
598 600
599#ifdef CONFIG_USB_SOF_UCODE_PATCH 601#ifdef CONFIG_USB_SOF_UCODE_PATCH
600 602
601uint patch_2000[] = { 603static uint patch_2000[] __initdata = {
602 0x7fff0000, 604 0x7fff0000,
603 0x7ffd0000, 605 0x7ffd0000,
604 0x7ffb0000, 606 0x7ffb0000,
@@ -613,21 +615,25 @@ uint patch_2000[] = {
613 0x60750000 615 0x60750000
614}; 616};
615 617
616uint patch_2f00[] = { 618static uint patch_2f00[] __initdata = {
617 0x3030304c, 619 0x3030304c,
618 0xcab9e441, 620 0xcab9e441,
619 0xa1aaf220 621 0xa1aaf220
620}; 622};
621#endif 623#endif
622 624
623void 625void __init cpm_load_patch(cpm8xx_t *cp)
624cpm_load_patch(cpm8xx_t *cp)
625{ 626{
626 volatile uint *dp; /* Dual-ported RAM. */ 627 volatile uint *dp; /* Dual-ported RAM. */
627 volatile cpm8xx_t *commproc; 628 volatile cpm8xx_t *commproc;
629#if defined(CONFIG_I2C_SPI_UCODE_PATCH) || \
630 defined(CONFIG_I2C_SPI_SMC1_UCODE_PATCH)
628 volatile iic_t *iip; 631 volatile iic_t *iip;
629 volatile spi_t *spp; 632 volatile struct spi_pram *spp;
633#ifdef CONFIG_I2C_SPI_SMC1_UCODE_PATCH
630 volatile smc_uart_t *smp; 634 volatile smc_uart_t *smp;
635#endif
636#endif
631 int i; 637 int i;
632 638
633 commproc = cp; 639 commproc = cp;
@@ -668,8 +674,8 @@ cpm_load_patch(cpm8xx_t *cp)
668 /* Put SPI above the IIC, also 32-byte aligned. 674 /* Put SPI above the IIC, also 32-byte aligned.
669 */ 675 */
670 i = (RPBASE + sizeof(iic_t) + 31) & ~31; 676 i = (RPBASE + sizeof(iic_t) + 31) & ~31;
671 spp = (spi_t *)&commproc->cp_dparam[PROFF_SPI]; 677 spp = (struct spi_pram *)&commproc->cp_dparam[PROFF_SPI];
672 spp->spi_rpbase = i; 678 spp->rpbase = i;
673 679
674# if defined(CONFIG_I2C_SPI_UCODE_PATCH) 680# if defined(CONFIG_I2C_SPI_UCODE_PATCH)
675 commproc->cp_cpmcr1 = 0x802a; 681 commproc->cp_cpmcr1 = 0x802a;
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index 2102487612a4..20b73c025a45 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -1666,7 +1666,7 @@ static int mpic_resume(struct sys_device *dev)
1666 mpic->save_data[i].dest); 1666 mpic->save_data[i].dest);
1667 1667
1668#ifdef CONFIG_MPIC_U3_HT_IRQS 1668#ifdef CONFIG_MPIC_U3_HT_IRQS
1669 { 1669 if (mpic->fixups) {
1670 struct mpic_irq_fixup *fixup = &mpic->fixups[i]; 1670 struct mpic_irq_fixup *fixup = &mpic->fixups[i];
1671 1671
1672 if (fixup->base) { 1672 if (fixup->base) {