Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 222964
b: refs/heads/master
c: 9f339ca
h: refs/heads/master
v: v3
  • Loading branch information
Bojan Smojver authored and Rafael J. Wysocki committed Dec 6, 2010
1 parent 0548cc3 commit c54b64b
Show file tree
Hide file tree
Showing 416 changed files with 4,512 additions and 5,538 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: 60658f8a293750b59a8a844bf5c387139af9500a
refs/heads/master: 9f339caf8454f0c21983111350ede93983db4340
83 changes: 0 additions & 83 deletions trunk/Documentation/ABI/testing/sysfs-bus-rbd

This file was deleted.

129 changes: 129 additions & 0 deletions trunk/Documentation/driver-model/interface.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@

Device Interfaces

Introduction
~~~~~~~~~~~~

Device interfaces are the logical interfaces of device classes that correlate
directly to userspace interfaces, like device nodes.

Each device class may have multiple interfaces through which you can
access the same device. An input device may support the mouse interface,
the 'evdev' interface, and the touchscreen interface. A SCSI disk would
support the disk interface, the SCSI generic interface, and possibly a raw
device interface.

Device interfaces are registered with the class they belong to. As devices
are added to the class, they are added to each interface registered with
the class. The interface is responsible for determining whether the device
supports the interface or not.


Programming Interface
~~~~~~~~~~~~~~~~~~~~~

struct device_interface {
char * name;
rwlock_t lock;
u32 devnum;
struct device_class * devclass;

struct list_head node;
struct driver_dir_entry dir;

int (*add_device)(struct device *);
int (*add_device)(struct intf_data *);
};

int interface_register(struct device_interface *);
void interface_unregister(struct device_interface *);


An interface must specify the device class it belongs to. It is added
to that class's list of interfaces on registration.


Interfaces can be added to a device class at any time. Whenever it is
added, each device in the class is passed to the interface's
add_device callback. When an interface is removed, each device is
removed from the interface.


Devices
~~~~~~~
Once a device is added to a device class, it is added to each
interface that is registered with the device class. The class
is expected to place a class-specific data structure in
struct device::class_data. The interface can use that (along with
other fields of struct device) to determine whether or not the driver
and/or device support that particular interface.


Data
~~~~

struct intf_data {
struct list_head node;
struct device_interface * intf;
struct device * dev;
u32 intf_num;
};

int interface_add_data(struct interface_data *);

The interface is responsible for allocating and initializing a struct
intf_data and calling interface_add_data() to add it to the device's list
of interfaces it belongs to. This list will be iterated over when the device
is removed from the class (instead of all possible interfaces for a class).
This structure should probably be embedded in whatever per-device data
structure the interface is allocating anyway.

Devices are enumerated within the interface. This happens in interface_add_data()
and the enumerated value is stored in the struct intf_data for that device.

sysfs
~~~~~
Each interface is given a directory in the directory of the device
class it belongs to:

Interfaces get a directory in the class's directory as well:

class/
`-- input
|-- devices
|-- drivers
|-- mouse
`-- evdev

When a device is added to the interface, a symlink is created that points
to the device's directory in the physical hierarchy:

class/
`-- input
|-- devices
| `-- 1 -> ../../../root/pci0/00:1f.0/usb_bus/00:1f.2-1:0/
|-- drivers
| `-- usb:usb_mouse -> ../../../bus/drivers/usb_mouse/
|-- mouse
| `-- 1 -> ../../../root/pci0/00:1f.0/usb_bus/00:1f.2-1:0/
`-- evdev
`-- 1 -> ../../../root/pci0/00:1f.0/usb_bus/00:1f.2-1:0/


Future Plans
~~~~~~~~~~~~
A device interface is correlated directly with a userspace interface
for a device, specifically a device node. For instance, a SCSI disk
exposes at least two interfaces to userspace: the standard SCSI disk
interface and the SCSI generic interface. It might also export a raw
device interface.

Many interfaces have a major number associated with them and each
device gets a minor number. Or, multiple interfaces might share one
major number, and each will receive a range of minor numbers (like in
the case of input devices).

These major and minor numbers could be stored in the interface
structure. Major and minor allocations could happen when the interface
is registered with the class, or via a helper function.

8 changes: 4 additions & 4 deletions trunk/Documentation/edac.txt
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ csrow3.
The representation of the above is reflected in the directory tree
in EDAC's sysfs interface. Starting in directory
/sys/devices/system/edac/mc each memory controller will be represented
by its own 'mcX' directory, where 'X' is the index of the MC.
by its own 'mcX' directory, where 'X" is the index of the MC.


..../edac/mc/
Expand All @@ -207,7 +207,7 @@ by its own 'mcX' directory, where 'X' is the index of the MC.
....

Under each 'mcX' directory each 'csrowX' is again represented by a
'csrowX', where 'X' is the csrow index:
'csrowX', where 'X" is the csrow index:


.../mc/mc0/
Expand All @@ -232,7 +232,7 @@ EDAC control and attribute files.


In 'mcX' directories are EDAC control and attribute files for
this 'X' instance of the memory controllers:
this 'X" instance of the memory controllers:


Counter reset control file:
Expand Down Expand Up @@ -343,7 +343,7 @@ Sdram memory scrubbing rate:
'csrowX' DIRECTORIES

In the 'csrowX' directories are EDAC control and attribute files for
this 'X' instance of csrow:
this 'X" instance of csrow:


Total Uncorrectable Errors count attribute file:
Expand Down
9 changes: 5 additions & 4 deletions trunk/Documentation/filesystems/vfs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -660,10 +660,11 @@ struct address_space_operations {
releasepage: releasepage is called on PagePrivate pages to indicate
that the page should be freed if possible. ->releasepage
should remove any private data from the page and clear the
PagePrivate flag. If releasepage() fails for some reason, it must
indicate failure with a 0 return value.
releasepage() is used in two distinct though related cases. The
first is when the VM finds a clean page with no active users and
PagePrivate flag. It may also remove the page from the
address_space. If this fails for some reason, it may indicate
failure with a 0 return value.
This is used in two distinct though related cases. The first
is when the VM finds a clean page with no active users and
wants to make it a free page. If ->releasepage succeeds, the
page will be removed from the address_space and become free.

Expand Down
1 change: 0 additions & 1 deletion trunk/Documentation/networking/ip-sysctl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ tcp_adv_win_scale - INTEGER
Count buffering overhead as bytes/2^tcp_adv_win_scale
(if tcp_adv_win_scale > 0) or bytes-bytes/2^(-tcp_adv_win_scale),
if it is <= 0.
Possible values are [-31, 31], inclusive.
Default: 2

tcp_allowed_congestion_control - STRING
Expand Down
7 changes: 4 additions & 3 deletions trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -2060,7 +2060,7 @@ F: Documentation/blockdev/drbd/

DRIVER CORE, KOBJECTS, DEBUGFS AND SYSFS
M: Greg Kroah-Hartman <gregkh@suse.de>
T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6.git
T: quilt kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/
S: Supported
F: Documentation/kobject.txt
F: drivers/base/
Expand All @@ -2080,7 +2080,7 @@ F: include/drm/

INTEL DRM DRIVERS (excluding Poulsbo, Moorestown and derivative chipsets)
M: Chris Wilson <chris@chris-wilson.co.uk>
L: intel-gfx@lists.freedesktop.org (subscribers-only)
L: intel-gfx@lists.freedesktop.org
L: dri-devel@lists.freedesktop.org
T: git git://git.kernel.org/pub/scm/linux/kernel/git/ickle/drm-intel.git
S: Supported
Expand Down Expand Up @@ -4064,8 +4064,9 @@ F: drivers/scsi/NCR_D700.*

NETEFFECT IWARP RNIC DRIVER (IW_NES)
M: Faisal Latif <faisal.latif@intel.com>
M: Chien Tung <chien.tin.tung@intel.com>
L: linux-rdma@vger.kernel.org
W: http://www.intel.com/Products/Server/Adapters/Server-Cluster/Server-Cluster-overview.htm
W: http://www.neteffect.com
S: Supported
F: drivers/infiniband/hw/nes/

Expand Down
2 changes: 1 addition & 1 deletion trunk/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 37
EXTRAVERSION = -rc4
EXTRAVERSION = -rc3
NAME = Flesh-Eating Bats with Fangs

# *DOCUMENTATION*
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ config ARM
select GENERIC_ATOMIC64 if (!CPU_32v6K || !AEABI)
select HAVE_OPROFILE if (HAVE_PERF_EVENTS)
select HAVE_ARCH_KGDB
select HAVE_KPROBES if (!XIP_KERNEL && !THUMB2_KERNEL)
select HAVE_KPROBES if (!XIP_KERNEL)
select HAVE_KRETPROBES if (HAVE_KPROBES)
select HAVE_FUNCTION_TRACER if (!XIP_KERNEL)
select HAVE_FTRACE_MCOUNT_RECORD if (!XIP_KERNEL)
Expand Down
5 changes: 5 additions & 0 deletions trunk/arch/arm/boot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,12 @@ else
$(obj)/uImage: LOADADDR=$(ZRELADDR)
endif

ifeq ($(CONFIG_THUMB2_KERNEL),y)
# Set bit 0 to 1 so that "mov pc, rx" switches to Thumb-2 mode
$(obj)/uImage: STARTADDR=$(shell echo $(LOADADDR) | sed -e "s/.$$/1/")
else
$(obj)/uImage: STARTADDR=$(LOADADDR)
endif

$(obj)/uImage: $(obj)/zImage FORCE
$(call if_changed,uimage)
Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/arm/boot/bootp/init.S
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@ move: ldmia r4!, {r7 - r10} @ move 32-bytes at a time

.size _start, . - _start

.align

.type data,#object
data: .word initrd_start @ source initrd address
.word initrd_phys @ destination initrd address
Expand Down
13 changes: 3 additions & 10 deletions trunk/arch/arm/boot/compressed/head.S
Original file line number Diff line number Diff line change
Expand Up @@ -125,21 +125,16 @@ wait: mrc p14, 0, pc, c0, c1, 0
* sort out different calling conventions
*/
.align
.arm @ Always enter in ARM state
start:
.type start,#function
THUMB( adr r12, BSYM(1f) )
THUMB( bx r12 )
THUMB( .rept 6 )
ARM( .rept 8 )
.rept 8
mov r0, r0
.endr

b 1f
.word 0x016f2818 @ Magic numbers to help the loader
.word start @ absolute load/run zImage address
.word _edata @ zImage end address
THUMB( .thumb )
1: mov r7, r1 @ save architecture ID
mov r8, r2 @ save atags pointer

Expand Down Expand Up @@ -179,8 +174,7 @@ not_angel:
ldr sp, [r0, #28]
#ifdef CONFIG_AUTO_ZRELADDR
@ determine final kernel image address
mov r4, pc
and r4, r4, #0xf8000000
and r4, pc, #0xf8000000
add r4, r4, #TEXT_OFFSET
#else
ldr r4, =zreladdr
Expand Down Expand Up @@ -451,8 +445,7 @@ __setup_mmu: sub r3, r4, #16384 @ Page directory size
*/
mov r1, #0x1e
orr r1, r1, #3 << 10
mov r2, pc
mov r2, r2, lsr #20
mov r2, pc, lsr #20
orr r1, r1, r2, lsl #20
add r0, r3, r2, lsl #2
str r1, [r0], #4
Expand Down
Loading

0 comments on commit c54b64b

Please sign in to comment.