Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3375207rwb; Fri, 16 Dec 2022 14:05:09 -0800 (PST) X-Google-Smtp-Source: AA0mqf5wSAxK+EBu4nLQE2T2E7u8vOv8mlISKz8KeoJSLmCztUH0k9WXqj+JJirdglpibRhcQzOz X-Received: by 2002:a17:907:cbc8:b0:7c1:6e08:4c20 with SMTP id vk8-20020a170907cbc800b007c16e084c20mr23545841ejc.7.1671228308860; Fri, 16 Dec 2022 14:05:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671228308; cv=none; d=google.com; s=arc-20160816; b=oHjX5qzmfho9TZSEfAp3ebaaDm2NPsJPpq4BmeAtOnXkTr50DAyLpgsDJEzfc2PshL XaIfDsuPgkyQ7XuJivfKLjG4B+ol14xdAnK52f9AtZIiENKpc7jA7gXzT9+9Xu09kBpP cQA0dtwgo/xXQzOXqT54MiazRTKWqtLMaa6YxRmQwK4R0Moc2S0UQqHbi3UkYpXIYxsG RqNsukRo5KtLSZnCl759fnbFD0BkoRUzppkcjXANMdC9r8+t5a2HQQ4sr84aobCNnZgS JdtByIWzd1tJw0uPrtEQF2PIIziMa7m9gh36Jm3qpErjpJZ4tVgyMOYsHYXWJTxBEgJI A+wQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=RjgSuNcfu6wLmaRa6ePAjpxabqq9MAxI6CRRehBhmdg=; b=D8mmw+By3mA2f6ik+jFUTMix8sb4KeEVaac8JDWjaF6MUtsR/qNwjDP5XT12T1HmyX u+6NLWWWHAHT3eFZJMz4+zQh4O4BBcTJzOiwvD2j4cXpbuFHdVKPeDhEdTBq1VkCqdch 2yYBcCRaypP3iXY62nyOuB98s1sIV92JajMvNo5Ee5gZMZUu8H2GDF6IXvMYUM7gJBQS QgtHdIuIhNAr9DVSCWOf0/Fzf13NZnclF5let5YVFoKi8T2Ri/KZ+m5T8USSQ7f/P0Jn 8JlGV+6Nap+SpMdnDm87Ga2Yjx75ifjv4oFbLdyUhTSWgMAvlzAuHg3/mHnhUi3Ex3ET RgFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=EP848bjX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lh24-20020a170906f8d800b007c16182df2dsi2564097ejb.990.2022.12.16.14.04.45; Fri, 16 Dec 2022 14:05:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=EP848bjX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S229844AbiLPVyd (ORCPT + 68 others); Fri, 16 Dec 2022 16:54:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229691AbiLPVyR (ORCPT ); Fri, 16 Dec 2022 16:54:17 -0500 Received: from mail-qt1-x832.google.com (mail-qt1-x832.google.com [IPv6:2607:f8b0:4864:20::832]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B04145F402; Fri, 16 Dec 2022 13:54:14 -0800 (PST) Received: by mail-qt1-x832.google.com with SMTP id a16so3800909qtw.10; Fri, 16 Dec 2022 13:54:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=RjgSuNcfu6wLmaRa6ePAjpxabqq9MAxI6CRRehBhmdg=; b=EP848bjXNUdzDwYNsZ2cFpfscp9AwPICsoLizzjc7yDIPgpvrCJ8uDiHED7U/0A4Mi zbQFUxfxQsi5eX0NuHPd0ZluYekE+hrLqau7+UA4Rq1Zig1EqtzP8/GrDKn8QL7v6VBt mlXiMm/fsNhzcvQ6KVYP7mq8eMK9jBvC/r1k/BZX37Z4d3iiOTwpkqsCx68r03VLpOla w193ylycS957v5ln2ZDS3IQh9D9svTmdHdEkPTPJFfSeGoTcFf89ZB+jaq7KFdo0oD/O rnqNnpRo61o8eNUeGAbTpt0Vf57rEQHPLmb9isNaXi8KeW3TtCCxO8XMw8GTRt4bEOVc ouvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RjgSuNcfu6wLmaRa6ePAjpxabqq9MAxI6CRRehBhmdg=; b=B0GPYI53xhmu7Wv6xrspNCPCnhtW/P4WlwrWO9Qhwslw9qeu5CpxxH2wJaLgDPwa6w HYH5Jjl5PI31izUDHYUTLzPugeM3IAFVZb0m2SuGsnbABfL66XCEg7shT2qqys7zjdVa p54xFGbvc7CEmH9iKfRCQ1v2pk7i/a6xWincig88Ab21bZJIlM3TxB3qhZBoze/je8Ug kWyagtTvCqvAyX7afPWlmPAeVUDAuCA2//tSfmS247miDwmP1ZdevuQHXQ1DeO+eIdg8 Bfx9ke80g4NBUYU1PGN/nBD9G3LllZq3kbFeDImWkaVcuCujW0kF6nqMQuLI7sR4Gv+f j6eA== X-Gm-Message-State: AFqh2kpHmYsT21Us/z+A4/jhNkxLFPGy+/ikV618UNLyXkENCUbE5uae ChBa4Ex4D+VRH85HicYSi7U= X-Received: by 2002:ac8:4792:0:b0:3a7:f424:d1bb with SMTP id k18-20020ac84792000000b003a7f424d1bbmr1588337qtq.21.1671227653754; Fri, 16 Dec 2022 13:54:13 -0800 (PST) Received: from mail.broadcom.net ([192.19.144.250]) by smtp.gmail.com with ESMTPSA id o12-20020ac8554c000000b003972790deb9sm1947605qtr.84.2022.12.16.13.54.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Dec 2022 13:54:13 -0800 (PST) From: Kamal Dasu To: keescook@chromium.org, linux-kernel@vger.kernel.org, gmpy.liaowx@gmail.com, linux-mmc@vger.kernel.org Cc: f.fainelli@gmail.com, tony.luck@intel.com, anton@enomsg.org, Kamal Dasu Subject: [RFC 0/1] mmc: Add mmc pstore backend support Date: Fri, 16 Dec 2022 16:54:09 -0500 Message-Id: <20221216215410.26960-1-kdasu.kdev@gmail.com> X-Mailer: git-send-email 2.17.1 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Have been trying to provide mmc backend support for fs/pstore feature to be able to capture panic and dmesg logs to a emmc partition. The code is based on mtdpstore and used kernel mmctest also as reference to be able to send mmc rw requests. This code is work in progress and does not succssfully write to the mmc partition as expected when a magic sysrq panic is induced. Needed help from original authors and mmc core and host driver experts to comment on missing peices. To that end I am sending an RFC patch. I have confirmed by enabling dynamic debug that mmcpstore read and panic_write routines do get called by the fs/pstore/zone driver, however I do not see expected results mounted /sys/fs/pstore after a reboot. Kamal Dasu (1): mmc: Add mmc pstore backend support drivers/mmc/core/Kconfig | 13 + drivers/mmc/core/Makefile | 1 + drivers/mmc/core/block.c | 61 ++-- drivers/mmc/core/block.h | 9 + drivers/mmc/core/core.c | 28 +- drivers/mmc/core/mmcpstore.c | 594 +++++++++++++++++++++++++++++++++++ drivers/mmc/host/sdhci.c | 166 +++++----- include/linux/mmc/host.h | 3 + 8 files changed, 746 insertions(+), 129 deletions(-) create mode 100644 drivers/mmc/core/mmcpstore.c -- 2.17.1