All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] memblock: Anonotate memblock_is_reserved() with __init_memblock.
@ 2018-12-03  4:00 Yueyi Li
  2018-12-03  9:09 ` Michal Hocko
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Yueyi Li @ 2018-12-03  4:00 UTC (permalink / raw)
  To: akpm, mhocko; +Cc: linux-mm, linux-kernel

Found warning:

WARNING: EXPORT symbol "gsi_write_channel_scratch" [vmlinux] version generation failed, symbol will not be versioned.
WARNING: vmlinux.o(.text+0x1e0a0): Section mismatch in reference from the function valid_phys_addr_range() to the function .init.text:memblock_is_reserved()
The function valid_phys_addr_range() references
the function __init memblock_is_reserved().
This is often because valid_phys_addr_range lacks a __init
annotation or the annotation of memblock_is_reserved is wrong.

Use __init_memblock instead of __init.

Signed-off-by: liyueyi <liyueyi@live.com>
---

 Changes v2: correct typo in 'warning'.

 mm/memblock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/memblock.c b/mm/memblock.c
index 9a2d5ae..81ae63c 100644
--- a/mm/memblock.c
+++ b/mm/memblock.c
@@ -1727,7 +1727,7 @@ static int __init_memblock memblock_search(struct memblock_type *type, phys_addr
 	return -1;
 }
 
-bool __init memblock_is_reserved(phys_addr_t addr)
+bool __init_memblock memblock_is_reserved(phys_addr_t addr)
 {
 	return memblock_search(&memblock.reserved, addr) != -1;
 }
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] memblock: Anonotate memblock_is_reserved() with __init_memblock.
  2018-12-03  4:00 [PATCH v2] memblock: Anonotate memblock_is_reserved() with __init_memblock Yueyi Li
@ 2018-12-03  9:09 ` Michal Hocko
  2018-12-03 11:09 ` David Hildenbrand
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Michal Hocko @ 2018-12-03  9:09 UTC (permalink / raw)
  To: Yueyi Li; +Cc: akpm, linux-mm, linux-kernel

On Mon 03-12-18 04:00:08, Yueyi Li wrote:
> Found warning:
> 
> WARNING: EXPORT symbol "gsi_write_channel_scratch" [vmlinux] version generation failed, symbol will not be versioned.
> WARNING: vmlinux.o(.text+0x1e0a0): Section mismatch in reference from the function valid_phys_addr_range() to the function .init.text:memblock_is_reserved()
> The function valid_phys_addr_range() references
> the function __init memblock_is_reserved().
> This is often because valid_phys_addr_range lacks a __init
> annotation or the annotation of memblock_is_reserved is wrong.
> 
> Use __init_memblock instead of __init.

Yes, it really doesn't make much sense to stand this out of all other
helpers.

> Signed-off-by: liyueyi <liyueyi@live.com>

Acked-by: Michal Hocko <mhocko@suse.com>

> ---
> 
>  Changes v2: correct typo in 'warning'.
> 
>  mm/memblock.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/memblock.c b/mm/memblock.c
> index 9a2d5ae..81ae63c 100644
> --- a/mm/memblock.c
> +++ b/mm/memblock.c
> @@ -1727,7 +1727,7 @@ static int __init_memblock memblock_search(struct memblock_type *type, phys_addr
>  	return -1;
>  }
>  
> -bool __init memblock_is_reserved(phys_addr_t addr)
> +bool __init_memblock memblock_is_reserved(phys_addr_t addr)
>  {
>  	return memblock_search(&memblock.reserved, addr) != -1;
>  }
> -- 
> 2.7.4
> 

-- 
Michal Hocko
SUSE Labs

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] memblock: Anonotate memblock_is_reserved() with __init_memblock.
  2018-12-03  4:00 [PATCH v2] memblock: Anonotate memblock_is_reserved() with __init_memblock Yueyi Li
  2018-12-03  9:09 ` Michal Hocko
@ 2018-12-03 11:09 ` David Hildenbrand
  2018-12-03 17:46 ` Mike Rapoport
  2018-12-04  3:04 ` Wei Yang
  3 siblings, 0 replies; 7+ messages in thread
From: David Hildenbrand @ 2018-12-03 11:09 UTC (permalink / raw)
  To: Yueyi Li, akpm, mhocko; +Cc: linux-mm, linux-kernel

On 03.12.18 05:00, Yueyi Li wrote:
> Found warning:
> 
> WARNING: EXPORT symbol "gsi_write_channel_scratch" [vmlinux] version generation failed, symbol will not be versioned.
> WARNING: vmlinux.o(.text+0x1e0a0): Section mismatch in reference from the function valid_phys_addr_range() to the function .init.text:memblock_is_reserved()
> The function valid_phys_addr_range() references
> the function __init memblock_is_reserved().
> This is often because valid_phys_addr_range lacks a __init
> annotation or the annotation of memblock_is_reserved is wrong.
> 
> Use __init_memblock instead of __init.
> 
> Signed-off-by: liyueyi <liyueyi@live.com>
> ---
> 
>  Changes v2: correct typo in 'warning'.
> 
>  mm/memblock.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/memblock.c b/mm/memblock.c
> index 9a2d5ae..81ae63c 100644
> --- a/mm/memblock.c
> +++ b/mm/memblock.c
> @@ -1727,7 +1727,7 @@ static int __init_memblock memblock_search(struct memblock_type *type, phys_addr
>  	return -1;
>  }
>  
> -bool __init memblock_is_reserved(phys_addr_t addr)
> +bool __init_memblock memblock_is_reserved(phys_addr_t addr)
>  {
>  	return memblock_search(&memblock.reserved, addr) != -1;
>  }
> 

Reviewed-by: David Hildenbrand <david@redhat.com>

-- 

Thanks,

David / dhildenb

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] memblock: Anonotate memblock_is_reserved() with __init_memblock.
  2018-12-03  4:00 [PATCH v2] memblock: Anonotate memblock_is_reserved() with __init_memblock Yueyi Li
  2018-12-03  9:09 ` Michal Hocko
  2018-12-03 11:09 ` David Hildenbrand
@ 2018-12-03 17:46 ` Mike Rapoport
  2018-12-04  3:04 ` Wei Yang
  3 siblings, 0 replies; 7+ messages in thread
From: Mike Rapoport @ 2018-12-03 17:46 UTC (permalink / raw)
  To: Yueyi Li; +Cc: akpm, mhocko, linux-mm, linux-kernel

On Mon, Dec 03, 2018 at 04:00:08AM +0000, Yueyi Li wrote:
> Found warning:
> 
> WARNING: EXPORT symbol "gsi_write_channel_scratch" [vmlinux] version generation failed, symbol will not be versioned.
> WARNING: vmlinux.o(.text+0x1e0a0): Section mismatch in reference from the function valid_phys_addr_range() to the function .init.text:memblock_is_reserved()
> The function valid_phys_addr_range() references
> the function __init memblock_is_reserved().
> This is often because valid_phys_addr_range lacks a __init
> annotation or the annotation of memblock_is_reserved is wrong.
> 
> Use __init_memblock instead of __init.
> 
> Signed-off-by: liyueyi <liyueyi@live.com>

Acked-by: Mike Rapoport <rppt@linux.ibm.com>

> ---
> 
>  Changes v2: correct typo in 'warning'.
> 
>  mm/memblock.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/memblock.c b/mm/memblock.c
> index 9a2d5ae..81ae63c 100644
> --- a/mm/memblock.c
> +++ b/mm/memblock.c
> @@ -1727,7 +1727,7 @@ static int __init_memblock memblock_search(struct memblock_type *type, phys_addr
>  	return -1;
>  }
>  
> -bool __init memblock_is_reserved(phys_addr_t addr)
> +bool __init_memblock memblock_is_reserved(phys_addr_t addr)
>  {
>  	return memblock_search(&memblock.reserved, addr) != -1;
>  }
> -- 
> 2.7.4
> 

-- 
Sincerely yours,
Mike.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] memblock: Anonotate memblock_is_reserved() with __init_memblock.
  2018-12-03  4:00 [PATCH v2] memblock: Anonotate memblock_is_reserved() with __init_memblock Yueyi Li
                   ` (2 preceding siblings ...)
  2018-12-03 17:46 ` Mike Rapoport
@ 2018-12-04  3:04 ` Wei Yang
  2018-12-05  5:37   ` Yueyi Li
  3 siblings, 1 reply; 7+ messages in thread
From: Wei Yang @ 2018-12-04  3:04 UTC (permalink / raw)
  To: Yueyi Li; +Cc: akpm, mhocko, linux-mm, linux-kernel

On Mon, Dec 03, 2018 at 04:00:08AM +0000, Yueyi Li wrote:
>Found warning:
>
>WARNING: EXPORT symbol "gsi_write_channel_scratch" [vmlinux] version generation failed, symbol will not be versioned.
>WARNING: vmlinux.o(.text+0x1e0a0): Section mismatch in reference from the function valid_phys_addr_range() to the function .init.text:memblock_is_reserved()
>The function valid_phys_addr_range() references
>the function __init memblock_is_reserved().
>This is often because valid_phys_addr_range lacks a __init
>annotation or the annotation of memblock_is_reserved is wrong.
>
>Use __init_memblock instead of __init.

Not familiar with this error, the change looks good to me while have
some questions.

1. I don't see valid_phys_addr_range() reference memblock_is_reserved().
   This is in which file or arch?
2. In case a function reference memblock_is_reserved(), should it has
   the annotation of __init_memblock too? Or just __init is ok? If my
   understanding is correct, annotation __init is ok. Well, I don't see
   valid_phys_addr_range() has an annotation.
3. The only valid_phys_addr_range() reference some memblock function is
   the one in arch/arm64/mm/mmap.c. Do we suppose to add an annotation to
   this?

>
>Signed-off-by: liyueyi <liyueyi@live.com>
>---
>
> Changes v2: correct typo in 'warning'.
>
> mm/memblock.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/mm/memblock.c b/mm/memblock.c
>index 9a2d5ae..81ae63c 100644
>--- a/mm/memblock.c
>+++ b/mm/memblock.c
>@@ -1727,7 +1727,7 @@ static int __init_memblock memblock_search(struct memblock_type *type, phys_addr
> 	return -1;
> }
> 
>-bool __init memblock_is_reserved(phys_addr_t addr)
>+bool __init_memblock memblock_is_reserved(phys_addr_t addr)
> {
> 	return memblock_search(&memblock.reserved, addr) != -1;
> }
>-- 
>2.7.4

-- 
Wei Yang
Help you, Help me

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] memblock: Anonotate memblock_is_reserved() with __init_memblock.
  2018-12-04  3:04 ` Wei Yang
@ 2018-12-05  5:37   ` Yueyi Li
  2018-12-05  6:59     ` Wei Yang
  0 siblings, 1 reply; 7+ messages in thread
From: Yueyi Li @ 2018-12-05  5:37 UTC (permalink / raw)
  To: Wei Yang; +Cc: akpm, mhocko, linux-mm, linux-kernel


On 2018/12/4 11:04, Wei Yang wrote:
> On Mon, Dec 03, 2018 at 04:00:08AM +0000, Yueyi Li wrote:
>> Found warning:
>>
>> WARNING: EXPORT symbol "gsi_write_channel_scratch" [vmlinux] version generation failed, symbol will not be versioned.
>> WARNING: vmlinux.o(.text+0x1e0a0): Section mismatch in reference from the function valid_phys_addr_range() to the function .init.text:memblock_is_reserved()
>> The function valid_phys_addr_range() references
>> the function __init memblock_is_reserved().
>> This is often because valid_phys_addr_range lacks a __init
>> annotation or the annotation of memblock_is_reserved is wrong.
>>
>> Use __init_memblock instead of __init.
> Not familiar with this error, the change looks good to me while have
> some questions.
>
> 1. I don't see valid_phys_addr_range() reference memblock_is_reserved().
>     This is in which file or arch?

Yes,  I modified valid_phys_addr_range() for some other debugging.

> 2. In case a function reference memblock_is_reserved(), should it has
>     the annotation of __init_memblock too? Or just __init is ok? If my
>     understanding is correct, annotation __init is ok. Well, I don't see
>     valid_phys_addr_range() has an annotation.
> 3. The only valid_phys_addr_range() reference some memblock function is
>     the one in arch/arm64/mm/mmap.c. Do we suppose to add an annotation to
>     this?

Actually, __init_memblock is null in arch arm64, this warning is due to
CONFIG_DEBUG_SECTION_MISMATCH enabled,  the help text in lib/Kconfig.debug.



Thanks,
Yueyi

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] memblock: Anonotate memblock_is_reserved() with __init_memblock.
  2018-12-05  5:37   ` Yueyi Li
@ 2018-12-05  6:59     ` Wei Yang
  0 siblings, 0 replies; 7+ messages in thread
From: Wei Yang @ 2018-12-05  6:59 UTC (permalink / raw)
  To: Yueyi Li; +Cc: Wei Yang, akpm, mhocko, linux-mm, linux-kernel

On Wed, Dec 05, 2018 at 05:37:37AM +0000, Yueyi Li wrote:
>
>On 2018/12/4 11:04, Wei Yang wrote:
>> On Mon, Dec 03, 2018 at 04:00:08AM +0000, Yueyi Li wrote:
>>> Found warning:
>>>
>>> WARNING: EXPORT symbol "gsi_write_channel_scratch" [vmlinux] version generation failed, symbol will not be versioned.
>>> WARNING: vmlinux.o(.text+0x1e0a0): Section mismatch in reference from the function valid_phys_addr_range() to the function .init.text:memblock_is_reserved()
>>> The function valid_phys_addr_range() references
>>> the function __init memblock_is_reserved().
>>> This is often because valid_phys_addr_range lacks a __init
>>> annotation or the annotation of memblock_is_reserved is wrong.
>>>
>>> Use __init_memblock instead of __init.
>> Not familiar with this error, the change looks good to me while have
>> some questions.
>>
>> 1. I don't see valid_phys_addr_range() reference memblock_is_reserved().
>>     This is in which file or arch?
>
>Yes,  I modified valid_phys_addr_range() for some other debugging.
>
>> 2. In case a function reference memblock_is_reserved(), should it has
>>     the annotation of __init_memblock too? Or just __init is ok? If my
>>     understanding is correct, annotation __init is ok. Well, I don't see
>>     valid_phys_addr_range() has an annotation.
>> 3. The only valid_phys_addr_range() reference some memblock function is
>>     the one in arch/arm64/mm/mmap.c. Do we suppose to add an annotation to
>>     this?
>
>Actually, __init_memblock is null in arch arm64, this warning is due to
>CONFIG_DEBUG_SECTION_MISMATCH enabled,  the help text in lib/Kconfig.debug.
>

Ok, thanks.

>
>
>Thanks,
>Yueyi

-- 
Wei Yang
Help you, Help me

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-12-05  6:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-03  4:00 [PATCH v2] memblock: Anonotate memblock_is_reserved() with __init_memblock Yueyi Li
2018-12-03  9:09 ` Michal Hocko
2018-12-03 11:09 ` David Hildenbrand
2018-12-03 17:46 ` Mike Rapoport
2018-12-04  3:04 ` Wei Yang
2018-12-05  5:37   ` Yueyi Li
2018-12-05  6:59     ` Wei Yang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.