License cleanup: add SPDX GPL-2.0 license identifier to files with no license
Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.
By default all files without license information are under the default
license of the kernel, which is GPL version 2.
Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier. The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.
This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.
How this work was done:
Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
- file had no licensing information it it.
- file was a */uapi/* one with no licensing information in it,
- file was a */uapi/* one with existing licensing information,
Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.
The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode & Windriver) producing SPDX
tag:value files created by Philippe Ombredanne. Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.
The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed. Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.
Criteria used to select files for SPDX license identifier tagging was:
- Files considered eligible had to be source code files.
- Make and config files were included as candidates if they contained >5
lines of source
- File already had some variant of a license header in it (even if <5
lines).
All documentation files were explicitly excluded.
The following heuristics were used to determine which SPDX license
identifiers to apply.
- when both scanners couldn't find any license traces, file was
considered to have no license information in it, and the top level
COPYING file license applied.
For non */uapi/* files that summary was:
SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 11139
and resulted in the first patch in this series.
If that file was a */uapi/* path one, it was "GPL-2.0 WITH
Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was:
SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 WITH Linux-syscall-note 930
and resulted in the second patch in this series.
- if a file had some form of licensing information in it, and was one
of the */uapi/* ones, it was denoted with the Linux-syscall-note if
any GPL family license was found in the file or had no licensing in
it (per prior point). Results summary:
SPDX license identifier # files
---------------------------------------------------|------
GPL-2.0 WITH Linux-syscall-note 270
GPL-2.0+ WITH Linux-syscall-note 169
((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21
((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17
LGPL-2.1+ WITH Linux-syscall-note 15
GPL-1.0+ WITH Linux-syscall-note 14
((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5
LGPL-2.0+ WITH Linux-syscall-note 4
LGPL-2.1 WITH Linux-syscall-note 3
((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3
((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1
and that resulted in the third patch in this series.
- when the two scanners agreed on the detected license(s), that became
the concluded license(s).
- when there was disagreement between the two scanners (one detected a
license but the other didn't, or they both detected different
licenses) a manual inspection of the file occurred.
- In most cases a manual inspection of the information in the file
resulted in a clear resolution of the license that should apply (and
which scanner probably needed to revisit its heuristics).
- When it was not immediately clear, the license identifier was
confirmed with lawyers working with the Linux Foundation.
- If there was any question as to the appropriate license identifier,
the file was flagged for further research and to be revisited later
in time.
In total, over 70 hours of logged manual review was done on the
spreadsheet to determine the SPDX license identifiers to apply to the
source files by Kate, Philippe, Thomas and, in some cases, confirmation
by lawyers working with the Linux Foundation.
Kate also obtained a third independent scan of the 4.13 code base from
FOSSology, and compared selected files where the other two scanners
disagreed against that SPDX file, to see if there was new insights. The
Windriver scanner is based on an older version of FOSSology in part, so
they are related.
Thomas did random spot checks in about 500 files from the spreadsheets
for the uapi headers and agreed with SPDX license identifier in the
files he inspected. For the non-uapi files Thomas did random spot checks
in about 15000 files.
In initial set of patches against 4.14-rc6, 3 files were found to have
copy/paste license identifier errors, and have been fixed to reflect the
correct identifier.
Additionally Philippe spent 10 hours this week doing a detailed manual
inspection and review of the 12,461 patched files from the initial patch
version early this week with:
- a full scancode scan run, collecting the matched texts, detected
license ids and scores
- reviewing anything where there was a license detected (about 500+
files) to ensure that the applied SPDX license was correct
- reviewing anything where there was no detection but the patch license
was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
SPDX license was correct
This produced a worksheet with 20 files needing minor correction. This
worksheet was then exported into 3 different .csv files for the
different types of files to be modified.
These .csv files were then reviewed by Greg. Thomas wrote a script to
parse the csv files and add the proper SPDX tag to the file, in the
format that the file expected. This script was further refined by Greg
based on the output to detect more types of files automatically and to
distinguish between header and source .c files (which need different
comment types.) Finally Greg ran the script using the .csv files to
generate the patches.
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-01 22:07:57 +08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
2005-04-17 06:20:36 +08:00
|
|
|
#ifndef __ASM_S390_PCI_H
|
|
|
|
#define __ASM_S390_PCI_H
|
|
|
|
|
2013-08-30 01:40:01 +08:00
|
|
|
#include <linux/pci.h>
|
2015-04-10 20:34:33 +08:00
|
|
|
#include <linux/mutex.h>
|
2017-04-27 20:44:06 +08:00
|
|
|
#include <linux/iommu.h>
|
2020-02-11 00:53:25 +08:00
|
|
|
#include <linux/pci_hotplug.h>
|
2012-11-29 19:50:30 +08:00
|
|
|
#include <asm-generic/pci.h>
|
2012-11-29 19:55:21 +08:00
|
|
|
#include <asm/pci_clp.h>
|
2012-12-11 21:53:35 +08:00
|
|
|
#include <asm/pci_debug.h>
|
2016-07-18 20:05:21 +08:00
|
|
|
#include <asm/sclp.h>
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2012-11-29 19:50:30 +08:00
|
|
|
#define PCIBIOS_MIN_IO 0x1000
|
|
|
|
#define PCIBIOS_MIN_MEM 0x10000000
|
|
|
|
|
|
|
|
#define pcibios_assign_all_busses() (0)
|
|
|
|
|
|
|
|
void __iomem *pci_iomap(struct pci_dev *, int, unsigned long);
|
|
|
|
void pci_iounmap(struct pci_dev *, void __iomem *);
|
|
|
|
int pci_domain_nr(struct pci_bus *);
|
|
|
|
int pci_proc_domain(struct pci_bus *);
|
|
|
|
|
|
|
|
#define ZPCI_BUS_NR 0 /* default bus number */
|
|
|
|
|
2019-02-13 01:39:46 +08:00
|
|
|
#define ZPCI_NR_DMA_SPACES 1
|
|
|
|
#define ZPCI_NR_DEVICES CONFIG_PCI_NR_FUNCTIONS
|
2020-03-17 19:59:37 +08:00
|
|
|
#define ZPCI_DOMAIN_BITMAP_SIZE (1 << 16)
|
2019-02-13 01:39:46 +08:00
|
|
|
|
2020-03-23 17:45:43 +08:00
|
|
|
#ifdef PCI
|
|
|
|
#if (ZPCI_NR_DEVICES > ZPCI_DOMAIN_BITMAP_SIZE)
|
|
|
|
# error ZPCI_NR_DEVICES can not be bigger than ZPCI_DOMAIN_BITMAP_SIZE
|
|
|
|
#endif
|
|
|
|
#endif /* PCI */
|
|
|
|
|
2012-11-29 19:50:30 +08:00
|
|
|
/* PCI Function Controls */
|
|
|
|
#define ZPCI_FC_FN_ENABLED 0x80
|
|
|
|
#define ZPCI_FC_ERROR 0x40
|
|
|
|
#define ZPCI_FC_BLOCKED 0x20
|
|
|
|
#define ZPCI_FC_DMA_ENABLED 0x10
|
|
|
|
|
2015-06-30 00:47:28 +08:00
|
|
|
#define ZPCI_FMB_DMA_COUNTER_VALID (1 << 23)
|
|
|
|
|
|
|
|
struct zpci_fmb_fmt0 {
|
|
|
|
u64 dma_rbytes;
|
|
|
|
u64 dma_wbytes;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct zpci_fmb_fmt1 {
|
|
|
|
u64 rx_bytes;
|
|
|
|
u64 rx_packets;
|
|
|
|
u64 tx_bytes;
|
|
|
|
u64 tx_packets;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct zpci_fmb_fmt2 {
|
|
|
|
u64 consumed_work_units;
|
|
|
|
u64 max_work_units;
|
|
|
|
};
|
|
|
|
|
2016-04-08 23:55:19 +08:00
|
|
|
struct zpci_fmb_fmt3 {
|
|
|
|
u64 tx_bytes;
|
|
|
|
};
|
|
|
|
|
2012-12-11 21:53:35 +08:00
|
|
|
struct zpci_fmb {
|
2015-06-30 00:47:28 +08:00
|
|
|
u32 format : 8;
|
|
|
|
u32 fmt_ind : 24;
|
2012-12-11 21:53:35 +08:00
|
|
|
u32 samples;
|
|
|
|
u64 last_update;
|
2015-06-30 00:47:28 +08:00
|
|
|
/* common counters */
|
2012-12-11 21:53:35 +08:00
|
|
|
u64 ld_ops;
|
|
|
|
u64 st_ops;
|
|
|
|
u64 stb_ops;
|
|
|
|
u64 rpcit_ops;
|
2015-06-30 00:47:28 +08:00
|
|
|
/* format specific counters */
|
|
|
|
union {
|
|
|
|
struct zpci_fmb_fmt0 fmt0;
|
|
|
|
struct zpci_fmb_fmt1 fmt1;
|
|
|
|
struct zpci_fmb_fmt2 fmt2;
|
2016-04-08 23:55:19 +08:00
|
|
|
struct zpci_fmb_fmt3 fmt3;
|
2015-06-30 00:47:28 +08:00
|
|
|
};
|
2016-03-31 17:48:31 +08:00
|
|
|
} __packed __aligned(128);
|
2012-12-11 21:53:35 +08:00
|
|
|
|
2012-11-29 19:50:30 +08:00
|
|
|
enum zpci_state {
|
2017-04-27 00:59:52 +08:00
|
|
|
ZPCI_FN_STATE_STANDBY = 0,
|
|
|
|
ZPCI_FN_STATE_CONFIGURED = 1,
|
|
|
|
ZPCI_FN_STATE_RESERVED = 2,
|
|
|
|
ZPCI_FN_STATE_ONLINE = 3,
|
2012-11-29 19:50:30 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct zpci_bar_struct {
|
2013-11-13 02:33:06 +08:00
|
|
|
struct resource *res; /* bus resource */
|
2019-04-14 21:38:01 +08:00
|
|
|
void __iomem *mio_wb;
|
|
|
|
void __iomem *mio_wt;
|
2012-11-29 19:50:30 +08:00
|
|
|
u32 val; /* bar start & 3 flag bits */
|
|
|
|
u16 map_idx; /* index into bar mapping array */
|
2013-11-13 02:33:06 +08:00
|
|
|
u8 size; /* order 2 exponent */
|
2012-11-29 19:50:30 +08:00
|
|
|
};
|
|
|
|
|
2015-08-27 21:33:03 +08:00
|
|
|
struct s390_domain;
|
|
|
|
|
2020-03-23 17:45:43 +08:00
|
|
|
#define ZPCI_FUNCTIONS_PER_BUS 256
|
|
|
|
struct zpci_bus {
|
|
|
|
struct kref kref;
|
|
|
|
struct pci_bus *bus;
|
|
|
|
struct zpci_dev *function[ZPCI_FUNCTIONS_PER_BUS];
|
|
|
|
struct list_head resources;
|
|
|
|
struct list_head bus_next;
|
2020-03-23 19:29:37 +08:00
|
|
|
struct resource bus_resource;
|
2020-03-23 17:45:43 +08:00
|
|
|
int pchid;
|
|
|
|
int domain_nr;
|
2020-04-22 21:15:23 +08:00
|
|
|
bool multifunction;
|
2020-03-23 17:45:43 +08:00
|
|
|
enum pci_bus_speed max_bus_speed;
|
|
|
|
};
|
|
|
|
|
2012-11-29 19:50:30 +08:00
|
|
|
/* Private data per function */
|
|
|
|
struct zpci_dev {
|
2020-03-23 17:45:43 +08:00
|
|
|
struct zpci_bus *zbus;
|
2012-11-29 19:50:30 +08:00
|
|
|
struct list_head entry; /* list of all zpci_devices, needed for hotplug, etc. */
|
2020-04-22 21:15:23 +08:00
|
|
|
struct list_head bus_next;
|
2020-03-23 17:45:43 +08:00
|
|
|
struct kref kref;
|
2020-02-11 00:53:25 +08:00
|
|
|
struct hotplug_slot hotplug_slot;
|
2012-11-29 19:50:30 +08:00
|
|
|
|
|
|
|
enum zpci_state state;
|
|
|
|
u32 fid; /* function ID, used by sclp */
|
|
|
|
u32 fh; /* function handle, used by insn's */
|
2014-04-16 22:12:05 +08:00
|
|
|
u16 vfn; /* virtual function number */
|
2012-11-29 19:50:30 +08:00
|
|
|
u16 pchid; /* physical channel ID */
|
|
|
|
u8 pfgid; /* function group ID */
|
2014-04-16 22:12:05 +08:00
|
|
|
u8 pft; /* pci function type */
|
2020-02-28 23:31:13 +08:00
|
|
|
u8 port;
|
2020-02-21 17:06:38 +08:00
|
|
|
u8 rid_available : 1;
|
2020-04-22 21:15:23 +08:00
|
|
|
u8 has_hp_slot : 1;
|
2020-04-28 17:54:46 +08:00
|
|
|
u8 is_physfn : 1;
|
|
|
|
u8 reserved : 5;
|
2020-02-21 17:06:38 +08:00
|
|
|
unsigned int devfn; /* DEVFN part of the RID*/
|
2012-11-29 19:50:30 +08:00
|
|
|
|
2015-04-10 20:34:33 +08:00
|
|
|
struct mutex lock;
|
2014-04-16 22:12:05 +08:00
|
|
|
u8 pfip[CLP_PFIP_NR_SEGMENTS]; /* pci function internal path */
|
|
|
|
u32 uid; /* user defined id */
|
|
|
|
u8 util_str[CLP_UTIL_STR_LEN]; /* utility string */
|
|
|
|
|
2012-11-29 20:05:05 +08:00
|
|
|
/* IRQ stuff */
|
|
|
|
u64 msi_addr; /* MSI address */
|
2014-10-30 02:12:04 +08:00
|
|
|
unsigned int max_msi; /* maximum number of MSI's */
|
2018-09-27 19:57:12 +08:00
|
|
|
unsigned int msi_first_bit;
|
|
|
|
unsigned int msi_nr_irqs;
|
2013-06-25 22:36:29 +08:00
|
|
|
struct airq_iv *aibv; /* adapter interrupt bit vector */
|
2017-06-10 19:09:07 +08:00
|
|
|
unsigned long aisb; /* number of the summary bit */
|
2012-11-29 20:05:05 +08:00
|
|
|
|
2012-11-29 21:33:30 +08:00
|
|
|
/* DMA stuff */
|
|
|
|
unsigned long *dma_table;
|
|
|
|
spinlock_t dma_table_lock;
|
|
|
|
int tlb_refresh;
|
|
|
|
|
|
|
|
spinlock_t iommu_bitmap_lock;
|
|
|
|
unsigned long *iommu_bitmap;
|
2016-09-08 19:25:01 +08:00
|
|
|
unsigned long *lazy_bitmap;
|
2012-11-29 21:33:30 +08:00
|
|
|
unsigned long iommu_size;
|
|
|
|
unsigned long iommu_pages;
|
|
|
|
unsigned int next_bit;
|
|
|
|
|
2017-04-27 20:44:06 +08:00
|
|
|
struct iommu_device iommu_dev; /* IOMMU core handle */
|
|
|
|
|
2013-11-13 02:33:06 +08:00
|
|
|
char res_name[16];
|
2019-04-14 21:38:01 +08:00
|
|
|
bool mio_capable;
|
2019-09-28 07:43:08 +08:00
|
|
|
struct zpci_bar_struct bars[PCI_STD_NUM_BARS];
|
2012-11-29 19:50:30 +08:00
|
|
|
|
2012-11-29 21:33:30 +08:00
|
|
|
u64 start_dma; /* Start of available DMA addresses */
|
|
|
|
u64 end_dma; /* End of available DMA addresses */
|
|
|
|
u64 dma_mask; /* DMA address space mask */
|
|
|
|
|
2012-12-11 21:53:35 +08:00
|
|
|
/* Function measurement block */
|
|
|
|
struct zpci_fmb *fmb;
|
|
|
|
u16 fmb_update; /* update interval */
|
2016-06-15 19:07:51 +08:00
|
|
|
u16 fmb_length;
|
2015-04-10 20:33:08 +08:00
|
|
|
/* software counters */
|
|
|
|
atomic64_t allocated_pages;
|
|
|
|
atomic64_t mapped_pages;
|
|
|
|
atomic64_t unmapped_pages;
|
2012-12-11 21:53:35 +08:00
|
|
|
|
2012-11-29 19:50:30 +08:00
|
|
|
enum pci_bus_speed max_bus_speed;
|
2012-12-11 21:53:35 +08:00
|
|
|
|
|
|
|
struct dentry *debugfs_dev;
|
2015-08-27 21:33:03 +08:00
|
|
|
|
|
|
|
struct s390_domain *s390_domain; /* s390 IOMMU domain data */
|
2012-11-29 19:50:30 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
static inline bool zdev_enabled(struct zpci_dev *zdev)
|
|
|
|
{
|
|
|
|
return (zdev->fh & (1UL << 31)) ? true : false;
|
|
|
|
}
|
|
|
|
|
2014-04-16 22:11:00 +08:00
|
|
|
extern const struct attribute_group *zpci_attr_groups[];
|
2019-02-26 23:07:32 +08:00
|
|
|
extern unsigned int s390_pci_force_floating __initdata;
|
2020-02-07 20:35:08 +08:00
|
|
|
extern unsigned int s390_pci_no_rid;
|
2014-04-16 22:11:00 +08:00
|
|
|
|
2012-11-29 19:50:30 +08:00
|
|
|
/* -----------------------------------------------------------------------------
|
|
|
|
Prototypes
|
|
|
|
----------------------------------------------------------------------------- */
|
|
|
|
/* Base stuff */
|
|
|
|
int zpci_create_device(struct zpci_dev *);
|
2017-05-09 18:27:30 +08:00
|
|
|
void zpci_remove_device(struct zpci_dev *zdev);
|
2012-11-29 19:50:30 +08:00
|
|
|
int zpci_enable_device(struct zpci_dev *);
|
2013-04-16 20:12:17 +08:00
|
|
|
int zpci_disable_device(struct zpci_dev *);
|
2012-11-29 21:33:30 +08:00
|
|
|
int zpci_register_ioat(struct zpci_dev *, u8, u64, u64, u64);
|
|
|
|
int zpci_unregister_ioat(struct zpci_dev *, u8);
|
2017-06-20 21:56:05 +08:00
|
|
|
void zpci_remove_reserved_devices(void);
|
2012-11-29 19:50:30 +08:00
|
|
|
|
2012-11-29 19:55:21 +08:00
|
|
|
/* CLP */
|
2013-08-30 01:37:28 +08:00
|
|
|
int clp_scan_pci_devices(void);
|
|
|
|
int clp_rescan_pci_devices(void);
|
2019-12-17 16:34:46 +08:00
|
|
|
int clp_rescan_pci_devices_simple(u32 *fid);
|
2012-11-29 19:55:21 +08:00
|
|
|
int clp_add_pci_device(u32, u32, int);
|
|
|
|
int clp_enable_fh(struct zpci_dev *, u8);
|
|
|
|
int clp_disable_fh(struct zpci_dev *);
|
2017-04-27 00:59:52 +08:00
|
|
|
int clp_get_state(u32 fid, enum zpci_state *state);
|
2012-11-29 19:55:21 +08:00
|
|
|
|
2020-03-18 20:53:16 +08:00
|
|
|
/* UID */
|
|
|
|
void update_uid_checking(bool new);
|
|
|
|
|
2017-04-27 20:44:06 +08:00
|
|
|
/* IOMMU Interface */
|
|
|
|
int zpci_init_iommu(struct zpci_dev *zdev);
|
|
|
|
void zpci_destroy_iommu(struct zpci_dev *zdev);
|
|
|
|
|
2013-01-16 02:04:39 +08:00
|
|
|
#ifdef CONFIG_PCI
|
2019-06-27 21:13:05 +08:00
|
|
|
static inline bool zpci_use_mio(struct zpci_dev *zdev)
|
|
|
|
{
|
|
|
|
return static_branch_likely(&have_mio) && zdev->mio_capable;
|
|
|
|
}
|
|
|
|
|
2012-11-29 21:34:48 +08:00
|
|
|
/* Error handling and recovery */
|
|
|
|
void zpci_event_error(void *);
|
|
|
|
void zpci_event_availability(void *);
|
2013-08-30 01:40:01 +08:00
|
|
|
void zpci_rescan(void);
|
2013-12-13 00:48:32 +08:00
|
|
|
bool zpci_is_enabled(void);
|
2013-01-16 02:04:39 +08:00
|
|
|
#else /* CONFIG_PCI */
|
|
|
|
static inline void zpci_event_error(void *e) {}
|
|
|
|
static inline void zpci_event_availability(void *e) {}
|
2013-08-30 01:40:01 +08:00
|
|
|
static inline void zpci_rescan(void) {}
|
2013-01-16 02:04:39 +08:00
|
|
|
#endif /* CONFIG_PCI */
|
2012-11-29 21:34:48 +08:00
|
|
|
|
2013-08-30 01:33:16 +08:00
|
|
|
#ifdef CONFIG_HOTPLUG_PCI_S390
|
|
|
|
int zpci_init_slot(struct zpci_dev *);
|
|
|
|
void zpci_exit_slot(struct zpci_dev *);
|
|
|
|
#else /* CONFIG_HOTPLUG_PCI_S390 */
|
|
|
|
static inline int zpci_init_slot(struct zpci_dev *zdev)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
static inline void zpci_exit_slot(struct zpci_dev *zdev) {}
|
|
|
|
#endif /* CONFIG_HOTPLUG_PCI_S390 */
|
|
|
|
|
2012-11-29 19:50:30 +08:00
|
|
|
/* Helpers */
|
2015-06-23 20:06:35 +08:00
|
|
|
static inline struct zpci_dev *to_zpci(struct pci_dev *pdev)
|
|
|
|
{
|
2020-03-23 17:45:43 +08:00
|
|
|
struct zpci_bus *zbus = pdev->sysdata;
|
|
|
|
|
2020-04-22 21:15:23 +08:00
|
|
|
return zbus->function[pdev->devfn];
|
2015-06-23 20:06:35 +08:00
|
|
|
}
|
|
|
|
|
2020-02-22 00:20:46 +08:00
|
|
|
static inline struct zpci_dev *to_zpci_dev(struct device *dev)
|
|
|
|
{
|
|
|
|
return to_zpci(to_pci_dev(dev));
|
|
|
|
}
|
|
|
|
|
2012-11-29 19:50:30 +08:00
|
|
|
struct zpci_dev *get_zdev_by_fid(u32);
|
|
|
|
|
2012-11-29 21:33:30 +08:00
|
|
|
/* DMA */
|
|
|
|
int zpci_dma_init(void);
|
|
|
|
void zpci_dma_exit(void);
|
|
|
|
|
2019-02-13 01:39:46 +08:00
|
|
|
int __init zpci_irq_init(void);
|
|
|
|
void __init zpci_irq_exit(void);
|
|
|
|
|
2012-12-11 21:53:35 +08:00
|
|
|
/* FMB */
|
|
|
|
int zpci_fmb_enable_device(struct zpci_dev *);
|
|
|
|
int zpci_fmb_disable_device(struct zpci_dev *);
|
|
|
|
|
|
|
|
/* Debug */
|
|
|
|
int zpci_debug_init(void);
|
|
|
|
void zpci_debug_exit(void);
|
2016-01-29 22:13:30 +08:00
|
|
|
void zpci_debug_init_device(struct zpci_dev *, const char *);
|
2012-12-11 21:53:35 +08:00
|
|
|
void zpci_debug_exit_device(struct zpci_dev *);
|
|
|
|
void zpci_debug_info(struct zpci_dev *, struct seq_file *);
|
|
|
|
|
2016-07-18 20:05:21 +08:00
|
|
|
/* Error reporting */
|
|
|
|
int zpci_report_error(struct pci_dev *, struct zpci_report_error_header *);
|
|
|
|
|
2014-03-07 01:25:13 +08:00
|
|
|
#ifdef CONFIG_NUMA
|
|
|
|
|
|
|
|
/* Returns the node based on PCI bus */
|
|
|
|
static inline int __pcibus_to_node(const struct pci_bus *bus)
|
|
|
|
{
|
|
|
|
return NUMA_NO_NODE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline const struct cpumask *
|
|
|
|
cpumask_of_pcibus(const struct pci_bus *bus)
|
|
|
|
{
|
|
|
|
return cpu_online_mask;
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* CONFIG_NUMA */
|
|
|
|
|
2012-11-29 19:50:30 +08:00
|
|
|
#endif
|