From 3836ca8306b726cffaf7e80d5dfb0a635b09c6b0 Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Fri, 25 Dec 2009 21:02:19 +0000 Subject: Pass both the virtual address and the physical address of the memory range when invoking the cache functions. The physical address is needed when operating on physically-indexed caches, such as the L2 cache on Loongson processors. Preprocessor abuse makes sure that the physical address computation gets compiled out when running on a kernel compiled for virtually-indexed caches only, such as the sgi kernel. --- sys/arch/sgi/include/autoconf.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sys/arch/sgi/include/autoconf.h') diff --git a/sys/arch/sgi/include/autoconf.h b/sys/arch/sgi/include/autoconf.h index abaf1715f3a..f3466677cea 100644 --- a/sys/arch/sgi/include/autoconf.h +++ b/sys/arch/sgi/include/autoconf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.h,v 1.26 2009/11/12 19:46:46 miod Exp $ */ +/* $OpenBSD: autoconf.h,v 1.27 2009/12/25 21:02:18 miod Exp $ */ /* * Copyright (c) 2001-2003 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -58,11 +58,11 @@ struct sys_rec { /* Published cache operations. */ void (*_SyncCache)(void); - void (*_InvalidateICache)(vaddr_t, int); + void (*_InvalidateICache)(vaddr_t, size_t); void (*_SyncDCachePage)(vaddr_t); - void (*_HitSyncDCache)(vaddr_t, int); - void (*_IOSyncDCache)(vaddr_t, int, int); - void (*_HitInvalidateDCache)(vaddr_t, int); + void (*_HitSyncDCache)(vaddr_t, size_t); + void (*_IOSyncDCache)(vaddr_t, size_t, int); + void (*_HitInvalidateDCache)(vaddr_t, size_t); /* Serial console configuration. */ struct mips_bus_space console_io; -- cgit v1.2.3