From owner-svn-src-all@freebsd.org Mon Aug 7 12:42:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 50BECDD0F04; Mon, 7 Aug 2017 12:42:30 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E9DC9694E5; Mon, 7 Aug 2017 12:42:29 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v77CgTvC090228; Mon, 7 Aug 2017 12:42:29 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v77CgTkd090227; Mon, 7 Aug 2017 12:42:29 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201708071242.v77CgTkd090227@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 7 Aug 2017 12:42:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r322147 - stable/10/sys/dev/mlx5/mlx5_core X-SVN-Group: stable-10 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/10/sys/dev/mlx5/mlx5_core X-SVN-Commit-Revision: 322147 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Aug 2017 12:42:30 -0000 Author: hselasky Date: Mon Aug 7 12:42:28 2017 New Revision: 322147 URL: https://svnweb.freebsd.org/changeset/base/322147 Log: MFC r312879: Rename struct fw_page into struct mlx5_fw_page as a preparation step for adding busdma support. Sponsored by: Mellanox Technologies Modified: stable/10/sys/dev/mlx5/mlx5_core/mlx5_pagealloc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mlx5/mlx5_core/mlx5_pagealloc.c ============================================================================== --- stable/10/sys/dev/mlx5/mlx5_core/mlx5_pagealloc.c Mon Aug 7 12:41:06 2017 (r322146) +++ stable/10/sys/dev/mlx5/mlx5_core/mlx5_pagealloc.c Mon Aug 7 12:42:28 2017 (r322147) @@ -38,7 +38,7 @@ struct mlx5_pages_req { struct work_struct work; }; -struct fw_page { +struct mlx5_fw_page { struct rb_node rb_node; u64 addr; struct page *page; @@ -77,13 +77,13 @@ static int insert_page(struct mlx5_core_dev *dev, u64 struct rb_root *root = &dev->priv.page_root; struct rb_node **new = &root->rb_node; struct rb_node *parent = NULL; - struct fw_page *nfp; - struct fw_page *tfp; + struct mlx5_fw_page *nfp; + struct mlx5_fw_page *tfp; int i; while (*new) { parent = *new; - tfp = rb_entry(parent, struct fw_page, rb_node); + tfp = rb_entry(parent, struct mlx5_fw_page, rb_node); if (tfp->addr < addr) new = &parent->rb_left; else if (tfp->addr > addr) @@ -108,15 +108,15 @@ static int insert_page(struct mlx5_core_dev *dev, u64 return 0; } -static struct fw_page *find_fw_page(struct mlx5_core_dev *dev, u64 addr) +static struct mlx5_fw_page *find_fw_page(struct mlx5_core_dev *dev, u64 addr) { struct rb_root *root = &dev->priv.page_root; struct rb_node *tmp = root->rb_node; - struct fw_page *result = NULL; - struct fw_page *tfp; + struct mlx5_fw_page *result = NULL; + struct mlx5_fw_page *tfp; while (tmp) { - tfp = rb_entry(tmp, struct fw_page, rb_node); + tfp = rb_entry(tmp, struct mlx5_fw_page, rb_node); if (tfp->addr < addr) { tmp = tmp->rb_left; } else if (tfp->addr > addr) { @@ -156,13 +156,13 @@ static int mlx5_cmd_query_pages(struct mlx5_core_dev * static int alloc_4k(struct mlx5_core_dev *dev, u64 *addr) { - struct fw_page *fp; + struct mlx5_fw_page *fp; unsigned n; if (list_empty(&dev->priv.free_list)) return -ENOMEM; - fp = list_entry(dev->priv.free_list.next, struct fw_page, list); + fp = list_entry(dev->priv.free_list.next, struct mlx5_fw_page, list); n = find_first_bit(&fp->bitmask, 8 * sizeof(fp->bitmask)); if (n >= MLX5_NUM_4K_IN_PAGE) { mlx5_core_warn(dev, "alloc 4k bug\n"); @@ -180,7 +180,7 @@ static int alloc_4k(struct mlx5_core_dev *dev, u64 *ad static void free_4k(struct mlx5_core_dev *dev, u64 addr) { - struct fw_page *fwp; + struct mlx5_fw_page *fwp; int n; fwp = find_fw_page(dev, addr & PAGE_MASK); @@ -466,7 +466,7 @@ static int optimal_reclaimed_pages(void) int mlx5_reclaim_startup_pages(struct mlx5_core_dev *dev) { int end = jiffies + msecs_to_jiffies(MAX_RECLAIM_TIME_MSECS); - struct fw_page *fwp; + struct mlx5_fw_page *fwp; struct rb_node *p; int nclaimed = 0; int err; @@ -474,7 +474,7 @@ int mlx5_reclaim_startup_pages(struct mlx5_core_dev *d do { p = rb_first(&dev->priv.page_root); if (p) { - fwp = rb_entry(p, struct fw_page, rb_node); + fwp = rb_entry(p, struct mlx5_fw_page, rb_node); err = reclaim_pages(dev, fwp->func_id, optimal_reclaimed_pages(), &nclaimed);