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: 6173011 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7E61B9F2EC for ; Tue, 7 Apr 2015 15:47:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 99B2B20397 for ; Tue, 7 Apr 2015 15:47:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BAF8C20251 for ; Tue, 7 Apr 2015 15:47:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753875AbbDGPrR (ORCPT ); Tue, 7 Apr 2015 11:47:17 -0400 Received: from mail-wi0-f173.google.com ([209.85.212.173]:37456 "EHLO mail-wi0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753499AbbDGPrP (ORCPT ); Tue, 7 Apr 2015 11:47:15 -0400 Received: by wiaa2 with SMTP id a2so24219606wia.0 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=M+rkgi6OTcaQwNi0GbapIk6yHOtjiQPW+tVIuv9ZAxPQv/uBTLqv94JW0L4uT5fSJZ sX7ERX9MF5+kTtcy23eO8T4Lv3Hy/D3Ppvj/Lxut1FekTarVXaNKmoOhGThHtGfqgmWD xje/dNqqOz1p85sd95nPDl4NMmAiQivx2afS6adSgOGXytR1MepZ8wtXD+Brf55P3nPy j8kMw12HsN6eiwEHTy4lUlBi0mzI558rILWizS/5uqNHx3luDqmge6RpwLrJYOLkv++8 g8uahLS92Edvm9Tg4PUvCHDyc4+BanLzRy+rdKd7mLfsTyok4gyHYrGWfG1Y4/zB3Dz7 Jd4w== X-Gm-Message-State: ALoCoQmfM7/Hbk9muQIRfopmV6YqbpNosoyNUr9F4T+qgPB693iWCXSOaHytI/dSZLvcUqUunMkZ 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 CC: ross.zwisler@linux.intel.com Subject: [PATCH 1A] pmem: Add prints at pmem_probe/remove References: <1427872339-6688-1-git-send-email-hch@lst.de> <5523FBC7.80301@plexistor.com> In-Reply-To: <5523FBC7.80301@plexistor.com> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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; }