cregit-Linux how code gets into the kernel

Release 4.10 arch/x86/mm/srat.c

Directory: arch/x86/mm
/*
 * ACPI 3.0 based NUMA setup
 * Copyright 2004 Andi Kleen, SuSE Labs.
 *
 * Reads the ACPI SRAT table to figure out what memory belongs to which CPUs.
 *
 * Called from acpi_numa_init while reading the SRAT and SLIT tables.
 * Assumes all memory regions belonging to a single proximity domain
 * are in one chunk. Holes between them will be included in the node.
 */

#include <linux/kernel.h>
#include <linux/acpi.h>
#include <linux/mmzone.h>
#include <linux/bitmap.h>
#include <linux/init.h>
#include <linux/topology.h>
#include <linux/mm.h>
#include <asm/proto.h>
#include <asm/numa.h>
#include <asm/e820.h>
#include <asm/apic.h>
#include <asm/uv/uv.h>

/* Callback for Proximity Domain -> x2APIC mapping */

void __init acpi_numa_x2apic_affinity_init(struct acpi_srat_x2apic_cpu_affinity *pa) { int pxm, node; int apic_id; if (srat_disabled()) return; if (pa->header.length < sizeof(struct acpi_srat_x2apic_cpu_affinity)) { bad_srat(); return; } if ((pa->flags & ACPI_SRAT_CPU_ENABLED) == 0) return; pxm = pa->proximity_domain; apic_id = pa->apic_id; if (!apic->apic_id_valid(apic_id)) { printk(KERN_INFO "SRAT: PXM %u -> X2APIC 0x%04x ignored\n", pxm, apic_id); return; } node = acpi_map_pxm_to_node(pxm); if (node < 0) { printk(KERN_ERR "SRAT: Too many proximity domains %x\n", pxm); bad_srat(); return; } if (apic_id >= MAX_LOCAL_APIC) { printk(KERN_INFO "SRAT: PXM %u -> APIC 0x%04x -> Node %u skipped apicid that is too big\n", pxm, apic_id, node); return; } set_apicid_to_node(apic_id, node); node_set(node, numa_nodes_parsed); printk(KERN_INFO "SRAT: PXM %u -> APIC 0x%04x -> Node %u\n", pxm, apic_id, node); }

Contributors

PersonTokensPropCommitsCommitProp
suresh siddhasuresh siddha10462.28%111.11%
yinghai luyinghai lu4627.54%333.33%
jack steinerjack steiner63.59%111.11%
tejun heotejun heo52.99%222.22%
steffen persvoldsteffen persvold52.99%111.11%
hanjun guohanjun guo10.60%111.11%
Total167100.00%9100.00%

/* Callback for Proximity Domain -> LAPIC mapping */
void __init acpi_numa_processor_affinity_init(struct acpi_srat_cpu_affinity *pa) { int pxm, node; int apic_id; if (srat_disabled()) return; if (pa->header.length != sizeof(struct acpi_srat_cpu_affinity)) { bad_srat(); return; } if ((pa->flags & ACPI_SRAT_CPU_ENABLED) == 0) return; pxm = pa->proximity_domain_lo; if (acpi_srat_revision >= 2) pxm |= *((unsigned int*)pa->proximity_domain_hi) << 8; node = acpi_map_pxm_to_node(pxm); if (node < 0) { printk(KERN_ERR "SRAT: Too many proximity domains %x\n", pxm); bad_srat(); return; } if (get_uv_system_type() >= UV_X2APIC) apic_id = (pa->apic_id << 8) | pa->local_sapic_eid; else apic_id = pa->apic_id; if (apic_id >= MAX_LOCAL_APIC) { printk(KERN_INFO "SRAT: PXM %u -> APIC 0x%02x -> Node %u skipped apicid that is too big\n", pxm, apic_id, node); return; } set_apicid_to_node(apic_id, node); node_set(node, numa_nodes_parsed); printk(KERN_INFO "SRAT: PXM %u -> APIC 0x%02x -> Node %u\n", pxm, apic_id, node); }

Contributors

PersonTokensPropCommitsCommitProp
andi kleenandi kleen9450.00%320.00%
jack steinerjack steiner2814.89%320.00%
yinghai luyinghai lu2814.89%320.00%
kurt garloffkurt garloff2211.70%16.67%
alexey starikovskiyalexey starikovskiy73.72%16.67%
tejun heotejun heo52.66%213.33%
mike travismike travis31.60%16.67%
hanjun guohanjun guo10.53%16.67%
Total188100.00%15100.00%


int __init x86_acpi_numa_init(void) { int ret; ret = acpi_numa_init(); if (ret < 0) return ret; return srat_disabled() ? -EINVAL : 0; }

Contributors

PersonTokensPropCommitsCommitProp
tejun heotejun heo34100.00%1100.00%
Total34100.00%1100.00%


Overall Contributors

PersonTokensPropCommitsCommitProp
andi kleenandi kleen12529.21%520.83%
suresh siddhasuresh siddha10524.53%14.17%
yinghai luyinghai lu7417.29%416.67%
tejun heotejun heo4410.28%312.50%
jack steinerjack steiner368.41%312.50%
kurt garloffkurt garloff225.14%14.17%
alexey starikovskiyalexey starikovskiy71.64%14.17%
steffen persvoldsteffen persvold51.17%14.17%
ingo molnaringo molnar40.93%28.33%
mike travismike travis30.70%14.17%
hanjun guohanjun guo20.47%14.17%
paul gortmakerpaul gortmaker10.23%14.17%
Total428100.00%24100.00%
Directory: arch/x86/mm
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.