mcctrl: use GFP_ATOMIC in atomic context
This commit is contained in:
@ -749,7 +749,7 @@ int procfsm_packet_handler(void *os, int msg, int pid, unsigned long arg)
|
|||||||
{
|
{
|
||||||
struct procfs_work *work = NULL;
|
struct procfs_work *work = NULL;
|
||||||
|
|
||||||
work = kzalloc(sizeof(*work), GFP_KERNEL);
|
work = kzalloc(sizeof(*work), GFP_ATOMIC);
|
||||||
if (!work) {
|
if (!work) {
|
||||||
printk("%s: kzalloc failed\n", __FUNCTION__);
|
printk("%s: kzalloc failed\n", __FUNCTION__);
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
@ -281,7 +281,7 @@ static int remote_page_fault(struct mcctrl_usrdata *usrdata, void *fault_addr, u
|
|||||||
phys, sizeof(*resp), NULL, 0);
|
phys, sizeof(*resp), NULL, 0);
|
||||||
|
|
||||||
retry_alloc:
|
retry_alloc:
|
||||||
wqhln = kmalloc(sizeof(*wqhln), GFP_KERNEL);
|
wqhln = kmalloc(sizeof(*wqhln), GFP_ATOMIC);
|
||||||
if (!wqhln) {
|
if (!wqhln) {
|
||||||
printk("WARNING: coudln't alloc wait queue head, retrying..\n");
|
printk("WARNING: coudln't alloc wait queue head, retrying..\n");
|
||||||
goto retry_alloc;
|
goto retry_alloc;
|
||||||
@ -779,7 +779,7 @@ static int pager_req_create(ihk_os_t os, int fd, uintptr_t result_pa)
|
|||||||
|
|
||||||
up(&pager_sem);
|
up(&pager_sem);
|
||||||
|
|
||||||
newpager = kzalloc(sizeof(*newpager), GFP_KERNEL);
|
newpager = kzalloc(sizeof(*newpager), GFP_ATOMIC);
|
||||||
if (!newpager) {
|
if (!newpager) {
|
||||||
error = -ENOMEM;
|
error = -ENOMEM;
|
||||||
printk("pager_req_create(%d,%lx):kzalloc failed. %d\n", fd, (long)result_pa, error);
|
printk("pager_req_create(%d,%lx):kzalloc failed. %d\n", fd, (long)result_pa, error);
|
||||||
@ -1035,7 +1035,7 @@ static int pager_req_map(ihk_os_t os, int fd, size_t len, off_t off,
|
|||||||
uintptr_t phys;
|
uintptr_t phys;
|
||||||
|
|
||||||
dprintk("pager_req_map(%p,%d,%lx,%lx,%lx)\n", os, fd, len, off, result_rpa);
|
dprintk("pager_req_map(%p,%d,%lx,%lx,%lx)\n", os, fd, len, off, result_rpa);
|
||||||
pager = kzalloc(sizeof(*pager), GFP_KERNEL);
|
pager = kzalloc(sizeof(*pager), GFP_ATOMIC);
|
||||||
if (!pager) {
|
if (!pager) {
|
||||||
error = -ENOMEM;
|
error = -ENOMEM;
|
||||||
printk("pager_req_map(%p,%d,%lx,%lx,%lx):kzalloc failed. %d\n", os, fd, len, off, result_rpa, error);
|
printk("pager_req_map(%p,%d,%lx,%lx,%lx):kzalloc failed. %d\n", os, fd, len, off, result_rpa, error);
|
||||||
@ -1514,7 +1514,7 @@ int __do_in_kernel_syscall(ihk_os_t os, struct ikc_scd_packet *packet)
|
|||||||
struct mcctrl_per_proc_data *ppd = NULL;
|
struct mcctrl_per_proc_data *ppd = NULL;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
ppd = kmalloc(sizeof(*ppd), GFP_KERNEL);
|
ppd = kmalloc(sizeof(*ppd), GFP_ATOMIC);
|
||||||
if (!ppd) {
|
if (!ppd) {
|
||||||
printk("ERROR: allocating per process data\n");
|
printk("ERROR: allocating per process data\n");
|
||||||
error = -ENOMEM;
|
error = -ENOMEM;
|
||||||
|
|||||||
@ -1888,7 +1888,7 @@ sysfsm_packet_handler(void *os, int msg, int err, long arg1, long arg2)
|
|||||||
{
|
{
|
||||||
struct sysfs_work *work = NULL;
|
struct sysfs_work *work = NULL;
|
||||||
|
|
||||||
work = kzalloc(sizeof(*work), GFP_KERNEL);
|
work = kzalloc(sizeof(*work), GFP_ATOMIC);
|
||||||
if (!work) {
|
if (!work) {
|
||||||
eprintk("mcctrl:sysfsm_packet_handler:kzalloc failed\n");
|
eprintk("mcctrl:sysfsm_packet_handler:kzalloc failed\n");
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -190,6 +190,9 @@ long do_syscall(struct syscall_request *req, int cpu, int pid)
|
|||||||
dkprintf("SC(%d)[%3d] sending syscall\n",
|
dkprintf("SC(%d)[%3d] sending syscall\n",
|
||||||
ihk_mc_get_processor_id(),
|
ihk_mc_get_processor_id(),
|
||||||
req->number);
|
req->number);
|
||||||
|
|
||||||
|
irqstate = 0; /* for avoidance of warning */
|
||||||
|
barrier();
|
||||||
|
|
||||||
if(req->number != __NR_exit_group){
|
if(req->number != __NR_exit_group){
|
||||||
if(proc->nohost && // host is down
|
if(proc->nohost && // host is down
|
||||||
@ -199,7 +202,6 @@ long do_syscall(struct syscall_request *req, int cpu, int pid)
|
|||||||
++thread->in_syscall_offload;
|
++thread->in_syscall_offload;
|
||||||
}
|
}
|
||||||
|
|
||||||
irqstate = 0; /* for avoidance of warning */
|
|
||||||
if(req->number == __NR_exit_group ||
|
if(req->number == __NR_exit_group ||
|
||||||
req->number == __NR_gettid ||
|
req->number == __NR_gettid ||
|
||||||
req->number == __NR_kill){ // interrupt syscall
|
req->number == __NR_kill){ // interrupt syscall
|
||||||
|
|||||||
Reference in New Issue
Block a user