1. 01 Mar, 2014 1 commit
  2. 28 Feb, 2014 1 commit
    • Jiri Olsa's avatar
      perf tools: Fix strict alias issue for find_first_bit · b39c2a57
      Jiri Olsa authored
      When compiling perf tool code with gcc 4.4.7 I'm getting
      following error:
      
          CC       util/session.o
        cc1: warnings being treated as errors
        util/session.c: In function ‘perf_session_deliver_event’:
        tools/perf/util/include/linux/bitops.h:109: error: dereferencing pointer ‘p’ does break strict-aliasing rules
        tools/perf/util/include/linux/bitops.h:101: error: dereferencing pointer ‘p’ does break strict-aliasing rules
        util/session.c:697: note: initialized from here
        tools/perf/util/include/linux/bitops.h:101: note: initialized from here
        make[1]: *** [util/session.o] Error 1
        make: *** [util/session.o] Error 2
      
      The aliased types here are u64 and unsigned long pointers, which is safe
      for the find_first_bit processing.
      
      This error shows up for me only for gcc 4.4 on 32bit x86, even for
      -Wstrict-aliasing=3, while newer gcc are quiet and scream here for
      -Wstrict-aliasing={2,1}. Looks like newer gcc changed the rules for
      strict alias warnings.
      
      The gcc documentation offers workaround for valid aliasing by using
      __may_alias__ attribute:
      
        http://gcc.gnu.org/onlinedocs/gcc-4.4.0/gcc/Type-Attributes.html
      
      Using this workaround for the find_first_bit function.
      Signed-off-by: default avatarJiri Olsa <jolsa@redhat.com>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1393434867-20271-1-git-send-email-jolsa@redhat.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      b39c2a57
  3. 27 Feb, 2014 4 commits
    • Andi Kleen's avatar
      perf tools: fix BFD detection on opensuse · 280e7c48
      Andi Kleen authored
      opensuse libbfd requires -lz -liberty to build. Add those to the BFD
      feature detection.
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      Acked-by: default avatarDavid Ahern <dsahern@gmail.com>
      Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: http://lkml.kernel.org/r/1389469379-13340-2-git-send-email-andi@firstfloor.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      280e7c48
    • Ingo Molnar's avatar
      Merge tag 'perf-urgent-for-mingo' of... · b6e53f32
      Ingo Molnar authored
      Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
      
      Pull perf/urgent fixes from Arnaldo Carvalho de Melo:
      
        * Fix annotation on stdio/GTK+ interfaces (Namhyung Kim)
      
        * Fix file descriptor leaking while searching DSOs for suitable symtab (Namhyung Kim).
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      b6e53f32
    • Peter Zijlstra's avatar
      perf: Fix hotplug splat · e3703f8c
      Peter Zijlstra authored
      Drew Richardson reported that he could make the kernel go *boom* when hotplugging
      while having perf events active.
      
      It turned out that when you have a group event, the code in
      __perf_event_exit_context() fails to remove the group siblings from
      the context.
      
      We then proceed with destroying and freeing the event, and when you
      re-plug the CPU and try and add another event to that CPU, things go
      *boom* because you've still got dead entries there.
      Reported-by: default avatarDrew Richardson <drew.richardson@arm.com>
      Signed-off-by: default avatarPeter Zijlstra <peterz@infradead.org>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: <stable@vger.kernel.org>
      Link: http://lkml.kernel.org/n/tip-k6v5wundvusvcseqj1si0oz0@git.kernel.orgSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      e3703f8c
    • Peter Zijlstra's avatar
      perf/x86: Fix event scheduling · 26e61e89
      Peter Zijlstra authored
      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: default avatarVince Weaver <vincent.weaver@maine.edu>
      Signed-off-by: default avatarPeter 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: default avatarIngo Molnar <mingo@kernel.org>
      26e61e89
  4. 25 Feb, 2014 16 commits
  5. 24 Feb, 2014 9 commits
  6. 23 Feb, 2014 9 commits
    • Pekon Gupta's avatar
      mtd: nand: omap: fix ecclayout->oobfree->length · bb38eefb
      Pekon Gupta authored
      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: default avatarPekon Gupta <pekon@ti.com>
      Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
      bb38eefb
    • Pekon Gupta's avatar
      mtd: nand: omap: fix ecclayout->oobfree->offset · aa6092f9
      Pekon Gupta authored
      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: default avatarEnric Balletbo i Serra <eballetbo@gmail.com>
      Tested-by: default avatarStefan Roese <sr@denx.de>
      Signed-off-by: default avatarPekon Gupta <pekon@ti.com>
      Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
      aa6092f9
    • Pekon Gupta's avatar
      mtd: nand: omap: fix ecclayout to be in sync with u-boot NAND driver · eae39cb4
      Pekon Gupta authored
      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: default avatarEnric Balletbo Serra <eballetbo@iseebcn.com>
      Tested-by: default avatarEnric Balletbo i Serra <eballetbo@gmail.com>
      Tested-by: default avatarStefan Roese <sr@denx.de>
      Signed-off-by: default avatarPekon Gupta <pekon@ti.com>
      Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
      eae39cb4
    • Linus Torvalds's avatar
      Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · b2880eb8
      Linus Torvalds authored
      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
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 208937fd
      Linus Torvalds authored
      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
    • Linus Torvalds's avatar
      Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 5fe37fcf
      Linus Torvalds authored
      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
    • Linus Torvalds's avatar
      Merge tag 'usb-3.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · f9b08080
      Linus Torvalds authored
      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
    • Linus Torvalds's avatar
      Merge tag 'tty-3.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · e0f13bd4
      Linus Torvalds authored
      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
    • Linus Torvalds's avatar
      Merge tag 'staging-3.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · b9c2b050
      Linus Torvalds authored
      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