Skip to content

Commit a8f44e3

Browse files
hdellerKyle McMartin
authored andcommitted
[PARISC] use CONFIG_64BIT instead of __LP64__
- additionally update my copyright timestamps Signed-off-by: Helge Deller <deller@gmx.de> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
1 parent 0b3d643 commit a8f44e3

14 files changed

Lines changed: 67 additions & 67 deletions

File tree

‎arch/parisc/kernel/asm-offsets.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444

4545
#define BLANK() asm volatile("\n->" : : )
4646

47-
#ifdef __LP64__
47+
#ifdef CONFIG_64BIT
4848
#define FRAME_SIZE 128
4949
#else
5050
#define FRAME_SIZE 64

‎arch/parisc/kernel/firmware.c‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ static DEFINE_SPINLOCK(pdc_lock);
7474
static unsigned long pdc_result[32] __attribute__ ((aligned (8)));
7575
static unsigned long pdc_result2[32] __attribute__ ((aligned (8)));
7676

77-
#ifdef __LP64__
77+
#ifdef CONFIG_64BIT
7878
#define WIDE_FIRMWARE 0x1
7979
#define NARROW_FIRMWARE 0x2
8080

@@ -94,12 +94,12 @@ int parisc_narrow_firmware __read_mostly = 1;
9494
* when running a 64-bit kernel on such boxes (e.g. C200 or C360).
9595
*/
9696

97-
#ifdef __LP64__
97+
#ifdef CONFIG_64BIT
9898
long real64_call(unsigned long function, ...);
9999
#endif
100100
long real32_call(unsigned long function, ...);
101101

102-
#ifdef __LP64__
102+
#ifdef CONFIG_64BIT
103103
# define MEM_PDC (unsigned long)(PAGE0->mem_pdc_hi) << 32 | PAGE0->mem_pdc
104104
# define mem_pdc_call(args...) unlikely(parisc_narrow_firmware) ? real32_call(MEM_PDC, args) : real64_call(MEM_PDC, args)
105105
#else
@@ -117,7 +117,7 @@ long real32_call(unsigned long function, ...);
117117
*/
118118
static unsigned long f_extend(unsigned long address)
119119
{
120-
#ifdef __LP64__
120+
#ifdef CONFIG_64BIT
121121
if(unlikely(parisc_narrow_firmware)) {
122122
if((address & 0xff000000) == 0xf0000000)
123123
return 0xf0f0f0f000000000UL | (u32)address;
@@ -139,7 +139,7 @@ static unsigned long f_extend(unsigned long address)
139139
*/
140140
static void convert_to_wide(unsigned long *addr)
141141
{
142-
#ifdef __LP64__
142+
#ifdef CONFIG_64BIT
143143
int i;
144144
unsigned int *p = (unsigned int *)addr;
145145

@@ -158,7 +158,7 @@ static void convert_to_wide(unsigned long *addr)
158158
*/
159159
void __init set_firmware_width(void)
160160
{
161-
#ifdef __LP64__
161+
#ifdef CONFIG_64BIT
162162
int retval;
163163
unsigned long flags;
164164

@@ -238,7 +238,7 @@ int __init pdc_chassis_info(struct pdc_chassis_info *chassis_info, void *led_inf
238238
*
239239
* Must be correctly formatted or expect system crash
240240
*/
241-
#ifdef __LP64__
241+
#ifdef CONFIG_64BIT
242242
int pdc_pat_chassis_send_log(unsigned long state, unsigned long data)
243243
{
244244
int retval = 0;
@@ -949,7 +949,7 @@ int pdc_tod_set(unsigned long sec, unsigned long usec)
949949
}
950950
EXPORT_SYMBOL(pdc_tod_set);
951951

952-
#ifdef __LP64__
952+
#ifdef CONFIG_64BIT
953953
int pdc_mem_mem_table(struct pdc_memory_table_raddr *r_addr,
954954
struct pdc_memory_table *tbl, unsigned long entries)
955955
{
@@ -965,7 +965,7 @@ int pdc_mem_mem_table(struct pdc_memory_table_raddr *r_addr,
965965

966966
return retval;
967967
}
968-
#endif /* __LP64__ */
968+
#endif /* CONFIG_64BIT */
969969

970970
/* FIXME: Is this pdc used? I could not find type reference to ftc_bitmap
971971
* 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,
12041204
}
12051205
EXPORT_SYMBOL(pdc_sti_call);
12061206

1207-
#ifdef __LP64__
1207+
#ifdef CONFIG_64BIT
12081208
/**
12091209
* pdc_pat_cell_get_number - Returns the cell number.
12101210
* @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)
13871387

13881388
return retval;
13891389
}
1390-
#endif /* __LP64__ */
1390+
#endif /* CONFIG_64BIT */
13911391

13921392

13931393
/***************** 32-bit real-mode calls ***********/
@@ -1445,7 +1445,7 @@ long real32_call(unsigned long fn, ...)
14451445
return real32_call_asm(&real_stack.sp, &real_stack.arg0, fn);
14461446
}
14471447

1448-
#ifdef __LP64__
1448+
#ifdef CONFIG_64BIT
14491449
/***************** 64-bit real-mode calls ***********/
14501450

14511451
struct wide_stack {
@@ -1496,5 +1496,5 @@ long real64_call(unsigned long fn, ...)
14961496
return real64_call_asm(&real64_stack.sp, &real64_stack.arg0, fn);
14971497
}
14981498

1499-
#endif /* __LP64__ */
1499+
#endif /* CONFIG_64BIT */
15001500

‎arch/parisc/kernel/inventory.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ void __init setup_pdc(void)
4747
struct pdc_system_map_mod_info module_result;
4848
struct pdc_module_path module_path;
4949
struct pdc_model model;
50-
#ifdef __LP64__
50+
#ifdef CONFIG_64BIT
5151
struct pdc_pat_cell_num cell_info;
5252
#endif
5353

@@ -73,7 +73,7 @@ void __init setup_pdc(void)
7373
* clearer message.
7474
*/
7575

76-
#ifdef __LP64__
76+
#ifdef CONFIG_64BIT
7777
status = pdc_pat_cell_get_number(&cell_info);
7878
if (status == PDC_OK) {
7979
pdc_type = PDC_TYPE_PAT;
@@ -152,7 +152,7 @@ static void __init pagezero_memconfig(void)
152152
npmem_ranges = 1;
153153
}
154154

155-
#ifdef __LP64__
155+
#ifdef CONFIG_64BIT
156156

157157
/* All of the PDC PAT specific code is 64-bit only */
158158

@@ -408,13 +408,13 @@ static void __init sprockets_memconfig(void)
408408
}
409409
}
410410

411-
#else /* !__LP64__ */
411+
#else /* !CONFIG_64BIT */
412412

413413
#define pat_inventory() do { } while (0)
414414
#define pat_memconfig() do { } while (0)
415415
#define sprockets_memconfig() pagezero_memconfig()
416416

417-
#endif /* !__LP64__ */
417+
#endif /* !CONFIG_64BIT */
418418

419419

420420
#ifndef CONFIG_PA20

‎arch/parisc/kernel/module.c‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ static inline int in_local_section(struct module *me, void *loc, void *dot)
9797
}
9898

9999

100-
#ifndef __LP64__
100+
#ifndef CONFIG_64BIT
101101
struct got_entry {
102102
Elf32_Addr addr;
103103
};
@@ -177,7 +177,7 @@ void *module_alloc(unsigned long size)
177177
return vmalloc(size);
178178
}
179179

180-
#ifndef __LP64__
180+
#ifndef CONFIG_64BIT
181181
static inline unsigned long count_gots(const Elf_Rela *rela, unsigned long n)
182182
{
183183
return 0;
@@ -320,7 +320,7 @@ int module_frob_arch_sections(CONST Elf_Ehdr *hdr,
320320
return 0;
321321
}
322322

323-
#ifdef __LP64__
323+
#ifdef CONFIG_64BIT
324324
static Elf64_Word get_got(struct module *me, unsigned long value, long addend)
325325
{
326326
unsigned int i;
@@ -343,9 +343,9 @@ static Elf64_Word get_got(struct module *me, unsigned long value, long addend)
343343
value);
344344
return i * sizeof(struct got_entry);
345345
}
346-
#endif /* __LP64__ */
346+
#endif /* CONFIG_64BIT */
347347

348-
#ifdef __LP64__
348+
#ifdef CONFIG_64BIT
349349
static Elf_Addr get_fdesc(struct module *me, unsigned long value)
350350
{
351351
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)
369369
fdesc->gp = (Elf_Addr)me->module_core + me->arch.got_offset;
370370
return (Elf_Addr)fdesc;
371371
}
372-
#endif /* __LP64__ */
372+
#endif /* CONFIG_64BIT */
373373

374374
enum elf_stub_type {
375375
ELF_STUB_GOT,
@@ -395,7 +395,7 @@ static Elf_Addr get_stub(struct module *me, unsigned long value, long addend,
395395
i * sizeof(struct stub_entry);
396396
}
397397

398-
#ifndef __LP64__
398+
#ifndef CONFIG_64BIT
399399
/* for 32-bit the stub looks like this:
400400
* ldil L'XXX,%r1
401401
* be,n R'XXX(%sr4,%r1)
@@ -473,7 +473,7 @@ int apply_relocate(Elf_Shdr *sechdrs,
473473
return -ENOEXEC;
474474
}
475475

476-
#ifndef __LP64__
476+
#ifndef CONFIG_64BIT
477477
int apply_relocate_add(Elf_Shdr *sechdrs,
478478
const char *strtab,
479479
unsigned int symindex,

‎arch/parisc/kernel/parisc_ksyms.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Copyright (C) 2001-2003 Grant Grundler <grundler with parisc-linux.org>
88
* Copyright (C) 2002-2003 Matthew Wilcox <willy at parisc-linux.org>
99
* Copyright (C) 2002 Randolph Chung <tausq at parisc-linux.org>
10-
* Copyright (C) 2002-2003 Helge Deller <deller with parisc-linux.org>
10+
* Copyright (C) 2002-2007 Helge Deller <deller with parisc-linux.org>
1111
*
1212
* This program is free software; you can redistribute it and/or modify
1313
* it under the terms of the GNU General Public License as published by
@@ -38,7 +38,7 @@ EXPORT_SYMBOL(__cmpxchg_u32);
3838
#ifdef CONFIG_SMP
3939
EXPORT_SYMBOL(__atomic_hash);
4040
#endif
41-
#ifdef __LP64__
41+
#ifdef CONFIG_64BIT
4242
EXPORT_SYMBOL(__xchg64);
4343
EXPORT_SYMBOL(__cmpxchg_u64);
4444
#endif
@@ -58,7 +58,7 @@ EXPORT_SYMBOL(fixup_get_user_skip_2);
5858
EXPORT_SYMBOL(fixup_put_user_skip_1);
5959
EXPORT_SYMBOL(fixup_put_user_skip_2);
6060

61-
#ifndef __LP64__
61+
#ifndef CONFIG_64BIT
6262
/* Needed so insmod can set dp value */
6363
extern int $global$;
6464
EXPORT_SYMBOL($global$);
@@ -135,7 +135,7 @@ EXPORT_SYMBOL(__muldi3);
135135
asmlinkage void * __canonicalize_funcptr_for_compare(void *);
136136
EXPORT_SYMBOL(__canonicalize_funcptr_for_compare);
137137

138-
#ifdef __LP64__
138+
#ifdef CONFIG_64BIT
139139
extern void __divdi3(void);
140140
extern void __udivdi3(void);
141141
extern void __umoddi3(void);
@@ -147,7 +147,7 @@ EXPORT_SYMBOL(__umoddi3);
147147
EXPORT_SYMBOL(__moddi3);
148148
#endif
149149

150-
#ifndef __LP64__
150+
#ifndef CONFIG_64BIT
151151
extern void $$dyncall(void);
152152
EXPORT_SYMBOL($$dyncall);
153153
#endif

‎arch/parisc/kernel/process.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* Copyright (C) 2000 Grant Grundler <grundler with parisc-linux.org>
1414
* Copyright (C) 2001 Alan Modra <amodra at parisc-linux.org>
1515
* Copyright (C) 2001-2002 Ryan Bradetich <rbrad at parisc-linux.org>
16-
* Copyright (C) 2001-2002 Helge Deller <deller at parisc-linux.org>
16+
* Copyright (C) 2001-2007 Helge Deller <deller at parisc-linux.org>
1717
* Copyright (C) 2002 Randolph Chung <tausq with parisc-linux.org>
1818
*
1919
*
@@ -303,7 +303,7 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
303303
* Copy function and argument to be called from
304304
* ret_from_kernel_thread.
305305
*/
306-
#ifdef __LP64__
306+
#ifdef CONFIG_64BIT
307307
cregs->gr[27] = pregs->gr[27];
308308
#endif
309309
cregs->gr[26] = pregs->gr[26];

‎arch/parisc/kernel/processor.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ static int __init processor_probe(struct parisc_device *dev)
9393
cpuid = boot_cpu_data.cpu_count;
9494
txn_addr = dev->hpa.start; /* for legacy PDC */
9595

96-
#ifdef __LP64__
96+
#ifdef CONFIG_64BIT
9797
if (is_pdc_pat()) {
9898
ulong status;
9999
unsigned long bytecnt;
@@ -309,11 +309,11 @@ int __init init_per_cpu(int cpunum)
309309
} else {
310310
printk(KERN_WARNING "WARNING: No FP CoProcessor?!"
311311
" (coproc_cfg.ccr_functional == 0x%lx, expected 0xc0)\n"
312-
#ifdef __LP64__
312+
#ifdef CONFIG_64BIT
313313
"Halting Machine - FP required\n"
314314
#endif
315315
, coproc_cfg.ccr_functional);
316-
#ifdef __LP64__
316+
#ifdef CONFIG_64BIT
317317
mdelay(100); /* previous chars get pushed to console */
318318
panic("FP CoProc not reported");
319319
#endif

‎arch/parisc/kernel/ptrace.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
#define DBG(x...)
3737
#endif
3838

39-
#ifdef __LP64__
39+
#ifdef CONFIG_64BIT
4040

4141
/* This function is needed to translate 32 bit pt_regs offsets in to
4242
* 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)
9090
case PTRACE_PEEKDATA: {
9191
int copied;
9292

93-
#ifdef __LP64__
93+
#ifdef CONFIG_64BIT
9494
if (__is_compat_task(child)) {
9595
unsigned int tmp;
9696

@@ -122,7 +122,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
122122
case PTRACE_POKETEXT: /* write the word at location addr. */
123123
case PTRACE_POKEDATA:
124124
ret = 0;
125-
#ifdef __LP64__
125+
#ifdef CONFIG_64BIT
126126
if (__is_compat_task(child)) {
127127
unsigned int tmp = (unsigned int)data;
128128
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)
145145
processes, the kernel saves all regs on a syscall. */
146146
case PTRACE_PEEKUSR: {
147147
ret = -EIO;
148-
#ifdef __LP64__
148+
#ifdef CONFIG_64BIT
149149
if (__is_compat_task(child)) {
150150
unsigned int tmp;
151151

@@ -204,7 +204,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
204204
ret = 0;
205205
goto out_tsk;
206206
}
207-
#ifdef __LP64__
207+
#ifdef CONFIG_64BIT
208208
if (__is_compat_task(child)) {
209209
if (addr & (sizeof(int)-1))
210210
goto out_tsk;

‎arch/parisc/kernel/setup.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,21 +120,21 @@ extern void collect_boot_cpu_data(void);
120120

121121
void __init setup_arch(char **cmdline_p)
122122
{
123-
#ifdef __LP64__
123+
#ifdef CONFIG_64BIT
124124
extern int parisc_narrow_firmware;
125125
#endif
126126

127127
init_per_cpu(smp_processor_id()); /* Set Modes & Enable FP */
128128

129-
#ifdef __LP64__
129+
#ifdef CONFIG_64BIT
130130
printk(KERN_INFO "The 64-bit Kernel has started...\n");
131131
#else
132132
printk(KERN_INFO "The 32-bit Kernel has started...\n");
133133
#endif
134134

135135
pdc_console_init();
136136

137-
#ifdef __LP64__
137+
#ifdef CONFIG_64BIT
138138
if(parisc_narrow_firmware) {
139139
printk(KERN_INFO "Kernel is using PDC in 32-bit mode.\n");
140140
}

0 commit comments

Comments
 (0)