1. 01 5月, 2014 14 次提交
    • A
      clk: bcm281xx: add clock policy support · a597facc
      Alex Elder 提交于
      Add support for CCU policy engine control, and also for setting the
      mask bits for bus clocks that require a policy change to get
      activated.  This includes adding validity checking framework for
      CCUs, to validate the policy fields if defined.
      Signed-off-by: NAlex Elder <elder@linaro.org>
      Signed-off-by: NMike Turquette <mturquette@linaro.org>
      a597facc
    • A
      clk: bcm281xx: define CCU clock data statically · 03548ec0
      Alex Elder 提交于
      Rather than "manually" setting up each CCU's clock entries at run
      time, define a flexible array of generic Kona clock structures
      within the CCU structure itself.  Each of these entries contains
      generic kona clock information (like its CCU pointer and clock
      framework initialization data).  Each also has a pointer to a
      structure contianing clock type-dependent initialization data
      (like register definitions).
      
      Since we'll iterate over these arrays we need to be sure they have
      slots for all potential clock index values.  (E.g. for the root CCU
      we must have at least BCM281XX_ROOT_CCU_CLOCK_COUNT slots.)  To
      ensure this we always define an extra entry and fill it using the
      special initializer LAST_KONA_CLK.
      
      Just about everything we need to know about a clock can be defined
      statically.  As a result, kona_clk_setup() can be changed to take
      just a kona_clk structure as its argument, and peri_clk_setup() can
      be simplified.  With the information pre-defined we are also able
      to handle most clock setup genericially.  We can do away with the
      CCU-specific callback functions that previously were needed to set
      up the entries in CCU's clock array.
      
      Move the definition of the ccu_data structure down in "clk-kona.h"
      to avoid a forward dependency.
      Signed-off-by: NAlex Elder <elder@linaro.org>
      Signed-off-by: NMike Turquette <mturquette@linaro.org>
      03548ec0
    • A
      clk: bcm281xx: initialize CCU structures statically · b12151ca
      Alex Elder 提交于
      We know up front how many CCU's we'll support, so there's no need to
      allocate their data structures dynamically.  Define a macro
      KONA_CCU_COMMON() to simplify the initialization of many of the
      fields in a ccu_data structure.  Pass the address of a statically
      defined CCU structure to kona_dt_ccu_setup() rather than having that
      function allocate one.
      
      We also know at build time how many clocks a given CCU will provide,
      though the number of of them for each CCU is different.  Record the
      number of clocks we need in the CCU's clk_onecell_data struct
      (which is used when we register the CCU with the common clock code
      as a clock provider).  Rename that struct field "clk_data" (because
      "data" alone gets a little confusing).
      
      Use the known clock count to move the allocation of each CCU's
      clocks array into ccu_clks_setup() rather than having each CCU's
      setup callback function do it.
      
      (The real motivation behind all of this is that we'll be doing some
      static initialization of some additional CCU-specific data soon.)
      Signed-off-by: NAlex Elder <elder@linaro.org>
      Signed-off-by: NMike Turquette <mturquette@linaro.org>
      b12151ca
    • A
      clk: bcm281xx: change some symbol names · 9d3d87c7
      Alex Elder 提交于
      As I developed the bcm281xx clock code I understood there were
      restrictions on device tree "compatible" strings names, and as a
      result "bcm11351" was used in places despite the part family being
      more properly called "bcm281xx".  This can be a little confusing.
      
      In some cases I went to far and things using "bcm11351" when that
      was not necessary.
      
      This patch remedies this.  It renames the symbol used to define the
      "compatible" string (but not its value) so it uses "BCM281XX".
      Similarly, the name names provided to the CLK_OF_DECLARE() macro
      are changed, hoping to minimize the number of places that the
      confusing "11351" string is used.
      Signed-off-by: NAlex Elder <elder@linaro.org>
      Signed-off-by: NMike Turquette <mturquette@linaro.org>
      9d3d87c7
    • A
      clk: bcm281xx: use init_data.name for clock name · e7563252
      Alex Elder 提交于
      Use the init_data.name field to hold the name of a Kona clock rather
      than duplicating it.
      Signed-off-by: NAlex Elder <elder@linaro.org>
      Signed-off-by: NMike Turquette <mturquette@linaro.org>
      e7563252
    • A
      clk: bcm281xx: warn if ccu_wait_bit() fails · 4bac65ca
      Alex Elder 提交于
      Don't let a failure of ccu_wait_bit() go unnoticed.
      Signed-off-by: NAlex Elder <elder@linaro.org>
      Signed-off-by: NMike Turquette <mturquette@linaro.org>
      4bac65ca
    • M
      clk: divider: Optimize clk_divider_bestdiv loop · 0e2de78e
      Maxime COQUELIN 提交于
      Currently, the for-loop used to try all the different dividers to find the
      one that best fit tries all the values from 1 to max_div, incrementing by one.
      In case of power-of-two, or table based divider, the loop isn't optimal.
      
      Instead of incrementing by one, this patch provides directly the next divider.
      Signed-off-by: NMaxime Coquelin <maxime.coquelin@st.com>
      Signed-off-by: NMike Turquette <mturquette@linaro.org>
      0e2de78e
    • M
      clk: divider: Add round to closest divider · 774b5143
      Maxime COQUELIN 提交于
      In some cases, we want to be able to round the divider to the closest one,
      instead than rounding up.
      
      This patch adds a new CLK_DIVIDER_ROUND_CLOSEST flag to specify the divider
      has to round to closest div, keeping rounding up as de default behaviour.
      Signed-off-by: NMaxime Coquelin <maxime.coquelin@st.com>
      Signed-off-by: NMike Turquette <mturquette@linaro.org>
      774b5143
    • S
      clk: Fix slab corruption in clk_unregister() · 874f224c
      Stephen Boyd 提交于
      When a clock is unregsitered, we iterate over the list of
      children and reparent them to NULL (i.e. orphan list). While
      iterating the list, we should use the safe iterators because the
      children list for this clock is changing when we reparent the
      children to NULL. Failure to iterate safely can lead to slab
      corruption like this:
      
      =============================================================================
      BUG kmalloc-128 (Not tainted): Poison overwritten
      -----------------------------------------------------------------------------
      
      Disabling lock debugging due to kernel taint
      INFO: 0xed0c4900-0xed0c4903. First byte 0x0 instead of 0x6b
      INFO: Allocated in clk_register+0x20/0x1bc age=297 cpu=2 pid=70
       __slab_alloc.isra.39.constprop.42+0x410/0x454
       kmem_cache_alloc_trace+0x200/0x24c
       clk_register+0x20/0x1bc
       devm_clk_register+0x34/0x68
       0xbf0000f0
       platform_drv_probe+0x18/0x48
       driver_probe_device+0x94/0x360
       __driver_attach+0x94/0x98
       bus_for_each_dev+0x54/0x88
       bus_add_driver+0xe8/0x204
       driver_register+0x78/0xf4
       do_one_initcall+0xc4/0x17c
       load_module+0x19ac/0x2294
       SyS_init_module+0xa4/0x110
       ret_fast_syscall+0x0/0x48
      INFO: Freed in clk_unregister+0xd4/0x140 age=23 cpu=2 pid=73
       __slab_free+0x38/0x41c
       clk_unregister+0xd4/0x140
       release_nodes+0x164/0x1d8
       __device_release_driver+0x60/0xb0
       driver_detach+0xb4/0xb8
       bus_remove_driver+0x5c/0xc4
       SyS_delete_module+0x148/0x1d8
       ret_fast_syscall+0x0/0x48
      INFO: Slab 0xeec50b90 objects=25 used=0 fp=0xed0c5400 flags=0x4080
      INFO: Object 0xed0c48c0 @offset=2240 fp=0xed0c4a00
      
      Bytes b4 ed0c48b0: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a  ZZZZZZZZZZZZZZZZ
      Object ed0c48c0: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b  kkkkkkkkkkkkkkkk
      Object ed0c48d0: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b  kkkkkkkkkkkkkkkk
      Object ed0c48e0: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b  kkkkkkkkkkkkkkkk
      Object ed0c48f0: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b  kkkkkkkkkkkkkkkk
      Object ed0c4900: 00 00 00 00 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b  ....kkkkkkkkkkkk
      Object ed0c4910: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b  kkkkkkkkkkkkkkkk
      Object ed0c4920: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b  kkkkkkkkkkkkkkkk
      Object ed0c4930: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b a5  kkkkkkkkkkkkkkk.
      Redzone ed0c4940: bb bb bb bb                                      ....
      Padding ed0c49e8: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a  ZZZZZZZZZZZZZZZZ
      Padding ed0c49f8: 5a 5a 5a 5a 5a 5a 5a 5a                          ZZZZZZZZ
      CPU: 3 PID: 75 Comm: mdev Tainted: G    B         3.14.0-11033-g2054ba5ca781 #35
      [<c0014be0>] (unwind_backtrace) from [<c0012240>] (show_stack+0x10/0x14)
      [<c0012240>] (show_stack) from [<c04b74a0>] (dump_stack+0x70/0xbc)
      [<c04b74a0>] (dump_stack) from [<c00f7a78>] (check_bytes_and_report+0xbc/0x100)
      [<c00f7a78>] (check_bytes_and_report) from [<c00f7c48>] (check_object+0x18c/0x218)
      [<c00f7c48>] (check_object) from [<c00f7efc>] (__free_slab+0x104/0x144)
      [<c00f7efc>] (__free_slab) from [<c04b6668>] (__slab_free+0x3dc/0x41c)
      [<c04b6668>] (__slab_free) from [<c014c008>] (load_elf_binary+0x88/0x12b4)
      [<c014c008>] (load_elf_binary) from [<c0105a44>] (search_binary_handler+0x78/0x18c)
      [<c0105a44>] (search_binary_handler) from [<c0106fc0>] (do_execve+0x490/0x5dc)
      [<c0106fc0>] (do_execve) from [<c0036b8c>] (____call_usermodehelper+0x134/0x168)
      [<c0036b8c>] (____call_usermodehelper) from [<c000f048>] (ret_from_fork+0x14/0x2c)
      FIX kmalloc-128: Restoring 0xed0c4900-0xed0c4903=0x6b
      
      Fixes: fcb0ee6a (clk: Implement clk_unregister)
      Cc: Jiada Wang <jiada_wang@mentor.com>
      Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
      Cc: Kyungmin Park <kyungmin.park@samsung.com>
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      Signed-off-by: NMike Turquette <mturquette@linaro.org>
      Cc: stable@vger.kernel.org
      874f224c
    • S
      clk: Fix double free due to devm_clk_register() · 293ba3b4
      Stephen Boyd 提交于
      Now that clk_unregister() frees the struct clk we're
      unregistering we'll free memory twice: first we'll call kfree()
      in __clk_release() with an address kmalloc doesn't know about and
      second we'll call kfree() in the devres layer. Remove the
      allocation of struct clk in devm_clk_register() and let
      clk_release() handle it. This fixes slab errors like:
      
      =============================================================================
      BUG kmalloc-128 (Not tainted): Invalid object pointer 0xed08e8d0
      -----------------------------------------------------------------------------
      
      Disabling lock debugging due to kernel taint
      INFO: Slab 0xeec503f8 objects=25 used=15 fp=0xed08ea00 flags=0x4081
      CPU: 2 PID: 73 Comm: rmmod Tainted: G    B         3.14.0-11032-g526e9c764381 #34
      [<c0014be0>] (unwind_backtrace) from [<c0012240>] (show_stack+0x10/0x14)
      [<c0012240>] (show_stack) from [<c04b74dc>] (dump_stack+0x70/0xbc)
      [<c04b74dc>] (dump_stack) from [<c00f6778>] (slab_err+0x74/0x84)
      [<c00f6778>] (slab_err) from [<c04b6278>] (free_debug_processing+0x2cc/0x31c)
      [<c04b6278>] (free_debug_processing) from [<c04b6300>] (__slab_free+0x38/0x41c)
      [<c04b6300>] (__slab_free) from [<c03931bc>] (clk_unregister+0xd4/0x140)
      [<c03931bc>] (clk_unregister) from [<c02fb774>] (release_nodes+0x164/0x1d8)
      [<c02fb774>] (release_nodes) from [<c02f8698>] (__device_release_driver+0x60/0xb0)
      [<c02f8698>] (__device_release_driver) from [<c02f9080>] (driver_detach+0xb4/0xb8)
      [<c02f9080>] (driver_detach) from [<c02f8480>] (bus_remove_driver+0x5c/0xc4)
      [<c02f8480>] (bus_remove_driver) from [<c008c9b8>] (SyS_delete_module+0x148/0x1d8)
      [<c008c9b8>] (SyS_delete_module) from [<c000ef80>] (ret_fast_syscall+0x0/0x48)
      FIX kmalloc-128: Object at 0xed08e8d0 not freed
      
      Fixes: fcb0ee6a (clk: Implement clk_unregister)
      Cc: Jiada Wang <jiada_wang@mentor.com>
      Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
      Cc: Kyungmin Park <kyungmin.park@samsung.com>
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      Signed-off-by: NMike Turquette <mturquette@linaro.org>
      Cc: stable@vger.kernel.org
      293ba3b4
    • M
      Merge tag 'socfpga-clk-fix-for-3.15' of... · 2aa6dd07
      Mike Turquette 提交于
      Merge tag 'socfpga-clk-fix-for-3.15' of git://git.rocketboards.org/linux-socfpga-next into clk-fixes-socfpga
      
      clk: socfpga: clock fix for v3.15
      
      Currently on 3.15-rc1, the SOCFPGA platform is unable to boot. This patch
      fixes the issue and allows the platform to boot.
      2aa6dd07
    • D
      clk: socfpga: fix clock driver for 3.15 · a30d27ed
      Dinh Nguyen 提交于
      commit [1771b10d clk: respect the clock dependencies in of_clk_init]
      exposed a flaw in the socfpga clock driver and prevents the platform
      from booting on 3.15-rc1.
      
      Because the "altr,clk-mgr" is not really a clock, it should not be using
      CLK_OF_DECLARE, instead we should be mapping the clk-mgr's base address
      one of the functional clock init function. Use the socfpga_pll_init function
      to map the clk_mgr_base_addr as this clock should always be initialized first.
      Signed-off-by: NDinh Nguyen <dinguyen@altera.com>
      Tested-by: NPavel Machek <pavel@denx.de>
      a30d27ed
    • M
      clk: divider: Fix best div calculation for power-of-two and table dividers · dd23c2cd
      Maxime COQUELIN 提交于
      The divider returned by clk_divider_bestdiv() is likely to be invalid in case
      of power-of-two and table dividers when CLK_SET_RATE_PARENT flag isn't set.
      
      Fixes boot on STiH416 platform.
      Signed-off-by: NMaxime Coquelin <maxime.coquelin@st.com>
      Signed-off-by: NMike Turquette <mturquette@linaro.org>
      [mturquette@linaro.org: trivial merge conflict & updated changelog]
      dd23c2cd
    • A
      clk: bcm281xx: don't use unnamed structs or unions · e813d49d
      Alex Elder 提交于
      The Broadcom Kona clock code, as originally written, made use of
      unnamed union and struct fields.  This is a feature present in C11,
      and is a GNU extension otherwise.  It worked very well for me.
      
      Unfortunately, Russell King reported that this feature was not
      supported in a build environment he used, which meant attempting
      to build this code failed spectacularly.
      
      Add names to these unnamed fields, and update the code accordingly.
      Reported-by: NRussell King <linux@arm.linux.org.uk>
      Tested-by: NMarkus Mayer <markus.mayer@linaro.org>
      Signed-off-by: NAlex Elder <elder@linaro.org>
      Signed-off-by: NMike Turquette <mturquette@linaro.org>
      e813d49d
  2. 28 4月, 2014 12 次提交
    • L
      Linux 3.15-rc3 · d1db0eea
      Linus Torvalds 提交于
      d1db0eea
    • W
      word-at-a-time: avoid undefined behaviour in zero_bytemask macro · ec6931b2
      Will Deacon 提交于
      The asm-generic, big-endian version of zero_bytemask creates a mask of
      bytes preceding the first zero-byte by left shifting ~0ul based on the
      position of the first zero byte.
      
      Unfortunately, if the first (top) byte is zero, the output of
      prep_zero_mask has only the top bit set, resulting in undefined C
      behaviour as we shift left by an amount equal to the width of the type.
      As it happens, GCC doesn't manage to spot this through the call to fls(),
      but the issue remains if architectures choose to implement their shift
      instructions differently.
      
      An example would be arch/arm/ (AArch32), where LSL Rd, Rn, #32 results
      in Rd == 0x0, whilst on arch/arm64 (AArch64) LSL Xd, Xn, #64 results in
      Xd == Xn.
      
      Rather than check explicitly for the problematic shift, this patch adds
      an extra shift by 1, replacing fls with __fls. Since zero_bytemask is
      never called with a zero argument (has_zero() is used to check the data
      first), we don't need to worry about calling __fls(0), which is
      undefined.
      
      Cc: <stable@vger.kernel.org>
      Cc: Victor Kamensky <victor.kamensky@linaro.org>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ec6931b2
    • L
      Merge branch 'safe-dirty-tlb-flush' · ac6c9e2b
      Linus Torvalds 提交于
      This merges the patch to fix possible loss of dirty bit on munmap() or
      madvice(DONTNEED).  If there are concurrent writers on other CPU's that
      have the unmapped/unneeded page in their TLBs, their writes to the page
      could possibly get lost if a third CPU raced with the TLB flush and did
      a page_mkclean() before the page was fully written.
      
      Admittedly, if you unmap() or madvice(DONTNEED) an area _while_ another
      thread is still busy writing to it, you deserve all the lost writes you
      could get.  But we kernel people hold ourselves to higher quality
      standards than "crazy people deserve to lose", because, well, we've seen
      people do all kinds of crazy things.
      
      So let's get it right, just because we can, and we don't have to worry
      about it.
      
      * safe-dirty-tlb-flush:
        mm: split 'tlb_flush_mmu()' into tlb flushing and memory freeing parts
      ac6c9e2b
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs · 33c0022f
      Linus Torvalds 提交于
      Pull btrfs fixes from Chris Mason.
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
        Btrfs: limit the path size in send to PATH_MAX
        Btrfs: correctly set profile flags on seqlock retry
        Btrfs: use correct key when repeating search for extent item
        Btrfs: fix inode caching vs tree log
        Btrfs: fix possible memory leaks in open_ctree()
        Btrfs: avoid triggering bug_on() when we fail to start inode caching task
        Btrfs: move btrfs_{set,clear}_and_info() to ctree.h
        btrfs: replace error code from btrfs_drop_extents
        btrfs: Change the hole range to a more accurate value.
        btrfs: fix use-after-free in mount_subvol()
      33c0022f
    • L
      Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm · 2b9d1c05
      Linus Torvalds 提交于
      Pull arm fixes from Russell King:
       "A number of fixes for the PJ4/iwmmxt changes which arm-soc forced me
        to take during the merge window.  This stuff should have been better
        tested and sorted out *before* the merge window"
      
      * 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
        ARM: 8042/1: iwmmxt: allow to build iWMMXt on Marvell PJ4B
        ARM: 8041/1: pj4: fix cpu_is_pj4 check
        ARM: 8040/1: pj4: properly detect existence of iWMMXt coprocessor
        ARM: 8039/1: pj4: enable iWMMXt only if CONFIG_IWMMXT is set
        ARM: 8038/1: iwmmxt: explicitly check for supported architectures
      2b9d1c05
    • L
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · afa3cad7
      Linus Torvalds 提交于
      Pull arm64 fixes from Catalin Marinas:
       - compat renameat2 syscall wiring and __NR_compat_syscalls fix
       - TLB fix for transparent huge pages following switch to generic
         mmu_gather
       - spinlock initialisation for init_mm's context
       - move of_clk_init() earlier
       - Kconfig duplicate entry fix
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: init: Move of_clk_init to time_init
        arm64: initialize spinlock for init_mm's context
        arm64: debug: remove noisy, pointless warning
        arm64: mm: Add THP TLB entries to general mmu_gather
        arm64: add renameat2 compat syscall
        ARM64: Remove duplicated Kconfig entry for "kernel/power/Kconfig"
        arm64: __NR_compat_syscalls fix
      afa3cad7
    • L
      Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · d9e9e8e2
      Linus Torvalds 提交于
      Pull irq fixes from Thomas Gleixner:
       "A slighlty large fix for a subtle issue in the CPU hotplug code of
        certain ARM SoCs, where the not yet online cpu needs to setup the cpu
        local timer and needs to set the interrupt affinity to itself.
        Setting interrupt affinity to a not online cpu is prohibited and
        therefor the timer interrupt ends up on the wrong cpu, which leads to
        nasty complications.
      
        The SoC folks tried to hack around that in the SoC code in some more
        than nasty ways.  The proper solution is to have a way to enforce the
        affinity setting to a not online cpu.  The core patch to the genirq
        code provides that facility and the follow up patches make use of it
        in the GIC interrupt controller and the exynos timer driver.
      
        The change to the core code has no implications to existing users,
        except for the rename of the locked function and therefor the
        necessary fixup in mips/cavium.  Aside of that, no runtime impact is
        possible, as none of the existing interrupt chips implements anything
        which depends on the force argument of the irq_set_affinity()
        callback"
      
      * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        clocksource: Exynos_mct: Register clock event after request_irq()
        clocksource: Exynos_mct: Use irq_force_affinity() in cpu bringup
        irqchip: Gic: Support forced affinity setting
        genirq: Allow forcing cpu affinity of interrupts
      d9e9e8e2
    • L
      Merge tag 'tty-3.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · a8d70698
      Linus Torvalds 提交于
      Pull tty/serial fixes from Greg KH:
       "Here are a few tty/serial fixes for 3.15-rc3 that resolve a number of
        reported issues in the 8250 and samsung serial drivers, as well as a
        character loss fix for the tty core that was caused by the lock
        removal patches a release ago"
      
      * tag 'tty-3.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        serial_core: fix uart PORT_UNKNOWN handling
        serial: samsung: Change barrier() to cpu_relax() in console output
        serial: samsung: don't check config for every character
        serial: samsung: Use the passed in "port", fixing kgdb w/ no console
        serial: 8250: Fix thread unsafe __dma_tx_complete function
        8250_core: Fix unwanted TX chars write
        tty: Fix race condition between __tty_buffer_request_room and flush_to_ldisc
      a8d70698
    • L
      Merge tag 'staging-3.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · d0c15ad7
      Linus Torvalds 提交于
      Pull staging / IIO driver fixes from Greg KH:
       "Here are some small staging and IIO driver fixes for 3.15-rc3.
      
        Nothing major at all, just some assorted issues that people have
        reported"
      
      * tag 'staging-3.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
        staging: comedi: usbdux: bug fix for accessing 'ao_chanlist' in private data
        iio: adc: mxs-lradc: fix warning when buidling on avr32
        iio: cm36651: Fix i2c client leak and possible NULL pointer dereference
        iio: querying buffer scan_mask should return 0/1
        staging:iio:ad2s1200 fix a missing break
        iio: adc: at91_adc: correct default shtim value
        ARM: at91: at91sam9260: change at91_adc name
        ARM: at91: at91sam9g45: change at91_adc name
        iio: cm32181: Fix read integration time function
        iio: adc: at91_adc: Repair broken platform_data support
      d0c15ad7
    • L
      Merge tag 'driver-core-3.15-rc3' of... · 005fbcd0
      Linus Torvalds 提交于
      Merge tag 'driver-core-3.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
      
      Pull driver core fixes from Greg KH:
       "Here are some kernfs fixes for 3.15-rc3 that resolve some reported
        problems.  Nothing huge, but all needed"
      
      * tag 'driver-core-3.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
        s390/ccwgroup: Fix memory corruption
        kernfs: add back missing error check in kernfs_fop_mmap()
        kernfs: fix a subdir count leak
      005fbcd0
    • L
      Merge tag 'usb-3.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · fefb8275
      Linus Torvalds 提交于
      Pull USB fixes from Greg KH:
       "Here are a number of USB fixes for 3.15-rc3.  The majority are gadget
        fixes, as we didn't get any of those in for 3.15-rc2.  The others are
        all over the place, and there's a number of new device id addtions as
        well."
      
      * tag 'usb-3.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (35 commits)
        usb: option: add and update a number of CMOTech devices
        usb: option: add Alcatel L800MA
        usb: option: add Olivetti Olicard 500
        usb: qcserial: add Sierra Wireless MC7305/MC7355
        usb: qcserial: add Sierra Wireless MC73xx
        usb: qcserial: add Sierra Wireless EM7355
        USB: io_ti: fix firmware download on big-endian machines
        usb/xhci: fix compilation warning when !CONFIG_PCI && !CONFIG_PM
        xhci: extend quirk for Renesas cards
        xhci: Switch Intel Lynx Point ports to EHCI on shutdown.
        usb: xhci: Prefer endpoint context dequeue pointer over stopped_trb
        phy: core: make NULL a valid phy reference if !CONFIG_GENERIC_PHY
        phy: fix kernel oops in phy_lookup()
        phy: restore OMAP_CONTROL_PHY dependencies
        phy: exynos: fix building as a module
        USB: serial: fix sysfs-attribute removal deadlock
        usb: wusbcore: fix panic in wusbhc_chid_set
        usb: wusbcore: convert nested lock to use spin_lock instead of spin_lock_irq
        uwb: don't call spin_unlock_irq in a USB completion handler
        usb: chipidea: coordinate usb phy initialization for different phy type
        ...
      fefb8275
    • L
      Merge tag 'pm+acpi-3.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · e9dba837
      Linus Torvalds 提交于
      Pull ACPI and power management fixes from Rafael Wysocki:
       "These include a fix for a recent ACPI regression related to device
        notifications, intel_idle fix related to IvyTown support, fix for a
        buffer size issue in ACPICA, PM core fix related to the "freeze" sleep
        state, four fixes for various types of breakage in cpufreq drivers, a
        PNP workaround for a wrong memory region size in ACPI tables, and a
        fix and cleanup for the ACPI tools Makefile.
      
        Specifics:
      
         - Fix for broken ACPI notifications on some systems caused by a
           recent ACPI hotplug commit that blocked the propagation of unknown
           type notifications to device drivers inadvertently.
      
         - intel_idle fix to make the IvyTown C-states handling (added
           recently) work as intended which now is broken due to missing
           braces.  From Christoph Jaeger.
      
         - ACPICA fix to make it allocate buffers of the right sizes for the
           Generic Serial Bus operation region access.  From Lv Zheng.
      
         - PM core fix unblocking cpuidle before entering the "freeze" sleep
           state which causes that state to be able to actually save more
           energy than runtime idle.
      
         - Configuration and build fixes for the highbank and powernv cpufreq
           drivers from Kefeng Wang and Srivatsa S Bhat.
      
         - Coccinelle warning fix related to error pointers for the unicore32
           cpufreq driver from Duan Jiong.
      
         - Integer overflow fix for the ppc-corenet cpufreq driver from Geert
           Uytterhoeven.
      
         - Workaround for BIOSes that don't report the entire Intel MCH area
           in their ACPI tables from Bjorn Helgaas.
      
         - ACPI tools Makefile fix and cleanup from Thomas Renninger"
      
      * tag 'pm+acpi-3.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI / notify: Do not block unknown type notifications in root handler
        PNP: Work around BIOS defects in Intel MCH area reporting
        cpufreq: highbank: fix ARM_HIGHBANK_CPUFREQ dependency warning
        cpufreq: ppc: Fix integer overflow in expression
        cpufreq, powernv: Fix build failure on UP
        cpufreq: unicore32: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO
        PM / suspend: Make cpuidle work in the "freeze" state
        intel_idle: fix IVT idle state table setting
        ACPICA: Fix buffer allocation issue for generic_serial_bus region accesses.
        tools/power/acpi: Minor bugfixes
      e9dba837
  3. 26 4月, 2014 14 次提交
    • C
      Btrfs: limit the path size in send to PATH_MAX · cfd4a535
      Chris Mason 提交于
      fs_path_ensure_buf is used to make sure our path buffers for
      send are big enough for the path names as we construct them.
      The buffer size is limited to 32K by the length field in
      the struct.
      
      But bugs in the path construction can end up trying to build
      a huge buffer, and we'll do invalid memmmoves when the
      buffer length field wraps.
      
      This patch is step one, preventing the overflows.
      Signed-off-by: NChris Mason <clm@fb.com>
      cfd4a535
    • L
      mm: split 'tlb_flush_mmu()' into tlb flushing and memory freeing parts · 1cf35d47
      Linus Torvalds 提交于
      The mmu-gather operation 'tlb_flush_mmu()' has done two things: the
      actual tlb flush operation, and the batched freeing of the pages that
      the TLB entries pointed at.
      
      This splits the operation into separate phases, so that the forced
      batched flushing done by zap_pte_range() can now do the actual TLB flush
      while still holding the page table lock, but delay the batched freeing
      of all the pages to after the lock has been dropped.
      
      This in turn allows us to avoid a race condition between
      set_page_dirty() (as called by zap_pte_range() when it finds a dirty
      shared memory pte) and page_mkclean(): because we now flush all the
      dirty page data from the TLB's while holding the pte lock,
      page_mkclean() will be held up walking the (recently cleaned) page
      tables until after the TLB entries have been flushed from all CPU's.
      Reported-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Tested-by: NDave Hansen <dave.hansen@intel.com>
      Acked-by: NHugh Dickins <hughd@google.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>
      Cc: Tony Luck <tony.luck@intel.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1cf35d47
    • R
      Merge branches 'pnp' and 'acpi-hotplug' · d4c9c8a0
      Rafael J. Wysocki 提交于
      * pnp:
        PNP: Work around BIOS defects in Intel MCH area reporting
      
      * acpi-hotplug:
        ACPI / notify: Do not block unknown type notifications in root handler
      d4c9c8a0
    • L
      Merge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging · 9a60ee11
      Linus Torvalds 提交于
      Pull hwmon fixes from Guenter Roeck:
       - ltc2945: Don't unecessarily crash kernel on implementation error
       - vexpress: Fix 'name' and 'label' attributes
      
      * tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
        hwmon: (ltc2945) Don't crash the kernel unnecessarily
        hwmon: (vexpress) Avoid creating non-existing attributes
        hwmon: (vexpress) Use legal hwmon device names
      9a60ee11
    • L
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 6dda80ff
      Linus Torvalds 提交于
      Pull SCSI fixes from James Bottomley:
       "This is a set of seven fixes, three (hpsa) and free'd command
        references correcting bugs in the last round of updates and the
        remaining four correcting problems within the SCSI error handler that
        was causing a deadlock within USB"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        [SCSI] More USB deadlock fixes
        [SCSI] Fix USB deadlock caused by SCSI error handling
        [SCSI] Fix command result state propagation
        [SCSI] Fix spurious request sense in error handling
        [SCSI] don't reference freed command in scsi_prep_return
        [SCSI] don't reference freed command in scsi_init_sgtable
        [SCSI] hpsa: fix NULL dereference in hpsa_put_ctlr_into_performant_mode()
      6dda80ff
    • L
      Merge tag 'fixes-3.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 3fe89d2e
      Linus Torvalds 提交于
      Pull ARM SoC fixes from Arnd Bergmann:
       "Since we didn't get around to collect fixes in time for -rc2 over the
        easter vacation, this one is unfortunately a bit larger than we'd like
        for an -rc3 merge.
      
        A large set of the changes is in the device tree sources, so I'm
        splitting out the description between code changes and DT changes.
        Aside from omap and versatile express, the actual code bugs are and
        trivial.  Here is an overview:
      
        imx:
         - fix video clock settings
         - fix one clock refcounting bug
      
        omap:
         - update defconfig for renamed USB PHY driver
         - fix error handling in gpmc
         - fix N900 video initialization regression
         - fix reression in hwmod code from missing braces
         - fix am43xx and omap3 clocks
         - remove bogus write to voltage control register
      
        pxa:
         - fix build regression from 3.13 header cleanup
      
        rockchip:
         - fix a misleading printk string
      
        shmobile:
         - fix incorrect sound setting on multiple machines
      
        spear:
         - remove incorrect __init section annotation
      
        tegra:
         - remove a stale Kconfig entry
      
        u300:
         - update defconfig
      
        ux500:
         - enable common wireless and sensor drivers in defconfig
         - more defconfig updates
      
        vexpress:
         - fix voltage calculation for opp
         - fix reboot hang and warning
         - fix out-of-bounds array access
         - improve error handling in clock driver
      
        overall:
         - always select CLKSRC_OF in multiplatform builds
      
        And these are the devicetree related changes:
      
        imx:
         - add missing #clock-cell properties
         - fix pinctrl setting in imx6sl-evk
         - fix video endpoint on imx53
         - remove obsolete lvds-channel nodes (multiple patches)
         - add missing second stmpe node
         - fix usb host mode on dmo-edmqmx6 (multiple patches)
         - fix gic node #address-cells to match usage
         - add missing legacy IRQ map for PCIe
         - fix microsom pincontrol setting for rgmii
         - fix fatal typo in touchscreen DT usage for mx5
         - list all RAM present on m53evk and mx53qsb
      
        omap:
         - fix bug in DT handling of gpmc external bus
         - add DT for older revision of beagleboard
         - fix regression after DT node name fixes
         - remove obsolete properties for gpmc
         - fix pinmux comment to match DT it refers to
         - fix newly added dra7xx clock node data
         - add missing clock for USB PHY
      
        mvebu:
         - add missing clock for mdio node
         - fix nonstandard vendor prefixes on i2c nodes
      
        rockchip:
         - fix pin control setting for uart
      
        shmobile:
         - fix typo in DT data for pin control (multiple patches)
         - fix gic node #address-cells to match usage
      
        tegra:
         - fix clock and uart DT representation to match hardware
      
        zynq:
         - add DT nodes for newly added driver
         - add DT properties required for cpufreq-ondemand
      
        overall:
         - restore alphabetic order in Makefile
         - grammar fixes in bindings"
      
      * tag 'fixes-3.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (66 commits)
        ARM: vexpress/TC2: Convert OPP voltage to uV before storing
        power/reset: vexpress: Fix restart/power off operation
        dt: tegra: remove non-existent clock IDs
        clk: tegra: remove non-existent clocks
        ARM: tegra: remove UART5/UARTE from tegra124.dtsi
        ARM: tegra: remove TEGRA_EMC_SCALING_ENABLE
        ARM: Tidy up DTB Makefile entries
        ARM: fix missing CLKSRC_OF on multi-platform
        ARM: spear: add __init to spear_clocksource_init()
        ARM: pxa: hx4700.h: include "irqs.h" for PXA_NR_BUILTIN_GPIO
        arm/mach-vexpress: array accessed out of bounds
        clk: vexpress: NULL dereference on error path
        ARM: OMAP2+: Fix GPMC remap for devices using an offset
        ARM: zynq: dt: Add I2C nodes to Zynq device tree
        ARM: zynq: DT: Add 'clock-latency' property
        ARM: OMAP2+: Fix oops for GPMC free
        ARM: dts: Add support for the BeagleBoard xM A/B
        ARM: dts: Grammar /that will/it will/
        ARM: dts: Grammar /is uses/ is used/
        ARM: OMAP2+: Fix config name for USB3 PHY
        ...
      3fe89d2e
    • L
      Merge tag 'locks-v3.15-2' of git://git.samba.org/jlayton/linux · 625bba66
      Linus Torvalds 提交于
      Pull file locking fixes from Jeff Layton:
       "File locking related bugfixes for v3.15 (pile #2)
      
         - fix for a long-standing bug in __break_lease that can cause soft
           lockups
         - renaming of file-private locks to "open file description" locks,
           and the command macros to more visually distinct names
      
        The fix for __break_lease is also in the pile of patches for which
        Bruce sent a pull request, but I assume that your merge procedure will
        handle that correctly.
      
        For the other patches, I don't like the fact that we need to rename
        this stuff at this late stage, but it should be settled now
        (hopefully)"
      
      * tag 'locks-v3.15-2' of git://git.samba.org/jlayton/linux:
        locks: rename FL_FILE_PVT and IS_FILE_PVT to use "*_OFDLCK" instead
        locks: rename file-private locks to "open file description locks"
        locks: allow __break_lease to sleep even when break_time is 0
      625bba66
    • L
      Merge branch 'for-3.15' of git://linux-nfs.org/~bfields/linux · b8e6dece
      Linus Torvalds 提交于
      Pull nfsd bugfixes from Bruce Fields:
       "Three small nfsd bugfixes (including one locks.c fix for a bug
        triggered only from nfsd).
      
        Jeff's patches are for long-existing problems that became easier to
        trigger since the addition of vfs delegation support"
      
      * 'for-3.15' of git://linux-nfs.org/~bfields/linux:
        Revert "nfsd4: fix nfs4err_resource in 4.1 case"
        nfsd: set timeparms.to_maxval in setup_callback_client
        locks: allow __break_lease to sleep even when break_time is 0
      b8e6dece
    • C
      s390/ccwgroup: Fix memory corruption · 0c8c77d3
      Christian Borntraeger 提交于
      commit 0b60f9ea (s390: use
      device_remove_file_self() instead of device_schedule_callback())
      
      caused random memory corruption on my s390 box. Turns out that the
      last element of the ccwgroup structure is of dynamic size, so we
      must move the newly introduced work structure _before_ the zero
      length array.
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      CC: Tejun Heo <tj@kernel.org>
      CC: Martin Schwidefsky <schwidefsky@de.ibm.com>
      CC: Heiko Carstens <heiko.carstens@de.ibm.com>
      CC: Sebastian Ott <sebott@linux.vnet.ibm.com>
      CC: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
      Acked-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      0c8c77d3
    • T
      kernfs: add back missing error check in kernfs_fop_mmap() · b44b2140
      Tejun Heo 提交于
      While updating how mmap enabled kernfs files are handled by lockdep,
      9b2db6e1 ("sysfs: bail early from kernfs_file_mmap() to avoid
      spurious lockdep warning") inadvertently dropped error return check
      from kernfs_file_mmap().  The intention was just dropping "if
      (ops->mmap)" check as the control won't reach the point if the mmap
      callback isn't implemented, but I mistakenly removed the error return
      check together with it.
      
      This led to Xorg crash on i810 which was reported and bisected to the
      commit and then to the specific change by Tobias.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Reported-and-bisected-by: NTobias Powalowski <tobias.powalowski@googlemail.com>
      Tested-by: NTobias Powalowski <tobias.powalowski@googlemail.com>
      References: http://lkml.kernel.org/g/533D01BD.1010200@googlemail.com
      Cc: stable <stable@vger.kernel.org> # 3.14
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b44b2140
    • J
      kernfs: fix a subdir count leak · c1befb88
      Jianyu Zhan 提交于
      Currently kernfs_link_sibling() increates parent->dir.subdirs before
      adding the node into parent's chidren rb tree.
      
      Because it is possible that kernfs_link_sibling() couldn't find
      a suitable slot and bail out, this leads to a mismatch between
      elevated subdir count with actual children node numbers.
      
      This patches fix this problem, by moving the subdir accouting
      after the actual addtion happening.
      Signed-off-by: NJianyu Zhan <nasa4836@gmail.com>
      Acked-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c1befb88
    • B
      usb: option: add and update a number of CMOTech devices · 34f972d6
      Bjørn Mork 提交于
      A number of older CMOTech modems are based on Qualcomm
      chips.  The blacklisted interfaces are QMI/wwan.
      Reported-by: NLars Melin <larsm17@gmail.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      34f972d6
    • B
      usb: option: add Alcatel L800MA · dd6b48ec
      Bjørn Mork 提交于
      Device interface layout:
      0: ff/ff/ff - serial
      1: ff/00/00 - serial AT+PPP
      2: ff/ff/ff - QMI/wwan
      3: 08/06/50 - storage
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      dd6b48ec
    • B
      usb: option: add Olivetti Olicard 500 · 533b3994
      Bjørn Mork 提交于
      Device interface layout:
      0: ff/ff/ff - serial
      1: ff/ff/ff - serial AT+PPP
      2: 08/06/50 - storage
      3: ff/ff/ff - serial
      4: ff/ff/ff - QMI/wwan
      
      Cc: <stable@vger.kernel.org>
      Reported-by: NJulio Araujo <julio.araujo@wllctel.com.br>
      Signed-off-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      533b3994