Commit 637f4600 authored by Harish Chegondi's avatar Harish Chegondi Committed by Doug Ledford

IB/hfi1: Move structure definitions from user_exp_rcv.c to user_exp_rcv.h

Clean up user_exp_rcv.c file by moving structure definitions into header
file user_exp_rcv.h. Since these structure definitions depend on the
structure definitions in mmu_rb.h, move #include "mmu_rb.h" above
the include "user_exp_rcv.h" or include of header files that include
user_exp_rcv.h
Reviewed-by: default avatarDennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: default avatarHarish Chegondi <harish.chegondi@intel.com>
Signed-off-by: default avatarDennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent ddd3affb
...@@ -58,10 +58,10 @@ ...@@ -58,10 +58,10 @@
#include "device.h" #include "device.h"
#include "common.h" #include "common.h"
#include "trace.h" #include "trace.h"
#include "mmu_rb.h"
#include "user_sdma.h" #include "user_sdma.h"
#include "user_exp_rcv.h" #include "user_exp_rcv.h"
#include "aspm.h" #include "aspm.h"
#include "mmu_rb.h"
#undef pr_fmt #undef pr_fmt
#define pr_fmt(fmt) DRIVER_NAME ": " fmt #define pr_fmt(fmt) DRIVER_NAME ": " fmt
......
...@@ -47,25 +47,9 @@ ...@@ -47,25 +47,9 @@
#include <asm/page.h> #include <asm/page.h>
#include <linux/string.h> #include <linux/string.h>
#include "mmu_rb.h"
#include "user_exp_rcv.h" #include "user_exp_rcv.h"
#include "trace.h" #include "trace.h"
#include "mmu_rb.h"
struct tid_rb_node {
struct mmu_rb_node mmu;
unsigned long phys;
struct tid_group *grp;
u32 rcventry;
dma_addr_t dma_addr;
bool freed;
unsigned npages;
struct page *pages[0];
};
struct tid_pageset {
u16 idx;
u16 count;
};
static void unlock_exp_tids(struct hfi1_ctxtdata *uctxt, static void unlock_exp_tids(struct hfi1_ctxtdata *uctxt,
struct exp_tid_set *set, struct exp_tid_set *set,
......
...@@ -51,6 +51,11 @@ ...@@ -51,6 +51,11 @@
#include "exp_rcv.h" #include "exp_rcv.h"
struct tid_pageset {
u16 idx;
u16 count;
};
struct tid_user_buf { struct tid_user_buf {
unsigned long vaddr; unsigned long vaddr;
unsigned long length; unsigned long length;
...@@ -60,6 +65,17 @@ struct tid_user_buf { ...@@ -60,6 +65,17 @@ struct tid_user_buf {
unsigned int n_psets; unsigned int n_psets;
}; };
struct tid_rb_node {
struct mmu_rb_node mmu;
unsigned long phys;
struct tid_group *grp;
u32 rcventry;
dma_addr_t dma_addr;
bool freed;
unsigned int npages;
struct page *pages[0];
};
static inline int num_user_pages(unsigned long addr, static inline int num_user_pages(unsigned long addr,
unsigned long len) unsigned long len)
{ {
......
...@@ -64,11 +64,11 @@ ...@@ -64,11 +64,11 @@
#include "hfi.h" #include "hfi.h"
#include "sdma.h" #include "sdma.h"
#include "mmu_rb.h"
#include "user_sdma.h" #include "user_sdma.h"
#include "verbs.h" /* for the headers */ #include "verbs.h" /* for the headers */
#include "common.h" /* for struct hfi1_tid_info */ #include "common.h" /* for struct hfi1_tid_info */
#include "trace.h" #include "trace.h"
#include "mmu_rb.h"
static uint hfi1_sdma_comp_ring_size = 128; static uint hfi1_sdma_comp_ring_size = 128;
module_param_named(sdma_comp_size, hfi1_sdma_comp_ring_size, uint, S_IRUGO); module_param_named(sdma_comp_size, hfi1_sdma_comp_ring_size, uint, S_IRUGO);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment