From patchwork Sat May 24 07:02:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Pinski X-Patchwork-Id: 30871 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f72.google.com (mail-pa0-f72.google.com [209.85.220.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0C1F72066E for ; Sat, 24 May 2014 07:04:17 +0000 (UTC) Received: by mail-pa0-f72.google.com with SMTP id rd3sf23386468pab.3 for ; Sat, 24 May 2014 00:04:17 -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:sender:precedence :list-id:x-original-sender:x-original-authentication-results :mailing-list:list-post:list-help:list-archive:list-unsubscribe; bh=GyDLWtoMG0exDKNnMPTDsyxyX9GkTHGmxS+UE7ulPQ4=; b=f61Er8ONOTID9n9Zvwj3ybg8fgKgE43XSbIZIkPSuJEsYRWOtCs0IR1Z5AUr/XRJwQ 53iFjz17nPMbC35WnmZa1Cy1m6GJHI24JLS2rZuy1Dp3YLzCGbA9denMl1aeY0Fb0/kD 4yH1ldykRsUB753RpQq3ZDa/U1Gof3fZcXb0Sv/J4v3HQ5tVlSCrEDwzIQQdwVZJxCgS 91JNout1j45+7xOqn+TWA+QYMQ/HsP6+GEbBf00GoCj5McQj/wZj8HaTQQRrkdc4qZyp SEVVs0QfgWNy/9NFnvXSq1xhZ/AdqFY4UqJ+Tk4A5Kkv2yvmOIJx8i5vklOgG/7E/Ewh OiNA== X-Gm-Message-State: ALoCoQk6FmBcFxxQ0Rux+AExPoB5MUHrCv6XDYB56cTdilVUce4roW4v2Hs1gw3qWk6nbOCAilcq X-Received: by 10.66.157.138 with SMTP id wm10mr4666154pab.23.1400915057363; Sat, 24 May 2014 00:04:17 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.94.118 with SMTP id f109ls2031781qge.8.gmail; Sat, 24 May 2014 00:04:17 -0700 (PDT) X-Received: by 10.52.74.196 with SMTP id w4mr7131250vdv.19.1400915057186; Sat, 24 May 2014 00:04:17 -0700 (PDT) Received: from mail-vc0-f180.google.com (mail-vc0-f180.google.com [209.85.220.180]) by mx.google.com with ESMTPS id gg3si3081811veb.2.2014.05.24.00.04.17 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 24 May 2014 00:04:17 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.180 as permitted sender) client-ip=209.85.220.180; Received: by mail-vc0-f180.google.com with SMTP id hy4so7310137vcb.11 for ; Sat, 24 May 2014 00:04:17 -0700 (PDT) X-Received: by 10.58.246.132 with SMTP id xw4mr8744951vec.2.1400915057106; Sat, 24 May 2014 00:04:17 -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 ib8csp87428vcb; Sat, 24 May 2014 00:04:16 -0700 (PDT) X-Received: by 10.68.143.231 with SMTP id sh7mr11765091pbb.7.1400915056273; Sat, 24 May 2014 00:04:16 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id xj7si6855166pbc.33.2014.05.24.00.04.15 for ; Sat, 24 May 2014 00:04:15 -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 S1751880AbaEXHEL (ORCPT + 27 others); Sat, 24 May 2014 03:04:11 -0400 Received: from mail-ig0-f182.google.com ([209.85.213.182]:54333 "EHLO mail-ig0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751389AbaEXHCZ (ORCPT ); Sat, 24 May 2014 03:02:25 -0400 Received: by mail-ig0-f182.google.com with SMTP id uy17so1523320igb.3 for ; Sat, 24 May 2014 00:02:24 -0700 (PDT) X-Received: by 10.50.130.37 with SMTP id ob5mr10040783igb.46.1400914944633; 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 ii6sm9990848igb.17.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 s4O72Ls9009770 (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 s4O72LTX009769; 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 07/24] ARM64:ILP32: Use the same size and layout of the signal structures for ILP32 as for LP64. Date: Sat, 24 May 2014 00:02:02 -0700 Message-Id: <1400914939-9708-8-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 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.180 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: , Defines the macros which allow the signal structures to be the same between ILP32 and LP64. Thanks, Andrew Pinski Signed-off-by: Andrew Pinski --- arch/arm64/include/uapi/asm/siginfo.h | 21 +++++++++++++++++++++ arch/arm64/include/uapi/asm/signal.h | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 0 deletions(-) diff --git a/arch/arm64/include/uapi/asm/siginfo.h b/arch/arm64/include/uapi/asm/siginfo.h index 5a74a08..1a6aa32 100644 --- a/arch/arm64/include/uapi/asm/siginfo.h +++ b/arch/arm64/include/uapi/asm/siginfo.h @@ -1,5 +1,6 @@ /* * Copyright (C) 2012 ARM Ltd. + * Copyright (C) 2014 Cavium Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -18,6 +19,26 @@ #define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) +#ifdef __ILP32__ +# ifdef __AARCH64EB__ +# define __SIGINFO_INNER(type, field) \ + int __pad#field; \ + type field +# else +# define __SIGINFO_INNER(type, field) \ + type field; \ + int __pad#field +# endif + +# undef __SIGINFO_VOIDPOINTER +# define __SIGINFO_VOIDPOINTER(field) \ + __SIGINFO_INNER(void __user*, field) +# undef __SIGINFO_BAND + +# define __SIGINFO_BAND(field) \ + __SIGINFO_INNER(long, field) +#endif + #include #endif diff --git a/arch/arm64/include/uapi/asm/signal.h b/arch/arm64/include/uapi/asm/signal.h index 8d1e723..d90d53b 100644 --- a/arch/arm64/include/uapi/asm/signal.h +++ b/arch/arm64/include/uapi/asm/signal.h @@ -19,6 +19,38 @@ /* Required for AArch32 compatibility. */ #define SA_RESTORER 0x04000000 +/* For ILP32, sigset should be the same size fields as LP64 so use + unsigned long long. */ +#ifdef __ILP32__ +#define __SIGSET_INNER_TYPE __extension__ unsigned long long +#define _NSIG_BPW 64 + +# ifdef __AARCH64EB__ +# define __SIGNAL_INNER(type, field) \ + __extension__ struct { \ + int __pad_##field; \ + type field; \ + } __attribute__((aligned(8))) +# else +# define __SIGNAL_INNER(type, field) \ + __extension__ struct { \ + type field; \ + int __pad_##field; \ + } __attribute__((aligned(8))) +# endif + +# define __SIGACTION_HANDLER(field) \ + __SIGNAL_INNER(__sighandler_t, field) + + +#define __SIGACTION_FLAGS(field) \ + __extension__ unsigned long long field + +#define __SIGACTION_RESTORER(field) \ + __SIGNAL_INNER(__sigrestore_t, field) + +#endif + #include #endif