[PATCH 1/6] Realview PCIX support - add main support module code

Russell King - ARM Linux linux at arm.linux.org.uk
Thu Oct 28 10:09:49 EDT 2010


On Wed, Oct 20, 2010 at 11:16:32PM +0200, Arnd Bergmann wrote:
> > +{
> > +	u32 mode;
> > +	u32 config_addr;
> > +
> > +	writel(0x000307F7, PCIX_UNIT_BASE + PCI_PERRSTAT); /* clear error bit */
> > +	writew(0xfb30, PCIX_UNIT_BASE + PCI_STATUS);	   /* error bit clear */
> 
> I would guess that you need locking here, two drivers might simultaneously be
> accessing config space on different CPUs, or you might have kernel preemption
> enabled and get preempted between the register accesses.

pci config accesses are serialized by a global pci_lock raw spinlock,
which disables IRQs.



More information about the linux-arm-kernel mailing list