13 Apr, 2014

1 commit

  • Pull audit updates from Eric Paris.

    * git://git.infradead.org/users/eparis/audit: (28 commits)
    AUDIT: make audit_is_compat depend on CONFIG_AUDIT_COMPAT_GENERIC
    audit: renumber AUDIT_FEATURE_CHANGE into the 1300 range
    audit: do not cast audit_rule_data pointers pointlesly
    AUDIT: Allow login in non-init namespaces
    audit: define audit_is_compat in kernel internal header
    kernel: Use RCU_INIT_POINTER(x, NULL) in audit.c
    sched: declare pid_alive as inline
    audit: use uapi/linux/audit.h for AUDIT_ARCH declarations
    syscall_get_arch: remove useless function arguments
    audit: remove stray newline from audit_log_execve_info() audit_panic() call
    audit: remove stray newlines from audit_log_lost messages
    audit: include subject in login records
    audit: remove superfluous new- prefix in AUDIT_LOGIN messages
    audit: allow user processes to log from another PID namespace
    audit: anchor all pid references in the initial pid namespace
    audit: convert PPIDs to the inital PID namespace.
    pid: get pid_t ppid of task in init_pid_ns
    audit: rename the misleading audit_get_context() to audit_take_context()
    audit: Add generic compat syscall support
    audit: Add CONFIG_HAVE_ARCH_AUDITSYSCALL
    ...

    Linus Torvalds
     

12 Apr, 2014

15 commits

  • Pull async SCSI resume support from Dan Williams:
    "Allow disks and other devices to resume in parallel.

    This provides a tangible speed up for a non-esoteric use case (laptop
    resume):

    https://01.org/suspendresume/blogs/tebrandt/2013/hard-disk-resume-optimization-simpler-approach"

    * 'async-scsi-resume' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/isci:
    scsi: async sd resume

    Linus Torvalds
     
  • Pull md updates from Neil Brown:
    "Just a few md patches for the 3.15 merge window.

    Not much happening in md/raid at the moment. Just a few bug fixes
    (one for -stable) and a couple of performance tweaks"

    * tag 'md/3.15' of git://neil.brown.name/md:
    raid5: get_active_stripe avoids device_lock
    raid5: make_request does less prepare wait
    md: avoid oops on unload if some process is in poll or select.
    md/raid1: r1buf_pool_alloc: free allocate pages when subsequent allocation fails.
    md/bitmap: don't abuse i_writecount for bitmap files.

    Linus Torvalds
     
  • Pull NVMe driver updates from Matthew Wilcox:
    "Various updates to the NVMe driver. The most user-visible change is
    that drive hotplugging now works and CPU hotplug while an NVMe drive
    is installed should also work better"

    * git://git.infradead.org/users/willy/linux-nvme:
    NVMe: Retry failed commands with non-fatal errors
    NVMe: Add getgeo to block ops
    NVMe: Start-stop nvme_thread during device add-remove.
    NVMe: Make I/O timeout a module parameter
    NVMe: CPU hot plug notification
    NVMe: per-cpu io queues
    NVMe: Replace DEFINE_PCI_DEVICE_TABLE
    NVMe: Fix divide-by-zero in nvme_trans_io_get_num_cmds
    NVMe: IOCTL path RCU protect queue access
    NVMe: RCU protected access to io queues
    NVMe: Initialize device reference count earlier
    NVMe: Add CONFIG_PM_SLEEP to suspend/resume functions

    Linus Torvalds
     
  • Pull aio ctx->ring_pages migration serialization fix from Ben LaHaise.

    * git://git.kvack.org/~bcrl/aio-next:
    aio: v4 ensure access to ctx->ring_pages is correctly serialised for migration

    Linus Torvalds
     
  • Pull second set of btrfs updates from Chris Mason:
    "The most important changes here are from Josef, fixing a btrfs
    regression in 3.14 that can cause corruptions in the extent allocation
    tree when snapshots are in use.

    Josef also fixed some deadlocks in send/recv and other assorted races
    when balance is running"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: (23 commits)
    Btrfs: fix compile warnings on on avr32 platform
    btrfs: allow mounting btrfs subvolumes with different ro/rw options
    btrfs: export global block reserve size as space_info
    btrfs: fix crash in remount(thread_pool=) case
    Btrfs: abort the transaction when we don't find our extent ref
    Btrfs: fix EINVAL checks in btrfs_clone
    Btrfs: fix unlock in __start_delalloc_inodes()
    Btrfs: scrub raid56 stripes in the right way
    Btrfs: don't compress for a small write
    Btrfs: more efficient io tree navigation on wait_extent_bit
    Btrfs: send, build path string only once in send_hole
    btrfs: filter invalid arg for btrfs resize
    Btrfs: send, fix data corruption due to incorrect hole detection
    Btrfs: kmalloc() doesn't return an ERR_PTR
    Btrfs: fix snapshot vs nocow writting
    btrfs: Change the expanding write sequence to fix snapshot related bug.
    btrfs: make device scan less noisy
    btrfs: fix lockdep warning with reclaim lock inversion
    Btrfs: hold the commit_root_sem when getting the commit root during send
    Btrfs: remove transaction from send
    ...

    Linus Torvalds
     
  • Pull 9p changes from Eric Van Hensbergen:
    "A bunch of updates and cleanup within the transport layer,
    particularly with a focus on RDMA"

    * tag 'for-linus-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs:
    9pnet_rdma: check token type before int conversion
    9pnet: trans_fd : allocate struct p9_trans_fd and struct p9_conn together.
    9pnet: p9_client->conn field is unused. Remove it.
    9P: Get rid of REQ_STATUS_FLSH
    9pnet_rdma: add cancelled()
    9pnet_rdma: update request status during send
    9P: Add cancelled() to the transport functions.
    net: Mark function as static in 9p/client.c
    9P: Add memory barriers to protect request fields over cb/rpc threads handoff

    Linus Torvalds
     
  • Pull spi fixes from Mark Brown:
    "A few driver specific fixes, the main one being the fix for handling
    of complete callbacks that are open coded in individual drivers to
    allow callers to omit the completion. As we move things into the core
    that sort of issue should become less and less common"

    * tag 'spi-v3.15-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
    spi: qup: Depend on ARCH_QCOM
    spi: efm32: Update binding document to make "efm32,location" property optional
    spi: omap2-mcspi: Convert to use devm_kcalloc
    spi: Always check complete callback before calling it

    Linus Torvalds
     
  • Pull regulator fixes from Mark Brown:
    "A few driver specific fixes that have come in over the merge window,
    all only relevant for the specific driver"

    * tag 'regulator-v3.15-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
    regulator: bcm590xx: Set n_voltages for linear reg
    regulator: s5m8767: Fix carried over ena_gpio assignment
    regulator: s2mps11: Don't check enable_shift before setting enable ramp rate
    regulator: s2mpa01: Don't check enable_shift before setting enable ramp rate

    Linus Torvalds
     
  • Pull regmap fix from Mark Brown:
    "regmap: Fix for nodev mode

    Add mising braces so that the nodev mode actually works (which was a
    bit of an oversight)"

    Testing schmesting. We don't need not steenking testing. We have
    deadlines to beat, and new code to write.

    * tag 'regmap-v3.15-nodev' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
    regmap: adds missing braces in regmap_init()

    Linus Torvalds
     
  • Pull more ACPI and power management fixes and updates from Rafael Wysocki:
    "This is PM and ACPI material that has emerged over the last two weeks
    and one fix for a CPU hotplug regression introduced by the recent CPU
    hotplug notifiers registration series.

    Included are intel_idle and turbostat updates from Len Brown (these
    have been in linux-next for quite some time), a new cpufreq driver for
    powernv (that might spend some more time in linux-next, but BenH was
    asking me so nicely to push it for 3.15 that I couldn't resist), some
    cpufreq fixes and cleanups (including fixes for some silly breakage in
    a couple of cpufreq drivers introduced during the 3.14 cycle),
    assorted ACPI cleanups, wakeup framework documentation fixes, a new
    sysfs attribute for cpuidle and a new command line argument for power
    domains diagnostics.

    Specifics:

    - Fix for a recently introduced CPU hotplug regression in ARM KVM
    from Ming Lei.

    - Fixes for breakage in the at32ap, loongson2_cpufreq, and unicore32
    cpufreq drivers introduced during the 3.14 cycle (-stable material)
    from Chen Gang and Viresh Kumar.

    - New powernv cpufreq driver from Vaidyanathan Srinivasan, with bits
    from Gautham R Shenoy and Srivatsa S Bhat.

    - Exynos cpufreq driver fix preventing it from being included into
    multiplatform builds that aren't supported by it from Sachin Kamat.

    - cpufreq cleanups related to the usage of the driver_data field in
    struct cpufreq_frequency_table from Viresh Kumar.

    - cpufreq ppc driver cleanup from Sachin Kamat.

    - Intel BayTrail support for intel_idle and ACPI idle from Len Brown.

    - Intel CPU model 54 (Atom N2000 series) support for intel_idle from
    Jan Kiszka.

    - intel_idle fix for Intel Ivy Town residency targets from Len Brown.

    - turbostat updates (Intel Broadwell support and output cleanups)
    from Len Brown.

    - New cpuidle sysfs attribute for exporting C-states' target
    residency information to user space from Daniel Lezcano.

    - New kernel command line argument to prevent power domains enabled
    by the bootloader from being turned off even if they are not in use
    (for diagnostics purposes) from Tushar Behera.

    - Fixes for wakeup sysfs attributes documentation from Geert
    Uytterhoeven.

    - New ACPI video blacklist entry for ThinkPad Helix from Stephen
    Chandler Paul.

    - Assorted ACPI cleanups and a Kconfig help update from Jonghwan
    Choi, Zhihui Zhang, Hanjun Guo"

    * tag 'pm+acpi-3.15-rc1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (28 commits)
    ACPI: Update the ACPI spec information in Kconfig
    arm, kvm: fix double lock on cpu_add_remove_lock
    cpuidle: sysfs: Export target residency information
    cpufreq: ppc: Remove duplicate inclusion of fsl_soc.h
    cpufreq: create another field .flags in cpufreq_frequency_table
    cpufreq: use kzalloc() to allocate memory for cpufreq_frequency_table
    cpufreq: don't print value of .driver_data from core
    cpufreq: ia64: don't set .driver_data to index
    cpufreq: powernv: Select CPUFreq related Kconfig options for powernv
    cpufreq: powernv: Use cpufreq_frequency_table.driver_data to store pstate ids
    cpufreq: powernv: cpufreq driver for powernv platform
    cpufreq: at32ap: don't declare local variable as static
    cpufreq: loongson2_cpufreq: don't declare local variable as static
    cpufreq: unicore32: fix typo issue for 'clk'
    cpufreq: exynos: Disable on multiplatform build
    PM / wakeup: Correct presence vs. emptiness of wakeup_* attributes
    PM / domains: Add pd_ignore_unused to keep power domains enabled
    ACPI / dock: Drop dock_device_ids[] table
    ACPI / video: Favor native backlight interface for ThinkPad Helix
    ACPI / thermal: Fix wrong variable usage in debug statement
    ...

    Linus Torvalds
     
  • Pullx86 core platform updates from Peter Anvin:
    "This is the x86/platform branch with the objectionable IOSF patches
    removed.

    What is left is proper memory handling for Intel GPUs, and a change to
    the Calgary IOMMU code which will be required to make kexec work
    sanely on those platforms after some upcoming kexec changes"

    * 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86, calgary: Use 8M TCE table size by default
    x86/gpu: Print the Intel graphics stolen memory range
    x86/gpu: Add Intel graphics stolen memory quirk for gen2 platforms
    x86/gpu: Add vfunc for Intel graphics stolen memory base address

    Linus Torvalds
     
  • Pull x86 fixes from Peter Anvin:
    "This is a collection of minor fixes for x86, plus the IRET information
    leak fix (forbid the use of 16-bit segments in 64-bit mode)"

    NOTE! We may have to relax the "forbid the use of 16-bit segments in
    64-bit mode" part, since there may be people who still run and depend on
    16-bit Windows binaries under Wine.

    But I'm taking this in the current unconditional form for now to see who
    (if anybody) screams bloody murder. Maybe nobody cares. And maybe
    we'll have to update it with some kind of runtime enablement (like our
    vm.mmap_min_addr tunable that people who run dosemu/qemu/wine already
    need to tweak).

    * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86-64, modify_ldt: Ban 16-bit segments on 64-bit kernels
    efi: Pass correct file handle to efi_file_{read,close}
    x86/efi: Correct EFI boot stub use of code32_start
    x86/efi: Fix boot failure with EFI stub
    x86/platform/hyperv: Handle VMBUS driver being a module
    x86/apic: Reinstate error IRQ Pentium erratum 3AP workaround
    x86, CMCI: Add proper detection of end of CMCI storms

    Linus Torvalds
     
  • Pull second set of ARM changes from Russell King:
    "This is the remainder of the ARM changes for this merge window.
    Included in this request are:

    - fixes for kprobes for big-endian support
    - fix tracing in soft_restart
    - avoid phys address overflow in kdump code
    - fix reporting of read-only pmd bits in kernel page table dump
    - remove unnecessary (and possibly buggy) call to outer_flush_all()
    - fix a three sparse warnings (missing header file for function
    prototypes)
    - fix pj4 crashing single zImage (thanks to arm-soc merging changes
    which enables this with knowledge that the corresponding fix had
    not even been submitted for my tree before the merge window opened)
    - vfp macro cleanups
    - dump register state on undefined instruction userspace faults when
    debugging"

    * 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
    Dump the registers on undefined instruction userspace faults
    ARM: 8018/1: Add {inc,dec}_preempt_count asm macros
    ARM: 8017/1: Move asm macro get_thread_info to asm/assembler.h
    ARM: 8016/1: Check cpu id in pj4_cp0_init.
    ARM: 8015/1: Add cpu_is_pj4 to distinguish PJ4 because it has some differences with V7
    ARM: add missing system_misc.h include to process.c
    ARM: 8009/1: dcscb.c: remove call to outer_flush_all()
    ARM: 8014/1: mm: fix reporting of read-only PMD bits
    ARM: 8012/1: kdump: Avoid overflow when converting pfn to physaddr
    ARM: 8010/1: avoid tracers in soft_restart
    ARM: kprobes-test: Workaround GAS .align bug
    ARM: kprobes-test: use for Thumb instruction building
    ARM: kprobes-test: use for ARM instruction building
    ARM: kprobes-test: use for instruction accesses
    ARM: probes: fix instruction fetch order with

    Linus Torvalds
     
  • Pull Microblaze updates from Michal Simek:
    - use asm-generic/io.h and fix intc/timer code
    - clean platform handling
    - enable some syscalls

    * tag 'microblaze-3.15-rc1' of git://git.monstr.eu/linux-2.6-microblaze:
    microblaze: Use asm-generic/io.h
    microblaze: Remove platform folder
    microblaze: Remove generic platform
    microblaze: Sort Kconfig options
    microblaze: Move DTS file to common location at boot/dts folder
    microblaze: Fix compilation failure because of release_thread
    microblaze: Fix sparse warning because of missing cpu.h header
    microblaze: Make timer driver endian aware
    microblaze: Make intc driver endian aware
    microblaze: Wire-up new system calls sched_setattr/getattr
    microblaze: Wire-up preadv/pwritev in syscall table
    microblaze: Enable pselect6 syscall
    microblaze: Drop architecture-specific declaration of early_printk
    microblaze: Rename global function heartbeat()

    Linus Torvalds
     
  • The IRET instruction, when returning to a 16-bit segment, only
    restores the bottom 16 bits of the user space stack pointer. We have
    a software workaround for that ("espfix") for the 32-bit kernel, but
    it relies on a nonzero stack segment base which is not available in
    32-bit mode.

    Since 16-bit support is somewhat crippled anyway on a 64-bit kernel
    (no V86 mode), and most (if not quite all) 64-bit processors support
    virtualization for the users who really need it, simply reject
    attempts at creating a 16-bit segment when running on top of a 64-bit
    kernel.

    Cc: Linus Torvalds
    Signed-off-by: H. Peter Anvin
    Link: http://lkml.kernel.org/n/tip-kicdm89kzw9lldryb1br9od0@git.kernel.org
    Cc:

    H. Peter Anvin
     

11 Apr, 2014

24 commits

  • Russell King
     
  • Russell King
     
  • Signed-off-by: Russell King

    Russell King
     
  • fs/btrfs/scrub.c: In function 'get_raid56_logic_offset':
    fs/btrfs/scrub.c:2269: warning: comparison of distinct pointer types lacks a cast
    fs/btrfs/scrub.c:2269: warning: right shift count >= width of type
    fs/btrfs/scrub.c:2269: warning: passing argument 1 of '__div64_32' from incompatible pointer type

    Since @rot is an int type, we should not use do_div(), fix it.

    Reported-by: kbuild test robot
    Signed-off-by: Wang Shilong
    Signed-off-by: Chris Mason

    Wang Shilong
     
  • Pull EFI fixes from Matt Fleming:

    "* Fix EFI boot regression introduced during the merge window where the
    firmware was reading random values from the stack because we were
    passing a pointer to the wrong object type.

    * Kernel corruption has been reported when booting with the EFI boot
    stub which was tracked down to setting a bogus value for
    bp->hdr.code32_start, resulting in corruption during relocation.

    * Olivier Martin reported that the wrong file handles were being passed
    to efi_file_(read|close), which works for x86 by luck due to the way
    that the FAT driver is implemented, but doesn't work on ARM."

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • New kexec-tools wants to pass kdump kernel needed memmap via E820
    directly, instead of memmap=exactmap. This makes saved_max_pfn not
    be passed down to 2nd kernel. To keep 1st kernel and 2nd kernel using
    the same TCE table size, Muli suggest to hard code the size to max (8M).

    We can't get rid of saved_max_pfn this time, for backward compatibility
    with old first kernel and new second kernel. However new first kernel
    and old second kernel can not work unfortunately.

    v2->v1:
    - retain saved_max_pfn so new 2nd kernel can work with old 1st kernel
    from Vivek

    Signed-off-by: WANG Chao
    Acked-by: Vivek Goyal
    Acked-by: Muli Ben-Yehuda
    Acked-by: Jon Mason
    Link: http://lkml.kernel.org/r/1394463120-26999-1-git-send-email-chaowang@redhat.com
    Signed-off-by: H. Peter Anvin

    WANG Chao
     
  • …p2-mcspi' and 'spi/fix/qup' into spi-linus

    Mark Brown
     
  • spi: Updates for v3.15

    A busy release for both cleanups and new drivers this time along with
    further factoring out of replicated code into the core:

    - Provide support in the core for DMA mapping transfers - essentially
    all drivers weren't implementing this properly, now there's no
    excuse.
    - Dual and quad mode support for spidev.
    - Fix handling of cs_change in the generic implementation.
    - Remove the S3C_DMA code from the s3c64xx driver now that all the
    platforms using it have been converted to dmaengine.
    - Lots of improvements to the Renesas SPI controllers.
    - Drivers for Allwinner A10 and A31, Qualcomm QUP and Xylinx xtfpga.
    - Removal of the bitrotted ti-ssp driver.

    # gpg: Signature made Mon 31 Mar 2014 12:03:09 BST using RSA key ID 7EA229BD
    # gpg: Good signature from "Mark Brown "
    # gpg: aka "Mark Brown "
    # gpg: aka "Mark Brown "
    # gpg: aka "Mark Brown "
    # gpg: aka "Mark Brown "
    # gpg: aka "Mark Brown "

    Mark Brown
     
  • … 'regulator/fix/s5m8767' into regulator-linus

    Mark Brown
     
  • regulator: Updates for v3.15

    This release has lots and lots of small cleanups and fixes in the
    regulator subsystem, mainly cleaning up some bad patterns that got
    duplicated in DT code, but otherwise very little of note outside
    of the scope of the relevant drivers:

    - Support for configuration of the initial state for gpio regulators
    with multi-voltage support.
    - Support for calling regulator_set_voltage() on fixed regulators.
    - New drivers for Broadcom BCM590xx, Freescale pfuze200, Samsung S2MPA01 &
    S2MPS11/4, some PWM controlled regulators found on some ST boards and
    TI TPS65218.

    # gpg: Signature made Mon 31 Mar 2014 12:29:14 BST using RSA key ID 7EA229BD
    # gpg: Good signature from "Mark Brown "
    # gpg: aka "Mark Brown "
    # gpg: aka "Mark Brown "
    # gpg: aka "Mark Brown "
    # gpg: aka "Mark Brown "
    # gpg: aka "Mark Brown "

    Mark Brown
     
  • async_schedule() sd resume work to allow disks and other devices to
    resume in parallel.

    This moves the entirety of scsi_device resume to an async context to
    ensure that scsi_device_resume() remains ordered with respect to the
    completion of the start/stop command. For the duration of the resume,
    new command submissions (that do not originate from the scsi-core) will
    be deferred (BLKPREP_DEFER).

    It adds a new ASYNC_DOMAIN_EXCLUSIVE(scsi_sd_pm_domain) as a container
    of these operations. Like scsi_sd_probe_domain it is flushed at
    sd_remove() time to ensure async ops do not continue past the
    end-of-life of the sdev. The implementation explicitly refrains from
    reusing scsi_sd_probe_domain directly for this purpose as it is flushed
    at the end of dpm_resume(), potentially defeating some of the benefit.
    Given sdevs are quiesced it is permissible for these resume operations
    to bleed past the async_synchronize_full() calls made by the driver
    core.

    We defer the resolution of which pm callback to call until
    scsi_dev_type_{suspend|resume} time and guarantee that the callback
    parameter is never NULL. With this in place the type of resume
    operation is encoded in the async function identifier.

    There is a concern that async resume could trigger PSU overload. In the
    enterprise, storage enclosures enforce staggered spin-up regardless of
    what the kernel does making async scanning safe by default. Outside of
    that context a user can disable asynchronous scanning via a kernel
    command line or CONFIG_SCSI_SCAN_ASYNC. Honor that setting when
    deciding whether to do resume asynchronously.

    Inspired by Todd's analysis and initial proposal [2]:
    https://01.org/suspendresume/blogs/tebrandt/2013/hard-disk-resume-optimization-simpler-approach

    Cc: Len Brown
    Cc: Phillip Susi
    [alan: bug fix and clean up suggestion]
    Acked-by: Alan Stern
    Suggested-by: Todd Brandt
    [djbw: kick all resume work to the async queue]
    Signed-off-by: Dan Williams

    Dan Williams
     
  • Fix the macro used to define linear range regulators to include the
    number of voltages.

    Signed-off-by: Tim Kryger
    Acked-by: Matt Porter
    Signed-off-by: Mark Brown

    Tim Kryger
     
  • On systems with CONFIG_COMPAT we introduced the new requirement that
    audit_classify_compat_syscall() exists. This wasn't true for everything
    (apparently not for "tilegx", which I know less that nothing about.)

    Instead of wrapping the preprocessor optomization with CONFIG_COMPAT we
    should have used the new CONFIG_AUDIT_COMPAT_GENERIC. This patch uses
    that config option to make sure only arches which intend to implement
    this have the requirement.

    This works fine for tilegx according to Chris Metcalf
    Signed-off-by: Eric Paris

    Chris Metcalf
     
  • Pull exofs updates from Boaz Harrosh:
    "Trivial updates to exofs for 3.15-rc1

    Just a few fixes sent by people"

    * 'for-linus' of git://git.open-osd.org/linux-open-osd:
    MAINTAINERS: Update email address for bhalevy
    fs: Mark functions as static in exofs/ore_raid.c
    fs: Mark function as static in exofs/super.c

    Linus Torvalds
     
  • For commands returned with failed status, queue these for resubmission
    and continue retrying them until success or for a limited amount of
    time. The final timeout was arbitrarily chosen so requests can't be
    retried indefinitely.

    Since these are requeued on the nvmeq that submitted the command, the
    callbacks have to take an nvmeq instead of an nvme_dev as a parameter
    so that we can use the locked queue to append the iod to retry later.

    The nvme_iod conviently can be used to track how long we've been trying
    to successfully complete an iod request. The nvme_iod also provides the
    nvme prp dma mappings, so I had to move a few things around so we can
    keep those mappings.

    Signed-off-by: Keith Busch
    [fixed checkpatch issue with long line]
    Signed-off-by: Matthew Wilcox

    Keith Busch
     
  • Some programs require HDIO_GETGEO work, which requires we implement
    getgeo.

    Signed-off-by: Keith Busch
    Signed-off-by: Matthew Wilcox

    Keith Busch
     
  • Done to ensure nvme_thread is not running when there
    are no devices to poll.

    Signed-off-by: Dan McLeran
    Signed-off-by: Matthew Wilcox

    Dan McLeran
     
  • Increase the default timeout to 30 seconds to match SCSI.

    Signed-off-by: Keith Busch
    [use byte instead of ushort]
    Signed-off-by: Matthew Wilcox

    Keith Busch
     
  • Registers with hot cpu notification to rebalance, and potentially allocate
    additional, io queues.

    Signed-off-by: Keith Busch
    Signed-off-by: Matthew Wilcox

    Keith Busch
     
  • The device's IO queues are associated with CPUs, so we can use a per-cpu
    variable to map the a qid to a cpu. This provides a convienient way
    to optimally assign queues to multiple cpus when the device supports
    fewer queues than the host has cpus. The previous implementation may
    have assigned these poorly in these situations. This patch addresses
    this by sharing queues among cpus that are "close" together and should
    have a lower lock contention penalty.

    Signed-off-by: Keith Busch
    Signed-off-by: Matthew Wilcox

    Keith Busch
     
  • Given the following /etc/fstab entries:

    /dev/sda3 /mnt/foo btrfs subvol=foo,ro 0 0
    /dev/sda3 /mnt/bar btrfs subvol=bar,rw 0 0

    you can't issue:

    $ mount /mnt/foo
    $ mount /mnt/bar

    You would have to do:

    $ mount /mnt/foo
    $ mount -o remount,rw /mnt/foo
    $ mount --bind -o remount,ro /mnt/foo
    $ mount /mnt/bar

    or

    $ mount /mnt/bar
    $ mount --rw /mnt/foo
    $ mount --bind -o remount,ro /mnt/foo

    With this patch you can do

    $ mount /mnt/foo
    $ mount /mnt/bar

    $ cat /proc/self/mountinfo
    49 33 0:41 /foo /mnt/foo ro,relatime shared:36 - btrfs /dev/sda3 rw,ssd,space_cache
    87 33 0:41 /bar /mnt/bar rw,relatime shared:74 - btrfs /dev/sda3 rw,ssd,space_cache

    Signed-off-by: Chris Mason

    Harald Hoyer
     
  • We're currently passing the file handle for the root file system to
    efi_file_read() and efi_file_close(), instead of the file handle for the
    file we wish to read/close.

    While this has worked up until now, it seems that it has only been by
    pure luck. Olivier explains,

    "The issue is the UEFI Fat driver might return the same function for
    'fh->read()' and 'h->read()'. While in our case it does not work with
    a different implementation of EFI_SIMPLE_FILE_SYSTEM_PROTOCOL. In our
    case, we return a different pointer when reading a directory and
    reading a file."

    Fixing this actually clears up the two functions because we can drop one
    of the arguments, and instead only pass a file 'handle' argument.

    Reported-by: Olivier Martin
    Reviewed-by: Olivier Martin
    Reviewed-by: Mark Rutland
    Cc: Leif Lindholm
    Signed-off-by: Matt Fleming

    Matt Fleming
     
  • code32_start should point at the start of the protected mode code, and
    *not* at the beginning of the bzImage. This is much easier to do in
    assembly so document that callers of make_boot_params() need to fill out
    code32_start.

    The fallout from this bug is that we would end up relocating the image
    but copying the image at some offset, resulting in what appeared to be
    memory corruption.

    Reported-by: Thomas Bächler
    Signed-off-by: Matt Fleming

    Matt Fleming
     
  • commit 54b52d872680 ("x86/efi: Build our own EFI services pointer
    table") introduced a regression because the 64-bit file_size()
    implementation passed a pointer to a 32-bit data object, instead of a
    pointer to a 64-bit object.

    Because the firmware treats the object as 64-bits regardless it was
    reading random values from the stack for the upper 32-bits.

    This resulted in people being unable to boot their machines, after
    seeing the following error messages,

    Failed to get file info size
    Failed to alloc highmem for files

    Reported-by: Dzmitry Sledneu
    Reported-by: Koen Kooi
    Tested-by: Koen Kooi
    Signed-off-by: Matt Fleming

    Matt Fleming