Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1670959

[PATCH v2 7/7] acpi, nfit: override mask

From Jerry Hoemann <jerry.hoemann@hpe.com>
Newsgroups linux.kernel
Subject [PATCH v2 7/7] acpi, nfit: override mask
Date 2017-06-20 19:00 +0200
Message-ID <tUuFt-2G9-33@gated-at.bofh.it> (permalink)
References <tUuFr-2G9-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Add module parameter override_dsm_mask_root for overriding
the dsm_mask like we do for non-root dsm calls.

Signed-off-by: Jerry Hoemann <jerry.hoemann@hpe.com>
---
 drivers/acpi/nfit/core.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c
index f133b3e..456fcc2 100644
--- a/drivers/acpi/nfit/core.c
+++ b/drivers/acpi/nfit/core.c
@@ -1624,6 +1624,7 @@ static void acpi_nfit_init_dsms(struct acpi_nfit_desc *acpi_desc)
 	struct nvdimm_bus_descriptor *nd_desc = &acpi_desc->nd_desc;
 	const u8 *uuid = to_nfit_uuid(NFIT_DEV_BUS);
 	struct acpi_device *adev;
+	unsigned long dsm_mask;
 	int i;
 
 	nd_desc->cmd_mask = acpi_desc->bus_cmd_force_en;
@@ -1635,7 +1636,11 @@ static void acpi_nfit_init_dsms(struct acpi_nfit_desc *acpi_desc)
 		if (acpi_check_dsm(adev->handle, uuid, 1, 1ULL << i))
 			set_bit(i, &nd_desc->cmd_mask);
 	set_bit(ND_CMD_CALL, &nd_desc->cmd_mask);
-	for (i = 0; i < ND_CMD_CALL; i++)
+
+	dsm_mask = 0x3bf;
+	if (override_dsm_mask)
+		dsm_mask = override_dsm_mask;
+	for_each_set_bit(i, &dsm_mask, BITS_PER_LONG)
 		if (acpi_check_dsm(adev->handle, uuid, 1, 1ULL << i))
 			set_bit(i, &nd_desc->bus_dsm_mask);
 }
-- 
1.8.5.6

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 0/7] Enable DSM pass thru for root functions Jerry Hoemann <jerry.hoemann@hpe.com> - 2017-06-20 19:00 +0200
  [PATCH v2 1/7] libnvdimm: passthru functions clear to send Jerry Hoemann <jerry.hoemann@hpe.com> - 2017-06-20 19:00 +0200
  [PATCH v2 3/7] libnvdimm: Add bus level dsm mask. Jerry Hoemann <jerry.hoemann@hpe.com> - 2017-06-20 19:00 +0200
  [PATCH v2 7/7] acpi, nfit: override mask Jerry Hoemann <jerry.hoemann@hpe.com> - 2017-06-20 19:00 +0200
  [PATCH v2 4/7] acpi, nfit: Use bus_dsm_mask for passthru Jerry Hoemann <jerry.hoemann@hpe.com> - 2017-06-20 19:00 +0200
    Re: [PATCH v2 4/7] acpi, nfit: Use bus_dsm_mask for passthru Dan Williams <dan.j.williams@intel.com> - 2017-06-28 23:10 +0200
  [PATCH v2 6/7] libnvdimm: New ACPI 6.2 DSM functions Jerry Hoemann <jerry.hoemann@hpe.com> - 2017-06-20 19:00 +0200
    Re: [PATCH v2 6/7] libnvdimm: New ACPI 6.2 DSM functions Dan Williams <dan.j.williams@intel.com> - 2017-06-28 23:20 +0200
  Re: [PATCH v2 0/7] Enable DSM pass thru for root functions Jerry Hoemann <jerry.hoemann@hpe.com> - 2017-06-26 19:40 +0200

csiph-web