H18224 s 00048/00000/00000 d D 1.1 02/03/13 20:31:04 patch 2 1 cC cF1 cK51688 cO-rw-rw-r-- e s 00000/00000/00000 d D 1.0 02/03/13 20:31:04 patch 1 0 c BitKeeper file /home/marcelo/bk/linux-2.4/arch/mips/sibyte/swarm/memory.c cBtorvalds@athlon.transmeta.com|ChangeSet|20020205173056|16047|c1d11a41ed024864 cHplucky.distro.conectiva cK35229 cParch/mips/sibyte/swarm/memory.c cR57477718707a572 cV4 cX0x821 cZ-03:00 e u U f e 0 f x 0x821 t T I 2 /* * Copyright (C) 2000, 2001 Broadcom Corporation * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* * Memory related routines */ #include #include #include extern phys_t swarm_mem_region_addrs[]; extern phys_t swarm_mem_region_sizes[]; extern unsigned int swarm_mem_region_count; int page_is_ram(unsigned long pagenr) { phys_t addr = pagenr << PAGE_SHIFT; #ifdef CONFIG_SWARM_STANDALONE if (addr < (CONFIG_SIBYTE_SWARM_RAM_SIZE * 1024 * 1024)) { return 1; } #else int i; for (i = 0; i < swarm_mem_region_count; i++) { if ((addr >= swarm_mem_region_addrs[i]) && (addr < (swarm_mem_region_addrs[i] + swarm_mem_region_sizes[i]))) { return 1; } } #endif return 0; } E 2 I 1 E 1