sys_io: Expand the API to 64bits read/write functions
And implement the support for intel64 which is basically the architecture that will require it for now. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
parent
9dfc05ff6d
commit
e137e9b468
2 changed files with 44 additions and 0 deletions
|
@ -18,6 +18,28 @@
|
|||
#endif
|
||||
|
||||
#ifndef _ASMLANGUAGE
|
||||
|
||||
static ALWAYS_INLINE void sys_write64(uint64_t data, mm_reg_t addr)
|
||||
{
|
||||
__asm__ volatile("movq %0, %1"
|
||||
:
|
||||
: "r"(data), "m" (*(volatile uint64_t *)
|
||||
(uintptr_t) addr)
|
||||
: "memory");
|
||||
}
|
||||
|
||||
static ALWAYS_INLINE uint32_t sys_read64(mm_reg_t addr)
|
||||
{
|
||||
uint64_t ret;
|
||||
|
||||
__asm__ volatile("movq %1, %0"
|
||||
: "=r"(ret)
|
||||
: "m" (*(volatile uint64_t *)(uintptr_t) addr)
|
||||
: "memory");
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static ALWAYS_INLINE unsigned int arch_irq_lock(void)
|
||||
{
|
||||
unsigned long key;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue