Re: [PATCH v4 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device()

2020-10-09 Thread Nicolin Chen
On Fri, Oct 09, 2020 at 02:25:56PM +0200, Thierry Reding wrote: > On Thu, Oct 08, 2020 at 02:12:10PM -0700, Nicolin Chen wrote: > > On Thu, Oct 08, 2020 at 11:53:43AM +0200, Thierry Reding wrote: > > > On Mon, Oct 05, 2020 at 06:05:46PM -0700, Nicolin Chen wrote: > > > > On Mon, Oct 05, 2020 at

Re: [PATCH v4 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device()

2020-10-09 Thread Thierry Reding
On Thu, Oct 08, 2020 at 02:12:10PM -0700, Nicolin Chen wrote: > On Thu, Oct 08, 2020 at 11:53:43AM +0200, Thierry Reding wrote: > > On Mon, Oct 05, 2020 at 06:05:46PM -0700, Nicolin Chen wrote: > > > On Mon, Oct 05, 2020 at 11:57:54AM +0200, Thierry Reding wrote: > > > > On Fri, Oct 02, 2020 at

Re: [PATCH v4 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device()

2020-10-08 Thread Nicolin Chen
On Thu, Oct 08, 2020 at 11:53:43AM +0200, Thierry Reding wrote: > On Mon, Oct 05, 2020 at 06:05:46PM -0700, Nicolin Chen wrote: > > On Mon, Oct 05, 2020 at 11:57:54AM +0200, Thierry Reding wrote: > > > On Fri, Oct 02, 2020 at 11:58:29AM -0700, Nicolin Chen wrote: > > > > On Fri, Oct 02, 2020 at

Re: [PATCH v4 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device()

2020-10-08 Thread Thierry Reding
On Mon, Oct 05, 2020 at 06:05:46PM -0700, Nicolin Chen wrote: > On Mon, Oct 05, 2020 at 11:57:54AM +0200, Thierry Reding wrote: > > On Fri, Oct 02, 2020 at 11:58:29AM -0700, Nicolin Chen wrote: > > > On Fri, Oct 02, 2020 at 06:02:18PM +0300, Dmitry Osipenko wrote: > > > > 02.10.2020 09:08, Nicolin

Re: [PATCH v4 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device()

2020-10-05 Thread Nicolin Chen
On Mon, Oct 05, 2020 at 11:57:54AM +0200, Thierry Reding wrote: > On Fri, Oct 02, 2020 at 11:58:29AM -0700, Nicolin Chen wrote: > > On Fri, Oct 02, 2020 at 06:02:18PM +0300, Dmitry Osipenko wrote: > > > 02.10.2020 09:08, Nicolin Chen пишет: > > > > static int tegra_smmu_of_xlate(struct device

Re: [PATCH v4 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device()

2020-10-05 Thread Thierry Reding
On Mon, Oct 05, 2020 at 04:28:53PM +0300, Dmitry Osipenko wrote: > 05.10.2020 14:15, Thierry Reding пишет: > > On Mon, Oct 05, 2020 at 01:36:55PM +0300, Dmitry Osipenko wrote: > >> 05.10.2020 12:53, Thierry Reding пишет: > >>> On Fri, Oct 02, 2020 at 05:50:08PM +0300, Dmitry Osipenko wrote: >

Re: [PATCH v4 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device()

2020-10-05 Thread Dmitry Osipenko
05.10.2020 14:15, Thierry Reding пишет: > On Mon, Oct 05, 2020 at 01:36:55PM +0300, Dmitry Osipenko wrote: >> 05.10.2020 12:53, Thierry Reding пишет: >>> On Fri, Oct 02, 2020 at 05:50:08PM +0300, Dmitry Osipenko wrote: 02.10.2020 17:22, Dmitry Osipenko пишет: >> static int

Re: [PATCH v4 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device()

2020-10-05 Thread Thierry Reding
On Mon, Oct 05, 2020 at 01:36:55PM +0300, Dmitry Osipenko wrote: > 05.10.2020 12:53, Thierry Reding пишет: > > On Fri, Oct 02, 2020 at 05:50:08PM +0300, Dmitry Osipenko wrote: > >> 02.10.2020 17:22, Dmitry Osipenko пишет: > static int tegra_smmu_of_xlate(struct device *dev, >

Re: [PATCH v4 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device()

2020-10-05 Thread Dmitry Osipenko
05.10.2020 12:53, Thierry Reding пишет: > On Fri, Oct 02, 2020 at 05:50:08PM +0300, Dmitry Osipenko wrote: >> 02.10.2020 17:22, Dmitry Osipenko пишет: static int tegra_smmu_of_xlate(struct device *dev, struct of_phandle_args *args) { + struct

Re: [PATCH v4 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device()

2020-10-05 Thread Thierry Reding
On Fri, Oct 02, 2020 at 11:58:29AM -0700, Nicolin Chen wrote: > On Fri, Oct 02, 2020 at 06:02:18PM +0300, Dmitry Osipenko wrote: > > 02.10.2020 09:08, Nicolin Chen пишет: > > > static int tegra_smmu_of_xlate(struct device *dev, > > > struct of_phandle_args *args) > > > {

Re: [PATCH v4 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device()

2020-10-05 Thread Thierry Reding
On Fri, Oct 02, 2020 at 05:50:08PM +0300, Dmitry Osipenko wrote: > 02.10.2020 17:22, Dmitry Osipenko пишет: > >> static int tegra_smmu_of_xlate(struct device *dev, > >> struct of_phandle_args *args) > >> { > >> + struct platform_device *iommu_pdev =

Re: [PATCH v4 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device()

2020-10-05 Thread Thierry Reding
On Fri, Oct 02, 2020 at 05:22:41PM +0300, Dmitry Osipenko wrote: > 02.10.2020 09:08, Nicolin Chen пишет: > > static int tegra_smmu_of_xlate(struct device *dev, > >struct of_phandle_args *args) > > { > > + struct platform_device *iommu_pdev =

Re: [PATCH v4 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device()

2020-10-05 Thread Thierry Reding
On Fri, Oct 02, 2020 at 12:53:28PM -0700, Nicolin Chen wrote: > On Fri, Oct 02, 2020 at 05:58:29PM +0300, Dmitry Osipenko wrote: > > 02.10.2020 17:22, Dmitry Osipenko пишет: > > > 02.10.2020 09:08, Nicolin Chen пишет: > > >> -static void tegra_smmu_release_device(struct device *dev) > > >> -{ > >

Re: [PATCH v4 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device()

2020-10-02 Thread Nicolin Chen
On Fri, Oct 02, 2020 at 05:58:29PM +0300, Dmitry Osipenko wrote: > 02.10.2020 17:22, Dmitry Osipenko пишет: > > 02.10.2020 09:08, Nicolin Chen пишет: > >> -static void tegra_smmu_release_device(struct device *dev) > >> -{ > >> - dev_iommu_priv_set(dev, NULL); > >> -} > >> +static void

Re: [PATCH v4 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device()

2020-10-02 Thread Nicolin Chen
On Fri, Oct 02, 2020 at 06:02:18PM +0300, Dmitry Osipenko wrote: > 02.10.2020 09:08, Nicolin Chen пишет: > > static int tegra_smmu_of_xlate(struct device *dev, > >struct of_phandle_args *args) > > { > > + struct platform_device *iommu_pdev =

Re: [PATCH v4 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device()

2020-10-02 Thread Dmitry Osipenko
02.10.2020 21:01, Nicolin Chen пишет: > On Fri, Oct 02, 2020 at 05:23:14PM +0300, Dmitry Osipenko wrote: >> 02.10.2020 09:08, Nicolin Chen пишет: >>> static struct iommu_device *tegra_smmu_probe_device(struct device *dev) >>> { >>> - struct device_node *np = dev->of_node; >>> - struct

Re: [PATCH v4 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device()

2020-10-02 Thread Nicolin Chen
On Fri, Oct 02, 2020 at 05:23:14PM +0300, Dmitry Osipenko wrote: > 02.10.2020 09:08, Nicolin Chen пишет: > > static struct iommu_device *tegra_smmu_probe_device(struct device *dev) > > { > > - struct device_node *np = dev->of_node; > > - struct tegra_smmu *smmu = NULL; > > - struct

Re: [PATCH v4 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device()

2020-10-02 Thread Dmitry Osipenko
02.10.2020 19:37, Dmitry Osipenko пишет: > 02.10.2020 19:00, Dmitry Osipenko пишет: >> 02.10.2020 18:23, Dmitry Osipenko пишет: >>> 02.10.2020 09:08, Nicolin Chen пишет: Then when a client gets probed, of_iommu_configure() in iommu core will search DTB for swgroup ID and call

Re: [PATCH v4 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device()

2020-10-02 Thread Dmitry Osipenko
02.10.2020 19:00, Dmitry Osipenko пишет: > 02.10.2020 18:23, Dmitry Osipenko пишет: >> 02.10.2020 09:08, Nicolin Chen пишет: >>> Then when a client gets probed, of_iommu_configure() in >>> iommu core will search DTB for swgroup ID and call ->of_xlate() >>> to prepare an fwspec, similar to

Re: [PATCH v4 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device()

2020-10-02 Thread Dmitry Osipenko
02.10.2020 18:23, Dmitry Osipenko пишет: > 02.10.2020 09:08, Nicolin Chen пишет: >> Then when a client gets probed, of_iommu_configure() in >> iommu core will search DTB for swgroup ID and call ->of_xlate() >> to prepare an fwspec, similar to tegra_smmu_probe_device() and >>

Re: [PATCH v4 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device()

2020-10-02 Thread Dmitry Osipenko
02.10.2020 09:08, Nicolin Chen пишет: > Then when a client gets probed, of_iommu_configure() in > iommu core will search DTB for swgroup ID and call ->of_xlate() > to prepare an fwspec, similar to tegra_smmu_probe_device() and > tegra_smmu_configure(). Then it'll call tegra_smmu_probe_device() >

Re: [PATCH v4 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device()

2020-10-02 Thread Dmitry Osipenko
02.10.2020 09:08, Nicolin Chen пишет: > static int tegra_smmu_of_xlate(struct device *dev, > struct of_phandle_args *args) > { > + struct platform_device *iommu_pdev = of_find_device_by_node(args->np); > + struct tegra_mc *mc =

Re: [PATCH v4 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device()

2020-10-02 Thread Dmitry Osipenko
02.10.2020 17:22, Dmitry Osipenko пишет: > 02.10.2020 09:08, Nicolin Chen пишет: >> -static void tegra_smmu_release_device(struct device *dev) >> -{ >> -dev_iommu_priv_set(dev, NULL); >> -} >> +static void tegra_smmu_release_device(struct device *dev) {} > > Please keep the braces as-is. >

Re: [PATCH v4 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device()

2020-10-02 Thread Dmitry Osipenko
02.10.2020 17:22, Dmitry Osipenko пишет: >> static int tegra_smmu_of_xlate(struct device *dev, >> struct of_phandle_args *args) >> { >> +struct platform_device *iommu_pdev = of_find_device_by_node(args->np); >> +struct tegra_mc *mc =

Re: [PATCH v4 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device()

2020-10-02 Thread Dmitry Osipenko
02.10.2020 09:08, Nicolin Chen пишет: > static struct iommu_device *tegra_smmu_probe_device(struct device *dev) > { > - struct device_node *np = dev->of_node; > - struct tegra_smmu *smmu = NULL; > - struct of_phandle_args args; > - unsigned int index = 0; > - int err; > - > -

Re: [PATCH v4 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device()

2020-10-02 Thread Dmitry Osipenko
02.10.2020 09:08, Nicolin Chen пишет: > static int tegra_smmu_of_xlate(struct device *dev, > struct of_phandle_args *args) > { > + struct platform_device *iommu_pdev = of_find_device_by_node(args->np); > + struct tegra_mc *mc =

Re: [PATCH v4 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device()

2020-10-02 Thread Dmitry Osipenko
02.10.2020 09:08, Nicolin Chen пишет: > -static void tegra_smmu_release_device(struct device *dev) > -{ > - dev_iommu_priv_set(dev, NULL); > -} > +static void tegra_smmu_release_device(struct device *dev) {} Please keep the braces as-is. ___ iommu