From patchwork Tue Jan 9 13:43:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 10152067 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E9235603ED for ; Tue, 9 Jan 2018 13:43:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DA45C28471 for ; Tue, 9 Jan 2018 13:43:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CD1E2286C4; Tue, 9 Jan 2018 13:43:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4DDD628471 for ; Tue, 9 Jan 2018 13:43:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=tVEuGqPBJrlcOvUU/cx3sTgn+6G3HPWu2YwZAUpkGLM=; b=r7K 8GDY24TDh2Mg/qz32I0Eq6TtOyL92LQGFfpdSNTWKw8qmMz1Hdn4ar2WaTB6Q5Lz0eeqtXGqwOmXI kXCnJngFl+bRjfvzWW/iuvVEeezuXpwjUcWc+//Ql++ghGulRzqL+H+NulvV73zBol1zGXSQby6zp a7geWxlRURNA5zK36Jx4A/bH9aY/VH5eaoTUfnJHexFpay+Kig+vKVZYvuxOGNIRbXmcbK3tB8mpU 2JoocX9MfXLxobTm9Tw+4kznQwHAJ+gy32++XvazFkyAA3KTGBvpwOFjXnDuLhFJw6aYWYtNkFZZg ByUkMYaZ4o3cSGj4J/GOQcRvxP6Vt5g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eYuBu-0007Y5-GS; Tue, 09 Jan 2018 13:43:46 +0000 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eYuBq-0007Wf-54 for linux-arm-kernel@lists.infradead.org; Tue, 09 Jan 2018 13:43:43 +0000 Received: by mail-wm0-x243.google.com with SMTP id y82so20363842wmg.1 for ; Tue, 09 Jan 2018 05:43:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=zY0OS8fvS4L5HBrzW2xwMIl/iKaEXgFktj+hAGPaJRA=; b=GE4OqoHu6HxEkSSk5jl8moYT4fhYfLMlkEv2sbHZrk+MOP30ZsJDueJSUJIbOsAOYp +gTixaBs8qazMQoy7W7dXAARz6zyULyLLCwoXr0W+2BpaDNxuFPoVihQqDlhqlm7Pg8+ nddPBDETyEKCfOI8JpgVVnRRyjPzpfOuhCK2Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=zY0OS8fvS4L5HBrzW2xwMIl/iKaEXgFktj+hAGPaJRA=; b=GsL/LI24WpibyUJFPsB1oUcWwvv3WGyfXx+VxdPEhgaupSHrqxEtUCkzPdg0S64HNV ssK6bOuQtOhoHKqqR/hP3Nc6FR+ben2Fhruh/qzW/fiRjQFboJVqpgFsEUVJmlczsxwW FMnqwiM8nHDo093vzlUi9x22Vd+NzUVAXgAy6sYeDtkKrUmDoaI46HKok9ZGZVMe0BN1 5z1XeWf/9g5/qQFv1mOee+FBj+H6rKVP1Pod0+j1uCYLqmFetvENEmcYcYmicBIuitPl xuCRu1gPd1thEQFkaCuxOaOq/4wZmAjhz9LJ5DE5lwqAN6h6upGEyLP0o5Jg0Jgt5AeC +UTA== X-Gm-Message-State: AKGB3mLk14dHeltAHED3nqx+mS4BI+7+j9RjROZ3fNol29aqvdlimnFT z6XdYX4tGs2SC9EY7+e3stGIsobu38I= X-Google-Smtp-Source: ACJfBovgGO775ARAdAlMExqmHaMsDbVaSNkPbCYksCVYFghFcCQS5g42GwWIFgOUa3wwyLeDEgZXSA== X-Received: by 10.80.177.72 with SMTP id l8mr20578325edd.267.1515505409889; Tue, 09 Jan 2018 05:43:29 -0800 (PST) Received: from localhost.localdomain (x50d2404e.cust.hiper.dk. [80.210.64.78]) by smtp.gmail.com with ESMTPSA id e12sm975787edm.42.2018.01.09.05.43.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 09 Jan 2018 05:43:28 -0800 (PST) From: Christoffer Dall To: linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu Subject: [PATCH] arm64: mm: Add additional parameter to uaccess_ttbr0_enable Date: Tue, 9 Jan 2018 14:43:26 +0100 Message-Id: <20180109134326.17479-1-christoffer.dall@linaro.org> X-Mailer: git-send-email 2.14.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180109_054342_262392_9A3BDF90 X-CRM114-Status: GOOD ( 12.40 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marc Zyngier , Catalin Marinas , Will Deacon , Christoffer Dall , kvm@vger.kernel.org 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 Add an extra temporary register parameter to uaccess_ttbr0_enable which is about to be required for arm64 PAN support. This patch doesn't introduce any functional change but ensures that the kernel compiles once the KVM/ARM tree is merged with the arm64 tree by ensuring a trivially mergable conflict. Cc: Will Deacon Cc: Catalin Marinas Cc: Marc Zyngier Signed-off-by: Christoffer Dall Reviewed-by: Marc Zyngier --- arch/arm64/include/asm/asm-uaccess.h | 4 ++-- arch/arm64/mm/cache.S | 4 ++-- arch/arm64/xen/hypercall.S | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/arm64/include/asm/asm-uaccess.h b/arch/arm64/include/asm/asm-uaccess.h index b3da6c886835..b67563d2024c 100644 --- a/arch/arm64/include/asm/asm-uaccess.h +++ b/arch/arm64/include/asm/asm-uaccess.h @@ -31,7 +31,7 @@ alternative_if_not ARM64_HAS_PAN alternative_else_nop_endif .endm - .macro uaccess_ttbr0_enable, tmp1, tmp2 + .macro uaccess_ttbr0_enable, tmp1, tmp2, tmp3 alternative_if_not ARM64_HAS_PAN save_and_disable_irq \tmp2 // avoid preemption __uaccess_ttbr0_enable \tmp1 @@ -42,7 +42,7 @@ alternative_else_nop_endif .macro uaccess_ttbr0_disable, tmp1 .endm - .macro uaccess_ttbr0_enable, tmp1, tmp2 + .macro uaccess_ttbr0_enable, tmp1, tmp2, tmp3 .endm #endif diff --git a/arch/arm64/mm/cache.S b/arch/arm64/mm/cache.S index bedd23da83f4..5a52811f47e9 100644 --- a/arch/arm64/mm/cache.S +++ b/arch/arm64/mm/cache.S @@ -49,7 +49,7 @@ ENTRY(flush_icache_range) * - end - virtual end address of region */ ENTRY(__flush_cache_user_range) - uaccess_ttbr0_enable x2, x3 + uaccess_ttbr0_enable x2, x3, x4 dcache_line_size x2, x3 sub x3, x2, #1 bic x4, x0, x3 @@ -80,7 +80,7 @@ ENDPROC(__flush_cache_user_range) * - end - virtual end address of region */ ENTRY(invalidate_icache_range) - uaccess_ttbr0_enable x2, x3 + uaccess_ttbr0_enable x2, x3, x4 invalidate_icache_by_line x0, x1, x2, x3, 2f mov x0, xzr diff --git a/arch/arm64/xen/hypercall.S b/arch/arm64/xen/hypercall.S index 401ceb71540c..acdbd2c9e899 100644 --- a/arch/arm64/xen/hypercall.S +++ b/arch/arm64/xen/hypercall.S @@ -101,7 +101,7 @@ ENTRY(privcmd_call) * need the explicit uaccess_enable/disable if the TTBR0 PAN emulation * is enabled (it implies that hardware UAO and PAN disabled). */ - uaccess_ttbr0_enable x6, x7 + uaccess_ttbr0_enable x6, x7, x8 hvc XEN_IMM /*