aboutsummaryrefslogtreecommitdiffstats
path: root/arch
AgeCommit message (Collapse)AuthorFilesLines
2005-11-22[PATCH] uml: eliminate use of local in clone stubJeff Dike1-4/+6
We have a bug in the i386 stub_syscall6 which pushes ebp before the system call and pops it afterwards. Because we use syscall6 to remap the stack, the old contents of the stack (and the former value of ebp) are no longer available. Some versions of gcc make from a real local, accessed through ebp, despite my efforts to make it obvious that references to from are really constants. This patch attempts to make it even more obvious by eliminating from and using a macro to access the stub's data explicitly with constants. My original thinking on this was to replace syscall6 with a remap_stack interface which saved ebp someplace and restored it afterwards. The problem is that there are no registers to put it in, except for esp. That could work, since we can store a constant in esp after the mmap because we just replaced the stack. However, this approach seems a tad cleaner. Signed-off-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-21Merge master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds3-3/+4
2005-11-21Merge branch 'release' of ↵Linus Torvalds3-1/+6
git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
2005-11-21[IA64-SGI] bte_copy nasid_index fixRuss Anderson1-0/+1
The nasid_index was not being incremented if the pointer was null, causing an infinite loop. Signed-off-by: Russ Anderson (rja@sgi.com) Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-11-21[IA64] fix bug in sn/ia64 for sparse CPU numberinghawkes@sgi.com1-1/+2
The kernel's use of the for_each_*cpu(i) macros has allowed for sparse CPU numbering. When I hacked the kernel to test sparse cpu_present_map[] and cpu_possible_map[] cpumasks, I discovered one remaining spot, in sn_hwperf_ioctl() during sn initialization, that needs to be fixed. Signed-off-by: John Hawkes <hawkes@sgi.com> Signed-off-by: Dean Roe <roe@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-11-21[IA64] Prevent sn2 ptc code from executing on all ia64 subarchesPrarit Bhargava1-0/+3
Patch to prevent sn2_ptc_init code from attempting to load on non-sn2 systems when sn2_smp.c is built-in to generic kernel. Signed-off-by: Prarit Bhargava <prarit@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-11-21[ARM] Shut up gcc warning in clps7500 core.cRussell King1-1/+1
core.c:263: warning: initialization makes integer from pointer without a cast Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-21[ARM] Shut up gcc warning in assabet.cRussell King1-1/+2
assabet.c:291: warning: 'scr' may be used uninitialized in this function Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-21[ARM] 3170/1: Sharp SL-6000x: platform device conversion fixupDirk Opfer1-1/+1
Patch from Dirk Opfer Fix an error in tosa.c after the platform device conversion. Signed-off-by: Dirk Opfer <Dirk@Opfer-Online.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-20[PATCH] Register disabled CPUsAshok Raj1-3/+1
Needed to make the earlier use disabled CPUs for CPU hotplug patch actually work. Need to register disabled processors as well, so we can count them towards cpu_possible_map as hot pluggable cpus. Signed-off-by: Ashok Raj <ashok.raj@intel.com> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-20[PATCH] i386: Use bigsmp for > 8 core Opteron systemsAndi Kleen1-2/+3
bigsmp is reported to work on large Opteron systems on 32bit too. Enable it by default there. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-19Merge master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds9-227/+33
2005-11-19powerpc: Fix bug in timebase synchronization on 32-bit SMP powermacPaul Mackerras1-2/+4
We were using udelay in the loop on the primary cpu waiting for the secondary cpu to take the timebase value. Unfortunately now that udelay uses the timebase, and the timebase is stopped at this point, the udelay never terminated. This fixes it by not using udelay, and increases the number of loops before we time out to compensate. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-19[ARM] 3168/1: Update ARM signal delivery and maskingDaniel Jacobowitz4-201/+14
Patch from Daniel Jacobowitz After delivering a signal (creating its stack frame) we must check for additional pending unblocked signals before returning to userspace. Otherwise signals may be delayed past the next syscall or reschedule. Once that was fixed it became obvious that the ARM signal mask manipulation was broken. It was a little bit broken before the recent SA_NODEFER changes, and then very broken after them. We must block the requested signals before starting the handler or the same signal can be delivered again before the handler even gets a chance to run. Signed-off-by: Daniel Jacobowitz <dan@codesourcery.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-19powerpc: move include/asm-ppc64/ptrace-common.h to arch/powerpc/kernelPaul Mackerras3-2/+168
It's only used by arch/powerpc/kernel/ptrace{,32}.c. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-19powerpc: Merge pci.hPaul Mackerras2-20/+1
This involves some minor changes: a few unused functions that the ppc32 pci.c provides are no longer declared here or exported; pcibios_assign_all_busses now just refers to the pci_assign_all_buses variable on both 32-bit and 64-bit; pcibios_scan_all_fns is now just 0 instead of a function that always returns 0 on 64-bit. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-19[PATCH] powerpc: Remove imalloc.hDavid Gibson4-4/+19
asm-ppc64/imalloc.h is only included from files in arch/powerpc/mm. We already have a header for mm local definitions, arch/powerpc/mm/mmu_decl.h. Thus, this patch moves the contents of imalloc.h into mmu_decl.h. The only exception are the definitions of PHBS_IO_BASE, IMALLOC_BASE and IMALLOC_END. Those are moved into pgtable.h, next to similar definitions of VMALLOC_START and VMALLOC_SIZE. Built for multiplatform 32bit and 64bit (ARCH=powerpc). Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-19[PATCH] powerpc: Fix setting MPIC priorityBenjamin Herrenschmidt1-5/+8
Trying to set the priority would just disable the interrupt due to an incorrect mask used. We rarely use that call, in fact, I think only in the powermac code for the cmd-power key combo that triggers xmon. So it got unnoticed for a while. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-18Merge branch 'master'Kyle McMartin33-6825/+684
2005-11-18Merge branch 'release' of ↵Linus Torvalds1-62/+71
git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
2005-11-18Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc-mergeLinus Torvalds30-6761/+611
2005-11-18[ARM] Fix get_user when passed a const pointerRussell King2-12/+0
Unfortunately, later gcc versions error out when our get_user is passed a const pointer, since we write to a temporary variable declared as typeof(*(p)) which propagates the const-ness. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-18powerpc: Move defconfig over and remove remaining arch/ppc64 filesPaul Mackerras8-6019/+244
make defconfig will now use arch/powerpc/configs/ppc64_defconfig if running on a ppc64 system. I need to add an arch/powerpc/configs/ppc_defconfig sometime. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-18powerpc: Fix a couple of compile warnings for 32-bit compilesPaul Mackerras2-1/+1
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-18powerpc: time-of-day fixes for 32-bit CHRP systemsPaul Mackerras3-6/+14
This makes 32-bit CHRP systems use the RTAS time-of-day routines if available. It fixes a bug in the RTAS time-of-day routines where they were storing a 64-bit timebase value in an unsigned long by making those variables u64. Also, the direct-access time-of-day routines had the wrong convention for the month and year in the struct rtc_time. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-18powerpc: Fix compile error on pSeries arising from delay.h changesPaul Mackerras1-2/+2
pseries_dedicated_idle() was using __get_tb which used to be defined in asm/delay.h. Change it to use get_tb from asm/time.h, which is in fact exactly the same thing. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-18powerpc: Move remaining .c files from arch/ppc64 to arch/powerpcPaul Mackerras6-152/+6
This also deletes the now-unused Makefiles under arch/ppc64. Both of the files moved over could use some merging, but for now I have moved them as-is and arranged for them to be used only in 64-bit kernels. For 32-bit kernels we still use arch/ppc/kernel/idle.c and drivers/char/generic_nvram.c as before. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-18[PATCH] Remove SPAN_OTHER_NODES config definitionMike Kravetz2-14/+0
The config option SPAN_OTHER_NODES was created so that we could make pSeries numa layouts work within the DISCONTIG memory model. Now that DISCONTIG has been replaced by SPARSEMEM, we can eliminate this option. I'll be sending a separate patch to Andrew to remove the arch independent code as pSeries was the only arch that needed this. Signed-off-by: Mike Kravetz <kravetz@us.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-18[PATCH] powerpc: merge align.cBenjamin Herrenschmidt5-544/+268
This patch merges align.c, the result isn't quite what was in ppc64 nor what was in ppc32 :) It should implement all the functionalities of both though. Kumar, since you played with that in the past, I suppose you have some test cases for verifying that it works properly before I dig out the 601 machine ? :) Since it's likely that I won't be able to test all scenario, code inspection is much welcome. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-18powerpc: Fix delay functions for 601 processorsPaul Mackerras2-8/+28
My earlier merge of delay.h introduced a timebase-based udelay for 32-bit machines but also broke the 601, which doesn't have the timebase register. This fixes it by using the 601's RTC register on the 601, and also moves __delay() and udelay() to be out-of-line in arch/powerpc/kernel/time.c. These functions aren't really performance critical, after all. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-18[PATCH] ppc: Fix warnings related to seq_fileKumar Gala2-2/+2
When we moved things around in irq.h seq_file became an issue. Fix warnings related to its usage. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-18[PATCH] ppc: Fix MPC83xx device tableKumar Gala1-2/+26
The SVRs for MPC8343/E were incorrect and really the SVRs for MPC8347/E. Signed-off-by: David Updegraff <dave@cray.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-18[PATCH] powerpc: Maple: request I/O resource.Segher Boessenkool1-1/+10
Reserve the Maple RTC I/O resource. Needed now we use genrtc. Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-18[PATCH] ppc boot: replace string labels with numbersOlaf Hering1-12/+11
Replacing the string labels with numbers saves 117 bytes in the final zImage. These local labels are not discared. Signed-off-by: Olaf Hering <olh@suse.de> arch/powerpc/boot/crt0.S | 23 +++++++++++------------ 1 files changed, 11 insertions(+), 12 deletions(-) Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-17[PATCH] ppc: Fix warnings related to seq_fileKumar Gala2-2/+2
When we moved things around in irq.h seq_file became an issue. Fix warnings related to its usage. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-17[ARM] Fix some corner cases in new mm initialisationRussell King1-11/+13
Document that the VMALLOC_END address must be aligned to 2MB since it must align with a PGD boundary. Allocate the vectors page early so that the flush_cache_all() later will cause any dirty cache lines in the direct mapping will be safely written back. Move the flush_cache_all() to the second local_flush_cache_tlb() and remove the now redundant first local_flush_cache_tlb(). Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-17[PARISC] Remove unused variable in signal.cGrant Grundler1-1/+0
Remove unused variable "struct siginfo si" in signal.c Signed-off-by: Grant Grundler <grundler@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-11-17[PARISC] remove drm compat ioctls handlersChristoph Hellwig1-541/+0
Remove drm compat_ioctl handlers. The drm drivers have proper compat_ioctl methods these days. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Matthew Wilcox <willy@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-11-17[PARISC] move PA perf driver over to ->compat_ioctlChristoph Hellwig2-18/+20
Move PA perf driver over to ->compat_ioctl. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Randolph Chung <tausq@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-11-17[PARISC] Fix some compile problems in ptrace.cMatthew Wilcox1-2/+3
Fix some compile problems: - ret wasn't being initialised in all code paths - I'm pretty sure 'goto out' should have been 'goto out_tsk' Signed-off-by: Matthew Wilcox <willy@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-11-17[PARISC] Improve the error message when we get a clashing mod pathMatthew Wilcox1-2/+6
Improve the error message when we get a clashing mod path, and actually display the IODC data and path for the conflicting device. Signed-off-by: Matthew Wilcox <willy@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-11-17[PARISC] Return PDC_OK when alloc_pa_dev fails to enumerate all devicesMatthew Wilcox1-1/+1
Return PDC_OK when device registration fails so that we enumerate all subsequent devices, even when we get two devices with the same hardware path (which should never happen, but does with at least one revision of rp8400 firmware). Signed-off-by: Matthew Wilcox <willy@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-11-17[PARISC] Document some register usages in assembly filesCarlos O'Donell2-1/+3
Document clobbers and args in entry.S and syscall.S. entry.S: Add comment to indicate that cr27 may recycle and EDEADLOCK detection is not 100% correct. Since this is only enabled when using ENABLE_LWS_DEBUG, the user is warned by the comment. Signed-off-by: Carlos O'Donell <carlos@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-11-17[PARISC] Make redirecting irq messages less noisyRyan Bradetich1-1/+1
Make the "redirecting irq" message to not display on the console by setting the severity to KERN_DEBUG. The console was basically unusable. Signed-off-by: Ryan Bradetich <rbrad@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-11-17[PARISC] irq_affinityp[] only available for SMP buildsGrant Grundler1-2/+9
irq_affinityp[] only available for SMP builds, make code that uses it conditional on CONFIG_SMP. Signed-off-by: Grant Grundler <grundler@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-11-17[PARISC] Add IRQ affinitiesJames Bottomley1-2/+58
This really only adds them for the machines I can check SMP on, which is CPU interrupts and IOSAPIC (so not any of the GSC based machines). With this patch, irqbalanced can be used to maintain irq balancing. Unfortunately, irqbalanced is a bit x86 centric, so it doesn't do an incredibly good job, but it does work. Signed-off-by: James Bottomley <jejb@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-11-17[PARISC] Fix uniprocessor build by dummying smp_send_all_nop()Kyle McMartin1-0/+2
Since irq.c uses smp_send_all_nop, we must define it for UP builds as well. Make it a static inline so it gets optimized away. This forces irq.c to include <asm/smp.h> though. Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-11-17[PARISC] Fix our interrupts not to use smp_call_functionJames Bottomley2-15/+31
Fix our interrupts not to use smp_call_function On K and D class smp, the generic code calls this under an irq spinlock, which causes the WARN_ON() message in smp_call_function() (and is also illegal because it could deadlock). The fix is to use a new scheme based on the IPI_NOP. Signed-off-by: James Bottomley <jejb@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-11-17[PARISC] Disable nesting of interruptsGrant Grundler1-7/+6
Disable nesting of interrupts - still has holes The offending sequence starts out like this: 1) take external interrupt 2) set_eiem() to only allow TIMER_IRQ; local interrupts still disabled 3) read the EIRR to get a "list" of pending interrupts 4) clear EIRR of pending interrupts we intend to handle 5) call __do_IRQ() to handle IRQ. 6) handle_IRQ_event() enables local interrupts (I-Bit) 7) take a timer interrupt 8) read EIRR to get a new list of pending interrupts 9) clear EIRR of pending interrupts we just read 10) handle pending interrupts found in (8) 11) set_eiem(cpu_eiem) and return [ TROUBLE! all enabled CPU IRQs are unmasked. } 12) handle remaining interrupts pending from (3) e.g. call __do_IRQ() -> handle_IRQ_event()..etc [ TROUBLE! call to handle_IRQ_event() can now enable *any* IRQ. } 13) set_eiem(cpu_eiem) and return The problem is we now get into ugly race conditions with Timer and IPI interrupts at this point. I'm not exactly sure what happens when things go wrong (perhaps nest calls to IPI or timer interrupt?). But I'm certain it's not good. This sequence will break sooner if (10) would accidentally leave interrupts enabled. I'm pretty sure the right answer is now to make cpu_eiem a per CPU variable since all external interrupts on parisc are per CPU. This means we will NOT need to send an IPI to every CPU in the system when enabling or disabling an IRQ since only one CPU needs to change it's EIEM. Thanks to James Bottomley for (once again) pointing out the problem. Signed-off-by: Grant Grundler <grundler@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-11-17[PARISC] Make sure timer and IPI execute with interrupts disabledJames Bottomley2-0/+6
Fix a longstanding smp bug The problem is that both the timer and ipi interrupts are being called with interrupts enabled, which isn't what anyone is expecting. The IPI issue has just started to show up by causing a BUG_ON in the slab debugging code. The timer issue never shows up because there's an eiem work around in our irq.c The fix is to label both these as SA_INTERRUPT which causes the generic irq code not to enable interrupts. I also suspect the smp_call_function timeouts we're seeing might be connected with the fact that we disable IPIs when handling any other type of interrupt. I've put a WARN_ON in the code for executing smp_call_function() with IPIs disabled. Signed-off-by: James Bottomley <jejb@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-11-17Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linusLinus Torvalds57-749/+1982
2005-11-17[IA64] polish comments for tlb fault handler in ivt.SChen, Kenneth W1-62/+71
Polish the comments specifically in vhpt_miss and nested_dtlb_miss handlers. I think it's better to explicitly name each page table level with its name instead of numerically name them. i.e., use pgd, pud, pmd, and pte instead of referring as L1, L2, L3 etc. Along the line, remove some magic number in the comments like: "PTA + (((IFA(61,63) << 7) | IFA(33,39))*8)". No code change at all, pure comment update. Feel free to shoot anything you have, darts or tomahawk cruise missile. I will duck behind a bunker ;-) Signed-off-by: Ken Chen <kenneth.w.chen@intel.com> Acked-by: Robin Holt <holt@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-11-17[IA64] 4 level page table bug fix in vhpt_missChen, Kenneth W1-2/+2
From source code inspection, I think there is a bug with 4 level page table with vhpt_miss handler. In the code path of rechecking page table entry against previously read value after tlb insertion, *pte value in register r18 was overwritten with value newly read from pud pointer, render the check of new *pte against previous *pte completely wrong. Though the bug is none fatal and the penalty is to purge the entry and retry. For functional correctness, it should be fixed. The fix is to use a different register so new *pud don't trash *pte. (btw, the comments in the cmp statement is wrong as well, which I will address in the next patch). Signed-off-by: Ken Chen <kenneth.w.chen@intel.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-11-17[ARM] __ioremap doesn't use 4th argumentRussell King1-2/+1
The "align" argument in ARMs __ioremap is unused and provides a misleading expectation that it might do something. It doesn't. Remove it. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-17Merge master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds12-69/+137
2005-11-17[ARM] Improve comment about ASSERT()s in vmlinux.lds.SRussell King1-1/+5
Provide folk with an idea what to do if the ASSERT statements fail with their linker. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-17[MIPS] Update defconfigsRalf Baechle45-654/+1917
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-11-17[MIPS] SEAD: More build fixes.Ralf Baechle2-13/+3
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-11-17[MIPS] TX3927: Try to glue the PCI code.Ralf Baechle1-71/+43
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-11-17[MIPS] Ocelot G: Use CPU_MASK_NONE instead of 0 to initialize cpu mask.Ralf Baechle1-1/+1
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-11-17[MIPS] JMR3927: Fix compilation by including <linux/ds1742rtc.h>.Ralf Baechle1-1/+1
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-11-17[MIPS] JMR3927: need include/asm-mips/mach-jmr3927 in it's include path.Ralf Baechle1-0/+1
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-11-17[MIPS] JMR3927: It's ops-tx3927.o not ops-jmr3927.oRalf Baechle1-1/+1
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-11-17[MIPS] Alchemy: Console output fixupPantelis Antoniou1-1/+1
This is needed to make console output appear with the new driver... Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-11-17[MIPS] IP32: Fix sparse warnings.Arnaud Giersch1-2/+2
Add __iomem qualifier to crime and mace pointers. Signed-off-by: Arnaud Giersch <arnaud.giersch@free.fr> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-11-17[MIPS] IP32: Export mace symbol.Arnaud Giersch1-0/+3
Export mace symbol so that it can be used in modules. Signed-off-by: Arnaud Giersch <arnaud.giersch@free.fr> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-11-17[MIPS] JMR3927: Fix syntax error.Ralf Baechle1-1/+1
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-11-17[MIPS] JMR3927: Undo accidental rename.Ralf Baechle1-1/+1
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-11-17[MIPS] DDB5477: Fix unused variable warning.Ralf Baechle1-3/+7
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-11-17[PATCH] Avoid use of uninitialised spinlock in EEH.David Woodhouse1-1/+2
If the kernel supports both G5 and pSeries, and CONFIG_EEH is enabled, eeh_init() is (quite reasonably) never called when we boot on a G5. Yet eeh_check_failure() still gets called. We should avoid doing that if !eeh_subsystem_enabled. Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-16[ARM] sa1111.c needs asm/sizes.hRussell King1-0/+1
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-16[ARM] Move zone adjustment for SA1111 on SA11x0 platformsRussell King1-0/+11
Unfortunately, using PAGE_SHIFT in asm/arch/memory.h is unsafe, and we can't include asm/page.h into this file because then we have a circular dependency. Move the offending code to arch/arm/common/sa1111.c instead. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-16Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc-mergeLinus Torvalds42-394/+633
2005-11-16[ARM] 3162/1: S3C2410 - updated defconfigBen Dooks1-25/+94
Patch from Ben Dooks Minor changes, including add SysRq, selecting the DM9000 as a built-in driver, not as a module, and selecting the framebuffer. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-16[ARM] 3161/1: BAST - fix commas on end of structsBen Dooks1-14/+14
Patch from Ben Dooks Make the use of , on the lsat entry structs consistenent through arch/arm/mach-s3c2410/mach-bast.c Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-16[ARM] compressed/head.S debugging defaults to asm/arch/debug-macro.SRussell King1-19/+11
Since we want new platforms to use debug-macro.S, make the decompressor debugging method default to using this include file rather than having new platforms add to an #if defined(). Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-16[ARM] Include asm/hardware.h instead of asm/arch/hardware.hRussell King5-5/+5
Rationalise hardware.h include. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-16[ARM] Fix arch-realview/system.h to use __io_address()Russell King3-6/+1
Move __io_address to arch-realview/hardware.h, drop core.h from platsmp.c and localtimer.c, and include asm/io.h where required. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-16[PATCH] powerpc: Make the vDSO functions set error code (#2)Benjamin Herrenschmidt6-2/+16
The vDSO functions should have the same calling convention as a syscall. Unfortunately, they currently don't set the cr0.so bit which is used to indicate an error. This patch makes them clear this bit unconditionally since all functions currently succeed. The syscall fallback done by some of them will eventually override this if the syscall fails. This also changes the symbol version of all vdso exports to make sure glibc can differenciate between old and fixed calls for existing ones like __kernel_gettimeofday. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-16[PATCH] ppc: Fix build with CONFIG_CHRP not setBenjamin Herrenschmidt1-1/+4
Building ARCH=ppc for multiplatforms with CONFIG_CHRP not set fails due to some unshielded code in xmon Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-16powerpc: Move ppc64 boot wrapper code over to arch/powerpcPaul Mackerras18-61/+91
This also extends the code to handle 32-bit ELF vmlinux files as well as 64-bit ones. This is sufficient for booting on new-world 32-bit powermacs (i.e. all recent machines). Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-16[PATCH] powerpc: add new powerbooks to feature tableOlof Johansson1-0/+8
Hi, The previous PowerBook patch didn't contain the feature table updates for ARCH=powerpc. Here they are. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-16[PATCH] ppc: Fix boot with yaboot with ARCH=ppcBenjamin Herrenschmidt1-1/+13
The merge of machine types broke boot with yaboot & ARCH=ppc due to the old code still retreiving the old-syle machine type passed in by yaboot. This patch fixes it by translating those old numbers. Since that whole mecanism is deprecated, this is a temporary fix until ARCH=ppc uses the new prom_init that the merged architecture now uses for both ppc32 and ppc64 (after 2.6.15) Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-16[PATCH] powerpc: pci_64 fixes & cleanupsBenjamin Herrenschmidt5-113/+104
I discovered that in some cases (PowerMac for example) we wouldn't properly map the PCI IO space on recent kernels. In addition, the code for initializing PCI host bridges was scattered all over the place with some duplication between platforms. This patch fixes the problem and does a small cleanup by creating a pcibios_alloc_controller() in pci_64.c that is similar to the one in pci_32.c (just takes an additional device node argument) that takes care of all the grunt allocation and initialisation work. It should work for both boot time and dynamically allocated PHBs. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-16[PATCH] powerpc: More debugging fixupsMichael Ellerman4-4/+7
Add a few more missing includes of udbg.h Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-16[PATCH] powerpc: Fixup debugging in lmb.cMichael Ellerman1-15/+18
Somewhere we lost the include of udbg.h in lmb.c. While we're there, add a DBG macro like every other file has and use it in lmb_dump_all(). Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-16[PATCH] powerpc: update defconfigsBenjamin Herrenschmidt5-185/+361
My patch moving ppc64 RTC to genrtc was supposed to update all defconfigs, but for some reason, the patch actually posted only had the pseries one... ouch. This patch properly updates all defconfigs. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-16[PATCH] ppc32 8xx: update_mmu_cache() needs unconditional tlbieMarcelo Tosatti1-12/+11
Currently 8xx fails to boot due to endless pagefaults. Seems the bug is exposed by the change which avoids flushing the TLB when not necessary (in case the pte has not changed), introduced recently: __handle_mm_fault(): entry = pte_mkyoung(entry); if (!pte_same(old_entry, entry)) { ptep_set_access_flags(vma, address, pte, entry, write_access); update_mmu_cache(vma, address, entry); lazy_mmu_prot_update(entry); } else { /* * This is needed only for protection faults but the arch code * is not yet telling us if this is a protection fault or not. * This still avoids useless tlb flushes for .text page faults * with threads. */ if (write_access) flush_tlb_page(vma, address); } The "update_mmu_cache()" call was unconditional before, which caused the TLB to be flushed by: if (pfn_valid(pfn)) { struct page *page = pfn_to_page(pfn); if (!PageReserved(page) && !test_bit(PG_arch_1, &page->flags)) { if (vma->vm_mm == current->active_mm) { #ifdef CONFIG_8xx /* On 8xx, cache control instructions (particularly * "dcbst" from flush_dcache_icache) fault as write * operation if there is an unpopulated TLB entry * for the address in question. To workaround that, * we invalidate the TLB here, thus avoiding dcbst * misbehaviour. */ _tlbie(address); #endif __flush_dcache_icache((void *) address); } else flush_dcache_icache_page(page); set_bit(PG_arch_1, &page->flags); } Which worked to due to pure luck: PG_arch_1 was always unset before, but now it isnt. The root of the problem are the changes against the 8xx TLB handlers introduced during v2.6. What happens is the TLBMiss handlers load the zeroed pte into the TLB, causing the TLBError handler to be invoked (thats two TLB faults per pagefault), which then jumps to the generic MM code to setup the pte. The bug is that the zeroed TLB is not invalidated (the same reason for the "dcbst" misbehaviour), resulting in infinite TLBError faults. The "two exception" approach requires a TLB flush (to nuke the zeroed TLB) at each PTE update for correct behaviour: Signed-off-by: Marcelo Tosatti <marcelo.tosatti@cyclades.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-15[PATCH] powerpc: Fix sparsemem with memory holes [was Re: ppc64 oops..]Paul Mackerras2-3/+10
This patch should fix the crashes we have been seeing on 64-bit powerpc systems with a memory hole when sparsemem is enabled. I'd appreciate it if people who know more about NUMA and sparsemem than me could look over it. There were two bugs. The first was that if NUMA was enabled but there was no NUMA information for the machine, the setup_nonnuma() function was adding a single region, assuming memory was contiguous. The second was that the loops in mem_init() and show_mem() assumed that all pages within the span of a pgdat were valid (had a valid struct page). I also fixed the incorrect setting of num_physpages that Mike Kravetz pointed out. Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-15[PATCH] ia64: cpu_idle performance bug fixChen, Kenneth W1-7/+8
Our performance validation on 2.6.15-rc1 caught a disastrous performance regression on ia64 with netperf (-98%) and volanomark (-58%) compares to previous kernel version 2.6.14-git7. See the following chart (result group 1 & 2). http://kernel-perf.sourceforge.net/results.machine_id=26.html We have root caused it to commit 64c7c8f88559624abdbe12b5da6502e8879f8d28 This changeset broke the ia64 task resched notification. In sched.c:resched_task(), a reschedule IPI is conditioned upon TIF_POLLING_NRFLAG. However, the above changeset unconditionally set the polling thread flag for idle tasks regardless whether pal_halt_light is in use or not. As a result, resched IPI is not sent from resched_task(). And since the default behavior on ia64 is to use pal_halt_light, we end up delaying the rescheduling task until next timer tick, and thus cause the performance regression. This fixes the performance bug. I'm glad our performance suite is turning up bad performance bug like this in time. Signed-off-by: Ken Chen <kenneth.w.chen@intel.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-15Merge master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds2-17/+3
2005-11-15[ARM] Initialise SA1111 core before SA1111 PCMCIARussell King1-1/+1
This avoids a BUG_ON with kref.c when SA1111 tries to register a driver with an unregistered bus type. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-15[PATCH] v850: use generic hardirq codeChristoph Hellwig2-631/+13
Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Miles Bader <miles@gnu.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-15[PATCH] v850: Fix show_interruptsMiles Bader1-38/+43
A variable was being used in multiple conflicting ways. I also restructured the code a bit for clarity. Signed-off-by: Miles Bader <miles@gnu.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-15[PATCH] Add missing EXPORT_SYMBOLS() for __ide_mm_* functions on powerpcBen Collins1-0/+7
These exported symbols are in arch/ppc/ but missing from arch/powerpc/ for ppc32 builds. Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-15[PATCH] drop "[PATCH] i386 kexec-on-panic: Don't shutdown the apics"Vivek Goyal1-0/+7
A patch by Eric was merged (f2b36db692b7ff6972320ad9839ae656a3b0ee3e) and later on reverted back (1e4c85f97fe26fbd70da12148b3992c0e00361fd). Along with above patch, another patch was posted and has been merged (3d1675b41b02d64bd1185903ea0d25a8c0bb6dea). That patch was dependent on the above patch and now it should also be reverted. Cc: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-15[ARM] Use kernel/power/KconfigRussell King1-16/+2
Rather than defining our own PM option, use kernel/power/Kconfig. This fixes build errors introduced by bca73e4bf8563d83f7856164caa44d5f42e44cca Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-14Merge x86-64 update from AndiLinus Torvalds48-743/+1311
2005-11-14[PATCH] x86_64: Fix sparse memBob Picco2-4/+17
Fix up booting with sparse mem enabled. Otherwise it would just cause an early PANIC at boot. Signed-off-by: Bob Picco <bob.picco@hp.com> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14[PATCH] x86_64: Increase the maximum number of local APICs to the maximumAndi Kleen1-4/+7
This is needed for large multinode IBM systems which have a sparse APIC space in clustered mode, fully covering the available 8 bits. The previous kernels would limit the local APIC number to 127, which caused it to reject some of the CPUs at boot. I increased the maximum and shrunk the apic_version array a bit to make up for that (the version is only 8 bit, so don't need an full int to store) Cc: Chris McDermott <lcm@us.ibm.com> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14[PATCH] x86_64: Remove CONFIG_CHECKING and add command line option for ↵Andi Kleen4-65/+7
pagefault tracing CONFIG_CHECKING covered some debugging code used in the early times of the port. But it wasn't even SMP safe for quite some time and the bugs it checked for seem to be gone. This patch removes all the code to verify GS at kernel entry. There haven't been any new bugs in this area for a long time. Previously it also covered the sysctl for the page fault tracing. That didn't make much sense because that code was unconditionally compiled in. I made that a boot option now because it is typically only useful at boot. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14[PATCH] x86_64: Make node boundaries consistentMagnus Damm3-6/+1
The current x86_64 NUMA memory code is inconsequent when it comes to node memory ranges. The exact behaviour varies depending on which config option that is used. setup_node_bootmem() has start and end as arguments and these are used to calculate the size of the node like this: (end - start). This is all fine if end is pointing to the first non-available byte. The problem is that the current x86_64 code sometimes treats it as the last present byte and sometimes as the first non-available byte. The result is that some configurations might lose a page at the end of the range. This patch tries to fix CONFIG_ACPI_NUMA, CONFIG_K8_NUMA and CONFIG_NUMA_EMU so they all treat the end variable as the first non-available byte. This is the same way as the single node code. The patch is boot tested on dual x86_64 hardware with the above configurations, but maybe the removed code is needed as some workaround? Signed-off-by: Magnus Damm <magnus@valinux.co.jp> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14[PATCH] x86_64: Log machine checks from boot on Intel systemsAndi Kleen1-5/+9
The logging for boot errors was turned off because it was broken on some AMD systems. But give Intel EM64T systems a chance because they are supposed to be correct there. The advantage is that there is a chance to actually log uncorrected machine checks after the reset. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14[PATCH] x86_64: Make ACPI NUMA and NUMA emulation peers of K8_NUMA in KconfigRavikiran G Thirumalai1-15/+32
On x86_64 arches, there is no way to choose ACPI_NUMA without having to choose K8_NUMA. CONFIG_K8_NUMA is not needed for Intel EM64T NUMA boxes. It also looks odd if you have to select ACPI_NUMA from the power management menu. This patch fixes those oddities. Patch does the following: 1. Makes NUMA a config option like other arches 2. Makes topology detection options like K8_NUMA dependent on NUMA 3. Choosing ACPI NUMA detection can be done from the standard "Processor type and features" menu AK: I fixed up the dependencies and changed the help texts a bit on top of Kiran's patch. Signed-off-by: Ravikiran Thirumalai <kiran@scalex86.org> Signed-off-by: Shai Fultheim <shai@scalex86.org> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14[PATCH] x86_64: Use common sys_time64Paolo 'Blaisorblade' Giarrusso1-14/+0
Keeping this function does not makes sense because it's a copied (and buggy) copy of sys_time. The only difference is that now.tv_sec (which is a time_t, i.e. a 64-bit long) is copied (and truncated) into a int (32-bit). The prototype is the same (they both take a long __user *), so let's drop this and redirect it to sys_time (and make sure it exists by defining __ARCH_WANT_SYS_TIME). Only disadvantage is that the sys_stime definition is also compiled (may be fixed if needed by adding a separate __ARCH_WANT_SYS_STIME macro, and defining it for all arch's defining __ARCH_WANT_SYS_TIME except x86_64). Acked-by: Andi Kleen <ak@suse.de> Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14[PATCH] x86_64: Remove optimization for B stepping AMD K8Andi Kleen4-310/+2
B stepping were the first shipping Opterons. memcpy/memset/copy_page/ clear_page had special optimized version for them. These are really old and in the minority now and the difference to the generic versions (using rep microcode) is not that big anyways. So just remove them. TODO: figure out optimized versions for Intel Netburst based EM64T Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14[PATCH] x86_64: Reduce number of retries for reset through keyboard controllerAndi Kleen1-1/+1
Old code could retry for 10 seconds worst time. Only try it for one second now. Suggested by Yinghai Lu Cc: Yinghai.Lu@amd.com Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14[PATCH] x86_64: x86_64/i386 fix Intel cache detection code assumption about ↵Siddha, Suresh B1-14/+32
threads sharing Fix the Intel cache detection code assumption that number of threads sharing the cache will either be equal to number of HT or core siblings. This also cleans up the code in general a bit. Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14[PATCH] x86-64/i386: Intel HT, Multi core detection fixesSiddha, Suresh B8-108/+162
Fields obtained through cpuid vector 0x1(ebx[16:23]) and vector 0x4(eax[14:25], eax[26:31]) indicate the maximum values and might not always be the same as what is available and what OS sees. So make sure "siblings" and "cpu cores" values in /proc/cpuinfo reflect the values as seen by OS instead of what cpuid instruction says. This will also fix the buggy BIOS cases (for example where cpuid on a single core cpu says there are "2" siblings, even when HT is disabled in the BIOS. http://bugzilla.kernel.org/show_bug.cgi?id=4359) Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14[PATCH] x86_64: Don't enable interrupt unconditionally in reboot pathAndi Kleen2-4/+6
When they were disabled before (e.g. after a panic) it's better to keep them off, otherwise followon panics can happen from timer interrupt handlers etc. Drawback is that pageup in the console won't work anymore though. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14[PATCH] x86_64: Formatting fixes for arch/x86_64/kernel/process.cAndi Kleen1-20/+27
No functional changes. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14[PATCH] x86_64: Allow modular build of ia32 aout loaderAndi Kleen4-5/+7
Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14[PATCH] x86_64: Force correct address space size for MTRR on some 64bit ↵Shaohua Li2-0/+13
Intel Xeons They report 40bit, but only have 36bits of physical address space. This caused problems with setting up the correct masks for MTRR. CPUID workaround for steppings 0F33h(supporting x86) and 0F34h(supporting x86 and EM64T). Detail info can be found at: http://download.intel.com/design/Xeon/specupdt/30240216.pdf http://download.intel.com/design/Pentium4/specupdt/30235221.pdf Signed-off-by: Shaohua Li<shaohua.li@intel.com> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14[PATCH] x86_64: Optimize NUMA node hash functionEric Dumazet1-24/+43
Compute the highest possible value for memnode_shift, in order to reduce footprint of memnodemap[] to the minimum, thus making all users (phys_to_nid(), kfree()), more cache friendly. Before the patch : Node 0 MemBase 0000000000000000 Limit 00000001ffffffff Node 1 MemBase 0000000200000000 Limit 00000003ffffffff Using 23 for the hash shift. Max adder is 3ffffffff After the patch : Node 0 MemBase 0000000000000000 Limit 00000001ffffffff Node 1 MemBase 0000000200000000 Limit 00000003ffffffff Using 33 for the hash shift. In this case, only 2 bytes of memnodemap[] are used, instead of 2048 Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14[PATCH] x86_64: Save/restore CS in 64bit signal handlers and force __USER_CS ↵Bryan Ford1-0/+17
for CS This allows to run 64bit signal handlers in 64bit processes that run small code snippets in compat mode. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14[PATCH] x86_64: New heuristics to find out hotpluggable CPUs.Andi Kleen2-5/+42
With a NR_CPUS==128 kernel with CPU hotplug enabled we would waste 4MB on per CPU data of all possible CPUs. The reason was that HOTPLUG always set up possible map to NR_CPUS cpus and then we need to allocate that much (each per CPU data is roughly ~32k now) The underlying problem is that ACPI didn't tell us how many hotplug CPUs the platform supports. So the old code just assumed all, which would lead to this memory wastage. This implements some new heuristics: - If the BIOS specified disabled CPUs in the ACPI/mptables assume they can be enabled later (this is bending the ACPI specification a bit, but seems like a obvious extension) - The user can overwrite it with a new additionals_cpus=NUM option - Otherwise use half of the available CPUs or 2, whatever is more. Cc: ashok.raj@intel.com Cc: len.brown@intel.com Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14[PATCH] x86_64: Replace swiotlb extern with includeAndi Kleen1-4/+1
Minor victory on the continuous quest against all stray extern. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14[PATCH] x86_64: Replace cpu_pda extern with includeAndi Kleen1-2/+0
Minor cleanup - remove obsolete extern Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14[PATCH] x86_64: Only use asm/sections.h to declare section symbolsAndi Kleen5-16/+7
Adding __initdata_* to asm-generic/sections.h Replaces a lot of open coded externs in arch/x86_64/* I had to change __bss_end to __bss_stop to match the other architectures. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14[PATCH] x86_64: Unmap NULL during early bootupSiddha, Suresh B8-31/+53
We should zap the low mappings, as soon as possible, so that we can catch kernel bugs more effectively. Previously early boot had NULL mapped and didn't trap on NULL references. This patch introduces boot_level4_pgt, which will always have low identity addresses mapped. Druing boot, all the processors will use this as their level4 pgt. On BP, we will switch to init_level4_pgt as soon as we enter C code and zap the low mappings as soon as we are done with the usage of identity low mapped addresses. On AP's we will zap the low mappings as soon as we jump to C code. Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> Signed-off-by: Ashok Raj <ashok.raj@intel.com> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14[PATCH] x86_64: Speed up numa_node_id by putting it directly into the PDAAndi Kleen3-5/+11
Not go from the CPU number to an mapping array. Mode number is often used now in fast paths. This also adds a generic numa_node_id to all the topology includes Suggested by Eric Dumazet Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14[PATCH] x86_64: Fix gcc 4 warning in aperture.cAndi Kleen1-1/+1
Fix arch/x86_64/kernel/aperture.c: In function #iommu_hole_init#: arch/x86_64/kernel/aperture.c:199: warning: #aper_order# may be used uninitialized in this function Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14[PATCH] x86-64/i386: Fix CPU model for family 6Suresh Siddha2-4/+4
According to cpuid instruction in IA32 SDM-Vol2, when computing cpu model, we need to consider extended model ID for family 0x6 also. AK: Also added fixes/simplifcation from Petr Vandrovec Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14[PATCH] x86_64: Remove duplicate __cpuinit defineAshok Raj1-2/+0
Remove duplicate __cpuinit in smp.c. Already defined in init.h which is already included. Signed-off-by: Ashok Raj <ashok.raj@intel.com> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14[PATCH] x86_64: Use the DMA32 zone for dma_alloc_coherent()/pci_alloc_consistentAndi Kleen1-1/+7
Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14[PATCH] i386/x86-64: Share interrupt vectors when there is a large number of ↵James Cleverdon3-16/+81
interrupt sources Here's a patch that builds on Natalie Protasevich's IRQ compression patch and tries to work for MPS boots as well as ACPI. It is meant for a 4-node IBM x460 NUMA box, which was dying because it had interrupt pins with GSI numbers > NR_IRQS and thus overflowed irq_desc. The problem is that this system has 270 GSIs (which are 1:1 mapped with I/O APIC RTEs) and an 8-node box would have 540. This is much bigger than NR_IRQS (224 for both i386 and x86_64). Also, there aren't enough vectors to go around. There are about 190 usable vectors, not counting the reserved ones and the unused vectors at 0x20 to 0x2F. So, my patch attempts to compress the GSI range and share vectors by sharing IRQs. Cc: "Protasevich, Natalie" <Natalie.Protasevich@unisys.com> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14[PATCH] x86_64: Support for AMD specific MCE Threshold.Jacob Shin8-0/+569
MC4_MISC - DRAM Errors Threshold Register realized under AMD K8 Rev F. This register is used to count correctable and uncorrectable ECC errors that occur during DRAM read operations. The user may interface through sysfs files in order to change the threshold configuration. bank%d/error_count - reads current error count, write to clear. bank%d/interrupt_enable - set/clear interrupt enable. bank%d/threshold_limit - read/write the threshold limit. APIC vector 0xF9 in hw_irq.h. 5 software defined bank ids in mce.h. new apic.c function to setup threshold apic lvt. defaults to interrupt off, count enabled, and threshold limit max. sysfs interface created on /sys/devices/system/threshold. AK: added some ifdefs to make it compile on UP Signed-off-by: Jacob Shin <jacob.shin@amd.com> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14[PATCH] x86_64: Account mem_map in VM holes accountingAndi Kleen1-0/+19
The VM needs to know about lost memory in zones to accurately balance dirty pages. This patch accounts mem_map in there too, which fixes a constant errror of a few percent. Also some other misc mappings and the kernel text itself are accounted too. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14[PATCH] x86_64: Make i386 compile again with fourth DMA32 zoneAndi Kleen1-2/+2
The code should deal with an additional empty zone, so fix up the #error. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14[PATCH] x86_64: Set compatibility flag for 4GB zone on IA64Andi Kleen1-0/+4
IA64 traditionally had a 4GB DMA32 zone. Set the compatibility flag to keep old drivers working. For new drivers it would be better to use ZONE_DMA32 now. Cc: tony.luck@intel.com Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14[PATCH] x86_64: Add 4GB DMA32 zoneAndi Kleen2-43/+47
Add a new 4GB GFP_DMA32 zone between the GFP_DMA and GFP_NORMAL zones. As a bit of historical background: when the x86-64 port was originally designed we had some discussion if we should use a 16MB DMA zone like i386 or a 4GB DMA zone like IA64 or both. Both was ruled out at this point because it was in early 2.4 when VM is still quite shakey and had bad troubles even dealing with one DMA zone. We settled on the 16MB DMA zone mainly because we worried about older soundcards and the floppy. But this has always caused problems since then because device drivers had trouble getting enough DMA able memory. These days the VM works much better and the wide use of NUMA has proven it can deal with many zones successfully. So this patch adds both zones. This helps drivers who need a lot of memory below 4GB because their hardware is not accessing more (graphic drivers - proprietary and free ones, video frame buffer drivers, sound drivers etc.). Previously they could only use IOMMU+16MB GFP_DMA, which was not enough memory. Another common problem is that hardware who has full memory addressing for >4GB misses it for some control structures in memory (like transmit rings or other metadata). They tended to allocate memory in the 16MB GFP_DMA or the IOMMU/swiotlb then using pci_alloc_consistent, but that can tie up a lot of precious 16MB GFPDMA/IOMMU/swiotlb memory (even on AMD systems the IOMMU tends to be quite small) especially if you have many devices. With the new zone pci_alloc_consistent can just put this stuff into memory below 4GB which works better. One argument was still if the zone should be 4GB or 2GB. The main motivation for 2GB would be an unnamed not so unpopular hardware raid controller (mostly found in older machines from a particular four letter company) who has a strange 2GB restriction in firmware. But that one works ok with swiotlb/IOMMU anyways, so it doesn't really need GFP_DMA32. I chose 4GB to be compatible with IA64 and because it seems to be the most common restriction. The new zone is so far added only for x86-64. For other architectures who don't set up this new zone nothing changes. Architectures can set a compatibility define in Kconfig CONFIG_DMA_IS_DMA32 that will define GFP_DMA32 as GFP_DMA. Otherwise it's a nop because on 32bit architectures it's normally not needed because GFP_NORMAL (=0) is DMA able enough. One problem is still that GFP_DMA means different things on different architectures. e.g. some drivers used to have #ifdef ia64 use GFP_DMA (trusting it to be 4GB) #elif __x86_64__ (use other hacks like the swiotlb because 16MB is not enough) ... . This was quite ugly and is now obsolete. These should be now converted to use GFP_DMA32 unconditionally. I haven't done this yet. Or best only use pci_alloc_consistent/dma_alloc_coherent which will use GFP_DMA32 transparently. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14[PATCH] x86_64: Update defconfigAndi Kleen1-15/+83
Rerun and enable autofs 4, relayfs and softdog Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-15powerpc: Remove __init from a function used in suspend/resume.Paul Mackerras1-1/+2
Suspend/resume on powermacs uses the pmac_get_boot_time function, so it can't be marked as __init. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-15powerpc: Fix clearing of the FPSCR when invoking a signal handlerPaul Mackerras2-5/+8
As pointed out by Gary Byers, we were clearing the image of the FPSCR (floating point status and control register) in the thread_struct before copying it to the user stack when invoking a signal. Thus the task would see its FPSCR getting cleared when it took a signal. While fixing it I noticed that our swapcontext system call was also clearing FPSCR. It shouldn't, so I fixed that too. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-14powerpc: Mark PREP and embedded as broken for nowPaul Mackerras1-2/+2
These machines don't have working ARCH=powerpc support yet, so make them depend on BROKEN so people don't enable them inadvertently and get compile errors. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-14powerpc: Export a couple of prom functionsPaul Mackerras1-0/+2
These are needed by the TPM driver, apparently. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-14powerpc: Move most remaining ppc64 files over to arch/powerpcPaul Mackerras28-9558/+19
Also deletes files in arch/ppc64 that are no longer used now that we don't compile with ARCH=ppc64 any more. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-14Merge git://oak/home/sfr/kernels/iseries/workPaul Mackerras5-62/+33
2005-11-14powerpc: iSeries build fixesStephen Rothwell2-32/+25
log_plpar_hcall_return is only used on PPC_PSERIES, so move it closer to its users and inside ifdef CONFIG_PPC_PSERIES. remove the last vestiges of systemcfg in iSeries. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-11-14[PATCH] powerpc: kill ppc64 rtc.c, use genrtc insteadBenjamin Herrenschmidt6-436/+238
This moves the rtas RTC callbacks to rtas-rtc.c in arch/powerpc/kernel, and kills the rest of arch/ppc64/kernel/rtc.c which was just a duplicate of the genrtc functionality. Also enable build of genrtc for CONFIG_PPC64 (it just works are we already have the required callbacks) and enable it in all defconfigs. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-14[PATCH] powerpc: vdso fixes (take #2)Benjamin Herrenschmidt6-23/+38
This fixes various errors in the new functions added in the vDSO's, I've now verified all functions on both 32 and 64 bits vDSOs. It also fix a sign extension bug getting the initial time of day at boot that could cause the monotonic clock value to be completely on bogus for 64 bits applications (with either the vDSO or the syscall) on powermacs. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-14[PATCH] powerpc: Always rebuild arch/powerpc/include/asm symlinkBenjamin Herrenschmidt1-1/+1
This patch uses a FORCE dependency on the arch/powerpc/include/asm symlink so that it always gets rebuilt, thus avoiding all sort of funny errors if the .config is changed between 32 and 64 bits. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-14[PATCH] powerpc: Export htab start/end via device treeMichael Ellerman2-0/+56
The userspace kexec-tools need to know the location of the htab on non-lpar machines, as well as the end of the kernel. Export via the device tree. NB. This patch has been updated to use "linux,x" property names. You may need to update your kexec-tools to match. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-14[PATCH] powerpc: Turn cpu_irq_down into kexec_cpu_downMichael Ellerman2-8/+30
We currently have a ppc_md member called cpu_irq_down, which disables IRQs for the cpu in question. The only caller of cpu_irq_down is the kexec code. On pSeries we need to do more than just teardown IRQs at kexec time, so rename the ppc_md member to kexec_cpu_down and expand it. The pSeries code needs to know, and other platforms might too, whether we're doing a crash shutdown (ie. panicking) or a regular kexec, so add a flag for that. The pSeries implementation of kexec_cpu_down does an unregister VPA call, which tells the Hypervisor to stop writing stuff into our pacas. Without this we can get weird memory corruption bugs when we kexec, caused by the Hypervisor writing into the first kernel's pacas which happens to be somewhere interesting in the second kernel's memory. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-14powerpc: have only one definition of __irq_offset_valueStephen Rothwell2-5/+5
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-11-14powerpc: make iSeries use generic virtual irq mappingStephen Rothwell2-25/+3
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-11-13Merge master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds13-77/+820
2005-11-13[PATCH] tpm: necessary PPC64 function exportsKylene Jo Hall1-0/+2
Some work is needed in the tpm device driver to discover the TPM out of the device tree rather than based on set address on Power PPC. This patch exports a couple of functions for the parsing. Signed-off-by: Kylene Hall <kjhall@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-13[PATCH] arch/mips/au1000/common/usbdev.c: don't concatenate __FUNCTION__ ↵Clemens Buchacher1-2/+2
with strings It's deprecated. Use "%s", __FUNCTION__ instead. Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Maximilian Attems <janitor@sternwelten.at> Signed-off-by: Domen Puncer <domen@coderock.org> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-13[PATCH] atomic: inc_not_zeroNick Piggin1-0/+15
Introduce an atomic_inc_not_zero operation. Make this a special case of atomic_add_unless because lockless pagecache actually wants atomic_inc_not_negativeone due to its offset refcount. Signed-off-by: Nick Piggin <npiggin@suse.de> Cc: "Paul E. McKenney" <paulmck@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-13[PATCH] atomic: cmpxchgNick Piggin1-5/+16
Introduce an atomic_cmpxchg operation. Signed-off-by: Nick Piggin <npiggin@suse.de> Cc: "Paul E. McKenney" <paulmck@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-13[PATCH] i386: generic cmpxchgNick Piggin1-0/+48
- Make cmpxchg generally available on the i386 platform. - Provide emulation of cmpxchg suitable for uniprocessor if built and run on 386. From: Christoph Lameter <clameter@sgi.com> - Cut down patch and small style changes. Signed-off-by: Nick Piggin <npiggin@suse.de> Signed-off-by: Christoph Lameter <clameter@sgi.com> Cc: "Paul E. McKenney" <paulmck@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-13[PATCH] uml: fix daemon transport exit path bugPaolo 'Blaisorblade' Giarrusso1-2/+4
Fix some exit path bugs in the daemon driver. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Acked-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-13[PATCH] uml: fix access_okPaolo 'Blaisorblade' Giarrusso5-24/+29
The access_ok_tt() macro is bogus, in that a read access is unconditionally considered valid. I couldn't find in SCM logs the introduction of this check, but I went back to 2.4.20-1um and the definition was the same. Possibly this was done to avoid problems with missing set_fs() calls, but there can't be any I think because they would fail with SKAS mode. TT-specific code is still to check. Also, this patch joins common code together, and makes the "address range wrapping" check happen for all cases, rather than for only some. This may, possibly, be reoptimized at some time, but the current code doesn't seem clever, just confused. * Important: I've also had to change references to access_ok_{tt,skas} back to access_ok - the kernel wasn't that happy otherwise. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Acked-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-13[PATCH] uml console channels: fix the API of console_writePaolo 'Blaisorblade' Giarrusso3-6/+5
Since the 4th param is unused, remove it altogether. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Acked-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-13[PATCH] uml console channels: remove console_write wrappersPaolo 'Blaisorblade' Giarrusso5-41/+6
We were using a long series of (stupid) wrappers which all call generic_console_write(). Since the wrappers only change the 4th param, which is unused by the called proc, remove them and call generic_console_write() directly. If needed at any time in the future to reintroduce this stuff, the member could be moved to a generic struct, to avoid this duplicated handling. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Acked-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-13[PATCH] uml: fix mcast network driver error handlingPaolo 'Blaisorblade' Giarrusso1-10/+10
printk clears the host errno (I verified this in debugging and it's reasonable enough, given that it ends via a write call on some fd, especially since printk() goes on /dev/tty0 which is often the host stdout). So save errno earlier. There's no reason to change the printk calls to use -err rather than errno - the assignment can't clear errno. And in the first failure path, we used to return 0 too (and this time more clearly), which is totally wrong. 0 is a success fd, which is then registered and gives a "registering fd twice" warning. Finally, fix up some whitespace. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Acked-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-13[PATCH] uml: fixups for "reuse i386 cpu-specific tuning"Paolo 'Blaisorblade' Giarrusso3-11/+6
A few fixups - show the new submenu only for x86 subarchitecture (it does not make sense to show it for x86_64 users) and remove X86_CMPXCHG, which is now a duplicate of Kconfig.i386, even though Kconfig doesn't complain (we also miss the dependency on !M386 CPU). Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Acked-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-13[PATCH] uml: micro fixups to arch KconfigPaolo 'Blaisorblade' Giarrusso1-2/+2
Remove a stone-age comment (UM *does* have a MMU, i.e. the host), and fix a dependency (introduced in commit 02edeb586ae4cdd17778923674700edb732a4741) to do what was intended. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Acked-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-13[PATCH] uml: remove bogus WARN_ON, triggerable harmlessly on a page fault racePaolo 'Blaisorblade' Giarrusso1-0/+9
The below warning was added in place of pte_mkyoung(); if (is_write) pte_mkdirty(); In fact, if the PTE is not marked young/dirty, our dirty/accessed bit emulation would cause the TLB permission not to be changed, and so we'd loop, and given we don't support preemption yet, we'd busy-hang here. However, I've seen this warning trigger without crashes during a loop of concurrent kernel builds, at random times (i.e. like a race condition), and I realized that two concurrent faults on the same page, one on read and one on write, can trigger it. The read fault gets serviced and the PTE gets marked writable but clean (it's possible on a shared-writable mapping), while the generic code sees the PTE was already installed and returns without action. In this case, we'll see another fault and service it normally. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Acked-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-13[PATCH] m68k: convert thread flags to use bit fieldsRoman Zippel5-60/+50
Remove task_work structure, use the standard thread flags functions and use shifts in entry.S to test the thread flags. Add a few local labels to entry.S to allow gas to generate short jumps. Finally it changes a number of inline functions in thread_info.h to macros to delay the current_thread_info() usage, which requires on m68k a structure (task_struct) not yet defined at this point. Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Cc: Al Viro <viro@parcelfarce.linux.theplanet.co.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-13[PATCH] m68k: m68k-specific thread_info changesAl Viro1-0/+5
a) added embedded thread_info [m68k processor.h] b) added missing symbols in asm-offsets.c c) task_thread_info() and friends in asm-m68k/thread_info.h d) made m68k thread_info.h included by m68k processor.h, not the other way round. Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk> Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-13[PATCH] m68k: thread_info header cleanupAl Viro1-0/+1
a) in smp_lock.h #include of sched.h and spinlock.h moved under #ifdef CONFIG_LOCK_KERNEL. b) interrupt.h now explicitly pulls sched.h (not via smp_lock.h from hardirq.h as it used to) c) in three more places we need changes to compensate for (a) - one place in arch/sparc needs string.h now, hardirq.h needs forward declaration of task_struct and preempt.h needs direct include of thread_info.h. d) thread_info-related helpers in sched.h and thread_info.h put under ifndef __HAVE_THREAD_FUNCTIONS. Obviously safe. Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk> Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-13[PATCH] x86: fix cpu_khz with clock=pitTim Mann1-2/+3
Fix http://bugzilla.kernel.org/show_bug.cgi?id=5546 The cpu_khz global is not initialized and remains 0 if you boot with clock=pit, even if the processor does have a TSC. This may have bad ramifications since the variable is used in various places scattered around the kernel, though I didn't check them all to see if they can tolerate cpu_khz = 0. You can observe the problem by doing "cat /proc/cpuinfo"; the cpu MHz line says 0.000. The fix is trivial; call init_cpu_khz() from init_pit(), just as it's called from the timers/timer_foo.c:init_foo() for other values of foo. Cc: john stultz <johnstul@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-13[PATCH] i386: NMI pointer comparison fixJan Beulich1-4/+3
Instruction pointer comparisons for the NMI on debug stack check/fixup were incorrect. From: Jan Beulich <jbeulich@novell.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Zwane Mwaikambo <zwane@holomorphy.com> Acked-by: "Seth, Rohit" <rohit.seth@intel.com> Cc: Zachary Amsden <zach@vmware.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-13[PATCH] arch/i386/mm/init.c: small cleanupsAdrian Bunk1-1/+2
This patch contains the following cleanups: - make a needlessly global function static - every file should include the headers containing the prototypes for it's global functions Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-13[PATCH] powerpc-xmon-build-fixAndrew Morton1-0/+1
arch/powerpc/xmon/xmon.c:525: error: syntax error before "xmon_irq" arch/powerpc/xmon/xmon.c:526: warning: return type defaults to `int' arch/powerpc/xmon/xmon.c: In function `xmon_irq': arch/powerpc/xmon/xmon.c:532: error: `IRQ_HANDLED' undeclared (first use in this function) arch/powerpc/xmon/xmon.c:532: error: (Each undeclared identifier is reported only once arch/powerpc/xmon/xmon.c:532: error: for each function it appears in.) Cc: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-13[PATCH] ppc32: Add support for handling PCI interrupts on MPC834x PCI ↵Kumar Gala1-4/+11
expansion card The MPC8349 PIBs system has a expansion board with 6 PCI slots. We needed to update the IDSEL interrupt mapping for it to work properly. However, only PCI1 is supported as the first revision of this expansion board doesn't function properly for PCI2. For the time being we have zero'd out the entries for the IDSELs related to PCI2. When a functioning expansion board exists we can fix the table. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-13[PATCH] ppc: add support for new powerbooksOlof Johansson1-0/+8
Enablement patch for the new PowerBooks (late 2005 edition). This enables the ATA controller, Gigabit ethernet and basic AGP setup. Bluetooth works out-of-the box after running hid2hci. Still remaining is to get the touchpad to work, the simple change of just adding the new USB ids isn't enough. Signed-off-by: Olof Johansson <olof@lixom.net> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-13[PATCH] Update email address for KumarKumar Gala34-34/+34
Changed jobs and the Freescale address is no longer valid. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-13[PATCH] move pm_register/etc. to CONFIG_PM_LEGACY, pm_legacy.hJeff Garzik5-1/+5
Since few people need the support anymore, this moves the legacy pm_xxx functions to CONFIG_PM_LEGACY, and include/linux/pm_legacy.h. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-13[PATCH] x86_64 two timer entries in /sysKarsten Wiese1-1/+1
attached patch renames one instance of /sys/devices/system/timer to /sys/devices/system/timer_pit to avoid a name clash with another instance created in time.c. Acked-by: Andi Kleen <ak@muc.de> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-13[ARM] 3160/1: SharpSL: Add driver for Akita specific GPIOsRichard Purdie2-0/+224
Patch from Richard Purdie Add a driver for the extra GPIOs found on the Sharp SL-C1000 (Akita). These GPIOs are found on a Maxim MAX7310 I2C i/o expander chip. A generic GPIO driver for the MAX7310 was attempted but this mini driver is a much simpler and much more effective solution avoiding several issues and complexity the generic driver had (as discussed on LKML). The platform device is required so the device parent can be set correctly which ensures the device is one of the last to suspend and first to resume. Whilst the i2c suspend/resume calls can be influenced, nothing guarantees this is easlier/later than the subsystems the gpios are used on which are all independent of i2c (sound, irda, video/backlight etc.). Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-13[ARM] 3159/1: SharpSL: Add PM device driver for the SL-Cx00 machines.Richard Purdie2-1/+234
Patch from Richard Purdie Add a SharpSL PM device driver for the SL-Cxx00 machines. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-13[ARM] 3158/1: SharpSL: Add PM device driver for the SL-C7x0 machines.Richard Purdie2-1/+229
Patch from Richard Purdie Add a SharpSL PM device driver for the SL-C7x0 machines. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-13[ARM] Re-fix footbridgeRussell King1-1/+1
That's __phys_to_pfn, not __phy_to_pfn. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-12[ARM] Fix collie for -rc1Pavel Machek3-4/+4
This fixes compilation for collie after -rc1 platform_device changes. And yes, it even boots. Signed-off-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-12[SBUSFB]: implement ->compat_ioctlChristoph Hellwig1-92/+0
This patch adds a new function, sbusfb_compat_ioctl() to drivers/video/sbuslib.c and uses it as compat_ioctl in all sbus fb drivers This remove the last per-arch compat ioctl bits in arch/sparc64/kernel/ioctl32.c so it would be nice if people could test if this actually copiles and works and if yes apply it :) Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-11-12[SPARC]: Fix RTC compat ioctl kernel log spam.Christoph Hellwig1-4/+0
On Fri, Nov 11, 2005 at 12:58:40PM -0800, David S. Miller wrote: > > This change: > > diff-tree 8ca2bdc7a98b9584ac5f640761501405154171c7 (from feee207e44d3643d19e648aAuthor: Christoph Hellwig <hch@lst.de> > Date: Wed Nov 9 12:07:18 2005 -0800 > > [SPARC] sbus rtc: implement ->compat_ioctl > > Signed-off-by: Christoph Hellwig <hch@lst.de> > Signed-off-by: David S. Miller <davem@davemloft.net> > > results in the console now getting spewed on sparc64 systems > with messages like: > > [ 11.968298] ioctl32(hwclock:464): Unknown cmd fd(3) cmd(401c7014){00} arg(efc > What's happening is hwclock tries first the SBUS rtc device ioctls > then the normal rtc driver ones. > > So things actually worked better when we had the SBUS rtc compat ioctl > directly handled via the generic compat ioctl code. > > There are _so_ many rtc drivers in the kernel implementing the > generic rtc ioctls that I don't think putting a ->compat_ioctl > into all of them to fix this problem is feasible. Unless we > write a single rtc_compat_ioctl(), export it to modules, and hook > it into all of those somehow. > > But even that doesn't appear to have any pretty implementation. > > Any better ideas? We had similar problems with other ioctls where userspace did things like that. What we did there was to put the compat handler to generic code. The patch below does that, adding a big comment about what's going on and removing the COMPAT_IOCTL entires for these on powerpc that not only weren't ever useful but are duplicated now aswell. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-11-12[ARM] 3154/1: SharpSL PM Driver updatesRichard Purdie2-56/+61
Patch from Richard Purdie Updates to the SharpSL PM driver including cleanups from both Pavel Machek and myself and updates after the platform device changes to make it compile again. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-12[ARM] 3149/1: SharpSL: Add Akita (SL-C1000) machine supportRichard Purdie2-0/+55
Patch from Richard Purdie Add the core machine support for the Sharp SL-C1000 (Akita) and enable the Kconfig selection for it. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-12[ARM] Restore apparant pointless change in arch/arm/kernel/smp.cRussell King1-3/+1
Restore smp.c back to how it used to be. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-12[ARM] Fix Footbridge-based machinesRussell King1-12/+12
Unfortunately, all these machines got broken when the PFN memory setup changes happened. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-11Merge master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds18-372/+658
2005-11-11Merge branch 'release' of ↵Linus Torvalds5-19/+218
git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
2005-11-11[ARM] Update mach-typesRussell King1-4/+39
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-11[ARM] 3147/1: update ixp2000 defconfigs to 2.6.14-git13Lennert Buytenhek5-115/+360
Patch from Lennert Buytenhek Update the ixp2000 defconfigs to 2.6.14-git13. Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-11[ARM] 3152/1: make various assembly local labels actually local (the rest)Nicolas Pitre4-59/+61
Patch from Nicolas Pitre For assembly labels to actually be local they must start with ".L" and not only "." otherwise they still remain visible in the final link and clutter kallsyms needlessly, and possibly make for unclear symbolic backtrace. This patch simply inserts a"L" where appropriate. The code itself is unchanged. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-11[ARM] 3151/1: make various assembly local labels actually local (io-*.S)Nicolas Pitre7-80/+82
Patch from Nicolas Pitre For assembly labels to actually be local they must start with ".L" and not only "." otherwise they still remain visible in the final link and clutter kallsyms needlessly, and possibly make for unclear symbolic backtrace. This patch simply inserts a"L" where appropriate. The code itself is unchanged. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-11[ARM] 3150/1: make various assembly local labels actually local (uaccess.S)Nicolas Pitre1-114/+116
Patch from Nicolas Pitre For assembly labels to actually be local they must start with ".L" and not only "." otherwise they still remain visible in the final link and clutter kallsyms needlessly, and possibly make for unclear symbolic backtrace. This patch simply inserts a"L" where appropriate. The code itself is unchanged. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-11[SPARC64]: Restore 2.4.x /proc/cpuinfo behavior for "ncpus probed" field.David S. Miller2-5/+15
Noticed by Tom 'spot' Callaway. Even on uniprocessor we always reported the number of physical cpus in the system via /proc/cpuinfo. But when this got changed to use num_possible_cpus() it always reads as "1" on uniprocessor. This change was unintentional. So scan the firmware device tree and count the number of cpu nodes, and report that, as we always did. Signed-off-by: David S. Miller <davem@davemloft.net>
2005-11-11[IA64-SGI] set altix preferred consoleMark Maule1-4/+153
Fix default VGA console on SN platforms. Since SN firmware does not pass enough ACPI information to identify VGA cards and the associated legacy IO/MEM addresses, we rely on the EFI PCDP table. Since the linux pcdp driver is optional (and overridden if console= directives are used) SN duplicates a portion of the pcdp scan code to identify if there is a usable console VGA adapter. Additionally, dup necessary pcdp related structs to avoid dragging drivers/pcdp.h into a more public location. Signed-off-by: Mark Maule <maule@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-11-11[IA64] 4-level page tablesRobin Holt4-15/+65
This patch introduces 4-level page tables to ia64. I have run some benchmarks and found nothing interesting. Performance has consistently fallen within the noise range. It also introduces a config option (setting the default to 3 levels). The config option prevents having 4 level page tables with 64k base page size. Signed-off-by: Robin Holt <holt@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-11-11Merge master.kernel.org:/home/rmk/linux-2.6-drvmodelLinus Torvalds8-90/+95
2005-11-11powerpc: Fix some compile problems with the VDSO stuffPaul Mackerras5-6/+33
We needed the VDSO symbols in the arch/ppc asm-offsets.c, and there were a few usages of _systemcfg still left lying around. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-11powerpc: Fix reading and writing SPRs from xmon on 32-bitPaul Mackerras1-7/+18
When we created the instructions to read/write SPRs in xmon, we were setting up a ppc64-style procedure descriptor and calling that, which doesn't work in 32-bit. For 32-bit a function pointer just points to the instructions of the function. This fixes it to do the right thing for both 32-bit and 64-bit. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-11powerpc: Initialize secondary CPU setup for 32-bit SMPPaul Mackerras1-0/+1
32-bit SMP powermacs weren't booting with ARCH=powerpc because the boot cpu wasn't saving away the state of various control registers, but the secondary CPUs were loading them from the uninitialized state. This adds the necessary save-state call. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-11[PATCH] powerpc: Merge vdso's and add vdso support to 32 bits kernelBenjamin Herrenschmidt34-356/+1421
This patch moves the vdso's to arch/powerpc, adds support for the 32 bits vdso to the 32 bits kernel, rename systemcfg (finally !), and adds some new (still untested) routines to both vdso's: clock_gettime() with support for CLOCK_REALTIME and CLOCK_MONOTONIC, clock_getres() (same clocks) and get_tbfreq() for glibc to retreive the timebase frequency. Tom,Steve: The implementation of get_tbfreq() I've done for 32 bits returns a long long (r3, r4) not a long. This is such that if we ever add support for >4Ghz timebases on ppc32, the userland interface won't have to change. I have tested gettimeofday() using some glibc patches in both ppc32 and ppc64 kernels using 32 bits userland (I haven't had a chance to test a 64 bits userland yet, but the implementation didn't change and was tested earlier). I haven't tested yet the new functions. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-11[PATCH] powerpc: remove initrd debug printkDavid Woodhouse1-3/+1
This removes a stray debugging printk which offended Anton. Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-11[PATCH] powerpc: Move udbg code to arch/powerpcDavid Gibson5-8/+5
Since the udbg code in ppc64 has no ppc32 equivalent, move it straight over into arch/powerpc (and include/asm-powerpc for udbg.h). In time, we probably want to meld the various bits and pieces of 32-bit early debugging code into udbg, but for now only include it on CONFIG_PPC64=y builds. The only change during the move is to standardise the protecting #ifdef/#define in udbg.h, and move its banner comment above the initial #ifdef (which seems to be normal practice). Built and booted on POWER5 LPAR (ARCH=powerpc and ARCH=ppc64). Built for 32bit multiplatform (ARCH=powerpc). Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>