Re: [PATCH] i2c: i2c-s3c2410: Remove recently introduced performance overheads

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 20, 2012 at 05:45:55PM +0800, Daniel Kurtz wrote:
> On Tue, Nov 20, 2012 at 1:57 PM, Mark Brown

> > +       spins = 3;
> > +       do {
> > +               cpu_relax();
> > +               iicstat = readl(i2c->regs + S3C2410_IICSTAT);
> > +       } while ((iicstat & S3C2410_IICSTAT_START) && --spins);

> Can you avoid one cpu_relax() by reading IICSTAT first, and switch to
> while { } instead of do { } while ()?

Of course.  The CPUs that care about this are single core so the
cpu_relax() has no effect on them anyway.

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux