dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

25737 Commits

Author SHA1 Message Date
Yinghai Lu dd786dd12c x86: move mtrr cpu cap setting early in early_init_xxxx
Krzysztof Helt found MTRR is not detected on k6-2

root cause:
	we moved mtrr_bp_init() early for mtrr trimming,
and in early_detect we only read the CPU capability from cpuid,
so some cpu doesn't have that bit in cpuid.

So we need to add early_init_xxxx to preset those bit before mtrr_bp_init
for those earlier cpus.

this patch is for v2.6.27

Reported-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-09-06 17:50:55 +02:00
Krzysztof Helt 12cf105cd6 x86: delay early cpu initialization until cpuid is done
Move early cpu initialization after cpu early get cap so the
early cpu initialization can fix up cpu caps.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-09-06 17:50:38 +02:00
Lennert Buytenhek 1ad77a876d [ARM] 5241/1: provide ioremap_wc()
This patch provides an ARM implementation of ioremap_wc().

We use different page table attributes depending on which CPU we
are running on:

- Non-XScale ARMv5 and earlier systems: The ARMv5 ARM documents four
  possible mapping types (CB=00/01/10/11).  We can't use any of the
  cached memory types (CB=10/11), since that breaks coherency with
  peripheral devices.  Both CB=00 and CB=01 are suitable for _wc, and
  CB=01 (Uncached/Buffered) allows the hardware more freedom than
  CB=00, so we'll use that.

  (The ARMv5 ARM seems to suggest that CB=01 is allowed to delay stores
  but isn't allowed to merge them, but there is no other mapping type
  we can use that allows the hardware to delay and merge stores, so
  we'll go with CB=01.)

- XScale v1/v2 (ARMv5): same as the ARMv5 case above, with the slight
  difference that on these platforms, CB=01 actually _does_ allow
  merging stores.  (If you want noncoalescing bufferable behavior
  on Xscale v1/v2, you need to use XCB=101.)

- Xscale v3 (ARMv5) and ARMv6+: on these systems, we use TEXCB=00100
  mappings (Inner/Outer Uncacheable in xsc3 parlance, Uncached Normal
  in ARMv6 parlance).

  The ARMv6 ARM explicitly says that any accesses to Normal memory can
  be merged, which makes Normal memory more suitable for _wc mappings
  than Device or Strongly Ordered memory, as the latter two mapping
  types are guaranteed to maintain transaction number, size and order.
  We use the Uncached variety of Normal mappings for the same reason
  that we can't use C=1 mappings on ARMv5.

  The xsc3 Architecture Specification documents TEXCB=00100 as being
  Uncacheable and allowing coalescing of writes, which is also just
  what we need.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-09-06 13:13:44 +01:00
Thomas Gleixner 72d43d9bc9 x86: HPET: read back compare register before reading counter
After fixing the u32 thinko I sill had occasional hickups on ATI chipsets
with small deltas. There seems to be a delay between writing the compare
register and the transffer to the internal register which triggers the
interrupt. Reading back the value makes sure, that it hit the internal
match register befor we compare against the counter value.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-09-06 07:21:17 +02:00
Thomas Gleixner f7676254f1 x86: HPET fix moronic 32/64bit thinko
We use the HPET only in 32bit mode because:
1) some HPETs are 32bit only
2) on i386 there is no way to read/write the HPET atomic 64bit wide

The HPET code unification done by the "moron of the year" did
not take into account that unsigned long is different on 32 and
64 bit.

This thinko results in a possible endless loop in the clockevents
code, when the return comparison fails due to the 64bit/332bit
unawareness. 

unsigned long cnt = (u32) hpet_read() + delta can wrap over 32bit.
but the final compare will fail and return -ETIME causing endless
loops.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-09-06 07:21:17 +02:00
H. Peter Anvin f31d731e44 x86: use X86_FEATURE_NOPL in alternatives
Use X86_FEATURE_NOPL to determine if it is safe to use P6 NOPs in
alternatives.  Also, replace table and loop with simple if statement.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-09-05 16:14:01 -07:00
H. Peter Anvin b6734c35af x86: add NOPL as a synthetic CPU feature bit
The long noops ("NOPL") are supposed to be detected by family >= 6.
Unfortunately, several non-Intel x86 implementations, both hardware
and software, don't obey this dictum.  Instead, probe for NOPL
directly by executing a NOPL instruction and see if we get #UD.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-09-05 16:13:52 -07:00
H. Peter Anvin b74b06c5f6 x86: boot: stub out unimplemented CPU feature words
The CPU feature detection code in the boot code is somewhat minimal,
and doesn't include all possible CPUID words.  In particular, it
doesn't contain the code for CPU feature words 2 (Transmeta),
3 (Linux-specific), 5 (VIA), or 7 (scattered).  Zero them out, so we
can still set those bits as known at compile time; in particular, this
allows creating a Linux-specific NOPL flag and have it required (and
therefore resolvable at compile time) in 64-bit mode.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-09-05 16:13:44 -07:00
Linus Torvalds 1c402c8cd1 Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/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: add io delay quirk for Presario F700
2008-09-05 14:36:21 -07:00
Linus Torvalds 6f74b1849b Merge git://git.infradead.org/~dwmw2/dwmw2-2.6.27
* git://git.infradead.org/~dwmw2/dwmw2-2.6.27:
  Revert "[ARM] use the new byteorder headers"
  Fix conditional export of kvh.h and a.out.h to userspace.
  [MTD] [NAND] tmio_nand: fix base address programming
2008-09-05 14:31:54 -07:00
Linus Torvalds b693ffe673 Merge branch 'sh/for-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* 'sh/for-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
  i2c: fix i2c-sh_mobile timing issues
  sh64: resume_kernel fix for kernel oops built with CONFIG_BKL_PREEMPT=y.
  sh: resume_kernel fix for kernel oops built with CONFIG_BKL_PREEMPT=y.
  sh: fix semtimedop syscall
  sh: update AP325RXA defconfig
  sh: update Migo-R defconfig
  sh: fix platform_resource_setup_memory() section mismatch
  sh: fix kexec entry point for crash kernels
  sh: crash kernel resource fix
  sh: fix ptrace_64.c:user_disable_single_step()
  sh64: re-add the __strnlen_user() prototype
2008-09-05 14:30:58 -07:00
Atsushi Nemoto 0011036bee [MIPS] Probe initrd header only if explicitly specified
Currently init_initrd() probes initrd header at the last page of kernel
image, but it is valid only if addinitrd was used.  If addinitrd was not
used, the area contains garbage so probing there might misdetect initrd
header (magic number is not strictly robust).

This patch introduces CONFIG_PROBE_INITRD_HEADER to explicitly enable this
probing.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-09-05 21:24:12 +01:00
Atsushi Nemoto 3885ec8ca2 [MIPS] TX39xx: Add missing local_flush_icache_range initialization
Commmit 59e39ecd933ba49eb6efe84cbfa5597a6c9ef18a ("Fix WARNING: at
kernel/smp.c:290") introduced local_flush_icache_range but lacks
initialization for some TX39 case.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-09-05 21:24:12 +01:00
Atsushi Nemoto 073828d078 [MIPS] TXx9: Fix txx9_pcode initialization
The txx9_pcode variable was introduced in commit
fe1c2bc64f65003b39f331a8e4b0d15b235a4afd ("TXx9: Add 64-bit support")
but was not initialized properly.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-09-05 21:24:12 +01:00
Thomas Bogendoerfer e0cee3eea7 [MIPS] Fix WARNING: at kernel/smp.c:290
trap_init issues flush_icache_range(), which uses ipi functions to
get icache flushing done on all cpus. But this is done before interrupts
are enabled and caused WARN_ON messages. This changeset introduces
a new local_flush_icache_range() and uses it before interrupts (and
additional CPUs) are enabled to avoid this problem.

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-09-05 21:24:11 +01:00
Thomas Bogendoerfer 0510617b85 [MIPS] Fix data bus error recovery
With -ffunction-section the entries in __dbe_table aren't no longer
sorted, so the lookup of exception addresses in do_be() failed for
some addresses. To avoid this we now sort __dbe_table.

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-09-05 21:24:11 +01:00
David Woodhouse b35de672e7 Revert "[ARM] use the new byteorder headers"
This reverts commit ae82cbfc8b. It
needs the new byteorder headers to be exported to userspace, and
they aren't yet -- and probably shouldn't be, at this point in the
2.6.27 release cycle (or ever, for that matter).

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-09-05 17:01:50 +01:00
Thomas Gleixner 7cfb043533 HPET: make minimum reprogramming delta useful
The minimum reprogramming delta was hardcoded in HPET ticks,
which is stupid as it does not work with faster running HPETs.
The C1E idle patches made this prominent on AMD/RS690 chipsets,
where the HPET runs with 25MHz. Set it to 5us which seems to be
a reasonable value and fixes the problems on the bug reporters
machines. We have a further sanity check now in the clock events,
which increases the delta when it is not sufficient.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Tested-by: Dmitry Nezhevenko <dion@inhex.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-09-05 11:11:54 +02:00
Paul Mundt dbce1f649e sh64: resume_kernel fix for kernel oops built with CONFIG_BKL_PREEMPT=y.
Follows the SH change.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-05 14:51:28 +09:00
Carmelo Amoroso 323b8c410a sh: resume_kernel fix for kernel oops built with CONFIG_BKL_PREEMPT=y.
This patch fixes a problem within the SH implementation of resume_kernel code,
that implements in assembly the bulk of preempt_schedule_irq function without
taking care of the extra code needed to handle the BKL preemptible.

The patch basically consists of removing this asm code and calling the common
C implementation (see kernel/sched.c) as other archs do.

Another change is the missing 'cli' macro invocation at the beginning of
the resume_kernel.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-05 14:42:16 +09:00
Jeremy Kerr b65fe0356b powerpc/spufs: Fix race for a free SPU
We currently have a race for a free SPE. With one thread doing a
spu_yield(), and another doing a spu_activate():

thread 1				thread 2
spu_yield(oldctx)			spu_activate(ctx)
  __spu_deactivate(oldctx)
  spu_unschedule(oldctx, spu)
  spu->alloc_state = SPU_FREE
					spu = spu_get_idle(ctx)
					    - searches for a SPE in
					      state SPU_FREE, gets
					      the context just
					      freed by thread 1
					spu_schedule(ctx, spu)
					  spu->alloc_state = SPU_USED
spu_schedule(newctx, spu)
  - assumes spu is still free
  - tries to schedule context on
    already-used spu

This change introduces a 'free_spu' flag to spu_unschedule, to indicate
whether or not the function should free the spu after descheduling the
context. We only set this flag if we're not going to re-schedule
another context on this SPU.

Add a comment to document this behaviour.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
2008-09-05 10:52:03 +10:00
Jeremy Kerr 9f43e3914d powerpc/spufs: Fix multiple get_spu_context()
Commit 8d5636fbca introduced a reference
count on SPU contexts during find_victim, but this may cause a leak in
the reference count if we later find a better contender for a context to
unschedule.

Change the reference to after we've found our victim context, so we
don't do the extra get_spu_context().

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
2008-09-05 10:51:00 +10:00
Russell King 65846909d6 [ARM] omap: fix virtual vs physical address space confusions
mcbsp is confused as to what takes a physical or virtual address.
Fix the two instances where it gets it wrong.

Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-09-04 22:21:19 +01:00
Huang Weiyi 8b540fdcb7 [ARM] remove unused #include <version.h>
The driver(s) below do not use LINUX_VERSION_CODE nor KERNEL_VERSION.
  arch/arm/plat-mxc/clock.c

This patch removes the said #include <version.h>.

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-09-04 10:47:14 +01:00
Alok N Kataria de014d6176 x86: Change warning message in TSC calibration.
When calibration against PIT fails, the warning that we print is misleading.
In a virtualized environment the VM may get descheduled while calibration
or, the check in PIT calibration may fail due to other virtualization
overheads.

The warning message explicitly assumes that calibration failed due to SMI's
which may not be the case. Change that to something proper.

Signed-off-by: Alok N Kataria <akataria@vmware.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-09-03 20:10:37 -07:00
Linus Torvalds 3e25a2d90e 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: Fix for getting CPU number in power_save_ppc32_restore()
  powerpc: Fix build error with 64K pages and !hugetlbfs
  powerpc: Work around gcc's -fno-omit-frame-pointer bug
  powerpc: Make sure _etext is after all kernel text
  powerpc: Only make kernel text pages of linear mapping executable
  powerpc: Fix uninitialised variable in VSX alignment code
2008-09-03 17:36:37 -07:00
Chuck Ebbert e6a5652fd1 x86: add io delay quirk for Presario F700
Manually adding "io_delay=0xed" fixes system lockups in ioapic
mode on this machine.

System Information
	Manufacturer: Hewlett-Packard
	Product Name: Presario F700 (KA695EA#ABF)

Base Board Information
	Manufacturer: Quanta
	Product Name: 30D3

Reference:
https://bugzilla.redhat.com/show_bug.cgi?id=459546

Signed-off-by: Chuck Ebbert <cebbert@redhat.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-09-03 16:42:51 -07:00
Linus Torvalds ec0c15afb4 Split up PIT part of TSC calibration from native_calibrate_tsc
The TSC calibration function is still very complicated, but this makes
it at least a little bit less so by moving the PIT part out into a
helper function of its own.

Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-of-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-09-03 07:30:13 -07:00
Kumar Gala 7888bc2b47 powerpc: Fix for getting CPU number in power_save_ppc32_restore()
The calculation to get TI_CPU based off of SPRG3 was just plain wrong,
meaning that we were getting garbage for the CPU number on 6xx/G3/G4
based SMP boxes in this code.

Just offset off the stack pointer (to get to thread_info) like all the
other references to TI_CPU do.

This was pointed out by Chen Gong <G.Chen@freescale.com>

[paulus@samba.org - use rlwinm r12,r11,... instead of
 rlwinm r12,r1,...; tophys()]

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-09-03 20:53:47 +10:00
Benjamin Herrenschmidt 94ee815c05 powerpc: Fix build error with 64K pages and !hugetlbfs
HAVE_ARCH_UNMAPPED_AREA and HAVE_ARCH_UNMAPPED_AREA_TOPDOWN must
be defined whenever CONFIG_PPC_MM_SLICES is enabled, not just when
CONFIG_HUGETLB_PAGE is.  They used to be always defined together but
this is no longer the case since 3a8247cc2c
("powerpc: Only demote individual slices rather than whole process").

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-09-03 20:53:42 +10:00
Tony Breeds 7563dc6458 powerpc: Work around gcc's -fno-omit-frame-pointer bug
This bug is causing random crashes
(http://bugzilla.kernel.org/show_bug.cgi?id=11414).

-fno-omit-frame-pointer is only needed on powerpc when -pg is also
supplied, and there is a gcc bug that causes incorrect code generation
on 32-bit powerpc when -fno-omit-frame-pointer is used---it uses stack
locations below the stack pointer, which is not allowed by the ABI
because those locations can and sometimes do get corrupted by an
interrupt.

This ensures that CONFIG_FRAME_POINTER is only selected by ftrace.
When CONFIG_FTRACE is enabled we also pass -mno-sched-epilog to work
around the gcc codegen bug.

Patch based on work by:
	Andreas Schwab <schwab@suse.de>
	Segher Boessenkool <segher@kernel.crashing.org>

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-09-03 20:53:34 +10:00
Stephen Rothwell 303996dace powerpc: Make sure _etext is after all kernel text
This makes core_kernel_text() (and therefore kernel_text_address())
return the correct result.  Currently all the __devinit routines (at
least) will not be considered to be kernel text.

This is just a quick fix for 2.6.27 - hopefully we will be able to fix
this better in 2.6.28.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-09-03 20:53:26 +10:00
Paul Mackerras 9e88ba4e45 powerpc: Only make kernel text pages of linear mapping executable
Commit bc033b63bb ("powerpc/mm: Fix
attribute confusion with htab_bolt_mapping()") moved the check for
whether we should make pages of the linear mapping executable from
htab_bolt_mapping into its callers, including htab_initialize.
A side-effect of this is that the decision is now made once for
each contiguous section in the LMB array rather than for each page
individually.  This can often mean that the whole of the linear
mapping ends up being executable.

This reverts to the previous behaviour, where individual pages are
checked for being part of the kernel text or not, by moving the check
back down into htab_bolt_mapping.

Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-09-03 20:53:22 +10:00
Michael Neuling 78fbc824ed powerpc: Fix uninitialised variable in VSX alignment code
This fixes an uninitialised variable in the VSX alignment code.  It can
cause warnings from GCC (noticed with gcc-4.1.1).  Gcc is actually
correct in this instance, and this bug could cause the alignment
interrupt handler to send a SIGSEGV to the process on a legitimate
access.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-09-03 20:53:14 +10:00
Paul E. McKenney 4d084617fb sparc64: Prevent sparc64 from invoking irq handlers on offline CPUs
Make sparc64 refrain from clearing a given to-be-offlined CPU's bit in the
cpu_online_mask until it has processed pending irqs.  This change
prevents other CPUs from being blindsided by an apparently offline CPU
nevertheless changing globally visible state.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-03 02:15:30 -07:00
Russell King 69114a47af [ARM] omap: fix gpio.c build error
arch/arm/plat-omap/gpio.c: In function '_omap_gpio_init':
arch/arm/plat-omap/gpio.c:1492: error: 'omap_mpuio_device' undeclared (first use in this function)

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-09-03 10:15:26 +01:00
David S. Miller e5bd1c3fdd sparc64: Fix IPI call locking.
When I switched sparc64 over to the generic helpers for
smp_call_function(), I didn't convert the dinky call_lock
we had.

Use ipi_call_lock() and ipi_call_unlock().

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-03 02:14:39 -07:00
Thomas Gleixner fbb16e2438 [x86] Fix TSC calibration issues
Larry Finger reported at http://lkml.org/lkml/2008/9/1/90:
An ancient laptop of mine started throwing errors from b43legacy when
I started using 2.6.27 on it. This has been bisected to commit bfc0f59
"x86: merge tsc calibration".

The unification of the TSC code adopted mostly the 64bit code, which
prefers PMTIMER/HPET over the PIT calibration.

Larrys system has an AMD K6 CPU. Such systems are known to have
PMTIMER incarnations which run at double speed. This results in a
miscalibration of the TSC by factor 0.5. So the resulting calibrated
CPU/TSC speed is half of the real CPU speed, which means that the TSC
based delay loop will run half the time it should run. That might
explain why the b43legacy driver went berserk.

On the other hand we know about systems, where the PIT based
calibration results in random crap due to heavy SMI/SMM
disturbance. On those systems the PMTIMER/HPET based calibration logic
with SMI detection shows better results.

According to Alok also virtualized systems suffer from the PIT
calibration method.

The solution is to use a more wreckage aware aproach than the current
either/or decision.

1) reimplement the retry loop which was dropped from the 32bit code
during the merge. It repeats the calibration and selects the lowest
frequency value as this is probably the closest estimate to the real
frequency

2) Monitor the delta of the TSC values in the delay loop which waits
for the PIT counter to reach zero. If the maximum value is
significantly different from the minimum, then we have a pretty safe
indicator that the loop was disturbed by an SMI.

3) keep the pmtimer/hpet reference as a backup solution for systems
where the SMI disturbance is a permanent point of failure for PIT
based calibration

4) do the loop iteration for both methods, record the lowest value and
decide after all iterations finished.

5) Set a clear preference to PIT based calibration when the result
makes sense.

The implementation does the reference calibration based on
HPET/PMTIMER around the delay, which is necessary for the PIT anyway,
but keeps separate TSC values to ensure the "independency" of the
resulting calibration values.

Tested on various 32bit/64bit machines including Geode 266Mhz, AMD K6
(affected machine with a double speed pmtimer which I grabbed out of
the dump), Pentium class machines and AMD/Intel 64 bit boxen.

Bisected-by:  Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-09-02 20:35:56 -07:00
Michael Schmitz 1136cf1106 m68k: atari_keyb_init operator precedence fix
Fix operator precedence bug in atari_keyb_init, which caused a failure on CT60

Signed-off-by: Michael Schmitz <schmitz@debian.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-09-02 10:57:52 -07:00
Stephen Rothwell 2ecbf813d5 fix typo in arch/parisc/hpux/fs.c
A parisc allmodconfig build produces this:

arch/parisc/hpux/fs.c:107: error: 'buffer' undeclared (first use in this function)

Introduced by commit da574983de ("[PATCH]
fix hpux_getdents()").

Helge Dille also reported this in bugzilla 11461:

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

and he posted an identical patch.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-09-02 10:57:29 -07:00
Linus Torvalds 44e7ed3961 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: setup_valid_addr_bitmap_from_pavail() should be __init
  sparc: Fix resource flags for PCI children in OF device tree.
  sparc32: Implement smp_call_function_single().
2008-09-02 10:43:38 -07:00
Linus Torvalds 011fec7486 Un-break printk strings in x86 PCI probing code
Breaking lines due to some imaginary problem with a long line length is
often stupid and wrong, but never more so when it splits a string that
is printed out into multiple lines.  This really ended up making it much
harder to find where some error strings were printed out, because a
simple 'grep' didn't work.

I'm sure there is tons more of this particular idiocy hiding in other
places, but this particular case hit me once more last week. So fix it.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-09-02 10:38:28 -07:00
Sascha Hauer a9b0623357 pcm037: add rts/cts support for serial port
We have rts/cts pins on the first serial port on the pcm037. Enable it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-09-02 10:19:29 +02:00
Humphrey Bucknell 84c4f2f21a avr32: pm_standby low-power ram bug fix
The value stored into the SDRAMC LPR register should be the current
value of the register with the Self-refresh value set in the lower bit
field.

The bug involved only the Self-refresh value being written to the
register, thus over writing any low-power ram settings.

Signed-off-by: Humphrey Bucknell <hbucknell@saitek.com>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2008-09-01 13:04:09 +02:00
Haavard Skinnemoen 9e3f544d79 avr32: Fix lockup after Java stack underflow in user mode
When using the Java Extension Module hardware, a Java stack underflow or
overflow trap may cause the system to enter an infinite exception loop.
Although there's no kernel support for the Java hardware yet, we need to
be able to recover from this situation and keep the system running.

This patch adds code to detect and fixup this situation in the critical
exception handler and terminate the faulting process. We may have to
rethink how to handle this more gracefully when the necessary kernel
support for hardware-accelerated Java is added.

Reported-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2008-09-01 13:04:04 +02:00
David S. Miller dbb8c35d90 sparc64: setup_valid_addr_bitmap_from_pavail() should be __init
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-30 02:04:45 -07:00
Linus Torvalds b460947211 Revert "x86: fix HPET regression in 2.6.26 versus 2.6.25, check hpet against BAR, v3"
This reverts commit a2bd7274b4.

It wasn't really right to begin with (there's a better fix for the
problem with e820 reservations clashing with PCI BAR's pending), but it
also actually causes more regressions, so it should be reverted even
before the better fix is finalized.

Rafael reports that this commit broke AHCI detection, and thus causes
the kernel to not boot on his quad core test box.

Reported-and-bisected-by: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Yinghai Lu <yhlu.kernel@gmail.com>
Cc: David Witbrodt <dawitbro@sbcglobal.net>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-08-29 14:46:05 -07:00
David S. Miller e3c71a3291 sparc: Fix resource flags for PCI children in OF device tree.
When a device is under an EBUS or ISA bus, the resource flags
don't get set properly.

Fix this by re-evaluating the resource flags at each level of
bus as we apply ranges on the way to the root.  And let PCI
override any existing flags setting, but don't let the
default flags calculator make such overrides.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-28 22:59:10 -07:00
Linus Torvalds 41c3e45f08 Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] 5226/1: remove unmatched comment end.
  [ARM] Skip memory holes in FLATMEM when reading /proc/pagetypeinfo
  [ARM] use bcd2bin/bin2bcd
  [ARM] use the new byteorder headers
  [ARM] OMAP: Fix 2430 SMC91x ethernet IRQ
  [ARM] OMAP: Add and update OMAP default configuration files
  [ARM] OMAP: Change mailing list for OMAP in MAINTAINERS
  [ARM] S3C2443: Fix the S3C2443 clock register definitions
  [ARM] JIVE: Fix the spi bus numbering
  [ARM] S3C24XX: pwm.c: stop debugging output
  [ARM] S3C24XX: Fix sparse warnings in pwm.c
  [ARM] S3C24XX: Fix spare errors in pwm-clock driver
  [ARM] S3C24XX: Fix sparse warnings in arch/arm/plat-s3c24xx/gpiolib.c
  [ARM] S3C24XX: Fix nor-simtec driver sparse errors
  [ARM] 5225/1: zaurus: Register I2C controller for audio codecs
  [ARM] orion5x: update defconfig to v2.6.27-rc4
  [ARM] Orion: register UART1 on QNAP TS-209 and TS-409
  [ARM] Orion: activate lm75 driver on DNS-323
  [ARM] Orion: fix MAC detection on QNAP TS-209 and TS-409
  [ARM] Orion: Fix boot crash on Kurobox Pro
2008-08-28 12:34:27 -07:00
Linus Torvalds 604a2785a8 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6:
  Blackfin arch: Fix PM building on BF52x: No ROTWE on BF52x, add USBWE
  Blackfin arch: sram: use 'unsigned long' for irqflags
  Blackfin arch: let PCI depend on BROKEN
  Blackfin arch: move include/asm-blackfin header files to arch/blackfin
  Blackfin arch: fix bug - MPU crashes under stress
  Blackfin arch: Fix bug - when to rmmod the L1_module, it stucks and then reboot the board.
  Blackfin arch: dont actually need to muck with EMAC_SYSTAT for BF52x for demuxing
  Blackfin arch: Add MTD Partitions for MTD_DATAFLASH, increase max SPI SCLK
2008-08-28 12:34:01 -07:00
Linus Torvalds e52c8857e0 Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/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: update defconfigs
  x86: msr: fix bogus return values from rdmsr_safe/wrmsr_safe
  x86: cpuid: correct return value on partial operations
  x86: msr: correct return value on partial operations
  x86: cpuid: propagate error from smp_call_function_single()
  x86: msr: propagate errors from smp_call_function_single()
  smp: have smp_call_function_single() detect invalid CPUs
2008-08-28 12:30:59 -07:00
Jean-Christophe DUBOIS 212496fd9a [ARM] 5226/1: remove unmatched comment end.
remove unmatched comment end.

Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-08-28 17:12:29 +01:00
Michael Hennerich d310fb4bb7 Blackfin arch: Fix PM building on BF52x: No ROTWE on BF52x, add USBWE
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-08-28 17:32:01 +08:00
Vegard Nossum 226a6ec311 Blackfin arch: sram: use 'unsigned long' for irqflags
Using just 'unsigned' will make flags an unsigned int. While this is
arguably not an error on blackfin where sizeof(int) == sizeof(long),
the patch is still justified on the grounds of principle.

The patch was generated using the Coccinelle semantic patch framework.

Cc: Julia Lawall <julia@diku.dk>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-08-28 17:28:46 +08:00
Yoshihiro Shimoda 3c31bf7313 sh: fix semtimedop syscall
fix the problem that cannot work semtimedop system call.

Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-08-28 14:53:22 +09:00
Magnus Damm f9bed3f204 sh: update AP325RXA defconfig
This patch updates the AP325RXA defconfig to include the recently merged
uio_pdrv_genirq driver.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-08-28 14:53:15 +09:00
Magnus Damm be8c129f1a sh: update Migo-R defconfig
This patch updates the MigoR defconfig to include the recently merged
uio_pdrv_genirq driver.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-08-28 14:53:12 +09:00
Magnus Damm c773d8af8e sh: fix platform_resource_setup_memory() section mismatch
This patch kills a section mismatch for platform_resource_setup_memory().

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-08-28 14:53:08 +09:00
Magnus Damm 5734493bac sh: fix kexec entry point for crash kernels
The crash kernel entry point is currently checked by the kexec kernel
code and only physical addresses in the reserved memory window are
accepted. This means that we can't pass P2 or P1 addresses as entry
points in the case of crash kernels. This patch makes sure we can start
crash kernels by adding support for physical address entry points.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-08-28 14:53:03 +09:00
Magnus Damm 34894c7843 sh: crash kernel resource fix
The reserved crash kernel memory range is currently missing from
/proc/iomem. crashk_res is mistakenly setup after __add_active_range().
Reorder things to make sure the resource shows up in /proc/iomem.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-08-28 14:52:58 +09:00
David S. Miller 66e4f8c076 sparc32: Implement smp_call_function_single().
Reported by Stephen Rothwell.

Needed to fix the build when CONFIG_RELAY is enabled.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-27 20:03:22 -07:00
Linus Torvalds b09331e530 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (55 commits)
  sctp: fix random memory dereference with SCTP_HMAC_IDENT option.
  sctp: correct bounds check in sctp_setsockopt_auth_key
  wan: Missing capability checks in sbni_ioctl()
  e100, fix iomap read
  qeth: preallocated header account offset
  qeth: l2 write unicast list to hardware
  qeth: use -EOPNOTSUPP instead of -ENOTSUPP.
  ibm_newemac: Don't call dev_mc_add() before device is registered
  net: don't grab a mutex within a timer context in gianfar
  forcedeth: fix checksum flag
  net/usb/mcs7830: add set_mac_address
  net/usb/mcs7830: new device IDs
  [netdrvr] smc91x: fix resource removal (null ptr deref)
  ibmveth: fix bad UDP checksums
  [netdrvr] hso: dev_kfree_skb crash fix
  [netdrvr] hso: icon 322 detection fix
  atl1: disable TSO by default
  atl1e: multistatement if missing braces
  igb: remove 82576 quad adapter
  drivers/net/skfp/ess.c: fix compile warnings
  ...
2008-08-27 17:38:07 -07:00
Russell King c8791088cf Merge branch 'omap-rmk' 2008-08-27 23:07:46 +01:00
Linus Torvalds 5b51a7e9d8 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
  [PATCH] deal with the first call of ->show() generating no output
  [PATCH] fix ->llseek() for a bunch of directories
  [PATCH] fix regular readdir() and friends
  [PATCH] fix hpux_getdents()
  [PATCH] fix osf_getdirents()
  [PATCH] ntfs: use d_add_ci
  [PATCH] change d_add_ci argument ordering
  [PATCH] fix efs_lookup()
  [PATCH] proc: inode number fixlet
2008-08-27 14:31:44 -07:00
Linus Torvalds 3d87ff3e44 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:
  sparc: Add target for a stripped kernel
  sparc64: Make NUMA depend upon SMP.
2008-08-27 14:31:27 -07:00
Linus Torvalds 72e19b3b22 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] dcss: fix build bug.
  [S390] Fix linker script.
2008-08-27 13:54:43 -07:00
Mel Gorman e80d6a2482 [ARM] Skip memory holes in FLATMEM when reading /proc/pagetypeinfo
Ordinarily, memory holes in flatmem still have a valid memmap and is safe
to use. However, an architecture (ARM) frees up the memmap backing memory
holes on the assumption it is never used. /proc/pagetypeinfo reads the
whole range of pages in a zone believing that the memmap is valid and that
pfn_valid will return false if it is not. On ARM, freeing the memmap breaks
the page->zone linkages even though pfn_valid() returns true and the kernel
can oops shortly afterwards due to accessing a bogus struct zone *.

This patch lets architectures say when FLATMEM can have holes in the
memmap. Rather than an expensive check for valid memory, /proc/pagetypeinfo
will confirm that the page linkages are still valid by checking page->zone
is still the expected zone. The lookup of page_zone is safe as there is a
limited range of memory that is accessed when calling page_zone.  Even if
page_zone happens to return the correct zone, the impact is that the counters
in /proc/pagetypeinfo are slightly off but fragmentation monitoring is
unlikely to be relevant on an embedded system.

Reported-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Tested-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-08-27 20:09:28 +01:00
Adrian Bunk f1bcf7e3e7 [ARM] use bcd2bin/bin2bcd
This patch changes arm to use the new bcd2bin/bin2bcd functions instead
of the obsolete BCD_TO_BIN/BIN_TO_BCD macros.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-08-27 20:07:59 +01:00
Harvey Harrison ae82cbfc8b [ARM] use the new byteorder headers
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-08-27 20:05:27 +01:00
Russell King e4e4146ec5 Merge branch 'for-rmk' of git://git.marvell.com/orion 2008-08-27 19:30:13 +01:00
Russell King a814917058 [ARM] OMAP: Fix 2430 SMC91x ethernet IRQ
Taken from omap 97b705ad835f1481270c4b67b402d6e37fa8ad15:
  ARM: OMAP: Misc compile fixes after syncing with mainline

  Also fix 2430 smc91x to use IRQ_LOWLEVEL.

  Signed-off-by: Tony Lindgren <tony@atomide.com>

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-08-27 16:15:23 +01:00
Russell King 9c2d015712 [ARM] OMAP: Add and update OMAP default configuration files
Update omap_h2_1610 and omap_osk_5912 default configurations.

Add ams delta, n770, omap 2430sdp, apollon_2420, generic 1510, 1610,
1710, 2420, h4 2420, innovator 1510 and 1610, perseus2 730, palte,
palmtt, palmz71 and sx1 default configurations.

Pulled out of the omap zoom tree.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-08-27 16:12:38 +01:00
Heiko Schocher f4f62301c6 fs_enet: Fix SCC Ethernet on CPM2, and crash in fs_enet_rx_napi()
Signed-off-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Vitaly Bordug <vitb@kernel.crashing.org>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-08-27 05:16:38 -04:00
H. Peter Anvin c1b362e3b4 x86: update defconfigs
Enable some option commonly used by testers in defconfig, including
some very common device drivers and network boot support.  defconfig
is still not meant to be a kitchen-sink configuration.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-08-27 08:14:17 +02:00
Adrian Bunk a95ca3b2b9 Blackfin arch: let PCI depend on BROKEN
AFAIR there exists blackfin hardware with PCI support, but the support
currently in the kernel fails to build starting with:

...
  CC      drivers/pci/probe.o
probe.c: In function 'pci_scan_slot':
probe.c:1056: error: implicit declaration of function 'pcibios_scan_all_fns'
make[3]: *** [drivers/pci/probe.o] Error 1

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-08-27 10:55:05 +08:00
Bryan Wu 639f657145 Blackfin arch: move include/asm-blackfin header files to arch/blackfin
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-08-27 10:51:02 +08:00
Russell King 9abc6461a3 Merge branch 's3c2410' of git://aeryn.fluff.org.uk/bjdooks/linux.git 2008-08-26 23:16:45 +01:00
Wei Shuai 78af473530 [ARM] S3C2443: Fix the S3C2443 clock register definitions
Fix the S3C2443 clock register definitions for selecting the EPLL
reference clock described by S3C2443_CLKSRC_EPLLREF.

Signed-off-by: Wei Shuai <cpuwolf@gmail.com>
[ben-linux@fluff.org: minor description fixes]
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-08-26 22:56:22 +01:00
Ben Dooks df9f17e20e [ARM] JIVE: Fix the spi bus numbering
The first spi bus is registered with number 0, but
the board data says that the device on it is registered
on bus 1.

Move the spi bus to bus 1 to keep the compatibility with the
original board-support patches.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-08-26 22:56:22 +01:00
Ben Dooks 66592eee16 [ARM] S3C24XX: pwm.c: stop debugging output
Move debugging output to dev_dbg() instead of dev_info().

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-08-26 22:56:21 +01:00
Ben Dooks 103895925f [ARM] S3C24XX: Fix sparse warnings in pwm.c
Fix the following sparse warnings in arch/arm/plat-s3c24xx/pwm.c:

warning: symbol 's3c_device_timer' was not declared. Should it be static?
warning: symbol 'pwm_calc_tin' was not declared. Should it be static?

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-08-26 22:56:21 +01:00
Ben Dooks 1442e662d8 [ARM] S3C24XX: Fix spare errors in pwm-clock driver
Fix the following sparse warnings in arch/arm/plat-s3c24xx/pwm-clock.c:

warning: symbol 'clk_timer_scaler' was not declared. Should it be static?
warning: symbol 'clk_timer_tclk' was not declared. Should it be static?
warning: symbol 'clk_timer_tdiv' was not declared. Should it be static?

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-08-26 22:56:21 +01:00
Ben Dooks f4cb1a8964 [ARM] S3C24XX: Fix sparse warnings in arch/arm/plat-s3c24xx/gpiolib.c
Fix the following problems spotted by sparse:

warning: symbol 's3c24xx_gpiolib_input' was not declared. Should it be static?
warning: symbol 's3c24xx_gpiolib_output' was not declared. Should it be static?
warning: symbol 's3c24xx_gpiolib_set' was not declared. Should it be static?
warning: symbol 's3c24xx_gpiolib_get' was not declared. Should it be static?
warning: symbol 'gpios' was not declared. Should it be static?

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-08-26 22:56:20 +01:00
Ben Dooks ec8292347b [ARM] S3C24XX: Fix nor-simtec driver sparse errors
Fix the following sparse errors in arch/arm/mach-s3c2410/nor-simtec.c:

53:27: warning: symbol 'simtec_nor_pdata' was not declared. Should it be static?
77:13: warning: symbol 'nor_simtec_init' was not declared. Should it be static?

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-08-26 22:56:20 +01:00
Linus Torvalds 1ef708ea44 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
  [IA64] Fix __{in,out}s{w,l} to handle unaligned data
  [IA64] Fix ia64 build failure when CONFIG_SFC=m
2008-08-26 10:43:55 -07:00
Linus Torvalds bd5a54e93c 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] Ignore vmlinux.lds generated files
  [MIPS] kgdb: Do not call fixup_exception
  [MIPS] RB532: Do not define registers that are already defined
  [MIPS] IP27: Export symbol pcibus_to_node to modules.
  [MIPS] kgdb: s/(void *)0)/NULL/
  [MIPS] kgdb: smp_call_function's 3rd argument is a pointer.
  [MIPS] TXx9: Fix mips_hpt_frequency initialization
  [MIPS] emma2rh: Fix build error by header file inclusion weeding.
  [MIPS] Jazz: Fix build error by header file inclusion weeding.
  [MIPS] Wire up new syscalls.
  [MIPS] Convert printk statements during kernel setup to use severity levels
2008-08-26 10:18:24 -07:00
Linus Torvalds 811da237ba 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: Update defconfigs for most non-embedded platforms
  powerpc: Export CMO_PageSize
  powerpc/ps3: Fix ioremap of spu shadow regs
  powerpc/ps3: Rework htab code to remove ioremap
  powerpc/ps3: Update ps3_defconfig
  powerpc/cell/oprofile: Avoid double vfree of profile buffer
  powerpc: Update defconfigs for FSL PPC boards
  powerpc: Add cuImage.mpc866ads to the bootwrapper as a cuboot-8xx target
  cpm2: Fix race condition in CPM2 GPIO library.
  powerpc: fix memory leaks in QE library
  powerpc/85xx: TQM8548: DTS file fixes and cleanup
  powerpc: Fix whitespace merge in mpc8641 hpcn device tree
2008-08-26 10:07:27 -07:00
Mark Brown f8787fdcf6 [ARM] 5225/1: zaurus: Register I2C controller for audio codecs
corgi, spitz and poodle have audio codecs on their primary I2C bus so
need to call pxa_set_i2c_info() to set it up during init. Tested on
spitz by Stanislav.

Reported-by: Stanislav Brabec <utx@penguin.cz>

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-08-26 16:26:25 +01:00
Florian Fainelli 3e6259c3ef [MIPS] Ignore vmlinux.lds generated files
This patch adds the proper .gitignore file to ignore vmlinux.lds generated
in arch/mips/kernel/.

Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-08-26 09:10:27 +01:00
Atsushi Nemoto b895760dfb [MIPS] kgdb: Do not call fixup_exception
kgdb_mips_notify is called on IBE/DBE/FPE/BP/TRAP/RI exception.  None
of them need fixup.  And doing fixup for a breakpoint exception will
confuse gdb.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-08-26 09:10:26 +01:00
Florian Fainelli 1ddfe82dc6 [MIPS] RB532: Do not define registers that are already defined
Use the register definitions of the MPMC controller from
mach-rc32434/rb.h instead of redefining them.

Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-08-26 09:10:26 +01:00
Ralf Baechle a571444a06 [MIPS] IP27: Export symbol pcibus_to_node to modules.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-08-26 09:10:25 +01:00
Ralf Baechle 9391d6bbed [MIPS] kgdb: s/(void *)0)/NULL/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-08-26 09:10:24 +01:00
Ralf Baechle e522b7ccd2 [MIPS] kgdb: smp_call_function's 3rd argument is a pointer.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-08-26 09:10:23 +01:00
Atsushi Nemoto 1374d08473 [MIPS] TXx9: Fix mips_hpt_frequency initialization
The mips_hpt_frequency initialization code was lost in commit
94a4c32939 (linux-mips.org) /
94a4c32939 (kernel.org) "TXx9: Add 64-bit
support".

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-08-26 09:10:22 +01:00
Ralf Baechle 2841d8b893 [MIPS] emma2rh: Fix build error by header file inclusion weeding.
CC      arch/mips/emma2rh/markeins/setup.o
In file included from arch/mips/emma2rh/markeins/setup.c:30:
include/linux/ide.h:645: error: ‘CONFIG_IDE_MAX_HWIFS’ undeclared here (not in a function)
make[1]: *** [arch/mips/emma2rh/markeins/setup.o] Error 1

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-08-26 09:10:21 +01:00
Ralf Baechle 89ef3e85de [MIPS] Jazz: Fix build error by header file inclusion weeding.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-08-26 09:10:20 +01:00
Ralf Baechle 3885b71ba6 [MIPS] Wire up new syscalls.
signalfd4, eventfd2, epoll_create1, dup3, pipe2 and inotify_init1.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-08-26 09:10:20 +01:00
Mike Crowe a64ae7a225 [MIPS] Convert printk statements during kernel setup to use severity levels
Signed-off-by: Mike Crowe <mac@mcrowe.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-08-26 09:10:19 +01:00
Paul Mackerras 9bdbb96332 powerpc: Update defconfigs for most non-embedded platforms
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-08-26 13:31:55 +10:00
H. Peter Anvin 9ea2b82ed6 x86: cpuid: correct return value on partial operations
Return the correct return value when the CPUID driver partially
completes a request (we should return the number of bytes actually
read or written, instead of the error code.)

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-08-25 17:46:12 -07:00
H. Peter Anvin 85f1cb6015 x86: msr: correct return value on partial operations
Return the correct return value when the MSR driver partially
completes a request (we should return the number of bytes actually
read or written, instead of the error code.)

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-08-25 17:46:12 -07:00
H. Peter Anvin 4b46ca701b x86: cpuid: propagate error from smp_call_function_single()
Propagate error (-ENXIO) from smp_call_function_single() in the CPUID
driver.  This can happen when a CPU is unplugged while the CPUID
driver is open.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-08-25 17:45:48 -07:00
H. Peter Anvin c6f31932d0 x86: msr: propagate errors from smp_call_function_single()
Propagate error (-ENXIO) from smp_call_function_single().  These
errors can happen when a CPU is unplugged while the MSR driver is
open.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-08-25 17:45:48 -07:00
Andrew Morton d617a40227 powerpc: Export CMO_PageSize
This fixes an error building powerpc allmodconfig:

ERROR: "CMO_PageSize" [arch/powerpc/platforms/pseries/cmm.ko] undefined!

Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-08-26 10:24:47 +10:00
Masakazu Mokuno b47027795a powerpc/ps3: Fix ioremap of spu shadow regs
Fix the ioremap of the spu shadow regs on the PS3.

The current PS3 hypervisor requires the spu shadow regs to be
mapped with the PTE page protection bits set as read-only (PP=3).
This implementation uses the low level __ioremap() to bypass the
page protection settings inforced by ioremap_flags() to get the
needed PTE bits set for the shadow regs.

This fixes a runtime failure on the PS3 introduced by the powerpc
ioremap_prot rework of commit a1f242ff46
("powerpc ioremap_prot").

Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-08-26 10:24:46 +10:00
Masakazu Mokuno 9cfeb74e93 powerpc/ps3: Rework htab code to remove ioremap
Rework the PS3 MMU hash table code to remove the need to ioremap the
hash table by using the HV calls lv1_insert_htab_entry() and
lv1_read_htab_entries().

This fixes a runtime failure on the PS3 introduced by the powerpc
ioremap_prot rework of commit a1f242ff46
("powerpc ioremap_prot").

Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-08-26 10:24:46 +10:00
Geoff Levand 98fded0728 powerpc/ps3: Update ps3_defconfig
Update ps3_defconfig.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-08-26 10:24:46 +10:00
Linus Torvalds d25e26b61d [x86] Clean up MAXSMP Kconfig, and limit NR_CPUS to 512
This fixes a regression that was indirectly caused by commit
1184dc2ffe ("x86: modify Kconfig to allow
up to 4096 cpus").

Allowing 4k CPU's is not practical at this time, because we still have a
number of places that have several 'cpumask_t's on the stack, and a
4k-bit cpumask is 512 bytes of stack-space for each such variable.  This
literally caused functions like 'smp_call_function_mask' to have a 2.5kB
stack frame, and several functions to have 2kB stackframes.

With an 8kB stack total, smashing the stack was simply much too likely.
At least bugzilla entry

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

was due to this.

The earlier commit to not inline load_module() into sys_init_module()
fixed the particular symptoms of this that Alan Brunelle saw in that
bugzilla entry, but the huge stack waste by cpumask_t's was the more
direct cause.

Some day we'll have allocation helpers that allocate large CPU masks
dynamically, but in the meantime we simply cannot allow cpumasks this
large.

Cc: Alan D. Brunelle <Alan.Brunelle@hp.com>
Cc: Mike Travis <travis@sgi.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-08-25 14:15:38 -07:00
Linus Torvalds ec73adba51 Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/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: add X86_FEATURE_XMM4_2 definitions
  x86: fix cpufreq + sched_clock() regression
  x86: fix HPET regression in 2.6.26 versus 2.6.25, check hpet against BAR, v3
  x86: do not enable TSC notifier if we don't need it
  x86 MCE: Fix CPU hotplug problem with multiple multicore AMD CPUs
  x86: fix: make PCI ECS for AMD CPUs hotplug capable
  x86: fix: do not run code in amd_bus.c on non-AMD CPUs
2008-08-25 11:26:33 -07:00
James Bottomley 8a549f8b58 [IA64] Fix __{in,out}s{w,l} to handle unaligned data
Some ia64 systems produce several repeats of kernel messages like this:

 kernel unaligned access to 0xe000000644220466, ip=0xa000000100516fa1

This was tracked to ide code using the __cmd[] field in "struct request"
via the __outsw() function.  __cmd[] is a char array, so is not guaranteed
to be properly aligned when accessed as words.

Tested-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2008-08-25 11:23:13 -07:00
Robin Holt 42aca483dd [IA64] Fix ia64 build failure when CONFIG_SFC=m
CONFIG_SFC=m uses topology_core_siblings() which, for ia64, expects
cpu_core_map to be exported.  It is not.  This patch exports the needed
symbol.

Maintainers note: This really looks like the wrong thing to do ... it
would be much better for the kernel to export an API to provide
drivers like this with data they need (which in the case of this
driver seems to be an estimate of the effective parallelism available
on the platform).  But x86 has exported this forever ... so go with
the flow until such an API is defined.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Robin Holt <holt@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2008-08-25 11:10:11 -07:00
Heiko Carstens 5453c1a575 [S390] Fix linker script.
6360b1fbb4 ("move BUG_TABLE into RODATA")
causes this build bug (binutils 2.18.50.0.8.20080709, gcc 4.3.1):

  AS      .tmp_kallsyms1.o
  LD      .tmp_vmlinux2
  KSYM    .tmp_kallsyms2.S
s390x-4.3.1-nm: .tmp_vmlinux2: File truncated
No valid symbol.
make: *** [.tmp_kallsyms2.S] Error 1

So fix this.

Cc: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-08-25 18:15:01 +02:00
Avi Kivity cd5998ebfb KVM: MMU: Fix torn shadow pte
The shadow code assigns a pte directly in one place, which is nonatomic on
i386 can can cause random memory references.  Fix by using an atomic setter.

Signed-off-by: Avi Kivity <avi@qumranet.com>
2008-08-25 17:24:27 +03:00
Peter Zijlstra 52a8968ce9 x86: fix cpufreq + sched_clock() regression
I noticed that my sched_clock() was slow on a number of machine, so I
started looking at cpufreq.

The below seems to fix the problem for me.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-08-25 14:39:19 +02:00
Ingo Molnar f58899bb02 Merge branch 'linus' into x86/urgent 2008-08-25 14:39:12 +02:00
Sonic Zhang 225f7e1eb5 Blackfin arch: Fix bug - when to rmmod the L1_module, it stucks and then reboot the board.
Fix this by correcting the wrong pointer

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-08-25 18:00:45 +08:00
Mike Frysinger d70536ec3a Blackfin arch: dont actually need to muck with EMAC_SYSTAT for BF52x for demuxing
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-08-25 17:37:35 +08:00
Michael Hennerich ceac2651e9 Blackfin arch: Add MTD Partitions for MTD_DATAFLASH, increase max SPI SCLK
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-08-25 17:39:11 +08:00
Yinghai Lu a2bd7274b4 x86: fix HPET regression in 2.6.26 versus 2.6.25, check hpet against BAR, v3
David Witbrodt tracked down (and bisected) a hpet bootup hang on his
system to the following problem: a BIOS bug made the hpet device
visible as a generic PCI device. If e820 reserved entries happen to
be registered first in the resource tree [which v2.6.26 started doing],
then the PCI code will reallocate that device's BAR to some other
address - breaking timer IRQs and hanging the system.

( Normally hpet devices are hidden by the BIOS from the OS's PCI
  discovery via chipset magic. Sometimes the hpet is not a PCI device
  at all. )

Solve this fundamental fragility by making non-PCI platform drivers
insert resources into the resource tree even if it overlaps the e820
reserved entry, to keep the resource manager from updating the BAR.

Also do these checks for the ioapic and mmconfig addresses, and emit
a warning if this happens.

Bisected-by: David Witbrodt <dawitbro@sbcglobal.net>
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Tested-by: David Witbrodt <dawitbro@sbcglobal.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-08-25 10:02:03 +02:00
Al Viro da574983de [PATCH] fix hpux_getdents()
Missing checks for -EFAULT, broken handling of overflow.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2008-08-25 01:18:07 -04:00
Al Viro 645e68ed4d [PATCH] fix osf_getdirents()
Return value of filldir callback is just "should we stop here"; it's
not a usable channel for passing error values (i.e. ->readdir() will
forget anything except "is it non-zero").

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2008-08-25 01:18:06 -04:00
Adrian Bunk e311be521f sh: fix ptrace_64.c:user_disable_single_step()
This patch fixes the following compile error caused by
commit c459dbf294
(sh: ptrace single stepping cleanups.):

<--  snip  -->

...
  CC      arch/sh/kernel/ptrace_64.o
arch/sh/kernel/ptrace_64.c: In function 'user_disable_single_step':
arch/sh/kernel/ptrace_64.c:134: error: 'regs' undeclared (first use in this function)
arch/sh/kernel/ptrace_64.c:134: error: (Each undeclared identifier is reported only once
arch/sh/kernel/ptrace_64.c:134: error: for each function it appears in.)
...
make[2]: *** [arch/sh/kernel/ptrace_64.o] Error 1

<--  snip  -->

Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-08-25 14:08:02 +09:00
Adrian Bunk a106826452 sh64: re-add the __strnlen_user() prototype
Commit 42fd3b142d
(sh: Initial consolidation of the _32/_64 uaccess split.)
mistakenly removed the sh64 __strnlen_user() prototype,
resulting in the following compile error:

<--  snip  -->

...
  CC      init/main.o
In file included from include/linux/poll.h:13,
                 from include/linux/rtc.h:113,
                 from include/linux/efi.h:19,
                 from init/main.c:43:
arch/sh/include/asm/uaccess.h: In function 'strnlen_user':
arch/sh/include/asm/uaccess.h:213: error: implicit declaration of function '__strnlen_user'
...
make[2]: *** [init/main.o] Error 1

<--  snip  -->

Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-08-25 14:07:58 +09:00
Martin Habets 349101da8e sparc: Add target for a stripped kernel
Add a target for a stripped kernel. This is used for the various
packaging targets (*-pkg).

Signed-off-by: Martin Habets <errandir_news@mph.eclipse.co.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-24 20:35:47 -07:00
David S. Miller a39f2f466f sparc64: Make NUMA depend upon SMP.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-24 19:41:43 -07:00
Linus Torvalds 060700b571 x86: do not enable TSC notifier if we don't need it
Impact: crash on non-TSC-equipped CPUs

Don't enable the TSC notifier if we *either*:

1. don't have a CPU, or
2. have a CPU with constant TSC.

In either of those cases, the notifier is either damaging (1) or useless(2).

From: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-08-24 17:16:28 -07:00
Adrian Bunk 7a8fc9b248 removed unused #include <linux/version.h>'s
This patch lets the files using linux/version.h match the files that
#include it.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-08-23 12:14:12 -07:00
Rafael J. Wysocki 8735728ef8 x86 MCE: Fix CPU hotplug problem with multiple multicore AMD CPUs
During CPU hot-remove the sysfs directory created by
threshold_create_bank(), defined in
arch/x86/kernel/cpu/mcheck/mce_amd_64.c, has to be removed before
its parent directory, created by mce_create_device(), defined in
arch/x86/kernel/cpu/mcheck/mce_64.c .  Moreover, when the CPU in
question is hotplugged again, obviously the latter has to be created
before the former.  At present, the right ordering is not enforced,
because all of these operations are carried out by CPU hotplug
notifiers which are not appropriately ordered with respect to each
other.  This leads to serious problems on systems with two or more
multicore AMD CPUs, among other things during suspend and hibernation.

Fix the problem by placing threshold bank CPU hotplug callbacks in
mce_cpu_callback(), so that they are invoked at the right places,
if defined.  Additionally, use kobject_del() to remove the sysfs
directory associated with the kobject created by
kobject_create_and_add() in threshold_create_bank(), to prevent the
kernel from crashing during CPU hotplug operations on systems with
two or more multicore AMD CPUs.

This patch fixes bug #11337.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Andi Kleen <andi@firstfloor.org>
Tested-by: Mark Langsdorf <mark.langsdorf@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-08-23 17:49:19 +02:00
Robert Richter 91ede005d7 x86: fix: make PCI ECS for AMD CPUs hotplug capable
Until now, PCI ECS setup was performed at boot time only and for cpus
that are enabled then. This patch fixes this and adds cpu hotplug.

Tests sequence (check if ECS bit is set when bringing cpu online again):

 # ( perl -e 'sysseek(STDIN, 0xC001001F, 0)'; hexdump -n 8 -e '2/4 "%08x " "\n"' )   < /dev/cpu/1/msr
 00000008 00404010
 # ( perl -e 'sysseek(STDOUT, 0xC001001F, 0); print pack "l*", 8, 0x00400010' ) > /dev/cpu/1/msr
 # ( perl -e 'sysseek(STDIN, 0xC001001F, 0)'; hexdump -n 8 -e '2/4 "%08x " "\n"' )   < /dev/cpu/1/msr
 00000008 00400010
 # echo 0 > /sys/devices/system/cpu/cpu1/online
 # echo 1 > /sys/devices/system/cpu/cpu1/online
 # ( perl -e 'sysseek(STDIN, 0xC001001F, 0)'; hexdump -n 8 -e '2/4 "%08x " "\n"' )   < /dev/cpu/1/msr
 00000008 00404010

Reported-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Robert Richter <robert.richter@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-08-23 17:39:31 +02:00
Robert Richter 9b4e27b528 x86: fix: do not run code in amd_bus.c on non-AMD CPUs
Jan Beulich wrote:

> Even worse - this would even try to access the MSR on non-AMD CPUs
> (currently probably prevented just by the fact that only AMD ones use
> family values of 0x10 or higher).

This patch adds cpu vendor check to the postcore_initcalls.

Reported-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Robert Richter <robert.richter@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-08-23 17:39:30 +02:00
Nicolas Pitre 8e05de88cf [ARM] orion5x: update defconfig to v2.6.27-rc4
Signed-off-by: Nicolas Pitre <nico@marvell.com>
2008-08-22 13:21:15 -04:00
Linus Torvalds 358c323c17 Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/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: work around MTRR mask setting, v2
  x86: fix section mismatch warning - uv_cpu_init
  x86: fix VMI for early params
  x86: fix two modpost warnings in mm/init_64.c
  x86: fix 1:1 mapping init on 64-bit (memory hotplug case)
  x86: work around MTRR mask setting
  x86: PAT Update validate_pat_support for intel CPUs
  devmem, x86: PAT Change /dev/mem mmap with O_SYNC to use UC_MINUS
  x86: PAT proper tracking of set_memory_uc and friends
  x86: fix BUG: unable to handle kernel paging request (numaq_tsc_disable)
  x86: export pv_lock_ops non-GPL
  x86, mmiotrace: silence section mismatch warning - leave_uniprocessor
  x86: use WARN() in arch/x86/kernel
  x86: use WARN() in arch/x86/mm/ioremap.c
  werror: fix pci calgary
  x86: fix oprofile + hibernation badness
  x86, SGI UV: hardcode the TLB flush interrupt system vector
  x86: fix Xorg startup/shutdown slowdown with PAT
  x86: fix "kernel won't boot on a Cyrix MediaGXm (Geode)"
  x86 iommu: remove unneeded parenthesis
2008-08-22 08:23:53 -07:00
Ingo Molnar 9754a5b840 x86: work around MTRR mask setting, v2
improve the debug printout:

- make it actually display something
- print it only once

would be nice to have a WARN_ONCE() facility, to feed such things to
kerneloops.org.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-08-22 14:12:31 +02:00
Marcin Slusarz c4bd1fdab0 x86: fix section mismatch warning - uv_cpu_init
WARNING: vmlinux.o(.cpuinit.text+0x3cc4): Section mismatch in reference from the function uv_cpu_init() to the function .init.text:uv_system_init()
The function __cpuinit uv_cpu_init() references
a function __init uv_system_init().
If uv_system_init is only used by uv_cpu_init then
annotate uv_system_init with a matching annotation.

uv_system_init was ment to be called only once, so do it from codepath
(native_smp_prepare_cpus) which is called once, right before activation
of other cpus (smp_init).

Note: old code relied on uv_node_to_blade being initialized to 0,
but it'a not initialized from anywhere.

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Acked-by: Jack Steiner <steiner@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-08-22 14:12:20 +02:00
Alok Kataria 3a6ddd5f18 x86: fix VMI for early params
while fixing a different bug i moved the call to vmi_init before
early params could be parsed.

This broke the vmi specific commandline parameters.
Fix that, by moving vmi initialization after kernel has got a chance to
parse early parameters.

Signed-off-by: Alok N Kataria <akataria@vmware.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-08-22 08:01:54 +02:00
Jan Beulich 9482ac6e34 x86: fix two modpost warnings in mm/init_64.c
early_io{re,un}map() are __init and hence can't be called from __meminit
functions.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-08-22 07:51:54 +02:00
Jan Beulich 8ae3a5a8df x86: fix 1:1 mapping init on 64-bit (memory hotplug case)
While I don't have a hotplug capable system at hand, I think two issues need
fixing:

- pud_phys (in kernel_physical_ampping_init()) would remain uninitialized in
  the after_bootmem case

- the locking done just around phys_pmd_{init,update}() would leave out pgd
  updates, and it was needlessly covering code portions that do allocations
  (perhaps using a more friendly gfp value in alloc_low_page() would then be
  possible)

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-08-22 07:51:53 +02:00
Yinghai Lu 38cc1c3df7 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>
2008-08-22 05:49:35 +02:00
Martin Michlmayr e45772b2c0 [ARM] Orion: register UART1 on QNAP TS-209 and TS-409
Register UART1 on QNAP TS-209 and TS-409 because the PIC controller
is connected to it.  This fixes a regression from 2.6.26.

Signed-off-by: Martin Michlmayr <tbm@cyrius.com>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
2008-08-21 22:15:17 -04:00
Martin Michlmayr c0fe819baf [ARM] Orion: activate lm75 driver on DNS-323
The lm75 driver was recently converted to the new-style binding,
so now it can be loaded from the DNS-323 support code.

Signed-off-by: Martin Michlmayr <tbm@cyrius.com>
Tested-by: Tobias Poschwatta <tp@fonz.de>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
2008-08-21 22:15:17 -04:00
Martin Michlmayr 35228e840a [ARM] Orion: fix MAC detection on QNAP TS-209 and TS-409
Flash needs to be set up before we can try to read the MAC address
from there.

Signed-off-by: Martin Michlmayr <tbm@cyrius.com>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
2008-08-21 22:15:17 -04:00
Per Andersson 7a6bb26226 [ARM] Orion: Fix boot crash on Kurobox Pro
The Kurobox Pro crashes when any of the PCI controller registers
are accessed.  This patch adds a function to the Orion PCI handling
code that board support code can call to disable enumerating the
PCI bus entirely, and makes the Kurobox Pro PCI-related init code
call this function.

Signed-off-by: Per Andersson <avtobiff@gmail.com>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
2008-08-21 22:15:17 -04:00
Linus Torvalds a22c50c302 Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] 5212/1: pxa: fix build error when CPU_PXA310 is not defined
  [ARM] 5208/1: fsg-setup.c fixes
  [ARM] fix impd1.c build warning
  [ARM] e400 config use MFP
  [ARM] e740 config use MFP
  [ARM] Fix eseries IRQ limit
  [ARM] clocklib: Update users of aliases to new API
  [ARM] clocklib: Allow dynamic alias creation
  [ARM] eseries: whitespace fixes and cleanup
2008-08-21 16:31:08 -07:00
Martin Schwidefsky cce7496d3d [S390] Update default configuration.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-08-21 19:46:42 +02:00
Eric Sandeen 152382af40 [S390] fix ext2_find_next_bit
ext4 does not work on s390 because ext2_find_next_bit is broken. Fortunately
this function is only used by ext4. The function uses ffs which does not work
analog to ffz. The result of ffs has an offset of 1 which is not taken into
account. To fix this use the low level __ffs_word function directly instead
of the ill defined ffs.

In addition the patch improves find_next_zero_bit and ext2_find_next_zero_bit
by passing the bit offset into __ffz_word instead of adding it after the
function call returned.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-08-21 19:46:41 +02:00
Heiko Carstens 8853e505a1 [S390] Remove unneeded spinlock initialization.
Remove the now unneeded s390_idle.lock spinlock initialization after
Josef Sipek did it the right way in arch/s390/kernel/process.c.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-08-21 19:46:39 +02:00
Josef 'Jeff' Sipek 3e972394f9 [S390] Fix uninitialized spinlock use
Ever since commit 43ca5c3a1c ([S390] Convert
monitor calls to function calls.), the kernel refused to IPL with spinlock
debugging enabled.

BUG: spinlock bad magic on CPU#0, swapper/0
 lock: 00000000003a4668, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0
CPU: 0 Not tainted 2.6.25 #1
Process swapper (pid: 0, task: 000000000034f958, ksp: 0000000000377d60)
0000000000377ab8 0000000000352628 0000000000377d60 0000000000377d60
       0000000000016af4 00000000fffff7b5 0000000000377d60 0000000000000000
       0000000000000000 0000000000377a18 0000000000000009 0000000000377a18
       0000000000377a78 000000000023c920 0000000000016af4 0000000000377a18
       0000000000000005 0000000000000000 0000000000377b58 0000000000377ab8
Call Trace:
([<0000000000016a60>] show_trace+0xdc/0x108)
 [<0000000000016b4e>] show_stack+0xc2/0xfc
 [<0000000000016c9a>] dump_stack+0xb2/0xc0
 [<0000000000172dd4>]

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-08-21 19:46:39 +02:00
Kumar Gala 2bb2e1db90 powerpc: Update defconfigs for FSL PPC boards
Since we are updated defconfigs I went ahead and moved the
asp8347_defconfig under 83xx/ and the mpc8536_ds_defconfig under
85xx/ as that is where they should have been to start with.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-21 07:23:03 -05:00
venkatesh.pallipadi@intel.com 8323444b5d 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>
2008-08-21 13:27:34 +02:00
venkatesh.pallipadi@intel.com 28df82ebab 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>
2008-08-21 13:27:33 +02:00
venkatesh.pallipadi@intel.com c15238df3b 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>
2008-08-21 13:27:32 +02:00
Vegard Nossum b2a6a58ca6 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 64898a8bad
>> 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>
2008-08-21 12:52:01 +02:00
Jeremy Fitzhardinge 7946612de2 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>
2008-08-21 12:42:23 +02:00
Marcin Slusarz 7701e8c59b 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>
2008-08-21 12:35:16 +02:00
Arjan van de Ven bde78a79a6 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>
2008-08-21 10:01:52 +02:00
Arjan van de Ven 0c072bb452 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>
2008-08-21 09:59:27 +02:00
David Howells 85d577979a 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 b34e90b8f0.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-08-21 09:55:47 +02:00
Scott Wood 8dd217b27e powerpc: Add cuImage.mpc866ads to the bootwrapper as a cuboot-8xx target
This patch fixes the following build error with mpc866_ads_defconfig:

<--  snip  -->

...
  WRAP    arch/powerpc/boot/cuImage.mpc866ads
powerpc64-linux-ld: arch/powerpc/boot/cuboot-mpc866ads.o: No such file: No such file or directory
make[2]: *** [arch/powerpc/boot/cuImage.mpc866ads] Error 1

<--  snip  -->

Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-21 00:37:04 -05:00
Laurent Pinchart 639d64456e cpm2: Fix race condition in CPM2 GPIO library.
The CPM2 GPIO library code uses the non thread-safe clrbits32/setbits32
macros. This patch protects them with a spinlock.

Signed-off-by: Laurent Pinchart <laurentp@cse-semaphore.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-21 00:15:54 -05:00
Timur Tabi 61a4e9e91d powerpc: fix memory leaks in QE library
Fix two memory leaks in the Freescale QE library: add a missing kfree() in
ucc_fast_init() and ucc_slow_init() if the ioremap() fails, and update
ucc_fast_free() and ucc_slow_free() to call iounmap() if necessary.

Based on a patch from Tony Breeds <tony@bakeyournoodle.com>.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-20 23:58:12 -05:00
Wolfgang Grandegger d27a736c7a powerpc/85xx: TQM8548: DTS file fixes and cleanup
Due to the missing compatible property for the SOC, the MPC I2C buses are
not found any more. This patch fixes this issue. Furthermore it corrects
the name of the SOC node and adds the missing I2C node for the RTC.

Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-20 23:56:30 -05:00
Kumar Gala ba1616d921 powerpc: Fix whitespace merge in mpc8641 hpcn device tree
When we coverted the .dts to v1 we lost a space between the irq
and its polarity/sense information.  This causes a bit of chaos
as the reset of the blob is off by one cell.

This was noticed by booting and getting errors w/ATA due to
lock of interrupts.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-20 23:26:02 -05:00
Mike Rapoport 55d8460c92 [ARM] 5212/1: pxa: fix build error when CPU_PXA310 is not defined
Fix
arch/arm/mach-pxa/pxa300.c:94: error: 'CKEN_MMC3' undeclared here (not in a function)
when building for PXA300.

Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Acked-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-08-20 23:17:13 +01:00
Linus Torvalds 1bbe44f69d Merge branch 'sh/for-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* 'sh/for-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
  sh: Provide a FLAT_PLAT_INIT() definition.
  binfmt_flat: Stub in a FLAT_PLAT_INIT().
  video: export sh_mobile_lcdc panel size
  sh: select memchunk size using kernel cmdline
  sh: export sh7723 VEU as VEU2H
  input: migor_ts compile and detection fix
  sh: remove MSTPCR defines from Migo-R header file
  sh: Update sh7763rdp defconfig
  sh: Add support sh7760fb to sh7763rdp board
  sh: Add support sh_eth to sh7763rdp board
  sh: Disable 64kB hugetlbpage size when using 64kB PAGE_SIZE.
  sh: Don't export __{s,u}divsi3_i4i from SH-2 libgcc.
  fix SH7705_CACHE_32KB compilation
  sh: mach-x3proto: Fix up smc91x platform data.
2008-08-20 08:46:11 -07:00
Linus Torvalds 8498ffd667 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: Fix vio_bus_probe oops on probe error
  powerpc/ibmebus: Restore "name" sysfs attribute on ibmebus devices
  powerpc: Fix /dev/oldmem interface for kdump
  powerpc/spufs: Remove invalid semicolon after if statement
  powerpc/spufs: reference context while dropping state mutex in scheduler
  powerpc/spufs: fix npc setting for NOSCHED contexts
2008-08-20 08:44:33 -07:00
Andi Kleen 80a8c9fffa 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>
2008-08-20 16:18:31 +02:00
Cliff Wickman 99dd871330 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>
2008-08-20 12:36:03 +02:00
Venki Pallipadi 80c5e73d60 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>
2008-08-20 12:08:37 +02:00
Samuel Sieb c6744955d0 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 f25f64ed5b
> 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>
2008-08-20 11:31:00 +02:00
Brian King cd5aeb9f6c powerpc: Fix vio_bus_probe oops on probe error
When CMO is enabled and booted on a non CMO system and the VIO
device's probe function fails, an oops can result since
vio_cmo_bus_remove is called when it should not.  This fixes it by
avoiding the vio_cmo_bus_remove call on platforms that don't implement
CMO.

cpu 0x0: Vector: 300 (Data Access) at [c00000000e13b3d0]
    pc: c000000000020d34: .vio_cmo_bus_remove+0xc0/0x1f4
    lr: c000000000020ca4: .vio_cmo_bus_remove+0x30/0x1f4
    sp: c00000000e13b650
   msr: 8000000000009032
   dar: 0
 dsisr: 40000000
  current = 0xc00000000e0566c0
  paca    = 0xc0000000006f9b80
    pid   = 2428, comm = modprobe
enter ? for help
[c00000000e13b6e0] c000000000021d94 .vio_bus_probe+0x2f8/0x33c
[c00000000e13b7a0] c00000000029fc88 .driver_probe_device+0x13c/0x200
[c00000000e13b830] c00000000029fdac .__driver_attach+0x60/0xa4
[c00000000e13b8c0] c00000000029f050 .bus_for_each_dev+0x80/0xd8
[c00000000e13b980] c00000000029f9ec .driver_attach+0x28/0x40
[c00000000e13ba00] c00000000029f630 .bus_add_driver+0xd4/0x284
[c00000000e13baa0] c0000000002a01bc .driver_register+0xc4/0x198
[c00000000e13bb50] c00000000002168c .vio_register_driver+0x40/0x5c
[c00000000e13bbe0] d0000000003b3f1c .ibmvfc_module_init+0x70/0x109c [ibmvfc]
[c00000000e13bc70] c0000000000acf08 .sys_init_module+0x184c/0x1a10
[c00000000e13be30] c000000000008748 syscall_exit+0x0/0x40

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-08-20 09:50:22 +10:00
Joachim Fenkes 4589f1fe57 powerpc/ibmebus: Restore "name" sysfs attribute on ibmebus devices
Recent of_platform changes made of_bus_type_init() overwrite the bus
type's .dev_attrs list, meaning that the "name" attribute that ibmebus
devices previously had is no longer present.  This is a user-visible
regression which breaks the userspace eHCA support, since the eHCA
userspace driver relies on the name attribute to check for valid
adapters.

This fixes it by providing the "name" attribute in the generic OF
device code instead.  Tested on POWER.

Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-08-20 09:50:21 +10:00
Michael Ellerman 7230ced492 powerpc: Fix /dev/oldmem interface for kdump
A change to __ioremap() broke reading /dev/oldmem because we're no
longer able to ioremap pfn 0 (d177c207, "[PATCH] powerpc: IOMMU: don't
ioremap null addresses").

We actually don't need to ioremap for anything that's part of the linear
mapping, so just read it directly.

Also make sure we're only reading one page or less at a time.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Sachin Sant <sachinp@in.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-08-20 09:50:21 +10:00
Paul Mackerras d82bf49094 Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/jk/spufs into merge 2008-08-20 09:18:20 +10:00
Linus Torvalds ddd13dc606 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
  PCI: add acpi_find_root_bridge_handle
  PCI: acpi_pcihp: run _OSC on a root bridge
  x86/PCI: irq and pci_ids patch for Intel Ibex Peak PCHs
  x86/PCI: allow scanning of 255 PCI busses
  x86, pci: detect end_bus_number according to acpi/e820 reserved, v2
  pci: debug extra pci bus resources
  pci: debug extra pci resources range
2008-08-19 13:55:47 -07:00
Linus Torvalds f607e3a03c Revert "[CPUFREQ][2/2] preregister support for powernow-k8"
This reverts commit 34ae7f35a2, which has
been reported to cause a number of problems.  During suspend and resume,
it apparently causes a crash in a CPU hotplug notifier to happen,
although the exact details are sketchy because of the inability to get
good traces during the suspend sequence.

See buzilla entries

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

for more examples and details.

[ Mark: "Revert the patch for now.  I'm still looking into getting a
  reliable reproduction and I do not have a fix at this time." ]

Requested-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Mark Langsdorf <mark.langsdorf@amd.com>
Acked-by: Dave Jones <davej@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@inux-foundation.org>
2008-08-19 13:34:59 -07:00
Tomasz Chmielewski d90c1add96 [ARM] 5208/1: fsg-setup.c fixes
This patch against 2.6.27-rc3 does the following changes to FSG-3 setup code:

1) Enable RTC on FSG-3 (proper name is needed). This change is needed due to a recent change in i2c.

2) i variable is only used when compiling for big endian.
So move its declaration to ARMEB ifdef to silence the warning when compiling for LE.

Mailing list link:
http://lists.arm.linux.org.uk/lurker/message/20080813.091556.cae2917e.en.html

Signed-off-by: Tomasz Chmielewski <mangoo@wpkg.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-08-19 16:56:42 +01:00
Ilpo Järvinen cb9808d3d0 powerpc/spufs: Remove invalid semicolon after if statement
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
2008-08-19 22:04:55 +08:00
Linus Torvalds 1fca254274 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
  [IA64] use generic compat_old_sys_readdir
  [IA64] pci_acpi_scan_root cleanup
  [IA64] Shrink shadow_flush_counts to a short array to save 8k of per_cpu area.
  [IA64] Remove sn2_defconfig.
2008-08-18 17:43:21 -07:00
Linus Torvalds b689e83961 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
  ata: add missing ATA_* defines
  ata: add missing ATA_CMD_* defines
  ata: add missing ATA_ID_* defines (take 2)
  sgiioc4: fixup message on resource allocation failure
  ide-cd: use bcd2bin/bin2bcd
  cdrom: handle TOC
  gdrom: add dummy audio_ioctl handler
  viocd: add dummy audio ioctl handler
  cleanup powerpc/include/asm/ide.h
  drivers/ide/pci/: use __devexit_p()
2008-08-18 17:40:13 -07:00
Jiri Kosina 8a7c5ef3ba 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>
2008-08-19 02:16:24 +02:00
Christoph Hellwig 37c23e7fda [IA64] use generic compat_old_sys_readdir
Switch ia64 to the generic compat_sys_old_readdir which is identical
except for slightly better error handling.  Also remove sys32_getdents
which already isn't wired up to the syscall table anymore in favour of
compat_sys_getdents.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2008-08-18 15:42:11 -07:00
Luck, Tony 8a20fd52c6 [IA64] pci_acpi_scan_root cleanup
The code walks all the acpi _CRS methods to see how many windows
to allocate.  It then scans them all again to insert_resource()
for each *even if the first scan found that there were none*.

Move the second scan inside the "if (windows)" clause.

Signed-off-by: Tony Luck <tony.luck@intel.com>
2008-08-18 15:41:21 -07:00
Robin Holt 97653f92c0 [IA64] Shrink shadow_flush_counts to a short array to save 8k of per_cpu area.
Making allmodconfig will break the current build.  This patch shrinks
the per_cpu__shadow_flush_counts from 16k to 8k which frees enough space
to allow allmodconfig to successfully complete.

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

Signed-off-by: Robin Holt <holt@sgi.com>
Acked-by: Jack Steiner <steiner@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2008-08-18 15:39:48 -07:00
Robin Holt ea42b8ce8c [IA64] Remove sn2_defconfig.
Not really a patch as much as a remove this file request.  Now that
generic_defconfig supports all the configurations SGI currently supports
and has NR_CPUS and NR_NODES at our largest configurations, we have no
reason to maintain the extra defconfig file.

Signed-off-by: Robin Holt <holt@sgi.com>
Acked-by: Jack Steiner <steiner@sgi.com>
Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2008-08-18 15:33:40 -07:00
Russell King 1a1dc50442 Merge branch 'for_rmk_17' of git://git.mnementh.co.uk/linux-2.6-im 2008-08-18 22:17:37 +01:00
Adrian Bunk 1f49060adc cleanup powerpc/include/asm/ide.h
This patch removes code that became unused through IDE changes and the 
arch/ppc/ removal.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-08-18 21:40:03 +02:00
Linus Torvalds a7f5aaf36d Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/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
2008-08-18 12:10:14 -07:00
Linus Torvalds 04cde035fa 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: 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
2008-08-18 12:05:01 -07:00
Linus Torvalds 1de481ded9 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:
  lmb: Fix reserved region handling in lmb_enforce_memory_limit().
  sparc64: Fix cmdline_memory_size handling bugs.
  sparc64: Fix overshoot in nid_range().
2008-08-18 12:03:23 -07:00
Jesse Barnes ce6754235b Merge branch 'pci-for-jesse' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip into x86-merge
Conflicts:

	drivers/pci/probe.c
2008-08-18 09:54:13 -07:00
Russell King faa64c93ae [ARM] fix impd1.c build warning
CC      arch/arm/mach-integrator/impd1.o
arch/arm/mach-integrator/impd1.c: In function `impd1_probe':
arch/arm/mach-integrator/impd1.c:408: warning: too few arguments for format

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-08-18 13:52:07 +01:00
Andi Kleen 1b72691ce3 x86: fix build warnings in real mode code
This recent patch

commit c3965bd151
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>
2008-08-18 09:20:14 +02:00
Marcin Slusarz f71066624d 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>
2008-08-18 09:10:57 +02:00
Marcin Slusarz d19fbfdfe6 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>
2008-08-18 09:10:56 +02:00
David Fries e532c06f2a 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>
2008-08-18 08:50:19 +02:00
Marcin Slusarz 39e00fe20a 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>
2008-08-18 07:49:26 +02:00
Marcin Slusarz c72a5efec1 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>
2008-08-18 07:49:06 +02:00
Marcin Slusarz 67d0c9ebdc 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>
2008-08-18 07:48:40 +02:00
Marcin Slusarz d554d9a429 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>
2008-08-18 07:48:07 +02:00