exec: replace tabs by spaces.

Signed-off-by: Yoshiaki Tamura <tamura.yoshiaki@lab.ntt.co.jp>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
Yoshiaki Tamura 2010-08-18 13:30:13 +09:00 committed by Anthony Liguori
parent d20878d289
commit 9742bf26b1
1 changed files with 28 additions and 28 deletions

56
exec.c
View File

@ -1706,8 +1706,8 @@ static QLIST_HEAD(memory_client_list, CPUPhysMemoryClient) memory_client_list
= QLIST_HEAD_INITIALIZER(memory_client_list); = QLIST_HEAD_INITIALIZER(memory_client_list);
static void cpu_notify_set_memory(target_phys_addr_t start_addr, static void cpu_notify_set_memory(target_phys_addr_t start_addr,
ram_addr_t size, ram_addr_t size,
ram_addr_t phys_offset) ram_addr_t phys_offset)
{ {
CPUPhysMemoryClient *client; CPUPhysMemoryClient *client;
QLIST_FOREACH(client, &memory_client_list, list) { QLIST_FOREACH(client, &memory_client_list, list) {
@ -1716,7 +1716,7 @@ static void cpu_notify_set_memory(target_phys_addr_t start_addr,
} }
static int cpu_notify_sync_dirty_bitmap(target_phys_addr_t start, static int cpu_notify_sync_dirty_bitmap(target_phys_addr_t start,
target_phys_addr_t end) target_phys_addr_t end)
{ {
CPUPhysMemoryClient *client; CPUPhysMemoryClient *client;
QLIST_FOREACH(client, &memory_client_list, list) { QLIST_FOREACH(client, &memory_client_list, list) {
@ -1803,17 +1803,17 @@ int cpu_str_to_log_mask(const char *str)
p1 = strchr(p, ','); p1 = strchr(p, ',');
if (!p1) if (!p1)
p1 = p + strlen(p); p1 = p + strlen(p);
if(cmp1(p,p1-p,"all")) { if(cmp1(p,p1-p,"all")) {
for(item = cpu_log_items; item->mask != 0; item++) { for(item = cpu_log_items; item->mask != 0; item++) {
mask |= item->mask; mask |= item->mask;
} }
} else { } else {
for(item = cpu_log_items; item->mask != 0; item++) { for(item = cpu_log_items; item->mask != 0; item++) {
if (cmp1(p, p1 - p, item->name)) if (cmp1(p, p1 - p, item->name))
goto found; goto found;
}
return 0;
} }
return 0;
}
found: found:
mask |= item->mask; mask |= item->mask;
if (*p1 != ',') if (*p1 != ',')
@ -1907,11 +1907,11 @@ static inline void tlb_flush_jmp_cache(CPUState *env, target_ulong addr)
overlap the flushed page. */ overlap the flushed page. */
i = tb_jmp_cache_hash_page(addr - TARGET_PAGE_SIZE); i = tb_jmp_cache_hash_page(addr - TARGET_PAGE_SIZE);
memset (&env->tb_jmp_cache[i], 0, memset (&env->tb_jmp_cache[i], 0,
TB_JMP_PAGE_SIZE * sizeof(TranslationBlock *)); TB_JMP_PAGE_SIZE * sizeof(TranslationBlock *));
i = tb_jmp_cache_hash_page(addr); i = tb_jmp_cache_hash_page(addr);
memset (&env->tb_jmp_cache[i], 0, memset (&env->tb_jmp_cache[i], 0,
TB_JMP_PAGE_SIZE * sizeof(TranslationBlock *)); TB_JMP_PAGE_SIZE * sizeof(TranslationBlock *));
} }
static CPUTLBEntry s_cputlb_empty_entry = { static CPUTLBEntry s_cputlb_empty_entry = {
@ -2687,16 +2687,16 @@ static long gethugepagesize(const char *path)
int ret; int ret;
do { do {
ret = statfs(path, &fs); ret = statfs(path, &fs);
} while (ret != 0 && errno == EINTR); } while (ret != 0 && errno == EINTR);
if (ret != 0) { if (ret != 0) {
perror(path); perror(path);
return 0; return 0;
} }
if (fs.f_type != HUGETLBFS_MAGIC) if (fs.f_type != HUGETLBFS_MAGIC)
fprintf(stderr, "Warning: path not on HugeTLBFS: %s\n", path); fprintf(stderr, "Warning: path not on HugeTLBFS: %s\n", path);
return fs.f_bsize; return fs.f_bsize;
} }
@ -2715,7 +2715,7 @@ static void *file_ram_alloc(RAMBlock *block,
hpagesize = gethugepagesize(path); hpagesize = gethugepagesize(path);
if (!hpagesize) { if (!hpagesize) {
return NULL; return NULL;
} }
if (memory < hpagesize) { if (memory < hpagesize) {
@ -2728,14 +2728,14 @@ static void *file_ram_alloc(RAMBlock *block,
} }
if (asprintf(&filename, "%s/qemu_back_mem.XXXXXX", path) == -1) { if (asprintf(&filename, "%s/qemu_back_mem.XXXXXX", path) == -1) {
return NULL; return NULL;
} }
fd = mkstemp(filename); fd = mkstemp(filename);
if (fd < 0) { if (fd < 0) {
perror("unable to create backing store for hugepages"); perror("unable to create backing store for hugepages");
free(filename); free(filename);
return NULL; return NULL;
} }
unlink(filename); unlink(filename);
free(filename); free(filename);
@ -2749,7 +2749,7 @@ static void *file_ram_alloc(RAMBlock *block,
* mmap will fail. * mmap will fail.
*/ */
if (ftruncate(fd, memory)) if (ftruncate(fd, memory))
perror("ftruncate"); perror("ftruncate");
#ifdef MAP_POPULATE #ifdef MAP_POPULATE
/* NB: MAP_POPULATE won't exhaustively alloc all phys pages in the case /* NB: MAP_POPULATE won't exhaustively alloc all phys pages in the case
@ -2762,9 +2762,9 @@ static void *file_ram_alloc(RAMBlock *block,
area = mmap(0, memory, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); area = mmap(0, memory, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0);
#endif #endif
if (area == MAP_FAILED) { if (area == MAP_FAILED) {
perror("file_ram_alloc: can't mmap RAM pages"); perror("file_ram_alloc: can't mmap RAM pages");
close(fd); close(fd);
return (NULL); return (NULL);
} }
block->fd = fd; block->fd = fd;
return area; return area;