Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp151926ybh; Fri, 6 Mar 2020 18:12:36 -0800 (PST) X-Google-Smtp-Source: ADFU+vtEQijj58AKgaJUwl94AnlC6mT5ahRqhJwjxP0Gfg8vGveCjs5k7Tt5bHIiHm43025eygKF X-Received: by 2002:a05:6808:6cd:: with SMTP id m13mr4588991oih.53.1583547156115; Fri, 06 Mar 2020 18:12:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583547156; cv=none; d=google.com; s=arc-20160816; b=xdsLQ9snhUW0zTygDiOO+d38xvbo0Bm/dkb6ntUzfUzluFp9z+iv8eLtaK1pVAoICh hMDXbizxHYQzuTfkZ8/pQMAbQMX9WaSH5dv1bJfkHp8LRJFUx6QymgYW+XYTJ5JYpHhv 0BWzSxQcr1oYCCIh6CmBsDES762Qp5md6gLR7csCa2wk965vVtWkZ8rowCUoUSB7qsTe 9x+oD09oNvBFE9VrwHPjZt9n+jGUgSWfdVHui6jB7MTBpemQRjeYUpPMj1JLCYHDdinF dDrQJnEYXlXJFCGL1nF6GKmcQ+u/Vteong3WbMblrd0g3Cx239zn4yu7LQy99y5LDKJ1 WhNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from; bh=iLW9L2KGSEmZt4RMbKRU9iH7ArJGdygY6FFfahuV/tQ=; b=qiqCej0g18OpYdpcrdsN/C8FgLGKnzM2deiQxrjhwU1g3fTTwlLzVGOu9W4btCtK6L re4Q9p0TZrEbvbZW+u0q0snjs2rvYbdsTShx7J2bhdsxW0lfyeDuS6TPriuNNdSee4FT oUUcJ8hgca6OkeLq8jT+O/ICCkRRDQn5PWzVZabLwzdfQzegnkLrMNsyZ1V96xPHOKcl lx3oJYOEx3aZNfPGrGLTg8RLKX4QXhvB8CH7gGws5s4YN3RbRK5nKQ7wWPqtdtnc+Feq KZaGaB98NWRJVTOPulKRkmVI67NwC7mPnM1HncIQhLOeJIfoRKi8+mkSm7hbRhKDIxt2 PNhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=ADvKaVVX; 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=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n15si2406226otr.262.2020.03.06.18.12.23; Fri, 06 Mar 2020 18:12:36 -0800 (PST) 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=@nvidia.com header.s=n1 header.b=ADvKaVVX; 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=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726633AbgCGCMB (ORCPT + 99 others); Fri, 6 Mar 2020 21:12:01 -0500 Received: from hqnvemgate25.nvidia.com ([216.228.121.64]:2142 "EHLO hqnvemgate25.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726314AbgCGCMB (ORCPT ); Fri, 6 Mar 2020 21:12:01 -0500 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Fri, 06 Mar 2020 18:11:18 -0800 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Fri, 06 Mar 2020 18:12:00 -0800 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Fri, 06 Mar 2020 18:12:00 -0800 Received: from HQMAIL109.nvidia.com (172.20.187.15) by HQMAIL109.nvidia.com (172.20.187.15) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Sat, 7 Mar 2020 02:11:59 +0000 Received: from rnnvemgw01.nvidia.com (10.128.109.123) by HQMAIL109.nvidia.com (172.20.187.15) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Sat, 7 Mar 2020 02:11:59 +0000 Received: from blueforge.nvidia.com (Not Verified[10.110.48.28]) by rnnvemgw01.nvidia.com with Trustwave SEG (v7,5,8,10121) id ; Fri, 06 Mar 2020 18:11:59 -0800 From: John Hubbard To: Andrew Morton CC: Matthew Wilcox , , , LKML , John Hubbard Subject: [PATCH] mm/gup: fixup for ce35133be382 mm/gup: track FOLL_PIN pages Date: Fri, 6 Mar 2020 18:11:57 -0800 Message-ID: <20200307021157.235726-1-jhubbard@nvidia.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-NVConfidentiality: public Content-Transfer-Encoding: quoted-printable Content-Type: text/plain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1583547078; bh=iLW9L2KGSEmZt4RMbKRU9iH7ArJGdygY6FFfahuV/tQ=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: MIME-Version:X-NVConfidentiality:Content-Transfer-Encoding: Content-Type; b=ADvKaVVX6pXY8WUtRIsve54FkosMGm3HbHmXkN7J3MO7EqMeVD1eqfL4Xk4Uh4Pgl RerHhHE24nq0mK2MEiC2Znu1sTxa8ZOv3xR9r1xj88KiHvtELgAUiLfKtfsxN0OySV EtyPkb5UJOxQ5novejG+pBg61Uvmli8uUYiRhjjrlGPbo2QI0TTXkMZtwjzKmJcm6Z s/6uRS1Yuo7AksZjDpzJJI/r2MaYVIJBnXDnWWDhQGOau6FYaxyQtOeOKC/m4Aiytt fycklPSUQDfpMcO6LA2Aac2qxAveVZY/TutWbesqSrnUR0qWFwXtKqSTDLOHTJlRXW OmrHPv/APW6qQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is a fixup for the mmotm commit ce35133be382 ("mm/gup: track FOLL_PIN pages"). Add kerneldoc comments for pin_user_pages*() routines, in order to get rid of "make -W1" warnings when building mm/gup.o. This just adds @param documentation of: pin_user_pages() pin_user_pages_fast() pin_user_pages_remote() The param documentation was stolen from other gup.c functions, because it looks reasonable enough. Reported-by: Matthew Wilcox Signed-off-by: John Hubbard --- mm/gup.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/mm/gup.c b/mm/gup.c index f589299b0d4a..54af3b290cb0 100644 --- a/mm/gup.c +++ b/mm/gup.c @@ -2766,6 +2766,12 @@ EXPORT_SYMBOL_GPL(get_user_pages_fast); /** * pin_user_pages_fast() - pin user pages in memory without taking locks * + * @start: starting user address + * @nr_pages: number of pages from start to pin + * @gup_flags: flags modifying pin behaviour + * @pages: array that receives pointers to the pages pinned. + * Should be at least nr_pages long. + * * Nearly the same as get_user_pages_fast(), except that FOLL_PIN is set. = See * get_user_pages_fast() for documentation on the function arguments, beca= use * the arguments here are identical. @@ -2791,6 +2797,21 @@ EXPORT_SYMBOL_GPL(pin_user_pages_fast); /** * pin_user_pages_remote() - pin pages of a remote process (task !=3D curr= ent) * + * @tsk: the task_struct to use for page fault accounting, or + * NULL if faults are not to be recorded. + * @mm: mm_struct of target mm + * @start: starting user address + * @nr_pages: number of pages from start to pin + * @gup_flags: flags modifying lookup behaviour + * @pages: array that receives pointers to the pages pinned. + * Should be at least nr_pages long. Or NULL, if caller + * only intends to ensure the pages are faulted in. + * @vmas: array of pointers to vmas corresponding to each page. + * Or NULL if the caller does not require them. + * @locked: pointer to lock flag indicating whether lock is held and + * subsequently whether VM_FAULT_RETRY functionality can be + * utilised. Lock must initially be held. + * * Nearly the same as get_user_pages_remote(), except that FOLL_PIN is set= . See * get_user_pages_remote() for documentation on the function arguments, be= cause * the arguments here are identical. @@ -2819,6 +2840,15 @@ EXPORT_SYMBOL(pin_user_pages_remote); /** * pin_user_pages() - pin user pages in memory for use by other devices * + * @start: starting user address + * @nr_pages: number of pages from start to pin + * @gup_flags: flags modifying lookup behaviour + * @pages: array that receives pointers to the pages pinned. + * Should be at least nr_pages long. Or NULL, if caller + * only intends to ensure the pages are faulted in. + * @vmas: array of pointers to vmas corresponding to each page. + * Or NULL if the caller does not require them. + * * Nearly the same as get_user_pages(), except that FOLL_TOUCH is not set,= and * FOLL_PIN is set. * --=20 2.25.1