From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752434AbdF3RJu (ORCPT ); Fri, 30 Jun 2017 13:09:50 -0400 Received: from mga04.intel.com ([192.55.52.120]:25561 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752381AbdF3RJt (ORCPT ); Fri, 30 Jun 2017 13:09:49 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,287,1496127600"; d="scan'208";a="1146559464" From: Andy Shevchenko To: Ingo Molnar , x86@kernel.org, Thomas Gleixner , "H . Peter Anvin" , linux-kernel@vger.kernel.org, Baolin Wang , wsa@the-dreams.de, linux-i2c@vger.kernel.org, Mika Westerberg , intel-gfx@lists.freedesktop.org Cc: Andy Shevchenko Subject: [PATCH v2 5/5] x86/io: Make readq() / writeq() API consistent Date: Fri, 30 Jun 2017 20:09:34 +0300 Message-Id: <20170630170934.83028-6-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170630170934.83028-1-andriy.shevchenko@linux.intel.com> References: <20170630170934.83028-1-andriy.shevchenko@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Despite the commit 93093d099e5d x86: provide readq()/writeq() on 32-bit too, complete says ...Also, map all the APIs to the strongest ordering variant. It's way too easy to mess such details up in drivers and the difference between "memory" and "" constrained asm() constructs is in the noise range. we have for now only one user of this API (i.e. writeq_relaxed() in drivers/hwtracing/intel_th/sth.c) on x86 and it does care about "relaxed" part of it. Moreover 32-bit support has been removed from that header, though appeared later in specific headers that emphasizes its non-atomic context. The rest should keep in mind consistent picture of __raw_IO() vs. IO() vs. IO_relaxed() API. Signed-off-by: Andy Shevchenko --- arch/x86/include/asm/io.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h index b3bba2f87e18..9ada93f01524 100644 --- a/arch/x86/include/asm/io.h +++ b/arch/x86/include/asm/io.h @@ -94,13 +94,15 @@ build_mmio_write(__writel, "l", unsigned int, "r", ) #ifdef CONFIG_X86_64 build_mmio_read(readq, "q", unsigned long, "=r", :"memory") +build_mmio_read(__readq, "q", unsigned long, "=r", ) build_mmio_write(writeq, "q", unsigned long, "r", :"memory") +build_mmio_write(__writeq, "q", unsigned long, "r", ) -#define readq_relaxed(a) readq(a) -#define writeq_relaxed(v, a) writeq(v, a) +#define readq_relaxed(a) __readq(a) +#define writeq_relaxed(v, a) __writeq(v, a) -#define __raw_readq(a) readq(a) -#define __raw_writeq(val, addr) writeq(val, addr) +#define __raw_readq __readq +#define __raw_writeq __writeq /* Let people know that we have them */ #define readq readq -- 2.11.0