Commit Graph

4893 Commits

Author SHA1 Message Date
Ralf Baechle b6f7880b6c [MIPS] Reformat to 80 columns.
Patch courtesy of Emily Postnews ;-)
    
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-02-07 13:30:23 +00:00
Ralf Baechle 5ac71fd1cf [MIPS] Sibyte: Make all setup functions __init.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-02-07 13:30:23 +00:00
Ralf Baechle 010b853b3a [MIPS] Get rid of CONFIG_SB1_PASS_1_WORKAROUNDS #ifdef crapola.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-02-07 13:30:23 +00:00
Sergei Shtylylov 80730555af [MIPS] Au1xx0: really set KSEG0 to uncached on reboot
Fix a really old buglet in AMD Au1xx0 restart code: instead of
modifying the whole CP0 Config.K0 field to 010b (meaning KSEG0 uncached)
before flushing the caches and resetting a board, it only sets bit 1 of that
reg. which is effectively a NOP since Config.K0 == 011b as the kernel sets it
up (which is also its default value for Au1xx0).
    
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-02-07 13:30:23 +00:00
Mark Mason c03bc12121 [MIPS] SB1: Add oprofile support.
Signed-off-by: Mark Mason <mason@broadcom.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-02-07 13:30:22 +00:00
Mark Mason 4c91cc57bc [MIPS] BCM1480: Cleanup debug code left behind in the PCI driver.
Signed-off-by: Mark Mason <mason@broadcom.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-02-07 13:30:22 +00:00
Mark Mason 80f834e687 [MIPS] BCM1125 PCI fixes
Make BCM1125 targets to link again.
    
Signed-off-by: Mark Mason <mason@broadcom.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-02-07 13:30:22 +00:00
Ralf Baechle dd2f18fe5a [MIPS] Nevada support for SGI O2.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-02-07 13:30:22 +00:00
Ralf Baechle 11ed6d5bb0 [MIPS] Rename include/asm-mips/cobalt to include/asm-mips/mach-cobalt.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-02-07 13:30:22 +00:00
Ralf Baechle fcdb27ad1d [MIPS] Rename _machine_power_off to pm_power_off so the kernel builds again.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-02-07 13:30:22 +00:00
Ralf Baechle 9414d3628a [MIPS] Check function pointers are non-zero before calling.
Several boards don't initialize the pointers, so let's play safe.
    
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-02-07 13:30:22 +00:00
Ralf Baechle a3305a8835 [MIPS] Revert "mips: add pm_power_off"
pm_power_off duplicates the functionality of _machine_restart.
    
This reverts b142159fa5 commit.
2006-02-07 13:30:21 +00:00
Ralf Baechle a84c96e202 [MIPS] RTLX compile fixes.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-02-07 13:30:21 +00:00
Ralf Baechle 71baa1a599 [MIPS] Get rid of unnecessary prototypes. Fixes and optimizations for HZ > 100.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-02-07 13:30:21 +00:00
Ralf Baechle 4f0638ba9e [MIPS] Remove stray .set mips3 resulting in 64-bit instruction in 32-bit kernels.
Only the NMI handler was affected so this is a low impact bug.
    
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-02-07 13:30:21 +00:00
Nathan Lynch 7d4d61544a [PATCH] powerpc: avoid timer interrupt replay effect when onlining cpu
When a cpu is hotplug-onlined, if we don't set per_cpu(last_jiffy) to
something sane, timer_interrupt will execute its while loop for every
tick missed since the cpu was last online (or since the system was
booted, if we're adding a new cpu).  This can cause weird hangs, ssh
sessions dropping, and we can even go xmon if we take a global IPI at
the wrong time.

Signed-off-by: Nathan Lynch <ntl@pobox.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-07 21:51:54 +11:00
Michael Neuling 4dc4325693 [PATCH] powerpc: hypervisor check in pseries_kexec_cpu_down
We call unregister_vpa but we don't check to see if the hypervisor
supports this.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Acked-by: Anton Blanchard <anton@samba.org>
--
 arch/powerpc/platforms/pseries/setup.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-07 21:51:53 +11:00
Michael Ellerman f9b4045d6b [PATCH] powerpc: Don't use toc in decrementer_iSeries_masked
Since 404849bbd2 we've been using
LOAD_REG_ADDRBASE, which uses the toc pointer, in decrementer_iSeries_masked.

This can explode if we take the decrementer interrupt while we're in a module,
because the toc pointer in r2 will be the module's toc pointer.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-07 21:51:53 +11:00
David Gibson 09f5dc44ae [PATCH] powerpc: Cleanup, consolidating icache dirtying logic
The code to mark a page as icache dirty (so that it will later be
icache-dcache flushed when we try to execute from it) is duplicated in
three places: flush_dcache_page() does this marking and nothing else,
but clear_user_page() and copy_user_page() duplicate it, since those
functions make the page icache dirty themselves.

This patch makes those other functions call flush_dcache_page()
instead, so the logic's all in one place.  This will make life less
confusing if we ever need to tweak the details of the the lazy icache
flush mechanism.

 arch/powerpc/mm/mem.c |   14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-07 21:51:53 +11:00
Jesper Juhl 95eff20feb [PATCH] Don't check pointer for NULL before passing it to kfree [arch/powerpc/kernel/rtas_flash.c]
Checking a pointer for NULL before passing it to kfree is pointless, kfree
does its own NULL checking of input.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-07 21:51:53 +11:00
Olaf Hering 4009d98022 [PATCH] powerpc: fix compile warning in udbg_init_maple_realmode
arch/powerpc/kernel/udbg_16550.c: In function `udbg_init_maple_realmode':
arch/powerpc/kernel/udbg_16550.c:162: warning: assignment from incompatible pointer type

Signed-off-by: Olaf Hering <olh@suse.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-07 21:51:52 +11:00
Olaf Hering d60dcd9450 [PATCH] powerpc: add refcounting to setup_peg2 and of_get_pci_address
setup_peg2 must do some refcounting.
of_get_pci_address may need to drop the node

	Pegasos l2cr : L2 cache was not active, activating
	PCI bus 0 controlled by pci at 80000000
	Badness in kref_get at /home/olaf/kernel/olh/ppc64/linux-2.6.16-rc2-olh/lib/kref.c:32
	Call Trace:
	[C037BD00] [C0007934] show_stack+0x5c/0x184 (unreliable)
	[C037BD30] [C000E068] program_check_exception+0x184/0x584
	[C037BD90] [C000F5F0] ret_from_except_full+0x0/0x4c
	--- Exception: 700 at kref_get+0xc/0x24
	    LR = of_node_get+0x24/0x3c
	[C037BE50] [C004FD94] __pte_alloc_kernel+0x64/0x80 (unreliable)
	[C037BE70] [C000CA18] of_get_parent+0x34/0x58
	[C037BE90] [C0009B18] of_get_address+0x24/0x174
	[C037BED0] [C000A108] of_address_to_resource+0x24/0x68
	[C037BF00] [C038B128] chrp_find_bridges+0x114/0x470
	[C037BF90] [C038AE48] chrp_setup_arch+0x1fc/0x32c
	[C037BFB0] [C03849B0] setup_arch+0x144/0x188
	[C037BFD0] [C037C45C] start_kernel+0x34/0x1a8
	[C037BFF0] [000037A0] 0x37a0
	Badness in kref_get at /home/olaf/kernel/olh/ppc64/linux-2.6.16-rc2-olh/lib/kref.c:32
	Call Trace:
	[C037BC90] [C0007934] show_stack+0x5c/0x184 (unreliable)
	[C037BCC0] [C000E068] program_check_exception+0x184/0x584
	[C037BD20] [C000F5F0] ret_from_except_full+0x0/0x4c
	--- Exception: 700 at kref_get+0xc/0x24
	    LR = of_node_get+0x24/0x3c
	[C037BDE0] [00000000] 0x0 (unreliable)
	[C037BE00] [C000CA18] of_get_parent+0x34/0x58
	[C037BE20] [C0009CE8] of_translate_address+0x2c/0x2fc
	[C037BEA0] [C0009FE8] __of_address_to_resource+0x30/0xc4
	[C037BED0] [C000A130] of_address_to_resource+0x4c/0x68
	[C037BF00] [C038B128] chrp_find_bridges+0x114/0x470
	[C037BF90] [C038AE48] chrp_setup_arch+0x1fc/0x32c
	[C037BFB0] [C03849B0] setup_arch+0x144/0x188
	[C037BFD0] [C037C45C] start_kernel+0x34/0x1a8
	[C037BFF0] [000037A0] 0x37a0
	PCI bus 0 controlled by pci at c0000000
	Top of RAM: 0x10000000, Total RAM: 0x10000000

Signed-off-by: Olaf Hering <olh@suse.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-07 21:32:45 +11:00
Olaf Hering 090db7c86d [PATCH] powerpc: remove pointer/integer confusion in of_find_node_by_name
remove pointer/integer confusion

Signed-off-by: Olaf Hering <olh@suse.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-07 21:32:44 +11:00
Olaf Hering 0347880492 [PATCH] powerpc: restore clock speed in /proc/cpuinfo
Use generic_calibrate_decr to restore missing clock: speed in /proc/cpuinfo

Signed-off-by: Olaf Hering <olh@suse.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-07 21:32:44 +11:00
Olaf Hering d8a8188ded [PATCH] powerpc: remove pointer/integer confusion in generic_calibrate_decr
remove pointer/integer confusion

Signed-off-by: Olaf Hering <olh@suse.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-07 21:32:44 +11:00
Michael Ellerman b68239ee74 [PATCH] powerpc: Don't overwrite flat device tree with kdump kernel
It's possible for prom_init to allocate the flat device tree inside the
kdump crash kernel region. If this happens, when we load the kdump kernel we
overwrite the flattened device tree, which is bad.

We could make prom_init try and avoid allocating inside the crash kernel
region, but then we run into issues if the crash kernel region uses all the
space inside the RMO. The easiest solution is to move the flat device tree
once we're running in the kernel.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-07 21:32:44 +11:00
Dave C Boutcher b4fd884a03 [PATCH] powerpc: remove useless call to touch_softlockup_watchdog
It turns out that we can't stop the watchdog from
triggering here.  If we touch the timer (which just uses the current jiffie
value) before we enable interrupts, it does nothing because jiffies
are not mass-updated until after we enable interrupts.  If we touch the
timer after we enable interrupts, its too late because the softlockup
watchdog will already have triggered.  The touch_softlockup_watchdog
call removed below does nothing.

Signed-off-by: Dave Boutcher <sleddog@us.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-07 21:32:44 +11:00
Dave C Boutcher 82a4df7462 [PATCH] powerpc: prod all processors after ibm,suspend-me
We need to prod everyone here since this is the only CPU that is
guaranteed to be running after the ibm,suspend-me RTAS call returns.

Signed-off-by: Dave Boutcher <sleddog@us.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-07 21:32:43 +11:00
Dave C Boutcher c4cb8ecca6 [PATCH] powerpc: return correct rtas status from ibm,suspend-me
Correctly return the status from the RTAS call.  rtas_call expects
to return the status as a return value.

Signed-off-by: Dave Boutcher <sleddog@us.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-07 21:32:43 +11:00
Michael Ellerman 31a7f67e58 [PATCH] powerpc: Fix !SMP build of rtas.c
arch/powerpc/kernel/rtas.c is getting hvcall.h via spinlock.h, but when we're
building for UP we don't include spinlock.h.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-07 21:28:38 +11:00
Jake Moilanen a958a26486 [PATCH] powerpc: IOMMU SG paranoia
This addresses two items, which are unlikely to be hit if we
trust drivers.

The first is moving a memory barrier below where the vmerged SG count
is passed back, but before the list is set to end.  If those
instructions were reordered, there could be an issue in iommu_unmap_sg().

The second is making sure we terminate the list on the failure case of
iommu_map_sg().  If a driver does not look at the failure return code,
it could pass a ill-formed SG list to iommu_unmap_sg().

Signed-off-by: Jake Moilanen <moilanen@austin.ibm.com>
Acked-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-07 21:28:38 +11:00
Michael Ellerman cdc3ee8f20 [PATCH] powerpc: Refuse to boot a kdump kernel via OF
You can't boot a kdump kernel via OF, not reliably anyway, the kernel being at
32 MB conflicts with the zImage wrapper etc. and it blows up.

It's trivial to check in prom_init though, and this is early enough that we can
actually drop back to OF where a reset-all will get you going again, which is
kinda nice. I think this should go in for 2.6.16.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-07 21:28:38 +11:00
Michael Ellerman 8c20fafa85 [PATCH] powerpc: Make sure we don't create empty lmb regions
To prevent problems later in boot, make sure we don't create zero-size lmb
regions.

I've checked all the callers, and at the moment no one should ever hit this.
All callers use a constant size, or they check the computed size before they
call us.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-07 21:28:38 +11:00
Michael Ellerman fa93895329 [PATCH] powerpc: Don't allocate zero bytes in finish_device_tree()
In prom.c we run finish_node() on allnodes twice. The first time we just
calculate how much memory we'll need, the second time we do the actual work.

If the calculation stage determines that we need 0 bytes, then we should skip
the lmb allocation. Although an alloc of zero will work, it has been seen to
lead to a BUG_ON() in reserve_bootmem() on at least one machine.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-07 21:28:38 +11:00
Marcelo Tosatti 3ea4807de7 [PATCH] powerpc/8xx: last two 8MB D-TLB entries are incorrectly set
The last two 8MB TLB entries are being incorrectly set by initial_mmu on 8xx.

The first entry is written with the same virtual/physical address, which
renders it invalid:

BDI>rms 792 0x00001e00
BDI>rms 824 1
BDI>rds 824
SPR  824 : 0xc08000c0  -1065353024
BDI>rds 825
SPR  825 : 0xc0800de0  -1065349664
BDI>rds 826
SPR  826 : 0x00000000            0

And the second entry, in addition, does not have its TLB index set
correctly.

Signed-off-by: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-07 21:28:37 +11:00
Geoff Levand aee9f26542 [PATCH] powerpc: Fix spufs initialization sequence.
This is a small fix to get the spufs init sequence right.

init_spu_base() in spu_base.c should be called (via
module_init(init_spu_base)) before spufs_init() (via
module_init(spufs_init)) in spufs/inode.c gets called.

Signed-off-by: Masato Noguchi <Masato.Noguchi@jp.sony.com>
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-07 21:27:50 +11:00
Paul Mackerras e2f5a3c1be powerpc/64: Fix bug in setting floating-point exception mode
When loading up the FPU, we were using a 'ld' (load doubleword)
instruction to get the FP exception mode from the thread_struct,
but it's only an int field.  This changes the ld to lwz (load
word and zero-extend).

Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-07 13:55:30 +11:00
Linus Torvalds c03296a868 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6 2006-02-06 15:46:39 -08:00
Russ Anderson 913e4a7557 [IA64-SGI] Shub2 BTE address fix
After converting the cpu physical address to shub2 physical
addressing, the address was run through TO_PHYS() which
clobbered a high node offset bit causing the BTE to fail
on shub2 nodes with large memory.  This fix corrects
that problem.

Signed-off-by: Russ Anderson (rja@sgi.com)
Signed-off-by: Tony Luck <tony.luck@intel.com>
2006-02-06 09:28:10 -08:00
Tony Luck 27ee6e0592 Pull sn-recursive-flags-for-select-builds into release branch 2006-02-06 09:23:51 -08:00
Linus Torvalds c265c46bbb Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6 2006-02-05 11:10:54 -08:00
Adrian Bunk 4be68a783d [PATCH] i386: HIGHMEM64G must depend on X86_CMPXCHG64
Due to the usage of set_64bit in include/asm-i386/pgtable-3level.h,
HIGHMEM64G must depend on X86_CMPXCHG64.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-05 11:06:54 -08:00
Chuck Ebbert b53e8f68e0 [PATCH] i386: print kernel version in register dumps
Show first field of kernel version in register dumps like x86_64 does.

Changes output from e.g.:
	(2.6.16-rc1)
to:
	(2.6.16-rc1 #12)

Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-05 11:06:53 -08:00
Chuck Ebbert fe38d8553c [PATCH] i386 cpu hotplug: don't access freed memory
i386 CPU init code accesses freed init memory when booting a newly-started
processor after CPU hotplug.  The cpu_devs array is searched to find the
vendor and it contains pointers to freed data.

Fix that by:

        1. Zeroing entries for freed vendor data after bootup.
        2. Changing Transmeta, NSC and UMC to all __init[data].
        3. Printing a warning (once only) and setting this_cpu
           to a safe default when the vendor is not found.

This does not change behavior for AMD systems.  They were broken already
but no error was reported.

Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-05 11:06:53 -08:00
Hugh Dickins 165a2c1d51 [PATCH] x86: fix stack trace facility level
dump_stack() on page allocation failure presently has an irritating habit
of shouting just "====" at everyone: please stop it.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-05 11:06:52 -08:00
Eric Dumazet 88a2a4ac6b [PATCH] percpu data: only iterate over possible CPUs
percpu_data blindly allocates bootmem memory to store NR_CPUS instances of
cpudata, instead of allocating memory only for possible cpus.

As a preparation for changing that, we need to convert various 0 -> NR_CPUS
loops to use for_each_cpu().

(The above only applies to users of asm-generic/percpu.h.  powerpc has gone it
alone and is presently only allocating memory for present CPUs, so it's
currently corrupting memory).

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: Jens Axboe <axboe@suse.de>
Cc: Anton Blanchard <anton@samba.org>
Acked-by: William Irwin <wli@holomorphy.com>
Cc: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-05 11:06:51 -08:00
Linus Torvalds cef5076987 Revert "[PATCH] x86_64: Fix the node cpumask of a cpu going down"
This reverts commit 10f4dc8b27.

Quoth Andi Kleen:
  "Kiran decided that it makes the problem worse than it was before.
   Fixing it fully requires more work which is too much for 2.6.16.  So
   please revert that commit for now."

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-05 10:51:57 -08:00
David S. Miller 7f7ff6bf02 [SPARC64]: Update defconfig.
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-02-05 00:15:12 -08:00
David S. Miller 3794689dba [SPARC64]: Add .gitignore file for sparc64 boot images.
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-02-05 00:15:11 -08:00
Jon Mason 5b7b644ca9 [PATCH] x86_64: IOMMU printk cleanup
This patch contains a printk reorder to remove the current problem of
displaying "PCI-DMA: Disabling IOMMU." and then "PCI-DMA: using GART
IOMMU" 20 lines later in dmesg.

It also constains a printk reorder in swiotlb to state swiotlb
enablement prior to describing the location of the bounce buffers, and a
printk reorder to state gart enablement prior to describing the
aperature.

Also constains a whitespace cleanup in arch/x86_64/kernel/setup.c

Tested (along with patch 2/2) on dual opteron with gart enabled,
iommu=soft, and iommu=off.

Signed-off-by: Jon Mason <jdmason@us.ibm.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-04 16:43:15 -08:00
Andi Kleen 14c3f85587 [PATCH] x86_64: Let impossible CPUs point to reference per cpu data
Hack for 2.6.16. In 2.6.17 all code that uses NR_CPUs should
be audited and changed to only touch possible CPUs.

Don't mark the reference per cpu data init data (so it stays
around after boot) and point all impossible CPUs to it. This way
they reference some valid - although shared memory. Usually
this is only initialization like INIT_LIST_HEADs and there
won't be races because these CPUs never run. Still somewhat hackish.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-04 16:43:15 -08:00
Andi Kleen 3777a95903 [PATCH] i386/x86-64: Don't ack the APIC for bad interrupts when the APIC is not enabled
It's bad juju to touch the APIC when it hasn't been enabled.
I also moved ack_bad_irq for x86-64 out of line following i386.

Signed-off-by: Andi Kleen <ak@suse.de>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-04 16:43:15 -08:00
Ashok Raj 7f66ae48de [PATCH] x86_64: Dont record local apic ids when they are disabled in MADT
Some broken BIOS's had processors disabled, but
same apic id as a valid processor. This causes
acpi_processor_start() to think this disabled
cpu is ok, and croak. So we dont record bad
apicid's anymore.

http://bugzilla.kernel.org/show_bug.cgi?id=5930

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>
2006-02-04 16:43:15 -08:00
Jan Beulich d646bce4c7 [PATCH] x86_64: minor odering correction to dump_pagetable()
Checking of the validity of pointers should be consistently done before
dereferencing the pointer.

Signed-Off-By: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-04 16:43:15 -08:00
Jan Beulich 91522a964b [PATCH] x86_64: small fix for CFI annotations
Conditionalize two unwind directives to match other similarly
conditional code.

Signed-Off-By: Jan Beulich <jbeulich@novell.com>
Cc: Jim Houston <jim.houston@ccur.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-04 16:43:15 -08:00
Andi Kleen 0c3749c41f [PATCH] x86_64: Calibrate APIC timer using PM timer
On some broken motherboards (at least one NForce3 based AMD64 laptop)
the PIT timer runs at a incorrect frequency.  This patch adds a new
option "apicpmtimer" that allows to use the APIC timer and calibrate it
using the PMTimer.  It requires the earlier patch that allows to run the
main timer from the APIC.

Specifying apicpmtimer implies apicmaintimer.

The option defaults to off for now.

I tested it on a few systems and the resulting APIC timer frequencies
were usually a bit off, but always <1%, which should be tolerable.

TBD figure out heuristic to enable this automatically on the affected
systems TBD perhaps do it on all NForce3s or using DMI?

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-04 16:43:15 -08:00
Andi Kleen 099f318b8d [PATCH] x86_64: Don't allow kprobes on __switch_to
kprobes cannot deal with the funny calling conventions when it
runs on a different stack when it returns. If someone wants
to instrument context switch they can add a probe to schedule()
instead.

Cc: jkenisto@us.ibm.com, prasanna@in.ibm.com

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-04 16:43:14 -08:00
Zach Brown 16acc0cd8f [PATCH] x86_64: align per-cpu section to configured cache bytes
Align the start of the per-cpu section to the configured number of bytes in a
cache line.  This stops a BUG_ON() from triggering in load_module() when
DEFINE_PER_CPU() is used in a module and the section isn't cacheline-aligned.
Rusty also found this and sent a patch in a while ago
(http://lkml.org/lkml/2004/10/19/17), I don't know what came of that.

Signed-off-by: Zach Brown <zach.brown@oracle.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-04 16:43:14 -08:00
Kevin VanMaren a1002a48e1 [PATCH] x86_64: When allocation of merged SG lists fails in the IOMMU don't merge
[ AK: I redid Kevin's fix to be simpler, but the idea and original
  analysis of the problem is from Kevin]

This avoid allocation failures on some SATA systems like Nvidia CK8
when the IOMMU gets fragmented. Modern SATA devices have quite large queues
(128 entries) and the FS with ext2/3 is good enough now that it often
passes whole 128 page sg lists down to the driver. These require
512K of continuous free space in the IOMMU aperture to map when merged.
When the IOMMU is fragmented this could lead to spurious IO errors
due to failing mappings.

Short term fix is to just try to map the SG list again unmerged
page by page - this way fragmentation doesn't matter anymore.
The code for that was already there, but it just wasn't enabled for the
merge case.

According to Kevin at least the Nvidia device doesn't seem to benefit
from merging much anyways, so the only slowdown is from trying
to do an unnecessary merge attempt.

Kevin plans to implement better fragmentation avoidance in the future,
but that wouldn't be 2.6.16 material.

TBD: should add some statistic counters to count how often that really
happens.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-04 16:43:14 -08:00
Andi Kleen 1de6bf33bc [PATCH] x86_64: Fix zero mcfg entry workaround on x86-64
I broke this earlier when moving the patch from i386 to x86-64.
Need to return the virtual address here, not the physical address.
This fixes some boot time crashes on x86-64.

Cc: gregkh@suse.de

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-04 16:43:14 -08:00
Andi Kleen d22fe80844 [PATCH] x86_64: Do more checking in the SRAT header code
- Check if the processor/memory affinity entries are long enough
   according to the ACPI 3.0 spec.
 - Ignore memory affinity entries that define a zero length region.

All based on BIOS issues found in the field @)

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-04 16:43:14 -08:00
Ashok Raj 7ded56895c [PATCH] x86_64: data/functions wrongly marked as __init with cpu hotplug.
attached patch is 2 more cases i found via running the reference_init.pl
script. These were easy to spot just knowing the file names. There is
one another about init/main.c that i cant exactly zero in. (partly
because i dont know how to interpret the data thats spewed out of the tool).

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>
2006-02-04 16:43:14 -08:00
Shaohua Li 396bd50fed [PATCH] x86_64: mark two routines as __cpuinit
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>
2006-02-04 16:43:14 -08:00
Andi Kleen 9391a3f9c7 [PATCH] x86_64: Clear more state when ignoring empty node in SRAT parsing
Might fix boot failures on systems with empty PXMs in SRAT

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-04 16:43:14 -08:00
Andi Kleen 7115125057 [PATCH] x86_64: Remove CONFIG_INIT_DEBUG
It has been enabled by default for some time now and is cheap enough
so it doesn't matter anyways.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-04 16:43:13 -08:00
Ravikiran G Thirumalai 10f4dc8b27 [PATCH] x86_64: Fix the node cpumask of a cpu going down
Currently, x86_64 and ia64 arches do not clear the corresponding bits
in the node's cpumask when a cpu goes down or cpu bring up is cancelled.
This is buggy since there are pieces of common code where the cpumask is
checked in the cpu down code path to decide on things (like in  the slab
down path).  PPC does the right thing, but x86_64 and ia64 don't (This
was the reason Sonny hit upon a slab bug during cpu offline on ppc and
could not reproduce on other arches).  This patch fixes it for x86_64.
I won't attempt ia64 as I cannot test it.

Credit for spotting this should go to Alok.

Signed-off-by: Alok N Kataria <alokk@calsoftinc.com>
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>
2006-02-04 16:43:13 -08:00
Andi Kleen 7bcd3f34e2 [PATCH] x86_64: Undo the earlier changes to remove unrolled copy/memset functions
They cause quite bad performance regressions on Netburst
This is temporary until we can get new optimized functions
for these CPUs.

This undoes changes that were done in 2.6.15 and in 2.6.16-rc1,
essentially bringing the code back to 2.6.14 level. Only change
is I renamed the X86_FEATURE_K8_C flag to X86_FEATURE_REP_GOOD
and fixed the check for the flag and also fixed some comments.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-04 16:43:13 -08:00
Andi Kleen 6bca52b544 [PATCH] x86_64: Fix swiotlb dma_alloc_coherent fallback
This avoids BUG_ONs in the low level allocator when an illegal
GFP mask is added.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-04 16:43:13 -08:00
Shaohua Li 0dd2ea9af8 [PATCH] x86_64: [PATCH] timer resume
At resume time, TSC's value or something similar might be changed a lot
against suspend time. This could make system gets a very big lost ticks.
See http://bugzilla.kernel.org/show_bug.cgi?id=5825

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>
2006-02-04 16:43:13 -08:00
Andi Kleen 6f3814cd2f [PATCH] x86_64: Automatically enable apicmaintimer on ATI boards
They all have problems with IRQ 0 routing, so just use the APIC on them.

Can be overwritten with "noapicmaintimer"

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-04 16:43:13 -08:00
Andi Kleen 73dea47fae [PATCH] x86_64: Allow to run main time keeping from the local APIC interrupt
Another piece from the no-idle-tick patch.

This can be enabled with the "apicmaintimer" option.

This is mainly useful when the PIT/HPET interrupt is unreliable.
Note there are some systems that are known to stop the APIC
timer in C3. For those it will never work, but this case
should be automatically detected.

It also only works with PM timer right now. When HPET is used
the way the main timer handler computes the delay doesn't work.

It should be a bit more efficient because there is one less
regular interrupt to process on the boot processor.

Requires earlier bugfix from Venkatesh

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-04 16:43:13 -08:00
Andi Kleen eddb6fb9a5 [PATCH] x86_64: Disallow kprobes on NMI handlers
A kprobe executes IRET early and that could cause NMI recursion
and stack corruption.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-04 16:43:12 -08:00
Andi Kleen 2f01942536 [PATCH] x86_64: Update defconfig
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-04 16:43:12 -08:00
Linus Torvalds 89a2fa5f21 Merge master.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6 2006-02-03 18:17:47 -08:00
Linus Torvalds 1a56f54c35 Merge master.kernel.org:/home/rmk/linux-2.6-arm 2006-02-03 15:50:35 -08:00
Russell King 2c4c6b2702 [ARM] Remove ARCH_CAMELOT from at91 defconfigs
ARCH_CAMELOT (excalibur) got removed; remove it from the AT91 defconfigs

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-02-03 23:03:21 +00:00
Zhang, Yanmin 69dcc99199 [PATCH] Export cpu topology in sysfs
The patch implements cpu topology exportation by sysfs.

Items (attributes) are similar to /proc/cpuinfo.

1) /sys/devices/system/cpu/cpuX/topology/physical_package_id:
	represent the physical package id of  cpu X;
2) /sys/devices/system/cpu/cpuX/topology/core_id:
	represent the cpu core id to cpu X;
3) /sys/devices/system/cpu/cpuX/topology/thread_siblings:
	represent the thread siblings to cpu X in the same core;
4) /sys/devices/system/cpu/cpuX/topology/core_siblings:
	represent the thread siblings to cpu X in the same physical package;

To implement it in an architecture-neutral way, a new source file,
driver/base/topology.c, is to export the 5 attributes.

If one architecture wants to support this feature, it just needs to
implement 4 defines, typically in file include/asm-XXX/topology.h.
The 4 defines are:
#define topology_physical_package_id(cpu)
#define topology_core_id(cpu)
#define topology_thread_siblings(cpu)
#define topology_core_siblings(cpu)

The type of **_id is int.
The type of siblings is cpumask_t.

To be consistent on all architectures, the 4 attributes should have
deafult values if their values are unavailable. Below is the rule.

1) physical_package_id: If cpu has no physical package id, -1 is the
default value.

2) core_id: If cpu doesn't support multi-core, its core id is 0.

3) thread_siblings: Just include itself, if the cpu doesn't support
HT/multi-thread.

4) core_siblings: Just include itself, if the cpu doesn't support
multi-core and HT/Multi-thread.

So be careful when declaring the 4 defines in include/asm-XXX/topology.h.

If an attribute isn't defined on an architecture, it won't be exported.

Thank Nathan, Greg, Andi, Paul and Venki.

The patch provides defines for i386/x86_64/ia64.

Signed-off-by: Zhang, Yanmin <yanmin.zhang@intel.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-03 08:32:09 -08:00
Tong Li 23332c2e9d [PATCH] OProfile: fixed x86_64 incorrect kernel call graphs
Fix the problem in kernel 2.6.15.1 (and early versions) that OProfile on
x86_64 does not correctly collect the stack traces for kernel functions.

The original code in valid_kernel_stack() in arch/i386/oprofile/backtrace.c
assumes that the frame pointer (headaddr) should be greater than stack
(i.e., regs).

This assumption is wrong for x86_64 because NMIs in x86_64 use a seperate
stack different from the kernel stack.  Therefore, the variable stack now
points to some location on the NMI stack, which turns out to be at a higher
address than the frame pointer (headaddr) on the kernel stack.  The correct
comparison here should be between headaddr and regs->rsp for x86_64.

Signed-off-by: Tong Li <tong.n.li@intel.com>
Cc: John Levon <levon@movementarian.org>
Cc: Philippe Elie <phil.el@wanadoo.fr>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-03 08:32:04 -08:00
Alan Cox 8145916996 [PATCH] Fix some ucLinux breakage from the tty updates
Breakage reported by Adrian Bunk

Untested (no hardware)

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-03 08:32:04 -08:00
Heiko Carstens cd2d2bf657 [PATCH] s390: fix compat syscall wrapper
Patch 9ad11ab48b changes the type of the first
argument of some compat syscalls from int to unsigned int.  Add these changes
to the s390 compat wrapper as well.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-03 08:32:01 -08:00
Robin Holt 7c6c663629 [IA64-SGI] Fix XPC code which sleeps with spin_lock_irqsave().
During some testing, we got a warning about trying to allocate
memory while holding a lock.  This fixes that problem.

Signed-off-by: Robin Holt <holt@sgi.com>
Acked-by: Dean Nelson <dcn@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2006-02-02 13:37:46 -08:00
Jes Sorensen 2fcc3db0cc [IA64-SGI] sn2 housekeeping
Maintenance patch:
 - Add missing __init calls
 - Do not zero initialize global variables
 - No need to typecast function call returns to void
 - Some formatting

Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2006-02-02 13:35:59 -08:00
Tony Luck 41db6112a5 Pull sgi-drivers-makefile-cleanup into release branch 2006-02-02 13:30:59 -08:00
Bjorn Helgaas a58786917c [IA64] avoid broken SAL_CACHE_FLUSH implementations
If SAL_CACHE_FLUSH drops interrupts, complain about it and fall back to
using PAL_CACHE_FLUSH instead.

This is to work around a defect in HP rx5670 firmware: when an interrupt
occurs during SAL_CACHE_FLUSH, SAL drops the interrupt but leaves it marked
"in-service", which leaves the interrupt (and others of equal or lower
priority) masked.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2006-02-02 13:25:54 -08:00
Kyle McMartin af14aca90e [IA64] Remove stale comment from ia64/Kconfig
Somehow I doubt this comment is meant to be here anymore... It's
been floating after the L1_CACHE_SHIFT entry since before Linux
moved to bitkeeper.

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2006-02-02 13:23:55 -08:00
Mark Maule a80dcc0b96 [IA64-SGI] disable msi for all altix pci devices
Temporary patch to make pci_enable_msi() fail gracefully on altix.  Will be
removed after 2.6.16 releases and the msi abstraction patches start flowing.

Signed-off-by: Mark Maule <maule@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2006-02-02 13:23:02 -08:00
Mark Maule 689388bbf8 [IA64-SGI] fix smp_affinity redirection when using CONFIG_PCI_MSI
Redirecting interrupts using smp_affinity on altix does not work on kernels
built with CONFIG_PCI_MSI.  The problem is that move_irq() turns into a noop
if MSI is built in.  This patch calls move_native_irq() instead of move_irq()
to get around that.

Signed-off-by: Mark Maule <maule@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2006-02-02 13:22:15 -08:00
Tony Luck df080e7c94 Pull update-tlbflush-sn into release branch 2006-02-02 13:16:29 -08:00
Linus Torvalds 59ed2f59e4 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 2006-02-01 22:06:15 -08:00
Linas Vepstas f9bdfa0ecb [PATCH] PowerPC/PCI Hotplug build break
Build break: Building PCI hotplug on PowerPC results in
a build break, due to failure to export symbols.

Reported today by Dave Jones <davej@redhat.com>:
drivers/pci/hotplug/rpaphp.ko needs unknown symbol pcibios_add_pci_devices

This patch fixes the break in the arch/powerpc tree.
Next patch fixes same problem in drivers/pci tree

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-01 16:35:29 -08:00
Lucas Correia Villa Real 83f755f5a6 [ARM] 3286/2: S3C2400 - adds to the table of supported CPUs
Patch from Lucas Correia Villa Real

Oops, sorry for the typo on name_s3c2400, a new patch is attached.
About GSTATUS1, S3C2400 doesn't have that register, so it's not
safe to use that memory address to identify its CPU.

Signed-off-by: Lucas Correia Villa Real <lucasvr@gobolinux.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-02-01 21:24:24 +00:00
Lucas Correia Villa Real 0ca5bc3de7 [ARM] 3284/1: S3C2400 - adds support to GPIO
Patch from Lucas Correia Villa Real

This patch adds support to GPIO on the S3C2400, which is going to
be used by the GP32 machine and the SMDK2400 development board.

Signed-off-by: Lucas Correia Villa Real <lucasvr@gobolinux.org>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-02-01 21:24:23 +00:00
Russ Dill 7610dfa372 [ARM] 3295/1: Fix oprofile init return value
Patch from Russ Dill

The oprofile init code was broken in commit c6b9da. The new logic will
always return -ENODEV. This fixes oprofile_arch_init to return 0 on
success, and return the return value of spec->init() if applicable.

Signed-off-by: Russ Dill <Russ.Dill@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-02-01 21:07:28 +00:00
Nicolas Pitre 18afea04f1 [ARM] 3294/1: don't invalidate individual BTB entries on ARMv6
Patch from Nicolas Pitre

Doing so adds a much larger cost to the loop than the cost implied by
simply invalidating the whole BTB at once.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-02-01 19:26:01 +00:00
Nicolas Pitre 8a052e0bc2 [ARM] 3293/1: don't invalidate the whole I-cache with xscale_coherent_user_range
Patch from Nicolas Pitre

The mini I-cache issue is valid only for kernel space since debuggers
would not fly if they used user space addresses for their stubs.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-02-01 19:26:01 +00:00
Richard Purdie afe5df208e [ARM] 3291/1: PXA27x: Correct get_clk_frequency_khz turbo flag handling
Patch from Richard Purdie

The turbo flag is in bit 0 of the CLKCFG register, not bit 1.
This patch corrects this so get_clk_frequency_khz returns a correct
value.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-02-01 19:25:59 +00:00
Heiko Carstens 54dfe5dd9a [PATCH] s390: Add support for new syscalls/TIF_RESTORE_SIGMASK
Add support for the new *at, pselect6 and ppoll system calls.  This includes
adding required support for TIF_RESTORE_SIGMASK.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-01 08:53:24 -08:00
Heiko Carstens 1ab865c146 [PATCH] s390: New default configuration
New default configuration.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-01 08:53:24 -08:00
Jan Glauber 32f65f2746 [PATCH] s390: monotonic_clock interface
Add monotonic_clock interface, used by the hangcheck-timer.  On s390 this is
the same as sched_clock().

Signed-off-by: Jan Glauber <jan.glauber@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-01 08:53:24 -08:00
Jan Glauber 9dbafa5368 [PATCH] s390: overflow in sched_clock
The least significant bit of the TOD clock value returned by get_clock
is the 4096th part of a microsecond. To get to nanoseconds the value
needs to be divided by 4096 and multiplied with 1000.

The current method multiplies first and then shifts the value to make the
result as precise as possible.  The disadvantage is that the multiplication
with 1000 will overflow shortly after 52 days.  sched_clock is used by the
scheduler for time stamp deltas, if an overflow occurs between two time stamps
the scheduler will get confused.

With the patch the problem occurs only after approx.  one year, so the chance
to run into this overflow is extremly low.

Signed-off-by: Jan Glauber <jan.glauber@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-01 08:53:23 -08:00