]> err.no Git - linux-2.6/log
linux-2.6
17 years ago[POWERPC] Handle alignment faults on SPE load/store instructions
Kumar Gala [Fri, 24 Aug 2007 21:42:53 +0000 (16:42 -0500)]
[POWERPC] Handle alignment faults on SPE load/store instructions

This adds code to handle alignment traps generated by the following
SPE (signal processing engine) load/store instructions, by emulating
the instruction in the kernel (as is done for other instructions that
generate alignment traps):

evldd[x]         Vector Load Double Word into Double Word [Indexed]
evldw[x]         Vector Load Double into Two Words [Indexed]
evldh[x]         Vector Load Double into Four Half Words [Indexed]
evlhhesplat[x]   Vector Load Half Word into Half Words Even and Splat [Indexed]
evlhhousplat[x]  Vector Load Half Word into Half Word Odd Unsigned and Splat [Indexed]
evlhhossplat[x]  Vector Load Half Word into Half Word Odd Signed and Splat [Indexed]
evlwhe[x]        Vector Load Word into Two Half Words Even [Indexed]
evlwhou[x]       Vector Load Word into Two Half Words Odd Unsigned (zero-extended) [Indexed]
evlwhos[x]       Vector Load Word into Two Half Words Odd Signed (with sign extension) [Indexed]
evlwwsplat[x]    Vector Load Word into Word and Splat [Indexed]
evlwhsplat[x]    Vector Load Word into Two Half Words and Splat [Indexed]
evstdd[x]        Vector Store Double of Double [Indexed]
evstdw[x]        Vector Store Double of Two Words [Indexed]
evstdh[x]        Vector Store Double of Four Half Words [Indexed]
evstwhe[x]       Vector Store Word of Two Half Words from Even [Indexed]
evstwho[x]       Vector Store Word of Two Half Words from Odd [Indexed]
evstwwe[x]       Vector Store Word of Word from Even [Indexed]
evstwwo[x]       Vector Store Word of Word from Odd [Indexed]

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] fsl_soc.c cleanup
Scott Wood [Mon, 20 Aug 2007 16:38:12 +0000 (11:38 -0500)]
[POWERPC] fsl_soc.c cleanup

1. Update the way get_brgfreq() finds things in the device tree.

It now uses names that are less namespace polluting.  The old names
are supported until all boards are converted.

2. "size" is changed from unsigned int to int, to match what
of_get_property() expects.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] 85xx: Remove unnecessary loops_per_jiffy initialization code.
Jon Loeliger [Fri, 27 Jul 2007 18:24:45 +0000 (13:24 -0500)]
[POWERPC] 85xx: Remove unnecessary loops_per_jiffy initialization code.

Signed-off-by: Jon Loeliger <jdl@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] 86xx: Remove unnecessary loops_per_jiffy initialization code.
Jon Loeliger [Fri, 27 Jul 2007 18:24:36 +0000 (13:24 -0500)]
[POWERPC] 86xx: Remove unnecessary loops_per_jiffy initialization code.

Signed-off-by: Jon Loeliger <jdl@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] linkstation updates
Guennadi Liakhovetski [Sat, 25 Aug 2007 22:08:11 +0000 (00:08 +0200)]
[POWERPC] linkstation updates

1. Fix RTC type - it is a rs5c372a, not rs5c372b
2. Configure both UART interrupts edge-triggered
3. Add a license header to ls_uart.c
4. Check for running on linkstation in a late_initcall() function. Needed
   for multiplatform builds, even though linkstation doesn't support them
   yet
5. Remove unneeded #include from linkstation.c

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] 85xx: Clean up from 85xx_ds rename
Kumar Gala [Fri, 17 Aug 2007 14:26:40 +0000 (09:26 -0500)]
[POWERPC] 85xx: Clean up from 85xx_ds rename

Renamed functions in 85xx_ds from 8544 to 85xx.

Kept an unique machine def/probe for the MPC8544 DS board to
handle some subtle differences between the future board based
on the DS platform.

Also fixed building w/o CONFIG_PCI and minor whitespace fixes.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] 85xx: Renamed mpc8544_ds.c to mpc85xx_ds.c
Kumar Gala [Fri, 17 Aug 2007 14:22:09 +0000 (09:22 -0500)]
[POWERPC] 85xx: Renamed mpc8544_ds.c to mpc85xx_ds.c

Renamed the mpc8544_ds.c board code to mpc85xx_ds.c to make it more
generic in prep for other boards based on the same platform.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years agoucc_geth: kill unused include
Kumar Gala [Thu, 23 Aug 2007 02:49:01 +0000 (21:49 -0500)]
ucc_geth: kill unused include

The ucc_geth_mii code is based on the gianfar_mii code that use to include
ocp.h.  ucc never need this and it causes issues when we want to kill
arch/ppc includes from arch/powerpc.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] PS3: Enhance storage probe debug output
Geoff Levand [Wed, 12 Sep 2007 08:43:17 +0000 (18:43 +1000)]
[POWERPC] PS3: Enhance storage probe debug output

Add some more info to the PS3 storage probe debug output.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] PS3: Add new LV1 error codes
Geert Uytterhoeven [Wed, 12 Sep 2007 08:43:16 +0000 (18:43 +1000)]
[POWERPC] PS3: Add new LV1 error codes

Add new error codes that may be returned by the LV1 hypervisor

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] PS3: Fix CONFIG_SMP=n, CONFIG_KEXEC=y build
Jeremy Kerr [Wed, 12 Sep 2007 08:43:15 +0000 (18:43 +1000)]
[POWERPC] PS3: Fix CONFIG_SMP=n, CONFIG_KEXEC=y build

Currently, the ps3 kernel fails to build without smp but with kexec, as
ps3_kexec_cpu_down needs ps3_smp_cleanup_cpu, which isn't defined on UP
kernels. This change adds an empty ps3_smp_cleanup_cpu for UP kernels.

Booted on ps3.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Add workaround for MPICs with broken register reads
Olof Johansson [Fri, 7 Sep 2007 19:13:19 +0000 (05:13 +1000)]
[POWERPC] Add workaround for MPICs with broken register reads

Some versions of PWRficient 1682M have an interrupt controller in which
the first register in each pair for interrupt sources doesn't always
read with the right polarity/sense values.

To work around this, keep a software copy of the register instead.  Since
it's not modified from the mpic itself, it's a feasible solution.  Still,
keep it under a config option to avoid wasting memory on other platforms.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Document and implement an improved flash device binding for powerpc
David Gibson [Fri, 7 Sep 2007 03:23:53 +0000 (13:23 +1000)]
[POWERPC] Document and implement an improved flash device binding for powerpc

This replaces the binding for flash chips in booting-without-of.txt
with an clarified and improved version.  It also makes
drivers/mtd/maps/physmap_of.c recognize this new binding.  Finally it
revises the Ebony device tree source to use the new binding as an
example.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Acked-by: Segher Boessenkool <segher@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] setup_64.c and prom.c comment cleanup
Linas Vepstas [Thu, 6 Sep 2007 17:47:29 +0000 (03:47 +1000)]
[POWERPC] setup_64.c and prom.c comment cleanup

Grammatical corrections to comments.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] prom.c whitespace cleanup
Linas Vepstas [Thu, 6 Sep 2007 17:46:15 +0000 (03:46 +1000)]
[POWERPC] prom.c whitespace cleanup

Whitespace cleanup: badly indented lines.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] prom_init whitespace cleanup, typo fix
Linas Vepstas [Thu, 6 Sep 2007 17:45:21 +0000 (03:45 +1000)]
[POWERPC] prom_init whitespace cleanup, typo fix

Whitespace cleanup: badly indented lines.
Typo in comment.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Check _PAGE_RW and _PAGE_PRESENT on kernel addresses
Scott Wood [Wed, 5 Sep 2007 22:04:38 +0000 (08:04 +1000)]
[POWERPC] Check _PAGE_RW and _PAGE_PRESENT on kernel addresses

Previously, the TLB miss handlers assumed that pages above KERNELBASE are
always present and read/write.  This assumption is false in the case of
CONFIG_DEBUG_PAGEALLOC.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] bootwrapper: Only print MAC addresses when the node is actually present
Scott Wood [Wed, 5 Sep 2007 19:21:18 +0000 (05:21 +1000)]
[POWERPC] bootwrapper: Only print MAC addresses when the node is actually present

Some firmwares (such as PlanetCore) only provide a base MAC address, and
expect the kernel to set certain bits to generate the addresses for the
other ports.  As such, MAC addresses are generated that may not correspond
to actual hardware.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] bootwrapper: Add get_path()
Scott Wood [Wed, 5 Sep 2007 19:21:12 +0000 (05:21 +1000)]
[POWERPC] bootwrapper: Add get_path()

This will be used by the PlanetCore firmware support to construct
a linux,stdout-path from the serial node that it finds.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] bootwrapper: Add strtoull()
Scott Wood [Wed, 5 Sep 2007 19:21:10 +0000 (05:21 +1000)]
[POWERPC] bootwrapper: Add strtoull()

This will be needed by PlanetCore firmware support.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] bootwrapper: flatdevtree fixes
Scott Wood [Wed, 5 Sep 2007 19:21:04 +0000 (05:21 +1000)]
[POWERPC] bootwrapper: flatdevtree fixes

1. ft_create_node was returning the internal pointer rather than a phandle.
2. ft_find_device_rel was treating a "top" phandle of NULL as an error,
rather than as the root of the tree.  The old, absolute ft_find_device
is removed, and the relative version is renamed to ft_find_device().

Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Remove warning in arch/powerpc/kernel/sysfs.c
Olof Johansson [Wed, 5 Sep 2007 02:43:17 +0000 (12:43 +1000)]
[POWERPC] Remove warning in arch/powerpc/kernel/sysfs.c

Fixes:

arch/powerpc/kernel/sysfs.c: In function 'cpu_add_sysdev_attr_group':
arch/powerpc/kernel/sysfs.c:388: warning: ignoring return value of
'sysfs_create_group', declared with attribute warn_unused_result

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Move lowlevel runlatch calls under cpu feature control
Olof Johansson [Wed, 5 Sep 2007 02:42:30 +0000 (12:42 +1000)]
[POWERPC] Move lowlevel runlatch calls under cpu feature control

There's no need to call the runlatch on functions on processors that
don't implement them (CPU_FTR_CTRL).

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Remove unused platform_machine_check()
Olof Johansson [Wed, 5 Sep 2007 02:41:09 +0000 (12:41 +1000)]
[POWERPC] Remove unused platform_machine_check()

Remove leftover cruft from ARCH=ppc.

There are no users of platform_machine_check() in ARCH=powerpc, and none
should be added (they should use ppc_md.machine_check_handler instead).

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] pasemi: Move pasemi_idle_init() to late_initcall()
Olof Johansson [Wed, 5 Sep 2007 02:09:45 +0000 (12:09 +1000)]
[POWERPC] pasemi: Move pasemi_idle_init() to late_initcall()

Move pasemi_idle_init() to be a late_initcall instead of being called from
setup_arch().  This way the cpufreq driver has a chance to initialize and
save away the boot time astate before we go to idle for the first time.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] pasemi: Print more information at machine check
Olof Johansson [Wed, 5 Sep 2007 02:09:23 +0000 (12:09 +1000)]
[POWERPC] pasemi: Print more information at machine check

Add printout of some SoC error status registers, and dump the SLB contents
for those machine check events where it makes sense.

Since we can't go about and ioremap registers at machine check time,
and we generally want to do as little as possible to print out the
information, pre-build a table of the registers to dump and their address
in the common PCI config space range.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] pasemi: Export more SPRs to sysfs when CONFIG_DEBUG_KERNEL=y
Olof Johansson [Wed, 5 Sep 2007 02:09:06 +0000 (12:09 +1000)]
[POWERPC] pasemi: Export more SPRs to sysfs when CONFIG_DEBUG_KERNEL=y

Export some of the implementation-specific registers via sysfs.
Useful when debugging, etc.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] pasemi: Add workaround for erratum 5945
Olof Johansson [Wed, 5 Sep 2007 02:08:50 +0000 (12:08 +1000)]
[POWERPC] pasemi: Add workaround for erratum 5945

Erratum 5945 causes some of the registers on the PCIe root ports to
not read correctly.  Do a small dance to avoid this: Write an unused
register, read the value and write it back.  Thankfully this is not in
a hot code path.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] pasemi: Add pasemi_pci_getcfgaddr()
Olof Johansson [Wed, 5 Sep 2007 02:08:30 +0000 (12:08 +1000)]
[POWERPC] pasemi: Add pasemi_pci_getcfgaddr()

Add pasemi_pci_getcfgaddr(), to get the remapped address of a specific
config register for a PCI device.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Export new __io{re,un}map_at() symbols
Olof Johansson [Fri, 31 Aug 2007 03:58:51 +0000 (13:58 +1000)]
[POWERPC] Export new __io{re,un}map_at() symbols

Export new __io{re,un}map_at() symbols so modules can use them.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Export virq mapping via debugfs
Michael Ellerman [Tue, 28 Aug 2007 08:47:57 +0000 (18:47 +1000)]
[POWERPC] Export virq mapping via debugfs

This adds a debugfs file "powerpc/virq_mapping", which shows the virtual
to real mapping of irq numbers.  Enable it with CONFIG_VIRQ_DEBUG.

Signed-off-by: Zhang Wei <wei.zhang@freescale.com>
Signed-off-by: Chen Gong <G.Chen@freescale.com>
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Initialise hwirq for legacy irqs
Michael Ellerman [Tue, 28 Aug 2007 08:47:56 +0000 (18:47 +1000)]
[POWERPC] Initialise hwirq for legacy irqs

Although no one uses the hwirq value for legacy irqs at the moment, we
should really setup the correct value in the irq_map.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Provide a default irq_host match, which matches on an exact of_node
Michael Ellerman [Tue, 28 Aug 2007 08:47:55 +0000 (18:47 +1000)]
[POWERPC] Provide a default irq_host match, which matches on an exact of_node

The most common match semantic is an exact match based on the device node.
So provide a default implementation that does this, and hook it up if no
match routine is specified.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Invert null match behaviour for irq_hosts
Michael Ellerman [Tue, 28 Aug 2007 08:47:55 +0000 (18:47 +1000)]
[POWERPC] Invert null match behaviour for irq_hosts

Currently if you don't specify a match callback for your irq_host it's
assumed you match everything. This is a kind of opt-out approach, and
turns out to be the exception rather than the rule.

So change the semantics to be opt-in, ie. you don't match anything unless
you provide a match callback.  This in itself isn't very useful, but will
allow us to provide a default match implementation in a subsequent patch.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Add an optional device_node pointer to the irq_host
Michael Ellerman [Tue, 28 Aug 2007 08:47:54 +0000 (18:47 +1000)]
[POWERPC] Add an optional device_node pointer to the irq_host

The majority of irq_host implementations (3 out of 4) are associated
with a device_node, and need to stash it somewhere. Rather than having
it somewhere different for each host, add an optional device_node pointer
to the irq_host structure.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Move bootwrapper's strchr() and strncmp() from .h to string.S
David Gibson [Tue, 28 Aug 2007 04:52:57 +0000 (14:52 +1000)]
[POWERPC] Move bootwrapper's strchr() and strncmp() from .h to string.S

Currently the bootwrapper has implementations of strchr() and
strncmp(), but they're inlines in flatdevtree_env.h, rather than in
string.S with all the rest of the string functions.  This moves
them to string.S.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] IOMMU virtual merge is no longer experimental
Linas Vepstas [Tue, 17 Jul 2007 16:09:35 +0000 (02:09 +1000)]
[POWERPC] IOMMU virtual merge is no longer experimental

Per conversations with BenH, IOMMU virtual merging should no longer
be considered to be an "experimental" feature.  In particular,
CONFIG_VMERGE has been set to "y" in the defconfigs for quite a while.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
----
 arch/powerpc/Kconfig |   11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years agoMerge branch 'linux-2.6' into for-2.6.24
Paul Mackerras [Thu, 13 Sep 2007 15:24:25 +0000 (01:24 +1000)]
Merge branch 'linux-2.6' into for-2.6.24

17 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
Linus Torvalds [Wed, 12 Sep 2007 19:23:51 +0000 (12:23 -0700)]
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
  [POWERPC] Move serial_dev_init to device_initcall()
  [POWERPC] Enable GENERIC_ISA_DMA if FSL_ULI1575 to fix compile issue
  [POWERPC] cpm2: Fix off-by-one error in setbrg().
  [PPC] 8xx: Fix r3 trashing due to 8MB TLB page instantiation
  [POWERPC] 8{5,6}xx: Fix build issue with !CONFIG_PCI

17 years agolguest: Fix guest crash when CONFIG_X86_USE_3DNOW=y
Rusty Russell [Tue, 11 Sep 2007 07:06:37 +0000 (17:06 +1000)]
lguest: Fix guest crash when CONFIG_X86_USE_3DNOW=y

One of the very first things lguest_init() does is a memcpy.  On
Athlon/Duron/K7 or CyrixIII/VIA-C3 or Geode GX/LX, this tries to use
MMX.

memcpy -> _mmx_memcpy -> kernel_fpu_begin -> clts -> paravirt_ops.clts

But we haven't set paravirt_ops.clts yet, so we do the native version
and crash.  The simplest solution is to use __memcpy.

Thanks to Michael Rasenberger for the bug report.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[POWERPC] Move serial_dev_init to device_initcall()
Olof Johansson [Thu, 23 Aug 2007 00:26:37 +0000 (19:26 -0500)]
[POWERPC] Move serial_dev_init to device_initcall()

With the I/O space rewrite by BenH, the legacy_serial serial_dev_init()
initcall is now called before I/O space is setup, but it's dependent on
it being available.

Since there's no way to make dependencies between initcalls, we'll just
have to move it to device_initcall(). Yes, it's suboptimal but I'm not
aware of any better solution at this time, and it fixes a regression
from 2.6.22.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years agoi386: Fix leak of ../kernel from top level
Andi Kleen [Tue, 11 Sep 2007 12:02:12 +0000 (14:02 +0200)]
i386: Fix leak of ../kernel from top level

Fix a compile error when the directory above the kernel source contains
a file named "kernel".  Originally from Ben LaHaise, modified based on
feedback from Sam Ravnborg

Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Ben LaHaise <bcrl@kvack.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agox86_64: Prevent doing anything from cache_remove_dev() when info setup failed.
Andi Kleen [Tue, 11 Sep 2007 12:02:11 +0000 (14:02 +0200)]
x86_64: Prevent doing anything from cache_remove_dev() when info setup failed.

AK: Removed the unlikelies because gcc heuristics default to unlikely
AK: for test == NULL and for negative returns.

Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Cc: Ashok Raj <ashok.raj@intel.com>
Cc: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agox86_64: Add missing mask operation to vdso
Andi Kleen [Tue, 11 Sep 2007 12:02:09 +0000 (14:02 +0200)]
x86_64: Add missing mask operation to vdso

vdso vgetns() didn't mask the time source offset calculation, which
could lead to time problems with 32bit HPET.  Add the masking.

Thanks to Chuck Ebbert for tracking this down.

Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Chuck Ebbert <cebbert@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMerge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds
Linus Torvalds [Wed, 12 Sep 2007 16:17:40 +0000 (09:17 -0700)]
Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds

* 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds:
  leds: Add missing include for leds.h

17 years agoDefine termios_1 functions for powerpc, s390, avr32 and frv
Paul Mackerras [Wed, 12 Sep 2007 15:16:31 +0000 (01:16 +1000)]
Define termios_1 functions for powerpc, s390, avr32 and frv

Commit f629307c857c030d5a3dd777fee37c8bb395e171 introduced uses of
kernel_termios_to_user_termios_1 and user_termios_to_kernel_termios_1
on all architectures.  However, powerpc, s390, avr32 and frv don't
currently define those functions since their termios struct didn't
need to be changed when the arbitrary baud rate stuff was added, and
thus the kernel won't currently build on those architectures.

This adds definitions of kernel_termios_to_user_termios_1 and
user_termios_to_kernel_termios_1 to include/asm-generic/termios.h
which are identical to kernel_termios_to_user_termios and
user_termios_to_kernel_termios respectively.  The definitions are the
same because the "old" termios and "new" termios are in fact the same
on these architectures (which are the same ones that use
asm-generic/termios.h).

Signed-off-by: Paul Mackerras <paulus@samba.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Alan Cox <alan@redhat.com>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[POWERPC] Enable GENERIC_ISA_DMA if FSL_ULI1575 to fix compile issue
Kumar Gala [Mon, 10 Sep 2007 19:57:34 +0000 (14:57 -0500)]
[POWERPC] Enable GENERIC_ISA_DMA if FSL_ULI1575 to fix compile issue

Since the ULI1575 has a ISA bus we need to enable the generic ISA dma
support for drivers that might expect it.  Without this we get compile
errors like the following:

ound/built-in.o: In function `claim_dma_lock':
/home/galak/git/linux-8572/include/asm/dma.h:189: undefined reference to `dma_spin_lock'
/home/galak/git/linux-8572/include/asm/dma.h:189: undefined reference to `dma_spin_lock'
sound/built-in.o: In function `release_dma_lock':
/home/galak/git/linux-8572/include/asm/dma.h:195: undefined reference to `dma_spin_lock'
sound/built-in.o: In function `claim_dma_lock':
/home/galak/git/linux-8572/include/asm/dma.h:189: undefined reference to `dma_spin_lock'
/home/galak/git/linux-8572/include/asm/dma.h:189: undefined reference to `dma_spin_lock'
sound/built-in.o:/home/galak/git/linux-8572/include/asm/dma.h:195: more undefined references to `dma_spin_lock' follow
make: *** [.tmp_vmlinux1] Error 1

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Wed, 12 Sep 2007 15:17:30 +0000 (08:17 -0700)]
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [BLUETOOTH]: Fix non-COMPAT build of hci_sock.c

17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Wed, 12 Sep 2007 14:59:49 +0000 (07:59 -0700)]
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC64]: Fix booting on V100 systems.

17 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Linus Torvalds [Wed, 12 Sep 2007 14:57:00 +0000 (07:57 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: usbtouchscreen - correctly set 'phys'
  Input: i8042 - add HP Pavilion DV4270ca to the MUX blacklist
  Input: i8042 - fix modpost warning
  Input: add more Braille keycodes

17 years ago[BLUETOOTH]: Fix non-COMPAT build of hci_sock.c
David S. Miller [Wed, 12 Sep 2007 12:10:58 +0000 (14:10 +0200)]
[BLUETOOTH]: Fix non-COMPAT build of hci_sock.c

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC64]: Fix booting on V100 systems.
David S. Miller [Wed, 12 Sep 2007 08:15:59 +0000 (10:15 +0200)]
[SPARC64]: Fix booting on V100 systems.

On the root PCI bus, the OBP device tree lists device 3 twice.
Once as 'pm' and once as 'lomp'.

Everything goes downhill from there.

Ignore the second instance to workaround this.

Thanks to Kövedi_Krisztián for the bug report and
testing the fix.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfashe...
Linus Torvalds [Wed, 12 Sep 2007 00:23:16 +0000 (17:23 -0700)]
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2:
  ocfs2: Fix calculation of i_blocks during truncate
  [PATCH] ocfs2: Fix a wrong cluster calculation.
  [PATCH] ocfs2: fix mount option parsing
  ocfs2: update docs for new features

17 years agofix SERIAL_CORE_CONSOLE driver dependencies
Adrian Bunk [Tue, 11 Sep 2007 22:24:13 +0000 (15:24 -0700)]
fix SERIAL_CORE_CONSOLE driver dependencies

SERIAL_BFIN=m or SERIAL_MUX=m shouldn't allow SERIAL_CORE_CONSOLE=y.

Additionally, this patch fixes whitespace instead of tabs at the
SERIAL_MUX_CONSOLE option.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: Bryan Wu <bryan.wu@analog.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoSubject: [PATCH] Intel FB pixel clock calculation fix
Krzysztof Halasa [Tue, 11 Sep 2007 22:24:12 +0000 (15:24 -0700)]
Subject: [PATCH] Intel FB pixel clock calculation fix

Intel framebuffer mis-calculated pixel clocks.

The pixel clock (and thus both H and V sync) will be slower than requested, so
if you set the minimum allowed the display may not sync.  In case of really
old CRT display it could theoretically damage it.

I'm using it with PAL TV (using RGB input - SCART connector) and the bug
prevented it from working at all (TV requirements are more strict and made the
bug visible).

Signed-off-by: Krzysztof Halasa <khc@pm.waw.pl>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoSLUB: accurately compare debug flags during slab cache merge
Christoph Lameter [Tue, 11 Sep 2007 22:24:11 +0000 (15:24 -0700)]
SLUB: accurately compare debug flags during slab cache merge

This was posted on Aug 28 and fixes an issue that could cause troubles
when slab caches >=128k are created.

http://marc.info/?l=linux-mm&m=118798149918424&w=2

Currently we simply add the debug flags unconditional when checking for a
matching slab.  This creates issues for sysfs processing when slabs exist
that are exempt from debugging due to their huge size or because only a
subset of slabs was selected for debugging.

We need to only add the flags if kmem_cache_open() would also add them.

Create a function to calculate the flags that would be set
if the cache would be opened and use that function to determine
the flags before looking for a compatible slab.

[akpm@linux-foundation.org: fixlets]
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Cc: Chuck Ebbert <cebbert@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agorevert "highmem: catch illegal nesting"
Andrew Morton [Tue, 11 Sep 2007 22:24:10 +0000 (15:24 -0700)]
revert "highmem: catch illegal nesting"

Revert

commit 656dad312fb41ed95ef08325e9df9bece3aacbbb
Author: Ingo Molnar <mingo@elte.hu>
Date:   Sat Feb 10 01:46:36 2007 -0800

[PATCH] highmem: catch illegal nesting

Catch illegally nested kmap_atomic()s even if the page that is mapped by
the 'inner' instance is from lowmem.

This avoids spuriously zapped kmap-atomic ptes and turns hard to find
crashes into clear asserts at the bug site.

Problem is, a get_zeroed_page(GFP_KERNEL) from interrupt context will trigger
this check if non-irq code on this CPU holds a KM_USER0 mapping.  But that
get_zeroed_page() will never be altering the kmap slot anyway due to the
GFP_KERNEL.

Cc: Christoph Lameter <clameter@sgi.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoFix "no_sync_cmos_clock" logic inversion in kernel/time/ntp.c
Tony Breeds [Tue, 11 Sep 2007 22:24:03 +0000 (15:24 -0700)]
Fix "no_sync_cmos_clock" logic inversion in kernel/time/ntp.c

Seems to me that this timer will only get started on platforms that say
they don't want it?

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Gabriel Paubert <paubert@iram.es>
Cc: Zachary Amsden <zach@vmware.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: John Stultz <johnstul@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoLeases can be hidden by flocks
Pavel Emelyanov [Tue, 11 Sep 2007 22:24:01 +0000 (15:24 -0700)]
Leases can be hidden by flocks

The inode->i_flock list contains the leases, flocks and posix
locks in the specified order. However, the flocks are added in
the head of this list thus hiding the leases from F_GETLEASE
command, from time_out_leases() and other code that expects
the leases to come first.

The following example will demonstrate this:

#define _GNU_SOURCE

#include <unistd.h>
#include <fcntl.h>
#include <stdio.h>
#include <sys/file.h>

static void show_lease(int fd)
{
        int res;

        res = fcntl(fd, F_GETLEASE);
        switch (res) {
                case F_RDLCK:
                        printf("Read lease\n");
                        break;
                case F_WRLCK:
                        printf("Write lease\n");
                        break;
                case F_UNLCK:
                        printf("No leases\n");
                        break;
                default:
                        printf("Some shit\n");
                        break;
        }
}

int main(int argc, char **argv)
{
        int fd, res;

        fd = open(argv[1], O_RDONLY);
        if (fd == -1) {
                perror("Can't open file");
                return 1;
        }

        res = fcntl(fd, F_SETLEASE, F_WRLCK);
        if (res == -1) {
                perror("Can't set lease");
                return 1;
        }

        show_lease(fd);

        if (flock(fd, LOCK_SH) == -1) {
                perror("Can't flock shared");
                return 1;
        }

        show_lease(fd);

        return 0;
}

The first call to show_lease() will show the write lease set, but
the second will show no leases.

Fix the flock adding so that the leases always stay in the head
of this list.

Found during making the flocks pid-namespaces aware.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agointel_agp: fix GTT map size on G33
Zhenyu Wang [Tue, 11 Sep 2007 22:23:58 +0000 (15:23 -0700)]
intel_agp: fix GTT map size on G33

G33 has 1MB GTT table range.  Fix GTT mapping in case like 512MB aperture
size.

Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com>
Acked-by: Dave Airlie <airlied@linux.ie>
Cc: Dave Jones <davej@codemonkey.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agointel_agp: fix stolen mem range on G33
Zhenyu Wang [Tue, 11 Sep 2007 22:23:57 +0000 (15:23 -0700)]
intel_agp: fix stolen mem range on G33

G33 GTT stolen memory is below graphics data stolen memory and be seperate,
so don't subtract it in stolen mem counting.

Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com>
Acked-by: Dave Airlie <airlied@linux.ie>
Cc: Dave Jones <davej@codemonkey.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agom68k(nommu): add missing syscalls
Geert Uytterhoeven [Tue, 11 Sep 2007 22:23:56 +0000 (15:23 -0700)]
m68k(nommu): add missing syscalls

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoFix select on /proc files without ->poll
Alexey Dobriyan [Tue, 11 Sep 2007 22:23:55 +0000 (15:23 -0700)]
Fix select on /proc files without ->poll

Taneli Vähäkangas <vahakang@cs.helsinki.fi> reported that commit
786d7e1612f0b0adb6046f19b906609e4fe8b1ba aka "Fix rmmod/read/write races
in /proc entries" broke SBCL + SLIME combo.

The old code in do_select() used DEFAULT_POLLMASK, if couldn't find
->poll handler.  The new code makes ->poll always there and returns 0 by
default, which is not correct.  Return DEFAULT_POLLMASK instead.

Steps to reproduce:

install emacs, SBCL, SLIME
emacs
M-x slime in *inferior-lisp* buffer
[watch it doing "Connecting to Swank on port X.."]

Please, apply before 2.6.23.

P.S.: why SBCL can't just read(2) /proc/cpuinfo is a mystery.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: T Taneli Vahakangas <vahakang@cs.helsinki.fi>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoRestore call_usermodehelper_pipe() behaviour
Michael Ellerman [Tue, 11 Sep 2007 22:23:51 +0000 (15:23 -0700)]
Restore call_usermodehelper_pipe() behaviour

The semantics of call_usermodehelper_pipe() used to be that it would fork
the helper, and wait for the kernel thread to be started.  This was
implemented by setting sub_info.wait to 0 (implicitly), and doing a
wait_for_completion().

As part of the cleanup done in 0ab4dc92278a0f3816e486d6350c6652a72e06c8,
call_usermodehelper_pipe() was changed to pass 1 as the value for wait to
call_usermodehelper_exec().

This is equivalent to setting sub_info.wait to 1, which is a change from
the previous behaviour.  Using 1 instead of 0 causes
__call_usermodehelper() to start the kernel thread running
wait_for_helper(), rather than directly calling ____call_usermodehelper().

The end result is that the calling kernel code blocks until the user mode
helper finishes.  As the helper is expecting input on stdin, and now no one
is writing anything, everything locks up (observed in do_coredump).

The fix is to change the 1 to UMH_WAIT_EXEC (aka 0), indicating that we
want to wait for the kernel thread to be started, but not for the helper to
finish.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Acked-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agotty: termios locking functions break with new termios type
David Miller [Tue, 11 Sep 2007 22:23:50 +0000 (15:23 -0700)]
tty: termios locking functions break with new termios type

I ran into a few problems.

n_tty_ioctl() for instance:

drivers/char/tty_ioctl.c:799: error: $,1rxstruct termios$,1ry has no
member named $,1rxc_ispeed$,1ry

This is calling the copy interface that is supposed to be using
a termios2 when the new interfaces are defined, however:

case TIOCGLCKTRMIOS:
if (kernel_termios_to_user_termios((struct termios __user *)arg, real_tty->termios_locked))
return -EFAULT;
return 0;

This is going to write over the end of the userspace
structure by a few bytes, and wasn't caught by you yet
because the i386 implementation is simply copy_to_user()
which does zero type checking.

Signed-off-by: Alan Cox <alan@redhat.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agofutex_compat: fix list traversal bugs
Arnd Bergmann [Tue, 11 Sep 2007 22:23:49 +0000 (15:23 -0700)]
futex_compat: fix list traversal bugs

The futex list traversal on the compat side appears to have
a bug.

It's loop termination condition compares:

        while (compat_ptr(uentry) != &head->list)

But that can't be right because "uentry" has the special
"pi" indicator bit still potentially set at bit 0.  This
is cleared by fetch_robust_entry() into the "entry"
return value.

What this seems to mean is that the list won't terminate
when list iteration gets back to the the head.  And we'll
also process the list head like a normal entry, which could
cause all kinds of problems.

So we should check for equality with "entry".  That pointer
is of the non-compat type so we have to do a little casting
to keep the compiler and sparse happy.

The same problem can in theory occur with the 'pending'
variable, although that has not been reported from users
so far.

Based on the original patch from David Miller.

Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agofix typo in Documentation/SubmittingPatches
Andre Haupt [Tue, 11 Sep 2007 22:23:47 +0000 (15:23 -0700)]
fix typo in Documentation/SubmittingPatches

Signed-off-by: Andre Haupt <andre@finow14.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoPTR_ALIGN
Matthew Wilcox [Tue, 11 Sep 2007 22:23:47 +0000 (15:23 -0700)]
PTR_ALIGN

The AdvanSys driver wants to align some pointers, and the ALIGN macro
doesn't work for pointers.  Rather than try to make it work, add a new
PTR_ALIGN macro which is typesafe.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoRTC v3020 fixes
Mike Rapoport [Tue, 11 Sep 2007 22:23:45 +0000 (15:23 -0700)]
RTC v3020 fixes

Fix off-by-one in month calculations
Add delay for bus accesses to satisfy Tw > 500ns

Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Acked-by: Raphael Assenat <raph@8d.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoH8/300: Fix misnamed "CONFIG_BLKDEV_RESERVE_ADDRESS" Kconfig variable
Robert P. J. Day [Tue, 11 Sep 2007 22:23:41 +0000 (15:23 -0700)]
H8/300: Fix misnamed "CONFIG_BLKDEV_RESERVE_ADDRESS" Kconfig variable

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Acked-by: Satyam Sharma <satyam@infradead.org>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoDocumentation/00-INDEX: notice ecryptfs.txt moved
Rob Landley [Tue, 11 Sep 2007 22:23:41 +0000 (15:23 -0700)]
Documentation/00-INDEX: notice ecryptfs.txt moved

ecryptfs.txt moved into filesystems, make 00-INDEX follow.

Signed-off-by: Rob Landley <rob@landley.net>
Cc: Michael Halcrow <mhalcrow@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoFix DAC960 driver on machines which don't support 64-bit DMA
Matthew Wilcox [Tue, 11 Sep 2007 22:23:38 +0000 (15:23 -0700)]
Fix DAC960 driver on machines which don't support 64-bit DMA

Addresses http://bugzilla.kernel.org/show_bug.cgi?id=8942

Use PCI_DMA_* constants instead of own private definitions Fall back to
32-bit DMA mask if a 64-bit one fails

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Acked-by: Jeff Garzik <jeff@garzik.org>
Tested-by: Lars <polynomial-c@gmx.de>
Cc: Alessandro Polverini <alex@nibbles.it>
Cc: <dac@conglom-o.org>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoafs: mntput called before dput
Andreas Gruenbacher [Tue, 11 Sep 2007 22:23:37 +0000 (15:23 -0700)]
afs: mntput called before dput

dput must be called before mntput here.

Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Acked-By: David Howells <dhowells@redhat.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agomd: fix some bugs with growing raid5/raid6 arrays.
NeilBrown [Tue, 11 Sep 2007 22:23:36 +0000 (15:23 -0700)]
md: fix some bugs with growing raid5/raid6 arrays.

The recent changed to raid5 to allow offload of parity calculation etc
introduced some bugs in the code for growing (i.e.  adding a disk to) raid5
and raid6.  This fixes them

Acked-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoPNP: remove SMCf010 quirk
Bjorn Helgaas [Tue, 11 Sep 2007 22:23:35 +0000 (15:23 -0700)]
PNP: remove SMCf010 quirk

If the quirk enables the SIR part of the SMCf010 device, the 8250 driver
may claim it as a legacy ttyS device, which makes the legacy probe in the
smsc-ircc2 driver fail.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Andrey Borzenkov <arvidjaar@mail.ru>
Cc: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoBCM1480 serial build fix
Thiemo Seufer [Tue, 11 Sep 2007 22:23:33 +0000 (15:23 -0700)]
BCM1480 serial build fix

Restores serial functionality for the BCM1480.

Signed-off-by: Thiemo Seufer <ths@networkno.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agodrivers/edac: fix e752x correct return code
Aristeu Rozanski [Tue, 11 Sep 2007 22:23:32 +0000 (15:23 -0700)]
drivers/edac: fix e752x correct return code

This patch changes the error code when dev0:fun1 was hidden by BIOS to one
more appropriate.

Signed-off-by: Aristeu Rozanski <aris@ruivo.org>
Signed-off-by: Mark Gross <mark.gross@intel.com>
Signed-off-by: Doug Thompson <dougthompson@xmission.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agodrivers/edac: fix printk level down to debug from emerg
Doug Thompson [Tue, 11 Sep 2007 22:23:31 +0000 (15:23 -0700)]
drivers/edac: fix printk level down to debug from emerg

When EDAC is configured for EDAC DEBUGGING, the debug printk output level
was set TOO high (EMERG). This patch brings it down to a DEBUG level

Signed-off-by: Doug Thompson <dougthompson@xmission.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agospi_mpc83xx: hang fix
Jan Andersson [Tue, 11 Sep 2007 22:23:30 +0000 (15:23 -0700)]
spi_mpc83xx: hang fix

When the spi_mpc83xx driver receives a tx_buf pointer which is NULL, it
only writes one zero filled word to the transmit register.  If the driver
expects to receive more than one word it will wait forever for a second
receive interrupt.  With this patch the controller will shift out zeroes
until all words have been received.

Signed-off-by: Jan Andersson <jan@gaisler.com>
Tested-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoquota: fix infinite loop
Jan Kara [Tue, 11 Sep 2007 22:23:29 +0000 (15:23 -0700)]
quota: fix infinite loop

If we fail to start a transaction when releasing dquot, we have to call
dquot_release() anyway to mark dquot structure as inactive.  Otherwise we
end in an infinite loop inside dqput().

Signed-off-by: Jan Kara <jack@suse.cz>
Cc: xb <xavier.bru@bull.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMerge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
Linus Torvalds [Tue, 11 Sep 2007 21:47:53 +0000 (14:47 -0700)]
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  [MIPS] Fix aliasing bug in copy_user_highpage.
  [MIPS] IP22: fix wrong argument order
  [MIPS] IP22: Fix wrong check for second HPC
  [MIPS] Ocelot: remove remaining bits
  [MIPS] TLB: Fix instruction bitmasks
  [MIPS] R10000: Fix wrong test in dma-default.c
  [MIPS] Provide empty irq_enable_hazard definition for legacy and R1 cores.
  [MIPS] Sibyte: Remove broken dependency on EXPERIMENTAL from SIBYTE_SB1xxx_SOC.
  [MIPS] Kconfig: whitespace cleanup.
  [MIPS] PCI: Set need_domain_info if controller domain index is non-zero.
  [MIPS] BCM1480: Fix computation of interrupt mask address register.
  [MIPS] i8259: Add disable method.
  [MIPS] tty: add the new ioctls and definitions.

17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6
Linus Torvalds [Tue, 11 Sep 2007 21:47:23 +0000 (14:47 -0700)]
Merge master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6:
  pdc202xx_new: PLL detection fix
  via82cxxx: add Arima W730-K8 and other rebadgings to short cables list
  pmac: build fix
  pata_ali/alim15x3: override 80-wire cable detection for Toshiba S1800-814
  hpt366: UltraDMA filter for SATA cards (take 2)
  ide: add ide_dev_is_sata() helper (take 2)
  hpt366: fix PCI clock detection for HPT374 (take 4)
  pdc202xx_new: fix PCI refcounting
  ide: fix PCI refcounting
  mpc8xx: Only build mpc8xx on arch/ppc

17 years agoleds: Add missing include for leds.h
Yoichi Yuasa [Tue, 11 Sep 2007 21:24:45 +0000 (22:24 +0100)]
leds: Add missing include for leds.h

This patch has added #include <linux/spinlock.h> to include/linux/leds.h
for rwlock_t.

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
17 years agopdc202xx_new: PLL detection fix
Mikael Pettersson [Tue, 11 Sep 2007 20:28:37 +0000 (22:28 +0200)]
pdc202xx_new: PLL detection fix

Fix a bitmask typo in the pdc202xx_new PLL frequency detection code
which causes it to truncate an intermediate difference to 26 bits
instead of the correct 30 bits (the PLL's bitwidth).

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agovia82cxxx: add Arima W730-K8 and other rebadgings to short cables list
Bartlomiej Zolnierkiewicz [Tue, 11 Sep 2007 20:28:37 +0000 (22:28 +0200)]
via82cxxx: add Arima W730-K8 and other rebadgings to short cables list

Port of Alan's patch for pata_via.c.

Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agopmac: build fix
Tony Breeds [Tue, 11 Sep 2007 20:28:36 +0000 (22:28 +0200)]
pmac: build fix

Ensure that BLK_DEV_IDE is built-in before allowing BLK_DEV_IDE_PMAC to
be selected.

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Cc: Bret Towe <magnade@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agopata_ali/alim15x3: override 80-wire cable detection for Toshiba S1800-814
Daniel Exner [Tue, 11 Sep 2007 20:28:36 +0000 (22:28 +0200)]
pata_ali/alim15x3: override 80-wire cable detection for Toshiba S1800-814

Add Toshiba S1800-814 to whitelist for both pata_ali and alim15x3,
as it is correctly detected as 40-wire connected but this cable is
short enough to still use transfer modes higher than UDMA33.

Signed-off-by: Daniel Exner <dex@dragonslave.de>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agohpt366: UltraDMA filter for SATA cards (take 2)
Sergei Shtylyov [Tue, 11 Sep 2007 20:28:36 +0000 (22:28 +0200)]
hpt366: UltraDMA filter for SATA cards (take 2)

The Marvell bridge chips used on HighPoint SATA cards do not seem to support
the UltraDMA modes 1, 2, and 3 as well as any MWDMA modes, so the driver needs
to account for this in the udma_filter() method.  In order to achieve that, do
the following changes:

- install the method for all chips, not only HPT36x/370 and improve the code
  formatting by killing the extra tabs while at it;

- add to the end of the 'switch' statement in the method cases for HPT372[AN]
  and HPT374 chips upon which the known SATA cards are based;

- use hwif->ultra_mask as a default mask for the ide_dma_filter() method to
  behave correctly;

- move the HPT370[A] cases below the HPT36x case for consistency.

While at it, replace the explicit UltraDMA mode masks with ATA_UDMA* constants
all over the driver...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Bob Ham <rah@bash.sh>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: add ide_dev_is_sata() helper (take 2)
Sergei Shtylyov [Tue, 11 Sep 2007 20:28:36 +0000 (22:28 +0200)]
ide: add ide_dev_is_sata() helper (take 2)

Make the SATA drive detection code from eighty_ninty_three() into inline
ide_dev_is_sata() helper fixing it along the way to be more strict while
checking word 80 for the reserved values...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agohpt366: fix PCI clock detection for HPT374 (take 4)
Sergei Shtylyov [Tue, 11 Sep 2007 20:28:35 +0000 (22:28 +0200)]
hpt366: fix PCI clock detection for HPT374 (take 4)

HPT374 BIOS seems to only save f_CNT register value for the function #0 before
re-tuning DPLL (that causes the driver to report obviously distorted f_CNT for
the function #1) -- fix this by always reading the saved f_CNT register value
from the function #0 in the driver's init_chipset() method.
While at it, introduce 'chip_type' for holding the 'struct hpt_info' field
of the same name and replace the structure assignment with memcpy()...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agopdc202xx_new: fix PCI refcounting
Sergei Shtylyov [Tue, 11 Sep 2007 20:28:34 +0000 (22:28 +0200)]
pdc202xx_new: fix PCI refcounting

The driver erroneously "lets go" the mate IDE chip in init_setup_pdc20270()
when ide_setup_pci_devices() call succeeds -- fix this, and drop a couple of
useless assignments in this function while at it...

Bart: keep "findev" variable initialization to silence gcc

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: fix PCI refcounting
Sergei Shtylyov [Tue, 11 Sep 2007 20:28:34 +0000 (22:28 +0200)]
ide: fix PCI refcounting

The IDE core never marked the PCI IDE devices as being in use after succesfull
driver probe call (the devices were marked in use only while being probed), and
so was susceptible to issues caused by unsolicited PCI hotplug device removal.
So, add pci_dev_get() call to ide_scan_pcidev() and convert this function to
the kernel style, also dropping a bunch of useless curly braces from its caller,
ide_scan_pcibus() and somewhat beautifying printk() call there, while at it...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agompc8xx: Only build mpc8xx on arch/ppc
Kumar Gala [Tue, 11 Sep 2007 20:28:33 +0000 (22:28 +0200)]
mpc8xx: Only build mpc8xx on arch/ppc

Currently the mpc8xx ide driver will only work on arch/ppc so only
allow it to be built there.  Also, killed a minor include that isn't
actually used by the driver.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoocfs2: Fix calculation of i_blocks during truncate
Mark Fasheh [Fri, 31 Aug 2007 17:23:41 +0000 (10:23 -0700)]
ocfs2: Fix calculation of i_blocks during truncate

We were setting i_blocks too early - before truncating any allocation.
Correct things to set i_blocks after the allocation change.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
17 years ago[PATCH] ocfs2: Fix a wrong cluster calculation.
tao.ma@oracle.com [Thu, 6 Sep 2007 00:02:25 +0000 (08:02 +0800)]
[PATCH] ocfs2: Fix a wrong cluster calculation.

In ocfs2_alloc_write_write_ctxt, the written clusters length is calculated
by the byte length only. This may cause some problems if we start to write
at some position in the end of one cluster and last to a second cluster
while the "len" is smaller than a cluster size. In that case, we have to
write 2 clusters actually.
So we have to take the start position into consideration also.

Signed-off-by: Tao Ma <tao.ma@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
17 years ago[PATCH] ocfs2: fix mount option parsing
Tiger Yang [Fri, 7 Sep 2007 16:16:10 +0000 (00:16 +0800)]
[PATCH] ocfs2: fix mount option parsing

For some mount option types, ocfs2_parse_options() will try to access
sb->s_fs_info to get at the ocfs2 private superblock. Unfortunately, that
hasn't been allocated yet and will cause a kernel crash.

Fix this by storing options in a struct which can then get pushed into the
ocfs2_super once it's been allocated later. If we need more options which
store to the ocfs2_super in the future, we can just fields to this struct.

Signed-off-by: Tiger Yang <tiger.yang@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
17 years agoocfs2: update docs for new features
Mark Fasheh [Thu, 23 Aug 2007 18:17:55 +0000 (11:17 -0700)]
ocfs2: update docs for new features

Update documentation listing ocfs2 features to reflect the current state of
the file system. Add missing descriptions for some mount options which ocfs2
supports.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
17 years ago[MIPS] Fix aliasing bug in copy_user_highpage.
Ralf Baechle [Tue, 11 Sep 2007 17:05:33 +0000 (18:05 +0100)]
[MIPS] Fix aliasing bug in copy_user_highpage.

Copy_user_highpage was written assuming it was only being called for
breaking COW pages in which case the source page isn't cached as in
marked cachable under it kernel virtual address.  If it is called anyway
the aliasing avoidance strategy implemented by kmap_coherent will fail.
Avoid the use of kmap_coherent for pages marked dirty and to avoid
another instance of this sort of bug, place a BUG_ON in kmap_coherent.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] IP22: fix wrong argument order
Thomas Bogendoerfer [Tue, 11 Sep 2007 10:43:55 +0000 (12:43 +0200)]
[MIPS] IP22: fix wrong argument order

Fix wrong argument order; this is just a minimal fix for the half baked
redadb/writeb() conversion.

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] IP22: Fix wrong check for second HPC
Thomas Bogendoerfer [Tue, 11 Sep 2007 10:46:03 +0000 (12:46 +0200)]
[MIPS] IP22: Fix wrong check for second HPC

Wrong check for the second hpc on fullhouse machines, caused DBEs on
SGI Indys

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>