repo.or.cz
/
qemu-kvm
/
amd-iommu.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
kvm: rename kvm/user to kvm/test
[qemu-kvm/amd-iommu.git]
/
kvm
/
test
/
x86
/
smptest.c
blob
37805999b3b0e4b1db9c2a8395372406f63516f9
1
#include
"libcflat.h"
2
#include
"smp.h"
3
4
static void
ipi_test
(
void
*
data
)
5
{
6
int
n
= (
long
)
data
;
7
8
printf
(
"ipi called, cpu %d
\n
"
,
n
);
9
if
(
n
!=
smp_id
())
10
printf
(
"but wrong cpu %d
\n
"
,
smp_id
());
11
}
12
13
int
main
()
14
{
15
int
ncpus
;
16
int
i
;
17
18
smp_init
();
19
20
ncpus
=
cpu_count
();
21
printf
(
"found %d cpus
\n
"
,
ncpus
);
22
for
(
i
=
0
;
i
<
ncpus
; ++
i
)
23
on_cpu
(
i
,
ipi_test
, (
void
*)(
long
)
i
);
24
return
0
;
25
}