Archived
14
0
Fork 0
Commit graph

3315 commits

Author SHA1 Message Date
Ralf Baechle
e01402b115 More AP / SP bits for the 34K, the Malta bits and things. Still wants
a little polishing.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:53 +01:00
Ralf Baechle
7e35952baa Move Origin crapola into a machine-specific header file.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:52 +01:00
Ralf Baechle
a0c3a5b5a8 Prevent gcc from optimizing a few functions away completly.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:52 +01:00
Ralf Baechle
8f40611d2b Detect the MIPS R2 vectored interrupt, external interrupt controller
options and the precense of the MT ASE.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:51 +01:00
Ralf Baechle
55d04dff0f New kernel option nowait allows disabling the use of the wait instruction.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:48 +01:00
Ralf Baechle
569f75bd02 Use an irq_enable_hazard hazard barrier in unmask_mips_irq. This
hasn't been an actual bug, so it's more a change to be 100% compliant
with the requirements of the architecture spec.  Similar fix to
mask_mips_irq where there was a slightly less theoretical chance of
getting hit.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:48 +01:00
Ralf Baechle
7db36c858c Add inotify syscalls for MIPS.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:47 +01:00
Ralf Baechle
ec74e361f1 Mark a few variables __read_mostly.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:46 +01:00
Ralf Baechle
cc61c1fede MIPS R2 instruction hazard handling.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:46 +01:00
Ralf Baechle
bbc7f22f6d Detect the 34K.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:45 +01:00
Ralf Baechle
079ef8bb80 Generate code for MIPS32 / MIPS64 Release 2 if configured for one of
these architectures.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:45 +01:00
Ralf Baechle
1e5f1caa5d MIPS 32/64 R2 config option.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:44 +01:00
Ralf Baechle
e5de3b4687 In pcibios_enable_resources go back to handling all PCI_NUM_RESOURCES
resources.  We tried previous but ran into problems ...

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:43 +01:00
Ralf Baechle
e80de8503c Use Kconfig.preempt.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:42 +01:00
Ralf Baechle
60080265a1 Define kmap_atomic_pfn() for MIPS.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:42 +01:00
Ralf Baechle
129bc8f78b Setup_frame is now returning a success value.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:41 +01:00
Ralf Baechle
b490ff4270 Temporary hack for Qemu and MIPSsim until they get a proper ELF loader.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:41 +01:00
Ralf Baechle
3ef33e68c1 Date: Fri Jul 8 20:10:17 2005 +0000
Those literals are long.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:40 +01:00
Thiemo Seufer
4552074577 IP30 Identification.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Thiemo Seufer <ths@networkno.de>
2005-10-29 19:31:39 +01:00
Thiemo Seufer
85f14bf2cb ... and it isn't a canonicalized triplet but just the n-plet used to
configure gcc.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Thiemo Seufer <ths@networkno.de>
2005-10-29 19:31:38 +01:00
Thiemo Seufer
73f74e23a6 Grep deesn't like shell-style matching...
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Thiemo Seufer <ths@networkno.de>
2005-10-29 19:31:37 +01:00
Thiemo Seufer
f425a6dce5 Hack to make compiles for the other endianness easier.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Thiemo Seufer <ths@networkno.de>
2005-10-29 19:31:37 +01:00
Ralf Baechle
6e760c8dae Rename CONFIG_CPU_MIPS{32,64} to CONFIG_CPU_MIPS{32|64}_R1.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:37 +01:00
Ralf Baechle
ca4973dd55 Don't redeclare ll_local_timer_interrupt.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:36 +01:00
Thiemo Seufer
50bd2c72ca Brian Murphy says:
this fixes Lasat pci to work with multi-function devices by assigning
    the correct values based on pin number (instead of ignoring them).

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Thiemo Seufer <ths@networkno.de>
2005-10-29 19:31:36 +01:00
Thiemo Seufer
ec125c129e Code cleanup, thanks Brian Murphy.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Thiemo Seufer <ths@networkno.de>
2005-10-29 19:31:35 +01:00
Maciej W. Rozycki
a5fc9c0bbe Use physical addresses at the interface level, letting drivers remap
them as appropriate.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:35 +01:00
Maciej W. Rozycki
2c93e12cfe Avoid tlbw* hazards for the R4600/R4700/R5000.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:34 +01:00
Maciej W. Rozycki
c3455b0efc Inline ioremap() calls for constant addresses that map to KSEG1.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:34 +01:00
Ralf Baechle
c134a5ecdb Avoid defining variables in the middle of a block which breaks older
compilers.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:33 +01:00
Maciej W. Rozycki
4c0a2d4275 Fix the diagnostic dump for the XTLB refill handler.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:32 +01:00
Maciej W. Rozycki
41986a6e7e Fix a diagnostic message.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:32 +01:00
Ralf Baechle
362b1d546d Conversion to plat_setup() for TX4927 also.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:32 +01:00
Ralf Baechle
01d42abdf3 Using get_nasid() to find the console node will blow up nicely if
called on a another node than the console node, so use the master_nasid
instead and in the unlikely case that one isn't initialized yet, fall
back to get_nasid().

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:31 +01:00
Maciej W. Rozycki
c4559f67b7 Always use ".set mips3" rather than select between "mips2" or "mips3"
for assembling ll/sc sequences to avoid problems with 64-bit
configurations.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:31 +01:00
Maciej W. Rozycki
69c75fb458 Actual handlers for bus errors for Pmax and 3min.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

diff --git a/arch/mips/dec/kn01-berr.c b/arch/mips/dec/kn01-berr.c
new file mode 100644
2005-10-29 19:31:30 +01:00
Maciej W. Rozycki
64dac503e8 System-specific handling of bus errors for DECstation variations
supporting parity errors only for memory (Pmax/3min/Maxine).
Fixes for resources decoded by the KN04/KN05 MB ASIC.  Additional
clean-ups for the ECC handler.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:30 +01:00
Maciej W. Rozycki
3b2396d972 Use correct names for bits in the R3k cp0.status register.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:29 +01:00
Maciej W. Rozycki
c6ad7b7d3c Use macros for the RM7k cp0.config bits instead of magic numbers.
Minor clean-ups.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:28 +01:00
Maciej W. Rozycki
8a185d14b6 Fix types for firmware arguments. Don't define unneeded messages.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:27 +01:00
Maciej W. Rozycki
260c96738c Mark __die() "noreturn" for real.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:26 +01:00
Maciej W. Rozycki
3bd4c902da Deal with the bloody KSEG vs CKSEG horror...
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:23 +01:00
Maciej W. Rozycki
902d21d531 There is NO port I/O space on the DECstation. Minor clean-ups.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:23 +01:00
Ralf Baechle
02416dcf5a Redo RM9000 workaround which along with other DSP ASE changes was
causing some headache for debuggers knowing about signal frames.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:23 +01:00
Maciej W. Rozycki
aac8aa7717 Enable a suitable ISA for the assembler around ll/sc so that code
builds even for processors that don't support the instructions.
Plus minor formatting fixes.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:22 +01:00
Maciej W. Rozycki
fded2e508a Optimize R3k TLB Load/Store/Modified handlers, by scheduling
delay slots properly and avoiding an unnecessary jump to a jump.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:22 +01:00
Maciej W. Rozycki
d925c262dd Fill R3k load delay slots properly.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:21 +01:00
Maciej W. Rozycki
9678e28b1a Only dump instructions actually emitted.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:21 +01:00
Maciej W. Rozycki
68e4a86c80 This interrupt is *always* handled -- MIPS_BE_DISCARD just means
no further action wanted.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:20 +01:00
Maciej W. Rozycki
d5b6f1db5d For MIPS32/MIPS64 cp0.config.mt == 1 implies a standard (R4k-style)
TLB, so no need to set it separately for each implementation.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:19 +01:00
Steven J. Hill
81731f7997 The DbAu1500 board also support big endian. Gee, imagine that.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:18 +01:00
Ralf Baechle
e50c0a8fa6 Support the MIPS32 / MIPS64 DSP ASE.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:17 +01:00
Ralf Baechle
10f650db1b 64-bit fixes for Alchemy code ;)
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:17 +01:00
Ralf Baechle
149f60b30c When building for Atlas, Malta or SEAD convert the kernel to srecs by
default.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:16 +01:00
Ralf Baechle
f8280c8d3d Fix tasteless #ifdef mess in audit_arch(), minor cleanups.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:16 +01:00
Ralf Baechle
4a99d1e25b Now that a struct is the only member left in struct
mips_fpu_emulator_stats cleanup that unnecessary nesting of structs.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:14 +01:00
Ralf Baechle
baee502ce2 Get rid of the eir struct mips_fpu_emulator_private member. It's
never initialized been initialized anywhere, just saved to and
restored from signal frames so nonsense anyway.  As neat side effect
of being shared between all processors it was also abusable as a
nice covert channel between processes.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:14 +01:00
Ralf Baechle
1d74f6bc85 __compute_return_epc() uses CFC1 instruction which might result in a
coprocessor unusable exception since the process can lose its fpu
context by preemption.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:13 +01:00
Maciej W. Rozycki
d547c5cc21 sys_nfsservctl() needs translation.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:13 +01:00
Ralf Baechle
b382fe8483 No point in checking cpu_has_tlb before we've computed the CPU options.
So for now we just unconditionally set the option - Linux wouldn't
work without a TLB anyway.
    
Setting MIPS_CPU_4KTLB was missing for Alchemy and Sandcraft, add that
back.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:13 +01:00
Ralf Baechle
4194318c39 Cleanup decoding of MIPSxx config registers.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:12 +01:00
Ralf Baechle
cd21dfcfbb Fix preemption and SMP problems in the FP emulator code.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:12 +01:00
Thiemo Seufer
63b2d2f4d2 Handle _PAGE_DIRTY correctly for CONFIG_64BIT_PHYS_ADDR on 32bit CPUs.
Signed-off-by: Thiemo Seufer <ths@networkno.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:11 +01:00
Thiemo Seufer
ba5187dbb4 Better interface to run uncached cache setup code.
Signed-off-by: Thiemo Seufer <ths@networkno.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:11 +01:00
Thiemo Seufer
cce812c99c Ustat needs a wrapper on n32.
Signed-off-by: Thiemo Seufer <ths@networkno.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:08 +01:00
Ralf Baechle
93b25d0621 Useless includes of everything, the kitchen sink and version.h ...
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:07 +01:00
Ralf Baechle
1342f7e6c5 Arrested for multiple offences of header file inclusion.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:07 +01:00
Ralf Baechle
1fcf1cc742 We pass a kernel pointer to do_sigaltstack in sys32_sigaltstack, so
we need to do the set_fs(KERNEL_DS) thing around this call.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:06 +01:00
Ralf Baechle
3c37026d43 NPTL, round one.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:06 +01:00
Ralf Baechle
f03da6e28e Fix BogoMIPS display on UP and some minor cosmetical things.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:05 +01:00
Thiemo Seufer
589391a0fe fcntl64 needs to be wrapped for n32.
Signed-off-by: Thiemo Seufer <ths@networkno.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:04 +01:00
Ralf Baechle
05b8042ac6 Fix one more case of computing the return EPC after the registers have
already been modified.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:04 +01:00
Ralf Baechle
6dd0468852 When simulating ll/sc compute the return EPC before modifying the
registers.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:04 +01:00
Ralf Baechle
2b07bd0235 Detect the 4KEcR2 and for now detect handle it like the 4KEc.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:03 +01:00
Pete Popov
fe359bf584 Fixed buglet with previous patch that broke non au1x builds.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:02 +01:00
Pete Popov
494900af68 Remove CONFIG_PM dependency from au1x wait in cpu_probe.
Additional work necessary to completely remove that config option.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:02 +01:00
Pete Popov
3b495f2bb7 Au1100 FB driver uplift for 2.6.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Acked-by: Antonino Daplas <adaplas@pol.net>
2005-10-29 19:31:01 +01:00
Thiemo Seufer
172546bf60 Fix race conditions for read_c0_entryhi. Remove broken ASID masks in
tlb-sb1.c. Make tlb-r4k.c and tlb-sb1.c more similiar and more efficient.

Signed-off-by: Thiemo Seufer <ths@networkno.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:01 +01:00
Maciej W. Rozycki
202d0388e7 Remove useless casts. Fix formatting.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:00 +01:00
Thiemo Seufer
1b3a6e975c Fix 64bit SMP TLB handler and stack frame handling, optimize 32bit SMP
TLB handlers a bit, match definitions in pgtable-{32,64}.h better.

Signed-off-by: Thiemo Seufer <ths@networkno.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:31:00 +01:00
Ralf Baechle
4f12bfe5a4 HUB interrupts are allocated per node, not per slice. Make manipulation
of the interrupt mask register atomic by disabling interrupts.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:59 +01:00
Ralf Baechle
6cbe063159 R4300 delay slot.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:59 +01:00
Ralf Baechle
209ac8ddb1 Use compat_sigval_t in struct compat_siginfo.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:58 +01:00
Ralf Baechle
127c6f6623 SECCOMP for MIPS.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:58 +01:00
Ralf Baechle
53de0d471f Reformat; cosmetic cleanups.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:57 +01:00
Ralf Baechle
1592dac241 Reformatting, remove debugging code.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:57 +01:00
Ralf Baechle
b4dbf95e30 Get rid of the the remains of 2.4-style ramdisk support.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:57 +01:00
Ralf Baechle
71e0e556db Multithreaded core dumps.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:56 +01:00
Pete Popov
a3701ca487 When CONFIG_PM is enabled, it uses the TOY_MATCH2 interrupt as the system
timer tick. Prior to this patch, if IDE IRQ probing occured, then the
TOY_MATCH2 interrupt would be permanently disabled, and no system timer
tick occurs. This patch corrects this situation by correctly registering
the TOY_MATCH2 interrupt so that IDE IRQ probing doesn't have adverse
side effects.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:56 +01:00
Thiemo Seufer
90a67b5909 sys_futex has 6 arguments.
Signed-off-by: Thiemo Seufer <ths@networkno.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:55 +01:00
Ralf Baechle
9ff77c469e Export shm_align_mask and flush_data_cache_page.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:54 +01:00
Ralf Baechle
07b4ebd372 Put salone.o back into arclib. It's a lib so doesn't harm if unused atm.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:54 +01:00
Ralf Baechle
77c728c224 Gcc 4.0 fixes.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:53 +01:00
Ralf Baechle
5eaf7a21be Use new txx9 serial driver.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:52 +01:00
Ralf Baechle
cdaed73afb Fix preemption bug.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:51 +01:00
Pete Popov
ebc7f12fbc Int controller fixes.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:51 +01:00
Ralf Baechle
fe00f943e0 Sparseify MIPS.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:50 +01:00
Ralf Baechle
14f18b7f7e On 24K we did always disable cache parity protection - obviously not
the greatest thing to do.  Try to enable parity protection, check if
we actually succeeded and print a message about the outcome of this.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:49 +01:00
Ralf Baechle
0f04afb595 ISOify.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:48 +01:00
Pete Popov
2d32ffa44a Moved irq_tab_alchemy to the board specific irqmap.c files.
Cleaned up a to of warnings in dbdma.c.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:48 +01:00
Pete Popov
e3ad1c23ba Base Au1200 2.6 support.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:47 +01:00
Steven J. Hill
784f7b9d89 Fix 'prctl' system call for IRIX. At this point IRIX 5.3 static binaries
are now working for 80% of the ones I have tried. The other ones that do
not work all fail in the same way with the same messages. Once that bug
is tracked down, we should be in good shape. Task locking still needs
some work.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:47 +01:00
Ralf Baechle
333d1f6794 Gross macro abuse. Get rid of gpreg_t, vaddr_t, REG_TO_VA and
VA_TO_REG.  Who ever wrote this apparently did enjoy the C Puzzle Book.
ISBN 0201604612, a little old but still fun reading for the next
blackout ;)

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:46 +01:00
Ralf Baechle
0bd5d2e9ec Cleanup fpuemuprivate declarations.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:46 +01:00
Ralf Baechle
8ab00b9a02 Convert struct hw_interrupt_type initializations to ISO C99 named
initializers.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:46 +01:00
Pete Popov
d437441ef5 No barrier needed on au1x.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:45 +01:00
Pete Popov
13d1d73ea5 Comment correction after further investigation of issue.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:44 +01:00
Thiemo Seufer
685f779e60 Fix initialization. Unbreak the wait-for-completion loops. Code cleanup.
Signed-off-by: Thiemo Seufer <ths@networkno.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:44 +01:00
Maciej W. Rozycki
65bda1a95d Switch SiByte drivers back to __raw_*() functions.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:44 +01:00
Ralf Baechle
b727a60258 Merge do_boot_cpu() into the new style __cpu_up().
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:43 +01:00
Ralf Baechle
0ac354801a On multiprocessor systems the BogoMIPS for each CPU was reported was
the value for the last CPU having calibrated it's delay loop.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:42 +01:00
Ralf Baechle
c4ed38a0c6 Resurrect Cobalt support for 2.6.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:42 +01:00
Thiemo Seufer
9f83d839df -nostdlib boilerplate.
Signed-off-by: Thiemo Seufer <ths@networkno.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:41 +01:00
Thiemo Seufer
dc953df1ba Fix wchan implementation, based on earlier by from Atsushi Nemoto.
Signed-off-by: Thiemo Seufer <ths@networkno.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:40 +01:00
Thiemo Seufer
4e6a05fe5f Improved modules loader, more robust and works on 64bit kernels.
Signed-off-by: Thiemo Seufer <ths@networkno.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:39 +01:00
Steven J. Hill
7ee8798f37 Until I figure out why NFS filesystems are having problems with
the 'load_irix_binary' and having kernel faults, Irix support is
disabled. I suspect locking of some sort, but I will now have to
investigate further.

Static IRIX binaries are now being detected properly and are using the
ELF interpreter found in this file.

Signed-off-by: Steven J. Hill <sjhill@realitydiluted.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:39 +01:00
Thiemo Seufer
dd19326148 Initialize iomem_resource.
Signed-off-by: Thiemo Seufer <ths@networkno.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:39 +01:00
Thiemo Seufer
16033d6104 Handle addresses beyond VMALLOC_END correctly.
Signed-off-by: Thiemo Seufer <ths@networkno.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:38 +01:00
Thiemo Seufer
26a51b270f Use intermediate variable.
Signed-off-by: Thiemo Seufer <ths@networkno.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:38 +01:00
Thiemo Seufer
1ba582a128 O2 doesn't have _that_ much RAM.
Signed-off-by: Thiemo Seufer <ths@networkno.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:37 +01:00
Pete Popov
d8f5d86178 Changed all Au1x boards to noncoherent again.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:37 +01:00
Ralf Baechle
d1abb6a2b8 32-bit compatibility for various timer-related system calls.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:37 +01:00
Ralf Baechle
a982099ca5 Update to match the native siginfo structure and code.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:36 +01:00
Ralf Baechle
09276d905e 32-bit compatibility for ptrace GETEVENTMSG operation.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:36 +01:00
Ralf Baechle
54f2da755b Implement 32-bit compatibility for waitid(2).
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:35 +01:00
Ralf Baechle
a19050f301 Waitid(2) now has 5 arguments.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:34 +01:00
Ralf Baechle
b6e203d84d Use generic compat_sys_wait4 to implement 32-bit wait4(2).
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:34 +01:00
Ralf Baechle
39408c6af4 Replace the complicated and broken attempt to clean interrupt by
something simple - doesn't need to be fast, after all.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:33 +01:00
Ralf Baechle
ca8a597d53 If you want RM7000 better fix it to build first ...
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:33 +01:00
Ralf Baechle
de1db6ffe2 It's unwise to disable all interrupts of the boot node ;-)
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:32 +01:00
Maciej W. Rozycki
f4b7cdb481 Enable RM7000 secondary cache for Atlas and Malta boards.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:32 +01:00
Ralf Baechle
79acf83e50 Moves a test which determines if we actually need to perform a
cacheflush to the right place.  That's a bug which is harmless on UP
but a severe bug on SMP.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:31 +01:00
Ralf Baechle
c6e8b58771 Update MIPS to use the 4-level pagetable code thereby getting rid of
the compacrapability headers.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:31 +01:00
Ralf Baechle
57f0060b8a Document why calling smp_call_function will deadlock when called with
interrupts disabled.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:30 +01:00
Ralf Baechle
505403b6a0 25Kf is also physically indexed.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:29 +01:00
Ralf Baechle
a95970f323 20Kc and SB1 don't suffer from aliases.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:28 +01:00
Ralf Baechle
84fd089a42 Delete duplicate copy of fixrange_init.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:28 +01:00
Ralf Baechle
cc26b815dd rm9000_init() really is __init code.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:27 +01:00
Ralf Baechle
a18815abcd Use preempt_schedule_irq.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:27 +01:00
Ralf Baechle
54176736f7 More oprofile bits for MIPS32-style performance counters. The code to
bolt this into the actual hardware interrupt is yet missing from this
commit.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

 FEXPORT(ret_from_fork)
2005-10-29 19:30:27 +01:00
Ralf Baechle
29c4869946 It works better when including arch/mips/sgi-ip27/Kconfig ...
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:26 +01:00
Ralf Baechle
ae6aafe309 Move missplaced code line to the right place.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:26 +01:00
Ralf Baechle
d1e344e500 Use hardware mechanism to deal with cache aliases in the 24K.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:25 +01:00
Ralf Baechle
28ecca4786 Remove old wrong bits of cache code.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:25 +01:00
Maciej W. Rozycki
ea7c394492 Clean up SEAD interrupt initialization.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:24 +01:00
Maciej W. Rozycki
925ddb04c5 Mask and ack CPU interrupts upon initialization. Keep the state
of software interrupts when unmasking.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:24 +01:00
Ralf Baechle
38b18f7258 Move Sibyte Kconfig stuff into it's own Kconfig.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:23 +01:00
Ralf Baechle
db89a48c1f Replace deprecated interruptible_sleep_on() function call with direct
wait-queue usage.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:22 +01:00
Maciej W. Rozycki
f638d1971e Update descriptions for MIPS Technologies evaluation boards.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:22 +01:00
Maciej W. Rozycki
b6d468ec2d Reenable EARLY_PRINTK for the DECstation.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:21 +01:00
Maciej W. Rozycki
304429915d Formatting fixes.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:21 +01:00
Maciej W. Rozycki
aa0980b809 Fixes for system controllers for Atlas/Malta core cards.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:20 +01:00
Maciej W. Rozycki
bec0204dfb Actually route cPCI interrupts. Update inaccurate comments.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:19 +01:00
Ralf Baechle
c6237645d1 Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Fix TASK_SIZE for 32-bit processes on 64-bit kernels.
2005-10-29 19:30:19 +01:00
Ralf Baechle
b053c98fbb Fix register layout in o32 core dumps on 64-bit systems.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:19 +01:00
Ralf Baechle
c83cfc9c94 Get rid of early_init. There's more need to make this form of
initialization actually useful and as is certainly unmergable with
upstream.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:18 +01:00
Ralf Baechle
8c93650890 Dummy ISA DMA functions for systems that don't have ISA but share
drivers with ISA such as legacy free PCI.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:17 +01:00
Ralf Baechle
b188ffe876 Fix build with SMP disabled and preemption enabled.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:17 +01:00
Thiemo Seufer
0964ce24d0 Move the invalid pmd and pte tables from .data to .bss. Fix alignment.
Signed-off-by: Thiemo Seufer <ths@networkno.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:16 +01:00
Thiemo Seufer
c264852726 Remove unused arguments from preempt_{start,stop}/local_irq_{en,dis}able.
Don't clobber the preloaded TI_FLAGS in a2 needlessly.
Unexport local functions.

Signed-off-by: Thiemo Seufer <ths@networkno.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:16 +01:00
Thiemo Seufer
69903d6500 Fix typos and formatting.
Signed-off-by: Thiemo Seufer <ths@networkno.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:15 +01:00
Thiemo Seufer
b59a9504cb De-optimize and decomplicate the spurious interrupt handler.
Signed-off-by: Thiemo Seufer <ths@networkno.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:15 +01:00
Russell King
d052d1beff Create platform_device.h to contain all the platform device details.
Convert everyone who uses platform_bus_type to include
linux/platform_device.h.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-29 19:07:23 +01:00
Al Viro
942b6f6216 [PATCH] type fix in arm/boot/compressed/misc.c
spot the typo...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-29 10:35:08 -07:00
Al Viro
943eae0314 [PATCH] missing exports of do_settimeofday() variants
frv, sh64, ia64 and sparc64 do not have do_settimeofday() exported (the
last two are using variant in kernel/time.c).  Exports added to match
the rest of architectures.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-29 10:35:07 -07:00
Nicolas Pitre
1a47ebc0d9 [ARM] 3059/1: fix XIP support
Patch from Nicolas Pitre

Fix XIP support after recent bootmem code refactoring.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-29 16:28:29 +01:00
Russell King
183e1a3494 [ARM] Add support for SA1100 Jornada flash device support
This got dropped from the SA1100 flash driver a while back and
never added to the platform support file.  Add it back.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-29 16:09:59 +01:00
Russell King
14e66f767f [ARM] Allow MTD device name to be passed via platform data
Allow SA1100 devices to pass the name of the flash device to the
SA1100 map driver.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-29 16:08:31 +01:00
Paul Mackerras
eb66ce6333 powerpc: Remove T command from xmon help text since it no longer exists
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-29 22:11:06 +10:00
Paul Mackerras
3ee1fcac33 powerpc: import a gfp_t fix to arch/powerpc/mm/pgtable_32.c
This applies the same fix as Al Viro recently made to
arch/ppc/mm/pgtable.c.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-29 22:10:38 +10:00
Paul Mackerras
c1c3a554a3 powerpc: 32-bit needs cur_cpu_spec exported too
Somehow we ended up with an #ifdef CONFIG_PPC64 around the export
of cur_cpu_spec, but raid6 as a module needs it on ppc32 as well
as ppc64.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-29 22:08:55 +10:00
Paul Mackerras
0cb7b2afd7 powerpc: Merge maple support code to arch/powerpc/platforms/maple
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-29 22:07:56 +10:00
Paul Mackerras
d3f67fbb96 powerpc: Add -mno-altivec for ARCH=powerpc builds
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-29 15:31:17 +10:00
Andy Whitcroft
ffa27b6bc6 [PATCH] ppc64 memory model depends on NUMA
Currently when we first select memory model (FLAT, DISCONTIG, SPARSE) then
select whether the machine is NUMA.  However NUMA systems may not be FLAT.
This constraint it not honoured and we may configure a NUMA/FLAT system.

Reorder the configuration such that we choose NUMA first which allows us to
only list the memory models which are valid.  We now default NUMA for known
NUMA systems.  Note that this new order also matches that used in x86.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Joel Schopp <jschopp@austin.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-29 15:27:39 +10:00
Olaf Hering
ea6526605a [PATCH] ppc64: remove duplicate local variable in set_preferred_console
remove duplicate local variable, saves 2 asm instructions.

Signed-off-by: Olaf Hering <olh@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-29 15:23:08 +10:00
Olaf Hering
18c5332bc1 [PATCH] ppc64: change name of target file during make install
'make install' creates a /boot/zImage[.vmode] file when the defconfig is used.

It uses the second arg as file content, which is the vmlinux, and the 5th
arg as file name, which is the BOOTIMAGE name.

A comment in an earlier patch to install.sh states that yaboot can not load
a zImage+initrd combo.  This was true in kernel 2.6.5 because it did use
bi_recs to pass the initrd info.  But this concept was always broken.
Register r3 holds the initrd address and r4 holds the initrd size.  This
works with all kernel versions.  The current code in main.c leaves r3 and
r4 alone, so the kernel should be able to see and use the memory range with
the initrd content.

If one wants to rerun mkinitrd, it is currently hard to get the uname -r
value for the installed zImage.  Without this info, mkinitrd can not know
what modules to use.  This would be fixable by including the /proc/version
output of the new kernel.  But it is simpler to just use the plain vmlinux.

So all this patch does is to write to /boot/vmlinux instead to /boot/zImage

Signed-off-by: Olaf Hering <olh@suse.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-29 15:20:27 +10:00
Olaf Hering
1eee4daa99 [PATCH] ppc64: reenable make install with defconfig
'make ARCH=ppc64 O=../O install' does not work with the defconfig.
CONFIG_PPC_BPA is part of it, but the BPA bootimage variable is wrong:

make[2]: *** No rule to make target `zImage', needed by `install'.  Stop.

Signed-off-by: Olaf Hering <olh@suse.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-29 15:15:34 +10:00
Olaf Hering
18f568b79b [PATCH] ppc64: compile nls_cp437 and nls_iso8859_1 into the kernel in defconfig
compile nls_cp437 and nls_iso8859_1 into the kernel in defconfig.  This is
already enabled in pSeries_defconfig.

Reason: if one just boots the new shiny zImage and the root filesystem is
on a filesystem not readable by yaboot (like jfs, raid or lvm) upgrading
the bootloader will fail because the FAT bootpartition can not be mounted.

Signed-off-by: Olaf Hering <olh@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-29 15:14:44 +10:00
Olaf Hering
7e658118fa [PATCH] ppc64 boot: print firmware provided stackpointer
Show firmware provided stackpointer during boot.

This helps to find the "taboo" areas on the various boards.  claim tends to
fail for these memory areas, but some jokers return success anyway.

Use %p to print the load address, its a pointer.

Signed-off-by: Olaf Hering <olh@suse.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-29 15:11:35 +10:00
Olaf Hering
67a1b68263 [PATCH] ppc64 boot: proof that reloc works
To prove that the relocation works, move the crt0.o away from the beginning.
Move linker options from command line into linker script.  rename entry point
because '_start' is referenced in printf output.

Signed-off-by: Olaf Hering <olh@suse.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-29 15:11:00 +10:00
Olaf Hering
a4497235f0 [PATCH] ppc64 boot: make the zImage relocateable
Make the zImage relocateable.  So yaboot could just load and run any ELF
binary, without worrying about its load address.

Signed-off-by: Olaf Hering <olh@suse.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-29 15:10:12 +10:00
Olaf Hering
afbe8c4bb0 [PATCH] ppc64 boot: remove global initializers
No need to initialize global variables.

Signed-off-by: Olaf Hering <olh@suse.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-29 15:08:03 +10:00
Olaf Hering
844ae3a0d1 [PATCH] ppc64 boot: fix typo in asm comments
Update comment in memcpy, r7 contains the byte count.

Signed-off-by: Olaf Hering <olh@suse.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-29 15:07:50 +10:00
Olaf Hering
9b0cbe9756 [PATCH] ppc64 boot: use memset to clear bss
Use memset to clear bss, instead of own version.

Signed-off-by: Olaf Hering <olh@suse.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-29 15:07:38 +10:00
Olaf Hering
06cf26beff [PATCH] ppc64 boot: cleanup linker script
Remove userland related stuff from ld.script, they are not required for zImage
use wildcards for some sections.

Signed-off-by: Olaf Hering <olh@suse.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-29 15:07:00 +10:00
Olaf Hering
83097c5d54 [PATCH] ppc64 boot: bootfiles depend on linker script
bootfiles must be relinked if linker script changes

Signed-off-by: Olaf Hering <olh@suse.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-29 15:06:06 +10:00
Olaf Hering
6bcc20b5ad [PATCH] ppc64 boot: move gunzip function before use
Move the gunzip function up.

Signed-off-by: Olaf Hering <olh@suse.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-29 15:05:43 +10:00
Olaf Hering
8a76baf020 [PATCH] ppc64 boot: remove need for imagesize.c
Compute the vmlinux size at runtime.

Use Z_FULL_FLUSH instead of Z_FINISH, to extract only the ELF header
and ELF program header.

 ->p_memsz is the required memory range for the executable, including bss
 ->p_filesz is the size of .text, .data and other runtime sections

These values must be used for the claim call.
All additional memory needed by the kernel is claimed in prom_init, remove
the extra Mb.

Pass the full memsize as target area to gunzip, otherwise not everything
will be uncompressed.

flush_cache has to flush all runtime sections, do not reduce the memrange
by the ->p_offset value because its just that: an offset.

Remove the Makefile code to produce an imagesize.c, its not needed anymore.
Remove all FORCE flags, to not rebuild the zImage if vmlinux was not changed.

Signed-off-by: Olaf Hering <olh@suse.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-29 15:05:10 +10:00
Olaf Hering
7054036fc5 [PATCH] ppc64 boot: remove zlib
Switch ppc64 to the in-kernel zlib, it has less bugs than the current one.
The code in arch/ppc64/boot is compiled as 32bit, so it can not use the
includes from include/asm.

Copy all zlib related header files and convert them with sed.

Reduce the scratch size to 47k, check possible changes at runtime.

Signed-off-by: Olaf Hering <olh@suse.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-29 15:04:43 +10:00
Olaf Hering
8afe31c9eb [PATCH] ppc64 boot: missing include for size_t
string.h needs definition of size_t, but not the one from linux/include

Signed-off-by: Olaf Hering <olh@suse.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-29 15:04:21 +10:00
Vitaly Bordug
1461b4ea2b [PATCH] ppc32: ppc_sys fixes for 8xx and 82xx
This patch fixes a numbers of issues regarding to that both 8xx and 82xx
began to use ppc_sys model:
	- Platform is now identified by default deviceless SOC, if no
BOARD_CHIP_NAME is specified in the bard-specific header. For the list
of supported names refer to (arch/ppc/syslib/) mpc8xx_sys.c and
mpc82xx_sys.c for 8xx and 82xx respectively.
	- Fixed a bug in identification by name - if the name was not found,
it returned -1 instead of default deviceless ppc_spec.
	- fixed devices amount in the 8xx platform system descriptions

Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
Signed-off-by: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-29 14:49:29 +10:00
Andy Fleming
b37665e0ba [PATCH] ppc32: 85xx PHY Platform Update
This patch updates the 85xx platform code to support the new PHY Layer.

Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Kumar Gala <Kumar.gala@freescale.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-29 14:42:28 +10:00
Nicolas DET
dd03d25fac [PATCH] chrp_pegasos_eth: Added Marvell Discovery II SRAM support
Add proper entry to support the Marvell MV64361 (Marvell Discovery II)
SRAM.

This feature may be used by the mv643xx_eth driver.

Signed-off-by: Nicolas DET <det.nicolas@free.fr>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-29 14:41:08 +10:00
Olaf Hering
35e95e6399 [PATCH] ppc32: nvram driver for chrp
This implements a nvram acccess method, similar to
arch/ppc64/kernel/pSeries_nvram.c tested on CHRP B50.

Signed-off-by: Olaf Hering <olh@suse.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-29 14:35:00 +10:00
Roland Dreier
8b150478ae [PATCH] ppc: make phys_mem_access_prot() work with pfns instead of addresses
Change the phys_mem_access_prot() function to take a pfn instead of an
address.  This allows mmap64() to work on /dev/mem for addresses above 4G
on 32-bit architectures.  We start with a pfn in mmap_mem(), so there's no
need to convert to an address; in fact, it's actively bad, since the
conversion can overflow when the address is above 4G.

Similarly fix the ppc32 page_is_ram() function to avoid a conversion to an
address by directly comparing to max_pfn.  Working with max_pfn instead of
high_memory fixes page_is_ram() to give the right answer for highmem pages.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Cc: Anton Blanchard <anton@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-29 14:25:49 +10:00
Olaf Hering
d49b340124 [PATCH] ppc32: update xmon help text
Mention a few more commands in xmon.  System.map processing was replaced
with kallsyms.

Signed-off-by: Olaf Hering <olh@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-29 14:12:39 +10:00
Linus Torvalds
8a212ab6b8 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6 2005-10-28 21:09:26 -07:00
Marcelo Tosatti
434cc69fbb [PATCH] ppc32: #ifdef out ALTIVEC specific code in __switch_to
#ifdef out an ALTIVEC specific tweak in __switch_to()

Signed-off-by: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-29 13:55:43 +10:00
Matt Porter
d5f7b06b03 [PATCH] ppc32: Cleanup AMCC PPC44x eval board U-Boot support
Cleanup PPC440 eval boards (bamboo, ebony, luan and ocotea) to better
support U-Boot as bootloader.

Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Matt Porter <mporter@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-29 13:55:39 +10:00
Marcelo Tosatti
e37b0c9670 [PATCH] ppc32 8xx: use io accessor macros instead of direct memory reference
Convert core 8xx drivers to use in_xxxbe/in_xxx macros instead of direct
memory references.

Other than making IO accesses explicit (which is a plus for readability), a
common set of macros provides a unified place for the volatile flag to
constraint compiler code reordering.

There are several unlucky places at the moment which lack the volatile
flag.

Signed-off-by: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-29 13:55:27 +10:00
Lee Nicks
9e3699ea7b [PATCH] ppc: prevent GCC 4 from generating AltiVec instructions in kernel
Depending on how GCC is built, GCC 4 may generate altivec instructions without
user explicitly requesting vector operations in the code.  Although this is a
performance booster for user applications, it is a problem for kernel.

This patch explicitly instruct GCC to NOT generate altivec instructions while
building the kernel.

Here are some test cases I ran.

(1) build gcc 4.0.1 with '--with-cpu=7450 --enable-altivec
    --enable-cxx-flags=-mcpu=7450', and use this gcc to build kernel WITHOUT
    this kernel patch.  Kernel fail to boot up on a 7450 board because of
    altivec instructions in kernel.

(2) build gcc 4.0.1 with "--with-cpu=7450 --enable-altivec
    --enable-cxx-flags=-mcpu=7450", and use this gcc to build kernel WITH this
    kernel patch.  Kernel boot up on a 7450 board without any problem.

(3) build gcc 4.0.1 with "--with-cpu=750 --enable-cxx-flags=-mcpu=750",
    and use this gcc to build kernel with or without this kernel patch.
    Kernel boot up on a 7450 board without any problem.

This patch should also work with GCC 3 or even earlier GCC 2.95.3.

Signed-off-by: Lee Nicks <allinux@gmail.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-29 13:55:19 +10:00
Tony Luck
0e1f606092 [IA64] fix warning unused variable `g'
4ac0068f44 forgot to delete
the declaration of this variable which is no longer used.

Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-10-28 15:52:13 -07:00
Jesse Barnes
f8977d0a9b [PATCH] PCI fixup for Toshiba laptops and ohci1394
This is a fix for a bug I see on my Toshiba laptop, where the ohci1394
controller gets initialized improperly.  The patch adds two PCI fixups
to arch/i386/pci/fixup.c, one that happens early on to cache the value
of the PCI_CACHE_LINE_SIZE config register, and another that later
restores the value, along with a valid IRQ number and some BAR values.
I've tested it on my laptop, and it prevents me from running into what I
consider to be a major bug: IRQ 11 is disabled by the IRQ debug code,
causing my wireless to break.

Thanks to Rob for the original patch to ohci1394.c and Stefan for lots
of proofreading (and a last minute bug caught in review!) and additional
information collection.  I think the DMI system list is correct, but we
may need to add some more PCI IDs to the PCI_FIXUP macros over time.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 15:37:02 -07:00
Tony Luck
9590204d31 Pull optimize-ptrace-threads into release branch 2005-10-28 15:27:48 -07:00
Tony Luck
8496f2a451 Pull fix-slow-tlb-purge into release branch 2005-10-28 15:27:36 -07:00
Tony Luck
2d8f6a5219 Pull fix-bte-copy into release branch 2005-10-28 15:27:16 -07:00
Tony Luck
fac84ef267 Pull xpc-disengage into release branch 2005-10-28 15:27:03 -07:00
Tony Luck
d73dee6ee4 Pull for-each-cpu into release branch 2005-10-28 15:26:43 -07:00
Tony Luck
9acd3fa2e1 Pull asm-slot-fix into release branch 2005-10-28 14:33:50 -07:00
Tony Luck
5a2b1722e1 Pull proc-cpuinfo-siblings into release branch 2005-10-28 14:33:35 -07:00
Tony Luck
1e1bb25e97 Pull big-sim-disk into release branch 2005-10-28 14:33:14 -07:00
Tony Luck
c87ff94333 Pull sparsemem-v5 into release branch 2005-10-28 14:32:56 -07:00
Tony Luck
5833f1420b Pull new-efi-memmap into release branch 2005-10-28 14:32:30 -07:00
Tony Luck
a1e78db3f5 Pull define-node-cleanup into release branch 2005-10-28 13:24:06 -07:00
Tony Luck
fbbb0bd1f6 Pull sn_pci_legacy_read-write into release branch 2005-10-28 13:23:50 -07:00
Tony Luck
9472d8ce14 Pull acpi-produce-consume into release branch 2005-10-28 13:23:34 -07:00
Tony Luck
3168c31abe Pull update-default-configs into release branch 2005-10-28 13:23:14 -07:00
Tony Luck
dbcb25e621 Pull move-iosapic-to-acpi into release branch 2005-10-28 13:22:55 -07:00
Linus Torvalds
84860bf064 Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6 2005-10-28 13:09:47 -07:00
Tony Luck
0ace57a96b Pull ar-k0-usage into release branch 2005-10-28 11:16:32 -07:00
Tony Luck
2d300fece2 Pull 1024-cpu into release branch 2005-10-28 11:16:06 -07:00
Tony Luck
c85749e6d1 Pull hp-machvec into release branch 2005-10-28 11:15:25 -07:00
Tony Luck
0d9136fdbc Pull altix-mmr into release branch 2005-10-28 11:15:08 -07:00
Tony Luck
9189674026 Pull altix-fpga-reset into release branch 2005-10-28 11:14:47 -07:00
Greg KH
6fbfddcb52 Merge ../bleed-2.6 2005-10-28 10:13:16 -07:00
Linus Torvalds
8ed5759043 Merge branch 'forlinus' of git://parisc-linux.org/home/kyle/git/parisc-2.6 2005-10-28 10:08:46 -07:00
Russell King
9480e307cd [PATCH] DRIVER MODEL: Get rid of the obsolete tri-level suspend/resume callbacks
In PM v1, all devices were called at SUSPEND_DISABLE level.  Then
all devices were called at SUSPEND_SAVE_STATE level, and finally
SUSPEND_POWER_DOWN level.  However, with PM v2, to maintain
compatibility for platform devices, I arranged for the PM v2
suspend/resume callbacks to call the old PM v1 suspend/resume
callbacks three times with each level in order so that existing
drivers continued to work.

Since this is obsolete infrastructure which is no longer necessary,
we can remove it.  Here's an (untested) patch to do exactly that.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 09:52:56 -07:00
Greg Kroah-Hartman
53f4654272 [PATCH] Driver Core: fix up all callers of class_device_create()
The previous patch adding the ability to nest struct class_device
changed the paramaters to the call class_device_create().  This patch
fixes up all in-kernel users of the function.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 09:52:52 -07:00
Linus Torvalds
83928e17b9 Merge master.kernel.org:/home/rmk/linux-2.6-arm
Minor manual fixups for gfp_t clashes.
2005-10-28 09:24:22 -07:00
Kyle McMartin
210cc679fa Auto-update from upstream 2005-10-28 12:18:07 -04:00
Bellido Nicolas
50f4c001bc [ARM] 3042/1: AAED-2000 - LCD panel informations
Patch from Bellido Nicolas

The AAED-2000 is equiped with an 640x480 LCD.
This adds the parameters that will be passed to the AAEC-2000 platform code.

Signed-off-by: Nicolas Bellido <ml@acolin.be>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 16:51:44 +01:00
Bellido Nicolas
049eb3298a [ARM] 3041/1: AAEC-2000 - CLCD controller platform glue
Patch from Bellido Nicolas

The AAEC-2000 has an ARM PrimeCell PL110 Color LCD Controller.
This patch contains the platform glue that will be used by specific boards.

Signed-off-by: Nicolas Bellido <ml@acolin.be>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 16:51:44 +01:00
Bellido Nicolas
4224b67c9a [ARM] 3040/1: AAEC-2000 - Preliminary clock interface support
Patch from Bellido Nicolas

Here is a preliminary clock interface support for the AAEC-2000.

Signed-off-by: Nicolas Bellido <ml@acolin.be>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 16:51:43 +01:00
Bellido Nicolas
4a91ca2eb6 [ARM] 3039/1: AAEC-2000 - Add MTD support
Patch from Bellido Nicolas

This adds platform code for MTD devices on AAEC-2000.

Signed-off-by: Nicolas Bellido <ml@acolin.be>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 16:51:42 +01:00
Bellido Nicolas
4028ef4cc1 [ARM] 3037/1: AAED-2000 - Add defines for GPIO registers on external port.
Patch from Bellido Nicolas

The AAED-2000 board has GPIO pins on an external port.
This patch adds the defines, and do the necessary mapping.

Signed-off-by: Nicolas Bellido <ml@acolin.be>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 16:51:40 +01:00
Nicolas Pitre
6f475c0133 [ARM] 2897/2: PXA2xx IRDA support
Patch from Nicolas Pitre

This is the PXA2xx common IRDA driver, plus platform support
for Lubbock and Mainstone.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Acked-by: Jean Tourrilhes <jt@hpl.hp.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 16:39:33 +01:00
Nicolas Pitre
a999cb04b4 [ARM] 3035/1: RISCOS compat code fix
Patch from Nicolas Pitre

From: Daniel Jacobowitz <dan@debian.org>

> I also fixed a bug that confused me greatly while trying to debug: one
> SIGILL has long been a SIGSEGV because of some broken RISCOS
> compatibility code.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 16:35:46 +01:00
Matt Reimer
d9e2964987 [ARM] 3029/1: Add HWUART support for PXA 255/26x
Patch from Matt Reimer

Adds support for HWUART on PXA 255 / 26x. This patch originally came from
http://svn.rungie.com/svn/gumstix-buildroot/trunk/sources/kernel-patches/000-gumstix-hwuart.patch
and has been tweaked by me.

Signed-off-by: Matt Reimer <mreimer@vpop.net>
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 16:25:02 +01:00
Todd Poynor
80a18573ce [ARM] 2787/2: PXA27x low power modes support
Patch from Todd Poynor

Add symbols for PXA2xx PWRMODE register M field that selects low-power
mode, replace unadorned constants.  Honor power mode parameter of
pxa_cpu_suspend(mode), no longer force to 3 (sleep).  Full Deep Sleep
low-power mode support for PXA27x is pending generic PM interfaces to
select more than 2 suspend-to-RAM-style power modes, but this is
expected soon. This can be hardcoded in the meantime by replacing the
pxa_cpu_suspend() parameter value.  From David Burrage and Todd Poynor.
Try #2 removes one of the register copies and moves the code to save the
pxa_cpu_suspend parameter to immediately surround the call that requires
the parameter value be preserved.

Signed-off-by: Todd Poynor <tpoynor@mvista.com>
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 16:25:01 +01:00
Jon Ringle
0b83f1400f [ARM] 2918/1: [update] Base port of Comdial MP1000 platfrom
Patch from Jon Ringle

Updated 2898/1 per comments:
- Removed fixup
- Moved code in mach-mp1000/ to mach-clps711x/
- Cleaned up code in mp1000-seprom.c. Eliminated code that displayed the contents of the eeprom
Please comment.

Signed-off-by: Jon Ringle
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 16:19:37 +01:00
Al Viro
53f9fc93f9 [PATCH] gfp_t: remaining bits of arch/*
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-28 08:16:51 -07:00
Al Viro
1ef64e670e [PATCH] gfp_t: sound
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-28 08:16:50 -07:00
Al Viro
5fb5cbed6e [PATCH] gfp_t: dma-mapping (xtensa)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-28 08:16:49 -07:00
Al Viro
f80aabb03a [PATCH] gfp_t: dma-mapping (amd64)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-28 08:16:48 -07:00
Al Viro
6dae2c2306 [PATCH] gfp_t: dma-mapping (sh)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-28 08:16:48 -07:00
Al Viro
e82dd4d647 [PATCH] gfp_t: dma-mapping (ppc)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-28 08:16:48 -07:00
Al Viro
5c1fb41f40 [PATCH] gfp_t: dma-mapping (parisc)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-28 08:16:48 -07:00
Al Viro
185a8ff528 [PATCH] gfp_t: dma-mapping (mips)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-28 08:16:48 -07:00
Al Viro
a5da7d3c6e [PATCH] gfp_t: dma-mapping (frv)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-28 08:16:48 -07:00
Al Viro
55c5d74b3a [PATCH] gfp_t: dma-mapping (alpha)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-28 08:16:48 -07:00
Al Viro
06a544971f [PATCH] gfp_t: dma-mapping (ia64)
... and related annotations for amd64 - swiotlb code is shared, but
prototypes are not.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-28 08:16:47 -07:00
Al Viro
f9e3214a79 [PATCH] gfp_t: dma-mapping (arm)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-28 08:16:47 -07:00
Ian Campbell
b572352159 [ARM] 3048/1: register i2s resources not i2c resources for the pxa i2s platform device
Patch from Ian Campbell

As noted by Uli Luckas in the comments of 3025 there is a typo in the i2s platform device. The i2s platform device refers to the i2c resources.

Signed-off-by: Ian Campbell <icampbell@arcom.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 15:31:48 +01:00
Ben Dooks
5771897614 [ARM] 3047/1: SMDK2440 - add framebuffer platform data
Patch from Ben Dooks

Add platform data for framebuffer for the
onboard LCD module

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 15:31:47 +01:00
Ben Dooks
58c8d570f3 [ARM] 3046/1: BAST - add framebuffer platform data
Patch from Ben Dooks

Add framebuffer platform data

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 15:31:46 +01:00
Ben Dooks
893b03094c [ARM] 3045/2: S3C2410 - change init for lcd platform data
Patch from Ben Dooks

Change set_s3c2410fb_info to s3c2410_fb_set_platdata
and use kmalloc() for the copy of the information it
is passed.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 15:31:45 +01:00
Ben Dooks
a0e0adb96e [ARM] 3034/1: S3C2410 - fix size of devices in devs.c
Patch from Ben Dooks

From: Guillaume GOURAT <guillaume.gourat@nexvision.fr>

A number of devices have an extra byte on the
end of their areas due to mis-calculating the
.end field of their resources

Signed-off-by: Guillaume GOURAT <guillaume.gourat@nexvision.fr>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 15:26:42 +01:00
Ben Dooks
42d3a120fe [ARM] 3033/1: S3C2410 - add generic gpio_cfgpin options
Patch from Ben Dooks

Add generic values for the parameters to the
s3c2410_gpio_cfgpin() function, so that a caller
does not need to know the exact constant for
the specified pin.

This is very useful for the case where a driver
is passed a gpio pin number and needs to reconfigure
the pin's function.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 15:26:41 +01:00
Nicolas Pitre
c09f98271f [ARM] 2930/1: optimized sha1 implementation for ARM
Patch from Nicolas Pitre

Here's an ARM assembly SHA1 implementation to replace the default C
version. It is approximately 50% faster than the generic C version. On
an XScale processor running at 400MHz:
	generic C version:	9.8 MB/s
	my version:		14.5 MB/s
This code is useful to quite a few callers in the tree:
crypto/sha1.c:		sha_transform(sctx->state, sctx->buffer, temp);
crypto/sha1.c:			sha_transform(sctx->state, &data[i], temp);
drivers/char/random.c:		sha_transform(buf, (__u8 *)r->pool+i, buf + 5);
drivers/char/random.c:	sha_transform(buf, (__u8 *)data, buf + 5);
net/ipv4/syncookies.c:	sha_transform(tmp + 16, (__u8 *)tmp, tmp + 16 + 5);

Signed-off-by: Nicolas Pitre <nico@cam.org>
Seems to work fine on big-endian as well.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 15:26:40 +01:00
Deepak Saxena
0b7cd62ecd [ARM] 3017/1: Add support for 36-bit addresses to create_mapping()
Patch from Deepak Saxena

This patch adds support for 36-bit static mapped I/O. While there
are no platforms in the tree ATM that use it, it has been tested
tested on the IXP2350 NPU and I would like to get the support for
that chipset upstream one piece at a time. There are also other
Intel chipset ports in development that are waiting on this to go
upstream.

The patch replaces the print formats for physical addresses with
%016llx which will create a bit extraneous output on 32-bit systems,
but I think that is cleaner than having #ifdefs, specially since
users will only see the output in error cases.

Depends on 3016/1.

Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 15:19:12 +01:00
Deepak Saxena
9769c2468d [ARM] 3016/1: Replace map_desc.physical with map_desc.pfn
Patch from Deepak Saxena

Convert map_desc.physical to map_desc.pfn. This allows us to add
support for 36-bit addressed physical devices in the static maps
without having to resort to u64 variables.

Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 15:19:11 +01:00
Deepak Saxena
c8d2729858 [ARM] 3001/1: Replace map_desc.physical with map_desc.pfn: Integrator
Patch from Deepak Saxena

Integrator map_desc.pfn conversion

Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 15:19:10 +01:00
Deepak Saxena
adecef744f [ARM] 3000/1: Replace map_desc.physical with map_desc.pfn: iMX
Patch from Deepak Saxena

iMX map_desc.pfn conversion

Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 15:19:10 +01:00
Deepak Saxena
3e9635e406 [ARM] 2999/1: Replace map_desc.physical with map_desc.pfn: H720x
Patch from Deepak Saxena

H720x map_desc.pfn conversion

Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 15:19:09 +01:00
Deepak Saxena
a427ceef93 [ARM] 2998/1: Replace map_desc.physical with map_desc.pfn: Footbridge
Patch from Deepak Saxena

Footbridge map_desc.pfn conversion

Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 15:19:08 +01:00
Deepak Saxena
6cb1907c1a [ARM] 2997/1: Replace map_desc.physical with map_desc.pfn: EBSA110
Patch from Deepak Saxena

EBSA110 map_desc.pfn conversion

Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 15:19:08 +01:00
Deepak Saxena
7a557e246f [ARM] 2996/1: Replace map_desc.physical with map_desc.pfn: EPXA10DB
Patch from Deepak Saxena

EPXA10DB mapd_desc.pfn conversion

Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 15:19:07 +01:00
Deepak Saxena
1311521fb1 [ARM] 2995/1: Replace map_desc.physical with map_desc.pfn: Versatile
Patch from Deepak Saxena

Versatile map_desc.pfn conversion

Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 15:19:06 +01:00
Deepak Saxena
d157e9ecec [ARM] 2994/1: Replace map_desc.physical with map_desc.pfn: CLPS7500
Patch from Deepak Saxena

CLSP7500 map_desc.pfn conversion

Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 15:19:05 +01:00
Deepak Saxena
f10083f5a6 [ARM] 2993/1: Replace map_desc.physical with map_desc.pfn: CLPS711x
Patch from Deepak Saxena

CLSP711x map_desc.pfn conversion

Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 15:19:05 +01:00
Deepak Saxena
92519d8282 [ARM] 2992/1: Replace map_desc.physical with map_desc.pfn: SA1100
Patch from Deepak Saxena

SA1100 map_desc.pfn conversion

Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 15:19:04 +01:00
Deepak Saxena
cd5fc8bffd [ARM] 2991/1: Replace map_desc.physical with map_desc.pfn: Shark
Patch from Deepak Saxena

Shark map_desc.pfn conversion

Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 15:19:03 +01:00
Deepak Saxena
1cc977a766 [ARM] 2990/1: Replace map_desc.physical with map_desc.pfn: S3C2410
Patch from Deepak Saxena

S3C2410 map_desc.pfn conversion

Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 15:19:02 +01:00
Deepak Saxena
f9258f226b [ARM] 2989/1: Replace map_desc.physical with map_desc.pfn: RiscPC
Patch from Deepak Saxena

RiscPC map_desc.pfn conversion

Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 15:19:02 +01:00
Deepak Saxena
6f9182eb32 [ARM] 2988/1: Replace map_desc.physical with map_desc.pfn: PXA
Patch from Deepak Saxena

PXA map_desc.pfn conversion

Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 15:19:01 +01:00
Deepak Saxena
9fe133b149 [ARM] 2987/1: Replace map_desc.physical with map_desc.pfn: OMAP
Patch from Deepak Saxena

OMAP map_desc.pfn conversion

Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 15:19:00 +01:00
Deepak Saxena
36d28c03d1 [ARM] 2986/1: Replace map_desc.physical with map_desc.pfn: LH7A40x
Patch from Deepak Saxena

LH7A40x map_desc.pfn conversion

Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 15:18:59 +01:00
Deepak Saxena
87fe04bd2a [ARM] 2985/1: Replace map_desc.physical with map_desc.pfn: IXP4xx
Patch from Deepak Saxena

IXP4xx map_desc.pfn conversion

Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 15:18:59 +01:00
Deepak Saxena
db0d087e34 [ARM] 2984/1: Replace map_desc.physical with map_desc.pfn: IXP2000
Patch from Deepak Saxena

IXP2000 map_desc.pfn conversion

Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 15:18:58 +01:00
Deepak Saxena
4835e64a5f [ARM] 2983/1: Replace map_desc.physical with map_desc.pfn: IOP3xx
Patch from Deepak Saxena

IOP3xx map_desc.pfn conversion

Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 15:18:57 +01:00
Deepak Saxena
f70cd65658 [ARM] 2982/1: Replace map_desc.physical with map_desc.pfn: aaec2000
Patch from Deepak Saxena

aaec2000 map_desc.pfn conversion

Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 15:18:56 +01:00
Russell King
c6b9dafce3 [ARM] 4/4 Combine oprofile common and init code
There is nothing special about having the init code separate from
the common code, so combine the two.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 14:56:04 +01:00
Russell King
55f052341f [ARM] 3/4 Rename common oprofile code
The common oprofile code assumes the name "PMU" (from Intel's
performance management unit).  This is misleading when we
start adding oprofile support for other machine types which
don't use the same terminology.  Call it op_arm_* instead of
pmu_*.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 14:54:21 +01:00
Russell King
7c5b3fc208 [ARM] 2/4 Fix oprofile suspend/resume
The oprofile suspend/resume was missing locking.  If we failed
to start oprofile on resume, we still reported that it was
enabled.  Instead, disable oprofile on error.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 14:52:30 +01:00
Russell King
b5893c56ca [ARM] 1/4 Move oprofile driver model code
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 14:51:15 +01:00
Russell King
90072059d2 [ARM] Re-jig bootmem initialisation
Make ARM independent of the way bootmem operates internally.  We
now map each node as we initialise it, and place the bootmem bitmap
inside each node, rather than all in the first node.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 14:48:37 +01:00
Russell King
f339ab3d6c [ARM] Fix sparse warnings
Fix sparse warnings in arch/arm/kernel/module.c,
arch/arm/mm/consistent.c, drivers/pcmcia/sa1111_generic.c,
and platform support files.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 14:29:43 +01:00
Russell King
674c045382 [ARM] 3/4: Remove asm/hardware.h from SA1100 io.h
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 14:25:28 +01:00
Paul Mackerras
f78541dcec powerpc: Merge xmon
The merged version follows the ppc64 version pretty closely mostly,
and in fact ARCH=ppc64 now uses the arch/powerpc/xmon version.
The main difference for ppc64 is that the 'p' command to call
show_state (which was always pretty dodgy) has been replaced by
the ppc32 'p' command, which calls a given procedure (so in fact
the old 'p' command behaviour can be achieved with 'p $show_state').

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-28 22:53:37 +10:00
Paul Mackerras
c032524f0d powerpc: Make single-stepping emulation (mostly) usable on 32-bit
The sc instruction emulation can't be done the same way on 32-bit
as 64-bit yet, but this should work OK.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-28 22:48:08 +10:00
Paul Mackerras
d73e0c99f5 powerpc: Rename asm offset TRAP to _TRAP for 32-bit
... for consistency with 64-bit.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-28 22:45:25 +10:00
Russell King
766529fa2c [ARM] 2/4: Remove asm/hardware.h from asm-arm/arch-ebsa110/io.h
EBSA110 only requires hardware.h to be included for a couple of
files.  Move the include there.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 10:29:21 +01:00
David Gibson
007e8f51b2 [PATCH] powerpc: Move xics.[ch] into platforms/pseries
This patch moves the XICS interrupt controller code into the
platforms/pseries directory, since it only appears on pSeries
machines.  If it ever appears on some other machine we can move it to
sysdev, although xics.c itself will need a bunch of changes in that
case to remove pSeries specific assumptions.

Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-28 16:39:19 +10:00
Paul Mackerras
22b280324a Merge git://oak/home/sfr/kernels/iseries/work/ 2005-10-28 13:50:39 +10:00
Paul Mackerras
4542437679 Merge in v2.6.14 by hand 2005-10-28 13:38:53 +10:00
Stephen Rothwell
299f6ce491 ppc64: use mem_64.S from powerpc/lib
and remove the same bits from ppc64/lib/string.S.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-28 12:54:35 +10:00
Stephen Rothwell
a4a264f144 ppc64: use usercopy_64.c from powerpc/lib
since it is identical to usercopy.c from ppc64/lib.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-28 12:54:26 +10:00
Stephen Rothwell
a2b0ca84a1 ppc64: user strcase.c from powerpc/lib
since it is identical to strcase.c from ppc64/lib.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-28 12:54:18 +10:00
Stephen Rothwell
a0d8bf9cf1 ppc64: use sstep.c from powerpc/lib
since it is identical to sstep.c from ppc64/lib.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-28 12:54:08 +10:00
Stephen Rothwell
12a39407f0 ppc64: use memcpy_64.S from powerpc/lib
since it is identical to mempcy.S from ppc64/lib.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-28 12:53:58 +10:00
Stephen Rothwell
ecc81e0f71 ppc64: use lockc.c from powerpc/lib
since it is effectively the same as locks.c from ppc64/lib.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-28 12:53:48 +10:00
Stephen Rothwell
43f35ec35c ppc64: use copyuser_64.S from powerpc/lib
since it is identical to copyuser.S from ppc64/lib.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-28 12:53:37 +10:00
Stephen Rothwell
34faa82841 ppc64: use copypage_64.S from powerpc/lib
since it is identical to copypage.S from ppc64/lib.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-28 12:53:27 +10:00
Stephen Rothwell
454fb016b3 ppc64: use e2a.c from powerpc/lib
since it is identical to e2a.c from ppc64/lib

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-28 12:53:13 +10:00
Stephen Rothwell
1a3c061efd ppc64: use checksum_64.S from powerpc
as it is identical to checksum.S from ppc64.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-28 12:52:58 +10:00
Stephen Rothwell
640768eef2 ppc64: use the merged syscall table
This allows us to also use entry_64.S from the merged tree and reverts
the setup_64.c part of fda262b897.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-28 12:51:45 +10:00
Paul Mackerras
2227718ca2 ppc64: Use the correct prototypes for i8259 functions
We still had an old copy of i8259.h lying around; this gets rid of it
and corrects the callers of i8259_init and i8259_irq.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-28 11:47:17 +10:00
David Gibson
a8e3d48150 [PATCH] powerpc: Remove dregs of bootinfo.h
Since I sent the patch to purge bootinfo.h from ARCH=powerpc and
ARCH=ppc64, setup-common.c has come into existence, and another
#include of bootinfo.h slipped in.  This patch removes it.  It also
removes include/asm-ppc64/bootinfo.h, which somehow survived the
previous patch which was supposed to remove it.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-28 11:37:03 +10:00
Kumar Gala
e6b4fe92ef [PATCH] powerpc: only build idle_6xx for 6xx
For the current time idle_6xx only applies to 6xx ppc32 CPUs

Signed-off-by: Kumar K. Gala <kumar.gala@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-28 11:36:55 +10:00
Cliff Wickman
4ac0068f44 [IA64] ptrace - find memory sharers on children list
In arch/ia64/kernel/ptrace.c there is a test for a peek or poke of a
register image (in register backing storage).
The test can be unnecessarily long (and occurs while holding the tasklist_lock).
Especially long on a large system with thousands of active tasks.

The ptrace caller (presumably a debugger) specifies the pid of
its target and an address to peek or poke.  But the debugger could be
attached to several tasks.
The idea of find_thread_for_addr() is to find whether the target address
is in the RBS for any of those tasks.

Currently it searches the thread-list of the target pid.  If that search
does not find a match, and the shared mm-struct's user count indicates
that there are other tasks sharing this address space (a rare occurrence),
a search is made of all the tasks in the system.

Another approach can drastically shorten this procedure.
It depends upon the fact that in order to peek or poke from/to any task,
the debugger must first attach to that task.  And when it does, the
attached task is made a child of the debugger (is chained to its children list).

Therefore we can search just the debugger's children list.

Signed-off-by: Cliff Wickman <cpw@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-10-27 16:15:03 -07:00
Paul Mackerras
9675c7ebcf ppc64: Include arch/powerpc/kernel/setup-common.o
... which is needed now that ARCH=ppc64 is using the merged
setup_64.c.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-28 08:30:25 +10:00
Paul Mackerras
09eee63471 powerpc: Move U3 IOMMU driver to arch/powerpc/sysdev
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-28 08:29:36 +10:00
Dean Roe
c1902aae32 [IA64] - Avoid slow TLB purges on SGI Altix systems
flush_tlb_all() can be a scaling issue on large SGI Altix systems
since it uses the global call_lock and always executes on all cpus.
When a process enters flush_tlb_range() to purge TLBs for another
process, it is possible to avoid flush_tlb_all() and instead allow
sn2_global_tlb_purge() to purge TLBs only where necessary.

This patch modifies flush_tlb_range() so that this case can be handled
by platform TLB purge functions and updates ia64_global_tlb_purge()
accordingly.  sn2_global_tlb_purge() now calculates the region register
value from the mm argument introduced with this patch.

Signed-off-by: Dean Roe <roe@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-10-27 14:44:58 -07:00
Paul Mackerras
bfab1019b7 powerpc: Fix new-world powermac detection
My G5 was being reported as an OldWorld in /proc/cpuinfo, which is
obviously not right... :)

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-27 22:45:33 +10:00
Paul Mackerras
6316222ea0 powerpc: Introduce toreal/fromreal assembly macros
On 32-bit platforms, these convert from kernel virtual addresses
to real (physical addresses), like tophys/tovirt but they use
the same register for the source and destination.  On 64-bit
platforms, they do nothing because the hardware ignores the top
two bits of the address in real mode.

These new macros are used in fpu.S now.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-27 22:44:39 +10:00
Paul Mackerras
80579e1f4a powerpc: 32-bit CHRP SMP fixes
Untested, but "should" work...  at least this way it compiles.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-27 22:42:04 +10:00
Paul Mackerras
eef69e3cfb powerpc: remove duplicate screen_info from setup_32.c
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-27 22:21:37 +10:00
Kumar Gala
4b24b01c6c [PATCH] powerpc: Moved dcr support to arch/powerpc
Signed-off-by: Kumar K. Gala <kumar.gala@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-27 20:51:22 +10:00
Kumar Gala
cffb09ce6b [PATCH] powerpc: Fix warning related to do_dabr
do_dabr() is not relevant on 40x or Book-E processors so dont build it

Signed-off-by: Kumar K. Gala <kumar.gala@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-27 20:51:19 +10:00
David Gibson
e37bc5df8e [PATCH] powerpc: Purge bootinfo.h
With ARCH=powerpc we assume the presence of a device tree, so we don't
require any support for the old bi_recs method of passing boot
parameters.  Likewise, we've never needed it for ppc64, but we still
had an include/asm-ppc64/bootinfo.h from which nothing was used.  This
patch removes that file, and all references to it in arch/ppc64 and
arch/powerpc.  A related, unused variable 'boot_mem_size' is also
removed from setup_32.c.  The bootinfo stuff remains in ARCH=ppc for
the time being.

Built and booted on Power5 (ARCH=ppc64 and ARCH=powerpc), built for
32-bit powermac (ARCH=powerpc and ARCH=ppc).

Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-27 20:50:46 +10:00
David Gibson
25c8a78b1e [PATCH] powerpc: Fix handling of fpscr on 64-bit
The recent merge of fpu.S broken the handling of fpscr for
ARCH=powerpc and CONFIG_PPC64=y.  FP registers could be corrupted,
leading to strange random application crashes.

The confusion arises, because the thread_struct has (and requires) a
64-bit area to save the fpscr, because we use load/store double
instructions to get it in to/out of the FPU.  However, only the low
32-bits are actually used, so we want to treat it as a 32-bit quantity
when manipulating its bits to avoid extra load/stores on 32-bit.  This
patch replaces the current definition with a structure of two 32-bit
quantities (pad and val), to clarify things as much as is possible.
The 'val' field is used when manipulating bits, the structure itself
is used when obtaining the address for loading/unloading the value
from the FPU.

While we're at it, consolidate the 4 (!) almost identical versions of
cvt_fd() and cvt_df() (arch/ppc/kernel/misc.S,
arch/ppc64/kernel/misc.S, arch/powerpc/kernel/misc_32.S,
arch/powerpc/kernel/misc_64.S) into a single version in fpu.S.  The
new version takes a pointer to thread_struct and applies the correct
offset itself, rather than a pointer to the fpscr field itself, again
to avoid confusion as to which is the correct field to use.

Finally, this patch makes ARCH=ppc64 also use the consolidated fpu.S
code, which it previously did not.

Built for G5 (ARCH=ppc64 and ARCH=powerpc), 32-bit powermac (ARCH=ppc
and ARCH=powerpc) and Walnut (ARCH=ppc, CONFIG_MATH_EMULATION=y).
Booted on G5 (ARCH=powerpc) and things which previously fell over no
longer do.

Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-27 20:48:50 +10:00
Paul Mackerras
fda262b897 [PATCH] ppc64: remove arch/ppc64/kernel/setup.c
and use setup_64.c from the merged tree instead.  The only difference
between them was the code to set up the syscall maps.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-27 20:20:42 +10:00
Kyle McMartin
e0f998930e Auto-update from upstream 2005-10-26 23:28:40 -04:00
Paul Mackerras
cb4ab974ae powerpc: Remove common stuff from setup_64.c
This should have been in commit 03501dab03
but got missed by accident.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-27 11:08:31 +10:00
Linus Torvalds
dd41bf9166 Merge master.kernel.org:/home/rmk/linux-2.6-arm 2005-10-26 14:01:57 -07:00
Benjamin Herrenschmidt
958d24df82 [PATCH] ppc64: Fix wrong register mapping in mpic driver
The mpic interrupt controller driver (used on G5 and early pSeries among
others) has a bug where it doesn't get the right virtual address for the
timer registers.  It causes the driver to poke at the MMIO space of
whatever has been mapped just next to it (ouch !) when initializing and
causes boot failures on some IBM machines.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-26 10:39:43 -07:00
Paul Mackerras
b6a4ce526a powerpc: 32-bit powermac needs the mpc106 code
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-26 22:54:17 +10:00
Paul Mackerras
bd561c79dc powerpc: Fix incorrect timer register addresses in mpic.c
We were computing the wrong address for the MPIC timer registers,
so when we went to initialize them we would have been hitting some
unrelated ioremap... oops.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-26 21:55:33 +10:00
Paul Mackerras
fa39dc437a powerpc32: Limit memory to lowmem if !CONFIG_HIGHMEM.
This trims off the extra unusable memory from the lmb structure,
so we don't try to use it.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-26 21:54:21 +10:00
Paul Mackerras
c49888203d powerpc: Fixes to get the Longtrail CHRP a bit further
Talk about buggy firmware...  the OF on the Longtrail returns 0
from the claim client service rather than -1 when the claim fails.
It also has no device_type on the /memory node and blows up if
the output buffer for package-to-path is too big.

This also fixes a bug with calling alloc_up with align == 0, where
we did _ALIGN_UP(alloc_bottom, 0) which will end up as 0.

Lastly, we now check the return value (in r3) from calling the
prom, and return -1 from call_prom if we get a negative value back.
That is supposed to indicate that the requested client service
doesn't exist.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-26 21:52:53 +10:00
Paul Mackerras
bbd0abda9c powerpc: Merge 32-bit CHRP support.
SMP still needs more work but UP gets as far as starting userspace
at least.  This uses the 64-bit-style code for spinning up the cpus.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-26 21:45:56 +10:00
Paul Mackerras
303d72a000 powerpc: Don't limit pmac_get_rtc_time to return only positive values
If the machine's clock is set to a bogus value, this check resulted
in userland waiting effectively forever for the RTC value to change,
so remove the check.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-26 17:22:33 +10:00
Paul Mackerras
6d0124fc06 powerpc: Fix interrupt-tree parsing
The interrupt-tree parsing code wasn't offsetting interrupt numbers
by 16 on 32-bit platforms with an i8259 interrupt controller, and
it was confused about the encoding of interrupt sense and level
(which is different for i8259 and openpic interrupt controllers,
just to make things interesting).

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-26 17:19:06 +10:00
Paul Mackerras
830825d6c3 powerpc: Pull out MPC106 (grackle) initialization code into its own file
This is so that the 32-bit CHRP code can use it.  The MPC106
initialization code is now in arch/powerpc/sysdev/grackle.c and
is controlled by CONFIG_PPC_MPC106.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-26 17:16:38 +10:00
Paul Mackerras
03501dab03 powerpc: Pull common bits of setup_{32,64}.c into setup-common.c
This creates a new arch/powerpc/kernel/setup-common.c with various
bits that setup_32.c and setup_64.c had in common - functions like
machine_shutdown/restart/power_off, show_cpuinfo, set_preferred_console
etc.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-26 17:11:18 +10:00
Paul Mackerras
033ef338b6 powerpc: Merge rtas.c into arch/powerpc/kernel
This splits arch/ppc64/kernel/rtas.c into arch/powerpc/kernel/rtas.c,
which contains generic RTAS functions useful on any CHRP platform,
and arch/powerpc/platforms/pseries/rtas-fw.[ch], which contain
some pSeries-specific firmware flashing bits.  The parts of rtas.c
that are to do with pSeries-specific error logging are protected
by a new CONFIG_RTAS_ERROR_LOGGING symbol.  The inclusion of rtas.o
is controlled by the CONFIG_PPC_RTAS symbol, and the relevant
platforms select that.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-26 17:05:24 +10:00
Paul Mackerras
f9bd170a87 powerpc: Merge i8259.c into arch/powerpc/sysdev
This changes the parameters for i8259_init so that it takes two
parameters: a physical address for generating an interrupt
acknowledge cycle, and an interrupt number offset.  i8259_init
now sets the irq_desc[] for its interrupts; all the callers
were doing this, and that code is gone now.  This also defines
a CONFIG_PPC_I8259 symbol to select i8259.o for inclusion, and
makes the platforms that need it select that symbol.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-26 16:47:42 +10:00
Paul Mackerras
25635c71e4 ppc: Use the indirect_pci.c from arch/powerpc/sysdev
This defines a CONFIG_INDIRECT_PCI symbol to control whether it
gets used or not, and fixes the Kconfig to select that symbol for
platforms that need it.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-26 16:36:55 +10:00
Michael Ellerman
d9953105ce [PATCH] powerpc: Move ras.c into arch/powerpc/platforms/pseries
ras.o is only built for CONFIG_PPC_PSERIES, so move it into
arch/powerpc/platforms/pseries. Update Makefiles to suit.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-26 16:00:29 +10:00
Kumar Gala
6d7f58b04d [PATCH] powerpc: Some minor cleanups to setup_32.c
* Removed of_show_percpuinfo and just report CPU frequency in generic
  show_cpuinfo code.
* Killed OCP and PPC_SYS related code which doesn't belong in the
  merge tree

Signed-off-by: Kumar K. Gala <kumar.gala@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-26 15:55:53 +10:00
Kumar Gala
0fd6f71794 [PATCH] powerpc: Add support for Book-E timer config to generic_calibrate_decr
We need to initialize some control SPRS for timers on Book-E before
we start taking decrementer interrupts.

Signed-off-by: Kumar K. Gala <kumar.gala@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-26 15:55:46 +10:00
Becky Bruce
ab590ccb42 [PATCH] ppc: Fix m82xx_pci build
A recent patch updated the name of pci_assign_all_busses to
pci_assign_all_buses.  This instance of its use wasn't corrected
by the original patch to use the new name.

Builds cleanly on ads8272.

Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-26 15:55:06 +10:00
Kumar Gala
60dda2565b [PATCH] powerpc: some prom.c cleanups
On !CONFIG_PPC_MULTIPLATFORM _machine is defined as 0.  This is ok, but
we can't assign a value to _machine then.

We may not have CONFIG_PCI available, so only build in support for
find_parent_pci_resource(), request_OF_resource(), release_OF_resource()
if PCI is enabled.  This is probably not the long term fix but works out
for now.

Make reg_property64 contain 64-bit elements on a 32-bit machine.

Mark the deprecated prom.c functions as __deprecated.

Signed-off-by: Kumar K. Gala <kumar.gala@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-26 15:52:56 +10:00
Kumar Gala
d2e6151257 [PATCH] powerpc: Make sure we have an RTC before trying to adjust it
Its valid for ppc_md.set_rtc_time to be NULL.  We need to check
that its non-NULL before trying to update the RTC.

Signed-off-by: Kumar K. Gala <kumar.gala@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-26 15:52:37 +10:00
Russ Anderson
e7f98dbbb8 [IA64-SGI] fix bte_copy() calling get_nasid() while preemptible
bte_copy() calls calls get_nasid(), which will get flagged if
preemption if enabled.  raw_smp_processor_id() is used instead.
It is OK if we migrate off node.

Signed-off-by: Russ Anderson (rja@sgi.com)
Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-10-25 16:53:38 -07:00
Dean Nelson
2792902946 [IA64-SGI] cleanup the way XPC locates the reserved page
Eliminate the passing in of a scratch buffer used for locating the
reserved page setup for XPC.

Signed-off-by: Dean Nelson <dcn@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-10-25 16:33:22 -07:00
Dean Nelson
4b38fcd485 [IA64-SGI] XPC changes to support more than 2k nasids
XPC needs to be changed to support up to 16k nasids on an SGI Altix system.

Signed-off-by: Dean Nelson <dcn@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-10-25 16:32:39 -07:00
Dean Nelson
e54af724c1 [IA64-SGI] fixes for XPC disengage and open/close protocol
This patch addresses a few issues with the open/close protocol that
were revealed by the newly added disengage functionality combined
with more extensive testing.

Signed-off-by: Dean Nelson <dcn@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-10-25 16:27:37 -07:00
hawkes@sgi.com
ddf6d0a00c [IA64] another place to use for_each_cpu_mask() in arch/ia64
In arch/ia64 change the explicit use of a for-loop using NR_CPUS into the
general for_each_online_cpu() construct.  This widens the scope of potential
future optimizations of the general constructs, as well as takes advantage
of the existing optimizations of first_cpu() and next_cpu(), which is
advantageous when the true CPU count is much smaller than NR_CPUS.

Signed-off-by: John Hawkes <hawkes@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-10-25 15:12:05 -07:00
hawkes@sgi.com
dc565b525d [IA64] wider use of for_each_cpu_mask() in arch/ia64
In arch/ia64 change the explicit use of for-loops and NR_CPUS into the
general for_each_cpu() or for_each_online_cpu() constructs, as
appropriate.  This widens the scope of potential future optimizations
of the general constructs, as well as takes advantage of the existing
optimizations of first_cpu() and next_cpu().

Signed-off-by: John Hawkes <hawkes@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-10-25 15:10:08 -07:00
H. J. Lu
9c184a073b [IA64] Fix 2.6 kernel for the new ia64 assembler
The new ia64 assembler uses slot 1 for the offset of a long (2-slot)
instruction and the old assembler uses slot 2. The 2.6 kernel assumes
slot 2 and won't boot when the new assembler is used:

http://sources.redhat.com/bugzilla/show_bug.cgi?id=1433

This patch will work with either slot 1 or 2.

Patch provided by H.J. Lu

Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-10-25 15:05:45 -07:00
Siddha, Suresh B
ce6e71ad48 [IA64] fix siblings field value in /proc/cpuinfo
Fix the "siblings" field value in /proc/cpuinfo so that it now shows the
number of siblings as seen by OS, instead of what is available from
hardware perspective.

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-10-25 15:00:36 -07:00
Peter Chubb
b6a7e1ecef [IA64] Allow simulator to use bigger disks
The simscsi code at present overflows an int if it's given a large
disk image.  The attached patch increases the possible size to 128G.
While it's unlikely that anyone will want to use SKI with such a
large drive, the same framework is currently being used for various
virtualisation experiments.

Signed-off-by: Peter Chubb <peterc@gelato.unsw.edu.au>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-10-25 14:36:55 -07:00
Pavel Machek
c34e152a49 [ARM] fix sharp zaurus c-3000 compile failure without CONFIG_FB_PXA
This fixes compile problem when CONFIG_FB_PXA is not set.

  LD      .tmp_vmlinux1
arch/arm/mach-pxa/built-in.o(.text+0x1d74): In function
`spitz_get_hsync_len':
: undefined reference to `pxafb_get_hsync_time'
make: *** [.tmp_vmlinux1] Error 1
3.46user 0.46system 5.10 (0m5.106s) elapsed 77.01%CPU

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-24 22:30:10 +01:00
Miklos Szeredi
10ded9493e [PATCH] uml: fix compile failure for TT mode
Without this patch, uml compile fails with:

  LD      .tmp_vmlinux1
arch/um/kernel/built-in.o: In function `config_gdb_cb':
arch/um/kernel/tt/gdb.c:129: undefined reference to `TASK_EXTERN_PID'

Tested on i386, but fix needed on x86_64 too AFAICS.

Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-24 08:59:25 -07:00
Stephen Rothwell
340601043d powerpc: Add a shutdown member to vio_driver
Add a shutdown member to struct vio_driver. We also need vio_bus_shutdown()
which converts from struct device to struct vio_dev and knows how to extract
the struct vio_driver.

Original patch adjusted for different location of vio.c.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-24 17:40:23 +10:00
Stephen Rothwell
7c7eb28481 powerpc: iseries: Fix a bogus comment
A comment in lpevents.c refers to code that's actually in HvCallEvent.h.
The code in HvCallEvent.h is pretty obvious, so just remove the comment
altogether.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-24 15:42:24 +10:00
Stephen Rothwell
6fdf5392ca powerpc: don't duplicate name between vio_driver and device_driver
Just set the name field directly in the device_driver structure
contained in the vio_driver struct.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-24 15:42:12 +10:00
Stephen Rothwell
580460194e powerpc: Merge arch/ppc64/kernel/vio.c into arch/powerpc/kernel/vio.c
Merge arch/ppc64/kernel/vio.c into arch/powerpc/kernel/vio.c, update
the Makefiles to make it work, and make ARCH=ppc64 still work.

Michael's version put vio.c in arch/powerpc/sysedv but after consolting
Paulus, this one puts it in arch/powerpc/kernel.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-24 15:41:44 +10:00
Paul Mackerras
85e568ea58 powerpc: Make coff boot wrapper load the kernel at 8M
Previously it claimed 7MB starting at the 9M point and loaded the
kernel there.  That meant that prom_init put the flattened device
tree above 16M.  On the 601 that caused the early device tree scan
to fail, since only 16MB are mapped with BATs on the 601.  Moving
this down to 8MB allows prom_init to put the flattened device tree
between 15M and 16M, so it works on the 601.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-23 17:26:32 +10:00
Paul Mackerras
a575b80717 powerpc: Run on old powermacs.
Old powermacs have a number of differences from current machines:
- there is no interrupt tree in the device tree, just interrupt
  or AAPL,interrupt properties
- the chosen node in the device tree is called /chosen@0
- the OF claim method doesn't map the memory, so we have to do
  an explicit map call as well
- there is no /chosen/cpu property on SMP machines
- the NVRAM isn't structured as a set of partitions.

This adapts the merged powermac support code to cope with these
issues.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-23 17:23:21 +10:00
Paul Mackerras
96c4450760 powerpc: Fix time code for 601 processors
The 601 doesn't have the timebase register; instead it has an RTCL
register that counts nanoseconds and wraps at 1000000000, and an
RTCU register that counts seconds.  This makes the necessary changes
for the merged time code to use the RTCL/U registers when the kernel
is running on a 601.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-23 17:14:56 +10:00
Paul Mackerras
985990137e Merge changes from linux-2.6 by hand 2005-10-22 16:51:34 +10:00
Paul Mackerras
8342894475 ppc64: Use arch/powerpc/platforms/powermac for powermac build.
This switches the ARCH=ppc64 build to use arch/powerpc/platforms/powermac
instead of arch/ppc64/kernel/pmac*, and deletes the latter set of files.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-22 16:06:27 +10:00
Paul Mackerras
35499c0195 powerpc: Merge in 64-bit powermac support.
This brings in a lot of changes from arch/ppc64/kernel/pmac_*.c to
arch/powerpc/platforms/powermac/*.c and makes various minor tweaks
elsewhere.  On the powermac we now initialize ppc_md by copying
the whole pmac_md structure into it, which required some changes in
the ordering of initializations of individual fields of it.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-22 16:02:39 +10:00
Paul Mackerras
ef1a12817a ppc64: Simplify secondary CPU startup on powermacs
... for consistency with ppc32, and because this way is neater.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-22 15:55:58 +10:00
Paul Mackerras
529294d59f ppc64: Rearrange btext initialization for consistency with ppc32
Moved init_boot_display from arch/ppc64/kernel/pmac_setup.c to
arch/ppc64/kernel/btext.c and declared it in asm-ppc64/btext.h.
Call it from init_early rather than pmac_init_early.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-22 15:36:52 +10:00
Paul Mackerras
f7abbc190b ppc64: Add a `primary' argument to pci_process_bridge_OF_ranges
... for consistency with ppc32 and to make the powermac merge easier.
Also make it use just a single resource in the host bridge for multiple
consecutive elements of the ranges property.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-22 15:03:21 +10:00
Paul Mackerras
a5b518ed31 ppc64/powerpc: Fix time initialization on SMP systems
This moves smp_space_timers from arch/ppc64/kernel/smp.c to
arch/powerpc/kernel/time.c and makes it initialize last_jiffy[]
instead of paca[].next_jiffy_update_tb, since last_jiffy[] is
now what the time code uses.  It also declares smp_space_timers
in include/asm-powerpc/time.h and gets rid of an ifdef in
div128_by_32.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-22 14:55:23 +10:00
Paul Mackerras
e2b5530698 ppc64: Fix delivery of RT signals to 32-bit processes.
An error in merging led to 32-bit processes getting the wrong link
register value on entry to RT signal handlers, and the wrong stack
chain as well.  This fixes it.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-22 14:46:33 +10:00
Paul Mackerras
5c8c56ebdf powerpc: Move agp_special_page export to where it is defined
... instead of exporting it in arch/*/kernel/ppc_ksyms.c.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-22 14:42:51 +10:00
Kyle McMartin
2767820133 [PARISC] defconfig updates
defconfig updates from Kyle McMartin, Grant Grundler,
and Matthew Wilcox.

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-10-21 23:11:03 -04:00
Grant Grundler
e55fb3e787 [PARISC] Properly specify section alignment for real2.S
.align applies to the current section - ie section directives come first.
Thanks to Joel Soete for catching this.

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-10-21 22:56:53 -04:00
Grant Grundler
61520e1f8f [PARISC] Specify level to fix binutils level promotion bug
fixup.S needs to specify .level and use correct LDREG macro.
New binutils has a bug where it doesn't "promote" from PA1.0 to PA1.1
correctly when using ",s" completer.

remove use of __LP64__ in assembly.h and add some white space.

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-10-21 22:56:35 -04:00
Matthew Wilcox
e635c96ed6 [PARISC] Explicitly specify sr4 when flushing kernel space
Specify sr4 when flushing kernel space (we could equally well use sr5-7,
but must not use sr0).

Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-10-21 22:56:14 -04:00
Grant Grundler
9b3b331d03 [PARISC] Properly specify index field to I/D cache flush ops
replace use of "0" with "%r0" since PA 1.1 I/D flush ops only take a
general register and not an immediate value for the index field.
This just forces the code to always be PA 1.1 "clean".

From: Joel Soete <soete.joel@tiscali.be>
Signed-off-by: Grant Grundler <grundler@parisc-linux.org>

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-10-21 22:55:51 -04:00
Grant Grundler
37318a3cb1 [PARISC] Fix copy_user_page_asm to NOT access past end of page
2.6.12-rc2-pa3 fix copy_user_page_asm to NOT access past end of page.

My bad. /o\
Lamont confirmed that instructions following a conditional
branch are *alway* executed regardless if the branch is taken or not.
Unless they are nullified (which was missing in this case).

He also noted:
Conditional branches nullify on forward taken branch, and on
non-taken backward branch. Note that .+4 is a backwards branch.

This makes alot more sense than the giberish in the PA20 arch book.

Compiles and boots on both 64-bit (a500) and 32-bit (j6k).

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-10-21 22:55:34 -04:00
James Bottomley
dd0fd51dc1 [PARISC] Remove the spurious do_softirq calls from entry.S
remove the spurious do_softirq calls from entry.S

With these in we were calling do_softirq twice; plus the calls in
entry.S took no account of nesting.

Signed-off-by: James Bottomley <jejb@parisc-linux.org>

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-10-21 22:54:38 -04:00
James Bottomley
618febd678 [PARISC] Fix the alloc_slabmgmt panic
Fix the alloc_slabmgmt panic

Hopefully this should also fix a lot of other intermittent kernel bugs.

The problem has been around since 2.6.9-rc2-pa6 when we allowed
floating point registers to be used in kernel code.  The essence of
the problem is that gcc prefers to use floating point for integer
divides and multiples.  Further, it can rely on the values in the no
clobber fp regs being correct across a function call.  Unfortunately,
our task switch function only saves the integer no clobber registers,
not the fp ones, so if gcc makes a function call to any function in
the kernel which could sleep, the values it is relying on in any no
clobber floating point register may be lost.  In the case of
alloc_slabmgmt, the value of the page offset is being stored in %fr12
across a call to kmem_getpages(), which sleeps if no pages are
available.  Thus, the offset can be trashed and the slab code can end
up with a completely bogus address leading to corruption.

Kudos to Randolph who came up with the program to trip this problem at
will and thus allowed it to be tracked and fixed.

Signed-off-by: James Bottomley <jejb@parisc-linux.org>

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-10-21 22:53:26 -04:00
Carlos O'Donell
b2450cc1b7 [PARISC] Implement 5 argument clone.
* arch/parisc/kernel/process.c (sys_clone): Use 5 args, and process
  CLONE_PARENT_SETTID, CLONE_CHILD_SETTID, CLONE_CHILD_CLEARTID.
  (copy_thread): First cut at CLONE_SETTLS.

Signed-off-by: Carlos O'Donell <carlos@parisc-linux.org>

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-10-21 22:53:04 -04:00
Grant Grundler
8b631342dd [PARISC] Update Kconfig for itimer selection
2.6.14-rc2-pa1: enable 100/250/1000HZ itimer selection

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>

Mark floppy as broken.  Thanks Joel

Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>

make DISCONTIGMEM depend on 64BIT

Signed-off-by: Thibaut VARENE <varenet@parisc-linux.org>

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-10-21 22:52:46 -04:00
Randolph Chung
5beb5f32c5 [PARISC] Update minimum compiler version and CROSS_COMPILE for parisc64
Prefix changed in debian, include "gnu" in the commandline.

Signed-off-by: Carlos O'Donell <carlos@parisc-linux.org>

Ensure the compiler version is new enough (>= 3.3)

Signed-off-by: Randolph Chung <tausq@parisc-linux.org>

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-10-21 22:52:00 -04:00
Grant Grundler
675ec7a56a [PARISC] Document history of PDC_NARROW as it is now obsolete
Document history of PDC_NARROW a bit as it will still show
up in an older kernel's .config file.

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-10-21 22:51:40 -04:00
Jesper Juhl
c8e8b1937a [PARISC] kfree cleanups to ioctl32.c
2.6.12-rc2-pa2 kfree cleanups from Jesper Juhl

Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
Signed-off-by: Grant Grundler <grundler@parisc-linux.org>

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-10-21 22:51:23 -04:00
Grant Grundler
b8db800295 [PARISC] Cleanup whitespace and handle proc_mkdir() failures in pci-dma.c
1) cleanup whitespace and handle proc_mkdir() failures.
   From: Christophe Lucas <clucas@rotomalug.org>

2) rename "dino" entry to "pcxl_dma"...also seems like it's in
   the wrong location.

3) don't dump resource bitmap in /proc/pcxl_dma output

4) fixup compiler warning

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-10-21 22:50:48 -04:00
Grant Grundler
8054f03f63 [PARISC] More informative error message in pcibios_link_hba_resources
Generate a more informative message when a resource does not have
a parent.

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-10-21 22:50:33 -04:00
Matthew Wilcox
7c92e972da [PARISC] Update pdc console from parisc tree
Get rid of some unnecessary includes
Remove a layer of macro indirection around pdc_console_device
Delete pdc_console_die() as it is unused
Avoid double-printing on panic by clearing CON_PRINTBUFFER rather than
setting con_start to be log_end
Make con_start and log_end static again

Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-10-21 22:50:06 -04:00
Randolph Chung
40c72f20e8 [PARISC] Prevent signal loops if we have a problem setting up a frame
2.6.13-rc6-pa2
use force_sigsegv() if we have a problem setting up a frame. This is
required to prevent SIGSEGV loops.

Signed-off-by: Randolph Chung <tausq@parisc-linux.org>

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-10-21 22:49:47 -04:00
Thibaut Varene
eba917273e [PARISC] Add printing of fpregs state to stack dump
We're using fp regs now in the kernel, so we want to print them
on stack dump

Signed-off-by: Thibaut VARENE <varenet@parisc-linux.org>

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-10-21 22:49:25 -04:00
Randolph Chung
fa681a1800 [PARISC] Disable use of fpregs in pa_memcpy
Disable use of fpregs in pa_memcpy, and turn on the
-mdisable-fpregs flag.

Signed-off-by: Randolph Chung <tausq@parisc-linux.org>

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-10-21 22:48:34 -04:00
Grant Grundler
91313d60d8 [PARISC] Add sync required after fdc to enforce insn ordering
PA20 arch book (page 7-52 and 7-55) indicate a "sync" is required after
the FDC "to enforce instruction ordering". And we want to make
sure FIC is executed after FDC has retired.

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-10-21 22:47:40 -04:00
Grant Grundler
413059f28e [PARISC] Replace uses of __LP64__ with CONFIG_64BIT
2.6.12-rc4-pa3 s/__LP64__/CONFIG_64BIT/ and fixup config.h usage

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-10-21 22:46:48 -04:00
Grant Grundler
3499495205 [PARISC] Use work queue in LED/LCD driver instead of tasklet.
2.6.12-rc1-pa6 use work queue in LED/LCD driver instead of tasklet.

Main advantage is it allows use of msleep() in the led_LCD_driver to
"atomically" perform two MMIO writes (CMD, then DATA).
Lead to nice cleanup of the main led_work_func() and led_LCD_driver().
Kudos to David for being persistent.

From: David Pye <dmp@davidmpye.dyndns.org>
Signed-off-by: Grant Grundler <grundler@parisc-linux.org>

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-10-21 22:46:18 -04:00
Jens Axboe
ba1f188cae [PARISC] Add new ioprio_{set,get} syscalls
add syscall entries for ioprio_set/get as per Jens Axboe.

Signed-off-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Grant Grundler <grundler@parisc-linux.org>

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-10-21 22:45:57 -04:00
Stuart Brady
2464212f68 [PARISC] Fix parisc_setup_cache_timing to choose a better flush threshold
update comment about CAFL_STRIDE

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>

Fixed a bug in parisc_setup_cache_timing() which caused it to calculate
a poor value for parisc_cache_flush_threshold.

Thanks to Joel Soete for spotting the bug.
Thanks to James Bottomley for pointing out the clean way to fix this.

Signed-off-by: Stuart Brady <sdb@parisc-linux.org>

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-10-21 22:44:14 -04:00
Kyle McMartin
f053725b89 [PARISC] Add ability for prctl to change unaligned trap behaviour
Add support for changing unaligned trap behaviour on a
per-thread basis.

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-10-21 22:43:15 -04:00
Randolph Chung
99ac794799 [PARISC] Replace some calls to bl with b,l or bv to use longer offsets
convert some bl calls to b,l or bv to use longer offsets

Signed-off-by: Randolph Chung <tausq@parisc-linux.org>

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-10-21 22:42:57 -04:00
Randolph Chung
5cd55b0ede [PARISC] Take into account nullified insn and lock functions for profiling
export profile_pc() symbol - oprofile needs it when built as a module.

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>

Take into account nullified insn and lock functions for profiling

This is needed at the end of functions; it is typical that the return
branch nullifies the next insn, which is in the next function. This
causes profiling data to show up against the "wrong" function.

We also count lock times against the locker. This is consistent with
other architectures.

Signed-off-by: Randolph Chung <tausq@parisc-linux.org>

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-10-21 22:42:18 -04:00
Grant Grundler
896a375623 [PARISC] Make sure use of RFI conforms to PA 2.0 and 1.1 arch docs
2.6.12-rc4-pa3 : first pass at making sure use of RFI conforms to
PA 2.0 arch pages F-4 and F-5, PA 1.1 Arch page 3-19 and 3-20.

The discussion revolves around all the rules for clearing PSW Q-bit.
The hard part is meeting all the rules for "relied upon translation".

.align directive is used to guarantee the critical sequence ends more than
8 instructions (32 bytes) from the end of page.

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-10-21 22:40:07 -04:00
Matthew Wilcox
53f01bba49 [PARISC] Convert parisc_device to use struct resource for hpa
Convert pa_dev->hpa from an unsigned long to a struct resource.

Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>

Fix up users of ->hpa to use ->hpa.start instead.

Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-10-21 22:36:40 -04:00
Matthew Wilcox
5658374766 [PARISC] Convert parisc_device tree to use struct device klists
Fix parse_tree_node.  much more needs to be done to fix this file.

Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>

Make drivers.c compile based on a patch from Pat Mochel.

From: Patrick Mochel <mochel@digitalimplant.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>

Fix drivers.c to create new device tree nodes when no match is found.

Signed-off-by: Richard Hirst <rhirst@parisc-linux.org>

Do a proper depth-first search returning parents before children, using the
new klist infrastructure.

Signed-off-by: Richard Hirst <rhirst@parisc-linux.org>

Fixed parisc_device traversal so that pdc_stable works again
Fixed check_dev so it doesn't dereference a parisc_device until it
has verified the bus type

Signed-off-by: Randolph Chung <tausq@parisc-linux.org>

Convert pa_dev->hpa from an unsigned long to a struct resource.
Use insert_resource() instead of request_mem_region().
Request resources at bus walk time instead of driver probe time.
Don't release the resources as we don't have any hotplug parisc_device
support yet.
Add parisc_pathname() to conveniently get the textual representation
of the hwpath used in sysfs.
Inline the remnants of claim_device() into its caller.

Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>

I noticed that some of the STI regions weren't showing up in iomem.
Reading the STI spec indicated that all STI devices occupy at least 32MB.
So check for STI HPAs and give them 32MB instead of 4kB.

Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-10-21 22:33:38 -04:00
Chris Wright
63172cb3d5 [PATCH] typo fix in last cpufreq powernow patch
Not sure how it slipped by, but here's a trivial typo fix for powernow.

Signed-off-by: Chris Wright <chrisw@osdl.org>
[ It's "nurter" backwards.. Maybe we have a hillbilly The Shining fan? ]
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-21 17:08:30 -07:00
Dave Jones
0213df7431 [PATCH] cpufreq: fix pending powernow timer stuck condition
AMD recently discovered that on some hardware, there is a race condition
possible when a C-state change request goes onto the bus at the same
time as a P-state change request.

Both requests happen, but the southbridge hardware only acknowledges the
C-state change.  The PowerNow! driver is then stuck in a loop, waiting
for the P-state change acknowledgement.  The driver eventually times
out, but can no longer perform P-state changes.

It turns out the solution is to resend the P-state change, which the
southbridge will acknowledge normally.

Thanks to Johannes Winkelmann for reporting this and testing the fix.

Signed-off-by: Mark Langsdorf <mark.langsdorf@amd.com>
Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-21 14:28:58 -07:00
David Gibson
3078fcc1d1 [PATCH] ppc64: Fix typo bug in iSeries hash code
This fixes a stupid typo bug in the iSeries hash table code.

When we place a hash PTE in the secondary bucket, instead of setting the
SECONDARY flag bit, as we should, we (redundantly) set the VALID flag.

This was introduced with the patch abolishing bitfields from the hash
table code.  Mea culpa, oops.  It hasn't been noticed until now because
in practice we don't hit the secondary bucket terribly often.

Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-21 12:24:41 -07:00
Linus Torvalds
2c86c83bf4 Merge master.kernel.org:/home/rmk/linux-2.6-arm 2005-10-21 12:23:07 -07:00
Benjamin Herrenschmidt
5d96551541 [PATCH] ppc64: Fix pages marked dirty abusively
While working on 64K pages, I found this little buglet in our
update_mmu_cache() implementation.

The code calls __hash_page() passing it an "access" parameter (the type
of access that triggers the hash) containing the bits _PAGE_RW and
_PAGE_USER of the linux PTE.  The latter is useless in this case and the
former is wrong.  In fact, if we have a writeable PTE and we pass
_PAGE_RW to hash_page(), it will set _PAGE_DIRTY (since we track dirty
that way, by hash faulting !dirty) which is not what we want.

In fact, the correct fix is to always pass 0. That means that only
read-only or already dirty read write PTEs will be preloaded. The
(hopefully rare) case of a non dirty read write PTE can't be preloaded
this way, it will have to fault in hash_page on the actual access.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-21 12:17:43 -07:00
Paul Mackerras
a1c7e11193 [PATCH] ppc64: Fix typo in time calculations
This fixes a typo in the div128_by_32 function used in the timekeeping
calculations on ppc64.  If you look at the code it's quite obvious
that we need (rb + c) rather than (rb + b).  The "b" is clearly just a
typo.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-21 12:17:43 -07:00
Michael Ellerman
05d84681ab [PATCH] powerpc: Fix mmap returning 64 bit addresses
The merge of syscalls.c & sys_ppc32.c (30286ef6e0)
broke mmap, if the mmap returned a 64 bit address.

do_mmap2 was taking the return value from do_mmap_pgoff (an unsigned long), and
storing it in an int, before returning it to sys_mmap as an unsigned long. So
we were losing the high bits of the address.

You would have thought the compiler could catch this for us ...

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-21 22:47:52 +10:00
Michael Ellerman
90eac727c6 [PATCH] powerpc: Don't blow away load_addr in start_thread
The patch to make process.c work for 32-bit and 64-bit
(06d67d5474) broke some 64-bit binaries.
We were blowing away load_addr in gpr[2], so we weren't properly relocating
the entry point.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-21 22:47:39 +10:00
David Gibson
6cb7bfebb1 [PATCH] powerpc: Merge thread_info.h
Merge ppc32 and ppc64 versions of thread_info.h.  They were pretty
similar already, the chief changes are:

	- Instead of inline asm to implement current_thread_info(),
which needs to be different for ppc32 and ppc64, we use C with an
asm("r1") register variable.  gcc turns it into the same asm as we
used to have for both platforms.
	- We replace ppc32's 'local_flags' with the ppc64
'syscall_noerror' field.  The noerror flag was in fact the only thing
in the local_flags field anyway, so the ppc64 approach is simpler, and
means we only need a load-immediate/store instead of load/mask/store
when clearing the flag.
	- In readiness for 64k pages, when THREAD_SIZE will be less
than a page, ppc64 used kmalloc() rather than get_free_pages() to
allocate the kernel stack.  With this patch we do the same for ppc32,
since there's no strong reason not to.
	- For ppc64, we no longer export THREAD_SHIFT and THREAD_SIZE
via asm-offsets, thread_info.h can now be safely included in asm, as
on ppc32.

Built and booted on G4 Powerbook (ARCH=ppc and ARCH=powerpc) and
Power5 (ARCH=ppc64 and ARCH=powerpc).

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-21 22:47:23 +10:00
David Gibson
b0faa28493 [PATCH] Fix broken initialization of conswitchp for ARCH=ppc64
In the merge tree, commit 0458060c1c
broke boot on some machines because the initialization of conswitchp
was moved to arch/powerpc/kernel/setup_64.c, but a corresponding copy
was not added to arch/ppc64/kernel/setup.c.  This patch fixes it.

Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-21 22:47:09 +10:00
Russell King
d185663760 [ARM] Fix Integrator IM/PD-1 support
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-21 10:17:37 +01:00
Ben Dooks
b048dbf4d4 [ARM] 3027/1: BAST - reduce NAND timings slightly
Patch from Ben Dooks

The current Simtec BAST nand area timings are a little
too slow to be obtained by a 2410 running at 266MHz,
so reduce the timings slightly to bring them into the
acceptable range.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-20 23:21:19 +01:00
Matt Reimer
b2640b420a [ARM] 3025/1: Add I2S platform device for PXA
Patch from Matt Reimer

Adds an I2S platform_device for PXA. I2S is used to interface
with sound chips on systems like iPAQ h1910/h2200/hx4700 and
Asus 716.

Signed-off-by: mreimer@vpop.net
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-20 23:21:18 +01:00
Tony Luck
9cec58dc13 Update from upstream with manual merge of Yasunori Goto's
changes to swiotlb.c made in commit 281dd25cdc
since this file has been moved from arch/ia64/lib/swiotlb.c to
lib/swiotlb.c

Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-10-20 10:41:44 -07:00
Paul Mackerras
5d14a18d59 powerpc: Fix some bugs in the new merged time code
I had the sense of the test for when to use the old 601-style RTC
registers inverted.  pmac_calibrate_decr and via_calibrate_decr
weren't setting ppc_tb_freq, on which all the further calculations
depended.  Lastly, update_gtod was losing the top 32 bits of
the new tb_to_xs value.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-20 22:33:06 +10:00
Paul Mackerras
17a6392d30 powerpc/ppc/ppc64: Various compile fixes.
This declares powersave_nap in system.h and makes it an int everywhere,
fixes typos for the maple platform, fixes a couple of places where
I missed removing the last two arguments from a message_pass function,
and makes ppc64 consistent with ppc32 in the type of the
pci_bridge.cfg_data field.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-20 21:10:09 +10:00
Paul Mackerras
d85b525e6e ppc64: Use the merged mpic.c
This means we now compile in arch/powerpc/sysdev for ARCH=ppc64.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-20 21:06:44 +10:00
Paul Mackerras
374e99d450 powerpc: Move some calculations from xxx_calibrate_decr to time_init
Previously the individual xxx_calibrate_decr functions would each
print the timebase and cpu frequency and calculate several values
such as tb_to_us and tb_to_xs.  This moves those printks and
calculations into time_init just after the call to the platform's
calibrate_decr function.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-20 21:04:51 +10:00
Paul Mackerras
0458060c1c ppc64: Move init_boot_text call and conswitchp init into setup_arch
This way they get done in one place for all platforms, and it is
more consistent with what ppc32 does.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-20 21:00:20 +10:00
Paul Mackerras
399fe2bdd3 ppc: rename pci_assign_all_busses to pci_assign_all_buses
... for consistency with ppc64 and to make merging easier.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-20 20:57:05 +10:00
Paul Mackerras
0dd194d02d powerpc: Fix places where ppc_md.show_[per]cpuinfo was treated as int
I missed a few places where ppc code was still assuming that the
ppc_md.show_[per]cpuinfo functions returned int.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-20 20:48:19 +10:00
Paul Mackerras
a9c5926469 powerpc: Move smp_mpic_message_pass into mpic.c
Having it here rather than in arch/ppc64/kernel/smp.c means that
we can use it on 32-bit SMP systems easily with ARCH=powerpc.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-20 17:09:51 +10:00
Paul Mackerras
d8699e65c6 ppc64: Change ppc_md.get_cpuinfo to ppc_md.show_cpuinfo
... for consistency with ppc32; also add in ppc32's show_percpuinfo
function.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-20 17:02:01 +10:00
David Gibson
f7f6f4fea6 [PATCH] powerpc: Merge ppc64 pmc.[ch] with ppc32 perfmon.[ch]
This patches the ppc32 and ppc64 versions of the headers and .c files
with helper functions for manipulating the performance counting
hardware.  As a side effect, it removes use of the term "perfmon" from
ppc32, thus avoiding confusion with the unrelated performance counter
interface from HP Labs also called "perfmon".

Built, but not booted, for g5, pSeries, iSeries, and 32-bit Powermac
with both ARCH=powerpc and ARCH=ppc{,64} as appropriate.

Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-20 16:22:24 +10:00
Al Viro
450da6ca97 [PATCH] build fix for uml/amd64
Missing half of the [PATCH] uml: Fix sysrq-r support for skas mode
We need to remove these (UPT_[DEFG]S) from the read side as well as the
write one - otherwise it simply won't build.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Acked-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-19 23:18:16 -07:00
Paul Mackerras
bf3f81b3f7 [PATCH] ppc64: update defconfigs
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-19 23:12:36 -07:00
Linus Torvalds
26baeba8dd Merge master.kernel.org:/home/rmk/linux-2.6-arm 2005-10-19 23:12:03 -07:00
Yasunori Goto
281dd25cdc [PATCH] swiotlb: make sure initial DMA allocations really are in DMA memory
This introduces a limit parameter to the core bootmem allocator; The new
parameter indicates that physical memory allocated by the bootmem
allocator should be within the requested limit.

We also introduce alloc_bootmem_low_pages_limit, alloc_bootmem_node_limit,
alloc_bootmem_low_pages_node_limit apis, but alloc_bootmem_low_pages_limit
is the only api used for swiotlb.

The existing alloc_bootmem_low_pages() api could instead have been
changed and made to pass right limit to the core allocator.  But that
would make the patch more intrusive for 2.6.14, as other arches use
alloc_bootmem_low_pages().  We may be done that post 2.6.14 as a
cleanup.

With this, swiotlb gets memory within 4G for both x86_64 and ia64
arches.

Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com>
Cc: Ravikiran G Thirumalai <kiran@scalex86.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-19 23:11:33 -07:00
Benjamin Herrenschmidt
83bcbf8dad [PATCH] ppc64: Fix error in vDSO 32 bits date
The implementation of __kernel_gettimeofday() in the 32 bits vDSO has a
small bug (a typo actually) that will cause it to lose 1 bit of precision.
Not terribly bad but worth fixing.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-19 23:04:30 -07:00
Kumar Gala
3d904eef54 [PATCH] ppc32: replace use of _GLOBAL with .globl for ppc32
The _GLOBAL() macro is for text symbols only. Changed to using
.globl for .data symbols.  This is also needed in ppc32 land
to allow FSL Book-E, 40x, and 44x to work.

Signed-off-by: Kumar K. Gala <kumar.gala@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-20 09:43:34 +10:00
Kumar Gala
b15125fa81 [PATCH] powerpc: Some more fixes to allow building for a Book-E processor
Some minor fixes that are needed if we are building for a book-e
processor.

Signed-off-by: Kumar K. Gala <kumar.gala@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-20 09:43:32 +10:00
Paul Mackerras
344480b997 powerpc: Fix a corner case in __div64_32
The code was incorrectly doing a division by 0 in the case where
the denominator was 0x100000000 and the divisor was 0xffffffff.
Thanks to Fred Liu of Motorola for pointing this out.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-20 09:37:02 +10:00
Paul Mackerras
a4bcc95a3a powerpc: Fix a branch-too-far link error for 32-bit targets
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-20 09:24:18 +10:00
Paul Mackerras
f2783c1500 powerpc: Merge time.c and asm/time.h.
We now use the merged time.c for both 32-bit and 64-bit compilation
with ARCH=powerpc, and for ARCH=ppc64, but not for ARCH=ppc32.
This removes setup_default_decr (folds its function into time_init)
and moves wakeup_decrementer into time.c.  This also makes an
asm-powerpc/rtc.h.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-20 09:23:26 +10:00
Paul Mackerras
03f88e9f71 ppc64: Minor compilation fixes
This defines CONFIG_PPC_STD_MMU for ppc64, changes an instance of
sys32_ to compat_sys_ in the ppc64 syscall table, and removes a
reference to a non-existent arch/powerpc/xmon/Makefile.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-20 09:15:05 +10:00
Paul Mackerras
b123923d48 powerpc: Move ptrace32.c from arch/ppc64 to arch/powerpc
Also corrected my email address in ptrace.c and updated the comments
at the top of ptrace32.c.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-20 09:11:29 +10:00
Tony Lindgren
67c5587ad4 [ARM] 3024/1: Add cpu_v6_proc_fin
Patch from Tony Lindgren

Machine restart calls cpu_proc_fin() to clean and disable
cache, and turn off interrupts. This patch adds proper
cpu_v6_proc_fin.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-19 23:00:56 +01:00
Paul Mackerras
9b7cf8b49d powerpc: Eliminate a compile warning in signal_32.c
The second argument of get_sigset_t needed to have the const keyword.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-19 23:13:04 +10:00
Paul Mackerras
143a1dec7e powerpc: Merge machdep.h
A few things change for consistency between ppc32 and ppc64:
idle functions return void; *_get_boot_time functions return
unsigned long (i.e. time_t) rather than filling in a struct rtc_time
(since that's useful to the callers and easier for pmac to
generate); *_get_rtc_time and *_set_rtc_time functions take
a struct rtc_time; irq_canonicalize is gone; nvram_sync returns
void.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-19 23:11:21 +10:00
Paul Mackerras
7ed476d17f ppc: Minor smp changes for consistency with ppc64
This makes platform code use the smp_ops variable directly instead
of ppc_md.smp_ops, removes the two unused `data' and `wait' arguments
from the *_message_pass() functions, and removes the call to the
never-implemented smp_ops->space_timers() function.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-19 21:44:51 +10:00
Ben Dooks
c086f282c0 [ARM] 3018/1: S3C2410 - check de-referenced device is really a platform device
Patch from Ben Dooks

Check that the device we are looking at is really
a platform device before trying to cast it to one
to find out the platform bus number.

Thanks to RMK for pointing this out.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-18 07:51:34 +01:00
Paul Mackerras
46aab8c584 Merge rsync://oak/kernels/iseries/work/ 2005-10-18 14:53:41 +10:00
Stephen Rothwell
b09a4913b1 powerpc: change sys32_ to compat_sys_
This allows us to get rid of one type of entry in systbl.S.

In passing we remove the duplicate compat_sys_getdents and
compat_sys_utimes for which there are generic versions.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-18 14:51:57 +10:00
Paul Mackerras
77f543cb46 powerpc: Fix various compile errors with ARCH=ppc, ppc64 and powerpc
This makes ppc use the syscalls.c from arch/powerpc/kernel, exports
copy_and_flush from head_32.S for use by prom_init.c (ARCH=powerpc),
and consolidates the sys_fadvise64_64 implementations for 32-bit.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-18 14:19:41 +10:00
Stephen Rothwell
81e7009ea4 powerpc: merge ppc signal.c and ppc64 signal32.c
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-18 11:17:58 +10:00
David Gibson
55d363397f [PATCH] powerpc: Another maple merge tree fix
With ARCH=powerpc, a spurious ifdef in prom_init prevented the
seconday hold loop being correctly copied down on Maple.  With this
patch, Maple boots with ARCH=powerpc

Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-17 21:43:12 +10:00
David Gibson
61f684ec07 [PATCH] powerpc: Fix use of LOADBASE in merge tree
The merge-tree version of LOADBASE actually loads the whole given
address from the toc for ppc64.  The matching OFF macro adjust for
this, using an offset of 0 for ppc64, but we weren't using that in
power4_idle.

Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-17 21:43:12 +10:00
Kumar Gala
ea703ce206 [PATCH] powerpc: replace use of _GLOBAL with .globl
The _GLOBAL() macro is for text symbols only. Changed to using
.globl for .data symbols.

Signed-off-by: Kumar K. Gala <kumar.gala@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-17 21:43:12 +10:00
Paul Mackerras
5f29675533 powerpc: Make CONFIG_PROC_DEVICETREE independent of CONFIG_PPC_OF
... since all platforms will have a device tree.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-17 20:14:59 +10:00