linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86: iosf_mbi: Provide dummy functions if CONFIG_IOSF_MBI not set
@ 2014-02-12 23:34 David E. Box
  2014-02-23  1:02 ` [PATCH RESEND] " David E. Box
  0 siblings, 1 reply; 30+ messages in thread
From: David E. Box @ 2014-02-12 23:34 UTC (permalink / raw)
  To: hpa, mingo, tglx; +Cc: x86, linux-kernel

From: "David E. Box" <david.e.box@linux.intel.com>

Add iosf_mbi_available function for loadable modules.
Add dummy functions to prevent symbol lookup errors on loadable modules.
Clarify that the write opcode is to be used for iosf_mbi_modify().
Changes Kconfig for IOSF_MBI to default built-in.

Signed-off-by: David E. Box <david.e.box@linux.intel.com>
---
 arch/x86/Kconfig                |    2 +-
 arch/x86/include/asm/iosf_mbi.h |   39 +++++++++++++++++++++++++++++++++++----
 arch/x86/kernel/iosf_mbi.c      |    6 ++++++
 3 files changed, 42 insertions(+), 5 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index d3b1f8b..e25baf1 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -2385,7 +2385,7 @@ config X86_DMA_REMAP
 	depends on STA2X11
 
 config IOSF_MBI
-	bool
+	def_bool y
 	depends on PCI
 	---help---
 	  To be selected by modules requiring access to the Intel OnChip System
diff --git a/arch/x86/include/asm/iosf_mbi.h b/arch/x86/include/asm/iosf_mbi.h
index 8e71c79..1c93591 100644
--- a/arch/x86/include/asm/iosf_mbi.h
+++ b/arch/x86/include/asm/iosf_mbi.h
@@ -5,6 +5,8 @@
 #ifndef IOSF_MBI_SYMS_H
 #define IOSF_MBI_SYMS_H
 
+#ifdef CONFIG_IOSF_MBI
+
 #define MBI_MCR_OFFSET		0xD0
 #define MBI_MDR_OFFSET		0xD4
 #define MBI_MCRX_OFFSET		0xD8
@@ -50,6 +52,8 @@
 #define BT_MBI_PCIE_READ	0x00
 #define BT_MBI_PCIE_WRITE	0x01
 
+extern bool iosf_mbi_available(void);
+
 /**
  * iosf_mbi_read() - MailBox Interface read command
  * @port:	port indicating subunit being accessed
@@ -60,7 +64,7 @@
  * Locking is handled by spinlock - cannot sleep.
  * Return: Nonzero on error
  */
-int iosf_mbi_read(u8 port, u8 opcode, u32 offset, u32 *mdr);
+extern int iosf_mbi_read(u8 port, u8 opcode, u32 offset, u32 *mdr);
 
 /**
  * iosf_mbi_write() - MailBox unmasked write command
@@ -72,19 +76,46 @@ int iosf_mbi_read(u8 port, u8 opcode, u32 offset, u32 *mdr);
  * Locking is handled by spinlock - cannot sleep.
  * Return: Nonzero on error
  */
-int iosf_mbi_write(u8 port, u8 opcode, u32 offset, u32 mdr);
+extern int iosf_mbi_write(u8 port, u8 opcode, u32 offset, u32 mdr);
 
 /**
  * iosf_mbi_modify() - MailBox masked write command
  * @port:	port indicating subunit being accessed
- * @opcode:	port specific read or write opcode
+ * @opcode:	port specific write opcode
  * @offset:	register address offset
  * @mdr:	register data being modified
  * @mask:	mask indicating bits in mdr to be modified
  *
+ * Use write opcode for this function.
  * Locking is handled by spinlock - cannot sleep.
  * Return: Nonzero on error
  */
-int iosf_mbi_modify(u8 port, u8 opcode, u32 offset, u32 mdr, u32 mask);
+extern int iosf_mbi_modify(u8 port, u8 opcode, u32 offset, u32 mdr, u32 mask);
+
+#else /* CONFIG_IOSF_MBI is not enabled */
+static inline
+bool iosf_mbi_available(void)
+{
+	return false;
+}
+
+static inline
+int iosf_mbi_read(u8 port, u8 opcode, u32 offset, u32 *mdr)
+{
+	return 0;
+}
+
+static inline
+int iosf_mbi_write(u8 port, u8 opcode, u32 offset, u32 mdr)
+{
+	return 0;
+}
+
+static inline
+int iosf_mbi_modify(u8 port, u8 opcode, u32 offset, u32 mdr, u32 mask)
+{
+	return 0;
+}
+#endif /* CONFIG_IOSF_MBI */
 
 #endif /* IOSF_MBI_SYMS_H */
diff --git a/arch/x86/kernel/iosf_mbi.c b/arch/x86/kernel/iosf_mbi.c
index c3aae66..d3803c6 100644
--- a/arch/x86/kernel/iosf_mbi.c
+++ b/arch/x86/kernel/iosf_mbi.c
@@ -177,6 +177,12 @@ int iosf_mbi_modify(u8 port, u8 opcode, u32 offset, u32 mdr, u32 mask)
 }
 EXPORT_SYMBOL(iosf_mbi_modify);
 
+bool iosf_mbi_available(void)
+{
+	return mbi_pdev;
+}
+EXPORT_SYMBOL(iosf_mbi_available);
+
 static int iosf_mbi_probe(struct pci_dev *pdev,
 			  const struct pci_device_id *unused)
 {
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH RESEND] x86: iosf_mbi: Provide dummy functions if CONFIG_IOSF_MBI not set
  2014-02-12 23:34 [PATCH] x86: iosf_mbi: Provide dummy functions if CONFIG_IOSF_MBI not set David E. Box
@ 2014-02-23  1:02 ` David E. Box
  2014-02-24 13:19   ` One Thousand Gnomes
                     ` (3 more replies)
  0 siblings, 4 replies; 30+ messages in thread
From: David E. Box @ 2014-02-23  1:02 UTC (permalink / raw)
  To: tglx, mingo, hpa
  Cc: David E. Box, x86, linux-kernel, srinivas.pandruvada, jacob.jun.pan

From: "David E. Box" <david.e.box@linux.intel.com>

Add iosf_mbi_available function for loadable modules.
Add dummy functions to prevent symbol lookup errors on loadable modules.
Clarify that the write opcode is to be used for iosf_mbi_modify().
Changes Kconfig for IOSF_MBI to default built-in.

Signed-off-by: David E. Box <david.e.box@linux.intel.com>
---
 arch/x86/Kconfig                |    2 +-
 arch/x86/include/asm/iosf_mbi.h |   39 +++++++++++++++++++++++++++++++++++----
 arch/x86/kernel/iosf_mbi.c      |    6 ++++++
 3 files changed, 42 insertions(+), 5 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index d3b1f8b..e25baf1 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -2385,7 +2385,7 @@ config X86_DMA_REMAP
 	depends on STA2X11
 
 config IOSF_MBI
-	bool
+	def_bool y
 	depends on PCI
 	---help---
 	  To be selected by modules requiring access to the Intel OnChip System
diff --git a/arch/x86/include/asm/iosf_mbi.h b/arch/x86/include/asm/iosf_mbi.h
index 8e71c79..1c93591 100644
--- a/arch/x86/include/asm/iosf_mbi.h
+++ b/arch/x86/include/asm/iosf_mbi.h
@@ -5,6 +5,8 @@
 #ifndef IOSF_MBI_SYMS_H
 #define IOSF_MBI_SYMS_H
 
+#ifdef CONFIG_IOSF_MBI
+
 #define MBI_MCR_OFFSET		0xD0
 #define MBI_MDR_OFFSET		0xD4
 #define MBI_MCRX_OFFSET		0xD8
@@ -50,6 +52,8 @@
 #define BT_MBI_PCIE_READ	0x00
 #define BT_MBI_PCIE_WRITE	0x01
 
+extern bool iosf_mbi_available(void);
+
 /**
  * iosf_mbi_read() - MailBox Interface read command
  * @port:	port indicating subunit being accessed
@@ -60,7 +64,7 @@
  * Locking is handled by spinlock - cannot sleep.
  * Return: Nonzero on error
  */
-int iosf_mbi_read(u8 port, u8 opcode, u32 offset, u32 *mdr);
+extern int iosf_mbi_read(u8 port, u8 opcode, u32 offset, u32 *mdr);
 
 /**
  * iosf_mbi_write() - MailBox unmasked write command
@@ -72,19 +76,46 @@ int iosf_mbi_read(u8 port, u8 opcode, u32 offset, u32 *mdr);
  * Locking is handled by spinlock - cannot sleep.
  * Return: Nonzero on error
  */
-int iosf_mbi_write(u8 port, u8 opcode, u32 offset, u32 mdr);
+extern int iosf_mbi_write(u8 port, u8 opcode, u32 offset, u32 mdr);
 
 /**
  * iosf_mbi_modify() - MailBox masked write command
  * @port:	port indicating subunit being accessed
- * @opcode:	port specific read or write opcode
+ * @opcode:	port specific write opcode
  * @offset:	register address offset
  * @mdr:	register data being modified
  * @mask:	mask indicating bits in mdr to be modified
  *
+ * Use write opcode for this function.
  * Locking is handled by spinlock - cannot sleep.
  * Return: Nonzero on error
  */
-int iosf_mbi_modify(u8 port, u8 opcode, u32 offset, u32 mdr, u32 mask);
+extern int iosf_mbi_modify(u8 port, u8 opcode, u32 offset, u32 mdr, u32 mask);
+
+#else /* CONFIG_IOSF_MBI is not enabled */
+static inline
+bool iosf_mbi_available(void)
+{
+	return false;
+}
+
+static inline
+int iosf_mbi_read(u8 port, u8 opcode, u32 offset, u32 *mdr)
+{
+	return 0;
+}
+
+static inline
+int iosf_mbi_write(u8 port, u8 opcode, u32 offset, u32 mdr)
+{
+	return 0;
+}
+
+static inline
+int iosf_mbi_modify(u8 port, u8 opcode, u32 offset, u32 mdr, u32 mask)
+{
+	return 0;
+}
+#endif /* CONFIG_IOSF_MBI */
 
 #endif /* IOSF_MBI_SYMS_H */
diff --git a/arch/x86/kernel/iosf_mbi.c b/arch/x86/kernel/iosf_mbi.c
index c3aae66..d3803c6 100644
--- a/arch/x86/kernel/iosf_mbi.c
+++ b/arch/x86/kernel/iosf_mbi.c
@@ -177,6 +177,12 @@ int iosf_mbi_modify(u8 port, u8 opcode, u32 offset, u32 mdr, u32 mask)
 }
 EXPORT_SYMBOL(iosf_mbi_modify);
 
+bool iosf_mbi_available(void)
+{
+	return mbi_pdev;
+}
+EXPORT_SYMBOL(iosf_mbi_available);
+
 static int iosf_mbi_probe(struct pci_dev *pdev,
 			  const struct pci_device_id *unused)
 {
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* Re: [PATCH RESEND] x86: iosf_mbi: Provide dummy functions if CONFIG_IOSF_MBI not set
  2014-02-23  1:02 ` [PATCH RESEND] " David E. Box
@ 2014-02-24 13:19   ` One Thousand Gnomes
  2014-02-24 13:21     ` H. Peter Anvin
  2014-02-25  2:47   ` [PATCH V2 0/2] x86: IOSF: Add loadable module support David E. Box
                     ` (2 subsequent siblings)
  3 siblings, 1 reply; 30+ messages in thread
From: One Thousand Gnomes @ 2014-02-24 13:19 UTC (permalink / raw)
  To: David E. Box
  Cc: tglx, mingo, hpa, x86, linux-kernel, srinivas.pandruvada, jacob.jun.pan

On Sat, 22 Feb 2014 17:02:32 -0800
"David E. Box" <david.e.box@linux.intel.com> wrote:

> From: "David E. Box" <david.e.box@linux.intel.com>
> 
> Add iosf_mbi_available function for loadable modules.
> Add dummy functions to prevent symbol lookup errors on loadable modules.
> Clarify that the write opcode is to be used for iosf_mbi_modify().
> Changes Kconfig for IOSF_MBI to default built-in.

Other than _available I would have expected all the others to resolve to
returning an error or doing a WARN() in the not compiled in case.

If someone is dumb enough to miss the checks we want the kernel to spew
forth copious announcements of the fact, not silently do nothing.

Alan

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH RESEND] x86: iosf_mbi: Provide dummy functions if CONFIG_IOSF_MBI not set
  2014-02-24 13:19   ` One Thousand Gnomes
@ 2014-02-24 13:21     ` H. Peter Anvin
  2014-02-24 13:29       ` One Thousand Gnomes
  0 siblings, 1 reply; 30+ messages in thread
From: H. Peter Anvin @ 2014-02-24 13:21 UTC (permalink / raw)
  To: One Thousand Gnomes, David E. Box
  Cc: tglx, mingo, x86, linux-kernel, srinivas.pandruvada, jacob.jun.pan

On 02/24/2014 05:19 AM, One Thousand Gnomes wrote:
>
> Other than _available I would have expected all the others to resolve to
> returning an error or doing a WARN() in the not compiled in case.
>

WARN() or BUG()?

	-hpa



^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH RESEND] x86: iosf_mbi: Provide dummy functions if CONFIG_IOSF_MBI not set
  2014-02-24 13:21     ` H. Peter Anvin
@ 2014-02-24 13:29       ` One Thousand Gnomes
  0 siblings, 0 replies; 30+ messages in thread
From: One Thousand Gnomes @ 2014-02-24 13:29 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: David E. Box, tglx, mingo, x86, linux-kernel,
	srinivas.pandruvada, jacob.jun.pan

On Mon, 24 Feb 2014 05:21:43 -0800
"H. Peter Anvin" <hpa@zytor.com> wrote:

> On 02/24/2014 05:19 AM, One Thousand Gnomes wrote:
> >
> > Other than _available I would have expected all the others to resolve to
> > returning an error or doing a WARN() in the not compiled in case.
> >
> 
> WARN() or BUG()?

WARN I think. The usage cases I am aware of don't end up in catastrophic
failure if you get this wrong, but would be annoying to debug if missed.

Alan

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [PATCH V2 0/2] x86: IOSF: Add loadable module support
  2014-02-23  1:02 ` [PATCH RESEND] " David E. Box
  2014-02-24 13:19   ` One Thousand Gnomes
@ 2014-02-25  2:47   ` David E. Box
  2014-02-26 19:40     ` [PATCH V3 " David E. Box
                       ` (2 more replies)
  2014-02-25  2:47   ` [PATCH V2 1/2] x86: IOSF: add dummy functions for loadable modules David E. Box
  2014-02-25  2:47   ` [PATCH V2 2/2] x86: IOSF: Change IOSF_MBI Kconfig to default y David E. Box
  3 siblings, 3 replies; 30+ messages in thread
From: David E. Box @ 2014-02-25  2:47 UTC (permalink / raw)
  To: tglx, mingo, hpa
  Cc: David E. Box, x86, linux-kernel, srinivas.pandruvada, jacob.jun.pan

From: "David E. Box" <david.e.box@linux.intel.com>

This patch series adds missing functionalty that mostly affected loadable
modules.

The first patch adds dummy functions to allow drivers not completely
dependant on the IOSF MBI driver to compile on systems that don't have it.

The second ensures the availabilty of the MBI driver in the kernel, limiting the
possibility of requiring a rebuild when new modules needing the MBI are added.

Changes from V1:

	- Force default y for non-EXPERT to allow easier custom configuration
	  as suggested by hpa <hpa@zytor.com>
	- Add WARN() to dummy functions, other than iosf_mbi_available(), to
	  signal incorrect use as suggested by Alan <gnomes@lxorguk.ukuu.org.uk>
	  Also return EPERM in these functions
	- Splits single patch into two patch series

David E. Box (2):
  x86: IOSF: add dummy functions for loadable modules
  x86: IOSF: Change IOSF_MBI Kconfig to default y

 arch/x86/Kconfig                |    5 +++--
 arch/x86/include/asm/iosf_mbi.h |   39 ++++++++++++++++++++++++++++++++++++---
 arch/x86/kernel/iosf_mbi.c      |    6 ++++++
 3 files changed, 45 insertions(+), 5 deletions(-)

-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [PATCH V2 1/2] x86: IOSF: add dummy functions for loadable modules
  2014-02-23  1:02 ` [PATCH RESEND] " David E. Box
  2014-02-24 13:19   ` One Thousand Gnomes
  2014-02-25  2:47   ` [PATCH V2 0/2] x86: IOSF: Add loadable module support David E. Box
@ 2014-02-25  2:47   ` David E. Box
  2014-02-25  2:47   ` [PATCH V2 2/2] x86: IOSF: Change IOSF_MBI Kconfig to default y David E. Box
  3 siblings, 0 replies; 30+ messages in thread
From: David E. Box @ 2014-02-25  2:47 UTC (permalink / raw)
  To: tglx, mingo, hpa
  Cc: David E. Box, x86, linux-kernel, srinivas.pandruvada, jacob.jun.pan

From: "David E. Box" <david.e.box@linux.intel.com>

Some loadable modules only need IOSF access on the platforms where it exists.
Provide dummy functions to allow these modules to compile and load on the
platforms where it doesn't exist.

Signed-off-by: David E. Box <david.e.box@linux.intel.com>
---
 arch/x86/include/asm/iosf_mbi.h |   39 ++++++++++++++++++++++++++++++++++++---
 arch/x86/kernel/iosf_mbi.c      |    6 ++++++
 2 files changed, 42 insertions(+), 3 deletions(-)

diff --git a/arch/x86/include/asm/iosf_mbi.h b/arch/x86/include/asm/iosf_mbi.h
index 8e71c79..6dcaa1d 100644
--- a/arch/x86/include/asm/iosf_mbi.h
+++ b/arch/x86/include/asm/iosf_mbi.h
@@ -5,6 +5,8 @@
 #ifndef IOSF_MBI_SYMS_H
 #define IOSF_MBI_SYMS_H
 
+#ifdef CONFIG_IOSF_MBI
+
 #define MBI_MCR_OFFSET		0xD0
 #define MBI_MDR_OFFSET		0xD4
 #define MBI_MCRX_OFFSET		0xD8
@@ -50,6 +52,8 @@
 #define BT_MBI_PCIE_READ	0x00
 #define BT_MBI_PCIE_WRITE	0x01
 
+extern bool iosf_mbi_available(void);
+
 /**
  * iosf_mbi_read() - MailBox Interface read command
  * @port:	port indicating subunit being accessed
@@ -60,7 +64,7 @@
  * Locking is handled by spinlock - cannot sleep.
  * Return: Nonzero on error
  */
-int iosf_mbi_read(u8 port, u8 opcode, u32 offset, u32 *mdr);
+extern int iosf_mbi_read(u8 port, u8 opcode, u32 offset, u32 *mdr);
 
 /**
  * iosf_mbi_write() - MailBox unmasked write command
@@ -72,7 +76,7 @@ int iosf_mbi_read(u8 port, u8 opcode, u32 offset, u32 *mdr);
  * Locking is handled by spinlock - cannot sleep.
  * Return: Nonzero on error
  */
-int iosf_mbi_write(u8 port, u8 opcode, u32 offset, u32 mdr);
+extern int iosf_mbi_write(u8 port, u8 opcode, u32 offset, u32 mdr);
 
 /**
  * iosf_mbi_modify() - MailBox masked write command
@@ -85,6 +89,35 @@ int iosf_mbi_write(u8 port, u8 opcode, u32 offset, u32 mdr);
  * Locking is handled by spinlock - cannot sleep.
  * Return: Nonzero on error
  */
-int iosf_mbi_modify(u8 port, u8 opcode, u32 offset, u32 mdr, u32 mask);
+extern int iosf_mbi_modify(u8 port, u8 opcode, u32 offset, u32 mdr, u32 mask);
+
+#else /* CONFIG_IOSF_MBI is not enabled */
+static inline
+bool iosf_mbi_available(void)
+{
+	return false;
+}
+
+static inline
+int iosf_mbi_read(u8 port, u8 opcode, u32 offset, u32 *mdr)
+{
+	WARN();
+	return -EPERM;
+}
+
+static inline
+int iosf_mbi_write(u8 port, u8 opcode, u32 offset, u32 mdr)
+{
+	WARN();
+	return -EPERM;
+}
+
+static inline
+int iosf_mbi_modify(u8 port, u8 opcode, u32 offset, u32 mdr, u32 mask)
+{
+	WARN();
+	return -EPERM;
+}
+#endif /* CONFIG_IOSF_MBI */
 
 #endif /* IOSF_MBI_SYMS_H */
diff --git a/arch/x86/kernel/iosf_mbi.c b/arch/x86/kernel/iosf_mbi.c
index c3aae66..d3803c6 100644
--- a/arch/x86/kernel/iosf_mbi.c
+++ b/arch/x86/kernel/iosf_mbi.c
@@ -177,6 +177,12 @@ int iosf_mbi_modify(u8 port, u8 opcode, u32 offset, u32 mdr, u32 mask)
 }
 EXPORT_SYMBOL(iosf_mbi_modify);
 
+bool iosf_mbi_available(void)
+{
+	return mbi_pdev;
+}
+EXPORT_SYMBOL(iosf_mbi_available);
+
 static int iosf_mbi_probe(struct pci_dev *pdev,
 			  const struct pci_device_id *unused)
 {
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH V2 2/2] x86: IOSF: Change IOSF_MBI Kconfig to default y
  2014-02-23  1:02 ` [PATCH RESEND] " David E. Box
                     ` (2 preceding siblings ...)
  2014-02-25  2:47   ` [PATCH V2 1/2] x86: IOSF: add dummy functions for loadable modules David E. Box
@ 2014-02-25  2:47   ` David E. Box
  2014-03-01 20:34     ` [tip:x86/platform] x86, iosf: " tip-bot for David E. Box
  3 siblings, 1 reply; 30+ messages in thread
From: David E. Box @ 2014-02-25  2:47 UTC (permalink / raw)
  To: tglx, mingo, hpa
  Cc: David E. Box, x86, linux-kernel, srinivas.pandruvada, jacob.jun.pan

From: "David E. Box" <david.e.box@linux.intel.com>

The IOSF Mailbox interface is an access mechanism used by multiple drivers to
communicate with key configuration registers on new Intel SOC platforms. The
interface is ubiquitous enough that we need to ensure the availability of the
driver in non-EXPERT x86 kernels.

Signed-off-by: David E. Box <david.e.box@linux.intel.com>
---
 arch/x86/Kconfig |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index d3b1f8b..4de5205 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -2385,11 +2385,12 @@ config X86_DMA_REMAP
 	depends on STA2X11
 
 config IOSF_MBI
-	bool
+	bool "IOSF MBI support" if EXPERT
+	default y
 	depends on PCI
 	---help---
 	  To be selected by modules requiring access to the Intel OnChip System
-	  Fabric (IOSF) Sideband MailBox Interface (MBI). For MBI platforms
+	  Fabric (IOSF) Sideband MailBox Interface (MBI). For IOSF platforms
 	  enumerable by PCI.
 
 source "net/Kconfig"
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH V3 0/2] x86: IOSF: Add loadable module support
  2014-02-25  2:47   ` [PATCH V2 0/2] x86: IOSF: Add loadable module support David E. Box
@ 2014-02-26 19:40     ` David E. Box
  2014-02-28 17:47       ` [PATCH V4 " David E. Box
                         ` (2 more replies)
  2014-02-26 19:40     ` [PATCH V3 1/2] x86: IOSF: add dummy functions for loadable modules David E. Box
  2014-02-26 19:40     ` [PATCH V3 2/2] x86: IOSF: Change IOSF_MBI Kconfig to default y David E. Box
  2 siblings, 3 replies; 30+ messages in thread
From: David E. Box @ 2014-02-26 19:40 UTC (permalink / raw)
  To: tglx, mingo, hpa
  Cc: David E. Box, x86, linux-kernel, srinivas.pandruvada, jacob.jun.pan

From: "David E. Box" <david.e.box@linux.intel.com>

This patch series adds missing functionalty that mostly affected loadable
modules.

The first patch adds dummy functions to allow drivers not completely
dependant on the IOSF MBI driver to compile on systems that don't have it.

The second ensures the availabilty of the MBI driver in the kernel, limiting the
possibility of requiring a rebuild when new modules needing the MBI are added.

Changes from V2:

	- Remove non linux style externs from iosf_mbi.h

Changes from V1:

	- Force default y for non-EXPERT to allow easier custom configuration
	  as suggested by hpa <hpa@zytor.com>
	- Add WARN() to dummy functions, other than iosf_mbi_available(), to
	  signal incorrect use as suggested by Alan <gnomes@lxorguk.ukuu.org.uk>
	  Also return EPERM in these functions
	- Splits single patch into two patch series

David E. Box (2):
  x86: IOSF: add dummy functions for loadable modules
  x86: IOSF: Change IOSF_MBI Kconfig to default y

 arch/x86/Kconfig                |    5 +++--
 arch/x86/include/asm/iosf_mbi.h |   33 +++++++++++++++++++++++++++++++++
 arch/x86/kernel/iosf_mbi.c      |    6 ++++++
 3 files changed, 42 insertions(+), 2 deletions(-)

-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [PATCH V3 1/2] x86: IOSF: add dummy functions for loadable modules
  2014-02-25  2:47   ` [PATCH V2 0/2] x86: IOSF: Add loadable module support David E. Box
  2014-02-26 19:40     ` [PATCH V3 " David E. Box
@ 2014-02-26 19:40     ` David E. Box
  2014-02-26 19:40     ` [PATCH V3 2/2] x86: IOSF: Change IOSF_MBI Kconfig to default y David E. Box
  2 siblings, 0 replies; 30+ messages in thread
From: David E. Box @ 2014-02-26 19:40 UTC (permalink / raw)
  To: tglx, mingo, hpa
  Cc: David E. Box, x86, linux-kernel, srinivas.pandruvada, jacob.jun.pan

From: "David E. Box" <david.e.box@linux.intel.com>

Some loadable modules only need IOSF access on the platforms where it exists.
Provide dummy functions to allow these modules to compile and load on the
platforms where it doesn't exist.

Signed-off-by: David E. Box <david.e.box@linux.intel.com>
---
 arch/x86/include/asm/iosf_mbi.h |   33 +++++++++++++++++++++++++++++++++
 arch/x86/kernel/iosf_mbi.c      |    6 ++++++
 2 files changed, 39 insertions(+)

diff --git a/arch/x86/include/asm/iosf_mbi.h b/arch/x86/include/asm/iosf_mbi.h
index 8e71c79..9fc5402 100644
--- a/arch/x86/include/asm/iosf_mbi.h
+++ b/arch/x86/include/asm/iosf_mbi.h
@@ -5,6 +5,8 @@
 #ifndef IOSF_MBI_SYMS_H
 #define IOSF_MBI_SYMS_H
 
+#ifdef CONFIG_IOSF_MBI
+
 #define MBI_MCR_OFFSET		0xD0
 #define MBI_MDR_OFFSET		0xD4
 #define MBI_MCRX_OFFSET		0xD8
@@ -50,6 +52,8 @@
 #define BT_MBI_PCIE_READ	0x00
 #define BT_MBI_PCIE_WRITE	0x01
 
+bool iosf_mbi_available(void);
+
 /**
  * iosf_mbi_read() - MailBox Interface read command
  * @port:	port indicating subunit being accessed
@@ -87,4 +91,33 @@ int iosf_mbi_write(u8 port, u8 opcode, u32 offset, u32 mdr);
  */
 int iosf_mbi_modify(u8 port, u8 opcode, u32 offset, u32 mdr, u32 mask);
 
+#else /* CONFIG_IOSF_MBI is not enabled */
+static inline
+bool iosf_mbi_available(void)
+{
+	return false;
+}
+
+static inline
+int iosf_mbi_read(u8 port, u8 opcode, u32 offset, u32 *mdr)
+{
+	WARN();
+	return -EPERM;
+}
+
+static inline
+int iosf_mbi_write(u8 port, u8 opcode, u32 offset, u32 mdr)
+{
+	WARN();
+	return -EPERM;
+}
+
+static inline
+int iosf_mbi_modify(u8 port, u8 opcode, u32 offset, u32 mdr, u32 mask)
+{
+	WARN();
+	return -EPERM;
+}
+#endif /* CONFIG_IOSF_MBI */
+
 #endif /* IOSF_MBI_SYMS_H */
diff --git a/arch/x86/kernel/iosf_mbi.c b/arch/x86/kernel/iosf_mbi.c
index c3aae66..d3803c6 100644
--- a/arch/x86/kernel/iosf_mbi.c
+++ b/arch/x86/kernel/iosf_mbi.c
@@ -177,6 +177,12 @@ int iosf_mbi_modify(u8 port, u8 opcode, u32 offset, u32 mdr, u32 mask)
 }
 EXPORT_SYMBOL(iosf_mbi_modify);
 
+bool iosf_mbi_available(void)
+{
+	return mbi_pdev;
+}
+EXPORT_SYMBOL(iosf_mbi_available);
+
 static int iosf_mbi_probe(struct pci_dev *pdev,
 			  const struct pci_device_id *unused)
 {
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH V3 2/2] x86: IOSF: Change IOSF_MBI Kconfig to default y
  2014-02-25  2:47   ` [PATCH V2 0/2] x86: IOSF: Add loadable module support David E. Box
  2014-02-26 19:40     ` [PATCH V3 " David E. Box
  2014-02-26 19:40     ` [PATCH V3 1/2] x86: IOSF: add dummy functions for loadable modules David E. Box
@ 2014-02-26 19:40     ` David E. Box
  2014-02-27  3:26       ` H. Peter Anvin
  2014-02-27 16:50       ` [PATCH RESEND " David E. Box
  2 siblings, 2 replies; 30+ messages in thread
From: David E. Box @ 2014-02-26 19:40 UTC (permalink / raw)
  To: tglx, mingo, hpa
  Cc: David E. Box, x86, linux-kernel, srinivas.pandruvada, jacob.jun.pan

From: "David E. Box" <david.e.box@linux.intel.com>

The IOSF Mailbox interface is an access mechanism used by multiple drivers to
communicate with key configuration registers on new Intel SOC platforms. The
interface is ubiquitous enough that we need to ensure the availability of the
driver in non-EXPERT configured x86 kernels.

Signed-off-by: David E. Box <david.e.box@linux.intel.com>
---
 arch/x86/Kconfig |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index d3b1f8b..4de5205 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -2385,11 +2385,12 @@ config X86_DMA_REMAP
 	depends on STA2X11
 
 config IOSF_MBI
-	bool
+	bool "IOSF MBI support" if EXPERT
+	default y
 	depends on PCI
 	---help---
 	  To be selected by modules requiring access to the Intel OnChip System
-	  Fabric (IOSF) Sideband MailBox Interface (MBI). For MBI platforms
+	  Fabric (IOSF) Sideband MailBox Interface (MBI). For IOSF platforms
 	  enumerable by PCI.
 
 source "net/Kconfig"
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* Re: [PATCH V3 2/2] x86: IOSF: Change IOSF_MBI Kconfig to default y
  2014-02-26 19:40     ` [PATCH V3 2/2] x86: IOSF: Change IOSF_MBI Kconfig to default y David E. Box
@ 2014-02-27  3:26       ` H. Peter Anvin
  2014-02-27 16:50       ` [PATCH RESEND " David E. Box
  1 sibling, 0 replies; 30+ messages in thread
From: H. Peter Anvin @ 2014-02-27  3:26 UTC (permalink / raw)
  To: David E. Box, tglx, mingo
  Cc: x86, linux-kernel, srinivas.pandruvada, jacob.jun.pan

On 02/26/2014 11:40 AM, David E. Box wrote:
> From: "David E. Box" <david.e.box@linux.intel.com>
> 
> The IOSF Mailbox interface is an access mechanism used by multiple drivers to
> communicate with key configuration registers on new Intel SOC platforms. The
> interface is ubiquitous enough that we need to ensure the availability of the
> driver in non-EXPERT configured x86 kernels.
> 
> Signed-off-by: David E. Box <david.e.box@linux.intel.com>

Hi David,

Could you please update the patch description to explain to people who
may not be familiar why the IOSF driver can't be a module?

	-hpa



^ permalink raw reply	[flat|nested] 30+ messages in thread

* [PATCH RESEND V3 2/2] x86: IOSF: Change IOSF_MBI Kconfig to default y
  2014-02-26 19:40     ` [PATCH V3 2/2] x86: IOSF: Change IOSF_MBI Kconfig to default y David E. Box
  2014-02-27  3:26       ` H. Peter Anvin
@ 2014-02-27 16:50       ` David E. Box
  1 sibling, 0 replies; 30+ messages in thread
From: David E. Box @ 2014-02-27 16:50 UTC (permalink / raw)
  To: tglx, mingo, hpa
  Cc: David E. Box, x86, linux-kernel, srinivas.pandruvada, jacob.jun.pan

From: "David E. Box" <david.e.box@linux.intel.com>

The IOSF Mailbox interface is an access mechanism used by drivers to communicate
with the configuration registers of devices connected on the fabric of Intel SOC
platforms. The interface is ubiquitous enough that we need to ensure the
availability of the driver in non-EXPERT configured x86 kernels. Make the module
built-in so drivers can access device registers that need configuration during
early boot.

Signed-off-by: David E. Box <david.e.box@linux.intel.com>
---
 arch/x86/Kconfig |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index d3b1f8b..4de5205 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -2385,11 +2385,12 @@ config X86_DMA_REMAP
 	depends on STA2X11
 
 config IOSF_MBI
-	bool
+	bool "IOSF MBI support" if EXPERT
+	default y
 	depends on PCI
 	---help---
 	  To be selected by modules requiring access to the Intel OnChip System
-	  Fabric (IOSF) Sideband MailBox Interface (MBI). For MBI platforms
+	  Fabric (IOSF) Sideband MailBox Interface (MBI). For IOSF platforms
 	  enumerable by PCI.
 
 source "net/Kconfig"
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH V4 0/2] x86: IOSF: Add loadable module support
  2014-02-26 19:40     ` [PATCH V3 " David E. Box
@ 2014-02-28 17:47       ` David E. Box
  2014-02-28 18:01         ` H. Peter Anvin
                           ` (3 more replies)
  2014-02-28 17:47       ` [PATCH V4 1/2] x86: IOSF: add dummy functions for loadable modules David E. Box
  2014-02-28 17:47       ` [PATCH V4 2/2] x86: IOSF: Change IOSF_MBI Kconfig to default y David E. Box
  2 siblings, 4 replies; 30+ messages in thread
From: David E. Box @ 2014-02-28 17:47 UTC (permalink / raw)
  To: tglx, mingo, hpa
  Cc: David E. Box, x86, linux-kernel, srinivas.pandruvada, jacob.jun.pan

From: "David E. Box" <david.e.box@linux.intel.com>

This patch series adds missing functionalty that mostly affected loadable
modules.

The first patch adds dummy functions to allow drivers not completely
dependant on the IOSF MBI driver to compile on systems that don't have it.

The second makes MBI driver built in.

Changes from V3:

	- Code is agreed to be small enough to not warrant forcing for
	  non-EXPERT only

Changes from V2:

	- Remove non linux style externs from iosf_mbi.h

Changes from V1:

	- Force default y for non-EXPERT to allow easier custom configuration
	  as suggested by hpa <hpa@zytor.com>
	- Add WARN() to dummy functions, other than iosf_mbi_available(), to
	  signal incorrect use as suggested by Alan <gnomes@lxorguk.ukuu.org.uk>
	  Also return EPERM in these functions
	- Splits single patch into two patch series

David E. Box (2):
  x86: IOSF: add dummy functions for loadable modules
  x86: IOSF: Change IOSF_MBI Kconfig to default y

 arch/x86/Kconfig                |    6 +-----
 arch/x86/include/asm/iosf_mbi.h |   33 +++++++++++++++++++++++++++++++++
 arch/x86/kernel/iosf_mbi.c      |    6 ++++++
 3 files changed, 40 insertions(+), 5 deletions(-)

-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [PATCH V4 1/2] x86: IOSF: add dummy functions for loadable modules
  2014-02-26 19:40     ` [PATCH V3 " David E. Box
  2014-02-28 17:47       ` [PATCH V4 " David E. Box
@ 2014-02-28 17:47       ` David E. Box
  2014-02-28 17:47       ` [PATCH V4 2/2] x86: IOSF: Change IOSF_MBI Kconfig to default y David E. Box
  2 siblings, 0 replies; 30+ messages in thread
From: David E. Box @ 2014-02-28 17:47 UTC (permalink / raw)
  To: tglx, mingo, hpa
  Cc: David E. Box, x86, linux-kernel, srinivas.pandruvada, jacob.jun.pan

From: "David E. Box" <david.e.box@linux.intel.com>

Some loadable modules only need IOSF access on the platforms where it exists.
Provide dummy functions to allow these modules to compile and load on the
platforms where it doesn't exist.

Signed-off-by: David E. Box <david.e.box@linux.intel.com>
---
 arch/x86/include/asm/iosf_mbi.h |   33 +++++++++++++++++++++++++++++++++
 arch/x86/kernel/iosf_mbi.c      |    6 ++++++
 2 files changed, 39 insertions(+)

diff --git a/arch/x86/include/asm/iosf_mbi.h b/arch/x86/include/asm/iosf_mbi.h
index 8e71c79..9fc5402 100644
--- a/arch/x86/include/asm/iosf_mbi.h
+++ b/arch/x86/include/asm/iosf_mbi.h
@@ -5,6 +5,8 @@
 #ifndef IOSF_MBI_SYMS_H
 #define IOSF_MBI_SYMS_H
 
+#ifdef CONFIG_IOSF_MBI
+
 #define MBI_MCR_OFFSET		0xD0
 #define MBI_MDR_OFFSET		0xD4
 #define MBI_MCRX_OFFSET		0xD8
@@ -50,6 +52,8 @@
 #define BT_MBI_PCIE_READ	0x00
 #define BT_MBI_PCIE_WRITE	0x01
 
+bool iosf_mbi_available(void);
+
 /**
  * iosf_mbi_read() - MailBox Interface read command
  * @port:	port indicating subunit being accessed
@@ -87,4 +91,33 @@ int iosf_mbi_write(u8 port, u8 opcode, u32 offset, u32 mdr);
  */
 int iosf_mbi_modify(u8 port, u8 opcode, u32 offset, u32 mdr, u32 mask);
 
+#else /* CONFIG_IOSF_MBI is not enabled */
+static inline
+bool iosf_mbi_available(void)
+{
+	return false;
+}
+
+static inline
+int iosf_mbi_read(u8 port, u8 opcode, u32 offset, u32 *mdr)
+{
+	WARN();
+	return -EPERM;
+}
+
+static inline
+int iosf_mbi_write(u8 port, u8 opcode, u32 offset, u32 mdr)
+{
+	WARN();
+	return -EPERM;
+}
+
+static inline
+int iosf_mbi_modify(u8 port, u8 opcode, u32 offset, u32 mdr, u32 mask)
+{
+	WARN();
+	return -EPERM;
+}
+#endif /* CONFIG_IOSF_MBI */
+
 #endif /* IOSF_MBI_SYMS_H */
diff --git a/arch/x86/kernel/iosf_mbi.c b/arch/x86/kernel/iosf_mbi.c
index c3aae66..d3803c6 100644
--- a/arch/x86/kernel/iosf_mbi.c
+++ b/arch/x86/kernel/iosf_mbi.c
@@ -177,6 +177,12 @@ int iosf_mbi_modify(u8 port, u8 opcode, u32 offset, u32 mdr, u32 mask)
 }
 EXPORT_SYMBOL(iosf_mbi_modify);
 
+bool iosf_mbi_available(void)
+{
+	return mbi_pdev;
+}
+EXPORT_SYMBOL(iosf_mbi_available);
+
 static int iosf_mbi_probe(struct pci_dev *pdev,
 			  const struct pci_device_id *unused)
 {
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH V4 2/2] x86: IOSF: Change IOSF_MBI Kconfig to default y
  2014-02-26 19:40     ` [PATCH V3 " David E. Box
  2014-02-28 17:47       ` [PATCH V4 " David E. Box
  2014-02-28 17:47       ` [PATCH V4 1/2] x86: IOSF: add dummy functions for loadable modules David E. Box
@ 2014-02-28 17:47       ` David E. Box
  2 siblings, 0 replies; 30+ messages in thread
From: David E. Box @ 2014-02-28 17:47 UTC (permalink / raw)
  To: tglx, mingo, hpa
  Cc: David E. Box, x86, linux-kernel, srinivas.pandruvada, jacob.jun.pan

From: "David E. Box" <david.e.box@linux.intel.com>

Make the IOSF Mailbox driver built in as it's a very small piece of code that
provides core functionality needed for new Intel SOC platforms to access the
device registers on the SOC.

Signed-off-by: David E. Box <david.e.box@linux.intel.com>
---
 arch/x86/Kconfig |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index d3b1f8b..4f31ad3 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -2385,12 +2385,8 @@ config X86_DMA_REMAP
 	depends on STA2X11
 
 config IOSF_MBI
-	bool
+	def_bool y
 	depends on PCI
-	---help---
-	  To be selected by modules requiring access to the Intel OnChip System
-	  Fabric (IOSF) Sideband MailBox Interface (MBI). For MBI platforms
-	  enumerable by PCI.
 
 source "net/Kconfig"
 
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* Re: [PATCH V4 0/2] x86: IOSF: Add loadable module support
  2014-02-28 17:47       ` [PATCH V4 " David E. Box
@ 2014-02-28 18:01         ` H. Peter Anvin
  2014-03-01  2:40         ` [PATCH V5 " David E. Box
                           ` (2 subsequent siblings)
  3 siblings, 0 replies; 30+ messages in thread
From: H. Peter Anvin @ 2014-02-28 18:01 UTC (permalink / raw)
  To: David E. Box, tglx, Ingo Molnar
  Cc: x86, linux-kernel, srinivas.pandruvada, jacob.jun.pan

On 02/28/2014 09:47 AM, David E. Box wrote:
> 
> Changes from V3:
> 
> 	- Code is agreed to be small enough to not warrant forcing for
> 	  non-EXPERT only
> 

Did I miss part of the discussion?  How small is "small"?

	-hpa



^ permalink raw reply	[flat|nested] 30+ messages in thread

* [PATCH V5 0/2] x86: IOSF: Add loadable module support
  2014-02-28 17:47       ` [PATCH V4 " David E. Box
  2014-02-28 18:01         ` H. Peter Anvin
@ 2014-03-01  2:40         ` David E. Box
  2014-03-03  7:01           ` Li, Aubrey
  2014-03-01  2:40         ` [PATCH V5 1/2] x86: IOSF: add dummy functions for loadable modules David E. Box
  2014-03-01  2:40         ` [PATCH V5 2/2] x86: IOSF: Change IOSF_MBI Kconfig to default y David E. Box
  3 siblings, 1 reply; 30+ messages in thread
From: David E. Box @ 2014-03-01  2:40 UTC (permalink / raw)
  To: tglx, mingo, hpa; +Cc: David E. Box, x86, linux-kernel

From: "David E. Box" <david.e.box@linux.intel.com>

This patch series adds missing functionalty that mostly affected loadable
modules.

The first patch adds dummy functions to allow drivers not completely
dependant on the IOSF MBI driver to compile on systems that don't have it.

The second makes MBI driver built in.

Changes from V4:

	- Put back Kconfig prompt for IOSF_MBI.

Changes from V3:

	- Code is agreed to be small enough to not warrant forcing for
	  non-EXPERT only

Changes from V2:

	- Remove non linux style externs from iosf_mbi.h

Changes from V1:

	- Force default y for non-EXPERT to allow easier custom configuration
	  as suggested by hpa <hpa@zytor.com>
	- Add WARN() to dummy functions, other than iosf_mbi_available(), to
	  signal incorrect use as suggested by Alan <gnomes@lxorguk.ukuu.org.uk>
	  Also return EPERM in these functions
	- Splits single patch into two patch series

David E. Box (2):
  x86: IOSF: add dummy functions for loadable modules
  x86: IOSF: Change IOSF_MBI Kconfig to default y

 arch/x86/Kconfig                |    7 ++-----
 arch/x86/include/asm/iosf_mbi.h |   33 +++++++++++++++++++++++++++++++++
 arch/x86/kernel/iosf_mbi.c      |    6 ++++++
 3 files changed, 41 insertions(+), 5 deletions(-)

-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [PATCH V5 1/2] x86: IOSF: add dummy functions for loadable modules
  2014-02-28 17:47       ` [PATCH V4 " David E. Box
  2014-02-28 18:01         ` H. Peter Anvin
  2014-03-01  2:40         ` [PATCH V5 " David E. Box
@ 2014-03-01  2:40         ` David E. Box
  2014-03-01 20:34           ` [tip:x86/platform] x86, iosf: Add " tip-bot for David E. Box
  2014-03-03  7:21           ` [PATCH V5 1/2] x86: IOSF: add " Li, Aubrey
  2014-03-01  2:40         ` [PATCH V5 2/2] x86: IOSF: Change IOSF_MBI Kconfig to default y David E. Box
  3 siblings, 2 replies; 30+ messages in thread
From: David E. Box @ 2014-03-01  2:40 UTC (permalink / raw)
  To: tglx, mingo, hpa; +Cc: David E. Box, x86, linux-kernel

From: "David E. Box" <david.e.box@linux.intel.com>

Some loadable modules only need IOSF access on the platforms where it exists.
Provide dummy functions to allow these modules to compile and load on the
platforms where it doesn't exist.

Signed-off-by: David E. Box <david.e.box@linux.intel.com>
---
 arch/x86/include/asm/iosf_mbi.h |   33 +++++++++++++++++++++++++++++++++
 arch/x86/kernel/iosf_mbi.c      |    6 ++++++
 2 files changed, 39 insertions(+)

diff --git a/arch/x86/include/asm/iosf_mbi.h b/arch/x86/include/asm/iosf_mbi.h
index 8e71c79..9fc5402 100644
--- a/arch/x86/include/asm/iosf_mbi.h
+++ b/arch/x86/include/asm/iosf_mbi.h
@@ -5,6 +5,8 @@
 #ifndef IOSF_MBI_SYMS_H
 #define IOSF_MBI_SYMS_H
 
+#ifdef CONFIG_IOSF_MBI
+
 #define MBI_MCR_OFFSET		0xD0
 #define MBI_MDR_OFFSET		0xD4
 #define MBI_MCRX_OFFSET		0xD8
@@ -50,6 +52,8 @@
 #define BT_MBI_PCIE_READ	0x00
 #define BT_MBI_PCIE_WRITE	0x01
 
+bool iosf_mbi_available(void);
+
 /**
  * iosf_mbi_read() - MailBox Interface read command
  * @port:	port indicating subunit being accessed
@@ -87,4 +91,33 @@ int iosf_mbi_write(u8 port, u8 opcode, u32 offset, u32 mdr);
  */
 int iosf_mbi_modify(u8 port, u8 opcode, u32 offset, u32 mdr, u32 mask);
 
+#else /* CONFIG_IOSF_MBI is not enabled */
+static inline
+bool iosf_mbi_available(void)
+{
+	return false;
+}
+
+static inline
+int iosf_mbi_read(u8 port, u8 opcode, u32 offset, u32 *mdr)
+{
+	WARN();
+	return -EPERM;
+}
+
+static inline
+int iosf_mbi_write(u8 port, u8 opcode, u32 offset, u32 mdr)
+{
+	WARN();
+	return -EPERM;
+}
+
+static inline
+int iosf_mbi_modify(u8 port, u8 opcode, u32 offset, u32 mdr, u32 mask)
+{
+	WARN();
+	return -EPERM;
+}
+#endif /* CONFIG_IOSF_MBI */
+
 #endif /* IOSF_MBI_SYMS_H */
diff --git a/arch/x86/kernel/iosf_mbi.c b/arch/x86/kernel/iosf_mbi.c
index c3aae66..d3803c6 100644
--- a/arch/x86/kernel/iosf_mbi.c
+++ b/arch/x86/kernel/iosf_mbi.c
@@ -177,6 +177,12 @@ int iosf_mbi_modify(u8 port, u8 opcode, u32 offset, u32 mdr, u32 mask)
 }
 EXPORT_SYMBOL(iosf_mbi_modify);
 
+bool iosf_mbi_available(void)
+{
+	return mbi_pdev;
+}
+EXPORT_SYMBOL(iosf_mbi_available);
+
 static int iosf_mbi_probe(struct pci_dev *pdev,
 			  const struct pci_device_id *unused)
 {
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH V5 2/2] x86: IOSF: Change IOSF_MBI Kconfig to default y
  2014-02-28 17:47       ` [PATCH V4 " David E. Box
                           ` (2 preceding siblings ...)
  2014-03-01  2:40         ` [PATCH V5 1/2] x86: IOSF: add dummy functions for loadable modules David E. Box
@ 2014-03-01  2:40         ` David E. Box
  2014-03-03  7:07           ` Li, Aubrey
  3 siblings, 1 reply; 30+ messages in thread
From: David E. Box @ 2014-03-01  2:40 UTC (permalink / raw)
  To: tglx, mingo, hpa; +Cc: David E. Box, x86, linux-kernel

From: "David E. Box" <david.e.box@linux.intel.com>

Make the IOSF Mailbox driver built in as it provides core functionality needed
for new Intel SOC platforms to access the device registers on the SOC.

Signed-off-by: David E. Box <david.e.box@linux.intel.com>
---
 arch/x86/Kconfig |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index d3b1f8b..e34b252 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -2385,12 +2385,9 @@ config X86_DMA_REMAP
 	depends on STA2X11
 
 config IOSF_MBI
-	bool
+	bool "Intel IOSF Mailbox Driver support"
+	default y
 	depends on PCI
-	---help---
-	  To be selected by modules requiring access to the Intel OnChip System
-	  Fabric (IOSF) Sideband MailBox Interface (MBI). For MBI platforms
-	  enumerable by PCI.
 
 source "net/Kconfig"
 
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [tip:x86/platform] x86, iosf: Add dummy functions for loadable modules
  2014-03-01  2:40         ` [PATCH V5 1/2] x86: IOSF: add dummy functions for loadable modules David E. Box
@ 2014-03-01 20:34           ` tip-bot for David E. Box
  2014-03-03  7:21           ` [PATCH V5 1/2] x86: IOSF: add " Li, Aubrey
  1 sibling, 0 replies; 30+ messages in thread
From: tip-bot for David E. Box @ 2014-03-01 20:34 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, david.e.box, tglx, hpa

Commit-ID:  60af5c61f26fffb5f53ce74641606fe2c9a4d903
Gitweb:     http://git.kernel.org/tip/60af5c61f26fffb5f53ce74641606fe2c9a4d903
Author:     David E. Box <david.e.box@linux.intel.com>
AuthorDate: Fri, 28 Feb 2014 18:40:51 -0800
Committer:  H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Fri, 28 Feb 2014 19:55:00 -0800

x86, iosf: Add dummy functions for loadable modules

Some loadable modules only need IOSF access on the platforms where it exists.
Provide dummy functions to allow these modules to compile and load on the
platforms where it doesn't exist.

Signed-off-by: David E. Box <david.e.box@linux.intel.com>
Link: http://lkml.kernel.org/r/1393641652-7222-2-git-send-email-david.e.box@linux.intel.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
---
 arch/x86/include/asm/iosf_mbi.h | 33 +++++++++++++++++++++++++++++++++
 arch/x86/kernel/iosf_mbi.c      |  6 ++++++
 2 files changed, 39 insertions(+)

diff --git a/arch/x86/include/asm/iosf_mbi.h b/arch/x86/include/asm/iosf_mbi.h
index 8e71c79..9fc5402 100644
--- a/arch/x86/include/asm/iosf_mbi.h
+++ b/arch/x86/include/asm/iosf_mbi.h
@@ -5,6 +5,8 @@
 #ifndef IOSF_MBI_SYMS_H
 #define IOSF_MBI_SYMS_H
 
+#ifdef CONFIG_IOSF_MBI
+
 #define MBI_MCR_OFFSET		0xD0
 #define MBI_MDR_OFFSET		0xD4
 #define MBI_MCRX_OFFSET		0xD8
@@ -50,6 +52,8 @@
 #define BT_MBI_PCIE_READ	0x00
 #define BT_MBI_PCIE_WRITE	0x01
 
+bool iosf_mbi_available(void);
+
 /**
  * iosf_mbi_read() - MailBox Interface read command
  * @port:	port indicating subunit being accessed
@@ -87,4 +91,33 @@ int iosf_mbi_write(u8 port, u8 opcode, u32 offset, u32 mdr);
  */
 int iosf_mbi_modify(u8 port, u8 opcode, u32 offset, u32 mdr, u32 mask);
 
+#else /* CONFIG_IOSF_MBI is not enabled */
+static inline
+bool iosf_mbi_available(void)
+{
+	return false;
+}
+
+static inline
+int iosf_mbi_read(u8 port, u8 opcode, u32 offset, u32 *mdr)
+{
+	WARN();
+	return -EPERM;
+}
+
+static inline
+int iosf_mbi_write(u8 port, u8 opcode, u32 offset, u32 mdr)
+{
+	WARN();
+	return -EPERM;
+}
+
+static inline
+int iosf_mbi_modify(u8 port, u8 opcode, u32 offset, u32 mdr, u32 mask)
+{
+	WARN();
+	return -EPERM;
+}
+#endif /* CONFIG_IOSF_MBI */
+
 #endif /* IOSF_MBI_SYMS_H */
diff --git a/arch/x86/kernel/iosf_mbi.c b/arch/x86/kernel/iosf_mbi.c
index c3aae66..d3803c6 100644
--- a/arch/x86/kernel/iosf_mbi.c
+++ b/arch/x86/kernel/iosf_mbi.c
@@ -177,6 +177,12 @@ int iosf_mbi_modify(u8 port, u8 opcode, u32 offset, u32 mdr, u32 mask)
 }
 EXPORT_SYMBOL(iosf_mbi_modify);
 
+bool iosf_mbi_available(void)
+{
+	return mbi_pdev;
+}
+EXPORT_SYMBOL(iosf_mbi_available);
+
 static int iosf_mbi_probe(struct pci_dev *pdev,
 			  const struct pci_device_id *unused)
 {

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [tip:x86/platform] x86, iosf: Change IOSF_MBI Kconfig to default y
  2014-02-25  2:47   ` [PATCH V2 2/2] x86: IOSF: Change IOSF_MBI Kconfig to default y David E. Box
@ 2014-03-01 20:34     ` tip-bot for David E. Box
  0 siblings, 0 replies; 30+ messages in thread
From: tip-bot for David E. Box @ 2014-03-01 20:34 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, david.e.box, tglx, hpa

Commit-ID:  0fd9bdfa3b7698e30d2fbc4a029ded0f3428cf10
Gitweb:     http://git.kernel.org/tip/0fd9bdfa3b7698e30d2fbc4a029ded0f3428cf10
Author:     David E. Box <david.e.box@linux.intel.com>
AuthorDate: Mon, 24 Feb 2014 18:47:22 -0800
Committer:  H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Fri, 28 Feb 2014 19:56:13 -0800

x86, iosf: Change IOSF_MBI Kconfig to default y

The IOSF Mailbox interface is an access mechanism used by multiple drivers to
communicate with key configuration registers on new Intel SOC platforms. The
interface is ubiquitous enough that we need to ensure the availability of the
driver in non-EXPERT x86 kernels.

[ hpa: I think it makes sense to build these in unless EXPERT is set,
  in which case it should be optional.  Ideally the IOSF driver should
  be possible to build as a module on which other modules can depend,
  but that can be done on top of this work. ]

Signed-off-by: David E. Box <david.e.box@linux.intel.com>
Link: http://lkml.kernel.org/r/1393296442-12942-3-git-send-email-david.e.box@linux.intel.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
---
 arch/x86/Kconfig | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 0af5250..1487fdd 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -2413,11 +2413,12 @@ config X86_DMA_REMAP
 	depends on STA2X11
 
 config IOSF_MBI
-	bool
+	bool "IOSF MBI support" if EXPERT
+	default y
 	depends on PCI
 	---help---
 	  To be selected by modules requiring access to the Intel OnChip System
-	  Fabric (IOSF) Sideband MailBox Interface (MBI). For MBI platforms
+	  Fabric (IOSF) Sideband MailBox Interface (MBI). For IOSF platforms
 	  enumerable by PCI.
 
 source "net/Kconfig"

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* Re: [PATCH V5 0/2] x86: IOSF: Add loadable module support
  2014-03-01  2:40         ` [PATCH V5 " David E. Box
@ 2014-03-03  7:01           ` Li, Aubrey
  2014-03-03 15:58             ` David E. Box
  0 siblings, 1 reply; 30+ messages in thread
From: Li, Aubrey @ 2014-03-03  7:01 UTC (permalink / raw)
  To: David E. Box, tglx, mingo, hpa; +Cc: x86, linux-kernel

Hi David,

I'm probably too late to catch this thread. Just one question, what's
the relationship between
	arch/x86/kernel/iosf_mbi.c
and
	drivers/platform/x86/intel_baytrail.c

Thanks,
-Aubrey

On 2014/3/1 10:40, David E. Box wrote:
> From: "David E. Box" <david.e.box@linux.intel.com>
> 
> This patch series adds missing functionalty that mostly affected loadable
> modules.
> 
> The first patch adds dummy functions to allow drivers not completely
> dependant on the IOSF MBI driver to compile on systems that don't have it.
> 
> The second makes MBI driver built in.
> 
> Changes from V4:
> 
> 	- Put back Kconfig prompt for IOSF_MBI.
> 
> Changes from V3:
> 
> 	- Code is agreed to be small enough to not warrant forcing for
> 	  non-EXPERT only
> 
> Changes from V2:
> 
> 	- Remove non linux style externs from iosf_mbi.h
> 
> Changes from V1:
> 
> 	- Force default y for non-EXPERT to allow easier custom configuration
> 	  as suggested by hpa <hpa@zytor.com>
> 	- Add WARN() to dummy functions, other than iosf_mbi_available(), to
> 	  signal incorrect use as suggested by Alan <gnomes@lxorguk.ukuu.org.uk>
> 	  Also return EPERM in these functions
> 	- Splits single patch into two patch series
> 
> David E. Box (2):
>   x86: IOSF: add dummy functions for loadable modules
>   x86: IOSF: Change IOSF_MBI Kconfig to default y
> 
>  arch/x86/Kconfig                |    7 ++-----
>  arch/x86/include/asm/iosf_mbi.h |   33 +++++++++++++++++++++++++++++++++
>  arch/x86/kernel/iosf_mbi.c      |    6 ++++++
>  3 files changed, 41 insertions(+), 5 deletions(-)
> 


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH V5 2/2] x86: IOSF: Change IOSF_MBI Kconfig to default y
  2014-03-01  2:40         ` [PATCH V5 2/2] x86: IOSF: Change IOSF_MBI Kconfig to default y David E. Box
@ 2014-03-03  7:07           ` Li, Aubrey
  2014-03-03 16:25             ` David E. Box
  0 siblings, 1 reply; 30+ messages in thread
From: Li, Aubrey @ 2014-03-03  7:07 UTC (permalink / raw)
  To: David E. Box, tglx, mingo, hpa; +Cc: x86, linux-kernel

On 2014/3/1 10:40, David E. Box wrote:
> From: "David E. Box" <david.e.box@linux.intel.com>
> 
> Make the IOSF Mailbox driver built in as it provides core functionality needed
> for new Intel SOC platforms to access the device registers on the SOC.
> 
> Signed-off-by: David E. Box <david.e.box@linux.intel.com>
> ---
>  arch/x86/Kconfig |    7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index d3b1f8b..e34b252 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -2385,12 +2385,9 @@ config X86_DMA_REMAP
>  	depends on STA2X11
>  
>  config IOSF_MBI
> -	bool
> +	bool "Intel IOSF Mailbox Driver support"

One concern here is, IOSF is not architectural for all of X86, can we
change this as "Intel Atom IOSF Mailbox Driver support"? Or if you can
confirm we'll use IOSF in the future onchip product, can we change this
as "Intel SOC IOSF Mailbox Driver support"?

Better to rename the file name as well.

Thanks,
-Aubrey
> +	default y
>  	depends on PCI
> -	---help---
> -	  To be selected by modules requiring access to the Intel OnChip System
> -	  Fabric (IOSF) Sideband MailBox Interface (MBI). For MBI platforms
> -	  enumerable by PCI.
>  
>  source "net/Kconfig"
>  
> 


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH V5 1/2] x86: IOSF: add dummy functions for loadable modules
  2014-03-01  2:40         ` [PATCH V5 1/2] x86: IOSF: add dummy functions for loadable modules David E. Box
  2014-03-01 20:34           ` [tip:x86/platform] x86, iosf: Add " tip-bot for David E. Box
@ 2014-03-03  7:21           ` Li, Aubrey
  2014-03-03 12:20             ` One Thousand Gnomes
  1 sibling, 1 reply; 30+ messages in thread
From: Li, Aubrey @ 2014-03-03  7:21 UTC (permalink / raw)
  To: David E. Box, tglx, mingo, hpa; +Cc: x86, linux-kernel

On 2014/3/1 10:40, David E. Box wrote:
> From: "David E. Box" <david.e.box@linux.intel.com>
> 
> Some loadable modules only need IOSF access on the platforms where it exists.
> Provide dummy functions to allow these modules to compile and load on the
> platforms where it doesn't exist.

This is not the right way, I think.

We can either default built-in this IOSF component, so that the
interface is always here, Or we can register the interfaces to the
global hooks, so that the consumers are able to check the hook to see if
it's available and make the calls if it is.

In the long turn, this could be a bus driver and framework needed.

Thanks,
-Aubrey
> 
> Signed-off-by: David E. Box <david.e.box@linux.intel.com>
> ---
>  arch/x86/include/asm/iosf_mbi.h |   33 +++++++++++++++++++++++++++++++++
>  arch/x86/kernel/iosf_mbi.c      |    6 ++++++
>  2 files changed, 39 insertions(+)
> 
> diff --git a/arch/x86/include/asm/iosf_mbi.h b/arch/x86/include/asm/iosf_mbi.h
> index 8e71c79..9fc5402 100644
> --- a/arch/x86/include/asm/iosf_mbi.h
> +++ b/arch/x86/include/asm/iosf_mbi.h
> @@ -5,6 +5,8 @@
>  #ifndef IOSF_MBI_SYMS_H
>  #define IOSF_MBI_SYMS_H
>  
> +#ifdef CONFIG_IOSF_MBI
> +
>  #define MBI_MCR_OFFSET		0xD0
>  #define MBI_MDR_OFFSET		0xD4
>  #define MBI_MCRX_OFFSET		0xD8
> @@ -50,6 +52,8 @@
>  #define BT_MBI_PCIE_READ	0x00
>  #define BT_MBI_PCIE_WRITE	0x01
>  
> +bool iosf_mbi_available(void);
> +
>  /**
>   * iosf_mbi_read() - MailBox Interface read command
>   * @port:	port indicating subunit being accessed
> @@ -87,4 +91,33 @@ int iosf_mbi_write(u8 port, u8 opcode, u32 offset, u32 mdr);
>   */
>  int iosf_mbi_modify(u8 port, u8 opcode, u32 offset, u32 mdr, u32 mask);
>  
> +#else /* CONFIG_IOSF_MBI is not enabled */
> +static inline
> +bool iosf_mbi_available(void)
> +{
> +	return false;
> +}
> +
> +static inline
> +int iosf_mbi_read(u8 port, u8 opcode, u32 offset, u32 *mdr)
> +{
> +	WARN();
> +	return -EPERM;
> +}
> +
> +static inline
> +int iosf_mbi_write(u8 port, u8 opcode, u32 offset, u32 mdr)
> +{
> +	WARN();
> +	return -EPERM;
> +}
> +
> +static inline
> +int iosf_mbi_modify(u8 port, u8 opcode, u32 offset, u32 mdr, u32 mask)
> +{
> +	WARN();
> +	return -EPERM;
> +}
> +#endif /* CONFIG_IOSF_MBI */
> +
>  #endif /* IOSF_MBI_SYMS_H */
> diff --git a/arch/x86/kernel/iosf_mbi.c b/arch/x86/kernel/iosf_mbi.c
> index c3aae66..d3803c6 100644
> --- a/arch/x86/kernel/iosf_mbi.c
> +++ b/arch/x86/kernel/iosf_mbi.c
> @@ -177,6 +177,12 @@ int iosf_mbi_modify(u8 port, u8 opcode, u32 offset, u32 mdr, u32 mask)
>  }
>  EXPORT_SYMBOL(iosf_mbi_modify);
>  
> +bool iosf_mbi_available(void)
> +{
> +	return mbi_pdev;
> +}
> +EXPORT_SYMBOL(iosf_mbi_available);
> +
>  static int iosf_mbi_probe(struct pci_dev *pdev,
>  			  const struct pci_device_id *unused)
>  {
> 


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH V5 1/2] x86: IOSF: add dummy functions for loadable modules
  2014-03-03  7:21           ` [PATCH V5 1/2] x86: IOSF: add " Li, Aubrey
@ 2014-03-03 12:20             ` One Thousand Gnomes
  0 siblings, 0 replies; 30+ messages in thread
From: One Thousand Gnomes @ 2014-03-03 12:20 UTC (permalink / raw)
  To: Li, Aubrey; +Cc: David E. Box, tglx, mingo, hpa, x86, linux-kernel

On Mon, 03 Mar 2014 15:21:40 +0800
"Li, Aubrey" <aubrey.li@linux.intel.com> wrote:

> On 2014/3/1 10:40, David E. Box wrote:
> > From: "David E. Box" <david.e.box@linux.intel.com>
> > 
> > Some loadable modules only need IOSF access on the platforms where it exists.
> > Provide dummy functions to allow these modules to compile and load on the
> > platforms where it doesn't exist.
> 
> This is not the right way, I think.

Disagree. There are various drivers that can use the IOSF interface but
do not need it, and need to also build and run on platforms without it.

The current code IMHO is correct. We want to make sure it builds without
IOSF, but that any attempt to use IOSF in such a runtime errors - that's
what this code does.

Alan

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH V5 0/2] x86: IOSF: Add loadable module support
  2014-03-03  7:01           ` Li, Aubrey
@ 2014-03-03 15:58             ` David E. Box
  2014-03-03 22:15               ` Li, Aubrey
  0 siblings, 1 reply; 30+ messages in thread
From: David E. Box @ 2014-03-03 15:58 UTC (permalink / raw)
  To: Li, Aubrey; +Cc: tglx, mingo, hpa, x86, linux-kernel

On Mon, Mar 03, 2014 at 03:01:45PM +0800, Li, Aubrey wrote:
> Hi David,
> 
> I'm probably too late to catch this thread. Just one question, what's
> the relationship between
> 	arch/x86/kernel/iosf_mbi.c
> and
> 	drivers/platform/x86/intel_baytrail.c
> 
iosf_mbi.c is the version that went upstream, no longer specific to baytrail.

david box

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH V5 2/2] x86: IOSF: Change IOSF_MBI Kconfig to default y
  2014-03-03  7:07           ` Li, Aubrey
@ 2014-03-03 16:25             ` David E. Box
  0 siblings, 0 replies; 30+ messages in thread
From: David E. Box @ 2014-03-03 16:25 UTC (permalink / raw)
  To: Li, Aubrey; +Cc: tglx, mingo, hpa, x86, linux-kernel

On Mon, Mar 03, 2014 at 03:07:29PM +0800, Li, Aubrey wrote:
> On 2014/3/1 10:40, David E. Box wrote:
> > From: "David E. Box" <david.e.box@linux.intel.com>
> > 
> > Make the IOSF Mailbox driver built in as it provides core functionality needed
> > for new Intel SOC platforms to access the device registers on the SOC.
> > 
> > Signed-off-by: David E. Box <david.e.box@linux.intel.com>
> > ---
> >  arch/x86/Kconfig |    7 ++-----
> >  1 file changed, 2 insertions(+), 5 deletions(-)
> > 
> > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> > index d3b1f8b..e34b252 100644
> > --- a/arch/x86/Kconfig
> > +++ b/arch/x86/Kconfig
> > @@ -2385,12 +2385,9 @@ config X86_DMA_REMAP
> >  	depends on STA2X11
> >  
> >  config IOSF_MBI
> > -	bool
> > +	bool "Intel IOSF Mailbox Driver support"
> 
> One concern here is, IOSF is not architectural for all of X86, can we
> change this as "Intel Atom IOSF Mailbox Driver support"? Or if you can
> confirm we'll use IOSF in the future onchip product, can we change this
> as "Intel SOC IOSF Mailbox Driver support"?
> 

Ok. The latter would be more appropriate.

david box

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH V5 0/2] x86: IOSF: Add loadable module support
  2014-03-03 15:58             ` David E. Box
@ 2014-03-03 22:15               ` Li, Aubrey
  2014-03-03 23:01                 ` David E. Box
  0 siblings, 1 reply; 30+ messages in thread
From: Li, Aubrey @ 2014-03-03 22:15 UTC (permalink / raw)
  To: David E. Box; +Cc: tglx, mingo, hpa, x86, linux-kernel

On 2014/3/3 23:58, David E. Box wrote:
> On Mon, Mar 03, 2014 at 03:01:45PM +0800, Li, Aubrey wrote:
>> Hi David,
>>
>> I'm probably too late to catch this thread. Just one question, what's
>> the relationship between
>> 	arch/x86/kernel/iosf_mbi.c
>> and
>> 	drivers/platform/x86/intel_baytrail.c
>>
> iosf_mbi.c is the version that went upstream, no longer specific to baytrail.

Then should we remove the latter?

Thanks,
-Aubrey

> 
> david box
> 
> 


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH V5 0/2] x86: IOSF: Add loadable module support
  2014-03-03 22:15               ` Li, Aubrey
@ 2014-03-03 23:01                 ` David E. Box
  0 siblings, 0 replies; 30+ messages in thread
From: David E. Box @ 2014-03-03 23:01 UTC (permalink / raw)
  To: Li, Aubrey; +Cc: tglx, mingo, hpa, x86, linux-kernel

On Tue, Mar 04, 2014 at 06:15:15AM +0800, Li, Aubrey wrote:
> On 2014/3/3 23:58, David E. Box wrote:
> > On Mon, Mar 03, 2014 at 03:01:45PM +0800, Li, Aubrey wrote:
> >> Hi David,
> >>
> >> I'm probably too late to catch this thread. Just one question, what's
> >> the relationship between
> >> 	arch/x86/kernel/iosf_mbi.c
> >> and
> >> 	drivers/platform/x86/intel_baytrail.c
> >>
> > iosf_mbi.c is the version that went upstream, no longer specific to baytrail.
> 
> Then should we remove the latter?
> 

Absolutely. I wasn't aware until now that this version went upstream. I didn't
see a tip for it. I'll send a patch to revert it.

david box

^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2014-03-03 23:04 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-12 23:34 [PATCH] x86: iosf_mbi: Provide dummy functions if CONFIG_IOSF_MBI not set David E. Box
2014-02-23  1:02 ` [PATCH RESEND] " David E. Box
2014-02-24 13:19   ` One Thousand Gnomes
2014-02-24 13:21     ` H. Peter Anvin
2014-02-24 13:29       ` One Thousand Gnomes
2014-02-25  2:47   ` [PATCH V2 0/2] x86: IOSF: Add loadable module support David E. Box
2014-02-26 19:40     ` [PATCH V3 " David E. Box
2014-02-28 17:47       ` [PATCH V4 " David E. Box
2014-02-28 18:01         ` H. Peter Anvin
2014-03-01  2:40         ` [PATCH V5 " David E. Box
2014-03-03  7:01           ` Li, Aubrey
2014-03-03 15:58             ` David E. Box
2014-03-03 22:15               ` Li, Aubrey
2014-03-03 23:01                 ` David E. Box
2014-03-01  2:40         ` [PATCH V5 1/2] x86: IOSF: add dummy functions for loadable modules David E. Box
2014-03-01 20:34           ` [tip:x86/platform] x86, iosf: Add " tip-bot for David E. Box
2014-03-03  7:21           ` [PATCH V5 1/2] x86: IOSF: add " Li, Aubrey
2014-03-03 12:20             ` One Thousand Gnomes
2014-03-01  2:40         ` [PATCH V5 2/2] x86: IOSF: Change IOSF_MBI Kconfig to default y David E. Box
2014-03-03  7:07           ` Li, Aubrey
2014-03-03 16:25             ` David E. Box
2014-02-28 17:47       ` [PATCH V4 1/2] x86: IOSF: add dummy functions for loadable modules David E. Box
2014-02-28 17:47       ` [PATCH V4 2/2] x86: IOSF: Change IOSF_MBI Kconfig to default y David E. Box
2014-02-26 19:40     ` [PATCH V3 1/2] x86: IOSF: add dummy functions for loadable modules David E. Box
2014-02-26 19:40     ` [PATCH V3 2/2] x86: IOSF: Change IOSF_MBI Kconfig to default y David E. Box
2014-02-27  3:26       ` H. Peter Anvin
2014-02-27 16:50       ` [PATCH RESEND " David E. Box
2014-02-25  2:47   ` [PATCH V2 1/2] x86: IOSF: add dummy functions for loadable modules David E. Box
2014-02-25  2:47   ` [PATCH V2 2/2] x86: IOSF: Change IOSF_MBI Kconfig to default y David E. Box
2014-03-01 20:34     ` [tip:x86/platform] x86, iosf: " tip-bot for David E. Box

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).