From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Gunthorpe Subject: Re: [tpmdd-devel] [PATCH 13/16] tpm/tpm_i2c_stm_st33: Add tpm_lock mutex for safe irq management Date: Tue, 7 Oct 2014 15:56:30 -0600 Message-ID: <20141007215630.GB2366@obsidianresearch.com> References: <1412712189-1234-1-git-send-email-christophe-h.ricard@st.com> <1412712189-1234-14-git-send-email-christophe-h.ricard@st.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1412712189-1234-14-git-send-email-christophe-h.ricard-qxv4g6HH51o@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Christophe Ricard Cc: peterhuewe-Mmb7MZpHnFY@public.gmane.org, ashley-fm2HMyfA2y6tG0bUXCXiUA@public.gmane.org, tpmdd-yWjUBOtONefk1uMJSBkQmQ@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, christophe-h.ricard-qxv4g6HH51o@public.gmane.org, jean-luc.blanc-qxv4g6HH51o@public.gmane.org List-Id: devicetree@vger.kernel.org On Tue, Oct 07, 2014 at 10:03:06PM +0200, Christophe Ricard wrote: > Adding tpm_lock mutex in order to guarantee that a i2c_read_data or a > i2c_write_data will not get interrupted by a threaded interrupt. Can you elaborate on this? Any call from the TPM core itself through 'ops' is locked already, and I don't see this driver's IRQ handler doing I2C ops.. What scenario is this protecting against? Jason -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html