Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP3:GA
kexec-tools.2740
kexec-tools-Enumerate-all-sys-devices-system-cp...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File kexec-tools-Enumerate-all-sys-devices-system-cpu-cpuN.patch of Package kexec-tools.2740
From 08484c97ecce7df2ded8079c6478a58262007acc Mon Sep 17 00:00:00 2001 From: Takao Indoh <indou.takao@jp.fujitsu.com> Date: Thu, 5 Jun 2014 14:10:54 +0900 Subject: [PATCH] Enumerate all /sys/devices/system/cpu/cpuN when they are discontiguous There is a case that the number of /sys/devices/system/cpu/cpuN is not contiguous, for example after cpu hot removing. This patch fixes so that all /sys/devices/system/cpu/cpuN is handled when they are discontiguous. Signed-off-by: Takao Indoh <indou.takao@jp.fujitsu.com> Reviewed-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com> Acked-by: WANG Chao <chaowang@redhat.com> Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: Robert Milasan <rmilasan@suse.com> --- kexec/crashdump-elf.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/kexec/crashdump-elf.c +++ b/kexec/crashdump-elf.c @@ -43,6 +43,7 @@ int FUNC(struct kexec_info *info, uint64_t vmcoreinfo_addr_xen, vmcoreinfo_len_xen; int has_vmcoreinfo_xen = 0; int (*get_note_info)(int cpu, uint64_t *addr, uint64_t *len); + long int count_cpu; if (xen_present()) nr_cpus = xen_get_nr_phys_cpus(); @@ -142,11 +143,13 @@ int FUNC(struct kexec_info *info, /* PT_NOTE program headers. One per cpu */ - for (i = 0; i < nr_cpus; i++) { + count_cpu = nr_cpus; + for (i = 0; count_cpu > 0; i++) { if (get_note_info(i, ¬es_addr, ¬es_len) < 0) { /* This cpu is not present. Skip it. */ continue; } + count_cpu--; phdr = (PHDR *) bufp; bufp += sizeof(PHDR);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor