These are on non-performance-critical paths inside of read/write
methods invoked from system calls. Remove them.

Signed-off-by: Dan Cross <[email protected]>
---
 kern/arch/x86/msr.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/kern/arch/x86/msr.c b/kern/arch/x86/msr.c
index 7db2262..7a944de 100644
--- a/kern/arch/x86/msr.c
+++ b/kern/arch/x86/msr.c
@@ -40,12 +40,12 @@ static void msr_smp_read(void *opaque)
        uint64_t value;
 
        err = msr_get_core_address(coreno, srv->msra, &addr);
-       if (likely(!err)) {
+       if (!err) {
                err = safe_read_msr(addr, &value);
-               if (likely(!err))
+               if (!err)
                        err = msr_set_core_value(coreno, value, srv->msrv);
        }
-       if (unlikely(err))
+       if (err)
                atomic_cas(&srv->err, 0, err);
 }
 
@@ -89,12 +89,12 @@ static void msr_smp_write(void *opaque)
        uint64_t value;
 
        err = msr_get_core_address(coreno, swv->msra, &addr);
-       if (likely(!err)) {
+       if (!err) {
                err = msr_get_core_value(coreno, swv->msrv, &value);
-               if (likely(!err))
+               if (!err)
                        err = safe_write_msr(addr, value);
        }
-       if (unlikely(err))
+       if (err)
                atomic_cas(&swv->err, 0, err);
 }
 
-- 
2.7.0.rc3.207.g0ac5344

-- 
You received this message because you are subscribed to the Google Groups 
"Akaros" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to