summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@home.transmeta.com>2003-01-01 19:32:40 -0800
committerLinus Torvalds <torvalds@home.transmeta.com>2003-01-01 19:32:40 -0800
commit1e694d81643ba505d5bfbf9e1fd02dd5e983ced9 (patch)
tree55c3d487f90523233143c8b4c3146ece96fed0db /include
parentce17d12ebb9a7f278ea942c19e51258348f840f7 (diff)
parent6c0f62fcab44ce402bd40b97b8587b9fa6a6af1c (diff)
Merge http://ppc.bkbits.net/for-linus-ppc64
into home.transmeta.com:/home/torvalds/v2.5/linux
Diffstat (limited to 'include')
-rw-r--r--include/asm-ppc64/compat.h36
-rw-r--r--include/asm-ppc64/page.h2
-rw-r--r--include/asm-ppc64/pgtable.h4
-rw-r--r--include/asm-ppc64/ppc32.h64
-rw-r--r--include/asm-ppc64/prom.h11
-rw-r--r--include/asm-ppc64/smp.h2
-rw-r--r--include/asm-ppc64/tlb.h4
-rw-r--r--include/asm-ppc64/topology.h2
-rw-r--r--include/asm-ppc64/xics.h18
9 files changed, 74 insertions, 69 deletions
diff --git a/include/asm-ppc64/compat.h b/include/asm-ppc64/compat.h
index a397383110cd..8ad44c0e53d4 100644
--- a/include/asm-ppc64/compat.h
+++ b/include/asm-ppc64/compat.h
@@ -5,9 +5,25 @@
*/
#include <linux/types.h>
+#define COMPAT_USER_HZ 100
+
typedef u32 compat_size_t;
typedef s32 compat_ssize_t;
typedef s32 compat_time_t;
+typedef s32 compat_clock_t;
+typedef s32 compat_pid_t;
+typedef u32 compat_uid_t;
+typedef u32 compat_gid_t;
+typedef u32 compat_mode_t;
+typedef u32 compat_ino_t;
+typedef u32 compat_dev_t;
+typedef s32 compat_off_t;
+typedef s64 compat_loff_t;
+typedef s16 compat_nlink_t;
+typedef u16 compat_ipc_pid_t;
+typedef s32 compat_daddr_t;
+typedef u32 compat_caddr_t;
+typedef __kernel_fsid_t compat_fsid_t;
struct compat_timespec {
compat_time_t tv_sec;
@@ -19,4 +35,24 @@ struct compat_timeval {
s32 tv_usec;
};
+struct compat_stat {
+ compat_dev_t st_dev;
+ compat_ino_t st_ino;
+ compat_mode_t st_mode;
+ compat_nlink_t st_nlink;
+ compat_uid_t st_uid;
+ compat_gid_t st_gid;
+ compat_dev_t st_rdev;
+ compat_off_t st_size;
+ compat_off_t st_blksize;
+ compat_off_t st_blocks;
+ compat_time_t st_atime;
+ u32 __unused1;
+ compat_time_t st_mtime;
+ u32 __unused2;
+ compat_time_t st_ctime;
+ u32 __unused3;
+ u32 __unused4[2];
+};
+
#endif /* _ASM_PPC64_COMPAT_H */
diff --git a/include/asm-ppc64/page.h b/include/asm-ppc64/page.h
index 7eb130cd1ab8..feabff500b6c 100644
--- a/include/asm-ppc64/page.h
+++ b/include/asm-ppc64/page.h
@@ -48,7 +48,7 @@ static __inline__ void clear_page(void *addr)
lines = naca->dCacheL1LinesPerPage;
__asm__ __volatile__(
-" mtctr %1\n\
+ "mtctr %1 # clear_page\n\
1: dcbz 0,%0\n\
add %0,%0,%3\n\
bdnz+ 1b"
diff --git a/include/asm-ppc64/pgtable.h b/include/asm-ppc64/pgtable.h
index 80d3977cf73f..3b13d9cd1fd8 100644
--- a/include/asm-ppc64/pgtable.h
+++ b/include/asm-ppc64/pgtable.h
@@ -267,8 +267,8 @@ static inline unsigned long pte_update( pte_t *p, unsigned long clr,
{
unsigned long old, tmp;
- __asm__ __volatile__("\n\
-1: ldarx %0,0,%3 \n\
+ __asm__ __volatile__(
+ "1: ldarx %0,0,%3 # pte_update\n\
andc %1,%0,%4 \n\
or %1,%1,%5 \n\
stdcx. %1,0,%3 \n\
diff --git a/include/asm-ppc64/ppc32.h b/include/asm-ppc64/ppc32.h
index 1b39c4908205..5b7a8dc91bda 100644
--- a/include/asm-ppc64/ppc32.h
+++ b/include/asm-ppc64/ppc32.h
@@ -14,11 +14,6 @@
* 2 of the License, or (at your option) any later version.
*/
-#ifndef __KERNEL_STRICT_NAMES
-#include <linux/types.h>
-typedef __kernel_fsid_t __kernel_fsid_t32;
-#endif
-
/* Use this to get at 32-bit user passed pointers. */
/* Things to consider: the low-level assembly stub does
srl x, 0, x for first four arguments, so if you have
@@ -44,21 +39,6 @@ typedef __kernel_fsid_t __kernel_fsid_t32;
})
/* These are here to support 32-bit syscalls on a 64-bit kernel. */
-typedef int __kernel_ptrdiff_t32;
-typedef int __kernel_clock_t32;
-typedef int __kernel_pid_t32;
-typedef unsigned short __kernel_ipc_pid_t32;
-typedef unsigned int __kernel_uid_t32;
-typedef unsigned int __kernel_gid_t32;
-typedef unsigned int __kernel_dev_t32;
-typedef unsigned int __kernel_ino_t32;
-typedef unsigned int __kernel_mode_t32;
-typedef unsigned int __kernel_umode_t32;
-typedef short __kernel_nlink_t32;
-typedef int __kernel_daddr_t32;
-typedef int __kernel_off_t32;
-typedef unsigned int __kernel_caddr_t32;
-typedef int __kernel_loff_t32;
struct statfs32 {
int f_type;
@@ -68,7 +48,7 @@ struct statfs32 {
int f_bavail;
int f_files;
int f_ffree;
- __kernel_fsid_t32 f_fsid;
+ compat_fsid_t f_fsid;
int f_namelen; /* SunOS ignores this field. */
int f_spare[6];
};
@@ -88,8 +68,8 @@ typedef struct siginfo32 {
/* kill() */
struct {
- __kernel_pid_t32 _pid; /* sender's pid */
- __kernel_uid_t32 _uid; /* sender's uid */
+ compat_pid_t _pid; /* sender's pid */
+ compat_uid_t _uid; /* sender's uid */
} _kill;
/* POSIX.1b timers */
@@ -100,18 +80,18 @@ typedef struct siginfo32 {
/* POSIX.1b signals */
struct {
- __kernel_pid_t32 _pid; /* sender's pid */
- __kernel_uid_t32 _uid; /* sender's uid */
+ compat_pid_t _pid; /* sender's pid */
+ compat_uid_t _uid; /* sender's uid */
sigval_t32 _sigval;
} _rt;
/* SIGCHLD */
struct {
- __kernel_pid_t32 _pid; /* which child */
- __kernel_uid_t32 _uid; /* sender's uid */
+ compat_pid_t _pid; /* which child */
+ compat_uid_t _uid; /* sender's uid */
int _status; /* exit code */
- __kernel_clock_t32 _utime;
- __kernel_clock_t32 _stime;
+ compat_clock_t _utime;
+ compat_clock_t _stime;
} _sigchld;
/* SIGILL, SIGFPE, SIGSEGV, SIGBUS, SIGEMT */
@@ -164,32 +144,12 @@ typedef struct sigaltstack_32 {
struct flock32 {
short l_type;
short l_whence;
- __kernel_off_t32 l_start;
- __kernel_off_t32 l_len;
- __kernel_pid_t32 l_pid;
+ compat_off_t l_start;
+ compat_off_t l_len;
+ compat_pid_t l_pid;
short __unused;
};
-struct stat32 {
- __kernel_dev_t32 st_dev; /* 2 */
- __kernel_ino_t32 st_ino; /* 4 */
- __kernel_mode_t32 st_mode; /* 2 */
- short st_nlink; /* 2 */
- __kernel_uid_t32 st_uid; /* 2 */
- __kernel_gid_t32 st_gid; /* 2 */
- __kernel_dev_t32 st_rdev; /* 2 */
- __kernel_off_t32 st_size; /* 4 */
- __kernel_off_t32 st_blksize; /* 4 */
- __kernel_off_t32 st_blocks; /* 4 */
- compat_time_t st_atime; /* 4 */
- unsigned int __unused1; /* 4 */
- compat_time_t st_mtime; /* 4 */
- unsigned int __unused2; /* 4 */
- compat_time_t st_ctime; /* 4 */
- unsigned int __unused3; /* 4 */
- unsigned int __unused4[2]; /* 2*4 */
-};
-
struct sigcontext32 {
unsigned int _unused[4];
int signal;
diff --git a/include/asm-ppc64/prom.h b/include/asm-ppc64/prom.h
index dbe1889b3184..1af24acffb7e 100644
--- a/include/asm-ppc64/prom.h
+++ b/include/asm-ppc64/prom.h
@@ -155,12 +155,6 @@ struct prom_args {
prom_arg_t *rets; /* Pointer to return values in args[16]. */
};
-typedef struct {
- u32 printf; /* void (*printf)(char *, ...); */
- u32 memdump; /* void (*memdump)(unsigned char *, unsigned long); */
- u32 dummy; /* void (*dummy)(void); */
-} yaboot_debug_t;
-
struct prom_t {
unsigned long entry;
ihandle chosen;
@@ -171,9 +165,6 @@ struct prom_t {
unsigned long version;
unsigned long encode_phys_size;
struct bi_record *bi_recs;
-#ifdef DEBUG_YABOOT
- yaboot_debug_t *yaboot;
-#endif
};
extern struct prom_t prom;
@@ -183,7 +174,7 @@ extern int boot_cpuid;
/* Prototypes */
extern void abort(void);
extern unsigned long prom_init(unsigned long, unsigned long, unsigned long,
- unsigned long, unsigned long, yaboot_debug_t *);
+ unsigned long, unsigned long);
extern void prom_print(const char *msg);
extern void relocate_nodes(void);
extern void finish_device_tree(void);
diff --git a/include/asm-ppc64/smp.h b/include/asm-ppc64/smp.h
index e5df63d903ed..0dd474425342 100644
--- a/include/asm-ppc64/smp.h
+++ b/include/asm-ppc64/smp.h
@@ -52,7 +52,7 @@ static inline int num_online_cpus(void)
return nr;
}
-extern volatile unsigned long cpu_callin_map[NR_CPUS];
+extern volatile unsigned int cpu_callin_map[NR_CPUS];
#define smp_processor_id() (get_paca()->xPacaIndex)
diff --git a/include/asm-ppc64/tlb.h b/include/asm-ppc64/tlb.h
index b44c7a071892..2c0903092ffb 100644
--- a/include/asm-ppc64/tlb.h
+++ b/include/asm-ppc64/tlb.h
@@ -62,7 +62,7 @@ static inline void __tlb_remove_tlb_entry(mmu_gather_t *tlb, pte_t *ptep,
if (i == PPC64_TLB_BATCH_NR) {
int local = 0;
- if (tlb->mm->cpu_vm_mask == (1 << cpu))
+ if (tlb->mm->cpu_vm_mask == (1UL << cpu))
local = 1;
flush_hash_range(tlb->mm->context, i, local);
@@ -80,7 +80,7 @@ static inline void tlb_flush(struct free_pte_ctx *tlb)
struct ppc64_tlb_batch *batch = &ppc64_tlb_batch[cpu];
int local = 0;
- if (tlb->mm->cpu_vm_mask == (1 << smp_processor_id()))
+ if (tlb->mm->cpu_vm_mask == (1UL << smp_processor_id()))
local = 1;
flush_hash_range(tlb->mm->context, batch->index, local);
diff --git a/include/asm-ppc64/topology.h b/include/asm-ppc64/topology.h
index d70184399d76..66e2546216c7 100644
--- a/include/asm-ppc64/topology.h
+++ b/include/asm-ppc64/topology.h
@@ -41,7 +41,7 @@ static inline unsigned long __node_to_cpu_mask(int node)
for(cpu = 0; cpu < NR_CPUS; cpu++)
if (numa_cpu_lookup_table[cpu] == node)
- mask |= 1 << cpu;
+ mask |= 1UL << cpu;
return mask;
}
diff --git a/include/asm-ppc64/xics.h b/include/asm-ppc64/xics.h
new file mode 100644
index 000000000000..8db0fc4445ee
--- /dev/null
+++ b/include/asm-ppc64/xics.h
@@ -0,0 +1,18 @@
+/*
+ * arch/ppc64/kernel/xics.h
+ *
+ * Copyright 2000 IBM Corporation.
+ *
+ * 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 the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#ifndef _PPC64_KERNEL_XICS_H
+#define _PPC64_KERNEL_XICS_H
+
+void xics_init_IRQ(void);
+int xics_get_irq(struct pt_regs *);
+
+#endif /* _PPC64_KERNEL_XICS_H */