1. 27 7月, 2015 13 次提交
  2. 18 7月, 2015 1 次提交
  3. 07 7月, 2015 1 次提交
    • A
      ACPI / ARM64: add BAD_MADT_GICC_ENTRY() macro · b6cfb277
      Al Stone 提交于
      The BAD_MADT_ENTRY() macro is designed to work for all of the subtables
      of the MADT.  In the ACPI 5.1 version of the spec, the struct for the
      GICC subtable (struct acpi_madt_generic_interrupt) is 76 bytes long; in
      ACPI 6.0, the struct is 80 bytes long.  But, there is only one definition
      in ACPICA for this struct -- and that is the 6.0 version.  Hence, when
      BAD_MADT_ENTRY() compares the struct size to the length in the GICC
      subtable, it fails if 5.1 structs are in use, and there are systems in
      the wild that have them.
      
      This patch adds the BAD_MADT_GICC_ENTRY() that checks the GICC subtable
      only, accounting for the difference in specification versions that are
      possible.  The BAD_MADT_ENTRY() will continue to work as is for all other
      MADT subtables.
      
      This code is being added to an arm64 header file since that is currently
      the only architecture using the GICC subtable of the MADT.  As a GIC is
      specific to ARM, it is also unlikely the subtable will be used elsewhere.
      
      Fixes: aeb823bb ("ACPICA: ACPI 6.0: Add changes for FADT table.")
      Signed-off-by: NAl Stone <al.stone@linaro.org>
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Acked-by: N"Rafael J. Wysocki" <rjw@rjwysocki.net>
      [catalin.marinas@arm.com: extra brackets around macro arguments]
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      b6cfb277
  4. 26 6月, 2015 1 次提交
  5. 25 6月, 2015 2 次提交
    • Z
      mm/hugetlb: reduce arch dependent code about hugetlb_prefault_arch_hook · a67a31fa
      Zhang Zhen 提交于
      Currently we have many duplicates in definitions of
      hugetlb_prefault_arch_hook.  In all architectures this function is empty.
      Signed-off-by: NZhang Zhen <zhenzhang.zhang@huawei.com>
      Acked-by: NDavid Rientjes <rientjes@google.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a67a31fa
    • L
      mm: new mm hook framework · 2ae416b1
      Laurent Dufour 提交于
      CRIU is recreating the process memory layout by remapping the checkpointee
      memory area on top of the current process (criu).  This includes remapping
      the vDSO to the place it has at checkpoint time.
      
      However some architectures like powerpc are keeping a reference to the
      vDSO base address to build the signal return stack frame by calling the
      vDSO sigreturn service.  So once the vDSO has been moved, this reference
      is no more valid and the signal frame built later are not usable.
      
      This patch serie is introducing a new mm hook framework, and a new
      arch_remap hook which is called when mremap is done and the mm lock still
      hold.  The next patch is adding the vDSO remap and unmap tracking to the
      powerpc architecture.
      
      This patch (of 3):
      
      This patch introduces a new set of header file to manage mm hooks:
      - per architecture empty header file (arch/x/include/asm/mm-arch-hooks.h)
      - a generic header (include/linux/mm-arch-hooks.h)
      
      The architecture which need to overwrite a hook as to redefine it in its
      header file, while architecture which doesn't need have nothing to do.
      
      The default hooks are defined in the generic header and are used in the
      case the architecture is not defining it.
      
      In a next step, mm hooks defined in include/asm-generic/mm_hooks.h should
      be moved here.
      Signed-off-by: NLaurent Dufour <ldufour@linux.vnet.ibm.com>
      Suggested-by: NAndrew Morton <akpm@linux-foundation.org>
      Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
      Cc: Hugh Dickins <hughd@google.com>
      Cc: Rik van Riel <riel@redhat.com>
      Cc: Mel Gorman <mgorman@suse.de>
      Cc: Pavel Emelyanov <xemul@parallels.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Ingo Molnar <mingo@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2ae416b1
  6. 19 6月, 2015 2 次提交
  7. 15 6月, 2015 1 次提交
  8. 12 6月, 2015 3 次提交
  9. 07 6月, 2015 1 次提交
    • T
      arch/*/io.h: Add ioremap_wt() to all architectures · 556269c1
      Toshi Kani 提交于
      Add ioremap_wt() to all arch-specific asm/io.h headers which
      define ioremap_wc() locally. These headers do not include
      <asm-generic/iomap.h>. Some of them include <asm-generic/io.h>,
      but ioremap_wt() is defined for consistency since they define
      all ioremap_xxx locally.
      
      In all architectures without Write-Through support, ioremap_wt()
      is defined indentical to ioremap_nocache().
      
      frv and m68k already have ioremap_writethrough(). On those we
      add ioremap_wt() indetical to ioremap_writethrough() and defines
      ARCH_HAS_IOREMAP_WT in both architectures.
      
      The ioremap_wt() interface is exported to drivers.
      Signed-off-by: NToshi Kani <toshi.kani@hp.com>
      Signed-off-by: NBorislav Petkov <bp@suse.de>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Elliott@hp.com
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Luis R. Rodriguez <mcgrof@suse.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: arnd@arndb.de
      Cc: hch@lst.de
      Cc: hmh@hmh.eng.br
      Cc: jgross@suse.com
      Cc: konrad.wilk@oracle.com
      Cc: linux-mm <linux-mm@kvack.org>
      Cc: linux-nvdimm@lists.01.org
      Cc: stefan.bader@canonical.com
      Cc: yigal@plexistor.com
      Link: http://lkml.kernel.org/r/1433436928-31903-9-git-send-email-bp@alien8.deSigned-off-by: NIngo Molnar <mingo@kernel.org>
      556269c1
  10. 05 6月, 2015 2 次提交
    • M
      arm64: alternative: Work around .inst assembler bugs · eb7c11ee
      Marc Zyngier 提交于
      AArch64 toolchains suffer from the following bug:
      
      $ cat blah.S
      1:
      	.inst	0x01020304
      	.if ((. - 1b) != 4)
      		.error	"blah"
      	.endif
      $ aarch64-linux-gnu-gcc -c blah.S
      blah.S: Assembler messages:
      blah.S:3: Error: non-constant expression in ".if" statement
      
      which precludes the use of msr_s and co as part of alternatives.
      
      We workaround this issue by not directly testing the labels
      themselves, but by moving the current output pointer by a value
      that should always be zero. If this value is not null, then
      we will trigger a backward move, which is expclicitely forbidden.
      This triggers the error we're after:
      
        AS      arch/arm64/kvm/hyp.o
      arch/arm64/kvm/hyp.S: Assembler messages:
      arch/arm64/kvm/hyp.S:1377: Error: attempt to move .org backwards
      scripts/Makefile.build:294: recipe for target 'arch/arm64/kvm/hyp.o' failed
      make[1]: *** [arch/arm64/kvm/hyp.o] Error 1
      Makefile:946: recipe for target 'arch/arm64/kvm' failed
      
      Not pretty, but at least works on the current toolchains.
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      eb7c11ee
    • M
      arm64: alternative: Merge alternative-asm.h into alternative.h · 8d883b23
      Marc Zyngier 提交于
      asm/alternative-asm.h and asm/alternative.h are extremely similar,
      and really deserve to live in the same file (as this makes further
      modufications a bit easier).
      
      Fold the content of alternative-asm.h into alternative.h, and
      update the few users.
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      8d883b23
  11. 03 6月, 2015 1 次提交
    • M
      arm64: insn: Add aarch64_{get,set}_branch_offset · 10b48f7e
      Marc Zyngier 提交于
      In order to deal with branches located in alternate sequences,
      but pointing to the main kernel text, it is required to extract
      the relative displacement encoded in the instruction, and to be
      able to update said instruction with a new offset (once it is
      known).
      
      For this, we introduce three new helpers:
      - aarch64_insn_is_branch_imm is a predicate indicating if the
        instruction is an immediate branch
      - aarch64_get_branch_offset returns a signed value representing
        the byte offset encoded in a branch instruction
      - aarch64_set_branch_offset takes an instruction and an offset,
        and returns the corresponding updated instruction.
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      10b48f7e
  12. 02 6月, 2015 1 次提交
  13. 01 6月, 2015 1 次提交
  14. 27 5月, 2015 3 次提交
  15. 26 5月, 2015 1 次提交
  16. 20 5月, 2015 1 次提交
    • H
      arm64: perf: Fix callchain parse error with kernel tracepoint events · 5b09a094
      Hou Pengyang 提交于
      For ARM64, when tracing with tracepoint events, the IP and pstate are set
      to 0, preventing the perf code parsing the callchain and resolving the
      symbols correctly.
      
       ./perf record -e sched:sched_switch -g --call-graph dwarf ls
          [ perf record: Captured and wrote 0.146 MB perf.data ]
       ./perf report -f
          Samples: 194  of event 'sched:sched_switch', Event count (approx.): 194
          Children      Self    Command  Shared Object     Symbol
          100.00%       100.00%  ls       [unknown]         [.] 0000000000000000
      
      The fix is to implement perf_arch_fetch_caller_regs for ARM64, which fills
      several necessary registers used for callchain unwinding, including pc,sp,
      fp and spsr .
      
      With this patch, callchain can be parsed correctly as follows:
      
           ......
      +    2.63%     0.00%  ls       [kernel.kallsyms]  [k] vfs_symlink
      +    2.63%     0.00%  ls       [kernel.kallsyms]  [k] follow_down
      +    2.63%     0.00%  ls       [kernel.kallsyms]  [k] pfkey_get
      +    2.63%     0.00%  ls       [kernel.kallsyms]  [k] do_execveat_common.isra.33
      -    2.63%     0.00%  ls       [kernel.kallsyms]  [k] pfkey_send_policy_notify
           pfkey_send_policy_notify
           pfkey_get
           v9fs_vfs_rename
           page_follow_link_light
           link_path_walk
           el0_svc_naked
          .......
      Signed-off-by: NHou Pengyang <houpengyang@huawei.com>
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      5b09a094
  17. 19 5月, 2015 5 次提交
    • C
    • L
      ARM64: kernel: unify ACPI and DT cpus initialization · 0f078336
      Lorenzo Pieralisi 提交于
      The code that initializes cpus on arm64 is currently split in two
      different code paths that carry out DT and ACPI cpus initialization.
      
      Most of the code executing SMP initialization is common and should
      be merged to reduce discrepancies between ACPI and DT initialization
      and to have code initializing cpus in a single common place in the
      kernel.
      
      This patch refactors arm64 SMP cpus initialization code to merge
      ACPI and DT boot paths in a common file and to create sanity
      checks that can be reused by both boot methods.
      
      Current code assumes PSCI is the only available boot method
      when arm64 boots with ACPI; this can be easily extended if/when
      the ACPI parking protocol is merged into the kernel.
      Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Acked-by: NHanjun Guo <hanjun.guo@linaro.org>
      Acked-by: NMark Rutland <mark.rutland@arm.com>
      Tested-by: NHanjun Guo <hanjun.guo@linaro.org>
      Tested-by: Mark Rutland <mark.rutland@arm.com> [DT]
      Cc: Will Deacon <will.deacon@arm.com>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      0f078336
    • L
      ARM64: kernel: make cpu_ops hooks DT agnostic · 819a8826
      Lorenzo Pieralisi 提交于
      ARM64 CPU operations such as cpu_init and cpu_init_idle take
      a struct device_node pointer as a parameter, which corresponds to
      the device tree node of the logical cpu on which the operation
      has to be applied.
      
      With the advent of ACPI on arm64, where MADT static table entries
      are used to initialize cpus, the device tree node parameter
      in cpu_ops hooks become useless when booting with ACPI, since
      in that case cpu device tree nodes are not present and can not be
      used for cpu initialization.
      
      The current cpu_init hook requires a struct device_node pointer
      parameter because it is called while parsing the device tree to
      initialize CPUs, when the cpu_logical_map (that is used to match
      a cpu node reg property to a device tree node) for a given logical
      cpu id is not set up yet. This means that the cpu_init hook cannot
      rely on the of_get_cpu_node function to retrieve the device tree
      node corresponding to the logical cpu id passed in as parameter,
      so the cpu device tree node must be passed in as a parameter to fix
      this catch-22 dependency cycle.
      
      This patch reshuffles the cpu_logical_map initialization code so
      that the cpu_init cpu_ops hook can safely use the of_get_cpu_node
      function to retrieve the cpu device tree node, removing the need for
      the device tree node pointer parameter.
      
      In the process, the patch removes device tree node parameters
      from all cpu_ops hooks, in preparation for SMP DT/ACPI cpus
      initialization consolidation.
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Acked-by: NHanjun Guo <hanjun.guo@linaro.org>
      Acked-by: NSudeep Holla <sudeep.holla@arm.com>
      Acked-by: NMark Rutland <mark.rutland@arm.com>
      Tested-by: NHanjun Guo <hanjun.guo@linaro.org>
      Tested-by: Mark Rutland <mark.rutland@arm.com> [DT]
      Cc: Will Deacon <will.deacon@arm.com>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      819a8826
    • M
      arm64: Rename temp variable in read*_relaxed() · e985ad17
      Michal Simek 提交于
      This resolves the following sparse warning from readl() and other
      macros, which ends up embedding readl_relaxed() using the same
      variable.
      
      Warning log:
      include/asm-generic/io.h:364:16: warning: symbol '__v' shadows an
      earlier one
      include/asm-generic/io.h:364:16: originally declared here
      include/asm-generic/io.h:372:16: warning: symbol '__v' shadows an
      earlier one
      include/asm-generic/io.h:372:16: originally declared here
      include/asm-generic/io.h:380:16: warning: symbol '__v' shadows an
      earlier one
      include/asm-generic/io.h:380:16: originally declared here
      include/asm-generic/io.h:568:16: warning: symbol '__v' shadows an
      earlier one
      include/asm-generic/io.h:568:16: originally declared here
      include/asm-generic/io.h:576:16: warning: symbol '__v' shadows an
      earlier one
      include/asm-generic/io.h:576:16: originally declared here
      include/asm-generic/io.h:584:16: warning: symbol '__v' shadows an
      earlier one
      include/asm-generic/io.h:584:16: originally declared here
      
      The same patch was already applied to arm32 as
      "ARM: 7118/1: rename temp variable in read*_relaxed()"
      (sha1: b0c1264f)
      Acked-by: NLiviu Dudau <Liviu.Dudau@arm.com>
      Signed-off-by: NMichal Simek <michal.simek@xilinx.com>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      e985ad17
    • M
      arm64: kill flush_cache_all() · 68234df4
      Mark Rutland 提交于
      The documented semantics of flush_cache_all are not possible to provide
      for arm64 (short of flushing the entire physical address space by VA),
      and there are currently no users; KVM uses VA maintenance exclusively,
      cpu_reset is never called, and the only two users outside of arch code
      cannot be built for arm64.
      
      While cpu_soft_reset and related functions (which call flush_cache_all)
      were thought to be useful for kexec, their current implementations only
      serve to mask bugs. For correctness kexec will need to perform
      maintenance by VA anyway to account for system caches, line migration,
      and other subtleties of the cache architecture. As the extent of this
      cache maintenance will be kexec-specific, it should probably live in the
      kexec code.
      
      This patch removes flush_cache_all, and related unused components,
      preventing further abuse.
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Cc: AKASHI Takahiro <takahiro.akashi@linaro.org>
      Cc: Geoff Levand <geoff@infradead.org>
      Acked-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Acked-by: NCatalin Marinas <catalin.marinas@arm.com>
      Acked-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Acked-by: NMarc Zyngier <marc.zyngier@arm.com>
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      68234df4