2015-04-03 20:36:37

by Chen Gang

[permalink] [raw]
Subject: [PATCH] blackfin: include: asm: pgtable: Define dummy pgprot_writecombine

It is copied from asm-generic, the related error with allmodconfig:

CC [M] sound/core/pcm_native.o
sound/core/pcm_native.c: In function 'snd_pcm_lib_default_mmap':
sound/core/pcm_native.c:3387:24: error: implicit declaration of function 'pgprot_writecombine' [-Werror=implicit-function-declaration]
area->vm_page_prot = pgprot_writecombine(area->vm_page_prot);
^
sound/core/pcm_native.c:3387:22: error: incompatible types when assigning to type 'pgprot_t {aka struct <anonymous>}' from type 'int'
area->vm_page_prot = pgprot_writecombine(area->vm_page_prot);
^

Signed-off-by: Chen Gang <[email protected]>
---
arch/blackfin/include/asm/pgtable.h | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/blackfin/include/asm/pgtable.h b/arch/blackfin/include/asm/pgtable.h
index b88a155..3e730d9 100644
--- a/arch/blackfin/include/asm/pgtable.h
+++ b/arch/blackfin/include/asm/pgtable.h
@@ -36,6 +36,7 @@ typedef pte_t *pte_addr_t;
#define PAGE_READONLY __pgprot(0) /* these mean nothing to NO_MM */
#define PAGE_KERNEL __pgprot(0) /* these mean nothing to NO_MM */
#define pgprot_noncached(prot) (prot)
+#define pgprot_writecombine pgprot_noncached

extern void paging_init(void);

--
1.9.3


2015-04-03 22:50:44

by Richard Weinberger

[permalink] [raw]
Subject: Re: [PATCH] blackfin: include: asm: pgtable: Define dummy pgprot_writecombine

On Fri, Apr 3, 2015 at 10:36 PM, Chen Gang <[email protected]> wrote:
> It is copied from asm-generic, the related error with allmodconfig:
>
> CC [M] sound/core/pcm_native.o
> sound/core/pcm_native.c: In function 'snd_pcm_lib_default_mmap':
> sound/core/pcm_native.c:3387:24: error: implicit declaration of function 'pgprot_writecombine' [-Werror=implicit-function-declaration]
> area->vm_page_prot = pgprot_writecombine(area->vm_page_prot);
> ^
> sound/core/pcm_native.c:3387:22: error: incompatible types when assigning to type 'pgprot_t {aka struct <anonymous>}' from type 'int'
> area->vm_page_prot = pgprot_writecombine(area->vm_page_prot);
> ^
>
> Signed-off-by: Chen Gang <[email protected]>
> ---
> arch/blackfin/include/asm/pgtable.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/blackfin/include/asm/pgtable.h b/arch/blackfin/include/asm/pgtable.h
> index b88a155..3e730d9 100644
> --- a/arch/blackfin/include/asm/pgtable.h
> +++ b/arch/blackfin/include/asm/pgtable.h
> @@ -36,6 +36,7 @@ typedef pte_t *pte_addr_t;
> #define PAGE_READONLY __pgprot(0) /* these mean nothing to NO_MM */
> #define PAGE_KERNEL __pgprot(0) /* these mean nothing to NO_MM */
> #define pgprot_noncached(prot) (prot)
> +#define pgprot_writecombine pgprot_noncached

This looks fishy as blackfin's pgtable.h already includes asm-generic/pgtable.h.
So, copy&pasting pgprot_writecombine shouldn't be needed.

--
Thanks,
//richard

2015-04-04 22:02:15

by Chen Gang

[permalink] [raw]
Subject: Re: [PATCH] blackfin: include: asm: pgtable: Define dummy pgprot_writecombine

On 4/4/15 06:50, Richard Weinberger wrote:
> On Fri, Apr 3, 2015 at 10:36 PM, Chen Gang <[email protected]> wrote:
>> It is copied from asm-generic, the related error with allmodconfig:
>>
>> CC [M] sound/core/pcm_native.o
>> sound/core/pcm_native.c: In function 'snd_pcm_lib_default_mmap':
>> sound/core/pcm_native.c:3387:24: error: implicit declaration of function 'pgprot_writecombine' [-Werror=implicit-function-declaration]
>> area->vm_page_prot = pgprot_writecombine(area->vm_page_prot);
>> ^
>> sound/core/pcm_native.c:3387:22: error: incompatible types when assigning to type 'pgprot_t {aka struct <anonymous>}' from type 'int'
>> area->vm_page_prot = pgprot_writecombine(area->vm_page_prot);
>> ^
>>
>> Signed-off-by: Chen Gang <[email protected]>
>> ---
>> arch/blackfin/include/asm/pgtable.h | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/arch/blackfin/include/asm/pgtable.h b/arch/blackfin/include/asm/pgtable.h
>> index b88a155..3e730d9 100644
>> --- a/arch/blackfin/include/asm/pgtable.h
>> +++ b/arch/blackfin/include/asm/pgtable.h
>> @@ -36,6 +36,7 @@ typedef pte_t *pte_addr_t;
>> #define PAGE_READONLY __pgprot(0) /* these mean nothing to NO_MM */
>> #define PAGE_KERNEL __pgprot(0) /* these mean nothing to NO_MM */
>> #define pgprot_noncached(prot) (prot)
>> +#define pgprot_writecombine pgprot_noncached
>
> This looks fishy as blackfin's pgtable.h already includes asm-generic/pgtable.h.
> So, copy&pasting pgprot_writecombine shouldn't be needed.
>

pgprot_writecombine in asm-generic/pgtable.h needs MMU, but allmodconfig
for blackfin is NOMMU.

So, I still suggest to add dummy one in blackfin (although for me, asm-
generic/pgtable.h may need improvement -- welcome other members for it).


Thanks.
--
Chen Gang

Open, share, and attitude like air, water, and life which God blessed

2015-04-04 22:04:35

by Richard Weinberger

[permalink] [raw]
Subject: Re: [PATCH] blackfin: include: asm: pgtable: Define dummy pgprot_writecombine

Am 05.04.2015 um 00:02 schrieb Chen Gang:
> On 4/4/15 06:50, Richard Weinberger wrote:
>> On Fri, Apr 3, 2015 at 10:36 PM, Chen Gang <[email protected]> wrote:
>>> It is copied from asm-generic, the related error with allmodconfig:
>>>
>>> CC [M] sound/core/pcm_native.o
>>> sound/core/pcm_native.c: In function 'snd_pcm_lib_default_mmap':
>>> sound/core/pcm_native.c:3387:24: error: implicit declaration of function 'pgprot_writecombine' [-Werror=implicit-function-declaration]
>>> area->vm_page_prot = pgprot_writecombine(area->vm_page_prot);
>>> ^
>>> sound/core/pcm_native.c:3387:22: error: incompatible types when assigning to type 'pgprot_t {aka struct <anonymous>}' from type 'int'
>>> area->vm_page_prot = pgprot_writecombine(area->vm_page_prot);
>>> ^
>>>
>>> Signed-off-by: Chen Gang <[email protected]>
>>> ---
>>> arch/blackfin/include/asm/pgtable.h | 1 +
>>> 1 file changed, 1 insertion(+)
>>>
>>> diff --git a/arch/blackfin/include/asm/pgtable.h b/arch/blackfin/include/asm/pgtable.h
>>> index b88a155..3e730d9 100644
>>> --- a/arch/blackfin/include/asm/pgtable.h
>>> +++ b/arch/blackfin/include/asm/pgtable.h
>>> @@ -36,6 +36,7 @@ typedef pte_t *pte_addr_t;
>>> #define PAGE_READONLY __pgprot(0) /* these mean nothing to NO_MM */
>>> #define PAGE_KERNEL __pgprot(0) /* these mean nothing to NO_MM */
>>> #define pgprot_noncached(prot) (prot)
>>> +#define pgprot_writecombine pgprot_noncached
>>
>> This looks fishy as blackfin's pgtable.h already includes asm-generic/pgtable.h.
>> So, copy&pasting pgprot_writecombine shouldn't be needed.
>>
>
> pgprot_writecombine in asm-generic/pgtable.h needs MMU, but allmodconfig
> for blackfin is NOMMU.
>
> So, I still suggest to add dummy one in blackfin (although for me, asm-
> generic/pgtable.h may need improvement -- welcome other members for it).

Sounds still fishy as you "introduced" allmodconfig...

Thanks,
//richard

2015-04-04 22:55:09

by Chen Gang

[permalink] [raw]
Subject: Re: [PATCH] blackfin: include: asm: pgtable: Define dummy pgprot_writecombine

On 4/5/15 06:04, Richard Weinberger wrote:
> Am 05.04.2015 um 00:02 schrieb Chen Gang:
>> On 4/4/15 06:50, Richard Weinberger wrote:
>>> This looks fishy as blackfin's pgtable.h already includes asm-generic/pgtable.h.
>>> So, copy&pasting pgprot_writecombine shouldn't be needed.
>>>
>>
>> pgprot_writecombine in asm-generic/pgtable.h needs MMU, but allmodconfig
>> for blackfin is NOMMU.
>>
>> So, I still suggest to add dummy one in blackfin (although for me, asm-
>> generic/pgtable.h may need improvement -- welcome other members for it).
>
> Sounds still fishy as you "introduced" allmodconfig...
>

The related allmodconfig config file is in attchment, at least we can
treate it as a random config -- put it as .config to root source code,
then make menuconfig and exit, .config has no changes in next-20150401.

It can still generate this issue (after bypass gcc issues):


Thanks.
--
Chen Gang

Open, share, and attitude like air, water, and life which God blessed


Attachments:
config_gchen (136.98 kB)