linux_dsm_epyc7002/fs/ocfs2/dlm
Andy Shevchenko dd3e7cba16 ocfs2/dlm: move BITS_TO_BYTES() to bitops.h for wider use
There are users already and will be more of BITS_TO_BYTES() macro.  Move
it to bitops.h for wider use.

In the case of ocfs2 the replacement is identical.

As for bnx2x, there are two places where floor version is used.  In the
first case to calculate the amount of structures that can fit one memory
page.  In this case obviously the ceiling variant is correct and
original code might have a potential bug, if amount of bits % 8 is not
0.  In the second case the macro is used to calculate bytes transmitted
in one microsecond.  This will work for all speeds which is multiply of
1Gbps without any change, for the rest new code will give ceiling value,
for instance 100Mbps will give 13 bytes, while old code gives 12 bytes
and the arithmetically correct one is 12.5 bytes.  Further the value is
used to setup timer threshold which in any case has its own margins due
to certain resolution.  I don't see here an issue with slightly shifting
thresholds for low speed connections, the card is supposed to utilize
highest available rate, which is usually 10Gbps.

Link: http://lkml.kernel.org/r/20200108121316.22411-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Acked-by: Sudarsana Reddy Kalluru <skalluru@marvell.com>
Cc: Mark Fasheh <mark@fasheh.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Cc: Changwei Ge <gechangwei@live.cn>
Cc: Gang He <ghe@suse.com>
Cc: Jun Piao <piaojun@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-01-31 10:30:36 -08:00
..
dlmapi.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 145 2019-05-30 11:25:18 -07:00
dlmast.c ocfs2: make local header paths relative to C files 2020-01-31 10:30:36 -08:00
dlmcommon.h ocfs2/dlm: move BITS_TO_BYTES() to bitops.h for wider use 2020-01-31 10:30:36 -08:00
dlmconvert.c ocfs2: make local header paths relative to C files 2020-01-31 10:30:36 -08:00
dlmconvert.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 145 2019-05-30 11:25:18 -07:00
dlmdebug.c ocfs2: make local header paths relative to C files 2020-01-31 10:30:36 -08:00
dlmdebug.h ocfs2: further debugfs cleanups 2019-09-24 15:54:07 -07:00
dlmdomain.c ocfs2: make local header paths relative to C files 2020-01-31 10:30:36 -08:00
dlmdomain.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 145 2019-05-30 11:25:18 -07:00
dlmlock.c ocfs2: make local header paths relative to C files 2020-01-31 10:30:36 -08:00
dlmmaster.c ocfs2: make local header paths relative to C files 2020-01-31 10:30:36 -08:00
dlmrecovery.c ocfs2/dlm: remove redundant assignment to ret 2020-01-31 10:30:36 -08:00
dlmthread.c ocfs2: make local header paths relative to C files 2020-01-31 10:30:36 -08:00
dlmunlock.c ocfs2: make local header paths relative to C files 2020-01-31 10:30:36 -08:00
Makefile ocfs2: make local header paths relative to C files 2020-01-31 10:30:36 -08:00