numa.c (f2a1cf9180f63e88bb38ff21c169da97c3f2bad5) numa.c (fadb055bd4abcb3f356854742c1493560a7d136e)
1/*
2 * NUMA parameter parsing routines
3 *
4 * Copyright (c) 2014 Fujitsu Ltd.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights

--- 411 unchanged lines hidden (view full) ---

420 error_setg(errp, "Duplicate configuration of the side cache for "
421 "node-id=%" PRIu32 " and level=%" PRIu8,
422 node->node_id, node->level);
423 return;
424 }
425
426 if ((node->level > 1) &&
427 ms->numa_state->hmat_cache[node->node_id][node->level - 1] &&
1/*
2 * NUMA parameter parsing routines
3 *
4 * Copyright (c) 2014 Fujitsu Ltd.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights

--- 411 unchanged lines hidden (view full) ---

420 error_setg(errp, "Duplicate configuration of the side cache for "
421 "node-id=%" PRIu32 " and level=%" PRIu8,
422 node->node_id, node->level);
423 return;
424 }
425
426 if ((node->level > 1) &&
427 ms->numa_state->hmat_cache[node->node_id][node->level - 1] &&
428 (node->size >=
428 (node->size <=
429 ms->numa_state->hmat_cache[node->node_id][node->level - 1]->size)) {
430 error_setg(errp, "Invalid size=%" PRIu64 ", the size of level=%" PRIu8
429 ms->numa_state->hmat_cache[node->node_id][node->level - 1]->size)) {
430 error_setg(errp, "Invalid size=%" PRIu64 ", the size of level=%" PRIu8
431 " should be less than the size(%" PRIu64 ") of "
431 " should be larger than the size(%" PRIu64 ") of "
432 "level=%u", node->size, node->level,
433 ms->numa_state->hmat_cache[node->node_id]
434 [node->level - 1]->size,
435 node->level - 1);
436 return;
437 }
438
439 if ((node->level < HMAT_LB_LEVELS - 1) &&
440 ms->numa_state->hmat_cache[node->node_id][node->level + 1] &&
432 "level=%u", node->size, node->level,
433 ms->numa_state->hmat_cache[node->node_id]
434 [node->level - 1]->size,
435 node->level - 1);
436 return;
437 }
438
439 if ((node->level < HMAT_LB_LEVELS - 1) &&
440 ms->numa_state->hmat_cache[node->node_id][node->level + 1] &&
441 (node->size <=
441 (node->size >=
442 ms->numa_state->hmat_cache[node->node_id][node->level + 1]->size)) {
443 error_setg(errp, "Invalid size=%" PRIu64 ", the size of level=%" PRIu8
442 ms->numa_state->hmat_cache[node->node_id][node->level + 1]->size)) {
443 error_setg(errp, "Invalid size=%" PRIu64 ", the size of level=%" PRIu8
444 " should be larger than the size(%" PRIu64 ") of "
444 " should be less than the size(%" PRIu64 ") of "
445 "level=%u", node->size, node->level,
446 ms->numa_state->hmat_cache[node->node_id]
447 [node->level + 1]->size,
448 node->level + 1);
449 return;
450 }
451
452 hmat_cache = g_malloc0(sizeof(*hmat_cache));

--- 433 unchanged lines hidden ---
445 "level=%u", node->size, node->level,
446 ms->numa_state->hmat_cache[node->node_id]
447 [node->level + 1]->size,
448 node->level + 1);
449 return;
450 }
451
452 hmat_cache = g_malloc0(sizeof(*hmat_cache));

--- 433 unchanged lines hidden ---