Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 298959
b: refs/heads/master
c: d2ef406
h: refs/heads/master
i:
  298957: 8e2d5af
  298955: da8d2d8
  298951: a096d88
  298943: 169198f
v: v3
  • Loading branch information
Or Gerlitz authored and Roland Dreier committed Apr 2, 2012
1 parent 1cb4438 commit 4fd3812
Show file tree
Hide file tree
Showing 678 changed files with 4,287 additions and 9,333 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 70f33fa5863458ec9f1ae3aabdb9c2401598ec3d
refs/heads/master: d2ef406866620f0450ad0b4c7fb5c2796c7bf245
18 changes: 0 additions & 18 deletions trunk/Documentation/DMA-attributes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,3 @@ may be weakly ordered, that is that reads and writes may pass each other.
Since it is optional for platforms to implement DMA_ATTR_WEAK_ORDERING,
those that do not will simply ignore the attribute and exhibit default
behavior.

DMA_ATTR_WRITE_COMBINE
----------------------

DMA_ATTR_WRITE_COMBINE specifies that writes to the mapping may be
buffered to improve performance.

Since it is optional for platforms to implement DMA_ATTR_WRITE_COMBINE,
those that do not will simply ignore the attribute and exhibit default
behavior.

DMA_ATTR_NON_CONSISTENT
-----------------------

DMA_ATTR_NON_CONSISTENT lets the platform to choose to return either
consistent or non-consistent memory as it sees fit. By using this API,
you are guaranteeing to the platform that you have all the correct and
necessary sync points for this memory in the driver.
17 changes: 0 additions & 17 deletions trunk/Documentation/DocBook/device-drivers.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -446,21 +446,4 @@ X!Idrivers/video/console/fonts.c
!Edrivers/i2c/i2c-core.c
</chapter>

<chapter id="hsi">
<title>High Speed Synchronous Serial Interface (HSI)</title>

<para>
High Speed Synchronous Serial Interface (HSI) is a
serial interface mainly used for connecting application
engines (APE) with cellular modem engines (CMT) in cellular
handsets.

HSI provides multiplexing for up to 16 logical channels,
low-latency and full duplex communication.
</para>

!Iinclude/linux/hsi/hsi.h
!Edrivers/hsi/hsi.c
</chapter>

</book>
2 changes: 1 addition & 1 deletion trunk/Documentation/cgroups/cpusets.txt
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ and name space for cpusets, with a minimum of additional kernel code.

The cpus and mems files in the root (top_cpuset) cpuset are
read-only. The cpus file automatically tracks the value of
cpu_online_mask using a CPU hotplug notifier, and the mems file
cpu_online_map using a CPU hotplug notifier, and the mems file
automatically tracks the value of node_states[N_HIGH_MEMORY]--i.e.,
nodes with memory--using the cpuset_track_online_nodes() hook.

Expand Down
22 changes: 11 additions & 11 deletions trunk/Documentation/cpu-hotplug.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ maxcpus=n Restrict boot time cpus to n. Say if you have 4 cpus, using
other cpus later online, read FAQ's for more info.

additional_cpus=n (*) Use this to limit hotpluggable cpus. This option sets
cpu_possible_mask = cpu_present_mask + additional_cpus
cpu_possible_map = cpu_present_map + additional_cpus

cede_offline={"off","on"} Use this option to disable/enable putting offlined
processors to an extended H_CEDE state on
Expand All @@ -64,33 +64,33 @@ should only rely on this to count the # of cpus, but *MUST* not rely
on the apicid values in those tables for disabled apics. In the event
BIOS doesn't mark such hot-pluggable cpus as disabled entries, one could
use this parameter "additional_cpus=x" to represent those cpus in the
cpu_possible_mask.
cpu_possible_map.

possible_cpus=n [s390,x86_64] use this to set hotpluggable cpus.
This option sets possible_cpus bits in
cpu_possible_mask. Thus keeping the numbers of bits set
cpu_possible_map. Thus keeping the numbers of bits set
constant even if the machine gets rebooted.

CPU maps and such
-----------------
[More on cpumaps and primitive to manipulate, please check
include/linux/cpumask.h that has more descriptive text.]

cpu_possible_mask: Bitmap of possible CPUs that can ever be available in the
cpu_possible_map: Bitmap of possible CPUs that can ever be available in the
system. This is used to allocate some boot time memory for per_cpu variables
that aren't designed to grow/shrink as CPUs are made available or removed.
Once set during boot time discovery phase, the map is static, i.e no bits
are added or removed anytime. Trimming it accurately for your system needs
upfront can save some boot time memory. See below for how we use heuristics
in x86_64 case to keep this under check.

cpu_online_mask: Bitmap of all CPUs currently online. Its set in __cpu_up()
cpu_online_map: Bitmap of all CPUs currently online. Its set in __cpu_up()
after a cpu is available for kernel scheduling and ready to receive
interrupts from devices. Its cleared when a cpu is brought down using
__cpu_disable(), before which all OS services including interrupts are
migrated to another target CPU.

cpu_present_mask: Bitmap of CPUs currently present in the system. Not all
cpu_present_map: Bitmap of CPUs currently present in the system. Not all
of them may be online. When physical hotplug is processed by the relevant
subsystem (e.g ACPI) can change and new bit either be added or removed
from the map depending on the event is hot-add/hot-remove. There are currently
Expand All @@ -99,22 +99,22 @@ at which time hotplug is disabled.

You really dont need to manipulate any of the system cpu maps. They should
be read-only for most use. When setting up per-cpu resources almost always use
cpu_possible_mask/for_each_possible_cpu() to iterate.
cpu_possible_map/for_each_possible_cpu() to iterate.

Never use anything other than cpumask_t to represent bitmap of CPUs.

#include <linux/cpumask.h>

for_each_possible_cpu - Iterate over cpu_possible_mask
for_each_online_cpu - Iterate over cpu_online_mask
for_each_present_cpu - Iterate over cpu_present_mask
for_each_possible_cpu - Iterate over cpu_possible_map
for_each_online_cpu - Iterate over cpu_online_map
for_each_present_cpu - Iterate over cpu_present_map
for_each_cpu_mask(x,mask) - Iterate over some random collection of cpu mask.

#include <linux/cpu.h>
get_online_cpus() and put_online_cpus():

The above calls are used to inhibit cpu hotplug operations. While the
cpu_hotplug.refcount is non zero, the cpu_online_mask will not change.
cpu_hotplug.refcount is non zero, the cpu_online_map will not change.
If you merely need to avoid cpus going away, you could also use
preempt_disable() and preempt_enable() for those sections.
Just remember the critical section cannot call any
Expand Down
10 changes: 5 additions & 5 deletions trunk/Documentation/devicetree/bindings/mtd/atmel-nand.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ nand0: nand@40000000,0 {
reg = <0x40000000 0x10000000
0xffffe800 0x200
>;
atmel,nand-addr-offset = <21>; /* ale */
atmel,nand-cmd-offset = <22>; /* cle */
atmel,nand-addr-offset = <21>;
atmel,nand-cmd-offset = <22>;
nand-on-flash-bbt;
nand-ecc-mode = "soft";
gpios = <&pioC 13 0 /* rdy */
&pioC 14 0 /* nce */
0 /* cd */
gpios = <&pioC 13 0
&pioC 14 0
0
>;
partition@0 {
...
Expand Down

This file was deleted.

8 changes: 8 additions & 0 deletions trunk/Documentation/feature-removal-schedule.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ be removed from this file.

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

What: x86 floppy disable_hlt
When: 2012
Why: ancient workaround of dubious utility clutters the
code used by everybody else.
Who: Len Brown <len.brown@intel.com>

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

What: CONFIG_APM_CPU_IDLE, and its ability to call APM BIOS in idle
When: 2012
Why: This optional sub-feature of APM is of dubious reliability,
Expand Down
2 changes: 1 addition & 1 deletion trunk/Documentation/hwmon/k10temp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Supported chips:
Socket S1G2: Athlon (X2), Sempron (X2), Turion X2 (Ultra)
* AMD Family 12h processors: "Llano" (E2/A4/A6/A8-Series)
* AMD Family 14h processors: "Brazos" (C/E/G/Z-Series)
* AMD Family 15h processors: "Bulldozer" (FX-Series), "Trinity"
* AMD Family 15h processors: "Bulldozer"

Prefix: 'k10temp'
Addresses scanned: PCI space
Expand Down
1 change: 0 additions & 1 deletion trunk/Documentation/ioctl/ioctl-number.txt
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@ Code Seq#(hex) Include File Comments
'j' 00-3F linux/joystick.h
'k' 00-0F linux/spi/spidev.h conflict!
'k' 00-05 video/kyro.h conflict!
'k' 10-17 linux/hsi/hsi_char.h HSI character device
'l' 00-3F linux/tcfs_fs.h transparent cryptographic file system
<http://web.archive.org/web/*/http://mikonos.dia.unisa.it/tcfs>
'l' 40-7F linux/udf_fs_i.h in development:
Expand Down
31 changes: 16 additions & 15 deletions trunk/Documentation/networking/driver.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ Document about softnet driver issues

Transmit path guidelines:

1) The ndo_start_xmit method must not return NETDEV_TX_BUSY under
any normal circumstances. It is considered a hard error unless
1) The hard_start_xmit method must never return '1' under any
normal circumstances. It is considered a hard error unless
there is no way your device can tell ahead of time when it's
transmit function will become busy.

Instead it must maintain the queue properly. For example,
for a driver implementing scatter-gather this means:

static netdev_tx_t drv_hard_start_xmit(struct sk_buff *skb,
struct net_device *dev)
static int drv_hard_start_xmit(struct sk_buff *skb,
struct net_device *dev)
{
struct drv *dp = netdev_priv(dev);

Expand All @@ -23,7 +23,7 @@ Transmit path guidelines:
unlock_tx(dp);
printk(KERN_ERR PFX "%s: BUG! Tx Ring full when queue awake!\n",
dev->name);
return NETDEV_TX_BUSY;
return 1;
}

... queue packet to card ...
Expand All @@ -35,7 +35,6 @@ Transmit path guidelines:
...
unlock_tx(dp);
...
return NETDEV_TX_OK;
}

And then at the end of your TX reclamation event handling:
Expand All @@ -59,22 +58,24 @@ Transmit path guidelines:
TX_BUFFS_AVAIL(dp) > 0)
netif_wake_queue(dp->dev);

2) An ndo_start_xmit method must not modify the shared parts of a
2) Do not forget to update netdev->trans_start to jiffies after
each new tx packet is given to the hardware.

3) A hard_start_xmit method must not modify the shared parts of a
cloned SKB.

3) Do not forget that once you return NETDEV_TX_OK from your
ndo_start_xmit method, it is your driver's responsibility to free
up the SKB and in some finite amount of time.
4) Do not forget that once you return 0 from your hard_start_xmit
method, it is your driver's responsibility to free up the SKB
and in some finite amount of time.

For example, this means that it is not allowed for your TX
mitigation scheme to let TX packets "hang out" in the TX
ring unreclaimed forever if no new TX packets are sent.
This error can deadlock sockets waiting for send buffer room
to be freed up.

If you return NETDEV_TX_BUSY from the ndo_start_xmit method, you
must not keep any reference to that SKB and you must not attempt
to free it up.
If you return 1 from the hard_start_xmit method, you must not keep
any reference to that SKB and you must not attempt to free it up.

Probing guidelines:

Expand All @@ -84,10 +85,10 @@ Probing guidelines:

Close/stop guidelines:

1) After the ndo_stop routine has been called, the hardware must
1) After the dev->stop routine has been called, the hardware must
not receive or transmit any data. All in flight packets must
be aborted. If necessary, poll or wait for completion of
any reset commands.

2) The ndo_stop routine will be called by unregister_netdevice
2) The dev->stop routine will be called by unregister_netdevice
if device is still UP.
11 changes: 9 additions & 2 deletions trunk/Documentation/networking/ip-sysctl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -604,8 +604,15 @@ IP Variables:
ip_local_port_range - 2 INTEGERS
Defines the local port range that is used by TCP and UDP to
choose the local port. The first number is the first, the
second the last local port number. The default values are
32768 and 61000 respectively.
second the last local port number. Default value depends on
amount of memory available on the system:
> 128Mb 32768-61000
< 128Mb 1024-4999 or even less.
This number defines number of active connections, which this
system can issue simultaneously to systems not supporting
TCP extensions (timestamps). With tcp_tw_recycle enabled
(i.e. by default) range 1024-4999 is enough to issue up to
2000 connections per second to systems supporting timestamps.

ip_local_reserved_ports - list of comma separated ranges
Specify the ports which are reserved for known third-party
Expand Down
25 changes: 13 additions & 12 deletions trunk/Documentation/networking/netdevices.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,25 +47,26 @@ packets is preferred.

struct net_device synchronization rules
=======================================
ndo_open:
dev->open:
Synchronization: rtnl_lock() semaphore.
Context: process

ndo_stop:
dev->stop:
Synchronization: rtnl_lock() semaphore.
Context: process
Note: netif_running() is guaranteed false
Note1: netif_running() is guaranteed false
Note2: dev->poll() is guaranteed to be stopped

ndo_do_ioctl:
dev->do_ioctl:
Synchronization: rtnl_lock() semaphore.
Context: process

ndo_get_stats:
dev->get_stats:
Synchronization: dev_base_lock rwlock.
Context: nominally process, but don't sleep inside an rwlock

ndo_start_xmit:
Synchronization: __netif_tx_lock spinlock.
dev->hard_start_xmit:
Synchronization: netif_tx_lock spinlock.

When the driver sets NETIF_F_LLTX in dev->features this will be
called without holding netif_tx_lock. In this case the driver
Expand All @@ -86,20 +87,20 @@ ndo_start_xmit:
o NETDEV_TX_LOCKED Locking failed, please retry quickly.
Only valid when NETIF_F_LLTX is set.

ndo_tx_timeout:
Synchronization: netif_tx_lock spinlock; all TX queues frozen.
dev->tx_timeout:
Synchronization: netif_tx_lock spinlock.
Context: BHs disabled
Notes: netif_queue_stopped() is guaranteed true

ndo_set_rx_mode:
Synchronization: netif_addr_lock spinlock.
dev->set_rx_mode:
Synchronization: netif_tx_lock spinlock.
Context: BHs disabled

struct napi_struct synchronization rules
========================================
napi->poll:
Synchronization: NAPI_STATE_SCHED bit in napi->state. Device
driver's ndo_stop method will invoke napi_disable() on
driver's dev->close method will invoke napi_disable() on
all NAPI instances which will do a sleeping poll on the
NAPI_STATE_SCHED napi->state bit, waiting for all pending
NAPI activity to cease.
Expand Down
Loading

0 comments on commit 4fd3812

Please sign in to comment.