aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc64 (follow)
AgeCommit message (Collapse)AuthorFilesLines
2005-10-29[PATCH] ppc64 boot: remove zlibOlaf Hering4-2698/+44
Switch ppc64 to the in-kernel zlib, it has less bugs than the current one. The code in arch/ppc64/boot is compiled as 32bit, so it can not use the includes from include/asm. Copy all zlib related header files and convert them with sed. Reduce the scratch size to 47k, check possible changes at runtime. Signed-off-by: Olaf Hering <olh@suse.de> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-29[PATCH] ppc64 boot: missing include for size_tOlaf Hering1-0/+1
string.h needs definition of size_t, but not the one from linux/include Signed-off-by: Olaf Hering <olh@suse.de> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-29[PATCH] ppc: make phys_mem_access_prot() work with pfns instead of addressesRoland Dreier1-2/+3
Change the phys_mem_access_prot() function to take a pfn instead of an address. This allows mmap64() to work on /dev/mem for addresses above 4G on 32-bit architectures. We start with a pfn in mmap_mem(), so there's no need to convert to an address; in fact, it's actively bad, since the conversion can overflow when the address is above 4G. Similarly fix the ppc32 page_is_ram() function to avoid a conversion to an address by directly comparing to max_pfn. Working with max_pfn instead of high_memory fixes page_is_ram() to give the right answer for highmem pages. Signed-off-by: Roland Dreier <rolandd@cisco.com> Cc: Anton Blanchard <anton@samba.org> 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-29[PATCH] ppc: prevent GCC 4 from generating AltiVec instructions in kernelLee Nicks1-0/+3
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-28powerpc: Merge xmonPaul Mackerras11-8110/+1
The merged version follows the ppc64 version pretty closely mostly, and in fact ARCH=ppc64 now uses the arch/powerpc/xmon version. The main difference for ppc64 is that the 'p' command to call show_state (which was always pretty dodgy) has been replaced by the ppc32 'p' command, which calls a given procedure (so in fact the old 'p' command behaviour can be achieved with 'p $show_state'). Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-28[PATCH] powerpc: Move xics.[ch] into platforms/pseriesDavid Gibson2-748/+0
This patch moves the XICS interrupt controller code into the platforms/pseries directory, since it only appears on pSeries machines. If it ever appears on some other machine we can move it to sysdev, although xics.c itself will need a bunch of changes in that case to remove pSeries specific assumptions. Signed-off-by: David Gibson <dwg@au1.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-28Merge git://oak/home/sfr/kernels/iseries/work/Paul Mackerras15-3043/+4
2005-10-28ppc64: use mem_64.S from powerpc/libStephen Rothwell1-106/+0
and remove the same bits from ppc64/lib/string.S. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-28ppc64: use usercopy_64.c from powerpc/libStephen Rothwell2-42/+0
since it is identical to usercopy.c from ppc64/lib. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-28ppc64: user strcase.c from powerpc/libStephen Rothwell2-32/+1
since it is identical to strcase.c from ppc64/lib. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-28ppc64: use sstep.c from powerpc/libStephen Rothwell2-143/+0
since it is identical to sstep.c from ppc64/lib. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-28ppc64: use memcpy_64.S from powerpc/libStephen Rothwell2-173/+1
since it is identical to mempcy.S from ppc64/lib. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-28ppc64: use lockc.c from powerpc/libStephen Rothwell2-100/+0
since it is effectively the same as locks.c from ppc64/lib. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-28ppc64: use copyuser_64.S from powerpc/libStephen Rothwell2-577/+1
since it is identical to copyuser.S from ppc64/lib. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-28ppc64: use copypage_64.S from powerpc/libStephen Rothwell2-122/+1
since it is identical to copypage.S from ppc64/lib. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-28ppc64: use e2a.c from powerpc/libStephen Rothwell2-113/+0
since it is identical to e2a.c from ppc64/lib Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-28ppc64: use checksum_64.S from powerpcStephen Rothwell3-230/+2
as it is identical to checksum.S from ppc64. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-28ppc64: use the merged syscall tableStephen Rothwell4-1409/+2
This allows us to also use entry_64.S from the merged tree and reverts the setup_64.c part of fda262b8978d0089758ef9444508434c74113a61. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-28ppc64: Use the correct prototypes for i8259 functionsPaul Mackerras2-21/+3
We still had an old copy of i8259.h lying around; this gets rid of it and corrects the callers of i8259_init and i8259_irq. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-28powerpc: Move U3 IOMMU driver to arch/powerpc/sysdevPaul Mackerras2-329/+0
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-27[PATCH] powerpc: Purge bootinfo.hDavid Gibson2-2/+0
With ARCH=powerpc we assume the presence of a device tree, so we don't require any support for the old bi_recs method of passing boot parameters. Likewise, we've never needed it for ppc64, but we still had an include/asm-ppc64/bootinfo.h from which nothing was used. This patch removes that file, and all references to it in arch/ppc64 and arch/powerpc. A related, unused variable 'boot_mem_size' is also removed from setup_32.c. The bootinfo stuff remains in ARCH=ppc for the time being. Built and booted on Power5 (ARCH=ppc64 and ARCH=powerpc), built for 32-bit powermac (ARCH=powerpc and ARCH=ppc). Signed-off-by: David Gibson <dwg@au1.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-27[PATCH] powerpc: Fix handling of fpscr on 64-bitDavid Gibson6-111/+9
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-27[PATCH] ppc64: remove arch/ppc64/kernel/setup.cPaul Mackerras2-1308/+1
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>
2005-10-26[PATCH] ppc64: Fix wrong register mapping in mpic driverBenjamin Herrenschmidt1-2/+2
The mpic interrupt controller driver (used on G5 and early pSeries among others) has a bug where it doesn't get the right virtual address for the timer registers. It causes the driver to poke at the MMIO space of whatever has been mapped just next to it (ouch !) when initializing and causes boot failures on some IBM machines. 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-10-26powerpc: Merge rtas.c into arch/powerpc/kernelPaul Mackerras3-776/+6
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>
2005-10-26powerpc: Merge i8259.c into arch/powerpc/sysdevPaul Mackerras3-178/+6
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-26[PATCH] powerpc: Move ras.c into arch/powerpc/platforms/pseriesMichael Ellerman2-354/+1
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>
2005-10-24powerpc: Merge arch/ppc64/kernel/vio.c into arch/powerpc/kernel/vio.cStephen Rothwell2-262/+0
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>
2005-10-22Merge changes from linux-2.6 by handPaul Mackerras7-164/+381
2005-10-22ppc64: Use arch/powerpc/platforms/powermac for powermac build.Paul Mackerras9-3581/+2
This switches the ARCH=ppc64 build to use arch/powerpc/platforms/powermac instead of arch/ppc64/kernel/pmac*, and deletes the latter set of files. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-22ppc64: Simplify secondary CPU startup on powermacsPaul Mackerras2-31/+15
... for consistency with ppc32, and because this way is neater. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-22ppc64: Rearrange btext initialization for consistency with ppc32Paul Mackerras3-49/+46
Moved init_boot_display from arch/ppc64/kernel/pmac_setup.c to arch/ppc64/kernel/btext.c and declared it in asm-ppc64/btext.h. Call it from init_early rather than pmac_init_early. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-22ppc64: Add a `primary' argument to pci_process_bridge_OF_rangesPaul Mackerras3-11/+33
... for consistency with ppc32 and to make the powermac merge easier. Also make it use just a single resource in the host bridge for multiple consecutive elements of the ranges property. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-22ppc64/powerpc: Fix time initialization on SMP systemsPaul Mackerras1-15/+0
This moves smp_space_timers from arch/ppc64/kernel/smp.c to arch/powerpc/kernel/time.c and makes it initialize last_jiffy[] instead of paca[].next_jiffy_update_tb, since last_jiffy[] is now what the time code uses. It also declares smp_space_timers in include/asm-powerpc/time.h and gets rid of an ifdef in div128_by_32. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-21[PATCH] ppc64: Fix typo bug in iSeries hash codeDavid Gibson1-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>
2005-10-21[PATCH] ppc64: Fix pages marked dirty abusivelyBenjamin Herrenschmidt1-2/+1
While working on 64K pages, I found this little buglet in our update_mmu_cache() implementation. The code calls __hash_page() passing it an "access" parameter (the type of access that triggers the hash) containing the bits _PAGE_RW and _PAGE_USER of the linux PTE. The latter is useless in this case and the former is wrong. In fact, if we have a writeable PTE and we pass _PAGE_RW to hash_page(), it will set _PAGE_DIRTY (since we track dirty that way, by hash faulting !dirty) which is not what we want. In fact, the correct fix is to always pass 0. That means that only read-only or already dirty read write PTEs will be preloaded. The (hopefully rare) case of a non dirty read write PTE can't be preloaded this way, it will have to fault in hash_page on the actual access. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-21[PATCH] ppc64: Fix typo in time calculationsPaul Mackerras1-1/+1
This fixes a typo in the div128_by_32 function used in the timekeeping calculations on ppc64. If you look at the code it's quite obvious that we need (rb + c) rather than (rb + b). The "b" is clearly just a typo. Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-21[PATCH] powerpc: Merge thread_info.hDavid Gibson3-2/+2
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-21[PATCH] Fix broken initialization of conswitchp for ARCH=ppc64David Gibson1-0/+4
In the merge tree, commit 0458060c1c59c5378d8fb5daabe18cf4681c35cd broke boot on some machines because the initialization of conswitchp was moved to arch/powerpc/kernel/setup_64.c, but a corresponding copy was not added to arch/ppc64/kernel/setup.c. This patch fixes it. Signed-off-by: David Gibson <dwg@au1.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-20powerpc/ppc/ppc64: Various compile fixes.Paul Mackerras1-2/+2
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-20ppc64: Use the merged mpic.cPaul Mackerras3-889/+2
This means we now compile in arch/powerpc/sysdev for ARCH=ppc64. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-20powerpc: Move some calculations from xxx_calibrate_decr to time_initPaul Mackerras1-12/+2
Previously the individual xxx_calibrate_decr functions would each print the timebase and cpu frequency and calculate several values such as tb_to_us and tb_to_xs. This moves those printks and calculations into time_init just after the call to the platform's calibrate_decr function. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-20ppc: rename pci_assign_all_busses to pci_assign_all_busesPaul Mackerras2-2/+2
... for consistency with ppc64 and to make merging easier. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-20powerpc: Move smp_mpic_message_pass into mpic.cPaul Mackerras1-22/+0
Having it here rather than in arch/ppc64/kernel/smp.c means that we can use it on 32-bit SMP systems easily with ARCH=powerpc. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-20ppc64: Change ppc_md.get_cpuinfo to ppc_md.show_cpuinfoPaul Mackerras3-5/+5
... for consistency with ppc32; also add in ppc32's show_percpuinfo function. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-20[PATCH] powerpc: Merge ppc64 pmc.[ch] with ppc32 perfmon.[ch]David Gibson2-89/+1
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-19[PATCH] ppc64: update defconfigsPaul Mackerras6-163/+380
Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-19[PATCH] ppc64: Fix error in vDSO 32 bits dateBenjamin Herrenschmidt1-1/+1
The implementation of __kernel_gettimeofday() in the 32 bits vDSO has a small bug (a typo actually) that will cause it to lose 1 bit of precision. Not terribly bad but worth fixing. 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-10-20powerpc: Merge time.c and asm/time.h.Paul Mackerras4-891/+1
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-20ppc64: Minor compilation fixesPaul Mackerras2-12/+15
This defines CONFIG_PPC_STD_MMU for ppc64, changes an instance of sys32_ to compat_sys_ in the ppc64 syscall table, and removes a reference to a non-existent arch/powerpc/xmon/Makefile. Signed-off-by: Paul Mackerras <paulus@samba.org>