Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add scripts for building in a container #9

Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
PCI: Stub out read/write/raw/find functions
Need stub functions in order to be able to compile ACPI without PCI
support.

TAG_MSFT: lcow

Signed-off-by: Sinan Kaya <okaya@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Pavel Tatashin <pasha.tatashin@soleen.com>
  • Loading branch information
Sinan Kaya authored and Sasha Levin committed Jun 26, 2019
commit 27e4f6a88e877a9edfe62da63f9448c1ea22a88d
32 changes: 32 additions & 0 deletions include/linux/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -678,10 +678,22 @@ struct pci_ops {
* ACPI needs to be able to access PCI config space before we've done a
* PCI bus scan and created pci_bus structures.
*/
#ifdef CONFIG_PCI
int raw_pci_read(unsigned int domain, unsigned int bus, unsigned int devfn,
int reg, int len, u32 *val);
int raw_pci_write(unsigned int domain, unsigned int bus, unsigned int devfn,
int reg, int len, u32 val);
#else
static inline int raw_pci_read(unsigned int domain, unsigned int bus,
unsigned int devfn, int reg, int len, u32 *val)
{
*val = 0;
return -EINVAL;
}
static inline int raw_pci_write(unsigned int domain, unsigned int bus,
unsigned int devfn, int reg, int len, u32 val)
{ return -EINVAL; }
#endif

#ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT
typedef u64 pci_bus_addr_t;
Expand Down Expand Up @@ -1596,7 +1608,27 @@ pci_release_mem_regions(struct pci_dev *pdev)
}

#else /* CONFIG_PCI is not enabled */
static inline int pci_bus_read_config_byte(struct pci_bus *bus,
unsigned int devfn, int where, u8 *val)
{ return -EINVAL; }

static inline int pci_bus_read_config_word(struct pci_bus *bus,
unsigned int devfn, int where, u16 *val)
{ return -EINVAL; }
static inline int pci_bus_read_config_dword(struct pci_bus *bus,
unsigned int devfn, int where, u32 *val)
{ return -EINVAL; }
static inline int pci_bus_write_config_byte(struct pci_bus *bus,
unsigned int devfn, int where, u8 val)
{ return -EINVAL; }
static inline int pci_bus_write_config_word(struct pci_bus *bus,
unsigned int devfn, int where, u16 val)
{ return -EINVAL; }
static inline int pci_bus_write_config_dword(struct pci_bus *bus,
unsigned int devfn, int where, u32 val)
{ return -EINVAL; }
static inline struct pci_bus *pci_find_bus(int domain, int busnr)
{ return NULL; }
static inline void pci_set_flags(int flags) { }
static inline void pci_add_flags(int flags) { }
static inline void pci_clear_flags(int flags) { }
Expand Down