Commit graph

17090 commits

Author SHA1 Message Date
Ralf Baechle f5cd9f14e2 [MIPS] Pb1200: Fix warning.
arch/mips/au1000/pb1200/board_setup.c:71: warning: unused variable 'pin_func'

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-11-02 16:13:47 +00:00
Ralf Baechle c8925297e8 [MIPS] IP27: Fix build error.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-11-02 16:13:47 +00:00
Ralf Baechle 07f6169cff [MIPS] Excite: Fix build error.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-11-02 16:13:47 +00:00
Ralf Baechle 217dd11e9d [MIPS] Sibyte: Split and move clock code.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-11-02 16:13:47 +00:00
Ralf Baechle f3f9ad0edc [MIPS] Sibyte: Fixes for oneshot timer mode.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-11-02 16:13:47 +00:00
Ralf Baechle faf2782bf3 [MIPS] Sibyte: Remove blank line.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-11-02 16:13:47 +00:00
Thiemo Seufer 211a29a87c [MIPS] Swarm: Fix build failure
Signed-off-by: Thiemo Seufer <ths@networkno.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-11-02 16:13:47 +00:00
Atsushi Nemoto d9eec1a5d6 [MIPS] time: Code cleanups
* Do not include unnecessary headers.
* Do not mention time.README.
* Do not mention mips_timer_ack.
* Make clocksource_mips static.  It is now dedicated to c0_timer.
* Initialize clocksource_mips.read statically.
* Remove null_hpt_read.
* Remove an argument of plat_timer_setup.  It is just a placeholder.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-11-02 16:13:46 +00:00
Ralf Baechle 1d0a909cfc [MIPS] time: Remove now unused local_timer_interrupt.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-11-02 16:13:46 +00:00
Ralf Baechle 81b635ef36 [MIPS] IP32: Fix address of 2nd serial interface.
Found by Giuseppe Sacco <giuseppe@eppesuigoccas.homedns.org>.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-11-02 16:13:46 +00:00
Ralf Baechle 46abf4b39a [MIPS] SB1250: Use the right irqaction for the timer interrupt.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-11-02 16:13:46 +00:00
Ralf Baechle d1598b6adb [MIPS] SB1250: Remove stray assignment of cpumask.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-11-02 16:13:46 +00:00
Ralf Baechle 2e5dcd2b4c [MIPS] Sibyte: Fix names of the clockevent devices.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-11-02 16:13:46 +00:00
Ralf Baechle 9e32a510af [MIPS] Sibyte: Build fixes / dead code removal.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-11-02 16:13:46 +00:00
Paul Mundt dd3aa7cdac sh64: Update defconfigs.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-11-02 14:36:55 +09:00
Paul Mundt 352d281300 sh: Update r7785rp defconfig.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-11-02 14:33:21 +09:00
Paul Mundt 0b532f5773 sh: mach-type updates.
This adds in the x3proto and magicpanelr2 mach types, plugs in
highlander and rts7751r2d groups, and also hooks up the r2d
subtypes.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-11-02 14:28:07 +09:00
Paul Mundt b5751e2e00 sh: Fix up r7780rp highlander CF access size.
R7780RP can't do byte-sized accesses to CF, so needs to do word
sized access with low-byte masking. This same problem exists
on older versions of the R2D, with the same workaround having
been implemented in 43f4b8c757
there. Follow that change for the highlander boards.

This does not impact R7780MP or SH7785 based Highlander modules.

If you're unfortunate enough to be stuck with an R7780RP, this
patch is for you!

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-11-02 14:17:19 +09:00
Kaz Kojima f38c5a696a sh: Terminate .eh_frame in VDSO with a 4-byte 0.
It's assumed that .eh_frame is terminated with 4-byte 0 in shared
libraries and executable.  It seems to be the case for VDSOs too.
Without this terminator, I saw failures when unwinding from VDSO,
though I don't know how other architectures handle this issue.
For the normal libs, crtendS.o gives this terminator.  We can use
such terminating objects.  Or we can add a 4-byte 0 with modifying
the linker script like as the patch below.

Signed-off-by: Kaz Kojima <kkojima@rr.iij4u.or.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-11-02 12:29:37 +09:00
Paul Mundt 110ed28246 sh: Decouple 4k and soft/hardirq stacks.
While using separate IRQ stacks can cut down on stack consumption,
many users can also use 4k stacks directly without the additional
need of separate stacks for soft and hardirqs.

With this split, we support the same rationale for 4KSTACKS as
m68knommu, with the IRQSTACKS abstraction as per ppc64.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-11-02 12:16:51 +09:00
Stuart Menefy 0e670685e4 sh: Fix optimized __copy_user() movca.l usage.
movca.l is restricted to SH-4 and up only, though compilers that
are unable to support ISA tuning (especially older versions of
binutils) will happily compile in the bogus opcode on older parts.

Conditionalize it to fix SH-3 regressions noted by Kristoffer.

Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-11-02 12:14:09 +09:00
Paul Mackerras 97a4649d6f Merge branch 'linux-2.6' into merge 2007-11-02 14:03:14 +11:00
Steven A. Falco 29273158f8 [POWERPC] 4xx: Fix Walnut DTS interrupt property
Re-order the EMAC interrupts in the walnut.dts file so that they are mapped
correctly.

Signed-off-by: Steve Falco <sfalco at harris.com>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
2007-11-01 07:20:43 -05:00
Grant Likely bd942ba3db [POWERPC] ppc405 Fix arithmatic rollover bug when memory size under 16M
mmu_mapin_ram() loops over total_lowmem to setup page tables.  However, if
total_lowmem is less that 16M, the subtraction rolls over and results in
a number just under 4G (because total_lowmem is an unsigned value).

This patch rejigs the loop from countup to countdown to eliminate the
bug.

Special thanks to Magnus Hjorth who wrote the original patch to fix this
bug.  This patch improves on his by making the loop code simpler (which
also eliminates the possibility of another rollover at the high end)
and also applies the change to arch/powerpc.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
2007-11-01 07:15:59 -05:00
Benjamin Herrenschmidt b98ac05d5e [POWERPC] 4xx: Deal with 44x virtually tagged icache
The 44x family has an interesting "feature" which is a virtually
tagged instruction cache (yuck !). So far, we haven't dealt with
it properly, which means we've been mostly lucky or people didn't
report the problems, unless people have been running custom patches
in their distro...

This is an attempt at fixing it properly. I chose to do it by
setting a global flag whenever we change a PTE that was previously
marked executable, and flush the entire instruction cache upon
return to user space when that happens.

This is a bit heavy handed, but it's hard to do more fine grained
flushes as the icbi instruction, on those processor, for some very
strange reasons (since the cache is virtually mapped) still requires
a valid TLB entry for reading in the target address space, which
isn't something I want to deal with.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
2007-11-01 07:15:30 -05:00
Benjamin Herrenschmidt e701d269aa [POWERPC] 4xx: Fix 4xx flush_tlb_page()
On 4xx CPUs, the current implementation of flush_tlb_page() uses
a low level _tlbie() assembly function that only works for the
current PID. Thus, invalidations caused by, for example, a COW
fault triggered by get_user_pages() from a different context will
not work properly, causing among other things, gdb breakpoints
to fail.

This patch adds a "pid" argument to _tlbie() on 4xx processors,
and uses it to flush entries in the right context. FSL BookE
also gets the argument but it seems they don't need it (their
tlbivax form ignores the PID when invalidating according to the
document I have).

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
2007-11-01 07:15:09 -05:00
Roel Kluin 57d75561be [POWERPC] allocation fix in ppc/platforms/4xx/luan.c
Don't allocate hose2 when when hose1 can't be allocated and free hose1 when
hose2 can't be allocated.

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
2007-11-01 07:14:09 -05:00
Valentine Barshak d1dfc35d3a [POWERPC] 4xx: Workaround for the 440EP(x)/GR(x) processors identical PVR issue.
PowerPC 440EP(x) 440GR(x) processors have the same PVR values, since
they have identical cores. However, FPU is not supported on GR(x) and
enabling APU instruction broadcast in the CCR0 register (to enable FPU)
may cause unpredictable results. There's no safe way to detect FPU
support at runtime. This patch provides a workarund for the issue.

We use a POWER6 "logical PVR approach". First, we identify all EP(x)
and GR(x) processors as GR(x) ones (which is safe). Then we check
the device tree cpu path. If we have a EP(x) processor entry,
we call identify_cpu again with PVR | 0x8. This bit is always 0
in the real PVR. This way we enable FPU only for 440EP(x).

Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
2007-11-01 07:13:43 -05:00
Grant Likely d474037334 [POWERPC] bootwrapper: Bail from script if any command fails
Add the 'set -e' command to the wrapper script so that if any command
fails then the script will automatically exit

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
2007-11-01 07:11:11 -05:00
Grant Likely 7f66c1fd03 [POWERPC] bootwrapper: Allow wrapper script to execute verbosely
Allow wrapper script to print verbose progress when the V is set in the
environment.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
2007-11-01 07:11:06 -05:00
David S. Miller b4d367fb20 [SPARC64]: Update defconfig.
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-01 03:18:02 -07:00
David S. Miller d6898556e9 [SPARC64]: Fix build with CONFIG_NET disabled.
We can't export verify_compat_iovec when CONFIG_NET is
disabled, and consequently the Solaris compat module
should also depend upon CONFIG_NET.

Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-31 15:30:54 -07:00
David S. Miller 7e5766fa94 [SPARC64]: Fix build failure when CONFIG_BUG is disabled.
When CONFIG_BUG is turned off, the standard trick of:

	switch (x) {
	case X:
	...
	case Y:
	...
	default:
		BUG();
	};

to mark impossible cases does not work because BUG() evalutes
to nothing and thus GCC just sees a fallthrough code path.

Add an explicit KERN_ERR log message and a do_exit() to trap
this case.

Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-31 15:30:52 -07:00
David S. Miller 099d575aaf [SPARC64]: Kill unused ITAG_MASK macro in ultra.S
It is unused since we went to an I-cache flush that solely used
the 'flush' instruction, and it's presence breaks the build
when PAGE_SIZE is 512KB.

Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-31 15:30:51 -07:00
David S. Miller 23e8bc200c [SPARC64]: Fix bogus '&' conditinal in set_rtc_mmss().
We're using '&' instead of '&&'.

Noticed by Roel Kluin.

Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-31 15:30:49 -07:00
eric miao 1398f679df [ARM] 4636/1: pxa: add default configuration for zylonite
Signed-off-by: eric miao <eric.miao@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-10-31 15:21:48 +00:00
eric miao e9bba8ee6c [ARM] 4635/1: pxa: Change Eric Miao's email address to eric.miao@marvell.com
Signed-off-by: eric miao <eric.miao@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-10-31 15:21:48 +00:00
Roel Kluin 710798c3e1 [ARM] Fix assignment instead of condition in arm/mach-omap2/clock.c
Fix assignment instead of condition

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-10-31 15:21:43 +00:00
Russell King df43309bd5 [ARM] pxa: shut up CLOCK_EVT_MODE_RESUME warning
Resolve:
  CC      arch/arm/mach-pxa/time.o
arch/arm/mach-pxa/time.c: In function `pxa_osmr0_set_mode':
arch/arm/mach-pxa/time.c:154: warning: enumeration value `CLOCK_EVT_MODE_RESUME' not handled in switch

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-10-31 15:21:42 +00:00
Russell King 0214f9221a [ARM] Fix FIQ issue with ARM926
Jon Eibertzon writes:
> We have noticed that the I-cache is disabled while waiting for
> interrupt in cpu_arm926_do_idle in arch/arm/mm/proc-arm926.S
> and we are curious to know why, because this causes us a great
> performance hit when executing in FIQ-handlers. Is it assumed
> here that every individual FIQ-handler re-enables the I-cache?

The I-cache disable is an errata workaround, so the solution is to
disable FIQs across the section with the I-cache disabled.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-10-31 15:21:40 +00:00
Russell King 5984a2fc7e [ARM] Fix netx_defconfig regression
Fix:

  CC      arch/arm/mach-netx/xc.o
arch/arm/mach-netx/xc.c: In function 'request_xc':
arch/arm/mach-netx/xc.c:192: error: 'struct kobject' has no member named 'name'
arch/arm/mach-netx/xc.c:196: error: 'struct kobject' has no member named 'name'
arch/arm/mach-netx/xc.c:200: error: 'struct kobject' has no member named 'name'

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-10-31 15:21:37 +00:00
Russell King b23e79fd87 [ARM] Fix omap_h2_1610_defconfig regressions
Fix:

arch/arm/mach-omap1/built-in.o: In function `h2_init':
board-h2.c:(.init.text+0xbb4): undefined reference to `i2c_register_board_info'

Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-10-31 15:21:34 +00:00
Paul Mundt c81134b58c sh: Clean up SR.RB Kconfig mess.
CPU_HAS_SR_RB is selected by both CPU_SH3 and CPU_SH4, so having a
dependency and default y on those additionally doesn't make much sense.
The select also has to be special cased for CPUs that don't support
this.

This is also something that has been abused too much as a result
of being user-visible, hence the addition of the select in the first
place. So just kill the user-visibility entirely while we're at it.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-10-31 15:22:45 +09:00
Paul Mundt b2078fa221 sh: Kill off dead ipr_irq_demux().
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-10-31 15:17:03 +09:00
Dirk Hohndel e403149c92 Kbuild/doc: fix links to Documentation files
Fix links to files in Documentation/* in various Kconfig files

Signed-off-by: Dirk Hohndel <hohndel@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-30 14:26:30 -07:00
Linus Torvalds e58b7dab27 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 incorrect return value from ia64_setup_msi_irq()
  [IA64] arch/ia64/sn/kernel/mca.c: undo lock when sn_oemdata can't be extended
  [IA64] update sn2 defconfig to 64kb pages
  [IA64] fix typo in per_cpu_offset
  [IA64] /proc/cpuinfo "physical id" field cleanups
  [IA64] vDSO vs --build-id
  [IA64] check-segrel.lds vs --build-id
  [IA64] vmcore_find_descriptor_size should be in __init
  [IA64] ia64/mm/init.c: fix section mismatches
2007-10-30 12:04:45 -07:00
Kenji Kaneshige 3aff03739c [IA64] Fix incorrect return value from ia64_setup_msi_irq()
Fix the problem that pci_enable_msi() fails on ia64 platform. The cause of
this problem is incorrect return value of ia64_setup_msi_irq(). It must
return 0 on success, instead of irq number.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2007-10-30 09:54:47 -07:00
Linus Torvalds fb7267acfe 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: use a less common define name in BF549
  Blackfin arch: Add missing definitions for BF561
  Blackfin arch: reclaim a few bytes from the end of our init section
  Blackfin arch: fix libata data struct member from irq_type to irq_flags
  Blackfin arch: Do not pollute name space used in linux-2.6.x/sound
  Blackfin arch: Fix bug set correct baud for spi mmc and enable SPI after DMA.
  Blackfin arch: update board defconfig files according to latest information from ADI datasheet
  Blackfin arch: ensure that speculative loads of bad pointers don't cause us to do bad things.
  Blackfin arch: Add missing definitions of BF54x
  Blackfin arch: Fix random crash issue found by Michael.
  Blackfin arch: fix bug: tell users if the kernel is recovering from a fault condition
  Blackfin arch: add support for checking/clearing overruns in generic purpose Timer API
  Blackfin arch: cleanup arch/blackfin/kernel/traps.c handling code.
  Blackfin arch: Apply Bluetchnix vendor patch provided by Harald Krapfenbauer
  Blackfin arch: fix bug BlueTechnix CM-BF537 board config uses wrong IRQ for net2272 driver
  Blackfin arch: fix bug: kernel prints out error message twice
  Blackfin arch: add NFC driver support in BF527-EZKIT board
  Blackfin arch: Added support for HV Sistemas H8606 board
2007-10-30 08:39:20 -07:00
Andi Kleen 4138f08d1c Remove bogus default y for DMAR and NET_DMA
No reason I can think of of making them default y Most people don't have
the hardware and with default y they just pollute lots of configs during
make oldconfig.

Signed-off-by: Andi Kleen <ak@suse.de>
Acked-by: Jeff Garzik <jeff@garzik.org>
Acked-by: "Nelson, Shannon" <shannon.nelson@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-30 08:06:55 -07:00
Paul Mundt b46378bc59 sh: Make SH7750 oprofile compile again.
Converts from the profile notifier to the timer hook. Follows
the generic timer interrupt-based change.

This really wants to be converted to perfmon..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-10-30 18:24:17 +09:00
Paul Mundt 36b13d767a sh: linker script tidying.
Some cleanups to the SH linker script. This reorders some of the
data sections for more optimal placement, general tabification,
and plugging in omitted generic definitions.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-10-30 17:38:03 +09:00
Paul Mundt 69d1ef4caf sh: Move zero page param defs somewhere sensible.
Follows s390 and others.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-10-30 17:32:08 +09:00
Paul Mundt 3f9654f02e sh: Kill off legacy embedded ramdisk section.
When the SH kernel used to support embedding a ramdisk in the
pre-initramfs days it was placed in a special section and made to
look like a regular initrd. Since that was removed ages ago, kill
off the remaining cruft that was missed.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-10-30 17:25:29 +09:00
Paul Mundt 7e5186eaae sh: Fix up early mem cmdline parsing.
memory_end was being clobbered by whatever the kernel config had
specified, rather than obeying the setup option. Fix this up so
that memory_end is only initialized if nothing has been set on
the command line.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-10-30 17:18:08 +09:00
Yoshihiro Shimoda 16f393df49 sh: Enable USBF on MS7722SE.
Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-10-30 13:05:51 +09:00
Yoshihiro Shimoda 262feaa08e sh: Add resource of USBF for SH7722.
Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-10-30 13:05:31 +09:00
Mike Frysinger 36208059c1 Blackfin arch: reclaim a few bytes from the end of our init section
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-10-30 12:00:02 +08:00
Mike Frysinger 64e5c51291 Blackfin arch: fix libata data struct member from irq_type to irq_flags
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-10-30 11:56:13 +08:00
Sonic Zhang 111cf97d2c Blackfin arch: Fix bug set correct baud for spi mmc and enable SPI after DMA.
Changes:

1. The baud for spi mmc defined in board file is not used by the old
spi driver. A slower value from spi framework is used instead. In latest
bug fixing, the correct baud is use which is too high for spi MMC card.

2. SPI is enabled only after DMA is started.

3. MMC detection IRQ is set to 55.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-10-30 11:48:42 +08:00
Bryan Wu 0355893e77 Blackfin arch: update board defconfig files according to latest information from ADI datasheet
Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-10-30 11:39:47 +08:00
Manuel Lauss 4d2718d00d sh: fix zImage build with >=binutils-2.18
Starting with binutils somewhere around 2.17.50.14 the vmlinux file
contains a ".note.gnu.build-id" section which doesn't get removed when
the zImage is built; resulting in a 2GB intermediate file and a broken
zImage.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-10-30 09:54:12 +09:00
Alejandro Martinez Ruiz 767f0d6867 sh: ARRAY_SIZE() cleanup
I'm converting most array size calculations under arch/ to use the
ARRAY_SIZE() macro. This is the (tiny) patch for sh.

Signed-off-by: Alejandro Martinez Ruiz <alex@flawedcode.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-10-30 08:44:13 +09:00
Adrian McMenamin ad07b1001e sh: Clean up Kconfig entry for Dreamcast.
Remove reference to out of date/rotting websites.

Signed-off-by: Adrian McMenamin <adrian@mcmen.demon.co.uk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-10-30 08:44:12 +09:00
Magnus Damm c6f93a340f sh: add support for ax88796 and 93cx6 to highlander boards
This patch adds support for the ax88796 driver on highlander boards.

Implemented using the 93cx6 EEPROM support introduced by commit-id
89e536a190.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-10-30 08:44:12 +09:00
Adrian Bunk 076e21a014 remove the dead X86_REMOTE_DEBUG option
This patch removes the dead X86_REMOTE_DEBUG option.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-30 00:22:22 +01:00
Adrian Bunk 1b8a8e95f9 x86: merge EARLY_PRINTK options
This patch merges the x86_64 EARLY_PRINTK option into the i386 one.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-30 00:22:22 +01:00
Adrian Bunk fb8c177fe0 x86: mm/discontig_32.c: make code static
node0_bdata and paddr_to_nid() can become static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-30 00:22:22 +01:00
Adrian Bunk f1aa14b2e9 x86: kernel/setup_32.c: unexport machine_id
This patch removes the unused EXPORT_SYMBOL(machine_id).

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-30 00:22:22 +01:00
Joerg Roedel 0440d4c00d x86 gart: rename symbols only used for the GART implementation
This patch renames the 4 symbols iommu_hole_init(), iommu_aperture,
iommu_aperture_allowed, iommu_aperture_disabled. All these symbols are only
used for the GART implementation of IOMMUs.

It adds and additional gart_ prefix to them.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-30 00:22:22 +01:00
Joerg Roedel 79da087441 x86 gart: make some variables and functions static
This patch makes some functions and variables static in pci-gart_64.c which are
not used somewhere else.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Acked-by: Muli Ben-Yehuda <muli@il.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-30 00:22:22 +01:00
Joerg Roedel 966396d3a0 x86 gart: rename CONFIG_IOMMU to CONFIG_GART_IOMMU
This patch renames the IOMMU config option to GART_IOMMU because in fact it
means the GART and not general support for an IOMMU on x86.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Acked-by: Muli Ben-Yehuda <muli@il.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-30 00:22:22 +01:00
Joerg Roedel 395624fcdd x86 gart: rename iommu.h to gart.h
This patch renames the include file asm-x86/iommu.h to asm-x86/gart.h to make
clear to which IOMMU implementation it belongs. The patch also adds "GART" to
the Kconfig line.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Acked-by: Muli Ben-Yehuda <muli@il.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-30 00:22:22 +01:00
H. Peter Anvin e1054b39b2 x86: additional CPUID strings; fix strings for AMD-ecx
Additional CPUID strings (sse4_1, sse4_2, sse5, skinit, wdt); fix the
positioning of the AMD ecx strings (cr8_legacy was duplicated under
two different names, so the alignment of all the other strings were
off by one.)

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-10-30 00:22:22 +01:00
Roel Kluin 41f667f213 [IA64] arch/ia64/sn/kernel/mca.c: undo lock when sn_oemdata can't be extended
Clean up locking state in failure path.

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Cc: Jes Sorensen <jes@trained-monkey.org>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2007-10-29 14:32:30 -07:00
Linus Torvalds 82798a17ad Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (34 commits)
  [MIPS] tb0219: Update copyright message.
  [MIPS] MT: Fix bug in multithreaded kernels.
  [MIPS] Alchemy: Remove CONFIG_TS_AU1X00_ADS7846 from defconfigs.
  Author: Ralf Baechle <ralf@linux-mips.org>
  [MIPS] sb1250: Enable GenBus IDE in defconfig.
  [MIPS] vmlinux.ld.S: correctly indent .data section
  [MIPS] c-r3k: Implement flush_cache_range()
  [MIPS] Store sign-extend register values for PTRACE_GETREGS
  [MIPS] Alchemy: Register platform devices
  [MIPS] Add len and addr validation for MAP_FIXED mappings.
  [MIPS] IRIX: Fix off-by-one error in signal compat code.
  [MIPS] time: Replace plat_timer_setup with modern APIs.
  [MIPS] time: Fix cut'n'paste bug in Sibyte clockevent driver.
  [MIPS] time: Make c0_compare_int_usable faster
  [MIPS] time: Fix cevt-r4k.c for 64-bit kernel
  [MIPS] Sibyte: Delete {sb1250,bcm1480}_steal_irq().
  [MIPS] txx9tmr clockevent/clocksource driver
  [MIPS] Add mips_hpt_frequency check to mips_clockevent_init().
  [MIPS] IP32: Fixes after interrupt renumbering.
  [MIPS] IP27: Fix slice logic to work for arbitrary number of slices.
  ...
2007-10-29 14:06:55 -07:00
Linus Torvalds 6a22c57b8d Revert "x86_64: allocate sparsemem memmap above 4G"
This reverts commit 2e1c49db4c.

First off, testing in Fedora has shown it to cause boot failures,
bisected down by Martin Ebourne, and reported by Dave Jobes.  So the
commit will likely be reverted in the 2.6.23 stable kernels.

Secondly, in the 2.6.24 model, x86-64 has now grown support for
SPARSEMEM_VMEMMAP, which disables the relevant code anyway, so while the
bug is not visible any more, it's become invisible due to the code just
being irrelevant and no longer enabled on the only architecture that
this ever affected.

Reported-by: Dave Jones <davej@redhat.com>
Tested-by: Martin Ebourne <fedora@ebourne.me.uk>
Cc: Zou Nan hai <nanhai.zou@intel.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-29 14:05:37 -07:00
Ralf Baechle 1a3b7920fe [MIPS] tb0219: Update copyright message.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-10-29 19:35:37 +00:00
Ralf Baechle a76ab5c10d [MIPS] MT: Fix bug in multithreaded kernels.
When GDB writes a breakpoint into address area of inferior process the
kernel needs to invalidate the modified memory in the inferior which
is done by calling flush_cache_page which in turns calls
r4k_flush_cache_page and local_r4k_flush_cache_page for VSMP or SMTC
kernel via r4k_on_each_cpu().

As the VSMP and SMTC SMP kernels for 34K are running on a single shared
caches it is possible to get away without interprocessor function calls.
This optimization is implemented in r4k_on_each_cpu, so
local_r4k_flush_cache_page is only ever called on the local CPU.

This is where the following code in local_r4k_flush_cache_page() strikes:

        /*
         * If ownes no valid ASID yet, cannot possibly have gotten
         * this page into the cache.
         */
        if (cpu_context(smp_processor_id(), mm) == 0)
                return;

On VSMP and SMTC had a function of cpu_context() for each CPU(TC).

So in case another CPU than the CPU executing local_r4k_cache_flush_page
has not accessed the mm but one of the other CPUs has there may be data
to be flushed in the cache yet local_r4k_cache_flush_page will falsely
return leaving the I-cache inconsistent for the breakpoint.

While the issue was discovered with GDB it also exists in
local_r4k_flush_cache_range() and local_r4k_flush_cache().

Fixed by introducing a new function has_valid_asid which on MT kernels
returns true if a mm is active on any processor in the system.

This is relativly expensive since for memory acccesses in that loop
cache misses have to be assumed but it seems the most viable solution
for 2.6.23 and older -stable kernels.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-10-29 19:35:37 +00:00
Ralf Baechle a370605594 [MIPS] Alchemy: Remove CONFIG_TS_AU1X00_ADS7846 from defconfigs.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-10-29 19:35:37 +00:00
Ralf Baechle 1553f6a2ca Author: Ralf Baechle <ralf@linux-mips.org>
[MIPS] MSP71xx: Fix bitrot.
    
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-10-29 19:35:37 +00:00
Maciej W. Rozycki d9ba26a93a [MIPS] sb1250: Enable GenBus IDE in defconfig.
Enable the onboard GenBus IDE interface in the default configuration.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-10-29 19:35:37 +00:00
Franck Bui-Huu 16be243589 [MIPS] vmlinux.ld.S: correctly indent .data section
Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-10-29 19:35:37 +00:00
Maciej W. Rozycki 21b2aecaae [MIPS] c-r3k: Implement flush_cache_range()
Contrary to the belief of some, the R3000 and related processors did have
caches, both a data and an instruction cache.  Here is an implementation
of r3k_flush_cache_page(), which is the processor-specific back-end for
flush_cache_range(), done according to the spec in
Documentation/cachetlb.txt.

While at it, remove an unused local function: get_phys_page(), do some
trivial formatting fixes and modernise debugging facilities.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-10-29 19:35:36 +00:00
Atsushi Nemoto 62b14c24b1 [MIPS] Store sign-extend register values for PTRACE_GETREGS
A comment on ptrace_getregs() states "Registers are sign extended to
fill the available space." but it is not true.  Fix code to match the
comment.  Also fix casts on each caller to get rid of some warnings.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-10-29 19:35:36 +00:00
Florian Fainelli 26c288f82c [MIPS] Alchemy: Register platform devices
This patch separates the platform devices registration for the MTX-1
specific devices: GPIO leds and watchdog.

[Minor fixup and formatting change -- Ralf]

Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-10-29 19:35:36 +00:00
David Daney 098362e720 [MIPS] Add len and addr validation for MAP_FIXED mappings.
Mmap with MAP_FIXED was not validating the addr and len parameters.  This
leads to the failure of GCC's gcc.c-torture/execute/loop-2[fg].c testcases
when using the o32 ABI on a 64 bit kernel.

These testcases try to mmap 65536 bytes at 0x7fff8000 and then access all
the memory.  In 2.6.18 and 2.6.23.1 (and likely other versions as well)
the kernel maps the requested memory, but since half of it is above
0x80000000 a SIGBUS is generated when it is accessed.

This patch moves the len validation above the MAP_FIXED processing so that
it is always validated.  It also adds validation to the addr parameter for
MAP_FIXED mappings.

Signed-off-by: David Daney  <ddaney@avtrex.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-10-29 19:35:36 +00:00
Ralf Baechle c4e8308c30 [MIPS] IRIX: Fix off-by-one error in signal compat code.
Based on original patch by Roel Kluin <12o3l@tiscali.nl>.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-10-29 19:35:36 +00:00
Ralf Baechle 38760d40ca [MIPS] time: Replace plat_timer_setup with modern APIs.
plat_timer_setup is no longer getting called.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-10-29 19:35:36 +00:00
Ralf Baechle 1238d5d868 [MIPS] time: Fix cut'n'paste bug in Sibyte clockevent driver.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-10-29 19:35:36 +00:00
Atsushi Nemoto 3a6c43a787 [MIPS] time: Make c0_compare_int_usable faster
Try increasingly longer time periods starting of at 0x10 cycles.  This
should be fast on hardware and work nicely with emulators.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-10-29 19:35:35 +00:00
Atsushi Nemoto c637fecb4f [MIPS] time: Fix cevt-r4k.c for 64-bit kernel
The expression "(long)(read_c0_count() - cnt)" can never be a negative
value on 64-bit kernel.  Cast to "int" before comparison.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-10-29 19:35:35 +00:00
Ralf Baechle 11ca25aa31 [MIPS] Sibyte: Delete {sb1250,bcm1480}_steal_irq().
They break the timer interrupt initialization and only seem to be a kludge
for initialization happening in the wrong order.  Further testing done by
Thiemo confirms the suspicion that the other invocations also seem to have
useless.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-10-29 19:35:35 +00:00
Atsushi Nemoto 229f773ef4 [MIPS] txx9tmr clockevent/clocksource driver
Convert jmr3927_clock_event_device to more generic
txx9tmr_clock_event_device which supports one-shot mode.  The
txx9tmr_clock_event_device can be used for TX49 too if the cp0 timer
interrupt was not available.

Convert jmr3927_hpt_read to txx9_clocksource driver which does not
depends jiffies anymore.  The txx9_clocksource itself can be used for
TX49, but normally TX49 uses higher precision clocksource_mips.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-10-29 19:35:35 +00:00
Yoichi Yuasa 22df3f53e3 [MIPS] Add mips_hpt_frequency check to mips_clockevent_init().
Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-10-29 19:35:35 +00:00
Ralf Baechle 8a13ecd7b2 [MIPS] IP32: Fixes after interrupt renumbering.
And general untangling.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-10-29 19:35:35 +00:00
Ralf Baechle 725d7b36c3 [MIPS] IP27: Fix slice logic to work for arbitrary number of slices.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-10-29 19:35:35 +00:00
Ralf Baechle 84953b39f9 [MIPS] SNI: Convert a20r timer to clockevent device.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-10-29 19:35:34 +00:00
Ralf Baechle e0511f7524 [MIPS] time: Merge eXcite plat_timer_setup into plat_time_init.
Fixme: At the time of this writing cevt-r4k.c doesn't yet know about how
to handle the alternate timer interrupt of the RM9000.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-10-29 19:35:34 +00:00
Ralf Baechle ba5eac515f [MIPS] time: Merge lasat plat_timer_setup into plat_time_init.
Since the cp0 compare interrupt handler isn't initialized by the time
plat_time_init is called don't set IE_IRQ5 anymore, cevt-r4k.c will do
that a little later itself.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-10-29 19:35:34 +00:00
Ralf Baechle da349bef97 [MIPS] time: Remove wrppmc's definition of plat_timer_setup.
The only thing it used to do is now done by cevt-r4k.c.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-10-29 19:35:34 +00:00
Ralf Baechle 656db5061d [MIPS] time: Cause platform definitions of plat_timer_setup to cause error.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-10-29 19:35:34 +00:00
Ralf Baechle bc2f2a24d9 [MIPS] Alchemy: Convert from plat_timer_setup to plat_time_init.
The old plat_timer_setup hook is no longer getting called so the Alchemy
time initialization was getting skipped.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-10-29 19:35:33 +00:00
Ralf Baechle 8292366341 [MIPS] vpe: Use p_paddr instead of p_vaddr loader.
This subtle difference makes ELF overlays work.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-10-29 19:35:33 +00:00
Ralf Baechle 6e86b0bf0b [MIPS] Cleanup random difference between the lmo and kernel.org tree.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-10-29 19:35:33 +00:00
Yoichi Yuasa 11c03a6faa [MIPS] time: set clock before clockevent_delta2ns() in GT641xx.
clockevent_delta2ns() use the shift and mult value, so
clockevent_set_clock() should be called first.
Pointed out by Atsushi Nemoto.

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-10-29 19:35:33 +00:00
Yoichi Yuasa c984c87826 [MIPS] time: Use non-interrupt locks in GT641xx clockevent driver
set_next_event() and set_mode() are always called with interrupt disabled.
irqsave and irqrestore are not necessary for spinlock.
Pointed out by Atsushi Nemoto.

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-10-29 19:35:33 +00:00
Ralf Baechle 2c771a4c28 [MIPS] Alchemy: micro-optimizatize time code.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-10-29 19:35:32 +00:00
Ralf Baechle 310a09d850 [MIPS] Alchemy: Nuke homebrew setup_irq(), it's broken and unnecessary.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-10-29 19:35:32 +00:00
Kevin D. Kissell be5f1f2114 [MIPS] SMTC: Allow control over TC assignment to vpe0.
Modify the SMTC initialization code to allow boot-time specification not
only of how many VPEs and TCs to use, but also how many TCs out of the
allowed pool are to be bound to VPE 0.  The new boot option is "vpe0tcs=N",
where N is an integer.  Using it in combination with the existing options
allows arbitrary assignments across the 2 VPEs of a 34K.  e.g. "maxtcs=3
 vpe0tcs=1" forces VPE0 to have 1 TC, while VPE1 has 2, and "maxtcs=4
vpe0tcs=3" forces VPE0 to have 3 TCs, while VPE1 gets 1.  If no vpe0tcs
option is specified, the traditional algorithm of evenly dividing TCs
between available VPEs, with the odd "slop" going to VPE0, is retained.

The reason for doing this is to allow a finer balancing of TCs which can
handle I/O interrupts on Malta (those on VPE 0) and those which cannot.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-10-29 19:35:32 +00:00
Jes Sorensen 346f3799c7 [IA64] update sn2 defconfig to 64kb pages
Update sn2_defconfig to select 64KB page size, as well as include new
config options.

Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2007-10-29 11:32:42 -07:00
Alex Chiang 113134fcbc [IA64] /proc/cpuinfo "physical id" field cleanups
Clean up the process for presenting the "physical id" field in
/proc/cpuinfo.

	- remove global smp_num_cpucores, as it is mostly useless

	- remove check_for_logical_procs(), since we do the same
	  functionality in identify_siblings()

	- reflow logic in identify_siblings(). If an older CPU
	  does not implement PAL_LOGICAL_TO_PHYSICAL, we may still
	  be able to get useful information from SAL_PHYSICAL_ID_INFO

	- in identify_siblings(), threads/cores are a property of
	  the CPU, not the platform

	- remove useless printk's about multi-core / thread
	  capability in identify_siblings(), as that information
	  is readily available in /proc/cpuinfo, and printing for
	  the BSP only adds little value

	- smp_num_siblings is now meaningful if any CPU in the
	  system supports threads, not just the BSP

	- expose "physical id" field, even on CPUs that are not
	  multi-core / multi-threaded (as long as we have a valid
	  value). Now we know what sockets Madisons live in too.

Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2007-10-29 11:14:54 -07:00
Roland McGrath 172c510684 [IA64] vDSO vs --build-id
When gcc uses --build-id by default, the gate.lds.S linker script runs afoul
of the new note section and produces a bad DSO image.  This fixes it.

Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2007-10-29 10:54:33 -07:00
Roland McGrath d650c37b2f [IA64] check-segrel.lds vs --build-id
Some versions of ld with --build-id support will crash when using the flag
with a linker script that discards notes.  This bites ia64's check-segrel.lds.
The bug is easy to avoid.

Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2007-10-29 10:53:04 -07:00
Simon Horman 1775fe8516 [IA64] vmcore_find_descriptor_size should be in __init
vmcore_find_descriptor_size() is only called by
reserve_elfcorehdr(), which is in __init, so it seems to me that
vmcore_find_descriptor_size() should be there too.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2007-10-29 10:43:29 -07:00
Adrian Bunk 18b8befd37 [IA64] ia64/mm/init.c: fix section mismatches
This patch fixes the following section mismatches:

<--  snip  -->

...
WARNING: vmlinux.o(.text+0x5b5c2): Section mismatch: reference to .init.text:memmap_init_zone (between 'memmap_init' and 'virtual_memmap_init')
WARNING: vmlinux.o(.text+0x5b842): Section mismatch: reference to .init.text:memmap_init_zone (between 'virtual_memmap_init' and 'ia64_mmu_init')
...

<--  snip  -->

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2007-10-29 10:42:35 -07:00
Linus Torvalds 20dc9f01a8 Merge branch 'sg' of git://git.kernel.dk/linux-2.6-block
* 'sg' of git://git.kernel.dk/linux-2.6-block:
  Correction of "Update drivers to use sg helpers" patch for IMXMMC driver
  sg_init_table() should use unsigned loop index variable
  sg_last() should use unsigned loop index variable
  Initialise scatter/gather list in sg driver
  Initialise scatter/gather list in ata_sg_setup
  x86: fix pci-gart failure handling
  SG: s390-scsi: missing size parameter in zfcp_address_to_sg()
  SG: clear termination bit in sg_chain()
2007-10-29 07:49:10 -07:00
Al Viro b4a08a10b1 misc uml annotation and section fixes
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-29 07:41:32 -07:00
Al Viro 7a78a17223 more x86 merge fallout (uml, again)
arch/i386/{Kconfig,Makefile}.cpu got moved

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-29 07:41:32 -07:00
Al Viro ca5cd877ae x86 merge fallout: uml
Don't undef __i386__/__x86_64__ in uml anymore, make sure that (few) places
that required adjusting the ifdefs got those.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-29 07:41:32 -07:00
Robin Getz 9f336a5326 Blackfin arch: ensure that speculative loads of bad pointers don't cause us to do bad things.
Fix/change formatting of a few more things.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-10-29 18:23:28 +08:00
Robin Getz aa770aa790 Blackfin arch: Fix random crash issue found by Michael.
This is fixes a problem where we could jump to the wrong address. By
doing a "p0 = reti; jump (p0)". If a different, higher level interrupt
came in, just before, rather than returning to the calling function, we
would return to a random place in the kernel.

This very elegant fix from Bernd grabs the return location off the
stack, and places it into P0, so when we do a return, it goes to the
correct place.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-10-29 18:14:15 +08:00
Robin Getz 7728ec33fa Blackfin arch: fix bug: tell users if the kernel is recovering from a fault condition
Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-10-29 18:12:15 +08:00
Mike Frysinger 4ad1ec7154 Blackfin arch: add support for checking/clearing overruns in generic purpose Timer API
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-10-29 18:02:09 +08:00
Robin Getz 226eb1ef52 Blackfin arch: cleanup arch/blackfin/kernel/traps.c handling code.
- move the CONFIG_KGDB into one block, for easier reading
 - remove printk from printk_address, and pass around buffers. Also
   print out the labels when decoding CPLB errors, so you know exactly
   where the error was.
 - Do not use fixed addresses, becuase people do not know where they come from.
 - Turn the printing level down on the dump, so if you don't want,
   only the signal prints out - just like on other archs. If a kernel/interrupt
   crashes, it should dump everything all the time

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-10-29 17:59:07 +08:00
Michael Hennerich a15c2dcff2 Blackfin arch: Apply Bluetchnix vendor patch provided by Harald Krapfenbauer
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-10-29 17:31:18 +08:00
Michael Hennerich 8ecc73687b Blackfin arch: fix bug BlueTechnix CM-BF537 board config uses wrong IRQ for net2272 driver
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-10-29 17:24:23 +08:00
Robin Getz 885be03b06 Blackfin arch: fix bug: kernel prints out error message twice
This fixes two things:
 - stop calling write_lock_irq/write_unlock_irq which can turn modify
   irq levels
 - don't calling mmput when handing exceptions - since this might_sleep,
   which does a rti, and leaves us in kernel space (irq15, rather
   than irq5).

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-10-29 17:20:41 +08:00
Michael Hennerich 64307f7db3 Blackfin arch: add NFC driver support in BF527-EZKIT board
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-10-29 16:55:18 +08:00
FUJITA Tomonori 5336940dd8 x86: fix pci-gart failure handling
blk_rq_map_sg doesn't initialize sg->dma_address/length to zero
anymore. Some low level drivers reuse sg lists without initializing so
IOMMUs might get non-zero dma_address/length. If map_sg fails, we need
pass the number of the mapped entries to gart_unmap_sg.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-29 09:18:03 +01:00
Javier Herrero ab472a0484 Blackfin arch: Added support for HV Sistemas H8606 board
Signed-off-by: Javier Herrero <jherrero@hvsistemas.es>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-10-29 16:14:44 +08:00
Benjamin Herrenschmidt f6ab0b922c [POWERPC] powerpc: Fix demotion of segments to 4K pages
When demoting a process to use 4K HW pages (instead of 64K), which
happens under various circumstances such as doing cache inhibited
mappings on machines that do not support 64K CI pages, the assembly
hash code calls back into the C function flush_hash_page().  This
function prototype was recently changed to accomodate for 1T segments
but the assembly call site was not updated, causing applications that
do demotion to hang.  In addition, when updating the per-CPU PACA for
the new sizes, we didn't properly update the slice "map", thus causing
the SLB miss code to re-insert segments for the wrong size.

This fixes both and adds a warning comment next to the C
implementation to try to avoid problems next time someone changes it.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-10-29 14:34:14 +11:00
Linus Torvalds 6e1b97d899 Merge git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86
* git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86:
  x86: Dump filtering supports x86_64 sparsemem
  x86: fix compiler warnings in arch/x86/kernel/early-quirks.c
  x86: fix !SMP compiler warning in arch/x86/kernel/acpi/processor.c
  x86: Fix boot protocol KEEP_SEGMENTS check.
  x86: voyager: fix bogus conversion to per_cpu for boot_cpu_info
  x86: export smp_ops to allow modular build of KVM
  Revert "i386: export i386 smp_call_function_mask() to modules"
2007-10-27 22:18:55 -07:00
Al Viro 9e6a76b8bb scatterlist fallout: frv
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-27 22:18:11 -07:00
Ken'ichi Ohmichi 69243f9125 x86: Dump filtering supports x86_64 sparsemem
This patch adds the symbol "init_level4_pgt" to the vmcoreinfo data so
that makedumpfile (dump filtering command) supports x86_64 sparsemem 
kernel of linux-2.6.24.

makedumpfile creates a small dumpfile by excluding unnecessary pages for
the analysis. It checks attributes in page structures and distinguishes
necessary pages and unnecessary ones. To check them, makedumpfile gets
the vmcoreinfo data which has the minimum debugging information only for
dump filtering.

For older x86_64 kernel (linux-2.6.23 or before), makedumpfile translates
the virtual address of page structure into physical address by subtracting
PAGE_OFFSET from virtual address, but this translation isn't effective for
linux-2.6.24 sparsemem kernel, because its page structures are in virtual
memmap area. makedumpfile should translate their virtual address by 4-levels
paging and it needs the symbol "init_level4_pgt".

Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-27 20:57:43 +02:00
Jeff Garzik 03d0d20e64 x86: fix compiler warnings in arch/x86/kernel/early-quirks.c
fix this warning:

arch/x86/kernel/early-quirks.c:40: warning: nvidia_hpet_check defined but not used

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-27 20:57:43 +02:00
Jeff Garzik 74a3d2d331 x86: fix !SMP compiler warning in arch/x86/kernel/acpi/processor.c
Fix !CONFIG_SMP warning:

arch/x86/kernel/acpi/processor.c: In function arch_acpi_processor_init_pdc:
arch/x86/kernel/acpi/processor.c:65: warning: unused variable cpu

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-27 20:57:43 +02:00
Eric W. Biederman bd53147db8 x86: Fix boot protocol KEEP_SEGMENTS check.
The kernel only ever supports 1 version of the boot protocol
so there is no need to check the boot protocol revision to
see if a feature is supported.

Both x86 and x86_64 support the same boot protocol so we need
to implement the KEEP_SEGMENTS on x86_64 as well.  It isn't
just paravirt bootloaders that could use this functionality.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Vivek Goyal <vgoyal@in.ibm.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Zachary Amsden <zach@vmware.com>
Cc: Andi Kleen <ak@suse.de>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-27 20:57:43 +02:00
James Bottomley 0cca1ca647 x86: voyager: fix bogus conversion to per_cpu for boot_cpu_info
There were two problems.  Firstly, someone forgot the struct keyword in
front of cpuinfo_x86, so I take it this wasn't even compile checked.
Secondly, the actual definition has this as a SHARED_ALIGNED, so the
definitions mismatch.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-27 20:57:43 +02:00
Thomas Gleixner 027447c491 x86: export smp_ops to allow modular build of KVM
KVM uses smp_call_function_mask and therefor need smp_ops to be exported.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-10-27 20:57:43 +02:00
Thomas Gleixner ceff8d859c Revert "i386: export i386 smp_call_function_mask() to modules"
This reverts commit 6442eea937.

The patch breaks smp_ops and needs to be reverted. The solution to
allow modular build of KVM is to export smp_ops instead.

Pointed-out-by: James Bottomley

  <jejb> tglx, so write out 100 times "voyager is a useful architecture" ...
  <tglx> yes, Sir

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-10-27 20:57:43 +02:00
Linus Torvalds a2508c0814 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC32]: Fix build-warning in io-unit.c
  [SPARC64]: Fix BACKOFF_SPIN on non-SMP.
  [SPARC32]: __inline__ --> inline
  [SPARC64]: __inline__ --> inline
2007-10-27 10:11:12 -07:00
David S. Miller 6ee4e28be8 [SPARC32]: Fix build-warning in io-unit.c
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-27 00:54:14 -07:00
David S. Miller 64d329eec0 [SPARC32]: __inline__ --> inline
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-27 00:17:01 -07:00
David S. Miller d979f1792d [SPARC64]: __inline__ --> inline
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-27 00:13:04 -07:00
Linus Torvalds 26adc0d585 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-2.6-x86setup
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-2.6-x86setup:
  x86 setup: sizeof() is unsigned, unbreak comparisons
  x86 setup: handle boot loaders which set up the stack incorrectly
2007-10-26 13:56:01 -07:00
Linus Torvalds 0e4bd10c9b Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/x86
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/x86:
  x86: kill the old i386 and x86_64 directories
  x86: move i386 and x86_64 Kconfig files to x86 directory
  kconfig: small code refactoring in kconfig Makefile
  x86: unification of i386 and x86_64 Kconfig.debug
  x86: move defconfig files for i386 and x86_64 to x86
  x86: move i386 and x86_64 Makefiles to arch/x86
2007-10-26 13:49:29 -07:00
H. Peter Anvin e6e1ace990 x86 setup: sizeof() is unsigned, unbreak comparisons
We use signed values for limit checking since the values can go
negative under certain circumstances.  However, sizeof() is unsigned
and forces the comparison to be unsigned, so move the comparison into
the heap_free() macros so we can ensure it is a signed comparison.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2007-10-25 20:20:06 -07:00
H. Peter Anvin 6b6815c6d5 x86 setup: handle boot loaders which set up the stack incorrectly
Apparently some specific versions of LILO enter the kernel with a
stack pointer that doesn't match the rest of the segments.  Make our
best attempt at untangling the resulting mess.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2007-10-25 19:55:03 -07:00
Linus Torvalds eadd4f5ea1 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC64]: pass correct addr in get_fb_unmapped_area(MAP_FIXED)
2007-10-25 15:50:48 -07:00
Linus Torvalds 22fa8d59be Merge git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86
* git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86:
  x86: fix bogus KERN_ALERT on oops
  x86: lguest build fix
  x86: fix CONFIG_KEXEC build breakage
2007-10-25 15:48:05 -07:00
Linus Torvalds 7f14957453 Merge branch 'sg' of git://git.kernel.dk/linux-2.6-block
* 'sg' of git://git.kernel.dk/linux-2.6-block:
  fix sg_phys to use dma_addr_t
  ub: add sg_init_table for sense and read capacity commands
  x86: pci-gart fix
  blackfin: fix sg fallout
  xtensa: dma-mapping.h is using linux/scatterlist.h functions, so include it
  SG: audit of drivers that use blk_rq_map_sg()
  arch/um/drivers/ubd_kern.c: fix a building error
  SG: Change sg_set_page() to take length and offset argument
  AVR32: Fix sg_page breakage
  mmc: sg fallout
  m68k: sg fallout
  More SG build fixes
  sg: add missing sg_init_table calls to zfcp
  SG build fix
2007-10-25 15:44:54 -07:00
Sam Ravnborg 208652d6b2 x86: kill the old i386 and x86_64 directories
The last remaining bits were two .gitignore files.
Deleting them and the directories are history.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-25 22:43:12 +02:00
Sam Ravnborg 47572387d5 x86: move i386 and x86_64 Kconfig files to x86 directory
After a small change in kconfig Makefile we could
move all x86 Kconfig files to x86 directory.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-25 22:37:02 +02:00
Randy Dunlap d013a27cb7 x86: unification of i386 and x86_64 Kconfig.debug
Adding proper dependencies so the two Kconfig.debug files
are now identical and move the result file to x86.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-25 22:35:10 +02:00
Sam Ravnborg 2266cfd50d x86: move defconfig files for i386 and x86_64 to x86
With some small changes to kconfig makefile we can now
locate the defconfig files for i386 and x86_64 in
the configs/ subdirectory under x86.
make ARCH=i386 defconfig and make defconfig
works as expected also after this change.
But arch maintainers shall now update a defconfig file in
the configs/ directory.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-25 22:27:41 +02:00
Sam Ravnborg 74b469f2e6 x86: move i386 and x86_64 Makefiles to arch/x86
Moving the ARCH specific Makefiles for i386 and x86_64
required a litle bit tweaking in the top-lvel Makefile.

SRCARCH is now set in the top-level Makefile
because we need this info to include the correct
arch Makefile.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-25 22:27:34 +02:00
Peter Zijlstra 143a5d325d lockdep: fixup irq tracing
Ensure we fixup the IRQ state before we hit any locking code.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-10-25 14:01:10 +02:00
FUJITA Tomonori e88a39dee1 x86: pci-gart fix
map_sg could copy the last sg element to another position (if merging
some elements). It breaks sg chaining. This copies only
dma_address/length instead of the whole sg element.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-25 09:13:32 +02:00
Rusty Russell e1e72965ec lguest: documentation update
Went through the documentation doing typo and content fixes.  This
patch contains only comment and whitespace changes.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2007-10-25 15:02:50 +10:00
Jeff Garzik 4cfe6c3c1c lguest: build fix
Fix this error (i386 !SMP build)

arch/x86/lguest/boot.c: In function ‘lguest_init’:
arch/x86/lguest/boot.c:1059: error: ‘pm_power_off’ undeclared (first use in this function)

by including linux/pm.h.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2007-10-25 14:15:09 +10:00
Rusty Russell 25c47bb353 lguest: use defines from x86 headers instead of magic numbers
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2007-10-25 14:09:53 +10:00
Adrian Bunk 82861924a5 blackfin: fix sg fallout
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Jens Axboe <axboe@carl.home.kernel.dk>
2007-10-24 14:09:25 +02:00
WANG Cong 23464ffa47 arch/um/drivers/ubd_kern.c: fix a building error
Fix this uml building error:
arch/um/drivers/ubd_kern.c: In function 'do_ubd_request':
arch/um/drivers/ubd_kern.c:1118: error: implicit declaration of function
'sg_page'
arch/um/drivers/ubd_kern.c:1118: warning: passing argument 6 of
'prepare_request' makes pointer from integer without a cast
make[1]: *** [arch/um/drivers/ubd_kern.o] Error 1
make: *** [arch/um/drivers] Error 2

Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>

Add sg_init_table() call as well.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-24 13:07:11 +02:00
Alexey Dobriyan eec407c9ac x86: fix bogus KERN_ALERT on oops
fix this:

printing eip: f881b9f3 *pdpt = 0000000000003001 <1>*pde = 000000000480a067 *pte = 0000000000000000
						^^^

[ mingo: added KERN_CONT as suggested by Pekka Enberg ]

Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-24 12:58:02 +02:00
Jeff Garzik 230e55adf6 x86: lguest build fix
Fix this error (i386 !SMP build):

arch/x86/lguest/boot.c: In function lguest_init:
arch/x86/lguest/boot.c:1059: error: pm_power_off undeclared (first use in this function)

by including linux/pm.h.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-24 12:58:02 +02:00
Mike Galbraith 1fb473d8f4 x86: fix CONFIG_KEXEC build breakage
X86_32 build fix to commit 62a31a03b3

Signed-off-by: Mike Galbraith <efault@gmx.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-24 12:58:01 +02:00
Geert Uytterhoeven 5a1cb47ff4 m68k: sg fallout
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Jens Axboe <axboe@carl.home.kernel.dk>
2007-10-24 08:55:40 +02:00
David Miller d91c5e8839 More SG build fixes
Signed-off-by: Jens Axboe <axboe@carl.home.kernel.dk>
2007-10-24 08:46:01 +02:00
David Miller 5e2a06489e SG build fix
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jens Axboe <axboe@carl.home.kernel.dk>
2007-10-24 08:44:21 +02:00
Chris Wright d58aa8c7b1 [SPARC64]: pass correct addr in get_fb_unmapped_area(MAP_FIXED)
Looks like the MAP_FIXED case is using the wrong address hint.  I'd
expect the comment "don't mess with it" means pass the request
straight on through, not change the address requested to -ENOMEM.

Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-23 22:42:07 -07:00
Greg Ungerer f386c3ccf6 m68knommu: mark mem init functions as __init
Mark the m68knommu memory init functions as __init.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-23 20:45:44 -07:00
Greg Ungerer 1d2842e05a m68knommu: mark setup_arch() as __init
Mark the m68knommu setup_arch() function as __init.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-23 20:45:44 -07:00
Greg Ungerer 65fde4c6df m68knommu: cleanup 68VZ328 init code
Removed header includes not needed.
Remove use of old m68knommu timer function pointers.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-23 20:45:44 -07:00
Greg Ungerer f1353707b7 m68knommu: cleanup 68EZ328 init code
Clean up 68EZ328 timer support code. Removed header includes not needed.
Remove use of old m68knommu timer function pointers.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-23 20:45:44 -07:00
Greg Ungerer 7e6a3d402c m68knommu: cleanup 68360 startup code
Clean up 68360 timer support code. Removed header includes not needed.
Remove use of old m68knommu timer function pointers. Use common function
naming for 68328 timer functions.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-23 20:45:44 -07:00
Greg Ungerer 846757162d m68knommu: cleanup 68328 timer code
Use common function naming for 68328 timer functions to make them
consistent with the various other hardware m68knommu timers.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-23 20:45:44 -07:00
Greg Ungerer 0e298ebec4 m68knommu: cleanup 68328 init code
Clean up 68328 timer support code. Removed header includes not needed.
Remove use of old m68knommu timer function pointers.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-23 20:45:44 -07:00
Greg Ungerer 33d56bc4bf m68knommu: remove unused variables in setup.c
Remove unused variables from setup.c code.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-23 20:45:44 -07:00
Linus Torvalds 25c263542d Merge branch 'irq-upstream' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6
* 'irq-upstream' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6:
  [SPARC, XEN, NET/CXGB3] use irq_handler_t where appropriate
  drivers/char/riscom8: clean up irq handling
  isdn/sc: irq handler clean
  isdn/act2000: fix major bug. clean irq handler.
  char/pcmcia/synclink_cs: trim trailing whitespace
  drivers/char/ip2: separate polling and irq-driven work entry points
  drivers/char/ip2: split out irq core logic into separate function
  [NETDRVR] lib82596, netxen: delete pointless tests from irq handler
  Eliminate pointless casts from void* in a few driver irq handlers.
  [PARPORT] Remove unused 'irq' argument from parport irq functions
  [PARPORT] Kill useful 'irq' arg from parport_{generic_irq,ieee1284_interrupt}
  [PARPORT] Consolidate code copies into a single generic irq handler
2007-10-23 18:57:39 -07:00
Jeff Garzik 7c2399756a [SPARC, XEN, NET/CXGB3] use irq_handler_t where appropriate
Rather than hand-rolling our own prototype, make the code more
future-proof by using the standard irq_handler_t typedef.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2007-10-23 19:53:17 -04:00
Linus Torvalds a7aed1c2dc Merge ssh://master.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86
* ssh://master.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86: (35 commits)
  x86: Add HPET force support for MCP55 (nForce 5) chipsets
  x86: Force enable HPET for CK804 (nForce 4) chipsets
  x86: clean up setup.h and the boot code
  x86: Save registers in saved_context during suspend and hibernation
  x86: merge setup_32/64.h
  x86: merge signal_32/64.h
  x86: merge required-features.h
  x86: merge sigcontext_32/64.h
  x86: merge msr_32/64.h
  x86: merge mttr_32/64.h
  x86: merge statfs_32/64.h
  x86: merge stat_32/64.h
  x86: merge shmbuf_32/64.h
  x86: merge ptrace_32/64.h
  x86: merge msgbuf_32/64.h
  x86: merge elf_32/64.h
  x86: merge byteorder_32/64.h
  x86: whitespace cleanup of mce_64.c
  x86: consolidate the cpu/ related code usage
  x86: prepare consolidation of cpu/ related code usage
  ...
2007-10-23 16:38:03 -07:00
Linus Torvalds 1212663fba Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (39 commits)
  [SCSI] qla2xxx: Update version number to 8.02.00-k5.
  [SCSI] qla2xxx: Correct display of ISP serial-number.
  [SCSI] qla2xxx: Correct residual-count handling discrepancies during UNDERRUN handling.
  [SCSI] qla2xxx: Make driver (mostly) legacy I/O port free.
  [SCSI] qla2xxx: Fix issue where final flash-segment updates were falling into the slow-path write handler.
  [SCSI] qla2xxx: Handle unaligned sector writes during NVRAM/VPD updates.
  [SCSI] qla2xxx: Defer explicit interrupt-polling processing to init-time scenarios.
  [SCSI] qla2xxx: Resync with latest HBA SSID specification -- 2.2u.
  [SCSI] sym53c8xx: Remove sym_xpt_async_sent_bdr
  [SCSI] sym53c8xx: Remove pci_dev pointer from sym_shcb
  [SCSI] sym53c8xx: Make interrupt handler capable of returning IRQ_NONE
  [SCSI] sym53c8xx: Get rid of IRQ_FMT and IRQ_PRM
  [SCSI] sym53c8xx: Use scmd_printk where appropriate
  [SCSI] sym53c8xx: Simplify DAC DMA handling
  [SCSI] sym53c8xx: Remove tag_ctrl module parameter
  [SCSI] sym53c8xx: Remove io_ws, mmio_ws and ram_ws elements
  [SCSI] sym53c8xx: Remove ->device_id
  [SCSI] sym53c8xx: Use pdev->revision
  [SCSI] sym53c8xx: PCI Error Recovery support
  [SCSI] sym53c8xx: Stop overriding scsi_done
  ...
2007-10-23 16:37:29 -07:00
Linus Torvalds 2024da6039 Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] 4630/1: Fix the vector stride of the double vector instruction.
  [ARM] 4629/1: Fix VFP emulation code to clear all exception flags of FPEXC
  [ARM] 4613/1: pxa300: MFP typo fix
2007-10-23 16:32:11 -07:00
Carlos Corbacho 1b82ba6e47 x86: Add HPET force support for MCP55 (nForce 5) chipsets
Add support to force_hpet for all known MCP55 (nForce 5) chipset
LPC bridges.

These are the untested nForce 5 chips (taken from Mikko's original 
patch, and checked against pci.ids).

Signed-off-by: Carlos Corbacho <cathectic@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

 arch/x86/kernel/quirks.c |   18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
2007-10-23 22:37:25 +02:00
Carlos Corbacho d79a5f80dc x86: Force enable HPET for CK804 (nForce 4) chipsets
This patch adds a quirk from LinuxBIOS to force enable HPET on
the nVidia CK804 (nForce 4) chipset.

This quirk can very likely support more than just nForce 4
(LinuxBIOS use the same code for nForce 5), and possibly nForce 3,
but I don't have those chipsets, so cannot add and test them.

Tested on an Abit KN9 (CK804).

Signed-off-by: Carlos Corbacho <cathectic@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

 Documentation/kernel-parameters.txt |    3 +-
 arch/x86/kernel/quirks.c            |   37 +++++++++++++++++++++++++++++++++++-
 2 files changed, 38 insertions(+), 2 deletions(-)
2007-10-23 22:37:25 +02:00
H. Peter Anvin fa76dab935 x86: clean up setup.h and the boot code
Make <asm/setup.h> usable by the boot code.

Clean up vestiges of the old command-line protocol from setup.h and
head_32.S (it is still supported from the boot loader point of
view, since it is converted to the new command-line protocol by the
boot code.)

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-23 22:37:25 +02:00
Rafael J. Wysocki 0de80bcc2b x86: Save registers in saved_context during suspend and hibernation
During hibernation and suspend on x86_64 save CPU registers in the saved_context
structure rather than in a handful of separate variables.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-23 22:37:24 +02:00
Thomas Gleixner d88203d1ab x86: whitespace cleanup of mce_64.c
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-23 22:37:23 +02:00
Thomas Gleixner 01e11182e7 x86: consolidate the cpu/ related code usage
The x86_64 arch/x86/kernel/Makefile uses references into 
arch/x86/kernel/cpu/... to use code from there.

Unifiy it with the nicely structured i386 way and reuse the existing
subdirectory make rules.

Also move the machine check related source into ...kernel/cpu/mcheck,
where the other machine check related code is.

No code change.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-10-23 22:37:23 +02:00
Thomas Gleixner 3bc258ad87 x86: prepare consolidation of cpu/ related code usage
Move mce.c to mce_32.c to allow the later move of the x86_64 mce.c
from arch/x86/kernel/ to ...kernel/cpu/mcheck

No code change.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-10-23 22:37:23 +02:00
Thomas Gleixner 34d19e29c9 x86: prepare consolidation of cpu/ related Makefiles
Prepare the makefiles in x86/kernel/cpu and x86/kernel/cpu/mcheck to
be used by the x86_64 build as well.

No code change.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-10-23 22:37:23 +02:00
Thomas Gleixner 5e4181b313 x86: Unify arch/x86/kernel/acpi Makefiles
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-10-23 22:37:23 +02:00
Thomas Gleixner 9b58aebc73 x86: merge arch/x86/crypto Makefiles
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-10-23 22:37:23 +02:00
Thomas Gleixner bec2c48c20 x86: Add BITS to allow simple Makefile sharing
Preperatory patch to simplify the sharing of Makefiles in
arch/x86.

Linus came up with this during a discussion about the ugliness of
ifeq($CONFIG_X86_32),y) and obj-$(CONFIG_X86_32) in the shared
Makefiles.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-10-23 22:37:23 +02:00
Hiroshi Shimamoto 62a31a03b3 x86: unify crash_32/64.c
Most of contents in crash are same.

Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-23 22:37:23 +02:00
Hiroshi Shimamoto 9b7711f083 x86: add lapic_shutdown for x86_64
Preperatory patch to allow crash_32/64.c merging

Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-23 22:37:22 +02:00
Alejandro Martinez Ruiz 4d022adab4 x86: ARRAY_SIZE cleanup
Signed-off-by: Alejandro Martinez Ruiz <alex@flawedcode.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-23 22:37:22 +02:00
Dave Johnson 8c66006538 x86: fix more TSC clock source calibration errors
The previous patch wasn't correctly handling the 'count' variable.  If
a CPU gave bad results on the 1st or 2nd run but good results on the
3rd, it wouldn't do the correct thing.  No idea if any such CPU
exists, but the patch below handles that case by discarding the bad
runs.

If a bad result (too quick, or too slow) occurs on any of the 3 runs
it will be discarded.

Also updated some comments to explain what's going on.

Signed-off-by: Dave Johnson <djohnson@sw.starentnetworks.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-23 22:37:22 +02:00
Dave Johnson edaf420fdc x86: fix TSC clock source calibration error
I ran into this problem on a system that was unable to obtain NTP sync
because the clock was running very slow (over 10000ppm slow). ntpd had
declared all of its peers 'reject' with 'peer_dist' reason.

On investigation, the tsc_khz variable was significantly incorrect
causing xtime to run slow.  After a reboot tsc_khz was correct so I
did a reboot test to see how often the problem occurred:

Test was done on a 2000 Mhz Xeon system.  Of 689 reboots, 8 of them
had unacceptable tsc_khz values (>500ppm):

 range of tsc_khz  # of boots  % of boots
 ----------------  ----------  ----------
        < 1999750           0      0.000%
1999750 - 1999800          21      3.048%
1999800 - 1999850         166     24.128%
1999850 - 1999900         241     35.029%
1999900 - 1999950         211     30.669%
1999950 - 2000000          42      6.105%
2000000 - 2000000           0      0.000%
2000050 - 2000100           0      0.000%
                   [...]
2000100 - 2015000           1      0.145%  << BAD
2015000 - 2030000           6      0.872%  << BAD
2030000 - 2045000           1      0.145%  << BAD
2045000 <                   0      0.000%

The worst boot was 2032.577 Mhz, over 1.5% off!

It appears that on rare occasions, mach_countup() is taking longer to
complete than necessary.

I suspect that this is caused by the CPU taking a periodic SMI
interrupt right at the end of the 30ms calibration loop.  This would
cause the loop to delay while the SMI BIOS hander runs. The resulting
TSC value is beyond what it actually should be resulting in a higher
tsc_khz.

The below patch makes native_calculate_cpu_khz() take the best
(shortest duration, lowest khz) run of it's 3 calibration loops.  If a
SMI goes off causing a bad result (long duration, higher khz) it will
be discarded.

With the patch applied, 300 boots of the same system produce good
results:

 range of tsc_khz  # of boots  % of boots
 ----------------  ----------  ----------
        < 1999750           0      0.000%
1999750 - 1999800          30     10.000%
1999800 - 1999850         166     55.333%
1999850 - 1999900          89     29.667%
1999900 - 1999950          15      5.000%
1999950 <                   0      0.000%

Problem was found and tested against 2.6.18.  Patch is against 2.6.22.

Signed-off-by: Dave Johnson <djohnson@sw.starentnetworks.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-23 22:37:22 +02:00
Adrian Bunk ea5806559f x86: add instrumentation menu
It seems commit 09cadedbdc was incomplete 
due to a clash with the x86 architecture merge.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-23 22:37:22 +02:00
Linus Torvalds 0d6810091c Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-lguest
* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-lguest: (45 commits)
  Use "struct boot_params" in example launcher
  Loading bzImage directly.
  Revert lguest magic and use hook in head.S
  Update lguest documentation to reflect the new virtual block device name.
  generalize lgread_u32/lgwrite_u32.
  Example launcher handle guests not being ready for input
  Update example launcher for virtio
  Lguest support for Virtio
  Remove old lguest I/O infrrasructure.
  Remove old lguest bus and drivers.
  Virtio helper routines for a descriptor ringbuffer implementation
  Module autoprobing support for virtio drivers.
  Virtio console driver
  Block driver using virtio.
  Net driver using virtio
  Virtio interface
  Boot with virtual == physical to get closer to native Linux.
  Allow guest to specify syscall vector to use.
  Rename "cr3" to "gpgdir" to avoid x86-specific naming.
  Pagetables to use normal kernel types
  ...
2007-10-23 09:03:07 -07:00
Linus Torvalds e5eca6aef6 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] Add Vitaly Bordug as PPC8xx maintainer
  [POWERPC] 4xx: Enable EMAC on Bamboo board
  [POWERPC] 4xx: Enable EMAC for PPC405 Walnut board
  [POWERPC] 4xx: Fix timebase clock selection on Walnut
  [POWERPC] 4xx: Enable EMAC on the PPC 440GP Ebony board
  [POWERPC] 4xx: Split early debug output and early boot console for 44x
  [POWERPC] 4xx: Enable NEW EMAC support for Sequoia 440EPx.
  [POWERPC] 4xx: Add RGMII support for Sequoia 440EPx
2007-10-23 08:57:35 -07:00
Linus Torvalds f3344c54ce Merge branch 'for-linus' of ssh://master.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/avr32-2.6
* 'for-linus' of ssh://master.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/avr32-2.6:
  [AVR32] ARRAY_SIZE() cleanup
  [AVR32] Implement at32_add_device_cf()
  [AVR32] Implement more at32_add_device_foo() functions
  [AVR32] Fix a couple of sparse warnings
  [AVR32] Wire up AT73C213 sound driver on ATSTK1000 board
  [AVR32] Platform code for pata_at32
2007-10-23 08:55:56 -07:00
Linus Torvalds ba1c28a943 Merge branch 'sg' of git://git.kernel.dk/linux-2.6-block
* 'sg' of git://git.kernel.dk/linux-2.6-block:
  sparc64: zero out dma_length
  fvr32: fixup dma-mapping for new sg layout
  sh/sh64: fixup dma-mapping for new sg layout
  Fix sctp compile
  m68knommu: remove sg_address()
  frv: update comment in scatterlist to reflect new setup
  blackfin: remove sg_address()
  arm: sg fallout
  mips: sg_page() fallout
  alpha: sg_virt() fallout
  intel-iommu: fix sg_page()
  parisc: fix sg_page() fallout
  ide: build fix
  net: fix xfrm build - missing scatterlist.h include
  [BLOCK] blk_rq_map_sg: force clear termination bit
  [BLOCK] Don't clear sg_dma_len/addr() in blk_rq_map_sg()
  s390 zfcp: sg fixups
  powerpc: Fix fallout from sg_page() changes
  IB/ehca: Fix sg_page() fallout
  arm: build fix
2007-10-23 08:53:41 -07:00
Greg Ungerer 2f2c267989 m68knommu: cleanup m68knommu timer code
Reduce the function pointer mess of the m68knommu timer code by calling
directly to the local hardware's timer setup, and expose the local
common timer interrupt handler to the lower level hardware timer.

Ultimately this will save definitions of all these functions across all
the platform code to setup the function pointers (which for any given
m68knommu CPU family member can be only one set of hardware timer
functions).

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-23 08:32:35 -07:00
Greg Ungerer c48f484b9b m68knommu: fix make archclean
Remove build reference to arch/m68knommu/boot directory, it doesn't
exist.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-23 08:32:34 -07:00
Greg Ungerer 293dba4b4a m68knommu: remove use of undefined symbols in setup.c
Remove use of undefined symbols CONFIG_TELOS, CONFIG_M68EZ328ADS
and CONFIG_ALMA_ANS.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-23 08:32:34 -07:00
Greg Ungerer dbf18c8f62 m68knommu: fix syscall restart handling
Fix system call restart handling. We can call directly to the
restart handler, no need to back track through trap that isn't
even implemented on m68knommu.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-23 08:32:07 -07:00
Wilson Callan ada8d218cc m68knommu: add make support for Savant/Rosie1 board
Add make support for the Savant/Rosie1 board.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-23 08:32:07 -07:00
Greg Ungerer 775ecf8714 m68knommu: no separate stack region to report at startup
There is no separate stack region addresses to print at startup time,
so remove it from the debug listing

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-23 08:32:07 -07:00
Wilson Callan c1057c6500 m68knommu: add config support for Savant/Rosie1 board
Add configure support for the Savant/Rosie1 board.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-23 08:32:07 -07:00
Greg Ungerer a65c1ec666 m68knommu: updated defconfig
Updated defconfig with new options for m68knommu.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-23 08:32:07 -07:00
Matt Waddel 151941a800 m68knommu: fix syscall tracing
Fix the system call code for handling syscall tracing, so strace
and gdbserver work properly.

This fix originally developed by Philippe De Muyter and Stuart Hughes.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-23 08:32:07 -07:00
Paul Mackerras 786d3693f4 Merge branch 'for-2.6.24' of master.kernel.org:/pub/scm/linux/kernel/git/jwboyer/powerpc-4xx into merge 2007-10-23 22:20:51 +10:00
FUJITA Tomonori cb92ae8150 sparc64: zero out dma_length
zero out dma_length in the entry immediately following the last mapped
entry for unmap_sg.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-23 12:58:39 +02:00
Jens Axboe 4fcc47a053 mips: sg_page() fallout
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-23 12:32:34 +02:00
Jens Axboe 944bda26fb alpha: sg_virt() fallout
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-23 12:31:05 +02:00
Alejandro Martinez Ruiz 2298a1dd81 [AVR32] ARRAY_SIZE() cleanup
Signed-off-by: Alejandro Martinez Ruiz <alex@flawedcode.org>
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-10-23 11:20:26 +02:00
Haavard Skinnemoen eaf5f925a3 [AVR32] Implement at32_add_device_cf()
Implement at32_add_device_cf() which will add a platform_device for
the at32_cf driver (not merged yet). Separate out most of the
at32_add_device_ide() code and use it to implement
at32_add_device_cf() as well.

This changes the API in the following ways:
  * The board code must initialize data->cs to the chipselect ID to
    use before calling any of these functions.
  * The board code must use GPIO_PIN_NONE to indicate unused CF pins.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-10-23 11:20:05 +02:00
Haavard Skinnemoen 2042c1c4e7 [AVR32] Implement more at32_add_device_foo() functions
Implement functions for adding platform devices for TWI, MCI, AC97C
and ABDAC. They may need to be modified to cope with platform data,
etc. when the corresponding drivers are ready to be merged, but such
changes are much less likely to conflict than adding support for a
whole new type of device.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-10-23 11:19:32 +02:00
Haavard Skinnemoen 86298962c0 [AVR32] Fix a couple of sparse warnings
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-10-23 11:19:24 +02:00
Hans-Christian Egtvedt 1c2f173796 [AVR32] Wire up AT73C213 sound driver on ATSTK1000 board
Signed-off-by: Hans-Christian Egtvedt <hcegtvedt@atmel.com>
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-10-23 11:19:14 +02:00
Kristoffer Nyborg Gregertsen 48021bd93c [AVR32] Platform code for pata_at32
This patch adds platform code for PATA devices on the AP7000.

[hskinnemoen@atmel.com: board code left out for now since stk1000
	doesn't support IDE out of the box]
Signed-off-by: Kristoffer Nyborg Gregertsen <kngregertsen@norway.atmel.com>
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-10-23 11:19:05 +02:00
FUJITA Tomonori b61e8f4844 parisc: fix sg_page() fallout
arch/parisc/kernel/pci-dma.c: In function 'pa11_dma_map_sg':
arch/parisc/kernel/pci-dma.c:487: error: 'struct scatterlist' has no member named 'page'
arch/parisc/kernel/pci-dma.c: In function 'pa11_dma_unmap_sg':
arch/parisc/kernel/pci-dma.c:508: error: 'struct scatterlist' has no member named 'page'
arch/parisc/kernel/pci-dma.c:508: error: 'struct scatterlist' has no member named 'page'
arch/parisc/kernel/pci-dma.c: In function 'pa11_dma_sync_sg_for_cpu':
arch/parisc/kernel/pci-dma.c:535: error: 'struct scatterlist' has no member named 'page'
arch/parisc/kernel/pci-dma.c:535: error: 'struct scatterlist' has no member named 'page'
arch/parisc/kernel/pci-dma.c: In function 'pa11_dma_sync_sg_for_device':
arch/parisc/kernel/pci-dma.c:545: error: 'struct scatterlist' has no member named 'page'
arch/parisc/kernel/pci-dma.c:545: error: 'struct scatterlist' has no member named 'page'

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-23 09:49:31 +02:00
FUJITA Tomonori 9f2326be52 arm: build fix
arch/arm/common/dmabounce.c: In function 'dma_map_sg':
arch/arm/common/dmabounce.c:445: error: implicit declaration of function 'sg_page'

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-23 09:11:41 +02:00
Rusty Russell 814a0e5cdf Revert lguest magic and use hook in head.S
Version 2.07 of the boot protocol uses 0x23C for the hardware_subarch
field, that for lguest is "1".  This allows us to use the standard
boot entry point rather than the "GenuineLguest" string hack.

The standard entry point also clears the BSS and copies the boot parameters
and commandline for us, saving more code.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2007-10-23 15:49:57 +10:00
Rusty Russell 19f1537b7b Lguest support for Virtio
This makes lguest able to use the virtio devices.

We change the device descriptor page from a simple array to a variable
length "type, config_len, status, config data..." format, and
implement virtio_config_ops to read from that config data.

We use the virtio ring implementation for an efficient Guest <-> Host
virtqueue mechanism, and the new LHCALL_NOTIFY hypercall to kick the
host when it changes.

We also use LHCALL_NOTIFY on kernel addresses for very very early
console output.  We could have another hypercall, but this hack works
quite well.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2007-10-23 15:49:56 +10:00
Rusty Russell 0ca49ca946 Remove old lguest bus and drivers.
This gets rid of the lguest bus, drivers and DMA mechanism, to make
way for a generic virtio mechanism.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2007-10-23 15:49:55 +10:00
Rusty Russell 0a8a69dd77 Virtio helper routines for a descriptor ringbuffer implementation
These helper routines supply most of the virtqueue_ops for hypervisors
which want to use a ring for virtio.  Unlike the previous lguest
implementation:

1) The rings are variable sized (2^n-1 elements).
2) They have an unfortunate limit of 65535 bytes per sg element.
3) The page numbers are always 64 bit (PAE anyone?)
4) They no longer place used[] on a separate page, just a separate
   cacheline.
5) We do a modulo on a variable.  We could be tricky if we cared.
6) Interrupts and notifies are suppressed using flags within the rings.

Users need only get the ring pages and provide a notify hook (KVM
wants the guest to allocate the rings, lguest does it sanely).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Dor Laor <dor.laor@qumranet.com>
2007-10-23 15:49:55 +10:00
Rusty Russell 47436aa4ad Boot with virtual == physical to get closer to native Linux.
1) This allows us to get alot closer to booting bzImages.

2) It means we don't have to know page_offset.

3) The Guest needs to modify the boot pagetables to create the
   PAGE_OFFSET mapping before jumping to C code.

4) guest_pa() walks the page tables rather than using page_offset.

5) We don't use page_offset to figure out whether to emulate: it was
   always kinda quesationable, and won't work for instructions done
   before remapping (bzImage unpacking in particular).

6) We still want the kernel address for tlb flushing: have the initial
   hypercall give us that, too.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2007-10-23 15:49:54 +10:00
Rusty Russell c18acd73ff Allow guest to specify syscall vector to use.
(Based on Ron Minnich's LGUEST_PLAN9_SYSCALL patch).

This patch allows Guests to specify what system call vector they want,
and we try to reserve it.  We only allow one non-Linux system call
vector, to try to avoid DoS on the Host.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2007-10-23 15:49:53 +10:00
Jes Sorensen b410e7b149 Make hypercalls arch-independent.
Clean up the hypercall code to make the code in hypercalls.c
architecture independent. First process the common hypercalls and
then call lguest_arch_do_hcall() if the call hasn't been handled.
Rename struct hcall_ring to hcall_args.

This patch requires the previous patch which reorganize the layout of
struct lguest_regs on i386 so they match the layout of struct
hcall_args.

Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2007-10-23 15:49:52 +10:00
Jes Sorensen 625efab1cd Move i386 part of core.c to x86/core.c.
Separate i386 architecture specific from core.c and move it to
x86/core.c and add x86/lguest.h header file to match.

Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2007-10-23 15:49:51 +10:00
Rusty Russell 34b8867a03 Move lguest guest support to arch/x86.
Lguest has two sides: host support (to launch guests) and guest
support (replacement boot path and paravirt_ops).  This moves the
guest side to arch/x86/lguest where it's closer to related code.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Andi Kleen <ak@suse.de>
2007-10-23 15:49:50 +10:00
Rusty Russell d3d1c4bdf1 Normalize config options for guest support
1) Group all the "guest OS" support options together, under a PARAVIRT_GUEST
   menu.
2) Make those options select CONFIG_PARAVIRT, as suggested by Andi.
3) Make kconfig help titles consistent.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Andi Kleen <ak@suse.de>
Cc: Zach Amsden <zach@vmware.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Chris Wright <chrisw@sous-sol.org>
2007-10-23 15:49:47 +10:00
Linus Torvalds 6d435365dd Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/cooloney/blackfin-2.6
* 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/cooloney/blackfin-2.6:
  Blackfin arch: use KBUILD_CFLAGS and KBUILD_AFLAGS in Makefile
  Blackfin arch: Javier Herrer writes: fix building when icache and dcache is disabled
2007-10-22 19:29:05 -07:00
Linus Torvalds 56d61a0e26 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] 4level-fixup cleanup
  [S390] Cleanup page table definitions.
  [S390] Introduce follow_table in uaccess_pt.c
  [S390] Remove unused user_seg from thread structure.
  [S390] tlb flush fix.
  [S390] kernel: Fix dump on panic for DASDs under LPAR.
  [S390] struct class_device -> struct device conversion.
  [S390] cio: Fix incomplete commit for uevent suppression.
  [S390] cio: Use to_channelpath() for device to channel path conversion.
  [S390] Add per-cpu idle time / idle count sysfs attributes.
  [S390] Update default configuration.
2007-10-22 19:23:34 -07:00
Linus Torvalds 5f48b338cd Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC64]: ARRAY_SIZE() cleanup
  [SPARC64]: small Makefile cleanups
  [SPARC64]: Stop using __do_IRQ().
  [SPARC64]: Update defconfig.
2007-10-22 19:22:56 -07:00
Linus Torvalds 8b0eaccab4 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
  [POWERPC] Enable restart support for lite5200 board
  [POWERPC] Add restart support for mpc52xx based platforms
  [POWERPC] Update device tree binding for mpc5200 gpt
  [POWERPC] Add mpc52xx_find_and_map_path(), refactor utility functions
  [POWERPC] bestcomm: Restrict bus prefetch bugfix to original mpc5200 silicon.
2007-10-22 19:21:54 -07:00
Linus Torvalds f10f114f19 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] time: Make c0_compare_int_usable more bullet proof
  [MIPS] Kbuild: Use the new cc-cross-prefix feature.
  [MIPS] Fix include wrapper symbol to something sane.
  [MIPS] Malta: Delete dead code.
  [MIPS] time: Add GT641xx timer0 clockevent driver
  [MIPS] time: SMP-proofing of Sibyte clockevent/clocksource code.
  [MIPS] time: SMP/NUMA-proofing of IP27 HUB RT timer code.
  [MIPS] time: Fix calculation in clockevent_set_clock()
2007-10-22 19:21:08 -07:00
Linus Torvalds 69450bb5eb Merge branch 'sg' of git://git.kernel.dk/linux-2.6-block
* 'sg' of git://git.kernel.dk/linux-2.6-block:
  Add CONFIG_DEBUG_SG sg validation
  Change table chaining layout
  Update arch/ to use sg helpers
  Update swiotlb to use sg helpers
  Update net/ to use sg helpers
  Update fs/ to use sg helpers
  [SG] Update drivers to use sg helpers
  [SG] Update crypto/ to sg helpers
  [SG] Update block layer to use sg helpers
  [SG] Add helpers for manipulating SG entries
2007-10-22 19:11:06 -07:00
Alejandro Martinez Ruiz 29f139ce27 [SPARC64]: ARRAY_SIZE() cleanup
Signed-off-by: Alejandro Martinez Ruiz <alex@flawedcode.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-22 17:24:19 -07:00
Paul Mackerras 3cfa8f6c54 Merge branch 'for-2.6.24' of git://git.secretlab.ca/git/linux-2.6-mpc52xx 2007-10-23 08:45:23 +10:00
Atsushi Nemoto dab969c00b [MIPS] time: Make c0_compare_int_usable more bullet proof
Use write_c0_compare(read_c0_count()) to clear interrupt.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-10-22 22:09:01 +01:00
Ralf Baechle 17f690be45 [MIPS] Kbuild: Use the new cc-cross-prefix feature.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-10-22 22:09:01 +01:00
Ralf Baechle fa33a54646 [MIPS] Malta: Delete dead code.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-10-22 22:09:00 +01:00
Yoichi Yuasa 1097c6ac33 [MIPS] time: Add GT641xx timer0 clockevent driver
And make use of it for Cobalt.  A few others such as the Malta could make
use of it as well.

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-10-22 22:09:00 +01:00
Ralf Baechle d04533650f [MIPS] time: SMP-proofing of Sibyte clockevent/clocksource code.
The BCM148 has 4 cores but there are also just 4 generic timers available
so use the ZBbus cycle counter instead of it.  In addition the ZBbus
counter also offers a much higher resolution and 64-bit counting so I'm
considering a later complete conversion to it once I figure out if all
members of the Sibyte SOC family support it - the docs seem to agree but
the headers files seem to disagree ...

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-10-22 22:09:00 +01:00
Ralf Baechle 06d428d719 [MIPS] time: SMP/NUMA-proofing of IP27 HUB RT timer code.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-10-22 22:09:00 +01:00
Atsushi Nemoto 508a775a3c [MIPS] time: Fix calculation in clockevent_set_clock()
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-10-22 22:09:00 +01:00