Re: [PATCH V5 1/3] ARM64 LPC: Indirect ISA port IO introduced

2017-01-06 Thread Arnd Bergmann
On Thursday, December 22, 2016 4:15:57 PM CET Ming Lei wrote: > ERROR: "inb" [drivers/watchdog/wdt_pci.ko] undefined! > ERROR: "outb" [drivers/watchdog/wdt_pci.ko] undefined! > ERROR: "outb" [drivers/watchdog/pcwd_pci.ko] undefined! > ERROR: "inb" [drivers/watchdog/pcwd_pci.ko] undefined! > ERROR:

Re: [PATCH V5 1/3] ARM64 LPC: Indirect ISA port IO introduced

2016-12-22 Thread Ming Lei
On Fri, Dec 23, 2016 at 9:43 AM, zhichang.yuan wrote: > Hi,Ming, > > > On 2016/12/22 16:15, Ming Lei wrote: >> Hi Guys, >> >> On Tue, Nov 8, 2016 at 11:47 AM, zhichang.yuan >> wrote: >>> For arm64, there is no I/O space as other architectural platforms, such as >>> X86. Most I/O accesses are achi

Re: [PATCH V5 1/3] ARM64 LPC: Indirect ISA port IO introduced

2016-12-22 Thread zhichang.yuan
Hi,Ming, On 2016/12/22 16:15, Ming Lei wrote: > Hi Guys, > > On Tue, Nov 8, 2016 at 11:47 AM, zhichang.yuan > wrote: >> For arm64, there is no I/O space as other architectural platforms, such as >> X86. Most I/O accesses are achieved based on MMIO. But for some arm64 SoCs, >> such as Hip06, whe

Re: [PATCH V5 1/3] ARM64 LPC: Indirect ISA port IO introduced

2016-12-22 Thread Ming Lei
Hi Guys, On Tue, Nov 8, 2016 at 11:47 AM, zhichang.yuan wrote: > For arm64, there is no I/O space as other architectural platforms, such as > X86. Most I/O accesses are achieved based on MMIO. But for some arm64 SoCs, > such as Hip06, when accessing some legacy ISA devices connected to LPC, those

Re: [PATCH V5 1/3] ARM64 LPC: Indirect ISA port IO introduced

2016-11-21 Thread John Garry
On 08/11/2016 23:16, Benjamin Herrenschmidt wrote: On Tue, 2016-11-08 at 12:03 +, Mark Rutland wrote: On Tue, Nov 08, 2016 at 11:47:07AM +0800, zhichang.yuan wrote: For arm64, there is no I/O space as other architectural platforms, such as X86. Most I/O accesses are achieved based on MMIO.

Re: [PATCH V5 1/3] ARM64 LPC: Indirect ISA port IO introduced

2016-11-18 Thread Arnd Bergmann
On Friday, November 18, 2016 7:12:35 PM CET zhichang.yuan wrote: > Hi, Arnd, > > > On 2016/11/18 17:20, Arnd Bergmann wrote: > > On Friday, November 11, 2016 6:07:07 PM CET zhichang.yuan wrote: > >> > >> I have similar idea as your PPC MMIO. > >> > >> We notice the prototype of {in/out()} is some

Re: [PATCH V5 1/3] ARM64 LPC: Indirect ISA port IO introduced

2016-11-18 Thread zhichang.yuan
Hi, Arnd, On 2016/11/18 17:20, Arnd Bergmann wrote: > On Friday, November 11, 2016 6:07:07 PM CET zhichang.yuan wrote: >> >> I have similar idea as your PPC MMIO. >> >> We notice the prototype of {in/out()} is something like that: >> >> static inline u8 inb(unsigned long addr) >> static inline vo

Re: [PATCH V5 1/3] ARM64 LPC: Indirect ISA port IO introduced

2016-11-18 Thread Arnd Bergmann
On Friday, November 11, 2016 6:07:07 PM CET zhichang.yuan wrote: > > I have similar idea as your PPC MMIO. > > We notice the prototype of {in/out()} is something like that: > > static inline u8 inb(unsigned long addr) > static inline void outb(u8 value, unsigned long addr) > > The type of param

Re: [PATCH V5 1/3] ARM64 LPC: Indirect ISA port IO introduced

2016-11-11 Thread zhichang.yuan
Hi, Ben, Mark, Thanks for your comments! These are helpful! On 2016/11/11 3:32, Benjamin Herrenschmidt wrote: > On Thu, 2016-11-10 at 11:22 +, Mark Rutland wrote: >> On POWER8, our PCIe doesn't do IO at all, but we have an LPC bus behind >>> firmware calls ;-) We use that infrastructure to p

Re: [PATCH V5 1/3] ARM64 LPC: Indirect ISA port IO introduced

2016-11-10 Thread Benjamin Herrenschmidt
On Thu, 2016-11-10 at 11:22 +, Mark Rutland wrote: > On POWER8, our PCIe doesn't do IO at all, but we have an LPC bus behind > > firmware calls ;-) We use that infrastructure to plumb in the LPC bus. > > Just to check, do you hook that in your inb/outb/etc? Yes. > Generally, it would seem ni

Re: [PATCH V5 1/3] ARM64 LPC: Indirect ISA port IO introduced

2016-11-10 Thread Mark Rutland
On Wed, Nov 09, 2016 at 10:16:42AM +1100, Benjamin Herrenschmidt wrote: > On Tue, 2016-11-08 at 12:03 +, Mark Rutland wrote: > > On Tue, Nov 08, 2016 at 11:47:07AM +0800, zhichang.yuan wrote: > > > > > > For arm64, there is no I/O space as other architectural platforms, such as > > > X86. Most

Re: [PATCH V5 1/3] ARM64 LPC: Indirect ISA port IO introduced

2016-11-10 Thread zhichang.yuan
Hi, Ben, On 2016/11/9 7:16, Benjamin Herrenschmidt wrote: > On Tue, 2016-11-08 at 12:03 +, Mark Rutland wrote: >> On Tue, Nov 08, 2016 at 11:47:07AM +0800, zhichang.yuan wrote: >>> >>> For arm64, there is no I/O space as other architectural platforms, such as >>> X86. Most I/O accesses are ac

Re: [PATCH V5 1/3] ARM64 LPC: Indirect ISA port IO introduced

2016-11-09 Thread Arnd Bergmann
On Wednesday, November 9, 2016 11:29:46 AM CET John Garry wrote: > On 08/11/2016 22:35, Arnd Bergmann wrote: > > On Tuesday, November 8, 2016 4:49:49 PM CET Will Deacon wrote: > >> On Tue, Nov 08, 2016 at 04:33:44PM +, John Garry wrote: > >>> On 08/11/2016 16:12, Will Deacon wrote: > On Tu

Re: [PATCH V5 1/3] ARM64 LPC: Indirect ISA port IO introduced

2016-11-09 Thread John Garry
On 08/11/2016 22:35, Arnd Bergmann wrote: On Tuesday, November 8, 2016 4:49:49 PM CET Will Deacon wrote: On Tue, Nov 08, 2016 at 04:33:44PM +, John Garry wrote: On 08/11/2016 16:12, Will Deacon wrote: On Tue, Nov 08, 2016 at 11:47:07AM +0800, zhichang.yuan wrote: Is there no way to make

Re: [PATCH V5 1/3] ARM64 LPC: Indirect ISA port IO introduced

2016-11-08 Thread Benjamin Herrenschmidt
On Tue, 2016-11-08 at 12:03 +, Mark Rutland wrote: > On Tue, Nov 08, 2016 at 11:47:07AM +0800, zhichang.yuan wrote: > > > > For arm64, there is no I/O space as other architectural platforms, such as > > X86. Most I/O accesses are achieved based on MMIO. But for some arm64 SoCs, > > such as Hip

Re: [PATCH V5 1/3] ARM64 LPC: Indirect ISA port IO introduced

2016-11-08 Thread Arnd Bergmann
On Tuesday, November 8, 2016 4:49:49 PM CET Will Deacon wrote: > On Tue, Nov 08, 2016 at 04:33:44PM +, John Garry wrote: > > On 08/11/2016 16:12, Will Deacon wrote: > > >On Tue, Nov 08, 2016 at 11:47:07AM +0800, zhichang.yuan wrote: > > >Is there no way to make this slightly more generic, so t

Re: [PATCH V5 1/3] ARM64 LPC: Indirect ISA port IO introduced

2016-11-08 Thread John Garry
On 08/11/2016 16:49, Will Deacon wrote: On Tue, Nov 08, 2016 at 04:33:44PM +, John Garry wrote: On 08/11/2016 16:12, Will Deacon wrote: On Tue, Nov 08, 2016 at 11:47:07AM +0800, zhichang.yuan wrote: +static inline void arm64_set_extops(struct extio_ops *ops) +{ + if (ops) +

Re: [PATCH V5 1/3] ARM64 LPC: Indirect ISA port IO introduced

2016-11-08 Thread Will Deacon
On Tue, Nov 08, 2016 at 04:33:44PM +, John Garry wrote: > On 08/11/2016 16:12, Will Deacon wrote: > >On Tue, Nov 08, 2016 at 11:47:07AM +0800, zhichang.yuan wrote: > >>+static inline void arm64_set_extops(struct extio_ops *ops) > >>+{ > >>+ if (ops) > >>+ WRITE_ONCE(arm64_extio_ops,

Re: [PATCH V5 1/3] ARM64 LPC: Indirect ISA port IO introduced

2016-11-08 Thread John Garry
On 08/11/2016 16:12, Will Deacon wrote: On Tue, Nov 08, 2016 at 11:47:07AM +0800, zhichang.yuan wrote: For arm64, there is no I/O space as other architectural platforms, such as X86. Most I/O accesses are achieved based on MMIO. But for some arm64 SoCs, such as Hip06, when accessing some legacy

Re: [PATCH V5 1/3] ARM64 LPC: Indirect ISA port IO introduced

2016-11-08 Thread Arnd Bergmann
On Tuesday, November 8, 2016 12:03:23 PM CET Mark Rutland wrote: > On Tue, Nov 08, 2016 at 11:47:07AM +0800, zhichang.yuan wrote: > > For arm64, there is no I/O space as other architectural platforms, such as > > X86. Most I/O accesses are achieved based on MMIO. But for some arm64 SoCs, > > such a

Re: [PATCH V5 1/3] ARM64 LPC: Indirect ISA port IO introduced

2016-11-08 Thread Arnd Bergmann
On Tuesday, November 8, 2016 5:09:59 PM CET Arnd Bergmann wrote: > > I don't see a better alternative. I earlier suggested having these > out of line so we don't grow the object code too much when it is > enabled. > On second look, I see that they are all done out of line, I would just move arou

Re: [PATCH V5 1/3] ARM64 LPC: Indirect ISA port IO introduced

2016-11-08 Thread Will Deacon
On Tue, Nov 08, 2016 at 11:47:07AM +0800, zhichang.yuan wrote: > For arm64, there is no I/O space as other architectural platforms, such as > X86. Most I/O accesses are achieved based on MMIO. But for some arm64 SoCs, > such as Hip06, when accessing some legacy ISA devices connected to LPC, those >

Re: [PATCH V5 1/3] ARM64 LPC: Indirect ISA port IO introduced

2016-11-08 Thread Mark Rutland
On Tue, Nov 08, 2016 at 11:47:07AM +0800, zhichang.yuan wrote: > For arm64, there is no I/O space as other architectural platforms, such as > X86. Most I/O accesses are achieved based on MMIO. But for some arm64 SoCs, > such as Hip06, when accessing some legacy ISA devices connected to LPC, those >

[PATCH V5 1/3] ARM64 LPC: Indirect ISA port IO introduced

2016-11-07 Thread zhichang.yuan
For arm64, there is no I/O space as other architectural platforms, such as X86. Most I/O accesses are achieved based on MMIO. But for some arm64 SoCs, such as Hip06, when accessing some legacy ISA devices connected to LPC, those known port addresses are used to control the corresponding target devi