From d31aa5f6ced193d9109f486863dd91d1b6c5d44e Mon Sep 17 00:00:00 2001 From: tsutsui Date: Tue, 29 Nov 2005 13:38:07 +0000 Subject: [PATCH] Use PAGE_MASK macro instead of (PAGE_SIZE - 1). --- sys/arch/mips/mips/cache.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/sys/arch/mips/mips/cache.c b/sys/arch/mips/mips/cache.c index 04dd434c5238..c705ceced7f2 100644 --- a/sys/arch/mips/mips/cache.c +++ b/sys/arch/mips/mips/cache.c @@ -1,4 +1,4 @@ -/* $NetBSD: cache.c,v 1.31 2005/11/10 15:31:17 tsutsui Exp $ */ +/* $NetBSD: cache.c,v 1.32 2005/11/29 13:38:07 tsutsui Exp $ */ /* * Copyright 2001, 2002 Wasabi Systems, Inc. @@ -68,7 +68,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cache.c,v 1.31 2005/11/10 15:31:17 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cache.c,v 1.32 2005/11/29 13:38:07 tsutsui Exp $"); #include "opt_cputype.h" #include "opt_mips_cache.h" @@ -598,8 +598,7 @@ primary_cache_is_2way: mips_pdcache_size = CACHE_R5900_SIZE_D; mips_pdcache_line_size = CACHE_R5900_LSIZE_D; mips_cache_alias_mask = - ((mips_pdcache_size / mips_pdcache_ways) - 1) & - ~(PAGE_SIZE - 1); + ((mips_pdcache_size / mips_pdcache_ways) - 1) & ~PAGE_MASK; mips_cache_prefer_mask = max(mips_pdcache_size, mips_picache_size) - 1; mips_cache_virtual_alias = 1; @@ -906,7 +905,7 @@ mips3_get_cache_config(int csizebase) MIPS3_CONFIG_DB); mips_cache_alias_mask = - ((mips_pdcache_size / mips_pdcache_ways) - 1) & ~(PAGE_SIZE - 1); + ((mips_pdcache_size / mips_pdcache_ways) - 1) & ~PAGE_MASK; mips_cache_prefer_mask = max(mips_pdcache_size, mips_picache_size) - 1; @@ -955,7 +954,7 @@ mips4_get_cache_config(int csizebase) mips_pdcache_line_size = 32; /* 32 Byte */ mips_cache_alias_mask = - ((mips_pdcache_size / mips_pdcache_ways) - 1) & ~(PAGE_SIZE - 1); + ((mips_pdcache_size / mips_pdcache_ways) - 1) & ~PAGE_MASK; mips_cache_prefer_mask = max(mips_pdcache_size, mips_picache_size) - 1; }