# \[PATCH 42/65\] powerpc/mm/radix: Limit paca allocation in radix

- From: Aneesh Kumar K.V \<hidden\>
- Date: 2016-03-27 08:26:04 
- List: linuxppc-dev
- Page: https://ratatoskr.run/linuxppc-dev/2016/03/9489054
- Thread: https://ratatoskr.run/linuxppc-dev/2016/03/9489013/t.md

```text
On return from rtas we access the paca variables and we have 64 bit
disabled. This requires us to limit paca in 32 bit range.

Note: we don't set ppc64_rma_size for radix and because of that we endup
with a limit value of 0.

Signed-off-by: Aneesh Kumar K.V <redacted>
---
 arch/powerpc/kernel/paca.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/powerpc/kernel/paca.c b/arch/powerpc/kernel/paca.c
index 01ea0edf0579..9c6e0d1eb61b 100644
--- a/arch/powerpc/kernel/paca.c
+++ b/arch/powerpc/kernel/paca.c
@@ -216,6 +216,11 @@ void __init allocate_pacas(void)
 	 * the first segment.
 	 */
 	limit = min(0x10000000ULL, limit);
+	/*
+	 * Fix it properly. Radix hack
+	 */
+	if (limit == 0)
+		limit = 0x10000000ULL;
 #endif
 
 	paca_size = PAGE_ALIGN(sizeof(struct paca_struct) * nr_cpu_ids);
-- 
2.5.0
```
