1. 27 2月, 2014 1 次提交
    • P
      perf/x86: Fix event scheduling · 26e61e89
      Peter Zijlstra 提交于
      Vince "Super Tester" Weaver reported a new round of syscall fuzzing (Trinity) failures,
      with perf WARN_ON()s triggering. He also provided traces of the failures.
      
      This is I think the relevant bit:
      
      	>    pec_1076_warn-2804  [000] d...   147.926153: x86_pmu_disable: x86_pmu_disable
      	>    pec_1076_warn-2804  [000] d...   147.926153: x86_pmu_state: Events: {
      	>    pec_1076_warn-2804  [000] d...   147.926156: x86_pmu_state:   0: state: .R config: ffffffffffffffff (          (null))
      	>    pec_1076_warn-2804  [000] d...   147.926158: x86_pmu_state:   33: state: AR config: 0 (ffff88011ac99800)
      	>    pec_1076_warn-2804  [000] d...   147.926159: x86_pmu_state: }
      	>    pec_1076_warn-2804  [000] d...   147.926160: x86_pmu_state: n_events: 1, n_added: 0, n_txn: 1
      	>    pec_1076_warn-2804  [000] d...   147.926161: x86_pmu_state: Assignment: {
      	>    pec_1076_warn-2804  [000] d...   147.926162: x86_pmu_state:   0->33 tag: 1 config: 0 (ffff88011ac99800)
      	>    pec_1076_warn-2804  [000] d...   147.926163: x86_pmu_state: }
      	>    pec_1076_warn-2804  [000] d...   147.926166: collect_events: Adding event: 1 (ffff880119ec8800)
      
      So we add the insn:p event (fd[23]).
      
      At this point we should have:
      
        n_events = 2, n_added = 1, n_txn = 1
      
      	>    pec_1076_warn-2804  [000] d...   147.926170: collect_events: Adding event: 0 (ffff8800c9e01800)
      	>    pec_1076_warn-2804  [000] d...   147.926172: collect_events: Adding event: 4 (ffff8800cbab2c00)
      
      We try and add the {BP,cycles,br_insn} group (fd[3], fd[4], fd[15]).
      These events are 0:cycles and 4:br_insn, the BP event isn't x86_pmu so
      that's not visible.
      
      	group_sched_in()
      	  pmu->start_txn() /* nop - BP pmu */
      	  event_sched_in()
      	     event->pmu->add()
      
      So here we should end up with:
      
        0: n_events = 3, n_added = 2, n_txn = 2
        4: n_events = 4, n_added = 3, n_txn = 3
      
      But seeing the below state on x86_pmu_enable(), the must have failed,
      because the 0 and 4 events aren't there anymore.
      
      Looking at group_sched_in(), since the BP is the leader, its
      event_sched_in() must have succeeded, for otherwise we would not have
      seen the sibling adds.
      
      But since neither 0 or 4 are in the below state; their event_sched_in()
      must have failed; but I don't see why, the complete state: 0,0,1:p,4
      fits perfectly fine on a core2.
      
      However, since we try and schedule 4 it means the 0 event must have
      succeeded!  Therefore the 4 event must have failed, its failure will
      have put group_sched_in() into the fail path, which will call:
      
      	event_sched_out()
      	  event->pmu->del()
      
      on 0 and the BP event.
      
      Now x86_pmu_del() will reduce n_events; but it will not reduce n_added;
      giving what we see below:
      
       n_event = 2, n_added = 2, n_txn = 2
      
      	>    pec_1076_warn-2804  [000] d...   147.926177: x86_pmu_enable: x86_pmu_enable
      	>    pec_1076_warn-2804  [000] d...   147.926177: x86_pmu_state: Events: {
      	>    pec_1076_warn-2804  [000] d...   147.926179: x86_pmu_state:   0: state: .R config: ffffffffffffffff (          (null))
      	>    pec_1076_warn-2804  [000] d...   147.926181: x86_pmu_state:   33: state: AR config: 0 (ffff88011ac99800)
      	>    pec_1076_warn-2804  [000] d...   147.926182: x86_pmu_state: }
      	>    pec_1076_warn-2804  [000] d...   147.926184: x86_pmu_state: n_events: 2, n_added: 2, n_txn: 2
      	>    pec_1076_warn-2804  [000] d...   147.926184: x86_pmu_state: Assignment: {
      	>    pec_1076_warn-2804  [000] d...   147.926186: x86_pmu_state:   0->33 tag: 1 config: 0 (ffff88011ac99800)
      	>    pec_1076_warn-2804  [000] d...   147.926188: x86_pmu_state:   1->0 tag: 1 config: 1 (ffff880119ec8800)
      	>    pec_1076_warn-2804  [000] d...   147.926188: x86_pmu_state: }
      	>    pec_1076_warn-2804  [000] d...   147.926190: x86_pmu_enable: S0: hwc->idx: 33, hwc->last_cpu: 0, hwc->last_tag: 1 hwc->state: 0
      
      So the problem is that x86_pmu_del(), when called from a
      group_sched_in() that fails (for whatever reason), and without x86_pmu
      TXN support (because the leader is !x86_pmu), will corrupt the n_added
      state.
      Reported-and-Tested-by: NVince Weaver <vincent.weaver@maine.edu>
      Signed-off-by: NPeter Zijlstra <peterz@infradead.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Dave Jones <davej@redhat.com>
      Cc: <stable@vger.kernel.org>
      Link: http://lkml.kernel.org/r/20140221150312.GF3104@twins.programming.kicks-ass.netSigned-off-by: NIngo Molnar <mingo@kernel.org>
      26e61e89
  2. 26 2月, 2014 16 次提交
  3. 25 2月, 2014 1 次提交
  4. 24 2月, 2014 16 次提交
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · 335d08b8
      Linus Torvalds 提交于
      Pull s390 bug fixes from Martin Schwidefsky:
       "A couple of s390 bug fixes.  The PCI segment boundary issue is a nasty
        one as it can lead to data corruption"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390/cio: Fix missing subchannels after CHPID configure on
        s390/pci/dma: use correct segment boundary size
        s390/compat: fix sys_sched_getattr compat wrapper
        s390/zcrypt: additional check to avoid overflow in msg-type 6 requests
      335d08b8
    • C
      Merge tag 'xtensa-for-next-20140221-1' into for_next · b3fdfc1b
      Chris Zankel 提交于
      Xtensa fixes for 3.14:
      - allow booting xtfpga on boards with new uBoot and >128MBytes memory;
      - drop nonexistent GPIO32 support from fsf variant;
      - don't select USE_GENERIC_SMP_HELPERS;
      - enable common clock framework support, set up ethoc clock on xtfpga;
      - wire up sched_setattr and sched_getattr syscalls.
      Signed-off-by: NChris Zankel <chris@zankel.net>
      b3fdfc1b
    • J
    • L
      Linux 3.14-rc4 · cfbf8d48
      Linus Torvalds 提交于
      cfbf8d48
    • L
      Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 72673429
      Linus Torvalds 提交于
      Pull ARM SoC fixes from Olof Johansson:
       "A collection of fixes for ARM platforms.  Most are fixes for DTS
        files, mostly from DT conversion on OMAP which is still finding a few
        issues here and there.
      
        There's a couple of small stale code removal patches that we usually
        queue for the next release instead, but they seemed harmless enough to
        bring in now.
      
        Also, a fix for backlight on some PXA platforms, and a cache
        configuration fix for Tegra, etc"
      
      * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (25 commits)
        MAINTAINERS: add additional ARM BCM281xx/BCM11xxx maintainer
        ARM: tegra: only run PL310 init on systems with one
        ARM: tegra: Add head numbers to display controllers
        ARM: imx6: build pm-imx6q.c independently of CONFIG_PM
        ARM: tegra: fix RTC0 alias for Cardhu
        ARM: dove: dt: revert PMU interrupt controller node
        Documentation: dt: OMAP: Update Overo/Tobi
        ARM: dts: Add support for both OMAP35xx and OMAP36xx Overo/Tobi
        ARM: dts: omap3-tobi: Use the correct vendor prefix
        ARM: dts: omap3-tobi: Fix boot with OMAP36xx-based Overo
        ARM: OMAP2+: Remove legacy macros for zoom platforms
        ARM: OMAP2+: Remove MACH_NOKIA_N800
        ARM: dts: N900: add missing compatible property
        ARM: dts: N9/N950: fix boot hang with 3.14-rc1
        ARM: OMAP1: nokia770: enable tahvo-usb
        ARM: OMAP2+: gpmc: fix: DT ONENAND child nodes not probed when MTD_ONENAND is built as module
        ARM: OMAP2+: gpmc: fix: DT NAND child nodes not probed when MTD_NAND is built as module
        ARM: dts: omap3-gta04: Fix mmc1 properties.
        ARM: dts: omap3-gta04: Fix 'aux' gpio key flags.
        ARM: OMAP2+: add missing ARCH_HAS_OPP
        ...
      72673429
    • L
      Merge tag 'regulator-v3.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator · 24c85258
      Linus Torvalds 提交于
      Pull regulator fixes from Mark Brown:
       "Mostly unexciting driver fixes, plus one fix to lower the severity of
        the log message when we don't use an optional regulator - the fixes
        for ACPI system made this come up more often and it was correctly
        observed that it was causing undue concern for users"
      
      * tag 'regulator-v3.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
        regulator: max14577: Fix invalid return value on DT parse success
        regulator: core: Change dummy supplies error message to a warning
        regulator: s5m8767: Add missing of_node_put
        regulator: s5m8767: Use of_get_child_by_name
        regulator: da9063: Bug fix when setting max voltage on LDOs 5-11
      24c85258
    • P
      mtd: nand: omap: fix ecclayout->oobfree->length · bb38eefb
      Pekon Gupta 提交于
      This patch excludes reserved-marker byte-position from oobfree->length
      calculation. Thus all bytes from oobfree->offset till end of OOB are free.
      
      CC: <stable@vger.kernel.org> # 3.13.x+
      Signed-off-by: NPekon Gupta <pekon@ti.com>
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      bb38eefb
    • P
      mtd: nand: omap: fix ecclayout->oobfree->offset · aa6092f9
      Pekon Gupta 提交于
      1) In current implementation, ecclayout->oobfree->offset is calculated with
       respect to ecclayout->eccpos[0] which is incorrect because ECC bytes may not
       be stored contiguously in OOB.
       So, this patch calculates ecclayout->oobfree->offset with respect to last
       ECC byte-position 'eccpos[ecclayout->eccbytes-1]'.
      
      2) ECC layout of some ecc-schemes expects reserved-markers at specific eccpos[]
       which should not be over-written by any file-system metadata.
       So this patch aligns oobfree->offset taking into account of such markers.
      
      CC: <stable@vger.kernel.org> # 3.13.x+
      Tested-by: NEnric Balletbo i Serra <eballetbo@gmail.com>
      Tested-by: NStefan Roese <sr@denx.de>
      Signed-off-by: NPekon Gupta <pekon@ti.com>
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      aa6092f9
    • P
      mtd: nand: omap: fix ecclayout to be in sync with u-boot NAND driver · eae39cb4
      Pekon Gupta 提交于
      Fixes: commit a919e511
             mtd: nand: omap2: clean-up BCHx_HW and BCHx_SW ECC configurations in device_probe
      
      Fixes ecclayout mismatch introduced in above commit for following ecc-schemes:
       - OMAP_ECC_BCH4_CODE_HW_DETECTION_SW
       - OMAP_ECC_BCH8_CODE_HW_DETECTION_SW
       However, this patch also touches other ecc-schemes as the fix required
       refactoring common code, into ecc-scheme specific code.
      
      This patch aligns ecc-layout for below ecc-schemes as per reference [1],[2],[3]
      
       +---+------------+-------------++-------------+-------------+
       |OOB|BCH8_CODE_HW|BCH8_CODE_HW_||HAM1_CODE_HW |HAM1_CODE_HW |
       |pos|            | DETECTION_SW||(x8 device)  |(x16 device) |
       +---+------------+-------------++-------------+-------------+
       | 0 |BADBLK_MARK | BADBLK_MARK || BADBLK_MARK | BADBLK_MARK |
       | 1 |BADBLK_MARK | BADBLK_MARK || eccpos[0]   | BADBLK_MARK |
       | 2 | eccpos[0]  | eccpos[0]   || eccpos[1]   | eccpos[0]   |
       | 3 | eccpos[1]  | eccpos[1]   || eccpos[2]   | eccpos[1]   |
       | 4 | eccpos[2]  | eccpos[2]   || eccpos[3]   | eccpos[2]   |
       | 5 | eccpos[3]  | eccpos[3]   || eccpos[4]   | eccpos[3]   |
       | 6 | eccpos[4]  | eccpos[4]   || eccpos[5]   | eccpos[4]   |
       | 7 | eccpos[5]  | eccpos[5]   || eccpos[6]   | eccpos[5]   |
       | 8 | eccpos[6]  | eccpos[6]   || eccpos[7]   | eccpos[6]   |
       | 9 | eccpos[7]  | eccpos[7]   || eccpos[8]   | eccpos[7]   |
       |10 | eccpos[8]  | eccpos[8]   || eccpos[9]   | eccpos[8]   |
       |11 | eccpos[9]  | eccpos[9]   || eccpos[10]  | eccpos[9]   |
       |12 | eccpos[10] | eccpos[10]  || eccpos[11]  | eccpos[10]  |
       |13 | eccpos[11] | eccpos[11]  || oobfree[0]  | eccpos[11]  |
       |14 | eccpos[12] | eccpos[12]  || oobfree[1]  | oobfree[0]  |
       |15 | eccpos[13] | <reserved>  || oobfree[2]  | oobfree[1]  |
       +---+------------+-------------++-------------+-------------+
       |16 | eccpos[14] | eccpos[13]  || oobfree[3]  | oobfree[2]  |
       |...| [...]      | [...]       || [...]       | [...]       |
       |56 | eccpos[54] | eccpos[51]  || oobfree[43] | oobfree[42] |
       |57 | eccpos[55] | <reserved>  || oobfree[44] | oobfree[43] |
       +===+============+=============+==============+=============+
       |58 | oobfree[0] | oobfree[0]  || oobfree[45] | oobfree[44] |
       |59 | oobfree[1] | oobfree[1]  || oobfree[46] | oobfree[45] |
       |60 | oobfree[2] | oobfree[2]  || oobfree[47] | oobfree[46] |
       |61 | oobfree[3] | oobfree[3]  || oobfree[48] | oobfree[47] |
       |62 | oobfree[4] | oobfree[4]  || oobfree[49] | oobfree[48] |
       |63 | oobfree[5] | oobfree[5]  || oobfree[50] | oobfree[49] |
       +---+------------+-------------+--------------+-------------+
      
      [1] ecc-layout expected by ROM code, as specified in SoC TRM under:
            Chapter="Initialization"
              Section="Device Initialization by ROM code"
                  Sub-Section="Memory Booting"
                      Heading="NAND"
                      Figure="ECC Locations in NAND Spare Areas"
      
      [2] ecc-layout updates in u-boot
          http://lists.denx.de/pipermail/u-boot/2013-November/167551.html
      
      [3] u-boot configurations to match above ecc-layout are documented at
          https://processors.wiki.ti.com/index.php/Linux_Core_NAND_User%27s_Guide
      
      CC: <stable@vger.kernel.org> # 3.13.x+
      Reported-by: NEnric Balletbo Serra <eballetbo@iseebcn.com>
      Tested-by: NEnric Balletbo i Serra <eballetbo@gmail.com>
      Tested-by: NStefan Roese <sr@denx.de>
      Signed-off-by: NPekon Gupta <pekon@ti.com>
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      eae39cb4
    • L
      Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · b2880eb8
      Linus Torvalds 提交于
      Pull timer fix from Thomas Gleixner:
       "Serialize the registration of a new sched_clock in the currently ARM
        only generic sched_clock facilty to avoid sched_clock havoc"
      
      * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched_clock: Prevent callers from seeing half-updated data
      b2880eb8
    • L
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 208937fd
      Linus Torvalds 提交于
      Pull x86 fixes from Thomas Gleixner:
      
       - a bugfix which prevents a divide by 0 panic when the newly introduced
         try_msr_calibrate_tsc() fails
      
       - enablement of the Baytrail platform to utilize the newfangled msr
         based calibration
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86: tsc: Add missing Baytrail frequency to the table
        x86, tsc: Fallback to normal calibration if fast MSR calibration fails
      208937fd
    • L
      Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 5fe37fcf
      Linus Torvalds 提交于
      Pull irq fixes from Thomas Gleixner:
       "Another four fixlets to tame the ARM orion irq chip"
      
      * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        irqchip: orion: Fix getting generic chip pointer.
        irqchip: orion: clear stale interrupts in irq_startup
        irqchip: orion: use handle_edge_irq on bridge irqs
        irqchip: orion: clear bridge cause register on init
      5fe37fcf
    • L
      Merge tag 'usb-3.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · f9b08080
      Linus Torvalds 提交于
      Pull USB fixes from Greg KH:
       "Here are a number of USB fixes for reported issues for 3.14-rc4
      
        The majority of these are for USB gadget, phy, and musb driver issues.
        And there's a few new device ids thrown in for good measure"
      
      * tag 'usb-3.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        usb: chipidea: need to mask when writting endptflush and endptprime
        usb: musb: correct use of schedule_delayed_work()
        usb: phy: msm: fix compilation errors when !CONFIG_PM_SLEEP
        usb: gadget: fix NULL pointer dereference
        usb: gadget: printer: using gadget_is_otg to check otg support at runtime
        phy: let phy_provider_register be the last step in registering PHY
        phy-core: Don't allow building phy-core as a module
        phy-core: Don't propagate -ENOSUPP from phy_pm_runtime_get_sync to caller
        phy-core: phy_get: Leave error logging to the caller
        phy,phy-bcm-kona-usb2.c: Add dependency on HAS_IOMEM
        usb: musb: correct use of schedule_delayed_work()
        usb: musb: do not sleep in atomic context
        USB: serial: option: blacklist interface 4 for Cinterion PHS8 and PXS8
        USB: EHCI: add delay during suspend to prevent erroneous wakeups
        usb: gadget: bcm63xx_udc: fix build failure on DMA channel code
        usb: musb: do not sleep in atomic context
        usb: gadget: s3c2410_udc: Fix build error
        usb: musb: core: Fix remote-wakeup resume
        usb: musb: host: Fix SuperSpeed hub enumeration
        usb: musb: fix obex in g_nokia.ko causing kernel panic
      f9b08080
    • L
      Merge tag 'tty-3.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · e0f13bd4
      Linus Torvalds 提交于
      Pull TTY revert from Greg KH:
       "Here is a single commit, a revert of a sysfs file change that ended up
        breaking a userspace tool"
      
      * tag 'tty-3.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        Revert "tty: Set correct tty name in 'active' sysfs attribute"
      e0f13bd4
    • L
      Merge tag 'staging-3.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · b9c2b050
      Linus Torvalds 提交于
      Pull staging tree fix from Greg KH:
       "Here is a single android driver fix for 3.14-rc4 that fixes a reported
        problem in the binder driver"
      
      * tag 'staging-3.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
        staging: binder: Fix death notifications
      b9c2b050
    • L
      Merge tag 'char-misc-3.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · 78349043
      Linus Torvalds 提交于
      Pull char/misc fix from Greg KH:
       "Here is a single commit, to fix a reported problem in the mei driver"
      
      * tag 'char-misc-3.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        mei: set client's read_cb to NULL when flow control fails
      78349043
  5. 23 2月, 2014 6 次提交