OSDN Git Service

tools/testing/cxl: add mechanism to lock mem device for testing
authorDave Jiang <dave.jiang@intel.com>
Wed, 30 Nov 2022 19:22:56 +0000 (12:22 -0700)
committerDan Williams <dan.j.williams@intel.com>
Thu, 1 Dec 2022 20:42:35 +0000 (12:42 -0800)
commit18fa556375c0e28f067f4a52e9f11d4fd2cf6842
treef15026fc4f70ff2aeaef90872d703aa4e69a4c43
parentbd429e5355cd58aeb7e38b905fbecee357a6379b
tools/testing/cxl: add mechanism to lock mem device for testing

The mock cxl mem devs needs a way to go into "locked" status to simulate
when the platform is rebooted. Add a sysfs mechanism so the device security
state is set to "locked" and the frozen state bits are cleared.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/166983617602.2734609.7042497620931694717.stgit@djiang5-desk3.ch.intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
tools/testing/cxl/test/mem.c