Skip to content
  1. Aug 13, 2010
    • Robert Richter's avatar
      x86, xsave: Disable xsave in i387 emulation mode · 1f999ab5
      Robert Richter authored
      
      
      xsave is broken for (!HAVE_HWFP). This is the case if config
      MATH_EMULATION is enabled, 'no387' kernel parameter is set and xsave
      exists. xsave will not work because x86/math-emu and xsave share the
      same memory. As this case can be treated as corner case we simply
      disable xsave then.
      
      Signed-off-by: default avatarRobert Richter <robert.richter@amd.com>
      LKML-Reference: <1279731838-1522-7-git-send-email-robert.richter@amd.com>
      Signed-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
      1f999ab5
    • Linus Torvalds's avatar
      Merge branch 'io_remap_pfn_range' of git://www.jni.nu/cris · ad41a1e0
      Linus Torvalds authored
      * 'io_remap_pfn_range' of git://www.jni.nu/cris:
        CRIS: Define io_remap_pfn_range as remap_pfn_range
      ad41a1e0
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm · 8357422d
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm: (33 commits)
        dm mpath: support discard
        dm stripe: support discards
        dm: split discard requests on target boundaries
        dm stripe: optimize sector division
        dm stripe: move sector translation to a function
        dm: error return error for discards
        dm delay: support discard
        dm: zero silently drop discards
        dm: use dm_target_offset macro
        dm: factor out max_io_len_target_boundary
        dm: use common __issue_target_request for flush and discard support
        dm: linear support discard
        dm crypt: simplify crypt_ctr
        dm crypt: simplify crypt_config destruction logic
        dm: allow autoloading of dm mod
        dm: rename map_info flush_request to target_request_nr
        dm ioctl: refactor dm_table_complete
        dm snapshot: implement merge
        dm: do not initialise full request queue when bio based
        dm ioctl: make bio or request based device type immutable
        ...
      8357422d
    • Linus Torvalds's avatar
      Merge branch 'hwpoison' of git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-mce-2.6 · 1021a645
      Linus Torvalds authored
      * 'hwpoison' of git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-mce-2.6:
        hugetlb: add missing unlock in avoidcopy path in hugetlb_cow()
        hwpoison: rename CONFIG
        HWPOISON, hugetlb: support hwpoison injection for hugepage
        HWPOISON, hugetlb: detect hwpoison in hugetlb code
        HWPOISON, hugetlb: isolate corrupted hugepage
        HWPOISON, hugetlb: maintain mce_bad_pages in handling hugepage error
        HWPOISON, hugetlb: set/clear PG_hwpoison bits on hugepage
        HWPOISON, hugetlb: enable error handling path for hugepage
        hugetlb, rmap: add reverse mapping for hugepage
        hugetlb: move definition of is_vm_hugetlb_page() to hugepage_inline.h
      
      Fix up trivial conflicts in mm/memory-failure.c
      1021a645
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://neil.brown.name/md · 7367f5b0
      Linus Torvalds authored
      * 'for-linus' of git://neil.brown.name/md:
        Further tidyup of raid6 naming in lib/raid6
        Make lib/raid6/test build correctly.
        Rename raid6 files now they're in a 'raid6' directory.
      7367f5b0
    • Linus Torvalds's avatar
      Merge branch 'msm-core' of git://codeaurora.org/quic/kernel/dwalker/linux-msm · ce4327d3
      Linus Torvalds authored
      * 'msm-core' of git://codeaurora.org/quic/kernel/dwalker/linux-msm:
        msm: mmc: Add msm prefix to platform data structure
        msm: trout: Remove extern declaration from source file
        arm: msm: Fix section mismatch in smd.c.
        arm: msm: trout add mmc support
        arm: msm: trout: add trout specific gpio interrupts
        arm: msm: remove unused #include <linux/version.h>
      ce4327d3
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq · 4032816d
      Linus Torvalds authored
      * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq:
        [CPUFREQ] add missing __percpu markup in pcc-cpufreq.c
      4032816d
    • Linus Torvalds's avatar
      Merge branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging · 1c00650c
      Linus Torvalds authored
      * 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
        i2c: I2C bus multiplexer driver pca954x
        i2c: Multiplexed I2C bus core support
        i2c: Use a separate mutex for userspace client lists
        i2c: Make i2c_default_probe self-sufficient
        i2c: Drop dummy variable
        i2c: Move adapter locking helpers to i2c-core
        V4L/DVB: Use custom I2C probing function mechanism
        i2c: Add support for custom probe function
        i2c-dev: Use memdup_user
        i2c-dev: Remove unnecessary kmalloc casts
      1c00650c
    • Linus Torvalds's avatar
      Merge branch 'params' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus · 26df0766
      Linus Torvalds authored
      * 'params' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus: (22 commits)
        param: don't deref arg in __same_type() checks
        param: update drivers/acpi/debug.c to new scheme
        param: use module_param in drivers/message/fusion/mptbase.c
        ide: use module_param_named rather than module_param_call
        param: update drivers/char/ipmi/ipmi_watchdog.c to new scheme
        param: lock if_sdio's lbs_helper_name and lbs_fw_name against sysfs changes.
        param: lock myri10ge_fw_name against sysfs changes.
        param: simple locking for sysfs-writable charp parameters
        param: remove unnecessary writable charp
        param: add kerneldoc to moduleparam.h
        param: locking for kernel parameters
        param: make param sections const.
        param: use free hook for charp (fix leak of charp parameters)
        param: add a free hook to kernel_param_ops.
        param: silence .init.text references from param ops
        Add param ops struct for hvc_iucv driver.
        nfs: update for module_param_named API change
        AppArmor: update for module_param_named API change
        param: use ops in struct kernel_param, rather than get and set fns directly
        param: move the EXPORT_SYMBOL to after the definitions.
        ...
      26df0766
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6 · 58028762
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6: (22 commits)
        regulator: Remove default DEBUG define from TPS6586x
        regulator: tps6507x - add missing platform_set_drvdata in tps6507x_pmic_probe
        regulator: tps6586x - add regulator_unregister() in tps6586x_regulator_remove()
        mfd: max8998 - fix incorrect kfree(i2c) in i2c_driver probe callback handler
        regulator: lp3971 - remove unnecessary ret value checking in lp3971_i2c_write()
        regulator: max8660 - fix a memory leak in max8660_remove()
        regulator: max1586 - fix a memory leak in max1586_pmic_remove()
        regulator: Default GPIO controlled WM8994 regulators to disabled
        regulator: lp3971 - remove unnecessary ret value checking in lp3971_i2c_write()
        max8998: fix off-by-one value range checking
        regulator: tps6586x: fix millivolt return values and SM2 table
        regulator: tps6586x: add dependancy on MFD_TPS6585x
        regulator: add TPS6586X regulator driver
        regulator: MAX8998: set_voltage bugfix. ramp_up delay and min/max voltage
        regulator: add support for regulators on the ab8500 MFD
        ab8500-mfd: add regulator support to ab8500 mfd device
        tps65023: Allow registering similar TPS65021
        drivers: regulators: depend on MFD_MAX8998
        drivers: regulator: add Maxim 8998 driver
        ISL6271A voltage regulator support.
        ...
      58028762
    • Linus Torvalds's avatar
      Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6 · e83ddb33
      Linus Torvalds authored
      * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: (40 commits)
        mfd: Fix incorrect kfree(i2c) in wm8994-core i2c_driver probe
        mfd: Fix incorrect kfree(i2c) in wm831x-core i2c_driver probe
        mfd: Fix incorrect kfree(i2c) in tps6507x i2c_driver probe
        mfd: Add TPS6586x driver
        mfd: Use macros instead of some constant magic numbers for menelaus
        mfd: Fix menelaus mmc slot 2 misconfiguration
        mfd: Missing slab.h includes
        mfd: Fix wrong wm8350-core kfree in error path
        mfd: Fix wm8994_device_init() return value
        mfd: Avoid calling platform_device_put() twice in ucb1400 probe error path
        mfd: Annotate tc6387xb probe/remove routines with __devinit/__devexit
        mfd: Fix tc6387xb resource reclaim
        mfd: Fix wrong goto labels for tc6393xb error handling
        mfd: Get rid of now unused mc13783 private header
        hwmon: Don't access struct mc13783 directly from mc13783-adc
        mfd: New mc13783 function exposing flags
        mfd: Check jz4740-adc kmalloc() result
        mfd: Fix jz4740-adc resource reclaim in probe error path
        mfd: Add WM8321 support
        mfd: Add stmpe auto sleep feature
        ...
      e83ddb33
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 · 14a4fa20
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
        ASoC: add AD1980 obsolete information
        ASoC: register cache should be 1 byte aligned for 1 byte long register
        ALSA: hda - Adding support for new IDT 92HD87XX codecs
        ASoC: Fix inverted mute controls for WM8580
        ALSA: HDA: Use model=auto for LG R510
        ALSA: hda - Update model entries in HD-Audio-Models.txt
        ALSA: hda: document VIA models
        ALSA: hda - patch_nvhdmi.c: Add missing codec IDs, unify names
        ALSA: hda - add support for Conexant CX20584
        ALSA: hda - New snd-hda-intel model/pin config for hp dv7-4000
        ALSA: hda - Fix missing stream for second ADC on Realtek ALC260 HDA codec
        ALSA: hda - Make converter setups sticky
        ALSA: hda - Add support for Acer ZGA ALC271 (1025:047c)
        sound/oss: Adjust confusing if indentation
        sound: oss: au1550_ac97.c removed duplicated #include
        ASoC: Fix for changed Eureka Kconfig symbol names
      14a4fa20
    • Linus Torvalds's avatar
      Merge git://git.infradead.org/battery-2.6 · 16bb85bc
      Linus Torvalds authored
      * git://git.infradead.org/battery-2.6:
        intel_mid_battery: Fix battery scaling
        intel_mid_battery: Fix the argument order to intel_scu_ipc_command
        olpc_battery: Fix build failure caused by sysfs changes
        Add s3c-adc-battery driver
        Intel MID platform battery driver
      
      Fix up trivial conflicts (battery drivers added from different branches)
      in drivers/power/{Kconfig,Makefile}
      16bb85bc
    • Chris Wilson's avatar
      x86/hpet: Use the FSEC_PER_SEC constant for femto-second periods · 4936a3b9
      Chris Wilson authored
      The current computation, introduced with f12a15be
      
      , of FSEC_PER_SEC using
      the multiplication of (FSEC_PER_NSEC * NSEC_PER_SEC) is performed only
      with 32bit integers on small machines, resulting in an overflow and a
      *very* short intervals being programmed.  An interrupt storm follows.
      
      Note that we also have to specify FSEC_PER_SEC as being long long to
      overcome the same limitations.
      
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarJohn Stultz <johnstul@us.ibm.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Acked-by: default avatarIngo Molnar <mingo@elte.hu>
      Acked-by: default avatarH. Peter Anvin <hpa@zytor.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      4936a3b9
    • Jason Wessel's avatar
      timekeeping: Fix overflow in rawtime tv_nsec on 32 bit archs · deda2e81
      Jason Wessel authored
      The tv_nsec is a long and when added to the shifted interval it can wrap
      and become negative which later causes looping problems in the
      getrawmonotonic().  The edge case occurs when the system has slept for
      a short period of time of ~2 seconds.
      
      A trace printk of the values in this patch illustrate the problem:
      
      ftrace time stamp: log
      43.716079: logarithmic_accumulation: raw: 3d0913 tv_nsec d687faa
      43.718513: logarithmic_accumulation: raw: 3d0913 tv_nsec da588bd
      43.722161: logarithmic_accumulation: raw: 3d0913 tv_nsec de291d0
      46.349925: logarithmic_accumulation: raw: 7a122600 tv_nsec e1f9ae3b
      
      
      46.349930: logarithmic_accumulation: raw: 1e848980 tv_nsec 8831c0e3
      
      The kernel starts looping at 46.349925 in the getrawmonotonic() due to
      the negative value from adding the raw value to tv_nsec.
      
      A simple solution is to accumulate into a u64, and then normalize it
      to a timespec_t.
      
      Signed-off-by: default avatarJason Wessel <jason.wessel@windriver.com>
       [ Reworked variable names and simplified some of the code. - John ]
      Signed-off-by: default avatarJohn Stultz <johnstul@us.ibm.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      deda2e81
    • David Howells's avatar
      MN10300: Use no_printk() for disabled gdbstub debugging functions · 95f45727
      David Howells authored
      
      
      Use no_printk() for disabled gdbstub debugging functions to maintain side
      effect checking.
      
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      95f45727
    • David Howells's avatar
      Add a dummy printk function for the maintenance of unused printks · 12fdff3f
      David Howells authored
      
      
      Add a dummy printk function for the maintenance of unused printks through gcc
      format checking, and also so that side-effect checking is maintained too.
      
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      12fdff3f
    • David Howells's avatar
      MN10300: Don't try and #include <linux/slab.h> in lib/inflate.c from bootloader · 1490cf5f
      David Howells authored
      Don't try and #include <linux/slab.h> in lib/inflate.c from the bootloader code
      as linux/slab.h hauls in function defs that aren't available in the bootloader
      code and may also haul in conflicting functions.
      
      To fix this, make the inclusion of linux/slab.h contingent on NO_INFLATE_MALLOC
      as are the usages of kmalloc() and kfree().
      
      In MN10300, this causes the following errors:
      
      In file included from include/linux/string.h:21,
                       from include/linux/bitmap.h:8,
                       from include/linux/nodemask.h:93,
                       from include/linux/mmzone.h:16,
                       from include/linux/gfp.h:4,
                       from include/linux/slab.h:12,
                       from arch/mn10300/boot/compressed/../../../../lib/inflate.c:106,
                       from arch/mn10300/boot/compressed/misc.c:170:
      /warthog/am33/linux-2.6-mn10300/arch/mn10300/include/asm/string.h:19: error: conflicting types for 'memset'
      arch/mn10300/boot...
      1490cf5f
    • David Howells's avatar
      MN10300: Permit .GCC-command-line sections · 019fca84
      David Howells authored
      
      
      Permit .GCC-command-line sections in modules.  Otherwise modpost says things
      like:
      
      WARNING: drivers/mtd/chips/map_ram.o (.GCC-command-line): unexpected non-allocatable section.
      Did you forget to use "ax"/"aw" in a .S file?
      Note that for example <linux/init.h> contains
      section definitions for use in .S files.
      
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      019fca84
    • David Howells's avatar
      MN10300: Fix size_t and ssize_t · 3ad001c0
      David Howells authored
      
      
      With the newer compilers, size_t and ssize_t are expected to be (un)signed int
      rather than (un)signed long.
      
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3ad001c0
    • David Howells's avatar
      MN10300: Fix RTC routines · 35579576
      David Howells authored
      
      
      A change to the RTC routines in the MN10300 arch used set_rtc_mms() when it
      meant set_rtc_mmss().  This results in an error due to a reference of an
      undefined symbol.
      
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      35579576
    • Namhyung Kim's avatar
      [CPUFREQ] add missing __percpu markup in pcc-cpufreq.c · a3da3234
      Namhyung Kim authored
      
      
      pcc_cpu_info is a percpu pointer but was missing __percpu markup.
      Add it.
      
      Signed-off-by: default avatarNamhyung Kim <namhyung@gmail.com>
      Acked-by: default avatarTejun Heo <tj@kernel.org>
      Signed-off-by: default avatarDave Jones <davej@redhat.com>
      a3da3234
    • Linus Torvalds's avatar
      Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6 · d4a47ac1
      Linus Torvalds authored
      * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
        [IA64] Fix rwsem: RWSEM_WAITING_BIAS must not be unsigned.
      d4a47ac1
    • Linus Torvalds's avatar
      Merge branch 'drm-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 · aa9f56b6
      Linus Torvalds authored
      * 'drm-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (55 commits)
        io-mapping: move asm include inside the config option
        vgaarb: drop vga.h include
        drm/radeon: Add probing of clocks from device-tree
        drm/radeon: drop old and broken mesa warning
        drm/radeon: Fix pci_map_page() error checking
        drm: Remove count_lock for calling lastclose() after 58474713 (v2)
        drm/radeon/kms: allow FG_ALPHA_VALUE on r5xx
        drm/radeon/kms: another r6xx/r7xx CS checker fix
        DRM: Replace kmalloc/memset combos with kzalloc
        drm: expand gamma_set
        drm/edid: Split mode lists out to their own header for readability
        drm/edid: Rewrite mode parse to use the generic detailed block walk
        drm/edid: Add detailed block walk for VTB extensions
        drm/edid: Add detailed block walk for CEA extensions
        drm: Remove unused fields from drm_display_info
        drm: Use ENOENT consistently for the error return for an unmatched handle.
        drm/radeon/kms: mark 3D power states as performance
        drm: Only set DPMS once on the CRTC not after every encoder.
        drm/radeon/kms: add additional quirk for Acer rv620 laptop
        drm: Propagate error code from fb_create()
        ...
      
      Fix up trivial conflicts in drivers/gpu/drm/drm_edid.c
      aa9f56b6
    • Tony Luck's avatar
      [IA64] Fix rwsem: RWSEM_WAITING_BIAS must not be unsigned. · b680f097
      Tony Luck authored
      Some nice improvements were made to rwsem in commit:
      
       424acaae
      
      
       rwsem: wake queued readers when writer blocks on active read lock
      
      but this change overlooked that ia64 had defined RWSEM_WAITING_BIAS
      as an unsigned value, while the new code required a signed value (as
      it is in every other architecture).
      
      This fix suggested by the original patch author: Michel Lespinasse.
      
      Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
      b680f097
    • Linus Torvalds's avatar
      Merge branch 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6 · 58d4ea65
      Linus Torvalds authored
      * 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6:
        mmc_spi: Fix unterminated of_match_table
        of/sparc: fix build regression from of_device changes
        of/device: Replace struct of_device with struct platform_device
      58d4ea65
    • Linus Torvalds's avatar
      Merge branch 'stable/xen-swiotlb-0.8.6' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen · 26f0cf91
      Linus Torvalds authored
      * 'stable/xen-swiotlb-0.8.6' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
        x86: Detect whether we should use Xen SWIOTLB.
        pci-swiotlb-xen: Add glue code to setup dma_ops utilizing xen_swiotlb_* functions.
        swiotlb-xen: SWIOTLB library for Xen PV guest with PCI passthrough.
        xen/mmu: inhibit vmap aliases rather than trying to clear them out
        vmap: add flag to allow lazy unmap to be disabled at runtime
        xen: Add xen_create_contiguous_region
        xen: Rename the balloon lock
        xen: Allow unprivileged Xen domains to create iomap pages
        xen: use _PAGE_IOMAP in ioremap to do machine mappings
      
      Fix up trivial conflicts (adding both xen swiotlb and xen pci platform
      driver setup close to each other) in drivers/xen/{Kconfig,Makefile} and
      include/xen/xen-ops.h
      26f0cf91
  2. Aug 12, 2010
    • Maxim Levitsky's avatar
      memstick: fix hangs on unexpected device removal in mspro_blk · d862b13b
      Maxim Levitsky authored
      
      
      mspro_block_remove() is called from detect thread that first calls the
      mspro_block_stop(), which stops the request queue.  If we call
      del_gendisk() with the queue stopped we get a deadlock.
      
      Signed-off-by: default avatarMaxim Levitsky <maximlevitsky@gmail.com>
      Cc: Alex Dubov <oakad@yahoo.com>
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d862b13b
    • Maxim Levitsky's avatar
      memstick: init sysfs attributes · 21fd0495
      Maxim Levitsky authored
      
      
      Otherwise lockdep complains.
      
      Signed-off-by: default avatarMaxim Levitsky <maximlevitsky@gmail.com>
      Cc: Alex Dubov <oakad@yahoo.com>
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      21fd0495
    • Adrian Hunter's avatar
      mmc_test: fix large memory allocation · fec4dcce
      Adrian Hunter authored
      
      
      - Fix mmc_test_alloc_mem.
      
      - Use nr_free_buffer_pages() instead of sysinfo.totalram to determine
        total lowmem pages.
      
      - Change variables containing memory sizes to unsigned long.
      
      - Limit maximum test area size to 128MiB because that is the maximum MMC
        high capacity erase size (the maxmium SD allocation unit size is just
        4MiB)
      
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@nokia.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      fec4dcce
    • Adrian Hunter's avatar
      mmc_test: add performance tests · 64f7120d
      Adrian Hunter authored
      
      
      mmc_test provides tests aimed at testing SD/MMC hosts.  This patch adds
      performance tests.
      
      It is advantageous to have performance tests in a kernel
      module like mmc_test for the following reasons:
      	- transfer times can be measured very accurately
      	- arbitrarily large transfers are possible
      	- the effect of contiguous vs scattered pages
      	can be determined
      
      The new tests are:
      
      	23. Best-case read performance
      	24. Best-case write performance
      	25. Best-case read performance into scattered pages
      	26. Best-case write performance from scattered pages
      	27. Single read performance by transfer size
      	28. Single write performance by transfer size
      	29. Single trim performance by transfer size
      	30. Consecutive read performance by transfer size
      	31. Consecutive write performance by transfer size
      	32. Consecutive trim performance by transfer size
      
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@nokia.com>
      Cc: <linux-mmc@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      64f7120d
    • Adrian Hunter's avatar
      mmc_block: add support for secure discard · 49804548
      Adrian Hunter authored
      
      
      Secure discard is implemented by Secure Trim if the discard is unaligned
      or Secure Erase otherwise.
      
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@nokia.com>
      Acked-by: default avatarJens Axboe <axboe@kernel.dk>
      Cc: Kyungmin Park <kmpark@infradead.org>
      Cc: Madhusudhan Chikkature <madhu.cr@ti.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Ben Gardiner <bengardiner@nanometrics.ca>
      Cc: <linux-mmc@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      49804548
    • Adrian Hunter's avatar
      block: add secure discard · 8d57a98c
      Adrian Hunter authored
      
      
      Secure discard is the same as discard except that all copies of the
      discarded sectors (perhaps created by garbage collection) must also be
      erased.
      
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@nokia.com>
      Acked-by: default avatarJens Axboe <axboe@kernel.dk>
      Cc: Kyungmin Park <kmpark@infradead.org>
      Cc: Madhusudhan Chikkature <madhu.cr@ti.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Ben Gardiner <bengardiner@nanometrics.ca>
      Cc: <linux-mmc@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      8d57a98c
    • Adrian Hunter's avatar
      omap_hsmmc: add erase capability · 93caf8e6
      Adrian Hunter authored
      
      
      Disable the data (busy) timeout for erases and set the MMC_CAP_ERASE
      capability.
      
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@nokia.com>
      Acked-by: default avatarJens Axboe <axboe@kernel.dk>
      Cc: Kyungmin Park <kmpark@infradead.org>
      Cc: Madhusudhan Chikkature <madhu.cr@ti.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Ben Gardiner <bengardiner@nanometrics.ca>
      Cc: <linux-mmc@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      93caf8e6
    • Adrian Hunter's avatar
      mmc_block: add discard support · bd788c96
      Adrian Hunter authored
      
      
      Enable MMC to service discard requests.  In the case of SD and MMC cards
      that do not support trim, discards become erases.  In the case of cards
      (MMC) that only allow erases in multiples of erase group size, round to
      the nearest completely discarded erase group.
      
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@nokia.com>
      Acked-by: default avatarJens Axboe <axboe@kernel.dk>
      Cc: Kyungmin Park <kmpark@infradead.org>
      Cc: Madhusudhan Chikkature <madhu.cr@ti.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Ben Gardiner <bengardiner@nanometrics.ca>
      Cc: <linux-mmc@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      bd788c96
    • Adrian Hunter's avatar
      mmc: add erase, secure erase, trim and secure trim operations · dfe86cba
      Adrian Hunter authored
      
      
      SD/MMC cards tend to support an erase operation.  In addition, eMMC v4.4
      cards can support secure erase, trim and secure trim operations that are
      all variants of the basic erase command.
      
      SD/MMC device attributes "erase_size" and "preferred_erase_size" have been
      added.
      
      "erase_size" is the minimum size, in bytes, of an erase operation.  For
      MMC, "erase_size" is the erase group size reported by the card.  Note that
      "erase_size" does not apply to trim or secure trim operations where the
      minimum size is always one 512 byte sector.  For SD, "erase_size" is 512
      if the card is block-addressed, 0 otherwise.
      
      SD/MMC cards can erase an arbitrarily large area up to and
      including the whole card.  When erasing a large area it may
      be desirable to do it in smaller chunks for three reasons:
      
          1. A single erase command will make all other I/O on the card
             wait.  This is not a problem if the whole card is being erased, but
             erasing one partition will make I/O for another partition on the
             same card wait for the duration of the erase - which could be a
             several minutes.
      
          2. To be able to inform the user of erase progress.
      
          3. The erase timeout becomes too large to be very useful.
             Because the erase timeout contains a margin which is multiplied by
             the size of the erase area, the value can end up being several
             minutes for large areas.
      
      "erase_size" is not the most efficient unit to erase (especially for SD
      where it is just one sector), hence "preferred_erase_size" provides a good
      chunk size for erasing large areas.
      
      For MMC, "preferred_erase_size" is the high-capacity erase size if a card
      specifies one, otherwise it is based on the capacity of the card.
      
      For SD, "preferred_erase_size" is the allocation unit size specified by
      the card.
      
      "preferred_erase_size" is in bytes.
      
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@nokia.com>
      Acked-by: default avatarJens Axboe <axboe@kernel.dk>
      Cc: Kyungmin Park <kmpark@infradead.org>
      Cc: Madhusudhan Chikkature <madhu.cr@ti.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Ben Gardiner <bengardiner@nanometrics.ca>
      Cc: <linux-mmc@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      dfe86cba
    • Jan Kara's avatar
      mm: fix writeback_in_progress() · 81d73a32
      Jan Kara authored
      Commit 83ba7b07
      
       ("writeback: simplify the write back thread queue")
      broke writeback_in_progress() as in that commit we started to remove work
      items from the list at the moment we start working on them and not at the
      moment they are finished.  Thus if the flusher thread was doing some work
      but there was no other work queued, writeback_in_progress() returned
      false.  This could in particular cause unnecessary queueing of background
      writeback from balance_dirty_pages() or writeout work from
      writeback_sb_if_idle().
      
      This patch fixes the problem by introducing a bit in the bdi state which
      indicates that the flusher thread is processing some work and uses this
      bit for writeback_in_progress() test.
      
      NOTE: Both callsites of writeback_in_progress() (namely,
      writeback_inodes_sb_if_idle() and balance_dirty_pages()) would actually
      need a different information than what writeback_in_progress() provides.
      They would need to know whether *the kind of writeback they are going to
      submit* is already queued.  But this information isn't that simple to
      provide so let's fix writeback_in_progress() for the time being.
      
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Wu Fengguang <fengguang.wu@intel.com>
      Acked-by: default avatarJens Axboe <jaxboe@fusionio.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      81d73a32
    • Wu Fengguang's avatar
      writeback: merge for_kupdate and !for_kupdate cases · a50aeb40
      Wu Fengguang authored
      Unify the logic for kupdate and non-kupdate cases.  There won't be
      starvation because the inodes requeued into b_more_io will later be
      spliced _after_ the remaining inodes in b_io, hence won't stand in the way
      of other inodes in the next run.
      
      It avoids unnecessary redirty_tail() calls, hence the update of
      i_dirtied_when.  The timestamp update is undesirable because it could
      later delay the inode's periodic writeback, or may exclude the inode from
      the data integrity sync operation (which checks timestamp to avoid extra
      work and livelock).
      
      ===
      How the redirty_tail() comes about:
      
      It was a long story..  This redirty_tail() was introduced with
      wbc.more_io.  The initial patch for more_io actually does not have the
      redirty_tail(), and when it's merged, several 100% iowait bug reports
      arised:
      
      reiserfs:
              http://lkml.org/lkml/2007/10/23/93
      
      jfs:
              commit 29a424f2
      
      
              JFS: clear PAGECACHE_TAG_DIRTY for no-write pages
      
      ext2:
              http://www.spinics.net/linux/lists/linux-ext4/msg04762.html
      
      They are all old bugs hidden in various filesystems that become "visible"
      with the more_io patch.  At the time, the ext2 bug is thought to be
      "trivial", so not fixed.  Instead the following updated more_io patch with
      redirty_tail() is merged:
      
      	http://www.spinics.net/linux/lists/linux-ext4/msg04507.html
      
      This will in general prevent 100% on ext2 and possibly other unknown FS bugs.
      
      Signed-off-by: default avatarWu Fengguang <fengguang.wu@intel.com>
      Cc: Dave Chinner <david@fromorbit.com>
      Cc: Martin Bligh <mbligh@google.com>
      Cc: Michael Rubin <mrubin@google.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Jens Axboe <axboe@kernel.dk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a50aeb40
    • Wu Fengguang's avatar
      writeback: fix queue_io() ordering · 4ea879b9
      Wu Fengguang authored
      
      
      This was not a bug, since b_io is empty for kupdate writeback.  The next
      patch will do requeue_io() for non-kupdate writeback, so let's fix it.
      
      Signed-off-by: default avatarWu Fengguang <fengguang.wu@intel.com>
      Cc: Dave Chinner <david@fromorbit.com>
      Cc: Martin Bligh <mbligh@google.com>
      Cc: Michael Rubin <mrubin@google.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Jens Axboe <axboe@kernel.dk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      4ea879b9
    • Wu Fengguang's avatar
      writeback: don't redirty tail an inode with dirty pages · 23539afc
      Wu Fengguang authored
      
      
      Avoid delaying writeback for an expire inode with lots of dirty pages, but
      no active dirtier at the moment.  Previously we only do that for the
      kupdate case.
      
      Any filesystem that does delayed allocation or unwritten extent conversion
      after IO completion will cause this - for example, XFS.
      
      Signed-off-by: default avatarWu Fengguang <fengguang.wu@intel.com>
      Acked-by: default avatarJan Kara <jack@suse.cz>
      Cc: Dave Chinner <david@fromorbit.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Dave Chinner <david@fromorbit.com>
      Cc: Jens Axboe <axboe@kernel.dk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      23539afc