1. 11 12月, 2013 1 次提交
  2. 15 11月, 2013 2 次提交
  3. 06 11月, 2013 2 次提交
  4. 26 10月, 2013 1 次提交
  5. 24 10月, 2013 1 次提交
  6. 14 10月, 2013 1 次提交
  7. 06 10月, 2013 2 次提交
  8. 05 10月, 2013 1 次提交
    • T
      x86, build, pci: Fix PCI_MSI build on !SMP · 0dbc6078
      Thomas Petazzoni 提交于
      Commit ebd97be6 ('PCI: remove ARCH_SUPPORTS_MSI kconfig option')
      removed the ARCH_SUPPORTS_MSI option which architectures could select
      to indicate that they support MSI. Now, all architectures are supposed
      to build fine when MSI support is enabled: instead of having the
      architecture tell *when* MSI support can be used, it's up to the
      architecture code to ensure that MSI support can be enabled.
      
      On x86, commit ebd97be6 removed the following line:
      
        select ARCH_SUPPORTS_MSI if (X86_LOCAL_APIC && X86_IO_APIC)
      
      Which meant that MSI support was only available when the local APIC
      and I/O APIC were enabled. While this is always true on SMP or x86-64,
      it is not necessarily the case on i386 !SMP.
      
      The below patch makes sure that the local APIC and I/O APIC support is
      always enabled when MSI support is enabled. To do so, it:
      
       * Ensures the X86_UP_APIC option is not visible when PCI_MSI is
         enabled. This is the option that allows, on UP machines, to enable
         or not the APIC support. It is already not visible on SMP systems,
         or x86-64 systems, for example. We're simply also making it
         invisible on i386 MSI systems.
      
       * Ensures that the X86_LOCAL_APIC and X86_IO_APIC options are 'y'
         when PCI_MSI is enabled.
      
      Notice that this change requires a change in drivers/iommu/Kconfig to
      avoid a recursive Kconfig dependencey. The AMD_IOMMU option selects
      PCI_MSI, but was depending on X86_IO_APIC. This dependency is no
      longer needed: as soon as PCI_MSI is selected, the presence of
      X86_IO_APIC is guaranteed. Moreover, the AMD_IOMMU already depended on
      X86_64, which already guaranteed that X86_IO_APIC was enabled, so this
      dependency was anyway redundant.
      Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Link: http://lkml.kernel.org/r/1380794354-9079-1-git-send-email-thomas.petazzoni@free-electrons.comReported-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Acked-by: NBjorn Helgaas <bhelgaas@google.com>
      Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      0dbc6078
  9. 01 10月, 2013 1 次提交
    • F
      x86: Tell about irq stack coverage · a2cd11f7
      Frederic Weisbecker 提交于
      x86-64 runs irq_exit() under the irq stack. So it can afford
      to run softirqs in hardirq exit without the need to switch
      the stacks. The hardirq stack is good enough for that.
      
      Now x86-64 runs softirqs in the hardirq stack anyway, so what we
      mostly skip is some needless per cpu refcounting updates there.
      
      x86-32 is not concerned because it only runs the irq handler on
      the irq stack.
      Acked-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@au1.ibm.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Paul Mackerras <paulus@au1.ibm.com>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: James E.J. Bottomley <jejb@parisc-linux.org>
      Cc: Helge Deller <deller@gmx.de>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      a2cd11f7
  10. 25 9月, 2013 2 次提交
  11. 14 9月, 2013 1 次提交
  12. 13 9月, 2013 1 次提交
  13. 03 9月, 2013 1 次提交
    • L
      lockref: implement lockless reference count updates using cmpxchg() · bc08b449
      Linus Torvalds 提交于
      Instead of taking the spinlock, the lockless versions atomically check
      that the lock is not taken, and do the reference count update using a
      cmpxchg() loop.  This is semantically identical to doing the reference
      count update protected by the lock, but avoids the "wait for lock"
      contention that you get when accesses to the reference count are
      contended.
      
      Note that a "lockref" is absolutely _not_ equivalent to an atomic_t.
      Even when the lockref reference counts are updated atomically with
      cmpxchg, the fact that they also verify the state of the spinlock means
      that the lockless updates can never happen while somebody else holds the
      spinlock.
      
      So while "lockref_put_or_lock()" looks a lot like just another name for
      "atomic_dec_and_lock()", and both optimize to lockless updates, they are
      fundamentally different: the decrement done by atomic_dec_and_lock() is
      truly independent of any lock (as long as it doesn't decrement to zero),
      so a locked region can still see the count change.
      
      The lockref structure, in contrast, really is a *locked* reference
      count.  If you hold the spinlock, the reference count will be stable and
      you can modify the reference count without using atomics, because even
      the lockless updates will see and respect the state of the lock.
      
      In order to enable the cmpxchg lockless code, the architecture needs to
      do three things:
      
       (1) Make sure that the "arch_spinlock_t" and an "unsigned int" can fit
           in an aligned u64, and have a "cmpxchg()" implementation that works
           on such a u64 data type.
      
       (2) define a helper function to test for a spinlock being unlocked
           ("arch_spin_value_unlocked()")
      
       (3) select the "ARCH_USE_CMPXCHG_LOCKREF" config variable in its
           Kconfig file.
      
      This enables it for x86-64 (but not 32-bit, we'd need to make sure
      cmpxchg() turns into the proper cmpxchg8b in order to enable it for
      32-bit mode).
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      bc08b449
  14. 23 8月, 2013 1 次提交
  15. 12 8月, 2013 1 次提交
    • T
      PCI: remove ARCH_SUPPORTS_MSI kconfig option · ebd97be6
      Thomas Petazzoni 提交于
      Now that we have weak versions for each of the PCI MSI architecture
      functions, we can actually build the MSI support for all platforms,
      regardless of whether they provide or not architecture-specific
      versions of those functions. For this reason, the ARCH_SUPPORTS_MSI
      hidden kconfig boolean becomes useless, and this patch gets rid of it.
      Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Acked-by: NBjorn Helgaas <bhelgaas@google.com>
      Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Tested-by: NDaniel Price <daniel.price@gmail.com>
      Tested-by: NThierry Reding <thierry.reding@gmail.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: linux390@de.ibm.com
      Cc: linux-s390@vger.kernel.org
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: x86@kernel.org
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Fenghua Yu <fenghua.yu@intel.com>
      Cc: linux-ia64@vger.kernel.org
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: linux-mips@linux-mips.org
      Cc: David S. Miller <davem@davemloft.net>
      Cc: sparclinux@vger.kernel.org
      Cc: Chris Metcalf <cmetcalf@tilera.com>
      Signed-off-by: NJason Cooper <jason@lakedaemon.net>
      ebd97be6
  16. 09 8月, 2013 2 次提交
  17. 08 8月, 2013 1 次提交
  18. 03 8月, 2013 1 次提交
    • D
      x86: provide platform-devices for boot-framebuffers · e3263ab3
      David Herrmann 提交于
      The current situation regarding boot-framebuffers (VGA, VESA/VBE, EFI) on
      x86 causes troubles when loading multiple fbdev drivers. The global
      "struct screen_info" does not provide any state-tracking about which
      drivers use the FBs. request_mem_region() theoretically works, but
      unfortunately vesafb/efifb ignore it due to quirks for broken boards.
      
      Avoid this by creating a platform framebuffer devices with a pointer
      to the "struct screen_info" as platform-data. Drivers can now create
      platform-drivers and the driver-core will refuse multiple drivers being
      active simultaneously.
      
      We keep the screen_info available for backwards-compatibility. Drivers
      can be converted in follow-up patches.
      
      Different devices are created for VGA/VESA/EFI FBs to allow multiple
      drivers to be loaded on distro kernels. We create:
       - "vesa-framebuffer" for VBE/VESA graphics FBs
       - "efi-framebuffer" for EFI FBs
       - "platform-framebuffer" for everything else
      This allows to load vesafb, efifb and others simultaneously and each
      picks up only the supported FB types.
      
      Apart from platform-framebuffer devices, this also introduces a
      compatibility option for "simple-framebuffer" drivers which recently got
      introduced for OF based systems. If CONFIG_X86_SYSFB is selected, we
      try to match the screen_info against a simple-framebuffer supported
      format. If we succeed, we create a "simple-framebuffer" device instead
      of a platform-framebuffer.
      This allows to reuse the simplefb.c driver across architectures and also
      to introduce a SimpleDRM driver. There is no need to have vesafb.c,
      efifb.c, simplefb.c and more just to have architecture specific quirks
      in their setup-routines.
      
      Instead, we now move the architecture specific quirks into x86-setup and
      provide a generic simple-framebuffer. For backwards-compatibility (if
      strange formats are used), we still allow vesafb/efifb to be loaded
      simultaneously and pick up all remaining devices.
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      Link: http://lkml.kernel.org/r/1375445127-15480-4-git-send-email-dh.herrmann@gmail.comTested-by: NStephen Warren <swarren@nvidia.com>
      Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      e3263ab3
  19. 22 7月, 2013 1 次提交
    • T
      mm/hotplug, x86: Disable ARCH_MEMORY_PROBE by default · a0842b70
      Toshi Kani 提交于
      CONFIG_ARCH_MEMORY_PROBE enables the
      /sys/devices/system/memory/probe interface, which allows a given
      memory address to be hot-added as follows:
      
       # echo start_address_of_new_memory > /sys/devices/system/memory/probe
      
      (See Documentation/memory-hotplug.txt for more details.)
      
      This probe interface is required on powerpc. On x86, however,
      ACPI notifies a memory hotplug event to the kernel, which
      performs its hotplug operation as the result.
      
      Therefore, regular users do not need this interface on x86. This probe
      interface is also error-prone and misleading that the kernel blindly
      adds a given memory address without checking if the memory is present
      on the system; no probing is done despite of its name.
      
      The kernel crashes when a user requests to online a memory block
      that is not present on the system. This interface is currently
      used for testing as it can fake a hotplug event.
      
      This patch disables CONFIG_ARCH_MEMORY_PROBE by default on x86,
      adds its Kconfig menu entry on x86, and clarifies its use in
      Documentation/ memory-hotplug.txt.
      Signed-off-by: NToshi Kani <toshi.kani@hp.com>
      Acked-by: NKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Cc: linux-mm@kvack.org
      Cc: dave@sr71.net
      Cc: isimatu.yasuaki@jp.fujitsu.com
      Cc: tangchen@cn.fujitsu.com
      Cc: vasilis.liaskovitis@profitbricks.com
      Link: http://lkml.kernel.org/r/1374256068-26016-1-git-send-email-toshi.kani@hp.com
      [ Edited it slightly. ]
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      a0842b70
  20. 19 7月, 2013 1 次提交
  21. 10 7月, 2013 1 次提交
  22. 05 7月, 2013 1 次提交
  23. 04 7月, 2013 2 次提交
    • A
      rapidio: add modular build option for the subsystem core · fdf90abc
      Alexandre Bounine 提交于
      Add a configuration option to build RapidIO subsystem core code as a
      loadable kernel module.  Currently this option is available only for
      x86-based platforms, with the additional patch for PowerPC planned to be
      provided later.
      
      This patch replaces kernel command line parameter "riohdid=" with its
      module-specific analog "rapidio.hdid=".
      Signed-off-by: NAlexandre Bounine <alexandre.bounine@idt.com>
      Cc: Matt Porter <mporter@kernel.crashing.org>
      Cc: Li Yang <leoli@freescale.com>
      Cc: Kumar Gala <galak@kernel.crashing.org>
      Cc: Andre van Herk <andre.van.herk@Prodrive.nl>
      Cc: Micha Nelissen <micha.nelissen@Prodrive.nl>
      Cc: Stef van Os <stef.van.os@Prodrive.nl>
      Cc: Jean Delvare <jdelvare@suse.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      fdf90abc
    • P
      mm: soft-dirty bits for user memory changes tracking · 0f8975ec
      Pavel Emelyanov 提交于
      The soft-dirty is a bit on a PTE which helps to track which pages a task
      writes to.  In order to do this tracking one should
      
        1. Clear soft-dirty bits from PTEs ("echo 4 > /proc/PID/clear_refs)
        2. Wait some time.
        3. Read soft-dirty bits (55'th in /proc/PID/pagemap2 entries)
      
      To do this tracking, the writable bit is cleared from PTEs when the
      soft-dirty bit is.  Thus, after this, when the task tries to modify a
      page at some virtual address the #PF occurs and the kernel sets the
      soft-dirty bit on the respective PTE.
      
      Note, that although all the task's address space is marked as r/o after
      the soft-dirty bits clear, the #PF-s that occur after that are processed
      fast.  This is so, since the pages are still mapped to physical memory,
      and thus all the kernel does is finds this fact out and puts back
      writable, dirty and soft-dirty bits on the PTE.
      
      Another thing to note, is that when mremap moves PTEs they are marked
      with soft-dirty as well, since from the user perspective mremap modifies
      the virtual memory at mremap's new address.
      Signed-off-by: NPavel Emelyanov <xemul@parallels.com>
      Cc: Matt Mackall <mpm@selenic.com>
      Cc: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
      Cc: Glauber Costa <glommer@parallels.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: KOSAKI Motohiro <kosaki.motohiro@gmail.com>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      0f8975ec
  24. 26 6月, 2013 1 次提交
  25. 19 6月, 2013 1 次提交
    • R
      x86: fix build error and kconfig for ia32_emulation and binfmt · d1603990
      Randy Dunlap 提交于
      Fix kconfig warning and build errors on x86_64 by selecting BINFMT_ELF
      when COMPAT_BINFMT_ELF is being selected.
      
      warning: (IA32_EMULATION) selects COMPAT_BINFMT_ELF which has unmet direct dependencies (COMPAT && BINFMT_ELF)
      
      fs/built-in.o: In function `elf_core_dump':
      compat_binfmt_elf.c:(.text+0x3e093): undefined reference to `elf_core_extra_phdrs'
      compat_binfmt_elf.c:(.text+0x3ebcd): undefined reference to `elf_core_extra_data_size'
      compat_binfmt_elf.c:(.text+0x3eddd): undefined reference to `elf_core_write_extra_phdrs'
      compat_binfmt_elf.c:(.text+0x3f004): undefined reference to `elf_core_write_extra_data'
      
      [ hpa: This was sent to me for -next but it is a low risk build fix ]
      Signed-off-by: NRandy Dunlap <rdunlap@infradead.org>
      Link: http://lkml.kernel.org/r/51C0B614.5000708@infradead.org
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      d1603990
  26. 14 6月, 2013 2 次提交
  27. 04 6月, 2013 1 次提交
  28. 01 6月, 2013 1 次提交
  29. 31 5月, 2013 1 次提交
  30. 15 5月, 2013 1 次提交
    • J
      time: Revert ALWAYS_USE_PERSISTENT_CLOCK compile time optimizaitons · b4f711ee
      John Stultz 提交于
      Kay Sievers noted that the ALWAYS_USE_PERSISTENT_CLOCK config,
      which enables some minor compile time optimization to avoid
      uncessary code in mostly the suspend/resume path could cause
      problems for userland.
      
      In particular, the dependency for RTC_HCTOSYS on
      !ALWAYS_USE_PERSISTENT_CLOCK, which avoids setting the time
      twice and simplifies suspend/resume, has the side effect
      of causing the /sys/class/rtc/rtcN/hctosys flag to always be
      zero, and this flag is commonly used by udev to setup the
      /dev/rtc symlink to /dev/rtcN, which can cause pain for
      older applications.
      
      While the udev rules could use some work to be less fragile,
      breaking userland should strongly be avoided. Additionally
      the compile time optimizations are fairly minor, and the code
      being optimized is likely to be reworked in the future, so
      lets revert this change.
      Reported-by: NKay Sievers <kay@vrfy.org>
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      Cc: stable <stable@vger.kernel.org> #3.9
      Cc: Feng Tang <feng.tang@intel.com>
      Cc: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
      Link: http://lkml.kernel.org/r/1366828376-18124-1-git-send-email-john.stultz@linaro.orgSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      b4f711ee
  31. 01 5月, 2013 1 次提交
    • S
      Kconfig: consolidate CONFIG_DEBUG_STRICT_USER_COPY_CHECKS · 446f24d1
      Stephen Boyd 提交于
      The help text for this config is duplicated across the x86, parisc, and
      s390 Kconfig.debug files.  Arnd Bergman noted that the help text was
      slightly misleading and should be fixed to state that enabling this
      option isn't a problem when using pre 4.4 gcc.
      
      To simplify the rewording, consolidate the text into lib/Kconfig.debug
      and modify it there to be more explicit about when you should say N to
      this config.
      
      Also, make the text a bit more generic by stating that this option
      enables compile time checks so we can cover architectures which emit
      warnings vs.  ones which emit errors.  The details of how an
      architecture decided to implement the checks isn't as important as the
      concept of compile time checking of copy_from_user() calls.
      
      While we're doing this, remove all the copy_from_user_overflow() code
      that's duplicated many times and place it into lib/ so that any
      architecture supporting this option can get the function for free.
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NIngo Molnar <mingo@kernel.org>
      Acked-by: NH. Peter Anvin <hpa@zytor.com>
      Cc: Arjan van de Ven <arjan@linux.intel.com>
      Acked-by: NHelge Deller <deller@gmx.de>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: Chris Metcalf <cmetcalf@tilera.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      446f24d1
  32. 17 4月, 2013 2 次提交