Revision e4ee916d

b/cache-utils.c
57 57
}
58 58
#endif
59 59

  
60
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
61
#include <stdio.h>
62
#include <sys/types.h>
63
#include <sys/sysctl.h>
64

  
65
static void ppc_init_cacheline_sizes(void)
66
{
67
    size_t len = 4;
68
    unsigned cacheline;
69

  
70
    if (sysctlbyname ("machdep.cacheline_size", &cacheline, &len, NULL, 0)) {
71
        fprintf(stderr, "sysctlbyname machdep.cacheline_size failed: %s\n",
72
                strerror(errno));
73
        exit(1);
74
    }
75

  
76
    qemu_cache_conf.dcache_bsize = cacheline;
77
    qemu_cache_conf.icache_bsize = cacheline;
78
}
79
#endif    
80

  
60 81
#ifdef __linux__
61 82
void qemu_cache_utils_init(char **envp)
62 83
{

Also available in: Unified diff