From patchwork Tue Jan 31 12:17:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Matias_Bj=C3=B8rling?= X-Patchwork-Id: 9547021 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7308760425 for ; Tue, 31 Jan 2017 12:18:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 64C9D28338 for ; Tue, 31 Jan 2017 12:18:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 59B1328375; Tue, 31 Jan 2017 12:18:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AD9D328372 for ; Tue, 31 Jan 2017 12:18:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752026AbdAaMS0 (ORCPT ); Tue, 31 Jan 2017 07:18:26 -0500 Received: from mail-bn3nam01on0043.outbound.protection.outlook.com ([104.47.33.43]:32224 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752003AbdAaMSO (ORCPT ); Tue, 31 Jan 2017 07:18:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cnexlabs.onmicrosoft.com; s=selector1-cnexlabs-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=wyx88d+bXz6N1jV0Opu3mZlvbFhXYX2bGKiI2Xeihr0=; b=Ks/IcEbPzO//PxpY0MMkT+mSbf9070dTCBCbo5RXl03yfx1KaBJ7NHMdUP3aJUA51VfBU1UQXQFwXAhAV+9jJIqmVu6yfyIq6gAWcNADRzd2MEk3cATgMW+JEwt8Neq3NLzjCXMsYBg+VLMBuAItqecC92Wh8YkxHILznk2L+U8= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=matias@cnexlabs.com; Received: from skyninja.cnexlabs.com (193.106.164.211) by DM5PR06MB2777.namprd06.prod.outlook.com (10.175.107.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.874.12; Tue, 31 Jan 2017 12:17:50 +0000 From: =?UTF-8?q?Matias=20Bj=C3=B8rling?= To: CC: , , =?UTF-8?q?Matias=20Bj=C3=B8rling?= Subject: [PATCH 03/12] lightnvm: remove nvm_submit_ppa* functions Date: Tue, 31 Jan 2017 13:17:11 +0100 Message-ID: <20170131121720.10971-4-matias@cnexlabs.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170131121720.10971-1-matias@cnexlabs.com> References: <20170131121720.10971-1-matias@cnexlabs.com> MIME-Version: 1.0 X-Originating-IP: [193.106.164.211] X-ClientProxiedBy: DB6PR0601CA0024.eurprd06.prod.outlook.com (10.168.88.162) To DM5PR06MB2777.namprd06.prod.outlook.com (10.175.107.139) X-MS-Office365-Filtering-Correlation-Id: 25ab6009-b279-4ced-dca0-08d449d32d10 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:DM5PR06MB2777; X-Microsoft-Exchange-Diagnostics: 1; DM5PR06MB2777; 3:49fbW90zbtLThCTZmzgpQP6xNs3IOstLCWjQCruBbbd9X/qa3q1u/FfhyprEX873URTY83jjqY5mB9s1h1DQh6dzVVqRvpEhMJFfALCocEoTf2yuybhVqbdLO2tmzo9MFfHKutvAsUl9wQNRQj5dhGf9pJ6cJbjsc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UbA0GggYU5cfGn3x/80IWsuoEzEIKTMi9nnqWsc39W8k+qT67qrPG8pX2pHz+pT4INORlkr74YnuLcFq6ETaje7AQmtZDYVx7TgmNo39OIsbLYbR+JY2Q==; 20:HZXIUVSUs0vzAMDISpqVBWey5gYORD1+KGLDoo1Ax34aL48+otlQcUWsPPgsAQclkjx9YrL7aOOsZnxtlTFCrG0o+hHWqFR1/wSBJcXyPaobVbQcsRzm5gOQT2DnU99saIxnlZQQTAruYcBij3P1Uz3VSN3q9Bmb1YJkS6gE9k0= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6041248)(20161123560025)(20161123555025)(20161123562025)(20161123564025)(6042181)(6072148); SRVR:DM5PR06MB2777; BCL:0; PCL:0; RULEID:; SRVR:DM5PR06MB2777; X-Microsoft-Exchange-Diagnostics: 1; DM5PR06MB2777; 4:/AficUx6eUslXyCbND88BH36iyStK5ikoeQH5xObaP7r+PSNwFxibjwX7hxL9L0+W1hII1emvHgFaRP2NwIEgpiuKNA20InC582OYdnw/3Eb/spJ/b/kSG4oRYN2j4cX6+wpNrdkRIBANWJiZnu5JQ50ngl6ynVVcV2XAHA3zf6x27X6X1zn+5rCZAtdremy85ySXAOBjYNeGQngKNmdayTDMArf2rsvICAYqpNxf1mS+5Tr36cjtJS+eenvyjvOlDQlfiC1hU2OT3hBZIps5B5g+MdndNw3BTwX1HB1y2iTWJRSHaknn73tk0kmOWepeT+KlG3XXXoccsIDnRr71i6OF83JvU3zGDCQLVRY8OMTJO0luh8dZKmh+WhSsItUEsw2jeIDFOq3EBWXax57DBZylvX2Eegc8MJNvT57kwUNax0bKmMnYpMzwvg0SZmBvxK0CVrA6NS85iITO1NIPLA/DWnnii+ToINeiF3CloW8mtNKvNfhz7HJNr0d3cWqoBK77OY4j5Cys+32uZWXCg4W2A0BoZHCSn99kW7gd1E87Hm/25uH7elXzcwnmR1EyqXwCmL7uh1YndCSrsXOEg== X-Forefront-PRVS: 0204F0BDE2 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(189002)(199003)(42186005)(66066001)(50466002)(6486002)(47776003)(38730400001)(105586002)(54906002)(25786008)(106356001)(2351001)(36756003)(68736007)(4001430100002)(53416004)(50986999)(107886002)(7736002)(2906002)(305945005)(4326007)(110136003)(23676002)(2870700001)(189998001)(5660300001)(92566002)(86362001)(1076002)(6116002)(3846002)(33646002)(6916009)(97736004)(2950100002)(5820100001)(6666003)(76176999)(101416001)(53936002)(81166006)(81156014)(8676002)(50226002)(69596002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR06MB2777; H:skyninja.cnexlabs.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: cnexlabs.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtETTVQUjA2TUIyNzc3OzIzOjNKYS9Pc25MakhnUHJyLzRWWW5sSWNEcHdE?= =?utf-8?B?SkI0YzlCc01jRWljT3c3cHJ6a1BzQVdJTzc4QXVGS0QyUHlBdG5hblowVXFm?= =?utf-8?B?RUoxNVhnL0Y3d3phcHFhVFdmVmM2bnRoK3YxS1FyVGY3WWxrZEhtNmtKdlA0?= =?utf-8?B?bnFTVmZGbFVRakFkaktnK01aMWF0djR3RkVsbVlybExBUS9QNkhCVEVrdUZs?= =?utf-8?B?bWpaMG9Oa0Z4SEplZEtCSVhBTS9LK0R4U1MzUFppd3lEaG53RVRoS1l2QUFy?= =?utf-8?B?a1F3NzFnTTNCL0NjYzhmbmFCN1QvRkJUM2hzWmhVQmVRM2NrTThCTkY5QjNL?= =?utf-8?B?Q3MzL2lYbHlXS0c1aWdqWHBiMXpPQkFheTdVUXlPVjIzTG44eUZCV09obXZJ?= =?utf-8?B?QmxpM01ZYVErM05QZ0MrTGx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f2UCBhOzI334mLzG2hYWnHCIF2RJXlGFXildEF/xgxZfc= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM5PR06MB2777; 7:HaJz8v3vpho2XYkUbipJJR1iDl1DxVuDL0TR8EiQGACidhCokaDqs6Bfodl1QsFI4hjJ3DJtjg35LQ6U5sg1ptN3InDFwAKDktdHda5cqHgeUtZnosW0kXyS4Fde/rhpJRnLiJ63CJz2xyAGjj3GL8Vn2gzqZz6yVLc7O8GjcX/PiYXrMUet1vOCpUcStDEfdPnSTfAP3UOgtgK6bdb9WUyAFxCtzqihg9sVVjRmaNFam/3ARpxYu/G9ASdXJtKWG2bhDBrN88aPUf0q9hU1yXb3iUk5mYh4JI42lP+yrMSSUZVEzhZOgt2/B8KEUjUNaLTuNI+9d00oGLsC5gTddTCVv/3sraiI+7LdtJzBWWJFWGjvLCYMA8vzTaBV0vI0rirBmKLcKgNIL0C4VTy7oJMEFhn59v9tJNOCE/869lI6QInCQQhCk5HKTt5VFncLm/awAQseNMxWRIF8cfLSlEDcgioyu+H2If/ncQzXz+0AKA34n604n79Tl9GoMlMfMkqMQdkJwGfh8Q8en6QNPyihnIfmH9jUnDGYxtBYLZMDLvGAXZSqUJVfvVlYEZBW X-OriginatorOrg: cnexlabs.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jan 2017 12:17:50.0782 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR06MB2777 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The nvm_submit_ppa* functions are no longer needed after gennvm and core have been merged. Signed-off-by: Matias Bjørling --- drivers/lightnvm/core.c | 109 ----------------------------------------------- include/linux/lightnvm.h | 4 -- 2 files changed, 113 deletions(-) diff --git a/drivers/lightnvm/core.c b/drivers/lightnvm/core.c index a4e2e3b..ffdf048 100644 --- a/drivers/lightnvm/core.c +++ b/drivers/lightnvm/core.c @@ -883,115 +883,6 @@ void nvm_end_io(struct nvm_rq *rqd, int error) } EXPORT_SYMBOL(nvm_end_io); -static void nvm_end_io_sync(struct nvm_rq *rqd) -{ - struct completion *waiting = rqd->wait; - - rqd->wait = NULL; - - complete(waiting); -} - -static int __nvm_submit_ppa(struct nvm_dev *dev, struct nvm_rq *rqd, int opcode, - int flags, void *buf, int len) -{ - DECLARE_COMPLETION_ONSTACK(wait); - struct bio *bio; - int ret; - unsigned long hang_check; - - bio = bio_map_kern(dev->q, buf, len, GFP_KERNEL); - if (IS_ERR_OR_NULL(bio)) - return -ENOMEM; - - nvm_generic_to_addr_mode(dev, rqd); - - rqd->dev = NULL; - rqd->opcode = opcode; - rqd->flags = flags; - rqd->bio = bio; - rqd->wait = &wait; - rqd->end_io = nvm_end_io_sync; - - ret = dev->ops->submit_io(dev, rqd); - if (ret) { - bio_put(bio); - return ret; - } - - /* Prevent hang_check timer from firing at us during very long I/O */ - hang_check = sysctl_hung_task_timeout_secs; - if (hang_check) - while (!wait_for_completion_io_timeout(&wait, - hang_check * (HZ/2))) - ; - else - wait_for_completion_io(&wait); - - return rqd->error; -} - -/** - * nvm_submit_ppa_list - submit user-defined ppa list to device. The user must - * take to free ppa list if necessary. - * @dev: device - * @ppa_list: user created ppa_list - * @nr_ppas: length of ppa_list - * @opcode: device opcode - * @flags: device flags - * @buf: data buffer - * @len: data buffer length - */ -int nvm_submit_ppa_list(struct nvm_dev *dev, struct ppa_addr *ppa_list, - int nr_ppas, int opcode, int flags, void *buf, int len) -{ - struct nvm_rq rqd; - - if (dev->ops->max_phys_sect < nr_ppas) - return -EINVAL; - - memset(&rqd, 0, sizeof(struct nvm_rq)); - - rqd.nr_ppas = nr_ppas; - if (nr_ppas > 1) - rqd.ppa_list = ppa_list; - else - rqd.ppa_addr = ppa_list[0]; - - return __nvm_submit_ppa(dev, &rqd, opcode, flags, buf, len); -} -EXPORT_SYMBOL(nvm_submit_ppa_list); - -/** - * nvm_submit_ppa - submit PPAs to device. PPAs will automatically be unfolded - * as single, dual, quad plane PPAs depending on device type. - * @dev: device - * @ppa: user created ppa_list - * @nr_ppas: length of ppa_list - * @opcode: device opcode - * @flags: device flags - * @buf: data buffer - * @len: data buffer length - */ -int nvm_submit_ppa(struct nvm_dev *dev, struct ppa_addr *ppa, int nr_ppas, - int opcode, int flags, void *buf, int len) -{ - struct nvm_rq rqd; - int ret; - - memset(&rqd, 0, sizeof(struct nvm_rq)); - ret = nvm_set_rqd_ppalist(dev, &rqd, ppa, nr_ppas, 1); - if (ret) - return ret; - - ret = __nvm_submit_ppa(dev, &rqd, opcode, flags, buf, len); - - nvm_free_rqd_ppalist(dev, &rqd); - - return ret; -} -EXPORT_SYMBOL(nvm_submit_ppa); - /* * folds a bad block list from its plane representation to its virtual * block representation. The fold is done in place and reduced size is diff --git a/include/linux/lightnvm.h b/include/linux/lightnvm.h index f2007b2..abb3d55 100644 --- a/include/linux/lightnvm.h +++ b/include/linux/lightnvm.h @@ -489,10 +489,6 @@ extern int nvm_get_l2p_tbl(struct nvm_tgt_dev *, u64, u32, nvm_l2p_update_fn *, extern int nvm_get_area(struct nvm_tgt_dev *, sector_t *, sector_t); extern void nvm_put_area(struct nvm_tgt_dev *, sector_t); extern void nvm_end_io(struct nvm_rq *, int); -extern int nvm_submit_ppa(struct nvm_dev *, struct ppa_addr *, int, int, int, - void *, int); -extern int nvm_submit_ppa_list(struct nvm_dev *, struct ppa_addr *, int, int, - int, void *, int); extern int nvm_bb_tbl_fold(struct nvm_dev *, u8 *, int); extern int nvm_get_bb_tbl(struct nvm_dev *, struct ppa_addr, u8 *); extern int nvm_get_tgt_bb_tbl(struct nvm_tgt_dev *, struct ppa_addr, u8 *);