From patchwork Sun Feb 1 18:34:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jones X-Patchwork-Id: 5757461 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C8C03BF440 for ; Sun, 1 Feb 2015 18:35:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DA129201F5 for ; Sun, 1 Feb 2015 18:35:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 05011201F4 for ; Sun, 1 Feb 2015 18:35:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753968AbbBASfH (ORCPT ); Sun, 1 Feb 2015 13:35:07 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36232 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753854AbbBASfE (ORCPT ); Sun, 1 Feb 2015 13:35:04 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t11IZ0he001025 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Sun, 1 Feb 2015 13:35:01 -0500 Received: from hawk.usersys.redhat.com ([10.34.1.145]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t11IYnLW003050; Sun, 1 Feb 2015 13:34:59 -0500 From: Andrew Jones To: kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org Cc: christoffer.dall@linaro.org, pbonzini@redhat.com Subject: [PATCH 06/18] arm/arm64: get rid of get_sp() Date: Sun, 1 Feb 2015 19:34:34 +0100 Message-Id: <1422815686-24591-7-git-send-email-drjones@redhat.com> In-Reply-To: <1422815686-24591-1-git-send-email-drjones@redhat.com> References: <1422815686-24591-1-git-send-email-drjones@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP get_sp() only worked by accident, because gcc inlined calls to it. It should have always been explicitly inlined. It was also only added for debugging, and not in any use now. Furthermore, while we will have need for a "get_sp", we'll add it back with a new name, current_stack_pointer, in order to be consistent with Linux. Signed-off-by: Andrew Jones --- lib/arm/asm/processor.h | 1 - lib/arm/processor.c | 6 ------ lib/arm64/asm/processor.h | 1 - lib/arm64/processor.c | 6 ------ 4 files changed, 14 deletions(-) diff --git a/lib/arm/asm/processor.h b/lib/arm/asm/processor.h index a56f8d1fc9797..9c37db66640e8 100644 --- a/lib/arm/asm/processor.h +++ b/lib/arm/asm/processor.h @@ -23,7 +23,6 @@ typedef void (*exception_fn)(struct pt_regs *); extern void install_exception_handler(enum vector v, exception_fn fn); extern void show_regs(struct pt_regs *regs); -extern void *get_sp(void); static inline unsigned long current_cpsr(void) { diff --git a/lib/arm/processor.c b/lib/arm/processor.c index 5ad999c6b378b..d2fd597fcd139 100644 --- a/lib/arm/processor.c +++ b/lib/arm/processor.c @@ -64,12 +64,6 @@ void show_regs(struct pt_regs *regs) } } -void *get_sp(void) -{ - register unsigned long sp asm("sp"); - return (void *)sp; -} - static exception_fn exception_handlers[EXCPTN_MAX]; void install_exception_handler(enum vector v, exception_fn fn) diff --git a/lib/arm64/asm/processor.h b/lib/arm64/asm/processor.h index a33f70afb3a3e..d287f55b8dac6 100644 --- a/lib/arm64/asm/processor.h +++ b/lib/arm64/asm/processor.h @@ -51,7 +51,6 @@ extern void default_vector_handler(enum vector v, struct pt_regs *regs, unsigned int esr); extern void show_regs(struct pt_regs *regs); -extern void *get_sp(void); extern bool get_far(unsigned int esr, unsigned long *far); static inline unsigned long current_level(void) diff --git a/lib/arm64/processor.c b/lib/arm64/processor.c index efc78353d7ec0..7f61b3fff281f 100644 --- a/lib/arm64/processor.c +++ b/lib/arm64/processor.c @@ -78,12 +78,6 @@ void show_regs(struct pt_regs *regs) printf("\n"); } -void *get_sp(void) -{ - register unsigned long sp asm("sp"); - return (void *)sp; -} - bool get_far(unsigned int esr, unsigned long *far) { unsigned int ec = esr >> ESR_EL1_EC_SHIFT;