aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc (follow)
AgeCommit message (Collapse)AuthorFilesLines
2007-05-12[POWERPC] PS3: Fix request_irq warningGeoff Levand1-2/+4
Fix compiler warning: ps3/smp.c:122: warning: ignoring return value of 'request_irq' Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-12[POWERPC] Don't complain if size-cells == 0 in prom_parse()Kim Phillips1-1/+1
An mdio bus scan was added with ucc_geth phylib migration patches, now machines complain on boot, saying: prom_parse: Bad cell count for /qe@e0100000/mdio@2120/ethernet-phy@00 prom_parse: Bad cell count for /qe@e0100000/mdio@2120/ethernet-phy@01 since size-cells can indeed be 0, this patch fixes the check. Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-12[POWERPC] Simplify smp_space_timerswill schmidt1-17/+2
Greatly simplify the function smp_space_timers. The stolen time calculation (per comment within the code) doesn't need the half-jiffy stagger any more. There isn't an issue with bouncing off global locks, so we really shouldn't need any sort of staggering at all. However, the last_jiffy value still needs to be set. This removes the extra stagger logic, and just sets the values. This change should benefit applications that rely on barrier synchronization, and will help cut down OS jitter. Boot tested across the board (G5,power3,power4,power5,970mp blade). Signed-off-by: Will Schmidt <will_schmidt@vnet.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-12[POWERPC] Trivial ps3 warning fixesStephen Rothwell2-4/+4
Fixes warnings: arch/powerpc/platforms/ps3/system-bus.c: In function 'ps3_map_sg': arch/powerpc/platforms/ps3/system-bus.c:278: warning: unused variable 'i' arch/powerpc/platforms/ps3/system-bus.c:277: warning: unused variable 'dev' arch/powerpc/platforms/ps3/setup.c:103: warning: 'prealloc' defined but not used Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-12[POWERPC] Add missed includeStephen Rothwell1-0/+1
fixes: arch/powerpc/platforms/pasemi/idle.c: In function 'pasemi_system_reset_exception': arch/powerpc/platforms/pasemi/idle.c:55: warning: implicit declaration of function 'do_IRQ' Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-12[POWERPC] Remove unused variable in hpte_decode()Stephen Rothwell1-1/+1
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-12[POWERPC] Assign correct variable in hpte_decode()Stephen Rothwell1-1/+1
This case will never be hit, but it should be corrected anyway. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-11Merge branch 'audit.b38' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-currentLinus Torvalds2-0/+22
* 'audit.b38' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current: [PATCH] Abnormal End of Processes [PATCH] match audit name data [PATCH] complete message queue auditing [PATCH] audit inode for all xattr syscalls [PATCH] initialize name osid [PATCH] audit signal recipients [PATCH] add SIGNAL syscall class (v3) [PATCH] auditing ptrace
2007-05-11powerpc: fixup hard_irq_disable semanticsBenjamin Herrenschmidt3-9/+3
This patch renames the raw hard_irq_{enable,disable} into __hard_irq_{enable,disable} and introduces a higher level hard_irq_disable() function that can be used by any code to enforce that IRQs are fully disabled, not only lazy disabled. The difference with the __ versions is that it will update some per-processor fields so that the kernel keeps track and properly re-enables them in the next local_irq_disable(); This prepares powerpc for my next patch that introduces hard_irq_disable() generically. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-11[PATCH] audit signal recipientsAmy Griffis1-0/+9
When auditing syscalls that send signals, log the pid and security context for each target process. Optimize the data collection by adding a counter for signal-related rules, and avoiding allocating an aux struct unless we have more than one target process. For process groups, collect pid/context data in blocks of 16. Move the audit_signal_info() hook up in check_kill_permission() so we audit attempts where permission is denied. Signed-off-by: Amy Griffis <amy.griffis@hp.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2007-05-11[PATCH] add SIGNAL syscall class (v3)Amy Griffis2-0/+13
Add a syscall class for sending signals. Signed-off-by: Amy Griffis <amy.griffis@hp.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2007-05-10[POWERPC] Fix compile error with kexec and CONFIG_SMP=nPaul Mackerras1-0/+1
Commit 2f4dfe206a2fc07099dfad77a8ea2f4b4ae2140f moved the definition of hard_smp_processor_id() for the UP case from include/linux/smp.h to include/asm/smp.h. However, include/linux/smp.h only includes include/asm/smp.h in the SMP case, so code that wants to use hard_smp_processor_id() has to include <asm/smp.h> explicitly to be sure of getting the definition. Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-10[POWERPC] Split initrd logic out of early_init_dt_scan_chosen() to fix warningMichael Ellerman1-16/+31
If CONFIG_BLK_DEV_INITRD is not defined the prop variable in early_init_dt_scan_chosen() is unused, causing a compiler warning. So split the initrd logic into a separate function, allowing us to declare prop only when we need it. Built for both cases and booted with an initrd. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-10[POWERPC] Fix warning in hpte_decode(), and generalize itPaul Mackerras1-20/+17
This adds the necessary support to hpte_decode() to handle 1TB segments and 16GB pages, and removes an uninitialized value warning on avpn. We don't have any code to generate HPTEs for 1TB segments or 16GB pages yet, so this is mostly for completeness, and to fix the warning. Signed-off-by: Paul Mackerras <paulus@samba.org> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2007-05-10[POWERPC] Minor pSeries IOMMU debug cleanupMichael Neuling1-1/+2
pci is not initialized before being used here, so this debug print is bogus at the current location. Move it to where it makes sense. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-10[POWERPC] Assorted janitorial EEH cleanupsLinas Vepstas2-6/+14
Assorted minor cleanups to EEH code; -- use literals, use kerneldoc format. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> ---- arch/powerpc/platforms/pseries/eeh.c | 13 ++++++++++--- arch/powerpc/platforms/pseries/eeh_driver.c | 7 ++++--- include/asm-powerpc/ppc-pci.h | 18 +++++++++++++++--- 3 files changed, 29 insertions(+), 9 deletions(-) Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-10[POWERPC] Fix incorrect calculation of I/O window addressesPaul Mackerras1-24/+13
My patch "Cope with PCI host bridge I/O window not starting at 0" introduced a bug in the calculation of the virtual addresses for the I/O windows of PCI host bridges other than the first, because it didn't account for the fact that hose->io_resource gets offset so that it reflects the range of global I/O port numbers assigned to the bridge. This fixes it and simplifies get_bus_io_range() in the process. Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-10[POWERPC] celleb: Update celleb_defconfigIshizaki Kou1-44/+85
Updates for celleb_defconfig. Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-10[POWERPC] celleb: Fix parsing of machine type hack command line optionIshizaki Kou1-1/+1
This is a bugfix to install Fedora Core 6 by using kernel command line 'celleb_machine_type_hack=CHRP'. Yes, this is a one-character fix to add forgotten '='. Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-10[POWERPC] celleb: Fix PCI config space accesses to subordinate busesIshizaki Kou1-4/+4
Checking whether bus->self is NULL is not enough to know "bus" is the primary bus. Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-10[POWERPC] celleb: Fix support for multiple PCI domainsIshizaki Kou1-0/+1
Celleb has multiple PCI host bridges (phbs). Previous boot logic gives non-overlapped bus IDs between PCI host bridges so you can identify PHB by bus ID. But newer boot logic gives same bus ID between PHBs (it gives bus ID 0 as root bus.) So we have to set 'phb->buid' as non-zero. Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-10Merge branch 'linux-2.6'Paul Mackerras8-6/+11
2007-05-09[POWERPC] User rheap from arch/powerpc/libKumar Gala1-2/+0
Removed rheap in arch/ppc/lib and changed build system to use the one in arch/powerpc/lib. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-05-09[POWERPC] 83xx: Fix the PCI ranges in the MPC834x_MDS device tree.Scott Wood1-2/+2
The MPC834x_MDS device tree's PCI non-prefetchable MMIO range was specified incorrectly. Both the local and bus addresses start at 0x90000000. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-05-09[POWERPC] 83xx: Fix the PCI ranges in the MPC832x_MDS device tree.Scott Wood1-1/+1
The MPC832x_MDS device tree's PCI non-prefetchable MMIO range was specified incorrectly. Both the local and bus addresses start at 0x90000000. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-05-09[POWERPC] Change rheap functions to use ulongs instead of pointersTimur Tabi6-91/+108
The rheap allocation functions return a pointer, but the actual value is based on how the heap was initialized, and so it can be anything, e.g. an offset into a buffer. A ulong is a better representation of the value returned by the allocation functions. This patch changes all of the relevant rheap functions to use a unsigned long integers instead of a pointer. In case of an error, the value returned is a negative error code that has been cast to an unsigned long. The caller can use the IS_ERR_VALUE() macro to check for this. All code which calls the rheap functions is updated accordingly. Macros IS_MURAM_ERR() and IS_DPERR(), have been deleted in favor of IS_ERR_VALUE(). Also added error checking to rh_attach_region(). Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-05-09[POWERPC] 86xx: Enable the AC97 interface on 8641D board.Jason Jin1-1/+6
HD interface and AC97 interface share some pins and they are enabled at the same time, In order to use AC97 interface, we need to disable the HD interface first. Signed-off-by:Jason Jin<jason.jin@freescale.com> Acked-by: Jon Loeliger <jdl@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-05-09[POWERPC] 83xx: Suppress warning when CONFIG_ options aren't definedKumar Gala1-0/+2
Suppress warning when CONFIG_PCI & CONFIG_QUICC_ENGINE is not defined Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-05-09[POWERPC] 83xx: Suppress warning when CONFIG_PCI is not definedLi Yang3-0/+6
Suppress warning when CONFIG_PCI is not defined. Signed-off-by: Li Yang <leoli@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-05-09Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpcLinus Torvalds28-714/+1219
* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: [POWERPC] Further fixes for the removal of 4level-fixup hack from ppc32 [POWERPC] EEH: log all PCI-X and PCI-E AER registers [POWERPC] EEH: capture and log pci state on error [POWERPC] EEH: Split up long error msg [POWERPC] EEH: log error only after driver notification. [POWERPC] fsl_soc: Make mac_addr const in fs_enet_of_init(). [POWERPC] Don't use SLAB/SLUB for PTE pages [POWERPC] Spufs support for 64K LS mappings on 4K kernels [POWERPC] Add ability to 4K kernel to hash in 64K pages [POWERPC] Introduce address space "slices" [POWERPC] Small fixes & cleanups in segment page size demotion [POWERPC] iSeries: Make HVC_ISERIES the default [POWERPC] iSeries: suppress build warning in lparmap.c [POWERPC] Mark pages that don't exist as nosave [POWERPC] swsusp: Introduce register_nosave_region_late
2007-05-09Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivialLinus Torvalds5-5/+5
* git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial: (25 commits) sound: convert "sound" subdirectory to UTF-8 MAINTAINERS: Add cxacru website/mailing list include files: convert "include" subdirectory to UTF-8 general: convert "kernel" subdirectory to UTF-8 documentation: convert the Documentation directory to UTF-8 Convert the toplevel files CREDITS and MAINTAINERS to UTF-8. remove broken URLs from net drivers' output Magic number prefix consistency change to Documentation/magic-number.txt trivial: s/i_sem /i_mutex/ fix file specification in comments drivers/base/platform.c: fix small typo in doc misc doc and kconfig typos Remove obsolete fat_cvf help text Fix occurrences of "the the " Fix minor typoes in kernel/module.c Kconfig: Remove reference to external mqueue library Kconfig: A couple of grammatical fixes in arch/i386/Kconfig Correct comments in genrtc.c to refer to correct /proc file. Fix more "deprecated" spellos. Fix "deprecated" typoes. ... Fix trivial comment conflict in kernel/relay.c.
2007-05-09rename thread_info to stackRoman Zippel1-1/+1
This finally renames the thread_info field in task structure to stack, so that the assumptions about this field are gone and archs have more freedom about placing the thread_info structure. Nonbroken archs which have a proper thread pointer can do the access to both current thread and task structure via a single pointer. It'll allow for a few more cleanups of the fork code, from which e.g. ia64 could benefit. Signed-off-by: Roman Zippel <zippel@linux-m68k.org> [akpm@linux-foundation.org: build fix] Cc: Richard Henderson <rth@twiddle.net> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: Russell King <rmk@arm.linux.org.uk> Cc: Ian Molton <spyro@f2s.com> Cc: Haavard Skinnemoen <hskinnemoen@atmel.com> Cc: Mikael Starvik <starvik@axis.com> Cc: David Howells <dhowells@redhat.com> Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: Hirokazu Takata <takata@linux-m32r.org> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Roman Zippel <zippel@linux-m68k.org> Cc: Greg Ungerer <gerg@uclinux.org> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Paul Mundt <lethal@linux-sh.org> Cc: Kazumoto Kojima <kkojima@rr.iij4u.or.jp> Cc: Richard Curnow <rc@rc0.org.uk> Cc: William Lee Irwin III <wli@holomorphy.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Cc: Miles Bader <uclinux-v850@lsi.nec.co.jp> Cc: Andi Kleen <ak@muc.de> Cc: Chris Zankel <chris@zankel.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-09Add suspend-related notifications for CPU hotplugRafael J. Wysocki2-0/+5
Since nonboot CPUs are now disabled after tasks and devices have been frozen and the CPU hotplug infrastructure is used for this purpose, we need special CPU hotplug notifications that will help the CPU-hotplug-aware subsystems distinguish normal CPU hotplug events from CPU hotplug events related to a system-wide suspend or resume operation in progress. This patch introduces such notifications and causes them to be used during suspend and resume transitions. It also changes all of the CPU-hotplug-aware subsystems to take these notifications into consideration (for now they are handled in the same way as the corresponding "normal" ones). [oleg@tv-sign.ru: cleanups] Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Cc: Gautham R Shenoy <ego@in.ibm.com> Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-09fix file specification in commentsUwe Kleine-König2-2/+2
Many files include the filename at the beginning, serveral used a wrong one. Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2007-05-09Fix occurrences of "the the "Michael Opdenacker1-1/+1
Signed-off-by: Michael Opdenacker <michael@free-electrons.com> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2007-05-09[POWERPC] Further fixes for the removal of 4level-fixup hack from ppc32David Gibson3-4/+4
Commit d1953c8888ef034b912ee33bc2ea2cce6a414402 removed the use of 4level-fixup.h for 32-bit systems under arch/powerpc. However, I missed a few things activated on some configurations, resulting in some warnings (at least with STRICT_MM_TYPECHECKS enabled) and build errors in some circumstances. This fixes it. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-09[POWERPC] EEH: log all PCI-X and PCI-E AER registersLinas Vepstas1-2/+46
When an EEH event is detected, and after the device driver has been notified, but before the device is reset, enable MMIO to the adapter, and grab the contents of the PCI status and command registers, the PCI-X status and command, and the PCI-E capability 10 and AER registers. Pass these up to the RTAS error log, and also printk them. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-09[POWERPC] EEH: capture and log pci state on errorLinas Vepstas1-2/+41
If an EEH event is observed, capture PCI config space info about the device, wrap it up and pass it to the event logger. This pach just slots in the basic logging function. A later patch will provide for more through data gathering. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-09[POWERPC] EEH: Split up long error msgLinas Vepstas1-3/+5
Make some minor adjustments to the EEH error messages. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-09[POWERPC] EEH: log error only after driver notification.Linas Vepstas1-1/+5
It turns out many/most versions of firmware enable MMIO when the slto-error-detail rtas call is made (in violation of the architecture). Thus, it would be best to call slot-error-detail only after notifying device drivers of a freeze, as otherwise, a variety of strange and unexpected things may happen. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-09[POWERPC] fsl_soc: Make mac_addr const in fs_enet_of_init().Scott Wood1-1/+1
of_get_mac_address() returns a const pointer, so the result should be stored in a const pointer. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-09[POWERPC] Don't use SLAB/SLUB for PTE pagesHugh Dickins2-24/+6
The SLUB allocator relies on struct page fields first_page and slab, overwritten by ptl when SPLIT_PTLOCK: so the SLUB allocator cannot then be used for the lowest level of pagetable pages. This was obstructing SLUB on PowerPC, which uses kmem_caches for its pagetables. So convert its pte level to use normal gfp pages (whereas pmd, pud and 64k-page pgd want partpages, so continue to use kmem_caches for pmd, pud and pgd). Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-09[POWERPC] Spufs support for 64K LS mappings on 4K kernelsBenjamin Herrenschmidt6-36/+274
This adds an option to spufs when the kernel is configured for 4K page to give it the ability to use 64K pages for SPE local store mappings. Currently, we are optimistic and try order 4 allocations when creating contexts. If that fails, the code will fallback to 4K automatically. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-09[POWERPC] Add ability to 4K kernel to hash in 64K pagesBenjamin Herrenschmidt4-16/+46
This adds the ability for a kernel compiled with 4K page size to have special slices containing 64K pages and hash the right type of hash PTEs. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-09[POWERPC] Introduce address space "slices"Benjamin Herrenschmidt10-586/+719
The basic issue is to be able to do what hugetlbfs does but with different page sizes for some other special filesystems; more specifically, my need is: - Huge pages - SPE local store mappings using 64K pages on a 4K base page size kernel on Cell - Some special 4K segments in 64K-page kernels for mapping a dodgy type of powerpc-specific infiniband hardware that requires 4K MMU mappings for various reasons I won't explain here. The main issues are: - To maintain/keep track of the page size per "segment" (as we can only have one page size per segment on powerpc, which are 256MB divisions of the address space). - To make sure special mappings stay within their allotted "segments" (including MAP_FIXED crap) - To make sure everybody else doesn't mmap/brk/grow_stack into a "segment" that is used for a special mapping Some of the necessary mechanisms to handle that were present in the hugetlbfs code, but mostly in ways not suitable for anything else. The patch relies on some changes to the generic get_unmapped_area() that just got merged. It still hijacks hugetlb callbacks here or there as the generic code hasn't been entirely cleaned up yet but that shouldn't be a problem. So what is a slice ? Well, I re-used the mechanism used formerly by our hugetlbfs implementation which divides the address space in "meta-segments" which I called "slices". The division is done using 256MB slices below 4G, and 1T slices above. Thus the address space is divided currently into 16 "low" slices and 16 "high" slices. (Special case: high slice 0 is the area between 4G and 1T). Doing so simplifies significantly the tracking of segments and avoids having to keep track of all the 256MB segments in the address space. While I used the "concepts" of hugetlbfs, I mostly re-implemented everything in a more generic way and "ported" hugetlbfs to it. Slices can have an associated page size, which is encoded in the mmu context and used by the SLB miss handler to set the segment sizes. The hash code currently doesn't care, it has a specific check for hugepages, though I might add a mechanism to provide per-slice hash mapping functions in the future. The slice code provide a pair of "generic" get_unmapped_area() (bottomup and topdown) functions that should work with any slice size. There is some trickiness here so I would appreciate people to have a look at the implementation of these and let me know if I got something wrong. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-09[POWERPC] Small fixes & cleanups in segment page size demotionBenjamin Herrenschmidt1-41/+46
The code for demoting segments to 4K had some issues, like for example, when using _PAGE_4K_PFN flag, the first CPU to hit it would do the demotion, but other CPUs hitting the same page wouldn't properly flush their SLBs if mmu_ci_restriction isn't set. There are also potential issues with hash_preload not handling _PAGE_4K_PFN. All of these are non issues on current hardware but might bite us in the future. This patch thus fixes it by: - Taking the test comparing the mm and current CPU context page sizes to decide to flush SLBs out of the mmu_ci_restrictions test since that can also be triggered by _PAGE_4K_PFN pages - Due to the above being done all the time, demote_segment_4k doesn't need update the context and flush the SLB - demote_segment_4k can be static and doesn't need an EXPORT_SYMBOL - Making hash_preload ignore anything that has either _PAGE_4K_PFN or _PAGE_NO_CACHE set, thus avoiding duplication of the complicated logic in hash_page() (and possibly making hash_preload a little bit faster for the normal case). Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-09[POWERPC] iSeries: Make HVC_ISERIES the defaultStephen Rothwell1-1/+3
This makes the new iSeries virtual console drivers (nvc_iseries) the default and prevents viocons being built unless explicitly selected. Also it makes no sense to have the console as a module. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-09[POWERPC] iSeries: suppress build warning in lparmap.cStephen Rothwell1-1/+2
lparmap.c: Assembler messages: lparmap.c:51: Warning: ignoring changed section attributes for .text Idea from Segher Boessenkool. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-09[POWERPC] Mark pages that don't exist as nosaveJohannes Berg1-0/+25
On some powerpc architectures (notably 64-bit powermac) there is a memory hole, for example on powermacs between 2G and 4G. Since we use the flat memory model regardless, these pages must be marked as nosave (for suspend to disk.) Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-09Fix misspellings collected by members of KJ list.Robert P. J. Day1-1/+1
Fix the misspellings of "propogate", "writting" and (oh, the shame :-) "kenrel" in the source tree. Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: Adrian Bunk <bunk@stusta.de>