aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-09-11 19:49:56 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-09-11 19:49:56 -0400
commit018cace21b8318bd322c316dd01357febff139fc (patch)
tree5ce24082532a697ac53a173492cbcc8084b4a1b5 /arch
parent8381e57a6e1969e103130418622d13dc579fbab3 (diff)
parent7d59deb50aafbdc01b52aed209d202d827261cb0 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux
Pull powerpc fixes from Michael Ellerman: "Ben's travelling so this is my first attempt at a pull request. There's nothing too exciting. The CONFIG_FHANDLE one is annoying, I know you love defconfig changes. But we've had a couple of developers waste time debugging boxes that wouldn't boot, only to realise it's just that systemd needs CONFIG_FHANDLE and our defconfigs don't have it. The new syscalls seem to be working, I've run the selftests that exist, and also let trinity bash on them for a while" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux: powerpc: Wire up sys_seccomp(), sys_getrandom() and sys_memfd_create() powerpc: Make CONFIG_FHANDLE=y for all 64 bit powerpc defconfigs powerpc: use machine_subsys_initcall() for opal_hmi_handler_init() powerpc/perf: Fix ABIv2 kernel backtraces powerpc/pseries: Fix endian issues in memory hotplug
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/configs/cell_defconfig1
-rw-r--r--arch/powerpc/configs/celleb_defconfig1
-rw-r--r--arch/powerpc/configs/corenet64_smp_defconfig1
-rw-r--r--arch/powerpc/configs/g5_defconfig1
-rw-r--r--arch/powerpc/configs/maple_defconfig1
-rw-r--r--arch/powerpc/configs/pasemi_defconfig1
-rw-r--r--arch/powerpc/configs/ppc64_defconfig1
-rw-r--r--arch/powerpc/configs/ppc64e_defconfig1
-rw-r--r--arch/powerpc/configs/ps3_defconfig1
-rw-r--r--arch/powerpc/configs/pseries_defconfig1
-rw-r--r--arch/powerpc/configs/pseries_le_defconfig1
-rw-r--r--arch/powerpc/include/asm/ptrace.h7
-rw-r--r--arch/powerpc/include/asm/systbl.h3
-rw-r--r--arch/powerpc/include/asm/unistd.h2
-rw-r--r--arch/powerpc/include/uapi/asm/unistd.h3
-rw-r--r--arch/powerpc/perf/callchain.c2
-rw-r--r--arch/powerpc/platforms/powernv/opal-hmi.c3
-rw-r--r--arch/powerpc/platforms/pseries/hotplug-memory.c36
18 files changed, 47 insertions, 20 deletions
diff --git a/arch/powerpc/configs/cell_defconfig b/arch/powerpc/configs/cell_defconfig
index 4bee1a6d41d0..45fd06cdc3e8 100644
--- a/arch/powerpc/configs/cell_defconfig
+++ b/arch/powerpc/configs/cell_defconfig
@@ -5,6 +5,7 @@ CONFIG_SMP=y
5CONFIG_NR_CPUS=4 5CONFIG_NR_CPUS=4
6CONFIG_EXPERIMENTAL=y 6CONFIG_EXPERIMENTAL=y
7CONFIG_SYSVIPC=y 7CONFIG_SYSVIPC=y
8CONFIG_FHANDLE=y
8CONFIG_IKCONFIG=y 9CONFIG_IKCONFIG=y
9CONFIG_IKCONFIG_PROC=y 10CONFIG_IKCONFIG_PROC=y
10CONFIG_LOG_BUF_SHIFT=15 11CONFIG_LOG_BUF_SHIFT=15
diff --git a/arch/powerpc/configs/celleb_defconfig b/arch/powerpc/configs/celleb_defconfig
index 6d7b22f41b50..77d7bf3ca2ac 100644
--- a/arch/powerpc/configs/celleb_defconfig
+++ b/arch/powerpc/configs/celleb_defconfig
@@ -5,6 +5,7 @@ CONFIG_SMP=y
5CONFIG_NR_CPUS=4 5CONFIG_NR_CPUS=4
6CONFIG_EXPERIMENTAL=y 6CONFIG_EXPERIMENTAL=y
7CONFIG_SYSVIPC=y 7CONFIG_SYSVIPC=y
8CONFIG_FHANDLE=y
8CONFIG_IKCONFIG=y 9CONFIG_IKCONFIG=y
9CONFIG_IKCONFIG_PROC=y 10CONFIG_IKCONFIG_PROC=y
10CONFIG_LOG_BUF_SHIFT=15 11CONFIG_LOG_BUF_SHIFT=15
diff --git a/arch/powerpc/configs/corenet64_smp_defconfig b/arch/powerpc/configs/corenet64_smp_defconfig
index 4b07bade1ba9..269d6e47c67d 100644
--- a/arch/powerpc/configs/corenet64_smp_defconfig
+++ b/arch/powerpc/configs/corenet64_smp_defconfig
@@ -4,6 +4,7 @@ CONFIG_ALTIVEC=y
4CONFIG_SMP=y 4CONFIG_SMP=y
5CONFIG_NR_CPUS=24 5CONFIG_NR_CPUS=24
6CONFIG_SYSVIPC=y 6CONFIG_SYSVIPC=y
7CONFIG_FHANDLE=y
7CONFIG_IRQ_DOMAIN_DEBUG=y 8CONFIG_IRQ_DOMAIN_DEBUG=y
8CONFIG_NO_HZ=y 9CONFIG_NO_HZ=y
9CONFIG_HIGH_RES_TIMERS=y 10CONFIG_HIGH_RES_TIMERS=y
diff --git a/arch/powerpc/configs/g5_defconfig b/arch/powerpc/configs/g5_defconfig
index 3c72fa615bd9..7594c5ac6481 100644
--- a/arch/powerpc/configs/g5_defconfig
+++ b/arch/powerpc/configs/g5_defconfig
@@ -5,6 +5,7 @@ CONFIG_NR_CPUS=4
5CONFIG_EXPERIMENTAL=y 5CONFIG_EXPERIMENTAL=y
6CONFIG_SYSVIPC=y 6CONFIG_SYSVIPC=y
7CONFIG_POSIX_MQUEUE=y 7CONFIG_POSIX_MQUEUE=y
8CONFIG_FHANDLE=y
8CONFIG_IKCONFIG=y 9CONFIG_IKCONFIG=y
9CONFIG_IKCONFIG_PROC=y 10CONFIG_IKCONFIG_PROC=y
10CONFIG_BLK_DEV_INITRD=y 11CONFIG_BLK_DEV_INITRD=y
diff --git a/arch/powerpc/configs/maple_defconfig b/arch/powerpc/configs/maple_defconfig
index 95e545d9f25c..c8b6a9ddb21b 100644
--- a/arch/powerpc/configs/maple_defconfig
+++ b/arch/powerpc/configs/maple_defconfig
@@ -4,6 +4,7 @@ CONFIG_NR_CPUS=4
4CONFIG_EXPERIMENTAL=y 4CONFIG_EXPERIMENTAL=y
5CONFIG_SYSVIPC=y 5CONFIG_SYSVIPC=y
6CONFIG_POSIX_MQUEUE=y 6CONFIG_POSIX_MQUEUE=y
7CONFIG_FHANDLE=y
7CONFIG_IKCONFIG=y 8CONFIG_IKCONFIG=y
8CONFIG_IKCONFIG_PROC=y 9CONFIG_IKCONFIG_PROC=y
9# CONFIG_COMPAT_BRK is not set 10# CONFIG_COMPAT_BRK is not set
diff --git a/arch/powerpc/configs/pasemi_defconfig b/arch/powerpc/configs/pasemi_defconfig
index cec044a3ff69..e5e7838af008 100644
--- a/arch/powerpc/configs/pasemi_defconfig
+++ b/arch/powerpc/configs/pasemi_defconfig
@@ -3,6 +3,7 @@ CONFIG_ALTIVEC=y
3CONFIG_SMP=y 3CONFIG_SMP=y
4CONFIG_NR_CPUS=2 4CONFIG_NR_CPUS=2
5CONFIG_SYSVIPC=y 5CONFIG_SYSVIPC=y
6CONFIG_FHANDLE=y
6CONFIG_NO_HZ=y 7CONFIG_NO_HZ=y
7CONFIG_HIGH_RES_TIMERS=y 8CONFIG_HIGH_RES_TIMERS=y
8CONFIG_BLK_DEV_INITRD=y 9CONFIG_BLK_DEV_INITRD=y
diff --git a/arch/powerpc/configs/ppc64_defconfig b/arch/powerpc/configs/ppc64_defconfig
index f26b267eb71f..f6c02f8cdc62 100644
--- a/arch/powerpc/configs/ppc64_defconfig
+++ b/arch/powerpc/configs/ppc64_defconfig
@@ -4,6 +4,7 @@ CONFIG_VSX=y
4CONFIG_SMP=y 4CONFIG_SMP=y
5CONFIG_SYSVIPC=y 5CONFIG_SYSVIPC=y
6CONFIG_POSIX_MQUEUE=y 6CONFIG_POSIX_MQUEUE=y
7CONFIG_FHANDLE=y
7CONFIG_IRQ_DOMAIN_DEBUG=y 8CONFIG_IRQ_DOMAIN_DEBUG=y
8CONFIG_NO_HZ=y 9CONFIG_NO_HZ=y
9CONFIG_HIGH_RES_TIMERS=y 10CONFIG_HIGH_RES_TIMERS=y
diff --git a/arch/powerpc/configs/ppc64e_defconfig b/arch/powerpc/configs/ppc64e_defconfig
index 438e813dc9cb..587f5514f9b1 100644
--- a/arch/powerpc/configs/ppc64e_defconfig
+++ b/arch/powerpc/configs/ppc64e_defconfig
@@ -3,6 +3,7 @@ CONFIG_PPC_BOOK3E_64=y
3CONFIG_SMP=y 3CONFIG_SMP=y
4CONFIG_SYSVIPC=y 4CONFIG_SYSVIPC=y
5CONFIG_POSIX_MQUEUE=y 5CONFIG_POSIX_MQUEUE=y
6CONFIG_FHANDLE=y
6CONFIG_NO_HZ=y 7CONFIG_NO_HZ=y
7CONFIG_HIGH_RES_TIMERS=y 8CONFIG_HIGH_RES_TIMERS=y
8CONFIG_TASKSTATS=y 9CONFIG_TASKSTATS=y
diff --git a/arch/powerpc/configs/ps3_defconfig b/arch/powerpc/configs/ps3_defconfig
index fdee37fab81c..2e637c881d2b 100644
--- a/arch/powerpc/configs/ps3_defconfig
+++ b/arch/powerpc/configs/ps3_defconfig
@@ -5,6 +5,7 @@ CONFIG_SMP=y
5CONFIG_NR_CPUS=2 5CONFIG_NR_CPUS=2
6CONFIG_SYSVIPC=y 6CONFIG_SYSVIPC=y
7CONFIG_POSIX_MQUEUE=y 7CONFIG_POSIX_MQUEUE=y
8CONFIG_FHANDLE=y
8CONFIG_HIGH_RES_TIMERS=y 9CONFIG_HIGH_RES_TIMERS=y
9CONFIG_BLK_DEV_INITRD=y 10CONFIG_BLK_DEV_INITRD=y
10CONFIG_RD_LZMA=y 11CONFIG_RD_LZMA=y
diff --git a/arch/powerpc/configs/pseries_defconfig b/arch/powerpc/configs/pseries_defconfig
index a905063281cc..50375f1f59e7 100644
--- a/arch/powerpc/configs/pseries_defconfig
+++ b/arch/powerpc/configs/pseries_defconfig
@@ -5,6 +5,7 @@ CONFIG_SMP=y
5CONFIG_NR_CPUS=2048 5CONFIG_NR_CPUS=2048
6CONFIG_SYSVIPC=y 6CONFIG_SYSVIPC=y
7CONFIG_POSIX_MQUEUE=y 7CONFIG_POSIX_MQUEUE=y
8CONFIG_FHANDLE=y
8CONFIG_AUDIT=y 9CONFIG_AUDIT=y
9CONFIG_AUDITSYSCALL=y 10CONFIG_AUDITSYSCALL=y
10CONFIG_IRQ_DOMAIN_DEBUG=y 11CONFIG_IRQ_DOMAIN_DEBUG=y
diff --git a/arch/powerpc/configs/pseries_le_defconfig b/arch/powerpc/configs/pseries_le_defconfig
index 58e3dbf43ca4..4428ee428f4e 100644
--- a/arch/powerpc/configs/pseries_le_defconfig
+++ b/arch/powerpc/configs/pseries_le_defconfig
@@ -6,6 +6,7 @@ CONFIG_NR_CPUS=2048
6CONFIG_CPU_LITTLE_ENDIAN=y 6CONFIG_CPU_LITTLE_ENDIAN=y
7CONFIG_SYSVIPC=y 7CONFIG_SYSVIPC=y
8CONFIG_POSIX_MQUEUE=y 8CONFIG_POSIX_MQUEUE=y
9CONFIG_FHANDLE=y
9CONFIG_AUDIT=y 10CONFIG_AUDIT=y
10CONFIG_AUDITSYSCALL=y 11CONFIG_AUDITSYSCALL=y
11CONFIG_IRQ_DOMAIN_DEBUG=y 12CONFIG_IRQ_DOMAIN_DEBUG=y
diff --git a/arch/powerpc/include/asm/ptrace.h b/arch/powerpc/include/asm/ptrace.h
index 279b80f3bb29..c0c61fa9cd9e 100644
--- a/arch/powerpc/include/asm/ptrace.h
+++ b/arch/powerpc/include/asm/ptrace.h
@@ -47,6 +47,12 @@
47 STACK_FRAME_OVERHEAD + KERNEL_REDZONE_SIZE) 47 STACK_FRAME_OVERHEAD + KERNEL_REDZONE_SIZE)
48#define STACK_FRAME_MARKER 12 48#define STACK_FRAME_MARKER 12
49 49
50#if defined(_CALL_ELF) && _CALL_ELF == 2
51#define STACK_FRAME_MIN_SIZE 32
52#else
53#define STACK_FRAME_MIN_SIZE STACK_FRAME_OVERHEAD
54#endif
55
50/* Size of dummy stack frame allocated when calling signal handler. */ 56/* Size of dummy stack frame allocated when calling signal handler. */
51#define __SIGNAL_FRAMESIZE 128 57#define __SIGNAL_FRAMESIZE 128
52#define __SIGNAL_FRAMESIZE32 64 58#define __SIGNAL_FRAMESIZE32 64
@@ -60,6 +66,7 @@
60#define STACK_FRAME_REGS_MARKER ASM_CONST(0x72656773) 66#define STACK_FRAME_REGS_MARKER ASM_CONST(0x72656773)
61#define STACK_INT_FRAME_SIZE (sizeof(struct pt_regs) + STACK_FRAME_OVERHEAD) 67#define STACK_INT_FRAME_SIZE (sizeof(struct pt_regs) + STACK_FRAME_OVERHEAD)
62#define STACK_FRAME_MARKER 2 68#define STACK_FRAME_MARKER 2
69#define STACK_FRAME_MIN_SIZE STACK_FRAME_OVERHEAD
63 70
64/* Size of stack frame allocated when calling signal handler. */ 71/* Size of stack frame allocated when calling signal handler. */
65#define __SIGNAL_FRAMESIZE 64 72#define __SIGNAL_FRAMESIZE 64
diff --git a/arch/powerpc/include/asm/systbl.h b/arch/powerpc/include/asm/systbl.h
index 542bc0f0673f..7d8a60068805 100644
--- a/arch/powerpc/include/asm/systbl.h
+++ b/arch/powerpc/include/asm/systbl.h
@@ -362,3 +362,6 @@ SYSCALL(ni_syscall) /* sys_kcmp */
362SYSCALL_SPU(sched_setattr) 362SYSCALL_SPU(sched_setattr)
363SYSCALL_SPU(sched_getattr) 363SYSCALL_SPU(sched_getattr)
364SYSCALL_SPU(renameat2) 364SYSCALL_SPU(renameat2)
365SYSCALL_SPU(seccomp)
366SYSCALL_SPU(getrandom)
367SYSCALL_SPU(memfd_create)
diff --git a/arch/powerpc/include/asm/unistd.h b/arch/powerpc/include/asm/unistd.h
index 5ce5552ab9f5..4e9af3fd43e7 100644
--- a/arch/powerpc/include/asm/unistd.h
+++ b/arch/powerpc/include/asm/unistd.h
@@ -12,7 +12,7 @@
12#include <uapi/asm/unistd.h> 12#include <uapi/asm/unistd.h>
13 13
14 14
15#define __NR_syscalls 358 15#define __NR_syscalls 361
16 16
17#define __NR__exit __NR_exit 17#define __NR__exit __NR_exit
18#define NR_syscalls __NR_syscalls 18#define NR_syscalls __NR_syscalls
diff --git a/arch/powerpc/include/uapi/asm/unistd.h b/arch/powerpc/include/uapi/asm/unistd.h
index 2d526f7b48da..0688fc06e183 100644
--- a/arch/powerpc/include/uapi/asm/unistd.h
+++ b/arch/powerpc/include/uapi/asm/unistd.h
@@ -380,5 +380,8 @@
380#define __NR_sched_setattr 355 380#define __NR_sched_setattr 355
381#define __NR_sched_getattr 356 381#define __NR_sched_getattr 356
382#define __NR_renameat2 357 382#define __NR_renameat2 357
383#define __NR_seccomp 358
384#define __NR_getrandom 359
385#define __NR_memfd_create 360
383 386
384#endif /* _UAPI_ASM_POWERPC_UNISTD_H_ */ 387#endif /* _UAPI_ASM_POWERPC_UNISTD_H_ */
diff --git a/arch/powerpc/perf/callchain.c b/arch/powerpc/perf/callchain.c
index 74d1e780748b..2396dda282cd 100644
--- a/arch/powerpc/perf/callchain.c
+++ b/arch/powerpc/perf/callchain.c
@@ -35,7 +35,7 @@ static int valid_next_sp(unsigned long sp, unsigned long prev_sp)
35 return 0; /* must be 16-byte aligned */ 35 return 0; /* must be 16-byte aligned */
36 if (!validate_sp(sp, current, STACK_FRAME_OVERHEAD)) 36 if (!validate_sp(sp, current, STACK_FRAME_OVERHEAD))
37 return 0; 37 return 0;
38 if (sp >= prev_sp + STACK_FRAME_OVERHEAD) 38 if (sp >= prev_sp + STACK_FRAME_MIN_SIZE)
39 return 1; 39 return 1;
40 /* 40 /*
41 * sp could decrease when we jump off an interrupt stack 41 * sp could decrease when we jump off an interrupt stack
diff --git a/arch/powerpc/platforms/powernv/opal-hmi.c b/arch/powerpc/platforms/powernv/opal-hmi.c
index 97ac8dc33667..5e1ed1575aab 100644
--- a/arch/powerpc/platforms/powernv/opal-hmi.c
+++ b/arch/powerpc/platforms/powernv/opal-hmi.c
@@ -28,6 +28,7 @@
28 28
29#include <asm/opal.h> 29#include <asm/opal.h>
30#include <asm/cputable.h> 30#include <asm/cputable.h>
31#include <asm/machdep.h>
31 32
32static int opal_hmi_handler_nb_init; 33static int opal_hmi_handler_nb_init;
33struct OpalHmiEvtNode { 34struct OpalHmiEvtNode {
@@ -185,4 +186,4 @@ static int __init opal_hmi_handler_init(void)
185 } 186 }
186 return 0; 187 return 0;
187} 188}
188subsys_initcall(opal_hmi_handler_init); 189machine_subsys_initcall(powernv, opal_hmi_handler_init);
diff --git a/arch/powerpc/platforms/pseries/hotplug-memory.c b/arch/powerpc/platforms/pseries/hotplug-memory.c
index c904583baf4b..17ee193960a0 100644
--- a/arch/powerpc/platforms/pseries/hotplug-memory.c
+++ b/arch/powerpc/platforms/pseries/hotplug-memory.c
@@ -113,7 +113,7 @@ out:
113static int pseries_remove_mem_node(struct device_node *np) 113static int pseries_remove_mem_node(struct device_node *np)
114{ 114{
115 const char *type; 115 const char *type;
116 const unsigned int *regs; 116 const __be32 *regs;
117 unsigned long base; 117 unsigned long base;
118 unsigned int lmb_size; 118 unsigned int lmb_size;
119 int ret = -EINVAL; 119 int ret = -EINVAL;
@@ -132,8 +132,8 @@ static int pseries_remove_mem_node(struct device_node *np)
132 if (!regs) 132 if (!regs)
133 return ret; 133 return ret;
134 134
135 base = *(unsigned long *)regs; 135 base = be64_to_cpu(*(unsigned long *)regs);
136 lmb_size = regs[3]; 136 lmb_size = be32_to_cpu(regs[3]);
137 137
138 pseries_remove_memblock(base, lmb_size); 138 pseries_remove_memblock(base, lmb_size);
139 return 0; 139 return 0;
@@ -153,7 +153,7 @@ static inline int pseries_remove_mem_node(struct device_node *np)
153static int pseries_add_mem_node(struct device_node *np) 153static int pseries_add_mem_node(struct device_node *np)
154{ 154{
155 const char *type; 155 const char *type;
156 const unsigned int *regs; 156 const __be32 *regs;
157 unsigned long base; 157 unsigned long base;
158 unsigned int lmb_size; 158 unsigned int lmb_size;
159 int ret = -EINVAL; 159 int ret = -EINVAL;
@@ -172,8 +172,8 @@ static int pseries_add_mem_node(struct device_node *np)
172 if (!regs) 172 if (!regs)
173 return ret; 173 return ret;
174 174
175 base = *(unsigned long *)regs; 175 base = be64_to_cpu(*(unsigned long *)regs);
176 lmb_size = regs[3]; 176 lmb_size = be32_to_cpu(regs[3]);
177 177
178 /* 178 /*
179 * Update memory region to represent the memory add 179 * Update memory region to represent the memory add
@@ -187,14 +187,14 @@ static int pseries_update_drconf_memory(struct of_prop_reconfig *pr)
187 struct of_drconf_cell *new_drmem, *old_drmem; 187 struct of_drconf_cell *new_drmem, *old_drmem;
188 unsigned long memblock_size; 188 unsigned long memblock_size;
189 u32 entries; 189 u32 entries;
190 u32 *p; 190 __be32 *p;
191 int i, rc = -EINVAL; 191 int i, rc = -EINVAL;
192 192
193 memblock_size = pseries_memory_block_size(); 193 memblock_size = pseries_memory_block_size();
194 if (!memblock_size) 194 if (!memblock_size)
195 return -EINVAL; 195 return -EINVAL;
196 196
197 p = (u32 *) pr->old_prop->value; 197 p = (__be32 *) pr->old_prop->value;
198 if (!p) 198 if (!p)
199 return -EINVAL; 199 return -EINVAL;
200 200
@@ -203,28 +203,30 @@ static int pseries_update_drconf_memory(struct of_prop_reconfig *pr)
203 * entries. Get the niumber of entries and skip to the array of 203 * entries. Get the niumber of entries and skip to the array of
204 * of_drconf_cell's. 204 * of_drconf_cell's.
205 */ 205 */
206 entries = *p++; 206 entries = be32_to_cpu(*p++);
207 old_drmem = (struct of_drconf_cell *)p; 207 old_drmem = (struct of_drconf_cell *)p;
208 208
209 p = (u32 *)pr->prop->value; 209 p = (__be32 *)pr->prop->value;
210 p++; 210 p++;
211 new_drmem = (struct of_drconf_cell *)p; 211 new_drmem = (struct of_drconf_cell *)p;
212 212
213 for (i = 0; i < entries; i++) { 213 for (i = 0; i < entries; i++) {
214 if ((old_drmem[i].flags & DRCONF_MEM_ASSIGNED) && 214 if ((be32_to_cpu(old_drmem[i].flags) & DRCONF_MEM_ASSIGNED) &&
215 (!(new_drmem[i].flags & DRCONF_MEM_ASSIGNED))) { 215 (!(be32_to_cpu(new_drmem[i].flags) & DRCONF_MEM_ASSIGNED))) {
216 rc = pseries_remove_memblock(old_drmem[i].base_addr, 216 rc = pseries_remove_memblock(
217 be64_to_cpu(old_drmem[i].base_addr),
217 memblock_size); 218 memblock_size);
218 break; 219 break;
219 } else if ((!(old_drmem[i].flags & DRCONF_MEM_ASSIGNED)) && 220 } else if ((!(be32_to_cpu(old_drmem[i].flags) &
220 (new_drmem[i].flags & DRCONF_MEM_ASSIGNED)) { 221 DRCONF_MEM_ASSIGNED)) &&
221 rc = memblock_add(old_drmem[i].base_addr, 222 (be32_to_cpu(new_drmem[i].flags) &
223 DRCONF_MEM_ASSIGNED)) {
224 rc = memblock_add(be64_to_cpu(old_drmem[i].base_addr),
222 memblock_size); 225 memblock_size);
223 rc = (rc < 0) ? -EINVAL : 0; 226 rc = (rc < 0) ? -EINVAL : 0;
224 break; 227 break;
225 } 228 }
226 } 229 }
227
228 return rc; 230 return rc;
229} 231}
230 232