Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
  • linux
  • arch
  • powerpc
  • lib
  • code-patching.c
Find file BlameHistoryPermalink
  • Michael Ellerman's avatar
    powerpc: Add ppc_inst_as_u64() · 16ef9767
    Michael Ellerman authored May 26, 2020
    The code patching code wants to get the value of a struct ppc_inst as
    a u64 when the instruction is prefixed, so we can pass the u64 down to
    __put_user_asm() and write it with a single store.
    
    The optprobes code wants to load a struct ppc_inst as an immediate
    into a register so it is useful to have it as a u64 to use the
    existing helper function.
    
    Currently this is a bit awkward because the value differs based on the
    CPU endianness, so add a helper to do the conversion.
    
    This fixes the usage in arch_prepare_optimized_kprobe() which was
    previously incorrect on big endian.
    
    Fixes: 650b55b7
    
     ("powerpc: Add prefixed instructions to instruction data type")
    Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
    Tested-by: default avatarJordan Niethe <jniethe5@gmail.com>
    Link: https://lore.kernel.org/r/20200526072630.2487363-1-mpe@ellerman.id.au
    16ef9767
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7