+ tpm-add-interrupt-module-parameter.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     tpm: add interrupt module parameter

has been added to the -mm tree.  Its filename is

     tpm-add-interrupt-module-parameter.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this


From: Kylene Jo Hall <kjhall@xxxxxxxxxx>

This patch adds a boolean module parameter that allows the user to turn
interrupt support on and off.  The default behavior is to attempt to use
interrupts.

Signed-off-by: Kylene Hall <kjhall@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/char/tpm/tpm_tis.c |   78 +++++++++++++++++++----------------
 1 files changed, 43 insertions(+), 35 deletions(-)

diff -puN drivers/char/tpm/tpm_tis.c~tpm-add-interrupt-module-parameter drivers/char/tpm/tpm_tis.c
--- devel/drivers/char/tpm/tpm_tis.c~tpm-add-interrupt-module-parameter	2006-04-18 23:48:26.000000000 -0700
+++ devel-akpm/drivers/char/tpm/tpm_tis.c	2006-04-18 23:48:26.000000000 -0700
@@ -16,6 +16,9 @@
  * published by the Free Software Foundation, version 2 of the
  * License.
  */
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/moduleparam.h>
 #include <linux/pnp.h>
 #include <linux/interrupt.h>
 #include <linux/wait.h>
@@ -424,6 +427,10 @@ static irqreturn_t tis_int_handler(int i
 	return IRQ_HANDLED;
 }
 
+static int interrupts = 1;
+module_param(interrupts, bool, 0444);
+MODULE_PARM_DESC(interrupts, "Enable interrupts");
+
 static int __devinit tpm_tis_pnp_init(struct pnp_dev *pnp_dev,
 				      const struct pnp_device_id *pnp_id)
 {
@@ -510,44 +517,44 @@ static int __devinit tpm_tis_pnp_init(st
 	iowrite32(intmask,
 		  chip->vendor.iobase +
 		  TPM_INT_ENABLE(chip->vendor.locality));
+	if (interrupts) {
+		chip->vendor.irq =
+		    ioread8(chip->vendor.iobase +
+			    TPM_INT_VECTOR(chip->vendor.locality));
+
+		for (i = 3; i < 16 && chip->vendor.irq == 0; i++) {
+			iowrite8(i, chip->vendor.iobase +
+				    TPM_INT_VECTOR(chip->vendor.locality));
+			if (request_irq
+			    (i, tis_int_probe, SA_SHIRQ,
+			     chip->vendor.miscdev.name, chip) != 0) {
+				dev_info(chip->dev,
+					 "Unable to request irq: %d for probe\n",
+					 i);
+				continue;
+			}
 
-	chip->vendor.irq =
-	    ioread8(chip->vendor.iobase +
-		    TPM_INT_VECTOR(chip->vendor.locality));
-
-	for (i = 3; i < 16 && chip->vendor.irq == 0; i++) {
-		iowrite8(i,
-			 chip->vendor.iobase +
-			 TPM_INT_VECTOR(chip->vendor.locality));
-		if (request_irq
-		    (i, tis_int_probe, SA_SHIRQ,
-		     chip->vendor.miscdev.name, chip) != 0) {
-			dev_info(chip->dev,
-				 "Unable to request irq: %d for probe\n",
-				 i);
-			continue;
-		}
-
-		/* Clear all existing */
-		iowrite32(ioread32
-			  (chip->vendor.iobase +
-			   TPM_INT_STATUS(chip->vendor.locality)),
-			  chip->vendor.iobase +
-			  TPM_INT_STATUS(chip->vendor.locality));
+			/* Clear all existing */
+			iowrite32(ioread32
+				  (chip->vendor.iobase +
+				   TPM_INT_STATUS(chip->vendor.locality)),
+				  chip->vendor.iobase +
+				  TPM_INT_STATUS(chip->vendor.locality));
 
-		/* Turn on */
-		iowrite32(intmask | TPM_GLOBAL_INT_ENABLE,
-			  chip->vendor.iobase +
-			  TPM_INT_ENABLE(chip->vendor.locality));
+			/* Turn on */
+			iowrite32(intmask | TPM_GLOBAL_INT_ENABLE,
+				  chip->vendor.iobase +
+				  TPM_INT_ENABLE(chip->vendor.locality));
 
-		/* Generate Interrupts */
-		tpm_gen_interrupt(chip);
+			/* Generate Interrupts */
+			tpm_gen_interrupt(chip);
 
-		/* Turn off */
-		iowrite32(intmask,
-			  chip->vendor.iobase +
-			  TPM_INT_ENABLE(chip->vendor.locality));
-		free_irq(i, chip);
+			/* Turn off */
+			iowrite32(intmask,
+				  chip->vendor.iobase +
+				  TPM_INT_ENABLE(chip->vendor.locality));
+			free_irq(i, chip);
+		}
 	}
 	if (chip->vendor.irq) {
 		iowrite8(chip->vendor.irq,
@@ -557,7 +564,8 @@ static int __devinit tpm_tis_pnp_init(st
 		    (chip->vendor.irq, tis_int_handler, SA_SHIRQ,
 		     chip->vendor.miscdev.name, chip) != 0) {
 			dev_info(chip->dev,
-				 "Unable to request irq: %d for use\n", i);
+				 "Unable to request irq: %d for use\n",
+				 chip->vendor.irq);
 			chip->vendor.irq = 0;
 		} else {
 			/* Clear all existing */
_

Patches currently in -mm which might be from kjhall@xxxxxxxxxx are

tpm-spacing-cleanups.patch
tpm-reorganize-sysfs-files.patch
tpm-chip-struct-update.patch
tpm-return-chip-from-tpm_register_hardware.patch
tpm-command-duration-update.patch
tpm-new-12-sysfs-files.patch
tpm-new-12-sysfs-files-fix.patch
tpm-new-12-sysfs-files-fix-fix.patch
tpm-tpm-new-12-sysfs-files-fix-fix-fix.patch
tpm-driver-for-next-generation-tpm-chips.patch
tpm-driver-for-next-generation-tpm-chips-fix.patch
tpm-driver-for-next-generation-tpm-chips-fix-fix.patch
tpm-msecs_to_jiffies-cleanups.patch
tpm-use-clear_bit.patch
tpm-use-clear_bit-fix.patch
tpm-use-clear_bit-fix-fix.patch
tpm-use-clear_bit-fix-fix-fix.patch
tpm-use-clear_bit-fix-fix-fix-fix.patch
tpm-tpm_infineon-updated-to-latest-interface-changes.patch
tpm-check-mem-start-and-len.patch
tpm-update-bios-log-code-for-12.patch
tpm_infineon-section-fixup.patch
tpm-spacing-cleanups-2.patch
tpm-add-interrupt-module-parameter.patch
tpm-add-hid-module-paramater.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux