[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v3 3/4] libxl: make cpuid_flags array static const
To have it in .rodata, instead of reconstructing each time on stack. Signed-off-by: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx> --- tools/libxl/libxl_cpuid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/libxl/libxl_cpuid.c b/tools/libxl/libxl_cpuid.c index 98c7c54..3726aa4 100644 --- a/tools/libxl/libxl_cpuid.c +++ b/tools/libxl/libxl_cpuid.c @@ -89,7 +89,7 @@ static libxl_cpuid_policy_list cpuid_find_match(libxl_cpuid_policy_list *list, int libxl_cpuid_parse_config(libxl_cpuid_policy_list *cpuid, const char* str) { #define NA XEN_CPUID_INPUT_UNUSED - struct cpuid_flags cpuid_flags[] = { + static const struct cpuid_flags cpuid_flags[] = { {"maxleaf", 0x00000000, NA, CPUID_REG_EAX, 0, 32}, /* the following two entries are subject to tweaking later in the code */ {"family", 0x00000001, NA, CPUID_REG_EAX, 8, 8}, @@ -243,7 +243,7 @@ int libxl_cpuid_parse_config(libxl_cpuid_policy_list *cpuid, const char* str) #undef NA char *sep, *val, *endptr; int i; - struct cpuid_flags *flag; + const struct cpuid_flags *flag; struct libxl__cpuid_policy *entry; unsigned long num; char flags[33], *resstr; -- git-series 0.9.1 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |