1. 13 Jan, 2011 1 commit
    • Tony Lindgren's avatar
      omap4: Fix ULPI PHY init for ES1.0 SDP · 7d4ca85a
      Tony Lindgren authored
      Commit 6aa85a5a (omap4: 4430sdp:
      enable the ehci port on 4430SDP) added code to enable EHCI
      support on 4430sdp board.
      
      Looks like the ULPI pin does not seem to be muxed properly on ES1.0
      SDP and this causes the system to reboot when the ULPI PHY is
      enabled.
      
      Fix this by muxing the pin, this is the same setting for
      both ES1.0 and ES2.0. Also add checking for gpio_request.
      
      Cc: Keshava Munegowda <keshava_mgowda@ti.com
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      7d4ca85a
  2. 12 Jan, 2011 1 commit
    • Koen Kooi's avatar
      omap3: beaglexm: fix power on of DVI · 1bd9ef19
      Koen Kooi authored
      TFP410 DVI chip is used to provide display out.
      This chip is controlled by 2 lines:
      LDO which supplies the power is controlled over gpio + 2
      and the enable of the chip itself is done over gpio + 1
      NOTE: the LDO is necessary for LED, serial blocks as well.
      
      gpio + 1 was used to sense USB overcurrent in vanilla beagle.
      
      Without this fix, the display would not function as the LDO
      remains shut down.
      
      [nm@ti.com: split up, added descriptive changelogs]
      Signed-off-by: default avatarNishanth Menon <nm@ti.com>
      Signed-off-by: default avatarKoen Kooi <koen@beagleboard.org>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      1bd9ef19
  3. 11 Jan, 2011 3 commits
  4. 10 Jan, 2011 6 commits
  5. 07 Jan, 2011 29 commits
    • Santosh Shilimkar's avatar
      omap2plus: prm: Trvial build break fix for undefined reference to 'omap2_prm_read_mod_reg' · 56a6a19d
      Santosh Shilimkar authored
      omap2plus_defocnfig build breaks when customised with only ARCH_OMAP4
      selected. This is because common files make references to the functions
      which are defined only for omap2xxx and omap3xxx.
      
       LD      .tmp_vmlinux1
      arch/arm/mach-omap2/built-in.o: In function `pm_dbg_regset_store':
      arch/arm/mach-omap2/pm-debug.c:335: undefined reference to `omap2_prm_read_mod_reg'
      arch/arm/mach-omap2/built-in.o: In function `omap2_pm_dump':
      arch/arm/mach-omap2/pm-debug.c:121: undefined reference to `omap2_prm_read_mod_reg'
      arch/arm/mach-omap2/pm-debug.c:123: undefined reference to `omap2_prm_read_mod_reg'
      arch/arm/mach-omap2/pm-debug.c:124: undefined reference to `omap2_prm_read_mod_reg'
      arch/arm/mach-omap2/pm-debug.c:125: undefined reference to `omap2_prm_read_mod_reg'
      arch/arm/mach-omap2/built-in.o: In function `omap_prcm_arch_reset':
      arch/arm/mach-omap2/prcm.c:106: undefined reference to `omap2_prm_set_mod_reg_bits'
      arch/arm/mach-omap2/prcm.c:108: undefined reference to `omap2_prm_read_mod_reg'
      arch/arm/mach-omap2/built-in.o: In function `omap_prcm_get_reset_sources':
      arch/arm/mach-omap2/prcm.c:53: undefined reference to `omap2_prm_read_mod_reg'
      arch/arm/mach-omap2/built-in.o: In function `clkdm_clear_all_wkdeps':
      arch/arm/mach-omap2/clockdomain.c:545: undefined reference to `omap2_prm_clear_mod_reg_bits'
      arch/arm/mach-omap2/built-in.o: In function `clkdm_del_wkdep':
      arch/arm/mach-omap2/clockdomain.c:475: undefined reference to `omap2_prm_clear_mod_reg_bits'
      arch/arm/mach-omap2/built-in.o: In function `clkdm_read_wkdep':
      arch/arm/mach-omap2/clockdomain.c:511: undefined reference to `omap2_prm_read_mod_bits_shift'
      arch/arm/mach-omap2/built-in.o: In function `clkdm_add_wkdep':
      arch/arm/mach-omap2/clockdomain.c:440: undefined reference to `omap2_prm_set_mod_reg_bits'
      make: *** [.tmp_vmlinux1] Error 1
      
      This patch adds stubs for these functions so that build continues to work.
      Signed-off-by: default avatarSantosh Shilimkar <santosh.shilimkar@ti.com>
      Acked-by: default avatarPaul Walmsley <paul@pwsan.com>
      Signed-off-by: default avatarKevin Hilman <khilman@ti.com>
      56a6a19d
    • Santosh Shilimkar's avatar
      omap2plus: voltage: Trivial linking fix for 'EINVAL' undeclared · faacebc5
      Santosh Shilimkar authored
      CC      arch/arm/mach-omap2/omap_hwmod_common_data.o
      In file included from arch/arm/plat-omap/include/plat/omap_hwmod.h:38,
                       from arch/arm/mach-omap2/omap_hwmod_common_data.c:20:
      arch/arm/plat-omap/include/plat/voltage.h: In function 'omap_voltage_late_init':
      arch/arm/plat-omap/include/plat/voltage.h:145: error: 'EINVAL' undeclared (first use in this function)
      arch/arm/plat-omap/include/plat/voltage.h:145: error: (Each undeclared identifier is reported only once
      arch/arm/plat-omap/include/plat/voltage.h:145: error: for each function it appears in.)
      make[1]: *** [arch/arm/mach-omap2/omap_hwmod_common_data.o] Error 1
      make: *** [arch/arm/mach-omap2] Error 2
      
      The error is reported when omap2plus_defconfig built with CONFIG_PM disabled
      Signed-off-by: default avatarSantosh Shilimkar <santosh.shilimkar@ti.com>
      Cc: Thara Gopinath <thara@ti.com>
      Cc: Kevin Hilman <khilman@deeprootsystems.com>
      Cc: Nishanth Menon <nm@ti.com>
      Signed-off-by: default avatarKevin Hilman <khilman@ti.com>
      faacebc5
    • Santosh Shilimkar's avatar
      omap2plus: voltage: Trivial linking fix 'undefined reference' · dd361b6f
      Santosh Shilimkar authored
      LD      init/built-in.o
      LD      .tmp_vmlinux1
      arch/arm/mach-omap2/built-in.o: In function `omap2_set_init_voltage':
      arch/arm/mach-omap2/pm.c:181: undefined reference to `omap_voltage_domain_lookup'
      arch/arm/mach-omap2/built-in.o: In function `omap4_twl_init':
      arch/arm/mach-omap2/omap_twl.c:244: undefined reference to `omap_voltage_domain_lookup'
      arch/arm/mach-omap2/omap_twl.c:247: undefined reference to `omap_voltage_domain_lookup'
      arch/arm/mach-omap2/omap_twl.c:250: undefined reference to `omap_voltage_domain_lookup'
      make: *** [.tmp_vmlinux1] Error 1
      
      The error is reported when omap2plus_defconfig built with CONFIG_PM disabled
      Signed-off-by: default avatarSantosh Shilimkar <santosh.shilimkar@ti.com>
      Cc: Thara Gopinath <thara@ti.com>
      Cc: Kevin Hilman <khilman@deeprootsystems.com>
      Cc: Nishanth Menon <nm@ti.com>
      Signed-off-by: default avatarKevin Hilman <khilman@ti.com>
      dd361b6f
    • Santosh Shilimkar's avatar
      omap2plus: voltage: Trivial warning fix 'no return statement' · d7e08f1b
      Santosh Shilimkar authored
      Fix below build warnings
      
       CC      arch/arm/mach-omap2/common.o
        CC      arch/arm/mach-omap2/gpio.o
      In file included from arch/arm/plat-omap/include/plat/omap_hwmod.h:38,
                       from arch/arm/mach-omap2/gpio.c:25:
      arch/arm/plat-omap/include/plat/voltage.h: In function 'omap_voltage_register_pmic':
      arch/arm/plat-omap/include/plat/voltage.h:137: warning: no return statement in function returning non-void
        CC      arch/arm/mach-omap2/dma.o
      In file included from arch/arm/plat-omap/include/plat/omap_hwmod.h:38,
                       from arch/arm/mach-omap2/dma.c:32:
      arch/arm/plat-omap/include/plat/voltage.h: In function 'omap_voltage_register_pmic':
      arch/arm/plat-omap/include/plat/voltage.h:137: warning: no return statement in function returning non-void
        CC      arch/arm/mach-omap2/wd_timer.o
      In file included from arch/arm/plat-omap/include/plat/omap_hwmod.h:38,
                       from arch/arm/mach-omap2/wd_timer.c:15:
      arch/arm/plat-omap/include/plat/voltage.h: In function 'omap_voltage_register_pmic':
      arch/arm/plat-omap/include/plat/voltage.h:137: warning: no return statement in function returning non-void
        CC      arch/arm/mach-omap2/prm44xx.o
        CC      arch/arm/mach-omap2/omap_hwmod.o
      In file included from arch/arm/plat-omap/include/plat/omap_hwmod.h:38,
                       from arch/arm/mach-omap2/omap_hwmod.c:145:
      arch/arm/plat-omap/include/plat/voltage.h: In function 'omap_voltage_register_pmic':
      arch/arm/plat-omap/include/plat/voltage.h:137: warning: no return statement in function returning non-void
        CC      arch/arm/mach-omap2/omap_hwmod_common_data.o
      In file included from arch/arm/plat-omap/include/plat/omap_hwmod.h:38,
                       from arch/arm/mach-omap2/omap_hwmod_common_data.c:20:
      arch/arm/plat-omap/include/plat/voltage.h: In function 'omap_voltage_register_pmic':
      arch/arm/plat-omap/include/plat/voltage.h:137: warning: no return statement in function returning non-void
      
      The error is reported when omap2plus_defconfig built with CONFIG_PM disabled
      Signed-off-by: default avatarSantosh Shilimkar <santosh.shilimkar@ti.com>
      Cc: Thara Gopinath <thara@ti.com>
      Cc: Kevin Hilman <khilman@deeprootsystems.com>
      Cc: Nishanth Menon <nm@ti.com>
      Signed-off-by: default avatarKevin Hilman <khilman@ti.com>
      d7e08f1b
    • Santosh Shilimkar's avatar
      omap2plus: clockdomain: Trivial fix for build break because of clktrctrl_mask · 30299137
      Santosh Shilimkar authored
      struct clockdomain member clktrctrl_mask is available for only for OMAP2
      and OMAP3 architectures. Technially it is also used only for these archs
      but this breaks the build with custom OMAP4 configuration.
      
       CC      arch/arm/mach-omap2/clockdomain.o
      arch/arm/mach-omap2/clockdomain.c: In function '_enable_hwsup':
      arch/arm/mach-omap2/clockdomain.c:251: error: 'struct clockdomain' has no member named 'clktrctrl_mask'
      arch/arm/mach-omap2/clockdomain.c:254: error: 'struct clockdomain' has no member named 'clktrctrl_mask'
      arch/arm/mach-omap2/clockdomain.c: In function '_disable_hwsup':
      arch/arm/mach-omap2/clockdomain.c:277: error: 'struct clockdomain' has no member named 'clktrctrl_mask'
      arch/arm/mach-omap2/clockdomain.c:280: error: 'struct clockdomain' has no member named 'clktrctrl_mask'
      arch/arm/mach-omap2/clockdomain.c: In function 'omap2_clkdm_sleep':
      arch/arm/mach-omap2/clockdomain.c:744: error: 'struct clockdomain' has no member named 'clktrctrl_mask'
      arch/arm/mach-omap2/clockdomain.c: In function 'omap2_clkdm_wakeup':
      arch/arm/mach-omap2/clockdomain.c:789: error: 'struct clockdomain' has no member named 'clktrctrl_mask'
      arch/arm/mach-omap2/clockdomain.c: In function 'omap2_clkdm_clk_enable':
      arch/arm/mach-omap2/clockdomain.c:922: error: 'struct clockdomain' has no member named 'clktrctrl_mask'
      arch/arm/mach-omap2/clockdomain.c:926: error: 'struct clockdomain' has no member named 'clktrctrl_mask'
      arch/arm/mach-omap2/clockdomain.c: In function 'omap2_clkdm_clk_disable':
      arch/arm/mach-omap2/clockdomain.c:994: error: 'struct clockdomain' has no member named 'clktrctrl_mask'
      arch/arm/mach-omap2/clockdomain.c:998: error: 'struct clockdomain' has no member named 'clktrctrl_mask'
      make[1]: *** [arch/arm/mach-omap2/clockdomain.o] Error 1
      make: *** [arch/arm/mach-omap2] Error 2
      
      Fix the build break by dropping the #ifdef as suggested by Paul Walmsley
      Signed-off-by: default avatarSantosh Shilimkar <santosh.shilimkar@ti.com>
      Acked-by: default avatarPaul Walmsley <paul@pwsan.com>
      Signed-off-by: default avatarKevin Hilman <khilman@ti.com>
      30299137
    • Felipe Balbi's avatar
      arm: omap: gpio: don't access irq_desc array directly · 1a9b5878
      Felipe Balbi authored
      Instead of accessing the irq_desc array directly
      we can use irq_to_desc(irq). That will allow us to,
      if wanted, select SPARSE_IRQ and irq_descs will be
      added to a radix tree, instead of a array.
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      Signed-off-by: default avatarKevin Hilman <khilman@ti.com>
      1a9b5878
    • Nishanth Menon's avatar
      omap2+: pm_bus: make functions used as pointers as static · b97c374d
      Nishanth Menon authored
      omap_pm_runtime_suspend and omap_pm_runtime_resume are used
      as function pointers and does not really need to be exposed
      to the world.
      
      Fixes sparse warnings:
      arch/arm/mach-omap2/pm_bus.c:23:5: warning: symbol 'omap_pm_runtime_suspend' was not declared. Should it be static?
      arch/arm/mach-omap2/pm_bus.c:40:5: warning: symbol 'omap_pm_runtime_resume' was not declared. Should it be static?
      Signed-off-by: default avatarNishanth Menon <nm@ti.com>
      Signed-off-by: default avatarKevin Hilman <khilman@ti.com>
      b97c374d
    • Mika Westerberg's avatar
      OMAP: GPIO: fix _set_gpio_triggering() for OMAP2+ · f7c5cc45
      Mika Westerberg authored
      In case on OMAP2+ we call set_24xx_gpio_triggering() instead of
      updating reg and l values. However, at the end of the function we
      perform a write:
      
      	__raw_writel(l, reg);
      
      So on OMAP2+ we end up writing 0 to the bank->base which is not
      correct (typically this points to GPIO_REVISION register).
      
      Fix this by returning immediately after call to
      set_24xx_gpio_triggering().
      Signed-off-by: default avatarMika Westerberg <ext-mika.1.westerberg@nokia.com>
      Signed-off-by: default avatarKevin Hilman <khilman@ti.com>
      f7c5cc45
    • Nishanth Menon's avatar
      OMAP2+: TWL: include pm header for init protos · dda0aea7
      Nishanth Menon authored
      twl_init functions are declared in pm.h and used in pm.c
      pm.h header defining the protos need to be included to
      ensure that omap_twl.c has consistent function definition.
      This fixes sparse warning:
      arch/arm/mach-omap2/omap_twl.c:237:12: warning: symbol 'omap4_twl_init' was not declared. Should it be static?
      arch/arm/mach-omap2/omap_twl.c:256:12: warning: symbol 'omap3_twl_init' was not declared. Should it be static?
      Signed-off-by: default avatarNishanth Menon <nm@ti.com>
      Signed-off-by: default avatarKevin Hilman <khilman@ti.com>
      dda0aea7
    • Nishanth Menon's avatar
      OMAP2+: TWL: make conversion routines static · c84ff1cc
      Nishanth Menon authored
      The uv_to_vsel, vsel_to_uv functions don't need to be exposed to the
      world as they are used as function pointers. make them static.
      
      Fixes sparse warnings:
      arch/arm/mach-omap2/omap_twl.c:63:15: warning: symbol 'twl4030_vsel_to_uv' was not declared. Should it be static?
      arch/arm/mach-omap2/omap_twl.c:68:4: warning: symbol 'twl4030_uv_to_vsel' was not declared. Should it be static?
      arch/arm/mach-omap2/omap_twl.c:73:15: warning: symbol 'twl6030_vsel_to_uv' was not declared. Should it be static?
      arch/arm/mach-omap2/omap_twl.c:105:4: warning: symbol 'twl6030_uv_to_vsel' was not declared. Should it be static?
      Signed-off-by: default avatarNishanth Menon <nm@ti.com>
      Signed-off-by: default avatarKevin Hilman <khilman@ti.com>
      c84ff1cc
    • Nishanth Menon's avatar
      OMAP3+: sr_device: include pm header · d0eadf6d
      Nishanth Menon authored
      omap_enable_smartreflex_on_init is meant to be used by boards
      which would like to have SR enabled by default on the platform, while
      omap_devinit_smartreflex is used by pm code, the protos are defined
      in pm.h. This header should be included to ensure that sr_device
      function definitions match the prototypes.
      
      including pm.h fixes the sparse warnings (with CONFIG_OMAP_SMARTREFLEX=y):
      arch/arm/mach-omap2/sr_device.c:138:13: warning: symbol 'omap_enable_smartreflex_on_init' was not declared. Should it be static?
      arch/arm/mach-omap2/sr_device.c:143:12: warning: symbol 'omap_devinit_smartreflex' was not declared. Should it be static?
      Signed-off-by: default avatarNishanth Menon <nm@ti.com>
      Signed-off-by: default avatarKevin Hilman <khilman@ti.com>
      d0eadf6d
    • Linus Torvalds's avatar
      Merge branch 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6 · 3e5b08cb
      Linus Torvalds authored
      * 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (144 commits)
        USB: add support for Dream Cheeky DL100B Webmail Notifier (1d34:0004)
        USB: serial: ftdi_sio: add support for TIOCSERGETLSR
        USB: ehci-mxc: Setup portsc register prior to accessing OTG viewport
        USB: atmel_usba_udc: fix freeing irq in usba_udc_remove()
        usb: ehci-omap: fix tll channel enable mask
        usb: ohci-omap3: fix trivial typo
        USB: gadget: ci13xxx: don't assume that PAGE_SIZE is 4096
        USB: gadget: ci13xxx: fix complete() callback for no_interrupt rq's
        USB: gadget: update ci13xxx to work with g_ether
        USB: gadgets: ci13xxx: fix probing of compiled-in gadget drivers
        Revert "USB: musb: pm: don't rely fully on clock support"
        Revert "USB: musb: blackfin: pm: make it work"
        USB: uas: Use GFP_NOIO instead of GFP_KERNEL in I/O submission path
        USB: uas: Ensure we only bind to a UAS interface
        USB: uas: Rename sense pipe and sense urb to status pipe and status urb
        USB: uas: Use kzalloc instead of kmalloc
        USB: uas: Fix up the Sense IU
        usb: musb: core: kill unneeded #include's
        DA8xx: assign name to MUSB IRQ resource
        usb: gadget: g_ncm added
        ...
      
      Manually fix up trivial conflicts in USB Kconfig changes in:
      	arch/arm/mach-omap2/Kconfig
      	arch/sh/Kconfig
      	drivers/usb/Kconfig
      	drivers/usb/host/ehci-hcd.c
      and annoying chip clock data conflicts in:
      	arch/arm/mach-omap2/clock3xxx_data.c
      	arch/arm/mach-omap2/clock44xx_data.c
      3e5b08cb
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 · da40d036
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (147 commits)
        [SCSI] arcmsr: fix write to device check
        [SCSI] lpfc: lower stack use in lpfc_fc_frame_check
        [SCSI] eliminate an unnecessary local variable from scsi_remove_target()
        [SCSI] libiscsi: use bh locking instead of irq with session lock
        [SCSI] libiscsi: do not take host lock in queuecommand
        [SCSI] be2iscsi: fix null ptr when accessing task hdr
        [SCSI] be2iscsi: fix gfp use in alloc_pdu
        [SCSI] libiscsi: add more informative failure message during iscsi scsi eh
        [SCSI] gdth: Add missing call to gdth_ioctl_free
        [SCSI] bfa: remove unused defintions and misc cleanups
        [SCSI] bfa: remove inactive functions
        [SCSI] bfa: replace bfa_assert with WARN_ON
        [SCSI] qla2xxx: Use sg_next to fetch next sg element while walking sg list.
        [SCSI] qla2xxx: Fix to avoid recursive lock failure during BSG timeout.
        [SCSI] qla2xxx: Remove code to not reset ISP82xx on failure.
        [SCSI] qla2xxx: Display mailbox register 4 during 8012 AEN for ISP82XX parts.
        [SCSI] qla2xxx: Don't perform a BIG_HAMMER if Get-ID (0x20) mailbox command fails on CNAs.
        [SCSI] qla2xxx: Remove redundant module parameter permission bits
        [SCSI] qla2xxx: Add sysfs node for displaying board temperature.
        [SCSI] qla2xxx: Code cleanup to remove unwanted comments and code.
        ...
      da40d036
    • Dan Carpenter's avatar
      input/tc3589x: fix compile error · aa58abc2
      Dan Carpenter authored
      There was a semi-colon missing and it broke the compile.
      Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
      Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@stericsson.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      aa58abc2
    • Linus Torvalds's avatar
      Merge branch 'vfs-scale-working' of... · b4a45f5f
      Linus Torvalds authored
      Merge branch 'vfs-scale-working' of git://git.kernel.org/pub/scm/linux/kernel/git/npiggin/linux-npiggin
      
      * 'vfs-scale-working' of git://git.kernel.org/pub/scm/linux/kernel/git/npiggin/linux-npiggin: (57 commits)
        fs: scale mntget/mntput
        fs: rename vfsmount counter helpers
        fs: implement faster dentry memcmp
        fs: prefetch inode data in dcache lookup
        fs: improve scalability of pseudo filesystems
        fs: dcache per-inode inode alias locking
        fs: dcache per-bucket dcache hash locking
        bit_spinlock: add required includes
        kernel: add bl_list
        xfs: provide simple rcu-walk ACL implementation
        btrfs: provide simple rcu-walk ACL implementation
        ext2,3,4: provide simple rcu-walk ACL implementation
        fs: provide simple rcu-walk generic_check_acl implementation
        fs: provide rcu-walk aware permission i_ops
        fs: rcu-walk aware d_revalidate method
        fs: cache optimise dentry and inode for rcu-walk
        fs: dcache reduce branches in lookup path
        fs: dcache remove d_mounted
        fs: fs_struct use seqlock
        fs: rcu-walk for path lookup
        ...
      b4a45f5f
    • Nick Piggin's avatar
      fs: scale mntget/mntput · b3e19d92
      Nick Piggin authored
      The problem that this patch aims to fix is vfsmount refcounting scalability.
      We need to take a reference on the vfsmount for every successful path lookup,
      which often go to the same mount point.
      
      The fundamental difficulty is that a "simple" reference count can never be made
      scalable, because any time a reference is dropped, we must check whether that
      was the last reference. To do that requires communication with all other CPUs
      that may have taken a reference count.
      
      We can make refcounts more scalable in a couple of ways, involving keeping
      distributed counters, and checking for the global-zero condition less
      frequently.
      
      - check the global sum once every interval (this will delay zero detection
        for some interval, so it's probably a showstopper for vfsmounts).
      
      - keep a local count and only taking the global sum when local reaches 0 (this
        is difficult for vfsmounts, because we can't hold preempt off for the life of
        a reference, so a counter would need to be per-thread or tied strongly to a
        particular CPU which requires more locking).
      
      - keep a local difference of increments and decrements, which allows us to sum
        the total difference and hence find the refcount when summing all CPUs. Then,
        keep a single integer "long" refcount for slow and long lasting references,
        and only take the global sum of local counters when the long refcount is 0.
      
      This last scheme is what I implemented here. Attached mounts and process root
      and working directory references are "long" references, and everything else is
      a short reference.
      
      This allows scalable vfsmount references during path walking over mounted
      subtrees and unattached (lazy umounted) mounts with processes still running
      in them.
      
      This results in one fewer atomic op in the fastpath: mntget is now just a
      per-CPU inc, rather than an atomic inc; and mntput just requires a spinlock
      and non-atomic decrement in the common case. However code is otherwise bigger
      and heavier, so single threaded performance is basically a wash.
      Signed-off-by: default avatarNick Piggin <npiggin@kernel.dk>
      b3e19d92
    • Nick Piggin's avatar
      fs: rename vfsmount counter helpers · c6653a83
      Nick Piggin authored
      Suggested by Andreas, mnt_ prefix is clearer namespace, follows kernel
      conventions better, and is easier for tab complete. I introduced these
      names so I'll admit they were not good choices.
      Signed-off-by: default avatarNick Piggin <npiggin@kernel.dk>
      c6653a83
    • Nick Piggin's avatar
      fs: implement faster dentry memcmp · 9d55c369
      Nick Piggin authored
      The standard memcmp function on a Westmere system shows up hot in
      profiles in the `git diff` workload (both parallel and single threaded),
      and it is likely due to the costs associated with trapping into
      microcode, and little opportunity to improve memory access (dentry
      name is not likely to take up more than a cacheline).
      
      So replace it with an open-coded byte comparison. This increases code
      size by 8 bytes in the critical __d_lookup_rcu function, but the
      speedup is huge, averaging 10 runs of each:
      
      git diff st   user   sys   elapsed  CPU
      before        1.15   2.57  3.82      97.1
      after         1.14   2.35  3.61      96.8
      
      git diff mt   user   sys   elapsed  CPU
      before        1.27   3.85  1.46     349
      after         1.26   3.54  1.43     333
      
      Elapsed time for single threaded git diff at 95.0% confidence:
              -0.21  +/- 0.01
              -5.45% +/- 0.24%
      
      It's -0.66% +/- 0.06% elapsed time on my Opteron, so rep cmp costs on the
      fam10h seem to be relatively smaller, but there is still a win.
      Signed-off-by: default avatarNick Piggin <npiggin@kernel.dk>
      9d55c369
    • Nick Piggin's avatar
      fs: prefetch inode data in dcache lookup · e1bb5782
      Nick Piggin authored
      This makes single threaded git diff -1.25% +/- 0.05% elapsed time on my
      2s12c24t Westmere system, and -0.86% +/- 0.05% on my 2s8c Barcelona, by
      prefetching the important first cacheline of the inode in while we do the
      actual name compare and other operations on the dentry.
      
      There was no measurable slowdown in the single file stat case, or the creat
      case (where negative dentries would be common).
      Signed-off-by: default avatarNick Piggin <npiggin@kernel.dk>
      e1bb5782
    • Nick Piggin's avatar
      fs: improve scalability of pseudo filesystems · 4b936885
      Nick Piggin authored
      Regardless of how much we possibly try to scale dcache, there is likely
      always going to be some fundamental contention when adding or removing children
      under the same parent. Pseudo filesystems do not seem need to have connected
      dentries because by definition they are disconnected.
      Signed-off-by: default avatarNick Piggin <npiggin@kernel.dk>
      4b936885
    • Nick Piggin's avatar
      fs: dcache per-inode inode alias locking · 873feea0
      Nick Piggin authored
      dcache_inode_lock can be replaced with per-inode locking. Use existing
      inode->i_lock for this. This is slightly non-trivial because we sometimes
      need to find the inode from the dentry, which requires d_inode to be
      stabilised (either with refcount or d_lock).
      Signed-off-by: default avatarNick Piggin <npiggin@kernel.dk>
      873feea0
    • Nick Piggin's avatar
      fs: dcache per-bucket dcache hash locking · ceb5bdc2
      Nick Piggin authored
      We can turn the dcache hash locking from a global dcache_hash_lock into
      per-bucket locking.
      Signed-off-by: default avatarNick Piggin <npiggin@kernel.dk>
      ceb5bdc2
    • Nick Piggin's avatar
      bit_spinlock: add required includes · 626d6074
      Nick Piggin authored
      Signed-off-by: default avatarNick Piggin <npiggin@kernel.dk>
      626d6074
    • Nick Piggin's avatar
      kernel: add bl_list · 4e35e607
      Nick Piggin authored
      Introduce a type of hlist that can support the use of the lowest bit in the
      hlist_head. This will be subsequently used to implement per-bucket bit spinlock
      for inode and dentry hashes, and may be useful in other cases such as network
      hashes.
      Reviewed-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Signed-off-by: default avatarNick Piggin <npiggin@kernel.dk>
      4e35e607
    • Nick Piggin's avatar
      xfs: provide simple rcu-walk ACL implementation · 880566e1
      Nick Piggin authored
      This simple implementation just checks for no ACLs on the inode, and
      if so, then the rcu-walk may proceed, otherwise fail it.
      Signed-off-by: default avatarNick Piggin <npiggin@kernel.dk>
      880566e1
    • Nick Piggin's avatar
      btrfs: provide simple rcu-walk ACL implementation · 258a5aa8
      Nick Piggin authored
      This simple implementation just checks for no ACLs on the inode, and
      if so, then the rcu-walk may proceed, otherwise fail it.
      Signed-off-by: default avatarNick Piggin <npiggin@kernel.dk>
      258a5aa8
    • Nick Piggin's avatar
      ext2,3,4: provide simple rcu-walk ACL implementation · 73598611
      Nick Piggin authored
      This simple implementation just checks for no ACLs on the inode, and
      if so, then the rcu-walk may proceed, otherwise fail it.
      Signed-off-by: default avatarNick Piggin <npiggin@kernel.dk>
      73598611
    • Nick Piggin's avatar
      fs: provide simple rcu-walk generic_check_acl implementation · 1e1743eb
      Nick Piggin authored
      This simple implementation just checks for no ACLs on the inode, and
      if so, then the rcu-walk may proceed, otherwise fail it.
      
      This could easily be extended to put acls under RCU and check them
      under seqlock, if need be. But this implementation is enough to show
      the rcu-walk aware permissions code for path lookups is working, and
      will handle cases where there are no ACLs or ACLs in just the final
      element.
      
      This patch implicity converts tmpfs to rcu-aware permission check.
      Subsequent patches onvert ext*, xfs, and, btrfs. Each of these uses
      acl/permission code in a different way, so convert them all to provide
      templates and proof of concept.
      Signed-off-by: default avatarNick Piggin <npiggin@kernel.dk>
      1e1743eb
    • Nick Piggin's avatar
      fs: provide rcu-walk aware permission i_ops · b74c79e9
      Nick Piggin authored
      Signed-off-by: default avatarNick Piggin <npiggin@kernel.dk>
      b74c79e9