1. 02 6月, 2015 6 次提交
  2. 16 5月, 2015 2 次提交
  3. 15 5月, 2015 3 次提交
  4. 08 5月, 2015 7 次提交
    • P
      ARM: 8355/1: arch: Show the serial number from devicetree in cpuinfo · 3f599875
      Paul Kocialkowski 提交于
      This grabs the serial number shown in cpuinfo from the serial-number device-tree
      property in priority. When booting with ATAGs (and without device-tree), the
      provided number is still shown instead.
      Signed-off-by: NPaul Kocialkowski <contact@paulk.fr>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      3f599875
    • R
      ARM: optimize memset_io()/memcpy_fromio()/memcpy_toio() · 7ddfe625
      Russell King 提交于
      If we are building for a LE platform, and we haven't overriden the
      MMIO ops, then we can optimize the mem*io operations using the
      standard string functions.
      Acked-by: NNicolas Pitre <nico@linaro.org>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      7ddfe625
    • A
      ARM: 8220/1: allow modules outside of bl range · 7d485f64
      Ard Biesheuvel 提交于
      Loading modules far away from the kernel in memory is problematic
      because the 'bl' instruction only has limited reach, and modules are not
      built with PLTs. Instead of using the -mlong-calls option (which affects
      all compiler emitted bl instructions, but not the ones in assembler),
      this patch allocates some additional space at module load time, and
      populates it with PLT like veneers when encountering relocations that
      are out of range.
      
      This should work with all relocations against symbols exported by the
      kernel, including those resulting from GCC generated implicit function
      calls for ftrace etc.
      
      The module memory size increases by about 5% on average, regardless of
      whether any PLT entries were actually needed. However, due to the page
      based rounding that occurs when allocating module memory, the average
      memory footprint increase is negligible.
      Reviewed-by: NNicolas Pitre <nico@linaro.org>
      Signed-off-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      7d485f64
    • T
      ARM: 8353/1: mm: Fix Cortex-A8 erratum 430973 segfaults for bootloaders and multiarch · e748994f
      Tony Lindgren 提交于
      Looks like apps can be made to segfault easily on armhf distros
      just by running cpuburn-a8 in the background, then starting apt
      get update unless erratum 430973 workaround is enabled. This happens
      on r3p2 also, which has 430973 fixed in hardware.
      
      Turns out the reason for this is some bootloaders incorrectly
      setting the auxilary register IBE bit, which probably causes us
      to hit erratum 687067 on Cortex-A8 later than r1p2.
      
      If the bootloader incorrectly sets the IBE bit in the auxilary control
      register for Cortex-A8 revisions with 430973 fixed in hardware, we
      need to call flush BTAC/BTB to avoid segfaults probably caused by
      erratum 687067. So let's flush BTAC/BTB unconditionally for Cortex-A8.
      It won't do anything unless the IBE bit is set.
      
      Note that we keep the erratum 430973 Kconfig option still around and
      disabled for multiarch as it may be unsafe to enable for some secure
      SoC. It is known safe to be enabled for n900, but won't do anything
      on n900 as the IBE bit needs to be set with SMC.
      
      Also note that SoCs probably should also add checks and print warnings
      for the misconfigured IBE bit depending on the Cortex-A8 revision
      so the bootloaders can be fixed Cortex-A8 revisions later than
      r1p2 to not set the IBE bit.
      Tested-by: NSebastian Reichel <sre@kernel.org>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      e748994f
    • K
      ARM: 8346/1: sa1100: Constify irq_domain_ops · 9827e8e5
      Krzysztof Kozlowski 提交于
      The irq_domain_ops are not modified by the driver and the irqdomain core
      code accepts pointer to a const data.
      Signed-off-by: NKrzysztof Kozlowski <k.kozlowski.k@gmail.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      9827e8e5
    • P
      ARM: 8341/1: io: Unpessimize relaxed io accessors · 5bb5d66d
      Peter Hurley 提交于
      commit 195bbcac ("ARM: 7500/1: io: avoid writeback addressing
      modes for __raw_ accessors") disables writeback addressing modes for
      raw i/o. However, the "+Q" output constraint forces the compiler to
      disable load hoist optimizations (because the output constraint informs the
      compiler of memory stores which the compiler assumes may alias other memory).
      
      Since the relaxed accessors only guarantee ordering wrt i/o accesses to the
      same device and not to main memory, there's never a possibility of an accessor
      invalidating a hoisted load (because only non-i/o loads would have been hoisted).
      
      The effect is especially noticable with complex address inputs in loops.
      For example, the following code:
      
          #include <linux/kernel.h>
          #include <linux/io.h>
      
          static const int *remap;
      
          void wr_loop(void __iomem *base, int c, int val)
          {
                  int i;
      
                  for (i = 0; i < c; i++)
                          writew_relaxed(val, base + remap[c >> 2]);
          }
      
      generates
      
                 current master             |             this patch
       0: e3510000    cmp     r1, #0        |  0: e3510000    cmp     r1, #0
       4: d12fff1e    bxle    lr            |  4: d12fff1e    bxle    lr
       8: e3003000    movw    r3, #0        |  8: e3c1c003    bic     ip, r1, #3
       c: e3403000    movt    r3, #0        |  c: e6ff2072    uxth    r2, r2
      10: e92d4010    push    {r4, lr}      | 10: e3a03000    mov     r3, #0
      14: e6ff2072    uxth    r2, r2        | 14: e59cc000    ldr     ip, [ip]
      18: e3c14003    bic     r4, r1, #3    | 18: e080000c    add     r0, r0, ip
      1c: e593e000    ldr     lr, [r3]      |
      20: e3a03000    mov     r3, #0        | 1c: e1c020b0    strh    r2, [r0]
                                            | 20: e2833001    add     r3, r3, #1
      24: e79ec004    ldr     ip, [lr, r4]  | 24: e1530001    cmp     r3, r1
      28: e080c00c    add     ip, r0, ip    | 28: 1afffffb    bne     1c
      2c: e1cc20b0    strh    r2, [ip]      | 2c: e12fff1e    bx      lr
      30: e2833001    add     r3, r3, #1    |
      34: e1530001    cmp     r3, r1        |
      38: 1afffff9    bne     24            |
                                            |
      3c: e8bd8010    pop     {r4, pc}      |
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NPeter Hurley <peter@hurleysoftware.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      5bb5d66d
    • M
      ARM: 8340/1: ARMv7-M: Enlarge vector table up to 256 entries · 6b1814cd
      Maxime Coquelin stm32 提交于
      From Cortex-M reference manuals, the nvic supports up to 240 interrupts.
      So the number of entries in vectors table is up to 256.
      
      This patch adds a new config flag to specify the number of external interrupts.
      Some ifdeferies are added in order to respect the natural alignment without
      wasting too much space on smaller systems.
      Acked-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Acked-by: NStefan Agner <stefan@agner.ch>
      Tested-by: NChanwoo Choi <cw00.choi@samsung.com>
      Signed-off-by: NMaxime Coquelin <mcoquelin.stm32@gmail.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      6b1814cd
  5. 27 4月, 2015 1 次提交
  6. 24 4月, 2015 6 次提交
    • L
      x86: fix special __probe_kernel_write() tail zeroing case · d869844b
      Linus Torvalds 提交于
      Commit cae2a173 ("x86: clean up/fix 'copy_in_user()' tail zeroing")
      fixed the failure case tail zeroing of one special case of the x86-64
      generic user-copy routine, namely when used for the user-to-user case
      ("copy_in_user()").
      
      But in the process it broke an even more unusual case: using the user
      copy routine for kernel-to-kernel copying.
      
      Now, normally kernel-kernel copies are obviously done using memcpy(),
      but we have a couple of special cases when we use the user-copy
      functions.  One is when we pass a kernel buffer to a regular user-buffer
      routine, using set_fs(KERNEL_DS).  That's a "normal" case, and continued
      to work fine, because it never takes any faults (with the possible
      exception of a silent and successful vmalloc fault).
      
      But Jan Beulich pointed out another, very unusual, special case: when we
      use the user-copy routines not because it's a path that expects a user
      pointer, but for a couple of ftrace/kgdb cases that want to do a kernel
      copy, but do so using "unsafe" buffers, and use the user-copy routine to
      gracefully handle faults.  IOW, for probe_kernel_write().
      
      And that broke for the case of a faulting kernel destination, because we
      saw the kernel destination and wanted to try to clear the tail of the
      buffer.  Which doesn't work, since that's what faults.
      
      This only triggers for things like kgdb and ftrace users (eg trying
      setting a breakpoint on read-only memory), but it's definitely a bug.
      The fix is to not compare against the kernel address start (TASK_SIZE),
      but instead use the same limits "access_ok()" uses.
      Reported-and-tested-by: NJan Beulich <jbeulich@suse.com>
      Cc: stable@vger.kernel.org # 4.0
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d869844b
    • A
      crypto: x86/sha512_ssse3 - fixup for asm function prototype change · 00425bb1
      Ard Biesheuvel 提交于
      Patch e68410eb ("crypto: x86/sha512_ssse3 - move SHA-384/512
      SSSE3 implementation to base layer") changed the prototypes of the
      core asm SHA-512 implementations so that they are compatible with
      the prototype used by the base layer.
      
      However, in one instance, the register that was used for passing the
      input buffer was reused as a scratch register later on in the code,
      and since the input buffer param changed places with the digest param
      -which needs to be written back before the function returns- this
      resulted in the scratch register to be dereferenced in a memory write
      operation, causing a GPF.
      
      Fix this by changing the scratch register to use the same register as
      the input buffer param again.
      
      Fixes: e68410eb ("crypto: x86/sha512_ssse3 - move SHA-384/512 SSSE3 implementation to base layer")
      Reported-By: NBobby Powers <bobbypowers@gmail.com>
      Tested-By: NBobby Powers <bobbypowers@gmail.com>
      Signed-off-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      00425bb1
    • L
      nios2: rework cache · 1a70db49
      Ley Foon Tan 提交于
      - flush dcache before flush instruction cache
      - remork update_mmu_cache and flush_dcache_page
      - add shmparam.h
      Signed-off-by: NLey Foon Tan <lftan@altera.com>
      1a70db49
    • E
      nios2: Add types.h header required for __u32 type · 2009337e
      Ezequiel Garcia 提交于
      Reported by the header checker (CONFIG_HEADERS_CHECK=y):
      
        CHECK   usr/include/asm/ (31 files)
      ./usr/include/asm/ptrace.h:77: found __[us]{8,16,32,64} type without #include <linux/types.h>
      Signed-off-by: NEzequiel Garcia <ezequiel@vanguardiasur.com.ar>
      Acked-by: NLey Foon Tan <lftan@altera.com>
      2009337e
    • S
      d91e14b3
    • C
      blackfin: Wire up missing syscalls · 4f650a59
      Chen Gang 提交于
      The related syscalls are below which may cause samples/kdbus building
      break in next-20150401 tree, the related information and error:
      
          CALL    scripts/checksyscalls.sh
        <stdin>:1223:2: warning: #warning syscall kcmp not implemented [-Wcpp]
        <stdin>:1226:2: warning: #warning syscall finit_module not implemented [-Wcpp]
        <stdin>:1229:2: warning: #warning syscall sched_setattr not implemented [-Wcpp]
        <stdin>:1232:2: warning: #warning syscall sched_getattr not implemented [-Wcpp]
        <stdin>:1235:2: warning: #warning syscall renameat2 not implemented [-Wcpp]
        <stdin>:1238:2: warning: #warning syscall seccomp not implemented [-Wcpp]
        <stdin>:1241:2: warning: #warning syscall getrandom not implemented [-Wcpp]
        <stdin>:1244:2: warning: #warning syscall memfd_create not implemented [-Wcpp]
        <stdin>:1247:2: warning: #warning syscall bpf not implemented [-Wcpp]
        <stdin>:1250:2: warning: #warning syscall execveat not implemented [-Wcpp]
        [...]
          HOSTCC  samples/kdbus/kdbus-workers
        samples/kdbus/kdbus-workers.c: In function ‘prime_new’:
        samples/kdbus/kdbus-workers.c:930:18: error: ‘__NR_memfd_create’ undeclared (first use in this function)
          p->fd = syscall(__NR_memfd_create, "prime-area", MFD_CLOEXEC);
                          ^
        samples/kdbus/kdbus-workers.c:930:18: note: each undeclared identifier is reported only once for each function it appears in
      Signed-off-by: NChen Gang <gang.chen.5i5j@gmail.com>
      4f650a59
  7. 23 4月, 2015 15 次提交