Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1670960
| From | Jerry Hoemann <jerry.hoemann@hpe.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 4/7] acpi, nfit: Use bus_dsm_mask for passthru |
| Date | 2017-06-20 19:00 +0200 |
| Message-ID | <tUuFt-2G9-39@gated-at.bofh.it> (permalink) |
| References | <tUuFr-2G9-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Populate bus_dsm_mask and use it to filter dsm calls that user can make through the pass thru interface. Signed-off-by: Jerry Hoemann <jerry.hoemann@hpe.com> --- drivers/acpi/nfit/core.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c index b46fca2..9d281a4 100644 --- a/drivers/acpi/nfit/core.c +++ b/drivers/acpi/nfit/core.c @@ -253,6 +253,7 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm, cmd_name = nvdimm_bus_cmd_name(cmd); cmd_mask = nd_desc->cmd_mask; dsm_mask = cmd_mask; + if (cmd == ND_CMD_CALL) dsm_mask = nd_desc->bus_dsm_mask; desc = nd_cmd_bus_desc(cmd); uuid = to_nfit_uuid(NFIT_DEV_BUS); handle = adev->handle; @@ -1624,6 +1625,9 @@ 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++) + if (acpi_check_dsm(adev->handle, uuid, 1, 1ULL << i)) + set_bit(i, &nd_desc->bus_dsm_mask); } static ssize_t range_index_show(struct device *dev, -- 1.8.5.6
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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