Re: [PATCH 04/19] LoongArch: Add common headers

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

 



On Tue, Jul 06, 2021 at 12:18:05PM +0800, Huacai Chen wrote:
> +/* CSR */
> +static inline u32 csr_readl(u32 reg)
> +{
> +	return __csrrd(reg);
> +}
> +
> +static inline u64 csr_readq(u32 reg)
> +{
> +	return __dcsrrd(reg);
> +}
> +
> +static inline void csr_writel(u32 val, u32 reg)
> +{
> +	__csrwr(val, reg);
> +}
> +
> +static inline void csr_writeq(u64 val, u32 reg)
> +{
> +	__dcsrwr(val, reg);
> +}
> +
> +static inline u32 csr_xchgl(u32 val, u32 mask, u32 reg)
> +{
> +	return __csrxchg(val, mask, reg);
> +}
> +
> +static inline u64 csr_xchgq(u64 val, u64 mask, u32 reg)
> +{
> +	return __dcsrxchg(val, mask, reg);
> +}

What are these __csrfoo() things, I cannot seem to find a definition of
them anywhere..



[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux