From patchwork Sun Apr 27 19:44:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Larry Bassel X-Patchwork-Id: 29162 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f200.google.com (mail-qc0-f200.google.com [209.85.216.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1CD4620534 for ; Sun, 27 Apr 2014 19:44:52 +0000 (UTC) Received: by mail-qc0-f200.google.com with SMTP id i17sf22213135qcy.11 for ; Sun, 27 Apr 2014 12:44:51 -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=zyGj37a4HR2knbUNwwbPsRQOEhbP12b44BhZuClAAWo=; b=RLGrtsLxxcWt4Q58EeAuhXplpphYsmdSviDp6cXsYgnbbSG2uIxlu1eplVwZvlGoHn ylxnubN4VFvLzLg5COPY9OSzEvzHeSgCb5bsZpTiqqeszhiAIJV8I6DhsTmjFaZCdQb3 Zk87ufotfYoecFHoc0Q9n1Q17ufUp97LavVjZ8ssDto9mliv/3AhI7tWGNQQvyQOmK3F HVAASLq4zuVfdVAftjU92a5Y3P4EUsZ/PwutIP+02Tf2nImuiHaAFLpkJsPItqphl7Vr NP7hANJ43HHs8hEs5CjbM/MMpNNvHYAOxi9YtPlTab+lUy/osz91+U4j9qLgL4szh70y xbEA== X-Gm-Message-State: ALoCoQnei9v7hn0AAA+nN0jSKNuXYoUpAOmMUO88VwBdDFKsF1T5PaGi/Kcc1ER6dtcmz7Rl5v1R X-Received: by 10.236.69.74 with SMTP id m50mr9889453yhd.0.1398627891857; Sun, 27 Apr 2014 12:44:51 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.47.203 with SMTP id m69ls104338qga.84.gmail; Sun, 27 Apr 2014 12:44:51 -0700 (PDT) X-Received: by 10.58.107.65 with SMTP id ha1mr19757586veb.1.1398627891770; Sun, 27 Apr 2014 12:44:51 -0700 (PDT) Received: from mail-vc0-f176.google.com (mail-vc0-f176.google.com [209.85.220.176]) by mx.google.com with ESMTPS id tm8si3134757vdc.98.2014.04.27.12.44.51 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 27 Apr 2014 12:44:51 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=209.85.220.176; Received: by mail-vc0-f176.google.com with SMTP id lc6so7114974vcb.35 for ; Sun, 27 Apr 2014 12:44:51 -0700 (PDT) X-Received: by 10.221.29.137 with SMTP id ry9mr19660767vcb.6.1398627891678; Sun, 27 Apr 2014 12:44:51 -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 ib8csp70456vcb; Sun, 27 Apr 2014 12:44:51 -0700 (PDT) X-Received: by 10.68.235.6 with SMTP id ui6mr20895855pbc.45.1398627890746; Sun, 27 Apr 2014 12:44:50 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id vw5si8937181pab.374.2014.04.27.12.44.50 for ; Sun, 27 Apr 2014 12:44:50 -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 S1753840AbaD0Toh (ORCPT + 28 others); Sun, 27 Apr 2014 15:44:37 -0400 Received: from mail-qa0-f44.google.com ([209.85.216.44]:50943 "EHLO mail-qa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753678AbaD0Toe (ORCPT ); Sun, 27 Apr 2014 15:44:34 -0400 Received: by mail-qa0-f44.google.com with SMTP id k15so668850qaq.3 for ; Sun, 27 Apr 2014 12:44:33 -0700 (PDT) X-Received: by 10.140.82.7 with SMTP id g7mr26570155qgd.74.1398627873557; Sun, 27 Apr 2014 12:44:33 -0700 (PDT) Received: from localhost.localdomain (adsl-71-136-233-53.dsl.sndg02.pacbell.net. [71.136.233.53]) by mx.google.com with ESMTPSA id g7sm28465898qaf.14.2014.04.27.12.44.31 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 27 Apr 2014 12:44:33 -0700 (PDT) From: Larry Bassel To: catalin.marinas@arm.com, will.deacon@arm.com Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linaro-kernel@lists.linaro.org, khilman@linaro.org, Larry Bassel Subject: [PATCH 2/3] arm64: add support for context tracking Date: Sun, 27 Apr 2014 12:44:13 -0700 Message-Id: <1398627854-9617-3-git-send-email-larry.bassel@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1398627854-9617-1-git-send-email-larry.bassel@linaro.org> References: <1398627854-9617-1-git-send-email-larry.bassel@linaro.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: larry.bassel@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) 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: , From: Kevin Hilman Add the macros and defines needed to implement context tracking on arm64. Signed-off-by: Kevin Hilman Signed-off-by: Larry Bassel --- arch/arm64/Kconfig | 1 + arch/arm64/include/asm/thread_info.h | 1 + arch/arm64/kernel/entry.S | 16 ++++++++++++++++ 3 files changed, 18 insertions(+) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index e6e4d37..152d92b 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -55,6 +55,7 @@ config ARM64 select RTC_LIB select SPARSE_IRQ select SYSCTL_EXCEPTION_TRACE + select HAVE_CONTEXT_TRACKING help ARM 64-bit (AArch64) Linux support. diff --git a/arch/arm64/include/asm/thread_info.h b/arch/arm64/include/asm/thread_info.h index 720e70b..301ea6a 100644 --- a/arch/arm64/include/asm/thread_info.h +++ b/arch/arm64/include/asm/thread_info.h @@ -108,6 +108,7 @@ static inline struct thread_info *current_thread_info(void) #define TIF_SINGLESTEP 21 #define TIF_32BIT 22 /* 32bit process */ #define TIF_SWITCH_MM 23 /* deferred switch_mm */ +#define TIF_NOHZ 24 #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S index eda7755..76b09d8 100644 --- a/arch/arm64/kernel/entry.S +++ b/arch/arm64/kernel/entry.S @@ -30,6 +30,22 @@ #include /* + * Context tracking subsystem. Used to instrument transitions + * between user and kernel mode. + */ + .macro ct_user_exit +#ifdef CONFIG_CONTEXT_TRACKING + bl context_tracking_user_exit +#endif + .endm + + .macro ct_user_enter +#ifdef CONFIG_CONTEXT_TRACKING + bl context_tracking_user_enter +#endif + .endm + +/* * Bad Abort numbers *----------------- */