linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 RESEND 0/5] AMBA: add complete support for power domains
@ 2016-02-10 10:47 Marek Szyprowski
  2016-02-10 10:47 ` [PATCH v5 RESEND 1/5] drivers: nvdimm: ensure no negative value gets returned on positive match Marek Szyprowski
                   ` (4 more replies)
  0 siblings, 5 replies; 17+ messages in thread
From: Marek Szyprowski @ 2016-02-10 10:47 UTC (permalink / raw)
  To: linux-arm-kernel

(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

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2016-04-12 14:49 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-10 10:47 [PATCH v5 RESEND 0/5] AMBA: add complete support for power domains Marek Szyprowski
2016-02-10 10:47 ` [PATCH v5 RESEND 1/5] drivers: nvdimm: ensure no negative value gets returned on positive match Marek Szyprowski
2016-02-10 10:47 ` [PATCH v5 RESEND 2/5] ARM: sa1111: " Marek Szyprowski
2016-02-10 16:39   ` Ulf Hansson
2016-02-10 10:47 ` [PATCH v5 RESEND 3/5] driver core: handle -EPROBE_DEFER from bus_type.match() Marek Szyprowski
2016-02-12  3:19   ` Greg Kroah-Hartman
2016-02-10 10:47 ` [PATCH v5 RESEND 4/5] ARM: amba: Move reading of periphid to amba_match() Marek Szyprowski
2016-02-15 17:52   ` Russell King - ARM Linux
2016-02-16 16:31     ` Russell King - ARM Linux
2016-02-17  7:52     ` Marek Szyprowski
2016-02-17 20:08       ` Russell King - ARM Linux
2016-03-02 10:16         ` Ulf Hansson
2016-04-12 11:39           ` Ulf Hansson
2016-04-12 14:09             ` Marek Szyprowski
2016-04-12 14:09               ` [PATCH v6] drivers: amba: properly handle devices with power domains Marek Szyprowski
2016-04-12 14:49                 ` Ulf Hansson
2016-02-10 10:47 ` [PATCH v5 RESEND 5/5] ARM: amba: Properly " Marek Szyprowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).