sysfs.c (a9763aa0bda186d8d86101e8ee90a37f606d9f64) | sysfs.c (9735bde36487da43d3c3fc910df49639f72decbf) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* Copyright(c) 2019 Intel Corporation. All rights rsvd. */ 3#include <linux/init.h> 4#include <linux/kernel.h> 5#include <linux/module.h> 6#include <linux/pci.h> 7#include <linux/device.h> 8#include <linux/io-64-nonatomic-lo-hi.h> --- 373 unchanged lines hidden (view full) --- 382 return -EINVAL; 383 384 if (!test_bit(IDXD_FLAG_CONFIGURABLE, &idxd->flags)) 385 return -EPERM; 386 387 if (idxd->state == IDXD_DEV_ENABLED) 388 return -EPERM; 389 | 1// SPDX-License-Identifier: GPL-2.0 2/* Copyright(c) 2019 Intel Corporation. All rights rsvd. */ 3#include <linux/init.h> 4#include <linux/kernel.h> 5#include <linux/module.h> 6#include <linux/pci.h> 7#include <linux/device.h> 8#include <linux/io-64-nonatomic-lo-hi.h> --- 373 unchanged lines hidden (view full) --- 382 return -EINVAL; 383 384 if (!test_bit(IDXD_FLAG_CONFIGURABLE, &idxd->flags)) 385 return -EPERM; 386 387 if (idxd->state == IDXD_DEV_ENABLED) 388 return -EPERM; 389 |
390 if (idxd->hw.version < DEVICE_VERSION_2 && !tc_override) | 390 if (idxd->hw.version <= DEVICE_VERSION_2 && !tc_override) |
391 return -EPERM; 392 393 if (val < 0 || val > 7) 394 return -EINVAL; 395 396 group->tc_a = val; 397 return count; 398} --- 25 unchanged lines hidden (view full) --- 424 return -EINVAL; 425 426 if (!test_bit(IDXD_FLAG_CONFIGURABLE, &idxd->flags)) 427 return -EPERM; 428 429 if (idxd->state == IDXD_DEV_ENABLED) 430 return -EPERM; 431 | 391 return -EPERM; 392 393 if (val < 0 || val > 7) 394 return -EINVAL; 395 396 group->tc_a = val; 397 return count; 398} --- 25 unchanged lines hidden (view full) --- 424 return -EINVAL; 425 426 if (!test_bit(IDXD_FLAG_CONFIGURABLE, &idxd->flags)) 427 return -EPERM; 428 429 if (idxd->state == IDXD_DEV_ENABLED) 430 return -EPERM; 431 |
432 if (idxd->hw.version < DEVICE_VERSION_2 && !tc_override) | 432 if (idxd->hw.version <= DEVICE_VERSION_2 && !tc_override) |
433 return -EPERM; 434 435 if (val < 0 || val > 7) 436 return -EINVAL; 437 438 group->tc_b = val; 439 return count; 440} --- 1378 unchanged lines hidden --- | 433 return -EPERM; 434 435 if (val < 0 || val > 7) 436 return -EINVAL; 437 438 group->tc_b = val; 439 return count; 440} --- 1378 unchanged lines hidden --- |