mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
cpuplugd/cpu: Rework CPU management functions
Simplify the cpu management parts of cpuplugd code by introducing functions from libutil and rework some logic to drop some assumptions about how kernel assigns cpuids. Right now cpuplugd assumes that the cpuids are always sequential and there are no gaps in between, however kernel does not guarantee that. Make cpuplugd compliant by traversing cpu sysfs entries instead. Reviewed-by: Steffen Eiden <seiden@linux.ibm.com> Reviewed-by: Gerald Schaefer <gerald.schaefer@linux.ibm.com> Signed-off-by: Mete Durlu <meted@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
+3
-1
@@ -4,9 +4,11 @@ all: cpuplugd
|
||||
|
||||
LDLIBS += -lm
|
||||
|
||||
libs = $(rootdir)/libutil/libutil.a
|
||||
|
||||
OBJECTS = daemon.o cpu.o info.o terms.o config.o main.o getopt.o mem.o
|
||||
|
||||
cpuplugd: $(OBJECTS)
|
||||
cpuplugd: $(OBJECTS) $(libs)
|
||||
$(LINK) $(ALL_LDFLAGS) $^ $(LDLIBS) -o $@
|
||||
|
||||
clean:
|
||||
|
||||
Reference in New Issue
Block a user