Stephen Rothwell [Mon, 25 Aug 2008 10:22:21 +0000 (20:22 +1000)]
linux-next: fix x86 tree build failure
Today's linux-next build (powerpc allyesconfig) failed like this:
drivers/char/agp/uninorth-agp.c:541: error: unknown field 'agp_destroy_paged' specified in initializer
Caused by commit
5f310b63781f6777bf4e812570560ec0f8ea42d8
("agp: enable optimized agp_alloc_pages methods"). A simple typo ...
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Venki Pallipadi [Fri, 22 Aug 2008 19:08:17 +0000 (12:08 -0700)]
x86: have set_memory_array_{uc,wb} coalesce memtypes, fix
Fix the start addr for free_memtype calls in the error path.
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Acked-by: Rene Herman <rene.herman@keyaccess.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Rene Herman [Thu, 21 Aug 2008 17:15:46 +0000 (19:15 +0200)]
agp: enable optimized agp_alloc_pages methods
The pageattr-array patch that you currently have in tip/master only
enables it for intel-agp, not the others. The attached enables it for
all drivers currently directly using agp_generic_alloc_page() and
agp_generic_destroy_page() (ocal driver is amd-k7-agp).
The new agp_generic_alloc_pages() interface uses the also new
pageattr array interface API. This makes all AGP drivers that
up to now used generic_{alloc,destroy}_page() use it.
Signed-off-by: Rene Herman <rene.herman@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Rene Herman [Thu, 21 Aug 2008 23:02:20 +0000 (01:02 +0200)]
x86: have set_memory_array_{uc,wb} coalesce memtypes.
Actually, might as well simply reconstruct the memtype list at free time
I guess. How is this for a coalescing version of the array functions?
Compiles, boots and provides me with:
root@7ixe4:~# wc -l /debug/x86/pat_memtype_list
53 /debug/x86/pat_memtype_list
otherwise (down from 16384+).
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Rene Herman [Thu, 21 Aug 2008 22:10:13 +0000 (00:10 +0200)]
x86: {reverve,free}_memtype() take a physical address
The new set_memory_array_{uc,wb}() pass virtual addresses to
{reserve,free}_memtype() it seems.
Signed-off-by: Rene Herman <rene.herman@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Ingo Molnar [Fri, 22 Aug 2008 04:06:51 +0000 (06:06 +0200)]
Merge branch 'x86/urgent' into x86/pat
Conflicts:
arch/x86/mm/pageattr.c
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Yinghai Lu [Fri, 22 Aug 2008 03:24:24 +0000 (20:24 -0700)]
x86: work around MTRR mask setting
Joshua Hoblitt reported that only 3 GB of his 16 GB of RAM is
usable. Booting with mtrr_show showed us the BIOS-initialized
MTRR settings - which are all wrong.
So the root cause is that the BIOS has not set the mask correctly:
> [ 0.429971] MSR00000200:
00000000d0000000
> [ 0.433305] MSR00000201:
0000000ff0000800
> should be ==> [ 0.433305] MSR00000201:
0000003ff0000800
>
> [ 0.436638] MSR00000202:
00000000e0000000
> [ 0.439971] MSR00000203:
0000000fe0000800
> should be ==> [ 0.439971] MSR00000203:
0000003fe0000800
>
> [ 0.443304] MSR00000204:
0000000000000006
> [ 0.446637] MSR00000205:
0000000c00000800
> should be ==> [ 0.446637] MSR00000205:
0000003c00000800
>
> [ 0.449970] MSR00000206:
0000000400000006
> [ 0.453303] MSR00000207:
0000000fe0000800
> should be ==> [ 0.453303] MSR00000207:
0000003fe0000800
>
> [ 0.456636] MSR00000208:
0000000420000006
> [ 0.459970] MSR00000209:
0000000ff0000800
> should be ==> [ 0.459970] MSR00000209:
0000003ff0000800
So detect this borkage and add the prefix 111.
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Shaohua Li [Thu, 21 Aug 2008 02:46:21 +0000 (10:46 +0800)]
x86: fix pageattr-test
We changed the interface of some pageattr, this patch makes
pageattr-test compile.
Signed-off-by: Dave Airlie <airlied@gmail.com>
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Shaohua Li [Thu, 21 Aug 2008 02:46:17 +0000 (10:46 +0800)]
agp: add agp_generic_destroy_pages()
Add agp_generic_destroy_pages(), it uses new pageattr array interface API.
Signed-off-by: Dave Airlie <airlied@gmail.com>
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Shaohua Li [Thu, 21 Aug 2008 02:46:11 +0000 (10:46 +0800)]
agp: generic_alloc_pages()
Add agp_generic_alloc_pages(), it uses new pageattr array interface API.
Signed-off-by: Dave Airlie <airlied@gmail.com>
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Shaohua Li [Thu, 21 Aug 2008 02:46:06 +0000 (10:46 +0800)]
x86, pageattr: introduce APIs to change pageattr of a page array
Add array interface APIs of pageattr. page based cache flush is quite
slow for a lot of pages. If pages are more than 1024 (4M), the patch
will use a wbinvd(). We have a simple test here (run a 3d game - open
arena), nearly all agp memory allocation are small (< 1M), so suppose
this will not impact runtime performance.
Signed-off-by: Dave Airlie <airlied@gmail.com>
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Ingo Molnar [Thu, 21 Aug 2008 11:46:33 +0000 (13:46 +0200)]
Revert "introduce two APIs for page attribute"
This reverts commit
1ac2f7d55b7ee1613c90631e87fea22ec06781e5.
Ingo Molnar [Thu, 21 Aug 2008 11:46:25 +0000 (13:46 +0200)]
Revert "reduce tlb/cache flush times of agpgart memory allocation"
This reverts commit
466ae837424dcc538b1af2a0eaf53be32edcdbe7.
venkatesh.pallipadi@intel.com [Wed, 20 Aug 2008 23:45:53 +0000 (16:45 -0700)]
x86: PAT Update validate_pat_support for intel CPUs
Pentium III and Core Solo/Duo CPUs have an erratum
" Page with PAT set to WC while associated MTRR is UC may consolidate to UC "
which can result in WC setting in PAT to be ineffective. We will disable
PAT on such CPUs, so that we can continue to use MTRR WC setting.
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
venkatesh.pallipadi@intel.com [Wed, 20 Aug 2008 23:45:52 +0000 (16:45 -0700)]
devmem, x86: PAT Change /dev/mem mmap with O_SYNC to use UC_MINUS
All kernel mappings like ioremap(), etc uses UC_MINUS as the type. /dev/mem
mappings with /dev/mem being opened with O_SYNC however was using UC,
resulting in a conflict with /dev/mem mmap failing. This seems to be
affecting some apps (one being flashrom) which are using O_SYNC and which were
working before.
Switch /dev/mem with O_SYNC also to UC_MINUS.
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
venkatesh.pallipadi@intel.com [Wed, 20 Aug 2008 23:45:51 +0000 (16:45 -0700)]
x86: PAT proper tracking of set_memory_uc and friends
Big thinko in pat memtype tracking code. reserve_memtype should be called
with physical address and not virtual address.
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Vegard Nossum [Wed, 20 Aug 2008 16:18:26 +0000 (18:18 +0200)]
x86: fix BUG: unable to handle kernel paging request (numaq_tsc_disable)
This section mismatch:
>> Seems to be a section mismatch; init_intel() is __cpuinit while
>> numaq_tsc_disable() is __init. Seems to be introduced in:
>>
>> commit
64898a8bad8c94ad7a4bd5cc86b66edfbb081f4a
>> Author: Yinghai Lu <yhlu.kernel@gmail.com>
>> Date: Sat Jul 19 18:01:16 2008 -0700
>>
>> x86: extend and use x86_quirks to clean up NUMAQ code
>
> Oops, I am wrong about numaq_tsc_disable() being __init. Still, I
> believe that Yinghai might be able to say what's really wrong :-)
Would lead to this crash:
BUG: unable to handle kernel paging request at
c08a45f0
IP: [<
c08a45f0>] numaq_tsc_disable+0x0/0x40
Fixed by the patch below.
Signed-off-by: Vegard Nossum <vegardno@ifi.uio.no>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Jeremy Fitzhardinge [Wed, 20 Aug 2008 18:31:07 +0000 (11:31 -0700)]
x86: export pv_lock_ops non-GPL
None of the spinlock API is exported GPL, so there's no reason for
pv_lock_ops to be.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: drago01 <drago01@gmail.com>
Marcin Slusarz [Wed, 20 Aug 2008 19:07:47 +0000 (21:07 +0200)]
x86, mmiotrace: silence section mismatch warning - leave_uniprocessor
WARNING: vmlinux.o(.text+0x180af): Section mismatch in reference from the function leave_uniprocessor() to the function .cpuinit.text:cpu_up()
The function leave_uniprocessor() references
the function __cpuinit cpu_up().
This is often because leave_uniprocessor lacks a __cpuinit
annotation or the annotation of cpu_up is wrong.
leave_uniprocessor calls cpu_up only when CONFIG_HOTPLUG_CPU is set,
so it can be safely annotated as __ref
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Pekka Paalanen <pq@iki.fi>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Pekka Paalanen <pq@iki.fi>
Arjan van de Ven [Tue, 8 Jul 2008 16:51:56 +0000 (09:51 -0700)]
x86: use WARN() in arch/x86/kernel
Use WARN() instead of a printk+WARN_ON() pair; this way the message
becomes part of the warning section for better reporting/collection.
This also allowed the folding of some if()'s into the WARN()
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Cc: akpm@linux-foundation.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Arjan van de Ven [Tue, 8 Jul 2008 16:50:22 +0000 (09:50 -0700)]
x86: use WARN() in arch/x86/mm/ioremap.c
Use WARN() instead of a printk+WARN_ON() pair; this way the message
becomes part of the warning section for better reporting/collection.
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Cc: akpm@linux-foundation.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
David Howells [Mon, 18 Aug 2008 09:58:17 +0000 (11:58 +0200)]
werror: fix pci calgary
Fix an integer comparison always false warning in the PCI Calgary 64 driver.
A u8 is being compared to something that's 512 by default, resulting in the
following warning:
arch/x86/kernel/pci-calgary_64.c:1285: warning: comparison is always false due to limited range of data type
This was introduced by patch
b34e90b8f0f30151349134f87b5dc6ef75a5218c.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Andi Kleen [Tue, 19 Aug 2008 01:13:38 +0000 (03:13 +0200)]
x86: fix oprofile + hibernation badness
Vegard Nossum reported oprofile + hibernation problems:
> Now some warnings:
>
> ------------[ cut here ]------------
> WARNING: at /uio/arkimedes/s29/vegardno/git-working/linux-2.6/kernel/smp.c:328 s
> mp_call_function_mask+0x194/0x1a0()
The usual problem: the suspend function when interrupts are
already disabled calls smp_call_function which is not allowed with
interrupt off. But at this point all the other CPUs should be already
down anyways, so it should be enough to just drop that.
This patch should fix that problem at least by fixing cpu hotplug&
suspend support.
[ mingo@elte.hu: fixed 5 coding style errors. ]
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Tested-by: Vegard Nossum <vegard.nossum@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cliff Wickman [Tue, 19 Aug 2008 17:51:59 +0000 (12:51 -0500)]
x86, SGI UV: hardcode the TLB flush interrupt system vector
The UV TLB shootdown mechanism needs a system interrupt vector.
Its vector had been hardcoded as 200, but needs to moved to the reserved
system vector range so that it does not collide with some device vector.
This is still temporary until dynamic system IRQ allocation is provided.
But it will be needed when real UV hardware becomes available and runs 2.6.27.
Signed-off-by: Cliff Wickman <cpw@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Venki Pallipadi [Tue, 19 Aug 2008 23:28:01 +0000 (16:28 -0700)]
x86: fix Xorg startup/shutdown slowdown with PAT
Rene Herman reported significant Xorg startup/shutdown slowdown due
to PAT. It turns out that the memtype list has thousands of entries.
Add cached_entry to list add routine, in order to speed up the
lookup for sequential reserve_memtype calls.
Reported-by: Rene Herman <rene.herman@keyaccess.nl>
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Samuel Sieb [Thu, 7 Aug 2008 05:06:29 +0000 (22:06 -0700)]
x86: fix "kernel won't boot on a Cyrix MediaGXm (Geode)"
Cyrix MediaGXm/Cx5530 Unicorn Revision 1.19.3B has stopped
booting starting at v2.6.22.
The reason is this commit:
> commit
f25f64ed5bd3c2932493681bdfdb483ea707da0a
> Author: Juergen Beisert <juergen@kreuzholzen.de>
> Date: Sun Jul 22 11:12:38 2007 +0200
>
> x86: Replace NSC/Cyrix specific chipset access macros by inlined functions.
this commit activated a macro which was dormant before due to (buggy)
macro side-effects.
I've looked through various datasheets and found that the GXm and GXLV
Geode processors don't have an incrementor.
Remove the incrementor setup entirely. As the incrementor value
differs according to clock speed and we would hope that the BIOS
configures it correctly, it is probably the right solution.
Cc: <stable@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Jiri Kosina [Tue, 19 Aug 2008 00:13:55 +0000 (02:13 +0200)]
x86 iommu: remove unneeded parenthesis
The parenthesis in __iommu_queue_command() are not needed when assigning
into 'target' variable.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Linus Torvalds [Mon, 18 Aug 2008 19:10:14 +0000 (12:10 -0700)]
Merge branch 'x86-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86: fix build warnings in real mode code
x86, calgary: fix section mismatch warning - get_tce_space_from_tar
x86: silence section mismatch warning - get_local_pda
x86, percpu: silence section mismatch warnings related to EARLY_PER_CPU variables
x86: fix i486 suspend to disk CR4 oops
x86: mpparse.c: fix section mismatch warning
x86: mmconf: fix section mismatch warning
x86: fix MP_processor_info section mismatch warning
x86, tsc: fix section mismatch warning
x86: correct register constraints for 64-bit atomic operations
Linus Torvalds [Mon, 18 Aug 2008 19:09:56 +0000 (12:09 -0700)]
Merge branch 'core-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip
* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
lockdep: fix spurious 'inconsistent lock state' warning
Linus Torvalds [Mon, 18 Aug 2008 19:05:01 +0000 (12:05 -0700)]
Merge branch 'merge' of git://git./linux/kernel/git/paulus/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
powerpc: Use generic compat_sys_old_readdir
powerpc/kexec: Fix up KEXEC_CONTROL_CODE_SIZE missed during conversion
powerpc: Remove dead module_find_bug code
powerpc: Add CMO enabled flag and paging space data to lparcfg
powerpc: Fix CMM page loaning on 64k page kernel with 4k hardware pages
powerpc: Make CMO paging space pool ID and page size available
powerpc: Fix lockdep IRQ tracing bug
powerpc: Fix TLB invalidation on boot on 32-bit
powerpc: Fix loss of vdso on fork on 32-bit
Linus Torvalds [Mon, 18 Aug 2008 19:03:23 +0000 (12:03 -0700)]
Merge git://git./linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
lmb: Fix reserved region handling in lmb_enforce_memory_limit().
sparc64: Fix cmdline_memory_size handling bugs.
sparc64: Fix overshoot in nid_range().
Dmitry Baryshkov [Mon, 18 Aug 2008 00:26:37 +0000 (04:26 +0400)]
lockdep: fix spurious 'inconsistent lock state' warning
Since
f82b217e3513fe3af342c0f3ee1494e86250c21c lockdep can output spurious
warnings related to hwirqs due to hardirq_off shrinkage from int to bit-sized
flag. Guard it with double negation to fix the warning.
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Andi Kleen [Mon, 18 Aug 2008 07:06:01 +0000 (09:06 +0200)]
x86: fix build warnings in real mode code
This recent patch
commit
c3965bd15118742d72b4bc1a290d37b3f081eb98
Author: Paul Jackson <pj@sgi.com>
Date: Wed May 14 08:15:34 2008 -0700
x86 boot: proper use of ARRAY_SIZE instead of repeated E820MAX constant
caused these new warnings during a normal build:
In file included from linux-2.6/arch/x86/boot/memory.c:17:
linux-2.6/include/linux/log2.h: In function '__ilog2_u32':
linux-2.6/include/linux/log2.h:34: warning: implicit declaration of function 'fls'
linux-2.6/include/linux/log2.h: In function '__ilog2_u64':
linux-2.6/include/linux/log2.h:42: warning: implicit declaration of function 'fls64'
linux-2.6/include/linux/log2.h: In function '__roundup_pow_of_two ':
linux-2.6/include/linux/log2.h:63: warning: implicit declaration of function 'fls_long'
I tried to fix them in log2.h, but it's difficult because the real mode
environment is completely different from a normal kernel environment. Instead
define an own ARRAY_SIZE macro in boot.h, similar to the other private
macros there.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Marcin Slusarz [Sun, 17 Aug 2008 15:50:52 +0000 (17:50 +0200)]
x86, calgary: fix section mismatch warning - get_tce_space_from_tar
WARNING: vmlinux.o(.text+0x27032): Section mismatch in reference from the function get_tce_space_from_tar() to the function .init.text:calgary_bus_has_devices()
The function get_tce_space_from_tar() references
the function __init calgary_bus_has_devices().
This is often because get_tce_space_from_tar lacks a __init
annotation or the annotation of calgary_bus_has_devices is wrong.
get_tce_space_from_tar is called only from __init function (calgary_init)
and calls __init function (calgary_bus_has_devices).
So annotate it properly.
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Chandru Siddalingappa <chandru@in.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Marcin Slusarz [Sun, 17 Aug 2008 15:50:51 +0000 (17:50 +0200)]
x86: silence section mismatch warning - get_local_pda
Take out part of get_local_pda referencing __init function (free_bootmem)
to new (static) function marked as __ref. It's safe to do because free_bootmem
is called before __init sections are dropped.
WARNING: vmlinux.o(.cpuinit.text+0x3cd7): Section mismatch in reference from the function get_local_pda() to the function .init.text:free_bootmem()
The function __cpuinit get_local_pda() references
a function __init free_bootmem().
If free_bootmem is only used by get_local_pda then
annotate free_bootmem with a matching annotation.
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Mike Travis <travis@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Marcin Slusarz [Sun, 17 Aug 2008 15:50:50 +0000 (17:50 +0200)]
x86, percpu: silence section mismatch warnings related to EARLY_PER_CPU variables
Quoting Mike Travis in "x86: cleanup early per cpu variables/accesses v4"
(
23ca4bba3e20c6c3cb11c1bb0ab4770b724d39ac):
The DEFINE macro defines the per_cpu variable as well as the early
map and pointer. It also initializes the per_cpu variable and map
elements to "_initvalue". The early_* macros provide access to
the initial map (usually setup during system init) and the early
pointer. This pointer is initialized to point to the early map
but is then NULL'ed when the actual per_cpu areas are setup. After
that the per_cpu variable is the correct access to the variable.
As these variables are NULL'ed before __init sections are dropped
(in setup_per_cpu_maps), they can be safely annotated as __ref.
This change silences following section mismatch warnings:
WARNING: vmlinux.o(.data+0x46c0): Section mismatch in reference from the variable x86_cpu_to_apicid_early_ptr to the variable .init.data:x86_cpu_to_apicid_early_map
The variable x86_cpu_to_apicid_early_ptr references
the variable __initdata x86_cpu_to_apicid_early_map
If the reference is valid then annotate the
variable with __init* (see linux/init.h) or name the variable:
*driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,
WARNING: vmlinux.o(.data+0x46c8): Section mismatch in reference from the variable x86_bios_cpu_apicid_early_ptr to the variable .init.data:x86_bios_cpu_apicid_early_map
The variable x86_bios_cpu_apicid_early_ptr references
the variable __initdata x86_bios_cpu_apicid_early_map
If the reference is valid then annotate the
variable with __init* (see linux/init.h) or name the variable:
*driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,
WARNING: vmlinux.o(.data+0x46d0): Section mismatch in reference from the variable x86_cpu_to_node_map_early_ptr to the variable .init.data:x86_cpu_to_node_map_early_map
The variable x86_cpu_to_node_map_early_ptr references
the variable __initdata x86_cpu_to_node_map_early_map
If the reference is valid then annotate the
variable with __init* (see linux/init.h) or name the variable:
*driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Mike Travis <travis@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
David Fries [Mon, 18 Aug 2008 04:03:40 +0000 (23:03 -0500)]
x86: fix i486 suspend to disk CR4 oops
arch/x86/power/cpu_32.c __save_processor_state calls read_cr4()
only a i486 CPU doesn't have the CR4 register. Trying to read it
produces an invalid opcode oops during suspend to disk.
Use the safe rc4 reading op instead. If the value to be written is
zero the write is skipped.
arch/x86/power/hibernate_asm_32.S
done: swapped the use of %eax and %ecx to use jecxz for
the zero test and jump over store to %cr4.
restore_image: s/%ecx/%eax/ to be consistent with done:
In addition to __save_processor_state, acpi_save_state_mem,
efi_call_phys_prelog, and efi_call_phys_epilog had checks added
(acpi restore was in assembly and already had a check for
non-zero). There were other reads and writes of CR4, but MCE and
virtualization shouldn't be executed on a i486 anyway.
Signed-off-by: David Fries <david@fries.net>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Marcin Slusarz [Sun, 10 Aug 2008 22:09:38 +0000 (00:09 +0200)]
x86: mpparse.c: fix section mismatch warning
WARNING: vmlinux.o(.text+0x118f7): Section mismatch in reference from the function construct_ioapic_table() to the function .init.text:MP_bus_info()
The function construct_ioapic_table() references
the function __init MP_bus_info().
This is often because construct_ioapic_table lacks a __init
annotation or the annotation of MP_bus_info is wrong.
construct_ioapic_table is called only from construct_default_ISA_mptable which is __init
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Marcin Slusarz [Sun, 10 Aug 2008 22:11:13 +0000 (00:11 +0200)]
x86: mmconf: fix section mismatch warning
WARNING: arch/x86/kernel/built-in.o(.cpuinit.text+0x1591): Section mismatch in reference from the function init_amd() to the function .init.text:check_enable_amd_mmconf_dmi()
The function __cpuinit init_amd() references
a function __init check_enable_amd_mmconf_dmi().
If check_enable_amd_mmconf_dmi is only used by init_amd then
annotate check_enable_amd_mmconf_dmi with a matching annotation.
check_enable_amd_mmconf_dmi is only called from init_amd which is __cpuinit
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Marcin Slusarz [Sun, 10 Aug 2008 22:12:37 +0000 (00:12 +0200)]
x86: fix MP_processor_info section mismatch warning
WARNING: arch/x86/kernel/built-in.o(.cpuinit.text+0x1fe7): Section mismatch in reference from the function MP_processor_info() to the variable .init.data:x86_quirks
The function __cpuinit MP_processor_info() references
a variable __initdata x86_quirks.
If x86_quirks is only used by MP_processor_info then
annotate x86_quirks with a matching annotation.
MP_processor_info uses x86_quirks which is __init and is used only from
smp_read_mpc and construct_default_ISA_mptable which are __init
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Marcin Slusarz [Sun, 10 Aug 2008 22:07:44 +0000 (00:07 +0200)]
x86, tsc: fix section mismatch warning
WARNING: vmlinux.o(.text+0x7950): Section mismatch in reference from the function native_calibrate_tsc() to the function .init.text:tsc_read_refs()
The function native_calibrate_tsc() references
the function __init tsc_read_refs().
This is often because native_calibrate_tsc lacks a __init
annotation or the annotation of tsc_read_refs is wrong.
tsc_read_refs is called from native_calibrate_tsc which is not __init
and native_calibrate_tsc cannot be marked __init
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Mathieu Desnoyers [Sat, 16 Aug 2008 07:39:26 +0000 (03:39 -0400)]
x86: correct register constraints for 64-bit atomic operations
x86_64 add/sub atomic ops does not seems to accept integer values bigger
than 32 bits as immediates. Intel's add/sub documentation specifies they
have to be passed as registers.
The only operations in the x86-64 architecture which accept arbitrary
64-bit immediates is "movq" to any register; similarly, the only
operation which accept arbitrary 64-bit displacement is "movabs" to or
from al/ax/eax/rax.
http://gcc.gnu.org/onlinedocs/gcc-4.3.0/gcc/Machine-Constraints.html
states :
e
32-bit signed integer constant, or a symbolic reference known to fit
that range (for immediate operands in sign-extending x86-64
instructions).
Z
32-bit unsigned integer constant, or a symbolic reference known to
fit that range (for immediate operands in zero-extending x86-64
instructions).
Since add/sub does sign extension, using the "e" constraint seems appropriate.
It applies to 2.6.27-rc, 2.6.26, 2.6.25...
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Christoph Hellwig [Sat, 16 Aug 2008 17:57:30 +0000 (03:57 +1000)]
powerpc: Use generic compat_sys_old_readdir
Use the generic compat_sys_old_readdir instead of the powerpc one which
is almost the same except for the almost complete lack of error
handling.
Note that we can't just use SYSCALL() in systbl.h because the native
syscall is named old_readdir, not sys_old_readdir.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Paul Collins [Sat, 16 Aug 2008 08:55:54 +0000 (18:55 +1000)]
powerpc/kexec: Fix up KEXEC_CONTROL_CODE_SIZE missed during conversion
Commit
163f6876f5c3ff8215e900b93779e960a56b3694 missed one, resulting in
the following compile error:
AS arch/powerpc/kernel/misc_32.o
arch/powerpc/kernel/misc_32.S: Assembler messages:
arch/powerpc/kernel/misc_32.S:902: Error: unsupported relocation against KEXEC_CONTROL_CODE_SIZE
make[2]: *** [arch/powerpc/kernel/misc_32.o] Error 1
make[1]: *** [arch/powerpc/kernel] Error 2
make: *** [vmlinux] Error 2
I grepped arch/ and found no further instances.
Signed-off-by: Paul Collins <paul@ondioline.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Steven Rostedt [Sat, 16 Aug 2008 03:56:44 +0000 (13:56 +1000)]
powerpc: Remove dead module_find_bug code
Doing some various "make randconfig", I came across an error when
CONFIG_BUG was not set:
arch/powerpc/kernel/module.c: In function 'module_find_bug':
arch/powerpc/kernel/module.c:111: error: increment of pointer to unknown structure
arch/powerpc/kernel/module.c:111: error: arithmetic on pointer to an incomplete type
arch/powerpc/kernel/module.c:112: error: dereferencing pointer to incomplete type
Looking further into this, I found that module_find_bug, defined in
powerpc arch code, is not called anywhere, so this just removes it.
There is a static module_find_bug in lib/bug.c but that is a separate issue.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Robert Jennings [Fri, 15 Aug 2008 19:10:18 +0000 (05:10 +1000)]
powerpc: Add CMO enabled flag and paging space data to lparcfg
Add a field in lparcfg output to indicate whether the kernel is
running on a dedicated or shared memory lpar. Added fields to show
the paging space pool IDs and the CMO page size.
Submitted-by: Robert Jennings <rcj@linux.vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Brian King [Fri, 15 Aug 2008 19:09:33 +0000 (05:09 +1000)]
powerpc: Fix CMM page loaning on 64k page kernel with 4k hardware pages
If the firmware page size used for collaborative memory overcommit
is 4k, but the kernel is using 64k pages, the page loaning is currently
broken as it only marks the first 4k page of each 64k page as loaned.
This fixes this to iterate through each 4k page and mark them all as
loaned/active.
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Robert Jennings [Fri, 15 Aug 2008 19:07:31 +0000 (05:07 +1000)]
powerpc: Make CMO paging space pool ID and page size available
During platform setup, save off the primary/secondary paging space
pool IDs and the page size. Added accessors in hvcall.h for these
variables. This is needed for a subsequent fix.
Submitted-by: Robert Jennings <rcj@linux.vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Benjamin Herrenschmidt [Fri, 15 Aug 2008 07:11:31 +0000 (17:11 +1000)]
powerpc: Fix lockdep IRQ tracing bug
A small bogon sneaked into the ppc64 lockdep support. A test is
branching slightly off causing a clobbered register value to
overwrite the irq state under some circumstances.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Rocky Craig [Thu, 14 Aug 2008 13:11:54 +0000 (23:11 +1000)]
powerpc: Fix TLB invalidation on boot on 32-bit
The intent of "flush_tlbs" is to invalidate all TLB entries by doing a
TLB invalidate instruction for all pages in the address range 0 to
0x00400000. A loop counter is set up at the high value and
decremented by page size. However, the loop is only done once as the
sense of the conditional branch at the loop end does not match the
setup/decrement. This fixes it to do the whole range by correcting
the branch condition.
Signed-off-by: Rocky Craig <rocky.craig@hp.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Benjamin Herrenschmidt [Tue, 12 Aug 2008 07:03:26 +0000 (17:03 +1000)]
powerpc: Fix loss of vdso on fork on 32-bit
When we fork, init_new_context() improperly resets the vdso_base
of the new context to 0. That means that the new process loses
access to the vdso for signal trampolines.
The initialization should be unnecessary anyway as the context
on a fresh mm should be 0 in the first place and binfmt_elf
will initialize that value for a newly loaded process.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Linus Torvalds [Sun, 17 Aug 2008 20:01:30 +0000 (13:01 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/drzeus/mmc
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc:
sdricoh_cs: removed unused #include <version.h>
s3cmci: attach get_cd host ops
s3cmci: fix sparse errors from non-exported functions
Huang Weiyi [Sat, 16 Aug 2008 23:51:10 +0000 (07:51 +0800)]
sdricoh_cs: removed unused #include <version.h>
The drivers below do not use LINUX_VERSION_CODE nor KERNEL_VERSION.
drivers/mmc/host/sdricoh_cs.c
This patch removes the said #include <version.h>.
Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Ben Dooks [Tue, 12 Aug 2008 08:24:50 +0000 (09:24 +0100)]
s3cmci: attach get_cd host ops
Attach the routine to get_cd to allow the MMC core to find out whether
there is a card present or not without the tedious process of trying to
send commands to the card or not.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Ben Dooks [Fri, 8 Aug 2008 09:55:41 +0000 (10:55 +0100)]
s3cmci: fix sparse errors from non-exported functions
Fix the following sparse errors by making the functions
static and fixing the check for host->base.
598:6: warning: symbol 's3cmci_dma_done_callback' was not declared. Should it be static?
744:6: warning: symbol 's3cmci_dma_setup' was not declared. Should it be static?
1209:20: warning: Using plain integer as NULL pointer
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Linus Torvalds [Sun, 17 Aug 2008 16:20:33 +0000 (09:20 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
ALSA: hda - Fix capture source widgets on ALC codecs
Alexander Beregalov [Sun, 17 Aug 2008 01:34:20 +0000 (05:34 +0400)]
security.h: fix build failure
security.h: fix build failure
include/linux/security.h: In function 'security_ptrace_traceme':
include/linux/security.h:1760: error: 'parent' undeclared (first use in this function)
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Tested-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: James Morris <jmorris@namei.org>
Takashi Iwai [Fri, 15 Aug 2008 14:46:42 +0000 (16:46 +0200)]
ALSA: hda - Fix capture source widgets on ALC codecs
On some Realtek codecs like ALC882 or ALC883, the capture source is
no mux but sum widget. We have to initialize all channels properly
for this type, otherwise noises may come in from the unused route.
The patch assures to mute unused routes, and unmute the currently
selected route.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Tested-by: Daniel J Blueman <daniel.blueman@gmail.com>
Huang Weiyi [Sat, 16 Aug 2008 23:51:05 +0000 (07:51 +0800)]
removed unused #include <version.h>
The drivers below do not use LINUX_VERSION_CODE nor KERNEL_VERSION.
drivers/char/pcmcia/ipwireless/tty.c
drivers/char/synclink_gt.c
drivers/char/xilinx_hwicap/xilinx_hwicap.c
This patch removes the said #include <version.h>.
Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Sun, 17 Aug 2008 00:16:07 +0000 (17:16 -0700)]
Merge branch 'core-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip
* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
lockdep: fix build if CONFIG_PROVE_LOCKING not defined
lockdep: use WARN() in kernel/lockdep.c
lockdep: spin_lock_nest_lock(), checkpatch fixes
lockdep: build fix
Linus Torvalds [Sun, 17 Aug 2008 00:15:32 +0000 (17:15 -0700)]
Merge branch 'sched-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip
* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
sched: scale sysctl_sched_shares_ratelimit with nr_cpus
sched: fix rt-bandwidth hotplug race
sched: fix the race between walk_tg_tree and sched_create_group
Linus Torvalds [Sun, 17 Aug 2008 00:14:07 +0000 (17:14 -0700)]
Merge branch 'x86-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (32 commits)
x86: add MAP_STACK mmap flag
x86: fix section mismatch warning - spp_getpage()
x86: change init_gdt to update the gdt via write_gdt, rather than a direct write.
x86-64: fix overlap of modules and fixmap areas
x86, geode-mfgpt: check IRQ before using MFGPT as clocksource
x86, acpi: cleanup, temp_stack is used only when CONFIG_SMP is set
x86: fix spin_is_contended()
x86, nmi: clean UP NMI watchdog failure message
x86, NMI: fix watchdog failure message
x86: fix /proc/meminfo DirectMap
x86: fix readb() et al compile error with gcc-3.2.3
arch/x86/Kconfig: clean up, experimental adjustement
x86: invalidate caches before going into suspend
x86, perfctr: don't use CCCR_OVF_PMI1 on Pentium 4Ds
x86, AMD IOMMU: initialize dma_ops after sysfs registration
x86m AMD IOMMU: cleanup: replace LOW_U32 macro with generic lower_32_bits
x86, AMD IOMMU: initialize device table properly
x86, AMD IOMMU: use status bit instead of memory write-back for completion wait
x86: silence mmconfig printk
x86, msr: fix NULL pointer deref due to msr_open on nonexistent CPUs
...
Andi Kleen [Sat, 16 Aug 2008 05:53:05 +0000 (07:53 +0200)]
Move sysctl check into debugging section and don't make it default y
I noticed that sysctl_check.o was the largest object file in
a allnoconfig build in kernel/*.
36243 0 0 36243 8d93 kernel/sysctl_check.o
This is because it was default y and && EMBEDDED. But I don't
really see a need for a non kernel developer to have their
sysctls checked all the time.
So move the Kconfig into the kernel debugging section and
also drop the default y and the EMBEDDED check.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Sat, 16 Aug 2008 23:48:45 +0000 (16:48 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm: (38 commits)
[ARM] 5191/1: ARM: remove CVS keywords
[ARM] pxafb: fix the warning of incorrect lccr when lcd_conn is specified
[ARM] pxafb: add flag to specify output format on LDD pins when base is RGBT16
[ARM] pxafb: fix the incorrect configuration of GPIO77 as ACBIAS for TFT LCD
[ARM] 5198/1: PalmTX: PCMCIA fixes
[ARM] Fix a pile of broken watchdog drivers
[ARM] update mach-types
[ARM] 5196/1: fix inline asm constraints for preload
[ARM] 5194/1: update .gitignore
[ARM] add proc-macros.S include to proc-arm940 and proc-arm946
[ARM] 5192/1: ARM TLB: add v7wbi_{possible,always}_flags to {possible,always}_tlb_flags
[ARM] 5193/1: Wire up missing syscalls
[ARM] traps: don't call undef hook functions with spinlock held
[ARM] 5183/2: Provide Poodle LoCoMo GPIO names
[ARM] dma-mapping: provide sync_range APIs
[ARM] dma-mapping: improve type-safeness of DMA translations
[ARM] Kirkwood: instantiate the orion_spi driver in the platform code
[ARM] prevent crashing when too much RAM installed
[ARM] Kirkwood: Instantiate mv_xor driver
[ARM] Orion: Instantiate mv_xor driver for 5182
...
David Woodhouse [Sat, 16 Aug 2008 10:55:04 +0000 (11:55 +0100)]
Fix header export of videodev2.h, ivtv.h, ivtvfb.h
The exported copy of videodev2.h contains this line:
#define #include <sys/time.h>
This is because for some reason it defines __user for itself -- despite
the fact that we remove all instances of __user when exporting headers.
_All_ pointers in userspace are user pointers. Fix it by removing the
unnecessary '#define __user' from the file.
The new headers ivtv.h and ivtvfb.h would have the same problem... if
whoever put them there had actually remembered to add them to the Kbuild
file while he was at it. Fix those too, and export them as was
presumably intended.
Note that includes of <linux/compiler.h> are also stripped by the header
export process, so those don't need to be conditional.
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Hugh Dickins [Sat, 16 Aug 2008 10:07:21 +0000 (11:07 +0100)]
mm: VM_flags comment fixes
Try to comment away a little of the confusion between mm's vm_area_struct
vm_flags and vmalloc's vm_struct flags: based on an idea by Ulrich Drepper.
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Adrian Bunk [Sun, 10 Aug 2008 14:25:55 +0000 (15:25 +0100)]
[ARM] 5191/1: ARM: remove CVS keywords
This patch removes CVS keywords that weren't updated for a long time.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Eric Miao [Sat, 16 Aug 2008 07:50:51 +0000 (03:50 -0400)]
[ARM] pxafb: fix the warning of incorrect lccr when lcd_conn is specified
The newly introduced "lcd_conn" field for connected LCD panel type will
cause the original code to generate the warnings of incorrect lccr*.
This is unnecessary since well encoded LCD_* flags will not generate
incorrect combinition of lccr* bits. Skip the check if "lcd_conn" is
specified.
Signed-off-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Eric Miao [Fri, 15 Aug 2008 06:50:44 +0000 (02:50 -0400)]
[ARM] pxafb: add flag to specify output format on LDD pins when base is RGBT16
Another fix of inconsistent shift of the LCD_BIAS_ACTIVE_* and
LCD_PCLK_EDGE_* is also included.
Signed-off-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Eric Miao [Sat, 16 Aug 2008 07:59:11 +0000 (03:59 -0400)]
[ARM] pxafb: fix the incorrect configuration of GPIO77 as ACBIAS for TFT LCD
Signed-off-by: Eric Miao <eric.miao@marvell.com>
Tested-by: Robert Jarzmik <robert.jarzmik@free.fr>
Tested-by: Alex Osborne <ato@meshy.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Marek Vašut [Sat, 16 Aug 2008 14:34:11 +0000 (15:34 +0100)]
[ARM] 5198/1: PalmTX: PCMCIA fixes
Fix GPIO handling in the PCMCIA driver.
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Adrian Bunk [Sun, 10 Aug 2008 11:33:08 +0000 (12:33 +0100)]
[ARM] Fix a pile of broken watchdog drivers
These patches from Adrian fix:
- ixp4xx_wdt:
20d35f3e50ea7e573f9568b9fce4e98523aaee5d
CC drivers/watchdog/ixp4xx_wdt.o
ixp4xx_wdt.c:32: error: expected '=', ',', ';', 'asm' or '__attribute__'
ixp4xx_wdt.c: In function 'wdt_enable':
ixp4xx_wdt.c:41: error: 'wdt_lock' undeclared (first use in this
ixp4xx_wdt.c:41: error: (Each undeclared identifier is reported only
ixp4xx_wdt.c:41: error: for each function it appears in.)
ixp4xx_wdt.c: In function 'wdt_disable':
ixp4xx_wdt.c:52: error: 'wdt_lock' undeclared (first use in this
ixp4xx_wdt.c: In function 'ixp4xx_wdt_init':
ixp4xx_wdt.c:186: error: 'wdt_lock' undeclared (first use in this
make[3]: *** [drivers/watchdog/ixp4xx_wdt.o] Error 1
- at91rm9200_wdt:
2760600da2a13d5a2a335ba012d0f3ad5df4c098
CC drivers/watchdog/at91rm9200_wdt.o
at91rm9200_wdt.c:188: error: 'at91_wdt_ioctl' undeclared here (not in a
make[3]: *** [drivers/watchdog/at91rm9200_wdt.o] Error 1
- wdt285:
d0e58eed05f9baf77c4f75e794ae245f6dae240a
CC [M] drivers/watchdog/wdt285.o
wdt285.c: In function 'footbridge_watchdog_init':
wdt285.c:211: error: 'KERN_WARN' undeclared (first use in this function)
wdt285.c:211: error: (Each undeclared identifier is reported only once
wdt285.c:211: error: for each function it appears in.)
wdt285.c:212: error: expected ')' before string constant
make[3]: *** [drivers/watchdog/wdt285.o] Error 1
And this patch from rmk:
- s3c2410_wdt:
41dc8b72e37c514f7332cbc3f3dd864910c2a1fa
CC drivers/watchdog/s3c2410_wdt.o
s3c2410_wdt.c: In function `s3c2410wdt_start':
s3c2410_wdt.c:161: warning: `return' with a value, in function returning void
Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Russell King [Wed, 13 Aug 2008 20:56:24 +0000 (21:56 +0100)]
[ARM] update mach-types
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Nicolas Pitre [Tue, 12 Aug 2008 21:10:59 +0000 (22:10 +0100)]
[ARM] 5196/1: fix inline asm constraints for preload
With gcc 4.3 and later, a pointer that has already been dereferenced is
assumed not to be null since it should have caused a segmentation fault
otherwise, hence any subsequent test against NULL is optimized away.
Current inline asm constraint used in the implementation of prefetch()
makes gcc believe that the pointer is dereferenced even though the PLD
instruction does not load any data and does not cause a segmentation
fault on null pointers, which causes all sorts of interesting results
when reaching the end of a linked lists for example.
Let's use a better constraint to properly represent the actual usage of
the pointer value.
Problem reported by Chris Steel.
Signed-off-by: Nicolas Pitre <nico@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
David S. Miller [Sat, 16 Aug 2008 02:57:57 +0000 (19:57 -0700)]
lmb: Fix reserved region handling in lmb_enforce_memory_limit().
The idea of the implementation of this fix is from Michael Ellerman.
This function has two loops, but they each interpret the memory_limit
value differently. The first loop interprets it as a "size limit"
whereas the second loop interprets it as an "address limit".
Before the second loop runs, reset memory_limit to lmb_end_of_DRAM()
so that it all works out.
Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Michael Ellerman <michael@ellerman.id.au>
Linus Torvalds [Fri, 15 Aug 2008 22:32:13 +0000 (15:32 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jmorris/security-testing-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
security: Fix setting of PF_SUPERPRIV by __capable()
Linus Torvalds [Fri, 15 Aug 2008 22:31:23 +0000 (15:31 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/cooloney/blackfin-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6: (33 commits)
Blackfin arch: hook up some missing new system calls
Blackfin arch: fix missing digit in SCLK range checking
Blackfin arch: do not muck with the UART during boot -- let the serial driver worry about it
Blackfin arch: clear EMAC_SYSTAT during IRQ init rather than early head.S as we dont need it setup that early
Blackfin arch: use %pF when printing out the double fault address so we get symbol names
Blackfin arch: add support for the BlackStamp board
Blackfin arch: Allow ins functions to have a low latency version
Blackfin arch: Print out doublefault addresses, so debug can occur
Blackfin arch: shuffle related prototypes together -- no functional changes
Blackfin arch: move fixed code defines into fixed_code.h as very few things actually need to know these details
Blackfin arch: mark some functions as __init as they are only called from __init functions
Blackfin arch: delete dead prototypes
Blackfin arch: cleanup cache lock code
Blackfin arch: workaround SIC_IWR1 reset bug, by keeping MDMA0/1 always enabled in SIC_IWR1.
Blackfin arch: Fix bug - when expanding the trace buffer, it does not print out the decoded instruction.
Blackfin arch: Fix Bug - System with EMAC driver enabled - Core not idling
Blackfin arch: delete unused cache functions
Blackfin arch: convert L2 defines to be the same as the L1 defines
Blackfin arch: unify the duplicated portions of __start and split mach-specific pieces into _mach_early_start where they will be easier to trim over time
Blackfin arch: add asm/thread_info.h for THREAD_SIZE define
...
Linus Torvalds [Fri, 15 Aug 2008 19:47:16 +0000 (12:47 -0700)]
Merge branch 'release-2.6.27' of git://git./linux/kernel/git/ak/linux-acpi-2.6
* 'release-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-acpi-2.6:
cpuidle: Make ladder governor honor latency requirements fully
cpuidle: Menu governor fix wrong usage of measured_us
cpuidle: Do not use poll_idle unless user asks for it
x86: Fix ioremap off by one BUG
Andi Kleen [Fri, 15 Aug 2008 19:26:12 +0000 (21:26 +0200)]
Merge branch 'cpuidle' into release-2.6.27
venkatesh.pallipadi@intel.com [Thu, 31 Jul 2008 02:21:44 +0000 (19:21 -0700)]
cpuidle: Make ladder governor honor latency requirements fully
ladder governor only honored latency requirement when promoting C-states.
Instead. it should check for latency requirement on each idle call,
and demote to appropriate C-state when there is a latency requirement change.
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
venkatesh.pallipadi@intel.com [Thu, 31 Jul 2008 02:21:43 +0000 (19:21 -0700)]
cpuidle: Menu governor fix wrong usage of measured_us
There is a bug in menu governor where we have
if (data->elapsed_us < data->elapsed_us + measured_us)
with measured_us already having elapsed_us added in tickless case here
unsigned int measured_us =
cpuidle_get_last_residency(dev) + data->elapsed_us;
Also, it should be last_residency, not measured_us, that need to be used to
do comparing and distinguish between expected & non-expected events.
Refactor menu_reflect() to fix these two problems.
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Wei Gang <gang.wei@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
venkatesh.pallipadi@intel.com [Thu, 31 Jul 2008 02:21:42 +0000 (19:21 -0700)]
cpuidle: Do not use poll_idle unless user asks for it
poll_idle was added to CPUIDLE, just as a low latency idle handler, to be
used in cases when user desires CPUs not to enter any idle state at all. It
was supposed to be a run time idle=poll option to the user. But, it was indeed
getting used during normal menu and ladder governor default case, with no
special user setting (Reported by Linus Torvalds).
Change below ensures that poll_idle will not be used unless user explicitly
asks pm_qos infrastructure for zero latency requirement.
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Linus Torvalds [Fri, 15 Aug 2008 18:52:40 +0000 (11:52 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
ALSA: wm8990: Implement speaker volume PGA
ALSA: wm8990: Fix routing of left DAC to speaker mixer
ALSA: virtuoso: add Xonar D1 support
Jean Delvare [Fri, 15 Aug 2008 08:58:05 +0000 (10:58 +0200)]
hwmon-vid: Fix AMD K8 VID decoding
Not all AMD K8 have 6 VID pins, contrary to what was assumed in
commit
116d0486bdefc11f71e567cadf0c47f788b4dd06. This commit broke
support of older CPU models which have only 5 VID pins:
http://bugzilla.kernel.org/show_bug.cgi?id=11329
We need two entries in the hwmon-vid table, one for 5-bit VID models
(K8 revision <= E) and one for 6-bit VID models (K8 revision >= F).
This fixes bug #11329.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Frank Myhr <fmyhr@fhmtech.com>
Tested-by: Jean-Luc Coulon <jean.luc.coulon@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Ingo Molnar [Wed, 13 Aug 2008 16:02:18 +0000 (18:02 +0200)]
x86: add MAP_STACK mmap flag
as per this discussion:
http://lkml.org/lkml/2008/8/12/423
Pardo reported that 64-bit threaded apps, if their stacks exceed the
combined size of ~4GB, slow down drastically in pthread_create() - because
glibc uses MAP_32BIT to allocate the stacks. The use of MAP_32BIT is
a legacy hack - to speed up context switching on certain early model
64-bit P4 CPUs.
So introduce a new flag to be used by glibc instead, to not constrain
64-bit apps like this.
glibc can switch to this new flag straight away - it will be ignored
by the kernel. If those old CPUs ever matter to anyone, support for
it can be implemented.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Ulrich Drepper <drepper@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Fri, 15 Aug 2008 18:02:35 +0000 (11:02 -0700)]
Merge git://git./linux/kernel/git/sfrench/cifs-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
[CIFS] mount of IPC$ breaks with iget patch
[CIFS] remove trailing whitespace
[CIFS] if get root inode fails during mount, cleanup tree connection
Andi Kleen [Fri, 15 Aug 2008 17:38:47 +0000 (19:38 +0200)]
Merge branch 'ioremap' into release-2.6.27
Alan Cox [Fri, 15 Aug 2008 09:39:38 +0000 (10:39 +0100)]
tty: remove resize window special case
This moves it to being a tty operation. That removes special cases and now
also means that resize can be picked up by um and other non vt consoles
which may have a resize operation.
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Fri, 15 Aug 2008 17:33:07 +0000 (10:33 -0700)]
Merge branch 'linux-next' of git://git.infradead.org/~dedekind/ubifs-2.6
* 'linux-next' of git://git.infradead.org/~dedekind/ubifs-2.6: (29 commits)
UBIFS: xattr bugfixes
UBIFS: remove unneeded check
UBIFS: few commentary fixes
UBIFS: fix budgeting request alignment in xattr code
UBIFS: improve arguments checking in debugging messages
UBIFS: always set i_generation to 0
UBIFS: correct spelling of "thrice".
UBIFS: support splice_write
UBIFS: minor tweaks in commit
UBIFS: reserve more space for index
UBIFS: print pid in dump function
UBIFS: align inode data to eight
UBIFS: improve budgeting checks
UBIFS: correct orphan deletion order
UBIFS: fix typos in comments
UBIFS: do not union creat_sqnum and del_cmtno
UBIFS: optimize deletions
UBIFS: increment commit number earlier
UBIFS: remove another unneeded function parameter
UBIFS: remove unneeded function parameter
...
Stephen Hemminger [Fri, 15 Aug 2008 16:33:05 +0000 (09:33 -0700)]
lockdep: fix build if CONFIG_PROVE_LOCKING not defined
If CONFIG_PROVE_LOCKING not defined, then no dependency information
is available.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Ingo Molnar [Wed, 13 Aug 2008 16:02:18 +0000 (18:02 +0200)]
x86: add MAP_STACK mmap flag
as per this discussion:
http://lkml.org/lkml/2008/8/12/423
Pardo reported that 64-bit threaded apps, if their stacks exceed the
combined size of ~4GB, slow down drastically in pthread_create() - because
glibc uses MAP_32BIT to allocate the stacks. The use of MAP_32BIT is
a legacy hack - to speed up context switching on certain early model
64-bit P4 CPUs.
So introduce a new flag to be used by glibc instead, to not constrain
64-bit apps like this.
glibc can switch to this new flag straight away - it will be ignored
by the kernel. If those old CPUs ever matter to anyone, support for
it can be implemented.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Ulrich Drepper <drepper@gmail.com>
Marcin Slusarz [Fri, 15 Aug 2008 16:32:24 +0000 (18:32 +0200)]
x86: fix section mismatch warning - spp_getpage()
WARNING: vmlinux.o(.text+0x17a3e): Section mismatch in reference from the function set_pte_vaddr_pud() to the function .init.text:spp_getpage()
The function set_pte_vaddr_pud() references
the function __init spp_getpage().
This is often because set_pte_vaddr_pud lacks a __init
annotation or the annotation of spp_getpage is wrong.
spp_getpage is called from __init (__init_extra_mapping) and
non __init (set_pte_vaddr_pud) functions, so it can't be __init.
Unfortunately it calls alloc_bootmem_pages which is __init,
but does it only when bootmem allocator is available (after_bootmem == 0).
So annotate it accordingly.
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: H. Peter Anvin <hpa@zytor.com>
Alex Nixon [Fri, 15 Aug 2008 16:21:14 +0000 (17:21 +0100)]
x86: change init_gdt to update the gdt via write_gdt, rather than a direct write.
By writing directly, a memory access violation can occur whilst
hotplugging a CPU if the entry was previously marked read-only.
Signed-off-by: Alex Nixon <alex.nixon@citrix.com>
Cc: Jeremy Fitzhardinge <Jeremy.Fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Linus Torvalds [Fri, 15 Aug 2008 16:30:24 +0000 (09:30 -0700)]
Merge branch 'for-linus' of git://neil.brown.name/md
* 'for-linus' of git://neil.brown.name/md:
md: cancel check/repair requests when recovery is needed
Allow raid10 resync to happening in larger chunks.
Allow faulty devices to be removed from a readonly array.
Don't let a blocked_rdev interfere with read request in raid5/6
Fail safely when trying to grow an array with a write-intent bitmap.
Restore force switch of md array to readonly at reboot time.
Make writes to md/safe_mode_delay immediately effective.
Linus Torvalds [Fri, 15 Aug 2008 16:28:16 +0000 (09:28 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: xilinx_ps2 - fix warning
Input: bcm5974 - implement autosuspend support
Input: bcm5974 - add driver for Macbook Air and Pro Penryn touchpads
Input: paper over a bug in Synaptics X driver
Input: evdev - split EVIOCGBIT handlig into a separate function
Input: i8042 - Add Dritek quirk for Acer TravelMate 4280
Input: xpad - add Pelican Eclipse D-Pad to the list of devices
Input: gpio-keys - make gpio_keys_device_driver static
Input: gpio-keys - fix possible NULL pointer dereference
Input: wm97xx - enable sub-drivers by default
Linus Torvalds [Fri, 15 Aug 2008 16:26:37 +0000 (09:26 -0700)]
Merge branch 'release-2.6.27' of git://git./linux/kernel/git/ak/linux-acpi-2.6
* 'release-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-acpi-2.6:
ACPI: Fix thermal shutdowns
ACPI: bounds check IRQ to prevent memory corruption
ACPI: Avoid bogus EC timeout when EC is in Polling mode
ACPI : Add the EC dmi table to fix the incorrect ECDT table
ACPI: Properly clear flags on false-positives and send uevent on sudden unplug
acpi: trivial cleanups
acer-wmi: Fix wireless and bluetooth on early AMW0 v2 laptops
ACPI: WMI: Set instance for query block calls
ACPICA: Additional error checking for pathname utilities
ACPICA: Fix possible memory leak in Unload() operator
ACPICA: Fix memory leak when deleting thermal/processor objects
Peter Zijlstra [Mon, 4 Aug 2008 06:54:26 +0000 (08:54 +0200)]
sched: scale sysctl_sched_shares_ratelimit with nr_cpus
David reported that his Niagra spend a little too much time in
tg_shares_up(), which considering he has a large cpu count makes sense.
So scale the ratelimit value with the number of cpus like we do for
other controls as well.
Reported-by: David Miller <davem@davemloft.net>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Linus Torvalds [Fri, 15 Aug 2008 16:19:40 +0000 (09:19 -0700)]
alpha: move include/asm-alpha to arch/alpha/include/asm
Sam Ravnborg did the build-test that the direct header file move works,
I'm just committing it.
This is a pure move:
mkdir arch/alpha/include
git mv include/asm-alpha arch/alpha/include/asm
with no other changes.
Requested-and-tested-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Andi Kleen [Fri, 15 Aug 2008 16:12:47 +0000 (18:12 +0200)]
x86: Fix ioremap off by one BUG
Jean Delvare's machine triggered this BUG
acpi_os_map_memory phys
ffff0000 size 65535
------------[ cut here ]------------
kernel BUG at arch/x86/mm/pat.c:233!
with ACPI in the backtrace.
Adding some debugging output showed that ACPI calls
acpi_os_map_memory phys
ffff0000 size 65535
And ioremap/PAT does this check in 32bit, so addr+size wraps and the BUG
in reserve_memtype() triggers incorrectly.
BUG_ON(start >= end); /* end is exclusive */
But reserve_memtype already uses u64:
int reserve_memtype(u64 start, u64 end,
so the 32bit truncation must happen in the caller. Presumably in ioremap
when it passes this information to reserve_memtype().
This patch does this computation in 64bit.
http://bugzilla.kernel.org/show_bug.cgi?id=11346
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Ingo Molnar [Fri, 15 Aug 2008 15:53:07 +0000 (17:53 +0200)]
Merge branch 'x86/geode' into x86/urgent