On Sat, 20 Feb 2016 20:49:19 +0100 Carl-Daniel Hailfinger <c-d.hailfinger.devel.2...@gmx.net> wrote:
> On 20.02.2016 11:23, Stefan Tauner wrote: > > This won't make raw I/O work magically but at least it would provide iopl() > > if some driver requires it and there is no better alternative currently. > > > > Signed-off-by: Stefan Tauner <stefan.tau...@alumni.tuwien.ac.at> > > --- > > hwaccess.h | 10 ++++++++-- > > 1 file changed, 8 insertions(+), 2 deletions(-) > > > > diff --git a/hwaccess.h b/hwaccess.h > > index 29a29b0..f1ad807 100644 > > --- a/hwaccess.h > > +++ b/hwaccess.h > > @@ -203,8 +203,14 @@ cpu_to_be(64) > > > > /* sys/io.h provides iopl(2) and x86 I/O port access functions (inb, outb > > etc). > > * It is included in glibc (thus available also on debian/kFreeBSD) but > > also in other libcs that mimic glibc, > > - * e.g. musl and uclibc. */ > > -#if defined(__linux__) || defined(__GLIBC__) > > + * e.g. musl and uclibc. Because we cannot detect the clib or existence of > > the header or of the instructions > > Please use "libc" instead of "clib". > > > > + * themselves safely in here we need some heuristic below: > > + * On Android we don't have the header and no way for I/O port access at > > all. However, sys/glibc-syscalls.h > > + * refers to an iopl implementation and we therefore include at least that > > one for now. On non-Android we assume > > + * that a Linux system's libc has a suitable sys/io.h or we depend on > > glibc to offer it. */ > > +#if defined(__ANDROID__) > > +#include <sys/glibc-syscalls.h> > > +#elif defined(__linux__) || defined(__GLIBC__) > > #include <sys/io.h> > > #endif > > > > Apart from the comment above, this is > Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2...@gmx.net> Thanks, committed in r1932. -- Kind regards/Mit freundlichen Grüßen, Stefan Tauner _______________________________________________ flashrom mailing list flashrom@flashrom.org http://www.flashrom.org/mailman/listinfo/flashrom