mbox

[GIT,PULL] io.h clean-up for PCI

Message ID 50130F36.4090902@gmail.com
State New
Headers show

Pull-request

git://sources.calxeda.com/kernel/linux.git io-cleanup-pci-v2

Message

Rob Herring July 27, 2012, 9:59 p.m. UTC
On 07/16/2012 05:15 PM, Rob Herring wrote:
> Arnd,
> 
> Please pull io.h PCI clean-up series. As you suggested, lets get it in
> next for test and decide later if to apply it for 3.6 or wait.
> 
> BTW, I'll have sporadic email access over the next 2 weeks.
> 
> Rob
> 

Arnd,

Please pull updated io.h cleanup for PCI branch. I rebased this as the
changes shifted things around a bit. This has the following changes:

- Incorporated fixes from you and Stephen
- Add early i/o mapping pci_map_io_early and enable on footbridge and
integrator for VGA console
- Avoid including map.h in asm/mach/pci.h which collided with EDAC.

Rob

The following changes since commit 84a1caf1453c3d44050bd22db958af4a7f99315c:

  Linux 3.5-rc7 (2012-07-14 15:40:28 -0700)

are available in the git repository at:

  git://sources.calxeda.com/kernel/linux.git io-cleanup-pci-v2

for you to fetch changes up to dd9bf78040fa0da4cecc228e1682b9682b8cb180:

  ARM: iop3xx: use fixed PCI i/o mapping (2012-07-26 09:10:04 -0500)

----------------------------------------------------------------
Arnd Bergmann (1):
      iop13xx: use more regular PCI I/O space handling

Rob Herring (16):
      i2c: iop3xx: clean-up trailing whitespace
      i2c: iop3xx: use standard gpiolib functions
      ARM: Add fixed PCI i/o mapping
      ARM: move PCI i/o resource setup into common code
      ARM: versatile: use fixed PCI i/o mapping
      ARM: tegra: use fixed PCI i/o mapping
      ARM: integrator: use fixed PCI i/o mapping
      ARM: integrator: remove trailing whitespace on pci_v3.c
      ARM: shark: use fixed PCI i/o mapping
      ARM: footbridge: use fixed PCI i/o mapping
      ARM: dove: use fixed PCI i/o mapping
      ARM: kirkwood: use fixed PCI i/o mapping
      ARM: orion5x: use fixed PCI i/o mapping
      ARM: iop13xx: use fixed PCI i/o mapping
      ARM: mv78xx0: use fixed pci i/o mapping
      ARM: iop3xx: use fixed PCI i/o mapping

 Documentation/arm/memory.txt                       |    3 +
 arch/arm/Kconfig                                   |   13 +--
 arch/arm/include/asm/hardware/iop3xx.h             |   12 +-
 arch/arm/include/asm/io.h                          |    8 ++
 arch/arm/include/asm/mach/map.h                    |    8 ++
 arch/arm/include/asm/mach/pci.h                    |   13 +++
 arch/arm/kernel/bios32.c                           |   54 ++++++++-
 arch/arm/mach-dove/common.c                        |   10 --
 arch/arm/mach-dove/include/mach/dove.h             |    8 +-
 arch/arm/mach-dove/include/mach/io.h               |   19 ---
 arch/arm/mach-dove/pcie.c                          |   43 +++----
 arch/arm/mach-footbridge/common.c                  |   12 +-
 arch/arm/mach-footbridge/dc21285.c                 |   16 +--
 .../arm/mach-footbridge/include/mach/debug-macro.S |    3 +-
 arch/arm/mach-footbridge/include/mach/io.h         |   12 +-
 arch/arm/mach-integrator/include/mach/io.h         |   33 ------
 arch/arm/mach-integrator/include/mach/platform.h   |    4 +
 arch/arm/mach-integrator/integrator_ap.c           |    9 +-
 arch/arm/mach-integrator/pci_v3.c                  |   50 ++++----
 arch/arm/mach-iop13xx/include/mach/io.h            |   28 -----
 arch/arm/mach-iop13xx/include/mach/iop13xx.h       |   28 +----
 arch/arm/mach-iop13xx/io.c                         |   27 -----
 arch/arm/mach-iop13xx/pci.c                        |   37 +++---
 arch/arm/mach-iop13xx/setup.c                      |   10 --
 arch/arm/mach-iop32x/include/mach/io.h             |   19 ---
 arch/arm/mach-iop33x/include/mach/io.h             |   19 ---
 arch/arm/mach-kirkwood/common.c                    |   10 --
 arch/arm/mach-kirkwood/include/mach/io.h           |   24 ----
 arch/arm/mach-kirkwood/include/mach/kirkwood.h     |    8 +-
 arch/arm/mach-kirkwood/pcie.c                      |   44 +++----
 arch/arm/mach-mv78xx0/addr-map.c                   |    3 +-
 arch/arm/mach-mv78xx0/common.c                     |    5 -
 arch/arm/mach-mv78xx0/include/mach/io.h            |   24 ----
 arch/arm/mach-mv78xx0/include/mach/mv78xx0.h       |   21 ++--
 arch/arm/mach-mv78xx0/pcie.c                       |  110
++++++------------
 arch/arm/mach-orion5x/common.c                     |   10 --
 arch/arm/mach-orion5x/include/mach/io.h            |   22 ----
 arch/arm/mach-orion5x/include/mach/orion5x.h       |   20 ++--
 arch/arm/mach-orion5x/pci.c                        |   56 +++------
 arch/arm/mach-shark/core.c                         |   18 ---
 arch/arm/mach-shark/include/mach/debug-macro.S     |    7 +-
 arch/arm/mach-shark/include/mach/entry-macro.S     |    3 +-
 arch/arm/mach-shark/include/mach/io.h              |   18 ---
 arch/arm/mach-shark/pci.c                          |    5 +
 arch/arm/mach-tegra/include/mach/io.h              |   46 --------
 arch/arm/mach-tegra/include/mach/iomap.h           |    3 +
 arch/arm/mach-tegra/pcie.c                         |   95 ++++-----------
 arch/arm/mach-versatile/core.c                     |    5 -
 arch/arm/mach-versatile/include/mach/hardware.h    |    1 -
 arch/arm/mach-versatile/include/mach/io.h          |   27 -----
 arch/arm/mach-versatile/pci.c                      |   22 +---
 arch/arm/mm/ioremap.c                              |   14 +++
 arch/arm/mm/mmu.c                                  |   54 +++++++--
 arch/arm/plat-iop/pci.c                            |   25 ++--
 arch/arm/plat-iop/setup.c                          |    5 -
 drivers/i2c/busses/i2c-iop3xx.c                    |  121
++++++++++----------
 56 files changed, 414 insertions(+), 910 deletions(-)
 delete mode 100644 arch/arm/mach-dove/include/mach/io.h
 delete mode 100644 arch/arm/mach-integrator/include/mach/io.h
 delete mode 100644 arch/arm/mach-iop13xx/include/mach/io.h
 delete mode 100644 arch/arm/mach-iop32x/include/mach/io.h
 delete mode 100644 arch/arm/mach-iop33x/include/mach/io.h
 delete mode 100644 arch/arm/mach-kirkwood/include/mach/io.h
 delete mode 100644 arch/arm/mach-mv78xx0/include/mach/io.h
 delete mode 100644 arch/arm/mach-orion5x/include/mach/io.h
 delete mode 100644 arch/arm/mach-shark/include/mach/io.h
 delete mode 100644 arch/arm/mach-tegra/include/mach/io.h
 delete mode 100644 arch/arm/mach-versatile/include/mach/io.h

Comments

Will Deacon July 28, 2012, 2:38 p.m. UTC | #1
Hi Rob,

On Fri, Jul 27, 2012 at 10:59:18PM +0100, Rob Herring wrote:
> Please pull updated io.h cleanup for PCI branch. I rebased this as the
> changes shifted things around a bit. This has the following changes:
> 
> - Incorporated fixes from you and Stephen
> - Add early i/o mapping pci_map_io_early and enable on footbridge and
> integrator for VGA console

Unfortunately, I still experience the same hang on integrator with this
revised patch series. Given the turnaround time for testing this, I don't
think this should block the series, but I would like to get to the bottom of
it if possible.

I tried annotating the PCI code (including fault handlers) and the VGA
console code but I couldn't find the culprit. I suppose the next step is
JTAG, but that requires steal^Wborrowing some hardware from work.

Will
Olof Johansson July 29, 2012, 11:07 p.m. UTC | #2
Hi,

On Fri, Jul 27, 2012 at 2:59 PM, Rob Herring <robherring2@gmail.com> wrote:
> On 07/16/2012 05:15 PM, Rob Herring wrote:
>> Arnd,
>>
>> Please pull io.h PCI clean-up series. As you suggested, lets get it in
>> next for test and decide later if to apply it for 3.6 or wait.
>>
>> BTW, I'll have sporadic email access over the next 2 weeks.
>>
>> Rob
>>
>
> Arnd,
>
> Please pull updated io.h cleanup for PCI branch. I rebased this as the
> changes shifted things around a bit. This has the following changes:
>
> - Incorporated fixes from you and Stephen
> - Add early i/o mapping pci_map_io_early and enable on footbridge and
> integrator for VGA console
> - Avoid including map.h in asm/mach/pci.h which collided with EDAC.
>
> Rob
>
> The following changes since commit 84a1caf1453c3d44050bd22db958af4a7f99315c:
>
>   Linux 3.5-rc7 (2012-07-14 15:40:28 -0700)
>
> are available in the git repository at:
>
>   git://sources.calxeda.com/kernel/linux.git io-cleanup-pci-v2

I have replaced the current staging/io-cleanup-pci contents with the
above branch. Ideally I'd like to see a fix to the issues on
integrator before we send it up though.


-Olof
Rob Herring July 30, 2012, 11:05 a.m. UTC | #3
On 07/28/2012 09:38 AM, Will Deacon wrote:
> Hi Rob,
> 
> On Fri, Jul 27, 2012 at 10:59:18PM +0100, Rob Herring wrote:
>> Please pull updated io.h cleanup for PCI branch. I rebased this as the
>> changes shifted things around a bit. This has the following changes:
>>
>> - Incorporated fixes from you and Stephen
>> - Add early i/o mapping pci_map_io_early and enable on footbridge and
>> integrator for VGA console
> 
> Unfortunately, I still experience the same hang on integrator with this
> revised patch series. Given the turnaround time for testing this, I don't
> think this should block the series, but I would like to get to the bottom of
> it if possible.
> 
> I tried annotating the PCI code (including fault handlers) and the VGA
> console code but I couldn't find the culprit. I suppose the next step is
> JTAG, but that requires steal^Wborrowing some hardware from work.

I did do some tests with qemu by adding i/o setup to integrator/cp.
Without it, I would abort on 0xfee003xx (vga regs). Once I added the
setup, I got to an abort on a PCI memory address which I did not setup.

We can always revert integrator change if we can figure this out...

Rob
Russell King - ARM Linux July 30, 2012, 2:31 p.m. UTC | #4
On Mon, Jul 30, 2012 at 06:05:04AM -0500, Rob Herring wrote:
> On 07/28/2012 09:38 AM, Will Deacon wrote:
> > Hi Rob,
> > 
> > On Fri, Jul 27, 2012 at 10:59:18PM +0100, Rob Herring wrote:
> >> Please pull updated io.h cleanup for PCI branch. I rebased this as the
> >> changes shifted things around a bit. This has the following changes:
> >>
> >> - Incorporated fixes from you and Stephen
> >> - Add early i/o mapping pci_map_io_early and enable on footbridge and
> >> integrator for VGA console
> > 
> > Unfortunately, I still experience the same hang on integrator with this
> > revised patch series. Given the turnaround time for testing this, I don't
> > think this should block the series, but I would like to get to the bottom of
> > it if possible.
> > 
> > I tried annotating the PCI code (including fault handlers) and the VGA
> > console code but I couldn't find the culprit. I suppose the next step is
> > JTAG, but that requires steal^Wborrowing some hardware from work.
> 
> I did do some tests with qemu by adding i/o setup to integrator/cp.
> Without it, I would abort on 0xfee003xx (vga regs). Once I added the
> setup, I got to an abort on a PCI memory address which I did not setup.
> 
> We can always revert integrator change if we can figure this out...

Err, Integrator/CP doesn't have PCI nor does it have VGA.  Only the
Integrator/AP has that.
Rob Herring July 30, 2012, 2:56 p.m. UTC | #5
On 07/30/2012 09:31 AM, Russell King - ARM Linux wrote:
> On Mon, Jul 30, 2012 at 06:05:04AM -0500, Rob Herring wrote:
>> On 07/28/2012 09:38 AM, Will Deacon wrote:
>>> Hi Rob,
>>>
>>> On Fri, Jul 27, 2012 at 10:59:18PM +0100, Rob Herring wrote:
>>>> Please pull updated io.h cleanup for PCI branch. I rebased this as the
>>>> changes shifted things around a bit. This has the following changes:
>>>>
>>>> - Incorporated fixes from you and Stephen
>>>> - Add early i/o mapping pci_map_io_early and enable on footbridge and
>>>> integrator for VGA console
>>>
>>> Unfortunately, I still experience the same hang on integrator with this
>>> revised patch series. Given the turnaround time for testing this, I don't
>>> think this should block the series, but I would like to get to the bottom of
>>> it if possible.
>>>
>>> I tried annotating the PCI code (including fault handlers) and the VGA
>>> console code but I couldn't find the culprit. I suppose the next step is
>>> JTAG, but that requires steal^Wborrowing some hardware from work.
>>
>> I did do some tests with qemu by adding i/o setup to integrator/cp.
>> Without it, I would abort on 0xfee003xx (vga regs). Once I added the
>> setup, I got to an abort on a PCI memory address which I did not setup.
>>
>> We can always revert integrator change if we can figure this out...
> 
> Err, Integrator/CP doesn't have PCI nor does it have VGA.  Only the
> Integrator/AP has that.

Yes, I know. But there is no AP model within qemu. I added the mapping
to AP and enabled VGA console to do some basic checks that i/o accesses
happen. It didn't really have to be integrator platform at all for this
test. I know it's not much of a test, but it's something beyond
compiling and staring at the code.

I've also tested PCI i/o with versatile under qemu.

Rob
Will Deacon Aug. 14, 2012, 9:14 a.m. UTC | #6
On Mon, Jul 30, 2012 at 12:07:56AM +0100, Olof Johansson wrote:
> > On 07/16/2012 05:15 PM, Rob Herring wrote:
> > The following changes since commit 84a1caf1453c3d44050bd22db958af4a7f99315c:
> >
> >   Linux 3.5-rc7 (2012-07-14 15:40:28 -0700)
> >
> > are available in the git repository at:
> >
> >   git://sources.calxeda.com/kernel/linux.git io-cleanup-pci-v2
> 
> I have replaced the current staging/io-cleanup-pci contents with the
> above branch. Ideally I'd like to see a fix to the issues on
> integrator before we send it up though.

I *finally* got to the bottom of the issues I was seeing on my integrator
board with these patches. The ATX PSU I was using doesn't have a thumping
great resistor across it and, since the board draws very little current, the
voltage is all over the shop. Of the 3 PCI slots, this made one completely
unusable, one slightly temperamental and the other `rock solid'.

I was using the temperamental slot and the probing of the VGA console
combined with the later PCI initialisation somehow pushes it over the edge
and locks up the board. Swapping the PSU for one with an artifical load
across it makes all of the slots jump into life.

Late in the day, but I worked for this!:

Tested-by: Will Deacon <will.deacon@arm.com>

Will
Arnd Bergmann Aug. 14, 2012, 9:37 a.m. UTC | #7
On Tuesday 14 August 2012, Will Deacon wrote:
> On Mon, Jul 30, 2012 at 12:07:56AM +0100, Olof Johansson wrote:
> > > On 07/16/2012 05:15 PM, Rob Herring wrote:
> > > The following changes since commit 84a1caf1453c3d44050bd22db958af4a7f99315c:
> > >
> > >   Linux 3.5-rc7 (2012-07-14 15:40:28 -0700)
> > >
> > > are available in the git repository at:
> > >
> > >   git://sources.calxeda.com/kernel/linux.git io-cleanup-pci-v2
> > 
> > I have replaced the current staging/io-cleanup-pci contents with the
> > above branch. Ideally I'd like to see a fix to the issues on
> > integrator before we send it up though.
> 
> I finally got to the bottom of the issues I was seeing on my integrator
> board with these patches. The ATX PSU I was using doesn't have a thumping
> great resistor across it and, since the board draws very little current, the
> voltage is all over the shop. Of the 3 PCI slots, this made one completely
> unusable, one slightly temperamental and the other `rock solid'.
> 
> I was using the temperamental slot and the probing of the VGA console
> combined with the later PCI initialisation somehow pushes it over the edge
> and locks up the board. Swapping the PSU for one with an artifical load
> across it makes all of the slots jump into life.
> 
> Late in the day, but I worked for this!:
> 
> Tested-by: Will Deacon <will.deacon@arm.com>

Just to let you know, I've started getting the arm-soc tree into shape
for v3.7, and the series is now scheduled for integration in the next
merge window as a regular branch.

	Arnd
Russell King - ARM Linux Aug. 27, 2012, 8:27 a.m. UTC | #8
On Mon, Jul 30, 2012 at 09:56:56AM -0500, Rob Herring wrote:
> On 07/30/2012 09:31 AM, Russell King - ARM Linux wrote:
> > On Mon, Jul 30, 2012 at 06:05:04AM -0500, Rob Herring wrote:
> >> On 07/28/2012 09:38 AM, Will Deacon wrote:
> >>> Hi Rob,
> >>>
> >>> On Fri, Jul 27, 2012 at 10:59:18PM +0100, Rob Herring wrote:
> >>>> Please pull updated io.h cleanup for PCI branch. I rebased this as the
> >>>> changes shifted things around a bit. This has the following changes:
> >>>>
> >>>> - Incorporated fixes from you and Stephen
> >>>> - Add early i/o mapping pci_map_io_early and enable on footbridge and
> >>>> integrator for VGA console
> >>>
> >>> Unfortunately, I still experience the same hang on integrator with this
> >>> revised patch series. Given the turnaround time for testing this, I don't
> >>> think this should block the series, but I would like to get to the bottom of
> >>> it if possible.
> >>>
> >>> I tried annotating the PCI code (including fault handlers) and the VGA
> >>> console code but I couldn't find the culprit. I suppose the next step is
> >>> JTAG, but that requires steal^Wborrowing some hardware from work.
> >>
> >> I did do some tests with qemu by adding i/o setup to integrator/cp.
> >> Without it, I would abort on 0xfee003xx (vga regs). Once I added the
> >> setup, I got to an abort on a PCI memory address which I did not setup.
> >>
> >> We can always revert integrator change if we can figure this out...
> > 
> > Err, Integrator/CP doesn't have PCI nor does it have VGA.  Only the
> > Integrator/AP has that.
> 
> Yes, I know. But there is no AP model within qemu. I added the mapping
> to AP and enabled VGA console to do some basic checks that i/o accesses
> happen. It didn't really have to be integrator platform at all for this
> test. I know it's not much of a test, but it's something beyond
> compiling and staring at the code.
> 
> I've also tested PCI i/o with versatile under qemu.

What's the conflict resolution for the fix for ioremap of phys 0 (posted
by me previously) and your reoganisation and creation of
vm_reserve_area_early() ?

Note that I'm taking the autobuilder offline until this is resolved because
the tree currently isn't in a buildable state because of this.
Rob Herring Aug. 28, 2012, 12:14 a.m. UTC | #9
On 08/27/2012 03:27 AM, Russell King - ARM Linux wrote:
> On Mon, Jul 30, 2012 at 09:56:56AM -0500, Rob Herring wrote:
>> On 07/30/2012 09:31 AM, Russell King - ARM Linux wrote:
>>> On Mon, Jul 30, 2012 at 06:05:04AM -0500, Rob Herring wrote:
>>>> On 07/28/2012 09:38 AM, Will Deacon wrote:
>>>>> Hi Rob,
>>>>>
>>>>> On Fri, Jul 27, 2012 at 10:59:18PM +0100, Rob Herring wrote:
>>>>>> Please pull updated io.h cleanup for PCI branch. I rebased this as the
>>>>>> changes shifted things around a bit. This has the following changes:
>>>>>>
>>>>>> - Incorporated fixes from you and Stephen
>>>>>> - Add early i/o mapping pci_map_io_early and enable on footbridge and
>>>>>> integrator for VGA console
>>>>>
>>>>> Unfortunately, I still experience the same hang on integrator with this
>>>>> revised patch series. Given the turnaround time for testing this, I don't
>>>>> think this should block the series, but I would like to get to the bottom of
>>>>> it if possible.
>>>>>
>>>>> I tried annotating the PCI code (including fault handlers) and the VGA
>>>>> console code but I couldn't find the culprit. I suppose the next step is
>>>>> JTAG, but that requires steal^Wborrowing some hardware from work.
>>>>
>>>> I did do some tests with qemu by adding i/o setup to integrator/cp.
>>>> Without it, I would abort on 0xfee003xx (vga regs). Once I added the
>>>> setup, I got to an abort on a PCI memory address which I did not setup.
>>>>
>>>> We can always revert integrator change if we can figure this out...
>>>
>>> Err, Integrator/CP doesn't have PCI nor does it have VGA.  Only the
>>> Integrator/AP has that.
>>
>> Yes, I know. But there is no AP model within qemu. I added the mapping
>> to AP and enabled VGA console to do some basic checks that i/o accesses
>> happen. It didn't really have to be integrator platform at all for this
>> test. I know it's not much of a test, but it's something beyond
>> compiling and staring at the code.
>>
>> I've also tested PCI i/o with versatile under qemu.
> 
> What's the conflict resolution for the fix for ioremap of phys 0 (posted
> by me previously) and your reoganisation and creation of
> vm_reserve_area_early() ?
> 
> Note that I'm taking the autobuilder offline until this is resolved because
> the tree currently isn't in a buildable state because of this.

I believe you can just replace VM_ARM_STATIC_MAPPING with
VM_ARM_EMPTY_MAPPING in vm_reserve_area_early. The pci i/o space and
empty sections are the same until pci_ioremap_io is called, and it does
not care what the vm flags are.

Rob