2019-05-30 12:03:44 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0
|
2008-07-26 21:20:48 +00:00
|
|
|
# User exported sparc header files
|
|
|
|
|
2018-11-14 05:26:31 +00:00
|
|
|
generated-y += syscall_table_32.h
|
|
|
|
generated-y += syscall_table_64.h
|
|
|
|
generated-y += syscall_table_c32.h
|
2011-08-04 08:35:12 +00:00
|
|
|
generic-y += div64.h
|
2013-03-30 11:44:22 +00:00
|
|
|
generic-y += emergency-restart.h
|
2012-08-03 08:12:38 +00:00
|
|
|
generic-y += exec.h
|
2016-01-17 02:39:30 +00:00
|
|
|
generic-y += export.h
|
2011-08-04 08:35:12 +00:00
|
|
|
generic-y += irq_regs.h
|
2014-09-06 13:43:02 +00:00
|
|
|
generic-y += irq_work.h
|
KVM: export <linux/kvm_para.h> and <asm/kvm_para.h> iif KVM is supported
I do not see any consistency about headers_install of <linux/kvm_para.h>
and <asm/kvm_para.h>.
According to my analysis of Linux 5.1-rc1, there are 3 groups:
[1] Both <linux/kvm_para.h> and <asm/kvm_para.h> are exported
alpha, arm, hexagon, mips, powerpc, s390, sparc, x86
[2] <asm/kvm_para.h> is exported, but <linux/kvm_para.h> is not
arc, arm64, c6x, h8300, ia64, m68k, microblaze, nios2, openrisc,
parisc, sh, unicore32, xtensa
[3] Neither <linux/kvm_para.h> nor <asm/kvm_para.h> is exported
csky, nds32, riscv
This does not match to the actual KVM support. At least, [2] is
half-baked.
Nor do arch maintainers look like they care about this. For example,
commit 0add53713b1c ("microblaze: Add missing kvm_para.h to Kbuild")
exported <asm/kvm_para.h> to user-space in order to fix an in-kernel
build error.
We have two ways to make this consistent:
[A] export both <linux/kvm_para.h> and <asm/kvm_para.h> for all
architectures, irrespective of the KVM support
[B] Match the header export of <linux/kvm_para.h> and <asm/kvm_para.h>
to the KVM support
My first attempt was [A] because the code looks cleaner, but Paolo
suggested [B].
So, this commit goes with [B].
For most architectures, <asm/kvm_para.h> was moved to the kernel-space.
I changed include/uapi/linux/Kbuild so that it checks generated
asm/kvm_para.h as well as check-in ones.
After this commit, there will be two groups:
[1] Both <linux/kvm_para.h> and <asm/kvm_para.h> are exported
arm, arm64, mips, powerpc, s390, x86
[2] Neither <linux/kvm_para.h> nor <asm/kvm_para.h> is exported
alpha, arc, c6x, csky, h8300, hexagon, ia64, m68k, microblaze,
nds32, nios2, openrisc, parisc, riscv, sh, sparc, unicore32, xtensa
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-03-18 09:08:12 +00:00
|
|
|
generic-y += kvm_para.h
|
2014-01-21 23:36:16 +00:00
|
|
|
generic-y += linkage.h
|
2011-08-04 08:35:12 +00:00
|
|
|
generic-y += local.h
|
2014-01-21 23:36:16 +00:00
|
|
|
generic-y += local64.h
|
2014-01-21 23:36:22 +00:00
|
|
|
generic-y += mcs_spinlock.h
|
2015-07-17 23:23:58 +00:00
|
|
|
generic-y += mm-arch-hooks.h
|
2019-02-22 12:49:41 +00:00
|
|
|
generic-y += mmiowb.h
|
2012-09-28 05:01:03 +00:00
|
|
|
generic-y += module.h
|
2018-07-24 11:53:05 +00:00
|
|
|
generic-y += msi.h
|
2014-01-21 23:36:16 +00:00
|
|
|
generic-y += preempt.h
|
2013-03-30 11:44:22 +00:00
|
|
|
generic-y += serial.h
|
2012-11-13 20:18:21 +00: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-26 17:43:17 +00:00
|
|
|
generic-y += word-at-a-time.h
|