From b2ef639175ddb4c9552dbcd1f5c2891e084951cf Mon Sep 17 00:00:00 2001 From: Qiao Nuohan Date: Sat, 23 Aug 2014 16:48:13 +0800 Subject: [PATCH 15/23] x86_64: modify ptov offset:cpuspec only to display online cpus' data ptov offset:cpuspec can be used to translate per-cpu offset to kernel virtual address. This patch will skip offline cpus. Signed-off-by: Qiao Nuohan --- memory.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/memory.c b/memory.c index c97dd39..8527483 100755 --- a/memory.c +++ b/memory.c @@ -3181,6 +3181,9 @@ cmd_ptov(void) mkstring(buf1, len, LJUST, "CPU"), mkstring(buf2, VADDR_PRLEN, LJUST, "VIRTUAL")); for (c = 0; c < kt->cpus; c++) { + if (check_offline_cpu(c)) + continue; + if (!NUM_IN_BITMAP(cpus, c)) continue; vaddr = paddr + kt->__per_cpu_offset[c]; -- 1.8.5.3