Skip to content
Snippets Groups Projects
This project is mirrored from https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-stable-rt.git. Pull mirroring updated .
  1. Apr 28, 2009
  2. Apr 26, 2009
    • Tim Abbott's avatar
      Add new HEAD_TEXT_SECTION macro. · c80d471a
      Tim Abbott authored
      
      This patch is preparation for replacing all uses of ".head.text" or
      ".text.head" in the kernel with macros, so that the section name can
      later be changed without having to touch a lot of the kernel.
      
      Since some linker scripts do more complex things than referencing
      HEAD_TEXT, we add a HEAD_TEXT_SECTION macro that just contains the
      actual name.
      
      I've defined HEAD_TEXT_SECTION in a new header,
      include/linux/section-names.h, so that this section name only needs to
      appear in one place.  I anticipate creating similar macro structures
      for a number of other section names.
      
      The long-term goal here is to be able to change the kernel's magic
      section names to those that are compatible with -ffunction-sections
      -fdata-sections.  This requires renaming all magic sections with names
      of the form ".text.foo".
      
      Signed-off-by: default avatarTim Abbott <tabbott@mit.edu>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      c80d471a
  3. Apr 24, 2009
  4. Apr 23, 2009
  5. Apr 22, 2009
    • Len Brown's avatar
      ACPI: delete obsolete "bus master activity" proc field · 92614610
      Len Brown authored
      Linux-2.6.29 deleted the legacy ACPI idle handler, leaving
      the CPU_IDLE handler, which does not track bus master activity.
      
      So delete the unused bm_activity field -- it is confusing to
      print an always zero value.
      
      This patch could break programs that parse
      /proc/acpi/processor/*/power, since it deletes this
      line from that file:
      
      bus master activity:     00000000
      
      http://bugzilla.kernel.org/show_bug.cgi?id=13145
      
      
      is not fixed by this patch, but provoked this patch.
      
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      92614610
    • Yu Zhao's avatar
      PCI: only save/restore existent registers in the PCIe capability · 1b6b8ce2
      Yu Zhao authored
      
      PCIe 1.1 base neither requires the endpoint to implement the entire
      PCIe capability structure nor specifies default values of registers
      that are not implemented by the device. So we only save and restore
      registers that must be implemented by different device types if the
      device PCIe capability version is 1.
      
      PCIe 1.1 Capability Structure Expansion ECN and PCIe 2.0 requires
      all registers in the PCIe capability to be either implemented or
      hardwired to 0. Their PCIe capability version is 2.
      
      Signed-off-by: default avatarYu Zhao <yu.zhao@intel.com>
      Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      1b6b8ce2
    • Jan Kiszka's avatar
      KVM: Fix overlapping check for memory slots · 4cd481f6
      Jan Kiszka authored
      
      When checking for overlapping slots on registration of a new one, kvm
      currently also considers zero-length (ie. deleted) slots and rejects
      requests incorrectly. This finally denies user space from joining slots.
      Fix the check by skipping deleted slots and advertise this via a
      KVM_CAP_JOIN_MEMORY_REGIONS_WORKS.
      
      Cc: stable@kernel.org
      Signed-off-by: default avatarJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
      4cd481f6
    • Tejun Heo's avatar
      block: include empty disks in /proc/diskstats · 71982a40
      Tejun Heo authored
      
      /proc/diskstats used to show stats for all disks whether they're
      zero-sized or not and their non-zero partitions.  Commit
      074a7aca accidentally changed the
      behavior such that it doesn't print out zero sized disks.  This patch
      implements DISK_PITER_INCL_EMPTY_PART0 flag to partition iterator and
      uses it in diskstats_show() such that empty part0 is shown in
      /proc/diskstats.
      
      Reported and bisectd by Dianel Collins.
      
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Reported-by: default avatarDaniel Collins <solemnwarning@solemnwarning.no-ip.org>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      71982a40
    • Tejun Heo's avatar
      bio: fix bio_kmalloc() · 451a9ebf
      Tejun Heo authored
      
      Impact: fix bio_kmalloc() and its destruction path
      
      bio_kmalloc() was broken in two ways.
      
      * bvec_alloc_bs() first allocates bvec using kmalloc() and then
        ignores it and allocates again like non-kmalloc bvecs.
      
      * bio_kmalloc_destructor() didn't check for and free bio integrity
        data.
      
      This patch fixes the above problems.  kmalloc patch is separated out
      from bio_alloc_bioset() and allocates the requested number of bvecs as
      inline bvecs.
      
      * bio_alloc_bioset() no longer takes NULL @bs.  None other than
        bio_kmalloc() used it and outside users can't know how it was
        allocated anyway.
      
      * Define and use BIO_POOL_NONE so that pool index check in
        bvec_free_bs() triggers if inline or kmalloc allocated bvec gets
        there.
      
      * Relocate destructors on top of each allocation function so that how
        they're used is more clear.
      
      Jens Axboe suggested allocating bvecs inline.
      
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      451a9ebf
    • Arjan van de Ven's avatar
      driver synchronization: make scsi_wait_scan more advanced · d4d5291c
      Arjan van de Ven authored
      
      There is currently only one way for userspace to say "wait for my storage
      device to get ready for the modules I just loaded": to load the
      scsi_wait_scan module. Expectations of userspace are that once this
      module is loaded, all the (storage) devices for which the drivers
      were loaded before the module load are present.
      
      Now, there are some issues with the implementation, and the async
      stuff got caught in the middle of this: The existing code only
      waits for the scsy async probing to finish, but it did not take
      into account at all that probing might not have begun yet.
      (Russell ran into this problem on his computer and the fix works for him)
      
      This patch fixes this more thoroughly than the previous "fix", which
      had some bad side effects (namely, for kernel code that wanted to wait for
      the scsi scan it would also do an async sync, which would deadlock if you did
      it from async context already.. there's a report about that on lkml):
      The patch makes the module first wait for all device driver probes, and then it
      will wait for the scsi parallel scan to finish.
      
      Signed-off-by: default avatarArjan van de Ven <arjan@linux.intel.com>
      Tested-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d4d5291c
    • Jonathan Corbet's avatar
      Trivial: fix a typo in slow-work.h · 5dd559f0
      Jonathan Corbet authored
      
      Fix a comment typo in slow-work.h
      
      ...a trivial mistake, but it will mess up kerneldoc if nothing else.
      
      Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      5dd559f0
    • David Howells's avatar
      PERCPU: Collect the DECLARE/DEFINE declarations together · 5028eaa9
      David Howells authored
      
      Collect the DECLARE/DEFINE declarations together in linux/percpu-defs.h so
      that they're in one place, and give them descriptive comments, particularly
      the SHARED_ALIGNED variant.
      
      It would be nice to collect these in linux/percpu.h, but that's not possible
      without sorting out the severe #include recursion between the x86 arch headers
      and the general headers (and possibly other arches too).
      
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      5028eaa9
    • David Howells's avatar
      FRV: Fix the section attribute on UP DECLARE_PER_CPU() · 9b8de747
      David Howells authored
      
      In non-SMP mode, the variable section attribute specified by DECLARE_PER_CPU()
      does not agree with that specified by DEFINE_PER_CPU().  This means that
      architectures that have a small data section references relative to a base
      register may throw up linkage errors due to too great a displacement between
      where the base register points and the per-CPU variable.
      
      On FRV, the .h declaration says that the variable is in the .sdata section, but
      the .c definition says it's actually in the .data section.  The linker throws
      up the following errors:
      
      kernel/built-in.o: In function `release_task':
      kernel/exit.c:78: relocation truncated to fit: R_FRV_GPREL12 against symbol `per_cpu__process_counts' defined in .data section in kernel/built-in.o
      kernel/exit.c:78: relocation truncated to fit: R_FRV_GPREL12 against symbol `per_cpu__process_counts' defined in .data section in kernel/built-in.o
      
      To fix this, DECLARE_PER_CPU() should simply apply the same section attribute
      as does DEFINE_PER_CPU().  However, this is made slightly more complex by
      virtue of the fact that there are several variants on DEFINE, so these need to
      be matched by variants on DECLARE.
      
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9b8de747
  6. Apr 21, 2009
  7. Apr 19, 2009
    • Rafael J. Wysocki's avatar
      PM/Suspend: Introduce two new platform callbacks to avoid breakage · 6a7c7eaf
      Rafael J. Wysocki authored
      
      Commit 900af0d9 (PM: Change suspend
      code ordering) changed the ordering of suspend code in such a way
      that the platform .prepare() callback is now executed after the
      device drivers' late suspend callbacks have run.  Unfortunately, this
      turns out to break ARM platforms that need to talk via I2C to power
      control devices during the .prepare() callback.
      
      For this reason introduce two new platform suspend callbacks,
      .prepare_late() and .wake(), that will be called just prior to
      disabling non-boot CPUs and right after bringing them back on line,
      respectively, and use them instead of .prepare() and .finish() for
      ACPI suspend.  Make the PM core execute the .prepare() and .finish()
      platform suspend callbacks where they were executed previously (that
      is, right after calling the regular suspend methods provided by
      device drivers and right before executing their regular resume
      methods, respectively).
      
      It is not necessary to make analogous changes to the hibernation
      code and data structures at the moment, because they are only used
      by ACPI platforms.
      
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Reported-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      Acked-by: default avatarLen Brown <len.brown@intel.com>
      6a7c7eaf
    • Ralf Baechle's avatar
      <linux/seccomp.h> needs to include <linux/errno.h>. · 42a17ad2
      Ralf Baechle authored
      
      <linux/seccomp.h> uses EINVAL so should include <linux/errno.h>.  This
      fixes a build error on 64-bit MIPS if CONFIG_SECCOMP is disabled.
      
      Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      42a17ad2
  8. Apr 17, 2009
  9. Apr 16, 2009
    • Jason Baron's avatar
      Driver core: remove pr_fmt() from dynamic_dev_dbg() printk · 7607b1d6
      Jason Baron authored
      
      When pr_fmt() was added to the pr_debug() code, we added it not only to the
      dynamic_pr_debug() function, but also to the dynamic_dev_dbg() funciton.
      However, dev_dbg() doesn't make use of pr_fmt(), so neither should
      dynamic_dev_dbg().
      
      Signed-off-by: default avatarJason Baron <jbaron@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      7607b1d6
    • Michael Ellerman's avatar
      dynamic debug: resurrect old pr_debug() semantics as pr_devel() · 4ccb4579
      Michael Ellerman authored
      
      pr_debug() used to produce zero code unless DEBUG was #defined.  This is
      now no longer the case in practice[1].
      
      There are places where it's useful to have debugging printks, but we don't
      want them to generate any code in production kernels.
      
      So add a new macro, pr_devel(), for _devel_opment, to provide the old
      semantics, ie.  if the programmer doesn't explicitly enable debugging, no
      code is produced.
      
      [1]: You can turn CONFIG_DYNAMIC_DEBUG off, but it's enabled in at least
           one distro kernel, so it's not really a solution.
      
      Signed-off-by: default avatarMichael Ellerman <michael@ellerman.id.au>
      Cc: Jason Baron <jbaron@redhat.com>
      Cc: Greg Banks <gnb@sgi.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      4ccb4579
    • Magnus Damm's avatar
      Driver Core: early platform driver · 13977091
      Magnus Damm authored
      
      V3 of the early platform driver implementation.
      
      Platform drivers are great for embedded platforms because we can separate
      driver configuration from the actual driver.  So base addresses,
      interrupts and other configuration can be kept with the processor or board
      code, and the platform driver can be reused by many different platforms.
      
      For early devices we have nothing today.  For instance, to configure early
      timers and early serial ports we cannot use platform devices.  This
      because the setup order during boot.  Timers are needed before the
      platform driver core code is available.  The same goes for early printk
      support.  Early in this case means before initcalls.
      
      These early drivers today have their configuration either hard coded or
      they receive it using some special configuration method.  This is working
      quite well, but if we want to support both regular kernel modules and
      early devices then we need to have two ways of configuring the same
      driver.  A single way would be better.
      
      The early platform driver patch is basically a set of functions that allow
      drivers to register themselves and architecture code to locate them and
      probe.  Registration happens through early_param().  The time for the
      probe is decided by the architecture code.
      
      See Documentation/driver-model/platform.txt for more details.
      
      [akpm@linux-foundation.org: coding-style fixes]
      Signed-off-by: default avatarMagnus Damm <damm@igel.co.jp>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Cc: David Brownell <david-b@pacbell.net>
      Cc: Tejun Heo <htejun@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      13977091
    • Alan Cox's avatar
      ata: Report 16/32bit PIO as best we can · e3cf95dd
      Alan Cox authored
      
      The legacy old IDE ioctl API for this is a bit primitive so we try
      and map stuff sensibly onto it.
      
      - Set PIO over DMA devices to report 32bit
      - Add ability to change the PIO32 settings if the controller permits it
      - Add that functionality into the sff drivers
      - Add that functionality into the VLB legacy driver
      - Turn on the 32bit PIO on the ninja32 and add support there
      
      Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      e3cf95dd
    • Patrick McHardy's avatar
      netfilter: nf_nat: add support for persistent mappings · 98d500d6
      Patrick McHardy authored
      The removal of the SAME target accidentally removed one feature that is
      not available from the normal NAT targets so far, having multi-range
      mappings that use the same mapping for each connection from a single
      client. The current behaviour is to choose the address from the range
      based on source and destination IP, which breaks when communicating
      with sites having multiple addresses that require all connections to
      originate from the same IP address.
      
      Introduce a IP_NAT_RANGE_PERSISTENT option that controls whether the
      destination address is taken into account for selecting addresses.
      
      http://bugzilla.kernel.org/show_bug.cgi?id=12954
      
      
      
      Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
      98d500d6
    • Anton Vorontsov's avatar
      powerpc/5200: Bring the legacy fsl_spi_platform_data hooks back · 41240102
      Anton Vorontsov authored
      
      In commit 364fdbc0 ("spi_mpc83xx:
      rework chip selects handling"), I merged activate_cs and deactivate_cs
      hooks into cs_control, but I overlooked that mpc52xx_psc_spi driver
      is using these hooks too. And that resulted in the following build
      failure:
      
      CC      drivers/spi/mpc52xx_psc_spi.o
      drivers/spi/mpc52xx_psc_spi.c: In function 'mpc52xx_psc_spi_do_probe':
      drivers/spi/mpc52xx_psc_spi.c:398: error: 'struct fsl_spi_platform_data'
      has no member named 'activate_cs'
      drivers/spi/mpc52xx_psc_spi.c:399: error: 'struct fsl_spi_platform_data'
      has no member named 'deactivate_cs'
      make[2]: *** [drivers/spi/mpc52xx_psc_spi.o] Error 1
      
      This patch simply adds the legacy hooks back for 2.6.30, and for
      2.6.31 we'll convert the driver to ->cs_control.
      
      Reported-by: default avatarSubrata Modak <subrata@linux.vnet.ibm.com>
      Signed-off-by: default avatarAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
      41240102
    • Russell King's avatar
      8cd50e8e
Loading