GitHub/mt8127/android_kernel_alcatel_ttab.git
16 years agosiimage: add sil_* I/O ops
Bartlomiej Zolnierkiewicz [Mon, 28 Apr 2008 21:44:38 +0000 (23:44 +0200)]
siimage: add sil_* I/O ops

Add sil_iowrite{8,16,32}() and sil_ioread{8,16}() helpers, then use them to
merge code accessing configuration registers through PCI and MMIO together.

[ because of this SATA initialization bits from setup_mmio_siimage() are
  moved to init_chipset_siimage() ]

This also cuts code size a bit:

   text    data     bss     dec     hex filename
   4437     164       0    4601    11f9 drivers/ide/pci/siimage.o.before
   3979     164       0    4143    102f drivers/ide/pci/siimage.o.after

While at it:

* Use I/O ops directly instead of using ->IN{B,W} and ->OUT{B,W}.

* Fixup CodingStyle in setup_mmio_siimage().

* Rename 'tmpbyte' variable to 'tmp' in init_chipset_siimage().

There should be no functional changes caused by this patch.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agosiimage: do clocking register posting earlier in setup_mmio_siimage()
Bartlomiej Zolnierkiewicz [Mon, 28 Apr 2008 21:44:38 +0000 (23:44 +0200)]
siimage: do clocking register posting earlier in setup_mmio_siimage()

Do clocking register posting earlier in setup_mmio_siimage()
to match code in init_chipset_siimage().

This is a preparation for the next patch which merges PCI and MMIO
code paths together.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove ->INS{W,L} and ->OUTS{W,L} methods
Bartlomiej Zolnierkiewicz [Mon, 28 Apr 2008 21:44:37 +0000 (23:44 +0200)]
ide: remove ->INS{W,L} and ->OUTS{W,L} methods

* Use ins{w,l}()/outs{w,l}() and __ide_mm_ins{w,l}()/__ide_mm_outs{w,l}()
  directly in ata_{in,out}put_data() (by using IDE_HFLAG_MMIO host flag to
  decide which I/O ops are required).

* Remove no longer needed ->INS{W,L} and ->OUTS{W,L} methods (ide-h8300,
  au1xxx-ide and scc_pata implement their own ->{in,out}put_data methods).

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: add IDE_HFLAG_MMIO host flag (take 2)
Bartlomiej Zolnierkiewicz [Mon, 28 Apr 2008 21:44:37 +0000 (23:44 +0200)]
ide: add IDE_HFLAG_MMIO host flag (take 2)

* Add IDE_HFLAG_MMIO host flag and set it for hosts which use
  default_hwif_mmiops().

v2:
* Fix kernel panic in pmac host driver (',' should be '|').

  Thanks to Kamalesh for reporting it + testing the fix
  and to Andrew for hinting me about the source of the issue.

Cc: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-h8300: add ->{in,out}put_data methods (take 2)
Bartlomiej Zolnierkiewicz [Mon, 28 Apr 2008 21:44:37 +0000 (23:44 +0200)]
ide-h8300: add ->{in,out}put_data methods (take 2)

v2:

* Update ->{in,out}_data methods to take 'struct request *rq' argument.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoau1xxx-ide: add ->{in,out}put_data methods (take 2)
Bartlomiej Zolnierkiewicz [Mon, 28 Apr 2008 21:44:37 +0000 (23:44 +0200)]
au1xxx-ide: add ->{in,out}put_data methods (take 2)

v2:

* Update ->{in,out}_data methods to take 'struct request *rq' argument.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoscc_pata: add ->{in,out}put_data methods (take 2)
Bartlomiej Zolnierkiewicz [Mon, 28 Apr 2008 21:44:36 +0000 (23:44 +0200)]
scc_pata: add ->{in,out}put_data methods (take 2)

v2:

* Update ->{in,out}_data methods to take 'struct request *rq' argument
  (thanks to Stephen Rothwell for catching it).

There should be no functional changes caused by this patch.

Cc: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Cc: Akira Iguchi <akira2.iguchi@toshiba.co.jp>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: merge ->atapi_*put_bytes and ->ata_*put_data methods
Bartlomiej Zolnierkiewicz [Mon, 28 Apr 2008 21:44:36 +0000 (23:44 +0200)]
ide: merge ->atapi_*put_bytes and ->ata_*put_data methods

* Merge ->atapi_{in,out}put_bytes and ->ata_{in,out}put_data methods
  into new ->{in,out}put_data methods which take number of bytes to
  transfer as an argument and always do padding.

While at it:

* Use 'hwif' or 'drive->hwif' instead of 'HWIF(drive)'.

There should be no functional changes caused by this patch (all users
of ->ata_{in,out}put_data methods were using multiply-of-4 word counts).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agofalconide/q40ide: add ->atapi_*put_bytes and ->ata_*put_data methods (take 2)
Bartlomiej Zolnierkiewicz [Mon, 28 Apr 2008 21:44:36 +0000 (23:44 +0200)]
falconide/q40ide: add ->atapi_*put_bytes and ->ata_*put_data methods (take 2)

* Add ->atapi_{in,out}put_bytes and ->ata_{in,out}put_data methods to
  falconide and q40ide host drivers (->ata_* methods are implemented on
  top of ->atapi_* methods so they also do byte-swapping now).

* Cleanup atapi_{in,out}put_bytes().

v2:
* Add 'struct request *rq' argument to ->ata_{in,out}put_data methods
  and don't byte-swap disk fs requests (we shouldn't un-swap fs requests
  because fs itself is stored byte-swapped on the disk) - this is how
  things were done before the patch (ideally device mapper should be
  used instead but it would break existing setups and would have some
  performance impact).

Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Michael Schmitz <schmitz@debian.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Richard Zidlicky <rz@linux-m68k.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: fix au1xxx-ide breakage
Bartlomiej Zolnierkiewicz [Mon, 28 Apr 2008 21:44:35 +0000 (23:44 +0200)]
ide: fix au1xxx-ide breakage

On Monday 28 April 2008, Sergei Shtylyov wrote:
> Hello, I wrote:
>
> > Fix these warnings emitted when compiling drivers/ide/mips/au1xxx-ide.c:
>
> > include/asm/mach-au1x00/au1xxx_ide.h:137: warning: 'auide_tune_drive' declared
> > `static' but never defined
> > include/asm/mach-au1x00/au1xxx_ide.h:138: warning: 'auide_tune_chipset' declared
> >  `static' but never defined
>
> > by wiping out the whole "function prototyping" section from the header file
> > <asm-mips/mach-au1x00/au1xxx_ide.h> as it mostly declared functions that are
> > already dead in the IDE driver; move the only useful prototype into the driver.
> >
> > Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
>
> > ---
> > I'm not sure thru which tree this should go -- probably thru Linux/MIPS one...
>
> > Bart, au1xxx-ide-fix-mwdma-support.patch will probably need to be updated to
> > remove that added prototype since it won't be needed anymore...
>
>     Which you haven't done either in that patch or in
> au1xxx-ide-use-init_dma-method.patch. So, face the consequences:
>
> drivers/ide/mips/au1xxx-ide.c:456: error: conflicting types for 'auide_ddma_init'
> drivers/ide/mips/au1xxx-ide.c:51: error: previous declaration of
> 'auide_ddma_init' was here
> drivers/ide/mips/au1xxx-ide.c:456: error: conflicting types for 'auide_ddma_init'
> drivers/ide/mips/au1xxx-ide.c:51: error: previous declaration of
> 'auide_ddma_init' was here
> drivers/ide/mips/au1xxx-ide.c:51: warning: 'auide_ddma_init' used but never
> defined

Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoMerge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
Linus Torvalds [Mon, 28 Apr 2008 17:51:43 +0000 (10:51 -0700)]
Merge branch 'upstream' of git://ftp.linux-mips.org/upstream-linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (45 commits)
  [MIPS] Pb1200/DBAu1200: move platform code to its proper place
  [MIPS] Fix handling of trap and breakpoint instructions
  [MIPS] Pb1200: do register SMC 91C111
  [MIPS] DBAu1200: fix bad SMC 91C111 resource size
  [NET] Kconfig: Rename MIKROTIK_RB500 -> MIKROTIK_RB532
  [MIPS] IP27: Fix build bug due to missing include
  [MIPS] Fix some sparse warnings on traps.c and irq-msc01.c
  [MIPS] cevt-gt641xx: Kill unnecessary include
  [MIPS] DS1287: Add clockevent driver
  [MIPS] add DECstation I/O ASIC clocksource
  [MIPS] rbtx4938: minor cleanup
  [MIPS] Alchemy: kill unused PCI_IRQ_TABLE_LOOKUP macro
  [MIPS] rbtx4938: misc cleanups
  [MIPS] jmr3927: use generic txx9 gpio
  [MIPS] rbhma4500: use generic txx9 gpio
  [MIPS] generic txx9 gpio support
  [MIPS] make fallback gpio.h gpiolib-friendly
  [MIPS] unexport null_perf_irq() and make it static
  [MIPS] unexport rtc_mips_set_time()
  [MIPS] unexport copy_from_user_page()
  ...

16 years agox86: Fix 32-bit MSI-X allocation leakage
PJ Waskiewicz [Sat, 26 Apr 2008 00:58:52 +0000 (17:58 -0700)]
x86: Fix 32-bit MSI-X allocation leakage

This bug was introduced in the 2.6.24 i386/x86_64 tree merge, where
MSI-X vector allocation will eventually fail.  The cause is the new
bit array tracking used vectors is not getting cleared properly on
IRQ destruction on the 32-bit APIC code.

This can be seen easily using the ixgbe 10 GbE driver on multi-core
systems by simply loading and unloading the driver a few times.
Depending on the number of available vectors on the host system, the
MSI-X allocation will eventually fail, and the driver will only be
able to use legacy interrupts.

I am generating the same patch for both stable trees for 2.6.24 and
2.6.25.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agodocbook: fix bitops fatal filename error
Randy Dunlap [Mon, 28 Apr 2008 17:21:40 +0000 (10:21 -0700)]
docbook: fix bitops fatal filename error

bitops source file was renamed, so fix docbook for that.
docproc: linux-2.6.25-git11/include/asm-x86/bitops_32.h: No such file or directory

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
Linus Torvalds [Mon, 28 Apr 2008 17:08:49 +0000 (10:08 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jmorris/selinux-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/selinux-2.6:
  SELinux: Fix a RCU free problem with the netport cache
  SELinux: Made netnode cache adds faster
  SELinux: include/security.h whitespace, syntax, and other cleanups
  SELinux: policydb.h whitespace, syntax, and other cleanups
  SELinux: mls_types.h whitespace, syntax, and other cleanups
  SELinux: mls.h whitespace, syntax, and other cleanups
  SELinux: hashtab.h whitespace, syntax, and other cleanups
  SELinux: context.h whitespace, syntax, and other cleanups
  SELinux: ss/conditional.h whitespace, syntax, and other cleanups
  SELinux: selinux/include/security.h whitespace, syntax, and other cleanups
  SELinux: objsec.h whitespace, syntax, and other cleanups
  SELinux: netlabel.h whitespace, syntax, and other cleanups
  SELinux: avc_ss.h whitespace, syntax, and other cleanups

Fixed up conflict in include/linux/security.h manually

16 years agousb input endianness annotations and fixes
Al Viro [Mon, 28 Apr 2008 06:00:26 +0000 (07:00 +0100)]
usb input endianness annotations and fixes

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agocelleb_scc_pciex __iomem annotations
Al Viro [Mon, 28 Apr 2008 05:59:45 +0000 (06:59 +0100)]
celleb_scc_pciex __iomem annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agodrivers/usb annotations and fixes
Al Viro [Mon, 28 Apr 2008 06:00:16 +0000 (07:00 +0100)]
drivers/usb annotations and fixes

* endianness annotations
* endianness fixes
* missing get_unaligned/put_unaligned

It's pretty much all over the place, changes to different files are independent.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Serial-parts-Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agousbhid endianness annotations and fixes
Al Viro [Mon, 28 Apr 2008 06:00:05 +0000 (07:00 +0100)]
usbhid endianness annotations and fixes

usb_control_msg() converts arguments to little-endian itself,
doing that in caller means breakage on big-endian boxen.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoq40ide breakage
Al Viro [Mon, 28 Apr 2008 05:59:35 +0000 (06:59 +0100)]
q40ide breakage

again, fallout from ide merge

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotypo in sata_fsl
Al Viro [Mon, 28 Apr 2008 05:59:55 +0000 (06:59 +0100)]
typo in sata_fsl

it's ata_link, not ata_linke

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomore icside breakage (from next ide merge)
Al Viro [Mon, 28 Apr 2008 05:59:25 +0000 (06:59 +0100)]
more icside breakage (from next ide merge)

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofix ia64 local_irq_save() et.al.
Al Viro [Mon, 28 Apr 2008 05:59:15 +0000 (06:59 +0100)]
fix ia64 local_irq_save() et.al.

psr is not a good name for local variable in macro body when it
has a good chance of being the argument of said macro (actually
is at least in one place)

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoia64 kvm fixes for O=... builds
Al Viro [Mon, 28 Apr 2008 05:59:05 +0000 (06:59 +0100)]
ia64 kvm fixes for O=... builds

* EXTRA_CFLAGS do not apply for *.S
* don't bother with symlinks to ../lib/mem*.S, just add ../lib/mem*.o
  to object list

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofrv si_addr annotations
Al Viro [Mon, 28 Apr 2008 05:58:56 +0000 (06:58 +0100)]
frv si_addr annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Mon, 28 Apr 2008 16:45:57 +0000 (09:45 -0700)]
Merge git://git./linux/kernel/git/davem/sparc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  sparc: video drivers: add facility level
  sparc: tcx.c make tcx_init and tcx_exit static
  sparc: ffb.c make ffb_init and ffb_exit static
  sparc: cg14.c make cg14_init and cg15_exit static
  sparc: bw2.c fix bw2_exit
  sparc64: Fix accidental syscall restart on child return from clone/fork/vfork.
  sparc64: Clean up handling of pt_regs trap type encoding.
  sparc: Remove old style signal frame support.
  sparc64: Kill bogus RT_ALIGNEDSZ macro from signal.c
  sparc: sunzilog.c remove unused argument
  sparc: fix drivers/video/tcx.c warning
  sparc64: Kill unused local ISA bus layer.
  input: Rewrite sparcspkr device probing.
  sparc64: Do not ignore 'pmu' device ranges.
  sparc64: Kill ISA_FLOPPY_WORKS code.
  sparc64: Kill CONFIG_SPARC32_COMPAT
  sparc64: Cleanups and corrections for arch/sparc64/Kconfig
  sparc64: Fix wedged irq regression.

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Mon, 28 Apr 2008 16:44:11 +0000 (09:44 -0700)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  iwlwifi: Allow building iwl3945 without iwl4965.
  wireless: Fix compile error with wifi & leds
  tcp: Fix slab corruption with ipv6 and tcp6fuzz
  ipv4/ipv6 compat: Fix SSM applications on 64bit kernels.
  [IPSEC]: Use digest_null directly for auth
  sunrpc: fix missing kernel-doc
  can: Fix copy_from_user() results interpretation
  Revert "ipv6: Fix typo in net/ipv6/Kconfig"
  tipc: endianness annotations
  ipv6: result of csum_fold() is already 16bit, no need to cast
  [XFRM] AUDIT: Fix flowlabel text format ambibuity.

16 years agomake CC_OPTIMIZE_FOR_SIZE non-experimental
Ingo Molnar [Sun, 27 Apr 2008 23:39:43 +0000 (01:39 +0200)]
make CC_OPTIMIZE_FOR_SIZE non-experimental

this option has been the default on a wide range of distributions
for a long time - time to make it non-experimental.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-hrt
Linus Torvalds [Mon, 28 Apr 2008 16:36:40 +0000 (09:36 -0700)]
Merge git://git./linux/kernel/git/tglx/linux-2.6-hrt

* git://git.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-hrt:
  hrtimer: timeout too long when using HRTIMER_CB_SOFTIRQ

16 years ago[MIPS] Pb1200/DBAu1200: move platform code to its proper place
Sergei Shtylyov [Mon, 28 Apr 2008 15:54:38 +0000 (19:54 +0400)]
[MIPS] Pb1200/DBAu1200: move platform code to its proper place

Since both the IDE interface and SMC 91C111 Ethernet chip are on-board
devices, not SOC devices, move the platform device registration form the
common to the board specific code.

While at it, remove semicolon (which didn't break compilation only by
chance) from the AU1XXX_ATA_DDMA_REQ macro and do some renaming:

- change 'au1200_ide0_' variable name prefix to the mere 'ide_';

- change 'smc91x_' variable name prefix to 'smc91c111_' since that's the
  name of the chip used on the boards;

- drop 'AU1XXX_' prefix from the names of macros describing IDE and Ethernet
  on-board devices;

- change 'SMC91111_' to 'SMC91C111_', change 'IRQ' to 'INT' in the names of
  the macros describing the Ethernet chip for consistency with the IDE
  macros;

- change 'ATA_' to 'IDE_' and 'OFFSET' to 'SHIFT' (since this value is
  indeed a shift count) in the names of the macros describing the IDE
  interface.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Fix handling of trap and breakpoint instructions
Ralf Baechle [Sun, 20 Apr 2008 15:28:54 +0000 (16:28 +0100)]
[MIPS] Fix handling of trap and breakpoint instructions

With fixes and cleanups from Atsushi Nemoto (anemo@mba.ocn.ne.jp).

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Pb1200: do register SMC 91C111
Sergei Shtylyov [Tue, 15 Apr 2008 18:26:18 +0000 (22:26 +0400)]
[MIPS] Pb1200: do register SMC 91C111

Pb1200 does have SMC 91C111 Ethernet chip on board but the platform code
did not register it, so one couldn't mount NFS...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] DBAu1200: fix bad SMC 91C111 resource size
Sergei Shtylyov [Tue, 15 Apr 2008 18:20:45 +0000 (22:20 +0400)]
[MIPS] DBAu1200: fix bad SMC 91C111 resource size

The on-board SMC 91C111 chip only decodes 16 bytes of memory (obviously, it
can not decode a whole megabyte starting from address 0x19000300).

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[NET] Kconfig: Rename MIKROTIK_RB500 -> MIKROTIK_RB532
Ralf Baechle [Mon, 28 Apr 2008 11:48:40 +0000 (12:48 +0100)]
[NET] Kconfig: Rename MIKROTIK_RB500 -> MIKROTIK_RB532

The platform is actually named routerboard 532 so let's call it this.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Acked-by: Jeff Garzik <jeff@garzik.org>
16 years ago[MIPS] IP27: Fix build bug due to missing include
Adrian Bunk [Wed, 23 Apr 2008 15:55:59 +0000 (18:55 +0300)]
[MIPS] IP27: Fix build bug due to missing include

asm-mips/mach-ip27/topology.h must #include <asm-generic/topology.h>
This fixes the following compile error:

...
  CC      kernel/sched.o
/home/bunk/linux/kernel-2.6/git/linux-2.6/kernel/sched.c: In function 'find_next_best_node':
/home/bunk/linux/kernel-2.6/git/linux-2.6/kernel/sched.c:7015: error: implicit declaration of function 'node_to_cpumask_ptr'
/home/bunk/linux/kernel-2.6/git/linux-2.6/kernel/sched.c:7015: error: '__tmp__' undeclared (first use in this function)
/home/bunk/linux/kernel-2.6/git/linux-2.6/kernel/sched.c:7015: error: (Each undeclared identifier is reported only once
/home/bunk/linux/kernel-2.6/git/linux-2.6/kernel/sched.c:7015: error: for each function it appears in.)
/home/bunk/linux/kernel-2.6/git/linux-2.6/kernel/sched.c: In function 'sched_domain_node_span':
/home/bunk/linux/kernel-2.6/git/linux-2.6/kernel/sched.c:7047: error: 'nodemask' undeclared (first use in this function)
/home/bunk/linux/kernel-2.6/git/linux-2.6/kernel/sched.c:7048: warning: ISO C90 forbids mixed declarations and code
/home/bunk/linux/kernel-2.6/git/linux-2.6/kernel/sched.c:7059: error: implicit declaration of function 'node_to_cpumask_ptr_next'
/home/bunk/linux/kernel-2.6/git/linux-2.6/kernel/sched.c: In function '__build_sched_domains':
/home/bunk/linux/kernel-2.6/git/linux-2.6/kernel/sched.c:7605: error: 'pnodemask' undeclared (first use in this function)
make[2]: *** [kernel/sched.o] Error 1

<--  snip  -->

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Fix some sparse warnings on traps.c and irq-msc01.c
Atsushi Nemoto [Fri, 25 Apr 2008 16:55:30 +0000 (01:55 +0900)]
[MIPS] Fix some sparse warnings on traps.c and irq-msc01.c

* Declare board_bind_eic_interrupt, board_watchpoint_handler in traps.h
* Make msc_bind_eic_interrupt static and fix its argument types.
* Make msc_levelirq_type, msc_edgeirq_type static.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] cevt-gt641xx: Kill unnecessary include
Atsushi Nemoto [Thu, 24 Apr 2008 14:08:55 +0000 (23:08 +0900)]
[MIPS] cevt-gt641xx: Kill unnecessary include

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] DS1287: Add clockevent driver
Yoichi Yuasa [Fri, 25 Apr 2008 03:11:44 +0000 (12:11 +0900)]
[MIPS] DS1287: Add clockevent driver

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] add DECstation I/O ASIC clocksource
Yoichi Yuasa [Thu, 24 Apr 2008 00:48:40 +0000 (09:48 +0900)]
[MIPS] add DECstation I/O ASIC clocksource

Add DECstation I/O ASIC clocksource

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] rbtx4938: minor cleanup
Atsushi Nemoto [Tue, 22 Apr 2008 14:59:30 +0000 (23:59 +0900)]
[MIPS] rbtx4938: minor cleanup

Do not initialize res->parent for platform device.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Alchemy: kill unused PCI_IRQ_TABLE_LOOKUP macro
Sergei Shtylyov [Tue, 22 Apr 2008 19:28:57 +0000 (23:28 +0400)]
[MIPS] Alchemy: kill unused PCI_IRQ_TABLE_LOOKUP macro

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] rbtx4938: misc cleanups
Atsushi Nemoto [Mon, 14 Apr 2008 12:49:07 +0000 (21:49 +0900)]
[MIPS] rbtx4938: misc cleanups

* Do not use non-standard I/O accessors, such as reg_rd08, etc.
* Kill unnecessary wbflush()
* Kill tx4938_mips.h
* Kill unnecessary includes

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] jmr3927: use generic txx9 gpio
Atsushi Nemoto [Fri, 4 Apr 2008 15:56:27 +0000 (00:56 +0900)]
[MIPS] jmr3927: use generic txx9 gpio

Use generic txx9 gpio (and gpiolib) for JMR3927 board.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] rbhma4500: use generic txx9 gpio
Atsushi Nemoto [Fri, 4 Apr 2008 15:56:09 +0000 (00:56 +0900)]
[MIPS] rbhma4500: use generic txx9 gpio

Use generic txx9 gpio (and gpiolib) for RBHMA4500 board.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] generic txx9 gpio support
Atsushi Nemoto [Fri, 4 Apr 2008 15:55:41 +0000 (00:55 +0900)]
[MIPS] generic txx9 gpio support

This is a board-independent TXx9 gpio API implementation using gpiolib.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] make fallback gpio.h gpiolib-friendly
Atsushi Nemoto [Fri, 4 Apr 2008 15:55:24 +0000 (00:55 +0900)]
[MIPS] make fallback gpio.h gpiolib-friendly

If gpiolib was selected, asm-generic/gpio.h provides some prototypes
for gpio API and implementation helpers.  With this patch, platform
code can implement its GPIO API using gpiolib without custom gpio.h
file.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] unexport null_perf_irq() and make it static
Dmitri Vorobiev [Tue, 1 Apr 2008 23:58:38 +0000 (03:58 +0400)]
[MIPS] unexport null_perf_irq() and make it static

This patch unexports the null_perf_irq() symbol, and simultaneously
makes this function static.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] unexport rtc_mips_set_time()
Dmitri Vorobiev [Tue, 1 Apr 2008 23:58:37 +0000 (03:58 +0400)]
[MIPS] unexport rtc_mips_set_time()

No users for the rtc_mips_set_time() routine exist outside of the
core kernel code. Therefore, EXPORT_SYMBOL(rtc_mips_set_time) is
useless, and this patch removes it.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] unexport copy_from_user_page()
Dmitri Vorobiev [Tue, 1 Apr 2008 23:58:36 +0000 (03:58 +0400)]
[MIPS] unexport copy_from_user_page()

No users for the copy_from_user_page() routine exist outside of the
core kernel code. Therefore, EXPORT_SYMBOL(copy_from_user_page) is
useless, and this patch removes it.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] unexport copy_to_user_page()
Dmitri Vorobiev [Tue, 1 Apr 2008 23:58:35 +0000 (03:58 +0400)]
[MIPS] unexport copy_to_user_page()

The copy_to_user_page() function is called only in the core kernel
code. Therefore, there is no need to export it. This patch removes
EXPORT_SYMBOL(copy_to_user_page).

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] unexport copy_user_highpage()
Dmitri Vorobiev [Tue, 1 Apr 2008 23:58:34 +0000 (03:58 +0400)]
[MIPS] unexport copy_user_highpage()

The copy_user_highpage() routine has no users outside of the
core kernel code, so exporting this symbol is pointless.
This patch removes EXPORT_SYMBOL(copy_user_highpage).

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Alchemy: move UART platform code to its proper place
Sergei Shtylyov [Thu, 3 Apr 2008 20:02:53 +0000 (00:02 +0400)]
[MIPS] Alchemy: move UART platform code to its proper place

Move the code registering the Alchemy UART platform devices from
drivers/serial/ to its proper place, into the Alchemy platform code.  Fix
the related Kconfig entry, while at it...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Alchemy: kill useless #include's, #define's and extern's
Sergei Shtylyov [Wed, 23 Apr 2008 18:43:55 +0000 (22:43 +0400)]
[MIPS] Alchemy: kill useless #include's, #define's and extern's

Go thru the Alchemy code and hunt down every unneeded #include, #define, and
extern (some of which refer to already long dead functions).

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] malta_int.c: make 4 variables static
Dmitri Vorobiev [Mon, 31 Mar 2008 22:03:25 +0000 (02:03 +0400)]
[MIPS] malta_int.c: make 4 variables static

The following variables defined in arch/mips/mips-boards/malta/malta_int.c
can become static: msc_irqmap[], msc_nr_irqs, msc_eicirqmap[], and
msc_nr_eicirqs. This patch makes them static.

Successfully build-tested using default configs for Malta, Atlas
and SEAD boards.

Runtime test successfully performed by booting the Malta 4Kc board
up to the shell prompt.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] make standard_io_resources[] static
Dmitri Vorobiev [Mon, 31 Mar 2008 22:03:24 +0000 (02:03 +0400)]
[MIPS] make standard_io_resources[] static

The array standard_io_resources[] needs not to be exposed in the kernel
global namespace. This patch makes it static.

Successfully build-tested using default configs for Malta, Atlas
and SEAD boards.

Runtime test successfully performed by booting the Malta 4Kc board
up to the shell prompt.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] make plat_perf_setup() static
Dmitri Vorobiev [Mon, 31 Mar 2008 22:03:23 +0000 (02:03 +0400)]
[MIPS] make plat_perf_setup() static

There is no need for the plat_perf_setup() function to be global,
so make it static.

Successfully build-tested using default configs for Malta, Atlas
and SEAD boards.

Runtime test successfully performed by booting the Malta 4Kc board
up to the shell prompt.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] make mdesc and prom_getmdesc() static
Dmitri Vorobiev [Mon, 31 Mar 2008 22:03:22 +0000 (02:03 +0400)]
[MIPS] make mdesc and prom_getmdesc() static

Neither the mdesc[] array nor the prom_getmdesc() function need to
be global. This patch makes them static.

Successfully build-tested using default configs for Malta, Atlas
and SEAD boards.

Runtime test successfully performed by booting the Malta 4Kc board
up to the shell prompt.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] make mips_ejtag_setup() static
Dmitri Vorobiev [Mon, 31 Mar 2008 22:03:21 +0000 (02:03 +0400)]
[MIPS] make mips_ejtag_setup() static

This change makes the needlessly global function mips_ejtag_setup() static.

Successfully build-tested using default configs for Malta, Atlas
and SEAD boards.

Runtime test successfully performed by booting the Malta 4Kc board
up to the shell prompt.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] make mips_nmi_setup() static
Dmitri Vorobiev [Mon, 31 Mar 2008 22:03:20 +0000 (02:03 +0400)]
[MIPS] make mips_nmi_setup() static

This change makes the needlessly global function mips_nmi_setup() static.

Successfully build-tested using default configs for Malta, Atlas
and SEAD boards.

Runtime test successfully performed by booting the Malta 4Kc board
up to the shell prompt.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] replace remaining __FUNCTION__ occurrences
Harvey Harrison [Fri, 28 Mar 2008 21:34:39 +0000 (14:34 -0700)]
[MIPS] replace remaining __FUNCTION__ occurrences

__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] remove redundant display of free swap space in show_mem()
Johannes Weiner [Fri, 28 Mar 2008 21:34:37 +0000 (14:34 -0700)]
[MIPS] remove redundant display of free swap space in show_mem()

Signed-off-by: Johannes Weiner <hannes@saeurebad.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Alchemy: kill useless time variables
Sergei Shtylyov [Thu, 27 Mar 2008 19:05:57 +0000 (22:05 +0300)]
[MIPS] Alchemy: kill useless time variables

Since the commit 91a2fcc88634663e9e13dcdfad0e4a860e64aeee ([MIPS]
Consolidate all variants of MIPS cp0 timer interrupt handlers) removed the
Alchemy specific timer handler, 'r4k_offset' and 'r4k_cur' variables became
practically useless, so get rid of them at last, renaming cal_r4off()
function into calc_clock() and making it return CPU frequency. Also, make
'no_au1xxx_32khz' variable static...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Alchemy: don't unmask timer IRQ early
Sergei Shtylyov [Mon, 24 Mar 2008 20:15:50 +0000 (23:15 +0300)]
[MIPS] Alchemy: don't unmask timer IRQ early

Defer the unmasking of the count/compare interrupt (IRQ5) till the
clockevent driver initialization:

- only enable the cascaded IRQs 0 thru 4 in arch_init_irq(); kill the
  ALLINTS macro -- this change is blessed by AMD as I saw it in their own
  patch; :-)

- do not force IRQ5 enabled in plat_time_init() if PM is enabled and there's
  no 32 KHz crystal.

Update the copyrights (taking into account my prior changes), also removing
Pete Popov's old email...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Move arch/mips/philips to arch/mips/nxp
Daniel Laird [Thu, 6 Mar 2008 09:07:18 +0000 (09:07 +0000)]
[MIPS] Move arch/mips/philips to arch/mips/nxp

Signed-off-by: daniel.j.laird <daniel.j.laird@nxp.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] replace __inline with inline
Harvey Harrison [Wed, 5 Mar 2008 01:17:16 +0000 (17:17 -0800)]
[MIPS] replace __inline with inline

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Add support for MIPS CMP platform.
Ralf Baechle [Mon, 28 Apr 2008 16:14:26 +0000 (17:14 +0100)]
[MIPS] Add support for MIPS CMP platform.

Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Add CoreFPGA5 support; distinguish between SOCit/ROCit
Chris Dearman [Fri, 21 Sep 2007 13:50:08 +0000 (14:50 +0100)]
[MIPS] Add CoreFPGA5 support; distinguish between SOCit/ROCit

Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Add noulri kernel argument to disable "rdhwr $29" usermode support.
Chris Dearman [Wed, 3 Oct 2007 09:43:56 +0000 (10:43 +0100)]
[MIPS] Add noulri kernel argument to disable "rdhwr $29" usermode support.

Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Allow setting of the cache attribute at run time.
Chris Dearman [Tue, 18 Sep 2007 23:58:24 +0000 (00:58 +0100)]
[MIPS] Allow setting of the cache attribute at run time.

Slightly tacky, but there is a precedent in the sparc archirecture code.

Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Tidy up cache attributes
Chris Dearman [Tue, 18 Sep 2007 23:51:57 +0000 (00:51 +0100)]
[MIPS] Tidy up cache attributes

Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] All MIPS32 processors support64-bit physical addresses.
Chris Dearman [Tue, 18 Sep 2007 23:46:32 +0000 (00:46 +0100)]
[MIPS] All MIPS32 processors support64-bit physical addresses.

Still, only the 4K may actually implement it.

Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Remove TLB sanitation code
Chris Dearman [Fri, 14 Sep 2007 20:21:58 +0000 (21:21 +0100)]
[MIPS] Remove TLB sanitation code

It is not being used by Malta and shouldn't be needed for MIPSsim.

Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Basic SPRAM support
Chris Dearman [Thu, 13 Sep 2007 11:32:02 +0000 (12:32 +0100)]
[MIPS] Basic SPRAM support

Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Reimplement clear_page/copy_page
Thiemo Seufer [Mon, 18 Feb 2008 19:32:49 +0000 (19:32 +0000)]
[MIPS] Reimplement clear_page/copy_page

Fold the SB-1 specific implementation of clear_page/copy_page in the
generic version, and rewrite that one in tlbex style. The immediate
benefits:
  - It converts the compile-time workaround for SB-1 pass 1 prefetches
    to a more efficient run-time check.
  - It allows adjustment of loop unfolling, which helps to reduce the
    number of redundant cdex cache ops.
  - It fixes some esoteric cornercases (the cache line length calculations
    can go wrong, and support for 64k pages without prefetch instructions
    will overflow the addiu immediate).
  - Somewhat better guesses of "good" prefetch values.

Signed-off-by: Thiemo Seufer <ths@networkno.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years agokernel-doc: detect trailing kernel-doc line trash
Randy Dunlap [Mon, 28 Apr 2008 09:16:35 +0000 (02:16 -0700)]
kernel-doc: detect trailing kernel-doc line trash

Print a warning when a kernel-doc comment block ends with text on the same
line as the ending comment characters, e.g.:

 * this text is lost. */

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agokernel-doc: detect/prevent duplicate doc section names
Randy Dunlap [Mon, 28 Apr 2008 09:16:34 +0000 (02:16 -0700)]
kernel-doc: detect/prevent duplicate doc section names

I saw this problem recently.  With this kernel-doc:

 * Note: some important info
 *
 * Note: other important info

kernel-doc uses the "section name" (preceding the ':', like "Note") as a hash
key for storing the descriptive text ("blah important info").  It is (was)
possible to have duplicate (colliding) section names, without any kind of
warning or error.

kernel-doc happily used the latter descriptive text for all instances of
printing the <section-name> descriptive text and the former important info
was lost.

One way to "fix" this is to modify the kernel-doc comments, e.g.:

 * Note1: foo bar
 *
 * Note.2: blah zay

For now, kernel-doc will signal an error when it sees colliding section names
like this.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofatfs: fix build warning with 64k PAGE_SIZE
Olof Johansson [Mon, 28 Apr 2008 09:16:32 +0000 (02:16 -0700)]
fatfs: fix build warning with 64k PAGE_SIZE

Annoying gcc warning:

fs/fat/inode.c: In function 'fat_fill_super':
fs/fat/inode.c:1222: warning: comparison is always false due to limited range of data type

Change it to compare with 4K instead of PAGE_CACHE_SIZE, as suggested
by OGAWA-san.

[FAT spec says: logical_sector_size should be 512, 1024, 2048 4096]
So, at least for now, we limit it to 4096.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofat: detect media without partition table correctly
Frank Seidel [Mon, 28 Apr 2008 09:16:31 +0000 (02:16 -0700)]
fat: detect media without partition table correctly

I received a complaint that some FAT formated medias (e.g.  sd memory cards)
trigger a "unknown partition table" message even though there is no partition
table and they work correctly, while in general (when e.g.  formated with
mkdosfs or even Windows Vista) this message is not shown.

Currently this seems only to happen when the medias get formatted with Windows
XP (and possibly Win 2000).  Then the boot indicator byte contains garbage
(part of text message) and so do the other parts checked by msdos_paritition
which then later triggers this message.

References: novell bug #364365

Most fat formatted media without partition table contains zeros in the boot
indication and the other tested bytes and so falls through the checks in
msdos_partition, leading it to return with 1 (all is fine).

But some (e.g.  WinXP formatted) fat fomated medias don't use boot_ind and so
the check fails and causes a "unkown partition table" warning eventhough there
is none and everything would be fine.

This additional check directly verifies if there is a fat formatted medium
without a partition table.

Signed-off-by: Frank Seidel <fseidel@suse.de>
Cc: Andreas Dilger <adilger@sun.com>
Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoFAT_VALID_MEDIA(): remove pointless test
Andrew Morton [Mon, 28 Apr 2008 09:16:30 +0000 (02:16 -0700)]
FAT_VALID_MEDIA(): remove pointless test

The on-disk media specification field in FAT is only 8-bits, so testing for
<=0xff is pointless, and can generate a "comparison is always true due to
limited range of data type" warning.

While we're there, convert FAT_VALID_MEDIA() into a C function - the present
implementation is buggy: it generates either one or two references to its
argument.

Cc: Frank Seidel <fseidel@suse.de>
Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofat: use __getname()
OGAWA Hirofumi [Mon, 28 Apr 2008 09:16:29 +0000 (02:16 -0700)]
fat: use __getname()

__getname() is faster than __get_free_page(). Use it.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agovfat: bug fix for vfat cannot handle filename with 255
Keith Mok [Mon, 28 Apr 2008 09:16:29 +0000 (02:16 -0700)]
vfat: bug fix for vfat cannot handle filename with 255

This patch fix the problem that the buffer allocated for convert of unicode to
utf8 in fat/dir.c is too small.

And cannot handle filename with 255 asian characters when mounted with utf8
options.

Also it fix the filename length limitation checking in vfat/namei.c that the
filename length should be checked against the number of converted unicode
characters.

Not the length before NLS/UTF8 converted.

Signed-off-by: Keith Mok <ek9852@gmail.com>
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoAdd balance_dirty_pages_ratelimited() to cont_expand_zero()
OGAWA Hirofumi [Mon, 28 Apr 2008 09:16:28 +0000 (02:16 -0700)]
Add balance_dirty_pages_ratelimited() to cont_expand_zero()

On the systems, ftruncate() which expand size for FAT became the cause
of OOM.  The cont_expand_zero() filled all memory with dirty pages,
and since disk is very slow, limit of page scanning was exceeded, then
it triggered OOM.

This adds balance_dirty_pages_ratelimited() to avoid filling memory
with dirty pages.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofat: Remove fat_clusters_flush()
OGAWA Hirofumi [Mon, 28 Apr 2008 09:16:27 +0000 (02:16 -0700)]
fat: Remove fat_clusters_flush()

This removes unneeded fat_clusters_flush().

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofat: Update free_clusters even if it is untrusted
OGAWA Hirofumi [Mon, 28 Apr 2008 09:16:27 +0000 (02:16 -0700)]
fat: Update free_clusters even if it is untrusted

Currently, free_clusters is not updated until it is trusted, because
Windows doesn't update it correctly.

But if user is using FAT driver of Linux, it updates free_clusters
correctly.  Instead, this updates it even if it's untrusted, so if
free_clustes is correct, now keep correct value.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofat: Add allow_utime option
OGAWA Hirofumi [Mon, 28 Apr 2008 09:16:26 +0000 (02:16 -0700)]
fat: Add allow_utime option

Normally utime(2) checks current process is owner of the file, or it
has CAP_FOWNER capability.  But FAT filesystem doesn't have uid/gid as
on disk info, so normal check is too unflexible.

With this option you can relax it.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofat: fat_setattr() fix
OGAWA Hirofumi [Mon, 28 Apr 2008 09:16:26 +0000 (02:16 -0700)]
fat: fat_setattr() fix

Fix fat_setattr() on the case of showexec option. If user specified
showexec option, inode->i_mode may not have S_IXUGO. This just use
inode->i_mode to fix it.

And with this patch, we don't allow chmod() on memory inode, it's just
bad behaviour. IOW, we allow changing S_IWUGO only which can be stored
to disk.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofat: fat_notify_change() and check_mode() cleanup
OGAWA Hirofumi [Mon, 28 Apr 2008 09:16:25 +0000 (02:16 -0700)]
fat: fat_notify_change() and check_mode() cleanup

- Rename fat_notify_change() to fat_setattr()
- check_mode() cleanup
- Change layout of code

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofat: kill is_bad_inode() check
OGAWA Hirofumi [Mon, 28 Apr 2008 09:16:24 +0000 (02:16 -0700)]
fat: kill is_bad_inode() check

FAT doesn't need to check bad inode anymore.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoreiserfs: unpack tails on quota files
Jan Kara [Mon, 28 Apr 2008 09:16:23 +0000 (02:16 -0700)]
reiserfs: unpack tails on quota files

Quota files cannot have tails because quota_write and quota_read functions do
not support them.  So far when quota files did have tail, we just refused to
turn quotas on it.  Sadly this check has been wrong and so there are now
plenty installations where quota files don't have NOTAIL flag set and so now
after fixing the check, they suddently fail to turn quotas on.  Since it's
easy to unpack the tail from kernel, do this from reiserfs_quota_on() which
solves the problem and is generally nicer to users anyway.

Signed-off-by: Jan Kara <jack@suse.cz>
Reported-by: <urhausen@urifabi.net>
Cc: Jeff Mahoney <jeffm@suse.com>
Cc: Chris Mason <chris.mason@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoreiserfs: fix hang on umount with quotas when journal is aborted
Jan Kara [Mon, 28 Apr 2008 09:16:23 +0000 (02:16 -0700)]
reiserfs: fix hang on umount with quotas when journal is aborted

Call dquot_drop() from reiserfs_dquot_drop() even if we fail to start a
transaction.  Otherwise we never get to dropping references to quota
structures from the inode and umount will hang indefinitely.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoreiserfs: replace remaining __FUNCTION__ occurrences
Harvey Harrison [Mon, 28 Apr 2008 09:16:22 +0000 (02:16 -0700)]
reiserfs: replace remaining __FUNCTION__ occurrences

__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Chris Mason <chris.mason@oracle.com>
Cc: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoreiserfs: fix more sparse warnings in do_balan.c
Harvey Harrison [Mon, 28 Apr 2008 09:16:21 +0000 (02:16 -0700)]
reiserfs: fix more sparse warnings in do_balan.c

fs/reiserfs/do_balan.c:1467:10: warning: symbol 'ret_val' shadows an earlier one
fs/reiserfs/do_balan.c:275:6: originally declared here
fs/reiserfs/do_balan.c:1471:23: warning: symbol 'ih' shadows an earlier one
fs/reiserfs/do_balan.c:249:67: originally declared here

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Chris Mason <chris.mason@oracle.com>
Cc: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoreiserfs: fix sparse warning in journal.c
Harvey Harrison [Mon, 28 Apr 2008 09:16:21 +0000 (02:16 -0700)]
reiserfs: fix sparse warning in journal.c

fs/reiserfs/journal.c:4319:2: warning: returning void-valued expression

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Chris Mason <chris.mason@oracle.com>
Cc: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoreiserfs: le*_add_cpu conversion
Marcin Slusarz [Mon, 28 Apr 2008 09:16:20 +0000 (02:16 -0700)]
reiserfs: le*_add_cpu conversion

replace all:
little_endian_variable = cpu_to_leX(leX_to_cpu(little_endian_variable) +
expression_in_cpu_byteorder);
with:
leX_add_cpu(&little_endian_variable, expression_in_cpu_byteorder);
generated with semantic patch

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Jeff Mahoney <jeffm@suse.com>
Cc: Chris Mason <chris.mason@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoudf: fix sparse warning in namei.c
Harvey Harrison [Mon, 28 Apr 2008 09:16:19 +0000 (02:16 -0700)]
udf: fix sparse warning in namei.c

Let's use bsize instead.
fs/udf/namei.c:960:12: warning: symbol 'elen' shadows an earlier one
fs/udf/namei.c:937:15: originally declared here

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Jan Kara <jack@ucw.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoufs: replace __inline with inline
Harvey Harrison [Mon, 28 Apr 2008 09:16:18 +0000 (02:16 -0700)]
ufs: replace __inline with inline

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Evgeniy Dushistov <dushistov@mail.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoufs: remove unused fs64_add and fs64_sub
Marcin Slusarz [Mon, 28 Apr 2008 09:16:18 +0000 (02:16 -0700)]
ufs: remove unused fs64_add and fs64_sub

remove fs64_add and fs64_sub - they probably weren't ever used because
their prototypes used u32 instead of __fs64

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Evgeniy Dushistov <dushistov@mail.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoufs: replace remaining __FUNCTION__ occurrences
Harvey Harrison [Mon, 28 Apr 2008 09:16:17 +0000 (02:16 -0700)]
ufs: replace remaining __FUNCTION__ occurrences

__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Jan Engelhardt <jengelh@linux01.gwdg.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoufs: [bl]e*_add_cpu conversion
Marcin Slusarz [Mon, 28 Apr 2008 09:16:16 +0000 (02:16 -0700)]
ufs: [bl]e*_add_cpu conversion

replace all:
big/little_endian_variable = cpu_to_[bl]eX([bl]eX_to_cpu(big/little_endian_variable) +
expression_in_cpu_byteorder);
with:
[bl]eX_add_cpu(&big/little_endian_variable, expression_in_cpu_byteorder);
generated with semantic patch

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Evgeniy Dushistov <dushistov@mail.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agojbd: replace remaining __FUNCTION__ occurrences
Harvey Harrison [Mon, 28 Apr 2008 09:16:16 +0000 (02:16 -0700)]
jbd: replace remaining __FUNCTION__ occurrences

__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoext3: replace remaining __FUNCTION__ occurrences
Harvey Harrison [Mon, 28 Apr 2008 09:16:15 +0000 (02:16 -0700)]
ext3: replace remaining __FUNCTION__ occurrences

__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>