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

Commit 99a5b287 authored by Sonic Zhang's avatar Sonic Zhang Committed by Mike Frysinger
Browse files

Blackfin: add new cacheflush syscall



Flushing caches sometimes requires anomaly workarounds which require
supervisor-only insns.  Normally we don't need to flush caches from
userspace so this isn't a problem, but when gcc generates trampolines
on the stack, we do.

So add a new syscall for gcc to use modeled after the mips version.

Signed-off-by: default avatarSonic Zhang <sonic.zhang@analog.com>
Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
parent 73775b89
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
include include/asm-generic/Kbuild.asm

header-y += bfin_sport.h
header-y += cachectl.h
header-y += fixed_code.h
+20 −0
Original line number Diff line number Diff line
/*
 * based on the mips/cachectl.h
 *
 * Copyright 2010 Analog Devices Inc.
 * Copyright (C) 1994, 1995, 1996 by Ralf Baechle
 *
 * Licensed under the GPL-2 or later.
 */

#ifndef	_ASM_CACHECTL
#define	_ASM_CACHECTL

/*
 * Options for cacheflush system call
 */
#define	ICACHE	(1<<0)		/* flush instruction cache        */
#define	DCACHE	(1<<1)		/* writeback and flush data cache */
#define	BCACHE	(ICACHE|DCACHE)	/* flush both caches              */

#endif	/* _ASM_CACHECTL */
+3 −0
Original line number Diff line number Diff line
@@ -113,6 +113,9 @@ extern void user_disable_single_step(struct task_struct *child);
/* common code demands this function */
#define ptrace_disable(child) user_disable_single_step(child)

extern int is_user_addr_valid(struct task_struct *child,
			      unsigned long start, unsigned long len);

/*
 * Get the address of the live pt_regs for the specified task.
 * These are saved onto the top kernel stack when the process
+2 −1
Original line number Diff line number Diff line
@@ -392,8 +392,9 @@
#define __NR_fanotify_init	371
#define __NR_fanotify_mark	372
#define __NR_prlimit64		373
#define __NR_cacheflush		374

#define __NR_syscall		374
#define __NR_syscall		375
#define NR_syscalls		__NR_syscall

/* Old optional stuff no one actually uses */
+2 −2
Original line number Diff line number Diff line
@@ -114,8 +114,8 @@ put_reg(struct task_struct *task, long regno, unsigned long data)
/*
 * check that an address falls within the bounds of the target process's memory mappings
 */
static inline int is_user_addr_valid(struct task_struct *child,
				     unsigned long start, unsigned long len)
int
is_user_addr_valid(struct task_struct *child, unsigned long start, unsigned long len)
{
	struct vm_area_struct *vma;
	struct sram_list_struct *sraml;
Loading