aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc (follow)
AgeCommit message (Collapse)AuthorFilesLines
2005-10-29[PATCH] ppc: prevent GCC 4 from generating AltiVec instructions in kernelLee Nicks1-0/+4
Depending on how GCC is built, GCC 4 may generate altivec instructions without user explicitly requesting vector operations in the code. Although this is a performance booster for user applications, it is a problem for kernel. This patch explicitly instruct GCC to NOT generate altivec instructions while building the kernel. Here are some test cases I ran. (1) build gcc 4.0.1 with '--with-cpu=7450 --enable-altivec --enable-cxx-flags=-mcpu=7450', and use this gcc to build kernel WITHOUT this kernel patch. Kernel fail to boot up on a 7450 board because of altivec instructions in kernel. (2) build gcc 4.0.1 with "--with-cpu=7450 --enable-altivec --enable-cxx-flags=-mcpu=7450", and use this gcc to build kernel WITH this kernel patch. Kernel boot up on a 7450 board without any problem. (3) build gcc 4.0.1 with "--with-cpu=750 --enable-cxx-flags=-mcpu=750", and use this gcc to build kernel with or without this kernel patch. Kernel boot up on a 7450 board without any problem. This patch should also work with GCC 3 or even earlier GCC 2.95.3. Signed-off-by: Lee Nicks <allinux@gmail.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-28[PATCH] gfp_t: remaining bits of arch/*Al Viro1-2/+2
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-28[PATCH] gfp_t: soundAl Viro2-3/+3
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-28[PATCH] gfp_t: dma-mapping (ppc)Al Viro1-2/+2
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-27[PATCH] powerpc: Moved dcr support to arch/powerpcKumar Gala2-43/+0
Signed-off-by: Kumar K. Gala <kumar.gala@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-27[PATCH] powerpc: Fix handling of fpscr on 64-bitDavid Gibson5-32/+5
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>
2005-10-26powerpc: Fixes to get the Longtrail CHRP a bit furtherPaul Mackerras2-1/+2
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>
2005-10-26powerpc: Merge i8259.c into arch/powerpc/sysdevPaul Mackerras11-259/+32
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>
2005-10-26ppc: Use the indirect_pci.c from arch/powerpc/sysdevPaul Mackerras4-154/+39
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>
2005-10-26[PATCH] ppc: Fix m82xx_pci buildBecky Bruce1-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>
2005-10-23powerpc: Make coff boot wrapper load the kernel at 8MPaul Mackerras1-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>
2005-10-22powerpc: Move agp_special_page export to where it is definedPaul Mackerras2-4/+1
... instead of exporting it in arch/*/kernel/ppc_ksyms.c. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-21[PATCH] powerpc: Merge thread_info.hDavid Gibson2-6/+5
Merge ppc32 and ppc64 versions of thread_info.h. They were pretty similar already, the chief changes are: - Instead of inline asm to implement current_thread_info(), which needs to be different for ppc32 and ppc64, we use C with an asm("r1") register variable. gcc turns it into the same asm as we used to have for both platforms. - We replace ppc32's 'local_flags' with the ppc64 'syscall_noerror' field. The noerror flag was in fact the only thing in the local_flags field anyway, so the ppc64 approach is simpler, and means we only need a load-immediate/store instead of load/mask/store when clearing the flag. - In readiness for 64k pages, when THREAD_SIZE will be less than a page, ppc64 used kmalloc() rather than get_free_pages() to allocate the kernel stack. With this patch we do the same for ppc32, since there's no strong reason not to. - For ppc64, we no longer export THREAD_SHIFT and THREAD_SIZE via asm-offsets, thread_info.h can now be safely included in asm, as on ppc32. Built and booted on G4 Powerbook (ARCH=ppc and ARCH=powerpc) and Power5 (ARCH=ppc64 and ARCH=powerpc). Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-20powerpc/ppc/ppc64: Various compile fixes.Paul Mackerras1-1/+1
This declares powersave_nap in system.h and makes it an int everywhere, fixes typos for the maple platform, fixes a couple of places where I missed removing the last two arguments from a message_pass function, and makes ppc64 consistent with ppc32 in the type of the pci_bridge.cfg_data field. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-20ppc: rename pci_assign_all_busses to pci_assign_all_busesPaul Mackerras5-11/+11
... for consistency with ppc64 and to make merging easier. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-20[PATCH] powerpc: Merge ppc64 pmc.[ch] with ppc32 perfmon.[ch]David Gibson4-100/+4
This patches the ppc32 and ppc64 versions of the headers and .c files with helper functions for manipulating the performance counting hardware. As a side effect, it removes use of the term "perfmon" from ppc32, thus avoiding confusion with the unrelated performance counter interface from HP Labs also called "perfmon". Built, but not booted, for g5, pSeries, iSeries, and 32-bit Powermac with both ARCH=powerpc and ARCH=ppc{,64} as appropriate. Signed-off-by: David Gibson <dwg@au1.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-20[PATCH] ppc32: replace use of _GLOBAL with .globl for ppc32Kumar Gala3-18/+33
The _GLOBAL() macro is for text symbols only. Changed to using .globl for .data symbols. This is also needed in ppc32 land to allow FSL Book-E, 40x, and 44x to work. Signed-off-by: Kumar K. Gala <kumar.gala@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-20powerpc: Merge time.c and asm/time.h.Paul Mackerras2-1/+10
We now use the merged time.c for both 32-bit and 64-bit compilation with ARCH=powerpc, and for ARCH=ppc64, but not for ARCH=ppc32. This removes setup_default_decr (folds its function into time_init) and moves wakeup_decrementer into time.c. This also makes an asm-powerpc/rtc.h. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-19ppc: Minor smp changes for consistency with ppc64Paul Mackerras9-23/+18
This makes platform code use the smp_ops variable directly instead of ppc_md.smp_ops, removes the two unused `data' and `wait' arguments from the *_message_pass() functions, and removes the call to the never-implemented smp_ops->space_timers() function. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-18powerpc: Fix various compile errors with ARCH=ppc, ppc64 and powerpcPaul Mackerras1-1/+1
This makes ppc use the syscalls.c from arch/powerpc/kernel, exports copy_and_flush from head_32.S for use by prom_init.c (ARCH=powerpc), and consolidates the sys_fadvise64_64 implementations for 32-bit. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-18powerpc: merge ppc signal.c and ppc64 signal32.cStephen Rothwell2-773/+2
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-17ppc: Fix various compile errors resulting from ptrace.c mergePaul Mackerras2-37/+98
This introduces flush_{fp,altivec,spe}_to_thread and fixes a branch-too-far error in linking. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-17ppc: Use the merged of_device.c from arch/powerpc/kernelPaul Mackerras2-277/+1
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-17powerpc: Merge syscalls.c and sys_ppc32.c.Paul Mackerras2-270/+1
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-17ppc32: use L1_CACHE_SHIFT/L1_CACHE_BYTESStephen Rothwell9-51/+51
instead of L1_CACHE_LINE_SIZE and LG_L1_CACHE_LINE_SIZE Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-13powerpc: merge ptrace.cStephen Rothwell2-509/+2
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-13powerpc: consolidate cputable.cStephen Rothwell2-808/+2
Also simplify arch/ppc64/kernel/Makefile Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-12[PATCH] ppc32: Tell userland about lack of standard TBBenjamin Herrenschmidt1-2/+3
Glibc is about to get some new high precision timer stuff that relies on the standard timebase of the PPC architecture. However, some (rare & old) CPUs do not have such timebase and it is a bit annoying to have your stuff just crash because you are running on the wrong CPU... This exposes to userland a CPU feature bit that tells that the current processor doesn't have a standard timebase. It's negative logic so that glibc will still "just work" on older kernels (it will just be unhappy on those old CPUs but that doesn't really matter as distro tend to update glibc & kernel at the same time). Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-12Merge from Linus' treePaul Mackerras32-33/+17
2005-10-11[PATCH] ppc highmem fixPaolo Galtieri1-2/+2
I've noticed that the calculations for seg_size and nr_segs in __dma_sync_page_highmem() (arch/ppc/kernel/dma-mapping.c) are wrong. The incorrect calculations can result in either an oops or a panic when running fsck depending on the size of the partition. The problem with the seg_size calculation is that it can result in a negative number if size is offset > size. The problem with the nr_segs caculation is returns the wrong number of segments, e.g. it returns 1 when size is 200 and offset is 4095, when it should return 2 or more. Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-11ppc: Various minor compile fixesPaul Mackerras29-13/+58
This fixes up a variety of minor problems in compiling with ARCH=ppc arising from using the merged versions of various header files. A lot of the changes are just adding #include <asm/machdep.h> to files that use ppc_md or smp_ops_t. This also arranges for us to use semaphore.c, vecemu.c, vector.S and fpu.S from arch/powerpc/kernel when compiling with ARCH=ppc. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-11ppc: Adapt to asm-powerpc/irq.h irq_canonicalize changesPaul Mackerras11-56/+11
Now instead of having a ppc_md function, we just have a variable which says whether to do the i8259 irq canonicalization or not, and set that variable on the platforms that need that. It looks to me that radstone_ppc7d was trying to use irq canonicalization for something else in a broken kind of way - it will need to be fixed properly. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-10powerpc: Fix compilation for 32-bit configsPaul Mackerras1-4/+2
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-10powerpc: Use arch/powerpc/mm and arch/powerpc/lib for 64-bitPaul Mackerras1-14/+0
This also puts a copy of indirect_pci.c in arch/powerpc/sysdev so that we don't need to build in arch/ppc/syslib. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-10powerpc: Make some #includes explicit.Paul Mackerras3-0/+3
In preparation for merging processor.h, this adds some explicit but won't be after the merge. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-06powerpc: Fix idle.c compile warningPaul Mackerras1-0/+1
This fixes a compile warning when using arch/ppc/kernel/idle.c in a merged (ARCH=powerpc) kernel. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-05[PATCH] ppc: Fix timekeeping with HZ=250 on some Mac modelsBenjamin Herrenschmidt1-1/+1
Older Macs which uses the VIA chip timers to calibrate the timebase used some code that wouldn't work if HZ wasn't divisible by 100... This fixes it at least for 250. Not totally perfect but should be enough for now (so it at least works with the default value which is now 250). There is still a potential issue with the core using CLOCK_TICK_RATE to maintain xtime and CLOCK_TICK_RATE value on ppc32 is pure crap, but that is a different problem, this patch at least brings us back to our previous situation. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-04ppc32: remove obsolete klock_info definitionPaul Mackerras1-1/+0
klock_info isn't used or referenced anywhere else in the kernel. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-04ppc32: export a few more things where they are definedPaul Mackerras2-3/+3
... and remove the exports from ppc_ksyms.c. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-01[PATCH] ppc32: Add new iBook 12" to PowerMac models tableSven Henkel1-0/+4
This adds the new iBook G4 (manufactured after July 2005) to the PowerMac models table. The model name (PowerBook6,7) is taken from a 12" iBook, I don't know if it also matches the 14" version. The patch applies to a vanilla 2.6.13.2 kernel. Signed-off-by: Sven Henkel <shenkel@gmail.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-01powerpc: merge idle_power4.S and trapc.sStephen Rothwell10-130/+130
Use idle_power4.S from ppc64 as we are not going to support 32 bit power4 in the merged tree. Merge ppc64 traps.c into powerpc traps.c: use ppc64 versions of exception routine names (as they don't have StudlyCaps) make all the versions if die() have the same prototype Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-09-30[PATCH] pmac: fix cpufreq for old tipb 550MhzBenjamin Herrenschmidt1-0/+7
The old 550Mhz titanium powerbook can switch to a lower frequency (500Mhz). A user has been repeately reporting overtemp conditions on his machine at high speed so this simple patch adds support to PowerMac cpufreq for this machine. The difference in frequency isn't big but seem enough to fix that user's problems. The patch has been around for some time now and doesn't seem to cause any problem, so I suppose it could go in now. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Alain RICHARD <alain.richard@equation.fr> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-30[PATCH] useless includes of linux/irq.h (arch/ppc)Al Viro26-27/+0
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-30powerpc: more cleanup of powerpc/kernelStephen Rothwell2-133/+1
Update head_64.S from arch/ppc64 Remove arc/ppc/kernel/fpu.S Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-09-30powerpc: remove old vector.S filesStephen Rothwell2-217/+1
Update old kernel/Makefiles to cope Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-09-29[PATCH] mv64x60 iomem annotationsAl Viro1-2/+2
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-29[PATCH] ppc32 ld.script fix for building on ppc64Al Viro1-1/+1
In arch/ppc/boot/ld.script we need OUTPUT_ARCH(powerpc:common) for the same reasons why we need it in vmlinux.lds.S; when we build on ppc64 box, we need to be explicit about the target. See http://linus.bkbits.net:8080/linux-2.5/cset@1.1784.8.10 for the corresponding fix in vmlinux.lds.S. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-29Merge by hand from Linus' tree.Paul Mackerras1-2/+1
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-09-28[PATCH] ppc: fix stupid thinko in oprofile fixBenjamin Herrenschmidt1-2/+1
I did something stupid in my oprofile fix, here's the obvious fix: Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-28powerpc: Fixes to get the merged kernel to boot on powermac.Paul Mackerras1-1/+1
This merges ppc_ksyms.c, puts back the actual do_execve call in sys_execve, makes init_MMU call find_end_of_memory rather than ppc_md.find_end_of_memory (every platform has a device tree with a /memory node now, right?) and fixes some problems with the mpic initialization on newworld powermacs. Signed-off-by: Paul Mackerras <paulus@samba.org>