Commit a8f44e38 authored by Helge Deller's avatar Helge Deller Committed by Kyle McMartin

[PARISC] use CONFIG_64BIT instead of __LP64__

- additionally update my copyright timestamps
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
Signed-off-by: default avatarKyle McMartin <kyle@parisc-linux.org>
parent 0b3d643f
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
#define BLANK() asm volatile("\n->" : : ) #define BLANK() asm volatile("\n->" : : )
#ifdef __LP64__ #ifdef CONFIG_64BIT
#define FRAME_SIZE 128 #define FRAME_SIZE 128
#else #else
#define FRAME_SIZE 64 #define FRAME_SIZE 64
......
...@@ -74,7 +74,7 @@ static DEFINE_SPINLOCK(pdc_lock); ...@@ -74,7 +74,7 @@ static DEFINE_SPINLOCK(pdc_lock);
static unsigned long pdc_result[32] __attribute__ ((aligned (8))); static unsigned long pdc_result[32] __attribute__ ((aligned (8)));
static unsigned long pdc_result2[32] __attribute__ ((aligned (8))); static unsigned long pdc_result2[32] __attribute__ ((aligned (8)));
#ifdef __LP64__ #ifdef CONFIG_64BIT
#define WIDE_FIRMWARE 0x1 #define WIDE_FIRMWARE 0x1
#define NARROW_FIRMWARE 0x2 #define NARROW_FIRMWARE 0x2
...@@ -94,12 +94,12 @@ int parisc_narrow_firmware __read_mostly = 1; ...@@ -94,12 +94,12 @@ int parisc_narrow_firmware __read_mostly = 1;
* when running a 64-bit kernel on such boxes (e.g. C200 or C360). * when running a 64-bit kernel on such boxes (e.g. C200 or C360).
*/ */
#ifdef __LP64__ #ifdef CONFIG_64BIT
long real64_call(unsigned long function, ...); long real64_call(unsigned long function, ...);
#endif #endif
long real32_call(unsigned long function, ...); long real32_call(unsigned long function, ...);
#ifdef __LP64__ #ifdef CONFIG_64BIT
# define MEM_PDC (unsigned long)(PAGE0->mem_pdc_hi) << 32 | PAGE0->mem_pdc # define MEM_PDC (unsigned long)(PAGE0->mem_pdc_hi) << 32 | PAGE0->mem_pdc
# define mem_pdc_call(args...) unlikely(parisc_narrow_firmware) ? real32_call(MEM_PDC, args) : real64_call(MEM_PDC, args) # define mem_pdc_call(args...) unlikely(parisc_narrow_firmware) ? real32_call(MEM_PDC, args) : real64_call(MEM_PDC, args)
#else #else
...@@ -117,7 +117,7 @@ long real32_call(unsigned long function, ...); ...@@ -117,7 +117,7 @@ long real32_call(unsigned long function, ...);
*/ */
static unsigned long f_extend(unsigned long address) static unsigned long f_extend(unsigned long address)
{ {
#ifdef __LP64__ #ifdef CONFIG_64BIT
if(unlikely(parisc_narrow_firmware)) { if(unlikely(parisc_narrow_firmware)) {
if((address & 0xff000000) == 0xf0000000) if((address & 0xff000000) == 0xf0000000)
return 0xf0f0f0f000000000UL | (u32)address; return 0xf0f0f0f000000000UL | (u32)address;
...@@ -139,7 +139,7 @@ static unsigned long f_extend(unsigned long address) ...@@ -139,7 +139,7 @@ static unsigned long f_extend(unsigned long address)
*/ */
static void convert_to_wide(unsigned long *addr) static void convert_to_wide(unsigned long *addr)
{ {
#ifdef __LP64__ #ifdef CONFIG_64BIT
int i; int i;
unsigned int *p = (unsigned int *)addr; unsigned int *p = (unsigned int *)addr;
...@@ -158,7 +158,7 @@ static void convert_to_wide(unsigned long *addr) ...@@ -158,7 +158,7 @@ static void convert_to_wide(unsigned long *addr)
*/ */
void __init set_firmware_width(void) void __init set_firmware_width(void)
{ {
#ifdef __LP64__ #ifdef CONFIG_64BIT
int retval; int retval;
unsigned long flags; unsigned long flags;
...@@ -238,7 +238,7 @@ int __init pdc_chassis_info(struct pdc_chassis_info *chassis_info, void *led_inf ...@@ -238,7 +238,7 @@ int __init pdc_chassis_info(struct pdc_chassis_info *chassis_info, void *led_inf
* *
* Must be correctly formatted or expect system crash * Must be correctly formatted or expect system crash
*/ */
#ifdef __LP64__ #ifdef CONFIG_64BIT
int pdc_pat_chassis_send_log(unsigned long state, unsigned long data) int pdc_pat_chassis_send_log(unsigned long state, unsigned long data)
{ {
int retval = 0; int retval = 0;
...@@ -949,7 +949,7 @@ int pdc_tod_set(unsigned long sec, unsigned long usec) ...@@ -949,7 +949,7 @@ int pdc_tod_set(unsigned long sec, unsigned long usec)
} }
EXPORT_SYMBOL(pdc_tod_set); EXPORT_SYMBOL(pdc_tod_set);
#ifdef __LP64__ #ifdef CONFIG_64BIT
int pdc_mem_mem_table(struct pdc_memory_table_raddr *r_addr, int pdc_mem_mem_table(struct pdc_memory_table_raddr *r_addr,
struct pdc_memory_table *tbl, unsigned long entries) struct pdc_memory_table *tbl, unsigned long entries)
{ {
...@@ -965,7 +965,7 @@ int pdc_mem_mem_table(struct pdc_memory_table_raddr *r_addr, ...@@ -965,7 +965,7 @@ int pdc_mem_mem_table(struct pdc_memory_table_raddr *r_addr,
return retval; return retval;
} }
#endif /* __LP64__ */ #endif /* CONFIG_64BIT */
/* FIXME: Is this pdc used? I could not find type reference to ftc_bitmap /* FIXME: Is this pdc used? I could not find type reference to ftc_bitmap
* so I guessed at unsigned long. Someone who knows what this does, can fix * so I guessed at unsigned long. Someone who knows what this does, can fix
...@@ -1204,7 +1204,7 @@ int pdc_sti_call(unsigned long func, unsigned long flags, ...@@ -1204,7 +1204,7 @@ int pdc_sti_call(unsigned long func, unsigned long flags,
} }
EXPORT_SYMBOL(pdc_sti_call); EXPORT_SYMBOL(pdc_sti_call);
#ifdef __LP64__ #ifdef CONFIG_64BIT
/** /**
* pdc_pat_cell_get_number - Returns the cell number. * pdc_pat_cell_get_number - Returns the cell number.
* @cell_info: The return buffer. * @cell_info: The return buffer.
...@@ -1387,7 +1387,7 @@ int pdc_pat_io_pci_cfg_write(unsigned long pci_addr, int pci_size, u32 val) ...@@ -1387,7 +1387,7 @@ int pdc_pat_io_pci_cfg_write(unsigned long pci_addr, int pci_size, u32 val)
return retval; return retval;
} }
#endif /* __LP64__ */ #endif /* CONFIG_64BIT */
/***************** 32-bit real-mode calls ***********/ /***************** 32-bit real-mode calls ***********/
...@@ -1445,7 +1445,7 @@ long real32_call(unsigned long fn, ...) ...@@ -1445,7 +1445,7 @@ long real32_call(unsigned long fn, ...)
return real32_call_asm(&real_stack.sp, &real_stack.arg0, fn); return real32_call_asm(&real_stack.sp, &real_stack.arg0, fn);
} }
#ifdef __LP64__ #ifdef CONFIG_64BIT
/***************** 64-bit real-mode calls ***********/ /***************** 64-bit real-mode calls ***********/
struct wide_stack { struct wide_stack {
...@@ -1496,5 +1496,5 @@ long real64_call(unsigned long fn, ...) ...@@ -1496,5 +1496,5 @@ long real64_call(unsigned long fn, ...)
return real64_call_asm(&real64_stack.sp, &real64_stack.arg0, fn); return real64_call_asm(&real64_stack.sp, &real64_stack.arg0, fn);
} }
#endif /* __LP64__ */ #endif /* CONFIG_64BIT */
...@@ -47,7 +47,7 @@ void __init setup_pdc(void) ...@@ -47,7 +47,7 @@ void __init setup_pdc(void)
struct pdc_system_map_mod_info module_result; struct pdc_system_map_mod_info module_result;
struct pdc_module_path module_path; struct pdc_module_path module_path;
struct pdc_model model; struct pdc_model model;
#ifdef __LP64__ #ifdef CONFIG_64BIT
struct pdc_pat_cell_num cell_info; struct pdc_pat_cell_num cell_info;
#endif #endif
...@@ -73,7 +73,7 @@ void __init setup_pdc(void) ...@@ -73,7 +73,7 @@ void __init setup_pdc(void)
* clearer message. * clearer message.
*/ */
#ifdef __LP64__ #ifdef CONFIG_64BIT
status = pdc_pat_cell_get_number(&cell_info); status = pdc_pat_cell_get_number(&cell_info);
if (status == PDC_OK) { if (status == PDC_OK) {
pdc_type = PDC_TYPE_PAT; pdc_type = PDC_TYPE_PAT;
...@@ -152,7 +152,7 @@ static void __init pagezero_memconfig(void) ...@@ -152,7 +152,7 @@ static void __init pagezero_memconfig(void)
npmem_ranges = 1; npmem_ranges = 1;
} }
#ifdef __LP64__ #ifdef CONFIG_64BIT
/* All of the PDC PAT specific code is 64-bit only */ /* All of the PDC PAT specific code is 64-bit only */
...@@ -408,13 +408,13 @@ static void __init sprockets_memconfig(void) ...@@ -408,13 +408,13 @@ static void __init sprockets_memconfig(void)
} }
} }
#else /* !__LP64__ */ #else /* !CONFIG_64BIT */
#define pat_inventory() do { } while (0) #define pat_inventory() do { } while (0)
#define pat_memconfig() do { } while (0) #define pat_memconfig() do { } while (0)
#define sprockets_memconfig() pagezero_memconfig() #define sprockets_memconfig() pagezero_memconfig()
#endif /* !__LP64__ */ #endif /* !CONFIG_64BIT */
#ifndef CONFIG_PA20 #ifndef CONFIG_PA20
......
...@@ -97,7 +97,7 @@ static inline int in_local_section(struct module *me, void *loc, void *dot) ...@@ -97,7 +97,7 @@ static inline int in_local_section(struct module *me, void *loc, void *dot)
} }
#ifndef __LP64__ #ifndef CONFIG_64BIT
struct got_entry { struct got_entry {
Elf32_Addr addr; Elf32_Addr addr;
}; };
...@@ -177,7 +177,7 @@ void *module_alloc(unsigned long size) ...@@ -177,7 +177,7 @@ void *module_alloc(unsigned long size)
return vmalloc(size); return vmalloc(size);
} }
#ifndef __LP64__ #ifndef CONFIG_64BIT
static inline unsigned long count_gots(const Elf_Rela *rela, unsigned long n) static inline unsigned long count_gots(const Elf_Rela *rela, unsigned long n)
{ {
return 0; return 0;
...@@ -320,7 +320,7 @@ int module_frob_arch_sections(CONST Elf_Ehdr *hdr, ...@@ -320,7 +320,7 @@ int module_frob_arch_sections(CONST Elf_Ehdr *hdr,
return 0; return 0;
} }
#ifdef __LP64__ #ifdef CONFIG_64BIT
static Elf64_Word get_got(struct module *me, unsigned long value, long addend) static Elf64_Word get_got(struct module *me, unsigned long value, long addend)
{ {
unsigned int i; unsigned int i;
...@@ -343,9 +343,9 @@ static Elf64_Word get_got(struct module *me, unsigned long value, long addend) ...@@ -343,9 +343,9 @@ static Elf64_Word get_got(struct module *me, unsigned long value, long addend)
value); value);
return i * sizeof(struct got_entry); return i * sizeof(struct got_entry);
} }
#endif /* __LP64__ */ #endif /* CONFIG_64BIT */
#ifdef __LP64__ #ifdef CONFIG_64BIT
static Elf_Addr get_fdesc(struct module *me, unsigned long value) static Elf_Addr get_fdesc(struct module *me, unsigned long value)
{ {
Elf_Fdesc *fdesc = me->module_core + me->arch.fdesc_offset; Elf_Fdesc *fdesc = me->module_core + me->arch.fdesc_offset;
...@@ -369,7 +369,7 @@ static Elf_Addr get_fdesc(struct module *me, unsigned long value) ...@@ -369,7 +369,7 @@ static Elf_Addr get_fdesc(struct module *me, unsigned long value)
fdesc->gp = (Elf_Addr)me->module_core + me->arch.got_offset; fdesc->gp = (Elf_Addr)me->module_core + me->arch.got_offset;
return (Elf_Addr)fdesc; return (Elf_Addr)fdesc;
} }
#endif /* __LP64__ */ #endif /* CONFIG_64BIT */
enum elf_stub_type { enum elf_stub_type {
ELF_STUB_GOT, ELF_STUB_GOT,
...@@ -395,7 +395,7 @@ static Elf_Addr get_stub(struct module *me, unsigned long value, long addend, ...@@ -395,7 +395,7 @@ static Elf_Addr get_stub(struct module *me, unsigned long value, long addend,
i * sizeof(struct stub_entry); i * sizeof(struct stub_entry);
} }
#ifndef __LP64__ #ifndef CONFIG_64BIT
/* for 32-bit the stub looks like this: /* for 32-bit the stub looks like this:
* ldil L'XXX,%r1 * ldil L'XXX,%r1
* be,n R'XXX(%sr4,%r1) * be,n R'XXX(%sr4,%r1)
...@@ -473,7 +473,7 @@ int apply_relocate(Elf_Shdr *sechdrs, ...@@ -473,7 +473,7 @@ int apply_relocate(Elf_Shdr *sechdrs,
return -ENOEXEC; return -ENOEXEC;
} }
#ifndef __LP64__ #ifndef CONFIG_64BIT
int apply_relocate_add(Elf_Shdr *sechdrs, int apply_relocate_add(Elf_Shdr *sechdrs,
const char *strtab, const char *strtab,
unsigned int symindex, unsigned int symindex,
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* Copyright (C) 2001-2003 Grant Grundler <grundler with parisc-linux.org> * Copyright (C) 2001-2003 Grant Grundler <grundler with parisc-linux.org>
* Copyright (C) 2002-2003 Matthew Wilcox <willy at parisc-linux.org> * Copyright (C) 2002-2003 Matthew Wilcox <willy at parisc-linux.org>
* Copyright (C) 2002 Randolph Chung <tausq at parisc-linux.org> * Copyright (C) 2002 Randolph Chung <tausq at parisc-linux.org>
* Copyright (C) 2002-2003 Helge Deller <deller with parisc-linux.org> * Copyright (C) 2002-2007 Helge Deller <deller with parisc-linux.org>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -38,7 +38,7 @@ EXPORT_SYMBOL(__cmpxchg_u32); ...@@ -38,7 +38,7 @@ EXPORT_SYMBOL(__cmpxchg_u32);
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
EXPORT_SYMBOL(__atomic_hash); EXPORT_SYMBOL(__atomic_hash);
#endif #endif
#ifdef __LP64__ #ifdef CONFIG_64BIT
EXPORT_SYMBOL(__xchg64); EXPORT_SYMBOL(__xchg64);
EXPORT_SYMBOL(__cmpxchg_u64); EXPORT_SYMBOL(__cmpxchg_u64);
#endif #endif
...@@ -58,7 +58,7 @@ EXPORT_SYMBOL(fixup_get_user_skip_2); ...@@ -58,7 +58,7 @@ EXPORT_SYMBOL(fixup_get_user_skip_2);
EXPORT_SYMBOL(fixup_put_user_skip_1); EXPORT_SYMBOL(fixup_put_user_skip_1);
EXPORT_SYMBOL(fixup_put_user_skip_2); EXPORT_SYMBOL(fixup_put_user_skip_2);
#ifndef __LP64__ #ifndef CONFIG_64BIT
/* Needed so insmod can set dp value */ /* Needed so insmod can set dp value */
extern int $global$; extern int $global$;
EXPORT_SYMBOL($global$); EXPORT_SYMBOL($global$);
...@@ -135,7 +135,7 @@ EXPORT_SYMBOL(__muldi3); ...@@ -135,7 +135,7 @@ EXPORT_SYMBOL(__muldi3);
asmlinkage void * __canonicalize_funcptr_for_compare(void *); asmlinkage void * __canonicalize_funcptr_for_compare(void *);
EXPORT_SYMBOL(__canonicalize_funcptr_for_compare); EXPORT_SYMBOL(__canonicalize_funcptr_for_compare);
#ifdef __LP64__ #ifdef CONFIG_64BIT
extern void __divdi3(void); extern void __divdi3(void);
extern void __udivdi3(void); extern void __udivdi3(void);
extern void __umoddi3(void); extern void __umoddi3(void);
...@@ -147,7 +147,7 @@ EXPORT_SYMBOL(__umoddi3); ...@@ -147,7 +147,7 @@ EXPORT_SYMBOL(__umoddi3);
EXPORT_SYMBOL(__moddi3); EXPORT_SYMBOL(__moddi3);
#endif #endif
#ifndef __LP64__ #ifndef CONFIG_64BIT
extern void $$dyncall(void); extern void $$dyncall(void);
EXPORT_SYMBOL($$dyncall); EXPORT_SYMBOL($$dyncall);
#endif #endif
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* Copyright (C) 2000 Grant Grundler <grundler with parisc-linux.org> * Copyright (C) 2000 Grant Grundler <grundler with parisc-linux.org>
* Copyright (C) 2001 Alan Modra <amodra at parisc-linux.org> * Copyright (C) 2001 Alan Modra <amodra at parisc-linux.org>
* Copyright (C) 2001-2002 Ryan Bradetich <rbrad at parisc-linux.org> * Copyright (C) 2001-2002 Ryan Bradetich <rbrad at parisc-linux.org>
* Copyright (C) 2001-2002 Helge Deller <deller at parisc-linux.org> * Copyright (C) 2001-2007 Helge Deller <deller at parisc-linux.org>
* Copyright (C) 2002 Randolph Chung <tausq with parisc-linux.org> * Copyright (C) 2002 Randolph Chung <tausq with parisc-linux.org>
* *
* *
...@@ -303,7 +303,7 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long usp, ...@@ -303,7 +303,7 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
* Copy function and argument to be called from * Copy function and argument to be called from
* ret_from_kernel_thread. * ret_from_kernel_thread.
*/ */
#ifdef __LP64__ #ifdef CONFIG_64BIT
cregs->gr[27] = pregs->gr[27]; cregs->gr[27] = pregs->gr[27];
#endif #endif
cregs->gr[26] = pregs->gr[26]; cregs->gr[26] = pregs->gr[26];
......
...@@ -93,7 +93,7 @@ static int __init processor_probe(struct parisc_device *dev) ...@@ -93,7 +93,7 @@ static int __init processor_probe(struct parisc_device *dev)
cpuid = boot_cpu_data.cpu_count; cpuid = boot_cpu_data.cpu_count;
txn_addr = dev->hpa.start; /* for legacy PDC */ txn_addr = dev->hpa.start; /* for legacy PDC */
#ifdef __LP64__ #ifdef CONFIG_64BIT
if (is_pdc_pat()) { if (is_pdc_pat()) {
ulong status; ulong status;
unsigned long bytecnt; unsigned long bytecnt;
...@@ -309,11 +309,11 @@ int __init init_per_cpu(int cpunum) ...@@ -309,11 +309,11 @@ int __init init_per_cpu(int cpunum)
} else { } else {
printk(KERN_WARNING "WARNING: No FP CoProcessor?!" printk(KERN_WARNING "WARNING: No FP CoProcessor?!"
" (coproc_cfg.ccr_functional == 0x%lx, expected 0xc0)\n" " (coproc_cfg.ccr_functional == 0x%lx, expected 0xc0)\n"
#ifdef __LP64__ #ifdef CONFIG_64BIT
"Halting Machine - FP required\n" "Halting Machine - FP required\n"
#endif #endif
, coproc_cfg.ccr_functional); , coproc_cfg.ccr_functional);
#ifdef __LP64__ #ifdef CONFIG_64BIT
mdelay(100); /* previous chars get pushed to console */ mdelay(100); /* previous chars get pushed to console */
panic("FP CoProc not reported"); panic("FP CoProc not reported");
#endif #endif
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
#define DBG(x...) #define DBG(x...)
#endif #endif
#ifdef __LP64__ #ifdef CONFIG_64BIT
/* This function is needed to translate 32 bit pt_regs offsets in to /* This function is needed to translate 32 bit pt_regs offsets in to
* 64 bit pt_regs offsets. For example, a 32 bit gdb under a 64 bit kernel * 64 bit pt_regs offsets. For example, a 32 bit gdb under a 64 bit kernel
...@@ -90,7 +90,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) ...@@ -90,7 +90,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
case PTRACE_PEEKDATA: { case PTRACE_PEEKDATA: {
int copied; int copied;
#ifdef __LP64__ #ifdef CONFIG_64BIT
if (__is_compat_task(child)) { if (__is_compat_task(child)) {
unsigned int tmp; unsigned int tmp;
...@@ -122,7 +122,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) ...@@ -122,7 +122,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
case PTRACE_POKETEXT: /* write the word at location addr. */ case PTRACE_POKETEXT: /* write the word at location addr. */
case PTRACE_POKEDATA: case PTRACE_POKEDATA:
ret = 0; ret = 0;
#ifdef __LP64__ #ifdef CONFIG_64BIT
if (__is_compat_task(child)) { if (__is_compat_task(child)) {
unsigned int tmp = (unsigned int)data; unsigned int tmp = (unsigned int)data;
DBG("sys_ptrace(POKE%s, %d, %lx, %lx)\n", DBG("sys_ptrace(POKE%s, %d, %lx, %lx)\n",
...@@ -145,7 +145,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) ...@@ -145,7 +145,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
processes, the kernel saves all regs on a syscall. */ processes, the kernel saves all regs on a syscall. */
case PTRACE_PEEKUSR: { case PTRACE_PEEKUSR: {
ret = -EIO; ret = -EIO;
#ifdef __LP64__ #ifdef CONFIG_64BIT
if (__is_compat_task(child)) { if (__is_compat_task(child)) {
unsigned int tmp; unsigned int tmp;
...@@ -204,7 +204,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) ...@@ -204,7 +204,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
ret = 0; ret = 0;
goto out_tsk; goto out_tsk;
} }
#ifdef __LP64__ #ifdef CONFIG_64BIT
if (__is_compat_task(child)) { if (__is_compat_task(child)) {
if (addr & (sizeof(int)-1)) if (addr & (sizeof(int)-1))
goto out_tsk; goto out_tsk;
......
...@@ -120,13 +120,13 @@ extern void collect_boot_cpu_data(void); ...@@ -120,13 +120,13 @@ extern void collect_boot_cpu_data(void);
void __init setup_arch(char **cmdline_p) void __init setup_arch(char **cmdline_p)
{ {
#ifdef __LP64__ #ifdef CONFIG_64BIT
extern int parisc_narrow_firmware; extern int parisc_narrow_firmware;
#endif #endif
init_per_cpu(smp_processor_id()); /* Set Modes & Enable FP */ init_per_cpu(smp_processor_id()); /* Set Modes & Enable FP */
#ifdef __LP64__ #ifdef CONFIG_64BIT
printk(KERN_INFO "The 64-bit Kernel has started...\n"); printk(KERN_INFO "The 64-bit Kernel has started...\n");
#else #else
printk(KERN_INFO "The 32-bit Kernel has started...\n"); printk(KERN_INFO "The 32-bit Kernel has started...\n");
...@@ -134,7 +134,7 @@ void __init setup_arch(char **cmdline_p) ...@@ -134,7 +134,7 @@ void __init setup_arch(char **cmdline_p)
pdc_console_init(); pdc_console_init();
#ifdef __LP64__ #ifdef CONFIG_64BIT
if(parisc_narrow_firmware) { if(parisc_narrow_firmware) {
printk(KERN_INFO "Kernel is using PDC in 32-bit mode.\n"); printk(KERN_INFO "Kernel is using PDC in 32-bit mode.\n");
} }
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
/* /*
* Atomically swap in the new signal mask, and wait for a signal. * Atomically swap in the new signal mask, and wait for a signal.
*/ */
#ifdef __LP64__ #ifdef CONFIG_64BIT
#include "sys32.h" #include "sys32.h"
#endif #endif
...@@ -103,7 +103,7 @@ sys_rt_sigreturn(struct pt_regs *regs, int in_syscall) ...@@ -103,7 +103,7 @@ sys_rt_sigreturn(struct pt_regs *regs, int in_syscall)
sigset_t set; sigset_t set;
unsigned long usp = (regs->gr[30] & ~(0x01UL)); unsigned long usp = (regs->gr[30] & ~(0x01UL));
unsigned long sigframe_size = PARISC_RT_SIGFRAME_SIZE; unsigned long sigframe_size = PARISC_RT_SIGFRAME_SIZE;
#ifdef __LP64__ #ifdef CONFIG_64BIT
compat_sigset_t compat_set; compat_sigset_t compat_set;
struct compat_rt_sigframe __user * compat_frame; struct compat_rt_sigframe __user * compat_frame;
...@@ -117,7 +117,7 @@ sys_rt_sigreturn(struct pt_regs *regs, int in_syscall) ...@@ -117,7 +117,7 @@ sys_rt_sigreturn(struct pt_regs *regs, int in_syscall)
(usp - sigframe_size); (usp - sigframe_size);
DBG(2,"sys_rt_sigreturn: frame is %p\n", frame); DBG(2,"sys_rt_sigreturn: frame is %p\n", frame);
#ifdef __LP64__ #ifdef CONFIG_64BIT
compat_frame = (struct compat_rt_sigframe __user *)frame; compat_frame = (struct compat_rt_sigframe __user *)frame;
if (is_compat_task()) { if (is_compat_task()) {
...@@ -139,7 +139,7 @@ sys_rt_sigreturn(struct pt_regs *regs, int in_syscall) ...@@ -139,7 +139,7 @@ sys_rt_sigreturn(struct pt_regs *regs, int in_syscall)
spin_unlock_irq(&current->sighand->siglock); spin_unlock_irq(&current->sighand->siglock);
/* Good thing we saved the old gr[30], eh? */ /* Good thing we saved the old gr[30], eh? */
#ifdef __LP64__ #ifdef CONFIG_64BIT
if (is_compat_task()) { if (is_compat_task()) {
DBG(1,"sys_rt_sigreturn: compat_frame->uc.uc_mcontext 0x%p\n", DBG(1,"sys_rt_sigreturn: compat_frame->uc.uc_mcontext 0x%p\n",
&compat_frame->uc.uc_mcontext); &compat_frame->uc.uc_mcontext);
...@@ -251,7 +251,7 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, ...@@ -251,7 +251,7 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
unsigned long rp, usp; unsigned long rp, usp;
unsigned long haddr, sigframe_size; unsigned long haddr, sigframe_size;
int err = 0; int err = 0;
#ifdef __LP64__ #ifdef CONFIG_64BIT
compat_int_t compat_val; compat_int_t compat_val;
struct compat_rt_sigframe __user * compat_frame; struct compat_rt_sigframe __user * compat_frame;
compat_sigset_t compat_set; compat_sigset_t compat_set;
...@@ -265,7 +265,7 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, ...@@ -265,7 +265,7 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
DBG(1,"setup_rt_frame: frame %p info %p\n", frame, info); DBG(1,"setup_rt_frame: frame %p info %p\n", frame, info);
#ifdef __LP64__ #ifdef CONFIG_64BIT
compat_frame = (struct compat_rt_sigframe __user *)frame; compat_frame = (struct compat_rt_sigframe __user *)frame;
...@@ -345,7 +345,7 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, ...@@ -345,7 +345,7 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
haddr = A(ka->sa.sa_handler); haddr = A(ka->sa.sa_handler);
/* The sa_handler may be a pointer to a function descriptor */ /* The sa_handler may be a pointer to a function descriptor */
#ifdef __LP64__ #ifdef CONFIG_64BIT
if (is_compat_task()) { if (is_compat_task()) {
#endif #endif
if (haddr & PA_PLABEL_FDESC) { if (haddr & PA_PLABEL_FDESC) {
...@@ -360,7 +360,7 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, ...@@ -360,7 +360,7 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
haddr = fdesc.addr; haddr = fdesc.addr;
regs->gr[19] = fdesc.gp; regs->gr[19] = fdesc.gp;
} }
#ifdef __LP64__ #ifdef CONFIG_64BIT
} else { } else {
Elf64_Fdesc fdesc; Elf64_Fdesc fdesc;
Elf64_Fdesc __user *ufdesc = (Elf64_Fdesc __user *)A(haddr & ~3); Elf64_Fdesc __user *ufdesc = (Elf64_Fdesc __user *)A(haddr & ~3);
...@@ -380,19 +380,19 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, ...@@ -380,19 +380,19 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
/* The syscall return path will create IAOQ values from r31. /* The syscall return path will create IAOQ values from r31.
*/ */
sigframe_size = PARISC_RT_SIGFRAME_SIZE; sigframe_size = PARISC_RT_SIGFRAME_SIZE;
#ifdef __LP64__ #ifdef CONFIG_64BIT
if (is_compat_task()) if (is_compat_task())
sigframe_size = PARISC_RT_SIGFRAME_SIZE32; sigframe_size = PARISC_RT_SIGFRAME_SIZE32;
#endif #endif
if (in_syscall) { if (in_syscall) {
regs->gr[31] = haddr; regs->gr[31] = haddr;
#ifdef __LP64__ #ifdef CONFIG_64BIT
if (!test_thread_flag(TIF_32BIT)) if (!test_thread_flag(TIF_32BIT))
sigframe_size |= 1; sigframe_size |= 1;
#endif #endif
} else { } else {
unsigned long psw = USER_PSW; unsigned long psw = USER_PSW;
#ifdef __LP64__ #ifdef CONFIG_64BIT
if (!test_thread_flag(TIF_32BIT)) if (!test_thread_flag(TIF_32BIT))
psw |= PSW_W; psw |= PSW_W;
#endif #endif
...@@ -417,7 +417,7 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, ...@@ -417,7 +417,7 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
regs->gr[2] = rp; /* userland return pointer */ regs->gr[2] = rp; /* userland return pointer */
regs->gr[26] = sig; /* signal number */ regs->gr[26] = sig; /* signal number */
#ifdef __LP64__ #ifdef CONFIG_64BIT
if (is_compat_task()) { if (is_compat_task()) {
regs->gr[25] = A(&compat_frame->info); /* siginfo pointer */ regs->gr[25] = A(&compat_frame->info); /* siginfo pointer */
regs->gr[24] = A(&compat_frame->uc); /* ucontext pointer */ regs->gr[24] = A(&compat_frame->uc); /* ucontext pointer */
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* Copyright (C) 2000 Grant Grundler <grundler at parisc-linux.org> * Copyright (C) 2000 Grant Grundler <grundler at parisc-linux.org>
* Copyright (C) 2001 Richard Hirst <rhirst with parisc-linux.org> * Copyright (C) 2001 Richard Hirst <rhirst with parisc-linux.org>
* Copyright (C) 2001-2002 Ryan Bradetich <rbrad at parisc-linux.org> * Copyright (C) 2001-2002 Ryan Bradetich <rbrad at parisc-linux.org>
* Copyright (C) 2001 Helge Deller <deller at parisc-linux.org> * Copyright (C) 2001-2007 Helge Deller <deller at parisc-linux.org>
* Copyright (C) 2000-2001 Thomas Bogendoerfer <tsbogend at parisc-linux.org> * Copyright (C) 2000-2001 Thomas Bogendoerfer <tsbogend at parisc-linux.org>
* Copyright (C) 2002 Randolph Chung <tausq with parisc-linux.org> * Copyright (C) 2002 Randolph Chung <tausq with parisc-linux.org>
* Copyright (C) 2005-2006 Kyle McMartin <kyle at parisc-linux.org> * Copyright (C) 2005-2006 Kyle McMartin <kyle at parisc-linux.org>
......
...@@ -64,7 +64,7 @@ static int printbinary(char *buf, unsigned long x, int nbits) ...@@ -64,7 +64,7 @@ static int printbinary(char *buf, unsigned long x, int nbits)
return nbits; return nbits;
} }
#ifdef __LP64__ #ifdef CONFIG_64BIT
#define RFMT "%016lx" #define RFMT "%016lx"
#else #else
#define RFMT "%08lx" #define RFMT "%08lx"
...@@ -837,7 +837,7 @@ int __init check_ivt(void *iva) ...@@ -837,7 +837,7 @@ int __init check_ivt(void *iva)
return 0; return 0;
} }
#ifndef __LP64__ #ifndef CONFIG_64BIT
extern const void fault_vector_11; extern const void fault_vector_11;
#endif #endif
extern const void fault_vector_20; extern const void fault_vector_20;
...@@ -849,7 +849,7 @@ void __init trap_init(void) ...@@ -849,7 +849,7 @@ void __init trap_init(void)
if (boot_cpu_data.cpu_type >= pcxu) if (boot_cpu_data.cpu_type >= pcxu)
iva = (void *) &fault_vector_20; iva = (void *) &fault_vector_20;
else else
#ifdef __LP64__ #ifdef CONFIG_64BIT
panic("Can't boot 64-bit OS on PA1.1 processor!"); panic("Can't boot 64-bit OS on PA1.1 processor!");
#else #else
iva = (void *) &fault_vector_11; iva = (void *) &fault_vector_11;
......
...@@ -17,7 +17,7 @@ raw_spinlock_t __atomic_hash[ATOMIC_HASH_SIZE] __lock_aligned = { ...@@ -17,7 +17,7 @@ raw_spinlock_t __atomic_hash[ATOMIC_HASH_SIZE] __lock_aligned = {
}; };
#endif #endif
#ifdef __LP64__ #ifdef CONFIG_64BIT
unsigned long __xchg64(unsigned long x, unsigned long *ptr) unsigned long __xchg64(unsigned long x, unsigned long *ptr)
{ {
unsigned long temp, flags; unsigned long temp, flags;
...@@ -56,7 +56,7 @@ unsigned long __xchg8(char x, char *ptr) ...@@ -56,7 +56,7 @@ unsigned long __xchg8(char x, char *ptr)
} }
#ifdef __LP64__ #ifdef CONFIG_64BIT
unsigned long __cmpxchg_u64(volatile unsigned long *ptr, unsigned long old, unsigned long new) unsigned long __cmpxchg_u64(volatile unsigned long *ptr, unsigned long old, unsigned long new)
{ {
unsigned long flags; unsigned long flags;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* changed by Philipp Rumpf * changed by Philipp Rumpf
* Copyright 1999 Philipp Rumpf (prumpf@tux.org) * Copyright 1999 Philipp Rumpf (prumpf@tux.org)
* Copyright 2004 Randolph Chung (tausq@debian.org) * Copyright 2004 Randolph Chung (tausq@debian.org)
* Copyright 2006 Helge Deller (deller@gmx.de) * Copyright 2006-2007 Helge Deller (deller@gmx.de)
* *
*/ */
...@@ -66,11 +66,11 @@ static struct resource sysram_resources[MAX_PHYSMEM_RANGES] __read_mostly; ...@@ -66,11 +66,11 @@ static struct resource sysram_resources[MAX_PHYSMEM_RANGES] __read_mostly;
physmem_range_t pmem_ranges[MAX_PHYSMEM_RANGES] __read_mostly; physmem_range_t pmem_ranges[MAX_PHYSMEM_RANGES] __read_mostly;
int npmem_ranges __read_mostly; int npmem_ranges __read_mostly;
#ifdef __LP64__ #ifdef CONFIG_64BIT
#define MAX_MEM (~0UL) #define MAX_MEM (~0UL)
#else /* !__LP64__ */ #else /* !CONFIG_64BIT */
#define MAX_MEM (3584U*1024U*1024U) #define MAX_MEM (3584U*1024U*1024U)
#endif /* !__LP64__ */ #endif /* !CONFIG_64BIT */
static unsigned long mem_limit __read_mostly = MAX_MEM; static unsigned long mem_limit __read_mostly = MAX_MEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment