Re: [PATCH] uart: pl011: Add support to ZTE uart

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

 



On Fri, Mar 13, 2015 at 02:02:49PM -0400, Peter Hurley wrote:
> On 03/13/2015 01:46 PM, Russell King - ARM Linux wrote:
> > On Fri, Mar 13, 2015 at 01:41:02PM -0400, Peter Hurley wrote:
> >> I think this would be much cleaner keeping the existing register index
> >> symbolic constants and using a remapping LUT with inline i/o accessors.
> >>
> >> Plus it has the advantage of disallowing certain indexes which are not
> >> mapped (rather than an accidental alias).
> >>
> >> I realize that was not the original model set forth but I don't think
> >> the original model contemplated a complete remap.
> > 
> > In that case, we will want to ensure that we cache the data register
> > and flag register iomem pointer in loops, so we don't have to
> > constantly reload the base and offsets.
> > 
> > This code gets run on some fairly slow ARM systems - including entirely
> > FPGA based systems.
> 
> I would the think the compiler would factor ptr calculations outside
> any loop, but maybe not.

It can't.  IO accessors tend to have barriers, possibly calling out
to functions, and the barriers force the compiler to reload almost
everything which is not in a local variable.

(Note that none of the accessors in amba-pl011.c needs to have these
barriers, and the driver probably should've been converted to the
relaxed accessors when they were merged.)

-- 
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux