From patchwork Wed Sep 3 21:19:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Pinski X-Patchwork-Id: 36656 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f71.google.com (mail-pa0-f71.google.com [209.85.220.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DED10202E4 for ; Wed, 3 Sep 2014 21:23:34 +0000 (UTC) Received: by mail-pa0-f71.google.com with SMTP id et14sf87317735pad.10 for ; Wed, 03 Sep 2014 14:23:34 -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:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=ptlAT4x+Bg3s/Drpis860PmTWih0i6bEgk8OWp+a3j4=; b=f6mvj0qP7b3VFC53nHizQSBUchqGD1PqW0ATSmSlSAUa4r2W60JS4P6WNcjY5Zjxtw yRzkdoHaG1tM4Tw/l2Ad86wfsAnqGQr7wOiDKlpxhnZctVRFL/lsXNAsIo20iLO1VbHq mcg/r8PLAxYd5UKLhNAzaLVD/mYT6UyJaPdCzZnVv7qkbmNyBzBPaMOmsPbSERWZb4Ol Z0vInCLa2fnOZo6zbH9s+4IrA9vYfsZ0hIaemd10B2BPpENOxJxMj2HlfSl7HvrLmHIU vWjlrzo1JkSjmyz3jWvVu+jx9vLRWj4esn2xa97O/WKj4WgEWBF09ZvW65J5OkLCJAVp Fnfg== X-Gm-Message-State: ALoCoQlGAPks/lUqi/mLlOGTmU3vu9RBurHjhFpA7aMDrT2xjkRe/F19QzhP+Z8nW2R/JJEw9zxu X-Received: by 10.70.96.197 with SMTP id du5mr112797pdb.3.1409779413061; Wed, 03 Sep 2014 14:23:33 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.86.9 with SMTP id o9ls14949qgd.47.gmail; Wed, 03 Sep 2014 14:23:32 -0700 (PDT) X-Received: by 10.220.163.130 with SMTP id a2mr67356vcy.52.1409779412905; Wed, 03 Sep 2014 14:23: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 fj7si4466931vcb.13.2014.09.03.14.23.32 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 03 Sep 2014 14:23: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 hy4so9451851vcb.5 for ; Wed, 03 Sep 2014 14:23:32 -0700 (PDT) X-Received: by 10.52.119.229 with SMTP id kx5mr70834vdb.40.1409779412647; Wed, 03 Sep 2014 14:23: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 uj3csp740437vcb; Wed, 3 Sep 2014 14:23:32 -0700 (PDT) X-Received: by 10.70.119.1 with SMTP id kq1mr47375pdb.35.1409779411814; Wed, 03 Sep 2014 14:23:31 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ii1si13311646pac.155.2014.09.03.14.23.31 for ; Wed, 03 Sep 2014 14:23:31 -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 S932819AbaICVXR (ORCPT + 26 others); Wed, 3 Sep 2014 17:23:17 -0400 Received: from mail-ie0-f176.google.com ([209.85.223.176]:51849 "EHLO mail-ie0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932644AbaICVXJ (ORCPT ); Wed, 3 Sep 2014 17:23:09 -0400 Received: by mail-ie0-f176.google.com with SMTP id x19so10519124ier.21 for ; Wed, 03 Sep 2014 14:23:08 -0700 (PDT) X-Received: by 10.42.216.82 with SMTP id hh18mr296229icb.61.1409779388715; Wed, 03 Sep 2014 14:23:08 -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 ig9sm6515653igb.13.2014.09.03.14.23.07 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 03 Sep 2014 14:23:08 -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 s83LJPUD031067 (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 s83LJPHq031066; 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 Cc: Andrew Pinski Subject: [PATCH 14/24] ARM64:ILP32 use the standard start_thread for ILP32 so the processor state is not AARCH32 Date: Wed, 3 Sep 2014 14:19:08 -0700 Message-Id: <1409779158-30963-15-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> 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.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 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , If we have both ILP32 and AARCH32 compiled in, we need use the non compat start thread for ILP32. Signed-off-by: Andrew Pinski --- arch/arm64/include/asm/processor.h | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/arch/arm64/include/asm/processor.h b/arch/arm64/include/asm/processor.h index 286b1be..7bd9f32 100644 --- a/arch/arm64/include/asm/processor.h +++ b/arch/arm64/include/asm/processor.h @@ -104,6 +104,17 @@ static inline void start_thread(struct pt_regs *regs, unsigned long pc, static inline void compat_start_thread(struct pt_regs *regs, unsigned long pc, unsigned long sp) { +#ifdef CONFIG_ARM64_ILP32 + /* + * ILP32 thread are started the same way as LP64 threads. + * Note we cannot use is_ilp32_compat_task here as that + * would introduce a header depency issue. + */ + if (!test_thread_flag(TIF_AARCH32)) { + start_thread(regs, pc, sp); + return; + } +#endif start_thread_common(regs, pc); regs->pstate = COMPAT_PSR_MODE_USR; if (pc & 1)