tools/testing/cxl: Mock the Inject Poison mailbox command
authorAlison Schofield <alison.schofield@intel.com>
Wed, 19 Apr 2023 03:26:30 +0000 (20:26 -0700)
committerDan Williams <dan.j.williams@intel.com>
Sun, 23 Apr 2023 19:08:39 +0000 (12:08 -0700)
commit371c16101ee8a076cbe93ab95bbefdb43927003e
tree83544301745fec764678e014d88f7420bd480239
parent50d527f52cbf0680c87d11a254383ca730c5c19f
tools/testing/cxl: Mock the Inject Poison mailbox command

Mock the injection of poison by storing the device:address entries in
mock_poison_list[]. Enforce a limit of 8 poison injections per memdev
device and 128 total entries for the cxl_test mock driver.

Introducing the mock_poison[] list here, makes it available for use in
the mock of Clear Poison, and the mock of Get Poison List.

Signed-off-by: Alison Schofield <alison.schofield@intel.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/f6b7f03541eaa8c2260d3eafadd04afe3f0d7962.1681874357.git.alison.schofield@intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
tools/testing/cxl/test/mem.c