Skip to contentSkip to conversation

mm: MEMTEST depends on MEMBLOCK

PATCH In review Guenter Roeck 6 participants 9 messages Mar 13, 2015 – Mar 20, 2015 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mm: MEMTEST depends on MEMBLOCK

Building alpha:allmodconfig fails with

mm/memtest.c: In function 'reserve_bad_mem':
mm/memtest.c:38:2: error: implicit declaration of function 'memblock_reserve' mm/memtest.c: In function 'do_one_pass':
mm/memtest.c:77:2: error: implicit declaration of function 'for_each_free_mem_range' mm/memtest.c:77:73: error: expected ';' before '{' token

because it depends on MEMBLOCK which is not defined for the alpha architecture.

Fixes 420c89e6185d ("mm: move memtest under mm")
Cc Vladimir Murzin <[email protected]>
---
 lib/Kconfig.debug | 1 +
 1 file changed, 1 insertion(+)
lib/Kconfig.debug +1 -0
index 8b4e69a..dc1e69c 100644
@@ -1797,6 +1797,7 @@ config TEST_UDELAY
 
 config MEMTEST
 	bool "Memtest"
+	depends on MEMBLOCK
 	---help---
 	  This option adds a kernel parameter 'memtest', which allows memtest
 	  to be set.
Signature · 1 line
2.1.0
Acked-by on v1 1/1
#1 lore raw
Quoted 24 lines · Guenter Roeck

Building alpha:allmodconfig fails with

mm/memtest.c: In function 'reserve_bad_mem':
mm/memtest.c:38:2: error: implicit declaration of function 'memblock_reserve' mm/memtest.c: In function 'do_one_pass':
mm/memtest.c:77:2: error: implicit declaration of function 'for_each_free_mem_range' mm/memtest.c:77:73: error: expected ';' before '{' token

because it depends on MEMBLOCK which is not defined for the alpha architecture.

Fixes 420c89e6185d ("mm: move memtest under mm")
Cc Vladimir Murzin <[email protected]>
---
 lib/Kconfig.debug | 1 +
 1 file changed, 1 insertion(+)
lib/Kconfig.debug +0 -0
index 8b4e69a..dc1e69c 100644

lib/Kconfig.debug config TEST_UDELAY · line 1803

Quoted 7 lines
lib/Kconfig.debug +1 -0
@@ -1797,6 +1797,7 @@ config TEST_UDELAY
 
 config MEMTEST
 	bool "Memtest"
+	depends on MEMBLOCK
 	---help---
 	  This option adds a kernel parameter 'memtest', which allows memtest
 	  to be set.

Thanks for fixing it!

Cheers
Vladimir

Acked-by on v1 1/1
#2 lore raw
In reply to Guenter Roeck
Quoted 8 lines · Guenter Roeck

Building alpha:allmodconfig fails with

mm/memtest.c: In function 'reserve_bad_mem':
mm/memtest.c:38:2: error: implicit declaration of function 'memblock_reserve' mm/memtest.c: In function 'do_one_pass':
mm/memtest.c:77:2: error: implicit declaration of function 'for_each_free_mem_range' mm/memtest.c:77:73: error: expected ';' before '{' token

Quoted 6 lines

because it depends on MEMBLOCK which is not defined for the alpha architecture.

Fixes 420c89e6185d ("mm: move memtest under mm")
Cc Vladimir Murzin <[email protected]>

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#3 lore raw
In reply to Guenter Roeck
Quoted 23 lines · Guenter Roeck

Building alpha:allmodconfig fails with

mm/memtest.c: In function 'reserve_bad_mem':
mm/memtest.c:38:2: error: implicit declaration of function 'memblock_reserve' mm/memtest.c: In function 'do_one_pass':
mm/memtest.c:77:2: error: implicit declaration of function 'for_each_free_mem_range' mm/memtest.c:77:73: error: expected ';' before '{' token

because it depends on MEMBLOCK which is not defined for the alpha architecture.

Fixes 420c89e6185d ("mm: move memtest under mm")
Cc Vladimir Murzin <[email protected]>
---
 lib/Kconfig.debug | 1 +
 1 file changed, 1 insertion(+)
lib/Kconfig.debug +0 -0
index 8b4e69a..dc1e69c 100644

lib/Kconfig.debug config TEST_UDELAY · line 1803

Quoted 7 lines
lib/Kconfig.debug +1 -0
@@ -1797,6 +1797,7 @@ config TEST_UDELAY
 
 config MEMTEST
 	bool "Memtest"
+	depends on MEMBLOCK
 	---help---
 	  This option adds a kernel parameter 'memtest', which allows memtest
 	  to be set.

(There's now a bot checking this stuff, but I couldn't resist reporting it when my script spotted it.)

Please do

    $ git grep -n "config\s\+MEMBLOCK\b" next-20150320
    $ git grep -n "config\s\+MEMBLOCK\b" v4.0-rc4

I think this patch simply disables MEMTEST altogether. I'm guessing this should have added
depends on HAVE_MEMBLOCK

Paul Bolle

#4 lore raw
Quoted 35 lines · Paul Bolle
Quoted 23 lines · Guenter Roeck

Building alpha:allmodconfig fails with

mm/memtest.c: In function 'reserve_bad_mem':
mm/memtest.c:38:2: error: implicit declaration of function 'memblock_reserve' mm/memtest.c: In function 'do_one_pass':
mm/memtest.c:77:2: error: implicit declaration of function 'for_each_free_mem_range' mm/memtest.c:77:73: error: expected ';' before '{' token

because it depends on MEMBLOCK which is not defined for the alpha architecture.

Fixes 420c89e6185d ("mm: move memtest under mm")
Cc Vladimir Murzin <[email protected]>
---
 lib/Kconfig.debug | 1 +
 1 file changed, 1 insertion(+)
lib/Kconfig.debug +0 -0
index 8b4e69a..dc1e69c 100644

lib/Kconfig.debug config TEST_UDELAY · line 1803

Quoted 7 lines
lib/Kconfig.debug +1 -0
@@ -1797,6 +1797,7 @@ config TEST_UDELAY
 
 config MEMTEST
 	bool "Memtest"
+	depends on MEMBLOCK
 	---help---
 	  This option adds a kernel parameter 'memtest', which allows memtest
 	  to be set.

(There's now a bot checking this stuff, but I couldn't resist reporting it when my script spotted it.)

Quoted 5 lines

Please do

    $ git grep -n "config\s\+MEMBLOCK\b" next-20150320
    $ git grep -n "config\s\+MEMBLOCK\b" v4.0-rc4

I think this patch simply disables MEMTEST altogether. I'm guessing this

I should have tested it before... yes, you (and bot) are right, after patch applied memtest is not available at arm/arm64 which definitely has memblock.

Quoted 3 lines

should have added
depends on HAVE_MEMBLOCK

Could we fold this change or separate patch is needed?

Cheers
Vladimir

Quoted 4 lines

Paul Bolle

#5 lore raw
Quoted 1 line · Vladimir Murzin

I should have tested it before...

Valentin proposed an update to scripts/checkkconfigsymbols.py in
https://lkml.org/lkml/2015/3/16/190 . It (or something like it) should have helped testing for typos like that:

    python scripts/checkkconfigsymbols.py --commit b47818820b392273da5470975a29aca4cba92cb4
    MEMBLOCK	lib/Kconfig.debug

Which is actually rather cool!

Valentin, what's the status of that update?

Paul Bolle

#6 lore raw
Quoted 6 lines · Paul Bolle
Quoted 1 line · Vladimir Murzin

I should have tested it before...

Valentin proposed an update to scripts/checkkconfigsymbols.py in
https://lkml.org/lkml/2015/3/16/190 . It (or something like it) should have helped testing for typos like that:

Quoted 6 lines
    python scripts/checkkconfigsymbols.py --commit b47818820b392273da5470975a29aca4cba92cb4
    MEMBLOCK    lib/Kconfig.debug

Which is actually rather cool!

Valentin, what's the status of that update?

Greg applied it to his misc tree, so it should arrive very soon in linux-next.

Kind regards,
Valentin

#7 lore raw
In reply to Paul Bolle

Would it be reasonable to add an entry (or expand entry 8) in Documentation/SubmitChecklist to point to the script? "If your patch has changed conditions in Kconfig, run "python scripts/checkkconfigsymbols.py --commit $your_commit"" ?

2015-03-20 11:52 GMT+01:00 Paul Bolle <[email protected]>:

Quoted 16 lines · Vladimir Murzin
Quoted 1 line

I should have tested it before...

Valentin proposed an update to scripts/checkkconfigsymbols.py in
https://lkml.org/lkml/2015/3/16/190 . It (or something like it) should have helped testing for typos like that:

    python scripts/checkkconfigsymbols.py --commit b47818820b392273da5470975a29aca4cba92cb4
    MEMBLOCK    lib/Kconfig.debug

Which is actually rather cool!

Valentin, what's the status of that update?

Paul Bolle

#8 lore raw
Quoted 7 lines · Stefan Hengelein

2015-03-20 11:52 GMT+01:00 Paul Bolle <[email protected]>:

Quoted 6 lines

Valentin proposed an update to scripts/checkkconfigsymbols.py in
https://lkml.org/lkml/2015/3/16/190 . It (or something like it) should have helped testing for typos like that:

    python scripts/checkkconfigsymbols.py --commit b47818820b392273da5470975a29aca4cba92cb4
    MEMBLOCK    lib/Kconfig.debug
Quoted 6 lines
Quoted 2 lines

Which is actually rather cool!

Would it be reasonable to add an entry (or expand entry 8) in Documentation/SubmitChecklist to point to the script? "If your patch has changed conditions in Kconfig, run "python scripts/checkkconfigsymbols.py --commit $your_commit"" ?

That's not for me to decide. However, I would suggest you wait a bit before adding it to that list (or any other piece of Documentation). Just to be sure it works for most people.

Once that update has hit linux-next, you can point patch authors to it every time the bot finds something the script would have caught too. That should enlarge the pool of users. And, as complaints tend to be voiced loud and clear, that in turn should help shake out any bugs or ill considered features.

Paul Bolle