* [PATCH] dcdbas: don't limit SMIs to cpu 0
@ 2016-01-13 11:51 Juergen Gross
0 siblings, 0 replies; only message in thread
From: Juergen Gross @ 2016-01-13 11:51 UTC (permalink / raw)
To: Douglas_Warzecha, Srinivas_G_Gowda, linux-kernel; +Cc: Juergen Gross
SMIs in the Dell dcdbas firmware driver don't need to be raised on
cpu 0. So remove the binding of the current thread to cpu 0 before
doing the SMI.
Signed-off-by: Juergen Gross <jgross@suse.com>
---
drivers/firmware/dcdbas.c | 21 +--------------------
1 file changed, 1 insertion(+), 20 deletions(-)
diff --git a/drivers/firmware/dcdbas.c b/drivers/firmware/dcdbas.c
index 829eec8..3cde963 100644
--- a/drivers/firmware/dcdbas.c
+++ b/drivers/firmware/dcdbas.c
@@ -245,28 +245,12 @@ static ssize_t host_control_on_shutdown_store(struct device *dev,
*/
int dcdbas_smi_request(struct smi_cmd *smi_cmd)
{
- cpumask_var_t old_mask;
- int ret = 0;
-
if (smi_cmd->magic != SMI_CMD_MAGIC) {
dev_info(&dcdbas_pdev->dev, "%s: invalid magic value\n",
__func__);
return -EBADR;
}
- /* SMI requires CPU 0 */
- if (!alloc_cpumask_var(&old_mask, GFP_KERNEL))
- return -ENOMEM;
-
- cpumask_copy(old_mask, ¤t->cpus_allowed);
- set_cpus_allowed_ptr(current, cpumask_of(0));
- if (smp_processor_id() != 0) {
- dev_dbg(&dcdbas_pdev->dev, "%s: failed to get CPU 0\n",
- __func__);
- ret = -EBUSY;
- goto out;
- }
-
/* generate SMI */
/* inb to force posted write through and make SMI happen now */
asm volatile (
@@ -280,10 +264,7 @@ int dcdbas_smi_request(struct smi_cmd *smi_cmd)
: "memory"
);
-out:
- set_cpus_allowed_ptr(current, old_mask);
- free_cpumask_var(old_mask);
- return ret;
+ return 0;
}
/**
--
2.6.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-01-13 11:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-13 11:51 [PATCH] dcdbas: don't limit SMIs to cpu 0 Juergen Gross
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.