def map_preempt_rt_kbranch(need_new_kbranch, new_kbranch, existing_kbranch):
    """
    Return the linux-yocto bsp branch to use with the specified
    kbranch.  This handles the -preempt-rt variants for 3.4 and 3.8;
    the other variants don't need mappings.
    """
    if need_new_kbranch == "y":
        kbranch = new_kbranch
    else:
        kbranch = existing_kbranch

    if kbranch.startswith("standard/preempt-rt/common-pc-64"):
        return "bsp/common-pc-64/common-pc-64-preempt-rt.scc"
    if kbranch.startswith("standard/preempt-rt/common-pc"):
        return "bsp/common-pc/common-pc-preempt-rt.scc"
    else:
        return "ktypes/preempt-rt/preempt-rt.scc"