linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the pci tree with the powerpc tree
@ 2018-01-29  0:36 Stephen Rothwell
  0 siblings, 0 replies; 6+ messages in thread
From: Stephen Rothwell @ 2018-01-29  0:36 UTC (permalink / raw)
  To: Bjorn Helgaas, Michael Ellerman, Benjamin Herrenschmidt, PowerPC
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Bryant G. Ly

Hi Bjorn,

Today's linux-next merge of the pci tree got a conflict in:

  arch/powerpc/platforms/powernv/eeh-powernv.c

between commit:

  64ba3dc7bf7c ("powerpc/eeh: Update VF config space after EEH")

from the powerpc tree and commit:

  fdabc3fe9982 ("PCI: Add #defines for Completion Timeout Disable feature")

from the pci tree.

The former commit moved the code changed by the latter to another file.
I have added the following merge fix patch:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 29 Jan 2018 11:33:24 +1100
Subject: [PATCH] PCI: fix up for "powerpc/eeh: Update VF config space after EEH"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/powerpc/kernel/eeh.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c
index cc649809885e..2b9df0040d6b 100644
--- a/arch/powerpc/kernel/eeh.c
+++ b/arch/powerpc/kernel/eeh.c
@@ -756,14 +756,14 @@ int eeh_restore_vf_config(struct pci_dn *pdn)
 		eeh_ops->write_config(pdn, edev->pcie_cap + PCI_EXP_DEVCTL,
 				      2, devctl);
 
-		/* Disable Completion Timeout */
+		/* Disable Completion Timeout if possible */
 		eeh_ops->read_config(pdn, edev->pcie_cap + PCI_EXP_DEVCAP2,
 				     4, &cap2);
-		if (cap2 & 0x10) {
+		if (cap2 & PCI_EXP_DEVCAP2_COMP_TMOUT_DIS) {
 			eeh_ops->read_config(pdn,
 					     edev->pcie_cap + PCI_EXP_DEVCTL2,
 					     4, &cap2);
-			cap2 |= 0x10;
+			cap2 |= PCI_EXP_DEVCTL2_COMP_TMOUT_DIS;
 			eeh_ops->write_config(pdn,
 					      edev->pcie_cap + PCI_EXP_DEVCTL2,
 					      4, cap2);
-- 
2.15.1


I fixed it up (see above) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* linux-next: manual merge of the pci tree with the powerpc tree
@ 2019-11-24 22:39 Stephen Rothwell
  0 siblings, 0 replies; 6+ messages in thread
From: Stephen Rothwell @ 2019-11-24 22:39 UTC (permalink / raw)
  To: Bjorn Helgaas, Michael Ellerman, PowerPC
  Cc: Linux Next Mailing List, Linux Kernel Mailing List,
	Christophe Leroy, Michal Simek

[-- Attachment #1: Type: text/plain, Size: 1098 bytes --]

Hi all,

Today's linux-next merge of the pci tree got a conflict in:

  arch/powerpc/include/asm/Kbuild

between commit:

  265c3491c4bc ("powerpc: Add support for GENERIC_EARLY_IOREMAP")

from the powerpc tree and commit:

  356f42aff121 ("asm-generic: Make msi.h a mandatory include/asm header")

from the pci tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc arch/powerpc/include/asm/Kbuild
index 148bee20e7e2,17726f2e46de..000000000000
--- a/arch/powerpc/include/asm/Kbuild
+++ b/arch/powerpc/include/asm/Kbuild
@@@ -11,5 -10,3 +11,4 @@@ generic-y += local64.
  generic-y += mcs_spinlock.h
  generic-y += preempt.h
  generic-y += vtime.h
- generic-y += msi.h
 +generic-y += early_ioremap.h

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* linux-next: manual merge of the pci tree with the powerpc tree
@ 2018-01-29  0:29 Stephen Rothwell
  0 siblings, 0 replies; 6+ messages in thread
From: Stephen Rothwell @ 2018-01-29  0:29 UTC (permalink / raw)
  To: Bjorn Helgaas, Michael Ellerman, Benjamin Herrenschmidt, PowerPC
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Bryant G. Ly

Hi Bjorn,

Today's linux-next merge of the pci tree got a conflict in:

  include/linux/pci.h

between commit:

  856e1eb9bdd4 ("PCI/AER: Add uevents in AER and EEH error/resume")

from the powerpc tree and commit:

  0aa0f5d1084c ("PCI: Clean up whitespace in linux/pci.h, pci/pci.h")

from the pci tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc include/linux/pci.h
index 881006c7a5d7,a1e10ba7b612..000000000000
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@@ -2280,43 -2267,19 +2269,55 @@@ static inline bool pci_is_thunderbolt_a
  	return false;
  }
  
 +/**
 + * pci_uevent_ers - emit a uevent during recovery path of pci device
 + * @pdev: pci device to check
 + * @err_type: type of error event
 + *
 + */
 +static inline void pci_uevent_ers(struct pci_dev *pdev,
 +				  enum  pci_ers_result err_type)
 +{
 +	int idx = 0;
 +	char *envp[3];
 +
 +	switch (err_type) {
 +	case PCI_ERS_RESULT_NONE:
 +	case PCI_ERS_RESULT_CAN_RECOVER:
 +		envp[idx++] = "ERROR_EVENT=BEGIN_RECOVERY";
 +		envp[idx++] = "DEVICE_ONLINE=0";
 +		break;
 +	case PCI_ERS_RESULT_RECOVERED:
 +		envp[idx++] = "ERROR_EVENT=SUCCESSFUL_RECOVERY";
 +		envp[idx++] = "DEVICE_ONLINE=1";
 +		break;
 +	case PCI_ERS_RESULT_DISCONNECT:
 +		envp[idx++] = "ERROR_EVENT=FAILED_RECOVERY";
 +		envp[idx++] = "DEVICE_ONLINE=0";
 +		break;
 +	default:
 +		break;
 +	}
 +
 +	if (idx > 0) {
 +		envp[idx++] = NULL;
 +		kobject_uevent_env(&pdev->dev.kobj, KOBJ_CHANGE, envp);
 +	}
 +}
 +
- /* provide the legacy pci_dma_* API */
+ /* Provide the legacy pci_dma_* API */
  #include <linux/pci-dma-compat.h>
  
+ #define pci_printk(level, pdev, fmt, arg...) \
+ 	dev_printk(level, &(pdev)->dev, fmt, ##arg)
+ 
+ #define pci_emerg(pdev, fmt, arg...)	dev_emerg(&(pdev)->dev, fmt, ##arg)
+ #define pci_alert(pdev, fmt, arg...)	dev_alert(&(pdev)->dev, fmt, ##arg)
+ #define pci_crit(pdev, fmt, arg...)	dev_crit(&(pdev)->dev, fmt, ##arg)
+ #define pci_err(pdev, fmt, arg...)	dev_err(&(pdev)->dev, fmt, ##arg)
+ #define pci_warn(pdev, fmt, arg...)	dev_warn(&(pdev)->dev, fmt, ##arg)
+ #define pci_notice(pdev, fmt, arg...)	dev_notice(&(pdev)->dev, fmt, ##arg)
+ #define pci_info(pdev, fmt, arg...)	dev_info(&(pdev)->dev, fmt, ##arg)
+ #define pci_dbg(pdev, fmt, arg...)	dev_dbg(&(pdev)->dev, fmt, ##arg)
+ 
  #endif /* LINUX_PCI_H */

^ permalink raw reply	[flat|nested] 6+ messages in thread

* linux-next: manual merge of the pci tree with the powerpc tree
@ 2012-03-13  1:43 Stephen Rothwell
  0 siblings, 0 replies; 6+ messages in thread
From: Stephen Rothwell @ 2012-03-13  1:43 UTC (permalink / raw)
  To: Jesse Barnes
  Cc: linux-next, linux-kernel, Bjorn Helgaas, Benjamin Herrenschmidt,
	ppc-dev, Gavin Shan

[-- Attachment #1: Type: text/plain, Size: 4556 bytes --]

Hi Jesse,

Today's linux-next merge of the pci tree got a conflict in
arch/powerpc/include/asm/ppc-pci.h between commit cb3bc9d0de1e
("powerpc/eeh: Cleanup comments in the EEH core") from the powerpc tree
and commit 673c97562489 ("powerpc/PCI: replace pci_probe_only with
pci_flags") from the pci tree.

Just context changes.  I fixed it up (see below) and can carry the fix as
necessary.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc arch/powerpc/include/asm/ppc-pci.h
index e660b37,f4f7ad8..0000000
--- a/arch/powerpc/include/asm/ppc-pci.h
+++ b/arch/powerpc/include/asm/ppc-pci.h
@@@ -45,23 -45,92 +45,21 @@@ extern void init_pci_config_tokens (voi
  extern unsigned long get_phb_buid (struct device_node *);
  extern int rtas_setup_phb(struct pci_controller *phb);
  
- extern unsigned long pci_probe_only;
- 
 -/* ---- EEH internal-use-only related routines ---- */
  #ifdef CONFIG_EEH
  
 +void pci_addr_cache_build(void);
  void pci_addr_cache_insert_device(struct pci_dev *dev);
  void pci_addr_cache_remove_device(struct pci_dev *dev);
 -void pci_addr_cache_build(void);
 -struct pci_dev *pci_get_device_by_addr(unsigned long addr);
 -
 -/**
 - * eeh_slot_error_detail -- record and EEH error condition to the log
 - * @pdn:      pci device node
 - * @severity: EEH_LOG_TEMP_FAILURE or EEH_LOG_PERM_FAILURE
 - *
 - * Obtains the EEH error details from the RTAS subsystem,
 - * and then logs these details with the RTAS error log system.
 - */
 -#define EEH_LOG_TEMP_FAILURE 1
 -#define EEH_LOG_PERM_FAILURE 2
 -void eeh_slot_error_detail (struct pci_dn *pdn, int severity);
 -
 -/**
 - * rtas_pci_enable - enable IO transfers for this slot
 - * @pdn:       pci device node
 - * @function:  either EEH_THAW_MMIO or EEH_THAW_DMA 
 - *
 - * Enable I/O transfers to this slot 
 - */
 -#define EEH_THAW_MMIO 2
 -#define EEH_THAW_DMA  3
 -int rtas_pci_enable(struct pci_dn *pdn, int function);
 -
 -/**
 - * rtas_set_slot_reset -- unfreeze a frozen slot
 - * @pdn:       pci device node
 - *
 - * Clear the EEH-frozen condition on a slot.  This routine
 - * does this by asserting the PCI #RST line for 1/8th of
 - * a second; this routine will sleep while the adapter is
 - * being reset.
 - *
 - * Returns a non-zero value if the reset failed.
 - */
 -int rtas_set_slot_reset (struct pci_dn *);
 -int eeh_wait_for_slot_status(struct pci_dn *pdn, int max_wait_msecs);
 -
 -/** 
 - * eeh_restore_bars - Restore device configuration info.
 - * @pdn:       pci device node
 - *
 - * A reset of a PCI device will clear out its config space.
 - * This routines will restore the config space for this
 - * device, and is children, to values previously obtained
 - * from the firmware.
 - */
 -void eeh_restore_bars(struct pci_dn *);
 -
 -/**
 - * rtas_configure_bridge -- firmware initialization of pci bridge
 - * @pdn:       pci device node
 - *
 - * Ask the firmware to configure all PCI bridges devices
 - * located behind the indicated node. Required after a
 - * pci device reset. Does essentially the same hing as
 - * eeh_restore_bars, but for brdges, and lets firmware 
 - * do the work.
 - */
 -void rtas_configure_bridge(struct pci_dn *);
 -
 +struct pci_dev *pci_addr_cache_get_device(unsigned long addr);
 +void eeh_slot_error_detail(struct eeh_dev *edev, int severity);
 +int eeh_pci_enable(struct eeh_dev *edev, int function);
 +int eeh_reset_pe(struct eeh_dev *);
 +void eeh_restore_bars(struct eeh_dev *);
  int rtas_write_config(struct pci_dn *, int where, int size, u32 val);
  int rtas_read_config(struct pci_dn *, int where, int size, u32 *val);
 -
 -/**
 - * eeh_mark_slot -- set mode flags for pertition endpoint
 - * @pdn:       pci device node
 - *
 - * mark and clear slots: find "partition endpoint" PE and set or 
 - * clear the flags for each subnode of the PE.
 - */
 -void eeh_mark_slot (struct device_node *dn, int mode_flag);
 -void eeh_clear_slot (struct device_node *dn, int mode_flag);
 -
 -/**
 - * find_device_pe -- Find the associated "Partiationable Endpoint" PE
 - * @pdn:       pci device node
 - */
 -struct device_node * find_device_pe(struct device_node *dn);
 +void eeh_mark_slot(struct device_node *dn, int mode_flag);
 +void eeh_clear_slot(struct device_node *dn, int mode_flag);
 +struct device_node *eeh_find_device_pe(struct device_node *dn);
  
  void eeh_sysfs_add_device(struct pci_dev *pdev);
  void eeh_sysfs_remove_device(struct pci_dev *pdev);

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* linux-next: manual merge of the pci tree with the powerpc tree
@ 2012-03-09  1:32 Stephen Rothwell
  0 siblings, 0 replies; 6+ messages in thread
From: Stephen Rothwell @ 2012-03-09  1:32 UTC (permalink / raw)
  To: Jesse Barnes
  Cc: linux-next, linux-kernel, Bjorn Helgaas, Benjamin Herrenschmidt,
	Paul Mackerras, linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 440 bytes --]

Hi Jesse,

Today's linux-next merge of the pci tree got a conflict in
arch/powerpc/platforms/iseries/pci.c between commit 8ee3e0d69623
("powerpc: Remove the main legacy iSerie platform code") from the powerpc
tree and commit 673c97562489 ("powerpc/PCI: replace pci_probe_only with
pci_flags") from the pci tree.

The former removed the file, so I did that.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* linux-next: manual merge of the pci tree with the powerpc tree
@ 2009-09-01  2:05 Stephen Rothwell
  0 siblings, 0 replies; 6+ messages in thread
From: Stephen Rothwell @ 2009-09-01  2:05 UTC (permalink / raw)
  To: Jesse Barnes
  Cc: linux-next, linux-kernel, Mike Mason, Richard Lary, Grant Likely,
	Benjamin Herrenschmidt, Paul Mackerras, linuxppc-dev

Hi Jesse,

Today's linux-next merge of the pci tree got a conflict in
arch/powerpc/kernel/pci_64.c between commit
fbe65447197789a3ccccc27755956f6a4c445089 ("powerpc/pci: move pci_64.c
device tree scanning code into pci-common.c") from the powerpc tree and
commit ced66a36d35607c60d18bb531527acd2083c0523 ("PCI/powerpc: support
PCIe fundamental reset") from the pci tree.

The former moved the code that is modified by the latter into another
file.  I fixed it up (see below) and can carry the fix as necessary.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --git a/arch/powerpc/kernel/pci_of_scan.c b/arch/powerpc/kernel/pci_of_scan.c
index 72c31bc..7311fdf 100644
--- a/arch/powerpc/kernel/pci_of_scan.c
+++ b/arch/powerpc/kernel/pci_of_scan.c
@@ -139,6 +139,7 @@ struct pci_dev *of_create_pci_dev(struct device_node *node,
 	dev->dev.bus = &pci_bus_type;
 	dev->devfn = devfn;
 	dev->multifunction = 0;		/* maybe a lie? */
+	dev->needs_freset = 0;		/* pcie fundamental reset required */
 
 	dev->vendor = get_int_prop(node, "vendor-id", 0xffff);
 	dev->device = get_int_prop(node, "device-id", 0xffff);

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-11-24 22:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-29  0:36 linux-next: manual merge of the pci tree with the powerpc tree Stephen Rothwell
  -- strict thread matches above, loose matches on Subject: below --
2019-11-24 22:39 Stephen Rothwell
2018-01-29  0:29 Stephen Rothwell
2012-03-13  1:43 Stephen Rothwell
2012-03-09  1:32 Stephen Rothwell
2009-09-01  2:05 Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).