As the comment in the code says, this method is really only valid
on x86 and x86_64, so add a #ifdef for those architectures around
that code block.
This was causing "Program lscpu tried to access /dev/mem between f0000->100000."
warnings on some ppc64 machines.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
free(buf);
memory_scan:
+#if defined(__x86_64__) || defined(__i386__)
/* Fallback to memory scan (x86, x86_64) */
buf = get_mem_chunk(0xF0000, 0x10000, _PATH_DEV_MEM);
if (!buf)
if (rc >= 0)
break;
}
-
+#endif
done:
free(buf);
return rc;