1. 05 4月, 2016 10 次提交
    • K
      ravb: Add dma queue interrupt support · f51bdc23
      Kazuya Mizuguchi 提交于
      This patch supports the following interrupts.
      
      - One interrupt for multiple (timestamp, error, gPTP)
      - One interrupt for emac
      - Four interrupts for dma queue (best effort rx/tx, network control rx/tx)
      
      This patch improve efficiency of the interrupt handler by adding the
      interrupt handler corresponding to each interrupt source described
      above. Additionally, it reduces the number of times of the access to
      EthernetAVB IF.
      Also this patch prevent this driver depends on the whim of a boot loader.
      
      [ykaneko0929@gmail.com: define bit names of registers]
      [ykaneko0929@gmail.com: add comment for gen3 only registers]
      [ykaneko0929@gmail.com: fix coding style]
      [ykaneko0929@gmail.com: update changelog]
      [ykaneko0929@gmail.com: gen3: fix initialization of interrupts]
      [ykaneko0929@gmail.com: gen3: fix clearing interrupts]
      [ykaneko0929@gmail.com: gen3: add helper function for request_irq()]
      [ykaneko0929@gmail.com: gen3: remove IRQF_SHARED flag for request_irq()]
      [ykaneko0929@gmail.com: revert ravb_close() and ravb_ptp_stop()]
      [ykaneko0929@gmail.com: avoid calling free_irq() to non-hooked interrupts]
      [ykaneko0929@gmail.com: make NC/BE interrupt handler a function]
      [ykaneko0929@gmail.com: make timestamp interrupt handler a function]
      [ykaneko0929@gmail.com: timestamp interrupt is handled in multiple
       interrupt handler instead of dma queue interrupt handler]
      Signed-off-by: NKazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com>
      Signed-off-by: NYoshihiro Kaneko <ykaneko0929@gmail.com>
      Acked-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f51bdc23
    • D
      Merge branch 'cmsg_timestamp' · 9d2355ba
      David S. Miller 提交于
      Soheil Hassas Yeganeh says:
      
      ====================
      add TX timestamping via cmsg
      
      This patch series aim at enabling TX timestamping via cmsg.
      
      Currently, to occasionally sample TX timestamping on a socket,
      applications need to call setsockopt twice: first for enabling
      timestamps and then for disabling them. This is an unnecessary
      overhead. With cmsg, in contrast, applications can sample TX
      timestamps per sendmsg().
      
      This patch series adds the code for processing SO_TIMESTAMPING
      for cmsg's of the SOL_SOCKET level, and adds the glue code for
      TCP, UDP, and RAW for both IPv4 and IPv6. This implementation
      supports overriding timestamp generation flags (i.e.,
      SOF_TIMESTAMPING_TX_*) but not timestamp reporting flags.
      Applications must still enable timestamp reporting via
      setsockopt to receive timestamps.
      
      This series does not change existing timestamping behavior for
      applications that are using socket options.
      
      I will follow up with another patch to enable timestamping for
      active TFO (client-side TCP Fast Open) and also setting packet
      mark via cmsgs.
      
      Thanks!
      
      Changes in v2:
              - Replace u32 with __u32 in the documentation.
      
      Changes in v3:
      	- Fix the broken build for L2TP (due to changes
      	  in IPv6).
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9d2355ba
    • S
      sock: document timestamping via cmsg in Documentation · fd91e12f
      Soheil Hassas Yeganeh 提交于
      Update docs and add code snippet for using cmsg for timestamping.
      Signed-off-by: NSoheil Hassas Yeganeh <soheil@google.com>
      Acked-by: NWillem de Bruijn <willemb@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fd91e12f
    • S
      sock: enable timestamping using control messages · c14ac945
      Soheil Hassas Yeganeh 提交于
      Currently, SOL_TIMESTAMPING can only be enabled using setsockopt.
      This is very costly when users want to sample writes to gather
      tx timestamps.
      
      Add support for enabling SO_TIMESTAMPING via control messages by
      using tsflags added in `struct sockcm_cookie` (added in the previous
      patches in this series) to set the tx_flags of the last skb created in
      a sendmsg. With this patch, the timestamp recording bits in tx_flags
      of the skbuff is overridden if SO_TIMESTAMPING is passed in a cmsg.
      
      Please note that this is only effective for overriding the recording
      timestamps flags. Users should enable timestamp reporting (e.g.,
      SOF_TIMESTAMPING_SOFTWARE | SOF_TIMESTAMPING_OPT_ID) using
      socket options and then should ask for SOF_TIMESTAMPING_TX_*
      using control messages per sendmsg to sample timestamps for each
      write.
      Signed-off-by: NSoheil Hassas Yeganeh <soheil@google.com>
      Acked-by: NWillem de Bruijn <willemb@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c14ac945
    • S
      ipv6: process socket-level control messages in IPv6 · ad1e46a8
      Soheil Hassas Yeganeh 提交于
      Process socket-level control messages by invoking
      __sock_cmsg_send in ip6_datagram_send_ctl for control messages on
      the SOL_SOCKET layer.
      
      This makes sure whenever ip6_datagram_send_ctl is called for
      udp and raw, we also process socket-level control messages.
      
      This is a bit uglier than IPv4, since IPv6 does not have
      something like ipcm_cookie. Perhaps we can later create
      a control message cookie for IPv6?
      
      Note that this commit interprets new control messages that
      were ignored before. As such, this commit does not change
      the behavior of IPv6 control messages.
      Signed-off-by: NSoheil Hassas Yeganeh <soheil@google.com>
      Acked-by: NWillem de Bruijn <willemb@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ad1e46a8
    • S
      ipv4: process socket-level control messages in IPv4 · 24025c46
      Soheil Hassas Yeganeh 提交于
      Process socket-level control messages by invoking
      __sock_cmsg_send in ip_cmsg_send for control messages on
      the SOL_SOCKET layer.
      
      This makes sure whenever ip_cmsg_send is called in udp, icmp,
      and raw, we also process socket-level control messages.
      
      Note that this commit interprets new control messages that
      were ignored before. As such, this commit does not change
      the behavior of IPv4 control messages.
      Signed-off-by: NSoheil Hassas Yeganeh <soheil@google.com>
      Acked-by: NWillem de Bruijn <willemb@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      24025c46
    • S
      sock: accept SO_TIMESTAMPING flags in socket cmsg · 3dd17e63
      Soheil Hassas Yeganeh 提交于
      Accept SO_TIMESTAMPING in control messages of the SOL_SOCKET level
      as a basis to accept timestamping requests per write.
      
      This implementation only accepts TX recording flags (i.e.,
      SOF_TIMESTAMPING_TX_HARDWARE, SOF_TIMESTAMPING_TX_SOFTWARE,
      SOF_TIMESTAMPING_TX_SCHED, and SOF_TIMESTAMPING_TX_ACK) in
      control messages. Users need to set reporting flags (e.g.,
      SOF_TIMESTAMPING_OPT_ID) per socket via socket options.
      
      This commit adds a tsflags field in sockcm_cookie which is
      set in __sock_cmsg_send. It only override the SOF_TIMESTAMPING_TX_*
      bits in sockcm_cookie.tsflags allowing the control message
      to override the recording behavior per write, yet maintaining
      the value of other flags.
      
      This patch implements validating the control message and setting
      tsflags in struct sockcm_cookie. Next commits in this series will
      actually implement timestamping per write for different protocols.
      Signed-off-by: NSoheil Hassas Yeganeh <soheil@google.com>
      Acked-by: NWillem de Bruijn <willemb@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3dd17e63
    • S
      tcp: use one bit in TCP_SKB_CB to mark ACK timestamps · 6b084928
      Soheil Hassas Yeganeh 提交于
      Currently, to avoid a cache line miss for accessing skb_shinfo,
      tcp_ack_tstamp skips socket that do not have
      SOF_TIMESTAMPING_TX_ACK bit set in sk_tsflags. This is
      implemented based on an implicit assumption that the
      SOF_TIMESTAMPING_TX_ACK is set via socket options for the
      duration that ACK timestamps are needed.
      
      To implement per-write timestamps, this check should be
      removed and replaced with a per-packet alternative that
      quickly skips packets missing ACK timestamps marks without
      a cache-line miss.
      
      To enable per-packet marking without a cache line miss, use
      one bit in TCP_SKB_CB to mark a whether a SKB might need a
      ack tx timestamp or not. Further checks in tcp_ack_tstamp are not
      modified and work as before.
      Signed-off-by: NSoheil Hassas Yeganeh <soheil@google.com>
      Acked-by: NWillem de Bruijn <willemb@google.com>
      Acked-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6b084928
    • S
      tcp: accept SOF_TIMESTAMPING_OPT_ID for passive TFO · 6db8b963
      Soheil Hassas Yeganeh 提交于
      SOF_TIMESTAMPING_OPT_ID is set to get data-independent IDs
      to associate timestamps with send calls. For TCP connections,
      tp->snd_una is used as the starting point to calculate
      relative IDs.
      
      This socket option will fail if set before the handshake on a
      passive TCP fast open connection with data in SYN or SYN/ACK,
      since setsockopt requires the connection to be in the
      ESTABLISHED state.
      
      To address these, instead of limiting the option to the
      ESTABLISHED state, accept the SOF_TIMESTAMPING_OPT_ID option as
      long as the connection is not in LISTEN or CLOSE states.
      Signed-off-by: NSoheil Hassas Yeganeh <soheil@google.com>
      Acked-by: NWillem de Bruijn <willemb@google.com>
      Acked-by: NYuchung Cheng <ycheng@google.com>
      Acked-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6db8b963
    • W
      sock: break up sock_cmsg_snd into __sock_cmsg_snd and loop · 39771b12
      Willem de Bruijn 提交于
      To process cmsg's of the SOL_SOCKET level in addition to
      cmsgs of another level, protocols can call sock_cmsg_send().
      This causes a double walk on the cmsghdr list, one for SOL_SOCKET
      and one for the other level.
      
      Extract the inner demultiplex logic from the loop that walks the list,
      to allow having this called directly from a walker in the protocol
      specific code.
      Signed-off-by: NWillem de Bruijn <willemb@google.com>
      Signed-off-by: NSoheil Hassas Yeganeh <soheil@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      39771b12
  2. 03 4月, 2016 17 次提交
  3. 02 4月, 2016 13 次提交
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 05cf8077
      Linus Torvalds 提交于
      Pull networking fixes from David Miller:
      
       1) Missing device reference in IPSEC input path results in crashes
          during device unregistration.  From Subash Abhinov Kasiviswanathan.
      
       2) Per-queue ISR register writes not being done properly in macb
          driver, from Cyrille Pitchen.
      
       3) Stats accounting bugs in bcmgenet, from Patri Gynther.
      
       4) Lightweight tunnel's TTL and TOS were swapped in netlink dumps, from
          Quentin Armitage.
      
       5) SXGBE driver has off-by-one in probe error paths, from Rasmus
          Villemoes.
      
       6) Fix race in save/swap/delete options in netfilter ipset, from
          Vishwanath Pai.
      
       7) Ageing time of bridge not set properly when not operating over a
          switchdev device.  Fix from Haishuang Yan.
      
       8) Fix GRO regression wrt nested FOU/GUE based tunnels, from Alexander
          Duyck.
      
       9) IPV6 UDP code bumps wrong stats, from Eric Dumazet.
      
      10) FEC driver should only access registers that actually exist on the
          given chipset, fix from Fabio Estevam.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (73 commits)
        net: mvneta: fix changing MTU when using per-cpu processing
        stmmac: fix MDIO settings
        Revert "stmmac: Fix 'eth0: No PHY found' regression"
        stmmac: fix TX normal DESC
        net: mvneta: use cache_line_size() to get cacheline size
        net: mvpp2: use cache_line_size() to get cacheline size
        net: mvpp2: fix maybe-uninitialized warning
        tun, bpf: fix suspicious RCU usage in tun_{attach, detach}_filter
        net: usb: cdc_ncm: adding Telit LE910 V2 mobile broadband card
        rtnl: fix msg size calculation in if_nlmsg_size()
        fec: Do not access unexisting register in Coldfire
        net: mvneta: replace MVNETA_CPU_D_CACHE_LINE_SIZE with L1_CACHE_BYTES
        net: mvpp2: replace MVPP2_CPU_D_CACHE_LINE_SIZE with L1_CACHE_BYTES
        net: dsa: mv88e6xxx: Clear the PDOWN bit on setup
        net: dsa: mv88e6xxx: Introduce _mv88e6xxx_phy_page_{read, write}
        bpf: make padding in bpf_tunnel_key explicit
        ipv6: udp: fix UDP_MIB_IGNOREDMULTI updates
        bnxt_en: Fix ethtool -a reporting.
        bnxt_en: Fix typo in bnxt_hwrm_set_pause_common().
        bnxt_en: Implement proper firmware message padding.
        ...
      05cf8077
    • L
      Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux · cf78031a
      Linus Torvalds 提交于
      Pull clk fixes from Stephen Boyd:
       "A handful of const updates for reset ops and a couple fixes to the
        newly introduced IPQ4019 clock driver"
      
      * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
        clk: qcom: ipq4019: add some fixed clocks for ddrppl and fepll
        clk: qcom: ipq4019: switch remaining defines to enums
        clk: qcom: Make reset_control_ops const
        clk: tegra: Make reset_control_ops const
        clk: sunxi: Make reset_control_ops const
        clk: atlas7: Make reset_control_ops const
        clk: rockchip: Make reset_control_ops const
        clk: mmp: Make reset_control_ops const
        clk: mediatek: Make reset_control_ops const
      cf78031a
    • L
      Merge tag 'pm+acpi-4.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 1826907c
      Linus Torvalds 提交于
      Pull power management and ACPI fix from Rafael J. Wysocki:
       "Just one fix for a nasty boot failure on some systems based on Intel
        Skylake that shipped with broken firmware where enabling
        hardware-coordinated P-states management (HWP) causes a faulty
        interrupt handler in SMM to be invoked and crash the system (Srinivas
        Pandruvada)"
      
      * tag 'pm+acpi-4.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI / processor: Request native thermal interrupt handling via _OSC
      1826907c
    • L
      Merge branch 'akpm' (patches from Andrew) · 4e19fd93
      Linus Torvalds 提交于
      Merge fixes from Andrew Morton:
       "11 fixes"
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>:
        .mailmap: add Christophe Ricard
        Make CONFIG_FHANDLE default y
        mm/page_isolation.c: fix the function comments
        oom, oom_reaper: do not enqueue task if it is on the oom_reaper_list head
        mm/page_isolation: fix tracepoint to mirror check function behavior
        mm/rmap: batched invalidations should use existing api
        x86/mm: TLB_REMOTE_SEND_IPI should count pages
        mm: fix invalid node in alloc_migrate_target()
        include/linux/huge_mm.h: return NULL instead of false for pmd_trans_huge_lock()
        mm, kasan: fix compilation for CONFIG_SLAB
        MAINTAINERS: orangefs mailing list is subscribers-only
      4e19fd93
    • R
      Merge branch 'acpi-processor' · 8fbd4ade
      Rafael J. Wysocki 提交于
      * acpi-processor:
        ACPI / processor: Request native thermal interrupt handling via _OSC
      8fbd4ade
    • L
      Merge branch 'for-linus-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs · 82d2a348
      Linus Torvalds 提交于
      Pull btrfs fixes from Chris Mason:
       "This has a few fixes Dave Sterba had queued up.  These are all pretty
        small, but since they were tested I decided against waiting for more"
      
      * 'for-linus-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
        btrfs: transaction_kthread() is not freezable
        btrfs: cleaner_kthread() doesn't need explicit freeze
        btrfs: do not write corrupted metadata blocks to disk
        btrfs: csum_tree_block: return proper errno value
      82d2a348
    • L
      Merge tag 'for-linus' of git://github.com/martinbrandenburg/linux · 22fed397
      Linus Torvalds 提交于
      Pull OrangeFS fixes from Martin Brandenburg:
       "Two bugfixes for OrangeFS.
      
        One is a reference counting bug and the other is a typo in client
        minimum version"
      
      * tag 'for-linus' of git://github.com/martinbrandenburg/linux:
        orangefs: minimum userspace version is 2.9.3
        orangefs: don't put readdir slot twice
      22fed397
    • L
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 4fff5056
      Linus Torvalds 提交于
      Pull arm64 fixes from Will Deacon:
      
       - fix oops when patching in alternative sequences on big-endian CPUs
      
       - reconcile asm/perf_event.h after merge window fallout with KVM ARM
      
       - defconfig updates
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: defconfig: updates for 4.6
        arm64: perf: Move PMU register related defines to asm/perf_event.h
        arm64: opcodes.h: Add arm big-endian config options before including arm header
      4fff5056
    • L
      Merge tag 'sound-4.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 2708d17d
      Linus Torvalds 提交于
      Pull sound fixes from Takashi Iwai:
       "A collection of small fixes:
      
         - a fix in ALSA timer core to avoid possible BUG() trigger
         - a fix in ALSA timer core 32bit compat layer
         - a few HD-audio quirks for ASUS and HP machines
         - AMD HD-audio HDMI controller quirks
         - fixes of USB-audio double-free at some error paths
         - a fix for memory leak in DICE driver at hotunplug"
      
      * tag 'sound-4.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: timer: Use mod_timer() for rearming the system timer
        ALSA: hda - fix front mic problem for a HP desktop
        ALSA: usb-audio: Fix double-free in error paths after snd_usb_add_audio_stream() call
        ALSA: hda: add AMD Polaris-10/11 AZ PCI IDs with proper driver caps
        ALSA: dice: fix memory leak when unplugging
        ALSA: hda - Apply fix for white noise on Asus N550JV, too
        ALSA: hda - Fix white noise on Asus N750JV headphone
        ALSA: hda - Asus N750JV external subwoofer fixup
        ALSA: timer: fix gparams ioctl compatibility for different architectures
      2708d17d
    • C
      .mailmap: add Christophe Ricard · 394532e4
      Christophe Ricard 提交于
      Different computers had different settings in the mail client.  Some
      contributions appear as Christophe Ricard, others as Christophe RICARD.
      Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      394532e4
    • A
      Make CONFIG_FHANDLE default y · f76be617
      Andi Kleen 提交于
      Newer Fedora and OpenSUSE didn't boot with my standard configuration.
      It took me some time to figure out why, in fact I had to write a script
      to try different config options systematically.
      
      The problem is that something (systemd) in dracut depends on
      CONFIG_FHANDLE, which adds open by file handle syscalls.
      
      While it is set in defconfigs it is very easy to miss when updating
      older configs because it is not default y.
      
      Make it default y and also depend on EXPERT, as dracut use is likely
      widespread.
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      Cc: Richard Weinberger <richard.weinberger@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f76be617
    • N
      mm/page_isolation.c: fix the function comments · ec3b6882
      Neil Zhang 提交于
      Commit fea85cff ("mm/page_isolation.c: return last tested pfn rather
      than failure indicator") changed the meaning of the return value.  Let's
      change the function comments as well.
      Signed-off-by: NNeil Zhang <neilzhang1123@hotmail.com>
      Cc: Joonsoo Kim <js1304@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ec3b6882
    • M
      oom, oom_reaper: do not enqueue task if it is on the oom_reaper_list head · af8e15cc
      Michal Hocko 提交于
      Commit bb29902a ("oom, oom_reaper: protect oom_reaper_list using
      simpler way") has simplified the check for tasks already enqueued for
      the oom reaper by checking tsk->oom_reaper_list != NULL.  This check is
      not sufficient because the tsk might be the head of the queue without
      any other tasks queued and then we would simply lockup looping on the
      same task.  Fix the condition by checking for the head as well.
      
      Fixes: bb29902a ("oom, oom_reaper: protect oom_reaper_list using simpler way")
      Signed-off-by: NMichal Hocko <mhocko@suse.com>
      Acked-by: NTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      af8e15cc