Re: [PATCH] exynos: serial clear and set big endian fix

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

 



On Mon, Jul 21, 2014 at 06:01:51PM +0200, Arnd Bergmann wrote:

> The correct way to do it is to use the readl()/writel() functions, or
> readl_relaxed()/writel_relaxed() in case of drivers that don't need
> to synchronize with DMA transfers.

And don't need to build on minority platforms like x86 either!

> I think what you want is something like

> static inline void __hw_set_bit(int nr, unsigned long __iomem *addr)
> {
>        addr += BIT_WORD(nr);
>        writel_relaxed(readl_relaxed(addr) | BIT_MASK(nr), addr);
> }

> which is also endian-safe.

Indeed, good point.

Attachment: signature.asc
Description: Digital signature


[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