mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-17 17:24:17 +08:00
Merge branch 'pci/misc'
- Add pci_numachip_init() declaration (Krzysztof Wilczyński) - Allocate pci_dev_str_match_path() string atomically (Dan Carpenter) - Drop error message when Precision Time Measurement supported but not enabled (Jakub Kicinski) - Correct the pci_iomap.h header guard #endif comment (Jonathan Cameron) - Add schedule point in proc_bus_pci_read() (Krzysztof Wilczyński) - Make saved capability state private to core (Bjorn Helgaas) - Sync __pci_register_driver() stub for CONFIG_PCI=n (Andy Shevchenko) - Convert sta2x11 from PCI-DMA-API to generic DMA-API (Christophe JAILLET) * pci/misc: x86/PCI: sta2x11: switch from 'pci_' to 'dma_' API PCI: Sync __pci_register_driver() stub for CONFIG_PCI=n PCI: Make saved capability state private to core PCI: Add schedule point in proc_bus_pci_read() PCI: Correct the pci_iomap.h header guard #endif comment PCI/PTM: Remove error message at boot PCI: Fix pci_dev_str_match_path() alloc while atomic bug x86/PCI: Add pci_numachip_init() declaration # Conflicts: # include/linux/pci.h
This commit is contained in:
commit
739c4747a2
@ -12,6 +12,7 @@
|
||||
|
||||
#include <linux/pci.h>
|
||||
#include <asm/pci_x86.h>
|
||||
#include <asm/numachip/numachip.h>
|
||||
|
||||
static u8 limit __read_mostly;
|
||||
|
||||
|
@ -146,8 +146,7 @@ static void sta2x11_map_ep(struct pci_dev *pdev)
|
||||
dev_err(dev, "sta2x11: could not set DMA offset\n");
|
||||
|
||||
dev->bus_dma_limit = max_amba_addr;
|
||||
pci_set_consistent_dma_mask(pdev, max_amba_addr);
|
||||
pci_set_dma_mask(pdev, max_amba_addr);
|
||||
dma_set_mask_and_coherent(&pdev->dev, max_amba_addr);
|
||||
|
||||
/* Configure AHB mapping */
|
||||
pci_write_config_dword(pdev, AHB_PEXLBASE(0), 0);
|
||||
|
@ -275,7 +275,7 @@ static int pci_dev_str_match_path(struct pci_dev *dev, const char *path,
|
||||
|
||||
*endptr = strchrnul(path, ';');
|
||||
|
||||
wpath = kmemdup_nul(path, *endptr - path, GFP_KERNEL);
|
||||
wpath = kmemdup_nul(path, *endptr - path, GFP_ATOMIC);
|
||||
if (!wpath)
|
||||
return -ENOMEM;
|
||||
|
||||
|
@ -38,6 +38,27 @@ void pci_init_reset_methods(struct pci_dev *dev);
|
||||
int pci_bridge_secondary_bus_reset(struct pci_dev *dev);
|
||||
int pci_bus_error_reset(struct pci_dev *dev);
|
||||
|
||||
struct pci_cap_saved_data {
|
||||
u16 cap_nr;
|
||||
bool cap_extended;
|
||||
unsigned int size;
|
||||
u32 data[];
|
||||
};
|
||||
|
||||
struct pci_cap_saved_state {
|
||||
struct hlist_node next;
|
||||
struct pci_cap_saved_data cap;
|
||||
};
|
||||
|
||||
void pci_allocate_cap_save_buffers(struct pci_dev *dev);
|
||||
void pci_free_cap_save_buffers(struct pci_dev *dev);
|
||||
int pci_add_cap_save_buffer(struct pci_dev *dev, char cap, unsigned int size);
|
||||
int pci_add_ext_cap_save_buffer(struct pci_dev *dev,
|
||||
u16 cap, unsigned int size);
|
||||
struct pci_cap_saved_state *pci_find_saved_cap(struct pci_dev *dev, char cap);
|
||||
struct pci_cap_saved_state *pci_find_saved_ext_cap(struct pci_dev *dev,
|
||||
u16 cap);
|
||||
|
||||
#define PCI_PM_D2_DELAY 200 /* usec; see PCIe r4.0, sec 5.9.1 */
|
||||
#define PCI_PM_D3HOT_WAIT 10 /* msec */
|
||||
#define PCI_PM_D3COLD_WAIT 100 /* msec */
|
||||
@ -101,8 +122,6 @@ void pci_pm_init(struct pci_dev *dev);
|
||||
void pci_ea_init(struct pci_dev *dev);
|
||||
void pci_msi_init(struct pci_dev *dev);
|
||||
void pci_msix_init(struct pci_dev *dev);
|
||||
void pci_allocate_cap_save_buffers(struct pci_dev *dev);
|
||||
void pci_free_cap_save_buffers(struct pci_dev *dev);
|
||||
bool pci_bridge_d3_possible(struct pci_dev *dev);
|
||||
void pci_bridge_d3_update(struct pci_dev *dev);
|
||||
void pci_bridge_wait_for_secondary_bus(struct pci_dev *dev);
|
||||
|
@ -60,10 +60,8 @@ void pci_save_ptm_state(struct pci_dev *dev)
|
||||
return;
|
||||
|
||||
save_state = pci_find_saved_ext_cap(dev, PCI_EXT_CAP_ID_PTM);
|
||||
if (!save_state) {
|
||||
pci_err(dev, "no suspend buffer for PTM\n");
|
||||
if (!save_state)
|
||||
return;
|
||||
}
|
||||
|
||||
cap = (u16 *)&save_state->cap.data[0];
|
||||
pci_read_config_word(dev, ptm + PCI_PTM_CTRL, cap);
|
||||
|
@ -83,6 +83,7 @@ static ssize_t proc_bus_pci_read(struct file *file, char __user *buf,
|
||||
buf += 4;
|
||||
pos += 4;
|
||||
cnt -= 4;
|
||||
cond_resched();
|
||||
}
|
||||
|
||||
if (cnt >= 2) {
|
||||
|
@ -52,4 +52,4 @@ static inline void __iomem *pci_iomap_wc_range(struct pci_dev *dev, int bar,
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ASM_GENERIC_IO_H */
|
||||
#endif /* __ASM_GENERIC_PCI_IOMAP_H */
|
||||
|
@ -294,18 +294,6 @@ enum pci_bus_speed {
|
||||
enum pci_bus_speed pcie_get_speed_cap(struct pci_dev *dev);
|
||||
enum pcie_link_width pcie_get_width_cap(struct pci_dev *dev);
|
||||
|
||||
struct pci_cap_saved_data {
|
||||
u16 cap_nr;
|
||||
bool cap_extended;
|
||||
unsigned int size;
|
||||
u32 data[];
|
||||
};
|
||||
|
||||
struct pci_cap_saved_state {
|
||||
struct hlist_node next;
|
||||
struct pci_cap_saved_data cap;
|
||||
};
|
||||
|
||||
struct pci_vpd {
|
||||
struct mutex lock;
|
||||
unsigned int len;
|
||||
@ -1293,12 +1281,6 @@ int pci_load_saved_state(struct pci_dev *dev,
|
||||
struct pci_saved_state *state);
|
||||
int pci_load_and_free_saved_state(struct pci_dev *dev,
|
||||
struct pci_saved_state **state);
|
||||
struct pci_cap_saved_state *pci_find_saved_cap(struct pci_dev *dev, char cap);
|
||||
struct pci_cap_saved_state *pci_find_saved_ext_cap(struct pci_dev *dev,
|
||||
u16 cap);
|
||||
int pci_add_cap_save_buffer(struct pci_dev *dev, char cap, unsigned int size);
|
||||
int pci_add_ext_cap_save_buffer(struct pci_dev *dev,
|
||||
u16 cap, unsigned int size);
|
||||
int pci_platform_power_transition(struct pci_dev *dev, pci_power_t state);
|
||||
int pci_set_power_state(struct pci_dev *dev, pci_power_t state);
|
||||
pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state);
|
||||
@ -1755,8 +1737,9 @@ static inline void pci_disable_device(struct pci_dev *dev) { }
|
||||
static inline int pcim_enable_device(struct pci_dev *pdev) { return -EIO; }
|
||||
static inline int pci_assign_resource(struct pci_dev *dev, int i)
|
||||
{ return -EBUSY; }
|
||||
static inline int __pci_register_driver(struct pci_driver *drv,
|
||||
struct module *owner)
|
||||
static inline int __must_check __pci_register_driver(struct pci_driver *drv,
|
||||
struct module *owner,
|
||||
const char *mod_name)
|
||||
{ return 0; }
|
||||
static inline int pci_register_driver(struct pci_driver *drv)
|
||||
{ return 0; }
|
||||
|
Loading…
Reference in New Issue
Block a user