1. 03 May, 2013 1 commit
  2. 02 May, 2013 21 commits
    • Mugunthan V N's avatar
      drivers: net: cpsw: irq not disabled in cpsw isr in particular sequence · af5c6df7
      Mugunthan V N authored
      In CPSW NAPI, after processing all interrupts IRQ is enabled and then book
      keeping irq_enabled is updated. In random cases when a packet is transmitted
      or received between processing packets and IRQ enabled, then just after
      enabled IRQ and before irq_enabled is updated, ISR is called so IRQs are
      not disabled as irq_enabled is still false and CPU gets locked in CPSW ISR.
      
      By changing the sequence as update the irq_enabled and then enable IRQ
      fixes the issue. This issue is not captured always as it is a timing issue
      whether Tx or Rx IRQ is invoked between packet processing and enable IRQ.
      
      Cc: Sebastian Siewior <bigeasy@linutronix.de>
      Signed-off-by: default avatarMugunthan V N <mugunthanvnm@ti.com>
      Acked-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      af5c6df7
    • Wei Liu's avatar
      xen-netback: better names for thresholds · 37641494
      Wei Liu authored
      This patch only changes some names to avoid confusion.
      
      In this patch we have:
      
        MAX_SKB_SLOTS_DEFAULT -> FATAL_SKB_SLOTS_DEFAULT
        max_skb_slots -> fatal_skb_slots
        #define XEN_NETBK_LEGACY_SLOTS_MAX XEN_NETIF_NR_SLOTS_MIN
      
      The fatal_skb_slots is the threshold to determine whether a packet is
      malicious.
      
      XEN_NETBK_LEGACY_SLOTS_MAX is the maximum slots a valid packet can have at
      this point. It is defined to be XEN_NETIF_NR_SLOTS_MIN because that's
      guaranteed to be supported by all backends.
      Suggested-by: default avatarIan Campbell <ian.campbell@citrix.com>
      Signed-off-by: default avatarWei Liu <wei.liu2@citrix.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      37641494
    • Wei Liu's avatar
      xen-netback: avoid allocating variable size array on stack · 59ccb4eb
      Wei Liu authored
      Tune xen_netbk_count_requests to not touch working array beyond limit, so that
      we can make working array size constant.
      Suggested-by: default avatarJan Beulich <jbeulich@suse.com>
      Signed-off-by: default avatarWei Liu <wei.liu2@citrix.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      59ccb4eb
    • Wei Liu's avatar
      xen-netback: remove redundent parameter in netbk_count_requests · ac69c26e
      Wei Liu authored
      Tracking down from the caller, first_idx is always equal to vif->tx.req_cons.
      Remove it to avoid confusion.
      Suggested-by: default avatarJan Beulich <jbeulich@suse.com>
      Signed-off-by: default avatarWei Liu <wei.liu2@citrix.com>
      Acked-by: default avatarIan Campbell <ian.campbell@citrix.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ac69c26e
    • Somnath Kotur's avatar
      be2net: Fix to fail probe if MSI-X enable fails for a VF · c2bba3df
      Somnath Kotur authored
      As per SPEC, INTx mode is not supported on VFs. So if enable_msix fails,
      then just fail probe. Also bail out of be_open if irq_register fails.
      Signed-off-by: default avatarSomnath Kotur <somnath.kotur@emulex.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c2bba3df
    • Somnath Kotur's avatar
      be2net: avoid napi_disable() when it has not been enabled · 04d3d624
      Somnath Kotur authored
      When RQ creation fails in be_open(), driver jumps to be_close() where
      napi_disable() is done without a prior napi_enable(); leading to a hang.
      This change is needed as there is no way to see if napi is enable/disabled.
      Signed-off-by: default avatarKalesh AP <kalesh.purayil@emulex.com>
      Signed-off-by: default avatarSomnath Kotur <somnath.kotur@emulex.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      04d3d624
    • Somnath Kotur's avatar
      be2net: Fix firmware download for Lancer · 701962d0
      Somnath Kotur authored
      Increasing the timeout value of write_object command to 60 seconds as
      30 second timeout was found to be not enough for the command to complete.
      Signed-off-by: default avatarKalesh AP <kalesh.purayil@emulex.com>
      Signed-off-by: default avatarSomnath Kotur <somnath.kotur@emulex.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      701962d0
    • Ajit Khaparde's avatar
      be2net: Fix to receive Multicast Packets when Promiscuous mode is enabled on certain devices · c5dae588
      Ajit Khaparde authored
      When a user requests Promiscuous mode on SkyHawk-R devices,
      the FW enables Desparate Promiscuous mode.
      Due to this, we need to explicitly enable Multicast Promiscuous mode
      so that Multicast packets are received as well.
      
      This patch fixes that.
      Signed-off-by: default avatarAjit Khaparde <ajit.khaparde@emulex.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c5dae588
    • Ajit Khaparde's avatar
      be2net: Fix to show tx priority pause counter in ethtool -S · b5adffc4
      Ajit Khaparde authored
      The tx priority pause count is available with the driver.
      But we were not showing it.
      This change should fix it and display it in ethtool stats.
      Signed-off-by: default avatarAjit Khaparde <ajit.khaparde@emulex.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b5adffc4
    • Ajit Khaparde's avatar
      be2net: Fix to use 32-bit stats to report rx_drops_no_fragment · a6c578ef
      Ajit Khaparde authored
      Only BE devices provide 16-bit counter for rx_drops_no_fragment.
      All other devices provide a 32-bit counter for this stat.
      Use the 32-bit value where available.
      Signed-off-by: default avatarAjit Khaparde <ajit.khaparde@emulex.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a6c578ef
    • Ajit Khaparde's avatar
      be2net: Fix to use version 2 of cq_create for SkyHawk-R devices · bbdc42f8
      Ajit Khaparde authored
      SkyHawk-R devices should use v2 of cq_create command.
      BE3/BE2 devices can use version 0 of the command to create a CQ.
      Signed-off-by: default avatarAjit Khaparde <ajit.khaparde@emulex.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bbdc42f8
    • Bjørn Mork's avatar
      b29d3145
    • Patrick McHardy's avatar
    • Linus Torvalds's avatar
      Merge tag 'multiplatform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 99c6bcf4
      Linus Torvalds authored
      Pull ARM SoC multiplatform updates from Olof Johansson:
       "More multiplatform enablement for ARM platforms.  The ones converted
        in this branch are:
      
         - bcm2835
         - cns3xxx
         - sirf
         - nomadik
         - msx
         - spear
         - tegra
         - ux500
      
        We're getting close to having most of them converted!
      
        One of the larger platforms remaining is Samsung Exynos, and there are
        a bunch of supporting patches in this merge window for it.  There was
        a patch in this branch to a early version of multiplatform conversion,
        but it ended up being reverted due to need of more bake time.  The
        revert commit is part of the branch since it would have required
        rebasing multiple dependent branches and they were stable by then"
      
      * tag 'multiplatform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (70 commits)
        mmc: sdhci-s3c: Fix operation on non-single image Samsung platforms
        clocksource: nomadik-mtu: fix up clocksource/timer
        Revert "ARM: exynos: enable multiplatform support"
        ARM: SPEAr13xx: Fix typo "ARCH_HAVE_CPUFREQ"
        ARM: exynos: enable multiplatform support
        rtc: s3c: make header file local
        mtd: onenand/samsung: make regs-onenand.h file local
        thermal/exynos: remove unnecessary header inclusions
        mmc: sdhci-s3c: remove platform dependencies
        ARM: samsung: move mfc device definition to s5p-dev-mfc.c
        ARM: exynos: move debug-macro.S to include/debug/
        ARM: exynos: prepare for sparse IRQ
        ARM: exynos: introduce EXYNOS_ATAGS symbol
        ARM: tegra: build assembly files with -march=armv7-a
        ARM: Push selects for TWD/SCU into machine entries
        ARM: ux500: build hotplug.o for ARMv7-a
        ARM: ux500: move to multiplatform
        ARM: ux500: make remaining headers local
        ARM: ux500: make irqs.h local to platform
        ARM: ux500: get rid of <mach/[hardware|db8500-regs].h>
        ...
      99c6bcf4
    • Linus Torvalds's avatar
      Merge tag 'soc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 97b1007a
      Linus Torvalds authored
      Pull ARM SoC platform updates from Olof Johansson:
       "This branch contains part 1 of the platform updates for 3.10.  Among
        the highlights:
      
         - Support for the new Atmel Cortex-A5 based platforms (SAMA5D3)
         - New support for CSR SiRFatlas6 SoCs
         - A handful of updates for NVidia T114 (a.k.a. Tegra 4)
         - A bunch of updates for the shmobile platforms
         - A handful of updates for davinci
         - A few updates for Qualcomm MSM
         - Plus a handful of other patches, defconfig updates, etc."
      
      * tag 'soc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (135 commits)
        ARM: tegra: pm: fix build error w/o PM_SLEEP
        ARM: davinci: ensure global variables are declared
        ARM: davinci: sram.c: fix incorrect type in assignment
        ARM: davinci: da8xx dt: make file local symbols static
        ARM: davinci: da8xx: add remoteproc support
        ARM: socfpga: Upgrade clk driver for socfpga to make use of dts clock entries
        ARM: socfpga: Add clock entries into device tree
        ARM: socfpga: Enable soft reset
        ARM: EXYNOS: replace cpumask by the corresponding macro
        ARM: EXYNOS: handle properly the return values
        ARM: EXYNOS: factor out the idle states
        ARM: OMAP4: Enable fix for Cortex-A9 erratas
        ARM: OMAP2+: Export SoC information to userspace
        ARM: OMAP2+: SoC name and revision unification
        ARM: OMAP2+: Move common part of late init into common function
        ARM: tegra: pm: remove duplicated include from pm.c
        ARM: davinci: da850: override mmc DT node device name
        ARM: davinci: da850: add mmc DT entries
        mmc: davinci_mmc: add DT support
        ARM: SAMSUNG: check processor type before cache restoration in resume
        ...
      97b1007a
    • Linus Torvalds's avatar
      Merge tag 'dt-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · dfab34aa
      Linus Torvalds authored
      Pull ARM SoC device-tree updates from Olof Johansson:
       "Part 1 of device-tree updates for 3.10.  The bulk of the churn in this
        branch is due to i.MX moving from C-defined pin control over to device
        tree, which is a one-time conversion that will allow greater
        flexibility down the road.
      
        Besides that, there's PCI-e bindings for Marvell mvebu platforms and a
        handful of cleanups to tegra due to the new include file functionality
        of the device tree compiler"
      
      * tag 'dt-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (113 commits)
        arm: mvebu: PCIe Device Tree informations for Armada XP GP
        arm: mvebu: PCIe Device Tree informations for Armada 370 DB
        arm: mvebu: PCIe Device Tree informations for Armada 370 Mirabox
        arm: mvebu: PCIe Device Tree informations for Armada XP DB
        arm: mvebu: PCIe Device Tree informations for OpenBlocks AX3-4
        arm: mvebu: add PCIe Device Tree informations for Armada XP
        arm: mvebu: add PCIe Device Tree informations for Armada 370
        ARM: sunxi: unify osc24M_fixed and osc24M
        arm: vt8500: Add SDHC support to WM8505 DT
        ARM: dts: Add a 64 bits version of the skeleton device tree
        ARM: mvebu: Add Device Bus and CFI flash memory support to defconfig
        ARM: mvebu: Add support for NOR flash device on Openblocks AX3 board
        ARM: mvebu: Add support for NOR flash device on Armada XP-GP board
        ARM: mvebu: Add Device Bus support for Armada 370/XP SoC
        ARM: dts: imx6dl-wandboard: Add USB Host support
        ARM: dts: imx51 cpu node
        ARM: dts: Add missing imx27-phytec-phycore dtb target
        ARM: dts: Add NFC support for i.MX27 Phytec PCM038 module
        ARM: i.MX51: Add PATA support
        ARM: dts: Add initial support for Wandboard Dual-Lite
        ...
      dfab34aa
    • Linus Torvalds's avatar
      Merge tag 'cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · a7726350
      Linus Torvalds authored
      Pull ARM SoC cleanup from Olof Johansson:
       "Here is a collection of cleanup patches.  Among the pieces that stand
        out are:
      
         - The deletion of h720x platforms
         - Split of at91 non-dt platforms to their own Kconfig file to keep
           them separate
         - General cleanups and refactoring of i.MX and MXS platforms
         - Some restructuring of clock tables for OMAP
         - Convertion of PMC driver for Tegra to dt-only
         - Some renames of sunxi -> sun4i (Allwinner A10)
         - ... plus a bunch of other stuff that I haven't mentioned"
      
      * tag 'cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (119 commits)
        ARM: i.MX: remove unused ARCH_* configs
        ARM i.MX53: remove platform ahci support
        ARM: sunxi: Rework the restart code
        irqchip: sunxi: Rename sunxi to sun4i
        irqchip: sunxi: Make use of the IRQCHIP_DECLARE macro
        clocksource: sunxi: Rename sunxi to sun4i
        clocksource: sunxi: make use of CLKSRC_OF
        clocksource: sunxi: Cleanup the timer code
        ARM: at91: remove trailing semicolon from macros
        ARM: at91/setup: fix trivial typos
        ARM: EXYNOS: remove "config EXYNOS_DEV_DRM"
        ARM: EXYNOS: change the name of USB ohci header
        ARM: SAMSUNG: Remove unnecessary code for dma
        ARM: S3C24XX: Remove unused GPIO drive strength register definitions
        ARM: OMAP4+: PM: Restore CPU power state to ON with clockdomain force wakeup method
        ARM: S3C24XX: Removed unneeded dependency on CPU_S3C2412
        ARM: S3C24XX: Removed unneeded dependency on CPU_S3C2410
        ARM: S3C24XX: Removed unneeded dependency on ARCH_S3C24XX for boards
        ARM: SAMSUNG: Fix typo "CONFIG_SAMSUNG_DEV_RTC"
        ARM: S5P64X0: Fix typo "CONFIG_S5P64X0_SETUP_SDHCI"
        ...
      a7726350
    • Linus Torvalds's avatar
      Merge tag 'fixes-nc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 4d26aa30
      Linus Torvalds authored
      Pull ARM SoC non-critical fixes from Olof Johansson:
       "Here is a collection of fixes (and some intermixed cleanups) that were
        considered less important and thus not included in the later parts of
        the 3.9-rc cycle.
      
        It's a bit all over the map, contents wise.  A series of ux500 fixes
        and cleanups, a bunch of various fixes for OMAP and tegra, and some
        for Freescale i.MX and even Qualcomm MSM.
      
        Note that there's also a patch on this branch to globally turn off
        -Wmaybe-uninitialized when building with -Os.  It's been posted
        several times by Arnd and no dissent was raised, but nobody seemed
        interested to pick it up.  So here it is, as the topmost patch."
      
      * tag 'fixes-nc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (70 commits)
        Turn off -Wmaybe-uninitialized when building with -Os
        ARM: orion5x: include linux/cpu.h
        ARM: tegra: call cpu_do_idle from C code
        ARM: u300: fix ages old copy/paste bug
        ARM: OMAP2+: add dependencies on ARCH_MULTI_V6/V7
        ARM: tegra: solve adr range issue with THUMB2_KERNEL enabled
        ARM: tegra: fix relocation truncated error when THUMB2_KERNEL enabled
        ARM: tegra: fix build error when THUMB2_KERNEL enabled
        ARM: msm: Fix uncompess.h tx underrun check
        ARM: vexpress: Remove A9 PMU compatible values for non-A9 platforms
        ARM: cpuimx27 and mbimx27: prepend CONFIG_ to Kconfig macro
        ARM: OMAP2+: fix typo "CONFIG_BRIDGE_DVFS"
        ARM: OMAP1: remove "config MACH_OMAP_HTCWIZARD"
        ARM: mach-imx: mach-imx6q: Fix sparse warnings
        ARM: mach-imx: src: Include "common.h
        ARM: mach-imx: gpc: Include "common.h"
        ARM: mach-imx: avic: Staticize *avic_base
        ARM: mach-imx: tzic: Staticize *tzic_base
        ARM: mach-imx: clk: Include "clk.h"
        ARM: mach-imx: clk-busy: Staticize clk_busy_mux_ops
        ...
      4d26aa30
    • Al Viro's avatar
      ipc_schedule_free() can do vfree() directly now · 600fe975
      Al Viro authored
      Commit 32fcfd40 ("make vfree() safe to call from interrupt
      contexts") made it safe to do vfree directly from the RCU callback,
      which allows us to simplify ipc/util.c a lot by getting rid of the
      differences between vmalloc/kmalloc memory.
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      600fe975
    • David Miller's avatar
      net: Restore NETIF_F_* bit ordering. · 4ada8db3
      David Miller authored
      Commit 8ad227ff ("net: vlan: add 802.1ad support") added some new
      NETIF_F_* features bits, but it added them in the middle of existing
      values.
      
      Userland depends upon the flag bits via the per-netdevice 'flags' sysfs
      file.
      
      So restore the previous ordering by adding the new flags at the end.
      Reported-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      4ada8db3
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 20b4fb48
      Linus Torvalds authored
      Pull VFS updates from Al Viro,
      
      Misc cleanups all over the place, mainly wrt /proc interfaces (switch
      create_proc_entry to proc_create(), get rid of the deprecated
      create_proc_read_entry() in favor of using proc_create_data() and
      seq_file etc).
      
      7kloc removed.
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (204 commits)
        don't bother with deferred freeing of fdtables
        proc: Move non-public stuff from linux/proc_fs.h to fs/proc/internal.h
        proc: Make the PROC_I() and PDE() macros internal to procfs
        proc: Supply a function to remove a proc entry by PDE
        take cgroup_open() and cpuset_open() to fs/proc/base.c
        ppc: Clean up scanlog
        ppc: Clean up rtas_flash driver somewhat
        hostap: proc: Use remove_proc_subtree()
        drm: proc: Use remove_proc_subtree()
        drm: proc: Use minor->index to label things, not PDE->name
        drm: Constify drm_proc_list[]
        zoran: Don't print proc_dir_entry data in debug
        reiserfs: Don't access the proc_dir_entry in r_open(), r_start() r_show()
        proc: Supply an accessor for getting the data from a PDE's parent
        airo: Use remove_proc_subtree()
        rtl8192u: Don't need to save device proc dir PDE
        rtl8187se: Use a dir under /proc/net/r8180/
        proc: Add proc_mkdir_data()
        proc: Move some bits from linux/proc_fs.h to linux/{of.h,signal.h,tty.h}
        proc: Move PDE_NET() to fs/proc/proc_net.c
        ...
      20b4fb48
  3. 01 May, 2013 18 commits
    • Linus Torvalds's avatar
      Merge branch 'x86-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · b9394d8a
      Linus Torvalds authored
      Pull x86/efi changes from Peter Anvin:
       "The bulk of these changes are cleaning up the efivars handling and
        breaking it up into a tree of files.  There are a number of fixes as
        well.
      
        The entire changeset is pretty big, but most of it is code movement.
      
        Several of these commits are quite new; the history got very messed up
        due to a mismerge with the urgent changes for rc8 which completely
        broke IA64, and so Ingo requested that we rebase it to straighten it
        out."
      
      * 'x86-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        efi: remove "kfree(NULL)"
        efi: locking fix in efivar_entry_set_safe()
        efi, pstore: Read data from variable store before memcpy()
        efi, pstore: Remove entry from list when erasing
        efi, pstore: Initialise 'entry' before iterating
        efi: split efisubsystem from efivars
        efivarfs: Move to fs/efivarfs
        efivars: Move pstore code into the new EFI directory
        efivars: efivar_entry API
        efivars: Keep a private global pointer to efivars
        efi: move utf16 string functions to efi.h
        x86, efi: Make efi_memblock_x86_reserve_range more readable
        efivarfs: convert to use simple_open()
      b9394d8a
    • James Hogan's avatar
      linkage.h: fix build breakage due to symbol prefix handling · 126de6b2
      James Hogan authored
      Al's commit e1b5bb6d ("consolidate cond_syscall and SYSCALL_ALIAS
      declarations") broke the build on blackfin and metag due to the
      following code:
      
        #ifndef SYMBOL_NAME
        #ifdef CONFIG_SYMBOL_PREFIX
        #define SYMBOL_NAME(x) CONFIG_SYMBOL_PREFIX ## x
        #else
        #define SYMBOL_NAME(x) x
        #endif
        #endif
        #define __SYMBOL_NAME(x) __stringify(SYMBOL_NAME(x))
      
      __stringify literally stringifies CONFIG_SYMBOL_PREFIX ##x, so you get
      lines like this in kernel/sys_ni.s:
      
        .weak CONFIG_SYMBOL_PREFIXsys_quotactl
        .set CONFIG_SYMBOL_PREFIXsys_quotactl,CONFIG_SYMBOL_PREFIXsys_ni_syscall
      
      The patches in Rusty's modules-next tree such as "CONFIG_SYMBOL_PREFIX:
      cleanup." cleans up the whole mess around symbol prefixes, so this patch
      just attempts to fix the build in the meantime.
      
      The intermediate definition of SYMBOL_NAME above isn't used and is
      incorrect when CONFIG_SYMBOL_PREFIX is defined as CONFIG_SYMBOL_PREFIX
      is a quoted string literal, so define __SYMBOL_NAME directly depending
      on CONFIG_SYMBOL_PREFIX.
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      Mea-culpa-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Mike Frysinger <vapier@gentoo.org>
      Cc: uclinux-dist-devel@blackfin.uclinux.org
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      126de6b2
    • Al Viro's avatar
      don't bother with deferred freeing of fdtables · ac3e3c5b
      Al Viro authored
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      ac3e3c5b
    • Al Viro's avatar
      Merge branch 'vfree' into for-next · 094dd33b
      Al Viro authored
      094dd33b
    • David Howells's avatar
      proc: Move non-public stuff from linux/proc_fs.h to fs/proc/internal.h · 59d8053f
      David Howells authored
      Move non-public declarations and definitions from linux/proc_fs.h to
      fs/proc/internal.h.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      59d8053f
    • David Howells's avatar
      proc: Make the PROC_I() and PDE() macros internal to procfs · c30480b9
      David Howells authored
      Make the PROC_I() and PDE() macros internal to procfs.  This means making
      PDE_DATA() out of line.  This could be made more optimal by storing
      PDE()->data into inode->i_private.
      
      Also provide a __PDE_DATA() that is inline and internal to procfs.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      c30480b9
    • David Howells's avatar
      proc: Supply a function to remove a proc entry by PDE · a8ca16ea
      David Howells authored
      Supply a function (proc_remove()) to remove a proc entry (and any subtree
      rooted there) by proc_dir_entry pointer rather than by name and (optionally)
      root dir entry pointer.  This allows us to eliminate all remaining pde->name
      accesses outside of procfs.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Acked-by: default avatarGrant Likely <grant.likely@linaro.or>
      cc: linux-acpi@vger.kernel.org
      cc: openipmi-developer@lists.sourceforge.net
      cc: devicetree-discuss@lists.ozlabs.org
      cc: linux-pci@vger.kernel.org
      cc: netdev@vger.kernel.org
      cc: netfilter-devel@vger.kernel.org
      cc: alsa-devel@alsa-project.org
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      a8ca16ea
    • Al Viro's avatar
      8d8b97ba
    • David Howells's avatar
      ppc: Clean up scanlog · 4c237820
      David Howells authored
      Clean up the pseries scanlog driver's use of procfs:
      
       (1) Don't need to save the proc_dir_entry pointer as we have the filename to
           remove with.
      
       (2) Save the scan log buffer pointer in a static variable (there is only one
           of it) and don't save it in the PDE (which doesn't have a destructor).
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      cc: Paul Mackerras <paulus@samba.org>
      cc: linuxppc-dev@lists.ozlabs.org
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      4c237820
    • David Howells's avatar
      ppc: Clean up rtas_flash driver somewhat · e8eeded3
      David Howells authored
      Clean up some of the problems with the rtas_flash driver:
      
       (1) It shouldn't fiddle with the internals of the procfs filesystem (altering
           pde->count).
      
       (2) If pid namespaces are in effect, then you can get multiple inodes
           connected to a single pde, thereby rendering the pde->count > 2 test
           useless.
      
       (3) The pde->count fudging doesn't work for forked, dup'd or cloned file
           descriptors, so add static mutexes and use them to wrap access to the
           driver through read, write and release methods.
      
       (4) The driver can only handle one device, so allocate most of the data
           previously attached to the pde->data as static variables instead (though
           allocate the validation data buffer with kmalloc).
      
       (5) We don't need to save the pde pointers as long as we have the filenames
           available for removal.
      
       (6) Don't try to multiplex what the update file read method does based on the
           filename.  Instead provide separate file ops and split the function.
      
      Whilst we're at it, tabulate the procfile information and loop through it when
      creating or destroying them rather than manually coding each one.
      
      [Folded fixes from Vasant Hegde <hegdevasant@linux.vnet.ibm.com>]
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      cc: Paul Mackerras <paulus@samba.org>
      cc: Anton Blanchard <anton@samba.org>
      cc: linuxppc-dev@lists.ozlabs.org
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      e8eeded3
    • David Howells's avatar
      hostap: proc: Use remove_proc_subtree() · 819695ab
      David Howells authored
      Use remove_proc_subtree() rather than remove_proc_entry() to remove a
      device-specific proc directory and all its children.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      cc: Jouni Malinen <j@w1.fi>
      cc: Johannes Berg <johannes@sipsolutions.net>
      cc: linux-wireless@vger.kernel.org
      cc: devel@driverdev.osuosl.org
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      819695ab
    • David Howells's avatar
      drm: proc: Use remove_proc_subtree() · 8bc742e1
      David Howells authored
      Use remove_proc_subtree() rather than remove_proc_entry() to remove a
      minor-specific drm proc directory and all its children.
      
      Things could theoretically be improved by storing the drm_minor pointer in the
      minor-specific dir proc_dir_entry struct data and then scrapping the list of
      proc files - but that's shared with the debugfs interface where you can't do
      that, so I don't see an easy way of doing it.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      cc: dri-devel@lists.freedesktop.org
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      8bc742e1
    • David Howells's avatar
      drm: proc: Use minor->index to label things, not PDE->name · b63e6aa5
      David Howells authored
      Use minor->index to label things, not the name field from the proc_dir_entry
      of the /proc/dwm/<minor>/ directory.
      
      Also, use "%u" not "%d" to render the value and use a 12-byte buffer in which
      to render the integer, not a 16-byte buffer.  The longest string an unsigned
      int can give you is 10 chars (4294967295) plus a NUL, so round up to 12 as the
      stack is likely to be 4- or 8-byte aligned.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      cc: dri-devel@lists.freedesktop.org
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      b63e6aa5
    • David Howells's avatar
      drm: Constify drm_proc_list[] · ce089b54
      David Howells authored
      Constify drm_proc_list[] and related pointers.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      cc: dri-devel@lists.freedesktop.org
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      ce089b54
    • David Howells's avatar
      zoran: Don't print proc_dir_entry data in debug · 0c2f3438
      David Howells authored
      Don't print proc_dir_entry data in debug as we're soon to have no direct
      access to the contents of the PDE.  Print what was put in there instead.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      cc: mjpeg-users@lists.sourceforge.net
      cc: linux-media@vger.kernel.org
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      0c2f3438
    • David Howells's avatar
      reiserfs: Don't access the proc_dir_entry in r_open(), r_start() r_show() · e42270a1
      David Howells authored
      Don't access the proc_dir_entry in ReiserFS's r_open(), r_start() r_show()
      procfs interface functions.
      
      ReiserFS stores the ->show() method pointer in PDE->data and the super_block
      pointer in PDE->parent->data.  This isn't changing.
      
      Currently, ReiserFS passes the PDE pointer into seq_file::private from
      r_open() so that r_start() and r_show() can then access it.  Instead, use
      seq_open_private() to allocate a two-pointer struct that's passed through
      seq_file::private and put the ->show() method and the sb pointers in there.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      cc: reiserfs-devel@vger.kernel.org
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      e42270a1
    • David Howells's avatar
      proc: Supply an accessor for getting the data from a PDE's parent · 4a520d27
      David Howells authored
      Supply an accessor function for getting the private data from the parent
      proc_dir_entry struct of the proc_dir_entry struct associated with an inode.
      
      ReiserFS, for instance, stores the super_block pointer in the proc directory
      it makes for that super_block, and a pointer to the respective seq_file show
      function in each of the proc files in that directory.
      
      This allows a reduction in the number of file_operations structs, open
      functions and seq_operations structs required.  The problem otherwise is that
      each show function requires two pieces of data but only has storage for one
      per PDE (and this has no release function).
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Acked-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      Acked-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      cc: Jerry Chuang <jerry-chuang@realtek.com>
      cc: Maxim Mikityanskiy <maxtram95@gmail.com>
      cc: YAMANE Toshiaki <yamanetoshi@gmail.com>
      cc: linux-wireless@vger.kernel.org
      cc: linux-scsi@vger.kernel.org
      cc: devel@driverdev.osuosl.org
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      4a520d27
    • David Howells's avatar
      airo: Use remove_proc_subtree() · b25f774d
      David Howells authored
      Use remove_proc_subtree() to remove the airo device subdir and all its
      children instead of doing it manually.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      cc: linux-wireless@vger.kernel.org
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      b25f774d