linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Hon Ching(Vicky) Lo" <honclo@linux.vnet.ibm.com>
To: tpmdd-devel@lists.sourceforge.net
Cc: Peter Huewe <PeterHuewe@gmx.de>,
	Ashley Lai <ashley@ashleylai.com>,
	Mimi Zohar <zohar@linux.vnet.ibm.com>,
	Vicky Lo <honclo2014@gmail.com>,
	linux-kernel@vger.kernel.org,
	"Hon Ching(Vicky) Lo" <honclo@linux.vnet.ibm.com>
Subject: [PATCH v2 1/3] vTPM: fix searching for the right vTPM node in device tree
Date: Wed,  7 Oct 2015 20:11:52 -0400	[thread overview]
Message-ID: <1444263114-15081-2-git-send-email-honclo@linux.vnet.ibm.com> (raw)
In-Reply-To: <1444263114-15081-1-git-send-email-honclo@linux.vnet.ibm.com>

Replace all occurrences of '/ibm,vtpm' with '/vdevice/vtpm',
as only the latter is ganranteed to be available for the client OS.
The '/ibm,vtpm' node should only be used by Open Firmware, which
is susceptible to changes.

Signed-off-by: Hon Ching(Vicky) Lo <honclo@linux.vnet.ibm.com>
---
 arch/powerpc/kernel/prom_init.c |    8 ++++----
 drivers/char/tpm/tpm_of.c       |    2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index 1a85d8f..b9b6bb1 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -1422,12 +1422,12 @@ static void __init prom_instantiate_sml(void)
 
 	prom_debug("prom_instantiate_sml: start...\n");
 
-	ibmvtpm_node = call_prom("finddevice", 1, 1, ADDR("/ibm,vtpm"));
+	ibmvtpm_node = call_prom("finddevice", 1, 1, ADDR("/vdevice/vtpm"));
 	prom_debug("ibmvtpm_node: %x\n", ibmvtpm_node);
 	if (!PHANDLE_VALID(ibmvtpm_node))
 		return;
 
-	ibmvtpm_inst = call_prom("open", 1, 1, ADDR("/ibm,vtpm"));
+	ibmvtpm_inst = call_prom("open", 1, 1, ADDR("/vdevice/vtpm"));
 	if (!IHANDLE_VALID(ibmvtpm_inst)) {
 		prom_printf("opening vtpm package failed (%x)\n", ibmvtpm_inst);
 		return;
@@ -1456,9 +1456,9 @@ static void __init prom_instantiate_sml(void)
 
 	reserve_mem(base, size);
 
-	prom_setprop(ibmvtpm_node, "/ibm,vtpm", "linux,sml-base",
+	prom_setprop(ibmvtpm_node, "/vdevice/vtpm", "linux,sml-base",
 		     &base, sizeof(base));
-	prom_setprop(ibmvtpm_node, "/ibm,vtpm", "linux,sml-size",
+	prom_setprop(ibmvtpm_node, "/vdevice/vtpm", "linux,sml-size",
 		     &size, sizeof(size));
 
 	prom_debug("sml base     = 0x%x\n", base);
diff --git a/drivers/char/tpm/tpm_of.c b/drivers/char/tpm/tpm_of.c
index 62a22ce..6c73199 100644
--- a/drivers/char/tpm/tpm_of.c
+++ b/drivers/char/tpm/tpm_of.c
@@ -31,7 +31,7 @@ int read_log(struct tpm_bios_log *log)
 		return -EFAULT;
 	}
 
-	np = of_find_node_by_name(NULL, "ibm,vtpm");
+	np = of_find_node_by_name(NULL, "vtpm");
 	if (!np) {
 		pr_err("%s: ERROR - IBMVTPM not supported\n", __func__);
 		return -ENODEV;
-- 
1.7.1


  reply	other threads:[~2015-10-08  0:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-08  0:11 [PATCH] vTPM: fix memory allocation flag for rtce buffer at kernel boot Hon Ching(Vicky) Lo
2015-10-08  0:11 ` Hon Ching(Vicky) Lo [this message]
2015-10-08  0:11 ` [PATCH v2 2/3] vTPM: reformat event log to be byte-aligned Hon Ching(Vicky) Lo
2015-10-13 18:43   ` Ashley Lai
2015-10-13 21:27     ` Hon Ching(Vicky) Lo
2015-10-14 21:15       ` Ashley Lai
2015-10-14 21:20         ` Ashley Lai
2015-10-08  0:11 ` [PATCH v2 3/3] vTPM: get the buffer allocated for event log instead of the actual log Hon Ching(Vicky) Lo
  -- strict thread matches above, loose matches on Subject: below --
2015-10-08  0:10 [PATCH] vTPM: fix memory allocation flag for rtce buffer at kernel boot Hon Ching(Vicky) Lo
2015-10-08  0:10 ` [PATCH v2 1/3] vTPM: fix searching for the right vTPM node in device tree Hon Ching(Vicky) Lo

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=1444263114-15081-2-git-send-email-honclo@linux.vnet.ibm.com \
    --to=honclo@linux.vnet.ibm.com \
    --cc=PeterHuewe@gmx.de \
    --cc=ashley@ashleylai.com \
    --cc=honclo2014@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tpmdd-devel@lists.sourceforge.net \
    --cc=zohar@linux.vnet.ibm.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;
as well as URLs for NNTP newsgroup(s).