Changeset 178180aa in rtems


Ignore:
Timestamp:
Apr 22, 2016, 11:02:55 AM (4 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
0ac0632
Parents:
d35e6dde
git-author:
Sebastian Huber <sebastian.huber@…> (04/22/16 11:02:55)
git-committer:
Sebastian Huber <sebastian.huber@…> (04/22/16 12:30:06)
Message:

bsps: Copy FDT only if source != destination

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/shared/src/bsp-fdt.c

    rd35e6dde r178180aa  
    4343  uint32_t *d = &bsp_fdt_blob[0];
    4444#endif
    45   uint32_t m = MIN(sizeof(bsp_fdt_blob), fdt_totalsize(src));
    46   uint32_t n = (m + sizeof(*d) - 1) / sizeof(*d);
    47   uint32_t i;
    4845
    49   for (i = 0; i < n; ++i) {
    50     d[i] = s[i];
     46  if (s != d) {
     47    uint32_t m = MIN(sizeof(bsp_fdt_blob), fdt_totalsize(src));
     48    uint32_t n = (m + sizeof(*d) - 1) / sizeof(*d);
     49    uint32_t i;
     50
     51    for (i = 0; i < n; ++i) {
     52      d[i] = s[i];
     53    }
     54
     55    rtems_cache_flush_multiple_data_lines(d, m);
    5156  }
    52 
    53   rtems_cache_flush_multiple_data_lines(d, m);
    5457}
    5558
Note: See TracChangeset for help on using the changeset viewer.