| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0 |
|---|
| 1 | 2 | #include <linux/compiler.h> |
|---|
| 2 | 3 | #include <linux/bitmap.h> |
|---|
| 3 | | -#include "cpumap.h" |
|---|
| 4 | +#include <linux/kernel.h> |
|---|
| 5 | +#include <linux/zalloc.h> |
|---|
| 6 | +#include <perf/cpumap.h> |
|---|
| 7 | +#include <internal/cpumap.h> |
|---|
| 8 | +#include "debug.h" |
|---|
| 9 | +#include "env.h" |
|---|
| 4 | 10 | #include "mem2node.h" |
|---|
| 5 | 11 | #include "tests.h" |
|---|
| 6 | 12 | |
|---|
| .. | .. |
|---|
| 17 | 23 | |
|---|
| 18 | 24 | static unsigned long *get_bitmap(const char *str, int nbits) |
|---|
| 19 | 25 | { |
|---|
| 20 | | - struct cpu_map *map = cpu_map__new(str); |
|---|
| 26 | + struct perf_cpu_map *map = perf_cpu_map__new(str); |
|---|
| 21 | 27 | unsigned long *bm = NULL; |
|---|
| 22 | 28 | int i; |
|---|
| 23 | 29 | |
|---|
| .. | .. |
|---|
| 30 | 36 | } |
|---|
| 31 | 37 | |
|---|
| 32 | 38 | if (map) |
|---|
| 33 | | - cpu_map__put(map); |
|---|
| 39 | + perf_cpu_map__put(map); |
|---|
| 34 | 40 | else |
|---|
| 35 | 41 | free(bm); |
|---|
| 36 | 42 | |
|---|
| .. | .. |
|---|
| 66 | 72 | T("failed: mem2node__node", -1 == mem2node__node(&map, 0x1050)); |
|---|
| 67 | 73 | |
|---|
| 68 | 74 | for (i = 0; i < ARRAY_SIZE(nodes); i++) |
|---|
| 69 | | - free(nodes[i].set); |
|---|
| 75 | + zfree(&nodes[i].set); |
|---|
| 70 | 76 | |
|---|
| 71 | 77 | mem2node__exit(&map); |
|---|
| 72 | 78 | return 0; |
|---|