forked from Imagelibrary/seL4
Merge pull request #24 in SEL4/sel4 from ~MFERNANDEZ/sel4:4bfffad6-8c14-469d-8790-ea2e8d556805 to master
* commit '4bafc8b54728440b305961fdb0a914cb513b5661': Remove now-unused CLZL macro. Remove CLZ indirection via the CLZL macro. Remove `boot_clzl`. Fix missing include.
This commit is contained in:
@@ -89,6 +89,5 @@ CONST clzl(unsigned long x)
|
||||
}
|
||||
|
||||
#define CTZL(x) __builtin_ctzl(x)
|
||||
#define CLZL(x) clzl(x)
|
||||
|
||||
#endif /* __UTIL_H */
|
||||
|
||||
@@ -80,7 +80,7 @@ clean_D_PoU(void)
|
||||
word_t s = readCacheSize(l, 0);
|
||||
int lbits = LINEBITS(s);
|
||||
int assoc = ASSOC(s);
|
||||
int assoc_bits = wordBits - CLZL(assoc - 1);
|
||||
int assoc_bits = wordBits - clzl(assoc - 1);
|
||||
int nsets = NSETS(s);
|
||||
int w;
|
||||
|
||||
@@ -108,7 +108,7 @@ cleanInvalidate_D_PoC(void)
|
||||
word_t s = readCacheSize(l, 0);
|
||||
int lbits = LINEBITS(s);
|
||||
int assoc = ASSOC(s);
|
||||
int assoc_bits = wordBits - CLZL(assoc - 1);
|
||||
int assoc_bits = wordBits - clzl(assoc - 1);
|
||||
int nsets = NSETS(s);
|
||||
int w;
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <arch/kernel/vspace.h>
|
||||
#include <arch/linker.h>
|
||||
#include <plat/machine/hardware.h>
|
||||
#include <util.h>
|
||||
|
||||
/* (node-local) state accessed only during bootstrapping */
|
||||
|
||||
@@ -452,14 +453,6 @@ provide_untyped_cap(
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
DONT_TRANSLATE
|
||||
*/
|
||||
BOOT_CODE static word_t boot_clzl (word_t x)
|
||||
{
|
||||
return CLZL (x);
|
||||
}
|
||||
|
||||
/**
|
||||
DONT_TRANSLATE
|
||||
*/
|
||||
@@ -480,7 +473,7 @@ create_untypeds_for_region(
|
||||
|
||||
while (!is_reg_empty(reg)) {
|
||||
/* Determine the maximum size of the region */
|
||||
size_bits = WORD_BITS - 1 - boot_clzl(reg.end - reg.start);
|
||||
size_bits = WORD_BITS - 1 - clzl(reg.end - reg.start);
|
||||
|
||||
/* Determine the alignment of the region */
|
||||
align_bits = boot_ctzl(reg.start);
|
||||
|
||||
@@ -318,8 +318,8 @@ chooseThread(void)
|
||||
}
|
||||
|
||||
if (likely(ksReadyQueuesL1Bitmap[dom])) {
|
||||
word_t l1index = (wordBits - 1) - CLZL(ksReadyQueuesL1Bitmap[dom]);
|
||||
word_t l2index = (wordBits - 1) - CLZL(ksReadyQueuesL2Bitmap[dom][l1index]);
|
||||
word_t l1index = (wordBits - 1) - clzl(ksReadyQueuesL1Bitmap[dom]);
|
||||
word_t l2index = (wordBits - 1) - clzl(ksReadyQueuesL2Bitmap[dom][l1index]);
|
||||
prio = l1index_to_prio(l1index) | l2index;
|
||||
thread = ksReadyQueues[ready_queues_index(dom, prio)].head;
|
||||
assert(thread);
|
||||
|
||||
Reference in New Issue
Block a user