]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/x86/lib/physmem.c
Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx
[karo-tx-uboot.git] / arch / x86 / lib / physmem.c
index 18f0e62acd0fa2b1473ca0ff41007f09eebe3c64..b57b2c30fe333ba6ac1cfc44a6689ff440b94294 100644 (file)
@@ -12,6 +12,8 @@
 #include <physmem.h>
 #include <linux/compiler.h>
 
+DECLARE_GLOBAL_DATA_PTR;
+
 /* Large pages are 2MB. */
 #define LARGE_PAGE_SIZE ((1 << 20) * 2)
 
@@ -187,7 +189,7 @@ phys_addr_t arch_phys_memset(phys_addr_t start, int c, phys_size_t size)
 
        /* Handle memory below 4GB. */
        if (start <= max_addr) {
-               phys_size_t low_size = MIN(max_addr + 1 - start, size);
+               phys_size_t low_size = min(max_addr + 1 - start, size);
                void *start_ptr = (void *)(uintptr_t)start;
 
                assert(((phys_addr_t)(uintptr_t)start) == start);
@@ -206,7 +208,7 @@ phys_addr_t arch_phys_memset(phys_addr_t start, int c, phys_size_t size)
                /* Handle the first partial page. */
                if (offset) {
                        phys_addr_t end =
-                               MIN(map_addr + LARGE_PAGE_SIZE, start + size);
+                               min(map_addr + LARGE_PAGE_SIZE, start + size);
                        phys_size_t cur_size = end - start;
                        x86_phys_memset_page(map_addr, offset, c, cur_size);
                        size -= cur_size;