summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [PATCH] powerpc: Fix handling of fpscr on 64-bitDavid Gibson2005-10-2722-209/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The recent merge of fpu.S broken the handling of fpscr for ARCH=powerpc and CONFIG_PPC64=y. FP registers could be corrupted, leading to strange random application crashes. The confusion arises, because the thread_struct has (and requires) a 64-bit area to save the fpscr, because we use load/store double instructions to get it in to/out of the FPU. However, only the low 32-bits are actually used, so we want to treat it as a 32-bit quantity when manipulating its bits to avoid extra load/stores on 32-bit. This patch replaces the current definition with a structure of two 32-bit quantities (pad and val), to clarify things as much as is possible. The 'val' field is used when manipulating bits, the structure itself is used when obtaining the address for loading/unloading the value from the FPU. While we're at it, consolidate the 4 (!) almost identical versions of cvt_fd() and cvt_df() (arch/ppc/kernel/misc.S, arch/ppc64/kernel/misc.S, arch/powerpc/kernel/misc_32.S, arch/powerpc/kernel/misc_64.S) into a single version in fpu.S. The new version takes a pointer to thread_struct and applies the correct offset itself, rather than a pointer to the fpscr field itself, again to avoid confusion as to which is the correct field to use. Finally, this patch makes ARCH=ppc64 also use the consolidated fpu.S code, which it previously did not. Built for G5 (ARCH=ppc64 and ARCH=powerpc), 32-bit powermac (ARCH=ppc and ARCH=powerpc) and Walnut (ARCH=ppc, CONFIG_MATH_EMULATION=y). Booted on G5 (ARCH=powerpc) and things which previously fell over no longer do. Signed-off-by: David Gibson <dwg@au1.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [PATCH] ppc64: remove arch/ppc64/kernel/setup.cPaul Mackerras2005-10-274-1315/+17
| | | | | | | | and use setup_64.c from the merged tree instead. The only difference between them was the code to set up the syscall maps. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [PATCH] powerpc: merge scatterlist.hStephen Rothwell2005-10-272-29/+18
| | | | | | | This depends on the 64bit dma_addr_t patch. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [PATCH] ppc64: make dma_addr_t 64 bitsStephen Rothwell2005-10-273-2/+6
| | | | | | | | There has been a need expressed for dma_addr_t to be 64 bits on PPC64. This patch does that. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc: undeprecate the old OF device tree accessors for nowPaul Mackerras2005-10-271-5/+5
| | | | | | | | | | | The recent addition of __deprecated to the declarations for find_devices etc. produces a whole pile of warnings from the ppc32 code. Since those functions still work perfectly well on ppc32, which doesn't have hotplug support for anything in the OF device tree, and we don't have time to fix that code now, remove the __deprecated markings for now. Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc: Remove common stuff from setup_64.cPaul Mackerras2005-10-271-270/+0
| | | | | | | This should have been in commit 03501dab035ab7da5e1373f5e130cfd6346d3f21 but got missed by accident. Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc: 32-bit powermac needs the mpc106 codePaul Mackerras2005-10-261-0/+1
| | | | Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc: Fix incorrect timer register addresses in mpic.cPaul Mackerras2005-10-261-3/+2
| | | | | | | | We were computing the wrong address for the MPIC timer registers, so when we went to initialize them we would have been hitting some unrelated ioremap... oops. Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc32: Limit memory to lowmem if !CONFIG_HIGHMEM.Paul Mackerras2005-10-261-0/+3
| | | | | | | This trims off the extra unusable memory from the lmb structure, so we don't try to use it. Signed-off-by: Paul Mackerras <paulus@samba.org>
* power: Update the multiple inclusion protection symbol on machdep.hPaul Mackerras2005-10-261-3/+3
| | | | Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc: Fixes to get the Longtrail CHRP a bit furtherPaul Mackerras2005-10-263-15/+30
| | | | | | | | | | | | | | | | | Talk about buggy firmware... the OF on the Longtrail returns 0 from the claim client service rather than -1 when the claim fails. It also has no device_type on the /memory node and blows up if the output buffer for package-to-path is too big. This also fixes a bug with calling alloc_up with align == 0, where we did _ALIGN_UP(alloc_bottom, 0) which will end up as 0. Lastly, we now check the return value (in r3) from calling the prom, and return -1 from call_prom if we get a negative value back. That is supposed to indicate that the requested client service doesn't exist. Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc: Merge 32-bit CHRP support.Paul Mackerras2005-10-2612-37/+1256
| | | | | | | SMP still needs more work but UP gets as far as starting userspace at least. This uses the 64-bit-style code for spinning up the cpus. Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc: Don't limit pmac_get_rtc_time to return only positive valuesPaul Mackerras2005-10-261-4/+0
| | | | | | | | If the machine's clock is set to a bogus value, this check resulted in userland waiting effectively forever for the RTC value to change, so remove the check. Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc: Fix interrupt-tree parsingPaul Mackerras2005-10-262-14/+28
| | | | | | | | | | The interrupt-tree parsing code wasn't offsetting interrupt numbers by 16 on 32-bit platforms with an i8259 interrupt controller, and it was confused about the encoding of interrupt sense and level (which is different for i8259 and openpic interrupt controllers, just to make things interesting). Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc: Pull out MPC106 (grackle) initialization code into its own filePaul Mackerras2005-10-265-44/+78
| | | | | | | | This is so that the 32-bit CHRP code can use it. The MPC106 initialization code is now in arch/powerpc/sysdev/grackle.c and is controlled by CONFIG_PPC_MPC106. Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc: Pull common bits of setup_{32,64}.c into setup-common.cPaul Mackerras2005-10-264-248/+417
| | | | | | | | | This creates a new arch/powerpc/kernel/setup-common.c with various bits that setup_32.c and setup_64.c had in common - functions like machine_shutdown/restart/power_off, show_cpuinfo, set_preferred_console etc. Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc: Merge rtas.c into arch/powerpc/kernelPaul Mackerras2005-10-2613-199/+256
| | | | | | | | | | | | | This splits arch/ppc64/kernel/rtas.c into arch/powerpc/kernel/rtas.c, which contains generic RTAS functions useful on any CHRP platform, and arch/powerpc/platforms/pseries/rtas-fw.[ch], which contain some pSeries-specific firmware flashing bits. The parts of rtas.c that are to do with pSeries-specific error logging are protected by a new CONFIG_RTAS_ERROR_LOGGING symbol. The inclusion of rtas.o is controlled by the CONFIG_PPC_RTAS symbol, and the relevant platforms select that. Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc: Merge i8259.c into arch/powerpc/sysdevPaul Mackerras2005-10-2619-271/+99
| | | | | | | | | | | | This changes the parameters for i8259_init so that it takes two parameters: a physical address for generating an interrupt acknowledge cycle, and an interrupt number offset. i8259_init now sets the irq_desc[] for its interrupts; all the callers were doing this, and that code is gone now. This also defines a CONFIG_PPC_I8259 symbol to select i8259.o for inclusion, and makes the platforms that need it select that symbol. Signed-off-by: Paul Mackerras <paulus@samba.org>
* ppc: Use the indirect_pci.c from arch/powerpc/sysdevPaul Mackerras2005-10-267-156/+58
| | | | | | | | This defines a CONFIG_INDIRECT_PCI symbol to control whether it gets used or not, and fixes the Kconfig to select that symbol for platforms that need it. Signed-off-by: Paul Mackerras <paulus@samba.org>
* [PATCH] powerpc: Move ras.c into arch/powerpc/platforms/pseriesMichael Ellerman2005-10-263-8/+7
| | | | | | | | ras.o is only built for CONFIG_PPC_PSERIES, so move it into arch/powerpc/platforms/pseries. Update Makefiles to suit. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [PATCH] powerpc: Move firmware.h into include/asm-powerpcMichael Ellerman2005-10-261-7/+3
| | | | | | | Move firmware.h into include/asm-powerpc. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [PATCH] powerpc: Remove trailing \n" in HMT macrosMichael Ellerman2005-10-261-7/+7
| | | | | | | GCC 3.3.3 barfs on the trailing \n" in the HMT macros. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [PATCH] powerpc: Remove duplicate definition of set_tb()Michael Ellerman2005-10-261-7/+0
| | | | | | | | | Somewhere along the line we got two definitions of set_tb(). They look to be identical although they're not textually identical. So remove the #ifdef CONFIG_PPC64 version, leaving the common version in time.h. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [PATCH] powerpc: Some minor cleanups to setup_32.cKumar Gala2005-10-262-40/+8
| | | | | | | | | | * Removed of_show_percpuinfo and just report CPU frequency in generic show_cpuinfo code. * Killed OCP and PPC_SYS related code which doesn't belong in the merge tree Signed-off-by: Kumar K. Gala <kumar.gala@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [PATCH] powerpc: Add support for Book-E timer config to generic_calibrate_decrKumar Gala2005-10-261-0/+11
| | | | | | | | We need to initialize some control SPRS for timers on Book-E before we start taking decrementer interrupts. Signed-off-by: Kumar K. Gala <kumar.gala@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [PATCH] ppc: Fix m82xx_pci buildBecky Bruce2005-10-261-1/+1
| | | | | | | | | | | A recent patch updated the name of pci_assign_all_busses to pci_assign_all_buses. This instance of its use wasn't corrected by the original patch to use the new name. Builds cleanly on ads8272. Signed-off-by: Becky Bruce <becky.bruce@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [PATCH] powerpc: Fix types.hBecky Bruce2005-10-261-0/+2
| | | | | | | | | | | Powerpc: Fix types.h I noticed that Paul had already pulled the version of types.h that is missing the config.h include into the merge tree - this patch adds it back in. Signed-off-by: Becky Bruce <becky.bruce@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [PATCH] powerpc: merge include/asm-ppc*/checksum.h into ↵Kumar Gala2005-10-262-118/+36
| | | | | | | include/asm-powerpc/checksum.h Signed-off-by: Kumar Gala <kumar.gala@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [PATCH] powerpc: some prom.c cleanupsKumar Gala2005-10-262-7/+11
| | | | | | | | | | | | | | | | | On !CONFIG_PPC_MULTIPLATFORM _machine is defined as 0. This is ok, but we can't assign a value to _machine then. We may not have CONFIG_PCI available, so only build in support for find_parent_pci_resource(), request_OF_resource(), release_OF_resource() if PCI is enabled. This is probably not the long term fix but works out for now. Make reg_property64 contain 64-bit elements on a 32-bit machine. Mark the deprecated prom.c functions as __deprecated. Signed-off-by: Kumar K. Gala <kumar.gala@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [PATCH] powerpc: Make sure we have an RTC before trying to adjust itKumar Gala2005-10-261-1/+1
| | | | | | | | Its valid for ppc_md.set_rtc_time to be NULL. We need to check that its non-NULL before trying to update the RTC. Signed-off-by: Kumar K. Gala <kumar.gala@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc: Add a shutdown member to vio_driverStephen Rothwell2005-10-242-0/+12
| | | | | | | | | | | Add a shutdown member to struct vio_driver. We also need vio_bus_shutdown() which converts from struct device to struct vio_dev and knows how to extract the struct vio_driver. Original patch adjusted for different location of vio.c. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
* powerpc: set the driver.owner field for all vio driversStephen Rothwell2005-10-247-5/+11
| | | | Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
* powerpc: iseries: Fix a bogus commentStephen Rothwell2005-10-241-5/+1
| | | | | | | | | A comment in lpevents.c refers to code that's actually in HvCallEvent.h. The code in HvCallEvent.h is pretty obvious, so just remove the comment altogether. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
* powerpc: don't duplicate name between vio_driver and device_driverStephen Rothwell2005-10-2410-19/+31
| | | | | | | Just set the name field directly in the device_driver structure contained in the vio_driver struct. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
* powerpc: Move include/asm-ppc64/vio.h to include/asm-powerpc/vio.hStephen Rothwell2005-10-241-10/+10
| | | | | | | Move include/asm-ppc64/vio.h to include/asm-powerpc/vio.h, that's it. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
* powerpc: Merge arch/ppc64/kernel/vio.c into arch/powerpc/kernel/vio.cStephen Rothwell2005-10-243-1/+1
| | | | | | | | | | | Merge arch/ppc64/kernel/vio.c into arch/powerpc/kernel/vio.c, update the Makefiles to make it work, and make ARCH=ppc64 still work. Michael's version put vio.c in arch/powerpc/sysedv but after consolting Paulus, this one puts it in arch/powerpc/kernel. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
* powerpc: Make coff boot wrapper load the kernel at 8MPaul Mackerras2005-10-231-1/+1
| | | | | | | | | | | Previously it claimed 7MB starting at the 9M point and loaded the kernel there. That meant that prom_init put the flattened device tree above 16M. On the 601 that caused the early device tree scan to fail, since only 16MB are mapped with BATs on the 601. Moving this down to 8MB allows prom_init to put the flattened device tree between 15M and 16M, so it works on the 601. Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc: Run on old powermacs.Paul Mackerras2005-10-233-27/+106
| | | | | | | | | | | | | | | | Old powermacs have a number of differences from current machines: - there is no interrupt tree in the device tree, just interrupt or AAPL,interrupt properties - the chosen node in the device tree is called /chosen@0 - the OF claim method doesn't map the memory, so we have to do an explicit map call as well - there is no /chosen/cpu property on SMP machines - the NVRAM isn't structured as a set of partitions. This adapts the merged powermac support code to cope with these issues. Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc: Fix time code for 601 processorsPaul Mackerras2005-10-232-24/+69
| | | | | | | | | | The 601 doesn't have the timebase register; instead it has an RTCL register that counts nanoseconds and wraps at 1000000000, and an RTCU register that counts seconds. This makes the necessary changes for the merged time code to use the RTCL/U registers when the kernel is running on a 601. Signed-off-by: Paul Mackerras <paulus@samba.org>
* Merge changes from linux-2.6 by handPaul Mackerras2005-10-22177-1842/+2329
|\
| * [PATCH] typo fix in last cpufreq powernow patchChris Wright2005-10-211-1/+1
| | | | | | | | | | | | | | | | Not sure how it slipped by, but here's a trivial typo fix for powernow. Signed-off-by: Chris Wright <chrisw@osdl.org> [ It's "nurter" backwards.. Maybe we have a hillbilly The Shining fan? ] Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| * [PATCH] Call exit_itimers from do_exit, not __exit_signalRoland McGrath2005-10-213-14/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When I originally moved exit_itimers into __exit_signal, that was the only place where we could reliably know it was the last thread in the group dying, without races. Since then we've gotten the signal_struct.live counter, and do_exit can reliably do group-wide cleanup work. This patch moves the call to do_exit, where it's made without locks. This avoids the deadlock issues that the old __exit_signal code's comment talks about, and the one that Oleg found recently with process CPU timers. [ This replaces e03d13e985d48ac4885382c9e3b1510c78bd047f, which is why it was just reverted. ] Signed-off-by: Roland McGrath <roland@redhat.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| * Revert "Fix cpu timers exit deadlock and races"Linus Torvalds2005-10-211-11/+17
| | | | | | | | | | Revert commit e03d13e985d48ac4885382c9e3b1510c78bd047f, to be replaced by a much nicer fix from Roland.
| * [PATCH] cpufreq: fix pending powernow timer stuck conditionDave Jones2005-10-211-11/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AMD recently discovered that on some hardware, there is a race condition possible when a C-state change request goes onto the bus at the same time as a P-state change request. Both requests happen, but the southbridge hardware only acknowledges the C-state change. The PowerNow! driver is then stuck in a loop, waiting for the P-state change acknowledgement. The driver eventually times out, but can no longer perform P-state changes. It turns out the solution is to resend the P-state change, which the southbridge will acknowledge normally. Thanks to Johannes Winkelmann for reporting this and testing the fix. Signed-off-by: Mark Langsdorf <mark.langsdorf@amd.com> Signed-off-by: Dave Jones <davej@redhat.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| * [PATCH] ppc64: Fix typo bug in iSeries hash codeDavid Gibson2005-10-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a stupid typo bug in the iSeries hash table code. When we place a hash PTE in the secondary bucket, instead of setting the SECONDARY flag bit, as we should, we (redundantly) set the VALID flag. This was introduced with the patch abolishing bitfields from the hash table code. Mea culpa, oops. It hasn't been noticed until now because in practice we don't hit the secondary bucket terribly often. Signed-off-by: David Gibson <dwg@au1.ibm.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| * Merge master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds2005-10-214-14/+48
| |\
| | * [ARM] Fix Integrator IM/PD-1 supportRussell King2005-10-211-7/+8
| | | | | | | | | | | | Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| | * [ARM] 3028/1: S3C2410 - add DCLK mask definitionsBen Dooks2005-10-201-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch from Ben Dooks From: Guillaume Gourat <guillaume.gourat@nexvision.fr> Add MASK definitions for DCLK0 and DCLK1 Signed-off-by: Guillaume Gourat <guillaume.gourat@nexvision.fr> Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| | * [ARM] 3027/1: BAST - reduce NAND timings slightlyBen Dooks2005-10-201-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch from Ben Dooks The current Simtec BAST nand area timings are a little too slow to be obtained by a 2410 running at 266MHz, so reduce the timings slightly to bring them into the acceptable range. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| | * [ARM] 3026/1: S3C2410 - avoid possible overflow in pll calculationsBen Dooks2005-10-201-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch from Ben Dooks Avoid the possiblity that if the board is using a 16.9334 or higher crystal with a high PLL multiplier, then the pll value could overflow the capability of an int. Also fix the value types of the intermediate variables to unsigned int. Rewrite of patch from Guillaume Gourat Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>