From: Juergen Gross <jgross@suse.com>
To: Douglas_Warzecha@dell.com, Srinivas_G_Gowda@dell.com,
linux-kernel@vger.kernel.org
Cc: Juergen Gross <jgross@suse.com>
Subject: [PATCH] dcdbas: don't limit SMIs to cpu 0
Date: Wed, 13 Jan 2016 12:51:00 +0100 [thread overview]
Message-ID: <1452685860-17569-1-git-send-email-jgross@suse.com> (raw)
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
reply other threads:[~2016-01-13 11:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1452685860-17569-1-git-send-email-jgross@suse.com \
--to=jgross@suse.com \
--cc=Douglas_Warzecha@dell.com \
--cc=Srinivas_G_Gowda@dell.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®