Skip to content
Snippets Groups Projects
Forked from Eclipse Projects / Oniro Core / linux
Source project has a limited visibility.
  • Nick Kossifidis's avatar
    ffe0e526
    RISC-V: Improve init_resources() · ffe0e526
    Nick Kossifidis authored
    
    The kernel region is always present and we know where it is, no need to
    look for it inside the loop, just ignore it like the rest of the
    reserved regions within system's memory.
    
    Additionally, we don't need to call memblock_free inside the loop, as if
    called it'll split the region of pre-allocated resources in two parts,
    messing things up, just re-use the previous pre-allocated resource and
    free any unused resources after both loops finish.
    
    Signed-off-by: default avatarNick Kossifidis <mick@ics.forth.gr>
    [Palmer: commit text]
    Signed-off-by: default avatarPalmer Dabbelt <palmerdabbelt@google.com>
    RISC-V: Improve init_resources()
    Nick Kossifidis authored
    
    The kernel region is always present and we know where it is, no need to
    look for it inside the loop, just ignore it like the rest of the
    reserved regions within system's memory.
    
    Additionally, we don't need to call memblock_free inside the loop, as if
    called it'll split the region of pre-allocated resources in two parts,
    messing things up, just re-use the previous pre-allocated resource and
    free any unused resources after both loops finish.
    
    Signed-off-by: default avatarNick Kossifidis <mick@ics.forth.gr>
    [Palmer: commit text]
    Signed-off-by: default avatarPalmer Dabbelt <palmerdabbelt@google.com>
Code owners
Assign users and groups as approvers for specific file changes. Learn more.