1. 22 8月, 2013 1 次提交
    • V
      ARM: timer-sp: Set dynamic irq affinity · 887708f0
      Viresh Kumar 提交于
      When a cpu goes to a deep idle state where its local timer is shutdown, it
      notifies the time frame work to use the broadcast timer instead.
      
      Unfortunately, the broadcast device could wake up any CPU, including an idle one
      which is not concerned by the wake up at all.
      
      This implies, in the worst case, an idle CPU will wake up to send an IPI to
      another idle cpu.
      
      This patch fixes this for ARM platforms using timer-sp, by setting
      CLOCK_EVT_FEAT_DYNIRQ feature.
      Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
      887708f0
  2. 16 8月, 2013 1 次提交
    • L
      Fix TLB gather virtual address range invalidation corner cases · 2b047252
      Linus Torvalds 提交于
      Ben Tebulin reported:
      
       "Since v3.7.2 on two independent machines a very specific Git
        repository fails in 9/10 cases on git-fsck due to an SHA1/memory
        failures.  This only occurs on a very specific repository and can be
        reproduced stably on two independent laptops.  Git mailing list ran
        out of ideas and for me this looks like some very exotic kernel issue"
      
      and bisected the failure to the backport of commit 53a59fc6 ("mm:
      limit mmu_gather batching to fix soft lockups on !CONFIG_PREEMPT").
      
      That commit itself is not actually buggy, but what it does is to make it
      much more likely to hit the partial TLB invalidation case, since it
      introduces a new case in tlb_next_batch() that previously only ever
      happened when running out of memory.
      
      The real bug is that the TLB gather virtual memory range setup is subtly
      buggered.  It was introduced in commit 597e1c35 ("mm/mmu_gather:
      enable tlb flush range in generic mmu_gather"), and the range handling
      was already fixed at least once in commit e6c495a9 ("mm: fix the TLB
      range flushed when __tlb_remove_page() runs out of slots"), but that fix
      was not complete.
      
      The problem with the TLB gather virtual address range is that it isn't
      set up by the initial tlb_gather_mmu() initialization (which didn't get
      the TLB range information), but it is set up ad-hoc later by the
      functions that actually flush the TLB.  And so any such case that forgot
      to update the TLB range entries would potentially miss TLB invalidates.
      
      Rather than try to figure out exactly which particular ad-hoc range
      setup was missing (I personally suspect it's the hugetlb case in
      zap_huge_pmd(), which didn't have the same logic as zap_pte_range()
      did), this patch just gets rid of the problem at the source: make the
      TLB range information available to tlb_gather_mmu(), and initialize it
      when initializing all the other tlb gather fields.
      
      This makes the patch larger, but conceptually much simpler.  And the end
      result is much more understandable; even if you want to play games with
      partial ranges when invalidating the TLB contents in chunks, now the
      range information is always there, and anybody who doesn't want to
      bother with it won't introduce subtle bugs.
      
      Ben verified that this fixes his problem.
      Reported-bisected-and-tested-by: NBen Tebulin <tebulin@googlemail.com>
      Build-testing-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Build-testing-by: NRichard Weinberger <richard.weinberger@gmail.com>
      Reviewed-by: NMichal Hocko <mhocko@suse.cz>
      Acked-by: NPeter Zijlstra <peterz@infradead.org>
      Cc: stable@vger.kernel.org
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2b047252
  3. 14 8月, 2013 6 次提交
    • S
      perf/arm: Fix armpmu_map_hw_event() · b88a2595
      Stephen Boyd 提交于
      Fix constraint check in armpmu_map_hw_event().
      Reported-and-tested-by: NVince Weaver <vincent.weaver@maine.edu>
      Cc: <stable@kernel.org>
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b88a2595
    • S
      ARM: 7807/1: kexec: validate CPU hotplug support · 2103f6cb
      Stephen Warren 提交于
      Architectures should fully validate whether kexec is possible as part of
      machine_kexec_prepare(), so that user-space's kexec_load() operation can
      report any problems. Performing validation in machine_kexec() itself is
      too late, since it is not allowed to return.
      
      Prior to this patch, ARM's machine_kexec() was testing after-the-fact
      whether machine_kexec_prepare() was able to disable all but one CPU.
      Instead, modify machine_kexec_prepare() to validate all conditions
      necessary for machine_kexec_prepare()'s to succeed. BUG if the validation
      succeeded, yet disabling the CPUs didn't actually work.
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      Acked-by: N"Eric W. Biederman" <ebiederm@xmission.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      2103f6cb
    • W
      ARM: 7812/1: rwlocks: retry trylock operation if strex fails on free lock · 00efaa02
      Will Deacon 提交于
      Commit 15e7e5c1 ("ARM: 7749/1: spinlock: retry trylock operation if
      strex fails on free lock") modifying our arch_spin_trylock to retry the
      acquisition if the lock appeared uncontended, but the strex failed.
      
      This patch does the same for rwlocks, which were missed by the original
      patch.
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      00efaa02
    • W
      ARM: 7811/1: locks: use early clobber in arch_spin_trylock · afa31d8e
      Will Deacon 提交于
      The res variable is written before we've finished with the input
      operands (namely the lock address), so ensure that we mark it as `early
      clobber' to avoid unintended register sharing.
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      afa31d8e
    • S
      ARM: 7810/1: perf: Fix array out of bounds access in armpmu_map_hw_event() · d9f96635
      Stephen Boyd 提交于
      Vince Weaver reports an oops in the ARM perf event code while
      running his perf_fuzzer tool on a pandaboard running v3.11-rc4.
      
      Unable to handle kernel paging request at virtual address 73fd14cc
      pgd = eca6c000
      [73fd14cc] *pgd=00000000
      Internal error: Oops: 5 [#1] SMP ARM
      Modules linked in: snd_soc_omap_hdmi omapdss snd_soc_omap_abe_twl6040 snd_soc_twl6040 snd_soc_omap snd_soc_omap_hdmi_card snd_soc_omap_mcpdm snd_soc_omap_mcbsp snd_soc_core snd_compress regmap_spi snd_pcm snd_page_alloc snd_timer snd soundcore
      CPU: 1 PID: 2790 Comm: perf_fuzzer Not tainted 3.11.0-rc4 #6
      task: eddcab80 ti: ed892000 task.ti: ed892000
      PC is at armpmu_map_event+0x20/0x88
      LR is at armpmu_event_init+0x38/0x280
      pc : [<c001c3e4>]    lr : [<c001c17c>]    psr: 60000013
      sp : ed893e40  ip : ecececec  fp : edfaec00
      r10: 00000000  r9 : 00000000  r8 : ed8c3ac0
      r7 : ed8c3b5c  r6 : edfaec00  r5 : 00000000  r4 : 00000000
      r3 : 000000ff  r2 : c0496144  r1 : c049611c  r0 : edfaec00
      Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
      Control: 10c5387d  Table: aca6c04a  DAC: 00000015
      Process perf_fuzzer (pid: 2790, stack limit = 0xed892240)
      Stack: (0xed893e40 to 0xed894000)
      3e40: 00000800 c001c17c 00000002 c008a748 00000001 00000000 00000000 c00bf078
      3e60: 00000000 edfaee50 00000000 00000000 00000000 edfaec00 ed8c3ac0 edfaec00
      3e80: 00000000 c073ffac ed893f20 c00bf180 00000001 00000000 c00bf078 ed893f20
      3ea0: 00000000 ed8c3ac0 00000000 00000000 00000000 c0cb0818 eddcab80 c00bf440
      3ec0: ed893f20 00000000 eddcab80 eca76800 00000000 eca76800 00000000 00000000
      3ee0: 00000000 ec984c80 eddcab80 c00bfe68 00000000 00000000 00000000 00000080
      3f00: 00000000 ed892000 00000000 ed892030 00000004 ecc7e3c8 ecc7e3c8 00000000
      3f20: 00000000 00000048 ecececec 00000000 00000000 00000000 00000000 00000000
      3f40: 00000000 00000000 00297810 00000000 00000000 00000000 00000000 00000000
      3f60: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
      3f80: 00000002 00000002 000103a4 00000002 0000016c c00128e8 ed892000 00000000
      3fa0: 00090998 c0012700 00000002 000103a4 00090ab8 00000000 00000000 0000000f
      3fc0: 00000002 000103a4 00000002 0000016c 00090ab0 00090ab8 000107a0 00090998
      3fe0: bed92be0 bed92bd0 0000b785 b6e8f6d0 40000010 00090ab8 00000000 00000000
      [<c001c3e4>] (armpmu_map_event+0x20/0x88) from [<c001c17c>] (armpmu_event_init+0x38/0x280)
      [<c001c17c>] (armpmu_event_init+0x38/0x280) from [<c00bf180>] (perf_init_event+0x108/0x180)
      [<c00bf180>] (perf_init_event+0x108/0x180) from [<c00bf440>] (perf_event_alloc+0x248/0x40c)
      [<c00bf440>] (perf_event_alloc+0x248/0x40c) from [<c00bfe68>] (SyS_perf_event_open+0x4f4/0x8fc)
      [<c00bfe68>] (SyS_perf_event_open+0x4f4/0x8fc) from [<c0012700>] (ret_fast_syscall+0x0/0x48)
      Code: 0a000005 e3540004 0a000016 e3540000 (0791010c)
      
      This is because event->attr.config in armpmu_event_init()
      contains a very large number copied directly from userspace and
      is never checked against the size of the array indexed in
      armpmu_map_hw_event(). Fix the problem by checking the value of
      config before indexing the array and rejecting invalid config
      values.
      Reported-by: NVince Weaver <vincent.weaver@maine.edu>
      Tested-by: NVince Weaver <vincent.weaver@maine.edu>
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      d9f96635
    • W
      ARM: 7809/1: perf: fix event validation for software group leaders · c95eb318
      Will Deacon 提交于
      It is possible to construct an event group with a software event as a
      group leader and then subsequently add a hardware event to the group.
      This results in the event group being validated by adding all members
      of the group to a fake PMU and attempting to allocate each event on
      their respective PMU.
      
      Unfortunately, for software events wthout a corresponding arm_pmu, this
      results in a kernel crash attempting to dereference the ->get_event_idx
      function pointer.
      
      This patch fixes the problem by checking explicitly for software events
      and ignoring those in event validation (since they can always be
      scheduled). We will probably want to revisit this for 3.12, since the
      validation checks don't appear to work correctly when dealing with
      multiple hardware PMUs anyway.
      
      Cc: <stable@vger.kernel.org>
      Reported-by: NVince Weaver <vincent.weaver@maine.edu>
      Tested-by: NVince Weaver <vincent.weaver@maine.edu>
      Tested-by: NMark Rutland <mark.rutland@arm.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      c95eb318
  4. 08 8月, 2013 1 次提交
    • R
      ARM: Fix FIQ code on VIVT CPUs · 2ba85e7a
      Russell King 提交于
      Aaro Koskinen reports the following oops:
      Installing fiq handler from c001b110, length 0x164
      Unable to handle kernel paging request at virtual address ffff1224
      pgd = c0004000
      [ffff1224] *pgd=00000000, *pte=11fff0cb, *ppte=11fff00a
      ...
      [<c0013154>] (set_fiq_handler+0x0/0x6c) from [<c0365d38>] (ams_delta_init_fiq+0xa8/0x160)
       r6:00000164 r5:c001b110 r4:00000000 r3:fefecb4c
      [<c0365c90>] (ams_delta_init_fiq+0x0/0x160) from [<c0365b14>] (ams_delta_init+0xd4/0x114)
       r6:00000000 r5:fffece10 r4:c037a9e0
      [<c0365a40>] (ams_delta_init+0x0/0x114) from [<c03613b4>] (customize_machine+0x24/0x30)
      
      This is because the vectors page is now write-protected, and to change
      code in there we must write to its original alias.  Make that change,
      and adjust the cache flushing such that the code will become visible
      to the instruction stream on VIVT CPUs.
      Reported-by: NAaro Koskinen <aaro.koskinen@iki.fi>
      Tested-by: NAaro Koskinen <aaro.koskinen@iki.fi>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      2ba85e7a
  5. 07 8月, 2013 2 次提交
  6. 05 8月, 2013 3 次提交
  7. 03 8月, 2013 2 次提交
  8. 02 8月, 2013 1 次提交
  9. 01 8月, 2013 12 次提交
  10. 31 7月, 2013 4 次提交
  11. 30 7月, 2013 7 次提交
    • A
      ARM: OMAP2+: hwmod: AM335x: fix cpgmac address space · 50c2a3a1
      Afzal Mohammed 提交于
      Register target address to be used for cpgmac is the second device
      address space. By default, hwmod picks first address space (0th index)
      for register target.
      
      With removal of address space from hwmod and using DT instead, cpgmac
      is getting wrong address space for register target.
      
      Fix it by indicating the address space to be used for register target.
      Signed-off-by: NAfzal Mohammed <afzal@ti.com>
      Tested-by: NMugunthan V N <mugunthanvnm@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      50c2a3a1
    • A
      ARM: OMAP2+: hwmod: rt address space index for DT · 130142d9
      Afzal Mohammed 提交于
      Address space is being removed from hwmod database and DT information
      in <reg> property is being used. Currently the 0th index of device
      address space is used to map for register target address. This is not
      always true, eg. cpgmac has it's sysconfig in second address space.
      
      Handle it by specifying index of device address space to be used for
      register target. As default value of this field would be zero with
      static initialization, existing behaviour of using first address space
      for register target while using DT would be kept as such.
      Signed-off-by: NAfzal Mohammed <afzal@ti.com>
      Tested-by: NMugunthan V N <mugunthanvnm@ti.com>
      [paul@pwsan.com: use u8 rather than int to save memory]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      130142d9
    • R
      ARM: OMAP2+: Sync hwmod state with the pm_runtime and omap_device state · 7268032d
      Rajendra Nayak 提交于
      Some hwmods which are marked with HWMOD_INIT_NO_IDLE are left in enabled
      state post setup(). When a omap_device gets created for such hwmods
      make sure the omap_device and pm_runtime states are also in sync for such
      hwmods by doing a omap_device_enable() and pm_runtime_set_active() for the
      device.
      Signed-off-by: NRajendra Nayak <rnayak@ti.com>
      Tested-by: NMark Jackson <mpfj-list@newflow.co.uk>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      7268032d
    • R
      ARM: OMAP2+: Avoid idling memory controllers with no drivers · f66e329d
      Rajendra Nayak 提交于
      Memory controllers in OMAP (like GPMC and EMIF) have the hwmods marked with
      HWMOD_INIT_NO_IDLE and are left in enabled state post initial setup.
      
      Even if they have drivers missing, avoid idling them as part of
      omap_device_late_idle()
      Signed-off-by: NRajendra Nayak <rnayak@ti.com>
      Tested-by: NMark Jackson <mpfj-list@newflow.co.uk>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      f66e329d
    • R
      ARM: OMAP2+: hwmod: Fix a crash in _setup_reset() with DEBUG_LL · 7dedd346
      Rajendra Nayak 提交于
      With commit '82702ea1' "ARM: OMAP2+:
      Fix serial init for device tree based booting" stubbing out
      omap_serial_early_init() for Device tree based booting, there was a
      crash observed on AM335x based devices when hwmod does a
      _setup_reset() early at boot.
      
      This was rootcaused to hwmod trying to reset console uart while
      earlycon was using it.  The way to tell hwmod not to do this is to
      specify the HWMOD_INIT_NO_RESET flag, which were infact set by the
      omap_serial_early_init() function by parsing the cmdline to identify
      the console device.
      
      Parsing the cmdline to identify the uart used by earlycon itself seems
      broken as there is nothing preventing earlycon to use a different one.
      
      This patch, instead, attempts to populate the requiste flags for hwmod
      based on the CONFIG_DEBUG_OMAPxUARTy FLAGS. This gets rid of the need
      for cmdline parsing in the DT as well as non-DT cases to identify the
      uart used by earlycon.
      Signed-off-by: NRajendra Nayak <rnayak@ti.com>
      Reported-by: NMark Jackson <mpfj-list@newflow.co.uk>
      Reported-by: NVaibhav Bedia <vaibhav.bedia@ti.com>
      Tested-by: NMark Jackson <mpfj-list@newflow.co.uk>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      7dedd346
    • N
      ARM: dts: omap5-uevm: update optional/unused regulator configurations · bd3c5544
      Nishanth Menon 提交于
      commit e00c27ef
      (ARM: dts: OMAP5: Add Palmas MFD node and regulator nodes)
      introduced regulator entries for OMAP5uEVM.
      
      However, The regulator information is based on an older temporary
      pre-production board variant and does not reflect production board
      750-2628-XXX boards.
      
      The following optional/unused regulators can be updated:
      
      - SMPS9 supplies TWL6040 over VDDA_2v1_AUD. This regulator needs to be
      enabled only when audio is active. Since it does not come active by
      default, it does not require "always-on" or "boot-on".
      
      - LDO2 and LDO8 do not go to any peripheral or connector on the board.
      Further, these unused regulators should have been 2.8V for LDO2 and
      3.0V for LDO8. Mark these LDOs as disabled in the dts until needed.
      Reported-by: NMarc Jüttner <m-juettner@ti.com>
      Signed-off-by: NNishanth Menon <nm@ti.com>
      Acked-by: NJ Keerthy <j-keerthy@ti.com>
      Acked-by: NBenoit Cousson <benoit.cousson@gmail.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      bd3c5544
    • N
      ARM: dts: omap5-uevm: fix regulator configurations mandatory for SoC · e18235a6
      Nishanth Menon 提交于
      commit e00c27ef
      (ARM: dts: OMAP5: Add Palmas MFD node and regulator nodes)
      introduced regulator entries for OMAP5uEVM.
      
      However, The regulator information is based on an older temporary
      pre-production board variant and does not reflect production board
      750-2628-XXX boards.
      
      The following fixes are hence mandatory to ensure right voltage is
      supplied to key OMAP5 SoC voltage rails:
      
      - LDO1 supplies VDDAPHY_CAM which is OMAP5's vdda_csiporta/b/c. This
      can only be supplied at 1.5V or 1.8V and we currently supply 2.8V.
      
      To prevent any potential device damage risk, use the specified
      1.5V-1.8V supply.
      
      Remove 'always-on' and 'boot-on' settings here as it is
      a 'on need' supply to SoC IP and is not enabled by PMIC by
      default at boot.
      
      - LDO3 supplies Low Latency Interface(LLI) hardware module which is a
      special hardware to communicate with Modem. However since uEVM is
      not setup by default for this communication, this should be disabled
      by default.
      
      Further, vdda_lli is supposed to be 1.5V and not 3V.
      
      - LDO4 supplies VDDAPHY_DISP which is vdda_dsiporta/c/vdda_hdmi
      
      This can only be supplied at 1.5V or 1.8V and we currently
      supply 2.2V.
      
      To prevent any potential device damage risk, use the specified
      1.5V-1.8V supply.
      
      Remove 'always-on' and 'boot-on' settings here as it is a 'on need'
      supply to SoC IP and is not enabled by PMIC by default at boot.
      
      - LDO6 supplies the board specified VDDS_1V2_WKUP supply going to
      ldo_emu_wkup/vdds_hsic. To stay within the SoC specification supply
      1.2V instead of 1.5V.
      
      - LDO7 supplies VDD_VPP which is vpp1. This is currently configured for
      1.5V which as per data manual "A pulse width of 1000 ns and an amplitude
      of 2V is required to program each eFuse bit. Otherwise, VPP1 must not
      be supplied".
      
      So, fix the voltage to 2V. and disable the supply since we have no plans
      of programming efuse bits - it can only be done once - in factory.
      
      Further it is not enabled by default by PMIC so, 'boot-on' must be
      removed, and the 'always-on' needs to be removed to achieve pulsing
      if efuse needs to be programmed.
      
      - LDO9 supplies the board specified vdds_sdcard supply going within SoC
      specification of 1.8V or 3.0V. Further the supply is controlled by
      switch enabled by REGEN3. So, introduce REGEN3 and map sdcard slot to
      be powered by LDO9. Remove 'always-on' allowing the LDO to be disabled
      on need basis.
      Reported-by: NMarc Jüttner <m-juettner@ti.com>
      Signed-off-by: NNishanth Menon <nm@ti.com>
      Acked-by: NJ Keerthy <j-keerthy@ti.com>
      Acked-by: NBenoit Cousson <benoit.cousson@gmail.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      e18235a6