From d87c9be46b520415acc2164cd0b6223483485d05 Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Fri, 1 Oct 2010 14:16:39 -0700 Subject: [PATCH] --- yaml --- r: 211671 b: refs/heads/master c: 9b3056cca09529d34af2d81305b2a9c6b622ca1b h: refs/heads/master i: 211669: 06802becb2951ad023b6363639a0bc39362e1132 211667: 2e211e722bb465e47af38ceb449277b0f4095657 211663: 89505fe94852b6f1ae52829476c37b8617d11e5c v: v3 --- [refs] | 2 +- trunk/drivers/char/tpm/tpm.c | 22 ++++++++++------------ 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/[refs] b/[refs] index ef8346fece4f..8e04f8b83582 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 36f7f28416c97dbb725154930066d115b4447e17 +refs/heads/master: 9b3056cca09529d34af2d81305b2a9c6b622ca1b diff --git a/trunk/drivers/char/tpm/tpm.c b/trunk/drivers/char/tpm/tpm.c index 05ad4a17a28f..7c4133582dba 100644 --- a/trunk/drivers/char/tpm/tpm.c +++ b/trunk/drivers/char/tpm/tpm.c @@ -47,6 +47,16 @@ enum tpm_duration { #define TPM_MAX_PROTECTED_ORDINAL 12 #define TPM_PROTECTED_ORDINAL_MASK 0xFF +/* + * Bug workaround - some TPM's don't flush the most + * recently changed pcr on suspend, so force the flush + * with an extend to the selected _unused_ non-volatile pcr. + */ +static int tpm_suspend_pcr; +module_param_named(suspend_pcr, tpm_suspend_pcr, uint, 0644); +MODULE_PARM_DESC(suspend_pcr, + "PCR to use for dummy writes to faciltate flush on suspend."); + static LIST_HEAD(tpm_chip_list); static DEFINE_SPINLOCK(driver_lock); static DECLARE_BITMAP(dev_mask, TPM_NUM_DEVICES); @@ -1077,18 +1087,6 @@ static struct tpm_input_header savestate_header = { .ordinal = TPM_ORD_SAVESTATE }; -/* Bug workaround - some TPM's don't flush the most - * recently changed pcr on suspend, so force the flush - * with an extend to the selected _unused_ non-volatile pcr. - */ -static int tpm_suspend_pcr; -static int __init tpm_suspend_setup(char *str) -{ - get_option(&str, &tpm_suspend_pcr); - return 1; -} -__setup("tpm_suspend_pcr=", tpm_suspend_setup); - /* * We are about to suspend. Save the TPM state * so that it can be restored.