Commit 739c4747 authored by Bjorn Helgaas's avatar Bjorn Helgaas
Browse files

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
parents 74797618 0da14a19
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@

#include <linux/pci.h>
#include <asm/pci_x86.h>
#include <asm/numachip/numachip.h>

static u8 limit __read_mostly;

+1 −2
Original line number Diff line number Diff line
@@ -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);
+1 −1
Original line number Diff line number Diff line
@@ -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;

+21 −2
Original line number Diff line number Diff line
@@ -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);
+1 −3
Original line number Diff line number Diff line
@@ -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);
Loading