aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-01-23 22:11:50 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-01-23 22:11:50 -0500
commit3aacd625f20129f5a41ea3ff3b5353b0e4dabd01 (patch)
tree7cf4ea65397f80098b30494df31cfc8f5fa26d63 /Documentation
parent7e21774db5cc9cf8fe93a64a2f0c6cf47db8ab24 (diff)
parent2a1d689c9ba42a6066540fb221b6ecbd6298b728 (diff)
Merge branch 'akpm' (incoming from Andrew)
Merge second patch-bomb from Andrew Morton: - various misc bits - the rest of MM - add generic fixmap.h, use it - backlight updates - dynamic_debug updates - printk() updates - checkpatch updates - binfmt_elf - ramfs - init/ - autofs4 - drivers/rtc - nilfs - hfsplus - Documentation/ - coredump - procfs - fork - exec - kexec - kdump - partitions - rapidio - rbtree - userns - memstick - w1 - decompressors * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (197 commits) lib/decompress_unlz4.c: always set an error return code on failures romfs: fix returm err while getting inode in fill_super drivers/w1/masters/w1-gpio.c: add strong pullup emulation drivers/memstick/host/rtsx_pci_ms.c: fix ms card data transfer bug userns: relax the posix_acl_valid() checks arch/sh/kernel/dwarf.c: use rbtree postorder iteration helper instead of solution using repeated rb_erase() fs-ext3-use-rbtree-postorder-iteration-helper-instead-of-opencoding-fix fs/ext3: use rbtree postorder iteration helper instead of opencoding fs/jffs2: use rbtree postorder iteration helper instead of opencoding fs/ext4: use rbtree postorder iteration helper instead of opencoding fs/ubifs: use rbtree postorder iteration helper instead of opencoding net/netfilter/ipset/ip_set_hash_netiface.c: use rbtree postorder iteration instead of opencoding rbtree/test: test rbtree_postorder_for_each_entry_safe() rbtree/test: move rb_node to the middle of the test struct rapidio: add modular rapidio core build into powerpc and mips branches partitions/efi: complete documentation of gpt kernel param purpose kdump: add /sys/kernel/vmcoreinfo ABI documentation kdump: fix exported size of vmcoreinfo note kexec: add sysctl to disable kexec_load fs/exec.c: call arch_pick_mmap_layout() only once ...
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/ABI/testing/sysfs-kernel-vmcoreinfo14
-rw-r--r--Documentation/blockdev/ramdisk.txt21
-rw-r--r--Documentation/cpu-hotplug.txt2
-rw-r--r--Documentation/devicetree/bindings/rtc/haoyu,hym8563.txt27
-rw-r--r--Documentation/devicetree/bindings/rtc/maxim,ds1742.txt12
-rw-r--r--Documentation/devicetree/bindings/vendor-prefixes.txt1
-rw-r--r--Documentation/dynamic-debug-howto.txt9
-rw-r--r--Documentation/filesystems/00-INDEX58
-rw-r--r--Documentation/filesystems/nilfs2.txt56
-rw-r--r--Documentation/filesystems/sysfs.txt6
-rw-r--r--Documentation/kernel-parameters.txt11
-rw-r--r--Documentation/printk-formats.txt11
-rw-r--r--Documentation/sysctl/kernel.txt15
-rw-r--r--Documentation/trace/postprocess/trace-vmscan-postprocess.pl18
-rw-r--r--Documentation/vm/locking130
15 files changed, 225 insertions, 166 deletions
diff --git a/Documentation/ABI/testing/sysfs-kernel-vmcoreinfo b/Documentation/ABI/testing/sysfs-kernel-vmcoreinfo
new file mode 100644
index 000000000000..7bd81168e063
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-kernel-vmcoreinfo
@@ -0,0 +1,14 @@
1What: /sys/kernel/vmcoreinfo
2Date: October 2007
3KernelVersion: 2.6.24
4Contact: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
5 Kexec Mailing List <kexec@lists.infradead.org>
6 Vivek Goyal <vgoyal@redhat.com>
7Description
8 Shows physical address and size of vmcoreinfo ELF note.
9 First value contains physical address of note in hex and
10 second value contains the size of note in hex. This ELF
11 note info is parsed by second kernel and exported to user
12 space as part of ELF note in /proc/vmcore file. This note
13 contains various information like struct size, symbol
14 values, page size etc.
diff --git a/Documentation/blockdev/ramdisk.txt b/Documentation/blockdev/ramdisk.txt
index fa72e97dd669..fe2ef978d85a 100644
--- a/Documentation/blockdev/ramdisk.txt
+++ b/Documentation/blockdev/ramdisk.txt
@@ -36,21 +36,30 @@ allowing one to squeeze more programs onto an average installation or
36rescue floppy disk. 36rescue floppy disk.
37 37
38 38
392) Kernel Command Line Parameters 392) Parameters
40--------------------------------- 40---------------------------------
41 41
422a) Kernel Command Line Parameters
43
42 ramdisk_size=N 44 ramdisk_size=N
43 ============== 45 ==============
44 46
45This parameter tells the RAM disk driver to set up RAM disks of N k size. The 47This parameter tells the RAM disk driver to set up RAM disks of N k size. The
46default is 4096 (4 MB) (8192 (8 MB) on S390). 48default is 4096 (4 MB).
49
502b) Module parameters
47 51
48 ramdisk_blocksize=N 52 rd_nr
49 =================== 53 =====
54 /dev/ramX devices created.
50 55
51This parameter tells the RAM disk driver how many bytes to use per block. The 56 max_part
52default is 1024 (BLOCK_SIZE). 57 ========
58 Maximum partition number.
53 59
60 rd_size
61 =======
62 See ramdisk_size.
54 63
553) Using "rdev -r" 643) Using "rdev -r"
56------------------ 65------------------
diff --git a/Documentation/cpu-hotplug.txt b/Documentation/cpu-hotplug.txt
index 8cb9938cc47e..be675d2d15a7 100644
--- a/Documentation/cpu-hotplug.txt
+++ b/Documentation/cpu-hotplug.txt
@@ -285,7 +285,7 @@ A: This is what you would need in your kernel code to receive notifications.
285 return NOTIFY_OK; 285 return NOTIFY_OK;
286 } 286 }
287 287
288 static struct notifier_block foobar_cpu_notifer = 288 static struct notifier_block foobar_cpu_notifier =
289 { 289 {
290 .notifier_call = foobar_cpu_callback, 290 .notifier_call = foobar_cpu_callback,
291 }; 291 };
diff --git a/Documentation/devicetree/bindings/rtc/haoyu,hym8563.txt b/Documentation/devicetree/bindings/rtc/haoyu,hym8563.txt
new file mode 100644
index 000000000000..31406fd4a43e
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/haoyu,hym8563.txt
@@ -0,0 +1,27 @@
1Haoyu Microelectronics HYM8563 Real Time Clock
2
3The HYM8563 provides basic rtc and alarm functionality
4as well as a clock output of up to 32kHz.
5
6Required properties:
7- compatible: should be: "haoyu,hym8563"
8- reg: i2c address
9- interrupts: rtc alarm/event interrupt
10- #clock-cells: the value should be 0
11
12Example:
13
14hym8563: hym8563@51 {
15 compatible = "haoyu,hym8563";
16 reg = <0x51>;
17
18 interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
19
20 #clock-cells = <0>;
21};
22
23device {
24...
25 clocks = <&hym8563>;
26...
27};
diff --git a/Documentation/devicetree/bindings/rtc/maxim,ds1742.txt b/Documentation/devicetree/bindings/rtc/maxim,ds1742.txt
new file mode 100644
index 000000000000..d0f937c355b5
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/maxim,ds1742.txt
@@ -0,0 +1,12 @@
1* Maxim (Dallas) DS1742/DS1743 Real Time Clock
2
3Required properties:
4- compatible: Should contain "maxim,ds1742".
5- reg: Physical base address of the RTC and length of memory
6 mapped region.
7
8Example:
9 rtc: rtc@10000000 {
10 compatible = "maxim,ds1742";
11 reg = <0x10000000 0x800>;
12 };
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
index ff415d183352..520596da7953 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -34,6 +34,7 @@ fsl Freescale Semiconductor
34GEFanuc GE Fanuc Intelligent Platforms Embedded Systems, Inc. 34GEFanuc GE Fanuc Intelligent Platforms Embedded Systems, Inc.
35gef GE Fanuc Intelligent Platforms Embedded Systems, Inc. 35gef GE Fanuc Intelligent Platforms Embedded Systems, Inc.
36gmt Global Mixed-mode Technology, Inc. 36gmt Global Mixed-mode Technology, Inc.
37haoyu Haoyu Microelectronic Co. Ltd.
37hisilicon Hisilicon Limited. 38hisilicon Hisilicon Limited.
38hp Hewlett Packard 39hp Hewlett Packard
39ibm International Business Machines (IBM) 40ibm International Business Machines (IBM)
diff --git a/Documentation/dynamic-debug-howto.txt b/Documentation/dynamic-debug-howto.txt
index 1bbdcfcf1f13..46325eb2ea76 100644
--- a/Documentation/dynamic-debug-howto.txt
+++ b/Documentation/dynamic-debug-howto.txt
@@ -108,6 +108,12 @@ If your query set is big, you can batch them too:
108 108
109 ~# cat query-batch-file > <debugfs>/dynamic_debug/control 109 ~# cat query-batch-file > <debugfs>/dynamic_debug/control
110 110
111A another way is to use wildcard. The match rule support '*' (matches
112zero or more characters) and '?' (matches exactly one character).For
113example, you can match all usb drivers:
114
115 ~# echo "file drivers/usb/* +p" > <debugfs>/dynamic_debug/control
116
111At the syntactical level, a command comprises a sequence of match 117At the syntactical level, a command comprises a sequence of match
112specifications, followed by a flags change specification. 118specifications, followed by a flags change specification.
113 119
@@ -315,6 +321,9 @@ nullarbor:~ # echo -n 'func svc_process -p' >
315nullarbor:~ # echo -n 'format "nfsd: READ" +p' > 321nullarbor:~ # echo -n 'format "nfsd: READ" +p' >
316 <debugfs>/dynamic_debug/control 322 <debugfs>/dynamic_debug/control
317 323
324// enable messages in files of which the pathes include string "usb"
325nullarbor:~ # echo -n '*usb* +p' > <debugfs>/dynamic_debug/control
326
318// enable all messages 327// enable all messages
319nullarbor:~ # echo -n '+p' > <debugfs>/dynamic_debug/control 328nullarbor:~ # echo -n '+p' > <debugfs>/dynamic_debug/control
320 329
diff --git a/Documentation/filesystems/00-INDEX b/Documentation/filesystems/00-INDEX
index 8042050eb265..632211cbdd56 100644
--- a/Documentation/filesystems/00-INDEX
+++ b/Documentation/filesystems/00-INDEX
@@ -10,24 +10,32 @@ afs.txt
10 - info and examples for the distributed AFS (Andrew File System) fs. 10 - info and examples for the distributed AFS (Andrew File System) fs.
11affs.txt 11affs.txt
12 - info and mount options for the Amiga Fast File System. 12 - info and mount options for the Amiga Fast File System.
13autofs4-mount-control.txt
14 - info on device control operations for autofs4 module.
13automount-support.txt 15automount-support.txt
14 - information about filesystem automount support. 16 - information about filesystem automount support.
15befs.txt 17befs.txt
16 - information about the BeOS filesystem for Linux. 18 - information about the BeOS filesystem for Linux.
17bfs.txt 19bfs.txt
18 - info for the SCO UnixWare Boot Filesystem (BFS). 20 - info for the SCO UnixWare Boot Filesystem (BFS).
21btrfs.txt
22 - info for the BTRFS filesystem.
23caching/
24 - directory containing filesystem cache documentation.
19ceph.txt 25ceph.txt
20 - info for the Ceph Distributed File System 26 - info for the Ceph Distributed File System.
21cifs.txt 27cifs/
22 - description of the CIFS filesystem. 28 - directory containing CIFS filesystem documentation and example code.
23coda.txt 29coda.txt
24 - description of the CODA filesystem. 30 - description of the CODA filesystem.
25configfs/ 31configfs/
26 - directory containing configfs documentation and example code. 32 - directory containing configfs documentation and example code.
27cramfs.txt 33cramfs.txt
28 - info on the cram filesystem for small storage (ROMs etc). 34 - info on the cram filesystem for small storage (ROMs etc).
29dentry-locking.txt 35debugfs.txt
30 - info on the RCU-based dcache locking model. 36 - info on the debugfs filesystem.
37devpts.txt
38 - info on the devpts filesystem.
31directory-locking 39directory-locking
32 - info about the locking scheme used for directory operations. 40 - info about the locking scheme used for directory operations.
33dlmfs.txt 41dlmfs.txt
@@ -35,7 +43,7 @@ dlmfs.txt
35dnotify.txt 43dnotify.txt
36 - info about directory notification in Linux. 44 - info about directory notification in Linux.
37dnotify_test.c 45dnotify_test.c
38 - example program for dnotify 46 - example program for dnotify.
39ecryptfs.txt 47ecryptfs.txt
40 - docs on eCryptfs: stacked cryptographic filesystem for Linux. 48 - docs on eCryptfs: stacked cryptographic filesystem for Linux.
41efivarfs.txt 49efivarfs.txt
@@ -48,12 +56,18 @@ ext3.txt
48 - info, mount options and specifications for the Ext3 filesystem. 56 - info, mount options and specifications for the Ext3 filesystem.
49ext4.txt 57ext4.txt
50 - info, mount options and specifications for the Ext4 filesystem. 58 - info, mount options and specifications for the Ext4 filesystem.
51files.txt
52 - info on file management in the Linux kernel.
53f2fs.txt 59f2fs.txt
54 - info and mount options for the F2FS filesystem. 60 - info and mount options for the F2FS filesystem.
61fiemap.txt
62 - info on fiemap ioctl.
63files.txt
64 - info on file management in the Linux kernel.
55fuse.txt 65fuse.txt
56 - info on the Filesystem in User SpacE including mount options. 66 - info on the Filesystem in User SpacE including mount options.
67gfs2-glocks.txt
68 - info on the Global File System 2 - Glock internal locking rules.
69gfs2-uevents.txt
70 - info on the Global File System 2 - uevents.
57gfs2.txt 71gfs2.txt
58 - info on the Global File System 2. 72 - info on the Global File System 2.
59hfs.txt 73hfs.txt
@@ -84,40 +98,58 @@ ntfs.txt
84 - info and mount options for the NTFS filesystem (Windows NT). 98 - info and mount options for the NTFS filesystem (Windows NT).
85ocfs2.txt 99ocfs2.txt
86 - info and mount options for the OCFS2 clustered filesystem. 100 - info and mount options for the OCFS2 clustered filesystem.
101omfs.txt
102 - info on the Optimized MPEG FileSystem.
103path-lookup.txt
104 - info on path walking and name lookup locking.
105pohmelfs/
106 - directory containing pohmelfs filesystem documentation.
87porting 107porting
88 - various information on filesystem porting. 108 - various information on filesystem porting.
89proc.txt 109proc.txt
90 - info on Linux's /proc filesystem. 110 - info on Linux's /proc filesystem.
111qnx6.txt
112 - info on the QNX6 filesystem.
113quota.txt
114 - info on Quota subsystem.
91ramfs-rootfs-initramfs.txt 115ramfs-rootfs-initramfs.txt
92 - info on the 'in memory' filesystems ramfs, rootfs and initramfs. 116 - info on the 'in memory' filesystems ramfs, rootfs and initramfs.
93reiser4.txt
94 - info on the Reiser4 filesystem based on dancing tree algorithms.
95relay.txt 117relay.txt
96 - info on relay, for efficient streaming from kernel to user space. 118 - info on relay, for efficient streaming from kernel to user space.
97romfs.txt 119romfs.txt
98 - description of the ROMFS filesystem. 120 - description of the ROMFS filesystem.
99seq_file.txt 121seq_file.txt
100 - how to use the seq_file API 122 - how to use the seq_file API.
101sharedsubtree.txt 123sharedsubtree.txt
102 - a description of shared subtrees for namespaces. 124 - a description of shared subtrees for namespaces.
103spufs.txt 125spufs.txt
104 - info and mount options for the SPU filesystem used on Cell. 126 - info and mount options for the SPU filesystem used on Cell.
127squashfs.txt
128 - info on the squashfs filesystem.
105sysfs-pci.txt 129sysfs-pci.txt
106 - info on accessing PCI device resources through sysfs. 130 - info on accessing PCI device resources through sysfs.
131sysfs-tagging.txt
132 - info on sysfs tagging to avoid duplicates.
107sysfs.txt 133sysfs.txt
108 - info on sysfs, a ram-based filesystem for exporting kernel objects. 134 - info on sysfs, a ram-based filesystem for exporting kernel objects.
109sysv-fs.txt 135sysv-fs.txt
110 - info on the SystemV/V7/Xenix/Coherent filesystem. 136 - info on the SystemV/V7/Xenix/Coherent filesystem.
111tmpfs.txt 137tmpfs.txt
112 - info on tmpfs, a filesystem that holds all files in virtual memory. 138 - info on tmpfs, a filesystem that holds all files in virtual memory.
139ubifs.txt
140 - info on the Unsorted Block Images FileSystem.
113udf.txt 141udf.txt
114 - info and mount options for the UDF filesystem. 142 - info and mount options for the UDF filesystem.
115ufs.txt 143ufs.txt
116 - info on the ufs filesystem. 144 - info on the ufs filesystem.
117vfat.txt 145vfat.txt
118 - info on using the VFAT filesystem used in Windows NT and Windows 95 146 - info on using the VFAT filesystem used in Windows NT and Windows 95.
119vfs.txt 147vfs.txt
120 - overview of the Virtual File System 148 - overview of the Virtual File System.
149xfs-delayed-logging-design.txt
150 - info on the XFS Delayed Logging Design.
151xfs-self-describing-metadata.txt
152 - info on XFS Self Describing Metadata.
121xfs.txt 153xfs.txt
122 - info and mount options for the XFS filesystem. 154 - info and mount options for the XFS filesystem.
123xip.txt 155xip.txt
diff --git a/Documentation/filesystems/nilfs2.txt b/Documentation/filesystems/nilfs2.txt
index 873a2ab2e9f8..06887d46ccf2 100644
--- a/Documentation/filesystems/nilfs2.txt
+++ b/Documentation/filesystems/nilfs2.txt
@@ -81,6 +81,62 @@ nodiscard(*) The discard/TRIM commands are sent to the underlying
81 block device when blocks are freed. This is useful 81 block device when blocks are freed. This is useful
82 for SSD devices and sparse/thinly-provisioned LUNs. 82 for SSD devices and sparse/thinly-provisioned LUNs.
83 83
84Ioctls
85======
86
87There is some NILFS2 specific functionality which can be accessed by applications
88through the system call interfaces. The list of all NILFS2 specific ioctls are
89shown in the table below.
90
91Table of NILFS2 specific ioctls
92..............................................................................
93 Ioctl Description
94 NILFS_IOCTL_CHANGE_CPMODE Change mode of given checkpoint between
95 checkpoint and snapshot state. This ioctl is
96 used in chcp and mkcp utilities.
97
98 NILFS_IOCTL_DELETE_CHECKPOINT Remove checkpoint from NILFS2 file system.
99 This ioctl is used in rmcp utility.
100
101 NILFS_IOCTL_GET_CPINFO Return info about requested checkpoints. This
102 ioctl is used in lscp utility and by
103 nilfs_cleanerd daemon.
104
105 NILFS_IOCTL_GET_CPSTAT Return checkpoints statistics. This ioctl is
106 used by lscp, rmcp utilities and by
107 nilfs_cleanerd daemon.
108
109 NILFS_IOCTL_GET_SUINFO Return segment usage info about requested
110 segments. This ioctl is used in lssu,
111 nilfs_resize utilities and by nilfs_cleanerd
112 daemon.
113
114 NILFS_IOCTL_GET_SUSTAT Return segment usage statistics. This ioctl
115 is used in lssu, nilfs_resize utilities and
116 by nilfs_cleanerd daemon.
117
118 NILFS_IOCTL_GET_VINFO Return information on virtual block addresses.
119 This ioctl is used by nilfs_cleanerd daemon.
120
121 NILFS_IOCTL_GET_BDESCS Return information about descriptors of disk
122 block numbers. This ioctl is used by
123 nilfs_cleanerd daemon.
124
125 NILFS_IOCTL_CLEAN_SEGMENTS Do garbage collection operation in the
126 environment of requested parameters from
127 userspace. This ioctl is used by
128 nilfs_cleanerd daemon.
129
130 NILFS_IOCTL_SYNC Make a checkpoint. This ioctl is used in
131 mkcp utility.
132
133 NILFS_IOCTL_RESIZE Resize NILFS2 volume. This ioctl is used
134 by nilfs_resize utility.
135
136 NILFS_IOCTL_SET_ALLOC_RANGE Define lower limit of segments in bytes and
137 upper limit of segments in bytes. This ioctl
138 is used by nilfs_resize utility.
139
84NILFS2 usage 140NILFS2 usage
85============ 141============
86 142
diff --git a/Documentation/filesystems/sysfs.txt b/Documentation/filesystems/sysfs.txt
index a6619b7064b9..b35a64b82f9e 100644
--- a/Documentation/filesystems/sysfs.txt
+++ b/Documentation/filesystems/sysfs.txt
@@ -108,12 +108,12 @@ static DEVICE_ATTR(foo, S_IWUSR | S_IRUGO, show_foo, store_foo);
108is equivalent to doing: 108is equivalent to doing:
109 109
110static struct device_attribute dev_attr_foo = { 110static struct device_attribute dev_attr_foo = {
111 .attr = { 111 .attr = {
112 .name = "foo", 112 .name = "foo",
113 .mode = S_IWUSR | S_IRUGO, 113 .mode = S_IWUSR | S_IRUGO,
114 .show = show_foo,
115 .store = store_foo,
116 }, 114 },
115 .show = show_foo,
116 .store = store_foo,
117}; 117};
118 118
119 119
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index d4762d7ebd14..44738564b2ee 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1059,7 +1059,9 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
1059 debugfs files are removed at module unload time. 1059 debugfs files are removed at module unload time.
1060 1060
1061 gpt [EFI] Forces disk with valid GPT signature but 1061 gpt [EFI] Forces disk with valid GPT signature but
1062 invalid Protective MBR to be treated as GPT. 1062 invalid Protective MBR to be treated as GPT. If the
1063 primary GPT is corrupted, it enables the backup/alternate
1064 GPT to be used instead.
1063 1065
1064 grcan.enable0= [HW] Configuration of physical interface 0. Determines 1066 grcan.enable0= [HW] Configuration of physical interface 0. Determines
1065 the "Enable 0" bit of the configuration register. 1067 the "Enable 0" bit of the configuration register.
@@ -1461,6 +1463,13 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
1461 Valid arguments: on, off 1463 Valid arguments: on, off
1462 Default: on 1464 Default: on
1463 1465
1466 kmemcheck= [X86] Boot-time kmemcheck enable/disable/one-shot mode
1467 Valid arguments: 0, 1, 2
1468 kmemcheck=0 (disabled)
1469 kmemcheck=1 (enabled)
1470 kmemcheck=2 (one-shot mode)
1471 Default: 2 (one-shot mode)
1472
1464 kstack=N [X86] Print N words from the kernel stack 1473 kstack=N [X86] Print N words from the kernel stack
1465 in oops dumps. 1474 in oops dumps.
1466 1475
diff --git a/Documentation/printk-formats.txt b/Documentation/printk-formats.txt
index 445ad743ec81..6f4eb322ffaf 100644
--- a/Documentation/printk-formats.txt
+++ b/Documentation/printk-formats.txt
@@ -55,14 +55,21 @@ Struct Resources:
55 For printing struct resources. The 'R' and 'r' specifiers result in a 55 For printing struct resources. The 'R' and 'r' specifiers result in a
56 printed resource with ('R') or without ('r') a decoded flags member. 56 printed resource with ('R') or without ('r') a decoded flags member.
57 57
58Physical addresses: 58Physical addresses types phys_addr_t:
59 59
60 %pa 0x01234567 or 0x0123456789abcdef 60 %pa[p] 0x01234567 or 0x0123456789abcdef
61 61
62 For printing a phys_addr_t type (and its derivatives, such as 62 For printing a phys_addr_t type (and its derivatives, such as
63 resource_size_t) which can vary based on build options, regardless of 63 resource_size_t) which can vary based on build options, regardless of
64 the width of the CPU data path. Passed by reference. 64 the width of the CPU data path. Passed by reference.
65 65
66DMA addresses types dma_addr_t:
67
68 %pad 0x01234567 or 0x0123456789abcdef
69
70 For printing a dma_addr_t type which can vary based on build options,
71 regardless of the width of the CPU data path. Passed by reference.
72
66Raw buffer as a hex string: 73Raw buffer as a hex string:
67 %*ph 00 01 02 ... 3f 74 %*ph 00 01 02 ... 3f
68 %*phC 00:01:02: ... :3f 75 %*phC 00:01:02: ... :3f
diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt
index 6d486404200e..ee9a2f983b99 100644
--- a/Documentation/sysctl/kernel.txt
+++ b/Documentation/sysctl/kernel.txt
@@ -33,6 +33,7 @@ show up in /proc/sys/kernel:
33- domainname 33- domainname
34- hostname 34- hostname
35- hotplug 35- hotplug
36- kexec_load_disabled
36- kptr_restrict 37- kptr_restrict
37- kstack_depth_to_print [ X86 only ] 38- kstack_depth_to_print [ X86 only ]
38- l2cr [ PPC only ] 39- l2cr [ PPC only ]
@@ -287,6 +288,18 @@ Default value is "/sbin/hotplug".
287 288
288============================================================== 289==============================================================
289 290
291kexec_load_disabled:
292
293A toggle indicating if the kexec_load syscall has been disabled. This
294value defaults to 0 (false: kexec_load enabled), but can be set to 1
295(true: kexec_load disabled). Once true, kexec can no longer be used, and
296the toggle cannot be set back to false. This allows a kexec image to be
297loaded before disabling the syscall, allowing a system to set up (and
298later use) an image without it being altered. Generally used together
299with the "modules_disabled" sysctl.
300
301==============================================================
302
290kptr_restrict: 303kptr_restrict:
291 304
292This toggle indicates whether restrictions are placed on 305This toggle indicates whether restrictions are placed on
@@ -331,7 +344,7 @@ A toggle value indicating if modules are allowed to be loaded
331in an otherwise modular kernel. This toggle defaults to off 344in an otherwise modular kernel. This toggle defaults to off
332(0), but can be set true (1). Once true, modules can be 345(0), but can be set true (1). Once true, modules can be
333neither loaded nor unloaded, and the toggle cannot be set back 346neither loaded nor unloaded, and the toggle cannot be set back
334to false. 347to false. Generally used with the "kexec_load_disabled" toggle.
335 348
336============================================================== 349==============================================================
337 350
diff --git a/Documentation/trace/postprocess/trace-vmscan-postprocess.pl b/Documentation/trace/postprocess/trace-vmscan-postprocess.pl
index 4a37c4759cd2..00e425faa2fd 100644
--- a/Documentation/trace/postprocess/trace-vmscan-postprocess.pl
+++ b/Documentation/trace/postprocess/trace-vmscan-postprocess.pl
@@ -123,7 +123,7 @@ my $regex_writepage;
123 123
124# Static regex used. Specified like this for readability and for use with /o 124# Static regex used. Specified like this for readability and for use with /o
125# (process_pid) (cpus ) ( time ) (tpoint ) (details) 125# (process_pid) (cpus ) ( time ) (tpoint ) (details)
126my $regex_traceevent = '\s*([a-zA-Z0-9-]*)\s*(\[[0-9]*\])\s*([0-9.]*):\s*([a-zA-Z_]*):\s*(.*)'; 126my $regex_traceevent = '\s*([a-zA-Z0-9-]*)\s*(\[[0-9]*\])(\s*[dX.][Nnp.][Hhs.][0-9a-fA-F.]*|)\s*([0-9.]*):\s*([a-zA-Z_]*):\s*(.*)';
127my $regex_statname = '[-0-9]*\s\((.*)\).*'; 127my $regex_statname = '[-0-9]*\s\((.*)\).*';
128my $regex_statppid = '[-0-9]*\s\(.*\)\s[A-Za-z]\s([0-9]*).*'; 128my $regex_statppid = '[-0-9]*\s\(.*\)\s[A-Za-z]\s([0-9]*).*';
129 129
@@ -270,8 +270,8 @@ EVENT_PROCESS:
270 while ($traceevent = <STDIN>) { 270 while ($traceevent = <STDIN>) {
271 if ($traceevent =~ /$regex_traceevent/o) { 271 if ($traceevent =~ /$regex_traceevent/o) {
272 $process_pid = $1; 272 $process_pid = $1;
273 $timestamp = $3; 273 $timestamp = $4;
274 $tracepoint = $4; 274 $tracepoint = $5;
275 275
276 $process_pid =~ /(.*)-([0-9]*)$/; 276 $process_pid =~ /(.*)-([0-9]*)$/;
277 my $process = $1; 277 my $process = $1;
@@ -299,7 +299,7 @@ EVENT_PROCESS:
299 $perprocesspid{$process_pid}->{MM_VMSCAN_DIRECT_RECLAIM_BEGIN}++; 299 $perprocesspid{$process_pid}->{MM_VMSCAN_DIRECT_RECLAIM_BEGIN}++;
300 $perprocesspid{$process_pid}->{STATE_DIRECT_BEGIN} = $timestamp; 300 $perprocesspid{$process_pid}->{STATE_DIRECT_BEGIN} = $timestamp;
301 301
302 $details = $5; 302 $details = $6;
303 if ($details !~ /$regex_direct_begin/o) { 303 if ($details !~ /$regex_direct_begin/o) {
304 print "WARNING: Failed to parse mm_vmscan_direct_reclaim_begin as expected\n"; 304 print "WARNING: Failed to parse mm_vmscan_direct_reclaim_begin as expected\n";
305 print " $details\n"; 305 print " $details\n";
@@ -322,7 +322,7 @@ EVENT_PROCESS:
322 $perprocesspid{$process_pid}->{HIGH_DIRECT_RECLAIM_LATENCY}[$index] = "$order-$latency"; 322 $perprocesspid{$process_pid}->{HIGH_DIRECT_RECLAIM_LATENCY}[$index] = "$order-$latency";
323 } 323 }
324 } elsif ($tracepoint eq "mm_vmscan_kswapd_wake") { 324 } elsif ($tracepoint eq "mm_vmscan_kswapd_wake") {
325 $details = $5; 325 $details = $6;
326 if ($details !~ /$regex_kswapd_wake/o) { 326 if ($details !~ /$regex_kswapd_wake/o) {
327 print "WARNING: Failed to parse mm_vmscan_kswapd_wake as expected\n"; 327 print "WARNING: Failed to parse mm_vmscan_kswapd_wake as expected\n";
328 print " $details\n"; 328 print " $details\n";
@@ -356,7 +356,7 @@ EVENT_PROCESS:
356 } elsif ($tracepoint eq "mm_vmscan_wakeup_kswapd") { 356 } elsif ($tracepoint eq "mm_vmscan_wakeup_kswapd") {
357 $perprocesspid{$process_pid}->{MM_VMSCAN_WAKEUP_KSWAPD}++; 357 $perprocesspid{$process_pid}->{MM_VMSCAN_WAKEUP_KSWAPD}++;
358 358
359 $details = $5; 359 $details = $6;
360 if ($details !~ /$regex_wakeup_kswapd/o) { 360 if ($details !~ /$regex_wakeup_kswapd/o) {
361 print "WARNING: Failed to parse mm_vmscan_wakeup_kswapd as expected\n"; 361 print "WARNING: Failed to parse mm_vmscan_wakeup_kswapd as expected\n";
362 print " $details\n"; 362 print " $details\n";
@@ -366,7 +366,7 @@ EVENT_PROCESS:
366 my $order = $3; 366 my $order = $3;
367 $perprocesspid{$process_pid}->{MM_VMSCAN_WAKEUP_KSWAPD_PERORDER}[$order]++; 367 $perprocesspid{$process_pid}->{MM_VMSCAN_WAKEUP_KSWAPD_PERORDER}[$order]++;
368 } elsif ($tracepoint eq "mm_vmscan_lru_isolate") { 368 } elsif ($tracepoint eq "mm_vmscan_lru_isolate") {
369 $details = $5; 369 $details = $6;
370 if ($details !~ /$regex_lru_isolate/o) { 370 if ($details !~ /$regex_lru_isolate/o) {
371 print "WARNING: Failed to parse mm_vmscan_lru_isolate as expected\n"; 371 print "WARNING: Failed to parse mm_vmscan_lru_isolate as expected\n";
372 print " $details\n"; 372 print " $details\n";
@@ -387,7 +387,7 @@ EVENT_PROCESS:
387 } 387 }
388 $perprocesspid{$process_pid}->{HIGH_NR_CONTIG_DIRTY} += $nr_contig_dirty; 388 $perprocesspid{$process_pid}->{HIGH_NR_CONTIG_DIRTY} += $nr_contig_dirty;
389 } elsif ($tracepoint eq "mm_vmscan_lru_shrink_inactive") { 389 } elsif ($tracepoint eq "mm_vmscan_lru_shrink_inactive") {
390 $details = $5; 390 $details = $6;
391 if ($details !~ /$regex_lru_shrink_inactive/o) { 391 if ($details !~ /$regex_lru_shrink_inactive/o) {
392 print "WARNING: Failed to parse mm_vmscan_lru_shrink_inactive as expected\n"; 392 print "WARNING: Failed to parse mm_vmscan_lru_shrink_inactive as expected\n";
393 print " $details\n"; 393 print " $details\n";
@@ -397,7 +397,7 @@ EVENT_PROCESS:
397 my $nr_reclaimed = $4; 397 my $nr_reclaimed = $4;
398 $perprocesspid{$process_pid}->{HIGH_NR_RECLAIMED} += $nr_reclaimed; 398 $perprocesspid{$process_pid}->{HIGH_NR_RECLAIMED} += $nr_reclaimed;
399 } elsif ($tracepoint eq "mm_vmscan_writepage") { 399 } elsif ($tracepoint eq "mm_vmscan_writepage") {
400 $details = $5; 400 $details = $6;
401 if ($details !~ /$regex_writepage/o) { 401 if ($details !~ /$regex_writepage/o) {
402 print "WARNING: Failed to parse mm_vmscan_writepage as expected\n"; 402 print "WARNING: Failed to parse mm_vmscan_writepage as expected\n";
403 print " $details\n"; 403 print " $details\n";
diff --git a/Documentation/vm/locking b/Documentation/vm/locking
deleted file mode 100644
index f61228bd6395..000000000000
--- a/Documentation/vm/locking
+++ /dev/null
@@ -1,130 +0,0 @@
1Started Oct 1999 by Kanoj Sarcar <kanojsarcar@yahoo.com>
2
3The intent of this file is to have an uptodate, running commentary
4from different people about how locking and synchronization is done
5in the Linux vm code.
6
7page_table_lock & mmap_sem
8--------------------------------------
9
10Page stealers pick processes out of the process pool and scan for
11the best process to steal pages from. To guarantee the existence
12of the victim mm, a mm_count inc and a mmdrop are done in swap_out().
13Page stealers hold kernel_lock to protect against a bunch of races.
14The vma list of the victim mm is also scanned by the stealer,
15and the page_table_lock is used to preserve list sanity against the
16process adding/deleting to the list. This also guarantees existence
17of the vma. Vma existence is not guaranteed once try_to_swap_out()
18drops the page_table_lock. To guarantee the existence of the underlying
19file structure, a get_file is done before the swapout() method is
20invoked. The page passed into swapout() is guaranteed not to be reused
21for a different purpose because the page reference count due to being
22present in the user's pte is not released till after swapout() returns.
23
24Any code that modifies the vmlist, or the vm_start/vm_end/
25vm_flags:VM_LOCKED/vm_next of any vma *in the list* must prevent
26kswapd from looking at the chain.
27
28The rules are:
291. To scan the vmlist (look but don't touch) you must hold the
30 mmap_sem with read bias, i.e. down_read(&mm->mmap_sem)
312. To modify the vmlist you need to hold the mmap_sem with
32 read&write bias, i.e. down_write(&mm->mmap_sem) *AND*
33 you need to take the page_table_lock.
343. The swapper takes _just_ the page_table_lock, this is done
35 because the mmap_sem can be an extremely long lived lock
36 and the swapper just cannot sleep on that.
374. The exception to this rule is expand_stack, which just
38 takes the read lock and the page_table_lock, this is ok
39 because it doesn't really modify fields anybody relies on.
405. You must be able to guarantee that while holding page_table_lock
41 or page_table_lock of mm A, you will not try to get either lock
42 for mm B.
43
44The caveats are:
451. find_vma() makes use of, and updates, the mmap_cache pointer hint.
46The update of mmap_cache is racy (page stealer can race with other code
47that invokes find_vma with mmap_sem held), but that is okay, since it
48is a hint. This can be fixed, if desired, by having find_vma grab the
49page_table_lock.
50
51
52Code that add/delete elements from the vmlist chain are
531. callers of insert_vm_struct
542. callers of merge_segments
553. callers of avl_remove
56
57Code that changes vm_start/vm_end/vm_flags:VM_LOCKED of vma's on
58the list:
591. expand_stack
602. mprotect
613. mlock
624. mremap
63
64It is advisable that changes to vm_start/vm_end be protected, although
65in some cases it is not really needed. Eg, vm_start is modified by
66expand_stack(), it is hard to come up with a destructive scenario without
67having the vmlist protection in this case.
68
69The page_table_lock nests with the inode i_mmap_mutex and the kmem cache
70c_spinlock spinlocks. This is okay, since the kmem code asks for pages after
71dropping c_spinlock. The page_table_lock also nests with pagecache_lock and
72pagemap_lru_lock spinlocks, and no code asks for memory with these locks
73held.
74
75The page_table_lock is grabbed while holding the kernel_lock spinning monitor.
76
77The page_table_lock is a spin lock.
78
79Note: PTL can also be used to guarantee that no new clones using the
80mm start up ... this is a loose form of stability on mm_users. For
81example, it is used in copy_mm to protect against a racing tlb_gather_mmu
82single address space optimization, so that the zap_page_range (from
83truncate) does not lose sending ipi's to cloned threads that might
84be spawned underneath it and go to user mode to drag in pte's into tlbs.
85
86swap_lock
87--------------
88The swap devices are chained in priority order from the "swap_list" header.
89The "swap_list" is used for the round-robin swaphandle allocation strategy.
90The #free swaphandles is maintained in "nr_swap_pages". These two together
91are protected by the swap_lock.
92
93The swap_lock also protects all the device reference counts on the
94corresponding swaphandles, maintained in the "swap_map" array, and the
95"highest_bit" and "lowest_bit" fields.
96
97The swap_lock is a spinlock, and is never acquired from intr level.
98
99To prevent races between swap space deletion or async readahead swapins
100deciding whether a swap handle is being used, ie worthy of being read in
101from disk, and an unmap -> swap_free making the handle unused, the swap
102delete and readahead code grabs a temp reference on the swaphandle to
103prevent warning messages from swap_duplicate <- read_swap_cache_async.
104
105Swap cache locking
106------------------
107Pages are added into the swap cache with kernel_lock held, to make sure
108that multiple pages are not being added (and hence lost) by associating
109all of them with the same swaphandle.
110
111Pages are guaranteed not to be removed from the scache if the page is
112"shared": ie, other processes hold reference on the page or the associated
113swap handle. The only code that does not follow this rule is shrink_mmap,
114which deletes pages from the swap cache if no process has a reference on
115the page (multiple processes might have references on the corresponding
116swap handle though). lookup_swap_cache() races with shrink_mmap, when
117establishing a reference on a scache page, so, it must check whether the
118page it located is still in the swapcache, or shrink_mmap deleted it.
119(This race is due to the fact that shrink_mmap looks at the page ref
120count with pagecache_lock, but then drops pagecache_lock before deleting
121the page from the scache).
122
123do_wp_page and do_swap_page have MP races in them while trying to figure
124out whether a page is "shared", by looking at the page_count + swap_count.
125To preserve the sum of the counts, the page lock _must_ be acquired before
126calling is_page_shared (else processes might switch their swap_count refs
127to the page count refs, after the page count ref has been snapshotted).
128
129Swap device deletion code currently breaks all the scache assumptions,
130since it grabs neither mmap_sem nor page_table_lock.