/* * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. * * Copyright (C) 2000, 05 by Ralf Baechle (ralf@linux-mips.org) * Copyright (C) 2000 by Silicon Graphics, Inc. * Copyright (C) 2004 by Christoph Hellwig * * On SGI IP27 the ARC memory configuration data is completely bogus but * alternate easier to use mechanisms are available.
*/ #include <linux/init.h> #include <linux/kernel.h> #include <linux/memblock.h> #include <linux/mm.h> #include <linux/mmzone.h> #include <linux/export.h> #include <linux/nodemask.h> #include <linux/swap.h> #include <linux/pfn.h> #include <linux/highmem.h> #include <asm/page.h> #include <asm/pgalloc.h> #include <asm/sections.h> #include <asm/sgialib.h>
/* Figure out which routers nodes in question are connected to */
for_each_online_node(nasid) {
brd = find_lboard_class((lboard_t *)KL_CONFIG_INFO(nasid),
KLTYPE_ROUTER);
if (!brd) continue;
do { if (brd->brd_flags & DUPLICATE_BOARD) continue;
/* * Probe for all CPUs - this creates the cpumask and sets up the * mapping tables. We need to do this as early as possible.
*/ #ifdef CONFIG_SMP
cpu_node_probe(); #endif
init_topology_matrix();
dump_topology();
region_mask = gen_region_mask();
setup_replication_mask();
/* * Set all nodes' calias sizes to 8k
*/
for_each_online_node(nasid) { /* * Always have node 0 in the region mask, otherwise * CALIAS accesses get exceptions since the hub * thinks it is a node 0 address.
*/
REMOTE_HUB_S(nasid, PI_REGION_PRESENT, (region_mask | 1));
REMOTE_HUB_S(nasid, PI_CALIAS_SIZE, PI_CALIAS_SIZE_0);
#ifdef LATER /* * Set up all hubs to have a big window pointing at * widget 0. Memory mode, widget 0, offset 0
*/
REMOTE_HUB_S(nasid, IIO_ITTE(SWIN0_BIGWIN),
((HUB_PIO_MAP_TO_MEM << IIO_ITTE_IOSP_SHIFT) |
(0 << IIO_ITTE_WIDGET_SHIFT))); #endif
}
}
staticvoid __init szmem(void)
{ unsignedlong slot_psize, slot0sz = 0, nodebytes; /* Hack to detect problem configs */ int slot;
nasid_t node;
for_each_online_node(node) {
nodebytes = 0; for (slot = 0; slot < MAX_MEM_SLOTS; slot++) {
slot_psize = slot_psize_compute(node, slot); if (slot == 0)
slot0sz = slot_psize; /* * We need to refine the hack when we have replicated * kernel text.
*/
nodebytes += (1LL << SLOT_SHIFT);
/* * A node with nothing. We use it to avoid any special casing in * cpumask_of_node
*/ staticstruct node_data null_node = {
.hub = {
.h_cpus = CPU_MASK_NONE
}
};
/* * Currently, the intranode memory hole support assumes that each slot * contains at least 32 MBytes of memory. We assume all bootmem data * fits on the first slot.
*/ void __init prom_meminit(void)
{
nasid_t node;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.