// SPDX-License-Identifier: GPL-2.0-only /* * IBM Accelerator Family 'GenWQE' * * (C) Copyright IBM Corp. 2013 * * Author: Frank Haverkamp <haver@linux.vnet.ibm.com> * Author: Joerg-Stephan Vogt <jsvogt@de.ibm.com> * Author: Michael Jung <mijung@gmx.net> * Author: Michael Ruettger <michael@ibmra.de>
*/
/* * Sysfs interfaces for the GenWQE card. There are attributes to query * the version of the bitstream as well as some for the driver. For * debugging, please also see the debugfs interfaces of this driver.
*/
/* * curr_bitstream_show() - Show the current bitstream id * * There is a bug in some old versions of the CPLD which selects the * bitstream, which causes the IO_SLU_BITSTREAM register to report * unreliable data in very rare cases. This makes this sysfs * unreliable up to the point were a new CPLD version is being used. * * Unfortunately there is no automatic way yet to query the CPLD * version, such that you need to manually ensure via programming * tools that you have a recent version of the CPLD software. * * The proposed circumvention is to use a special recovery bitstream * on the backup partition (0) to identify problems while loading the * image.
*/ static ssize_t curr_bitstream_show(struct device *dev, struct device_attribute *attr, char *buf)
{ int curr_bitstream; struct genwqe_dev *cd = dev_get_drvdata(dev);
/* * next_bitstream_show() - Show the next activated bitstream * * IO_SLC_CFGREG_SOFTRESET: This register can only be accessed by the PF.
*/ static ssize_t next_bitstream_show(struct device *dev, struct device_attribute *attr, char *buf)
{ int next_bitstream; struct genwqe_dev *cd = dev_get_drvdata(dev);
/* * genwqe_is_visible() - Determine if sysfs attribute should be visible or not * * VFs have restricted mmio capabilities, so not all sysfs entries * are allowed in VFs.
*/ static umode_t genwqe_is_visible(struct kobject *kobj, struct attribute *attr, int n)
{ unsignedint j; struct device *dev = kobj_to_dev(kobj); struct genwqe_dev *cd = dev_get_drvdata(dev);
umode_t mode = attr->mode;
if (genwqe_is_privileged(cd)) return mode;
for (j = 0; genwqe_normal_attributes[j] != NULL; j++) if (genwqe_normal_attributes[j] == attr) return mode;
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.