public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Kamal Mostafa <kamal@canonical.com>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	kernel-team@lists.ubuntu.com
Cc: Michael Turquette <mturquette@baylibre.com>,
	Pawel Moll <pawel.moll@arm.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Stephen Boyd <sboyd@codeaurora.org>,
	Kamal Mostafa <kamal@canonical.com>
Subject: [PATCH 3.13.y-ckt 95/97] clk: versatile: sp810: support reentrance
Date: Mon,  4 Apr 2016 16:26:59 -0700	[thread overview]
Message-ID: <1459812421-933-96-git-send-email-kamal@canonical.com> (raw)
In-Reply-To: <1459812421-933-1-git-send-email-kamal@canonical.com>

3.13.11-ckt38 -stable review patch.  If anyone has any objections, please let me know.

---8<------------------------------------------------------------

From: Linus Walleij <linus.walleij@linaro.org>

commit ec7957a6aa0aaf981fb8356dc47a2cdd01cde03c upstream.

Despite care take to allocate clocks state containers the
SP810 driver actually just supports creating one instance:
all clocks registered for every instance will end up with the
exact same name and __clk_init() will fail.

Rename the timclken<0> .. timclken<n> to sp810_<instance>_<n>
so every clock on every instance gets a unique name.

This is necessary for the RealView PBA8 which has two SP810
blocks: the second block will not register its clocks unless
every clock on every instance is unique and results in boot
logs like this:

------------[ cut here ]------------
WARNING: CPU: 0 PID: 0 at ../drivers/clk/versatile/clk-sp810.c:137
  clk_sp810_of_setup+0x110/0x154()
Modules linked in:
CPU: 0 PID: 0 Comm: swapper/0 Not tainted
4.5.0-rc2-00030-g352718fc39f6-dirty #225
Hardware name: ARM RealView Machine (Device Tree Support)
[<c00167f8>] (unwind_backtrace) from [<c0013204>]
             (show_stack+0x10/0x14)
[<c0013204>] (show_stack) from [<c01a049c>]
             (dump_stack+0x84/0x9c)
[<c01a049c>] (dump_stack) from [<c0024990>]
             (warn_slowpath_common+0x74/0xb0)
[<c0024990>] (warn_slowpath_common) from [<c0024a68>]
             (warn_slowpath_null+0x1c/0x24)
[<c0024a68>] (warn_slowpath_null) from [<c051eb44>]
             (clk_sp810_of_setup+0x110/0x154)
[<c051eb44>] (clk_sp810_of_setup) from [<c051e3a4>]
             (of_clk_init+0x12c/0x1c8)
[<c051e3a4>] (of_clk_init) from [<c0504714>]
             (time_init+0x20/0x2c)
[<c0504714>] (time_init) from [<c0501b18>]
             (start_kernel+0x244/0x3c4)
[<c0501b18>] (start_kernel) from [<7000807c>] (0x7000807c)
---[ end trace cb88537fdc8fa200 ]---

Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Pawel Moll <pawel.moll@arm.com>
Fixes: 6e973d2c4385 "clk: vexpress: Add separate SP810 driver"
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/clk/versatile/clk-sp810.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/clk/versatile/clk-sp810.c b/drivers/clk/versatile/clk-sp810.c
index b9e05bd..a21e2fa 100644
--- a/drivers/clk/versatile/clk-sp810.c
+++ b/drivers/clk/versatile/clk-sp810.c
@@ -141,6 +141,7 @@ void __init clk_sp810_of_setup(struct device_node *node)
 	const char *parent_names[2];
 	char name[12];
 	struct clk_init_data init;
+	static int instance;
 	int i;
 
 	if (!sp810) {
@@ -172,7 +173,7 @@ void __init clk_sp810_of_setup(struct device_node *node)
 	init.num_parents = ARRAY_SIZE(parent_names);
 
 	for (i = 0; i < ARRAY_SIZE(sp810->timerclken); i++) {
-		snprintf(name, ARRAY_SIZE(name), "timerclken%d", i);
+		snprintf(name, sizeof(name), "sp810_%d_%d", instance, i);
 
 		sp810->timerclken[i].sp810 = sp810;
 		sp810->timerclken[i].channel = i;
@@ -184,5 +185,6 @@ void __init clk_sp810_of_setup(struct device_node *node)
 	}
 
 	of_clk_add_provider(node, clk_sp810_timerclken_of_get, sp810);
+	instance++;
 }
 CLK_OF_DECLARE(sp810, "arm,sp810", clk_sp810_of_setup);
-- 
2.7.4

  parent reply	other threads:[~2016-04-04 23:26 UTC|newest]

Thread overview: 98+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-04 23:25 [3.13.y-ckt stable] Linux 3.13.11-ckt38 stable review Kamal Mostafa
2016-04-04 23:25 ` [PATCH 3.13.y-ckt 01/97] [stable-only] pipe: Fix buffer offset after partially failed read Kamal Mostafa
2016-04-04 23:25 ` [PATCH 3.13.y-ckt 02/97] EDAC, amd64_edac: Shift wrapping issue in f1x_get_norm_dct_addr() Kamal Mostafa
2016-04-04 23:25 ` [PATCH 3.13.y-ckt 03/97] tty: Fix GPF in flush_to_ldisc(), part 2 Kamal Mostafa
2016-04-04 23:25 ` [PATCH 3.13.y-ckt 04/97] [media] media: v4l2-compat-ioctl32: fix missing length copy in put_v4l2_buffer32 Kamal Mostafa
2016-04-04 23:25 ` [PATCH 3.13.y-ckt 05/97] [media] pwc: Add USB id for Philips Spc880nc webcam Kamal Mostafa
2016-04-04 23:25 ` [PATCH 3.13.y-ckt 06/97] 8250: use callbacks to access UART_DLL/UART_DLM Kamal Mostafa
2016-04-04 23:25 ` [PATCH 3.13.y-ckt 07/97] net: irda: Fix use-after-free in irtty_open() Kamal Mostafa
2016-04-04 23:25 ` [PATCH 3.13.y-ckt 08/97] usb: retry reset if a device times out Kamal Mostafa
2016-04-04 23:25 ` [PATCH 3.13.y-ckt 09/97] HID: core: do not scan reports if the group is already set Kamal Mostafa
2016-04-04 23:25 ` [PATCH 3.13.y-ckt 10/97] HID: fix hid_ignore_special_drivers module parameter Kamal Mostafa
2016-04-04 23:25 ` [PATCH 3.13.y-ckt 11/97] scripts/coccinelle: modernize & Kamal Mostafa
2016-04-04 23:25 ` [PATCH 3.13.y-ckt 12/97] [media] adv7511: TX_EDID_PRESENT is still 1 after a disconnect Kamal Mostafa
2016-04-04 23:25 ` [PATCH 3.13.y-ckt 13/97] [media] saa7134: Fix bytesperline not being set correctly for planar formats Kamal Mostafa
2016-04-04 23:25 ` [PATCH 3.13.y-ckt 14/97] perf tools: Dont stop PMU parsing on alias parse error Kamal Mostafa
2016-04-04 23:25 ` [PATCH 3.13.y-ckt 15/97] Bluetooth: btusb: Add new AR3012 ID 13d3:3395 Kamal Mostafa
2016-04-04 23:25 ` [PATCH 3.13.y-ckt 16/97] Bluetooth: Add new AR3012 ID 0489:e095 Kamal Mostafa
2016-04-04 23:25 ` [PATCH 3.13.y-ckt 17/97] aacraid: Fix memory leak in aac_fib_map_free Kamal Mostafa
2016-04-04 23:25 ` [PATCH 3.13.y-ckt 18/97] mtd: onenand: fix deadlock in onenand_block_markbad Kamal Mostafa
2016-04-04 23:25 ` [PATCH 3.13.y-ckt 19/97] PCI: Disable IO/MEM decoding for devices with non-compliant BARs Kamal Mostafa
2016-04-04 23:25 ` [PATCH 3.13.y-ckt 20/97] md/raid5: Compare apples to apples (or sectors to sectors) Kamal Mostafa
2016-04-04 23:25 ` [PATCH 3.13.y-ckt 21/97] Bluetooth: btusb: Add a new AR3012 ID 04ca:3014 Kamal Mostafa
2016-04-04 23:25 ` [PATCH 3.13.y-ckt 22/97] IB/srpt: Simplify srpt_handle_tsk_mgmt() Kamal Mostafa
2016-04-04 23:25 ` [PATCH 3.13.y-ckt 23/97] [media] bttv: Width must be a multiple of 16 when capturing planar formats Kamal Mostafa
2016-04-04 23:25 ` [PATCH 3.13.y-ckt 24/97] watchdog: rc32434_wdt: fix ioctl error handling Kamal Mostafa
2016-04-04 23:25 ` [PATCH 3.13.y-ckt 25/97] xfs: fix two memory leaks in xfs_attr_list.c error paths Kamal Mostafa
2016-04-04 23:25 ` [PATCH 3.13.y-ckt 26/97] quota: Fix possible GPF due to uninitialised pointers Kamal Mostafa
2016-04-04 23:25 ` [PATCH 3.13.y-ckt 27/97] mtip32xx: Print exact time when an internal command is interrupted Kamal Mostafa
2016-04-04 23:25 ` [PATCH 3.13.y-ckt 28/97] KVM: i8254: change PIT discard tick policy Kamal Mostafa
2016-04-04 23:25 ` [PATCH 3.13.y-ckt 29/97] sched/cputime: Fix steal time accounting vs. CPU hotplug Kamal Mostafa
2016-04-04 23:25 ` [PATCH 3.13.y-ckt 30/97] rt2x00: add new rt2800usb device Buffalo WLI-UC-G450 Kamal Mostafa
2016-04-04 23:25 ` [PATCH 3.13.y-ckt 31/97] pinctrl-bcm2835: Fix cut-and-paste error in "pull" parsing Kamal Mostafa
2016-04-04 23:25 ` [PATCH 3.13.y-ckt 32/97] perf/core: Fix perf_sched_count derailment Kamal Mostafa
2016-04-04 23:25 ` [PATCH 3.13.y-ckt 33/97] perf/x86/intel: Use PAGE_SIZE for PEBS buffer size on Core2 Kamal Mostafa
2016-04-04 23:25 ` [PATCH 3.13.y-ckt 34/97] bcache: fix cache_set_flush() NULL pointer dereference on OOM Kamal Mostafa
2016-04-04 23:25 ` [PATCH 3.13.y-ckt 35/97] x86/PCI: Mark Broadwell-EP Home Agent & PCU as having non-compliant BARs Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 36/97] be2iscsi: set the boot_kset pointer to NULL in case of failure Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 37/97] drm/radeon: Don't drop DP 2.7 Ghz link setup on some cards Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 38/97] sg: fix dxferp in from_to case Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 39/97] jbd2: fix FS corruption possibility in jbd2_journal_destroy() on umount path Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 40/97] Bluetooth: btusb: Add a new AR3012 ID 13d3:3472 Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 41/97] iser-target: Separate flows for np listeners and connections cma events Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 42/97] xtensa: ISS: don't hang if stdin EOF is reached Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 43/97] xtensa: clear all DBREAKC registers on start Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 44/97] bus: imx-weim: Take the 'status' property value into account Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 45/97] ALSA: intel8x0: Add clock quirk entry for AD1981B on IBM ThinkPad X41 Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 46/97] s390/pci: enforce fmb page boundary rule Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 47/97] Input: powermate - fix oops with malicious USB descriptors Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 48/97] net: mvneta: enable change MAC address when interface is up Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 49/97] HID: i2c-hid: fix OOB write in i2c_hid_set_or_send_report() Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 50/97] ALSA: hda - Fix unconditional GPIO toggle via automute Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 51/97] ALSA: usb-audio: Fix NULL dereference in create_fixed_stream_quirk() Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 52/97] ALSA: usb-audio: Add sanity checks for endpoint accesses Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 53/97] nfsd: fix deadlock secinfo+readdir compound Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 54/97] x86/iopl: Fix iopl capability check on Xen PV Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 55/97] Input: ims-pcu - sanity check against missing interfaces Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 56/97] Input: synaptics - handle spurious release of trackstick buttons, again Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 57/97] x86/apic: Fix suspicious RCU usage in smp_trace_call_function_interrupt() Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 58/97] USB: iowarrior: fix oops with malicious USB descriptors Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 59/97] USB: usb_driver_claim_interface: add sanity checking Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 60/97] USB: cdc-acm: more " Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 61/97] USB: uas: Reduce can_queue to MAX_CMNDS Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 62/97] tracing: Have preempt(irqs)off trace preempt disabled functions Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 63/97] tracing: Fix crash from reading trace_pipe with sendfile Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 64/97] splice: handle zero nr_pages in splice_to_pipe() Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 65/97] target: Fix target_release_cmd_kref shutdown comp leak Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 66/97] KVM: VMX: avoid guest hang on invalid invept instruction Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 67/97] KVM: fix spin_lock_init order on x86 Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 68/97] tracing: Fix trace_printk() to print when not using bprintk() Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 69/97] fs/coredump: prevent fsuid=0 dumps into user-controlled directories Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 70/97] rapidio/rionet: fix deadlock on SMP Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 71/97] Input: ati_remote2 - fix crashes on detecting device with invalid descriptor Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 72/97] MAINTAINERS: Update mailing list and web page for hwmon subsystem Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 73/97] ocfs2/dlm: fix race between convert and recovery Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 74/97] ocfs2/dlm: fix BUG in dlm_move_lockres_to_recovery_list Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 75/97] clk: xgene: Add missing parenthesis when clearing divider value Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 76/97] ppp: take reference on channels netns Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 77/97] mdio-sun4i: oops in error handling in probe Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 78/97] net: Fix use after free in the recvmmsg exit path Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 79/97] ethernet: micrel: fix some error codes Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 80/97] misc/bmp085: Enable building as a module Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 81/97] net/mlx5: Make command timeout way shorter Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 82/97] ipvs: correct initial offset of Call-ID header search in SIP persistence engine Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 83/97] ath9k: fix buffer overrun for ar9287 Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 84/97] mtd: map: fix .set_vpp() documentation Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 85/97] ARM: OMAP3: Add cpuidle parameters table for omap3430 Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 86/97] rtc: vr41xx: Wire up alarm_irq_enable Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 87/97] sunrpc/cache: drop reference when sunrpc_cache_pipe_upcall() detects a race Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 88/97] ipv4: fix broadcast packets reception Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 89/97] lpfc: fix misleading indentation Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 90/97] ASoC: s3c24xx: use const snd_soc_component_driver pointer Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 91/97] kbuild/mkspec: fix grub2 installkernel issue Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 92/97] nbd: ratelimit error msgs after socket close Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 93/97] paride: make 'verbose' parameter an 'int' again Kamal Mostafa
2016-04-04 23:26 ` [PATCH 3.13.y-ckt 94/97] ppp: ensure file->private_data can't be overridden Kamal Mostafa
2016-04-04 23:26 ` Kamal Mostafa [this message]
2016-04-04 23:27 ` [PATCH 3.13.y-ckt 96/97] drivers/misc/ad525x_dpot: AD5274 fix RDAC read back errors Kamal Mostafa
2016-04-04 23:27 ` [PATCH 3.13.y-ckt 97/97] perf stat: Document --detailed option Kamal Mostafa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1459812421-933-96-git-send-email-kamal@canonical.com \
    --to=kamal@canonical.com \
    --cc=kernel-team@lists.ubuntu.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=pawel.moll@arm.com \
    --cc=sboyd@codeaurora.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox