[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190328132855.GH22720@zn.tnic>
Date: Thu, 28 Mar 2019 14:28:55 +0100
From: Borislav Petkov <bp@...en8.de>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: "H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: [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.
Powered by blists - more mailing lists