02 Mar, 2017

2 commits


24 Feb, 2017

2 commits

  • Pull ARM SoC driver updates from Arnd Bergmann:
    "Driver updates for ARM SoCs.

    A handful of driver changes this time around. The larger changes are:

    - Reset drivers for hi3660 and zx2967

    - AHCI driver for Davinci, acked by Tejun and brought in here due to
    platform dependencies

    - Cleanups of atmel-ebi (External Bus Interface)

    - Tweaks for Rockchip GRF (General Register File) usage (kitchensink
    misc register range on the SoCs)

    - PM domains changes for support of two new ZTE SoCs (zx296718 and
    zx2967)"

    * tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (53 commits)
    soc: samsung: pmu: Add register defines for pad retention control
    reset: make zx2967 explicitly non-modular
    reset: core: fix reset_control_put
    soc: samsung: pm_domains: Read domain name from the new label property
    soc: samsung: pm_domains: Remove message about failed memory allocation
    soc: samsung: pm_domains: Remove unused name field
    soc: samsung: pm_domains: Use full names in subdomains registration log
    sata: ahci-da850: un-hardcode the MPY bits
    sata: ahci-da850: add a workaround for controller instability
    sata: ahci: export ahci_do_hardreset() locally
    sata: ahci-da850: implement a workaround for the softreset quirk
    sata: ahci-da850: add device tree match table
    sata: ahci-da850: get the sata clock using a connection id
    soc: samsung: pmu: Remove duplicated define for ARM_L2_OPTION register
    memory: atmel-ebi: Enable the SMC clock if specified
    soc: samsung: pmu: Remove unused and duplicated defines
    memory: atmel-ebi: Properly handle multiple reference to the same CS
    memory: atmel-ebi: Fix the test to enable generic SMC logic
    soc: samsung: pm_domains: Add new Exynos5433 compatible
    soc: samsung: pmu: Add dummy support for Exynos5433 SoC
    ...

    Linus Torvalds
     
  • Pull ARM SoC non-urgent fixes from Arnd Bergmann:
    "We sometimes collect non-critical fixes that come in during the later
    part of the merge window in a branch for the next release instead, and
    this is that contents for v4.11.

    Most of these are OMAP fixes, dealing with OMAP36/37 detection, quirks
    and setup. There's also some fixes for Davinci and a Kconfig fix for
    SCPI to only enable on ARM{,64}"

    * tag 'armsoc-fixes-nc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
    firmware: arm_scpi: Add hardware dependencies
    ARM: OMAP3: Fix SoC detection of OMAP36/37 Family
    ARM: OMAP5: Add HWMOD_SWSUP_SIDLE_ACT flag for UART
    ARM: dts: Fix compatible for ti81xx uarts for 8250
    ARM: dts: Fix am335x and dm814x scm syscon to probe children
    ARM: OMAP2+: Fix init for multiple quirks for the same SoC
    ARM: dts: Fix omap3 off mode pull defines
    bus: da850-mstpri: fix my e-mail address
    ARM: davinci: da850: fix da850_set_pll0rate()
    ARM: davinci: da850: coding style fix

    Linus Torvalds
     

23 Feb, 2017

1 commit

  • Pull arm64 updates from Will Deacon:
    - Errata workarounds for Qualcomm's Falkor CPU
    - Qualcomm L2 Cache PMU driver
    - Qualcomm SMCCC firmware quirk
    - Support for DEBUG_VIRTUAL
    - CPU feature detection for userspace via MRS emulation
    - Preliminary work for the Statistical Profiling Extension
    - Misc cleanups and non-critical fixes

    * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (74 commits)
    arm64/kprobes: consistently handle MRS/MSR with XZR
    arm64: cpufeature: correctly handle MRS to XZR
    arm64: traps: correctly handle MRS/MSR with XZR
    arm64: ptrace: add XZR-safe regs accessors
    arm64: include asm/assembler.h in entry-ftrace.S
    arm64: fix warning about swapper_pg_dir overflow
    arm64: Work around Falkor erratum 1003
    arm64: head.S: Enable EL1 (host) access to SPE when entered at EL2
    arm64: arch_timer: document Hisilicon erratum 161010101
    arm64: use is_vmalloc_addr
    arm64: use linux/sizes.h for constants
    arm64: uaccess: consistently check object sizes
    perf: add qcom l2 cache perf events driver
    arm64: remove wrong CONFIG_PROC_SYSCTL ifdef
    ARM: smccc: Update HVC comment to describe new quirk parameter
    arm64: do not trace atomic operations
    ACPI/IORT: Fix the error return code in iort_add_smmu_platform_device()
    ACPI/IORT: Fix iort_node_get_id() mapping entries indexing
    arm64: mm: enable CONFIG_HOLES_IN_ZONE for NUMA
    perf: xgene: Include module.h
    ...

    Linus Torvalds
     

07 Feb, 2017

4 commits

  • The ARM decompressor is finicky when it comes to uninitialized variables
    with local linkage, the reason being that it may relocate .text and .bss
    independently when executing from ROM. This is only possible if all
    references into .bss from .text are absolute, and this happens to be the
    case for references emitted under -fpic to symbols with external linkage,
    and so all .bss references must involve symbols with external linkage.

    When building the ARM stub using clang, the initialized local variable
    __chunk_size is optimized into a zero-initialized flag that indicates
    whether chunking is in effect or not. This flag is therefore emitted into
    .bss, which triggers the ARM decompressor's diagnostics, resulting in a
    failed build.

    Under UEFI, we never execute the decompressor from ROM, so the diagnostic
    makes little sense here. But we can easily work around the issue by making
    __chunk_size global instead.

    However, given that the file I/O chunking that is controlled by the
    __chunk_size variable is intended to work around known bugs on various
    x86 implementations of UEFI, we can simply make the chunking an x86
    specific feature. This is an improvement by itself, and also removes the
    need to parse the efi= options in the stub entirely.

    Tested-by: Arnd Bergmann
    Signed-off-by: Ard Biesheuvel
    Reviewed-by: Matt Fleming
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: linux-efi@vger.kernel.org
    Link: http://lkml.kernel.org/r/1486380166-31868-8-git-send-email-ard.biesheuvel@linaro.org
    [ Small readability edits. ]
    Signed-off-by: Ingo Molnar

    Ard Biesheuvel
     
  • A user can manually tell the shim boot loader to disable validation of
    images it loads. When a user does this, it creates a UEFI variable called
    MokSBState that does not have the runtime attribute set. Given that the
    user explicitly disabled validation, we can honor that and not enable
    secure boot mode if that variable is set.

    Signed-off-by: Josh Boyer
    Signed-off-by: David Howells
    Signed-off-by: Ard Biesheuvel
    Cc: Linus Torvalds
    Cc: Matt Fleming
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: linux-efi@vger.kernel.org
    Link: http://lkml.kernel.org/r/1486380166-31868-6-git-send-email-ard.biesheuvel@linaro.org
    Signed-off-by: Ingo Molnar

    Josh Boyer
     
  • Get the firmware's secure-boot status in the kernel boot wrapper and stash
    it somewhere that the main kernel image can find.

    The efi_get_secureboot() function is extracted from the ARM stub and (a)
    generalised so that it can be called from x86 and (b) made to use
    efi_call_runtime() so that it can be run in mixed-mode.

    For x86, it is stored in boot_params and can be overridden by the boot
    loader or kexec. This allows secure-boot mode to be passed on to a new
    kernel.

    Suggested-by: Lukas Wunner
    Signed-off-by: David Howells
    Signed-off-by: Ard Biesheuvel
    Cc: Linus Torvalds
    Cc: Matt Fleming
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: linux-efi@vger.kernel.org
    Link: http://lkml.kernel.org/r/1486380166-31868-5-git-send-email-ard.biesheuvel@linaro.org
    [ Small readability edits. ]
    Signed-off-by: Ingo Molnar

    David Howells
     
  • Signed-off-by: Ingo Molnar

    Ingo Molnar
     

04 Feb, 2017

1 commit

  • This patch adds a Qualcomm specific quirk to the arm_smccc_smc call.

    On Qualcomm ARM64 platforms, the SMC call can return before it has
    completed. If this occurs, the call can be restarted, but it requires
    using the returned session ID value from the interrupted SMC call.

    The quirk stores off the session ID from the interrupted call in the
    quirk structure so that it can be used by the caller.

    This patch folds in a fix given by Sricharan R:
    https://lkml.org/lkml/2016/9/28/272

    Signed-off-by: Andy Gross
    Reviewed-by: Will Deacon
    Signed-off-by: Will Deacon

    Andy Gross
     

02 Feb, 2017

1 commit

  • Some AArch64 UEFI implementations disable the MMU in ExitBootServices(),
    after which unaligned accesses to RAM are no longer supported.

    Commit:

    abfb7b686a3e ("efi/libstub/arm*: Pass latest memory map to the kernel")

    fixed an issue in the memory map handling of the stub FDT code, but
    inadvertently created an issue with such firmware, by moving some
    of the FDT manipulation to after the invocation of ExitBootServices().

    Given that the stub's libfdt implementation uses the ordinary, accelerated
    string functions, which rely on hardware handling of unaligned accesses,
    manipulating the FDT with the MMU off may result in alignment faults.

    So fix the situation by moving the update_fdt_memmap() call into the
    callback function invoked by efi_exit_boot_services() right before it
    calls the ExitBootServices() UEFI service (which is arguably a better
    place for it anyway)

    Note that disabling the MMU in ExitBootServices() is not compliant with
    the UEFI spec, and carries great risk due to the fact that switching from
    cached to uncached memory accesses halfway through compiler generated code
    (i.e., involving a stack) can never be done in a way that is architecturally
    safe.

    Fixes: abfb7b686a3e ("efi/libstub/arm*: Pass latest memory map to the kernel")
    Signed-off-by: Ard Biesheuvel
    Tested-by: Riku Voipio
    Cc:
    Cc: mark.rutland@arm.com
    Cc: linux-efi@vger.kernel.org
    Cc: matt@codeblueprint.co.uk
    Cc: leif.lindholm@linaro.org
    Cc: linux-arm-kernel@lists.infradead.org
    Link: http://lkml.kernel.org/r/1485971102-23330-2-git-send-email-ard.biesheuvel@linaro.org
    Signed-off-by: Ingo Molnar

    Ard Biesheuvel
     

01 Feb, 2017

6 commits

  • The build commands for the ARM and arm64 EFI stubs strip the .debug
    sections and other sections that may legally contain absolute relocations,
    in order to inspect the remaining sections for the presence of such
    relocations.

    This leaves us without debugging symbols in the stub for no good reason,
    considering that these sections are omitted from the kernel binary anyway,
    and that these relocations are thus only consumed by users of the ELF
    binary, such as debuggers.

    So move to 'strip' for performing the relocation check, and if it succeeds,
    invoke objcopy as before, but leaving the .debug sections in place. Note
    that these sections may refer to ksymtab/kcrctab contents, so leave those
    in place as well.

    Signed-off-by: Ard Biesheuvel
    Cc: Linus Torvalds
    Cc: Matt Fleming
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: linux-efi@vger.kernel.org
    Link: http://lkml.kernel.org/r/1485868902-20401-11-git-send-email-ard.biesheuvel@linaro.org
    Signed-off-by: Ingo Molnar

    Ard Biesheuvel
     
  • Signed-off-by: Colin Ian King
    Signed-off-by: Ard Biesheuvel
    Cc: Linus Torvalds
    Cc: Matt Fleming
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: linux-efi@vger.kernel.org
    Link: http://lkml.kernel.org/r/1485868902-20401-7-git-send-email-ard.biesheuvel@linaro.org
    Signed-off-by: Ingo Molnar

    Colin Ian King
     
  • UEFI v2.6 introduces EFI_MEMORY_ATTRIBUTES_TABLE which describes memory
    protections that may be applied to the EFI Runtime code and data regions by
    the kernel. This enables the kernel to map these regions more strictly thereby
    increasing security.

    Presently, the only valid bits for the attribute field of a memory descriptor
    are EFI_MEMORY_RO and EFI_MEMORY_XP, hence use these bits to update the
    mappings in efi_pgd.

    The UEFI specification recommends to use this feature instead of
    EFI_PROPERTIES_TABLE and hence while updating EFI mappings we first
    check for EFI_MEMORY_ATTRIBUTES_TABLE and if it's present we update
    the mappings according to this table and hence disregarding
    EFI_PROPERTIES_TABLE even if it's published by the firmware. We consider
    EFI_PROPERTIES_TABLE only when EFI_MEMORY_ATTRIBUTES_TABLE is absent.

    Signed-off-by: Sai Praneeth Prakhya
    Signed-off-by: Matt Fleming
    Signed-off-by: Ard Biesheuvel
    Cc: Borislav Petkov
    Cc: Fenghua Yu
    Cc: Lee, Chun-Yi
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Ravi Shankar
    Cc: Ricardo Neri
    Cc: Thomas Gleixner
    Cc: linux-efi@vger.kernel.org
    Link: http://lkml.kernel.org/r/1485868902-20401-6-git-send-email-ard.biesheuvel@linaro.org
    Signed-off-by: Ingo Molnar

    Sai Praneeth
     
  • UEFI v2.6 introduces a configuration table called
    EFI_MEMORY_ATTRIBUTES_TABLE which provides additional information about
    EFI runtime regions. Currently this table describes memory protections
    that may be applied to the EFI Runtime code and data regions by the kernel.

    Allocate a EFI_XXX bit to keep track of whether this feature is
    published by firmware or not.

    Signed-off-by: Sai Praneeth Prakhya
    Signed-off-by: Matt Fleming
    Signed-off-by: Ard Biesheuvel
    Reviewed-by: Lee, Chun-Yi
    Cc: Borislav Petkov
    Cc: Fenghua Yu
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Ravi Shankar
    Cc: Ricardo Neri
    Cc: Thomas Gleixner
    Cc: linux-efi@vger.kernel.org
    Link: http://lkml.kernel.org/r/1485868902-20401-5-git-send-email-ard.biesheuvel@linaro.org
    Signed-off-by: Ingo Molnar

    Sai Praneeth
     
  • Since EFI_PROPERTIES_TABLE and EFI_MEMORY_ATTRIBUTES_TABLE deal with
    updating memory region attributes, it makes sense to call
    EFI_MEMORY_ATTRIBUTES_TABLE initialization function from the same place
    as EFI_PROPERTIES_TABLE. This also moves the EFI_MEMORY_ATTRIBUTES_TABLE
    initialization code to a more generic efi initialization path rather
    than ARM specific efi initialization. This is important because
    EFI_MEMORY_ATTRIBUTES_TABLE will be supported by x86 as well.

    Signed-off-by: Sai Praneeth Prakhya
    Signed-off-by: Matt Fleming
    Signed-off-by: Ard Biesheuvel
    Reviewed-by: Lee, Chun-Yi
    Cc: Borislav Petkov
    Cc: Fenghua Yu
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Ravi Shankar
    Cc: Ricardo Neri
    Cc: Thomas Gleixner
    Cc: linux-efi@vger.kernel.org
    Link: http://lkml.kernel.org/r/1485868902-20401-4-git-send-email-ard.biesheuvel@linaro.org
    Signed-off-by: Ingo Molnar

    Sai Praneeth
     
  • There's one ARM, one x86_32 and one x86_64 version which can be folded
    into a single shared version by masking their differences with the shiny
    new efi_call_proto() macro.

    No functional change intended.

    Signed-off-by: Lukas Wunner
    Signed-off-by: Matt Fleming
    Signed-off-by: Ard Biesheuvel
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: linux-efi@vger.kernel.org
    Link: http://lkml.kernel.org/r/1485868902-20401-2-git-send-email-ard.biesheuvel@linaro.org
    Signed-off-by: Ingo Molnar

    Lukas Wunner
     

31 Jan, 2017

1 commit


30 Jan, 2017

1 commit

  • …it/agross/linux into next/drivers

    Qualcomm ARM Based Driver Updates for v4.11

    * Fix issues with SCM compile testing
    * Add SCM set remote state API
    * Mask APQ8064 SCM clock dependency issue
    * Add Qualcomm DMA folder to MAINTAINERS
    * Fix EBI2 dependencies

    * tag 'qcom-drivers-for-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux:
    firmware: qcom_scm: Add set remote state API
    MAINTAINERS: Update the files to include the Qualcomm DMA folder
    bus: qcom_ebi2: default y if ARCH_QCOM
    firmware: qcom: scm: Mask APQ8064 core clk dependency
    firmware: qcom: scm: Add empty functions to help compile testing

    Signed-off-by: Olof Johansson <olof@lixom.net>

    Olof Johansson
     

26 Jan, 2017

1 commit

  • If CONFIG_DEBUG_VIRTUAL=y, during s2ram:

    virt_to_phys used for non-linear address: ffffff80085db280 (cpu_resume+0x0/0x20)
    ------------[ cut here ]------------
    WARNING: CPU: 0 PID: 1628 at arch/arm64/mm/physaddr.c:14 __virt_to_phys+0x28/0x60
    ...
    [] __virt_to_phys+0x28/0x60
    [] psci_system_suspend+0x20/0x44
    [] cpu_suspend+0x3c/0x68
    [] psci_system_suspend_enter+0x18/0x20
    [] suspend_devices_and_enter+0x3f8/0x7e8
    [] pm_suspend+0x544/0x5f4

    Fixes: 1a08e3d9e0ac4577 ("drivers: firmware: psci: Use __pa_symbol for kernel symbol")
    Acked-by: Mark Rutland
    Acked-by: Laura Abbott
    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Will Deacon

    Geert Uytterhoeven
     

17 Jan, 2017

2 commits


16 Jan, 2017

1 commit

  • Pull EFI fixes from Ingo Molnar:
    "A number of regression fixes:

    - Fix a boot hang on machines that have somewhat unusual memory map
    entries of phys_addr=0x0 num_pages=0, which broke due to a recent
    commit. This commit got cherry-picked from the v4.11 queue because
    the bug is affecting real machines.

    - Fix a boot hang also reported by KASAN, caused by incorrect init
    ordering introduced by a recent optimization.

    - Fix a recent robustification fix to allocate_new_fdt_and_exit_boot()
    that introduced an invalid assumption. Neither bugs were seen in
    the wild AFAIK"

    * 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    efi/x86: Prune invalid memory map entries and fix boot regression
    x86/efi: Don't allocate memmap through memblock after mm_init()
    efi/libstub/arm*: Pass latest memory map to the kernel

    Linus Torvalds
     

12 Jan, 2017

1 commit

  • Merge core DEBUG_VIRTUAL changes from Laura Abbott. Later arm and arm64
    support depends on these.

    * aarch64/for-next/debug-virtual:
    drivers: firmware: psci: Use __pa_symbol for kernel symbol
    mm/usercopy: Switch to using lm_alias
    mm/kasan: Switch to using __pa_symbol and lm_alias
    kexec: Switch to __pa_symbol
    mm: Introduce lm_alias
    mm/cma: Cleanup highmem check
    lib/Kconfig.debug: Add ARCH_HAS_DEBUG_VIRTUAL

    Will Deacon
     

11 Jan, 2017

1 commit


07 Jan, 2017

1 commit

  • With the following commit:

    4bc9f92e64c8 ("x86/efi-bgrt: Use efi_mem_reserve() to avoid copying image data")

    ... efi_bgrt_init() calls into the memblock allocator through
    efi_mem_reserve() => efi_arch_mem_reserve() *after* mm_init() has been called.

    Indeed, KASAN reports a bad read access later on in efi_free_boot_services():

    BUG: KASAN: use-after-free in efi_free_boot_services+0xae/0x24c
    at addr ffff88022de12740
    Read of size 4 by task swapper/0/0
    page:ffffea0008b78480 count:0 mapcount:-127
    mapping: (null) index:0x1 flags: 0x5fff8000000000()
    [...]
    Call Trace:
    dump_stack+0x68/0x9f
    kasan_report_error+0x4c8/0x500
    kasan_report+0x58/0x60
    __asan_load4+0x61/0x80
    efi_free_boot_services+0xae/0x24c
    start_kernel+0x527/0x562
    x86_64_start_reservations+0x24/0x26
    x86_64_start_kernel+0x157/0x17a
    start_cpu+0x5/0x14

    The instruction at the given address is the first read from the memmap's
    memory, i.e. the read of md->type in efi_free_boot_services().

    Note that the writes earlier in efi_arch_mem_reserve() don't splat because
    they're done through early_memremap()ed addresses.

    So, after memblock is gone, allocations should be done through the "normal"
    page allocator. Introduce a helper, efi_memmap_alloc() for this. Use
    it from efi_arch_mem_reserve(), efi_free_boot_services() and, for the sake
    of consistency, from efi_fake_memmap() as well.

    Note that for the latter, the memmap allocations cease to be page aligned.
    This isn't needed though.

    Tested-by: Dan Williams
    Signed-off-by: Nicolai Stange
    Reviewed-by: Ard Biesheuvel
    Cc: # v4.9
    Cc: Dave Young
    Cc: Linus Torvalds
    Cc: Matt Fleming
    Cc: Mika Penttilä
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: linux-efi@vger.kernel.org
    Fixes: 4bc9f92e64c8 ("x86/efi-bgrt: Use efi_mem_reserve() to avoid copying image data")
    Link: http://lkml.kernel.org/r/20170105125130.2815-1-nicstange@gmail.com
    Signed-off-by: Ingo Molnar

    Nicolai Stange
     

04 Jan, 2017

2 commits

  • …eralisi/linux into fixes

    Pull "PSCI fixes for v4.10" from Lorenzo Pieralisi:

    Two minor fixes following the merge of the PSCI checker:

    - Annotate the PSCI checker timer on the stack used to wake-up from
    suspend to prevent warnings when the DEBUG_OBJECTS config option
    is enabled
    - Extend the PSCI entry in the maintainers list to also include the
    PSCI checker code

    * tag 'psci-fixes-4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/linux:
    MAINTAINERS: extend PSCI entry to cover the newly add PSCI checker code
    drivers: psci: annotate timer on stack to silence odebug messages

    Arnd Bergmann
     
  • When DEBUG_OBJECTS config is enabled, we get the below odebug warnings:

    ODEBUG: object is on stack, but not annotated

    WARNING: CPU: 3 PID: 1304 at kernel/lib/debugobjects.c:300 __debug_object_init+0x1f0/0x458
    CPU: 3 PID: 1304 Comm: psci_suspend_te Tainted: G W 4.9.0-06564-gf80f3f199260 #284
    task: ffffe9e1b55a1600 task.stack: ffffe9e1b51c0000
    PC is at __debug_object_init+0x1f0/0x458
    LR is at __debug_object_init+0x1ec/0x458
    Call trace:
    __debug_object_init+0x1f0/0x458
    debug_object_activate+0x150/0x260
    mod_timer+0xb4/0x4c0
    suspend_test_thread+0x1cc/0x3c0
    kthread+0x110/0x140
    ret_from_fork+0x10/0x40

    This patch annotates the timer on the stack using setup_timer_on_stack
    function to remove the above warnings.

    Cc: Kevin Brodsky
    Cc: Mark Rutland
    Cc: Lorenzo Pieralisi
    Signed-off-by: Sudeep Holla
    Signed-off-by: Lorenzo Pieralisi

    Sudeep Holla
     

30 Dec, 2016

1 commit

  • The pre-1.0 SCPI firmwares are using single __le32 as sensor value,
    while the SCPI v1.0 protocol uses two __le32 as sensor values(64bit)
    split into 32bit upper and 32bit lower value.

    Using an "struct sensor_value" to read the sensor value on a pre-1.0
    SCPI firmware gives garbage in the "hi_val" field.

    This patch fixes the issue by reading only the lower 32-bit value for
    all pre-1.0 SCPI versions.

    Suggested-by: Sudeep Holla
    Signed-off-by: Martin Blumenstingl
    [sudeep.holla@arm.com: updated the commit log to reflect the implementation]
    Signed-off-by: Sudeep Holla

    Martin Blumenstingl
     

28 Dec, 2016

1 commit

  • As reported by James Morse, the current libstub code involving the
    annotated memory map only works somewhat correctly by accident, due
    to the fact that a pool allocation happens to be reused immediately,
    retaining its former contents on most implementations of the
    UEFI boot services.

    Instead of juggling memory maps, which makes the code more complex than
    it needs to be, simply put placeholder values into the FDT for the memory
    map parameters, and only write the actual values after ExitBootServices()
    has been called.

    Reported-by: James Morse
    Signed-off-by: Ard Biesheuvel
    Cc:
    Cc: Jeffrey Hugo
    Cc: Linus Torvalds
    Cc: Matt Fleming
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linux-efi@vger.kernel.org
    Fixes: ed9cc156c42f ("efi/libstub: Use efi_exit_boot_services() in FDT")
    Link: http://lkml.kernel.org/r/1482587963-20183-2-git-send-email-ard.biesheuvel@linaro.org
    Signed-off-by: Ingo Molnar

    Ard Biesheuvel
     

19 Dec, 2016

1 commit


16 Dec, 2016

1 commit

  • Pull ARM SoC driver updates from Arnd Bergmann:
    "Driver updates for ARM SoCs, including a couple of newly added
    drivers:

    - A new driver for the power management controller on TI Keystone

    - Support for the prerelease "SCPI" firmware protocol that ended up
    being shipped by Amlogic in their GXBB SoC.

    - A soc_device can now be matched using a glob from inside the
    kernel, when another driver wants to know the specific chip it is
    running on and cannot find out from DT, firmware or hardware.

    - Renesas SoCs now support identification through the soc_device
    interface, both in user space and kernel.

    - Renesas r8a7743 and r8a7745 gain support for their system
    controller

    - A new checking module for the ARM "PSCI" (not to be confused with
    "SCPI" mentioned above) firmware interface.

    - A new driver for the Tegra GMI memory interface

    - Support for the Tegra firmware interfaces with their power
    management controllers

    As usual, the updates for the reset controller framework are merged
    here, as they tend to touch multiple SoCs as well, including a new
    driver for the Oxford (now Broadcom) OX820 chip and the Tegra bpmp
    interface.

    The existing drivers for Atmel, Qualcomm, NVIDIA, TI Davinci, and
    Rockchips SoCs see some further updates"

    * tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (76 commits)
    misc: sram: remove useless #ifdef
    drivers: psci: Allow PSCI node to be disabled
    drivers: psci: PSCI checker module
    soc: renesas: Identify SoC and register with the SoC bus
    firmware: qcom: scm: Return PTR_ERR when devm_clk_get fails
    firmware: qcom: scm: Remove core, iface and bus clocks dependency
    dt-bindings: firmware: scm: Add MSM8996 DT bindings
    memory: da8xx-ddrctl: drop the call to of_flat_dt_get_machine_name()
    bus: da8xx-mstpri: drop the call to of_flat_dt_get_machine_name()
    ARM: shmobile: Document DT bindings for Product Register
    soc: renesas: rcar-sysc: add R8A7745 support
    reset: Add Tegra BPMP reset driver
    dt-bindings: firmware: Allow child nodes inside the Tegra BPMP
    dt-bindings: Add power domains to Tegra BPMP firmware
    firmware: tegra: Add BPMP support
    firmware: tegra: Add IVC library
    dt-bindings: firmware: Add bindings for Tegra BPMP
    mailbox: tegra-hsp: Use after free in tegra_hsp_remove_doorbells()
    mailbox: Add Tegra HSP driver
    firmware: arm_scpi: add support for pre-v1.0 SCPI compatible
    ...

    Linus Torvalds
     

15 Dec, 2016

1 commit


14 Dec, 2016

2 commits

  • Commit 4fd06960f120 ("Use the new x86 setup code for i386") introduced a
    reference to the make variable LINUX_INCLUDE. That reference got moved
    around a bit and copied twice and now there are three references to it.

    There has never been a definition of that variable. (Presumably that is
    because it started out as a mistyped reference to LINUXINCLUDE.) So this
    reference has always been an empty string. Let's remove it before it
    spreads any further.

    Signed-off-by: Paul Bolle
    Signed-off-by: Jiri Kosina

    Paul Bolle
     
  • Pull arm64 updates from Catalin Marinas:

    - struct thread_info moved off-stack (also touching
    include/linux/thread_info.h and include/linux/restart_block.h)

    - cpus_have_cap() reworked to avoid __builtin_constant_p() for static
    key use (also touching drivers/irqchip/irq-gic-v3.c)

    - uprobes support (currently only for native 64-bit tasks)

    - Emulation of kernel Privileged Access Never (PAN) using TTBR0_EL1
    switching to a reserved page table

    - CPU capacity information passing via DT or sysfs (used by the
    scheduler)

    - support for systems without FP/SIMD (IOW, kernel avoids touching
    these registers; there is no soft-float ABI, nor kernel emulation for
    AArch64 FP/SIMD)

    - handling of hardware watchpoint with unaligned addresses, varied
    lengths and offsets from base

    - use of the page table contiguous hint for kernel mappings

    - hugetlb fixes for sizes involving the contiguous hint

    - remove unnecessary I-cache invalidation in flush_cache_range()

    - CNTHCTL_EL2 access fix for CPUs with VHE support (ARMv8.1)

    - boot-time checks for writable+executable kernel mappings

    - simplify asm/opcodes.h and avoid including the 32-bit ARM counterpart
    and make the arm64 kernel headers self-consistent (Xen headers patch
    merged separately)

    - Workaround for broken .inst support in certain binutils versions

    * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (60 commits)
    arm64: Disable PAN on uaccess_enable()
    arm64: Work around broken .inst when defective gas is detected
    arm64: Add detection code for broken .inst support in binutils
    arm64: Remove reference to asm/opcodes.h
    arm64: Get rid of asm/opcodes.h
    arm64: smp: Prevent raw_smp_processor_id() recursion
    arm64: head.S: Fix CNTHCTL_EL2 access on VHE system
    arm64: Remove I-cache invalidation from flush_cache_range()
    arm64: Enable HIBERNATION in defconfig
    arm64: Enable CONFIG_ARM64_SW_TTBR0_PAN
    arm64: xen: Enable user access before a privcmd hvc call
    arm64: Handle faults caused by inadvertent user access with PAN enabled
    arm64: Disable TTBR0_EL1 during normal kernel execution
    arm64: Introduce uaccess_{disable,enable} functionality based on TTBR0_EL1
    arm64: Factor out TTBR0_EL1 post-update workaround into a specific asm macro
    arm64: Factor out PAN enabling/disabling into separate uaccess_* macros
    arm64: Update the synchronous external abort fault description
    selftests: arm64: add test for unaligned/inexact watchpoint handling
    arm64: Allow hw watchpoint of length 3,5,6 and 7
    arm64: hw_breakpoint: Handle inexact watchpoint addresses
    ...

    Linus Torvalds
     

01 Dec, 2016

3 commits

  • …/git/agross/linux into next/drivers

    Pull "Qualcomm ARM Based Driver Updates for v4.10 - Part 2" from Andy Gross:

    * Fixup QCOM SCM to support MSM8996

    * tag 'qcom-drivers-for-4.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux:
    firmware: qcom: scm: Return PTR_ERR when devm_clk_get fails
    firmware: qcom: scm: Remove core, iface and bus clocks dependency
    dt-bindings: firmware: scm: Add MSM8996 DT bindings

    Arnd Bergmann
     
  • Merge "ARM: keystone: add TI SCI protocol support for v4.10" from
    Tero Kristo:

    [description taken from http://processors.wiki.ti.com/index.php/TISCI

    Texas Instruments' Keystone generation System on Chips (SoC) starting
    with 66AK2G02, now include a dedicated SoC System Control entity called
    PMMC(Power Management Micro Controller) in line with ARM architecture
    recommendations. The function of this module is to integrate all system
    operations in a centralized location. Communication with the SoC System
    Control entity from various processing units like ARM/DSP occurs over
    Message Manager hardware block.

    ...

    Texas Instruments' System Control Interface defines the communication
    protocol between various processing entities to the System Control Entity
    on TI SoCs. This is a set of message formats and sequence of operations
    required to communicate and get system services processed from System
    Control entity in the SoC.]

    * 'for-4.10-ti-sci-base' of https://github.com/t-kristo/linux-pm:
    firmware: ti_sci: Add support for reboot core service
    firmware: ti_sci: Add support for Clock control
    firmware: ti_sci: Add support for Device control
    firmware: Add basic support for TI System Control Interface (TI-SCI) protocol
    Documentation: Add support for TI System Control Interface (TI-SCI) protocol

    Arnd Bergmann
     
  • …udeep.holla/linux into next/drivers

    Pull "SCPI updates for v4.10" from Sudeep Holla:

    1. Adds support for pre-v1.0 SCPI protocol versions

    2. Adds support for SCPI used on Amlogic GXBB SoC platforms using the
    newly added pre-v1.0 SCPI protocol

    3. Decouples some platform specific details from generic SCPI binding

    * tag 'scpi-updates-4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux:
    firmware: arm_scpi: add support for pre-v1.0 SCPI compatible
    Documentation: bindings: Add support for Amlogic GXBB SCPI protocol
    Documentation: bindings: add compatible specific to pre v1.0 SCPI protocols
    Documentation: bindings: decouple juno specific details from generic binding
    firmware: arm_scpi: allow firmware with get_capabilities not implemented
    firmware: arm_scpi: add alternative legacy structures, functions and macros
    firmware: arm_scpi: increase MAX_DVFS_OPPS to 16 entries
    firmware: arm_scpi: add command indirection to support legacy commands

    Arnd Bergmann
     

26 Nov, 2016

2 commits

  • Allow disabling PSCI support (mostly for testing purposes) by setting
    the status property to "disabled". This makes the node behave in much
    the same way as proper device nodes.

    Signed-off-by: Thierry Reding
    Signed-off-by: Lorenzo Pieralisi
    Acked-by: Mark Rutland
    Signed-off-by: Arnd Bergmann

    Thierry Reding
     
  • On arm and arm64, PSCI is one of the possible firmware interfaces
    used for power management. This includes both turning CPUs on and off,
    and suspending them (entering idle states).

    This patch adds a PSCI checker module that enables basic testing of
    PSCI operations during startup. There are two main tests: CPU
    hotplugging and suspending.

    In the hotplug tests, the hotplug API is used to turn off and on again
    all CPUs in the system, and then all CPUs in each cluster, checking
    the consistency of the return codes.

    In the suspend tests, a high-priority thread is created on each core
    and uses low-level cpuidle functionalities to enter suspend, in all
    the possible states and multiple times. This should allow a maximum
    number of CPUs to enter the same sleep state at the same or slightly
    different time.

    In essence, the suspend tests use a principle similar to that of the
    intel_powerclamp driver (drivers/thermal/intel_powerclamp.c), but the
    threads are only kept for the duration of the test (they are already
    gone when userspace is started) and it does not require to stop/start
    the tick.

    While in theory power management PSCI functions (CPU_{ON,OFF,SUSPEND})
    could be directly called, this proved too difficult as it would imply
    the duplication of all the logic used by the kernel to allow for a
    clean shutdown/bringup/suspend of the CPU (the deepest sleep states
    implying potentially the shutdown of the CPU).

    Note that this file cannot be compiled as a loadable module, since it
    uses a number of non-exported identifiers (essentially for
    PSCI-specific checks and direct use of cpuidle) and relies on the
    absence of userspace to avoid races when calling hotplug and cpuidle
    functions.

    For now at least, CONFIG_PSCI_CHECKER is mutually exclusive with
    CONFIG_TORTURE_TEST, because torture tests may also use hotplug and
    cause false positives in the hotplug tests.

    Cc: Thomas Gleixner
    Cc: Kevin Hilman
    Cc: "Rafael J. Wysocki"
    Cc: Peter Zijlstra
    Cc: "Paul E. McKenney"
    Cc: James Morse
    Cc: Sudeep Holla
    Cc: Lorenzo Pieralisi
    Cc: Mark Rutland
    Acked-by: "Paul E. McKenney" [torture test config]
    Signed-off-by: Kevin Brodsky
    [lpieralisi: added cpuidle locking, reworded commit log/kconfig entry]
    Signed-off-by: Lorenzo Pieralisi
    Signed-off-by: Arnd Bergmann

    Kevin Brodsky