Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 08 Apr 2014 13:25:33 +0200 (CEST) Received: from localhost.localdomain ([127.0.0.1]:39621 "EHLO localhost.localdomain" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S6820489AbaDHLZ2dtKhR (ORCPT ); Tue, 8 Apr 2014 13:25:28 +0200 Date: Tue, 8 Apr 2014 12:25:28 +0100 (BST) From: "Maciej W. Rozycki" To: Thomas Bogendoerfer cc: Ralf Baechle , linux-mips@linux-mips.org Subject: Re: [PATCH] DEC/SNI: O32 wrapper stack switching fixes In-Reply-To: <20140408065306.GA23935@alpha.franken.de> Message-ID: References: <20140407221920.GA9418@alpha.franken.de> <20140408065306.GA23935@alpha.franken.de> User-Agent: Alpine 2.11 (LFD 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 39703 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: macro@linux-mips.org Precedence: bulk List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: linux-mips X-List-ID: linux-mips List-subscribe: List-owner: List-post: List-archive: X-list: linux-mips On Tue, 8 Apr 2014, Thomas Bogendoerfer wrote: > > That is rather dangerous, if you do not dare debugging this yourself, can > > you build arch/mips/mm/page.c with -DDEBUG somehow so that it dumps the > > I didn't get that to work :-( I'm fairly sure you can pass that down with CPPFLAGS_page.o (or maybe CFLAGS_page.o), e.g.: $ make CPPFLAGS_page.o=-DDEBUG arch/mips/mm/page.o $ make vmlinux but if that fails for some reason you could always just paste: #define DEBUG at the top of page.c, before headers are included. ;) You might have to tweak the default console log level, I reckon there's a config option these days, or otherwise just put "debug" somewhere on the kernel command line. > > machine code generated by these two helpers and we can see what's going on > > here and maybe where the overflow is? > > but adding more info to the debug message showed it's a simm field > overflow. > > It didn't like > > uasm_i_lui(&buf, AT, 0xa000); > > which is only created for R4600 rev 2.0 CPUs. Aha, in GAS LUI accepts an unsigned 16-bit immediate, so I think our kernel should do the same. > Will send a fix for that. Great, thanks! Maciej