Skip to content

Commit d588628

Browse files
bgoglinndenoyelle
authored andcommitted
linux: merge the linuxio component back into the main linux component
Signed-off-by: Brice Goglin <[email protected]>
1 parent a60ef29 commit d588628

File tree

9 files changed

+150
-215
lines changed

9 files changed

+150
-215
lines changed

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ Version 2.1.0
7474
kernel prior to 2.6.16.
7575
+ Discovery components are now divided in phases that may be individually
7676
blacklisted.
77+
- The linuxio component has been merged back into the linux component.
7778
* Tools
7879
+ lstopo
7980
- lstopo factorizes objects by default in the graphical output when

config/hwloc.m4

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
dnl -*- Autoconf -*-
22
dnl
3-
dnl Copyright © 2009-2018 Inria. All rights reserved.
3+
dnl Copyright © 2009-2019 Inria. All rights reserved.
44
dnl Copyright © 2009-2012, 2015-2017 Université Bordeaux
55
dnl Copyright © 2004-2005 The Trustees of Indiana University and Indiana
66
dnl University Research and Technology
@@ -217,8 +217,7 @@ EOF])
217217
AC_MSG_RESULT([Linux])
218218
hwloc_components="$hwloc_components linux"
219219
if test "x$enable_io" != xno; then
220-
hwloc_components="$hwloc_components linuxio"
221-
AC_DEFINE(HWLOC_HAVE_LINUXIO, 1, [Define to 1 if building the Linux I/O component])
220+
AC_DEFINE(HWLOC_HAVE_LINUXIO, 1, [Define to 1 for I/O discovery in the Linux component])
222221
hwloc_linuxio_happy=yes
223222
if test x$enable_pci != xno; then
224223
AC_DEFINE(HWLOC_HAVE_LINUXPCI, 1, [Define to 1 if enabling Linux-specific PCI discovery in the Linux I/O component])

doc/hwloc.doxy

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,7 +1105,7 @@ following environment variables.
11051105
This directory may have been saved previously from another machine
11061106
with <tt>hwloc-gather-topology</tt>.
11071107
<br/>
1108-
One should likely also set <tt>HWLOC_COMPONENTS=linux,linuxio,stop</tt>
1108+
One should likely also set <tt>HWLOC_COMPONENTS=linux,stop</tt>
11091109
so that non-Linux backends are disabled
11101110
(the <tt>-i</tt> option of command-line tools takes care of both).
11111111
<br/>
@@ -2594,7 +2594,14 @@ environment variable (see \ref envvar).
25942594

25952595
<dl>
25962596

2597-
<dt>aix, darwin, freebsd, hpux, linux, netbsd, solaris, windows</dt>
2597+
<dt>linux</dt>
2598+
<dd>
2599+
The official component for discovering CPU, memory and I/O devices on Linux.
2600+
It discovers PCI devices without the help of external libraries such as libpciaccess,
2601+
but requires the pci component for adding vendor/device names to PCI objects.
2602+
It also discovers many kinds of Linux-specific OS devices.
2603+
</dd>
2604+
<dt>aix, darwin, freebsd, hpux, netbsd, solaris, windows</dt>
25982605
<dd>
25992606
Each officially supported operating system has its own native component,
26002607
which is statically built when supported, and which is used by default.
@@ -2625,13 +2632,6 @@ environment variable (see \ref envvar).
26252632
and device names.
26262633
<b>It may be built as a plugin</b>.
26272634
</dd>
2628-
<dt>linuxio (former linuxpci)</dt>
2629-
<dd>
2630-
This component can probe I/O devices on Linux.
2631-
It discovers PCI devices without the help of external libraries such as libpciaccess.
2632-
Its priority is lower than the pci component because it misses device names.
2633-
It also discovers many kinds of Linux-specific OS devices.
2634-
</dd>
26352635
<dt>opencl</dt>
26362636
<dd>
26372637
The OpenCL component creates co-processor OS device objects such as

hwloc/components.c

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -482,12 +482,13 @@ hwloc_disc_component_blacklist_one(struct hwloc_topology *topology,
482482
unsigned phases;
483483
unsigned i;
484484

485-
if (!strcmp(name, "linuxpci")) {
486-
/* replace linuxpci with linuxio for backward compatibility with pre-v2.0 */
485+
if (!strcmp(name, "linuxpci") || !strcmp(name, "linuxio")) {
486+
/* replace linuxpci and linuxio with linux (with IO phases)
487+
* for backward compatibility with pre-v2.0 and v2.0 respectively */
487488
if (hwloc_components_verbose)
488-
fprintf(stderr, "Replacing deprecated component `%s' with `linuxio' in blacklisting\n", name);
489-
comp = hwloc_disc_component_find("linuxio", NULL);
490-
phases = ~0U;
489+
fprintf(stderr, "Replacing deprecated component `%s' with `linux' IO phases in blacklisting\n", name);
490+
comp = hwloc_disc_component_find("linux", NULL);
491+
phases = HWLOC_DISC_PHASE_PCI | HWLOC_DISC_PHASE_IO | HWLOC_DISC_PHASE_MISC | HWLOC_DISC_PHASE_ANNOTATE;
491492

492493
} else {
493494
/* normal lookup */
@@ -691,10 +692,10 @@ hwloc_disc_components_enable_others(struct hwloc_topology *topology)
691692
curenv[s] = '\0';
692693

693694
name = curenv;
694-
if (!strcmp(name, "linuxpci")) {
695+
if (!strcmp(name, "linuxpci") || !strcmp(name, "linuxio")) {
695696
if (hwloc_components_verbose)
696-
fprintf(stderr, "Replacing deprecated component `%s' with `linuxio' in envvar forcing\n", name);
697-
name = "linuxio";
697+
fprintf(stderr, "Replacing deprecated component `%s' with `linux' in envvar forcing\n", name);
698+
name = "linux";
698699
}
699700

700701
comp = hwloc_disc_component_find(name, NULL /* we enable the entire component, phases must be blacklisted separately */);

0 commit comments

Comments
 (0)