NUMA: use IHK CPU and NUMA mappings for sysfs entries
This commit is contained in:
@@ -534,31 +534,6 @@ extern void process_procfs_request(unsigned long rarg);
|
||||
extern void terminate_host(int pid);
|
||||
extern void debug_log(long);
|
||||
|
||||
static void req_get_cpu_mapping(long req_rpa)
|
||||
{
|
||||
size_t mapsize;
|
||||
size_t size;
|
||||
int npages;
|
||||
long phys;
|
||||
struct get_cpu_mapping_req *req;
|
||||
struct cpu_mapping *buf;
|
||||
|
||||
size = sizeof(*req);
|
||||
mapsize = size + (req_rpa & (PAGE_SIZE - 1));
|
||||
npages = (mapsize + PAGE_SIZE - 1) >> PAGE_SHIFT;
|
||||
phys = ihk_mc_map_memory(NULL, req_rpa, size);
|
||||
req = ihk_mc_map_virtual(phys, npages, PTATTR_WRITABLE);
|
||||
|
||||
req->error = arch_get_cpu_mapping(&buf, &req->buf_elems);
|
||||
if (!req->error) {
|
||||
req->buf_rpa = virt_to_phys(buf);
|
||||
}
|
||||
|
||||
ihk_mc_unmap_virtual(req, npages, 0);
|
||||
ihk_mc_unmap_memory(NULL, phys, size);
|
||||
return;
|
||||
} /* req_get_cpu_mapping() */
|
||||
|
||||
static int syscall_packet_handler(struct ihk_ikc_channel_desc *c,
|
||||
void *__packet, void *ihk_os)
|
||||
{
|
||||
@@ -687,15 +662,6 @@ static int syscall_packet_handler(struct ihk_ikc_channel_desc *c,
|
||||
ret = 0;
|
||||
break;
|
||||
|
||||
case SCD_MSG_GET_CPU_MAPPING:
|
||||
req_get_cpu_mapping(packet->arg);
|
||||
|
||||
pckt.msg = SCD_MSG_REPLY_GET_CPU_MAPPING;
|
||||
pckt.arg = packet->arg;
|
||||
syscall_channel_send(c, &pckt);
|
||||
ret = 0;
|
||||
break;
|
||||
|
||||
default:
|
||||
kprintf("syscall_pakcet_handler:unknown message "
|
||||
"(%d.%d.%d.%d.%d.%#lx)\n",
|
||||
|
||||
@@ -320,7 +320,7 @@ static void setup_remote_snooping_samples(void)
|
||||
static void populate_sysfs(void)
|
||||
{
|
||||
cpu_sysfs_setup();
|
||||
setup_remote_snooping_samples();
|
||||
//setup_remote_snooping_samples();
|
||||
} /* populate_sysfs() */
|
||||
|
||||
int host_ikc_inited = 0;
|
||||
|
||||
Reference in New Issue
Block a user