Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752025AbbBVGVN (ORCPT ); Sun, 22 Feb 2015 01:21:13 -0500 Received: from mail1.asahi-net.or.jp ([202.224.39.197]:35778 "EHLO mail1.asahi-net.or.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751072AbbBVGVK (ORCPT ); Sun, 22 Feb 2015 01:21:10 -0500 Date: Sun, 22 Feb 2015 15:21:08 +0900 Message-ID: <87wq3a31rf.wl-ysato@users.sourceforge.jp> From: Yoshinori Sato To: Al Viro Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org Subject: Re: [PATCH v4 05/15] h8300: Process and signal In-Reply-To: <20150221095123.GV29656@ZenIV.linux.org.uk> References: <1424505239-7082-1-git-send-email-ysato@users.sourceforge.jp> <1424505239-7082-6-git-send-email-ysato@users.sourceforge.jp> <20150221095123.GV29656@ZenIV.linux.org.uk> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL/10.8 EasyPG/1.0.0 Emacs/24.4 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1358 Lines: 49 At Sat, 21 Feb 2015 09:51:23 +0000, Al Viro wrote: > > On Sat, Feb 21, 2015 at 04:53:49PM +0900, Yoshinori Sato wrote: > > > +static inline void * > > +get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size) > > +{ > > + unsigned long usp; > > + > > + /* Default to using normal stack. */ > > + usp = rdusp(); > > + > > + /* This is the X/Open sanctioned signal stack switching. */ > > + if (ka->sa.sa_flags & SA_ONSTACK) { > > + if (!sas_ss_flags(usp)) > > + usp = current->sas_ss_sp + current->sas_ss_size; > > + } > > Use sigsp(), please. Pass ksig to that sucker and it'll become > return (void *)((sigsp(rdusp, ksig) - frame_size) & -8UL); OK. > > > +static void do_signal(struct pt_regs *regs) > > + * We want the common case to go fast, which > > + * is why we may in certain cases get here from > > + * kernel mode. Just return without doing anything > > + * if so. > > + */ > > + if ((regs->ccr & 0x10)) > > + return; > > Can we get there in kernel mode, actually? It case checking for entry.S Removed. Thanks. -- Yoshinori Sato -- 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/