]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Use b.ge form for instructions
authorVladimir Serbinenko <phcoder@gmail.com>
Mon, 25 Nov 2013 12:04:44 +0000 (13:04 +0100)
committerVladimir Serbinenko <phcoder@gmail.com>
Mon, 25 Nov 2013 12:04:44 +0000 (13:04 +0100)
grub-core/kern/arm64/cache.c
grub-core/kern/arm64/cache_flush.S

index c4f02b868a91da594227534f0f6966f3bcbb1449..b84383da1c7614004280940e12aa2b75efb3de64 100644 (file)
@@ -31,7 +31,7 @@ void grub_arch_invalidate_icache_range (grub_addr_t beg, grub_addr_t end,
 static void
 probe_caches (void)
 {
-  grub_uint32_t cache_type;
+  grub_uint64_t cache_type;
 
   /* Read Cache Type Register */
   asm volatile ("mrs   %0, ctr_el0": "=r"(cache_type));
@@ -46,17 +46,17 @@ probe_caches (void)
 void
 grub_arch_sync_caches (void *address, grub_size_t len)
 {
-  grub_uint64_t start, end, max;
+  grub_uint64_t start, end, max_align;
 
   if (dlinesz == 0)
     probe_caches();
   if (dlinesz == 0)
     grub_fatal ("Unknown cache line size!");
 
-  max = dlinesz > ilinesz ? dlinesz : ilinesz;
+  max_align = dlinesz > ilinesz ? dlinesz : ilinesz;
 
-  start = ALIGN_DOWN ((grub_uint64_t) address, max);
-  end = ALIGN_UP ((grub_uint64_t) address + len, max);
+  start = ALIGN_DOWN ((grub_uint64_t) address, max_align);
+  end = ALIGN_UP ((grub_uint64_t) address + len, max_align);
 
   grub_arch_clean_dcache_range (start, end, dlinesz);
   grub_arch_invalidate_icache_range (start, end, ilinesz);
index 589e8eb7aa15c6beca5bb6c7d5185af768beb576..e064f7ecedb4d707507854cad66f173c3d4f5014 100644 (file)
@@ -31,7 +31,7 @@
 FUNCTION(grub_arch_clean_dcache_range)
        // Clean data cache for range to point-of-unification
 1:     cmp     x0, x1
-       bge     2f
+       b.ge    2f
        dc      cvau, x0                // Clean Virtual Address to PoU
        add     x0, x0, x2              // Next line
        b       1b
@@ -45,7 +45,7 @@ FUNCTION(grub_arch_clean_dcache_range)
 FUNCTION(grub_arch_invalidate_icache_range)
        // Invalidate instruction cache for range to point-of-unification
 1:     cmp     x0, x1
-       bge     2f
+       b.ge    2f
        ic      ivau, x0                // Invalidate Virtual Address to PoU
        add     x0, x0, x2              // Next line
        b       1b