summaryrefslogtreecommitdiff
path: root/drivers/vfio
diff options
context:
space:
mode:
authorMinghuan Lian <Minghuan.Lian@freescale.com>2013-04-23 09:31:10 (GMT)
committerFleming Andrew-AFLEMING <AFLEMING@freescale.com>2013-04-25 21:13:10 (GMT)
commit0944f32926922344f6cbf29825936d34f74db3d3 (patch)
treeb0f40b21f4989d52de711c44313a5c5f0ad4ceac /drivers/vfio
parenteb2c40aac0baba856e5c4cf575b0b07b90b77dec (diff)
downloadlinux-fsl-qoriq-0944f32926922344f6cbf29825936d34f74db3d3.tar.xz
Move fsl_pci_ep_vfio.h to uapi/linux folder
1. File fsl_pci_ep_vfio.h is used for kernel driver and user space application. So move it to the uapi/linux foler. 2. move all the uint32_t members to the bottom of the structure pci_ep_win, for avoiding alignment difference on 32-bit versus 64-bit Signed-off-by: Minghuan Lian <Minghuan.Lian@freescale.com> Change-Id: I307954728bdedded838df7409231b1590f19d340 Reviewed-on: http://git.am.freescale.net:8181/1734 Reviewed-by: Wood Scott-B07421 <scottwood@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
Diffstat (limited to 'drivers/vfio')
-rw-r--r--drivers/vfio/fsl_pci_ep/fsl_pci_ep.h2
-rw-r--r--drivers/vfio/fsl_pci_ep/fsl_pci_ep_vfio.h77
2 files changed, 1 insertions, 78 deletions
diff --git a/drivers/vfio/fsl_pci_ep/fsl_pci_ep.h b/drivers/vfio/fsl_pci_ep/fsl_pci_ep.h
index e05f60e..1bb3c97 100644
--- a/drivers/vfio/fsl_pci_ep/fsl_pci_ep.h
+++ b/drivers/vfio/fsl_pci_ep/fsl_pci_ep.h
@@ -21,7 +21,7 @@
#ifndef _FSL_PCI_EP_H
#define _FSL_PCI_EP_H
-#include "fsl_pci_ep_vfio.h"
+#include <linux/fsl_pci_ep_vfio.h>
#define MULTI_FUNCTION_NUM 2
#define PCI_EP_PF_OFFSET 0x2000
diff --git a/drivers/vfio/fsl_pci_ep/fsl_pci_ep_vfio.h b/drivers/vfio/fsl_pci_ep/fsl_pci_ep_vfio.h
deleted file mode 100644
index 10a864f..0000000
--- a/drivers/vfio/fsl_pci_ep/fsl_pci_ep_vfio.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright 2013 Freescale Semiconductor, Inc.
- *
- * Author: Minghuan Lian <Minghuan.Lian@freescale.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License, version 2, as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef _FSL_PCI_EP_VFIO_H
-#define _FSL_PCI_EP_VFIO_H
-
-#include <linux/types.h>
-#include <linux/ioctl.h>
-
-enum {
- PCI_EP_TYPE_PF,
- PCI_EP_TYPE_VF,
-};
-
-enum PCI_EP_REGION_TYPE {
- PCI_EP_REGION_IBWIN,
- PCI_EP_REGION_OBWIN,
- PCI_EP_REGION_VF_IBWIN,
- PCI_EP_REGION_VF_OBWIN,
- PCI_EP_REGION_REGS,
- PCI_EP_REGION_CONFIG,
-};
-
-enum PCI_EP_REGION_INDEX {
- PCI_EP_WIN0_INDEX,
- PCI_EP_WIN1_INDEX,
- PCI_EP_WIN2_INDEX,
- PCI_EP_WIN3_INDEX,
- PCI_EP_WIN4_INDEX,
- PCI_EP_WIN5_INDEX,
-};
-
-#define PCI_EP_MSI_WIN_INDEX PCI_EP_WIN1_INDEX
-#define PCI_EP_CCSR_WIN_INDEX PCI_EP_WIN0_INDEX
-#define PCI_EP_DEFAULT_OW_INDEX PCI_EP_WIN0_INDEX
-
-struct pci_ep_win {
- uint32_t type;
- uint32_t idx;
- uint64_t offset;
- uint64_t pci_addr;
- uint64_t cpu_addr;
- uint32_t attr;
- uint64_t size;
-};
-
-#define VFIO_DEVICE_SET_WIN_INFO _IO(VFIO_TYPE, VFIO_BASE + 20)
-#define VFIO_DEVICE_GET_WIN_INFO _IO(VFIO_TYPE, VFIO_BASE + 21)
-
-struct pci_ep_info {
- int type;
- int pf_idx;
- int vf_idx;
- int iw_num;
- int ow_num;
- int vf_iw_num;
- int vf_ow_num;
-};
-
-#endif