#define IOMMU_PAGE_SHIFT_4K      12
 #define IOMMU_PAGE_SIZE_4K       (ASM_CONST(1) << IOMMU_PAGE_SHIFT_4K)
 #define IOMMU_PAGE_MASK_4K       (~((1 << IOMMU_PAGE_SHIFT_4K) - 1))
-#define IOMMU_PAGE_ALIGN_4K(addr) _ALIGN_UP(addr, IOMMU_PAGE_SIZE_4K)
+#define IOMMU_PAGE_ALIGN_4K(addr) ALIGN(addr, IOMMU_PAGE_SIZE_4K)
 
 #define IOMMU_PAGE_SIZE(tblptr) (ASM_CONST(1) << (tblptr)->it_page_shift)
 #define IOMMU_PAGE_MASK(tblptr) (~((1 << (tblptr)->it_page_shift) - 1))
-#define IOMMU_PAGE_ALIGN(addr, tblptr) _ALIGN_UP(addr, IOMMU_PAGE_SIZE(tblptr))
+#define IOMMU_PAGE_ALIGN(addr, tblptr) ALIGN(addr, IOMMU_PAGE_SIZE(tblptr))
 
 /* Boot time flags */
 extern int iommu_is_off;
 
 };
 
 /* ensure this structure is always sized to a multiple of the stack alignment */
-#define STACK_EXC_LVL_FRAME_SIZE       _ALIGN_UP(sizeof (struct exception_regs), 16)
+#define STACK_EXC_LVL_FRAME_SIZE       ALIGN(sizeof (struct exception_regs), 16)
 
 #endif /* __ASSEMBLY__ */
 #endif /* __HEAD_BOOKE_H__ */
 
        BUILD_BUG_ON(NVRAM_BLOCK_LEN != 16);
 
        /* Convert sizes from bytes to blocks */
-       req_size = _ALIGN_UP(req_size, NVRAM_BLOCK_LEN) / NVRAM_BLOCK_LEN;
-       min_size = _ALIGN_UP(min_size, NVRAM_BLOCK_LEN) / NVRAM_BLOCK_LEN;
+       req_size = ALIGN(req_size, NVRAM_BLOCK_LEN) / NVRAM_BLOCK_LEN;
+       min_size = ALIGN(min_size, NVRAM_BLOCK_LEN) / NVRAM_BLOCK_LEN;
 
        /* If no minimum size specified, make it the same as the
         * requested size
 
        unsigned long io_virt_offset;
 
        phys_page = ALIGN_DOWN(hose->io_base_phys, PAGE_SIZE);
-       size_page = _ALIGN_UP(hose->pci_io_size, PAGE_SIZE);
+       size_page = ALIGN(hose->pci_io_size, PAGE_SIZE);
 
        /* Make sure IO area address is clear */
        hose->io_base_alloc = NULL;
 
                return 0;
 
        return  (start + size) > ALIGN_DOWN(initrd_start, PAGE_SIZE) &&
-                       start <= _ALIGN_UP(initrd_end, PAGE_SIZE);
+                       start <= ALIGN(initrd_end, PAGE_SIZE);
 #else
        return 0;
 #endif
        /* Then reserve the initrd, if any */
        if (initrd_start && (initrd_end > initrd_start)) {
                memblock_reserve(ALIGN_DOWN(__pa(initrd_start), PAGE_SIZE),
-                       _ALIGN_UP(initrd_end, PAGE_SIZE) -
+                       ALIGN(initrd_end, PAGE_SIZE) -
                        ALIGN_DOWN(initrd_start, PAGE_SIZE));
        }
 #endif /* CONFIG_BLK_DEV_INITRD */
 
        unsigned long addr = 0;
 
        if (align)
-               base = _ALIGN_UP(base, align);
+               base = ALIGN(base, align);
        prom_debug("%s(%lx, %lx)\n", __func__, size, align);
        if (ram_top == 0)
                prom_panic("alloc_up() called with mem not initialized\n");
 
        if (align)
-               base = _ALIGN_UP(alloc_bottom, align);
+               base = ALIGN(alloc_bottom, align);
        else
                base = alloc_bottom;
 
        for(; (base + size) <= alloc_top; 
-           base = _ALIGN_UP(base + 0x100000, align)) {
+           base = ALIGN(base + 0x100000, align)) {
                prom_debug("    trying: 0x%lx\n\r", base);
                addr = (unsigned long)prom_claim(base, size, 0);
                if (addr != PROM_ERROR && addr != 0)
         * dumb and just copy this entire array to the boot params
         */
        base = ALIGN_DOWN(base, PAGE_SIZE);
-       top = _ALIGN_UP(top, PAGE_SIZE);
+       top = ALIGN(top, PAGE_SIZE);
        size = top - base;
 
        if (cnt >= (MEM_RESERVE_MAP_SIZE - 1))
 
 
        idx = (ioba >> stt->page_shift) - stt->offset;
        sttpage = idx / TCES_PER_PAGE;
-       sttpages = _ALIGN_UP(idx % TCES_PER_PAGE + npages, TCES_PER_PAGE) /
+       sttpages = ALIGN(idx % TCES_PER_PAGE + npages, TCES_PER_PAGE) /
                        TCES_PER_PAGE;
        for (i = sttpage; i < sttpage + sttpages; ++i)
                if (!stt->pages[i])
 
        unsigned long flags;
 
        start = ALIGN_DOWN(start, PAGE_SIZE);
-       end = _ALIGN_UP(end, PAGE_SIZE);
+       end = ALIGN(end, PAGE_SIZE);
 
 
        /*
 
        pgprot_t prot;
        int psize;
 
-       start = _ALIGN_UP(start, PAGE_SIZE);
+       start = ALIGN(start, PAGE_SIZE);
        for (addr = start; addr < end; addr += mapping_size) {
                unsigned long gap, previous_size;
                int rc;
 
 
        /* If hint, make sure it matches our alignment restrictions */
        if (!fixed && addr) {
-               addr = _ALIGN_UP(addr, page_size);
+               addr = ALIGN(addr, page_size);
                slice_dbg(" aligned addr=%lx\n", addr);
                /* Ignore hint if it's too large or overlaps a VMA */
                if (addr > high_limit - len || addr < mmap_min_addr ||
 
                fbase = max(fbase, dbase + dsize);
        }
 
-       fbase = _ALIGN_UP(fbase, 1 << IO_SEGMENT_SHIFT);
+       fbase = ALIGN(fbase, 1 << IO_SEGMENT_SHIFT);
        fsize = memblock_phys_mem_size();
 
        if ((fbase + fsize) <= 0x800000000ul)
                hend  = hbase + htab_size_bytes;
 
                /* The window must start and end on a segment boundary */
-               if ((hbase != _ALIGN_UP(hbase, 1 << IO_SEGMENT_SHIFT)) ||
-                   (hend != _ALIGN_UP(hend, 1 << IO_SEGMENT_SHIFT))) {
+               if ((hbase != ALIGN(hbase, 1 << IO_SEGMENT_SHIFT)) ||
+                   (hend != ALIGN(hend, 1 << IO_SEGMENT_SHIFT))) {
                        pr_debug("iommu: hash window not segment aligned\n");
                        return -1;
                }
 
 
 #define dt_push_token(token, mem) \
        do { \
-               *(mem) = _ALIGN_UP(*(mem),4); \
+               *(mem) = ALIGN(*(mem),4); \
                *((u32 *)*(mem)) = token; \
                *(mem) += 4; \
        } while(0)
        /* push property content */
        if (size && data) {
                memcpy((void *)*mem_end, data, size);
-               *mem_end = _ALIGN_UP(*mem_end + size, 4);
+               *mem_end = ALIGN(*mem_end + size, 4);
        }
 }
 
                        *lp++ = *p;
        }
        *lp = 0;
-       *mem_end = _ALIGN_UP((unsigned long)lp + 1, 4);
+       *mem_end = ALIGN((unsigned long)lp + 1, 4);
 
        /* get and store all properties */
        while (*ppp) {
        /* Start using memory after the big blob passed by BootX, get
         * some space for the header
         */
-       mem_start = mem_end = _ALIGN_UP(((unsigned long)bi) + start, 4);
+       mem_start = mem_end = ALIGN(((unsigned long)bi) + start, 4);
        DBG("Boot params header at: %x\n", mem_start);
        hdr = (struct boot_param_header *)mem_start;
        mem_end += sizeof(struct boot_param_header);
-       rsvmap = (u64 *)(_ALIGN_UP(mem_end, 8));
+       rsvmap = (u64 *)(ALIGN(mem_end, 8));
        hdr->off_mem_rsvmap = ((unsigned long)rsvmap) - mem_start;
        mem_end = ((unsigned long)rsvmap) + 8 * sizeof(u64);
 
 
                        continue;
 
                start = ALIGN_DOWN(r->start - base, sgsz);
-               end = _ALIGN_UP(r->end - base, sgsz);
+               end = ALIGN(r->end - base, sgsz);
                for (segno = start / sgsz; segno < end / sgsz; segno++) {
                        if (pe_bitmap)
                                set_bit(segno, pe_bitmap);
                return NULL;
 
        /* Allocate bitmap */
-       size = _ALIGN_UP(phb->ioda.total_pe_num / 8, sizeof(unsigned long));
+       size = ALIGN(phb->ioda.total_pe_num / 8, sizeof(unsigned long));
        pe_alloc = kzalloc(size, GFP_KERNEL);
        if (!pe_alloc) {
                pr_warn("%s: Out of memory !\n",
        direct_table_size =  1UL << table_shift;
 
        for ( ; levels; --levels) {
-               bytes += _ALIGN_UP(tce_table_size, direct_table_size);
+               bytes += ALIGN(tce_table_size, direct_table_size);
 
                tce_table_size /= direct_table_size;
                tce_table_size <<= 3;
                                PNV_IODA1_DMA32_SEGSIZE;
 
        /* Allocate aux data & arrays. We don't have IO ports on PHB3 */
-       size = _ALIGN_UP(max_t(unsigned, phb->ioda.total_pe_num, 8) / 8,
+       size = ALIGN(max_t(unsigned, phb->ioda.total_pe_num, 8) / 8,
                        sizeof(unsigned long));
        m64map_off = size;
        size += phb->ioda.total_pe_num * sizeof(phb->ioda.m64_segmap[0]);
 
 {
        struct dma_chunk *c;
        unsigned long aligned_bus = ALIGN_DOWN(bus_addr, 1 << r->page_size);
-       unsigned long aligned_len = _ALIGN_UP(len+bus_addr-aligned_bus,
+       unsigned long aligned_len = ALIGN(len+bus_addr-aligned_bus,
                                              1 << r->page_size);
 
        list_for_each_entry(c, &r->chunk_list.head, link) {
 {
        struct dma_chunk *c;
        unsigned long aligned_lpar = ALIGN_DOWN(lpar_addr, 1 << r->page_size);
-       unsigned long aligned_len = _ALIGN_UP(len + lpar_addr - aligned_lpar,
+       unsigned long aligned_len = ALIGN(len + lpar_addr - aligned_lpar,
                                              1 << r->page_size);
 
        list_for_each_entry(c, &r->chunk_list.head, link) {
        unsigned long phys_addr = is_kernel_addr(virt_addr) ? __pa(virt_addr)
                : virt_addr;
        unsigned long aligned_phys = ALIGN_DOWN(phys_addr, 1 << r->page_size);
-       unsigned long aligned_len = _ALIGN_UP(len + phys_addr - aligned_phys,
+       unsigned long aligned_len = ALIGN(len + phys_addr - aligned_phys,
                                              1 << r->page_size);
        *bus_addr = dma_sb_lpar_to_bus(r, ps3_mm_phys_to_lpar(phys_addr));
 
        unsigned long phys_addr = is_kernel_addr(virt_addr) ? __pa(virt_addr)
                : virt_addr;
        unsigned long aligned_phys = ALIGN_DOWN(phys_addr, 1 << r->page_size);
-       unsigned long aligned_len = _ALIGN_UP(len + phys_addr - aligned_phys,
+       unsigned long aligned_len = ALIGN(len + phys_addr - aligned_phys,
                                              1 << r->page_size);
 
        DBG(KERN_ERR "%s: vaddr=%#lx, len=%#lx\n", __func__,
        if (!c) {
                unsigned long aligned_bus = ALIGN_DOWN(bus_addr,
                        1 << r->page_size);
-               unsigned long aligned_len = _ALIGN_UP(len + bus_addr
+               unsigned long aligned_len = ALIGN(len + bus_addr
                        - aligned_bus, 1 << r->page_size);
                DBG("%s:%d: not found: bus_addr %llxh\n",
                        __func__, __LINE__, bus_addr);
        if (!c) {
                unsigned long aligned_bus = ALIGN_DOWN(bus_addr,
                                                        1 << r->page_size);
-               unsigned long aligned_len = _ALIGN_UP(len + bus_addr
+               unsigned long aligned_len = ALIGN(len + bus_addr
                                                      - aligned_bus,
                                                      1 << r->page_size);
                DBG("%s:%d: not found: bus_addr %llxh\n",
                        pr_info("%s:%d: forcing 16M pages for linear map\n",
                                __func__, __LINE__);
                        r->page_size = PS3_DMA_16M;
-                       r->len = _ALIGN_UP(r->len, 1 << r->page_size);
+                       r->len = ALIGN(r->len, 1 << r->page_size);
                }
        }
 
        r->offset = lpar_addr;
        if (r->offset >= map.rm.size)
                r->offset -= map.r1.offset;
-       r->len = len ? len : _ALIGN_UP(map.total, 1 << r->page_size);
+       r->len = len ? len : ALIGN(map.total, 1 << r->page_size);
 
        switch (dev->dev_type) {
        case PS3_DEVICE_TYPE_SB:
 
        if (!p)
                return 1;
 
-       ps3fb_videomemory.size = _ALIGN_UP(memparse(p, &p),
+       ps3fb_videomemory.size = ALIGN(memparse(p, &p),
                                           ps3fb_videomemory.align);
        return 0;
 }