From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755845AbcLASSu (ORCPT ); Thu, 1 Dec 2016 13:18:50 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:35268 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752165AbcLASSs (ORCPT ); Thu, 1 Dec 2016 13:18:48 -0500 Subject: Re: [PATCH] mtd: Allocate bdi objects dynamically To: Brian Norris References: <1470319275-9465-1-git-send-email-Sandeep_Jain@mentor.com> <20161103113421.GA4873@mentor.com> <4055a3ed-c024-4c29-45e1-e600cdc5902e@gmail.com> <20161129081204.GA6617@mentor.com> <2339c911-3399-e69b-aabc-f7d57d26af7d@gmail.com> <20161201181400.GA68619@google.com> Cc: Sandeep Jain , Richard Weinberger , Steve Longerbeam , LKML , Jim Baxter , "linux-mtd@lists.infradead.org" , David Woodhouse , Cyrille Pitchen From: Marek Vasut Message-ID: <0119eedd-8fb5-8b63-8e70-075182af72ae@gmail.com> Date: Thu, 1 Dec 2016 19:18:46 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.4.0 MIME-Version: 1.0 In-Reply-To: <20161201181400.GA68619@google.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/01/2016 07:14 PM, Brian Norris wrote: > On Thu, Dec 01, 2016 at 04:39:23PM +0100, Marek Vasut wrote: >> On 11/29/2016 09:12 AM, Sandeep Jain wrote: >>> On Sat, Nov 05, 2016 at 08:22:31AM +0100, Marek Vasut wrote: >>>> On 11/03/2016 12:34 PM, Sandeep Jain wrote: >>>>> On Sat, Sep 17, 2016 at 04:41:47PM +0200, Richard Weinberger wrote: >>>>>> On Thu, Aug 4, 2016 at 4:01 PM, Sandeep Jain wrote: >>>>>>> From: Steve Longerbeam >>>>>>> >>>>>>> The MTD backing dev info objects mtd_bdi was statically allocated. >>>>>>> So when MTD is built as a loadable module, this object fall in the >>>>>>> vmalloc address space. >>>>>>> >>>>>>> The problem with that, is that the BDI APIs use wake_up_bit(), which calls >>>>>>> virt_to_page() to retrieve the memory zone of the page containing the >>>>>>> wait_queue to wake up, and virt_to_page() is not valid for vmalloc or >>>>>>> highmem addresses. >>>>>>> >>>>>>> Fix this by allocating the BDI objects dynamically with kmalloc. The >>>>>>> objects now fall in the logical address space so that BDI APIs will >>>>>>> work in all cases (mtd builtin or module). >>>>>>> >>>>>>> Signed-off-by: Steve Longerbeam >>>>>>> Signed-off-by: Jim Baxter >>>>>>> Signed-off-by: Sandeep Jain >>>>>> >>>>>> Reviewed-by: Richard Weinberger >>>> >>>> I don't see any obvious problem either: >>>> Reviewed-by: Marek Vasut >> >> Bump? > > Applied to l2-mtd.git. > Thanks ! -- Best regards, Marek Vasut