From: Randy Dunlap <rdunlap@infradead.org>
To: Johannes Berg <johannes@sipsolutions.net>,
LKML <linux-kernel@vger.kernel.org>,
linux-wireless <linux-wireless@vger.kernel.org>,
linuxwifi@intel.com
Subject: Re: 4.19-rc[23] iwlwifi: BUG in swiotlb
Date: Tue, 11 Sep 2018 13:57:45 -0700 [thread overview]
Message-ID: <8bea4cfc-4b16-7c7c-3e9a-5b6684b47345@infradead.org> (raw)
In-Reply-To: <1536651177.3224.106.camel@sipsolutions.net>
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- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 31
Region 0: Memory at c2600000 (64-bit, non-prefetchable) [size=8K]
Capabilities: [c8] Power Management version 3
Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [d0] MSI: Enable+ Count=1/1 Maskable- 64bit+
Address: 00000000fee0800c Data: 4162
Capabilities: [e0] Express (v1) Endpoint, MSI 00
DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <512ns, L1 unlimited
ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset+ SlotPowerLimit 0.000W
DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+ FLReset-
MaxPayload 128 bytes, MaxReadReq 128 bytes
DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <128ns, L1 <32us
ClockPM+ Surprise- LLActRep- BwNot- ASPMOptComp-
LnkCtl: ASPM L0s L1 Enabled; RCB 64 bytes Disabled- CommClk+
ExtSynch- ClockPM+ AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
Capabilities: [100 v1] Advanced Error Reporting
UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
AERCap: First Error Pointer: 00, ECRCGenCap- ECRCGenEn- ECRCChkCap- ECRCChkEn-
MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap-
HeaderLog: 00000000 00000000 00000000 00000000
Capabilities: [140 v1] Device Serial Number 74-e5-0b-ff-ff-2d-dc-28
Kernel driver in use: iwlwifi
Kernel modules: iwlwifi
sigh. I can reproduce it without the patch:
> 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
next prev parent reply other threads:[~2018-09-12 1:58 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-11 2:17 4.19-rc[23] iwlwifi: BUG in swiotlb Randy Dunlap
2018-09-11 7:32 ` Johannes Berg
2018-09-11 20:57 ` Randy Dunlap [this message]
2018-09-11 21:02 ` Johannes Berg
2018-09-16 9:34 ` Pavel Machek
2018-09-16 9:41 ` Pavel Machek
2018-09-16 9:55 ` Pavel Machek
2018-09-16 9:59 ` [PATCH] fix iwlwifi on old cards in v4.19 was " Pavel Machek
2018-09-16 10:12 ` [linuxwifi] " Grumbach, Emmanuel
2018-09-16 10:14 ` Grumbach, Emmanuel
2018-09-16 11:06 ` Pavel Machek
2018-10-07 0:44 ` Randy Dunlap
2018-10-07 0:56 ` Randy Dunlap
2018-09-16 22:27 ` Randy Dunlap
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8bea4cfc-4b16-7c7c-3e9a-5b6684b47345@infradead.org \
--to=rdunlap@infradead.org \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linuxwifi@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.