lkml.org 
[lkml]   [2019]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 2/7] x86/boot: Introduce helpers for serial I/O
On Thu, Mar 28, 2019 at 03:11:40PM +0200, Andy Shevchenko wrote:
> Any idea how it can be done?

Like this?

static u8 serial_inb(unsigned long addr, int offset)
{
if (early_serial_do_mmio) {
asm volatile("movb %1,%0" : "=q" (v) : "m" (*(volatile u8 __force *)addr));

return v;
} else {
return inb(addr + offset);
}
}

--
Regards/Gruss,
Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

\
 
 \ /
  Last update: 2019-03-28 14:31    [W:3.240 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site