X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=linux_module%2Fpalacios-stubs.c;h=ba9da58bc5d0318ea2389ec0591d940978d1be81;hb=fd288e4dc51177f037f4752861eb95971fb1d1a0;hp=5ef9c5cfda096d71d0066dd4e378af248850905d;hpb=35b3113f6297f134f2ba7d43543c5366aec65181;p=palacios.git diff --git a/linux_module/palacios-stubs.c b/linux_module/palacios-stubs.c index 5ef9c5c..ba9da58 100644 --- a/linux_module/palacios-stubs.c +++ b/linux_module/palacios-stubs.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include @@ -305,7 +306,7 @@ palacios_alloc(unsigned int size) { // this function is used extensively throughout palacios and the linux // module, both in places where interrupts are off and where they are on // a GFP_KERNEL call, when done with interrupts off can lead to DEADLOCK - if (irqs_disabled()) { + if (irqs_disabled() || in_atomic()) { return palacios_alloc_extended(size,GFP_ATOMIC,-1); } else { return palacios_alloc_extended(size,GFP_KERNEL,-1); @@ -357,7 +358,7 @@ palacios_paddr_to_vaddr( /** * Runs a function on the specified CPU. */ -static void +void palacios_xcall( int cpu_id, void (*fn)(void *arg), @@ -834,7 +835,7 @@ void palacios_used_fpu(void) struct thread_info *cur = current_thread_info(); // We assume we are not preemptible here... - cur->status |= TS_USEDFPU; + cur->status |= 1; clts(); // After this, FP Save should be handled by Linux if it // switches to a different task and that task uses FPU