change function names
This commit is contained in:
@@ -20,7 +20,7 @@ static DECLARE_WAIT_QUEUE_HEAD(wq_prepare);
|
||||
extern struct mcctrl_channel *channels;
|
||||
int mcctrl_ikc_set_recv_cpu(int cpu);
|
||||
|
||||
static long mcexec_prepare_image(aal_os_t os,
|
||||
static long mcexec_prepare_image(ihk_os_t os,
|
||||
struct program_load_desc * __user udesc)
|
||||
{
|
||||
struct program_load_desc desc, *pdesc;
|
||||
@@ -97,18 +97,18 @@ free_out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
int mcexec_load_image(aal_os_t os, struct program_transfer *__user upt)
|
||||
int mcexec_load_image(ihk_os_t os, struct program_transfer *__user upt)
|
||||
{
|
||||
struct program_transfer pt;
|
||||
unsigned long phys, ret = 0;
|
||||
void *rpm;
|
||||
#if 0
|
||||
unsigned long dma_status = 0;
|
||||
aal_dma_channel_t channel;
|
||||
struct aal_dma_request request;
|
||||
ihk_dma_channel_t channel;
|
||||
struct ihk_dma_request request;
|
||||
void *p;
|
||||
|
||||
channel = aal_device_get_dma_channel(aal_os_to_dev(os), 0);
|
||||
channel = ihk_device_get_dma_channel(ihk_os_to_dev(os), 0);
|
||||
if (!channel) {
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -118,23 +118,23 @@ int mcexec_load_image(aal_os_t os, struct program_transfer *__user upt)
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
phys = aal_device_map_memory(aal_os_to_dev(os), pt.dest, PAGE_SIZE);
|
||||
#ifdef CONFIG_KNF
|
||||
phys = ihk_device_map_memory(ihk_os_to_dev(os), pt.dest, PAGE_SIZE);
|
||||
#ifdef CONFIG_MIC
|
||||
rpm = ioremap_wc(phys, PAGE_SIZE);
|
||||
#else
|
||||
rpm = aal_device_map_virtual(aal_os_to_dev(os), phys, PAGE_SIZE, NULL, 0);
|
||||
rpm = ihk_device_map_virtual(ihk_os_to_dev(os), phys, PAGE_SIZE, NULL, 0);
|
||||
#endif
|
||||
|
||||
if (copy_from_user(rpm, pt.src, PAGE_SIZE)) {
|
||||
ret = -EFAULT;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_KNF
|
||||
#ifdef CONFIG_MIC
|
||||
iounmap(rpm);
|
||||
#else
|
||||
aal_device_unmap_virtual(aal_os_to_dev(os), rpm, PAGE_SIZE);
|
||||
ihk_device_unmap_virtual(ihk_os_to_dev(os), rpm, PAGE_SIZE);
|
||||
#endif
|
||||
aal_device_unmap_memory(aal_os_to_dev(os), phys, PAGE_SIZE);
|
||||
ihk_device_unmap_memory(ihk_os_to_dev(os), phys, PAGE_SIZE);
|
||||
|
||||
return ret;
|
||||
|
||||
@@ -154,7 +154,7 @@ int mcexec_load_image(aal_os_t os, struct program_transfer *__user upt)
|
||||
request.notify = (void *)virt_to_phys(&dma_status);
|
||||
request.priv = (void *)1;
|
||||
|
||||
aal_dma_request(channel, &request);
|
||||
ihk_dma_request(channel, &request);
|
||||
|
||||
while (!dma_status) {
|
||||
mb();
|
||||
@@ -169,7 +169,7 @@ int mcexec_load_image(aal_os_t os, struct program_transfer *__user upt)
|
||||
|
||||
extern unsigned long last_thread_exec;
|
||||
|
||||
static long mcexec_start_image(aal_os_t os,
|
||||
static long mcexec_start_image(ihk_os_t os,
|
||||
struct program_load_desc * __user udesc)
|
||||
{
|
||||
struct program_load_desc desc;
|
||||
@@ -205,7 +205,7 @@ int mcexec_syscall(struct mcctrl_channel *c, unsigned long arg)
|
||||
}
|
||||
|
||||
#ifndef DO_USER_MODE
|
||||
int __do_in_kernel_syscall(aal_os_t os, struct mcctrl_channel *c,
|
||||
int __do_in_kernel_syscall(ihk_os_t os, struct mcctrl_channel *c,
|
||||
struct syscall_request *sc);
|
||||
static int remaining_job, base_cpu, job_pos;
|
||||
#endif
|
||||
@@ -213,7 +213,7 @@ static int remaining_job, base_cpu, job_pos;
|
||||
extern int num_channels;
|
||||
extern int mcctrl_dma_abort;
|
||||
|
||||
int mcexec_wait_syscall(aal_os_t os, struct syscall_wait_desc *__user req)
|
||||
int mcexec_wait_syscall(ihk_os_t os, struct syscall_wait_desc *__user req)
|
||||
{
|
||||
struct syscall_wait_desc swd;
|
||||
struct mcctrl_channel *c;
|
||||
@@ -289,7 +289,7 @@ int mcexec_wait_syscall(aal_os_t os, struct syscall_wait_desc *__user req)
|
||||
return 0;
|
||||
}
|
||||
|
||||
long mcexec_pin_region(aal_os_t os, unsigned long *__user arg)
|
||||
long mcexec_pin_region(ihk_os_t os, unsigned long *__user arg)
|
||||
{
|
||||
struct prepare_dma_desc desc;
|
||||
int pin_shift = 16;
|
||||
@@ -318,7 +318,7 @@ long mcexec_pin_region(aal_os_t os, unsigned long *__user arg)
|
||||
return 0;
|
||||
}
|
||||
|
||||
long mcexec_free_region(aal_os_t os, unsigned long *__user arg)
|
||||
long mcexec_free_region(ihk_os_t os, unsigned long *__user arg)
|
||||
{
|
||||
struct free_dma_desc desc;
|
||||
int pin_shift = 16;
|
||||
@@ -339,7 +339,7 @@ long mcexec_free_region(aal_os_t os, unsigned long *__user arg)
|
||||
return 0;
|
||||
}
|
||||
|
||||
long mcexec_load_syscall(aal_os_t os, struct syscall_load_desc *__user arg)
|
||||
long mcexec_load_syscall(ihk_os_t os, struct syscall_load_desc *__user arg)
|
||||
{
|
||||
struct syscall_load_desc desc;
|
||||
unsigned long phys;
|
||||
@@ -349,11 +349,11 @@ long mcexec_load_syscall(aal_os_t os, struct syscall_load_desc *__user arg)
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
phys = aal_device_map_memory(aal_os_to_dev(os), desc.src, desc.size);
|
||||
#ifdef CONFIG_KNF
|
||||
phys = ihk_device_map_memory(ihk_os_to_dev(os), desc.src, desc.size);
|
||||
#ifdef CONFIG_MIC
|
||||
rpm = ioremap_wc(phys, desc.size);
|
||||
#else
|
||||
rpm = aal_device_map_virtual(aal_os_to_dev(os), phys, desc.size, NULL, 0);
|
||||
rpm = ihk_device_map_virtual(ihk_os_to_dev(os), phys, desc.size, NULL, 0);
|
||||
#endif
|
||||
|
||||
dprintk("mcexec_load_syscall: %s (desc.size: %d)\n", rpm, desc.size);
|
||||
@@ -362,20 +362,20 @@ long mcexec_load_syscall(aal_os_t os, struct syscall_load_desc *__user arg)
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_KNF
|
||||
#ifdef CONFIG_MIC
|
||||
iounmap(rpm);
|
||||
#else
|
||||
aal_device_unmap_virtual(aal_os_to_dev(os), rpm, desc.size);
|
||||
ihk_device_unmap_virtual(ihk_os_to_dev(os), rpm, desc.size);
|
||||
#endif
|
||||
|
||||
aal_device_unmap_memory(aal_os_to_dev(os), phys, desc.size);
|
||||
ihk_device_unmap_memory(ihk_os_to_dev(os), phys, desc.size);
|
||||
|
||||
/*
|
||||
aal_dma_channel_t channel;
|
||||
struct aal_dma_request request;
|
||||
ihk_dma_channel_t channel;
|
||||
struct ihk_dma_request request;
|
||||
unsigned long dma_status = 0;
|
||||
|
||||
channel = aal_device_get_dma_channel(aal_os_to_dev(os), 0);
|
||||
channel = ihk_device_get_dma_channel(ihk_os_to_dev(os), 0);
|
||||
if (!channel) {
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -389,7 +389,7 @@ long mcexec_load_syscall(aal_os_t os, struct syscall_load_desc *__user arg)
|
||||
request.notify = (void *)virt_to_phys(&dma_status);
|
||||
request.priv = (void *)1;
|
||||
|
||||
aal_dma_request(channel, &request);
|
||||
ihk_dma_request(channel, &request);
|
||||
|
||||
while (!dma_status) {
|
||||
mb();
|
||||
@@ -400,15 +400,15 @@ long mcexec_load_syscall(aal_os_t os, struct syscall_load_desc *__user arg)
|
||||
return 0;
|
||||
}
|
||||
|
||||
long mcexec_ret_syscall(aal_os_t os, struct syscall_ret_desc *__user arg)
|
||||
long mcexec_ret_syscall(ihk_os_t os, struct syscall_ret_desc *__user arg)
|
||||
{
|
||||
struct syscall_ret_desc ret;
|
||||
struct mcctrl_channel *mc;
|
||||
#if 0
|
||||
aal_dma_channel_t channel;
|
||||
struct aal_dma_request request;
|
||||
ihk_dma_channel_t channel;
|
||||
struct ihk_dma_request request;
|
||||
|
||||
channel = aal_device_get_dma_channel(aal_os_to_dev(os), 0);
|
||||
channel = ihk_device_get_dma_channel(ihk_os_to_dev(os), 0);
|
||||
if (!channel) {
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -429,12 +429,12 @@ long mcexec_ret_syscall(aal_os_t os, struct syscall_ret_desc *__user arg)
|
||||
unsigned long phys;
|
||||
void *rpm;
|
||||
|
||||
phys = aal_device_map_memory(aal_os_to_dev(os), ret.dest,
|
||||
phys = ihk_device_map_memory(ihk_os_to_dev(os), ret.dest,
|
||||
ret.size);
|
||||
#ifdef CONFIG_KNF
|
||||
#ifdef CONFIG_MIC
|
||||
rpm = ioremap_wc(phys, ret.size);
|
||||
#else
|
||||
rpm = aal_device_map_virtual(aal_os_to_dev(os), phys,
|
||||
rpm = ihk_device_map_virtual(ihk_os_to_dev(os), phys,
|
||||
ret.size, NULL, 0);
|
||||
#endif
|
||||
|
||||
@@ -444,12 +444,12 @@ long mcexec_ret_syscall(aal_os_t os, struct syscall_ret_desc *__user arg)
|
||||
|
||||
mc->param.response_va->status = 1;
|
||||
|
||||
#ifdef CONFIG_KNF
|
||||
#ifdef CONFIG_MIC
|
||||
iounmap(rpm);
|
||||
#else
|
||||
aal_device_unmap_virtual(aal_os_to_dev(os), rpm, ret.size);
|
||||
ihk_device_unmap_virtual(ihk_os_to_dev(os), rpm, ret.size);
|
||||
#endif
|
||||
aal_device_unmap_memory(aal_os_to_dev(os), phys, ret.size);
|
||||
ihk_device_unmap_memory(ihk_os_to_dev(os), phys, ret.size);
|
||||
|
||||
/*
|
||||
memset(&request, 0, sizeof(request));
|
||||
@@ -462,7 +462,7 @@ long mcexec_ret_syscall(aal_os_t os, struct syscall_ret_desc *__user arg)
|
||||
request.notify = (void *)mc->param.response_rpa;
|
||||
request.priv = (void *)1;
|
||||
|
||||
aal_dma_request(channel, &request);
|
||||
ihk_dma_request(channel, &request);
|
||||
*/
|
||||
} else {
|
||||
mc->param.response_va->status = 1;
|
||||
@@ -471,7 +471,7 @@ long mcexec_ret_syscall(aal_os_t os, struct syscall_ret_desc *__user arg)
|
||||
return 0;
|
||||
}
|
||||
|
||||
long __mcctrl_control(aal_os_t os, unsigned int req, unsigned long arg)
|
||||
long __mcctrl_control(ihk_os_t os, unsigned int req, unsigned long arg)
|
||||
{
|
||||
switch (req) {
|
||||
case MCEXEC_UP_PREPARE_IMAGE:
|
||||
|
||||
@@ -9,17 +9,17 @@
|
||||
#include <linux/slab.h>
|
||||
#include "mcctrl.h"
|
||||
|
||||
extern long __mcctrl_control(aal_os_t, unsigned int, unsigned long);
|
||||
extern int prepare_ikc_channels(aal_os_t os);
|
||||
extern void destroy_ikc_channels(aal_os_t os);
|
||||
extern long __mcctrl_control(ihk_os_t, unsigned int, unsigned long);
|
||||
extern int prepare_ikc_channels(ihk_os_t os);
|
||||
extern void destroy_ikc_channels(ihk_os_t os);
|
||||
|
||||
static long mcctrl_ioctl(aal_os_t os, unsigned int request, void *priv,
|
||||
static long mcctrl_ioctl(ihk_os_t os, unsigned int request, void *priv,
|
||||
unsigned long arg)
|
||||
{
|
||||
return __mcctrl_control(os, request, arg);
|
||||
}
|
||||
|
||||
static struct aal_os_user_call_handler mcctrl_uchs[] = {
|
||||
static struct ihk_os_user_call_handler mcctrl_uchs[] = {
|
||||
{ .request = MCEXEC_UP_PREPARE_IMAGE, .func = mcctrl_ioctl },
|
||||
{ .request = MCEXEC_UP_LOAD_IMAGE, .func = mcctrl_ioctl },
|
||||
{ .request = MCEXEC_UP_START_IMAGE, .func = mcctrl_ioctl },
|
||||
@@ -30,16 +30,16 @@ static struct aal_os_user_call_handler mcctrl_uchs[] = {
|
||||
{ .request = MCEXEC_UP_FREE_DMA, .func = mcctrl_ioctl },
|
||||
};
|
||||
|
||||
static struct aal_os_user_call mcctrl_uc = {
|
||||
static struct ihk_os_user_call mcctrl_uc = {
|
||||
.num_handlers = sizeof(mcctrl_uchs) / sizeof(mcctrl_uchs[0]),
|
||||
.handlers = mcctrl_uchs,
|
||||
};
|
||||
|
||||
static aal_os_t os;
|
||||
static ihk_os_t os;
|
||||
|
||||
static int __init mcctrl_init(void)
|
||||
{
|
||||
os = aal_host_find_os(0, NULL);
|
||||
os = ihk_host_find_os(0, NULL);
|
||||
if (!os) {
|
||||
printk("OS #0 not found.\n");
|
||||
return -ENOENT;
|
||||
@@ -49,13 +49,13 @@ static int __init mcctrl_init(void)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return aal_os_register_user_call_handlers(os, &mcctrl_uc);
|
||||
return ihk_os_register_user_call_handlers(os, &mcctrl_uc);
|
||||
}
|
||||
|
||||
static void __exit mcctrl_exit(void)
|
||||
{
|
||||
printk("mcctrl: unregistered.\n");
|
||||
aal_os_unregister_user_call_handlers(os, &mcctrl_uc);
|
||||
ihk_os_unregister_user_call_handlers(os, &mcctrl_uc);
|
||||
destroy_ikc_channels(os);
|
||||
}
|
||||
|
||||
|
||||
@@ -15,10 +15,10 @@ int num_channels;
|
||||
struct mcctrl_channel *channels;
|
||||
|
||||
void mcexec_prepare_ack(unsigned long arg);
|
||||
static void mcctrl_ikc_init(aal_os_t os, int cpu, unsigned long rphys);
|
||||
static void mcctrl_ikc_init(ihk_os_t os, int cpu, unsigned long rphys);
|
||||
int mcexec_syscall(struct mcctrl_channel *c, unsigned long arg);
|
||||
|
||||
static int syscall_packet_handler(struct aal_ikc_channel_desc *c,
|
||||
static int syscall_packet_handler(struct ihk_ikc_channel_desc *c,
|
||||
void *__packet, void *__os)
|
||||
{
|
||||
struct ikc_scd_packet *pisp = __packet;
|
||||
@@ -45,7 +45,7 @@ int mcctrl_ikc_send(int cpu, struct ikc_scd_packet *pisp)
|
||||
if (cpu < 0 || cpu >= num_channels || !channels[cpu].c) {
|
||||
return -EINVAL;
|
||||
}
|
||||
return aal_ikc_send(channels[cpu].c, pisp, 0);
|
||||
return ihk_ikc_send(channels[cpu].c, pisp, 0);
|
||||
}
|
||||
|
||||
int mcctrl_ikc_send_msg(int cpu, int msg, int ref, unsigned long arg)
|
||||
@@ -60,15 +60,15 @@ int mcctrl_ikc_send_msg(int cpu, int msg, int ref, unsigned long arg)
|
||||
packet.ref = ref;
|
||||
packet.arg = arg;
|
||||
|
||||
return aal_ikc_send(channels[cpu].c, &packet, 0);
|
||||
return ihk_ikc_send(channels[cpu].c, &packet, 0);
|
||||
}
|
||||
|
||||
int mcctrl_ikc_set_recv_cpu(int cpu)
|
||||
{
|
||||
aal_ikc_channel_set_cpu(channels[cpu].c,
|
||||
aal_ikc_get_processor_id());
|
||||
ihk_ikc_channel_set_cpu(channels[cpu].c,
|
||||
ihk_ikc_get_processor_id());
|
||||
kprintf("Setting the target to %d\n",
|
||||
aal_ikc_get_processor_id());
|
||||
ihk_ikc_get_processor_id());
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ int mcctrl_ikc_is_valid_thread(int cpu)
|
||||
unsigned long *mcctrl_doorbell_va;
|
||||
unsigned long mcctrl_doorbell_pa;
|
||||
|
||||
static void mcctrl_ikc_init(aal_os_t os, int cpu, unsigned long rphys)
|
||||
static void mcctrl_ikc_init(ihk_os_t os, int cpu, unsigned long rphys)
|
||||
{
|
||||
struct ikc_scd_packet packet;
|
||||
struct mcctrl_channel *pmc = channels + cpu;
|
||||
@@ -97,12 +97,12 @@ static void mcctrl_ikc_init(aal_os_t os, int cpu, unsigned long rphys)
|
||||
|
||||
printk("IKC init: %d\n", cpu);
|
||||
|
||||
phys = aal_device_map_memory(aal_os_to_dev(os), rphys,
|
||||
phys = ihk_device_map_memory(ihk_os_to_dev(os), rphys,
|
||||
sizeof(struct ikc_scd_init_param));
|
||||
#ifdef CONFIG_KNF
|
||||
#ifdef CONFIG_MIC
|
||||
rpm = ioremap_wc(phys, sizeof(struct ikc_scd_init_param));
|
||||
#else
|
||||
rpm = aal_device_map_virtual(aal_os_to_dev(os), phys,
|
||||
rpm = ihk_device_map_virtual(ihk_os_to_dev(os), phys,
|
||||
sizeof(struct ikc_scd_init_param),
|
||||
NULL, 0);
|
||||
#endif
|
||||
@@ -121,14 +121,14 @@ static void mcctrl_ikc_init(aal_os_t os, int cpu, unsigned long rphys)
|
||||
|
||||
pmc->param.response_rpa = rpm->response_page;
|
||||
pmc->param.response_pa
|
||||
= aal_device_map_memory(aal_os_to_dev(os),
|
||||
= ihk_device_map_memory(ihk_os_to_dev(os),
|
||||
pmc->param.response_rpa,
|
||||
PAGE_SIZE);
|
||||
#ifdef CONFIG_KNF
|
||||
#ifdef CONFIG_MIC
|
||||
pmc->param.response_va = ioremap_cache(pmc->param.response_pa,
|
||||
PAGE_SIZE);
|
||||
#else
|
||||
pmc->param.response_va = aal_device_map_virtual(aal_os_to_dev(os),
|
||||
pmc->param.response_va = ihk_device_map_virtual(ihk_os_to_dev(os),
|
||||
pmc->param.response_pa,
|
||||
PAGE_SIZE, NULL, 0);
|
||||
#endif
|
||||
@@ -151,22 +151,22 @@ static void mcctrl_ikc_init(aal_os_t os, int cpu, unsigned long rphys)
|
||||
pmc->param.request_va, pmc->param.response_va,
|
||||
pmc->param.doorbell_va);
|
||||
|
||||
aal_ikc_send(pmc->c, &packet, 0);
|
||||
ihk_ikc_send(pmc->c, &packet, 0);
|
||||
|
||||
#ifdef CONFIG_KNF
|
||||
#ifdef CONFIG_MIC
|
||||
iounmap(rpm);
|
||||
#else
|
||||
aal_device_unmap_virtual(aal_os_to_dev(os), rpm,
|
||||
ihk_device_unmap_virtual(ihk_os_to_dev(os), rpm,
|
||||
sizeof(struct ikc_scd_init_param));
|
||||
#endif
|
||||
|
||||
aal_device_unmap_memory(aal_os_to_dev(os), phys,
|
||||
ihk_device_unmap_memory(ihk_os_to_dev(os), phys,
|
||||
sizeof(struct ikc_scd_init_param));
|
||||
}
|
||||
|
||||
static int connect_handler(struct aal_ikc_channel_info *param)
|
||||
static int connect_handler(struct ihk_ikc_channel_info *param)
|
||||
{
|
||||
struct aal_ikc_channel_desc *c;
|
||||
struct ihk_ikc_channel_desc *c;
|
||||
int cpu;
|
||||
|
||||
c = param->channel;
|
||||
@@ -185,7 +185,7 @@ static int connect_handler(struct aal_ikc_channel_info *param)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct aal_ikc_listen_param listen_param = {
|
||||
static struct ihk_ikc_listen_param listen_param = {
|
||||
.port = 501,
|
||||
.handler = connect_handler,
|
||||
.pkt_size = sizeof(struct ikc_scd_packet),
|
||||
@@ -193,14 +193,14 @@ static struct aal_ikc_listen_param listen_param = {
|
||||
.magic = 0x1129,
|
||||
};
|
||||
|
||||
int prepare_ikc_channels(aal_os_t os)
|
||||
int prepare_ikc_channels(ihk_os_t os)
|
||||
{
|
||||
struct aal_cpu_info *info;
|
||||
struct ihk_cpu_info *info;
|
||||
|
||||
mcctrl_doorbell_va = (void *)__get_free_page(GFP_KERNEL);
|
||||
mcctrl_doorbell_pa = virt_to_phys(mcctrl_doorbell_va);
|
||||
|
||||
info = aal_os_get_cpu_info(os);
|
||||
info = ihk_os_get_cpu_info(os);
|
||||
if (!info) {
|
||||
printk("Error: cannot retrieve CPU info.\n");
|
||||
return -EINVAL;
|
||||
@@ -218,36 +218,36 @@ int prepare_ikc_channels(aal_os_t os)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
aal_ikc_listen_port(os, &listen_param);
|
||||
ihk_ikc_listen_port(os, &listen_param);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void __destroy_ikc_channel(aal_os_t os, struct mcctrl_channel *pmc)
|
||||
void __destroy_ikc_channel(ihk_os_t os, struct mcctrl_channel *pmc)
|
||||
{
|
||||
free_pages((unsigned long)pmc->param.request_va,
|
||||
REQUEST_SHIFT - PAGE_SHIFT);
|
||||
free_page((unsigned long)pmc->param.post_va);
|
||||
|
||||
#ifdef CONFIG_KNF
|
||||
#ifdef CONFIG_MIC
|
||||
iounmap(pmc->param.response_va);
|
||||
#else
|
||||
aal_device_unmap_virtual(aal_os_to_dev(os), pmc->param.response_va,
|
||||
ihk_device_unmap_virtual(ihk_os_to_dev(os), pmc->param.response_va,
|
||||
PAGE_SIZE);
|
||||
#endif
|
||||
aal_device_unmap_memory(aal_os_to_dev(os),
|
||||
ihk_device_unmap_memory(ihk_os_to_dev(os),
|
||||
pmc->param.response_pa, PAGE_SIZE);
|
||||
free_pages((unsigned long)pmc->dma_buf,
|
||||
DMA_PIN_SHIFT - PAGE_SHIFT);
|
||||
}
|
||||
|
||||
void destroy_ikc_channels(aal_os_t os)
|
||||
void destroy_ikc_channels(ihk_os_t os)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < num_channels; i++) {
|
||||
if (channels[i].c) {
|
||||
// aal_ikc_disconnect(channels[i].c);
|
||||
aal_ikc_free_channel(channels[i].c);
|
||||
// ihk_ikc_disconnect(channels[i].c);
|
||||
ihk_ikc_free_channel(channels[i].c);
|
||||
__destroy_ikc_channel(os, channels + i);
|
||||
printk("Channel #%d freed.\n", i);
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ struct ikc_scd_packet {
|
||||
};
|
||||
|
||||
struct mcctrl_priv {
|
||||
aal_os_t os;
|
||||
ihk_os_t os;
|
||||
struct program_load_desc *desc;
|
||||
};
|
||||
|
||||
@@ -53,7 +53,7 @@ struct syscall_params {
|
||||
};
|
||||
|
||||
struct mcctrl_channel {
|
||||
struct aal_ikc_channel_desc *c;
|
||||
struct ihk_ikc_channel_desc *c;
|
||||
struct syscall_params param;
|
||||
struct ikc_scd_init_param init;
|
||||
void *dma_buf;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
//#define SC_DEBUG
|
||||
#ifdef SC_DEBUG
|
||||
static struct aal_dma_request last_request;
|
||||
static struct ihk_dma_request last_request;
|
||||
|
||||
static void print_dma_lastreq(void)
|
||||
{
|
||||
@@ -29,14 +29,14 @@ static void print_dma_lastreq(void)
|
||||
unsigned long last_thread_exec = 0;
|
||||
|
||||
#ifndef DO_USER_MODE
|
||||
static int do_async_copy(aal_os_t os, unsigned long dest, unsigned long src,
|
||||
static int do_async_copy(ihk_os_t os, unsigned long dest, unsigned long src,
|
||||
unsigned long size, unsigned int inbound)
|
||||
{
|
||||
struct aal_dma_request request;
|
||||
aal_dma_channel_t channel;
|
||||
struct ihk_dma_request request;
|
||||
ihk_dma_channel_t channel;
|
||||
unsigned long asize = ALIGN_WAIT_BUF(size);
|
||||
|
||||
channel = aal_device_get_dma_channel(aal_os_to_dev(os), 0);
|
||||
channel = ihk_device_get_dma_channel(ihk_os_to_dev(os), 0);
|
||||
if (!channel) {
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -55,7 +55,7 @@ static int do_async_copy(aal_os_t os, unsigned long dest, unsigned long src,
|
||||
last_request = request;
|
||||
#endif
|
||||
|
||||
aal_dma_request(channel, &request);
|
||||
ihk_dma_request(channel, &request);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -119,7 +119,7 @@ static unsigned long translate_remote_va(struct mcctrl_channel *c,
|
||||
|
||||
extern struct mcctrl_channel *channels;
|
||||
|
||||
int __do_in_kernel_syscall(aal_os_t os, struct mcctrl_channel *c,
|
||||
int __do_in_kernel_syscall(ihk_os_t os, struct mcctrl_channel *c,
|
||||
struct syscall_request *sc)
|
||||
{
|
||||
int ret;
|
||||
|
||||
Reference in New Issue
Block a user