Merge commit 'origin' into devel
This commit is contained in:
commit
9446389ef6
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -53,3 +53,5 @@ cscope.*
|
|||
|
||||
*.orig
|
||||
*.rej
|
||||
*~
|
||||
\#*#
|
||||
|
|
|
@ -183,8 +183,6 @@ i386/
|
|||
- directory with info about Linux on Intel 32 bit architecture.
|
||||
ia64/
|
||||
- directory with info about Linux on Intel 64 bit architecture.
|
||||
ide.txt
|
||||
- important info for users of ATA devices (IDE/EIDE disks and CD-ROMS).
|
||||
infiniband/
|
||||
- directory with documents concerning Linux InfiniBand support.
|
||||
initrd.txt
|
||||
|
|
|
@ -361,12 +361,14 @@ X!Edrivers/pnp/system.c
|
|||
<chapter id="blkdev">
|
||||
<title>Block Devices</title>
|
||||
!Eblock/blk-core.c
|
||||
!Iblock/blk-core.c
|
||||
!Eblock/blk-map.c
|
||||
!Iblock/blk-sysfs.c
|
||||
!Eblock/blk-settings.c
|
||||
!Eblock/blk-exec.c
|
||||
!Eblock/blk-barrier.c
|
||||
!Eblock/blk-tag.c
|
||||
!Iblock/blk-tag.c
|
||||
</chapter>
|
||||
|
||||
<chapter id="chrdev">
|
||||
|
|
|
@ -45,7 +45,7 @@ This driver provides the following features:
|
|||
---------------
|
||||
|
||||
0. The ide-cd relies on the ide disk driver. See
|
||||
Documentation/ide.txt for up-to-date information on the ide
|
||||
Documentation/ide/ide.txt for up-to-date information on the ide
|
||||
driver.
|
||||
|
||||
1. Make sure that the ide and ide-cd drivers are compiled into the
|
||||
|
@ -64,7 +64,7 @@ This driver provides the following features:
|
|||
|
||||
Depending on what type of IDE interface you have, you may need to
|
||||
specify additional configuration options. See
|
||||
Documentation/ide.txt.
|
||||
Documentation/ide/ide.txt.
|
||||
|
||||
2. You should also ensure that the iso9660 filesystem is either
|
||||
compiled into the kernel or available as a loadable module. You
|
||||
|
@ -84,7 +84,7 @@ This driver provides the following features:
|
|||
on the primary IDE interface are called `hda' and `hdb',
|
||||
respectively. The drives on the secondary interface are called
|
||||
`hdc' and `hdd'. (Interfaces at other locations get other letters
|
||||
in the third position; see Documentation/ide.txt.)
|
||||
in the third position; see Documentation/ide/ide.txt.)
|
||||
|
||||
If you want your CDROM drive to be found automatically by the
|
||||
driver, you should make sure your IDE interface uses either the
|
||||
|
@ -93,7 +93,7 @@ This driver provides the following features:
|
|||
be jumpered as `master'. (If for some reason you cannot configure
|
||||
your system in this manner, you can probably still use the driver.
|
||||
You may have to pass extra configuration information to the kernel
|
||||
when you boot, however. See Documentation/ide.txt for more
|
||||
when you boot, however. See Documentation/ide/ide.txt for more
|
||||
information.)
|
||||
|
||||
4. Boot the system. If the drive is recognized, you should see a
|
||||
|
@ -201,7 +201,7 @@ TEST
|
|||
This section discusses some common problems encountered when trying to
|
||||
use the driver, and some possible solutions. Note that if you are
|
||||
experiencing problems, you should probably also review
|
||||
Documentation/ide.txt for current information about the underlying
|
||||
Documentation/ide/ide.txt for current information about the underlying
|
||||
IDE support code. Some of these items apply only to earlier versions
|
||||
of the driver, but are mentioned here for completeness.
|
||||
|
||||
|
@ -211,7 +211,7 @@ from the driver.
|
|||
a. Drive is not detected during booting.
|
||||
|
||||
- Review the configuration instructions above and in
|
||||
Documentation/ide.txt, and check how your hardware is
|
||||
Documentation/ide/ide.txt, and check how your hardware is
|
||||
configured.
|
||||
|
||||
- If your drive is the only device on an IDE interface, it should
|
||||
|
@ -219,7 +219,7 @@ a. Drive is not detected during booting.
|
|||
|
||||
- If your IDE interface is not at the standard addresses of 0x170
|
||||
or 0x1f0, you'll need to explicitly inform the driver using a
|
||||
lilo option. See Documentation/ide.txt. (This feature was
|
||||
lilo option. See Documentation/ide/ide.txt. (This feature was
|
||||
added around kernel version 1.3.30.)
|
||||
|
||||
- If the autoprobing is not finding your drive, you can tell the
|
||||
|
@ -245,7 +245,7 @@ a. Drive is not detected during booting.
|
|||
Support for some interfaces needing extra initialization is
|
||||
provided in later 1.3.x kernels. You may need to turn on
|
||||
additional kernel configuration options to get them to work;
|
||||
see Documentation/ide.txt.
|
||||
see Documentation/ide/ide.txt.
|
||||
|
||||
Even if support is not available for your interface, you may be
|
||||
able to get it to work with the following procedure. First boot
|
||||
|
@ -299,7 +299,7 @@ c. System hangups.
|
|||
be worked around by specifying the `serialize' option when
|
||||
booting. Recent kernels should be able to detect the need for
|
||||
this automatically in most cases, but the detection is not
|
||||
foolproof. See Documentation/ide.txt for more information
|
||||
foolproof. See Documentation/ide/ide.txt for more information
|
||||
about the `serialize' option and the CMD640B.
|
||||
|
||||
- Note that many MS-DOS CDROM drivers will work with such buggy
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
Memory Controller
|
||||
Memory Resource Controller
|
||||
|
||||
NOTE: The Memory Resource Controller has been generically been referred
|
||||
to as the memory controller in this document. Do not confuse memory controller
|
||||
used here with the memory controller that is used in hardware.
|
||||
|
||||
Salient features
|
||||
|
||||
|
@ -152,7 +156,7 @@ The memory controller uses the following hierarchy
|
|||
|
||||
a. Enable CONFIG_CGROUPS
|
||||
b. Enable CONFIG_RESOURCE_COUNTERS
|
||||
c. Enable CONFIG_CGROUP_MEM_CONT
|
||||
c. Enable CONFIG_CGROUP_MEM_RES_CTLR
|
||||
|
||||
1. Prepare the cgroups
|
||||
# mkdir -p /cgroups
|
||||
|
@ -164,7 +168,7 @@ c. Enable CONFIG_CGROUP_MEM_CONT
|
|||
|
||||
Since now we're in the 0 cgroup,
|
||||
We can alter the memory limit:
|
||||
# echo -n 4M > /cgroups/0/memory.limit_in_bytes
|
||||
# echo 4M > /cgroups/0/memory.limit_in_bytes
|
||||
|
||||
NOTE: We can use a suffix (k, K, m, M, g or G) to indicate values in kilo,
|
||||
mega or gigabytes.
|
||||
|
@ -185,7 +189,7 @@ number of factors, such as rounding up to page boundaries or the total
|
|||
availability of memory on the system. The user is required to re-read
|
||||
this file after a write to guarantee the value committed by the kernel.
|
||||
|
||||
# echo -n 1 > memory.limit_in_bytes
|
||||
# echo 1 > memory.limit_in_bytes
|
||||
# cat memory.limit_in_bytes
|
||||
4096
|
||||
|
||||
|
@ -197,7 +201,7 @@ caches, RSS and Active pages/Inactive pages are shown.
|
|||
|
||||
The memory.force_empty gives an interface to drop *all* charges by force.
|
||||
|
||||
# echo -n 1 > memory.force_empty
|
||||
# echo 1 > memory.force_empty
|
||||
|
||||
will drop all charges in cgroup. Currently, this is maintained for test.
|
||||
|
||||
|
|
|
@ -36,14 +36,15 @@ available (notebooks) or too slow for extensive debug information (like ACPI).
|
|||
Drivers
|
||||
-------
|
||||
|
||||
The OHCI-1394 drivers in drivers/firewire and drivers/ieee1394 initialize
|
||||
the OHCI-1394 controllers to a working state and can be used to enable
|
||||
physical DMA. By default you only have to load the driver, and physical
|
||||
DMA access will be granted to all remote nodes, but it can be turned off
|
||||
when using the ohci1394 driver.
|
||||
The ohci1394 driver in drivers/ieee1394 initializes the OHCI-1394 controllers
|
||||
to a working state and enables physical DMA by default for all remote nodes.
|
||||
This can be turned off by ohci1394's module parameter phys_dma=0.
|
||||
|
||||
Because these drivers depend on the PCI enumeration to be completed, an
|
||||
initialization routine which can runs pretty early (long before console_init(),
|
||||
The alternative firewire-ohci driver in drivers/firewire uses filtered physical
|
||||
DMA, hence is not yet suitable for remote debugging.
|
||||
|
||||
Because ohci1394 depends on the PCI enumeration to be completed, an
|
||||
initialization routine which runs pretty early (long before console_init()
|
||||
which makes the printk buffer appear on the console can be called) was written.
|
||||
|
||||
To activate it, enable CONFIG_PROVIDE_OHCI1394_DMA_INIT (Kernel hacking menu:
|
||||
|
|
|
@ -172,6 +172,16 @@ Who: Len Brown <len.brown@intel.com>
|
|||
|
||||
---------------------------
|
||||
|
||||
What: ide-tape driver
|
||||
When: July 2008
|
||||
Files: drivers/ide/ide-tape.c
|
||||
Why: This driver might not have any users anymore and maintaining it for no
|
||||
reason is an effort no one wants to make.
|
||||
Who: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>, Borislav Petkov
|
||||
<petkovbb@googlemail.com>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: libata spindown skipping and warning
|
||||
When: Dec 2008
|
||||
Why: Some halt(8) implementations synchronize caches for and spin
|
||||
|
@ -306,3 +316,15 @@ Why: Largely unmaintained and almost entirely unused. File system
|
|||
is largely pointless as without a lot of work only the most
|
||||
trivial of Solaris binaries can work with the emulation code.
|
||||
Who: David S. Miller <davem@davemloft.net>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: init_mm export
|
||||
When: 2.6.26
|
||||
Why: Not used in-tree. The current out-of-tree users used it to
|
||||
work around problems in the CPA code which should be resolved
|
||||
by now. One usecase was described to provide verification code
|
||||
of the CPA operation. That's a good idea in general, but such
|
||||
code / infrastructure should be in the kernel and not in some
|
||||
out-of-tree driver.
|
||||
Who: Thomas Gleixner <tglx@linutronix.de>
|
||||
|
|
|
@ -2,6 +2,9 @@ GPIO Interfaces
|
|||
|
||||
This provides an overview of GPIO access conventions on Linux.
|
||||
|
||||
These calls use the gpio_* naming prefix. No other calls should use that
|
||||
prefix, or the related __gpio_* prefix.
|
||||
|
||||
|
||||
What is a GPIO?
|
||||
===============
|
||||
|
@ -69,11 +72,13 @@ in this document, but drivers acting as clients to the GPIO interface must
|
|||
not care how it's implemented.)
|
||||
|
||||
That said, if the convention is supported on their platform, drivers should
|
||||
use it when possible. Platforms should declare GENERIC_GPIO support in
|
||||
Kconfig (boolean true), which multi-platform drivers can depend on when
|
||||
using the include file:
|
||||
use it when possible. Platforms must declare GENERIC_GPIO support in their
|
||||
Kconfig (boolean true), and provide an <asm/gpio.h> file. Drivers that can't
|
||||
work without standard GPIO calls should have Kconfig entries which depend
|
||||
on GENERIC_GPIO. The GPIO calls are available, either as "real code" or as
|
||||
optimized-away stubs, when drivers use the include file:
|
||||
|
||||
#include <asm/gpio.h>
|
||||
#include <linux/gpio.h>
|
||||
|
||||
If you stick to this convention then it'll be easier for other developers to
|
||||
see what your code is doing, and help maintain it.
|
||||
|
@ -316,6 +321,9 @@ pulldowns integrated on some platforms. Not all platforms support them,
|
|||
or support them in the same way; and any given board might use external
|
||||
pullups (or pulldowns) so that the on-chip ones should not be used.
|
||||
(When a circuit needs 5 kOhm, on-chip 100 kOhm resistors won't do.)
|
||||
Likewise drive strength (2 mA vs 20 mA) and voltage (1.8V vs 3.3V) is a
|
||||
platform-specific issue, as are models like (not) having a one-to-one
|
||||
correspondence between configurable pins and GPIOs.
|
||||
|
||||
There are other system-specific mechanisms that are not specified here,
|
||||
like the aforementioned options for input de-glitching and wire-OR output.
|
||||
|
|
12
Documentation/ide/00-INDEX
Normal file
12
Documentation/ide/00-INDEX
Normal file
|
@ -0,0 +1,12 @@
|
|||
00-INDEX
|
||||
- this file
|
||||
ChangeLog.ide-cd.1994-2004
|
||||
- ide-cd changelog
|
||||
ChangeLog.ide-floppy.1996-2002
|
||||
- ide-floppy changelog
|
||||
ChangeLog.ide-tape.1995-2002
|
||||
- ide-tape changelog
|
||||
ide-tape.txt
|
||||
- info on the IDE ATAPI streaming tape driver
|
||||
ide.txt
|
||||
- important info for users of ATA devices (IDE/EIDE disks and CD-ROMS).
|
|
@ -258,8 +258,6 @@ Summary of ide driver parameters for kernel command line
|
|||
As for VLB, it is safest to not specify it.
|
||||
Bigger values are safer than smaller ones.
|
||||
|
||||
"idex=noprobe" : do not attempt to access/use this interface
|
||||
|
||||
"idex=base" : probe for an interface at the addr specified,
|
||||
where "base" is usually 0x1f0 or 0x170
|
||||
and "ctl" is assumed to be "base"+0x206
|
||||
|
@ -307,53 +305,6 @@ Also for legacy CMD640 host driver (cmd640) you need to use "probe_vlb"
|
|||
kernel paremeter to enable probing for VLB version of the chipset (PCI ones
|
||||
are detected automatically).
|
||||
|
||||
================================================================================
|
||||
|
||||
IDE ATAPI streaming tape driver
|
||||
-------------------------------
|
||||
|
||||
This driver is a part of the Linux ide driver and works in co-operation
|
||||
with linux/drivers/block/ide.c.
|
||||
|
||||
The driver, in co-operation with ide.c, basically traverses the
|
||||
request-list for the block device interface. The character device
|
||||
interface, on the other hand, creates new requests, adds them
|
||||
to the request-list of the block device, and waits for their completion.
|
||||
|
||||
Pipelined operation mode is now supported on both reads and writes.
|
||||
|
||||
The block device major and minor numbers are determined from the
|
||||
tape's relative position in the ide interfaces, as explained in ide.c.
|
||||
|
||||
The character device interface consists of the following devices:
|
||||
|
||||
ht0 major 37, minor 0 first IDE tape, rewind on close.
|
||||
ht1 major 37, minor 1 second IDE tape, rewind on close.
|
||||
...
|
||||
nht0 major 37, minor 128 first IDE tape, no rewind on close.
|
||||
nht1 major 37, minor 129 second IDE tape, no rewind on close.
|
||||
...
|
||||
|
||||
Run /dev/MAKEDEV to create the above entries.
|
||||
|
||||
The general magnetic tape commands compatible interface, as defined by
|
||||
include/linux/mtio.h, is accessible through the character device.
|
||||
|
||||
General ide driver configuration options, such as the interrupt-unmask
|
||||
flag, can be configured by issuing an ioctl to the block device interface,
|
||||
as any other ide device.
|
||||
|
||||
Our own ide-tape ioctl's can be issued to either the block device or
|
||||
the character device interface.
|
||||
|
||||
Maximal throughput with minimal bus load will usually be achieved in the
|
||||
following scenario:
|
||||
|
||||
1. ide-tape is operating in the pipelined operation mode.
|
||||
2. No buffering is performed by the user backup program.
|
||||
|
||||
|
||||
|
||||
================================================================================
|
||||
|
||||
Some Terminology
|
|
@ -712,7 +712,7 @@ and is between 256 and 4096 characters. It is defined in the file
|
|||
Format: <cyl>,<head>,<sect>
|
||||
|
||||
hd?= [HW] (E)IDE subsystem
|
||||
hd?lun= See Documentation/ide.txt.
|
||||
hd?lun= See Documentation/ide/ide.txt.
|
||||
|
||||
highmem=nn[KMG] [KNL,BOOT] forces the highmem zone to have an exact
|
||||
size of <nn>. This works even on boxes that have no
|
||||
|
@ -766,14 +766,14 @@ and is between 256 and 4096 characters. It is defined in the file
|
|||
|
||||
ide= [HW] (E)IDE subsystem
|
||||
Format: ide=nodma or ide=doubler or ide=reverse
|
||||
See Documentation/ide.txt.
|
||||
See Documentation/ide/ide.txt.
|
||||
|
||||
ide?= [HW] (E)IDE subsystem
|
||||
Format: ide?=noprobe or chipset specific parameters.
|
||||
See Documentation/ide.txt.
|
||||
See Documentation/ide/ide.txt.
|
||||
|
||||
idebus= [HW] (E)IDE subsystem - VLB/PCI bus speed
|
||||
See Documentation/ide.txt.
|
||||
See Documentation/ide/ide.txt.
|
||||
|
||||
idle= [X86]
|
||||
Format: idle=poll or idle=mwait
|
||||
|
|
|
@ -192,7 +192,8 @@ code mapping.
|
|||
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.
|
||||
that you'll write. See the files in the samples/kprobes/ sub-directory
|
||||
for examples.
|
||||
|
||||
4.1 register_kprobe
|
||||
|
||||
|
@ -420,249 +421,15 @@ e. Watchpoint probes (which fire on data references).
|
|||
|
||||
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/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;
|
||||
}
|
||||
|
||||
static int __init kprobe_init(void)
|
||||
{
|
||||
int ret;
|
||||
kp.pre_handler = handler_pre;
|
||||
kp.post_handler = handler_post;
|
||||
kp.fault_handler = handler_fault;
|
||||
kp.symbol_name = "do_fork";
|
||||
|
||||
ret = register_kprobe(&kp);
|
||||
if (ret < 0) {
|
||||
printk("register_kprobe failed, returned %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
printk("kprobe registered\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void __exit kprobe_exit(void)
|
||||
{
|
||||
unregister_kprobe(&kp);
|
||||
printk("kprobe unregistered\n");
|
||||
}
|
||||
|
||||
module_init(kprobe_init)
|
||||
module_exit(kprobe_exit)
|
||||
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.
|
||||
See samples/kprobes/kprobe_example.c
|
||||
|
||||
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>
|
||||
|
||||
/*
|
||||
* 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 = jdo_fork
|
||||
};
|
||||
|
||||
static int __init jprobe_init(void)
|
||||
{
|
||||
int ret;
|
||||
my_jprobe.kp.symbol_name = "do_fork";
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
static void __exit jprobe_exit(void)
|
||||
{
|
||||
unregister_jprobe(&my_jprobe);
|
||||
printk("jprobe unregistered\n");
|
||||
}
|
||||
|
||||
module_init(jprobe_init)
|
||||
module_exit(jprobe_exit)
|
||||
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.)
|
||||
See samples/kprobes/jprobe_example.c
|
||||
|
||||
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/ktime.h>
|
||||
|
||||
/* per-instance private data */
|
||||
struct my_data {
|
||||
ktime_t entry_stamp;
|
||||
};
|
||||
|
||||
static const char *probed_func = "sys_open";
|
||||
|
||||
/* Timestamp function entry. */
|
||||
static int entry_handler(struct kretprobe_instance *ri, struct pt_regs *regs)
|
||||
{
|
||||
struct my_data *data;
|
||||
|
||||
if(!current->mm)
|
||||
return 1; /* skip kernel threads */
|
||||
|
||||
data = (struct my_data *)ri->data;
|
||||
data->entry_stamp = ktime_get();
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* If the probed function failed, log the return value and duration.
|
||||
* Duration may turn out to be zero consistently, depending upon the
|
||||
* granularity of time accounting on the platform. */
|
||||
static int return_handler(struct kretprobe_instance *ri, struct pt_regs *regs)
|
||||
{
|
||||
int retval = regs_return_value(regs);
|
||||
struct my_data *data = (struct my_data *)ri->data;
|
||||
s64 delta;
|
||||
ktime_t now;
|
||||
|
||||
if (retval < 0) {
|
||||
now = ktime_get();
|
||||
delta = ktime_to_ns(ktime_sub(now, data->entry_stamp));
|
||||
printk("%s: return val = %d (duration = %lld ns)\n",
|
||||
probed_func, retval, delta);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct kretprobe my_kretprobe = {
|
||||
.handler = return_handler,
|
||||
.entry_handler = entry_handler,
|
||||
.data_size = sizeof(struct my_data),
|
||||
.maxactive = 20, /* probe up to 20 instances concurrently */
|
||||
};
|
||||
|
||||
static int __init kretprobe_init(void)
|
||||
{
|
||||
int ret;
|
||||
my_kretprobe.kp.symbol_name = (char *)probed_func;
|
||||
|
||||
if ((ret = register_kretprobe(&my_kretprobe)) < 0) {
|
||||
printk("register_kretprobe failed, returned %d\n", ret);
|
||||
return -1;
|
||||
}
|
||||
printk("Kretprobe active on %s\n", my_kretprobe.kp.symbol_name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void __exit kretprobe_exit(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_init(kretprobe_init)
|
||||
module_exit(kretprobe_exit)
|
||||
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.)
|
||||
See samples/kprobes/kretprobe_example.c
|
||||
|
||||
For additional information on Kprobes, refer to the following URLs:
|
||||
http://www-106.ibm.com/developerworks/library/l-kprobes.html?ca=dgr-lnxw42Kprobe
|
||||
|
|
|
@ -123,7 +123,8 @@ initialization with a pointer to a structure describing the driver
|
|||
|
||||
|
||||
The ID table is an array of struct pci_device_id entries ending with an
|
||||
all-zero entry. Each entry consists of:
|
||||
all-zero entry; use of the macro DECLARE_PCI_DEVICE_TABLE is the preferred
|
||||
method of declaring the table. Each entry consists of:
|
||||
|
||||
vendor,device Vendor and device ID to match (or PCI_ANY_ID)
|
||||
|
||||
|
@ -191,7 +192,8 @@ Tips on when/where to use the above attributes:
|
|||
|
||||
o Do not mark the struct pci_driver.
|
||||
|
||||
o The ID table array should be marked __devinitdata.
|
||||
o The ID table array should be marked __devinitconst; this is done
|
||||
automatically if the table is declared with DECLARE_PCI_DEVICE_TABLE().
|
||||
|
||||
o The probe() and remove() functions should be marked __devinit
|
||||
and __devexit respectively. All initialization functions
|
||||
|
|
|
@ -109,4 +109,10 @@
|
|||
** 8.replace pci_alloc_consistent()/pci_free_consistent() with kmalloc()/kfree() in arcmsr_iop_message_xfer()
|
||||
** 9. fix the release of dma memory for type B in arcmsr_free_ccb_pool()
|
||||
** 10.fix the arcmsr_polling_hbb_ccbdone()
|
||||
** 1.20.00.15 02/27/2008 Erich Chen & Nick Cheng
|
||||
** 1.arcmsr_iop_message_xfer() is called from atomic context under the
|
||||
** queuecommand scsi_host_template handler. James Bottomley pointed out
|
||||
** that the current GFP_KERNEL|GFP_DMA flags are wrong: firstly we are in
|
||||
** atomic context, secondly this memory is not used for DMA.
|
||||
** Also removed some unneeded casts. Thanks to Daniel Drake <dsd@gentoo.org>
|
||||
**************************************************************************
|
||||
|
|
|
@ -50,14 +50,14 @@ F.e. in order to boot just with sanity checks and red zoning one would specify:
|
|||
|
||||
Trying to find an issue in the dentry cache? Try
|
||||
|
||||
slub_debug=,dentry_cache
|
||||
slub_debug=,dentry
|
||||
|
||||
to only enable debugging on the dentry cache.
|
||||
|
||||
Red zoning and tracking may realign the slab. We can just apply sanity checks
|
||||
to the dentry cache with
|
||||
|
||||
slub_debug=F,dentry_cache
|
||||
slub_debug=F,dentry
|
||||
|
||||
In case you forgot to enable debugging on the kernel command line: It is
|
||||
possible to enable debugging manually when the kernel is up. Look at the
|
||||
|
|
47
MAINTAINERS
47
MAINTAINERS
|
@ -767,14 +767,14 @@ S: Maintained
|
|||
|
||||
BLACKFIN ARCHITECTURE
|
||||
P: Bryan Wu
|
||||
M: bryan.wu@analog.com
|
||||
M: cooloney@kernel.org
|
||||
L: uclinux-dist-devel@blackfin.uclinux.org (subscribers-only)
|
||||
W: http://blackfin.uclinux.org
|
||||
S: Supported
|
||||
|
||||
BLACKFIN EMAC DRIVER
|
||||
P: Bryan Wu
|
||||
M: bryan.wu@analog.com
|
||||
M: cooloney@kernel.org
|
||||
L: uclinux-dist-devel@blackfin.uclinux.org (subscribers-only)
|
||||
W: http://blackfin.uclinux.org
|
||||
S: Supported
|
||||
|
@ -982,6 +982,12 @@ M: mchan@broadcom.com
|
|||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
|
||||
BROADCOM BNX2X 10 GIGABIT ETHERNET DRIVER
|
||||
P: Eliezer Tamir
|
||||
M: eliezert@broadcom.com
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
|
||||
BROADCOM TG3 GIGABIT ETHERNET DRIVER
|
||||
P: Michael Chan
|
||||
M: mchan@broadcom.com
|
||||
|
@ -1132,6 +1138,12 @@ L: accessrunner-general@lists.sourceforge.net
|
|||
W: http://accessrunner.sourceforge.net/
|
||||
S: Maintained
|
||||
|
||||
CONTROL GROUPS (CGROUPS)
|
||||
P: Paul Menage
|
||||
M: menage@google.com
|
||||
L: containers@lists.linux-foundation.org
|
||||
S: Maintained
|
||||
|
||||
CORETEMP HARDWARE MONITORING DRIVER
|
||||
P: Rudolf Marek
|
||||
M: r.marek@assembler.cz
|
||||
|
@ -1583,6 +1595,13 @@ L: linux-fbdev-devel@lists.sourceforge.net (moderated for non-subscribers)
|
|||
W: http://linux-fbdev.sourceforge.net/
|
||||
S: Maintained
|
||||
|
||||
FREESCALE DMA DRIVER
|
||||
P; Zhang Wei
|
||||
M: wei.zhang@freescale.com
|
||||
L: linuxppc-embedded@ozlabs.org
|
||||
L: linux-kernel@vger.kernel.org
|
||||
S: Maintained
|
||||
|
||||
FREESCALE SOC FS_ENET DRIVER
|
||||
P: Pantelis Antoniou
|
||||
M: pantelis.antoniou@gmail.com
|
||||
|
@ -2620,6 +2639,17 @@ L: linux-kernel@vger.kernel.org
|
|||
W: http://www.linux-mm.org
|
||||
S: Maintained
|
||||
|
||||
MEMORY RESOURCE CONTROLLER
|
||||
P: Balbir Singh
|
||||
M: balbir@linux.vnet.ibm.com
|
||||
P: Pavel Emelyanov
|
||||
M: xemul@openvz.org
|
||||
P: KAMEZAWA Hiroyuki
|
||||
M: kamezawa.hiroyu@jp.fujitsu.com
|
||||
L: linux-mm@kvack.org
|
||||
L: linux-kernel@vger.kernel.org
|
||||
S: Maintained
|
||||
|
||||
MEI MN10300/AM33 PORT
|
||||
P: David Howells
|
||||
M: dhowells@redhat.com
|
||||
|
@ -2744,6 +2774,8 @@ S: Maintained
|
|||
NETEFFECT IWARP RNIC DRIVER (IW_NES)
|
||||
P: Faisal Latif
|
||||
M: flatif@neteffect.com
|
||||
P: Nishi Gupta
|
||||
M: ngupta@neteffect.com
|
||||
P: Glenn Streiff
|
||||
M: gstreiff@neteffect.com
|
||||
L: general@lists.openfabrics.org
|
||||
|
@ -3884,10 +3916,13 @@ M: trivial@kernel.org
|
|||
L: linux-kernel@vger.kernel.org
|
||||
S: Maintained
|
||||
|
||||
TULIP NETWORK DRIVER
|
||||
L: tulip-users@lists.sourceforge.net
|
||||
W: http://sourceforge.net/projects/tulip/
|
||||
S: Orphan
|
||||
TULIP NETWORK DRIVERS
|
||||
P: Grant Grundler
|
||||
M: grundler@parisc-linux.org
|
||||
P: Kyle McMartin
|
||||
M: kyle@parisc-linux.org
|
||||
L: netdev@vger.kernel.org
|
||||
S: Maintained
|
||||
|
||||
TUN/TAP driver
|
||||
P: Maxim Krasnyansky
|
||||
|
|
2
Makefile
2
Makefile
|
@ -1,7 +1,7 @@
|
|||
VERSION = 2
|
||||
PATCHLEVEL = 6
|
||||
SUBLEVEL = 25
|
||||
EXTRAVERSION = -rc3
|
||||
EXTRAVERSION = -rc4
|
||||
NAME = Funky Weasel is Jiggy wit it
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
|
|
@ -27,5 +27,12 @@ config KPROBES
|
|||
for kernel debugging, non-intrusive instrumentation and testing.
|
||||
If in doubt, say "N".
|
||||
|
||||
config KRETPROBES
|
||||
def_bool y
|
||||
depends on KPROBES && HAVE_KRETPROBES
|
||||
|
||||
config HAVE_KPROBES
|
||||
def_bool n
|
||||
|
||||
config HAVE_KRETPROBES
|
||||
def_bool n
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
#endif
|
||||
|
||||
#define DEBUG_NODIRECT 0
|
||||
#define DEBUG_FORCEDAC 0
|
||||
|
||||
#define ISA_DMA_MASK 0x00ffffff
|
||||
|
||||
|
@ -126,39 +125,67 @@ iommu_arena_new(struct pci_controller *hose, dma_addr_t base,
|
|||
return iommu_arena_new_node(0, hose, base, window_size, align);
|
||||
}
|
||||
|
||||
static inline int is_span_boundary(unsigned int index, unsigned int nr,
|
||||
unsigned long shift,
|
||||
unsigned long boundary_size)
|
||||
{
|
||||
shift = (shift + index) & (boundary_size - 1);
|
||||
return shift + nr > boundary_size;
|
||||
}
|
||||
|
||||
/* Must be called with the arena lock held */
|
||||
static long
|
||||
iommu_arena_find_pages(struct pci_iommu_arena *arena, long n, long mask)
|
||||
iommu_arena_find_pages(struct device *dev, struct pci_iommu_arena *arena,
|
||||
long n, long mask)
|
||||
{
|
||||
unsigned long *ptes;
|
||||
long i, p, nent;
|
||||
int pass = 0;
|
||||
unsigned long base;
|
||||
unsigned long boundary_size;
|
||||
|
||||
BUG_ON(arena->dma_base & ~PAGE_MASK);
|
||||
base = arena->dma_base >> PAGE_SHIFT;
|
||||
if (dev)
|
||||
boundary_size = ALIGN(dma_get_max_seg_size(dev) + 1, PAGE_SIZE)
|
||||
>> PAGE_SHIFT;
|
||||
else
|
||||
boundary_size = ALIGN(1UL << 32, PAGE_SIZE) >> PAGE_SHIFT;
|
||||
|
||||
BUG_ON(!is_power_of_2(boundary_size));
|
||||
|
||||
/* Search forward for the first mask-aligned sequence of N free ptes */
|
||||
ptes = arena->ptes;
|
||||
nent = arena->size >> PAGE_SHIFT;
|
||||
p = (arena->next_entry + mask) & ~mask;
|
||||
p = ALIGN(arena->next_entry, mask + 1);
|
||||
i = 0;
|
||||
|
||||
again:
|
||||
while (i < n && p+i < nent) {
|
||||
if (!i && is_span_boundary(p, n, base, boundary_size)) {
|
||||
p = ALIGN(p + 1, mask + 1);
|
||||
goto again;
|
||||
}
|
||||
|
||||
if (ptes[p+i])
|
||||
p = (p + i + 1 + mask) & ~mask, i = 0;
|
||||
p = ALIGN(p + i + 1, mask + 1), i = 0;
|
||||
else
|
||||
i = i + 1;
|
||||
}
|
||||
|
||||
if (i < n) {
|
||||
/* Reached the end. Flush the TLB and restart the
|
||||
search from the beginning. */
|
||||
if (pass < 1) {
|
||||
/*
|
||||
* Reached the end. Flush the TLB and restart
|
||||
* the search from the beginning.
|
||||
*/
|
||||
alpha_mv.mv_pci_tbi(arena->hose, 0, -1);
|
||||
|
||||
p = 0, i = 0;
|
||||
while (i < n && p+i < nent) {
|
||||
if (ptes[p+i])
|
||||
p = (p + i + 1 + mask) & ~mask, i = 0;
|
||||
else
|
||||
i = i + 1;
|
||||
}
|
||||
|
||||
if (i < n)
|
||||
pass++;
|
||||
p = 0;
|
||||
i = 0;
|
||||
goto again;
|
||||
} else
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -168,7 +195,8 @@ iommu_arena_find_pages(struct pci_iommu_arena *arena, long n, long mask)
|
|||
}
|
||||
|
||||
static long
|
||||
iommu_arena_alloc(struct pci_iommu_arena *arena, long n, unsigned int align)
|
||||
iommu_arena_alloc(struct device *dev, struct pci_iommu_arena *arena, long n,
|
||||
unsigned int align)
|
||||
{
|
||||
unsigned long flags;
|
||||
unsigned long *ptes;
|
||||
|
@ -179,7 +207,7 @@ iommu_arena_alloc(struct pci_iommu_arena *arena, long n, unsigned int align)
|
|||
/* Search for N empty ptes */
|
||||
ptes = arena->ptes;
|
||||
mask = max(align, arena->align_entry) - 1;
|
||||
p = iommu_arena_find_pages(arena, n, mask);
|
||||
p = iommu_arena_find_pages(dev, arena, n, mask);
|
||||
if (p < 0) {
|
||||
spin_unlock_irqrestore(&arena->lock, flags);
|
||||
return -1;
|
||||
|
@ -229,6 +257,7 @@ pci_map_single_1(struct pci_dev *pdev, void *cpu_addr, size_t size,
|
|||
unsigned long paddr;
|
||||
dma_addr_t ret;
|
||||
unsigned int align = 0;
|
||||
struct device *dev = pdev ? &pdev->dev : NULL;
|
||||
|
||||
paddr = __pa(cpu_addr);
|
||||
|
||||
|
@ -276,7 +305,7 @@ pci_map_single_1(struct pci_dev *pdev, void *cpu_addr, size_t size,
|
|||
/* Force allocation to 64KB boundary for ISA bridges. */
|
||||
if (pdev && pdev == isa_bridge)
|
||||
align = 8;
|
||||
dma_ofs = iommu_arena_alloc(arena, npages, align);
|
||||
dma_ofs = iommu_arena_alloc(dev, arena, npages, align);
|
||||
if (dma_ofs < 0) {
|
||||
printk(KERN_WARNING "pci_map_single failed: "
|
||||
"could not allocate dma page tables\n");
|
||||
|
@ -563,7 +592,7 @@ sg_fill(struct device *dev, struct scatterlist *leader, struct scatterlist *end,
|
|||
|
||||
paddr &= ~PAGE_MASK;
|
||||
npages = calc_npages(paddr + size);
|
||||
dma_ofs = iommu_arena_alloc(arena, npages, 0);
|
||||
dma_ofs = iommu_arena_alloc(dev, arena, npages, 0);
|
||||
if (dma_ofs < 0) {
|
||||
/* If we attempted a direct map above but failed, die. */
|
||||
if (leader->dma_address == 0)
|
||||
|
@ -830,7 +859,7 @@ iommu_reserve(struct pci_iommu_arena *arena, long pg_count, long align_mask)
|
|||
|
||||
/* Search for N empty ptes. */
|
||||
ptes = arena->ptes;
|
||||
p = iommu_arena_find_pages(arena, pg_count, align_mask);
|
||||
p = iommu_arena_find_pages(NULL, arena, pg_count, align_mask);
|
||||
if (p < 0) {
|
||||
spin_unlock_irqrestore(&arena->lock, flags);
|
||||
return -1;
|
||||
|
|
|
@ -12,6 +12,7 @@ config ARM
|
|||
select SYS_SUPPORTS_APM_EMULATION
|
||||
select HAVE_OPROFILE
|
||||
select HAVE_KPROBES if (!XIP_KERNEL)
|
||||
select HAVE_KRETPROBES if (HAVE_KPROBES)
|
||||
help
|
||||
The ARM series is a line of low-power-consumption RISC chip designs
|
||||
licensed by ARM Ltd and targeted at embedded applications and
|
||||
|
@ -939,7 +940,8 @@ config KEXEC
|
|||
|
||||
config ATAGS_PROC
|
||||
bool "Export atags in procfs"
|
||||
default n
|
||||
depends on KEXEC
|
||||
default y
|
||||
help
|
||||
Should the atags used to boot the kernel be exported in an "atags"
|
||||
file in procfs. Useful with kexec.
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
|
||||
#ifdef DEBUG
|
||||
static unsigned int freq_debug;
|
||||
MODULE_PARM(freq_debug, "i");
|
||||
module_param(freq_debug, uint, 0);
|
||||
MODULE_PARM_DESC(freq_debug, "Set the debug messages to on=1/off=0");
|
||||
#else
|
||||
#define freq_debug 0
|
||||
|
|
|
@ -129,28 +129,20 @@ static void clk_pxa3xx_cken_enable(struct clk *clk)
|
|||
{
|
||||
unsigned long mask = 1ul << (clk->cken & 0x1f);
|
||||
|
||||
local_irq_disable();
|
||||
|
||||
if (clk->cken < 32)
|
||||
CKENA |= mask;
|
||||
else
|
||||
CKENB |= mask;
|
||||
|
||||
local_irq_enable();
|
||||
}
|
||||
|
||||
static void clk_pxa3xx_cken_disable(struct clk *clk)
|
||||
{
|
||||
unsigned long mask = 1ul << (clk->cken & 0x1f);
|
||||
|
||||
local_irq_disable();
|
||||
|
||||
if (clk->cken < 32)
|
||||
CKENA &= ~mask;
|
||||
else
|
||||
CKENB &= ~mask;
|
||||
|
||||
local_irq_enable();
|
||||
}
|
||||
|
||||
static const struct clkops clk_pxa3xx_cken_ops = {
|
||||
|
|
|
@ -58,7 +58,7 @@ static struct platform_device smc91x_device = {
|
|||
.resource = smc91x_resources,
|
||||
};
|
||||
|
||||
#if defined(CONFIG_FB_PXA) || (CONFIG_FB_PXA_MODULES)
|
||||
#if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE)
|
||||
static void zylonite_backlight_power(int on)
|
||||
{
|
||||
gpio_set_value(gpio_backlight, on);
|
||||
|
|
|
@ -120,6 +120,8 @@ full_search:
|
|||
*/
|
||||
int valid_phys_addr_range(unsigned long addr, size_t size)
|
||||
{
|
||||
if (addr < PHYS_OFFSET)
|
||||
return 0;
|
||||
if (addr + size > __pa(high_memory))
|
||||
return 0;
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ no_pgd:
|
|||
void free_pgd_slow(struct mm_struct *mm, pgd_t *pgd)
|
||||
{
|
||||
pmd_t *pmd;
|
||||
struct page *pte;
|
||||
pgtable_t pte;
|
||||
|
||||
if (!pgd)
|
||||
return;
|
||||
|
@ -90,10 +90,8 @@ void free_pgd_slow(struct mm_struct *mm, pgd_t *pgd)
|
|||
goto free;
|
||||
}
|
||||
|
||||
pte = pmd_page(*pmd);
|
||||
pte = pmd_pgtable(*pmd);
|
||||
pmd_clear(pmd);
|
||||
dec_zone_page_state(virt_to_page((unsigned long *)pgd), NR_PAGETABLE);
|
||||
pte_lock_deinit(pte);
|
||||
pte_free(mm, pte);
|
||||
pmd_free(mm, pmd);
|
||||
free:
|
||||
|
|
|
@ -129,7 +129,7 @@ static int __init atstk1004_init(void)
|
|||
#ifdef CONFIG_BOARD_ATSTK100X_SPI1
|
||||
at32_add_device_spi(1, spi1_board_info, ARRAY_SIZE(spi1_board_info));
|
||||
#endif
|
||||
#ifndef CONFIG_BOARD_ATSTK1002_SW2_CUSTOM
|
||||
#ifndef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM
|
||||
at32_add_device_mci(0);
|
||||
#endif
|
||||
at32_add_device_lcdc(0, &atstk1000_lcdc_data,
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include <linux/fs.h>
|
||||
#include <linux/ptrace.h>
|
||||
#include <linux/reboot.h>
|
||||
#include <linux/tick.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/unistd.h>
|
||||
|
||||
|
@ -30,8 +31,10 @@ void cpu_idle(void)
|
|||
{
|
||||
/* endless idle loop with no priority at all */
|
||||
while (1) {
|
||||
tick_nohz_stop_sched_tick();
|
||||
while (!need_resched())
|
||||
cpu_idle_sleep();
|
||||
tick_nohz_restart_sched_tick();
|
||||
preempt_enable_no_resched();
|
||||
schedule();
|
||||
preempt_disable();
|
||||
|
@ -345,6 +348,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
|
|||
p->thread.cpu_context.ksp = (unsigned long)childregs;
|
||||
p->thread.cpu_context.pc = (unsigned long)ret_from_fork;
|
||||
|
||||
clear_tsk_thread_flag(p, TIF_DEBUG);
|
||||
if ((clone_flags & CLONE_PTRACE) && test_thread_flag(TIF_DEBUG))
|
||||
ocd_enable(p);
|
||||
|
||||
|
|
|
@ -189,6 +189,8 @@ no_context:
|
|||
|
||||
page = sysreg_read(PTBR);
|
||||
printk(KERN_ALERT "ptbr = %08lx", page);
|
||||
if (address >= TASK_SIZE)
|
||||
page = (unsigned long)swapper_pg_dir;
|
||||
if (page) {
|
||||
page = ((unsigned long *)page)[address >> 22];
|
||||
printk(" pgd = %08lx", page);
|
||||
|
|
|
@ -98,8 +98,11 @@ drivers-$(CONFIG_OPROFILE) += arch/$(ARCH)/oprofile/
|
|||
# them changed. We use .mach to indicate when they were updated
|
||||
# last, otherwise make uses the target directory mtime.
|
||||
|
||||
show_mach_symlink = :
|
||||
quiet_show_mach_symlink = echo ' SYMLINK include/asm-$(ARCH)/mach-$(MACHINE) -> include/asm-$(ARCH)/mach'
|
||||
silent_show_mach_symlink = :
|
||||
include/asm-blackfin/.mach: $(wildcard include/config/arch/*.h) include/config/auto.conf
|
||||
@echo ' SYMLINK include/asm-$(ARCH)/mach-$(MACHINE) -> include/asm-$(ARCH)/mach'
|
||||
@$($(quiet)show_mach_symlink)
|
||||
ifneq ($(KBUILD_SRC),)
|
||||
$(Q)mkdir -p include/asm-$(ARCH)
|
||||
$(Q)ln -fsn $(srctree)/include/asm-$(ARCH)/mach-$(MACHINE) include/asm-$(ARCH)/mach
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#
|
||||
# Automatically generated make config: don't edit
|
||||
# Linux kernel version: 2.6.22.14
|
||||
# Thu Nov 29 17:32:47 2007
|
||||
# Linux kernel version: 2.6.22.16
|
||||
#
|
||||
# CONFIG_MMU is not set
|
||||
# CONFIG_FPU is not set
|
||||
|
@ -116,7 +115,10 @@ CONFIG_PREEMPT_VOLUNTARY=y
|
|||
# Processor and Board Settings
|
||||
#
|
||||
# CONFIG_BF522 is not set
|
||||
# CONFIG_BF523 is not set
|
||||
# CONFIG_BF524 is not set
|
||||
# CONFIG_BF525 is not set
|
||||
# CONFIG_BF526 is not set
|
||||
CONFIG_BF527=y
|
||||
# CONFIG_BF531 is not set
|
||||
# CONFIG_BF532 is not set
|
||||
|
@ -306,6 +308,7 @@ CONFIG_BFIN_DCACHE=y
|
|||
# CONFIG_BFIN_WB is not set
|
||||
CONFIG_BFIN_WT=y
|
||||
CONFIG_L1_MAX_PIECE=16
|
||||
# CONFIG_MPU is not set
|
||||
|
||||
#
|
||||
# Asynchonous Memory Configuration
|
||||
|
@ -354,6 +357,7 @@ CONFIG_BINFMT_ZFLAT=y
|
|||
# Power management options
|
||||
#
|
||||
# CONFIG_PM is not set
|
||||
# CONFIG_PM_WAKEUP_BY_GPIO is not set
|
||||
|
||||
#
|
||||
# Networking
|
||||
|
@ -496,7 +500,6 @@ CONFIG_MTD_CFI_I2=y
|
|||
# CONFIG_MTD_CFI_INTELEXT is not set
|
||||
# CONFIG_MTD_CFI_AMDSTD is not set
|
||||
# CONFIG_MTD_CFI_STAA is not set
|
||||
CONFIG_MTD_MW320D=m
|
||||
CONFIG_MTD_RAM=y
|
||||
CONFIG_MTD_ROM=m
|
||||
# CONFIG_MTD_ABSENT is not set
|
||||
|
@ -506,9 +509,6 @@ CONFIG_MTD_ROM=m
|
|||
#
|
||||
CONFIG_MTD_COMPLEX_MAPPINGS=y
|
||||
# CONFIG_MTD_PHYSMAP is not set
|
||||
CONFIG_MTD_BF5xx=m
|
||||
CONFIG_BFIN_FLASH_SIZE=0x400000
|
||||
CONFIG_EBIU_FLASH_BASE=0x20000000
|
||||
# CONFIG_MTD_UCLINUX is not set
|
||||
# CONFIG_MTD_PLATRAM is not set
|
||||
|
||||
|
@ -684,7 +684,6 @@ CONFIG_INPUT_MISC=y
|
|||
# CONFIG_INPUT_POWERMATE is not set
|
||||
# CONFIG_INPUT_YEALINK is not set
|
||||
# CONFIG_INPUT_UINPUT is not set
|
||||
# CONFIG_BF53X_PFBUTTONS is not set
|
||||
# CONFIG_TWI_KEYPAD is not set
|
||||
|
||||
#
|
||||
|
@ -702,12 +701,12 @@ CONFIG_INPUT_MISC=y
|
|||
# CONFIG_BF5xx_PPIFCD is not set
|
||||
# CONFIG_BFIN_SIMPLE_TIMER is not set
|
||||
# CONFIG_BF5xx_PPI is not set
|
||||
CONFIG_BFIN_OTP=y
|
||||
# CONFIG_BFIN_OTP_WRITE_ENABLE is not set
|
||||
# CONFIG_BFIN_SPORT is not set
|
||||
# CONFIG_BFIN_TIMER_LATENCY is not set
|
||||
# CONFIG_TWI_LCD is not set
|
||||
# CONFIG_AD5304 is not set
|
||||
# CONFIG_BF5xx_TEA5764 is not set
|
||||
# CONFIG_BF5xx_FBDMA is not set
|
||||
# CONFIG_VT is not set
|
||||
# CONFIG_SERIAL_NONSTANDARD is not set
|
||||
|
||||
|
@ -772,7 +771,6 @@ CONFIG_I2C_CHARDEV=m
|
|||
#
|
||||
# I2C Hardware Bus support
|
||||
#
|
||||
# CONFIG_I2C_BLACKFIN_GPIO is not set
|
||||
CONFIG_I2C_BLACKFIN_TWI=m
|
||||
CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ=50
|
||||
# CONFIG_I2C_GPIO is not set
|
||||
|
|
|
@ -322,10 +322,9 @@ CONFIG_PM=y
|
|||
# CONFIG_PM_LEGACY is not set
|
||||
# CONFIG_PM_DEBUG is not set
|
||||
# CONFIG_PM_SYSFS_DEPRECATED is not set
|
||||
CONFIG_PM_WAKEUP_GPIO_BY_SIC_IWR=y
|
||||
CONFIG_PM_BFIN_SLEEP_DEEPER=y
|
||||
# CONFIG_PM_BFIN_SLEEP is not set
|
||||
# CONFIG_PM_WAKEUP_BY_GPIO is not set
|
||||
# CONFIG_PM_WAKEUP_GPIO_API is not set
|
||||
CONFIG_PM_WAKEUP_SIC_IWR=0x80
|
||||
|
||||
#
|
||||
# CPU Frequency scaling
|
||||
|
@ -697,7 +696,6 @@ CONFIG_SERIAL_BFIN_DMA=y
|
|||
# CONFIG_SERIAL_BFIN_PIO is not set
|
||||
CONFIG_SERIAL_BFIN_UART0=y
|
||||
# CONFIG_BFIN_UART0_CTSRTS is not set
|
||||
# CONFIG_SERIAL_BFIN_UART1 is not set
|
||||
CONFIG_SERIAL_CORE=y
|
||||
CONFIG_SERIAL_CORE_CONSOLE=y
|
||||
# CONFIG_SERIAL_BFIN_SPORT is not set
|
||||
|
|
|
@ -323,10 +323,9 @@ CONFIG_PM=y
|
|||
# CONFIG_PM_LEGACY is not set
|
||||
# CONFIG_PM_DEBUG is not set
|
||||
# CONFIG_PM_SYSFS_DEPRECATED is not set
|
||||
CONFIG_PM_WAKEUP_GPIO_BY_SIC_IWR=y
|
||||
CONFIG_PM_BFIN_SLEEP_DEEPER=y
|
||||
# CONFIG_PM_BFIN_SLEEP is not set
|
||||
# CONFIG_PM_WAKEUP_BY_GPIO is not set
|
||||
# CONFIG_PM_WAKEUP_GPIO_API is not set
|
||||
CONFIG_PM_WAKEUP_SIC_IWR=0x80
|
||||
|
||||
#
|
||||
# CPU Frequency scaling
|
||||
|
@ -714,7 +713,6 @@ CONFIG_SERIAL_BFIN_DMA=y
|
|||
# CONFIG_SERIAL_BFIN_PIO is not set
|
||||
CONFIG_SERIAL_BFIN_UART0=y
|
||||
# CONFIG_BFIN_UART0_CTSRTS is not set
|
||||
# CONFIG_SERIAL_BFIN_UART1 is not set
|
||||
CONFIG_SERIAL_CORE=y
|
||||
CONFIG_SERIAL_CORE_CONSOLE=y
|
||||
# CONFIG_SERIAL_BFIN_SPORT is not set
|
||||
|
|
|
@ -330,10 +330,9 @@ CONFIG_PM=y
|
|||
# CONFIG_PM_LEGACY is not set
|
||||
# CONFIG_PM_DEBUG is not set
|
||||
# CONFIG_PM_SYSFS_DEPRECATED is not set
|
||||
CONFIG_PM_WAKEUP_GPIO_BY_SIC_IWR=y
|
||||
CONFIG_PM_BFIN_SLEEP_DEEPER=y
|
||||
# CONFIG_PM_BFIN_SLEEP is not set
|
||||
# CONFIG_PM_WAKEUP_BY_GPIO is not set
|
||||
# CONFIG_PM_WAKEUP_GPIO_API is not set
|
||||
CONFIG_PM_WAKEUP_SIC_IWR=0x8
|
||||
|
||||
#
|
||||
# CPU Frequency scaling
|
||||
|
@ -1013,6 +1012,7 @@ CONFIG_SND_BFIN_AD73311_SE=4
|
|||
CONFIG_SND_SOC_AC97_BUS=y
|
||||
CONFIG_SND_SOC=m
|
||||
CONFIG_SND_BF5XX_SOC=m
|
||||
CONFIG_SND_MMAP_SUPPORT=y
|
||||
CONFIG_SND_BF5XX_SOC_AC97=m
|
||||
# CONFIG_SND_BF5XX_SOC_WM8750 is not set
|
||||
# CONFIG_SND_BF5XX_SOC_WM8731 is not set
|
||||
|
|
|
@ -396,6 +396,7 @@ CONFIG_BINFMT_ZFLAT=y
|
|||
# Power management options
|
||||
#
|
||||
# CONFIG_PM is not set
|
||||
# CONFIG_PM_WAKEUP_BY_GPIO is not set
|
||||
|
||||
#
|
||||
# CPU Frequency scaling
|
||||
|
@ -1075,6 +1076,7 @@ CONFIG_SND_VERBOSE_PROCFS=y
|
|||
CONFIG_SND_SOC_AC97_BUS=y
|
||||
CONFIG_SND_SOC=y
|
||||
CONFIG_SND_BF5XX_SOC=y
|
||||
CONFIG_SND_MMAP_SUPPORT=y
|
||||
CONFIG_SND_BF5XX_SOC_AC97=y
|
||||
CONFIG_SND_BF5XX_SOC_BF548_EZKIT=y
|
||||
# CONFIG_SND_BF5XX_SOC_WM8750 is not set
|
||||
|
|
|
@ -367,6 +367,7 @@ CONFIG_BINFMT_ZFLAT=y
|
|||
# Power management options
|
||||
#
|
||||
# CONFIG_PM is not set
|
||||
# CONFIG_PM_WAKEUP_BY_GPIO is not set
|
||||
|
||||
#
|
||||
# Networking
|
||||
|
|
|
@ -105,13 +105,14 @@ int request_dma(unsigned int channel, char *device_id)
|
|||
mutex_unlock(&(dma_ch[channel].dmalock));
|
||||
|
||||
#ifdef CONFIG_BF54x
|
||||
if (channel >= CH_UART2_RX && channel <= CH_UART3_TX &&
|
||||
strncmp(device_id, "BFIN_UART", 9) == 0)
|
||||
if (channel >= CH_UART2_RX && channel <= CH_UART3_TX) {
|
||||
if (strncmp(device_id, "BFIN_UART", 9) == 0)
|
||||
dma_ch[channel].regs->peripheral_map |=
|
||||
(channel - CH_UART2_RX + 0xC);
|
||||
else
|
||||
dma_ch[channel].regs->peripheral_map |=
|
||||
(channel - CH_UART2_RX + 0x6);
|
||||
}
|
||||
#endif
|
||||
|
||||
dma_ch[channel].device_id = device_id;
|
||||
|
|
|
@ -101,9 +101,9 @@ ENDPROC (_atomic_ior32)
|
|||
|
||||
.align 16
|
||||
/*
|
||||
* Atomic ior, 32 bit.
|
||||
* Atomic and, 32 bit.
|
||||
* Inputs: P0: memory address to use
|
||||
* R0: value to ior
|
||||
* R0: value to and
|
||||
* Outputs: R0: new contents of the memory address.
|
||||
* R1: previous contents of the memory address.
|
||||
*/
|
||||
|
@ -112,13 +112,13 @@ ENTRY(_atomic_and32)
|
|||
R0 = R1 & R0;
|
||||
[P0] = R0;
|
||||
rts;
|
||||
ENDPROC (_atomic_ior32)
|
||||
ENDPROC (_atomic_and32)
|
||||
|
||||
.align 16
|
||||
/*
|
||||
* Atomic ior, 32 bit.
|
||||
* Atomic xor, 32 bit.
|
||||
* Inputs: P0: memory address to use
|
||||
* R0: value to ior
|
||||
* R0: value to xor
|
||||
* Outputs: R0: new contents of the memory address.
|
||||
* R1: previous contents of the memory address.
|
||||
*/
|
||||
|
@ -127,7 +127,7 @@ ENTRY(_atomic_xor32)
|
|||
R0 = R1 ^ R0;
|
||||
[P0] = R0;
|
||||
rts;
|
||||
ENDPROC (_atomic_ior32)
|
||||
ENDPROC (_atomic_xor32)
|
||||
|
||||
.align 16
|
||||
/*
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* bfin_gptimers.c - derived from bf53x_timers.c
|
||||
* Driver for General Purpose Timer functions on the Blackfin processor
|
||||
* gptimers.c - Blackfin General Purpose Timer core API
|
||||
*
|
||||
* Copyright (c) 2005-2008 Analog Devices Inc.
|
||||
* Copyright (C) 2005 John DeHority
|
||||
* Copyright (C) 2006 Hella Aglaia GmbH (awe@aglaia-gmbh.de)
|
||||
*
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
static DEFINE_PER_CPU(struct cpu, cpu_devices);
|
||||
|
||||
u16 _bfin_swrst;
|
||||
EXPORT_SYMBOL(_bfin_swrst);
|
||||
|
||||
unsigned long memory_start, memory_end, physical_mem_end;
|
||||
unsigned long reserved_mem_dcache_on;
|
||||
|
@ -514,6 +515,7 @@ static __init void memory_setup(void)
|
|||
printk(KERN_INFO "Kernel Managed Memory: %ldMB\n", _ramend >> 20);
|
||||
|
||||
printk(KERN_INFO "Memory map:\n"
|
||||
KERN_INFO " fixedcode = 0x%p-0x%p\n"
|
||||
KERN_INFO " text = 0x%p-0x%p\n"
|
||||
KERN_INFO " rodata = 0x%p-0x%p\n"
|
||||
KERN_INFO " bss = 0x%p-0x%p\n"
|
||||
|
@ -527,7 +529,8 @@ static __init void memory_setup(void)
|
|||
#if DMA_UNCACHED_REGION > 0
|
||||
KERN_INFO " DMA Zone = 0x%p-0x%p\n"
|
||||
#endif
|
||||
, _stext, _etext,
|
||||
, (void *)FIXED_CODE_START, (void *)FIXED_CODE_END,
|
||||
_stext, _etext,
|
||||
__start_rodata, __end_rodata,
|
||||
__bss_start, __bss_stop,
|
||||
_sdata, _edata,
|
||||
|
|
|
@ -147,44 +147,64 @@ SECTIONS
|
|||
|
||||
__l1_lma_start = .;
|
||||
|
||||
#if L1_CODE_LENGTH
|
||||
# define LDS_L1_CODE *(.l1.text)
|
||||
#else
|
||||
# define LDS_L1_CODE
|
||||
#endif
|
||||
.text_l1 L1_CODE_START : AT(LOADADDR(.init.ramfs) + SIZEOF(.init.ramfs))
|
||||
{
|
||||
. = ALIGN(4);
|
||||
__stext_l1 = .;
|
||||
*(.l1.text)
|
||||
|
||||
LDS_L1_CODE
|
||||
. = ALIGN(4);
|
||||
__etext_l1 = .;
|
||||
}
|
||||
|
||||
#if L1_DATA_A_LENGTH
|
||||
# define LDS_L1_A_DATA *(.l1.data)
|
||||
# define LDS_L1_A_BSS *(.l1.bss)
|
||||
# define LDS_L1_A_CACHE *(.data_l1.cacheline_aligned)
|
||||
#else
|
||||
# define LDS_L1_A_DATA
|
||||
# define LDS_L1_A_BSS
|
||||
# define LDS_L1_A_CACHE
|
||||
#endif
|
||||
.data_l1 L1_DATA_A_START : AT(LOADADDR(.text_l1) + SIZEOF(.text_l1))
|
||||
{
|
||||
. = ALIGN(4);
|
||||
__sdata_l1 = .;
|
||||
*(.l1.data)
|
||||
LDS_L1_A_DATA
|
||||
__edata_l1 = .;
|
||||
|
||||
. = ALIGN(4);
|
||||
__sbss_l1 = .;
|
||||
*(.l1.bss)
|
||||
LDS_L1_A_BSS
|
||||
|
||||
. = ALIGN(32);
|
||||
*(.data_l1.cacheline_aligned)
|
||||
LDS_L1_A_CACHE
|
||||
|
||||
. = ALIGN(4);
|
||||
__ebss_l1 = .;
|
||||
}
|
||||
|
||||
#if L1_DATA_B_LENGTH
|
||||
# define LDS_L1_B_DATA *(.l1.data.B)
|
||||
# define LDS_L1_B_BSS *(.l1.bss.B)
|
||||
#else
|
||||
# define LDS_L1_B_DATA
|
||||
# define LDS_L1_B_BSS
|
||||
#endif
|
||||
.data_b_l1 L1_DATA_B_START : AT(LOADADDR(.data_l1) + SIZEOF(.data_l1))
|
||||
{
|
||||
. = ALIGN(4);
|
||||
__sdata_b_l1 = .;
|
||||
*(.l1.data.B)
|
||||
LDS_L1_B_DATA
|
||||
__edata_b_l1 = .;
|
||||
|
||||
. = ALIGN(4);
|
||||
__sbss_b_l1 = .;
|
||||
*(.l1.bss.B)
|
||||
LDS_L1_B_BSS
|
||||
|
||||
. = ALIGN(4);
|
||||
__ebss_b_l1 = .;
|
||||
|
|
|
@ -180,8 +180,8 @@ static struct mtd_partition partition_info[] = {
|
|||
},
|
||||
{
|
||||
.name = "File System",
|
||||
.offset = 4 * SIZE_1M,
|
||||
.size = (256 - 4) * SIZE_1M,
|
||||
.offset = MTDPART_OFS_APPEND,
|
||||
.size = MTDPART_SIZ_FULL,
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -422,11 +422,11 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
|
|||
}, {
|
||||
.name = "kernel",
|
||||
.size = 0xe0000,
|
||||
.offset = 0x20000
|
||||
.offset = MTDPART_OFS_APPEND,
|
||||
}, {
|
||||
.name = "file system",
|
||||
.size = 0x700000,
|
||||
.offset = 0x00100000,
|
||||
.size = MTDPART_SIZ_FULL,
|
||||
.offset = MTDPART_OFS_APPEND,
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -484,13 +484,6 @@ static struct bfin5xx_spi_chip spi_si3xxx_chip_info = {
|
|||
};
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_AD5304) || defined(CONFIG_AD5304_MODULE)
|
||||
static struct bfin5xx_spi_chip ad5304_chip_info = {
|
||||
.enable_dma = 0,
|
||||
.bits_per_word = 16,
|
||||
};
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
|
||||
static struct bfin5xx_spi_chip spi_ad7877_chip_info = {
|
||||
.enable_dma = 0,
|
||||
|
@ -611,17 +604,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
|
|||
.mode = SPI_MODE_3,
|
||||
},
|
||||
#endif
|
||||
#if defined(CONFIG_AD5304) || defined(CONFIG_AD5304_MODULE)
|
||||
{
|
||||
.modalias = "ad5304_spi",
|
||||
.max_speed_hz = 1250000, /* max spi clock (SCK) speed in HZ */
|
||||
.bus_num = 0,
|
||||
.chip_select = 2,
|
||||
.platform_data = NULL,
|
||||
.controller_data = &ad5304_chip_info,
|
||||
.mode = SPI_MODE_2,
|
||||
},
|
||||
#endif
|
||||
#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
|
||||
{
|
||||
.modalias = "ad7877",
|
||||
|
@ -818,6 +800,19 @@ static struct platform_device bfin_device_gpiokeys = {
|
|||
};
|
||||
#endif
|
||||
|
||||
static struct resource bfin_gpios_resources = {
|
||||
.start = 0,
|
||||
.end = MAX_BLACKFIN_GPIOS - 1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
};
|
||||
|
||||
static struct platform_device bfin_gpios_device = {
|
||||
.name = "simple-gpio",
|
||||
.id = -1,
|
||||
.num_resources = 1,
|
||||
.resource = &bfin_gpios_resources,
|
||||
};
|
||||
|
||||
static struct platform_device *stamp_devices[] __initdata = {
|
||||
#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
|
||||
&bf5xx_nand_device,
|
||||
|
@ -895,6 +890,8 @@ static struct platform_device *stamp_devices[] __initdata = {
|
|||
#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
|
||||
&bfin_device_gpiokeys,
|
||||
#endif
|
||||
|
||||
&bfin_gpios_device,
|
||||
};
|
||||
|
||||
static int __init stamp_init(void)
|
||||
|
@ -921,13 +918,18 @@ void native_machine_restart(char *cmd)
|
|||
bfin_gpio_reset_spi0_ssel1();
|
||||
}
|
||||
|
||||
/*
|
||||
* Currently the MAC address is saved in Flash by U-Boot
|
||||
*/
|
||||
#define FLASH_MAC 0x203f0000
|
||||
void bfin_get_ether_addr(char *addr)
|
||||
{
|
||||
*(u32 *)(&(addr[0])) = bfin_read32(FLASH_MAC);
|
||||
*(u16 *)(&(addr[4])) = bfin_read16(FLASH_MAC + 4);
|
||||
/* the MAC is stored in OTP memory page 0xDF */
|
||||
u32 ret;
|
||||
u64 otp_mac;
|
||||
u32 (*otp_read)(u32 page, u32 flags, u64 *page_content) = (void *)0xEF00001A;
|
||||
|
||||
ret = otp_read(0xDF, 0x00, &otp_mac);
|
||||
if (!(ret & 0x1)) {
|
||||
char *otp_mac_p = (char *)&otp_mac;
|
||||
for (ret = 0; ret < 6; ++ret)
|
||||
addr[ret] = otp_mac_p[5 - ret];
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(bfin_get_ether_addr);
|
||||
|
|
|
@ -99,11 +99,11 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
|
|||
}, {
|
||||
.name = "kernel",
|
||||
.size = 0xe0000,
|
||||
.offset = 0x20000
|
||||
.offset = MTDPART_OFS_APPEND,
|
||||
}, {
|
||||
.name = "file system",
|
||||
.size = 0x700000,
|
||||
.offset = 0x00100000,
|
||||
.size = MTDPART_SIZ_FULL,
|
||||
.offset = MTDPART_OFS_APPEND,
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -298,6 +298,19 @@ static struct platform_device bfin_device_gpiokeys = {
|
|||
};
|
||||
#endif
|
||||
|
||||
static struct resource bfin_gpios_resources = {
|
||||
.start = 0,
|
||||
.end = MAX_BLACKFIN_GPIOS - 1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
};
|
||||
|
||||
static struct platform_device bfin_gpios_device = {
|
||||
.name = "simple-gpio",
|
||||
.id = -1,
|
||||
.num_resources = 1,
|
||||
.resource = &bfin_gpios_resources,
|
||||
};
|
||||
|
||||
#if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE)
|
||||
#include <linux/i2c-gpio.h>
|
||||
|
||||
|
@ -350,6 +363,8 @@ static struct platform_device *ezkit_devices[] __initdata = {
|
|||
#if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE)
|
||||
&i2c_gpio_device,
|
||||
#endif
|
||||
|
||||
&bfin_gpios_device,
|
||||
};
|
||||
|
||||
static int __init ezkit_init(void)
|
||||
|
|
|
@ -112,7 +112,7 @@ static struct platform_device net2272_bfin_device = {
|
|||
static struct mtd_partition stamp_partitions[] = {
|
||||
{
|
||||
.name = "Bootloader",
|
||||
.size = 0x20000,
|
||||
.size = 0x40000,
|
||||
.offset = 0,
|
||||
}, {
|
||||
.name = "Kernel",
|
||||
|
@ -160,17 +160,17 @@ static struct platform_device stamp_flash_device = {
|
|||
static struct mtd_partition bfin_spi_flash_partitions[] = {
|
||||
{
|
||||
.name = "bootloader",
|
||||
.size = 0x00020000,
|
||||
.size = 0x00040000,
|
||||
.offset = 0,
|
||||
.mask_flags = MTD_CAP_ROM
|
||||
}, {
|
||||
.name = "kernel",
|
||||
.size = 0xe0000,
|
||||
.offset = 0x20000
|
||||
.offset = MTDPART_OFS_APPEND,
|
||||
}, {
|
||||
.name = "file system",
|
||||
.size = 0x700000,
|
||||
.offset = 0x00100000,
|
||||
.size = MTDPART_SIZ_FULL,
|
||||
.offset = MTDPART_OFS_APPEND,
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -212,13 +212,6 @@ static struct bfin5xx_spi_chip spi_si3xxx_chip_info = {
|
|||
};
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_AD5304) || defined(CONFIG_AD5304_MODULE)
|
||||
static struct bfin5xx_spi_chip ad5304_chip_info = {
|
||||
.enable_dma = 0,
|
||||
.bits_per_word = 16,
|
||||
};
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
|
||||
static struct bfin5xx_spi_chip spi_mmc_chip_info = {
|
||||
.enable_dma = 1,
|
||||
|
@ -308,17 +301,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
|
|||
},
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_AD5304) || defined(CONFIG_AD5304_MODULE)
|
||||
{
|
||||
.modalias = "ad5304_spi",
|
||||
.max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
|
||||
.bus_num = 0,
|
||||
.chip_select = 2,
|
||||
.platform_data = NULL,
|
||||
.controller_data = &ad5304_chip_info,
|
||||
.mode = SPI_MODE_2,
|
||||
},
|
||||
#endif
|
||||
#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
|
||||
{
|
||||
.modalias = "spidev",
|
||||
|
@ -457,6 +439,19 @@ static struct platform_device bfin_device_gpiokeys = {
|
|||
};
|
||||
#endif
|
||||
|
||||
static struct resource bfin_gpios_resources = {
|
||||
.start = 0,
|
||||
.end = MAX_BLACKFIN_GPIOS - 1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
};
|
||||
|
||||
static struct platform_device bfin_gpios_device = {
|
||||
.name = "simple-gpio",
|
||||
.id = -1,
|
||||
.num_resources = 1,
|
||||
.resource = &bfin_gpios_resources,
|
||||
};
|
||||
|
||||
#if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE)
|
||||
#include <linux/i2c-gpio.h>
|
||||
|
||||
|
@ -518,6 +513,8 @@ static struct platform_device *stamp_devices[] __initdata = {
|
|||
#if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE)
|
||||
&i2c_gpio_device,
|
||||
#endif
|
||||
|
||||
&bfin_gpios_device,
|
||||
&stamp_flash_device,
|
||||
};
|
||||
|
||||
|
|
|
@ -371,13 +371,6 @@ static struct bfin5xx_spi_chip spi_si3xxx_chip_info = {
|
|||
};
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_AD5304) || defined(CONFIG_AD5304_MODULE)
|
||||
static struct bfin5xx_spi_chip ad5304_chip_info = {
|
||||
.enable_dma = 0,
|
||||
.bits_per_word = 16,
|
||||
};
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
|
||||
static struct bfin5xx_spi_chip spi_ad7877_chip_info = {
|
||||
.enable_dma = 0,
|
||||
|
@ -483,17 +476,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
|
|||
.mode = SPI_MODE_3,
|
||||
},
|
||||
#endif
|
||||
#if defined(CONFIG_AD5304) || defined(CONFIG_AD5304_MODULE)
|
||||
{
|
||||
.modalias = "ad5304_spi",
|
||||
.max_speed_hz = 1250000, /* max spi clock (SCK) speed in HZ */
|
||||
.bus_num = 0,
|
||||
.chip_select = 2,
|
||||
.platform_data = NULL,
|
||||
.controller_data = &ad5304_chip_info,
|
||||
.mode = SPI_MODE_2,
|
||||
},
|
||||
#endif
|
||||
#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
|
||||
{
|
||||
.modalias = "ad7877",
|
||||
|
|
|
@ -128,6 +128,19 @@ static struct platform_device bfin_device_gpiokeys = {
|
|||
};
|
||||
#endif
|
||||
|
||||
static struct resource bfin_gpios_resources = {
|
||||
.start = 0,
|
||||
.end = MAX_BLACKFIN_GPIOS - 1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
};
|
||||
|
||||
static struct platform_device bfin_gpios_device = {
|
||||
.name = "simple-gpio",
|
||||
.id = -1,
|
||||
.num_resources = 1,
|
||||
.resource = &bfin_gpios_resources,
|
||||
};
|
||||
|
||||
#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
|
||||
static struct resource bfin_pcmcia_cf_resources[] = {
|
||||
{
|
||||
|
@ -343,7 +356,7 @@ static struct platform_device net2272_bfin_device = {
|
|||
static struct mtd_partition stamp_partitions[] = {
|
||||
{
|
||||
.name = "Bootloader",
|
||||
.size = 0x20000,
|
||||
.size = 0x40000,
|
||||
.offset = 0,
|
||||
}, {
|
||||
.name = "Kernel",
|
||||
|
@ -351,7 +364,7 @@ static struct mtd_partition stamp_partitions[] = {
|
|||
.offset = MTDPART_OFS_APPEND,
|
||||
}, {
|
||||
.name = "RootFS",
|
||||
.size = 0x400000 - 0x20000 - 0xE0000 - 0x10000,
|
||||
.size = 0x400000 - 0x40000 - 0xE0000 - 0x10000,
|
||||
.offset = MTDPART_OFS_APPEND,
|
||||
}, {
|
||||
.name = "MAC Address",
|
||||
|
@ -391,17 +404,17 @@ static struct platform_device stamp_flash_device = {
|
|||
static struct mtd_partition bfin_spi_flash_partitions[] = {
|
||||
{
|
||||
.name = "bootloader",
|
||||
.size = 0x00020000,
|
||||
.size = 0x00040000,
|
||||
.offset = 0,
|
||||
.mask_flags = MTD_CAP_ROM
|
||||
}, {
|
||||
.name = "kernel",
|
||||
.size = 0xe0000,
|
||||
.offset = 0x20000
|
||||
.offset = MTDPART_OFS_APPEND,
|
||||
}, {
|
||||
.name = "file system",
|
||||
.size = 0x700000,
|
||||
.offset = 0x00100000,
|
||||
.size = MTDPART_SIZ_FULL,
|
||||
.offset = MTDPART_OFS_APPEND,
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -459,13 +472,6 @@ static struct bfin5xx_spi_chip spi_si3xxx_chip_info = {
|
|||
};
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_AD5304) || defined(CONFIG_AD5304_MODULE)
|
||||
static struct bfin5xx_spi_chip ad5304_chip_info = {
|
||||
.enable_dma = 0,
|
||||
.bits_per_word = 16,
|
||||
};
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
|
||||
static struct bfin5xx_spi_chip spi_ad7877_chip_info = {
|
||||
.enable_dma = 0,
|
||||
|
@ -578,17 +584,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
|
|||
.mode = SPI_MODE_3,
|
||||
},
|
||||
#endif
|
||||
#if defined(CONFIG_AD5304) || defined(CONFIG_AD5304_MODULE)
|
||||
{
|
||||
.modalias = "ad5304_spi",
|
||||
.max_speed_hz = 1250000, /* max spi clock (SCK) speed in HZ */
|
||||
.bus_num = 0,
|
||||
.chip_select = 2,
|
||||
.platform_data = NULL,
|
||||
.controller_data = &ad5304_chip_info,
|
||||
.mode = SPI_MODE_2,
|
||||
},
|
||||
#endif
|
||||
#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
|
||||
{
|
||||
.modalias = "ad7877",
|
||||
|
@ -821,6 +816,8 @@ static struct platform_device *stamp_devices[] __initdata = {
|
|||
#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
|
||||
&bfin_device_gpiokeys,
|
||||
#endif
|
||||
|
||||
&bfin_gpios_device,
|
||||
&stamp_flash_device,
|
||||
};
|
||||
|
||||
|
|
|
@ -285,8 +285,8 @@ static struct mtd_partition partition_info[] = {
|
|||
},
|
||||
{
|
||||
.name = "File System",
|
||||
.offset = 4 * SIZE_1M,
|
||||
.size = (256 - 4) * SIZE_1M,
|
||||
.offset = MTDPART_OFS_APPEND,
|
||||
.size = MTDPART_SIZ_FULL,
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -323,7 +323,7 @@ static struct platform_device bf5xx_nand_device = {
|
|||
};
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN)
|
||||
#if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE)
|
||||
static struct platform_device bf54x_sdh_device = {
|
||||
.name = "bfin-sdh",
|
||||
.id = 0,
|
||||
|
@ -333,7 +333,7 @@ static struct platform_device bf54x_sdh_device = {
|
|||
static struct mtd_partition ezkit_partitions[] = {
|
||||
{
|
||||
.name = "Bootloader",
|
||||
.size = 0x20000,
|
||||
.size = 0x40000,
|
||||
.offset = 0,
|
||||
}, {
|
||||
.name = "Kernel",
|
||||
|
@ -381,8 +381,8 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
|
|||
.mask_flags = MTD_CAP_ROM
|
||||
}, {
|
||||
.name = "linux kernel",
|
||||
.size = 0x1c0000,
|
||||
.offset = 0x40000
|
||||
.size = MTDPART_SIZ_FULL,
|
||||
.offset = MTDPART_OFS_APPEND,
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -594,6 +594,19 @@ static struct platform_device bfin_device_gpiokeys = {
|
|||
};
|
||||
#endif
|
||||
|
||||
static struct resource bfin_gpios_resources = {
|
||||
.start = 0,
|
||||
.end = MAX_BLACKFIN_GPIOS - 1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
};
|
||||
|
||||
static struct platform_device bfin_gpios_device = {
|
||||
.name = "simple-gpio",
|
||||
.id = -1,
|
||||
.num_resources = 1,
|
||||
.resource = &bfin_gpios_resources,
|
||||
};
|
||||
|
||||
static struct platform_device *ezkit_devices[] __initdata = {
|
||||
#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
|
||||
&rtc_device,
|
||||
|
@ -623,7 +636,7 @@ static struct platform_device *ezkit_devices[] __initdata = {
|
|||
&bf5xx_nand_device,
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN)
|
||||
#if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE)
|
||||
&bf54x_sdh_device,
|
||||
#endif
|
||||
|
||||
|
@ -646,6 +659,8 @@ static struct platform_device *ezkit_devices[] __initdata = {
|
|||
#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
|
||||
&bfin_device_gpiokeys,
|
||||
#endif
|
||||
|
||||
&bfin_gpios_device,
|
||||
&ezkit_flash_device,
|
||||
};
|
||||
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
|
||||
#include <asm/blackfin.h>
|
||||
#include <asm/dma.h>
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/linkage.h>
|
||||
#include <linux/init.h>
|
||||
#include <asm/blackfin.h>
|
||||
#include <asm/trace.h>
|
||||
#if CONFIG_BFIN_KERNEL_CLOCK
|
||||
|
@ -44,10 +45,9 @@
|
|||
|
||||
#define INITIAL_STACK 0xFFB01000
|
||||
|
||||
.text
|
||||
__INIT
|
||||
|
||||
ENTRY(__start)
|
||||
ENTRY(__stext)
|
||||
/* R0: argument of command line string, passed from uboot, save it */
|
||||
R7 = R0;
|
||||
/* Enable Cycle Counter and Nesting Of Interrupts */
|
||||
|
@ -213,6 +213,7 @@ ENTRY(__stext)
|
|||
|
||||
.LWAIT_HERE:
|
||||
jump .LWAIT_HERE;
|
||||
ENDPROC(__start)
|
||||
|
||||
ENTRY(_real_start)
|
||||
[ -- sp ] = reti;
|
||||
|
@ -285,6 +286,9 @@ ENTRY(_real_start)
|
|||
call _start_kernel;
|
||||
.L_exit:
|
||||
jump.s .L_exit;
|
||||
ENDPROC(_real_start)
|
||||
|
||||
__FINIT
|
||||
|
||||
.section .l1.text
|
||||
#if CONFIG_BFIN_KERNEL_CLOCK
|
||||
|
@ -450,6 +454,7 @@ ENTRY(_start_dma_code)
|
|||
SSYNC;
|
||||
|
||||
RTS;
|
||||
ENDPROC(_start_dma_code)
|
||||
#endif /* CONFIG_BFIN_KERNEL_CLOCK */
|
||||
|
||||
.data
|
||||
|
|
|
@ -223,7 +223,7 @@ static struct platform_device bfin_uart_device = {
|
|||
static struct mtd_partition ezkit_partitions[] = {
|
||||
{
|
||||
.name = "Bootloader",
|
||||
.size = 0x20000,
|
||||
.size = 0x40000,
|
||||
.offset = 0,
|
||||
}, {
|
||||
.name = "Kernel",
|
||||
|
@ -389,6 +389,19 @@ static struct platform_device bfin_device_gpiokeys = {
|
|||
};
|
||||
#endif
|
||||
|
||||
static struct resource bfin_gpios_resources = {
|
||||
.start = 0,
|
||||
.end = MAX_BLACKFIN_GPIOS - 1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
};
|
||||
|
||||
static struct platform_device bfin_gpios_device = {
|
||||
.name = "simple-gpio",
|
||||
.id = -1,
|
||||
.num_resources = 1,
|
||||
.resource = &bfin_gpios_resources,
|
||||
};
|
||||
|
||||
#if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE)
|
||||
#include <linux/i2c-gpio.h>
|
||||
|
||||
|
@ -446,6 +459,7 @@ static struct platform_device *ezkit_devices[] __initdata = {
|
|||
&isp1362_hcd_device,
|
||||
#endif
|
||||
|
||||
&bfin_gpios_device,
|
||||
&ezkit_flash_device,
|
||||
};
|
||||
|
||||
|
|
|
@ -31,140 +31,6 @@
|
|||
#include <asm/blackfin.h>
|
||||
#include <asm/mach/irq.h>
|
||||
|
||||
.text
|
||||
|
||||
ENTRY(_unmask_wdog_wakeup_evt)
|
||||
[--SP] = ( R7:0, P5:0 );
|
||||
#if defined(CONFIG_BF561)
|
||||
P0.H = hi(SICA_IWR1);
|
||||
P0.L = lo(SICA_IWR1);
|
||||
#elif defined(CONFIG_BF54x) || defined(CONFIG_BF52x)
|
||||
P0.h = HI(SIC_IWR0);
|
||||
P0.l = LO(SIC_IWR0);
|
||||
#else
|
||||
P0.h = HI(SIC_IWR);
|
||||
P0.l = LO(SIC_IWR);
|
||||
#endif
|
||||
R7 = [P0];
|
||||
#if defined(CONFIG_BF561)
|
||||
BITSET(R7, 27);
|
||||
#else
|
||||
BITSET(R7,(IRQ_WATCH - IVG7));
|
||||
#endif
|
||||
[P0] = R7;
|
||||
SSYNC;
|
||||
|
||||
( R7:0, P5:0 ) = [SP++];
|
||||
RTS;
|
||||
|
||||
.LWRITE_TO_STAT:
|
||||
/* When watch dog timer is enabled, a write to STAT will load the
|
||||
* contents of CNT to STAT
|
||||
*/
|
||||
R7 = 0x0000(z);
|
||||
#if defined(CONFIG_BF561)
|
||||
P0.h = HI(WDOGA_STAT);
|
||||
P0.l = LO(WDOGA_STAT);
|
||||
#else
|
||||
P0.h = HI(WDOG_STAT);
|
||||
P0.l = LO(WDOG_STAT);
|
||||
#endif
|
||||
[P0] = R7;
|
||||
SSYNC;
|
||||
JUMP .LSKIP_WRITE_TO_STAT;
|
||||
|
||||
ENTRY(_program_wdog_timer)
|
||||
[--SP] = ( R7:0, P5:0 );
|
||||
#if defined(CONFIG_BF561)
|
||||
P0.h = HI(WDOGA_CNT);
|
||||
P0.l = LO(WDOGA_CNT);
|
||||
#else
|
||||
P0.h = HI(WDOG_CNT);
|
||||
P0.l = LO(WDOG_CNT);
|
||||
#endif
|
||||
[P0] = R0;
|
||||
SSYNC;
|
||||
|
||||
#if defined(CONFIG_BF561)
|
||||
P0.h = HI(WDOGA_CTL);
|
||||
P0.l = LO(WDOGA_CTL);
|
||||
#else
|
||||
P0.h = HI(WDOG_CTL);
|
||||
P0.l = LO(WDOG_CTL);
|
||||
#endif
|
||||
R7 = W[P0](Z);
|
||||
CC = BITTST(R7,1);
|
||||
if !CC JUMP .LWRITE_TO_STAT;
|
||||
CC = BITTST(R7,2);
|
||||
if !CC JUMP .LWRITE_TO_STAT;
|
||||
|
||||
.LSKIP_WRITE_TO_STAT:
|
||||
#if defined(CONFIG_BF561)
|
||||
P0.h = HI(WDOGA_CTL);
|
||||
P0.l = LO(WDOGA_CTL);
|
||||
#else
|
||||
P0.h = HI(WDOG_CTL);
|
||||
P0.l = LO(WDOG_CTL);
|
||||
#endif
|
||||
R7 = W[P0](Z);
|
||||
BITCLR(R7,1); /* Enable GP event */
|
||||
BITSET(R7,2);
|
||||
W[P0] = R7.L;
|
||||
SSYNC;
|
||||
NOP;
|
||||
|
||||
R7 = W[P0](Z);
|
||||
BITCLR(R7,4); /* Enable the wdog counter */
|
||||
W[P0] = R7.L;
|
||||
SSYNC;
|
||||
|
||||
( R7:0, P5:0 ) = [SP++];
|
||||
RTS;
|
||||
|
||||
ENTRY(_clear_wdog_wakeup_evt)
|
||||
[--SP] = ( R7:0, P5:0 );
|
||||
|
||||
#if defined(CONFIG_BF561)
|
||||
P0.h = HI(WDOGA_CTL);
|
||||
P0.l = LO(WDOGA_CTL);
|
||||
#else
|
||||
P0.h = HI(WDOG_CTL);
|
||||
P0.l = LO(WDOG_CTL);
|
||||
#endif
|
||||
R7 = 0x0AD6(Z);
|
||||
W[P0] = R7.L;
|
||||
SSYNC;
|
||||
|
||||
R7 = W[P0](Z);
|
||||
BITSET(R7,15);
|
||||
W[P0] = R7.L;
|
||||
SSYNC;
|
||||
|
||||
R7 = W[P0](Z);
|
||||
BITSET(R7,1);
|
||||
BITSET(R7,2);
|
||||
W[P0] = R7.L;
|
||||
SSYNC;
|
||||
|
||||
( R7:0, P5:0 ) = [SP++];
|
||||
RTS;
|
||||
|
||||
ENTRY(_disable_wdog_timer)
|
||||
[--SP] = ( R7:0, P5:0 );
|
||||
#if defined(CONFIG_BF561)
|
||||
P0.h = HI(WDOGA_CTL);
|
||||
P0.l = LO(WDOGA_CTL);
|
||||
#else
|
||||
P0.h = HI(WDOG_CTL);
|
||||
P0.l = LO(WDOG_CTL);
|
||||
#endif
|
||||
R7 = 0xAD6(Z);
|
||||
W[P0] = R7.L;
|
||||
SSYNC;
|
||||
( R7:0, P5:0 ) = [SP++];
|
||||
RTS;
|
||||
|
||||
#if !defined(CONFIG_BF561)
|
||||
|
||||
.section .l1.text
|
||||
|
||||
|
@ -459,10 +325,12 @@ ENTRY(_set_sic_iwr)
|
|||
RTS;
|
||||
|
||||
ENTRY(_set_rtc_istat)
|
||||
#ifndef CONFIG_BF561
|
||||
P0.H = hi(RTC_ISTAT);
|
||||
P0.L = lo(RTC_ISTAT);
|
||||
w[P0] = R0.L;
|
||||
SSYNC;
|
||||
#endif
|
||||
RTS;
|
||||
|
||||
ENTRY(_test_pll_locked)
|
||||
|
@ -473,4 +341,3 @@ ENTRY(_test_pll_locked)
|
|||
CC = BITTST(R0,5);
|
||||
IF !CC JUMP 1b;
|
||||
RTS;
|
||||
#endif
|
||||
|
|
|
@ -1369,7 +1369,7 @@ ENTRY(_sys_call_table)
|
|||
.long _sys_epoll_pwait
|
||||
.long _sys_utimensat
|
||||
.long _sys_signalfd
|
||||
.long _sys_ni_syscall
|
||||
.long _sys_timerfd_create
|
||||
.long _sys_eventfd /* 350 */
|
||||
.long _sys_pread64
|
||||
.long _sys_pwrite64
|
||||
|
@ -1378,6 +1378,9 @@ ENTRY(_sys_call_table)
|
|||
.long _sys_get_robust_list /* 355 */
|
||||
.long _sys_fallocate
|
||||
.long _sys_semtimedop
|
||||
.long _sys_timerfd_settime
|
||||
.long _sys_timerfd_gettime
|
||||
|
||||
.rept NR_syscalls-(.-_sys_call_table)/4
|
||||
.long _sys_ni_syscall
|
||||
.endr
|
||||
|
|
|
@ -74,7 +74,7 @@ unsigned long bfin_sic_iwr[3]; /* Up to 3 SIC_IWRx registers */
|
|||
#endif
|
||||
|
||||
struct ivgx {
|
||||
/* irq number for request_irq, available in mach-bf533/irq.h */
|
||||
/* irq number for request_irq, available in mach-bf5xx/irq.h */
|
||||
unsigned int irqno;
|
||||
/* corresponding bit in the SIC_ISR register */
|
||||
unsigned int isrflag;
|
||||
|
@ -86,7 +86,6 @@ struct ivg_slice {
|
|||
struct ivgx *istop;
|
||||
} ivg7_13[IVG13 - IVG7 + 1];
|
||||
|
||||
static void search_IAR(void);
|
||||
|
||||
/*
|
||||
* Search SIC_IAR and fill tables with the irqvalues
|
||||
|
@ -120,10 +119,10 @@ static void __init search_IAR(void)
|
|||
}
|
||||
|
||||
/*
|
||||
* This is for BF533 internal IRQs
|
||||
* This is for core internal IRQs
|
||||
*/
|
||||
|
||||
static void ack_noop(unsigned int irq)
|
||||
static void bfin_ack_noop(unsigned int irq)
|
||||
{
|
||||
/* Dummy function. */
|
||||
}
|
||||
|
@ -156,11 +155,11 @@ static void bfin_internal_mask_irq(unsigned int irq)
|
|||
{
|
||||
#ifdef CONFIG_BF53x
|
||||
bfin_write_SIC_IMASK(bfin_read_SIC_IMASK() &
|
||||
~(1 << (irq - (IRQ_CORETMR + 1))));
|
||||
~(1 << SIC_SYSIRQ(irq)));
|
||||
#else
|
||||
unsigned mask_bank, mask_bit;
|
||||
mask_bank = (irq - (IRQ_CORETMR + 1)) / 32;
|
||||
mask_bit = (irq - (IRQ_CORETMR + 1)) % 32;
|
||||
mask_bank = SIC_SYSIRQ(irq) / 32;
|
||||
mask_bit = SIC_SYSIRQ(irq) % 32;
|
||||
bfin_write_SIC_IMASK(mask_bank, bfin_read_SIC_IMASK(mask_bank) &
|
||||
~(1 << mask_bit));
|
||||
#endif
|
||||
|
@ -171,11 +170,11 @@ static void bfin_internal_unmask_irq(unsigned int irq)
|
|||
{
|
||||
#ifdef CONFIG_BF53x
|
||||
bfin_write_SIC_IMASK(bfin_read_SIC_IMASK() |
|
||||
(1 << (irq - (IRQ_CORETMR + 1))));
|
||||
(1 << SIC_SYSIRQ(irq)));
|
||||
#else
|
||||
unsigned mask_bank, mask_bit;
|
||||
mask_bank = (irq - (IRQ_CORETMR + 1)) / 32;
|
||||
mask_bit = (irq - (IRQ_CORETMR + 1)) % 32;
|
||||
mask_bank = SIC_SYSIRQ(irq) / 32;
|
||||
mask_bit = SIC_SYSIRQ(irq) % 32;
|
||||
bfin_write_SIC_IMASK(mask_bank, bfin_read_SIC_IMASK(mask_bank) |
|
||||
(1 << mask_bit));
|
||||
#endif
|
||||
|
@ -187,8 +186,8 @@ int bfin_internal_set_wake(unsigned int irq, unsigned int state)
|
|||
{
|
||||
unsigned bank, bit;
|
||||
unsigned long flags;
|
||||
bank = (irq - (IRQ_CORETMR + 1)) / 32;
|
||||
bit = (irq - (IRQ_CORETMR + 1)) % 32;
|
||||
bank = SIC_SYSIRQ(irq) / 32;
|
||||
bit = SIC_SYSIRQ(irq) % 32;
|
||||
|
||||
local_irq_save(flags);
|
||||
|
||||
|
@ -204,15 +203,18 @@ int bfin_internal_set_wake(unsigned int irq, unsigned int state)
|
|||
#endif
|
||||
|
||||
static struct irq_chip bfin_core_irqchip = {
|
||||
.ack = ack_noop,
|
||||
.ack = bfin_ack_noop,
|
||||
.mask = bfin_core_mask_irq,
|
||||
.unmask = bfin_core_unmask_irq,
|
||||
};
|
||||
|
||||
static struct irq_chip bfin_internal_irqchip = {
|
||||
.ack = ack_noop,
|
||||
.ack = bfin_ack_noop,
|
||||
.mask = bfin_internal_mask_irq,
|
||||
.unmask = bfin_internal_unmask_irq,
|
||||
.mask_ack = bfin_internal_mask_irq,
|
||||
.disable = bfin_internal_mask_irq,
|
||||
.enable = bfin_internal_unmask_irq,
|
||||
#ifdef CONFIG_PM
|
||||
.set_wake = bfin_internal_set_wake,
|
||||
#endif
|
||||
|
@ -221,38 +223,23 @@ static struct irq_chip bfin_internal_irqchip = {
|
|||
#ifdef BF537_GENERIC_ERROR_INT_DEMUX
|
||||
static int error_int_mask;
|
||||
|
||||
static void bfin_generic_error_ack_irq(unsigned int irq)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
static void bfin_generic_error_mask_irq(unsigned int irq)
|
||||
{
|
||||
error_int_mask &= ~(1L << (irq - IRQ_PPI_ERROR));
|
||||
|
||||
if (!error_int_mask) {
|
||||
local_irq_disable();
|
||||
bfin_write_SIC_IMASK(bfin_read_SIC_IMASK() &
|
||||
~(1 << (IRQ_GENERIC_ERROR -
|
||||
(IRQ_CORETMR + 1))));
|
||||
SSYNC();
|
||||
local_irq_enable();
|
||||
}
|
||||
if (!error_int_mask)
|
||||
bfin_internal_mask_irq(IRQ_GENERIC_ERROR);
|
||||
}
|
||||
|
||||
static void bfin_generic_error_unmask_irq(unsigned int irq)
|
||||
{
|
||||
local_irq_disable();
|
||||
bfin_write_SIC_IMASK(bfin_read_SIC_IMASK() | 1 <<
|
||||
(IRQ_GENERIC_ERROR - (IRQ_CORETMR + 1)));
|
||||
SSYNC();
|
||||
local_irq_enable();
|
||||
|
||||
bfin_internal_unmask_irq(IRQ_GENERIC_ERROR);
|
||||
error_int_mask |= 1L << (irq - IRQ_PPI_ERROR);
|
||||
}
|
||||
|
||||
static struct irq_chip bfin_generic_error_irqchip = {
|
||||
.ack = bfin_generic_error_ack_irq,
|
||||
.ack = bfin_ack_noop,
|
||||
.mask_ack = bfin_generic_error_mask_irq,
|
||||
.mask = bfin_generic_error_mask_irq,
|
||||
.unmask = bfin_generic_error_unmask_irq,
|
||||
};
|
||||
|
@ -608,7 +595,7 @@ static struct pin_int_t *pint[NR_PINT_SYS_IRQS] = {
|
|||
(struct pin_int_t *)PINT3_MASK_SET,
|
||||
};
|
||||
|
||||
unsigned short get_irq_base(u8 bank, u8 bmap)
|
||||
inline unsigned short get_irq_base(u8 bank, u8 bmap)
|
||||
{
|
||||
|
||||
u16 irq_base;
|
||||
|
@ -969,17 +956,12 @@ int __init init_arch_irq(void)
|
|||
#if defined(CONFIG_BF54x) || defined(CONFIG_BF52x) || defined(CONFIG_BF561)
|
||||
bfin_write_SIC_IMASK0(SIC_UNMASK_ALL);
|
||||
bfin_write_SIC_IMASK1(SIC_UNMASK_ALL);
|
||||
bfin_write_SIC_IWR0(IWR_ENABLE_ALL);
|
||||
bfin_write_SIC_IWR1(IWR_ENABLE_ALL);
|
||||
# ifdef CONFIG_BF54x
|
||||
bfin_write_SIC_IMASK2(SIC_UNMASK_ALL);
|
||||
bfin_write_SIC_IWR2(IWR_ENABLE_ALL);
|
||||
# endif
|
||||
#else
|
||||
bfin_write_SIC_IMASK(SIC_UNMASK_ALL);
|
||||
bfin_write_SIC_IWR(IWR_ENABLE_ALL);
|
||||
#endif
|
||||
SSYNC();
|
||||
|
||||
local_irq_disable();
|
||||
|
||||
|
@ -1001,90 +983,53 @@ int __init init_arch_irq(void)
|
|||
set_irq_chip(irq, &bfin_core_irqchip);
|
||||
else
|
||||
set_irq_chip(irq, &bfin_internal_irqchip);
|
||||
#ifdef BF537_GENERIC_ERROR_INT_DEMUX
|
||||
if (irq != IRQ_GENERIC_ERROR) {
|
||||
#endif
|
||||
|
||||
switch (irq) {
|
||||
#if defined(CONFIG_BF53x)
|
||||
case IRQ_PROG_INTA:
|
||||
set_irq_chained_handler(irq,
|
||||
bfin_demux_gpio_irq);
|
||||
break;
|
||||
# if defined(BF537_FAMILY) && !(defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE))
|
||||
case IRQ_MAC_RX:
|
||||
set_irq_chained_handler(irq,
|
||||
bfin_demux_gpio_irq);
|
||||
break;
|
||||
# endif
|
||||
#elif defined(CONFIG_BF54x)
|
||||
case IRQ_PINT0:
|
||||
set_irq_chained_handler(irq,
|
||||
bfin_demux_gpio_irq);
|
||||
break;
|
||||
case IRQ_PINT1:
|
||||
set_irq_chained_handler(irq,
|
||||
bfin_demux_gpio_irq);
|
||||
break;
|
||||
case IRQ_PINT2:
|
||||
set_irq_chained_handler(irq,
|
||||
bfin_demux_gpio_irq);
|
||||
break;
|
||||
case IRQ_PINT3:
|
||||
set_irq_chained_handler(irq,
|
||||
bfin_demux_gpio_irq);
|
||||
break;
|
||||
#elif defined(CONFIG_BF52x)
|
||||
case IRQ_PORTF_INTA:
|
||||
set_irq_chained_handler(irq,
|
||||
bfin_demux_gpio_irq);
|
||||
break;
|
||||
case IRQ_PORTG_INTA:
|
||||
set_irq_chained_handler(irq,
|
||||
bfin_demux_gpio_irq);
|
||||
break;
|
||||
case IRQ_PORTH_INTA:
|
||||
set_irq_chained_handler(irq,
|
||||
bfin_demux_gpio_irq);
|
||||
break;
|
||||
#elif defined(CONFIG_BF561)
|
||||
case IRQ_PROG0_INTA:
|
||||
set_irq_chained_handler(irq,
|
||||
bfin_demux_gpio_irq);
|
||||
break;
|
||||
case IRQ_PROG1_INTA:
|
||||
case IRQ_PROG2_INTA:
|
||||
#endif
|
||||
set_irq_chained_handler(irq,
|
||||
bfin_demux_gpio_irq);
|
||||
break;
|
||||
case IRQ_PROG2_INTA:
|
||||
set_irq_chained_handler(irq,
|
||||
bfin_demux_gpio_irq);
|
||||
#ifdef BF537_GENERIC_ERROR_INT_DEMUX
|
||||
case IRQ_GENERIC_ERROR:
|
||||
set_irq_handler(irq, bfin_demux_error_irq);
|
||||
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
set_irq_handler(irq, handle_simple_irq);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef BF537_GENERIC_ERROR_INT_DEMUX
|
||||
} else {
|
||||
set_irq_handler(irq, bfin_demux_error_irq);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#ifdef BF537_GENERIC_ERROR_INT_DEMUX
|
||||
for (irq = IRQ_PPI_ERROR; irq <= IRQ_UART1_ERROR; irq++) {
|
||||
set_irq_chip(irq, &bfin_generic_error_irqchip);
|
||||
set_irq_handler(irq, handle_level_irq);
|
||||
}
|
||||
for (irq = IRQ_PPI_ERROR; irq <= IRQ_UART1_ERROR; irq++)
|
||||
set_irq_chip_and_handler(irq, &bfin_generic_error_irqchip,
|
||||
handle_level_irq);
|
||||
#endif
|
||||
|
||||
for (irq = GPIO_IRQ_BASE; irq < NR_IRQS; irq++) {
|
||||
|
||||
set_irq_chip(irq, &bfin_gpio_irqchip);
|
||||
/* if configured as edge, then will be changed to do_edge_IRQ */
|
||||
set_irq_handler(irq, handle_level_irq);
|
||||
}
|
||||
for (irq = GPIO_IRQ_BASE; irq < NR_IRQS; irq++)
|
||||
set_irq_chip_and_handler(irq, &bfin_gpio_irqchip,
|
||||
handle_level_irq);
|
||||
|
||||
|
||||
bfin_write_IMASK(0);
|
||||
CSYNC();
|
||||
|
@ -1106,6 +1051,16 @@ int __init init_arch_irq(void)
|
|||
IMASK_IVG14 | IMASK_IVG13 | IMASK_IVG12 | IMASK_IVG11 |
|
||||
IMASK_IVG10 | IMASK_IVG9 | IMASK_IVG8 | IMASK_IVG7 | IMASK_IVGHW;
|
||||
|
||||
#if defined(CONFIG_BF54x) || defined(CONFIG_BF52x) || defined(CONFIG_BF561)
|
||||
bfin_write_SIC_IWR0(IWR_ENABLE_ALL);
|
||||
bfin_write_SIC_IWR1(IWR_ENABLE_ALL);
|
||||
# ifdef CONFIG_BF54x
|
||||
bfin_write_SIC_IWR2(IWR_ENABLE_ALL);
|
||||
# endif
|
||||
#else
|
||||
bfin_write_SIC_IWR(IWR_ENABLE_ALL);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1122,7 +1077,6 @@ void do_irq(int vec, struct pt_regs *fp)
|
|||
#if defined(CONFIG_BF54x) || defined(CONFIG_BF52x) || defined(CONFIG_BF561)
|
||||
unsigned long sic_status[3];
|
||||
|
||||
SSYNC();
|
||||
sic_status[0] = bfin_read_SIC_ISR0() & bfin_read_SIC_IMASK0();
|
||||
sic_status[1] = bfin_read_SIC_ISR1() & bfin_read_SIC_IMASK1();
|
||||
#ifdef CONFIG_BF54x
|
||||
|
@ -1138,7 +1092,7 @@ void do_irq(int vec, struct pt_regs *fp)
|
|||
}
|
||||
#else
|
||||
unsigned long sic_status;
|
||||
SSYNC();
|
||||
|
||||
sic_status = bfin_read_SIC_IMASK() & bfin_read_SIC_ISR();
|
||||
|
||||
for (;; ivg++) {
|
||||
|
|
|
@ -181,7 +181,7 @@ void __init mem_init(void)
|
|||
}
|
||||
}
|
||||
|
||||
static __init void free_init_pages(const char *what, unsigned long begin, unsigned long end)
|
||||
static void __init free_init_pages(const char *what, unsigned long begin, unsigned long end)
|
||||
{
|
||||
unsigned long addr;
|
||||
/* next to check that the page we free is not a partial page */
|
||||
|
@ -203,7 +203,7 @@ void __init free_initrd_mem(unsigned long start, unsigned long end)
|
|||
}
|
||||
#endif
|
||||
|
||||
void __init free_initmem(void)
|
||||
void __init_refok free_initmem(void)
|
||||
{
|
||||
#if defined CONFIG_RAMKERNEL && !defined CONFIG_MPU
|
||||
free_init_pages("unused kernel memory",
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include <linux/swap.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/vmstat.h>
|
||||
#include <linux/mm.h>
|
||||
#include <asm/arch/svinto.h>
|
||||
#include <asm/types.h>
|
||||
#include <asm/signal.h>
|
||||
|
|
|
@ -1,55 +1,59 @@
|
|||
/*#************************************************************************#*/
|
||||
/*#-------------------------------------------------------------------------*/
|
||||
/*# */
|
||||
/*# FUNCTION NAME: memcpy() */
|
||||
/*# */
|
||||
/*# PARAMETERS: void* dst; Destination address. */
|
||||
/*# void* src; Source address. */
|
||||
/*# int len; Number of bytes to copy. */
|
||||
/*# */
|
||||
/*# RETURNS: dst. */
|
||||
/*# */
|
||||
/*# DESCRIPTION: Copies len bytes of memory from src to dst. No guarantees */
|
||||
/*# about copying of overlapping memory areas. This routine is */
|
||||
/*# very sensitive to compiler changes in register allocation. */
|
||||
/*# Should really be rewritten to avoid this problem. */
|
||||
/*# */
|
||||
/*#-------------------------------------------------------------------------*/
|
||||
/*# */
|
||||
/*# HISTORY */
|
||||
/*# */
|
||||
/*# DATE NAME CHANGES */
|
||||
/*# ---- ---- ------- */
|
||||
/*# 941007 Kenny R Creation */
|
||||
/*# 941011 Kenny R Lots of optimizations and inlining. */
|
||||
/*# 941129 Ulf A Adapted for use in libc. */
|
||||
/*# 950216 HP N==0 forgotten if non-aligned src/dst. */
|
||||
/*# Added some optimizations. */
|
||||
/*# 001025 HP Make src and dst char *. Align dst to */
|
||||
/*# dword, not just word-if-both-src-and-dst- */
|
||||
/*# are-misaligned. */
|
||||
/*# */
|
||||
/*#-------------------------------------------------------------------------*/
|
||||
/* A memcpy for CRIS.
|
||||
Copyright (C) 1994-2005 Axis Communications.
|
||||
All rights reserved.
|
||||
|
||||
#include <linux/types.h>
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
void *memcpy(void *pdst,
|
||||
const void *psrc,
|
||||
size_t pn)
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Neither the name of Axis Communications nor the names of its
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY AXIS COMMUNICATIONS AND ITS CONTRIBUTORS
|
||||
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL AXIS
|
||||
COMMUNICATIONS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE. */
|
||||
|
||||
/* FIXME: This file should really only be used for reference, as the
|
||||
result is somewhat depending on gcc generating what we expect rather
|
||||
than what we describe. An assembly file should be used instead. */
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
/* Break even between movem and move16 is really at 38.7 * 2, but
|
||||
modulo 44, so up to the next multiple of 44, we use ordinary code. */
|
||||
#define MEMCPY_BY_BLOCK_THRESHOLD (44 * 2)
|
||||
|
||||
/* No name ambiguities in this file. */
|
||||
__asm__ (".syntax no_register_prefix");
|
||||
|
||||
void *
|
||||
memcpy(void *pdst, const void *psrc, size_t pn)
|
||||
{
|
||||
/* Ok. Now we want the parameters put in special registers.
|
||||
/* Now we want the parameters put in special registers.
|
||||
Make sure the compiler is able to make something useful of this.
|
||||
As it is now: r10 -> r13; r11 -> r11 (nop); r12 -> r12 (nop).
|
||||
|
||||
If gcc was alright, it really would need no temporaries, and no
|
||||
If gcc was allright, it really would need no temporaries, and no
|
||||
stack space to save stuff on. */
|
||||
|
||||
register void *return_dst __asm__ ("r10") = pdst;
|
||||
register char *dst __asm__ ("r13") = pdst;
|
||||
register const char *src __asm__ ("r11") = psrc;
|
||||
register unsigned char *dst __asm__ ("r13") = pdst;
|
||||
register unsigned const char *src __asm__ ("r11") = psrc;
|
||||
register int n __asm__ ("r12") = pn;
|
||||
|
||||
|
||||
/* When src is aligned but not dst, this makes a few extra needless
|
||||
cycles. I believe it would take as many to check that the
|
||||
re-alignment was unnecessary. */
|
||||
|
@ -61,7 +65,7 @@ void *memcpy(void *pdst,
|
|||
if ((unsigned long) dst & 1)
|
||||
{
|
||||
n--;
|
||||
*(char*)dst = *(char*)src;
|
||||
*dst = *src;
|
||||
src++;
|
||||
dst++;
|
||||
}
|
||||
|
@ -76,150 +80,157 @@ void *memcpy(void *pdst,
|
|||
}
|
||||
|
||||
/* Decide which copying method to use. */
|
||||
if (n >= 44*2) /* Break even between movem and
|
||||
move16 is at 38.7*2, but modulo 44. */
|
||||
if (n >= MEMCPY_BY_BLOCK_THRESHOLD)
|
||||
{
|
||||
/* For large copies we use 'movem' */
|
||||
|
||||
/* It is not optimal to tell the compiler about clobbering any
|
||||
registers; that will move the saving/restoring of those registers
|
||||
to the function prologue/epilogue, and make non-movem sizes
|
||||
suboptimal.
|
||||
|
||||
This method is not foolproof; it assumes that the "asm reg"
|
||||
declarations at the beginning of the function really are used
|
||||
here (beware: they may be moved to temporary registers).
|
||||
This way, we do not have to save/move the registers around into
|
||||
temporaries; we can safely use them straight away.
|
||||
|
||||
If you want to check that the allocation was right; then
|
||||
check the equalities in the first comment. It should say
|
||||
"r13=r13, r11=r11, r12=r12" */
|
||||
__asm__ volatile ("\n\
|
||||
;; Check that the following is true (same register names on \n\
|
||||
;; both sides of equal sign, as in r8=r8): \n\
|
||||
;; %0=r13, %1=r11, %2=r12 \n\
|
||||
;; \n\
|
||||
suboptimal. */
|
||||
__asm__ volatile
|
||||
("\
|
||||
;; GCC does promise correct register allocations, but let's \n\
|
||||
;; make sure it keeps its promises. \n\
|
||||
.ifnc %0-%1-%2,$r13-$r11-$r12 \n\
|
||||
.error \"GCC reg alloc bug: %0-%1-%4 != $r13-$r12-$r11\" \n\
|
||||
.endif \n\
|
||||
\n\
|
||||
;; Save the registers we'll use in the movem process \n\
|
||||
;; on the stack. \n\
|
||||
subq 11*4,$sp \n\
|
||||
movem $r10,[$sp] \n\
|
||||
subq 11*4,sp \n\
|
||||
movem r10,[sp] \n\
|
||||
\n\
|
||||
;; Now we've got this: \n\
|
||||
;; r11 - src \n\
|
||||
;; r13 - dst \n\
|
||||
;; r12 - n \n\
|
||||
\n\
|
||||
;; Update n for the first loop \n\
|
||||
subq 44,$r12 \n\
|
||||
;; Update n for the first loop. \n\
|
||||
subq 44,r12 \n\
|
||||
0: \n\
|
||||
movem [$r11+],$r10 \n\
|
||||
subq 44,$r12 \n\
|
||||
"
|
||||
#ifdef __arch_common_v10_v32
|
||||
/* Cater to branch offset difference between v32 and v10. We
|
||||
assume the branch below has an 8-bit offset. */
|
||||
" setf\n"
|
||||
#endif
|
||||
" movem [r11+],r10 \n\
|
||||
subq 44,r12 \n\
|
||||
bge 0b \n\
|
||||
movem $r10,[$r13+] \n\
|
||||
movem r10,[r13+] \n\
|
||||
\n\
|
||||
addq 44,$r12 ;; compensate for last loop underflowing n \n\
|
||||
;; Compensate for last loop underflowing n. \n\
|
||||
addq 44,r12 \n\
|
||||
\n\
|
||||
;; Restore registers from stack \n\
|
||||
movem [$sp+],$r10"
|
||||
;; Restore registers from stack. \n\
|
||||
movem [sp+],r10"
|
||||
|
||||
/* Outputs */ : "=r" (dst), "=r" (src), "=r" (n)
|
||||
/* Inputs */ : "0" (dst), "1" (src), "2" (n));
|
||||
/* Outputs. */
|
||||
: "=r" (dst), "=r" (src), "=r" (n)
|
||||
|
||||
/* Inputs. */
|
||||
: "0" (dst), "1" (src), "2" (n));
|
||||
}
|
||||
|
||||
/* Either we directly starts copying, using dword copying
|
||||
in a loop, or we copy as much as possible with 'movem'
|
||||
and then the last block (<44 bytes) is copied here.
|
||||
This will work since 'movem' will have updated src,dst,n. */
|
||||
|
||||
while (n >= 16)
|
||||
{
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*(long *) dst = *(long *) src; dst += 4; src += 4;
|
||||
*(long *) dst = *(long *) src; dst += 4; src += 4;
|
||||
*(long *) dst = *(long *) src; dst += 4; src += 4;
|
||||
*(long *) dst = *(long *) src; dst += 4; src += 4;
|
||||
|
||||
n -= 16;
|
||||
}
|
||||
|
||||
/* A switch() is definitely the fastest although it takes a LOT of code.
|
||||
* Particularly if you inline code this.
|
||||
*/
|
||||
switch (n)
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
|
||||
case 1:
|
||||
*(char*)dst = *(char*)src;
|
||||
*dst = *src;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
*(short *) dst = *(short *) src;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
*((short*)dst)++ = *((short*)src)++;
|
||||
*(char*)dst = *(char*)src;
|
||||
*(short *) dst = *(short *) src; dst += 2; src += 2;
|
||||
*dst = *src;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*(long *) dst = *(long *) src;
|
||||
break;
|
||||
|
||||
case 5:
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*(char*)dst = *(char*)src;
|
||||
*(long *) dst = *(long *) src; dst += 4; src += 4;
|
||||
*dst = *src;
|
||||
break;
|
||||
|
||||
case 6:
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*(long *) dst = *(long *) src; dst += 4; src += 4;
|
||||
*(short *) dst = *(short *) src;
|
||||
break;
|
||||
|
||||
case 7:
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*((short*)dst)++ = *((short*)src)++;
|
||||
*(char*)dst = *(char*)src;
|
||||
*(long *) dst = *(long *) src; dst += 4; src += 4;
|
||||
*(short *) dst = *(short *) src; dst += 2; src += 2;
|
||||
*dst = *src;
|
||||
break;
|
||||
|
||||
case 8:
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*(long *) dst = *(long *) src; dst += 4; src += 4;
|
||||
*(long *) dst = *(long *) src;
|
||||
break;
|
||||
|
||||
case 9:
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*(char*)dst = *(char*)src;
|
||||
*(long *) dst = *(long *) src; dst += 4; src += 4;
|
||||
*(long *) dst = *(long *) src; dst += 4; src += 4;
|
||||
*dst = *src;
|
||||
break;
|
||||
|
||||
case 10:
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*(long *) dst = *(long *) src; dst += 4; src += 4;
|
||||
*(long *) dst = *(long *) src; dst += 4; src += 4;
|
||||
*(short *) dst = *(short *) src;
|
||||
break;
|
||||
|
||||
case 11:
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*((short*)dst)++ = *((short*)src)++;
|
||||
*(char*)dst = *(char*)src;
|
||||
*(long *) dst = *(long *) src; dst += 4; src += 4;
|
||||
*(long *) dst = *(long *) src; dst += 4; src += 4;
|
||||
*(short *) dst = *(short *) src; dst += 2; src += 2;
|
||||
*dst = *src;
|
||||
break;
|
||||
|
||||
case 12:
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*(long *) dst = *(long *) src; dst += 4; src += 4;
|
||||
*(long *) dst = *(long *) src; dst += 4; src += 4;
|
||||
*(long *) dst = *(long *) src;
|
||||
break;
|
||||
|
||||
case 13:
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*(char*)dst = *(char*)src;
|
||||
*(long *) dst = *(long *) src; dst += 4; src += 4;
|
||||
*(long *) dst = *(long *) src; dst += 4; src += 4;
|
||||
*(long *) dst = *(long *) src; dst += 4; src += 4;
|
||||
*dst = *src;
|
||||
break;
|
||||
|
||||
case 14:
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*(long *) dst = *(long *) src; dst += 4; src += 4;
|
||||
*(long *) dst = *(long *) src; dst += 4; src += 4;
|
||||
*(long *) dst = *(long *) src; dst += 4; src += 4;
|
||||
*(short *) dst = *(short *) src;
|
||||
break;
|
||||
|
||||
case 15:
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*((short*)dst)++ = *((short*)src)++;
|
||||
*(char*)dst = *(char*)src;
|
||||
*(long *) dst = *(long *) src; dst += 4; src += 4;
|
||||
*(long *) dst = *(long *) src; dst += 4; src += 4;
|
||||
*(long *) dst = *(long *) src; dst += 4; src += 4;
|
||||
*(short *) dst = *(short *) src; dst += 2; src += 2;
|
||||
*dst = *src;
|
||||
break;
|
||||
}
|
||||
|
||||
return return_dst; /* destination pointer. */
|
||||
} /* memcpy() */
|
||||
return return_dst;
|
||||
}
|
||||
|
|
|
@ -193,7 +193,7 @@ __copy_user (void __user *pdst, const void *psrc, unsigned long pn)
|
|||
inaccessible. */
|
||||
|
||||
unsigned long
|
||||
__copy_user_zeroing (void __user *pdst, const void *psrc, unsigned long pn)
|
||||
__copy_user_zeroing(void *pdst, const void __user *psrc, unsigned long pn)
|
||||
{
|
||||
/* We want the parameters put in special registers.
|
||||
Make sure the compiler is able to make something useful of this.
|
||||
|
|
|
@ -1,55 +1,59 @@
|
|||
/*#************************************************************************#*/
|
||||
/*#-------------------------------------------------------------------------*/
|
||||
/*# */
|
||||
/*# FUNCTION NAME: memcpy() */
|
||||
/*# */
|
||||
/*# PARAMETERS: void* dst; Destination address. */
|
||||
/*# void* src; Source address. */
|
||||
/*# int len; Number of bytes to copy. */
|
||||
/*# */
|
||||
/*# RETURNS: dst. */
|
||||
/*# */
|
||||
/*# DESCRIPTION: Copies len bytes of memory from src to dst. No guarantees */
|
||||
/*# about copying of overlapping memory areas. This routine is */
|
||||
/*# very sensitive to compiler changes in register allocation. */
|
||||
/*# Should really be rewritten to avoid this problem. */
|
||||
/*# */
|
||||
/*#-------------------------------------------------------------------------*/
|
||||
/*# */
|
||||
/*# HISTORY */
|
||||
/*# */
|
||||
/*# DATE NAME CHANGES */
|
||||
/*# ---- ---- ------- */
|
||||
/*# 941007 Kenny R Creation */
|
||||
/*# 941011 Kenny R Lots of optimizations and inlining. */
|
||||
/*# 941129 Ulf A Adapted for use in libc. */
|
||||
/*# 950216 HP N==0 forgotten if non-aligned src/dst. */
|
||||
/*# Added some optimizations. */
|
||||
/*# 001025 HP Make src and dst char *. Align dst to */
|
||||
/*# dword, not just word-if-both-src-and-dst- */
|
||||
/*# are-misaligned. */
|
||||
/*# */
|
||||
/*#-------------------------------------------------------------------------*/
|
||||
/* A memcpy for CRIS.
|
||||
Copyright (C) 1994-2005 Axis Communications.
|
||||
All rights reserved.
|
||||
|
||||
#include <linux/types.h>
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
void *memcpy(void *pdst,
|
||||
const void *psrc,
|
||||
size_t pn)
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Neither the name of Axis Communications nor the names of its
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY AXIS COMMUNICATIONS AND ITS CONTRIBUTORS
|
||||
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL AXIS
|
||||
COMMUNICATIONS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE. */
|
||||
|
||||
/* FIXME: This file should really only be used for reference, as the
|
||||
result is somewhat depending on gcc generating what we expect rather
|
||||
than what we describe. An assembly file should be used instead. */
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
/* Break even between movem and move16 is really at 38.7 * 2, but
|
||||
modulo 44, so up to the next multiple of 44, we use ordinary code. */
|
||||
#define MEMCPY_BY_BLOCK_THRESHOLD (44 * 2)
|
||||
|
||||
/* No name ambiguities in this file. */
|
||||
__asm__ (".syntax no_register_prefix");
|
||||
|
||||
void *
|
||||
memcpy(void *pdst, const void *psrc, size_t pn)
|
||||
{
|
||||
/* Ok. Now we want the parameters put in special registers.
|
||||
/* Now we want the parameters put in special registers.
|
||||
Make sure the compiler is able to make something useful of this.
|
||||
As it is now: r10 -> r13; r11 -> r11 (nop); r12 -> r12 (nop).
|
||||
|
||||
If gcc was alright, it really would need no temporaries, and no
|
||||
If gcc was allright, it really would need no temporaries, and no
|
||||
stack space to save stuff on. */
|
||||
|
||||
register void *return_dst __asm__ ("r10") = pdst;
|
||||
register char *dst __asm__ ("r13") = pdst;
|
||||
register const char *src __asm__ ("r11") = psrc;
|
||||
register unsigned char *dst __asm__ ("r13") = pdst;
|
||||
register unsigned const char *src __asm__ ("r11") = psrc;
|
||||
register int n __asm__ ("r12") = pn;
|
||||
|
||||
|
||||
/* When src is aligned but not dst, this makes a few extra needless
|
||||
cycles. I believe it would take as many to check that the
|
||||
re-alignment was unnecessary. */
|
||||
|
@ -61,7 +65,7 @@ void *memcpy(void *pdst,
|
|||
if ((unsigned long) dst & 1)
|
||||
{
|
||||
n--;
|
||||
*(char*)dst = *(char*)src;
|
||||
*dst = *src;
|
||||
src++;
|
||||
dst++;
|
||||
}
|
||||
|
@ -75,145 +79,158 @@ void *memcpy(void *pdst,
|
|||
}
|
||||
}
|
||||
|
||||
/* Decide which copying method to use. Movem is dirt cheap, so the
|
||||
overheap is low enough to always use the minimum block size as the
|
||||
threshold. */
|
||||
if (n >= 44)
|
||||
/* Decide which copying method to use. */
|
||||
if (n >= MEMCPY_BY_BLOCK_THRESHOLD)
|
||||
{
|
||||
/* For large copies we use 'movem' */
|
||||
|
||||
/* It is not optimal to tell the compiler about clobbering any
|
||||
registers; that will move the saving/restoring of those registers
|
||||
to the function prologue/epilogue, and make non-movem sizes
|
||||
suboptimal. */
|
||||
__asm__ volatile (" \n\
|
||||
;; Check that the register asm declaration got right. \n\
|
||||
;; The GCC manual explicitly says TRT will happen. \n\
|
||||
__asm__ volatile
|
||||
("\
|
||||
;; GCC does promise correct register allocations, but let's \n\
|
||||
;; make sure it keeps its promises. \n\
|
||||
.ifnc %0-%1-%2,$r13-$r11-$r12 \n\
|
||||
.err \n\
|
||||
.error \"GCC reg alloc bug: %0-%1-%4 != $r13-$r12-$r11\" \n\
|
||||
.endif \n\
|
||||
\n\
|
||||
;; Save the registers we'll use in the movem process \n\
|
||||
\n\
|
||||
;; on the stack. \n\
|
||||
subq 11*4,$sp \n\
|
||||
movem $r10,[$sp] \n\
|
||||
subq 11*4,sp \n\
|
||||
movem r10,[sp] \n\
|
||||
\n\
|
||||
;; Now we've got this: \n\
|
||||
;; r11 - src \n\
|
||||
;; r13 - dst \n\
|
||||
;; r12 - n \n\
|
||||
\n\
|
||||
;; Update n for the first loop \n\
|
||||
subq 44,$r12 \n\
|
||||
;; Update n for the first loop. \n\
|
||||
subq 44,r12 \n\
|
||||
0: \n\
|
||||
movem [$r11+],$r10 \n\
|
||||
subq 44,$r12 \n\
|
||||
"
|
||||
#ifdef __arch_common_v10_v32
|
||||
/* Cater to branch offset difference between v32 and v10. We
|
||||
assume the branch below has an 8-bit offset. */
|
||||
" setf\n"
|
||||
#endif
|
||||
" movem [r11+],r10 \n\
|
||||
subq 44,r12 \n\
|
||||
bge 0b \n\
|
||||
movem $r10,[$r13+] \n\
|
||||
movem r10,[r13+] \n\
|
||||
\n\
|
||||
addq 44,$r12 ;; compensate for last loop underflowing n \n\
|
||||
;; Compensate for last loop underflowing n. \n\
|
||||
addq 44,r12 \n\
|
||||
\n\
|
||||
;; Restore registers from stack \n\
|
||||
movem [$sp+],$r10"
|
||||
;; Restore registers from stack. \n\
|
||||
movem [sp+],r10"
|
||||
|
||||
/* Outputs */ : "=r" (dst), "=r" (src), "=r" (n)
|
||||
/* Inputs */ : "0" (dst), "1" (src), "2" (n));
|
||||
/* Outputs. */
|
||||
: "=r" (dst), "=r" (src), "=r" (n)
|
||||
|
||||
/* Inputs. */
|
||||
: "0" (dst), "1" (src), "2" (n));
|
||||
}
|
||||
|
||||
/* Either we directly starts copying, using dword copying
|
||||
in a loop, or we copy as much as possible with 'movem'
|
||||
and then the last block (<44 bytes) is copied here.
|
||||
This will work since 'movem' will have updated src,dst,n. */
|
||||
|
||||
while (n >= 16)
|
||||
{
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*(long *) dst = *(long *) src; dst += 4; src += 4;
|
||||
*(long *) dst = *(long *) src; dst += 4; src += 4;
|
||||
*(long *) dst = *(long *) src; dst += 4; src += 4;
|
||||
*(long *) dst = *(long *) src; dst += 4; src += 4;
|
||||
|
||||
n -= 16;
|
||||
}
|
||||
|
||||
/* A switch() is definitely the fastest although it takes a LOT of code.
|
||||
* Particularly if you inline code this.
|
||||
*/
|
||||
switch (n)
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
|
||||
case 1:
|
||||
*(char*)dst = *(char*)src;
|
||||
*dst = *src;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
*(short *) dst = *(short *) src;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
*((short*)dst)++ = *((short*)src)++;
|
||||
*(char*)dst = *(char*)src;
|
||||
*(short *) dst = *(short *) src; dst += 2; src += 2;
|
||||
*dst = *src;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*(long *) dst = *(long *) src;
|
||||
break;
|
||||
|
||||
case 5:
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*(char*)dst = *(char*)src;
|
||||
*(long *) dst = *(long *) src; dst += 4; src += 4;
|
||||
*dst = *src;
|
||||
break;
|
||||
|
||||
case 6:
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*(long *) dst = *(long *) src; dst += 4; src += 4;
|
||||
*(short *) dst = *(short *) src;
|
||||
break;
|
||||
|
||||
case 7:
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*((short*)dst)++ = *((short*)src)++;
|
||||
*(char*)dst = *(char*)src;
|
||||
*(long *) dst = *(long *) src; dst += 4; src += 4;
|
||||
*(short *) dst = *(short *) src; dst += 2; src += 2;
|
||||
*dst = *src;
|
||||
break;
|
||||
|
||||
case 8:
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*(long *) dst = *(long *) src; dst += 4; src += 4;
|
||||
*(long *) dst = *(long *) src;
|
||||
break;
|
||||
|
||||
case 9:
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*(char*)dst = *(char*)src;
|
||||
*(long *) dst = *(long *) src; dst += 4; src += 4;
|
||||
*(long *) dst = *(long *) src; dst += 4; src += 4;
|
||||
*dst = *src;
|
||||
break;
|
||||
|
||||
case 10:
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*(long *) dst = *(long *) src; dst += 4; src += 4;
|
||||
*(long *) dst = *(long *) src; dst += 4; src += 4;
|
||||
*(short *) dst = *(short *) src;
|
||||
break;
|
||||
|
||||
case 11:
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*((short*)dst)++ = *((short*)src)++;
|
||||
*(char*)dst = *(char*)src;
|
||||
*(long *) dst = *(long *) src; dst += 4; src += 4;
|
||||
*(long *) dst = *(long *) src; dst += 4; src += 4;
|
||||
*(short *) dst = *(short *) src; dst += 2; src += 2;
|
||||
*dst = *src;
|
||||
break;
|
||||
|
||||
case 12:
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*(long *) dst = *(long *) src; dst += 4; src += 4;
|
||||
*(long *) dst = *(long *) src; dst += 4; src += 4;
|
||||
*(long *) dst = *(long *) src;
|
||||
break;
|
||||
|
||||
case 13:
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*(char*)dst = *(char*)src;
|
||||
*(long *) dst = *(long *) src; dst += 4; src += 4;
|
||||
*(long *) dst = *(long *) src; dst += 4; src += 4;
|
||||
*(long *) dst = *(long *) src; dst += 4; src += 4;
|
||||
*dst = *src;
|
||||
break;
|
||||
|
||||
case 14:
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*(long *) dst = *(long *) src; dst += 4; src += 4;
|
||||
*(long *) dst = *(long *) src; dst += 4; src += 4;
|
||||
*(long *) dst = *(long *) src; dst += 4; src += 4;
|
||||
*(short *) dst = *(short *) src;
|
||||
break;
|
||||
|
||||
case 15:
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*((long*)dst)++ = *((long*)src)++;
|
||||
*((short*)dst)++ = *((short*)src)++;
|
||||
*(char*)dst = *(char*)src;
|
||||
*(long *) dst = *(long *) src; dst += 4; src += 4;
|
||||
*(long *) dst = *(long *) src; dst += 4; src += 4;
|
||||
*(long *) dst = *(long *) src; dst += 4; src += 4;
|
||||
*(short *) dst = *(short *) src; dst += 2; src += 2;
|
||||
*dst = *src;
|
||||
break;
|
||||
}
|
||||
|
||||
return return_dst; /* destination pointer. */
|
||||
} /* memcpy() */
|
||||
return return_dst;
|
||||
}
|
||||
|
|
|
@ -161,7 +161,7 @@ __copy_user (void __user *pdst, const void *psrc, unsigned long pn)
|
|||
inaccessible. */
|
||||
|
||||
unsigned long
|
||||
__copy_user_zeroing (void __user *pdst, const void *psrc, unsigned long pn)
|
||||
__copy_user_zeroing(void *pdst, const void __user *psrc, unsigned long pn)
|
||||
{
|
||||
/* We want the parameters put in special registers.
|
||||
Make sure the compiler is able to make something useful of this.
|
||||
|
|
|
@ -18,6 +18,7 @@ config IA64
|
|||
select HAVE_IDE
|
||||
select HAVE_OPROFILE
|
||||
select HAVE_KPROBES
|
||||
select HAVE_KRETPROBES
|
||||
default y
|
||||
help
|
||||
The Itanium Processor Family is Intel's 64-bit successor to
|
||||
|
@ -155,6 +156,8 @@ config IA64_HP_ZX1_SWIOTLB
|
|||
|
||||
config IA64_SGI_SN2
|
||||
bool "SGI-SN2"
|
||||
select NUMA
|
||||
select ACPI_NUMA
|
||||
help
|
||||
Selecting this option will optimize the kernel for use on sn2 based
|
||||
systems, but the resulting kernel binary will not run on other
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
# Copyright (C) 1998-2004 by David Mosberger-Tang <davidm@hpl.hp.com>
|
||||
#
|
||||
|
||||
KBUILD_DEFCONFIG := generic_defconfig
|
||||
|
||||
NM := $(CROSS_COMPILE)nm -B
|
||||
READELF := $(CROSS_COMPILE)readelf
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ hwsw_init (void)
|
|||
#ifdef CONFIG_IA64_GENERIC
|
||||
/* Better to have normal DMA than panic */
|
||||
printk(KERN_WARNING "%s: Failed to initialize software I/O TLB,"
|
||||
" reverting to hpzx1 platform vector\n", __FUNCTION__);
|
||||
" reverting to hpzx1 platform vector\n", __func__);
|
||||
machvec_init("hpzx1");
|
||||
#else
|
||||
panic("Unable to initialize software I/O TLB services");
|
||||
|
|
|
@ -529,7 +529,7 @@ sba_search_bitmap(struct ioc *ioc, unsigned long bits_wanted, int use_hint)
|
|||
base_mask = RESMAP_MASK(bits_wanted);
|
||||
mask = base_mask << bitshiftcnt;
|
||||
|
||||
DBG_RES("%s() o %ld %p", __FUNCTION__, o, res_ptr);
|
||||
DBG_RES("%s() o %ld %p", __func__, o, res_ptr);
|
||||
for(; res_ptr < res_end ; res_ptr++)
|
||||
{
|
||||
DBG_RES(" %p %lx %lx\n", res_ptr, mask, *res_ptr);
|
||||
|
@ -679,7 +679,7 @@ sba_alloc_range(struct ioc *ioc, size_t size)
|
|||
#endif
|
||||
|
||||
DBG_RES("%s(%x) %d -> %lx hint %x/%x\n",
|
||||
__FUNCTION__, size, pages_needed, pide,
|
||||
__func__, size, pages_needed, pide,
|
||||
(uint) ((unsigned long) ioc->res_hint - (unsigned long) ioc->res_map),
|
||||
ioc->res_bitshift );
|
||||
|
||||
|
@ -722,7 +722,7 @@ sba_free_range(struct ioc *ioc, dma_addr_t iova, size_t size)
|
|||
m = RESMAP_MASK(bits_not_wanted) << (pide & (BITS_PER_LONG - 1));
|
||||
bits_not_wanted = 0;
|
||||
|
||||
DBG_RES("%s( ,%x,%x) %x/%lx %x %p %lx\n", __FUNCTION__, (uint) iova, size,
|
||||
DBG_RES("%s( ,%x,%x) %x/%lx %x %p %lx\n", __func__, (uint) iova, size,
|
||||
bits_not_wanted, m, pide, res_ptr, *res_ptr);
|
||||
|
||||
ASSERT(m != 0);
|
||||
|
@ -940,8 +940,7 @@ sba_map_single(struct device *dev, void *addr, size_t size, int dir)
|
|||
|
||||
iovp = (dma_addr_t) pide << iovp_shift;
|
||||
|
||||
DBG_RUN("%s() 0x%p -> 0x%lx\n",
|
||||
__FUNCTION__, addr, (long) iovp | offset);
|
||||
DBG_RUN("%s() 0x%p -> 0x%lx\n", __func__, addr, (long) iovp | offset);
|
||||
|
||||
pdir_start = &(ioc->pdir_base[pide]);
|
||||
|
||||
|
@ -1029,8 +1028,7 @@ void sba_unmap_single(struct device *dev, dma_addr_t iova, size_t size, int dir)
|
|||
#endif
|
||||
offset = iova & ~iovp_mask;
|
||||
|
||||
DBG_RUN("%s() iovp 0x%lx/%x\n",
|
||||
__FUNCTION__, (long) iova, size);
|
||||
DBG_RUN("%s() iovp 0x%lx/%x\n", __func__, (long) iova, size);
|
||||
|
||||
iova ^= offset; /* clear offset bits */
|
||||
size += offset;
|
||||
|
@ -1404,7 +1402,7 @@ int sba_map_sg(struct device *dev, struct scatterlist *sglist, int nents, int di
|
|||
struct scatterlist *sg;
|
||||
#endif
|
||||
|
||||
DBG_RUN_SG("%s() START %d entries\n", __FUNCTION__, nents);
|
||||
DBG_RUN_SG("%s() START %d entries\n", __func__, nents);
|
||||
ioc = GET_IOC(dev);
|
||||
ASSERT(ioc);
|
||||
|
||||
|
@ -1468,7 +1466,7 @@ int sba_map_sg(struct device *dev, struct scatterlist *sglist, int nents, int di
|
|||
#endif
|
||||
|
||||
ASSERT(coalesced == filled);
|
||||
DBG_RUN_SG("%s() DONE %d mappings\n", __FUNCTION__, filled);
|
||||
DBG_RUN_SG("%s() DONE %d mappings\n", __func__, filled);
|
||||
|
||||
return filled;
|
||||
}
|
||||
|
@ -1491,7 +1489,7 @@ void sba_unmap_sg (struct device *dev, struct scatterlist *sglist, int nents, in
|
|||
#endif
|
||||
|
||||
DBG_RUN_SG("%s() START %d entries, %p,%x\n",
|
||||
__FUNCTION__, nents, sba_sg_address(sglist), sglist->length);
|
||||
__func__, nents, sba_sg_address(sglist), sglist->length);
|
||||
|
||||
#ifdef ASSERT_PDIR_SANITY
|
||||
ioc = GET_IOC(dev);
|
||||
|
@ -1509,7 +1507,7 @@ void sba_unmap_sg (struct device *dev, struct scatterlist *sglist, int nents, in
|
|||
nents--;
|
||||
}
|
||||
|
||||
DBG_RUN_SG("%s() DONE (nents %d)\n", __FUNCTION__, nents);
|
||||
DBG_RUN_SG("%s() DONE (nents %d)\n", __func__, nents);
|
||||
|
||||
#ifdef ASSERT_PDIR_SANITY
|
||||
spin_lock_irqsave(&ioc->res_lock, flags);
|
||||
|
@ -1546,7 +1544,7 @@ ioc_iova_init(struct ioc *ioc)
|
|||
ioc->iov_size = ~ioc->imask + 1;
|
||||
|
||||
DBG_INIT("%s() hpa %p IOV base 0x%lx mask 0x%lx (%dMB)\n",
|
||||
__FUNCTION__, ioc->ioc_hpa, ioc->ibase, ioc->imask,
|
||||
__func__, ioc->ioc_hpa, ioc->ibase, ioc->imask,
|
||||
ioc->iov_size >> 20);
|
||||
|
||||
switch (iovp_size) {
|
||||
|
@ -1569,7 +1567,7 @@ ioc_iova_init(struct ioc *ioc)
|
|||
|
||||
memset(ioc->pdir_base, 0, ioc->pdir_size);
|
||||
|
||||
DBG_INIT("%s() IOV page size %ldK pdir %p size %x\n", __FUNCTION__,
|
||||
DBG_INIT("%s() IOV page size %ldK pdir %p size %x\n", __func__,
|
||||
iovp_size >> 10, ioc->pdir_base, ioc->pdir_size);
|
||||
|
||||
ASSERT(ALIGN((unsigned long) ioc->pdir_base, 4*1024) == (unsigned long) ioc->pdir_base);
|
||||
|
@ -1612,7 +1610,7 @@ ioc_iova_init(struct ioc *ioc)
|
|||
|
||||
prefetch_spill_page = virt_to_phys(addr);
|
||||
|
||||
DBG_INIT("%s() prefetch spill addr: 0x%lx\n", __FUNCTION__, prefetch_spill_page);
|
||||
DBG_INIT("%s() prefetch spill addr: 0x%lx\n", __func__, prefetch_spill_page);
|
||||
}
|
||||
/*
|
||||
** Set all the PDIR entries valid w/ the spill page as the target
|
||||
|
@ -1641,7 +1639,7 @@ ioc_resource_init(struct ioc *ioc)
|
|||
/* resource map size dictated by pdir_size */
|
||||
ioc->res_size = ioc->pdir_size / PDIR_ENTRY_SIZE; /* entries */
|
||||
ioc->res_size >>= 3; /* convert bit count to byte count */
|
||||
DBG_INIT("%s() res_size 0x%x\n", __FUNCTION__, ioc->res_size);
|
||||
DBG_INIT("%s() res_size 0x%x\n", __func__, ioc->res_size);
|
||||
|
||||
ioc->res_map = (char *) __get_free_pages(GFP_KERNEL,
|
||||
get_order(ioc->res_size));
|
||||
|
@ -1664,7 +1662,7 @@ ioc_resource_init(struct ioc *ioc)
|
|||
| prefetch_spill_page);
|
||||
#endif
|
||||
|
||||
DBG_INIT("%s() res_map %x %p\n", __FUNCTION__,
|
||||
DBG_INIT("%s() res_map %x %p\n", __func__,
|
||||
ioc->res_size, (void *) ioc->res_map);
|
||||
}
|
||||
|
||||
|
@ -1767,7 +1765,7 @@ ioc_init(u64 hpa, void *handle)
|
|||
iovp_size = (1 << iovp_shift);
|
||||
iovp_mask = ~(iovp_size - 1);
|
||||
|
||||
DBG_INIT("%s: PAGE_SIZE %ldK, iovp_size %ldK\n", __FUNCTION__,
|
||||
DBG_INIT("%s: PAGE_SIZE %ldK, iovp_size %ldK\n", __func__,
|
||||
PAGE_SIZE >> 10, iovp_size >> 10);
|
||||
|
||||
if (!ioc->name) {
|
||||
|
@ -2137,7 +2135,7 @@ sba_page_override(char *str)
|
|||
break;
|
||||
default:
|
||||
printk("%s: unknown/unsupported iommu page size %ld\n",
|
||||
__FUNCTION__, page_size);
|
||||
__func__, page_size);
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
|
|
@ -222,7 +222,7 @@ simeth_probe1(void)
|
|||
}
|
||||
|
||||
if ((rc = assign_irq_vector(AUTO_ASSIGN)) < 0)
|
||||
panic("%s: out of interrupt vectors!\n", __FUNCTION__);
|
||||
panic("%s: out of interrupt vectors!\n", __func__);
|
||||
dev->irq = rc;
|
||||
|
||||
/*
|
||||
|
|
|
@ -1000,7 +1000,7 @@ simrs_init (void)
|
|||
if (!state->irq) {
|
||||
if ((rc = assign_irq_vector(AUTO_ASSIGN)) < 0)
|
||||
panic("%s: out of interrupt vectors!\n",
|
||||
__FUNCTION__);
|
||||
__func__);
|
||||
state->irq = rc;
|
||||
ia64_ssc_connect_irq(KEYBOARD_INTR, state->irq);
|
||||
}
|
||||
|
|
|
@ -766,8 +766,19 @@ get_sigframe (struct k_sigaction *ka, struct pt_regs * regs, size_t frame_size)
|
|||
|
||||
/* This is the X/Open sanctioned signal stack switching. */
|
||||
if (ka->sa.sa_flags & SA_ONSTACK) {
|
||||
if (!on_sig_stack(esp))
|
||||
int onstack = sas_ss_flags(esp);
|
||||
|
||||
if (onstack == 0)
|
||||
esp = current->sas_ss_sp + current->sas_ss_size;
|
||||
else if (onstack == SS_ONSTACK) {
|
||||
/*
|
||||
* If we are on the alternate signal stack and would
|
||||
* overflow it, don't. Return an always-bogus address
|
||||
* instead so we will die with SIGSEGV.
|
||||
*/
|
||||
if (!likely(on_sig_stack(esp - frame_size)))
|
||||
return (void __user *) -1L;
|
||||
}
|
||||
}
|
||||
/* Legacy stack switching not supported */
|
||||
|
||||
|
|
|
@ -32,13 +32,8 @@
|
|||
#include <linux/shm.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/uio.h>
|
||||
#include <linux/nfs_fs.h>
|
||||
#include <linux/socket.h>
|
||||
#include <linux/quota.h>
|
||||
#include <linux/sunrpc/svc.h>
|
||||
#include <linux/nfsd/nfsd.h>
|
||||
#include <linux/nfsd/cache.h>
|
||||
#include <linux/nfsd/xdr.h>
|
||||
#include <linux/nfsd/syscall.h>
|
||||
#include <linux/poll.h>
|
||||
#include <linux/eventpoll.h>
|
||||
#include <linux/personality.h>
|
||||
|
|
|
@ -155,7 +155,7 @@ kdump_init_notifier(struct notifier_block *self, unsigned long val, void *data)
|
|||
if (val == DIE_INIT_MONARCH_LEAVE)
|
||||
ia64_mca_printk(KERN_NOTICE
|
||||
"%s: kdump not configured\n",
|
||||
__FUNCTION__);
|
||||
__func__);
|
||||
return NOTIFY_DONE;
|
||||
}
|
||||
|
||||
|
|
|
@ -379,8 +379,8 @@ efi_get_pal_addr (void)
|
|||
* a dedicated ITR for the PAL code.
|
||||
*/
|
||||
if ((vaddr & mask) == (KERNEL_START & mask)) {
|
||||
printk(KERN_INFO "%s: no need to install ITR for "
|
||||
"PAL code\n", __FUNCTION__);
|
||||
printk(KERN_INFO "%s: no need to install ITR for PAL code\n",
|
||||
__func__);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -399,7 +399,7 @@ efi_get_pal_addr (void)
|
|||
return __va(md->phys_addr);
|
||||
}
|
||||
printk(KERN_WARNING "%s: no PAL-code memory-descriptor found\n",
|
||||
__FUNCTION__);
|
||||
__func__);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -543,12 +543,30 @@ efi_init (void)
|
|||
for (i = 0, p = efi_map_start; p < efi_map_end;
|
||||
++i, p += efi_desc_size)
|
||||
{
|
||||
const char *unit;
|
||||
unsigned long size;
|
||||
|
||||
md = p;
|
||||
printk("mem%02u: type=%u, attr=0x%lx, "
|
||||
"range=[0x%016lx-0x%016lx) (%luMB)\n",
|
||||
size = md->num_pages << EFI_PAGE_SHIFT;
|
||||
|
||||
if ((size >> 40) > 0) {
|
||||
size >>= 40;
|
||||
unit = "TB";
|
||||
} else if ((size >> 30) > 0) {
|
||||
size >>= 30;
|
||||
unit = "GB";
|
||||
} else if ((size >> 20) > 0) {
|
||||
size >>= 20;
|
||||
unit = "MB";
|
||||
} else {
|
||||
size >>= 10;
|
||||
unit = "KB";
|
||||
}
|
||||
|
||||
printk("mem%02d: type=%2u, attr=0x%016lx, "
|
||||
"range=[0x%016lx-0x%016lx) (%4lu%s)\n",
|
||||
i, md->type, md->attribute, md->phys_addr,
|
||||
md->phys_addr + efi_md_size(md),
|
||||
md->num_pages >> (20 - EFI_PAGE_SHIFT));
|
||||
md->phys_addr + efi_md_size(md), size, unit);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -345,7 +345,7 @@ iosapic_set_affinity (unsigned int irq, cpumask_t mask)
|
|||
if (cpus_empty(mask))
|
||||
return;
|
||||
|
||||
if (reassign_irq_vector(irq, first_cpu(mask)))
|
||||
if (irq_prepare_move(irq, first_cpu(mask)))
|
||||
return;
|
||||
|
||||
dest = cpu_physical_id(first_cpu(mask));
|
||||
|
@ -397,6 +397,7 @@ iosapic_end_level_irq (unsigned int irq)
|
|||
struct iosapic_rte_info *rte;
|
||||
int do_unmask_irq = 0;
|
||||
|
||||
irq_complete_move(irq);
|
||||
if (unlikely(irq_desc[irq].status & IRQ_MOVE_PENDING)) {
|
||||
do_unmask_irq = 1;
|
||||
mask_irq(irq);
|
||||
|
@ -450,6 +451,7 @@ iosapic_ack_edge_irq (unsigned int irq)
|
|||
{
|
||||
irq_desc_t *idesc = irq_desc + irq;
|
||||
|
||||
irq_complete_move(irq);
|
||||
move_native_irq(irq);
|
||||
/*
|
||||
* Once we have recorded IRQ_PENDING already, we can mask the
|
||||
|
@ -532,7 +534,7 @@ iosapic_reassign_vector (int irq)
|
|||
if (iosapic_intr_info[irq].count) {
|
||||
new_irq = create_irq();
|
||||
if (new_irq < 0)
|
||||
panic("%s: out of interrupt vectors!\n", __FUNCTION__);
|
||||
panic("%s: out of interrupt vectors!\n", __func__);
|
||||
printk(KERN_INFO "Reassigning vector %d to %d\n",
|
||||
irq_to_vector(irq), irq_to_vector(new_irq));
|
||||
memcpy(&iosapic_intr_info[new_irq], &iosapic_intr_info[irq],
|
||||
|
@ -597,7 +599,7 @@ register_intr (unsigned int gsi, int irq, unsigned char delivery,
|
|||
index = find_iosapic(gsi);
|
||||
if (index < 0) {
|
||||
printk(KERN_WARNING "%s: No IOSAPIC for GSI %u\n",
|
||||
__FUNCTION__, gsi);
|
||||
__func__, gsi);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
|
@ -606,7 +608,7 @@ register_intr (unsigned int gsi, int irq, unsigned char delivery,
|
|||
rte = iosapic_alloc_rte();
|
||||
if (!rte) {
|
||||
printk(KERN_WARNING "%s: cannot allocate memory\n",
|
||||
__FUNCTION__);
|
||||
__func__);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
|
@ -623,7 +625,7 @@ register_intr (unsigned int gsi, int irq, unsigned char delivery,
|
|||
(info->trigger != trigger || info->polarity != polarity)){
|
||||
printk (KERN_WARNING
|
||||
"%s: cannot override the interrupt\n",
|
||||
__FUNCTION__);
|
||||
__func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
rte->refcnt++;
|
||||
|
@ -645,7 +647,7 @@ register_intr (unsigned int gsi, int irq, unsigned char delivery,
|
|||
if (idesc->chip != &no_irq_type)
|
||||
printk(KERN_WARNING
|
||||
"%s: changing vector %d from %s to %s\n",
|
||||
__FUNCTION__, irq_to_vector(irq),
|
||||
__func__, irq_to_vector(irq),
|
||||
idesc->chip->name, irq_type->name);
|
||||
idesc->chip = irq_type;
|
||||
}
|
||||
|
@ -918,7 +920,7 @@ iosapic_register_platform_intr (u32 int_type, unsigned int gsi,
|
|||
case ACPI_INTERRUPT_INIT:
|
||||
irq = create_irq();
|
||||
if (irq < 0)
|
||||
panic("%s: out of interrupt vectors!\n", __FUNCTION__);
|
||||
panic("%s: out of interrupt vectors!\n", __func__);
|
||||
vector = irq_to_vector(irq);
|
||||
delivery = IOSAPIC_INIT;
|
||||
break;
|
||||
|
@ -929,7 +931,7 @@ iosapic_register_platform_intr (u32 int_type, unsigned int gsi,
|
|||
mask = 1;
|
||||
break;
|
||||
default:
|
||||
printk(KERN_ERR "%s: invalid int type 0x%x\n", __FUNCTION__,
|
||||
printk(KERN_ERR "%s: invalid int type 0x%x\n", __func__,
|
||||
int_type);
|
||||
return -1;
|
||||
}
|
||||
|
@ -994,7 +996,7 @@ iosapic_system_init (int system_pcat_compat)
|
|||
*/
|
||||
printk(KERN_INFO
|
||||
"%s: Disabling PC-AT compatible 8259 interrupts\n",
|
||||
__FUNCTION__);
|
||||
__func__);
|
||||
outb(0xff, 0xA1);
|
||||
outb(0xff, 0x21);
|
||||
}
|
||||
|
@ -1009,7 +1011,7 @@ iosapic_alloc (void)
|
|||
if (!iosapic_lists[index].addr)
|
||||
return index;
|
||||
|
||||
printk(KERN_WARNING "%s: failed to allocate iosapic\n", __FUNCTION__);
|
||||
printk(KERN_WARNING "%s: failed to allocate iosapic\n", __func__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -1107,14 +1109,14 @@ iosapic_remove (unsigned int gsi_base)
|
|||
index = find_iosapic(gsi_base);
|
||||
if (index < 0) {
|
||||
printk(KERN_WARNING "%s: No IOSAPIC for GSI base %u\n",
|
||||
__FUNCTION__, gsi_base);
|
||||
__func__, gsi_base);
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (iosapic_lists[index].rtes_inuse) {
|
||||
err = -EBUSY;
|
||||
printk(KERN_WARNING "%s: IOSAPIC for GSI base %u is busy\n",
|
||||
__FUNCTION__, gsi_base);
|
||||
__func__, gsi_base);
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
@ -1135,7 +1137,7 @@ map_iosapic_to_node(unsigned int gsi_base, int node)
|
|||
index = find_iosapic(gsi_base);
|
||||
if (index < 0) {
|
||||
printk(KERN_WARNING "%s: No IOSAPIC for GSI %u\n",
|
||||
__FUNCTION__, gsi_base);
|
||||
__func__, gsi_base);
|
||||
return;
|
||||
}
|
||||
iosapic_lists[index].node = node;
|
||||
|
|
|
@ -260,6 +260,8 @@ void __setup_vector_irq(int cpu)
|
|||
}
|
||||
|
||||
#if defined(CONFIG_SMP) && (defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_DIG))
|
||||
#define IA64_IRQ_MOVE_VECTOR IA64_DEF_FIRST_DEVICE_VECTOR
|
||||
|
||||
static enum vector_domain_type {
|
||||
VECTOR_DOMAIN_NONE,
|
||||
VECTOR_DOMAIN_PERCPU
|
||||
|
@ -272,6 +274,101 @@ static cpumask_t vector_allocation_domain(int cpu)
|
|||
return CPU_MASK_ALL;
|
||||
}
|
||||
|
||||
static int __irq_prepare_move(int irq, int cpu)
|
||||
{
|
||||
struct irq_cfg *cfg = &irq_cfg[irq];
|
||||
int vector;
|
||||
cpumask_t domain;
|
||||
|
||||
if (cfg->move_in_progress || cfg->move_cleanup_count)
|
||||
return -EBUSY;
|
||||
if (cfg->vector == IRQ_VECTOR_UNASSIGNED || !cpu_online(cpu))
|
||||
return -EINVAL;
|
||||
if (cpu_isset(cpu, cfg->domain))
|
||||
return 0;
|
||||
domain = vector_allocation_domain(cpu);
|
||||
vector = find_unassigned_vector(domain);
|
||||
if (vector < 0)
|
||||
return -ENOSPC;
|
||||
cfg->move_in_progress = 1;
|
||||
cfg->old_domain = cfg->domain;
|
||||
cfg->vector = IRQ_VECTOR_UNASSIGNED;
|
||||
cfg->domain = CPU_MASK_NONE;
|
||||
BUG_ON(__bind_irq_vector(irq, vector, domain));
|
||||
return 0;
|
||||
}
|
||||
|
||||
int irq_prepare_move(int irq, int cpu)
|
||||
{
|
||||
unsigned long flags;
|
||||
int ret;
|
||||
|
||||
spin_lock_irqsave(&vector_lock, flags);
|
||||
ret = __irq_prepare_move(irq, cpu);
|
||||
spin_unlock_irqrestore(&vector_lock, flags);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void irq_complete_move(unsigned irq)
|
||||
{
|
||||
struct irq_cfg *cfg = &irq_cfg[irq];
|
||||
cpumask_t cleanup_mask;
|
||||
int i;
|
||||
|
||||
if (likely(!cfg->move_in_progress))
|
||||
return;
|
||||
|
||||
if (unlikely(cpu_isset(smp_processor_id(), cfg->old_domain)))
|
||||
return;
|
||||
|
||||
cpus_and(cleanup_mask, cfg->old_domain, cpu_online_map);
|
||||
cfg->move_cleanup_count = cpus_weight(cleanup_mask);
|
||||
for_each_cpu_mask(i, cleanup_mask)
|
||||
platform_send_ipi(i, IA64_IRQ_MOVE_VECTOR, IA64_IPI_DM_INT, 0);
|
||||
cfg->move_in_progress = 0;
|
||||
}
|
||||
|
||||
static irqreturn_t smp_irq_move_cleanup_interrupt(int irq, void *dev_id)
|
||||
{
|
||||
int me = smp_processor_id();
|
||||
ia64_vector vector;
|
||||
unsigned long flags;
|
||||
|
||||
for (vector = IA64_FIRST_DEVICE_VECTOR;
|
||||
vector < IA64_LAST_DEVICE_VECTOR; vector++) {
|
||||
int irq;
|
||||
struct irq_desc *desc;
|
||||
struct irq_cfg *cfg;
|
||||
irq = __get_cpu_var(vector_irq)[vector];
|
||||
if (irq < 0)
|
||||
continue;
|
||||
|
||||
desc = irq_desc + irq;
|
||||
cfg = irq_cfg + irq;
|
||||
spin_lock(&desc->lock);
|
||||
if (!cfg->move_cleanup_count)
|
||||
goto unlock;
|
||||
|
||||
if (!cpu_isset(me, cfg->old_domain))
|
||||
goto unlock;
|
||||
|
||||
spin_lock_irqsave(&vector_lock, flags);
|
||||
__get_cpu_var(vector_irq)[vector] = -1;
|
||||
cpu_clear(me, vector_table[vector]);
|
||||
spin_unlock_irqrestore(&vector_lock, flags);
|
||||
cfg->move_cleanup_count--;
|
||||
unlock:
|
||||
spin_unlock(&desc->lock);
|
||||
}
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
static struct irqaction irq_move_irqaction = {
|
||||
.handler = smp_irq_move_cleanup_interrupt,
|
||||
.flags = IRQF_DISABLED,
|
||||
.name = "irq_move"
|
||||
};
|
||||
|
||||
static int __init parse_vector_domain(char *arg)
|
||||
{
|
||||
if (!arg)
|
||||
|
@ -303,36 +400,6 @@ void destroy_and_reserve_irq(unsigned int irq)
|
|||
spin_unlock_irqrestore(&vector_lock, flags);
|
||||
}
|
||||
|
||||
static int __reassign_irq_vector(int irq, int cpu)
|
||||
{
|
||||
struct irq_cfg *cfg = &irq_cfg[irq];
|
||||
int vector;
|
||||
cpumask_t domain;
|
||||
|
||||
if (cfg->vector == IRQ_VECTOR_UNASSIGNED || !cpu_online(cpu))
|
||||
return -EINVAL;
|
||||
if (cpu_isset(cpu, cfg->domain))
|
||||
return 0;
|
||||
domain = vector_allocation_domain(cpu);
|
||||
vector = find_unassigned_vector(domain);
|
||||
if (vector < 0)
|
||||
return -ENOSPC;
|
||||
__clear_irq_vector(irq);
|
||||
BUG_ON(__bind_irq_vector(irq, vector, domain));
|
||||
return 0;
|
||||
}
|
||||
|
||||
int reassign_irq_vector(int irq, int cpu)
|
||||
{
|
||||
unsigned long flags;
|
||||
int ret;
|
||||
|
||||
spin_lock_irqsave(&vector_lock, flags);
|
||||
ret = __reassign_irq_vector(irq, cpu);
|
||||
spin_unlock_irqrestore(&vector_lock, flags);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* Dynamic irq allocate and deallocation for MSI
|
||||
*/
|
||||
|
@ -440,7 +507,7 @@ ia64_handle_irq (ia64_vector vector, struct pt_regs *regs)
|
|||
if (unlikely(irq < 0)) {
|
||||
printk(KERN_ERR "%s: Unexpected interrupt "
|
||||
"vector %d on CPU %d is not mapped "
|
||||
"to any IRQ!\n", __FUNCTION__, vector,
|
||||
"to any IRQ!\n", __func__, vector,
|
||||
smp_processor_id());
|
||||
} else
|
||||
generic_handle_irq(irq);
|
||||
|
@ -505,7 +572,7 @@ void ia64_process_pending_intr(void)
|
|||
if (unlikely(irq < 0)) {
|
||||
printk(KERN_ERR "%s: Unexpected interrupt "
|
||||
"vector %d on CPU %d not being mapped "
|
||||
"to any IRQ!!\n", __FUNCTION__, vector,
|
||||
"to any IRQ!!\n", __func__, vector,
|
||||
smp_processor_id());
|
||||
} else {
|
||||
vectors_in_migration[irq]=0;
|
||||
|
@ -578,6 +645,13 @@ init_IRQ (void)
|
|||
register_percpu_irq(IA64_IPI_VECTOR, &ipi_irqaction);
|
||||
register_percpu_irq(IA64_IPI_RESCHEDULE, &resched_irqaction);
|
||||
register_percpu_irq(IA64_IPI_LOCAL_TLB_FLUSH, &tlb_irqaction);
|
||||
#if defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_DIG)
|
||||
if (vector_domain_type != VECTOR_DOMAIN_NONE) {
|
||||
BUG_ON(IA64_FIRST_DEVICE_VECTOR != IA64_IRQ_MOVE_VECTOR);
|
||||
IA64_FIRST_DEVICE_VECTOR++;
|
||||
register_percpu_irq(IA64_IRQ_MOVE_VECTOR, &irq_move_irqaction);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#ifdef CONFIG_PERFMON
|
||||
pfm_init_percpu();
|
||||
|
@ -592,11 +666,7 @@ ia64_send_ipi (int cpu, int vector, int delivery_mode, int redirect)
|
|||
unsigned long ipi_data;
|
||||
unsigned long phys_cpu_id;
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
phys_cpu_id = cpu_physical_id(cpu);
|
||||
#else
|
||||
phys_cpu_id = (ia64_getreg(_IA64_REG_CR_LID) >> 16) & 0xffff;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* cpu number is in 8bit ID and 8bit EID
|
||||
|
|
|
@ -838,7 +838,7 @@ out:
|
|||
return 1;
|
||||
}
|
||||
|
||||
int __kprobes kprobes_fault_handler(struct pt_regs *regs, int trapnr)
|
||||
int __kprobes kprobe_fault_handler(struct pt_regs *regs, int trapnr)
|
||||
{
|
||||
struct kprobe *cur = kprobe_running();
|
||||
struct kprobe_ctlblk *kcb = get_kprobe_ctlblk();
|
||||
|
@ -1001,6 +1001,11 @@ int __kprobes setjmp_pre_handler(struct kprobe *p, struct pt_regs *regs)
|
|||
return 1;
|
||||
}
|
||||
|
||||
/* ia64 does not need this */
|
||||
void __kprobes jprobe_return(void)
|
||||
{
|
||||
}
|
||||
|
||||
int __kprobes longjmp_break_handler(struct kprobe *p, struct pt_regs *regs)
|
||||
{
|
||||
struct kprobe_ctlblk *kcb = get_kprobe_ctlblk();
|
||||
|
|
|
@ -413,8 +413,8 @@ ia64_log_get(int sal_info_type, u8 **buffer, int irq_safe)
|
|||
IA64_LOG_INDEX_INC(sal_info_type);
|
||||
IA64_LOG_UNLOCK(sal_info_type);
|
||||
if (irq_safe) {
|
||||
IA64_MCA_DEBUG("%s: SAL error record type %d retrieved. "
|
||||
"Record length = %ld\n", __FUNCTION__, sal_info_type, total_len);
|
||||
IA64_MCA_DEBUG("%s: SAL error record type %d retrieved. Record length = %ld\n",
|
||||
__func__, sal_info_type, total_len);
|
||||
}
|
||||
*buffer = (u8 *) log_buffer;
|
||||
return total_len;
|
||||
|
@ -518,7 +518,7 @@ ia64_mca_cpe_int_handler (int cpe_irq, void *arg)
|
|||
static DEFINE_SPINLOCK(cpe_history_lock);
|
||||
|
||||
IA64_MCA_DEBUG("%s: received interrupt vector = %#x on CPU %d\n",
|
||||
__FUNCTION__, cpe_irq, smp_processor_id());
|
||||
__func__, cpe_irq, smp_processor_id());
|
||||
|
||||
/* SAL spec states this should run w/ interrupts enabled */
|
||||
local_irq_enable();
|
||||
|
@ -594,7 +594,7 @@ ia64_mca_register_cpev (int cpev)
|
|||
}
|
||||
|
||||
IA64_MCA_DEBUG("%s: corrected platform error "
|
||||
"vector %#x registered\n", __FUNCTION__, cpev);
|
||||
"vector %#x registered\n", __func__, cpev);
|
||||
}
|
||||
#endif /* CONFIG_ACPI */
|
||||
|
||||
|
@ -621,12 +621,11 @@ ia64_mca_cmc_vector_setup (void)
|
|||
cmcv.cmcv_vector = IA64_CMC_VECTOR;
|
||||
ia64_setreg(_IA64_REG_CR_CMCV, cmcv.cmcv_regval);
|
||||
|
||||
IA64_MCA_DEBUG("%s: CPU %d corrected "
|
||||
"machine check vector %#x registered.\n",
|
||||
__FUNCTION__, smp_processor_id(), IA64_CMC_VECTOR);
|
||||
IA64_MCA_DEBUG("%s: CPU %d corrected machine check vector %#x registered.\n",
|
||||
__func__, smp_processor_id(), IA64_CMC_VECTOR);
|
||||
|
||||
IA64_MCA_DEBUG("%s: CPU %d CMCV = %#016lx\n",
|
||||
__FUNCTION__, smp_processor_id(), ia64_getreg(_IA64_REG_CR_CMCV));
|
||||
__func__, smp_processor_id(), ia64_getreg(_IA64_REG_CR_CMCV));
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -651,9 +650,8 @@ ia64_mca_cmc_vector_disable (void *dummy)
|
|||
cmcv.cmcv_mask = 1; /* Mask/disable interrupt */
|
||||
ia64_setreg(_IA64_REG_CR_CMCV, cmcv.cmcv_regval);
|
||||
|
||||
IA64_MCA_DEBUG("%s: CPU %d corrected "
|
||||
"machine check vector %#x disabled.\n",
|
||||
__FUNCTION__, smp_processor_id(), cmcv.cmcv_vector);
|
||||
IA64_MCA_DEBUG("%s: CPU %d corrected machine check vector %#x disabled.\n",
|
||||
__func__, smp_processor_id(), cmcv.cmcv_vector);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -678,9 +676,8 @@ ia64_mca_cmc_vector_enable (void *dummy)
|
|||
cmcv.cmcv_mask = 0; /* Unmask/enable interrupt */
|
||||
ia64_setreg(_IA64_REG_CR_CMCV, cmcv.cmcv_regval);
|
||||
|
||||
IA64_MCA_DEBUG("%s: CPU %d corrected "
|
||||
"machine check vector %#x enabled.\n",
|
||||
__FUNCTION__, smp_processor_id(), cmcv.cmcv_vector);
|
||||
IA64_MCA_DEBUG("%s: CPU %d corrected machine check vector %#x enabled.\n",
|
||||
__func__, smp_processor_id(), cmcv.cmcv_vector);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -767,7 +764,7 @@ ia64_mca_rendez_int_handler(int rendez_irq, void *arg)
|
|||
local_irq_save(flags);
|
||||
if (notify_die(DIE_MCA_RENDZVOUS_ENTER, "MCA", get_irq_regs(),
|
||||
(long)&nd, 0, 0) == NOTIFY_STOP)
|
||||
ia64_mca_spin(__FUNCTION__);
|
||||
ia64_mca_spin(__func__);
|
||||
|
||||
ia64_mc_info.imi_rendez_checkin[cpu] = IA64_MCA_RENDEZ_CHECKIN_DONE;
|
||||
/* Register with the SAL monarch that the slave has
|
||||
|
@ -777,7 +774,7 @@ ia64_mca_rendez_int_handler(int rendez_irq, void *arg)
|
|||
|
||||
if (notify_die(DIE_MCA_RENDZVOUS_PROCESS, "MCA", get_irq_regs(),
|
||||
(long)&nd, 0, 0) == NOTIFY_STOP)
|
||||
ia64_mca_spin(__FUNCTION__);
|
||||
ia64_mca_spin(__func__);
|
||||
|
||||
/* Wait for the monarch cpu to exit. */
|
||||
while (monarch_cpu != -1)
|
||||
|
@ -785,7 +782,7 @@ ia64_mca_rendez_int_handler(int rendez_irq, void *arg)
|
|||
|
||||
if (notify_die(DIE_MCA_RENDZVOUS_LEAVE, "MCA", get_irq_regs(),
|
||||
(long)&nd, 0, 0) == NOTIFY_STOP)
|
||||
ia64_mca_spin(__FUNCTION__);
|
||||
ia64_mca_spin(__func__);
|
||||
|
||||
ia64_mc_info.imi_rendez_checkin[cpu] = IA64_MCA_RENDEZ_CHECKIN_NOTDONE;
|
||||
/* Enable all interrupts */
|
||||
|
@ -1230,7 +1227,7 @@ ia64_mca_handler(struct pt_regs *regs, struct switch_stack *sw,
|
|||
|
||||
if (notify_die(DIE_MCA_MONARCH_ENTER, "MCA", regs, (long)&nd, 0, 0)
|
||||
== NOTIFY_STOP)
|
||||
ia64_mca_spin(__FUNCTION__);
|
||||
ia64_mca_spin(__func__);
|
||||
|
||||
ia64_mc_info.imi_rendez_checkin[cpu] = IA64_MCA_RENDEZ_CHECKIN_CONCURRENT_MCA;
|
||||
if (sos->monarch) {
|
||||
|
@ -1246,7 +1243,7 @@ ia64_mca_handler(struct pt_regs *regs, struct switch_stack *sw,
|
|||
ia64_mca_wakeup_all();
|
||||
if (notify_die(DIE_MCA_MONARCH_PROCESS, "MCA", regs, (long)&nd, 0, 0)
|
||||
== NOTIFY_STOP)
|
||||
ia64_mca_spin(__FUNCTION__);
|
||||
ia64_mca_spin(__func__);
|
||||
} else {
|
||||
while (cpu_isset(cpu, mca_cpu))
|
||||
cpu_relax(); /* spin until monarch wakes us */
|
||||
|
@ -1276,7 +1273,7 @@ ia64_mca_handler(struct pt_regs *regs, struct switch_stack *sw,
|
|||
}
|
||||
if (notify_die(DIE_MCA_MONARCH_LEAVE, "MCA", regs, (long)&nd, 0, recover)
|
||||
== NOTIFY_STOP)
|
||||
ia64_mca_spin(__FUNCTION__);
|
||||
ia64_mca_spin(__func__);
|
||||
|
||||
|
||||
if (atomic_dec_return(&mca_count) > 0) {
|
||||
|
@ -1328,7 +1325,7 @@ ia64_mca_cmc_int_handler(int cmc_irq, void *arg)
|
|||
static DEFINE_SPINLOCK(cmc_history_lock);
|
||||
|
||||
IA64_MCA_DEBUG("%s: received interrupt vector = %#x on CPU %d\n",
|
||||
__FUNCTION__, cmc_irq, smp_processor_id());
|
||||
__func__, cmc_irq, smp_processor_id());
|
||||
|
||||
/* SAL spec states this should run w/ interrupts enabled */
|
||||
local_irq_enable();
|
||||
|
@ -1614,7 +1611,7 @@ ia64_init_handler(struct pt_regs *regs, struct switch_stack *sw,
|
|||
*/
|
||||
if (!sos->monarch && atomic_add_return(1, &slaves) == num_online_cpus()) {
|
||||
mprintk(KERN_WARNING "%s: Promoting cpu %d to monarch.\n",
|
||||
__FUNCTION__, cpu);
|
||||
__func__, cpu);
|
||||
atomic_dec(&slaves);
|
||||
sos->monarch = 1;
|
||||
}
|
||||
|
@ -1626,7 +1623,7 @@ ia64_init_handler(struct pt_regs *regs, struct switch_stack *sw,
|
|||
*/
|
||||
if (sos->monarch && atomic_add_return(1, &monarchs) > 1) {
|
||||
mprintk(KERN_WARNING "%s: Demoting cpu %d to slave.\n",
|
||||
__FUNCTION__, cpu);
|
||||
__func__, cpu);
|
||||
atomic_dec(&monarchs);
|
||||
sos->monarch = 0;
|
||||
}
|
||||
|
@ -1637,15 +1634,15 @@ ia64_init_handler(struct pt_regs *regs, struct switch_stack *sw,
|
|||
cpu_relax(); /* spin until monarch enters */
|
||||
if (notify_die(DIE_INIT_SLAVE_ENTER, "INIT", regs, (long)&nd, 0, 0)
|
||||
== NOTIFY_STOP)
|
||||
ia64_mca_spin(__FUNCTION__);
|
||||
ia64_mca_spin(__func__);
|
||||
if (notify_die(DIE_INIT_SLAVE_PROCESS, "INIT", regs, (long)&nd, 0, 0)
|
||||
== NOTIFY_STOP)
|
||||
ia64_mca_spin(__FUNCTION__);
|
||||
ia64_mca_spin(__func__);
|
||||
while (monarch_cpu != -1)
|
||||
cpu_relax(); /* spin until monarch leaves */
|
||||
if (notify_die(DIE_INIT_SLAVE_LEAVE, "INIT", regs, (long)&nd, 0, 0)
|
||||
== NOTIFY_STOP)
|
||||
ia64_mca_spin(__FUNCTION__);
|
||||
ia64_mca_spin(__func__);
|
||||
mprintk("Slave on cpu %d returning to normal service.\n", cpu);
|
||||
set_curr_task(cpu, previous_current);
|
||||
ia64_mc_info.imi_rendez_checkin[cpu] = IA64_MCA_RENDEZ_CHECKIN_NOTDONE;
|
||||
|
@ -1656,7 +1653,7 @@ ia64_init_handler(struct pt_regs *regs, struct switch_stack *sw,
|
|||
monarch_cpu = cpu;
|
||||
if (notify_die(DIE_INIT_MONARCH_ENTER, "INIT", regs, (long)&nd, 0, 0)
|
||||
== NOTIFY_STOP)
|
||||
ia64_mca_spin(__FUNCTION__);
|
||||
ia64_mca_spin(__func__);
|
||||
|
||||
/*
|
||||
* Wait for a bit. On some machines (e.g., HP's zx2000 and zx6000, INIT can be
|
||||
|
@ -1673,10 +1670,10 @@ ia64_init_handler(struct pt_regs *regs, struct switch_stack *sw,
|
|||
*/
|
||||
if (notify_die(DIE_INIT_MONARCH_PROCESS, "INIT", regs, (long)&nd, 0, 0)
|
||||
== NOTIFY_STOP)
|
||||
ia64_mca_spin(__FUNCTION__);
|
||||
ia64_mca_spin(__func__);
|
||||
if (notify_die(DIE_INIT_MONARCH_LEAVE, "INIT", regs, (long)&nd, 0, 0)
|
||||
== NOTIFY_STOP)
|
||||
ia64_mca_spin(__FUNCTION__);
|
||||
ia64_mca_spin(__func__);
|
||||
mprintk("\nINIT dump complete. Monarch on cpu %d returning to normal service.\n", cpu);
|
||||
atomic_dec(&monarchs);
|
||||
set_curr_task(cpu, previous_current);
|
||||
|
@ -1884,7 +1881,7 @@ ia64_mca_init(void)
|
|||
.priority = 0/* we need to notified last */
|
||||
};
|
||||
|
||||
IA64_MCA_DEBUG("%s: begin\n", __FUNCTION__);
|
||||
IA64_MCA_DEBUG("%s: begin\n", __func__);
|
||||
|
||||
/* Clear the Rendez checkin flag for all cpus */
|
||||
for(i = 0 ; i < NR_CPUS; i++)
|
||||
|
@ -1928,7 +1925,7 @@ ia64_mca_init(void)
|
|||
return;
|
||||
}
|
||||
|
||||
IA64_MCA_DEBUG("%s: registered MCA rendezvous spinloop and wakeup mech.\n", __FUNCTION__);
|
||||
IA64_MCA_DEBUG("%s: registered MCA rendezvous spinloop and wakeup mech.\n", __func__);
|
||||
|
||||
ia64_mc_info.imi_mca_handler = ia64_tpa(mca_hldlr_ptr->fp);
|
||||
/*
|
||||
|
@ -1949,7 +1946,7 @@ ia64_mca_init(void)
|
|||
return;
|
||||
}
|
||||
|
||||
IA64_MCA_DEBUG("%s: registered OS MCA handler with SAL at 0x%lx, gp = 0x%lx\n", __FUNCTION__,
|
||||
IA64_MCA_DEBUG("%s: registered OS MCA handler with SAL at 0x%lx, gp = 0x%lx\n", __func__,
|
||||
ia64_mc_info.imi_mca_handler, ia64_tpa(mca_hldlr_ptr->gp));
|
||||
|
||||
/*
|
||||
|
@ -1961,7 +1958,7 @@ ia64_mca_init(void)
|
|||
ia64_mc_info.imi_slave_init_handler = ia64_tpa(init_hldlr_ptr_slave->fp);
|
||||
ia64_mc_info.imi_slave_init_handler_size = 0;
|
||||
|
||||
IA64_MCA_DEBUG("%s: OS INIT handler at %lx\n", __FUNCTION__,
|
||||
IA64_MCA_DEBUG("%s: OS INIT handler at %lx\n", __func__,
|
||||
ia64_mc_info.imi_monarch_init_handler);
|
||||
|
||||
/* Register the os init handler with SAL */
|
||||
|
@ -1982,7 +1979,7 @@ ia64_mca_init(void)
|
|||
return;
|
||||
}
|
||||
|
||||
IA64_MCA_DEBUG("%s: registered OS INIT handler with SAL\n", __FUNCTION__);
|
||||
IA64_MCA_DEBUG("%s: registered OS INIT handler with SAL\n", __func__);
|
||||
|
||||
/*
|
||||
* Configure the CMCI/P vector and handler. Interrupts for CMC are
|
||||
|
@ -2042,7 +2039,7 @@ ia64_mca_late_init(void)
|
|||
cmc_polling_enabled = 0;
|
||||
schedule_work(&cmc_enable_work);
|
||||
|
||||
IA64_MCA_DEBUG("%s: CMCI/P setup and enabled.\n", __FUNCTION__);
|
||||
IA64_MCA_DEBUG("%s: CMCI/P setup and enabled.\n", __func__);
|
||||
|
||||
#ifdef CONFIG_ACPI
|
||||
/* Setup the CPEI/P vector and handler */
|
||||
|
@ -2065,17 +2062,17 @@ ia64_mca_late_init(void)
|
|||
ia64_cpe_irq = irq;
|
||||
ia64_mca_register_cpev(cpe_vector);
|
||||
IA64_MCA_DEBUG("%s: CPEI/P setup and enabled.\n",
|
||||
__FUNCTION__);
|
||||
__func__);
|
||||
return 0;
|
||||
}
|
||||
printk(KERN_ERR "%s: Failed to find irq for CPE "
|
||||
"interrupt handler, vector %d\n",
|
||||
__FUNCTION__, cpe_vector);
|
||||
__func__, cpe_vector);
|
||||
}
|
||||
/* If platform doesn't support CPEI, get the timer going. */
|
||||
if (cpe_poll_enabled) {
|
||||
ia64_mca_cpe_poll(0UL);
|
||||
IA64_MCA_DEBUG("%s: CPEP setup and enabled.\n", __FUNCTION__);
|
||||
IA64_MCA_DEBUG("%s: CPEP setup and enabled.\n", __func__);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -493,7 +493,7 @@ module_frob_arch_sections (Elf_Ehdr *ehdr, Elf_Shdr *sechdrs, char *secstrings,
|
|||
mod->arch.opd->sh_addralign = 8;
|
||||
mod->arch.opd->sh_size = fdescs * sizeof(struct fdesc);
|
||||
DEBUGP("%s: core.plt=%lx, init.plt=%lx, got=%lx, fdesc=%lx\n",
|
||||
__FUNCTION__, mod->arch.core_plt->sh_size, mod->arch.init_plt->sh_size,
|
||||
__func__, mod->arch.core_plt->sh_size, mod->arch.init_plt->sh_size,
|
||||
mod->arch.got->sh_size, mod->arch.opd->sh_size);
|
||||
return 0;
|
||||
}
|
||||
|
@ -585,7 +585,7 @@ get_plt (struct module *mod, const struct insn *insn, uint64_t value, int *okp)
|
|||
#if ARCH_MODULE_DEBUG
|
||||
if (plt_target(plt) != target_ip) {
|
||||
printk("%s: mistargeted PLT: wanted %lx, got %lx\n",
|
||||
__FUNCTION__, target_ip, plt_target(plt));
|
||||
__func__, target_ip, plt_target(plt));
|
||||
*okp = 0;
|
||||
return 0;
|
||||
}
|
||||
|
@ -703,7 +703,7 @@ do_reloc (struct module *mod, uint8_t r_type, Elf64_Sym *sym, uint64_t addend,
|
|||
if (r_type == R_IA64_PCREL21BI) {
|
||||
if (!is_internal(mod, val)) {
|
||||
printk(KERN_ERR "%s: %s reloc against non-local symbol (%lx)\n",
|
||||
__FUNCTION__, reloc_name[r_type], val);
|
||||
__func__, reloc_name[r_type], val);
|
||||
return -ENOEXEC;
|
||||
}
|
||||
format = RF_INSN21B;
|
||||
|
@ -737,7 +737,7 @@ do_reloc (struct module *mod, uint8_t r_type, Elf64_Sym *sym, uint64_t addend,
|
|||
case R_IA64_LDXMOV:
|
||||
if (gp_addressable(mod, val)) {
|
||||
/* turn "ld8" into "mov": */
|
||||
DEBUGP("%s: patching ld8 at %p to mov\n", __FUNCTION__, location);
|
||||
DEBUGP("%s: patching ld8 at %p to mov\n", __func__, location);
|
||||
ia64_patch((u64) location, 0x1fff80fe000UL, 0x10000000000UL);
|
||||
}
|
||||
return 0;
|
||||
|
@ -771,7 +771,7 @@ do_reloc (struct module *mod, uint8_t r_type, Elf64_Sym *sym, uint64_t addend,
|
|||
if (!ok)
|
||||
return -ENOEXEC;
|
||||
|
||||
DEBUGP("%s: [%p]<-%016lx = %s(%lx)\n", __FUNCTION__, location, val,
|
||||
DEBUGP("%s: [%p]<-%016lx = %s(%lx)\n", __func__, location, val,
|
||||
reloc_name[r_type] ? reloc_name[r_type] : "?", sym->st_value + addend);
|
||||
|
||||
switch (format) {
|
||||
|
@ -807,7 +807,7 @@ apply_relocate_add (Elf64_Shdr *sechdrs, const char *strtab, unsigned int symind
|
|||
Elf64_Shdr *target_sec;
|
||||
int ret;
|
||||
|
||||
DEBUGP("%s: applying section %u (%u relocs) to %u\n", __FUNCTION__,
|
||||
DEBUGP("%s: applying section %u (%u relocs) to %u\n", __func__,
|
||||
relsec, n, sechdrs[relsec].sh_info);
|
||||
|
||||
target_sec = sechdrs + sechdrs[relsec].sh_info;
|
||||
|
@ -835,7 +835,7 @@ apply_relocate_add (Elf64_Shdr *sechdrs, const char *strtab, unsigned int symind
|
|||
gp = mod->core_size / 2;
|
||||
gp = (uint64_t) mod->module_core + ((gp + 7) & -8);
|
||||
mod->arch.gp = gp;
|
||||
DEBUGP("%s: placing gp at 0x%lx\n", __FUNCTION__, gp);
|
||||
DEBUGP("%s: placing gp at 0x%lx\n", __func__, gp);
|
||||
}
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
|
@ -903,7 +903,7 @@ register_unwind_table (struct module *mod)
|
|||
init = start + num_core;
|
||||
}
|
||||
|
||||
DEBUGP("%s: name=%s, gp=%lx, num_init=%lu, num_core=%lu\n", __FUNCTION__,
|
||||
DEBUGP("%s: name=%s, gp=%lx, num_init=%lu, num_core=%lu\n", __func__,
|
||||
mod->name, mod->arch.gp, num_init, num_core);
|
||||
|
||||
/*
|
||||
|
@ -912,13 +912,13 @@ register_unwind_table (struct module *mod)
|
|||
if (num_core > 0) {
|
||||
mod->arch.core_unw_table = unw_add_unwind_table(mod->name, 0, mod->arch.gp,
|
||||
core, core + num_core);
|
||||
DEBUGP("%s: core: handle=%p [%p-%p)\n", __FUNCTION__,
|
||||
DEBUGP("%s: core: handle=%p [%p-%p)\n", __func__,
|
||||
mod->arch.core_unw_table, core, core + num_core);
|
||||
}
|
||||
if (num_init > 0) {
|
||||
mod->arch.init_unw_table = unw_add_unwind_table(mod->name, 0, mod->arch.gp,
|
||||
init, init + num_init);
|
||||
DEBUGP("%s: init: handle=%p [%p-%p)\n", __FUNCTION__,
|
||||
DEBUGP("%s: init: handle=%p [%p-%p)\n", __func__,
|
||||
mod->arch.init_unw_table, init, init + num_init);
|
||||
}
|
||||
}
|
||||
|
@ -926,7 +926,7 @@ register_unwind_table (struct module *mod)
|
|||
int
|
||||
module_finalize (const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, struct module *mod)
|
||||
{
|
||||
DEBUGP("%s: init: entry=%p\n", __FUNCTION__, mod->init);
|
||||
DEBUGP("%s: init: entry=%p\n", __func__, mod->init);
|
||||
if (mod->arch.unwind)
|
||||
register_unwind_table(mod);
|
||||
return 0;
|
||||
|
|
|
@ -57,7 +57,7 @@ static void ia64_set_msi_irq_affinity(unsigned int irq, cpumask_t cpu_mask)
|
|||
if (!cpu_online(cpu))
|
||||
return;
|
||||
|
||||
if (reassign_irq_vector(irq, cpu))
|
||||
if (irq_prepare_move(irq, cpu))
|
||||
return;
|
||||
|
||||
read_msi_msg(irq, &msg);
|
||||
|
@ -119,6 +119,7 @@ void ia64_teardown_msi_irq(unsigned int irq)
|
|||
|
||||
static void ia64_ack_msi_irq(unsigned int irq)
|
||||
{
|
||||
irq_complete_move(irq);
|
||||
move_native_irq(irq);
|
||||
ia64_eoi();
|
||||
}
|
||||
|
|
|
@ -227,12 +227,12 @@
|
|||
#ifdef PFM_DEBUGGING
|
||||
#define DPRINT(a) \
|
||||
do { \
|
||||
if (unlikely(pfm_sysctl.debug >0)) { printk("%s.%d: CPU%d [%d] ", __FUNCTION__, __LINE__, smp_processor_id(), task_pid_nr(current)); printk a; } \
|
||||
if (unlikely(pfm_sysctl.debug >0)) { printk("%s.%d: CPU%d [%d] ", __func__, __LINE__, smp_processor_id(), task_pid_nr(current)); printk a; } \
|
||||
} while (0)
|
||||
|
||||
#define DPRINT_ovfl(a) \
|
||||
do { \
|
||||
if (unlikely(pfm_sysctl.debug > 0 && pfm_sysctl.debug_ovfl >0)) { printk("%s.%d: CPU%d [%d] ", __FUNCTION__, __LINE__, smp_processor_id(), task_pid_nr(current)); printk a; } \
|
||||
if (unlikely(pfm_sysctl.debug > 0 && pfm_sysctl.debug_ovfl >0)) { printk("%s.%d: CPU%d [%d] ", __func__, __LINE__, smp_processor_id(), task_pid_nr(current)); printk a; } \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
|
|
|
@ -24,12 +24,12 @@ MODULE_LICENSE("GPL");
|
|||
#ifdef DEFAULT_DEBUG
|
||||
#define DPRINT(a) \
|
||||
do { \
|
||||
if (unlikely(pfm_sysctl.debug >0)) { printk("%s.%d: CPU%d ", __FUNCTION__, __LINE__, smp_processor_id()); printk a; } \
|
||||
if (unlikely(pfm_sysctl.debug >0)) { printk("%s.%d: CPU%d ", __func__, __LINE__, smp_processor_id()); printk a; } \
|
||||
} while (0)
|
||||
|
||||
#define DPRINT_ovfl(a) \
|
||||
do { \
|
||||
if (unlikely(pfm_sysctl.debug > 0 && pfm_sysctl.debug_ovfl >0)) { printk("%s.%d: CPU%d ", __FUNCTION__, __LINE__, smp_processor_id()); printk a; } \
|
||||
if (unlikely(pfm_sysctl.debug > 0 && pfm_sysctl.debug_ovfl >0)) { printk("%s.%d: CPU%d ", __func__, __LINE__, smp_processor_id()); printk a; } \
|
||||
} while (0)
|
||||
|
||||
#else
|
||||
|
|
|
@ -697,52 +697,6 @@ thread_matches (struct task_struct *thread, unsigned long addr)
|
|||
return 1; /* looks like we've got a winner */
|
||||
}
|
||||
|
||||
/*
|
||||
* GDB apparently wants to be able to read the register-backing store
|
||||
* of any thread when attached to a given process. If we are peeking
|
||||
* or poking an address that happens to reside in the kernel-backing
|
||||
* store of another thread, we need to attach to that thread, because
|
||||
* otherwise we end up accessing stale data.
|
||||
*
|
||||
* task_list_lock must be read-locked before calling this routine!
|
||||
*/
|
||||
static struct task_struct *
|
||||
find_thread_for_addr (struct task_struct *child, unsigned long addr)
|
||||
{
|
||||
struct task_struct *p;
|
||||
struct mm_struct *mm;
|
||||
struct list_head *this, *next;
|
||||
int mm_users;
|
||||
|
||||
if (!(mm = get_task_mm(child)))
|
||||
return child;
|
||||
|
||||
/* -1 because of our get_task_mm(): */
|
||||
mm_users = atomic_read(&mm->mm_users) - 1;
|
||||
if (mm_users <= 1)
|
||||
goto out; /* not multi-threaded */
|
||||
|
||||
/*
|
||||
* Traverse the current process' children list. Every task that
|
||||
* one attaches to becomes a child. And it is only attached children
|
||||
* of the debugger that are of interest (ptrace_check_attach checks
|
||||
* for this).
|
||||
*/
|
||||
list_for_each_safe(this, next, ¤t->children) {
|
||||
p = list_entry(this, struct task_struct, sibling);
|
||||
if (p->tgid != child->tgid)
|
||||
continue;
|
||||
if (thread_matches(p, addr)) {
|
||||
child = p;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
out:
|
||||
mmput(mm);
|
||||
return child;
|
||||
}
|
||||
|
||||
/*
|
||||
* Write f32-f127 back to task->thread.fph if it has been modified.
|
||||
*/
|
||||
|
@ -826,14 +780,14 @@ convert_to_non_syscall (struct task_struct *child, struct pt_regs *pt,
|
|||
if ((long)((unsigned long)child + IA64_STK_OFFSET - sp)
|
||||
< IA64_PT_REGS_SIZE) {
|
||||
dprintk("ptrace.%s: ran off the top of the kernel "
|
||||
"stack\n", __FUNCTION__);
|
||||
"stack\n", __func__);
|
||||
return;
|
||||
}
|
||||
if (unw_get_pr (&prev_info, &pr) < 0) {
|
||||
unw_get_rp(&prev_info, &ip);
|
||||
dprintk("ptrace.%s: failed to read "
|
||||
"predicate register (ip=0x%lx)\n",
|
||||
__FUNCTION__, ip);
|
||||
__func__, ip);
|
||||
return;
|
||||
}
|
||||
if (unw_is_intr_frame(&info)
|
||||
|
@ -908,7 +862,7 @@ static int
|
|||
access_uarea (struct task_struct *child, unsigned long addr,
|
||||
unsigned long *data, int write_access)
|
||||
{
|
||||
unsigned long *ptr, regnum, urbs_end, rnat_addr, cfm;
|
||||
unsigned long *ptr, regnum, urbs_end, cfm;
|
||||
struct switch_stack *sw;
|
||||
struct pt_regs *pt;
|
||||
# define pt_reg_addr(pt, reg) ((void *) \
|
||||
|
@ -1011,14 +965,9 @@ access_uarea (struct task_struct *child, unsigned long addr,
|
|||
* the kernel was entered.
|
||||
*
|
||||
* Furthermore, when changing the contents of
|
||||
* PT_AR_BSP (or PT_CFM) we MUST copy any
|
||||
* users-level stacked registers that are
|
||||
* stored on the kernel stack back to
|
||||
* user-space because otherwise, we might end
|
||||
* up clobbering kernel stacked registers.
|
||||
* Also, if this happens while the task is
|
||||
* blocked in a system call, which convert the
|
||||
* state such that the non-system-call exit
|
||||
* PT_AR_BSP (or PT_CFM) while the task is
|
||||
* blocked in a system call, convert the state
|
||||
* so that the non-system-call exit
|
||||
* path is used. This ensures that the proper
|
||||
* state will be picked up when resuming
|
||||
* execution. However, it *also* means that
|
||||
|
@ -1035,10 +984,6 @@ access_uarea (struct task_struct *child, unsigned long addr,
|
|||
urbs_end = ia64_get_user_rbs_end(child, pt, &cfm);
|
||||
if (write_access) {
|
||||
if (*data != urbs_end) {
|
||||
if (ia64_sync_user_rbs(child, sw,
|
||||
pt->ar_bspstore,
|
||||
urbs_end) < 0)
|
||||
return -1;
|
||||
if (in_syscall(pt))
|
||||
convert_to_non_syscall(child,
|
||||
pt,
|
||||
|
@ -1058,10 +1003,6 @@ access_uarea (struct task_struct *child, unsigned long addr,
|
|||
urbs_end = ia64_get_user_rbs_end(child, pt, &cfm);
|
||||
if (write_access) {
|
||||
if (((cfm ^ *data) & PFM_MASK) != 0) {
|
||||
if (ia64_sync_user_rbs(child, sw,
|
||||
pt->ar_bspstore,
|
||||
urbs_end) < 0)
|
||||
return -1;
|
||||
if (in_syscall(pt))
|
||||
convert_to_non_syscall(child,
|
||||
pt,
|
||||
|
@ -1093,16 +1034,8 @@ access_uarea (struct task_struct *child, unsigned long addr,
|
|||
return 0;
|
||||
|
||||
case PT_AR_RNAT:
|
||||
urbs_end = ia64_get_user_rbs_end(child, pt, NULL);
|
||||
rnat_addr = (long) ia64_rse_rnat_addr((long *)
|
||||
urbs_end);
|
||||
if (write_access)
|
||||
return ia64_poke(child, sw, urbs_end,
|
||||
rnat_addr, *data);
|
||||
else
|
||||
return ia64_peek(child, sw, urbs_end,
|
||||
rnat_addr, data);
|
||||
|
||||
ptr = pt_reg_addr(pt, ar_rnat);
|
||||
break;
|
||||
case PT_R1:
|
||||
ptr = pt_reg_addr(pt, r1);
|
||||
break;
|
||||
|
@ -1521,13 +1454,26 @@ ptrace_setregs (struct task_struct *child, struct pt_all_user_regs __user *ppr)
|
|||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* Called by kernel/ptrace.c when detaching..
|
||||
*
|
||||
* Make sure the single step bit is not set.
|
||||
*/
|
||||
void
|
||||
ptrace_disable (struct task_struct *child)
|
||||
user_enable_single_step (struct task_struct *child)
|
||||
{
|
||||
struct ia64_psr *child_psr = ia64_psr(task_pt_regs(child));
|
||||
|
||||
set_tsk_thread_flag(child, TIF_SINGLESTEP);
|
||||
child_psr->ss = 1;
|
||||
}
|
||||
|
||||
void
|
||||
user_enable_block_step (struct task_struct *child)
|
||||
{
|
||||
struct ia64_psr *child_psr = ia64_psr(task_pt_regs(child));
|
||||
|
||||
set_tsk_thread_flag(child, TIF_SINGLESTEP);
|
||||
child_psr->tb = 1;
|
||||
}
|
||||
|
||||
void
|
||||
user_disable_single_step (struct task_struct *child)
|
||||
{
|
||||
struct ia64_psr *child_psr = ia64_psr(task_pt_regs(child));
|
||||
|
||||
|
@ -1537,199 +1483,68 @@ ptrace_disable (struct task_struct *child)
|
|||
child_psr->tb = 0;
|
||||
}
|
||||
|
||||
asmlinkage long
|
||||
sys_ptrace (long request, pid_t pid, unsigned long addr, unsigned long data)
|
||||
/*
|
||||
* Called by kernel/ptrace.c when detaching..
|
||||
*
|
||||
* Make sure the single step bit is not set.
|
||||
*/
|
||||
void
|
||||
ptrace_disable (struct task_struct *child)
|
||||
{
|
||||
struct pt_regs *pt;
|
||||
unsigned long urbs_end, peek_or_poke;
|
||||
struct task_struct *child;
|
||||
struct switch_stack *sw;
|
||||
long ret;
|
||||
struct unw_frame_info info;
|
||||
|
||||
lock_kernel();
|
||||
ret = -EPERM;
|
||||
if (request == PTRACE_TRACEME) {
|
||||
ret = ptrace_traceme();
|
||||
goto out;
|
||||
user_disable_single_step(child);
|
||||
}
|
||||
|
||||
peek_or_poke = (request == PTRACE_PEEKTEXT
|
||||
|| request == PTRACE_PEEKDATA
|
||||
|| request == PTRACE_POKETEXT
|
||||
|| request == PTRACE_POKEDATA);
|
||||
ret = -ESRCH;
|
||||
read_lock(&tasklist_lock);
|
||||
long
|
||||
arch_ptrace (struct task_struct *child, long request, long addr, long data)
|
||||
{
|
||||
child = find_task_by_pid(pid);
|
||||
if (child) {
|
||||
if (peek_or_poke)
|
||||
child = find_thread_for_addr(child, addr);
|
||||
get_task_struct(child);
|
||||
}
|
||||
}
|
||||
read_unlock(&tasklist_lock);
|
||||
if (!child)
|
||||
goto out;
|
||||
ret = -EPERM;
|
||||
if (pid == 1) /* no messing around with init! */
|
||||
goto out_tsk;
|
||||
|
||||
if (request == PTRACE_ATTACH) {
|
||||
ret = ptrace_attach(child);
|
||||
if (!ret)
|
||||
arch_ptrace_attach(child);
|
||||
goto out_tsk;
|
||||
}
|
||||
|
||||
ret = ptrace_check_attach(child, request == PTRACE_KILL);
|
||||
if (ret < 0)
|
||||
goto out_tsk;
|
||||
|
||||
pt = task_pt_regs(child);
|
||||
sw = (struct switch_stack *) (child->thread.ksp + 16);
|
||||
|
||||
switch (request) {
|
||||
case PTRACE_PEEKTEXT:
|
||||
case PTRACE_PEEKDATA:
|
||||
/* read word at location addr */
|
||||
urbs_end = ia64_get_user_rbs_end(child, pt, NULL);
|
||||
ret = ia64_peek(child, sw, urbs_end, addr, &data);
|
||||
if (ret == 0) {
|
||||
ret = data;
|
||||
/* ensure "ret" is not mistaken as an error code: */
|
||||
if (access_process_vm(child, addr, &data, sizeof(data), 0)
|
||||
!= sizeof(data))
|
||||
return -EIO;
|
||||
/* ensure return value is not mistaken for error code */
|
||||
force_successful_syscall_return();
|
||||
}
|
||||
goto out_tsk;
|
||||
return data;
|
||||
|
||||
case PTRACE_POKETEXT:
|
||||
case PTRACE_POKEDATA:
|
||||
/* write the word at location addr */
|
||||
urbs_end = ia64_get_user_rbs_end(child, pt, NULL);
|
||||
ret = ia64_poke(child, sw, urbs_end, addr, data);
|
||||
|
||||
/* Make sure user RBS has the latest data */
|
||||
unw_init_from_blocked_task(&info, child);
|
||||
do_sync_rbs(&info, ia64_sync_user_rbs);
|
||||
|
||||
goto out_tsk;
|
||||
/* PTRACE_POKETEXT and PTRACE_POKEDATA is handled
|
||||
* by the generic ptrace_request().
|
||||
*/
|
||||
|
||||
case PTRACE_PEEKUSR:
|
||||
/* read the word at addr in the USER area */
|
||||
if (access_uarea(child, addr, &data, 0) < 0) {
|
||||
ret = -EIO;
|
||||
goto out_tsk;
|
||||
}
|
||||
ret = data;
|
||||
/* ensure "ret" is not mistaken as an error code */
|
||||
if (access_uarea(child, addr, &data, 0) < 0)
|
||||
return -EIO;
|
||||
/* ensure return value is not mistaken for error code */
|
||||
force_successful_syscall_return();
|
||||
goto out_tsk;
|
||||
return data;
|
||||
|
||||
case PTRACE_POKEUSR:
|
||||
/* write the word at addr in the USER area */
|
||||
if (access_uarea(child, addr, &data, 1) < 0) {
|
||||
ret = -EIO;
|
||||
goto out_tsk;
|
||||
}
|
||||
ret = 0;
|
||||
goto out_tsk;
|
||||
if (access_uarea(child, addr, &data, 1) < 0)
|
||||
return -EIO;
|
||||
return 0;
|
||||
|
||||
case PTRACE_OLD_GETSIGINFO:
|
||||
/* for backwards-compatibility */
|
||||
ret = ptrace_request(child, PTRACE_GETSIGINFO, addr, data);
|
||||
goto out_tsk;
|
||||
return ptrace_request(child, PTRACE_GETSIGINFO, addr, data);
|
||||
|
||||
case PTRACE_OLD_SETSIGINFO:
|
||||
/* for backwards-compatibility */
|
||||
ret = ptrace_request(child, PTRACE_SETSIGINFO, addr, data);
|
||||
goto out_tsk;
|
||||
|
||||
case PTRACE_SYSCALL:
|
||||
/* continue and stop at next (return from) syscall */
|
||||
case PTRACE_CONT:
|
||||
/* restart after signal. */
|
||||
ret = -EIO;
|
||||
if (!valid_signal(data))
|
||||
goto out_tsk;
|
||||
if (request == PTRACE_SYSCALL)
|
||||
set_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
|
||||
else
|
||||
clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
|
||||
child->exit_code = data;
|
||||
|
||||
/*
|
||||
* Make sure the single step/taken-branch trap bits
|
||||
* are not set:
|
||||
*/
|
||||
clear_tsk_thread_flag(child, TIF_SINGLESTEP);
|
||||
ia64_psr(pt)->ss = 0;
|
||||
ia64_psr(pt)->tb = 0;
|
||||
|
||||
wake_up_process(child);
|
||||
ret = 0;
|
||||
goto out_tsk;
|
||||
|
||||
case PTRACE_KILL:
|
||||
/*
|
||||
* Make the child exit. Best I can do is send it a
|
||||
* sigkill. Perhaps it should be put in the status
|
||||
* that it wants to exit.
|
||||
*/
|
||||
if (child->exit_state == EXIT_ZOMBIE)
|
||||
/* already dead */
|
||||
goto out_tsk;
|
||||
child->exit_code = SIGKILL;
|
||||
|
||||
ptrace_disable(child);
|
||||
wake_up_process(child);
|
||||
ret = 0;
|
||||
goto out_tsk;
|
||||
|
||||
case PTRACE_SINGLESTEP:
|
||||
/* let child execute for one instruction */
|
||||
case PTRACE_SINGLEBLOCK:
|
||||
ret = -EIO;
|
||||
if (!valid_signal(data))
|
||||
goto out_tsk;
|
||||
|
||||
clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
|
||||
set_tsk_thread_flag(child, TIF_SINGLESTEP);
|
||||
if (request == PTRACE_SINGLESTEP) {
|
||||
ia64_psr(pt)->ss = 1;
|
||||
} else {
|
||||
ia64_psr(pt)->tb = 1;
|
||||
}
|
||||
child->exit_code = data;
|
||||
|
||||
/* give it a chance to run. */
|
||||
wake_up_process(child);
|
||||
ret = 0;
|
||||
goto out_tsk;
|
||||
|
||||
case PTRACE_DETACH:
|
||||
/* detach a process that was attached. */
|
||||
ret = ptrace_detach(child, data);
|
||||
goto out_tsk;
|
||||
return ptrace_request(child, PTRACE_SETSIGINFO, addr, data);
|
||||
|
||||
case PTRACE_GETREGS:
|
||||
ret = ptrace_getregs(child,
|
||||
return ptrace_getregs(child,
|
||||
(struct pt_all_user_regs __user *) data);
|
||||
goto out_tsk;
|
||||
|
||||
case PTRACE_SETREGS:
|
||||
ret = ptrace_setregs(child,
|
||||
return ptrace_setregs(child,
|
||||
(struct pt_all_user_regs __user *) data);
|
||||
goto out_tsk;
|
||||
|
||||
default:
|
||||
ret = ptrace_request(child, request, addr, data);
|
||||
goto out_tsk;
|
||||
return ptrace_request(child, request, addr, data);
|
||||
}
|
||||
out_tsk:
|
||||
put_task_struct(child);
|
||||
out:
|
||||
unlock_kernel();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -109,6 +109,13 @@ check_versions (struct ia64_sal_systab *systab)
|
|||
sal_revision = SAL_VERSION_CODE(2, 8);
|
||||
sal_version = SAL_VERSION_CODE(0, 0);
|
||||
}
|
||||
|
||||
if (ia64_platform_is("sn2") && (sal_revision == SAL_VERSION_CODE(2, 9)))
|
||||
/*
|
||||
* SGI Altix has hard-coded version 2.9 in their prom
|
||||
* but they actually implement 3.2, so let's fix it here.
|
||||
*/
|
||||
sal_revision = SAL_VERSION_CODE(3, 2);
|
||||
}
|
||||
|
||||
static void __init
|
||||
|
|
|
@ -690,7 +690,7 @@ get_model_name(__u8 family, __u8 model)
|
|||
if (overflow++ == 0)
|
||||
printk(KERN_ERR
|
||||
"%s: Table overflow. Some processor model information will be missing\n",
|
||||
__FUNCTION__);
|
||||
__func__);
|
||||
return "Unknown";
|
||||
}
|
||||
|
||||
|
@ -785,7 +785,7 @@ get_max_cacheline_size (void)
|
|||
status = ia64_pal_cache_summary(&levels, &unique_caches);
|
||||
if (status != 0) {
|
||||
printk(KERN_ERR "%s: ia64_pal_cache_summary() failed (status=%ld)\n",
|
||||
__FUNCTION__, status);
|
||||
__func__, status);
|
||||
max = SMP_CACHE_BYTES;
|
||||
/* Safest setup for "flush_icache_range()" */
|
||||
ia64_i_cache_stride_shift = I_CACHE_STRIDE_SHIFT;
|
||||
|
@ -798,7 +798,7 @@ get_max_cacheline_size (void)
|
|||
if (status != 0) {
|
||||
printk(KERN_ERR
|
||||
"%s: ia64_pal_cache_config_info(l=%lu, 2) failed (status=%ld)\n",
|
||||
__FUNCTION__, l, status);
|
||||
__func__, l, status);
|
||||
max = SMP_CACHE_BYTES;
|
||||
/* The safest setup for "flush_icache_range()" */
|
||||
cci.pcci_stride = I_CACHE_STRIDE_SHIFT;
|
||||
|
@ -814,7 +814,7 @@ get_max_cacheline_size (void)
|
|||
if (status != 0) {
|
||||
printk(KERN_ERR
|
||||
"%s: ia64_pal_cache_config_info(l=%lu, 1) failed (status=%ld)\n",
|
||||
__FUNCTION__, l, status);
|
||||
__func__, l, status);
|
||||
/* The safest setup for "flush_icache_range()" */
|
||||
cci.pcci_stride = I_CACHE_STRIDE_SHIFT;
|
||||
}
|
||||
|
|
|
@ -342,15 +342,33 @@ setup_frame (int sig, struct k_sigaction *ka, siginfo_t *info, sigset_t *set,
|
|||
|
||||
new_sp = scr->pt.r12;
|
||||
tramp_addr = (unsigned long) __kernel_sigtramp;
|
||||
if ((ka->sa.sa_flags & SA_ONSTACK) && sas_ss_flags(new_sp) == 0) {
|
||||
if (ka->sa.sa_flags & SA_ONSTACK) {
|
||||
int onstack = sas_ss_flags(new_sp);
|
||||
|
||||
if (onstack == 0) {
|
||||
new_sp = current->sas_ss_sp + current->sas_ss_size;
|
||||
/*
|
||||
* We need to check for the register stack being on the signal stack
|
||||
* separately, because it's switched separately (memory stack is switched
|
||||
* in the kernel, register stack is switched in the signal trampoline).
|
||||
* We need to check for the register stack being on the
|
||||
* signal stack separately, because it's switched
|
||||
* separately (memory stack is switched in the kernel,
|
||||
* register stack is switched in the signal trampoline).
|
||||
*/
|
||||
if (!rbs_on_sig_stack(scr->pt.ar_bspstore))
|
||||
new_rbs = (current->sas_ss_sp + sizeof(long) - 1) & ~(sizeof(long) - 1);
|
||||
new_rbs = ALIGN(current->sas_ss_sp,
|
||||
sizeof(long));
|
||||
} else if (onstack == SS_ONSTACK) {
|
||||
unsigned long check_sp;
|
||||
|
||||
/*
|
||||
* If we are on the alternate signal stack and would
|
||||
* overflow it, don't. Return an always-bogus address
|
||||
* instead so we will die with SIGSEGV.
|
||||
*/
|
||||
check_sp = (new_sp - sizeof(*frame)) & -STACK_ALIGN;
|
||||
if (!likely(on_sig_stack(check_sp)))
|
||||
return force_sigsegv_info(sig, (void __user *)
|
||||
check_sp);
|
||||
}
|
||||
}
|
||||
frame = (void __user *) ((new_sp - sizeof(*frame)) & -STACK_ALIGN);
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ extern int die_if_kernel(char *str, struct pt_regs *regs, long err);
|
|||
#undef DEBUG_UNALIGNED_TRAP
|
||||
|
||||
#ifdef DEBUG_UNALIGNED_TRAP
|
||||
# define DPRINT(a...) do { printk("%s %u: ", __FUNCTION__, __LINE__); printk (a); } while (0)
|
||||
# define DPRINT(a...) do { printk("%s %u: ", __func__, __LINE__); printk (a); } while (0)
|
||||
# define DDUMP(str,vp,len) dump(str, vp, len)
|
||||
|
||||
static void
|
||||
|
@ -674,7 +674,7 @@ emulate_load_updates (update_t type, load_store_t ld, struct pt_regs *regs, unsi
|
|||
* just in case.
|
||||
*/
|
||||
if (ld.x6_op == 1 || ld.x6_op == 3) {
|
||||
printk(KERN_ERR "%s: register update on speculative load, error\n", __FUNCTION__);
|
||||
printk(KERN_ERR "%s: register update on speculative load, error\n", __func__);
|
||||
if (die_if_kernel("unaligned reference on speculative load with register update\n",
|
||||
regs, 30))
|
||||
return;
|
||||
|
@ -1104,7 +1104,7 @@ emulate_load_floatpair (unsigned long ifa, load_store_t ld, struct pt_regs *regs
|
|||
*/
|
||||
if (ld.x6_op == 1 || ld.x6_op == 3)
|
||||
printk(KERN_ERR "%s: register update on speculative load pair, error\n",
|
||||
__FUNCTION__);
|
||||
__func__);
|
||||
|
||||
setreg(ld.r3, ifa, 0, regs);
|
||||
}
|
||||
|
|
|
@ -257,7 +257,7 @@ pt_regs_off (unsigned long reg)
|
|||
off = unw.pt_regs_offsets[reg];
|
||||
|
||||
if (off < 0) {
|
||||
UNW_DPRINT(0, "unwind.%s: bad scratch reg r%lu\n", __FUNCTION__, reg);
|
||||
UNW_DPRINT(0, "unwind.%s: bad scratch reg r%lu\n", __func__, reg);
|
||||
off = 0;
|
||||
}
|
||||
return (unsigned long) off;
|
||||
|
@ -268,13 +268,13 @@ get_scratch_regs (struct unw_frame_info *info)
|
|||
{
|
||||
if (!info->pt) {
|
||||
/* This should not happen with valid unwind info. */
|
||||
UNW_DPRINT(0, "unwind.%s: bad unwind info: resetting info->pt\n", __FUNCTION__);
|
||||
UNW_DPRINT(0, "unwind.%s: bad unwind info: resetting info->pt\n", __func__);
|
||||
if (info->flags & UNW_FLAG_INTERRUPT_FRAME)
|
||||
info->pt = (unsigned long) ((struct pt_regs *) info->psp - 1);
|
||||
else
|
||||
info->pt = info->sp - 16;
|
||||
}
|
||||
UNW_DPRINT(3, "unwind.%s: sp 0x%lx pt 0x%lx\n", __FUNCTION__, info->sp, info->pt);
|
||||
UNW_DPRINT(3, "unwind.%s: sp 0x%lx pt 0x%lx\n", __func__, info->sp, info->pt);
|
||||
return (struct pt_regs *) info->pt;
|
||||
}
|
||||
|
||||
|
@ -294,7 +294,7 @@ unw_access_gr (struct unw_frame_info *info, int regnum, unsigned long *val, char
|
|||
return 0;
|
||||
}
|
||||
UNW_DPRINT(0, "unwind.%s: trying to access non-existent r%u\n",
|
||||
__FUNCTION__, regnum);
|
||||
__func__, regnum);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -341,7 +341,7 @@ unw_access_gr (struct unw_frame_info *info, int regnum, unsigned long *val, char
|
|||
{
|
||||
UNW_DPRINT(0, "unwind.%s: %p outside of regstk "
|
||||
"[0x%lx-0x%lx)\n",
|
||||
__FUNCTION__, (void *) addr,
|
||||
__func__, (void *) addr,
|
||||
info->regstk.limit,
|
||||
info->regstk.top);
|
||||
return -1;
|
||||
|
@ -374,7 +374,7 @@ unw_access_gr (struct unw_frame_info *info, int regnum, unsigned long *val, char
|
|||
|| (unsigned long) addr >= info->regstk.top)
|
||||
{
|
||||
UNW_DPRINT(0, "unwind.%s: ignoring attempt to access register outside "
|
||||
"of rbs\n", __FUNCTION__);
|
||||
"of rbs\n", __func__);
|
||||
return -1;
|
||||
}
|
||||
if ((unsigned long) nat_addr >= info->regstk.top)
|
||||
|
@ -385,7 +385,7 @@ unw_access_gr (struct unw_frame_info *info, int regnum, unsigned long *val, char
|
|||
if (write) {
|
||||
if (read_only(addr)) {
|
||||
UNW_DPRINT(0, "unwind.%s: ignoring attempt to write read-only location\n",
|
||||
__FUNCTION__);
|
||||
__func__);
|
||||
} else {
|
||||
*addr = *val;
|
||||
if (*nat)
|
||||
|
@ -427,13 +427,13 @@ unw_access_br (struct unw_frame_info *info, int regnum, unsigned long *val, int
|
|||
|
||||
default:
|
||||
UNW_DPRINT(0, "unwind.%s: trying to access non-existent b%u\n",
|
||||
__FUNCTION__, regnum);
|
||||
__func__, regnum);
|
||||
return -1;
|
||||
}
|
||||
if (write)
|
||||
if (read_only(addr)) {
|
||||
UNW_DPRINT(0, "unwind.%s: ignoring attempt to write read-only location\n",
|
||||
__FUNCTION__);
|
||||
__func__);
|
||||
} else
|
||||
*addr = *val;
|
||||
else
|
||||
|
@ -450,7 +450,7 @@ unw_access_fr (struct unw_frame_info *info, int regnum, struct ia64_fpreg *val,
|
|||
|
||||
if ((unsigned) (regnum - 2) >= 126) {
|
||||
UNW_DPRINT(0, "unwind.%s: trying to access non-existent f%u\n",
|
||||
__FUNCTION__, regnum);
|
||||
__func__, regnum);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -482,7 +482,7 @@ unw_access_fr (struct unw_frame_info *info, int regnum, struct ia64_fpreg *val,
|
|||
if (write)
|
||||
if (read_only(addr)) {
|
||||
UNW_DPRINT(0, "unwind.%s: ignoring attempt to write read-only location\n",
|
||||
__FUNCTION__);
|
||||
__func__);
|
||||
} else
|
||||
*addr = *val;
|
||||
else
|
||||
|
@ -572,14 +572,14 @@ unw_access_ar (struct unw_frame_info *info, int regnum, unsigned long *val, int
|
|||
|
||||
default:
|
||||
UNW_DPRINT(0, "unwind.%s: trying to access non-existent ar%u\n",
|
||||
__FUNCTION__, regnum);
|
||||
__func__, regnum);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (write) {
|
||||
if (read_only(addr)) {
|
||||
UNW_DPRINT(0, "unwind.%s: ignoring attempt to write read-only location\n",
|
||||
__FUNCTION__);
|
||||
__func__);
|
||||
} else
|
||||
*addr = *val;
|
||||
} else
|
||||
|
@ -600,7 +600,7 @@ unw_access_pr (struct unw_frame_info *info, unsigned long *val, int write)
|
|||
if (write) {
|
||||
if (read_only(addr)) {
|
||||
UNW_DPRINT(0, "unwind.%s: ignoring attempt to write read-only location\n",
|
||||
__FUNCTION__);
|
||||
__func__);
|
||||
} else
|
||||
*addr = *val;
|
||||
} else
|
||||
|
@ -699,7 +699,7 @@ decode_abreg (unsigned char abreg, int memory)
|
|||
default:
|
||||
break;
|
||||
}
|
||||
UNW_DPRINT(0, "unwind.%s: bad abreg=0x%x\n", __FUNCTION__, abreg);
|
||||
UNW_DPRINT(0, "unwind.%s: bad abreg=0x%x\n", __func__, abreg);
|
||||
return UNW_REG_LC;
|
||||
}
|
||||
|
||||
|
@ -739,7 +739,7 @@ spill_next_when (struct unw_reg_info **regp, struct unw_reg_info *lim, unw_word
|
|||
return;
|
||||
}
|
||||
}
|
||||
UNW_DPRINT(0, "unwind.%s: excess spill!\n", __FUNCTION__);
|
||||
UNW_DPRINT(0, "unwind.%s: excess spill!\n", __func__);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
@ -855,11 +855,11 @@ desc_abi (unsigned char abi, unsigned char context, struct unw_state_record *sr)
|
|||
{
|
||||
if (abi == 3 && context == 'i') {
|
||||
sr->flags |= UNW_FLAG_INTERRUPT_FRAME;
|
||||
UNW_DPRINT(3, "unwind.%s: interrupt frame\n", __FUNCTION__);
|
||||
UNW_DPRINT(3, "unwind.%s: interrupt frame\n", __func__);
|
||||
}
|
||||
else
|
||||
UNW_DPRINT(0, "unwind%s: ignoring unwabi(abi=0x%x,context=0x%x)\n",
|
||||
__FUNCTION__, abi, context);
|
||||
__func__, abi, context);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
@ -1347,7 +1347,7 @@ script_emit (struct unw_script *script, struct unw_insn insn)
|
|||
{
|
||||
if (script->count >= UNW_MAX_SCRIPT_LEN) {
|
||||
UNW_DPRINT(0, "unwind.%s: script exceeds maximum size of %u instructions!\n",
|
||||
__FUNCTION__, UNW_MAX_SCRIPT_LEN);
|
||||
__func__, UNW_MAX_SCRIPT_LEN);
|
||||
return;
|
||||
}
|
||||
script->insn[script->count++] = insn;
|
||||
|
@ -1389,7 +1389,7 @@ emit_nat_info (struct unw_state_record *sr, int i, struct unw_script *script)
|
|||
|
||||
default:
|
||||
UNW_DPRINT(0, "unwind.%s: don't know how to emit nat info for where = %u\n",
|
||||
__FUNCTION__, r->where);
|
||||
__func__, r->where);
|
||||
return;
|
||||
}
|
||||
insn.opc = opc;
|
||||
|
@ -1446,7 +1446,7 @@ compile_reg (struct unw_state_record *sr, int i, struct unw_script *script)
|
|||
val = offsetof(struct pt_regs, f6) + 16*(rval - 6);
|
||||
else
|
||||
UNW_DPRINT(0, "unwind.%s: kernel may not touch f%lu\n",
|
||||
__FUNCTION__, rval);
|
||||
__func__, rval);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1474,7 +1474,7 @@ compile_reg (struct unw_state_record *sr, int i, struct unw_script *script)
|
|||
|
||||
default:
|
||||
UNW_DPRINT(0, "unwind%s: register %u has unexpected `where' value of %u\n",
|
||||
__FUNCTION__, i, r->where);
|
||||
__func__, i, r->where);
|
||||
break;
|
||||
}
|
||||
insn.opc = opc;
|
||||
|
@ -1547,10 +1547,10 @@ build_script (struct unw_frame_info *info)
|
|||
r->when = UNW_WHEN_NEVER;
|
||||
sr.pr_val = info->pr;
|
||||
|
||||
UNW_DPRINT(3, "unwind.%s: ip 0x%lx\n", __FUNCTION__, ip);
|
||||
UNW_DPRINT(3, "unwind.%s: ip 0x%lx\n", __func__, ip);
|
||||
script = script_new(ip);
|
||||
if (!script) {
|
||||
UNW_DPRINT(0, "unwind.%s: failed to create unwind script\n", __FUNCTION__);
|
||||
UNW_DPRINT(0, "unwind.%s: failed to create unwind script\n", __func__);
|
||||
STAT(unw.stat.script.build_time += ia64_get_itc() - start);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -1569,7 +1569,7 @@ build_script (struct unw_frame_info *info)
|
|||
if (!e) {
|
||||
/* no info, return default unwinder (leaf proc, no mem stack, no saved regs) */
|
||||
UNW_DPRINT(1, "unwind.%s: no unwind info for ip=0x%lx (prev ip=0x%lx)\n",
|
||||
__FUNCTION__, ip, unw.cache[info->prev_script].ip);
|
||||
__func__, ip, unw.cache[info->prev_script].ip);
|
||||
sr.curr.reg[UNW_REG_RP].where = UNW_WHERE_BR;
|
||||
sr.curr.reg[UNW_REG_RP].when = -1;
|
||||
sr.curr.reg[UNW_REG_RP].val = 0;
|
||||
|
@ -1618,13 +1618,13 @@ build_script (struct unw_frame_info *info)
|
|||
sr.curr.reg[UNW_REG_RP].when = -1;
|
||||
sr.curr.reg[UNW_REG_RP].val = sr.return_link_reg;
|
||||
UNW_DPRINT(1, "unwind.%s: using default for rp at ip=0x%lx where=%d val=0x%lx\n",
|
||||
__FUNCTION__, ip, sr.curr.reg[UNW_REG_RP].where,
|
||||
__func__, ip, sr.curr.reg[UNW_REG_RP].where,
|
||||
sr.curr.reg[UNW_REG_RP].val);
|
||||
}
|
||||
|
||||
#ifdef UNW_DEBUG
|
||||
UNW_DPRINT(1, "unwind.%s: state record for func 0x%lx, t=%u:\n",
|
||||
__FUNCTION__, table->segment_base + e->start_offset, sr.when_target);
|
||||
__func__, table->segment_base + e->start_offset, sr.when_target);
|
||||
for (r = sr.curr.reg; r < sr.curr.reg + UNW_NUM_REGS; ++r) {
|
||||
if (r->where != UNW_WHERE_NONE || r->when != UNW_WHEN_NEVER) {
|
||||
UNW_DPRINT(1, " %s <- ", unw.preg_name[r - sr.curr.reg]);
|
||||
|
@ -1746,7 +1746,7 @@ run_script (struct unw_script *script, struct unw_frame_info *state)
|
|||
} else {
|
||||
s[dst] = 0;
|
||||
UNW_DPRINT(0, "unwind.%s: no state->pt, dst=%ld, val=%ld\n",
|
||||
__FUNCTION__, dst, val);
|
||||
__func__, dst, val);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1756,7 +1756,7 @@ run_script (struct unw_script *script, struct unw_frame_info *state)
|
|||
else {
|
||||
s[dst] = 0;
|
||||
UNW_DPRINT(0, "unwind.%s: UNW_INSN_MOVE_CONST bad val=%ld\n",
|
||||
__FUNCTION__, val);
|
||||
__func__, val);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1791,7 +1791,7 @@ run_script (struct unw_script *script, struct unw_frame_info *state)
|
|||
|| s[val] < TASK_SIZE)
|
||||
{
|
||||
UNW_DPRINT(0, "unwind.%s: rejecting bad psp=0x%lx\n",
|
||||
__FUNCTION__, s[val]);
|
||||
__func__, s[val]);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
@ -1825,7 +1825,7 @@ find_save_locs (struct unw_frame_info *info)
|
|||
if ((info->ip & (local_cpu_data->unimpl_va_mask | 0xf)) || info->ip < TASK_SIZE) {
|
||||
/* don't let obviously bad addresses pollute the cache */
|
||||
/* FIXME: should really be level 0 but it occurs too often. KAO */
|
||||
UNW_DPRINT(1, "unwind.%s: rejecting bad ip=0x%lx\n", __FUNCTION__, info->ip);
|
||||
UNW_DPRINT(1, "unwind.%s: rejecting bad ip=0x%lx\n", __func__, info->ip);
|
||||
info->rp_loc = NULL;
|
||||
return -1;
|
||||
}
|
||||
|
@ -1838,7 +1838,7 @@ find_save_locs (struct unw_frame_info *info)
|
|||
spin_unlock_irqrestore(&unw.lock, flags);
|
||||
UNW_DPRINT(0,
|
||||
"unwind.%s: failed to locate/build unwind script for ip %lx\n",
|
||||
__FUNCTION__, info->ip);
|
||||
__func__, info->ip);
|
||||
return -1;
|
||||
}
|
||||
have_write_lock = 1;
|
||||
|
@ -1882,21 +1882,21 @@ unw_unwind (struct unw_frame_info *info)
|
|||
if (!unw_valid(info, info->rp_loc)) {
|
||||
/* FIXME: should really be level 0 but it occurs too often. KAO */
|
||||
UNW_DPRINT(1, "unwind.%s: failed to locate return link (ip=0x%lx)!\n",
|
||||
__FUNCTION__, info->ip);
|
||||
__func__, info->ip);
|
||||
STAT(unw.stat.api.unwind_time += ia64_get_itc() - start; local_irq_restore(flags));
|
||||
return -1;
|
||||
}
|
||||
/* restore the ip */
|
||||
ip = info->ip = *info->rp_loc;
|
||||
if (ip < GATE_ADDR) {
|
||||
UNW_DPRINT(2, "unwind.%s: reached user-space (ip=0x%lx)\n", __FUNCTION__, ip);
|
||||
UNW_DPRINT(2, "unwind.%s: reached user-space (ip=0x%lx)\n", __func__, ip);
|
||||
STAT(unw.stat.api.unwind_time += ia64_get_itc() - start; local_irq_restore(flags));
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* validate the previous stack frame pointer */
|
||||
if (!unw_valid(info, info->pfs_loc)) {
|
||||
UNW_DPRINT(0, "unwind.%s: failed to locate ar.pfs!\n", __FUNCTION__);
|
||||
UNW_DPRINT(0, "unwind.%s: failed to locate ar.pfs!\n", __func__);
|
||||
STAT(unw.stat.api.unwind_time += ia64_get_itc() - start; local_irq_restore(flags));
|
||||
return -1;
|
||||
}
|
||||
|
@ -1912,13 +1912,13 @@ unw_unwind (struct unw_frame_info *info)
|
|||
num_regs = *info->cfm_loc & 0x7f; /* size of frame */
|
||||
info->pfs_loc =
|
||||
(unsigned long *) (info->pt + offsetof(struct pt_regs, ar_pfs));
|
||||
UNW_DPRINT(3, "unwind.%s: interrupt_frame pt 0x%lx\n", __FUNCTION__, info->pt);
|
||||
UNW_DPRINT(3, "unwind.%s: interrupt_frame pt 0x%lx\n", __func__, info->pt);
|
||||
} else
|
||||
num_regs = (*info->cfm_loc >> 7) & 0x7f; /* size of locals */
|
||||
info->bsp = (unsigned long) ia64_rse_skip_regs((unsigned long *) info->bsp, -num_regs);
|
||||
if (info->bsp < info->regstk.limit || info->bsp > info->regstk.top) {
|
||||
UNW_DPRINT(0, "unwind.%s: bsp (0x%lx) out of range [0x%lx-0x%lx]\n",
|
||||
__FUNCTION__, info->bsp, info->regstk.limit, info->regstk.top);
|
||||
__func__, info->bsp, info->regstk.limit, info->regstk.top);
|
||||
STAT(unw.stat.api.unwind_time += ia64_get_itc() - start; local_irq_restore(flags));
|
||||
return -1;
|
||||
}
|
||||
|
@ -1927,14 +1927,14 @@ unw_unwind (struct unw_frame_info *info)
|
|||
info->sp = info->psp;
|
||||
if (info->sp < info->memstk.top || info->sp > info->memstk.limit) {
|
||||
UNW_DPRINT(0, "unwind.%s: sp (0x%lx) out of range [0x%lx-0x%lx]\n",
|
||||
__FUNCTION__, info->sp, info->memstk.top, info->memstk.limit);
|
||||
__func__, info->sp, info->memstk.top, info->memstk.limit);
|
||||
STAT(unw.stat.api.unwind_time += ia64_get_itc() - start; local_irq_restore(flags));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (info->ip == prev_ip && info->sp == prev_sp && info->bsp == prev_bsp) {
|
||||
UNW_DPRINT(0, "unwind.%s: ip, sp, bsp unchanged; stopping here (ip=0x%lx)\n",
|
||||
__FUNCTION__, ip);
|
||||
__func__, ip);
|
||||
STAT(unw.stat.api.unwind_time += ia64_get_itc() - start; local_irq_restore(flags));
|
||||
return -1;
|
||||
}
|
||||
|
@ -1961,7 +1961,7 @@ unw_unwind_to_user (struct unw_frame_info *info)
|
|||
if ((long)((unsigned long)info->task + IA64_STK_OFFSET - sp)
|
||||
< IA64_PT_REGS_SIZE) {
|
||||
UNW_DPRINT(0, "unwind.%s: ran off the top of the kernel stack\n",
|
||||
__FUNCTION__);
|
||||
__func__);
|
||||
break;
|
||||
}
|
||||
if (unw_is_intr_frame(info) &&
|
||||
|
@ -1971,13 +1971,13 @@ unw_unwind_to_user (struct unw_frame_info *info)
|
|||
unw_get_rp(info, &ip);
|
||||
UNW_DPRINT(0, "unwind.%s: failed to read "
|
||||
"predicate register (ip=0x%lx)\n",
|
||||
__FUNCTION__, ip);
|
||||
__func__, ip);
|
||||
return -1;
|
||||
}
|
||||
} while (unw_unwind(info) >= 0);
|
||||
unw_get_ip(info, &ip);
|
||||
UNW_DPRINT(0, "unwind.%s: failed to unwind to user-level (ip=0x%lx)\n",
|
||||
__FUNCTION__, ip);
|
||||
__func__, ip);
|
||||
return -1;
|
||||
}
|
||||
EXPORT_SYMBOL(unw_unwind_to_user);
|
||||
|
@ -2028,7 +2028,7 @@ init_frame_info (struct unw_frame_info *info, struct task_struct *t,
|
|||
" pr 0x%lx\n"
|
||||
" sw 0x%lx\n"
|
||||
" sp 0x%lx\n",
|
||||
__FUNCTION__, (unsigned long) t, rbslimit, rbstop, stktop, stklimit,
|
||||
__func__, (unsigned long) t, rbslimit, rbstop, stktop, stklimit,
|
||||
info->pr, (unsigned long) info->sw, info->sp);
|
||||
STAT(unw.stat.api.init_time += ia64_get_itc() - start; local_irq_restore(flags));
|
||||
}
|
||||
|
@ -2047,7 +2047,7 @@ unw_init_frame_info (struct unw_frame_info *info, struct task_struct *t, struct
|
|||
" bsp 0x%lx\n"
|
||||
" sol 0x%lx\n"
|
||||
" ip 0x%lx\n",
|
||||
__FUNCTION__, info->bsp, sol, info->ip);
|
||||
__func__, info->bsp, sol, info->ip);
|
||||
find_save_locs(info);
|
||||
}
|
||||
|
||||
|
@ -2058,7 +2058,7 @@ unw_init_from_blocked_task (struct unw_frame_info *info, struct task_struct *t)
|
|||
{
|
||||
struct switch_stack *sw = (struct switch_stack *) (t->thread.ksp + 16);
|
||||
|
||||
UNW_DPRINT(1, "unwind.%s\n", __FUNCTION__);
|
||||
UNW_DPRINT(1, "unwind.%s\n", __func__);
|
||||
unw_init_frame_info(info, t, sw);
|
||||
}
|
||||
EXPORT_SYMBOL(unw_init_from_blocked_task);
|
||||
|
@ -2088,7 +2088,7 @@ unw_add_unwind_table (const char *name, unsigned long segment_base, unsigned lon
|
|||
|
||||
if (end - start <= 0) {
|
||||
UNW_DPRINT(0, "unwind.%s: ignoring attempt to insert empty unwind table\n",
|
||||
__FUNCTION__);
|
||||
__func__);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -2119,14 +2119,14 @@ unw_remove_unwind_table (void *handle)
|
|||
|
||||
if (!handle) {
|
||||
UNW_DPRINT(0, "unwind.%s: ignoring attempt to remove non-existent unwind table\n",
|
||||
__FUNCTION__);
|
||||
__func__);
|
||||
return;
|
||||
}
|
||||
|
||||
table = handle;
|
||||
if (table == &unw.kernel_table) {
|
||||
UNW_DPRINT(0, "unwind.%s: sorry, freeing the kernel's unwind table is a "
|
||||
"no-can-do!\n", __FUNCTION__);
|
||||
"no-can-do!\n", __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2139,7 +2139,7 @@ unw_remove_unwind_table (void *handle)
|
|||
break;
|
||||
if (!prev) {
|
||||
UNW_DPRINT(0, "unwind.%s: failed to find unwind table %p\n",
|
||||
__FUNCTION__, (void *) table);
|
||||
__func__, (void *) table);
|
||||
spin_unlock_irqrestore(&unw.lock, flags);
|
||||
return;
|
||||
}
|
||||
|
@ -2185,7 +2185,7 @@ create_gate_table (void)
|
|||
}
|
||||
|
||||
if (!punw) {
|
||||
printk("%s: failed to find gate DSO's unwind table!\n", __FUNCTION__);
|
||||
printk("%s: failed to find gate DSO's unwind table!\n", __func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -2202,7 +2202,7 @@ create_gate_table (void)
|
|||
unw.gate_table = kmalloc(size, GFP_KERNEL);
|
||||
if (!unw.gate_table) {
|
||||
unw.gate_table_size = 0;
|
||||
printk(KERN_ERR "%s: unable to create unwind data for gate page!\n", __FUNCTION__);
|
||||
printk(KERN_ERR "%s: unable to create unwind data for gate page!\n", __func__);
|
||||
return 0;
|
||||
}
|
||||
unw.gate_table_size = size;
|
||||
|
|
|
@ -26,7 +26,7 @@ static inline int notify_page_fault(struct pt_regs *regs, int trap)
|
|||
if (!user_mode(regs)) {
|
||||
/* kprobe_running() needs smp_processor_id() */
|
||||
preempt_disable();
|
||||
if (kprobe_running() && kprobes_fault_handler(regs, trap))
|
||||
if (kprobe_running() && kprobe_fault_handler(regs, trap))
|
||||
ret = 1;
|
||||
preempt_enable();
|
||||
}
|
||||
|
|
|
@ -714,7 +714,7 @@ int arch_add_memory(int nid, u64 start, u64 size)
|
|||
|
||||
if (ret)
|
||||
printk("%s: Problem encountered in __add_pages() as ret=%d\n",
|
||||
__FUNCTION__, ret);
|
||||
__func__, ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ static void __devinit pci_fixup_video(struct pci_dev *pdev)
|
|||
pci_read_config_word(pdev, PCI_COMMAND, &config);
|
||||
if (config & (PCI_COMMAND_IO | PCI_COMMAND_MEMORY)) {
|
||||
pdev->resource[PCI_ROM_RESOURCE].flags |= IORESOURCE_ROM_SHADOW;
|
||||
printk(KERN_DEBUG "Boot video device is %s\n", pci_name(pdev));
|
||||
dev_printk(KERN_DEBUG, &pdev->dev, "Boot video device\n");
|
||||
}
|
||||
}
|
||||
DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pci_fixup_video);
|
||||
|
|
|
@ -765,7 +765,7 @@ static void __init set_pci_cacheline_size(void)
|
|||
status = ia64_pal_cache_summary(&levels, &unique_caches);
|
||||
if (status != 0) {
|
||||
printk(KERN_ERR "%s: ia64_pal_cache_summary() failed "
|
||||
"(status=%ld)\n", __FUNCTION__, status);
|
||||
"(status=%ld)\n", __func__, status);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -773,7 +773,7 @@ static void __init set_pci_cacheline_size(void)
|
|||
/* cache_type (data_or_unified)= */ 2, &cci);
|
||||
if (status != 0) {
|
||||
printk(KERN_ERR "%s: ia64_pal_cache_config_info() failed "
|
||||
"(status=%ld)\n", __FUNCTION__, status);
|
||||
"(status=%ld)\n", __func__, status);
|
||||
return;
|
||||
}
|
||||
pci_cache_line_size = (1 << cci.pcci_line_size) / 4;
|
||||
|
|
|
@ -37,7 +37,7 @@ static irqreturn_t hub_eint_handler(int irq, void *arg)
|
|||
(u64) nasid, 0, 0, 0, 0, 0, 0);
|
||||
|
||||
if ((int)ret_stuff.v0)
|
||||
panic("%s: Fatal %s Error", __FUNCTION__,
|
||||
panic("%s: Fatal %s Error", __func__,
|
||||
((nasid & 1) ? "TIO" : "HUBII"));
|
||||
|
||||
if (!(nasid & 1)) /* Not a TIO, handle CRB errors */
|
||||
|
@ -48,7 +48,7 @@ static irqreturn_t hub_eint_handler(int irq, void *arg)
|
|||
(u64) nasid, 0, 0, 0, 0, 0, 0);
|
||||
|
||||
if ((int)ret_stuff.v0)
|
||||
panic("%s: Fatal TIO Error", __FUNCTION__);
|
||||
panic("%s: Fatal TIO Error", __func__);
|
||||
} else
|
||||
bte_error_handler((unsigned long)NODEPDA(nasid_to_cnodeid(nasid)));
|
||||
|
||||
|
|
|
@ -133,7 +133,7 @@ sn_get_bussoft_ptr(struct pci_bus *bus)
|
|||
if (ACPI_FAILURE(status)) {
|
||||
printk(KERN_ERR "%s: "
|
||||
"acpi_get_vendor_resource() failed (0x%x) for: ",
|
||||
__FUNCTION__, status);
|
||||
__func__, status);
|
||||
acpi_ns_print_node_pathname(handle, NULL);
|
||||
printk("\n");
|
||||
return NULL;
|
||||
|
@ -145,7 +145,7 @@ sn_get_bussoft_ptr(struct pci_bus *bus)
|
|||
sizeof(struct pcibus_bussoft *)) {
|
||||
printk(KERN_ERR
|
||||
"%s: Invalid vendor data length %d\n",
|
||||
__FUNCTION__, vendor->byte_length);
|
||||
__func__, vendor->byte_length);
|
||||
kfree(buffer.pointer);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -184,7 +184,7 @@ sn_extract_device_info(acpi_handle handle, struct pcidev_info **pcidev_info,
|
|||
if (ACPI_FAILURE(status)) {
|
||||
printk(KERN_ERR
|
||||
"%s: acpi_get_vendor_resource() failed (0x%x) for: ",
|
||||
__FUNCTION__, status);
|
||||
__func__, status);
|
||||
acpi_ns_print_node_pathname(handle, NULL);
|
||||
printk("\n");
|
||||
return 1;
|
||||
|
@ -196,7 +196,7 @@ sn_extract_device_info(acpi_handle handle, struct pcidev_info **pcidev_info,
|
|||
sizeof(struct pci_devdev_info *)) {
|
||||
printk(KERN_ERR
|
||||
"%s: Invalid vendor data length: %d for: ",
|
||||
__FUNCTION__, vendor->byte_length);
|
||||
__func__, vendor->byte_length);
|
||||
acpi_ns_print_node_pathname(handle, NULL);
|
||||
printk("\n");
|
||||
ret = 1;
|
||||
|
@ -205,7 +205,7 @@ sn_extract_device_info(acpi_handle handle, struct pcidev_info **pcidev_info,
|
|||
|
||||
pcidev_ptr = kzalloc(sizeof(struct pcidev_info), GFP_KERNEL);
|
||||
if (!pcidev_ptr)
|
||||
panic("%s: Unable to alloc memory for pcidev_info", __FUNCTION__);
|
||||
panic("%s: Unable to alloc memory for pcidev_info", __func__);
|
||||
|
||||
memcpy(&addr, vendor->byte_data, sizeof(struct pcidev_info *));
|
||||
pcidev_prom_ptr = __va(addr);
|
||||
|
@ -214,7 +214,7 @@ sn_extract_device_info(acpi_handle handle, struct pcidev_info **pcidev_info,
|
|||
/* Get the IRQ info */
|
||||
irq_info = kzalloc(sizeof(struct sn_irq_info), GFP_KERNEL);
|
||||
if (!irq_info)
|
||||
panic("%s: Unable to alloc memory for sn_irq_info", __FUNCTION__);
|
||||
panic("%s: Unable to alloc memory for sn_irq_info", __func__);
|
||||
|
||||
if (pcidev_ptr->pdi_sn_irq_info) {
|
||||
irq_info_prom = __va(pcidev_ptr->pdi_sn_irq_info);
|
||||
|
@ -249,10 +249,10 @@ get_host_devfn(acpi_handle device_handle, acpi_handle rootbus_handle)
|
|||
status = acpi_get_parent(child, &parent);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
printk(KERN_ERR "%s: acpi_get_parent() failed "
|
||||
"(0x%x) for: ", __FUNCTION__, status);
|
||||
"(0x%x) for: ", __func__, status);
|
||||
acpi_ns_print_node_pathname(child, NULL);
|
||||
printk("\n");
|
||||
panic("%s: Unable to find host devfn\n", __FUNCTION__);
|
||||
panic("%s: Unable to find host devfn\n", __func__);
|
||||
}
|
||||
if (parent == rootbus_handle)
|
||||
break;
|
||||
|
@ -260,7 +260,7 @@ get_host_devfn(acpi_handle device_handle, acpi_handle rootbus_handle)
|
|||
}
|
||||
if (!child) {
|
||||
printk(KERN_ERR "%s: Unable to find root bus for: ",
|
||||
__FUNCTION__);
|
||||
__func__);
|
||||
acpi_ns_print_node_pathname(device_handle, NULL);
|
||||
printk("\n");
|
||||
BUG();
|
||||
|
@ -269,10 +269,10 @@ get_host_devfn(acpi_handle device_handle, acpi_handle rootbus_handle)
|
|||
status = acpi_evaluate_integer(child, METHOD_NAME__ADR, NULL, &adr);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
printk(KERN_ERR "%s: Unable to get _ADR (0x%x) for: ",
|
||||
__FUNCTION__, status);
|
||||
__func__, status);
|
||||
acpi_ns_print_node_pathname(child, NULL);
|
||||
printk("\n");
|
||||
panic("%s: Unable to find host devfn\n", __FUNCTION__);
|
||||
panic("%s: Unable to find host devfn\n", __func__);
|
||||
}
|
||||
|
||||
slot = (adr >> 16) & 0xffff;
|
||||
|
@ -308,7 +308,7 @@ find_matching_device(acpi_handle handle, u32 lvl, void *context, void **rv)
|
|||
if (ACPI_FAILURE(status)) {
|
||||
printk(KERN_ERR
|
||||
"%s: acpi_get_parent() failed (0x%x) for: ",
|
||||
__FUNCTION__, status);
|
||||
__func__, status);
|
||||
acpi_ns_print_node_pathname(handle, NULL);
|
||||
printk("\n");
|
||||
return AE_OK;
|
||||
|
@ -318,7 +318,7 @@ find_matching_device(acpi_handle handle, u32 lvl, void *context, void **rv)
|
|||
if (ACPI_FAILURE(status)) {
|
||||
printk(KERN_ERR
|
||||
"%s: Failed to find _BBN in parent of: ",
|
||||
__FUNCTION__);
|
||||
__func__);
|
||||
acpi_ns_print_node_pathname(handle, NULL);
|
||||
printk("\n");
|
||||
return AE_OK;
|
||||
|
@ -358,14 +358,14 @@ sn_acpi_get_pcidev_info(struct pci_dev *dev, struct pcidev_info **pcidev_info,
|
|||
if (segment != pci_domain_nr(dev)) {
|
||||
printk(KERN_ERR
|
||||
"%s: Segment number mismatch, 0x%lx vs 0x%x for: ",
|
||||
__FUNCTION__, segment, pci_domain_nr(dev));
|
||||
__func__, segment, pci_domain_nr(dev));
|
||||
acpi_ns_print_node_pathname(rootbus_handle, NULL);
|
||||
printk("\n");
|
||||
return 1;
|
||||
}
|
||||
} else {
|
||||
printk(KERN_ERR "%s: Unable to get __SEG from: ",
|
||||
__FUNCTION__);
|
||||
__func__);
|
||||
acpi_ns_print_node_pathname(rootbus_handle, NULL);
|
||||
printk("\n");
|
||||
return 1;
|
||||
|
@ -386,7 +386,7 @@ sn_acpi_get_pcidev_info(struct pci_dev *dev, struct pcidev_info **pcidev_info,
|
|||
if (!pcidev_match.handle) {
|
||||
printk(KERN_ERR
|
||||
"%s: Could not find matching ACPI device for %s.\n",
|
||||
__FUNCTION__, pci_name(dev));
|
||||
__func__, pci_name(dev));
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -422,7 +422,7 @@ sn_acpi_slot_fixup(struct pci_dev *dev)
|
|||
|
||||
if (sn_acpi_get_pcidev_info(dev, &pcidev_info, &sn_irq_info)) {
|
||||
panic("%s: Failure obtaining pcidev_info for %s\n",
|
||||
__FUNCTION__, pci_name(dev));
|
||||
__func__, pci_name(dev));
|
||||
}
|
||||
|
||||
if (pcidev_info->pdi_pio_mapped_addr[PCI_ROM_RESOURCE]) {
|
||||
|
@ -463,7 +463,7 @@ sn_acpi_bus_fixup(struct pci_bus *bus)
|
|||
printk(KERN_ERR
|
||||
"%s: 0x%04x:0x%02x Unable to "
|
||||
"obtain prom_bussoft_ptr\n",
|
||||
__FUNCTION__, pci_domain_nr(bus), bus->number);
|
||||
__func__, pci_domain_nr(bus), bus->number);
|
||||
return;
|
||||
}
|
||||
sn_common_bus_fixup(bus, prom_bussoft_ptr);
|
||||
|
|
|
@ -364,7 +364,7 @@ void sn_bus_store_sysdata(struct pci_dev *dev)
|
|||
|
||||
element = kzalloc(sizeof(struct sysdata_el), GFP_KERNEL);
|
||||
if (!element) {
|
||||
dev_dbg(&dev->dev, "%s: out of memory!\n", __FUNCTION__);
|
||||
dev_dbg(&dev->dev, "%s: out of memory!\n", __func__);
|
||||
return;
|
||||
}
|
||||
element->sysdata = SN_PCIDEV_INFO(dev);
|
||||
|
|
|
@ -209,11 +209,11 @@ sn_io_slot_fixup(struct pci_dev *dev)
|
|||
|
||||
pcidev_info = kzalloc(sizeof(struct pcidev_info), GFP_KERNEL);
|
||||
if (!pcidev_info)
|
||||
panic("%s: Unable to alloc memory for pcidev_info", __FUNCTION__);
|
||||
panic("%s: Unable to alloc memory for pcidev_info", __func__);
|
||||
|
||||
sn_irq_info = kzalloc(sizeof(struct sn_irq_info), GFP_KERNEL);
|
||||
if (!sn_irq_info)
|
||||
panic("%s: Unable to alloc memory for sn_irq_info", __FUNCTION__);
|
||||
panic("%s: Unable to alloc memory for sn_irq_info", __func__);
|
||||
|
||||
/* Call to retrieve pci device information needed by kernel. */
|
||||
status = sal_get_pcidev_info((u64) pci_domain_nr(dev),
|
||||
|
|
|
@ -100,7 +100,7 @@ sn_platform_plat_specific_err_print(const u8 * sect_header, u8 ** oemdata,
|
|||
if (!newbuf) {
|
||||
mutex_unlock(&sn_oemdata_mutex);
|
||||
printk(KERN_ERR "%s: unable to extend sn_oemdata\n",
|
||||
__FUNCTION__);
|
||||
__func__);
|
||||
return 1;
|
||||
}
|
||||
vfree(*sn_oemdata);
|
||||
|
|
|
@ -116,7 +116,7 @@ void *sn_dma_alloc_coherent(struct device *dev, size_t size,
|
|||
*dma_handle = provider->dma_map_consistent(pdev, phys_addr, size,
|
||||
SN_DMA_ADDR_PHYS);
|
||||
if (!*dma_handle) {
|
||||
printk(KERN_ERR "%s: out of ATEs\n", __FUNCTION__);
|
||||
printk(KERN_ERR "%s: out of ATEs\n", __func__);
|
||||
free_pages((unsigned long)cpuaddr, get_order(size));
|
||||
return NULL;
|
||||
}
|
||||
|
@ -179,7 +179,7 @@ dma_addr_t sn_dma_map_single(struct device *dev, void *cpu_addr, size_t size,
|
|||
phys_addr = __pa(cpu_addr);
|
||||
dma_addr = provider->dma_map(pdev, phys_addr, size, SN_DMA_ADDR_PHYS);
|
||||
if (!dma_addr) {
|
||||
printk(KERN_ERR "%s: out of ATEs\n", __FUNCTION__);
|
||||
printk(KERN_ERR "%s: out of ATEs\n", __func__);
|
||||
return 0;
|
||||
}
|
||||
return dma_addr;
|
||||
|
@ -266,7 +266,7 @@ int sn_dma_map_sg(struct device *dev, struct scatterlist *sgl, int nhwentries,
|
|||
SN_DMA_ADDR_PHYS);
|
||||
|
||||
if (!sg->dma_address) {
|
||||
printk(KERN_ERR "%s: out of ATEs\n", __FUNCTION__);
|
||||
printk(KERN_ERR "%s: out of ATEs\n", __func__);
|
||||
|
||||
/*
|
||||
* Free any successfully allocated entries.
|
||||
|
|
|
@ -88,7 +88,7 @@ tioca_gart_init(struct tioca_kernel *tioca_kern)
|
|||
break;
|
||||
default:
|
||||
printk(KERN_ERR "%s: Invalid CA_APERATURE_SIZE "
|
||||
"0x%lx\n", __FUNCTION__, (ulong) CA_APERATURE_SIZE);
|
||||
"0x%lx\n", __func__, (ulong) CA_APERATURE_SIZE);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -124,7 +124,7 @@ tioca_gart_init(struct tioca_kernel *tioca_kern)
|
|||
if (!tmp) {
|
||||
printk(KERN_ERR "%s: Could not allocate "
|
||||
"%lu bytes (order %d) for GART\n",
|
||||
__FUNCTION__,
|
||||
__func__,
|
||||
tioca_kern->ca_gart_size,
|
||||
get_order(tioca_kern->ca_gart_size));
|
||||
return -ENOMEM;
|
||||
|
@ -341,7 +341,7 @@ tioca_dma_d48(struct pci_dev *pdev, u64 paddr)
|
|||
|
||||
if (node_upper > 64) {
|
||||
printk(KERN_ERR "%s: coretalk addr 0x%p node id out "
|
||||
"of range\n", __FUNCTION__, (void *)ct_addr);
|
||||
"of range\n", __func__, (void *)ct_addr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -349,7 +349,7 @@ tioca_dma_d48(struct pci_dev *pdev, u64 paddr)
|
|||
if (node_upper != (agp_dma_extn >> CA_AGP_DMA_NODE_ID_SHFT)) {
|
||||
printk(KERN_ERR "%s: coretalk upper node (%u) "
|
||||
"mismatch with ca_agp_dma_addr_extn (%lu)\n",
|
||||
__FUNCTION__,
|
||||
__func__,
|
||||
node_upper, (agp_dma_extn >> CA_AGP_DMA_NODE_ID_SHFT));
|
||||
return 0;
|
||||
}
|
||||
|
@ -597,7 +597,7 @@ tioca_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont
|
|||
if (is_shub1() && sn_sal_rev() < 0x0406) {
|
||||
printk
|
||||
(KERN_ERR "%s: SGI prom rev 4.06 or greater required "
|
||||
"for tioca support\n", __FUNCTION__);
|
||||
"for tioca support\n", __func__);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -651,7 +651,7 @@ tioca_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont
|
|||
printk(KERN_WARNING
|
||||
"%s: Unable to get irq %d. "
|
||||
"Error interrupts won't be routed for TIOCA bus %d\n",
|
||||
__FUNCTION__, SGI_TIOCA_ERROR,
|
||||
__func__, SGI_TIOCA_ERROR,
|
||||
(int)tioca_common->ca_common.bs_persist_busnum);
|
||||
|
||||
sn_set_err_irq_affinity(SGI_TIOCA_ERROR);
|
||||
|
|
|
@ -494,7 +494,7 @@ tioce_dma_unmap(struct pci_dev *pdev, dma_addr_t bus_addr, int dir)
|
|||
if (&map->ce_dmamap_list == &ce_kern->ce_dmamap_list) {
|
||||
printk(KERN_WARNING
|
||||
"%s: %s - no map found for bus_addr 0x%lx\n",
|
||||
__FUNCTION__, pci_name(pdev), bus_addr);
|
||||
__func__, pci_name(pdev), bus_addr);
|
||||
} else if (--map->refcnt == 0) {
|
||||
for (i = 0; i < map->ate_count; i++) {
|
||||
map->ate_shadow[i] = 0;
|
||||
|
@ -1030,7 +1030,7 @@ tioce_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont
|
|||
"%s: Unable to get irq %d. "
|
||||
"Error interrupts won't be routed for "
|
||||
"TIOCE bus %04x:%02x\n",
|
||||
__FUNCTION__, SGI_PCIASIC_ERROR,
|
||||
__func__, SGI_PCIASIC_ERROR,
|
||||
tioce_common->ce_pcibus.bs_persist_segment,
|
||||
tioce_common->ce_pcibus.bs_persist_busnum);
|
||||
|
||||
|
|
|
@ -742,7 +742,9 @@ sys_call_table:
|
|||
.long sys_epoll_pwait /* 315 */
|
||||
.long sys_utimensat
|
||||
.long sys_signalfd
|
||||
.long sys_ni_syscall
|
||||
.long sys_timerfd_create
|
||||
.long sys_eventfd
|
||||
.long sys_fallocate /* 320 */
|
||||
.long sys_timerfd_settime
|
||||
.long sys_timerfd_gettime
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#
|
||||
# Automatically generated make config: don't edit
|
||||
# Linux kernel version: 2.6.23
|
||||
# Thu Oct 18 13:17:38 2007
|
||||
# Linux kernel version: 2.6.25-rc3
|
||||
# Mon Feb 25 15:03:00 2008
|
||||
#
|
||||
CONFIG_M68K=y
|
||||
# CONFIG_MMU is not set
|
||||
|
@ -15,8 +15,10 @@ CONFIG_GENERIC_FIND_NEXT_BIT=y
|
|||
CONFIG_GENERIC_HWEIGHT=y
|
||||
CONFIG_GENERIC_HARDIRQS=y
|
||||
CONFIG_GENERIC_CALIBRATE_DELAY=y
|
||||
CONFIG_GENERIC_TIME=y
|
||||
CONFIG_TIME_LOW_RES=y
|
||||
CONFIG_NO_IOPORT=y
|
||||
CONFIG_ARCH_SUPPORTS_AOUT=y
|
||||
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
|
||||
|
||||
#
|
||||
|
@ -31,12 +33,14 @@ CONFIG_LOCALVERSION_AUTO=y
|
|||
# CONFIG_POSIX_MQUEUE is not set
|
||||
# CONFIG_BSD_PROCESS_ACCT is not set
|
||||
# CONFIG_TASKSTATS is not set
|
||||
# CONFIG_USER_NS is not set
|
||||
# CONFIG_AUDIT is not set
|
||||
# CONFIG_IKCONFIG is not set
|
||||
CONFIG_LOG_BUF_SHIFT=14
|
||||
# CONFIG_CGROUPS is not set
|
||||
# CONFIG_GROUP_SCHED is not set
|
||||
# CONFIG_SYSFS_DEPRECATED is not set
|
||||
# CONFIG_RELAY is not set
|
||||
# CONFIG_NAMESPACES is not set
|
||||
# CONFIG_BLK_DEV_INITRD is not set
|
||||
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
|
||||
CONFIG_SYSCTL=y
|
||||
|
@ -48,15 +52,22 @@ CONFIG_SYSCTL_SYSCALL=y
|
|||
CONFIG_PRINTK=y
|
||||
CONFIG_BUG=y
|
||||
CONFIG_ELF_CORE=y
|
||||
CONFIG_COMPAT_BRK=y
|
||||
CONFIG_BASE_FULL=y
|
||||
# CONFIG_FUTEX is not set
|
||||
# CONFIG_EPOLL is not set
|
||||
# CONFIG_SIGNALFD is not set
|
||||
# CONFIG_TIMERFD is not set
|
||||
# CONFIG_EVENTFD is not set
|
||||
# CONFIG_VM_EVENT_COUNTERS is not set
|
||||
CONFIG_SLAB=y
|
||||
# CONFIG_SLUB is not set
|
||||
# CONFIG_SLOB is not set
|
||||
# CONFIG_PROFILING is not set
|
||||
# CONFIG_MARKERS is not set
|
||||
# CONFIG_HAVE_OPROFILE is not set
|
||||
# CONFIG_HAVE_KPROBES is not set
|
||||
CONFIG_SLABINFO=y
|
||||
CONFIG_TINY_SHMEM=y
|
||||
CONFIG_BASE_SMALL=0
|
||||
CONFIG_MODULES=y
|
||||
|
@ -83,6 +94,8 @@ CONFIG_IOSCHED_NOOP=y
|
|||
# CONFIG_DEFAULT_CFQ is not set
|
||||
CONFIG_DEFAULT_NOOP=y
|
||||
CONFIG_DEFAULT_IOSCHED="noop"
|
||||
CONFIG_CLASSIC_RCU=y
|
||||
# CONFIG_PREEMPT_RCU is not set
|
||||
|
||||
#
|
||||
# Processor type and features
|
||||
|
@ -121,6 +134,7 @@ CONFIG_M5272C3=y
|
|||
# CONFIG_MOD5272 is not set
|
||||
CONFIG_FREESCALE=y
|
||||
CONFIG_4KSTACKS=y
|
||||
CONFIG_HZ=100
|
||||
|
||||
#
|
||||
# RAM configuration
|
||||
|
@ -147,6 +161,7 @@ CONFIG_FLATMEM_MANUAL=y
|
|||
CONFIG_FLATMEM=y
|
||||
CONFIG_FLAT_NODE_MEM_MAP=y
|
||||
# CONFIG_SPARSEMEM_STATIC is not set
|
||||
# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
|
||||
CONFIG_SPLIT_PTLOCK_CPUS=4
|
||||
# CONFIG_RESOURCES_64BIT is not set
|
||||
CONFIG_ZONE_DMA_FLAG=1
|
||||
|
@ -158,10 +173,6 @@ CONFIG_VIRT_TO_BUS=y
|
|||
# CONFIG_PCI is not set
|
||||
# CONFIG_ARCH_SUPPORTS_MSI is not set
|
||||
|
||||
#
|
||||
# PCCARD (PCMCIA/CardBus) support
|
||||
#
|
||||
|
||||
#
|
||||
# Executable file formats
|
||||
#
|
||||
|
@ -205,6 +216,7 @@ CONFIG_IP_FIB_HASH=y
|
|||
# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
|
||||
# CONFIG_INET_XFRM_MODE_TUNNEL is not set
|
||||
# CONFIG_INET_XFRM_MODE_BEET is not set
|
||||
# CONFIG_INET_LRO is not set
|
||||
# CONFIG_INET_DIAG is not set
|
||||
# CONFIG_TCP_CONG_ADVANCED is not set
|
||||
CONFIG_TCP_CONG_CUBIC=y
|
||||
|
@ -229,10 +241,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
|
|||
# CONFIG_LAPB 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
|
||||
|
||||
#
|
||||
|
@ -240,6 +248,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
|
|||
#
|
||||
# CONFIG_NET_PKTGEN is not set
|
||||
# CONFIG_HAMRADIO is not set
|
||||
# CONFIG_CAN is not set
|
||||
# CONFIG_IRDA is not set
|
||||
# CONFIG_BT is not set
|
||||
# CONFIG_AF_RXRPC is not set
|
||||
|
@ -283,6 +292,7 @@ CONFIG_MTD_BLOCK=y
|
|||
# CONFIG_INFTL is not set
|
||||
# CONFIG_RFD_FTL is not set
|
||||
# CONFIG_SSFDC is not set
|
||||
# CONFIG_MTD_OOPS is not set
|
||||
|
||||
#
|
||||
# RAM/ROM/Flash chip drivers
|
||||
|
@ -339,10 +349,11 @@ CONFIG_BLK_DEV=y
|
|||
CONFIG_BLK_DEV_RAM=y
|
||||
CONFIG_BLK_DEV_RAM_COUNT=16
|
||||
CONFIG_BLK_DEV_RAM_SIZE=4096
|
||||
CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
|
||||
# CONFIG_BLK_DEV_XIP is not set
|
||||
# CONFIG_CDROM_PKTCDVD is not set
|
||||
# CONFIG_ATA_OVER_ETH is not set
|
||||
# CONFIG_MISC_DEVICES is not set
|
||||
CONFIG_HAVE_IDE=y
|
||||
# CONFIG_IDE is not set
|
||||
|
||||
#
|
||||
|
@ -360,9 +371,15 @@ CONFIG_NETDEVICES=y
|
|||
# CONFIG_MACVLAN is not set
|
||||
# CONFIG_EQUALIZER is not set
|
||||
# CONFIG_TUN is not set
|
||||
# CONFIG_VETH is not set
|
||||
# CONFIG_PHYLIB is not set
|
||||
CONFIG_NET_ETHERNET=y
|
||||
# CONFIG_MII is not set
|
||||
# CONFIG_IBM_NEW_EMAC_ZMII is not set
|
||||
# CONFIG_IBM_NEW_EMAC_RGMII is not set
|
||||
# CONFIG_IBM_NEW_EMAC_TAH is not set
|
||||
# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
|
||||
# CONFIG_B44 is not set
|
||||
CONFIG_FEC=y
|
||||
# CONFIG_FEC2 is not set
|
||||
# CONFIG_NETDEV_1000 is not set
|
||||
|
@ -377,7 +394,7 @@ CONFIG_FEC=y
|
|||
CONFIG_PPP=y
|
||||
# CONFIG_PPP_MULTILINK is not set
|
||||
# CONFIG_PPP_FILTER is not set
|
||||
# CONFIG_PPP_ASYNC is not set
|
||||
CONFIG_PPP_ASYNC=y
|
||||
# CONFIG_PPP_SYNC_TTY is not set
|
||||
# CONFIG_PPP_DEFLATE is not set
|
||||
# CONFIG_PPP_BSDCOMP is not set
|
||||
|
@ -386,7 +403,6 @@ CONFIG_PPP=y
|
|||
# CONFIG_PPPOL2TP is not set
|
||||
# CONFIG_SLIP is not set
|
||||
CONFIG_SLHC=y
|
||||
# CONFIG_SHAPER is not set
|
||||
# CONFIG_NETCONSOLE is not set
|
||||
# CONFIG_NETPOLL is not set
|
||||
# CONFIG_NET_POLL_CONTROLLER is not set
|
||||
|
@ -418,12 +434,16 @@ CONFIG_SLHC=y
|
|||
#
|
||||
# Non-8250 serial port support
|
||||
#
|
||||
CONFIG_SERIAL_COLDFIRE=y
|
||||
CONFIG_SERIAL_CORE=y
|
||||
CONFIG_SERIAL_CORE_CONSOLE=y
|
||||
# CONFIG_SERIAL_COLDFIRE is not set
|
||||
CONFIG_SERIAL_MCF=y
|
||||
CONFIG_SERIAL_MCF_BAUDRATE=19200
|
||||
CONFIG_SERIAL_MCF_CONSOLE=y
|
||||
# CONFIG_UNIX98_PTYS is not set
|
||||
CONFIG_LEGACY_PTYS=y
|
||||
CONFIG_LEGACY_PTY_COUNT=256
|
||||
# CONFIG_IPMI_HANDLER is not set
|
||||
# CONFIG_WATCHDOG is not set
|
||||
# CONFIG_HW_RANDOM is not set
|
||||
# CONFIG_GEN_RTC is not set
|
||||
# CONFIG_R3964 is not set
|
||||
|
@ -439,6 +459,14 @@ CONFIG_LEGACY_PTY_COUNT=256
|
|||
# CONFIG_W1 is not set
|
||||
# CONFIG_POWER_SUPPLY is not set
|
||||
# CONFIG_HWMON is not set
|
||||
# CONFIG_THERMAL is not set
|
||||
# CONFIG_WATCHDOG is not set
|
||||
|
||||
#
|
||||
# Sonics Silicon Backplane
|
||||
#
|
||||
CONFIG_SSB_POSSIBLE=y
|
||||
# CONFIG_SSB is not set
|
||||
|
||||
#
|
||||
# Multifunction device drivers
|
||||
|
@ -450,20 +478,20 @@ CONFIG_LEGACY_PTY_COUNT=256
|
|||
#
|
||||
# CONFIG_VIDEO_DEV is not set
|
||||
# CONFIG_DVB_CORE is not set
|
||||
CONFIG_DAB=y
|
||||
# CONFIG_DAB is not set
|
||||
|
||||
#
|
||||
# Graphics support
|
||||
#
|
||||
# CONFIG_VGASTATE is not set
|
||||
# CONFIG_VIDEO_OUTPUT_CONTROL is not set
|
||||
# CONFIG_FB is not set
|
||||
# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
|
||||
|
||||
#
|
||||
# Display device support
|
||||
#
|
||||
# CONFIG_DISPLAY_SUPPORT is not set
|
||||
# CONFIG_VGASTATE is not set
|
||||
CONFIG_VIDEO_OUTPUT_CONTROL=y
|
||||
# CONFIG_FB is not set
|
||||
|
||||
#
|
||||
# Sound
|
||||
|
@ -471,22 +499,10 @@ CONFIG_VIDEO_OUTPUT_CONTROL=y
|
|||
# CONFIG_SOUND is not set
|
||||
# CONFIG_USB_SUPPORT is not set
|
||||
# CONFIG_MMC is not set
|
||||
# CONFIG_MEMSTICK is not set
|
||||
# CONFIG_NEW_LEDS is not set
|
||||
# CONFIG_RTC_CLASS is not set
|
||||
|
||||
#
|
||||
# DMA Engine support
|
||||
#
|
||||
# CONFIG_DMA_ENGINE is not set
|
||||
|
||||
#
|
||||
# DMA Clients
|
||||
#
|
||||
|
||||
#
|
||||
# DMA Devices
|
||||
#
|
||||
|
||||
#
|
||||
# Userspace I/O
|
||||
#
|
||||
|
@ -505,11 +521,9 @@ CONFIG_EXT2_FS=y
|
|||
# CONFIG_XFS_FS is not set
|
||||
# CONFIG_GFS2_FS is not set
|
||||
# CONFIG_OCFS2_FS is not set
|
||||
# CONFIG_MINIX_FS is not set
|
||||
CONFIG_ROMFS_FS=y
|
||||
# CONFIG_DNOTIFY is not set
|
||||
# CONFIG_INOTIFY is not set
|
||||
# CONFIG_QUOTA is not set
|
||||
# CONFIG_DNOTIFY is not set
|
||||
# CONFIG_AUTOFS_FS is not set
|
||||
# CONFIG_AUTOFS4_FS is not set
|
||||
# CONFIG_FUSE_FS is not set
|
||||
|
@ -535,7 +549,6 @@ CONFIG_PROC_SYSCTL=y
|
|||
CONFIG_SYSFS=y
|
||||
# CONFIG_TMPFS is not set
|
||||
# CONFIG_HUGETLB_PAGE is not set
|
||||
CONFIG_RAMFS=y
|
||||
# CONFIG_CONFIGFS_FS is not set
|
||||
|
||||
#
|
||||
|
@ -551,42 +564,27 @@ CONFIG_RAMFS=y
|
|||
# CONFIG_JFFS2_FS is not set
|
||||
# CONFIG_CRAMFS is not set
|
||||
# CONFIG_VXFS_FS is not set
|
||||
# CONFIG_MINIX_FS is not set
|
||||
# CONFIG_HPFS_FS is not set
|
||||
# CONFIG_QNX4FS_FS is not set
|
||||
CONFIG_ROMFS_FS=y
|
||||
# CONFIG_SYSV_FS is not set
|
||||
# CONFIG_UFS_FS is not set
|
||||
|
||||
#
|
||||
# Network File Systems
|
||||
#
|
||||
# CONFIG_NFS_FS is not set
|
||||
# CONFIG_NFSD 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
|
||||
# CONFIG_NETWORK_FILESYSTEMS is not set
|
||||
|
||||
#
|
||||
# Partition Types
|
||||
#
|
||||
# CONFIG_PARTITION_ADVANCED is not set
|
||||
CONFIG_MSDOS_PARTITION=y
|
||||
|
||||
#
|
||||
# Native Language Support
|
||||
#
|
||||
# CONFIG_NLS is not set
|
||||
|
||||
#
|
||||
# Distributed Lock Manager
|
||||
#
|
||||
# CONFIG_DLM is not set
|
||||
|
||||
#
|
||||
# Kernel hacking
|
||||
#
|
||||
# CONFIG_PRINTK_TIME is not set
|
||||
CONFIG_ENABLE_WARN_DEPRECATED=y
|
||||
# CONFIG_ENABLE_MUST_CHECK is not set
|
||||
# CONFIG_MAGIC_SYSRQ is not set
|
||||
# CONFIG_UNUSED_SYMBOLS is not set
|
||||
|
@ -594,6 +592,7 @@ CONFIG_MSDOS_PARTITION=y
|
|||
# CONFIG_HEADERS_CHECK is not set
|
||||
# CONFIG_DEBUG_KERNEL is not set
|
||||
# CONFIG_DEBUG_BUGVERBOSE is not set
|
||||
# CONFIG_SAMPLES is not set
|
||||
# CONFIG_FULLDEBUG is not set
|
||||
# CONFIG_HIGHPROFILE is not set
|
||||
# CONFIG_BOOTPARAM is not set
|
||||
|
@ -605,6 +604,7 @@ CONFIG_MSDOS_PARTITION=y
|
|||
#
|
||||
# CONFIG_KEYS is not set
|
||||
# CONFIG_SECURITY is not set
|
||||
# CONFIG_SECURITY_FILE_CAPABILITIES is not set
|
||||
# CONFIG_CRYPTO is not set
|
||||
|
||||
#
|
||||
|
|
|
@ -336,9 +336,11 @@ ENTRY(sys_call_table)
|
|||
.long sys_epoll_pwait /* 315 */
|
||||
.long sys_utimensat
|
||||
.long sys_signalfd
|
||||
.long sys_ni_syscall
|
||||
.long sys_timerfd_create
|
||||
.long sys_eventfd
|
||||
.long sys_fallocate /* 320 */
|
||||
.long sys_timerfd_settime
|
||||
.long sys_timerfd_gettime
|
||||
|
||||
.rept NR_syscalls-(.-sys_call_table)/4
|
||||
.long sys_ni_syscall
|
||||
|
|
|
@ -67,16 +67,6 @@ static irqreturn_t hw_tick(int irq, void *dummy)
|
|||
|
||||
/***************************************************************************/
|
||||
|
||||
static irqreturn_t hw_tick(int irq, void *dummy)
|
||||
{
|
||||
/* Reset Timer1 */
|
||||
TSTAT &= 0;
|
||||
|
||||
return arch_timer_interrupt(irq, dummy);
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
static struct irqaction m68328_timer_irq = {
|
||||
.name = "timer",
|
||||
.flags = IRQF_DISABLED | IRQF_TIMER,
|
||||
|
|
|
@ -90,6 +90,7 @@ config PPC
|
|||
select HAVE_IDE
|
||||
select HAVE_OPROFILE
|
||||
select HAVE_KPROBES
|
||||
select HAVE_KRETPROBES
|
||||
|
||||
config EARLY_PRINTK
|
||||
bool
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue