<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/clocksource, branch v4.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.2</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2015-08-20T15:22:56Z</updated>
<entry>
<title>clocksource/imx: Fix boot with non-DT systems</title>
<updated>2015-08-20T15:22:56Z</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2015-08-20T10:27:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=be3b0f9babc0b29931b75f7048d81f966473ce13'/>
<id>urn:sha1:be3b0f9babc0b29931b75f7048d81f966473ce13</id>
<content type='text'>
Commit 6dd747825b20 ("ARM: imx: move timer resources into a structure")
moved initialization parameters into a data structure, but neglected to set
the irq field in that data structure for non-DT boots. This causes the system
to hang if a non-DT boot is attempted.

Fixes: 6dd747825b20 ("ARM: imx: move timer resources into a structure")
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Cc: Shawn Guo &lt;shawn.guo@linaro.org&gt;
Cc: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Link: http://lkml.kernel.org/r/1440066441-13930-1-git-send-email-linux@roeck-us.net
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>clockevents/drivers/sh_cmt: Only perform clocksource suspend/resume if enabled</title>
<updated>2015-08-08T08:50:08Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2015-08-06T15:32:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=54d46b7fbcbd00fe4b20a27208e5909facc714e3'/>
<id>urn:sha1:54d46b7fbcbd00fe4b20a27208e5909facc714e3</id>
<content type='text'>
Currently the sh_cmt clocksource timer is disabled or enabled
unconditionally on clocksource suspend resp. resume, even if a
better clocksource is present (e.g. arch_sys_counter) and the
sh_cmt clocksource is not enabled.

As sh_cmt is a syscore device when its timer is enabled, this
may lead to a genpd.prepared_count imbalance in the presence of
PM Domains, which may cause a lock-up during reboot after s2ram.

During suspend:
  - pm_genpd_prepare() is called for all non-syscore devices (incl.
    sh_cmt), increasing genpd.prepared_count for each device,
  - clocksource.suspend() is called for all clocksource devices,
  - sh_cmt_clocksource_suspend() calls sh_cmt_stop(), which is a no-op
    as the clocksource was not enabled.

During resume:
  - clocksource.resume() is called for all clocksource devices,
  - sh_cmt_clocksource_resume() calls sh_cmt_start(), which enables the
    clocksource timer, and turns sh_cmt into a syscore device,
  - pm_genpd_complete() is called for all non-syscore devices (excl.
    sh_cmt now!), decreasing genpd.prepared_count for each device but
    sh_cmt.

Now genpd.prepared_count of the PM Domain containing sh_cmt is
still 1 instead of zero.  On subsequent suspend/resume cycles,
sh_cmt is still a syscore device, hence it's skipped for
pm_genpd_{prepare,complete}(), keeping the imbalance of
genpd.prepared_count at 1.

During reboot:

  - platform_drv_shutdown() is called for any platform device that has
    a driver with a .shutdown() method (only rcar-dmac on R-Car Gen2),

  - platform_drv_shutdown() calls dev_pm_domain_detach(), which
    calls genpd_dev_pm_detach(),

  - genpd_dev_pm_detach() keeps calling pm_genpd_remove_device() until
    it doesn't return -EAGAIN[*],

  - If the device is part of the same PM Domain as sh_cmt,
    pm_genpd_remove_device() always fails with -EAGAIN due to
    genpd.prepared_count &gt; 0.

  - Infinite loop in genpd_dev_pm_detach()[*].

[*] Commit 93af5e9354432828 ("PM / Domains: Avoid infinite loops in
    attach/detach code") already limited the number of loop iterations,
    avoiding the lock-up.

To fix this, only disable or enable the clocksource timer on
clocksource suspend resp. resume if the clocksource was enabled.

This was tested on r8a7791/koelsch with the CPG Clock Domain:

  - using arch_sys_counter as the clocksource, which is the default, and
    which showed the problem,

  - using sh_cmt as a clocksource ("echo ffca0000.timer &gt; \
    /sys/devices/system/clocksource/clocksource0/current_clocksource"),
    which behaves the same as before.

Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Acked-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Link: http://lkml.kernel.org/r/1438875126-12596-2-git-send-email-daniel.lezcano@linaro.org
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>clocksource/imx: Define clocksource for mx27</title>
<updated>2015-07-07T08:44:45Z</updated>
<author>
<name>Philippe Reynes</name>
<email>tremyfr@gmail.com</email>
</author>
<published>2015-06-27T21:11:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=747d34e7313034768aac83d679db43cedc5ab778'/>
<id>urn:sha1:747d34e7313034768aac83d679db43cedc5ab778</id>
<content type='text'>
The rework of the imx clocksource driver missed to add an entry for
imx27 which results in a boot failure on those machines.

Add the proper CLOCKSOURCE_OF_DECLARE() entry for imx27 and map it to
the imx21 init.

Fixes: bef11c881ba5 'ARM: imx: initialize gpt device type for DT boot'
Signed-off-by: Philippe Reynes &lt;tremyfr@gmail.com&gt;
Cc: linux-arm-kernel@lists.infradead.org
Cc: daniel.lezcano@linaro.org
Cc: fabio.estevam@freescale.com
Cc: shawnguo@kernel.org
Cc: kernel@pengutronix.de
Link: http://lkml.kernel.org/r/1435439504-406-1-git-send-email-tremyfr@gmail.com
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2015-07-01T22:44:18Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2015-07-01T22:44:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6ac15baacb6ecd87c66209627753b96ded3b4515'/>
<id>urn:sha1:6ac15baacb6ecd87c66209627753b96ded3b4515</id>
<content type='text'>
Pull timer fixes from Thomas Gleixner:
 "This contains:

   - a build regression fix introduced by the timeconst move

   - a hotplug regression fix introduced by the timer wheel diet

   - a cpu hotplug bug fix for the exynos clocksource driver"

* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  time: Remove development rules from Kbuild/Makefile
  timer: Fix hotplug regression
  clocksource: exynos_mct: Avoid blocking calls in the cpu hotplug notifier
</content>
</entry>
<entry>
<title>clocksource: exynos_mct: Avoid blocking calls in the cpu hotplug notifier</title>
<updated>2015-06-26T19:53:01Z</updated>
<author>
<name>Damian Eppel</name>
<email>d.eppel@samsung.com</email>
</author>
<published>2015-06-26T13:23:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=56a94f13919c0db5958611b388e1581b4852f3c9'/>
<id>urn:sha1:56a94f13919c0db5958611b388e1581b4852f3c9</id>
<content type='text'>
Whilst testing cpu hotplug events on kernel configured with
DEBUG_PREEMPT and DEBUG_ATOMIC_SLEEP we get following BUG message,
caused by calling request_irq() and free_irq() in the context of
hotplug notification (which is in this case atomic context).

[   40.785859] CPU1: Software reset
[   40.786660] BUG: sleeping function called from invalid context at mm/slub.c:1241
[   40.786668] in_atomic(): 1, irqs_disabled(): 128, pid: 0, name: swapper/1
[   40.786678] Preemption disabled at:[&lt;  (null)&gt;]   (null)
[   40.786681]
[   40.786692] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 3.19.0-rc4-00024-g7dca860 #36
[   40.786698] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
[   40.786728] [&lt;c0014a00&gt;] (unwind_backtrace) from [&lt;c0011980&gt;] (show_stack+0x10/0x14)
[   40.786747] [&lt;c0011980&gt;] (show_stack) from [&lt;c0449ba0&gt;] (dump_stack+0x70/0xbc)
[   40.786767] [&lt;c0449ba0&gt;] (dump_stack) from [&lt;c00c6124&gt;] (kmem_cache_alloc+0xd8/0x170)
[   40.786785] [&lt;c00c6124&gt;] (kmem_cache_alloc) from [&lt;c005d6f8&gt;] (request_threaded_irq+0x64/0x128)
[   40.786804] [&lt;c005d6f8&gt;] (request_threaded_irq) from [&lt;c0350b8c&gt;] (exynos4_local_timer_setup+0xc0/0x13c)
[   40.786820] [&lt;c0350b8c&gt;] (exynos4_local_timer_setup) from [&lt;c0350ca8&gt;] (exynos4_mct_cpu_notify+0x30/0xa8)
[   40.786838] [&lt;c0350ca8&gt;] (exynos4_mct_cpu_notify) from [&lt;c003b330&gt;] (notifier_call_chain+0x44/0x84)
[   40.786857] [&lt;c003b330&gt;] (notifier_call_chain) from [&lt;c0022fd4&gt;] (__cpu_notify+0x28/0x44)
[   40.786873] [&lt;c0022fd4&gt;] (__cpu_notify) from [&lt;c0013714&gt;] (secondary_start_kernel+0xec/0x150)
[   40.786886] [&lt;c0013714&gt;] (secondary_start_kernel) from [&lt;40008764&gt;] (0x40008764)

Interrupts cannot be requested/freed in the CPU_STARTING/CPU_DYING
notifications which run on the hotplugged cpu with interrupts and
preemption disabled.

To avoid the issue, request the interrupts for all possible cpus in
the boot code. The interrupts are marked NO_AUTOENABLE to avoid a racy
request_irq/disable_irq() sequence. The flag prevents the
request_irq() code from enabling the interrupt immediately.

The interrupt is then enabled in the CPU_STARTING notifier of the
hotplugged cpu and again disabled with disable_irq_nosync() in the
CPU_DYING notifier.

[ tglx: Massaged changelog to match the patch ]

Fixes: 7114cd749a12 ("clocksource: exynos_mct: use (request/free)_irq calls for local timer registration")
Reported-by: Krzysztof Kozlowski &lt;k.kozlowski@samsung.com&gt;
Reviewed-by: Krzysztof Kozlowski &lt;k.kozlowski@samsung.com&gt;
Tested-by: Krzysztof Kozlowski &lt;k.kozlowski@samsung.com&gt;
Tested-by: Marcin Jabrzyk &lt;m.jabrzyk@samsung.com&gt;
Signed-off-by: Damian Eppel &lt;d.eppel@samsung.com&gt;
Cc: m.szyprowski@samsung.com
Cc: kyungmin.park@samsung.com
Cc: daniel.lezcano@linaro.org
Cc: kgene@kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Link: http://lkml.kernel.org/r/1435324984-7328-1-git-send-email-d.eppel@samsung.com
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: &lt;stable@vger.kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm</title>
<updated>2015-06-26T19:20:00Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2015-06-26T19:20:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e8a0b37d28ace440776c0a4fe3c65f5832a9a7ee'/>
<id>urn:sha1:e8a0b37d28ace440776c0a4fe3c65f5832a9a7ee</id>
<content type='text'>
Pull ARM updates from Russell King:
 "Bigger items included in this update are:

   - A series of updates from Arnd for ARM randconfig build failures
   - Updates from Dmitry for StrongARM SA-1100 to move IRQ handling to
     drivers/irqchip/
   - Move ARMs SP804 timer to drivers/clocksource/
   - Perf updates from Mark Rutland in preparation to move the ARM perf
     code into drivers/ so it can be shared with ARM64.
   - MCPM updates from Nicolas
   - Add support for taking platform serial number from DT
   - Re-implement Keystone2 physical address space switch to conform to
     architecture requirements
   - Clean up ARMv7 LPAE code, which goes in hand with the Keystone2
     changes.
   - L2C cleanups to avoid unlocking caches if we're prevented by the
     secure support to unlock.
   - Avoid cleaning a potentially dirty cache containing stale data on
     CPU initialisation
   - Add ARM-only entry point for secondary startup (for machines that
     can only call into a Thumb kernel in ARM mode).  Same thing is also
     done for the resume entry point.
   - Provide arch_irqs_disabled via asm-generic
   - Enlarge ARMv7M vector table
   - Always use BFD linker for VDSO, as gold doesn't accept some of the
     options we need.
   - Fix an incorrect BSYM (for Thumb symbols) usage, and convert all
     BSYM compiler macros to a "badr" (for branch address).
   - Shut up compiler warnings provoked by our cmpxchg() implementation.
   - Ensure bad xchg sizes fail to link"

* 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm: (75 commits)
  ARM: Fix build if CLKDEV_LOOKUP is not configured
  ARM: fix new BSYM() usage introduced via for-arm-soc branch
  ARM: 8383/1: nommu: avoid deprecated source register on mov
  ARM: 8391/1: l2c: add options to overwrite prefetching behavior
  ARM: 8390/1: irqflags: Get arch_irqs_disabled from asm-generic
  ARM: 8387/1: arm/mm/dma-mapping.c: Add arm_coherent_dma_mmap
  ARM: 8388/1: tcm: Don't crash when TCM banks are protected by TrustZone
  ARM: 8384/1: VDSO: force use of BFD linker
  ARM: 8385/1: VDSO: group link options
  ARM: cmpxchg: avoid warnings from macro-ized cmpxchg() implementations
  ARM: remove __bad_xchg definition
  ARM: 8369/1: ARMv7M: define size of vector table for Vybrid
  ARM: 8382/1: clocksource: make ARM_TIMER_SP804 depend on GENERIC_SCHED_CLOCK
  ARM: 8366/1: move Dual-Timer SP804 driver to drivers/clocksource
  ARM: 8365/1: introduce sp804_timer_disable and remove arm_timer.h inclusion
  ARM: 8364/1: fix BE32 module loading
  ARM: 8360/1: add secondary_startup_arm prototype in header file
  ARM: 8359/1: correct secondary_startup_arm mode
  ARM: proc-v7: sanitise and document registers around errata
  ARM: proc-v7: clean up MIDR access
  ...
</content>
</entry>
<entry>
<title>Merge tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc</title>
<updated>2015-06-26T18:34:35Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2015-06-26T18:34:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4aa705b18bf17c4ff33ff7bbcd3f0c596443fa81'/>
<id>urn:sha1:4aa705b18bf17c4ff33ff7bbcd3f0c596443fa81</id>
<content type='text'>
Pull ARM SoC platform support updates from Kevin Hilman:
 "Our SoC branch usually contains expanded support for new SoCs and
  other core platform code.  Some highlights from this round:

   - sunxi: SMP support for A23 SoC
   - socpga: big-endian support
   - pxa: conversion to common clock framework
   - bcm: SMP support for BCM63138
   - imx: support new I.MX7D SoC
   - zte: basic support for ZX296702 SoC"

* tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (134 commits)
  ARM: zx: Add basic defconfig support for ZX296702
  ARM: dts: zx: add an initial zx296702 dts and doc
  clk: zx: add clock support to zx296702
  dt-bindings: Add #defines for ZTE ZX296702 clocks
  ARM: socfpga: fix build error due to secondary_startup
  MAINTAINERS: ARM64: EXYNOS: Extend entry for ARM64 DTS
  ARM: ep93xx: simone: support for SPI-based MMC/SD cards
  MAINTAINERS: update Shawn's email to use kernel.org one
  ARM: socfpga: support suspend to ram
  ARM: socfpga: add CPU_METHOD_OF_DECLARE for Arria 10
  ARM: socfpga: use CPU_METHOD_OF_DECLARE for socfpga_cyclone5
  ARM: EXYNOS: register power domain driver from core_initcall
  ARM: EXYNOS: use PS_HOLD based poweroff for all supported SoCs
  ARM: SAMSUNG: Constify platform_device_id
  ARM: EXYNOS: Constify irq_domain_ops
  ARM: EXYNOS: add coupled cpuidle support for Exynos3250
  ARM: EXYNOS: add exynos_get_boot_addr() helper
  ARM: EXYNOS: add exynos_set_boot_addr() helper
  ARM: EXYNOS: make exynos_core_restart() less verbose
  ARM: EXYNOS: fix exynos_boot_secondary() return value on timeout
  ...
</content>
</entry>
<entry>
<title>Merge tag 'for-4.2' of git://git.sourceforge.jp/gitroot/uclinux-h8/linux</title>
<updated>2015-06-25T20:07:24Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2015-06-25T20:07:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=55a7d4b85ca1f723d26b8956e8faeff730d0d240'/>
<id>urn:sha1:55a7d4b85ca1f723d26b8956e8faeff730d0d240</id>
<content type='text'>
Pull Renesas H8/300 architecture re-introduction from Yoshinori Sato.

We dropped arch/h8300 two years ago as stale and old, this is a new and
more modern rewritten arch support for the same architecture.

* tag 'for-4.2' of git://git.sourceforge.jp/gitroot/uclinux-h8/linux: (27 commits)
  h8300: fix typo.
  h8300: Always build dtb
  h8300: Remove ARCH_WANT_IPC_PARSE_VERSION
  sh-sci: Get register size from platform device
  clk: h8300: fix error handling in h8s2678_pll_clk_setup()
  h8300: Symbol name fix
  h8300: devicetree source
  h8300: configs
  h8300: IRQ chip driver
  h8300: clocksource
  h8300: clock driver
  h8300: Build scripts
  h8300: library functions
  h8300: Memory management
  h8300: miscellaneous functions
  h8300: process helpers
  h8300: compressed image support
  h8300: Low level entry
  h8300: kernel startup
  h8300: Interrupt and exceptions
  ...
</content>
</entry>
<entry>
<title>ARM: Fix build if CLKDEV_LOOKUP is not configured</title>
<updated>2015-06-24T08:50:02Z</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2015-06-24T03:49:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=002af195a8c720ca47c7884fd0390f3b327423b9'/>
<id>urn:sha1:002af195a8c720ca47c7884fd0390f3b327423b9</id>
<content type='text'>
mips:allmodconfig fails to build with

drivers/clocksource/timer-sp804.c: In function '__sp804_clocksource_and_sched_clock_init':
drivers/clocksource/timer-sp804.c:88:3: error: implicit declaration of function 'clk_get_sys'

because CLKDEV_LOOKUP is not configured and the driver depends on it.

Fixes: 0b7402dce445 ("ARM: 8366/1: move Dual-Timer SP804 driver to drivers/clocksource")
Acked-by: Sudeep Holla &lt;sudeep.holla@arm.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>h8300: fix typo.</title>
<updated>2015-06-23T04:36:00Z</updated>
<author>
<name>Yoshinori Sato</name>
<email>ysato@users.sourceforge.jp</email>
</author>
<published>2015-06-08T17:24:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=07834743f42b4f27a21010cf5bab483b3ae3d13d'/>
<id>urn:sha1:07834743f42b4f27a21010cf5bab483b3ae3d13d</id>
<content type='text'>
Signed-off-by: Yoshinori Sato &lt;ysato@users.sourceforge.jp&gt;
</content>
</entry>
</feed>
