You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'master'
This commit is contained in:
@@ -239,9 +239,9 @@ X!Ilib/string.c
|
||||
<title>Network device support</title>
|
||||
<sect1><title>Driver Support</title>
|
||||
!Enet/core/dev.c
|
||||
</sect1>
|
||||
<sect1><title>8390 Based Network Cards</title>
|
||||
!Edrivers/net/8390.c
|
||||
!Enet/ethernet/eth.c
|
||||
!Einclude/linux/etherdevice.h
|
||||
!Enet/core/wireless.c
|
||||
</sect1>
|
||||
<sect1><title>Synchronous PPP</title>
|
||||
!Edrivers/net/wan/syncppp.c
|
||||
|
||||
@@ -0,0 +1,122 @@
|
||||
RCU Torture Test Operation
|
||||
|
||||
|
||||
CONFIG_RCU_TORTURE_TEST
|
||||
|
||||
The CONFIG_RCU_TORTURE_TEST config option is available for all RCU
|
||||
implementations. It creates an rcutorture kernel module that can
|
||||
be loaded to run a torture test. The test periodically outputs
|
||||
status messages via printk(), which can be examined via the dmesg
|
||||
command (perhaps grepping for "rcutorture"). The test is started
|
||||
when the module is loaded, and stops when the module is unloaded.
|
||||
|
||||
However, actually setting this config option to "y" results in the system
|
||||
running the test immediately upon boot, and ending only when the system
|
||||
is taken down. Normally, one will instead want to build the system
|
||||
with CONFIG_RCU_TORTURE_TEST=m and to use modprobe and rmmod to control
|
||||
the test, perhaps using a script similar to the one shown at the end of
|
||||
this document. Note that you will need CONFIG_MODULE_UNLOAD in order
|
||||
to be able to end the test.
|
||||
|
||||
|
||||
MODULE PARAMETERS
|
||||
|
||||
This module has the following parameters:
|
||||
|
||||
nreaders This is the number of RCU reading threads supported.
|
||||
The default is twice the number of CPUs. Why twice?
|
||||
To properly exercise RCU implementations with preemptible
|
||||
read-side critical sections.
|
||||
|
||||
stat_interval The number of seconds between output of torture
|
||||
statistics (via printk()). Regardless of the interval,
|
||||
statistics are printed when the module is unloaded.
|
||||
Setting the interval to zero causes the statistics to
|
||||
be printed -only- when the module is unloaded, and this
|
||||
is the default.
|
||||
|
||||
verbose Enable debug printk()s. Default is disabled.
|
||||
|
||||
|
||||
OUTPUT
|
||||
|
||||
The statistics output is as follows:
|
||||
|
||||
rcutorture: --- Start of test: nreaders=16 stat_interval=0 verbose=0
|
||||
rcutorture: rtc: 0000000000000000 ver: 1916 tfle: 0 rta: 1916 rtaf: 0 rtf: 1915
|
||||
rcutorture: Reader Pipe: 1466408 9747 0 0 0 0 0 0 0 0 0
|
||||
rcutorture: Reader Batch: 1464477 11678 0 0 0 0 0 0 0 0
|
||||
rcutorture: Free-Block Circulation: 1915 1915 1915 1915 1915 1915 1915 1915 1915 1915 0
|
||||
rcutorture: --- End of test
|
||||
|
||||
The command "dmesg | grep rcutorture:" will extract this information on
|
||||
most systems. On more esoteric configurations, it may be necessary to
|
||||
use other commands to access the output of the printk()s used by
|
||||
the RCU torture test. The printk()s use KERN_ALERT, so they should
|
||||
be evident. ;-)
|
||||
|
||||
The entries are as follows:
|
||||
|
||||
o "ggp": The number of counter flips (or batches) since boot.
|
||||
|
||||
o "rtc": The hexadecimal address of the structure currently visible
|
||||
to readers.
|
||||
|
||||
o "ver": The number of times since boot that the rcutw writer task
|
||||
has changed the structure visible to readers.
|
||||
|
||||
o "tfle": If non-zero, indicates that the "torture freelist"
|
||||
containing structure to be placed into the "rtc" area is empty.
|
||||
This condition is important, since it can fool you into thinking
|
||||
that RCU is working when it is not. :-/
|
||||
|
||||
o "rta": Number of structures allocated from the torture freelist.
|
||||
|
||||
o "rtaf": Number of allocations from the torture freelist that have
|
||||
failed due to the list being empty.
|
||||
|
||||
o "rtf": Number of frees into the torture freelist.
|
||||
|
||||
o "Reader Pipe": Histogram of "ages" of structures seen by readers.
|
||||
If any entries past the first two are non-zero, RCU is broken.
|
||||
And rcutorture prints the error flag string "!!!" to make sure
|
||||
you notice. The age of a newly allocated structure is zero,
|
||||
it becomes one when removed from reader visibility, and is
|
||||
incremented once per grace period subsequently -- and is freed
|
||||
after passing through (RCU_TORTURE_PIPE_LEN-2) grace periods.
|
||||
|
||||
The output displayed above was taken from a correctly working
|
||||
RCU. If you want to see what it looks like when broken, break
|
||||
it yourself. ;-)
|
||||
|
||||
o "Reader Batch": Another histogram of "ages" of structures seen
|
||||
by readers, but in terms of counter flips (or batches) rather
|
||||
than in terms of grace periods. The legal number of non-zero
|
||||
entries is again two. The reason for this separate view is
|
||||
that it is easier to get the third entry to show up in the
|
||||
"Reader Batch" list than in the "Reader Pipe" list.
|
||||
|
||||
o "Free-Block Circulation": Shows the number of torture structures
|
||||
that have reached a given point in the pipeline. The first element
|
||||
should closely correspond to the number of structures allocated,
|
||||
the second to the number that have been removed from reader view,
|
||||
and all but the last remaining to the corresponding number of
|
||||
passes through a grace period. The last entry should be zero,
|
||||
as it is only incremented if a torture structure's counter
|
||||
somehow gets incremented farther than it should.
|
||||
|
||||
|
||||
USAGE
|
||||
|
||||
The following script may be used to torture RCU:
|
||||
|
||||
#!/bin/sh
|
||||
|
||||
modprobe rcutorture
|
||||
sleep 100
|
||||
rmmod rcutorture
|
||||
dmesg | grep rcutorture:
|
||||
|
||||
The output can be manually inspected for the error flag of "!!!".
|
||||
One could of course create a more elaborate script that automatically
|
||||
checked for such errors.
|
||||
@@ -81,7 +81,8 @@ Adding New Machines
|
||||
|
||||
Any large scale modifications, or new drivers should be discussed
|
||||
on the ARM kernel mailing list (linux-arm-kernel) before being
|
||||
attempted.
|
||||
attempted. See http://www.arm.linux.org.uk/mailinglists/ for the
|
||||
mailing list information.
|
||||
|
||||
|
||||
NAND
|
||||
@@ -120,6 +121,43 @@ Clock Management
|
||||
various clock units
|
||||
|
||||
|
||||
Platform Data
|
||||
-------------
|
||||
|
||||
Whenever a device has platform specific data that is specified
|
||||
on a per-machine basis, care should be taken to ensure the
|
||||
following:
|
||||
|
||||
1) that default data is not left in the device to confuse the
|
||||
driver if a machine does not set it at startup
|
||||
|
||||
2) the data should (if possible) be marked as __initdata,
|
||||
to ensure that the data is thrown away if the machine is
|
||||
not the one currently in use.
|
||||
|
||||
The best way of doing this is to make a function that
|
||||
kmalloc()s an area of memory, and copies the __initdata
|
||||
and then sets the relevant device's platform data. Making
|
||||
the function `__init` takes care of ensuring it is discarded
|
||||
with the rest of the initialisation code
|
||||
|
||||
static __init void s3c24xx_xxx_set_platdata(struct xxx_data *pd)
|
||||
{
|
||||
struct s3c2410_xxx_mach_info *npd;
|
||||
|
||||
npd = kmalloc(sizeof(struct s3c2410_xxx_mach_info), GFP_KERNEL);
|
||||
if (npd) {
|
||||
memcpy(npd, pd, sizeof(struct s3c2410_xxx_mach_info));
|
||||
s3c_device_xxx.dev.platform_data = npd;
|
||||
} else {
|
||||
printk(KERN_ERR "no memory for xxx platform data\n");
|
||||
}
|
||||
}
|
||||
|
||||
Note, since the code is marked as __init, it should not be
|
||||
exported outside arch/arm/mach-s3c2410/, or exported to
|
||||
modules via EXPORT_SYMBOL() and related functions.
|
||||
|
||||
Port Contributors
|
||||
-----------------
|
||||
|
||||
@@ -149,6 +187,7 @@ Document Changes
|
||||
06 Mar 2005 - BJD - Added Christer Weinigel
|
||||
08 Mar 2005 - BJD - Added LCVR to list of people, updated introduction
|
||||
08 Mar 2005 - BJD - Added section on adding machines
|
||||
09 Sep 2005 - BJD - Added section on platform data
|
||||
|
||||
Document Author
|
||||
---------------
|
||||
|
||||
@@ -94,7 +94,7 @@ the available CPU and Memory resources amongst the requesting tasks.
|
||||
But larger systems, which benefit more from careful processor and
|
||||
memory placement to reduce memory access times and contention,
|
||||
and which typically represent a larger investment for the customer,
|
||||
can benefit from explictly placing jobs on properly sized subsets of
|
||||
can benefit from explicitly placing jobs on properly sized subsets of
|
||||
the system.
|
||||
|
||||
This can be especially valuable on:
|
||||
|
||||
@@ -50,9 +50,14 @@ userspace utilities, etc.
|
||||
Features
|
||||
========
|
||||
|
||||
- This is a complete rewrite of the NTFS driver that used to be in the kernel.
|
||||
This new driver implements NTFS read support and is functionally equivalent
|
||||
to the old ntfs driver.
|
||||
- This is a complete rewrite of the NTFS driver that used to be in the 2.4 and
|
||||
earlier kernels. This new driver implements NTFS read support and is
|
||||
functionally equivalent to the old ntfs driver and it also implements limited
|
||||
write support. The biggest limitation at present is that files/directories
|
||||
cannot be created or deleted. See below for the list of write features that
|
||||
are so far supported. Another limitation is that writing to compressed files
|
||||
is not implemented at all. Also, neither read nor write access to encrypted
|
||||
files is so far implemented.
|
||||
- The new driver has full support for sparse files on NTFS 3.x volumes which
|
||||
the old driver isn't happy with.
|
||||
- The new driver supports execution of binaries due to mmap() now being
|
||||
@@ -78,7 +83,20 @@ Features
|
||||
- The new driver supports fsync(2), fdatasync(2), and msync(2).
|
||||
- The new driver supports readv(2) and writev(2).
|
||||
- The new driver supports access time updates (including mtime and ctime).
|
||||
|
||||
- The new driver supports truncate(2) and open(2) with O_TRUNC. But at present
|
||||
only very limited support for highly fragmented files, i.e. ones which have
|
||||
their data attribute split across multiple extents, is included. Another
|
||||
limitation is that at present truncate(2) will never create sparse files,
|
||||
since to mark a file sparse we need to modify the directory entry for the
|
||||
file and we do not implement directory modifications yet.
|
||||
- The new driver supports write(2) which can both overwrite existing data and
|
||||
extend the file size so that you can write beyond the existing data. Also,
|
||||
writing into sparse regions is supported and the holes are filled in with
|
||||
clusters. But at present only limited support for highly fragmented files,
|
||||
i.e. ones which have their data attribute split across multiple extents, is
|
||||
included. Another limitation is that write(2) will never create sparse
|
||||
files, since to mark a file sparse we need to modify the directory entry for
|
||||
the file and we do not implement directory modifications yet.
|
||||
|
||||
Supported mount options
|
||||
=======================
|
||||
@@ -439,6 +457,22 @@ ChangeLog
|
||||
|
||||
Note, a technical ChangeLog aimed at kernel hackers is in fs/ntfs/ChangeLog.
|
||||
|
||||
2.1.25:
|
||||
- Write support is now extended with write(2) being able to both
|
||||
overwrite existing file data and to extend files. Also, if a write
|
||||
to a sparse region occurs, write(2) will fill in the hole. Note,
|
||||
mmap(2) based writes still do not support writing into holes or
|
||||
writing beyond the initialized size.
|
||||
- Write support has a new feature and that is that truncate(2) and
|
||||
open(2) with O_TRUNC are now implemented thus files can be both made
|
||||
smaller and larger.
|
||||
- Note: Both write(2) and truncate(2)/open(2) with O_TRUNC still have
|
||||
limitations in that they
|
||||
- only provide limited support for highly fragmented files.
|
||||
- only work on regular, i.e. uncompressed and unencrypted files.
|
||||
- never create sparse files although this will change once directory
|
||||
operations are implemented.
|
||||
- Lots of bug fixes and enhancements across the board.
|
||||
2.1.24:
|
||||
- Support journals ($LogFile) which have been modified by chkdsk. This
|
||||
means users can boot into Windows after we marked the volume dirty.
|
||||
|
||||
@@ -19,15 +19,43 @@ Mount Options
|
||||
|
||||
When mounting an XFS filesystem, the following options are accepted.
|
||||
|
||||
biosize=size
|
||||
Sets the preferred buffered I/O size (default size is 64K).
|
||||
"size" must be expressed as the logarithm (base2) of the
|
||||
desired I/O size.
|
||||
Valid values for this option are 14 through 16, inclusive
|
||||
(i.e. 16K, 32K, and 64K bytes). On machines with a 4K
|
||||
pagesize, 13 (8K bytes) is also a valid size.
|
||||
The preferred buffered I/O size can also be altered on an
|
||||
individual file basis using the ioctl(2) system call.
|
||||
allocsize=size
|
||||
Sets the buffered I/O end-of-file preallocation size when
|
||||
doing delayed allocation writeout (default size is 64KiB).
|
||||
Valid values for this option are page size (typically 4KiB)
|
||||
through to 1GiB, inclusive, in power-of-2 increments.
|
||||
|
||||
attr2/noattr2
|
||||
The options enable/disable (default is disabled for backward
|
||||
compatibility on-disk) an "opportunistic" improvement to be
|
||||
made in the way inline extended attributes are stored on-disk.
|
||||
When the new form is used for the first time (by setting or
|
||||
removing extended attributes) the on-disk superblock feature
|
||||
bit field will be updated to reflect this format being in use.
|
||||
|
||||
barrier
|
||||
Enables the use of block layer write barriers for writes into
|
||||
the journal and unwritten extent conversion. This allows for
|
||||
drive level write caching to be enabled, for devices that
|
||||
support write barriers.
|
||||
|
||||
dmapi
|
||||
Enable the DMAPI (Data Management API) event callouts.
|
||||
Use with the "mtpt" option.
|
||||
|
||||
grpid/bsdgroups and nogrpid/sysvgroups
|
||||
These options define what group ID a newly created file gets.
|
||||
When grpid is set, it takes the group ID of the directory in
|
||||
which it is created; otherwise (the default) it takes the fsgid
|
||||
of the current process, unless the directory has the setgid bit
|
||||
set, in which case it takes the gid from the parent directory,
|
||||
and also gets the setgid bit set if it is a directory itself.
|
||||
|
||||
ihashsize=value
|
||||
Sets the number of hash buckets available for hashing the
|
||||
in-memory inodes of the specified mount point. If a value
|
||||
of zero is used, the value selected by the default algorithm
|
||||
will be displayed in /proc/mounts.
|
||||
|
||||
ikeep/noikeep
|
||||
When inode clusters are emptied of inodes, keep them around
|
||||
@@ -35,12 +63,31 @@ When mounting an XFS filesystem, the following options are accepted.
|
||||
and is still the default for now. Using the noikeep option,
|
||||
inode clusters are returned to the free space pool.
|
||||
|
||||
inode64
|
||||
Indicates that XFS is allowed to create inodes at any location
|
||||
in the filesystem, including those which will result in inode
|
||||
numbers occupying more than 32 bits of significance. This is
|
||||
provided for backwards compatibility, but causes problems for
|
||||
backup applications that cannot handle large inode numbers.
|
||||
|
||||
largeio/nolargeio
|
||||
If "nolargeio" is specified, the optimal I/O reported in
|
||||
st_blksize by stat(2) will be as small as possible to allow user
|
||||
applications to avoid inefficient read/modify/write I/O.
|
||||
If "largeio" specified, a filesystem that has a "swidth" specified
|
||||
will return the "swidth" value (in bytes) in st_blksize. If the
|
||||
filesystem does not have a "swidth" specified but does specify
|
||||
an "allocsize" then "allocsize" (in bytes) will be returned
|
||||
instead.
|
||||
If neither of these two options are specified, then filesystem
|
||||
will behave as if "nolargeio" was specified.
|
||||
|
||||
logbufs=value
|
||||
Set the number of in-memory log buffers. Valid numbers range
|
||||
from 2-8 inclusive.
|
||||
The default value is 8 buffers for filesystems with a
|
||||
blocksize of 64K, 4 buffers for filesystems with a blocksize
|
||||
of 32K, 3 buffers for filesystems with a blocksize of 16K
|
||||
blocksize of 64KiB, 4 buffers for filesystems with a blocksize
|
||||
of 32KiB, 3 buffers for filesystems with a blocksize of 16KiB
|
||||
and 2 buffers for all other configurations. Increasing the
|
||||
number of buffers may increase performance on some workloads
|
||||
at the cost of the memory used for the additional log buffers
|
||||
@@ -49,10 +96,10 @@ When mounting an XFS filesystem, the following options are accepted.
|
||||
logbsize=value
|
||||
Set the size of each in-memory log buffer.
|
||||
Size may be specified in bytes, or in kilobytes with a "k" suffix.
|
||||
Valid sizes for version 1 and version 2 logs are 16384 (16k) and
|
||||
32768 (32k). Valid sizes for version 2 logs also include
|
||||
Valid sizes for version 1 and version 2 logs are 16384 (16k) and
|
||||
32768 (32k). Valid sizes for version 2 logs also include
|
||||
65536 (64k), 131072 (128k) and 262144 (256k).
|
||||
The default value for machines with more than 32MB of memory
|
||||
The default value for machines with more than 32MiB of memory
|
||||
is 32768, machines with less memory use 16384 by default.
|
||||
|
||||
logdev=device and rtdev=device
|
||||
@@ -62,6 +109,11 @@ When mounting an XFS filesystem, the following options are accepted.
|
||||
optional, and the log section can be separate from the data
|
||||
section or contained within it.
|
||||
|
||||
mtpt=mountpoint
|
||||
Use with the "dmapi" option. The value specified here will be
|
||||
included in the DMAPI mount event, and should be the path of
|
||||
the actual mountpoint that is used.
|
||||
|
||||
noalign
|
||||
Data allocations will not be aligned at stripe unit boundaries.
|
||||
|
||||
@@ -91,13 +143,17 @@ When mounting an XFS filesystem, the following options are accepted.
|
||||
O_SYNC writes can be lost if the system crashes.
|
||||
If timestamp updates are critical, use the osyncisosync option.
|
||||
|
||||
quota/usrquota/uqnoenforce
|
||||
uquota/usrquota/uqnoenforce/quota
|
||||
User disk quota accounting enabled, and limits (optionally)
|
||||
enforced.
|
||||
enforced. Refer to xfs_quota(8) for further details.
|
||||
|
||||
grpquota/gqnoenforce
|
||||
gquota/grpquota/gqnoenforce
|
||||
Group disk quota accounting enabled and limits (optionally)
|
||||
enforced.
|
||||
enforced. Refer to xfs_quota(8) for further details.
|
||||
|
||||
pquota/prjquota/pqnoenforce
|
||||
Project disk quota accounting enabled and limits (optionally)
|
||||
enforced. Refer to xfs_quota(8) for further details.
|
||||
|
||||
sunit=value and swidth=value
|
||||
Used to specify the stripe unit and width for a RAID device or
|
||||
@@ -113,15 +169,21 @@ When mounting an XFS filesystem, the following options are accepted.
|
||||
The "swidth" option is required if the "sunit" option has been
|
||||
specified, and must be a multiple of the "sunit" value.
|
||||
|
||||
swalloc
|
||||
Data allocations will be rounded up to stripe width boundaries
|
||||
when the current end of file is being extended and the file
|
||||
size is larger than the stripe width size.
|
||||
|
||||
|
||||
sysctls
|
||||
=======
|
||||
|
||||
The following sysctls are available for the XFS filesystem:
|
||||
|
||||
fs.xfs.stats_clear (Min: 0 Default: 0 Max: 1)
|
||||
Setting this to "1" clears accumulated XFS statistics
|
||||
Setting this to "1" clears accumulated XFS statistics
|
||||
in /proc/fs/xfs/stat. It then immediately resets to "0".
|
||||
|
||||
|
||||
fs.xfs.xfssyncd_centisecs (Min: 100 Default: 3000 Max: 720000)
|
||||
The interval at which the xfssyncd thread flushes metadata
|
||||
out to disk. This thread will flush log activity out, and
|
||||
@@ -143,9 +205,9 @@ The following sysctls are available for the XFS filesystem:
|
||||
XFS_ERRLEVEL_HIGH: 5
|
||||
|
||||
fs.xfs.panic_mask (Min: 0 Default: 0 Max: 127)
|
||||
Causes certain error conditions to call BUG(). Value is a bitmask;
|
||||
Causes certain error conditions to call BUG(). Value is a bitmask;
|
||||
AND together the tags which represent errors which should cause panics:
|
||||
|
||||
|
||||
XFS_NO_PTAG 0
|
||||
XFS_PTAG_IFLUSH 0x00000001
|
||||
XFS_PTAG_LOGRES 0x00000002
|
||||
@@ -155,7 +217,7 @@ The following sysctls are available for the XFS filesystem:
|
||||
XFS_PTAG_SHUTDOWN_IOERROR 0x00000020
|
||||
XFS_PTAG_SHUTDOWN_LOGERROR 0x00000040
|
||||
|
||||
This option is intended for debugging only.
|
||||
This option is intended for debugging only.
|
||||
|
||||
fs.xfs.irix_symlink_mode (Min: 0 Default: 0 Max: 1)
|
||||
Controls whether symlinks are created with mode 0777 (default)
|
||||
@@ -164,25 +226,37 @@ The following sysctls are available for the XFS filesystem:
|
||||
fs.xfs.irix_sgid_inherit (Min: 0 Default: 0 Max: 1)
|
||||
Controls files created in SGID directories.
|
||||
If the group ID of the new file does not match the effective group
|
||||
ID or one of the supplementary group IDs of the parent dir, the
|
||||
ISGID bit is cleared if the irix_sgid_inherit compatibility sysctl
|
||||
ID or one of the supplementary group IDs of the parent dir, the
|
||||
ISGID bit is cleared if the irix_sgid_inherit compatibility sysctl
|
||||
is set.
|
||||
|
||||
fs.xfs.restrict_chown (Min: 0 Default: 1 Max: 1)
|
||||
Controls whether unprivileged users can use chown to "give away"
|
||||
a file to another user.
|
||||
|
||||
fs.xfs.inherit_sync (Min: 0 Default: 1 Max 1)
|
||||
Setting this to "1" will cause the "sync" flag set
|
||||
by the chattr(1) command on a directory to be
|
||||
fs.xfs.inherit_sync (Min: 0 Default: 1 Max: 1)
|
||||
Setting this to "1" will cause the "sync" flag set
|
||||
by the xfs_io(8) chattr command on a directory to be
|
||||
inherited by files in that directory.
|
||||
|
||||
fs.xfs.inherit_nodump (Min: 0 Default: 1 Max 1)
|
||||
Setting this to "1" will cause the "nodump" flag set
|
||||
by the chattr(1) command on a directory to be
|
||||
fs.xfs.inherit_nodump (Min: 0 Default: 1 Max: 1)
|
||||
Setting this to "1" will cause the "nodump" flag set
|
||||
by the xfs_io(8) chattr command on a directory to be
|
||||
inherited by files in that directory.
|
||||
|
||||
fs.xfs.inherit_noatime (Min: 0 Default: 1 Max 1)
|
||||
Setting this to "1" will cause the "noatime" flag set
|
||||
by the chattr(1) command on a directory to be
|
||||
fs.xfs.inherit_noatime (Min: 0 Default: 1 Max: 1)
|
||||
Setting this to "1" will cause the "noatime" flag set
|
||||
by the xfs_io(8) chattr command on a directory to be
|
||||
inherited by files in that directory.
|
||||
|
||||
fs.xfs.inherit_nosymlinks (Min: 0 Default: 1 Max: 1)
|
||||
Setting this to "1" will cause the "nosymlinks" flag set
|
||||
by the xfs_io(8) chattr command on a directory to be
|
||||
inherited by files in that directory.
|
||||
|
||||
fs.xfs.rotorstep (Min: 1 Default: 1 Max: 256)
|
||||
In "inode32" allocation mode, this option determines how many
|
||||
files the allocator attempts to allocate in the same allocation
|
||||
group before moving to the next allocation group. The intent
|
||||
is to control the rate at which the allocator moves between
|
||||
allocation groups when allocating extents for new files.
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/string.h>
|
||||
|
||||
#include "linux/firmware.h"
|
||||
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/timer.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/firmware.h>
|
||||
|
||||
|
||||
|
||||
@@ -273,6 +273,7 @@ For now, you can ignore the `flags' parameter. It is there for future use.
|
||||
if (is_isa) {
|
||||
|
||||
/* Discard immediately if this ISA range is already used */
|
||||
/* FIXME: never use check_region(), only request_region() */
|
||||
if (check_region(address,FOO_EXTENT))
|
||||
goto ERROR0;
|
||||
|
||||
|
||||
+13
-9
@@ -196,7 +196,7 @@ KEY ACCESS PERMISSIONS
|
||||
|
||||
Keys have an owner user ID, a group access ID, and a permissions mask. The mask
|
||||
has up to eight bits each for possessor, user, group and other access. Only
|
||||
five of each set of eight bits are defined. These permissions granted are:
|
||||
six of each set of eight bits are defined. These permissions granted are:
|
||||
|
||||
(*) View
|
||||
|
||||
@@ -224,6 +224,10 @@ five of each set of eight bits are defined. These permissions granted are:
|
||||
keyring to a key, a process must have Write permission on the keyring and
|
||||
Link permission on the key.
|
||||
|
||||
(*) Set Attribute
|
||||
|
||||
This permits a key's UID, GID and permissions mask to be changed.
|
||||
|
||||
For changing the ownership, group ID or permissions mask, being the owner of
|
||||
the key or having the sysadmin capability is sufficient.
|
||||
|
||||
@@ -242,15 +246,15 @@ about the status of the key service:
|
||||
this way:
|
||||
|
||||
SERIAL FLAGS USAGE EXPY PERM UID GID TYPE DESCRIPTION: SUMMARY
|
||||
00000001 I----- 39 perm 1f1f0000 0 0 keyring _uid_ses.0: 1/4
|
||||
00000002 I----- 2 perm 1f1f0000 0 0 keyring _uid.0: empty
|
||||
00000007 I----- 1 perm 1f1f0000 0 0 keyring _pid.1: empty
|
||||
0000018d I----- 1 perm 1f1f0000 0 0 keyring _pid.412: empty
|
||||
000004d2 I--Q-- 1 perm 1f1f0000 32 -1 keyring _uid.32: 1/4
|
||||
000004d3 I--Q-- 3 perm 1f1f0000 32 -1 keyring _uid_ses.32: empty
|
||||
00000001 I----- 39 perm 1f3f0000 0 0 keyring _uid_ses.0: 1/4
|
||||
00000002 I----- 2 perm 1f3f0000 0 0 keyring _uid.0: empty
|
||||
00000007 I----- 1 perm 1f3f0000 0 0 keyring _pid.1: empty
|
||||
0000018d I----- 1 perm 1f3f0000 0 0 keyring _pid.412: empty
|
||||
000004d2 I--Q-- 1 perm 1f3f0000 32 -1 keyring _uid.32: 1/4
|
||||
000004d3 I--Q-- 3 perm 1f3f0000 32 -1 keyring _uid_ses.32: empty
|
||||
00000892 I--QU- 1 perm 1f000000 0 0 user metal:copper: 0
|
||||
00000893 I--Q-N 1 35s 1f1f0000 0 0 user metal:silver: 0
|
||||
00000894 I--Q-- 1 10h 001f0000 0 0 user metal:gold: 0
|
||||
00000893 I--Q-N 1 35s 1f3f0000 0 0 user metal:silver: 0
|
||||
00000894 I--Q-- 1 10h 003f0000 0 0 user metal:gold: 0
|
||||
|
||||
The flags are:
|
||||
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
Copyright (c) 2003-2005 QLogic Corporation
|
||||
QLogic Linux Fibre Channel HBA Driver
|
||||
|
||||
This program includes a device driver for Linux 2.6 that may be
|
||||
distributed with QLogic hardware specific firmware binary file.
|
||||
You may modify and redistribute the device driver code under the
|
||||
GNU General Public License as published by the Free Software
|
||||
Foundation (version 2 or a later version).
|
||||
|
||||
You may redistribute the hardware specific firmware binary file
|
||||
under the following terms:
|
||||
|
||||
1. Redistribution of source code (only if applicable),
|
||||
must retain the above copyright notice, this list of
|
||||
conditions and the following disclaimer.
|
||||
|
||||
2. Redistribution in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the
|
||||
following disclaimer in the documentation and/or other
|
||||
materials provided with the distribution.
|
||||
|
||||
3. The name of QLogic Corporation may not be used to
|
||||
endorse or promote products derived from this software
|
||||
without specific prior written permission
|
||||
|
||||
REGARDLESS OF WHAT LICENSING MECHANISM IS USED OR APPLICABLE,
|
||||
THIS PROGRAM IS PROVIDED BY QLOGIC CORPORATION "AS IS'' AND ANY
|
||||
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR
|
||||
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
||||
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
USER ACKNOWLEDGES AND AGREES THAT USE OF THIS PROGRAM WILL NOT
|
||||
CREATE OR GIVE GROUNDS FOR A LICENSE BY IMPLICATION, ESTOPPEL, OR
|
||||
OTHERWISE IN ANY INTELLECTUAL PROPERTY RIGHTS (PATENT, COPYRIGHT,
|
||||
TRADE SECRET, MASK WORK, OR OTHER PROPRIETARY RIGHT) EMBODIED IN
|
||||
ANY OTHER QLOGIC HARDWARE OR SOFTWARE EITHER SOLELY OR IN
|
||||
COMBINATION WITH THIS PROGRAM.
|
||||
@@ -116,12 +116,15 @@ hardware.
|
||||
line becoming inactive or the tty layer indicating we want
|
||||
to stop transmission due to an XOFF character.
|
||||
|
||||
The driver should stop transmitting characters as soon as
|
||||
possible.
|
||||
|
||||
Locking: port->lock taken.
|
||||
Interrupts: locally disabled.
|
||||
This call must not sleep
|
||||
|
||||
start_tx(port)
|
||||
start transmitting characters.
|
||||
Start transmitting characters.
|
||||
|
||||
Locking: port->lock taken.
|
||||
Interrupts: locally disabled.
|
||||
@@ -281,26 +284,31 @@ hardware.
|
||||
Other functions
|
||||
---------------
|
||||
|
||||
uart_update_timeout(port,cflag,quot)
|
||||
uart_update_timeout(port,cflag,baud)
|
||||
Update the FIFO drain timeout, port->timeout, according to the
|
||||
number of bits, parity, stop bits and quotient.
|
||||
number of bits, parity, stop bits and baud rate.
|
||||
|
||||
Locking: caller is expected to take port->lock
|
||||
Interrupts: n/a
|
||||
|
||||
uart_get_baud_rate(port,termios)
|
||||
uart_get_baud_rate(port,termios,old,min,max)
|
||||
Return the numeric baud rate for the specified termios, taking
|
||||
account of the special 38400 baud "kludge". The B0 baud rate
|
||||
is mapped to 9600 baud.
|
||||
|
||||
If the baud rate is not within min..max, then if old is non-NULL,
|
||||
the original baud rate will be tried. If that exceeds the
|
||||
min..max constraint, 9600 baud will be returned. termios will
|
||||
be updated to the baud rate in use.
|
||||
|
||||
Note: min..max must always allow 9600 baud to be selected.
|
||||
|
||||
Locking: caller dependent.
|
||||
Interrupts: n/a
|
||||
|
||||
uart_get_divisor(port,termios,oldtermios)
|
||||
Return the divsor (baud_base / baud) for the selected baud rate
|
||||
specified by termios. If the baud rate is out of range, try
|
||||
the original baud rate specified by oldtermios (if non-NULL).
|
||||
If that fails, try 9600 baud.
|
||||
uart_get_divisor(port,baud)
|
||||
Return the divsor (baud_base / baud) for the specified baud
|
||||
rate, appropriately rounded.
|
||||
|
||||
If 38400 baud and custom divisor is selected, return the
|
||||
custom divisor instead.
|
||||
@@ -308,6 +316,46 @@ uart_get_divisor(port,termios,oldtermios)
|
||||
Locking: caller dependent.
|
||||
Interrupts: n/a
|
||||
|
||||
uart_match_port(port1,port2)
|
||||
This utility function can be used to determine whether two
|
||||
uart_port structures describe the same port.
|
||||
|
||||
Locking: n/a
|
||||
Interrupts: n/a
|
||||
|
||||
uart_write_wakeup(port)
|
||||
A driver is expected to call this function when the number of
|
||||
characters in the transmit buffer have dropped below a threshold.
|
||||
|
||||
Locking: port->lock should be held.
|
||||
Interrupts: n/a
|
||||
|
||||
uart_register_driver(drv)
|
||||
Register a uart driver with the core driver. We in turn register
|
||||
with the tty layer, and initialise the core driver per-port state.
|
||||
|
||||
drv->port should be NULL, and the per-port structures should be
|
||||
registered using uart_add_one_port after this call has succeeded.
|
||||
|
||||
Locking: none
|
||||
Interrupts: enabled
|
||||
|
||||
uart_unregister_driver()
|
||||
Remove all references to a driver from the core driver. The low
|
||||
level driver must have removed all its ports via the
|
||||
uart_remove_one_port() if it registered them with uart_add_one_port().
|
||||
|
||||
Locking: none
|
||||
Interrupts: enabled
|
||||
|
||||
uart_suspend_port()
|
||||
|
||||
uart_resume_port()
|
||||
|
||||
uart_add_one_port()
|
||||
|
||||
uart_remove_one_port()
|
||||
|
||||
Other notes
|
||||
-----------
|
||||
|
||||
|
||||
@@ -2295,6 +2295,11 @@ W: http://tpmdd.sourceforge.net
|
||||
L: tpmdd-devel@lists.sourceforge.net
|
||||
S: Maintained
|
||||
|
||||
Telecom Clock Driver for MCPL0010
|
||||
P: Mark Gross
|
||||
M: mark.gross@intel.com
|
||||
S: Supported
|
||||
|
||||
TENSILICA XTENSA PORT (xtensa):
|
||||
P: Chris Zankel
|
||||
M: chris@zankel.net
|
||||
|
||||
@@ -54,6 +54,10 @@ INSTALLING the kernel:
|
||||
|
||||
gzip -cd linux-2.6.XX.tar.gz | tar xvf -
|
||||
|
||||
or
|
||||
bzip2 -dc linux-2.6.XX.tar.bz2 | tar xvf -
|
||||
|
||||
|
||||
Replace "XX" with the version number of the latest kernel.
|
||||
|
||||
Do NOT use the /usr/src/linux area! This area has a (usually
|
||||
|
||||
@@ -55,10 +55,6 @@
|
||||
#include "proto.h"
|
||||
#include "irq_impl.h"
|
||||
|
||||
u64 jiffies_64 = INITIAL_JIFFIES;
|
||||
|
||||
EXPORT_SYMBOL(jiffies_64);
|
||||
|
||||
extern unsigned long wall_jiffies; /* kernel/timer.c */
|
||||
|
||||
static int set_rtc_mmss(unsigned long);
|
||||
|
||||
+17
-2
@@ -194,6 +194,13 @@ config ARCH_VERSATILE
|
||||
help
|
||||
This enables support for ARM Ltd Versatile board.
|
||||
|
||||
config ARCH_REALVIEW
|
||||
bool "RealView"
|
||||
select ARM_AMBA
|
||||
select ICST307
|
||||
help
|
||||
This enables support for ARM Ltd RealView boards.
|
||||
|
||||
config ARCH_IMX
|
||||
bool "IMX"
|
||||
|
||||
@@ -244,6 +251,8 @@ source "arch/arm/mach-versatile/Kconfig"
|
||||
|
||||
source "arch/arm/mach-aaec2000/Kconfig"
|
||||
|
||||
source "arch/arm/mach-realview/Kconfig"
|
||||
|
||||
# Definitions to make life easier
|
||||
config ARCH_ACORN
|
||||
bool
|
||||
@@ -340,6 +349,13 @@ config NR_CPUS
|
||||
depends on SMP
|
||||
default "4"
|
||||
|
||||
config HOTPLUG_CPU
|
||||
bool "Support for hot-pluggable CPUs (EXPERIMENTAL)"
|
||||
depends on SMP && HOTPLUG && EXPERIMENTAL
|
||||
help
|
||||
Say Y here to experiment with turning CPUs off and on. CPUs
|
||||
can be controlled through /sys/devices/system/cpu.
|
||||
|
||||
config PREEMPT
|
||||
bool "Preemptible Kernel (EXPERIMENTAL)"
|
||||
depends on EXPERIMENTAL
|
||||
@@ -688,8 +704,7 @@ source "drivers/acorn/block/Kconfig"
|
||||
|
||||
if PCMCIA || ARCH_CLPS7500 || ARCH_IOP3XX || ARCH_IXP4XX \
|
||||
|| ARCH_L7200 || ARCH_LH7A40X || ARCH_PXA || ARCH_RPC \
|
||||
|| ARCH_S3C2410 || ARCH_SA1100 || ARCH_SHARK || FOOTBRIDGE \
|
||||
|| MACH_MP1000
|
||||
|| ARCH_S3C2410 || ARCH_SA1100 || ARCH_SHARK || FOOTBRIDGE
|
||||
source "drivers/ide/Kconfig"
|
||||
endif
|
||||
|
||||
|
||||
+3
-1
@@ -38,6 +38,7 @@ comma = ,
|
||||
# macro, but instead defines a whole series of macros which makes
|
||||
# testing for a specific architecture or later rather impossible.
|
||||
arch-$(CONFIG_CPU_32v6) :=-D__LINUX_ARM_ARCH__=6 $(call cc-option,-march=armv6,-march=armv5t -Wa$(comma)-march=armv6)
|
||||
arch-$(CONFIG_CPU_32v6K) :=-D__LINUX_ARM_ARCH__=6 $(call cc-option,-march=armv6k,-march=armv5t -Wa$(comma)-march=armv6k)
|
||||
arch-$(CONFIG_CPU_32v5) :=-D__LINUX_ARM_ARCH__=5 $(call cc-option,-march=armv5te,-march=armv4)
|
||||
arch-$(CONFIG_CPU_32v4) :=-D__LINUX_ARM_ARCH__=4 -march=armv4
|
||||
arch-$(CONFIG_CPU_32v3) :=-D__LINUX_ARM_ARCH__=3 -march=armv3
|
||||
@@ -99,6 +100,7 @@ textaddr-$(CONFIG_ARCH_FORTUNET) := 0xc0008000
|
||||
machine-$(CONFIG_ARCH_IMX) := imx
|
||||
machine-$(CONFIG_ARCH_H720X) := h720x
|
||||
machine-$(CONFIG_ARCH_AAEC2000) := aaec2000
|
||||
machine-$(CONFIG_ARCH_REALVIEW) := realview
|
||||
|
||||
ifeq ($(CONFIG_ARCH_EBSA110),y)
|
||||
# This is what happens if you forget the IOCS16 line.
|
||||
@@ -142,7 +144,7 @@ drivers-$(CONFIG_OPROFILE) += arch/arm/oprofile/
|
||||
drivers-$(CONFIG_ARCH_CLPS7500) += drivers/acorn/char/
|
||||
drivers-$(CONFIG_ARCH_L7200) += drivers/acorn/char/
|
||||
|
||||
libs-y += arch/arm/lib/
|
||||
libs-y := arch/arm/lib/ $(libs-y)
|
||||
|
||||
# Default target when executing plain make
|
||||
ifeq ($(CONFIG_XIP_KERNEL),y)
|
||||
|
||||
@@ -39,8 +39,7 @@
|
||||
defined(CONFIG_ARCH_IXP4XX) || \
|
||||
defined(CONFIG_ARCH_IXP2000) || \
|
||||
defined(CONFIG_ARCH_LH7A40X) || \
|
||||
defined(CONFIG_ARCH_OMAP) || \
|
||||
defined(CONFIG_MACH_MP1000)
|
||||
defined(CONFIG_ARCH_OMAP)
|
||||
.macro loadsp, rb
|
||||
addruart \rb
|
||||
.endm
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
#include <asm/io.h>
|
||||
#include <asm/irq.h>
|
||||
|
||||
+86
-79
@@ -33,8 +33,8 @@
|
||||
#include <asm/cacheflush.h>
|
||||
|
||||
#undef DEBUG
|
||||
|
||||
#undef STATS
|
||||
|
||||
#ifdef STATS
|
||||
#define DO_STATS(X) do { X ; } while (0)
|
||||
#else
|
||||
@@ -52,26 +52,31 @@ struct safe_buffer {
|
||||
int direction;
|
||||
|
||||
/* safe buffer info */
|
||||
struct dma_pool *pool;
|
||||
struct dmabounce_pool *pool;
|
||||
void *safe;
|
||||
dma_addr_t safe_dma_addr;
|
||||
};
|
||||
|
||||
struct dmabounce_pool {
|
||||
unsigned long size;
|
||||
struct dma_pool *pool;
|
||||
#ifdef STATS
|
||||
unsigned long allocs;
|
||||
#endif
|
||||
};
|
||||
|
||||
struct dmabounce_device_info {
|
||||
struct list_head node;
|
||||
|
||||
struct device *dev;
|
||||
struct dma_pool *small_buffer_pool;
|
||||
struct dma_pool *large_buffer_pool;
|
||||
struct list_head safe_buffers;
|
||||
unsigned long small_buffer_size, large_buffer_size;
|
||||
#ifdef STATS
|
||||
unsigned long sbp_allocs;
|
||||
unsigned long lbp_allocs;
|
||||
unsigned long total_allocs;
|
||||
unsigned long map_op_count;
|
||||
unsigned long bounce_count;
|
||||
#endif
|
||||
struct dmabounce_pool small;
|
||||
struct dmabounce_pool large;
|
||||
};
|
||||
|
||||
static LIST_HEAD(dmabounce_devs);
|
||||
@@ -82,9 +87,9 @@ static void print_alloc_stats(struct dmabounce_device_info *device_info)
|
||||
printk(KERN_INFO
|
||||
"%s: dmabounce: sbp: %lu, lbp: %lu, other: %lu, total: %lu\n",
|
||||
device_info->dev->bus_id,
|
||||
device_info->sbp_allocs, device_info->lbp_allocs,
|
||||
device_info->total_allocs - device_info->sbp_allocs -
|
||||
device_info->lbp_allocs,
|
||||
device_info->small.allocs, device_info->large.allocs,
|
||||
device_info->total_allocs - device_info->small.allocs -
|
||||
device_info->large.allocs,
|
||||
device_info->total_allocs);
|
||||
}
|
||||
#endif
|
||||
@@ -106,18 +111,22 @@ find_dmabounce_dev(struct device *dev)
|
||||
/* allocate a 'safe' buffer and keep track of it */
|
||||
static inline struct safe_buffer *
|
||||
alloc_safe_buffer(struct dmabounce_device_info *device_info, void *ptr,
|
||||
size_t size, enum dma_data_direction dir)
|
||||
size_t size, enum dma_data_direction dir)
|
||||
{
|
||||
struct safe_buffer *buf;
|
||||
struct dma_pool *pool;
|
||||
struct dmabounce_pool *pool;
|
||||
struct device *dev = device_info->dev;
|
||||
void *safe;
|
||||
dma_addr_t safe_dma_addr;
|
||||
|
||||
dev_dbg(dev, "%s(ptr=%p, size=%d, dir=%d)\n",
|
||||
__func__, ptr, size, dir);
|
||||
|
||||
DO_STATS ( device_info->total_allocs++ );
|
||||
if (size <= device_info->small.size) {
|
||||
pool = &device_info->small;
|
||||
} else if (size <= device_info->large.size) {
|
||||
pool = &device_info->large;
|
||||
} else {
|
||||
pool = NULL;
|
||||
}
|
||||
|
||||
buf = kmalloc(sizeof(struct safe_buffer), GFP_ATOMIC);
|
||||
if (buf == NULL) {
|
||||
@@ -125,41 +134,35 @@ alloc_safe_buffer(struct dmabounce_device_info *device_info, void *ptr,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (size <= device_info->small_buffer_size) {
|
||||
pool = device_info->small_buffer_pool;
|
||||
safe = dma_pool_alloc(pool, GFP_ATOMIC, &safe_dma_addr);
|
||||
buf->ptr = ptr;
|
||||
buf->size = size;
|
||||
buf->direction = dir;
|
||||
buf->pool = pool;
|
||||
|
||||
DO_STATS ( device_info->sbp_allocs++ );
|
||||
} else if (size <= device_info->large_buffer_size) {
|
||||
pool = device_info->large_buffer_pool;
|
||||
safe = dma_pool_alloc(pool, GFP_ATOMIC, &safe_dma_addr);
|
||||
|
||||
DO_STATS ( device_info->lbp_allocs++ );
|
||||
if (pool) {
|
||||
buf->safe = dma_pool_alloc(pool->pool, GFP_ATOMIC,
|
||||
&buf->safe_dma_addr);
|
||||
} else {
|
||||
pool = NULL;
|
||||
safe = dma_alloc_coherent(dev, size, &safe_dma_addr, GFP_ATOMIC);
|
||||
buf->safe = dma_alloc_coherent(dev, size, &buf->safe_dma_addr,
|
||||
GFP_ATOMIC);
|
||||
}
|
||||
|
||||
if (safe == NULL) {
|
||||
dev_warn(device_info->dev,
|
||||
"%s: could not alloc dma memory (size=%d)\n",
|
||||
__func__, size);
|
||||
if (buf->safe == NULL) {
|
||||
dev_warn(dev,
|
||||
"%s: could not alloc dma memory (size=%d)\n",
|
||||
__func__, size);
|
||||
kfree(buf);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifdef STATS
|
||||
if (pool)
|
||||
pool->allocs++;
|
||||
device_info->total_allocs++;
|
||||
if (device_info->total_allocs % 1000 == 0)
|
||||
print_alloc_stats(device_info);
|
||||
#endif
|
||||
|
||||
buf->ptr = ptr;
|
||||
buf->size = size;
|
||||
buf->direction = dir;
|
||||
buf->pool = pool;
|
||||
buf->safe = safe;
|
||||
buf->safe_dma_addr = safe_dma_addr;
|
||||
|
||||
list_add(&buf->node, &device_info->safe_buffers);
|
||||
|
||||
return buf;
|
||||
@@ -186,7 +189,7 @@ free_safe_buffer(struct dmabounce_device_info *device_info, struct safe_buffer *
|
||||
list_del(&buf->node);
|
||||
|
||||
if (buf->pool)
|
||||
dma_pool_free(buf->pool, buf->safe, buf->safe_dma_addr);
|
||||
dma_pool_free(buf->pool->pool, buf->safe, buf->safe_dma_addr);
|
||||
else
|
||||
dma_free_coherent(device_info->dev, buf->size, buf->safe,
|
||||
buf->safe_dma_addr);
|
||||
@@ -197,12 +200,10 @@ free_safe_buffer(struct dmabounce_device_info *device_info, struct safe_buffer *
|
||||
/* ************************************************** */
|
||||
|
||||
#ifdef STATS
|
||||
|
||||
static void print_map_stats(struct dmabounce_device_info *device_info)
|
||||
{
|
||||
printk(KERN_INFO
|
||||
"%s: dmabounce: map_op_count=%lu, bounce_count=%lu\n",
|
||||
device_info->dev->bus_id,
|
||||
dev_info(device_info->dev,
|
||||
"dmabounce: map_op_count=%lu, bounce_count=%lu\n",
|
||||
device_info->map_op_count, device_info->bounce_count);
|
||||
}
|
||||
#endif
|
||||
@@ -258,13 +259,13 @@ map_single(struct device *dev, void *ptr, size_t size,
|
||||
__func__, ptr, buf->safe, size);
|
||||
memcpy(buf->safe, ptr, size);
|
||||
}
|
||||
consistent_sync(buf->safe, size, dir);
|
||||
ptr = buf->safe;
|
||||
|
||||
dma_addr = buf->safe_dma_addr;
|
||||
} else {
|
||||
consistent_sync(ptr, size, dir);
|
||||
}
|
||||
|
||||
consistent_sync(ptr, size, dir);
|
||||
|
||||
return dma_addr;
|
||||
}
|
||||
|
||||
@@ -278,7 +279,7 @@ unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
|
||||
/*
|
||||
* Trying to unmap an invalid mapping
|
||||
*/
|
||||
if (dma_addr == ~0) {
|
||||
if (dma_mapping_error(dma_addr)) {
|
||||
dev_err(dev, "Trying to unmap invalid mapping\n");
|
||||
return;
|
||||
}
|
||||
@@ -570,11 +571,25 @@ dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nents,
|
||||
local_irq_restore(flags);
|
||||
}
|
||||
|
||||
static int
|
||||
dmabounce_init_pool(struct dmabounce_pool *pool, struct device *dev, const char *name,
|
||||
unsigned long size)
|
||||
{
|
||||
pool->size = size;
|
||||
DO_STATS(pool->allocs = 0);
|
||||
pool->pool = dma_pool_create(name, dev, size,
|
||||
0 /* byte alignment */,
|
||||
0 /* no page-crossing issues */);
|
||||
|
||||
return pool->pool ? 0 : -ENOMEM;
|
||||
}
|
||||
|
||||
int
|
||||
dmabounce_register_dev(struct device *dev, unsigned long small_buffer_size,
|
||||
unsigned long large_buffer_size)
|
||||
{
|
||||
struct dmabounce_device_info *device_info;
|
||||
int ret;
|
||||
|
||||
device_info = kmalloc(sizeof(struct dmabounce_device_info), GFP_ATOMIC);
|
||||
if (!device_info) {
|
||||
@@ -584,45 +599,31 @@ dmabounce_register_dev(struct device *dev, unsigned long small_buffer_size,
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
device_info->small_buffer_pool =
|
||||
dma_pool_create("small_dmabounce_pool",
|
||||
dev,
|
||||
small_buffer_size,
|
||||
0 /* byte alignment */,
|
||||
0 /* no page-crossing issues */);
|
||||
if (!device_info->small_buffer_pool) {
|
||||
printk(KERN_ERR
|
||||
"dmabounce: could not allocate small DMA pool for %s\n",
|
||||
dev->bus_id);
|
||||
kfree(device_info);
|
||||
return -ENOMEM;
|
||||
ret = dmabounce_init_pool(&device_info->small, dev,
|
||||
"small_dmabounce_pool", small_buffer_size);
|
||||
if (ret) {
|
||||
dev_err(dev,
|
||||
"dmabounce: could not allocate DMA pool for %ld byte objects\n",
|
||||
small_buffer_size);
|
||||
goto err_free;
|
||||
}
|
||||
|
||||
if (large_buffer_size) {
|
||||
device_info->large_buffer_pool =
|
||||
dma_pool_create("large_dmabounce_pool",
|
||||
dev,
|
||||
large_buffer_size,
|
||||
0 /* byte alignment */,
|
||||
0 /* no page-crossing issues */);
|
||||
if (!device_info->large_buffer_pool) {
|
||||
printk(KERN_ERR
|
||||
"dmabounce: could not allocate large DMA pool for %s\n",
|
||||
dev->bus_id);
|
||||
dma_pool_destroy(device_info->small_buffer_pool);
|
||||
|
||||
return -ENOMEM;
|
||||
ret = dmabounce_init_pool(&device_info->large, dev,
|
||||
"large_dmabounce_pool",
|
||||
large_buffer_size);
|
||||
if (ret) {
|
||||
dev_err(dev,
|
||||
"dmabounce: could not allocate DMA pool for %ld byte objects\n",
|
||||
large_buffer_size);
|
||||
goto err_destroy;
|
||||
}
|
||||
}
|
||||
|
||||
device_info->dev = dev;
|
||||
device_info->small_buffer_size = small_buffer_size;
|
||||
device_info->large_buffer_size = large_buffer_size;
|
||||
INIT_LIST_HEAD(&device_info->safe_buffers);
|
||||
|
||||
#ifdef STATS
|
||||
device_info->sbp_allocs = 0;
|
||||
device_info->lbp_allocs = 0;
|
||||
device_info->total_allocs = 0;
|
||||
device_info->map_op_count = 0;
|
||||
device_info->bounce_count = 0;
|
||||
@@ -634,6 +635,12 @@ dmabounce_register_dev(struct device *dev, unsigned long small_buffer_size,
|
||||
dev->bus_id, dev->bus->name);
|
||||
|
||||
return 0;
|
||||
|
||||
err_destroy:
|
||||
dma_pool_destroy(device_info->small.pool);
|
||||
err_free:
|
||||
kfree(device_info);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -655,10 +662,10 @@ dmabounce_unregister_dev(struct device *dev)
|
||||
BUG();
|
||||
}
|
||||
|
||||
if (device_info->small_buffer_pool)
|
||||
dma_pool_destroy(device_info->small_buffer_pool);
|
||||
if (device_info->large_buffer_pool)
|
||||
dma_pool_destroy(device_info->large_buffer_pool);
|
||||
if (device_info->small.pool)
|
||||
dma_pool_destroy(device_info->small.pool);
|
||||
if (device_info->large.pool)
|
||||
dma_pool_destroy(device_info->large.pool);
|
||||
|
||||
#ifdef STATS
|
||||
print_alloc_stats(device_info);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user