MODULE_PARM_DESC(force, "Forces module loading if no device present");
module_param(dax_debug, int, 0644);
MODULE_PARM_DESC(dax_debug, "Debug flags");
+static int flow_enable = 0;
+module_param(flow_enable, int, 0644);
+MODULE_PARM_DESC(flow_enable, "Enables flow control if hardware supports it");
static const struct file_operations dax_fops = {
.owner = THIS_MODULE,
* MD does not report it in old versions of HV, we need to explicitly
* check for flow control feature.
*/
- if ((dax_type == DAX1) && !dax_has_flow_ctl_numa()) {
- dax_dbg("Flow control disabled, dax_alloc restricted to 4M");
+ if (!flow_enable) {
+ dax_dbg("Flow control disabled by software, dax_alloc restricted to 4M");
+ dax_no_flow_ctl = true;
+ } else if ((dax_type == DAX1) && !dax_has_flow_ctl_numa()) {
+ dax_dbg("Flow control disabled by hardware, dax_alloc restricted to 4M");
dax_no_flow_ctl = true;
} else {
dax_dbg("Flow control enabled");
}
if (hdr->at_src0 == CCB_AT_VA_ALT) {
- access = (struct ccb_data_acc_ctl *)
- &ccbp->dwords[QUERY_DWORD_DAC];
- /* size in bytes */
- size = DAX_IN_SIZE_FROM_CCB(access->input_cnt);
- if (dax_map_segment_common(size, &ccb_addr_type, "src0",
+ if (dax_map_segment_common(0, &ccb_addr_type, "src0",
QUERY_DWORD_INPUT, ccbp,
dax_ctx) == 0)
hdr->at_src0 = ccb_addr_type;