Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

MN10300: Handle missing sys_cacheflush() when caching disabled

When caching is disabled on the MN10300 arch, the sys_cacheflush()
function is removed by conditional stuff in the makefiles, but is still
referred to by the syscall table.

Provide a null version that just returns 0 when caching is disabled (or
-EINVAL if the arguments are silly).

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

David Howells and committed by
Linus Torvalds
62bdb288 0f44fbd2

+27 -8
+6 -8
arch/mn10300/mm/Makefile
··· 2 2 # Makefile for the MN10300-specific memory management code 3 3 # 4 4 5 + cacheflush-y := cache.o cache-mn10300.o 6 + cacheflush-$(CONFIG_MN10300_CACHE_WBACK) += cache-flush-mn10300.o 7 + 8 + cacheflush-$(CONFIG_MN10300_CACHE_DISABLED) := cache-disabled.o 9 + 5 10 obj-y := \ 6 11 init.o fault.o pgtable.o extable.o tlb-mn10300.o mmu-context.o \ 7 - misalignment.o dma-alloc.o 8 - 9 - ifneq ($(CONFIG_MN10300_CACHE_DISABLED),y) 10 - obj-y += cache.o cache-mn10300.o 11 - ifeq ($(CONFIG_MN10300_CACHE_WBACK),y) 12 - obj-y += cache-flush-mn10300.o 13 - endif 14 - endif 12 + misalignment.o dma-alloc.o $(cacheflush-y)
+21
arch/mn10300/mm/cache-disabled.c
··· 1 + /* Handle the cache being disabled 2 + * 3 + * Copyright (C) 2010 Red Hat, Inc. All Rights Reserved. 4 + * Written by David Howells (dhowells@redhat.com) 5 + * 6 + * This program is free software; you can redistribute it and/or 7 + * modify it under the terms of the GNU General Public Licence 8 + * as published by the Free Software Foundation; either version 9 + * 2 of the Licence, or (at your option) any later version. 10 + */ 11 + #include <linux/mm.h> 12 + 13 + /* 14 + * allow userspace to flush the instruction cache 15 + */ 16 + asmlinkage long sys_cacheflush(unsigned long start, unsigned long end) 17 + { 18 + if (end < start) 19 + return -EINVAL; 20 + return 0; 21 + }