====== powerpc.git.patch ====== commit 97c2363acf393d018d0ae2ef2c859e5eead3141d Merge: 9c7e907... 75154f4... Author: Arnd Bergmann Date: Sat Jun 23 11:29:42 2007 +0200 Merge branches 'origin' and 'powerpc' into powerpc+origin commit 9c7e90781060c4737ba0143fd3fc5d4a0b8a329d Merge: cd25352... 0864a4e... Author: Arnd Bergmann Date: Fri Jun 22 15:39:15 2007 +0200 Merge branches 'origin' and 'powerpc' into powerpc+origin commit cd2535234bb4a3342a66edad271fef796d864d86 Merge: d59a251... f1518a0... Author: Arnd Bergmann Date: Thu Jun 21 02:32:25 2007 +0200 Merge branches 'origin' and 'powerpc' into powerpc+origin commit d59a2519890bebfe005702263a548bfe756bd11a Merge: 0dcc8e8... d025d78... Author: Arnd Bergmann Date: Thu Jun 21 01:51:34 2007 +0200 Merge branches 'origin' and 'powerpc' into powerpc+origin commit 0dcc8e8282d998429e4e12e63e852eb318d96f3c Merge: 3cec3a4... 7c8545e... Author: Arnd Bergmann Date: Wed Jun 20 17:11:39 2007 +0200 Merge branches 'origin' and 'powerpc' into powerpc+origin commit 3cec3a457336df726f9a682199f6fa0b7a0f70cf Merge: 0a63d3c... 7b7a57c... Author: Arnd Bergmann Date: Tue Jun 19 18:58:00 2007 +0200 Merge branches 'origin' and 'powerpc' into powerpc+origin commit 0a63d3c56e8fc4623c5a058e3888bf153041d967 Merge: d082b2a... fa490cf... Author: Arnd Bergmann Date: Tue Jun 19 02:15:07 2007 +0200 Merge branches 'origin' and 'powerpc' into powerpc+origin commit d082b2ae93fb796f0fd419c5ce2e1db1fb0219a5 Merge: 2508eba... 188e1f8... Author: Arnd Bergmann Date: Sun Jun 17 20:07:13 2007 +0200 Merge branches 'origin' and 'powerpc' into powerpc+origin commit 2508ebac8adc8a462a1a7da1b968d12270f4b3f5 Merge: fa5973a... f4d2781... Author: Arnd Bergmann Date: Sat Jun 16 20:04:03 2007 +0200 Merge branches 'powerpc' and 'origin' into powerpc+origin commit fa5973ad0603ab090f9aef7d0282336ae81ef5f9 Merge: e58ca3d... de7f928... Author: Arnd Bergmann Date: Sat Jun 16 19:46:30 2007 +0200 Merge branch 'origin' into powerpc+origin commit e58ca3de64927e96beb2f1594975dc4a29b79459 Author: David Gibson Date: Wed Jun 13 14:53:00 2007 +1000 [POWERPC] Fix problems with device tree representation of TSI-1xx bridges This fixes some problems with the way the some things represented in the device tree for the Holly and Taiga boards. This means changes both to the dts files, and to the code which instantiates the tsi108 ethernet platform devices based on the device tree. - First, and most importantly, the ethernet PHYs are given with an identical 'reg' property. This reg currently encodes the accessible register used to initiate mdio interaction with the PHYs, rather than a meaningful address on the parent bus (mdio in this case), which is incorrect. Instead we give the address of these registers as 'reg' in the mdio node itself, and encode the ID of each phy in their 'reg' propertyies. - Currently the platform device constructor enables a workaround in the tsi108 ethernet driver based on the compatible property of the PHY. This is incorrect, because the workaround in question is necessary due to the board's wiring of the PHY, not the model of PHY itself. This patch alters the constructor to instead enable the workaround based on a new special property in the PHY node. - The compatible properties on a number of nodes in the device tree are insufficiently precise. In particular the PHYs give only "bcm54xx", which is broken, since there are many bcm54xx PHY models, and they have differences which matter. The mdio had a compatible property of "tsi-ethernet" identical to the ethernet MAC nodes, which doesn't make sense. The ethernet, i2c, bridge and PCI nodes were given only as "tsi-*" which is somewhat inprecise, we replace with "tsi108-*" in the case of Taiga (which has a TSI108 bridge), and "tsi109-*", "tsi108-*" in the case of Holly (which has a TSI109 bridge). - We remove some "model" properties from the ethernets on Taiga board which were neither useful nor adequately precise. - On Holly we change to using a dtc label instead of a full path to reference the MPIC node, which makes the dts a little more readable. Signed-off-by: David Gibson Signed-off-by: Paul Mackerras commit e60c526fba3ba77070d0c97fac52c86243ad694d Author: David Gibson Date: Wed Jun 13 14:53:00 2007 +1000 [POWERPC] Don't store a command line in the Holly device tree Currently, the Holly device tree includes a bootargs property in /chosen, which gives a commandline. This is somewhat inconvenient, because it means an alternative default command line can't be given in the kernel config - the value obtained from the dts via the bootwrapper will always override CONFIG_CMDLINE. This removes the command line from the dts, and instead puts the same command line as a default in holly_defconfig. Signed-off-by: David Gibson Signed-off-by: Paul Mackerras commit 85aecac8d2893372c618bac373e2de9cf102dfbc Author: David Gibson Date: Wed Jun 13 14:53:00 2007 +1000 [POWERPC] Consolidate cuboot initialization code The various cuboot platforms (i.e. pre-device tree aware u-boot for 83xx, 85xx and Ebony) share a certain amount of code for parsing the boot parameters. To a certain extent that's inevitable, since they platforms have different definitions of the bd_t structure. However, with some macro work and a helper function, this patch improves the situation a bit. In the process, this fixes a bug on Ebony, which was incorrectly handling the parameters passed form u-boot for the command line (the bug was copied from 83xx and 85xx which have subsequently been fixed). Signed-off-by: David Gibson Signed-off-by: Paul Mackerras commit b2ba34f370a66d9ed4bbd440e45296ecf3e267d3 Author: David Gibson Date: Wed Jun 13 14:52:59 2007 +1000 [POWERPC] Derive ebc ranges property from EBC registers In the device tree for Ebony, the 'ranges' property in the node for the EBC bridge shows the mappings from the chip select / address lines actually used for the EBC peripherals into the address space of the OPB. At present, these mappings are hardcoded in ebony.dts for the mappings set up by the OpenBIOS firmware when it configures the EBC bridge. This replaces the hardcoded mappings with code in the zImage to read the EBC configuration registers and create an appropriate ranges property based on them. This should make the zImage and kernel more robust to changes in firmware configuration. In particular, some of the Ebony's DIP switches can change the effective address of the Flash and other peripherals in OPB space. With this patch, the kernel will be able to cope with at least some of the possible variations. Signed-off-by: David Gibson Signed-off-by: Paul Mackerras commit 11123346bfba8e65631957c6c25ed1a6ca1b4ffe Author: David Gibson Date: Wed Jun 13 14:52:58 2007 +1000 [POWERPC] Factor zImage's 44x reset code out of ebony.c The ebony_exit() function which resets the Ebony board should in fact be common to most if not all 44x boards. This moves the function out into 44x.c, renaming it, so it can be used by other 44x platforms. Signed-off-by: David Gibson Signed-off-by: Paul Mackerras commit 4508dc21feb189159d4cc1d5b79c5a55fad5f2ed Author: David Gibson Date: Wed Jun 13 14:52:57 2007 +1000 [POWERPC] Merge CPU features pertaining to icache coherency Currently the powerpc kernel has a 64-bit only feature, COHERENT_ICACHE used for those CPUS which maintain icache/dcache coherency in hardware (POWER5, essentially). It also has a feature, SPLIT_ID_CACHE, which is used on CPUs which have separate i and d-caches, which is to say everything except 601 and Freescale E200. In nearly all the places we check the SPLIT_ID_CACHE, what we actually care about is whether the i and d-caches are coherent (which they will be, trivially, if they're the same cache). This tries to clarify the situation a little. The COHERENT_ICACHE feature becomes availble on 32-bit and is set for all CPUs where i and d-cache are effectively coherent, whether this is due to special logic (POWER5) or because they're unified. We check this, instead of SPLIT_ID_CACHE nearly everywhere. The SPLIT_ID_CACHE feature itself is replaced by a UNIFIED_ID_CACHE feature with reversed sense, set only on 601 and Freescale E200. In the two places (one Freescale BookE specific) where we really care whether it's a unified cache, not whether they're coherent, we check this feature. The CPUs with unified cache are so few, we could consider replacing this feature bit with explicit checks against the PVR. This will make unifying the 32-bit and 64-bit cache flush code a little more straightforward. Signed-off-by: David Gibson Signed-off-by: Paul Mackerras commit 8e561e7eda02819c711a75b64a000bf34948cdbb Author: David Gibson Date: Wed Jun 13 14:52:56 2007 +1000 [POWERPC] Kill typedef-ed structs for hash PTEs and BATs Using typedefs to rename structure types if frowned on by CodingStyle. However, we do so for the hash PTE structure on both ppc32 (where it's called "PTE") and ppc64 (where it's called "hpte_t"). On ppc32 we also have such a typedef for the BATs ("BAT"). This removes this unhelpful use of typedefs, in the process bringing ppc32 and ppc64 closer together, by using the name "struct hash_pte" in both cases. Signed-off-by: David Gibson Signed-off-by: Paul Mackerras commit 9c709f3b62ee8ee0dfadf358e361802cab7eea7a Author: David Gibson Date: Wed Jun 13 14:52:56 2007 +1000 [POWERPC] Start factoring pgtable-ppc32.h and pgtable-ppc64.h This factors some things defined in both pgtable-ppc32.h and pgtable-ppc64.h into the common part of asm-powerpc/pgtable.h. These are all things which have essentially identical definitions, and which by their nature are very unlikely ever to need different definitions in the two cases. Signed-off-by: David Gibson Signed-off-by: Paul Mackerras commit c0770f686cf8f464b5b9d4bd28c1ed7604c97ed4 Author: David Gibson Date: Wed Jun 13 14:52:56 2007 +1000 [POWERPC] Remove a couple of unused definitions from pgtable_32.c In arch/powerpc/mm/pgtable_32.c, the variable io_bat_index and the macro is_power_of_4() no longer have any users. This removes them. Signed-off-by: David Gibson Signed-off-by: Paul Mackerras commit f21f49ea639ac3f24824177dac1268af75a2d373 Author: David Gibson Date: Wed Jun 13 14:52:54 2007 +1000 [POWERPC] Remove the dregs of APUS support from arch/powerpc APUS (the Amiga Power-Up System) is not supported under arch/powerpc and it's unlikely it ever will be. Therefore, this patch removes the fragments of APUS support code from arch/powerpc which have been copied from arch/ppc. A few APUS references are left in asm-powerpc in .h files which are still used from arch/ppc. Signed-off-by: David Gibson Signed-off-by: Paul Mackerras commit 90ac19a8b21ba2621ddd7beb2dc96152e78270b7 Author: David Gibson Date: Wed Jun 13 14:52:54 2007 +1000 [POWERPC] Abolish iopa(), mm_ptov(), io_block_mapping() from arch/powerpc These old-fashioned IO mapping functions no longer have any callers in code which remains relevant on arch/powerpc. Therefore, this removes them from arch/powerpc. Signed-off-by: David Gibson Signed-off-by: Paul Mackerras commit 4db68bfe71940c0851bc81041ade6dc293fe2b96 Author: David Gibson Date: Wed Jun 13 14:52:54 2007 +1000 [POWERPC] Split out asm-ppc/mmu.h portions for the "classic" hash-based MMU arch/powerpc still relies on asm-ppc/mmu.h for most 32-bit MMU types. This is another step towards fixing this. It takes the portions of asm-ppc/mmu.h related to the "classic" 32-bit hash page table MMU which are still relevant in arch/powerpc and puts them in a new asm-powerpc/mmu-hash32.h, included when appropriate from asm-powerpc/mmu.h. Signed-off-by: David Gibson Signed-off-by: Paul Mackerras commit 2e6016133755eb3cc44e8efab92573d23ed75888 Author: David Gibson Date: Wed Jun 13 14:52:54 2007 +1000 [POWERPC] Split low-level OF-related bootloader code into separate files Currently, all OF-related code in the bootloader is contained in of.c. of.c also provides the platform specific things necessary to boot on an OF platform. However, there are platforms (such as PReP) which can include an OF implementation, but are not bootable as pure OF systems. For use by such platforms, this patch splits out the low-level parts of the OF code (call_prom() and various wrappers thereof) into a new oflib.c file. In addition, the code related to bootwrapper console output via OF are moved to a new ofconsole.c file. Both these files are included in the wrapper.a library where they can be used by both full-OF and partial OF platforms. Signed-off-by: David Gibson Signed-off-by: Paul Mackerras commit a0ae9c7c05b969cbaffb0371f8698c54465b4c96 Author: Arnd Bergmann Date: Wed Jun 13 02:30:17 2007 +1000 [POWERPC] Split out CPU specific options into a new Kconfig file A lot of the options in arch/powerpc/Kconfig deal with the CPU menu, and my next patches add more to them. Moving them to a new arch/powerpc/platforms/Kconfig.cputype file makes it easier to follow. There are no functional changes in here. Signed-off-by: Arnd Bergmann Signed-off-by: Paul Mackerras commit effe24bdd41ef790b30c9ac02ede3703937c6ba0 Author: will schmidt Date: Wed Jun 13 01:19:01 2007 +1000 [POWERPC] During VM oom condition, kill all threads in process group We have had complaints where a threaded application is left in a bad state after one of it's threads is killed when we hit a VM: out_of_memory condition. Killing just one of the process threads can leave the application in a bad state, whereas killing the entire process group would allow for the application to restart, or be otherwise handled, and makes it very obvious that something has gone wrong. This change allows the entire process group to be taken down, rather than just the one thread. lightly tested on powerpc Signed-off-by: Will Signed-off-by: Paul Mackerras commit d8c391a5593aca5bea002bcaaec16c7bbd6ec853 Author: Jake Moilanen Date: Fri Jun 8 07:27:11 2007 +1000 [POWERPC] Donate idle CPU cycles on dedicated partitions A Power6 can give up CPU cycles on a dedicated CPU (as opposed to a shared CPU) to other shared processors if the administrator asks for it (via the HMC). This enables that to work properly on P6. This just involves setting a bit in the CAS structure as well as the VPA. To donate cycles, a CPU has to have all SMT threads idle and have the donate bit set in the VPA. Then call H_CEDE. The reason why shared processors just aren't used is because dedicated CPUs are guaranteed an actual processor, yet the system is still able to increase the capacity of the shared CPU pool. Also rename the VPA's cpuctls_task_attrs field to a more accurate name. Signed-off-by: Jake Moilanen Signed-off-by: Paul Mackerras commit 2f97cd3912428f5044fa7715293a69349fc455fa Author: Benjamin Herrenschmidt Date: Mon Jun 4 15:15:56 2007 +1000 [POWERPC] Less ifdef's in signal.c/signal.h This patch moves things around a little bit in the new common signal.c and signal.h files to remove the last #ifdef in the middle of the common do_signal(). Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras commit 0edc4ffd0e50d1ab0f387d37457210bc8bf8f8da Author: Benjamin Herrenschmidt Date: Mon Jun 4 15:15:55 2007 +1000 [POWERPC] Remove #ifdef around set_dabr in signal code set_dabr() and thread.dabr exist on 32 bits as well nowadays (they actually may do something even, depending on what CPU you have). So this removes the ifdef. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras commit a3f61dc0a5335334958ec3b97d0b1946b4ae5375 Author: Benjamin Herrenschmidt Date: Mon Jun 4 17:22:48 2007 +1000 [POWERPC] Merge creation of signal frame The code for creating signal frames was still duplicated and split in strange ways between 32 and 64 bits, including the SA_ONSTACK handling being in do_signal on 32 bits but inside handle_rt_signal on 64 bits etc... This moves the 64 bits get_sigframe() to the generic signal.c, cleans it a bit, moves the access_ok() call done by all callers to it as well, and adapts/cleanups the 3 different signal handling cases to use that common function. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras commit 5f9f375a62d3fd3d7f0d5adc23039ade523e62ba Author: Benjamin Herrenschmidt Date: Mon Jun 4 15:15:53 2007 +1000 [POWERPC] Remove obsolete freezer bits The powerpc signal code still had some obsolete freezer bits that have long been removed from x86 (it's now done in generic code). Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras commit f478f5430c8a599f46c41e8172a507a5772a6b69 Author: Christoph Hellwig Date: Mon Jun 4 15:15:52 2007 +1000 [POWERPC] Consolidate do_signal do_signal has exactly the same behaviour on 32bit and 64bit and 32bit compat on 64bit for handling 32bit signals. Consolidate all these into one common function in signal.c. The only odd left over is the try_to_free in the 32bit version that no other architecture has in mainline (only in i386 for some odd SuSE release). We should probably get rid of it in a separate patch. Signed-off-by: Christoph Hellwig Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras commit db277e9a67b9d81b9d6cd74edf0c3e1a0ef2aa4b Author: Christoph Hellwig Date: Mon Jun 4 15:15:51 2007 +1000 [POWERPC] Consolidate restore_sigmask restore_sigmask is exactly the same on 32 and 64bit, so move it to common code. Also move _BLOCKABLE to signal.h to avoid defining it multiple times. Signed-off-by: Christoph Hellwig Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras commit 69d15f6b352a681f1db9bc70219a3e8e9d503dbf Author: Christoph Hellwig Date: Mon Jun 4 15:15:50 2007 +1000 [POWERPC] Consolidate sys_sigaltstack sys_sigaltstack is the same on 32bit and 64 and we can consolidate it to signal.c. The only difference is that the 32bit code uses ints for the unused register paramaters and 64bit unsigned long. I've changed it to unsigned long because it's the same width on 32bit. (I also wonder who came up with this awkward calling convention.. :)) Signed-off-by: Christoph Hellwig Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras commit 22e38f29328296d9d4cc33e46fd32a63e807abaf Author: Benjamin Herrenschmidt Date: Mon Jun 4 15:15:49 2007 +1000 [POWERPC] Make syscall restart code more common This patch moves the code in signal_32.c and signal_64.c for handling syscall restart into a common signal.c file and converge around a single implementation that is based on the 32 bits one, using trap, ccr and r3 rather than the special "result" field for deciding what to do. The "result" field is now pretty much deprecated. We still set it for the sake of whatever might rely on it in userland but we no longer use it's content. This, along with a previous patch that enables ptracers to write to "trap" and "orig_r3" should allow gdb to properly handle syscall restarting. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras commit 791cc501d422be96d6e3098faf6471ba29f4dd33 Author: Benjamin Herrenschmidt Date: Mon Jun 4 15:15:48 2007 +1000 [POWERPC] Always apply DABR changes on context switches This patch removes the #ifdef CONFIG_PPC64 around setting the DABR. The actual setting of the SPR inside of the set_dabr() function is dependent on CONFIG_PPC64 || CONFIG_6xx but you can always provide a ppc_md hook to override that. We should improve support for different HW breakpoints facilities but this is a first step. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras commit 6d110da8c3c62167c54eb5e32bb80916a1a23362 Author: Benjamin Herrenschmidt Date: Mon Jun 4 15:15:47 2007 +1000 [POWERPC] powerpc: ptrace can set DABR on both 32 and 64 bits Allow ptrace to set dabr in the thread structure for both 32 and 64 bits, though only 64 bits actually uses that field, it's actually defined in both. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras commit abd0650541604d6c028bcbf5002e4a68aaf56e90 Author: Benjamin Herrenschmidt Date: Mon Jun 4 15:15:47 2007 +1000 [POWERPC] ptrace shouldn't touch FP exec mode One of the gratuitous difference between 32 and 64-bit ptrace is whether you can whack the MSR:FE0 and FE1 bits from ptrace. This patch forbids it unconditionally. In addition, the 64-bit kernels used to return the exception mode in the MSR on reads, but 32-bit kernels didn't. This patch makes it return those bits on both. Finally, since ptrace-ppc32.h and ptrace-ppc64.h are mostly empty now, and since the previous patch made ptrace32.c no longer need the MSR_DEBUGCHANGE definition, we just remove those 2 files and move back the remaining bits to ptrace.c (they were short lived heh ?). Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras commit 912000e73ee8fcb97831b123c9c3a7274b71cab7 Author: Benjamin Herrenschmidt Date: Mon Jun 4 15:15:46 2007 +1000 [POWERPC] Allow ptrace write to pt_regs trap and orig_r3 This patch allows a ptracer to write to the "trap" and "orig_r3" words of the pt_regs. This, along with a subsequent patch to the signal restart code, should enable gdb to properly handle syscall restarting after executing a separate function (at least when there's no restart block). This patch also removes ptrace32.c code toying directly with the registers and makes it use the ptrace_get/put_reg() accessors for everything so that the logic for checking what is permitted is in only one place. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras commit 1b6610d6fcb8dc23631cf48f09aa02e6649e379d Author: Benjamin Herrenschmidt Date: Mon Jun 4 15:15:45 2007 +1000 [POWERPC] Remove some useless ifdef's in ptrace CHECK_FULL_REGS() exist on both 32 and 64 bits, so there's no need to make it conditional on CONFIG_PPC32. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras commit 865418d8e78b9c11c964157740b2596d6ffe9dfa Author: Benjamin Herrenschmidt Date: Mon Jun 4 15:15:44 2007 +1000 [POWERPC] Uninline common ptrace bits This folds back the ptrace-common.h bits back into ptrace.c and removes that file. The FSL SPE bits from ptrace-ppc32.h are folded back in as well. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras commit e17666ba48f78ff10162d7448e7c92d668d8faf6 Author: Benjamin Herrenschmidt Date: Mon Jun 4 15:15:43 2007 +1000 [POWERPC] ptrace updates & new, better requests The powerpc ptrace interface is dodgy at best. We have defined our "own" versions of GETREGS/SETREGS/GETFPREGS/SETFPREGS that strangely take arguments in reverse order from other archs (in addition to having different request numbers) and have subtle issue, like not accessing all of the registers in their respective categories. This patch moves the implementation of those to a separate function in order to facilitate their deprecation in the future, and provides new ptrace requests that mirror the x86 and sparc ones and use the same numbers: PTRACE_GETREGS : returns an entire pt_regs (the whole thing, not only the 32 GPRs, though that doesn't include the FPRs etc... There's a compat version for 32 bits that returns a 32 bits compatible pt_regs (44 uints) PTRACE_SETREGS : sets an entire pt_regs (the whole thing, not only the 32 GPRs, though that doesn't include the FPRs etc... Some registers cannot be written to and will just be dropped, this is the same as with POKEUSR, that is anything above MQ on 32 bits and CCR on 64 bits. There is a compat version as well. PTRACE_GETFPREGS : returns all the FP registers -including- the FPSCR that is 33 doubles (regardless of 32/64 bits) PTRACE_SETFPREGS : sets all the FP registers -including- the FPSCR that is 33 doubles (regardless of 32/64 bits) And two that only exist on 64 bits kernels: PTRACE_GETREGS64 : Same as PTRACE_GETREGS, except there is no compat function, a 32 bits process will obtain the full 64 bits registers PTRACE_SETREGS64 : Same as PTRACE_SETREGS, except there is no compat function, a 32 bits process will set the full 64 bits registers The two later ones makes things easier to have a 32 bits debugger on a 64 bits program (or on a 32 bits program that uses the full 64 bits of the GPRs, which is possible though has issues that will be fixed in a later patch). Finally, while at it, the patch removes a whole bunch of code duplication between ptrace32.c and ptrace.c, in large part by having the former call into the later for all requests that don't need any special "compat" treatment. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras commit acd89828484db6371202f5d292781ae6f832eda2 Author: Benjamin Herrenschmidt Date: Mon Jun 4 15:15:41 2007 +1000 [POWERPC] ptrace cleanups The powerpc ptrace code has some weirdness, like a ptrace-common.h file that is actually ppc64 only and some of the 32 bits code ifdef'ed inside ptrace.c. There are also separate implementations for things like get/set_vrregs for 32 and 64 bits which is totally unnecessary. This patch cleans that up a bit by having a ptrace-common.h which contains really common code (and makes a lot more code common), and ptrace-ppc32.h and ptrace-ppc64.h files that contain the few remaining different bits. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras commit 0b3d5c48a98f7bd2d38962f5a67b480ac5656fb9 Author: Benjamin Herrenschmidt Date: Mon Jun 4 15:15:39 2007 +1000 [POWERPC] Disable broken PPC_PTRACE_GETFPREGS on 32 bits The handling of PPC_PTRACE_GETFPREGS is broken on 32 bits kernel, it will only return half of the registers. Since that call didn't initially exist for 32 bits kernel (added recently), rather than fixing it, let's just remove it. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras commit cbe709c1683dd54a2ec2981c9e8415cb3176f4e0 Author: Benjamin Herrenschmidt Date: Mon Jun 4 15:15:38 2007 +1000 [POWERPC] spufs: Add a "capabilities" file to spu contexts This adds a "capabilities" file to spu contexts consisting of a list of linefeed separated capability names. The current exposed capabilities are "sched" (the context is scheduleable) and "step" (the context supports single stepping). Signed-off-by: Benjamin Herrenschmidt Acked-by: Jeremy Kerr Signed-off-by: Paul Mackerras commit 05169237b55058a3993fb4804d00b65dfa3e4a0c Author: Benjamin Herrenschmidt Date: Mon Jun 4 15:15:37 2007 +1000 [POWERPC] spufs: Add support for SPU single stepping This patch adds support for SPU single stepping. The single step bit is set in the SPU when the current process is being single-stepped via ptrace. The spu then stops and returns with a specific flag set and the syscall exit code will generate the SIGTRAP. Signed-off-by: Benjamin Herrenschmidt Acked-by: Jeremy Kerr Signed-off-by: Paul Mackerras commit 3d5134ee8341bffc4f539049abb9e90d469b448d Author: Benjamin Herrenschmidt Date: Mon Jun 4 15:15:36 2007 +1000 [POWERPC] Rewrite IO allocation & mapping on powerpc64 This rewrites pretty much from scratch the handling of MMIO and PIO space allocations on powerpc64. The main goals are: - Get rid of imalloc and use more common code where possible - Simplify the current mess so that PIO space is allocated and mapped in a single place for PCI bridges - Handle allocation constraints of PIO for all bridges including hot plugged ones within the 2GB space reserved for IO ports, so that devices on hotplugged busses will now work with drivers that assume IO ports fit in an int. - Cleanup and separate tracking of the ISA space in the reserved low 64K of IO space. No ISA -> Nothing mapped there. I booted a cell blade with IDE on PIO and MMIO and a dual G5 so far, that's it :-) With this patch, all allocations are done using the code in mm/vmalloc.c, though we use the low level __get_vm_area with explicit start/stop constraints in order to manage separate areas for vmalloc/vmap, ioremap, and PCI IOs. This greatly simplifies a lot of things, as you can see in the diffstat of that patch :-) A new pair of functions pcibios_map/unmap_io_space() now replace all of the previous code that used to manipulate PCI IOs space. The allocation is done at mapping time, which is now called from scan_phb's, just before the devices are probed (instead of after, which is by itself a bug fix). The only other caller is the PCI hotplug code for hot adding PCI-PCI bridges (slots). imalloc is gone, as is the "sub-allocation" thing, but I do beleive that hotplug should still work in the sense that the space allocation is always done by the PHB, but if you unmap a child bus of this PHB (which seems to be possible), then the code should properly tear down all the HPTE mappings for that area of the PHB allocated IO space. I now always reserve the first 64K of IO space for the bridge with the ISA bus on it. I have moved the code for tracking ISA in a separate file which should also make it smarter if we ever are capable of hot unplugging or re-plugging an ISA bridge. This should have a side effect on platforms like powermac where VGA IOs will no longer work. This is done on purpose though as they would have worked semi-randomly before. The idea at this point is to isolate drivers that might need to access those and fix them by providing a proper function to obtain an offset to the legacy IOs of a given bus. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras commit c19c03fc749147f565e807fa65f1729066800571 Author: Benjamin Herrenschmidt Date: Mon Jun 4 15:15:35 2007 +1000 [POWERPC] unmap_vm_area becomes unmap_kernel_range for the public This makes unmap_vm_area static and a wrapper around a new exported unmap_kernel_range that takes an explicit range instead of a vm_area struct. This makes it more versatile for code that wants to play with kernel page tables outside of the standard vmalloc area. (One example is some rework of the PowerPC PCI IO space mapping code that depends on that patch and removes some code duplication and horrible abuse of forged struct vm_struct). Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras commit 3c8c90ab8810a8ebb38a5f1dde2595b750d5adff Author: Linas Vepstas Date: Thu May 24 03:28:01 2007 +1000 [POWERPC] Tweak EEH copyright info Twiddle the copyright notices. Per current guidelines, the use of the (C) or (c) in source code is deprecated. Signed-off-by: Linas Vepstas ---- arch/powerpc/platforms/pseries/eeh.c | 6 +++++- arch/powerpc/platforms/pseries/eeh_cache.c | 3 ++- arch/powerpc/platforms/pseries/eeh_driver.c | 6 +++--- 3 files changed, 10 insertions(+), 5 deletions(-) Signed-off-by: Paul Mackerras commit 42253a68a8e794a38ede33566083af8a80948f60 Author: Linas Vepstas Date: Thu May 24 03:23:38 2007 +1000 [POWERPC] Remove dead EEH code Remove some dead code. Signed-off-by: Linas Vepstas ---- arch/powerpc/platforms/pseries/eeh.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) Signed-off-by: Paul Mackerras commit 858955bd572f0ca38b258e45c7dd743b9e44b04e Author: Linas Vepstas Date: Thu May 24 03:20:51 2007 +1000 [POWERPC] Show EEH per-device false positives Track and report the number of times we read an all-1s value (0xff, 0xffff or 0xffffffff) from each device which is valid data, not indicating EEH isolation. Signed-off-by: Linas Vepstas ---- arch/powerpc/platforms/pseries/eeh.c | 5 +++++ arch/powerpc/platforms/pseries/eeh_sysfs.c | 3 +++ include/asm-powerpc/pci-bridge.h | 1 + 3 files changed, 9 insertions(+) Signed-off-by: Paul Mackerras commit e1d04c9769398ae7df8c7ca2681b25f540b719d5 Author: Linas Vepstas Date: Thu May 24 03:16:46 2007 +1000 [POWERPC] Add EEH sysfs blinkenlights Add sysfs blinkenlights for EEH statistics. Shuffle the eeh_add_device_tree() call so that it appears in the correct sequence. Signed-off-by: Linas Vepstas ---- arch/powerpc/platforms/pseries/Makefile | 2 arch/powerpc/platforms/pseries/eeh.c | 4 + arch/powerpc/platforms/pseries/eeh_cache.c | 2 arch/powerpc/platforms/pseries/eeh_sysfs.c | 84 +++++++++++++++++++++++++++++ arch/powerpc/platforms/pseries/pci_dlpar.c | 7 +- include/asm-powerpc/ppc-pci.h | 3 + 6 files changed, 98 insertions(+), 4 deletions(-) Signed-off-by: Paul Mackerras commit c2e221e8b93ea54da85d9b5413a2eff9f4a653f7 Author: Linas Vepstas Date: Wed May 23 04:18:04 2007 +1000 [POWERPC] pseries: asm/pci-bridge.h CONFIG_ minor cleanup Use the correct CONFIG_ option to mark off the EEH bits. Move the EEH bits to the bottom of the struct. The config_space array is used by EEH only; it does not need to be part of the struct for non-pseries machines. Signed-off-by: Linas Vepstas ---- Revised patch, per commments from Michael Ellerman. include/asm-powerpc/pci-bridge.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) Signed-off-by: Paul Mackerras commit 3f1df7a260aded4937e512872f3fbfdb9bc22c82 Author: Jon Tollefson Date: Fri May 18 04:49:22 2007 +1000 [POWERPC] Move common code out of if/else Move common code out of if/else. Signed-off-by: Jon Tollefson ---- hash_native_64.c | 3 +-- 1 files changed, 1 insertion(+), 2 deletions(-) Signed-off-by: Paul Mackerras commit 31fe5bf66a09c36e95b4c04291249b251b52f2d4 Author: Segher Boessenkool Date: Thu May 17 01:12:16 2007 +1000 [POWERPC] Fix VDSO compile warning Maybe the type should have been char[] instead of __u8[] in the first place, but this will do. Signed-off-by: Segher Boessenkool Signed-off-by: Paul Mackerras commit f341973d9a48b0643b619debd8d9ab1e518ebc34 Author: Anton Blanchard Date: Wed May 16 05:59:06 2007 +1000 [POWERPC] Reserve threadinfo flags for perfmon2 Reserve two TIF flags for perfmon2 and shift them into the low 16 bits so we can use single assembly instructions to create constants based off them. Signed-off-by: Anton Blanchard Signed-off-by: Paul Mackerras --- diffstat: arch/powerpc/kernel/ptrace-common.h | 161 ---- arch/powerpc/mm/imalloc.c | 313 -------- arch/powerpc/platforms/apus/Kconfig | 130 --- linux-2.6/Documentation/cachetlb.txt | 2 linux-2.6/arch/powerpc/Kconfig | 256 ------- linux-2.6/arch/powerpc/boot/44x.c | 45 + linux-2.6/arch/powerpc/boot/44x.h | 3 linux-2.6/arch/powerpc/boot/Makefile | 4 linux-2.6/arch/powerpc/boot/cuboot-83xx.c | 13 linux-2.6/arch/powerpc/boot/cuboot-85xx.c | 13 linux-2.6/arch/powerpc/boot/cuboot-ebony.c | 16 linux-2.6/arch/powerpc/boot/cuboot.c | 35 linux-2.6/arch/powerpc/boot/cuboot.h | 14 linux-2.6/arch/powerpc/boot/dcr.h | 37 + linux-2.6/arch/powerpc/boot/dts/ebony.dts | 8 linux-2.6/arch/powerpc/boot/dts/holly.dts | 52 - linux-2.6/arch/powerpc/boot/dts/mpc7448hpc2.dts | 33 linux-2.6/arch/powerpc/boot/ebony.c | 19 linux-2.6/arch/powerpc/boot/of.c | 188 ----- linux-2.6/arch/powerpc/boot/of.h | 15 linux-2.6/arch/powerpc/boot/ofconsole.c | 45 + linux-2.6/arch/powerpc/boot/oflib.c | 172 ++++ linux-2.6/arch/powerpc/configs/holly_defconfig | 3 linux-2.6/arch/powerpc/kernel/Makefile | 5 linux-2.6/arch/powerpc/kernel/head_32.S | 122 --- linux-2.6/arch/powerpc/kernel/irq.c | 1 linux-2.6/arch/powerpc/kernel/isa-bridge.c | 271 +++++++ linux-2.6/arch/powerpc/kernel/misc_32.S | 10 linux-2.6/arch/powerpc/kernel/of_platform.c | 8 linux-2.6/arch/powerpc/kernel/pci_64.c | 356 +++------- linux-2.6/arch/powerpc/kernel/process.c | 14 linux-2.6/arch/powerpc/kernel/prom_init.c | 4 linux-2.6/arch/powerpc/kernel/ptrace.c | 325 ++++++--- linux-2.6/arch/powerpc/kernel/ptrace32.c | 239 ++---- linux-2.6/arch/powerpc/kernel/rtas_pci.c | 7 linux-2.6/arch/powerpc/kernel/setup_32.c | 12 linux-2.6/arch/powerpc/kernel/signal.c | 180 +++++ linux-2.6/arch/powerpc/kernel/signal.h | 55 + linux-2.6/arch/powerpc/kernel/signal_32.c | 191 ----- linux-2.6/arch/powerpc/kernel/signal_64.c | 182 ----- linux-2.6/arch/powerpc/kernel/vdso.c | 2 linux-2.6/arch/powerpc/mm/44x_mmu.c | 1 linux-2.6/arch/powerpc/mm/4xx_mmu.c | 1 linux-2.6/arch/powerpc/mm/Makefile | 3 linux-2.6/arch/powerpc/mm/fault.c | 2 linux-2.6/arch/powerpc/mm/fsl_booke_mmu.c | 1 linux-2.6/arch/powerpc/mm/hash_native_64.c | 25 linux-2.6/arch/powerpc/mm/hash_utils_64.c | 2 linux-2.6/arch/powerpc/mm/init_32.c | 1 linux-2.6/arch/powerpc/mm/init_64.c | 1 linux-2.6/arch/powerpc/mm/mem.c | 1 linux-2.6/arch/powerpc/mm/mmu_context_32.c | 1 linux-2.6/arch/powerpc/mm/mmu_decl.h | 17 linux-2.6/arch/powerpc/mm/pgtable_32.c | 123 --- linux-2.6/arch/powerpc/mm/pgtable_64.c | 206 +---- linux-2.6/arch/powerpc/mm/ppc_mmu_32.c | 7 linux-2.6/arch/powerpc/mm/tlb_32.c | 1 linux-2.6/arch/powerpc/mm/tlb_64.c | 57 + linux-2.6/arch/powerpc/platforms/Kconfig | 7 linux-2.6/arch/powerpc/platforms/Kconfig.cputype | 252 +++++++ linux-2.6/arch/powerpc/platforms/cell/io-workarounds.c | 2 linux-2.6/arch/powerpc/platforms/cell/spufs/file.c | 27 linux-2.6/arch/powerpc/platforms/cell/spufs/run.c | 12 linux-2.6/arch/powerpc/platforms/iseries/call_hpt.h | 9 linux-2.6/arch/powerpc/platforms/iseries/htab.c | 8 linux-2.6/arch/powerpc/platforms/iseries/pci.c | 5 linux-2.6/arch/powerpc/platforms/maple/pci.c | 35 linux-2.6/arch/powerpc/platforms/pasemi/pci.c | 20 linux-2.6/arch/powerpc/platforms/powermac/pci.c | 32 linux-2.6/arch/powerpc/platforms/ps3/htab.c | 14 linux-2.6/arch/powerpc/platforms/pseries/Makefile | 2 linux-2.6/arch/powerpc/platforms/pseries/eeh.c | 19 linux-2.6/arch/powerpc/platforms/pseries/eeh_cache.c | 5 linux-2.6/arch/powerpc/platforms/pseries/eeh_driver.c | 6 linux-2.6/arch/powerpc/platforms/pseries/eeh_sysfs.c | 87 ++ linux-2.6/arch/powerpc/platforms/pseries/pci_dlpar.c | 9 linux-2.6/arch/powerpc/platforms/pseries/pseries.h | 2 linux-2.6/arch/powerpc/platforms/pseries/setup.c | 2 linux-2.6/arch/powerpc/sysdev/tsi108_dev.c | 33 linux-2.6/arch/ppc/kernel/misc.S | 8 linux-2.6/arch/ppc/kernel/setup.c | 2 linux-2.6/drivers/pci/hotplug/rpadlpar_core.c | 6 linux-2.6/include/asm-powerpc/cputable.h | 95 +- linux-2.6/include/asm-powerpc/floppy.h | 6 linux-2.6/include/asm-powerpc/io.h | 26 linux-2.6/include/asm-powerpc/lppaca.h | 2 linux-2.6/include/asm-powerpc/mmu-hash32.h | 91 ++ linux-2.6/include/asm-powerpc/mmu-hash64.h | 6 linux-2.6/include/asm-powerpc/mmu.h | 3 linux-2.6/include/asm-powerpc/pci-bridge.h | 23 linux-2.6/include/asm-powerpc/pci.h | 4 linux-2.6/include/asm-powerpc/pgtable-ppc32.h | 50 - linux-2.6/include/asm-powerpc/pgtable-ppc64.h | 52 - linux-2.6/include/asm-powerpc/pgtable.h | 28 linux-2.6/include/asm-powerpc/ppc-pci.h | 9 linux-2.6/include/asm-powerpc/ptrace.h | 22 linux-2.6/include/asm-powerpc/syscalls.h | 7 linux-2.6/include/asm-powerpc/thread_info.h | 12 linux-2.6/include/asm-powerpc/tlbflush.h | 5 linux-2.6/include/linux/vmalloc.h | 3 linux-2.6/mm/vmalloc.c | 13 101 files changed, 2299 insertions(+), 2773 deletions(-) ====== spufs.git.patch ====== commit d1b37dc608d76d8c2480d506a0034a3d840ea6d2 Merge: 11bd513... 97c2363... Author: Arnd Bergmann Date: Sat Jun 23 11:29:47 2007 +0200 Merge branches 'powerpc+origin' and 'spufs' into spufs-merge commit 11bd5132c185f9ede02111c1ab6a6cda97f0347a Merge: 29926f8... 9c7e907... Author: Arnd Bergmann Date: Fri Jun 22 15:39:22 2007 +0200 Merge branches 'powerpc+origin' and 'spufs' into spufs-merge commit 29926f83fe5694afb7ce19e48815dd24ec181c65 Merge: ca223a2... cd25352... Author: Arnd Bergmann Date: Thu Jun 21 02:32:31 2007 +0200 Merge branches 'powerpc+origin' and 'spufs' into spufs-merge commit ca223a26a0a057ff27b64a4bdd549a128b49f1b6 Merge: 2895de4... d59a251... Author: Arnd Bergmann Date: Thu Jun 21 01:52:18 2007 +0200 Merge branches 'powerpc+origin' and 'spufs' into spufs-merge commit 2895de4bd69bbb91ffacc6323f6a3285c2f604eb Merge: 5b6ee6d... 0dcc8e8... Author: Arnd Bergmann Date: Wed Jun 20 17:11:46 2007 +0200 Merge branches 'powerpc+origin' and 'spufs' into spufs-merge commit 5b6ee6da98e114e3daea030bdc1cbca4ce805e0d Merge: d4301e4... 3cec3a4... Author: Arnd Bergmann Date: Tue Jun 19 18:58:06 2007 +0200 Merge branches 'powerpc+origin' and 'spufs' into spufs-merge commit d4301e48317e542cdfa415b080e3c839bcdb0e8f Merge: 6b87045... d5b59a3... Author: Arnd Bergmann Date: Tue Jun 19 15:57:35 2007 +0200 Merge branches 'powerpc+origin' and 'spufs' into spufs-merge commit d5b59a39557007af92cbcb0c53e310deef16a1fe Author: Jeremy Kerr Date: Tue Jun 19 10:43:01 2007 +1000 Revert "spufs: allow coredumps to include nosched contexts" This reverts commit 3ea083b358542fa8e227623b2cb4179b7a72e7a4. This patch conflicts with 'spusched: catch nosched contexts in spu_deactivate', as we need to deactivate contexts before they can be coredumped. Signed-off-by: Jeremy Kerr commit 6b8704506298728124341c697b5dab4155686dee Merge: a6187e8... 0a63d3c... Author: Arnd Bergmann Date: Tue Jun 19 02:15:13 2007 +0200 Merge branches 'powerpc+origin' and 'spufs' into spufs-merge commit a6187e86cbd1c33a1baf102ce6f2afca871af592 Merge: d082b2a... 19b4640... Author: Arnd Bergmann Date: Mon Jun 18 18:03:33 2007 +0200 Merge branches 'powerpc+origin' and 'spufs' into spufs-merge commit 19b464022b8d0513efb3a0eb407b5c40d1bdc0a4 Author: Jeremy Kerr Date: Mon Jun 18 18:26:59 2007 +1000 spufs: Remove spufs_dir_inode_operations spufs_dir_inode_operations is exactly the same as simple_dir_inode_operations. Use that instead. Signed-off-by: Jeremy Kerr Signed-off-by: Arnd Bergmann commit b3e2bd6a1afd6352e6bde841e784c7b8b00d3151 Author: Christoph Hellwig Date: Mon Jun 18 18:26:47 2007 +1000 spusched: no preemption for nosched contexts And last but not least we need to make sure the scheduler tick never preempts a nosched context. Signed-off-by: Christoph Hellwig Signed-off-by: Arnd Bergmann Signed-off-by: Jeremy Kerr commit 313ef343e53d304391337b44bc1c62ea71f3b478 Author: Christoph Hellwig Date: Mon Jun 18 18:26:33 2007 +1000 spusched: catch nosched contexts in spu_deactivate spu_deactivate should never be called for nosched contets. Put in a check so we can print a stacktrace and exit early in case it happes errornously. Signed-off-by: Christoph Hellwig Signed-off-by: Arnd Bergmann Signed-off-by: Jeremy Kerr commit 54b51b6689ddefa8ea0ec4b3848587bb57a9cd71 Author: Christoph Hellwig Date: Mon Jun 18 18:26:17 2007 +1000 spusched: fix cpu/node binding Add a cpus_allowed allowed filed to struct spu_context so that we always use the cpu mask of the owning thread instead of the one happening to call into the scheduler. Also use this information in grab_runnable_context to avoid spurious wakeups. Signed-off-by: Christoph Hellwig Signed-off-by: Arnd Bergmann Signed-off-by: Jeremy Kerr commit 60cfd45c3fdcb81f1211967da0c92e91089a0df7 Author: Christoph Hellwig Date: Mon Jun 18 18:26:06 2007 +1000 spusched: update scheduling paramters on every spu_run Update scheduling information on every spu_run to allow for setting threads to realtime priority just before running them. This requires some slightly ugly code in spufs_run_spu because we can just update the information unlocked if the spu is not runnable, but we need to acquire the active_mutex when it is runnable to protect against find_victim. This locking scheme requires opencoding spu_acquire_runnable in spufs_run_spu which actually is a nice cleanup all by itself. Signed-off-by: Christoph Hellwig Signed-off-by: Arnd Bergmann Signed-off-by: Jeremy Kerr commit a5c1a2eb6275d6b109182732b7fea2bbd34e1f47 Author: Jeremy Kerr Date: Mon Jun 18 18:25:55 2007 +1000 spusched: Print out scheduling tunables with DEBUG Print out a few scheduler tuning parameters when we've compiled with DEBUG defined. Signed-off-by: Jeremy Kerr commit 6b161ecc6451d9765c3dd2eb07b6169e13f6a296 Author: Jeremy Kerr Date: Mon Jun 18 18:25:44 2007 +1000 spusched: Fix timeslice calculations The current timeslice code mixes 'jiffies' up with 'spesched ticks'. This change correctly defines the number of time slices each SPE contexts is given, and clarifies the comment. This brings the default timeslice for SPE contexts into a reasonable range. Signed-off-by: Jeremy Kerr commit 7bed139b5c6079e46e32ec872b25f11488b012e3 Author: Christoph Hellwig Date: Mon Jun 18 18:25:28 2007 +1000 spusched: dynamic timeslicing for SCHED_OTHER Enable preemptive scheduling for non-RT contexts. We use the same algorithms as the CPU scheduler to calculate the time slice length, and for now we also use the same timeslice length as the CPU scheduler. This might be not enough for good performance and can be changed after some benchmarking. Note that currently we do not boost the priority for contexts waiting on the runqueue for a long time, so contexts with a higher nice value could starve ones with less priority. This could easily be fixed once the rework of the spu lists that Luke and I discussed is done. Signed-off-by: Christoph Hellwig Signed-off-by: Arnd Bergmann Signed-off-by: Jeremy Kerr commit 6deac36fa8f38abd8e7339678b62906dcf31a99c Author: Christoph Hellwig Date: Mon Jun 18 18:24:22 2007 +1000 spusched: switch from workqueues to kthread + timer tick Get rid of the scheduler workqueues that complicated things a lot to a dedicated spu scheduler thread that gets woken by a traditional scheduler tick. By default this scheduler tick runs a HZ * 10, aka one spu scheduler tick for every 10 cpu ticks. Currently the tick is not disabled when we have less context than available spus, but I will implement this later. Signed-off-by: Christoph Hellwig Signed-off-by: Arnd Bergmann Signed-off-by: Jeremy Kerr commit 0e82f6418a99d98db72638a30344ea54de247540 Author: Sebastian Siewior Date: Wed Jun 13 01:14:56 2007 +1000 spufs: Add bit definition Add a bit define from book, and replace one hex number with a symbol, for clarity. Signed-off-by: Sebastian Siewior Signed-off-by: Jeremy Kerr commit 540b92e4e330fd3017cf9d5efe8eff3494b2588f Author: Sebastian Siewior Date: Fri Jun 8 20:04:13 2007 +1000 spufs: fix building spufs/spu_save_dump.h Currently it fails with gcc from sdk 2.1 because of a spec change [1]. Maybe we should start using the definitions from spu_mfcio.h. [1] http://gcc.gnu.org/ml/gcc-patches/2006-11/msg01598.html Signed-off-by: Sebastian Siewior Signed-off-by: Jeremy Kerr commit 3ea083b358542fa8e227623b2cb4179b7a72e7a4 Author: Christoph Hellwig Date: Mon Jun 4 20:09:26 2007 +1000 spufs: allow coredumps to include nosched contexts We only need to prevent coredumps of isolated contexts, no need to exclude purely nosched contexts. Signed-off-by: Christoph Hellwig Signed-off-by: Jeremy Kerr --- diffstat: arch/powerpc/platforms/cell/spufs/context.c | 6 arch/powerpc/platforms/cell/spufs/inode.c | 10 arch/powerpc/platforms/cell/spufs/run.c | 28 arch/powerpc/platforms/cell/spufs/sched.c | 282 +++++++--- arch/powerpc/platforms/cell/spufs/spu_save.c | 2 arch/powerpc/platforms/cell/spufs/spufs.h | 16 include/asm-powerpc/spu.h | 1 7 files changed, 237 insertions(+), 108 deletions(-) ====== re-cell-oprofile-spu-profiling-updated-patch-4.diff ====== Subject: Add support to OProfile for profiling Cell BE SPUs From: Maynard Johnson This patch updates the existing arch/powerpc/oprofile/op_model_cell.c to add in the SPU profiling capabilities. In addition, a 'cell' subdirectory was added to arch/powerpc/oprofile to hold Cell-specific SPU profiling code. Signed-off-by: Carl Love Signed-off-by: Maynard Johnson Signed-off-by: Arnd Bergmann --- diffstat: arch/powerpc/configs/cell_defconfig | 3 arch/powerpc/kernel/time.c | 1 arch/powerpc/oprofile/Kconfig | 7 arch/powerpc/oprofile/Makefile | 4 arch/powerpc/oprofile/cell/pr_util.h | 90 + arch/powerpc/oprofile/cell/spu_profiler.c | 220 +++ arch/powerpc/oprofile/cell/spu_task_sync.c | 464 +++++++ arch/powerpc/oprofile/cell/vma_map.c | 279 ++++ arch/powerpc/oprofile/common.c | 51 arch/powerpc/oprofile/op_model_cell.c | 603 ++++++++-- arch/powerpc/oprofile/op_model_power4.c | 11 arch/powerpc/oprofile/op_model_rs64.c | 10 arch/powerpc/platforms/cell/spufs/context.c | 20 arch/powerpc/platforms/cell/spufs/sched.c | 4 arch/powerpc/platforms/cell/spufs/spufs.h | 4 drivers/oprofile/buffer_sync.c | 3 drivers/oprofile/event_buffer.h | 20 drivers/oprofile/oprof.c | 26 include/asm-powerpc/oprofile_impl.h | 10 include/asm-powerpc/spu.h | 15 include/linux/dcookies.h | 1 include/linux/elf-em.h | 3 include/linux/oprofile.h | 35 23 files changed, 1760 insertions(+), 124 deletions(-) ====== re-add-support-to-oprofile-for-profiling-cell-be-spus-update-2.diff ====== Subject: Enable SPU switch notification to detect currently active SPU tasks. From: Maynard Johnson This patch adds to the capability of spu_switch_event_register so that the caller is also notified of currently active SPU tasks. It also exports spu_switch_event_register and spu_switch_event_unregister. Signed-off-by: Maynard Johnson Signed-off-by: Carl Love Signed-off-by: Arnd Bergmann --- diffstat: run.c | 16 ++++++++++++++-- sched.c | 30 ++++++++++++++++++++++++++++-- spufs.h | 6 ++++++ 3 files changed, 48 insertions(+), 4 deletions(-) ====== oprofile-fix-parameter-types-in-function-defs.diff ====== Subject: OProfile: fix parameter types in function defs From: Bob Nelson A 64-bit unsigned long parameter is being demoted to 32-bit unsigned int as it is being passed along by several functions and eventually being promoted back to unsigned long in the CBE module spu_task_sync.c. Signed-off-by: Bob Nelson Signed-off-by: Arnd Bergmann --- diffstat: spu_task_sync.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) ====== oprofile-fix-call-to-kzalloc.diff ====== Subject: OProfile fix call to kzalloc From: Bob Nelson Fix OProfile kernel module to check pointer returned from kzalloc for success/failure. Eliminated unnecessary cast. Added some better error handling and cleanup in the related area of the code. Signed-off-by: Bob Nelson Signed-off-by: Arnd Bergmann --- diffstat: cell/pr_util.h | 2 +- cell/spu_profiler.c | 14 +++++++++----- op_model_cell.c | 16 +++++++++++----- 3 files changed, 21 insertions(+), 11 deletions(-) ====== cell-be_info-2.diff ====== Subject: cell: add per BE structure with info about its SPUs From: Andre Detsch Addition of a spufs-global "cbe_info" array. Each entry contains information about one Cell/B.E. node, namelly: * list of spus (both free and busy spus are in this list); * list of free spus (replacing the static spu_list from spu_base.c) * number of spus; * number of reserved (non scheduleable) spus. SPE affinity implementation actually requires only access to one spu per BE node (since it implements its own pointer to walk through the other spus of the ring) and the number of scheduleable spus (n_spus - non_sched_spus) However having this more general structure can be useful for other functionalities, concentrating per-cbe statistics / data. Signed-off-by: Andre Detsch Signed-off-by: Arnd Bergmann --- --- diffstat: arch/powerpc/platforms/cell/spu_base.c | 21 ++++++---- arch/powerpc/platforms/cell/spufs/sched.c | 4 + include/asm-powerpc/spu.h | 10 ++++ 3 files changed, 28 insertions(+), 7 deletions(-) ====== cell-spu_indexing-2.diff ====== Subject: cell: add vicinity information on spus From: Andre Detsch This patch adds affinity data to each spu instance. A doubly linked list is created, meant to connect the spus in the physical order they are placed in the BE. SPUs near to memory should be marked as having memory affinity. Adjustments of the fields acording to FW properties is done in separate patches, one for CPBW, one for Malta (patch for Malta under testing). Signed-off-by: Andre Detsch Signed-off-by: Arnd Bergmann --- --- diffstat: arch/powerpc/platforms/cell/spu_base.c | 2 ++ include/asm-powerpc/spu.h | 3 +++ 2 files changed, 5 insertions(+) ====== cell-spu_indexing_QS20-2.diff ====== Subject: cell: add hardcoded spu vicinity information for QS20 From: Andre Detsch This patch allows the use of spu affinity on QS20, whose original FW does not provide affinity information. This is done through two hardcoded arrays, and by reading the reg property from each spu. Signed-off-by: Andre Detsch Signed-off-by: Arnd Bergmann --- --- diffstat: spu_base.c | 55 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) ====== spufs-affinity_create-4.diff ====== Subject: spufs: extension of spu_create to support affinity definition From: Andre Detsch This patch adds support for additional flags at spu_create, which relate to the establishment of affinity between contexts and contexts to memory. A fourth, optional, parameter is supported. This parameter represent a affinity neighbor of the context being created, and is used when defining SPU-SPU affinity. Affinity is represented as a doubly linked list of spu_contexts. Signed-off-by: Andre Detsch Signed-off-by: Arnd Bergmann --- --- diffstat: arch/powerpc/platforms/cell/spu_syscalls.c | 17 + arch/powerpc/platforms/cell/spufs/context.c | 1 arch/powerpc/platforms/cell/spufs/gang.c | 4 arch/powerpc/platforms/cell/spufs/inode.c | 132 +++++++++- arch/powerpc/platforms/cell/spufs/spufs.h | 16 + arch/powerpc/platforms/cell/spufs/syscalls.c | 32 ++ include/asm-powerpc/spu.h | 8 include/linux/syscalls.h | 2 8 files changed, 195 insertions(+), 17 deletions(-) ====== spufs-affinity_placement-4.diff ====== Subject: cell: add placement computation for scheduling of affinity contexts From: Andre Detsch This patch provides the spu affinity placement logic for the spufs scheduler. Each time a gang is going to be scheduled, the placement of a reference context is defined. The placement of all other contexts with affinity from the gang is defined based on this reference context location and on a precomputed displacement offset. Signed-off-by: Andre Detsch Signed-off-by: Arnd Bergmann --- --- diffstat: gang.c | 4 - sched.c | 142 ++++++++++++++++++++++++++++++++++++++++++++ spufs.h | 6 + 3 files changed, 151 insertions(+), 1 deletion(-) ====== spufs-affinity_schedulling-2.diff ====== Subject: spufs: integration of SPE affinity with the scheduller From: Andre Detsch This patch makes the scheduller honor affinity information for each context being scheduled. If the context has no affinity information, behaviour is unchanged. If there are affinity information, context is schedulled to be run on the exact spu recommended by the affinity placement algorithm. Signed-off-by: Andre Detsch Signed-off-by: Arnd Bergmann --- --- diffstat: spu_base.c | 19 +++++++++++++++++++ spufs/sched.c | 4 ++++ 2 files changed, 23 insertions(+) ====== cell-spu_indexing_FW_vicinity-1.diff ====== Subject: cell: indexing of SPUs based on firmware vicinity properties From: Andre Detsch This patch links spus according to their physical position using information provided by the firmware through a special vicinity device-tree property. This property is present in current version of Malta firmware. Example of vicinity properties for a node in Malta: Node: Vicinity property contains phandles of: spe@0 [ spe@100000 , mic-tm@50a000 ] spe@100000 [ spe@0 , spe@200000 ] spe@200000 [ spe@100000 , spe@300000 ] spe@300000 [ spe@200000 , bif0@512000 ] spe@80000 [ spe@180000 , mic-tm@50a000 ] spe@180000 [ spe@80000 , spe@280000 ] spe@280000 [ spe@180000 , spe@380000 ] spe@380000 [ spe@280000 , bif0@512000 ] Only spe@* have a vicinity property (e.g., bif0@512000 and mic-tm@50a000 do not have it). Signed-off-by: Andre Detsch Signed-off-by: Arnd Bergmann --- diffstat: spu_base.c | 90 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 89 insertions(+), 1 deletion(-) ====== spu_base-locking-cleanup.diff ====== Subject: spu_base: locking cleanup From: Christoph Hellwig Sort out the locking mess in spu_base and document the current rules. As an added benefit spu_alloc* and spu_free don't block anymore. Signed-off-by: Christoph Hellwig Signed-off-by: Arnd Bergmann --- diffstat: spu_base.c | 84 ++++++++++++++++++++++++----------------- 1 file changed, 51 insertions(+), 33 deletions(-) ====== pmi-remove-multiple-device-support-2.diff ====== Subject: cell: pmi remove support for mutiple devices. From: Christian Krafft The pmi driver got simplified by removing support for multiple devices. As there is no more than one pmi device per maschine, there is no need to specify the device for listening and sending messages. This way the caller (cbe_cpufreq) doesn't need to scan the device tree. When registering the handler on a board without a pmi interface, pmi.c will just return -ENODEV. Signed-off-by: Christian Krafft Signed-off-by: Arnd Bergmann --- diffstat: arch/powerpc/platforms/cell/cbe_cpufreq.c | 39 +++---- arch/powerpc/sysdev/pmi.c | 51 ++++------ include/asm-powerpc/pmi.h | 8 - 3 files changed, 44 insertions(+), 54 deletions(-) ====== cbe_cpufreq-fix-latency-measurement.diff ====== Subject: cell: cbe_cpufreq fix latency measurement From: Christian Krafft This patch fixes the debug code that calculates the transition time when changing the slow modes on a Cell BE cpu. Signed-off-by: Christian Krafft Signed-off-by: Arnd Bergmann --- diffstat: cbe_cpufreq.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) ====== cbe_cpufreq-fix-init.diff ====== Subject: cbe_cpufreq: fix initialization From: Christian Krafft This patch fixes the initialization of the cbe_cpufreq driver. The code that initializes the PMI related functions was called per cpu: * registering cpufreq notifier block * registering a pmi handler This ends in a bug that the notifier block gets called in an endless loop. The initialization code is being put to the module init code path by this patch. This way it only gets called once. Signed-off-by: Christian Krafft Signed-off-by: Arnd Bergmann --- diffstat: cbe_cpufreq.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) ====== cbe_cpufreq-minor-cleanups.diff ====== Subject: cbe_cpufreq: fix minor issues From: Christian Krafft Minor issues have been fixed: * added a missing call to of_node_put() * signedness of a function parameter * added some line breaks * changed global pmi_frequency_limit to a per node pmi_slow_mode_limit array Signed-off-by: Christian Krafft Signed-off-by: Arnd Bergmann --- diffstat: cbe_cpufreq.c | 58 ++++++++++++++++++++++++++------------ 1 file changed, 40 insertions(+), 18 deletions(-) ====== cbe_cpufreq-split-code-2.diff ====== Subject: cbe_cpufreq: reorganize code From: Christian Krafft This patch reorganizes the code of the driver into three files. Two cbe_cpufreq_pmi.c and cbe_cpufreq_pervasive.c care about hardware. cbe_cpufreq.c contains the logic. There is no changed behaviour, except that the PMI related function is now located in a seperate module cbe_cpufreq_pmi. This module will be required by cbe_cpufreq, if CONFIG_CBE_CPUFREQ_PMI has been set. Signed-off-by: Christian Krafft Signed-off-by: Arnd Bergmann --- diffstat: Kconfig | 10 + Makefile | 4 cbe_cpufreq.c | 196 +--------------------------- cbe_cpufreq.h | 24 +++ cbe_cpufreq_pervasive.c | 118 ++++++++++++++++ cbe_cpufreq_pmi.c | 148 +++++++++++++++++++++ 6 files changed, 312 insertions(+), 188 deletions(-) ====== sysfs-fix-warning-2.diff ====== Subject: powerpc: sysfs fix compiler warning From: Christian Krafft This patch fixes the following compiler warning: arch/powerpc/kernel/sysfs.c:385: warning: ignoring return value of `sysfs_create_group', Signed-off-by: Christian Krafft Signed-off-by: Arnd Bergmann --- diffstat: sysfs.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) ====== axon-ram-6.diff ====== Subject: cell: updated driver for DDR2 memory on AXON From: Maxim Shchetynin Signed-off-by: Maxim Shchetynin Signed-off-by: Arnd Bergmann --- diffstat: platforms/Kconfig | 10 sysdev/Makefile | 1 sysdev/axonram.c | 385 ++++++++++++++++++++++++++++++++++ 3 files changed, 396 insertions(+) ====== cell-spus-info-kexec-crash-1.diff ====== Subject: cell: saving spus information for kexec crash From: Andre Detsch This patch adds support for investigating spus information after a kernel crash event, through kdump vmcore file. Implementation is based on xmon code, but the new functionality was kept independent from xmon. Signed-off-by: Lucio Jose Herculano Correia Signed-off-by: Andre Detsch Signed-off-by: Arnd Bergmann --- diffstat: arch/powerpc/kernel/crash.c | 67 +++++++++++++ arch/powerpc/platforms/cell/spu_base.c | 3 include/asm-powerpc/spu.h | 4 3 files changed, 74 insertions(+) ====== spufs-tid-file.diff ====== Subject: adds tid file to spufs From: Christoph Hellwig The new tid file contains the ID of the thread currently running the context, if any. This is used so that the new spu-top and spu-ps tools can find the thread in /proc. Signed-off-by: Christoph Hellwig Signed-off-by: Arnd Bergmann --- --- diffstat: file.c | 22 ++++++++++++++++++++++ sched.c | 7 +++++++ spufs.h | 3 +++ 3 files changed, 32 insertions(+) ====== axon-msi-support-01.diff ====== Subject: Axon MSI infrastructure. From: Michael Ellerman Signed-off-by: Michael Ellerman Signed-off-by: Arnd Bergmann --- arch/powerpc/kernel/irq.c | 56 +++++++++++++++++++++++++++++++++++-------- include/asm-powerpc/irq.h | 9 +++++++ include/asm-powerpc/prom.h | 3 ++ 3 files changed, 57 insertions(+), 11 deletions(-) --- diffstat: arch/powerpc/kernel/irq.c | 56 ++++++++++++++++++++----- include/asm-powerpc/irq.h | 9 ++++ include/asm-powerpc/prom.h | 3 + 3 files changed, 57 insertions(+), 11 deletions(-) ====== axon-msi-01.diff ====== Subject: Add support for MSI on Axon-based Cell systems From: Michael Ellerman This patch adds support for the setup and decoding of MSIs on Axon-based Cell systems, using the MSIC mechanism. This involves setting up an area of BE memory which the Axon then uses as a FIFO for MSI messages. When one or more MSIs are decoded by the MSIC we receive an interrupt on the MPIC, and the MSI messages are written into the FIFO. At the moment we use a 64KB FIFO, one per MSIC/BE. Signed-off-by: Michael Ellerman Signed-off-by: Arnd Bergmann --- arch/powerpc/platforms/cell/Makefile | 2 + arch/powerpc/platforms/cell/axon_msi.c | 445 ++++++++++++++++++++++++++++++++ 2 files changed, 447 insertions(+), 0 deletions(-) --- diffstat: Makefile | 2 axon_msi.c | 445 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 447 insertions(+) ====== spu-loadavg.diff ====== Subject: spufs: implement /proc/spu_loadavg From: Christoph Hellwig Provide load averange information for spu context. The format is identical to /proc/loadavg, which is also where a lot of code and concepts is borrowed from. Signed-off-by: Christoph Hellwig Signed-off-by: Arnd Bergmann --- diffstat: context.c | 7 ++ sched.c | 127 +++++++++++++++++++++++++++++++++++++++--- spufs.h | 1 3 files changed, 127 insertions(+), 8 deletions(-) ====== spufs-stats-file.diff ====== Subject: add stat file to spufs From: Christoph Hellwig Export per-context statistics in spufs. Signed-off-by: Christoph Hellwig Signed-off-by: Arnd Bergmann --- --- diffstat: arch/powerpc/platforms/cell/spu_base.c | 3 arch/powerpc/platforms/cell/spufs/context.c | 2 arch/powerpc/platforms/cell/spufs/fault.c | 19 ++ arch/powerpc/platforms/cell/spufs/file.c | 79 ++++++++++ arch/powerpc/platforms/cell/spufs/run.c | 4 arch/powerpc/platforms/cell/spufs/sched.c | 19 ++ arch/powerpc/platforms/cell/spufs/spufs.h | 51 ++++++ include/asm-powerpc/spu.h | 6 8 files changed, 178 insertions(+), 5 deletions(-) ====== spu-stats-in-sysfs.diff ====== Subject: add spu stats in sysfs From: Christoph Hellwig Export spu statistics in sysfs. Signed-off-by: Christoph Hellwig Signed-off-by: Arnd Bergmann --- --- diffstat: arch/powerpc/platforms/cell/spu_base.c | 44 ++++++++++ arch/powerpc/platforms/cell/spufs/fault.c | 10 ++ arch/powerpc/platforms/cell/spufs/run.c | 5 - arch/powerpc/platforms/cell/spufs/sched.c | 10 ++ arch/powerpc/platforms/cell/spufs/spufs.h | 13 ++ include/asm-powerpc/spu.h | 17 +++ 6 files changed, 97 insertions(+), 2 deletions(-) ====== cell-defconfig.diff ====== Subject: Update cell_defconfig From: Arnd Bergmann Signed-off-by: Arnd Bergmann --- --- diffstat: cell_defconfig | 325 ++++++++++++++++--------------------- 1 file changed, 149 insertions(+), 176 deletions(-) ====== axon-ram-fix.diff ====== Subject: axonram fixes From: Arnd Bergmann Make sure we always iounmap the memory area, both in the error path and at module unload. Extracted from Maxim's latest version of the full patch. Signed-off-by: Arnd Bergmann --- diffstat: axonram.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) ====== spusched-optional-tick.diff ====== Subject: spusched: disable tick when not needed From: Christoph Hellwig Only enable the scheduler tick if we have any context waiting to be scheduled. Signed-off-by: Christoph Hellwig Signed-off-by: Arnd Bergmann --- diffstat: sched.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) ====== spusched-fix-runqueue-corruption.diff ====== Subject: spusched: fix runqueue corruption From: Christoph Hellwig spu_activate can be called from multiple threads at the same time on behalf of the same spu context. We need to make sure to only add it once to avoid runqueue corruption. Signed-off-by: Christoph Hellwig Signed-off-by: Arnd Bergmann --- diffstat: sched.c | 37 ++++++++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 9 deletions(-) ====== spufs-fix-lost-events-in-poll-epoll-on-mfc.diff ====== Subject: spufs: Fix lost events in poll/epoll on mfc From: Kazunori Asayama When waiting for I/O events on mfc in an SPU context by using poll/epoll syscalls, some of the events can be lost because of wrong order of poll_wait and MFC status checks in the spufs_mfc_poll function and non-atomic update of tagwait. Here is a patch to fix the problem. Signed-off-by: Kazunori Asayama Signed-off-by: Arnd Bergmann --- arch/powerpc/platforms/cell/spufs/file.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) --- diffstat: file.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) ====== spufs-save-dma_tagstatus_r-in-csa.diff ====== Subject: spufs: Save dma_tagstatus_R in CSA From: Kazunori Asayama The function backing_ops->read_mfc_tagstatus() doesn't return a correct value because the dma_tagstatus_R register isn't saved in CSA. This patch fix the problem. Signed-off-by: Kazunori Asayama Signed-off-by: Arnd Bergmann --- arch/powerpc/platforms/cell/spufs/backing_ops.c | 6 ++++++ arch/powerpc/platforms/cell/spufs/switch.c | 14 ++++++++++++++ 2 files changed, 20 insertions(+) --- diffstat: backing_ops.c | 6 ++++++ switch.c | 14 ++++++++++++++ 2 files changed, 20 insertions(+)