Skip to content

Commit

Permalink
Merge branch 'akpm' (updates from Andrew Morton)
Browse files Browse the repository at this point in the history
Merge first patch-bomb from Andrew Morton:
 - various misc bits
 - I'm been patchmonkeying ocfs2 for a while, as Joel and Mark have been
   distracted.  There has been quite a bit of activity.
 - About half the MM queue
 - Some backlight bits
 - Various lib/ updates
 - checkpatch updates
 - zillions more little rtc patches
 - ptrace
 - signals
 - exec
 - procfs
 - rapidio
 - nbd
 - aoe
 - pps
 - memstick
 - tools/testing/selftests updates

* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (445 commits)
  tools/testing/selftests: don't assume the x bit is set on scripts
  selftests: add .gitignore for kcmp
  selftests: fix clean target in kcmp Makefile
  selftests: add .gitignore for vm
  selftests: add hugetlbfstest
  self-test: fix make clean
  selftests: exit 1 on failure
  kernel/resource.c: remove the unneeded assignment in function __find_resource
  aio: fix wrong comment in aio_complete()
  drivers/w1/slaves/w1_ds2408.c: add magic sequence to disable P0 test mode
  drivers/memstick/host/r592.c: convert to module_pci_driver
  drivers/memstick/host/jmb38x_ms: convert to module_pci_driver
  pps-gpio: add device-tree binding and support
  drivers/pps/clients/pps-gpio.c: convert to module_platform_driver
  drivers/pps/clients/pps-gpio.c: convert to devm_* helpers
  drivers/parport/share.c: use kzalloc
  Documentation/accounting/getdelays.c: avoid strncpy in accounting tool
  aoe: update internal version number to v83
  aoe: update copyright date
  aoe: perform I/O completions in parallel
  ...
  • Loading branch information
torvalds committed Jul 4, 2013
2 parents 862f001 + 9307c29 commit 7f0ef02
Show file tree
Hide file tree
Showing 429 changed files with 6,278 additions and 4,934 deletions.
3 changes: 2 additions & 1 deletion Documentation/CodingStyle
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,8 @@ Albeit deprecated by some people, the equivalent of the goto statement is
used frequently by compilers in form of the unconditional jump instruction.

The goto statement comes in handy when a function exits from multiple
locations and some common work such as cleanup has to be done.
locations and some common work such as cleanup has to be done. If there is no
cleanup needed then just return directly.

The rationale is:

Expand Down
7 changes: 6 additions & 1 deletion Documentation/DocBook/kernel-locking.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -1955,12 +1955,17 @@ machines due to caching.
</sect1>
</chapter>

<chapter id="apiref">
<chapter id="apiref-mutex">
<title>Mutex API reference</title>
!Iinclude/linux/mutex.h
!Ekernel/mutex.c
</chapter>

<chapter id="apiref-futex">
<title>Futex API reference</title>
!Ikernel/futex.c
</chapter>

<chapter id="references">
<title>Further reading</title>

Expand Down
4 changes: 2 additions & 2 deletions Documentation/accounting/getdelays.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ int main(int argc, char *argv[])
char *logfile = NULL;
int loop = 0;
int containerset = 0;
char containerpath[1024];
char *containerpath = NULL;
int cfd = 0;
int forking = 0;
sigset_t sigset;
Expand All @@ -299,7 +299,7 @@ int main(int argc, char *argv[])
break;
case 'C':
containerset = 1;
strncpy(containerpath, optarg, strlen(optarg) + 1);
containerpath = optarg;
break;
case 'w':
logfile = strdup(optarg);
Expand Down
7 changes: 3 additions & 4 deletions Documentation/cgroups/memory.txt
Original file line number Diff line number Diff line change
Expand Up @@ -834,10 +834,9 @@ Test:

12. TODO

1. Add support for accounting huge pages (as a separate controller)
2. Make per-cgroup scanner reclaim not-shared pages first
3. Teach controller to account for shared-pages
4. Start reclamation in the background when the limit is
1. Make per-cgroup scanner reclaim not-shared pages first
2. Teach controller to account for shared-pages
3. Start reclamation in the background when the limit is
not yet hit but the usage is getting closer

Summary
Expand Down
1 change: 0 additions & 1 deletion Documentation/crypto/async-tx-api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -222,5 +222,4 @@ drivers/dma/: location for offload engine drivers
include/linux/async_tx.h: core header file for the async_tx api
crypto/async_tx/async_tx.c: async_tx interface to dmaengine and common code
crypto/async_tx/async_memcpy.c: copy offload
crypto/async_tx/async_memset.c: memory fill offload
crypto/async_tx/async_xor.c: xor and xor zero sum offload
3 changes: 1 addition & 2 deletions Documentation/devices.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,7 @@ Your cooperation is appreciated.
10 = /dev/aio Asynchronous I/O notification interface
11 = /dev/kmsg Writes to this come out as printk's, reads
export the buffered printk records.
12 = /dev/oldmem Used by crashdump kernels to access
the memory of the kernel that crashed.
12 = /dev/oldmem OBSOLETE - replaced by /proc/vmcore

1 block RAM disk
0 = /dev/ram0 First RAM disk
Expand Down
20 changes: 20 additions & 0 deletions Documentation/devicetree/bindings/pps/pps-gpio.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Device-Tree Bindings for a PPS Signal on GPIO

These properties describe a PPS (pulse-per-second) signal connected to
a GPIO pin.

Required properties:
- compatible: should be "pps-gpio"
- gpios: one PPS GPIO in the format described by ../gpio/gpio.txt

Optional properties:
- assert-falling-edge: when present, assert is indicated by a falling edge
(instead of by a rising edge)

Example:
pps {
compatible = "pps-gpio";
gpios = <&gpio2 6 0>;

assert-falling-edge;
};
7 changes: 6 additions & 1 deletion Documentation/filesystems/proc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,8 @@ This file is only present if the CONFIG_MMU kernel configuration option is
enabled.

The /proc/PID/clear_refs is used to reset the PG_Referenced and ACCESSED/YOUNG
bits on both physical and virtual pages associated with a process.
bits on both physical and virtual pages associated with a process, and the
soft-dirty bit on pte (see Documentation/vm/soft-dirty.txt for details).
To clear the bits for all the pages associated with the process
> echo 1 > /proc/PID/clear_refs

Expand All @@ -482,6 +483,10 @@ To clear the bits for the anonymous pages associated with the process

To clear the bits for the file mapped pages associated with the process
> echo 3 > /proc/PID/clear_refs

To clear the soft-dirty bit
> echo 4 > /proc/PID/clear_refs

Any other value written to /proc/PID/clear_refs will have no effect.

The /proc/pid/pagemap gives the PFN, which can be used to find the pageflags
Expand Down
25 changes: 17 additions & 8 deletions Documentation/filesystems/vfs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,6 @@ your filesystem. The following members are defined:
struct address_space_operations {
int (*writepage)(struct page *page, struct writeback_control *wbc);
int (*readpage)(struct file *, struct page *);
int (*sync_page)(struct page *);
int (*writepages)(struct address_space *, struct writeback_control *);
int (*set_page_dirty)(struct page *page);
int (*readpages)(struct file *filp, struct address_space *mapping,
Expand All @@ -581,6 +580,9 @@ struct address_space_operations {
/* migrate the contents of a page to the specified target */
int (*migratepage) (struct page *, struct page *);
int (*launder_page) (struct page *);
int (*is_partially_uptodate) (struct page *, read_descriptor_t *,
unsigned long);
void (*is_dirty_writeback) (struct page *, bool *, bool *);
int (*error_remove_page) (struct mapping *mapping, struct page *page);
int (*swap_activate)(struct file *);
int (*swap_deactivate)(struct file *);
Expand Down Expand Up @@ -612,13 +614,6 @@ struct address_space_operations {
In this case, the page will be relocated, relocked and if
that all succeeds, ->readpage will be called again.

sync_page: called by the VM to notify the backing store to perform all
queued I/O operations for a page. I/O operations for other pages
associated with this address_space object may also be performed.

This function is optional and is called only for pages with
PG_Writeback set while waiting for the writeback to complete.

writepages: called by the VM to write out pages associated with the
address_space object. If wbc->sync_mode is WBC_SYNC_ALL, then
the writeback_control will specify a range of pages that must be
Expand Down Expand Up @@ -747,6 +742,20 @@ struct address_space_operations {
prevent redirtying the page, it is kept locked during the whole
operation.

is_partially_uptodate: Called by the VM when reading a file through the
pagecache when the underlying blocksize != pagesize. If the required
block is up to date then the read can complete without needing the IO
to bring the whole page up to date.

is_dirty_writeback: Called by the VM when attempting to reclaim a page.
The VM uses dirty and writeback information to determine if it needs
to stall to allow flushers a chance to complete some IO. Ordinarily
it can use PageDirty and PageWriteback but some filesystems have
more complex state (unstable pages in NFS prevent reclaim) or
do not set those flags due to locking problems (jbd). This callback
allows a filesystem to indicate to the VM if a page should be
treated as dirty or writeback for the purposes of stalling.

error_remove_page: normally set to generic_error_remove_page if truncation
is ok for this address space. Used for memory failure handling.
Setting this implies you deal with pages going away under you,
Expand Down
31 changes: 6 additions & 25 deletions Documentation/kdump/kdump.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,12 @@ parameter. Optionally the size of the ELF header can also be passed
when using the elfcorehdr=[size[KMG]@]offset[KMG] syntax.


With the dump-capture kernel, you can access the memory image, or "old
memory," in two ways:

- Through a /dev/oldmem device interface. A capture utility can read the
device file and write out the memory in raw format. This is a raw dump
of memory. Analysis and capture tools must be intelligent enough to
determine where to look for the right information.

- Through /proc/vmcore. This exports the dump as an ELF-format file that
you can write out using file copy commands such as cp or scp. Further,
you can use analysis tools such as the GNU Debugger (GDB) and the Crash
tool to debug the dump file. This method ensures that the dump pages are
correctly ordered.
With the dump-capture kernel, you can access the memory image through
/proc/vmcore. This exports the dump as an ELF-format file that you can
write out using file copy commands such as cp or scp. Further, you can
use analysis tools such as the GNU Debugger (GDB) and the Crash tool to
debug the dump file. This method ensures that the dump pages are correctly
ordered.


Setup and Installation
Expand Down Expand Up @@ -423,18 +416,6 @@ the following command:

cp /proc/vmcore <dump-file>

You can also access dumped memory as a /dev/oldmem device for a linear
and raw view. To create the device, use the following command:

mknod /dev/oldmem c 1 12

Use the dd command with suitable options for count, bs, and skip to
access specific portions of the dump.

To see the entire memory, use the following command:

dd if=/dev/oldmem of=oldmem.001


Analysis
========
Expand Down
98 changes: 85 additions & 13 deletions Documentation/rapidio/rapidio.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,28 +73,44 @@ data structure. This structure includes lists of all devices and local master
ports that form the same network. It also contains a pointer to the default
master port that is used to communicate with devices within the network.

2.5 Device Drivers

RapidIO device-specific drivers follow Linux Kernel Driver Model and are
intended to support specific RapidIO devices attached to the RapidIO network.

2.6 Subsystem Interfaces

RapidIO interconnect specification defines features that may be used to provide
one or more common service layers for all participating RapidIO devices. These
common services may act separately from device-specific drivers or be used by
device-specific drivers. Example of such service provider is the RIONET driver
which implements Ethernet-over-RapidIO interface. Because only one driver can be
registered for a device, all common RapidIO services have to be registered as
subsystem interfaces. This allows to have multiple common services attached to
the same device without blocking attachment of a device-specific driver.

3. Subsystem Initialization
---------------------------

In order to initialize the RapidIO subsystem, a platform must initialize and
register at least one master port within the RapidIO network. To register mport
within the subsystem controller driver initialization code calls function
within the subsystem controller driver's initialization code calls function
rio_register_mport() for each available master port.

RapidIO subsystem uses subsys_initcall() or device_initcall() to perform
controller initialization (depending on controller device type).

After all active master ports are registered with a RapidIO subsystem,
an enumeration and/or discovery routine may be called automatically or
by user-space command.

RapidIO subsystem can be configured to be built as a statically linked or
modular component of the kernel (see details below).

4. Enumeration and Discovery
----------------------------

4.1 Overview
------------

RapidIO subsystem configuration options allow users to specify enumeration and
RapidIO subsystem configuration options allow users to build enumeration and
discovery methods as statically linked components or loadable modules.
An enumeration/discovery method implementation and available input parameters
define how any given method can be attached to available RapidIO mports:
Expand All @@ -115,8 +131,8 @@ several methods to initiate an enumeration and/or discovery process:
endpoint waits for enumeration to be completed. If the specified timeout
expires the discovery process is terminated without obtaining RapidIO network
information. NOTE: a timed out discovery process may be restarted later using
a user-space command as it is described later if the given endpoint was
enumerated successfully.
a user-space command as it is described below (if the given endpoint was
enumerated successfully).

(b) Statically linked enumeration and discovery process can be started by
a command from user space. This initiation method provides more flexibility
Expand All @@ -138,15 +154,42 @@ When a network scan process is started it calls an enumeration or discovery
routine depending on the configured role of a master port: host or agent.

Enumeration is performed by a master port if it is configured as a host port by
assigning a host device ID greater than or equal to zero. A host device ID is
assigned to a master port through the kernel command line parameter "riohdid=",
or can be configured in a platform-specific manner. If the host device ID for
a specific master port is set to -1, the discovery process will be performed
for it.
assigning a host destination ID greater than or equal to zero. The host
destination ID can be assigned to a master port using various methods depending
on RapidIO subsystem build configuration:

(a) For a statically linked RapidIO subsystem core use command line parameter
"rapidio.hdid=" with a list of destination ID assignments in order of mport
device registration. For example, in a system with two RapidIO controllers
the command line parameter "rapidio.hdid=-1,7" will result in assignment of
the host destination ID=7 to the second RapidIO controller, while the first
one will be assigned destination ID=-1.

(b) If the RapidIO subsystem core is built as a loadable module, in addition
to the method shown above, the host destination ID(s) can be specified using
traditional methods of passing module parameter "hdid=" during its loading:
- from command line: "modprobe rapidio hdid=-1,7", or
- from modprobe configuration file using configuration command "options",
like in this example: "options rapidio hdid=-1,7". An example of modprobe
configuration file is provided in the section below.

NOTES:
(i) if "hdid=" parameter is omitted all available mport will be assigned
destination ID = -1;
(ii) the "hdid=" parameter in systems with multiple mports can have
destination ID assignments omitted from the end of list (default = -1).

If the host device ID for a specific master port is set to -1, the discovery
process will be performed for it.

The enumeration and discovery routines use RapidIO maintenance transactions
to access the configuration space of devices.

NOTE: If RapidIO switch-specific device drivers are built as loadable modules
they must be loaded before enumeration/discovery process starts.
This requirement is cased by the fact that enumeration/discovery methods invoke
vendor-specific callbacks on early stages.

4.2 Automatic Start of Enumeration and Discovery
------------------------------------------------

Expand Down Expand Up @@ -266,7 +309,36 @@ method's module initialization routine calls rio_register_scan() to attach
an enumerator to a specified mport device (or devices). The basic enumerator
implementation demonstrates this process.

5. References
4.6 Using Loadable RapidIO Switch Drivers
-----------------------------------------

In the case when RapidIO switch drivers are built as loadable modules a user
must ensure that they are loaded before the enumeration/discovery starts.
This process can be automated by specifying pre- or post- dependencies in the
RapidIO-specific modprobe configuration file as shown in the example below.

File /etc/modprobe.d/rapidio.conf:
----------------------------------

# Configure RapidIO subsystem modules

# Set enumerator host destination ID (overrides kernel command line option)
options rapidio hdid=-1,2

# Load RapidIO switch drivers immediately after rapidio core module was loaded
softdep rapidio post: idt_gen2 idtcps tsi57x

# OR :

# Load RapidIO switch drivers just before rio-scan enumerator module is loaded
softdep rio-scan pre: idt_gen2 idtcps tsi57x

--------------------------

NOTE: In the example above, one of "softdep" commands must be removed or
commented out to keep required module loading sequence.

A. References
-------------

[1] RapidIO Trade Association. RapidIO Interconnect Specifications.
Expand Down
1 change: 1 addition & 0 deletions Documentation/rapidio/sysfs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ device_rev - returns the device revision level
(see 4.1 for switch specific details)
lprev - returns name of previous device (switch) on the path to the device
that that owns this attribute
modalias - returns the device modalias

In addition to the files listed above, each device has a binary attribute file
that allows read/write access to the device configuration registers using
Expand Down
7 changes: 4 additions & 3 deletions Documentation/rtc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,10 @@ since_epoch: The number of seconds since the epoch according to the RTC
time: RTC-provided time
wakealarm: The time at which the clock will generate a system wakeup
event. This is a one shot wakeup event, so must be reset
after wake if a daily wakeup is required. Format is either
seconds since the epoch or, if there's a leading +, seconds
in the future.
after wake if a daily wakeup is required. Format is seconds since
the epoch by default, or if there's a leading +, seconds in the
future, or if there is a leading +=, seconds ahead of the current
alarm.

IOCTL INTERFACE
---------------
Expand Down
3 changes: 2 additions & 1 deletion Documentation/vm/pagemap.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ There are three components to pagemap:
* Bits 0-54 page frame number (PFN) if present
* Bits 0-4 swap type if swapped
* Bits 5-54 swap offset if swapped
* Bits 55-60 page shift (page size = 1<<page shift)
* Bit 55 pte is soft-dirty (see Documentation/vm/soft-dirty.txt)
* Bits 56-60 zero
* Bit 61 page is file-page or shared-anon
* Bit 62 page swapped
* Bit 63 page present
Expand Down
Loading

0 comments on commit 7f0ef02

Please sign in to comment.