From patchwork Sat May 24 07:02:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Pinski X-Patchwork-Id: 30873 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qg0-f70.google.com (mail-qg0-f70.google.com [209.85.192.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2167C20676 for ; Sat, 24 May 2014 07:04:33 +0000 (UTC) Received: by mail-qg0-f70.google.com with SMTP id i50sf13309806qgf.5 for ; Sat, 24 May 2014 00:04:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:to:to:to:sender:precedence :list-id:x-original-sender:x-original-authentication-results :mailing-list:list-post:list-help:list-archive:list-unsubscribe; bh=tqFnEs4EJQimtVtkKMOsAIBwRkdDtW0gY+9xQGS+mZo=; b=KYGRLuH1936x0Klz7n9ZYwooB83r/YKa/FI7TR3ZCwmVdp/GCh00Cu2pI/8dyR6uMI MOeYXZg7lyJ/eUAfOQ9H6bjBgK5F7eas8Oi7ppjKZWvqul2fJksvpaoxQRaFMKwU47cg IktjATf6CBRd/ucgCBg5bG4z3MRw8wea+FHniW8b4sxkA8hrMgeQbjlgKdTwHQhATDEX cYyaQpN7FYGbwcCQIYlHbSNJLmVb7rrSMfVaUlaa6YidAu6ESejk7jUjZZygHv+JOfbZ qgDdnUNYGhAM+KZshwqd4OZX5W55ZrdI8E3yAEgKXU/QO8l+a2qgPlIIcEXWBx6AIA+H 7NUA== X-Gm-Message-State: ALoCoQlhSwmVwFxYAXd7BLv6dbxYyekmXi8E4EzNyvxN9Iwcue9mUw2kQSD5W9rWA7Yor10nZ5iz X-Received: by 10.224.127.74 with SMTP id f10mr320138qas.3.1400915073002; Sat, 24 May 2014 00:04:33 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.106.98 with SMTP id d89ls2031869qgf.57.gmail; Sat, 24 May 2014 00:04:32 -0700 (PDT) X-Received: by 10.221.58.144 with SMTP id wk16mr8551554vcb.23.1400915072895; Sat, 24 May 2014 00:04:32 -0700 (PDT) Received: from mail-vc0-f178.google.com (mail-vc0-f178.google.com [209.85.220.178]) by mx.google.com with ESMTPS id yh1si3057155vec.100.2014.05.24.00.04.32 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 24 May 2014 00:04:32 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.178 as permitted sender) client-ip=209.85.220.178; Received: by mail-vc0-f178.google.com with SMTP id ij19so3872483vcb.23 for ; Sat, 24 May 2014 00:04:32 -0700 (PDT) X-Received: by 10.52.125.198 with SMTP id ms6mr6998525vdb.28.1400915072823; Sat, 24 May 2014 00:04:32 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp87453vcb; Sat, 24 May 2014 00:04:32 -0700 (PDT) X-Received: by 10.68.202.230 with SMTP id kl6mr12116200pbc.55.1400915072006; Sat, 24 May 2014 00:04:32 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id go5si6807001pbc.147.2014.05.24.00.04.30 for ; Sat, 24 May 2014 00:04:30 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751947AbaEXHEO (ORCPT + 27 others); Sat, 24 May 2014 03:04:14 -0400 Received: from mail-ie0-f180.google.com ([209.85.223.180]:38626 "EHLO mail-ie0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751387AbaEXHCZ (ORCPT ); Sat, 24 May 2014 03:02:25 -0400 Received: by mail-ie0-f180.google.com with SMTP id tp5so5971466ieb.11 for ; Sat, 24 May 2014 00:02:24 -0700 (PDT) X-Received: by 10.50.153.8 with SMTP id vc8mr10106763igb.16.1400914944282; Sat, 24 May 2014 00:02:24 -0700 (PDT) Received: from localhost.localdomain (64.2.3.195.ptr.us.xo.net. [64.2.3.195]) by mx.google.com with ESMTPSA id w4sm10003040igl.7.2014.05.24.00.02.22 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Sat, 24 May 2014 00:02:23 -0700 (PDT) Received: from localhost.localdomain (apinskidesktop [127.0.0.1]) by localhost.localdomain (8.14.3/8.14.3/Debian-9.4) with ESMTP id s4O72LW3009766 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO); Sat, 24 May 2014 00:02:21 -0700 Received: (from apinski@localhost) by localhost.localdomain (8.14.3/8.14.3/Submit) id s4O72LjF009765; Sat, 24 May 2014 00:02:21 -0700 From: Andrew Pinski To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Andrew Pinski Subject: [PATCH 06/24] Allow for some signal structures to be the same between a 32bit ABI and the 64bit ABI. Date: Sat, 24 May 2014 00:02:01 -0700 Message-Id: <1400914939-9708-7-git-send-email-apinski@cavium.com> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1400914939-9708-1-git-send-email-apinski@cavium.com> References: <1400914939-9708-1-git-send-email-apinski@cavium.com> To: linux-arm-kernel@lists.infradead.org To: linux-kernel@vger.kernel.org To: linux-arch@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: apinski@cavium.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.178 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , In ARM64, we want to allow the signal related structures to be same between the 32bit (ILP32) and the 64bit ABIs (LP64). We still want to use the generic include files so we need some new defines that are used in UAPI; they default to the same as it is before. Thanks, Andrew Pinski Signed-off-by: Andrew Pinski --- include/uapi/asm-generic/siginfo.h | 17 +++++++++++++---- include/uapi/asm-generic/signal.h | 27 +++++++++++++++++++++++---- 2 files changed, 36 insertions(+), 8 deletions(-) diff --git a/include/uapi/asm-generic/siginfo.h b/include/uapi/asm-generic/siginfo.h index ba5be7f..553aca9 100644 --- a/include/uapi/asm-generic/siginfo.h +++ b/include/uapi/asm-generic/siginfo.h @@ -4,9 +4,17 @@ #include #include +#ifndef __SIGINFO_VOIDPOINTER +#define __SIGINFO_VOIDPOINTER(field) void __user *field +#endif + +#ifndef __SIGINFO_BAND +#define __SIGINFO_BAND(field) __ARCH_SI_BAND_T field +#endif + typedef union sigval { int sival_int; - void __user *sival_ptr; + __SIGINFO_VOIDPOINTER(sival_ptr); } sigval_t; /* @@ -86,7 +94,7 @@ typedef struct siginfo { /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */ struct { - void __user *_addr; /* faulting insn/memory ref. */ + __SIGINFO_VOIDPOINTER(_addr); /* faulting insn/memory ref. */ #ifdef __ARCH_SI_TRAPNO int _trapno; /* TRAP # which caused the signal */ #endif @@ -95,13 +103,13 @@ typedef struct siginfo { /* SIGPOLL */ struct { - __ARCH_SI_BAND_T _band; /* POLL_IN, POLL_OUT, POLL_MSG */ + __SIGINFO_BAND(_band); /* POLL_IN, POLL_OUT, POLL_MSG */ int _fd; } _sigpoll; /* SIGSYS */ struct { - void __user *_call_addr; /* calling user insn */ + __SIGINFO_VOIDPOINTER(_call_addr); /* calling user insn */ int _syscall; /* triggering system call number */ unsigned int _arch; /* AUDIT_ARCH_* of syscall */ } _sigsys; @@ -283,6 +291,7 @@ typedef struct sigevent { int _pad[SIGEV_PAD_SIZE]; int _tid; + /* Note these two are handled only in userspace */ struct { void (*_function)(sigval_t); void *_attribute; /* really pthread_attr_t */ diff --git a/include/uapi/asm-generic/signal.h b/include/uapi/asm-generic/signal.h index 9df61f1..c4ce238 100644 --- a/include/uapi/asm-generic/signal.h +++ b/include/uapi/asm-generic/signal.h @@ -4,7 +4,9 @@ #include #define _NSIG 64 +#ifndef _NSIG_BPW #define _NSIG_BPW __BITS_PER_LONG +#endif #define _NSIG_WORDS (_NSIG / _NSIG_BPW) #define SIGHUP 1 @@ -83,9 +85,13 @@ #define MINSIGSTKSZ 2048 #define SIGSTKSZ 8192 +#ifndef __SIGSET_INNER_TYPE +#define __SIGSET_INNER_TYPE unsigned long +#endif + #ifndef __ASSEMBLY__ typedef struct { - unsigned long sig[_NSIG_WORDS]; + __SIGSET_INNER_TYPE sig[_NSIG_WORDS]; } sigset_t; /* not actually used, but required for linux/syscalls.h */ @@ -98,11 +104,24 @@ typedef unsigned long old_sigset_t; #endif #ifndef __KERNEL__ + +#ifndef __SIGACTION_HANDLER +#define __SIGACTION_HANDLER(field) __sighandler_t field +#endif + +#ifndef __SIGACTION_FLAGS +#define __SIGACTION_FLAGS(field) unsigned long field +#endif + +#ifndef __SIGACTION_RESTORER +#define __SIGACTION_RESTORER(field) __sigrestore_t field +#endif + struct sigaction { - __sighandler_t sa_handler; - unsigned long sa_flags; + __SIGACTION_HANDLER(sa_handler); + __SIGACTION_FLAGS(sa_flags); #ifdef SA_RESTORER - __sigrestore_t sa_restorer; + __SIGACTION_RESTORER(sa_restorer); #endif sigset_t sa_mask; /* mask last for extensibility */ };