Skip to content

Commit

Permalink
Merge with Linus' 2.6 tree
Browse files Browse the repository at this point in the history
  • Loading branch information
Russell King authored and Russell King committed Jul 28, 2005
2 parents 05caac5 + 41c018b commit 661299d
Show file tree
Hide file tree
Showing 628 changed files with 72,452 additions and 6,590 deletions.
6 changes: 3 additions & 3 deletions CREDITS
Original file line number Diff line number Diff line change
Expand Up @@ -1624,10 +1624,10 @@ E: ajoshi@shell.unixbox.com
D: fbdev hacking

N: Jesper Juhl
E: juhl-lkml@dif.dk
D: Various small janitor fixes, cleanups etc.
E: jesper.juhl@gmail.com
D: Various fixes, cleanups and minor features.
S: Lemnosvej 1, 3.tv
S: 2300 Copenhagen S
S: 2300 Copenhagen S.
S: Denmark

N: Jozsef Kadlecsik
Expand Down
1 change: 1 addition & 0 deletions Documentation/Changes
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ o isdn4k-utils 3.1pre1 # isdnctrl 2>&1|grep version
o nfs-utils 1.0.5 # showmount --version
o procps 3.2.0 # ps --version
o oprofile 0.9 # oprofiled --version
o udev 058 # udevinfo -V

Kernel compilation
==================
Expand Down
114 changes: 114 additions & 0 deletions Documentation/infiniband/core_locking.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
INFINIBAND MIDLAYER LOCKING

This guide is an attempt to make explicit the locking assumptions
made by the InfiniBand midlayer. It describes the requirements on
both low-level drivers that sit below the midlayer and upper level
protocols that use the midlayer.

Sleeping and interrupt context

With the following exceptions, a low-level driver implementation of
all of the methods in struct ib_device may sleep. The exceptions
are any methods from the list:

create_ah
modify_ah
query_ah
destroy_ah
bind_mw
post_send
post_recv
poll_cq
req_notify_cq
map_phys_fmr

which may not sleep and must be callable from any context.

The corresponding functions exported to upper level protocol
consumers:

ib_create_ah
ib_modify_ah
ib_query_ah
ib_destroy_ah
ib_bind_mw
ib_post_send
ib_post_recv
ib_req_notify_cq
ib_map_phys_fmr

are therefore safe to call from any context.

In addition, the function

ib_dispatch_event

used by low-level drivers to dispatch asynchronous events through
the midlayer is also safe to call from any context.

Reentrancy

All of the methods in struct ib_device exported by a low-level
driver must be fully reentrant. The low-level driver is required to
perform all synchronization necessary to maintain consistency, even
if multiple function calls using the same object are run
simultaneously.

The IB midlayer does not perform any serialization of function calls.

Because low-level drivers are reentrant, upper level protocol
consumers are not required to perform any serialization. However,
some serialization may be required to get sensible results. For
example, a consumer may safely call ib_poll_cq() on multiple CPUs
simultaneously. However, the ordering of the work completion
information between different calls of ib_poll_cq() is not defined.

Callbacks

A low-level driver must not perform a callback directly from the
same callchain as an ib_device method call. For example, it is not
allowed for a low-level driver to call a consumer's completion event
handler directly from its post_send method. Instead, the low-level
driver should defer this callback by, for example, scheduling a
tasklet to perform the callback.

The low-level driver is responsible for ensuring that multiple
completion event handlers for the same CQ are not called
simultaneously. The driver must guarantee that only one CQ event
handler for a given CQ is running at a time. In other words, the
following situation is not allowed:

CPU1 CPU2

low-level driver ->
consumer CQ event callback:
/* ... */
ib_req_notify_cq(cq, ...);
low-level driver ->
/* ... */ consumer CQ event callback:
/* ... */
return from CQ event handler

The context in which completion event and asynchronous event
callbacks run is not defined. Depending on the low-level driver, it
may be process context, softirq context, or interrupt context.
Upper level protocol consumers may not sleep in a callback.

Hot-plug

A low-level driver announces that a device is ready for use by
consumers when it calls ib_register_device(), all initialization
must be complete before this call. The device must remain usable
until the driver's call to ib_unregister_device() has returned.

A low-level driver must call ib_register_device() and
ib_unregister_device() from process context. It must not hold any
semaphores that could cause deadlock if a consumer calls back into
the driver across these calls.

An upper level protocol consumer may begin using an IB device as
soon as the add method of its struct ib_client is called for that
device. A consumer must finish all cleanup and free all resources
relating to a device before returning from the remove method.

A consumer is permitted to sleep in its add and remove methods.
53 changes: 40 additions & 13 deletions Documentation/infiniband/user_mad.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,37 @@ Creating MAD agents

Receiving MADs

MADs are received using read(). The buffer passed to read() must be
large enough to hold at least one struct ib_user_mad. For example:

struct ib_user_mad mad;
ret = read(fd, &mad, sizeof mad);
if (ret != sizeof mad)
MADs are received using read(). The receive side now supports
RMPP. The buffer passed to read() must be at least one
struct ib_user_mad + 256 bytes. For example:

If the buffer passed is not large enough to hold the received
MAD (RMPP), the errno is set to ENOSPC and the length of the
buffer needed is set in mad.length.

Example for normal MAD (non RMPP) reads:
struct ib_user_mad *mad;
mad = malloc(sizeof *mad + 256);
ret = read(fd, mad, sizeof *mad + 256);
if (ret != sizeof mad + 256) {
perror("read");
free(mad);
}

Example for RMPP reads:
struct ib_user_mad *mad;
mad = malloc(sizeof *mad + 256);
ret = read(fd, mad, sizeof *mad + 256);
if (ret == -ENOSPC)) {
length = mad.length;
free(mad);
mad = malloc(sizeof *mad + length);
ret = read(fd, mad, sizeof *mad + length);
}
if (ret < 0) {
perror("read");
free(mad);
}

In addition to the actual MAD contents, the other struct ib_user_mad
fields will be filled in with information on the received MAD. For
Expand All @@ -50,18 +74,21 @@ Sending MADs

MADs are sent using write(). The agent ID for sending should be
filled into the id field of the MAD, the destination LID should be
filled into the lid field, and so on. For example:
filled into the lid field, and so on. The send side does support
RMPP so arbitrary length MAD can be sent. For example:

struct ib_user_mad *mad;

struct ib_user_mad mad;
mad = malloc(sizeof *mad + mad_length);

/* fill in mad.data */
/* fill in mad->data */

mad.id = my_agent; /* req.id from agent registration */
mad.lid = my_dest; /* in network byte order... */
mad->hdr.id = my_agent; /* req.id from agent registration */
mad->hdr.lid = my_dest; /* in network byte order... */
/* etc. */

ret = write(fd, &mad, sizeof mad);
if (ret != sizeof mad)
ret = write(fd, &mad, sizeof *mad + mad_length);
if (ret != sizeof *mad + mad_length)
perror("write");

Setting IsSM Capability Bit
Expand Down
10 changes: 10 additions & 0 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,16 @@ INSTALLING the kernel:
kernel source. Patches are applied from the current directory, but
an alternative directory can be specified as the second argument.

- If you are upgrading between releases using the stable series patches
(for example, patch-2.6.xx.y), note that these "dot-releases" are
not incremental and must be applied to the 2.6.xx base tree. For
example, if your base kernel is 2.6.12 and you want to apply the
2.6.12.3 patch, you do not and indeed must not first apply the
2.6.12.1 and 2.6.12.2 patches. Similarly, if you are running kernel
version 2.6.12.2 and want to jump to 2.6.12.3, you must first
reverse the 2.6.12.2 patch (that is, patch -R) _before_ applying
the 2.6.12.3 patch.

- Make sure you have no stale .o files and dependencies lying around:

cd linux
Expand Down
5 changes: 5 additions & 0 deletions arch/alpha/kernel/systbls.S
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,11 @@ sys_call_table:
.quad sys_add_key
.quad sys_request_key /* 440 */
.quad sys_keyctl
.quad sys_ioprio_set
.quad sys_ioprio_get
.quad sys_inotify_init
.quad sys_inotify_add_watch /* 445 */
.quad sys_inotify_rm_watch

.size sys_call_table, . - sys_call_table
.type sys_call_table, @object
Expand Down
6 changes: 3 additions & 3 deletions arch/arm/lib/bitops.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
mov r3, r2, lsl r3 @ create mask
1: ldrexb r2, [r1]
ands r0, r2, r3 @ save old value of bit
\instr ip, r2, r3 @ toggle bit
strexb r2, ip, [r1]
cmp r2, #0
\instr r2, r2, r3 @ toggle bit
strexb ip, r2, [r1]
cmp ip, #0
bne 1b
cmp r0, #0
movne r0, #1
Expand Down
5 changes: 5 additions & 0 deletions arch/cris/Kconfig.debug
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,9 @@ config FRAME_POINTER
If you don't debug the kernel, you can say N, but we may not be able
to solve problems without frame pointers.

config DEBUG_NMI_OOPS
bool "NMI causes oops printout"
help
If the system locks up without any debug information you can say Y
here to make it possible to dump an OOPS with an external NMI.
endmenu
66 changes: 45 additions & 21 deletions arch/cris/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $Id: Makefile,v 1.23 2004/10/19 13:07:34 starvik Exp $
# $Id: Makefile,v 1.28 2005/03/17 10:44:37 larsv Exp $
# cris/Makefile
#
# This file is included by the global makefile so that you can add your own
Expand All @@ -15,6 +15,7 @@

arch-y := v10
arch-$(CONFIG_ETRAX_ARCH_V10) := v10
arch-$(CONFIG_ETRAX_ARCH_V32) := v32

# No config avaiable for make clean etc
ifneq ($(arch-y),)
Expand Down Expand Up @@ -46,6 +47,21 @@ core-y += arch/$(ARCH)/$(SARCH)/kernel/ arch/$(ARCH)/$(SARCH)/mm/
drivers-y += arch/$(ARCH)/$(SARCH)/drivers/
libs-y += arch/$(ARCH)/$(SARCH)/lib/ $(LIBGCC)

# cris source path
SRC_ARCH = $(srctree)/arch/$(ARCH)
# cris object files path
OBJ_ARCH = $(objtree)/arch/$(ARCH)

target_boot_arch_dir = $(OBJ_ARCH)/$(SARCH)/boot
target_boot_dir = $(OBJ_ARCH)/boot
src_boot_dir = $(SRC_ARCH)/boot
target_compressed_dir = $(OBJ_ARCH)/boot/compressed
src_compressed_dir = $(SRC_ARCH)/boot/compressed
target_rescue_dir = $(OBJ_ARCH)/boot/rescue
src_rescue_dir = $(SRC_ARCH)/boot/rescue

export target_boot_arch_dir target_boot_dir src_boot_dir target_compressed_dir src_compressed_dir target_rescue_dir src_rescue_dir

vmlinux.bin: vmlinux
$(OBJCOPY) $(OBJCOPYFLAGS) vmlinux vmlinux.bin

Expand All @@ -65,44 +81,52 @@ cramfs:

clinux: vmlinux.bin decompress.bin rescue.bin

decompress.bin: FORCE
@make -C arch/$(ARCH)/boot/compressed decompress.bin
decompress.bin: $(target_boot_dir)
@$(MAKE) -f $(src_compressed_dir)/Makefile $(target_compressed_dir)/decompress.bin

rescue.bin: FORCE
@make -C arch/$(ARCH)/boot/rescue rescue.bin
$(target_rescue_dir)/rescue.bin: $(target_boot_dir)
@$(MAKE) -f $(src_rescue_dir)/Makefile $(target_rescue_dir)/rescue.bin

zImage: vmlinux.bin rescue.bin
zImage: $(target_boot_dir) vmlinux.bin $(target_rescue_dir)/rescue.bin
## zImage - Compressed kernel (gzip)
@make -C arch/$(ARCH)/boot/ zImage
@$(MAKE) -f $(src_boot_dir)/Makefile zImage

$(target_boot_dir): $(target_boot_arch_dir)
ln -sfn $< $@

$(target_boot_arch_dir):
mkdir -p $@

compressed: zImage

archmrproper:
archclean:
$(Q)$(MAKE) $(clean)=arch/$(ARCH)/boot
@if [ -d arch/$(ARCH)/boot ]; then \
$(MAKE) $(clean)=arch/$(ARCH)/boot ; \
fi
rm -f timage vmlinux.bin decompress.bin rescue.bin cramfs.img
rm -rf $(LD_SCRIPT).tmp

prepare: arch/$(ARCH)/.links include/asm-$(ARCH)/.arch \
prepare: $(SRC_ARCH)/.links $(srctree)/include/asm-$(ARCH)/.arch \
include/asm-$(ARCH)/$(SARCH)/offset.h

# Create some links to make all tools happy
arch/$(ARCH)/.links:
@rm -rf arch/$(ARCH)/drivers
@ln -sfn $(SARCH)/drivers arch/$(ARCH)/drivers
@rm -rf arch/$(ARCH)/boot
@ln -sfn $(SARCH)/boot arch/$(ARCH)/boot
@rm -rf arch/$(ARCH)/lib
@ln -sfn $(SARCH)/lib arch/$(ARCH)/lib
@ln -sfn $(SARCH) arch/$(ARCH)/arch
@ln -sfn ../$(SARCH)/vmlinux.lds.S arch/$(ARCH)/kernel/vmlinux.lds.S
$(SRC_ARCH)/.links:
@rm -rf $(SRC_ARCH)/drivers
@ln -sfn $(SRC_ARCH)/$(SARCH)/drivers $(SRC_ARCH)/drivers
@rm -rf $(SRC_ARCH)/boot
@ln -sfn $(SRC_ARCH)/$(SARCH)/boot $(SRC_ARCH)/boot
@rm -rf $(SRC_ARCH)/lib
@ln -sfn $(SRC_ARCH)/$(SARCH)/lib $(SRC_ARCH)/lib
@ln -sfn $(SRC_ARCH)/$(SARCH) $(SRC_ARCH)/arch
@ln -sfn $(SRC_ARCH)/$(SARCH)/vmlinux.lds.S $(SRC_ARCH)/kernel/vmlinux.lds.S
@touch $@

# Create link to sub arch includes
include/asm-$(ARCH)/.arch: $(wildcard include/config/arch/*.h)
@echo ' Making asm-$(ARCH)/arch -> asm-$(ARCH)/$(SARCH) symlink'
$(srctree)/include/asm-$(ARCH)/.arch: $(wildcard include/config/arch/*.h)
@echo ' Making $(srctree)/include/asm-$(ARCH)/arch -> $(srctree)/include/asm-$(ARCH)/$(SARCH) symlink'
@rm -f include/asm-$(ARCH)/arch
@ln -sf $(SARCH) include/asm-$(ARCH)/arch
@ln -sf $(srctree)/include/asm-$(ARCH)/$(SARCH) $(srctree)/include/asm-$(ARCH)/arch
@touch $@

arch/$(ARCH)/$(SARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
Expand Down
Loading

0 comments on commit 661299d

Please sign in to comment.