Skip to content

Commit

Permalink
[PATCH] powerpc: Merge a few more include files
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
jdl@freescale.com authored and Paul Mackerras committed Sep 9, 2005
1 parent 6480708 commit dd56fdf
Show file tree
Hide file tree
Showing 13 changed files with 61 additions and 201 deletions.
16 changes: 12 additions & 4 deletions include/asm-ppc/msgbuf.h → include/asm-powerpc/msgbuf.h
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
#ifndef _PPC_MSGBUF_H
#define _PPC_MSGBUF_H
#ifndef _ASM_POWERPC_MSGBUF_H
#define _ASM_POWERPC_MSGBUF_H

/*
* The msqid64_ds structure for the PPC architecture.
* The msqid64_ds structure for the PowerPC architecture.
* Note extra padding because this structure is passed back and forth
* between kernel and user space.
*/

struct msqid64_ds {
struct ipc64_perm msg_perm;
#ifndef __powerpc64__
unsigned int __unused1;
#endif
__kernel_time_t msg_stime; /* last msgsnd time */
#ifndef __powerpc64__
unsigned int __unused2;
#endif
__kernel_time_t msg_rtime; /* last msgrcv time */
#ifndef __powerpc64__
unsigned int __unused3;
#endif
__kernel_time_t msg_ctime; /* last change time */
unsigned long msg_cbytes; /* current number of bytes on queue */
unsigned long msg_qnum; /* number of messages in queue */
Expand All @@ -22,4 +30,4 @@ struct msqid64_ds {
unsigned long __unused5;
};

#endif /* _PPC_MSGBUF_H */
#endif /* _ASM_POWERPC_MSGBUF_H */
8 changes: 4 additions & 4 deletions include/asm-ppc/param.h → include/asm-powerpc/param.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#ifndef _ASM_PPC_PARAM_H
#define _ASM_PPC_PARAM_H
#ifndef _ASM_POWERPC_PARAM_H
#define _ASM_POWERPC_PARAM_H

#include <linux/config.h>

#ifdef __KERNEL__
#define HZ CONFIG_HZ /* internal timer frequency */
#define HZ CONFIG_HZ /* internal kernel timer frequency */
#define USER_HZ 100 /* for user interfaces in "ticks" */
#define CLOCKS_PER_SEC (USER_HZ) /* frequency at which times() counts */
#endif /* __KERNEL__ */
Expand All @@ -21,4 +21,4 @@

#define MAXHOSTNAMELEN 64 /* max length of hostname */

#endif
#endif /* _ASM_POWERPC_PARAM_H */
9 changes: 9 additions & 0 deletions include/asm-powerpc/setup.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#ifndef _ASM_POWERPC_SETUP_H
#define _ASM_POWERPC_SETUP_H

#ifdef __KERNEL__

#define COMMAND_LINE_SIZE 512

#endif /* __KERNEL__ */
#endif /* _ASM_POWERPC_SETUP_H */
37 changes: 23 additions & 14 deletions include/asm-ppc/timex.h → include/asm-powerpc/timex.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#ifndef _ASM_POWERPC_TIMEX_H
#define _ASM_POWERPC_TIMEX_H

#ifdef __KERNEL__

/*
* include/asm-ppc/timex.h
*
* ppc architecture timex specifications
* PowerPC architecture timex specifications
*/
#ifdef __KERNEL__
#ifndef _ASMppc_TIMEX_H
#define _ASMppc_TIMEX_H

#include <linux/config.h>
#include <asm/cputable.h>
Expand All @@ -14,14 +14,21 @@

typedef unsigned long cycles_t;

/*
* For the "cycle" counter we use the timebase lower half.
* Currently only used on SMP.
*/

static inline cycles_t get_cycles(void)
{
cycles_t ret = 0;
cycles_t ret;

#ifdef __powerpc64__

__asm__ __volatile__("mftb %0" : "=r" (ret) : );

#else
/*
* For the "cycle" counter we use the timebase lower half.
* Currently only used on SMP.
*/

ret = 0;

__asm__ __volatile__(
"98: mftb %0\n"
Expand All @@ -33,8 +40,10 @@ static inline cycles_t get_cycles(void)
" .long 99b\n"
".previous"
: "=r" (ret) : "i" (CPU_FTR_601));
#endif

return ret;
}

#endif
#endif /* __KERNEL__ */
#endif /* __KERNEL__ */
#endif /* _ASM_POWERPC_TIMEX_H */
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#ifndef _ASM_PPC64_TOPOLOGY_H
#define _ASM_PPC64_TOPOLOGY_H
#ifndef _ASM_POWERPC_TOPOLOGY_H
#define _ASM_POWERPC_TOPOLOGY_H

#include <linux/config.h>
#include <asm/mmzone.h>

#ifdef CONFIG_NUMA

#include <asm/mmzone.h>

static inline int cpu_to_node(int cpu)
{
int node;
Expand Down Expand Up @@ -66,4 +67,4 @@ static inline int node_to_first_cpu(int node)

#endif /* CONFIG_NUMA */

#endif /* _ASM_PPC64_TOPOLOGY_H */
#endif /* _ASM_POWERPC_TOPOLOGY_H */
15 changes: 8 additions & 7 deletions include/asm-ppc/user.h → include/asm-powerpc/user.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
#ifdef __KERNEL__
#ifndef _PPC_USER_H
#define _PPC_USER_H
#ifndef _ASM_POWERPC_USER_H
#define _ASM_POWERPC_USER_H

/* Adapted from <asm-alpha/user.h> */
#ifdef __KERNEL__

#include <linux/ptrace.h>
#include <asm/ptrace.h>
#include <asm/page.h>

/*
* Adapted from <asm-alpha/user.h>
*
* Core file format: The core file is written in such a way that gdb
* can understand it and provide useful information to the user (under
* linux we use the `trad-core' bfd, NOT the osf-core). The file contents
Expand Down Expand Up @@ -50,5 +51,5 @@ struct user {
#define HOST_DATA_START_ADDR (u.start_data)
#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)

#endif /* _PPC_USER_H */
#endif /* __KERNEL__ */
#endif /* __KERNEL__ */
#endif /* _ASM_POWERPC_USER_H */
14 changes: 0 additions & 14 deletions include/asm-ppc/setup.h

This file was deleted.

6 changes: 0 additions & 6 deletions include/asm-ppc/topology.h

This file was deleted.

27 changes: 0 additions & 27 deletions include/asm-ppc64/msgbuf.h

This file was deleted.

31 changes: 0 additions & 31 deletions include/asm-ppc64/param.h

This file was deleted.

6 changes: 0 additions & 6 deletions include/asm-ppc64/setup.h

This file was deleted.

26 changes: 0 additions & 26 deletions include/asm-ppc64/timex.h

This file was deleted.

58 changes: 0 additions & 58 deletions include/asm-ppc64/user.h

This file was deleted.

0 comments on commit dd56fdf

Please sign in to comment.