1. 23 7月, 2014 5 次提交
  2. 21 7月, 2014 1 次提交
  3. 19 7月, 2014 1 次提交
    • M
      arm64: cpuinfo: print info for all CPUs · d7a49086
      Mark Rutland 提交于
      Currently reading /proc/cpuinfo will result in information being read
      out of the MIDR_EL1 of the current CPU, and the information is not
      associated with any particular logical CPU number.
      
      This is problematic for systems with heterogeneous CPUs (i.e.
      big.LITTLE) where MIDR fields will vary across CPUs, and the output will
      differ depending on the executing CPU.
      
      This patch reorganises the code responsible for /proc/cpuinfo to print
      information per-cpu. In the process, we perform several cleanups:
      
      * Property names are coerced to lower-case (to match "processor" as per
        glibc's expectations).
      * Property names are simplified and made to match the MIDR field names.
      * Revision is changed to hex as with every other field.
      * The meaningless Architecture property is removed.
      * The ripe-for-abuse Machine field is removed.
      
      The features field (a human-readable representation of the hwcaps)
      remains printed once, as this is expected to remain in use as the
      globally support CPU features. To enable the possibility of the addition
      of per-cpu HW feature information later, this is printed before any
      CPU-specific information.
      
      Comments are added to guide userspace developers in the right direction
      (using the hwcaps provided in auxval). Hopefully where userspace
      applications parse /proc/cpuinfo rather than using the readily available
      hwcaps, they limit themselves to reading said first line.
      
      If CPU features differ from each other, the previously installed sanity
      checks will give us some advance notice with warnings and
      TAINT_CPU_OUT_OF_SPEC. If we are lucky, we will never see such systems.
      Rework will be required in many places to support such systems anyway.
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Marcus Shawcroft <marcus.shawcroft@arm.com>
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Acked-by: NWill Deacon <will.deacon@arm.com>
      [catalin.marinas@arm.com: remove machine_name as it is no longer reported]
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      d7a49086
  4. 18 7月, 2014 8 次提交
  5. 17 7月, 2014 6 次提交
  6. 10 7月, 2014 10 次提交
    • M
      arm64: Enable TEXT_OFFSET fuzzing · da57a369
      Mark Rutland 提交于
      The arm64 Image header contains a text_offset field which bootloaders
      are supposed to read to determine the offset (from a 2MB aligned "start
      of memory" per booting.txt) at which to load the kernel. The offset is
      not well respected by bootloaders at present, and due to the lack of
      variation there is little incentive to support it. This is unfortunate
      for the sake of future kernels where we may wish to vary the text offset
      (even zeroing it).
      
      This patch adds options to arm64 to enable fuzz-testing of text_offset.
      CONFIG_ARM64_RANDOMIZE_TEXT_OFFSET forces the text offset to a random
      16-byte aligned value value in the range [0..2MB) upon a build of the
      kernel. It is recommended that distribution kernels enable randomization
      to test bootloaders such that any compliance issues can be fixed early.
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Acked-by: NTom Rini <trini@ti.com>
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      da57a369
    • M
      arm64: Update the Image header · a2c1d73b
      Mark Rutland 提交于
      Currently the kernel Image is stripped of everything past the initial
      stack, and at runtime the memory is initialised and used by the kernel.
      This makes the effective minimum memory footprint of the kernel larger
      than the size of the loaded binary, though bootloaders have no mechanism
      to identify how large this minimum memory footprint is. This makes it
      difficult to choose safe locations to place both the kernel and other
      binaries required at boot (DTB, initrd, etc), such that the kernel won't
      clobber said binaries or other reserved memory during initialisation.
      
      Additionally when big endian support was added the image load offset was
      overlooked, and is currently of an arbitrary endianness, which makes it
      difficult for bootloaders to make use of it. It seems that bootloaders
      aren't respecting the image load offset at present anyway, and are
      assuming that offset 0x80000 will always be correct.
      
      This patch adds an effective image size to the kernel header which
      describes the amount of memory from the start of the kernel Image binary
      which the kernel expects to use before detecting memory and handling any
      memory reservations. This can be used by bootloaders to choose suitable
      locations to load the kernel and/or other binaries such that the kernel
      will not clobber any memory unexpectedly. As before, memory reservations
      are required to prevent the kernel from clobbering these locations
      later.
      
      Both the image load offset and the effective image size are forced to be
      little-endian regardless of the native endianness of the kernel to
      enable bootloaders to load a kernel of arbitrary endianness. Bootloaders
      which wish to make use of the load offset can inspect the effective
      image size field for a non-zero value to determine if the offset is of a
      known endianness. To enable software to determine the endinanness of the
      kernel as may be required for certain use-cases, a new flags field (also
      little-endian) is added to the kernel header to export this information.
      
      The documentation is updated to clarify these details. To discourage
      future assumptions regarding the value of text_offset, the value at this
      point in time is removed from the main flow of the documentation (though
      kept as a compatibility note). Some minor formatting issues in the
      documentation are also corrected.
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Acked-by: NTom Rini <trini@ti.com>
      Cc: Geoff Levand <geoff@infradead.org>
      Cc: Kevin Hilman <kevin.hilman@linaro.org>
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      a2c1d73b
    • M
      arm64: place initial page tables above the kernel · bd00cd5f
      Mark Rutland 提交于
      Currently we place swapper_pg_dir and idmap_pg_dir below the kernel
      image, between PHYS_OFFSET and (PHYS_OFFSET + TEXT_OFFSET). However,
      bootloaders may use portions of this memory below the kernel and we do
      not parse the memory reservation list until after the MMU has been
      enabled. As such we may clobber some memory a bootloader wishes to have
      preserved.
      
      To enable the use of all of this memory by bootloaders (when the
      required memory reservations are communicated to the kernel) it is
      necessary to move our initial page tables elsewhere. As we currently
      have an effectively unbound requirement for memory at the end of the
      kernel image for .bss, we can place the page tables here.
      
      This patch moves the initial page table to the end of the kernel image,
      after the BSS. As they do not consist of any initialised data they will
      be stripped from the kernel Image as with the BSS. The BSS clearing
      routine is updated to stop at __bss_stop rather than _end so as to not
      clobber the page tables, and memory reservations made redundant by the
      new organisation are removed.
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Tested-by: NLaura Abbott <lauraa@codeaurora.org>
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      bd00cd5f
    • M
      arm64: head.S: remove unnecessary function alignment · 909a4069
      Mark Rutland 提交于
      Currently __turn_mmu_on is aligned to 64 bytes to ensure that it doesn't
      span any page boundary, which simplifies the idmap and spares us
      requiring an additional page table to map half of the function. In
      keeping with other important requirements in architecture code, this
      fact is undocumented.
      
      Additionally, as the function consists of three instructions totalling
      12 bytes with no literal pool data, a smaller alignment of 16 bytes
      would be sufficient.
      
      This patch reduces the alignment to 16 bytes and documents the
      underlying reason for the alignment. This reduces the required alignment
      of the entire .head.text section from 64 bytes to 16 bytes, though it
      may still be aligned to a larger value depending on TEXT_OFFSET.
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Tested-by: NLaura Abbott <lauraa@codeaurora.org>
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      909a4069
    • C
      arm64: Cast KSTK_(EIP|ESP) to unsigned long · ebe6152e
      Catalin Marinas 提交于
      This is for similarity with thread_saved_(pc|sp) and to avoid some
      compiler warnings in the audit code.
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      ebe6152e
    • A
      arm64: Add audit support · 875cbf3e
      AKASHI Takahiro 提交于
      On AArch64, audit is supported through generic lib/audit.c and
      compat_audit.c, and so this patch adds arch specific definitions required.
      
      Acked-by Will Deacon <will.deacon@arm.com>
      Acked-by: NRichard Guy Briggs <rgb@redhat.com>
      Signed-off-by: NAKASHI Takahiro <takahiro.akashi@linaro.org>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      875cbf3e
    • A
      arm64: audit: Add audit hook in syscall_trace_enter/exit() · 5701ede8
      AKASHI Takahiro 提交于
      This patch adds auditing functions on entry to or exit from
      every system call invocation.
      Acked-by: NRichard Guy Briggs <rgb@redhat.com>
      Acked-by Will Deacon <will.deacon@arm.com>
      Signed-off-by: NAKASHI Takahiro <takahiro.akashi@linaro.org>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      5701ede8
    • C
      arm64: Add __NR_* definitions for compat syscalls · f3e5c847
      Catalin Marinas 提交于
      This patch adds __NR_* definitions to asm/unistd32.h, moves the
      __NR_compat_* definitions to asm/unistd.h and removes all the explicit
      unistd32.h includes apart from the one building the compat syscall
      table. The aim is to have the compat __NR_* definitions available but
      without colliding with the native syscall definitions (required by
      lib/compat_audit.c to avoid duplicating the audit header files between
      native and compat).
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      f3e5c847
    • L
      arm64: enable context tracking · 6c81fe79
      Larry Bassel 提交于
      Make calls to ct_user_enter when the kernel is exited
      and ct_user_exit when the kernel is entered (in el0_da,
      el0_ia, el0_svc, el0_irq and all of the "error" paths).
      
      These macros expand to function calls which will only work
      properly if el0_sync and related code has been rearranged
      (in a previous patch of this series).
      
      The calls to ct_user_exit are made after hw debugging has been
      enabled (enable_dbg_and_irq).
      
      The call to ct_user_enter is made at the beginning of the
      kernel_exit macro.
      
      This patch is based on earlier work by Kevin Hilman.
      Save/restore optimizations were also done by Kevin.
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Reviewed-by: NKevin Hilman <khilman@linaro.org>
      Tested-by: NKevin Hilman <khilman@linaro.org>
      Signed-off-by: NLarry Bassel <larry.bassel@linaro.org>
      Signed-off-by: NKevin Hilman <khilman@linaro.org>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      6c81fe79
    • L
      arm64: adjust el0_sync so that a function can be called · 6ab6463a
      Larry Bassel 提交于
      To implement the context tracker properly on arm64,
      a function call needs to be made after debugging and
      interrupts are turned on, but before the lr is changed
      to point to ret_to_user(). If the function call
      is made after the lr is changed the function will not
      return to the correct place.
      
      For similar reasons, defer the setting of x0 so that
      it doesn't need to be saved around the function call
      (save far_el1 in x26 temporarily instead).
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Reviewed-by: NKevin Hilman <khilman@linaro.org>
      Tested-by: NKevin Hilman <khilman@linaro.org>
      Signed-off-by: NLarry Bassel <larry.bassel@linaro.org>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      6ab6463a
  7. 09 7月, 2014 2 次提交
  8. 07 7月, 2014 3 次提交
    • L
      Linux 3.16-rc4 · cd3de83f
      Linus Torvalds 提交于
      cd3de83f
    • L
      Merge tag 'dt-for-linus' of git://git.secretlab.ca/git/linux · 100193f5
      Linus Torvalds 提交于
      Pull devicetree bugfix from Grant Likely:
       "Important bug fix for parsing 64-bit addresses on 32-bit platforms.
        Without this patch the kernel will try to use memory ranges that
        cannot be reached"
      
      * tag 'dt-for-linus' of git://git.secretlab.ca/git/linux:
        of: Check for phys_addr_t overflows in early_init_dt_add_memory_arch
      100193f5
    • L
      Merge tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 8addf0c7
      Linus Torvalds 提交于
      Pull SCSI fixes from James Bottomley:
       "This is a set of 13 fixes, a MAINTAINERS update and a sparse update.
        The fixes are mostly correct value initialisations, avoiding NULL
        derefs and some uninitialised pointer avoidance.
      
        All the patches have been incubated in -next for a few days.  The
        final patch (use the scsi data buffer length to extract transfer size)
        has been rebased to add a cc to stable, but only the commit message
        has changed"
      
      * tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        [SCSI] use the scsi data buffer length to extract transfer size
        virtio-scsi: fix various bad behavior on aborted requests
        virtio-scsi: avoid cancelling uninitialized work items
        ibmvscsi: Add memory barriers for send / receive
        ibmvscsi: Abort init sequence during error recovery
        qla2xxx: Fix sparse warning in qla_target.c.
        bnx2fc: Improve stats update mechanism
        bnx2fc: do not scan uninitialized lists in case of error.
        fc: ensure scan_work isn't active when freeing fc_rport
        pm8001: Fix potential null pointer dereference and memory leak.
        MAINTAINERS: Update LSILOGIC MPT FUSION DRIVERS (FC/SAS/SPI) maintainers Email IDs
        be2iscsi: remove potential junk pointer free
        be2iscsi: add an missing goto in error path
        scsi_error: set DID_TIME_OUT correctly
        scsi_error: fix invalid setting of host byte
      8addf0c7
  9. 06 7月, 2014 4 次提交
    • L
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · 110e4308
      Linus Torvalds 提交于
      Pull drm fixes from Dave Airlie:
       "i915, tda998x and vmwgfx fixes,
      
        The main one is i915 fix for missing VGA connectors, along with some
        fixes for the tda998x from Russell fixing some modesetting problems.
      
        (still on holidays, but got a spare moment to find these)"
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
        drm/vmwgfx: Fix incorrect write to read-only register v2:
        drm/i915: Drop early VLV WA to fix Voltage not getting dropped to Vmin
        drm/i915: only apply crt_present check on VLV
        drm/i915: Wait for vblank after enabling the primary plane on BDW
        drm/i2c: tda998x: add some basic mode validation
        drm/i2c: tda998x: faster polling for edid
        drm/i2c: tda998x: move drm_i2c_encoder_destroy call
      110e4308
    • L
      Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 75bf757e
      Linus Torvalds 提交于
      Pull ARM SoC fixes from Olof Johansson:
       "This week's arm-soc fixes:
      
         - A set of of OMAP patches that we had missed Tony's pull request of:
           * Reset fix for am43xx
           * Proper OPP table for omap5
           * Fix for SoC detection of one of the DRA7 SoCs
           * hwmod updates to get SATA and OCP to work on omap5 (drivers
             merged in 3.16)
           * ... plus a handful of smaller fixes
         - sunxi needed to re-add machine specific restart code that was
           removed in anticipation of a watchdog driver being merged for 3.16,
           and it didn't make it in.
         - Marvell fixes for PCIe on SMP and a big-endian fix.
         - A trivial defconfig update to make my capri test board boot with
           bcm_defconfig again.
      
        ... and a couple of MAINTAINERS updates, one to claim new Keystone
        drivers that have been merged, and one to merge MXS and i.MX (both
        Freescale platforms).
      
        The largest diffs come from the hwmod code for omap5 and the re-add of
        the restart code on sunxi.  The hwmod stuff is quite late at this
        point but it slipped through cracks repeatedly while coming up the
        maintainer chain and only affects the one SoC so risk is low"
      
      * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
        MAINTAINERS: Add few more Keystone drivers
        MAINTAINERS: merge MXS entry into IMX one
        ARM: sunxi: Reintroduce the restart code for A10/A20 SoCs
        ARM: mvebu: fix cpuidle implementation to work on big-endian systems
        ARM: mvebu: update L2/PCIe deadlock workaround after L2CC cleanup
        ARM: mvebu: move Armada 375 external abort logic as a quirk
        ARM: bcm: Fix bcm and multi_v7 defconfigs
        ARM: dts: dra7-evm: remove interrupt binding
        ARM: OMAP2+: Fix parser-bug in platform muxing code
        ARM: DTS: dra7/dra7xx-clocks: ATL related changes
        ARM: OMAP2+: drop unused function
        ARM: dts: am43x-epos-evm: Add Missing cpsw-phy-sel for am43x-epos-evm
        ARM: dts: omap5: Update CPU OPP table as per final production Manual
        ARM: DRA722: add detection of SoC information
        ARM: dts: Enable twl4030 off-idle configuration for selected omaps
        ARM: OMAP5: hwmod: Add ocp2scp3 and sata hwmods
        ARM: OMAP2+: hwmod: Change hardreset soc_ops for AM43XX
      75bf757e
    • L
      Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 549f11c9
      Linus Torvalds 提交于
      Pull irq fixes from Thomas Gleixner:
       "A few minor fixlets in ARM SoC irq drivers and a fix for a memory leak
        which I introduced in the last round of cleanups :("
      
      * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        genirq: Fix memory leak when calling irq_free_hwirqs()
        irqchip: spear_shirq: Fix interrupt offset
        irqchip: brcmstb-l2: Level-2 interrupts are edge sensitive
        irqchip: armada-370-xp: Mask all interrupts during initialization.
      549f11c9
    • D
      Merge tag 'drm-intel-fixes-2014-07-03' of git://anongit.freedesktop.org/drm-intel · dfd7aecf
      Dave Airlie 提交于
      Fixes for 3.16-rc3; most importantly Jesse brings back VGA he took away
      on a bunch of machines. Also a vblank fix for BDW and a power workaround
      fix for VLV.
      
      * tag 'drm-intel-fixes-2014-07-03' of git://anongit.freedesktop.org/drm-intel:
        drm/i915: Drop early VLV WA to fix Voltage not getting dropped to Vmin
        drm/i915: only apply crt_present check on VLV
        drm/i915: Wait for vblank after enabling the primary plane on BDW
      dfd7aecf