Lines Matching +full:hi +full:- +full:fi

9  * Copyright (C) 2007-2014 Silicon Graphics, Inc. All rights reserved.
130 uv_cpuid.pnode_mask = (1 << uv_cpuid.n_skt) - 1; in early_get_pnodeid()
164 + UV4_HUB_REVISION_BASE - 1; in early_set_hub_type()
180 + UV2_HUB_REVISION_BASE - 1; in early_set_hub_type()
245 #define INVALID_TYPE 0 /* Leaf 0xb sub-leaf types */
280 uv_cpuid.apicid_mask = (~(-1 << sid_shift)); in set_x2apic_bits()
298 strncpy(to, from, len-1); in uv_stringify()
309 for (i = 0; st->entry[i].type != UV_SYSTAB_TYPE_UNUSED; i++) { in early_find_archtype()
310 unsigned long ptr = st->entry[i].offset; in early_find_archtype()
315 if (st->entry[i].type == UV_SYSTAB_TYPE_ARCH_TYPE) in early_find_archtype()
325 int n = strlen(uv_ate->archtype); in decode_arch_type()
327 if (n > 0 && n < sizeof(uv_ate->archtype)) { in decode_arch_type()
329 uv_stringify(sizeof(uv_archtype), uv_archtype, uv_ate->archtype); in decode_arch_type()
353 rev = st->revision; in early_get_arch_type()
359 uvst_size = st->size; in early_get_arch_type()
437 uv_hub_info->hub_revision = in uv_set_system_type()
443 switch (uv_hub_info->hub_revision) { in uv_set_system_type()
486 uv_cpu_info->p_uv_hub_info = &uv_hub_info_node0; in uv_acpi_madt_oem_check()
598 set_memory_block_size_order(order - 1); in set_block_size()
613 int bytes, i, sid, lsid = -1, indx = 0, lindx = -1; in build_uv_gr_table()
623 for (; gre->type != UV_GAM_RANGE_TYPE_UNUSED; gre++) { in build_uv_gr_table()
624 if (gre->type == UV_GAM_RANGE_TYPE_HOLE) { in build_uv_gr_table()
626 /* Mark hole between RAM/non-RAM: */ in build_uv_gr_table()
628 last_limit = gre->limit; in build_uv_gr_table()
632 last_limit = gre->limit; in build_uv_gr_table()
633 pr_info("UV: extra hole in GAM RE table @%d\n", (int)(gre - uv_gre_table)); in build_uv_gr_table()
636 if (_max_socket < gre->sockid) { in build_uv_gr_table()
637 …pr_err("UV: GAM table sockid(%d) too large(>%d) @%d\n", gre->sockid, _max_socket, (int)(gre - uv_g… in build_uv_gr_table()
640 sid = gre->sockid - _min_socket; in build_uv_gr_table()
644 grt->base = lindx; in build_uv_gr_table()
645 grt->nasid = gre->nasid; in build_uv_gr_table()
646 grt->limit = last_limit = gre->limit; in build_uv_gr_table()
654 if (grt->limit == last_limit) { in build_uv_gr_table()
655 grt->limit = last_limit = gre->limit; in build_uv_gr_table()
659 /* Non-contiguous RAM range: */ in build_uv_gr_table()
662 grt->base = lindx; in build_uv_gr_table()
663 grt->nasid = gre->nasid; in build_uv_gr_table()
664 grt->limit = last_limit = gre->limit; in build_uv_gr_table()
667 /* Non-contiguous/non-RAM: */ in build_uv_gr_table()
670 grt->base = grt - _gr_table; in build_uv_gr_table()
671 grt->nasid = gre->nasid; in build_uv_gr_table()
672 grt->limit = last_limit = gre->limit; in build_uv_gr_table()
678 i = grt - _gr_table; in build_uv_gr_table()
693 int gb = grt->base; in build_uv_gr_table()
696 end = (unsigned long)grt->limit << UV_GAM_RANGE_SHFT; in build_uv_gr_table()
698 pr_info("UV: GAM Range %2d %04x 0x%013lx-0x%013lx (%d)\n", i, grt->nasid, start, end, gb); in build_uv_gr_table()
930 pr_info("UV: Map %s_HI 0x%lx - 0x%lx %s (%d segments)\n", in map_high()
998 UV2_MMIOH = -1,
1010 int i, fi, li, n, max_io; in calc_mmioh_map() local
1063 max_io = lnasid = fi = li = -1; in calc_mmioh_map()
1077 nasid = -1; in calc_mmioh_map()
1083 if (i != n-1) in calc_mmioh_map()
1088 if (lnasid != -1 || (i == n-1 && nasid != -1)) { in calc_mmioh_map()
1092 if (lnasid == -1) { in calc_mmioh_map()
1096 f = fi; in calc_mmioh_map()
1101 pr_info("UV: %s[%03d..%03d] NASID 0x%04x ADDR 0x%016lx - 0x%016lx\n", in calc_mmioh_map()
1102 id, fi, li, lnasid, addr1, addr2); in calc_mmioh_map()
1106 fi = li = i; in calc_mmioh_map()
1227 domain = pci_domain_nr(pdev->bus); in uv_set_vga_state()
1228 bus = pdev->bus->number; in uv_set_vga_state()
1245 uv_hub_info->nr_online_cpus++; in uv_cpu_init()
1259 mnp->n_val = uv_cpuid.n_skt; in get_mn()
1261 mnp->m_val = 0; in get_mn()
1262 mnp->n_lshift = 0; in get_mn()
1266 mnp->m_val = uv_cpuid.m_skt; in get_mn()
1268 mnp->n_lshift = m_gr_config.s3.m_skt; in get_mn()
1270 mnp->m_val = uv_cpuid.m_skt; in get_mn()
1271 mnp->n_lshift = mnp->m_val == 40 ? 40 : 39; in get_mn()
1273 mnp->m_shift = mnp->m_val ? 64 - mnp->m_val : 0; in get_mn()
1276 static void __init uv_init_hub_info(struct uv_hub_info_s *hi) in uv_init_hub_info() argument
1281 hi->gpa_mask = mn.m_val ? in uv_init_hub_info()
1282 (1UL << (mn.m_val + mn.n_val)) - 1 : in uv_init_hub_info()
1283 (1UL << uv_cpuid.gpa_shift) - 1; in uv_init_hub_info()
1285 hi->m_val = mn.m_val; in uv_init_hub_info()
1286 hi->n_val = mn.n_val; in uv_init_hub_info()
1287 hi->m_shift = mn.m_shift; in uv_init_hub_info()
1288 hi->n_lshift = mn.n_lshift ? mn.n_lshift : 0; in uv_init_hub_info()
1289 hi->hub_revision = uv_hub_info->hub_revision; in uv_init_hub_info()
1290 hi->hub_type = uv_hub_info->hub_type; in uv_init_hub_info()
1291 hi->pnode_mask = uv_cpuid.pnode_mask; in uv_init_hub_info()
1292 hi->nasid_shift = uv_cpuid.nasid_shift; in uv_init_hub_info()
1293 hi->min_pnode = _min_pnode; in uv_init_hub_info()
1294 hi->min_socket = _min_socket; in uv_init_hub_info()
1295 hi->pnode_to_socket = _pnode_to_socket; in uv_init_hub_info()
1296 hi->socket_to_node = _socket_to_node; in uv_init_hub_info()
1297 hi->socket_to_pnode = _socket_to_pnode; in uv_init_hub_info()
1298 hi->gr_table_len = _gr_table_len; in uv_init_hub_info()
1299 hi->gr_table = _gr_table; in uv_init_hub_info()
1302 hi->gnode_extra = (uv_node_id & ~((1 << uv_cpuid.gnode_shift) - 1)) >> 1; in uv_init_hub_info()
1304 hi->gnode_upper = (u64)hi->gnode_extra << mn.m_val; in uv_init_hub_info()
1307 hi->global_mmr_base = uv_gp_table->mmr_base; in uv_init_hub_info()
1308 hi->global_mmr_shift = uv_gp_table->mmr_shift; in uv_init_hub_info()
1309 hi->global_gru_base = uv_gp_table->gru_base; in uv_init_hub_info()
1310 hi->global_gru_shift = uv_gp_table->gru_shift; in uv_init_hub_info()
1311 hi->gpa_shift = uv_gp_table->gpa_shift; in uv_init_hub_info()
1312 hi->gpa_mask = (1UL << hi->gpa_shift) - 1; in uv_init_hub_info()
1314 hi->global_mmr_base = in uv_init_hub_info()
1317 hi->global_mmr_shift = _UV_GLOBAL_MMR64_PNODE_SHIFT; in uv_init_hub_info()
1320 get_lowmem_redirect(&hi->lowmem_remap_base, &hi->lowmem_remap_top); in uv_init_hub_info()
1322 hi->apic_pnode_shift = uv_cpuid.socketid_shift; in uv_init_hub_info()
1325 pr_info("UV: N:%d M:%d m_shift:%d n_lshift:%d\n", hi->n_val, hi->m_val, hi->m_shift, hi->n_lshift); in uv_init_hub_info()
1326 …mask/shift:0x%lx/%d pnode_mask:0x%x apic_pns:%d\n", hi->gpa_mask, hi->gpa_shift, hi->pnode_mask, h… in uv_init_hub_info()
1327 pr_info("UV: mmr_base/shift:0x%lx/%ld\n", hi->global_mmr_base, hi->global_mmr_shift); in uv_init_hub_info()
1328 if (hi->global_gru_base) in uv_init_hub_info()
1330 hi->global_gru_base, hi->global_gru_shift); in uv_init_hub_info()
1332 pr_info("UV: gnode_upper:0x%lx gnode_extra:0x%x\n", hi->gnode_upper, hi->gnode_extra); in uv_init_hub_info()
1341 uv_gp_table->mmr_base, uv_gp_table->mmr_shift, in decode_gam_params()
1342 uv_gp_table->gru_base, uv_gp_table->gru_shift, in decode_gam_params()
1343 uv_gp_table->gpa_shift); in decode_gam_params()
1352 int sock_max = -1, pnode_max = -1; in decode_gam_rng_tbl()
1355 for (; gre->type != UV_GAM_RANGE_TYPE_UNUSED; gre++) { in decode_gam_rng_tbl()
1356 unsigned long size = ((unsigned long)(gre->limit - lgre) in decode_gam_rng_tbl()
1368 if (gre->type == 1 || gre->type == 2) in decode_gam_rng_tbl()
1376 pr_info("UV: %2d: 0x%014lx-0x%014lx%c %5lu%c %3d %04x %02x %02x\n", in decode_gam_rng_tbl()
1379 (unsigned long)gre->limit << UV_GAM_RANGE_SHFT, in decode_gam_rng_tbl()
1381 gre->type, gre->nasid, gre->sockid, gre->pnode); in decode_gam_rng_tbl()
1383 if (gre->type == UV_GAM_RANGE_TYPE_HOLE) in decode_gam_rng_tbl()
1384 gend = (unsigned long)gre->limit << UV_GAM_RANGE_SHFT; in decode_gam_rng_tbl()
1387 lgre = gre->limit; in decode_gam_rng_tbl()
1388 if (sock_min > gre->sockid) in decode_gam_rng_tbl()
1389 sock_min = gre->sockid; in decode_gam_rng_tbl()
1390 if (sock_max < gre->sockid) in decode_gam_rng_tbl()
1391 sock_max = gre->sockid; in decode_gam_rng_tbl()
1392 if (pnode_min > gre->pnode) in decode_gam_rng_tbl()
1393 pnode_min = gre->pnode; in decode_gam_rng_tbl()
1394 if (pnode_max < gre->pnode) in decode_gam_rng_tbl()
1395 pnode_max = gre->pnode; in decode_gam_rng_tbl()
1417 if (st && st->revision == UV_SYSTAB_VERSION_1) in decode_uv_systab()
1420 if ((!st) || (st->revision < UV_SYSTAB_VERSION_UV4_LATEST)) { in decode_uv_systab()
1421 int rev = st ? st->revision : 0; in decode_uv_systab()
1425 pr_err("UV: Does not support UV, switch to non-UV x86_64\n"); in decode_uv_systab()
1428 return -EINVAL; in decode_uv_systab()
1431 for (i = 0; st->entry[i].type != UV_SYSTAB_TYPE_UNUSED; i++) { in decode_uv_systab()
1432 unsigned long ptr = st->entry[i].offset; in decode_uv_systab()
1440 switch (st->entry[i].type) { in decode_uv_systab()
1455 __func__, st->entry[i].type); in decode_uv_systab()
1513 /* Build socket id -> node id, pnode */ in build_socket_tables()
1514 num = maxsock - minsock + 1; in build_socket_tables()
1519 nump = maxpnode - minpnode + 1; in build_socket_tables()
1532 for (; gre->type != UV_GAM_RANGE_TYPE_UNUSED; gre++) { in build_socket_tables()
1533 if (gre->type == UV_GAM_RANGE_TYPE_HOLE) in build_socket_tables()
1535 i = gre->sockid - minsock; in build_socket_tables()
1539 _socket_to_pnode[i] = gre->pnode; in build_socket_tables()
1541 i = gre->pnode - minpnode; in build_socket_tables()
1542 _pnode_to_socket[i] = gre->sockid; in build_socket_tables()
1545 gre->sockid, gre->type, gre->nasid, in build_socket_tables()
1546 _socket_to_pnode[gre->sockid - minsock], in build_socket_tables()
1547 _pnode_to_socket[gre->pnode - minpnode]); in build_socket_tables()
1550 /* Set socket -> node values: */ in build_socket_tables()
1561 _socket_to_node[sockid - minsock] = nid; in build_socket_tables()
1575 if (lnid == _socket_to_node[sockid - minsock]) { in build_socket_tables()
1576 _node_to_pnode[lnid] = _socket_to_pnode[sockid - minsock]; in build_socket_tables()
1590 pr_info("UV: Checking socket->node/pnode for identity maps\n"); in build_socket_tables()
1629 current->comm); in proc_hubbed_show()
1637 current->comm); in proc_hubless_show()
1645 current->comm); in proc_archtype_show()
1757 new_hub->pnode = _node_to_pnode[nodeid]; in uv_system_init_hub()
1759 new_hub->pnode = 0xffff; in uv_system_init_hub()
1761 new_hub->numa_blade_id = uv_node_to_blade_id(nodeid); in uv_system_init_hub()
1762 new_hub->memory_nid = NUMA_NO_NODE; in uv_system_init_hub()
1763 new_hub->nr_possible_cpus = 0; in uv_system_init_hub()
1764 new_hub->nr_online_cpus = 0; in uv_system_init_hub()
1777 uv_cpu_info_per(cpu)->p_uv_hub_info = uv_hub_info_list(nodeid); in uv_system_init_hub()
1778 uv_cpu_info_per(cpu)->blade_cpu_id = uv_cpu_hub_info(cpu)->nr_possible_cpus++; in uv_system_init_hub()
1779 if (uv_cpu_hub_info(cpu)->memory_nid == NUMA_NO_NODE) in uv_system_init_hub()
1780 uv_cpu_hub_info(cpu)->memory_nid = cpu_to_node(cpu); in uv_system_init_hub()
1784 uv_hub_info_list(numa_node_id)->pnode == 0xffff) in uv_system_init_hub()
1785 uv_hub_info_list(numa_node_id)->pnode = pnode; in uv_system_init_hub()
1786 else if (uv_cpu_hub_info(cpu)->pnode == 0xffff) in uv_system_init_hub()
1787 uv_cpu_hub_info(cpu)->pnode = pnode; in uv_system_init_hub()
1791 unsigned short pnode = uv_hub_info_list(nodeid)->pnode; in uv_system_init_hub()
1793 /* Add pnode info for pre-GAM list nodes without CPUs: */ in uv_system_init_hub()
1799 uv_hub_info_list(nodeid)->pnode = pnode; in uv_system_init_hub()
1805 uv_hub_info_list(nodeid)->pnode, in uv_system_init_hub()
1806 uv_hub_info_list(nodeid)->nr_possible_cpus); in uv_system_init_hub()