| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch is required for building on NetBSD/alpha (needs platform
specific -lalpha) and NetBSD/sparc64 (no platform specific library,
just -lpci). The patch also generalizes to support all NetBSD
platforms with pci bus.
https://bugs.freedesktop.org/show_bug.cgi?id=89151
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"__linux__" is the POSIX define for checking for Linux OS, "linux" is
deprecated and apparently not supported by Android.
Besides correcting the define, patch adds error for the case OS isn't
recognized.
Signed-off-by: Eero Tamminen <eero.t.tamminen@intel.com>
v2: Drop double negative from commit msg. Spotted by Mateusz Jończyk.
[Emil Velikov: Remove irrelevant Android details from commit msg.]
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
|
|
|
|
|
| |
The former has a series of defines which in some cases are crusial to be
set before including any system headers.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
|
|
|
|
|
|
|
| |
In some cases the header may not exist, leading to compilation issues.
Add the ifdef HAVE_CONFIG_H, as it is those in other parts of the
project.
[Emil Velikov: Split out from a larger commit, rework commit message]
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The former is part of the POSIX standard, and (unlike the latter) is
more widely available.
v2: Drop gracious d in header name. Spotted by Alan.
Cc: Adam Jackson <ajax@redhat.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
| |
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
|
|
|
|
|
|
|
| |
If the machdep.allowaperture sysctl(8) variable is set to 0, writing to PCI
config space is not allowed. So instead of writing 0xffffffff to the BARs
in order to determine their size, use the PCIOCREADMASK ioctl(2) which
returns the mask of changeable bits that was saved by the kernel when the
devices was initially probed.
Reviewed-by: Matthieu Herrb <matthieu@herbb.eu>
Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
|
|
|
|
|
|
|
|
|
| |
This has the benefit of stopping the "vesa" driver from loading on
hardware that has been claimed by a kernel driver and thus shouldn't
be using "vesa".
Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Caching fd's for reuse is most effective when you actually stick the
newly opened fd in the cache, instead of letting it leak at the end
of the function.
Regression introduced by yours truly in commit 9f2d95e61896f41adb.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Randy Fishel <randy.fishel@oracle.com>
|
|
|
|
|
|
| |
Support for this attribute is added in the 12.4 beta release.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
|
|
|
| |
The offsets on the resourceX files are relative to BAR base - don't add
the base address ourselves.
Reviewed-by: Adam Jackson <ajax@redhat.com>
|
|
|
|
|
|
|
| |
This fixes a typo (unAMp instead of unMAp) introduced in the Windows/Cygwin
support patch.
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
|
|
|
|
|
|
|
|
|
| |
V2:
- Add support for unmapping
- Add a README.cygwin
Reviewed-by: Martin Peres <martin.peres@free.fr>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
|
|
|
|
|
|
|
|
|
|
| |
Sometimes, other values are reported for the CPU part, like
"i486--netbsdelf").
From: Mark Davies <markd@NetBSD.org>
Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
Reviewed-By: Matt Dew <marcoz@osource.org>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
|
|
| |
Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
| |
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On a system which has allocated 64-bit device addresses scanpci -v
will show entries such as:
[...]
BASE0 0xce000000 SIZE 16777216 MEM
BASE1 0x00000fc1f8000000 SIZE 134217728 MEM64 PREFETCHABLE
BASE3 0x00000fc1f6000000 SIZE 33554432 MEM64 PREFETCHABLE
[...]
instead of:
[...]
BASE0 0xce000000 SIZE 16777216 MEM
BASE1 0xf8000000 SIZE 134217728 MEM PREFETCHABLE
BASE3 0xf6000000 SIZE 33554432 MEM PREFETCHABLE
[...]
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
| |
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
solx_devfs.c:615:32: warning: implicit conversion changes signedness:
'unsigned long' to 'int' [-Wsign-conversion]
for (i = 0; i < len; i = i + CELL_NUMS_1275) {
~ ~~^~~~~~~~~~~~~~~~
solx_devfs.c:615:30: warning: implicit conversion changes signedness:
'int' to 'unsigned long' [-Wsign-conversion]
for (i = 0; i < len; i = i + CELL_NUMS_1275) {
^ ~
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
|
|
|
|
|
| |
Workaround for these chipsets was removed in commit d76fb36d9c28be0f7c
with the switch of probing methods from the PCI address poking that upset
them to using the already collected data from the kernel via devinfo,
but the #define to identify them was left behind unused - remove it too.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes:
solx_devfs.c:824:19: warning: comparison of integers of different signs: 'int' and 'pciaddr_t' (aka 'unsigned long') [-Wsign-compare]
for (i = 0; i < size; i += PCITOOL_ACC_ATTR_SIZE(PCITOOL_ACC_ATTR_SIZE_1))
~ ^ ~~~~
solx_devfs.c:826:28: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion]
cfg_prg.offset = offset + i;
~ ^
solx_devfs.c:844:19: warning: implicit conversion changes signedness: 'int' to 'pciaddr_t' (aka 'unsigned long') [-Wsign-conversion]
*bytes_read = i;
~ ^
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
|
| |
Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
|
|
| |
Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
|
|
|
|
| |
Fixes build on NetBSD-5.
Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
|
|
|
|
| |
Clears up gcc warning on Solaris:
common_device_name.c: In function 'pci_id_file_open':
common_device_name.c:83:17: warning: unused variable 'result' [-Wunused-variable]
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Clears a bunch of clang warnings of the forms:
common_device_name.c:345:23: warning: comparison of integers of different signs:
'const uint32_t' (aka 'const unsigned int') and 'int' [-Wsign-compare]
if ( m->vendor_id == PCI_MATCH_ANY ) {
~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~
common_device_name.c:498:19: warning: implicit conversion changes signedness:
'int' to 'uint32_t' (aka 'unsigned int') [-Wsign-conversion]
m.device_id = PCI_MATCH_ANY;
~ ^~~~~~~~~~~~~
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
|
|
|
| |
Signed-off-by: Michael Lorenz <macallan@NetBSD.org>
Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
|
| |
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
| |
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
|
|
|
|
| |
https://bugs.freedesktop.org/show_bug.cgi?id=63583
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Signed-off-by: Jung-uk Kim <jkim@FreeBSD.org>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
|
|
|
|
|
| |
Remove pcitool dependency in probing phase. Use the data
collected from devinfo tree instead in creating pci file
system.
Signed-off-by: Henry Zhao <henzhao@glory3.(none)>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
|
|
|
|
| |
As a result the code of finding nexus node for a device in sparc is
simplified and made the same as x86.
Signed-off-by: Henry Zhao <henry.zhao@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
|
|
| |
http://people.gnome.org/~walters/docs/build-api.txt
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
|
|
| |
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
|
|
|
|
|
|
| |
The mask must not be zero otherwise the matching condition will never
be true: ((val & mask) == set).
Signed-off-by: Egbert Eich <eich@freedesktop.org>
Reviewed-by: Guillem Jover <guillem@hadrons.org>
|
|
|
|
|
| |
Signed-off-by: Henry Zhao <henry.zhao@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
|
|
|
|
| |
Get rom address and size from device's "assigned-addresses" property
if they exist.
Signed-off-by: Henry Zhao <henry.zhao@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
|
| |
Signed-off-by: Henry Zhao <henry.zhao@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes memory usage errors that only occur on large SPARC
machines with more than 256 PCI devices. In this case, memory is being
used after it has been freed by calls to both free() and realloc().
This error was introduced by a previous patch:
2011-03-30 Solaris support for multiple PCI segments (domains)
Signed-off-by: Mark Logan <mark.logan@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
|
|
|
| |
Add the legacy io and map methods for the x86 backend, using ioperm,
in/out, and the existing mmap method.
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
|
|
|
|
|
|
|
|
| |
The sparc & x86 cases were doing essentially the same things with
different paths, so make the path setup be inside the platform
specific #ifdefs, make the open, mmap, & error handling common code.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
|
| |
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jay Cotton <jay.cotton@oracle.com>
|
|
|
|
| |
Signed-off-by: Julien Cristau <jcristau@debian.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous version of new_io_handle() would invalidate all previous
allocations when realloc moves the base pointer of the ios array.
Since I cannot figure out where this array is useful, just get rid of
it, providing sound stable memory allocation.
Fixes vgaHWSaveFonts() in 1.12 xserver on OpenBSD, but other
sub-systems relaying on pci_io could be affected too.
Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Tested-by: Tormod Volden <debian.tormod@gmail.com>
|
|
|
|
|
|
|
| |
A return (0) got lost, add it back.
Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Reviewed-by: Mark Kettenis <mark.kettenis@xs4all.nl>
|
|
|
|
| |
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|\ |
|
| |
| |
| |
| | |
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|/
|
|
|
|
|
|
| |
Well, almost all of them. zlib doesn't support "e" in the mode string
in gzopen() though it will silently accept and ignore it, and Solaris appears
not to support "e" in the mode string at all.
Signed-off-by: Adam Jackson <ajax@redhat.com>
|