*/
 #ifdef CONFIG_PPC_BOOK3E_64
 #define is_kernel_addr(x)      ((x) >= 0x8000000000000000ul)
-#else
+#elif defined(CONFIG_PPC_BOOK3S_64)
 #define is_kernel_addr(x)      ((x) >= PAGE_OFFSET)
+#else
+#define is_kernel_addr(x)      ((x) >= TASK_SIZE)
 #endif
 
 #ifndef CONFIG_PPC_BOOK3S_64
 
 {
        int i = 0;
 
+#ifdef CONFIG_PPC64
        address_markers[i++].start_address = PAGE_OFFSET;
+#else
+       address_markers[i++].start_address = TASK_SIZE;
+#endif
        address_markers[i++].start_address = VMALLOC_START;
        address_markers[i++].start_address = VMALLOC_END;
 #ifdef CONFIG_PPC64
        struct pg_state st = {
                .seq = m,
                .marker = address_markers,
-               .start_address = PAGE_OFFSET,
+               .start_address = IS_ENABLED(CONFIG_PPC64) ? PAGE_OFFSET : TASK_SIZE,
        };
 
 #ifdef CONFIG_PPC64
                .seq = NULL,
                .marker = address_markers,
                .check_wx = true,
-               .start_address = PAGE_OFFSET,
+               .start_address = IS_ENABLED(CONFIG_PPC64) ? PAGE_OFFSET : TASK_SIZE,
        };
 
 #ifdef CONFIG_PPC64