• Serge Semin's avatar
    mips: cm: Convert __mips_cm_l2sync_phys_base() to weak function · 8bc8db2a
    Serge Semin authored
    The __mips_cm_l2sync_phys_base() and mips_cm_l2sync_phys_base() couple was
    introduced in commit 9f98f3dd ("MIPS: Add generic CM probe & access
    code") where the former method was a weak implementation of the later
    function. Such design pattern permitted to re-define the original method
    and to use the weak implementation in the new function. A similar approach
    was introduced in the framework of another arch-specific programmable
    interface: mips_cm_phys_base() and __mips_cm_phys_base(). The only
    difference is that the underscored method of the later couple was declared
    in the "asm/mips-cm.h" header file, but it wasn't done for the CM L2-sync
    methods in the subject. Due to the missing global function declaration
    the "missing prototype" warning was spotted in the framework of the commit
    9a203672 ("mips: mark local function static if possible") and fixed
    just be re-qualifying the weak method as static. Doing that broke what was
    originally implied by having the weak implementation globally defined.
    
    Let's fix the broken CM2 L2-sync arch-interface by dropping the static
    qualifier and, seeing the implemented pattern hasn't been used for over 10
    years but will be required soon (see the link for the discussion around
    it), converting it to a single weakly defined method:
    mips_cm_l2sync_phys_base().
    
    Fixes: 9a203672 ("mips: mark local function static if possible")
    Link: https://lore.kernel.org/linux-mips/20240215171740.14550-3-fancer.lancer@gmail.comSigned-off-by: default avatarSerge Semin <fancer.lancer@gmail.com>
    Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
    8bc8db2a
mips-cm.h 16.3 KB