1. 28 9月, 2015 4 次提交
    • A
      m68k: Define asmlinkage_protect · 8474ba74
      Andreas Schwab 提交于
      Make sure the compiler does not modify arguments of syscall functions.
      This can happen if the compiler generates a tailcall to another
      function.  For example, without asmlinkage_protect sys_openat is compiled
      into this function:
      
      sys_openat:
      	clr.l %d0
      	move.w 18(%sp),%d0
      	move.l %d0,16(%sp)
      	jbra do_sys_open
      
      Note how the fourth argument is modified in place, modifying the register
      %d4 that gets restored from this stack slot when the function returns to
      user-space.  The caller may expect the register to be unmodified across
      system calls.
      Signed-off-by: NAndreas Schwab <schwab@linux-m68k.org>
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Cc: stable@vger.kernel.org
      8474ba74
    • G
      m68k: Wire up membarrier · 7f843dab
      Geert Uytterhoeven 提交于
      $ ./membarrier_test
      membarrier MEMBARRIER_CMD_QUERY syscall available.
      membarrier: MEMBARRIER_CMD_SHARED success.
      membarrier: tests done!
      $
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Acked-by: NGreg Ungerer <gerg@uclinux.org>
      7f843dab
    • G
      m68k: Wire up userfaultfd · b92858f2
      Geert Uytterhoeven 提交于
      $ ./userfaultfd 10 99
      nr_pages: 2560, nr_pages_per_cpu: 2560
      bounces: 98, mode: racing, userfaults: 1121
      bounces: 97, mode: rnd, userfaults: 977
      bounces: 96, mode:, userfaults: 1119
      bounces: 95, mode: rnd racing ver poll, userfaults: 1040
      bounces: 94, mode: racing ver poll, userfaults: 1022
      bounces: 93, mode: rnd ver poll, userfaults: 946
      bounces: 92, mode: ver poll, userfaults: 1115
      bounces: 91, mode: rnd racing poll, userfaults: 977
      bounces: 90, mode: racing poll, userfaults: 899
      bounces: 89, mode: rnd poll, userfaults: 881
      bounces: 88, mode: poll, userfaults: 1069
      bounces: 87, mode: rnd racing ver, userfaults: 1114
      bounces: 86, mode: racing ver, userfaults: 1109
      bounces: 85, mode: rnd ver, userfaults: 1165
      bounces: 84, mode: ver, userfaults: 1107
      bounces: 83, mode: rnd racing, userfaults: 1134
      bounces: 82, mode: racing, userfaults: 1105
      bounces: 81, mode: rnd, userfaults: 1323
      bounces: 80, mode:, userfaults: 1103
      bounces: 79, mode: rnd racing ver poll, userfaults: 909
      bounces: 78, mode: racing ver poll, userfaults: 1095
      bounces: 77, mode: rnd ver poll, userfaults: 951
      bounces: 76, mode: ver poll, userfaults: 1099
      bounces: 75, mode: rnd racing poll, userfaults: 1035
      bounces: 74, mode: racing poll, userfaults: 1097
      bounces: 73, mode: rnd poll, userfaults: 1159
      bounces: 72, mode: poll, userfaults: 1042
      bounces: 71, mode: rnd racing ver, userfaults: 848
      bounces: 70, mode: racing ver, userfaults: 1093
      bounces: 69, mode: rnd ver, userfaults: 892
      bounces: 68, mode: ver, userfaults: 1091
      bounces: 67, mode: rnd racing, userfaults: 1219
      bounces: 66, mode: racing, userfaults: 1089
      bounces: 65, mode: rnd, userfaults: 988
      bounces: 64, mode:, userfaults: 1087
      bounces: 63, mode: rnd racing ver poll, userfaults: 882
      bounces: 62, mode: racing ver poll, userfaults: 984
      bounces: 61, mode: rnd ver poll, userfaults: 701
      bounces: 60, mode: ver poll, userfaults: 1071
      bounces: 59, mode: rnd racing poll, userfaults: 1137
      bounces: 58, mode: racing poll, userfaults: 1032
      bounces: 57, mode: rnd poll, userfaults: 911
      bounces: 56, mode: poll, userfaults: 1079
      bounces: 55, mode: rnd racing ver, userfaults: 1106
      bounces: 54, mode: racing ver, userfaults: 1077
      bounces: 53, mode: rnd ver, userfaults: 886
      bounces: 52, mode: ver, userfaults: 1075
      bounces: 51, mode: rnd racing, userfaults: 1101
      bounces: 50, mode: racing, userfaults: 1073
      bounces: 49, mode: rnd, userfaults: 1070
      bounces: 48, mode:, userfaults: 1071
      bounces: 47, mode: rnd racing ver poll, userfaults: 1077
      bounces: 46, mode: racing ver poll, userfaults: 910
      bounces: 45, mode: rnd ver poll, userfaults: 1063
      bounces: 44, mode: ver poll, userfaults: 1028
      bounces: 43, mode: rnd racing poll, userfaults: 1043
      bounces: 42, mode: racing poll, userfaults: 1065
      bounces: 41, mode: rnd poll, userfaults: 912
      bounces: 40, mode: poll, userfaults: 1063
      bounces: 39, mode: rnd racing ver, userfaults: 880
      bounces: 38, mode: racing ver, userfaults: 1061
      bounces: 37, mode: rnd ver, userfaults: 1144
      bounces: 36, mode: ver, userfaults: 1059
      bounces: 35, mode: rnd racing, userfaults: 967
      bounces: 34, mode: racing, userfaults: 1057
      bounces: 33, mode: rnd, userfaults: 1076
      bounces: 32, mode:, userfaults: 1055
      bounces: 31, mode: rnd racing ver poll, userfaults: 997
      bounces: 30, mode: racing ver poll, userfaults: 1053
      bounces: 29, mode: rnd ver poll, userfaults: 968
      bounces: 28, mode: ver poll, userfaults: 978
      bounces: 27, mode: rnd racing poll, userfaults: 1008
      bounces: 26, mode: racing poll, userfaults: 1049
      bounces: 25, mode: rnd poll, userfaults: 900
      bounces: 24, mode: poll, userfaults: 1047
      bounces: 23, mode: rnd racing ver, userfaults: 988
      bounces: 22, mode: racing ver, userfaults: 1045
      bounces: 21, mode: rnd ver, userfaults: 1027
      bounces: 20, mode: ver, userfaults: 1043
      bounces: 19, mode: rnd racing, userfaults: 1017
      bounces: 18, mode: racing, userfaults: 1041
      bounces: 17, mode: rnd, userfaults: 979
      bounces: 16, mode:, userfaults: 1039
      bounces: 15, mode: rnd racing ver poll, userfaults: 1134
      bounces: 14, mode: racing ver poll, userfaults: 1037
      bounces: 13, mode: rnd ver poll, userfaults: 1046
      bounces: 12, mode: ver poll, userfaults: 1035
      bounces: 11, mode: rnd racing poll, userfaults: 1060
      bounces: 10, mode: racing poll, userfaults: 1033
      bounces: 9, mode: rnd poll, userfaults: 1003
      bounces: 8, mode: poll, userfaults: 929
      bounces: 7, mode: rnd racing ver, userfaults: 964
      bounces: 6, mode: racing ver, userfaults: 1029
      bounces: 5, mode: rnd ver, userfaults: 1053
      bounces: 4, mode: ver, userfaults: 1027
      bounces: 3, mode: rnd racing, userfaults: 863
      bounces: 2, mode: racing, userfaults: 1025
      bounces: 1, mode: rnd, userfaults: 1043
      bounces: 0, mode:, userfaults: 950
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Acked-by: NGreg Ungerer <gerg@uclinux.org>
      b92858f2
    • G
      5b3f33eb
  2. 16 9月, 2015 1 次提交
    • T
      genirq: Remove irq argument from irq flow handlers · bd0b9ac4
      Thomas Gleixner 提交于
      Most interrupt flow handlers do not use the irq argument. Those few
      which use it can retrieve the irq number from the irq descriptor.
      
      Remove the argument.
      
      Search and replace was done with coccinelle and some extra helper
      scripts around it. Thanks to Julia for her help!
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Julia Lawall <Julia.Lawall@lip6.fr>
      Cc: Jiang Liu <jiang.liu@linux.intel.com>
      bd0b9ac4
  3. 11 9月, 2015 1 次提交
    • D
      kexec: split kexec_load syscall from kexec core code · 2965faa5
      Dave Young 提交于
      There are two kexec load syscalls, kexec_load another and kexec_file_load.
       kexec_file_load has been splited as kernel/kexec_file.c.  In this patch I
      split kexec_load syscall code to kernel/kexec.c.
      
      And add a new kconfig option KEXEC_CORE, so we can disable kexec_load and
      use kexec_file_load only, or vice verse.
      
      The original requirement is from Ted Ts'o, he want kexec kernel signature
      being checked with CONFIG_KEXEC_VERIFY_SIG enabled.  But kexec-tools use
      kexec_load syscall can bypass the checking.
      
      Vivek Goyal proposed to create a common kconfig option so user can compile
      in only one syscall for loading kexec kernel.  KEXEC/KEXEC_FILE selects
      KEXEC_CORE so that old config files still work.
      
      Because there's general code need CONFIG_KEXEC_CORE, so I updated all the
      architecture Kconfig with a new option KEXEC_CORE, and let KEXEC selects
      KEXEC_CORE in arch Kconfig.  Also updated general kernel code with to
      kexec_load syscall.
      
      [akpm@linux-foundation.org: coding-style fixes]
      Signed-off-by: NDave Young <dyoung@redhat.com>
      Cc: Eric W. Biederman <ebiederm@xmission.com>
      Cc: Vivek Goyal <vgoyal@redhat.com>
      Cc: Petr Tesarik <ptesarik@suse.cz>
      Cc: Theodore Ts'o <tytso@mit.edu>
      Cc: Josh Boyer <jwboyer@fedoraproject.org>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2965faa5
  4. 01 9月, 2015 1 次提交
  5. 24 8月, 2015 2 次提交
  6. 10 8月, 2015 3 次提交
  7. 01 8月, 2015 1 次提交
    • T
      m68k/irq: Prepare irq handlers for irq argument removal · 625b86ad
      Thomas Gleixner 提交于
      The irq argument of most interrupt flow handlers is unused or merily
      used instead of a local variable. The handlers which need the irq
      argument can retrieve the irq number from the irq descriptor.
      
      Search and update was done with coccinelle and the invaluable help of
      Julia Lawall.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Julia Lawall <Julia.Lawall@lip6.fr>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: linux-m68k@lists.linux-m68k.org
      625b86ad
  8. 29 7月, 2015 2 次提交
    • C
      block: add a bi_error field to struct bio · 4246a0b6
      Christoph Hellwig 提交于
      Currently we have two different ways to signal an I/O error on a BIO:
      
       (1) by clearing the BIO_UPTODATE flag
       (2) by returning a Linux errno value to the bi_end_io callback
      
      The first one has the drawback of only communicating a single possible
      error (-EIO), and the second one has the drawback of not beeing persistent
      when bios are queued up, and are not passed along from child to parent
      bio in the ever more popular chaining scenario.  Having both mechanisms
      available has the additional drawback of utterly confusing driver authors
      and introducing bugs where various I/O submitters only deal with one of
      them, and the others have to add boilerplate code to deal with both kinds
      of error returns.
      
      So add a new bi_error field to store an errno value directly in struct
      bio and remove the existing mechanisms to clean all this up.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NHannes Reinecke <hare@suse.de>
      Reviewed-by: NNeilBrown <neilb@suse.com>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      4246a0b6
    • L
      arch/*/io.h: Add ioremap_uc() to all architectures · 4c73e892
      Luis R. Rodriguez 提交于
      This adds ioremap_uc() only for architectures that do not
      include asm-generic.h/io.h as that already provides a default
      definition for them for both cases where you have CONFIG_MMU
      and you do not, and because of this, the number of architectures
      this patch address is less than the architectures that the
      ioremap_wt() patch addressed, "arch/*/io.h: Add ioremap_wt() to
      all architectures").
      
      In order to reduce the number of architectures we have to
      modify by adding new architecture IO APIs we'll have to review
      the architectures in this patch, see why they can't add
      asm-generic.h/io.h or issues that would be created by doing
      so and then spread a consistent inclusion of this header
      towards the end of their own header. For instance arch/metag
      includes the asm-generic/io.h *before* the ioremap*()
      definitions, this should be the other way around but only
      once we have guard wrappers for the non-MMU case also for
      asm-generic/io.h.
      Reported-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NLuis R. Rodriguez <mcgrof@suse.com>
      Cc: Abhilash Kesavan <a.kesavan@samsung.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Chris Metcalf <cmetcalf@ezchip.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Fengguang Wu <fengguang.wu@intel.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Greg Ungerer <gerg@uclinux.org>
      Cc: Guenter Roeck <linux@roeck-us.net>
      Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
      Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
      Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com>
      Cc: Kyle McMartin <kyle@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Hurley <peter@hurleysoftware.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Toshi Kani <toshi.kani@hp.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: linux-am33-list@redhat.com
      Cc: linux-arch@vger.kernel.org
      Cc: linux-m68k@lists.linux-m68k.org
      Cc: linux-sh@vger.kernel.org
      Cc: linuxppc-dev@lists.ozlabs.org
      Link: http://lkml.kernel.org/r/20150728181713.GB30479@wotan.suse.deSigned-off-by: NIngo Molnar <mingo@kernel.org>
      4c73e892
  9. 27 7月, 2015 3 次提交
  10. 18 7月, 2015 1 次提交
  11. 13 7月, 2015 12 次提交
  12. 25 6月, 2015 2 次提交
    • T
      m68k/psc: Fix race in installing chained IRQ handler · 09c5cb94
      Thomas Gleixner 提交于
      Fix a race where a pending interrupt could be received and the handler
      called before the handler's data has been setup, by converting to
      irq_set_chained_handler_and_data().
      
      Search and conversion was done with coccinelle:
      
      @@
      expression E1, E2, E3;
      @@
      (
      -if (irq_set_chained_handler(E1, E3) != 0)
      -   BUG();
      |
      -irq_set_chained_handler(E1, E3);
      )
      -irq_set_handler_data(E1, E2);
      +irq_set_chained_handler_and_data(E1, E3, E2);
      
      @@
      expression E1, E2, E3;
      @@
      (
      -if (irq_set_chained_handler(E1, E3) != 0)
      -   BUG();
      ...
      |
      -irq_set_chained_handler(E1, E3);
      ...
      )
      -irq_set_handler_data(E1, E2);
      +irq_set_chained_handler_and_data(E1, E3, E2);
      Reported-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Julia Lawall <Julia.Lawall@lip6.fr>
      Cc: Joshua Thompson <funaho@jurai.org>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: linux-m68k@lists.linux-m68k.org
      09c5cb94
    • 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
  13. 16 6月, 2015 1 次提交
  14. 07 6月, 2015 2 次提交
    • T
      video/fbdev, asm/io.h: Remove ioremap_writethrough() · c7c95f19
      Toshi Kani 提交于
      Replace all calls to ioremap_writethrough() with ioremap_wt().
      Remove ioremap_writethrough() too.
      Signed-off-by: NToshi Kani <toshi.kani@hp.com>
      Signed-off-by: NBorislav Petkov <bp@suse.de>
      Acked-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      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-10-git-send-email-bp@alien8.deSigned-off-by: NIngo Molnar <mingo@kernel.org>
      c7c95f19
    • 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
  15. 01 6月, 2015 2 次提交
  16. 19 5月, 2015 2 次提交