Received: by 10.223.185.116 with SMTP id b49csp7168510wrg; Thu, 1 Mar 2018 00:38:09 -0800 (PST) X-Google-Smtp-Source: AG47ELtYLRJP8Pav19m09HAta3FHXlROdf0laubi6YSkAltJgrc/8ozqW70jOU0Rzgh8o+DHx92a X-Received: by 10.99.189.1 with SMTP id a1mr908458pgf.189.1519893489543; Thu, 01 Mar 2018 00:38:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519893489; cv=none; d=google.com; s=arc-20160816; b=gSzJrmxwr8aDin68b5ShgkgVE/IsdeBF6WCRL69BpLBaO5cPA0aYbdALIe8bkJ3pJF 7mP0uj7MWr4eK/DcMTA9BEZduBSgJjy0gNhVKdXTxVkkanpGNsYj27I3OkbpiVPxKg+e Y3nRZYV/RbNt4WxjMvdvP/elEq/xTh19Afmax5i3mairCKy9ElIz2ZSdrAau3XXZMb08 E7dLTCxFLJxXhXJFQkTjQndqQ9yprRoqnL1DejMtxBuE24eIrbJTpXolkZW3yUpcAJWb 1cuA5yOTCj9wEL5UQM6P0q5YxhrKpW9i5+B5qLp3IMn15r4bm3wwipaEboBeS0w0zomd 0vYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=9+eeSpH142dHN4ixmk+0uf6Iq0cR47Hhg3DOnz4rVp8=; b=ZB5mgHynaXaCnrG+Eu4MiUnhW9s1l4mS83dgxFP51adZCB2rzkg8Fg9J9scoc3dg3v /dTSF+metc6+hrAF31SHVDtHtecAlGboiHHppal2UOT6hH08MLAhiehQHcyuKUnpKsUx 7phYR3v9FjDiHt6sryhms9K5ZQims7BkdgoOgb0G6h57Z27OhHsoBfXQp6dqku2RLBRW B9gBf6Mem5IuRaWqERXcbULf2dHQVCmo8a1SUbiiJ/jjNm6iQifkZ+5kFQcViH2eGqPE XhAN3hT2Wn7cvOw42h02T7pulUIyDZYfbwQwbhPfNlIUTVmA22xgV56+aZPRhpOx4cHT U3ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=Z1YWDHKO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t11-v6si2744811plr.411.2018.03.01.00.37.54; Thu, 01 Mar 2018 00:38:09 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=Z1YWDHKO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965670AbeCAIgR (ORCPT + 99 others); Thu, 1 Mar 2018 03:36:17 -0500 Received: from mail-ot0-f179.google.com ([74.125.82.179]:43141 "EHLO mail-ot0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964996AbeCAIgP (ORCPT ); Thu, 1 Mar 2018 03:36:15 -0500 Received: by mail-ot0-f179.google.com with SMTP id m22so4840292otf.10 for ; Thu, 01 Mar 2018 00:36:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=9+eeSpH142dHN4ixmk+0uf6Iq0cR47Hhg3DOnz4rVp8=; b=Z1YWDHKOSHpSgo9+cSQEnbGnAFGnT6c/1R7db9suArm2W4Jt7LSyT5IyqMwDyRWXYw 8GxbVNxa0gf1tPPuyNDq6Te33/KdjTnug3HY0dIbwm2O2r/NmtTKuH2d8phvpU+ZMOG6 SOL+J3KWZNaQzLXD8r3qbL8qsM+5ua3CH+m5Pc1551KaRSliZlJEGlUwN2ZW0VvZwaCH H2oHv/atdIybaFAfd0DyNRXg3i/VlcoAG9DZK6jIScwwrh9SqyZkYaF9zjYBvHAjaKxG 28siZ5zZEy4WHbgQG0mxFK8wUEIQqS8z3eQ+ucq3Ah347o36c7jgGsxOqIiPsq8w1cZz qGQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=9+eeSpH142dHN4ixmk+0uf6Iq0cR47Hhg3DOnz4rVp8=; b=ibMucqpKGvMXUISjWbKTaKq2PhzeuV+9eLNFIpw0ydUuBquC06WEv1I8wQGzBJFn7i hVeCrGEBRU6mHqkmT2sasMk1Dj76zkHyCkH12cV0Seb8LRaMSldBRRfOmOmBdYQ3oPaJ DSKcaM52QOd+Dr6oBpXUxYIwDG3YA78P8XukAQ0OkLL1GUKkX++vIXyi/HdpRfV+iPHb WOLFyODHYn5ZV2mih1zgUxsWKu/wEad2F77+/xLPH9sPdfltIYtZrTgYv1f9PdoXqIjw 3nCK1NtqvJdJuhE4MC+ej+2LKUYdnKCT38YXgm/x5jaKX+H/ygURupuZllUOzI8YsnXw JDag== X-Gm-Message-State: APf1xPAPoD+UCy8f0/HAm8n5suKFksC4ld/91ewi84RFaXrwCwskpBFc nG+l+FgyyDV9TKeA81MpeoFVFRBZ4sSh9J7DY/qe8w== X-Received: by 10.157.76.133 with SMTP id m5mr658745otf.179.1519893374440; Thu, 01 Mar 2018 00:36:14 -0800 (PST) MIME-Version: 1.0 Received: by 10.74.100.9 with HTTP; Thu, 1 Mar 2018 00:36:14 -0800 (PST) In-Reply-To: <93696fc8-bb93-aa20-3506-3d7216c17cd2@lechnology.com> References: <1519071723-31790-1-git-send-email-david@lechnology.com> <1519071723-31790-11-git-send-email-david@lechnology.com> <93696fc8-bb93-aa20-3506-3d7216c17cd2@lechnology.com> From: Bartosz Golaszewski Date: Thu, 1 Mar 2018 09:36:14 +0100 Message-ID: Subject: Re: [PATCH v7 10/42] clk: davinci: New driver for davinci PSC clocks To: David Lechner Cc: linux-clk@vger.kernel.org, linux-devicetree , arm-soc , Michael Turquette , Stephen Boyd , Rob Herring , Mark Rutland , Sekhar Nori , Kevin Hilman , Adam Ford , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2018-02-28 22:40 GMT+01:00 David Lechner : > On 02/28/2018 06:38 AM, Bartosz Golaszewski wrote: >> >> >> I think I found the reason for the strange crashes we were >> experiencing (emac core->name being NULL) thanks to Sekhar who pointed >> me in the right direction. >> >> The mdio driver fails to probe with v7 due to the supplied clock rate >> being wrong. Before failing we register the emac clock with >> pm_clk_add_clk(). When clock_ops puts the clock, it decreases the >> reference count of the clock, but we never actually increased it in >> the first place in the line above. The core clock code then destroys >> the associated clk_core structure. When the next user comes around (in >> our case the clk debug functions) the system crashes. >> >> I believe there to be two issues: one is with v7 - we need to increase >> the clock reference count in davinci_psc_genpd_attach_dev(). >> >> Second is the error path in the clock framework - we should remove the >> destroyed clk_core from the debug list, which is not being done now. >> >> Why we even need to track the refcount of clk_core is a mistery for me >> though. Stephen, Mike? >> >> Best regards, >> Bartosz Golaszewski > > > Great find. I figured it had to be something like this, but I wasn't > able to reproduce the problem yet. > > I suppose it is time to spin up a v8 with some fixes. I still don't know why the mdio clock rate is much lower than in mainline though. Any ideas? Thanks, Bart