x86/mm: Add TLB purge to free pmd/pte page interfaces
[linux/fpc-iii.git] / arch / x86 / entry / syscalls / syscalltbl.sh
blob751d1f992630bcff0665526d4137de607628fcf7
1 #!/bin/sh
3 in="$1"
4 out="$2"
6 syscall_macro() {
7 abi="$1"
8 nr="$2"
9 entry="$3"
11 # Entry can be either just a function name or "function/qualifier"
12 real_entry="${entry%%/*}"
13 if [ "$entry" = "$real_entry" ]; then
14 qualifier=
15 else
16 qualifier=${entry#*/}
19 echo "__SYSCALL_${abi}($nr, $real_entry, $qualifier)"
22 emit() {
23 abi="$1"
24 nr="$2"
25 entry="$3"
26 compat="$4"
28 if [ "$abi" = "64" -a -n "$compat" ]; then
29 echo "a compat entry for a 64-bit syscall makes no sense" >&2
30 exit 1
33 if [ -z "$compat" ]; then
34 if [ -n "$entry" ]; then
35 syscall_macro "$abi" "$nr" "$entry"
37 else
38 echo "#ifdef CONFIG_X86_32"
39 if [ -n "$entry" ]; then
40 syscall_macro "$abi" "$nr" "$entry"
42 echo "#else"
43 syscall_macro "$abi" "$nr" "$compat"
44 echo "#endif"
48 grep '^[0-9]' "$in" | sort -n | (
49 while read nr abi name entry compat; do
50 abi=`echo "$abi" | tr '[a-z]' '[A-Z]'`
51 if [ "$abi" = "COMMON" -o "$abi" = "64" ]; then
52 # COMMON is the same as 64, except that we don't expect X32
53 # programs to use it. Our expectation has nothing to do with
54 # any generated code, so treat them the same.
55 emit 64 "$nr" "$entry" "$compat"
56 elif [ "$abi" = "X32" ]; then
57 # X32 is equivalent to 64 on an X32-compatible kernel.
58 echo "#ifdef CONFIG_X86_X32_ABI"
59 emit 64 "$nr" "$entry" "$compat"
60 echo "#endif"
61 elif [ "$abi" = "I386" ]; then
62 emit "$abi" "$nr" "$entry" "$compat"
63 else
64 echo "Unknown abi $abi" >&2
65 exit 1
67 done
68 ) > "$out"