···256256 * it in here from the current->personality257257 */258258259259-#ifdef CONFIG_64BIT260260-#define USER_WIDE_MODE (!test_thread_flag(TIF_32BIT))261261-#else262262-#define USER_WIDE_MODE 0263263-#endif259259+#define USER_WIDE_MODE (!is_32bit_task())264260265261#define start_thread(regs, new_pc, new_sp) do { \266262 elf_addr_t *sp = (elf_addr_t *)new_sp; \
+3-1
arch/parisc/include/asm/traps.h
···22#ifndef __ASM_TRAPS_H33#define __ASM_TRAPS_H4455-#ifdef __KERNEL__55+#define PARISC_ITLB_TRAP 6 /* defined by architecture. Do not change. */66+77+#if !defined(__ASSEMBLY__)68struct pt_regs;79810/* traps.c */
+28-24
arch/parisc/kernel/entry.S
···3636#include <asm/signal.h>3737#include <asm/unistd.h>3838#include <asm/ldcw.h>3939+#include <asm/traps.h>3940#include <asm/thread_info.h>40414142#include <linux/linkage.h>···693692 def 3694693 extint 4695694 def 5696696- itlb_20 6695695+ itlb_20 PARISC_ITLB_TRAP697696 def 7698697 def 8699698 def 9···736735 def 3737736 extint 4738737 def 5739739- itlb_11 6738738+ itlb_11 PARISC_ITLB_TRAP740739 def 7741740 def 8742741 def 9···10691068 save_specials %r291070106910711070 /* If this trap is a itlb miss, skip saving/adjusting isr/ior */10721072-10731073- /*10741074- * FIXME: 1) Use a #define for the hardwired "6" below (and in10751075- * traps.c.10761076- * 2) Once we start executing code above 4 Gb, we need10771077- * to adjust iasq/iaoq here in the same way we10781078- * adjust isr/ior below.10791079- */10801080-10811081- cmpib,COND(=),n 6,%r26,skip_save_ior10711071+ cmpib,COND(=),n PARISC_ITLB_TRAP,%r26,skip_save_ior108210721083107310841084- mfctl %cr20, %r16 /* isr */10741074+ mfctl %isr, %r1610851075 nop /* serialize mfctl on PA 2.0 to avoid 4 cycle penalty */10861086- mfctl %cr21, %r17 /* ior */10761076+ mfctl %ior, %r17108710771088107810891079#ifdef CONFIG_64BIT···10861094 extrd,u,*<> %r8,PSW_W_BIT,1,%r010871095 depdi 0,1,2,%r171088109610891089- /*10901090- * FIXME: This code has hardwired assumptions about the split10911091- * between space bits and offset bits. This will change10921092- * when we allow alternate page sizes.10931093- */10941094-10951095- /* adjust isr/ior. */10961096- extrd,u %r16,63,SPACEID_SHIFT,%r1 /* get high bits from isr for ior */10971097- depd %r1,31,SPACEID_SHIFT,%r17 /* deposit them into ior */10981098- depdi 0,63,SPACEID_SHIFT,%r16 /* clear them from isr */10971097+ /* adjust isr/ior: get high bits from isr and deposit in ior */10981098+ space_adjust %r16,%r17,%r110991099#endif11001100 STREG %r16, PT_ISR(%r29)11011101 STREG %r17, PT_IOR(%r29)1102110211031103+#if 0 && defined(CONFIG_64BIT)11041104+ /* Revisit when we have 64-bit code above 4Gb */11051105+ b,n intr_save21103110611041107skip_save_ior:11081108+ /* We have a itlb miss, and when executing code above 4 Gb on ILP64, we11091109+ * need to adjust iasq/iaoq here in the same way we adjusted isr/ior11101110+ * above.11111111+ */11121112+ extrd,u,* %r8,PSW_W_BIT,1,%r111131113+ cmpib,COND(=),n 1,%r1,intr_save211141114+ LDREG PT_IASQ0(%r29), %r1611151115+ LDREG PT_IAOQ0(%r29), %r1711161116+ /* adjust iasq/iaoq */11171117+ space_adjust %r16,%r17,%r111181118+ STREG %r16, PT_IASQ0(%r29)11191119+ STREG %r17, PT_IAOQ0(%r29)11201120+#else11211121+skip_save_ior:11221122+#endif11231123+11241124+intr_save2:11051125 virt_map11061126 save_general %r2911071127
-5
arch/parisc/kernel/sys_parisc.c
···156156 int do_color_align, last_mmap;157157 struct vm_unmapped_area_info info;158158159159-#ifdef CONFIG_64BIT160160- /* This should only ever run for 32-bit processes. */161161- BUG_ON(!test_thread_flag(TIF_32BIT));162162-#endif163163-164159 /* requested length too big for entire address space */165160 if (len > TASK_SIZE)166161 return -ENOMEM;
+1-1
arch/parisc/kernel/traps.c
···557557 cpu_lpmc(5, regs);558558 return;559559560560- case 6:560560+ case PARISC_ITLB_TRAP:561561 /* Instruction TLB miss fault/Instruction page fault */562562 fault_address = regs->iaoq[0];563563 fault_space = regs->iasq[0];