From patchwork Fri Sep 18 10:30:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 254215 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 92ADDC43463 for ; Fri, 18 Sep 2020 10:31:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3778522208 for ; Fri, 18 Sep 2020 10:31:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600425080; bh=JiKsXBQnvKUuGUwchzbQj/4Vqb53KlGKDcJSTyI8K/g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=a2dF6G+a1sa3rXuyW2EfcjyEojtQpZpiUbqxbdp/o356Vr6KrHJKm1cUWlnVfgDoK YDGCASRh2j58LuQdQbL/OdId+4HL8z+vMxqScWa8y1pBN6sf1uJ73nLXv7gODJ1WE7 faHcoz6FOIaR6EQj7XTw8CJHKqIJoPu7OG4dPF10= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726115AbgIRKbU (ORCPT ); Fri, 18 Sep 2020 06:31:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:33352 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726064AbgIRKbT (ORCPT ); Fri, 18 Sep 2020 06:31:19 -0400 Received: from e123331-lin.nice.arm.com (adsl-119.109.242.22.tellas.gr [109.242.22.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D272220C56; Fri, 18 Sep 2020 10:31:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600425079; bh=JiKsXBQnvKUuGUwchzbQj/4Vqb53KlGKDcJSTyI8K/g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vOJD9i+penP8gAeblLRZMUqcD10cWfwFIWqooG2w4COwatbcNQITbRGiQoqTiLPXA Tciq0MTQwlQA52p1TTGGjAGMbw02n0McwZ02rEL2wHdYN+cX0hoVKdKLRM/gr/k8LD blWAn6RYXglS6Ve7+WN5C5cuCPoM38zXxeS/G1WI= From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org Cc: linux-efi@vger.kernel.org, Ard Biesheuvel , Zhen Lei , Russell King , Santosh Shilimkar , Linus Walleij , Nicolas Pitre Subject: [RFC/RFT PATCH 3/6] ARM: p2v: drop redundant 'type' argument from __pv_stub Date: Fri, 18 Sep 2020 13:30:59 +0300 Message-Id: <20200918103102.18107-4-ardb@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200918103102.18107-1-ardb@kernel.org> References: <20200918103102.18107-1-ardb@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-efi@vger.kernel.org We always pass the same value for 'type' so pull it into the __pv_stub macro itself. Signed-off-by: Ard Biesheuvel --- arch/arm/include/asm/memory.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h index 99035b5891ef..eb3c8e6e960a 100644 --- a/arch/arm/include/asm/memory.h +++ b/arch/arm/include/asm/memory.h @@ -183,14 +183,14 @@ extern const void *__pv_table_begin, *__pv_table_end; #define PHYS_OFFSET ((phys_addr_t)__pv_phys_pfn_offset << PAGE_SHIFT) #define PHYS_PFN_OFFSET (__pv_phys_pfn_offset) -#define __pv_stub(from,to,instr,type) \ +#define __pv_stub(from,to,instr) \ __asm__("@ __pv_stub\n" \ "1: " instr " %0, %1, %2\n" \ " .pushsection .pv_table,\"a\"\n" \ " .long 1b\n" \ " .popsection\n" \ : "=r" (to) \ - : "r" (from), "I" (type)) + : "r" (from), "I" (__PV_BITS_31_24)) #define __pv_stub_mov_hi(t) \ __asm__ volatile("@ __pv_stub_mov\n" \ @@ -217,7 +217,7 @@ static inline phys_addr_t __virt_to_phys_nodebug(unsigned long x) phys_addr_t t; if (sizeof(phys_addr_t) == 4) { - __pv_stub(x, t, "add", __PV_BITS_31_24); + __pv_stub(x, t, "add"); } else { __pv_stub_mov_hi(t); __pv_add_carry_stub(x, t); @@ -235,7 +235,7 @@ static inline unsigned long __phys_to_virt(phys_addr_t x) * assembler expression receives 32 bit argument * in place where 'r' 32 bit operand is expected. */ - __pv_stub((unsigned long) x, t, "sub", __PV_BITS_31_24); + __pv_stub((unsigned long) x, t, "sub"); return t; }