openwrt/staging/blogic.git
16 years ago[POWERPC] FSL: I2C device tree cleanups
Kumar Gala [Wed, 12 Dec 2007 05:17:24 +0000 (23:17 -0600)]
[POWERPC] FSL: I2C device tree cleanups

* Removed device_type = "i2c"
* Added missing second I2C controller on MPC8548 CDS, MPC8544 DS
* Added #address-cells, #size-cells, and cell-index where missing

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] 86xx: Add aliases node to 8641hpcn DTS file.
Jon Loeliger [Wed, 5 Dec 2007 17:32:50 +0000 (11:32 -0600)]
[POWERPC] 86xx: Add aliases node to 8641hpcn DTS file.

The addition of the aliases node is needed for U-Boot
and, eventually, cuImage, to help locate the proper
nodes reliably when using the libfdt approach.

Signed-off-by: Jon Loeliger <jdl@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] QE: change qe_setbrg() to take an enum qe_clock instead of an integer
Timur Tabi [Thu, 29 Nov 2007 23:26:30 +0000 (17:26 -0600)]
[POWERPC] QE: change qe_setbrg() to take an enum qe_clock instead of an integer

qe_setbrg() currently takes an integer to indicate the BRG number.  Change that
to take an enum qe_clock instead, since this enum is intended to represent
clock sources.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] 86xx: fix guts_set_dmacr() and add guts_set_pmuxcr_dma() to immap_86xx.h
Timur Tabi [Thu, 29 Nov 2007 20:19:57 +0000 (14:19 -0600)]
[POWERPC] 86xx: fix guts_set_dmacr() and add guts_set_pmuxcr_dma() to immap_86xx.h

Updated guts_set_dmacr() to enumerate the DMA controllers at 0, instead of 1,
so that it now matches other related functions.  Added function
guts_set_pmuxcr_dma() to set the external DMA control bits in the PMUXCR
register of the global utilities structure.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] 83xx: Add MPC837x MDS default kernel configuration
Li Yang [Fri, 19 Oct 2007 11:38:49 +0000 (19:38 +0800)]
[POWERPC] 83xx: Add MPC837x MDS default kernel configuration

Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] 83xx: Add platform support for MPC837x MDS board
Li Yang [Fri, 19 Oct 2007 11:38:45 +0000 (19:38 +0800)]
[POWERPC] 83xx: Add platform support for MPC837x MDS board

The MPC837x MDS is a new member of Freescale MDS reference system.

Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] ipic: add new interrupts introduced by new chip
Li Yang [Fri, 19 Oct 2007 11:38:43 +0000 (19:38 +0800)]
[POWERPC] ipic: add new interrupts introduced by new chip

These interrupts are introduced by the latest Freescale SoC
such as MPC837x.

Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] add e300c4 entry to cputable
Li Yang [Fri, 19 Oct 2007 11:38:42 +0000 (19:38 +0800)]
[POWERPC] add e300c4 entry to cputable

Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] 8xxx: Convert #include of asm/of_{platform, device}.h into linux/of_{platfo...
Jon Loeliger [Tue, 6 Nov 2007 18:11:13 +0000 (12:11 -0600)]
[POWERPC] 8xxx: Convert #include of asm/of_{platform, device}.h into linux/of_{platform, device}.h.

Signed-off-by: Jon Loeliger <jdl@freescale.com>
Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] Emulate isel (Integer Select) instruction
Kumar Gala [Tue, 20 Nov 2007 03:35:29 +0000 (21:35 -0600)]
[POWERPC] Emulate isel (Integer Select) instruction

isel (Integer Select) is a new user space instruction in the
PowerISA 2.04 spec.  Not all processors implement it so lets emulate
to ensure code built with isel will run everywhere.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] Add SPRN for Embedded registers specified in PowerISA 2.04
Kumar Gala [Fri, 16 Nov 2007 19:57:57 +0000 (13:57 -0600)]
[POWERPC] Add SPRN for Embedded registers specified in PowerISA 2.04

* Added SPRN for new architectural features added for embedded:
- Alternate Time Base (ATB, ATBL, ATBU)
- Doorbell Interrupts (IVOR36, IVOR37)
- SPRG8/9
- External Proxy (EPR)
- External PID load/store (EPLC, EPSC)

* Added BUCSR for Freescale Embedded Processors
* Moved around MAS7 so its in numeric order

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] Early debug forces console log level to max
Benjamin Herrenschmidt [Tue, 11 Dec 2007 03:48:24 +0000 (14:48 +1100)]
[POWERPC] Early debug forces console log level to max

This makes the early debug option force the console loglevel
to the max.  The early debug option is meant to catch messages very
early in the kernel boot process, in many cases, before the kernel
has a chance to parse the "debug" command line argument.  Thus it
makes sense when CONFIG_PPC_EARLY_DEBUG is set, to force the console
log level to the max at boot time.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Add of_translate_dma_address
Benjamin Herrenschmidt [Tue, 11 Dec 2007 03:48:22 +0000 (14:48 +1100)]
[POWERPC] Add of_translate_dma_address

This adds a variant of of_translate_address that uses the dma-ranges
property instead of "ranges", it's to be used by PCI code in parsing
the dma-ranges property.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Remove useless volatiles in udbg_16550.c
Benjamin Herrenschmidt [Tue, 11 Dec 2007 03:48:23 +0000 (14:48 +1100)]
[POWERPC] Remove useless volatiles in udbg_16550.c

This removes "volatile" from the MMIO pointer udbg_comport
in udbg_16550.c driver, it's useless and makes checkpatch.pl
complain when adding things to this file.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Change 32-bit PCI message about resource allocation
Benjamin Herrenschmidt [Tue, 11 Dec 2007 03:48:21 +0000 (14:48 +1100)]
[POWERPC] Change 32-bit PCI message about resource allocation

The 32 bits PCI code will display a rather scary error message

   PCI: Cannot allocate resource region N of device XXX

at boot when the existing setup of a device as left by the
firmware doesn't match the kernel needs and the device needs
to be moved.  This is often not an error at all, as the kernel
will generally easily reallocate the device elsewhere.

This changes the message to something less scary and lowers
its level from error to warning.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Fix powerpc 32-bit resource fixup for 64-bit resources
Benjamin Herrenschmidt [Tue, 11 Dec 2007 03:48:20 +0000 (14:48 +1100)]
[POWERPC] Fix powerpc 32-bit resource fixup for 64-bit resources

The 32-bit powerpc resource fixup code uses unsigned longs to do the
offsetting of resources which overflows on platforms such as 4xx where
resources can be 64 bits.

This fixes it by using resource_size_t instead.

However, the IO stuff does rely on some 32 bits arithmetic, so we hack
by cropping the result of the fixups for IO resources with a 32 bits
mask.

This isn't the prettiest but should work for now until we change the
32 bits PCI code to do IO mappings like 64 bits does, within a reserved
are of the kernel address space.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Merge pci_process_bridge_OF_ranges()
Benjamin Herrenschmidt [Tue, 11 Dec 2007 03:48:18 +0000 (14:48 +1100)]
[POWERPC] Merge pci_process_bridge_OF_ranges()

This merges the 32-bit and 64-bit implementations of
pci_process_bridge_OF_ranges().  The new function is cleaner than both
the old ones, and supports 64 bits ranges on ppc32 which is necessary
for the 4xx port.

It also adds some better (hopefully) output to the kernel log which
should help diagnose problems and makes better use of existing OF
parsing helpers (avoiding a few bugs of both implementations along
the way).

There are still a few unfortunate ifdef's but there is no way around
these for now at least not until some other bits of the PCI code are
made common.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Make isa_mem_base common to 32 and 64 bits
Benjamin Herrenschmidt [Tue, 11 Dec 2007 03:48:17 +0000 (14:48 +1100)]
[POWERPC] Make isa_mem_base common to 32 and 64 bits

This defines isa_mem_base on both 32 and 64 bits (it used to be 32 bits
only).  This avoids a few ifdef's in later patches and potentially can
allow support for VGA text mode on 64 bits powerpc.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years agoMerge branch 'linux-2.6' into for-2.6.25
Paul Mackerras [Tue, 11 Dec 2007 04:30:27 +0000 (15:30 +1100)]
Merge branch 'linux-2.6' into for-2.6.25

16 years ago[POWERPC] Update smu command definitions
Michael Hanselmann [Tue, 11 Dec 2007 00:18:46 +0000 (11:18 +1100)]
[POWERPC] Update smu command definitions

This updates smu.h with several new commands, and adds parameter
descriptions for existing commands.

Signed-off-by: Michael Hanselmann <linux-kernel@hansmi.ch>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Kill flatdevtree.c
David Gibson [Mon, 10 Dec 2007 03:28:39 +0000 (14:28 +1100)]
[POWERPC] Kill flatdevtree.c

Now that earlier patches have switched the bootwrapper to using libfdt
for device tree manipulation, this patch removes the now unused
flatdevtree.c and related files.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Use embedded libfdt in the bootwrapper
David Gibson [Mon, 10 Dec 2007 03:28:39 +0000 (14:28 +1100)]
[POWERPC] Use embedded libfdt in the bootwrapper

This incorporates libfdt (from the source embedded in an earlier
commit) into the wrapper.a library used by the bootwrapper.  This
includes adding a libfdt_env.h file, which the libfdt sources need in
order to integrate into the bootwrapper environment, and a
libfdt-wrapper.c which provides glue to connect the bootwrapper's
abstract device tree callbacks to the libfdt functions.

In addition, this changes the various wrapper and platform files to
use libfdt functions instead of the older flatdevtree.c library.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Merge libfdt upstream source
David Gibson [Mon, 10 Dec 2007 03:28:39 +0000 (14:28 +1100)]
[POWERPC] Merge libfdt upstream source

This incorporates a copy of dtc libfdt into the kernel source, in
arch/powerpc/boot/libfdt.  This only imports the upstream sources
verbatim, later patches are needed to actually link it into the kernel
Makefiles.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] EEH: Avoid a possible NULL pointer dereference
Stephen Rothwell [Fri, 7 Dec 2007 06:55:51 +0000 (17:55 +1100)]
[POWERPC] EEH: Avoid a possible NULL pointer dereference

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] iSeries: Merge vpdinfo.c into pci.c
Stephen Rothwell [Fri, 7 Dec 2007 05:10:22 +0000 (16:10 +1100)]
[POWERPC] iSeries: Merge vpdinfo.c into pci.c

There was only one global function in vpdinfo.c and it was only called
from pci.c, so merge them and make the function static.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] iSeries: Clean up and simplify vdpinfo.c
Stephen Rothwell [Fri, 7 Dec 2007 05:09:18 +0000 (16:09 +1100)]
[POWERPC] iSeries: Clean up and simplify vdpinfo.c

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] iSeries: DeCamelCase vpdinfo.c
Stephen Rothwell [Fri, 7 Dec 2007 05:08:33 +0000 (16:08 +1100)]
[POWERPC] iSeries: DeCamelCase vpdinfo.c

This is a purely mechanical transformation.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Update xmon slb code
will schmidt [Thu, 6 Dec 2007 21:22:23 +0000 (08:22 +1100)]
[POWERPC] Update xmon slb code

This adds a bit more detail to the xmon SLB output.  When the valid
bit is set, this displays the ESID and VSID values, as well as
decoding the segment size -- 1T or 256M -- and displaying the LLP
bits.  This supresses the output for any slb entries that contain only
zeros.

sample output from power6 (1T segment support):
00 c000000008000000 40004f7ca3000500  1T  ESID=   c00000  VSID=       4f7ca3 LLP:100
01 d000000008000000 4000eb71b0000400  1T  ESID=   d00000  VSID=       eb71b0 LLP:  0
08 0000000018000000 0000c8499f8ccc80 256M ESID=        1  VSID=    c8499f8cc LLP:  0
09 00000000f8000000 0000d2c1a8e46c80 256M ESID=        f  VSID=    d2c1a8e46 LLP:  0
10 0000000048000000 0000ca87eab1dc80 256M ESID=        4  VSID=    ca87eab1d LLP:  0
43 cf00000008000000 400011b260000500  1T  ESID=   cf0000  VSID=       11b260 LLP:100

sample output from power5 (notice the non-valid but non-zero entries)
10 0000000008000000 00004fd0e077ac80 256M ESID=        0  VSID=    4fd0e077a LLP:  0
11 00000000f8000000 00005b085830fc80 256M ESID=        f  VSID=    5b085830f LLP:  0
12 0000000048000000 000052ce99fe6c80 256M ESID=        4  VSID=    52ce99fe6 LLP:  0
13 0000000018000000 000050904ed95c80 256M ESID=        1  VSID=    50904ed95 LLP:  0
14 cf00000008000000 0000d59aca40f500 256M ESID=cf0000000  VSID=    d59aca40f LLP:100
15 c000000078000000 000045cb97751500 256M ESID=c00000007  VSID=    45cb97751 LLP:100

Tested on power5 and power6.

Signed-Off-By: Will Schmidt <will_schmidt@vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Use SLB size from the device tree
Michael Neuling [Thu, 6 Dec 2007 06:24:48 +0000 (17:24 +1100)]
[POWERPC] Use SLB size from the device tree

Currently we hardwire the number of SLBs to 64, but PAPR says we
should use the ibm,slb-size property to obtain the number of SLB
entries.  This uses this property instead of assuming 64.  If no
property is found, we assume 64 entries as before.

This soft patches the SLB handler, so it shouldn't change performance
at all.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] pci_controller->arch_data really is a struct device_node *
Stephen Rothwell [Mon, 10 Dec 2007 03:33:21 +0000 (14:33 +1100)]
[POWERPC] pci_controller->arch_data really is a struct device_node *

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Don't special case pci_domain_nr() for iSeries
Stephen Rothwell [Thu, 6 Dec 2007 15:04:33 +0000 (02:04 +1100)]
[POWERPC] Don't special case pci_domain_nr() for iSeries

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Remove some iSeries platform checks from the PCI code
Stephen Rothwell [Thu, 6 Dec 2007 15:03:23 +0000 (02:03 +1100)]
[POWERPC] Remove some iSeries platform checks from the PCI code

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] iSeries: hose->buid is always zero for iSeries
Stephen Rothwell [Tue, 11 Dec 2007 00:03:48 +0000 (11:03 +1100)]
[POWERPC] iSeries: hose->buid is always zero for iSeries

so remove a firmware feature test.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] iSeries: Call iSeries_pcibios_init from setup_arch
Stephen Rothwell [Thu, 6 Dec 2007 15:00:45 +0000 (02:00 +1100)]
[POWERPC] iSeries: Call iSeries_pcibios_init from setup_arch

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Inline pci_setup_pci_controller as it has become trivial
Stephen Rothwell [Tue, 11 Dec 2007 00:02:07 +0000 (11:02 +1100)]
[POWERPC] Inline pci_setup_pci_controller as it has become trivial

and it becomes clear that we should use zalloc_maybe_bootmem.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] iSeries: Make pcibios_final_fixup not depend on pci_dn
Stephen Rothwell [Thu, 6 Dec 2007 14:58:01 +0000 (01:58 +1100)]
[POWERPC] iSeries: Make pcibios_final_fixup not depend on pci_dn

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] iSeries: Reduce dependence on pci_dn bussubno
Stephen Rothwell [Thu, 6 Dec 2007 14:56:55 +0000 (01:56 +1100)]
[POWERPC] iSeries: Reduce dependence on pci_dn bussubno

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] iSeries: iseries_ds_addr is only used in pci.c
Stephen Rothwell [Thu, 6 Dec 2007 14:55:50 +0000 (01:55 +1100)]
[POWERPC] iSeries: iseries_ds_addr is only used in pci.c

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] iSeries: Remove pci_dn dependency from iSeries_Device_Information
Stephen Rothwell [Thu, 6 Dec 2007 14:54:57 +0000 (01:54 +1100)]
[POWERPC] iSeries: Remove pci_dn dependency from iSeries_Device_Information

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] iSeries: Remove one layer of IO routines
Stephen Rothwell [Thu, 6 Dec 2007 14:53:44 +0000 (01:53 +1100)]
[POWERPC] iSeries: Remove one layer of IO routines

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] iSeries: Consoldiate PCI IO error check
Stephen Rothwell [Thu, 6 Dec 2007 14:52:45 +0000 (01:52 +1100)]
[POWERPC] iSeries: Consoldiate PCI IO error check

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] iSeries: Unindent and clean iSeries_pci_final_fixup
Stephen Rothwell [Thu, 6 Dec 2007 14:51:48 +0000 (01:51 +1100)]
[POWERPC] iSeries: Unindent and clean iSeries_pci_final_fixup

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] iSeries: Remove some dead code from pci.c
Stephen Rothwell [Thu, 6 Dec 2007 14:50:35 +0000 (01:50 +1100)]
[POWERPC] iSeries: Remove some dead code from pci.c

and an unnecessary cast.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] iSeries: DeCamelCase pci.c
Stephen Rothwell [Thu, 6 Dec 2007 14:49:27 +0000 (01:49 +1100)]
[POWERPC] iSeries: DeCamelCase pci.c

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] iSeries: Cleanup PCI retry code a little
Stephen Rothwell [Thu, 6 Dec 2007 14:48:14 +0000 (01:48 +1100)]
[POWERPC] iSeries: Cleanup PCI retry code a little

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] iSeries: Move find_Device_Node to avoid a forward declaration
Stephen Rothwell [Thu, 6 Dec 2007 14:46:40 +0000 (01:46 +1100)]
[POWERPC] iSeries: Move find_Device_Node to avoid a forward declaration

Also remove another unnecessary forward declaration.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Consolidate pci_controller
Stephen Rothwell [Tue, 11 Dec 2007 00:00:13 +0000 (11:00 +1100)]
[POWERPC] Consolidate pci_controller

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Clean up pci-bridge.h
Stephen Rothwell [Thu, 6 Dec 2007 07:02:28 +0000 (18:02 +1100)]
[POWERPC] Clean up pci-bridge.h

No semantic changes.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] pSeries: Remove dependency on pci_dn bussubno
Stephen Rothwell [Thu, 6 Dec 2007 02:40:29 +0000 (13:40 +1100)]
[POWERPC] pSeries: Remove dependency on pci_dn bussubno

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] iommu_free_table doesn't need the device_node
Stephen Rothwell [Thu, 6 Dec 2007 02:39:19 +0000 (13:39 +1100)]
[POWERPC] iommu_free_table doesn't need the device_node

It only needs the iommu_table address.  It also makes use of the node
name to print error messages.  So just pass it the things it needs.
This reduces the places that know about the pci_dn by one.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] lparcfg: Remove useless buffer allocation
Nathan Lynch [Tue, 4 Dec 2007 16:03:49 +0000 (03:03 +1100)]
[POWERPC] lparcfg: Remove useless buffer allocation

The 'data' member of proc_ppc64_lparcfg is unused, but the lparcfg
module's init routine allocates 4K for it.

Remove the code which allocates and frees this buffer.

Signed-off-by: Nathan Lynch <ntl@pobox.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Update celleb_defconfig to add support for native CBE
Ishizaki Kou [Tue, 4 Dec 2007 08:41:07 +0000 (19:41 +1100)]
[POWERPC] Update celleb_defconfig to add support for native CBE

Signed-off-by: Kou Ishizaki <Kou.Ishizaki@toshiba.co.jp>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] celleb: Add support for native CBE
Ishizaki Kou [Tue, 4 Dec 2007 08:38:24 +0000 (19:38 +1100)]
[POWERPC] celleb: Add support for native CBE

This adds support for native CBE on Celleb, that is, without the BEAT
hypervisor.  Many codes in platforms/cell/ are used in native CBE
environment.

Signed-off-by: Kou Ishizaki <Kou.Ishizaki@toshiba.co.jp>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] cell: Fix undefined reference to mmio_nvram_init
Ishizaki Kou [Tue, 4 Dec 2007 08:34:53 +0000 (19:34 +1100)]
[POWERPC] cell: Fix undefined reference to mmio_nvram_init

This fixes the following link error with CONFIG_PPC_CELL_NATIVE=y and
CONFIG_PPC_CELL_BLADE=n:

arch/powerpc/platforms/built-in.o: In function `.cell_setup_arch':
setup.c:(.init.text+0xe80): undefined reference to `.mmio_nvram_init'

Signed-off-by: Kou Ishizaki <Kou.Ishizaki@toshiba.co.jp>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] kernel_execve is identical in 32 and 64 bit
Stephen Rothwell [Wed, 28 Nov 2007 00:13:02 +0000 (11:13 +1100)]
[POWERPC] kernel_execve is identical in 32 and 64 bit

so consolidate it into misc.S.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Add for_each_child_of_node() helper for iterating over child nodes
Michael Ellerman [Mon, 26 Nov 2007 08:03:45 +0000 (19:03 +1100)]
[POWERPC] Add for_each_child_of_node() helper for iterating over child nodes

Add for_each_child_of_node() to encapsulate the common idiom of
iterating over the children of a device_node.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Use of_register_driver to implement of_register_platform_driver
Stephen Rothwell [Wed, 17 Oct 2007 03:43:34 +0000 (13:43 +1000)]
[POWERPC] Use of_register_driver to implement of_register_platform_driver

Also use of_unregister_driver to implement of_unregister_platform_driver.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
Linus Torvalds [Mon, 10 Dec 2007 22:40:46 +0000 (14:40 -0800)]
Merge branch 'release' of git://git./linux/kernel/git/aegl/linux-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
  [IA64] Fix iosapic interrupt delivery mode for CPE
  [IA64] kprobe: make kreturn probe handler stack unwind correct
  [IA64] operator priority fix in acpi_map_lsapic()
  [IA64] Add missing "space" to concatenated strings
  [IA64] make full use of macro efi_md_size
  [IA64] rename _bss to __bss_start
  [IA64] SGI Altix : fix bug in sn_io_late_init()
  [IA64] iosapic cleanup
  [IA64] signal : fix missing error checkings
  [IA64] export copy_page() to modules
  [IA64] don't assume that unwcheck.py is executable
  [IA64] increase .data.patch offset

16 years agoMerge branch 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6
Linus Torvalds [Mon, 10 Dec 2007 18:18:27 +0000 (10:18 -0800)]
Merge branch 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6

* 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6:
  [XFS] Fix xfs_ichgtime()s broken usage of I_SYNC
  [XFS] Make xfsbufd threads freezable
  [XFS] revert to double-buffering readdir
  [XFS] Fix broken inode cluster setup.
  [XFS] Clear XBF_READ_AHEAD flag on I/O completion.
  [XFS] Fixed a few bugs in xfs_buf_associate_memory()
  [XFS] 971064 Various fixups for xfs_bulkstat().
  [XFS] Fix dbflush panic in xfs_qm_sync.

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sam/fix-kbuild
Linus Torvalds [Mon, 10 Dec 2007 18:17:07 +0000 (10:17 -0800)]
Merge git://git./linux/kernel/git/sam/fix-kbuild

* git://git.kernel.org/pub/scm/linux/kernel/git/sam/fix-kbuild:
  kbuild: fix building with O=.. options
  kbuild: fix building with redirected output.

16 years agoRevert "PCI: fix IDE legacy mode resources"
Linus Torvalds [Mon, 10 Dec 2007 15:40:54 +0000 (07:40 -0800)]
Revert "PCI: fix IDE legacy mode resources"

This reverts commit fd6e732186ab522c812ab19c2c5e5befb8ec8115, which
helped up things on MIPS, but was wrong for everything else.  As Ralf
Baechle puts it:

  "It seems the whole MIPS resource managment is complicated enough (out
   of necessity) that only a few people actually grok it.  Ioports being
   actually memory mapped on MIPS only makes the confusion worse, sigh."

Requested-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Alan Cox <alan@redhat.com>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agopowerpc: Fix IDE legacy vs. native fixups
Benjamin Herrenschmidt [Mon, 10 Dec 2007 04:29:22 +0000 (15:29 +1100)]
powerpc: Fix IDE legacy vs. native fixups

PowerMac and CHRP/BriQ platforms have quirks to switch some IDE
controllers from legacy mode to fully native mode. Those quirks
however will not work properly anymore due to a change to the
generic code to better handle legacy IDE resources.

This fixes it by moving those quirk to "early" quirks (so they
run before resources are probed for the devices) and clearing
all BARs after the conversion to force a reallocation of sane
values.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'linux-2.6'
Paul Mackerras [Mon, 10 Dec 2007 04:41:22 +0000 (15:41 +1100)]
Merge branch 'linux-2.6'

16 years ago[XFS] Fix xfs_ichgtime()s broken usage of I_SYNC
David Chinner [Fri, 7 Dec 2007 03:09:11 +0000 (14:09 +1100)]
[XFS] Fix xfs_ichgtime()s broken usage of I_SYNC

The recent I_LOCK->I_SYNC changes mistakenly changed xfs_ichgtime to look
at I_SYNC instead of I_LOCK. This was incorrect and prevents newly created
inodes from moving to the dirty list. Change this to the correct check
which is for I_NEW, not I_LOCK or I_SYNC so that behaviour is correct.

SGI-PV: 974225
SGI-Modid: xfs-linux-melb:xfs-kern:30204a

Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
16 years ago[XFS] Make xfsbufd threads freezable
Rafael J. Wysocki [Fri, 7 Dec 2007 03:09:02 +0000 (14:09 +1100)]
[XFS] Make xfsbufd threads freezable

Fix breakage caused by commit 831441862956fffa17b9801db37e6ea1650b0f69
that did not introduce the necessary call to set_freezable() in
xfs/linux-2.6/xfs_buf.c .

SGI-PV: 974224
SGI-Modid: xfs-linux-melb:xfs-kern:30203a

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
16 years ago[XFS] revert to double-buffering readdir
Christoph Hellwig [Fri, 7 Dec 2007 03:07:53 +0000 (14:07 +1100)]
[XFS] revert to double-buffering readdir

The current readdir implementation deadlocks on a btree buffers locks
because nfsd calls back into ->lookup from the filldir callback. The only
short-term fix for this is to revert to the old inefficient
double-buffering scheme.

SGI-PV: 973377
SGI-Modid: xfs-linux-melb:xfs-kern:30201a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
16 years ago[XFS] Fix broken inode cluster setup.
David Chinner [Fri, 23 Nov 2007 05:30:23 +0000 (16:30 +1100)]
[XFS] Fix broken inode cluster setup.

The radix tree based inode caches did away with the inode cluster hashes,
replacing them with a bunch of masking and gang lookups on the radix tree.

This masking got broken when moving the code to per-ag radix trees and
indexing by agino # rather than straight inode number. The result is
clustered inode writeback does not cluster and things can go extremely
slowly when there are lots of inodes to write.

Fix it up by comparing the agino # of the inode we just looked up to the
index of the cluster we are looking for.

Tested-by: Torsten Kaiser <just.for.lkml@googlemail.com>
SGI-PV: 972915
SGI-Modid: xfs-linux-melb:xfs-kern:30033a

Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
16 years ago[XFS] Clear XBF_READ_AHEAD flag on I/O completion.
Lachlan McIlroy [Fri, 23 Nov 2007 05:31:00 +0000 (16:31 +1100)]
[XFS] Clear XBF_READ_AHEAD flag on I/O completion.

SGI-PV: 972554
SGI-Modid: xfs-linux-melb:xfs-kern:30128a

Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
16 years ago[XFS] Fixed a few bugs in xfs_buf_associate_memory()
Lachlan McIlroy [Tue, 27 Nov 2007 06:01:24 +0000 (17:01 +1100)]
[XFS] Fixed a few bugs in xfs_buf_associate_memory()

- calculation of 'page_count' was incorrect as it did not
  consider the offset of 'mem' into the first page. The
  logic to bump 'page_count' didn't work if 'len' was <=
  PAGE_CACHE_SIZE (ie offset = 3k, len = 2k).
- setting b_buffer_length to 'len' is incorrect if 'offset'
  is > 0. Set it to the total length of the buffer.
- I suspect that passing a non-aligned address into
  mem_to_page() for the first page may have been causing
  issues - don't know but just tidy up that code anyway.

SGI-PV: 971596
SGI-Modid: xfs-linux-melb:xfs-kern:30143a

Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
16 years ago[XFS] 971064 Various fixups for xfs_bulkstat().
Lachlan McIlroy [Fri, 23 Nov 2007 05:30:32 +0000 (16:30 +1100)]
[XFS] 971064 Various fixups for xfs_bulkstat().

- sanity check for NULL user buffer in xfs_ioc_bulkstat[_compat]()
- remove the special case for XFS_IOC_FSBULKSTAT with count == 1. This
  special case causes bulkstat to fail because the special case uses
  xfs_bulkstat_single() instead of xfs_bulkstat() and the two functions
  have different semantics.  xfs_bulkstat() will return the next inode
  after the one supplied while skipping internal inodes (ie quota inodes).
  xfs_bulkstate_single() will only lookup the inode supplied and return
  an error if it is an internal inode.
- in xfs_bulkstat(), need to initialise 'lastino' to the inode supplied
  so in cases were we return without examining any inodes the scan wont
  restart back at zero.
- sanity check for valid *ubcountp values. Cannot sanity check for valid
  ubuffer here because some users of xfs_bulkstat() don't supply a buffer.
- checks against 'ubleft' (the space left in the user's buffer) should be
  against 'statstruct_size' which is the supplied minimum object size.
  The mixture of checks against statstruct_size and 0 was one of the
  reasons we were skipping inodes.
- if the formatter function returns BULKSTAT_RV_NOTHING and an error and
  the error is not ENOENT or EINVAL then we need to abort the scan. ENOENT
  is for inodes that are no longer valid and we just skip them. EINVAL is
  returned if we try to lookup an internal inode so we skip them too. For
  a DMF scan if the inode and DMF attribute cannot fit into the space left
  in the user's buffer it would return ERANGE. We didn't handle this error
  and skipped the inode. We would continue to skip inodes until one fitted
  into the user's buffer or we completed the scan.
- put back the recalculation of agino (that got removed with the last fix)
  at the end of the while loop. This is because the code at the start of
  the loop expects agino to be the last inode examined if it is non-zero.
- if we found some inodes but then encountered an error, return success
  this time and the error next time. If the formatter aborted with ENOMEM
  we will now return this error but only if we couldn't read any inodes.
  Previously if we encountered ENOMEM without reading any inodes we
  returned a zero count and no error which falsely indicated the scan was
  complete.

SGI-PV: 973431
SGI-Modid: xfs-linux-melb:xfs-kern:30089a

Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: David Chinner <dgc@sgi.com>
16 years ago[XFS] Fix dbflush panic in xfs_qm_sync.
Donald Douwsma [Fri, 23 Nov 2007 05:27:42 +0000 (16:27 +1100)]
[XFS] Fix dbflush panic in xfs_qm_sync.

The recent behaviour layer removal dropped the check for quotas that have
been requested at mount time but have subsequently been turned off. This
results in a panic when accessing m_quotainfo which has been freed.

This patch adds the check originally made by xfs_qm_syncall() to
xfs_qm_sync().

SGI-PV: 969769
SGI-Modid: xfs-linux-melb:xfs-kern:29908a

Signed-off-by: Donald Douwsma <donaldd@sgi.com>
Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
16 years agoAvoid double memclear() in SLOB/SLUB
Linus Torvalds [Sun, 9 Dec 2007 18:14:36 +0000 (10:14 -0800)]
Avoid double memclear() in SLOB/SLUB

Both slob and slub react to __GFP_ZERO by clearing the allocation, which
means that passing the GFP_ZERO bit down to the page allocator is just
wasteful and pointless.

Acked-by: Matt Mackall <mpm@selenic.com>
Reviewed-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agokbuild: fix building with O=.. options
Sam Ravnborg [Sun, 9 Dec 2007 07:55:13 +0000 (08:55 +0100)]
kbuild: fix building with O=.. options

The check introduced in commit:
4f1127e204377cbd2a56d112d323466f668e8334 "kbuild: fix
infinite make recursion"

caused certain external modules not to build and
also caused 'make targz-pkg' to fail.
This is a minimal fix so we revert to previous
behaviour - but we do not overwrite the Makefile
in the top-level directory.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Tested-by: Jay Cliburn <jacliburn@bellsouth.net>
Cc: Jay Cliburn <jacliburn@bellsouth.net>
16 years agokbuild: fix building with redirected output.
Sam Ravnborg [Thu, 6 Dec 2007 21:20:11 +0000 (22:20 +0100)]
kbuild: fix building with redirected output.

Jan Altenberg <jan.altenberg@linutronix.de> reported that
building with redirected input like this failed:
make O=dir oldconfig bzImage < /dev/null

The problem were caused by a make silentoldconfig being
run before oldconfig and with a non-recent .config the build
failed because silentoldconfig requires non-redirected stdin.

Silentoldconfig was run as a side-effect of having the
top-level Makefile re-made by make.
Introducing an empty rule for the top-level Makefile
(and Kbuild.include) fixed the issue.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
16 years ago[IA64] Fix iosapic interrupt delivery mode for CPE
Kenji Kaneshige [Fri, 9 Nov 2007 01:51:01 +0000 (10:51 +0900)]
[IA64] Fix iosapic interrupt delivery mode for CPE

If "CPEI Processor Override" bit is not set in "Platform Interrupt
Source Flags" in "Platform Interrupt Sources Structure" in ACPI MADT,
the target processor of CPEI is restricted to a specific CPU. Because
of this, the delivery mode for CPEI should be IOSAPIC_FIXED.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years ago[IA64] kprobe: make kreturn probe handler stack unwind correct
Shaohua Li [Tue, 13 Nov 2007 06:55:20 +0000 (14:55 +0800)]
[IA64] kprobe: make kreturn probe handler stack unwind correct

Restore regs->ccr_iip before kreturn probe handler runs. In this way, if
probe handler does unwind, unwind can correctly get the stack trace.

Fixes: http://sourceware.org/bugzilla/show_bug.cgi?id=5051
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years ago[IA64] operator priority fix in acpi_map_lsapic()
Roel Kluin [Fri, 7 Dec 2007 22:59:30 +0000 (14:59 -0800)]
[IA64] operator priority fix in acpi_map_lsapic()

'!' has a higher priority than '&', so as was
this won't test the first bit, but rather evaluates to false for any non-zero
lsapic->lapic_flags.

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Acked-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years ago[IA64] Add missing "space" to concatenated strings
Joe Perches [Tue, 20 Nov 2007 01:47:53 +0000 (17:47 -0800)]
[IA64] Add missing "space" to concatenated strings

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years ago[IA64] make full use of macro efi_md_size
Li Zefan [Wed, 21 Nov 2007 22:58:26 +0000 (14:58 -0800)]
[IA64] make full use of macro efi_md_size

Macro efi_md_size is defined in efi.c, and here we apply it throughout
efi.c.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years ago[IA64] rename _bss to __bss_start
Bernhard Walle [Wed, 21 Nov 2007 22:58:25 +0000 (14:58 -0800)]
[IA64] rename _bss to __bss_start

Rename _bss to __bss_start as on other architectures.  That makes it
possible to use the <linux/sections.h> instead of own declarations.  Also
add __bss_stop because that symbol exists on other architectures.

Signed-off-by: Bernhard Walle <bwalle@suse.de>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years ago[IA64] SGI Altix : fix bug in sn_io_late_init()
Mike Habeck [Mon, 26 Nov 2007 17:19:57 +0000 (11:19 -0600)]
[IA64] SGI Altix : fix bug in sn_io_late_init()

When initializing pci_controller->node to point to the closest node we need
to take into consideration that a PIC PCI Bridge ASIC can be connected to a
headless/memless node just like the TIOCP and TIOCE Bridge ASICs

Signed-off-by: Mike Habeck <habeck@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years ago[IA64] iosapic cleanup
Simon Horman [Fri, 7 Dec 2007 22:44:05 +0000 (14:44 -0800)]
[IA64] iosapic cleanup

Make some IOSAPIC functions static and remove one that is unused.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years ago[IA64] signal : fix missing error checkings
Shi Weihua [Mon, 3 Dec 2007 04:57:50 +0000 (12:57 +0800)]
[IA64] signal : fix missing error checkings

Not all the return value of __copy_from_user and
__put_user is checked.This patch fixed it.

Signed-off-by: Shi Weihua <shiwh@cn.fujitsu.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years ago[IA64] export copy_page() to modules
Andrew Morton [Sat, 8 Dec 2007 00:10:19 +0000 (16:10 -0800)]
[IA64] export copy_page() to modules

With the unionfs patch applied I get

ERROR: "copy_page" [fs/unionfs/unionfs.ko] undefined!

the other architectures (some, at least) export copy_page() so I guess ia64
should also do so.

To do this we need to move the copy_page() functions out of lib.a and into
built-in.o and add the EXPORT_SYMBOL().

Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years ago[IA64] don't assume that unwcheck.py is executable
Andrew Morton [Fri, 7 Dec 2007 22:42:08 +0000 (14:42 -0800)]
[IA64] don't assume that unwcheck.py is executable

Don't assume that this file has execute permissions.  For example, patch(1)
loses that information.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years ago[IA64] increase .data.patch offset
Andrew Morton [Wed, 5 Dec 2007 22:32:13 +0000 (14:32 -0800)]
[IA64] increase .data.patch offset

/opt/crosstool/gcc-3.4.5-glibc-2.3.6/ia64-unknown-linux-gnu/lib/gcc/ia64-unknown-linux-gnu/3.4.5/../../../../ia64-unknown-linux-gnu/bin/ld: section .data.patch [a000000000000500 -> a000000000000507] overlaps section .dynamic [a0000000000003c8 -> a000000000000507]

This only appears to be a problem with strangely configured
cross-compilation ... native compilers don't have this issue.
But in the interests of helping others at least compile for
ia64, this can go in. -Tony

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years agoMerge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Fri, 7 Dec 2007 20:53:15 +0000 (12:53 -0800)]
Merge branch 'upstream-linus' of /linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  libata: kill spurious NCQ completion detection
  ahci: don't attach if ICH6 is in combined mode
  ata_piix: add Toshiba Tecra M4 to broken suspend list
  ahci: fix engine reset failed message

16 years agolibata: kill spurious NCQ completion detection
Tejun Heo [Fri, 7 Dec 2007 03:46:23 +0000 (12:46 +0900)]
libata: kill spurious NCQ completion detection

Spurious NCQ completion detection implemented in ahci was incorrect.
On AHCI receving and processing FISes and raising interrupts are not
interlocked and spurious interrupts are expected.

For example, if an interrupt occurs while interrupt handler is running
and the running interrupt handler handles the event the new IRQ
indicated, after IRQ handler finishes, it will be executed again
because IRQ pending bit is set by the new interrupt but there won't be
anything to process.

Please read the following message for more information.

  http://article.gmane.org/gmane.linux.ide/26012

This patch...

* Removes all spurious IRQ whining from ahci.  Spurious NCQ completion
  detection was completely wrong.  Spurious D2H Register FIS taught us
  that some early drives send spurious D2H Register FIS with I bit set
  while NCQ commands are in progress but none of recent drives does
  that and even the ones which show such behavior can do NCQ fine.

* Kills all NCQ blacklist entries which were added because of spurious
  NCQ completions.  I tracked down each commit and verified all
  removed ones are actually added because of spurious completions.

  WD740ADFD-00NLR1 wasn't deleted but moved upward because the drive
  not only had spurious NCQ completions but also is slow on sequential
  data transfers if NCQ is enabled.

  Maxtor 7V300F0 was added by 0e3dbc01d53940fe10e5a5cfec15ede3e929c918
  from Alan Cox.  I can only find evidences that the drive only had
  troubles with spuruious completions by searching the mailing list.
  This entry needs to be verified and removed if it doesn't have other
  NCQ related problems.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoahci: don't attach if ICH6 is in combined mode
Tejun Heo [Thu, 6 Dec 2007 06:09:43 +0000 (15:09 +0900)]
ahci: don't attach if ICH6 is in combined mode

ICH6 R/Ms share PCI ID between piix and ahci modes and we've been
allowing ahci to attach regardless of how BIOS configured it.
However, enabling AHCI mode when the controller is in combined mode
can result in unexpected behavior.  Don't attach if the controller is
in combined mode.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Bill Nottingham <notting@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoata_piix: add Toshiba Tecra M4 to broken suspend list
Peter Schwenke [Wed, 5 Dec 2007 01:39:49 +0000 (10:39 +0900)]
ata_piix: add Toshiba Tecra M4 to broken suspend list

Add Toshiba Tecra M4 to broken suspend list.  This is from OSDL
bugzilla bug 7780.

Signed-off-by: Peter Schwenke <peter@bluetoad.com.au>
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoahci: fix engine reset failed message
Tejun Heo [Thu, 6 Dec 2007 06:02:48 +0000 (15:02 +0900)]
ahci: fix engine reset failed message

There isn't much point in reporting -EOPNOTSUPP as failure.  Also the
message was missing newline.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoS2io: Check for register initialization completion before accesing device registers
Sreenivasa Honnur [Thu, 6 Dec 2007 04:59:28 +0000 (23:59 -0500)]
S2io: Check for register initialization completion before accesing device registers

- Making sure register initialisation is complete before proceeding further.
  The driver must wait until initialization is complete before attempting to
  access any other device registers.

Signed-off-by: Surjit Reang <surjit.reang@neterion.com>
Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoibm_newemac: Update file headers copyright notices
Benjamin Herrenschmidt [Wed, 5 Dec 2007 00:14:33 +0000 (11:14 +1100)]
ibm_newemac: Update file headers copyright notices

This updates the copyright notices of the new EMAC driver to
avoid confusion as who is to be blamed for new bugs.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoibm_newemac: Call dev_set_drvdata() before tah_reset()
Valentine Barshak [Wed, 5 Dec 2007 00:14:32 +0000 (11:14 +1100)]
ibm_newemac: Call dev_set_drvdata() before tah_reset()

The patch moves dev_set_drvdata(&ofdev->dev, dev) up before tah_reset(ofdev)
is called to avoid a NULL pointer dereference, since tah_reset uses drvdata.

Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoibm_newemac: Fix typo reading TAH channel info
Valentine Barshak [Wed, 5 Dec 2007 00:14:31 +0000 (11:14 +1100)]
ibm_newemac: Fix typo reading TAH channel info

This patch fixes a typo in ibm_newemac/core.c
(tah_port should be used instead of tah_ph)

Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoibm_newemac: Correct opb_bus_freq value
Valentine Barshak [Wed, 5 Dec 2007 00:14:31 +0000 (11:14 +1100)]
ibm_newemac: Correct opb_bus_freq value

The EMAC4_MR1_OBCI(freq) macro expects freg in MHz,
while opb_bus_freq is kept in Hz. Correct this.

Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoibm_newemac: Skip EMACs that are marked unused by the firmware
Hugh Blemings [Wed, 5 Dec 2007 00:14:30 +0000 (11:14 +1100)]
ibm_newemac: Skip EMACs that are marked unused by the firmware

Depending on how the 44x processors are wired, some EMAC cells
might not be useable (and not connected to a PHY). However, some
device-trees may choose to still expose them (since their registers
are present in the MMIO space) but with an "unused" property in them.

Signed-off-by: Hugh Blemings <hugh@blemings.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoibm_newemac: Cleanup/fix support for STACR register variants
Benjamin Herrenschmidt [Wed, 5 Dec 2007 00:14:29 +0000 (11:14 +1100)]
ibm_newemac: Cleanup/fix support for STACR register variants

There are a few variants of the STACR register that affect more than
just the "AXON" version of EMAC. Replace the current test of various
chip models with tests for generic properties in the device-tree.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Stefan Roese <sr@denx.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoibm_newemac: Cleanup/Fix RGMII MDIO support detection
Benjamin Herrenschmidt [Wed, 5 Dec 2007 00:14:28 +0000 (11:14 +1100)]
ibm_newemac: Cleanup/Fix RGMII MDIO support detection

More than just "AXON" version of EMAC RGMII supports MDIO, so replace
the current test with a generic property in the device-tree that
indicates such support.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Stefan Roese <sr@denx.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoibm_newemac: Workaround reset timeout when no link
Benjamin Herrenschmidt [Wed, 5 Dec 2007 00:14:27 +0000 (11:14 +1100)]
ibm_newemac: Workaround reset timeout when no link

With some PHYs, when the link goes away, the EMAC reset fails due
to the loss of the RX clock I believe.

The old EMAC driver worked around that using some internal chip-specific
clock force bits that are different on various 44x implementations.

This is an attempt at doing it differently, by avoiding the reset when
there is no link, but forcing loopback mode instead. It seems to work
on my Taishan 440GX based board so far.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Stefan Roese <sr@denx.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>