From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sricharan" Subject: RE: [PATCH V7 01/11] iommu/of: Refactor of_iommu_configure() for error handling Date: Fri, 27 Jan 2017 23:30:05 +0530 Message-ID: <009901d278c7$34fee230$9efca690$@codeaurora.org> References: <1485188293-20263-1-git-send-email-sricharan@codeaurora.org> <1485188293-20263-2-git-send-email-sricharan@codeaurora.org> <4388779a-0e83-fadc-83f4-98c46c88d42e@semihalf.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Content-Language: en-us List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: 'Robin Murphy' , 'Tomasz Nowicki' , will.deacon-5wv7dgnIgG8@public.gmane.org, joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org, lorenzo.pieralisi-5wv7dgnIgG8@public.gmane.org, iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org, bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org, linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-acpi@vger.kernel.org Hi Robin, [..] >>> +const struct iommu_ops *of_iommu_configure(struct device *dev, >>> + struct device_node *master_np) >>> +{ >>> + const struct iommu_ops *ops; >>> + >>> + if (!master_np) >>> + return NULL; >>> + >>> + if (dev_is_pci(dev)) >>> + ops = of_pci_iommu_init(to_pci_dev(dev), master_np); >> >> I gave the whole patch set a try on ThunderX. really_probe() is failing >> on dma_configure()->of_pci_iommu_init() for each PCI device. > >When you say "failing", do you mean cleanly, or with a crash? I've >managed to hit __of_match_node() dereferencing NULL from >of_iommu_xlate() in a horribly complicated chain of events, which I'm >trying to figure out now, and I wonder if the two might be related. Sorry that there is crash still. __of_match_node seems to checking for NULL arguments , feels like some invalid pointer was passed in. Is there any particular sequence to try for this ? Regards, Sricharan