From patchwork Fri Mar 26 21:47:51 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Landley X-Patchwork-Id: 48726 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id B7C96B7CED for ; Sat, 27 Mar 2010 08:52:19 +1100 (EST) Received: from localhost ([127.0.0.1]:45511 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NvHRv-0000iB-Jm for incoming@patchwork.ozlabs.org; Fri, 26 Mar 2010 17:52:15 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NvHO4-0006xX-34 for qemu-devel@nongnu.org; Fri, 26 Mar 2010 17:48:16 -0400 Received: from [140.186.70.92] (port=35111 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NvHO2-0006vE-LM for qemu-devel@nongnu.org; Fri, 26 Mar 2010 17:48:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NvHO0-0004f9-Mb for qemu-devel@nongnu.org; Fri, 26 Mar 2010 17:48:14 -0400 Received: from static-71-162-243-5.phlapa.fios.verizon.net ([71.162.243.5]:51649 helo=grelber.thyrsus.com) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NvHO0-0004f2-I1 for qemu-devel@nongnu.org; Fri, 26 Mar 2010 17:48:12 -0400 Received: from landley.net (localhost [127.0.0.1]) by grelber.thyrsus.com (Postfix) with ESMTP id 8DF979F0155; Fri, 26 Mar 2010 17:47:19 -0400 (EDT) From: Rob Landley Organization: Boundaries Unlimited To: Aurelien Jarno Subject: Re: [Qemu-devel] Significant performance regression in qemu-system-mips. Date: Fri, 26 Mar 2010 16:47:51 -0500 User-Agent: KMail/1.11.2 (Linux/2.6.28-18-generic; KDE/4.2.2; x86_64; ; ) References: <201003241534.01219.rob@landley.net> <201003260453.03645.rob@landley.net> <20100326190000.GA26730@hall.aurel32.net> In-Reply-To: <20100326190000.GA26730@hall.aurel32.net> MIME-Version: 1.0 Content-Disposition: inline Message-Id: <201003261647.52349.rob@landley.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) Cc: qemu-devel@nongnu.org, Artyom Tarasenko X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org On Friday 26 March 2010 14:00:00 Aurelien Jarno wrote: > > I'm not asking anyone to care about me personally, I'm asking them to > > care about specific technical issues. If those issues don't interest > > you, they don't interest you. > > > > Speaking of ppc, last month I sent this patch: > > > > http://lists.gnu.org/archive/html/qemu-devel/2010-02/msg00917.html > > > > And I was under the impression people agreed with it: > > > > http://lists.gnu.org/archive/html/qemu-devel/2010-02/msg01044.html > > http://lists.gnu.org/archive/html/qemu-devel/2010-02/msg01714.html > > > > But today's -git is still having that same issue, and the same patch > > still applies cleanly and fixes it for me. > > Re-read the last link you quoted, and especially this part: > | The > | same way using CONFIG_BSD in linux-user/elfload.c doesn't make sense, > | as this code will never been compiled. I didn't know the BSD comments werer addressed at me. (I haven't got a BSD test system.) > While your patch goes in the good direction, it doesn't mean it is > correct. Conditionally compiling code on CONFIG_BSD in a Linux specific > file doesn't make sense. Ok. > I am pretty fine applying a correct patch if you send a new one. By which you mean rip out the whole #ifdef block? Here you go: Re-tested and it works fine for me. > I have no problem with you having no interest in sh4, a lot of people > are in you case. I don't think it gives you the right to describe the > sh4 kernel maintainer as "sh4 linux-kernel maintainer officially doesn't > care about anybody who isn't employed by his company", or later "It's > not real hardware, it's a one-company toy". This is not something > reflected in link you quoted. Paul Mundt has been nicely answering your > question on this thread. Ok, I agree I was a bit harsh. (He's the one who introduced his employer into the discussion, but I suspect I read more into that than he meant by it.) But this doesn't revive my interest in the platform. He did confirm that he doesn't care if users of even six-month-old tools could still build the thing, and that he was willing to break toolchains that had built existing usable kernels for years in the name of cleanup patches. Add in the fact that I've never encountered anyone actually using this hardware since the Dreamcast, and that the first, third, and fourth hits googling for "sh4" are the video games Silent Hunter 4 and Silent Hill 4. (The first four hits for "arm" are the processor despite everybody having two of that word attached to their shoulders...) Rob diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 682a813..44405dd 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -518,12 +518,11 @@ do { \ static inline void init_thread(struct target_pt_regs *_regs, struct image_info *infop) { abi_ulong pos = infop->start_stack; - abi_ulong tmp; #if defined(TARGET_PPC64) && !defined(TARGET_ABI32) abi_ulong entry, toc; #endif - _regs->gpr[1] = infop->start_stack; + _regs->gpr[1] = pos; #if defined(TARGET_PPC64) && !defined(TARGET_ABI32) entry = ldq_raw(infop->entry) + infop->load_addr; toc = ldq_raw(infop->entry + 8) + infop->load_addr; @@ -531,17 +530,6 @@ static inline void init_thread(struct target_pt_regs *_regs, struct image_info * infop->entry = entry; #endif _regs->nip = infop->entry; - /* Note that isn't exactly what regular kernel does - * but this is what the ABI wants and is needed to allow - * execution of PPC BSD programs. - */ - /* FIXME - what to for failure of get_user()? */ - get_user_ual(_regs->gpr[3], pos); - pos += sizeof(abi_ulong); - _regs->gpr[4] = pos; - for (tmp = 1; tmp != 0; pos += sizeof(abi_ulong)) - tmp = ldl(pos); - _regs->gpr[5] = pos; } #define ELF_EXEC_PAGESIZE 4096