1. 14 11月, 2017 1 次提交
  2. 03 11月, 2017 1 次提交
  3. 31 10月, 2017 1 次提交
  4. 30 10月, 2017 1 次提交
  5. 23 10月, 2017 11 次提交
  6. 11 10月, 2017 1 次提交
  7. 04 10月, 2017 1 次提交
  8. 03 10月, 2017 1 次提交
  9. 20 9月, 2017 1 次提交
  10. 19 9月, 2017 2 次提交
    • C
      ata: pata_artop: remove redundant initialization of pio · 01bb12e4
      Colin Ian King 提交于
      pio is initialized and the data is never read, instead it is almost
      immediately being updated to a new value. Fix this by removing the
      initialization.
      
      Detected by scan-build:
      "warning: Value stored to 'pio' during its initialization is never read"
      
      Fixes: 669a5db4 ("[libata] Add a bunch of PATA drivers")
      Signed-off-by: NColin Ian King <colin.king@canonical.com>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      01bb12e4
    • H
      libata: Add new med_power_with_dipm link_power_management_policy setting · f4ac6476
      Hans de Goede 提交于
      As described by Matthew Garret quite a while back:
      https://mjg59.dreamwidth.org/34868.html
      
      Intel CPUs starting with the Haswell generation need SATA links to power
      down for the "package" part of the CPU to reach low power-states like
      PC7 / P8 which bring a significant power-saving with them.
      
      The default max_performance lpm policy does not allow for these high
      PC states, both the medium_power and min_power policies do allow this.
      
      The min_power policy saves significantly more power, but there are some
      reports of some disks / SSDs not liking min_power leading to system
      crashes and in some cases even data corruption has been reported.
      
      Matthew has found a document documenting the default settings of
      Intel's IRST Windows driver with which most laptops ship:
      https://www-ssl.intel.com/content/dam/doc/reference-guide/sata-devices-implementation-recommendations.pdf
      
      Matthew wrote a patch changing med_power to match those defaults, but
      that never got anywhere as some people where reporting issues with the
      patch-set that patch was a part of.
      
      This commit is another attempt to make the default IRST driver settings
      available under Linux, but instead of changing medium_power and
      potentially introducing regressions, this commit adds a new
      med_power_with_dipm setting which is identical to the existing
      medium_power accept that it enables dipm on top, which makes it match
      the Windows IRST driver settings, which should hopefully be safe to
      use on most devices.
      
      The med_power_with_dipm setting is close to min_power, except that:
      a) It does not use host-initiated slumber mode (ASP not set),
         but it does allow device-initiated slumber
      b) It does not enable DevSlp mode
      
      On my T440s test laptop I get the following power savings when idle:
      medium_power		0.9W
      med_power_with_dipm	1.2W
      min_power		1.2W
      Suggested-by: NMatthew Garrett <mjg59@srcf.ucam.org>
      Cc: Matthew Garrett <mjg59@srcf.ucam.org>
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      f4ac6476
  11. 08 9月, 2017 10 次提交
    • A
      ata: avoid gcc-7 warning in ata_timing_quantize · 23e4c67a
      Arnd Bergmann 提交于
      gcc-7 warns about the result of a constant multiplication used as
      a boolean:
      
      drivers/ata/libata-core.c: In function 'ata_timing_quantize':
      drivers/ata/libata-core.c:3164:30: warning: '*' in boolean context, suggest '&&' instead [-Wint-in-bool-context]
      
      This slightly rearranges the macro to simplify the code and avoid
      the warning at the same time.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      23e4c67a
    • L
      Merge tag 'media/v4.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media · c0da4fa0
      Linus Torvalds 提交于
      Pull media updates from Mauro Carvalho Chehab:
       "Brazil's Independence Day pull request :-)
      
        This is one of the biggest media pull requests, with 625 patches
        affecting almost all parts of media (RC, DVB, V4L2, CEC, docs).
      
        This contains:
      
         - A lot of new drivers:
           * DVB frontends: mxl5xx, stv0910, stv6111;
           * camera flash: as3645a led driver;
           * HDMI receiver: adv748X;
           * camera sensor: Omnivision 6650 5M driver (ov6650);
           * HDMI CEC: ao-cec meson driver;
           * V4L2: Qualcom camss driver;
           * Remote controller: gpio-ir-tx, pwm-ir-tx and zx-irdec drivers.
      
         - The DDbridge DVB driver got a massive update, with makes it in sync
           with modern hardware from that vendor;
      
         - There's an important milestone on this series: the DVB
           documentation was written in 2003, but only started to be updated
           in 2007. It also used to contain several gaps from the time it was
           kept out of tree, mentioning error codes and device nodes that
           never existed upstream. On this series, it received a massive
           update: all non-deprecated digital TV APIs are now in sync with the
           current implementation;
      
         - Some DVB APIs that aren't used by any upstream driver got removed;
      
         - Other parts of the media documentation algo got updated, fixing
           some bugs on its PDF output and making it compatible with Sphinx
           version 1.6.
      
           As the number of hacks required to build PDF output reduced, I hope
           we'll have less troubles as newer versions of our documentation
           toolchain are released (famous last words);
      
         - As usual, lots of driver cleanups and improvements"
      
      * tag 'media/v4.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (624 commits)
        media: leds: as3645a: add V4L2_FLASH_LED_CLASS dependency
        media: get rid of removed DMX_GET_CAPS and DMX_SET_SOURCE leftovers
        media: Revert "[media] v4l: async: make v4l2 coexist with devicetree nodes in a dt overlay"
        media: staging: atomisp: sh_css_calloc shall return a pointer to the allocated space
        media: Revert "[media] lirc_dev: remove superfluous get/put_device() calls"
        media: add qcom_camss.rst to v4l-drivers rst file
        media: dvb headers: make checkpatch happier
        media: dvb uapi: move frontend legacy API to another part of the book
        media: pixfmt-srggb12p.rst: better format the table for PDF output
        media: docs-rst: media: Don't use \small for V4L2_PIX_FMT_SRGGB10 documentation
        media: index.rst: don't write "Contents:" on PDF output
        media: pixfmt*.rst: replace a two dots by a comma
        media: vidioc-g-fmt.rst: adjust table format
        media: vivid.rst: add a blank line to correct ReST format
        media: v4l2 uapi book: get rid of driver programming's chapter
        media: format.rst: use the right markup for important notes
        media: docs-rst: cardlists: change their format to flat-tables
        media: em28xx-cardlist.rst: update to reflect last changes
        media: v4l2-event.rst: adjust table to fit on PDF output
        media: docs: don't show ToC for each part on PDF output
        ...
      c0da4fa0
    • L
      Merge tag 'sound-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · d9694430
      Linus Torvalds 提交于
      Pull sound updates from Takashi Iwai:
       "We have touched quite a lot of files but with fewer changes at this
        cycle; as you can see, most of changes are trivial fixes, especially
        constification patches.
      
        Among the massive attacks by constification gangs, we had a few core
        changes (mostly for ASoC core), as well the fixes and the updates by
        major vendors.
      
        Some highlights:
      
        ALSA core:
      
         - Fix possible races in control API user-TLV codes
      
         - Small cleanup of PCM core
      
        ASoC:
      
         - Continued work for componentization; still half-baked, but we're
           certainly progressing
      
         - Use of devres for jack detection GPIOs, rather as a cleanup
      
         - Jack detection support for Qualcomm MSM8916
      
         - Support for Allwinner H3, Cirrus Logic CS43130, Intel Kabylake
           systems with RT5663, Realtek RT274, TI TLV320AIC32x6 and Wolfson
           WM8523"
      
      * tag 'sound-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (512 commits)
        ALSA: hda/ca0132 - Fix memory leak at error path
        ALSA: hda: Fix forget to free resource in error handling code path in hda_codec_driver_probe
        ASoC: cs43130: Fix unused compiler warnings for PM runtime
        ASoC: cs43130: Fix possible Oops with invalid dev_id
        ASoC: cs43130: fix spelling mistake: "irq_occurrance" -> "irq_occurrence"
        ALSA: atmel: Remove leftovers of AVR32 removal
        ALSA: atmel: convert AC97c driver to GPIO descriptor API
        ALSA: hda/realtek - Enable jack detection function for Intel ALC700
        ALSA: hda: Fix regression of hdmi eld control created based on invalid pcm
        ASoC: Intel: Skylake: Add IPC to configure the copier secondary pins
        ASoC: add missing compile rule for max98371
        ASoC: add missing compile rule for sirf-audio-codec
        ASoC: add missing compile rule for max98371
        ASoC: cs43130: Add devicetree bindings for CS43130
        ASoC: cs43130: Add support for CS43130 codec
        ASoC: make clock direction configurable in asoc-simple
        ALSA: ctxfi: Remove null check before kfree
        ASoC: max98927: Changed device property read function
        ASoC: max98927: Modified DAPM widget and map to enable/disable VI sense path
        ASoC: max98927: Added PM suspend and resume function
        ...
      d9694430
    • L
      Merge tag 'md/4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md · 3645e6d0
      Linus Torvalds 提交于
      Pull MD updates from Shaohua Li:
       "This update mainly fixes bugs:
      
         - Make raid5 ppl support several ppl from Pawel
      
         - Several raid5-cache bug fixes from Song
      
         - Bitmap fixes from Neil and Me
      
         - One raid1/10 regression fix since 4.12 from Me
      
         - Other small fixes and cleanup"
      
      * tag 'md/4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md:
        md/bitmap: disable bitmap_resize for file-backed bitmaps.
        raid5-ppl: Recovery support for multiple partial parity logs
        md: Runtime support for multiple ppls
        md/raid0: attach correct cgroup info in bio
        lib/raid6: align AVX512 constants to 512 bits, not bytes
        raid5: remove raid5_build_block
        md/r5cache: call mddev_lock/unlock() in r5c_journal_mode_show
        md: replace seq_release_private with seq_release
        md: notify about new spare disk in the container
        md/raid1/10: reset bio allocated from mempool
        md/raid5: release/flush io in raid5_do_work()
        md/bitmap: copy correct data for bitmap super
      3645e6d0
    • L
      Merge tag 'mmc-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc · 15d8ffc9
      Linus Torvalds 提交于
      Pull MMC updates from Ulf Hansson:
       "MMC core:
         - Continue to refactor the mmc block code to prepare for blkmq
         - Move mmc block debugfs into block module
         - Next step for eMMC CMDQ by adding a new mmc host interface for it
         - Move Kconfig option MMC_DEBUG from core to host
         - Some additional minor improvements
      
        MMC host:
         - Declare structs as const when applicable
         - Explicitly request exclusive reset control when applicable
         - Improve some error paths and other various cleanups
         - sdhci: Preparations to support SDHCI OMAP
         - sdhci: Improve some PM related code
         - sdhci: Re-factoring and modernizations
         - sdhci-xenon: Add runtime PM and system sleep support
         - sdhci-xenon: Add support for eMMC HS400 Enhanced Strobe
         - sdhci-cadence: Add system sleep support
         - sdhci-of-at91: Improve system sleep support
         - dw_mmc: Add support for Hisilicon hi3660
         - sunxi: Add support for A83T eMMC
         - sunxi: Add support for DDR52 mode
         - meson-gx: Add support for UHS-I SD-cards
         - meson-gx: Cleanups and improvements
         - tmio: Fix CMD12 (STOP) handling
         - tmio: Cleanups and improvements
         - renesas_sdhi: Add r8a7743/5 support
         - renesas-sdhi: Add support for R-Car Gen3 SDHI DMAC
         - renesas_sdhi: Cleanups and improvements"
      
      * tag 'mmc-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (145 commits)
        mmc: renesas_sdhi: Add r8a7743/5 support
        mmc: meson-gx: fix __ffsdi2 undefined on arm32
        mmc: sdhci-xenon: add runtime pm support and reimplement standby
        mmc: core: Move mmc_start_areq() declaration
        mmc: mmci: stop building qcom dml as module
        mmc: sunxi: Reset the device at probe time
        clk: sunxi-ng: Provide a default reset hook
        mmc: meson-gx: rework tuning function
        mmc: meson-gx: change default tx phase
        mmc: meson-gx: implement voltage switch callback
        mmc: meson-gx: use CCF to handle the clock phases
        mmc: meson-gx: implement card_busy callback
        mmc: meson-gx: simplify interrupt handler
        mmc: meson-gx: work around clk-stop issue
        mmc: meson-gx: fix dual data rate mode frequencies
        mmc: meson-gx: rework clock init function
        mmc: meson-gx: rework clk_set function
        mmc: meson-gx: rework set_ios function
        mmc: meson-gx: cfg init overwrite values
        mmc: meson-gx: initialize sane clk default before clock register
        ...
      15d8ffc9
    • L
      Merge branch 'for-4.14/block' of git://git.kernel.dk/linux-block · a0725ab0
      Linus Torvalds 提交于
      Pull block layer updates from Jens Axboe:
       "This is the first pull request for 4.14, containing most of the code
        changes. It's a quiet series this round, which I think we needed after
        the churn of the last few series. This contains:
      
         - Fix for a registration race in loop, from Anton Volkov.
      
         - Overflow complaint fix from Arnd for DAC960.
      
         - Series of drbd changes from the usual suspects.
      
         - Conversion of the stec/skd driver to blk-mq. From Bart.
      
         - A few BFQ improvements/fixes from Paolo.
      
         - CFQ improvement from Ritesh, allowing idling for group idle.
      
         - A few fixes found by Dan's smatch, courtesy of Dan.
      
         - A warning fixup for a race between changing the IO scheduler and
           device remova. From David Jeffery.
      
         - A few nbd fixes from Josef.
      
         - Support for cgroup info in blktrace, from Shaohua.
      
         - Also from Shaohua, new features in the null_blk driver to allow it
           to actually hold data, among other things.
      
         - Various corner cases and error handling fixes from Weiping Zhang.
      
         - Improvements to the IO stats tracking for blk-mq from me. Can
           drastically improve performance for fast devices and/or big
           machines.
      
         - Series from Christoph removing bi_bdev as being needed for IO
           submission, in preparation for nvme multipathing code.
      
         - Series from Bart, including various cleanups and fixes for switch
           fall through case complaints"
      
      * 'for-4.14/block' of git://git.kernel.dk/linux-block: (162 commits)
        kernfs: checking for IS_ERR() instead of NULL
        drbd: remove BIOSET_NEED_RESCUER flag from drbd_{md_,}io_bio_set
        drbd: Fix allyesconfig build, fix recent commit
        drbd: switch from kmalloc() to kmalloc_array()
        drbd: abort drbd_start_resync if there is no connection
        drbd: move global variables to drbd namespace and make some static
        drbd: rename "usermode_helper" to "drbd_usermode_helper"
        drbd: fix race between handshake and admin disconnect/down
        drbd: fix potential deadlock when trying to detach during handshake
        drbd: A single dot should be put into a sequence.
        drbd: fix rmmod cleanup, remove _all_ debugfs entries
        drbd: Use setup_timer() instead of init_timer() to simplify the code.
        drbd: fix potential get_ldev/put_ldev refcount imbalance during attach
        drbd: new disk-option disable-write-same
        drbd: Fix resource role for newly created resources in events2
        drbd: mark symbols static where possible
        drbd: Send P_NEG_ACK upon write error in protocol != C
        drbd: add explicit plugging when submitting batches
        drbd: change list_for_each_safe to while(list_first_entry_or_null)
        drbd: introduce drbd_recv_header_maybe_unplug
        ...
      a0725ab0
    • L
      Merge tag 'for-linus-4.14b-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · 3ee31b89
      Linus Torvalds 提交于
      Pull xen updates from Juergen Gross:
      
       - the new pvcalls backend for routing socket calls from a guest to dom0
      
       - some cleanups of Xen code
      
       - a fix for wrong usage of {get,put}_cpu()
      
      * tag 'for-linus-4.14b-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: (27 commits)
        xen/mmu: set MMU_NORMAL_PT_UPDATE in remap_area_mfn_pte_fn
        xen: Don't try to call xen_alloc_p2m_entry() on autotranslating guests
        xen/events: events_fifo: Don't use {get,put}_cpu() in xen_evtchn_fifo_init()
        xen/pvcalls: use WARN_ON(1) instead of __WARN()
        xen: remove not used trace functions
        xen: remove unused function xen_set_domain_pte()
        xen: remove tests for pvh mode in pure pv paths
        xen-platform: constify pci_device_id.
        xen: cleanup xen.h
        xen: introduce a Kconfig option to enable the pvcalls backend
        xen/pvcalls: implement write
        xen/pvcalls: implement read
        xen/pvcalls: implement the ioworker functions
        xen/pvcalls: disconnect and module_exit
        xen/pvcalls: implement release command
        xen/pvcalls: implement poll command
        xen/pvcalls: implement accept command
        xen/pvcalls: implement listen command
        xen/pvcalls: implement bind command
        xen/pvcalls: implement connect command
        ...
      3ee31b89
    • L
      Merge tag 'powerpc-4.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · bac65d9d
      Linus Torvalds 提交于
      Pull powerpc updates from Michael Ellerman:
       "Nothing really major this release, despite quite a lot of activity.
        Just lots of things all over the place.
      
        Some things of note include:
      
         - Access via perf to a new type of PMU (IMC) on Power9, which can
           count both core events as well as nest unit events (Memory
           controller etc).
      
         - Optimisations to the radix MMU TLB flushing, mostly to avoid
           unnecessary Page Walk Cache (PWC) flushes when the structure of the
           tree is not changing.
      
         - Reworks/cleanups of do_page_fault() to modernise it and bring it
           closer to other architectures where possible.
      
         - Rework of our page table walking so that THP updates only need to
           send IPIs to CPUs where the affected mm has run, rather than all
           CPUs.
      
         - The size of our vmalloc area is increased to 56T on 64-bit hash MMU
           systems. This avoids problems with the percpu allocator on systems
           with very sparse NUMA layouts.
      
         - STRICT_KERNEL_RWX support on PPC32.
      
         - A new sched domain topology for Power9, to capture the fact that
           pairs of cores may share an L2 cache.
      
         - Power9 support for VAS, which is a new mechanism for accessing
           coprocessors, and initial support for using it with the NX
           compression accelerator.
      
         - Major work on the instruction emulation support, adding support for
           many new instructions, and reworking it so it can be used to
           implement the emulation needed to fixup alignment faults.
      
         - Support for guests under PowerVM to use the Power9 XIVE interrupt
           controller.
      
        And probably that many things again that are almost as interesting,
        but I had to keep the list short. Plus the usual fixes and cleanups as
        always.
      
        Thanks to: Alexey Kardashevskiy, Alistair Popple, Andreas Schwab,
        Aneesh Kumar K.V, Anju T Sudhakar, Arvind Yadav, Balbir Singh,
        Benjamin Herrenschmidt, Bhumika Goyal, Breno Leitao, Bryant G. Ly,
        Christophe Leroy, Cédric Le Goater, Dan Carpenter, Dou Liyang,
        Frederic Barrat, Gautham R. Shenoy, Geliang Tang, Geoff Levand, Hannes
        Reinecke, Haren Myneni, Ivan Mikhaylov, John Allen, Julia Lawall,
        LABBE Corentin, Laurentiu Tudor, Madhavan Srinivasan, Markus Elfring,
        Masahiro Yamada, Matt Brown, Michael Neuling, Murilo Opsfelder Araujo,
        Nathan Fontenot, Naveen N. Rao, Nicholas Piggin, Oliver O'Halloran,
        Paul Mackerras, Rashmica Gupta, Rob Herring, Rui Teng, Sam Bobroff,
        Santosh Sivaraj, Scott Wood, Shilpasri G Bhat, Sukadev Bhattiprolu,
        Suraj Jitindar Singh, Tobin C. Harding, Victor Aoqui"
      
      * tag 'powerpc-4.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (321 commits)
        powerpc/xive: Fix section __init warning
        powerpc: Fix kernel crash in emulation of vector loads and stores
        powerpc/xive: improve debugging macros
        powerpc/xive: add XIVE Exploitation Mode to CAS
        powerpc/xive: introduce H_INT_ESB hcall
        powerpc/xive: add the HW IRQ number under xive_irq_data
        powerpc/xive: introduce xive_esb_write()
        powerpc/xive: rename xive_poke_esb() in xive_esb_read()
        powerpc/xive: guest exploitation of the XIVE interrupt controller
        powerpc/xive: introduce a common routine xive_queue_page_alloc()
        powerpc/sstep: Avoid used uninitialized error
        axonram: Return directly after a failed kzalloc() in axon_ram_probe()
        axonram: Improve a size determination in axon_ram_probe()
        axonram: Delete an error message for a failed memory allocation in axon_ram_probe()
        powerpc/powernv/npu: Move tlb flush before launching ATSD
        powerpc/macintosh: constify wf_sensor_ops structures
        powerpc/iommu: Use permission-specific DEVICE_ATTR variants
        powerpc/eeh: Delete an error out of memory message at init time
        powerpc/mm: Use seq_putc() in two functions
        macintosh: Convert to using %pOF instead of full_name
        ...
      bac65d9d
    • L
      Merge branch 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · f92e3da1
      Linus Torvalds 提交于
      Pull EFI updates from Ingo Molnar:
       "The main changes in this cycle were:
      
         - Transparently fall back to other poweroff method(s) if EFI poweroff
           fails (and returns)
      
         - Use separate PE/COFF section headers for the RX and RW parts of the
           ARM stub loader so that the firmware can use strict mapping
           permissions
      
         - Add support for requesting the firmware to wipe RAM at warm reboot
      
         - Increase the size of the random seed obtained from UEFI so CRNG
           fast init can complete earlier
      
         - Update the EFI framebuffer address if it points to a BAR that gets
           moved by the PCI resource allocation code
      
         - Enable "reset attack mitigation" of TPM environments: this is
           enabled if the kernel is configured with
           CONFIG_RESET_ATTACK_MITIGATION=y.
      
         - Clang related fixes
      
         - Misc cleanups, constification, refactoring, etc"
      
      * 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        efi/bgrt: Use efi_mem_type()
        efi: Move efi_mem_type() to common code
        efi/reboot: Make function pointer orig_pm_power_off static
        efi/random: Increase size of firmware supplied randomness
        efi/libstub: Enable reset attack mitigation
        firmware/efi/esrt: Constify attribute_group structures
        firmware/efi: Constify attribute_group structures
        firmware/dcdbas: Constify attribute_group structures
        arm/efi: Split zImage code and data into separate PE/COFF sections
        arm/efi: Replace open coded constants with symbolic ones
        arm/efi: Remove pointless dummy .reloc section
        arm/efi: Remove forbidden values from the PE/COFF header
        drivers/fbdev/efifb: Allow BAR to be moved instead of claiming it
        efi/reboot: Fall back to original power-off method if EFI_RESET_SHUTDOWN returns
        efi/arm/arm64: Add missing assignment of efi.config_table
        efi/libstub/arm64: Set -fpie when building the EFI stub
        efi/libstub/arm64: Force 'hidden' visibility for section markers
        efi/libstub/arm64: Use hidden attribute for struct screen_info reference
        efi/arm: Don't mark ACPI reclaim memory as MEMBLOCK_NOMAP
      f92e3da1
    • L
      Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 57e88b43
      Linus Torvalds 提交于
      Pull x86 platform updates from Ingo Molnar:
       "The main changes include various Hyper-V optimizations such as faster
        hypercalls and faster/better TLB flushes - and there's also some
        Intel-MID cleanups"
      
      * 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        tracing/hyper-v: Trace hyperv_mmu_flush_tlb_others()
        x86/hyper-v: Support extended CPU ranges for TLB flush hypercalls
        x86/platform/intel-mid: Make several arrays static, to make code smaller
        MAINTAINERS: Add missed file for Hyper-V
        x86/hyper-v: Use hypercall for remote TLB flush
        hyper-v: Globalize vp_index
        x86/hyper-v: Implement rep hypercalls
        hyper-v: Use fast hypercall for HVCALL_SIGNAL_EVENT
        x86/hyper-v: Introduce fast hypercall implementation
        x86/hyper-v: Make hv_do_hypercall() inline
        x86/hyper-v: Include hyperv/ only when CONFIG_HYPERV is set
        x86/platform/intel-mid: Make 'bt_sfi_data' const
        x86/platform/intel-mid: Make IRQ allocation a bit more flexible
        x86/platform/intel-mid: Group timers callbacks together
      57e88b43
  12. 07 9月, 2017 9 次提交
    • L
      Merge branch 'for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata · 3b9f8ed2
      Linus Torvalds 提交于
      Pull libata updates from Tejun Heo:
       "Except for the ahci fix that fixes a boot issue, nothing major in this
        pull request. Some new platform controller support and device specific
        changes"
      
      * 'for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata:
        libata: zpodd: make arrays cdb static, reduces object code size
        ahci: don't use MSI for devices with the silly Intel NVMe remapping scheme
        dt-bindings: ata: add DT bindings for MediaTek SATA controller
        ata: mediatek: add support for MediaTek SATA controller
        pata_octeon_cf: use of_property_read_{bool|u32}()
        cs5536: add support for IDE controller variant
        ata: sata_gemini: Introduce explicit IDE pin control
        ata: sata_gemini: Retire custom pin control
        ata: ahci_platform: Add shutdown handler
        ata: sata_gemini: explicitly request exclusive reset control
        ata: Drop unnecessary static
        ata: Convert to using %pOF instead of full_name
      3b9f8ed2
    • L
      Merge branch 'for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup · 608c1d3c
      Linus Torvalds 提交于
      Pull cgroup updates from Tejun Heo:
       "Several notable changes this cycle:
      
         - Thread mode was merged. This will be used for cgroup2 support for
           CPU and possibly other controllers. Unfortunately, CPU controller
           cgroup2 support didn't make this pull request but most contentions
           have been resolved and the support is likely to be merged before
           the next merge window.
      
         - cgroup.stat now shows the number of descendant cgroups.
      
         - cpuset now can enable the easier-to-configure v2 behavior on v1
           hierarchy"
      
      * 'for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: (21 commits)
        cpuset: Allow v2 behavior in v1 cgroup
        cgroup: Add mount flag to enable cpuset to use v2 behavior in v1 cgroup
        cgroup: remove unneeded checks
        cgroup: misc changes
        cgroup: short-circuit cset_cgroup_from_root() on the default hierarchy
        cgroup: re-use the parent pointer in cgroup_destroy_locked()
        cgroup: add cgroup.stat interface with basic hierarchy stats
        cgroup: implement hierarchy limits
        cgroup: keep track of number of descent cgroups
        cgroup: add comment to cgroup_enable_threaded()
        cgroup: remove unnecessary empty check when enabling threaded mode
        cgroup: update debug controller to print out thread mode information
        cgroup: implement cgroup v2 thread support
        cgroup: implement CSS_TASK_ITER_THREADED
        cgroup: introduce cgroup->dom_cgrp and threaded css_set handling
        cgroup: add @flags to css_task_iter_start() and implement CSS_TASK_ITER_PROCS
        cgroup: reorganize cgroup.procs / task write path
        cgroup: replace css_set walking populated test with testing cgrp->nr_populated_csets
        cgroup: distinguish local and children populated states
        cgroup: remove now unused list_head @pending in cgroup_apply_cftypes()
        ...
      608c1d3c
    • L
      Merge branch 'for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq · 9954d489
      Linus Torvalds 提交于
      Pull workqueue updates from Tejun Heo:
       "Nothing major. I introduced a flag collsion bug during v4.13 cycle
        which is fixed in this pull request. Fortunately, the flag is for
        debugging / verification and the bug isn't critical"
      
      * 'for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
        workqueue: Fix flag collision
        workqueue: Use TASK_IDLE
        workqueue: fix path to documentation
        workqueue: doc change for ST behavior on NUMA systems
      9954d489
    • L
      Merge branch 'for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu · a7cbfd05
      Linus Torvalds 提交于
      Pull percpu updates from Tejun Heo:
       "A lot of changes for percpu this time around. percpu inherited the
        same area allocator from the original pre-virtual-address-mapped
        implementation. This was from the time when percpu allocator wasn't
        used all that much and the implementation was focused on simplicity,
        with the unfortunate computational complexity of O(number of areas
        allocated from the chunk) per alloc / free.
      
        With the increase in percpu usage, we're hitting cases where the lack
        of scalability is hurting. The most prominent one right now is bpf
        perpcu map creation / destruction which may allocate and free a lot of
        entries consecutively and it's likely that the problem will become
        more prominent in the future.
      
        To address the issue, Dennis replaced the area allocator with hinted
        bitmap allocator which is more consistent. While the new allocator
        does perform a bit worse in some cases, it outperforms the old
        allocator way more than an order of magnitude in other more common
        scenarios while staying mostly flat in CPU overhead and completely
        flat in memory consumption"
      
      * 'for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu: (27 commits)
        percpu: update header to contain bitmap allocator explanation.
        percpu: update pcpu_find_block_fit to use an iterator
        percpu: use metadata blocks to update the chunk contig hint
        percpu: update free path to take advantage of contig hints
        percpu: update alloc path to only scan if contig hints are broken
        percpu: keep track of the best offset for contig hints
        percpu: skip chunks if the alloc does not fit in the contig hint
        percpu: add first_bit to keep track of the first free in the bitmap
        percpu: introduce bitmap metadata blocks
        percpu: replace area map allocator with bitmap
        percpu: generalize bitmap (un)populated iterators
        percpu: increase minimum percpu allocation size and align first regions
        percpu: introduce nr_empty_pop_pages to help empty page accounting
        percpu: change the number of pages marked in the first_chunk pop bitmap
        percpu: combine percpu address checks
        percpu: modify base_addr to be region specific
        percpu: setup_first_chunk rename schunk/dchunk to chunk
        percpu: end chunk area maps page aligned for the populated bitmap
        percpu: unify allocation of schunk and dchunk
        percpu: setup_first_chunk remove dyn_size and consolidate logic
        ...
      a7cbfd05
    • L
      Merge branch 'akpm' (patches from Andrew) · d34fc1ad
      Linus Torvalds 提交于
      Merge updates from Andrew Morton:
      
       - various misc bits
      
       - DAX updates
      
       - OCFS2
      
       - most of MM
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (119 commits)
        mm,fork: introduce MADV_WIPEONFORK
        x86,mpx: make mpx depend on x86-64 to free up VMA flag
        mm: add /proc/pid/smaps_rollup
        mm: hugetlb: clear target sub-page last when clearing huge page
        mm: oom: let oom_reap_task and exit_mmap run concurrently
        swap: choose swap device according to numa node
        mm: replace TIF_MEMDIE checks by tsk_is_oom_victim
        mm, oom: do not rely on TIF_MEMDIE for memory reserves access
        z3fold: use per-cpu unbuddied lists
        mm, swap: don't use VMA based swap readahead if HDD is used as swap
        mm, swap: add sysfs interface for VMA based swap readahead
        mm, swap: VMA based swap readahead
        mm, swap: fix swap readahead marking
        mm, swap: add swap readahead hit statistics
        mm/vmalloc.c: don't reinvent the wheel but use existing llist API
        mm/vmstat.c: fix wrong comment
        selftests/memfd: add memfd_create hugetlbfs selftest
        mm/shmem: add hugetlbfs support to memfd_create()
        mm, devm_memremap_pages: use multi-order radix for ZONE_DEVICE lookups
        mm/vmalloc.c: halve the number of comparisons performed in pcpu_get_vm_areas()
        ...
      d34fc1ad
    • A
      x86/mm: Document how CR4.PCIDE restore works · 1c9fe440
      Andy Lutomirski 提交于
      While debugging a problem, I thought that using
      cr4_set_bits_and_update_boot() to restore CR4.PCIDE would be
      helpful.  It turns out to be counterproductive.
      
      Add a comment documenting how this works.
      Signed-off-by: NAndy Lutomirski <luto@kernel.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1c9fe440
    • A
      x86/mm: Reinitialize TLB state on hotplug and resume · 72c0098d
      Andy Lutomirski 提交于
      When Linux brings a CPU down and back up, it switches to init_mm and then
      loads swapper_pg_dir into CR3.  With PCID enabled, this has the side effect
      of masking off the ASID bits in CR3.
      
      This can result in some confusion in the TLB handling code.  If we
      bring a CPU down and back up with any ASID other than 0, we end up
      with the wrong ASID active on the CPU after resume.  This could
      cause our internal state to become corrupt, although major
      corruption is unlikely because init_mm doesn't have any user pages.
      More obviously, if CONFIG_DEBUG_VM=y, we'll trip over an assertion
      in the next context switch.  The result of *that* is a failure to
      resume from suspend with probability 1 - 1/6^(cpus-1).
      
      Fix it by reinitializing cpu_tlbstate on resume and CPU bringup.
      Reported-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Reported-by: NJiri Kosina <jikos@kernel.org>
      Fixes: 10af6235 ("x86/mm: Implement PCID based optimization: try to preserve old TLB entries using PCID")
      Signed-off-by: NAndy Lutomirski <luto@kernel.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      72c0098d
    • R
      mm,fork: introduce MADV_WIPEONFORK · d2cd9ede
      Rik van Riel 提交于
      Introduce MADV_WIPEONFORK semantics, which result in a VMA being empty
      in the child process after fork.  This differs from MADV_DONTFORK in one
      important way.
      
      If a child process accesses memory that was MADV_WIPEONFORK, it will get
      zeroes.  The address ranges are still valid, they are just empty.
      
      If a child process accesses memory that was MADV_DONTFORK, it will get a
      segmentation fault, since those address ranges are no longer valid in
      the child after fork.
      
      Since MADV_DONTFORK also seems to be used to allow very large programs
      to fork in systems with strict memory overcommit restrictions, changing
      the semantics of MADV_DONTFORK might break existing programs.
      
      MADV_WIPEONFORK only works on private, anonymous VMAs.
      
      The use case is libraries that store or cache information, and want to
      know that they need to regenerate it in the child process after fork.
      
      Examples of this would be:
       - systemd/pulseaudio API checks (fail after fork) (replacing a getpid
         check, which is too slow without a PID cache)
       - PKCS#11 API reinitialization check (mandated by specification)
       - glibc's upcoming PRNG (reseed after fork)
       - OpenSSL PRNG (reseed after fork)
      
      The security benefits of a forking server having a re-inialized PRNG in
      every child process are pretty obvious.  However, due to libraries
      having all kinds of internal state, and programs getting compiled with
      many different versions of each library, it is unreasonable to expect
      calling programs to re-initialize everything manually after fork.
      
      A further complication is the proliferation of clone flags, programs
      bypassing glibc's functions to call clone directly, and programs calling
      unshare, causing the glibc pthread_atfork hook to not get called.
      
      It would be better to have the kernel take care of this automatically.
      
      The patch also adds MADV_KEEPONFORK, to undo the effects of a prior
      MADV_WIPEONFORK.
      
      This is similar to the OpenBSD minherit syscall with MAP_INHERIT_ZERO:
      
          https://man.openbsd.org/minherit.2
      
      [akpm@linux-foundation.org: numerically order arch/parisc/include/uapi/asm/mman.h #defines]
      Link: http://lkml.kernel.org/r/20170811212829.29186-3-riel@redhat.comSigned-off-by: NRik van Riel <riel@redhat.com>
      Reported-by: NFlorian Weimer <fweimer@redhat.com>
      Reported-by: NColm MacCártaigh <colm@allcosts.net>
      Reviewed-by: NMike Kravetz <mike.kravetz@oracle.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: "Kirill A. Shutemov" <kirill@shutemov.name>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Dave Hansen <dave.hansen@intel.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Helge Deller <deller@gmx.de>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Will Drewry <wad@chromium.org>
      Cc: <linux-api@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d2cd9ede
    • R
      x86,mpx: make mpx depend on x86-64 to free up VMA flag · df3735c5
      Rik van Riel 提交于
      Patch series "mm,fork,security: introduce MADV_WIPEONFORK", v4.
      
      If a child process accesses memory that was MADV_WIPEONFORK, it will get
      zeroes.  The address ranges are still valid, they are just empty.
      
      If a child process accesses memory that was MADV_DONTFORK, it will get a
      segmentation fault, since those address ranges are no longer valid in
      the child after fork.
      
      Since MADV_DONTFORK also seems to be used to allow very large programs
      to fork in systems with strict memory overcommit restrictions, changing
      the semantics of MADV_DONTFORK might break existing programs.
      
      The use case is libraries that store or cache information, and want to
      know that they need to regenerate it in the child process after fork.
      
      Examples of this would be:
       - systemd/pulseaudio API checks (fail after fork) (replacing a getpid
         check, which is too slow without a PID cache)
       - PKCS#11 API reinitialization check (mandated by specification)
       - glibc's upcoming PRNG (reseed after fork)
       - OpenSSL PRNG (reseed after fork)
      
      The security benefits of a forking server having a re-inialized PRNG in
      every child process are pretty obvious.  However, due to libraries
      having all kinds of internal state, and programs getting compiled with
      many different versions of each library, it is unreasonable to expect
      calling programs to re-initialize everything manually after fork.
      
      A further complication is the proliferation of clone flags, programs
      bypassing glibc's functions to call clone directly, and programs calling
      unshare, causing the glibc pthread_atfork hook to not get called.
      
      It would be better to have the kernel take care of this automatically.
      
      The patchset also adds MADV_KEEPONFORK, to undo the effects of a prior
      MADV_WIPEONFORK.
      
      This is similar to the OpenBSD minherit syscall with MAP_INHERIT_ZERO:
      
          https://man.openbsd.org/minherit.2
      
      This patch (of 2):
      
      MPX only seems to be available on 64 bit CPUs, starting with Skylake and
      Goldmont.  Move VM_MPX into the 64 bit only portion of vma->vm_flags, in
      order to free up a VMA flag.
      
      Link: http://lkml.kernel.org/r/20170811212829.29186-2-riel@redhat.comSigned-off-by: NRik van Riel <riel@redhat.com>
      Acked-by: NDave Hansen <dave.hansen@intel.com>
      Cc: Mike Kravetz <mike.kravetz@oracle.com>
      Cc: Florian Weimer <fweimer@redhat.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Will Drewry <wad@chromium.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: "Kirill A. Shutemov" <kirill@shutemov.name>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: Colm MacCártaigh <colm@allcosts.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      df3735c5