Merge with /home/shaggy/git/linus-clean/
Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
This commit is contained in:
commit
a5c96cab8f
|
@ -149,6 +149,11 @@ USB, framebuffer devices, the VFS, the SCSI subsystem, etc. See the
|
|||
MAINTAINERS file for a mailing list that relates specifically to
|
||||
your change.
|
||||
|
||||
If changes affect userland-kernel interfaces, please send
|
||||
the MAN-PAGES maintainer (as listed in the MAINTAINERS file)
|
||||
a man-pages patch, or at least a notification of the change,
|
||||
so that some information makes its way into the manual pages.
|
||||
|
||||
Even if the maintainer did not respond in step #4, make sure to ALWAYS
|
||||
copy the maintainer when you change their code.
|
||||
|
||||
|
|
|
@ -104,6 +104,7 @@ logo_*.c
|
|||
logo_*_clut224.c
|
||||
logo_*_mono.c
|
||||
lxdialog
|
||||
mach-types
|
||||
mach-types.h
|
||||
make_times_h
|
||||
map
|
||||
|
|
|
@ -144,7 +144,21 @@ vgapal Use the standard vga registers for palette changes.
|
|||
This is the default.
|
||||
pmipal Use the protected mode interface for palette changes.
|
||||
|
||||
mtrr setup memory type range registers for the vesafb framebuffer.
|
||||
mtrr:n setup memory type range registers for the vesafb framebuffer
|
||||
where n:
|
||||
0 - disabled (equivalent to nomtrr)
|
||||
1 - uncachable
|
||||
2 - write-back
|
||||
3 - write-combining (default)
|
||||
4 - write-through
|
||||
|
||||
If you see the following in dmesg, choose the type that matches the
|
||||
old one. In this example, use "mtrr:2".
|
||||
...
|
||||
mtrr: type mismatch for e0000000,8000000 old: write-back new: write-combining
|
||||
...
|
||||
|
||||
nomtrr disable mtrr
|
||||
|
||||
vremap:n
|
||||
remap 'n' MiB of video RAM. If 0 or not specified, remap memory
|
||||
|
|
|
@ -0,0 +1,588 @@
|
|||
Title : Kernel Probes (Kprobes)
|
||||
Authors : Jim Keniston <jkenisto@us.ibm.com>
|
||||
: Prasanna S Panchamukhi <prasanna@in.ibm.com>
|
||||
|
||||
CONTENTS
|
||||
|
||||
1. Concepts: Kprobes, Jprobes, Return Probes
|
||||
2. Architectures Supported
|
||||
3. Configuring Kprobes
|
||||
4. API Reference
|
||||
5. Kprobes Features and Limitations
|
||||
6. Probe Overhead
|
||||
7. TODO
|
||||
8. Kprobes Example
|
||||
9. Jprobes Example
|
||||
10. Kretprobes Example
|
||||
|
||||
1. Concepts: Kprobes, Jprobes, Return Probes
|
||||
|
||||
Kprobes enables you to dynamically break into any kernel routine and
|
||||
collect debugging and performance information non-disruptively. You
|
||||
can trap at almost any kernel code address, specifying a handler
|
||||
routine to be invoked when the breakpoint is hit.
|
||||
|
||||
There are currently three types of probes: kprobes, jprobes, and
|
||||
kretprobes (also called return probes). A kprobe can be inserted
|
||||
on virtually any instruction in the kernel. A jprobe is inserted at
|
||||
the entry to a kernel function, and provides convenient access to the
|
||||
function's arguments. A return probe fires when a specified function
|
||||
returns.
|
||||
|
||||
In the typical case, Kprobes-based instrumentation is packaged as
|
||||
a kernel module. The module's init function installs ("registers")
|
||||
one or more probes, and the exit function unregisters them. A
|
||||
registration function such as register_kprobe() specifies where
|
||||
the probe is to be inserted and what handler is to be called when
|
||||
the probe is hit.
|
||||
|
||||
The next three subsections explain how the different types of
|
||||
probes work. They explain certain things that you'll need to
|
||||
know in order to make the best use of Kprobes -- e.g., the
|
||||
difference between a pre_handler and a post_handler, and how
|
||||
to use the maxactive and nmissed fields of a kretprobe. But
|
||||
if you're in a hurry to start using Kprobes, you can skip ahead
|
||||
to section 2.
|
||||
|
||||
1.1 How Does a Kprobe Work?
|
||||
|
||||
When a kprobe is registered, Kprobes makes a copy of the probed
|
||||
instruction and replaces the first byte(s) of the probed instruction
|
||||
with a breakpoint instruction (e.g., int3 on i386 and x86_64).
|
||||
|
||||
When a CPU hits the breakpoint instruction, a trap occurs, the CPU's
|
||||
registers are saved, and control passes to Kprobes via the
|
||||
notifier_call_chain mechanism. Kprobes executes the "pre_handler"
|
||||
associated with the kprobe, passing the handler the addresses of the
|
||||
kprobe struct and the saved registers.
|
||||
|
||||
Next, Kprobes single-steps its copy of the probed instruction.
|
||||
(It would be simpler to single-step the actual instruction in place,
|
||||
but then Kprobes would have to temporarily remove the breakpoint
|
||||
instruction. This would open a small time window when another CPU
|
||||
could sail right past the probepoint.)
|
||||
|
||||
After the instruction is single-stepped, Kprobes executes the
|
||||
"post_handler," if any, that is associated with the kprobe.
|
||||
Execution then continues with the instruction following the probepoint.
|
||||
|
||||
1.2 How Does a Jprobe Work?
|
||||
|
||||
A jprobe is implemented using a kprobe that is placed on a function's
|
||||
entry point. It employs a simple mirroring principle to allow
|
||||
seamless access to the probed function's arguments. The jprobe
|
||||
handler routine should have the same signature (arg list and return
|
||||
type) as the function being probed, and must always end by calling
|
||||
the Kprobes function jprobe_return().
|
||||
|
||||
Here's how it works. When the probe is hit, Kprobes makes a copy of
|
||||
the saved registers and a generous portion of the stack (see below).
|
||||
Kprobes then points the saved instruction pointer at the jprobe's
|
||||
handler routine, and returns from the trap. As a result, control
|
||||
passes to the handler, which is presented with the same register and
|
||||
stack contents as the probed function. When it is done, the handler
|
||||
calls jprobe_return(), which traps again to restore the original stack
|
||||
contents and processor state and switch to the probed function.
|
||||
|
||||
By convention, the callee owns its arguments, so gcc may produce code
|
||||
that unexpectedly modifies that portion of the stack. This is why
|
||||
Kprobes saves a copy of the stack and restores it after the jprobe
|
||||
handler has run. Up to MAX_STACK_SIZE bytes are copied -- e.g.,
|
||||
64 bytes on i386.
|
||||
|
||||
Note that the probed function's args may be passed on the stack
|
||||
or in registers (e.g., for x86_64 or for an i386 fastcall function).
|
||||
The jprobe will work in either case, so long as the handler's
|
||||
prototype matches that of the probed function.
|
||||
|
||||
1.3 How Does a Return Probe Work?
|
||||
|
||||
When you call register_kretprobe(), Kprobes establishes a kprobe at
|
||||
the entry to the function. When the probed function is called and this
|
||||
probe is hit, Kprobes saves a copy of the return address, and replaces
|
||||
the return address with the address of a "trampoline." The trampoline
|
||||
is an arbitrary piece of code -- typically just a nop instruction.
|
||||
At boot time, Kprobes registers a kprobe at the trampoline.
|
||||
|
||||
When the probed function executes its return instruction, control
|
||||
passes to the trampoline and that probe is hit. Kprobes' trampoline
|
||||
handler calls the user-specified handler associated with the kretprobe,
|
||||
then sets the saved instruction pointer to the saved return address,
|
||||
and that's where execution resumes upon return from the trap.
|
||||
|
||||
While the probed function is executing, its return address is
|
||||
stored in an object of type kretprobe_instance. Before calling
|
||||
register_kretprobe(), the user sets the maxactive field of the
|
||||
kretprobe struct to specify how many instances of the specified
|
||||
function can be probed simultaneously. register_kretprobe()
|
||||
pre-allocates the indicated number of kretprobe_instance objects.
|
||||
|
||||
For example, if the function is non-recursive and is called with a
|
||||
spinlock held, maxactive = 1 should be enough. If the function is
|
||||
non-recursive and can never relinquish the CPU (e.g., via a semaphore
|
||||
or preemption), NR_CPUS should be enough. If maxactive <= 0, it is
|
||||
set to a default value. If CONFIG_PREEMPT is enabled, the default
|
||||
is max(10, 2*NR_CPUS). Otherwise, the default is NR_CPUS.
|
||||
|
||||
It's not a disaster if you set maxactive too low; you'll just miss
|
||||
some probes. In the kretprobe struct, the nmissed field is set to
|
||||
zero when the return probe is registered, and is incremented every
|
||||
time the probed function is entered but there is no kretprobe_instance
|
||||
object available for establishing the return probe.
|
||||
|
||||
2. Architectures Supported
|
||||
|
||||
Kprobes, jprobes, and return probes are implemented on the following
|
||||
architectures:
|
||||
|
||||
- i386
|
||||
- x86_64 (AMD-64, E64MT)
|
||||
- ppc64
|
||||
- ia64 (Support for probes on certain instruction types is still in progress.)
|
||||
- sparc64 (Return probes not yet implemented.)
|
||||
|
||||
3. Configuring Kprobes
|
||||
|
||||
When configuring the kernel using make menuconfig/xconfig/oldconfig,
|
||||
ensure that CONFIG_KPROBES is set to "y". Under "Kernel hacking",
|
||||
look for "Kprobes". You may have to enable "Kernel debugging"
|
||||
(CONFIG_DEBUG_KERNEL) before you can enable Kprobes.
|
||||
|
||||
You may also want to ensure that CONFIG_KALLSYMS and perhaps even
|
||||
CONFIG_KALLSYMS_ALL are set to "y", since kallsyms_lookup_name()
|
||||
is a handy, version-independent way to find a function's address.
|
||||
|
||||
If you need to insert a probe in the middle of a function, you may find
|
||||
it useful to "Compile the kernel with debug info" (CONFIG_DEBUG_INFO),
|
||||
so you can use "objdump -d -l vmlinux" to see the source-to-object
|
||||
code mapping.
|
||||
|
||||
4. API Reference
|
||||
|
||||
The Kprobes API includes a "register" function and an "unregister"
|
||||
function for each type of probe. Here are terse, mini-man-page
|
||||
specifications for these functions and the associated probe handlers
|
||||
that you'll write. See the latter half of this document for examples.
|
||||
|
||||
4.1 register_kprobe
|
||||
|
||||
#include <linux/kprobes.h>
|
||||
int register_kprobe(struct kprobe *kp);
|
||||
|
||||
Sets a breakpoint at the address kp->addr. When the breakpoint is
|
||||
hit, Kprobes calls kp->pre_handler. After the probed instruction
|
||||
is single-stepped, Kprobe calls kp->post_handler. If a fault
|
||||
occurs during execution of kp->pre_handler or kp->post_handler,
|
||||
or during single-stepping of the probed instruction, Kprobes calls
|
||||
kp->fault_handler. Any or all handlers can be NULL.
|
||||
|
||||
register_kprobe() returns 0 on success, or a negative errno otherwise.
|
||||
|
||||
User's pre-handler (kp->pre_handler):
|
||||
#include <linux/kprobes.h>
|
||||
#include <linux/ptrace.h>
|
||||
int pre_handler(struct kprobe *p, struct pt_regs *regs);
|
||||
|
||||
Called with p pointing to the kprobe associated with the breakpoint,
|
||||
and regs pointing to the struct containing the registers saved when
|
||||
the breakpoint was hit. Return 0 here unless you're a Kprobes geek.
|
||||
|
||||
User's post-handler (kp->post_handler):
|
||||
#include <linux/kprobes.h>
|
||||
#include <linux/ptrace.h>
|
||||
void post_handler(struct kprobe *p, struct pt_regs *regs,
|
||||
unsigned long flags);
|
||||
|
||||
p and regs are as described for the pre_handler. flags always seems
|
||||
to be zero.
|
||||
|
||||
User's fault-handler (kp->fault_handler):
|
||||
#include <linux/kprobes.h>
|
||||
#include <linux/ptrace.h>
|
||||
int fault_handler(struct kprobe *p, struct pt_regs *regs, int trapnr);
|
||||
|
||||
p and regs are as described for the pre_handler. trapnr is the
|
||||
architecture-specific trap number associated with the fault (e.g.,
|
||||
on i386, 13 for a general protection fault or 14 for a page fault).
|
||||
Returns 1 if it successfully handled the exception.
|
||||
|
||||
4.2 register_jprobe
|
||||
|
||||
#include <linux/kprobes.h>
|
||||
int register_jprobe(struct jprobe *jp)
|
||||
|
||||
Sets a breakpoint at the address jp->kp.addr, which must be the address
|
||||
of the first instruction of a function. When the breakpoint is hit,
|
||||
Kprobes runs the handler whose address is jp->entry.
|
||||
|
||||
The handler should have the same arg list and return type as the probed
|
||||
function; and just before it returns, it must call jprobe_return().
|
||||
(The handler never actually returns, since jprobe_return() returns
|
||||
control to Kprobes.) If the probed function is declared asmlinkage,
|
||||
fastcall, or anything else that affects how args are passed, the
|
||||
handler's declaration must match.
|
||||
|
||||
register_jprobe() returns 0 on success, or a negative errno otherwise.
|
||||
|
||||
4.3 register_kretprobe
|
||||
|
||||
#include <linux/kprobes.h>
|
||||
int register_kretprobe(struct kretprobe *rp);
|
||||
|
||||
Establishes a return probe for the function whose address is
|
||||
rp->kp.addr. When that function returns, Kprobes calls rp->handler.
|
||||
You must set rp->maxactive appropriately before you call
|
||||
register_kretprobe(); see "How Does a Return Probe Work?" for details.
|
||||
|
||||
register_kretprobe() returns 0 on success, or a negative errno
|
||||
otherwise.
|
||||
|
||||
User's return-probe handler (rp->handler):
|
||||
#include <linux/kprobes.h>
|
||||
#include <linux/ptrace.h>
|
||||
int kretprobe_handler(struct kretprobe_instance *ri, struct pt_regs *regs);
|
||||
|
||||
regs is as described for kprobe.pre_handler. ri points to the
|
||||
kretprobe_instance object, of which the following fields may be
|
||||
of interest:
|
||||
- ret_addr: the return address
|
||||
- rp: points to the corresponding kretprobe object
|
||||
- task: points to the corresponding task struct
|
||||
The handler's return value is currently ignored.
|
||||
|
||||
4.4 unregister_*probe
|
||||
|
||||
#include <linux/kprobes.h>
|
||||
void unregister_kprobe(struct kprobe *kp);
|
||||
void unregister_jprobe(struct jprobe *jp);
|
||||
void unregister_kretprobe(struct kretprobe *rp);
|
||||
|
||||
Removes the specified probe. The unregister function can be called
|
||||
at any time after the probe has been registered.
|
||||
|
||||
5. Kprobes Features and Limitations
|
||||
|
||||
As of Linux v2.6.12, Kprobes allows multiple probes at the same
|
||||
address. Currently, however, there cannot be multiple jprobes on
|
||||
the same function at the same time.
|
||||
|
||||
In general, you can install a probe anywhere in the kernel.
|
||||
In particular, you can probe interrupt handlers. Known exceptions
|
||||
are discussed in this section.
|
||||
|
||||
For obvious reasons, it's a bad idea to install a probe in
|
||||
the code that implements Kprobes (mostly kernel/kprobes.c and
|
||||
arch/*/kernel/kprobes.c). A patch in the v2.6.13 timeframe instructs
|
||||
Kprobes to reject such requests.
|
||||
|
||||
If you install a probe in an inline-able function, Kprobes makes
|
||||
no attempt to chase down all inline instances of the function and
|
||||
install probes there. gcc may inline a function without being asked,
|
||||
so keep this in mind if you're not seeing the probe hits you expect.
|
||||
|
||||
A probe handler can modify the environment of the probed function
|
||||
-- e.g., by modifying kernel data structures, or by modifying the
|
||||
contents of the pt_regs struct (which are restored to the registers
|
||||
upon return from the breakpoint). So Kprobes can be used, for example,
|
||||
to install a bug fix or to inject faults for testing. Kprobes, of
|
||||
course, has no way to distinguish the deliberately injected faults
|
||||
from the accidental ones. Don't drink and probe.
|
||||
|
||||
Kprobes makes no attempt to prevent probe handlers from stepping on
|
||||
each other -- e.g., probing printk() and then calling printk() from a
|
||||
probe handler. As of Linux v2.6.12, if a probe handler hits a probe,
|
||||
that second probe's handlers won't be run in that instance.
|
||||
|
||||
In Linux v2.6.12 and previous versions, Kprobes' data structures are
|
||||
protected by a single lock that is held during probe registration and
|
||||
unregistration and while handlers are run. Thus, no two handlers
|
||||
can run simultaneously. To improve scalability on SMP systems,
|
||||
this restriction will probably be removed soon, in which case
|
||||
multiple handlers (or multiple instances of the same handler) may
|
||||
run concurrently on different CPUs. Code your handlers accordingly.
|
||||
|
||||
Kprobes does not use semaphores or allocate memory except during
|
||||
registration and unregistration.
|
||||
|
||||
Probe handlers are run with preemption disabled. Depending on the
|
||||
architecture, handlers may also run with interrupts disabled. In any
|
||||
case, your handler should not yield the CPU (e.g., by attempting to
|
||||
acquire a semaphore).
|
||||
|
||||
Since a return probe is implemented by replacing the return
|
||||
address with the trampoline's address, stack backtraces and calls
|
||||
to __builtin_return_address() will typically yield the trampoline's
|
||||
address instead of the real return address for kretprobed functions.
|
||||
(As far as we can tell, __builtin_return_address() is used only
|
||||
for instrumentation and error reporting.)
|
||||
|
||||
If the number of times a function is called does not match the
|
||||
number of times it returns, registering a return probe on that
|
||||
function may produce undesirable results. We have the do_exit()
|
||||
and do_execve() cases covered. do_fork() is not an issue. We're
|
||||
unaware of other specific cases where this could be a problem.
|
||||
|
||||
6. Probe Overhead
|
||||
|
||||
On a typical CPU in use in 2005, a kprobe hit takes 0.5 to 1.0
|
||||
microseconds to process. Specifically, a benchmark that hits the same
|
||||
probepoint repeatedly, firing a simple handler each time, reports 1-2
|
||||
million hits per second, depending on the architecture. A jprobe or
|
||||
return-probe hit typically takes 50-75% longer than a kprobe hit.
|
||||
When you have a return probe set on a function, adding a kprobe at
|
||||
the entry to that function adds essentially no overhead.
|
||||
|
||||
Here are sample overhead figures (in usec) for different architectures.
|
||||
k = kprobe; j = jprobe; r = return probe; kr = kprobe + return probe
|
||||
on same function; jr = jprobe + return probe on same function
|
||||
|
||||
i386: Intel Pentium M, 1495 MHz, 2957.31 bogomips
|
||||
k = 0.57 usec; j = 1.00; r = 0.92; kr = 0.99; jr = 1.40
|
||||
|
||||
x86_64: AMD Opteron 246, 1994 MHz, 3971.48 bogomips
|
||||
k = 0.49 usec; j = 0.76; r = 0.80; kr = 0.82; jr = 1.07
|
||||
|
||||
ppc64: POWER5 (gr), 1656 MHz (SMT disabled, 1 virtual CPU per physical CPU)
|
||||
k = 0.77 usec; j = 1.31; r = 1.26; kr = 1.45; jr = 1.99
|
||||
|
||||
7. TODO
|
||||
|
||||
a. SystemTap (http://sourceware.org/systemtap): Work in progress
|
||||
to provide a simplified programming interface for probe-based
|
||||
instrumentation.
|
||||
b. Improved SMP scalability: Currently, work is in progress to handle
|
||||
multiple kprobes in parallel.
|
||||
c. Kernel return probes for sparc64.
|
||||
d. Support for other architectures.
|
||||
e. User-space probes.
|
||||
|
||||
8. Kprobes Example
|
||||
|
||||
Here's a sample kernel module showing the use of kprobes to dump a
|
||||
stack trace and selected i386 registers when do_fork() is called.
|
||||
----- cut here -----
|
||||
/*kprobe_example.c*/
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/kprobes.h>
|
||||
#include <linux/kallsyms.h>
|
||||
#include <linux/sched.h>
|
||||
|
||||
/*For each probe you need to allocate a kprobe structure*/
|
||||
static struct kprobe kp;
|
||||
|
||||
/*kprobe pre_handler: called just before the probed instruction is executed*/
|
||||
int handler_pre(struct kprobe *p, struct pt_regs *regs)
|
||||
{
|
||||
printk("pre_handler: p->addr=0x%p, eip=%lx, eflags=0x%lx\n",
|
||||
p->addr, regs->eip, regs->eflags);
|
||||
dump_stack();
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*kprobe post_handler: called after the probed instruction is executed*/
|
||||
void handler_post(struct kprobe *p, struct pt_regs *regs, unsigned long flags)
|
||||
{
|
||||
printk("post_handler: p->addr=0x%p, eflags=0x%lx\n",
|
||||
p->addr, regs->eflags);
|
||||
}
|
||||
|
||||
/* fault_handler: this is called if an exception is generated for any
|
||||
* instruction within the pre- or post-handler, or when Kprobes
|
||||
* single-steps the probed instruction.
|
||||
*/
|
||||
int handler_fault(struct kprobe *p, struct pt_regs *regs, int trapnr)
|
||||
{
|
||||
printk("fault_handler: p->addr=0x%p, trap #%dn",
|
||||
p->addr, trapnr);
|
||||
/* Return 0 because we don't handle the fault. */
|
||||
return 0;
|
||||
}
|
||||
|
||||
int init_module(void)
|
||||
{
|
||||
int ret;
|
||||
kp.pre_handler = handler_pre;
|
||||
kp.post_handler = handler_post;
|
||||
kp.fault_handler = handler_fault;
|
||||
kp.addr = (kprobe_opcode_t*) kallsyms_lookup_name("do_fork");
|
||||
/* register the kprobe now */
|
||||
if (!kp.addr) {
|
||||
printk("Couldn't find %s to plant kprobe\n", "do_fork");
|
||||
return -1;
|
||||
}
|
||||
if ((ret = register_kprobe(&kp) < 0)) {
|
||||
printk("register_kprobe failed, returned %d\n", ret);
|
||||
return -1;
|
||||
}
|
||||
printk("kprobe registered\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
void cleanup_module(void)
|
||||
{
|
||||
unregister_kprobe(&kp);
|
||||
printk("kprobe unregistered\n");
|
||||
}
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
----- cut here -----
|
||||
|
||||
You can build the kernel module, kprobe-example.ko, using the following
|
||||
Makefile:
|
||||
----- cut here -----
|
||||
obj-m := kprobe-example.o
|
||||
KDIR := /lib/modules/$(shell uname -r)/build
|
||||
PWD := $(shell pwd)
|
||||
default:
|
||||
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
|
||||
clean:
|
||||
rm -f *.mod.c *.ko *.o
|
||||
----- cut here -----
|
||||
|
||||
$ make
|
||||
$ su -
|
||||
...
|
||||
# insmod kprobe-example.ko
|
||||
|
||||
You will see the trace data in /var/log/messages and on the console
|
||||
whenever do_fork() is invoked to create a new process.
|
||||
|
||||
9. Jprobes Example
|
||||
|
||||
Here's a sample kernel module showing the use of jprobes to dump
|
||||
the arguments of do_fork().
|
||||
----- cut here -----
|
||||
/*jprobe-example.c */
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/uio.h>
|
||||
#include <linux/kprobes.h>
|
||||
#include <linux/kallsyms.h>
|
||||
|
||||
/*
|
||||
* Jumper probe for do_fork.
|
||||
* Mirror principle enables access to arguments of the probed routine
|
||||
* from the probe handler.
|
||||
*/
|
||||
|
||||
/* Proxy routine having the same arguments as actual do_fork() routine */
|
||||
long jdo_fork(unsigned long clone_flags, unsigned long stack_start,
|
||||
struct pt_regs *regs, unsigned long stack_size,
|
||||
int __user * parent_tidptr, int __user * child_tidptr)
|
||||
{
|
||||
printk("jprobe: clone_flags=0x%lx, stack_size=0x%lx, regs=0x%p\n",
|
||||
clone_flags, stack_size, regs);
|
||||
/* Always end with a call to jprobe_return(). */
|
||||
jprobe_return();
|
||||
/*NOTREACHED*/
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct jprobe my_jprobe = {
|
||||
.entry = (kprobe_opcode_t *) jdo_fork
|
||||
};
|
||||
|
||||
int init_module(void)
|
||||
{
|
||||
int ret;
|
||||
my_jprobe.kp.addr = (kprobe_opcode_t *) kallsyms_lookup_name("do_fork");
|
||||
if (!my_jprobe.kp.addr) {
|
||||
printk("Couldn't find %s to plant jprobe\n", "do_fork");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if ((ret = register_jprobe(&my_jprobe)) <0) {
|
||||
printk("register_jprobe failed, returned %d\n", ret);
|
||||
return -1;
|
||||
}
|
||||
printk("Planted jprobe at %p, handler addr %p\n",
|
||||
my_jprobe.kp.addr, my_jprobe.entry);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void cleanup_module(void)
|
||||
{
|
||||
unregister_jprobe(&my_jprobe);
|
||||
printk("jprobe unregistered\n");
|
||||
}
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
----- cut here -----
|
||||
|
||||
Build and insert the kernel module as shown in the above kprobe
|
||||
example. You will see the trace data in /var/log/messages and on
|
||||
the console whenever do_fork() is invoked to create a new process.
|
||||
(Some messages may be suppressed if syslogd is configured to
|
||||
eliminate duplicate messages.)
|
||||
|
||||
10. Kretprobes Example
|
||||
|
||||
Here's a sample kernel module showing the use of return probes to
|
||||
report failed calls to sys_open().
|
||||
----- cut here -----
|
||||
/*kretprobe-example.c*/
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/kprobes.h>
|
||||
#include <linux/kallsyms.h>
|
||||
|
||||
static const char *probed_func = "sys_open";
|
||||
|
||||
/* Return-probe handler: If the probed function fails, log the return value. */
|
||||
static int ret_handler(struct kretprobe_instance *ri, struct pt_regs *regs)
|
||||
{
|
||||
// Substitute the appropriate register name for your architecture --
|
||||
// e.g., regs->rax for x86_64, regs->gpr[3] for ppc64.
|
||||
int retval = (int) regs->eax;
|
||||
if (retval < 0) {
|
||||
printk("%s returns %d\n", probed_func, retval);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct kretprobe my_kretprobe = {
|
||||
.handler = ret_handler,
|
||||
/* Probe up to 20 instances concurrently. */
|
||||
.maxactive = 20
|
||||
};
|
||||
|
||||
int init_module(void)
|
||||
{
|
||||
int ret;
|
||||
my_kretprobe.kp.addr =
|
||||
(kprobe_opcode_t *) kallsyms_lookup_name(probed_func);
|
||||
if (!my_kretprobe.kp.addr) {
|
||||
printk("Couldn't find %s to plant return probe\n", probed_func);
|
||||
return -1;
|
||||
}
|
||||
if ((ret = register_kretprobe(&my_kretprobe)) < 0) {
|
||||
printk("register_kretprobe failed, returned %d\n", ret);
|
||||
return -1;
|
||||
}
|
||||
printk("Planted return probe at %p\n", my_kretprobe.kp.addr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void cleanup_module(void)
|
||||
{
|
||||
unregister_kretprobe(&my_kretprobe);
|
||||
printk("kretprobe unregistered\n");
|
||||
/* nmissed > 0 suggests that maxactive was set too low. */
|
||||
printk("Missed probing %d instances of %s\n",
|
||||
my_kretprobe.nmissed, probed_func);
|
||||
}
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
----- cut here -----
|
||||
|
||||
Build and insert the kernel module as shown in the above kprobe
|
||||
example. You will see the trace data in /var/log/messages and on the
|
||||
console whenever sys_open() returns a negative value. (Some messages
|
||||
may be suppressed if syslogd is configured to eliminate duplicate
|
||||
messages.)
|
||||
|
||||
For additional information on Kprobes, refer to the following URLs:
|
||||
http://www-106.ibm.com/developerworks/library/l-kprobes.html?ca=dgr-lnxw42Kprobe
|
||||
http://www.redhat.com/magazine/005mar05/features/kprobes/
|
File diff suppressed because it is too large
Load Diff
|
@ -56,3 +56,12 @@ This file details changes in 2.6 which affect PCMCIA card driver authors:
|
|||
memory regions in-use. The name argument should be a pointer to
|
||||
your driver name. Eg, for pcnet_cs, name should point to the
|
||||
string "pcnet_cs".
|
||||
|
||||
* CardServices is gone
|
||||
CardServices() in 2.4 is just a big switch statement to call various
|
||||
services. In 2.6, all of those entry points are exported and called
|
||||
directly (except for pcmcia_report_error(), just use cs_error() instead).
|
||||
|
||||
* struct pcmcia_driver
|
||||
You need to use struct pcmcia_driver and pcmcia_{un,}register_driver
|
||||
instead of {un,}register_pccard_driver
|
||||
|
|
|
@ -636,11 +636,16 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
|||
3stack-digout 3-jack in back, a HP out and a SPDIF out
|
||||
5stack 5-jack in back, 2-jack in front
|
||||
5stack-digout 5-jack in back, 2-jack in front, a SPDIF out
|
||||
6stack 6-jack in back, 2-jack in front
|
||||
6stack-digout 6-jack with a SPDIF out
|
||||
w810 3-jack
|
||||
z71v 3-jack (HP shared SPDIF)
|
||||
asus 3-jack
|
||||
uniwill 3-jack
|
||||
F1734 2-jack
|
||||
test for testing/debugging purpose, almost all controls can be
|
||||
adjusted. Appearing only when compiled with
|
||||
$CONFIG_SND_DEBUG=y
|
||||
|
||||
CMI9880
|
||||
minimal 3-jack in back
|
||||
|
@ -1054,6 +1059,13 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
|||
|
||||
The power-management is supported.
|
||||
|
||||
Module snd-pxa2xx-ac97 (on arm only)
|
||||
------------------------------------
|
||||
|
||||
Module for AC97 driver for the Intel PXA2xx chip
|
||||
|
||||
For ARM architecture only.
|
||||
|
||||
Module snd-rme32
|
||||
----------------
|
||||
|
||||
|
@ -1173,6 +1185,13 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
|||
|
||||
Module supports up to 8 cards.
|
||||
|
||||
Module snd-sun-dbri (on sparc only)
|
||||
-----------------------------------
|
||||
|
||||
Module for DBRI sound chips found on Sparcs.
|
||||
|
||||
Module supports up to 8 cards.
|
||||
|
||||
Module snd-wavefront
|
||||
--------------------
|
||||
|
||||
|
@ -1371,7 +1390,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
|||
Module snd-vxpocket
|
||||
-------------------
|
||||
|
||||
Module for Digigram VX-Pocket VX2 PCMCIA card.
|
||||
Module for Digigram VX-Pocket VX2 and 440 PCMCIA cards.
|
||||
|
||||
ibl - Capture IBL size. (default = 0, minimum size)
|
||||
|
||||
|
@ -1391,29 +1410,6 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
|||
|
||||
Note: the driver is build only when CONFIG_ISA is set.
|
||||
|
||||
Module snd-vxp440
|
||||
-----------------
|
||||
|
||||
Module for Digigram VX-Pocket 440 PCMCIA card.
|
||||
|
||||
ibl - Capture IBL size. (default = 0, minimum size)
|
||||
|
||||
Module supports up to 8 cards. The module is compiled only when
|
||||
PCMCIA is supported on kernel.
|
||||
|
||||
To activate the driver via the card manager, you'll need to set
|
||||
up /etc/pcmcia/vxp440.conf. See the sound/pcmcia/vx/vxp440.c.
|
||||
|
||||
When the driver is compiled as a module and the hotplug firmware
|
||||
is supported, the firmware data is loaded via hotplug automatically.
|
||||
Install the necessary firmware files in alsa-firmware package.
|
||||
When no hotplug fw loader is available, you need to load the
|
||||
firmware via vxloader utility in alsa-tools package.
|
||||
|
||||
About capture IBL, see the description of snd-vx222 module.
|
||||
|
||||
Note: the driver is build only when CONFIG_ISA is set.
|
||||
|
||||
Module snd-ymfpci
|
||||
-----------------
|
||||
|
||||
|
|
|
@ -132,7 +132,7 @@ to extra work for the USB developers. Since all Linux USB developers do
|
|||
their work on their own time, asking programmers to do extra work for no
|
||||
gain, for free, is not a possibility.
|
||||
|
||||
Security issues are also a very important for Linux. When a
|
||||
Security issues are also very important for Linux. When a
|
||||
security issue is found, it is fixed in a very short amount of time. A
|
||||
number of times this has caused internal kernel interfaces to be
|
||||
reworked to prevent the security problem from occurring. When this
|
||||
|
|
|
@ -0,0 +1,58 @@
|
|||
Everything you ever wanted to know about Linux 2.6 -stable releases.
|
||||
|
||||
Rules on what kind of patches are accepted, and what ones are not, into
|
||||
the "-stable" tree:
|
||||
|
||||
- It must be obviously correct and tested.
|
||||
- It can not bigger than 100 lines, with context.
|
||||
- It must fix only one thing.
|
||||
- It must fix a real bug that bothers people (not a, "This could be a
|
||||
problem..." type thing.)
|
||||
- It must fix a problem that causes a build error (but not for things
|
||||
marked CONFIG_BROKEN), an oops, a hang, data corruption, a real
|
||||
security issue, or some "oh, that's not good" issue. In short,
|
||||
something critical.
|
||||
- No "theoretical race condition" issues, unless an explanation of how
|
||||
the race can be exploited.
|
||||
- It can not contain any "trivial" fixes in it (spelling changes,
|
||||
whitespace cleanups, etc.)
|
||||
- It must be accepted by the relevant subsystem maintainer.
|
||||
- It must follow Documentation/SubmittingPatches rules.
|
||||
|
||||
|
||||
Procedure for submitting patches to the -stable tree:
|
||||
|
||||
- Send the patch, after verifying that it follows the above rules, to
|
||||
stable@kernel.org.
|
||||
- The sender will receive an ack when the patch has been accepted into
|
||||
the queue, or a nak if the patch is rejected. This response might
|
||||
take a few days, according to the developer's schedules.
|
||||
- If accepted, the patch will be added to the -stable queue, for review
|
||||
by other developers.
|
||||
- Security patches should not be sent to this alias, but instead to the
|
||||
documented security@kernel.org.
|
||||
|
||||
|
||||
Review cycle:
|
||||
|
||||
- When the -stable maintainers decide for a review cycle, the patches
|
||||
will be sent to the review committee, and the maintainer of the
|
||||
affected area of the patch (unless the submitter is the maintainer of
|
||||
the area) and CC: to the linux-kernel mailing list.
|
||||
- The review committee has 48 hours in which to ack or nak the patch.
|
||||
- If the patch is rejected by a member of the committee, or linux-kernel
|
||||
members object to the patch, bringing up issues that the maintainers
|
||||
and members did not realize, the patch will be dropped from the
|
||||
queue.
|
||||
- At the end of the review cycle, the acked patches will be added to
|
||||
the latest -stable release, and a new -stable release will happen.
|
||||
- Security patches will be accepted into the -stable tree directly from
|
||||
the security kernel team, and not go through the normal review cycle.
|
||||
Contact the kernel security team for more details on this procedure.
|
||||
|
||||
|
||||
Review committe:
|
||||
|
||||
- This will be made up of a number of kernel developers who have
|
||||
volunteered for this task, and a few that haven't.
|
||||
|
|
@ -29,3 +29,4 @@ card=27 - PixelView PlayTV Ultra Pro (Stereo)
|
|||
card=28 - DViCO FusionHDTV 3 Gold-T
|
||||
card=29 - ADS Tech Instant TV DVB-T PCI
|
||||
card=30 - TerraTec Cinergy 1400 DVB-T
|
||||
card=31 - DViCO FusionHDTV 5 Gold
|
||||
|
|
|
@ -62,3 +62,5 @@ tuner=60 - Thomson DDT 7611 (ATSC/NTSC)
|
|||
tuner=61 - Tena TNF9533-D/IF/TNF9533-B/DF
|
||||
tuner=62 - Philips TEA5767HN FM Radio
|
||||
tuner=63 - Philips FMD1216ME MK3 Hybrid Tuner
|
||||
tuner=64 - LG TDVS-H062F/TUA6034
|
||||
tuner=65 - Ymec TVF66T5-B/DFF
|
||||
|
|
|
@ -44,6 +44,9 @@ bttv.o
|
|||
push used by bttv. bttv will disable overlay
|
||||
by default on this hardware to avoid crashes.
|
||||
With this insmod option you can override this.
|
||||
no_overlay=1 Disable overlay. It should be used by broken
|
||||
hardware that doesn't support PCI2PCI direct
|
||||
transfers.
|
||||
automute=0/1 Automatically mutes the sound if there is
|
||||
no TV signal, on by default. You might try
|
||||
to disable this if you have bad input signal
|
||||
|
|
|
@ -47,7 +47,7 @@ Timing
|
|||
notsc
|
||||
Don't use the CPU time stamp counter to read the wall time.
|
||||
This can be used to work around timing problems on multiprocessor systems
|
||||
with not properly synchronized CPUs. Only useful with a SMP kernel
|
||||
with not properly synchronized CPUs.
|
||||
|
||||
report_lost_ticks
|
||||
Report when timer interrupts are lost because some code turned off
|
||||
|
@ -74,6 +74,9 @@ Idle loop
|
|||
event. This will make the CPUs eat a lot more power, but may be useful
|
||||
to get slightly better performance in multiprocessor benchmarks. It also
|
||||
makes some profiling using performance counters more accurate.
|
||||
Please note that on systems with MONITOR/MWAIT support (like Intel EM64T
|
||||
CPUs) this option has no performance advantage over the normal idle loop.
|
||||
It may also interact badly with hyperthreading.
|
||||
|
||||
Rebooting
|
||||
|
||||
|
@ -178,6 +181,5 @@ Debugging
|
|||
Misc
|
||||
|
||||
noreplacement Don't replace instructions with more appropiate ones
|
||||
for the CPU. This may be useful on asymmetric MP systems
|
||||
where some CPU have less capabilities than the others.
|
||||
|
||||
for the CPU. This may be useful on asymmetric MP systems
|
||||
where some CPU have less capabilities than the others.
|
||||
|
|
|
@ -1521,6 +1521,12 @@ P: Zach Brown
|
|||
M: zab@zabbo.net
|
||||
S: Odd Fixes
|
||||
|
||||
MAN-PAGES: MANUAL PAGES FOR LINUX -- Sections 2, 3, 4, 5, and 7
|
||||
P: Michael Kerrisk
|
||||
M: mtk-manpages@gmx.net
|
||||
W: ftp://ftp.kernel.org/pub/linux/docs/manpages
|
||||
S: Maintained
|
||||
|
||||
MARVELL MV64340 ETHERNET DRIVER
|
||||
P: Manish Lachwani
|
||||
M: Manish_Lachwani@pmc-sierra.com
|
||||
|
|
2
Makefile
2
Makefile
|
@ -1,7 +1,7 @@
|
|||
VERSION = 2
|
||||
PATCHLEVEL = 6
|
||||
SUBLEVEL = 13
|
||||
EXTRAVERSION =-rc3
|
||||
EXTRAVERSION =-rc5
|
||||
NAME=Woozy Numbat
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
|
|
@ -176,6 +176,7 @@ asmlinkage void __cpuinit secondary_start_kernel(void)
|
|||
cpu_set(cpu, mm->cpu_vm_mask);
|
||||
cpu_switch_mm(mm->pgd, mm);
|
||||
enter_lazy_tlb(mm, current);
|
||||
local_flush_tlb_all();
|
||||
|
||||
cpu_init();
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
1: ldrexb r2, [r1]
|
||||
\instr r2, r2, r3
|
||||
strexb r0, r2, [r1]
|
||||
cmpne r0, #0
|
||||
cmp r0, #0
|
||||
bne 1b
|
||||
mov pc, lr
|
||||
.endm
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include <linux/mm.h>
|
||||
|
||||
#include <asm/atomic.h>
|
||||
#include <asm/cacheflush.h>
|
||||
#include <asm/delay.h>
|
||||
#include <asm/mmu_context.h>
|
||||
#include <asm/procinfo.h>
|
||||
|
@ -80,6 +81,7 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
|
|||
* "cpu" is Linux's internal ID.
|
||||
*/
|
||||
pen_release = cpu;
|
||||
flush_cache_all();
|
||||
|
||||
/*
|
||||
* XXX
|
||||
|
|
|
@ -61,7 +61,7 @@ static struct plat_serial8250_port coyote_uart_data[] = {
|
|||
.mapbase = IXP4XX_UART2_BASE_PHYS,
|
||||
.membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET,
|
||||
.irq = IRQ_IXP4XX_UART2,
|
||||
.flags = UPF_BOOT_AUTOCONF,
|
||||
.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
|
||||
.iotype = UPIO_MEM,
|
||||
.regshift = 2,
|
||||
.uartclk = IXP4XX_UART_XTAL,
|
||||
|
|
|
@ -83,7 +83,7 @@ static struct plat_serial8250_port gtwx5715_uart_platform_data[] = {
|
|||
.mapbase = IXP4XX_UART2_BASE_PHYS,
|
||||
.membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET,
|
||||
.irq = IRQ_IXP4XX_UART2,
|
||||
.flags = UPF_BOOT_AUTOCONF,
|
||||
.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
|
||||
.iotype = UPIO_MEM,
|
||||
.regshift = 2,
|
||||
.uartclk = IXP4XX_UART_XTAL,
|
||||
|
|
|
@ -82,7 +82,7 @@ static struct plat_serial8250_port ixdp425_uart_data[] = {
|
|||
.mapbase = IXP4XX_UART1_BASE_PHYS,
|
||||
.membase = (char *)IXP4XX_UART1_BASE_VIRT + REG_OFFSET,
|
||||
.irq = IRQ_IXP4XX_UART1,
|
||||
.flags = UPF_BOOT_AUTOCONF,
|
||||
.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
|
||||
.iotype = UPIO_MEM,
|
||||
.regshift = 2,
|
||||
.uartclk = IXP4XX_UART_XTAL,
|
||||
|
@ -91,7 +91,7 @@ static struct plat_serial8250_port ixdp425_uart_data[] = {
|
|||
.mapbase = IXP4XX_UART2_BASE_PHYS,
|
||||
.membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET,
|
||||
.irq = IRQ_IXP4XX_UART1,
|
||||
.flags = UPF_BOOT_AUTOCONF,
|
||||
.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
|
||||
.iotype = UPIO_MEM,
|
||||
.regshift = 2,
|
||||
.uartclk = IXP4XX_UART_XTAL,
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
* 28-Jun-2005 BJD Moved pm functionality out to common code
|
||||
* 17-Jul-2005 BJD Changed to platform device for SuperIO 16550s
|
||||
* 25-Jul-2005 BJD Removed ASIX static mappings
|
||||
* 27-Jul-2005 BJD Ensure maximum frequency of i2c bus
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
|
@ -60,6 +61,7 @@
|
|||
#include <asm/arch/regs-mem.h>
|
||||
#include <asm/arch/regs-lcd.h>
|
||||
#include <asm/arch/nand.h>
|
||||
#include <asm/arch/iic.h>
|
||||
|
||||
#include <linux/mtd/mtd.h>
|
||||
#include <linux/mtd/nand.h>
|
||||
|
@ -304,7 +306,7 @@ static void bast_nand_select(struct s3c2410_nand_set *set, int slot)
|
|||
}
|
||||
|
||||
static struct s3c2410_platform_nand bast_nand_info = {
|
||||
.tacls = 80,
|
||||
.tacls = 40,
|
||||
.twrph0 = 80,
|
||||
.twrph1 = 80,
|
||||
.nr_sets = ARRAY_SIZE(bast_nand_sets),
|
||||
|
@ -385,6 +387,17 @@ static struct platform_device bast_sio = {
|
|||
},
|
||||
};
|
||||
|
||||
/* we have devices on the bus which cannot work much over the
|
||||
* standard 100KHz i2c bus frequency
|
||||
*/
|
||||
|
||||
static struct s3c2410_platform_i2c bast_i2c_info = {
|
||||
.flags = 0,
|
||||
.slave_addr = 0x10,
|
||||
.bus_freq = 100*1000,
|
||||
.max_freq = 130*1000,
|
||||
};
|
||||
|
||||
/* Standard BAST devices */
|
||||
|
||||
static struct platform_device *bast_devices[] __initdata = {
|
||||
|
@ -431,6 +444,7 @@ void __init bast_map_io(void)
|
|||
s3c24xx_uclk.parent = &s3c24xx_clkout1;
|
||||
|
||||
s3c_device_nand.dev.platform_data = &bast_nand_info;
|
||||
s3c_device_i2c.dev.platform_data = &bast_i2c_info;
|
||||
|
||||
s3c24xx_init_io(bast_iodesc, ARRAY_SIZE(bast_iodesc));
|
||||
s3c24xx_init_clocks(0);
|
||||
|
|
|
@ -97,6 +97,7 @@ static void __init jornada720_map_io(void)
|
|||
}
|
||||
|
||||
MACHINE_START(JORNADA720, "HP Jornada 720")
|
||||
/* Maintainer: Michael Gernoth <michael@gernoth.net> */
|
||||
.phys_ram = 0xc0000000,
|
||||
.phys_io = 0x80000000,
|
||||
.io_pg_offst = ((0xf8000000) >> 18) & 0xfffc,
|
||||
|
|
|
@ -238,9 +238,9 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
|
|||
up_read(&mm->mmap_sem);
|
||||
|
||||
/*
|
||||
* Handle the "normal" case first
|
||||
* Handle the "normal" case first - VM_FAULT_MAJOR / VM_FAULT_MINOR
|
||||
*/
|
||||
if (fault > 0)
|
||||
if (fault >= VM_FAULT_MINOR)
|
||||
return 0;
|
||||
|
||||
/*
|
||||
|
@ -261,7 +261,7 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
|
|||
do_exit(SIGKILL);
|
||||
return 0;
|
||||
|
||||
case 0:
|
||||
case VM_FAULT_SIGBUS:
|
||||
/*
|
||||
* We had some memory, but were unable to
|
||||
* successfully fix up this page fault.
|
||||
|
|
|
@ -370,142 +370,6 @@ ENTRY(cpu_xscale_dcache_clean_area)
|
|||
bhi 1b
|
||||
mov pc, lr
|
||||
|
||||
/* ================================ CACHE LOCKING============================
|
||||
*
|
||||
* The XScale MicroArchitecture implements support for locking entries into
|
||||
* the data and instruction cache. The following functions implement the core
|
||||
* low level instructions needed to accomplish the locking. The developer's
|
||||
* manual states that the code that performs the locking must be in non-cached
|
||||
* memory. To accomplish this, the code in xscale-cache-lock.c copies the
|
||||
* following functions from the cache into a non-cached memory region that
|
||||
* is allocated through consistent_alloc().
|
||||
*
|
||||
*/
|
||||
.align 5
|
||||
/*
|
||||
* xscale_icache_lock
|
||||
*
|
||||
* r0: starting address to lock
|
||||
* r1: end address to lock
|
||||
*/
|
||||
ENTRY(xscale_icache_lock)
|
||||
|
||||
iLockLoop:
|
||||
bic r0, r0, #CACHELINESIZE - 1
|
||||
mcr p15, 0, r0, c9, c1, 0 @ lock into cache
|
||||
cmp r0, r1 @ are we done?
|
||||
add r0, r0, #CACHELINESIZE @ advance to next cache line
|
||||
bls iLockLoop
|
||||
mov pc, lr
|
||||
|
||||
/*
|
||||
* xscale_icache_unlock
|
||||
*/
|
||||
ENTRY(xscale_icache_unlock)
|
||||
mcr p15, 0, r0, c9, c1, 1 @ Unlock icache
|
||||
mov pc, lr
|
||||
|
||||
/*
|
||||
* xscale_dcache_lock
|
||||
*
|
||||
* r0: starting address to lock
|
||||
* r1: end address to lock
|
||||
*/
|
||||
ENTRY(xscale_dcache_lock)
|
||||
mcr p15, 0, ip, c7, c10, 4 @ Drain Write (& Fill) Buffer
|
||||
mov r2, #1
|
||||
mcr p15, 0, r2, c9, c2, 0 @ Put dcache in lock mode
|
||||
cpwait ip @ Wait for completion
|
||||
|
||||
mrs r2, cpsr
|
||||
orr r3, r2, #PSR_F_BIT | PSR_I_BIT
|
||||
dLockLoop:
|
||||
msr cpsr_c, r3
|
||||
mcr p15, 0, r0, c7, c10, 1 @ Write back line if it is dirty
|
||||
mcr p15, 0, r0, c7, c6, 1 @ Flush/invalidate line
|
||||
msr cpsr_c, r2
|
||||
ldr ip, [r0], #CACHELINESIZE @ Preload 32 bytes into cache from
|
||||
@ location [r0]. Post-increment
|
||||
@ r3 to next cache line
|
||||
cmp r0, r1 @ Are we done?
|
||||
bls dLockLoop
|
||||
|
||||
mcr p15, 0, ip, c7, c10, 4 @ Drain Write (& Fill) Buffer
|
||||
mov r2, #0
|
||||
mcr p15, 0, r2, c9, c2, 0 @ Get out of lock mode
|
||||
cpwait_ret lr, ip
|
||||
|
||||
/*
|
||||
* xscale_dcache_unlock
|
||||
*/
|
||||
ENTRY(xscale_dcache_unlock)
|
||||
mcr p15, 0, ip, c7, c10, 4 @ Drain Write (& Fill) Buffer
|
||||
mcr p15, 0, ip, c9, c2, 1 @ Unlock cache
|
||||
mov pc, lr
|
||||
|
||||
/*
|
||||
* Needed to determine the length of the code that needs to be copied.
|
||||
*/
|
||||
.align 5
|
||||
ENTRY(xscale_cache_dummy)
|
||||
mov pc, lr
|
||||
|
||||
/* ================================ TLB LOCKING==============================
|
||||
*
|
||||
* The XScale MicroArchitecture implements support for locking entries into
|
||||
* the Instruction and Data TLBs. The following functions provide the
|
||||
* low level support for supporting these under Linux. xscale-lock.c
|
||||
* implements some higher level management code. Most of the following
|
||||
* is taken straight out of the Developer's Manual.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Lock I-TLB entry
|
||||
*
|
||||
* r0: Virtual address to translate and lock
|
||||
*/
|
||||
.align 5
|
||||
ENTRY(xscale_itlb_lock)
|
||||
mrs r2, cpsr
|
||||
orr r3, r2, #PSR_F_BIT | PSR_I_BIT
|
||||
msr cpsr_c, r3 @ Disable interrupts
|
||||
mcr p15, 0, r0, c8, c5, 1 @ Invalidate I-TLB entry
|
||||
mcr p15, 0, r0, c10, c4, 0 @ Translate and lock
|
||||
msr cpsr_c, r2 @ Restore interrupts
|
||||
cpwait_ret lr, ip
|
||||
|
||||
/*
|
||||
* Lock D-TLB entry
|
||||
*
|
||||
* r0: Virtual address to translate and lock
|
||||
*/
|
||||
.align 5
|
||||
ENTRY(xscale_dtlb_lock)
|
||||
mrs r2, cpsr
|
||||
orr r3, r2, #PSR_F_BIT | PSR_I_BIT
|
||||
msr cpsr_c, r3 @ Disable interrupts
|
||||
mcr p15, 0, r0, c8, c6, 1 @ Invalidate D-TLB entry
|
||||
mcr p15, 0, r0, c10, c8, 0 @ Translate and lock
|
||||
msr cpsr_c, r2 @ Restore interrupts
|
||||
cpwait_ret lr, ip
|
||||
|
||||
/*
|
||||
* Unlock all I-TLB entries
|
||||
*/
|
||||
.align 5
|
||||
ENTRY(xscale_itlb_unlock)
|
||||
mcr p15, 0, ip, c10, c4, 1 @ Unlock I-TLB
|
||||
mcr p15, 0, ip, c8, c5, 0 @ Invalidate I-TLB
|
||||
cpwait_ret lr, ip
|
||||
|
||||
/*
|
||||
* Unlock all D-TLB entries
|
||||
*/
|
||||
ENTRY(xscale_dtlb_unlock)
|
||||
mcr p15, 0, ip, c10, c8, 1 @ Unlock D-TBL
|
||||
mcr p15, 0, ip, c8, c6, 0 @ Invalidate D-TLB
|
||||
cpwait_ret lr, ip
|
||||
|
||||
/* =============================== PageTable ============================== */
|
||||
|
||||
#define PTE_CACHE_WRITE_ALLOCATE 0
|
||||
|
|
|
@ -40,17 +40,17 @@ float64 float64_arccos(float64 rFm);
|
|||
float64 float64_pow(float64 rFn, float64 rFm);
|
||||
float64 float64_pol(float64 rFn, float64 rFm);
|
||||
|
||||
static float64 float64_rsf(float64 rFn, float64 rFm)
|
||||
static float64 float64_rsf(struct roundingData *roundData, float64 rFn, float64 rFm)
|
||||
{
|
||||
return float64_sub(rFm, rFn);
|
||||
return float64_sub(roundData, rFm, rFn);
|
||||
}
|
||||
|
||||
static float64 float64_rdv(float64 rFn, float64 rFm)
|
||||
static float64 float64_rdv(struct roundingData *roundData, float64 rFn, float64 rFm)
|
||||
{
|
||||
return float64_div(rFm, rFn);
|
||||
return float64_div(roundData, rFm, rFn);
|
||||
}
|
||||
|
||||
static float64 (*const dyadic_double[16])(float64 rFn, float64 rFm) = {
|
||||
static float64 (*const dyadic_double[16])(struct roundingData*, float64 rFn, float64 rFm) = {
|
||||
[ADF_CODE >> 20] = float64_add,
|
||||
[MUF_CODE >> 20] = float64_mul,
|
||||
[SUF_CODE >> 20] = float64_sub,
|
||||
|
@ -65,12 +65,12 @@ static float64 (*const dyadic_double[16])(float64 rFn, float64 rFm) = {
|
|||
[FRD_CODE >> 20] = float64_rdv,
|
||||
};
|
||||
|
||||
static float64 float64_mvf(float64 rFm)
|
||||
static float64 float64_mvf(struct roundingData *roundData,float64 rFm)
|
||||
{
|
||||
return rFm;
|
||||
}
|
||||
|
||||
static float64 float64_mnf(float64 rFm)
|
||||
static float64 float64_mnf(struct roundingData *roundData,float64 rFm)
|
||||
{
|
||||
union float64_components u;
|
||||
|
||||
|
@ -84,7 +84,7 @@ static float64 float64_mnf(float64 rFm)
|
|||
return u.f64;
|
||||
}
|
||||
|
||||
static float64 float64_abs(float64 rFm)
|
||||
static float64 float64_abs(struct roundingData *roundData,float64 rFm)
|
||||
{
|
||||
union float64_components u;
|
||||
|
||||
|
@ -98,7 +98,7 @@ static float64 float64_abs(float64 rFm)
|
|||
return u.f64;
|
||||
}
|
||||
|
||||
static float64 (*const monadic_double[16])(float64 rFm) = {
|
||||
static float64 (*const monadic_double[16])(struct roundingData *, float64 rFm) = {
|
||||
[MVF_CODE >> 20] = float64_mvf,
|
||||
[MNF_CODE >> 20] = float64_mnf,
|
||||
[ABS_CODE >> 20] = float64_abs,
|
||||
|
@ -108,7 +108,7 @@ static float64 (*const monadic_double[16])(float64 rFm) = {
|
|||
[NRM_CODE >> 20] = float64_mvf,
|
||||
};
|
||||
|
||||
unsigned int DoubleCPDO(const unsigned int opcode, FPREG * rFd)
|
||||
unsigned int DoubleCPDO(struct roundingData *roundData, const unsigned int opcode, FPREG * rFd)
|
||||
{
|
||||
FPA11 *fpa11 = GET_FPA11();
|
||||
float64 rFm;
|
||||
|
@ -151,13 +151,13 @@ unsigned int DoubleCPDO(const unsigned int opcode, FPREG * rFd)
|
|||
}
|
||||
|
||||
if (dyadic_double[opc_mask_shift]) {
|
||||
rFd->fDouble = dyadic_double[opc_mask_shift](rFn, rFm);
|
||||
rFd->fDouble = dyadic_double[opc_mask_shift](roundData, rFn, rFm);
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
if (monadic_double[opc_mask_shift]) {
|
||||
rFd->fDouble = monadic_double[opc_mask_shift](rFm);
|
||||
rFd->fDouble = monadic_double[opc_mask_shift](roundData, rFm);
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -35,17 +35,17 @@ floatx80 floatx80_arccos(floatx80 rFm);
|
|||
floatx80 floatx80_pow(floatx80 rFn, floatx80 rFm);
|
||||
floatx80 floatx80_pol(floatx80 rFn, floatx80 rFm);
|
||||
|
||||
static floatx80 floatx80_rsf(floatx80 rFn, floatx80 rFm)
|
||||
static floatx80 floatx80_rsf(struct roundingData *roundData, floatx80 rFn, floatx80 rFm)
|
||||
{
|
||||
return floatx80_sub(rFm, rFn);
|
||||
return floatx80_sub(roundData, rFm, rFn);
|
||||
}
|
||||
|
||||
static floatx80 floatx80_rdv(floatx80 rFn, floatx80 rFm)
|
||||
static floatx80 floatx80_rdv(struct roundingData *roundData, floatx80 rFn, floatx80 rFm)
|
||||
{
|
||||
return floatx80_div(rFm, rFn);
|
||||
return floatx80_div(roundData, rFm, rFn);
|
||||
}
|
||||
|
||||
static floatx80 (*const dyadic_extended[16])(floatx80 rFn, floatx80 rFm) = {
|
||||
static floatx80 (*const dyadic_extended[16])(struct roundingData*, floatx80 rFn, floatx80 rFm) = {
|
||||
[ADF_CODE >> 20] = floatx80_add,
|
||||
[MUF_CODE >> 20] = floatx80_mul,
|
||||
[SUF_CODE >> 20] = floatx80_sub,
|
||||
|
@ -60,24 +60,24 @@ static floatx80 (*const dyadic_extended[16])(floatx80 rFn, floatx80 rFm) = {
|
|||
[FRD_CODE >> 20] = floatx80_rdv,
|
||||
};
|
||||
|
||||
static floatx80 floatx80_mvf(floatx80 rFm)
|
||||
static floatx80 floatx80_mvf(struct roundingData *roundData, floatx80 rFm)
|
||||
{
|
||||
return rFm;
|
||||
}
|
||||
|
||||
static floatx80 floatx80_mnf(floatx80 rFm)
|
||||
static floatx80 floatx80_mnf(struct roundingData *roundData, floatx80 rFm)
|
||||
{
|
||||
rFm.high ^= 0x8000;
|
||||
return rFm;
|
||||
}
|
||||
|
||||
static floatx80 floatx80_abs(floatx80 rFm)
|
||||
static floatx80 floatx80_abs(struct roundingData *roundData, floatx80 rFm)
|
||||
{
|
||||
rFm.high &= 0x7fff;
|
||||
return rFm;
|
||||
}
|
||||
|
||||
static floatx80 (*const monadic_extended[16])(floatx80 rFm) = {
|
||||
static floatx80 (*const monadic_extended[16])(struct roundingData*, floatx80 rFm) = {
|
||||
[MVF_CODE >> 20] = floatx80_mvf,
|
||||
[MNF_CODE >> 20] = floatx80_mnf,
|
||||
[ABS_CODE >> 20] = floatx80_abs,
|
||||
|
@ -87,7 +87,7 @@ static floatx80 (*const monadic_extended[16])(floatx80 rFm) = {
|
|||
[NRM_CODE >> 20] = floatx80_mvf,
|
||||
};
|
||||
|
||||
unsigned int ExtendedCPDO(const unsigned int opcode, FPREG * rFd)
|
||||
unsigned int ExtendedCPDO(struct roundingData *roundData, const unsigned int opcode, FPREG * rFd)
|
||||
{
|
||||
FPA11 *fpa11 = GET_FPA11();
|
||||
floatx80 rFm;
|
||||
|
@ -138,13 +138,13 @@ unsigned int ExtendedCPDO(const unsigned int opcode, FPREG * rFd)
|
|||
}
|
||||
|
||||
if (dyadic_extended[opc_mask_shift]) {
|
||||
rFd->fExtended = dyadic_extended[opc_mask_shift](rFn, rFm);
|
||||
rFd->fExtended = dyadic_extended[opc_mask_shift](roundData, rFn, rFm);
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
if (monadic_extended[opc_mask_shift]) {
|
||||
rFd->fExtended = monadic_extended[opc_mask_shift](rFm);
|
||||
rFd->fExtended = monadic_extended[opc_mask_shift](roundData, rFm);
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -51,48 +51,42 @@ static void resetFPA11(void)
|
|||
fpa11->fpsr = FP_EMULATOR | BIT_AC;
|
||||
}
|
||||
|
||||
void SetRoundingMode(const unsigned int opcode)
|
||||
int8 SetRoundingMode(const unsigned int opcode)
|
||||
{
|
||||
switch (opcode & MASK_ROUNDING_MODE) {
|
||||
default:
|
||||
case ROUND_TO_NEAREST:
|
||||
float_rounding_mode = float_round_nearest_even;
|
||||
break;
|
||||
return float_round_nearest_even;
|
||||
|
||||
case ROUND_TO_PLUS_INFINITY:
|
||||
float_rounding_mode = float_round_up;
|
||||
break;
|
||||
return float_round_up;
|
||||
|
||||
case ROUND_TO_MINUS_INFINITY:
|
||||
float_rounding_mode = float_round_down;
|
||||
break;
|
||||
return float_round_down;
|
||||
|
||||
case ROUND_TO_ZERO:
|
||||
float_rounding_mode = float_round_to_zero;
|
||||
break;
|
||||
return float_round_to_zero;
|
||||
}
|
||||
}
|
||||
|
||||
void SetRoundingPrecision(const unsigned int opcode)
|
||||
int8 SetRoundingPrecision(const unsigned int opcode)
|
||||
{
|
||||
#ifdef CONFIG_FPE_NWFPE_XP
|
||||
switch (opcode & MASK_ROUNDING_PRECISION) {
|
||||
case ROUND_SINGLE:
|
||||
floatx80_rounding_precision = 32;
|
||||
break;
|
||||
return 32;
|
||||
|
||||
case ROUND_DOUBLE:
|
||||
floatx80_rounding_precision = 64;
|
||||
break;
|
||||
return 64;
|
||||
|
||||
case ROUND_EXTENDED:
|
||||
floatx80_rounding_precision = 80;
|
||||
break;
|
||||
return 80;
|
||||
|
||||
default:
|
||||
floatx80_rounding_precision = 80;
|
||||
return 80;
|
||||
}
|
||||
#endif
|
||||
return 80;
|
||||
}
|
||||
|
||||
void nwfpe_init_fpa(union fp_state *fp)
|
||||
|
@ -103,8 +97,6 @@ void nwfpe_init_fpa(union fp_state *fp)
|
|||
#endif
|
||||
memset(fpa11, 0, sizeof(FPA11));
|
||||
resetFPA11();
|
||||
SetRoundingMode(ROUND_TO_NEAREST);
|
||||
SetRoundingPrecision(ROUND_EXTENDED);
|
||||
fpa11->initflag = 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -37,6 +37,13 @@
|
|||
/* includes */
|
||||
#include "fpsr.h" /* FP control and status register definitions */
|
||||
#include "milieu.h"
|
||||
|
||||
struct roundingData {
|
||||
int8 mode;
|
||||
int8 precision;
|
||||
signed char exception;
|
||||
};
|
||||
|
||||
#include "softfloat.h"
|
||||
|
||||
#define typeNone 0x00
|
||||
|
@ -84,8 +91,8 @@ typedef struct tagFPA11 {
|
|||
initialised. */
|
||||
} FPA11;
|
||||
|
||||
extern void SetRoundingMode(const unsigned int);
|
||||
extern void SetRoundingPrecision(const unsigned int);
|
||||
extern int8 SetRoundingMode(const unsigned int);
|
||||
extern int8 SetRoundingPrecision(const unsigned int);
|
||||
extern void nwfpe_init_fpa(union fp_state *fp);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -24,15 +24,16 @@
|
|||
#include "fpa11.h"
|
||||
#include "fpopcode.h"
|
||||
|
||||
unsigned int SingleCPDO(const unsigned int opcode, FPREG * rFd);
|
||||
unsigned int DoubleCPDO(const unsigned int opcode, FPREG * rFd);
|
||||
unsigned int ExtendedCPDO(const unsigned int opcode, FPREG * rFd);
|
||||
unsigned int SingleCPDO(struct roundingData *roundData, const unsigned int opcode, FPREG * rFd);
|
||||
unsigned int DoubleCPDO(struct roundingData *roundData, const unsigned int opcode, FPREG * rFd);
|
||||
unsigned int ExtendedCPDO(struct roundingData *roundData, const unsigned int opcode, FPREG * rFd);
|
||||
|
||||
unsigned int EmulateCPDO(const unsigned int opcode)
|
||||
{
|
||||
FPA11 *fpa11 = GET_FPA11();
|
||||
FPREG *rFd;
|
||||
unsigned int nType, nDest, nRc;
|
||||
struct roundingData roundData;
|
||||
|
||||
/* Get the destination size. If not valid let Linux perform
|
||||
an invalid instruction trap. */
|
||||
|
@ -40,7 +41,9 @@ unsigned int EmulateCPDO(const unsigned int opcode)
|
|||
if (typeNone == nDest)
|
||||
return 0;
|
||||
|
||||
SetRoundingMode(opcode);
|
||||
roundData.mode = SetRoundingMode(opcode);
|
||||
roundData.precision = SetRoundingPrecision(opcode);
|
||||
roundData.exception = 0;
|
||||
|
||||
/* Compare the size of the operands in Fn and Fm.
|
||||
Choose the largest size and perform operations in that size,
|
||||
|
@ -63,14 +66,14 @@ unsigned int EmulateCPDO(const unsigned int opcode)
|
|||
|
||||
switch (nType) {
|
||||
case typeSingle:
|
||||
nRc = SingleCPDO(opcode, rFd);
|
||||
nRc = SingleCPDO(&roundData, opcode, rFd);
|
||||
break;
|
||||
case typeDouble:
|
||||
nRc = DoubleCPDO(opcode, rFd);
|
||||
nRc = DoubleCPDO(&roundData, opcode, rFd);
|
||||
break;
|
||||
#ifdef CONFIG_FPE_NWFPE_XP
|
||||
case typeExtended:
|
||||
nRc = ExtendedCPDO(opcode, rFd);
|
||||
nRc = ExtendedCPDO(&roundData, opcode, rFd);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
|
@ -93,9 +96,9 @@ unsigned int EmulateCPDO(const unsigned int opcode)
|
|||
case typeSingle:
|
||||
{
|
||||
if (typeDouble == nType)
|
||||
rFd->fSingle = float64_to_float32(rFd->fDouble);
|
||||
rFd->fSingle = float64_to_float32(&roundData, rFd->fDouble);
|
||||
else
|
||||
rFd->fSingle = floatx80_to_float32(rFd->fExtended);
|
||||
rFd->fSingle = floatx80_to_float32(&roundData, rFd->fExtended);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -104,7 +107,7 @@ unsigned int EmulateCPDO(const unsigned int opcode)
|
|||
if (typeSingle == nType)
|
||||
rFd->fDouble = float32_to_float64(rFd->fSingle);
|
||||
else
|
||||
rFd->fDouble = floatx80_to_float64(rFd->fExtended);
|
||||
rFd->fDouble = floatx80_to_float64(&roundData, rFd->fExtended);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -121,12 +124,15 @@ unsigned int EmulateCPDO(const unsigned int opcode)
|
|||
#else
|
||||
if (nDest != nType) {
|
||||
if (nDest == typeSingle)
|
||||
rFd->fSingle = float64_to_float32(rFd->fDouble);
|
||||
rFd->fSingle = float64_to_float32(&roundData, rFd->fDouble);
|
||||
else
|
||||
rFd->fDouble = float32_to_float64(rFd->fSingle);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (roundData.exception)
|
||||
float_raise(roundData.exception);
|
||||
|
||||
return nRc;
|
||||
}
|
||||
|
|
|
@ -96,7 +96,7 @@ static inline void loadMultiple(const unsigned int Fn, const unsigned int __user
|
|||
}
|
||||
}
|
||||
|
||||
static inline void storeSingle(const unsigned int Fn, unsigned int __user *pMem)
|
||||
static inline void storeSingle(struct roundingData *roundData, const unsigned int Fn, unsigned int __user *pMem)
|
||||
{
|
||||
FPA11 *fpa11 = GET_FPA11();
|
||||
union {
|
||||
|
@ -106,12 +106,12 @@ static inline void storeSingle(const unsigned int Fn, unsigned int __user *pMem)
|
|||
|
||||
switch (fpa11->fType[Fn]) {
|
||||
case typeDouble:
|
||||
val.f = float64_to_float32(fpa11->fpreg[Fn].fDouble);
|
||||
val.f = float64_to_float32(roundData, fpa11->fpreg[Fn].fDouble);
|
||||
break;
|
||||
|
||||
#ifdef CONFIG_FPE_NWFPE_XP
|
||||
case typeExtended:
|
||||
val.f = floatx80_to_float32(fpa11->fpreg[Fn].fExtended);
|
||||
val.f = floatx80_to_float32(roundData, fpa11->fpreg[Fn].fExtended);
|
||||
break;
|
||||
#endif
|
||||
|
||||
|
@ -122,7 +122,7 @@ static inline void storeSingle(const unsigned int Fn, unsigned int __user *pMem)
|
|||
put_user(val.i[0], pMem);
|
||||
}
|
||||
|
||||
static inline void storeDouble(const unsigned int Fn, unsigned int __user *pMem)
|
||||
static inline void storeDouble(struct roundingData *roundData, const unsigned int Fn, unsigned int __user *pMem)
|
||||
{
|
||||
FPA11 *fpa11 = GET_FPA11();
|
||||
union {
|
||||
|
@ -137,7 +137,7 @@ static inline void storeDouble(const unsigned int Fn, unsigned int __user *pMem)
|
|||
|
||||
#ifdef CONFIG_FPE_NWFPE_XP
|
||||
case typeExtended:
|
||||
val.f = floatx80_to_float64(fpa11->fpreg[Fn].fExtended);
|
||||
val.f = floatx80_to_float64(roundData, fpa11->fpreg[Fn].fExtended);
|
||||
break;
|
||||
#endif
|
||||
|
||||
|
@ -259,8 +259,11 @@ unsigned int PerformSTF(const unsigned int opcode)
|
|||
{
|
||||
unsigned int __user *pBase, *pAddress, *pFinal;
|
||||
unsigned int nRc = 1, write_back = WRITE_BACK(opcode);
|
||||
struct roundingData roundData;
|
||||
|
||||
SetRoundingMode(ROUND_TO_NEAREST);
|
||||
roundData.mode = SetRoundingMode(opcode);
|
||||
roundData.precision = SetRoundingPrecision(opcode);
|
||||
roundData.exception = 0;
|
||||
|
||||
pBase = (unsigned int __user *) readRegister(getRn(opcode));
|
||||
if (REG_PC == getRn(opcode)) {
|
||||
|
@ -281,10 +284,10 @@ unsigned int PerformSTF(const unsigned int opcode)
|
|||
|
||||
switch (opcode & MASK_TRANSFER_LENGTH) {
|
||||
case TRANSFER_SINGLE:
|
||||
storeSingle(getFd(opcode), pAddress);
|
||||
storeSingle(&roundData, getFd(opcode), pAddress);
|
||||
break;
|
||||
case TRANSFER_DOUBLE:
|
||||
storeDouble(getFd(opcode), pAddress);
|
||||
storeDouble(&roundData, getFd(opcode), pAddress);
|
||||
break;
|
||||
#ifdef CONFIG_FPE_NWFPE_XP
|
||||
case TRANSFER_EXTENDED:
|
||||
|
@ -295,6 +298,9 @@ unsigned int PerformSTF(const unsigned int opcode)
|
|||
nRc = 0;
|
||||
}
|
||||
|
||||
if (roundData.exception)
|
||||
float_raise(roundData.exception);
|
||||
|
||||
if (write_back)
|
||||
writeRegister(getRn(opcode), (unsigned long) pFinal);
|
||||
return nRc;
|
||||
|
|
|
@ -33,8 +33,6 @@ extern flag floatx80_is_nan(floatx80);
|
|||
extern flag float64_is_nan(float64);
|
||||
extern flag float32_is_nan(float32);
|
||||
|
||||
void SetRoundingMode(const unsigned int opcode);
|
||||
|
||||
unsigned int PerformFLT(const unsigned int opcode);
|
||||
unsigned int PerformFIX(const unsigned int opcode);
|
||||
|
||||
|
@ -77,14 +75,17 @@ unsigned int EmulateCPRT(const unsigned int opcode)
|
|||
unsigned int PerformFLT(const unsigned int opcode)
|
||||
{
|
||||
FPA11 *fpa11 = GET_FPA11();
|
||||
SetRoundingMode(opcode);
|
||||
SetRoundingPrecision(opcode);
|
||||
struct roundingData roundData;
|
||||
|
||||
roundData.mode = SetRoundingMode(opcode);
|
||||
roundData.precision = SetRoundingPrecision(opcode);
|
||||
roundData.exception = 0;
|
||||
|
||||
switch (opcode & MASK_ROUNDING_PRECISION) {
|
||||
case ROUND_SINGLE:
|
||||
{
|
||||
fpa11->fType[getFn(opcode)] = typeSingle;
|
||||
fpa11->fpreg[getFn(opcode)].fSingle = int32_to_float32(readRegister(getRd(opcode)));
|
||||
fpa11->fpreg[getFn(opcode)].fSingle = int32_to_float32(&roundData, readRegister(getRd(opcode)));
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -108,6 +109,9 @@ unsigned int PerformFLT(const unsigned int opcode)
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (roundData.exception)
|
||||
float_raise(roundData.exception);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -115,26 +119,29 @@ unsigned int PerformFIX(const unsigned int opcode)
|
|||
{
|
||||
FPA11 *fpa11 = GET_FPA11();
|
||||
unsigned int Fn = getFm(opcode);
|
||||
struct roundingData roundData;
|
||||
|
||||
SetRoundingMode(opcode);
|
||||
roundData.mode = SetRoundingMode(opcode);
|
||||
roundData.precision = SetRoundingPrecision(opcode);
|
||||
roundData.exception = 0;
|
||||
|
||||
switch (fpa11->fType[Fn]) {
|
||||
case typeSingle:
|
||||
{
|
||||
writeRegister(getRd(opcode), float32_to_int32(fpa11->fpreg[Fn].fSingle));
|
||||
writeRegister(getRd(opcode), float32_to_int32(&roundData, fpa11->fpreg[Fn].fSingle));
|
||||
}
|
||||
break;
|
||||
|
||||
case typeDouble:
|
||||
{
|
||||
writeRegister(getRd(opcode), float64_to_int32(fpa11->fpreg[Fn].fDouble));
|
||||
writeRegister(getRd(opcode), float64_to_int32(&roundData, fpa11->fpreg[Fn].fDouble));
|
||||
}
|
||||
break;
|
||||
|
||||
#ifdef CONFIG_FPE_NWFPE_XP
|
||||
case typeExtended:
|
||||
{
|
||||
writeRegister(getRd(opcode), floatx80_to_int32(fpa11->fpreg[Fn].fExtended));
|
||||
writeRegister(getRd(opcode), floatx80_to_int32(&roundData, fpa11->fpreg[Fn].fExtended));
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
@ -143,6 +150,9 @@ unsigned int PerformFIX(const unsigned int opcode)
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (roundData.exception)
|
||||
float_raise(roundData.exception);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -116,8 +116,6 @@ fpmodule.c to integrate with the NetBSD kernel (I hope!).
|
|||
code to access data in user space in some other source files at the
|
||||
moment (grep for get_user / put_user calls). --philb]
|
||||
|
||||
float_exception_flags is a global variable in SoftFloat.
|
||||
|
||||
This function is called by the SoftFloat routines to raise a floating
|
||||
point exception. We check the trap enable byte in the FPSR, and raise
|
||||
a SIGFPE exception if necessary. If not the relevant bits in the
|
||||
|
@ -129,15 +127,14 @@ void float_raise(signed char flags)
|
|||
register unsigned int fpsr, cumulativeTraps;
|
||||
|
||||
#ifdef CONFIG_DEBUG_USER
|
||||
printk(KERN_DEBUG
|
||||
"NWFPE: %s[%d] takes exception %08x at %p from %08lx\n",
|
||||
current->comm, current->pid, flags,
|
||||
__builtin_return_address(0), GET_USERREG()->ARM_pc);
|
||||
/* Ignore inexact errors as there are far too many of them to log */
|
||||
if (flags & ~BIT_IXC)
|
||||
printk(KERN_DEBUG
|
||||
"NWFPE: %s[%d] takes exception %08x at %p from %08lx\n",
|
||||
current->comm, current->pid, flags,
|
||||
__builtin_return_address(0), GET_USERREG()->ARM_pc);
|
||||
#endif
|
||||
|
||||
/* Keep SoftFloat exception flags up to date. */
|
||||
float_exception_flags |= flags;
|
||||
|
||||
/* Read fpsr and initialize the cumulativeTraps. */
|
||||
fpsr = readFPSR();
|
||||
cumulativeTraps = 0;
|
||||
|
|
|
@ -36,17 +36,17 @@ float32 float32_arccos(float32 rFm);
|
|||
float32 float32_pow(float32 rFn, float32 rFm);
|
||||
float32 float32_pol(float32 rFn, float32 rFm);
|
||||
|
||||
static float32 float32_rsf(float32 rFn, float32 rFm)
|
||||
static float32 float32_rsf(struct roundingData *roundData, float32 rFn, float32 rFm)
|
||||
{
|
||||
return float32_sub(rFm, rFn);
|
||||
return float32_sub(roundData, rFm, rFn);
|
||||
}
|
||||
|
||||
static float32 float32_rdv(float32 rFn, float32 rFm)
|
||||
static float32 float32_rdv(struct roundingData *roundData, float32 rFn, float32 rFm)
|
||||
{
|
||||
return float32_div(rFm, rFn);
|
||||
return float32_div(roundData, rFm, rFn);
|
||||
}
|
||||
|
||||
static float32 (*const dyadic_single[16])(float32 rFn, float32 rFm) = {
|
||||
static float32 (*const dyadic_single[16])(struct roundingData *, float32 rFn, float32 rFm) = {
|
||||
[ADF_CODE >> 20] = float32_add,
|
||||
[MUF_CODE >> 20] = float32_mul,
|
||||
[SUF_CODE >> 20] = float32_sub,
|
||||
|
@ -60,22 +60,22 @@ static float32 (*const dyadic_single[16])(float32 rFn, float32 rFm) = {
|
|||
[FRD_CODE >> 20] = float32_rdv,
|
||||
};
|
||||
|
||||
static float32 float32_mvf(float32 rFm)
|
||||
static float32 float32_mvf(struct roundingData *roundData, float32 rFm)
|
||||
{
|
||||
return rFm;
|
||||
}
|
||||
|
||||
static float32 float32_mnf(float32 rFm)
|
||||
static float32 float32_mnf(struct roundingData *roundData, float32 rFm)
|
||||
{
|
||||
return rFm ^ 0x80000000;
|
||||
}
|
||||
|
||||
static float32 float32_abs(float32 rFm)
|
||||
static float32 float32_abs(struct roundingData *roundData, float32 rFm)
|
||||
{
|
||||
return rFm & 0x7fffffff;
|
||||
}
|
||||
|
||||
static float32 (*const monadic_single[16])(float32 rFm) = {
|
||||
static float32 (*const monadic_single[16])(struct roundingData*, float32 rFm) = {
|
||||
[MVF_CODE >> 20] = float32_mvf,
|
||||
[MNF_CODE >> 20] = float32_mnf,
|
||||
[ABS_CODE >> 20] = float32_abs,
|
||||
|
@ -85,7 +85,7 @@ static float32 (*const monadic_single[16])(float32 rFm) = {
|
|||
[NRM_CODE >> 20] = float32_mvf,
|
||||
};
|
||||
|
||||
unsigned int SingleCPDO(const unsigned int opcode, FPREG * rFd)
|
||||
unsigned int SingleCPDO(struct roundingData *roundData, const unsigned int opcode, FPREG * rFd)
|
||||
{
|
||||
FPA11 *fpa11 = GET_FPA11();
|
||||
float32 rFm;
|
||||
|
@ -108,13 +108,13 @@ unsigned int SingleCPDO(const unsigned int opcode, FPREG * rFd)
|
|||
if (fpa11->fType[Fn] == typeSingle &&
|
||||
dyadic_single[opc_mask_shift]) {
|
||||
rFn = fpa11->fpreg[Fn].fSingle;
|
||||
rFd->fSingle = dyadic_single[opc_mask_shift](rFn, rFm);
|
||||
rFd->fSingle = dyadic_single[opc_mask_shift](roundData, rFn, rFm);
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
if (monadic_single[opc_mask_shift]) {
|
||||
rFd->fSingle = monadic_single[opc_mask_shift](rFm);
|
||||
rFd->fSingle = monadic_single[opc_mask_shift](roundData, rFm);
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -74,7 +74,7 @@ enum {
|
|||
Software IEC/IEEE floating-point rounding mode.
|
||||
-------------------------------------------------------------------------------
|
||||
*/
|
||||
extern signed char float_rounding_mode;
|
||||
//extern int8 float_rounding_mode;
|
||||
enum {
|
||||
float_round_nearest_even = 0,
|
||||
float_round_to_zero = 1,
|
||||
|
@ -86,7 +86,6 @@ enum {
|
|||
-------------------------------------------------------------------------------
|
||||
Software IEC/IEEE floating-point exception flags.
|
||||
-------------------------------------------------------------------------------
|
||||
extern signed char float_exception_flags;
|
||||
enum {
|
||||
float_flag_inexact = 1,
|
||||
float_flag_underflow = 2,
|
||||
|
@ -99,7 +98,6 @@ ScottB: November 4, 1998
|
|||
Changed the enumeration to match the bit order in the FPA11.
|
||||
*/
|
||||
|
||||
extern signed char float_exception_flags;
|
||||
enum {
|
||||
float_flag_invalid = 1,
|
||||
float_flag_divbyzero = 2,
|
||||
|
@ -121,7 +119,7 @@ void float_raise( signed char );
|
|||
Software IEC/IEEE integer-to-floating-point conversion routines.
|
||||
-------------------------------------------------------------------------------
|
||||
*/
|
||||
float32 int32_to_float32( signed int );
|
||||
float32 int32_to_float32( struct roundingData *, signed int );
|
||||
float64 int32_to_float64( signed int );
|
||||
#ifdef FLOATX80
|
||||
floatx80 int32_to_floatx80( signed int );
|
||||
|
@ -132,7 +130,7 @@ floatx80 int32_to_floatx80( signed int );
|
|||
Software IEC/IEEE single-precision conversion routines.
|
||||
-------------------------------------------------------------------------------
|
||||
*/
|
||||
signed int float32_to_int32( float32 );
|
||||
signed int float32_to_int32( struct roundingData *, float32 );
|
||||
signed int float32_to_int32_round_to_zero( float32 );
|
||||
float64 float32_to_float64( float32 );
|
||||
#ifdef FLOATX80
|
||||
|
@ -144,13 +142,13 @@ floatx80 float32_to_floatx80( float32 );
|
|||
Software IEC/IEEE single-precision operations.
|
||||
-------------------------------------------------------------------------------
|
||||
*/
|
||||
float32 float32_round_to_int( float32 );
|
||||
float32 float32_add( float32, float32 );
|
||||
float32 float32_sub( float32, float32 );
|
||||
float32 float32_mul( float32, float32 );
|
||||
float32 float32_div( float32, float32 );
|
||||
float32 float32_rem( float32, float32 );
|
||||
float32 float32_sqrt( float32 );
|
||||
float32 float32_round_to_int( struct roundingData*, float32 );
|
||||
float32 float32_add( struct roundingData *, float32, float32 );
|
||||
float32 float32_sub( struct roundingData *, float32, float32 );
|
||||
float32 float32_mul( struct roundingData *, float32, float32 );
|
||||
float32 float32_div( struct roundingData *, float32, float32 );
|
||||
float32 float32_rem( struct roundingData *, float32, float32 );
|
||||
float32 float32_sqrt( struct roundingData*, float32 );
|
||||
char float32_eq( float32, float32 );
|
||||
char float32_le( float32, float32 );
|
||||
char float32_lt( float32, float32 );
|
||||
|
@ -164,9 +162,9 @@ char float32_is_signaling_nan( float32 );
|
|||
Software IEC/IEEE double-precision conversion routines.
|
||||
-------------------------------------------------------------------------------
|
||||
*/
|
||||
signed int float64_to_int32( float64 );
|
||||
signed int float64_to_int32( struct roundingData *, float64 );
|
||||
signed int float64_to_int32_round_to_zero( float64 );
|
||||
float32 float64_to_float32( float64 );
|
||||
float32 float64_to_float32( struct roundingData *, float64 );
|
||||
#ifdef FLOATX80
|
||||
floatx80 float64_to_floatx80( float64 );
|
||||
#endif
|
||||
|
@ -176,13 +174,13 @@ floatx80 float64_to_floatx80( float64 );
|
|||
Software IEC/IEEE double-precision operations.
|
||||
-------------------------------------------------------------------------------
|
||||
*/
|
||||
float64 float64_round_to_int( float64 );
|
||||
float64 float64_add( float64, float64 );
|
||||
float64 float64_sub( float64, float64 );
|
||||
float64 float64_mul( float64, float64 );
|
||||
float64 float64_div( float64, float64 );
|
||||
float64 float64_rem( float64, float64 );
|
||||
float64 float64_sqrt( float64 );
|
||||
float64 float64_round_to_int( struct roundingData *, float64 );
|
||||
float64 float64_add( struct roundingData *, float64, float64 );
|
||||
float64 float64_sub( struct roundingData *, float64, float64 );
|
||||
float64 float64_mul( struct roundingData *, float64, float64 );
|
||||
float64 float64_div( struct roundingData *, float64, float64 );
|
||||
float64 float64_rem( struct roundingData *, float64, float64 );
|
||||
float64 float64_sqrt( struct roundingData *, float64 );
|
||||
char float64_eq( float64, float64 );
|
||||
char float64_le( float64, float64 );
|
||||
char float64_lt( float64, float64 );
|
||||
|
@ -198,31 +196,23 @@ char float64_is_signaling_nan( float64 );
|
|||
Software IEC/IEEE extended double-precision conversion routines.
|
||||
-------------------------------------------------------------------------------
|
||||
*/
|
||||
signed int floatx80_to_int32( floatx80 );
|
||||
signed int floatx80_to_int32( struct roundingData *, floatx80 );
|
||||
signed int floatx80_to_int32_round_to_zero( floatx80 );
|
||||
float32 floatx80_to_float32( floatx80 );
|
||||
float64 floatx80_to_float64( floatx80 );
|
||||
|
||||
/*
|
||||
-------------------------------------------------------------------------------
|
||||
Software IEC/IEEE extended double-precision rounding precision. Valid
|
||||
values are 32, 64, and 80.
|
||||
-------------------------------------------------------------------------------
|
||||
*/
|
||||
extern signed char floatx80_rounding_precision;
|
||||
float32 floatx80_to_float32( struct roundingData *, floatx80 );
|
||||
float64 floatx80_to_float64( struct roundingData *, floatx80 );
|
||||
|
||||
/*
|
||||
-------------------------------------------------------------------------------
|
||||
Software IEC/IEEE extended double-precision operations.
|
||||
-------------------------------------------------------------------------------
|
||||
*/
|
||||
floatx80 floatx80_round_to_int( floatx80 );
|
||||
floatx80 floatx80_add( floatx80, floatx80 );
|
||||
floatx80 floatx80_sub( floatx80, floatx80 );
|
||||
floatx80 floatx80_mul( floatx80, floatx80 );
|
||||
floatx80 floatx80_div( floatx80, floatx80 );
|
||||
floatx80 floatx80_rem( floatx80, floatx80 );
|
||||
floatx80 floatx80_sqrt( floatx80 );
|
||||
floatx80 floatx80_round_to_int( struct roundingData *, floatx80 );
|
||||
floatx80 floatx80_add( struct roundingData *, floatx80, floatx80 );
|
||||
floatx80 floatx80_sub( struct roundingData *, floatx80, floatx80 );
|
||||
floatx80 floatx80_mul( struct roundingData *, floatx80, floatx80 );
|
||||
floatx80 floatx80_div( struct roundingData *, floatx80, floatx80 );
|
||||
floatx80 floatx80_rem( struct roundingData *, floatx80, floatx80 );
|
||||
floatx80 floatx80_sqrt( struct roundingData *, floatx80 );
|
||||
char floatx80_eq( floatx80, floatx80 );
|
||||
char floatx80_le( floatx80, floatx80 );
|
||||
char floatx80_lt( floatx80, floatx80 );
|
||||
|
|
|
@ -115,7 +115,7 @@ static int valid_kernel_stack(struct frame_tail *tail, struct pt_regs *regs)
|
|||
return (tailaddr > stack) && (tailaddr < stack_base);
|
||||
}
|
||||
|
||||
void arm_backtrace(struct pt_regs const *regs, unsigned int depth)
|
||||
void arm_backtrace(struct pt_regs * const regs, unsigned int depth)
|
||||
{
|
||||
struct frame_tail *tail;
|
||||
unsigned long last_address = 0;
|
||||
|
|
|
@ -770,6 +770,9 @@ vfp_double_add(struct vfp_double *vdd, struct vfp_double *vdn,
|
|||
if ((s64)m_sig < 0) {
|
||||
vdd->sign = vfp_sign_negate(vdd->sign);
|
||||
m_sig = -m_sig;
|
||||
} else if (m_sig == 0) {
|
||||
vdd->sign = (fpscr & FPSCR_RMODE_MASK) ==
|
||||
FPSCR_ROUND_MINUSINF ? 0x8000 : 0;
|
||||
}
|
||||
} else {
|
||||
m_sig += vdn->significand;
|
||||
|
|
|
@ -176,12 +176,12 @@ survive:
|
|||
* Handle the "normal" cases first - successful and sigbus
|
||||
*/
|
||||
switch (fault) {
|
||||
case 2:
|
||||
case VM_FAULT_MAJOR:
|
||||
tsk->maj_flt++;
|
||||
return fault;
|
||||
case 1:
|
||||
case VM_FAULT_MINOR:
|
||||
tsk->min_flt++;
|
||||
case 0:
|
||||
case VM_FAULT_SIGBUS:
|
||||
return fault;
|
||||
}
|
||||
|
||||
|
@ -226,14 +226,11 @@ int do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
|
|||
/*
|
||||
* Handle the "normal" case first
|
||||
*/
|
||||
if (fault > 0)
|
||||
switch (fault) {
|
||||
case VM_FAULT_MINOR:
|
||||
case VM_FAULT_MAJOR:
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* We had some memory, but were unable to
|
||||
* successfully fix up this page fault.
|
||||
*/
|
||||
if (fault == 0){
|
||||
case VM_FAULT_SIGBUS:
|
||||
goto do_sigbus;
|
||||
}
|
||||
|
||||
|
|
|
@ -284,13 +284,13 @@ do_page_fault(unsigned long address, struct pt_regs *regs,
|
|||
*/
|
||||
|
||||
switch (handle_mm_fault(mm, vma, address, writeaccess & 1)) {
|
||||
case 1:
|
||||
case VM_FAULT_MINOR:
|
||||
tsk->min_flt++;
|
||||
break;
|
||||
case 2:
|
||||
case VM_FAULT_MAJOR:
|
||||
tsk->maj_flt++;
|
||||
break;
|
||||
case 0:
|
||||
case VM_FAULT_SIGBUS:
|
||||
goto do_sigbus;
|
||||
default:
|
||||
goto out_of_memory;
|
||||
|
|
|
@ -163,13 +163,13 @@ asmlinkage void do_page_fault(int datammu, unsigned long esr0, unsigned long ear
|
|||
* the fault.
|
||||
*/
|
||||
switch (handle_mm_fault(mm, vma, ear0, write)) {
|
||||
case 1:
|
||||
case VM_FAULT_MINOR:
|
||||
current->min_flt++;
|
||||
break;
|
||||
case 2:
|
||||
case VM_FAULT_MAJOR:
|
||||
current->maj_flt++;
|
||||
break;
|
||||
case 0:
|
||||
case VM_FAULT_SIGBUS:
|
||||
goto do_sigbus;
|
||||
default:
|
||||
goto out_of_memory;
|
||||
|
|
|
@ -442,6 +442,13 @@ acpi_cpufreq_cpu_init (
|
|||
(u32) data->acpi_data.states[i].transition_latency);
|
||||
|
||||
cpufreq_frequency_table_get_attr(data->freq_table, policy->cpu);
|
||||
|
||||
/*
|
||||
* the first call to ->target() should result in us actually
|
||||
* writing something to the appropriate registers.
|
||||
*/
|
||||
data->resume = 1;
|
||||
|
||||
return (result);
|
||||
|
||||
err_freqfree:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* (c) 2003, 2004 Advanced Micro Devices, Inc.
|
||||
* (c) 2003, 2004, 2005 Advanced Micro Devices, Inc.
|
||||
* Your use of this code is subject to the terms and conditions of the
|
||||
* GNU general public license version 2. See "COPYING" or
|
||||
* http://www.gnu.org/licenses/gpl.html
|
||||
|
@ -44,7 +44,7 @@
|
|||
|
||||
#define PFX "powernow-k8: "
|
||||
#define BFX PFX "BIOS error: "
|
||||
#define VERSION "version 1.40.2"
|
||||
#define VERSION "version 1.50.3"
|
||||
#include "powernow-k8.h"
|
||||
|
||||
/* serialize freq changes */
|
||||
|
@ -231,7 +231,7 @@ static int write_new_vid(struct powernow_k8_data *data, u32 vid)
|
|||
/*
|
||||
* Reduce the vid by the max of step or reqvid.
|
||||
* Decreasing vid codes represent increasing voltages:
|
||||
* vid of 0 is 1.550V, vid of 0x1e is 0.800V, vid of 0x1f is off.
|
||||
* vid of 0 is 1.550V, vid of 0x1e is 0.800V, vid of VID_OFF is off.
|
||||
*/
|
||||
static int decrease_vid_code_by_step(struct powernow_k8_data *data, u32 reqvid, u32 step)
|
||||
{
|
||||
|
@ -466,7 +466,7 @@ static int check_supported_cpu(unsigned int cpu)
|
|||
eax = cpuid_eax(CPUID_PROCESSOR_SIGNATURE);
|
||||
if (((eax & CPUID_USE_XFAM_XMOD) != CPUID_USE_XFAM_XMOD) ||
|
||||
((eax & CPUID_XFAM) != CPUID_XFAM_K8) ||
|
||||
((eax & CPUID_XMOD) > CPUID_XMOD_REV_E)) {
|
||||
((eax & CPUID_XMOD) > CPUID_XMOD_REV_F)) {
|
||||
printk(KERN_INFO PFX "Processor cpuid %x not supported\n", eax);
|
||||
goto out;
|
||||
}
|
||||
|
@ -695,6 +695,7 @@ static void powernow_k8_acpi_pst_values(struct powernow_k8_data *data, unsigned
|
|||
|
||||
data->irt = (data->acpi_data.states[index].control >> IRT_SHIFT) & IRT_MASK;
|
||||
data->rvo = (data->acpi_data.states[index].control >> RVO_SHIFT) & RVO_MASK;
|
||||
data->exttype = (data->acpi_data.states[index].control >> EXT_TYPE_SHIFT) & EXT_TYPE_MASK;
|
||||
data->plllock = (data->acpi_data.states[index].control >> PLL_L_SHIFT) & PLL_L_MASK;
|
||||
data->vidmvs = 1 << ((data->acpi_data.states[index].control >> MVS_SHIFT) & MVS_MASK);
|
||||
data->vstable = (data->acpi_data.states[index].control >> VST_SHIFT) & VST_MASK;
|
||||
|
@ -734,8 +735,16 @@ static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data)
|
|||
}
|
||||
|
||||
for (i = 0; i < data->acpi_data.state_count; i++) {
|
||||
u32 fid = data->acpi_data.states[i].control & FID_MASK;
|
||||
u32 vid = (data->acpi_data.states[i].control >> VID_SHIFT) & VID_MASK;
|
||||
u32 fid;
|
||||
u32 vid;
|
||||
|
||||
if (data->exttype) {
|
||||
fid = data->acpi_data.states[i].status & FID_MASK;
|
||||
vid = (data->acpi_data.states[i].status >> VID_SHIFT) & VID_MASK;
|
||||
} else {
|
||||
fid = data->acpi_data.states[i].control & FID_MASK;
|
||||
vid = (data->acpi_data.states[i].control >> VID_SHIFT) & VID_MASK;
|
||||
}
|
||||
|
||||
dprintk(" %d : fid 0x%x, vid 0x%x\n", i, fid, vid);
|
||||
|
||||
|
@ -752,7 +761,7 @@ static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data)
|
|||
}
|
||||
|
||||
/* verify voltage is OK - BIOSs are using "off" to indicate invalid */
|
||||
if (vid == 0x1f) {
|
||||
if (vid == VID_OFF) {
|
||||
dprintk("invalid vid %u, ignoring\n", vid);
|
||||
powernow_table[i].frequency = CPUFREQ_ENTRY_INVALID;
|
||||
continue;
|
||||
|
@ -929,15 +938,6 @@ static int powernowk8_target(struct cpufreq_policy *pol, unsigned targfreq, unsi
|
|||
|
||||
down(&fidvid_sem);
|
||||
|
||||
for_each_cpu_mask(i, cpu_core_map[pol->cpu]) {
|
||||
/* make sure the sibling is initialized */
|
||||
if (!powernow_data[i]) {
|
||||
ret = 0;
|
||||
up(&fidvid_sem);
|
||||
goto err_out;
|
||||
}
|
||||
}
|
||||
|
||||
powernow_k8_acpi_pst_values(data, newstate);
|
||||
|
||||
if (transition_frequency(data, newstate)) {
|
||||
|
@ -977,7 +977,7 @@ static int __init powernowk8_cpu_init(struct cpufreq_policy *pol)
|
|||
{
|
||||
struct powernow_k8_data *data;
|
||||
cpumask_t oldmask = CPU_MASK_ALL;
|
||||
int rc;
|
||||
int rc, i;
|
||||
|
||||
if (!check_supported_cpu(pol->cpu))
|
||||
return -ENODEV;
|
||||
|
@ -1063,7 +1063,9 @@ static int __init powernowk8_cpu_init(struct cpufreq_policy *pol)
|
|||
printk("cpu_init done, current fid 0x%x, vid 0x%x\n",
|
||||
data->currfid, data->currvid);
|
||||
|
||||
powernow_data[pol->cpu] = data;
|
||||
for_each_cpu_mask(i, cpu_core_map[pol->cpu]) {
|
||||
powernow_data[i] = data;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* (c) 2003, 2004 Advanced Micro Devices, Inc.
|
||||
* (c) 2003, 2004, 2005 Advanced Micro Devices, Inc.
|
||||
* Your use of this code is subject to the terms and conditions of the
|
||||
* GNU general public license version 2. See "COPYING" or
|
||||
* http://www.gnu.org/licenses/gpl.html
|
||||
|
@ -19,6 +19,7 @@ struct powernow_k8_data {
|
|||
u32 vidmvs; /* usable value calculated from mvs */
|
||||
u32 vstable; /* voltage stabilization time, units 20 us */
|
||||
u32 plllock; /* pll lock time, units 1 us */
|
||||
u32 exttype; /* extended interface = 1 */
|
||||
|
||||
/* keep track of the current fid / vid */
|
||||
u32 currvid, currfid;
|
||||
|
@ -41,7 +42,7 @@ struct powernow_k8_data {
|
|||
#define CPUID_XFAM 0x0ff00000 /* extended family */
|
||||
#define CPUID_XFAM_K8 0
|
||||
#define CPUID_XMOD 0x000f0000 /* extended model */
|
||||
#define CPUID_XMOD_REV_E 0x00020000
|
||||
#define CPUID_XMOD_REV_F 0x00040000
|
||||
#define CPUID_USE_XFAM_XMOD 0x00000f00
|
||||
#define CPUID_GET_MAX_CAPABILITIES 0x80000000
|
||||
#define CPUID_FREQ_VOLT_CAPABILITIES 0x80000007
|
||||
|
@ -57,25 +58,26 @@ struct powernow_k8_data {
|
|||
|
||||
/* Field definitions within the FID VID Low Control MSR : */
|
||||
#define MSR_C_LO_INIT_FID_VID 0x00010000
|
||||
#define MSR_C_LO_NEW_VID 0x00001f00
|
||||
#define MSR_C_LO_NEW_FID 0x0000002f
|
||||
#define MSR_C_LO_NEW_VID 0x00003f00
|
||||
#define MSR_C_LO_NEW_FID 0x0000003f
|
||||
#define MSR_C_LO_VID_SHIFT 8
|
||||
|
||||
/* Field definitions within the FID VID High Control MSR : */
|
||||
#define MSR_C_HI_STP_GNT_TO 0x000fffff
|
||||
#define MSR_C_HI_STP_GNT_TO 0x000fffff
|
||||
|
||||
/* Field definitions within the FID VID Low Status MSR : */
|
||||
#define MSR_S_LO_CHANGE_PENDING 0x80000000 /* cleared when completed */
|
||||
#define MSR_S_LO_MAX_RAMP_VID 0x1f000000
|
||||
#define MSR_S_LO_CHANGE_PENDING 0x80000000 /* cleared when completed */
|
||||
#define MSR_S_LO_MAX_RAMP_VID 0x3f000000
|
||||
#define MSR_S_LO_MAX_FID 0x003f0000
|
||||
#define MSR_S_LO_START_FID 0x00003f00
|
||||
#define MSR_S_LO_CURRENT_FID 0x0000003f
|
||||
|
||||
/* Field definitions within the FID VID High Status MSR : */
|
||||
#define MSR_S_HI_MAX_WORKING_VID 0x001f0000
|
||||
#define MSR_S_HI_START_VID 0x00001f00
|
||||
#define MSR_S_HI_CURRENT_VID 0x0000001f
|
||||
#define MSR_C_HI_STP_GNT_BENIGN 0x00000001
|
||||
#define MSR_S_HI_MIN_WORKING_VID 0x3f000000
|
||||
#define MSR_S_HI_MAX_WORKING_VID 0x003f0000
|
||||
#define MSR_S_HI_START_VID 0x00003f00
|
||||
#define MSR_S_HI_CURRENT_VID 0x0000003f
|
||||
#define MSR_C_HI_STP_GNT_BENIGN 0x00000001
|
||||
|
||||
/*
|
||||
* There are restrictions frequencies have to follow:
|
||||
|
@ -99,13 +101,15 @@ struct powernow_k8_data {
|
|||
#define MIN_FREQ_RESOLUTION 200 /* fids jump by 2 matching freq jumps by 200 */
|
||||
|
||||
#define MAX_FID 0x2a /* Spec only gives FID values as far as 5 GHz */
|
||||
#define LEAST_VID 0x1e /* Lowest (numerically highest) useful vid value */
|
||||
#define LEAST_VID 0x3e /* Lowest (numerically highest) useful vid value */
|
||||
|
||||
#define MIN_FREQ 800 /* Min and max freqs, per spec */
|
||||
#define MAX_FREQ 5000
|
||||
|
||||
#define INVALID_FID_MASK 0xffffffc1 /* not a valid fid if these bits are set */
|
||||
#define INVALID_VID_MASK 0xffffffe0 /* not a valid vid if these bits are set */
|
||||
#define INVALID_VID_MASK 0xffffffc0 /* not a valid vid if these bits are set */
|
||||
|
||||
#define VID_OFF 0x3f
|
||||
|
||||
#define STOP_GRANT_5NS 1 /* min poss memory access latency for voltage change */
|
||||
|
||||
|
@ -121,12 +125,14 @@ struct powernow_k8_data {
|
|||
|
||||
#define IRT_SHIFT 30
|
||||
#define RVO_SHIFT 28
|
||||
#define EXT_TYPE_SHIFT 27
|
||||
#define PLL_L_SHIFT 20
|
||||
#define MVS_SHIFT 18
|
||||
#define VST_SHIFT 11
|
||||
#define VID_SHIFT 6
|
||||
#define IRT_MASK 3
|
||||
#define RVO_MASK 3
|
||||
#define EXT_TYPE_MASK 1
|
||||
#define PLL_L_MASK 0x7f
|
||||
#define MVS_MASK 3
|
||||
#define VST_MASK 0x7f
|
||||
|
|
|
@ -128,7 +128,7 @@ static int __devinit cpuid4_cache_lookup(int index, struct _cpuid4_info *this_le
|
|||
cpuid_count(4, index, &eax, &ebx, &ecx, &edx);
|
||||
cache_eax.full = eax;
|
||||
if (cache_eax.split.type == CACHE_TYPE_NULL)
|
||||
return -1;
|
||||
return -EIO; /* better error ? */
|
||||
|
||||
this_leaf->eax.full = eax;
|
||||
this_leaf->ebx.full = ebx;
|
||||
|
@ -334,6 +334,7 @@ static int __devinit detect_cache_attributes(unsigned int cpu)
|
|||
struct _cpuid4_info *this_leaf;
|
||||
unsigned long j;
|
||||
int retval;
|
||||
cpumask_t oldmask;
|
||||
|
||||
if (num_cache_leaves == 0)
|
||||
return -ENOENT;
|
||||
|
@ -345,19 +346,26 @@ static int __devinit detect_cache_attributes(unsigned int cpu)
|
|||
memset(cpuid4_info[cpu], 0,
|
||||
sizeof(struct _cpuid4_info) * num_cache_leaves);
|
||||
|
||||
oldmask = current->cpus_allowed;
|
||||
retval = set_cpus_allowed(current, cpumask_of_cpu(cpu));
|
||||
if (retval)
|
||||
goto out;
|
||||
|
||||
/* Do cpuid and store the results */
|
||||
retval = 0;
|
||||
for (j = 0; j < num_cache_leaves; j++) {
|
||||
this_leaf = CPUID4_INFO_IDX(cpu, j);
|
||||
retval = cpuid4_cache_lookup(j, this_leaf);
|
||||
if (unlikely(retval < 0))
|
||||
goto err_out;
|
||||
break;
|
||||
cache_shared_cpu_map_setup(cpu, j);
|
||||
}
|
||||
return 0;
|
||||
set_cpus_allowed(current, oldmask);
|
||||
|
||||
err_out:
|
||||
free_cache_attributes(cpu);
|
||||
return -ENOMEM;
|
||||
out:
|
||||
if (retval)
|
||||
free_cache_attributes(cpu);
|
||||
return retval;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SYSFS
|
||||
|
|
|
@ -76,6 +76,12 @@ static void __init init_transmeta(struct cpuinfo_x86 *c)
|
|||
#define USER686 (X86_FEATURE_TSC|X86_FEATURE_CX8|X86_FEATURE_CMOV)
|
||||
if ( c->x86 == 5 && (c->x86_capability[0] & USER686) == USER686 )
|
||||
c->x86 = 6;
|
||||
|
||||
#ifdef CONFIG_SYSCTL
|
||||
/* randomize_va_space slows us down enormously;
|
||||
it probably triggers retranslation of x86->native bytecode */
|
||||
randomize_va_space = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void transmeta_identify(struct cpuinfo_x86 * c)
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include <asm/io.h>
|
||||
#include <asm/apic.h>
|
||||
#include <asm/cpufeature.h>
|
||||
#include <asm/desc.h>
|
||||
|
||||
static inline unsigned long read_cr3(void)
|
||||
{
|
||||
|
@ -90,33 +91,32 @@ static void identity_map_page(unsigned long address)
|
|||
}
|
||||
#endif
|
||||
|
||||
|
||||
static void set_idt(void *newidt, __u16 limit)
|
||||
{
|
||||
unsigned char curidt[6];
|
||||
struct Xgt_desc_struct curidt;
|
||||
|
||||
/* ia32 supports unaliged loads & stores */
|
||||
(*(__u16 *)(curidt)) = limit;
|
||||
(*(__u32 *)(curidt +2)) = (unsigned long)(newidt);
|
||||
curidt.size = limit;
|
||||
curidt.address = (unsigned long)newidt;
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"lidt %0\n"
|
||||
: "=m" (curidt)
|
||||
"lidtl %0\n"
|
||||
: : "m" (curidt)
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
static void set_gdt(void *newgdt, __u16 limit)
|
||||
{
|
||||
unsigned char curgdt[6];
|
||||
struct Xgt_desc_struct curgdt;
|
||||
|
||||
/* ia32 supports unaligned loads & stores */
|
||||
(*(__u16 *)(curgdt)) = limit;
|
||||
(*(__u32 *)(curgdt +2)) = (unsigned long)(newgdt);
|
||||
curgdt.size = limit;
|
||||
curgdt.address = (unsigned long)newgdt;
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"lgdt %0\n"
|
||||
: "=m" (curgdt)
|
||||
"lgdtl %0\n"
|
||||
: : "m" (curgdt)
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
@ -1116,7 +1116,15 @@ int mp_register_gsi (u32 gsi, int edge_level, int active_high_low)
|
|||
*/
|
||||
int irq = gsi;
|
||||
if (gsi < MAX_GSI_NUM) {
|
||||
gsi = pci_irq++;
|
||||
if (gsi > 15)
|
||||
gsi = pci_irq++;
|
||||
#ifdef CONFIG_ACPI_BUS
|
||||
/*
|
||||
* Don't assign IRQ used by ACPI SCI
|
||||
*/
|
||||
if (gsi == acpi_fadt.sci_int)
|
||||
gsi = pci_irq++;
|
||||
#endif
|
||||
gsi_to_irq[irq] = gsi;
|
||||
} else {
|
||||
printk(KERN_ERR "GSI %u is too high\n", gsi);
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include <linux/nodemask.h>
|
||||
#include <asm/numaq.h>
|
||||
#include <asm/topology.h>
|
||||
#include <asm/processor.h>
|
||||
|
||||
#define MB_TO_PAGES(addr) ((addr) << (20 - PAGE_SHIFT))
|
||||
|
||||
|
@ -77,3 +78,11 @@ int __init get_memcfg_numaq(void)
|
|||
smp_dump_qct();
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int __init numaq_dsc_disable(void)
|
||||
{
|
||||
printk(KERN_DEBUG "NUMAQ: disabling TSC\n");
|
||||
tsc_disable = 1;
|
||||
return 0;
|
||||
}
|
||||
core_initcall(numaq_dsc_disable);
|
||||
|
|
|
@ -251,7 +251,7 @@ ENTRY(sys_call_table)
|
|||
.long sys_io_submit
|
||||
.long sys_io_cancel
|
||||
.long sys_fadvise64 /* 250 */
|
||||
.long sys_set_zone_reclaim
|
||||
.long sys_ni_syscall
|
||||
.long sys_exit_group
|
||||
.long sys_lookup_dcookie
|
||||
.long sys_epoll_create
|
||||
|
|
|
@ -243,6 +243,14 @@ static unsigned long calculate_numa_remap_pages(void)
|
|||
/* now the roundup is correct, convert to PAGE_SIZE pages */
|
||||
size = size * PTRS_PER_PTE;
|
||||
|
||||
if (node_end_pfn[nid] & (PTRS_PER_PTE-1)) {
|
||||
/*
|
||||
* Adjust size if node_end_pfn is not on a proper
|
||||
* pmd boundary. remap_numa_kva will barf otherwise.
|
||||
*/
|
||||
size += node_end_pfn[nid] & (PTRS_PER_PTE-1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Validate the region we are allocating only contains valid
|
||||
* pages.
|
||||
|
|
|
@ -30,6 +30,7 @@ static int __init pci_acpi_init(void)
|
|||
acpi_irq_penalty_init();
|
||||
pcibios_scanned++;
|
||||
pcibios_enable_irq = acpi_pci_irq_enable;
|
||||
pcibios_disable_irq = acpi_pci_irq_disable;
|
||||
|
||||
if (pci_routeirq) {
|
||||
/*
|
||||
|
|
|
@ -254,3 +254,9 @@ int pcibios_enable_device(struct pci_dev *dev, int mask)
|
|||
|
||||
return pcibios_enable_irq(dev);
|
||||
}
|
||||
|
||||
void pcibios_disable_device (struct pci_dev *dev)
|
||||
{
|
||||
if (pcibios_disable_irq)
|
||||
pcibios_disable_irq(dev);
|
||||
}
|
||||
|
|
|
@ -56,6 +56,7 @@ struct irq_router_handler {
|
|||
};
|
||||
|
||||
int (*pcibios_enable_irq)(struct pci_dev *dev) = NULL;
|
||||
void (*pcibios_disable_irq)(struct pci_dev *dev) = NULL;
|
||||
|
||||
/*
|
||||
* Check passed address for the PCI IRQ Routing Table signature
|
||||
|
@ -550,6 +551,13 @@ static __init int intel_router_probe(struct irq_router *r, struct pci_dev *route
|
|||
static __init int via_router_probe(struct irq_router *r, struct pci_dev *router, u16 device)
|
||||
{
|
||||
/* FIXME: We should move some of the quirk fixup stuff here */
|
||||
|
||||
if (router->device == PCI_DEVICE_ID_VIA_82C686 &&
|
||||
device == PCI_DEVICE_ID_VIA_82C586_0) {
|
||||
/* Asus k7m bios wrongly reports 82C686A as 586-compatible */
|
||||
device = PCI_DEVICE_ID_VIA_82C686;
|
||||
}
|
||||
|
||||
switch(device)
|
||||
{
|
||||
case PCI_DEVICE_ID_VIA_82C586_0:
|
||||
|
|
|
@ -73,3 +73,4 @@ extern int pcibios_scanned;
|
|||
extern spinlock_t pci_config_lock;
|
||||
|
||||
extern int (*pcibios_enable_irq)(struct pci_dev *dev);
|
||||
extern void (*pcibios_disable_irq)(struct pci_dev *dev);
|
||||
|
|
|
@ -1573,7 +1573,7 @@ sys_call_table:
|
|||
data8 sys_keyctl
|
||||
data8 sys_ioprio_set
|
||||
data8 sys_ioprio_get // 1275
|
||||
data8 sys_set_zone_reclaim
|
||||
data8 sys_ni_syscall
|
||||
data8 sys_inotify_init
|
||||
data8 sys_inotify_add_watch
|
||||
data8 sys_inotify_rm_watch
|
||||
|
|
|
@ -205,8 +205,7 @@ static long last_rtc_update = 0;
|
|||
* timer_interrupt() needs to keep up the real-time clock,
|
||||
* as well as call the "do_timer()" routine every clocktick
|
||||
*/
|
||||
static inline void
|
||||
do_timer_interrupt(int irq, void *dev_id, struct pt_regs * regs)
|
||||
irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
|
||||
{
|
||||
#ifndef CONFIG_SMP
|
||||
profile_tick(CPU_PROFILING, regs);
|
||||
|
@ -221,6 +220,7 @@ do_timer_interrupt(int irq, void *dev_id, struct pt_regs * regs)
|
|||
* CMOS clock accordingly every ~11 minutes. Set_rtc_mmss() has to be
|
||||
* called as close as possible to 500 ms before the new second starts.
|
||||
*/
|
||||
write_seqlock(&xtime_lock);
|
||||
if ((time_status & STA_UNSYNC) == 0
|
||||
&& xtime.tv_sec > last_rtc_update + 660
|
||||
&& (xtime.tv_nsec / 1000) >= 500000 - ((unsigned)TICK_SIZE) / 2
|
||||
|
@ -231,6 +231,7 @@ do_timer_interrupt(int irq, void *dev_id, struct pt_regs * regs)
|
|||
else /* do it again in 60 s */
|
||||
last_rtc_update = xtime.tv_sec - 600;
|
||||
}
|
||||
write_sequnlock(&xtime_lock);
|
||||
/* As we return to user mode fire off the other CPU schedulers..
|
||||
this is basically because we don't yet share IRQ's around.
|
||||
This message is rigged to be safe on the 386 - basically it's
|
||||
|
@ -238,14 +239,8 @@ do_timer_interrupt(int irq, void *dev_id, struct pt_regs * regs)
|
|||
|
||||
#ifdef CONFIG_SMP
|
||||
smp_local_timer_interrupt(regs);
|
||||
smp_send_timer();
|
||||
#endif
|
||||
}
|
||||
|
||||
irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
|
||||
{
|
||||
write_seqlock(&xtime_lock);
|
||||
do_timer_interrupt(irq, NULL, regs);
|
||||
write_sequnlock(&xtime_lock);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
|
|
@ -160,13 +160,13 @@ good_area:
|
|||
printk("handle_mm_fault returns %d\n",fault);
|
||||
#endif
|
||||
switch (fault) {
|
||||
case 1:
|
||||
case VM_FAULT_MINOR:
|
||||
current->min_flt++;
|
||||
break;
|
||||
case 2:
|
||||
case VM_FAULT_MAJOR:
|
||||
current->maj_flt++;
|
||||
break;
|
||||
case 0:
|
||||
case VM_FAULT_SIGBUS:
|
||||
goto bus_err;
|
||||
default:
|
||||
goto out_of_memory;
|
||||
|
|
|
@ -178,17 +178,17 @@ good_area:
|
|||
*/
|
||||
|
||||
switch (handle_mm_fault(mm, vma, address, (acc_type & VM_WRITE) != 0)) {
|
||||
case 1:
|
||||
case VM_FAULT_MINOR:
|
||||
++current->min_flt;
|
||||
break;
|
||||
case 2:
|
||||
case VM_FAULT_MAJOR:
|
||||
++current->maj_flt;
|
||||
break;
|
||||
case 0:
|
||||
case VM_FAULT_SIGBUS:
|
||||
/*
|
||||
* We ran out of memory, or some other thing happened
|
||||
* to us that made us unable to handle the page fault
|
||||
* gracefully.
|
||||
* We hit a hared mapping outside of the file, or some
|
||||
* other thing happened to us that made us unable to
|
||||
* handle the page fault gracefully.
|
||||
*/
|
||||
goto bad_area;
|
||||
default:
|
||||
|
|
|
@ -558,6 +558,7 @@ config PPC_MULTIPLATFORM
|
|||
|
||||
config APUS
|
||||
bool "Amiga-APUS"
|
||||
depends on BROKEN
|
||||
help
|
||||
Select APUS if configuring for a PowerUP Amiga.
|
||||
More information is available at:
|
||||
|
@ -647,6 +648,7 @@ config PAL4
|
|||
|
||||
config GEMINI
|
||||
bool "Synergy-Gemini"
|
||||
depends on BROKEN
|
||||
help
|
||||
Select Gemini if configuring for a Synergy Microsystems' Gemini
|
||||
series Single Board Computer. More information is available at:
|
||||
|
|
|
@ -61,6 +61,12 @@ zimageinitrd-$(CONFIG_IBM_OPENBIOS) := zImage.initrd-TREE
|
|||
end-$(CONFIG_EMBEDDEDBOOT) := embedded
|
||||
misc-$(CONFIG_EMBEDDEDBOOT) := misc-embedded.o
|
||||
|
||||
zimage-$(CONFIG_BAMBOO) := zImage-TREE
|
||||
zimageinitrd-$(CONFIG_BAMBOO) := zImage.initrd-TREE
|
||||
end-$(CONFIG_BAMBOO) := bamboo
|
||||
entrypoint-$(CONFIG_BAMBOO) := 0x01000000
|
||||
extra.o-$(CONFIG_BAMBOO) := pibs.o
|
||||
|
||||
zimage-$(CONFIG_EBONY) := zImage-TREE
|
||||
zimageinitrd-$(CONFIG_EBONY) := zImage.initrd-TREE
|
||||
end-$(CONFIG_EBONY) := ebony
|
||||
|
|
|
@ -91,9 +91,11 @@ load_kernel(unsigned long load_addr, int num_words, unsigned long cksum,
|
|||
|
||||
mac64 = simple_strtoull((char *)PIBS_MAC_BASE, 0, 16);
|
||||
memcpy(hold_residual->bi_enetaddr, (char *)&mac64+2, 6);
|
||||
#ifdef CONFIG_440GX
|
||||
#if defined(CONFIG_440GX) || defined(CONFIG_440EP)
|
||||
mac64 = simple_strtoull((char *)(PIBS_MAC_BASE+PIBS_MAC_OFFSET), 0, 16);
|
||||
memcpy(hold_residual->bi_enet1addr, (char *)&mac64+2, 6);
|
||||
#endif
|
||||
#ifdef CONFIG_440GX
|
||||
mac64 = simple_strtoull((char *)(PIBS_MAC_BASE+PIBS_MAC_OFFSET*2), 0, 16);
|
||||
memcpy(hold_residual->bi_enet2addr, (char *)&mac64+2, 6);
|
||||
mac64 = simple_strtoull((char *)(PIBS_MAC_BASE+PIBS_MAC_OFFSET*3), 0, 16);
|
||||
|
|
|
@ -0,0 +1,943 @@
|
|||
#
|
||||
# Automatically generated make config: don't edit
|
||||
# Linux kernel version: 2.6.12
|
||||
# Tue Jun 28 15:24:25 2005
|
||||
#
|
||||
CONFIG_MMU=y
|
||||
CONFIG_GENERIC_HARDIRQS=y
|
||||
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
|
||||
CONFIG_GENERIC_CALIBRATE_DELAY=y
|
||||
CONFIG_HAVE_DEC_LOCK=y
|
||||
CONFIG_PPC=y
|
||||
CONFIG_PPC32=y
|
||||
CONFIG_GENERIC_NVRAM=y
|
||||
CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
|
||||
|
||||
#
|
||||
# Code maturity level options
|
||||
#
|
||||
CONFIG_EXPERIMENTAL=y
|
||||
CONFIG_CLEAN_COMPILE=y
|
||||
CONFIG_BROKEN_ON_SMP=y
|
||||
CONFIG_INIT_ENV_ARG_LIMIT=32
|
||||
|
||||
#
|
||||
# General setup
|
||||
#
|
||||
CONFIG_LOCALVERSION=""
|
||||
CONFIG_SWAP=y
|
||||
CONFIG_SYSVIPC=y
|
||||
# CONFIG_POSIX_MQUEUE is not set
|
||||
# CONFIG_BSD_PROCESS_ACCT is not set
|
||||
CONFIG_SYSCTL=y
|
||||
# CONFIG_AUDIT is not set
|
||||
# CONFIG_HOTPLUG is not set
|
||||
CONFIG_KOBJECT_UEVENT=y
|
||||
# CONFIG_IKCONFIG is not set
|
||||
CONFIG_EMBEDDED=y
|
||||
CONFIG_KALLSYMS=y
|
||||
# CONFIG_KALLSYMS_ALL is not set
|
||||
# CONFIG_KALLSYMS_EXTRA_PASS is not set
|
||||
CONFIG_PRINTK=y
|
||||
CONFIG_BUG=y
|
||||
CONFIG_BASE_FULL=y
|
||||
CONFIG_FUTEX=y
|
||||
CONFIG_EPOLL=y
|
||||
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
|
||||
CONFIG_SHMEM=y
|
||||
CONFIG_CC_ALIGN_FUNCTIONS=0
|
||||
CONFIG_CC_ALIGN_LABELS=0
|
||||
CONFIG_CC_ALIGN_LOOPS=0
|
||||
CONFIG_CC_ALIGN_JUMPS=0
|
||||
# CONFIG_TINY_SHMEM is not set
|
||||
CONFIG_BASE_SMALL=0
|
||||
|
||||
#
|
||||
# Loadable module support
|
||||
#
|
||||
CONFIG_MODULES=y
|
||||
CONFIG_MODULE_UNLOAD=y
|
||||
# CONFIG_MODULE_FORCE_UNLOAD is not set
|
||||
CONFIG_OBSOLETE_MODPARM=y
|
||||
# CONFIG_MODVERSIONS is not set
|
||||
# CONFIG_MODULE_SRCVERSION_ALL is not set
|
||||
CONFIG_KMOD=y
|
||||
|
||||
#
|
||||
# Processor
|
||||
#
|
||||
# CONFIG_6xx is not set
|
||||
# CONFIG_40x is not set
|
||||
CONFIG_44x=y
|
||||
# CONFIG_POWER3 is not set
|
||||
# CONFIG_POWER4 is not set
|
||||
# CONFIG_8xx is not set
|
||||
# CONFIG_E200 is not set
|
||||
# CONFIG_E500 is not set
|
||||
CONFIG_PPC_FPU=y
|
||||
CONFIG_BOOKE=y
|
||||
CONFIG_PTE_64BIT=y
|
||||
CONFIG_PHYS_64BIT=y
|
||||
# CONFIG_MATH_EMULATION is not set
|
||||
# CONFIG_KEXEC is not set
|
||||
# CONFIG_CPU_FREQ is not set
|
||||
CONFIG_4xx=y
|
||||
|
||||
#
|
||||
# IBM 4xx options
|
||||
#
|
||||
CONFIG_BAMBOO=y
|
||||
# CONFIG_EBONY is not set
|
||||
# CONFIG_LUAN is not set
|
||||
# CONFIG_OCOTEA is not set
|
||||
CONFIG_440EP=y
|
||||
CONFIG_440=y
|
||||
CONFIG_IBM440EP_ERR42=y
|
||||
CONFIG_IBM_OCP=y
|
||||
# CONFIG_PPC4xx_DMA is not set
|
||||
CONFIG_PPC_GEN550=y
|
||||
# CONFIG_PM is not set
|
||||
CONFIG_NOT_COHERENT_CACHE=y
|
||||
|
||||
#
|
||||
# Platform options
|
||||
#
|
||||
# CONFIG_PC_KEYBOARD is not set
|
||||
# CONFIG_SMP is not set
|
||||
# CONFIG_PREEMPT is not set
|
||||
# CONFIG_HIGHMEM is not set
|
||||
CONFIG_SELECT_MEMORY_MODEL=y
|
||||
CONFIG_FLATMEM_MANUAL=y
|
||||
# CONFIG_DISCONTIGMEM_MANUAL is not set
|
||||
# CONFIG_SPARSEMEM_MANUAL is not set
|
||||
CONFIG_FLATMEM=y
|
||||
CONFIG_FLAT_NODE_MEM_MAP=y
|
||||
CONFIG_BINFMT_ELF=y
|
||||
# CONFIG_BINFMT_MISC is not set
|
||||
CONFIG_CMDLINE_BOOL=y
|
||||
CONFIG_CMDLINE="ip=on"
|
||||
CONFIG_SECCOMP=y
|
||||
CONFIG_ISA_DMA_API=y
|
||||
|
||||
#
|
||||
# Bus options
|
||||
#
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCI_DOMAINS=y
|
||||
# CONFIG_PCI_LEGACY_PROC is not set
|
||||
# CONFIG_PCI_NAMES is not set
|
||||
# CONFIG_PCI_DEBUG is not set
|
||||
|
||||
#
|
||||
# PCCARD (PCMCIA/CardBus) support
|
||||
#
|
||||
# CONFIG_PCCARD is not set
|
||||
|
||||
#
|
||||
# Advanced setup
|
||||
#
|
||||
# CONFIG_ADVANCED_OPTIONS is not set
|
||||
|
||||
#
|
||||
# Default settings for advanced configuration options are used
|
||||
#
|
||||
CONFIG_HIGHMEM_START=0xfe000000
|
||||
CONFIG_LOWMEM_SIZE=0x30000000
|
||||
CONFIG_KERNEL_START=0xc0000000
|
||||
CONFIG_TASK_SIZE=0x80000000
|
||||
CONFIG_CONSISTENT_START=0xff100000
|
||||
CONFIG_CONSISTENT_SIZE=0x00200000
|
||||
CONFIG_BOOT_LOAD=0x01000000
|
||||
|
||||
#
|
||||
# Device Drivers
|
||||
#
|
||||
|
||||
#
|
||||
# Generic Driver Options
|
||||
#
|
||||
# CONFIG_STANDALONE is not set
|
||||
CONFIG_PREVENT_FIRMWARE_BUILD=y
|
||||
# CONFIG_FW_LOADER is not set
|
||||
# CONFIG_DEBUG_DRIVER is not set
|
||||
|
||||
#
|
||||
# Memory Technology Devices (MTD)
|
||||
#
|
||||
# CONFIG_MTD is not set
|
||||
|
||||
#
|
||||
# Parallel port support
|
||||
#
|
||||
# CONFIG_PARPORT is not set
|
||||
|
||||
#
|
||||
# Plug and Play support
|
||||
#
|
||||
|
||||
#
|
||||
# Block devices
|
||||
#
|
||||
# CONFIG_BLK_DEV_FD is not set
|
||||
# CONFIG_BLK_CPQ_DA is not set
|
||||
# CONFIG_BLK_CPQ_CISS_DA is not set
|
||||
# CONFIG_BLK_DEV_DAC960 is not set
|
||||
# CONFIG_BLK_DEV_UMEM is not set
|
||||
# CONFIG_BLK_DEV_COW_COMMON is not set
|
||||
# CONFIG_BLK_DEV_LOOP is not set
|
||||
# CONFIG_BLK_DEV_NBD is not set
|
||||
# CONFIG_BLK_DEV_SX8 is not set
|
||||
# CONFIG_BLK_DEV_UB is not set
|
||||
# CONFIG_BLK_DEV_RAM is not set
|
||||
CONFIG_BLK_DEV_RAM_COUNT=16
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
# CONFIG_LBD is not set
|
||||
# CONFIG_CDROM_PKTCDVD is not set
|
||||
|
||||
#
|
||||
# IO Schedulers
|
||||
#
|
||||
CONFIG_IOSCHED_NOOP=y
|
||||
CONFIG_IOSCHED_AS=y
|
||||
CONFIG_IOSCHED_DEADLINE=y
|
||||
CONFIG_IOSCHED_CFQ=y
|
||||
# CONFIG_ATA_OVER_ETH is not set
|
||||
|
||||
#
|
||||
# ATA/ATAPI/MFM/RLL support
|
||||
#
|
||||
CONFIG_IDE=y
|
||||
CONFIG_BLK_DEV_IDE=y
|
||||
|
||||
#
|
||||
# Please see Documentation/ide.txt for help/info on IDE drives
|
||||
#
|
||||
# CONFIG_BLK_DEV_IDE_SATA is not set
|
||||
CONFIG_BLK_DEV_IDEDISK=y
|
||||
# CONFIG_IDEDISK_MULTI_MODE is not set
|
||||
# CONFIG_BLK_DEV_IDECD is not set
|
||||
# CONFIG_BLK_DEV_IDETAPE is not set
|
||||
# CONFIG_BLK_DEV_IDEFLOPPY is not set
|
||||
# CONFIG_BLK_DEV_IDESCSI is not set
|
||||
# CONFIG_IDE_TASK_IOCTL is not set
|
||||
|
||||
#
|
||||
# IDE chipset support/bugfixes
|
||||
#
|
||||
CONFIG_IDE_GENERIC=y
|
||||
CONFIG_BLK_DEV_IDEPCI=y
|
||||
# CONFIG_IDEPCI_SHARE_IRQ is not set
|
||||
# CONFIG_BLK_DEV_OFFBOARD is not set
|
||||
# CONFIG_BLK_DEV_GENERIC is not set
|
||||
# CONFIG_BLK_DEV_OPTI621 is not set
|
||||
# CONFIG_BLK_DEV_SL82C105 is not set
|
||||
CONFIG_BLK_DEV_IDEDMA_PCI=y
|
||||
# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
|
||||
# CONFIG_IDEDMA_PCI_AUTO is not set
|
||||
# CONFIG_BLK_DEV_AEC62XX is not set
|
||||
# CONFIG_BLK_DEV_ALI15X3 is not set
|
||||
# CONFIG_BLK_DEV_AMD74XX is not set
|
||||
CONFIG_BLK_DEV_CMD64X=y
|
||||
# CONFIG_BLK_DEV_TRIFLEX is not set
|
||||
# CONFIG_BLK_DEV_CY82C693 is not set
|
||||
# CONFIG_BLK_DEV_CS5520 is not set
|
||||
# CONFIG_BLK_DEV_CS5530 is not set
|
||||
# CONFIG_BLK_DEV_HPT34X is not set
|
||||
# CONFIG_BLK_DEV_HPT366 is not set
|
||||
# CONFIG_BLK_DEV_SC1200 is not set
|
||||
# CONFIG_BLK_DEV_PIIX is not set
|
||||
# CONFIG_BLK_DEV_IT821X is not set
|
||||
# CONFIG_BLK_DEV_NS87415 is not set
|
||||
# CONFIG_BLK_DEV_PDC202XX_OLD is not set
|
||||
# CONFIG_BLK_DEV_PDC202XX_NEW is not set
|
||||
# CONFIG_BLK_DEV_SVWKS is not set
|
||||
# CONFIG_BLK_DEV_SIIMAGE is not set
|
||||
# CONFIG_BLK_DEV_SLC90E66 is not set
|
||||
# CONFIG_BLK_DEV_TRM290 is not set
|
||||
# CONFIG_BLK_DEV_VIA82CXXX is not set
|
||||
# CONFIG_IDE_ARM is not set
|
||||
CONFIG_BLK_DEV_IDEDMA=y
|
||||
# CONFIG_IDEDMA_IVB is not set
|
||||
# CONFIG_IDEDMA_AUTO is not set
|
||||
# CONFIG_BLK_DEV_HD is not set
|
||||
|
||||
#
|
||||
# SCSI device support
|
||||
#
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_SCSI_PROC_FS=y
|
||||
|
||||
#
|
||||
# SCSI support type (disk, tape, CD-ROM)
|
||||
#
|
||||
# CONFIG_BLK_DEV_SD is not set
|
||||
CONFIG_CHR_DEV_ST=y
|
||||
# CONFIG_CHR_DEV_OSST is not set
|
||||
# CONFIG_BLK_DEV_SR is not set
|
||||
# CONFIG_CHR_DEV_SG is not set
|
||||
# CONFIG_CHR_DEV_SCH is not set
|
||||
|
||||
#
|
||||
# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
|
||||
#
|
||||
# CONFIG_SCSI_MULTI_LUN is not set
|
||||
# CONFIG_SCSI_CONSTANTS is not set
|
||||
# CONFIG_SCSI_LOGGING is not set
|
||||
|
||||
#
|
||||
# SCSI Transport Attributes
|
||||
#
|
||||
CONFIG_SCSI_SPI_ATTRS=y
|
||||
# CONFIG_SCSI_FC_ATTRS is not set
|
||||
# CONFIG_SCSI_ISCSI_ATTRS is not set
|
||||
|
||||
#
|
||||
# SCSI low-level drivers
|
||||
#
|
||||
# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
|
||||
# CONFIG_SCSI_3W_9XXX is not set
|
||||
# CONFIG_SCSI_ACARD is not set
|
||||
# CONFIG_SCSI_AACRAID is not set
|
||||
# CONFIG_SCSI_AIC7XXX is not set
|
||||
# CONFIG_SCSI_AIC7XXX_OLD is not set
|
||||
# CONFIG_SCSI_AIC79XX is not set
|
||||
# CONFIG_SCSI_DPT_I2O is not set
|
||||
# CONFIG_MEGARAID_NEWGEN is not set
|
||||
# CONFIG_MEGARAID_LEGACY is not set
|
||||
# CONFIG_SCSI_SATA is not set
|
||||
# CONFIG_SCSI_BUSLOGIC is not set
|
||||
# CONFIG_SCSI_DMX3191D is not set
|
||||
# CONFIG_SCSI_EATA is not set
|
||||
# CONFIG_SCSI_FUTURE_DOMAIN is not set
|
||||
# CONFIG_SCSI_GDTH is not set
|
||||
# CONFIG_SCSI_IPS is not set
|
||||
# CONFIG_SCSI_INITIO is not set
|
||||
# CONFIG_SCSI_INIA100 is not set
|
||||
CONFIG_SCSI_SYM53C8XX_2=y
|
||||
CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
|
||||
CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
|
||||
CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
|
||||
# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set
|
||||
# CONFIG_SCSI_IPR is not set
|
||||
# CONFIG_SCSI_QLOGIC_FC is not set
|
||||
# CONFIG_SCSI_QLOGIC_1280 is not set
|
||||
CONFIG_SCSI_QLA2XXX=y
|
||||
# CONFIG_SCSI_QLA21XX is not set
|
||||
# CONFIG_SCSI_QLA22XX is not set
|
||||
# CONFIG_SCSI_QLA2300 is not set
|
||||
# CONFIG_SCSI_QLA2322 is not set
|
||||
# CONFIG_SCSI_QLA6312 is not set
|
||||
# CONFIG_SCSI_LPFC is not set
|
||||
# CONFIG_SCSI_DC395x is not set
|
||||
# CONFIG_SCSI_DC390T is not set
|
||||
# CONFIG_SCSI_NSP32 is not set
|
||||
# CONFIG_SCSI_DEBUG is not set
|
||||
|
||||
#
|
||||
# Multi-device support (RAID and LVM)
|
||||
#
|
||||
# CONFIG_MD is not set
|
||||
|
||||
#
|
||||
# Fusion MPT device support
|
||||
#
|
||||
# CONFIG_FUSION is not set
|
||||
# CONFIG_FUSION_SPI is not set
|
||||
# CONFIG_FUSION_FC is not set
|
||||
|
||||
#
|
||||
# IEEE 1394 (FireWire) support
|
||||
#
|
||||
# CONFIG_IEEE1394 is not set
|
||||
|
||||
#
|
||||
# I2O device support
|
||||
#
|
||||
# CONFIG_I2O is not set
|
||||
|
||||
#
|
||||
# Macintosh device drivers
|
||||
#
|
||||
|
||||
#
|
||||
# Networking support
|
||||
#
|
||||
CONFIG_NET=y
|
||||
|
||||
#
|
||||
# Networking options
|
||||
#
|
||||
CONFIG_PACKET=y
|
||||
# CONFIG_PACKET_MMAP is not set
|
||||
CONFIG_UNIX=y
|
||||
# CONFIG_NET_KEY is not set
|
||||
CONFIG_INET=y
|
||||
# CONFIG_IP_MULTICAST is not set
|
||||
# CONFIG_IP_ADVANCED_ROUTER is not set
|
||||
CONFIG_IP_FIB_HASH=y
|
||||
CONFIG_IP_PNP=y
|
||||
# CONFIG_IP_PNP_DHCP is not set
|
||||
CONFIG_IP_PNP_BOOTP=y
|
||||
# CONFIG_IP_PNP_RARP is not set
|
||||
# CONFIG_NET_IPIP is not set
|
||||
# CONFIG_NET_IPGRE is not set
|
||||
# CONFIG_ARPD is not set
|
||||
# CONFIG_SYN_COOKIES is not set
|
||||
# CONFIG_INET_AH is not set
|
||||
# CONFIG_INET_ESP is not set
|
||||
# CONFIG_INET_IPCOMP is not set
|
||||
# CONFIG_INET_TUNNEL is not set
|
||||
CONFIG_IP_TCPDIAG=y
|
||||
# CONFIG_IP_TCPDIAG_IPV6 is not set
|
||||
# CONFIG_TCP_CONG_ADVANCED is not set
|
||||
CONFIG_TCP_CONG_BIC=y
|
||||
|
||||
#
|
||||
# IP: Virtual Server Configuration
|
||||
#
|
||||
# CONFIG_IP_VS is not set
|
||||
# CONFIG_IPV6 is not set
|
||||
CONFIG_NETFILTER=y
|
||||
# CONFIG_NETFILTER_DEBUG is not set
|
||||
|
||||
#
|
||||
# IP: Netfilter Configuration
|
||||
#
|
||||
# CONFIG_IP_NF_CONNTRACK is not set
|
||||
# CONFIG_IP_NF_CONNTRACK_MARK is not set
|
||||
# CONFIG_IP_NF_QUEUE is not set
|
||||
# CONFIG_IP_NF_IPTABLES is not set
|
||||
# CONFIG_IP_NF_ARPTABLES is not set
|
||||
|
||||
#
|
||||
# SCTP Configuration (EXPERIMENTAL)
|
||||
#
|
||||
# CONFIG_IP_SCTP is not set
|
||||
# CONFIG_ATM is not set
|
||||
# CONFIG_BRIDGE is not set
|
||||
# CONFIG_VLAN_8021Q is not set
|
||||
# CONFIG_DECNET is not set
|
||||
# CONFIG_LLC2 is not set
|
||||
# CONFIG_IPX is not set
|
||||
# CONFIG_ATALK is not set
|
||||
# CONFIG_X25 is not set
|
||||
# CONFIG_LAPB is not set
|
||||
# CONFIG_NET_DIVERT is not set
|
||||
# CONFIG_ECONET is not set
|
||||
# CONFIG_WAN_ROUTER is not set
|
||||
|
||||
#
|
||||
# QoS and/or fair queueing
|
||||
#
|
||||
# CONFIG_NET_SCHED is not set
|
||||
# CONFIG_NET_CLS_ROUTE is not set
|
||||
|
||||
#
|
||||
# Network testing
|
||||
#
|
||||
# CONFIG_NET_PKTGEN is not set
|
||||
# CONFIG_NETPOLL is not set
|
||||
# CONFIG_NET_POLL_CONTROLLER is not set
|
||||
# CONFIG_HAMRADIO is not set
|
||||
# CONFIG_IRDA is not set
|
||||
# CONFIG_BT is not set
|
||||
CONFIG_NETDEVICES=y
|
||||
# CONFIG_DUMMY is not set
|
||||
# CONFIG_BONDING is not set
|
||||
# CONFIG_EQUALIZER is not set
|
||||
# CONFIG_TUN is not set
|
||||
|
||||
#
|
||||
# ARCnet devices
|
||||
#
|
||||
# CONFIG_ARCNET is not set
|
||||
|
||||
#
|
||||
# Ethernet (10 or 100Mbit)
|
||||
#
|
||||
CONFIG_NET_ETHERNET=y
|
||||
CONFIG_MII=y
|
||||
# CONFIG_HAPPYMEAL is not set
|
||||
# CONFIG_SUNGEM is not set
|
||||
# CONFIG_NET_VENDOR_3COM is not set
|
||||
|
||||
#
|
||||
# Tulip family network device support
|
||||
#
|
||||
# CONFIG_NET_TULIP is not set
|
||||
# CONFIG_HP100 is not set
|
||||
CONFIG_IBM_EMAC=y
|
||||
# CONFIG_IBM_EMAC_ERRMSG is not set
|
||||
CONFIG_IBM_EMAC_RXB=64
|
||||
CONFIG_IBM_EMAC_TXB=8
|
||||
CONFIG_IBM_EMAC_FGAP=8
|
||||
CONFIG_IBM_EMAC_SKBRES=0
|
||||
CONFIG_NET_PCI=y
|
||||
# CONFIG_PCNET32 is not set
|
||||
# CONFIG_AMD8111_ETH is not set
|
||||
# CONFIG_ADAPTEC_STARFIRE is not set
|
||||
# CONFIG_B44 is not set
|
||||
# CONFIG_FORCEDETH is not set
|
||||
# CONFIG_DGRS is not set
|
||||
CONFIG_EEPRO100=y
|
||||
# CONFIG_E100 is not set
|
||||
# CONFIG_FEALNX is not set
|
||||
CONFIG_NATSEMI=y
|
||||
# CONFIG_NE2K_PCI is not set
|
||||
# CONFIG_8139CP is not set
|
||||
# CONFIG_8139TOO is not set
|
||||
# CONFIG_SIS900 is not set
|
||||
# CONFIG_EPIC100 is not set
|
||||
# CONFIG_SUNDANCE is not set
|
||||
# CONFIG_TLAN is not set
|
||||
# CONFIG_VIA_RHINE is not set
|
||||
|
||||
#
|
||||
# Ethernet (1000 Mbit)
|
||||
#
|
||||
# CONFIG_ACENIC is not set
|
||||
# CONFIG_DL2K is not set
|
||||
CONFIG_E1000=y
|
||||
# CONFIG_E1000_NAPI is not set
|
||||
# CONFIG_NS83820 is not set
|
||||
# CONFIG_HAMACHI is not set
|
||||
# CONFIG_YELLOWFIN is not set
|
||||
# CONFIG_R8169 is not set
|
||||
# CONFIG_SKGE is not set
|
||||
# CONFIG_SK98LIN is not set
|
||||
# CONFIG_VIA_VELOCITY is not set
|
||||
# CONFIG_TIGON3 is not set
|
||||
# CONFIG_BNX2 is not set
|
||||
|
||||
#
|
||||
# Ethernet (10000 Mbit)
|
||||
#
|
||||
# CONFIG_IXGB is not set
|
||||
# CONFIG_S2IO is not set
|
||||
|
||||
#
|
||||
# Token Ring devices
|
||||
#
|
||||
# CONFIG_TR is not set
|
||||
|
||||
#
|
||||
# Wireless LAN (non-hamradio)
|
||||
#
|
||||
# CONFIG_NET_RADIO is not set
|
||||
|
||||
#
|
||||
# Wan interfaces
|
||||
#
|
||||
# CONFIG_WAN is not set
|
||||
# CONFIG_FDDI is not set
|
||||
# CONFIG_HIPPI is not set
|
||||
# CONFIG_PPP is not set
|
||||
# CONFIG_SLIP is not set
|
||||
# CONFIG_NET_FC is not set
|
||||
# CONFIG_SHAPER is not set
|
||||
# CONFIG_NETCONSOLE is not set
|
||||
|
||||
#
|
||||
# ISDN subsystem
|
||||
#
|
||||
# CONFIG_ISDN is not set
|
||||
|
||||
#
|
||||
# Telephony Support
|
||||
#
|
||||
# CONFIG_PHONE is not set
|
||||
|
||||
#
|
||||
# Input device support
|
||||
#
|
||||
CONFIG_INPUT=y
|
||||
|
||||
#
|
||||
# Userland interfaces
|
||||
#
|
||||
CONFIG_INPUT_MOUSEDEV=y
|
||||
CONFIG_INPUT_MOUSEDEV_PSAUX=y
|
||||
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
|
||||
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
|
||||
# CONFIG_INPUT_JOYDEV is not set
|
||||
# CONFIG_INPUT_TSDEV is not set
|
||||
# CONFIG_INPUT_EVDEV is not set
|
||||
# CONFIG_INPUT_EVBUG is not set
|
||||
|
||||
#
|
||||
# Input Device Drivers
|
||||
#
|
||||
# CONFIG_INPUT_KEYBOARD is not set
|
||||
# CONFIG_INPUT_MOUSE is not set
|
||||
# CONFIG_INPUT_JOYSTICK is not set
|
||||
# CONFIG_INPUT_TOUCHSCREEN is not set
|
||||
# CONFIG_INPUT_MISC is not set
|
||||
|
||||
#
|
||||
# Hardware I/O ports
|
||||
#
|
||||
CONFIG_SERIO=y
|
||||
# CONFIG_SERIO_I8042 is not set
|
||||
# CONFIG_SERIO_SERPORT is not set
|
||||
# CONFIG_SERIO_PCIPS2 is not set
|
||||
# CONFIG_SERIO_LIBPS2 is not set
|
||||
# CONFIG_SERIO_RAW is not set
|
||||
# CONFIG_GAMEPORT is not set
|
||||
|
||||
#
|
||||
# Character devices
|
||||
#
|
||||
# CONFIG_VT is not set
|
||||
# CONFIG_SERIAL_NONSTANDARD is not set
|
||||
|
||||
#
|
||||
# Serial drivers
|
||||
#
|
||||
CONFIG_SERIAL_8250=y
|
||||
CONFIG_SERIAL_8250_CONSOLE=y
|
||||
CONFIG_SERIAL_8250_NR_UARTS=4
|
||||
CONFIG_SERIAL_8250_EXTENDED=y
|
||||
# CONFIG_SERIAL_8250_MANY_PORTS is not set
|
||||
CONFIG_SERIAL_8250_SHARE_IRQ=y
|
||||
# CONFIG_SERIAL_8250_DETECT_IRQ is not set
|
||||
# CONFIG_SERIAL_8250_RSA is not set
|
||||
|
||||
#
|
||||
# Non-8250 serial port support
|
||||
#
|
||||
CONFIG_SERIAL_CORE=y
|
||||
CONFIG_SERIAL_CORE_CONSOLE=y
|
||||
# CONFIG_SERIAL_JSM is not set
|
||||
CONFIG_UNIX98_PTYS=y
|
||||
CONFIG_LEGACY_PTYS=y
|
||||
CONFIG_LEGACY_PTY_COUNT=256
|
||||
|
||||
#
|
||||
# IPMI
|
||||
#
|
||||
# CONFIG_IPMI_HANDLER is not set
|
||||
|
||||
#
|
||||
# Watchdog Cards
|
||||
#
|
||||
# CONFIG_WATCHDOG is not set
|
||||
# CONFIG_NVRAM is not set
|
||||
# CONFIG_GEN_RTC is not set
|
||||
# CONFIG_DTLK is not set
|
||||
# CONFIG_R3964 is not set
|
||||
# CONFIG_APPLICOM is not set
|
||||
|
||||
#
|
||||
# Ftape, the floppy tape device driver
|
||||
#
|
||||
# CONFIG_AGP is not set
|
||||
# CONFIG_DRM is not set
|
||||
# CONFIG_RAW_DRIVER is not set
|
||||
|
||||
#
|
||||
# TPM devices
|
||||
#
|
||||
# CONFIG_TCG_TPM is not set
|
||||
|
||||
#
|
||||
# I2C support
|
||||
#
|
||||
# CONFIG_I2C is not set
|
||||
|
||||
#
|
||||
# Dallas's 1-wire bus
|
||||
#
|
||||
# CONFIG_W1 is not set
|
||||
|
||||
#
|
||||
# Misc devices
|
||||
#
|
||||
|
||||
#
|
||||
# Multimedia devices
|
||||
#
|
||||
# CONFIG_VIDEO_DEV is not set
|
||||
|
||||
#
|
||||
# Digital Video Broadcasting Devices
|
||||
#
|
||||
# CONFIG_DVB is not set
|
||||
|
||||
#
|
||||
# Graphics support
|
||||
#
|
||||
# CONFIG_FB is not set
|
||||
|
||||
#
|
||||
# Sound
|
||||
#
|
||||
# CONFIG_SOUND is not set
|
||||
|
||||
#
|
||||
# USB support
|
||||
#
|
||||
CONFIG_USB_ARCH_HAS_HCD=y
|
||||
CONFIG_USB_ARCH_HAS_OHCI=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_DEBUG=y
|
||||
|
||||
#
|
||||
# Miscellaneous USB options
|
||||
#
|
||||
# CONFIG_USB_DEVICEFS is not set
|
||||
# CONFIG_USB_BANDWIDTH is not set
|
||||
# CONFIG_USB_DYNAMIC_MINORS is not set
|
||||
# CONFIG_USB_OTG is not set
|
||||
|
||||
#
|
||||
# USB Host Controller Drivers
|
||||
#
|
||||
# CONFIG_USB_EHCI_HCD is not set
|
||||
# CONFIG_USB_ISP116X_HCD is not set
|
||||
# CONFIG_USB_OHCI_HCD is not set
|
||||
# CONFIG_USB_UHCI_HCD is not set
|
||||
# CONFIG_USB_SL811_HCD is not set
|
||||
|
||||
#
|
||||
# USB Device Class drivers
|
||||
#
|
||||
# CONFIG_USB_BLUETOOTH_TTY is not set
|
||||
# CONFIG_USB_ACM is not set
|
||||
# CONFIG_USB_PRINTER is not set
|
||||
|
||||
#
|
||||
# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information
|
||||
#
|
||||
# CONFIG_USB_STORAGE is not set
|
||||
|
||||
#
|
||||
# USB Input Devices
|
||||
#
|
||||
# CONFIG_USB_HID is not set
|
||||
|
||||
#
|
||||
# USB HID Boot Protocol drivers
|
||||
#
|
||||
# CONFIG_USB_KBD is not set
|
||||
# CONFIG_USB_MOUSE is not set
|
||||
# CONFIG_USB_AIPTEK is not set
|
||||
# CONFIG_USB_WACOM is not set
|
||||
# CONFIG_USB_ACECAD is not set
|
||||
# CONFIG_USB_KBTAB is not set
|
||||
# CONFIG_USB_POWERMATE is not set
|
||||
# CONFIG_USB_MTOUCH is not set
|
||||
# CONFIG_USB_ITMTOUCH is not set
|
||||
# CONFIG_USB_EGALAX is not set
|
||||
# CONFIG_USB_XPAD is not set
|
||||
# CONFIG_USB_ATI_REMOTE is not set
|
||||
|
||||
#
|
||||
# USB Imaging devices
|
||||
#
|
||||
# CONFIG_USB_MDC800 is not set
|
||||
# CONFIG_USB_MICROTEK is not set
|
||||
|
||||
#
|
||||
# USB Multimedia devices
|
||||
#
|
||||
# CONFIG_USB_DABUSB is not set
|
||||
|
||||
#
|
||||
# Video4Linux support is needed for USB Multimedia device support
|
||||
#
|
||||
|
||||
#
|
||||
# USB Network Adapters
|
||||
#
|
||||
# CONFIG_USB_CATC is not set
|
||||
# CONFIG_USB_KAWETH is not set
|
||||
CONFIG_USB_PEGASUS=y
|
||||
# CONFIG_USB_RTL8150 is not set
|
||||
# CONFIG_USB_USBNET is not set
|
||||
CONFIG_USB_MON=y
|
||||
|
||||
#
|
||||
# USB port drivers
|
||||
#
|
||||
|
||||
#
|
||||
# USB Serial Converter support
|
||||
#
|
||||
# CONFIG_USB_SERIAL is not set
|
||||
|
||||
#
|
||||
# USB Miscellaneous drivers
|
||||
#
|
||||
# CONFIG_USB_EMI62 is not set
|
||||
# CONFIG_USB_EMI26 is not set
|
||||
# CONFIG_USB_AUERSWALD is not set
|
||||
# CONFIG_USB_RIO500 is not set
|
||||
# CONFIG_USB_LEGOTOWER is not set
|
||||
# CONFIG_USB_LCD is not set
|
||||
# CONFIG_USB_LED is not set
|
||||
# CONFIG_USB_CYTHERM is not set
|
||||
# CONFIG_USB_PHIDGETKIT is not set
|
||||
# CONFIG_USB_PHIDGETSERVO is not set
|
||||
# CONFIG_USB_IDMOUSE is not set
|
||||
|
||||
#
|
||||
# USB DSL modem support
|
||||
#
|
||||
|
||||
#
|
||||
# USB Gadget Support
|
||||
#
|
||||
# CONFIG_USB_GADGET is not set
|
||||
|
||||
#
|
||||
# MMC/SD Card support
|
||||
#
|
||||
# CONFIG_MMC is not set
|
||||
|
||||
#
|
||||
# InfiniBand support
|
||||
#
|
||||
# CONFIG_INFINIBAND is not set
|
||||
|
||||
#
|
||||
# SN Devices
|
||||
#
|
||||
|
||||
#
|
||||
# File systems
|
||||
#
|
||||
# CONFIG_EXT2_FS is not set
|
||||
# CONFIG_EXT3_FS is not set
|
||||
# CONFIG_JBD is not set
|
||||
# CONFIG_REISERFS_FS is not set
|
||||
# CONFIG_JFS_FS is not set
|
||||
|
||||
#
|
||||
# XFS support
|
||||
#
|
||||
# CONFIG_XFS_FS is not set
|
||||
# CONFIG_MINIX_FS is not set
|
||||
# CONFIG_ROMFS_FS is not set
|
||||
# CONFIG_QUOTA is not set
|
||||
CONFIG_DNOTIFY=y
|
||||
# CONFIG_AUTOFS_FS is not set
|
||||
# CONFIG_AUTOFS4_FS is not set
|
||||
|
||||
#
|
||||
# CD-ROM/DVD Filesystems
|
||||
#
|
||||
# CONFIG_ISO9660_FS is not set
|
||||
# CONFIG_UDF_FS is not set
|
||||
|
||||
#
|
||||
# DOS/FAT/NT Filesystems
|
||||
#
|
||||
# CONFIG_MSDOS_FS is not set
|
||||
# CONFIG_VFAT_FS is not set
|
||||
# CONFIG_NTFS_FS is not set
|
||||
|
||||
#
|
||||
# Pseudo filesystems
|
||||
#
|
||||
CONFIG_PROC_FS=y
|
||||
CONFIG_PROC_KCORE=y
|
||||
CONFIG_SYSFS=y
|
||||
# CONFIG_DEVPTS_FS_XATTR is not set
|
||||
# CONFIG_TMPFS is not set
|
||||
# CONFIG_HUGETLB_PAGE is not set
|
||||
CONFIG_RAMFS=y
|
||||
|
||||
#
|
||||
# Miscellaneous filesystems
|
||||
#
|
||||
# CONFIG_ADFS_FS is not set
|
||||
# CONFIG_AFFS_FS is not set
|
||||
# CONFIG_HFS_FS is not set
|
||||
# CONFIG_HFSPLUS_FS is not set
|
||||
# CONFIG_BEFS_FS is not set
|
||||
# CONFIG_BFS_FS is not set
|
||||
# CONFIG_EFS_FS is not set
|
||||
# CONFIG_CRAMFS is not set
|
||||
# CONFIG_VXFS_FS is not set
|
||||
# CONFIG_HPFS_FS is not set
|
||||
# CONFIG_QNX4FS_FS is not set
|
||||
# CONFIG_SYSV_FS is not set
|
||||
# CONFIG_UFS_FS is not set
|
||||
|
||||
#
|
||||
# Network File Systems
|
||||
#
|
||||
CONFIG_NFS_FS=y
|
||||
# CONFIG_NFS_V3 is not set
|
||||
# CONFIG_NFS_V4 is not set
|
||||
# CONFIG_NFS_DIRECTIO is not set
|
||||
# CONFIG_NFSD is not set
|
||||
CONFIG_ROOT_NFS=y
|
||||
CONFIG_LOCKD=y
|
||||
CONFIG_NFS_COMMON=y
|
||||
CONFIG_SUNRPC=y
|
||||
# CONFIG_RPCSEC_GSS_KRB5 is not set
|
||||
# CONFIG_RPCSEC_GSS_SPKM3 is not set
|
||||
# CONFIG_SMB_FS is not set
|
||||
# CONFIG_CIFS is not set
|
||||
# CONFIG_NCP_FS is not set
|
||||
# CONFIG_CODA_FS is not set
|
||||
# CONFIG_AFS_FS is not set
|
||||
|
||||
#
|
||||
# Partition Types
|
||||
#
|
||||
# CONFIG_PARTITION_ADVANCED is not set
|
||||
CONFIG_MSDOS_PARTITION=y
|
||||
|
||||
#
|
||||
# Native Language Support
|
||||
#
|
||||
# CONFIG_NLS is not set
|
||||
|
||||
#
|
||||
# Library routines
|
||||
#
|
||||
# CONFIG_CRC_CCITT is not set
|
||||
CONFIG_CRC32=y
|
||||
# CONFIG_LIBCRC32C is not set
|
||||
|
||||
#
|
||||
# Profiling support
|
||||
#
|
||||
# CONFIG_PROFILING is not set
|
||||
|
||||
#
|
||||
# Kernel hacking
|
||||
#
|
||||
# CONFIG_PRINTK_TIME is not set
|
||||
CONFIG_DEBUG_KERNEL=y
|
||||
CONFIG_MAGIC_SYSRQ=y
|
||||
CONFIG_LOG_BUF_SHIFT=14
|
||||
# CONFIG_SCHEDSTATS is not set
|
||||
# CONFIG_DEBUG_SLAB is not set
|
||||
# CONFIG_DEBUG_SPINLOCK is not set
|
||||
# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
|
||||
# CONFIG_DEBUG_KOBJECT is not set
|
||||
CONFIG_DEBUG_INFO=y
|
||||
# CONFIG_DEBUG_FS is not set
|
||||
# CONFIG_KGDB is not set
|
||||
# CONFIG_XMON is not set
|
||||
CONFIG_BDI_SWITCH=y
|
||||
# CONFIG_SERIAL_TEXT_DEBUG is not set
|
||||
CONFIG_PPC_OCP=y
|
||||
|
||||
#
|
||||
# Security options
|
||||
#
|
||||
# CONFIG_KEYS is not set
|
||||
# CONFIG_SECURITY is not set
|
||||
|
||||
#
|
||||
# Cryptographic options
|
||||
#
|
||||
# CONFIG_CRYPTO is not set
|
||||
|
||||
#
|
||||
# Hardware crypto devices
|
||||
#
|
|
@ -852,6 +852,26 @@ struct cpu_spec cpu_specs[] = {
|
|||
|
||||
#endif /* CONFIG_40x */
|
||||
#ifdef CONFIG_44x
|
||||
{
|
||||
.pvr_mask = 0xf0000fff,
|
||||
.pvr_value = 0x40000850,
|
||||
.cpu_name = "440EP Rev. A",
|
||||
.cpu_features = CPU_FTR_SPLIT_ID_CACHE |
|
||||
CPU_FTR_USE_TB,
|
||||
.cpu_user_features = COMMON_PPC, /* 440EP has an FPU */
|
||||
.icache_bsize = 32,
|
||||
.dcache_bsize = 32,
|
||||
},
|
||||
{
|
||||
.pvr_mask = 0xf0000fff,
|
||||
.pvr_value = 0x400008d3,
|
||||
.cpu_name = "440EP Rev. B",
|
||||
.cpu_features = CPU_FTR_SPLIT_ID_CACHE |
|
||||
CPU_FTR_USE_TB,
|
||||
.cpu_user_features = COMMON_PPC, /* 440EP has an FPU */
|
||||
.icache_bsize = 32,
|
||||
.dcache_bsize = 32,
|
||||
},
|
||||
{ /* 440GP Rev. B */
|
||||
.pvr_mask = 0xf0000fff,
|
||||
.pvr_value = 0x40000440,
|
||||
|
|
|
@ -215,6 +215,7 @@ syscall_dotrace_cont:
|
|||
lwzx r10,r10,r0 /* Fetch system call handler [ptr] */
|
||||
mtlr r10
|
||||
addi r9,r1,STACK_FRAME_OVERHEAD
|
||||
PPC440EP_ERR42
|
||||
blrl /* Call handler */
|
||||
.globl ret_from_syscall
|
||||
ret_from_syscall:
|
||||
|
|
|
@ -179,24 +179,26 @@ skpinv: addi r4,r4,1 /* Increment */
|
|||
4:
|
||||
#ifdef CONFIG_SERIAL_TEXT_DEBUG
|
||||
/*
|
||||
* Add temporary UART mapping for early debug. This
|
||||
* mapping must be identical to that used by the early
|
||||
* bootloader code since the same asm/serial.h parameters
|
||||
* are used for polled operation.
|
||||
* Add temporary UART mapping for early debug.
|
||||
* We can map UART registers wherever we want as long as they don't
|
||||
* interfere with other system mappings (e.g. with pinned entries).
|
||||
* For an example of how we handle this - see ocotea.h. --ebs
|
||||
*/
|
||||
/* pageid fields */
|
||||
lis r3,UART0_IO_BASE@h
|
||||
ori r3,r3,PPC44x_TLB_VALID | PPC44x_TLB_256M
|
||||
ori r3,r3,PPC44x_TLB_VALID | PPC44x_TLB_4K
|
||||
|
||||
/* xlat fields */
|
||||
lis r4,UART0_PHYS_IO_BASE@h /* RPN depends on SoC */
|
||||
#ifndef CONFIG_440EP
|
||||
ori r4,r4,0x0001 /* ERPN is 1 for second 4GB page */
|
||||
#endif
|
||||
|
||||
/* attrib fields */
|
||||
li r5,0
|
||||
ori r5,r5,(PPC44x_TLB_SW | PPC44x_TLB_SR | PPC44x_TLB_I | PPC44x_TLB_G)
|
||||
|
||||
li r0,1 /* TLB slot 1 */
|
||||
li r0,0 /* TLB slot 0 */
|
||||
|
||||
tlbwe r3,r0,PPC44x_TLB_PAGEID /* Load the pageid fields */
|
||||
tlbwe r4,r0,PPC44x_TLB_XLAT /* Load the translation fields */
|
||||
|
@ -228,6 +230,16 @@ skpinv: addi r4,r4,1 /* Increment */
|
|||
lis r4,interrupt_base@h /* IVPR only uses the high 16-bits */
|
||||
mtspr SPRN_IVPR,r4
|
||||
|
||||
#ifdef CONFIG_440EP
|
||||
/* Clear DAPUIB flag in CCR0 (enable APU between CPU and FPU) */
|
||||
mfspr r2,SPRN_CCR0
|
||||
lis r3,0xffef
|
||||
ori r3,r3,0xffff
|
||||
and r2,r2,r3
|
||||
mtspr SPRN_CCR0,r2
|
||||
isync
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This is where the main kernel code starts.
|
||||
*/
|
||||
|
|
|
@ -1145,6 +1145,7 @@ _GLOBAL(kernel_thread)
|
|||
stwu r0,-16(r1)
|
||||
mtlr r30 /* fn addr in lr */
|
||||
mr r3,r31 /* load arg and call fn */
|
||||
PPC440EP_ERR42
|
||||
blrl
|
||||
li r0,__NR_exit /* exit if function returns */
|
||||
li r3,0
|
||||
|
@ -1451,3 +1452,6 @@ _GLOBAL(sys_call_table)
|
|||
.long sys_waitid
|
||||
.long sys_ioprio_set
|
||||
.long sys_ioprio_get
|
||||
.long sys_inotify_init /* 275 */
|
||||
.long sys_inotify_add_watch
|
||||
.long sys_inotify_rm_watch
|
||||
|
|
|
@ -68,6 +68,11 @@ choice
|
|||
depends on 44x
|
||||
default EBONY
|
||||
|
||||
config BAMBOO
|
||||
bool "Bamboo"
|
||||
help
|
||||
This option enables support for the IBM PPC440EP evaluation board.
|
||||
|
||||
config EBONY
|
||||
bool "Ebony"
|
||||
help
|
||||
|
@ -98,6 +103,12 @@ config NP405H
|
|||
depends on ASH
|
||||
default y
|
||||
|
||||
config 440EP
|
||||
bool
|
||||
depends on BAMBOO
|
||||
select PPC_FPU
|
||||
default y
|
||||
|
||||
config 440GP
|
||||
bool
|
||||
depends on EBONY
|
||||
|
@ -115,7 +126,7 @@ config 440SP
|
|||
|
||||
config 440
|
||||
bool
|
||||
depends on 440GP || 440SP
|
||||
depends on 440GP || 440SP || 440EP
|
||||
default y
|
||||
|
||||
config 440A
|
||||
|
@ -123,6 +134,11 @@ config 440A
|
|||
depends on 440GX
|
||||
default y
|
||||
|
||||
config IBM440EP_ERR42
|
||||
bool
|
||||
depends on 440EP
|
||||
default y
|
||||
|
||||
# All 405-based cores up until the 405GPR and 405EP have this errata.
|
||||
config IBM405_ERR77
|
||||
bool
|
||||
|
@ -142,7 +158,7 @@ config BOOKE
|
|||
|
||||
config IBM_OCP
|
||||
bool
|
||||
depends on ASH || BUBINGA || CPCI405 || EBONY || EP405 || LUAN || OCOTEA || REDWOOD_5 || REDWOOD_6 || SYCAMORE || WALNUT
|
||||
depends on ASH || BAMBOO || BUBINGA || CPCI405 || EBONY || EP405 || LUAN || OCOTEA || REDWOOD_5 || REDWOOD_6 || SYCAMORE || WALNUT
|
||||
default y
|
||||
|
||||
config XILINX_OCP
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
# Makefile for the PowerPC 4xx linux kernel.
|
||||
|
||||
obj-$(CONFIG_ASH) += ash.o
|
||||
obj-$(CONFIG_BAMBOO) += bamboo.o
|
||||
obj-$(CONFIG_CPCI405) += cpci405.o
|
||||
obj-$(CONFIG_EBONY) += ebony.o
|
||||
obj-$(CONFIG_EP405) += ep405.o
|
||||
|
@ -19,6 +20,7 @@ obj-$(CONFIG_405GP) += ibm405gp.o
|
|||
obj-$(CONFIG_REDWOOD_5) += ibmstb4.o
|
||||
obj-$(CONFIG_NP405H) += ibmnp405h.o
|
||||
obj-$(CONFIG_REDWOOD_6) += ibmstbx25.o
|
||||
obj-$(CONFIG_440EP) += ibm440ep.o
|
||||
obj-$(CONFIG_440GP) += ibm440gp.o
|
||||
obj-$(CONFIG_440GX) += ibm440gx.o
|
||||
obj-$(CONFIG_440SP) += ibm440sp.o
|
||||
|
|
|
@ -0,0 +1,427 @@
|
|||
/*
|
||||
* arch/ppc/platforms/4xx/bamboo.c
|
||||
*
|
||||
* Bamboo board specific routines
|
||||
*
|
||||
* Wade Farnsworth <wfarnsworth@mvista.com>
|
||||
* Copyright 2004 MontaVista Software Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*/
|
||||
|
||||
#include <linux/config.h>
|
||||
#include <linux/stddef.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/reboot.h>
|
||||
#include <linux/pci.h>
|
||||
#include <linux/kdev_t.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/major.h>
|
||||
#include <linux/blkdev.h>
|
||||
#include <linux/console.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/ide.h>
|
||||
#include <linux/initrd.h>
|
||||
#include <linux/irq.h>
|
||||
#include <linux/seq_file.h>
|
||||
#include <linux/root_dev.h>
|
||||
#include <linux/tty.h>
|
||||
#include <linux/serial.h>
|
||||
#include <linux/serial_core.h>
|
||||
#include <linux/ethtool.h>
|
||||
|
||||
#include <asm/system.h>
|
||||
#include <asm/pgtable.h>
|
||||
#include <asm/page.h>
|
||||
#include <asm/dma.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/machdep.h>
|
||||
#include <asm/ocp.h>
|
||||
#include <asm/pci-bridge.h>
|
||||
#include <asm/time.h>
|
||||
#include <asm/todc.h>
|
||||
#include <asm/bootinfo.h>
|
||||
#include <asm/ppc4xx_pic.h>
|
||||
#include <asm/ppcboot.h>
|
||||
|
||||
#include <syslib/gen550.h>
|
||||
#include <syslib/ibm440gx_common.h>
|
||||
|
||||
/*
|
||||
* This is a horrible kludge, we eventually need to abstract this
|
||||
* generic PHY stuff, so the standard phy mode defines can be
|
||||
* easily used from arch code.
|
||||
*/
|
||||
#include "../../../../drivers/net/ibm_emac/ibm_emac_phy.h"
|
||||
|
||||
bd_t __res;
|
||||
|
||||
static struct ibm44x_clocks clocks __initdata;
|
||||
|
||||
/*
|
||||
* Bamboo external IRQ triggering/polarity settings
|
||||
*/
|
||||
unsigned char ppc4xx_uic_ext_irq_cfg[] __initdata = {
|
||||
(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* IRQ0: Ethernet transceiver */
|
||||
(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* IRQ1: Expansion connector */
|
||||
(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* IRQ2: PCI slot 0 */
|
||||
(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* IRQ3: PCI slot 1 */
|
||||
(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* IRQ4: PCI slot 2 */
|
||||
(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* IRQ5: PCI slot 3 */
|
||||
(IRQ_SENSE_EDGE | IRQ_POLARITY_NEGATIVE), /* IRQ6: SMI pushbutton */
|
||||
(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* IRQ7: EXT */
|
||||
(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* IRQ8: EXT */
|
||||
(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* IRQ9: EXT */
|
||||
};
|
||||
|
||||
static void __init
|
||||
bamboo_calibrate_decr(void)
|
||||
{
|
||||
unsigned int freq;
|
||||
|
||||
if (mfspr(SPRN_CCR1) & CCR1_TCS)
|
||||
freq = BAMBOO_TMRCLK;
|
||||
else
|
||||
freq = clocks.cpu;
|
||||
|
||||
ibm44x_calibrate_decr(freq);
|
||||
|
||||
}
|
||||
|
||||
static int
|
||||
bamboo_show_cpuinfo(struct seq_file *m)
|
||||
{
|
||||
seq_printf(m, "vendor\t\t: IBM\n");
|
||||
seq_printf(m, "machine\t\t: PPC440EP EVB (Bamboo)\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int
|
||||
bamboo_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin)
|
||||
{
|
||||
static char pci_irq_table[][4] =
|
||||
/*
|
||||
* PCI IDSEL/INTPIN->INTLINE
|
||||
* A B C D
|
||||
*/
|
||||
{
|
||||
{ 28, 28, 28, 28 }, /* IDSEL 1 - PCI Slot 0 */
|
||||
{ 27, 27, 27, 27 }, /* IDSEL 2 - PCI Slot 1 */
|
||||
{ 26, 26, 26, 26 }, /* IDSEL 3 - PCI Slot 2 */
|
||||
{ 25, 25, 25, 25 }, /* IDSEL 4 - PCI Slot 3 */
|
||||
};
|
||||
|
||||
const long min_idsel = 1, max_idsel = 4, irqs_per_slot = 4;
|
||||
return PCI_IRQ_TABLE_LOOKUP;
|
||||
}
|
||||
|
||||
static void __init bamboo_set_emacdata(void)
|
||||
{
|
||||
unsigned char * selection1_base;
|
||||
struct ocp_def *def;
|
||||
struct ocp_func_emac_data *emacdata;
|
||||
u8 selection1_val;
|
||||
int mode;
|
||||
|
||||
selection1_base = ioremap64(BAMBOO_FPGA_SELECTION1_REG_ADDR, 16);
|
||||
selection1_val = readb(selection1_base);
|
||||
iounmap((void *) selection1_base);
|
||||
if (BAMBOO_SEL_MII(selection1_val))
|
||||
mode = PHY_MODE_MII;
|
||||
else if (BAMBOO_SEL_RMII(selection1_val))
|
||||
mode = PHY_MODE_RMII;
|
||||
else
|
||||
mode = PHY_MODE_SMII;
|
||||
|
||||
/* Set mac_addr and phy mode for each EMAC */
|
||||
|
||||
def = ocp_get_one_device(OCP_VENDOR_IBM, OCP_FUNC_EMAC, 0);
|
||||
emacdata = def->additions;
|
||||
memcpy(emacdata->mac_addr, __res.bi_enetaddr, 6);
|
||||
emacdata->phy_mode = mode;
|
||||
|
||||
def = ocp_get_one_device(OCP_VENDOR_IBM, OCP_FUNC_EMAC, 1);
|
||||
emacdata = def->additions;
|
||||
memcpy(emacdata->mac_addr, __res.bi_enet1addr, 6);
|
||||
emacdata->phy_mode = mode;
|
||||
}
|
||||
|
||||
static int
|
||||
bamboo_exclude_device(unsigned char bus, unsigned char devfn)
|
||||
{
|
||||
return (bus == 0 && devfn == 0);
|
||||
}
|
||||
|
||||
#define PCI_READW(offset) \
|
||||
(readw((void *)((u32)pci_reg_base+offset)))
|
||||
|
||||
#define PCI_WRITEW(value, offset) \
|
||||
(writew(value, (void *)((u32)pci_reg_base+offset)))
|
||||
|
||||
#define PCI_WRITEL(value, offset) \
|
||||
(writel(value, (void *)((u32)pci_reg_base+offset)))
|
||||
|
||||
static void __init
|
||||
bamboo_setup_pci(void)
|
||||
{
|
||||
void *pci_reg_base;
|
||||
unsigned long memory_size;
|
||||
memory_size = ppc_md.find_end_of_memory();
|
||||
|
||||
pci_reg_base = ioremap64(BAMBOO_PCIL0_BASE, BAMBOO_PCIL0_SIZE);
|
||||
|
||||
/* Enable PCI I/O, Mem, and Busmaster cycles */
|
||||
PCI_WRITEW(PCI_READW(PCI_COMMAND) |
|
||||
PCI_COMMAND_MEMORY |
|
||||
PCI_COMMAND_MASTER, PCI_COMMAND);
|
||||
|
||||
/* Disable region first */
|
||||
PCI_WRITEL(0, BAMBOO_PCIL0_PMM0MA);
|
||||
|
||||
/* PLB starting addr: 0x00000000A0000000 */
|
||||
PCI_WRITEL(BAMBOO_PCI_PHY_MEM_BASE, BAMBOO_PCIL0_PMM0LA);
|
||||
|
||||
/* PCI start addr, 0xA0000000 (PCI Address) */
|
||||
PCI_WRITEL(BAMBOO_PCI_MEM_BASE, BAMBOO_PCIL0_PMM0PCILA);
|
||||
PCI_WRITEL(0, BAMBOO_PCIL0_PMM0PCIHA);
|
||||
|
||||
/* Enable no pre-fetch, enable region */
|
||||
PCI_WRITEL(((0xffffffff -
|
||||
(BAMBOO_PCI_UPPER_MEM - BAMBOO_PCI_MEM_BASE)) | 0x01),
|
||||
BAMBOO_PCIL0_PMM0MA);
|
||||
|
||||
/* Disable region one */
|
||||
PCI_WRITEL(0, BAMBOO_PCIL0_PMM1MA);
|
||||
PCI_WRITEL(0, BAMBOO_PCIL0_PMM1LA);
|
||||
PCI_WRITEL(0, BAMBOO_PCIL0_PMM1PCILA);
|
||||
PCI_WRITEL(0, BAMBOO_PCIL0_PMM1PCIHA);
|
||||
PCI_WRITEL(0, BAMBOO_PCIL0_PMM1MA);
|
||||
|
||||
/* Disable region two */
|
||||
PCI_WRITEL(0, BAMBOO_PCIL0_PMM2MA);
|
||||
PCI_WRITEL(0, BAMBOO_PCIL0_PMM2LA);
|
||||
PCI_WRITEL(0, BAMBOO_PCIL0_PMM2PCILA);
|
||||
PCI_WRITEL(0, BAMBOO_PCIL0_PMM2PCIHA);
|
||||
PCI_WRITEL(0, BAMBOO_PCIL0_PMM2MA);
|
||||
|
||||
/* Now configure the PCI->PLB windows, we only use PTM1
|
||||
*
|
||||
* For Inbound flow, set the window size to all available memory
|
||||
* This is required because if size is smaller,
|
||||
* then Eth/PCI DD would fail as PCI card not able to access
|
||||
* the memory allocated by DD.
|
||||
*/
|
||||
|
||||
PCI_WRITEL(0, BAMBOO_PCIL0_PTM1MS); /* disabled region 1 */
|
||||
PCI_WRITEL(0, BAMBOO_PCIL0_PTM1LA); /* begin of address map */
|
||||
|
||||
memory_size = 1 << fls(memory_size - 1);
|
||||
|
||||
/* Size low + Enabled */
|
||||
PCI_WRITEL((0xffffffff - (memory_size - 1)) | 0x1, BAMBOO_PCIL0_PTM1MS);
|
||||
|
||||
eieio();
|
||||
iounmap(pci_reg_base);
|
||||
}
|
||||
|
||||
static void __init
|
||||
bamboo_setup_hose(void)
|
||||
{
|
||||
unsigned int bar_response, bar;
|
||||
struct pci_controller *hose;
|
||||
|
||||
bamboo_setup_pci();
|
||||
|
||||
hose = pcibios_alloc_controller();
|
||||
|
||||
if (!hose)
|
||||
return;
|
||||
|
||||
hose->first_busno = 0;
|
||||
hose->last_busno = 0xff;
|
||||
|
||||
hose->pci_mem_offset = BAMBOO_PCI_MEM_OFFSET;
|
||||
|
||||
pci_init_resource(&hose->io_resource,
|
||||
BAMBOO_PCI_LOWER_IO,
|
||||
BAMBOO_PCI_UPPER_IO,
|
||||
IORESOURCE_IO,
|
||||
"PCI host bridge");
|
||||
|
||||
pci_init_resource(&hose->mem_resources[0],
|
||||
BAMBOO_PCI_LOWER_MEM,
|
||||
BAMBOO_PCI_UPPER_MEM,
|
||||
IORESOURCE_MEM,
|
||||
"PCI host bridge");
|
||||
|
||||
ppc_md.pci_exclude_device = bamboo_exclude_device;
|
||||
|
||||
hose->io_space.start = BAMBOO_PCI_LOWER_IO;
|
||||
hose->io_space.end = BAMBOO_PCI_UPPER_IO;
|
||||
hose->mem_space.start = BAMBOO_PCI_LOWER_MEM;
|
||||
hose->mem_space.end = BAMBOO_PCI_UPPER_MEM;
|
||||
isa_io_base =
|
||||
(unsigned long)ioremap64(BAMBOO_PCI_IO_BASE, BAMBOO_PCI_IO_SIZE);
|
||||
hose->io_base_virt = (void *)isa_io_base;
|
||||
|
||||
setup_indirect_pci(hose,
|
||||
BAMBOO_PCI_CFGA_PLB32,
|
||||
BAMBOO_PCI_CFGD_PLB32);
|
||||
hose->set_cfg_type = 1;
|
||||
|
||||
/* Zero config bars */
|
||||
for (bar = PCI_BASE_ADDRESS_1; bar <= PCI_BASE_ADDRESS_2; bar += 4) {
|
||||
early_write_config_dword(hose, hose->first_busno,
|
||||
PCI_FUNC(hose->first_busno), bar,
|
||||
0x00000000);
|
||||
early_read_config_dword(hose, hose->first_busno,
|
||||
PCI_FUNC(hose->first_busno), bar,
|
||||
&bar_response);
|
||||
}
|
||||
|
||||
hose->last_busno = pciauto_bus_scan(hose, hose->first_busno);
|
||||
|
||||
ppc_md.pci_swizzle = common_swizzle;
|
||||
ppc_md.pci_map_irq = bamboo_map_irq;
|
||||
}
|
||||
|
||||
TODC_ALLOC();
|
||||
|
||||
static void __init
|
||||
bamboo_early_serial_map(void)
|
||||
{
|
||||
struct uart_port port;
|
||||
|
||||
/* Setup ioremapped serial port access */
|
||||
memset(&port, 0, sizeof(port));
|
||||
port.membase = ioremap64(PPC440EP_UART0_ADDR, 8);
|
||||
port.irq = 0;
|
||||
port.uartclk = clocks.uart0;
|
||||
port.regshift = 0;
|
||||
port.iotype = SERIAL_IO_MEM;
|
||||
port.flags = ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST;
|
||||
port.line = 0;
|
||||
|
||||
if (early_serial_setup(&port) != 0) {
|
||||
printk("Early serial init of port 0 failed\n");
|
||||
}
|
||||
|
||||
#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB)
|
||||
/* Configure debug serial access */
|
||||
gen550_init(0, &port);
|
||||
#endif
|
||||
|
||||
port.membase = ioremap64(PPC440EP_UART1_ADDR, 8);
|
||||
port.irq = 1;
|
||||
port.uartclk = clocks.uart1;
|
||||
port.line = 1;
|
||||
|
||||
if (early_serial_setup(&port) != 0) {
|
||||
printk("Early serial init of port 1 failed\n");
|
||||
}
|
||||
|
||||
#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB)
|
||||
/* Configure debug serial access */
|
||||
gen550_init(1, &port);
|
||||
#endif
|
||||
|
||||
port.membase = ioremap64(PPC440EP_UART2_ADDR, 8);
|
||||
port.irq = 3;
|
||||
port.uartclk = clocks.uart2;
|
||||
port.line = 2;
|
||||
|
||||
if (early_serial_setup(&port) != 0) {
|
||||
printk("Early serial init of port 2 failed\n");
|
||||
}
|
||||
|
||||
#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB)
|
||||
/* Configure debug serial access */
|
||||
gen550_init(2, &port);
|
||||
#endif
|
||||
|
||||
port.membase = ioremap64(PPC440EP_UART3_ADDR, 8);
|
||||
port.irq = 4;
|
||||
port.uartclk = clocks.uart3;
|
||||
port.line = 3;
|
||||
|
||||
if (early_serial_setup(&port) != 0) {
|
||||
printk("Early serial init of port 3 failed\n");
|
||||
}
|
||||
}
|
||||
|
||||
static void __init
|
||||
bamboo_setup_arch(void)
|
||||
{
|
||||
|
||||
bamboo_set_emacdata();
|
||||
|
||||
ibm440gx_get_clocks(&clocks, 33333333, 6 * 1843200);
|
||||
ocp_sys_info.opb_bus_freq = clocks.opb;
|
||||
|
||||
/* Setup TODC access */
|
||||
TODC_INIT(TODC_TYPE_DS1743,
|
||||
0,
|
||||
0,
|
||||
ioremap64(BAMBOO_RTC_ADDR, BAMBOO_RTC_SIZE),
|
||||
8);
|
||||
|
||||
/* init to some ~sane value until calibrate_delay() runs */
|
||||
loops_per_jiffy = 50000000/HZ;
|
||||
|
||||
/* Setup PCI host bridge */
|
||||
bamboo_setup_hose();
|
||||
|
||||
#ifdef CONFIG_BLK_DEV_INITRD
|
||||
if (initrd_start)
|
||||
ROOT_DEV = Root_RAM0;
|
||||
else
|
||||
#endif
|
||||
#ifdef CONFIG_ROOT_NFS
|
||||
ROOT_DEV = Root_NFS;
|
||||
#else
|
||||
ROOT_DEV = Root_HDA1;
|
||||
#endif
|
||||
|
||||
bamboo_early_serial_map();
|
||||
|
||||
/* Identify the system */
|
||||
printk("IBM Bamboo port (MontaVista Software, Inc. (source@mvista.com))\n");
|
||||
}
|
||||
|
||||
void __init platform_init(unsigned long r3, unsigned long r4,
|
||||
unsigned long r5, unsigned long r6, unsigned long r7)
|
||||
{
|
||||
parse_bootinfo(find_bootinfo());
|
||||
|
||||
/*
|
||||
* If we were passed in a board information, copy it into the
|
||||
* residual data area.
|
||||
*/
|
||||
if (r3)
|
||||
__res = *(bd_t *)(r3 + KERNELBASE);
|
||||
|
||||
|
||||
ibm44x_platform_init();
|
||||
|
||||
ppc_md.setup_arch = bamboo_setup_arch;
|
||||
ppc_md.show_cpuinfo = bamboo_show_cpuinfo;
|
||||
ppc_md.get_irq = NULL; /* Set in ppc4xx_pic_init() */
|
||||
|
||||
ppc_md.calibrate_decr = bamboo_calibrate_decr;
|
||||
ppc_md.time_init = todc_time_init;
|
||||
ppc_md.set_rtc_time = todc_set_rtc_time;
|
||||
ppc_md.get_rtc_time = todc_get_rtc_time;
|
||||
|
||||
ppc_md.nvram_read_val = todc_direct_read_val;
|
||||
ppc_md.nvram_write_val = todc_direct_write_val;
|
||||
#ifdef CONFIG_KGDB
|
||||
ppc_md.early_serial_map = bamboo_early_serial_map;
|
||||
#endif
|
||||
}
|
||||
|
|
@ -0,0 +1,136 @@
|
|||
/*
|
||||
* arch/ppc/platforms/bamboo.h
|
||||
*
|
||||
* Bamboo board definitions
|
||||
*
|
||||
* Wade Farnsworth <wfarnsworth@mvista.com>
|
||||
*
|
||||
* Copyright 2004 MontaVista Software Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*/
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#ifndef __ASM_BAMBOO_H__
|
||||
#define __ASM_BAMBOO_H__
|
||||
|
||||
#include <linux/config.h>
|
||||
#include <platforms/4xx/ibm440ep.h>
|
||||
|
||||
/* F/W TLB mapping used in bootloader glue to reset EMAC */
|
||||
#define PPC44x_EMAC0_MR0 0x0EF600E00
|
||||
|
||||
/* Location of MAC addresses in PIBS image */
|
||||
#define PIBS_FLASH_BASE 0xfff00000
|
||||
#define PIBS_MAC_BASE (PIBS_FLASH_BASE+0xc0400)
|
||||
#define PIBS_MAC_SIZE 0x200
|
||||
#define PIBS_MAC_OFFSET 0x100
|
||||
|
||||
/* Default clock rate */
|
||||
#define BAMBOO_TMRCLK 25000000
|
||||
|
||||
/* RTC/NVRAM location */
|
||||
#define BAMBOO_RTC_ADDR 0x080000000ULL
|
||||
#define BAMBOO_RTC_SIZE 0x2000
|
||||
|
||||
/* FPGA Registers */
|
||||
#define BAMBOO_FPGA_ADDR 0x080002000ULL
|
||||
|
||||
#define BAMBOO_FPGA_CONFIG2_REG_ADDR (BAMBOO_FPGA_ADDR + 0x1)
|
||||
#define BAMBOO_FULL_DUPLEX_EN(x) (x & 0x08)
|
||||
#define BAMBOO_FORCE_100Mbps(x) (x & 0x04)
|
||||
#define BAMBOO_AUTONEGOTIATE(x) (x & 0x02)
|
||||
|
||||
#define BAMBOO_FPGA_SETTING_REG_ADDR (BAMBOO_FPGA_ADDR + 0x3)
|
||||
#define BAMBOO_BOOT_SMALL_FLASH(x) (!(x & 0x80))
|
||||
#define BAMBOO_LARGE_FLASH_EN(x) (!(x & 0x40))
|
||||
#define BAMBOO_BOOT_NAND_FLASH(x) (!(x & 0x20))
|
||||
|
||||
#define BAMBOO_FPGA_SELECTION1_REG_ADDR (BAMBOO_FPGA_ADDR + 0x4)
|
||||
#define BAMBOO_SEL_MII(x) (x & 0x80)
|
||||
#define BAMBOO_SEL_RMII(x) (x & 0x40)
|
||||
#define BAMBOO_SEL_SMII(x) (x & 0x20)
|
||||
|
||||
/* Flash */
|
||||
#define BAMBOO_SMALL_FLASH_LOW 0x087f00000ULL
|
||||
#define BAMBOO_SMALL_FLASH_HIGH 0x0fff00000ULL
|
||||
#define BAMBOO_SMALL_FLASH_SIZE 0x100000
|
||||
#define BAMBOO_LARGE_FLASH_LOW 0x087800000ULL
|
||||
#define BAMBOO_LARGE_FLASH_HIGH1 0x0ff800000ULL
|
||||
#define BAMBOO_LARGE_FLASH_HIGH2 0x0ffc00000ULL
|
||||
#define BAMBOO_LARGE_FLASH_SIZE 0x400000
|
||||
#define BAMBOO_SRAM_LOW 0x087f00000ULL
|
||||
#define BAMBOO_SRAM_HIGH1 0x0fff00000ULL
|
||||
#define BAMBOO_SRAM_HIGH2 0x0ff800000ULL
|
||||
#define BAMBOO_SRAM_SIZE 0x100000
|
||||
#define BAMBOO_NAND_FLASH_REG_ADDR 0x090000000ULL
|
||||
#define BAMBOO_NAND_FLASH_REG_SIZE 0x2000
|
||||
|
||||
/*
|
||||
* Serial port defines
|
||||
*/
|
||||
#define RS_TABLE_SIZE 4
|
||||
|
||||
#define UART0_IO_BASE 0xEF600300
|
||||
#define UART1_IO_BASE 0xEF600400
|
||||
#define UART2_IO_BASE 0xEF600500
|
||||
#define UART3_IO_BASE 0xEF600600
|
||||
|
||||
#define BASE_BAUD 33177600/3/16
|
||||
#define UART0_INT 0
|
||||
#define UART1_INT 1
|
||||
#define UART2_INT 3
|
||||
#define UART3_INT 4
|
||||
|
||||
#define STD_UART_OP(num) \
|
||||
{ 0, BASE_BAUD, 0, UART##num##_INT, \
|
||||
(ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST), \
|
||||
iomem_base: UART##num##_IO_BASE, \
|
||||
io_type: SERIAL_IO_MEM},
|
||||
|
||||
#define SERIAL_PORT_DFNS \
|
||||
STD_UART_OP(0) \
|
||||
STD_UART_OP(1) \
|
||||
STD_UART_OP(2) \
|
||||
STD_UART_OP(3)
|
||||
|
||||
/* PCI support */
|
||||
#define BAMBOO_PCI_CFGA_PLB32 0xeec00000
|
||||
#define BAMBOO_PCI_CFGD_PLB32 0xeec00004
|
||||
|
||||
#define BAMBOO_PCI_IO_BASE 0x00000000e8000000ULL
|
||||
#define BAMBOO_PCI_IO_SIZE 0x00010000
|
||||
#define BAMBOO_PCI_MEM_OFFSET 0x00000000
|
||||
#define BAMBOO_PCI_PHY_MEM_BASE 0x00000000a0000000ULL
|
||||
|
||||
#define BAMBOO_PCI_LOWER_IO 0x00000000
|
||||
#define BAMBOO_PCI_UPPER_IO 0x0000ffff
|
||||
#define BAMBOO_PCI_LOWER_MEM 0xa0000000
|
||||
#define BAMBOO_PCI_UPPER_MEM 0xafffffff
|
||||
#define BAMBOO_PCI_MEM_BASE 0xa0000000
|
||||
|
||||
#define BAMBOO_PCIL0_BASE 0x00000000ef400000ULL
|
||||
#define BAMBOO_PCIL0_SIZE 0x40
|
||||
|
||||
#define BAMBOO_PCIL0_PMM0LA 0x000
|
||||
#define BAMBOO_PCIL0_PMM0MA 0x004
|
||||
#define BAMBOO_PCIL0_PMM0PCILA 0x008
|
||||
#define BAMBOO_PCIL0_PMM0PCIHA 0x00C
|
||||
#define BAMBOO_PCIL0_PMM1LA 0x010
|
||||
#define BAMBOO_PCIL0_PMM1MA 0x014
|
||||
#define BAMBOO_PCIL0_PMM1PCILA 0x018
|
||||
#define BAMBOO_PCIL0_PMM1PCIHA 0x01C
|
||||
#define BAMBOO_PCIL0_PMM2LA 0x020
|
||||
#define BAMBOO_PCIL0_PMM2MA 0x024
|
||||
#define BAMBOO_PCIL0_PMM2PCILA 0x028
|
||||
#define BAMBOO_PCIL0_PMM2PCIHA 0x02C
|
||||
#define BAMBOO_PCIL0_PTM1MS 0x030
|
||||
#define BAMBOO_PCIL0_PTM1LA 0x034
|
||||
#define BAMBOO_PCIL0_PTM2MS 0x038
|
||||
#define BAMBOO_PCIL0_PTM2LA 0x03C
|
||||
|
||||
#endif /* __ASM_BAMBOO_H__ */
|
||||
#endif /* __KERNEL__ */
|
|
@ -7,7 +7,7 @@
|
|||
* Copyright 2002-2005 MontaVista Software Inc.
|
||||
*
|
||||
* Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net>
|
||||
* Copyright (c) 2003, 2004 Zultys Technologies
|
||||
* Copyright (c) 2003-2005 Zultys Technologies
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
|
@ -50,6 +50,7 @@
|
|||
#include <asm/bootinfo.h>
|
||||
#include <asm/ppc4xx_pic.h>
|
||||
#include <asm/ppcboot.h>
|
||||
#include <asm/tlbflush.h>
|
||||
|
||||
#include <syslib/gen550.h>
|
||||
#include <syslib/ibm440gp_common.h>
|
||||
|
@ -248,6 +249,9 @@ ebony_early_serial_map(void)
|
|||
#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB)
|
||||
/* Configure debug serial access */
|
||||
gen550_init(0, &port);
|
||||
|
||||
/* Purge TLB entry added in head_44x.S for early serial access */
|
||||
_tlbie(UART0_IO_BASE);
|
||||
#endif
|
||||
|
||||
port.membase = ioremap64(PPC440GP_UART1_ADDR, 8);
|
||||
|
|
|
@ -56,9 +56,18 @@
|
|||
* Serial port defines
|
||||
*/
|
||||
|
||||
/* OpenBIOS defined UART mappings, used before early_serial_setup */
|
||||
#if defined(__BOOTER__)
|
||||
/* OpenBIOS defined UART mappings, used by bootloader shim */
|
||||
#define UART0_IO_BASE 0xE0000200
|
||||
#define UART1_IO_BASE 0xE0000300
|
||||
#else
|
||||
/* head_44x.S created UART mapping, used before early_serial_setup.
|
||||
* We cannot use default OpenBIOS UART mappings because they
|
||||
* don't work for configurations with more than 512M RAM. --ebs
|
||||
*/
|
||||
#define UART0_IO_BASE 0xF0000200
|
||||
#define UART1_IO_BASE 0xF0000300
|
||||
#endif
|
||||
|
||||
/* external Epson SG-615P */
|
||||
#define BASE_BAUD 691200
|
||||
|
@ -66,7 +75,7 @@
|
|||
#define STD_UART_OP(num) \
|
||||
{ 0, BASE_BAUD, 0, UART##num##_INT, \
|
||||
(ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST), \
|
||||
iomem_base: UART##num##_IO_BASE, \
|
||||
iomem_base: (void*)UART##num##_IO_BASE, \
|
||||
io_type: SERIAL_IO_MEM},
|
||||
|
||||
#define SERIAL_PORT_DFNS \
|
||||
|
|
|
@ -0,0 +1,220 @@
|
|||
/*
|
||||
* arch/ppc/platforms/4xx/ibm440ep.c
|
||||
*
|
||||
* PPC440EP I/O descriptions
|
||||
*
|
||||
* Wade Farnsworth <wfarnsworth@mvista.com>
|
||||
* Copyright 2004 MontaVista Software Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
*/
|
||||
#include <linux/init.h>
|
||||
#include <linux/module.h>
|
||||
#include <platforms/4xx/ibm440ep.h>
|
||||
#include <asm/ocp.h>
|
||||
#include <asm/ppc4xx_pic.h>
|
||||
|
||||
static struct ocp_func_emac_data ibm440ep_emac0_def = {
|
||||
.rgmii_idx = -1, /* No RGMII */
|
||||
.rgmii_mux = -1, /* No RGMII */
|
||||
.zmii_idx = 0, /* ZMII device index */
|
||||
.zmii_mux = 0, /* ZMII input of this EMAC */
|
||||
.mal_idx = 0, /* MAL device index */
|
||||
.mal_rx_chan = 0, /* MAL rx channel number */
|
||||
.mal_tx_chan = 0, /* MAL tx channel number */
|
||||
.wol_irq = 61, /* WOL interrupt number */
|
||||
.mdio_idx = -1, /* No shared MDIO */
|
||||
.tah_idx = -1, /* No TAH */
|
||||
};
|
||||
|
||||
static struct ocp_func_emac_data ibm440ep_emac1_def = {
|
||||
.rgmii_idx = -1, /* No RGMII */
|
||||
.rgmii_mux = -1, /* No RGMII */
|
||||
.zmii_idx = 0, /* ZMII device index */
|
||||
.zmii_mux = 1, /* ZMII input of this EMAC */
|
||||
.mal_idx = 0, /* MAL device index */
|
||||
.mal_rx_chan = 1, /* MAL rx channel number */
|
||||
.mal_tx_chan = 2, /* MAL tx channel number */
|
||||
.wol_irq = 63, /* WOL interrupt number */
|
||||
.mdio_idx = -1, /* No shared MDIO */
|
||||
.tah_idx = -1, /* No TAH */
|
||||
};
|
||||
OCP_SYSFS_EMAC_DATA()
|
||||
|
||||
static struct ocp_func_mal_data ibm440ep_mal0_def = {
|
||||
.num_tx_chans = 4, /* Number of TX channels */
|
||||
.num_rx_chans = 2, /* Number of RX channels */
|
||||
.txeob_irq = 10, /* TX End Of Buffer IRQ */
|
||||
.rxeob_irq = 11, /* RX End Of Buffer IRQ */
|
||||
.txde_irq = 33, /* TX Descriptor Error IRQ */
|
||||
.rxde_irq = 34, /* RX Descriptor Error IRQ */
|
||||
.serr_irq = 32, /* MAL System Error IRQ */
|
||||
};
|
||||
OCP_SYSFS_MAL_DATA()
|
||||
|
||||
static struct ocp_func_iic_data ibm440ep_iic0_def = {
|
||||
.fast_mode = 0, /* Use standad mode (100Khz) */
|
||||
};
|
||||
|
||||
static struct ocp_func_iic_data ibm440ep_iic1_def = {
|
||||
.fast_mode = 0, /* Use standad mode (100Khz) */
|
||||
};
|
||||
OCP_SYSFS_IIC_DATA()
|
||||
|
||||
struct ocp_def core_ocp[] = {
|
||||
{ .vendor = OCP_VENDOR_IBM,
|
||||
.function = OCP_FUNC_OPB,
|
||||
.index = 0,
|
||||
.paddr = 0x0EF600000ULL,
|
||||
.irq = OCP_IRQ_NA,
|
||||
.pm = OCP_CPM_NA,
|
||||
},
|
||||
{ .vendor = OCP_VENDOR_IBM,
|
||||
.function = OCP_FUNC_16550,
|
||||
.index = 0,
|
||||
.paddr = PPC440EP_UART0_ADDR,
|
||||
.irq = UART0_INT,
|
||||
.pm = IBM_CPM_UART0,
|
||||
},
|
||||
{ .vendor = OCP_VENDOR_IBM,
|
||||
.function = OCP_FUNC_16550,
|
||||
.index = 1,
|
||||
.paddr = PPC440EP_UART1_ADDR,
|
||||
.irq = UART1_INT,
|
||||
.pm = IBM_CPM_UART1,
|
||||
},
|
||||
{ .vendor = OCP_VENDOR_IBM,
|
||||
.function = OCP_FUNC_16550,
|
||||
.index = 2,
|
||||
.paddr = PPC440EP_UART2_ADDR,
|
||||
.irq = UART2_INT,
|
||||
.pm = IBM_CPM_UART2,
|
||||
},
|
||||
{ .vendor = OCP_VENDOR_IBM,
|
||||
.function = OCP_FUNC_16550,
|
||||
.index = 3,
|
||||
.paddr = PPC440EP_UART3_ADDR,
|
||||
.irq = UART3_INT,
|
||||
.pm = IBM_CPM_UART3,
|
||||
},
|
||||
{ .vendor = OCP_VENDOR_IBM,
|
||||
.function = OCP_FUNC_IIC,
|
||||
.index = 0,
|
||||
.paddr = 0x0EF600700ULL,
|
||||
.irq = 2,
|
||||
.pm = IBM_CPM_IIC0,
|
||||
.additions = &ibm440ep_iic0_def,
|
||||
.show = &ocp_show_iic_data
|
||||
},
|
||||
{ .vendor = OCP_VENDOR_IBM,
|
||||
.function = OCP_FUNC_IIC,
|
||||
.index = 1,
|
||||
.paddr = 0x0EF600800ULL,
|
||||
.irq = 7,
|
||||
.pm = IBM_CPM_IIC1,
|
||||
.additions = &ibm440ep_iic1_def,
|
||||
.show = &ocp_show_iic_data
|
||||
},
|
||||
{ .vendor = OCP_VENDOR_IBM,
|
||||
.function = OCP_FUNC_GPIO,
|
||||
.index = 0,
|
||||
.paddr = 0x0EF600B00ULL,
|
||||
.irq = OCP_IRQ_NA,
|
||||
.pm = IBM_CPM_GPIO0,
|
||||
},
|
||||
{ .vendor = OCP_VENDOR_IBM,
|
||||
.function = OCP_FUNC_GPIO,
|
||||
.index = 1,
|
||||
.paddr = 0x0EF600C00ULL,
|
||||
.irq = OCP_IRQ_NA,
|
||||
.pm = OCP_CPM_NA,
|
||||
},
|
||||
{ .vendor = OCP_VENDOR_IBM,
|
||||
.function = OCP_FUNC_MAL,
|
||||
.paddr = OCP_PADDR_NA,
|
||||
.irq = OCP_IRQ_NA,
|
||||
.pm = OCP_CPM_NA,
|
||||
.additions = &ibm440ep_mal0_def,
|
||||
.show = &ocp_show_mal_data,
|
||||
},
|
||||
{ .vendor = OCP_VENDOR_IBM,
|
||||
.function = OCP_FUNC_EMAC,
|
||||
.index = 0,
|
||||
.paddr = 0x0EF600E00ULL,
|
||||
.irq = 60,
|
||||
.pm = OCP_CPM_NA,
|
||||
.additions = &ibm440ep_emac0_def,
|
||||
.show = &ocp_show_emac_data,
|
||||
},
|
||||
{ .vendor = OCP_VENDOR_IBM,
|
||||
.function = OCP_FUNC_EMAC,
|
||||
.index = 1,
|
||||
.paddr = 0x0EF600F00ULL,
|
||||
.irq = 62,
|
||||
.pm = OCP_CPM_NA,
|
||||
.additions = &ibm440ep_emac1_def,
|
||||
.show = &ocp_show_emac_data,
|
||||
},
|
||||
{ .vendor = OCP_VENDOR_IBM,
|
||||
.function = OCP_FUNC_ZMII,
|
||||
.paddr = 0x0EF600D00ULL,
|
||||
.irq = OCP_IRQ_NA,
|
||||
.pm = OCP_CPM_NA,
|
||||
},
|
||||
{ .vendor = OCP_VENDOR_INVALID
|
||||
}
|
||||
};
|
||||
|
||||
/* Polarity and triggering settings for internal interrupt sources */
|
||||
struct ppc4xx_uic_settings ppc4xx_core_uic_cfg[] __initdata = {
|
||||
{ .polarity = 0xffbffe03,
|
||||
.triggering = 0xfffffe00,
|
||||
.ext_irq_mask = 0x000001fc, /* IRQ0 - IRQ6 */
|
||||
},
|
||||
{ .polarity = 0xffffc6ef,
|
||||
.triggering = 0xffffc7ff,
|
||||
.ext_irq_mask = 0x00003800, /* IRQ7 - IRQ9 */
|
||||
},
|
||||
};
|
||||
|
||||
static struct resource usb_gadget_resources[] = {
|
||||
[0] = {
|
||||
.start = 0x050000100ULL,
|
||||
.end = 0x05000017FULL,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = 55,
|
||||
.end = 55,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static u64 dma_mask = 0xffffffffULL;
|
||||
|
||||
static struct platform_device usb_gadget_device = {
|
||||
.name = "musbhsfc",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(usb_gadget_resources),
|
||||
.resource = usb_gadget_resources,
|
||||
.dev = {
|
||||
.dma_mask = &dma_mask,
|
||||
.coherent_dma_mask = 0xffffffffULL,
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_device *ibm440ep_devs[] __initdata = {
|
||||
&usb_gadget_device,
|
||||
};
|
||||
|
||||
static int __init
|
||||
ibm440ep_platform_add_devices(void)
|
||||
{
|
||||
return platform_add_devices(ibm440ep_devs, ARRAY_SIZE(ibm440ep_devs));
|
||||
}
|
||||
arch_initcall(ibm440ep_platform_add_devices);
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
/*
|
||||
* arch/ppc/platforms/4xx/ibm440ep.h
|
||||
*
|
||||
* PPC440EP definitions
|
||||
*
|
||||
* Wade Farnsworth <wfarnsworth@mvista.com>
|
||||
*
|
||||
* Copyright 2002 Roland Dreier
|
||||
* Copyright 2004 MontaVista Software, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#ifndef __PPC_PLATFORMS_IBM440EP_H
|
||||
#define __PPC_PLATFORMS_IBM440EP_H
|
||||
|
||||
#include <linux/config.h>
|
||||
#include <asm/ibm44x.h>
|
||||
|
||||
/* UART */
|
||||
#define PPC440EP_UART0_ADDR 0x0EF600300
|
||||
#define PPC440EP_UART1_ADDR 0x0EF600400
|
||||
#define PPC440EP_UART2_ADDR 0x0EF600500
|
||||
#define PPC440EP_UART3_ADDR 0x0EF600600
|
||||
#define UART0_INT 0
|
||||
#define UART1_INT 1
|
||||
#define UART2_INT 3
|
||||
#define UART3_INT 4
|
||||
|
||||
/* Clock and Power Management */
|
||||
#define IBM_CPM_IIC0 0x80000000 /* IIC interface */
|
||||
#define IBM_CPM_IIC1 0x40000000 /* IIC interface */
|
||||
#define IBM_CPM_PCI 0x20000000 /* PCI bridge */
|
||||
#define IBM_CPM_USB1H 0x08000000 /* USB 1.1 Host */
|
||||
#define IBM_CPM_FPU 0x04000000 /* floating point unit */
|
||||
#define IBM_CPM_CPU 0x02000000 /* processor core */
|
||||
#define IBM_CPM_DMA 0x01000000 /* DMA controller */
|
||||
#define IBM_CPM_BGO 0x00800000 /* PLB to OPB bus arbiter */
|
||||
#define IBM_CPM_BGI 0x00400000 /* OPB to PLB bridge */
|
||||
#define IBM_CPM_EBC 0x00200000 /* External Bus Controller */
|
||||
#define IBM_CPM_EBM 0x00100000 /* Ext Bus Master Interface */
|
||||
#define IBM_CPM_DMC 0x00080000 /* SDRAM peripheral controller */
|
||||
#define IBM_CPM_PLB4 0x00040000 /* PLB4 bus arbiter */
|
||||
#define IBM_CPM_PLB4x3 0x00020000 /* PLB4 to PLB3 bridge controller */
|
||||
#define IBM_CPM_PLB3x4 0x00010000 /* PLB3 to PLB4 bridge controller */
|
||||
#define IBM_CPM_PLB3 0x00008000 /* PLB3 bus arbiter */
|
||||
#define IBM_CPM_PPM 0x00002000 /* PLB Performance Monitor */
|
||||
#define IBM_CPM_UIC1 0x00001000 /* Universal Interrupt Controller */
|
||||
#define IBM_CPM_GPIO0 0x00000800 /* General Purpose IO (??) */
|
||||
#define IBM_CPM_GPT 0x00000400 /* General Purpose Timers */
|
||||
#define IBM_CPM_UART0 0x00000200 /* serial port 0 */
|
||||
#define IBM_CPM_UART1 0x00000100 /* serial port 1 */
|
||||
#define IBM_CPM_UIC0 0x00000080 /* Universal Interrupt Controller */
|
||||
#define IBM_CPM_TMRCLK 0x00000040 /* CPU timers */
|
||||
#define IBM_CPM_EMAC0 0x00000020 /* ethernet port 0 */
|
||||
#define IBM_CPM_EMAC1 0x00000010 /* ethernet port 1 */
|
||||
#define IBM_CPM_UART2 0x00000008 /* serial port 2 */
|
||||
#define IBM_CPM_UART3 0x00000004 /* serial port 3 */
|
||||
#define IBM_CPM_USB2D 0x00000002 /* USB 2.0 Device */
|
||||
#define IBM_CPM_USB2H 0x00000001 /* USB 2.0 Host */
|
||||
|
||||
#define DFLT_IBM4xx_PM ~(IBM_CPM_UIC0 | IBM_CPM_UIC1 | IBM_CPM_CPU \
|
||||
| IBM_CPM_EBC | IBM_CPM_BGO | IBM_CPM_FPU \
|
||||
| IBM_CPM_EBM | IBM_CPM_PLB4 | IBM_CPM_3x4 \
|
||||
| IBM_CPM_PLB3 | IBM_CPM_PLB4x3 \
|
||||
| IBM_CPM_EMAC0 | IBM_CPM_TMRCLK \
|
||||
| IBM_CPM_DMA | IBM_CPM_PCI | IBM_CPM_EMAC1)
|
||||
|
||||
|
||||
#endif /* __PPC_PLATFORMS_IBM440EP_H */
|
||||
#endif /* __KERNEL__ */
|
|
@ -48,6 +48,7 @@
|
|||
#include <asm/bootinfo.h>
|
||||
#include <asm/ppc4xx_pic.h>
|
||||
#include <asm/ppcboot.h>
|
||||
#include <asm/tlbflush.h>
|
||||
|
||||
#include <syslib/gen550.h>
|
||||
#include <syslib/ibm440gx_common.h>
|
||||
|
@ -266,6 +267,9 @@ ocotea_early_serial_map(void)
|
|||
#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB)
|
||||
/* Configure debug serial access */
|
||||
gen550_init(0, &port);
|
||||
|
||||
/* Purge TLB entry added in head_44x.S for early serial access */
|
||||
_tlbie(UART0_IO_BASE);
|
||||
#endif
|
||||
|
||||
port.membase = ioremap64(PPC440GX_UART1_ADDR, 8);
|
||||
|
|
|
@ -55,15 +55,24 @@
|
|||
*/
|
||||
#define RS_TABLE_SIZE 2
|
||||
|
||||
/* OpenBIOS defined UART mappings, used before early_serial_setup */
|
||||
#if defined(__BOOTER__)
|
||||
/* OpenBIOS defined UART mappings, used by bootloader shim */
|
||||
#define UART0_IO_BASE 0xE0000200
|
||||
#define UART1_IO_BASE 0xE0000300
|
||||
#else
|
||||
/* head_44x.S created UART mapping, used before early_serial_setup.
|
||||
* We cannot use default OpenBIOS UART mappings because they
|
||||
* don't work for configurations with more than 512M RAM. --ebs
|
||||
*/
|
||||
#define UART0_IO_BASE 0xF0000200
|
||||
#define UART1_IO_BASE 0xF0000300
|
||||
#endif
|
||||
|
||||
#define BASE_BAUD 11059200/16
|
||||
#define STD_UART_OP(num) \
|
||||
{ 0, BASE_BAUD, 0, UART##num##_INT, \
|
||||
(ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST), \
|
||||
iomem_base: UART##num##_IO_BASE, \
|
||||
iomem_base: (void*)UART##num##_IO_BASE, \
|
||||
io_type: SERIAL_IO_MEM},
|
||||
|
||||
#define SERIAL_PORT_DFNS \
|
||||
|
|
|
@ -11,6 +11,7 @@ obj-$(CONFIG_PPCBUG_NVRAM) += prep_nvram.o
|
|||
obj-$(CONFIG_PPC_OCP) += ocp.o
|
||||
obj-$(CONFIG_IBM_OCP) += ibm_ocp.o
|
||||
obj-$(CONFIG_44x) += ibm44x_common.o
|
||||
obj-$(CONFIG_440EP) += ibm440gx_common.o
|
||||
obj-$(CONFIG_440GP) += ibm440gp_common.o
|
||||
obj-$(CONFIG_440GX) += ibm440gx_common.o
|
||||
obj-$(CONFIG_440SP) += ibm440gx_common.o ibm440sp_common.o
|
||||
|
@ -44,6 +45,7 @@ obj-$(CONFIG_PPC_CHRP) += open_pic.o indirect_pci.o i8259.o
|
|||
obj-$(CONFIG_PPC_PREP) += open_pic.o indirect_pci.o i8259.o todc_time.o
|
||||
obj-$(CONFIG_ADIR) += i8259.o indirect_pci.o pci_auto.o \
|
||||
todc_time.o
|
||||
obj-$(CONFIG_BAMBOO) += indirect_pci.o pci_auto.o todc_time.o
|
||||
obj-$(CONFIG_CPCI690) += todc_time.o pci_auto.o
|
||||
obj-$(CONFIG_EBONY) += indirect_pci.o pci_auto.o todc_time.o
|
||||
obj-$(CONFIG_EV64260) += todc_time.o pci_auto.o
|
||||
|
|
|
@ -34,6 +34,10 @@ void __init ibm440gx_get_clocks(struct ibm44x_clocks* p, unsigned int sys_clk,
|
|||
u32 plld = CPR_READ(DCRN_CPR_PLLD);
|
||||
u32 uart0 = SDR_READ(DCRN_SDR_UART0);
|
||||
u32 uart1 = SDR_READ(DCRN_SDR_UART1);
|
||||
#ifdef CONFIG_440EP
|
||||
u32 uart2 = SDR_READ(DCRN_SDR_UART2);
|
||||
u32 uart3 = SDR_READ(DCRN_SDR_UART3);
|
||||
#endif
|
||||
|
||||
/* Dividers */
|
||||
u32 fbdv = __fix_zero((plld >> 24) & 0x1f, 32);
|
||||
|
@ -96,6 +100,17 @@ bypass:
|
|||
p->uart1 = ser_clk;
|
||||
else
|
||||
p->uart1 = p->plb / __fix_zero(uart1 & 0xff, 256);
|
||||
#ifdef CONFIG_440EP
|
||||
if (uart2 & 0x00800000)
|
||||
p->uart2 = ser_clk;
|
||||
else
|
||||
p->uart2 = p->plb / __fix_zero(uart2 & 0xff, 256);
|
||||
|
||||
if (uart3 & 0x00800000)
|
||||
p->uart3 = ser_clk;
|
||||
else
|
||||
p->uart3 = p->plb / __fix_zero(uart3 & 0xff, 256);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Issue L2C diagnostic command */
|
||||
|
|
|
@ -29,6 +29,10 @@ struct ibm44x_clocks {
|
|||
unsigned int ebc; /* PerClk */
|
||||
unsigned int uart0;
|
||||
unsigned int uart1;
|
||||
#ifdef CONFIG_440EP
|
||||
unsigned int uart2;
|
||||
unsigned int uart3;
|
||||
#endif
|
||||
};
|
||||
|
||||
/* common 44x platform init */
|
||||
|
|
|
@ -2071,7 +2071,7 @@ _GLOBAL(hmt_start_secondary)
|
|||
blr
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_SMP) && !defined(CONFIG_PPC_ISERIES)
|
||||
#if defined(CONFIG_KEXEC) || (defined(CONFIG_SMP) && !defined(CONFIG_PPC_ISERIES))
|
||||
_GLOBAL(smp_release_cpus)
|
||||
/* All secondary cpus are spinning on a common
|
||||
* spinloop, release them all now so they can start
|
||||
|
|
|
@ -185,7 +185,7 @@ void kexec_copy_flush(struct kimage *image)
|
|||
void kexec_smp_down(void *arg)
|
||||
{
|
||||
if (ppc_md.cpu_irq_down)
|
||||
ppc_md.cpu_irq_down();
|
||||
ppc_md.cpu_irq_down(1);
|
||||
|
||||
local_irq_disable();
|
||||
kexec_smp_wait();
|
||||
|
@ -232,7 +232,7 @@ static void kexec_prepare_cpus(void)
|
|||
|
||||
/* after we tell the others to go down */
|
||||
if (ppc_md.cpu_irq_down)
|
||||
ppc_md.cpu_irq_down();
|
||||
ppc_md.cpu_irq_down(0);
|
||||
|
||||
put_cpu();
|
||||
|
||||
|
@ -243,15 +243,19 @@ static void kexec_prepare_cpus(void)
|
|||
|
||||
static void kexec_prepare_cpus(void)
|
||||
{
|
||||
extern void smp_release_cpus(void);
|
||||
/*
|
||||
* move the secondarys to us so that we can copy
|
||||
* the new kernel 0-0x100 safely
|
||||
*
|
||||
* do this if kexec in setup.c ?
|
||||
*
|
||||
* We need to release the cpus if we are ever going from an
|
||||
* UP to an SMP kernel.
|
||||
*/
|
||||
smp_relase_cpus();
|
||||
smp_release_cpus();
|
||||
if (ppc_md.cpu_irq_down)
|
||||
ppc_md.cpu_irq_down();
|
||||
ppc_md.cpu_irq_down(0);
|
||||
local_irq_disable();
|
||||
}
|
||||
|
||||
|
|
|
@ -1129,6 +1129,9 @@ _GLOBAL(sys_call_table32)
|
|||
.llong .compat_sys_waitid
|
||||
.llong .sys32_ioprio_set
|
||||
.llong .sys32_ioprio_get
|
||||
.llong .sys_inotify_init /* 275 */
|
||||
.llong .sys_inotify_add_watch
|
||||
.llong .sys_inotify_rm_watch
|
||||
|
||||
.balign 8
|
||||
_GLOBAL(sys_call_table)
|
||||
|
@ -1407,3 +1410,6 @@ _GLOBAL(sys_call_table)
|
|||
.llong .sys_waitid
|
||||
.llong .sys_ioprio_set
|
||||
.llong .sys_ioprio_get
|
||||
.llong .sys_inotify_init /* 275 */
|
||||
.llong .sys_inotify_add_watch
|
||||
.llong .sys_inotify_rm_watch
|
||||
|
|
|
@ -794,10 +794,10 @@ void mpic_setup_this_cpu(void)
|
|||
|
||||
/*
|
||||
* XXX: someone who knows mpic should check this.
|
||||
* do we need to eoi the ipi here (see xics comments)?
|
||||
* do we need to eoi the ipi including for kexec cpu here (see xics comments)?
|
||||
* or can we reset the mpic in the new kernel?
|
||||
*/
|
||||
void mpic_teardown_this_cpu(void)
|
||||
void mpic_teardown_this_cpu(int secondary)
|
||||
{
|
||||
struct mpic *mpic = mpic_primary;
|
||||
unsigned long flags;
|
||||
|
|
|
@ -256,7 +256,7 @@ extern unsigned int mpic_irq_get_priority(unsigned int irq);
|
|||
extern void mpic_setup_this_cpu(void);
|
||||
|
||||
/* Clean up for kexec (or cpu offline or ...) */
|
||||
extern void mpic_teardown_this_cpu(void);
|
||||
extern void mpic_teardown_this_cpu(int secondary);
|
||||
|
||||
/* Request IPIs on primary mpic */
|
||||
extern void mpic_request_ipis(void);
|
||||
|
|
|
@ -916,6 +916,7 @@ static int __init early_init_dt_scan_cpus(unsigned long node,
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ALTIVEC
|
||||
/* Check if we have a VMX and eventually update CPU features */
|
||||
prop = (u32 *)get_flat_dt_prop(node, "ibm,vmx", NULL);
|
||||
if (prop && (*prop) > 0) {
|
||||
|
@ -929,6 +930,7 @@ static int __init early_init_dt_scan_cpus(unsigned long node,
|
|||
cur_cpu_spec->cpu_features |= CPU_FTR_ALTIVEC;
|
||||
cur_cpu_spec->cpu_user_features |= PPC_FEATURE_HAS_ALTIVEC;
|
||||
}
|
||||
#endif /* CONFIG_ALTIVEC */
|
||||
|
||||
/*
|
||||
* Check for an SMT capable CPU and set the CPU feature. We do
|
||||
|
|
|
@ -647,29 +647,30 @@ static void xics_set_affinity(unsigned int virq, cpumask_t cpumask)
|
|||
}
|
||||
}
|
||||
|
||||
void xics_teardown_cpu(void)
|
||||
void xics_teardown_cpu(int secondary)
|
||||
{
|
||||
int cpu = smp_processor_id();
|
||||
int status;
|
||||
|
||||
ops->cppr_info(cpu, 0x00);
|
||||
iosync();
|
||||
|
||||
/*
|
||||
* we need to EOI the IPI if we got here from kexec down IPI
|
||||
*
|
||||
* xics doesn't care if we duplicate an EOI as long as we
|
||||
* don't EOI and raise priority.
|
||||
*
|
||||
* probably need to check all the other interrupts too
|
||||
* should we be flagging idle loop instead?
|
||||
* or creating some task to be scheduled?
|
||||
* Some machines need to have at least one cpu in the GIQ,
|
||||
* so leave the master cpu in the group.
|
||||
*/
|
||||
ops->xirr_info_set(cpu, XICS_IPI);
|
||||
|
||||
status = rtas_set_indicator(GLOBAL_INTERRUPT_QUEUE,
|
||||
(1UL << interrupt_server_size) - 1 - default_distrib_server, 0);
|
||||
WARN_ON(status != 0);
|
||||
if (secondary) {
|
||||
/*
|
||||
* we need to EOI the IPI if we got here from kexec down IPI
|
||||
*
|
||||
* probably need to check all the other interrupts too
|
||||
* should we be flagging idle loop instead?
|
||||
* or creating some task to be scheduled?
|
||||
*/
|
||||
ops->xirr_info_set(cpu, XICS_IPI);
|
||||
rtas_set_indicator(GLOBAL_INTERRUPT_QUEUE,
|
||||
(1UL << interrupt_server_size) - 1 -
|
||||
default_distrib_server, 0);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_HOTPLUG_CPU
|
||||
|
|
|
@ -647,7 +647,12 @@ void __init do_init_bootmem(void)
|
|||
new_range:
|
||||
mem_start = read_n_cells(addr_cells, &memcell_buf);
|
||||
mem_size = read_n_cells(size_cells, &memcell_buf);
|
||||
numa_domain = numa_enabled ? of_node_numa_domain(memory) : 0;
|
||||
if (numa_enabled) {
|
||||
numa_domain = of_node_numa_domain(memory);
|
||||
if (numa_domain >= MAX_NUMNODES)
|
||||
numa_domain = 0;
|
||||
} else
|
||||
numa_domain = 0;
|
||||
|
||||
if (numa_domain != nid)
|
||||
continue;
|
||||
|
|
|
@ -329,13 +329,16 @@ int xmon_core(struct pt_regs *regs, int fromipi)
|
|||
printf("cpu 0x%x: Exception %lx %s in xmon, "
|
||||
"returning to main loop\n",
|
||||
cpu, regs->trap, getvecname(TRAP(regs)));
|
||||
release_output_lock();
|
||||
longjmp(xmon_fault_jmp[cpu], 1);
|
||||
}
|
||||
|
||||
if (setjmp(recurse_jmp) != 0) {
|
||||
if (!in_xmon || !xmon_gate) {
|
||||
get_output_lock();
|
||||
printf("xmon: WARNING: bad recursive fault "
|
||||
"on cpu 0x%x\n", cpu);
|
||||
release_output_lock();
|
||||
goto waiting;
|
||||
}
|
||||
secondary = !(xmon_taken && cpu == xmon_owner);
|
||||
|
|
|
@ -232,7 +232,11 @@ static int appldata_diag(char record_nr, u16 function, unsigned long buffer,
|
|||
ry = -1;
|
||||
asm volatile(
|
||||
"diag %1,%0,0xDC\n\t"
|
||||
: "=d" (ry) : "d" (&(appldata_parameter_list)) : "cc");
|
||||
: "=d" (ry)
|
||||
: "d" (&appldata_parameter_list),
|
||||
"m" (appldata_parameter_list),
|
||||
"m" (appldata_product_id)
|
||||
: "cc");
|
||||
return (int) ry;
|
||||
}
|
||||
/************************ timer, work, DIAG <END> ****************************/
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#
|
||||
# Automatically generated make config: don't edit
|
||||
# Linux kernel version: 2.6.12-rc3
|
||||
# Fri Apr 22 15:30:58 2005
|
||||
# Linux kernel version: 2.6.13-rc4
|
||||
# Fri Jul 29 14:49:30 2005
|
||||
#
|
||||
CONFIG_MMU=y
|
||||
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
|
||||
|
@ -23,10 +23,11 @@ CONFIG_INIT_ENV_ARG_LIMIT=32
|
|||
CONFIG_LOCALVERSION=""
|
||||
CONFIG_SWAP=y
|
||||
CONFIG_SYSVIPC=y
|
||||
# CONFIG_POSIX_MQUEUE is not set
|
||||
CONFIG_POSIX_MQUEUE=y
|
||||
# CONFIG_BSD_PROCESS_ACCT is not set
|
||||
CONFIG_SYSCTL=y
|
||||
# CONFIG_AUDIT is not set
|
||||
CONFIG_AUDIT=y
|
||||
# CONFIG_AUDITSYSCALL is not set
|
||||
CONFIG_HOTPLUG=y
|
||||
CONFIG_KOBJECT_UEVENT=y
|
||||
CONFIG_IKCONFIG=y
|
||||
|
@ -36,6 +37,8 @@ CONFIG_IKCONFIG_PROC=y
|
|||
CONFIG_KALLSYMS=y
|
||||
# CONFIG_KALLSYMS_ALL is not set
|
||||
# CONFIG_KALLSYMS_EXTRA_PASS is not set
|
||||
CONFIG_PRINTK=y
|
||||
CONFIG_BUG=y
|
||||
CONFIG_BASE_FULL=y
|
||||
CONFIG_FUTEX=y
|
||||
CONFIG_EPOLL=y
|
||||
|
@ -51,9 +54,10 @@ CONFIG_BASE_SMALL=0
|
|||
# Loadable module support
|
||||
#
|
||||
CONFIG_MODULES=y
|
||||
# CONFIG_MODULE_UNLOAD is not set
|
||||
CONFIG_MODULE_UNLOAD=y
|
||||
# CONFIG_MODULE_FORCE_UNLOAD is not set
|
||||
CONFIG_OBSOLETE_MODPARM=y
|
||||
# CONFIG_MODVERSIONS is not set
|
||||
CONFIG_MODVERSIONS=y
|
||||
# CONFIG_MODULE_SRCVERSION_ALL is not set
|
||||
CONFIG_KMOD=y
|
||||
CONFIG_STOP_MACHINE=y
|
||||
|
@ -81,8 +85,15 @@ CONFIG_MARCH_G5=y
|
|||
# CONFIG_MARCH_Z990 is not set
|
||||
CONFIG_PACK_STACK=y
|
||||
# CONFIG_SMALL_STACK is not set
|
||||
# CONFIG_CHECK_STACK is not set
|
||||
CONFIG_CHECK_STACK=y
|
||||
CONFIG_STACK_GUARD=256
|
||||
# CONFIG_WARN_STACK is not set
|
||||
CONFIG_SELECT_MEMORY_MODEL=y
|
||||
CONFIG_FLATMEM_MANUAL=y
|
||||
# CONFIG_DISCONTIGMEM_MANUAL is not set
|
||||
# CONFIG_SPARSEMEM_MANUAL is not set
|
||||
CONFIG_FLATMEM=y
|
||||
CONFIG_FLAT_NODE_MEM_MAP=y
|
||||
|
||||
#
|
||||
# I/O subsystem configuration
|
||||
|
@ -95,7 +106,7 @@ CONFIG_QDIO=y
|
|||
#
|
||||
# Misc
|
||||
#
|
||||
# CONFIG_PREEMPT is not set
|
||||
CONFIG_PREEMPT=y
|
||||
CONFIG_IPL=y
|
||||
# CONFIG_IPL_TAPE is not set
|
||||
CONFIG_IPL_VM=y
|
||||
|
@ -105,9 +116,110 @@ CONFIG_BINFMT_MISC=m
|
|||
CONFIG_PFAULT=y
|
||||
# CONFIG_SHARED_KERNEL is not set
|
||||
# CONFIG_CMM is not set
|
||||
# CONFIG_VIRT_TIMER is not set
|
||||
CONFIG_VIRT_TIMER=y
|
||||
CONFIG_VIRT_CPU_ACCOUNTING=y
|
||||
# CONFIG_APPLDATA_BASE is not set
|
||||
CONFIG_NO_IDLE_HZ=y
|
||||
CONFIG_NO_IDLE_HZ_INIT=y
|
||||
# CONFIG_KEXEC is not set
|
||||
|
||||
#
|
||||
# Networking
|
||||
#
|
||||
CONFIG_NET=y
|
||||
|
||||
#
|
||||
# Networking options
|
||||
#
|
||||
CONFIG_PACKET=y
|
||||
# CONFIG_PACKET_MMAP is not set
|
||||
CONFIG_UNIX=y
|
||||
CONFIG_XFRM=y
|
||||
# CONFIG_XFRM_USER is not set
|
||||
CONFIG_NET_KEY=y
|
||||
CONFIG_INET=y
|
||||
CONFIG_IP_MULTICAST=y
|
||||
# CONFIG_IP_ADVANCED_ROUTER is not set
|
||||
CONFIG_IP_FIB_HASH=y
|
||||
# CONFIG_IP_PNP is not set
|
||||
# CONFIG_NET_IPIP is not set
|
||||
# CONFIG_NET_IPGRE is not set
|
||||
# CONFIG_IP_MROUTE is not set
|
||||
# CONFIG_ARPD is not set
|
||||
# CONFIG_SYN_COOKIES is not set
|
||||
# CONFIG_INET_AH is not set
|
||||
# CONFIG_INET_ESP is not set
|
||||
# CONFIG_INET_IPCOMP is not set
|
||||
# CONFIG_INET_TUNNEL is not set
|
||||
CONFIG_IP_TCPDIAG=y
|
||||
CONFIG_IP_TCPDIAG_IPV6=y
|
||||
# CONFIG_TCP_CONG_ADVANCED is not set
|
||||
CONFIG_TCP_CONG_BIC=y
|
||||
CONFIG_IPV6=y
|
||||
# CONFIG_IPV6_PRIVACY is not set
|
||||
# CONFIG_INET6_AH is not set
|
||||
# CONFIG_INET6_ESP is not set
|
||||
# CONFIG_INET6_IPCOMP is not set
|
||||
# CONFIG_INET6_TUNNEL is not set
|
||||
# CONFIG_IPV6_TUNNEL is not set
|
||||
# CONFIG_NETFILTER is not set
|
||||
|
||||
#
|
||||
# SCTP Configuration (EXPERIMENTAL)
|
||||
#
|
||||
# CONFIG_IP_SCTP is not set
|
||||
# CONFIG_ATM is not set
|
||||
# CONFIG_BRIDGE is not set
|
||||
# CONFIG_VLAN_8021Q is not set
|
||||
# CONFIG_DECNET is not set
|
||||
# CONFIG_LLC2 is not set
|
||||
# CONFIG_IPX is not set
|
||||
# CONFIG_ATALK is not set
|
||||
# CONFIG_X25 is not set
|
||||
# CONFIG_LAPB is not set
|
||||
# CONFIG_NET_DIVERT is not set
|
||||
# CONFIG_ECONET is not set
|
||||
# CONFIG_WAN_ROUTER is not set
|
||||
CONFIG_NET_SCHED=y
|
||||
CONFIG_NET_SCH_CLK_JIFFIES=y
|
||||
# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set
|
||||
# CONFIG_NET_SCH_CLK_CPU is not set
|
||||
CONFIG_NET_SCH_CBQ=m
|
||||
# CONFIG_NET_SCH_HTB is not set
|
||||
# CONFIG_NET_SCH_HFSC is not set
|
||||
CONFIG_NET_SCH_PRIO=m
|
||||
CONFIG_NET_SCH_RED=m
|
||||
CONFIG_NET_SCH_SFQ=m
|
||||
CONFIG_NET_SCH_TEQL=m
|
||||
CONFIG_NET_SCH_TBF=m
|
||||
CONFIG_NET_SCH_GRED=m
|
||||
CONFIG_NET_SCH_DSMARK=m
|
||||
# CONFIG_NET_SCH_NETEM is not set
|
||||
# CONFIG_NET_SCH_INGRESS is not set
|
||||
CONFIG_NET_QOS=y
|
||||
CONFIG_NET_ESTIMATOR=y
|
||||
CONFIG_NET_CLS=y
|
||||
# CONFIG_NET_CLS_BASIC is not set
|
||||
CONFIG_NET_CLS_TCINDEX=m
|
||||
CONFIG_NET_CLS_ROUTE4=m
|
||||
CONFIG_NET_CLS_ROUTE=y
|
||||
CONFIG_NET_CLS_FW=m
|
||||
CONFIG_NET_CLS_U32=m
|
||||
# CONFIG_CLS_U32_PERF is not set
|
||||
# CONFIG_NET_CLS_IND is not set
|
||||
CONFIG_NET_CLS_RSVP=m
|
||||
CONFIG_NET_CLS_RSVP6=m
|
||||
# CONFIG_NET_EMATCH is not set
|
||||
# CONFIG_NET_CLS_ACT is not set
|
||||
CONFIG_NET_CLS_POLICE=y
|
||||
|
||||
#
|
||||
# Network testing
|
||||
#
|
||||
# CONFIG_NET_PKTGEN is not set
|
||||
# CONFIG_HAMRADIO is not set
|
||||
# CONFIG_IRDA is not set
|
||||
# CONFIG_BT is not set
|
||||
# CONFIG_PCMCIA is not set
|
||||
|
||||
#
|
||||
|
@ -133,6 +245,7 @@ CONFIG_CHR_DEV_ST=y
|
|||
CONFIG_BLK_DEV_SR=y
|
||||
CONFIG_BLK_DEV_SR_VENDOR=y
|
||||
CONFIG_CHR_DEV_SG=y
|
||||
# CONFIG_CHR_DEV_SCH is not set
|
||||
|
||||
#
|
||||
# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
|
||||
|
@ -205,7 +318,13 @@ CONFIG_MD_RAID5=m
|
|||
# CONFIG_MD_RAID6 is not set
|
||||
CONFIG_MD_MULTIPATH=m
|
||||
# CONFIG_MD_FAULTY is not set
|
||||
# CONFIG_BLK_DEV_DM is not set
|
||||
CONFIG_BLK_DEV_DM=y
|
||||
CONFIG_DM_CRYPT=y
|
||||
CONFIG_DM_SNAPSHOT=y
|
||||
CONFIG_DM_MIRROR=y
|
||||
CONFIG_DM_ZERO=y
|
||||
CONFIG_DM_MULTIPATH=y
|
||||
# CONFIG_DM_MULTIPATH_EMC is not set
|
||||
|
||||
#
|
||||
# Character device drivers
|
||||
|
@ -231,7 +350,8 @@ CONFIG_CCW_CONSOLE=y
|
|||
CONFIG_SCLP=y
|
||||
CONFIG_SCLP_TTY=y
|
||||
CONFIG_SCLP_CONSOLE=y
|
||||
# CONFIG_SCLP_VT220_TTY is not set
|
||||
CONFIG_SCLP_VT220_TTY=y
|
||||
CONFIG_SCLP_VT220_CONSOLE=y
|
||||
CONFIG_SCLP_CPI=m
|
||||
CONFIG_S390_TAPE=m
|
||||
|
||||
|
@ -255,105 +375,8 @@ CONFIG_S390_TAPE_34XX=m
|
|||
CONFIG_Z90CRYPT=m
|
||||
|
||||
#
|
||||
# Networking support
|
||||
# Network device support
|
||||
#
|
||||
CONFIG_NET=y
|
||||
|
||||
#
|
||||
# Networking options
|
||||
#
|
||||
CONFIG_PACKET=y
|
||||
# CONFIG_PACKET_MMAP is not set
|
||||
CONFIG_UNIX=y
|
||||
CONFIG_NET_KEY=y
|
||||
CONFIG_INET=y
|
||||
CONFIG_IP_MULTICAST=y
|
||||
# CONFIG_IP_ADVANCED_ROUTER is not set
|
||||
# CONFIG_IP_PNP is not set
|
||||
# CONFIG_NET_IPIP is not set
|
||||
# CONFIG_NET_IPGRE is not set
|
||||
# CONFIG_IP_MROUTE is not set
|
||||
# CONFIG_ARPD is not set
|
||||
# CONFIG_SYN_COOKIES is not set
|
||||
# CONFIG_INET_AH is not set
|
||||
# CONFIG_INET_ESP is not set
|
||||
# CONFIG_INET_IPCOMP is not set
|
||||
# CONFIG_INET_TUNNEL is not set
|
||||
CONFIG_IP_TCPDIAG=y
|
||||
CONFIG_IP_TCPDIAG_IPV6=y
|
||||
CONFIG_IPV6=y
|
||||
# CONFIG_IPV6_PRIVACY is not set
|
||||
# CONFIG_INET6_AH is not set
|
||||
# CONFIG_INET6_ESP is not set
|
||||
# CONFIG_INET6_IPCOMP is not set
|
||||
# CONFIG_INET6_TUNNEL is not set
|
||||
# CONFIG_IPV6_TUNNEL is not set
|
||||
# CONFIG_NETFILTER is not set
|
||||
CONFIG_XFRM=y
|
||||
# CONFIG_XFRM_USER is not set
|
||||
|
||||
#
|
||||
# SCTP Configuration (EXPERIMENTAL)
|
||||
#
|
||||
# CONFIG_IP_SCTP is not set
|
||||
# CONFIG_ATM is not set
|
||||
# CONFIG_BRIDGE is not set
|
||||
# CONFIG_VLAN_8021Q is not set
|
||||
# CONFIG_DECNET is not set
|
||||
# CONFIG_LLC2 is not set
|
||||
# CONFIG_IPX is not set
|
||||
# CONFIG_ATALK is not set
|
||||
# CONFIG_X25 is not set
|
||||
# CONFIG_LAPB is not set
|
||||
# CONFIG_NET_DIVERT is not set
|
||||
# CONFIG_ECONET is not set
|
||||
# CONFIG_WAN_ROUTER is not set
|
||||
|
||||
#
|
||||
# QoS and/or fair queueing
|
||||
#
|
||||
CONFIG_NET_SCHED=y
|
||||
CONFIG_NET_SCH_CLK_JIFFIES=y
|
||||
# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set
|
||||
# CONFIG_NET_SCH_CLK_CPU is not set
|
||||
CONFIG_NET_SCH_CBQ=m
|
||||
# CONFIG_NET_SCH_HTB is not set
|
||||
# CONFIG_NET_SCH_HFSC is not set
|
||||
CONFIG_NET_SCH_PRIO=m
|
||||
CONFIG_NET_SCH_RED=m
|
||||
CONFIG_NET_SCH_SFQ=m
|
||||
CONFIG_NET_SCH_TEQL=m
|
||||
CONFIG_NET_SCH_TBF=m
|
||||
CONFIG_NET_SCH_GRED=m
|
||||
CONFIG_NET_SCH_DSMARK=m
|
||||
# CONFIG_NET_SCH_NETEM is not set
|
||||
# CONFIG_NET_SCH_INGRESS is not set
|
||||
CONFIG_NET_QOS=y
|
||||
CONFIG_NET_ESTIMATOR=y
|
||||
CONFIG_NET_CLS=y
|
||||
# CONFIG_NET_CLS_BASIC is not set
|
||||
CONFIG_NET_CLS_TCINDEX=m
|
||||
CONFIG_NET_CLS_ROUTE4=m
|
||||
CONFIG_NET_CLS_ROUTE=y
|
||||
CONFIG_NET_CLS_FW=m
|
||||
CONFIG_NET_CLS_U32=m
|
||||
# CONFIG_CLS_U32_PERF is not set
|
||||
# CONFIG_NET_CLS_IND is not set
|
||||
CONFIG_NET_CLS_RSVP=m
|
||||
CONFIG_NET_CLS_RSVP6=m
|
||||
# CONFIG_NET_EMATCH is not set
|
||||
# CONFIG_NET_CLS_ACT is not set
|
||||
CONFIG_NET_CLS_POLICE=y
|
||||
|
||||
#
|
||||
# Network testing
|
||||
#
|
||||
# CONFIG_NET_PKTGEN is not set
|
||||
# CONFIG_NETPOLL is not set
|
||||
# CONFIG_NET_POLL_CONTROLLER is not set
|
||||
# CONFIG_HAMRADIO is not set
|
||||
# CONFIG_IRDA is not set
|
||||
# CONFIG_BT is not set
|
||||
CONFIG_NETDEVICES=y
|
||||
CONFIG_DUMMY=m
|
||||
CONFIG_BONDING=m
|
||||
|
@ -411,12 +434,15 @@ CONFIG_CCWGROUP=y
|
|||
# CONFIG_SLIP is not set
|
||||
# CONFIG_SHAPER is not set
|
||||
# CONFIG_NETCONSOLE is not set
|
||||
# CONFIG_NETPOLL is not set
|
||||
# CONFIG_NET_POLL_CONTROLLER is not set
|
||||
|
||||
#
|
||||
# File systems
|
||||
#
|
||||
CONFIG_EXT2_FS=y
|
||||
# CONFIG_EXT2_FS_XATTR is not set
|
||||
# CONFIG_EXT2_FS_XIP is not set
|
||||
CONFIG_EXT3_FS=y
|
||||
CONFIG_EXT3_FS_XATTR=y
|
||||
# CONFIG_EXT3_FS_POSIX_ACL is not set
|
||||
|
@ -426,6 +452,7 @@ CONFIG_JBD=y
|
|||
CONFIG_FS_MBCACHE=y
|
||||
# CONFIG_REISERFS_FS is not set
|
||||
# CONFIG_JFS_FS is not set
|
||||
# CONFIG_FS_POSIX_ACL is not set
|
||||
|
||||
#
|
||||
# XFS support
|
||||
|
@ -433,6 +460,7 @@ CONFIG_FS_MBCACHE=y
|
|||
# CONFIG_XFS_FS is not set
|
||||
# CONFIG_MINIX_FS is not set
|
||||
# CONFIG_ROMFS_FS is not set
|
||||
CONFIG_INOTIFY=y
|
||||
# CONFIG_QUOTA is not set
|
||||
CONFIG_DNOTIFY=y
|
||||
# CONFIG_AUTOFS_FS is not set
|
||||
|
@ -457,7 +485,6 @@ CONFIG_DNOTIFY=y
|
|||
CONFIG_PROC_FS=y
|
||||
CONFIG_PROC_KCORE=y
|
||||
CONFIG_SYSFS=y
|
||||
# CONFIG_DEVFS_FS is not set
|
||||
# CONFIG_DEVPTS_FS_XATTR is not set
|
||||
CONFIG_TMPFS=y
|
||||
# CONFIG_TMPFS_XATTR is not set
|
||||
|
@ -486,15 +513,18 @@ CONFIG_RAMFS=y
|
|||
#
|
||||
CONFIG_NFS_FS=y
|
||||
CONFIG_NFS_V3=y
|
||||
# CONFIG_NFS_V3_ACL is not set
|
||||
# CONFIG_NFS_V4 is not set
|
||||
# CONFIG_NFS_DIRECTIO is not set
|
||||
CONFIG_NFSD=y
|
||||
CONFIG_NFSD_V3=y
|
||||
# CONFIG_NFSD_V3_ACL is not set
|
||||
# CONFIG_NFSD_V4 is not set
|
||||
CONFIG_NFSD_TCP=y
|
||||
CONFIG_LOCKD=y
|
||||
CONFIG_LOCKD_V4=y
|
||||
CONFIG_EXPORTFS=y
|
||||
CONFIG_NFS_COMMON=y
|
||||
CONFIG_SUNRPC=y
|
||||
# CONFIG_RPCSEC_GSS_KRB5 is not set
|
||||
# CONFIG_RPCSEC_GSS_SPKM3 is not set
|
||||
|
@ -544,11 +574,12 @@ CONFIG_MAGIC_SYSRQ=y
|
|||
CONFIG_LOG_BUF_SHIFT=17
|
||||
# CONFIG_SCHEDSTATS is not set
|
||||
# CONFIG_DEBUG_SLAB is not set
|
||||
CONFIG_DEBUG_PREEMPT=y
|
||||
# CONFIG_DEBUG_SPINLOCK is not set
|
||||
# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
|
||||
# CONFIG_DEBUG_KOBJECT is not set
|
||||
# CONFIG_DEBUG_INFO is not set
|
||||
# CONFIG_DEBUG_FS is not set
|
||||
CONFIG_DEBUG_FS=y
|
||||
|
||||
#
|
||||
# Security options
|
||||
|
|
|
@ -1449,3 +1449,29 @@ compat_sys_kexec_load_wrapper:
|
|||
llgtr %r4,%r4 # struct kexec_segment *
|
||||
llgfr %r5,%r5 # unsigned long
|
||||
jg compat_sys_kexec_load
|
||||
|
||||
.globl sys_ioprio_set_wrapper
|
||||
sys_ioprio_set_wrapper:
|
||||
lgfr %r2,%r2 # int
|
||||
lgfr %r3,%r3 # int
|
||||
lgfr %r4,%r4 # int
|
||||
jg sys_ioprio_set
|
||||
|
||||
.globl sys_ioprio_get_wrapper
|
||||
sys_ioprio_get_wrapper:
|
||||
lgfr %r2,%r2 # int
|
||||
lgfr %r3,%r3 # int
|
||||
jg sys_ioprio_get
|
||||
|
||||
.globl sys_inotify_add_watch_wrapper
|
||||
sys_inotify_add_watch_wrapper:
|
||||
lgfr %r2,%r2 # int
|
||||
llgtr %r3,%r3 # const char *
|
||||
llgfr %r4,%r4 # u32
|
||||
jg sys_inotify_add_watch
|
||||
|
||||
.globl sys_inotify_rm_watch_wrapper
|
||||
sys_inotify_rm_watch_wrapper:
|
||||
lgfr %r2,%r2 # int
|
||||
llgfr %r3,%r3 # u32
|
||||
jg sys_inotify_rm_watch
|
||||
|
|
|
@ -346,6 +346,13 @@ iplstart:
|
|||
la %r2,.Lreset
|
||||
lhi %r3,26
|
||||
diag %r2,%r3,8
|
||||
la %r5,.Lirb
|
||||
stsch 0(%r5) # check if irq is pending
|
||||
tm 30(%r5),0x0f # by verifying if any of the
|
||||
bnz .Lwaitforirq # activity or status control
|
||||
tm 31(%r5),0xff # bits is set in the schib
|
||||
bz .Lnoreset
|
||||
.Lwaitforirq:
|
||||
mvc 0x78(8),.Lrdrnewpsw # set up IO interrupt psw
|
||||
.Lwaitrdrirq:
|
||||
lpsw .Lrdrwaitpsw
|
||||
|
|
|
@ -345,6 +345,13 @@ iplstart:
|
|||
la %r2,.Lreset
|
||||
lhi %r3,26
|
||||
diag %r2,%r3,8
|
||||
la %r5,.Lirb
|
||||
stsch 0(%r5) # check if irq is pending
|
||||
tm 30(%r5),0x0f # by verifying if any of the
|
||||
bnz .Lwaitforirq # activity or status control
|
||||
tm 31(%r5),0xff # bits is set in the schib
|
||||
bz .Lnoreset
|
||||
.Lwaitforirq:
|
||||
mvc 0x78(8),.Lrdrnewpsw # set up IO interrupt psw
|
||||
.Lwaitrdrirq:
|
||||
lpsw .Lrdrwaitpsw
|
||||
|
|
|
@ -70,6 +70,8 @@ machine_kexec(struct kimage *image)
|
|||
for (;;);
|
||||
}
|
||||
|
||||
extern void pfault_fini(void);
|
||||
|
||||
static void
|
||||
kexec_halt_all_cpus(void *kernel_image)
|
||||
{
|
||||
|
@ -78,6 +80,11 @@ kexec_halt_all_cpus(void *kernel_image)
|
|||
struct kimage *image;
|
||||
relocate_kernel_t data_mover;
|
||||
|
||||
#ifdef CONFIG_PFAULT
|
||||
if (MACHINE_IS_VM)
|
||||
pfault_fini();
|
||||
#endif
|
||||
|
||||
if (atomic_compare_and_swap(-1, smp_processor_id(), &cpuid))
|
||||
signal_processor(smp_processor_id(), sigp_stop);
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
* (C) Copyright IBM Corp. 2005
|
||||
*
|
||||
* Author(s): Rolf Adelsberger <adelsberger@de.ibm.com>
|
||||
* Heiko Carstens <heiko.carstens@de.ibm.com>
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -25,8 +26,31 @@
|
|||
relocate_kernel:
|
||||
basr %r13,0 #base address
|
||||
.base:
|
||||
spx zero64-.base(%r13) #absolute addressing mode
|
||||
stnsm sys_msk-.base(%r13),0xf8 #disable DAT and IRQ (external)
|
||||
spx zero64-.base(%r13) #absolute addressing mode
|
||||
stctl %c0,%c15,ctlregs-.base(%r13)
|
||||
stm %r0,%r15,gprregs-.base(%r13)
|
||||
la %r1,load_psw-.base(%r13)
|
||||
mvc 0(8,%r0),0(%r1)
|
||||
la %r0,.back-.base(%r13)
|
||||
st %r0,4(%r0)
|
||||
oi 4(%r0),0x80
|
||||
mvc 0x68(8,%r0),0(%r1)
|
||||
la %r0,.back_pgm-.base(%r13)
|
||||
st %r0,0x6c(%r0)
|
||||
oi 0x6c(%r0),0x80
|
||||
lhi %r0,0
|
||||
diag %r0,%r0,0x308
|
||||
.back:
|
||||
basr %r13,0
|
||||
.back_base:
|
||||
oi have_diag308-.back_base(%r13),0x01
|
||||
lctl %c0,%c15,ctlregs-.back_base(%r13)
|
||||
lm %r0,%r15,gprregs-.back_base(%r13)
|
||||
j .start_reloc
|
||||
.back_pgm:
|
||||
lm %r0,%r15,gprregs-.base(%r13)
|
||||
.start_reloc:
|
||||
lhi %r10,-1 #preparing the mask
|
||||
sll %r10,12 #shift it such that it becomes 0xf000
|
||||
.top:
|
||||
|
@ -63,6 +87,10 @@
|
|||
o %r3,4(%r4) #or load address into psw
|
||||
st %r3,4(%r4)
|
||||
mvc 0(8,%r0),0(%r4) #copy psw to absolute address 0
|
||||
tm have_diag308-.base(%r13),0x01
|
||||
jno .no_diag308
|
||||
diag %r0,%r0,0x308
|
||||
.no_diag308:
|
||||
sr %r1,%r1 #clear %r1
|
||||
sr %r2,%r2 #clear %r2
|
||||
sigp %r1,%r2,0x12 #set cpuid to zero
|
||||
|
@ -75,6 +103,17 @@
|
|||
.long 0x00080000,0x80000000
|
||||
sys_msk:
|
||||
.quad 0
|
||||
ctlregs:
|
||||
.rept 16
|
||||
.long 0
|
||||
.endr
|
||||
gprregs:
|
||||
.rept 16
|
||||
.long 0
|
||||
.endr
|
||||
have_diag308:
|
||||
.byte 0
|
||||
.align 8
|
||||
relocate_kernel_end:
|
||||
.globl relocate_kernel_len
|
||||
relocate_kernel_len:
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
* (C) Copyright IBM Corp. 2005
|
||||
*
|
||||
* Author(s): Rolf Adelsberger <adelsberger@de.ibm.com>
|
||||
* Heiko Carstens <heiko.carstens@de.ibm.com>
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -26,8 +27,34 @@
|
|||
relocate_kernel:
|
||||
basr %r13,0 #base address
|
||||
.base:
|
||||
stnsm sys_msk-.base(%r13),0xf8 #disable DAT and IRQs
|
||||
spx zero64-.base(%r13) #absolute addressing mode
|
||||
stnsm sys_msk-.base(%r13),0xf8 #disable DAT and IRQ (external)
|
||||
stctg %c0,%c15,ctlregs-.base(%r13)
|
||||
stmg %r0,%r15,gprregs-.base(%r13)
|
||||
lghi %r0,3
|
||||
sllg %r0,%r0,31
|
||||
stg %r0,0x1d0(%r0)
|
||||
la %r0,.back_pgm-.base(%r13)
|
||||
stg %r0,0x1d8(%r0)
|
||||
la %r1,load_psw-.base(%r13)
|
||||
mvc 0(8,%r0),0(%r1)
|
||||
la %r0,.back-.base(%r13)
|
||||
st %r0,4(%r0)
|
||||
oi 4(%r0),0x80
|
||||
lghi %r0,0
|
||||
diag %r0,%r0,0x308
|
||||
.back:
|
||||
lhi %r1,1 #mode 1 = esame
|
||||
sigp %r1,%r0,0x12 #switch to esame mode
|
||||
sam64 #switch to 64 bit addressing mode
|
||||
basr %r13,0
|
||||
.back_base:
|
||||
oi have_diag308-.back_base(%r13),0x01
|
||||
lctlg %c0,%c15,ctlregs-.back_base(%r13)
|
||||
lmg %r0,%r15,gprregs-.back_base(%r13)
|
||||
j .top
|
||||
.back_pgm:
|
||||
lmg %r0,%r15,gprregs-.base(%r13)
|
||||
.top:
|
||||
lghi %r7,4096 #load PAGE_SIZE in r7
|
||||
lghi %r9,4096 #load PAGE_SIZE in r9
|
||||
|
@ -62,6 +89,10 @@
|
|||
o %r3,4(%r4) #or load address into psw
|
||||
st %r3,4(%r4)
|
||||
mvc 0(8,%r0),0(%r4) #copy psw to absolute address 0
|
||||
tm have_diag308-.base(%r13),0x01
|
||||
jno .no_diag308
|
||||
diag %r0,%r0,0x308
|
||||
.no_diag308:
|
||||
sam31 #31 bit mode
|
||||
sr %r1,%r1 #erase register r1
|
||||
sr %r2,%r2 #erase register r2
|
||||
|
@ -75,8 +106,18 @@
|
|||
.long 0x00080000,0x80000000
|
||||
sys_msk:
|
||||
.quad 0
|
||||
ctlregs:
|
||||
.rept 16
|
||||
.quad 0
|
||||
.endr
|
||||
gprregs:
|
||||
.rept 16
|
||||
.quad 0
|
||||
.endr
|
||||
have_diag308:
|
||||
.byte 0
|
||||
.align 8
|
||||
relocate_kernel_end:
|
||||
.globl relocate_kernel_len
|
||||
relocate_kernel_len:
|
||||
.quad relocate_kernel_end - relocate_kernel
|
||||
|
||||
|
|
|
@ -537,7 +537,8 @@ int __devinit start_secondary(void *cpuvoid)
|
|||
#endif
|
||||
#ifdef CONFIG_PFAULT
|
||||
/* Enable pfault pseudo page faults on this cpu. */
|
||||
pfault_init();
|
||||
if (MACHINE_IS_VM)
|
||||
pfault_init();
|
||||
#endif
|
||||
/* Mark this cpu as online */
|
||||
cpu_set(smp_processor_id(), cpu_online_map);
|
||||
|
@ -690,7 +691,8 @@ __cpu_disable(void)
|
|||
|
||||
#ifdef CONFIG_PFAULT
|
||||
/* Disable pfault pseudo page faults on this cpu. */
|
||||
pfault_fini();
|
||||
if (MACHINE_IS_VM)
|
||||
pfault_fini();
|
||||
#endif
|
||||
|
||||
/* disable all external interrupts */
|
||||
|
|
|
@ -290,3 +290,8 @@ SYSCALL(sys_add_key,sys_add_key,compat_sys_add_key_wrapper)
|
|||
SYSCALL(sys_request_key,sys_request_key,compat_sys_request_key_wrapper)
|
||||
SYSCALL(sys_keyctl,sys_keyctl,compat_sys_keyctl) /* 280 */
|
||||
SYSCALL(sys_waitid,sys_waitid,compat_sys_waitid_wrapper)
|
||||
SYSCALL(sys_ioprio_set,sys_ioprio_set,sys_ioprio_set_wrapper)
|
||||
SYSCALL(sys_ioprio_get,sys_ioprio_get,sys_ioprio_get_wrapper)
|
||||
SYSCALL(sys_inotify_init,sys_inotify_init,sys_inotify_init)
|
||||
SYSCALL(sys_inotify_add_watch,sys_inotify_add_watch,sys_inotify_add_watch_wrapper)
|
||||
SYSCALL(sys_inotify_rm_watch,sys_inotify_rm_watch,sys_inotify_rm_watch_wrapper)
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include <linux/delay.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/kallsyms.h>
|
||||
#include <linux/reboot.h>
|
||||
|
||||
#include <asm/system.h>
|
||||
#include <asm/uaccess.h>
|
||||
|
@ -675,6 +676,19 @@ asmlinkage void kernel_stack_overflow(struct pt_regs * regs)
|
|||
panic("Corrupt kernel stack, can't continue.");
|
||||
}
|
||||
|
||||
#ifndef CONFIG_ARCH_S390X
|
||||
static int
|
||||
pagex_reboot_event(struct notifier_block *this, unsigned long event, void *ptr)
|
||||
{
|
||||
if (MACHINE_IS_VM)
|
||||
cpcmd("SET PAGEX OFF", NULL, 0, NULL);
|
||||
return NOTIFY_DONE;
|
||||
}
|
||||
|
||||
static struct notifier_block pagex_reboot_notifier = {
|
||||
.notifier_call = &pagex_reboot_event,
|
||||
};
|
||||
#endif
|
||||
|
||||
/* init is done in lowcore.S and head.S */
|
||||
|
||||
|
@ -735,6 +749,7 @@ void __init trap_init(void)
|
|||
&ext_int_pfault);
|
||||
#endif
|
||||
#ifndef CONFIG_ARCH_S390X
|
||||
register_reboot_notifier(&pagex_reboot_notifier);
|
||||
cpcmd("SET PAGEX ON", NULL, 0, NULL);
|
||||
#endif
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue