From patchwork Thu Apr 28 15:18:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Covington X-Patchwork-Id: 8972011 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 57D479F1C1 for ; Thu, 28 Apr 2016 15:22:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 79E2C202F2 for ; Thu, 28 Apr 2016 15:22:51 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9DC6120268 for ; Thu, 28 Apr 2016 15:22:49 +0000 (UTC) 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 1avnkq-0001ht-1K; Thu, 28 Apr 2016 15:21:24 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1avnkT-0001Mk-Do for linux-arm-kernel@lists.infradead.org; Thu, 28 Apr 2016 15:21:02 +0000 Received: from smtp.codeaurora.org (localhost [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 2388161360; Thu, 28 Apr 2016 15:20:42 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 13C8861372; Thu, 28 Apr 2016 15:20:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from illium.qualcomm.com (global_nat1_iad_fw.qualcomm.com [129.46.232.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: cov@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id CEC3661305; Thu, 28 Apr 2016 15:20:39 +0000 (UTC) From: Christopher Covington To: Catalin Marinas , criu@openvz.org, Laurent Dufour , Will Deacon , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Arnd Bergmann , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-arch@vger.kernel.org, linux-mm@kvack.org Subject: [RFC 4/5] arm64: Use unsigned long for vdso Date: Thu, 28 Apr 2016 11:18:56 -0400 Message-Id: <1461856737-17071-5-git-send-email-cov@codeaurora.org> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1461856737-17071-1-git-send-email-cov@codeaurora.org> References: <20151202121918.GA4523@arm.com> <1461856737-17071-1-git-send-email-cov@codeaurora.org> X-Virus-Scanned: ClamAV using ClamSMTP X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160428_082101_533631_0C1642DC X-CRM114-Status: GOOD ( 12.60 ) X-Spam-Score: -2.9 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Christopher Covington MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP In order to get AArch64 remap and unmap support for the VDSO, like PowerPC and x86 have, without duplicating the code, we need a common name and type for the address of the VDSO. An informal survey of the architectures indicates unsigned long vdso is popular. Change the type in arm64 to be unsigned long, which has the added benefit of dropping a few typecasts. Signed-off-by: Christopher Covington --- arch/arm64/include/asm/mmu.h | 2 +- arch/arm64/kernel/vdso.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm64/include/asm/mmu.h b/arch/arm64/include/asm/mmu.h index 990124a..a67352f 100644 --- a/arch/arm64/include/asm/mmu.h +++ b/arch/arm64/include/asm/mmu.h @@ -18,7 +18,7 @@ typedef struct { atomic64_t id; - void *vdso; + unsigned long vdso; } mm_context_t; /* diff --git a/arch/arm64/kernel/vdso.c b/arch/arm64/kernel/vdso.c index 97bc68f..e742b1d 100644 --- a/arch/arm64/kernel/vdso.c +++ b/arch/arm64/kernel/vdso.c @@ -96,7 +96,7 @@ int aarch32_setup_vectors_page(struct linux_binprm *bprm, int uses_interp) void *ret; down_write(&mm->mmap_sem); - current->mm->context.vdso = (void *)addr; + current->mm->context.vdso = addr; /* Map vectors page at the high address. */ ret = _install_special_mapping(mm, addr, PAGE_SIZE, @@ -176,7 +176,7 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, goto up_fail; vdso_base += PAGE_SIZE; - mm->context.vdso = (void *)vdso_base; + mm->context.vdso = vdso_base; ret = _install_special_mapping(mm, vdso_base, vdso_text_len, VM_READ|VM_EXEC| VM_MAYREAD|VM_MAYWRITE|VM_MAYEXEC, @@ -189,7 +189,7 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, return 0; up_fail: - mm->context.vdso = NULL; + mm->context.vdso = 0; up_write(&mm->mmap_sem); return PTR_ERR(ret); }