Skip to content

Commit

Permalink
s390: remove virt_to_phys implementation
Browse files Browse the repository at this point in the history
virt_to_phys on s390 currently uses the LRA instruction to translate
virtual to physical addresses. This creates an unnecessary overhead
and caused trouble with dma debugging code (when called with an
address pointing to a already unmapped page).
Just get rid of s390's implementation and use the one from
asm-generic/io.h .

Note: with this change virt_to_phys will no longer work on vmalloc'ed
addresses.

Reviewed-by: Gerald Schaefer <[email protected]>
Signed-off-by: Sebastian Ott <[email protected]>
Signed-off-by: Martin Schwidefsky <[email protected]>
  • Loading branch information
Sebastian Ott authored and Martin Schwidefsky committed Jun 26, 2013
1 parent b6ed49e commit 92820a5
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions arch/s390/include/asm/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,6 @@
#include <asm/page.h>
#include <asm/pci_io.h>

/*
* Change virtual addresses to physical addresses and vv.
* These are pretty trivial
*/
static inline unsigned long virt_to_phys(volatile void * address)
{
unsigned long real_address;
asm volatile(
" lra %0,0(%1)\n"
" jz 0f\n"
" la %0,0\n"
"0:"
: "=a" (real_address) : "a" (address) : "cc");
return real_address;
}
#define virt_to_phys virt_to_phys

static inline void * phys_to_virt(unsigned long address)
{
return (void *) address;
}

void *xlate_dev_mem_ptr(unsigned long phys);
#define xlate_dev_mem_ptr xlate_dev_mem_ptr
void unxlate_dev_mem_ptr(unsigned long phys, void *addr);
Expand Down

0 comments on commit 92820a5

Please sign in to comment.