Commit Graph

7 Commits (e5835fba0206a331bdefdf5d805d1a384af37c44)

Author SHA1 Message Date
Stefan Richter 611aa19fd6 ieee1394: safer definition of empty macros
A deactivated macro, defined as "#define foo(bar)", will result in
silent corruption if somebody forgets a semicolon after a call to foo.
Replace it by "#define foo(bar) do {} while (0)" which will reveal any
respective syntax errors.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-09-17 19:31:20 +02:00
Stefan Richter 9951903e61 ieee1394: shrink tlabel pools, remove tpool semaphores
This patch reduces the size of struct hpsb_host and also removes
semaphores from ieee1394_transactions.c.  On i386, struct hpsb_host
shrinks from 10656 bytes to 6688 bytes.  This is accomplished by
 - using a single wait_queue for hpsb_get_tlabel instead of many
   instances of semaphores,
 - using a single lock to serialize access to all tlabel pools (the
   protected code regions are small, i.e. lock contention very low),
 - omitting the sysfs attribute tlabels_allocations.

Drawback:  In the rare case that a process needs to sleep because all
transaction labels for the node are temporarily exhausted, it is also
woken up if a tlabel for a different node became free, checks for an
available tlabel, and is put to sleep again.  The check is not costly
and the situation occurs extremely rarely.  (Tlabels are typically
only exhausted if there was no context switch to the khpsbpkt thread
which recycles tlables.)  Therefore the benefit of reduced tpool size
outweighs this drawback.

The sysfs attributes tlabels_free and tlabels_mask are not compiled
anymore unless CONFIG_IEEE1394_VERBOSEDEBUG is set.

The by far biggest member of struct hpsb_host, the struct csr_control
csr (5272 bytes on i386), is now placed at the end of struct hpsb_host.

Note, hpsb_get_tlabel calls the macro wait_event_interruptible with a
condition argument which has a side effect (allocation of a tlabel and
manipulation of the packet).  This side effect happens only if the
condition is true.  The patch relies on wait_event_interruptible not
evaluating the condition again after it became true.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-09-17 19:17:13 +02:00
Stefan Richter d83e7d8e7e [PATCH] ieee1394: remove unused macros HPSB_PANIC and HPSB_TRACE
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
2006-07-03 12:02:31 -04:00
Stefan Richter de4394f13c [PATCH] ieee1394: update #include directives in midlayer header files
Remove unnecessary includes, add missing includes.
Use forward type declarations for some structs.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
2006-07-03 12:02:29 -04:00
Stefan Richter e1d118f16d [PATCH] ieee1394: coding style and comment fixes in midlayer header files
Adjust tabulators, line wraps, empty lines, and comment style.
Update comments in ieee1394_transactions.h and highlevel.h.
Fix typo in comment in csr.h.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
2006-07-03 12:02:28 -04:00
Stefan Richter 2b01b80b94 [PATCH] ieee1394: replace __inline__ by inline
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
2006-07-03 12:02:28 -04:00
Linus Torvalds 1da177e4c3 Linux-2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!
2005-04-16 15:20:36 -07:00