Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1029174imm; Wed, 8 Aug 2018 09:32:32 -0700 (PDT) X-Google-Smtp-Source: AA+uWPy5Cx1U3lD5NRHSQ/1BSETZd6T/DYjidXGiTcyleMjnywka9ZWcltgN4sDwzlD9Fc/Pdqy3 X-Received: by 2002:a62:8559:: with SMTP id u86-v6mr3786622pfd.32.1533745952440; Wed, 08 Aug 2018 09:32:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533745952; cv=none; d=google.com; s=arc-20160816; b=gXLnhGwgt7LLbms6zVljwqhiqQQio6qRUmM63EdVZ1yihYLdsLctflneCVEWubN8TU Ya0ojqcC5ZKdwj00LZwGsgQeXfwW6cNsk2O7YqRaYs41GdIB2jDd46Qpr+gxOGVtpzs6 Sx4xKQrtR87tEK4XsT/KHq3BVwmVdnv4Fpo4Kmi6y7/pjuybNPKBHc/hW5U6wNn1HSd7 PmS+MgHAANRldFEcjg68hfz1MVuV2N6U4kiIo/Up5FQbYqZqdNVp1ep3Txak74xqtk0t Xu6PPG5GCQpOGO9KpZeNOy/5+dmMSGkFSvEpHpkzu82Vyby1Cn7d1uLc0FW1Rv3YVW+Q An6A== 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=hh0LsN1BucTaVxY6Jhcaq3BSVyOj2qSRqX2sYKeZLhE=; b=LFadi8+3wRbC9D/xA1aSesE6iI7w5NSYjzTNPIDD0U67B5abOXh1P3PeSlnqyNqhD9 4ehNzKfVRkPUW5nry5cGqQerdkGf65NDyuv76F8SIMdL8KG92CNbGSc3G3nYrqos7tes eM+FHq8glyjUdzMAeN4ILKi1PfnFrkrVa32wjLb2WfnE4zRajAtmFbxK6wvUvOCIp2Rg 2SqNoQ06qrcconcyIg9ejK1SLdICcrqPtrdkri+LSFANzPzIa9K8yccCaOzsviWvpDSx g7nl6NYKIDdOB8MAbnfaPKWZr8KeiqW//Q5LecvOIha4jXnNDphHAjcrpN0e/0KzMWnm evBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=Kxx81N3l; 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 r21-v6si4590270pgi.690.2018.08.08.09.32.17; Wed, 08 Aug 2018 09:32:32 -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=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=Kxx81N3l; 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 S1728711AbeHHSvW (ORCPT + 99 others); Wed, 8 Aug 2018 14:51:22 -0400 Received: from mail-oi0-f66.google.com ([209.85.218.66]:43285 "EHLO mail-oi0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727337AbeHHSvW (ORCPT ); Wed, 8 Aug 2018 14:51:22 -0400 Received: by mail-oi0-f66.google.com with SMTP id b15-v6so4743810oib.10 for ; Wed, 08 Aug 2018 09:30:55 -0700 (PDT) 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=hh0LsN1BucTaVxY6Jhcaq3BSVyOj2qSRqX2sYKeZLhE=; b=Kxx81N3ldnJ8QogcHmiwABcmZvo255w4w3waJgOk+CMKfEh0uWtpvGmbAz5s4GGlJF Qmn8W8zcxjD659qTKUIUH3ByYdabSpVVdcY6dbmRkGNYvkjqT4hO6KR81ieVOt1YUsvf tRck1XykNt6qcX+JHdJe7Sln2Mw4ugBF/HDkn+naRIq1hwc3rmkWc+FDEPgiERD/qKc0 UTYgrHFss3PXr1+DKdXiX+ft5v3K26PdYgG6f2UdVKJ74PbpLtP0e7wummxIFEaJL/yy IczqrI4cTHDXuZnXzmoL+QO1MmE+lhkhKPIeG9+V9vteo9+Mm+5fYQ6dlsDwrkNkXFQV Vhyw== 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=hh0LsN1BucTaVxY6Jhcaq3BSVyOj2qSRqX2sYKeZLhE=; b=MoNYwJqkKg6pnOHXMvyChes0A5Spej+1OqLHXr28OQimKcmhLSOIllBvTUw3zYHwbX aMs08IDuA9TevOQmLf832cI8XMJVyL9fAf7jqwqZRlZ6/rvOUC8WLQCgpvpepRKzJFst 7Wk70ux3h6tHLvenjZogLsFMKKTKJf6KvP5gK1RuYSh8dnr3CsysjIGC4gqqEsBr2WUT iGHqRZnt9fLDwOlhI3G6UvoyIEX1ObxJN8wc5S+3Csh6eep+XZLRFt/v5AofB2ZSDO0M O7HO7l2Rd7Rh3VtnoKYFPJOz9OHAaNx2oHD7pEVE992OQm8HY5VJ7/FKubds1UBpn0+r xqdw== X-Gm-Message-State: AOUpUlGXr25ucfbfw5Aa0PPTKgNnk810i+J+FVbMJg8gACLKTOaaKSef +7sMukcBycFphTpPfcs63caCFM0W9ApflUoJl0v4yA== X-Received: by 2002:aca:45c3:: with SMTP id s186-v6mr3390752oia.289.1533745850144; Wed, 08 Aug 2018 09:30:50 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ac9:2c03:0:0:0:0:0 with HTTP; Wed, 8 Aug 2018 09:30:49 -0700 (PDT) In-Reply-To: <20180808161353.GF7275@lunn.ch> References: <20180808153150.23444-1-brgl@bgdev.pl> <20180808153150.23444-4-brgl@bgdev.pl> <20180808161353.GF7275@lunn.ch> From: Bartosz Golaszewski Date: Wed, 8 Aug 2018 18:30:49 +0200 Message-ID: Subject: Re: [PATCH 03/28] nvmem: add a notifier chain To: Andrew Lunn Cc: Bartosz Golaszewski , Jonathan Corbet , Sekhar Nori , Kevin Hilman , Russell King , Arnd Bergmann , Greg Kroah-Hartman , David Woodhouse , Brian Norris , Boris Brezillon , Marek Vasut , Richard Weinberger , Grygorii Strashko , "David S . Miller" , Srinivas Kandagatla , Naren , Mauro Carvalho Chehab , Andrew Morton , Lukas Wunner , Dan Carpenter , Florian Fainelli , Ivan Khoronzhuk , Sven Van Asbroeck , Paolo Abeni , Alban Bedel , Rob Herring , David Lechner , linux-doc , LKML , arm-soc , linux-i2c , linux-mtd@lists.infradead.org, Linux-OMAP , netdev@vger.kernel.org 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-08-08 18:13 GMT+02:00 Andrew Lunn : > On Wed, Aug 08, 2018 at 05:31:25PM +0200, Bartosz Golaszewski wrote: >> From: Bartosz Golaszewski >> >> Add a blocking notifier chain with two events (add and remove) so that >> users can get notified about the addition of nvmem devices they're >> waiting for. >> >> We'll use this instead of the at24 setup callback in the mityomapl138 >> board file. > > Hi Bartosz > > What context is this notifier chain called in? > > I did something similar using the i2c notifier to try to work around > the impending disappearing of the setup callback. But i got lockdep > splats, because the notifier was called while some locks were being > held, so it was not possible to register other i2c devices. > > The at24 setup callback is done as part of probe, so no important > locks are held. Are any locks held when this notifier chain is called? > > Thanks > Andrew In the case of at24 it would be called from at24_probe() -> nvmem_register() in process context. Would you mind testing it? Would be great to see if it works on multiple setups. Bart