Commit graph

20153 commits

Author SHA1 Message Date
Ahmed S. Darwish 1ce70c4fac x86/lguest: fix pgdir pmd index calculation
Hi all,

Beginning from commits close to v2.6.25-rc2, running lguest always oopses
the host kernel. Oops is at [1].

Bisection led to the following commit:

commit 37cc8d7f96

    x86/early_ioremap: don't assume we're using swapper_pg_dir

    At the early stages of boot, before the kernel pagetable has been
    fully initialized, a Xen kernel will still be running off the
    Xen-provided pagetables rather than swapper_pg_dir[].  Therefore,
    readback cr3 to determine the base of the pagetable rather than
    assuming swapper_pg_dir[].

 static inline pmd_t * __init early_ioremap_pmd(unsigned long addr)
 {
-	pgd_t *pgd = &swapper_pg_dir[pgd_index(addr)];
+	/* Don't assume we're using swapper_pg_dir at this point */
+	pgd_t *base = __va(read_cr3());
+	pgd_t *pgd = &base[pgd_index(addr)];
 	pud_t *pud = pud_offset(pgd, addr);
 	pmd_t *pmd = pmd_offset(pud, addr);

Trying to analyze the problem, it seems on the guest side of lguest,
%cr3 has a different value from &swapper_pg-dir (which
is AFAIK fine on a pravirt guest):

Putting some debugging messages in early_ioremap_pmd:

/* Appears 3 times */
[    0.000000] ***************************
[    0.000000] __va(%cr3) = c0000000, &swapper_pg_dir = c02cc000
[    0.000000] ***************************

After 8 hours of debugging and staring on lguest code, I noticed something
strange in paravirt_ops->set_pmd hypercall invocation:

static void lguest_set_pmd(pmd_t *pmdp, pmd_t pmdval)
{
	*pmdp = pmdval;
	lazy_hcall(LHCALL_SET_PMD, __pa(pmdp)&PAGE_MASK,
		   (__pa(pmdp)&(PAGE_SIZE-1))/4, 0);
}

The first hcall parameter is global pgdir which looks fine. The second
parameter is the pmd index in the pgdir which is suspectful.

AFAIK, calculating the index of pmd does not need a divisoin over four.
Removing the division made lguest work fine again . Patch is at [2].

I am not sure why the division over four existed in the first place. It
seems bogus, maybe the Xen patch just made the problem appear ?

[2]: The patch:

[PATCH] lguest: fix pgdir pmd index cacluation

Remove an error in index calculation which leads to removing
a not existing shadow page table (leading to a Null dereference).

Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-02-26 12:55:49 +01:00
Tony Breeds db342d216b lguest: fix build breakage
[ mingo@elte.hu: merged to Rusty's patch ]

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-02-26 12:55:49 +01:00
Harvey Harrison cbc3497370 lguest: include function prototypes
Added a declaration to asm-x86/lguest.h and moved the extern arrays there
as well.  As an alternative to including asm/lguest.h directly, an
include could be put in linux/lguest.h

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: "rusty@rustcorp.com.au" <rusty@rustcorp.com.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-02-26 12:55:49 +01:00
Paul Mundt 96de1a8f02 serial: Move asm-sh/sci.h to linux/serial_sci.h.
This header is needed on other architectures as well (namely h8300),
which currently fails to build without this in place. Rather than
duplicating the port definition completely there, just move this to a
common location instead.

This should get h8300 working again for 2.6.25, in addition to the
changes already pushed by Sato-san in -rc2.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-26 14:52:45 +09:00
Magnus Damm 763a495a02 sh: revert dreamcast pci change
Commit e036eaa681 broke dreamcast pci, this
patch fixes that by reverting the dreamcast specific bits.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Acked-by: Adrian McMenamin <adrian@mcmen.demon.co.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-26 14:14:56 +09:00
Rafael Ignacio Zurita b7fd095602 sh: fix rtc_resources setup for sh770x
Fix the RTC resources setup for sh770x. Whit these proper
start values RTC driver (drivers/rtc/rtc-sh.c) works.

Signed-off-by: Rafael Ignacio Zurita <rizurita@yahoo.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-26 14:08:29 +09:00
Roel Kluin 1de83e94e6 sh: heartbeat: ioremap is expected to succeed
ioremap is expected to succeed

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-26 14:06:43 +09:00
Tobias Klauser 4377e605e0 sh: Storage class should be before const qualifier
The C99 specification states in section 6.11.5:

The placement of a storage-class specifier other than at the
beginning of the declaration specifiers in a declaration is an
obsolescent feature.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-26 14:04:17 +09:00
Harvey Harrison 2d07b255c7 sched: add declaration of sched_tail to sched.h
Avoids sparse warnings:
kernel/sched.c:2170:17: warning: symbol 'schedule_tail' was not declared. Should it be static?

Avoids the need for an external declaration in arch/um/process.c

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-02-25 16:34:17 +01:00
Paul Mundt 8ef97dd7a8 sh: SH5-103 needs to select CPU_SH5.
Without this, it's possible to have CONFIG_SUPERH32=y set on SH5-103
parts, which leads to much build badness.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-25 18:49:45 +09:00
Paul Mundt cc645a0205 sh: Rename SH-3 CCR3 reg to avoid synclink_cs clash.
drivers/char/pcmcia/synclink_cs.c:284:1: warning: "CCR3" redefined
In file included from include/asm/cache.h:13,
                 from include/asm/processor_32.h:15,
                 from include/asm/processor.h:60,
                 from include/linux/prefetch.h:14,
                 from include/linux/list.h:8,
                 from include/linux/module.h:9,
                 from drivers/char/pcmcia/synclink_cs.c:38:
include/asm/cpu/cache.h:38:1: warning: this is the location of the previous definition

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-25 18:49:44 +09:00
Sam Ravnborg 896aef430e [SPARC64]: Fix section mismatch from kernel_map_range
Fix following warnings:
WARNING: vmlinux.o(.text+0x4f980): Section mismatch in reference from the function kernel_map_range() to the function .init.text:__alloc_bootmem()
WARNING: vmlinux.o(.text+0x4f9cc): Section mismatch in reference from the function kernel_map_range() to the function .init.text:__alloc_bootmem()

alloc_bootmem() is only used during early init and for any subsequent
call to kernel_map_range() the program logic avoid the call.
So annotate kernel_map_range() with __ref to tell modpost to
ignore the reference to a __init function.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-24 19:49:52 -08:00
Sam Ravnborg 7769bd1c65 [SPARC64]: Fix section mismatchs from dr_cpu_data
Fix following warnings:
WARNING: vmlinux.o(.text+0x4b258): Section mismatch in reference from the function dr_cpu_data() to the function .devinit.text:mdesc_fill_in_cpu_data()
WARNING: vmlinux.o(.text+0x4b290): Section mismatch in reference from the function dr_cpu_data() to the function .cpuinit.text:cpu_up()

mdesc_fill_in_cpu_data() is only used during early init and for
cpu hotplug so the __cpuinit annotation is the correct choice.
We have the call chain:
dr_cpu_data() => dr_cpu_configure() => mdesc_fill_in_cpu_data()

dr_cpu_data() is used only during early init and for cpu
hotplug. So annotating them all __cpuinit solves the
section mismatch and should be correct.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-24 19:47:51 -08:00
David S. Miller b80a71860d [SPARC]: Fix build in arch/sparc/kernel/led.c
CC [M]  arch/sparc/kernel/led.o
arch/sparc/kernel/led.c: In function 'led_blink':
arch/sparc/kernel/led.c:35: error: invalid use of undefined type 'struct
timer_list'
arch/sparc/kernel/led.c:35: error: 'jiffies' undeclared (first use in
this function)
arch/sparc/kernel/led.c:35: error: (Each undeclared identifier is
reported only once
arch/sparc/kernel/led.c:35: error: for each function it appears in.)
arch/sparc/kernel/led.c:36: error: 'avenrun' undeclared (first use in
this function)
arch/sparc/kernel/led.c:36: error: 'FSHIFT' undeclared (first use in
this function)
arch/sparc/kernel/led.c:36: error: 'HZ' undeclared (first use in this
function)
arch/sparc/kernel/led.c:37: error: invalid use of undefined type 'struct
timer_list'
arch/sparc/kernel/led.c:39: error: invalid use of undefined type 'struct
timer_list'
arch/sparc/kernel/led.c:40: error: invalid use of undefined type 'struct
timer_list'
arch/sparc/kernel/led.c:42: error: implicit declaration of function
'add_timer'
arch/sparc/kernel/led.c: In function 'led_write_proc':
arch/sparc/kernel/led.c:70: error: implicit declaration of function
'copy_from_user'
arch/sparc/kernel/led.c:84: error: implicit declaration of function
'del_timer_sync'
arch/sparc/kernel/led.c: In function 'led_init':
arch/sparc/kernel/led.c:109: error: implicit declaration of function
'init_timer'
arch/sparc/kernel/led.c:110: error: invalid use of undefined type
'struct timer_list'
make[1]: *** [arch/sparc/kernel/led.o] Error 1

Based upon original patch by Robert Reif.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-24 18:45:09 -08:00
Jean Delvare c9a2c46d7f ARM: OMAP: Release i2c_adapter after use (Siemens SX1)
Each call to i2c_get_adapter() must be followed by a call to
i2c_put_adapter() to release the grabbed reference. Otherwise the
reference count grows forever and the adapter can never be
unregistered.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Vladimir Ananiev <vovan888@gmail.com>
Acked-by: Tony Lindgren <tony@atomide.com>
2008-02-24 20:03:41 +01:00
Eric Dujardin 4187377b24 [POWERPC] Add export for mpc52xx_set_psc_clkdiv
mpc52xx_set_psc_clkdiv is needed by PSC device drivers.

Signed-off-by: Eric Dujardin <eric.dujardin@sagem.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2008-02-23 22:51:28 -07:00
Linus Torvalds 85b80ebfa4 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC64]: make IOMMU code respect the segment boundary limits
  [SPARC64]: Fix cpu trampoline et al. mismatch warnings.
  [SPARC64]: More sparse warning fixes in process.c
  [SPARC64]: Fix sparse warning wrt. fault_in_user_windows.
  [SPARC64]: Kill show_regs32().
  [SPARC64]: Fix sparse warnings wrt. __show_regs().
  [SPARC64]: Kill show_stackframe{,32}().
  [SPARC64]: Fix sparse warnings wrt. machine_alt_power_off().
2008-02-23 21:00:21 -08:00
Yoshinori Sato ff10e5dc17 h8300: defconfig update
defconfig update.

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-23 17:12:16 -08:00
Yoshinori Sato 5cc265a5de h8300: IRQ handling update
- add missing file and declare.
- remove unused file and macros.
- some cleanup.

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-23 17:12:16 -08:00
Yoshinori Sato 45d464eb67 h8300: signal.c typo fix
typo fix.

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-23 17:12:15 -08:00
Jeff Dike 2f56debd77 uml: fix FP register corruption
Commit ee3d9bd4de ("uml: simplify SIGSEGV
handling"), while greatly simplifying the kernel SIGSEGV handler that
runs in the process address space, introduced a bug which corrupts FP
state in the process.

Previously, the SIGSEGV handler called the sigreturn system call by hand - it
couldn't return through the restorer provided to it because that could try to
call the libc restorer which likely wouldn't exist in the process address
space.  So, it blocked off some signals, including SIGUSR1, on entry to the
SIGSEGV handler, queued a SIGUSR1 to itself, and invoked sigreturn.  The
SIGUSR1 was delivered, and was visible to the UML kernel after sigreturn
finished.

The commit eliminated the signal masking and the call to sigreturn.  The
handler simply hits itself with a SIGTRAP to let the UML kernel know that it
is finished.  UML then restores the process registers, which effectively
longjmps the process out of the signal handler, skipping sigreturn's restoring
of register state and the signal mask.

The bug is that the host apparently sets used_fp to 0 when it saves the
process FP state in the sigcontext on the process signal stack.  Thus, when
the process is longjmped out of the handler, its FP state is corrupt because
it wasn't saved on the context switch to the UML kernel.

This manifested itself as sleep hanging.  For some reason, sleep uses floating
point in order to calculate the sleep interval.  When a page fault corrupts
its FP state, it is faked into essentially sleeping forever.

This patch saves the FP state before entering the SIGSEGV handler and restores
it afterwards.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-23 17:12:15 -08:00
Johann Felix Soden e4d06b3f90 uml: fix helper_wait calls in watchdog
In commit 1aa351a308 ("uml: tidy helper
code") the arguments of helper_wait() were changed.  The adaptation of
harddog_user.c was forgotten, so this errors occur:

  /arch/um/drivers/harddog_user.c: In function 'start_watchdog':
  /arch/um/drivers/harddog_user.c:82: error: too many arguments to function 'helper_wait'
  /arch/um/drivers/harddog_user.c:89: error: too many arguments to function 'helper_wait'

Signed-off-by: Johann Felix Soden <johfel@users.sourceforge.net>
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-23 17:12:15 -08:00
Jeff Dike b32eb52e40 uml: remove unused sigcontext accessors
The macros which extract registers from a struct sigcontext are no longer
needed and can be removed.  They are starting not to build anyway, given the
removal of the 'e' and 'r' from register names during the x86 merge.

Cc: Jiri Olsa <olsajiri@gmail.com>
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-23 17:12:15 -08:00
David Howells 860f7be283 MN10300: define HZ as a config option
Define HZ as a config option.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-23 17:12:13 -08:00
WANG Cong c3be10f757 arch/um/kernel/mem.c: fix a shadowed variable
Fix a shadowed variable in arch/um/kernel/mem.c, since there is a global
variable has the same name.

Cc: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-23 17:12:13 -08:00
Jeff Dike 7b59ebcd17 UML: update defconfig
Update defconfig.

Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-23 17:12:13 -08:00
Johann Felix Soden 4631a9a151 uml: fix initrd printk
If the initrd file has zero-length, the error message should contain
the filepath.

Cc: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Johann Felix Soden <johfel@users.sourceforge.net>
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-23 17:12:13 -08:00
Linus Torvalds 2c020a99e0 Mark CC_STACKPROTECTOR as being BROKEN
It's always been broken, but recent fixes actually made it do something,
and now the brokenness shows up as the resulting kernel simply not
working at all.

So it used to be that you could enable this config option, and it just
didn't do anything.  Now we'd better stop people from enabling it by
mistake, since it _does_ do something, but does it so badly as to be
unusable.

Code to actually make it work is pending, but incomplete and won't be
merged into 2.6.25 in any case.

Acked-by: Arjan van de Ven <arjan@infradead.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Cc: James Morris <jmorris@namei.org>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-22 08:21:38 -08:00
Roland McGrath f9cb02b0be x86 ptrace: fix compat PTRACE_SETREGS
Simple typo fix for regression introduced by the user_regset changes.

Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-22 07:35:06 -08:00
Linus Torvalds 20f8d2a493 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (26 commits)
  PM: Make suspend_device() static
  PCI ACPI: Fix comment describing acpi_pci_choose_state
  Hibernation: Handle DEBUG_PAGEALLOC on x86
  ACPI: fix build warning
  ACPI: TSC breaks atkbd suspend
  ACPI: remove is_processor_present prototype
  acer-wmi: Add DMI match for mail LED on Acer TravelMate 4200 series
  ACPI: sparse fix, replace macro with static function
  ACPI: thinkpad-acpi: add tablet-mode reporting
  ACPI: thinkpad-acpi: minor hotkey_radio_sw fixes
  ACPI: thinkpad-acpi: improve thinkpad-acpi input device documentation
  ACPI: thinkpad-acpi: issue input events for tablet swivel events
  ACPI: thinkpad-acpi: make the video output feature optional
  ACPI: thinkpad-acpi: synchronize input device switches
  ACPI: thinkpad-acpi: always track input device open/close
  ACPI: thinkpad-acpi: trivial fix to documentation
  ACPI: thinkpad-acpi: trivial fix to module_desc typo
  intel_menlo: extract return values using PTR_ERR
  ACPI video: check for error from thermal_cooling_device_register
  ACPI thermal: extract return values using PTR_ERR
  ...
2008-02-21 16:33:19 -08:00
Linus Torvalds b8967d8883 Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/pci-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/pci-2.6:
  PCI: Fix wrong reference counter check for proc_dir_entry
  PCI: fix up setup-bus.c #ifdef
  PCI: don't load acpi_php when acpi is disabled
  PCI: quirks: set 'En' bit of MSI Mapping for devices onHT-based nvidia platform
  PCI: kernel-doc: fix pci-acpi warning
  PCI: irq: patch for Intel ICH10 DeviceID's
  PCI: pci_ids: patch for Intel ICH10 DeviceID's
  PCI: AMD SATA IDE mode quirk
  PCI: drivers/pcmcia/i82092.c: fix up after pci_bus_region changes
  PCI: hotplug: acpiphp_ibm: Remove get device information
2008-02-21 16:21:08 -08:00
Linus Torvalds 06165752c8 Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] 4835/1: Fix stale comment in struct machine_desc description
  [ARM] 4829/1: add .get method to pxa-cpufreq to silence a warning
  [ARM] 4828/1: fix 3 warnings in drivers/video/pxafb.c
  [ARM] 4827/1: fix two warnings in drivers/i2c/busses/i2c-pxa.c
  [ARM] 4826/1: Orion: Register the RTC interrupt on the TS-209
  [ARM] pxa: fix clock lookup to find specific device clocks
2008-02-21 16:19:34 -08:00
Linus Torvalds 0f151e8b21 Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
  [POWERPC] pasemi: Remove warning in mpic_pasemi_msi.c
  [POWERPC] pasemi: Register i2c devices at boot
  [POWERPC] cell: fix spurious false return from spu_trap_data_{map,seg}
  [POWERPC] Fix warning in pseries/power.c
  [POWERPC] Fix bootwrapper builds with older gcc versions
  [POWERPC] Fix dt_mem_next_cell() to read the full address
  [POWERPC] Kill sparse warnings in kprobes
  [POWERPC] spufs: fix scheduler starvation by idle contexts
  [POWERPC] 44x: Add multiplatform defconfig
  [POWERPC] 44x: Fix Kconfig formatting
  [POWERPC] 4xx: Update defconfigs for 2.6.25
  [POWERPC] 4xx: Remove "i2c" and "xxmii-interface" device_types from dts
  [POWERPC] PPC440EP Interrupt Triggering and Level Settings
  [POWERPC] net: NEWEMAC: Remove "rgmii-interface" from rgmii matching table
2008-02-21 16:18:05 -08:00
Yinghai Lu 6e4be1ff2e PCI: don't load acpi_php when acpi is disabled
When acpi=off and pci=nomsi, don't load acpiphp.

Fixes this:

pci_hotplug: PCI Hot Plug PCI Core version: 0.5
acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5
ACPI Exception (utmutex-0263): AE_BAD_PARAMETER, Thread
FFFF81103CC54000 could not acquire Mutex [1] [20070126]

[akpm@linux-foundation.org: export acpi_pci_disabled for acpiphp.ko]
[akpm@linux-foundation.org: fix return statement]
Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>
Cc: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-21 15:34:37 -08:00
Jason Gaston cc09c5bcf1 PCI: irq: patch for Intel ICH10 DeviceID's
This patch adds the Intel ICH10 LPC Controller DeviceID's.

Signed-off-by: Jason Gaston <jason.d.gaston@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-21 15:34:36 -08:00
Paul Mackerras a8b87f609d Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jk/spufs into merge 2008-02-21 21:49:13 +11:00
Olof Johansson 9c03385228 [POWERPC] pasemi: Remove warning in mpic_pasemi_msi.c
Remove warning:

arch/powerpc/sysdev/mpic_pasemi_msi.c: In function 'pasemi_msi_setup_msi_irqs':
arch/powerpc/sysdev/mpic_pasemi_msi.c:135: warning: 'addr' is used uninitialized in this function

Turns out addr wasn't even used, it's a leftover from the u3msi code.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-02-21 21:08:35 +11:00
Olof Johansson be2553ffb5 [POWERPC] pasemi: Register i2c devices at boot
Setup i2c_board_info based on device tree contents.  This has to be
a device_initcall since we need PCI to be probed by the time we
run it, but before the actual driver is initialized.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-02-21 21:08:35 +11:00
Rafael J. Wysocki 8a235efad5 Hibernation: Handle DEBUG_PAGEALLOC on x86
Make hibernation work with CONFIG_DEBUG_PAGEALLOC set on x86, by
checking if the pages to be copied are marked as present in the
kernel mapping and temporarily marking them as present if that's not
the case.  No functional modifications are introduced if
CONFIG_DEBUG_PAGEALLOC is unset.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-21 02:15:28 -05:00
FUJITA Tomonori 89c94f2f70 [SPARC64]: make IOMMU code respect the segment boundary limits
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-20 22:56:42 -08:00
Sam Ravnborg 0f7f22d9a4 [SPARC64]: Fix cpu trampoline et al. mismatch warnings.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-20 22:22:16 -08:00
David Howells e80af3a8db FRV: Change the timerfd syscalls to be the same as i386
Change the FRV timerfd syscalls to be the same as i386 timerfd syscalls.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-20 19:58:16 -08:00
David Howells 2d0e2baa25 FRV: Drop the .data.idt section for FRV
There is no .data.idt section for FRV, so drop it from the linker script.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-20 19:58:16 -08:00
David S. Miller b1422401f2 [SPARC64]: More sparse warning fixes in process.c
arch/sparc64/kernel/process.c:504:17: warning: symbol 'sparc_do_fork' was not declared. Should it be static?
arch/sparc64/kernel/process.c:655:5: warning: symbol 'dump_fpu' was not declared. Should it be static?
arch/sparc64/kernel/process.c:708:16: warning: symbol 'sparc_execve' was not declared. Should it be static?

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-19 21:25:50 -08:00
David S. Miller 02947ecb0d [SPARC64]: Kill show_regs32().
Unused, noticed via sparse.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-19 21:18:08 -08:00
David S. Miller 3ac1da338b [SPARC64]: Fix sparse warnings wrt. __show_regs().
arch/sparc64/kernel/process.c:219:6: warning: symbol '__show_regs' was not declared. Should it be static?

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-19 20:48:58 -08:00
David S. Miller 5bbdb48d4c [SPARC64]: Kill show_stackframe{,32}().
Noticed via sparse:

arch/sparc64/kernel/process.c:215:6: warning: symbol 'show_stackframe' was not declared. Should it be static?
arch/sparc64/kernel/process.c:243:6: warning: symbol 'show_stackframe32' was not declared. Should it be static?

It is totally unused.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-19 20:42:11 -08:00
David S. Miller c3c2524031 [SPARC64]: Fix sparse warnings wrt. machine_alt_power_off().
arch/sparc64/kernel/process.c:123:6: warning: symbol 'machine_alt_power_off' was not declared. Should it be static?

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-19 20:39:18 -08:00
Andre Detsch 61b36fc1f7 [POWERPC] cell: fix spurious false return from spu_trap_data_{map,seg}
At present, the __spufs_trap_data_map and __spu_trap_data_seq functions
exit if spu->flags has the SPU_CONTEXT_SWITCH_ACTIVE set. This was
resulting in suprious returns from these functions, as they may be
legitimately called when we have this bit set.

We only use it in these two sanity checks, so this change removes the
flag completely. This fixes hangs in the page-fault path of SPE apps.

Signed-off-by: Andre Detsch <adetsch@br.ibm.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
2008-02-20 14:57:36 +11:00
Stephen Rothwell 3d5d27c40f [POWERPC] Fix warning in pseries/power.c
Introduced by commit 79393fc46e
("kobject: convert pseries/power.c to kobj_attr interface").

sys_create_file takes a "struct attrbute *" not a "struct
kobj_addribute *".

arch/powerpc/platforms/pseries/power.c: In function 'apo_pm_init':
arch/powerpc/platforms/pseries/power.c:78: warning: passing argument 2 of 'sysfs_create_file' from incompatible pointer type

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-02-20 13:33:37 +11:00
Josh Boyer bf2e70ac65 [POWERPC] Fix bootwrapper builds with older gcc versions
GCC versions before 3.4 did not support the -mcpu=440 option.  Use
-mcpu=405 for the 4xx specific bootwrapper files, as that has been
around for much longer.

Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-02-20 13:33:37 +11:00
Becky Bruce abe768858a [POWERPC] Fix dt_mem_next_cell() to read the full address
dt_mem_next_cell() currently does of_read_ulong().  This does not
allow for the case where #size-cells and/or #address-cells = 2 on a
32-bit system, as it will end up reading 32 bits instead of the
expected 64.  Change it to use of_read_number instead and always
return a u64.

Signed-off-by: Becky Bruce <becky.bruce at freescale.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-02-20 13:33:37 +11:00
Ananth N Mavinakayanahalli 66200ea222 [POWERPC] Kill sparse warnings in kprobes
Fix sparse warnings in powerpc kprobes:

  CHECK   arch/powerpc/kernel/kprobes.c
arch/powerpc/kernel/kprobes.c:277:6: warning: symbol 'kretprobe_trampoline_holder' was not declared. Should it be static?
arch/powerpc/kernel/kprobes.c:287:15: warning: symbol 'trampoline_probe_handler' was not declared. Should it be static?
arch/powerpc/kernel/kprobes.c:525:16: warning: symbol 'jprobe_return_end' was not declared. Should it be static?

Fix along the same lines as http://lkml.org/lkml/2008/2/13/642

Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-02-20 13:33:37 +11:00
Linus Torvalds 5d9c4a7de6 Merge branch 'agp-patches' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/agp-2.6
* 'agp-patches' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/agp-2.6:
  agp: fix missing casts that produced a warning.
  agp: add support for 662/671 to agp driver
  fix historic ioremap() abuse in AGP
  agp/sis: Suspend support for SiS AGP
  agp/sis: Clear bit 2 from aperture size byte as well
2008-02-19 18:29:57 -08:00
Linus Torvalds cf8c0d1dbc Merge git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86
* git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86: (32 commits)
  x86: fix page_is_ram() thinko
  x86: fix WARN_ON() message: teach page_is_ram() about the special 4Kb bios data page
  x86: i8259A: remove redundant irq_descinitialization
  x86: fix vdso_install breaks user "make install"
  x86: change IO delay back to 0x80
  x86: lds - Use THREAD_SIZE instead of numeric constant
  x86: lds - Use PAGE_SIZE instead of numeric constant
  x86 cleanup: suspend_asm_64.S - use X86_CR4_PGE instead of numeric value
  x86: docs fixes to Documentation/i386/IO-APIC.txt
  x86: fix printout ugliness in cpu info printk
  x86: clean up csum-wrappers_64.c some more
  x86: coding style fixes in arch/x86/lib/csum-wrappers_64.c
  x86: coding style fixes in arch/x86/lib/io_64.c
  x86: exclude vsyscall files from stackprotect
  x86: add pgd_large() on 64-bit, for consistency
  x86: minor cleanup of comments in processor.h
  x86: annotate pci/common.s:pci_scan_bus_with_sysdata with __devinit
  x86: fix section mismatch in head_64.S:initial_code
  x86: fix section mismatch in srat_64.c:reserve_hotadd
  x86: fix section mismatch warning in topology.c:arch_register_cpu
  ...
2008-02-19 15:56:05 -08:00
Linus Torvalds d5c67bac83 Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  [MIPS] BCM47XX: Use new SSB SPROM data structure
  [MIPS] WGT634U: Register MTD as platform device.
  [MIPS] BCM47xx: Add defconfig file.
  [MIPS] RM: fix EISA=n compilation
  [MIPS] PCI: Coding style fixes for pcibios_enable_resources.
  [MIPS] PCI: Port i386 PCI fixes.
  [MIPS] Qemu: finish platform removal
  [MIPS] Wire up the timerfd_*() o32 system calls
  [MIPS] IP28: Add defconfig file
  [MIPS] SB1: Fix CONFIG_SIBYTE_DMA_PAGEOPS build failure.
  [MIPS] BCM1480: Remove stray function call resulting in infinite recursion
  [MIPS] Fix buggy invocations of kmap_coherent()
  [MIPS] Fix broken rm7000/rm9000 interrupt handling
  [MIPS] Handle I-cache coherency in flush_cache_range()
  [MIPS] IP27: Add missing ~ in DMA code.
  [MIPS] Use find_task_by_vpid in system calls
2008-02-19 15:54:22 -08:00
Linus Torvalds 989b0b9302 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/czankel/xtensa-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/czankel/xtensa-2.6: (29 commits)
  [XTENSA] Allow debugger to modify the WINDOWBASE register.
  [XTENSA] Fix makefile to work with binutils-2.18.
  [XTENSA] Fix register corruption for certain processor configurations
  [XTENSA] Fix cache flush macro for D$/I$ aliasing/non-aliasing
  [XTENSA] Exclude thread-global registers from the xtregs structures.
  [XTENSA] Add support for the sa_restorer function
  [XTENSA] Add support for configurable registers and coprocessors
  [XTENSA] Clean up stat structs.
  [XTENSA] Use preprocessor to generate the linker script for the ELF boot image
  [XTENSA] Add missing RELOCATE_ENTRY for debug vector
  [XTENSA] Add volatile keyword to asm statements accessing counter registers
  [XTENSA] Remove unused code
  [XTENSA] Fix modules for non-exec processor configurations
  [XTENSA] Add missing cast in elf.h ELF_CORE_COPY_REGS()
  [XTENSA] Fix comments regarding the number of frames to save
  [XTENSA] Add missing a2 register restore in register spill routine
  [XTENSA] adjust boot linker script start addresses
  [XTENSA] Remove oldmask from sigcontext and fix register flush
  [XTENSA] Clean up elf-gregset.
  [XTENSA] Fix icache flush for cache aliasing
  ...
2008-02-19 15:53:02 -08:00
David Howells ae5e1b6cc5 MN10300: Update asb2303_defconfig
Update the ASB2303 default configuration.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-19 15:51:36 -08:00
David Howells aa409e028c MN10300: Make the kernel jump into gdbstub on a BUG
Make the kernel jump into gdbstub (if configured) on a BUG with the register
set from the BUG rather than interpolating another illegal instruction and
leaving gdbstub's idea of the process counter in unsupported_syscall() where
the original BUG was detected.

With this patch, gdbstub reports a SIGABRT to the compiler and reports the
program counter at the original BUG, allowing the execution state at the time
of the BUG to be examined with GDB.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-19 15:51:36 -08:00
David Howells 5efe92c680 MN10300: Introduce barriers to replace removed volatiles in gdbstub
Introduce into the MN10300 gdbstub a couple of barrier() calls to replace the
removed volatility of the input/output index variables for the Rx ring buffer.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-19 15:51:36 -08:00
David Howells 2b79aac903 MN10300: Call update_process_times() outside of the xtime_lock
Call update_process_times() outside of the xtime_lock.  Somewhere somewhere
inside one of the functions called by that, xtime_lock is readlocked, which
ends up in a deadlock situation.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-19 15:51:36 -08:00
Aurelien Jarno cc2d6f701b [MIPS] BCM47XX: Use new SSB SPROM data structure
Switch the BCM47XX code to the new SPROM data structure now that the old
one has been removed.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-02-19 17:01:34 +00:00
Aurelien Jarno 0788150e63 [MIPS] WGT634U: Register MTD as platform device.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-02-19 17:01:34 +00:00
Aurelien Jarno e8248d6fe7 [MIPS] BCM47xx: Add defconfig file.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-02-19 17:01:34 +00:00
Ralf Baechle 40d7c1aa61 [MIPS] PCI: Coding style fixes for pcibios_enable_resources.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-02-19 17:01:34 +00:00
Ralf Baechle 986c94854e [MIPS] PCI: Port i386 PCI fixes.
The MIPS version of pcibios_enalbe_resources did not have the fixes
from ed6d14f976 yet which under circumstances
similar to x86 might result in failures.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-02-19 17:01:32 +00:00
Adrian Bunk dc9175be76 [MIPS] Qemu: finish platform removal
Two files were omitted from the recent removal of the qemu platform.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-02-19 17:01:32 +00:00
Dmitri Vorobiev 6783fe6253 [MIPS] Wire up the timerfd_*() o32 system calls
This patch enables the system calls timerfd_create(), timerfd_settime()
and timerfd_gettime() for MIPS architecture.

Please see the following Bugzilla entry for more details:

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

This was tested using a Malta 4Kc board in both little-endian and
big-endian modes. The unit test program is available from the URL
above.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>

[Ralf: Added N64, N32 and O32 bits on 64-bit kernels.]
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-02-19 17:01:31 +00:00
Thomas Bogendoerfer 84502f817b [MIPS] IP28: Add defconfig file
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-02-19 17:01:31 +00:00
Thiemo Seufer 345599ab12 [MIPS] SB1: Fix CONFIG_SIBYTE_DMA_PAGEOPS build failure.
Fix type mismatch warnings for 64-bit kernel builds which trigger -Werror.
The problem affects only SB-1 kernels with CONFIG_SIBYTE_DMA_PAGEOPS
enabled.

Signed-off-by: Thiemo Seufer <ths@networkno.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-02-19 17:01:31 +00:00
Ralf Baechle af0c4f649d [MIPS] BCM1480: Remove stray function call resulting in infinite recursion
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-02-19 17:01:31 +00:00
Ralf Baechle 9a74b3eb22 [MIPS] Fix buggy invocations of kmap_coherent()
kmap_coherent will only work correctly if the page it is called on is
not marked dirty.  If it's dirty the kernel address of the page should
be used instead of a temporary mapping.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-02-19 17:01:31 +00:00
Thomas Koeller c42d95d6c4 [MIPS] Fix broken rm7000/rm9000 interrupt handling
Properly acknowledge RM7K and RM9K interrupts. Before this, interrupts were
permanently masked after their first occurrence, making them non-functional.

Signed-off-by: Thomas Koeller <thomas.koeller@baslerweb.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-02-19 17:01:31 +00:00
Ralf Baechle 2eaa7ec286 [MIPS] Handle I-cache coherency in flush_cache_range()
So far flush_cache_range() did't consider the I-cache largely because it
did rarely ever matter to real world code.  This was working primarily
because normally code and data are don't share the same pages - with the
exception of MIPS16 code which uses address constants embedded between
the code.   The following sequence of events may break the code:

 o MIPS16 executable being loaded
 o dynamic linker relocates the address constants embedded into the code:
 o   Uses mprotect(2) to make code pages PROT_READ|PROT_WRITE
 o   Performs the actual relocations by writing to the pages which likely
     are COW.  Because no PROT_EXEC is set I-cache coherence will not be
     considered.
 o   Uses mprotect(2) to switch code pages back to PROT_READ|PROT_EXEC.
     This results in a call to flush_cache_range() which also does not
     consider I-caches.
 o => executing the page just having been relocated may now result in the
   I-cache getting refilled with stale data from memory.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-02-19 17:01:31 +00:00
Pavel Emelyanov 0e568536d9 [MIPS] Use find_task_by_vpid in system calls
There are some places left in mips, that lookup task in initial namespace,
while the code doing so gets the pid from the user space and thus must
treat it as virtual.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-02-19 17:01:30 +00:00
Linus Torvalds aa3f98037c Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
  [S390] qdio: FCP/SCSI write I/O stagnates on LPAR
  [S390] Fix futex_atomic_cmpxchg_std inline assembly.
  [S390] dcss: Fix Unlikely(x) != y
  [S390] sclp: clean up send/receive naming scheme
  [S390] etr: fix compile error on !SMP
  [S390] qdio: fix qdio_activate timeout handling.
  [S390] Initialize per cpu lowcores on cpu hotplug.
  [S390] find bit corner case.
  [S390] dasd: fix locking in __dasd_device_process_final_queue
  [S390] Make sure enabled wait psw is loaded in default_idle.
  [S390] Let NR_CPUS default to 32/64 on s390/s390x.
  [S390] cio: Do timed recovery on workqueue.
  [S390] cio: Remember to initialize recovery_lock.
2008-02-19 08:04:23 -08:00
Linus Torvalds b69409279c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC64]: Add regs_return_value().
  [SPARC64]: Kill pcic_present().
  [SPARC]: Kill 'prom_palette'.
  [ATYFB]: Kill 'prom_palette' sparc code.
  [SPARC64]: Kill 'prom_keyboard'.
  [SPARC]: Kill extern decl of 'panic_setup'.
  [SPARC64]: Delete 'boot_flags'.
  [SPARC64]: Kill unused function 'kernel_enter_debugger'.
  [SPARC64] arch/sparc64/kernel/unaligned.c: Use time_* macros
  [SPARC64]: Always register a PROM based early console.
  [SPARC64]: Update defconfig.
  [SPARC64]: Add -mtune=ultrasparc3 if possible.
  [SPARC64]: Remove Makefile code for ancient gcc and binutils.
  [SPARC64]: Remove DEBUG_BOOTMEM.
  [SPARC64]: Use shorter "get_zeroed_page" call.
  [SPARC]: Use shorter form of "get_zeroed_page".
  [SPARC]: video/cg14.c and video/sbuslib.c build fixes
2008-02-19 07:53:28 -08:00
Arjan van de Ven 156fbc3fbe x86: fix page_is_ram() thinko
page_is_ram() has a special case for the 640k-1M bios area, however
due to a thinko the special case checks the e820 table entry and
not the memory the user has asked for. This patch fixes the bug.

[ mingo@elte.hu: this too is better solved in the e820 space, but those
  fixes are too intrusive for v2.6.25. ]

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-02-19 16:18:34 +01:00
Arjan van de Ven d8a9e6a51e x86: fix WARN_ON() message: teach page_is_ram() about the special 4Kb bios data page
This patch teaches page_is_ram() about the fact that the first
4Kb of memory are special on x86, even though the E820 table
normally doesn't exclude it.

This fixes the WARN_ON() reported by Laurent Riffard who was also
very helpful in diagnosing the issue.

[ mingo@elte.hu: we are working on doing this properly in the e820
  space, but for 2.6.25 this is the better fix. ]

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-02-19 16:18:34 +01:00
Ahmed S. Darwish 7c6357da11 x86: i8259A: remove redundant irq_descinitialization
Remove redundant irq_desc[NR_IRQS] element initialization in
init_ISA_irqs(). irq_desc[NR_IRQS] is already statically
initialized with the same values in kernel/irq/handle.c .

besides the clean-up value this also saves some space:

      text    data     bss     dec     hex filename
      1389     356      14    1759     6df i8259_32.o.before
      1325     356      14    1695     69f i8259_32.o.after

Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-02-19 16:18:34 +01:00
Sam Ravnborg 3f85d63ea4 x86: fix vdso_install breaks user "make install"
I suggest to make the vdso_install step independent as
in following patch.

This solves the issue at ahnd and still gives us the posibility
to install the files should they be needed.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-02-19 16:18:34 +01:00
Ingo Molnar fd59e9e9c8 x86: change IO delay back to 0x80
change back the IO delay to 0x80.

Alan says that 0xed is known to break some older boxes, and given that
the get-rid-of-outb-APIs efforts are well underway we should just let
them be finished.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-02-19 16:18:34 +01:00
Cyrill Gorcunov 85c42d0dbb x86: lds - Use THREAD_SIZE instead of numeric constant
Though we use PDA for regular task stack but that
is not acceptable for init_task wich is special
one. We still have to allocate init_task's stack
in that manner.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-02-19 16:18:34 +01:00
Cyrill Gorcunov 3cdac41f20 x86: lds - Use PAGE_SIZE instead of numeric constant
It's much better to use PAGE_SIZE then magic 4096
(though it's almost synonym in most cases on x86 but
not for *all* cases ;)

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-02-19 16:18:33 +01:00
Cyrill Gorcunov bbb1e57a1c x86 cleanup: suspend_asm_64.S - use X86_CR4_PGE instead of numeric value
By including <asm/processor-flags.h> we're allowed to use
X86_CR4_PGE instead of numeric constant.

md5 sums of compiled files are differ due to this inclusion
but .text section remains the same.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-02-19 16:18:33 +01:00
Marcin Slusarz d8ff0bbf56 x86: fix printout ugliness in cpu info printk
fix print_cpu_info, because it produced on boot:

  CPU: <6>AMD Athlon(tm) 64 Processor 3200+ stepping 00

instead of:

  CPU: AMD Athlon(tm) 64 Processor 3200+ stepping 00

(broken since 04e1ba8521 -
 x86: cleanup kernel/setup_64.c)

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-02-19 16:18:33 +01:00
Ingo Molnar d76c1ae4d1 x86: clean up csum-wrappers_64.c some more
no code changed:

arch/x86/lib/csum-wrappers_64.o:
   text    data     bss     dec     hex filename
    839       0       0     839     347 csum-wrappers_64.o.before
    839       0       0     839     347 csum-wrappers_64.o.after
md5:
b31994226c33e0b52bef5a0e110b84b0  csum-wrappers_64.o.before.asm
b31994226c33e0b52bef5a0e110b84b0  csum-wrappers_64.o.after.asm

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-02-19 16:18:32 +01:00
Paolo Ciarrocchi 0df025b709 x86: coding style fixes in arch/x86/lib/csum-wrappers_64.c
no code changed:

arch/x86/lib/csum-wrappers_64.o:
   text    data     bss     dec     hex filename
    839       0       0     839     347 csum-wrappers_64.o.before
    839       0       0     839     347 csum-wrappers_64.o.after
md5:
b31994226c33e0b52bef5a0e110b84b0  csum-wrappers_64.o.before.asm
b31994226c33e0b52bef5a0e110b84b0  csum-wrappers_64.o.after.asm

Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-02-19 16:18:32 +01:00
Paolo Ciarrocchi 4b44f81016 x86: coding style fixes in arch/x86/lib/io_64.c
This simple patch makes the file error free (according to
checkpatch.pl)

no code changed:

arch/x86/lib/io_64.o:
   text    data     bss     dec     hex filename
    308       0       0     308     134 io_64.o.before
    308       0       0     308     134 io_64.o.after
md5:
3c64f9ed83d091678e849b36ca27bee3  io_64.o.before.asm
3c64f9ed83d091678e849b36ca27bee3  io_64.o.after.asm

Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-02-19 16:18:32 +01:00
Ingo Molnar e43eb7bab6 x86: exclude vsyscall files from stackprotect
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-02-19 16:18:32 +01:00
Sam Ravnborg 6871b76fb5 x86: annotate pci/common.s:pci_scan_bus_with_sysdata with __devinit
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-02-19 16:18:32 +01:00
Sam Ravnborg da5968ae30 x86: fix section mismatch in head_64.S:initial_code
initial_code are initially used to hold a function pointer
from __init and later from __cpuinit. This confuses modpost
and changing initial_code to REFDATA silence the warning.
(But now we do not discard the variable anymore).

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-02-19 16:18:31 +01:00
Sam Ravnborg d01b9ad56e x86: fix section mismatch in srat_64.c:reserve_hotadd
reserve_hotadd() are only used by __init acpi_numa_memory_affinity_init().
Annotate reserve_hotadd() with __init is the trivial fix.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-02-19 16:18:31 +01:00
Sam Ravnborg 177c7715cd x86: fix section mismatch warning in topology.c:arch_register_cpu
arch_register_cpu() is only defined for HOTPLUG_CPU code
so simple fix is to ignore references by annotating the
function __ref.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-02-19 16:18:30 +01:00
Sam Ravnborg 04d733bd35 x86: fix section mismatch in setup_64.c:srat_detect_node
srat_detect_node() is only used by __cpuinit init_intel().
So the trivial fix is to annotate srat_detect_node() with __cpuinit.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-02-19 16:18:30 +01:00
Sam Ravnborg 08acb67262 x86: fix section mismatch warning in setup_64.c:nearby_node
nearby_node() were only used by __cpuinit amd_detect_cmp()
So annotating nearby_node() __cpuinit was the trivial fix.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-02-19 16:18:29 +01:00
Li Zefan a062bae9c4 x86: fix compile warning building without CONFIG_SYSCTL
arch/x86/kernel/nmi_64.c:50: warning: 'unknown_nmi_panic_callback' declared 'static' but never defined

This patch also fixes nmi_32.c

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-02-19 16:18:29 +01:00
Andi Kleen 8e31c2ac11 x86: CPA: remove BUG_ON for LRU/Compound pages
New implementation does not use lru for anything so there is no need
to reject pages that are in the LRU. Similar for compound pages (which
were checked because they also use page->lru)

[ tglx@linutronix.de: removed unused variable ]

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-02-19 16:18:29 +01:00
Adrian Bunk aa65af3f92 x86: don't make swapper_pg_fixmap global
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: Ian Campbell <ijc@hellion.org.uk>
Cc: hpa@zytor.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-02-19 16:18:29 +01:00
Adrian Bunk f7f3d791e6 x86: don't make irq_return global
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: hpa@zytor.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-02-19 16:18:29 +01:00
Adrian Bunk d3cfeb4fbe x86: unexport io_delay_type
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: hpa@zytor.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-02-19 16:18:29 +01:00
Adrian Bunk 148a142495 x86: make mxcsr_feature_mask static again
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: Roland McGrath <roland@redhat.com>
Cc: hpa@zytor.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-02-19 16:18:28 +01:00
Harvey Harrison ecaea42eb8 x86: sparse warning in efi.c
Yes, it should.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-02-19 16:18:28 +01:00
Harvey Harrison cc7e73f35d x86: sparse error in efi_32.c
arch/x86/kernel/efi_32.c:42:6: warning: symbol 'efi_call_phys_prelog' was not declared. Should it be static?
arch/x86/kernel/efi_32.c:84:6: warning: symbol 'efi_call_phys_epilog' was not declared. Should it be static?

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-02-19 16:18:28 +01:00
Harvey Harrison f1452d424d x86, kprobes: remove sparse warnings from x86
arch/x86/kernel/kprobes.c:584:16: warning: symbol 'kretprobe_trampoline_holder' was not declared. Should it be static?
arch/x86/kernel/kprobes.c:676:6: warning: symbol 'trampoline_handler' was not declared. Should it be static?

Make them static and add the __used attribute, approach taken from the
arm kprobes implementation.

kretprobe_trampoline_holder uses inline assemly to define the global
symbol kretprobe_trampoline, but nothing ever calls the holder explicitly.

trampoline handler is only called from inline assembly in the same file,
mark it used and static.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Acked-by: Masami Hiramatsu <mhiramat@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-02-19 16:18:28 +01:00
Adrian Bunk 08cd93f9e1 remove mca-pentium
This patch removes the mca-pentium boot option that was a noop.

besides the source code cleanup factor, this saves some text as well:

   arch/x86/kernel/cpu/bugs.o:
      text    data     bss     dec     hex filename
       651      77       4     732     2dc bugs.o.before
       631      53       4     688     2b0 bugs.o.after

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-02-19 16:18:28 +01:00
Heiko Carstens d5b02b3ff1 [S390] Fix futex_atomic_cmpxchg_std inline assembly.
Add missing exception table entry so that the kernel can handle
proctection exceptions as well on the cs instruction. Currently only
specification exceptions are handled correctly.
The missing entry allows user space to crash the kernel.

Cc: stable <stable@kernel.org>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-02-19 15:29:35 +01:00
Heiko Carstens 06cb92ffe4 [S390] etr: fix compile error on !SMP
Since a5fbb6d106
"KVM: fix !SMP build error" smp_call_function isn't a define anymore
that folds into nothing but a define that calls up_smp_call_function
with all parameters. Hence we cannot #ifdef out the unused code
anymore...
This seems to be the preferred method, so do this for s390 as well.

arch/s390/kernel/time.c: In function 'etr_sync_clock':
arch/s390/kernel/time.c:825: error: 'clock_sync_cpu_start' undeclared
arch/s390/kernel/time.c:862: error: 'clock_sync_cpu_end' undeclared

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-02-19 15:29:34 +01:00
Heiko Carstens 591bb4f637 [S390] Initialize per cpu lowcores on cpu hotplug.
Just copy the first 512 read-only bytes of the current cpu lowcore if
a new cpu gets onlined. The rest is zeroed out and must be explicitly
initialized. Current code just copies the entire lowcore and
initializes the needed fields.
This should reveal bugs in future enhancements quite early.
Also when the lowcore of the first cpu is replaced this is now done
atomically (no interrupts, no machine checks).

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-02-19 15:29:33 +01:00
Heiko Carstens 11ab244c9f [S390] Make sure enabled wait psw is loaded in default_idle.
If both NO_IDLE_HZ and VIRT_TIMER are disabled default_idle won't load
an enabled wait psw and busy loop instead. This is because the
idle_chain is empty and the return value of atomic_notifier_call_chain
will be NOTIFY_DONE, which causes default_idle to return instead of
loading an enabled wait psw.
Fix this by calling __atomic_notifier_call_chain instead and add proper
return value handling.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-02-19 15:29:33 +01:00
Heiko Carstens 057c5cb35e [S390] Let NR_CPUS default to 32/64 on s390/s390x.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-02-19 15:29:32 +01:00
Arjan van dev Ven fcea424d31 fix historic ioremap() abuse in AGP
Several AGP drivers right now use ioremap_nocache() on kernel ram in order
to turn a page of regular memory uncached.

There are two problems with this:

    1) This is a total nightmare for the ioremap() implementation to keep
       various mappings of the same page coherent.

    2) It's a total nightmare for the AGP code since it adds a ton of
       complexity in terms of keeping track of 2 different pointers to
       the same thing, in terms of error handling etc etc.

This patch fixes this by making the AGP drivers use the new
set_memory_XX APIs instead.

Note: amd-k7-agp.c is built on Alpha too, and generic.c is built
on ia64 as well, which do not yet have the set_memory_*() APIs,
so for them some we have a few ugly #ifdefs - hopefully they'll
be fixed soon.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2008-02-19 14:46:39 +10:00
David S. Miller 8c5b4a3f43 [SPARC64]: Kill pcic_present().
And also it's helper function pci_is_controller().  Both
are unused.

I can't remove the equivalent from sparc32 yet as some
ancient bus probing code still uses that platform's version.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-18 16:40:10 -08:00
David S. Miller 667bc389c7 [SPARC]: Kill 'prom_palette'.
The idea of this thing is we could save/restore the firmware's
palette when breaking in and out of the firmware prompt.

Only one driver implemented this (atyfb) and it's value is
questionable.  If you're just debugging you don't really
care that the characters end up being purple or whatever.

And we can provide better debugging and firmware command
facilities with minimal in-kernel console I/O drivers.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-18 15:28:16 -08:00
David S. Miller 101788b0ab [SPARC64]: Kill 'prom_keyboard'.
Nothing ever sets it, so it just takes up space.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-18 15:21:30 -08:00
David S. Miller 1d5509aa69 [SPARC]: Kill extern decl of 'panic_setup'.
This was made static in kernel/panic.c a long time ago.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-18 15:17:58 -08:00
David S. Miller 9a2f258ad5 [SPARC64]: Delete 'boot_flags'.
It is write-only, nothing tests it's value.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-18 15:16:20 -08:00
David S. Miller a3d41704d4 [SPARC64]: Kill unused function 'kernel_enter_debugger'.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-18 15:13:48 -08:00
Jeremy Kerr 4ef110141b [POWERPC] spufs: fix scheduler starvation by idle contexts
2.6.25 has a regression where we can starve the scheduler by creating
(N_SPES+1) contexts, then running them one at a time.

The final context will never be run, as the other contexts are loaded on
the SPEs, none of which are repoted as free (ie, spu->alloc_state !=
SPU_FREE), so spu_get_idle() doesn't give us a spu to run on. Because
all of the contexts are stopped, none are descheduled by the scheduler
tick, as spusched_tick returns if spu_stopped(ctx).

This change replaces the spu_stopped() check with checking for SCHED_IDLE
in ctx->policy. We set a context's policy to SCHED_IDLE when we're not
in spu_run(). We also favour SCHED_IDLE contexts when looking for contexts
to unbind, but leave their timeslice intact for later resumption.

This patch fixes the following test in the spufs-testsuite:
  tests/20-scheduler/02-yield-starvation

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
2008-02-19 10:12:02 +11:00
Rusty Russell f6c540cdd6 x86: fix lguest build failure
drivers/lguest/x86/switcher_32.S:(.text+0x3815f8): 
	undefined reference to `LGUEST_PAGES_regs_trapnum'

This problem was caused by asm-offsets.c only having the offsets when
lguest *guest* support was set, not lguest host (host support used to
imply guest support, so now they're separate these bugs come out).

Lguest guest support and host support are separate config options:
they used to be tied together. Sort out which parts of asm-offsets are
needed for Guest and Host.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-02-18 20:54:14 +01:00
Yinghai Lu b7ad149d62 x86: reenable support for system without on node0
One system doesn't have RAM for node0 installed.

SRAT: PXM 0 -> APIC 0 -> Node 0
SRAT: PXM 0 -> APIC 1 -> Node 0
SRAT: PXM 1 -> APIC 2 -> Node 1
SRAT: PXM 1 -> APIC 3 -> Node 1
SRAT: Node 1 PXM 1 0-a0000
SRAT: Node 1 PXM 1 0-dd000000
SRAT: Node 1 PXM 1 0-123000000
ACPI: SLIT: nodes = 2
 10 13
 13 10
mapped APIC to ffffffffff5fb000 (        fee00000)
Bootmem setup node 1 0000000000000000-0000000123000000
  NODE_DATA [000000000000e000 - 0000000000014fff]
  bootmap [0000000000015000 -  00000000000395ff] pages 25
Could not find start_pfn for node 0
Pid: 0, comm: swapper Not tainted 2.6.24-smp-g5a514e21-dirty #14

Call Trace:
 [<ffffffff80bab498>] free_area_init_node+0x22/0x381
 [<ffffffff8045ffc5>] generic_swap+0x0/0x17
 [<ffffffff80bab0cc>] find_zone_movable_pfns_for_nodes+0x54/0x271
 [<ffffffff80baba5f>] free_area_init_nodes+0x239/0x287
 [<ffffffff80ba6311>] paging_init+0x46/0x4c
 [<ffffffff80b9dda5>] setup_arch+0x3c3/0x44e
 [<ffffffff80b978be>] start_kernel+0x6f/0x2c7
 [<ffffffff80b971cc>] _sinittext+0x1cc/0x1d3

This happens because node 0 is not online, but the node state in
mm/page_alloc.c has node 0 set.

        nodemask_t node_states[NR_NODE_STATES] __read_mostly = {
                [N_POSSIBLE] = NODE_MASK_ALL,
                [N_ONLINE] = { { [0] = 1UL } },

So we need to clear node_online_map before initializing the memory.

Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-02-18 20:54:14 +01:00
Thomas Gleixner f34b439f34 x86: CPA: avoid double checking of alias ranges
When the CPA code is called with an virtual address in the range of
the direct mapping or the high alias then we do not need to run
through the alias check for this range.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-02-18 20:54:14 +01:00
Thomas Gleixner af96e4438a x86: CPA no alias checking for _NX
NX settings are not required to be consistent across alias mappings.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-02-18 20:54:14 +01:00
Thomas Gleixner 31eedd823c x86: zap invalid and unused pmds in early boot
The early boot code maps KERNEL_TEXT_SIZE (currently 40MB) starting
from __START_KERNEL_map. The kernel itself only needs _text to _end
mapped in the high alias. On relocatible kernels the ASM setup code
adjusts the compile time created high mappings to the relocation. This
creates invalid pmd entries for negative offsets:

0xffffffff80000000 -> pmd entry: ffffffffff2001e3
It points outside of the physical address space and is marked present.

This starts at the virtual address __START_KERNEL_map and goes up to
the point where the first valid physical address (0x0) is mapped.

Zap the mappings before _text and after _end right away in early
boot. This removes also the invalid entries.

Furthermore it simplifies the range check for high aliases.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-02-18 20:54:14 +01:00
Thomas Gleixner c31c7d4844 x86: CPA, fix alias checks
c_p_a() did not discover all aliases correctly. (such as when called
on vmalloc()-ed areas or ioremap()-ed areas)

Push the alias checks to the lower, physical level and consistently
discover all aliases that might exist: the low direct mappings and
the high linear kernel-text mappings (on 64-bit).

Thanks to Andi Kleen for pointing out that this was buggy.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-02-18 20:54:14 +01:00
S.Çağlar Onur cbc9fc5dec [SPARC64] arch/sparc64/kernel/unaligned.c: Use time_* macros
The functions time_before, time_before_eq, time_after, and
time_after_eq are more robust for comparing jiffies against other
values.

So following patch implements usage of the time_after() macro, defined
at linux/jiffies.h, which deals with wrapping correctly

Signed-off-by: S.Çağlar Onur <caglar@pardus.org.tr>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-17 23:24:10 -08:00
David S. Miller 3c62a2d347 [SPARC64]: Always register a PROM based early console.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-17 23:22:50 -08:00
David S. Miller f6095a5176 [SPARC64]: Update defconfig.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-17 22:44:32 -08:00
David S. Miller 966d905634 [SPARC64]: Add -mtune=ultrasparc3 if possible.
This gives better heuristics for the cost of a multiply (fixed
5 cycles), rather than the 'ultrasparc' setting (variable, and
unpredictable if the second argument is non-constant).

Example code size savings:

   text	   data	    bss	    dec	    hex	filename
3823690	 304040	 448880	4576610	 45d562	vmlinux
3824521	 304040	 448880	4577441	 45d8a1	vmlinux.orig

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-17 22:43:34 -08:00
David S. Miller 54cd6ddec7 [SPARC64]: Remove Makefile code for ancient gcc and binutils.
The kernel hasn't supported the compilers which need these tests
for years.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-17 22:42:45 -08:00
Holger Schurig ea833f0b5a [ARM] 4829/1: add .get method to pxa-cpufreq to silence a warning
The .get method is needed for suspend/resume. Otherwise you
get this in dmesg:

cpufreq: suspend failed to assert current frequency is what timing core thinks it is.
cpufreq: resume failed to assert current frequency is what timing core thinks it is.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-02-17 10:42:10 +00:00
Byron Bradley 59e8ce5744 [ARM] 4826/1: Orion: Register the RTC interrupt on the TS-209
The QNAP TS-209 has its RTC interrupt on GPIO 3. Setup this
as an interrupt and pass it to the i2c_board_info.

Signed-off-by: Byron Bradley <byron.bbradley@gmail.com>
Acked-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-02-17 10:42:06 +00:00
Russell King a0dd005d1d [ARM] pxa: fix clock lookup to find specific device clocks
Ensure that the clock lookup always finds an entry for a specific
device and ID before it falls back to finding just by ID.  This
fixes a problem reported by Holger Schurig where the BTUART was
assigned the wrong clock.

Tested-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-02-17 10:41:59 +00:00
Josh Boyer 13dbf42210 [POWERPC] 44x: Add multiplatform defconfig
Add a multiboard defconfig for PowerPC 44x now that the wrapper can create
the proper zImages for multiple boards.

Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
2008-02-16 08:01:10 -06:00
Josh Boyer 4b63c3b9a6 [POWERPC] 44x: Fix Kconfig formatting
Clean up some whitespace issues in the 44x Kconfig file.

Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
2008-02-15 22:05:03 -06:00
Josh Boyer 8eb70ea2db [POWERPC] 4xx: Update defconfigs for 2.6.25
Update the 4xx defconfigs to remove WANT_DEVICE_TREE and add MTD_OF_PARTS
where appropriate.

Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
2008-02-15 22:00:19 -06:00
Stefan Roese e563db977f [POWERPC] 4xx: Remove "i2c" and "xxmii-interface" device_types from dts
Remove all "i2c" and "xxmii-interface" (rgmii etc) device_type entries
from the 4xx dts files.

Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
2008-02-15 21:35:30 -06:00
Wolfgang Ocker 7fe5f10ed0 [POWERPC] PPC440EP Interrupt Triggering and Level Settings
Corrected IRQ triggering and level settings according to latest revision
of the 440EP User Manual (rev 1.24 nov 16, 2007).

The incorrect settings might cause a failure of the network if both
onchip ethernet ports are under heavy load.

Signed-off-by: Wolfgang Ocker <weo@reccoware.de>
Acked-by: Stefan Roese <sr@denx.de>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
2008-02-15 21:33:02 -06:00
Haavard Skinnemoen d45ad06273 avr32: Call tick_nohz_{stop,restart}_sched_tick() in idle loop
This fixes a hang on boot with nohz enabled. nohz is not actually
supported in mainline yet, but patches that add support for it are
currently under review.

When nohz is compiled out, the functions are no-ops, so this patch
results in no functional change, but it arguably makes the code more
correct.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2008-02-15 14:55:10 +01:00
Linus Torvalds 4e3d031945 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
  ACPI: DMI: quirk for FSC ESPRIMO Mobile V5505
  ACPI: DMI blacklist updates
  pnpacpi: __initdata is not an identifier
  ACPI: static acpi_chain_head
  ACPI: static acpi_find_dsdt_initrd()
  ACPI: static acpi_no_initrd_override_setup()
  thinkpad_acpi: static
  ACPI suspend: Execute _WAK with the right argument
  cpuidle: Add Documentation
  ACPI, cpuidle: Clarify C-state description in sysfs
  ACPI: fix suspend regression due to idle update
2008-02-14 21:29:46 -08:00
Linus Torvalds 11d64be6a6 Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (46 commits)
  sh: Fix multiple UTLB hit on UP SH-4.
  sh: fix pci io access for r2d boards
  sh: fix ioreadN_rep and iowriteN_rep
  sh: use ctrl_in/out for on chip pci access
  sh: Kill off more dead symbols.
  sh: __uncached_start only on sh32.
  sh: asm/irq.h needs asm/cpu/irq.h.
  serial: sh-sci: Fix up SH-5 build.
  sh: Get SH-5 caches working again post-unification.
  maple: Fix up maple build failure.
  sh: Kill off bogus SH_SDK7780_STANDALONE symbol.
  sh: asm/tlb.h needs linux/pagemap.h for CONFIG_SWAP=n.
  sh: Tidy include/asm-sh/hp6xx.h
  maple: improve detection of attached peripherals
  sh: Shut up some trivial build warnings.
  sh: Update SH-5 flush_cache_sigtramp() for API changes.
  sh: Fix up set_fixmap_nocache() for SH-5.
  sh: Fix up pte_mkhuge() build breakage for SH-5.
  sh: Disable big endian for SH-5.
  sh: Handle SH7366 CPU in check_bugs().
  ...
2008-02-14 21:29:06 -08:00
Linus Torvalds 664a1566df Merge git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86
* git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86:
  x86: cpa, fix out of date comment
  KVM is not seen under X86 config with latest git (32 bit compile)
  x86: cpa: ensure page alignment
  x86: include proper prototypes for rodata_test
  x86: fix gart_iommu_init()
  x86: EFI set_memory_x()/set_memory_uc() fixes
  x86: make dump_pagetable() static
  x86: fix "BUG: sleeping function called from invalid context" in print_vma_addr()
2008-02-14 21:23:19 -08:00
Linus Torvalds b9e222904c Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
  [POWERPC] Remove unused CONFIG_WANT_DEVICE_TREE
  [POWERPC] Cell RAS: Remove DEBUG, and add license and copyright
  [POWERPC] hvc_rtas_init() must be __init
  [POWERPC] free_property() must not be __init
  [POWERPC] vdso_do_func_patch{32,64}() must be __init
  [POWERPC] Remove generated files on make clean
  [POWERPC] Fix arch/ppc compilation - add typedef for pgtable_t
  [POWERPC] Wire up new timerfd syscalls
  [POWERPC] PS3: Update sys-manager button events
  [POWERPC] PS3: Sys-manager code cleanup
  [POWERPC] PS3: Use system reboot on restart
  [POWERPC] PS3: Fix bootwrapper hang bug
  [POWERPC] PS3: Fix reading pm interval in logical performance monitor
  [POWERPC] PS3: Fix setting bookmark in logical performance monitor
  [POWERPC] Fix DEBUG_PREEMPT warning when warning
2008-02-14 21:22:33 -08:00
Jan Blunck cf28b4863f d_path: Make d_path() use a struct path
d_path() is used on a <dentry,vfsmount> pair.  Lets use a struct path to
reflect this.

[akpm@linux-foundation.org: fix build in mm/memory.c]
Signed-off-by: Jan Blunck <jblunck@suse.de>
Acked-by: Bryan Wu <bryan.wu@analog.com>
Acked-by: Christoph Hellwig <hch@infradead.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Neil Brown <neilb@suse.de>
Cc: Michael Halcrow <mhalcrow@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-14 21:17:09 -08:00
Jan Blunck 448678a0f3 d_path: Make get_dcookie() use a struct path argument
get_dcookie() is always called with a dentry and a vfsmount from a struct
path.  Make get_dcookie() take it directly as an argument.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Jan Blunck <jblunck@suse.de>
Acked-by: Christoph Hellwig <hch@infradead.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-14 21:17:08 -08:00
Jan Blunck 1d957f9bf8 Introduce path_put()
* Add path_put() functions for releasing a reference to the dentry and
  vfsmount of a struct path in the right order

* Switch from path_release(nd) to path_put(&nd->path)

* Rename dput_path() to path_put_conditional()

[akpm@linux-foundation.org: fix cifs]
Signed-off-by: Jan Blunck <jblunck@suse.de>
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Acked-by: Christoph Hellwig <hch@lst.de>
Cc: <linux-fsdevel@vger.kernel.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Steven French <sfrench@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-14 21:13:33 -08:00
Jan Blunck 4ac9137858 Embed a struct path into struct nameidata instead of nd->{dentry,mnt}
This is the central patch of a cleanup series. In most cases there is no good
reason why someone would want to use a dentry for itself. This series reflects
that fact and embeds a struct path into nameidata.

Together with the other patches of this series
- it enforced the correct order of getting/releasing the reference count on
  <dentry,vfsmount> pairs
- it prepares the VFS for stacking support since it is essential to have a
  struct path in every place where the stack can be traversed
- it reduces the overall code size:

without patch series:
   text    data     bss     dec     hex filename
5321639  858418  715768 6895825  6938d1 vmlinux

with patch series:
   text    data     bss     dec     hex filename
5320026  858418  715768 6894212  693284 vmlinux

This patch:

Switch from nd->{dentry,mnt} to nd->path.{dentry,mnt} everywhere.

[akpm@linux-foundation.org: coding-style fixes]
[akpm@linux-foundation.org: fix cifs]
[akpm@linux-foundation.org: fix smack]
Signed-off-by: Jan Blunck <jblunck@suse.de>
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Acked-by: Christoph Hellwig <hch@lst.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-14 21:13:33 -08:00
Matt Waddel 6ef1e56776 m68knommu: fix profile timer
I was looking at timers in the Coldfire system and I noticed that the
CONFIG_HIGHPROFILE option seems to be a little out of date.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-14 20:58:05 -08:00
Greg Ungerer c25f0a0f7f m68knommu: use asflags instead of EXTRA_AFLAGS
Modify the extra asm flags for debugger capabilities, use asflags instead for
EXTRA_AFLAGS.  Suggestion from Sam Ravnborg.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-14 20:58:05 -08:00
Walter T Gruczka 903be1c564 m68knommu: fix coldfire interrupt exit path
Remove bogus conditional jump in return from interrupt path.  Reorder the code
path now that is not there.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-14 20:58:05 -08:00