1. 25 4月, 2014 2 次提交
    • A
      ARM: bcm: use inline assembly for "smc" request · 8b9c550e
      Alex Elder 提交于
      Move the code that implements the "smc" call into a C function that
      uses inline assembly.  This allows us to make that function private,
      and enables us to get rid of "arch/arm/mach-bcm/bcm_kona_smc_asm.S".
      Rename what had been the "buffer_addr" argument to be "buffer_phys"
      so it's consistent with other usage in this file.
      
      Since it's now easy to do, verify that r12 contains SEC_EXIT_NORMAL
      upon completion of the SMC.  There really isn't a good way to handle
      the abnormal completion of a secure monitor request.
      
      Since "bcm_kona_smc.h" is now only included from C files, eliminate
      the #ifndef __ASSEMBLY__.
      Signed-off-by: NAlex Elder <elder@linaro.org>
      Reviewed-by: NTim Kryger <tim.kryger@linaro.org>
      Reviewed-by: NMarkus Mayer <markus.mayer@linaro.org>
      Reviewed-by: NMatt Porter <mporter@linaro.org>
      Signed-off-by: NMatt Porter <mporter@linaro.org>
      8b9c550e
    • A
      ARM: bcm: clean up SMC code · c64756cc
      Alex Elder 提交于
      This patch just does some simple cleanup in "bcm_kona_smc.c":
          - Get rid of the secure_bridge_data structure.  Instead, just
            define two globals that record the physical and virtual
            addresses of the SMC arguments buffer.  Use "buffer" instead
            of "bounce" in their names.  Drop of the erroneous __iomem
            annotation for the physical address.
          - Get rid of the initialized flag and just use a non-null buffer
            address to indicate that.
          - Get the size of the memory region when fetching the SMC
            arguments buffer location from the device tree.  Use it to
            call ioremap() directly rather than requiring of_iomap() to
            go look it up again.
          - Do some additional validation on that memory region size.
          - Flush caches unconditionally in __bcm_kona_smc(); nothing
            supplies SSAPI_BRCM_START_VC_CORE as a service id.
          - Drop a needless initialization of "rc" in __bcm_kona_smc().
      
      It also deletes most of the content of "bcm_kona_smc.h" because it's
      never actually used and is of questionable value anyway.
      Signed-off-by: NAlex Elder <elder@linaro.org>
      Reviewed-by: NTim Kryger <tim.kryger@linaro.org>
      Reviewed-by: NMarkus Mayer <markus.mayer@linaro.org>
      Reviewed-by: NMatt Porter <mporter@linaro.org>
      Signed-off-by: NMatt Porter <mporter@linaro.org>
      c64756cc
  2. 21 8月, 2013 1 次提交
  3. 10 4月, 2013 1 次提交