NUMA: process CPU NUMA information
This commit is contained in:
16
kernel/ap.c
16
kernel/ap.c
@ -65,7 +65,7 @@ void ap_init(void)
|
||||
{
|
||||
struct ihk_mc_cpu_info *cpu_info;
|
||||
int i;
|
||||
int bsp_hw_id;
|
||||
int bsp_hw_id, bsp_cpu_id;
|
||||
|
||||
ihk_mc_init_ap();
|
||||
init_delay();
|
||||
@ -78,13 +78,23 @@ void ap_init(void)
|
||||
return;
|
||||
}
|
||||
|
||||
kprintf("BSP HW ID = %d\n", bsp_hw_id);
|
||||
bsp_cpu_id = 0;
|
||||
for (i = 0; i < cpu_info->ncpus; ++i) {
|
||||
if (cpu_info->hw_ids[i] == bsp_hw_id) {
|
||||
bsp_cpu_id = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
kprintf("BSP: %d (HW ID: %d @ NUMA %d)\n", bsp_cpu_id,
|
||||
bsp_hw_id, cpu_info->nodes[0]);
|
||||
|
||||
for (i = 0; i < cpu_info->ncpus; i++) {
|
||||
if (cpu_info->hw_ids[i] == bsp_hw_id) {
|
||||
continue;
|
||||
}
|
||||
kprintf("AP Booting: %d (HW ID: %d)\n", i, cpu_info->hw_ids[i]);
|
||||
kprintf("AP Booting: %d (HW ID: %d @ NUMA %d)\n", i,
|
||||
cpu_info->hw_ids[i], cpu_info->nodes[i]);
|
||||
ihk_mc_boot_cpu(cpu_info->hw_ids[i], (unsigned long)ap_wait);
|
||||
|
||||
num_processors++;
|
||||
|
||||
@ -501,7 +501,7 @@ static void numa_init(void)
|
||||
for (i = 0; i < ihk_mc_get_nr_numa_nodes(); ++i) {
|
||||
int linux_numa_id, type;
|
||||
|
||||
ihk_mc_get_numa_node(i, &linux_numa_id, &type);
|
||||
ihk_mc_get_numa_node(i, &linux_numa_id, &type, NULL);
|
||||
memory_nodes[i].id = i;
|
||||
memory_nodes[i].linux_numa_id = linux_numa_id;
|
||||
memory_nodes[i].type = type;
|
||||
|
||||
@ -155,7 +155,9 @@ int ihk_mc_pt_virt_to_phys(struct page_table *pt,
|
||||
uint64_t ihk_mc_pt_virt_to_pagemap(struct page_table *pt, unsigned long virt);
|
||||
|
||||
int ihk_mc_get_nr_numa_nodes(void);
|
||||
int ihk_mc_get_numa_node(int id, int *linux_numa_id, int *type);
|
||||
struct smp_coreset;
|
||||
int ihk_mc_get_numa_node(int id, int *linux_numa_id, int *type,
|
||||
struct smp_coreset **cpu_hw_ids);
|
||||
int ihk_mc_get_nr_memory_chunks(void);
|
||||
int ihk_mc_get_memory_chunk(int id,
|
||||
unsigned long *start,
|
||||
|
||||
Reference in New Issue
Block a user