PCI: Make saved capability state private to core
Interfaces and structs for saving and restoring PCI Capability state were declared in include/linux/pci.h, but aren't needed outside drivers/pci/. Move these to drivers/pci/pci.h: struct pci_cap_saved_data struct pci_cap_saved_state void pci_allocate_cap_save_buffers() void pci_free_cap_save_buffers() int pci_add_cap_save_buffer() int pci_add_ext_cap_save_buffer() struct pci_cap_saved_state *pci_find_saved_cap() struct pci_cap_saved_state *pci_find_saved_ext_cap() Link: https://lore.kernel.org/r/20210802221728.1469304-1-helgaas@kernel.org Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Alex Williamson <alex.williamson@redhat.com>
This commit is contained in:
parent
a153e5e117
commit
f0ab00174e
@ -37,6 +37,27 @@ int pci_probe_reset_function(struct pci_dev *dev);
|
|||||||
int pci_bridge_secondary_bus_reset(struct pci_dev *dev);
|
int pci_bridge_secondary_bus_reset(struct pci_dev *dev);
|
||||||
int pci_bus_error_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_D2_DELAY 200 /* usec; see PCIe r4.0, sec 5.9.1 */
|
||||||
#define PCI_PM_D3HOT_WAIT 10 /* msec */
|
#define PCI_PM_D3HOT_WAIT 10 /* msec */
|
||||||
#define PCI_PM_D3COLD_WAIT 100 /* msec */
|
#define PCI_PM_D3COLD_WAIT 100 /* msec */
|
||||||
@ -100,8 +121,6 @@ void pci_pm_init(struct pci_dev *dev);
|
|||||||
void pci_ea_init(struct pci_dev *dev);
|
void pci_ea_init(struct pci_dev *dev);
|
||||||
void pci_msi_init(struct pci_dev *dev);
|
void pci_msi_init(struct pci_dev *dev);
|
||||||
void pci_msix_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);
|
bool pci_bridge_d3_possible(struct pci_dev *dev);
|
||||||
void pci_bridge_d3_update(struct pci_dev *dev);
|
void pci_bridge_d3_update(struct pci_dev *dev);
|
||||||
void pci_bridge_wait_for_secondary_bus(struct pci_dev *dev);
|
void pci_bridge_wait_for_secondary_bus(struct pci_dev *dev);
|
||||||
|
@ -288,18 +288,6 @@ enum pci_bus_speed {
|
|||||||
enum pci_bus_speed pcie_get_speed_cap(struct pci_dev *dev);
|
enum pci_bus_speed pcie_get_speed_cap(struct pci_dev *dev);
|
||||||
enum pcie_link_width pcie_get_width_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 irq_affinity;
|
struct irq_affinity;
|
||||||
struct pcie_link_state;
|
struct pcie_link_state;
|
||||||
struct pci_vpd;
|
struct pci_vpd;
|
||||||
@ -1278,12 +1266,6 @@ int pci_load_saved_state(struct pci_dev *dev,
|
|||||||
struct pci_saved_state *state);
|
struct pci_saved_state *state);
|
||||||
int pci_load_and_free_saved_state(struct pci_dev *dev,
|
int pci_load_and_free_saved_state(struct pci_dev *dev,
|
||||||
struct pci_saved_state **state);
|
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_platform_power_transition(struct pci_dev *dev, pci_power_t state);
|
||||||
int pci_set_power_state(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);
|
pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state);
|
||||||
|
Loading…
Reference in New Issue
Block a user