Skip to content

Commit 9e34c05

Browse files
b-sumnerDavid Salinas
authored andcommitted
[SWDEV-469495] Reduce size of address shift
Change-Id: Ic044673ca557525cb5e1e19b26c4afcafff17808
1 parent 10aa706 commit 9e34c05

File tree

1 file changed

+2
-4
lines changed
  • amd/device-libs/asanrtl/src

1 file changed

+2
-4
lines changed

amd/device-libs/asanrtl/src/dm.cl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,9 @@ typedef struct alloc_struct {
4646
#define SLAB_THRESHOLD (SLAB_BYTES / 64)
4747
#define SLAB_HEADER_BYTES 32
4848

49-
// Use 24 bit counter to avoid ABA
5049
// Assume SLAB_ALIGN so low 12 bits are already clear
51-
// XXX Reduce if virtual address > 52 bits
52-
#define SLAB_SHIFT 12
53-
#define SLAB_CTR_MASK (ulong)0xffffff
50+
#define SLAB_SHIFT 6
51+
#define SLAB_CTR_MASK ((1UL << (SLAB_SHIFT+12)) - 1UL)
5452

5553
#define LINE 128
5654
#define PAD(N,M) ulong pad##N[LINE/8 - M];

0 commit comments

Comments
 (0)