1. 06 8月, 2014 1 次提交
  2. 05 8月, 2014 5 次提交
    • D
      sparc: Add "install" target · c78f77e2
      David L Stevens 提交于
      This patches adds an "install" target to install kernel builds for SPARC,
      modeled after the i386 script.
      Signed-off-by: NDavid L Stevens <david.stevens@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c78f77e2
    • A
      arch/sparc/math-emu/math_32.c: drop stray break operator · 093758e3
      Andrey Utkin 提交于
      This commit is a guesswork, but it seems to make sense to drop this
      break, as otherwise the following line is never executed and becomes
      dead code. And that following line actually saves the result of
      local calculation by the pointer given in function argument. So the
      proposed change makes sense if this code in the whole makes sense (but I
      am unable to analyze it in the whole).
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=81641Reported-by: NDavid Binderman <dcb314@hotmail.com>
      Signed-off-by: NAndrey Utkin <andrey.krieger.utkin@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      093758e3
    • S
      sparc64: ldc_connect() should not return EINVAL when handshake is in progress. · 4ec1b010
      Sowmini Varadhan 提交于
      The LDC handshake could have been asynchronously triggered
      after ldc_bind() enables the ldc_rx() receive interrupt-handler
      (and thus intercepts incoming control packets)
      and before vio_port_up() calls ldc_connect(). If that is the case,
      ldc_connect() should return 0 and let the state-machine
      progress.
      Signed-off-by: NSowmini Varadhan <sowmini.varadhan@oracle.com>
      Acked-by: NKarl Volz <karl.volz@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4ec1b010
    • D
      sparc64: Guard against flushing openfirmware mappings. · 4ca9a237
      David S. Miller 提交于
      Based almost entirely upon a patch by Christopher Alexander Tobias
      Schulze.
      
      In commit db64fe02 ("mm: rewrite vmap
      layer") lazy VMAP tlb flushing was added to the vmalloc layer.  This
      causes problems on sparc64.
      
      Sparc64 has two VMAP mapped regions and they are not contiguous with
      eachother.  First we have the malloc mapping area, then another
      unrelated region, then the vmalloc region.
      
      This "another unrelated region" is where the firmware is mapped.
      
      If the lazy TLB flushing logic in the vmalloc code triggers after
      we've had both a module unload and a vfree or similar, it will pass an
      address range that goes from somewhere inside the malloc region to
      somewhere inside the vmalloc region, and thus covering the
      openfirmware area entirely.
      
      The sparc64 kernel learns about openfirmware's dynamic mappings in
      this region early in the boot, and then services TLB misses in this
      area.  But openfirmware has some locked TLB entries which are not
      mentioned in those dynamic mappings and we should thus not disturb
      them.
      
      These huge lazy TLB flush ranges causes those openfirmware locked TLB
      entries to be removed, resulting in all kinds of problems including
      hard hangs and crashes during reboot/reset.
      
      Besides causing problems like this, such huge TLB flush ranges are
      also incredibly inefficient.  A plea has been made with the author of
      the VMAP lazy TLB flushing code, but for now we'll put a safety guard
      into our flush_tlb_kernel_range() implementation.
      
      Since the implementation has become non-trivial, stop defining it as a
      macro and instead make it a function in a C source file.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4ca9a237
    • D
      sparc64: Do not insert non-valid PTEs into the TSB hash table. · 18f38132
      David S. Miller 提交于
      The assumption was that update_mmu_cache() (and the equivalent for PMDs) would
      only be called when the PTE being installed will be accessible by the user.
      
      This is not true for code paths originating from remove_migration_pte().
      
      There are dire consequences for placing a non-valid PTE into the TSB.  The TLB
      miss frramework assumes thatwhen a TSB entry matches we can just load it into
      the TLB and return from the TLB miss trap.
      
      So if a non-valid PTE is in there, we will deadlock taking the TLB miss over
      and over, never satisfying the miss.
      
      Just exit early from update_mmu_cache() and friends in this situation.
      
      Based upon a report and patch from Christopher Alexander Tobias Schulze.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      18f38132
  3. 22 7月, 2014 9 次提交
  4. 16 7月, 2014 1 次提交
    • P
      locking/mutex: Disable optimistic spinning on some architectures · 4badad35
      Peter Zijlstra 提交于
      The optimistic spin code assumes regular stores and cmpxchg() play nice;
      this is found to not be true for at least: parisc, sparc32, tile32,
      metag-lock1, arc-!llsc and hexagon.
      
      There is further wreckage, but this in particular seemed easy to
      trigger, so blacklist this.
      
      Opt in for known good archs.
      Signed-off-by: NPeter Zijlstra <peterz@infradead.org>
      Reported-by: NMikulas Patocka <mpatocka@redhat.com>
      Cc: David Miller <davem@davemloft.net>
      Cc: Chris Metcalf <cmetcalf@tilera.com>
      Cc: James Bottomley <James.Bottomley@hansenpartnership.com>
      Cc: Vineet Gupta <vgupta@synopsys.com>
      Cc: Jason Low <jason.low2@hp.com>
      Cc: Waiman Long <waiman.long@hp.com>
      Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
      Cc: Paul McKenney <paulmck@linux.vnet.ibm.com>
      Cc: John David Anglin <dave.anglin@bell.net>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Davidlohr Bueso <davidlohr@hp.com>
      Cc: stable@vger.kernel.org
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-kernel@vger.kernel.org
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: sparclinux@vger.kernel.org
      Link: http://lkml.kernel.org/r/20140606175316.GV13930@laptop.programming.kicks-ass.netSigned-off-by: NIngo Molnar <mingo@kernel.org>
      4badad35
  5. 24 6月, 2014 1 次提交
  6. 07 6月, 2014 1 次提交
  7. 06 6月, 2014 1 次提交
  8. 05 6月, 2014 2 次提交
    • F
      sys_sgetmask/sys_ssetmask: add CONFIG_SGETMASK_SYSCALL · f6187769
      Fabian Frederick 提交于
      sys_sgetmask and sys_ssetmask are obsolete system calls no longer
      supported in libc.
      
      This patch replaces architecture related __ARCH_WANT_SYS_SGETMAX by expert
      mode configuration.That option is enabled by default for those
      architectures.
      Signed-off-by: NFabian Frederick <fabf@skynet.be>
      Cc: Steven Miao <realmz6@gmail.com>
      Cc: Mikael Starvik <starvik@axis.com>
      Cc: Jesper Nilsson <jesper.nilsson@axis.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com>
      Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
      Cc: Helge Deller <deller@gmx.de>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Greg Ungerer <gerg@uclinux.org>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f6187769
    • N
      hugetlb: restrict hugepage_migration_support() to x86_64 · c177c81e
      Naoya Horiguchi 提交于
      Currently hugepage migration is available for all archs which support
      pmd-level hugepage, but testing is done only for x86_64 and there're
      bugs for other archs.  So to avoid breaking such archs, this patch
      limits the availability strictly to x86_64 until developers of other
      archs get interested in enabling this feature.
      
      Simply disabling hugepage migration on non-x86_64 archs is not enough to
      fix the reported problem where sys_move_pages() hits the BUG_ON() in
      follow_page(FOLL_GET), so let's fix this by checking if hugepage
      migration is supported in vma_migratable().
      Signed-off-by: NNaoya Horiguchi <n-horiguchi@ah.jp.nec.com>
      Reported-by: NMichael Ellerman <mpe@ellerman.id.au>
      Tested-by: NMichael Ellerman <mpe@ellerman.id.au>
      Acked-by: NHugh Dickins <hughd@google.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: David Miller <davem@davemloft.net>
      Cc: <stable@vger.kernel.org>	[3.12+]
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c177c81e
  9. 02 6月, 2014 1 次提交
    • D
      net: filter: get rid of BPF_S_* enum · 34805931
      Daniel Borkmann 提交于
      This patch finally allows us to get rid of the BPF_S_* enum.
      Currently, the code performs unnecessary encode and decode
      workarounds in seccomp and filter migration itself when a filter
      is being attached in order to overcome BPF_S_* encoding which
      is not used anymore by the new interpreter resp. JIT compilers.
      
      Keeping it around would mean that also in future we would need
      to extend and maintain this enum and related encoders/decoders.
      We can get rid of all that and save us these operations during
      filter attaching. Naturally, also JIT compilers need to be updated
      by this.
      
      Before JIT conversion is being done, each compiler checks if A
      is being loaded at startup to obtain information if it needs to
      emit instructions to clear A first. Since BPF extensions are a
      subset of BPF_LD | BPF_{W,H,B} | BPF_ABS variants, case statements
      for extensions can be removed at that point. To ease and minimalize
      code changes in the classic JITs, we have introduced bpf_anc_helper().
      
      Tested with test_bpf on x86_64 (JIT, int), s390x (JIT, int),
      arm (JIT, int), i368 (int), ppc64 (JIT, int); for sparc we
      unfortunately didn't have access, but changes are analogous to
      the rest.
      
      Joint work with Alexei Starovoitov.
      Signed-off-by: NDaniel Borkmann <dborkman@redhat.com>
      Signed-off-by: NAlexei Starovoitov <ast@plumgrid.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Mircea Gherzan <mgherzan@gmail.com>
      Cc: Kees Cook <keescook@chromium.org>
      Acked-by: NChema Gonzalez <chemag@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      34805931
  10. 28 5月, 2014 2 次提交
  11. 22 5月, 2014 1 次提交
  12. 19 5月, 2014 15 次提交
    • S
      sparc64: fix sparse warnings in int_64.c · 48d37216
      Sam Ravnborg 提交于
      Fix following warnings:
      init_64.c:798:5: warning: symbol 'numa_cpu_lookup_table' was not declared. Should it be static?
      init_64.c:799:11: warning: symbol 'numa_cpumask_lookup_table' was not declared. Should it be static?
      
      The warnings were present with an allnoconfig
      Fix so the variables are only declared if CONFIG_NEED_MULTIPLE_NODES is defined.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      48d37216
    • S
      sparc64: fix sparse warning in ftrace.c · b6abce1f
      Sam Ravnborg 提交于
      Fix following warning:
      ftrace.c:123:15: warning: symbol 'prepare_ftrace_return' was not declared. Should it be static?
      
      Add prototype for asm/ftrace.h
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b6abce1f
    • S
      sparc64: fix sparse warning in kprobes.c · 758a0170
      Sam Ravnborg 提交于
      Fix following warning:
      kprobes.c:419:27: warning: symbol 'kprobe_trap' was not declared. Should it be static?
      
      Add proper prototype
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      758a0170
    • S
      sparc64: fix sparse warning in kgdb_64.c · 48c7eca5
      Sam Ravnborg 提交于
      Fix following warnings:
      kgdb_64.c:114:18: warning: symbol 'smp_kgdb_capture_client' was not declared. Should it be static?
      kgdb_64.c:161:17: warning: symbol 'kgdb_trap' was not declared. Should it be static?
      
      Add proper prototypes
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      48c7eca5
    • S
      sparc64: fix sparse warnings in compat_audit.c · a1ca187e
      Sam Ravnborg 提交于
      Fix following warnings:
      compat_audit.c:4:10: warning: symbol 'sparc32_dir_class' was not declared. Should it be static?
      compat_audit.c:9:10: warning: symbol 'sparc32_chattr_class' was not declared. Should it be static?
      compat_audit.c:14:10: warning: symbol 'sparc32_write_class' was not declared. Should it be static?
      compat_audit.c:19:10: warning: symbol 'sparc32_read_class' was not declared. Should it be static?
      compat_audit.c:24:10: warning: symbol 'sparc32_signal_class' was not declared. Should it be static?
      compat_audit.c:29:5: warning: symbol 'sparc32_classify_syscall' was not declared. Should it be static?
      
      Add declarations to kernel.h
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a1ca187e
    • S
      sparc64: fix sparse warnings in init_64.c · 59dec13b
      Sam Ravnborg 提交于
      Fix following warnings:
      init_64.c:191:10: warning: symbol 'dcpage_flushes' was not declared. Should it be static?
      init_64.c:193:10: warning: symbol 'dcpage_flushes_xcall' was not declared. Should it be static?
      
      Add extern declaration to asm/setup.h and drop local declaration in smp_64.h
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      59dec13b
    • S
      sparc64: fix sparse warnings in aes_glue.c · 756382cb
      Sam Ravnborg 提交于
      Fix following warnings:
      aes_glue.c:127:16: warning: symbol 'aes128_ops' was not declared. Should it be static?
      aes_glue.c:139:16: warning: symbol 'aes192_ops' was not declared. Should it be static?
      aes_glue.c:151:16: warning: symbol 'aes256_ops' was not declared. Should it be static?
      
      Fix by defining the variables static as they are not used outside this file
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      756382cb
    • S
      sparc: fix sparse warnings in smp_32.c + smp_64.c · d3091298
      Sam Ravnborg 提交于
      Fix following warnings:
      smp_32.c:177:5: warning: symbol 'setup_profiling_timer' was not declared. Should it be static?
      smp_64.c:1202:5: warning: symbol 'setup_profiling_timer' was not declared. Should it be static?
      smp_64.c:989:6: warning: symbol 'kgdb_roundup_cpus' was not declared. Should it be static?
      
      Add prototype to include/linux/profile.h of setup_profiling_timer
      Add missing include to smp_64.c
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d3091298
    • S
      sparc64: fix sparse warnings in perf_event.c · 265c1ffa
      Sam Ravnborg 提交于
      Fix following sparse warnings:
      kernel/perf_event.c:113:1: warning: symbol 'cpu_hw_events' was not declared. Should it be static?
      kernel/perf_event.c:1156:6: warning: symbol 'perf_event_grab_pmc' was not declared. Should it be static?
      kernel/perf_event.c:1172:6: warning: symbol 'perf_event_release_pmc' was not declared. Should it be static?
      kernel/perf_event.c:1672:12: warning: symbol 'init_hw_perf_events' was not declared. Should it be static?
      kernel/perf_event.c:1749:52: warning: incorrect type in argument 2 (different address spaces)
      kernel/perf_event.c:1772:60: warning: incorrect type in argument 2 (different address spaces)
      kernel/perf_event.c:1779:60: warning: incorrect type in argument 2 (different address spaces)
      
      Define the functions static as they are not used outside this file.
      Fix it so copy_from_user are supplied with pointers annotated _user
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      265c1ffa
    • S
      sparc64: fix sparse warnings in kprobes.c · 2f827ea7
      Sam Ravnborg 提交于
      Fix following warnings:
      kprobes.c:515:15: warning: symbol 'trampoline_probe_handler' was not declared. Should it be static?
      kprobes.c:579:6: warning: symbol 'kretprobe_trampoline_holder' was not declared. Should it be static?
      
      Declare the functions static.
      kretprobe_trampoline_holder is magically used without any real
      reference so mark is __used, like other arch's do too.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2f827ea7
    • S
      sparc64: fix sparse warning in tsb.c · 8c7260c0
      Sam Ravnborg 提交于
      Fix following warning:
      tsb.c:290:5: warning: symbol 'sysctl_tsb_ratio' was not declared. Should it be static?
      
      Add extern declaration in asm/setup.h and remove local declaration
      in kernel/sysctl.c
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8c7260c0
    • S
      sparc64: clean up compat_sigset_t.seta handling · c19ac326
      Sam Ravnborg 提交于
      Use compat_sigset_t rather than opencode the array
      Drop "switch (_NSIG_WORDS)" as we know this is always 1
      Introduce BUILD_BUG_ON() to catch if this changes
      
      As a side-effect of this fix following sparse warnings:
      signal32.c:220:60: warning: invalid access past the end of 'seta' (12 8)
      signal32.c:220:42: warning: invalid access past the end of 'seta' (8 8)
      signal32.c:219:60: warning: invalid access past the end of 'seta' (20 8)
      signal32.c:219:42: warning: invalid access past the end of 'seta' (16 8)
      signal32.c:218:60: warning: invalid access past the end of 'seta' (28 8)
      signal32.c:218:42: warning: invalid access past the end of 'seta' (24 8)
      signal32.c:309:68: warning: invalid access past the end of 'seta' (12 8)
      signal32.c:309:46: warning: invalid access past the end of 'seta' (8 8)
      signal32.c:308:68: warning: invalid access past the end of 'seta' (20 8)
      signal32.c:308:46: warning: invalid access past the end of 'seta' (16 8)
      signal32.c:307:68: warning: invalid access past the end of 'seta' (28 8)
      signal32.c:307:46: warning: invalid access past the end of 'seta' (24 8)
      
      They all pointed to code that was never executed - so no bugs fixed.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c19ac326
    • S
      sparc64: fix sparse "Should it be static?" warnings in signal32.c · abaff455
      Sam Ravnborg 提交于
      Fix following warnings:
      signal32.c:140:6: warning: symbol 'do_sigreturn32' was not declared. Should it be static?
      signal32.c:230:17: warning: symbol 'do_rt_sigreturn32' was not declared. Should it be static?
      signal32.c:729:6: warning: symbol 'do_signal32' was not declared. Should it be static?
      signal32.c:773:16: warning: symbol 'do_sys32_sigstack' was not declared. Should it be static?
      
      Add proper prototypes and drop local prototype
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      abaff455
    • S
      sparc64: fix sparse warnings in sys_sparc32.c · ed8eb755
      Sam Ravnborg 提交于
      Fix following warnings:
      sys_sparc32.c:52:17: warning: symbol 'sys32_truncate64' was not declared. Should it be static?
      sys_sparc32.c:60:17: warning: symbol 'sys32_ftruncate64' was not declared. Should it be static?
      sys_sparc32.c:98:17: warning: symbol 'compat_sys_stat64' was not declared. Should it be static?
      sys_sparc32.c:109:17: warning: symbol 'compat_sys_lstat64' was not declared. Should it be static?
      sys_sparc32.c:120:17: warning: symbol 'compat_sys_fstat64' was not declared. Should it be static?
      sys_sparc32.c:131:17: warning: symbol 'compat_sys_fstatat64' was not declared. Should it be static?
      sys_sparc32.c:196:27: warning: symbol 'sys32_pread64' was not declared. Should it be static?
      sys_sparc32.c:205:27: warning: symbol 'sys32_pwrite64' was not declared. Should it be static?
      sys_sparc32.c:214:17: warning: symbol 'compat_sys_readahead' was not declared. Should it be static?
      sys_sparc32.c:222:6: warning: symbol 'compat_sys_fadvise64' was not declared. Should it be static?
      sys_sparc32.c:230:6: warning: symbol 'compat_sys_fadvise64_64' was not declared. Should it be static?
      sys_sparc32.c:241:6: warning: symbol 'sys32_sync_file_range' was not declared. Should it be static?
      sys_sparc32.c:249:17: warning: symbol 'compat_sys_fallocate' was not declared. Should it be static?
      
      Add proper prototypes in systbls.h
      Include linux/compat.h to get access to necessary types
      Use inverse christmas tree order in includes
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ed8eb755
    • S
      sparc64: fix sparse warning in pci.c · 4ac7b826
      Sam Ravnborg 提交于
      Fix following warning:
      pci.c:886:5: warning: symbol 'pci64_dma_supported' was not declared. Should it be static?
      
      Add proper prototype in kernel.h and delete local prototype in iommu.c
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4ac7b826