All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Ingo Molnar <mingo@redhat.com>,
	x86@kernel.org, Thomas Gleixner <tglx@linutronix.de>,
	"H . Peter Anvin" <hpa@zytor.com>,
	linux-kernel@vger.kernel.org,
	Baolin Wang <baolin.wang@spreadtrum.com>,
	wsa@the-dreams.de, linux-i2c@vger.kernel.org,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	intel-gfx@lists.freedesktop.org
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH v2 4/5] x86/io: Remove xlate_dev_kmem_ptr() duplication
Date: Fri, 30 Jun 2017 20:09:33 +0300	[thread overview]
Message-ID: <20170630170934.83028-5-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20170630170934.83028-1-andriy.shevchenko@linux.intel.com>

Generic header defines xlate_dev_kmem_ptr().

Reuse it from generic header and remove in x86 code.
Move a description to the generic header as well.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 arch/x86/include/asm/io.h | 5 -----
 include/asm-generic/io.h  | 3 +++
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h
index 252434b00fdb..b3bba2f87e18 100644
--- a/arch/x86/include/asm/io.h
+++ b/arch/x86/include/asm/io.h
@@ -216,11 +216,6 @@ extern void set_iounmap_nonlazy(void);
 #include <asm-generic/iomap.h>
 
 /*
- * Convert a virtual cached pointer to an uncached pointer
- */
-#define xlate_dev_kmem_ptr(p)	p
-
-/*
  * ISA space is 'always mapped' on a typical x86 system, no need to
  * explicitly ioremap() it. The fact that the ISA IO space is mapped
  * to PAGE_OFFSET is pure coincidence - it does not mean ISA values
diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h
index 395afc829409..b4531e3b2120 100644
--- a/include/asm-generic/io.h
+++ b/include/asm-generic/io.h
@@ -915,6 +915,9 @@ extern void ioport_unmap(void __iomem *p);
 #endif /* CONFIG_GENERIC_IOMAP */
 #endif /* CONFIG_HAS_IOPORT_MAP */
 
+/*
+ * Convert a virtual cached pointer to an uncached pointer
+ */
 #ifndef xlate_dev_kmem_ptr
 #define xlate_dev_kmem_ptr xlate_dev_kmem_ptr
 static inline void *xlate_dev_kmem_ptr(void *addr)
-- 
2.11.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

WARNING: multiple messages have this Message-ID (diff)
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Ingo Molnar <mingo@redhat.com>,
	x86@kernel.org, Thomas Gleixner <tglx@linutronix.de>,
	"H . Peter Anvin" <hpa@zytor.com>,
	linux-kernel@vger.kernel.org,
	Baolin Wang <baolin.wang@spreadtrum.com>,
	wsa@the-dreams.de, linux-i2c@vger.kernel.org,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	intel-gfx@lists.freedesktop.org
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH v2 4/5] x86/io: Remove xlate_dev_kmem_ptr() duplication
Date: Fri, 30 Jun 2017 20:09:33 +0300	[thread overview]
Message-ID: <20170630170934.83028-5-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20170630170934.83028-1-andriy.shevchenko@linux.intel.com>

Generic header defines xlate_dev_kmem_ptr().

Reuse it from generic header and remove in x86 code.
Move a description to the generic header as well.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 arch/x86/include/asm/io.h | 5 -----
 include/asm-generic/io.h  | 3 +++
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h
index 252434b00fdb..b3bba2f87e18 100644
--- a/arch/x86/include/asm/io.h
+++ b/arch/x86/include/asm/io.h
@@ -216,11 +216,6 @@ extern void set_iounmap_nonlazy(void);
 #include <asm-generic/iomap.h>
 
 /*
- * Convert a virtual cached pointer to an uncached pointer
- */
-#define xlate_dev_kmem_ptr(p)	p
-
-/*
  * ISA space is 'always mapped' on a typical x86 system, no need to
  * explicitly ioremap() it. The fact that the ISA IO space is mapped
  * to PAGE_OFFSET is pure coincidence - it does not mean ISA values
diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h
index 395afc829409..b4531e3b2120 100644
--- a/include/asm-generic/io.h
+++ b/include/asm-generic/io.h
@@ -915,6 +915,9 @@ extern void ioport_unmap(void __iomem *p);
 #endif /* CONFIG_GENERIC_IOMAP */
 #endif /* CONFIG_HAS_IOPORT_MAP */
 
+/*
+ * Convert a virtual cached pointer to an uncached pointer
+ */
 #ifndef xlate_dev_kmem_ptr
 #define xlate_dev_kmem_ptr xlate_dev_kmem_ptr
 static inline void *xlate_dev_kmem_ptr(void *addr)
-- 
2.11.0

  parent reply	other threads:[~2017-06-30 17:09 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-30 17:09 [PATCH v2 0/5] x86/io: Rely on asm-generic/io.h Andy Shevchenko
2017-06-30 17:09 ` [PATCH v2 1/5] x86/io: Define IO accessors by preprocessor Andy Shevchenko
2017-06-30 17:09   ` Andy Shevchenko
2017-07-24 10:19   ` [tip:x86/asm] " tip-bot for Andy Shevchenko
2017-06-30 17:09 ` [PATCH v2 2/5] x86/io: Include asm-generic/io.h to architectural code Andy Shevchenko
2017-06-30 17:09   ` Andy Shevchenko
2017-07-24 10:20   ` [tip:x86/asm] " tip-bot for Andy Shevchenko
2017-06-30 17:09 ` [PATCH v2 3/5] x86/io: Remove mem*io() duplications Andy Shevchenko
2017-06-30 17:09   ` Andy Shevchenko
2017-07-24 10:20   ` [tip:x86/asm] " tip-bot for Andy Shevchenko
2017-06-30 17:09 ` Andy Shevchenko [this message]
2017-06-30 17:09   ` [PATCH v2 4/5] x86/io: Remove xlate_dev_kmem_ptr() duplication Andy Shevchenko
2017-07-24 10:20   ` [tip:x86/asm] " tip-bot for Andy Shevchenko
2017-06-30 17:09 ` [PATCH v2 5/5] x86/io: Make readq() / writeq() API consistent Andy Shevchenko
2017-06-30 17:09   ` Andy Shevchenko
2017-07-24 10:21   ` [tip:x86/asm] " tip-bot for Andy Shevchenko
2017-06-30 17:29 ` ✓ Fi.CI.BAT: success for x86/io: Rely on asm-generic/io.h Patchwork
2017-07-18 15:52 ` [PATCH v2 0/5] " Andy Shevchenko
2017-07-18 15:52   ` Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170630170934.83028-5-andriy.shevchenko@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=baolin.wang@spreadtrum.com \
    --cc=hpa@zytor.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=wsa@the-dreams.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.