linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Several questions about SH PCI
@ 2008-07-10 18:48 Roni Feldman
  2008-07-15  8:58 ` Paul Mundt
  0 siblings, 1 reply; 2+ messages in thread
From: Roni Feldman @ 2008-07-10 18:48 UTC (permalink / raw)
  To: linux-sh

Hello everyone,

I'm wondering about several things in the sh pci api:

1. In arch/sh/driver/pci/pci-sh7751.c, shouldn't sh7751_pci_init() be
tagged as core_initcall and not subsyss_initcall? pcibios_init(),
which scans the bus (and expects the pcic to be already initialized)
is also tagged as subsys_initcall. This might lead to bad ordering in
case more things are introduced in the subsys section, since there's
no order guarantee for functions in the same section, right?

2. I didn't manage to find PCIDMA support in the kernel. Did I
overlook it or is it just something nobody has implemented yet for sh?

3. I was thinking about the case where I'm using non-DMA PCI access,
and I need to change my window (PCIMBR or PCIIOBR). In that case every
section that changes the MBR / IOBR and does PCI access need to be
enclosed in something like pci_lock() and pci_unlock(), to solve the
problem of some other task changing MBR in my "critical section".
Would spinlocks be the best way to implement these locks?

Thanks

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

* Re: Several questions about SH PCI
  2008-07-10 18:48 Several questions about SH PCI Roni Feldman
@ 2008-07-15  8:58 ` Paul Mundt
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Mundt @ 2008-07-15  8:58 UTC (permalink / raw)
  To: linux-sh

On Thu, Jul 10, 2008 at 09:48:41PM +0300, Roni Feldman wrote:
> 1. In arch/sh/driver/pci/pci-sh7751.c, shouldn't sh7751_pci_init() be
> tagged as core_initcall and not subsyss_initcall? pcibios_init(),
> which scans the bus (and expects the pcic to be already initialized)
> is also tagged as subsys_initcall. This might lead to bad ordering in
> case more things are introduced in the subsys section, since there's
> no order guarantee for functions in the same section, right?
> 
It's link order dependent, but yes, there's a potential issue here if we
start out with the PCIC completely disabled at boot time.

> 2. I didn't manage to find PCIDMA support in the kernel. Did I
> overlook it or is it just something nobody has implemented yet for sh?
> 
It's not been implemented. Feel free to send patches.

> 3. I was thinking about the case where I'm using non-DMA PCI access,
> and I need to change my window (PCIMBR or PCIIOBR). In that case every
> section that changes the MBR / IOBR and does PCI access need to be
> enclosed in something like pci_lock() and pci_unlock(), to solve the
> problem of some other task changing MBR in my "critical section".
> Would spinlocks be the best way to implement these locks?
> 
Yes.

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

end of thread, other threads:[~2008-07-15  8:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-10 18:48 Several questions about SH PCI Roni Feldman
2008-07-15  8:58 ` Paul Mundt

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).