arch/powerpc/include/asm/syscalls.h

Source file repositories/reference/linux-study-clean/arch/powerpc/include/asm/syscalls.h

File Facts

System
Linux kernel
Corpus path
arch/powerpc/include/asm/syscalls.h
Extension
.h
Size
5171 bytes
Lines
162
Domain
Architecture Layer
Bucket
arch/powerpc
Inferred role
Architecture Layer: syscall or user/kernel boundary
Status
core implementation candidate

Why This File Exists

CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.

Dependency Surface

Detected Declarations

Annotated Snippet

#ifndef __ASM_POWERPC_SYSCALLS_H
#define __ASM_POWERPC_SYSCALLS_H
#ifdef __KERNEL__

#include <linux/compiler.h>
#include <linux/linkage.h>
#include <linux/types.h>
#include <linux/compat.h>

#include <asm/syscall.h>
#ifdef CONFIG_PPC64
#include <asm/syscalls_32.h>
#endif
#include <asm/unistd.h>
#include <asm/ucontext.h>

#ifndef CONFIG_ARCH_HAS_SYSCALL_WRAPPER
long sys_ni_syscall(void);
#else
long sys_ni_syscall(const struct pt_regs *regs);
#endif

struct rtas_args;

/*
 * long long munging:
 * The 32 bit ABI passes long longs in an odd even register pair.
 * High and low parts are swapped depending on endian mode,
 * so define a macro (similar to mips linux32) to handle that.
 */
#ifdef __LITTLE_ENDIAN__
#define merge_64(low, high) (((u64)high << 32) | low)
#else
#define merge_64(high, low) (((u64)high << 32) | low)
#endif

/*
 * PowerPC architecture-specific syscalls
 */

#ifndef CONFIG_ARCH_HAS_SYSCALL_WRAPPER

long sys_rtas(struct rtas_args __user *uargs);

#ifdef CONFIG_PPC64
long sys_ppc64_personality(unsigned long personality);
#ifdef CONFIG_COMPAT
long compat_sys_ppc64_personality(unsigned long personality);
#endif /* CONFIG_COMPAT */
#endif /* CONFIG_PPC64 */

long sys_swapcontext(struct ucontext __user *old_ctx,
		     struct ucontext __user *new_ctx, long ctx_size);
long sys_mmap(unsigned long addr, size_t len,
	      unsigned long prot, unsigned long flags,
	      unsigned long fd, off_t offset);
long sys_mmap2(unsigned long addr, size_t len,
	       unsigned long prot, unsigned long flags,
	       unsigned long fd, unsigned long pgoff);
long sys_switch_endian(void);

#ifdef CONFIG_PPC32
long sys_sigreturn(void);
long sys_debug_setcontext(struct ucontext __user *ctx, int ndbg,
			  struct sig_dbg_op __user *dbg);
#endif

long sys_rt_sigreturn(void);

long sys_subpage_prot(unsigned long addr,
		      unsigned long len, u32 __user *map);

#ifdef CONFIG_COMPAT
long compat_sys_swapcontext(struct ucontext32 __user *old_ctx,
			    struct ucontext32 __user *new_ctx,
			    int ctx_size);
long compat_sys_old_getrlimit(unsigned int resource,
			      struct compat_rlimit __user *rlim);
long compat_sys_sigreturn(void);
long compat_sys_rt_sigreturn(void);
#endif /* CONFIG_COMPAT */

/*
 * Architecture specific signatures required by long long munging:
 * The 32 bit ABI passes long longs in an odd even register pair.
 * The following signatures provide a machine long parameter for
 * each register that will be supplied. The implementation is
 * responsible for combining parameter pairs.
 */

Annotation

Implementation Notes