1. 23 Jan, 2015 1 commit
    • Mark Rutland's avatar
      arm64: Fix overlapping VA allocations · aa03c428
      Mark Rutland authored
      PCI IO space was intended to be 16MiB, at 32MiB below MODULES_VADDR, but
      commit d1e6dc91 ("arm64: Add architectural support for PCI")
      extended this to cover the full 32MiB. The final 8KiB of this 32MiB is
      also allocated for the fixmap, allowing for potential clashes between
      the two.
      
      This change was masked by assumptions in mem_init and the page table
      dumping code, which assumed the I/O space to be 16MiB long through
      seaparte hard-coded definitions.
      
      This patch changes the definition of the PCI I/O space allocation to
      live in asm/memory.h, along with the other VA space allocations. As the
      fixmap allocation depends on the number of fixmap entries, this is moved
      below the PCI I/O space allocation. Both the fixmap and PCI I/O space
      are guarded with 2MB of padding. Sites assuming the I/O space was 16MiB
      are moved over use new PCI_IO_{START,END} definitions, which will keep
      in sync with the size of the IO space (now restored to 16MiB).
      
      As a useful side effect, the use of the new PCI_IO_{START,END}
      definitions prevents a build issue in the dumping code due to a (now
      redundant) missing include of io.h for PCI_IOBASE.
      Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Laura Abbott <lauraa@codeaurora.org>
      Cc: Liviu Dudau <liviu.dudau@arm.com>
      Cc: Steve Capper <steve.capper@linaro.org>
      Cc: Will Deacon <will.deacon@arm.com>
      [catalin.marinas@arm.com: reorder FIXADDR and PCI_IO address_markers_idx enum]
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      aa03c428
  2. 22 Jan, 2015 3 commits
  3. 16 Jan, 2015 2 commits
  4. 15 Jan, 2015 10 commits
    • Kevin Hao's avatar
      arm64: kill off the libgcc dependency · d67703a8
      Kevin Hao authored
      The arm64 kernel builds fine without the libgcc. Actually it should not
      be used at all in the kernel. The following are the reasons indicated
      by Russell King:
      
        Although libgcc is part of the compiler, libgcc is built with the
        expectation that it will be running in userland - it expects to link
        to a libc.  That's why you can't build libgcc without having the glibc
        headers around.
      
        [...]
      
        Meanwhile, having the kernel build the compiler support functions that
        it needs ensures that (a) we know what compiler support functions are
        being used, (b) we know the implementation of those support functions
        are sane for use in the kernel, (c) we can build them with appropriate
        compiler flags for best performance, and (d) we remove an unnecessary
        dependency on the build toolchain.
      Signed-off-by: default avatarKevin Hao <haokexin@gmail.com>
      Acked-by: default avatarWill Deacon <will.deacon@arm.com>
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      d67703a8
    • Catalin Marinas's avatar
      Merge branch 'arm64/common-esr-macros' of git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux · 0ce339a9
      Catalin Marinas authored
      ESR_ELx definitions clean-up from Mark Rutland.
      
      * 'arm64/common-esr-macros' of git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux:
        arm64: kvm: decode ESR_ELx.EC when reporting exceptions
        arm64: kvm: remove ESR_EL2_* macros
        arm64: remove ESR_EL1_* macros
        arm64: kvm: move to ESR_ELx macros
        arm64: decode ESR_ELx.EC when reporting exceptions
        arm64: move to ESR_ELx macros
        arm64: introduce common ESR_ELx_* definitions
      0ce339a9
    • Mark Rutland's avatar
      arm64: kvm: decode ESR_ELx.EC when reporting exceptions · 056bb5f5
      Mark Rutland authored
      To aid the developer when something triggers an unexpected exception,
      decode the ESR_ELx.EC field when logging an ESR_ELx value using the
      newly introduced esr_get_class_string. This doesn't tell the developer
      the specifics of the exception encoded in the remaining IL and ISS bits,
      but it can be helpful to distinguish between exception classes (e.g.
      SError and a data abort) without having to manually decode the field,
      which can be tiresome.
      Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
      Acked-by: default avatarChristoffer Dall <christoffer.dall@linaro.org>
      Reviewed-by: default avatarChristoffer Dall <christoffer.dall@linaro.org>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Cc: Will Deacon <will.deacon@arm.com>
      056bb5f5
    • Mark Rutland's avatar
      arm64: kvm: remove ESR_EL2_* macros · 6e53031e
      Mark Rutland authored
      Now that all users have been moved over to the common ESR_ELx_* macros,
      remove the redundant ESR_EL2 macros. To maintain compatibility with the
      fault handling code shared with 32-bit, the FSC_{FAULT,PERM} macros are
      retained as aliases for the common ESR_ELx_FSC_{FAULT,PERM} definitions.
      
      There should be no functional change as a result of this patch.
      Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
      Acked-by: default avatarChristoffer Dall <christoffer.dall@linaro.org>
      Reviewed-by: default avatarChristoffer Dall <christoffer.dall@linaro.org>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Cc: Will Deacon <will.deacon@arm.com>
      6e53031e
    • Mark Rutland's avatar
      arm64: remove ESR_EL1_* macros · 4a939087
      Mark Rutland authored
      Now that all users have been moved over to the common ESR_ELx_* macros,
      remove the redundant ESR_EL1 macros.
      
      There should be no functional change as a result of this patch.
      Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
      Acked-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Reviewed-by: default avatarChristoffer Dall <christoffer.dall@linaro.org>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Cc: Will Deacon <will.deacon@arm.com>
      4a939087
    • Mark Rutland's avatar
      arm64: kvm: move to ESR_ELx macros · c6d01a94
      Mark Rutland authored
      Now that we have common ESR_ELx macros, make use of them in the arm64
      KVM code. The addition of <asm/esr.h> to the include path highlighted
      badly ordered (i.e. not alphabetical) include lists; these are changed
      to alphabetical order.
      
      There should be no functional change as a result of this patch.
      Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
      Reviewed-by: default avatarChristoffer Dall <christoffer.dall@linaro.org>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Cc: Will Deacon <will.deacon@arm.com>
      c6d01a94
    • Mark Rutland's avatar
      arm64: decode ESR_ELx.EC when reporting exceptions · 60a1f02c
      Mark Rutland authored
      To aid the developer when something triggers an unexpected exception,
      decode the ESR_ELx.EC field when logging an ESR_ELx value. This doesn't
      tell the developer the specifics of the exception encoded in the
      remaining IL and ISS bits, but it can be helpful to distinguish between
      exception classes (e.g. SError and a data abort) without having to
      manually decode the field, which can be tiresome.
      Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
      Acked-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Reviewed-by: default avatarChristoffer Dall <christoffer.dall@linaro.org>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Cc: Will Deacon <will.deacon@arm.com>
      60a1f02c
    • Mark Rutland's avatar
      arm64: move to ESR_ELx macros · aed40e01
      Mark Rutland authored
      Now that we have common ESR_ELx_* macros, move the core arm64 code over
      to them.
      
      There should be no functional change as a result of this patch.
      Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
      Acked-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Reviewed-by: default avatarChristoffer Dall <christoffer.dall@linaro.org>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Cc: Will Deacon <will.deacon@arm.com>
      aed40e01
    • Mark Rutland's avatar
      arm64: introduce common ESR_ELx_* definitions · cf99a48d
      Mark Rutland authored
      Currently we have separate ESR_EL{1,2}_* macros, despite the fact that
      the encodings are common. While encodings are architected to refer to
      the current EL or a lower EL, the macros refer to particular ELs (e.g.
      ESR_ELx_EC_DABT_EL0). Having these duplicate definitions is redundant,
      and their naming is misleading.
      
      This patch introduces common ESR_ELx_* macros that can be used in all
      cases, in preparation for later patches which will migrate existing
      users over. Some additional cleanups are made in the process:
      
      * Suffixes for particular exception levelts (e.g. _EL0, _EL1) are
        replaced with more general _LOW and _CUR suffixes, matching the
        architectural intent.
      
      * ESR_ELx_EC_WFx, rather than ESR_ELx_EC_WFI is introduced, as this
        EC encoding covers traps from both WFE and WFI. Similarly,
        ESR_ELx_WFx_ISS_WFE rather than ESR_ELx_EC_WFI_ISS_WFE is introduced.
      
      * Multi-bit fields are given consistently named _SHIFT and _MASK macros.
      
      * UL() is used for compatiblity with assembly files.
      
      * Comments are added for currently unallocated ESR_ELx.EC encodings.
      
      For fields other than ESR_ELx.EC, macros are only implemented for fields
      for which there is already an ESR_EL{1,2}_* macro.
      Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
      Acked-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Reviewed-by: default avatarChristoffer Dall <christoffer.dall@linaro.org>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Cc: Will Deacon <will.deacon@arm.com>
      cf99a48d
    • Sudeep Holla's avatar
      arm64: kernel: add support for cpu cache information · 5d425c18
      Sudeep Holla authored
      This patch adds support for cacheinfo on ARM64.
      
      On ARMv8, the cache hierarchy can be identified through Cache Level ID
      (CLIDR) register while the cache geometry is provided by Cache Size ID
      (CCSIDR) register.
      
      Since the architecture doesn't provide any way of detecting the cpus
      sharing particular cache, device tree is used for the same purpose.
      Signed-off-by: default avatarSudeep Holla <sudeep.holla@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      5d425c18
  5. 13 Jan, 2015 2 commits
    • Mark Rutland's avatar
      arm64: remove broken cachepolicy code · 26a945ca
      Mark Rutland authored
      The cachepolicy kernel parameter was intended to aid in the debugging of
      coherency issues, but it is fundamentally broken for several reasons:
      
       * On SMP platforms, only the boot CPU's tcr_el1 is altered. Secondary
         CPUs may therefore use differ w.r.t. the attributes they apply to
         MT_NORMAL memory, resulting in a loss of coherency.
      
       * The cache maintenance using flush_dcache_all (based on Set/Way
         operations) is not guaranteed to empty a given CPU's cache hierarchy
         while said CPU has caches enabled, it cannot empty the caches of
         other coherent PEs, nor is it guaranteed to flush data to the PoC
         even when caches are disabled.
      
       * The TLBs are not invalidated around the modification of MAIR_EL1 and
         TCR_EL1, as required by the architecture (as both are permitted to be
         cached in a TLB). This may result in CPUs using attributes other than
         those expected for some memory accesses, resulting in a loss of
         coherency.
      
       * Exclusive accesses are not architecturally guaranteed to function as
         expected on memory marked as Write-Through or Non-Cacheable. Thus
         changing the attributes of MT_NORMAL away from the (architecurally
         safe) defaults may cause uses of these instructions (e.g. atomics) to
         behave erratically.
      
      Given this, the cachepolicy code cannot be used for debugging purposes
      as it alone is likely to cause coherency issues. This patch removes the
      broken cachepolicy code.
      Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
      Acked-by: default avatarWill Deacon <will.deacon@arm.com>
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      26a945ca
    • Catalin Marinas's avatar
      Merge tag 'for-3.20' of http://git.linaro.org/people/ard.biesheuvel/linux-arm into upstream · c26a535b
      Catalin Marinas authored
      UEFI updates for arm64
      
      This series consists of a reimplementation of the virtual remapping of
      UEFI Runtime Services in a way that is stable across kexec, including
      the required preparatory refactoring and other work to set the stage,
      and some cleaning up afterwards to remove boot services memory and
      identitity map handling that has now become redundant.
      
      * tag 'for-3.20' of http://git.linaro.org/people/ard.biesheuvel/linux-arm:
        arm64/efi: remove idmap manipulations from UEFI code
        arm64/efi: remove free_boot_services() and friends
        arm64/efi: move SetVirtualAddressMap() to UEFI stub
        arm64/efi: set EFI_ALLOC_ALIGN to 64 KB
        efi: efistub: allow allocation alignment larger than EFI_PAGE_SIZE
        efi: split off remapping code from efi_config_init()
        arm64/mm: add create_pgd_mapping() to create private page tables
        arm64/mm: add explicit struct_mm argument to __create_mapping()
      c26a535b
  6. 12 Jan, 2015 8 commits
  7. 11 Jan, 2015 9 commits
  8. 10 Jan, 2015 5 commits
    • Linus Torvalds's avatar
      Merge tag 'vfio-v3.19-rc4' of git://github.com/awilliam/linux-vfio · 4850d37d
      Linus Torvalds authored
      Pull VFIO fix from Alex Williamson:
       "Fix PCI header check in vfio_pci_probe() (Wei Yang)"
      
      * tag 'vfio-v3.19-rc4' of git://github.com/awilliam/linux-vfio:
        vfio-pci: Fix the check on pci device type in vfio_pci_probe()
      4850d37d
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · aff8ad59
      Linus Torvalds authored
      Pull SCSI fix from James Bottomley:
       "Just one fix: a qlogic busy wait regression"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        qla2xxx: fix busy wait regression
      aff8ad59
    • Linus Torvalds's avatar
      Merge tag 'sound-3.19-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · eb749269
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "All a few small regression or stable fixes: a Nvidia HDMI ID addition,
        a regression fix for CAIAQ stream count, a typo fix for GPIO setup
        with STAC/IDT HD-audio codecs, and a Fireworks big-endian fix"
      
      * tag 'sound-3.19-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: fireworks: fix an endianness bug for transaction length
        ALSA: hda - Add new GPU codec ID 0x10de0072 to snd-hda
        ALSA: hda - Fix wrong gpio_dir & gpio_mask hint setups for IDT/STAC codecs
        ALSA: snd-usb-caiaq: fix stream count check
      eb749269
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid · 28023d2a
      Linus Torvalds authored
      Pull HID updates from Jiri Kosina:
      
       - bounds checking fixes in logitech and roccat drivers, from Peter Wu
         and Dan Carpenter
      
       - double-kfree fix in i2c-hid driver on bus shutdown, from Mika
         Westerberg
      
       - a couple of various small driver fixes
      
       - a few device id additions
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
        HID: roccat: potential out of bounds in pyra_sysfs_write_settings()
        HID: Add a new id 0x501a for Genius MousePen i608X
        HID: logitech-hidpp: prefix the name with "Logitech"
        HID: logitech-hidpp: avoid unintended fall-through
        HID: Allow HID_BATTERY_STRENGTH to be enabled
        HID: i2c-hid: Do not free buffers in i2c_hid_stop()
        HID: add battery quirk for USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ISO keyboard
        HID: logitech-hidpp: check WTP report length
        HID: logitech-dj: check report length
      28023d2a
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · 1dd34daa
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "I'm briefly working between holidays and LCA, so this is close to a
        couple of weeks of fixes,
      
        Two sets of amdkfd fixes, this is a new feature this kernel, and this
        pull fixes a few issues since it got merged, ordering when built-in to
        kernel and also the iommu vs gpu ordering patch, it also reworks the
        ioctl before the initial release.
      
        Otherwise:
         - radeon: some misc fixes all over, hdmi, 4k, dpm
         - nouveau: mcp77 init fixes, oops fix, bug on fix, msi fix
         - i915: power fixes, revert VGACNTR patch
      
        Probably be quiteer next week since I'll be at LCA anyways"
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (33 commits)
        drm/amdkfd: rewrite kfd_ioctl() according to drm_ioctl()
        drm/amdkfd: reformat IOCTL definitions to drm-style
        drm/amdkfd: Do copy_to/from_user in general kfd_ioctl()
        drm/radeon: integer underflow in radeon_cp_dispatch_texture()
        drm/radeon: adjust default bapm settings for KV
        drm/radeon: properly filter DP1.2 4k modes on non-DP1.2 hw
        drm/radeon: fix sad_count check for dce3
        drm/radeon: KV has three PPLLs (v2)
        drm/amdkfd: unmap VMID<-->PASID when relesing VMID (non-HWS)
        drm/radeon: Init amdkfd only if it was compiled
        amdkfd: actually allocate longs for the pasid bitmask
        drm/nouveau/nouveau: Do not BUG_ON(!spin_is_locked()) on UP
        drm/nv4c/mc: disable msi
        drm/nouveau/fb/ram/mcp77: enable NISO poller
        drm/nouveau/fb/ram/mcp77: use carveout reg to determine size
        drm/nouveau/fb/ram/mcp77: subclass nouveau_ram
        drm/nouveau: wake up the card if necessary during gem callbacks
        drm/nouveau/device: Add support for GK208B, resolves bug 86935
        drm/nouveau: fix missing return statement in nouveau_ttm_tt_unpopulate
        drm/nouveau/bios: fix oops on pre-nv50 chipsets
        ...
      1dd34daa