diff options
author | Daniel Borkmann <dborkman@redhat.com> | 2014-12-10 10:33:12 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-12-10 15:17:46 -0500 |
commit | 0cb6c969ed9de43687abdfc63714b6fe4385d2fc (patch) | |
tree | 30e47760509e3e41d802cc6d279a6205b77faac9 | |
parent | 87545899b52f9c8b1621be4347f443890c0cb196 (diff) |
net, lib: kill arch_fast_hash library bits
As there are now no remaining users of arch_fast_hash(), lets kill
it entirely.
This basically reverts commit 71ae8aac3e19 ("lib: introduce arch
optimized hash library") and follow-up work, that is f.e., commit
237217546d44 ("lib: hash: follow-up fixups for arch hash"),
commit e3fec2f74f7f ("lib: Add missing arch generic-y entries for
asm-generic/hash.h") and last but not least commit 6a02652df511
("perf tools: Fix include for non x86 architectures").
Cc: Francesco Fusco <fusco@ntop.org>
Cc: Thomas Graf <tgraf@suug.ch>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
36 files changed, 2 insertions, 218 deletions
diff --git a/arch/alpha/include/asm/Kbuild b/arch/alpha/include/asm/Kbuild index 25b49725df07..76aeb8fa551a 100644 --- a/arch/alpha/include/asm/Kbuild +++ b/arch/alpha/include/asm/Kbuild | |||
@@ -3,7 +3,6 @@ | |||
3 | generic-y += clkdev.h | 3 | generic-y += clkdev.h |
4 | generic-y += cputime.h | 4 | generic-y += cputime.h |
5 | generic-y += exec.h | 5 | generic-y += exec.h |
6 | generic-y += hash.h | ||
7 | generic-y += irq_work.h | 6 | generic-y += irq_work.h |
8 | generic-y += mcs_spinlock.h | 7 | generic-y += mcs_spinlock.h |
9 | generic-y += preempt.h | 8 | generic-y += preempt.h |
diff --git a/arch/arc/include/asm/Kbuild b/arch/arc/include/asm/Kbuild index b8fffc1a2ac2..be0c39e76f7c 100644 --- a/arch/arc/include/asm/Kbuild +++ b/arch/arc/include/asm/Kbuild | |||
@@ -12,7 +12,6 @@ generic-y += fb.h | |||
12 | generic-y += fcntl.h | 12 | generic-y += fcntl.h |
13 | generic-y += ftrace.h | 13 | generic-y += ftrace.h |
14 | generic-y += hardirq.h | 14 | generic-y += hardirq.h |
15 | generic-y += hash.h | ||
16 | generic-y += hw_irq.h | 15 | generic-y += hw_irq.h |
17 | generic-y += ioctl.h | 16 | generic-y += ioctl.h |
18 | generic-y += ioctls.h | 17 | generic-y += ioctls.h |
diff --git a/arch/arm/include/asm/Kbuild b/arch/arm/include/asm/Kbuild index 70cd84eb7fda..fe74c0d1e485 100644 --- a/arch/arm/include/asm/Kbuild +++ b/arch/arm/include/asm/Kbuild | |||
@@ -7,7 +7,6 @@ generic-y += current.h | |||
7 | generic-y += emergency-restart.h | 7 | generic-y += emergency-restart.h |
8 | generic-y += errno.h | 8 | generic-y += errno.h |
9 | generic-y += exec.h | 9 | generic-y += exec.h |
10 | generic-y += hash.h | ||
11 | generic-y += ioctl.h | 10 | generic-y += ioctl.h |
12 | generic-y += ipcbuf.h | 11 | generic-y += ipcbuf.h |
13 | generic-y += irq_regs.h | 12 | generic-y += irq_regs.h |
diff --git a/arch/arm64/include/asm/Kbuild b/arch/arm64/include/asm/Kbuild index dc770bd4f5a5..6b61091c7f4c 100644 --- a/arch/arm64/include/asm/Kbuild +++ b/arch/arm64/include/asm/Kbuild | |||
@@ -14,7 +14,6 @@ generic-y += early_ioremap.h | |||
14 | generic-y += emergency-restart.h | 14 | generic-y += emergency-restart.h |
15 | generic-y += errno.h | 15 | generic-y += errno.h |
16 | generic-y += ftrace.h | 16 | generic-y += ftrace.h |
17 | generic-y += hash.h | ||
18 | generic-y += hw_irq.h | 17 | generic-y += hw_irq.h |
19 | generic-y += ioctl.h | 18 | generic-y += ioctl.h |
20 | generic-y += ioctls.h | 19 | generic-y += ioctls.h |
diff --git a/arch/avr32/include/asm/Kbuild b/arch/avr32/include/asm/Kbuild index 2a71b1cb9848..528d70d47a54 100644 --- a/arch/avr32/include/asm/Kbuild +++ b/arch/avr32/include/asm/Kbuild | |||
@@ -7,7 +7,6 @@ generic-y += div64.h | |||
7 | generic-y += emergency-restart.h | 7 | generic-y += emergency-restart.h |
8 | generic-y += exec.h | 8 | generic-y += exec.h |
9 | generic-y += futex.h | 9 | generic-y += futex.h |
10 | generic-y += hash.h | ||
11 | generic-y += irq_regs.h | 10 | generic-y += irq_regs.h |
12 | generic-y += irq_work.h | 11 | generic-y += irq_work.h |
13 | generic-y += local.h | 12 | generic-y += local.h |
diff --git a/arch/blackfin/include/asm/Kbuild b/arch/blackfin/include/asm/Kbuild index 46ed6bb9c679..4bd3c3cfc9ab 100644 --- a/arch/blackfin/include/asm/Kbuild +++ b/arch/blackfin/include/asm/Kbuild | |||
@@ -10,7 +10,6 @@ generic-y += emergency-restart.h | |||
10 | generic-y += errno.h | 10 | generic-y += errno.h |
11 | generic-y += fb.h | 11 | generic-y += fb.h |
12 | generic-y += futex.h | 12 | generic-y += futex.h |
13 | generic-y += hash.h | ||
14 | generic-y += hw_irq.h | 13 | generic-y += hw_irq.h |
15 | generic-y += ioctl.h | 14 | generic-y += ioctl.h |
16 | generic-y += ipcbuf.h | 15 | generic-y += ipcbuf.h |
diff --git a/arch/c6x/include/asm/Kbuild b/arch/c6x/include/asm/Kbuild index e77e0c1dbe75..2de73391b81e 100644 --- a/arch/c6x/include/asm/Kbuild +++ b/arch/c6x/include/asm/Kbuild | |||
@@ -15,7 +15,6 @@ generic-y += exec.h | |||
15 | generic-y += fb.h | 15 | generic-y += fb.h |
16 | generic-y += fcntl.h | 16 | generic-y += fcntl.h |
17 | generic-y += futex.h | 17 | generic-y += futex.h |
18 | generic-y += hash.h | ||
19 | generic-y += hw_irq.h | 18 | generic-y += hw_irq.h |
20 | generic-y += io.h | 19 | generic-y += io.h |
21 | generic-y += ioctl.h | 20 | generic-y += ioctl.h |
diff --git a/arch/cris/include/asm/Kbuild b/arch/cris/include/asm/Kbuild index 2ca489eaadd3..d5f124832fd1 100644 --- a/arch/cris/include/asm/Kbuild +++ b/arch/cris/include/asm/Kbuild | |||
@@ -7,7 +7,6 @@ generic-y += barrier.h | |||
7 | generic-y += clkdev.h | 7 | generic-y += clkdev.h |
8 | generic-y += cputime.h | 8 | generic-y += cputime.h |
9 | generic-y += exec.h | 9 | generic-y += exec.h |
10 | generic-y += hash.h | ||
11 | generic-y += irq_work.h | 10 | generic-y += irq_work.h |
12 | generic-y += kvm_para.h | 11 | generic-y += kvm_para.h |
13 | generic-y += linkage.h | 12 | generic-y += linkage.h |
diff --git a/arch/frv/include/asm/Kbuild b/arch/frv/include/asm/Kbuild index 3caf05cabfc5..e3f81b53578e 100644 --- a/arch/frv/include/asm/Kbuild +++ b/arch/frv/include/asm/Kbuild | |||
@@ -2,7 +2,6 @@ | |||
2 | generic-y += clkdev.h | 2 | generic-y += clkdev.h |
3 | generic-y += cputime.h | 3 | generic-y += cputime.h |
4 | generic-y += exec.h | 4 | generic-y += exec.h |
5 | generic-y += hash.h | ||
6 | generic-y += irq_work.h | 5 | generic-y += irq_work.h |
7 | generic-y += mcs_spinlock.h | 6 | generic-y += mcs_spinlock.h |
8 | generic-y += preempt.h | 7 | generic-y += preempt.h |
diff --git a/arch/hexagon/include/asm/Kbuild b/arch/hexagon/include/asm/Kbuild index 5f234a5a2320..c7a99f860b40 100644 --- a/arch/hexagon/include/asm/Kbuild +++ b/arch/hexagon/include/asm/Kbuild | |||
@@ -16,7 +16,6 @@ generic-y += fb.h | |||
16 | generic-y += fcntl.h | 16 | generic-y += fcntl.h |
17 | generic-y += ftrace.h | 17 | generic-y += ftrace.h |
18 | generic-y += hardirq.h | 18 | generic-y += hardirq.h |
19 | generic-y += hash.h | ||
20 | generic-y += hw_irq.h | 19 | generic-y += hw_irq.h |
21 | generic-y += ioctl.h | 20 | generic-y += ioctl.h |
22 | generic-y += ioctls.h | 21 | generic-y += ioctls.h |
diff --git a/arch/ia64/include/asm/Kbuild b/arch/ia64/include/asm/Kbuild index 747320be9d0e..9b41b4bcc073 100644 --- a/arch/ia64/include/asm/Kbuild +++ b/arch/ia64/include/asm/Kbuild | |||
@@ -1,7 +1,6 @@ | |||
1 | 1 | ||
2 | generic-y += clkdev.h | 2 | generic-y += clkdev.h |
3 | generic-y += exec.h | 3 | generic-y += exec.h |
4 | generic-y += hash.h | ||
5 | generic-y += irq_work.h | 4 | generic-y += irq_work.h |
6 | generic-y += kvm_para.h | 5 | generic-y += kvm_para.h |
7 | generic-y += mcs_spinlock.h | 6 | generic-y += mcs_spinlock.h |
diff --git a/arch/m32r/include/asm/Kbuild b/arch/m32r/include/asm/Kbuild index 3796801d6e0c..2edc793372fc 100644 --- a/arch/m32r/include/asm/Kbuild +++ b/arch/m32r/include/asm/Kbuild | |||
@@ -2,7 +2,6 @@ | |||
2 | generic-y += clkdev.h | 2 | generic-y += clkdev.h |
3 | generic-y += cputime.h | 3 | generic-y += cputime.h |
4 | generic-y += exec.h | 4 | generic-y += exec.h |
5 | generic-y += hash.h | ||
6 | generic-y += irq_work.h | 5 | generic-y += irq_work.h |
7 | generic-y += mcs_spinlock.h | 6 | generic-y += mcs_spinlock.h |
8 | generic-y += module.h | 7 | generic-y += module.h |
diff --git a/arch/m68k/include/asm/Kbuild b/arch/m68k/include/asm/Kbuild index dbaf9f3065e8..9b6c691874bd 100644 --- a/arch/m68k/include/asm/Kbuild +++ b/arch/m68k/include/asm/Kbuild | |||
@@ -6,7 +6,6 @@ generic-y += device.h | |||
6 | generic-y += emergency-restart.h | 6 | generic-y += emergency-restart.h |
7 | generic-y += errno.h | 7 | generic-y += errno.h |
8 | generic-y += exec.h | 8 | generic-y += exec.h |
9 | generic-y += hash.h | ||
10 | generic-y += hw_irq.h | 9 | generic-y += hw_irq.h |
11 | generic-y += ioctl.h | 10 | generic-y += ioctl.h |
12 | generic-y += ipcbuf.h | 11 | generic-y += ipcbuf.h |
diff --git a/arch/metag/include/asm/Kbuild b/arch/metag/include/asm/Kbuild index 7b8111c8f937..0bf5d525b945 100644 --- a/arch/metag/include/asm/Kbuild +++ b/arch/metag/include/asm/Kbuild | |||
@@ -13,7 +13,6 @@ generic-y += fb.h | |||
13 | generic-y += fcntl.h | 13 | generic-y += fcntl.h |
14 | generic-y += futex.h | 14 | generic-y += futex.h |
15 | generic-y += hardirq.h | 15 | generic-y += hardirq.h |
16 | generic-y += hash.h | ||
17 | generic-y += hw_irq.h | 16 | generic-y += hw_irq.h |
18 | generic-y += ioctl.h | 17 | generic-y += ioctl.h |
19 | generic-y += ioctls.h | 18 | generic-y += ioctls.h |
diff --git a/arch/microblaze/include/asm/Kbuild b/arch/microblaze/include/asm/Kbuild index 448143b8cabd..ab564a6db5c3 100644 --- a/arch/microblaze/include/asm/Kbuild +++ b/arch/microblaze/include/asm/Kbuild | |||
@@ -4,7 +4,6 @@ generic-y += clkdev.h | |||
4 | generic-y += cputime.h | 4 | generic-y += cputime.h |
5 | generic-y += device.h | 5 | generic-y += device.h |
6 | generic-y += exec.h | 6 | generic-y += exec.h |
7 | generic-y += hash.h | ||
8 | generic-y += irq_work.h | 7 | generic-y += irq_work.h |
9 | generic-y += mcs_spinlock.h | 8 | generic-y += mcs_spinlock.h |
10 | generic-y += preempt.h | 9 | generic-y += preempt.h |
diff --git a/arch/mips/include/asm/Kbuild b/arch/mips/include/asm/Kbuild index 72e1cf1cab00..200efeac4181 100644 --- a/arch/mips/include/asm/Kbuild +++ b/arch/mips/include/asm/Kbuild | |||
@@ -3,7 +3,6 @@ generic-y += cputime.h | |||
3 | generic-y += current.h | 3 | generic-y += current.h |
4 | generic-y += dma-contiguous.h | 4 | generic-y += dma-contiguous.h |
5 | generic-y += emergency-restart.h | 5 | generic-y += emergency-restart.h |
6 | generic-y += hash.h | ||
7 | generic-y += irq_work.h | 6 | generic-y += irq_work.h |
8 | generic-y += local64.h | 7 | generic-y += local64.h |
9 | generic-y += mcs_spinlock.h | 8 | generic-y += mcs_spinlock.h |
diff --git a/arch/mn10300/include/asm/Kbuild b/arch/mn10300/include/asm/Kbuild index 54a062cb9f2c..f892d9de47d9 100644 --- a/arch/mn10300/include/asm/Kbuild +++ b/arch/mn10300/include/asm/Kbuild | |||
@@ -3,7 +3,6 @@ generic-y += barrier.h | |||
3 | generic-y += clkdev.h | 3 | generic-y += clkdev.h |
4 | generic-y += cputime.h | 4 | generic-y += cputime.h |
5 | generic-y += exec.h | 5 | generic-y += exec.h |
6 | generic-y += hash.h | ||
7 | generic-y += irq_work.h | 6 | generic-y += irq_work.h |
8 | generic-y += mcs_spinlock.h | 7 | generic-y += mcs_spinlock.h |
9 | generic-y += preempt.h | 8 | generic-y += preempt.h |
diff --git a/arch/openrisc/include/asm/Kbuild b/arch/openrisc/include/asm/Kbuild index 89b61d7dc790..91f1f360a7c4 100644 --- a/arch/openrisc/include/asm/Kbuild +++ b/arch/openrisc/include/asm/Kbuild | |||
@@ -25,7 +25,6 @@ generic-y += fcntl.h | |||
25 | generic-y += ftrace.h | 25 | generic-y += ftrace.h |
26 | generic-y += futex.h | 26 | generic-y += futex.h |
27 | generic-y += hardirq.h | 27 | generic-y += hardirq.h |
28 | generic-y += hash.h | ||
29 | generic-y += hw_irq.h | 28 | generic-y += hw_irq.h |
30 | generic-y += ioctl.h | 29 | generic-y += ioctl.h |
31 | generic-y += ioctls.h | 30 | generic-y += ioctls.h |
diff --git a/arch/parisc/include/asm/Kbuild b/arch/parisc/include/asm/Kbuild index ffb024b8423f..8686237a3c3c 100644 --- a/arch/parisc/include/asm/Kbuild +++ b/arch/parisc/include/asm/Kbuild | |||
@@ -7,7 +7,6 @@ generic-y += device.h | |||
7 | generic-y += div64.h | 7 | generic-y += div64.h |
8 | generic-y += emergency-restart.h | 8 | generic-y += emergency-restart.h |
9 | generic-y += exec.h | 9 | generic-y += exec.h |
10 | generic-y += hash.h | ||
11 | generic-y += hw_irq.h | 10 | generic-y += hw_irq.h |
12 | generic-y += irq_regs.h | 11 | generic-y += irq_regs.h |
13 | generic-y += irq_work.h | 12 | generic-y += irq_work.h |
diff --git a/arch/powerpc/include/asm/Kbuild b/arch/powerpc/include/asm/Kbuild index 31e8f59aff38..382b28e364dc 100644 --- a/arch/powerpc/include/asm/Kbuild +++ b/arch/powerpc/include/asm/Kbuild | |||
@@ -1,6 +1,5 @@ | |||
1 | 1 | ||
2 | generic-y += clkdev.h | 2 | generic-y += clkdev.h |
3 | generic-y += hash.h | ||
4 | generic-y += irq_work.h | 3 | generic-y += irq_work.h |
5 | generic-y += mcs_spinlock.h | 4 | generic-y += mcs_spinlock.h |
6 | generic-y += preempt.h | 5 | generic-y += preempt.h |
diff --git a/arch/s390/include/asm/Kbuild b/arch/s390/include/asm/Kbuild index 773f86676588..c631f98fd524 100644 --- a/arch/s390/include/asm/Kbuild +++ b/arch/s390/include/asm/Kbuild | |||
@@ -1,7 +1,6 @@ | |||
1 | 1 | ||
2 | 2 | ||
3 | generic-y += clkdev.h | 3 | generic-y += clkdev.h |
4 | generic-y += hash.h | ||
5 | generic-y += irq_work.h | 4 | generic-y += irq_work.h |
6 | generic-y += mcs_spinlock.h | 5 | generic-y += mcs_spinlock.h |
7 | generic-y += preempt.h | 6 | generic-y += preempt.h |
diff --git a/arch/score/include/asm/Kbuild b/arch/score/include/asm/Kbuild index 46461c19f284..83ed116d414c 100644 --- a/arch/score/include/asm/Kbuild +++ b/arch/score/include/asm/Kbuild | |||
@@ -5,7 +5,6 @@ header-y += | |||
5 | generic-y += barrier.h | 5 | generic-y += barrier.h |
6 | generic-y += clkdev.h | 6 | generic-y += clkdev.h |
7 | generic-y += cputime.h | 7 | generic-y += cputime.h |
8 | generic-y += hash.h | ||
9 | generic-y += irq_work.h | 8 | generic-y += irq_work.h |
10 | generic-y += mcs_spinlock.h | 9 | generic-y += mcs_spinlock.h |
11 | generic-y += preempt.h | 10 | generic-y += preempt.h |
diff --git a/arch/sh/include/asm/Kbuild b/arch/sh/include/asm/Kbuild index 5a6c9acff0d2..654ebb6bd5d8 100644 --- a/arch/sh/include/asm/Kbuild +++ b/arch/sh/include/asm/Kbuild | |||
@@ -8,7 +8,6 @@ generic-y += emergency-restart.h | |||
8 | generic-y += errno.h | 8 | generic-y += errno.h |
9 | generic-y += exec.h | 9 | generic-y += exec.h |
10 | generic-y += fcntl.h | 10 | generic-y += fcntl.h |
11 | generic-y += hash.h | ||
12 | generic-y += ioctl.h | 11 | generic-y += ioctl.h |
13 | generic-y += ipcbuf.h | 12 | generic-y += ipcbuf.h |
14 | generic-y += irq_regs.h | 13 | generic-y += irq_regs.h |
diff --git a/arch/sparc/include/asm/Kbuild b/arch/sparc/include/asm/Kbuild index f5f94ce1692c..94f36e7086a7 100644 --- a/arch/sparc/include/asm/Kbuild +++ b/arch/sparc/include/asm/Kbuild | |||
@@ -6,7 +6,6 @@ generic-y += cputime.h | |||
6 | generic-y += div64.h | 6 | generic-y += div64.h |
7 | generic-y += emergency-restart.h | 7 | generic-y += emergency-restart.h |
8 | generic-y += exec.h | 8 | generic-y += exec.h |
9 | generic-y += hash.h | ||
10 | generic-y += irq_regs.h | 9 | generic-y += irq_regs.h |
11 | generic-y += irq_work.h | 10 | generic-y += irq_work.h |
12 | generic-y += linkage.h | 11 | generic-y += linkage.h |
diff --git a/arch/tile/include/asm/Kbuild b/arch/tile/include/asm/Kbuild index e6462b8a6284..b4c488b65745 100644 --- a/arch/tile/include/asm/Kbuild +++ b/arch/tile/include/asm/Kbuild | |||
@@ -11,7 +11,6 @@ generic-y += errno.h | |||
11 | generic-y += exec.h | 11 | generic-y += exec.h |
12 | generic-y += fb.h | 12 | generic-y += fb.h |
13 | generic-y += fcntl.h | 13 | generic-y += fcntl.h |
14 | generic-y += hash.h | ||
15 | generic-y += hw_irq.h | 14 | generic-y += hw_irq.h |
16 | generic-y += ioctl.h | 15 | generic-y += ioctl.h |
17 | generic-y += ioctls.h | 16 | generic-y += ioctls.h |
diff --git a/arch/um/include/asm/Kbuild b/arch/um/include/asm/Kbuild index 244b12c8cb39..9176fa11d49b 100644 --- a/arch/um/include/asm/Kbuild +++ b/arch/um/include/asm/Kbuild | |||
@@ -10,7 +10,6 @@ generic-y += exec.h | |||
10 | generic-y += ftrace.h | 10 | generic-y += ftrace.h |
11 | generic-y += futex.h | 11 | generic-y += futex.h |
12 | generic-y += hardirq.h | 12 | generic-y += hardirq.h |
13 | generic-y += hash.h | ||
14 | generic-y += hw_irq.h | 13 | generic-y += hw_irq.h |
15 | generic-y += io.h | 14 | generic-y += io.h |
16 | generic-y += irq_regs.h | 15 | generic-y += irq_regs.h |
diff --git a/arch/unicore32/include/asm/Kbuild b/arch/unicore32/include/asm/Kbuild index 5a2bb53faa42..3e0c19d0f4c5 100644 --- a/arch/unicore32/include/asm/Kbuild +++ b/arch/unicore32/include/asm/Kbuild | |||
@@ -16,7 +16,6 @@ generic-y += fcntl.h | |||
16 | generic-y += ftrace.h | 16 | generic-y += ftrace.h |
17 | generic-y += futex.h | 17 | generic-y += futex.h |
18 | generic-y += hardirq.h | 18 | generic-y += hardirq.h |
19 | generic-y += hash.h | ||
20 | generic-y += hw_irq.h | 19 | generic-y += hw_irq.h |
21 | generic-y += ioctl.h | 20 | generic-y += ioctl.h |
22 | generic-y += ioctls.h | 21 | generic-y += ioctls.h |
diff --git a/arch/x86/include/asm/hash.h b/arch/x86/include/asm/hash.h deleted file mode 100644 index e8c58f88b1d4..000000000000 --- a/arch/x86/include/asm/hash.h +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | #ifndef _ASM_X86_HASH_H | ||
2 | #define _ASM_X86_HASH_H | ||
3 | |||
4 | struct fast_hash_ops; | ||
5 | extern void setup_arch_fast_hash(struct fast_hash_ops *ops); | ||
6 | |||
7 | #endif /* _ASM_X86_HASH_H */ | ||
diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile index db92793b7e23..1530afb07c85 100644 --- a/arch/x86/lib/Makefile +++ b/arch/x86/lib/Makefile | |||
@@ -23,7 +23,7 @@ lib-y += memcpy_$(BITS).o | |||
23 | lib-$(CONFIG_RWSEM_XCHGADD_ALGORITHM) += rwsem.o | 23 | lib-$(CONFIG_RWSEM_XCHGADD_ALGORITHM) += rwsem.o |
24 | lib-$(CONFIG_INSTRUCTION_DECODER) += insn.o inat.o | 24 | lib-$(CONFIG_INSTRUCTION_DECODER) += insn.o inat.o |
25 | 25 | ||
26 | obj-y += msr.o msr-reg.o msr-reg-export.o hash.o | 26 | obj-y += msr.o msr-reg.o msr-reg-export.o |
27 | 27 | ||
28 | ifeq ($(CONFIG_X86_32),y) | 28 | ifeq ($(CONFIG_X86_32),y) |
29 | obj-y += atomic64_32.o | 29 | obj-y += atomic64_32.o |
diff --git a/arch/x86/lib/hash.c b/arch/x86/lib/hash.c deleted file mode 100644 index ff4fa51a5b1f..000000000000 --- a/arch/x86/lib/hash.c +++ /dev/null | |||
@@ -1,92 +0,0 @@ | |||
1 | /* | ||
2 | * Some portions derived from code covered by the following notice: | ||
3 | * | ||
4 | * Copyright (c) 2010-2013 Intel Corporation. All rights reserved. | ||
5 | * All rights reserved. | ||
6 | * | ||
7 | * Redistribution and use in source and binary forms, with or without | ||
8 | * modification, are permitted provided that the following conditions | ||
9 | * are met: | ||
10 | * | ||
11 | * * Redistributions of source code must retain the above copyright | ||
12 | * notice, this list of conditions and the following disclaimer. | ||
13 | * * Redistributions in binary form must reproduce the above copyright | ||
14 | * notice, this list of conditions and the following disclaimer in | ||
15 | * the documentation and/or other materials provided with the | ||
16 | * distribution. | ||
17 | * * Neither the name of Intel Corporation nor the names of its | ||
18 | * contributors may be used to endorse or promote products derived | ||
19 | * from this software without specific prior written permission. | ||
20 | * | ||
21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
22 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
23 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
24 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
25 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
26 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
27 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
28 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
29 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
30 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
31 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
32 | */ | ||
33 | |||
34 | #include <linux/hash.h> | ||
35 | #include <linux/init.h> | ||
36 | |||
37 | #include <asm/processor.h> | ||
38 | #include <asm/cpufeature.h> | ||
39 | #include <asm/hash.h> | ||
40 | |||
41 | static inline u32 crc32_u32(u32 crc, u32 val) | ||
42 | { | ||
43 | #ifdef CONFIG_AS_CRC32 | ||
44 | asm ("crc32l %1,%0\n" : "+r" (crc) : "rm" (val)); | ||
45 | #else | ||
46 | asm (".byte 0xf2, 0x0f, 0x38, 0xf1, 0xc1" : "+a" (crc) : "c" (val)); | ||
47 | #endif | ||
48 | return crc; | ||
49 | } | ||
50 | |||
51 | static u32 intel_crc4_2_hash(const void *data, u32 len, u32 seed) | ||
52 | { | ||
53 | const u32 *p32 = (const u32 *) data; | ||
54 | u32 i, tmp = 0; | ||
55 | |||
56 | for (i = 0; i < len / 4; i++) | ||
57 | seed = crc32_u32(seed, *p32++); | ||
58 | |||
59 | switch (len & 3) { | ||
60 | case 3: | ||
61 | tmp |= *((const u8 *) p32 + 2) << 16; | ||
62 | /* fallthrough */ | ||
63 | case 2: | ||
64 | tmp |= *((const u8 *) p32 + 1) << 8; | ||
65 | /* fallthrough */ | ||
66 | case 1: | ||
67 | tmp |= *((const u8 *) p32); | ||
68 | seed = crc32_u32(seed, tmp); | ||
69 | break; | ||
70 | } | ||
71 | |||
72 | return seed; | ||
73 | } | ||
74 | |||
75 | static u32 intel_crc4_2_hash2(const u32 *data, u32 len, u32 seed) | ||
76 | { | ||
77 | const u32 *p32 = (const u32 *) data; | ||
78 | u32 i; | ||
79 | |||
80 | for (i = 0; i < len; i++) | ||
81 | seed = crc32_u32(seed, *p32++); | ||
82 | |||
83 | return seed; | ||
84 | } | ||
85 | |||
86 | void __init setup_arch_fast_hash(struct fast_hash_ops *ops) | ||
87 | { | ||
88 | if (cpu_has_xmm4_2) { | ||
89 | ops->hash = intel_crc4_2_hash; | ||
90 | ops->hash2 = intel_crc4_2_hash2; | ||
91 | } | ||
92 | } | ||
diff --git a/arch/xtensa/include/asm/Kbuild b/arch/xtensa/include/asm/Kbuild index 105d38922c44..86a9ab2e2ca9 100644 --- a/arch/xtensa/include/asm/Kbuild +++ b/arch/xtensa/include/asm/Kbuild | |||
@@ -9,7 +9,6 @@ generic-y += errno.h | |||
9 | generic-y += exec.h | 9 | generic-y += exec.h |
10 | generic-y += fcntl.h | 10 | generic-y += fcntl.h |
11 | generic-y += hardirq.h | 11 | generic-y += hardirq.h |
12 | generic-y += hash.h | ||
13 | generic-y += ioctl.h | 12 | generic-y += ioctl.h |
14 | generic-y += irq_regs.h | 13 | generic-y += irq_regs.h |
15 | generic-y += irq_work.h | 14 | generic-y += irq_work.h |
diff --git a/include/asm-generic/hash.h b/include/asm-generic/hash.h deleted file mode 100644 index b6312843dbd9..000000000000 --- a/include/asm-generic/hash.h +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | #ifndef __ASM_GENERIC_HASH_H | ||
2 | #define __ASM_GENERIC_HASH_H | ||
3 | |||
4 | struct fast_hash_ops; | ||
5 | static inline void setup_arch_fast_hash(struct fast_hash_ops *ops) | ||
6 | { | ||
7 | } | ||
8 | |||
9 | #endif /* __ASM_GENERIC_HASH_H */ | ||
diff --git a/include/linux/hash.h b/include/linux/hash.h index d0494c399392..1afde47e1528 100644 --- a/include/linux/hash.h +++ b/include/linux/hash.h | |||
@@ -15,7 +15,6 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <asm/types.h> | 17 | #include <asm/types.h> |
18 | #include <asm/hash.h> | ||
19 | #include <linux/compiler.h> | 18 | #include <linux/compiler.h> |
20 | 19 | ||
21 | /* 2^31 + 2^29 - 2^25 + 2^22 - 2^19 - 2^16 + 1 */ | 20 | /* 2^31 + 2^29 - 2^25 + 2^22 - 2^19 - 2^16 + 1 */ |
@@ -84,38 +83,4 @@ static inline u32 hash32_ptr(const void *ptr) | |||
84 | return (u32)val; | 83 | return (u32)val; |
85 | } | 84 | } |
86 | 85 | ||
87 | struct fast_hash_ops { | ||
88 | u32 (*hash)(const void *data, u32 len, u32 seed); | ||
89 | u32 (*hash2)(const u32 *data, u32 len, u32 seed); | ||
90 | }; | ||
91 | |||
92 | /** | ||
93 | * arch_fast_hash - Caclulates a hash over a given buffer that can have | ||
94 | * arbitrary size. This function will eventually use an | ||
95 | * architecture-optimized hashing implementation if | ||
96 | * available, and trades off distribution for speed. | ||
97 | * | ||
98 | * @data: buffer to hash | ||
99 | * @len: length of buffer in bytes | ||
100 | * @seed: start seed | ||
101 | * | ||
102 | * Returns 32bit hash. | ||
103 | */ | ||
104 | extern u32 arch_fast_hash(const void *data, u32 len, u32 seed); | ||
105 | |||
106 | /** | ||
107 | * arch_fast_hash2 - Caclulates a hash over a given buffer that has a | ||
108 | * size that is of a multiple of 32bit words. This | ||
109 | * function will eventually use an architecture- | ||
110 | * optimized hashing implementation if available, | ||
111 | * and trades off distribution for speed. | ||
112 | * | ||
113 | * @data: buffer to hash (must be 32bit padded) | ||
114 | * @len: number of 32bit words | ||
115 | * @seed: start seed | ||
116 | * | ||
117 | * Returns 32bit hash. | ||
118 | */ | ||
119 | extern u32 arch_fast_hash2(const u32 *data, u32 len, u32 seed); | ||
120 | |||
121 | #endif /* _LINUX_HASH_H */ | 86 | #endif /* _LINUX_HASH_H */ |
diff --git a/lib/Makefile b/lib/Makefile index 0211d2bd5e17..4b9baa45a4d9 100644 --- a/lib/Makefile +++ b/lib/Makefile | |||
@@ -26,7 +26,7 @@ obj-y += bcd.o div64.o sort.o parser.o halfmd4.o debug_locks.o random32.o \ | |||
26 | bust_spinlocks.o hexdump.o kasprintf.o bitmap.o scatterlist.o \ | 26 | bust_spinlocks.o hexdump.o kasprintf.o bitmap.o scatterlist.o \ |
27 | gcd.o lcm.o list_sort.o uuid.o flex_array.o iovec.o clz_ctz.o \ | 27 | gcd.o lcm.o list_sort.o uuid.o flex_array.o iovec.o clz_ctz.o \ |
28 | bsearch.o find_last_bit.o find_next_bit.o llist.o memweight.o kfifo.o \ | 28 | bsearch.o find_last_bit.o find_next_bit.o llist.o memweight.o kfifo.o \ |
29 | percpu-refcount.o percpu_ida.o hash.o rhashtable.o reciprocal_div.o | 29 | percpu-refcount.o percpu_ida.o rhashtable.o reciprocal_div.o |
30 | obj-y += string_helpers.o | 30 | obj-y += string_helpers.o |
31 | obj-$(CONFIG_TEST_STRING_HELPERS) += test-string_helpers.o | 31 | obj-$(CONFIG_TEST_STRING_HELPERS) += test-string_helpers.o |
32 | obj-y += kstrtox.o | 32 | obj-y += kstrtox.o |
diff --git a/lib/hash.c b/lib/hash.c deleted file mode 100644 index fea973f4bd57..000000000000 --- a/lib/hash.c +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | /* General purpose hashing library | ||
2 | * | ||
3 | * That's a start of a kernel hashing library, which can be extended | ||
4 | * with further algorithms in future. arch_fast_hash{2,}() will | ||
5 | * eventually resolve to an architecture optimized implementation. | ||
6 | * | ||
7 | * Copyright 2013 Francesco Fusco <ffusco@redhat.com> | ||
8 | * Copyright 2013 Daniel Borkmann <dborkman@redhat.com> | ||
9 | * Copyright 2013 Thomas Graf <tgraf@redhat.com> | ||
10 | * Licensed under the GNU General Public License, version 2.0 (GPLv2) | ||
11 | */ | ||
12 | |||
13 | #include <linux/jhash.h> | ||
14 | #include <linux/hash.h> | ||
15 | #include <linux/cache.h> | ||
16 | |||
17 | static struct fast_hash_ops arch_hash_ops __read_mostly = { | ||
18 | .hash = jhash, | ||
19 | .hash2 = jhash2, | ||
20 | }; | ||
21 | |||
22 | u32 arch_fast_hash(const void *data, u32 len, u32 seed) | ||
23 | { | ||
24 | return arch_hash_ops.hash(data, len, seed); | ||
25 | } | ||
26 | EXPORT_SYMBOL_GPL(arch_fast_hash); | ||
27 | |||
28 | u32 arch_fast_hash2(const u32 *data, u32 len, u32 seed) | ||
29 | { | ||
30 | return arch_hash_ops.hash2(data, len, seed); | ||
31 | } | ||
32 | EXPORT_SYMBOL_GPL(arch_fast_hash2); | ||
33 | |||
34 | static int __init hashlib_init(void) | ||
35 | { | ||
36 | setup_arch_fast_hash(&arch_hash_ops); | ||
37 | return 0; | ||
38 | } | ||
39 | early_initcall(hashlib_init); | ||
diff --git a/tools/perf/util/include/asm/hash.h b/tools/perf/util/include/asm/hash.h deleted file mode 100644 index d82b170bb216..000000000000 --- a/tools/perf/util/include/asm/hash.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef __ASM_GENERIC_HASH_H | ||
2 | #define __ASM_GENERIC_HASH_H | ||
3 | |||
4 | /* Stub */ | ||
5 | |||
6 | #endif /* __ASM_GENERIC_HASH_H */ | ||