Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2631840yba; Mon, 6 May 2019 09:05:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqxLGaZZ8VJkfqzaXyh3yKCcOw5CAIRHpk8nzSnWK4IeFRW4vscuSNn7dLUDv5lv8ZsEHOQE X-Received: by 2002:a17:902:446:: with SMTP id 64mr28300072ple.322.1557158742330; Mon, 06 May 2019 09:05:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557158742; cv=none; d=google.com; s=arc-20160816; b=FKpztgKPfEe9s3qwzWe7xCCF8/3hgtwuXROmwg1N200SVC8j7J/Wv5Jtq/vht8gl9x x89Jpav7J5R6m4NDBiYH+x2JdcVmWfaM+zQujL4suCkbZA2Raw8L65Sv7HC016AADwvy sbvbK6S3fH4LtDrPTCeqZniTE2HLAWUNZZKtZM54WdI24OWRc0I5VQLRQL9oawbPF/7m BdU/qahW1PHi9NOtyhP4oMBio2Ownko1IMnWQz5uVD6tYf/SRBjJPoxhvN+XTHJ1EOsX bhXonZF/amCGRyUilQKcILt4um2mMMCZtTwMIfvhPdhvHVHMmajrjsYlwkB5hpXNJlvN EqMA== 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 :in-reply-to:references:mime-version:dkim-signature; bh=Fq6Rg4IrSXPz0SMvZAQc0O8wglN6Db1bmZTbJ+slX3E=; b=IYYJ+hu74rv/dvQo1XmC3zP0qo5+Yv4RD0Axomd6gWhM5uQV6b0E/GuaFZrfO2gMk5 vKJ888sytYqjQpCKqrzB+JCW+W8+H3PL2PENaTb2vJZETLaXaK1Shjbe2TYns+nbxtAY CxYp8LELLPfsUxhdG2y5GdCVxpNAOtozZ7nAkHKyJy2GoPYBZLyC841AYhAKWd+QM0g9 rAC5hx0reg18exAO5+j4MXlr7VanqiCQWScwDLQ513z/KmUJFE2ZZDuEYn0Nh9T4ChTP 5PFI03C0/AZ04z7Ih4MroKmwp+YEn2WcNiw7jB2BbQRN7R/sGBcjQHMck0mtibp6/1qj 6TFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="RFjOeO/I"; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j5si14176069pgq.566.2019.05.06.09.05.23; Mon, 06 May 2019 09:05:42 -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=pass header.i=@gmail.com header.s=20161025 header.b="RFjOeO/I"; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726997AbfEFQB0 (ORCPT + 99 others); Mon, 6 May 2019 12:01:26 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:51683 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726870AbfEFQBZ (ORCPT ); Mon, 6 May 2019 12:01:25 -0400 Received: by mail-wm1-f65.google.com with SMTP id o189so5514600wmb.1 for ; Mon, 06 May 2019 09:01:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Fq6Rg4IrSXPz0SMvZAQc0O8wglN6Db1bmZTbJ+slX3E=; b=RFjOeO/I5XhStfzmJFQYBRPDHZUykmUhET0RReJNY4I9bRGCiDw4lSDInj2U38cEzk 7YGN88N9V+gxpa9w7vcmHKrMfiFns6uWgE87rU146nYYorCDyP7XgPszmYLCvtH7ExD0 XHmjaJIMcfCcRajHst6iDgbtlByFQwZFpt2kWidfbFYFhOLGseFoykmBhDxSqfabZmlz 1InpFXE+7EFtU4WWDTpA4u87IJo4ThNDSZEvCKVWIFNGBorfqHx0y/LruXmsCVq7mx37 HApyk05SuYYF/MmTjZ2OekM06PnohPQgGbzvQyB29pQAWosqfHFFzUco3NEfoU1xpiYc vDSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Fq6Rg4IrSXPz0SMvZAQc0O8wglN6Db1bmZTbJ+slX3E=; b=ckyFheLmmJrr357KNqC0CzbGPt5nTNW5HB3DLFbyftfy+davO+zgwNJ8WeSj9K/wrU R6u0v4AiFLCarh/4/Jzep+cVJdqxBBSPG6vAe/iXIZebkYBlYCPTDasGGjAzi4lSUqZP EExW8Wy1VIY0lhlCDGOqVrZnrq7ZnnthRcCHCYcfZHweafp4zyjwnI6aKe7U8R4cIC9X VqUqSa2uWnqVSxLngRftQOFfiEkBS4gjJMWrUH7hxajUFZSwWJF9VejSDTNgGQ7XHSUb gocV5oJzslYWy+uvkXcMGINVdaomR7B0GfINd46oxsxZXrljfacmwcKcZX8GCJMlaT/+ LGYQ== X-Gm-Message-State: APjAAAXxmCFoDERVxWP9nnZE1BYuFEgy9NK8rOwVdgZmCHuM6Kt84hqL mOXnwyy2fbqcar9PSOiaT/12GVMZv5jWPomQGH0= X-Received: by 2002:a7b:c00e:: with SMTP id c14mr16725128wmb.110.1557158483845; Mon, 06 May 2019 09:01:23 -0700 (PDT) MIME-Version: 1.0 References: <1556733121-20133-1-git-send-email-kdasu.kdev@gmail.com> In-Reply-To: <1556733121-20133-1-git-send-email-kdasu.kdev@gmail.com> From: Richard Weinberger Date: Mon, 6 May 2019 18:01:11 +0200 Message-ID: Subject: Re: [PATCH] mtd: nand: raw: brcmnand: When oops in progress use pio and interrupt polling To: Kamal Dasu Cc: linux-mtd@lists.infradead.org, Boris Brezillon , Richard Weinberger , LKML , Marek Vasut , bcm-kernel-feedback-list@broadcom.com, Miquel Raynal , Brian Norris , David Woodhouse 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 Wed, May 1, 2019 at 7:52 PM Kamal Dasu wrote: > > If mtd_oops is in progress switch to polling for nand command completion > interrupts and use PIO mode wihtout DMA so that the mtd_oops buffer can > be completely written in the assinged nand partition. This is needed in > cases where the panic does not happen on cpu0 and there is only one online > CPU and the panic is not on cpu0. This optimization is highly specific to your hardware and AFAIK cannot be applied in general to brcmnand. So the problem you see is that depending on the oops you can no longer use dma or interrupts in the driver? How about adding a new flag to panic_nand_write() which tells the nand driver that this is a panic write? That way you can fall back to pio and polling mode without checking cpu numbers and oops_in_progress. -- Thanks, //richard