* About devm_ioremap_resource() @ 2016-02-03 22:55 Jarkko Sakkinen [not found] ` <20160203225519.GA8647-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Jarkko Sakkinen @ 2016-02-03 22:55 UTC (permalink / raw) To: jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/ Cc: linux-security-module-u79uwXL29TY76Z2rM5mHXA, tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f Hi I have couple of concerns with tpm_crb changes made for 4.5: * I used devm_ioremap_nocache() to disable WB. This does not matter when one has ACPI start as it goes through SMM and caches are flushed. It might be a problem with a CRB start only TPM device. How does devm_ioremap_resource address this? * I'm a bit puzzled with that function. Why there exists ioremaps that do not add stuff to a resource tree and those that do? Maybe you have a deeper understanding in this area could enlighten me since you did the commit. Thanks! /Jarkko ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140 ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <20160203225519.GA8647-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>]
* Re: About devm_ioremap_resource() [not found] ` <20160203225519.GA8647-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> @ 2016-02-04 0:31 ` Jason Gunthorpe [not found] ` <20160204003108.GA26123-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Jason Gunthorpe @ 2016-02-04 0:31 UTC (permalink / raw) To: Jarkko Sakkinen Cc: linux-security-module-u79uwXL29TY76Z2rM5mHXA, tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f On Wed, Feb 03, 2016 at 02:55:19PM -0800, Jarkko Sakkinen wrote: > Hi > > I have couple of concerns with tpm_crb changes made for 4.5: > > * I used devm_ioremap_nocache() to disable WB. This does not > matter when one has ACPI start as it goes through SMM and caches are > flushed. It might be a problem with a CRB start only TPM device. How does > devm_ioremap_resource address this? ioremap_nocache and ioremap() are the same thing, the former is just more descriptive. devm_ioremap_resource calls ioremap which does ioremap_nocache. Resources are assumed to be memory mapped registers, and are always handled appropriately. > * I'm a bit puzzled with that function. Why there exists ioremaps that > do not add stuff to a resource tree and those that do? Maybe you have > a deeper understanding in this area could enlighten me since you did > the commit. The resource tree and mapping are different things, not all drivers can use the resource tree all the time, but certainly the majority of drivers should be using it, hence the devm helper to do both. When you see a ioremap without resource handling in a driver it is probably a mistake, and if it isn't, IMHO there should be a comment discussing why this driver cannot lock the resource region. Jason ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140 ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <20160204003108.GA26123-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>]
* Re: About devm_ioremap_resource() [not found] ` <20160204003108.GA26123-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> @ 2016-02-04 1:16 ` Jarkko Sakkinen 0 siblings, 0 replies; 3+ messages in thread From: Jarkko Sakkinen @ 2016-02-04 1:16 UTC (permalink / raw) To: Jason Gunthorpe Cc: linux-security-module-u79uwXL29TY76Z2rM5mHXA, tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f On Wed, Feb 03, 2016 at 05:31:08PM -0700, Jason Gunthorpe wrote: > On Wed, Feb 03, 2016 at 02:55:19PM -0800, Jarkko Sakkinen wrote: > > Hi > > > > I have couple of concerns with tpm_crb changes made for 4.5: > > > > * I used devm_ioremap_nocache() to disable WB. This does not > > matter when one has ACPI start as it goes through SMM and caches are > > flushed. It might be a problem with a CRB start only TPM device. How does > > devm_ioremap_resource address this? > > ioremap_nocache and ioremap() are the same thing, the former is just > more descriptive. > > devm_ioremap_resource calls ioremap which does ioremap_nocache. > > Resources are assumed to be memory mapped registers, and are always > handled appropriately. > > > * I'm a bit puzzled with that function. Why there exists ioremaps that > > do not add stuff to a resource tree and those that do? Maybe you have > > a deeper understanding in this area could enlighten me since you did > > the commit. > > The resource tree and mapping are different things, not all drivers > can use the resource tree all the time, but certainly the majority of > drivers should be using it, hence the devm helper to do both. > > When you see a ioremap without resource handling in a driver it is > probably a mistake, and if it isn't, IMHO there should be a comment > discussing why this driver cannot lock the resource region. Thank you for clearing these out! I have nothing to add here. The reason for two interfaces was what I expected... > Jason /Jarkko ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140 ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-02-04 1:16 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2016-02-03 22:55 About devm_ioremap_resource() Jarkko Sakkinen [not found] ` <20160203225519.GA8647-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> 2016-02-04 0:31 ` Jason Gunthorpe [not found] ` <20160204003108.GA26123-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> 2016-02-04 1:16 ` Jarkko Sakkinen
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.