Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1946131AbbDXVnb (ORCPT ); Fri, 24 Apr 2015 17:43:31 -0400 Received: from relay1.mentorg.com ([192.94.38.131]:60105 "EHLO relay1.mentorg.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031329AbbDXVn2 (ORCPT ); Fri, 24 Apr 2015 17:43:28 -0400 From: Nathan Lynch To: CC: Daniel Lezcano , Catalin Marinas , Doug Anderson , Marc Zyngier , Mark Rutland , Russell King , Sonny Rao , Stephen Boyd , Thomas Gleixner , Will Deacon , Subject: [PATCH 2/2] ARM: VDSO: use arch_timer_okay_for_vdso Date: Fri, 24 Apr 2015 16:43:21 -0500 Message-ID: <1429911801-6069-2-git-send-email-nathan_lynch@mentor.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1429911801-6069-1-git-send-email-nathan_lynch@mentor.com> References: <1429911801-6069-1-git-send-email-nathan_lynch@mentor.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1880 Lines: 71 Use the facility now provided by the arm_arch_timer driver to determine whether there's a usable virtual counter for the VDSO. Signed-off-by: Nathan Lynch --- arch/arm/kernel/vdso.c | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/arch/arm/kernel/vdso.c b/arch/arm/kernel/vdso.c index efe17dd9b921..f06fd6f3f65f 100644 --- a/arch/arm/kernel/vdso.c +++ b/arch/arm/kernel/vdso.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -69,33 +68,6 @@ struct elfinfo { */ static bool cntvct_ok __read_mostly; -static bool __init cntvct_functional(void) -{ - struct device_node *np; - bool ret = false; - - if (!IS_ENABLED(CONFIG_ARM_ARCH_TIMER)) - goto out; - - /* The arm_arch_timer core should export - * arch_timer_use_virtual or similar so we don't have to do - * this. - */ - np = of_find_compatible_node(NULL, NULL, "arm,armv7-timer"); - if (!np) - goto out_put; - - if (of_property_read_bool(np, "arm,cpu-registers-not-fw-configured")) - goto out_put; - - ret = true; - -out_put: - of_node_put(np); -out: - return ret; -} - static void * __init find_section(Elf32_Ehdr *ehdr, const char *name, unsigned long *size) { @@ -208,7 +180,7 @@ static int __init vdso_init(void) vdso_total_pages = 1; /* for the data/vvar page */ vdso_total_pages += text_pages; - cntvct_ok = cntvct_functional(); + cntvct_ok = arch_timer_okay_for_vdso(); patch_vdso(&vdso_start); -- 1.9.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/