mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04:00
Allow the size argument for law_enable() to be non-power-of-2.
Although the local access windows are powers of 2 in size, allow arguments that aren't power of 2, and round up.
This commit is contained in:
parent
c9b6e63dd3
commit
9ef05032c0
1 changed files with 2 additions and 1 deletions
|
|
@ -157,7 +157,8 @@ law_find_free(void)
|
|||
return (i);
|
||||
}
|
||||
|
||||
#define _LAW_SR(trgt,size) (0x80000000 | (trgt << 20) | (ffsl(size) - 2))
|
||||
#define _LAW_SR(trgt,size) (0x80000000 | (trgt << 20) | \
|
||||
(flsl(size + (size - 1)) - 2))
|
||||
|
||||
int
|
||||
law_enable(int trgt, uint64_t bar, uint32_t size)
|
||||
|
|
|
|||
Loading…
Reference in a new issue