From patchwork Tue Mar 26 21:15:26 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Van Heukelum X-Patchwork-Id: 2350811 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 5D02C3FC8C for ; Wed, 27 Mar 2013 13:57:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3501CE6171 for ; Wed, 27 Mar 2013 06:57:09 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by gabe.freedesktop.org (Postfix) with ESMTP id E327FE5C54 for ; Tue, 26 Mar 2013 14:15:27 -0700 (PDT) Received: from compute2.internal (compute2.nyi.mail.srv.osa [10.202.2.42]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id E88DB2105C; Tue, 26 Mar 2013 17:15:26 -0400 (EDT) Received: from web3.nyi.mail.srv.osa ([10.202.2.213]) by compute2.internal (MEProxy); Tue, 26 Mar 2013 17:15:26 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.fm; h= message-id:from:to:cc:mime-version:content-transfer-encoding :content-type:in-reply-to:references:subject:date; s=mesmtp; bh= YNWzhEAmGKaiqbMRZU+4tw6XbMA=; b=Sz6njNJRTXieBj6lHXGSIkNImHhinHJI +veHCN/e4JrgJdiMLKY0TcQ8Jl9cL82QXY4V4bGW5ylE75lTYmHU3t+8kYXi62+o ZW3xHSE8KJhHCWtWuDZwSWKRDQJd+cFfjMKD1CYcXtlTkb56LWFiX2z4vT0R0+UB ZZAc9O9bXKs= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:from:to:cc:mime-version :content-transfer-encoding:content-type:in-reply-to:references :subject:date; s=smtpout; bh=YNWzhEAmGKaiqbMRZU+4tw6XbMA=; b=c6E TSLAkWC4EBKSNOE2tHKRU3INRflAsK9JspnongFq//2NUzJIosHUaLl6rq63YVsB Mgw0A1vY7ycG8UfI0Xij1t2UauHtJvNmowUpq/cbL7vd8YvUZM30mEa2f+JJX1+a +3VMUJoAn1GPqE0g6Lx3dP2z5VaelrXKxZomw+FQ= Received: by web3.nyi.mail.srv.osa (Postfix, from userid 99) id AB3E9881476; Tue, 26 Mar 2013 17:15:26 -0400 (EDT) Message-Id: <1364332526.8559.140661209554365.0203B0A4@webmail.messagingengine.com> X-Sasl-Enc: WAzNYtncXUKe8boQxb1/AedQB+/+nGxgqhv1pK5i3ogQ 1364332526 From: Alexander van Heukelum To: Hans de Bruin , Linux Kernel Mailing List , Al Viro MIME-Version: 1.0 X-Mailer: MessagingEngine.com Webmail Interface - html In-Reply-To: <514F6DF9.1070602@xmsnet.nl> References: <514F6DF9.1070602@xmsnet.nl> Date: Tue, 26 Mar 2013 22:15:26 +0100 X-Mailman-Approved-At: Wed, 27 Mar 2013 06:54:36 -0700 Cc: intel-gfx Subject: Re: [Intel-gfx] regression: grass turns red X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Hi Hans, Could you check if the attached patch solves your problem? Greetings, Alexander van Heukelum On Sun, Mar 24, 2013, at 22:19, Hans de Bruin wrote: > commit 49cb25e9290 x86: 'get rid of pt_regs argument in vm86/vm86old' > somehow breaks the colors when I play 'civilization I' under xdosemu. > During the intro of the game something the colors get messed up. When > the game begins the grass of the earth is red. Reverting the commit > fixes the problem. > > -- > Hans > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ > > From 2b09f37fd9defc02c6da9900e23418a401d7a2b9 Mon Sep 17 00:00:00 2001 From: Alexander van Heukelum Date: Tue, 26 Mar 2013 21:57:43 +0100 Subject: [PATCH] x86, vm86: fix VM86 syscalls: use asmlinkage calling convention This might solve the issue of the red grass in 'civilization I' under xdosemu. Commit 49cb25e9290 x86: 'get rid of pt_regs argument in vm86/vm86old' got rid of the pt_regs stub for sys_vm86old and sys_vm86. The functions were, however, not changed to use the asmlinkage calling convention. Signed-off-by: Alexander van Heukelum --- arch/x86/include/asm/syscalls.h | 4 ++-- arch/x86/kernel/vm86_32.c | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/x86/include/asm/syscalls.h b/arch/x86/include/asm/syscalls.h index 6cf0a9c..a245b88 100644 --- a/arch/x86/include/asm/syscalls.h +++ b/arch/x86/include/asm/syscalls.h @@ -37,8 +37,8 @@ asmlinkage int sys_get_thread_area(struct user_desc __user *); unsigned long sys_sigreturn(void); /* kernel/vm86_32.c */ -int sys_vm86old(struct vm86_struct __user *); -int sys_vm86(unsigned long, unsigned long); +asmlinkage int sys_vm86old(struct vm86_struct __user *); +asmlinkage int sys_vm86(unsigned long, unsigned long); #else /* CONFIG_X86_32 */ diff --git a/arch/x86/kernel/vm86_32.c b/arch/x86/kernel/vm86_32.c index 1cf5766..7f72807 100644 --- a/arch/x86/kernel/vm86_32.c +++ b/arch/x86/kernel/vm86_32.c @@ -202,7 +202,7 @@ out: static int do_vm86_irq_handling(int subfunction, int irqnumber); static void do_sys_vm86(struct kernel_vm86_struct *info, struct task_struct *tsk); -int sys_vm86old(struct vm86_struct __user *v86) +asmlinkage int sys_vm86old(struct vm86_struct __user *v86) { struct kernel_vm86_struct info; /* declare this _on top_, * this avoids wasting of stack space. @@ -227,11 +227,12 @@ int sys_vm86old(struct vm86_struct __user *v86) do_sys_vm86(&info, tsk); ret = 0; /* we never return here */ out: + asmlinkage_protect(1, ret, v86); return ret; } -int sys_vm86(unsigned long cmd, unsigned long arg) +asmlinkage int sys_vm86(unsigned long cmd, unsigned long arg) { struct kernel_vm86_struct info; /* declare this _on top_, * this avoids wasting of stack space. @@ -278,6 +279,7 @@ int sys_vm86(unsigned long cmd, unsigned long arg) do_sys_vm86(&info, tsk); ret = 0; /* we never return here */ out: + asmlinkage_protect(2, ret, cmd, arg); return ret; } -- 1.8.1.2