IB/{rdmavt, qib, hfi1}: Remove gfp flags argument
The caller to the driver marks GFP_NOIO allocations with help of memalloc_noio-* calls now. This makes redundant to pass down to the driver gfp flags, which can be GFP_KERNEL only. The patch removes the gfp flags argument and updates all driver paths. Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> Acked-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:

committed by
Doug Ledford

parent
d83187dda9
commit
0f4d027c3b
@@ -104,10 +104,9 @@ const struct rvt_operation_params qib_post_parms[RVT_OPERATION_MAX] = {
|
||||
|
||||
};
|
||||
|
||||
static void get_map_page(struct rvt_qpn_table *qpt, struct rvt_qpn_map *map,
|
||||
gfp_t gfp)
|
||||
static void get_map_page(struct rvt_qpn_table *qpt, struct rvt_qpn_map *map)
|
||||
{
|
||||
unsigned long page = get_zeroed_page(gfp);
|
||||
unsigned long page = get_zeroed_page(GFP_KERNEL);
|
||||
|
||||
/*
|
||||
* Free the page if someone raced with us installing it.
|
||||
@@ -126,7 +125,7 @@ static void get_map_page(struct rvt_qpn_table *qpt, struct rvt_qpn_map *map,
|
||||
* zero/one for QP type IB_QPT_SMI/IB_QPT_GSI.
|
||||
*/
|
||||
int qib_alloc_qpn(struct rvt_dev_info *rdi, struct rvt_qpn_table *qpt,
|
||||
enum ib_qp_type type, u8 port, gfp_t gfp)
|
||||
enum ib_qp_type type, u8 port)
|
||||
{
|
||||
u32 i, offset, max_scan, qpn;
|
||||
struct rvt_qpn_map *map;
|
||||
@@ -160,7 +159,7 @@ int qib_alloc_qpn(struct rvt_dev_info *rdi, struct rvt_qpn_table *qpt,
|
||||
max_scan = qpt->nmaps - !offset;
|
||||
for (i = 0;;) {
|
||||
if (unlikely(!map->page)) {
|
||||
get_map_page(qpt, map, gfp);
|
||||
get_map_page(qpt, map);
|
||||
if (unlikely(!map->page))
|
||||
break;
|
||||
}
|
||||
@@ -317,16 +316,16 @@ u32 qib_mtu_from_qp(struct rvt_dev_info *rdi, struct rvt_qp *qp, u32 pmtu)
|
||||
return ib_mtu_enum_to_int(pmtu);
|
||||
}
|
||||
|
||||
void *qib_qp_priv_alloc(struct rvt_dev_info *rdi, struct rvt_qp *qp, gfp_t gfp)
|
||||
void *qib_qp_priv_alloc(struct rvt_dev_info *rdi, struct rvt_qp *qp)
|
||||
{
|
||||
struct qib_qp_priv *priv;
|
||||
|
||||
priv = kzalloc(sizeof(*priv), gfp);
|
||||
priv = kzalloc(sizeof(*priv), GFP_KERNEL);
|
||||
if (!priv)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
priv->owner = qp;
|
||||
|
||||
priv->s_hdr = kzalloc(sizeof(*priv->s_hdr), gfp);
|
||||
priv->s_hdr = kzalloc(sizeof(*priv->s_hdr), GFP_KERNEL);
|
||||
if (!priv->s_hdr) {
|
||||
kfree(priv);
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
@@ -274,11 +274,11 @@ int qib_get_counters(struct qib_pportdata *ppd,
|
||||
* Functions provided by qib driver for rdmavt to use
|
||||
*/
|
||||
unsigned qib_free_all_qps(struct rvt_dev_info *rdi);
|
||||
void *qib_qp_priv_alloc(struct rvt_dev_info *rdi, struct rvt_qp *qp, gfp_t gfp);
|
||||
void *qib_qp_priv_alloc(struct rvt_dev_info *rdi, struct rvt_qp *qp);
|
||||
void qib_qp_priv_free(struct rvt_dev_info *rdi, struct rvt_qp *qp);
|
||||
void qib_notify_qp_reset(struct rvt_qp *qp);
|
||||
int qib_alloc_qpn(struct rvt_dev_info *rdi, struct rvt_qpn_table *qpt,
|
||||
enum ib_qp_type type, u8 port, gfp_t gfp);
|
||||
enum ib_qp_type type, u8 port);
|
||||
void qib_restart_rc(struct rvt_qp *qp, u32 psn, int wait);
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
|
||||
|
Reference in New Issue
Block a user