aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjdl@freescale.com <jdl@freescale.com>2005-09-07 16:59:48 -0400
committerPaul Mackerras <paulus@samba.org>2005-09-09 08:11:35 -0400
commitdd56fdf23dfa0127d512b73d4238dbd2b5a7c1eb (patch)
tree59f952b87d4bec5f11c578a384c3aaa2ddf5860d
parent64807081e38703617cf9a5d71db14ea2b3e1cb04 (diff)
[PATCH] powerpc: Merge a few more include files
Merge a few asm-ppc and asm-ppc64 header files. Note: the merge of setup.h intentionally does not carry forward the m68k cruft. That means this patch continues to break the already broken amiga on the ppc32. Signed-off-by: Jon Loeliger <jdl@freescale.com> Signed-off-by: Kumar Gala <kumar.gala@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r--include/asm-powerpc/msgbuf.h (renamed from include/asm-ppc/msgbuf.h)16
-rw-r--r--include/asm-powerpc/param.h (renamed from include/asm-ppc/param.h)8
-rw-r--r--include/asm-powerpc/setup.h9
-rw-r--r--include/asm-powerpc/timex.h (renamed from include/asm-ppc/timex.h)37
-rw-r--r--include/asm-powerpc/topology.h (renamed from include/asm-ppc64/topology.h)9
-rw-r--r--include/asm-powerpc/user.h (renamed from include/asm-ppc/user.h)15
-rw-r--r--include/asm-ppc/setup.h14
-rw-r--r--include/asm-ppc/topology.h6
-rw-r--r--include/asm-ppc64/msgbuf.h27
-rw-r--r--include/asm-ppc64/param.h31
-rw-r--r--include/asm-ppc64/setup.h6
-rw-r--r--include/asm-ppc64/timex.h26
-rw-r--r--include/asm-ppc64/user.h58
13 files changed, 61 insertions, 201 deletions
diff --git a/include/asm-ppc/msgbuf.h b/include/asm-powerpc/msgbuf.h
index 1053452a9376..dd76743c7537 100644
--- a/include/asm-ppc/msgbuf.h
+++ b/include/asm-powerpc/msgbuf.h
@@ -1,17 +1,25 @@
1#ifndef _PPC_MSGBUF_H 1#ifndef _ASM_POWERPC_MSGBUF_H
2#define _PPC_MSGBUF_H 2#define _ASM_POWERPC_MSGBUF_H
3 3
4/* 4/*
5 * The msqid64_ds structure for the PPC architecture. 5 * The msqid64_ds structure for the PowerPC architecture.
6 * Note extra padding because this structure is passed back and forth
7 * between kernel and user space.
6 */ 8 */
7 9
8struct msqid64_ds { 10struct msqid64_ds {
9 struct ipc64_perm msg_perm; 11 struct ipc64_perm msg_perm;
12#ifndef __powerpc64__
10 unsigned int __unused1; 13 unsigned int __unused1;
14#endif
11 __kernel_time_t msg_stime; /* last msgsnd time */ 15 __kernel_time_t msg_stime; /* last msgsnd time */
16#ifndef __powerpc64__
12 unsigned int __unused2; 17 unsigned int __unused2;
18#endif
13 __kernel_time_t msg_rtime; /* last msgrcv time */ 19 __kernel_time_t msg_rtime; /* last msgrcv time */
20#ifndef __powerpc64__
14 unsigned int __unused3; 21 unsigned int __unused3;
22#endif
15 __kernel_time_t msg_ctime; /* last change time */ 23 __kernel_time_t msg_ctime; /* last change time */
16 unsigned long msg_cbytes; /* current number of bytes on queue */ 24 unsigned long msg_cbytes; /* current number of bytes on queue */
17 unsigned long msg_qnum; /* number of messages in queue */ 25 unsigned long msg_qnum; /* number of messages in queue */
@@ -22,4 +30,4 @@ struct msqid64_ds {
22 unsigned long __unused5; 30 unsigned long __unused5;
23}; 31};
24 32
25#endif /* _PPC_MSGBUF_H */ 33#endif /* _ASM_POWERPC_MSGBUF_H */
diff --git a/include/asm-ppc/param.h b/include/asm-powerpc/param.h
index 6198b1657a45..bdc724f70884 100644
--- a/include/asm-ppc/param.h
+++ b/include/asm-powerpc/param.h
@@ -1,10 +1,10 @@
1#ifndef _ASM_PPC_PARAM_H 1#ifndef _ASM_POWERPC_PARAM_H
2#define _ASM_PPC_PARAM_H 2#define _ASM_POWERPC_PARAM_H
3 3
4#include <linux/config.h> 4#include <linux/config.h>
5 5
6#ifdef __KERNEL__ 6#ifdef __KERNEL__
7#define HZ CONFIG_HZ /* internal timer frequency */ 7#define HZ CONFIG_HZ /* internal kernel timer frequency */
8#define USER_HZ 100 /* for user interfaces in "ticks" */ 8#define USER_HZ 100 /* for user interfaces in "ticks" */
9#define CLOCKS_PER_SEC (USER_HZ) /* frequency at which times() counts */ 9#define CLOCKS_PER_SEC (USER_HZ) /* frequency at which times() counts */
10#endif /* __KERNEL__ */ 10#endif /* __KERNEL__ */
@@ -21,4 +21,4 @@
21 21
22#define MAXHOSTNAMELEN 64 /* max length of hostname */ 22#define MAXHOSTNAMELEN 64 /* max length of hostname */
23 23
24#endif 24#endif /* _ASM_POWERPC_PARAM_H */
diff --git a/include/asm-powerpc/setup.h b/include/asm-powerpc/setup.h
new file mode 100644
index 000000000000..3d9740aae018
--- /dev/null
+++ b/include/asm-powerpc/setup.h
@@ -0,0 +1,9 @@
1#ifndef _ASM_POWERPC_SETUP_H
2#define _ASM_POWERPC_SETUP_H
3
4#ifdef __KERNEL__
5
6#define COMMAND_LINE_SIZE 512
7
8#endif /* __KERNEL__ */
9#endif /* _ASM_POWERPC_SETUP_H */
diff --git a/include/asm-ppc/timex.h b/include/asm-powerpc/timex.h
index cffc8712077c..51c5b316be55 100644
--- a/include/asm-ppc/timex.h
+++ b/include/asm-powerpc/timex.h
@@ -1,11 +1,11 @@
1#ifndef _ASM_POWERPC_TIMEX_H
2#define _ASM_POWERPC_TIMEX_H
3
4#ifdef __KERNEL__
5
1/* 6/*
2 * include/asm-ppc/timex.h 7 * PowerPC architecture timex specifications
3 *
4 * ppc architecture timex specifications
5 */ 8 */
6#ifdef __KERNEL__
7#ifndef _ASMppc_TIMEX_H
8#define _ASMppc_TIMEX_H
9 9
10#include <linux/config.h> 10#include <linux/config.h>
11#include <asm/cputable.h> 11#include <asm/cputable.h>
@@ -14,14 +14,21 @@
14 14
15typedef unsigned long cycles_t; 15typedef unsigned long cycles_t;
16 16
17/*
18 * For the "cycle" counter we use the timebase lower half.
19 * Currently only used on SMP.
20 */
21
22static inline cycles_t get_cycles(void) 17static inline cycles_t get_cycles(void)
23{ 18{
24 cycles_t ret = 0; 19 cycles_t ret;
20
21#ifdef __powerpc64__
22
23 __asm__ __volatile__("mftb %0" : "=r" (ret) : );
24
25#else
26 /*
27 * For the "cycle" counter we use the timebase lower half.
28 * Currently only used on SMP.
29 */
30
31 ret = 0;
25 32
26 __asm__ __volatile__( 33 __asm__ __volatile__(
27 "98: mftb %0\n" 34 "98: mftb %0\n"
@@ -33,8 +40,10 @@ static inline cycles_t get_cycles(void)
33 " .long 99b\n" 40 " .long 99b\n"
34 ".previous" 41 ".previous"
35 : "=r" (ret) : "i" (CPU_FTR_601)); 42 : "=r" (ret) : "i" (CPU_FTR_601));
43#endif
44
36 return ret; 45 return ret;
37} 46}
38 47
39#endif 48#endif /* __KERNEL__ */
40#endif /* __KERNEL__ */ 49#endif /* _ASM_POWERPC_TIMEX_H */
diff --git a/include/asm-ppc64/topology.h b/include/asm-powerpc/topology.h
index 1e9b19073230..2512e3836bf4 100644
--- a/include/asm-ppc64/topology.h
+++ b/include/asm-powerpc/topology.h
@@ -1,11 +1,12 @@
1#ifndef _ASM_PPC64_TOPOLOGY_H 1#ifndef _ASM_POWERPC_TOPOLOGY_H
2#define _ASM_PPC64_TOPOLOGY_H 2#define _ASM_POWERPC_TOPOLOGY_H
3 3
4#include <linux/config.h> 4#include <linux/config.h>
5#include <asm/mmzone.h>
6 5
7#ifdef CONFIG_NUMA 6#ifdef CONFIG_NUMA
8 7
8#include <asm/mmzone.h>
9
9static inline int cpu_to_node(int cpu) 10static inline int cpu_to_node(int cpu)
10{ 11{
11 int node; 12 int node;
@@ -66,4 +67,4 @@ static inline int node_to_first_cpu(int node)
66 67
67#endif /* CONFIG_NUMA */ 68#endif /* CONFIG_NUMA */
68 69
69#endif /* _ASM_PPC64_TOPOLOGY_H */ 70#endif /* _ASM_POWERPC_TOPOLOGY_H */
diff --git a/include/asm-ppc/user.h b/include/asm-powerpc/user.h
index d662b2151370..e59ade4b3dfb 100644
--- a/include/asm-ppc/user.h
+++ b/include/asm-powerpc/user.h
@@ -1,13 +1,14 @@
1#ifdef __KERNEL__ 1#ifndef _ASM_POWERPC_USER_H
2#ifndef _PPC_USER_H 2#define _ASM_POWERPC_USER_H
3#define _PPC_USER_H
4 3
5/* Adapted from <asm-alpha/user.h> */ 4#ifdef __KERNEL__
6 5
7#include <linux/ptrace.h> 6#include <asm/ptrace.h>
8#include <asm/page.h> 7#include <asm/page.h>
9 8
10/* 9/*
10 * Adapted from <asm-alpha/user.h>
11 *
11 * Core file format: The core file is written in such a way that gdb 12 * Core file format: The core file is written in such a way that gdb
12 * can understand it and provide useful information to the user (under 13 * can understand it and provide useful information to the user (under
13 * linux we use the `trad-core' bfd, NOT the osf-core). The file contents 14 * linux we use the `trad-core' bfd, NOT the osf-core). The file contents
@@ -50,5 +51,5 @@ struct user {
50#define HOST_DATA_START_ADDR (u.start_data) 51#define HOST_DATA_START_ADDR (u.start_data)
51#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) 52#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
52 53
53#endif /* _PPC_USER_H */ 54#endif /* __KERNEL__ */
54#endif /* __KERNEL__ */ 55#endif /* _ASM_POWERPC_USER_H */
diff --git a/include/asm-ppc/setup.h b/include/asm-ppc/setup.h
deleted file mode 100644
index d2d19ee103df..000000000000
--- a/include/asm-ppc/setup.h
+++ /dev/null
@@ -1,14 +0,0 @@
1#ifdef __KERNEL__
2#ifndef _PPC_SETUP_H
3#define _PPC_SETUP_H
4
5#define m68k_num_memory num_memory
6#define m68k_memory memory
7
8#include <asm-m68k/setup.h>
9/* We have a bigger command line buffer. */
10#undef COMMAND_LINE_SIZE
11#define COMMAND_LINE_SIZE 512
12
13#endif /* _PPC_SETUP_H */
14#endif /* __KERNEL__ */
diff --git a/include/asm-ppc/topology.h b/include/asm-ppc/topology.h
deleted file mode 100644
index 6a029bbba6e1..000000000000
--- a/include/asm-ppc/topology.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _ASM_PPC_TOPOLOGY_H
2#define _ASM_PPC_TOPOLOGY_H
3
4#include <asm-generic/topology.h>
5
6#endif /* _ASM_PPC_TOPOLOGY_H */
diff --git a/include/asm-ppc64/msgbuf.h b/include/asm-ppc64/msgbuf.h
deleted file mode 100644
index 31c1cbf133cc..000000000000
--- a/include/asm-ppc64/msgbuf.h
+++ /dev/null
@@ -1,27 +0,0 @@
1#ifndef _PPC64_MSGBUF_H
2#define _PPC64_MSGBUF_H
3
4/*
5 * The msqid64_ds structure for the PPC architecture.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version
10 * 2 of the License, or (at your option) any later version.
11 */
12
13struct msqid64_ds {
14 struct ipc64_perm msg_perm;
15 __kernel_time_t msg_stime; /* last msgsnd time */
16 __kernel_time_t msg_rtime; /* last msgrcv time */
17 __kernel_time_t msg_ctime; /* last change time */
18 unsigned long msg_cbytes; /* current number of bytes on queue */
19 unsigned long msg_qnum; /* number of messages in queue */
20 unsigned long msg_qbytes; /* max number of bytes on queue */
21 __kernel_pid_t msg_lspid; /* pid of last msgsnd */
22 __kernel_pid_t msg_lrpid; /* last receive pid */
23 unsigned long __unused1;
24 unsigned long __unused2;
25};
26
27#endif /* _PPC64_MSGBUF_H */
diff --git a/include/asm-ppc64/param.h b/include/asm-ppc64/param.h
deleted file mode 100644
index 76c212d475b3..000000000000
--- a/include/asm-ppc64/param.h
+++ /dev/null
@@ -1,31 +0,0 @@
1#ifndef _ASM_PPC64_PARAM_H
2#define _ASM_PPC64_PARAM_H
3
4#include <linux/config.h>
5
6/*
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version
10 * 2 of the License, or (at your option) any later version.
11 */
12
13#ifdef __KERNEL__
14# define HZ CONFIG_HZ /* Internal kernel timer frequency */
15# define USER_HZ 100 /* .. some user interfaces are in "ticks" */
16# define CLOCKS_PER_SEC (USER_HZ) /* like times() */
17#endif
18
19#ifndef HZ
20#define HZ 100
21#endif
22
23#define EXEC_PAGESIZE 4096
24
25#ifndef NOGROUP
26#define NOGROUP (-1)
27#endif
28
29#define MAXHOSTNAMELEN 64 /* max length of hostname */
30
31#endif /* _ASM_PPC64_PARAM_H */
diff --git a/include/asm-ppc64/setup.h b/include/asm-ppc64/setup.h
deleted file mode 100644
index b257b8348c73..000000000000
--- a/include/asm-ppc64/setup.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _PPC_SETUP_H
2#define _PPC_SETUP_H
3
4#define COMMAND_LINE_SIZE 512
5
6#endif /* _PPC_SETUP_H */
diff --git a/include/asm-ppc64/timex.h b/include/asm-ppc64/timex.h
deleted file mode 100644
index 8db4da4064cd..000000000000
--- a/include/asm-ppc64/timex.h
+++ /dev/null
@@ -1,26 +0,0 @@
1/*
2 * linux/include/asm-ppc/timex.h
3 *
4 * PPC64 architecture timex specifications
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version.
10 */
11#ifndef _ASMPPC64_TIMEX_H
12#define _ASMPPC64_TIMEX_H
13
14#define CLOCK_TICK_RATE 1193180 /* Underlying HZ */
15
16typedef unsigned long cycles_t;
17
18static inline cycles_t get_cycles(void)
19{
20 cycles_t ret;
21
22 __asm__ __volatile__("mftb %0" : "=r" (ret) : );
23 return ret;
24}
25
26#endif
diff --git a/include/asm-ppc64/user.h b/include/asm-ppc64/user.h
deleted file mode 100644
index d7d6554a421f..000000000000
--- a/include/asm-ppc64/user.h
+++ /dev/null
@@ -1,58 +0,0 @@
1#ifndef _PPC_USER_H
2#define _PPC_USER_H
3
4/* Adapted from <asm-alpha/user.h>
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version.
10 */
11
12#include <asm/ptrace.h>
13#include <asm/page.h>
14
15/*
16 * Core file format: The core file is written in such a way that gdb
17 * can understand it and provide useful information to the user (under
18 * linux we use the `trad-core' bfd, NOT the osf-core). The file contents
19 * are as follows:
20 *
21 * upage: 1 page consisting of a user struct that tells gdb
22 * what is present in the file. Directly after this is a
23 * copy of the task_struct, which is currently not used by gdb,
24 * but it may come in handy at some point. All of the registers
25 * are stored as part of the upage. The upage should always be
26 * only one page long.
27 * data: The data segment follows next. We use current->end_text to
28 * current->brk to pick up all of the user variables, plus any memory
29 * that may have been sbrk'ed. No attempt is made to determine if a
30 * page is demand-zero or if a page is totally unused, we just cover
31 * the entire range. All of the addresses are rounded in such a way
32 * that an integral number of pages is written.
33 * stack: We need the stack information in order to get a meaningful
34 * backtrace. We need to write the data from usp to
35 * current->start_stack, so we round each of these in order to be able
36 * to write an integer number of pages.
37 */
38struct user {
39 struct pt_regs regs; /* entire machine state */
40 size_t u_tsize; /* text size (pages) */
41 size_t u_dsize; /* data size (pages) */
42 size_t u_ssize; /* stack size (pages) */
43 unsigned long start_code; /* text starting address */
44 unsigned long start_data; /* data starting address */
45 unsigned long start_stack; /* stack starting address */
46 long int signal; /* signal causing core dump */
47 struct regs * u_ar0; /* help gdb find registers */
48 unsigned long magic; /* identifies a core file */
49 char u_comm[32]; /* user command name */
50};
51
52#define NBPG PAGE_SIZE
53#define UPAGES 1
54#define HOST_TEXT_START_ADDR (u.start_code)
55#define HOST_DATA_START_ADDR (u.start_data)
56#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
57
58#endif /* _PPC_USER_H */