Message ID | 20190108054510.7393-1-syq@debian.org (mailing list archive) |
---|---|
State | Mainlined |
Commit | a214720cbf50cd8c3f76bbb9c3f5c283910e9d33 |
Headers | show |
Series | [v2] Disable MSI also when pcie-octeon.pcie_disable on | expand |
YunQiang Su <syq@debian.org> 于2019年1月8日周二 下午1:45写道: > > From: YunQiang Su <ysu@wavecomp.com> > > Octeon has an boot-time option to disable pcie. > > Since MSI depends on PCI-E, we should also disable MSI also with > this options is on. > > Signed-off-by: YunQiang Su <ysu@wavecomp.com> > --- > arch/mips/pci/msi-octeon.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/arch/mips/pci/msi-octeon.c b/arch/mips/pci/msi-octeon.c > index 2a5bb849b..288b58b00 100644 > --- a/arch/mips/pci/msi-octeon.c > +++ b/arch/mips/pci/msi-octeon.c > @@ -369,7 +369,9 @@ int __init octeon_msi_initialize(void) > int irq; > struct irq_chip *msi; > > - if (octeon_dma_bar_type == OCTEON_DMA_BAR_TYPE_PCIE) { > + if (octeon_dma_bar_type == OCTEON_DMA_BAR_TYPE_INVALID) { > + return 0; > + } else if (octeon_dma_bar_type == OCTEON_DMA_BAR_TYPE_PCIE) { This code snip appears when 2.6.36, and this boot time option first appears when 3.3. So, when backport, it make sense for 3.3+. > msi_rcv_reg[0] = CVMX_PEXP_NPEI_MSI_RCV0; > msi_rcv_reg[1] = CVMX_PEXP_NPEI_MSI_RCV1; > msi_rcv_reg[2] = CVMX_PEXP_NPEI_MSI_RCV2; > -- > 2.20.1 >
Hi YunQiang, On Tue, Jan 08, 2019 at 01:45:10PM +0800, YunQiang Su wrote: > From: YunQiang Su <ysu@wavecomp.com> > > Octeon has an boot-time option to disable pcie. > > Since MSI depends on PCI-E, we should also disable MSI also with > this options is on. Does this fix a bug you're seeing? Or is it just intended to avoid redundant work? If it fixes a bug then I'll apply it to mips-fixes & copy stable, otherwise I'll apply it to mips-next & not copy stable. Thanks, Paul > Signed-off-by: YunQiang Su <ysu@wavecomp.com> > --- > arch/mips/pci/msi-octeon.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/arch/mips/pci/msi-octeon.c b/arch/mips/pci/msi-octeon.c > index 2a5bb849b..288b58b00 100644 > --- a/arch/mips/pci/msi-octeon.c > +++ b/arch/mips/pci/msi-octeon.c > @@ -369,7 +369,9 @@ int __init octeon_msi_initialize(void) > int irq; > struct irq_chip *msi; > > - if (octeon_dma_bar_type == OCTEON_DMA_BAR_TYPE_PCIE) { > + if (octeon_dma_bar_type == OCTEON_DMA_BAR_TYPE_INVALID) { > + return 0; > + } else if (octeon_dma_bar_type == OCTEON_DMA_BAR_TYPE_PCIE) { > msi_rcv_reg[0] = CVMX_PEXP_NPEI_MSI_RCV0; > msi_rcv_reg[1] = CVMX_PEXP_NPEI_MSI_RCV1; > msi_rcv_reg[2] = CVMX_PEXP_NPEI_MSI_RCV2; > -- > 2.20.1 >
> 在 2019年1月11日,上午2:24,Paul Burton <pburton@wavecomp.com> 写道: > > Hi YunQiang, > > On Tue, Jan 08, 2019 at 01:45:10PM +0800, YunQiang Su wrote: >> From: YunQiang Su <ysu@wavecomp.com> >> >> Octeon has an boot-time option to disable pcie. >> >> Since MSI depends on PCI-E, we should also disable MSI also with >> this options is on. > > Does this fix a bug you're seeing? Or is it just intended to avoid > redundant work? > I have no idea whether this is a bug or new feathers. I get an Cavium machine, which has no PCI at all, and so I have to disable the PCI totally. For me there are 2 ways: disable on build-time or disable on runtime. Since Debian prefer to use a single kernel image. So I need to disable it on runtime. > If it fixes a bug then I'll apply it to mips-fixes & copy stable, > otherwise I'll apply it to mips-next & not copy stable. > I prefer it to be backported. > Thanks, > Paul > >> Signed-off-by: YunQiang Su <ysu@wavecomp.com> >> --- >> arch/mips/pci/msi-octeon.c | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) >> >> diff --git a/arch/mips/pci/msi-octeon.c b/arch/mips/pci/msi-octeon.c >> index 2a5bb849b..288b58b00 100644 >> --- a/arch/mips/pci/msi-octeon.c >> +++ b/arch/mips/pci/msi-octeon.c >> @@ -369,7 +369,9 @@ int __init octeon_msi_initialize(void) >> int irq; >> struct irq_chip *msi; >> >> - if (octeon_dma_bar_type == OCTEON_DMA_BAR_TYPE_PCIE) { >> + if (octeon_dma_bar_type == OCTEON_DMA_BAR_TYPE_INVALID) { >> + return 0; >> + } else if (octeon_dma_bar_type == OCTEON_DMA_BAR_TYPE_PCIE) { >> msi_rcv_reg[0] = CVMX_PEXP_NPEI_MSI_RCV0; >> msi_rcv_reg[1] = CVMX_PEXP_NPEI_MSI_RCV1; >> msi_rcv_reg[2] = CVMX_PEXP_NPEI_MSI_RCV2; >> -- >> 2.20.1 >>
Hi Yunqiang, On Thu, Jan 10, 2019 at 10:35:13AM -0800, Yunqiang Su wrote: > > 在 2019年1月11日,上午2:24,Paul Burton <pburton@wavecomp.com> 写道: > > Hi YunQiang, > > > > On Tue, Jan 08, 2019 at 01:45:10PM +0800, YunQiang Su wrote: > >> From: YunQiang Su <ysu@wavecomp.com> > >> > >> Octeon has an boot-time option to disable pcie. > >> > >> Since MSI depends on PCI-E, we should also disable MSI also with > >> this options is on. > > > > Does this fix a bug you're seeing? Or is it just intended to avoid > > redundant work? > > I have no idea whether this is a bug or new feathers. > I get an Cavium machine, which has no PCI at all, and so I have to disable the PCI totally. > > For me there are 2 ways: disable on build-time or disable on runtime. > Since Debian prefer to use a single kernel image. > So I need to disable it on runtime. Let me phrase this another way - if you boot with PCIe disabled, but without your patch applied, what happens? Does the system work or does it break? You must have written the patch for a reason, I just want to know what that reason is. > > If it fixes a bug then I'll apply it to mips-fixes & copy stable, > > otherwise I'll apply it to mips-next & not copy stable. > > I prefer it to be backported. Only if it fixes a bug. Thanks, Paul
Paul Burton <paul.burton@mips.com> 于2019年1月11日周五 上午2:45写道: > > Hi Yunqiang, > > On Thu, Jan 10, 2019 at 10:35:13AM -0800, Yunqiang Su wrote: > > > 在 2019年1月11日,上午2:24,Paul Burton <pburton@wavecomp.com> 写道: > > > Hi YunQiang, > > > > > > On Tue, Jan 08, 2019 at 01:45:10PM +0800, YunQiang Su wrote: > > >> From: YunQiang Su <ysu@wavecomp.com> > > >> > > >> Octeon has an boot-time option to disable pcie. > > >> > > >> Since MSI depends on PCI-E, we should also disable MSI also with > > >> this options is on. > > > > > > Does this fix a bug you're seeing? Or is it just intended to avoid > > > redundant work? > > > > I have no idea whether this is a bug or new feathers. > > I get an Cavium machine, which has no PCI at all, and so I have to disable the PCI totally. > > > > For me there are 2 ways: disable on build-time or disable on runtime. > > Since Debian prefer to use a single kernel image. > > So I need to disable it on runtime. > > Let me phrase this another way - if you boot with PCIe disabled, but > without your patch applied, what happens? Does the system work or does > it break? > Yes. I think it is another bug. https://lore.kernel.org/linux-mips/CAKcpw6Uf=_f4T1ZBLnp9gWrp1rjwuLfpF0h865-U4BOpuFLiiw@mail.gmail.com/T/#t > You must have written the patch for a reason, I just want to know what > that reason is. > > > > If it fixes a bug then I'll apply it to mips-fixes & copy stable, > > > otherwise I'll apply it to mips-next & not copy stable. > > > > I prefer it to be backported. > > Only if it fixes a bug. > > Thanks, > Paul
Paul Burton <paul.burton@mips.com> 于2019年1月11日周五 上午2:45写道: > > Hi Yunqiang, > > On Thu, Jan 10, 2019 at 10:35:13AM -0800, Yunqiang Su wrote: > > > 在 2019年1月11日,上午2:24,Paul Burton <pburton@wavecomp.com> 写道: > > > Hi YunQiang, > > > > > > On Tue, Jan 08, 2019 at 01:45:10PM +0800, YunQiang Su wrote: > > >> From: YunQiang Su <ysu@wavecomp.com> > > >> > > >> Octeon has an boot-time option to disable pcie. > > >> > > >> Since MSI depends on PCI-E, we should also disable MSI also with > > >> this options is on. > > > > > > Does this fix a bug you're seeing? Or is it just intended to avoid > > > redundant work? > > > > I have no idea whether this is a bug or new feathers. > > I get an Cavium machine, which has no PCI at all, and so I have to disable the PCI totally. > > > > For me there are 2 ways: disable on build-time or disable on runtime. > > Since Debian prefer to use a single kernel image. > > So I need to disable it on runtime. > > Let me phrase this another way - if you boot with PCIe disabled, but > without your patch applied, what happens? Does the system work or does > it break? With pcie disabled pcie with pcie-octeon.pcie_disable, and without this patch, the kernel will fail to boot very early. On https://elixir.bootlin.com/linux/latest/source/arch/mips/pci/msi-octeon.c#L399 request_irq > > You must have written the patch for a reason, I just want to know what > that reason is. > > > > If it fixes a bug then I'll apply it to mips-fixes & copy stable, > > > otherwise I'll apply it to mips-next & not copy stable. > > > > I prefer it to be backported. > > Only if it fixes a bug. > > Thanks, > Paul
Hello, YunQiang Su wrote: > From: YunQiang Su <ysu@wavecomp.com> > > Octeon has an boot-time option to disable pcie. > > Since MSI depends on PCI-E, we should also disable MSI also with > this options is on. > > Signed-off-by: YunQiang Su <ysu@wavecomp.com> Applied to mips-fixes. Thanks, Paul [ This message was auto-generated; if you believe anything is incorrect then please email paul.burton@mips.com to report it. ]
diff --git a/arch/mips/pci/msi-octeon.c b/arch/mips/pci/msi-octeon.c index 2a5bb849b..288b58b00 100644 --- a/arch/mips/pci/msi-octeon.c +++ b/arch/mips/pci/msi-octeon.c @@ -369,7 +369,9 @@ int __init octeon_msi_initialize(void) int irq; struct irq_chip *msi; - if (octeon_dma_bar_type == OCTEON_DMA_BAR_TYPE_PCIE) { + if (octeon_dma_bar_type == OCTEON_DMA_BAR_TYPE_INVALID) { + return 0; + } else if (octeon_dma_bar_type == OCTEON_DMA_BAR_TYPE_PCIE) { msi_rcv_reg[0] = CVMX_PEXP_NPEI_MSI_RCV0; msi_rcv_reg[1] = CVMX_PEXP_NPEI_MSI_RCV1; msi_rcv_reg[2] = CVMX_PEXP_NPEI_MSI_RCV2;