Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp867308imu; Mon, 5 Nov 2018 09:57:02 -0800 (PST) X-Google-Smtp-Source: AJdET5eNOYv8I2cGSt42390dAj71BURBdQ5lP1+5myhnpOe1bHhoyuO+i7SigrXFtG7GEI7muYl8 X-Received: by 2002:a63:63c3:: with SMTP id x186mr21036049pgb.330.1541440622376; Mon, 05 Nov 2018 09:57:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541440622; cv=none; d=google.com; s=arc-20160816; b=taKMLz97aiSaCHVMa0D+EkLqjPVZ6/WUSkB+d4dPsiFrHws/l6MGswj0DgxtxwRhlU r2MubGXAJQLaDZmb6jujpialMbrte1cpC64TcRpbfNd8sgQWvBGSs6tU9OEUC0F16Sf6 DqwLqX0r09B+G7Eni8gIKUcARtDdDkyzUw1BuD7L8kZoxOnHQvwl5AT0bq3DkX7mh7TT Q1EpPUPmJxwzs8LvMMe3zWjgwjyNR7M8s21AuT2QqUUq0jhMOkSe2MtkA8oYcsvnAPWz Yqflgv+Kc68aBd/OxsMMnjdILl3xMlwTN1DAewiNrr1FRsosxV/uS7lHcLjd5+zsKS7R FwwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature; bh=K6FhVTqVVUuW/ADxHVPs56HcvIicW0s7Z480AD0vQpg=; b=t/yLDWvqlmsvSJ1tdKy2h177rkINerL967rl9DwzkAFL7W2UFHErXX22bXNkFGYVl0 ZJfmWDspuc8c1Di9e4B/E0WlaavA6+d5+7mTXjJq/i6uMs3ngU4BFIr225Uw2mwfqwZ9 OvzHxBhgwVKAnypXiA+ZebDko7OXgWX+JwzZvcO7ror14JEOenK5yPWRthSGrISO1ykd yUVwXItnRgBeCI9/ENyVhzJghmOHsEPHIco04hoU0Kbrm3W30DMGOG2g5kQMTUQSWwyr nTTK4stLOzewT5Fbc64GvwGYv38VwwtgpQIHGN20CBy8x1awjHd3NxR2LbYWw6MDhTs0 Xl8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VfMQlgDK; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 98-v6si12118397pla.312.2018.11.05.09.56.41; Mon, 05 Nov 2018 09:57:02 -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; dkim=pass header.i=@linaro.org header.s=google header.b=VfMQlgDK; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387685AbeKFDK0 (ORCPT + 99 others); Mon, 5 Nov 2018 22:10:26 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:43661 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387590AbeKFDK0 (ORCPT ); Mon, 5 Nov 2018 22:10:26 -0500 Received: by mail-wr1-f65.google.com with SMTP id y3-v6so10197379wrh.10 for ; Mon, 05 Nov 2018 09:49:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=K6FhVTqVVUuW/ADxHVPs56HcvIicW0s7Z480AD0vQpg=; b=VfMQlgDK1Xqb0qf9C/ar2i16zKqVIEq2XmQ3LffLeJ1emNizQPMCEVG7k7NjQKoJuH JxU6IGSXtllqNhPr8xyLhHvRcGkpYsdGPsIa0iDCfyLqMCSOeXYTNmh0a7RSBVr2Gzgs SwjSXIBaZJDDWg/ascnYjdWcd9KLQUjy5E39c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=K6FhVTqVVUuW/ADxHVPs56HcvIicW0s7Z480AD0vQpg=; b=Q6W0iGjcuh/jYVzSLiTQ2P9Yp3DzU8EuKEwNnm384LAXHHmFjjhwDQ+Hz9hkVWBWs4 1gSYazdr0ishTaCJKIUVehqVe4EOlfewK8g9iHhISEUvluquAPDiOYWXgMMmodgD0jXx /5Tm8DQLXuhWH9frjQ8Gm9Mw3whDLyYesvec3Z4EzBwhYtaaR3YG1TOBP4Axdy6H+IqV UkZzNM+zpkJS/tT0J4SO1woT1+jGxt6bLtdP77HFmyqZcujS9jclHFEv9VAA4iqTPsgP NsM47dMioy5wTc3d1ZMXiez/68Tik5mUjVlWrJtgOMnob5IPSQ06+GnA7NQVrCroUw9f 7e/A== X-Gm-Message-State: AGRZ1gKeLPn7UjOKsrUfBu+3XMvK1KtmsvnNrDuayxX8y2lmYxbxiY9i dwGLivL0VcXZIGVrHzTkhcB1Fel2kBObKUyimVBxPA== X-Received: by 2002:adf:9f0b:: with SMTP id l11-v6mr20511899wrf.206.1541440178262; Mon, 05 Nov 2018 09:49:38 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a1c:4054:0:0:0:0:0 with HTTP; Mon, 5 Nov 2018 09:49:37 -0800 (PST) In-Reply-To: <87o9b3g927.fsf@codeaurora.org> References: <1540490241-32021-1-git-send-email-john.stultz@linaro.org> <87o9b3g927.fsf@codeaurora.org> From: John Stultz Date: Mon, 5 Nov 2018 09:49:37 -0800 Message-ID: Subject: Re: [RFC][PATCH] wlcore: Fixup "Add support for optional wakeirq" To: Kalle Valo Cc: lkml , Tony Lindgren , Eyal Reizer , Anders Roxell , linux-wireless@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 5, 2018 at 1:36 AM, Kalle Valo wrote: > John Stultz writes: > >> After commit 3c83dd577c7f ("wlcore: Add support for optional >> wakeirq") landed upstream, I started seeing the following oops >> on my HiKey board: >> >> [ 1.870279] Unable to handle kernel read from unreadable memory at virtual address 0000000000000010 >> [ 1.870283] Mem abort info: >> [ 1.870287] ESR = 0x96000005 >> [ 1.870292] Exception class = DABT (current EL), IL = 32 bits >> [ 1.870296] SET = 0, FnV = 0 >> [ 1.870299] EA = 0, S1PTW = 0 >> [ 1.870302] Data abort info: >> [ 1.870306] ISV = 0, ISS = 0x00000005 >> [ 1.870309] CM = 0, WnR = 0 >> [ 1.870312] [0000000000000010] user address but active_mm is swapper >> [ 1.870318] Internal error: Oops: 96000005 [#1] PREEMPT SMP >> [ 1.870327] CPU: 0 PID: 5 Comm: kworker/0:0 Not tainted 4.19.0-05129-gb3d1e8e #48 >> [ 1.870331] Hardware name: HiKey Development Board (DT) >> [ 1.870350] Workqueue: events_freezable mmc_rescan >> [ 1.870358] pstate: 60400005 (nZCv daif +PAN -UAO) >> [ 1.870366] pc : wl1271_probe+0x210/0x350 >> [ 1.870371] lr : wl1271_probe+0x210/0x350 >> [ 1.870374] sp : ffffff80080739b0 >> [ 1.870377] x29: ffffff80080739b0 x28: 0000000000000000 >> [ 1.870384] x27: 0000000000000000 x26: 0000000000000000 >> [ 1.870391] x25: 0000000000000036 x24: ffffffc074ecb598 >> [ 1.870398] x23: ffffffc07ffdce78 x22: ffffffc0744ed808 >> [ 1.870404] x21: ffffffc074ecbb98 x20: ffffff8008ff9000 >> [ 1.870411] x19: ffffffc0744ed800 x18: ffffff8008ff9a48 >> [ 1.870418] x17: 0000000000000000 x16: 0000000000000000 >> [ 1.870425] x15: ffffffc074ecb503 x14: ffffffffffffffff >> [ 1.870431] x13: ffffffc074ecb502 x12: 0000000000000030 >> [ 1.870438] x11: 0101010101010101 x10: 0000000000000040 >> [ 1.870444] x9 : ffffffc075400248 x8 : ffffffc075400270 >> [ 1.870451] x7 : 0000000000000000 x6 : 0000000000000000 >> [ 1.870457] x5 : 0000000000000000 x4 : 0000000000000000 >> [ 1.870463] x3 : 0000000000000000 x2 : 0000000000000000 >> [ 1.870469] x1 : 0000000000000028 x0 : 0000000000000000 >> [ 1.870477] Process kworker/0:0 (pid: 5, stack limit = 0x(____ptrval____)) >> [ 1.870480] Call trace: >> [ 1.870485] wl1271_probe+0x210/0x350 >> [ 1.870491] sdio_bus_probe+0x100/0x128 >> [ 1.870500] really_probe+0x1a8/0x2b8 >> [ 1.870506] driver_probe_device+0x58/0x100 >> [ 1.870511] __device_attach_driver+0x94/0xd8 >> [ 1.870517] bus_for_each_drv+0x70/0xc8 >> [ 1.870522] __device_attach+0xe0/0x140 >> [ 1.870527] device_initial_probe+0x10/0x18 >> [ 1.870532] bus_probe_device+0x94/0xa0 >> [ 1.870537] device_add+0x374/0x5b8 >> [ 1.870542] sdio_add_func+0x60/0x88 >> [ 1.870546] mmc_attach_sdio+0x1b0/0x358 >> [ 1.870551] mmc_rescan+0x2cc/0x390 >> [ 1.870558] process_one_work+0x12c/0x320 >> [ 1.870563] worker_thread+0x48/0x458 >> [ 1.870569] kthread+0xf8/0x128 >> [ 1.870575] ret_from_fork+0x10/0x18 >> [ 1.870583] Code: 92400c21 b2760021 a90687a2 97e95bf9 (f9400803) >> [ 1.870587] ---[ end trace 1e15f81d3c139ca9 ]--- >> >> It seems since we don't have a wakeirq value in the dts, the wakeirq >> value in wl1271_probe() is zero, which then causes trouble in >> irqd_get_trigger_type(irq_get_irq_data(wakeirq)). >> >> This patch tries to address this by checking if wakeirq is zero, >> and not trying to add it to the resources if that is the case. >> >> Cc: Tony Lindgren >> Cc: Kalle Valo >> Cc: Eyal Reizer >> Cc: Anders Roxell >> Cc: linux-wireless@vger.kernel.org >> Acked-by: Tony Lindgren >> Signed-off-by: John Stultz > > Any particular reason why you marked this as RFC? I'm asking because I Mostly out of habit. I do that on the first pass submissions. But yea, no objection if it were to be taken. > would like to apply this patch as is and push to 4.20. > > I'll just add: > > Fixes: 3c83dd577c7f ("wlcore: Add support for optional wakeirq") That would be great! thanks -john