OSDN Git Service

util: add cacheinfo
authorEmilio G. Cota <cota@braap.org>
Wed, 7 Jun 2017 00:17:04 +0000 (20:17 -0400)
committerRichard Henderson <rth@twiddle.net>
Mon, 19 Jun 2017 18:10:59 +0000 (11:10 -0700)
commitb255b2c8a5484742606e8760870ba3e14d0c9605
treea49a5f2b5c535768a0dc2b14dd90234c1cb009e9
parentcef8fd68364ad754d4f0050a215376cdf0ec744a
util: add cacheinfo

Add helpers to gather cache info from the host at init-time.

For now, only export the host's I/D cache line sizes, which we
will use to improve cache locality to avoid false sharing.

Suggested-by: Richard Henderson <rth@twiddle.net>
Suggested-by: Geert Martin Ijewski <gm.ijewski@web.de>
Tested-by: Geert Martin Ijewski <gm.ijewski@web.de>
Signed-off-by: Emilio G. Cota <cota@braap.org>
Message-Id: <1496794624-4083-1-git-send-email-cota@braap.org>
[rth: Move all implementations from tcg/ppc/]
Signed-off-by: Richard Henderson <rth@twiddle.net>
include/qemu/osdep.h
tcg/ppc/tcg-target.inc.c
util/Makefile.objs
util/cacheinfo.c [new file with mode: 0644]