1. 20 1月, 2017 7 次提交
    • L
      Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 44b4b461
      Linus Torvalds 提交于
      Pull ARM SoC fixes from Olof Johansson:
       "We've been sitting on fixes for a while, and they keep trickling in at
        a low rate. Nothing in here comes across as particularly scary or
        noteworthy, for the most part it's a large collection of small DT
        tweaks"
      
      * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (24 commits)
        ARM: dts: da850-evm: fix read access to SPI flash
        ARM: dts: omap3: Fix Card Detect and Write Protect on Logic PD SOM-LV
        ARM64: dts: meson-gxbb-odroidc2: Disable SCPI DVFS
        ARM: dts: OMAP5 / DRA7: indicate that SATA port 0 is available.
        ARM: dts: NSP: Fix DT ranges error
        ARM: multi_v7_defconfig: set bcm47xx watchdog
        ARM: multi_v7_defconfig: fix config typo
        ARM: dts: dra72-evm-revc: fix typo in ethernet-phy node
        soc: ti: wkup_m3_ipc: Fix error return code in wkup_m3_ipc_probe()
        ARM: ux500: fix prcmu_is_cpu_in_wfi() calculation
        ARM: dts: sunxi: Change node name for pwrseq pin on Olinuxino-lime2-emmc
        ARM: dts: sun8i: Support DTB build for NanoPi M1
        ARM: dts: sun6i: hummingbird: Enable display engine again
        ARM: dts: sun6i: Disable display pipeline by default
        ARM, ARM64: dts: drop "arm,amba-bus" in favor of "simple-bus" part 3
        ARM: dts: imx6qdl-nitrogen6_som2: fix sgtl5000 pinctrl init
        ARM: dts: imx6qdl-nitrogen6_max: fix sgtl5000 pinctrl init
        ARM: OMAP1: DMA: Correct the number of logical channels
        ARM: dts: am335x-icev2: Remove the duplicated pinmux setting
        ARM: OMAP2+: Fix WL1283 Bluetooth Baud Rate
        ...
      44b4b461
    • L
      Merge tag 'xfs-for-linux-4.10-rc5-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux · 6e0362b3
      Linus Torvalds 提交于
      Pull xfs fixes from Darrick Wong:
       "I have a few more patches this week -- one to make the behavior of a
        quota id ioctl consistent with the other filesystems, and the rest
        improve validation of i_mode & i_size values coming into xfs so that
        we don't read off the ends of arrays or crash when handed garbage disk
        data.
      
        Summary:
         - inode i_mode sanitization
         - prevent overflows in getnextquota
         - minor build fixes"
      
      * tag 'xfs-for-linux-4.10-rc5-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
        xfs: fix xfs_mode_to_ftype() prototype
        xfs: don't wrap ID in xfs_dq_get_next_id
        xfs: sanity check inode di_mode
        xfs: sanity check inode mode when creating new dentry
        xfs: replace xfs_mode_to_ftype table with switch statement
        xfs: add missing include dependencies to xfs_dir2.h
        xfs: sanity check directory inode di_size
        xfs: make the ASSERT() condition likely
      6e0362b3
    • F
      ARM: dts: da850-evm: fix read access to SPI flash · 43849785
      Fabien Parent 提交于
      Read access to the SPI flash are broken on da850-evm, i.e. the data
      read is not what is actually programmed on the flash.
      According to the datasheet for the M25P64 part present on the da850-evm,
      if the SPI frequency is higher than 20MHz then the READ command is not
      usable anymore and only the FAST_READ command can be used to read data.
      
      This commit specifies in the DTS that we should use FAST_READ command
      instead of the READ command.
      
      Cc: stable@vger.kernel.org
      Tested-by: NKevin Hilman <khilman@baylibre.com>
      Signed-off-by: NFabien Parent <fparent@baylibre.com>
      [nsekhar@ti.com: subject line adjustment]
      Signed-off-by: NSekhar Nori <nsekhar@ti.com>
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      43849785
    • L
      Merge tag 'pci-v4.10-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci · 81aaeaac
      Linus Torvalds 提交于
      Pull PCI fixes from Bjorn Helgaas:
      
       - recognize that a PCI-to-PCIe bridge originates a PCIe hierarchy, so
         we enumerate that hierarchy correctly
      
       - X-Gene: fix a change merged for v4.10 that broke MSI
      
       - Keystone: avoid reading undefined registers, which can cause
         asynchronous external aborts
      
       - Supermicro X8DTH-i/6/iF/6F: ignore broken _CRS that caused us to
         change (and break) existing I/O port assignments
      
      * tag 'pci-v4.10-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
        PCI/MSI: pci-xgene-msi: Fix CPU hotplug registration handling
        PCI: Enumerate switches below PCI-to-PCIe bridges
        x86/PCI: Ignore _CRS on Supermicro X8DTH-i/6/iF/6F
        PCI: designware: Check for iATU unroll only on platforms that use ATU
      81aaeaac
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid · 2ed5e5af
      Linus Torvalds 提交于
      Pull HID fixes from Jiri Kosina:
      
       - regression fix for generic Wacom devices, from Jason Gerecke
      
       - DMA-on-stack fixes for hid-corsair driver, from Johan Hovold
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
        HID: wacom: Fix sibling detection regression
        HID: corsair: fix control-transfer error handling
        HID: corsair: fix DMA buffers on stack
      2ed5e5af
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · 4a1cc2e8
      Linus Torvalds 提交于
      Pull two s390 bug fixes from Martin Schwidefsky:
       "Two changes, the first is a fix to add a missing memory clobber to the
        inline assembly to load control registers. This has not caused any
        issues so far, but who knows what code gcc will generate in future
        versions.
      
        The second change is an update for the default configurations. This
        includes CONFIG_BUG_ON_DATA_CORRUPTION=y, we want this to be enabled
        for s390. The usual approach to debug problems on production systems
        is to use crash on a system dump and for us avoiding data corruptions
        is priority one"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390: update defconfigs
        s390/ctl_reg: make __ctl_load a full memory barrier
      4a1cc2e8
    • L
      Merge tag 'for-linus-4.10-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · 08667577
      Linus Torvalds 提交于
      Pull xen fix from Juergen Gross:
       "A fix for Xen running in nested virtualization environment"
      
      * tag 'for-linus-4.10-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        partially revert "xen: Remove event channel notification through Xen PCI platform device"
      08667577
  2. 19 1月, 2017 9 次提交
    • J
      HID: wacom: Fix sibling detection regression · a9ce7856
      Jason Gerecke 提交于
      Commit 345857bb ("HID: wacom: generic: Add support for sensor offsets") included
      a change to the operation and location of the call to 'wacom_add_shared_data'
      in 'wacom_parse_and_register'. The modifications included moving it higher up
      so that it would occur before the call to 'wacom_retrieve_hid_descriptor'. This
      was done to prevent a crash that would have occured when the report containing
      tablet offsets was fed into the driver with 'wacom_hid_report_raw_event'
      (specifically: the various 'wacom_wac_*_report' functions were written with the
      assumption that they would only be called once tablet setup had completed;
      'wacom_wac_pen_report' in particular dereferences 'shared' which wasn't yet
      allocated).
      
      Moving the call to 'wacom_add_shared_data' effectively prevented the crash but
      also broke the sibiling detection code which assumes that the HID descriptor
      has been read and the various device_type flags set.
      
      To fix this situation, we restore the original 'wacom_add_shared_data'
      operation and location and instead implement an alternative change that can
      also prevent the crash. Specifically, we notice that the report functions
      mentioned above expect to be called only for input reports.  By adding a check,
      we can prevent feature reports (such as the offset report) from
      causing trouble.
      
      Fixes: 345857bb ("HID: wacom: generic: Add support for sensor offsets")
      Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com>
      Tested-by: NPing Cheng <pingc@wacom.com>
      Reviewed-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      a9ce7856
    • O
      Merge tag 'omap-for-v4.10/fixes-rc4' of... · e47a8b17
      Olof Johansson 提交于
      Merge tag 'omap-for-v4.10/fixes-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes
      
      Fixes for omaps for v4.10-rc cycle. Mostly a DMA regression fix for
      omap1, and then a handful of trivial fixes for boards and devices to
      work:
      
      - Fixes TI wilink bluetooth strange platform data baud rate
      - Remove duplicate pinmux line for am335x-icev2
      - Fix omap1 dma regression
      - Fix uninitialized return value for wkup_m3_ipc_probe()
      - Fix Ethernet PHY binding typo for dra72-evm
      - Fix init for omap5 and dra7 sata ports
      - Fix mmc card detect pin for Logic PD SOM-LV
      
      * tag 'omap-for-v4.10/fixes-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
        ARM: dts: omap3: Fix Card Detect and Write Protect on Logic PD SOM-LV
        ARM: dts: OMAP5 / DRA7: indicate that SATA port 0 is available.
        ARM: dts: dra72-evm-revc: fix typo in ethernet-phy node
        soc: ti: wkup_m3_ipc: Fix error return code in wkup_m3_ipc_probe()
        ARM: OMAP1: DMA: Correct the number of logical channels
        ARM: dts: am335x-icev2: Remove the duplicated pinmux setting
        ARM: OMAP2+: Fix WL1283 Bluetooth Baud Rate
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      e47a8b17
    • L
      Merge tag 'upstream-4.10-rc5' of git://git.infradead.org/linux-ubifs · fb1d8e0e
      Linus Torvalds 提交于
      Pull UBIFS fixes from Richard Weinberger:
       "This contains fixes for UBIFS:
      
         - a long standing issue in UBIFS journal replay code
      
         - fallout from the merge window"
      
      * tag 'upstream-4.10-rc5' of git://git.infradead.org/linux-ubifs:
        ubifs: Fix journal replay wrt. xattr nodes
        ubifs: remove redundant checks for encryption key
        ubifs: allow encryption ioctls in compat mode
        ubifs: add CONFIG_BLOCK dependency for encryption
        ubifs: fix unencrypted journal write
        ubifs: ensure zero err is returned on successful return
      fb1d8e0e
    • A
      xfs: fix xfs_mode_to_ftype() prototype · fd29f7af
      Arnd Bergmann 提交于
      A harmless warning just got introduced:
      
      fs/xfs/libxfs/xfs_dir2.h:40:8: error: type qualifiers ignored on function return type [-Werror=ignored-qualifiers]
      
      Removing the 'const' modifier avoids the warning and has no
      other effect.
      
      Fixes: 1fc4d33f ("xfs: replace xfs_mode_to_ftype table with switch statement")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NDarrick J. Wong <darrick.wong@oracle.com>
      Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
      fd29f7af
    • L
      Merge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm · fa19a769
      Linus Torvalds 提交于
      Pull ARM fixes from Russell King:
       "A few ARM fixes:
      
         - fix a crash while performing TLB maintanence on early ARM SMP cores
      
         - blacklist Scorpion CPUs for hardware breakpoints
      
         - ARMs asm/types.h has been included as part of the UAPI due to the
           way the makefiles work, move it to uapi/asm/types.h to make it
           official
      
         - fix up ftrace syscall name matching"
      
      * 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm:
        ARM: 8613/1: Fix the uaccess crash on PB11MPCore
        MAINTAINERS: update rmk's entries
        ARM: put types.h in uapi
        ARM: 8634/1: hw_breakpoint: blacklist Scorpion CPUs
        ARM: 8632/1: ftrace: fix syscall name matching
      fa19a769
    • L
      Merge branch 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · ca92e6c7
      Linus Torvalds 提交于
      Pull SMP hotplug update from Thomas Gleixner:
       "This contains a trivial typo fix and an extension to the core code for
        dynamically allocating states in the prepare stage.
      
        The extension is necessary right now because we need a proper way to
        unbreak LTTNG, which iscurrently non functional due to the removal of
        the notifiers. Surely it's out of tree, but it's widely used by
        distros.
      
        The simple solution would have been to reserve a state for LTTNG, but
        I'm not fond about unused crap in the kernel and the dynamic range,
        which we admittedly should have done right away, allows us to remove
        quite some of the hardcoded states, i.e. those which have no ordering
        requirements. So doing the right thing now is better than having an
        smaller intermediate solution which needs to be reworked anyway"
      
      * 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        cpu/hotplug: Provide dynamic range for prepare stage
        perf/x86/amd/ibs: Fix typo after cleanup state names in cpu/hotplug
      ca92e6c7
    • L
      Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 0b75f821
      Linus Torvalds 提交于
      Pull timer fix from Ingo Molnar:
       "Fix a crash in the ARM-Exynos clocksource driver, triggered by CPU
        hotplug operations"
      
      * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        clocksource/exynos_mct: Clear interrupt when cpu is shut down
      0b75f821
    • L
      Merge branch 'rcu-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 49b550fe
      Linus Torvalds 提交于
      Pull RCU fixes from Ingo Molnar:
       "This fixes sporadic ACPI related hangs in synchronize_rcu() that were
        caused by the ACPI code mistakenly relying on an aspect of RCU that
        was neither promised to work nor reliable but which happened to work -
        until in v4.9 we changed the RCU implementation, which made the hangs
        more prominent.
      
        Since the mis-use of the RCU facility wasn't properly detected and
        prevented either, these fixes make the RCU side work reliably instead
        of working around the problem in the ACPI code.
      
        Hence the slightly larger diffstat that goes beyond the normal scope
        of RCU fixes in -rc kernels"
      
      * 'rcu-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        rcu: Narrow early boot window of illegal synchronous grace periods
        rcu: Remove cond_resched() from Tiny synchronize_sched()
      49b550fe
    • L
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 9da96f99
      Linus Torvalds 提交于
      Pull perf fixes from Ingo Molnar:
       "An Intel PMU driver hotplug fix and three 'perf probe' tooling fixes"
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf/x86/intel: Handle exclusive threadid correctly on CPU hotplug
        perf probe: Fix to probe on gcc generated functions in modules
        perf probe: Add error checks to offline probe post-processing
        perf probe: Fix to show correct locations for events on modules
      9da96f99
  3. 18 1月, 2017 16 次提交
  4. 17 1月, 2017 8 次提交
    • M
      PCI/MSI: pci-xgene-msi: Fix CPU hotplug registration handling · 4d191b1b
      Marc Zyngier 提交于
      The conversion to the new hotplug state machine introduced a regression
      where a successful hotplug registration would be treated as an error,
      effectively disabling the MSI driver forever.
      
      Fix it by doing the proper check on the return value.
      
      Fixes: 9c248f88 ("PCI/xgene-msi: Convert to hotplug state machine")
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Acked-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Tested-by: NDuc Dang <dhdang@apm.com>
      CC: Thomas Gleixner <tglx@linutronix.de>
      CC: stable@vger.kernel.org
      4d191b1b
    • R
      ubifs: Fix journal replay wrt. xattr nodes · 1cb51a15
      Richard Weinberger 提交于
      When replaying the journal it can happen that a journal entry points to
      a garbage collected node.
      This is the case when a power-cut occurred between a garbage collect run
      and a commit. In such a case nodes have to be read using the failable
      read functions to detect whether the found node matches what we expect.
      
      One corner case was forgotten, when the journal contains an entry to
      remove an inode all xattrs have to be removed too. UBIFS models xattr
      like directory entries, so the TNC code iterates over
      all xattrs of the inode and removes them too. This code re-uses the
      functions for walking directories and calls ubifs_tnc_next_ent().
      ubifs_tnc_next_ent() expects to be used only after the journal and
      aborts when a node does not match the expected result. This behavior can
      render an UBIFS volume unmountable after a power-cut when xattrs are
      used.
      
      Fix this issue by using failable read functions in ubifs_tnc_next_ent()
      too when replaying the journal.
      Cc: stable@vger.kernel.org
      Fixes: 1e51764a ("UBIFS: add new flash file system")
      Reported-by: NRock Lee <rockdotlee@gmail.com>
      Reviewed-by: NDavid Gstir <david@sigma-star.at>
      Signed-off-by: NRichard Weinberger <richard@nod.at>
      1cb51a15
    • E
      ubifs: remove redundant checks for encryption key · 3d4b2fcb
      Eric Biggers 提交于
      In several places, ubifs checked for an encryption key before creating a
      file in an encrypted directory.  This was redundant with
      fscrypt_setup_filename() or ubifs_new_inode(), and in the case of
      ubifs_link() it broke linking to special files.  So remove the extra
      checks.
      Signed-off-by: NEric Biggers <ebiggers@google.com>
      Signed-off-by: NRichard Weinberger <richard@nod.at>
      3d4b2fcb
    • E
      ubifs: allow encryption ioctls in compat mode · a75467d9
      Eric Biggers 提交于
      The ubifs encryption ioctls did not work when called by a 32-bit program
      on a 64-bit kernel.  Since 'struct fscrypt_policy' is not affected by
      the word size, ubifs just needs to allow these ioctls through, like what
      ext4 and f2fs do.
      Signed-off-by: NEric Biggers <ebiggers@google.com>
      Signed-off-by: NRichard Weinberger <richard@nod.at>
      a75467d9
    • A
      ubifs: add CONFIG_BLOCK dependency for encryption · 404e0b63
      Arnd Bergmann 提交于
      This came up during the v4.10 merge window:
      
      warning: (UBIFS_FS_ENCRYPTION) selects FS_ENCRYPTION which has unmet direct dependencies (BLOCK)
      fs/crypto/crypto.c: In function 'fscrypt_zeroout_range':
      fs/crypto/crypto.c:355:9: error: implicit declaration of function 'bio_alloc';did you mean 'd_alloc'? [-Werror=implicit-function-declaration]
         bio = bio_alloc(GFP_NOWAIT, 1);
      
      The easiest way out is to limit UBIFS_FS_ENCRYPTION to configurations
      that also enable BLOCK.
      
      Fixes: d475a507 ("ubifs: Add skeleton for fscrypto")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NRichard Weinberger <richard@nod.at>
      404e0b63
    • P
      ubifs: fix unencrypted journal write · 507502ad
      Peter Rosin 提交于
      Without this, I get the following on reboot:
      
      UBIFS error (ubi1:0 pid 703): ubifs_load_znode: bad target node (type 1) length (8240)
      UBIFS error (ubi1:0 pid 703): ubifs_load_znode: have to be in range of 48-4144
      UBIFS error (ubi1:0 pid 703): ubifs_load_znode: bad indexing node at LEB 13:11080, error 5
       magic          0x6101831
       crc            0xb1cb246f
       node_type      9 (indexing node)
       group_type     0 (no node group)
       sqnum          546
       len            128
       child_cnt      5
       level          0
       Branches:
       0: LEB 14:72088 len 161 key (133, inode)
       1: LEB 14:81120 len 160 key (134, inode)
       2: LEB 20:26624 len 8240 key (134, data, 0)
       3: LEB 14:81280 len 160 key (135, inode)
       4: LEB 20:34864 len 8240 key (135, data, 0)
      UBIFS warning (ubi1:0 pid 703): ubifs_ro_mode.part.0: switched to read-only mode, error -22
      CPU: 0 PID: 703 Comm: mount Not tainted 4.9.0-next-20161213+ #1197
      Hardware name: Atmel SAMA5
      [<c010d2ac>] (unwind_backtrace) from [<c010b250>] (show_stack+0x10/0x14)
      [<c010b250>] (show_stack) from [<c024df94>] (ubifs_jnl_update+0x2e8/0x614)
      [<c024df94>] (ubifs_jnl_update) from [<c0254bf8>] (ubifs_mkdir+0x160/0x204)
      [<c0254bf8>] (ubifs_mkdir) from [<c01a6030>] (vfs_mkdir+0xb0/0x104)
      [<c01a6030>] (vfs_mkdir) from [<c0286070>] (ovl_create_real+0x118/0x248)
      [<c0286070>] (ovl_create_real) from [<c0283ed4>] (ovl_fill_super+0x994/0xaf4)
      [<c0283ed4>] (ovl_fill_super) from [<c019c394>] (mount_nodev+0x44/0x9c)
      [<c019c394>] (mount_nodev) from [<c019c4ac>] (mount_fs+0x14/0xa4)
      [<c019c4ac>] (mount_fs) from [<c01b5338>] (vfs_kern_mount+0x4c/0xd4)
      [<c01b5338>] (vfs_kern_mount) from [<c01b6b80>] (do_mount+0x154/0xac8)
      [<c01b6b80>] (do_mount) from [<c01b782c>] (SyS_mount+0x74/0x9c)
      [<c01b782c>] (SyS_mount) from [<c0107f80>] (ret_fast_syscall+0x0/0x3c)
      UBIFS error (ubi1:0 pid 703): ubifs_mkdir: cannot create directory, error -22
      overlayfs: failed to create directory /mnt/ovl/work/work (errno: 22); mounting read-only
      
      Fixes: 7799953b ("ubifs: Implement encrypt/decrypt for all IO")
      Signed-off-by: NPeter Rosin <peda@axentia.se>
      Tested-by: NKevin Hilman <khilman@baylibre.com>
      Signed-off-by: NRichard Weinberger <richard@nod.at>
      507502ad
    • C
      ubifs: ensure zero err is returned on successful return · e8f19746
      Colin Ian King 提交于
      err is no longer being set on a successful return path, causing
      a garbage value being returned. Fix this by setting err to zero
      for the successful return path.
      
      Found with static analysis by CoverityScan, CID 1389473
      
      Fixes: 7799953b ("ubifs: Implement encrypt/decrypt for all IO")
      Signed-off-by: NColin Ian King <colin.king@canonical.com>
      Signed-off-by: NRichard Weinberger <richard@nod.at>
      e8f19746
    • Z
      perf/x86/intel: Handle exclusive threadid correctly on CPU hotplug · 4e71de79
      Zhou Chengming 提交于
      The CPU hotplug function intel_pmu_cpu_starting() sets
      cpu_hw_events.excl_thread_id unconditionally to 1 when the shared exclusive
      counters data structure is already availabe for the sibling thread.
      
      This works during the boot process because the first sibling gets threadid
      0 assigned and the second sibling which shares the data structure gets 1.
      
      But when the first thread of the core is offlined and onlined again it
      shares the data structure with the second thread and gets exclusive thread
      id 1 assigned as well.
      
      Prevent this by checking the threadid of the already online thread.
      
      [ tglx: Rewrote changelog ]
      Signed-off-by: NZhou Chengming <zhouchengming1@huawei.com>
      Cc: NuoHan Qiao <qiaonuohan@huawei.com>
      Cc: ak@linux.intel.com
      Cc: peterz@infradead.org
      Cc: kan.liang@intel.com
      Cc: dave.hansen@linux.intel.com
      Cc: eranian@google.com
      Cc: qiaonuohan@huawei.com
      Cc: davidcc@google.com
      Cc: guohanjun@huawei.com
      Link: http://lkml.kernel.org/r/1484536871-3131-1-git-send-email-zhouchengming1@huawei.comSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      ---					---
       arch/x86/events/intel/core.c |    7 +++++--
       1 file changed, 5 insertions(+), 2 deletions(-)
      4e71de79