[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <54231E52.2030501@linux.vnet.ibm.com>
Date: Wed, 24 Sep 2014 15:41:06 -0400
From: Stefan Berger <stefanb@...ux.vnet.ibm.com>
To: Scot Doyle <lkml14@...tdoyle.com>
CC: Peter Huewe <peterhuewe@....de>, Ashley Lai <ashley@...leylai.com>,
Marcel Selhorst <tpmdd@...horst.net>,
Jason Gunthorpe <jgunthorpe@...idianresearch.com>,
Luigi Semenzato <semenzato@...gle.com>,
Michael Mullin <masmullin@...il.com>,
linux-kernel@...r.kernel.org, tpmdd-devel@...ts.sourceforge.net
Subject: Re: [PATCH v9] tpm_tis: verify interrupt during init
On 09/24/2014 03:38 PM, Scot Doyle wrote:
> On Tue, 23 Sep 2014, Stefan Berger wrote:
>> On 09/23/2014 07:55 AM, Scot Doyle wrote:
>>> On Tue, 23 Sep 2014, Scot Doyle wrote:
>>> +static void disable_interrupts(struct tpm_chip *chip)
>>> +{
>>> + u32 intmask;
>>> + intmask =
>>> + ioread32(chip->vendor.iobase +
>>> + TPM_INT_ENABLE(chip->vendor.locality));
>>> + intmask |= TPM_INTF_CMD_READY_INT | TPM_INTF_LOCALITY_CHANGE_INT |
>>> + TPM_INTF_DATA_AVAIL_INT | TPM_INTF_STS_VALID_INT;
>> You want to disable interrupts but you set all the flags? Maybe you meant:
>>
>> intmask &= ~(FOO|BAR)
>>
>> ?
> Thanks, would this work? I think it's how tpm_tis_init masks during a probe.
>
> static void disable_interrupts(struct tpm_chip *chip)
> {
> u32 intmask;
> intmask =
> ioread32(chip->vendor.iobase +
> TPM_INT_ENABLE(chip->vendor.locality));
> intmask &= ~TPM_GLOBAL_INT_ENABLE;
> iowrite32(intmask,
> chip->vendor.iobase +
> TPM_INT_ENABLE(chip->vendor.locality));
> free_irq(chip->vendor.irq, chip);
> chip->vendor.irq = 0;
> }
>
Yes, this should be sufficient.
Stefan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists