Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4558948imm; Tue, 11 Sep 2018 13:58:24 -0700 (PDT) X-Google-Smtp-Source: ANB0VdayVQ2KM1EYdLMSdIQ+LGnDz7kIOuHCXZ4OI+k0ejJ6ohZnKHqakGf3c9f2i6AVH8XPBYqX X-Received: by 2002:a17:902:9a8a:: with SMTP id w10-v6mr28637067plp.14.1536699504243; Tue, 11 Sep 2018 13:58:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536699504; cv=none; d=google.com; s=arc-20160816; b=LCoQRXTJ4+xqGQEemjYrFZgLMT2T4Id2DY+MUqlxd9gV6OemzNz0KQt+hzbcrd+p2Y 5LtUzRQPwJVjypFpMl+zsERmPz/C7WhqbXwmcEdbl7tY8B+eHzY1mThTjZ6qcUjTNZi1 LMGY8cAl7ms31cchMbfYz90ne8VYQVYlRBroDMxYDfNkU8ul+qgwYe55slXJevUGA//f byE68EuxA6DJBKlCIMLPXk9OEqL9DtHrwHn0dk/42I9AXugd+xg0ia3DSZTNkOmrB79J ril7V7DJ5rN7SNkQ78ffpAMRPq8BPDtwgVO8trHt8jDq8hNJmuraQ2yhGiogLAJV9UeQ m/Eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:dkim-signature; bh=mZ5jfq3XrY24i2zwuiQ23jzkFXBQZwWmS0gSCYdf0kU=; b=MIjKzbdWGI0AYUWS4YLgeI4uS4i6qFjNCqWGAJ0tdN2pLdMMLsWSnwuNxbQhd5jePd zDQRMQlg+Jond9lzxH8mr5JWO8M8jCoJWEaYGeVojcsCn3zyV8NSK4vF5vFry6tRRH/W z3hX4ZY0325XDtaCEk+A00ThbEElT6SgR5yj6zM3vX9XEBd3e+TQ8Y+kBVyres2z8cs9 lcSLJxTRpgnw0ICrGi78FEc8GtWRhCFx5a6a84091Lh5vIhccvtClIOAtHHEgzTWOjYi ktiYE4euexYA8hCoYvxGPK3nXm5GJ5oXWIA2Vdw3PAHaN0xkrJLK1430zHihhYnpgjZ1 QThA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=f1wB7WWz; 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 b10-v6si21950979pgi.416.2018.09.11.13.58.08; Tue, 11 Sep 2018 13:58:24 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=f1wB7WWz; 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 S1727721AbeILB6x (ORCPT + 99 others); Tue, 11 Sep 2018 21:58:53 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:43076 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726850AbeILB6x (ORCPT ); Tue, 11 Sep 2018 21:58:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:To: Subject:Sender:Reply-To:Cc:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=mZ5jfq3XrY24i2zwuiQ23jzkFXBQZwWmS0gSCYdf0kU=; b=f1wB7WWzQkBZH8tfnxcmoDPZ3 SOkdkrEZwem6OH9vX0maKlq/H7ch7jHeoMqLDS5Pu2Ga2uTWD6unPjIR8/Pxh8NDfA8ylPf9njAPu vNs5OE5D9lsOL9meZjAA4aM/xl2G/g/IZRstGznta1ODAUlVmWSWHx9fh5A9w5h5hPCISRRAv5deb vmcwliKu7AyYBF9545FcrlbQL1iFvT0d9w0iuE5eonthdpgAxg0EmCh9Rt0kd17kOX1U2cJl5OBFN QRCDYZPTTKgocX64FYeGkJPw4/M6l+aU3yQ8cZCwgHep8rgoxcmwZFnuwY3UdVbwhw/cYRw3ByuQB //JTMuUVA==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=midway.dunlab) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fzpjI-0007Wo-0c; Tue, 11 Sep 2018 20:57:48 +0000 Subject: Re: 4.19-rc[23] iwlwifi: BUG in swiotlb To: Johannes Berg , LKML , linux-wireless , linuxwifi@intel.com References: <0c5e53e5-2afa-8d38-0b48-272c670c4bc5@infradead.org> <1536651177.3224.106.camel@sipsolutions.net> From: Randy Dunlap Message-ID: <8bea4cfc-4b16-7c7c-3e9a-5b6684b47345@infradead.org> Date: Tue, 11 Sep 2018 13:57:45 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <1536651177.3224.106.camel@sipsolutions.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/11/18 12:32 AM, Johannes Berg wrote: > On Mon, 2018-09-10 at 19:17 -0700, Randy Dunlap wrote: >> Hi, >> >> Any ideas? > > Hmm. Is this new? I can't be sure. I've been having problems booting this laptop for a few weeks now but haven't tracked it down yet. >> 2018-09-10T18:47:54.532837-07:00 dragon kernel: [ 31.472371] kernel BUG at ../kernel/dma/swiotlb.c:521! > > nslots = ALIGN(size, 1 << IO_TLB_SHIFT) >> IO_TLB_SHIFT; > [...] > BUG_ON(!nslots) > >> 2018-09-10T18:47:54.613655-07:00 dragon kernel: [ 31.490325] swiotlb_alloc+0x88/0x170 >> 2018-09-10T18:47:54.613656-07:00 dragon kernel: [ 31.490329] ? __kmalloc+0x1cc/0x200 >> 2018-09-10T18:47:54.613657-07:00 dragon kernel: [ 31.491652] iwl_pcie_txq_alloc+0x1d4/0x3b0 [iwlwifi] > > There are two calls to dma_alloc_coherent() here, should those even hit > swiotlb? The sizes of those should be > * 256 x 128 (32k) > * 32 x 256 (8k) [TFH, unlikely to be the case here] > * 256 x 256 (65k) [TFH] > * 32 x 64 (2k) > * 256 x 64 (16k) > > > IO_TLB_SHIFT is 11, so we get 2k alignment, so even the smallest size > (32*64) should result in nslots being 1? > > In fact, unless the driver passed *ZERO* as the size, this should never > happen (hence the BUG_ON), since ALIGN() would take care of rounding up > any smaller allocation here. > > Presumably you can reproduce this pretty easily (and I don't know what > specific model of NIC you have etc.), so perhaps you can do something > like this? The wireless NIC is Condor Peak: 04:00.0 Network controller: Intel Corporation Centrino Wireless-N 1000 [Condor Peak] Subsystem: Intel Corporation Centrino Wireless-N 1000 BGN Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+ Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- https://p.sipsolutions.net/aa0dccd7a60fe176.txt but with that patch, it just hangs after about 25 seconds of booting (slow hard drive, not SSD). I'll try some other ways. -- ~Randy