From patchwork Thu Jan 22 15:16:14 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roel Kluin X-Patchwork-Id: 3600 X-Patchwork-Delegate: lethal@linux-sh.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n0MFBa6s023507 for ; Thu, 22 Jan 2009 07:11:37 -0800 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752508AbZAVPQS (ORCPT ); Thu, 22 Jan 2009 10:16:18 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752631AbZAVPQS (ORCPT ); Thu, 22 Jan 2009 10:16:18 -0500 Received: from ug-out-1314.google.com ([66.249.92.170]:47078 "EHLO ug-out-1314.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752508AbZAVPQR (ORCPT ); Thu, 22 Jan 2009 10:16:17 -0500 Received: by ug-out-1314.google.com with SMTP id 39so509575ugf.37 for ; Thu, 22 Jan 2009 07:16:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=mILVOC8zdUGfMXToEXOGLg6xs2VYNOzQrUb80b8ttcU=; b=MI8jmUjK05C8GsM6urUCA84iQA8LRpTm2DR77m1iOZXK4qTbG+O1SPG/wrrDOBeeAl 68qIJXBX2qs42K9jpLrP4LYg5edFQkQVBZFbB56sfcXKcVpAt2/XRAyDGjZMEvMnrIrY CPGI7qx2bdDHAMUAPYp2fwZPONLxqSfndoWds= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=EhFDRiVPPRPSOYu7HyOdNn8iJQ8mO3dcxkF1OWgQGP0d4u08KwUzaJAXlkLJdPvUBq 7APl/kdg620vAP9YYObPc5tXw94/P9SzLn1ITupwzVObLOZYhsl4RV7XE8ignu05VGJV eWTpDr9cjrx9+Hc7dG7caC8/hjjSPERXXvlB0= Received: by 10.67.100.5 with SMTP id c5mr3244711ugm.43.1232637375394; Thu, 22 Jan 2009 07:16:15 -0800 (PST) Received: from ?192.168.1.115? (d133062.upc-d.chello.nl [213.46.133.62]) by mx.google.com with ESMTPS id j4sm9282222ugf.16.2009.01.22.07.16.14 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 22 Jan 2009 07:16:14 -0800 (PST) Message-ID: <49788DBE.5010802@gmail.com> Date: Thu, 22 Jan 2009 16:16:14 +0100 From: Roel Kluin User-Agent: Thunderbird 2.0.0.18 (X11/20081105) MIME-Version: 1.0 To: Paul Mundt CC: linux-sh@vger.kernel.org Subject: Re: [PATCH] SH: fix start_thread and user_stack_pointer macros References: <497735BA.4060201@gmail.com> In-Reply-To: <497735BA.4060201@gmail.com> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org Fix macros start_thread and user_stack_pointer. When these macros aren't called with a variable named regs as second argument, this will result in a build failure. Signed-off-by: Roel Kluin --- Overlooked the start_thread macros in my first patch -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/sh/include/asm/kprobes.h b/arch/sh/include/asm/kprobes.h index 6078d8e..613644a 100644 --- a/arch/sh/include/asm/kprobes.h +++ b/arch/sh/include/asm/kprobes.h @@ -16,7 +16,7 @@ typedef u16 kprobe_opcode_t; ? (MAX_STACK_SIZE) \ : (((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR))) -#define regs_return_value(regs) ((regs)->regs[0]) +#define regs_return_value(_regs) ((_regs)->regs[0]) #define flush_insn_slot(p) do { } while (0) #define kretprobe_blacklist_size 0 diff --git a/arch/sh/include/asm/processor_32.h b/arch/sh/include/asm/processor_32.h index d79063c..dcaed24 100644 --- a/arch/sh/include/asm/processor_32.h +++ b/arch/sh/include/asm/processor_32.h @@ -108,12 +108,12 @@ extern int ubc_usercnt; /* * Do necessary setup to start up a newly executed thread. */ -#define start_thread(regs, new_pc, new_sp) \ +#define start_thread(_regs, new_pc, new_sp) \ set_fs(USER_DS); \ - regs->pr = 0; \ - regs->sr = SR_FD; /* User mode. */ \ - regs->pc = new_pc; \ - regs->regs[15] = new_sp + _regs->pr = 0; \ + _regs->sr = SR_FD; /* User mode. */ \ + _regs->pc = new_pc; \ + _regs->regs[15] = new_sp /* Forward declaration, a strange C thing */ struct task_struct; @@ -189,7 +189,7 @@ extern unsigned long get_wchan(struct task_struct *p); #define KSTK_EIP(tsk) (task_pt_regs(tsk)->pc) #define KSTK_ESP(tsk) (task_pt_regs(tsk)->regs[15]) -#define user_stack_pointer(regs) ((regs)->regs[15]) +#define user_stack_pointer(_regs) ((_regs)->regs[15]) #if defined(CONFIG_CPU_SH2A) || defined(CONFIG_CPU_SH3) || \ defined(CONFIG_CPU_SH4) diff --git a/arch/sh/include/asm/processor_64.h b/arch/sh/include/asm/processor_64.h index 803177f..5727d31 100644 --- a/arch/sh/include/asm/processor_64.h +++ b/arch/sh/include/asm/processor_64.h @@ -145,13 +145,13 @@ struct thread_struct { */ #define SR_USER (SR_MMU | SR_FD) -#define start_thread(regs, new_pc, new_sp) \ +#define start_thread(_regs, new_pc, new_sp) \ set_fs(USER_DS); \ - regs->sr = SR_USER; /* User mode. */ \ - regs->pc = new_pc - 4; /* Compensate syscall exit */ \ - regs->pc |= 1; /* Set SHmedia ! */ \ - regs->regs[18] = 0; \ - regs->regs[15] = new_sp + _regs->sr = SR_USER; /* User mode. */ \ + _regs->pc = new_pc - 4; /* Compensate syscall exit */ \ + _regs->pc |= 1; /* Set SHmedia ! */ \ + _regs->regs[18] = 0; \ + _regs->regs[15] = new_sp /* Forward declaration, a strange C thing */ struct task_struct; @@ -226,7 +226,7 @@ extern unsigned long get_wchan(struct task_struct *p); #define KSTK_EIP(tsk) ((tsk)->thread.pc) #define KSTK_ESP(tsk) ((tsk)->thread.sp) -#define user_stack_pointer(regs) ((regs)->regs[15]) +#define user_stack_pointer(_regs) ((_regs)->regs[15]) #endif /* __ASSEMBLY__ */ #endif /* __ASM_SH_PROCESSOR_64_H */