mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Timur Tabi <timur@freescale.com>
To: <linuxppc-dev@linux.freescale.net>,
	Kumar Gala <galak@kernel.crashing.org>,
	Scott Wood <scottwood@freescale.com>,
	Anatolij Gustschin <agust@denx.de>, <geert@linux-m68k.org>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	<linux-kernel@vger.kernel.org>
Subject: [PATCH 1/2] [for 3.4] drivers/virt: the Freescale hypervisor driver doesn't need to check MSR[GS]
Date: Thu, 17 May 2012 14:10:27 -0500	[thread overview]
Message-ID: <1337281828-31120-1-git-send-email-timur@freescale.com> (raw)

The MSR[GS] bit indicates whether the kernel is running in processor guest
state mode, but such a check is unnecessary.  The driver already checks
for the /hypervisor node and the fsl,hv-version property, so it already
knows that it's running under the Freescale hypervisor.

There is nothing in the driver that inherently requires guest state,
anyway.

This fixes a break that can occur in some randconfig builds.

Signed-off-by: Timur Tabi <timur@freescale.com>
---
 drivers/virt/fsl_hypervisor.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/drivers/virt/fsl_hypervisor.c b/drivers/virt/fsl_hypervisor.c
index 4939e0c..d294f67 100644
--- a/drivers/virt/fsl_hypervisor.c
+++ b/drivers/virt/fsl_hypervisor.c
@@ -796,9 +796,6 @@ static int has_fsl_hypervisor(void)
 	struct device_node *node;
 	int ret;
 
-	if (!(mfmsr() & MSR_GS))
-		return 0;
-
 	node = of_find_node_by_path("/hypervisor");
 	if (!node)
 		return 0;
-- 
1.7.3.4



             reply	other threads:[~2012-05-17 19:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-17 19:10 Timur Tabi [this message]
2012-05-17 19:10 ` [PATCH 2/2] [for 3.4] powerpc/512x: don't compile any platform DIU code if the DIU is not enabled Timur Tabi
2012-10-15 15:03 ` [PATCH 1/2] [for 3.4] drivers/virt: the Freescale hypervisor driver doesn't need to check MSR[GS] Tabi Timur-B04825
2012-11-25 13:07 ` Kumar Gala

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=1337281828-31120-1-git-send-email-timur@freescale.com \
    --to=timur@freescale.com \
    --cc=agust@denx.de \
    --cc=benh@kernel.crashing.org \
    --cc=galak@kernel.crashing.org \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@linux.freescale.net \
    --cc=scottwood@freescale.com \
    /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®