/* * Protects against simultaneous tests on multiple cores, or * reloading can file while a test is in progress
*/ static DEFINE_SEMAPHORE(ifs_sem, 1);
/* * The sysfs interface to check additional details of last test * cat /sys/devices/system/platform/ifs/details
*/ static ssize_t details_show(struct device *dev, struct device_attribute *attr, char *buf)
{ struct ifs_data *ifsd = ifs_get_data(dev);
/* * The sysfs interface to check the test status: * To check the status of last test * cat /sys/devices/platform/ifs/status
*/ static ssize_t status_show(struct device *dev, struct device_attribute *attr, char *buf)
{ struct ifs_data *ifsd = ifs_get_data(dev);
/* * The sysfs interface for single core testing * To start test, for example, cpu5 * echo 5 > /sys/devices/platform/ifs/run_test * To check the result: * cat /sys/devices/platform/ifs/result * The sibling core gets tested at the same time.
*/ static ssize_t run_test_store(struct device *dev, struct device_attribute *attr, constchar *buf, size_t count)
{ unsignedint cpu; int rc;
rc = kstrtouint(buf, 0, &cpu); if (rc < 0 || cpu >= nr_cpu_ids) return -EINVAL;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.