Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934235AbbLWLAt (ORCPT ); Wed, 23 Dec 2015 06:00:49 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:32208 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754570AbbLWLAr (ORCPT ); Wed, 23 Dec 2015 06:00:47 -0500 X-AuditID: cbfec7f5-f79b16d000005389-46-567a7edc4163 From: Marek Szyprowski To: linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Marek Szyprowski , Russell King - ARM Linux , Ulf Hansson , Tomeu Vizoso , Greg Kroah-Hartman , Dan Williams , Kukjin Kim , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz Subject: [PATCH v5 0/5] AMBA: add complete support for power domains Date: Wed, 23 Dec 2015 11:59:23 +0100 Message-id: <1450868368-5650-1-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.2 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrKLMWRmVeSWpSXmKPExsVy+t/xq7p36qrCDLZ2MVlsnLGe1WL61AuM Fs2L17NZvH5haNH/+DWzxabH11gtLu+aw2Yx4/w+Jovbl3kt1h65y27Rt/YSm8XxteEOPB4t zT1sHjvuLmH0WLznJZPHplWdbB53ru1h89g/dw27x+Yl9R59W1YxenzeJBfAGcVlk5Kak1mW WqRvl8CV8aXBqWCSdMXUHd2sDYwPRLsYOTkkBEwkTjVMYIGwxSQu3FvP1sXIxSEksJRRYvqf qVBOE5PEz6nb2UCq2AQMJbredoHZIgLZEvP3drODFDELzGeWeLiqnxUkISzgInF25yUwm0VA VeL4yS52EJtXwF1iRscHVoh1chL/X65gmsDIvYCRYRWjaGppckFxUnqukV5xYm5xaV66XnJ+ 7iZGSOB93cG49JjVIUYBDkYlHt4XzZVhQqyJZcWVuYcYJTiYlUR4098BhXhTEiurUovy44tK c1KLDzFKc7AoifPO3PU+REggPbEkNTs1tSC1CCbLxMEp1cCo7ZliKtdgGRPXsZxd4YfsnFlX 4phVyzs+pn1+HZXDf7HB8NaxSx92uV5KX7ZctIf72avK4/W8mz5Mvfi6+3F/+0Wf6IS30w7d 1ElttbstOYOFbVWEY+/3h7ZmzT8iFfRbPu2blv1SlWfNB3uDZPZDroWrFfZLtmRFHfoUPmmd BZtI1OTjf9yUWIozEg21mIuKEwFZl1NzOAIAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3633 Lines: 91 (Old thread name: Exynos4210: fix power domain for MDMA1 device) This patchset fixes mysterious boot hang on Exynos 4210 SoCs, when IOMMU is enabled. There is no direct dependency between IOMMU devices and MDMA1. However enabling IOMMU changes the device probe order, what results in LCD0 power domain being turned off for some time. During that time the registration of MDMA1 device happens, what results in system hangs, because the common bus code tries to read PID/CID registers from turned-off device. Since the proposed change in the driver core had impact on existing drivers (see '-next regression: "driver cohandle -EPROBE_DEFER from bus_type.match()"' thread https://lkml.org/lkml/2015/12/17/390 ), I've checked all the functions assigned to match callback of struct bus_type objects and found that there are only 4 such functions that don't return 0/1 values: 1. arch/arm/common/sa1111.c: sa1111_match -> result of bitwise & 2. drivers/nvdimm/bus.c: nvdimm_bus_match -> result of test_bit() 3. drivers/sh/superhyway/superhyway.c: superhyway_bus_match -> error codes (this is really funny case, all errors are resolved to 'matched' case) 4. drivers/staging/unisys/visorbus/visorbus_main.c: visorbus_match -> 0 and some positive integer values, safe for now The list of functions that I've examined has been generated by following shell command: $ git grep -Pp "\.match\s" | grep -A1 bus_type | grep "\.match\s" | tr -s "\t;&,=:" " " | cut -d" " -f1,3 Only the first two functions require potential fixing to ensure that correct match will not result in negative return value, so the 2 additional patches have been added to v5 patchset. Best regards Marek Szyprowski Samsung R&D Institute Poland Changelog: v5: - added 2 more patches to avoid regression with existing drivers (nvdimm and sa1111), for more information, see https://lkml.org/lkml/2015/12/17/390 - changed thread name to "AMBA: add complete support for power domains" v4: https://lkml.org/lkml/2015/12/2/52 - fixed more issues pointed by Ulf Hansson and Russell King v3: https://lkml.org/lkml/2015/12/1/334 - fixed issues pointed by Ulf Hansson - dropped patch for exynos4210 dts, because it already got queued for merging v2: https://lkml.org/lkml/2015/11/26/229 - added 2 patches from 'On-demand device probing' thread (https://lkml.org/lkml/2015/9/29/189), which move PID/CIR reading from amba_device_add() to amba_match() - moved dev_pm_domain_attach() to amba_match(), which is allowed to return -EPROBE_DEFER v1: http://www.spinics.net/lists/arm-kernel/msg463185.html - initial version Patch summary: Dan Williams (1): drivers: nvdimm: ensure no negative value gets returned on positive match Marek Szyprowski (2): ARM: sa1111: ensure no negative value gets returned on positive match ARM: amba: Properly handle devices with power domains Tomeu Vizoso (2): driver core: handle -EPROBE_DEFER from bus_type.match() ARM: amba: Move reading of periphid to amba_match() Documentation/driver-model/porting.txt | 6 +- arch/arm/common/sa1111.c | 2 +- drivers/amba/bus.c | 152 ++++++++++++++++++--------------- drivers/base/dd.c | 24 +++++- drivers/nvdimm/bus.c | 2 +- include/linux/device.h | 7 +- 6 files changed, 114 insertions(+), 79 deletions(-) -- 1.9.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/