Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 204922
b: refs/heads/master
c: f1d4c3a
h: refs/heads/master
v: v3
  • Loading branch information
Grant Likely committed Jul 15, 2010
1 parent 127e022 commit 39db459
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 596c955c126608b51ac1ca56de9d670c1f6464cb
refs/heads/master: f1d4c3a76981addcd7669f404f75041435a04e6a
7 changes: 0 additions & 7 deletions trunk/arch/microblaze/include/asm/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,6 @@
#define PAGE_UP(addr) (((addr)+((PAGE_SIZE)-1))&(~((PAGE_SIZE)-1)))
#define PAGE_DOWN(addr) ((addr)&(~((PAGE_SIZE)-1)))

/* align addr on a size boundary - adjust address up/down if needed */
#define _ALIGN_UP(addr, size) (((addr)+((size)-1))&(~((size)-1)))
#define _ALIGN_DOWN(addr, size) ((addr)&(~((size)-1)))

/* align addr on a size boundary - adjust address up if needed */
#define _ALIGN(addr, size) _ALIGN_UP(addr, size)

#ifndef CONFIG_MMU
/*
* PAGE_OFFSET -- the first address of the first page of memory. When not
Expand Down
20 changes: 10 additions & 10 deletions trunk/drivers/of/fdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ int __init of_scan_flat_dt(int (*it)(unsigned long node,
u32 sz = be32_to_cpup((__be32 *)p);
p += 8;
if (be32_to_cpu(initial_boot_params->version) < 0x10)
p = _ALIGN(p, sz >= 8 ? 8 : 4);
p = ALIGN(p, sz >= 8 ? 8 : 4);
p += sz;
p = _ALIGN(p, 4);
p = ALIGN(p, 4);
continue;
}
if (tag != OF_DT_BEGIN_NODE) {
Expand All @@ -80,7 +80,7 @@ int __init of_scan_flat_dt(int (*it)(unsigned long node,
}
depth++;
pathp = (char *)p;
p = _ALIGN(p + strlen(pathp) + 1, 4);
p = ALIGN(p + strlen(pathp) + 1, 4);
if ((*pathp) == '/') {
char *lp, *np;
for (lp = NULL, np = pathp; *np; np++)
Expand Down Expand Up @@ -109,7 +109,7 @@ unsigned long __init of_get_flat_dt_root(void)
p += 4;
BUG_ON(be32_to_cpup((__be32 *)p) != OF_DT_BEGIN_NODE);
p += 4;
return _ALIGN(p + strlen((char *)p) + 1, 4);
return ALIGN(p + strlen((char *)p) + 1, 4);
}

/**
Expand Down Expand Up @@ -138,7 +138,7 @@ void *__init of_get_flat_dt_prop(unsigned long node, const char *name,
noff = be32_to_cpup((__be32 *)(p + 4));
p += 8;
if (be32_to_cpu(initial_boot_params->version) < 0x10)
p = _ALIGN(p, sz >= 8 ? 8 : 4);
p = ALIGN(p, sz >= 8 ? 8 : 4);

nstr = find_flat_dt_string(noff);
if (nstr == NULL) {
Expand All @@ -151,7 +151,7 @@ void *__init of_get_flat_dt_prop(unsigned long node, const char *name,
return (void *)p;
}
p += sz;
p = _ALIGN(p, 4);
p = ALIGN(p, 4);
} while (1);
}

Expand Down Expand Up @@ -184,7 +184,7 @@ static void *__init unflatten_dt_alloc(unsigned long *mem, unsigned long size,
{
void *res;

*mem = _ALIGN(*mem, align);
*mem = ALIGN(*mem, align);
res = (void *)*mem;
*mem += size;

Expand Down Expand Up @@ -220,7 +220,7 @@ unsigned long __init unflatten_dt_node(unsigned long mem,
*p += 4;
pathp = (char *)*p;
l = allocl = strlen(pathp) + 1;
*p = _ALIGN(*p + l, 4);
*p = ALIGN(*p + l, 4);

/* version 0x10 has a more compact unit name here instead of the full
* path. we accumulate the full path size using "fpsize", we'll rebuild
Expand Down Expand Up @@ -299,7 +299,7 @@ unsigned long __init unflatten_dt_node(unsigned long mem,
noff = be32_to_cpup((__be32 *)((*p) + 4));
*p += 8;
if (be32_to_cpu(initial_boot_params->version) < 0x10)
*p = _ALIGN(*p, sz >= 8 ? 8 : 4);
*p = ALIGN(*p, sz >= 8 ? 8 : 4);

pname = find_flat_dt_string(noff);
if (pname == NULL) {
Expand Down Expand Up @@ -333,7 +333,7 @@ unsigned long __init unflatten_dt_node(unsigned long mem,
*prev_pp = pp;
prev_pp = &pp->next;
}
*p = _ALIGN((*p) + sz, 4);
*p = ALIGN((*p) + sz, 4);
}
/* with version 0x10 we may not have the name property, recreate
* it here from the unit name if absent
Expand Down

0 comments on commit 39db459

Please sign in to comment.