[PATCH libpciaccess] OpenBSD: Implement map_legacy and legacy_io

2011-12-29 Thread Mark Kettenis
Signed-off-by: Mark Kettenis Reviewed-by: Matthieu Herrb Tested-by: Matthieu Herrb --- src/openbsd_pci.c | 155 ++- src/pciaccess_private.h |1 + 2 files changed, 154 insertions(+), 2 deletions(-) diff --git a/src/openbsd_pci.c b/src/openb

Re: [PATCH libpciaccess] OpenBSD: Implement map_legacy and legacy_io

2011-12-31 Thread Jeremy Huddleston
There is a logic error in the preprocessing which seems to assume that PCI_MAGIC_IO_RANGE is defined iff !(i386 || x86_64). I would prefer the preprocessor checks be a bit more robust... perhaps following this template for pci_device_openbsd_open_legacy_io: #if defined(__i386__) ... #elif defi

Re: [PATCH libpciaccess] OpenBSD: Implement map_legacy and legacy_io

2011-12-31 Thread Mark Kettenis
> From: Jeremy Huddleston > Date: Sat, 31 Dec 2011 10:28:11 -0500 > > There is a logic error in the preprocessing which seems to assume > that PCI_MAGIC_IO_RANGE is defined iff !(i386 || x86_64). Wouldn't call this a logic error, but yes, OpenBSD/i386 and OpenBSD/amd64 will not define PCI_MAGIC_

Re: [PATCH libpciaccess] OpenBSD: Implement map_legacy and legacy_io

2011-12-31 Thread Jeremy Huddleston
On Dec 31, 2011, at 2:50 PM, Mark Kettenis wrote: >> From: Jeremy Huddleston >> Date: Sat, 31 Dec 2011 10:28:11 -0500 >> >> There is a logic error in the preprocessing which seems to assume >> that PCI_MAGIC_IO_RANGE is defined iff !(i386 || x86_64). > > Wouldn't call this a logic error, but y

Re: [PATCH libpciaccess] OpenBSD: Implement map_legacy and legacy_io

2012-01-03 Thread Mark Kettenis
> From: Jeremy Huddleston > Date: Sat, 31 Dec 2011 15:08:52 -0500 > > On Dec 31, 2011, at 2:50 PM, Mark Kettenis wrote: > > >> From: Jeremy Huddleston > >> Date: Sat, 31 Dec 2011 10:28:11 -0500 > >> > >> There is a logic error in the preprocessing which seems to assume > >> that PCI_MAGIC_IO_R