aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-01-26 18:27:04 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2019-01-26 18:27:04 -0500
commit2580acb2a1b12f93f8259ff2053cec455d1d22a7 (patch)
tree173f550087838a71763f4aaaa57e2f28e56a319b
parent7930851ef10c137c1035d1ef2addfdb3c53a1273 (diff)
parent9a71ac7e15a723e90fc40388b4b92eefaabf747c (diff)
Merge tag 'vfio-v5.0-rc4' of git://github.com/awilliam/linux-vfio
Pull VFIO fixes from Alex Williamson: - cleanup licenses in new files (Thomas Gleixner) - cleanup new compiler warnings (Alexey Kardashevskiy) * tag 'vfio-v5.0-rc4' of git://github.com/awilliam/linux-vfio: vfio-pci/nvlink2: Fix ancient gcc warnings vfio/pci: Cleanup license mess
-rw-r--r--drivers/vfio/pci/trace.h6
-rw-r--r--drivers/vfio/pci/vfio_pci_nvlink2.c36
2 files changed, 17 insertions, 25 deletions
diff --git a/drivers/vfio/pci/trace.h b/drivers/vfio/pci/trace.h
index 4d13e510590e..b2aa986ab9ed 100644
--- a/drivers/vfio/pci/trace.h
+++ b/drivers/vfio/pci/trace.h
@@ -1,13 +1,9 @@
1/* SPDX-License-Identifier: GPL-2.0+ */ 1/* SPDX-License-Identifier: GPL-2.0-only */
2/* 2/*
3 * VFIO PCI mmap/mmap_fault tracepoints 3 * VFIO PCI mmap/mmap_fault tracepoints
4 * 4 *
5 * Copyright (C) 2018 IBM Corp. All rights reserved. 5 * Copyright (C) 2018 IBM Corp. All rights reserved.
6 * Author: Alexey Kardashevskiy <aik@ozlabs.ru> 6 * Author: Alexey Kardashevskiy <aik@ozlabs.ru>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */ 7 */
12 8
13#undef TRACE_SYSTEM 9#undef TRACE_SYSTEM
diff --git a/drivers/vfio/pci/vfio_pci_nvlink2.c b/drivers/vfio/pci/vfio_pci_nvlink2.c
index 054a2cf9dd8e..32f695ffe128 100644
--- a/drivers/vfio/pci/vfio_pci_nvlink2.c
+++ b/drivers/vfio/pci/vfio_pci_nvlink2.c
@@ -1,14 +1,10 @@
1// SPDX-License-Identifier: GPL-2.0+ 1// SPDX-License-Identifier: GPL-2.0-only
2/* 2/*
3 * VFIO PCI NVIDIA Whitherspoon GPU support a.k.a. NVLink2. 3 * VFIO PCI NVIDIA Whitherspoon GPU support a.k.a. NVLink2.
4 * 4 *
5 * Copyright (C) 2018 IBM Corp. All rights reserved. 5 * Copyright (C) 2018 IBM Corp. All rights reserved.
6 * Author: Alexey Kardashevskiy <aik@ozlabs.ru> 6 * Author: Alexey Kardashevskiy <aik@ozlabs.ru>
7 * 7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12 * Register an on-GPU RAM region for cacheable access. 8 * Register an on-GPU RAM region for cacheable access.
13 * 9 *
14 * Derived from original vfio_pci_igd.c: 10 * Derived from original vfio_pci_igd.c:
@@ -178,11 +174,11 @@ static int vfio_pci_nvgpu_add_capability(struct vfio_pci_device *vdev,
178 struct vfio_pci_region *region, struct vfio_info_cap *caps) 174 struct vfio_pci_region *region, struct vfio_info_cap *caps)
179{ 175{
180 struct vfio_pci_nvgpu_data *data = region->data; 176 struct vfio_pci_nvgpu_data *data = region->data;
181 struct vfio_region_info_cap_nvlink2_ssatgt cap = { 0 }; 177 struct vfio_region_info_cap_nvlink2_ssatgt cap = {
182 178 .header.id = VFIO_REGION_INFO_CAP_NVLINK2_SSATGT,
183 cap.header.id = VFIO_REGION_INFO_CAP_NVLINK2_SSATGT; 179 .header.version = 1,
184 cap.header.version = 1; 180 .tgt = data->gpu_tgt
185 cap.tgt = data->gpu_tgt; 181 };
186 182
187 return vfio_info_add_capability(caps, &cap.header, sizeof(cap)); 183 return vfio_info_add_capability(caps, &cap.header, sizeof(cap));
188} 184}
@@ -365,18 +361,18 @@ static int vfio_pci_npu2_add_capability(struct vfio_pci_device *vdev,
365 struct vfio_pci_region *region, struct vfio_info_cap *caps) 361 struct vfio_pci_region *region, struct vfio_info_cap *caps)
366{ 362{
367 struct vfio_pci_npu2_data *data = region->data; 363 struct vfio_pci_npu2_data *data = region->data;
368 struct vfio_region_info_cap_nvlink2_ssatgt captgt = { 0 }; 364 struct vfio_region_info_cap_nvlink2_ssatgt captgt = {
369 struct vfio_region_info_cap_nvlink2_lnkspd capspd = { 0 }; 365 .header.id = VFIO_REGION_INFO_CAP_NVLINK2_SSATGT,
366 .header.version = 1,
367 .tgt = data->gpu_tgt
368 };
369 struct vfio_region_info_cap_nvlink2_lnkspd capspd = {
370 .header.id = VFIO_REGION_INFO_CAP_NVLINK2_LNKSPD,
371 .header.version = 1,
372 .link_speed = data->link_speed
373 };
370 int ret; 374 int ret;
371 375
372 captgt.header.id = VFIO_REGION_INFO_CAP_NVLINK2_SSATGT;
373 captgt.header.version = 1;
374 captgt.tgt = data->gpu_tgt;
375
376 capspd.header.id = VFIO_REGION_INFO_CAP_NVLINK2_LNKSPD;
377 capspd.header.version = 1;
378 capspd.link_speed = data->link_speed;
379
380 ret = vfio_info_add_capability(caps, &captgt.header, sizeof(captgt)); 376 ret = vfio_info_add_capability(caps, &captgt.header, sizeof(captgt));
381 if (ret) 377 if (ret)
382 return ret; 378 return ret;