From patchwork Tue Apr 7 15:47:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boaz Harrosh X-Patchwork-Id: 6173001 Return-Path: X-Original-To: patchwork-linux-nvdimm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id AECB9BF4A6 for ; Tue, 7 Apr 2015 15:47:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C4FE5203A4 for ; Tue, 7 Apr 2015 15:47:17 +0000 (UTC) Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F06C720397 for ; Tue, 7 Apr 2015 15:47:16 +0000 (UTC) Received: from ml01.vlan14.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id E5B9680F89; Tue, 7 Apr 2015 08:47:16 -0700 (PDT) X-Original-To: linux-nvdimm@ml01.01.org Delivered-To: linux-nvdimm@ml01.01.org Received: from mail-wi0-f182.google.com (mail-wi0-f182.google.com [209.85.212.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id A1A4D80F83 for ; Tue, 7 Apr 2015 08:47:15 -0700 (PDT) Received: by wizk4 with SMTP id k4so22684249wiz.1 for ; Tue, 07 Apr 2015 08:47:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=Char+SYZ/og9VhUOw/wjtI8eCXn/AH3tur7Iwk9TNps=; b=K5+Ku643hEJjDJJK2EUp2weiaqXya7ERQBUSgErZ6pvPz7vDagTBQxElKr3sWiiCyN vhJgJ2qikNQ/s4gUOe29G01FRUpBddVOKAuPP/gVvxkRAN4AoXCHOyuVdQVb/Jq9a/ii 4eKithlF1VTPtSwqgLNMJwUuAw6YkKB+uT8ZBpCBxBlUtZm6Q+8NnW/HxkWL82xhge0c acjnByuoqIZ/Nqp5Vf6Snmx/0SgGTN+I5jO+/oA60tTjLM7wGIXg4Far4/iwpwKcDp9n kXeWlQYOFu3/0DUQXMIWCPfC31It845inVWq22J79s76DGRQgzH+pJ0tgBsiTD5G20yc 1ndA== X-Gm-Message-State: ALoCoQlpgBrAepTVzdfsAhTKb7ZrLCphPwEs31VVxgZsq01hMDotKA+QvW6DBkFcMy6Uyup8MgYk X-Received: by 10.180.96.197 with SMTP id du5mr5975001wib.68.1428421634324; Tue, 07 Apr 2015 08:47:14 -0700 (PDT) Received: from [10.0.0.5] ([207.232.55.62]) by mx.google.com with ESMTPSA id n1sm11557764wix.0.2015.04.07.08.47.12 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Apr 2015 08:47:13 -0700 (PDT) Message-ID: <5523FC00.1080802@plexistor.com> Date: Tue, 07 Apr 2015 18:47:12 +0300 From: Boaz Harrosh User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Christoph Hellwig , linux-nvdimm@ml01.01.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, x86@kernel.org, axboe@kernel.dk References: <1427872339-6688-1-git-send-email-hch@lst.de> <5523FBC7.80301@plexistor.com> In-Reply-To: <5523FBC7.80301@plexistor.com> Subject: [Linux-nvdimm] [PATCH 1A] pmem: Add prints at pmem_probe/remove X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add small prints at creation/remove of pmem devices. So we can see in dmesg logs when users loaded/unloaded the pmem driver and what devices were created. The prints will look like this: Printed by e820 on load: [ +0.000000] user: [mem 0x0000000100000000-0x000000015fffffff] persistent (type 12) [ +0.000000] user: [mem 0x0000000160000000-0x00000001dfffffff] persistent (type 12) ... Printed by modprobe pmem: [ +0.003065] pmem pmem.0.auto: probe [0x0000000100000000:0x60000000] [ +0.001816] pmem pmem.1.auto: probe [0x0000000160000000:0x80000000] ... Printed by modprobe -r pmem: [ +16.299145] pmem pmem.1.auto: remove [ +0.011155] pmem pmem.0.auto: remove Signed-off-by: Boaz Harrosh --- drivers/block/pmem.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/block/pmem.c b/drivers/block/pmem.c index 988f384..36017f1 100644 --- a/drivers/block/pmem.c +++ b/drivers/block/pmem.c @@ -216,6 +216,8 @@ static int pmem_probe(struct platform_device *pdev) return PTR_ERR(pmem); platform_set_drvdata(pdev, pmem); + dev_info(&pdev->dev, "probe [%pa:0x%zx]\n", + &pmem->phys_addr, pmem->size); return 0; } @@ -224,6 +226,7 @@ static int pmem_remove(struct platform_device *pdev) { struct pmem_device *pmem = platform_get_drvdata(pdev); + dev_info(&pdev->dev, "remove\n"); pmem_free(pmem); return 0; }