Received: by 10.213.65.68 with SMTP id h4csp2093820imn; Thu, 5 Apr 2018 08:52:58 -0700 (PDT) X-Google-Smtp-Source: AIpwx49B2HMY3FvUNy4t27gjOws595gi0X9m1n7xwBrGWJkHrlgTN+gaG5kRacfLMcFCjRvWAzEe X-Received: by 2002:a17:902:aa48:: with SMTP id c8-v6mr22840680plr.361.1522943578525; Thu, 05 Apr 2018 08:52:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522943578; cv=none; d=google.com; s=arc-20160816; b=NvQxRucxUffefc1SqorpWZaciAKS9N8nP6zkAJk6MUQ4quc5RjcgKhY6EaGUbfu69x blQElaolEN50b2wNTt70LTDTEnGLWdjWH6sz2slyJehDnmu+nthrx3B5rj/VUCdChuva s+zZWmnaLh7CYb8O4v8S4BYlhZz4mUGIEb8TKChWfA7ZsjPrsgc2RsX445p2awtVBcHP IszQA6fwjbJl7whQiB0DrW9NvmJJ9g0GcP6QGB6XNLDcLUk+iTelS2pl/a31iUpnH5Z3 SgcB8v1HV8oVsoCYAPj9mAauro4gX60NQCQcS/NAVxE7oVR1OLYqZN9zNVlGeBgWw+ih NHzQ== 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=gu2QJheWE7GeOtQnw6JsN72naW8Xg/R4fd50C+3GCuY=; b=Nwo7hjS8bBmE5q3IjnaUGk1KWJm960FbnLZPWtrHZlZ4I0aJcWISysVzk1OFFa6w20 mf8yrnlKmNGJ7mtfs48u45514UELjkrpP2Kb0H6QVyJI+5OWX95JgS2lLBDxGV+okLpV /0FRju1AY5l3cFuAtQCx+S1L+G379+x6whZkH2790EWIauePnm4ClfGGtI19qecobhIj VC79VFMtVhKcmzsp2OBmwirS0RZ3KYA8dx0+u0d75pni7JP+AEO8US9RZJ3jMZLhYPfa pUQfH2KamSZc5ROMwhemYftdN5RvmnkirZvBvjZkdNEf6pKx0TT0uKrFNc+0TXovgnDN fYNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=gzG6BJYy; 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 a7-v6si8374806plp.22.2018.04.05.08.52.44; Thu, 05 Apr 2018 08:52:58 -0700 (PDT) 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=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=gzG6BJYy; 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 S1751643AbeDEPvf (ORCPT + 99 others); Thu, 5 Apr 2018 11:51:35 -0400 Received: from mail-oi0-f52.google.com ([209.85.218.52]:34975 "EHLO mail-oi0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751352AbeDEPvd (ORCPT ); Thu, 5 Apr 2018 11:51:33 -0400 Received: by mail-oi0-f52.google.com with SMTP id z8-v6so23028877oix.2 for ; Thu, 05 Apr 2018 08:51:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=gu2QJheWE7GeOtQnw6JsN72naW8Xg/R4fd50C+3GCuY=; b=gzG6BJYy19sjfvuB6YFBg21lojcrY9om14rpSDiQy2AneJH//ZXHGzULS9T4SRZ40O S8m2cbtIU9dwFhwBghZU+LfawYjcR4mPZG/Lf8bDzaKYvK0E3b5b8Pe/91piFHhCLuvb G6ywIv+dt3oCx19JfCP7tfXoSgfTS2HzMxDboM38NG9mt013iQQbIICEc0CJ0S8vjcXm CIfvIC931OkrnsVgGaOUWrn33JJCyFKwxzawtnKN+is6r8eT3KR9cd6hoNQKXfmzO9ds PkkPxIdUBZSDoDX9ck7hqcp7gBrPVpm+ODDHU/96a5YaTF0ZiJ+W4IzN2/rxEUF4cSZR GlOw== 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=gu2QJheWE7GeOtQnw6JsN72naW8Xg/R4fd50C+3GCuY=; b=t4rvlzVjtHugLLonEC9Tg+0A++G0lUFiSq1HLv0YKmwPVDnQR3CYaniCQ5PDH0Rk37 4vQDYrpMzbbKYUKVHVBFM43FbIpSr6DHZPfvHs7ylZl1G5DdL/3aLQ1s7dBPne049Vjf pHLCkrKtTb48JxBfTuSZVavbzRE0vrg+fGNeEOZ4yIUbYMg7O1C/0r6eV5KFrJ+CjqsN McxMDhb8ihHQkEQFetyldp/03LQAAuxrIQacfRVeWh5BIkwWlcSR997tOPxnW4PSHR9Q 0+oE1CLX55cCx3tDvo9CmYQPgeYbU0eDXkHQj7I3uVnuyRppzs/2Vo/NMtdYa+qc1VHA r6EA== X-Gm-Message-State: ALQs6tC4osGjVVkEYiZn2SAR9Wm+iRKn55mUv/I+JyIFawTytW6MHvdj tWVYWJYMN8ZGZkWeKZQ6g5JRYynFq4eRN+OuwRahVg== X-Received: by 2002:aca:2b16:: with SMTP id i22-v6mr13854280oik.157.1522943492862; Thu, 05 Apr 2018 08:51:32 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:38e4:0:0:0:0:0 with HTTP; Thu, 5 Apr 2018 08:51:32 -0700 (PDT) In-Reply-To: <69bc0848-0698-b936-96a3-2257a5e27809@ti.com> References: <1515377863-20358-1-git-send-email-david@lechnology.com> <1515377863-20358-13-git-send-email-david@lechnology.com> <69bc0848-0698-b936-96a3-2257a5e27809@ti.com> From: Bartosz Golaszewski Date: Thu, 5 Apr 2018 17:51:32 +0200 Message-ID: Subject: Re: [PATCH v5 12/44] clk: davinci: Add platform information for TI DA850 PSC To: Sekhar Nori Cc: Michael Turquette , David Lechner , linux-clk , devicetree , Linux ARM , Stephen Boyd , Rob Herring , Mark Rutland , Kevin Hilman , Adam Ford , Linux Kernel Mailing List 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-04-05 16:36 GMT+02:00 Sekhar Nori : > On Thursday 05 April 2018 07:14 PM, Bartosz Golaszewski wrote: >> 2018-04-05 15:09 GMT+02:00 Sekhar Nori : >>> Hi Bartosz, >>> >>> On Friday 09 February 2018 10:18 PM, Michael Turquette wrote: >>>> On Fri, Feb 9, 2018 at 8:22 AM, Bartosz Golaszewski wrote: >>>>> 2018-01-08 3:17 GMT+01:00 David Lechner : >>> >>>>> Hi David, >>>>> >>>>> I've been working on moving the genpd code from its own driver to the >>>>> psc one. I couldn't get the system to boot though and problems >>>>> happened very early in the boot sequence. I struggled to figure out >>>>> what's happening, but eventually I noticed that psc uses >>>>> CLK_OF_DECLARE() to initialize clocks. The functions registered this >>>>> way are called very early in the boot sequence, way before >>>>> late_initcall() in which the genpd framework is initialized. This of >>> >>> late_initcall() is too late for genpd to be initialized. As you may have >>> seen with the latest set of patches, we have problems with timer >>> initialization. After converting to platform devices, PSC and PLL clocks >>> get initialized post time_init(). We are working that around using >>> fixed-clocks, which hopefully will work (I still need to test many of >>> the affected platforms). >>> >>> Can you please reply with the exact issue you faced with genpd framework >>> initialization so we do have that on record. >>> >> >> The exact issue manifested itself in a NULL-pointer dereference panic >> when I tried moving the genpd code I had initially implemented as a >> separate platform driver to what I believe was v6 or v7 of David's >> series (before the psc driver became a platform driver, when it was >> still using CLK_OF_DECLARE()). When I had tested a simple conversion >> of that version to a platform_driver, genpd worked fine. >> >> I don't have the stack traces from these panics, but I recall some >> debugfs functions being involved and the genpd late_initcalls are >> related to debugfs. Looking at it now I don't see how exactly it could >> fail though. > > Do you have the code where you faced the problem stashed somewhere? I am > not (yet) advocating going back to CLK_OF_DECLARE(). But there is a > definite issue with timer being ready when not using CLK_OF_DECLARE(). > So, I want to make sure there the reason why we are going down the > platform device path is a amply clear. > > Thanks, > Sekhar Yes, you can still find it on my github[1]. Bart [1] github.com:brgl/linux.git topic/davinci-genpd-final-v2