Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dd56fdf2 authored by jdl@freescale.com's avatar jdl@freescale.com Committed by Paul Mackerras
Browse files

[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: default avatarJon Loeliger <jdl@freescale.com>
Signed-off-by: default avatarKumar Gala <kumar.gala@freescale.com>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 64807081
Loading
Loading
Loading
Loading
+12 −4
Original line number Diff line number Diff line
#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 */
@@ -22,4 +30,4 @@ struct msqid64_ds {
	unsigned long  __unused5;
};

#endif /* _PPC_MSGBUF_H */
#endif	/* _ASM_POWERPC_MSGBUF_H */
+4 −4
Original line number Diff line number Diff line
#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__ */
@@ -21,4 +21,4 @@

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

#endif
#endif	/* _ASM_POWERPC_PARAM_H */
+9 −0
Original line number Diff line number Diff line
#ifndef _ASM_POWERPC_SETUP_H
#define _ASM_POWERPC_SETUP_H

#ifdef __KERNEL__

#define COMMAND_LINE_SIZE	512

#endif	/* __KERNEL__ */
#endif	/* _ASM_POWERPC_SETUP_H */
+23 −14
Original line number Diff line number Diff line
#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>
@@ -14,14 +14,21 @@

typedef unsigned long cycles_t;

static inline cycles_t get_cycles(void)
{
	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.
	 */

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

	__asm__ __volatile__(
		"98:	mftb %0\n"
@@ -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	/* _ASM_POWERPC_TIMEX_H */
+5 −4
Original line number Diff line number Diff line
#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;
@@ -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 */
Loading