mirror of
https://github.com/torvalds/linux.git
synced 2024-12-24 20:01:55 +00:00
Staging: hv: remove wrapper functions around kmap_
Remove PageMapVirtualAddress() and PageUnmapVirtualAddress() which were wrappers around kmap_atomic() and kunmap_atomic() Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
b7c947f048
commit
45da89e559
@ -22,7 +22,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/mm.h>
|
#include <linux/highmem.h>
|
||||||
|
#include <asm/kmap_types.h>
|
||||||
|
|
||||||
#include "include/logging.h"
|
#include "include/logging.h"
|
||||||
|
|
||||||
#include "include/NetVscApi.h"
|
#include "include/NetVscApi.h"
|
||||||
@ -518,7 +520,7 @@ RndisFilterOnReceive(
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
rndisHeader = (RNDIS_MESSAGE*)PageMapVirtualAddress(Packet->PageBuffers[0].Pfn);
|
rndisHeader = (RNDIS_MESSAGE *)kmap_atomic(pfn_to_page(Packet->PageBuffers[0].Pfn), KM_IRQ0);
|
||||||
|
|
||||||
rndisHeader = (void*)((unsigned long)rndisHeader + Packet->PageBuffers[0].Offset);
|
rndisHeader = (void*)((unsigned long)rndisHeader + Packet->PageBuffers[0].Offset);
|
||||||
|
|
||||||
@ -528,7 +530,7 @@ RndisFilterOnReceive(
|
|||||||
#if 0
|
#if 0
|
||||||
if ( Packet->TotalDataBufferLength != rndisHeader->MessageLength )
|
if ( Packet->TotalDataBufferLength != rndisHeader->MessageLength )
|
||||||
{
|
{
|
||||||
PageUnmapVirtualAddress((void*)(unsigned long)rndisHeader - Packet->PageBuffers[0].Offset);
|
kunmap_atomic(rndisHeader - Packet->PageBuffers[0].Offset, KM_IRQ0);
|
||||||
|
|
||||||
DPRINT_ERR(NETVSC, "invalid rndis message? (expected %u bytes got %u)...dropping this message!",
|
DPRINT_ERR(NETVSC, "invalid rndis message? (expected %u bytes got %u)...dropping this message!",
|
||||||
rndisHeader->MessageLength, Packet->TotalDataBufferLength);
|
rndisHeader->MessageLength, Packet->TotalDataBufferLength);
|
||||||
@ -545,7 +547,7 @@ RndisFilterOnReceive(
|
|||||||
|
|
||||||
memcpy(&rndisMessage, rndisHeader, (rndisHeader->MessageLength > sizeof(RNDIS_MESSAGE))?sizeof(RNDIS_MESSAGE):rndisHeader->MessageLength);
|
memcpy(&rndisMessage, rndisHeader, (rndisHeader->MessageLength > sizeof(RNDIS_MESSAGE))?sizeof(RNDIS_MESSAGE):rndisHeader->MessageLength);
|
||||||
|
|
||||||
PageUnmapVirtualAddress((void*)(unsigned long)rndisHeader - Packet->PageBuffers[0].Offset);
|
kunmap_atomic(rndisHeader - Packet->PageBuffers[0].Offset, KM_IRQ0);
|
||||||
|
|
||||||
DumpRndisMessage(&rndisMessage);
|
DumpRndisMessage(&rndisMessage);
|
||||||
|
|
||||||
|
@ -138,10 +138,6 @@ unsigned long Logical2PhysicalAddr(void * LogicalAddr);
|
|||||||
|
|
||||||
unsigned long Virtual2Physical(void * VirtAddr);
|
unsigned long Virtual2Physical(void * VirtAddr);
|
||||||
|
|
||||||
void* PageMapVirtualAddress(unsigned long Pfn);
|
|
||||||
void PageUnmapVirtualAddress(void* VirtAddr);
|
|
||||||
|
|
||||||
|
|
||||||
int osd_schedule_callback(struct workqueue_struct *wq,
|
int osd_schedule_callback(struct workqueue_struct *wq,
|
||||||
void (*func)(void *),
|
void (*func)(void *),
|
||||||
void *data);
|
void *data);
|
||||||
|
@ -88,17 +88,6 @@ void PageFree(void* page, unsigned int count)
|
|||||||
__free_page(p);*/
|
__free_page(p);*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void* PageMapVirtualAddress(unsigned long Pfn)
|
|
||||||
{
|
|
||||||
return kmap_atomic(pfn_to_page(Pfn), KM_IRQ0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void PageUnmapVirtualAddress(void* VirtAddr)
|
|
||||||
{
|
|
||||||
kunmap_atomic(VirtAddr, KM_IRQ0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void *MemMapIO(unsigned long phys, unsigned long size)
|
void *MemMapIO(unsigned long phys, unsigned long size)
|
||||||
{
|
{
|
||||||
return (void*)GetVirtualAddress(phys); /* return ioremap_nocache(phys, size); */
|
return (void*)GetVirtualAddress(phys); /* return ioremap_nocache(phys, size); */
|
||||||
|
Loading…
Reference in New Issue
Block a user