@@ -35,55 +35,55 @@ create_and_destroy_region()
setup_x1()
{
- # Find an x1 decoder
- decoder=$($CXL list -b cxl_test -D -d root | jq -r ".[] |
- select(.pmem_capable == true) |
- select(.nr_targets == 1) |
- .decoder")
+ # Find an x1 decoder
+ decoder=$($CXL list -b cxl_test -D -d root | jq -r ".[] |
+ select(.pmem_capable == true) |
+ select(.nr_targets == 1) |
+ .decoder")
- # Find a memdev for this host-bridge
- port_dev0=$($CXL list -T -d $decoder | jq -r ".[] |
- .targets | .[] | select(.position == 0) | .target")
- mem0=$($CXL list -M -p $port_dev0 | jq -r ".[0].memdev")
- memdevs="$mem0"
+ # Find a memdev for this host-bridge
+ port_dev0=$($CXL list -T -d $decoder | jq -r ".[] |
+ .targets | .[] | select(.position == 0) | .target")
+ mem0=$($CXL list -M -p $port_dev0 | jq -r ".[0].memdev")
+ memdevs="$mem0"
}
setup_x2()
{
- # Find an x2 decoder
- decoder=$($CXL list -b cxl_test -D -d root | jq -r ".[] |
- select(.pmem_capable == true) |
- select(.nr_targets == 2) |
- .decoder")
+ # Find an x2 decoder
+ decoder=$($CXL list -b cxl_test -D -d root | jq -r ".[] |
+ select(.pmem_capable == true) |
+ select(.nr_targets == 2) |
+ .decoder")
- # Find a memdev for each host-bridge interleave position
- port_dev0=$($CXL list -T -d $decoder | jq -r ".[] |
- .targets | .[] | select(.position == 0) | .target")
- port_dev1=$($CXL list -T -d $decoder | jq -r ".[] |
- .targets | .[] | select(.position == 1) | .target")
- mem0=$($CXL list -M -p $port_dev0 | jq -r ".[0].memdev")
- mem1=$($CXL list -M -p $port_dev1 | jq -r ".[0].memdev")
- memdevs="$mem0 $mem1"
+ # Find a memdev for each host-bridge interleave position
+ port_dev0=$($CXL list -T -d $decoder | jq -r ".[] |
+ .targets | .[] | select(.position == 0) | .target")
+ port_dev1=$($CXL list -T -d $decoder | jq -r ".[] |
+ .targets | .[] | select(.position == 1) | .target")
+ mem0=$($CXL list -M -p $port_dev0 | jq -r ".[0].memdev")
+ mem1=$($CXL list -M -p $port_dev1 | jq -r ".[0].memdev")
+ memdevs="$mem0 $mem1"
}
setup_x4()
{
- # find an x2 decoder
- decoder=$($CXL list -b cxl_test -D -d root | jq -r ".[] |
- select(.pmem_capable == true) |
- select(.nr_targets == 2) |
- .decoder")
+ # find an x2 decoder
+ decoder=$($CXL list -b cxl_test -D -d root | jq -r ".[] |
+ select(.pmem_capable == true) |
+ select(.nr_targets == 2) |
+ .decoder")
- # Find a memdev for each host-bridge interleave position
- port_dev0=$($CXL list -T -d $decoder | jq -r ".[] |
- .targets | .[] | select(.position == 0) | .target")
- port_dev1=$($CXL list -T -d $decoder | jq -r ".[] |
- .targets | .[] | select(.position == 1) | .target")
- mem0=$($CXL list -M -p $port_dev0 | jq -r ".[0].memdev")
- mem1=$($CXL list -M -p $port_dev1 | jq -r ".[0].memdev")
- mem2=$($CXL list -M -p $port_dev0 | jq -r ".[1].memdev")
- mem3=$($CXL list -M -p $port_dev1 | jq -r ".[1].memdev")
- memdevs="$mem0 $mem1 $mem2 $mem3"
+ # Find a memdev for each host-bridge interleave position
+ port_dev0=$($CXL list -T -d $decoder | jq -r ".[] |
+ .targets | .[] | select(.position == 0) | .target")
+ port_dev1=$($CXL list -T -d $decoder | jq -r ".[] |
+ .targets | .[] | select(.position == 1) | .target")
+ mem0=$($CXL list -M -p $port_dev0 | jq -r ".[0].memdev")
+ mem1=$($CXL list -M -p $port_dev1 | jq -r ".[0].memdev")
+ mem2=$($CXL list -M -p $port_dev0 | jq -r ".[1].memdev")
+ mem3=$($CXL list -M -p $port_dev1 | jq -r ".[1].memdev")
+ memdevs="$mem0 $mem1 $mem2 $mem3"
}
setup_x1