|
@@ -49,7 +49,7 @@ struct osd_callback_struct {
|
|
|
void *data;
|
|
|
};
|
|
|
|
|
|
-void *osd_VirtualAllocExec(unsigned int size)
|
|
|
+void *osd_virtual_alloc_exec(unsigned int size)
|
|
|
{
|
|
|
#ifdef __x86_64__
|
|
|
return __vmalloc(size, GFP_KERNEL, PAGE_KERNEL_EXEC);
|
|
@@ -60,7 +60,7 @@ void *osd_VirtualAllocExec(unsigned int size)
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * osd_PageAlloc() - Allocate pages
|
|
|
+ * osd_page_alloc() - Allocate pages
|
|
|
* @count: Total number of Kernel pages you want to allocate
|
|
|
*
|
|
|
* Tries to allocate @count number of consecutive free kernel pages.
|
|
@@ -68,7 +68,7 @@ void *osd_VirtualAllocExec(unsigned int size)
|
|
|
* If successfull it will return pointer to the @count pages.
|
|
|
* Mainly used by Hyper-V drivers.
|
|
|
*/
|
|
|
-void *osd_PageAlloc(unsigned int count)
|
|
|
+void *osd_page_alloc(unsigned int count)
|
|
|
{
|
|
|
void *p;
|
|
|
|
|
@@ -85,26 +85,26 @@ void *osd_PageAlloc(unsigned int count)
|
|
|
/* if (p) memset(p, 0, PAGE_SIZE); */
|
|
|
/* return p; */
|
|
|
}
|
|
|
-EXPORT_SYMBOL_GPL(osd_PageAlloc);
|
|
|
+EXPORT_SYMBOL_GPL(osd_page_alloc);
|
|
|
|
|
|
/**
|
|
|
- * osd_PageFree() - Free pages
|
|
|
+ * osd_page_free() - Free pages
|
|
|
* @page: Pointer to the first page to be freed
|
|
|
* @count: Total number of Kernel pages you free
|
|
|
*
|
|
|
- * Frees the pages allocated by osd_PageAlloc()
|
|
|
+ * Frees the pages allocated by osd_page_alloc()
|
|
|
* Mainly used by Hyper-V drivers.
|
|
|
*/
|
|
|
-void osd_PageFree(void *page, unsigned int count)
|
|
|
+void osd_page_free(void *page, unsigned int count)
|
|
|
{
|
|
|
free_pages((unsigned long)page, get_order(count * PAGE_SIZE));
|
|
|
/*struct page* p = virt_to_page(page);
|
|
|
__free_page(p);*/
|
|
|
}
|
|
|
-EXPORT_SYMBOL_GPL(osd_PageFree);
|
|
|
+EXPORT_SYMBOL_GPL(osd_page_free);
|
|
|
|
|
|
/**
|
|
|
- * osd_WaitEventCreate() - Create the event queue
|
|
|
+ * osd_waitevent_create() - Create the event queue
|
|
|
*
|
|
|
* Allocates memory for a &struct osd_waitevent. And then calls
|
|
|
* init_waitqueue_head to set up the wait queue for the event.
|
|
@@ -114,7 +114,7 @@ EXPORT_SYMBOL_GPL(osd_PageFree);
|
|
|
* Returns pointer to &struct osd_waitevent
|
|
|
* Mainly used by Hyper-V drivers.
|
|
|
*/
|
|
|
-struct osd_waitevent *osd_WaitEventCreate(void)
|
|
|
+struct osd_waitevent *osd_waitevent_create(void)
|
|
|
{
|
|
|
struct osd_waitevent *wait = kmalloc(sizeof(struct osd_waitevent),
|
|
|
GFP_KERNEL);
|
|
@@ -125,11 +125,11 @@ struct osd_waitevent *osd_WaitEventCreate(void)
|
|
|
init_waitqueue_head(&wait->event);
|
|
|
return wait;
|
|
|
}
|
|
|
-EXPORT_SYMBOL_GPL(osd_WaitEventCreate);
|
|
|
+EXPORT_SYMBOL_GPL(osd_waitevent_create);
|
|
|
|
|
|
|
|
|
/**
|
|
|
- * osd_WaitEventSet() - Wake up the process
|
|
|
+ * osd_waitevent_set() - Wake up the process
|
|
|
* @wait_event: Structure to event to be woken up
|
|
|
*
|
|
|
* @wait_event is of type &struct osd_waitevent
|
|
@@ -140,15 +140,15 @@ EXPORT_SYMBOL_GPL(osd_WaitEventCreate);
|
|
|
*
|
|
|
* Only used by Network and Storage Hyper-V drivers.
|
|
|
*/
|
|
|
-void osd_WaitEventSet(struct osd_waitevent *wait_event)
|
|
|
+void osd_waitevent_set(struct osd_waitevent *wait_event)
|
|
|
{
|
|
|
wait_event->condition = 1;
|
|
|
wake_up_interruptible(&wait_event->event);
|
|
|
}
|
|
|
-EXPORT_SYMBOL_GPL(osd_WaitEventSet);
|
|
|
+EXPORT_SYMBOL_GPL(osd_waitevent_set);
|
|
|
|
|
|
/**
|
|
|
- * osd_WaitEventWait() - Wait for event till condition is true
|
|
|
+ * osd_waitevent_wait() - Wait for event till condition is true
|
|
|
* @wait_event: Structure to event to be put to sleep
|
|
|
*
|
|
|
* @wait_event is of type &struct osd_waitevent
|
|
@@ -161,7 +161,7 @@ EXPORT_SYMBOL_GPL(osd_WaitEventSet);
|
|
|
*
|
|
|
* Mainly used by Hyper-V drivers.
|
|
|
*/
|
|
|
-int osd_WaitEventWait(struct osd_waitevent *wait_event)
|
|
|
+int osd_waitevent_wait(struct osd_waitevent *wait_event)
|
|
|
{
|
|
|
int ret = 0;
|
|
|
|
|
@@ -170,10 +170,10 @@ int osd_WaitEventWait(struct osd_waitevent *wait_event)
|
|
|
wait_event->condition = 0;
|
|
|
return ret;
|
|
|
}
|
|
|
-EXPORT_SYMBOL_GPL(osd_WaitEventWait);
|
|
|
+EXPORT_SYMBOL_GPL(osd_waitevent_wait);
|
|
|
|
|
|
/**
|
|
|
- * osd_WaitEventWaitEx() - Wait for event or timeout for process wakeup
|
|
|
+ * osd_waitevent_waitex() - Wait for event or timeout for process wakeup
|
|
|
* @wait_event: Structure to event to be put to sleep
|
|
|
* @timeout_in_ms: Total number of Milliseconds to wait before waking up
|
|
|
*
|
|
@@ -187,7 +187,7 @@ EXPORT_SYMBOL_GPL(osd_WaitEventWait);
|
|
|
*
|
|
|
* Mainly used by Hyper-V drivers.
|
|
|
*/
|
|
|
-int osd_WaitEventWaitEx(struct osd_waitevent *wait_event, u32 timeout_in_ms)
|
|
|
+int osd_waitevent_waitex(struct osd_waitevent *wait_event, u32 timeout_in_ms)
|
|
|
{
|
|
|
int ret = 0;
|
|
|
|
|
@@ -197,7 +197,7 @@ int osd_WaitEventWaitEx(struct osd_waitevent *wait_event, u32 timeout_in_ms)
|
|
|
wait_event->condition = 0;
|
|
|
return ret;
|
|
|
}
|
|
|
-EXPORT_SYMBOL_GPL(osd_WaitEventWaitEx);
|
|
|
+EXPORT_SYMBOL_GPL(osd_waitevent_waitex);
|
|
|
|
|
|
static void osd_callback_work(struct work_struct *work)
|
|
|
{
|