All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/5] Update and move Dell drivers dell_rbu and dcdbas
@ 2018-09-26 21:50 Stuart Hayes
  2018-09-26 21:50 ` [PATCH v2 1/5] firmware: dell_rbu: Make payload memory uncachable Stuart Hayes
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Stuart Hayes @ 2018-09-26 21:50 UTC (permalink / raw)
  To: dvhart, Andy Shevchenko
  Cc: Mario Limonciello, LKML, platform-driver-x86, Doug Warzecha,
	Stuart Hayes

The dell_rbu and dcdbas drivers need some changes, and should be moved to
drivers/platform/x86.  Additionally, dell_rbu needs a maintainer, and the
listed maintainer for dcdbas is inactive and needs to be changed.

v2 changes:
 - add commit messages to patches that move dcdbas and dell_rbu
 - remove extra whitespace in MAINTAINERS
 - add acked-by from (previous) maintainer of dcdbas

Stuart Hayes (5):
  firmware: dell_rbu: Make payload memory uncachable
  firmware: dcdbas: Add support for WSMT ACPI table
  firmware: dell_rbu: Move dell_rbu to drivers/platform/x86
  firmware: dcdbas: Move dcdbas to drivers/platform/x86
  MAINTAINERS: Update maintainer for dcdbas and dell_rbu

 MAINTAINERS                                   |  11 +-
 drivers/firmware/Kconfig                      |  28 ----
 drivers/firmware/Makefile                     |   2 -
 drivers/platform/x86/Kconfig                  |  28 ++++
 drivers/platform/x86/Makefile                 |   2 +
 drivers/{firmware => platform/x86}/dcdbas.c   | 123 +++++++++++++++++-
 drivers/{firmware => platform/x86}/dcdbas.h   |  10 ++
 drivers/platform/x86/dell-smbios-smm.c        |   2 +-
 drivers/{firmware => platform/x86}/dell_rbu.c |   8 ++
 9 files changed, 175 insertions(+), 39 deletions(-)
 rename drivers/{firmware => platform/x86}/dcdbas.c (82%)
 rename drivers/{firmware => platform/x86}/dcdbas.h (93%)
 rename drivers/{firmware => platform/x86}/dell_rbu.c (98%)

-- 
2.19.0.221.g150f307af


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

* [PATCH v2 1/5] firmware: dell_rbu: Make payload memory uncachable
  2018-09-26 21:50 [PATCH v2 0/5] Update and move Dell drivers dell_rbu and dcdbas Stuart Hayes
@ 2018-09-26 21:50 ` Stuart Hayes
  2018-09-26 21:50 ` [PATCH v2 2/5] firmware: dcdbas: Add support for WSMT ACPI table Stuart Hayes
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Stuart Hayes @ 2018-09-26 21:50 UTC (permalink / raw)
  To: dvhart, Andy Shevchenko
  Cc: Mario Limonciello, LKML, platform-driver-x86, Doug Warzecha,
	Stuart Hayes

The dell_rbu driver takes firmware update payloads and puts them in memory so
the system BIOS can find them after a reboot.  This sometimes fails (though
rarely), because the memory containing the payload is in the CPU cache but
never gets written back to main memory before the system is rebooted (CPU
cache contents are lost on reboot).

With this patch, the payload memory will be changed to uncachable to ensure
that the payload is actually in main memory before the system is rebooted.

Signed-off-by: Stuart Hayes <stuart.w.hayes@gmail.com>
---
This patch has been discussed previously, see history at
https://patchwork.kernel.org/patch/10512079/

 drivers/firmware/dell_rbu.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/firmware/dell_rbu.c b/drivers/firmware/dell_rbu.c
index fb8af5cb7c9b..ccefa84f7305 100644
--- a/drivers/firmware/dell_rbu.c
+++ b/drivers/firmware/dell_rbu.c
@@ -45,6 +45,7 @@
 #include <linux/moduleparam.h>
 #include <linux/firmware.h>
 #include <linux/dma-mapping.h>
+#include <asm/set_memory.h>
 
 MODULE_AUTHOR("Abhay Salunke <abhay_salunke@dell.com>");
 MODULE_DESCRIPTION("Driver for updating BIOS image on DELL systems");
@@ -181,6 +182,11 @@ static int create_packet(void *data, size_t length)
 			packet_data_temp_buf = NULL;
 		}
 	}
+	/*
+	 * set to uncachable or it may never get written back before reboot
+	 */
+	set_memory_uc((unsigned long)packet_data_temp_buf, 1 << ordernum);
+
 	spin_lock(&rbu_data.lock);
 
 	newpacket->data = packet_data_temp_buf;
@@ -349,6 +355,8 @@ static void packet_empty_list(void)
 		 * to make sure there are no stale RBU packets left in memory
 		 */
 		memset(newpacket->data, 0, rbu_data.packetsize);
+		set_memory_wb((unsigned long)newpacket->data,
+			1 << newpacket->ordernum);
 		free_pages((unsigned long) newpacket->data,
 			newpacket->ordernum);
 		kfree(newpacket);
-- 
2.19.0


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

* [PATCH v2 2/5] firmware: dcdbas: Add support for WSMT ACPI table
  2018-09-26 21:50 [PATCH v2 0/5] Update and move Dell drivers dell_rbu and dcdbas Stuart Hayes
  2018-09-26 21:50 ` [PATCH v2 1/5] firmware: dell_rbu: Make payload memory uncachable Stuart Hayes
@ 2018-09-26 21:50 ` Stuart Hayes
  2018-09-26 21:50 ` [PATCH v2 3/5] firmware: dell_rbu: Move dell_rbu to drivers/platform/x86 Stuart Hayes
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Stuart Hayes @ 2018-09-26 21:50 UTC (permalink / raw)
  To: dvhart, Andy Shevchenko
  Cc: Mario Limonciello, LKML, platform-driver-x86, Doug Warzecha,
	Stuart Hayes

If the WSMT ACPI table is present and indicates that a fixed communication
buffer should be used, use the firmware-specified buffer instead of
allocating a buffer in memory for communications between the dcdbas driver
and firmare.

Signed-off-by: Stuart Hayes <stuart.w.hayes@gmail.com>
---
This patch has been discussed previously, see history at
https://lore.kernel.org/patchwork/patch/958893/

 drivers/firmware/dcdbas.c | 123 ++++++++++++++++++++++++++++++++++++--
 drivers/firmware/dcdbas.h |  10 ++++
 2 files changed, 127 insertions(+), 6 deletions(-)

diff --git a/drivers/firmware/dcdbas.c b/drivers/firmware/dcdbas.c
index 0bdea60c65dd..ae28e48ff7dc 100644
--- a/drivers/firmware/dcdbas.c
+++ b/drivers/firmware/dcdbas.c
@@ -21,6 +21,7 @@
  */
 
 #include <linux/platform_device.h>
+#include <linux/acpi.h>
 #include <linux/dma-mapping.h>
 #include <linux/errno.h>
 #include <linux/cpu.h>
@@ -41,7 +42,7 @@
 #include "dcdbas.h"
 
 #define DRIVER_NAME		"dcdbas"
-#define DRIVER_VERSION		"5.6.0-3.2"
+#define DRIVER_VERSION		"5.6.0-3.3"
 #define DRIVER_DESCRIPTION	"Dell Systems Management Base Driver"
 
 static struct platform_device *dcdbas_pdev;
@@ -49,19 +50,23 @@ static struct platform_device *dcdbas_pdev;
 static u8 *smi_data_buf;
 static dma_addr_t smi_data_buf_handle;
 static unsigned long smi_data_buf_size;
+static unsigned long max_smi_data_buf_size = MAX_SMI_DATA_BUF_SIZE;
 static u32 smi_data_buf_phys_addr;
 static DEFINE_MUTEX(smi_data_lock);
+static u8 *eps_buffer;
 
 static unsigned int host_control_action;
 static unsigned int host_control_smi_type;
 static unsigned int host_control_on_shutdown;
 
+static bool wsmt_enabled;
+
 /**
  * smi_data_buf_free: free SMI data buffer
  */
 static void smi_data_buf_free(void)
 {
-	if (!smi_data_buf)
+	if (!smi_data_buf || wsmt_enabled)
 		return;
 
 	dev_dbg(&dcdbas_pdev->dev, "%s: phys: %x size: %lu\n",
@@ -86,7 +91,7 @@ static int smi_data_buf_realloc(unsigned long size)
 	if (smi_data_buf_size >= size)
 		return 0;
 
-	if (size > MAX_SMI_DATA_BUF_SIZE)
+	if (size > max_smi_data_buf_size)
 		return -EINVAL;
 
 	/* new buffer is needed */
@@ -169,7 +174,7 @@ static ssize_t smi_data_write(struct file *filp, struct kobject *kobj,
 {
 	ssize_t ret;
 
-	if ((pos + count) > MAX_SMI_DATA_BUF_SIZE)
+	if ((pos + count) > max_smi_data_buf_size)
 		return -EINVAL;
 
 	mutex_lock(&smi_data_lock);
@@ -322,8 +327,20 @@ static ssize_t smi_request_store(struct device *dev,
 			ret = count;
 		break;
 	case 1:
-		/* Calling Interface SMI */
-		smi_cmd->ebx = (u32) virt_to_phys(smi_cmd->command_buffer);
+		/*
+		 * Calling Interface SMI
+		 *
+		 * Provide physical address of command buffer field within
+		 * the struct smi_cmd to BIOS.
+		 *
+		 * Because the address that smi_cmd (smi_data_buf) points to
+		 * will be from memremap() of a non-memory address if WSMT
+		 * is present, we can't use virt_to_phys() on smi_cmd, so
+		 * we have to use the physical address that was saved when
+		 * the virtual address for smi_cmd was received.
+		 */
+		smi_cmd->ebx = smi_data_buf_phys_addr +
+				offsetof(struct smi_cmd, command_buffer);
 		ret = dcdbas_smi_request(smi_cmd);
 		if (!ret)
 			ret = count;
@@ -482,6 +499,93 @@ static void dcdbas_host_control(void)
 	}
 }
 
+/* WSMT */
+
+static u8 checksum(u8 *buffer, u8 length)
+{
+	u8 sum = 0;
+	u8 *end = buffer + length;
+
+	while (buffer < end)
+		sum += *buffer++;
+	return sum;
+}
+
+static inline struct smm_eps_table *check_eps_table(u8 *addr)
+{
+	struct smm_eps_table *eps = (struct smm_eps_table *)addr;
+
+	if (strncmp(eps->smm_comm_buff_anchor, SMM_EPS_SIG, 4) != 0)
+		return NULL;
+
+	if (checksum(addr, eps->length) != 0)
+		return NULL;
+
+	return eps;
+}
+
+static int dcdbas_check_wsmt(void)
+{
+	struct acpi_table_wsmt *wsmt = NULL;
+	struct smm_eps_table *eps = NULL;
+	u64 remap_size;
+	u8 *addr;
+
+	acpi_get_table(ACPI_SIG_WSMT, 0, (struct acpi_table_header **)&wsmt);
+	if (!wsmt)
+		return 0;
+
+	/* Check if WSMT ACPI table shows that protection is enabled */
+	if (!(wsmt->protection_flags & ACPI_WSMT_FIXED_COMM_BUFFERS) ||
+	    !(wsmt->protection_flags & ACPI_WSMT_COMM_BUFFER_NESTED_PTR_PROTECTION))
+		return 0;
+
+	/* Scan for EPS (entry point structure) */
+	for (addr = (u8 *)__va(0xf0000);
+	     addr < (u8 *)__va(0x100000 - sizeof(struct smm_eps_table));
+	     addr += 16) {
+		eps = check_eps_table(addr);
+		if (eps)
+			break;
+	}
+
+	if (!eps) {
+		dev_dbg(&dcdbas_pdev->dev, "found WSMT, but no EPS found\n");
+		return -ENODEV;
+	}
+
+	/*
+	 * Get physical address of buffer and map to virtual address.
+	 * Table gives size in 4K pages, regardless of actual system page size.
+	 */
+	if (upper_32_bits(eps->smm_comm_buff_addr + 8)) {
+		dev_warn(&dcdbas_pdev->dev, "found WSMT, but EPS buffer address is above 4GB\n");
+		return -EINVAL;
+	}
+	/*
+	 * Limit remap size to MAX_SMI_DATA_BUF_SIZE + 8 (since the first 8
+	 * bytes are used for a semaphore, not the data buffer itself).
+	 */
+	remap_size = eps->num_of_4k_pages * PAGE_SIZE;
+	if (remap_size > MAX_SMI_DATA_BUF_SIZE + 8)
+		remap_size = MAX_SMI_DATA_BUF_SIZE + 8;
+	eps_buffer = memremap(eps->smm_comm_buff_addr, remap_size, MEMREMAP_WB);
+	if (!eps_buffer) {
+		dev_warn(&dcdbas_pdev->dev, "found WSMT, but failed to map EPS buffer\n");
+		return -ENOMEM;
+	}
+
+	/* First 8 bytes is for a semaphore, not part of the smi_data_buf */
+	smi_data_buf_phys_addr = eps->smm_comm_buff_addr + 8;
+	smi_data_buf = eps_buffer + 8;
+	smi_data_buf_size = remap_size - 8;
+	max_smi_data_buf_size = smi_data_buf_size;
+	wsmt_enabled = true;
+	dev_info(&dcdbas_pdev->dev,
+		 "WSMT found, using firmware-provided SMI buffer.\n");
+	return 1;
+}
+
 /**
  * dcdbas_reboot_notify: handle reboot notification for host control
  */
@@ -548,6 +652,11 @@ static int dcdbas_probe(struct platform_device *dev)
 
 	dcdbas_pdev = dev;
 
+	/* Check if ACPI WSMT table specifies protected SMI buffer address */
+	error = dcdbas_check_wsmt();
+	if (error < 0)
+		return error;
+
 	/*
 	 * BIOS SMI calls require buffer addresses be in 32-bit address space.
 	 * This is done by setting the DMA mask below.
@@ -635,6 +744,8 @@ static void __exit dcdbas_exit(void)
 	 */
 	if (dcdbas_pdev)
 		smi_data_buf_free();
+	if (eps_buffer)
+		memunmap(eps_buffer);
 	platform_device_unregister(dcdbas_pdev_reg);
 	platform_driver_unregister(&dcdbas_driver);
 }
diff --git a/drivers/firmware/dcdbas.h b/drivers/firmware/dcdbas.h
index ca3cb0a54ab6..52729a494b00 100644
--- a/drivers/firmware/dcdbas.h
+++ b/drivers/firmware/dcdbas.h
@@ -53,6 +53,7 @@
 #define EXPIRED_TIMER				(0)
 
 #define SMI_CMD_MAGIC				(0x534D4931)
+#define SMM_EPS_SIG				"$SCB"
 
 #define DCDBAS_DEV_ATTR_RW(_name) \
 	DEVICE_ATTR(_name,0600,_name##_show,_name##_store);
@@ -103,5 +104,14 @@ struct apm_cmd {
 
 int dcdbas_smi_request(struct smi_cmd *smi_cmd);
 
+struct smm_eps_table {
+	char smm_comm_buff_anchor[4];
+	u8 length;
+	u8 checksum;
+	u8 version;
+	u64 smm_comm_buff_addr;
+	u64 num_of_4k_pages;
+} __packed;
+
 #endif /* _DCDBAS_H_ */
 
-- 
2.19.0


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

* [PATCH v2 3/5] firmware: dell_rbu: Move dell_rbu to drivers/platform/x86
  2018-09-26 21:50 [PATCH v2 0/5] Update and move Dell drivers dell_rbu and dcdbas Stuart Hayes
  2018-09-26 21:50 ` [PATCH v2 1/5] firmware: dell_rbu: Make payload memory uncachable Stuart Hayes
  2018-09-26 21:50 ` [PATCH v2 2/5] firmware: dcdbas: Add support for WSMT ACPI table Stuart Hayes
@ 2018-09-26 21:50 ` Stuart Hayes
  2018-09-26 21:50 ` [PATCH v2 4/5] firmware: dcdbas: Move dcdbas " Stuart Hayes
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Stuart Hayes @ 2018-09-26 21:50 UTC (permalink / raw)
  To: dvhart, Andy Shevchenko
  Cc: Mario Limonciello, LKML, platform-driver-x86, Doug Warzecha,
	Stuart Hayes

Move dell_rbu to the more appropriate directory drivers/platform/x86.

Signed-off-by: Stuart Hayes <stuart.w.hayes@gmail.com>
---
v2 changes:
 - add commit message

 drivers/firmware/Kconfig                      | 12 ------------
 drivers/firmware/Makefile                     |  1 -
 drivers/platform/x86/Kconfig                  | 12 ++++++++++++
 drivers/platform/x86/Makefile                 |  1 +
 drivers/{firmware => platform/x86}/dell_rbu.c |  0
 5 files changed, 13 insertions(+), 13 deletions(-)
 rename drivers/{firmware => platform/x86}/dell_rbu.c (100%)

diff --git a/drivers/firmware/Kconfig b/drivers/firmware/Kconfig
index 6e83880046d7..02f39d20efce 100644
--- a/drivers/firmware/Kconfig
+++ b/drivers/firmware/Kconfig
@@ -145,18 +145,6 @@ config EFI_PCDP
 	  See DIG64_HCDPv20_042804.pdf available from
 	  <http://www.dig64.org/specifications/> 
 
-config DELL_RBU
-	tristate "BIOS update support for DELL systems via sysfs"
-	depends on X86
-	select FW_LOADER
-	select FW_LOADER_USER_HELPER
-	help
-	 Say m if you want to have the option of updating the BIOS for your
-	 DELL system. Note you need a Dell OpenManage or Dell Update package (DUP)
-	 supporting application to communicate with the BIOS regarding the new
-	 image for the image update to take effect.
-	 See <file:Documentation/dell_rbu.txt> for more details on the driver.
-
 config DCDBAS
 	tristate "Dell Systems Management Base Driver"
 	depends on X86
diff --git a/drivers/firmware/Makefile b/drivers/firmware/Makefile
index e18a041cfc53..61887ba9df1d 100644
--- a/drivers/firmware/Makefile
+++ b/drivers/firmware/Makefile
@@ -11,7 +11,6 @@ obj-$(CONFIG_DMI)		+= dmi_scan.o
 obj-$(CONFIG_DMI_SYSFS)		+= dmi-sysfs.o
 obj-$(CONFIG_EDD)		+= edd.o
 obj-$(CONFIG_EFI_PCDP)		+= pcdp.o
-obj-$(CONFIG_DELL_RBU)          += dell_rbu.o
 obj-$(CONFIG_DCDBAS)		+= dcdbas.o
 obj-$(CONFIG_DMIID)		+= dmi-id.o
 obj-$(CONFIG_ISCSI_IBFT_FIND)	+= iscsi_ibft_find.o
diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index 0c1aa6c314f5..cb037da32107 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -227,6 +227,18 @@ config DELL_RBTN
 	  To compile this driver as a module, choose M here: the module will
 	  be called dell-rbtn.
 
+config DELL_RBU
+	tristate "BIOS update support for DELL systems via sysfs"
+	depends on X86
+	select FW_LOADER
+	select FW_LOADER_USER_HELPER
+	help
+	 Say m if you want to have the option of updating the BIOS for your
+	 DELL system. Note you need a Dell OpenManage or Dell Update package (DUP)
+	 supporting application to communicate with the BIOS regarding the new
+	 image for the image update to take effect.
+	 See <file:Documentation/dell_rbu.txt> for more details on the driver.
+
 
 config FUJITSU_LAPTOP
 	tristate "Fujitsu Laptop Extras"
diff --git a/drivers/platform/x86/Makefile b/drivers/platform/x86/Makefile
index e6d1becf81ce..8843f8e22127 100644
--- a/drivers/platform/x86/Makefile
+++ b/drivers/platform/x86/Makefile
@@ -23,6 +23,7 @@ obj-$(CONFIG_DELL_WMI_AIO)	+= dell-wmi-aio.o
 obj-$(CONFIG_DELL_WMI_LED)	+= dell-wmi-led.o
 obj-$(CONFIG_DELL_SMO8800)	+= dell-smo8800.o
 obj-$(CONFIG_DELL_RBTN)		+= dell-rbtn.o
+obj-$(CONFIG_DELL_RBU)          += dell_rbu.o
 obj-$(CONFIG_ACER_WMI)		+= acer-wmi.o
 obj-$(CONFIG_ACER_WIRELESS)	+= acer-wireless.o
 obj-$(CONFIG_ACERHDF)		+= acerhdf.o
diff --git a/drivers/firmware/dell_rbu.c b/drivers/platform/x86/dell_rbu.c
similarity index 100%
rename from drivers/firmware/dell_rbu.c
rename to drivers/platform/x86/dell_rbu.c
-- 
2.19.0


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

* [PATCH v2 4/5] firmware: dcdbas: Move dcdbas to drivers/platform/x86
  2018-09-26 21:50 [PATCH v2 0/5] Update and move Dell drivers dell_rbu and dcdbas Stuart Hayes
                   ` (2 preceding siblings ...)
  2018-09-26 21:50 ` [PATCH v2 3/5] firmware: dell_rbu: Move dell_rbu to drivers/platform/x86 Stuart Hayes
@ 2018-09-26 21:50 ` Stuart Hayes
  2018-09-26 21:50 ` [PATCH v2 5/5] MAINTAINERS: Update maintainer for dcdbas and dell_rbu Stuart Hayes
  2018-09-27  9:01 ` [PATCH v2 0/5] Update and move Dell drivers dell_rbu and dcdbas Andy Shevchenko
  5 siblings, 0 replies; 7+ messages in thread
From: Stuart Hayes @ 2018-09-26 21:50 UTC (permalink / raw)
  To: dvhart, Andy Shevchenko
  Cc: Mario Limonciello, LKML, platform-driver-x86, Doug Warzecha,
	Stuart Hayes

Move dcdbas to the more appropriate directory drivers/platform/x86.

Signed-off-by: Stuart Hayes <stuart.w.hayes@gmail.com>
---
v2 changes:
 - add commit message

 drivers/firmware/Kconfig                    | 16 ----------------
 drivers/firmware/Makefile                   |  1 -
 drivers/platform/x86/Kconfig                | 16 ++++++++++++++++
 drivers/platform/x86/Makefile               |  1 +
 drivers/{firmware => platform/x86}/dcdbas.c |  0
 drivers/{firmware => platform/x86}/dcdbas.h |  0
 drivers/platform/x86/dell-smbios-smm.c      |  2 +-
 7 files changed, 18 insertions(+), 18 deletions(-)
 rename drivers/{firmware => platform/x86}/dcdbas.c (100%)
 rename drivers/{firmware => platform/x86}/dcdbas.h (100%)

diff --git a/drivers/firmware/Kconfig b/drivers/firmware/Kconfig
index 02f39d20efce..6d0c28fd3bad 100644
--- a/drivers/firmware/Kconfig
+++ b/drivers/firmware/Kconfig
@@ -145,22 +145,6 @@ config EFI_PCDP
 	  See DIG64_HCDPv20_042804.pdf available from
 	  <http://www.dig64.org/specifications/> 
 
-config DCDBAS
-	tristate "Dell Systems Management Base Driver"
-	depends on X86
-	help
-	  The Dell Systems Management Base Driver provides a sysfs interface
-	  for systems management software to perform System Management
-	  Interrupts (SMIs) and Host Control Actions (system power cycle or
-	  power off after OS shutdown) on certain Dell systems.
-
-	  See <file:Documentation/dcdbas.txt> for more details on the driver
-	  and the Dell systems on which Dell systems management software makes
-	  use of this driver.
-
-	  Say Y or M here to enable the driver for use by Dell systems
-	  management software such as Dell OpenManage.
-
 config DMIID
     bool "Export DMI identification via sysfs to userspace"
     depends on DMI
diff --git a/drivers/firmware/Makefile b/drivers/firmware/Makefile
index 61887ba9df1d..edda4206d8fc 100644
--- a/drivers/firmware/Makefile
+++ b/drivers/firmware/Makefile
@@ -11,7 +11,6 @@ obj-$(CONFIG_DMI)		+= dmi_scan.o
 obj-$(CONFIG_DMI_SYSFS)		+= dmi-sysfs.o
 obj-$(CONFIG_EDD)		+= edd.o
 obj-$(CONFIG_EFI_PCDP)		+= pcdp.o
-obj-$(CONFIG_DCDBAS)		+= dcdbas.o
 obj-$(CONFIG_DMIID)		+= dmi-id.o
 obj-$(CONFIG_ISCSI_IBFT_FIND)	+= iscsi_ibft_find.o
 obj-$(CONFIG_ISCSI_IBFT)	+= iscsi_ibft.o
diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index cb037da32107..1c7e553c28ce 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -105,6 +105,22 @@ config ASUS_LAPTOP
 
 	  If you have an ACPI-compatible ASUS laptop, say Y or M here.
 
+config DCDBAS
+	tristate "Dell Systems Management Base Driver"
+	depends on X86
+	help
+	  The Dell Systems Management Base Driver provides a sysfs interface
+	  for systems management software to perform System Management
+	  Interrupts (SMIs) and Host Control Actions (system power cycle or
+	  power off after OS shutdown) on certain Dell systems.
+
+	  See <file:Documentation/dcdbas.txt> for more details on the driver
+	  and the Dell systems on which Dell systems management software makes
+	  use of this driver.
+
+	  Say Y or M here to enable the driver for use by Dell systems
+	  management software such as Dell OpenManage.
+
 #
 # The DELL_SMBIOS driver depends on ACPI_WMI and/or DCDBAS if those
 # backends are selected. The "depends" line prevents a configuration
diff --git a/drivers/platform/x86/Makefile b/drivers/platform/x86/Makefile
index 8843f8e22127..4e2712c9c0b0 100644
--- a/drivers/platform/x86/Makefile
+++ b/drivers/platform/x86/Makefile
@@ -12,6 +12,7 @@ obj-$(CONFIG_EEEPC_WMI)		+= eeepc-wmi.o
 obj-$(CONFIG_MSI_LAPTOP)	+= msi-laptop.o
 obj-$(CONFIG_ACPI_CMPC)		+= classmate-laptop.o
 obj-$(CONFIG_COMPAL_LAPTOP)	+= compal-laptop.o
+obj-$(CONFIG_DCDBAS)		+= dcdbas.o
 obj-$(CONFIG_DELL_SMBIOS)	+= dell-smbios.o
 dell-smbios-objs		:= dell-smbios-base.o
 dell-smbios-$(CONFIG_DELL_SMBIOS_WMI)	+= dell-smbios-wmi.o
diff --git a/drivers/firmware/dcdbas.c b/drivers/platform/x86/dcdbas.c
similarity index 100%
rename from drivers/firmware/dcdbas.c
rename to drivers/platform/x86/dcdbas.c
diff --git a/drivers/firmware/dcdbas.h b/drivers/platform/x86/dcdbas.h
similarity index 100%
rename from drivers/firmware/dcdbas.h
rename to drivers/platform/x86/dcdbas.h
diff --git a/drivers/platform/x86/dell-smbios-smm.c b/drivers/platform/x86/dell-smbios-smm.c
index 97a90bebc360..ab9b822a6dfe 100644
--- a/drivers/platform/x86/dell-smbios-smm.c
+++ b/drivers/platform/x86/dell-smbios-smm.c
@@ -18,7 +18,7 @@
 #include <linux/module.h>
 #include <linux/mutex.h>
 #include <linux/platform_device.h>
-#include "../../firmware/dcdbas.h"
+#include "dcdbas.h"
 #include "dell-smbios.h"
 
 static int da_command_address;
-- 
2.19.0


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

* [PATCH v2 5/5] MAINTAINERS: Update maintainer for dcdbas and dell_rbu
  2018-09-26 21:50 [PATCH v2 0/5] Update and move Dell drivers dell_rbu and dcdbas Stuart Hayes
                   ` (3 preceding siblings ...)
  2018-09-26 21:50 ` [PATCH v2 4/5] firmware: dcdbas: Move dcdbas " Stuart Hayes
@ 2018-09-26 21:50 ` Stuart Hayes
  2018-09-27  9:01 ` [PATCH v2 0/5] Update and move Dell drivers dell_rbu and dcdbas Andy Shevchenko
  5 siblings, 0 replies; 7+ messages in thread
From: Stuart Hayes @ 2018-09-26 21:50 UTC (permalink / raw)
  To: dvhart, Andy Shevchenko
  Cc: Mario Limonciello, LKML, platform-driver-x86, Doug Warzecha,
	Stuart Hayes

Assign maintainer for dell_rbu driver, and reassign maintainer of dcdbas
from inactive maintainer (current maintainer is aware of this change--
see https://www.spinics.net/lists/platform-driver-x86/msg16336.html).

Signed-off-by: Stuart Hayes <stuart.w.hayes@gmail.com>
Acked-by: Doug Warzecha <Douglas_Warzecha@dell.com>
---
v2 changes:
 - remove extra whitespace
 - add acked-by from (previous) maintainer of dcdbas

 MAINTAINERS | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 4ece30f15777..efb162a422a3 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4188,6 +4188,12 @@ M:	Pali Rohár <pali.rohar@gmail.com>
 S:	Maintained
 F:	drivers/platform/x86/dell-rbtn.*
 
+DELL REMOTE BIOS UPDATE DRIVER
+M:	Stuart Hayes <stuart.w.hayes@gmail.com>
+L:	platform-driver-x86@vger.kernel.org
+S:	Maintained
+F:	drivers/platform/x86/dell_rbu.c
+
 DELL LAPTOP SMM DRIVER
 M:	Pali Rohár <pali.rohar@gmail.com>
 S:	Maintained
@@ -4195,10 +4201,11 @@ F:	drivers/hwmon/dell-smm-hwmon.c
 F:	include/uapi/linux/i8k.h
 
 DELL SYSTEMS MANAGEMENT BASE DRIVER (dcdbas)
-M:	Doug Warzecha <Douglas_Warzecha@dell.com>
+M:	Stuart Hayes <stuart.w.hayes@gmail.com>
+L:	platform-driver-x86@vger.kernel.org
 S:	Maintained
 F:	Documentation/dcdbas.txt
-F:	drivers/firmware/dcdbas.*
+F:	drivers/platform/x86/dcdbas.*
 
 DELL WMI NOTIFICATIONS DRIVER
 M:	Matthew Garrett <mjg59@srcf.ucam.org>
-- 
2.19.0


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

* Re: [PATCH v2 0/5] Update and move Dell drivers dell_rbu and dcdbas
  2018-09-26 21:50 [PATCH v2 0/5] Update and move Dell drivers dell_rbu and dcdbas Stuart Hayes
                   ` (4 preceding siblings ...)
  2018-09-26 21:50 ` [PATCH v2 5/5] MAINTAINERS: Update maintainer for dcdbas and dell_rbu Stuart Hayes
@ 2018-09-27  9:01 ` Andy Shevchenko
  5 siblings, 0 replies; 7+ messages in thread
From: Andy Shevchenko @ 2018-09-27  9:01 UTC (permalink / raw)
  To: Stuart Hayes
  Cc: Darren Hart, Mario Limonciello, Linux Kernel Mailing List,
	Platform Driver, Doug Warzecha

On Thu, Sep 27, 2018 at 12:50 AM Stuart Hayes <stuart.w.hayes@gmail.com> wrote:
>
> The dell_rbu and dcdbas drivers need some changes, and should be moved to
> drivers/platform/x86.  Additionally, dell_rbu needs a maintainer, and the
> listed maintainer for dcdbas is inactive and needs to be changed.
>

Pushed to my review and testing queue, thanks!

> v2 changes:
>  - add commit messages to patches that move dcdbas and dell_rbu
>  - remove extra whitespace in MAINTAINERS
>  - add acked-by from (previous) maintainer of dcdbas
>
> Stuart Hayes (5):
>   firmware: dell_rbu: Make payload memory uncachable
>   firmware: dcdbas: Add support for WSMT ACPI table
>   firmware: dell_rbu: Move dell_rbu to drivers/platform/x86
>   firmware: dcdbas: Move dcdbas to drivers/platform/x86
>   MAINTAINERS: Update maintainer for dcdbas and dell_rbu
>
>  MAINTAINERS                                   |  11 +-
>  drivers/firmware/Kconfig                      |  28 ----
>  drivers/firmware/Makefile                     |   2 -
>  drivers/platform/x86/Kconfig                  |  28 ++++
>  drivers/platform/x86/Makefile                 |   2 +
>  drivers/{firmware => platform/x86}/dcdbas.c   | 123 +++++++++++++++++-
>  drivers/{firmware => platform/x86}/dcdbas.h   |  10 ++
>  drivers/platform/x86/dell-smbios-smm.c        |   2 +-
>  drivers/{firmware => platform/x86}/dell_rbu.c |   8 ++
>  9 files changed, 175 insertions(+), 39 deletions(-)
>  rename drivers/{firmware => platform/x86}/dcdbas.c (82%)
>  rename drivers/{firmware => platform/x86}/dcdbas.h (93%)
>  rename drivers/{firmware => platform/x86}/dell_rbu.c (98%)
>
> --
> 2.19.0.221.g150f307af
>


-- 
With Best Regards,
Andy Shevchenko

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

end of thread, other threads:[~2018-09-27  9:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-26 21:50 [PATCH v2 0/5] Update and move Dell drivers dell_rbu and dcdbas Stuart Hayes
2018-09-26 21:50 ` [PATCH v2 1/5] firmware: dell_rbu: Make payload memory uncachable Stuart Hayes
2018-09-26 21:50 ` [PATCH v2 2/5] firmware: dcdbas: Add support for WSMT ACPI table Stuart Hayes
2018-09-26 21:50 ` [PATCH v2 3/5] firmware: dell_rbu: Move dell_rbu to drivers/platform/x86 Stuart Hayes
2018-09-26 21:50 ` [PATCH v2 4/5] firmware: dcdbas: Move dcdbas " Stuart Hayes
2018-09-26 21:50 ` [PATCH v2 5/5] MAINTAINERS: Update maintainer for dcdbas and dell_rbu Stuart Hayes
2018-09-27  9:01 ` [PATCH v2 0/5] Update and move Dell drivers dell_rbu and dcdbas Andy Shevchenko

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.