hw: [[fallthrough]] annotations for ARM/RISC-V

* double checked

issue #3377
This commit is contained in:
Sebastian Sumpf 2019-05-27 13:45:01 +02:00 committed by Christian Helmuth
parent ca39a9ea61
commit cec050983a
3 changed files with 9 additions and 6 deletions

View File

@ -210,7 +210,7 @@ class Hw::Long_translation_table
switch (f.cacheable) {
case Genode::CACHED: return Attribute_index::bits(CACHED);
case Genode::WRITE_COMBINED:
case Genode::WRITE_COMBINED: [[fallthrough]];
case Genode::UNCACHED: return Attribute_index::bits(UNCACHED);
}
return 0;
@ -434,7 +434,7 @@ class Hw::Level_x_translation_table :
E & table = alloc.construct<E>();
desc = Table_descriptor::create((void*)alloc.phys_addr(table));
}
[[fallthrough]];
case Descriptor::TABLE: /* table already available */
{
/* use allocator to retrieve virt address of table */
@ -476,8 +476,8 @@ class Hw::Level_x_translation_table :
size, alloc);
if (!table.empty()) break;
alloc.destruct<E>(table);
}
case Descriptor::BLOCK:
} [[fallthrough]];
case Descriptor::BLOCK: [[fallthrough]];
case Descriptor::INVALID:
desc = 0;
}

View File

@ -64,7 +64,7 @@ class Hw::Page_table
T::Tex::set(v, _device_tex());
} else {
switch (f.cacheable) {
case CACHED: T::Tex::set(v, 5);
case CACHED: T::Tex::set(v, 5); [[fallthrough]];
case WRITE_COMBINED: T::B::set(v, 1); break;
case UNCACHED: T::Tex::set(v, 1); break;
}
@ -434,6 +434,7 @@ class Hw::Page_table
_entries[i] = Ptd::create(alloc.phys_addr(pt));
_translation_added((addr_t)&_entries[i], sizeof(Ptd));
}
[[fallthrough]];
case Descriptor::PAGE_TABLE:
{

View File

@ -238,6 +238,7 @@ class Sv39::Level_x_translation_table
E & table = alloc.construct<E>();
desc = Td::create((void*)alloc.phys_addr(table));
}
[[fallthrough]];
case Descriptor::TABLE: /* table already available */
{
@ -277,7 +278,8 @@ class Sv39::Level_x_translation_table
if (!table.empty()) break;
alloc.destruct<E>(table);
}
case Descriptor::BLOCK:
[[fallthrough]];
case Descriptor::BLOCK: [[fallthrough]];
case Descriptor::INVALID:
desc = 0;
}