From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Gordeev Subject: [kvm-unit-tests PATCH v3 06/10] io: Separate overrides of virt_to_phys() and phys_to_virt() Date: Fri, 29 Apr 2016 13:38:02 +0200 Message-ID: <8fa0dcfe7aaa2d41371ede7747ee6841aede6c7f.1461928138.git.agordeev@redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Alexander Gordeev , Andrew Jones , Thomas Huth , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= To: kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:53548 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753220AbcD2LiT (ORCPT ); Fri, 29 Apr 2016 07:38:19 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B1501C0D7F13 for ; Fri, 29 Apr 2016 11:38:18 +0000 (UTC) In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: Generic implementations of virt_to_phys() and phys_to_virt() are currently covered by a single "virt_to_phys" macro. Introduce additional macro "phys_to_virt" to allow separate overrides. Cc: Andrew Jones Cc: Thomas Huth Cc: Radim Kr=C4=8Dm=C3=A1=C5=99 Signed-off-by: Alexander Gordeev --- lib/asm-generic/io.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/asm-generic/io.h b/lib/asm-generic/io.h index 931415a..3585ac0 100644 --- a/lib/asm-generic/io.h +++ b/lib/asm-generic/io.h @@ -165,7 +165,9 @@ static inline unsigned long virt_to_phys(volatile v= oid *address) { return __pa((unsigned long)address); } +#endif =20 +#ifndef phys_to_virt static inline void *phys_to_virt(unsigned long address) { return __va(address); --=20 1.8.3.1