From patchwork Wed Sep 3 21:19:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Pinski X-Patchwork-Id: 36645 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f70.google.com (mail-qa0-f70.google.com [209.85.216.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4EDA7202E4 for ; Wed, 3 Sep 2014 21:21:36 +0000 (UTC) Received: by mail-qa0-f70.google.com with SMTP id j7sf26116053qaq.9 for ; Wed, 03 Sep 2014 14:21:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:cc:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:content-type:content-transfer-encoding; bh=WYOztPefpr4lO0+jyYV1Pua2j6qJ5N1UmRqcY64OshE=; b=h3+LTgeuxs2J8KDsIKQI3Iw22DU/mxKjSIYMuEZf6FdfKIOFDRELyHwRrmIjIaGC4z s3ZRMiYRpSx3hCzQLy3MxXwB8LbMkZAcoSJhu3OPCS0Zx+eXR34v7RUeLnWnMaWAHmZl J0FIr1cnZeNKyrgK2k6UruR4I8ipBLxDj38PyK3Gfgn3AVmbea/UlUtGkUEXY6m3Y169 tAWn6EHHnfTNDJSkrb/17gMQR+d+vZrDwRWYFu81C00ODkmfs9yxGxMFmwMFilGND0W6 qLBP0r3bbO4tyDXlr1A6Ub8abrwE+1ge43Q4kjQt8G7XLJA/dhq8EQPseu4kOcFV94p8 W+Iw== X-Gm-Message-State: ALoCoQlmuhUq9p3ha+hM6RFcNm/n++OWZBMPxVSZuCgrTrF7BwZTb0JXotmSAWV+OA1bA24K/upe X-Received: by 10.236.34.233 with SMTP id s69mr159004yha.57.1409779292698; Wed, 03 Sep 2014 14:21:32 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.27.242 with SMTP id 105ls16324qgx.17.gmail; Wed, 03 Sep 2014 14:21:32 -0700 (PDT) X-Received: by 10.52.165.129 with SMTP id yy1mr114204vdb.57.1409779292592; Wed, 03 Sep 2014 14:21:32 -0700 (PDT) Received: from mail-vc0-f174.google.com (mail-vc0-f174.google.com [209.85.220.174]) by mx.google.com with ESMTPS id ck3si4431874vcb.102.2014.09.03.14.21.32 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 03 Sep 2014 14:21:32 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.174 as permitted sender) client-ip=209.85.220.174; Received: by mail-vc0-f174.google.com with SMTP id hy4so9673999vcb.33 for ; Wed, 03 Sep 2014 14:21:32 -0700 (PDT) X-Received: by 10.52.73.202 with SMTP id n10mr27982vdv.86.1409779292514; Wed, 03 Sep 2014 14:21: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.221.45.67 with SMTP id uj3csp740210vcb; Wed, 3 Sep 2014 14:21:32 -0700 (PDT) X-Received: by 10.66.227.225 with SMTP id sd1mr160851pac.106.1409779291290; Wed, 03 Sep 2014 14:21:31 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id y6si13604790pde.9.2014.09.03.14.21.29 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Sep 2014 14:21:29 -0700 (PDT) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XPHy3-0002eR-DL; Wed, 03 Sep 2014 21:19:51 +0000 Received: from mail-ig0-f173.google.com ([209.85.213.173]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XPHxz-0002X0-Sy for linux-arm-kernel@lists.infradead.org; Wed, 03 Sep 2014 21:19:48 +0000 Received: by mail-ig0-f173.google.com with SMTP id h18so1618275igc.0 for ; Wed, 03 Sep 2014 14:19:28 -0700 (PDT) X-Received: by 10.51.17.2 with SMTP id ga2mr267486igd.2.1409779168164; Wed, 03 Sep 2014 14:19:28 -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 hb9sm6490927igb.17.2014.09.03.14.19.25 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 03 Sep 2014 14:19:26 -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 s83LJPng031055 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO); Wed, 3 Sep 2014 14:19:25 -0700 Received: (from apinski@localhost) by localhost.localdomain (8.14.3/8.14.3/Submit) id s83LJPSc031054; Wed, 3 Sep 2014 14:19:25 -0700 From: Andrew Pinski To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, pinskia@gmail.com Subject: [PATCH 11/24] ARM64: Add is_ilp32_compat_task and is_ilp32_compat_thread Date: Wed, 3 Sep 2014 14:19:05 -0700 Message-Id: <1409779158-30963-12-git-send-email-apinski@cavium.com> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1409779158-30963-1-git-send-email-apinski@cavium.com> References: <1409779158-30963-1-git-send-email-apinski@cavium.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140903_141947_982792_3FD22B75 X-CRM114-Status: GOOD ( 12.76 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.213.173 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.213.173 listed in wl.mailspike.net] -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders Cc: Andrew Pinski X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.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.174 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 This patch adds the functions which returns if the current task is an ILP32 task and one returns if the thread is an ILP32 thread. Signed-off-by: Andrew Pinski --- arch/arm64/include/asm/compat.h | 22 ++++++++++++++++++++++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git a/arch/arm64/include/asm/compat.h b/arch/arm64/include/asm/compat.h index 8fcfb29..9082b27 100644 --- a/arch/arm64/include/asm/compat.h +++ b/arch/arm64/include/asm/compat.h @@ -332,5 +332,27 @@ static inline int is_a32_compat_thread(struct thread_info *thread) } #endif +#ifdef CONFIG_ARM64_ILP32 +static inline int is_ilp32_compat_task(void) +{ + return test_thread_flag(TIF_32BIT) && !is_a32_compat_task(); +} +static inline int is_ilp32_compat_thread(struct thread_info *thread) +{ + return test_ti_thread_flag(thread, TIF_32BIT) && + !is_a32_compat_thread(thread); +} +#else +static inline int is_ilp32_compat_task(void) +{ + return 0; +} +static inline int is_ilp32_compat_thread(struct thread_info *thread) +{ + return 0; +} +#endif + + #endif /* __KERNEL__ */ #endif /* __ASM_COMPAT_H */