Skip to contentSkip to conversation

Possible regression in next-20150323 due to "ARM, arm64: kvm: get rid of the bounce page"

PATCH In review Simon Horman 15 participants 39 messages Mar 24, 2015 – Apr 8, 2015

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

Hi Ard,

I have observe what appears to be a build regression in next-20150323 caused by 06f75a1f62000 ("ARM, arm64: kvm: get rid of the bounce page").

# make
...
arm-unknown-linux-gnueabi-ld:./arch/arm/kernel/vmlinux.lds:546: syntax error

I have observed this using the cross-compiler that is available on kernel.org:

https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.6.3/

# arm-unknown-linux-gnueabi-gcc --version
arm-unknown-linux-gnueabi-gcc (GCC) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# arm-unknown-linux-gnueabi-ld --version
GNU ld (GNU Binutils) 2.22
Copyright 2011 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
#1 lore raw

Hi Simon,

Quoted 19 lines · Simon Horman

Hi Ard,

I have observe what appears to be a build regression in next-20150323 caused by 06f75a1f62000 ("ARM, arm64: kvm: get rid of the bounce page").

# make
...
arm-unknown-linux-gnueabi-ld:./arch/arm/kernel/vmlinux.lds:546: syntax error

I have observed this using the cross-compiler that is available on kernel.org:

https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.6.3/

# arm-unknown-linux-gnueabi-gcc --version
arm-unknown-linux-gnueabi-gcc (GCC) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Quoted 6 lines
# arm-unknown-linux-gnueabi-ld --version
GNU ld (GNU Binutils) 2.22
Copyright 2011 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.

I've also ran into this issue here[1], and can confirm that patch causes problems with gcc 4.6 and gcc 4.7.

Quoted 6 lines

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

[1] http://lists.linaro.org/pipermail/kernel-build-reports/2015-March/007884.html

#2 lore raw
Quoted 34 lines · Tyler Baker

Hi Simon,

Quoted 19 lines · Simon Horman

Hi Ard,

I have observe what appears to be a build regression in next-20150323 caused by 06f75a1f62000 ("ARM, arm64: kvm: get rid of the bounce page").

# make
...
arm-unknown-linux-gnueabi-ld:./arch/arm/kernel/vmlinux.lds:546: syntax error

I have observed this using the cross-compiler that is available on kernel.org:

https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.6.3/

# arm-unknown-linux-gnueabi-gcc --version
arm-unknown-linux-gnueabi-gcc (GCC) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Quoted 6 lines
# arm-unknown-linux-gnueabi-ld --version
GNU ld (GNU Binutils) 2.22
Copyright 2011 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.

I've also ran into this issue here[1], and can confirm that patch causes problems with gcc 4.6 and gcc 4.7.

Quoted 2 lines
Quoted 7 lines
Quoted 4 lines

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

[1] http://lists.linaro.org/pipermail/kernel-build-reports/2015-March/007884.html

Copy and paste error. Here is the correct link[1]

[1] http://lists.linaro.org/pipermail/kernel-build-reports/2015-March/008183.html

#3 lore raw
In reply to Simon Horman
Quoted 19 lines · Simon Horman

Hi Ard,

I have observe what appears to be a build regression in next-20150323 caused by 06f75a1f62000 ("ARM, arm64: kvm: get rid of the bounce page").

# make
...
arm-unknown-linux-gnueabi-ld:./arch/arm/kernel/vmlinux.lds:546: syntax error

I have observed this using the cross-compiler that is available on kernel.org:

https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.6.3/

# arm-unknown-linux-gnueabi-gcc --version
arm-unknown-linux-gnueabi-gcc (GCC) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Quoted 7 lines
# arm-unknown-linux-gnueabi-ld --version
GNU ld (GNU Binutils) 2.22
Copyright 2011 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.

Hi all,

This is fixed now in next-20150324.
Sorry for the trouble

Signature · 1 line
Ard.
#4 lore raw
Quoted 28 lines · Ard Biesheuvel
Quoted 19 lines · Simon Horman

Hi Ard,

I have observe what appears to be a build regression in next-20150323 caused by 06f75a1f62000 ("ARM, arm64: kvm: get rid of the bounce page").

# make
...
arm-unknown-linux-gnueabi-ld:./arch/arm/kernel/vmlinux.lds:546: syntax error

I have observed this using the cross-compiler that is available on kernel.org:

https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.6.3/

# arm-unknown-linux-gnueabi-gcc --version
arm-unknown-linux-gnueabi-gcc (GCC) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Quoted 7 lines
# arm-unknown-linux-gnueabi-ld --version
GNU ld (GNU Binutils) 2.22
Copyright 2011 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
Quoted 4 lines

Hi all,

This is fixed now in next-20150324.
Sorry for the trouble

I think we now have a new error: (seen with omap2plus_defconfig) on next-20150324 :
./arch/arm/kernel/vmlinux.lds:677: undefined symbol `__hyp_idmap_size' referenced in expression
make: *** [vmlinux] Error 1

cross compiler (from ubuntu 12.04):

$ arm-linux-gnueabi-ld --version
GNU ld (GNU Binutils for Ubuntu) 2.22
Copyright 2011 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
$ arm-linux-gnueabi-gcc --version
arm-linux-gnueabi-gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

next-20150320 was the last kernel which was successfully built

Signature · 2 lines
Regards,
Nishanth Menon
#5 lore raw

PATCH 1/1 gpio: syscon: reduce message level when direction reg offset not in dt

From: Grygorii Strashko <[email protected]>

Now GPIO syscon driver produces bunch of warnings during the
boot of Kesytone 2 SoCs:
gpio-syscon soc:keystone_dsp_gpio@02620240: can't read the dir register offset! gpio-syscon soc:keystone_dsp_gpio@2620244: can't read the dir register offset!

This message unintentionally was added using dev_err(), but its actual log level is debug, because third cell of "ti,syscon-dev" is optional.

Hence change it to dev_dbg() as it should be.

This patch fixes commit:
5a3e3f8 ("gpio: syscon: retriave syscon node and regs offsets from dt")

---
 drivers/gpio/gpio-syscon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/gpio-syscon.c +1 -1
index 257e298..045a952 100644
@@ -219,7 +219,7 @@ static int syscon_gpio_probe(struct platform_device *pdev)
 		ret = of_property_read_u32_index(np, "gpio,syscon-dev", 2,
 						 &priv->dir_reg_offset);
 		if (ret)
-			dev_err(dev, "can't read the dir register offset!\n");
+			dev_dbg(dev, "can't read the dir register offset!\n");
 
 		priv->dir_reg_offset <<= 3;
 	}
Signature · 1 line
1.9.1
Tested-by on v1 1/1
#6 lore raw

Re: [PATCH] gpio: syscon: reduce message level when direction reg offset not in dt

Quoted 27 lines · On 03/24/2015 02:42 PM, [email protected] wrote:

From: Grygorii Strashko<[email protected]>

Now GPIO syscon driver produces bunch of warnings during the
boot of Kesytone 2 SoCs:
gpio-syscon soc:keystone_dsp_gpio@02620240: can't read the dir register offset! gpio-syscon soc:keystone_dsp_gpio@2620244: can't read the dir register offset!

This message unintentionally was added using dev_err(), but its actual log level is debug, because third cell of "ti,syscon-dev" is optional.

Hence change it to dev_dbg() as it should be.

This patch fixes commit:
5a3e3f8 ("gpio: syscon: retriave syscon node and regs offsets from dt")

---
  drivers/gpio/gpio-syscon.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/gpio-syscon.c +0 -0
index 257e298..045a952 100644

drivers/gpio/gpio-syscon.c static int syscon_gpio_probe(struct platform_device *pdev) · line 225

Quoted 8 lines
drivers/gpio/gpio-syscon.c +1 -1
@@ -219,7 +219,7 @@ static int syscon_gpio_probe(struct platform_device *pdev)
  		ret = of_property_read_u32_index(np, "gpio,syscon-dev", 2,
  						&priv->dir_reg_offset);
  		if (ret)
-			dev_err(dev, "can't read the dir register offset!\n");
+			dev_dbg(dev, "can't read the dir register offset!\n");
 
  		priv->dir_reg_offset<<= 3;
  	}

Tested this on K2HK EVM and found the error log is not appearing any more.

Signature · 2 lines
Murali Karicheri
Linux Kernel, Texas Instruments
Acked-by on v1 1/1
#7 lore raw

Re: [PATCH] gpio: syscon: reduce message level when direction reg offset not in dt

In reply to [email protected]
Quoted 11 lines · On 3/24/2015 11:42 AM, [email protected] wrote:

From: Grygorii Strashko <[email protected]>

Now GPIO syscon driver produces bunch of warnings during the
boot of Kesytone 2 SoCs:
gpio-syscon soc:keystone_dsp_gpio@02620240: can't read the dir register offset! gpio-syscon soc:keystone_dsp_gpio@2620244: can't read the dir register offset!

This message unintentionally was added using dev_err(), but its actual log level is debug, because third cell of "ti,syscon-dev" is optional.

Quoted 8 lines

Hence change it to dev_dbg() as it should be.

This patch fixes commit:
5a3e3f8 ("gpio: syscon: retriave syscon node and regs offsets from dt")

---

#9 lore raw
In reply to Nishanth Menon

Hi Nishanth,

Quoted 31 lines · Nishanth Menon
Quoted 30 lines · Ard Biesheuvel
Quoted 19 lines · Simon Horman

Hi Ard,

I have observe what appears to be a build regression in next-20150323 caused by 06f75a1f62000 ("ARM, arm64: kvm: get rid of the bounce page").

# make
...
arm-unknown-linux-gnueabi-ld:./arch/arm/kernel/vmlinux.lds:546: syntax error

I have observed this using the cross-compiler that is available on kernel.org:

https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.6.3/

# arm-unknown-linux-gnueabi-gcc --version
arm-unknown-linux-gnueabi-gcc (GCC) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Quoted 7 lines
# arm-unknown-linux-gnueabi-ld --version
GNU ld (GNU Binutils) 2.22
Copyright 2011 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.

Hi all,

Quoted 8 lines
Quoted 2 lines

This is fixed now in next-20150324.
Sorry for the trouble

I think we now have a new error: (seen with omap2plus_defconfig) on next-20150324 :
./arch/arm/kernel/vmlinux.lds:677: undefined symbol `__hyp_idmap_size' referenced in expression
make: *** [vmlinux] Error 1

Thanks, I am seeing that too.

My armchair suggestion is that the following should be reverted.

e60a1fec44a2f ("ARM: kvm: implement replacement for ld's LOG2CEIL()") 06f75a1f62000 ("ARM, arm64: kvm: get rid of the bounce page")

Quoted 13 lines

cross compiler (from ubuntu 12.04):

$ arm-linux-gnueabi-ld --version
GNU ld (GNU Binutils for Ubuntu) 2.22
Copyright 2011 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
$ arm-linux-gnueabi-gcc --version
arm-linux-gnueabi-gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Quoted 1 line

next-20150320 was the last kernel which was successfully built

I have also confirmed that.

#10 lore raw
Quoted 7 lines · Simon Horman
Quoted 5 lines · Nishanth Menon

I think we now have a new error: (seen with omap2plus_defconfig) on next-20150324 :
./arch/arm/kernel/vmlinux.lds:677: undefined symbol `__hyp_idmap_size' referenced in expression
make: *** [vmlinux] Error 1

Quoted 6 lines

Thanks, I am seeing that too.

My armchair suggestion is that the following should be reverted.

e60a1fec44a2f ("ARM: kvm: implement replacement for ld's LOG2CEIL()") 06f75a1f62000 ("ARM, arm64: kvm: get rid of the bounce page")

Can you try again with the latest -next please? We've merged an additional patch aimed at sorting this out. Reverting isn't really an option, as there's an awful lot of code that depends on the bounce page removal.

Will

#11 lore raw
Quoted 10 lines · Will Deacon
Quoted 9 lines · Simon Horman
Quoted 5 lines · Nishanth Menon

I think we now have a new error: (seen with omap2plus_defconfig) on next-20150324 :
./arch/arm/kernel/vmlinux.lds:677: undefined symbol `__hyp_idmap_size' referenced in expression
make: *** [vmlinux] Error 1

Thanks, I am seeing that too.

Quoted 8 lines
Quoted 4 lines

My armchair suggestion is that the following should be reverted.

e60a1fec44a2f ("ARM: kvm: implement replacement for ld's LOG2CEIL()") 06f75a1f62000 ("ARM, arm64: kvm: get rid of the bounce page")

Can you try again with the latest -next please? We've merged an additional patch aimed at sorting this out. Reverting isn't really an option, as there's an awful lot of code that depends on the bounce page removal.

Here are the kernelci.org -next results[1], if you click the build status you can dig down into the build failures. next-20150326 has now hit a compiler bug, Arnd mentioned he was looking into this issue.

Quoted 7 lines

Will

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

[1] http://kernelci.org/job/next/

Tyler

#12 lore raw
Quoted 16 lines · Tyler Baker
Quoted 15 lines · Will Deacon
Quoted 13 lines · Simon Horman
Quoted 5 lines · Nishanth Menon

I think we now have a new error: (seen with omap2plus_defconfig) on next-20150324 :
./arch/arm/kernel/vmlinux.lds:677: undefined symbol `__hyp_idmap_size' referenced in expression
make: *** [vmlinux] Error 1

Thanks, I am seeing that too.

My armchair suggestion is that the following should be reverted.

e60a1fec44a2f ("ARM: kvm: implement replacement for ld's LOG2CEIL()") 06f75a1f62000 ("ARM, arm64: kvm: get rid of the bounce page")

Quoted 7 lines
Quoted 3 lines

Can you try again with the latest -next please? We've merged an additional patch aimed at sorting this out. Reverting isn't really an option, as there's an awful lot of code that depends on the bounce page removal.

Here are the kernelci.org -next results[1], if you click the build status you can dig down into the build failures. next-20150326 has now hit a compiler bug, Arnd mentioned he was looking into this issue.

I have confirmed that next-20150326 does not compile without the following reverted:

12eb3e833961 ("ARM: kvm: assert on HYP section boundaries not actual code size") e60a1fec44a2 ("ARM: kvm: implement replacement for ld's LOG2CEIL()") 06f75a1f6200 ("ARM, arm64: kvm: get rid of the bounce page")

#13 lore raw
Quoted 25 lines · Simon Horman
Quoted 16 lines · Tyler Baker
Quoted 15 lines · Will Deacon
Quoted 13 lines · Simon Horman
Quoted 5 lines · Nishanth Menon

I think we now have a new error: (seen with omap2plus_defconfig) on next-20150324 :
./arch/arm/kernel/vmlinux.lds:677: undefined symbol `__hyp_idmap_size' referenced in expression
make: *** [vmlinux] Error 1

Thanks, I am seeing that too.

My armchair suggestion is that the following should be reverted.

e60a1fec44a2f ("ARM: kvm: implement replacement for ld's LOG2CEIL()") 06f75a1f62000 ("ARM, arm64: kvm: get rid of the bounce page")

Quoted 7 lines
Quoted 3 lines

Can you try again with the latest -next please? We've merged an additional patch aimed at sorting this out. Reverting isn't really an option, as there's an awful lot of code that depends on the bounce page removal.

Here are the kernelci.org -next results[1], if you click the build status you can dig down into the build failures. next-20150326 has now hit a compiler bug, Arnd mentioned he was looking into this issue.

Quoted 6 lines

I have confirmed that next-20150326 does not compile without the following reverted:

12eb3e833961 ("ARM: kvm: assert on HYP section boundaries not actual code size") e60a1fec44a2 ("ARM: kvm: implement replacement for ld's LOG2CEIL()") 06f75a1f6200 ("ARM, arm64: kvm: get rid of the bounce page")

Thanks for testing this and sorry for the continued breakage. Which toolchain did you say you were using? Ard has some more patches trying to fix this, but none of our toolchains seem to tickle the issue.

Will

#8 lore raw

Re: [PATCH] gpio: syscon: reduce message level when direction reg offset not in dt

In reply to [email protected]
Quoted 11 lines · On Tue, Mar 24, 2015 at 7:42 PM, <[email protected]> wrote:

From: Grygorii Strashko <[email protected]>

Now GPIO syscon driver produces bunch of warnings during the
boot of Kesytone 2 SoCs:
gpio-syscon soc:keystone_dsp_gpio@02620240: can't read the dir register offset! gpio-syscon soc:keystone_dsp_gpio@2620244: can't read the dir register offset!

This message unintentionally was added using dev_err(), but its actual log level is debug, because third cell of "ti,syscon-dev" is optional.

Quoted 7 lines

Hence change it to dev_dbg() as it should be.

This patch fixes commit:
5a3e3f8 ("gpio: syscon: retriave syscon node and regs offsets from dt")

OK sorry for missing this when asking about the strange messages. Patch applied for fixes with these test tags and ack.

Yours,
Linus Walleij

#14 lore raw
In reply to Will Deacon
Quoted 29 lines · Will Deacon
Quoted 28 lines · Simon Horman
Quoted 16 lines · Tyler Baker
Quoted 15 lines · Will Deacon
Quoted 13 lines · Simon Horman
Quoted 5 lines · Nishanth Menon

I think we now have a new error: (seen with omap2plus_defconfig) on next-20150324 :
./arch/arm/kernel/vmlinux.lds:677: undefined symbol `__hyp_idmap_size' referenced in expression
make: *** [vmlinux] Error 1

Thanks, I am seeing that too.

My armchair suggestion is that the following should be reverted.

e60a1fec44a2f ("ARM: kvm: implement replacement for ld's LOG2CEIL()") 06f75a1f62000 ("ARM, arm64: kvm: get rid of the bounce page")

Quoted 7 lines
Quoted 3 lines

Can you try again with the latest -next please? We've merged an additional patch aimed at sorting this out. Reverting isn't really an option, as there's an awful lot of code that depends on the bounce page removal.

Here are the kernelci.org -next results[1], if you click the build status you can dig down into the build failures. next-20150326 has now hit a compiler bug, Arnd mentioned he was looking into this issue.

I have confirmed that next-20150326 does not compile without the following reverted:

Quoted 7 lines
Quoted 3 lines

12eb3e833961 ("ARM: kvm: assert on HYP section boundaries not actual code size") e60a1fec44a2 ("ARM: kvm: implement replacement for ld's LOG2CEIL()") 06f75a1f6200 ("ARM, arm64: kvm: get rid of the bounce page")

Thanks for testing this and sorry for the continued breakage. Which toolchain did you say you were using? Ard has some more patches trying to fix this, but none of our toolchains seem to tickle the issue.

It seems that a fix has emerged (thanks! local testing looks good so far) but for the record I am using the arm (32) tool chain for x86_84 on kernel.org.

https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.6.3/

# arm-unknown-linux-gnueabi-gcc --version
arm-unknown-linux-gnueabi-gcc (GCC) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# arm-unknown-linux-gnueabi-ld --version
GNU ld (GNU Binutils) 2.22
Copyright 2011 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
#15 lore raw
In reply to Will Deacon
Quoted 29 lines · Will Deacon
Quoted 28 lines · Simon Horman
Quoted 16 lines · Tyler Baker
Quoted 15 lines · Will Deacon
Quoted 13 lines · Simon Horman
Quoted 5 lines · Nishanth Menon

I think we now have a new error: (seen with omap2plus_defconfig) on next-20150324 :
./arch/arm/kernel/vmlinux.lds:677: undefined symbol `__hyp_idmap_size' referenced in expression
make: *** [vmlinux] Error 1

Thanks, I am seeing that too.

My armchair suggestion is that the following should be reverted.

e60a1fec44a2f ("ARM: kvm: implement replacement for ld's LOG2CEIL()") 06f75a1f62000 ("ARM, arm64: kvm: get rid of the bounce page")

Quoted 7 lines
Quoted 3 lines

Can you try again with the latest -next please? We've merged an additional patch aimed at sorting this out. Reverting isn't really an option, as there's an awful lot of code that depends on the bounce page removal.

Here are the kernelci.org -next results[1], if you click the build status you can dig down into the build failures. next-20150326 has now hit a compiler bug, Arnd mentioned he was looking into this issue.

I have confirmed that next-20150326 does not compile without the following reverted:

Quoted 7 lines
Quoted 3 lines

12eb3e833961 ("ARM: kvm: assert on HYP section boundaries not actual code size") e60a1fec44a2 ("ARM: kvm: implement replacement for ld's LOG2CEIL()") 06f75a1f6200 ("ARM, arm64: kvm: get rid of the bounce page")

Thanks for testing this and sorry for the continued breakage. Which toolchain did you say you were using? Ard has some more patches trying to fix this, but none of our toolchains seem to tickle the issue.

I am able to reproduce with this toolchain[1].

Quoted 2 lines

Will

[1] http://releases.linaro.org/12.10/components/toolchain/binaries/gcc-linaro-arm-linux-gnueabihf-4.7-2012.10-20121022_linux.tar.bz2

Tyler

#16 lore raw
In reply to Will Deacon

Will, Ard,

Quoted 29 lines · Will Deacon
Quoted 28 lines · Simon Horman
Quoted 16 lines · Tyler Baker
Quoted 15 lines · Will Deacon
Quoted 13 lines · Simon Horman
Quoted 5 lines · Nishanth Menon

I think we now have a new error: (seen with omap2plus_defconfig) on next-20150324 :
./arch/arm/kernel/vmlinux.lds:677: undefined symbol `__hyp_idmap_size' referenced in expression
make: *** [vmlinux] Error 1

Thanks, I am seeing that too.

My armchair suggestion is that the following should be reverted.

e60a1fec44a2f ("ARM: kvm: implement replacement for ld's LOG2CEIL()") 06f75a1f62000 ("ARM, arm64: kvm: get rid of the bounce page")

Quoted 7 lines
Quoted 3 lines

Can you try again with the latest -next please? We've merged an additional patch aimed at sorting this out. Reverting isn't really an option, as there's an awful lot of code that depends on the bounce page removal.

Here are the kernelci.org -next results[1], if you click the build status you can dig down into the build failures. next-20150326 has now hit a compiler bug, Arnd mentioned he was looking into this issue.

I have confirmed that next-20150326 does not compile without the following reverted:

Quoted 7 lines
Quoted 3 lines

12eb3e833961 ("ARM: kvm: assert on HYP section boundaries not actual code size") e60a1fec44a2 ("ARM: kvm: implement replacement for ld's LOG2CEIL()") 06f75a1f6200 ("ARM, arm64: kvm: get rid of the bounce page")

Thanks for testing this and sorry for the continued breakage. Which toolchain did you say you were using? Ard has some more patches trying to fix this, but none of our toolchains seem to tickle the issue.

I've also tested on the default ARM toolchains available with ubuntu[1]

Are there any updates on this issue?

It ha broken most of the ARM defconfigs in linux-next[2], and since it's been broken for a week now, it is masking other types of issues that we can normally find via automated boot testing.

Kevin

[1]
arm-linux-gnueabihf-gcc (Ubuntu/Linaro 4.8.2-16ubuntu4) 4.8.2 arm-linux-gnueabi-gcc (Ubuntu/Linaro 4.7.3-12ubuntu1) 4.7.3

[2] http://kernelci.org/job/next/

#17 lore raw
Quoted 37 lines · Kevin Hilman

Will, Ard,

Quoted 33 lines · Will Deacon
Quoted 31 lines · Simon Horman
Quoted 16 lines · Tyler Baker
Quoted 15 lines · Will Deacon
Quoted 13 lines · Simon Horman
Quoted 5 lines · Nishanth Menon

I think we now have a new error: (seen with omap2plus_defconfig) on next-20150324 :
./arch/arm/kernel/vmlinux.lds:677: undefined symbol `__hyp_idmap_size' referenced in expression
make: *** [vmlinux] Error 1

Thanks, I am seeing that too.

My armchair suggestion is that the following should be reverted.

e60a1fec44a2f ("ARM: kvm: implement replacement for ld's LOG2CEIL()") 06f75a1f62000 ("ARM, arm64: kvm: get rid of the bounce page")

Quoted 7 lines
Quoted 3 lines

Can you try again with the latest -next please? We've merged an additional patch aimed at sorting this out. Reverting isn't really an option, as there's an awful lot of code that depends on the bounce page removal.

Here are the kernelci.org -next results[1], if you click the build status you can dig down into the build failures. next-20150326 has now hit a compiler bug, Arnd mentioned he was looking into this issue.

I have confirmed that next-20150326 does not compile without the following reverted:

12eb3e833961 ("ARM: kvm: assert on HYP section boundaries not actual code size") e60a1fec44a2 ("ARM: kvm: implement replacement for ld's LOG2CEIL()") 06f75a1f6200 ("ARM, arm64: kvm: get rid of the bounce page")

Quoted 8 lines
Quoted 3 lines

Thanks for testing this and sorry for the continued breakage. Which toolchain did you say you were using? Ard has some more patches trying to fix this, but none of our toolchains seem to tickle the issue.

I've also tested on the default ARM toolchains available with ubuntu[1]

Are there any updates on this issue?

I think Will and I were both under the impression that this patch

https://git.kernel.org/cgit/linux/kernel/git/arm64/linux.git/log/?h=kvm-bounce-page

fixed the issue conclusively.

Could you elaborate on the issue please? What is the error you are getting, and can you confirm that is is caused by ld choking on the linker script? If not, this is another error than the one we have been trying to fix

Signature · 1 line
Ard.
Quoted 12 lines

It ha broken most of the ARM defconfigs in linux-next[2], and since it's been broken for a week now, it is masking other types of issues that we can normally find via automated boot testing.

Kevin

[1]
arm-linux-gnueabihf-gcc (Ubuntu/Linaro 4.8.2-16ubuntu4) 4.8.2 arm-linux-gnueabi-gcc (Ubuntu/Linaro 4.7.3-12ubuntu1) 4.7.3

[2] http://kernelci.org/job/next/

#18 lore raw

Hi Ard,

Ard Biesheuvel <[email protected]> writes:

[...]

Quoted 5 lines

I think Will and I were both under the impression that this patch

https://git.kernel.org/cgit/linux/kernel/git/arm64/linux.git/log/?h=kvm-bounce-page

fixed the issue conclusively.

Nope, that branch is already part of linux-next, and linux-next still fails to compile for 20+ defconfigs[1]

Quoted 4 lines

Could you elaborate on the issue please? What is the error you are getting, and can you confirm that is is caused by ld choking on the linker script? If not, this is another error than the one we have been trying to fix

It's definitely not linker script related.

Using "arm-linux-gnueabi-gcc (Ubuntu/Linaro 4.7.3-12ubuntu1) 4.7.3", here's the error when building for multi_v7_defconfig (full log available[2]):

../mm/migrate.c: In function 'migrate_pages':
../mm/migrate.c:1148:1: internal compiler error: in push_minipool_fix, at config/arm/arm.c:13101 Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.7/README.Bugs> for instructions.
Preprocessed source stored into /tmp/ccO1Nz1m.out file, please attach
this to your bugreport.
make[2]: *** [mm/migrate.o] Error 1
make[2]: Target `__build' not remade because of errors.
make[1]: *** [mm] Error 2

build bisect points to commit 21f992084aeb[3], but that doesn't revert cleanly so I haven't got any further than that yet.

Kevin

[1] http://kernelci.org/build/next/kernel/next-20150331/
[2] http://storage.kernelci.org/next/next-20150331/arm-multi_v7_defconfig/build.log
[3] 21f992084aeb777675ba5f9c2dc6663e8a06e467 is the first bad commit

Author: Kirill A. Shutemov <[email protected]>
Date:   Wed Mar 25 13:02:28 2015 +1100

page-flags: define behavior of FS/IO-related flags on compound pages

It seems we don't have compound page on FS/IO path currently. Use NO_COMPOUND to catch if we have.

The odd exception is PG_dirty: sound uses compound pages and maps them
with PTEs. NO_COMPOUND triggers VM_BUG_ON() in set_page_dirty() on handling shared fault. Let's use HEAD for PG_dirty.

Cc Andrea Arcangeli <[email protected]>
Cc Hugh Dickins <[email protected]>
Cc Dave Hansen <[email protected]>
Cc Mel Gorman <[email protected]>
Cc Rik van Riel <[email protected]>
Cc Vlastimil Babka <[email protected]>
Cc Christoph Lameter <[email protected]>
Cc Naoya Horiguchi <[email protected]>
Cc Steve Capper <[email protected]>
Cc "Aneesh Kumar K.V" <[email protected]>
Cc Johannes Weiner <[email protected]>
Cc Michal Hocko <[email protected]>
Cc Jerome Marchand <[email protected]>

:040000 040000 0d621460af1123de8fc33c881ae314c914725afc
b843f45fb2a1c2537e8c17946d3f8af512cab84d M include
bisect run success

#36 lore raw
In reply to Kevin Hilman

Hi Kevin,

Quoted 34 lines · Kevin Hilman
Quoted 33 lines · Will Deacon
Quoted 31 lines · Simon Horman
Quoted 16 lines · Tyler Baker
Quoted 15 lines · Will Deacon
Quoted 13 lines · Simon Horman
Quoted 5 lines · Nishanth Menon

I think we now have a new error: (seen with omap2plus_defconfig) on next-20150324 :
./arch/arm/kernel/vmlinux.lds:677: undefined symbol `__hyp_idmap_size' referenced in expression
make: *** [vmlinux] Error 1

Thanks, I am seeing that too.

My armchair suggestion is that the following should be reverted.

e60a1fec44a2f ("ARM: kvm: implement replacement for ld's LOG2CEIL()") 06f75a1f62000 ("ARM, arm64: kvm: get rid of the bounce page")

Quoted 7 lines
Quoted 3 lines

Can you try again with the latest -next please? We've merged an additional patch aimed at sorting this out. Reverting isn't really an option, as there's an awful lot of code that depends on the bounce page removal.

Here are the kernelci.org -next results[1], if you click the build status you can dig down into the build failures. next-20150326 has now hit a compiler bug, Arnd mentioned he was looking into this issue.

I have confirmed that next-20150326 does not compile without the following reverted:

12eb3e833961 ("ARM: kvm: assert on HYP section boundaries not actual code size") e60a1fec44a2 ("ARM: kvm: implement replacement for ld's LOG2CEIL()") 06f75a1f6200 ("ARM, arm64: kvm: get rid of the bounce page")

Quoted 7 lines
Quoted 3 lines

Thanks for testing this and sorry for the continued breakage. Which toolchain did you say you were using? Ard has some more patches trying to fix this, but none of our toolchains seem to tickle the issue.

I've also tested on the default ARM toolchains available with ubuntu[1]

Are there any updates on this issue?

It's been fixed since the end of last week!

(see ARM: kvm: round HYP section to page size instead of log2 upper bound)

This was confirmed by both my testing and also Simon Horman, who reported the initial breakage.

Quoted 3 lines

It ha broken most of the ARM defconfigs in linux-next[2], and since it's been broken for a week now, it is masking other types of issues that we can normally find via automated boot testing.

If you're referring to failures such as:

http://storage.kernelci.org/next/next-20150331/arm-axm55xx_defconfig/build.log

Then that's not coming from the arm64 tree, and is a completely separate issue from the one originally reported in this thread.

Will

#19 lore raw

PATCH 1/1 mm/migrate: Mark unmap_and_move() "noinline" to avoid ICE in gcc 4.7.3 (was: Re: Possible regression in gcc 4.7.3 next-20150323 due to "ARM, arm64: kvm: get rid of the bounce page")

In reply to Kevin Hilman

Hi Kevin,

Quoted 26 lines · Kevin Hilman

Ard Biesheuvel <[email protected]> writes:
Nope, that branch is already part of linux-next, and linux-next still fails to compile for 20+ defconfigs[1]

Quoted 4 lines

Could you elaborate on the issue please? What is the error you are getting, and can you confirm that is is caused by ld choking on the linker script? If not, this is another error than the one we have been trying to fix

It's definitely not linker script related.

Using "arm-linux-gnueabi-gcc (Ubuntu/Linaro 4.7.3-12ubuntu1) 4.7.3", here's the error when building for multi_v7_defconfig (full log available[2]):

../mm/migrate.c: In function 'migrate_pages':
../mm/migrate.c:1148:1: internal compiler error: in push_minipool_fix, at config/arm/arm.c:13101 Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.7/README.Bugs> for instructions.
Preprocessed source stored into /tmp/ccO1Nz1m.out file, please attach
this to your bugreport.
make[2]: *** [mm/migrate.o] Error 1
make[2]: Target `__build' not remade because of errors.
make[1]: *** [mm] Error 2

Quoted 2 lines

build bisect points to commit 21f992084aeb[3], but that doesn't revert cleanly so I haven't got any further than that yet.

I installed gcc-arm-linux-gnueabi (4:4.7.2-1 from Ubuntu 14.04 LTS) and could reproduce the ICE. I came up with the workaround below.
Does this work for you?

Quoted 1 line

From 7ebe83316eaf1952e55a76754ce7a5832e461b8c Mon Sep 17 00:00:00 2001

From: Geert Uytterhoeven <[email protected]>
Date: Wed, 1 Apr 2015 11:22:51 +0200
Subject: [PATCH] mm/migrate: Mark unmap_and_move() "noinline" to avoid ICE in
gcc 4.7.3
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

With gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-12ubuntu1) :

mm/migrate.c: In function ?migrate_pages?:
mm/migrate.c:1148:1: internal compiler error: in push_minipool_fix, at config/arm/arm.c:13500 Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.7/README.Bugs> for instructions. Preprocessed source stored into /tmp/ccPoM1tr.out file, please attach this to your bugreport. make[1]: *** [mm/migrate.o] Error 1
make: *** [mm/migrate.o] Error 2

Mark unmap_and_move() (which is used in a single place only) "noinline" to work around this compiler bug.

---
 mm/migrate.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
mm/migrate.c +4 -3
index 114602a68111d809..98f8574456c2010c 100644
@@ -904,9 +904,10 @@ out:
  * Obtain the lock on page, remove all ptes and migrate the page
  * to the newly allocated page in newpage.
  */
-static int unmap_and_move(new_page_t get_new_page, free_page_t put_new_page,
-			unsigned long private, struct page *page, int force,
-			enum migrate_mode mode)
+static noinline int unmap_and_move(new_page_t get_new_page,
+				   free_page_t put_new_page,
+				   unsigned long private, struct page *page,
+				   int force, enum migrate_mode mode)
 {
 	int rc = 0;
 	int *result = NULL;
Signature · 13 lines
1.9.1


Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

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
#20 lore raw

Re: [PATCH] mm/migrate: Mark unmap_and_move() "noinline" to avoid ICE in gcc 4.7.3

Quoted 74 lines · Geert Uytterhoeven

Hi Kevin,

Quoted 26 lines · Kevin Hilman

Ard Biesheuvel <[email protected]> writes:
Nope, that branch is already part of linux-next, and linux-next still fails to compile for 20+ defconfigs[1]

Quoted 4 lines

Could you elaborate on the issue please? What is the error you are getting, and can you confirm that is is caused by ld choking on the linker script? If not, this is another error than the one we have been trying to fix

It's definitely not linker script related.

Using "arm-linux-gnueabi-gcc (Ubuntu/Linaro 4.7.3-12ubuntu1) 4.7.3", here's the error when building for multi_v7_defconfig (full log available[2]):

../mm/migrate.c: In function 'migrate_pages':
../mm/migrate.c:1148:1: internal compiler error: in push_minipool_fix, at config/arm/arm.c:13101 Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.7/README.Bugs> for instructions.
Preprocessed source stored into /tmp/ccO1Nz1m.out file, please attach
this to your bugreport.
make[2]: *** [mm/migrate.o] Error 1
make[2]: Target `__build' not remade because of errors.
make[1]: *** [mm] Error 2

Quoted 2 lines

build bisect points to commit 21f992084aeb[3], but that doesn't revert cleanly so I haven't got any further than that yet.

I installed gcc-arm-linux-gnueabi (4:4.7.2-1 from Ubuntu 14.04 LTS) and could reproduce the ICE. I came up with the workaround below.
Does this work for you?

From 7ebe83316eaf1952e55a76754ce7a5832e461b8c Mon Sep 17 00:00:00 2001
From: Geert Uytterhoeven <[email protected]>
Date: Wed, 1 Apr 2015 11:22:51 +0200
Subject: [PATCH] mm/migrate: Mark unmap_and_move() "noinline" to avoid ICE in
gcc 4.7.3
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

With gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-12ubuntu1) :

mm/migrate.c: In function ?migrate_pages?:
mm/migrate.c:1148:1: internal compiler error: in push_minipool_fix, at config/arm/arm.c:13500 Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.7/README.Bugs> for instructions. Preprocessed source stored into /tmp/ccPoM1tr.out file, please attach this to your bugreport. make[1]: *** [mm/migrate.o] Error 1
make: *** [mm/migrate.o] Error 2

Mark unmap_and_move() (which is used in a single place only) "noinline" to work around this compiler bug.

---
 mm/migrate.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
mm/migrate.c +0 -0
index 114602a68111d809..98f8574456c2010c 100644
@@ -904,9 +904,10 @@ out:
  * Obtain the lock on page, remove all ptes and migrate the page
  * to the newly allocated page in newpage.
  */

mm/migrate.c out: · line 913

Quoted 10 lines
mm/migrate.c +4 -3
-static int unmap_and_move(new_page_t get_new_page, free_page_t put_new_page,
-			unsigned long private, struct page *page, int force,
-			enum migrate_mode mode)
+static noinline int unmap_and_move(new_page_t get_new_page,
+				   free_page_t put_new_page,
+				   unsigned long private, struct page *page,
+				   int force, enum migrate_mode mode)
 {
 	int rc = 0;
 	int *result = NULL;

Ouch. That's really ugly. And on 32bit ARM, we end-up spilling half of the parameters on the stack, which is not going to help performance either (not that this would be useful on 32bit ARM anyway...).

Any chance you could make this dependent on some compiler detection mechanism?

Thanks,

	M.
Signature · 1 line
Jazz is not dead. It just smells funny...
#37 lore raw
In reply to Will Deacon
Quoted 41 lines · Will Deacon

Hi Kevin,

Quoted 38 lines · Kevin Hilman
Quoted 36 lines · Will Deacon
Quoted 25 lines · Simon Horman
Quoted 16 lines · Tyler Baker
Quoted 15 lines · Will Deacon
Quoted 13 lines · Simon Horman
Quoted 5 lines · Nishanth Menon

I think we now have a new error: (seen with omap2plus_defconfig) on next-20150324 :
./arch/arm/kernel/vmlinux.lds:677: undefined symbol `__hyp_idmap_size' referenced in expression
make: *** [vmlinux] Error 1

Thanks, I am seeing that too.

My armchair suggestion is that the following should be reverted.

e60a1fec44a2f ("ARM: kvm: implement replacement for ld's LOG2CEIL()") 06f75a1f62000 ("ARM, arm64: kvm: get rid of the bounce page")

Quoted 7 lines
Quoted 3 lines

Can you try again with the latest -next please? We've merged an additional patch aimed at sorting this out. Reverting isn't really an option, as there's an awful lot of code that depends on the bounce page removal.

Here are the kernelci.org -next results[1], if you click the build status you can dig down into the build failures. next-20150326 has now hit a compiler bug, Arnd mentioned he was looking into this issue.

Quoted 6 lines

I have confirmed that next-20150326 does not compile without the following reverted:

12eb3e833961 ("ARM: kvm: assert on HYP section boundaries not actual code size") e60a1fec44a2 ("ARM: kvm: implement replacement for ld's LOG2CEIL()") 06f75a1f6200 ("ARM, arm64: kvm: get rid of the bounce page")

Thanks for testing this and sorry for the continued breakage. Which toolchain did you say you were using? Ard has some more patches trying to fix this, but none of our toolchains seem to tickle the issue.

Quoted 6 lines
Quoted 3 lines

I've also tested on the default ARM toolchains available with ubuntu[1]

Are there any updates on this issue?

It's been fixed since the end of last week!

I can confirm that my tests have started functioning again (gcc 4.6)
https://github.com/nmenon/kernel-test-logs/tree/linux-next

Signature · 2 lines
Regards,
Nishanth Menon
#38 lore raw
In reply to Will Deacon

Hi Will,

Will Deacon <[email protected]> writes:

[...]

Quoted 16 lines
Quoted 8 lines
Quoted 4 lines

Thanks for testing this and sorry for the continued breakage. Which toolchain did you say you were using? Ard has some more patches trying to fix this, but none of our toolchains seem to tickle the issue.

I've also tested on the default ARM toolchains available with ubuntu[1]

Are there any updates on this issue?

It's been fixed since the end of last week!

(see ARM: kvm: round HYP section to page size instead of log2 upper bound)

This was confirmed by both my testing and also Simon Horman, who reported the initial breakage.

Quoted 7 lines
Quoted 3 lines

It ha broken most of the ARM defconfigs in linux-next[2], and since it's been broken for a week now, it is masking other types of issues that we can normally find via automated boot testing.

If you're referring to failures such as:

http://storage.kernelci.org/next/next-20150331/arm-axm55xx_defconfig/build.log

Yes, that's the one I'm trying to track down.

Quoted 2 lines

Then that's not coming from the arm64 tree, and is a completely separate issue from the one originally reported in this thread.

Ugh, womehow I got wires crossed and thought they were related problems. Looks like Geert now has a proposed fix for the issue I'm tracking.

Sorry for the noise,

Kevin

Tested-by on v1 1/1
#35 lore raw

Re: [PATCH] mm/migrate: Mark unmap_and_move() "noinline" to avoid ICE in gcc 4.7.3

In reply to Geert Uytterhoeven

Geert Uytterhoeven <[email protected]> writes:

[...]

Quoted 5 lines
Quoted 2 lines

build bisect points to commit 21f992084aeb[3], but that doesn't revert cleanly so I haven't got any further than that yet.

I installed gcc-arm-linux-gnueabi (4:4.7.2-1 from Ubuntu 14.04 LTS) and could reproduce the ICE. I came up with the workaround below.

Awesome, thanks!

Quoted 1 line

Does this work for you?

Yes, that patch works well and fixes the regression. Build results for all the defconfigs here:

http://kernelci.org/build/khilman/kernel/v4.0-rc6-8294-g2ef3958cc27e/

and the remaining issues arent' realted to this ICE.

Quoted 20 lines

From 7ebe83316eaf1952e55a76754ce7a5832e461b8c Mon Sep 17 00:00:00 2001
From: Geert Uytterhoeven <[email protected]>
Date: Wed, 1 Apr 2015 11:22:51 +0200
Subject: [PATCH] mm/migrate: Mark unmap_and_move() "noinline" to avoid ICE in
gcc 4.7.3
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

With gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-12ubuntu1) :

mm/migrate.c: In function ?migrate_pages?:
mm/migrate.c:1148:1: internal compiler error: in push_minipool_fix, at config/arm/arm.c:13500 Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.7/README.Bugs> for instructions. Preprocessed source stored into /tmp/ccPoM1tr.out file, please attach this to your bugreport. make[1]: *** [mm/migrate.o] Error 1
make: *** [mm/migrate.o] Error 2

Quoted 5 lines

Mark unmap_and_move() (which is used in a single place only) "noinline" to work around this compiler bug.

Quoted 22 lines
---
 mm/migrate.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
mm/migrate.c +4 -3
index 114602a68111d809..98f8574456c2010c 100644
@@ -904,9 +904,10 @@ out:
  * Obtain the lock on page, remove all ptes and migrate the page
  * to the newly allocated page in newpage.
  */
-static int unmap_and_move(new_page_t get_new_page, free_page_t put_new_page,
-			unsigned long private, struct page *page, int force,
-			enum migrate_mode mode)
+static noinline int unmap_and_move(new_page_t get_new_page,
+				   free_page_t put_new_page,
+				   unsigned long private, struct page *page,
+				   int force, enum migrate_mode mode)
 {
 	int rc = 0;
 	int *result = NULL;
maintainer
#21 lore raw

Re: [PATCH] mm/migrate: Mark unmap_and_move() "noinline" to avoid ICE in gcc 4.7.3

In reply to Marc Zyngier
Quoted 16 lines · On Wed, 01 Apr 2015 10:47:49 +0100 Marc Zyngier <[email protected]> wrote:

Review

Quoted 11 lines
(quoted diff) +4 -3
-static int unmap_and_move(new_page_t get_new_page, free_page_t put_new_page,
-			unsigned long private, struct page *page, int force,
-			enum migrate_mode mode)
+static noinline int unmap_and_move(new_page_t get_new_page,
+				   free_page_t put_new_page,
+				   unsigned long private, struct page *page,
+				   int force, enum migrate_mode mode)
 {
 	int rc = 0;
 	int *result = NULL;

Ouch. That's really ugly. And on 32bit ARM, we end-up spilling half of the parameters on the stack, which is not going to help performance either (not that this would be useful on 32bit ARM anyway...).

Quoted 2 lines

Any chance you could make this dependent on some compiler detection mechanism?

With my arm compiler (gcc-4.4.4) the patch makes no difference - unmap_and_move() isn't being inlined anyway.

How does this look?

Kevin, could you please retest? I might have fat-fingered something...

mm/migrate.c renamed from mm/migrate.c~mm-migrate-mark-unmap_and_move-noinline-to-avoid-ice-in-gcc-473-fix +11 -1
@@ -901,10 +901,20 @@ out:
 }
 
 /*
+ * gcc-4.7.3 on arm gets an ICE when inlining unmap_and_move().  Work around
+ * it.
+ */
+#if GCC_VERSION == 40703 && defined(CONFIG_ARM)
+#define ICE_noinline noinline
+#else
+#define ICE_noinline
+#endif
+
+/*
  * Obtain the lock on page, remove all ptes and migrate the page
  * to the newly allocated page in newpage.
  */
-static noinline int unmap_and_move(new_page_t get_new_page,
+static ICE_noinline int unmap_and_move(new_page_t get_new_page,
 				   free_page_t put_new_page,
 				   unsigned long private, struct page *page,
 				   int force, enum migrate_mode mode)

_

#22 lore raw

Re: [PATCH] mm/migrate: Mark unmap_and_move() "noinline" to avoid ICE in gcc 4.7.3

Quoted 21 lines · Andrew Morton
Quoted 16 lines · On Wed, 01 Apr 2015 10:47:49 +0100 Marc Zyngier <[email protected]> wrote:

Review

Quoted 11 lines
(quoted diff) +4 -3
-static int unmap_and_move(new_page_t get_new_page, free_page_t put_new_page,
-			unsigned long private, struct page *page, int force,
-			enum migrate_mode mode)
+static noinline int unmap_and_move(new_page_t get_new_page,
+				   free_page_t put_new_page,
+				   unsigned long private, struct page *page,
+				   int force, enum migrate_mode mode)
 {
 	int rc = 0;
 	int *result = NULL;

Ouch. That's really ugly. And on 32bit ARM, we end-up spilling half of the parameters on the stack, which is not going to help performance either (not that this would be useful on 32bit ARM anyway...).

Quoted 2 lines

Any chance you could make this dependent on some compiler detection mechanism?

Quoted 6 lines

With my arm compiler (gcc-4.4.4) the patch makes no difference - unmap_and_move() isn't being inlined anyway.

How does this look?

Kevin, could you please retest? I might have fat-fingered something...

Your patch on top of Geert's still compiles fine for me with gcc-4.7.3. However, I'm not sure how specific we can be on the versions.

/me goes to test a few more compilers... OK...

ICE: 4.7.1, 4.7.3, 4.8.3
OK: 4.6.3, 4.9.2, 4.9.3

The diff below[2] on top of yours compiles fine here and at least covers the compilers I *know* to trigger the ICE.

Kevin

[1]

mm/migrate.c +2 -2
index 25fd7f6291de..6e15ae3248e0 100644
@@ -901,10 +901,10 @@ out:
 }
 
 /*
- * gcc-4.7.3 on arm gets an ICE when inlining unmap_and_move().  Work around
+ * gcc 4.7 and 4.8 on arm gets an ICE when inlining unmap_and_move().  Work around
  * it.
  */
-#if GCC_VERSION == 40703 && defined(CONFIG_ARM)
+#if (GCC_VERSION >= 40700 && GCC_VERSION < 40900) && defined(CONFIG_ARM)
 #define ICE_noinline noinline
 #else
 #define ICE_noinline
#23 lore raw

Re: [PATCH] mm/migrate: Mark unmap_and_move() "noinline" to avoid ICE in gcc 4.7.3

Quoted 10 lines · Kevin Hilman

Your patch on top of Geert's still compiles fine for me with gcc-4.7.3. However, I'm not sure how specific we can be on the versions.

/me goes to test a few more compilers... OK...

ICE: 4.7.1, 4.7.3, 4.8.3
OK: 4.6.3, 4.9.2, 4.9.3

The diff below[2] on top of yours compiles fine here and at least covers the compilers I *know* to trigger the ICE.

Interesting. I'm using stock gcc 4.7.4 here, though I'm not building -next (only mainline + my tree + arm-soc) and it hasn't shown a problem yet.

I think we need to ask the question: is the bug in stock GCC or Linaro GCC? If it's not in stock GCC, then it's a GCC vendor problem :)

Signature · 2 lines
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.
#24 lore raw

Re: [PATCH] mm/migrate: Mark unmap_and_move() "noinline" to avoid ICE in gcc 4.7.3

Hi Russell,

Quoted 9 lines · Russell King - ARM Linux
Quoted 8 lines · Kevin Hilman

Your patch on top of Geert's still compiles fine for me with gcc-4.7.3. However, I'm not sure how specific we can be on the versions.

/me goes to test a few more compilers... OK...

ICE: 4.7.1, 4.7.3, 4.8.3
OK: 4.6.3, 4.9.2, 4.9.3

Quoted 6 lines
Quoted 2 lines

The diff below[2] on top of yours compiles fine here and at least covers the compilers I *know* to trigger the ICE.

Interesting. I'm using stock gcc 4.7.4 here, though I'm not building -next (only mainline + my tree + arm-soc) and it hasn't shown a problem yet.

Mainline doesn't fail.

Quoted 2 lines

I think we need to ask the question: is the bug in stock GCC or Linaro GCC? If it's not in stock GCC, then it's a GCC vendor problem :)

Can you please try -next (e.g. next-20150320)?

make bockw_defconfig
make mm/migrate.o

Thanks!

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

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

#25 lore raw

Re: [PATCH] mm/migrate: Mark unmap_and_move() "noinline" to avoid ICE in gcc 4.7.3

In reply to Kevin Hilman
Quoted 33 lines · Kevin Hilman
Quoted 21 lines · Andrew Morton
Quoted 16 lines · On Wed, 01 Apr 2015 10:47:49 +0100 Marc Zyngier <[email protected]> wrote:

Review

Quoted 11 lines
(quoted diff) +4 -3
-static int unmap_and_move(new_page_t get_new_page, free_page_t put_new_page,
-			unsigned long private, struct page *page, int force,
-			enum migrate_mode mode)
+static noinline int unmap_and_move(new_page_t get_new_page,
+				   free_page_t put_new_page,
+				   unsigned long private, struct page *page,
+				   int force, enum migrate_mode mode)
 {
 	int rc = 0;
 	int *result = NULL;

Ouch. That's really ugly. And on 32bit ARM, we end-up spilling half of the parameters on the stack, which is not going to help performance either (not that this would be useful on 32bit ARM anyway...).

Quoted 2 lines

Any chance you could make this dependent on some compiler detection mechanism?

Quoted 6 lines

With my arm compiler (gcc-4.4.4) the patch makes no difference - unmap_and_move() isn't being inlined anyway.

How does this look?

Kevin, could you please retest? I might have fat-fingered something...

Your patch on top of Geert's still compiles fine for me with gcc-4.7.3. However, I'm not sure how specific we can be on the versions.

Quoted 7 lines

/me goes to test a few more compilers... OK...

ICE: 4.7.1, 4.7.3, 4.8.3
OK: 4.6.3, 4.9.2, 4.9.3

The diff below[2] on top of yours compiles fine here and at least covers the compilers I *know* to trigger the ICE.

I see ICE on
arm-linux-gnueabi-gcc (Ubuntu/Linaro 4.7.4-2ubuntu1) 4.7.4

Quoted 27 lines

Kevin

[1]

mm/migrate.c +2 -2
index 25fd7f6291de..6e15ae3248e0 100644
@@ -901,10 +901,10 @@ out:
 }
 
 /*
- * gcc-4.7.3 on arm gets an ICE when inlining unmap_and_move().  Work around
+ * gcc 4.7 and 4.8 on arm gets an ICE when inlining unmap_and_move().  Work around
 * it.
 */
-#if GCC_VERSION == 40703 && defined(CONFIG_ARM)
+#if (GCC_VERSION >= 40700 && GCC_VERSION < 40900) && defined(CONFIG_ARM)
 #define ICE_noinline noinline
 #else
 #define ICE_noinline

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#26 lore raw

Re: [PATCH] mm/migrate: Mark unmap_and_move() "noinline" to avoid ICE in gcc 4.7.3

Quoted 43 lines · Lina Iyer
Quoted 42 lines · Kevin Hilman
Quoted 26 lines · Andrew Morton
Quoted 19 lines · On Wed, 01 Apr 2015 10:47:49 +0100 Marc Zyngier <[email protected]> wrote:
Quoted 10 lines

-static int unmap_and_move(new_page_t get_new_page, free_page_t put_new_page,
- unsigned long private, struct page *page, int
force,

(quoted diff) +3 -1
-                     enum migrate_mode mode)
+static noinline int unmap_and_move(new_page_t get_new_page,
+                                free_page_t put_new_page,
+                                unsigned long private, struct page

*page,
+ int force, enum migrate_mode mode)

Quoted 4 lines
 {
      int rc = 0;
      int *result = NULL;

Ouch. That's really ugly. And on 32bit ARM, we end-up spilling half of the parameters on the stack, which is not going to help performance either (not that this would be useful on 32bit ARM anyway...).

Quoted 2 lines

Any chance you could make this dependent on some compiler detection mechanism?

Quoted 6 lines

With my arm compiler (gcc-4.4.4) the patch makes no difference - unmap_and_move() isn't being inlined anyway.

How does this look?

Kevin, could you please retest? I might have fat-fingered something...

Your patch on top of Geert's still compiles fine for me with gcc-4.7.3. However, I'm not sure how specific we can be on the versions.

/me goes to test a few more compilers... OK...

Quoted 9 lines
Quoted 5 lines

ICE: 4.7.1, 4.7.3, 4.8.3
OK: 4.6.3, 4.9.2, 4.9.3

The diff below[2] on top of yours compiles fine here and at least covers the compilers I *know* to trigger the ICE.

I see ICE on arm-linux-gnueabi-gcc (Ubuntu/Linaro 4.7.4-2ubuntu1) 4.7.4

Thanks for checking. I'm assuming my patch fixes it for your since that should catch any 4.7.x compiler.

Kevin

#27 lore raw

Re: [PATCH] mm/migrate: Mark unmap_and_move() "noinline" to avoid ICE in gcc 4.7.3

Quoted 51 lines · Kevin Hilman
Quoted 50 lines · Lina Iyer
Quoted 47 lines · Kevin Hilman
Quoted 26 lines · Andrew Morton
Quoted 19 lines · On Wed, 01 Apr 2015 10:47:49 +0100 Marc Zyngier <[email protected]> wrote:
Quoted 10 lines

-static int unmap_and_move(new_page_t get_new_page, free_page_t put_new_page,
- unsigned long private, struct page *page, int
force,

(quoted diff) +3 -1
-                     enum migrate_mode mode)
+static noinline int unmap_and_move(new_page_t get_new_page,
+                                free_page_t put_new_page,
+                                unsigned long private, struct page

*page,
+ int force, enum migrate_mode mode)

Quoted 4 lines
 {
      int rc = 0;
      int *result = NULL;

Ouch. That's really ugly. And on 32bit ARM, we end-up spilling half of the parameters on the stack, which is not going to help performance either (not that this would be useful on 32bit ARM anyway...).

Quoted 2 lines

Any chance you could make this dependent on some compiler detection mechanism?

Quoted 6 lines

With my arm compiler (gcc-4.4.4) the patch makes no difference - unmap_and_move() isn't being inlined anyway.

How does this look?

Kevin, could you please retest? I might have fat-fingered something...

Your patch on top of Geert's still compiles fine for me with gcc-4.7.3. However, I'm not sure how specific we can be on the versions.

/me goes to test a few more compilers... OK...

ICE: 4.7.1, 4.7.3, 4.8.3
OK: 4.6.3, 4.9.2, 4.9.3

The diff below[2] on top of yours compiles fine here and at least covers the compilers I *know* to trigger the ICE.

Quoted 5 lines
Quoted 2 lines

I see ICE on arm-linux-gnueabi-gcc (Ubuntu/Linaro 4.7.4-2ubuntu1) 4.7.4

Thanks for checking. I'm assuming my patch fixes it for your since that should catch any 4.7.x compiler.

Yes, thank you. This fixes it on 4.7.4

Quoted 2 lines

Kevin

#28 lore raw

Re: [PATCH] mm/migrate: Mark unmap_and_move() "noinline" to avoid ICE in gcc 4.7.3

In reply to Kevin Hilman

Hi Andrew,

Quoted 33 lines · Kevin Hilman
Quoted 21 lines · Andrew Morton
Quoted 16 lines · On Wed, 01 Apr 2015 10:47:49 +0100 Marc Zyngier <[email protected]> wrote:

Review

Quoted 11 lines
(quoted diff) +4 -3
-static int unmap_and_move(new_page_t get_new_page, free_page_t put_new_page,
-                  unsigned long private, struct page *page, int force,
-                  enum migrate_mode mode)
+static noinline int unmap_and_move(new_page_t get_new_page,
+                             free_page_t put_new_page,
+                             unsigned long private, struct page *page,
+                             int force, enum migrate_mode mode)
 {
   int rc = 0;
   int *result = NULL;

Ouch. That's really ugly. And on 32bit ARM, we end-up spilling half of the parameters on the stack, which is not going to help performance either (not that this would be useful on 32bit ARM anyway...).

Quoted 2 lines

Any chance you could make this dependent on some compiler detection mechanism?

Quoted 6 lines

With my arm compiler (gcc-4.4.4) the patch makes no difference - unmap_and_move() isn't being inlined anyway.

How does this look?

Kevin, could you please retest? I might have fat-fingered something...

Your patch on top of Geert's still compiles fine for me with gcc-4.7.3. However, I'm not sure how specific we can be on the versions.

Quoted 7 lines

/me goes to test a few more compilers... OK...

ICE: 4.7.1, 4.7.3, 4.8.3
OK: 4.6.3, 4.9.2, 4.9.3

The diff below[2] on top of yours compiles fine here and at least covers the compilers I *know* to trigger the ICE.

I see my fix in your mmots since last Thurs (4/2), but it's not in mmotm (last updated today) so today's linux-next still has the ICE for
anything other than gcc-4.7.3. Just checking to see when you plan to
update mmotm.

Thanks,

Kevin

maintainer
#29 lore raw

Re: [PATCH] mm/migrate: Mark unmap_and_move() "noinline" to avoid ICE in gcc 4.7.3

Quoted 7 lines · On Tue, 7 Apr 2015 10:57:52 -0700 Kevin Hilman <[email protected]> wrote:
Quoted 2 lines

The diff below[2] on top of yours compiles fine here and at least covers the compilers I *know* to trigger the ICE.

I see my fix in your mmots since last Thurs (4/2), but it's not in mmotm (last updated today) so today's linux-next still has the ICE for
anything other than gcc-4.7.3. Just checking to see when you plan to
update mmotm.

It should all be there today?

#30 lore raw

Re: [PATCH] mm/migrate: Mark unmap_and_move() "noinline" to avoid ICE in gcc 4.7.3

Quoted 11 lines · Andrew Morton
Quoted 7 lines · On Tue, 7 Apr 2015 10:57:52 -0700 Kevin Hilman <[email protected]> wrote:
Quoted 2 lines

The diff below[2] on top of yours compiles fine here and at least covers the compilers I *know* to trigger the ICE.

I see my fix in your mmots since last Thurs (4/2), but it's not in mmotm (last updated today) so today's linux-next still has the ICE for
anything other than gcc-4.7.3. Just checking to see when you plan to
update mmotm.

It should all be there today?

Nope.

In mmotm, only the original patch plus your first fix is there:

$ curl -sO http://www.ozlabs.org/~akpm/mmotm/broken-out.tar.gz
$ tar -tavf broken-out.tar.gz |grep gcc-473
-rw-r----- akpm/eng       1838 2015-04-01 14:41 broken-out/mm-migrate-mark-unmap_and_move-noinline-to-avoid-ice-in-gcc-473.patch
-rw-r----- akpm/eng       1309 2015-04-01 14:41 broken-out/mm-migrate-mark-unmap_and_move-noinline-to-avoid-ice-in-gcc-473-fix.patch

but in mmots, the additional ptch from me, plus another comment fixup from you are also there:

$ curl -sO http://www.ozlabs.org/~akpm/mmots/broken-out.tar.gz
$ tar -tavf broken-out.tar.gz |grep gcc-473
-rw-r----- akpm/eng       1882 2015-04-06 16:24 broken-out/mm-migrate-mark-unmap_and_move-noinline-to-avoid-ice-in-gcc-473.patch
-rw-r----- akpm/eng       1271 2015-04-06 16:24 broken-out/mm-migrate-mark-unmap_and_move-noinline-to-avoid-ice-in-gcc-473-fix.patch
-rw-r----- akpm/eng       1382 2015-04-06 16:24 broken-out/mm-migrate-mark-unmap_and_move-noinline-to-avoid-ice-in-gcc-473-fix-fix.patch
-rw-r----- akpm/eng        968 2015-04-06 16:24 broken-out/mm-migrate-mark-unmap_and_move-noinline-to-avoid-ice-in-gcc-473-fix-fix-fix.patch

Kevin

maintainer
#31 lore raw

Re: [PATCH] mm/migrate: Mark unmap_and_move() "noinline" to avoid ICE in gcc 4.7.3

Quoted 7 lines · On Tue, 07 Apr 2015 15:41:32 -0700 Kevin Hilman <[email protected]> wrote:
Quoted 5 lines · Andrew Morton
Quoted 3 lines · On Tue, 7 Apr 2015 10:57:52 -0700 Kevin Hilman <[email protected]> wrote:
Quoted 2 lines

The diff below[2] on top of yours compiles fine here and at least covers the compilers I *know* to trigger the ICE.

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

I see my fix in your mmots since last Thurs (4/2), but it's not in mmotm (last updated today) so today's linux-next still has the ICE for
anything other than gcc-4.7.3. Just checking to see when you plan to
update mmotm.

It should all be there today?

Nope.

huh, I swear I did an mmotm yesterday.

Let me see if I can sort out the watchdog mess and produce something releasable...

#32 lore raw

Re: [PATCH] mm/migrate: Mark unmap_and_move() "noinline" to avoid ICE in gcc 4.7.3

Quoted 14 lines · Andrew Morton
Quoted 12 lines · On Tue, 07 Apr 2015 15:41:32 -0700 Kevin Hilman <[email protected]> wrote:
Quoted 10 lines · Andrew Morton
Quoted 7 lines · On Tue, 7 Apr 2015 10:57:52 -0700 Kevin Hilman <[email protected]> wrote:
Quoted 2 lines

The diff below[2] on top of yours compiles fine here and at least covers the compilers I *know* to trigger the ICE.

I see my fix in your mmots since last Thurs (4/2), but it's not in mmotm (last updated today) so today's linux-next still has the ICE for
anything other than gcc-4.7.3. Just checking to see when you plan to
update mmotm.

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

It should all be there today?

Nope.

huh, I swear I did an mmotm yesterday.

Well, based on the timestamp of the mmotm dir on ozlabs, it appears you did. That's why I was confused why the gcc-473 patches from mmots aren't there.

Quoted 2 lines

Let me see if I can sort out the watchdog mess and produce something releasable...

OK, thanks.

Kevin

maintainer
#33 lore raw

Re: [PATCH] mm/migrate: Mark unmap_and_move() "noinline" to avoid ICE in gcc 4.7.3

Quoted 9 lines · On Tue, 07 Apr 2015 16:27:44 -0700 Kevin Hilman <[email protected]> wrote:
Quoted 5 lines
Quoted 3 lines
Quoted 1 line

It should all be there today?

Nope.

huh, I swear I did an mmotm yesterday.

Well, based on the timestamp of the mmotm dir on ozlabs, it appears you did. That's why I was confused why the gcc-473 patches from mmots aren't there.

Things look a bit better now.

#34 lore raw

Re: [PATCH] mm/migrate: Mark unmap_and_move() "noinline" to avoid ICE in gcc 4.7.3

Quoted 6 lines · Andrew Morton
Quoted 4 lines · On Tue, 07 Apr 2015 16:27:44 -0700 Kevin Hilman <[email protected]> wrote:
Quoted 4 lines
Quoted 3 lines
Quoted 1 line

It should all be there today?

Nope.

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

huh, I swear I did an mmotm yesterday.

Well, based on the timestamp of the mmotm dir on ozlabs, it appears you did. That's why I was confused why the gcc-473 patches from mmots aren't there.

Things look a bit better now.

Yup, I can confirm all 4 patches are there now. Things should be in good shape for the next -next.

Thanks,

Kevin