aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/lib
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'linux-2.6' into for-2.6.22Paul Mackerras2007-04-302-28/+2
|\
| * [STRING]: Move strcasecmp/strncasecmp to lib/string.cDavid S. Miller2007-04-262-28/+2
| | | | | | | | | | | | | | We have several platforms using local copies of identical code. Signed-off-by: David S. Miller <davem@davemloft.net>
* | [POWERPC] Emulate more instructions in softwareAnanth N Mavinakayanahalli2007-04-241-1/+44
| | | | | | | | | | | | | | | | | | | | | | Emulate a few more instructions in software - especially useful during singlestepping (xmon/kprobes). Instructions emulated with this patch are mfcr/mtcr rX, mfxer/mtxer rX, mflr/mtlr rX, mfctr/mtctr rX and mr rA,rB. Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] Use mtocrf instruction in asm when CONFIG_POWER4_ONLY=yOlof Johansson2007-04-133-9/+9
| | | | | | | | | | | | | | | | | | | | mtocrf is a faster single-field mtcrf (move to condition register fields) instruction available in POWER4 and later processors. It can make quite a difference in performance on some implementations, so use it for CONFIG_POWER4_ONLY builds. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] Make ppc64_defconfig without CONFIG_PPC_PSERIES buildStephen Rothwell2007-03-091-0/+4
|/ | | | | Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [POWERPC] Use ARRAY_SIZE macro when appropriateAhmed S. Darwish2007-02-081-1/+2
| | | | | | | | | Use ARRAY_SIZE macro already defined in linux/kernel.h Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [POWERPC] Added kprobes support to ppc32Kumar Gala2007-02-061-1/+1
| | | | | | | | Added kprobes to ppc32 platforms that have use single_step_exception. This excludes 4xx and anything Book-E since their debug mechanisms for single stepping are completely different. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* [POWERPC] Fix array indexing error in rheap grow()Timur Tabi2007-02-071-1/+2
| | | | | | | | | | | | | | The grow() function in the rheap library allocates a larger array of blocks, copies the contents of the old blocks array to the newly allocated array and fixes the list_head pointers after the copy. At the end, the new blocks must be enqueued to the empty_list of the rh_info_t structure. This patch fixes a bug where the code was indexing past the end of the array when enqueueing blocks. The UCC ethernet driver, which uses the rheap allocator, experiences kernel panics because of this bug. Signed-off-by: Ionut Nicu <ionut.nicu@freescale.com> Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [POWERPC] 8xx: generic 8xx code arch/powerpc portVitaly Bordug2007-02-072-0/+420
| | | | | | | | | | | | | | | | | Including support for non-coherent cache, some mm-related things + relevant field in Kconfig and Makefiles. Also included rheap.o compilation if 8xx is defined. Non-coherent mapping were refined and renamed according to Cristoph Hellwig. Orphaned functions were cleaned up. [Also removed arch/ppc/kernel/dma-mapping.c, because otherwise compiling with ARCH=ppc for a non DMA-cache-coherent platform ends up with two copies of __dma_alloc_coherent etc. -- paulus.] Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [POWERPC] Disallow kprobes on emulate_step and branch_takenGui,Jian2006-11-011-2/+3
| | | | | | | | | | | On powerpc, probing on emulate_step function will crash 2.6.18.1 when it is triggered. When kprobe is triggered, emulate_step() is on its kernel path and will cause recursive kprobe fault. And branch_taken() is called in emulate_step(). This disallows kprobes on both of them. Signed-off-by: Paul Mackerras <paulus@samba.org>
* [POWERPC] Fix rheap alignment problemLi Yang2006-10-022-4/+21
| | | | | | | | | | | Honor alignment parameter in the rheap allocator. This is needed by qe_lib. Remove compile warning. Signed-off-by: Pantelis Antoniou <pantelis@embeddedalley.com> Signed-off-by: Li Yang <leoli@freescale.com> Acked-by: Kumar Galak <galak@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
* Merge branch 'upstream' of ↵Paul Mackerras2006-09-281-0/+5
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/vitb/linux-2.6-PQ
| * POWERPC: Move generic cpm2 stuff to powerpcVitaly Bordug2006-09-211-0/+5
| | | | | | | | | | | | | | This moves the cpm2 common code and PIC stuff to the powerpc. Most of the files were just copied from ppc/, with minor tuning to make it compile, and, subsequently, work. Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
* | [POWERPC] make spinlocks work in a combined kernelStephen Rothwell2006-09-201-14/+13
|/ | | | | | If we build a pSeries/iSeries combined kernel, we will need this. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
* Merge branch 'merge'Paul Mackerras2006-08-311-4/+7
|\
| * [POWERPC] Fix return value from memcpyPaul Mackerras2006-08-311-4/+7
| | | | | | | | | | | | | | | | As pointed out by Herbert Xu <herbert@gondor.apana.org.au>, our memcpy implementation didn't return the destination pointer as its return value, and there is code in the kernel that expects that. This fixes it. Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] iseries: Move e2a()/strne2a() into their only callerMichael Ellerman2006-07-132-117/+0
|/ | | | | | | | The ASCII -> EBCDIC functions, e2a() and strne2a() are now only used in dt.c, so move them in there. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
* Remove obsolete #include <linux/config.h>Jörn Engel2006-06-304-4/+0
| | | | | Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
* [POWERPC] Optimise some TOC usageAnton Blanchard2006-06-151-0/+4
| | | | | | | Micro-optimisation - add no-minimal-toc to some more arch/powerpc Makefiles. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [PATCH] remove powerpc bitops in favor of existing generic bitopsJon Mason2006-05-242-151/+0
| | | | | | | | | | | There already exists a big endian safe bitops implementation in lib/find_next_bit.c. The code in it is 90%+ common with the powerpc specific version, so the powerpc version is redundant. This patch makes the necessary changes to use the generic bitops in powerpc, and removes the powerpc specific version. Signed-off-by: Jon Mason <jdmason@us.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [PATCH] powerpc: fix various sparse warningsStephen Rothwell2006-03-271-1/+1
| | | | | Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc: fix strncasecmp prototypeLinus Torvalds2006-03-251-1/+3
| | | | | | It takes a size_t, not an int, as its third argument. Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] powerpc: Add strne2a() to convert a string from EBCDIC to ASCIIMichael Ellerman2006-03-221-0/+10
| | | | | | | Add strne2a() which converts a string from EBCDIC to ASCII. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [PATCH] powerpc: trivial: modify comments to refer to new location of filesJon Mason2006-02-105-11/+1
| | | | | | | | | This patch removes all self references and fixes references to files in the now defunct arch/ppc64 tree. I think this accomplises everything wanted, though there might be a few references I missed. Signed-off-by: Jon Mason <jdmason@us.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [PATCH] powerpc: Remove lppaca structure from the PACADavid Gibson2006-01-131-6/+2
| | | | | | | | | | | | | | | | | | At present the lppaca - the structure shared with the iSeries hypervisor and phyp - is contained within the PACA, our own low-level per-cpu structure. This doesn't have to be so, the patch below removes it, making a separate array of lppaca structures. This saves approximately 500*NR_CPUS bytes of image size and kernel memory, because we don't need aligning gap between the Linux and hypervisor portions of every PACA. On the other hand it means an extra level of dereference in many accesses to the lppaca. The patch also gets rid of several places where we assign the paca address to a local variable for no particular reason. Signed-off-by: David Gibson <dwg@au1.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc: Fix find_next_bit on 32-bitPaul Mackerras2005-11-101-1/+1
| | | | | | | We had a "64" that didn't get changed to BITS_PER_LONG, resulting in find_next_bit not working correctly. Signed-off-by: Paul Mackerras <paulus@samba.org>
* Merge ../linux-2.6Paul Mackerras2005-11-072-3/+3
|\
| * [PATCH] ppc64: support 64k pagesBenjamin Herrenschmidt2005-11-062-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a new CONFIG_PPC_64K_PAGES which, when enabled, changes the kernel base page size to 64K. The resulting kernel still boots on any hardware. On current machines with 4K pages support only, the kernel will maintain 16 "subpages" for each 64K page transparently. Note that while real 64K capable HW has been tested, the current patch will not enable it yet as such hardware is not released yet, and I'm still verifying with the firmware architects the proper to get the information from the newer hypervisors. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | powerpc: Various UP build fixesPaul Mackerras2005-11-071-0/+1
|/ | | | | | | | | Mostly this involves adding #include <asm/smp.h>, since that defines things like boot_cpuid[_phys] and [gs]et_hard_smp_processor_id, which are SMP-related but still needed on UP. This incorporates fixes posted by Olof Johansson and Heikki Lindholm. Signed-off-by: Paul Mackerras <paulus@samba.org>
* Merge iSeries include file moveStephen Rothwell2005-11-021-1/+1
|\
| * merge filename and modify references to iseries/hv_call.hKelly Daly2005-11-011-1/+1
| | | | | | | | Signed-off-by: Kelly Daly <kelly@au.ibm.com>
* | [PATCH] powerpc: Merge bitops.hDavid Gibson2005-11-012-4/+155
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Here's a revised version. This re-introduces the set_bits() function from ppc64, which I removed because I thought it was unused (it exists on no other arch). In fact it is used in the powermac interrupt code (but not on pSeries). - We use LARXL/STCXL macros to generate the right (32 or 64 bit) instructions, similar to LDL/STL from ppc_asm.h, used in fpu.S - ppc32 previously used a full "sync" barrier at the end of test_and_*_bit(), whereas ppc64 used an "isync". The merged version uses "isync", since I believe that's sufficient. - The ppc64 versions of then minix_*() bitmap functions have changed semantics. Previously on ppc64, these functions were big-endian (that is bit 0 was the LSB in the first 64-bit, big-endian word). On ppc32 (and x86, for that matter, they were little-endian. As far as I can tell, the big-endian usage was simply wrong - I guess no-one ever tried to use minixfs on ppc64. - On ppc32 find_next_bit() and find_next_zero_bit() are no longer inline (they were already out-of-line on ppc64). - For ppc64, sched_find_first_bit() has moved from mmu_context.h to the merged bitops. What it was doing in mmu_context.h in the first place, I have no idea. - The fls() function is now implemented using the cntlzw instruction on ppc64, instead of generic_fls(), as it already was on ppc32. - For ARCH=ppc, this patch requires adding arch/powerpc/lib to the arch/ppc/Makefile. This in turn requires some changes to arch/powerpc/lib/Makefile which didn't correctly handle ARCH=ppc. Built and running on G5. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | powerpc: fix __strnlen_user in merge treeStephen Rothwell2005-11-011-1/+1
|/ | | | | | | | Change USER/KERNEL_DS so that the merged version of __strnlen_user can be used which allows us to complete the removal of arch/ppc64/lib/. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
* powerpc: apply recent changes to merged codePaul Mackerras2005-10-311-0/+1
| | | | Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc: Merge xmonPaul Mackerras2005-10-281-0/+2
| | | | | | | | | | | 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>
* powerpc: Make single-stepping emulation (mostly) usable on 32-bitPaul Mackerras2005-10-281-0/+17
| | | | | | | The sc instruction emulation can't be done the same way on 32-bit as 64-bit yet, but this should work OK. Signed-off-by: Paul Mackerras <paulus@samba.org>
* ppc64: use mem_64.S from powerpc/libStephen Rothwell2005-10-281-2/+1
| | | | | | and remove the same bits from ppc64/lib/string.S. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
* ppc64: use usercopy_64.c from powerpc/libStephen Rothwell2005-10-281-2/+2
| | | | | | since it is identical to usercopy.c from ppc64/lib. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
* ppc64: user strcase.c from powerpc/libStephen Rothwell2005-10-281-2/+3
| | | | | | since it is identical to strcase.c from ppc64/lib. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
* ppc64: use sstep.c from powerpc/libStephen Rothwell2005-10-281-1/+2
| | | | | | since it is identical to sstep.c from ppc64/lib. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
* ppc64: use memcpy_64.S from powerpc/libStephen Rothwell2005-10-281-3/+3
| | | | | | since it is identical to mempcy.S from ppc64/lib. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
* ppc64: use lockc.c from powerpc/libStephen Rothwell2005-10-281-3/+3
| | | | | | since it is effectively the same as locks.c from ppc64/lib. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
* ppc64: use copyuser_64.S from powerpc/libStephen Rothwell2005-10-281-2/+2
| | | | | | since it is identical to copyuser.S from ppc64/lib. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
* ppc64: use copypage_64.S from powerpc/libStephen Rothwell2005-10-281-2/+2
| | | | | | since it is identical to copypage.S from ppc64/lib. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
* ppc64: use e2a.c from powerpc/libStephen Rothwell2005-10-281-1/+1
| | | | | | since it is identical to e2a.c from ppc64/lib Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
* ppc64: use checksum_64.S from powerpcStephen Rothwell2005-10-281-1/+4
| | | | | | as it is identical to checksum.S from ppc64. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
* powerpc: Fix a corner case in __div64_32Paul Mackerras2005-10-201-1/+2
| | | | | | | | The code was incorrectly doing a division by 0 in the case where the denominator was 0x100000000 and the divisor was 0xffffffff. Thanks to Fred Liu of Motorola for pointing this out. Signed-off-by: Paul Mackerras <paulus@samba.org>
* ppc32: use L1_CACHE_SHIFT/L1_CACHE_BYTESStephen Rothwell2005-10-171-12/+12
| | | | | | instead of L1_CACHE_LINE_SIZE and LG_L1_CACHE_LINE_SIZE Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
* powerpc: Get 64-bit configs to compile with ARCH=powerpcPaul Mackerras2005-10-102-0/+99
| | | | | | | | This is a bunch of mostly small fixes that are needed to get ARCH=powerpc to compile for 64-bit. This adds setup_64.c from arch/ppc64/kernel/setup.c and locks.c from arch/ppc64/lib/locks.c. Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc: Use reg.h instead of processor.h when we just want reg namesPaul Mackerras2005-10-101-5/+0
| | | | | | | Now that the register names and bit definitions are all in reg.h, use that instead of processor.h in assembly code in a few places. Signed-off-by: Paul Mackerras <paulus@samba.org>