aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc (follow)
AgeCommit message (Collapse)AuthorFilesLines
2007-11-08[POWERPC] Fix si_addr value on low level hash failuresBenjamin Herrenschmidt1-1/+1
If the low level MMU hash table insertion returns an error (which can happen in some rare circumstances when the hypervisor refuses the insertion of a PTE, typically if you try to access junk via /dev/mem), the generated signal had an incorrect si_addr value due to a bug in the assembly, which was loading it as a 32 bits quantity instead of a 64 bits quantity. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-11-08[POWERPC] Refresh ppc64_defconfig and enable pasemi-related optionsOlof Johansson1-66/+181
Refresh ppc64_defconfig, add PPC_PASEMI and various options that the common boards there need: * Chip drivers (iommu, ethernet, IDE, CF, EDAC, MDIO/PHY) * PCMCIA * PATA_PCMCIA * RTC_CLASS * SATA_MV * SATA_SIL24 * IP_PNP + NFS_ROOT for diskless booting + possibly some other things I might have missed to list Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-11-08[POWERPC] pasemi: Update defconfigOlof Johansson1-120/+188
Update pasemi_defconfig. Add a few missing options for default devices on electra boards, enable tickless and hrtimers, etc, etc. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-11-08[POWERPC] iSeries: Fix ref counting in vio setupStephen Rothwell1-4/+6
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-11-08[POWERPC] ] Fix memset size errorLi Zefan1-1/+1
The size passing to memset is wrong. Signed-off-by Li Zefan <lizf@cn.fujitsu.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-11-08[POWERPC] Fix link errors for allyesconfigStephen Rothwell1-2/+1
An allyesconfig build creates a .text section that is so big that the .text.init.refok and .fixup sections are too far away for the relocations to be fixed up correctly. This patch fixes that by linking all the relevent text sections for each file together. Suggested by Paul Mackerras. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-11-08[POWERPC] iSeries_init_IRQ non-PCI tidyStephen Rothwell2-4/+4
ppc_md.init_IRQ is not called if it is NULL, so we don't need an empty routine in the non PCI case. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-11-08[POWERPC] EEH: Avoid crash on null deviceLinas Vepstas1-3/+8
Bugfix: avoid crash if there's no PCI device for a given openfirmware node. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-11-08[POWERPC] EEH: Drivers that need reset trump othersLinas Vepstas1-4/+6
Bugfix: if a driver controlling one part of a multi-function PCI card has asked for a reset, honor that request above all others. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-11-08[POWERPC] EEH: Clean up commentsLinas Vepstas1-5/+3
Clean up commentary, remove dead code. Signed-off-by Linas Vepstas <linas@austin.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-11-08[POWERPC] Fix off-by-one error in setting decrementer on Book E/4xx (v2)Paul Mackerras1-7/+3
The decrementer in Book E and 4xx processors interrupts on the transition from 1 to 0, rather than on the 0 to -1 transition as on 64-bit server and 32-bit "classic" (6xx/7xx/7xxx) processors. At the moment we subtract 1 from the count of how many decrementer ticks are required before the next interrupt before putting it into the decrementer, which is correct for server/classic processors, but could possibly cause the interrupt to happen too early on Book E and 4xx if the timebase/decrementer frequency is low. This fixes the problem by making set_dec subtract 1 from the count for server and classic processors, instead of having the callers subtract 1. Since set_dec already had a bunch of ifdefs to handle different processor types, there is no net increase in ugliness. :) Note that calling set_dec(0) may not generate an interrupt on some processors. To make sure that decrementer_set_next_event always calls set_dec with an interval of at least 1 tick, we set min_delta_ns of the decrementer_clockevent to correspond to 2 ticks (2 rather than 1 to compensate for truncations in the conversions between ticks and ns). This also removes a redundant call to set the decrementer to 0x7fffffff - it was already set to that earlier in timer_interrupt. Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-11-08[POWERPC] Fix switch_slb handling of 1T ESID valueswill schmidt1-3/+31
Now that we have 1TB segment size support, we need to be using the GET_ESID_1T macro when comparing ESID values for pc, stack, and unmapped_base within switch_slb(). A new helper function called esids_match() contains the logic for deciding when to call GET_ESID and GET_ESID_1T. This fixes a duplicate-slb-entry inspired machine-check exception I was seeing when trying to run java on a power6 partition. Tested on power6 and power5. Signed-off-by: Will Schmidt <will_schmidt@vnet.ibm.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-11-08[POWERPC] Fix build failure when CONFIG_VIRT_CPU_ACCOUNTING is not definedTony Breeds1-0/+1
Without this patch I get the following build failure CC arch/powerpc/platforms/celleb/setup.o arch/powerpc/platforms/celleb/setup.c:151: error: 'generic_calibrate_decr' undeclared here (not in a function) Signed-off-by: Tony Breeds <tony@bakeyournoodle.com> Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-11-08[POWERPC] Include udbg.h when using udbg_printfwill schmidt4-0/+4
This fixes the error error: implicit declaration of function "udbg_printf" We have a few spots where we reference udbg_printf() without #including udbg.h. These are within #ifdef DEBUG blocks, so unnoticed until we do a #define DEBUG or #define DEBUG_LOW nearby. Signed-off-by: Will Schmidt <will_schmidt@vnet.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-11-08[POWERPC] Fix cache line vs. block size confusionBenjamin Herrenschmidt1-12/+7
We had an historical confusion in the kernel between cache line and cache block size. The former is an implementation detail of the L1 cache which can be useful for performance optimisations, the later is the actual size on which the cache control instructions operate, which can be different. For some reason, we had a weird hack reading the right property on powermac and the wrong one on any other 64 bits (32 bits is unaffected as it only uses the cputable for cache block size infos at this stage). This fixes the booting-without-of.txt documentation to mention the right properties, and fixes the 64 bits initialization code to look for the block size first, with a fallback to the line size if the property is missing. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-11-08[POWERPC] Fix sysctl table check failure on PowerMacAlexey Dobriyan1-1/+1
kernel was marked with 0755. Everywhere else it's 0555. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-11-08[POWERPC] Fix CONFIG_SMP=n build breakOlof Johansson1-12/+12
Fix two build errors on powerpc allyesconfig + CONFIG_SMP=n: arch/powerpc/platforms/built-in.o: In function `cpu_affinity_set': arch/powerpc/platforms/cell/spu_priv1_mmio.c:78: undefined reference to `.iic_get_target_id' arch/powerpc/platforms/built-in.o: In function `iic_init_IRQ': arch/powerpc/platforms/cell/interrupt.c:397: undefined reference to `.iic_setup_cpu' Signed-off-by: Olof Johansson <olof@lixom.net> Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-11-08[POWERPC] bootwrapper: Revert ps3 binary flag usage, and remove .bin suffixScott Wood1-6/+7
The ps3 target produces two images, and the binary one is not the "primary" image that corresponds to the -o flag; thus, it no longer uses the generic binary flag. On platforms which do use the binary flag, it no longer produces a .bin suffix, so that the output file matches what was passed to the -o flag. This should fix the zImage ln problems for the ps3 target. Signed-off-by: Scott Wood <scottwood@freescale.com> Acked-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-11-08[POWERPC] Fix mv643xx_pci sysfs .read and .write functionsDale Farnsworth1-4/+6
Commit 91a69029 introduced an additional parameter to the .read and .write methods for sysfs binary attributes. Two mv64x60_pci functions were missed in that patch, resulting in these errors: /cache/git/linux-2.6/arch/powerpc/sysdev/mv64x60_pci.c:77: warning: initialization from incompatible pointer type /cache/git/linux-2.6/arch/powerpc/sysdev/mv64x60_pci.c:78: warning: initialization from incompatible pointer type Add the missing "struct bin_attribute *" parameter. Signed-off-by: Dale Farnsworth <dale@farnsworth.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-11-08[POWERPC] i8259: Add disable methodAurelien Jarno1-0/+1
Since commit 76d2160147f43f982dfe881404cfde9fd0a9da21, the NE2000 card is not working anymore on PPC and POWERPC and produces WATCHDOG timeouts. The patch below fixes that the same way it has been done on x86, x86_64 and MIPS. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-11-08[POWERPC] Read back MSI message in rtas_setup_msi_irqs() so restore worksMichael Ellerman1-0/+6
There are plans afoot to use pci_restore_msi_state() to restore MSI state after a device reset. In order for this to work for the RTAS MSI backend, we need to read back the MSI message from config space after it has been setup by firmware. This should be sufficient for restoring the MSI state after a device reset, however we will need to revisit this for suspend to disk if that is ever implemented on pseries. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Acked-by: Linas Vepstas <linas@austin.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-10-29[POWERPC] powerpc: Fix demotion of segments to 4K pagesBenjamin Herrenschmidt2-4/+7
When demoting a process to use 4K HW pages (instead of 64K), which happens under various circumstances such as doing cache inhibited mappings on machines that do not support 64K CI pages, the assembly hash code calls back into the C function flush_hash_page(). This function prototype was recently changed to accomodate for 1T segments but the assembly call site was not updated, causing applications that do demotion to hang. In addition, when updating the per-CPU PACA for the new sizes, we didn't properly update the slice "map", thus causing the SLB miss code to re-insert segments for the wrong size. This fixes both and adds a warning comment next to the C implementation to try to avoid problems next time someone changes it. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-10-23Merge branch 'for-2.6.24' of master.kernel.org:/pub/scm/linux/kernel/git/jwboyer/powerpc-4xx into mergePaul Mackerras11-146/+230
2007-10-22Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpcLinus Torvalds5-41/+95
* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: [POWERPC] Enable restart support for lite5200 board [POWERPC] Add restart support for mpc52xx based platforms [POWERPC] Update device tree binding for mpc5200 gpt [POWERPC] Add mpc52xx_find_and_map_path(), refactor utility functions [POWERPC] bestcomm: Restrict bus prefetch bugfix to original mpc5200 silicon.
2007-10-22Update arch/ to use sg helpersJens Axboe4-8/+5
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-21[POWERPC] Enable restart support for lite5200 boardMarian Balakowicz1-0/+4
Use the watchdog timer to implement board restart support. Signed-off-by: Marian Balakowicz <m8@semihalf.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2007-10-21[POWERPC] Add restart support for mpc52xx based platformsMarian Balakowicz1-0/+50
Add common helper routines: mpc52xx_map_wdt() and mpc52xx_restart(). Signed-off-by: Marian Balakowicz <m8@semihalf.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2007-10-21[POWERPC] Update device tree binding for mpc5200 gptMarian Balakowicz2-34/+18
Add 'fsl,' prefix to 'compatible' property for gpt nodes. Add 'fsl,' prefix to empty, GPT0 specific 'has-wdt' property. The fsl, prefix is being added to better match the convention of prefixing manufacturer specific properties and values with the vendors name. Signed-off-by: Marian Balakowicz <m8@semihalf.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2007-10-21[POWERPC] Add mpc52xx_find_and_map_path(), refactor utility functionsMarian Balakowicz1-4/+17
Add helper routine mpc52xx_find_and_map_path(). Extract common code to mpc52xx_map_node() and refactor mpc52xx_find_and_map(). Signed-off-by: Jan Wrobel <wrr@semihalf.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2007-10-21[POWERPC] bestcomm: Restrict bus prefetch bugfix to original mpc5200 silicon.Grant Likely1-3/+6
Only the MPC5200 needs this bug fix. MPC5200B is okay. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2007-10-20typo fixesMatt LaPlante1-1/+1
Most of these fixes were already submitted for old kernel versions, and were approved, but for some reason they never made it into the releases. Because this is a consolidation of a couple old missed patches, it touches both Kconfigs and documentation texts. Signed-off-by: Matt LaPlante <kernel1@cyberdogtech.com> Acked-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-19Spelling fix: explicitlyJean Delvare2-2/+2
From: Jean Delvare <khali@linux-fr.org> Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-19Convert files to UTF-8 and some cleanupsJan Engelhardt2-2/+2
* Convert files to UTF-8. * Also correct some people's names (one example is Eißfeldt, which was found in a source file. Given that the author used an ß at all in a source file indicates that the real name has in fact a 'ß' and not an 'ss', which is commonly used as a substitute for 'ß' when limited to 7bit.) * Correct town names (Goettingen -> Göttingen) * Update Eberhard Mönkeberg's address (http://lkml.org/lkml/2007/1/8/313) Signed-off-by: Jan Engelhardt <jengelh@gmx.de> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-19[POWERPC] 4xx: Enable EMAC on Bamboo boardJosh Boyer3-50/+76
Fix some device tree omissions that prevented the new EMAC driver from setting up ethernet on the Bamboo board correctly and update the Bamboo defconfig. Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
2007-10-19[POWERPC] 4xx: Enable EMAC for PPC405 Walnut boardJosh Boyer4-43/+66
This patch enables the ibm_newemac driver for the Walnut board. It fixes the device tree for the walnut board to order the MAL interrupts correctly and adds the local-mac-address property to the EMAC node. The bootwrapper is also updated to extract the MAC address from the OpenBIOS offset where it is stored. Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
2007-10-19[POWERPC] 4xx: Fix timebase clock selection on WalnutJosh Boyer1-2/+2
The current bootwrapper fails to set the timebase clock to the CPU clock which causes the time to increment incorrectly. This fixes it by using the correct #define for the CPC0_CR1 register. Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
2007-10-19[POWERPC] 4xx: Enable EMAC on the PPC 440GP Ebony boardJosh Boyer1-45/+70
Update the Ebony defconfig to enable the ibm_newemac driver. Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
2007-10-19[POWERPC] 4xx: Split early debug output and early boot console for 44xValentine Barshak2-1/+1
Currently there's no way to enable early boot console on PowerPC 44x not specifying uart's physical address in kernel config, which is used for very early debug messages. This patch splits very early debug output (which needs uart physical address in kernel config) and early boot console (which searches for uarts in the device tree using find_legacy_serial_ports). We enable early boot console for all 44x processors, while (dangerous) early debug is user-selectable. Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com> Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
2007-10-19[POWERPC] 4xx: Enable NEW EMAC support for Sequoia 440EPx.Valentine Barshak1-4/+3
This patch enables NEW EMAC support for PowerPC 440EPx Sequoia board. Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com> Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
2007-10-19[POWERPC] 4xx: Add RGMII support for Sequoia 440EPxValentine Barshak2-2/+13
This adds RGMII support to Sequoia DTS and sets correct phy-mode for EMACs. According to Sequoia datasheet, both ethernet ports are connected to RGMII interface, while ZMII is used only for MDIO. Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com> Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
2007-10-19Fix misspellings of "system", "controller", "interrupt" and "necessary".Robert P. J. Day1-1/+1
Fix the various misspellings of "system", controller", "interrupt" and "[un]necessary". Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-19Combine instrumentation menus in kernel/Kconfig.instrumentationMathieu Desnoyers2-38/+1
Quoting Randy: "It seems sad that this patch sources Kconfig.marker, a 7-line file, 20-something times. Yes, you (we) don't want to put those 7 lines into 20-something different files, so sourcing is the right thing. However, what you did for avr32 seems more on the right track to me: make _one_ Instrumentation support menu that includes PROFILING, OPROFILE, KPROBES, and MARKERS and then use (source) that in all of the arches." Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Acked-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-19Use extended crashkernel command line on ppc64Bernhard Walle1-27/+27
This patch adapts the ppc64 code to use the generic parse_crashkernel() function introduced in the generic patch of that series. Signed-off-by: Bernhard Walle <bwalle@suse.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Vivek Goyal <vgoyal@in.ibm.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-19Use helpers to obtain task pid in printks (arch code)Alexey Dobriyan2-2/+2
One of the easiest things to isolate is the pid printed in kernel log. There was a patch, that made this for arch-independent code, this one makes so for arch/xxx files. It took some time to cross-compile it, but hopefully these are all the printks in arch code. Signed-off-by: Alexey Dobriyan <adobriyan@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Cc: <linux-arch@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-19remove asm/bitops.h includesJiri Slaby1-1/+1
remove asm/bitops.h includes including asm/bitops directly may cause compile errors. don't include it and include linux/bitops instead. next patch will deny including asm header directly. Cc: Adrian Bunk <bunk@kernel.org> Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-19pid namespaces: define is_global_init() and is_container_init()Serge E. Hallyn3-3/+3
is_init() is an ambiguous name for the pid==1 check. Split it into is_global_init() and is_container_init(). A cgroup init has it's tsk->pid == 1. A global init also has it's tsk->pid == 1 and it's active pid namespace is the init_pid_ns. But rather than check the active pid namespace, compare the task structure with 'init_pid_ns.child_reaper', which is initialized during boot to the /sbin/init process and never changes. Changelog: 2.6.22-rc4-mm2-pidns1: - Use 'init_pid_ns.child_reaper' to determine if a given task is the global init (/sbin/init) process. This would improve performance and remove dependence on the task_pid(). 2.6.21-mm2-pidns2: - [Sukadev Bhattiprolu] Changed is_container_init() calls in {powerpc, ppc,avr32}/traps.c for the _exception() call to is_global_init(). This way, we kill only the cgroup if the cgroup's init has a bug rather than force a kernel panic. [akpm@linux-foundation.org: fix comment] [sukadev@us.ibm.com: Use is_global_init() in arch/m32r/mm/fault.c] [bunk@stusta.de: kernel/pid.c: remove unused exports] [sukadev@us.ibm.com: Fix capability.c to work with threaded init] Signed-off-by: Serge E. Hallyn <serue@us.ibm.com> Signed-off-by: Sukadev Bhattiprolu <sukadev@us.ibm.com> Acked-by: Pavel Emelianov <xemul@openvz.org> Cc: Eric W. Biederman <ebiederm@xmission.com> Cc: Cedric Le Goater <clg@fr.ibm.com> Cc: Dave Hansen <haveblue@us.ibm.com> Cc: Herbert Poetzel <herbert@13thfloor.at> Cc: Kirill Korotaev <dev@sw.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-19task cgroups: enable cgroups by default in some configsPaul Jackson3-0/+3
In pre-cgroup cpusets, a few config files enabled cpusets by default. Signed-off-by: Paul Jackson <pj@sgi.com> Cc: Paul Menage <menage@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-18powerpc: add scaled time accountingMichael Neuling2-2/+31
This adds POWERPC specific hooks for scaled time accounting. POWER6 includes a SPURR register. The SPURR is based off the PURR register but is scaled based on CPU frequency and issue rates. This gives a more accurate account of the instructions used per task. The PURR and timebase will be constant relative to the wall clock, irrespective of the CPU frequency. This implementation reads the SPURR register in account_system_vtime which is only call called on context witch and hard and soft irq entry and exit. The percentage of user and system time is then estimated using the ratio of these accounted by the PURR. If the SPURR is not present, the PURR read. An earlier implementation of this patch read the SPURR whenever the PURR was read, which included the system call entry and exit path. Unfortunately this showed a performance regression on lmbench runs, so was re-implemented. I've included the lmbench results here when run bare metal on POWER6. 1st column is the unpatch results. 2nd column is the results using the below patch and the 3rd is the % diff of these results from the base. 4th and 5th columns are the results and % differnce from the base using the older patch (SPURR read in syscall entry/exit path). Base Scaled-Acct SPURR-in-syscall Result Result % diff Result % diff Simple syscall: 0.3086 0.3086 0.0000 0.3452 11.8600 Simple read: 0.4591 0.4671 1.7425 0.5044 9.86713 Simple write: 0.4364 0.4366 0.0458 0.4731 8.40971 Simple stat: 2.0055 2.0295 1.1967 2.0669 3.06158 Simple fstat: 0.5962 0.5876 -1.442 0.6368 6.80979 Simple open/close: 3.1283 3.1009 -0.875 3.2088 2.57328 Select on 10 fd's: 0.8554 0.8457 -1.133 0.8667 1.32101 Select on 100 fd's: 3.5292 3.6329 2.9383 3.6664 3.88756 Select on 250 fd's: 7.9097 8.1881 3.5197 8.2242 3.97613 Select on 500 fd's: 15.2659 15.836 3.7357 15.873 3.97814 Select on 10 tcp fd's: 0.9576 0.9416 -1.670 0.9752 1.83792 Select on 100 tcp fd's: 7.248 7.2254 -0.311 7.2685 0.28283 Select on 250 tcp fd's: 17.7742 17.707 -0.375 17.749 -0.1406 Select on 500 tcp fd's: 35.4258 35.25 -0.496 35.286 -0.3929 Signal handler installation: 0.6131 0.6075 -0.913 0.647 5.52927 Signal handler overhead: 2.0919 2.1078 0.7600 2.1831 4.35967 Protection fault: 0.7345 0.7478 1.8107 0.8031 9.33968 Pipe latency: 33.006 16.398 -50.31 33.475 1.42368 AF_UNIX sock stream latency: 14.5093 30.910 113.03 30.715 111.692 Process fork+exit: 219.8 222.8 1.3648 229.37 4.35623 Process fork+execve: 876.14 873.28 -0.32 868.66 -0.8533 Process fork+/bin/sh -c: 2830 2876.5 1.6431 2958 4.52296 File /var/tmp/XXX write bw: 1193497 1195536 0.1708 118657 -0.5799 Pagefaults on /var/tmp/XXX: 3.1272 3.2117 2.7020 3.2521 3.99398 Also, kernel compile times show no difference with this patch applied. [pbadari@us.ibm.com: Avoid unnecessary PURR reading] Signed-off-by: Michael Neuling <mikey@neuling.org> Cc: Balbir Singh <balbir@in.ibm.com> Cc: Jay Lan <jlan@engr.sgi.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-18serial: turn serial console suspend a boot rather than compile time optionAndres Salomon1-1/+0
Currently, there's a CONFIG_DISABLE_CONSOLE_SUSPEND that allows one to stop the serial console from being suspended when the rest of the machine goes to sleep. This is incredibly useful for debugging power management-related things; however, having it as a compile-time option has proved to be incredibly inconvenient for us (OLPC). There are plenty of times that we want serial console to not suspend, but for the most part we'd like serial console to be suspended. This drops CONFIG_DISABLE_CONSOLE_SUSPEND, and replaces it with a kernel boot parameter (no_console_suspend). By default, the serial console will be suspended along with the rest of the system; by passing 'no_console_suspend' to the kernel during boot, serial console will remain alive during suspend. For now, this is pretty serial console specific; further fixes could be applied to make this work for things like netconsole. Signed-off-by: Andres Salomon <dilinger@debian.org> Acked-by: "Rafael J. Wysocki" <rjw@sisk.pl> Acked-by: Pavel Machek <pavel@ucw.cz> Cc: Nigel Cunningham <nigel@suspend2.net> Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-18PM: Rework struct platform_suspend_opsRafael J. Wysocki2-19/+24
There is no reason why the .prepare() and .finish() methods in 'struct platform_suspend_ops' should take any arguments, since architectures don't use these methods' argument in any practically meaningful way (ie. either the target system sleep state is conveyed to the platform by .set_target(), or there is only one suspend state supported and it is indicated to the PM core by .valid(), or .prepare() and .finish() aren't defined at all).  There also is no reason why .finish() should return any result. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Pavel Machek <pavel@ucw.cz> Cc: Len Brown <lenb@kernel.org> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>