1. 18 5月, 2016 2 次提交
  2. 17 5月, 2016 6 次提交
  3. 16 5月, 2016 1 次提交
  4. 15 5月, 2016 1 次提交
    • Z
      arm64: bpf: jit JMP_JSET_{X,K} · 98397fc5
      Zi Shen Lim 提交于
      Original implementation commit e54bcde3 ("arm64: eBPF JIT compiler")
      had the relevant code paths, but due to an oversight always fail jiting.
      
      As a result, we had been falling back to BPF interpreter whenever a BPF
      program has JMP_JSET_{X,K} instructions.
      
      With this fix, we confirm that the corresponding tests in lib/test_bpf
      continue to pass, and also jited.
      
      ...
      [    2.784553] test_bpf: #30 JSET jited:1 188 192 197 PASS
      [    2.791373] test_bpf: #31 tcpdump port 22 jited:1 325 677 625 PASS
      [    2.808800] test_bpf: #32 tcpdump complex jited:1 323 731 991 PASS
      ...
      [    3.190759] test_bpf: #237 JMP_JSET_K: if (0x3 & 0x2) return 1 jited:1 110 PASS
      [    3.192524] test_bpf: #238 JMP_JSET_K: if (0x3 & 0xffffffff) return 1 jited:1 98 PASS
      [    3.211014] test_bpf: #249 JMP_JSET_X: if (0x3 & 0x2) return 1 jited:1 120 PASS
      [    3.212973] test_bpf: #250 JMP_JSET_X: if (0x3 & 0xffffffff) return 1 jited:1 89 PASS
      ...
      
      Fixes: e54bcde3 ("arm64: eBPF JIT compiler")
      Signed-off-by: NZi Shen Lim <zlim.lnx@gmail.com>
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Acked-by: NYang Shi <yang.shi@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      98397fc5
  5. 13 5月, 2016 5 次提交
    • S
      ARM: Hide finish_arch_post_lock_switch() from modules · ef0491ea
      Steven Rostedt 提交于
      The introduction of switch_mm_irqs_off() brought back an old bug
      regarding the use of preempt_enable_no_resched:
      
      As part of:
      
        62b94a08 ("sched/preempt: Take away preempt_enable_no_resched() from modules")
      
      the definition of preempt_enable_no_resched() is only available in
      built-in code, not in loadable modules, so we can't generally use
      it from header files.
      
      However, the ARM version of finish_arch_post_lock_switch()
      calls preempt_enable_no_resched() and is defined as a static
      inline function in asm/mmu_context.h. This in turn means we cannot
      include asm/mmu_context.h from modules.
      
      With today's tip tree, asm/mmu_context.h gets included from
      linux/mmu_context.h, which is normally the exact pattern one would
      expect, but unfortunately, linux/mmu_context.h can be included from
      the vhost driver that is a loadable module, now causing this compile
      time error with modular configs:
      
        In file included from ../include/linux/mmu_context.h:4:0,
                         from ../drivers/vhost/vhost.c:18:
        ../arch/arm/include/asm/mmu_context.h: In function 'finish_arch_post_lock_switch':
        ../arch/arm/include/asm/mmu_context.h:88:3: error: implicit declaration of function 'preempt_enable_no_resched' [-Werror=implicit-function-declaration]
           preempt_enable_no_resched();
      
      Andy already tried to fix the bug by including linux/preempt.h
      from asm/mmu_context.h, but that didn't help. Arnd suggested reordering
      the header files, which wasn't popular, so let's use this
      workaround instead:
      
      The finish_arch_post_lock_switch() definition is now also hidden
      inside of #ifdef MODULE, so we don't see anything referencing
      preempt_enable_no_resched() from a header file. I've built a
      few hundred randconfig kernels with this, and did not see any
      new problems.
      Tested-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Mel Gorman <mgorman@techsingularity.net>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Russell King - ARM Linux <linux@armlinux.org.uk>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vince Weaver <vincent.weaver@maine.edu>
      Cc: linux-arm-kernel@lists.infradead.org
      Fixes: f98db601 ("sched/core: Add switch_mm_irqs_off() and use it in the scheduler")
      Link: http://lkml.kernel.org/r/1463146234-161304-1-git-send-email-arnd@arndb.deSigned-off-by: NIngo Molnar <mingo@kernel.org>
      ef0491ea
    • J
      arc: axs10x: Add DT bindings for I2S PLL Clock · 445a6421
      Jose Abreu 提交于
      Add device tree bindings for AXS10X I2S PLL Clock driver.
      Acked-by: NAlexey Brodkin <abrodkin@synopsys.com>
      Acked-by: NVineet Gupta <vgupta@synopsys.com>
      Signed-off-by: NJose Abreu <joabreu@synopsys.com>
      445a6421
    • M
      x86/arch_prctl/64: Restore accidentally removed put_cpu() in ARCH_SET_GS · 4afd0565
      Mateusz Guzik 提交于
      This fixes an oversight in:
      
      	731e33e3 ("Remove FSBASE/GSBASE < 4G optimization")
      Signed-off-by: NMateusz Guzik <mguzik@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vince Weaver <vincent.weaver@maine.edu>
      Link: http://lkml.kernel.org/r/1462913803-29634-1-git-send-email-mguzik@redhat.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      4afd0565
    • V
      ARC: pae: STRICT_MM_TYPECHECKS was broken · 5035cd5b
      Vineet Gupta 提交于
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      5035cd5b
    • O
      coredump: get rid of coredump_params->written · a0083939
      Omar Sandoval 提交于
      cprm->written is redundant with cprm->file->f_pos, so use that instead.
      Signed-off-by: NOmar Sandoval <osandov@fb.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      a0083939
  6. 12 5月, 2016 14 次提交
  7. 11 5月, 2016 11 次提交
    • B
      ARM: dts: at91: sam9x5: Fix the memory range assigned to the PMC · aab0a4c8
      Boris Brezillon 提交于
      The memory range assigned to the PMC (Power Management Controller) was
      not including the PMC_PCR register which are used to control peripheral
      clocks.
      
      This was working fine thanks to the page granularity of ioremap(), but
      started to fail when we switched to syscon/regmap, because regmap is
      making sure that all accesses are falling into the reserved range.
      Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
      Reported-by: NRichard Genoud <richard.genoud@gmail.com>
      Tested-by: NRichard Genoud <richard.genoud@gmail.com>
      Fixes: 863a81c3 ("clk: at91: make use of syscon to share PMC registers in several drivers")
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NNicolas Ferre <nicolas.ferre@atmel.com>
      aab0a4c8
    • A
      ARM: aspeed: adapt defconfigs for new CONFIG_PRINTK_TIME · 0ef659a3
      Arnd Bergmann 提交于
      Commit 94ea9c7a579f ("lib, switch CONFIG_PRINTK_TIME to int") changes
      the type of CONFIG_PRINTK_TIME and adapts all existing defconfig files,
      while we add two new defconfig files with d0bc3483 ("arm/configs:
      Add Aspeed defconfig"), with the old type.
      
      This changes the two new defconfig files to match the other ones.
      As a result, we get harmless warnings for the arm-soc defconfig
      branch by itself, but everything will work when 4.7-rc1 is out.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      0ef659a3
    • L
      MIPS: do away with ARCH_[WANT_OPTIONAL|REQUIRE]_GPIOLIB · d30a2b47
      Linus Walleij 提交于
      This replaces:
      
      - "select ARCH_REQUIRE_GPIOLIB" with "select GPIOLIB" as this can
        now be selected directly.
      
      - "select ARCH_WANT_OPTIONAL_GPIOLIB" with no dependency: GPIOLIB
        is now selectable by everyone, so we need not declare our
        intent to select it.
      
      When ordering the symbols the following rationale was used:
      if the selects were in alphabetical order, I moved select GPIOLIB
      to be in alphabetical order, but if the selects were not
      maintained in alphabetical order, I just replaced
      "select ARCH_REQUIRE_GPIOLIB" with "select GPIOLIB".
      
      Cc: Michael Büsch <m@bues.ch>
      Cc: linux-mips@linux-mips.org
      Acked-by: NRalf Baechle <ralf@linux-mips.org>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      d30a2b47
    • K
      arm64: kernel: Fix incorrect brk randomization · 61462c8a
      Kees Cook 提交于
      This fixes two issues with the arm64 brk randomziation. First, the
      STACK_RND_MASK was being used incorrectly. The original code was:
      
      	unsigned long range_end = base + (STACK_RND_MASK << PAGE_SHIFT) + 1;
      
      STACK_RND_MASK is 0x7ff (32-bit) or 0x3ffff (64-bit), with 4K pages where
      PAGE_SHIFT is 12:
      
      	#define STACK_RND_MASK	(test_thread_flag(TIF_32BIT) ? \
      						0x7ff >> (PAGE_SHIFT - 12) : \
      						0x3ffff >> (PAGE_SHIFT - 12))
      
      This means the resulting offset from base would be 0x7ff0001 or 0x3ffff0001,
      which is wrong since it creates an unaligned end address. It was likely
      intended to be:
      
      	unsigned long range_end = base + ((STACK_RND_MASK + 1) << PAGE_SHIFT)
      
      Which would result in offsets of 0x800000 (32-bit) and 0x40000000 (64-bit).
      
      However, even this corrected 32-bit compat offset (0x00800000) is much
      smaller than native ARM's brk randomization value (0x02000000):
      
      	unsigned long arch_randomize_brk(struct mm_struct *mm)
      	{
      	        unsigned long range_end = mm->brk + 0x02000000;
      	        return randomize_range(mm->brk, range_end, 0) ? : mm->brk;
      	}
      
      So, instead of basing arm64's brk randomization on mistaken STACK_RND_MASK
      calculations, just use specific corrected values for compat (0x2000000)
      and native arm64 (0x40000000).
      Reviewed-by: NJon Medhurst <tixy@linaro.org>
      Signed-off-by: NKees Cook <keescook@chromium.org>
      [will: use is_compat_task() as suggested by tixy]
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      61462c8a
    • J
      arm64: cpuinfo: Missing NULL terminator in compat_hwcap_str · f228b494
      Julien Grall 提交于
      The loop that browses the array compat_hwcap_str will stop when a NULL
      is encountered, however NULL is missing at the end of array. This will
      lead to overrun until a NULL is found somewhere in the following memory.
      In reality, this works out because the compat_hwcap2_str array tends to
      follow immediately in memory, and that *is* terminated correctly.
      Furthermore, the unsigned int compat_elf_hwcap is checked before
      printing each capability, so we end up doing the right thing because
      the size of the two arrays is less than 32. Still, this is an obvious
      mistake and should be fixed.
      
      Note for backporting: commit 12d11817 ("arm64: Move
      /proc/cpuinfo handling code") moved this code in v4.4. Prior to that
      commit, the same change should be made in arch/arm64/kernel/setup.c.
      
      Fixes: 44b82b77 "arm64: Fix up /proc/cpuinfo"
      Cc: <stable@vger.kernel.org> # v3.19+ (but see note above prior to v4.4)
      Signed-off-by: NJulien Grall <julien.grall@arm.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      f228b494
    • V
      irqchip: Add LPC32xx interrupt controller driver · 8cb17b5e
      Vladimir Zapolskiy 提交于
      The change adds improved support of NXP LPC32xx MIC, SIC1 and SIC2
      interrupt controllers.
      
      This is a list of new features in comparison to the legacy driver:
      * irq types are taken from device tree settings, no more need to
        hardcode them,
      * old driver is based on irq_domain_add_legacy, which causes problems
        with handling MIC hardware interrupt 0 produced by SIC1,
      * there is one driver for MIC, SIC1 and SIC2, no more need to handle
        them separately, e.g. have two separate handlers for SIC1 and SIC2,
      * the driver does not have any dependencies on hardcoded register
        offsets,
      * the driver is much simpler for maintenance,
      * SPARSE_IRQS option is supported.
      
      Legacy LPC32xx interrupt controller driver was broken since commit
      76ba59f8 ("genirq: Add irq_domain-aware core IRQ handler"), which
      requires a private interrupt handler, otherwise any SIC1 generated
      interrupt (mapped to MIC hwirq 0) breaks the kernel with the message
      "unexpected IRQ trap at vector 00".
      
      The change disables compilation of a legacy driver found at
      arch/arm/mach-lpc32xx/irq.c, the file will be removed in a separate
      commit.
      
      Fixes: 76ba59f8 ("genirq: Add irq_domain-aware core IRQ handler")
      Tested-by: NSylvain Lemieux <slemieux.tyco@gmail.com>
      Signed-off-by: NVladimir Zapolskiy <vz@mleia.com>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      8cb17b5e
    • S
      arm64: secondary_start_kernel: Remove unnecessary barrier · 99aa0362
      Suzuki K Poulose 提交于
      Remove the unnecessary smp_wmb(), which was added to make sure
      that the update_cpu_boot_status() completes before we mark the
      CPU online. But update_cpu_boot_status() already has dsb() (required
      for the failing CPUs) to ensure the correct behavior.
      
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Acked-by: NMark Rutland <mark.rutland@arm.com>
      Reported-by: NDennis Chen <dennis.chen@arm.com>
      Signed-off-by: NSuzuki K Poulose <suzuki.poulose@arm.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      99aa0362
    • H
      s390/vmem: remove unused function parameter · c53db522
      Heiko Carstens 提交于
      vmem_pte_alloc() has an unused function parameter. Let's remove it.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      c53db522
    • H
      s390/vmem: fix identity mapping · c34a6905
      Heiko Carstens 提交于
      The identity mapping is suboptimal for the last 2GB frame. The mapping
      will be established with a mix of 4KB and 1MB mappings instead of a
      single 2GB mapping.
      
      This happens because of a off-by-one bug introduced with
      commit 50be6345 ("s390/mm: Convert bootmem to memblock").
      
      Currently the identity mapping looks like this:
      
      0x0000000080000000-0x0000000180000000        4G PUD RW
      0x0000000180000000-0x00000001fff00000     2047M PMD RW
      0x00000001fff00000-0x0000000200000000        1M PTE RW
      
      With the bug fixed it looks like this:
      
      0x0000000080000000-0x0000000200000000        6G PUD RW
      
      Fixes: 50be6345 ("s390/mm: Convert bootmem to memblock")
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      c34a6905
    • S
      arm64/sunxi: 4.6-rc1: Add dependency on generic irq chip · 23485482
      Suzuki K Poulose 提交于
      Commit ce3dd55b ("arm64: Introduce Allwinner SoC config option"),
      added support for ARCH_SUNXI on arm64, but failed to select
      GENERIC_IRQ_CHIP, which is required for drivers/irqchip/irq-sunxi-nmi.c
      and causes build failures like :
      
        UPD     include/generated/compile.h
        CC      init/version.o
        LD      init/built-in.o
      drivers/built-in.o: In function `sunxi_sc_nmi_set_type':
      drivers/irqchip/irq-sunxi-nmi.c:114: undefined reference to `irq_setup_alt_chip'
      drivers/built-in.o: In function `irq_domain_add_linear':
      include/linux/irqdomain.h:253: undefined reference to `irq_generic_chip_ops'
      include/linux/irqdomain.h:253: undefined reference to `irq_generic_chip_ops'
      drivers/built-in.o: In function `sunxi_sc_nmi_irq_init':
      drivers/irqchip/irq-sunxi-nmi.c:146: undefined reference to `irq_alloc_domain_generic_chips'
      drivers/irqchip/irq-sunxi-nmi.c:161: undefined reference to `irq_get_domain_generic_chip'
      drivers/irqchip/irq-sunxi-nmi.c:170: undefined reference to `irq_gc_mask_clr_bit'
      drivers/irqchip/irq-sunxi-nmi.c:171: undefined reference to `irq_gc_mask_set_bit'
      drivers/irqchip/irq-sunxi-nmi.c:172: undefined reference to `irq_gc_ack_set_bit'
      drivers/irqchip/irq-sunxi-nmi.c:170: undefined reference to `irq_gc_mask_clr_bit'
      
      Fixes: commit ce3dd55b ("arm64: Introduce Allwinner SoC config option")
      Signed-off-by: NSuzuki K Poulose <suzuki.poulose@arm.com>
      Signed-off-by: NAndre Przywara <andre.przywara@arm.com>
      Acked-by: NMaxime Ripard <maxime.ripard@free-electrons.com>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      23485482
    • A
      kvmconfig: add more virtio drivers · 44ca941a
      Andrey Utkin 提交于
      "make defconfig kvmconfig" is supposed to end up with usable kernel for
      KVM guest. In practice, it won't work for e.g. Hetzner VPS (KVM-based)
      unless you add these options.
      Signed-off-by: NAndrey Utkin <andrey_utkin@fastmail.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      44ca941a