aboutsummaryrefslogtreecommitdiff
path: root/arch
AgeCommit message (Collapse)Author
2007-03-29[IA64] Fix possible invalid memory access in ia64_setup_msi_irq()Kenji Kaneshige
The following 'if' statement in ia64_setup_msi_irq() always fails even if create_irq() returns <0 value, because variable 'irq' is defined as unsigned int. It would cause invalid memory access. irq = create_irq(); if (irq < 0) return irq; Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2007-03-29[POWERPC] qe: Fix QUICC Engine SDMA setup errorsChuck Meade
Correct the alignment of the internal buffer used by the QUICC Engine SDMA controller to 4Kbytes. Correct the shift direction in the logic that sets up the SDMR register for the QUICC Engine SDMA controller. Signed-off-by: Chuck Meade <chuckmeade@mindspring.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-03-29[PATCH] Add suspend/resume for HPETMaxim Levitsky
This adds support of suspend/resume on i386 for HPET, which fixes a number of timer-related failures around STR. Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com> Acked-by: Michael S. Tsirkin <mst@dev.mellanox.co.il> Acked-by: Jeff Chua <jeff.chua.linux@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-29[PATCH] uml: fix compilation problemsJeff Dike
Fix a few miscellaneous compilation problems - an assignment with mismatched types in ldt.c a missing include in mconsole.h which needs a definition of uml_pt_regs I missed removing an include of user_util.h in hostfs Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-29[PATCH] uml: fix LVM crashJason Lunz
Permit lvm to create logical volumes without crashing UML. When device-mapper's DM_DEV_CREATE_CMD ioctl is called to create a new device, dev_create()->dm_create()->alloc_dev()-> blk_queue_bounce_limit(md->queue, BLK_BOUNCE_ANY) is called. blk_queue_bounce_limit(BLK_BOUNCE_ANY) calls init_emergency_isa_pool() if blk_max_pfn < blk_max_low_pfn. This is the case on UML, but init_emergency_isa_pool() hits BUG_ON(!isa_page_pool) because there doesn't seem to be a dma zone on UML for mempool_create() to allocate from. Most architectures seem to have max_low_pfn == max_pfn, but UML doesn't because of the uml_reserved chunk it keeps for itself. From what I can see, max_pfn and max_low_pfn don't get much use after the bootmem-allocator stops being used anyway, except that they initialize the block layer's blk_max_low_pfn/blk_max_pfn. This ensures init_emergency_isa_pool() doesn't crash uml in this situation by setting max_low_pfn == max_pfn in mem_init(). Signed-off-by: Jason Lunz <lunz@falooley.org> Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Cc: Alasdair G Kergon <agk@redhat.com> Cc: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-29[PATCH] uml: irq locking fixesJeff Dike
As the comment immediately preceding this points out, this list is changed in irq context, so it needs to be protected with spin_lock_irqsave in process context when it is processed. Sometimes, gcc should just compile the comments and forget the code. The IRQ side of this was better, in the sense that it blocked and unblocked interrupts, but it still should have saved and restored them. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-29[PATCH] uml: fix device unplug crashJeff Dike
Fix a NULL dereference when unplugging a device. The default value of err_msg wants to be "" in case the driver doesn't modify it. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-29[PATCH] uml: fix I/O hang when multiple devices are in useJeff Dike
Commit 62f96cb01e8de7a5daee472e540f726db2801499 introduced per-devices queues and locks, which was fine as far as it went, but left in place a global which controlled access to submitting requests to the host. This should have been made per-device as well, since it causes I/O hangs when multiple block devices are in use. This patch fixes that by replacing the global with an activity flag in the device structure in order to tell whether the queue is currently being run. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-29[PATCH] x86_64 irq: Fix comments after changing IRQ0_VECTOR from 0x20 to 0x30Yinghai Lu
Signed-off-by: Yinghai Lu <yinghai.lu@amd.com> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-29[ARM] 4289/1: AT91: SAM9260 NAND flash timingAndrew Victor
Fix the NAND flash timings on the AT91SAM9260. The current timings lead to the detection of a number of bad blocks. These timings are now set the same as on the AT91SAM9263. Patch from Nicolas Ferre. Signed-off-by: Andrew Victor <andrew@sanpeople.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-03-29[POWERPC] Fix dcr_unmap()Jean-Christophe Dubois
Fix a bug in dcr_unmap(). At unmap time the DCR offset need to be added instead of substracted. Signed-off-by: Jean-Christophe Dubois <jdubois@mc.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-03-28Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6Linus Torvalds
* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6: [VIDEO]: Fix section mismatch in cg3.c [SPARC]: sparc64 gcc-4.2.0 20070317 -Werror failure [VIDEO] ffb: Fix two DAC handling bugs. [SPARC32]: Fix SMP build regression [DRM]: Delete sparc64 FFB driver code that never gets built.
2007-03-28[PATCH] MSI-X: fix resume crashEric W. Biederman
So I think the right solution is to simply make pci_enable_device just flip enable bits and move the rest of the work someplace else. However a thorough cleanup is a little extreme for this point in the release cycle, so I think a quick hack that makes the code not stomp the irq when msi irq's are enabled should be the first fix. Then we can later make the code not change the irqs at all. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-28sh: Kill bogus GCC4 symbol exports.Paul Mundt
__sdivsi3_i4i, __udiv_qrnnd_16, and __udivsi3_i4i don't exist outside of the ST compiler, so kill them off. This causes compile failures with other GCC4 compilers. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-03-27[PATCH] Revert "swsusp: disable nonboot CPUs before entering platform suspend"Rafael J. Wysocki
This reverts commit 94985134b7b46848267ed6b734320db01c974e72 and insteads removes the WARN_ON() that caused that commit in the first place. The problem is that we call disable_nonboot_cpus() in swsusp before powering down the system in order to avoid triggering the WARN_ON() in arch/x86_64/kernel/acpi/sleep.c:init_low_mapping() and this doesn't work well on Thomas' system. So instead, remove the WARN_ON() in arch/x86_64/kernel/acpi/sleep.c: init_low_mapping(), which triggers every time during the suspend to disk in the platform mode, as the potential problem it is related to doesn't seem to occur in practice. [ I think we might want to disallow the case of multiple users of that mm, or something. Normally, playing with the current process page tables on the current CPU should be fine as long as we don't have other threads using those tables at the same time.. Anyway, not pretty, but better than the warning or the lockup - Linus ] Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-27[PATCH] i386: Fix bogus return value in hpet_next_event()Thomas Gleixner
The clockevents / tick management code expects an error value, when the event is already expired. hpet_next_event() returns 1 in that case. Fix it to return the proper -ETIME error code. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-27[PATCH] uml: use correct register file size everywhereJeff Dike
This patch uses MAX_REG_NR consistently to refer to the register file size. FRAME_SIZE isn't sufficient because on x86_64, it is smaller than the ptrace register file size. MAX_REG_NR was introduced as a consistent way to get the number of registers, but wasn't used everywhere it should be. When this causes a problem, it makes PTRACE_SETREGS fail on x86_64 because of a corrupted segment register value in the known-good register file. The patch also adds a register dump at that point in case there are any future problems here. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-26[SPARC32]: Fix SMP build regressionRobert Reif
commit b19cbe2a1695c09c74f83646c4b82b51123b3690 [BRIDGE]: Fix fdb RCU race breaks sparc SMP build because atomic_add_unless is not exported. This patch exports atomic_add_unless and atomic_cmpxchg. Signed-off-by: Robert Reif <reif@earthlink.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-03-26Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6Linus Torvalds
* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6: [S390] zcrypt: Fix ap_poll_requests counter in lost requests error path. [S390] zcrypt: Fix possible dead lock in AP bus module. [S390] cio: Device status validity. [S390] kprobes: Align probe address. [S390] Fix TCP/UDP pseudo header checksum computation. [S390] dasd: Work around gcc bug.
2007-03-26pci: set pci=bfsort for PowerEdge R900Matt Domsch
This patch automatically enables pci=bfsort for the Dell PowerEdge R900. This is necessary to ensure the onboard NICs enumerate in the proper order, similar to the other systems already on the list. Signed-off-by: Matt Domsch <Matt_Domsch@dell.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-03-26[S390] kprobes: Align probe address.David Wilder
Running a probe on s390 with a probe address that is not 4 byte aligned results in a Kernel BUG. The problem is that the stura instruction used by swap_instruction requires the destination address to be 4 byte aligned. As stura only writes 4 bytes, aligning to the next 4 byte aligned address results in the breakpoint instruction being stored past the probe address. The fix is to align the address backward (to the previous 4 byte aligned address) and writing the two byte breakpoint instruction in the appropriate bytes. Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: David Wilder <dwilder@us.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2007-03-24Merge master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds
* master.kernel.org:/home/rmk/linux-2.6-arm: [ARM] 4278/1: configure pxa27x I2C SCL as "input" [ARM] 4272/1: Missing symbol h1940_pm_return fix [ARM] 4235/1: ns9xxx: declare the clock functions as "const" [ARM] 4271/1: iop32x: fix ep80219 detection (support iq80219 platforms) [ARM] 4270/2: mach-s3c2443/irq.c off by one error in dma irqs
2007-03-24[PATCH] i386: Prevent early access to TSC to avoid crash on TSCless systemsThomas Gleixner
commit f9690982b8c2f9a2c65acdc113e758ec356676a3 removed the check for cpu_khz from sched_clock(), which prevented early access to the TSC by non obvious magic. This is harmless as long as the CPU has a TSC. On TSCless systems this results in an illegal instruction trap. Replace tsc_disabled and tsc_unstable by tsc_enabled, which is only set when the tsc is available and not unstable. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-24[MIPS] SB1250: Fix bugs/warnings by creative use of volatile.Ralf Baechle
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-24[MIPS] SB1: Fix pile of gcc's bogus format string warnings.Ralf Baechle
CC arch/mips/mm/cerr-sb1.o arch/mips/mm/cerr-sb1.c: In function 'sb1_cache_error': arch/mips/mm/cerr-sb1.c:235: warning: format '%010llx' expects type 'long long unsigned int', but argument 2 has type 'uint64_t' arch/mips/mm/cerr-sb1.c: In function 'extract_ic': arch/mips/mm/cerr-sb1.c:385: warning: format '%016llx' expects type 'long long unsigned int', but argument 3 has type 'uint64_t' arch/mips/mm/cerr-sb1.c:385: warning: format '%016llX' expects type 'long long unsigned int', but argument 6 has type 'uint64_t' arch/mips/mm/cerr-sb1.c: In function 'extract_dc': arch/mips/mm/cerr-sb1.c:523: warning: format '%010llx' expects type 'long long unsigned int', but argument 3 has type 'uint64_t' arch/mips/mm/cerr-sb1.c:523: warning: format '%016llX' expects type 'long long unsigned int', but argument 7 has type 'uint64_t' arch/mips/mm/cerr-sb1.c:570: warning: format '%016llX' expects type 'long long unsigned int', but argument 3 has type 'uint64_t' LD arch/mips/mm/built-in.o Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-24[MIPS] Jazz: Fix warning.Ralf Baechle
arch/mips/jazz/jazzdma.c:70: warning: assignment makes integer from pointer without a cast Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-24[MIPS] R3000: local_flush_data_cache_page take a pointer argument.Ralf Baechle
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-24[MIPS] Implement flush_anon_page().Ralf Baechle
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-24[MIPS] SPARSEMEM: The first pfn of zone should be min_low_pfn, not 0.Atsushi Nemoto
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-24[MIPS] Always use virt_to_phys() when translating kernel addressesFranck Bui-Huu
This patch fixes two places where we used plain 'x - PAGE_OFFSET' to achieve virtual to physical address convertions. This type of convertion is no more allowed since commit 6f284a2ce7b8bc49cb8455b1763357897a899abb. Reported-by: Maxime Bizon <mbizon@freebox.fr> Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com> [Build fixes for machines that don't use the generic dma-coherence.h] Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-23[PATCH] x86_64: avoid sending LOCAL_TIMER_VECTOR IPI to itselfThomas Gleixner
Ray Lee reported, that on an UP kernel with "noapic" command line option set, the box locks hard during boot. Adding some debug printks revealed, that the last action on the box before stalling was "Send IPI" - a debug printk which was put into smp_send_timer_broadcast_ipi(). It seems that send_IPI_mask(mask, LOCAL_TIMER_VECTOR) fails when "noapic" is set on the command line on an UP kernel. Aside of that it does not make much sense to trigger an interrupt instead of calling the function directly on the CPU which gets the PIT/HPET interrupt in case of broadcasting. Reported-by: Ray Lee <ray-lk@madrabbit.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Ray Lee <ray-lk@madrabbit.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-23x86-64: add "local_apic_timer_c2_ok" here tooLinus Torvalds
Needed for any architecture that claims ARCH_APICTIMER_STOPS_ON_C3, not just i386. I'm hoping Thomas will clean this up a bit later.. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-23[PATCH] i386: add command line option "local_apic_timer_c2_ok"Thomas Gleixner
It turned out that it is almost impossible to trust ACPI, BIOS & Co. regarding the C states. This was the reason to switch the local apic timer off in C2 state already. OTOH there are sane and well behaving systems, which get punished by that decision. Allow the user to confirm that the local apic timer is trustworthy in C2 state. This keeps the default behaviour on the safe side. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-22Merge branch 'release' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: ACPI: IA64: fix %ll build warnings ACPI: IA64: fix allnoconfig build ACPI: Only use IPI on known broken machines (AMD, Dothan/BaniasPentium M) ACPI: ibm-acpi: allow module to load when acpi notifiers can't be set (v2) ACPI: parse 2nd MADT by default ACPICA: revert "acpi_serialize" changes sony-laptop: MAINTAINERS fix entry, add L: and W: ACPI: resolve HP nx6125 S3 immediate wakeup regression ACPI: Add support to parse 2nd MADT
2007-03-22Merge branch 'merge' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: [POWERPC] Bypass hcall stats until cpu features have run [POWERPC] Avoid hypervisor statistics calculation in real mode [POWERPC] Fix atomicity of TIF update in flush_thread()
2007-03-22[PATCH] setup_boot_APIC_clock() irq-enable fixIngo Molnar
latest -git triggers an irqtrace/lockdep warning of a leaked irqs-off condition: BUG: at kernel/fork.c:1033 copy_process() after some debugging it turns out that commit ca1b940c accidentally left interrupts disabled - which trickled down all the way to the first time we fork a kernel thread and triggered the warning. the fix is to re-enable interrupts in the 'else' branch of setup_boot_APIC_clock()'s pmtimers calibration path. Reported-by: Michal Piotrowski <michal.k.k.piotrowski@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Acked-by: Thomas Gleixner <tglx@brown.paperbag.linutronix.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-22[PATCH] i386: disable local apic timer via command line or dmi quirkThomas Gleixner
The local APIC timer stops to work in deeper C-States. This is handled by the ACPI code and a broadcast mechanism in the clockevents / tick managment code. Some systems do not expose the deeper C-States to the kernel, but switch into deeper C-States behind the kernels back. This delays the local apic timer interrupts for ever and makes the systems unusable. Add a command line option to disable the local apic timer and a dmi quirk for known broken systems. Andi sayeth: While not wrong by itself i think it is still better to use some heuristic -- like "has battery in ACPI" With the DMI table if the problem is more wide spread we will just continue extending it. But anyways should be ok now for .21 although I'm not really happy with it. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Ingo Molnar <mingo@elte.hu> Cc: john stultz <johnstul@us.ibm.com> Grudgingly-acked-by: Andi Kleen <ak@suse.de> Cc: Len Brown <lenb@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-22[PATCH] i386: clockevents fix breakage on Geode/Cyrix PIT implementationsThomas Gleixner
The PIT has no dedicated mode for shut down. The only way to disable PIT is to put it into one shot mode. AMD implementations of PIT on Geode (also observed on Cyrix) are confused by an "empty" transition from CLOCK_EVT_MODE_UNUSED to CLOCK_EVT_MODE_SHUTDOWN, which puts the PIT into one shot mode momentarily. I realized after staring helpless at the bug report http://bugzilla.kernel.org/show_bug.cgi?id=8027 for quite a while, that the only change, which might influence the bogomips calibration, is the above transition during the PIT initialization. Avoiding the unnecessary switch to oneshot and later to periodic mode fixes the weird bogomips value and also the resulting slowness. The fix is confirmed on OLPC and another Geode based box. Note: this is unrelated to the Dual Core problem discussed here: http://lkml.org/lkml/2007/3/17/48 Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-22[POWERPC] Bypass hcall stats until cpu features have runAnton Blanchard
I noticed that we execute hcalls before cpu feature code has run (eg for setting up the bolted kernel region). This means that we may be executing code that is not appropriate for the processor we have. Create an unconditional branch that we nop out all the time to fix this. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-03-22[POWERPC] Avoid hypervisor statistics calculation in real modeMohan Kumar M
kexec invokes plpar_hcall hypervisor call in real mode. plpar_hcall refers to per cpu variables for accounting hypervisor statistics. These variables may not be in the RMO region, so accesses to them in real mode may result in a data storage exception. This fixes this problem by using a new plpar_hcall_raw function which does not update the hypervisor call statistics. Thanks to Anton for suggesting this idea. Signed-off-by: Mohan Kumar M <mohan@in.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-03-21Merge branch 'release' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6 * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6: [IA64] Fix wrong /proc/iomem on SGI Altix [IA64] Altix: ioremap vga_console_iobase [IA64] Fix typo/thinko in crash.c [IA64] Fix get_model_name() for mixed cpu type systems [IA64] min_low_pfn and max_low_pfn calculation fix
2007-03-20[ARM] 4272/1: Missing symbol h1940_pm_return fixKrzysztof Helt
Added missing ifdefs, to make kernel linkable without the PM support. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-03-20[IA64] Fix wrong /proc/iomem on SGI AltixBernhard Walle
In sn_io_slot_fixup(), the parent is re-set from the bus to io(port|mem)_resource because the address is changed in a way that it's not child of the bus any more. However, only the root is set but not the parent/child/sibling relationship in the resource tree which causes 'cat /proc/iomem' to stop after this memory area. Depding on the poition in the tree the iomem may be nearly completely empty. Signed-off-by: Bernhard Walle <bwalle@suse.de> Acked-by: John Keller <jpk@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2007-03-20[IA64] Altix: ioremap vga_console_iobaseJohn Keller
When booting an SN system without specifing a console (i.e., no "console=" on boot line), the system will hang during boot at the point where /sbin/init is run. The problem is that vga_console_iobase is not converted to a virtual address before storing in io_space[0].mmio_base. The conversion was happening in sn_scan_pcdp(), but not in setup_vga_console(). Signed-off-by: John Keller <jpk@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2007-03-20[IA64] Fix typo/thinko in crash.cJay Lan
Clearly should be checking for "val == DIE_INIT_SLAVE_ENTER". Signed-off-by: Jay Lan <jlan@sgi.com> Acked-by: Simon Horman <horms@verge.net.au> Signed-off-by: Tony Luck <tony.luck@intel.com>
2007-03-20[IA64] Fix get_model_name() for mixed cpu type systemsJack Steiner
If a system consists of mixed processor types, kmalloc() can be called before the per-cpu data page is initialized. If the slab contains sufficient memory, then kmalloc() works ok. However, if the slabs are empty, slab calls the memory allocator. This requires per-cpu data (NODE_DATA()) & the cpu dies. Also noted by Russ Anderson who had a very similar patch. Signed-off-by: Jack Steiner <steiner@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2007-03-20[IA64] min_low_pfn and max_low_pfn calculation fixZou Nan hai
We have seen bad_pte_print when testing crashdump on an SN machine in recent 2.6.20 kernel. There are tons of bad pte print (pfn < max_low_pfn) reports when the crash kernel boots up, all those reported bad pages are inside initmem range; That is because if the crash kernel code and data happens to be at the beginning of the 1st node. build_node_maps in discontig.c will bypass reserved regions with filter_rsvd_memory. Since min_low_pfn is calculated in build_node_map, so in this case, min_low_pfn will be greater than kernel code and data. Because pages inside initmem are freed and reused later, we saw pfn_valid check fail on those pages. I think this theoretically happen on a normal kernel. When I check min_low_pfn and max_low_pfn calculation in contig.c and discontig.c. I found more issues than this. 1. min_low_pfn and max_low_pfn calculation is inconsistent between contig.c and discontig.c, min_low_pfn is calculated as the first page number of boot memmap in contig.c (Why? Though this may work at the most of the time, I don't think it is the right logic). It is calculated as the lowest physical memory page number bypass reserved regions in discontig.c. max_low_pfn is calculated include reserved regions in contig.c. It is calculated exclude reserved regions in discontig.c. 2. If kernel code and data region is happen to be at the begin or the end of physical memory, when min_low_pfn and max_low_pfn calculation is bypassed kernel code and data, pages in initmem will report bad. 3. initrd is also in reserved regions, if it is at the begin or at the end of physical memory, kernel will refuse to reuse the memory. Because the virt_addr_valid check in free_initrd_mem. So it is better to fix and clean up those issues. Calculate min_low_pfn and max_low_pfn in a consistent way. Signed-off-by: Zou Nan hai <nanhai.zou@intel.com> Acked-by: Jay Lan <jlan@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2007-03-20Pull misc-for-upstream into release branchLen Brown
2007-03-19ACPI: IA64: fix allnoconfig buildLen Brown
The evils of Kconfig's select bite us once again... ia64/Kconfig selects ACPI, which depends on PM. But select ignores dependencies, allnoconfig chooses CONFIG_PM=n, and thus the menu of sub-options under ACPI vanish, which breaks the build. Manually select PM along with ACPI for now. Some day, we should delete them both, or fix select. Cc: Tony Luck <tony.luck@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-19Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6Linus Torvalds
* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6: [SPARC64]: store-init needs trailing membar.