Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1500824 > unrolled thread

[PATCH] MIPS: IP22: Fix build error in IP22 cache code

Started byMatt Redfearn <matt.redfearn@imgtec.com>
First post2016-10-14 12:30 +0200
Last post2016-10-17 15:40 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] MIPS: IP22: Fix build error in IP22 cache code Matt Redfearn <matt.redfearn@imgtec.com> - 2016-10-14 12:30 +0200
    Re: [PATCH] MIPS: IP22: Fix build error in IP22 cache code "Maciej W. Rozycki" <macro@imgtec.com> - 2016-10-17 15:40 +0200

#1500824 — [PATCH] MIPS: IP22: Fix build error in IP22 cache code

FromMatt Redfearn <matt.redfearn@imgtec.com>
Date2016-10-14 12:30 +0200
Subject[PATCH] MIPS: IP22: Fix build error in IP22 cache code
Message-ID<ss7Ut-8uv-17@gated-at.bofh.it>
Recent MIPS toolchains complain about the use of an immediate larger
than 32bits when compiling a 32bit kernel, leading to the following
build failure:
{standard input}: Assembler messages:
{standard input}:131: Error: number (0x9000000080000000) larger than 32
bits
{standard input}:154: Error: number (0x9000000080000000) larger than 32
bits
{standard input}:191: Error: number (0x9000000080000000) larger than 32
bits

Fix this by specifying registers are 64bit via the .set gp=64 directive.

Since IP22 is the default MIPS machine, this is causing allnoconfig
build failures.

Fixes: 1da177e4c3f4
Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com>

Cc: stable@vger.kernel.org
---

 arch/mips/mm/sc-ip22.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/mips/mm/sc-ip22.c b/arch/mips/mm/sc-ip22.c
index 026cb59a914d..6551ca37d308 100644
--- a/arch/mips/mm/sc-ip22.c
+++ b/arch/mips/mm/sc-ip22.c
@@ -35,6 +35,7 @@ static inline void indy_sc_wipe(unsigned long first, unsigned long last)
 	".set\tnoreorder\n\t"
 	".set\tmips3\n\t"
 	".set\tnoat\n\t"
+	".set\tgp=64\n\t"
 	"mfc0\t%2, $12\n\t"
 	"li\t$1, 0x80\t\t\t# Go 64 bit\n\t"
 	"mtc0\t$1, $12\n\t"
-- 
2.7.4

[toc] | [next] | [standalone]


#1501971

From"Maciej W. Rozycki" <macro@imgtec.com>
Date2016-10-17 15:40 +0200
Message-ID<stgiZ-43Y-13@gated-at.bofh.it>
In reply to#1500824
On Fri, 14 Oct 2016, Matt Redfearn wrote:

> Recent MIPS toolchains complain about the use of an immediate larger
> than 32bits when compiling a 32bit kernel, leading to the following
> build failure:
> {standard input}: Assembler messages:
> {standard input}:131: Error: number (0x9000000080000000) larger than 32
> bits
> {standard input}:154: Error: number (0x9000000080000000) larger than 32
> bits
> {standard input}:191: Error: number (0x9000000080000000) larger than 32
> bits
> 
> Fix this by specifying registers are 64bit via the .set gp=64 directive.
> 
> Since IP22 is the default MIPS machine, this is causing allnoconfig
> build failures.
> 
> Fixes: 1da177e4c3f4
> Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com>
> 
> Cc: stable@vger.kernel.org
> ---

 This GAS regression introduced with upstream binutils commit 919731affbef 
("Add MIPS .module directive") has been fixed with commit 22522f880a8e 
("MIPS/GAS: Fix an ISA override not lifting ABI restrictions") and release 
2.27 has been subsequently made.

 Moving forward with your workaround may still make sense, although it 
will bump the minimum binutils version to 2.18, which is when `.set gp=64' 
has been added only, from the advertised version 2.12; it may have already 
effectively happened due to changes elsewhere.  If doing so however, 
please be accurate with your commit description in that versions 2.25 and 
2.26 (and their patch releases) only rather than "recent" have been 
affected.

 See also: <http://lkml.iu.edu/hypermail/linux/kernel/1604.2/00187.html> 
and the discussion downthread.  Based on the conclusions made there I'd 
rather ban binutils 2.25 and 2.26 from use with the MIPS/Linux kernel as 
the problem with ISA restoration may lead to bad code generation.  So 
maybe we should really leave this piece unchanged, as a fatal trigger for 
unsupported binutils versions in the affected scenarios.

  Maciej

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web