Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp652243yba; Thu, 16 May 2019 06:57:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqxc0RXIpkLpF4En5NlZ6orrWWK9wVfg8sRMcv/lIIZZZsR+W85HDFYVNXw+QZ3JzctMcrLJ X-Received: by 2002:a17:902:9f85:: with SMTP id g5mr44901829plq.29.1558015076742; Thu, 16 May 2019 06:57:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558015076; cv=none; d=google.com; s=arc-20160816; b=DAgLATlsqk/7Pbg/wSkcjJzJZQxksdW6QGTDzGWl0BNn319HPa5LRiSVuo1lmYVKlW j1QOzxXwU7sNdZvFb0L7SUtSQvNx9I8eHWEq3alSjt3HCpAvG+67eHqKw6m58LQcPt3H I/sWvOCJG2hBIZTJheb96AoB5R7OJeidE1x0AeGsKtrhauqVFyUqtcrdq37tb9OLTHhv DVRv0NUFWEeJ0sv0fV/QfTduWreOpyUfTqMGBNA8jJhxGCoHgPZruu3wQ0TgywLu2lsj JA3wv5LTAz+T+4x4FqGoQ92IOnAEUWIv1k828jqwRQCdhn8XSOCNSnKjilWR2VGIc5GI N4Jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=WXvpPJ2T9Cmzw8nSZ57KlY5Xtu8L9S4Oq+NyeGepk/0=; b=ecqUR3BkYiUk2Pk5ylWqeWmEi76pmCpab9Y5Zo7jFIGm5OfzSkmoeNe6vdXIidG7ZZ IGQ1bjn8RqaABymScP7VH9RIqU5cNg8SUUkn1ffj+4Hottx+dS9rr9jjLhlJ4GJwdOnQ n99XG41e9jaESPw1ggIqvAvD1NZd46zUz4On/H/PmYoTUy8YWUlfXs7Ryl11jlZRRE0X AwYRPwMDqsHjNXW2a8VtddP9PkIgQuazo0YMjtxYmwC8XN59KWq9/ovge8Wi2brlhIyL 5spp0OK2x3sGkFmdccA8PePyEeFvceEPkUTfdI+/vIJgPhkEl4RgX41OQ/OH32D3eMUT vo3g== ARC-Authentication-Results: i=1; mx.google.com; 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 b74si5574633pfj.121.2019.05.16.06.57.41; Thu, 16 May 2019 06:57:56 -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; 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 S1727627AbfEPNyu (ORCPT + 99 others); Thu, 16 May 2019 09:54:50 -0400 Received: from pio-pvt-msa3.bahnhof.se ([79.136.2.42]:55164 "EHLO pio-pvt-msa3.bahnhof.se" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726769AbfEPNyt (ORCPT ); Thu, 16 May 2019 09:54:49 -0400 X-Greylist: delayed 441 seconds by postgrey-1.27 at vger.kernel.org; Thu, 16 May 2019 09:54:49 EDT Received: from localhost (localhost [127.0.0.1]) by pio-pvt-msa3.bahnhof.se (Postfix) with ESMTP id 5EC873F38D; Thu, 16 May 2019 15:47:27 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at bahnhof.se X-Spam-Flag: NO X-Spam-Score: -2.9 X-Spam-Level: X-Spam-Status: No, score=-2.9 tagged_above=-999 required=6.31 tests=[ALL_TRUSTED=-1, BAYES_00=-1.9] autolearn=ham autolearn_force=no Received: from pio-pvt-msa3.bahnhof.se ([127.0.0.1]) by localhost (pio-pvt-msa3.bahnhof.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JVcPQQ_ePVLB; Thu, 16 May 2019 15:47:27 +0200 (CEST) Received: from localhost (h-41-252.A163.priv.bahnhof.se [46.59.41.252]) (Authenticated sender: mb547485) by pio-pvt-msa3.bahnhof.se (Postfix) with ESMTPA id 60D9F3F4C2; Thu, 16 May 2019 15:47:26 +0200 (CEST) Date: Thu, 16 May 2019 15:47:25 +0200 From: Fredrik Noring To: Laurentiu Tudor Cc: Robin Murphy , "hch@lst.de" , "stern@rowland.harvard.edu" , "gregkh@linuxfoundation.org" , "linux-usb@vger.kernel.org" , "marex@denx.de" , "JuergenUrban@gmx.de" , Leo Li , "linux-kernel@vger.kernel.org" Subject: Re: [RFC PATCH v2 0/3] prerequisites for device reserved local mem rework Message-ID: <20190516134725.GA53952@sx9> References: <20190514143807.7745-1-laurentiu.tudor@nxp.com> <9d34015d-c219-179b-3141-4b0de3530ac3@arm.com> <20190514182931.GA2559@sx9> <0e5f3b86-7a80-eec7-691b-34a123194208@nxp.com> <20190515162858.GB17162@sx9> <0fea5fa7-e2b0-b34d-3bf8-976007df2dc2@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <0fea5fa7-e2b0-b34d-3bf8-976007df2dc2@nxp.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Laurentiu, > > The kernel oopses with "unable to handle kernel paging request at virtual > > address 000aba0b" in hcd_alloc_coherent via usb_hcd_map_urb_for_dma. > > By any chance, does this address looks like the dma_addr that the device > should target? Yes, that looks like a typical device address suitable for its DMA. > Actually, I think I'm misusing genalloc and also it appears that i need > to add a mapping on the phys address. So my plan is to change the > "unsigned long virt" to be the void * returned by the mapping operation > and the phys_addr_t be the dma_addr_t. I'll return with a patch. Great, I'm happy to test your next patch revision. Fredrik