Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1636587
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 4.4 13/20] IB/qib: rename BITS_PER_PAGE to RVT_BITS_PER_PAGE |
| Date | 2017-05-05 20:40 +0200 |
| Message-ID | <tDQj2-5qv-73@gated-at.bofh.it> (permalink) |
| References | <tDQiZ-5qv-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arnd Bergmann <arnd@arndb.de>
We get this build warning on arm64
drivers/infiniband/hw/qib/qib_qp.c:44:0: error: "BITS_PER_PAGE" redefined [-Werror]
#define BITS_PER_PAGE (PAGE_SIZE*BITS_PER_BYTE)
This is fixed upstream in commit 898fa52b4ac3 ("IB/qib: Remove qpn, qp tables and
related variables from qib"), which does a lot of other things as well.
Instead, I just backport the rename of the local BITS_PER_PAGE definition to
RVT_BITS_PER_PAGE.
The driver first showed up in linux-2.6.35, and the fixup should still apply
to that. The upstream fix went into v4.6, so we could apply this workaround
to both 3.18 and 4.4.
Fixes: f931551bafe1 ("IB/qib: Add new qib driver for QLogic PCIe InfiniBand adapters")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/infiniband/hw/qib/qib_qp.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
--- a/drivers/infiniband/hw/qib/qib_qp.c
+++ b/drivers/infiniband/hw/qib/qib_qp.c
@@ -41,13 +41,13 @@
#include "qib.h"
-#define BITS_PER_PAGE (PAGE_SIZE*BITS_PER_BYTE)
-#define BITS_PER_PAGE_MASK (BITS_PER_PAGE-1)
+#define RVT_BITS_PER_PAGE (PAGE_SIZE*BITS_PER_BYTE)
+#define RVT_BITS_PER_PAGE_MASK (RVT_BITS_PER_PAGE-1)
static inline unsigned mk_qpn(struct qib_qpn_table *qpt,
struct qpn_map *map, unsigned off)
{
- return (map - qpt->map) * BITS_PER_PAGE + off;
+ return (map - qpt->map) * RVT_BITS_PER_PAGE + off;
}
static inline unsigned find_next_offset(struct qib_qpn_table *qpt,
@@ -59,7 +59,7 @@ static inline unsigned find_next_offset(
if (((off & qpt->mask) >> 1) >= n)
off = (off | qpt->mask) + 2;
} else
- off = find_next_zero_bit(map->page, BITS_PER_PAGE, off);
+ off = find_next_zero_bit(map->page, RVT_BITS_PER_PAGE, off);
return off;
}
@@ -147,8 +147,8 @@ static int alloc_qpn(struct qib_devdata
qpn = 2;
if (qpt->mask && ((qpn & qpt->mask) >> 1) >= dd->n_krcv_queues)
qpn = (qpn | qpt->mask) + 2;
- offset = qpn & BITS_PER_PAGE_MASK;
- map = &qpt->map[qpn / BITS_PER_PAGE];
+ offset = qpn & RVT_BITS_PER_PAGE_MASK;
+ map = &qpt->map[qpn / RVT_BITS_PER_PAGE];
max_scan = qpt->nmaps - !offset;
for (i = 0;;) {
if (unlikely(!map->page)) {
@@ -173,7 +173,7 @@ static int alloc_qpn(struct qib_devdata
* We just need to be sure we don't loop
* forever.
*/
- } while (offset < BITS_PER_PAGE && qpn < QPN_MAX);
+ } while (offset < RVT_BITS_PER_PAGE && qpn < QPN_MAX);
/*
* In order to keep the number of pages allocated to a
* minimum, we scan the all existing pages before increasing
@@ -204,9 +204,9 @@ static void free_qpn(struct qib_qpn_tabl
{
struct qpn_map *map;
- map = qpt->map + qpn / BITS_PER_PAGE;
+ map = qpt->map + qpn / RVT_BITS_PER_PAGE;
if (map->page)
- clear_bit(qpn & BITS_PER_PAGE_MASK, map->page);
+ clear_bit(qpn & RVT_BITS_PER_PAGE_MASK, map->page);
}
static inline unsigned qpn_hash(struct qib_ibdev *dev, u32 qpn)
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 4.4 00/20] 4.4.67-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-05 20:40 +0200
[PATCH 4.4 10/20] scsi: cxlflash: Improve EEH recovery time Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-05 20:40 +0200
[PATCH 4.4 19/20] nfsd4: minor NFSv2/v3 write decoding cleanup Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-05 20:40 +0200
[PATCH 4.4 12/20] netlink: Allow direct reclaim for fallback allocation Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-05 20:40 +0200
[PATCH 4.4 14/20] IB/ehca: fix maybe-uninitialized warnings Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-05 20:40 +0200
[PATCH 4.4 13/20] IB/qib: rename BITS_PER_PAGE to RVT_BITS_PER_PAGE Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-05 20:40 +0200
[PATCH 4.4 17/20] ext4 crypto: use dget_parent() in ext4_d_revalidate() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-05 20:40 +0200
[PATCH 4.4 18/20] ext4/fscrypto: avoid RCU lookup in d_revalidate Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-05 20:40 +0200
[PATCH 4.4 03/20] ASoC: intel: Fix PM and non-atomic crash in bytcr drivers Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-05 20:40 +0200
Re: [PATCH 4.4 00/20] 4.4.67-stable review Shuah Khan <shuahkh@osg.samsung.com> - 2017-05-06 04:00 +0200
Re: [PATCH 4.4 00/20] 4.4.67-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-06 05:50 +0200
Re: [PATCH 4.4 00/20] 4.4.67-stable review Guenter Roeck <linux@roeck-us.net> - 2017-05-08 00:10 +0200
csiph-web