2008-07-27 05:20:48 +08:00
|
|
|
# User exported sparc header files
|
|
|
|
|
2011-08-04 16:35:12 +08:00
|
|
|
|
|
|
|
generic-y += div64.h
|
2013-03-30 19:44:22 +08:00
|
|
|
generic-y += emergency-restart.h
|
2012-08-03 16:12:38 +08:00
|
|
|
generic-y += exec.h
|
2016-01-17 10:39:30 +08:00
|
|
|
generic-y += export.h
|
2011-08-04 16:35:12 +08:00
|
|
|
generic-y += irq_regs.h
|
2014-09-06 21:43:02 +08:00
|
|
|
generic-y += irq_work.h
|
2014-01-22 07:36:16 +08:00
|
|
|
generic-y += linkage.h
|
2011-08-04 16:35:12 +08:00
|
|
|
generic-y += local.h
|
2014-01-22 07:36:16 +08:00
|
|
|
generic-y += local64.h
|
2014-01-22 07:36:22 +08:00
|
|
|
generic-y += mcs_spinlock.h
|
2015-07-18 07:23:58 +08:00
|
|
|
generic-y += mm-arch-hooks.h
|
2012-09-28 13:01:03 +08:00
|
|
|
generic-y += module.h
|
2018-07-24 19:53:05 +08:00
|
|
|
generic-y += msi.h
|
2014-01-22 07:36:16 +08:00
|
|
|
generic-y += preempt.h
|
2016-04-07 23:12:25 +08:00
|
|
|
generic-y += rwsem.h
|
2013-03-30 19:44:22 +08:00
|
|
|
generic-y += serial.h
|
2012-11-14 04:18:21 +08:00
|
|
|
generic-y += trace_clock.h
|
word-at-a-time: make the interfaces truly generic
This changes the interfaces in <asm/word-at-a-time.h> to be a bit more
complicated, but a lot more generic.
In particular, it allows us to really do the operations efficiently on
both little-endian and big-endian machines, pretty much regardless of
machine details. For example, if you can rely on a fast population
count instruction on your architecture, this will allow you to make your
optimized <asm/word-at-a-time.h> file with that.
NOTE! The "generic" version in include/asm-generic/word-at-a-time.h is
not truly generic, it actually only works on big-endian. Why? Because
on little-endian the generic algorithms are wasteful, since you can
inevitably do better. The x86 implementation is an example of that.
(The only truly non-generic part of the asm-generic implementation is
the "find_zero()" function, and you could make a little-endian version
of it. And if the Kbuild infrastructure allowed us to pick a particular
header file, that would be lovely)
The <asm/word-at-a-time.h> functions are as follows:
- WORD_AT_A_TIME_CONSTANTS: specific constants that the algorithm
uses.
- has_zero(): take a word, and determine if it has a zero byte in it.
It gets the word, the pointer to the constant pool, and a pointer to
an intermediate "data" field it can set.
This is the "quick-and-dirty" zero tester: it's what is run inside
the hot loops.
- "prep_zero_mask()": take the word, the data that has_zero() produced,
and the constant pool, and generate an *exact* mask of which byte had
the first zero. This is run directly *outside* the loop, and allows
the "has_zero()" function to answer the "is there a zero byte"
question without necessarily getting exactly *which* byte is the
first one to contain a zero.
If you do multiple byte lookups concurrently (eg "hash_name()", which
looks for both NUL and '/' bytes), after you've done the prep_zero_mask()
phase, the result of those can be or'ed together to get the "either
or" case.
- The result from "prep_zero_mask()" can then be fed into "find_zero()"
(to find the byte offset of the first byte that was zero) or into
"zero_bytemask()" (to find the bytemask of the bytes preceding the
zero byte).
The existence of zero_bytemask() is optional, and is not necessary
for the normal string routines. But dentry name hashing needs it, so
if you enable DENTRY_WORD_AT_A_TIME you need to expose it.
This changes the generic strncpy_from_user() function and the dentry
hashing functions to use these modified word-at-a-time interfaces. This
gets us back to the optimized state of the x86 strncpy that we lost in
the previous commit when moving over to the generic version.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-05-27 01:43:17 +08:00
|
|
|
generic-y += word-at-a-time.h
|