Re: 回复: [PATCH] arch:unicore32:mm: add devmem_is_allowed() to support STRICT_DEVMEM

2014-04-14 Thread Chen Gang
We got no-reply almost a week, so we can assume "can put the code into "asm/io.h" as static inline function". I will/should send patch v2 for it. Thanks. On 04/08/2014 12:54 PM, Chen Gang wrote: > > On 04/08/2014 11:20 AM, 管雪涛 wrote: >> I'd like to put the code into asm/io.h, and make it stati

Re: 回复: [PATCH] arch:unicore32:mm: add devmem_is_allowed() to support STRICT_DEVMEM

2014-04-07 Thread Chen Gang
On 04/08/2014 11:20 AM, 管雪涛 wrote: > I'd like to put the code into asm/io.h, and make it static. > It sounds OK to me, but I don't know why the other architectures (e.g. arm, powerpc, x86) put them into ".c". iomem_is_exclusive() and page_is_ram() are all extern functions, so for me, devmem_is_

回复: [PATCH] arch:unicore32:mm: add devmem_is_allowed() to support STRICT_DEVMEM

2014-04-07 Thread 管雪涛
I'd like to put the code into asm/io.h, and make it static. > +#ifdef CONFIG_STRICT_DEVMEM > +/* > + * devmem_is_allowed() checks to see if /dev/mem access to a certain > + * address is valid. The argument is a physical page number. > + * We mimic x86 here by disallowing access to system RAM as we