GitHub/LineageOS/android_kernel_motorola_exynos9610.git
18 years agoARM: OMAP: Sync DMA with linux-omap tree
Tony Lindgren [Mon, 25 Sep 2006 09:45:45 +0000 (12:45 +0300)]
ARM: OMAP: Sync DMA with linux-omap tree

This patch syncs OMAP DMA code with linux-omap tree.
Mostly allow changing DMA callback function and set
OMAP2 specific transfer mode.

Signed-off-by: Tony Lindgren <tony@atomide.com>
18 years agoARM: OMAP2: Make sure peripherals can be accessed after clk_enable
Juha Yrjola [Mon, 25 Sep 2006 09:41:50 +0000 (12:41 +0300)]
ARM: OMAP2: Make sure peripherals can be accessed after clk_enable

Some peripherals seem to need additional delay until they
can actually be accessed after enabling their FCLK and ICLK.

Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
18 years agoARM: OMAP2: Keep both APLLs active during bootup
Juha Yrjola [Mon, 25 Sep 2006 09:41:49 +0000 (12:41 +0300)]
ARM: OMAP2: Keep both APLLs active during bootup

Enabling and disabling the 54 MHz and 96 MHz APLLs can happen
unnecessarily often during bootup. Make sure they're kept
enabled during init.

Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
18 years agoARM: OMAP: Add sanity check to clk_disable
Juha Yrjola [Mon, 25 Sep 2006 09:41:47 +0000 (12:41 +0300)]
ARM: OMAP: Add sanity check to clk_disable

BUG() if the clock use count is already zero.

Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
18 years agoARM: OMAP: GPIO: IRQSTATUS2 workaround for retention state
Hiroshi DOYU [Mon, 25 Sep 2006 09:41:46 +0000 (12:41 +0300)]
ARM: OMAP: GPIO: IRQSTATUS2 workaround for retention state

In OMAP2420, an incoming GPIO interrupt always sets both GPIO_IRQSTATUS1
and GPIO_IRQSTATUS2, even if the relevant bit is disabled in
GPIO_IRQENABLE1/2 and DSP doesn't use GPIO at all. GPIO_IRQSTATUS1
is for MPU and GPIO_IRQSTATUS2 is for DSP. If IRQSTATUS is set, this
will prevent the system from going to idle state. This patch also clears
IRQSTATUS2 to avoid the above situation.

Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
18 years agoARM: OMAP: Fix typo for 24xx GPIO resume
Tony Lindgren [Mon, 25 Sep 2006 09:41:45 +0000 (12:41 +0300)]
ARM: OMAP: Fix typo for 24xx GPIO resume

Fix typo for 24xx GPIO resume

Signed-off-by: Tony Lindgren <tony@atomide.com>
18 years agoARM: OMAP: OMAP2 dmtimer power management support
Juha Yrjola [Mon, 25 Sep 2006 09:41:44 +0000 (12:41 +0300)]
ARM: OMAP: OMAP2 dmtimer power management support

GPT1 will be set into non-posted mode, and the wakeup register
is set for all timers.

Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
18 years agoARM: OMAP: Add support for forcing osc_ck on
Juha Yrjola [Mon, 25 Sep 2006 09:41:43 +0000 (12:41 +0300)]
ARM: OMAP: Add support for forcing osc_ck on

Some boards might use the oscillator clock for powering
external peripherals. Add support for making sure osc_ck
stays active even when trying to go to sleep.

Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
18 years agoARM: OMAP: Add enable/disable functions for dmtimer
Timo Teras [Mon, 25 Sep 2006 09:41:42 +0000 (12:41 +0300)]
ARM: OMAP: Add enable/disable functions for dmtimer

Add enable/disable functions which effectively control the GPT iclk and fclk.

Signed-off-by: Timo Teras <timo.teras@solidboot.com>
Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
18 years agoARM: OMAP: Remove Remove superfluous/recursive locking for GPIO
David Brownell [Mon, 25 Sep 2006 09:41:41 +0000 (12:41 +0300)]
ARM: OMAP: Remove Remove superfluous/recursive locking for GPIO

Remove Remove superfluous/recursive locking for GPIO

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
18 years agoARM: OMAP: Fix spinlock recursion for dyntick
Tony Lindgren [Mon, 25 Sep 2006 09:41:40 +0000 (12:41 +0300)]
ARM: OMAP: Fix spinlock recursion for dyntick

Fix spinlock recursion for dyntick. Modified version based
on Imre Deak's earlier patch.

Signed-off-by: Tony Lindgren <tony@atomide.com>
18 years agoARM: OMAP: Remove IVA IRQ bank
Komal Shah [Mon, 25 Sep 2006 09:41:39 +0000 (12:41 +0300)]
ARM: OMAP: Remove IVA IRQ bank

ARM11 can't access the IVA interrupt controller from
IVA slave port.

From Richard Woodruff:

"The 0x40000000 is an IVA-ARM7 local bus address.
The IVA-INTC is NOT accessible through the IVA-L3-Slave Port.
The current TRM does say this directly and indirectly in a few spots and
in figures."

Signed-off-by: Komal Shah <komal_shah802003@yahoo.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
18 years agoARM: OMAP: Reset GPIO irq state after free_irq()
Tony Lindgren [Mon, 25 Sep 2006 09:41:38 +0000 (12:41 +0300)]
ARM: OMAP: Reset GPIO irq state after free_irq()

This is needed to reset GPIO after free_irq().

Signed-off-by: Tony Lindgren <tony@atomide.com>
18 years agoARM: OMAP: Add write memory barriers to OMAP2 clock code
Juha Yrjola [Mon, 25 Sep 2006 09:41:37 +0000 (12:41 +0300)]
ARM: OMAP: Add write memory barriers to OMAP2 clock code

After adjusting clock parameters, OMAP2 CPUs need a memory
barrier to make sure the changes go into effect immediately.
Otherwise bad things will happen if we try to access the
peripheral whose clock is just being enabled.

Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
18 years agoARM: OMAP: Fix OMAP2 clock.c typo
Samuel Ortiz [Mon, 25 Sep 2006 09:41:36 +0000 (12:41 +0300)]
ARM: OMAP: Fix OMAP2 clock.c typo

A forgotten parenthesis in clock.c caused the PLL stabilization loop
to not be executed correctly.

Signed-off-by: Samuel Ortiz <samuel.ortiz@solidboot.com>
Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
18 years agoARM: OMAP: Use GPT iclk only when needed
Timo Teras [Mon, 25 Sep 2006 09:41:35 +0000 (12:41 +0300)]
ARM: OMAP: Use GPT iclk only when needed

This patch makes the OMAP2 dmtimers module using the interface
clocks only while the registers are accessed (except GPT1 which has
iclk enabled all the time).

Signed-off-by: Timo Teras <timo.teras@solidboot.com>
Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
18 years agoARM: OMAP: DMA source and destination addresses are unsigned
Tony Lindgren [Mon, 25 Sep 2006 09:41:34 +0000 (12:41 +0300)]
ARM: OMAP: DMA source and destination addresses are unsigned

Also export some omap24xx specific DMA functions.

Signed-off-by: Tony Lindgren <tony@atomide.com>
18 years agoARM: OMAP2: Dynamic allocator for GPMC memory space
Imre Deak [Mon, 25 Sep 2006 09:41:33 +0000 (12:41 +0300)]
ARM: OMAP2: Dynamic allocator for GPMC memory space

Add support for assigning memory regions dynamically to peripherals
attached to GPMC interface. Platform specific code should now call
gpmc_cs_request to get a free GPMC memory region instead of using
a fixed address.

Make the H4 and Apollon platform initialization use the new API.

Signed-off-by: Imre Deak <imre.deak@solidboot.com>
Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
18 years agoARM: OMAP: Add some extra #defines for Amstrad Delta
Jonathan McDowell [Mon, 25 Sep 2006 09:41:31 +0000 (12:41 +0300)]
ARM: OMAP: Add some extra #defines for Amstrad Delta

This patch adds some further #defines regarding GPIOs and latch bits for
the Amstrad Delta; the drivers that use them will be submitted at a
later date but there's no reason not to have the information already
there and available for use.

Signed-off-by: Jonathan McDowell <noodles@earth.li>
Signed-off-by: Tony Lindgren <tony@atomide.com>
18 years agoARM: OMAP: Fix OMAP1 compilation after MPUIO check change
Jonathan McDowell [Mon, 25 Sep 2006 09:41:30 +0000 (12:41 +0300)]
ARM: OMAP: Fix OMAP1 compilation after MPUIO check change

The recent MPUIO range change fix breaks compilation if
CONFIG_ARCH_OMAP24XX isn't defined; it should be OMAP_MAX_GPIO_LINES not
MAX_GPIO_LINES I believe. This one liner fixes it.

Signed-off-by: Jonathan McDowell <noodles@earth.li>
Signed-off-by: Tony Lindgren <tony@atomide.com>
18 years agoARM: OMAP: mux: add config for 16xx SPI pins
Mark Howell [Mon, 25 Sep 2006 09:41:29 +0000 (12:41 +0300)]
ARM: OMAP: mux: add config for 16xx SPI pins

This patch adds pin mux info for the SPI master/slave interface on
OMAP16xx. Data from OMAP 1611/1612 TRM and errata. Works for me on my
1611/H2 with current git kernel.

Signed-off-by: Mark Howell <mhowell@northlink.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
18 years agoARM: OMAP: Sleep is prevented when no LCD is attached
Imre Deak [Mon, 25 Sep 2006 09:41:28 +0000 (12:41 +0300)]
ARM: OMAP: Sleep is prevented when no LCD is attached

We have to make sure that the LCD DMA external destination bit is
cleared by default, otherwise OMAP won't sleep.

Signed-off-by: Imre Deak <imre.deak@solidboot.com>
Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
18 years agoARM: OMAP: GPIO: fix MPUIO check
Imre Deak [Mon, 25 Sep 2006 09:41:27 +0000 (12:41 +0300)]
ARM: OMAP: GPIO: fix MPUIO check

- MPUIO doesn't exist on OMAP2
- no error was returned for too big MPUIO numbers

Signed-off-by: Imre Deak <imre.deak@solidboot.com>
Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
18 years agoARM: OMAP: Remove sys_ck and sys_clkout from McBSP for 24xx
Tony Lindgren [Mon, 25 Sep 2006 09:41:26 +0000 (12:41 +0300)]
ARM: OMAP: Remove sys_ck and sys_clkout from McBSP for 24xx

McBSP does not need sys_ck or sys_clkout. If the devices connected
to McBSP need sys_clkout, they need to request it.

Signed-off-by: Tony Lindgren <tony@atomide.com>
18 years agoARM: OMAP: Apollon MMC support
Kyungmin Park [Mon, 25 Sep 2006 09:41:25 +0000 (12:41 +0300)]
ARM: OMAP: Apollon MMC support

Apollon board MMC supports on OMAP2

TODO:
        We have to check MMC on H4

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
18 years agoARM: OMAP: 2420 boot BUG(): failure to map SRAM
Kevin Hilman [Mon, 25 Sep 2006 09:41:24 +0000 (12:41 +0300)]
ARM: OMAP: 2420 boot BUG(): failure to map SRAM

ARM: OMAP: Fix SRAM static mapping for EMU devices.

Fix SRAM static mapping for EMU devices.

Signed-off-by: Kevin Hilman <khilman@deeprooted.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
18 years agoARM: OMAP: Added OMAP24xx camera IRQ definition
Samuel Ortiz [Mon, 25 Sep 2006 09:41:22 +0000 (12:41 +0300)]
ARM: OMAP: Added OMAP24xx camera IRQ definition

Signed-off-by: Samuel Ortiz <samuel.ortiz@solidboot.com>
Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
18 years agoARM: OMAP: timer32k: fix tick count calculation when reprogramming
Imre Deak [Mon, 25 Sep 2006 09:41:21 +0000 (12:41 +0300)]
ARM: OMAP: timer32k: fix tick count calculation when reprogramming

Reprogramming takes places before putting the CPU into idle mode if
the dynamic tick option is enabled. The timer is then set to expire
at the next pending timer event. Because some time has already passed
since the last reported jiffy we have to wait less than the time
specified in jiffies.

Also make sure we don't set a load value of 0 whose outcome is
unspecified according to the TRM.

Signed-off-by: Imre Deak <imre.deak@solidboot.com>
Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
18 years agoARM: OMAP: Avoid sleeping during arch_reset
Tony Lindgren [Mon, 25 Sep 2006 09:41:20 +0000 (12:41 +0300)]
ARM: OMAP: Avoid sleeping during arch_reset

If we call clk_get() from arch_reset we get ugly messages before
reboot.

Signed-off-by: Tony Lindgren <tony@atomide.com>
18 years ago[PATCH] pata_pdc2027x iomem annotations
Al Viro [Mon, 25 Sep 2006 01:57:57 +0000 (02:57 +0100)]
[PATCH] pata_pdc2027x iomem annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] fix idiocy in asd_init_lseq_mdp()
Al Viro [Mon, 25 Sep 2006 01:57:22 +0000 (02:57 +0100)]
[PATCH] fix idiocy in asd_init_lseq_mdp()

To whoever had written that code:

 a) priority of >> is higher than that of &
 b) priority of typecast is higher than that of any binary operator
 c) learn the fscking C

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] SCSI gfp_t annotations
Al Viro [Mon, 25 Sep 2006 01:55:40 +0000 (02:55 +0100)]
[PATCH] SCSI gfp_t annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] wrong thing iounmapped (qla3xxx)
Al Viro [Mon, 25 Sep 2006 01:54:46 +0000 (02:54 +0100)]
[PATCH] wrong thing iounmapped (qla3xxx)

ql3xxx_probe() does ioremap and stores result in ->mem_map_registers.
On failure exit it does iounmap() of the same thing.

OTOH, ql3xxx_remove() does iounmap() of ->mmap_virt_base which is
 (a) never assigned and
 (b) never used other than in that iounmap() call.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] qla3xxx iomem annotations
Al Viro [Mon, 25 Sep 2006 01:53:53 +0000 (02:53 +0100)]
[PATCH] qla3xxx iomem annotations

the driver is still shite, though...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Revert ABI-breaking change in /proc
Matthew Wilcox [Mon, 25 Sep 2006 02:22:52 +0000 (20:22 -0600)]
[PATCH] Revert ABI-breaking change in /proc

Some user tools parse /proc/scsi/scsi, so we can't yet change the names.
Change the existing ones back to their old names, and add an admonition
to not make the same mistake that I did.

Andrew Morton reports that this was breaking YDL 4.1 userspace.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years agoMerge git://git.infradead.org/~dwmw2/khdrs-2.6
Linus Torvalds [Sun, 24 Sep 2006 22:55:22 +0000 (15:55 -0700)]
Merge git://git.infradead.org/~dwmw2/khdrs-2.6

* git://git.infradead.org/~dwmw2/khdrs-2.6:
  Don't remove $(INSTALL_HDR_PATH)/install before headers_install.

18 years ago[PATCH] missing include (free_irq() use)
Al Viro [Sun, 24 Sep 2006 22:45:29 +0000 (23:45 +0100)]
[PATCH] missing include (free_irq() use)

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] NULL noise removal
Al Viro [Sun, 24 Sep 2006 22:42:57 +0000 (23:42 +0100)]
[PATCH] NULL noise removal

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] fix iptables __user misannotations
Al Viro [Sun, 24 Sep 2006 22:42:20 +0000 (23:42 +0100)]
[PATCH] fix iptables __user misannotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] netlabel gfp annotations
Al Viro [Sun, 24 Sep 2006 22:41:42 +0000 (23:41 +0100)]
[PATCH] netlabel gfp annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] libata won't build on SUN4
Al Viro [Sun, 24 Sep 2006 22:41:00 +0000 (23:41 +0100)]
[PATCH] libata won't build on SUN4

marked as such...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] libata won't build on m68k and m32r
Al Viro [Sun, 24 Sep 2006 22:40:00 +0000 (23:40 +0100)]
[PATCH] libata won't build on m68k and m32r

no ioread*(), for one thing

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] restore libata build on frv
Al Viro [Sun, 24 Sep 2006 22:39:25 +0000 (23:39 +0100)]
[PATCH] restore libata build on frv

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years agoDon't remove $(INSTALL_HDR_PATH)/install before headers_install.
David Woodhouse [Sun, 24 Sep 2006 22:44:57 +0000 (23:44 +0100)]
Don't remove $(INSTALL_HDR_PATH)/install before headers_install.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
18 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfashe...
Linus Torvalds [Sun, 24 Sep 2006 22:28:50 +0000 (15:28 -0700)]
Merge branch 'upstream-linus' of git://git./linux/kernel/git/mfasheh/ocfs2

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2: (28 commits)
  ocfs2: Teach ocfs2_drop_lock() to use ->set_lvb() callback
  ocfs2: Remove ->unblock lockres operation
  ocfs2: move downconvert worker to lockres ops
  ocfs2: Remove unused dlmglue functions
  ocfs2: Have the metadata lock use generic dlmglue functions
  ocfs2: Add ->set_lvb callback in dlmglue
  ocfs2: Add ->check_downconvert callback in dlmglue
  ocfs2: Check for refreshing locks in generic unblock function
  ocfs2: don't unconditionally pass LVB flags
  ocfs2: combine inode and generic blocking AST functions
  ocfs2: Add ->get_osb() dlmglue locking operation
  ocfs2: remove ->unlock_ast() callback from ocfs2_lock_res_ops
  ocfs2: combine inode and generic AST functions
  ocfs2: Clean up lock resource refresh flags
  ocfs2: Remove i_generation from inode lock names
  ocfs2: Encode i_generation in the meta data lvb
  ocfs2: Free up some space in the lvb
  ocfs2: Remove special casing for inode creation in ocfs2_dentry_attach_lock()
  ocfs2: manually d_move() during ocfs2_rename()
  [PATCH] Allow file systems to manually d_move() inside of ->rename()
  ...

18 years agoMerge git://git.infradead.org/~dwmw2/khdrs-2.6
Linus Torvalds [Sun, 24 Sep 2006 21:55:52 +0000 (14:55 -0700)]
Merge git://git.infradead.org/~dwmw2/khdrs-2.6

* git://git.infradead.org/~dwmw2/khdrs-2.6:
  New 'make headers_install_all' target.
  Use dependencies for 'make headers_install'.
  [S390] Unexport <asm/z90crypt.h>, export <asm/zcrypt.h> in its place.
  Remove dead netfilter_logging.h from include/linux/Kbuild
  Remove offsetof() from user-visible <linux/stddef.h>
  Clean up exported headers on CRIS
  Fix v850 exported headers
  Don't advertise (or allow) headers_{install,check} where inappropriate.
  Remove UML header export
  Remove ARM26 header export.
  Fix H8300 exported headers.
  Fix m68knommu exported headers
  Fix exported headers for SPARC, SPARC64
  Fix 'make headers_check' on m32r
  Fix 'make headers_check' on sh64
  Fix 'make headers_check' on sh
  [HEADERS] Fix ARM 'make headers_check'

Initial pass of manual conflict resolution in top-level Makefile over
conflicting build rule and headers_install changes.

18 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
Linus Torvalds [Sun, 24 Sep 2006 21:24:14 +0000 (14:24 -0700)]
Merge git://git./linux/kernel/git/sam/kbuild

* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild: (28 commits)
  kbuild: add distclean info to 'make help' and more details for 'clean'
  dontdiff: add utsrelease.h
  kbuild: fix "mkdir -p" usage in scripts/package/mkspec
  kbuild: correct and clarify versioning info in Makefile
  kbuild: fixup Documentation/kbuild/modules.txt
  kbuild: Extend kbuild/defconfig tags support to exuberant ctags
  kbuild: fix for some typos in Documentation/makefiles.txt
  kbuild: clarify "make C=" build option
  Documentaion: update Documentation/Changes with minimum versions
  kbuild: update help in top level Makefile
  kbuild: fail kernel compilation in case of unresolved module symbols
  kbuild: remove debug left-over from Makefile.host
  kbuild: create output directory for hostprogs with O=.. build
  kbuild: add missing return statement in modpost.c:secref_whitelist()
  kbuild: preperly align SYSMAP output
  kbuild: make -rR is now default
  kbuild: make V=2 tell why a target is rebuild
  kbuild: modpost on vmlinux regardless of CONFIG_MODULES
  kbuild: ignore references from ".pci_fixup" to ".init.text"
  kbuild: linguistic fixes for Documentation/kbuild/makefiles.txt
  ...

18 years agokbuild: add distclean info to 'make help' and more details for 'clean'
Jesper Juhl [Sun, 24 Sep 2006 12:01:08 +0000 (14:01 +0200)]
kbuild: add distclean info to 'make help' and more details for 'clean'

Add distclean info, that was previously missing, to 'make help'.
Also add a few more details to the 'make clean' help text.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
18 years agodontdiff: add utsrelease.h
Randy Dunlap [Fri, 22 Sep 2006 19:37:56 +0000 (12:37 -0700)]
dontdiff: add utsrelease.h

Add auto-generated utsrelease.h to dontdiff file.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
18 years agokbuild: fix "mkdir -p" usage in scripts/package/mkspec
Rolf Eike Beer [Mon, 14 Aug 2006 06:16:47 +0000 (08:16 +0200)]
kbuild: fix "mkdir -p" usage in scripts/package/mkspec

"mkdir -p" does not only mean not to complain if the directory already
exists, but also to create the parent directories if needed. This patch
removes "lib" from the list of directories to create as we will also create
"lib/modules".

Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
18 years agokbuild: correct and clarify versioning info in Makefile
Robert P. J. Day [Tue, 12 Sep 2006 16:38:19 +0000 (12:38 -0400)]
kbuild: correct and clarify versioning info in Makefile

The attached patch clarifies the creation of KERNELRELEASE and
corrects an error regarding the use of $(LOCALVERSION).

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
18 years agokbuild: fixup Documentation/kbuild/modules.txt
Robert P. J. Day [Thu, 21 Sep 2006 13:39:41 +0000 (09:39 -0400)]
kbuild: fixup Documentation/kbuild/modules.txt

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
18 years agokbuild: Extend kbuild/defconfig tags support to exuberant ctags
Aron Griffis [Thu, 21 Sep 2006 04:27:02 +0000 (00:27 -0400)]
kbuild: Extend kbuild/defconfig tags support to exuberant ctags

The following patch extends kbuild/defconfig tags support to exuberant
ctags.  The previous support is only for emacs ctags/etags programs.

This patch also corrects the kconfig regex for the emacs invocation.
Previously it would miss some instances because it assumed /^config
instead of /^[ \t]*config

Signed-off-by: Aron Griffis <aron@hp.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
18 years agokbuild: fix for some typos in Documentation/makefiles.txt
Bryce Harrington [Wed, 20 Sep 2006 19:43:37 +0000 (12:43 -0700)]
kbuild: fix for some typos in Documentation/makefiles.txt

I noticed a few typos while reading makefiles.txt to learn about the
kbuild system.  Attached is a patch against 2.6.18 to fix them.
Remove trailing whitespace while we are there..

Signed-off-by: Bryce Harrington <bryce@osdl.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
18 years agokbuild: clarify "make C=" build option
Robert P. J. Day [Wed, 13 Sep 2006 11:57:50 +0000 (07:57 -0400)]
kbuild: clarify "make C=" build option

Clarify the use of "make C=" in the top-level Makefile, and fix a
typo in the Documentation file.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
18 years agoDocumentaion: update Documentation/Changes with minimum versions
Robert P. J. Day [Mon, 11 Sep 2006 16:39:19 +0000 (12:39 -0400)]
Documentaion: update Documentation/Changes with minimum versions

Based on conversations with greg kh (and noticing a simple typo),
these are the actual minimal versions for 2.6.18.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
18 years agokbuild: update help in top level Makefile
Robert P. J. Day [Mon, 11 Sep 2006 16:09:42 +0000 (12:09 -0400)]
kbuild: update help in top level Makefile

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
18 years agokbuild: fail kernel compilation in case of unresolved module symbols
Kirill Korotaev [Thu, 7 Sep 2006 20:08:54 +0000 (13:08 -0700)]
kbuild: fail kernel compilation in case of unresolved module symbols

At stage 2 modpost utility is used to check modules.  In case of unresolved
symbols modpost only prints warning.

IMHO it is a good idea to fail compilation process in case of unresolved
symbols (at least in modules coming with kernel), since usually such errors
are left unnoticed, but kernel modules are broken.

- new option '-w' is added to modpost:
  if option is specified, modpost only warns about unresolved symbols

- modpost is called with '-w' for external modules in Makefile.modpost

Signed-off-by: Andrey Mirkin <amirkin@sw.ru>
Signed-off-by: Kirill Korotaev <dev@openvz.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
18 years agokbuild: remove debug left-over from Makefile.host
Sam Ravnborg [Tue, 8 Aug 2006 14:45:41 +0000 (16:45 +0200)]
kbuild: remove debug left-over from Makefile.host

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
18 years agokbuild: create output directory for hostprogs with O=.. build
Sam Ravnborg [Mon, 7 Aug 2006 19:55:33 +0000 (21:55 +0200)]
kbuild: create output directory for hostprogs with O=.. build

hostprogs-y only supported creating output directory for the final
program. Extend this to also cover the situation where a .o
file (used when host program is made from compositie objects) is
locate in another directory.
First user of this is the built-in lxdialog that.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
18 years agokbuild: add missing return statement in modpost.c:secref_whitelist()
Sam Ravnborg [Wed, 9 Aug 2006 06:23:55 +0000 (08:23 +0200)]
kbuild: add missing return statement in modpost.c:secref_whitelist()

Noticed by: Magnus Damm <magnus@valinux.co.jp>

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
18 years agokbuild: preperly align SYSMAP output
Sam Ravnborg [Tue, 8 Aug 2006 19:41:18 +0000 (21:41 +0200)]
kbuild: preperly align SYSMAP output

Align filenames for SYSMAP with other filenames

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
18 years agokbuild: make -rR is now default
Sam Ravnborg [Tue, 8 Aug 2006 19:36:08 +0000 (21:36 +0200)]
kbuild: make -rR is now default

Do not specify -rR anymore - it is default.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
18 years agokbuild: make V=2 tell why a target is rebuild
Sam Ravnborg [Tue, 8 Aug 2006 19:35:14 +0000 (21:35 +0200)]
kbuild: make V=2 tell why a target is rebuild

tell why a a target got build
   enabled by make V=2
      Output (listed in the order they are checked):
         (1) - due to target is PHONY
         (2) - due to target missing
         (3) - due to: file1.h file2.h
         (4) - due to command line change
         (5) - due to missing .cmd file
         (6) - due to target not in $(targets)
(1) We always build PHONY targets
(2) No target, so we better build it
(3) Prerequisite is newer than target
(4) The command line stored in the file named dir/.target.cmd
    differed from actual command line. This happens when compiler
    options changes
(5) No dir/.target.cmd file (used to store command line)
(6) No dir/.target.cmd file and target not listed in $(targets)
    This is a good hint that there is a bug in the kbuild file

This patch is inspired by a patch from: Milton Miller <miltonm@bga.com>

Cc: Milton Miller <miltonm@bga.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
18 years agokbuild: modpost on vmlinux regardless of CONFIG_MODULES
Sam Ravnborg [Tue, 8 Aug 2006 18:43:39 +0000 (20:43 +0200)]
kbuild: modpost on vmlinux regardless of CONFIG_MODULES

Based on patch from: Magnus Damm <magnus@valinux.co.jp>
This has the advantage that all section mismatch checks are run regardless
of modules being enabled or not.

When running modpost on vmlinux output:
MODPOST vmlinux

When running modpost on modules output count of modules like this:
MODPOST 5 modules

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
18 years agokbuild: ignore references from ".pci_fixup" to ".init.text"
Magnus Damm [Tue, 8 Aug 2006 08:32:11 +0000 (17:32 +0900)]
kbuild: ignore references from ".pci_fixup" to ".init.text"

The modpost code is extended to ignore references
from ".pci_fixup" to ".init.text".

Signed-off-by: Magnus Damm <magnus@valinux.co.jp>
18 years agokbuild: linguistic fixes for Documentation/kbuild/makefiles.txt
Jan Engelhardt [Thu, 27 Jul 2006 20:14:29 +0000 (22:14 +0200)]
kbuild: linguistic fixes for Documentation/kbuild/makefiles.txt

I have done a look-through through Documentation/kbuild/ and my corrections
(proposed) are attached.

Cc'ed are original author Michael (responsible for comitting changes to
these files?), Sam (kbuild maintainer), Adrian (-trivial maintainer).

Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
18 years agokbuild: linguistic fixes for Documentation/kbuild/modules.txt
Jan Engelhardt [Thu, 27 Jul 2006 20:14:29 +0000 (22:14 +0200)]
kbuild: linguistic fixes for Documentation/kbuild/modules.txt

I have done a look-through through Documentation/kbuild/ and my corrections
(proposed) are attached.

Cc'ed are original author Michael (responsible for comitting changes to
these files?), Sam (kbuild maintainer), Adrian (-trivial maintainer).

Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
18 years agokconfig: linguistic fixes for Documentation/kbuild/kconfig-language.txt
Jan Engelhardt [Thu, 27 Jul 2006 20:14:29 +0000 (22:14 +0200)]
kconfig: linguistic fixes for Documentation/kbuild/kconfig-language.txt

I have done a look-through through Documentation/kbuild/ and my corrections
(proposed) are attached.

Cc'ed are original author Michael (responsible for comitting changes to
these files?), Sam (kbuild maintainer), Adrian (-trivial maintainer).

Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
18 years agoremove RPM_BUILD_ROOT from asm-offsets.h
Olaf Hering [Wed, 26 Jul 2006 01:42:26 +0000 (18:42 -0700)]
remove RPM_BUILD_ROOT from asm-offsets.h

No file in rpm binary package should have the RPM_BUILD_ROOT string in it.
To simplify building of external modules, our kernel-source package
contains some temp files from the Kbuild system.  asm/asm-offsets.h is one
of the files that contains the absolute path if make O=$O is used.

  * This file was generated by /var/tmp/kernel-source-2.6.14_rc4-build/usr/src/linux-2.6.14-rc4-2/Kbuild

Remove the $RPM_BUILD_ROOT string in the shipped tempfile.

Signed-off-by: Olaf Hering <olh@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
18 years agokbuild: use in-kernel unifdef
Sam Ravnborg [Sun, 23 Jul 2006 18:47:50 +0000 (20:47 +0200)]
kbuild: use in-kernel unifdef

Let headers_install use in-kernel unifdef

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
18 years agokbuild: replace use of strlcpy with a dedicated implmentation in unifdef
Sam Ravnborg [Sun, 23 Jul 2006 18:41:30 +0000 (20:41 +0200)]
kbuild: replace use of strlcpy with a dedicated implmentation in unifdef

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
18 years agokbuild: add unifdef
Sam Ravnborg [Sun, 23 Jul 2006 18:39:59 +0000 (20:39 +0200)]
kbuild: add unifdef

This patch contains a raw copy of unifdef.c
Next patch will modify it and add infrastructure to use it
Adding unifdef to the kernel is acked by the author.

The reason to add unifdef as part of the kernel source is that it is not
yet a common utility on most distributions.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
18 years agokbuild: consistently decide when to rebuild a target
Sam Ravnborg [Sun, 23 Jul 2006 17:37:44 +0000 (19:37 +0200)]
kbuild: consistently decide when to rebuild a target

Consistently decide when to rebuild a target across all of
if_changed, if_changed_dep, if_changed_rule.
PHONY targets are now treated alike (ignored) for all targets

While add it make Kbuild.include almost readable by factoring out a few
bits to some common variables and reuse this in Makefile.build.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
18 years agokconfig: support DOS line endings
Matthew Wilcox [Thu, 13 Jul 2006 18:54:07 +0000 (12:54 -0600)]
kconfig: support DOS line endings

Kconfig doesn't currently handle config files with DOS line endings.
While these are, of course, an abomination, etc, etc, it can be handy
to not have to convert them first.  It's also a tiny patch and even adds
support for lines ending in just \r or even \n\r.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
18 years agoNew 'make headers_install_all' target.
David Woodhouse [Sun, 24 Sep 2006 21:16:03 +0000 (22:16 +0100)]
New 'make headers_install_all' target.

Install headers for _all_ architectures, suitable for making a tarball
release or extracting them for use in a separate package.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
18 years agoUse dependencies for 'make headers_install'.
David Woodhouse [Sun, 24 Sep 2006 21:15:14 +0000 (22:15 +0100)]
Use dependencies for 'make headers_install'.

Re-export header files only if either they or their controlling Kbuild
file has actually changed. Also allow for similar dependencies with
'headers_check', once we properly create the dependencies for those.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
18 years ago[S390] Unexport <asm/z90crypt.h>, export <asm/zcrypt.h> in its place.
David Woodhouse [Sun, 24 Sep 2006 21:07:25 +0000 (22:07 +0100)]
[S390] Unexport <asm/z90crypt.h>, export <asm/zcrypt.h> in its place.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
18 years agoRemove dead netfilter_logging.h from include/linux/Kbuild
David Woodhouse [Sun, 24 Sep 2006 21:06:48 +0000 (22:06 +0100)]
Remove dead netfilter_logging.h from include/linux/Kbuild

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
18 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
David Woodhouse [Sun, 24 Sep 2006 21:05:59 +0000 (22:05 +0100)]
Merge branch 'master' of git://git./linux/kernel/git/torvalds/linux-2.6

18 years agoocfs2: Teach ocfs2_drop_lock() to use ->set_lvb() callback
Mark Fasheh [Thu, 14 Sep 2006 21:44:51 +0000 (14:44 -0700)]
ocfs2: Teach ocfs2_drop_lock() to use ->set_lvb() callback

With this, we don't need to pass an additional struct with function pointer.

Now that the callbacks are fully used, comment the remaining API.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
18 years agoocfs2: Remove ->unblock lockres operation
Mark Fasheh [Thu, 14 Sep 2006 05:01:16 +0000 (22:01 -0700)]
ocfs2: Remove ->unblock lockres operation

Have ocfs2_process_blocked_lock() call ocfs2_generic_unblock_lock(), which
gets to be ocfs2_unblock_lock() now that it's the only possible unblock
function.

Remove the ->unblock() callback from the structure, and all lock type
specific unblock functions.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
18 years agoocfs2: move downconvert worker to lockres ops
Mark Fasheh [Thu, 14 Sep 2006 04:52:21 +0000 (21:52 -0700)]
ocfs2: move downconvert worker to lockres ops

This way lock types don't have to manually pass it to
ocfs2_generic_unblock_lock().

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
18 years agoocfs2: Remove unused dlmglue functions
Mark Fasheh [Thu, 14 Sep 2006 04:41:56 +0000 (21:41 -0700)]
ocfs2: Remove unused dlmglue functions

The meta data unblocking code no longer needs ocfs2_do_unblock_meta() or
ocfs2_can_downconvert_meta_lock(), so remove them.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
18 years agoocfs2: Have the metadata lock use generic dlmglue functions
Mark Fasheh [Thu, 14 Sep 2006 04:39:52 +0000 (21:39 -0700)]
ocfs2: Have the metadata lock use generic dlmglue functions

Fill in the ->check_downconvert and ->set_lvb callbacks with meta data
specific operations and switch ocfs2_unblock_meta() to call
ocfs2_generic_unblock_lock()

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
18 years agoocfs2: Add ->set_lvb callback in dlmglue
Mark Fasheh [Thu, 14 Sep 2006 04:21:52 +0000 (21:21 -0700)]
ocfs2: Add ->set_lvb callback in dlmglue

This allows a lock type to set the value block before downconvert.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
18 years agoocfs2: Add ->check_downconvert callback in dlmglue
Mark Fasheh [Thu, 14 Sep 2006 04:10:12 +0000 (21:10 -0700)]
ocfs2: Add ->check_downconvert callback in dlmglue

This will allow lock types to force a requeue of a lock downconvert.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
18 years agoocfs2: Check for refreshing locks in generic unblock function
Mark Fasheh [Thu, 14 Sep 2006 04:02:29 +0000 (21:02 -0700)]
ocfs2: Check for refreshing locks in generic unblock function

Tidy up the exit path a bit too.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
18 years agoocfs2: don't unconditionally pass LVB flags
Mark Fasheh [Wed, 13 Sep 2006 05:08:14 +0000 (22:08 -0700)]
ocfs2: don't unconditionally pass LVB flags

Allow a lock type to specifiy whether it makes use of the LVB. The only type
which does this right now is the meta data lock. This should save us some
space on network messages since they won't have to needlessly transmit value
blocks.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
18 years agoocfs2: combine inode and generic blocking AST functions
Mark Fasheh [Wed, 13 Sep 2006 04:58:23 +0000 (21:58 -0700)]
ocfs2: combine inode and generic blocking AST functions

There is extremely little difference between the two now. We can remove the
callback from ocfs2_lock_res_ops as well.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
18 years agoocfs2: Add ->get_osb() dlmglue locking operation
Mark Fasheh [Wed, 13 Sep 2006 04:49:13 +0000 (21:49 -0700)]
ocfs2: Add ->get_osb() dlmglue locking operation

Will be used to find the ocfs2_super structure from a given lockres.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
18 years agoocfs2: remove ->unlock_ast() callback from ocfs2_lock_res_ops
Mark Fasheh [Wed, 13 Sep 2006 04:36:58 +0000 (21:36 -0700)]
ocfs2: remove ->unlock_ast() callback from ocfs2_lock_res_ops

This was always defined to the same function in all locks, so clean things
up by removing and passing ocfs2_unlock_ast() directly to the DLM.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
18 years agoocfs2: combine inode and generic AST functions
Mark Fasheh [Wed, 13 Sep 2006 04:34:35 +0000 (21:34 -0700)]
ocfs2: combine inode and generic AST functions

There is extremely little difference between the two now. We can remove the
callback from ocfs2_lock_res_ops as well.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
18 years agoocfs2: Clean up lock resource refresh flags
Mark Fasheh [Wed, 13 Sep 2006 04:24:53 +0000 (21:24 -0700)]
ocfs2: Clean up lock resource refresh flags

Use of the refresh mechanism is lock-type wide, so move knowledge of that to
the ocfs2_lock_res_ops structure.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
18 years agoocfs2: Remove i_generation from inode lock names
Mark Fasheh [Sat, 23 Sep 2006 00:28:19 +0000 (17:28 -0700)]
ocfs2: Remove i_generation from inode lock names

OCFS2 puts inode meta data in the "lock value block" provided by the DLM.
Typically, i_generation is encoded in the lock name so that a deleted inode
on and a new one in the same block don't share the same lvb.

Unfortunately, that scheme means that the read in ocfs2_read_locked_inode()
is potentially thrown away as soon as the meta data lock is taken - we
cannot encode the lock name without first knowing i_generation, which
requires a disk read.

This patch encodes i_generation in the inode meta data lvb, and removes the
value from the inode meta data lock name. This way, the read can be covered
by a lock, and at the same time we can distinguish between an up to date and
a stale LVB.

This will help cold-cache stat(2) performance in particular.

Since this patch changes the protocol version, we take the opportunity to do
a minor re-organization of two of the LVB fields.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
18 years agoocfs2: Encode i_generation in the meta data lvb
Mark Fasheh [Tue, 12 Sep 2006 22:35:49 +0000 (15:35 -0700)]
ocfs2: Encode i_generation in the meta data lvb

When i_generation is removed from the lockname, this will help us determine
whether a meta data lvb has information that is in sync with the local
struct inode.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
18 years agoocfs2: Free up some space in the lvb
Mark Fasheh [Tue, 12 Sep 2006 22:22:18 +0000 (15:22 -0700)]
ocfs2: Free up some space in the lvb

lvb_version doesn't need to be a whole 32 bits. Make it an 8 bit field to
free up some space. This should be backwards compatible until we use one of
the fields, in which case we'd bump the lvb version anyway.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
18 years agoocfs2: Remove special casing for inode creation in ocfs2_dentry_attach_lock()
Mark Fasheh [Thu, 21 Sep 2006 23:51:28 +0000 (16:51 -0700)]
ocfs2: Remove special casing for inode creation in ocfs2_dentry_attach_lock()

We can't use LKM_LOCAL for new dentry locks because an unlink and subsequent
re-create of a name/inode pair may result in the lock still being mastered
somewhere in the cluster.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
18 years agoocfs2: manually d_move() during ocfs2_rename()
Mark Fasheh [Fri, 8 Sep 2006 21:22:54 +0000 (14:22 -0700)]
ocfs2: manually d_move() during ocfs2_rename()

Make use of FS_RENAME_DOES_D_MOVE to avoid a race condition that can occur
during ->rename() if we d_move() outside of the parent directory cluster
locks, and another node discovers the new name (created during the rename)
and unlinks it. d_move() will unconditionally rehash a dentry - which will
leave stale data in the system.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
18 years ago[PATCH] Allow file systems to manually d_move() inside of ->rename()
Mark Fasheh [Fri, 8 Sep 2006 21:22:21 +0000 (14:22 -0700)]
[PATCH] Allow file systems to manually d_move() inside of ->rename()

Some file systems want to manually d_move() the dentries involved in a
rename.  We can do this by making use of the FS_ODD_RENAME flag if we just
have nfs_rename() unconditionally do the d_move().  While there, we rename
the flag to be more descriptive.

OCFS2 uses this to protect that part of the rename operation with a cluster
lock.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>