Skip to contentSkip to conversation

x86/platform/mellanox: introduce support for Mellanox systems platform

PATCH In review [email protected] 4 participants 5 messages Sep 22, 2016 – Sep 30, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v6 1/1 x86/platform/mellanox: introduce support for Mellanox systems platform

From: Vadim Pasternak <[email protected]>

Enable system support for the Mellanox Technologies platform, which provides support for the next Mellanox basic systems: "msx6710", "msx6720", "msb7700", "msn2700", "msx1410", "msn2410", "msb7800", "msn2740", "msn2100" and also various number of derivative systems from the above basic types.

The Kconfig currently controlling compilation of this code is:
arch/x86/platform:config MLX_PLATFORM
arch/x86/platform: tristate "Mellanox Technologies platform support"

---
v1->v2:
Comments pointed out by Greg:
- kick out all PCI related code;
v2->v3
Comments pointed out by Guenter:
- remove not directly related depends and selects for Kconfig;
- use single dimensional array for mlxplat_msn21xx_channels;
- define mlxplat_mux_data and mlxplat_priv as static;
- fix line split;
- remove error messages for memory allocation failure;
- change module alias to dmi;
v3->v4
Comments pointed out by Thomas:
- remove dependencies from Kconfig for DMI and I2C.
v4->v5
Comments pointed out by Greg:
- fix LICENSE;
v5->v6
Comments pointed out by Thomas:
- define mlxplat_lpc_resources, mlxplat_default_channels, mlxplat_msn21xx_channels as const;
- in mlxplat_init put int in one line;
- in mlxplat_init return 0 on success;
- move the module_init/module_exit near procedure location;

---
 MAINTAINERS                               |   6 +
 arch/x86/Kconfig                          |  12 ++
 arch/x86/platform/Makefile                |   1 +
 arch/x86/platform/mellanox/Makefile       |   1 +
 arch/x86/platform/mellanox/mlx-platform.c | 266 ++++++++++++++++++++++++++++++
 5 files changed, 286 insertions(+)
 create mode 100644 arch/x86/platform/mellanox/Makefile
 create mode 100644 arch/x86/platform/mellanox/mlx-platform.c
MAINTAINERS +6 -0
index 4705c94..98ced39 100644
@@ -7664,6 +7664,12 @@ W:	http://www.mellanox.com
 Q:	http://patchwork.ozlabs.org/project/netdev/list/
 F:	drivers/net/ethernet/mellanox/mlxsw/
 
+MELLANOX PLATFORM DRIVER
+M:      Vadim Pasternak <[email protected]>
+L:      [email protected]
+S:      Supported
+F:      arch/x86/platform/mellanox/mlx-platform.c
+
 SOFT-ROCE DRIVER (rxe)
 M:	Moni Shoua <[email protected]>
 L:	[email protected]
arch/x86/Kconfig +12 -0
index c580d8c..a6df619 100644
@@ -550,6 +550,18 @@ config X86_INTEL_QUARK
 	  Say Y here if you have a Quark based system such as the Arduino
 	  compatible Intel Galileo.
 
+config MLX_PLATFORM
+	tristate "Mellanox Technologies platform support"
+	depends on X86_64
+	depends on X86_EXTENDED_PLATFORM
+	---help---
+	  This option enables system support for the Mellanox Technologies
+	  platform.
+
+	  Say Y here if you are building a kernel for Mellanox system.
+
+	  Otherwise, say N.
+
 config X86_INTEL_LPSS
 	bool "Intel Low Power Subsystem Support"
 	depends on X86 && ACPI
arch/x86/platform/Makefile +1 -0
index 184842e..3c3c19e 100644
@@ -8,6 +8,7 @@ obj-y	+= iris/
 obj-y	+= intel/
 obj-y	+= intel-mid/
 obj-y	+= intel-quark/
+obj-y	+= mellanox/
 obj-y	+= olpc/
 obj-y	+= scx200/
 obj-y	+= sfi/
arch/x86/platform/mellanox/Makefile new file +1 -0
new file mode 100644
index 0000000..f43c931
@@ -0,0 +1 @@
+obj-$(CONFIG_MLX_PLATFORM)	+= mlx-platform.o
arch/x86/platform/mellanox/mlx-platform.c new file +266 -0

266 lines not on this page · raw message

Signature · 1 line
2.1.4
#1 lore raw

[tip:x86/platform] x86/platform/mellanox: Introduce support for Mellanox systems platform

x86/platform/mellanox: Introduce support for Mellanox systems platform
Commit-ID:  58cbbee2391ce3876e6eee80a4f2a7f025859c52
Gitweb:     http://git.kernel.org/tip/58cbbee2391ce3876e6eee80a4f2a7f025859c52
Author:     Vadim Pasternak <[email protected]>
AuthorDate: Thu, 22 Sep 2016 21:13:42 +0000
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Thu, 22 Sep 2016 22:13:10 +0200

x86/platform/mellanox: Introduce support for Mellanox systems platform

Enable system support for the Mellanox Technologies platform, which provides support for the next Mellanox basic systems: "msx6710", "msx6720", "msb7700", "msn2700", "msx1410", "msn2410", "msb7800", "msn2740", "msn2100" and also various number of derivative systems from the above basic types.

The Kconfig controlling compilation of this code is: MLX_PLATFORM

---
 MAINTAINERS                               |   6 +
 arch/x86/Kconfig                          |  12 ++
 arch/x86/platform/Makefile                |   1 +
 arch/x86/platform/mellanox/Makefile       |   1 +
 arch/x86/platform/mellanox/mlx-platform.c | 266 ++++++++++++++++++++++++++++++
 5 files changed, 286 insertions(+)
MAINTAINERS +6 -0
index a0ce40f..2adc6ef 100644
@@ -7668,6 +7668,12 @@ W:	http://www.mellanox.com
 Q:	http://patchwork.ozlabs.org/project/netdev/list/
 F:	drivers/net/ethernet/mellanox/mlxsw/
 
+MELLANOX PLATFORM DRIVER
+M:      Vadim Pasternak <[email protected]>
+L:      [email protected]
+S:      Supported
+F:      arch/x86/platform/mellanox/mlx-platform.c
+
 SOFT-ROCE DRIVER (rxe)
 M:	Moni Shoua <[email protected]>
 L:	[email protected]
arch/x86/Kconfig +12 -0
index 2a1f0ce..a72b01b 100644
@@ -549,6 +549,18 @@ config X86_INTEL_QUARK
 	  Say Y here if you have a Quark based system such as the Arduino
 	  compatible Intel Galileo.
 
+config MLX_PLATFORM
+	tristate "Mellanox Technologies platform support"
+	depends on X86_64
+	depends on X86_EXTENDED_PLATFORM
+	---help---
+	  This option enables system support for the Mellanox Technologies
+	  platform.
+
+	  Say Y here if you are building a kernel for Mellanox system.
+
+	  Otherwise, say N.
+
 config X86_INTEL_LPSS
 	bool "Intel Low Power Subsystem Support"
 	depends on X86 && ACPI
arch/x86/platform/Makefile +1 -0
index 184842e..3c3c19e 100644
@@ -8,6 +8,7 @@ obj-y	+= iris/
 obj-y	+= intel/
 obj-y	+= intel-mid/
 obj-y	+= intel-quark/
+obj-y	+= mellanox/
 obj-y	+= olpc/
 obj-y	+= scx200/
 obj-y	+= sfi/
arch/x86/platform/mellanox/Makefile new file +1 -0
new file mode 100644
index 0000000..f43c931
@@ -0,0 +1 @@
+obj-$(CONFIG_MLX_PLATFORM)	+= mlx-platform.o
arch/x86/platform/mellanox/mlx-platform.c new file +266 -0

266 lines not on this page · raw message

#2 lore raw

Re: [tip:x86/platform] x86/platform/mellanox: Introduce support for Mellanox systems platform

Quoted 43 lines · tip-bot for Vadim Pasternak
Commit-ID:  58cbbee2391ce3876e6eee80a4f2a7f025859c52
Gitweb:     http://git.kernel.org/tip/58cbbee2391ce3876e6eee80a4f2a7f025859c52
Author:     Vadim Pasternak <[email protected]>
AuthorDate: Thu, 22 Sep 2016 21:13:42 +0000
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Thu, 22 Sep 2016 22:13:10 +0200

x86/platform/mellanox: Introduce support for Mellanox systems platform

Enable system support for the Mellanox Technologies platform, which provides support for the next Mellanox basic systems: "msx6710", "msx6720", "msb7700", "msn2700", "msx1410", "msn2410", "msb7800", "msn2740", "msn2100" and also various number of derivative systems from the above basic types.

The Kconfig controlling compilation of this code is: MLX_PLATFORM

---
 MAINTAINERS                               |   6 +
 arch/x86/Kconfig                          |  12 ++
 arch/x86/platform/Makefile                |   1 +
 arch/x86/platform/mellanox/Makefile       |   1 +
 arch/x86/platform/mellanox/mlx-platform.c | 266 ++++++++++++++++++++++++++++++
 5 files changed, 286 insertions(+)
MAINTAINERS +0 -0
index a0ce40f..2adc6ef 100644

MAINTAINERS W: http://www.mellanox.com · line 7675

Quoted 8 lines
MAINTAINERS +5 -0
@@ -7668,6 +7668,12 @@ W:	http://www.mellanox.com
 Q:	http://patchwork.ozlabs.org/project/netdev/list/
 F:	drivers/net/ethernet/mellanox/mlxsw/
 
+MELLANOX PLATFORM DRIVER
+M:      Vadim Pasternak <[email protected]>
+L:      [email protected]
+S:      Supported
+F:      arch/x86/platform/mellanox/mlx-platform.c

This through me as I was trying to reconcile this series with another mellanox platform driver from Vadim to the drivers/platform/x86 tree as this one also came to the platform-driver-x86 mailing list.

There are no other entries in MAINTAINERS that use this list without files under drivers/platform/x86.

Thomas, HPA, Ingo, do you also use the platform-driver-x86 mailing list for arch/x86/platform? I had assumed this was only for drivers/platform/x86.

I can definitely understand how contributors might get confused.... I think I may have confused myself actually :-)

My two cents too late, this driver seems like it would better placed in drivers/platform/x86 as it isn't architectural (or SoC specific) in the same way most of the others in arch/x86/platform are, but instead is more akin to the end-product laptop drivers and such in drivers/platform/x86 which build platform data from DMI strings, ACPI HIDs, etc.

If this isn't the right distinction between the two similarly named trees ... how would you like to distinguish them? I'll volunteer to get that documented someplace convenient to make it easier to decide what goes where.

Signature · 2 lines
Darren Hart
Intel Open Source Technology Center
#3 lore raw

Re: [tip:x86/platform] x86/platform/mellanox: Introduce support for Mellanox systems platform

Quoted 9 lines · Darren Hart

This through me as I was trying to reconcile this series with another mellanox platform driver from Vadim to the drivers/platform/x86 tree as this one also came to the platform-driver-x86 mailing list.

There are no other entries in MAINTAINERS that use this list without files under drivers/platform/x86.

Thomas, HPA, Ingo, do you also use the platform-driver-x86 mailing list for arch/x86/platform? I had assumed this was only for drivers/platform/x86.

No. This came in via LKML.

Quoted 8 lines

I can definitely understand how contributors might get confused.... I think I may have confused myself actually :-)

My two cents too late, this driver seems like it would better placed in drivers/platform/x86 as it isn't architectural (or SoC specific) in the same way most of the others in arch/x86/platform are, but instead is more akin to the end-product laptop drivers and such in drivers/platform/x86 which build platform data from DMI strings, ACPI HIDs, etc.

We still can zap it from tip/x86/platform if you want to take it through your tree, but OTOH the merge window is close so it might be better to move it afterwards. Either way works for me.

Quoted 3 lines

If this isn't the right distinction between the two similarly named trees ... how would you like to distinguish them? I'll volunteer to get that documented someplace convenient to make it easier to decide what goes where.

Yes please. Documentation is always a good thing ot have.

Thanks,

tglx

#4 lore raw

Re: [tip:x86/platform] x86/platform/mellanox: Introduce support for Mellanox systems platform

Quoted 5 lines · Thomas Gleixner
Quoted 4 lines · Darren Hart

This through me as I was trying to reconcile this series with another mellanox platform driver from Vadim to the drivers/platform/x86 tree as this one also came to the platform-driver-x86 mailing list.

Quoted 7 lines
Quoted 5 lines

There are no other entries in MAINTAINERS that use this list without files under drivers/platform/x86.

Thomas, HPA, Ingo, do you also use the platform-driver-x86 mailing list for arch/x86/platform? I had assumed this was only for drivers/platform/x86.

No. This came in via LKML.

Right, understood. I was referring to the platform-driver-x86 list being referenced in the MAINTAINERS file. If it lives in arch/platform/x86, it shouldn't list platform-driver-x86 in the MAINTAINER file then. I just wanted to confirm this was the case, sounds like it is, and this was an oversight.

Quoted 10 lines
Quoted 9 lines

I can definitely understand how contributors might get confused.... I think I may have confused myself actually :-)

My two cents too late, this driver seems like it would better placed in drivers/platform/x86 as it isn't architectural (or SoC specific) in the same way most of the others in arch/x86/platform are, but instead is more akin to the end-product laptop drivers and such in drivers/platform/x86 which build platform data from DMI strings, ACPI HIDs, etc.

Quoted 3 lines

We still can zap it from tip/x86/platform if you want to take it through your tree, but OTOH the merge window is close so it might be better to move it afterwards. Either way works for me.

Happy to follow your lead and do it afterward if you agree on the distinction between the two subsystems, that's the issue I really care about resolving :-)

Quoted 7 lines
Quoted 4 lines

If this isn't the right distinction between the two similarly named trees ... how would you like to distinguish them? I'll volunteer to get that documented someplace convenient to make it easier to decide what goes where.

Yes please. Documentation is always a good thing ot have.

OK, so let's nail down the distinction. Here's a first pass strawman:

arch/platform/x86:
Architectural support for x86 CPUs

drivers/platform/x86:
End-product platform support, such as laptops, datacenter
products, etc.
Drivers for companion devices, power control, or ACPI drivers that
are specific to x86 CPUs and end products

I added the second class to cover oddities in drivers/platform/x86 like the following:

intel_menlow
intel_pmc*
intel_pmic*
intel_punit*
intel_scu*
intel_telemetry*

Is this consistent with how you see the two subsystems?

Signature · 2 lines
Darren Hart
Intel Open Source Technology Center