Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PARISC] convert to use CONFIG_64BIT instead of __LP64__

Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>

authored by

Helge Deller and committed by
Kyle McMartin
513e7ecd a8f44e38

+46 -46
+6 -6
include/asm-parisc/assembly.h
··· 73 73 74 74 #ifdef __ASSEMBLY__ 75 75 76 - #ifdef __LP64__ 76 + #ifdef CONFIG_64BIT 77 77 /* the 64-bit pa gnu assembler unfortunately defaults to .level 1.1 or 2.0 so 78 78 * work around that for now... */ 79 79 .level 2.0w ··· 164 164 .endm 165 165 166 166 .macro loadgp 167 - #ifdef __LP64__ 167 + #ifdef CONFIG_64BIT 168 168 ldil L%__gp, %r27 169 169 ldo R%__gp(%r27), %r27 170 170 #else ··· 342 342 fldd,mb -8(%r30), %fr12 343 343 .endm 344 344 345 - #ifdef __LP64__ 345 + #ifdef CONFIG_64BIT 346 346 .macro callee_save 347 347 std,ma %r3, CALLEE_REG_FRAME_SIZE(%r30) 348 348 mfctl %cr27, %r3 ··· 385 385 ldd,mb -CALLEE_REG_FRAME_SIZE(%r30), %r3 386 386 .endm 387 387 388 - #else /* ! __LP64__ */ 388 + #else /* ! CONFIG_64BIT */ 389 389 390 390 .macro callee_save 391 391 stw,ma %r3, CALLEE_REG_FRAME_SIZE(%r30) ··· 428 428 mtctl %r3, %cr27 429 429 ldw,mb -CALLEE_REG_FRAME_SIZE(%r30), %r3 430 430 .endm 431 - #endif /* ! __LP64__ */ 431 + #endif /* ! CONFIG_64BIT */ 432 432 433 433 .macro save_specials regs 434 434 ··· 449 449 mtctl %r0, %cr18 450 450 SAVE_CR (%cr18, PT_IAOQ1(\regs)) 451 451 452 - #ifdef __LP64__ 452 + #ifdef CONFIG_64BIT 453 453 /* cr11 (sar) is a funny one. 5 bits on PA1.1 and 6 bit on PA2.0 454 454 * For PA2.0 mtsar or mtctl always write 6 bits, but mfctl only 455 455 * reads 5 bits. Use mfctl,w to read all six bits. Otherwise
+6 -6
include/asm-parisc/atomic.h
··· 58 58 /* __xchg32/64 defined in arch/parisc/lib/bitops.c */ 59 59 extern unsigned long __xchg8(char, char *); 60 60 extern unsigned long __xchg32(int, int *); 61 - #ifdef __LP64__ 61 + #ifdef CONFIG_64BIT 62 62 extern unsigned long __xchg64(unsigned long, unsigned long *); 63 63 #endif 64 64 ··· 67 67 __xchg(unsigned long x, __volatile__ void * ptr, int size) 68 68 { 69 69 switch(size) { 70 - #ifdef __LP64__ 70 + #ifdef CONFIG_64BIT 71 71 case 8: return __xchg64(x,(unsigned long *) ptr); 72 72 #endif 73 73 case 4: return __xchg32((int) x, (int *) ptr); ··· 81 81 /* 82 82 ** REVISIT - Abandoned use of LDCW in xchg() for now: 83 83 ** o need to test sizeof(*ptr) to avoid clearing adjacent bytes 84 - ** o and while we are at it, could __LP64__ code use LDCD too? 84 + ** o and while we are at it, could CONFIG_64BIT code use LDCD too? 85 85 ** 86 86 ** if (__builtin_constant_p(x) && (x == NULL)) 87 87 ** if (((unsigned long)p & 0xf) == 0) ··· 105 105 __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new_, int size) 106 106 { 107 107 switch(size) { 108 - #ifdef __LP64__ 108 + #ifdef CONFIG_64BIT 109 109 case 8: return __cmpxchg_u64((unsigned long *)ptr, old, new_); 110 110 #endif 111 111 case 4: return __cmpxchg_u32((unsigned int *)ptr, (unsigned int) old, (unsigned int) new_); ··· 218 218 #define smp_mb__before_atomic_inc() smp_mb() 219 219 #define smp_mb__after_atomic_inc() smp_mb() 220 220 221 - #ifdef __LP64__ 221 + #ifdef CONFIG_64BIT 222 222 223 223 typedef struct { volatile s64 counter; } atomic64_t; 224 224 ··· 270 270 #define atomic64_dec_and_test(v) (atomic64_dec_return(v) == 0) 271 271 #define atomic64_sub_and_test(i,v) (atomic64_sub_return((i),(v)) == 0) 272 272 273 - #endif /* __LP64__ */ 273 + #endif /* CONFIG_64BIT */ 274 274 275 275 #include <asm-generic/atomic.h> 276 276
+1 -1
include/asm-parisc/bitops.h
··· 136 136 unsigned long ret; 137 137 138 138 __asm__( 139 - #ifdef __LP64__ 139 + #ifdef CONFIG_64BIT 140 140 " ldi 63,%1\n" 141 141 " extrd,u,*<> %0,63,32,%%r0\n" 142 142 " extrd,u,*TR %0,31,32,%0\n" /* move top 32-bits down */
+1 -1
include/asm-parisc/elf.h
··· 220 220 * macros, and then it includes fs/binfmt_elf.c to provide an alternate 221 221 * elf binary handler for 32 bit binaries (on the 64 bit kernel). 222 222 */ 223 - #ifdef __LP64__ 223 + #ifdef CONFIG_64BIT 224 224 #define ELF_CLASS ELFCLASS64 225 225 #else 226 226 #define ELF_CLASS ELFCLASS32
+2 -2
include/asm-parisc/io.h
··· 67 67 { 68 68 unsigned long long ret; 69 69 70 - #ifdef __LP64__ 70 + #ifdef CONFIG_64BIT 71 71 __asm__ __volatile__( 72 72 " ldda 0(%1),%0\n" 73 73 : "=r" (ret) : "r" (addr) ); ··· 108 108 109 109 static inline void gsc_writeq(unsigned long long val, unsigned long addr) 110 110 { 111 - #ifdef __LP64__ 111 + #ifdef CONFIG_64BIT 112 112 __asm__ __volatile__( 113 113 " stda %0,0(%1)\n" 114 114 : : "r" (val), "r" (addr) );
+1 -1
include/asm-parisc/mmzone.h
··· 35 35 #define PFNNID_MAP_MAX 512 /* support 512GB */ 36 36 extern unsigned char pfnnid_map[PFNNID_MAP_MAX]; 37 37 38 - #ifndef __LP64__ 38 + #ifndef CONFIG_64BIT 39 39 #define pfn_is_io(pfn) ((pfn & (0xf0000000UL >> PAGE_SHIFT)) == (0xf0000000UL >> PAGE_SHIFT)) 40 40 #else 41 41 /* io can be 0xf0f0f0f0f0xxxxxx or 0xfffffffff0000000 */
+1 -1
include/asm-parisc/module.h
··· 3 3 /* 4 4 * This file contains the parisc architecture specific module code. 5 5 */ 6 - #ifdef __LP64__ 6 + #ifdef CONFIG_64BIT 7 7 #define Elf_Shdr Elf64_Shdr 8 8 #define Elf_Sym Elf64_Sym 9 9 #define Elf_Ehdr Elf64_Ehdr
+3 -3
include/asm-parisc/msgbuf.h
··· 13 13 14 14 struct msqid64_ds { 15 15 struct ipc64_perm msg_perm; 16 - #ifndef __LP64__ 16 + #ifndef CONFIG_64BIT 17 17 unsigned int __pad1; 18 18 #endif 19 19 __kernel_time_t msg_stime; /* last msgsnd time */ 20 - #ifndef __LP64__ 20 + #ifndef CONFIG_64BIT 21 21 unsigned int __pad2; 22 22 #endif 23 23 __kernel_time_t msg_rtime; /* last msgrcv time */ 24 - #ifndef __LP64__ 24 + #ifndef CONFIG_64BIT 25 25 unsigned int __pad3; 26 26 #endif 27 27 __kernel_time_t msg_ctime; /* last change time */
+1 -1
include/asm-parisc/page.h
··· 105 105 /* WARNING: The definitions below must match exactly to sizeof(pte_t) 106 106 * etc 107 107 */ 108 - #ifdef __LP64__ 108 + #ifdef CONFIG_64BIT 109 109 #define BITS_PER_PTE_ENTRY 3 110 110 #define BITS_PER_PMD_ENTRY 2 111 111 #define BITS_PER_PGD_ENTRY 2
+1 -1
include/asm-parisc/parisc-device.h
··· 15 15 unsigned int num_addrs; /* some devices have additional address ranges. */ 16 16 unsigned long *addr; /* which will be stored here */ 17 17 18 - #ifdef __LP64__ 18 + #ifdef CONFIG_64BIT 19 19 /* parms for pdc_pat_cell_module() call */ 20 20 unsigned long pcell_loc; /* Physical Cell location */ 21 21 unsigned long mod_index; /* PAT specific - Misc Module info */
+5 -5
include/asm-parisc/pdc.h
··· 341 341 342 342 struct pdc_cache_cf { /* for PDC_CACHE (I/D-caches) */ 343 343 unsigned long 344 - #ifdef __LP64__ 344 + #ifdef CONFIG_64BIT 345 345 cc_padW:32, 346 346 #endif 347 347 cc_alias: 4, /* alias boundaries for virtual addresses */ ··· 357 357 358 358 struct pdc_tlb_cf { /* for PDC_CACHE (I/D-TLB's) */ 359 359 unsigned long tc_pad0:12, /* reserved */ 360 - #ifdef __LP64__ 360 + #ifdef CONFIG_64BIT 361 361 tc_padW:32, 362 362 #endif 363 363 tc_sh : 2, /* 0 = separate I/D-TLB, else shared I/D-TLB */ ··· 445 445 446 446 #endif /* !CONFIG_PA20 */ 447 447 448 - #ifdef __LP64__ 448 + #ifdef CONFIG_64BIT 449 449 struct pdc_memory_table_raddr { /* PDC_MEM/PDC_MEM_TABLE (return info) */ 450 450 unsigned long entries_returned; 451 451 unsigned long entries_total; ··· 456 456 unsigned int pages; 457 457 unsigned int reserved; 458 458 }; 459 - #endif /* __LP64__ */ 459 + #endif /* CONFIG_64BIT */ 460 460 461 461 struct pdc_system_map_mod_info { /* PDC_SYSTEM_MAP/FIND_MODULE */ 462 462 unsigned long mod_addr; ··· 752 752 int pdc_tod_read(struct pdc_tod *tod); 753 753 int pdc_tod_set(unsigned long sec, unsigned long usec); 754 754 755 - #ifdef __LP64__ 755 + #ifdef CONFIG_64BIT 756 756 int pdc_mem_mem_table(struct pdc_memory_table_raddr *r_addr, 757 757 struct pdc_memory_table *tbl, unsigned long entries); 758 758 #endif
+5 -5
include/asm-parisc/pgalloc.h
··· 14 14 * Here (for 64 bit kernels) we implement a Hybrid L2/L3 scheme: we 15 15 * allocate the first pmd adjacent to the pgd. This means that we can 16 16 * subtract a constant offset to get to it. The pmd and pgd sizes are 17 - * arranged so that a single pmd covers 4GB (giving a full LP64 17 + * arranged so that a single pmd covers 4GB (giving a full 64-bit 18 18 * process access to 8TB) so our lookups are effectively L2 for the 19 19 * first 4GB of the kernel (i.e. for all ILP32 processes and all the 20 20 * kernel for machines with under 4GB of memory) */ ··· 26 26 27 27 if (likely(pgd != NULL)) { 28 28 memset(pgd, 0, PAGE_SIZE<<PGD_ALLOC_ORDER); 29 - #ifdef __LP64__ 29 + #ifdef CONFIG_64BIT 30 30 actual_pgd += PTRS_PER_PGD; 31 31 /* Populate first pmd with allocated memory. We mark it 32 32 * with PxD_FLAG_ATTACHED as a signal to the system that this ··· 45 45 46 46 static inline void pgd_free(pgd_t *pgd) 47 47 { 48 - #ifdef __LP64__ 48 + #ifdef CONFIG_64BIT 49 49 pgd -= PTRS_PER_PGD; 50 50 #endif 51 51 free_pages((unsigned long)pgd, PGD_ALLOC_ORDER); ··· 72 72 73 73 static inline void pmd_free(pmd_t *pmd) 74 74 { 75 - #ifdef __LP64__ 75 + #ifdef CONFIG_64BIT 76 76 if(pmd_flag(*pmd) & PxD_FLAG_ATTACHED) 77 77 /* This is the permanent pmd attached to the pgd; 78 78 * cannot free it */ ··· 99 99 static inline void 100 100 pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, pte_t *pte) 101 101 { 102 - #ifdef __LP64__ 102 + #ifdef CONFIG_64BIT 103 103 /* preserve the gateway marker if this is the beginning of 104 104 * the permanent pmd */ 105 105 if(pmd_flag(*pmd) & PxD_FLAG_ATTACHED)
+1 -1
include/asm-parisc/posix_types.h
··· 20 20 typedef int __kernel_clockid_t; 21 21 typedef int __kernel_daddr_t; 22 22 /* Note these change from narrow to wide kernels */ 23 - #ifdef __LP64__ 23 + #ifdef CONFIG_64BIT 24 24 typedef unsigned long __kernel_size_t; 25 25 typedef long __kernel_ssize_t; 26 26 typedef long __kernel_ptrdiff_t;
+2 -2
include/asm-parisc/processor.h
··· 38 38 #define DEFAULT_TASK_SIZE32 (0xFFF00000UL) 39 39 #define DEFAULT_MAP_BASE32 (0x40000000UL) 40 40 41 - #ifdef __LP64__ 41 + #ifdef CONFIG_64BIT 42 42 #define DEFAULT_TASK_SIZE (MAX_ADDRESS-0xf000000) 43 43 #define DEFAULT_MAP_BASE (0x200000000UL) 44 44 #else ··· 273 273 * it in here from the current->personality 274 274 */ 275 275 276 - #ifdef __LP64__ 276 + #ifdef CONFIG_64BIT 277 277 #define USER_WIDE_MODE (!test_thread_flag(TIF_32BIT)) 278 278 #else 279 279 #define USER_WIDE_MODE 0
+2 -2
include/asm-parisc/sembuf.h
··· 13 13 14 14 struct semid64_ds { 15 15 struct ipc64_perm sem_perm; /* permissions .. see ipc.h */ 16 - #ifndef __LP64__ 16 + #ifndef CONFIG_64BIT 17 17 unsigned int __pad1; 18 18 #endif 19 19 __kernel_time_t sem_otime; /* last semop time */ 20 - #ifndef __LP64__ 20 + #ifndef CONFIG_64BIT 21 21 unsigned int __pad2; 22 22 #endif 23 23 __kernel_time_t sem_ctime; /* last change time */
+5 -5
include/asm-parisc/shmbuf.h
··· 13 13 14 14 struct shmid64_ds { 15 15 struct ipc64_perm shm_perm; /* operation perms */ 16 - #ifndef __LP64__ 16 + #ifndef CONFIG_64BIT 17 17 unsigned int __pad1; 18 18 #endif 19 19 __kernel_time_t shm_atime; /* last attach time */ 20 - #ifndef __LP64__ 20 + #ifndef CONFIG_64BIT 21 21 unsigned int __pad2; 22 22 #endif 23 23 __kernel_time_t shm_dtime; /* last detach time */ 24 - #ifndef __LP64__ 24 + #ifndef CONFIG_64BIT 25 25 unsigned int __pad3; 26 26 #endif 27 27 __kernel_time_t shm_ctime; /* last change time */ 28 - #ifndef __LP64__ 28 + #ifndef CONFIG_64BIT 29 29 unsigned int __pad4; 30 30 #endif 31 31 size_t shm_segsz; /* size of segment (bytes) */ ··· 36 36 unsigned int __unused2; 37 37 }; 38 38 39 - #ifdef __LP64__ 39 + #ifdef CONFIG_64BIT 40 40 /* The 'unsigned int' (formerly 'unsigned long') data types below will 41 41 * ensure that a 32-bit app calling shmctl(*,IPC_INFO,*) will work on 42 42 * a wide kernel, but if some of these values are meant to contain pointers
+1 -1
include/asm-parisc/signal.h
··· 105 105 struct siginfo; 106 106 107 107 /* Type of a signal handler. */ 108 - #ifdef __LP64__ 108 + #ifdef CONFIG_64BIT 109 109 /* function pointers on 64-bit parisc are pointers to little structs and the 110 110 * compiler doesn't support code which changes or tests the address of 111 111 * the function in the little struct. This is really ugly -PB
+1 -1
include/asm-parisc/system.h
··· 34 34 unsigned int i:1; 35 35 }; 36 36 37 - #ifdef __LP64__ 37 + #ifdef CONFIG_64BIT 38 38 #define pa_psw(task) ((struct pa_psw *) ((char *) (task) + TASK_PT_PSW + 4)) 39 39 #else 40 40 #define pa_psw(task) ((struct pa_psw *) ((char *) (task) + TASK_PT_PSW))
+1 -1
include/asm-parisc/types.h
··· 31 31 */ 32 32 #ifdef __KERNEL__ 33 33 34 - #ifdef __LP64__ 34 + #ifdef CONFIG_64BIT 35 35 #define BITS_PER_LONG 64 36 36 #define SHIFT_PER_LONG 6 37 37 #else