提交 4b337c5f 编写于 作者: B Benjamin Herrenschmidt

Merge commit 'origin/master' into next

要显示的变更太多。

To preserve performance only 1000 of 1000+ files are displayed.
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
number of errors are printk'ed including a full stack trace. number of errors are printk'ed including a full stack trace.
</para> </para>
<para> <para>
The statistics are available via debugfs/debug_objects/stats. The statistics are available via /sys/kernel/debug/debug_objects/stats.
They provide information about the number of warnings and the They provide information about the number of warnings and the
number of successful fixups along with information about the number of successful fixups along with information about the
usage of the internal tracking objects and the state of the usage of the internal tracking objects and the state of the
......
...@@ -246,7 +246,8 @@ void print_ioacct(struct taskstats *t) ...@@ -246,7 +246,8 @@ void print_ioacct(struct taskstats *t)
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
int c, rc, rep_len, aggr_len, len2, cmd_type; int c, rc, rep_len, aggr_len, len2;
int cmd_type = TASKSTATS_CMD_ATTR_UNSPEC;
__u16 id; __u16 id;
__u32 mypid; __u32 mypid;
......
...@@ -229,10 +229,10 @@ kernel. It is the use of atomic counters to implement reference ...@@ -229,10 +229,10 @@ kernel. It is the use of atomic counters to implement reference
counting, and it works such that once the counter falls to zero it can counting, and it works such that once the counter falls to zero it can
be guaranteed that no other entity can be accessing the object: be guaranteed that no other entity can be accessing the object:
static void obj_list_add(struct obj *obj) static void obj_list_add(struct obj *obj, struct list_head *head)
{ {
obj->active = 1; obj->active = 1;
list_add(&obj->list); list_add(&obj->list, head);
} }
static void obj_list_del(struct obj *obj) static void obj_list_del(struct obj *obj)
......
...@@ -117,7 +117,7 @@ Using the pktcdvd debugfs interface ...@@ -117,7 +117,7 @@ Using the pktcdvd debugfs interface
To read pktcdvd device infos in human readable form, do: To read pktcdvd device infos in human readable form, do:
# cat /debug/pktcdvd/pktcdvd[0-7]/info # cat /sys/kernel/debug/pktcdvd/pktcdvd[0-7]/info
For a description of the debugfs interface look into the file: For a description of the debugfs interface look into the file:
......
...@@ -155,7 +155,7 @@ actual frequency must be determined using the following rules: ...@@ -155,7 +155,7 @@ actual frequency must be determined using the following rules:
- if relation==CPUFREQ_REL_H, try to select a new_freq lower than or equal - if relation==CPUFREQ_REL_H, try to select a new_freq lower than or equal
target_freq. ("H for highest, but no higher than") target_freq. ("H for highest, but no higher than")
Here again the frequency table helper might assist you - see section 3 Here again the frequency table helper might assist you - see section 2
for details. for details.
......
...@@ -119,10 +119,6 @@ want the kernel to look at the CPU usage and to make decisions on ...@@ -119,10 +119,6 @@ want the kernel to look at the CPU usage and to make decisions on
what to do about the frequency. Typically this is set to values of what to do about the frequency. Typically this is set to values of
around '10000' or more. It's default value is (cmp. with users-guide.txt): around '10000' or more. It's default value is (cmp. with users-guide.txt):
transition_latency * 1000 transition_latency * 1000
The lowest value you can set is:
transition_latency * 100 or it may get restricted to a value where it
makes not sense for the kernel anymore to poll that often which depends
on your HZ config variable (HZ=1000: max=20000us, HZ=250: max=5000).
Be aware that transition latency is in ns and sampling_rate is in us, so you Be aware that transition latency is in ns and sampling_rate is in us, so you
get the same sysfs value by default. get the same sysfs value by default.
Sampling rate should always get adjusted considering the transition latency Sampling rate should always get adjusted considering the transition latency
...@@ -131,14 +127,20 @@ in the bash (as said, 1000 is default), do: ...@@ -131,14 +127,20 @@ in the bash (as said, 1000 is default), do:
echo `$(($(cat cpuinfo_transition_latency) * 750 / 1000)) \ echo `$(($(cat cpuinfo_transition_latency) * 750 / 1000)) \
>ondemand/sampling_rate >ondemand/sampling_rate
show_sampling_rate_(min|max): THIS INTERFACE IS DEPRECATED, DON'T USE IT. show_sampling_rate_min:
You can use wider ranges now and the general The sampling rate is limited by the HW transition latency:
cpuinfo_transition_latency variable (cmp. with user-guide.txt) can be transition_latency * 100
used to obtain exactly the same info: Or by kernel restrictions:
show_sampling_rate_min = transtition_latency * 500 / 1000 If CONFIG_NO_HZ is set, the limit is 10ms fixed.
show_sampling_rate_max = transtition_latency * 500000 / 1000 If CONFIG_NO_HZ is not set or no_hz=off boot parameter is used, the
(divided by 1000 is to illustrate that sampling rate is in us and limits depend on the CONFIG_HZ option:
transition latency is exported ns). HZ=1000: min=20000us (20ms)
HZ=250: min=80000us (80ms)
HZ=100: min=200000us (200ms)
The highest value of kernel and HW latency restrictions is shown and
used as the minimum sampling rate.
show_sampling_rate_max: THIS INTERFACE IS DEPRECATED, DON'T USE IT.
up_threshold: defines what the average CPU usage between the samplings up_threshold: defines what the average CPU usage between the samplings
of 'sampling_rate' needs to be for the kernel to make a decision on of 'sampling_rate' needs to be for the kernel to make a decision on
......
...@@ -31,7 +31,6 @@ Contents: ...@@ -31,7 +31,6 @@ Contents:
3. How to change the CPU cpufreq policy and/or speed 3. How to change the CPU cpufreq policy and/or speed
3.1 Preferred interface: sysfs 3.1 Preferred interface: sysfs
3.2 Deprecated interfaces
......
...@@ -162,3 +162,35 @@ device_remove_file(dev,&dev_attr_power); ...@@ -162,3 +162,35 @@ device_remove_file(dev,&dev_attr_power);
The file name will be 'power' with a mode of 0644 (-rw-r--r--). The file name will be 'power' with a mode of 0644 (-rw-r--r--).
Word of warning: While the kernel allows device_create_file() and
device_remove_file() to be called on a device at any time, userspace has
strict expectations on when attributes get created. When a new device is
registered in the kernel, a uevent is generated to notify userspace (like
udev) that a new device is available. If attributes are added after the
device is registered, then userspace won't get notified and userspace will
not know about the new attributes.
This is important for device driver that need to publish additional
attributes for a device at driver probe time. If the device driver simply
calls device_create_file() on the device structure passed to it, then
userspace will never be notified of the new attributes. Instead, it should
probably use class_create() and class->dev_attrs to set up a list of
desired attributes in the modules_init function, and then in the .probe()
hook, and then use device_create() to create a new device as a child
of the probed device. The new device will generate a new uevent and
properly advertise the new attributes to userspace.
For example, if a driver wanted to add the following attributes:
struct device_attribute mydriver_attribs[] = {
__ATTR(port_count, 0444, port_count_show),
__ATTR(serial_number, 0444, serial_number_show),
NULL
};
Then in the module init function is would do:
mydriver_class = class_create(THIS_MODULE, "my_attrs");
mydriver_class.dev_attr = mydriver_attribs;
And assuming 'dev' is the struct device passed into the probe hook, the driver
probe function would do something like:
create_device(&mydriver_class, dev, chrdev, &private_data, "my_name");
...@@ -112,7 +112,7 @@ sub tda10045 { ...@@ -112,7 +112,7 @@ sub tda10045 {
sub tda10046 { sub tda10046 {
my $sourcefile = "TT_PCI_2.19h_28_11_2006.zip"; my $sourcefile = "TT_PCI_2.19h_28_11_2006.zip";
my $url = "http://technotrend-online.com/download/software/219/$sourcefile"; my $url = "http://www.tt-download.com/download/updates/219/$sourcefile";
my $hash = "6a7e1e2f2644b162ff0502367553c72d"; my $hash = "6a7e1e2f2644b162ff0502367553c72d";
my $outfile = "dvb-fe-tda10046.fw"; my $outfile = "dvb-fe-tda10046.fw";
my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1); my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
...@@ -129,8 +129,8 @@ sub tda10046 { ...@@ -129,8 +129,8 @@ sub tda10046 {
} }
sub tda10046lifeview { sub tda10046lifeview {
my $sourcefile = "Drv_2.11.02.zip"; my $sourcefile = "7%5Cdrv_2.11.02.zip";
my $url = "http://www.lifeview.com.tw/drivers/pci_card/FlyDVB-T/$sourcefile"; my $url = "http://www.lifeview.hk/dbimages/document/$sourcefile";
my $hash = "1ea24dee4eea8fe971686981f34fd2e0"; my $hash = "1ea24dee4eea8fe971686981f34fd2e0";
my $outfile = "dvb-fe-tda10046.fw"; my $outfile = "dvb-fe-tda10046.fw";
my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1); my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
...@@ -317,7 +317,7 @@ sub nxt2002 { ...@@ -317,7 +317,7 @@ sub nxt2002 {
sub nxt2004 { sub nxt2004 {
my $sourcefile = "AVerTVHD_MCE_A180_Drv_v1.2.2.16.zip"; my $sourcefile = "AVerTVHD_MCE_A180_Drv_v1.2.2.16.zip";
my $url = "http://www.aver.com/support/Drivers/$sourcefile"; my $url = "http://www.avermedia-usa.com/support/Drivers/$sourcefile";
my $hash = "111cb885b1e009188346d72acfed024c"; my $hash = "111cb885b1e009188346d72acfed024c";
my $outfile = "dvb-fe-nxt2004.fw"; my $outfile = "dvb-fe-nxt2004.fw";
my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1); my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
......
...@@ -29,16 +29,16 @@ o debugfs entries ...@@ -29,16 +29,16 @@ o debugfs entries
fault-inject-debugfs kernel module provides some debugfs entries for runtime fault-inject-debugfs kernel module provides some debugfs entries for runtime
configuration of fault-injection capabilities. configuration of fault-injection capabilities.
- /debug/fail*/probability: - /sys/kernel/debug/fail*/probability:
likelihood of failure injection, in percent. likelihood of failure injection, in percent.
Format: <percent> Format: <percent>
Note that one-failure-per-hundred is a very high error rate Note that one-failure-per-hundred is a very high error rate
for some testcases. Consider setting probability=100 and configure for some testcases. Consider setting probability=100 and configure
/debug/fail*/interval for such testcases. /sys/kernel/debug/fail*/interval for such testcases.
- /debug/fail*/interval: - /sys/kernel/debug/fail*/interval:
specifies the interval between failures, for calls to specifies the interval between failures, for calls to
should_fail() that pass all the other tests. should_fail() that pass all the other tests.
...@@ -46,18 +46,18 @@ configuration of fault-injection capabilities. ...@@ -46,18 +46,18 @@ configuration of fault-injection capabilities.
Note that if you enable this, by setting interval>1, you will Note that if you enable this, by setting interval>1, you will
probably want to set probability=100. probably want to set probability=100.
- /debug/fail*/times: - /sys/kernel/debug/fail*/times:
specifies how many times failures may happen at most. specifies how many times failures may happen at most.
A value of -1 means "no limit". A value of -1 means "no limit".
- /debug/fail*/space: - /sys/kernel/debug/fail*/space:
specifies an initial resource "budget", decremented by "size" specifies an initial resource "budget", decremented by "size"
on each call to should_fail(,size). Failure injection is on each call to should_fail(,size). Failure injection is
suppressed until "space" reaches zero. suppressed until "space" reaches zero.
- /debug/fail*/verbose - /sys/kernel/debug/fail*/verbose
Format: { 0 | 1 | 2 } Format: { 0 | 1 | 2 }
specifies the verbosity of the messages when failure is specifies the verbosity of the messages when failure is
...@@ -65,17 +65,17 @@ configuration of fault-injection capabilities. ...@@ -65,17 +65,17 @@ configuration of fault-injection capabilities.
log line per failure; '2' will print a call trace too -- useful log line per failure; '2' will print a call trace too -- useful
to debug the problems revealed by fault injection. to debug the problems revealed by fault injection.
- /debug/fail*/task-filter: - /sys/kernel/debug/fail*/task-filter:
Format: { 'Y' | 'N' } Format: { 'Y' | 'N' }
A value of 'N' disables filtering by process (default). A value of 'N' disables filtering by process (default).
Any positive value limits failures to only processes indicated by Any positive value limits failures to only processes indicated by
/proc/<pid>/make-it-fail==1. /proc/<pid>/make-it-fail==1.
- /debug/fail*/require-start: - /sys/kernel/debug/fail*/require-start:
- /debug/fail*/require-end: - /sys/kernel/debug/fail*/require-end:
- /debug/fail*/reject-start: - /sys/kernel/debug/fail*/reject-start:
- /debug/fail*/reject-end: - /sys/kernel/debug/fail*/reject-end:
specifies the range of virtual addresses tested during specifies the range of virtual addresses tested during
stacktrace walking. Failure is injected only if some caller stacktrace walking. Failure is injected only if some caller
...@@ -84,26 +84,26 @@ configuration of fault-injection capabilities. ...@@ -84,26 +84,26 @@ configuration of fault-injection capabilities.
Default required range is [0,ULONG_MAX) (whole of virtual address space). Default required range is [0,ULONG_MAX) (whole of virtual address space).
Default rejected range is [0,0). Default rejected range is [0,0).
- /debug/fail*/stacktrace-depth: - /sys/kernel/debug/fail*/stacktrace-depth:
specifies the maximum stacktrace depth walked during search specifies the maximum stacktrace depth walked during search
for a caller within [require-start,require-end) OR for a caller within [require-start,require-end) OR
[reject-start,reject-end). [reject-start,reject-end).
- /debug/fail_page_alloc/ignore-gfp-highmem: - /sys/kernel/debug/fail_page_alloc/ignore-gfp-highmem:
Format: { 'Y' | 'N' } Format: { 'Y' | 'N' }
default is 'N', setting it to 'Y' won't inject failures into default is 'N', setting it to 'Y' won't inject failures into
highmem/user allocations. highmem/user allocations.
- /debug/failslab/ignore-gfp-wait: - /sys/kernel/debug/failslab/ignore-gfp-wait:
- /debug/fail_page_alloc/ignore-gfp-wait: - /sys/kernel/debug/fail_page_alloc/ignore-gfp-wait:
Format: { 'Y' | 'N' } Format: { 'Y' | 'N' }
default is 'N', setting it to 'Y' will inject failures default is 'N', setting it to 'Y' will inject failures
only into non-sleep allocations (GFP_ATOMIC allocations). only into non-sleep allocations (GFP_ATOMIC allocations).
- /debug/fail_page_alloc/min-order: - /sys/kernel/debug/fail_page_alloc/min-order:
specifies the minimum page allocation order to be injected specifies the minimum page allocation order to be injected
failures. failures.
...@@ -166,13 +166,13 @@ o Inject slab allocation failures into module init/exit code ...@@ -166,13 +166,13 @@ o Inject slab allocation failures into module init/exit code
#!/bin/bash #!/bin/bash
FAILTYPE=failslab FAILTYPE=failslab
echo Y > /debug/$FAILTYPE/task-filter echo Y > /sys/kernel/debug/$FAILTYPE/task-filter
echo 10 > /debug/$FAILTYPE/probability echo 10 > /sys/kernel/debug/$FAILTYPE/probability
echo 100 > /debug/$FAILTYPE/interval echo 100 > /sys/kernel/debug/$FAILTYPE/interval
echo -1 > /debug/$FAILTYPE/times echo -1 > /sys/kernel/debug/$FAILTYPE/times
echo 0 > /debug/$FAILTYPE/space echo 0 > /sys/kernel/debug/$FAILTYPE/space
echo 2 > /debug/$FAILTYPE/verbose echo 2 > /sys/kernel/debug/$FAILTYPE/verbose
echo 1 > /debug/$FAILTYPE/ignore-gfp-wait echo 1 > /sys/kernel/debug/$FAILTYPE/ignore-gfp-wait
faulty_system() faulty_system()
{ {
...@@ -217,20 +217,20 @@ then ...@@ -217,20 +217,20 @@ then
exit 1 exit 1
fi fi
cat /sys/module/$module/sections/.text > /debug/$FAILTYPE/require-start cat /sys/module/$module/sections/.text > /sys/kernel/debug/$FAILTYPE/require-start
cat /sys/module/$module/sections/.data > /debug/$FAILTYPE/require-end cat /sys/module/$module/sections/.data > /sys/kernel/debug/$FAILTYPE/require-end
echo N > /debug/$FAILTYPE/task-filter echo N > /sys/kernel/debug/$FAILTYPE/task-filter
echo 10 > /debug/$FAILTYPE/probability echo 10 > /sys/kernel/debug/$FAILTYPE/probability
echo 100 > /debug/$FAILTYPE/interval echo 100 > /sys/kernel/debug/$FAILTYPE/interval
echo -1 > /debug/$FAILTYPE/times echo -1 > /sys/kernel/debug/$FAILTYPE/times
echo 0 > /debug/$FAILTYPE/space echo 0 > /sys/kernel/debug/$FAILTYPE/space
echo 2 > /debug/$FAILTYPE/verbose echo 2 > /sys/kernel/debug/$FAILTYPE/verbose
echo 1 > /debug/$FAILTYPE/ignore-gfp-wait echo 1 > /sys/kernel/debug/$FAILTYPE/ignore-gfp-wait
echo 1 > /debug/$FAILTYPE/ignore-gfp-highmem echo 1 > /sys/kernel/debug/$FAILTYPE/ignore-gfp-highmem
echo 10 > /debug/$FAILTYPE/stacktrace-depth echo 10 > /sys/kernel/debug/$FAILTYPE/stacktrace-depth
trap "echo 0 > /debug/$FAILTYPE/probability" SIGINT SIGTERM EXIT trap "echo 0 > /sys/kernel/debug/$FAILTYPE/probability" SIGINT SIGTERM EXIT
echo "Injecting errors into the module $module... (interrupt to stop)" echo "Injecting errors into the module $module... (interrupt to stop)"
sleep 1000000 sleep 1000000
......
...@@ -95,7 +95,7 @@ There is no way to change the vesafb video mode and/or timings after ...@@ -95,7 +95,7 @@ There is no way to change the vesafb video mode and/or timings after
booting linux. If you are not happy with the 60 Hz refresh rate, you booting linux. If you are not happy with the 60 Hz refresh rate, you
have these options: have these options:
* configure and load the DOS-Tools for your the graphics board (if * configure and load the DOS-Tools for the graphics board (if
available) and boot linux with loadlin. available) and boot linux with loadlin.
* use a native driver (matroxfb/atyfb) instead if vesafb. If none * use a native driver (matroxfb/atyfb) instead if vesafb. If none
is available, write a new one! is available, write a new one!
......
...@@ -187,7 +187,7 @@ readpages: no ...@@ -187,7 +187,7 @@ readpages: no
write_begin: no locks the page yes write_begin: no locks the page yes
write_end: no yes, unlocks yes write_end: no yes, unlocks yes
perform_write: no n/a yes perform_write: no n/a yes
bmap: yes bmap: no
invalidatepage: no yes invalidatepage: no yes
releasepage: no yes releasepage: no yes
direct_IO: no direct_IO: no
......
...@@ -1003,11 +1003,13 @@ CHAPTER 3: PER-PROCESS PARAMETERS ...@@ -1003,11 +1003,13 @@ CHAPTER 3: PER-PROCESS PARAMETERS
3.1 /proc/<pid>/oom_adj - Adjust the oom-killer score 3.1 /proc/<pid>/oom_adj - Adjust the oom-killer score
------------------------------------------------------ ------------------------------------------------------
This file can be used to adjust the score used to select which processes This file can be used to adjust the score used to select which processes should
should be killed in an out-of-memory situation. Giving it a high score will be killed in an out-of-memory situation. The oom_adj value is a characteristic
increase the likelihood of this process being killed by the oom-killer. Valid of the task's mm, so all threads that share an mm with pid will have the same
values are in the range -16 to +15, plus the special value -17, which disables oom_adj value. A high value will increase the likelihood of this process being
oom-killing altogether for this process. killed by the oom-killer. Valid values are in the range -16 to +15 as
explained below and a special value of -17, which disables oom-killing
altogether for threads sharing pid's mm.
The process to be killed in an out-of-memory situation is selected among all others The process to be killed in an out-of-memory situation is selected among all others
based on its badness score. This value equals the original memory size of the process based on its badness score. This value equals the original memory size of the process
...@@ -1021,6 +1023,9 @@ the parent's score if they do not share the same memory. Thus forking servers ...@@ -1021,6 +1023,9 @@ the parent's score if they do not share the same memory. Thus forking servers
are the prime candidates to be killed. Having only one 'hungry' child will make are the prime candidates to be killed. Having only one 'hungry' child will make
parent less preferable than the child. parent less preferable than the child.
/proc/<pid>/oom_adj cannot be changed for kthreads since they are immune from
oom-killing already.
/proc/<pid>/oom_score shows process' current badness score. /proc/<pid>/oom_score shows process' current badness score.
The following heuristics are then applied: The following heuristics are then applied:
......
...@@ -77,7 +77,8 @@ ...@@ -77,7 +77,8 @@
seconds for the whole load operation. seconds for the whole load operation.
- request_firmware_nowait() is also provided for convenience in - request_firmware_nowait() is also provided for convenience in
non-user contexts. user contexts to request firmware asynchronously, but can't be called
in atomic contexts.
about in-kernel persistence: about in-kernel persistence:
......
...@@ -546,6 +546,10 @@ and is between 256 and 4096 characters. It is defined in the file ...@@ -546,6 +546,10 @@ and is between 256 and 4096 characters. It is defined in the file
console=brl,ttyS0 console=brl,ttyS0
For now, only VisioBraille is supported. For now, only VisioBraille is supported.
consoleblank= [KNL] The console blank (screen saver) timeout in
seconds. Defaults to 10*60 = 10mins. A value of 0
disables the blank timer.
coredump_filter= coredump_filter=
[KNL] Change the default value for [KNL] Change the default value for
/proc/<pid>/coredump_filter. /proc/<pid>/coredump_filter.
......
此差异已折叠。
...@@ -507,9 +507,9 @@ http://www.linuxsymposium.org/2006/linuxsymposium_procv2.pdf (pages 101-115) ...@@ -507,9 +507,9 @@ http://www.linuxsymposium.org/2006/linuxsymposium_procv2.pdf (pages 101-115)
Appendix A: The kprobes debugfs interface Appendix A: The kprobes debugfs interface
With recent kernels (> 2.6.20) the list of registered kprobes is visible With recent kernels (> 2.6.20) the list of registered kprobes is visible
under the /debug/kprobes/ directory (assuming debugfs is mounted at /debug). under the /sys/kernel/debug/kprobes/ directory (assuming debugfs is mounted at //sys/kernel/debug).
/debug/kprobes/list: Lists all registered probes on the system /sys/kernel/debug/kprobes/list: Lists all registered probes on the system
c015d71a k vfs_read+0x0 c015d71a k vfs_read+0x0
c011a316 j do_fork+0x0 c011a316 j do_fork+0x0
...@@ -525,7 +525,7 @@ virtual addresses that correspond to modules that've been unloaded), ...@@ -525,7 +525,7 @@ virtual addresses that correspond to modules that've been unloaded),
such probes are marked with [GONE]. If the probe is temporarily disabled, such probes are marked with [GONE]. If the probe is temporarily disabled,
such probes are marked with [DISABLED]. such probes are marked with [DISABLED].
/debug/kprobes/enabled: Turn kprobes ON/OFF forcibly. /sys/kernel/debug/kprobes/enabled: Turn kprobes ON/OFF forcibly.
Provides a knob to globally and forcibly turn registered kprobes ON or OFF. Provides a knob to globally and forcibly turn registered kprobes ON or OFF.
By default, all kprobes are enabled. By echoing "0" to this file, all By default, all kprobes are enabled. By echoing "0" to this file, all
......
SCSI FC Tansport SCSI FC Tansport
============================================= =============================================
Date: 4/12/2007 Date: 11/18/2008
Kernel Revisions for features: Kernel Revisions for features:
rports : <<TBS>> rports : <<TBS>>
vports : 2.6.22 (? TBD) vports : 2.6.22
bsg support : 2.6.30 (?TBD?)
Introduction Introduction
...@@ -15,6 +16,7 @@ The FC transport can be found at: ...@@ -15,6 +16,7 @@ The FC transport can be found at:
drivers/scsi/scsi_transport_fc.c drivers/scsi/scsi_transport_fc.c
include/scsi/scsi_transport_fc.h include/scsi/scsi_transport_fc.h
include/scsi/scsi_netlink_fc.h include/scsi/scsi_netlink_fc.h
include/scsi/scsi_bsg_fc.h
This file is found at Documentation/scsi/scsi_fc_transport.txt This file is found at Documentation/scsi/scsi_fc_transport.txt
...@@ -472,6 +474,14 @@ int ...@@ -472,6 +474,14 @@ int
fc_vport_terminate(struct fc_vport *vport) fc_vport_terminate(struct fc_vport *vport)
FC BSG support (CT & ELS passthru, and more)
========================================================================
<< To Be Supplied >>
Credits Credits
======= =======
The following people have contributed to this document: The following people have contributed to this document:
......
...@@ -1271,6 +1271,11 @@ of interest: ...@@ -1271,6 +1271,11 @@ of interest:
hostdata[0] - area reserved for LLD at end of struct Scsi_Host. Size hostdata[0] - area reserved for LLD at end of struct Scsi_Host. Size
is set by the second argument (named 'xtr_bytes') to is set by the second argument (named 'xtr_bytes') to
scsi_host_alloc() or scsi_register(). scsi_host_alloc() or scsi_register().
vendor_id - a unique value that identifies the vendor supplying
the LLD for the Scsi_Host. Used most often in validating
vendor-specific message requests. Value consists of an
identifier type and a vendor-specific value.
See scsi_netlink.h for a description of valid formats.
The scsi_host structure is defined in include/scsi/scsi_host.h The scsi_host structure is defined in include/scsi/scsi_host.h
......
...@@ -233,8 +233,8 @@ These protections are added to score to judge whether this zone should be used ...@@ -233,8 +233,8 @@ These protections are added to score to judge whether this zone should be used
for page allocation or should be reclaimed. for page allocation or should be reclaimed.
In this example, if normal pages (index=2) are required to this DMA zone and In this example, if normal pages (index=2) are required to this DMA zone and
pages_high is used for watermark, the kernel judges this zone should not be watermark[WMARK_HIGH] is used for watermark, the kernel judges this zone should
used because pages_free(1355) is smaller than watermark + protection[2] not be used because pages_free(1355) is smaller than watermark + protection[2]
(4 + 2004 = 2008). If this protection value is 0, this zone would be used for (4 + 2004 = 2008). If this protection value is 0, this zone would be used for
normal page requirement. If requirement is DMA zone(index=0), protection[0] normal page requirement. If requirement is DMA zone(index=0), protection[0]
(=0) is used. (=0) is used.
...@@ -280,9 +280,10 @@ The default value is 65536. ...@@ -280,9 +280,10 @@ The default value is 65536.
min_free_kbytes: min_free_kbytes:
This is used to force the Linux VM to keep a minimum number This is used to force the Linux VM to keep a minimum number
of kilobytes free. The VM uses this number to compute a pages_min of kilobytes free. The VM uses this number to compute a
value for each lowmem zone in the system. Each lowmem zone gets watermark[WMARK_MIN] value for each lowmem zone in the system.
a number of reserved free pages based proportionally on its size. Each lowmem zone gets a number of reserved free pages based
proportionally on its size.
Some minimal amount of memory is needed to satisfy PF_MEMALLOC Some minimal amount of memory is needed to satisfy PF_MEMALLOC
allocations; if you set this to lower than 1024KB, your system will allocations; if you set this to lower than 1024KB, your system will
...@@ -314,10 +315,14 @@ min_unmapped_ratio: ...@@ -314,10 +315,14 @@ min_unmapped_ratio:
This is available only on NUMA kernels. This is available only on NUMA kernels.
A percentage of the total pages in each zone. Zone reclaim will only This is a percentage of the total pages in each zone. Zone reclaim will
occur if more than this percentage of pages are file backed and unmapped. only occur if more than this percentage of pages are in a state that
This is to insure that a minimal amount of local pages is still available for zone_reclaim_mode allows to be reclaimed.
file I/O even if the node is overallocated.
If zone_reclaim_mode has the value 4 OR'd, then the percentage is compared
against all file-backed unmapped pages including swapcache pages and tmpfs
files. Otherwise, only unmapped pages backed by normal files but not tmpfs
files and similar are considered.
The default is 1 percent. The default is 1 percent.
......
...@@ -7,7 +7,6 @@ Copyright 2008 Red Hat Inc. ...@@ -7,7 +7,6 @@ Copyright 2008 Red Hat Inc.
(dual licensed under the GPL v2) (dual licensed under the GPL v2)
Reviewers: Elias Oltmanns, Randy Dunlap, Andrew Morton, Reviewers: Elias Oltmanns, Randy Dunlap, Andrew Morton,
John Kacur, and David Teigland. John Kacur, and David Teigland.
Written for: 2.6.28-rc2 Written for: 2.6.28-rc2
Introduction Introduction
...@@ -33,13 +32,26 @@ The File System ...@@ -33,13 +32,26 @@ The File System
Ftrace uses the debugfs file system to hold the control files as Ftrace uses the debugfs file system to hold the control files as
well as the files to display output. well as the files to display output.
To mount the debugfs system: When debugfs is configured into the kernel (which selecting any ftrace
option will do) the directory /sys/kernel/debug will be created. To mount
this directory, you can add to your /etc/fstab file:
debugfs /sys/kernel/debug debugfs defaults 0 0
Or you can mount it at run time with:
mount -t debugfs nodev /sys/kernel/debug
# mkdir /debug For quicker access to that directory you may want to make a soft link to
# mount -t debugfs nodev /debug it:
( Note: it is more common to mount at /sys/kernel/debug, but for ln -s /sys/kernel/debug /debug
simplicity this document will use /debug)
Any selected ftrace option will also create a directory called tracing
within the debugfs. The rest of the document will assume that you are in
the ftrace directory (cd /sys/kernel/debug/tracing) and will only concentrate
on the files within that directory and not distract from the content with
the extended "/sys/kernel/debug/tracing" path name.
That's it! (assuming that you have ftrace configured into your kernel) That's it! (assuming that you have ftrace configured into your kernel)
...@@ -389,18 +401,18 @@ trace_options ...@@ -389,18 +401,18 @@ trace_options
The trace_options file is used to control what gets printed in The trace_options file is used to control what gets printed in
the trace output. To see what is available, simply cat the file: the trace output. To see what is available, simply cat the file:
cat /debug/tracing/trace_options cat trace_options
print-parent nosym-offset nosym-addr noverbose noraw nohex nobin \ print-parent nosym-offset nosym-addr noverbose noraw nohex nobin \
noblock nostacktrace nosched-tree nouserstacktrace nosym-userobj noblock nostacktrace nosched-tree nouserstacktrace nosym-userobj
To disable one of the options, echo in the option prepended with To disable one of the options, echo in the option prepended with
"no". "no".
echo noprint-parent > /debug/tracing/trace_options echo noprint-parent > trace_options
To enable an option, leave off the "no". To enable an option, leave off the "no".
echo sym-offset > /debug/tracing/trace_options echo sym-offset > trace_options
Here are the available options: Here are the available options:
...@@ -476,11 +488,11 @@ sched_switch ...@@ -476,11 +488,11 @@ sched_switch
This tracer simply records schedule switches. Here is an example This tracer simply records schedule switches. Here is an example
of how to use it. of how to use it.
# echo sched_switch > /debug/tracing/current_tracer # echo sched_switch > current_tracer
# echo 1 > /debug/tracing/tracing_enabled # echo 1 > tracing_enabled
# sleep 1 # sleep 1
# echo 0 > /debug/tracing/tracing_enabled # echo 0 > tracing_enabled
# cat /debug/tracing/trace # cat trace
# tracer: sched_switch # tracer: sched_switch
# #
...@@ -583,13 +595,13 @@ new trace is saved. ...@@ -583,13 +595,13 @@ new trace is saved.
To reset the maximum, echo 0 into tracing_max_latency. Here is To reset the maximum, echo 0 into tracing_max_latency. Here is
an example: an example:
# echo irqsoff > /debug/tracing/current_tracer # echo irqsoff > current_tracer
# echo 0 > /debug/tracing/tracing_max_latency # echo 0 > tracing_max_latency
# echo 1 > /debug/tracing/tracing_enabled # echo 1 > tracing_enabled
# ls -ltr # ls -ltr
[...] [...]
# echo 0 > /debug/tracing/tracing_enabled # echo 0 > tracing_enabled
# cat /debug/tracing/latency_trace # cat latency_trace
# tracer: irqsoff # tracer: irqsoff
# #
irqsoff latency trace v1.1.5 on 2.6.26 irqsoff latency trace v1.1.5 on 2.6.26
...@@ -690,13 +702,13 @@ Like the irqsoff tracer, it records the maximum latency for ...@@ -690,13 +702,13 @@ Like the irqsoff tracer, it records the maximum latency for
which preemption was disabled. The control of preemptoff tracer which preemption was disabled. The control of preemptoff tracer
is much like the irqsoff tracer. is much like the irqsoff tracer.
# echo preemptoff > /debug/tracing/current_tracer # echo preemptoff > current_tracer
# echo 0 > /debug/tracing/tracing_max_latency # echo 0 > tracing_max_latency
# echo 1 > /debug/tracing/tracing_enabled # echo 1 > tracing_enabled
# ls -ltr # ls -ltr
[...] [...]
# echo 0 > /debug/tracing/tracing_enabled # echo 0 > tracing_enabled
# cat /debug/tracing/latency_trace # cat latency_trace
# tracer: preemptoff # tracer: preemptoff
# #
preemptoff latency trace v1.1.5 on 2.6.26-rc8 preemptoff latency trace v1.1.5 on 2.6.26-rc8
...@@ -837,13 +849,13 @@ tracer. ...@@ -837,13 +849,13 @@ tracer.
Again, using this trace is much like the irqsoff and preemptoff Again, using this trace is much like the irqsoff and preemptoff
tracers. tracers.
# echo preemptirqsoff > /debug/tracing/current_tracer # echo preemptirqsoff > current_tracer
# echo 0 > /debug/tracing/tracing_max_latency # echo 0 > tracing_max_latency
# echo 1 > /debug/tracing/tracing_enabled # echo 1 > tracing_enabled
# ls -ltr # ls -ltr
[...] [...]
# echo 0 > /debug/tracing/tracing_enabled # echo 0 > tracing_enabled
# cat /debug/tracing/latency_trace # cat latency_trace
# tracer: preemptirqsoff # tracer: preemptirqsoff
# #
preemptirqsoff latency trace v1.1.5 on 2.6.26-rc8 preemptirqsoff latency trace v1.1.5 on 2.6.26-rc8
...@@ -999,12 +1011,12 @@ slightly differently than we did with the previous tracers. ...@@ -999,12 +1011,12 @@ slightly differently than we did with the previous tracers.
Instead of performing an 'ls', we will run 'sleep 1' under Instead of performing an 'ls', we will run 'sleep 1' under
'chrt' which changes the priority of the task. 'chrt' which changes the priority of the task.
# echo wakeup > /debug/tracing/current_tracer # echo wakeup > current_tracer
# echo 0 > /debug/tracing/tracing_max_latency # echo 0 > tracing_max_latency
# echo 1 > /debug/tracing/tracing_enabled # echo 1 > tracing_enabled
# chrt -f 5 sleep 1 # chrt -f 5 sleep 1
# echo 0 > /debug/tracing/tracing_enabled # echo 0 > tracing_enabled
# cat /debug/tracing/latency_trace # cat latency_trace
# tracer: wakeup # tracer: wakeup
# #
wakeup latency trace v1.1.5 on 2.6.26-rc8 wakeup latency trace v1.1.5 on 2.6.26-rc8
...@@ -1114,11 +1126,11 @@ can be done from the debug file system. Make sure the ...@@ -1114,11 +1126,11 @@ can be done from the debug file system. Make sure the
ftrace_enabled is set; otherwise this tracer is a nop. ftrace_enabled is set; otherwise this tracer is a nop.
# sysctl kernel.ftrace_enabled=1 # sysctl kernel.ftrace_enabled=1
# echo function > /debug/tracing/current_tracer # echo function > current_tracer
# echo 1 > /debug/tracing/tracing_enabled # echo 1 > tracing_enabled
# usleep 1 # usleep 1
# echo 0 > /debug/tracing/tracing_enabled # echo 0 > tracing_enabled
# cat /debug/tracing/trace # cat trace
# tracer: function # tracer: function
# #
# TASK-PID CPU# TIMESTAMP FUNCTION # TASK-PID CPU# TIMESTAMP FUNCTION
...@@ -1155,7 +1167,7 @@ int trace_fd; ...@@ -1155,7 +1167,7 @@ int trace_fd;
[...] [...]
int main(int argc, char *argv[]) { int main(int argc, char *argv[]) {
[...] [...]
trace_fd = open("/debug/tracing/tracing_enabled", O_WRONLY); trace_fd = open(tracing_file("tracing_enabled"), O_WRONLY);
[...] [...]
if (condition_hit()) { if (condition_hit()) {
write(trace_fd, "0", 1); write(trace_fd, "0", 1);
...@@ -1163,26 +1175,20 @@ int main(int argc, char *argv[]) { ...@@ -1163,26 +1175,20 @@ int main(int argc, char *argv[]) {
[...] [...]
} }
Note: Here we hard coded the path name. The debugfs mount is not
guaranteed to be at /debug (and is more commonly at
/sys/kernel/debug). For simple one time traces, the above is
sufficent. For anything else, a search through /proc/mounts may
be needed to find where the debugfs file-system is mounted.
Single thread tracing Single thread tracing
--------------------- ---------------------
By writing into /debug/tracing/set_ftrace_pid you can trace a By writing into set_ftrace_pid you can trace a
single thread. For example: single thread. For example:
# cat /debug/tracing/set_ftrace_pid # cat set_ftrace_pid
no pid no pid
# echo 3111 > /debug/tracing/set_ftrace_pid # echo 3111 > set_ftrace_pid
# cat /debug/tracing/set_ftrace_pid # cat set_ftrace_pid
3111 3111
# echo function > /debug/tracing/current_tracer # echo function > current_tracer
# cat /debug/tracing/trace | head # cat trace | head
# tracer: function # tracer: function
# #
# TASK-PID CPU# TIMESTAMP FUNCTION # TASK-PID CPU# TIMESTAMP FUNCTION
...@@ -1193,8 +1199,8 @@ no pid ...@@ -1193,8 +1199,8 @@ no pid
yum-updatesd-3111 [003] 1637.254683: lock_hrtimer_base <-hrtimer_try_to_cancel yum-updatesd-3111 [003] 1637.254683: lock_hrtimer_base <-hrtimer_try_to_cancel
yum-updatesd-3111 [003] 1637.254685: fget_light <-do_sys_poll yum-updatesd-3111 [003] 1637.254685: fget_light <-do_sys_poll
yum-updatesd-3111 [003] 1637.254686: pipe_poll <-do_sys_poll yum-updatesd-3111 [003] 1637.254686: pipe_poll <-do_sys_poll
# echo -1 > /debug/tracing/set_ftrace_pid # echo -1 > set_ftrace_pid
# cat /debug/tracing/trace |head # cat trace |head
# tracer: function # tracer: function
# #
# TASK-PID CPU# TIMESTAMP FUNCTION # TASK-PID CPU# TIMESTAMP FUNCTION
...@@ -1216,6 +1222,51 @@ something like this simple program: ...@@ -1216,6 +1222,51 @@ something like this simple program:
#include <fcntl.h> #include <fcntl.h>
#include <unistd.h> #include <unistd.h>
#define _STR(x) #x
#define STR(x) _STR(x)
#define MAX_PATH 256
const char *find_debugfs(void)
{
static char debugfs[MAX_PATH+1];
static int debugfs_found;
char type[100];
FILE *fp;
if (debugfs_found)
return debugfs;
if ((fp = fopen("/proc/mounts","r")) == NULL) {
perror("/proc/mounts");
return NULL;
}
while (fscanf(fp, "%*s %"
STR(MAX_PATH)
"s %99s %*s %*d %*d\n",
debugfs, type) == 2) {
if (strcmp(type, "debugfs") == 0)
break;
}
fclose(fp);
if (strcmp(type, "debugfs") != 0) {
fprintf(stderr, "debugfs not mounted");
return NULL;
}
debugfs_found = 1;
return debugfs;
}
const char *tracing_file(const char *file_name)
{
static char trace_file[MAX_PATH+1];
snprintf(trace_file, MAX_PATH, "%s/%s", find_debugfs(), file_name);
return trace_file;
}
int main (int argc, char **argv) int main (int argc, char **argv)
{ {
if (argc < 1) if (argc < 1)
...@@ -1226,12 +1277,12 @@ int main (int argc, char **argv) ...@@ -1226,12 +1277,12 @@ int main (int argc, char **argv)
char line[64]; char line[64];
int s; int s;
ffd = open("/debug/tracing/current_tracer", O_WRONLY); ffd = open(tracing_file("current_tracer"), O_WRONLY);
if (ffd < 0) if (ffd < 0)
exit(-1); exit(-1);
write(ffd, "nop", 3); write(ffd, "nop", 3);
fd = open("/debug/tracing/set_ftrace_pid", O_WRONLY); fd = open(tracing_file("set_ftrace_pid"), O_WRONLY);
s = sprintf(line, "%d\n", getpid()); s = sprintf(line, "%d\n", getpid());
write(fd, line, s); write(fd, line, s);
...@@ -1383,22 +1434,22 @@ want, depending on your needs. ...@@ -1383,22 +1434,22 @@ want, depending on your needs.
tracing_cpu_mask file) or you might sometimes see unordered tracing_cpu_mask file) or you might sometimes see unordered
function calls while cpu tracing switch. function calls while cpu tracing switch.
hide: echo nofuncgraph-cpu > /debug/tracing/trace_options hide: echo nofuncgraph-cpu > trace_options
show: echo funcgraph-cpu > /debug/tracing/trace_options show: echo funcgraph-cpu > trace_options
- The duration (function's time of execution) is displayed on - The duration (function's time of execution) is displayed on
the closing bracket line of a function or on the same line the closing bracket line of a function or on the same line
than the current function in case of a leaf one. It is default than the current function in case of a leaf one. It is default
enabled. enabled.
hide: echo nofuncgraph-duration > /debug/tracing/trace_options hide: echo nofuncgraph-duration > trace_options
show: echo funcgraph-duration > /debug/tracing/trace_options show: echo funcgraph-duration > trace_options
- The overhead field precedes the duration field in case of - The overhead field precedes the duration field in case of
reached duration thresholds. reached duration thresholds.
hide: echo nofuncgraph-overhead > /debug/tracing/trace_options hide: echo nofuncgraph-overhead > trace_options
show: echo funcgraph-overhead > /debug/tracing/trace_options show: echo funcgraph-overhead > trace_options
depends on: funcgraph-duration depends on: funcgraph-duration
ie: ie:
...@@ -1427,8 +1478,8 @@ want, depending on your needs. ...@@ -1427,8 +1478,8 @@ want, depending on your needs.
- The task/pid field displays the thread cmdline and pid which - The task/pid field displays the thread cmdline and pid which
executed the function. It is default disabled. executed the function. It is default disabled.
hide: echo nofuncgraph-proc > /debug/tracing/trace_options hide: echo nofuncgraph-proc > trace_options
show: echo funcgraph-proc > /debug/tracing/trace_options show: echo funcgraph-proc > trace_options
ie: ie:
...@@ -1451,8 +1502,8 @@ want, depending on your needs. ...@@ -1451,8 +1502,8 @@ want, depending on your needs.
system clock since it started. A snapshot of this time is system clock since it started. A snapshot of this time is
given on each entry/exit of functions given on each entry/exit of functions
hide: echo nofuncgraph-abstime > /debug/tracing/trace_options hide: echo nofuncgraph-abstime > trace_options
show: echo funcgraph-abstime > /debug/tracing/trace_options show: echo funcgraph-abstime > trace_options
ie: ie:
...@@ -1549,7 +1600,7 @@ listed in: ...@@ -1549,7 +1600,7 @@ listed in:
available_filter_functions available_filter_functions
# cat /debug/tracing/available_filter_functions # cat available_filter_functions
put_prev_task_idle put_prev_task_idle
kmem_cache_create kmem_cache_create
pick_next_task_rt pick_next_task_rt
...@@ -1561,12 +1612,12 @@ mutex_lock ...@@ -1561,12 +1612,12 @@ mutex_lock
If I am only interested in sys_nanosleep and hrtimer_interrupt: If I am only interested in sys_nanosleep and hrtimer_interrupt:
# echo sys_nanosleep hrtimer_interrupt \ # echo sys_nanosleep hrtimer_interrupt \
> /debug/tracing/set_ftrace_filter > set_ftrace_filter
# echo ftrace > /debug/tracing/current_tracer # echo ftrace > current_tracer
# echo 1 > /debug/tracing/tracing_enabled # echo 1 > tracing_enabled
# usleep 1 # usleep 1
# echo 0 > /debug/tracing/tracing_enabled # echo 0 > tracing_enabled
# cat /debug/tracing/trace # cat trace
# tracer: ftrace # tracer: ftrace
# #
# TASK-PID CPU# TIMESTAMP FUNCTION # TASK-PID CPU# TIMESTAMP FUNCTION
...@@ -1577,7 +1628,7 @@ If I am only interested in sys_nanosleep and hrtimer_interrupt: ...@@ -1577,7 +1628,7 @@ If I am only interested in sys_nanosleep and hrtimer_interrupt:
To see which functions are being traced, you can cat the file: To see which functions are being traced, you can cat the file:
# cat /debug/tracing/set_ftrace_filter # cat set_ftrace_filter
hrtimer_interrupt hrtimer_interrupt
sys_nanosleep sys_nanosleep
...@@ -1597,7 +1648,7 @@ Note: It is better to use quotes to enclose the wild cards, ...@@ -1597,7 +1648,7 @@ Note: It is better to use quotes to enclose the wild cards,
otherwise the shell may expand the parameters into names otherwise the shell may expand the parameters into names
of files in the local directory. of files in the local directory.
# echo 'hrtimer_*' > /debug/tracing/set_ftrace_filter # echo 'hrtimer_*' > set_ftrace_filter
Produces: Produces:
...@@ -1618,7 +1669,7 @@ Produces: ...@@ -1618,7 +1669,7 @@ Produces:
Notice that we lost the sys_nanosleep. Notice that we lost the sys_nanosleep.
# cat /debug/tracing/set_ftrace_filter # cat set_ftrace_filter
hrtimer_run_queues hrtimer_run_queues
hrtimer_run_pending hrtimer_run_pending
hrtimer_init hrtimer_init
...@@ -1644,17 +1695,17 @@ To append to the filters, use '>>' ...@@ -1644,17 +1695,17 @@ To append to the filters, use '>>'
To clear out a filter so that all functions will be recorded To clear out a filter so that all functions will be recorded
again: again:
# echo > /debug/tracing/set_ftrace_filter # echo > set_ftrace_filter
# cat /debug/tracing/set_ftrace_filter # cat set_ftrace_filter
# #
Again, now we want to append. Again, now we want to append.
# echo sys_nanosleep > /debug/tracing/set_ftrace_filter # echo sys_nanosleep > set_ftrace_filter
# cat /debug/tracing/set_ftrace_filter # cat set_ftrace_filter
sys_nanosleep sys_nanosleep
# echo 'hrtimer_*' >> /debug/tracing/set_ftrace_filter # echo 'hrtimer_*' >> set_ftrace_filter
# cat /debug/tracing/set_ftrace_filter # cat set_ftrace_filter
hrtimer_run_queues hrtimer_run_queues
hrtimer_run_pending hrtimer_run_pending
hrtimer_init hrtimer_init
...@@ -1677,7 +1728,7 @@ hrtimer_init_sleeper ...@@ -1677,7 +1728,7 @@ hrtimer_init_sleeper
The set_ftrace_notrace prevents those functions from being The set_ftrace_notrace prevents those functions from being
traced. traced.
# echo '*preempt*' '*lock*' > /debug/tracing/set_ftrace_notrace # echo '*preempt*' '*lock*' > set_ftrace_notrace
Produces: Produces:
...@@ -1767,13 +1818,13 @@ the effect on the tracing is different. Every read from ...@@ -1767,13 +1818,13 @@ the effect on the tracing is different. Every read from
trace_pipe is consumed. This means that subsequent reads will be trace_pipe is consumed. This means that subsequent reads will be
different. The trace is live. different. The trace is live.
# echo function > /debug/tracing/current_tracer # echo function > current_tracer
# cat /debug/tracing/trace_pipe > /tmp/trace.out & # cat trace_pipe > /tmp/trace.out &
[1] 4153 [1] 4153
# echo 1 > /debug/tracing/tracing_enabled # echo 1 > tracing_enabled
# usleep 1 # usleep 1
# echo 0 > /debug/tracing/tracing_enabled # echo 0 > tracing_enabled
# cat /debug/tracing/trace # cat trace
# tracer: function # tracer: function
# #
# TASK-PID CPU# TIMESTAMP FUNCTION # TASK-PID CPU# TIMESTAMP FUNCTION
...@@ -1809,7 +1860,7 @@ number listed is the number of entries that can be recorded per ...@@ -1809,7 +1860,7 @@ number listed is the number of entries that can be recorded per
CPU. To know the full size, multiply the number of possible CPUS CPU. To know the full size, multiply the number of possible CPUS
with the number of entries. with the number of entries.
# cat /debug/tracing/buffer_size_kb # cat buffer_size_kb
1408 (units kilobytes) 1408 (units kilobytes)
Note, to modify this, you must have tracing completely disabled. Note, to modify this, you must have tracing completely disabled.
...@@ -1817,18 +1868,18 @@ To do that, echo "nop" into the current_tracer. If the ...@@ -1817,18 +1868,18 @@ To do that, echo "nop" into the current_tracer. If the
current_tracer is not set to "nop", an EINVAL error will be current_tracer is not set to "nop", an EINVAL error will be
returned. returned.
# echo nop > /debug/tracing/current_tracer # echo nop > current_tracer
# echo 10000 > /debug/tracing/buffer_size_kb # echo 10000 > buffer_size_kb
# cat /debug/tracing/buffer_size_kb # cat buffer_size_kb
10000 (units kilobytes) 10000 (units kilobytes)
The number of pages which will be allocated is limited to a The number of pages which will be allocated is limited to a
percentage of available memory. Allocating too much will produce percentage of available memory. Allocating too much will produce
an error. an error.
# echo 1000000000000 > /debug/tracing/buffer_size_kb # echo 1000000000000 > buffer_size_kb
-bash: echo: write error: Cannot allocate memory -bash: echo: write error: Cannot allocate memory
# cat /debug/tracing/buffer_size_kb # cat buffer_size_kb
85 85
----------- -----------
......
...@@ -32,41 +32,41 @@ is no way to automatically detect if you are losing events due to CPUs racing. ...@@ -32,41 +32,41 @@ is no way to automatically detect if you are losing events due to CPUs racing.
Usage Quick Reference Usage Quick Reference
--------------------- ---------------------
$ mount -t debugfs debugfs /debug $ mount -t debugfs debugfs /sys/kernel/debug
$ echo mmiotrace > /debug/tracing/current_tracer $ echo mmiotrace > /sys/kernel/debug/tracing/current_tracer
$ cat /debug/tracing/trace_pipe > mydump.txt & $ cat /sys/kernel/debug/tracing/trace_pipe > mydump.txt &
Start X or whatever. Start X or whatever.
$ echo "X is up" > /debug/tracing/trace_marker $ echo "X is up" > /sys/kernel/debug/tracing/trace_marker
$ echo nop > /debug/tracing/current_tracer $ echo nop > /sys/kernel/debug/tracing/current_tracer
Check for lost events. Check for lost events.
Usage Usage
----- -----
Make sure debugfs is mounted to /debug. If not, (requires root privileges) Make sure debugfs is mounted to /sys/kernel/debug. If not, (requires root privileges)
$ mount -t debugfs debugfs /debug $ mount -t debugfs debugfs /sys/kernel/debug
Check that the driver you are about to trace is not loaded. Check that the driver you are about to trace is not loaded.
Activate mmiotrace (requires root privileges): Activate mmiotrace (requires root privileges):
$ echo mmiotrace > /debug/tracing/current_tracer $ echo mmiotrace > /sys/kernel/debug/tracing/current_tracer
Start storing the trace: Start storing the trace:
$ cat /debug/tracing/trace_pipe > mydump.txt & $ cat /sys/kernel/debug/tracing/trace_pipe > mydump.txt &
The 'cat' process should stay running (sleeping) in the background. The 'cat' process should stay running (sleeping) in the background.
Load the driver you want to trace and use it. Mmiotrace will only catch MMIO Load the driver you want to trace and use it. Mmiotrace will only catch MMIO
accesses to areas that are ioremapped while mmiotrace is active. accesses to areas that are ioremapped while mmiotrace is active.
During tracing you can place comments (markers) into the trace by During tracing you can place comments (markers) into the trace by
$ echo "X is up" > /debug/tracing/trace_marker $ echo "X is up" > /sys/kernel/debug/tracing/trace_marker
This makes it easier to see which part of the (huge) trace corresponds to This makes it easier to see which part of the (huge) trace corresponds to
which action. It is recommended to place descriptive markers about what you which action. It is recommended to place descriptive markers about what you
do. do.
Shut down mmiotrace (requires root privileges): Shut down mmiotrace (requires root privileges):
$ echo nop > /debug/tracing/current_tracer $ echo nop > /sys/kernel/debug/tracing/current_tracer
The 'cat' process exits. If it does not, kill it by issuing 'fg' command and The 'cat' process exits. If it does not, kill it by issuing 'fg' command and
pressing ctrl+c. pressing ctrl+c.
...@@ -78,10 +78,10 @@ to view your kernel log and look for "mmiotrace has lost events" warning. If ...@@ -78,10 +78,10 @@ to view your kernel log and look for "mmiotrace has lost events" warning. If
events were lost, the trace is incomplete. You should enlarge the buffers and events were lost, the trace is incomplete. You should enlarge the buffers and
try again. Buffers are enlarged by first seeing how large the current buffers try again. Buffers are enlarged by first seeing how large the current buffers
are: are:
$ cat /debug/tracing/buffer_size_kb $ cat /sys/kernel/debug/tracing/buffer_size_kb
gives you a number. Approximately double this number and write it back, for gives you a number. Approximately double this number and write it back, for
instance: instance:
$ echo 128000 > /debug/tracing/buffer_size_kb $ echo 128000 > /sys/kernel/debug/tracing/buffer_size_kb
Then start again from the top. Then start again from the top.
If you are doing a trace for a driver project, e.g. Nouveau, you should also If you are doing a trace for a driver project, e.g. Nouveau, you should also
......
...@@ -16,3 +16,8 @@ ...@@ -16,3 +16,8 @@
15 -> TeVii S470 [d470:9022] 15 -> TeVii S470 [d470:9022]
16 -> DVBWorld DVB-S2 2005 [0001:2005] 16 -> DVBWorld DVB-S2 2005 [0001:2005]
17 -> NetUP Dual DVB-S2 CI [1b55:2a2c] 17 -> NetUP Dual DVB-S2 CI [1b55:2a2c]
18 -> Hauppauge WinTV-HVR1270 [0070:2211]
19 -> Hauppauge WinTV-HVR1275 [0070:2215]
20 -> Hauppauge WinTV-HVR1255 [0070:2251]
21 -> Hauppauge WinTV-HVR1210 [0070:2291,0070:2295]
22 -> Mygica X8506 DMB-TH [14f1:8651]
...@@ -78,3 +78,5 @@ ...@@ -78,3 +78,5 @@
77 -> TBS 8910 DVB-S [8910:8888] 77 -> TBS 8910 DVB-S [8910:8888]
78 -> Prof 6200 DVB-S [b022:3022] 78 -> Prof 6200 DVB-S [b022:3022]
79 -> Terratec Cinergy HT PCI MKII [153b:1177] 79 -> Terratec Cinergy HT PCI MKII [153b:1177]
80 -> Hauppauge WinTV-IR Only [0070:9290]
81 -> Leadtek WinFast DTV1800 Hybrid [107d:6654]
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
16 -> Hauppauge WinTV HVR 950 (em2883) [2040:6513,2040:6517,2040:651b] 16 -> Hauppauge WinTV HVR 950 (em2883) [2040:6513,2040:6517,2040:651b]
17 -> Pinnacle PCTV HD Pro Stick (em2880) [2304:0227] 17 -> Pinnacle PCTV HD Pro Stick (em2880) [2304:0227]
18 -> Hauppauge WinTV HVR 900 (R2) (em2880) [2040:6502] 18 -> Hauppauge WinTV HVR 900 (R2) (em2880) [2040:6502]
19 -> PointNix Intra-Oral Camera (em2860) 19 -> EM2860/SAA711X Reference Design (em2860)
20 -> AMD ATI TV Wonder HD 600 (em2880) [0438:b002] 20 -> AMD ATI TV Wonder HD 600 (em2880) [0438:b002]
21 -> eMPIA Technology, Inc. GrabBeeX+ Video Encoder (em2800) [eb1a:2801] 21 -> eMPIA Technology, Inc. GrabBeeX+ Video Encoder (em2800) [eb1a:2801]
22 -> Unknown EM2750/EM2751 webcam grabber (em2750) [eb1a:2750,eb1a:2751] 22 -> Unknown EM2750/EM2751 webcam grabber (em2750) [eb1a:2750,eb1a:2751]
...@@ -61,3 +61,7 @@ ...@@ -61,3 +61,7 @@
63 -> Kaiomy TVnPC U2 (em2860) [eb1a:e303] 63 -> Kaiomy TVnPC U2 (em2860) [eb1a:e303]
64 -> Easy Cap Capture DC-60 (em2860) 64 -> Easy Cap Capture DC-60 (em2860)
65 -> IO-DATA GV-MVP/SZ (em2820/em2840) [04bb:0515] 65 -> IO-DATA GV-MVP/SZ (em2820/em2840) [04bb:0515]
66 -> Empire dual TV (em2880)
67 -> Terratec Grabby (em2860) [0ccd:0096]
68 -> Terratec AV350 (em2860) [0ccd:0084]
69 -> KWorld ATSC 315U HDTV TV Box (em2882) [eb1a:a313]
...@@ -124,10 +124,10 @@ ...@@ -124,10 +124,10 @@
123 -> Beholder BeholdTV 407 [0000:4070] 123 -> Beholder BeholdTV 407 [0000:4070]
124 -> Beholder BeholdTV 407 FM [0000:4071] 124 -> Beholder BeholdTV 407 FM [0000:4071]
125 -> Beholder BeholdTV 409 [0000:4090] 125 -> Beholder BeholdTV 409 [0000:4090]
126 -> Beholder BeholdTV 505 FM/RDS [0000:5051,0000:505B,5ace:5050] 126 -> Beholder BeholdTV 505 FM [5ace:5050]
127 -> Beholder BeholdTV 507 FM/RDS / BeholdTV 509 FM [0000:5071,0000:507B,5ace:5070,5ace:5090] 127 -> Beholder BeholdTV 507 FM / BeholdTV 509 FM [5ace:5070,5ace:5090]
128 -> Beholder BeholdTV Columbus TVFM [0000:5201] 128 -> Beholder BeholdTV Columbus TVFM [0000:5201]
129 -> Beholder BeholdTV 607 / BeholdTV 609 [5ace:6070,5ace:6071,5ace:6072,5ace:6073,5ace:6090,5ace:6091,5ace:6092,5ace:6093] 129 -> Beholder BeholdTV 607 FM [5ace:6070]
130 -> Beholder BeholdTV M6 [5ace:6190] 130 -> Beholder BeholdTV M6 [5ace:6190]
131 -> Twinhan Hybrid DTV-DVB 3056 PCI [1822:0022] 131 -> Twinhan Hybrid DTV-DVB 3056 PCI [1822:0022]
132 -> Genius TVGO AM11MCE 132 -> Genius TVGO AM11MCE
...@@ -143,7 +143,7 @@ ...@@ -143,7 +143,7 @@
142 -> Beholder BeholdTV H6 [5ace:6290] 142 -> Beholder BeholdTV H6 [5ace:6290]
143 -> Beholder BeholdTV M63 [5ace:6191] 143 -> Beholder BeholdTV M63 [5ace:6191]
144 -> Beholder BeholdTV M6 Extra [5ace:6193] 144 -> Beholder BeholdTV M6 Extra [5ace:6193]
145 -> AVerMedia MiniPCI DVB-T Hybrid M103 [1461:f636] 145 -> AVerMedia MiniPCI DVB-T Hybrid M103 [1461:f636,1461:f736]
146 -> ASUSTeK P7131 Analog 146 -> ASUSTeK P7131 Analog
147 -> Asus Tiger 3in1 [1043:4878] 147 -> Asus Tiger 3in1 [1043:4878]
148 -> Encore ENLTV-FM v5.3 [1a7f:2008] 148 -> Encore ENLTV-FM v5.3 [1a7f:2008]
...@@ -154,4 +154,16 @@ ...@@ -154,4 +154,16 @@
153 -> Kworld Plus TV Analog Lite PCI [17de:7128] 153 -> Kworld Plus TV Analog Lite PCI [17de:7128]
154 -> Avermedia AVerTV GO 007 FM Plus [1461:f31d] 154 -> Avermedia AVerTV GO 007 FM Plus [1461:f31d]
155 -> Hauppauge WinTV-HVR1120 ATSC/QAM-Hybrid [0070:6706,0070:6708] 155 -> Hauppauge WinTV-HVR1120 ATSC/QAM-Hybrid [0070:6706,0070:6708]
156 -> Hauppauge WinTV-HVR1110r3 [0070:6707,0070:6709,0070:670a] 156 -> Hauppauge WinTV-HVR1110r3 DVB-T/Hybrid [0070:6707,0070:6709,0070:670a]
157 -> Avermedia AVerTV Studio 507UA [1461:a11b]
158 -> AVerMedia Cardbus TV/Radio (E501R) [1461:b7e9]
159 -> Beholder BeholdTV 505 RDS [0000:505B]
160 -> Beholder BeholdTV 507 RDS [0000:5071]
161 -> Beholder BeholdTV 507 RDS [0000:507B]
162 -> Beholder BeholdTV 607 FM [5ace:6071]
163 -> Beholder BeholdTV 609 FM [5ace:6090]
164 -> Beholder BeholdTV 609 FM [5ace:6091]
165 -> Beholder BeholdTV 607 RDS [5ace:6072]
166 -> Beholder BeholdTV 607 RDS [5ace:6073]
167 -> Beholder BeholdTV 609 RDS [5ace:6092]
168 -> Beholder BeholdTV 609 RDS [5ace:6093]
...@@ -76,3 +76,5 @@ tuner=75 - Philips TEA5761 FM Radio ...@@ -76,3 +76,5 @@ tuner=75 - Philips TEA5761 FM Radio
tuner=76 - Xceive 5000 tuner tuner=76 - Xceive 5000 tuner
tuner=77 - TCL tuner MF02GIP-5N-E tuner=77 - TCL tuner MF02GIP-5N-E
tuner=78 - Philips FMD1216MEX MK3 Hybrid Tuner tuner=78 - Philips FMD1216MEX MK3 Hybrid Tuner
tuner=79 - Philips PAL/SECAM multi (FM1216 MK5)
tuner=80 - Philips FQ1216LME MK3 PAL/SECAM w/active loopthrough
...@@ -163,10 +163,11 @@ sunplus 055f:c650 Mustek MDC5500Z ...@@ -163,10 +163,11 @@ sunplus 055f:c650 Mustek MDC5500Z
zc3xx 055f:d003 Mustek WCam300A zc3xx 055f:d003 Mustek WCam300A
zc3xx 055f:d004 Mustek WCam300 AN zc3xx 055f:d004 Mustek WCam300 AN
conex 0572:0041 Creative Notebook cx11646 conex 0572:0041 Creative Notebook cx11646
ov519 05a9:0519 OmniVision ov519 05a9:0519 OV519 Microphone
ov519 05a9:0530 OmniVision ov519 05a9:0530 OmniVision
ov519 05a9:4519 OmniVision ov519 05a9:4519 Webcam Classic
ov519 05a9:8519 OmniVision ov519 05a9:8519 OmniVision
ov519 05a9:a518 D-Link DSB-C310 Webcam
sunplus 05da:1018 Digital Dream Enigma 1.3 sunplus 05da:1018 Digital Dream Enigma 1.3
stk014 05e1:0893 Syntek DV4000 stk014 05e1:0893 Syntek DV4000
spca561 060b:a001 Maxell Compact Pc PM3 spca561 060b:a001 Maxell Compact Pc PM3
...@@ -178,6 +179,7 @@ spca506 06e1:a190 ADS Instant VCD ...@@ -178,6 +179,7 @@ spca506 06e1:a190 ADS Instant VCD
ov534 06f8:3002 Hercules Blog Webcam ov534 06f8:3002 Hercules Blog Webcam
ov534 06f8:3003 Hercules Dualpix HD Weblog ov534 06f8:3003 Hercules Dualpix HD Weblog
sonixj 06f8:3004 Hercules Classic Silver sonixj 06f8:3004 Hercules Classic Silver
sonixj 06f8:3008 Hercules Deluxe Optical Glass
spca508 0733:0110 ViewQuest VQ110 spca508 0733:0110 ViewQuest VQ110
spca508 0130:0130 Clone Digital Webcam 11043 spca508 0130:0130 Clone Digital Webcam 11043
spca501 0733:0401 Intel Create and Share spca501 0733:0401 Intel Create and Share
...@@ -209,6 +211,7 @@ sunplus 08ca:2050 Medion MD 41437 ...@@ -209,6 +211,7 @@ sunplus 08ca:2050 Medion MD 41437
sunplus 08ca:2060 Aiptek PocketDV5300 sunplus 08ca:2060 Aiptek PocketDV5300
tv8532 0923:010f ICM532 cams tv8532 0923:010f ICM532 cams
mars 093a:050f Mars-Semi Pc-Camera mars 093a:050f Mars-Semi Pc-Camera
mr97310a 093a:010f Sakar Digital no. 77379
pac207 093a:2460 Qtec Webcam 100 pac207 093a:2460 Qtec Webcam 100
pac207 093a:2461 HP Webcam pac207 093a:2461 HP Webcam
pac207 093a:2463 Philips SPC 220 NC pac207 093a:2463 Philips SPC 220 NC
...@@ -265,6 +268,11 @@ sonixj 0c45:60ec SN9C105+MO4000 ...@@ -265,6 +268,11 @@ sonixj 0c45:60ec SN9C105+MO4000
sonixj 0c45:60fb Surfer NoName sonixj 0c45:60fb Surfer NoName
sonixj 0c45:60fc LG-LIC300 sonixj 0c45:60fc LG-LIC300
sonixj 0c45:60fe Microdia Audio sonixj 0c45:60fe Microdia Audio
sonixj 0c45:6100 PC Camera (SN9C128)
sonixj 0c45:610a PC Camera (SN9C128)
sonixj 0c45:610b PC Camera (SN9C128)
sonixj 0c45:610c PC Camera (SN9C128)
sonixj 0c45:610e PC Camera (SN9C128)
sonixj 0c45:6128 Microdia/Sonix SNP325 sonixj 0c45:6128 Microdia/Sonix SNP325
sonixj 0c45:612a Avant Camera sonixj 0c45:612a Avant Camera
sonixj 0c45:612c Typhoon Rasy Cam 1.3MPix sonixj 0c45:612c Typhoon Rasy Cam 1.3MPix
......
...@@ -26,6 +26,55 @@ Global video workflow ...@@ -26,6 +26,55 @@ Global video workflow
Once the last buffer is filled in, the QCI interface stops. Once the last buffer is filled in, the QCI interface stops.
c) Capture global finite state machine schema
+----+ +---+ +----+
| DQ | | Q | | DQ |
| v | v | v
+-----------+ +------------------------+
| STOP | | Wait for capture start |
+-----------+ Q +------------------------+
+-> | QCI: stop | ------------------> | QCI: run | <------------+
| | DMA: stop | | DMA: stop | |
| +-----------+ +-----> +------------------------+ |
| / | |
| / +---+ +----+ | |
|capture list empty / | Q | | DQ | | QCI Irq EOF |
| / | v | v v |
| +--------------------+ +----------------------+ |
| | DMA hotlink missed | | Capture running | |
| +--------------------+ +----------------------+ |
| | QCI: run | +-----> | QCI: run | <-+ |
| | DMA: stop | / | DMA: run | | |
| +--------------------+ / +----------------------+ | Other |
| ^ /DMA still | | channels |
| | capture list / running | DMA Irq End | not |
| | not empty / | | finished |
| | / v | yet |
| +----------------------+ +----------------------+ | |
| | Videobuf released | | Channel completed | | |
| +----------------------+ +----------------------+ | |
+-- | QCI: run | | QCI: run | --+ |
| DMA: run | | DMA: run | |
+----------------------+ +----------------------+ |
^ / | |
| no overrun / | overrun |
| / v |
+--------------------+ / +----------------------+ |
| Frame completed | / | Frame overran | |
+--------------------+ <-----+ +----------------------+ restart frame |
| QCI: run | | QCI: stop | --------------+
| DMA: run | | DMA: stop |
+--------------------+ +----------------------+
Legend: - each box is a FSM state
- each arrow is the condition to transition to another state
- an arrow with a comment is a mandatory transition (no condition)
- arrow "Q" means : a buffer was enqueued
- arrow "DQ" means : a buffer was dequeued
- "QCI: stop" means the QCI interface is not enabled
- "DMA: stop" means all 3 DMA channels are stopped
- "DMA: run" means at least 1 DMA channel is still running
DMA usage DMA usage
--------- ---------
......
...@@ -89,6 +89,11 @@ from dev (driver name followed by the bus_id, to be precise). If you set it ...@@ -89,6 +89,11 @@ from dev (driver name followed by the bus_id, to be precise). If you set it
up before calling v4l2_device_register then it will be untouched. If dev is up before calling v4l2_device_register then it will be untouched. If dev is
NULL, then you *must* setup v4l2_dev->name before calling v4l2_device_register. NULL, then you *must* setup v4l2_dev->name before calling v4l2_device_register.
You can use v4l2_device_set_name() to set the name based on a driver name and
a driver-global atomic_t instance. This will generate names like ivtv0, ivtv1,
etc. If the name ends with a digit, then it will insert a dash: cx18-0,
cx18-1, etc. This function returns the instance number.
The first 'dev' argument is normally the struct device pointer of a pci_dev, The first 'dev' argument is normally the struct device pointer of a pci_dev,
usb_interface or platform_device. It is rare for dev to be NULL, but it happens usb_interface or platform_device. It is rare for dev to be NULL, but it happens
with ISA devices or when one device creates multiple PCI devices, thus making with ISA devices or when one device creates multiple PCI devices, thus making
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
obj- := dummy.o obj- := dummy.o
# List of programs to build # List of programs to build
hostprogs-y := slabinfo hostprogs-y := slabinfo page-types
# Tell kbuild to always build the programs # Tell kbuild to always build the programs
always := $(hostprogs-y) always := $(hostprogs-y)
...@@ -75,15 +75,15 @@ Page stealing from process memory and shm is done if stealing the page would ...@@ -75,15 +75,15 @@ Page stealing from process memory and shm is done if stealing the page would
alleviate memory pressure on any zone in the page's node that has fallen below alleviate memory pressure on any zone in the page's node that has fallen below
its watermark. its watermark.
pages_min/pages_low/pages_high/low_on_memory/zone_wake_kswapd: These are watemark[WMARK_MIN/WMARK_LOW/WMARK_HIGH]/low_on_memory/zone_wake_kswapd: These
per-zone fields, used to determine when a zone needs to be balanced. When are per-zone fields, used to determine when a zone needs to be balanced. When
the number of pages falls below pages_min, the hysteric field low_on_memory the number of pages falls below watermark[WMARK_MIN], the hysteric field
gets set. This stays set till the number of free pages becomes pages_high. low_on_memory gets set. This stays set till the number of free pages becomes
When low_on_memory is set, page allocation requests will try to free some watermark[WMARK_HIGH]. When low_on_memory is set, page allocation requests will
pages in the zone (providing GFP_WAIT is set in the request). Orthogonal try to free some pages in the zone (providing GFP_WAIT is set in the request).
to this, is the decision to poke kswapd to free some zone pages. That Orthogonal to this, is the decision to poke kswapd to free some zone pages.
decision is not hysteresis based, and is done when the number of free That decision is not hysteresis based, and is done when the number of free
pages is below pages_low; in which case zone_wake_kswapd is also set. pages is below watermark[WMARK_LOW]; in which case zone_wake_kswapd is also set.
(Good) Ideas that I have heard: (Good) Ideas that I have heard:
......
/*
* page-types: Tool for querying page flags
*
* Copyright (C) 2009 Intel corporation
* Copyright (C) 2009 Wu Fengguang <fengguang.wu@intel.com>
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdint.h>
#include <stdarg.h>
#include <string.h>
#include <getopt.h>
#include <limits.h>
#include <sys/types.h>
#include <sys/errno.h>
#include <sys/fcntl.h>
/*
* kernel page flags
*/
#define KPF_BYTES 8
#define PROC_KPAGEFLAGS "/proc/kpageflags"
/* copied from kpageflags_read() */
#define KPF_LOCKED 0
#define KPF_ERROR 1
#define KPF_REFERENCED 2
#define KPF_UPTODATE 3
#define KPF_DIRTY 4
#define KPF_LRU 5
#define KPF_ACTIVE 6
#define KPF_SLAB 7
#define KPF_WRITEBACK 8
#define KPF_RECLAIM 9
#define KPF_BUDDY 10
/* [11-20] new additions in 2.6.31 */
#define KPF_MMAP 11
#define KPF_ANON 12
#define KPF_SWAPCACHE 13
#define KPF_SWAPBACKED 14
#define KPF_COMPOUND_HEAD 15
#define KPF_COMPOUND_TAIL 16
#define KPF_HUGE 17
#define KPF_UNEVICTABLE 18
#define KPF_NOPAGE 20
/* [32-] kernel hacking assistances */
#define KPF_RESERVED 32
#define KPF_MLOCKED 33
#define KPF_MAPPEDTODISK 34
#define KPF_PRIVATE 35
#define KPF_PRIVATE_2 36
#define KPF_OWNER_PRIVATE 37
#define KPF_ARCH 38
#define KPF_UNCACHED 39
/* [48-] take some arbitrary free slots for expanding overloaded flags
* not part of kernel API
*/
#define KPF_READAHEAD 48
#define KPF_SLOB_FREE 49
#define KPF_SLUB_FROZEN 50
#define KPF_SLUB_DEBUG 51
#define KPF_ALL_BITS ((uint64_t)~0ULL)
#define KPF_HACKERS_BITS (0xffffULL << 32)
#define KPF_OVERLOADED_BITS (0xffffULL << 48)
#define BIT(name) (1ULL << KPF_##name)
#define BITS_COMPOUND (BIT(COMPOUND_HEAD) | BIT(COMPOUND_TAIL))
static char *page_flag_names[] = {
[KPF_LOCKED] = "L:locked",
[KPF_ERROR] = "E:error",
[KPF_REFERENCED] = "R:referenced",
[KPF_UPTODATE] = "U:uptodate",
[KPF_DIRTY] = "D:dirty",
[KPF_LRU] = "l:lru",
[KPF_ACTIVE] = "A:active",
[KPF_SLAB] = "S:slab",
[KPF_WRITEBACK] = "W:writeback",
[KPF_RECLAIM] = "I:reclaim",
[KPF_BUDDY] = "B:buddy",
[KPF_MMAP] = "M:mmap",
[KPF_ANON] = "a:anonymous",
[KPF_SWAPCACHE] = "s:swapcache",
[KPF_SWAPBACKED] = "b:swapbacked",
[KPF_COMPOUND_HEAD] = "H:compound_head",
[KPF_COMPOUND_TAIL] = "T:compound_tail",
[KPF_HUGE] = "G:huge",
[KPF_UNEVICTABLE] = "u:unevictable",
[KPF_NOPAGE] = "n:nopage",
[KPF_RESERVED] = "r:reserved",
[KPF_MLOCKED] = "m:mlocked",
[KPF_MAPPEDTODISK] = "d:mappedtodisk",
[KPF_PRIVATE] = "P:private",
[KPF_PRIVATE_2] = "p:private_2",
[KPF_OWNER_PRIVATE] = "O:owner_private",
[KPF_ARCH] = "h:arch",
[KPF_UNCACHED] = "c:uncached",
[KPF_READAHEAD] = "I:readahead",
[KPF_SLOB_FREE] = "P:slob_free",
[KPF_SLUB_FROZEN] = "A:slub_frozen",
[KPF_SLUB_DEBUG] = "E:slub_debug",
};
/*
* data structures
*/
static int opt_raw; /* for kernel developers */
static int opt_list; /* list pages (in ranges) */
static int opt_no_summary; /* don't show summary */
static pid_t opt_pid; /* process to walk */
#define MAX_ADDR_RANGES 1024
static int nr_addr_ranges;
static unsigned long opt_offset[MAX_ADDR_RANGES];
static unsigned long opt_size[MAX_ADDR_RANGES];
#define MAX_BIT_FILTERS 64
static int nr_bit_filters;
static uint64_t opt_mask[MAX_BIT_FILTERS];
static uint64_t opt_bits[MAX_BIT_FILTERS];
static int page_size;
#define PAGES_BATCH (64 << 10) /* 64k pages */
static int kpageflags_fd;
static uint64_t kpageflags_buf[KPF_BYTES * PAGES_BATCH];
#define HASH_SHIFT 13
#define HASH_SIZE (1 << HASH_SHIFT)
#define HASH_MASK (HASH_SIZE - 1)
#define HASH_KEY(flags) (flags & HASH_MASK)
static unsigned long total_pages;
static unsigned long nr_pages[HASH_SIZE];
static uint64_t page_flags[HASH_SIZE];
/*
* helper functions
*/
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
#define min_t(type, x, y) ({ \
type __min1 = (x); \
type __min2 = (y); \
__min1 < __min2 ? __min1 : __min2; })
unsigned long pages2mb(unsigned long pages)
{
return (pages * page_size) >> 20;
}
void fatal(const char *x, ...)
{
va_list ap;
va_start(ap, x);
vfprintf(stderr, x, ap);
va_end(ap);
exit(EXIT_FAILURE);
}
/*
* page flag names
*/
char *page_flag_name(uint64_t flags)
{
static char buf[65];
int present;
int i, j;
for (i = 0, j = 0; i < ARRAY_SIZE(page_flag_names); i++) {
present = (flags >> i) & 1;
if (!page_flag_names[i]) {
if (present)
fatal("unkown flag bit %d\n", i);
continue;
}
buf[j++] = present ? page_flag_names[i][0] : '_';
}
return buf;
}
char *page_flag_longname(uint64_t flags)
{
static char buf[1024];
int i, n;
for (i = 0, n = 0; i < ARRAY_SIZE(page_flag_names); i++) {
if (!page_flag_names[i])
continue;
if ((flags >> i) & 1)
n += snprintf(buf + n, sizeof(buf) - n, "%s,",
page_flag_names[i] + 2);
}
if (n)
n--;
buf[n] = '\0';
return buf;
}
/*
* page list and summary
*/
void show_page_range(unsigned long offset, uint64_t flags)
{
static uint64_t flags0;
static unsigned long index;
static unsigned long count;
if (flags == flags0 && offset == index + count) {
count++;
return;
}
if (count)
printf("%lu\t%lu\t%s\n",
index, count, page_flag_name(flags0));
flags0 = flags;
index = offset;
count = 1;
}
void show_page(unsigned long offset, uint64_t flags)
{
printf("%lu\t%s\n", offset, page_flag_name(flags));
}
void show_summary(void)
{
int i;
printf(" flags\tpage-count MB"
" symbolic-flags\t\t\tlong-symbolic-flags\n");
for (i = 0; i < ARRAY_SIZE(nr_pages); i++) {
if (nr_pages[i])
printf("0x%016llx\t%10lu %8lu %s\t%s\n",
(unsigned long long)page_flags[i],
nr_pages[i],
pages2mb(nr_pages[i]),
page_flag_name(page_flags[i]),
page_flag_longname(page_flags[i]));
}
printf(" total\t%10lu %8lu\n",
total_pages, pages2mb(total_pages));
}
/*
* page flag filters
*/
int bit_mask_ok(uint64_t flags)
{
int i;
for (i = 0; i < nr_bit_filters; i++) {
if (opt_bits[i] == KPF_ALL_BITS) {
if ((flags & opt_mask[i]) == 0)
return 0;
} else {
if ((flags & opt_mask[i]) != opt_bits[i])
return 0;
}
}
return 1;
}
uint64_t expand_overloaded_flags(uint64_t flags)
{
/* SLOB/SLUB overload several page flags */
if (flags & BIT(SLAB)) {
if (flags & BIT(PRIVATE))
flags ^= BIT(PRIVATE) | BIT(SLOB_FREE);
if (flags & BIT(ACTIVE))
flags ^= BIT(ACTIVE) | BIT(SLUB_FROZEN);
if (flags & BIT(ERROR))
flags ^= BIT(ERROR) | BIT(SLUB_DEBUG);
}
/* PG_reclaim is overloaded as PG_readahead in the read path */
if ((flags & (BIT(RECLAIM) | BIT(WRITEBACK))) == BIT(RECLAIM))
flags ^= BIT(RECLAIM) | BIT(READAHEAD);
return flags;
}
uint64_t well_known_flags(uint64_t flags)
{
/* hide flags intended only for kernel hacker */
flags &= ~KPF_HACKERS_BITS;
/* hide non-hugeTLB compound pages */
if ((flags & BITS_COMPOUND) && !(flags & BIT(HUGE)))
flags &= ~BITS_COMPOUND;
return flags;
}
/*
* page frame walker
*/
int hash_slot(uint64_t flags)
{
int k = HASH_KEY(flags);
int i;
/* Explicitly reserve slot 0 for flags 0: the following logic
* cannot distinguish an unoccupied slot from slot (flags==0).
*/
if (flags == 0)
return 0;
/* search through the remaining (HASH_SIZE-1) slots */
for (i = 1; i < ARRAY_SIZE(page_flags); i++, k++) {
if (!k || k >= ARRAY_SIZE(page_flags))
k = 1;
if (page_flags[k] == 0) {
page_flags[k] = flags;
return k;
}
if (page_flags[k] == flags)
return k;
}
fatal("hash table full: bump up HASH_SHIFT?\n");
exit(EXIT_FAILURE);
}
void add_page(unsigned long offset, uint64_t flags)
{
flags = expand_overloaded_flags(flags);
if (!opt_raw)
flags = well_known_flags(flags);
if (!bit_mask_ok(flags))
return;
if (opt_list == 1)
show_page_range(offset, flags);
else if (opt_list == 2)
show_page(offset, flags);
nr_pages[hash_slot(flags)]++;
total_pages++;
}
void walk_pfn(unsigned long index, unsigned long count)
{
unsigned long batch;
unsigned long n;
unsigned long i;
if (index > ULONG_MAX / KPF_BYTES)
fatal("index overflow: %lu\n", index);
lseek(kpageflags_fd, index * KPF_BYTES, SEEK_SET);
while (count) {
batch = min_t(unsigned long, count, PAGES_BATCH);
n = read(kpageflags_fd, kpageflags_buf, batch * KPF_BYTES);
if (n == 0)
break;
if (n < 0) {
perror(PROC_KPAGEFLAGS);
exit(EXIT_FAILURE);
}
if (n % KPF_BYTES != 0)
fatal("partial read: %lu bytes\n", n);
n = n / KPF_BYTES;
for (i = 0; i < n; i++)
add_page(index + i, kpageflags_buf[i]);
index += batch;
count -= batch;
}
}
void walk_addr_ranges(void)
{
int i;
kpageflags_fd = open(PROC_KPAGEFLAGS, O_RDONLY);
if (kpageflags_fd < 0) {
perror(PROC_KPAGEFLAGS);
exit(EXIT_FAILURE);
}
if (!nr_addr_ranges)
walk_pfn(0, ULONG_MAX);
for (i = 0; i < nr_addr_ranges; i++)
walk_pfn(opt_offset[i], opt_size[i]);
close(kpageflags_fd);
}
/*
* user interface
*/
const char *page_flag_type(uint64_t flag)
{
if (flag & KPF_HACKERS_BITS)
return "(r)";
if (flag & KPF_OVERLOADED_BITS)
return "(o)";
return " ";
}
void usage(void)
{
int i, j;
printf(
"page-types [options]\n"
" -r|--raw Raw mode, for kernel developers\n"
" -a|--addr addr-spec Walk a range of pages\n"
" -b|--bits bits-spec Walk pages with specified bits\n"
#if 0 /* planned features */
" -p|--pid pid Walk process address space\n"
" -f|--file filename Walk file address space\n"
#endif
" -l|--list Show page details in ranges\n"
" -L|--list-each Show page details one by one\n"
" -N|--no-summary Don't show summay info\n"
" -h|--help Show this usage message\n"
"addr-spec:\n"
" N one page at offset N (unit: pages)\n"
" N+M pages range from N to N+M-1\n"
" N,M pages range from N to M-1\n"
" N, pages range from N to end\n"
" ,M pages range from 0 to M\n"
"bits-spec:\n"
" bit1,bit2 (flags & (bit1|bit2)) != 0\n"
" bit1,bit2=bit1 (flags & (bit1|bit2)) == bit1\n"
" bit1,~bit2 (flags & (bit1|bit2)) == bit1\n"
" =bit1,bit2 flags == (bit1|bit2)\n"
"bit-names:\n"
);
for (i = 0, j = 0; i < ARRAY_SIZE(page_flag_names); i++) {
if (!page_flag_names[i])
continue;
printf("%16s%s", page_flag_names[i] + 2,
page_flag_type(1ULL << i));
if (++j > 3) {
j = 0;
putchar('\n');
}
}
printf("\n "
"(r) raw mode bits (o) overloaded bits\n");
}
unsigned long long parse_number(const char *str)
{
unsigned long long n;
n = strtoll(str, NULL, 0);
if (n == 0 && str[0] != '0')
fatal("invalid name or number: %s\n", str);
return n;
}
void parse_pid(const char *str)
{
opt_pid = parse_number(str);
}
void parse_file(const char *name)
{
}
void add_addr_range(unsigned long offset, unsigned long size)
{
if (nr_addr_ranges >= MAX_ADDR_RANGES)
fatal("too much addr ranges\n");
opt_offset[nr_addr_ranges] = offset;
opt_size[nr_addr_ranges] = size;
nr_addr_ranges++;
}
void parse_addr_range(const char *optarg)
{
unsigned long offset;
unsigned long size;
char *p;
p = strchr(optarg, ',');
if (!p)
p = strchr(optarg, '+');
if (p == optarg) {
offset = 0;
size = parse_number(p + 1);
} else if (p) {
offset = parse_number(optarg);
if (p[1] == '\0')
size = ULONG_MAX;
else {
size = parse_number(p + 1);
if (*p == ',') {
if (size < offset)
fatal("invalid range: %lu,%lu\n",
offset, size);
size -= offset;
}
}
} else {
offset = parse_number(optarg);
size = 1;
}
add_addr_range(offset, size);
}
void add_bits_filter(uint64_t mask, uint64_t bits)
{
if (nr_bit_filters >= MAX_BIT_FILTERS)
fatal("too much bit filters\n");
opt_mask[nr_bit_filters] = mask;
opt_bits[nr_bit_filters] = bits;
nr_bit_filters++;
}
uint64_t parse_flag_name(const char *str, int len)
{
int i;
if (!*str || !len)
return 0;
if (len <= 8 && !strncmp(str, "compound", len))
return BITS_COMPOUND;
for (i = 0; i < ARRAY_SIZE(page_flag_names); i++) {
if (!page_flag_names[i])
continue;
if (!strncmp(str, page_flag_names[i] + 2, len))
return 1ULL << i;
}
return parse_number(str);
}
uint64_t parse_flag_names(const char *str, int all)
{
const char *p = str;
uint64_t flags = 0;
while (1) {
if (*p == ',' || *p == '=' || *p == '\0') {
if ((*str != '~') || (*str == '~' && all && *++str))
flags |= parse_flag_name(str, p - str);
if (*p != ',')
break;
str = p + 1;
}
p++;
}
return flags;
}
void parse_bits_mask(const char *optarg)
{
uint64_t mask;
uint64_t bits;
const char *p;
p = strchr(optarg, '=');
if (p == optarg) {
mask = KPF_ALL_BITS;
bits = parse_flag_names(p + 1, 0);
} else if (p) {
mask = parse_flag_names(optarg, 0);
bits = parse_flag_names(p + 1, 0);
} else if (strchr(optarg, '~')) {
mask = parse_flag_names(optarg, 1);
bits = parse_flag_names(optarg, 0);
} else {
mask = parse_flag_names(optarg, 0);
bits = KPF_ALL_BITS;
}
add_bits_filter(mask, bits);
}
struct option opts[] = {
{ "raw" , 0, NULL, 'r' },
{ "pid" , 1, NULL, 'p' },
{ "file" , 1, NULL, 'f' },
{ "addr" , 1, NULL, 'a' },
{ "bits" , 1, NULL, 'b' },
{ "list" , 0, NULL, 'l' },
{ "list-each" , 0, NULL, 'L' },
{ "no-summary", 0, NULL, 'N' },
{ "help" , 0, NULL, 'h' },
{ NULL , 0, NULL, 0 }
};
int main(int argc, char *argv[])
{
int c;
page_size = getpagesize();
while ((c = getopt_long(argc, argv,
"rp:f:a:b:lLNh", opts, NULL)) != -1) {
switch (c) {
case 'r':
opt_raw = 1;
break;
case 'p':
parse_pid(optarg);
break;
case 'f':
parse_file(optarg);
break;
case 'a':
parse_addr_range(optarg);
break;
case 'b':
parse_bits_mask(optarg);
break;
case 'l':
opt_list = 1;
break;
case 'L':
opt_list = 2;
break;
case 'N':
opt_no_summary = 1;
break;
case 'h':
usage();
exit(0);
default:
usage();
exit(1);
}
}
if (opt_list == 1)
printf("offset\tcount\tflags\n");
if (opt_list == 2)
printf("offset\tflags\n");
walk_addr_ranges();
if (opt_list == 1)
show_page_range(0, 0); /* drain the buffer */
if (opt_no_summary)
return 0;
if (opt_list)
printf("\n\n");
show_summary();
return 0;
}
...@@ -12,9 +12,9 @@ There are three components to pagemap: ...@@ -12,9 +12,9 @@ There are three components to pagemap:
value for each virtual page, containing the following data (from value for each virtual page, containing the following data (from
fs/proc/task_mmu.c, above pagemap_read): fs/proc/task_mmu.c, above pagemap_read):
* Bits 0-55 page frame number (PFN) if present * Bits 0-54 page frame number (PFN) if present
* Bits 0-4 swap type if swapped * Bits 0-4 swap type if swapped
* Bits 5-55 swap offset if swapped * Bits 5-54 swap offset if swapped
* Bits 55-60 page shift (page size = 1<<page shift) * Bits 55-60 page shift (page size = 1<<page shift)
* Bit 61 reserved for future use * Bit 61 reserved for future use
* Bit 62 page swapped * Bit 62 page swapped
...@@ -36,7 +36,7 @@ There are three components to pagemap: ...@@ -36,7 +36,7 @@ There are three components to pagemap:
* /proc/kpageflags. This file contains a 64-bit set of flags for each * /proc/kpageflags. This file contains a 64-bit set of flags for each
page, indexed by PFN. page, indexed by PFN.
The flags are (from fs/proc/proc_misc, above kpageflags_read): The flags are (from fs/proc/page.c, above kpageflags_read):
0. LOCKED 0. LOCKED
1. ERROR 1. ERROR
...@@ -49,6 +49,68 @@ There are three components to pagemap: ...@@ -49,6 +49,68 @@ There are three components to pagemap:
8. WRITEBACK 8. WRITEBACK
9. RECLAIM 9. RECLAIM
10. BUDDY 10. BUDDY
11. MMAP
12. ANON
13. SWAPCACHE
14. SWAPBACKED
15. COMPOUND_HEAD
16. COMPOUND_TAIL
16. HUGE
18. UNEVICTABLE
20. NOPAGE
Short descriptions to the page flags:
0. LOCKED
page is being locked for exclusive access, eg. by undergoing read/write IO
7. SLAB
page is managed by the SLAB/SLOB/SLUB/SLQB kernel memory allocator
When compound page is used, SLUB/SLQB will only set this flag on the head
page; SLOB will not flag it at all.
10. BUDDY
a free memory block managed by the buddy system allocator
The buddy system organizes free memory in blocks of various orders.
An order N block has 2^N physically contiguous pages, with the BUDDY flag
set for and _only_ for the first page.
15. COMPOUND_HEAD
16. COMPOUND_TAIL
A compound page with order N consists of 2^N physically contiguous pages.
A compound page with order 2 takes the form of "HTTT", where H donates its
head page and T donates its tail page(s). The major consumers of compound
pages are hugeTLB pages (Documentation/vm/hugetlbpage.txt), the SLUB etc.
memory allocators and various device drivers. However in this interface,
only huge/giga pages are made visible to end users.
17. HUGE
this is an integral part of a HugeTLB page
20. NOPAGE
no page frame exists at the requested address
[IO related page flags]
1. ERROR IO error occurred
3. UPTODATE page has up-to-date data
ie. for file backed page: (in-memory data revision >= on-disk one)
4. DIRTY page has been written to, hence contains new data
ie. for file backed page: (in-memory data revision > on-disk one)
8. WRITEBACK page is being synced to disk
[LRU related page flags]
5. LRU page is in one of the LRU lists
6. ACTIVE page is in the active LRU list
18. UNEVICTABLE page is in the unevictable (non-)LRU list
It is somehow pinned and not a candidate for LRU page reclaims,
eg. ramfs pages, shmctl(SHM_LOCK) and mlock() memory segments
2. REFERENCED page has been referenced since last LRU list enqueue/requeue
9. RECLAIM page will be reclaimed soon after its pageout IO completed
11. MMAP a memory mapped page
12. ANON a memory mapped page that is not part of a file
13. SWAPCACHE page is mapped to swap space, ie. has an associated swap entry
14. SWAPBACKED page is backed by swap/RAM
The page-types tool in this directory can be used to query the above flags.
Using pagemap to do something useful: Using pagemap to do something useful:
......
此差异已折叠。
/* /*
* 8253/8254 Programmable Interval Timer * 8253/8254 Programmable Interval Timer
*/ */
#ifndef _8253PIT_H
#define _8253PIT_H
#define PIT_TICK_RATE 1193180UL
#endif
...@@ -3,30 +3,12 @@ ...@@ -3,30 +3,12 @@
/* Dummy header just to define km_type. */ /* Dummy header just to define km_type. */
#ifdef CONFIG_DEBUG_HIGHMEM #ifdef CONFIG_DEBUG_HIGHMEM
# define D(n) __KM_FENCE_##n , #define __WITH_KM_FENCE
#else
# define D(n)
#endif #endif
enum km_type { #include <asm-generic/kmap_types.h>
D(0) KM_BOUNCE_READ,
D(1) KM_SKB_SUNRPC_DATA,
D(2) KM_SKB_DATA_SOFTIRQ,
D(3) KM_USER0,
D(4) KM_USER1,
D(5) KM_BIO_SRC_IRQ,
D(6) KM_BIO_DST_IRQ,
D(7) KM_PTE0,
D(8) KM_PTE1,
D(9) KM_IRQ0,
D(10) KM_IRQ1,
D(11) KM_SOFTIRQ0,
D(12) KM_SOFTIRQ1,
D(13) KM_TYPE_NR
};
#undef D #undef __WITH_KM_FENCE
#endif #endif
...@@ -10,10 +10,7 @@ ...@@ -10,10 +10,7 @@
static struct signal_struct init_signals = INIT_SIGNALS(init_signals); static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
struct mm_struct init_mm = INIT_MM(init_mm);
struct task_struct init_task = INIT_TASK(init_task); struct task_struct init_task = INIT_TASK(init_task);
EXPORT_SYMBOL(init_mm);
EXPORT_SYMBOL(init_task); EXPORT_SYMBOL(init_task);
union thread_union init_thread_union union thread_union init_thread_union
......
...@@ -227,7 +227,7 @@ struct irqaction timer_irqaction = { ...@@ -227,7 +227,7 @@ struct irqaction timer_irqaction = {
.name = "timer", .name = "timer",
}; };
static struct hw_interrupt_type rtc_irq_type = { static struct irq_chip rtc_irq_type = {
.typename = "RTC", .typename = "RTC",
.startup = rtc_startup, .startup = rtc_startup,
.shutdown = rtc_enable_disable, .shutdown = rtc_enable_disable,
......
...@@ -83,7 +83,7 @@ i8259a_end_irq(unsigned int irq) ...@@ -83,7 +83,7 @@ i8259a_end_irq(unsigned int irq)
i8259a_enable_irq(irq); i8259a_enable_irq(irq);
} }
struct hw_interrupt_type i8259a_irq_type = { struct irq_chip i8259a_irq_type = {
.typename = "XT-PIC", .typename = "XT-PIC",
.startup = i8259a_startup_irq, .startup = i8259a_startup_irq,
.shutdown = i8259a_disable_irq, .shutdown = i8259a_disable_irq,
......
...@@ -36,7 +36,7 @@ extern void i8259a_disable_irq(unsigned int); ...@@ -36,7 +36,7 @@ extern void i8259a_disable_irq(unsigned int);
extern void i8259a_mask_and_ack_irq(unsigned int); extern void i8259a_mask_and_ack_irq(unsigned int);
extern unsigned int i8259a_startup_irq(unsigned int); extern unsigned int i8259a_startup_irq(unsigned int);
extern void i8259a_end_irq(unsigned int); extern void i8259a_end_irq(unsigned int);
extern struct hw_interrupt_type i8259a_irq_type; extern struct irq_chip i8259a_irq_type;
extern void init_i8259a_irqs(void); extern void init_i8259a_irqs(void);
extern void handle_irq(int irq); extern void handle_irq(int irq);
...@@ -70,7 +70,7 @@ pyxis_mask_and_ack_irq(unsigned int irq) ...@@ -70,7 +70,7 @@ pyxis_mask_and_ack_irq(unsigned int irq)
*(vulp)PYXIS_INT_MASK; *(vulp)PYXIS_INT_MASK;
} }
static struct hw_interrupt_type pyxis_irq_type = { static struct irq_chip pyxis_irq_type = {
.typename = "PYXIS", .typename = "PYXIS",
.startup = pyxis_startup_irq, .startup = pyxis_startup_irq,
.shutdown = pyxis_disable_irq, .shutdown = pyxis_disable_irq,
......
...@@ -48,7 +48,7 @@ srm_end_irq(unsigned int irq) ...@@ -48,7 +48,7 @@ srm_end_irq(unsigned int irq)
} }
/* Handle interrupts from the SRM, assuming no additional weirdness. */ /* Handle interrupts from the SRM, assuming no additional weirdness. */
static struct hw_interrupt_type srm_irq_type = { static struct irq_chip srm_irq_type = {
.typename = "SRM", .typename = "SRM",
.startup = srm_startup_irq, .startup = srm_startup_irq,
.shutdown = srm_disable_irq, .shutdown = srm_disable_irq,
......
...@@ -252,9 +252,9 @@ reserve_std_resources(void) ...@@ -252,9 +252,9 @@ reserve_std_resources(void)
} }
#define PFN_MAX PFN_DOWN(0x80000000) #define PFN_MAX PFN_DOWN(0x80000000)
#define for_each_mem_cluster(memdesc, cluster, i) \ #define for_each_mem_cluster(memdesc, _cluster, i) \
for ((cluster) = (memdesc)->cluster, (i) = 0; \ for ((_cluster) = (memdesc)->cluster, (i) = 0; \
(i) < (memdesc)->numclusters; (i)++, (cluster)++) (i) < (memdesc)->numclusters; (i)++, (_cluster)++)
static unsigned long __init static unsigned long __init
get_mem_size_limit(char *s) get_mem_size_limit(char *s)
......
...@@ -89,7 +89,7 @@ alcor_end_irq(unsigned int irq) ...@@ -89,7 +89,7 @@ alcor_end_irq(unsigned int irq)
alcor_enable_irq(irq); alcor_enable_irq(irq);
} }
static struct hw_interrupt_type alcor_irq_type = { static struct irq_chip alcor_irq_type = {
.typename = "ALCOR", .typename = "ALCOR",
.startup = alcor_startup_irq, .startup = alcor_startup_irq,
.shutdown = alcor_disable_irq, .shutdown = alcor_disable_irq,
......
...@@ -71,7 +71,7 @@ cabriolet_end_irq(unsigned int irq) ...@@ -71,7 +71,7 @@ cabriolet_end_irq(unsigned int irq)
cabriolet_enable_irq(irq); cabriolet_enable_irq(irq);
} }
static struct hw_interrupt_type cabriolet_irq_type = { static struct irq_chip cabriolet_irq_type = {
.typename = "CABRIOLET", .typename = "CABRIOLET",
.startup = cabriolet_startup_irq, .startup = cabriolet_startup_irq,
.shutdown = cabriolet_disable_irq, .shutdown = cabriolet_disable_irq,
......
...@@ -198,7 +198,7 @@ clipper_set_affinity(unsigned int irq, const struct cpumask *affinity) ...@@ -198,7 +198,7 @@ clipper_set_affinity(unsigned int irq, const struct cpumask *affinity)
return 0; return 0;
} }
static struct hw_interrupt_type dp264_irq_type = { static struct irq_chip dp264_irq_type = {
.typename = "DP264", .typename = "DP264",
.startup = dp264_startup_irq, .startup = dp264_startup_irq,
.shutdown = dp264_disable_irq, .shutdown = dp264_disable_irq,
...@@ -209,7 +209,7 @@ static struct hw_interrupt_type dp264_irq_type = { ...@@ -209,7 +209,7 @@ static struct hw_interrupt_type dp264_irq_type = {
.set_affinity = dp264_set_affinity, .set_affinity = dp264_set_affinity,
}; };
static struct hw_interrupt_type clipper_irq_type = { static struct irq_chip clipper_irq_type = {
.typename = "CLIPPER", .typename = "CLIPPER",
.startup = clipper_startup_irq, .startup = clipper_startup_irq,
.shutdown = clipper_disable_irq, .shutdown = clipper_disable_irq,
...@@ -298,7 +298,7 @@ clipper_srm_device_interrupt(unsigned long vector) ...@@ -298,7 +298,7 @@ clipper_srm_device_interrupt(unsigned long vector)
} }
static void __init static void __init
init_tsunami_irqs(struct hw_interrupt_type * ops, int imin, int imax) init_tsunami_irqs(struct irq_chip * ops, int imin, int imax)
{ {
long i; long i;
for (i = imin; i <= imax; ++i) { for (i = imin; i <= imax; ++i) {
......
...@@ -69,7 +69,7 @@ eb64p_end_irq(unsigned int irq) ...@@ -69,7 +69,7 @@ eb64p_end_irq(unsigned int irq)
eb64p_enable_irq(irq); eb64p_enable_irq(irq);
} }
static struct hw_interrupt_type eb64p_irq_type = { static struct irq_chip eb64p_irq_type = {
.typename = "EB64P", .typename = "EB64P",
.startup = eb64p_startup_irq, .startup = eb64p_startup_irq,
.shutdown = eb64p_disable_irq, .shutdown = eb64p_disable_irq,
......
...@@ -80,7 +80,7 @@ eiger_end_irq(unsigned int irq) ...@@ -80,7 +80,7 @@ eiger_end_irq(unsigned int irq)
eiger_enable_irq(irq); eiger_enable_irq(irq);
} }
static struct hw_interrupt_type eiger_irq_type = { static struct irq_chip eiger_irq_type = {
.typename = "EIGER", .typename = "EIGER",
.startup = eiger_startup_irq, .startup = eiger_startup_irq,
.shutdown = eiger_disable_irq, .shutdown = eiger_disable_irq,
......
...@@ -118,7 +118,7 @@ jensen_local_end(unsigned int irq) ...@@ -118,7 +118,7 @@ jensen_local_end(unsigned int irq)
i8259a_end_irq(1); i8259a_end_irq(1);
} }
static struct hw_interrupt_type jensen_local_irq_type = { static struct irq_chip jensen_local_irq_type = {
.typename = "LOCAL", .typename = "LOCAL",
.startup = jensen_local_startup, .startup = jensen_local_startup,
.shutdown = jensen_local_shutdown, .shutdown = jensen_local_shutdown,
......
...@@ -169,7 +169,7 @@ marvel_irq_noop_return(unsigned int irq) ...@@ -169,7 +169,7 @@ marvel_irq_noop_return(unsigned int irq)
return 0; return 0;
} }
static struct hw_interrupt_type marvel_legacy_irq_type = { static struct irq_chip marvel_legacy_irq_type = {
.typename = "LEGACY", .typename = "LEGACY",
.startup = marvel_irq_noop_return, .startup = marvel_irq_noop_return,
.shutdown = marvel_irq_noop, .shutdown = marvel_irq_noop,
...@@ -179,7 +179,7 @@ static struct hw_interrupt_type marvel_legacy_irq_type = { ...@@ -179,7 +179,7 @@ static struct hw_interrupt_type marvel_legacy_irq_type = {
.end = marvel_irq_noop, .end = marvel_irq_noop,
}; };
static struct hw_interrupt_type io7_lsi_irq_type = { static struct irq_chip io7_lsi_irq_type = {
.typename = "LSI", .typename = "LSI",
.startup = io7_startup_irq, .startup = io7_startup_irq,
.shutdown = io7_disable_irq, .shutdown = io7_disable_irq,
...@@ -189,7 +189,7 @@ static struct hw_interrupt_type io7_lsi_irq_type = { ...@@ -189,7 +189,7 @@ static struct hw_interrupt_type io7_lsi_irq_type = {
.end = io7_end_irq, .end = io7_end_irq,
}; };
static struct hw_interrupt_type io7_msi_irq_type = { static struct irq_chip io7_msi_irq_type = {
.typename = "MSI", .typename = "MSI",
.startup = io7_startup_irq, .startup = io7_startup_irq,
.shutdown = io7_disable_irq, .shutdown = io7_disable_irq,
...@@ -273,8 +273,8 @@ init_one_io7_msi(struct io7 *io7, unsigned int which, unsigned int where) ...@@ -273,8 +273,8 @@ init_one_io7_msi(struct io7 *io7, unsigned int which, unsigned int where)
static void __init static void __init
init_io7_irqs(struct io7 *io7, init_io7_irqs(struct io7 *io7,
struct hw_interrupt_type *lsi_ops, struct irq_chip *lsi_ops,
struct hw_interrupt_type *msi_ops) struct irq_chip *msi_ops)
{ {
long base = (io7->pe << MARVEL_IRQ_VEC_PE_SHIFT) + 16; long base = (io7->pe << MARVEL_IRQ_VEC_PE_SHIFT) + 16;
long i; long i;
......
...@@ -68,7 +68,7 @@ mikasa_end_irq(unsigned int irq) ...@@ -68,7 +68,7 @@ mikasa_end_irq(unsigned int irq)
mikasa_enable_irq(irq); mikasa_enable_irq(irq);
} }
static struct hw_interrupt_type mikasa_irq_type = { static struct irq_chip mikasa_irq_type = {
.typename = "MIKASA", .typename = "MIKASA",
.startup = mikasa_startup_irq, .startup = mikasa_startup_irq,
.shutdown = mikasa_disable_irq, .shutdown = mikasa_disable_irq,
......
...@@ -73,7 +73,7 @@ noritake_end_irq(unsigned int irq) ...@@ -73,7 +73,7 @@ noritake_end_irq(unsigned int irq)
noritake_enable_irq(irq); noritake_enable_irq(irq);
} }
static struct hw_interrupt_type noritake_irq_type = { static struct irq_chip noritake_irq_type = {
.typename = "NORITAKE", .typename = "NORITAKE",
.startup = noritake_startup_irq, .startup = noritake_startup_irq,
.shutdown = noritake_disable_irq, .shutdown = noritake_disable_irq,
......
...@@ -135,7 +135,7 @@ rawhide_end_irq(unsigned int irq) ...@@ -135,7 +135,7 @@ rawhide_end_irq(unsigned int irq)
rawhide_enable_irq(irq); rawhide_enable_irq(irq);
} }
static struct hw_interrupt_type rawhide_irq_type = { static struct irq_chip rawhide_irq_type = {
.typename = "RAWHIDE", .typename = "RAWHIDE",
.startup = rawhide_startup_irq, .startup = rawhide_startup_irq,
.shutdown = rawhide_disable_irq, .shutdown = rawhide_disable_irq,
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/timex.h>
#include <linux/init.h> #include <linux/init.h>
#include <asm/ptrace.h> #include <asm/ptrace.h>
......
...@@ -72,7 +72,7 @@ rx164_end_irq(unsigned int irq) ...@@ -72,7 +72,7 @@ rx164_end_irq(unsigned int irq)
rx164_enable_irq(irq); rx164_enable_irq(irq);
} }
static struct hw_interrupt_type rx164_irq_type = { static struct irq_chip rx164_irq_type = {
.typename = "RX164", .typename = "RX164",
.startup = rx164_startup_irq, .startup = rx164_startup_irq,
.shutdown = rx164_disable_irq, .shutdown = rx164_disable_irq,
......
...@@ -501,7 +501,7 @@ sable_lynx_mask_and_ack_irq(unsigned int irq) ...@@ -501,7 +501,7 @@ sable_lynx_mask_and_ack_irq(unsigned int irq)
spin_unlock(&sable_lynx_irq_lock); spin_unlock(&sable_lynx_irq_lock);
} }
static struct hw_interrupt_type sable_lynx_irq_type = { static struct irq_chip sable_lynx_irq_type = {
.typename = "SABLE/LYNX", .typename = "SABLE/LYNX",
.startup = sable_lynx_startup_irq, .startup = sable_lynx_startup_irq,
.shutdown = sable_lynx_disable_irq, .shutdown = sable_lynx_disable_irq,
......
...@@ -74,7 +74,7 @@ takara_end_irq(unsigned int irq) ...@@ -74,7 +74,7 @@ takara_end_irq(unsigned int irq)
takara_enable_irq(irq); takara_enable_irq(irq);
} }
static struct hw_interrupt_type takara_irq_type = { static struct irq_chip takara_irq_type = {
.typename = "TAKARA", .typename = "TAKARA",
.startup = takara_startup_irq, .startup = takara_startup_irq,
.shutdown = takara_disable_irq, .shutdown = takara_disable_irq,
......
...@@ -185,7 +185,7 @@ titan_srm_device_interrupt(unsigned long vector) ...@@ -185,7 +185,7 @@ titan_srm_device_interrupt(unsigned long vector)
static void __init static void __init
init_titan_irqs(struct hw_interrupt_type * ops, int imin, int imax) init_titan_irqs(struct irq_chip * ops, int imin, int imax)
{ {
long i; long i;
for (i = imin; i <= imax; ++i) { for (i = imin; i <= imax; ++i) {
...@@ -194,7 +194,7 @@ init_titan_irqs(struct hw_interrupt_type * ops, int imin, int imax) ...@@ -194,7 +194,7 @@ init_titan_irqs(struct hw_interrupt_type * ops, int imin, int imax)
} }
} }
static struct hw_interrupt_type titan_irq_type = { static struct irq_chip titan_irq_type = {
.typename = "TITAN", .typename = "TITAN",
.startup = titan_startup_irq, .startup = titan_startup_irq,
.shutdown = titan_disable_irq, .shutdown = titan_disable_irq,
......
...@@ -157,7 +157,7 @@ wildfire_end_irq(unsigned int irq) ...@@ -157,7 +157,7 @@ wildfire_end_irq(unsigned int irq)
wildfire_enable_irq(irq); wildfire_enable_irq(irq);
} }
static struct hw_interrupt_type wildfire_irq_type = { static struct irq_chip wildfire_irq_type = {
.typename = "WILDFIRE", .typename = "WILDFIRE",
.startup = wildfire_startup_irq, .startup = wildfire_startup_irq,
.shutdown = wildfire_disable_irq, .shutdown = wildfire_disable_irq,
......
...@@ -28,9 +28,9 @@ EXPORT_SYMBOL(node_data); ...@@ -28,9 +28,9 @@ EXPORT_SYMBOL(node_data);
#define DBGDCONT(args...) #define DBGDCONT(args...)
#endif #endif
#define for_each_mem_cluster(memdesc, cluster, i) \ #define for_each_mem_cluster(memdesc, _cluster, i) \
for ((cluster) = (memdesc)->cluster, (i) = 0; \ for ((_cluster) = (memdesc)->cluster, (i) = 0; \
(i) < (memdesc)->numclusters; (i)++, (cluster)++) (i) < (memdesc)->numclusters; (i)++, (_cluster)++)
static void __init show_mem_layout(void) static void __init show_mem_layout(void)
{ {
......
...@@ -14,10 +14,6 @@ ...@@ -14,10 +14,6 @@
static struct signal_struct init_signals = INIT_SIGNALS(init_signals); static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
struct mm_struct init_mm = INIT_MM(init_mm);
EXPORT_SYMBOL(init_mm);
/* /*
* Initial thread structure. * Initial thread structure.
* *
......
...@@ -380,12 +380,12 @@ static struct pca953x_platform_data pca9536_data = { ...@@ -380,12 +380,12 @@ static struct pca953x_platform_data pca9536_data = {
.gpio_base = NR_BUILTIN_GPIO, .gpio_base = NR_BUILTIN_GPIO,
}; };
static int gpio_bus_switch; static int gpio_bus_switch = -EINVAL;
static int pcm990_camera_set_bus_param(struct soc_camera_link *link, static int pcm990_camera_set_bus_param(struct soc_camera_link *link,
unsigned long flags) unsigned long flags)
{ {
if (gpio_bus_switch <= 0) { if (gpio_bus_switch < 0) {
if (flags == SOCAM_DATAWIDTH_10) if (flags == SOCAM_DATAWIDTH_10)
return 0; return 0;
else else
...@@ -404,25 +404,34 @@ static unsigned long pcm990_camera_query_bus_param(struct soc_camera_link *link) ...@@ -404,25 +404,34 @@ static unsigned long pcm990_camera_query_bus_param(struct soc_camera_link *link)
{ {
int ret; int ret;
if (!gpio_bus_switch) { if (gpio_bus_switch < 0) {
ret = gpio_request(NR_BUILTIN_GPIO, "camera"); ret = gpio_request(NR_BUILTIN_GPIO, "camera");
if (!ret) { if (!ret) {
gpio_bus_switch = NR_BUILTIN_GPIO; gpio_bus_switch = NR_BUILTIN_GPIO;
gpio_direction_output(gpio_bus_switch, 0); gpio_direction_output(gpio_bus_switch, 0);
} else }
gpio_bus_switch = -EINVAL;
} }
if (gpio_bus_switch > 0) if (gpio_bus_switch >= 0)
return SOCAM_DATAWIDTH_8 | SOCAM_DATAWIDTH_10; return SOCAM_DATAWIDTH_8 | SOCAM_DATAWIDTH_10;
else else
return SOCAM_DATAWIDTH_10; return SOCAM_DATAWIDTH_10;
} }
static void pcm990_camera_free_bus(struct soc_camera_link *link)
{
if (gpio_bus_switch < 0)
return;
gpio_free(gpio_bus_switch);
gpio_bus_switch = -EINVAL;
}
static struct soc_camera_link iclink = { static struct soc_camera_link iclink = {
.bus_id = 0, /* Must match with the camera ID above */ .bus_id = 0, /* Must match with the camera ID above */
.query_bus_param = pcm990_camera_query_bus_param, .query_bus_param = pcm990_camera_query_bus_param,
.set_bus_param = pcm990_camera_set_bus_param, .set_bus_param = pcm990_camera_set_bus_param,
.free_bus = pcm990_camera_free_bus,
}; };
/* Board I2C devices. */ /* Board I2C devices. */
......
/* arch/arm/plat-s3c/include/plat/regs-usb-hsotg-phy.h
*
* Copyright 2008 Openmoko, Inc.
* Copyright 2008 Simtec Electronics
* http://armlinux.simtec.co.uk/
* Ben Dooks <ben@simtec.co.uk>
*
* S3C - USB2.0 Highspeed/OtG device PHY registers
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
/* Note, this is a seperate header file as some of the clock framework
* needs to touch this if the clk_48m is used as the USB OHCI or other
* peripheral source.
*/
#ifndef __PLAT_S3C64XX_REGS_USB_HSOTG_PHY_H
#define __PLAT_S3C64XX_REGS_USB_HSOTG_PHY_H __FILE__
/* S3C64XX_PA_USB_HSPHY */
#define S3C_HSOTG_PHYREG(x) ((x) + S3C_VA_USB_HSPHY)
#define S3C_PHYPWR S3C_HSOTG_PHYREG(0x00)
#define SRC_PHYPWR_OTG_DISABLE (1 << 4)
#define SRC_PHYPWR_ANALOG_POWERDOWN (1 << 3)
#define SRC_PHYPWR_FORCE_SUSPEND (1 << 1)
#define S3C_PHYCLK S3C_HSOTG_PHYREG(0x04)
#define S3C_PHYCLK_MODE_USB11 (1 << 6)
#define S3C_PHYCLK_EXT_OSC (1 << 5)
#define S3C_PHYCLK_CLK_FORCE (1 << 4)
#define S3C_PHYCLK_ID_PULL (1 << 2)
#define S3C_PHYCLK_CLKSEL_MASK (0x3 << 0)
#define S3C_PHYCLK_CLKSEL_SHIFT (0)
#define S3C_PHYCLK_CLKSEL_48M (0x0 << 0)
#define S3C_PHYCLK_CLKSEL_12M (0x2 << 0)
#define S3C_PHYCLK_CLKSEL_24M (0x3 << 0)
#define S3C_RSTCON S3C_HSOTG_PHYREG(0x08)
#define S3C_RSTCON_PHYCLK (1 << 2)
#define S3C_RSTCON_HCLK (1 << 2)
#define S3C_RSTCON_PHY (1 << 0)
#define S3C_PHYTUNE S3C_HSOTG_PHYREG(0x20)
#endif /* __PLAT_S3C64XX_REGS_USB_HSOTG_PHY_H */
/* arch/arm/plat-s3c/include/plat/regs-usb-hsotg.h
*
* Copyright 2008 Openmoko, Inc.
* Copyright 2008 Simtec Electronics
* http://armlinux.simtec.co.uk/
* Ben Dooks <ben@simtec.co.uk>
*
* S3C - USB2.0 Highspeed/OtG device block registers
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#ifndef __PLAT_S3C64XX_REGS_USB_HSOTG_H
#define __PLAT_S3C64XX_REGS_USB_HSOTG_H __FILE__
#define S3C_HSOTG_REG(x) (x)
#define S3C_GOTGCTL S3C_HSOTG_REG(0x000)
#define S3C_GOTGCTL_BSESVLD (1 << 19)
#define S3C_GOTGCTL_ASESVLD (1 << 18)
#define S3C_GOTGCTL_DBNC_SHORT (1 << 17)
#define S3C_GOTGCTL_CONID_B (1 << 16)
#define S3C_GOTGCTL_DEVHNPEN (1 << 11)
#define S3C_GOTGCTL_HSSETHNPEN (1 << 10)
#define S3C_GOTGCTL_HNPREQ (1 << 9)
#define S3C_GOTGCTL_HSTNEGSCS (1 << 8)
#define S3C_GOTGCTL_SESREQ (1 << 1)
#define S3C_GOTGCTL_SESREQSCS (1 << 0)
#define S3C_GOTGINT S3C_HSOTG_REG(0x004)
#define S3C_GOTGINT_DbnceDone (1 << 19)
#define S3C_GOTGINT_ADevTOUTChg (1 << 18)
#define S3C_GOTGINT_HstNegDet (1 << 17)
#define S3C_GOTGINT_HstnegSucStsChng (1 << 9)
#define S3C_GOTGINT_SesReqSucStsChng (1 << 8)
#define S3C_GOTGINT_SesEndDet (1 << 2)
#define S3C_GAHBCFG S3C_HSOTG_REG(0x008)
#define S3C_GAHBCFG_PTxFEmpLvl (1 << 8)
#define S3C_GAHBCFG_NPTxFEmpLvl (1 << 7)
#define S3C_GAHBCFG_DMAEn (1 << 5)
#define S3C_GAHBCFG_HBstLen_MASK (0xf << 1)
#define S3C_GAHBCFG_HBstLen_SHIFT (1)
#define S3C_GAHBCFG_HBstLen_Single (0x0 << 1)
#define S3C_GAHBCFG_HBstLen_Incr (0x1 << 1)
#define S3C_GAHBCFG_HBstLen_Incr4 (0x3 << 1)
#define S3C_GAHBCFG_HBstLen_Incr8 (0x5 << 1)
#define S3C_GAHBCFG_HBstLen_Incr16 (0x7 << 1)
#define S3C_GAHBCFG_GlblIntrEn (1 << 0)
#define S3C_GUSBCFG S3C_HSOTG_REG(0x00C)
#define S3C_GUSBCFG_PHYLPClkSel (1 << 15)
#define S3C_GUSBCFG_HNPCap (1 << 9)
#define S3C_GUSBCFG_SRPCap (1 << 8)
#define S3C_GUSBCFG_PHYIf16 (1 << 3)
#define S3C_GUSBCFG_TOutCal_MASK (0x7 << 0)
#define S3C_GUSBCFG_TOutCal_SHIFT (0)
#define S3C_GUSBCFG_TOutCal_LIMIT (0x7)
#define S3C_GUSBCFG_TOutCal(_x) ((_x) << 0)
#define S3C_GRSTCTL S3C_HSOTG_REG(0x010)
#define S3C_GRSTCTL_AHBIdle (1 << 31)
#define S3C_GRSTCTL_DMAReq (1 << 30)
#define S3C_GRSTCTL_TxFNum_MASK (0x1f << 6)
#define S3C_GRSTCTL_TxFNum_SHIFT (6)
#define S3C_GRSTCTL_TxFNum_LIMIT (0x1f)
#define S3C_GRSTCTL_TxFNum(_x) ((_x) << 6)
#define S3C_GRSTCTL_TxFFlsh (1 << 5)
#define S3C_GRSTCTL_RxFFlsh (1 << 4)
#define S3C_GRSTCTL_INTknQFlsh (1 << 3)
#define S3C_GRSTCTL_FrmCntrRst (1 << 2)
#define S3C_GRSTCTL_HSftRst (1 << 1)
#define S3C_GRSTCTL_CSftRst (1 << 0)
#define S3C_GINTSTS S3C_HSOTG_REG(0x014)
#define S3C_GINTMSK S3C_HSOTG_REG(0x018)
#define S3C_GINTSTS_WkUpInt (1 << 31)
#define S3C_GINTSTS_SessReqInt (1 << 30)
#define S3C_GINTSTS_DisconnInt (1 << 29)
#define S3C_GINTSTS_ConIDStsChng (1 << 28)
#define S3C_GINTSTS_PTxFEmp (1 << 26)
#define S3C_GINTSTS_HChInt (1 << 25)
#define S3C_GINTSTS_PrtInt (1 << 24)
#define S3C_GINTSTS_FetSusp (1 << 22)
#define S3C_GINTSTS_incompIP (1 << 21)
#define S3C_GINTSTS_IncomplSOIN (1 << 20)
#define S3C_GINTSTS_OEPInt (1 << 19)
#define S3C_GINTSTS_IEPInt (1 << 18)
#define S3C_GINTSTS_EPMis (1 << 17)
#define S3C_GINTSTS_EOPF (1 << 15)
#define S3C_GINTSTS_ISOutDrop (1 << 14)
#define S3C_GINTSTS_EnumDone (1 << 13)
#define S3C_GINTSTS_USBRst (1 << 12)
#define S3C_GINTSTS_USBSusp (1 << 11)
#define S3C_GINTSTS_ErlySusp (1 << 10)
#define S3C_GINTSTS_GOUTNakEff (1 << 7)
#define S3C_GINTSTS_GINNakEff (1 << 6)
#define S3C_GINTSTS_NPTxFEmp (1 << 5)
#define S3C_GINTSTS_RxFLvl (1 << 4)
#define S3C_GINTSTS_SOF (1 << 3)
#define S3C_GINTSTS_OTGInt (1 << 2)
#define S3C_GINTSTS_ModeMis (1 << 1)
#define S3C_GINTSTS_CurMod_Host (1 << 0)
#define S3C_GRXSTSR S3C_HSOTG_REG(0x01C)
#define S3C_GRXSTSP S3C_HSOTG_REG(0x020)
#define S3C_GRXSTS_FN_MASK (0x7f << 25)
#define S3C_GRXSTS_FN_SHIFT (25)
#define S3C_GRXSTS_PktSts_MASK (0xf << 17)
#define S3C_GRXSTS_PktSts_SHIFT (17)
#define S3C_GRXSTS_PktSts_GlobalOutNAK (0x1 << 17)
#define S3C_GRXSTS_PktSts_OutRX (0x2 << 17)
#define S3C_GRXSTS_PktSts_OutDone (0x3 << 17)
#define S3C_GRXSTS_PktSts_SetupDone (0x4 << 17)
#define S3C_GRXSTS_PktSts_SetupRX (0x6 << 17)
#define S3C_GRXSTS_DPID_MASK (0x3 << 15)
#define S3C_GRXSTS_DPID_SHIFT (15)
#define S3C_GRXSTS_ByteCnt_MASK (0x7ff << 4)
#define S3C_GRXSTS_ByteCnt_SHIFT (4)
#define S3C_GRXSTS_EPNum_MASK (0xf << 0)
#define S3C_GRXSTS_EPNum_SHIFT (0)
#define S3C_GRXFSIZ S3C_HSOTG_REG(0x024)
#define S3C_GNPTXFSIZ S3C_HSOTG_REG(0x028)
#define S3C_GNPTXFSIZ_NPTxFDep_MASK (0xffff << 16)
#define S3C_GNPTXFSIZ_NPTxFDep_SHIFT (16)
#define S3C_GNPTXFSIZ_NPTxFDep_LIMIT (0xffff)
#define S3C_GNPTXFSIZ_NPTxFDep(_x) ((_x) << 16)
#define S3C_GNPTXFSIZ_NPTxFStAddr_MASK (0xffff << 0)
#define S3C_GNPTXFSIZ_NPTxFStAddr_SHIFT (0)
#define S3C_GNPTXFSIZ_NPTxFStAddr_LIMIT (0xffff)
#define S3C_GNPTXFSIZ_NPTxFStAddr(_x) ((_x) << 0)
#define S3C_GNPTXSTS S3C_HSOTG_REG(0x02C)
#define S3C_GNPTXSTS_NPtxQTop_MASK (0x7f << 24)
#define S3C_GNPTXSTS_NPtxQTop_SHIFT (24)
#define S3C_GNPTXSTS_NPTxQSpcAvail_MASK (0xff << 16)
#define S3C_GNPTXSTS_NPTxQSpcAvail_SHIFT (16)
#define S3C_GNPTXSTS_NPTxQSpcAvail_GET(_v) (((_v) >> 16) & 0xff)
#define S3C_GNPTXSTS_NPTxFSpcAvail_MASK (0xffff << 0)
#define S3C_GNPTXSTS_NPTxFSpcAvail_SHIFT (0)
#define S3C_GNPTXSTS_NPTxFSpcAvail_GET(_v) (((_v) >> 0) & 0xffff)
#define S3C_HPTXFSIZ S3C_HSOTG_REG(0x100)
#define S3C_DPTXFSIZn(_a) S3C_HSOTG_REG(0x104 + (((_a) - 1) * 4))
#define S3C_DPTXFSIZn_DPTxFSize_MASK (0xffff << 16)
#define S3C_DPTXFSIZn_DPTxFSize_SHIFT (16)
#define S3C_DPTXFSIZn_DPTxFSize_GET(_v) (((_v) >> 16) & 0xffff)
#define S3C_DPTXFSIZn_DPTxFSize_LIMIT (0xffff)
#define S3C_DPTXFSIZn_DPTxFSize(_x) ((_x) << 16)
#define S3C_DPTXFSIZn_DPTxFStAddr_MASK (0xffff << 0)
#define S3C_DPTXFSIZn_DPTxFStAddr_SHIFT (0)
/* Device mode registers */
#define S3C_DCFG S3C_HSOTG_REG(0x800)
#define S3C_DCFG_EPMisCnt_MASK (0x1f << 18)
#define S3C_DCFG_EPMisCnt_SHIFT (18)
#define S3C_DCFG_EPMisCnt_LIMIT (0x1f)
#define S3C_DCFG_EPMisCnt(_x) ((_x) << 18)
#define S3C_DCFG_PerFrInt_MASK (0x3 << 11)
#define S3C_DCFG_PerFrInt_SHIFT (11)
#define S3C_DCFG_PerFrInt_LIMIT (0x3)
#define S3C_DCFG_PerFrInt(_x) ((_x) << 11)
#define S3C_DCFG_DevAddr_MASK (0x7f << 4)
#define S3C_DCFG_DevAddr_SHIFT (4)
#define S3C_DCFG_DevAddr_LIMIT (0x7f)
#define S3C_DCFG_DevAddr(_x) ((_x) << 4)
#define S3C_DCFG_NZStsOUTHShk (1 << 2)
#define S3C_DCFG_DevSpd_MASK (0x3 << 0)
#define S3C_DCFG_DevSpd_SHIFT (0)
#define S3C_DCFG_DevSpd_HS (0x0 << 0)
#define S3C_DCFG_DevSpd_FS (0x1 << 0)
#define S3C_DCFG_DevSpd_LS (0x2 << 0)
#define S3C_DCFG_DevSpd_FS48 (0x3 << 0)
#define S3C_DCTL S3C_HSOTG_REG(0x804)
#define S3C_DCTL_PWROnPrgDone (1 << 11)
#define S3C_DCTL_CGOUTNak (1 << 10)
#define S3C_DCTL_SGOUTNak (1 << 9)
#define S3C_DCTL_CGNPInNAK (1 << 8)
#define S3C_DCTL_SGNPInNAK (1 << 7)
#define S3C_DCTL_TstCtl_MASK (0x7 << 4)
#define S3C_DCTL_TstCtl_SHIFT (4)
#define S3C_DCTL_GOUTNakSts (1 << 3)
#define S3C_DCTL_GNPINNakSts (1 << 2)
#define S3C_DCTL_SftDiscon (1 << 1)
#define S3C_DCTL_RmtWkUpSig (1 << 0)
#define S3C_DSTS S3C_HSOTG_REG(0x808)
#define S3C_DSTS_SOFFN_MASK (0x3fff << 8)
#define S3C_DSTS_SOFFN_SHIFT (8)
#define S3C_DSTS_SOFFN_LIMIT (0x3fff)
#define S3C_DSTS_SOFFN(_x) ((_x) << 8)
#define S3C_DSTS_ErraticErr (1 << 3)
#define S3C_DSTS_EnumSpd_MASK (0x3 << 1)
#define S3C_DSTS_EnumSpd_SHIFT (1)
#define S3C_DSTS_EnumSpd_HS (0x0 << 1)
#define S3C_DSTS_EnumSpd_FS (0x1 << 1)
#define S3C_DSTS_EnumSpd_LS (0x2 << 1)
#define S3C_DSTS_EnumSpd_FS48 (0x3 << 1)
#define S3C_DSTS_SuspSts (1 << 0)
#define S3C_DIEPMSK S3C_HSOTG_REG(0x810)
#define S3C_DIEPMSK_INEPNakEffMsk (1 << 6)
#define S3C_DIEPMSK_INTknEPMisMsk (1 << 5)
#define S3C_DIEPMSK_INTknTXFEmpMsk (1 << 4)
#define S3C_DIEPMSK_TimeOUTMsk (1 << 3)
#define S3C_DIEPMSK_AHBErrMsk (1 << 2)
#define S3C_DIEPMSK_EPDisbldMsk (1 << 1)
#define S3C_DIEPMSK_XferComplMsk (1 << 0)
#define S3C_DOEPMSK S3C_HSOTG_REG(0x814)
#define S3C_DOEPMSK_Back2BackSetup (1 << 6)
#define S3C_DOEPMSK_OUTTknEPdisMsk (1 << 4)
#define S3C_DOEPMSK_SetupMsk (1 << 3)
#define S3C_DOEPMSK_AHBErrMsk (1 << 2)
#define S3C_DOEPMSK_EPDisbldMsk (1 << 1)
#define S3C_DOEPMSK_XferComplMsk (1 << 0)
#define S3C_DAINT S3C_HSOTG_REG(0x818)
#define S3C_DAINTMSK S3C_HSOTG_REG(0x81C)
#define S3C_DAINT_OutEP_SHIFT (16)
#define S3C_DAINT_OutEP(x) (1 << ((x) + 16))
#define S3C_DAINT_InEP(x) (1 << (x))
#define S3C_DTKNQR1 S3C_HSOTG_REG(0x820)
#define S3C_DTKNQR2 S3C_HSOTG_REG(0x824)
#define S3C_DTKNQR3 S3C_HSOTG_REG(0x830)
#define S3C_DTKNQR4 S3C_HSOTG_REG(0x834)
#define S3C_DVBUSDIS S3C_HSOTG_REG(0x828)
#define S3C_DVBUSPULSE S3C_HSOTG_REG(0x82C)
#define S3C_DIEPCTL0 S3C_HSOTG_REG(0x900)
#define S3C_DOEPCTL0 S3C_HSOTG_REG(0xB00)
#define S3C_DIEPCTL(_a) S3C_HSOTG_REG(0x900 + ((_a) * 0x20))
#define S3C_DOEPCTL(_a) S3C_HSOTG_REG(0xB00 + ((_a) * 0x20))
/* EP0 specialness:
* bits[29..28] - reserved (no SetD0PID, SetD1PID)
* bits[25..22] - should always be zero, this isn't a periodic endpoint
* bits[10..0] - MPS setting differenct for EP0
*/
#define S3C_D0EPCTL_MPS_MASK (0x3 << 0)
#define S3C_D0EPCTL_MPS_SHIFT (0)
#define S3C_D0EPCTL_MPS_64 (0x0 << 0)
#define S3C_D0EPCTL_MPS_32 (0x1 << 0)
#define S3C_D0EPCTL_MPS_16 (0x2 << 0)
#define S3C_D0EPCTL_MPS_8 (0x3 << 0)
#define S3C_DxEPCTL_EPEna (1 << 31)
#define S3C_DxEPCTL_EPDis (1 << 30)
#define S3C_DxEPCTL_SetD1PID (1 << 29)
#define S3C_DxEPCTL_SetOddFr (1 << 29)
#define S3C_DxEPCTL_SetD0PID (1 << 28)
#define S3C_DxEPCTL_SetEvenFr (1 << 28)
#define S3C_DxEPCTL_SNAK (1 << 27)
#define S3C_DxEPCTL_CNAK (1 << 26)
#define S3C_DxEPCTL_TxFNum_MASK (0xf << 22)
#define S3C_DxEPCTL_TxFNum_SHIFT (22)
#define S3C_DxEPCTL_TxFNum_LIMIT (0xf)
#define S3C_DxEPCTL_TxFNum(_x) ((_x) << 22)
#define S3C_DxEPCTL_Stall (1 << 21)
#define S3C_DxEPCTL_Snp (1 << 20)
#define S3C_DxEPCTL_EPType_MASK (0x3 << 18)
#define S3C_DxEPCTL_EPType_SHIFT (18)
#define S3C_DxEPCTL_EPType_Control (0x0 << 18)
#define S3C_DxEPCTL_EPType_Iso (0x1 << 18)
#define S3C_DxEPCTL_EPType_Bulk (0x2 << 18)
#define S3C_DxEPCTL_EPType_Intterupt (0x3 << 18)
#define S3C_DxEPCTL_NAKsts (1 << 17)
#define S3C_DxEPCTL_DPID (1 << 16)
#define S3C_DxEPCTL_EOFrNum (1 << 16)
#define S3C_DxEPCTL_USBActEp (1 << 15)
#define S3C_DxEPCTL_NextEp_MASK (0xf << 11)
#define S3C_DxEPCTL_NextEp_SHIFT (11)
#define S3C_DxEPCTL_NextEp_LIMIT (0xf)
#define S3C_DxEPCTL_NextEp(_x) ((_x) << 11)
#define S3C_DxEPCTL_MPS_MASK (0x7ff << 0)
#define S3C_DxEPCTL_MPS_SHIFT (0)
#define S3C_DxEPCTL_MPS_LIMIT (0x7ff)
#define S3C_DxEPCTL_MPS(_x) ((_x) << 0)
#define S3C_DIEPINT(_a) S3C_HSOTG_REG(0x908 + ((_a) * 0x20))
#define S3C_DOEPINT(_a) S3C_HSOTG_REG(0xB08 + ((_a) * 0x20))
#define S3C_DxEPINT_INEPNakEff (1 << 6)
#define S3C_DxEPINT_Back2BackSetup (1 << 6)
#define S3C_DxEPINT_INTknEPMis (1 << 5)
#define S3C_DxEPINT_INTknTXFEmp (1 << 4)
#define S3C_DxEPINT_OUTTknEPdis (1 << 4)
#define S3C_DxEPINT_Timeout (1 << 3)
#define S3C_DxEPINT_Setup (1 << 3)
#define S3C_DxEPINT_AHBErr (1 << 2)
#define S3C_DxEPINT_EPDisbld (1 << 1)
#define S3C_DxEPINT_XferCompl (1 << 0)
#define S3C_DIEPTSIZ0 S3C_HSOTG_REG(0x910)
#define S3C_DIEPTSIZ0_PktCnt_MASK (0x3 << 19)
#define S3C_DIEPTSIZ0_PktCnt_SHIFT (19)
#define S3C_DIEPTSIZ0_PktCnt_LIMIT (0x3)
#define S3C_DIEPTSIZ0_PktCnt(_x) ((_x) << 19)
#define S3C_DIEPTSIZ0_XferSize_MASK (0x7f << 0)
#define S3C_DIEPTSIZ0_XferSize_SHIFT (0)
#define S3C_DIEPTSIZ0_XferSize_LIMIT (0x7f)
#define S3C_DIEPTSIZ0_XferSize(_x) ((_x) << 0)
#define DOEPTSIZ0 S3C_HSOTG_REG(0xB10)
#define S3C_DOEPTSIZ0_SUPCnt_MASK (0x3 << 29)
#define S3C_DOEPTSIZ0_SUPCnt_SHIFT (29)
#define S3C_DOEPTSIZ0_SUPCnt_LIMIT (0x3)
#define S3C_DOEPTSIZ0_SUPCnt(_x) ((_x) << 29)
#define S3C_DOEPTSIZ0_PktCnt (1 << 19)
#define S3C_DOEPTSIZ0_XferSize_MASK (0x7f << 0)
#define S3C_DOEPTSIZ0_XferSize_SHIFT (0)
#define S3C_DIEPTSIZ(_a) S3C_HSOTG_REG(0x910 + ((_a) * 0x20))
#define S3C_DOEPTSIZ(_a) S3C_HSOTG_REG(0xB10 + ((_a) * 0x20))
#define S3C_DxEPTSIZ_MC_MASK (0x3 << 29)
#define S3C_DxEPTSIZ_MC_SHIFT (29)
#define S3C_DxEPTSIZ_MC_LIMIT (0x3)
#define S3C_DxEPTSIZ_MC(_x) ((_x) << 29)
#define S3C_DxEPTSIZ_PktCnt_MASK (0x3ff << 19)
#define S3C_DxEPTSIZ_PktCnt_SHIFT (19)
#define S3C_DxEPTSIZ_PktCnt_GET(_v) (((_v) >> 19) & 0x3ff)
#define S3C_DxEPTSIZ_PktCnt_LIMIT (0x3ff)
#define S3C_DxEPTSIZ_PktCnt(_x) ((_x) << 19)
#define S3C_DxEPTSIZ_XferSize_MASK (0x7ffff << 0)
#define S3C_DxEPTSIZ_XferSize_SHIFT (0)
#define S3C_DxEPTSIZ_XferSize_GET(_v) (((_v) >> 0) & 0x7ffff)
#define S3C_DxEPTSIZ_XferSize_LIMIT (0x7ffff)
#define S3C_DxEPTSIZ_XferSize(_x) ((_x) << 0)
#define S3C_DIEPDMA(_a) S3C_HSOTG_REG(0x914 + ((_a) * 0x20))
#define S3C_DOEPDMA(_a) S3C_HSOTG_REG(0xB14 + ((_a) * 0x20))
#define S3C_EPFIFO(_a) S3C_HSOTG_REG(0x1000 + ((_a) * 0x1000))
#endif /* __PLAT_S3C64XX_REGS_USB_HSOTG_H */
...@@ -15,10 +15,6 @@ ...@@ -15,10 +15,6 @@
static struct signal_struct init_signals = INIT_SIGNALS(init_signals); static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
struct mm_struct init_mm = INIT_MM(init_mm);
EXPORT_SYMBOL(init_mm);
/* /*
* Initial thread structure. Must be aligned on an 8192-byte boundary. * Initial thread structure. Must be aligned on an 8192-byte boundary.
*/ */
......
#ifndef _ASM_KMAP_TYPES_H #ifndef _ASM_KMAP_TYPES_H
#define _ASM_KMAP_TYPES_H #define _ASM_KMAP_TYPES_H
enum km_type { #include <asm-generic/kmap_types.h>
KM_BOUNCE_READ,
KM_SKB_SUNRPC_DATA,
KM_SKB_DATA_SOFTIRQ,
KM_USER0,
KM_USER1,
KM_BIO_SRC_IRQ,
KM_BIO_DST_IRQ,
KM_PTE0,
KM_PTE1,
KM_IRQ0,
KM_IRQ1,
KM_SOFTIRQ0,
KM_SOFTIRQ1,
KM_TYPE_NR
};
#endif #endif
...@@ -35,10 +35,6 @@ ...@@ -35,10 +35,6 @@
static struct signal_struct init_signals = INIT_SIGNALS(init_signals); static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
struct mm_struct init_mm = INIT_MM(init_mm);
EXPORT_SYMBOL(init_mm);
/* /*
* Initial task structure. * Initial task structure.
* *
......
...@@ -5,21 +5,6 @@ ...@@ -5,21 +5,6 @@
* is actually used on cris. * is actually used on cris.
*/ */
enum km_type { #include <asm-generic/kmap_types.h>
KM_BOUNCE_READ,
KM_SKB_SUNRPC_DATA,
KM_SKB_DATA_SOFTIRQ,
KM_USER0,
KM_USER1,
KM_BIO_SRC_IRQ,
KM_BIO_DST_IRQ,
KM_PTE0,
KM_PTE1,
KM_IRQ0,
KM_IRQ1,
KM_SOFTIRQ0,
KM_SOFTIRQ1,
KM_TYPE_NR
};
#endif #endif
...@@ -38,10 +38,6 @@ ...@@ -38,10 +38,6 @@
static struct signal_struct init_signals = INIT_SIGNALS(init_signals); static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
struct mm_struct init_mm = INIT_MM(init_mm);
EXPORT_SYMBOL(init_mm);
/* /*
* Initial thread structure. * Initial thread structure.
* *
......
...@@ -12,10 +12,6 @@ ...@@ -12,10 +12,6 @@
static struct signal_struct init_signals = INIT_SIGNALS(init_signals); static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
struct mm_struct init_mm = INIT_MM(init_mm);
EXPORT_SYMBOL(init_mm);
/* /*
* Initial thread structure. * Initial thread structure.
* *
......
#ifndef _ASM_H8300_KMAP_TYPES_H #ifndef _ASM_H8300_KMAP_TYPES_H
#define _ASM_H8300_KMAP_TYPES_H #define _ASM_H8300_KMAP_TYPES_H
enum km_type { #include <asm-generic/kmap_types.h>
KM_BOUNCE_READ,
KM_SKB_SUNRPC_DATA,
KM_SKB_DATA_SOFTIRQ,
KM_USER0,
KM_USER1,
KM_BIO_SRC_IRQ,
KM_BIO_DST_IRQ,
KM_PTE0,
KM_PTE1,
KM_IRQ0,
KM_IRQ1,
KM_SOFTIRQ0,
KM_SOFTIRQ1,
KM_TYPE_NR
};
#endif #endif
...@@ -14,10 +14,6 @@ ...@@ -14,10 +14,6 @@
static struct signal_struct init_signals = INIT_SIGNALS(init_signals); static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
struct mm_struct init_mm = INIT_MM(init_mm);
EXPORT_SYMBOL(init_mm);
/* /*
* Initial task structure. * Initial task structure.
* *
......
...@@ -1131,7 +1131,7 @@ sba_alloc_coherent (struct device *dev, size_t size, dma_addr_t *dma_handle, gfp ...@@ -1131,7 +1131,7 @@ sba_alloc_coherent (struct device *dev, size_t size, dma_addr_t *dma_handle, gfp
#ifdef CONFIG_NUMA #ifdef CONFIG_NUMA
{ {
struct page *page; struct page *page;
page = alloc_pages_node(ioc->node == MAX_NUMNODES ? page = alloc_pages_exact_node(ioc->node == MAX_NUMNODES ?
numa_node_id() : ioc->node, flags, numa_node_id() : ioc->node, flags,
get_order(size)); get_order(size));
......
#ifndef _ASM_IA64_KMAP_TYPES_H #ifndef _ASM_IA64_KMAP_TYPES_H
#define _ASM_IA64_KMAP_TYPES_H #define _ASM_IA64_KMAP_TYPES_H
#ifdef CONFIG_DEBUG_HIGHMEM #ifdef CONFIG_DEBUG_HIGHMEM
# define D(n) __KM_FENCE_##n , #define __WITH_KM_FENCE
#else
# define D(n)
#endif #endif
enum km_type { #include <asm-generic/kmap_types.h>
D(0) KM_BOUNCE_READ,
D(1) KM_SKB_SUNRPC_DATA,
D(2) KM_SKB_DATA_SOFTIRQ,
D(3) KM_USER0,
D(4) KM_USER1,
D(5) KM_BIO_SRC_IRQ,
D(6) KM_BIO_DST_IRQ,
D(7) KM_PTE0,
D(8) KM_PTE1,
D(9) KM_IRQ0,
D(10) KM_IRQ1,
D(11) KM_SOFTIRQ0,
D(12) KM_SOFTIRQ1,
D(13) KM_TYPE_NR
};
#undef D #undef __WITH_KM_FENCE
#endif /* _ASM_IA64_KMAP_TYPES_H */ #endif /* _ASM_IA64_KMAP_TYPES_H */
...@@ -19,10 +19,6 @@ ...@@ -19,10 +19,6 @@
static struct signal_struct init_signals = INIT_SIGNALS(init_signals); static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
struct mm_struct init_mm = INIT_MM(init_mm);
EXPORT_SYMBOL(init_mm);
/* /*
* Initial task structure. * Initial task structure.
* *
......
...@@ -1829,8 +1829,7 @@ ia64_mca_cpu_init(void *cpu_data) ...@@ -1829,8 +1829,7 @@ ia64_mca_cpu_init(void *cpu_data)
data = mca_bootmem(); data = mca_bootmem();
first_time = 0; first_time = 0;
} else } else
data = page_address(alloc_pages_node(numa_node_id(), data = __get_free_pages(GFP_KERNEL, get_order(sz));
GFP_KERNEL, get_order(sz)));
if (!data) if (!data)
panic("Could not allocate MCA memory for cpu %d\n", panic("Could not allocate MCA memory for cpu %d\n",
cpu); cpu);
......
...@@ -5595,7 +5595,7 @@ pfm_interrupt_handler(int irq, void *arg) ...@@ -5595,7 +5595,7 @@ pfm_interrupt_handler(int irq, void *arg)
(*pfm_alt_intr_handler->handler)(irq, arg, regs); (*pfm_alt_intr_handler->handler)(irq, arg, regs);
} }
put_cpu_no_resched(); put_cpu();
return IRQ_HANDLED; return IRQ_HANDLED;
} }
......
...@@ -98,7 +98,8 @@ static int uncached_add_chunk(struct uncached_pool *uc_pool, int nid) ...@@ -98,7 +98,8 @@ static int uncached_add_chunk(struct uncached_pool *uc_pool, int nid)
/* attempt to allocate a granule's worth of cached memory pages */ /* attempt to allocate a granule's worth of cached memory pages */
page = alloc_pages_node(nid, GFP_KERNEL | __GFP_ZERO | GFP_THISNODE, page = alloc_pages_exact_node(nid,
GFP_KERNEL | __GFP_ZERO | GFP_THISNODE,
IA64_GRANULE_SHIFT-PAGE_SHIFT); IA64_GRANULE_SHIFT-PAGE_SHIFT);
if (!page) { if (!page) {
mutex_unlock(&uc_pool->add_chunk_mutex); mutex_unlock(&uc_pool->add_chunk_mutex);
......
...@@ -90,7 +90,8 @@ static void *sn_dma_alloc_coherent(struct device *dev, size_t size, ...@@ -90,7 +90,8 @@ static void *sn_dma_alloc_coherent(struct device *dev, size_t size,
*/ */
node = pcibus_to_node(pdev->bus); node = pcibus_to_node(pdev->bus);
if (likely(node >=0)) { if (likely(node >=0)) {
struct page *p = alloc_pages_node(node, flags, get_order(size)); struct page *p = alloc_pages_exact_node(node,
flags, get_order(size));
if (likely(p)) if (likely(p))
cpuaddr = page_address(p); cpuaddr = page_address(p);
......
...@@ -2,28 +2,11 @@ ...@@ -2,28 +2,11 @@
#define __M32R_KMAP_TYPES_H #define __M32R_KMAP_TYPES_H
#ifdef CONFIG_DEBUG_HIGHMEM #ifdef CONFIG_DEBUG_HIGHMEM
# define D(n) __KM_FENCE_##n , #define __WITH_KM_FENCE
#else
# define D(n)
#endif #endif
enum km_type { #include <asm-generic/kmap_types.h>
D(0) KM_BOUNCE_READ,
D(1) KM_SKB_SUNRPC_DATA,
D(2) KM_SKB_DATA_SOFTIRQ,
D(3) KM_USER0,
D(4) KM_USER1,
D(5) KM_BIO_SRC_IRQ,
D(6) KM_BIO_DST_IRQ,
D(7) KM_PTE0,
D(8) KM_PTE1,
D(9) KM_IRQ0,
D(10) KM_IRQ1,
D(11) KM_SOFTIRQ0,
D(12) KM_SOFTIRQ1,
D(13) KM_TYPE_NR
};
#undef D #undef __WITH_KM_FENCE
#endif /* __M32R_KMAP_TYPES_H */ #endif /* __M32R_KMAP_TYPES_H */
...@@ -13,10 +13,6 @@ ...@@ -13,10 +13,6 @@
static struct signal_struct init_signals = INIT_SIGNALS(init_signals); static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
struct mm_struct init_mm = INIT_MM(init_mm);
EXPORT_SYMBOL(init_mm);
/* /*
* Initial thread structure. * Initial thread structure.
* *
......
...@@ -154,9 +154,9 @@ unsigned long __init zone_sizes_init(void) ...@@ -154,9 +154,9 @@ unsigned long __init zone_sizes_init(void)
* Use all area of internal RAM. * Use all area of internal RAM.
* see __alloc_pages() * see __alloc_pages()
*/ */
NODE_DATA(1)->node_zones->pages_min = 0; NODE_DATA(1)->node_zones->watermark[WMARK_MIN] = 0;
NODE_DATA(1)->node_zones->pages_low = 0; NODE_DATA(1)->node_zones->watermark[WMARK_LOW] = 0;
NODE_DATA(1)->node_zones->pages_high = 0; NODE_DATA(1)->node_zones->watermark[WMARK_HIGH] = 0;
return holes; return holes;
} }
...@@ -63,7 +63,7 @@ static void shutdown_m32104ut_irq(unsigned int irq) ...@@ -63,7 +63,7 @@ static void shutdown_m32104ut_irq(unsigned int irq)
outl(M32R_ICUCR_ILEVEL7, port); outl(M32R_ICUCR_ILEVEL7, port);
} }
static struct hw_interrupt_type m32104ut_irq_type = static struct irq_chip m32104ut_irq_type =
{ {
.typename = "M32104UT-IRQ", .typename = "M32104UT-IRQ",
.startup = startup_m32104ut_irq, .startup = startup_m32104ut_irq,
......
...@@ -69,7 +69,7 @@ static void shutdown_m32700ut_irq(unsigned int irq) ...@@ -69,7 +69,7 @@ static void shutdown_m32700ut_irq(unsigned int irq)
outl(M32R_ICUCR_ILEVEL7, port); outl(M32R_ICUCR_ILEVEL7, port);
} }
static struct hw_interrupt_type m32700ut_irq_type = static struct irq_chip m32700ut_irq_type =
{ {
.typename = "M32700UT-IRQ", .typename = "M32700UT-IRQ",
.startup = startup_m32700ut_irq, .startup = startup_m32700ut_irq,
...@@ -146,7 +146,7 @@ static void shutdown_m32700ut_pld_irq(unsigned int irq) ...@@ -146,7 +146,7 @@ static void shutdown_m32700ut_pld_irq(unsigned int irq)
outw(PLD_ICUCR_ILEVEL7, port); outw(PLD_ICUCR_ILEVEL7, port);
} }
static struct hw_interrupt_type m32700ut_pld_irq_type = static struct irq_chip m32700ut_pld_irq_type =
{ {
.typename = "M32700UT-PLD-IRQ", .typename = "M32700UT-PLD-IRQ",
.startup = startup_m32700ut_pld_irq, .startup = startup_m32700ut_pld_irq,
...@@ -215,7 +215,7 @@ static void shutdown_m32700ut_lanpld_irq(unsigned int irq) ...@@ -215,7 +215,7 @@ static void shutdown_m32700ut_lanpld_irq(unsigned int irq)
outw(PLD_ICUCR_ILEVEL7, port); outw(PLD_ICUCR_ILEVEL7, port);
} }
static struct hw_interrupt_type m32700ut_lanpld_irq_type = static struct irq_chip m32700ut_lanpld_irq_type =
{ {
.typename = "M32700UT-PLD-LAN-IRQ", .typename = "M32700UT-PLD-LAN-IRQ",
.startup = startup_m32700ut_lanpld_irq, .startup = startup_m32700ut_lanpld_irq,
...@@ -284,7 +284,7 @@ static void shutdown_m32700ut_lcdpld_irq(unsigned int irq) ...@@ -284,7 +284,7 @@ static void shutdown_m32700ut_lcdpld_irq(unsigned int irq)
outw(PLD_ICUCR_ILEVEL7, port); outw(PLD_ICUCR_ILEVEL7, port);
} }
static struct hw_interrupt_type m32700ut_lcdpld_irq_type = static struct irq_chip m32700ut_lcdpld_irq_type =
{ {
.typename = "M32700UT-PLD-LCD-IRQ", .typename = "M32700UT-PLD-LCD-IRQ",
.startup = startup_m32700ut_lcdpld_irq, .startup = startup_m32700ut_lcdpld_irq,
......
...@@ -63,7 +63,7 @@ static void shutdown_mappi_irq(unsigned int irq) ...@@ -63,7 +63,7 @@ static void shutdown_mappi_irq(unsigned int irq)
outl(M32R_ICUCR_ILEVEL7, port); outl(M32R_ICUCR_ILEVEL7, port);
} }
static struct hw_interrupt_type mappi_irq_type = static struct irq_chip mappi_irq_type =
{ {
.typename = "MAPPI-IRQ", .typename = "MAPPI-IRQ",
.startup = startup_mappi_irq, .startup = startup_mappi_irq,
......
...@@ -70,7 +70,7 @@ static void shutdown_mappi2_irq(unsigned int irq) ...@@ -70,7 +70,7 @@ static void shutdown_mappi2_irq(unsigned int irq)
outl(M32R_ICUCR_ILEVEL7, port); outl(M32R_ICUCR_ILEVEL7, port);
} }
static struct hw_interrupt_type mappi2_irq_type = static struct irq_chip mappi2_irq_type =
{ {
.typename = "MAPPI2-IRQ", .typename = "MAPPI2-IRQ",
.startup = startup_mappi2_irq, .startup = startup_mappi2_irq,
......
...@@ -70,7 +70,7 @@ static void shutdown_mappi3_irq(unsigned int irq) ...@@ -70,7 +70,7 @@ static void shutdown_mappi3_irq(unsigned int irq)
outl(M32R_ICUCR_ILEVEL7, port); outl(M32R_ICUCR_ILEVEL7, port);
} }
static struct hw_interrupt_type mappi3_irq_type = static struct irq_chip mappi3_irq_type =
{ {
.typename = "MAPPI3-IRQ", .typename = "MAPPI3-IRQ",
.startup = startup_mappi3_irq, .startup = startup_mappi3_irq,
......
...@@ -61,7 +61,7 @@ static void shutdown_oaks32r_irq(unsigned int irq) ...@@ -61,7 +61,7 @@ static void shutdown_oaks32r_irq(unsigned int irq)
outl(M32R_ICUCR_ILEVEL7, port); outl(M32R_ICUCR_ILEVEL7, port);
} }
static struct hw_interrupt_type oaks32r_irq_type = static struct irq_chip oaks32r_irq_type =
{ {
.typename = "OAKS32R-IRQ", .typename = "OAKS32R-IRQ",
.startup = startup_oaks32r_irq, .startup = startup_oaks32r_irq,
......
...@@ -70,7 +70,7 @@ static void shutdown_opsput_irq(unsigned int irq) ...@@ -70,7 +70,7 @@ static void shutdown_opsput_irq(unsigned int irq)
outl(M32R_ICUCR_ILEVEL7, port); outl(M32R_ICUCR_ILEVEL7, port);
} }
static struct hw_interrupt_type opsput_irq_type = static struct irq_chip opsput_irq_type =
{ {
.typename = "OPSPUT-IRQ", .typename = "OPSPUT-IRQ",
.startup = startup_opsput_irq, .startup = startup_opsput_irq,
...@@ -147,7 +147,7 @@ static void shutdown_opsput_pld_irq(unsigned int irq) ...@@ -147,7 +147,7 @@ static void shutdown_opsput_pld_irq(unsigned int irq)
outw(PLD_ICUCR_ILEVEL7, port); outw(PLD_ICUCR_ILEVEL7, port);
} }
static struct hw_interrupt_type opsput_pld_irq_type = static struct irq_chip opsput_pld_irq_type =
{ {
.typename = "OPSPUT-PLD-IRQ", .typename = "OPSPUT-PLD-IRQ",
.startup = startup_opsput_pld_irq, .startup = startup_opsput_pld_irq,
...@@ -216,7 +216,7 @@ static void shutdown_opsput_lanpld_irq(unsigned int irq) ...@@ -216,7 +216,7 @@ static void shutdown_opsput_lanpld_irq(unsigned int irq)
outw(PLD_ICUCR_ILEVEL7, port); outw(PLD_ICUCR_ILEVEL7, port);
} }
static struct hw_interrupt_type opsput_lanpld_irq_type = static struct irq_chip opsput_lanpld_irq_type =
{ {
.typename = "OPSPUT-PLD-LAN-IRQ", .typename = "OPSPUT-PLD-LAN-IRQ",
.startup = startup_opsput_lanpld_irq, .startup = startup_opsput_lanpld_irq,
...@@ -285,7 +285,7 @@ static void shutdown_opsput_lcdpld_irq(unsigned int irq) ...@@ -285,7 +285,7 @@ static void shutdown_opsput_lcdpld_irq(unsigned int irq)
outw(PLD_ICUCR_ILEVEL7, port); outw(PLD_ICUCR_ILEVEL7, port);
} }
static struct hw_interrupt_type opsput_lcdpld_irq_type = static struct irq_chip opsput_lcdpld_irq_type =
{ {
"OPSPUT-PLD-LCD-IRQ", "OPSPUT-PLD-LCD-IRQ",
startup_opsput_lcdpld_irq, startup_opsput_lcdpld_irq,
......
...@@ -61,7 +61,7 @@ static void shutdown_mappi_irq(unsigned int irq) ...@@ -61,7 +61,7 @@ static void shutdown_mappi_irq(unsigned int irq)
outl(M32R_ICUCR_ILEVEL7, port); outl(M32R_ICUCR_ILEVEL7, port);
} }
static struct hw_interrupt_type mappi_irq_type = static struct irq_chip mappi_irq_type =
{ {
.typename = "M32700-IRQ", .typename = "M32700-IRQ",
.startup = startup_mappi_irq, .startup = startup_mappi_irq,
...@@ -134,7 +134,7 @@ static void shutdown_m32700ut_pld_irq(unsigned int irq) ...@@ -134,7 +134,7 @@ static void shutdown_m32700ut_pld_irq(unsigned int irq)
outw(PLD_ICUCR_ILEVEL7, port); outw(PLD_ICUCR_ILEVEL7, port);
} }
static struct hw_interrupt_type m32700ut_pld_irq_type = static struct irq_chip m32700ut_pld_irq_type =
{ {
.typename = "USRV-PLD-IRQ", .typename = "USRV-PLD-IRQ",
.startup = startup_m32700ut_pld_irq, .startup = startup_m32700ut_pld_irq,
......
#ifndef __ASM_M68K_KMAP_TYPES_H #ifndef __ASM_M68K_KMAP_TYPES_H
#define __ASM_M68K_KMAP_TYPES_H #define __ASM_M68K_KMAP_TYPES_H
enum km_type { #include <asm-generic/kmap_types.h>
KM_BOUNCE_READ,
KM_SKB_SUNRPC_DATA,
KM_SKB_DATA_SOFTIRQ,
KM_USER0,
KM_USER1,
KM_BIO_SRC_IRQ,
KM_BIO_DST_IRQ,
KM_PTE0,
KM_PTE1,
KM_IRQ0,
KM_IRQ1,
KM_SOFTIRQ0,
KM_SOFTIRQ1,
KM_TYPE_NR
};
#endif /* __ASM_M68K_KMAP_TYPES_H */ #endif /* __ASM_M68K_KMAP_TYPES_H */
...@@ -42,10 +42,6 @@ ...@@ -42,10 +42,6 @@
*/ */
static struct signal_struct init_signals = INIT_SIGNALS(init_signals); static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
struct mm_struct init_mm = INIT_MM(init_mm);
EXPORT_SYMBOL(init_mm);
union thread_union init_thread_union union thread_union init_thread_union
__attribute__((section(".data.init_task"), aligned(THREAD_SIZE))) __attribute__((section(".data.init_task"), aligned(THREAD_SIZE)))
= { INIT_THREAD_INFO(init_task) }; = { INIT_THREAD_INFO(init_task) };
......
...@@ -14,10 +14,6 @@ ...@@ -14,10 +14,6 @@
static struct signal_struct init_signals = INIT_SIGNALS(init_signals); static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
struct mm_struct init_mm = INIT_MM(init_mm);
EXPORT_SYMBOL(init_mm);
/* /*
* Initial task structure. * Initial task structure.
* *
......
/*
* Copyright (C) 2006 Atmark Techno, Inc.
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*/
#ifndef _ASM_MICROBLAZE_KMAP_TYPES_H #ifndef _ASM_MICROBLAZE_KMAP_TYPES_H
#define _ASM_MICROBLAZE_KMAP_TYPES_H #define _ASM_MICROBLAZE_KMAP_TYPES_H
enum km_type { #include <asm-generic/kmap_types.h>
KM_BOUNCE_READ,
KM_SKB_SUNRPC_DATA,
KM_SKB_DATA_SOFTIRQ,
KM_USER0,
KM_USER1,
KM_BIO_SRC_IRQ,
KM_BIO_DST_IRQ,
KM_PTE0,
KM_PTE1,
KM_IRQ0,
KM_IRQ1,
KM_SOFTIRQ0,
KM_SOFTIRQ1,
KM_TYPE_NR,
};
#endif /* _ASM_MICROBLAZE_KMAP_TYPES_H */ #endif /* _ASM_MICROBLAZE_KMAP_TYPES_H */
...@@ -618,6 +618,8 @@ config CAVIUM_OCTEON_REFERENCE_BOARD ...@@ -618,6 +618,8 @@ config CAVIUM_OCTEON_REFERENCE_BOARD
select SYS_HAS_EARLY_PRINTK select SYS_HAS_EARLY_PRINTK
select SYS_HAS_CPU_CAVIUM_OCTEON select SYS_HAS_CPU_CAVIUM_OCTEON
select SWAP_IO_SPACE select SWAP_IO_SPACE
select HW_HAS_PCI
select ARCH_SUPPORTS_MSI
help help
This option supports all of the Octeon reference boards from Cavium This option supports all of the Octeon reference boards from Cavium
Networks. It builds a kernel that dynamically determines the Octeon Networks. It builds a kernel that dynamically determines the Octeon
...@@ -851,6 +853,11 @@ config SYS_SUPPORTS_BIG_ENDIAN ...@@ -851,6 +853,11 @@ config SYS_SUPPORTS_BIG_ENDIAN
config SYS_SUPPORTS_LITTLE_ENDIAN config SYS_SUPPORTS_LITTLE_ENDIAN
bool bool
config SYS_SUPPORTS_HUGETLBFS
bool
depends on CPU_SUPPORTS_HUGEPAGES && 64BIT
default y
config IRQ_CPU config IRQ_CPU
bool bool
...@@ -1055,6 +1062,7 @@ config CPU_MIPS64_R1 ...@@ -1055,6 +1062,7 @@ config CPU_MIPS64_R1
select CPU_SUPPORTS_32BIT_KERNEL select CPU_SUPPORTS_32BIT_KERNEL
select CPU_SUPPORTS_64BIT_KERNEL select CPU_SUPPORTS_64BIT_KERNEL
select CPU_SUPPORTS_HIGHMEM select CPU_SUPPORTS_HIGHMEM
select CPU_SUPPORTS_HUGEPAGES
help help
Choose this option to build a kernel for release 1 or later of the Choose this option to build a kernel for release 1 or later of the
MIPS64 architecture. Many modern embedded systems with a 64-bit MIPS64 architecture. Many modern embedded systems with a 64-bit
...@@ -1074,6 +1082,7 @@ config CPU_MIPS64_R2 ...@@ -1074,6 +1082,7 @@ config CPU_MIPS64_R2
select CPU_SUPPORTS_32BIT_KERNEL select CPU_SUPPORTS_32BIT_KERNEL
select CPU_SUPPORTS_64BIT_KERNEL select CPU_SUPPORTS_64BIT_KERNEL
select CPU_SUPPORTS_HIGHMEM select CPU_SUPPORTS_HIGHMEM
select CPU_SUPPORTS_HUGEPAGES
help help
Choose this option to build a kernel for release 2 or later of the Choose this option to build a kernel for release 2 or later of the
MIPS64 architecture. Many modern embedded systems with a 64-bit MIPS64 architecture. Many modern embedded systems with a 64-bit
...@@ -1160,6 +1169,7 @@ config CPU_R5500 ...@@ -1160,6 +1169,7 @@ config CPU_R5500
select CPU_HAS_LLSC select CPU_HAS_LLSC
select CPU_SUPPORTS_32BIT_KERNEL select CPU_SUPPORTS_32BIT_KERNEL
select CPU_SUPPORTS_64BIT_KERNEL select CPU_SUPPORTS_64BIT_KERNEL
select CPU_SUPPORTS_HUGEPAGES
help help
NEC VR5500 and VR5500A series processors implement 64-bit MIPS IV NEC VR5500 and VR5500A series processors implement 64-bit MIPS IV
instruction set. instruction set.
...@@ -1245,6 +1255,7 @@ config CPU_CAVIUM_OCTEON ...@@ -1245,6 +1255,7 @@ config CPU_CAVIUM_OCTEON
select WEAK_ORDERING select WEAK_ORDERING
select WEAK_REORDERING_BEYOND_LLSC select WEAK_REORDERING_BEYOND_LLSC
select CPU_SUPPORTS_HIGHMEM select CPU_SUPPORTS_HIGHMEM
select CPU_SUPPORTS_HUGEPAGES
help help
The Cavium Octeon processor is a highly integrated chip containing The Cavium Octeon processor is a highly integrated chip containing
many ethernet hardware widgets for networking tasks. The processor many ethernet hardware widgets for networking tasks. The processor
...@@ -1364,6 +1375,8 @@ config CPU_SUPPORTS_32BIT_KERNEL ...@@ -1364,6 +1375,8 @@ config CPU_SUPPORTS_32BIT_KERNEL
bool bool
config CPU_SUPPORTS_64BIT_KERNEL config CPU_SUPPORTS_64BIT_KERNEL
bool bool
config CPU_SUPPORTS_HUGEPAGES
bool
# #
# Set to y for ptrace access to watch registers. # Set to y for ptrace access to watch registers.
...@@ -2121,6 +2134,10 @@ endmenu ...@@ -2121,6 +2134,10 @@ endmenu
menu "Power management options" menu "Power management options"
config ARCH_HIBERNATION_POSSIBLE
def_bool y
depends on !SMP
config ARCH_SUSPEND_POSSIBLE config ARCH_SUSPEND_POSSIBLE
def_bool y def_bool y
depends on !SMP depends on !SMP
......
...@@ -167,7 +167,6 @@ libs-$(CONFIG_ARC) += arch/mips/fw/arc/ ...@@ -167,7 +167,6 @@ libs-$(CONFIG_ARC) += arch/mips/fw/arc/
libs-$(CONFIG_CFE) += arch/mips/fw/cfe/ libs-$(CONFIG_CFE) += arch/mips/fw/cfe/
libs-$(CONFIG_SNIPROM) += arch/mips/fw/sni/ libs-$(CONFIG_SNIPROM) += arch/mips/fw/sni/
libs-y += arch/mips/fw/lib/ libs-y += arch/mips/fw/lib/
libs-$(CONFIG_SIBYTE_CFE) += arch/mips/sibyte/cfe/
# #
# Board-dependent options and extra files # Board-dependent options and extra files
...@@ -184,7 +183,6 @@ load-$(CONFIG_MACH_JAZZ) += 0xffffffff80080000 ...@@ -184,7 +183,6 @@ load-$(CONFIG_MACH_JAZZ) += 0xffffffff80080000
# Common Alchemy Au1x00 stuff # Common Alchemy Au1x00 stuff
# #
core-$(CONFIG_SOC_AU1X00) += arch/mips/alchemy/common/ core-$(CONFIG_SOC_AU1X00) += arch/mips/alchemy/common/
cflags-$(CONFIG_SOC_AU1X00) += -I$(srctree)/arch/mips/include/asm/mach-au1x00
# #
# AMD Alchemy Pb1000 eval board # AMD Alchemy Pb1000 eval board
...@@ -282,6 +280,10 @@ load-$(CONFIG_MIPS_MTX1) += 0xffffffff80100000 ...@@ -282,6 +280,10 @@ load-$(CONFIG_MIPS_MTX1) += 0xffffffff80100000
libs-$(CONFIG_MIPS_XXS1500) += arch/mips/alchemy/xxs1500/ libs-$(CONFIG_MIPS_XXS1500) += arch/mips/alchemy/xxs1500/
load-$(CONFIG_MIPS_XXS1500) += 0xffffffff80100000 load-$(CONFIG_MIPS_XXS1500) += 0xffffffff80100000
# must be last for Alchemy systems for GPIO to work properly
cflags-$(CONFIG_SOC_AU1X00) += -I$(srctree)/arch/mips/include/asm/mach-au1x00
# #
# Cobalt Server # Cobalt Server
# #
...@@ -675,6 +677,9 @@ core-y += arch/mips/kernel/ arch/mips/mm/ arch/mips/math-emu/ ...@@ -675,6 +677,9 @@ core-y += arch/mips/kernel/ arch/mips/mm/ arch/mips/math-emu/
drivers-$(CONFIG_OPROFILE) += arch/mips/oprofile/ drivers-$(CONFIG_OPROFILE) += arch/mips/oprofile/
# suspend and hibernation support
drivers-$(CONFIG_PM) += arch/mips/power/
ifdef CONFIG_LASAT ifdef CONFIG_LASAT
rom.bin rom.sw: vmlinux rom.bin rom.sw: vmlinux
$(Q)$(MAKE) $(build)=arch/mips/lasat/image $@ $(Q)$(MAKE) $(build)=arch/mips/lasat/image $@
......
# au1000-style gpio
config ALCHEMY_GPIO_AU1000
bool
# select this in your board config if you don't want to use the gpio
# namespace as documented in the manuals. In this case however you need
# to create the necessary gpio_* functions in your board code/headers!
# see arch/mips/include/asm/mach-au1x00/gpio.h for more information.
config ALCHEMY_GPIO_INDIRECT
def_bool n
choice choice
prompt "Machine type" prompt "Machine type"
depends on MACH_ALCHEMY depends on MACH_ALCHEMY
...@@ -108,22 +119,27 @@ endchoice ...@@ -108,22 +119,27 @@ endchoice
config SOC_AU1000 config SOC_AU1000
bool bool
select SOC_AU1X00 select SOC_AU1X00
select ALCHEMY_GPIO_AU1000
config SOC_AU1100 config SOC_AU1100
bool bool
select SOC_AU1X00 select SOC_AU1X00
select ALCHEMY_GPIO_AU1000
config SOC_AU1500 config SOC_AU1500
bool bool
select SOC_AU1X00 select SOC_AU1X00
select ALCHEMY_GPIO_AU1000
config SOC_AU1550 config SOC_AU1550
bool bool
select SOC_AU1X00 select SOC_AU1X00
select ALCHEMY_GPIO_AU1000
config SOC_AU1200 config SOC_AU1200
bool bool
select SOC_AU1X00 select SOC_AU1X00
select ALCHEMY_GPIO_AU1000
config SOC_AU1X00 config SOC_AU1X00
bool bool
...@@ -134,4 +150,5 @@ config SOC_AU1X00 ...@@ -134,4 +150,5 @@ config SOC_AU1X00
select SYS_HAS_CPU_MIPS32_R1 select SYS_HAS_CPU_MIPS32_R1
select SYS_SUPPORTS_32BIT_KERNEL select SYS_SUPPORTS_32BIT_KERNEL
select SYS_SUPPORTS_APM_EMULATION select SYS_SUPPORTS_APM_EMULATION
select ARCH_REQUIRE_GPIOLIB select GENERIC_GPIO
select ARCH_WANT_OPTIONAL_GPIOLIB
...@@ -7,7 +7,14 @@ ...@@ -7,7 +7,14 @@
obj-y += prom.o irq.o puts.o time.o reset.o \ obj-y += prom.o irq.o puts.o time.o reset.o \
clocks.o platform.o power.o setup.o \ clocks.o platform.o power.o setup.o \
sleeper.o dma.o dbdma.o gpio.o sleeper.o dma.o dbdma.o
# optional gpiolib support
ifeq ($(CONFIG_ALCHEMY_GPIO_INDIRECT),)
ifeq ($(CONFIG_GPIOLIB),y)
obj-$(CONFIG_ALCHEMY_GPIO_AU1000) += gpiolib-au1000.o
endif
endif
obj-$(CONFIG_PCI) += pci.o obj-$(CONFIG_PCI) += pci.o
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册