Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp829796imu; Fri, 4 Jan 2019 07:58:29 -0800 (PST) X-Google-Smtp-Source: ALg8bN4oGOhKsPMA6hbaytRr1YW3xbrkR9wgpEn9I5vqjo5bXXpaiy3ICKRtCS5VcF1I09rvPrSj X-Received: by 2002:a65:5387:: with SMTP id x7mr2114167pgq.412.1546617509180; Fri, 04 Jan 2019 07:58:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546617509; cv=none; d=google.com; s=arc-20160816; b=AkxSshERljKvTx4l9IiY+6Huve0dpFu3NRXPXY5+qvhJZCEbz0YZWdhy4oELU33O+B cD+8m6khdMT5lFwpvppqSF71ps4fhUxYs0s6URGZBulpa/8QDTMsdupsRNt7o50EfjjL icyMndh3VMNE3KNd6xW4DRwq6CbkxbI9moGn4rFhe1v9RV1Y2AWBCVjq6f2qL7HW1XRP dPUIzqxTfLBmE9+I9mbXvV24vqC814nyVvCN5wMCwXsD7todBsLtOC0s/7U7SezonGgd DFzTW/i8UZRD46QNffp1jMVS7R+Z96mjm5ph+x/K9mEAtrJd0njqIjAcjME/DSEYDGSX RYKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date; bh=8FcJh4D9uyAraCBOnLl6yTkOAZDyO8fA3jMMTUh23pY=; b=LFZARlO5NOl5AtoPea91zE+K9QDBkvHPJdWl626Q5kjwBZl7RbC56CpLuLA79SjMf0 08H2HxiEYiOInRNjPJyfp8ke1eK7e6nJ3MzcG0lWNCEnBwJlL6r3obAhhcG+IQioa5Rm Dh2qXFi/hi+8YEDfWnlvwdJEG33YFxWQpouA+beBCsSzMCMr07P+cmIvznjNPYrTPYcm CPYTmWemB3KevpuezHkLs6SLYy4uaKXw7Uk+NpJZ41jhkpxzkj/GrtjQ1/gdgzT+9nvs aYgBr2SlbnuJ8UphvHdFv2VFq5vws/VIdSfcaufZ203/w1mslgL8Ob0bkHM0/JeyzNor IfDQ== 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 a9si53086979plp.323.2019.01.04.07.57.58; Fri, 04 Jan 2019 07:58:29 -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; 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 S1726688AbfADM5i (ORCPT + 99 others); Fri, 4 Jan 2019 07:57:38 -0500 Received: from dliviu.plus.com ([80.229.23.120]:58004 "EHLO smtp.dudau.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726201AbfADM5i (ORCPT ); Fri, 4 Jan 2019 07:57:38 -0500 Received: from mail.dudau.co.uk (bart.dudau.co.uk [192.168.14.2]) by smtp.dudau.co.uk (Postfix) with SMTP id 9B94041230E7; Fri, 4 Jan 2019 12:57:35 +0000 (GMT) Received: by mail.dudau.co.uk (sSMTP sendmail emulation); Fri, 04 Jan 2019 12:57:35 +0000 Date: Fri, 4 Jan 2019 12:57:35 +0000 From: Liviu Dudau To: Christoph Hellwig Cc: Lorenzo Pieralisi , Bjorn Helgaas , Robin Murphy , linux-pci@vger.kernel.org, LAKML , LKML Subject: [REGRESSION, BISECTED] pci: nvme device with HMB fails on arm64 Message-ID: <20190104125735.GF20342@bart.dudau.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline User-Agent: Mutt/1.11.1 (2018-12-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Christoph, As I have mentioned to you after Xmas, I think your dma-mapping series breaks NVMe drivers that use HMB on arm64 (RK3399 NanoPC T4 board with Toshiba RC100 SSD in this case). The observed behaviour is that the modprobe of the nvme module will hang due to a kernel crash, which I've sent a patch for to the mm subsystem ("mm/vmalloc.c: don't dereference possible NULL pointer in __vunmap"), but that behaviour is triggered by the failure of the NVMe drive to access host memory buffers (error 24578, flags 0x1). Now that your series has been merged into Linus' tree, I've bisected it to this: bfd56cd605219d90b210a5377fca31a644efe95c is the first bad commit commit bfd56cd605219d90b210a5377fca31a644efe95c Author: Christoph Hellwig Date: Sun Nov 4 17:38:39 2018 +0100 dma-mapping: support highmem in the generic remap allocator By using __dma_direct_alloc_pages we can deal entirely with struct page instead of having to derive a kernel virtual address. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy :040000 040000 565ae62f55f04c11da2471bd59d1b0328273992d 40047c9ecf715f6f7e8293b335c1f16dd511a0e0 M kernel Note that the bisect was done on the mainline tree without any additional patches, as applying those makes the bisect process think that the culprit is the merging of the tracing changes. I haven't tried to revert the patch as it is clear that the following patch depends on it and also because during the bisect process one of the steps generated a kernel that failed to boot as it was missing your patch 9ab91e7c5c51 ("arm64: default to the direct mapping in get_arch_dma_ops"). I've marked that step as bad, as it was related to the series, but I might have been wrong there. The full bisect log is this: $ git bisect log git bisect start # good: [00c569b567c7f1f0da6162868fd02a9f29411805] Merge tag 'locks-v4.21-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux git bisect good 00c569b567c7f1f0da6162868fd02a9f29411805 # bad: [645ff1e8e704c4f33ab1fcd3c87f95cb9b6d7144] Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input git bisect bad 645ff1e8e704c4f33ab1fcd3c87f95cb9b6d7144 # bad: [02061181d3a9ccfe15ef6bc15fa56283acc47620] Merge tag 'staging-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging git bisect bad 02061181d3a9ccfe15ef6bc15fa56283acc47620 # bad: [f346b0becb1bc62e45495f9cdbae3eef35d0b635] Merge branch 'akpm' (patches from Andrew) git bisect bad f346b0becb1bc62e45495f9cdbae3eef35d0b635 # bad: [938edb8a31b976c9a92eb0cd4ff481e93f76c1f1] Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi git bisect bad 938edb8a31b976c9a92eb0cd4ff481e93f76c1f1 # good: [00203ba40d40d7f33857416adfb18adaf0e40123] kyber: use sbitmap add_wait_queue/list_del wait helpers git bisect good 00203ba40d40d7f33857416adfb18adaf0e40123 # good: [735bcc77e6ba83e464665cea9041072190ede37e] scsi: hisi_sas: Fix warnings detected by sparse git bisect good 735bcc77e6ba83e464665cea9041072190ede37e # bad: [af7ddd8a627c62a835524b3f5b471edbbbcce025] Merge tag 'dma-mapping-4.21' of git://git.infradead.org/users/hch/dma-mapping git bisect bad af7ddd8a627c62a835524b3f5b471edbbbcce025 # bad: [8ddbe5943c0b1259b5ddb6dc1729863433fc256c] dma-mapping: move dma_cache_sync out of line git bisect bad 8ddbe5943c0b1259b5ddb6dc1729863433fc256c # bad: [887712a0a5b31e0cf28087f6445de431b4722e52] x86/calgary: remove the mapping_error dma_map_ops method git bisect bad 887712a0a5b31e0cf28087f6445de431b4722e52 # bad: [b0cbeae4944924640bf550b75487729a20204c14] dma-direct: remove the mapping_error dma_map_ops method git bisect bad b0cbeae4944924640bf550b75487729a20204c14 # bad: [bfd56cd605219d90b210a5377fca31a644efe95c] dma-mapping: support highmem in the generic remap allocator git bisect bad bfd56cd605219d90b210a5377fca31a644efe95c # good: [704f2c20eaa566f6906e8812b6e2115889bd753d] dma-direct: reject highmem pages from dma_alloc_from_contiguous git bisect good 704f2c20eaa566f6906e8812b6e2115889bd753d # good: [0c3b3171ceccb8830c2bb5adff1b4e9b204c1450] dma-mapping: move the arm64 noncoherent alloc/free support to common code git bisect good 0c3b3171ceccb8830c2bb5adff1b4e9b204c1450 # first bad commit: [bfd56cd605219d90b210a5377fca31a644efe95c] dma-mapping: support highmem in the generic remap allocator Does anyone have any suggestions on what I might try as a fix? Best regards, Liviu -- ________________________________________________________ ________| |_______ \ | With enough courage, you can do without a reputation | / \ | -- Rhett Butler | / / |________________________________________________________| \ /__________) (_________\