Mercurial > hg > aboriginal
annotate sources/patches/linux-2.6.28-perl3.patch @ 772:7cb6ef2cdf10
Busybox unstable currently needs this patch too.
author | Rob Landley <rob@landley.net> |
---|---|
date | Wed, 01 Jul 2009 18:02:44 -0500 |
parents | 79baef2e88cc |
children | e9f15e7a1896 |
rev | line source |
---|---|
561
8dc7e099309e
Update the perl removal patches for 2.6.28 to the versions I'm submitting to the linux-kernel list.
Rob Landley <rob@landley.net>
parents:
558
diff
changeset
|
1 From: Rob Landley <rob@landley.net> |
8dc7e099309e
Update the perl removal patches for 2.6.28 to the versions I'm submitting to the linux-kernel list.
Rob Landley <rob@landley.net>
parents:
558
diff
changeset
|
2 |
8dc7e099309e
Update the perl removal patches for 2.6.28 to the versions I'm submitting to the linux-kernel list.
Rob Landley <rob@landley.net>
parents:
558
diff
changeset
|
3 Convert kernel/cpu/mkcapflags.pl to kernel/cpu/mkcapflags.sh. |
8dc7e099309e
Update the perl removal patches for 2.6.28 to the versions I'm submitting to the linux-kernel list.
Rob Landley <rob@landley.net>
parents:
558
diff
changeset
|
4 |
8dc7e099309e
Update the perl removal patches for 2.6.28 to the versions I'm submitting to the linux-kernel list.
Rob Landley <rob@landley.net>
parents:
558
diff
changeset
|
5 This script generates kernel/cpu/capflags.c from include/asm/cpufeature.h. |
8dc7e099309e
Update the perl removal patches for 2.6.28 to the versions I'm submitting to the linux-kernel list.
Rob Landley <rob@landley.net>
parents:
558
diff
changeset
|
6 |
8dc7e099309e
Update the perl removal patches for 2.6.28 to the versions I'm submitting to the linux-kernel list.
Rob Landley <rob@landley.net>
parents:
558
diff
changeset
|
7 Signed-off-by: Rob Landley <rob@landley.net> |
8dc7e099309e
Update the perl removal patches for 2.6.28 to the versions I'm submitting to the linux-kernel list.
Rob Landley <rob@landley.net>
parents:
558
diff
changeset
|
8 --- |
8dc7e099309e
Update the perl removal patches for 2.6.28 to the versions I'm submitting to the linux-kernel list.
Rob Landley <rob@landley.net>
parents:
558
diff
changeset
|
9 |
759
79baef2e88cc
Update perl removal patches to the versions submitted to linux-kernel. (Mostly description tweak.)
Rob Landley <rob@landley.net>
parents:
605
diff
changeset
|
10 Changes from previous version (http://lkml.org/lkml/2009/1/2/24): |
79baef2e88cc
Update perl removal patches to the versions submitted to linux-kernel. (Mostly description tweak.)
Rob Landley <rob@landley.net>
parents:
605
diff
changeset
|
11 |
79baef2e88cc
Update perl removal patches to the versions submitted to linux-kernel. (Mostly description tweak.)
Rob Landley <rob@landley.net>
parents:
605
diff
changeset
|
12 None, just a rediff. |
79baef2e88cc
Update perl removal patches to the versions submitted to linux-kernel. (Mostly description tweak.)
Rob Landley <rob@landley.net>
parents:
605
diff
changeset
|
13 |
561
8dc7e099309e
Update the perl removal patches for 2.6.28 to the versions I'm submitting to the linux-kernel list.
Rob Landley <rob@landley.net>
parents:
558
diff
changeset
|
14 arch/x86/kernel/cpu/Makefile | 4 +-- |
8dc7e099309e
Update the perl removal patches for 2.6.28 to the versions I'm submitting to the linux-kernel list.
Rob Landley <rob@landley.net>
parents:
558
diff
changeset
|
15 arch/x86/kernel/cpu/mkcapflags.pl | 32 ---------------------------- |
8dc7e099309e
Update the perl removal patches for 2.6.28 to the versions I'm submitting to the linux-kernel list.
Rob Landley <rob@landley.net>
parents:
558
diff
changeset
|
16 arch/x86/kernel/cpu/mkcapflags.sh | 28 ++++++++++++++++++++++++ |
8dc7e099309e
Update the perl removal patches for 2.6.28 to the versions I'm submitting to the linux-kernel list.
Rob Landley <rob@landley.net>
parents:
558
diff
changeset
|
17 3 files changed, 30 insertions(+), 34 deletions(-) |
8dc7e099309e
Update the perl removal patches for 2.6.28 to the versions I'm submitting to the linux-kernel list.
Rob Landley <rob@landley.net>
parents:
558
diff
changeset
|
18 |
759
79baef2e88cc
Update perl removal patches to the versions submitted to linux-kernel. (Mostly description tweak.)
Rob Landley <rob@landley.net>
parents:
605
diff
changeset
|
19 diff -ruN linux-2.6.30.old/arch/x86/kernel/cpu/Makefile linux-2.6.30/arch/x86/kernel/cpu/Makefile |
79baef2e88cc
Update perl removal patches to the versions submitted to linux-kernel. (Mostly description tweak.)
Rob Landley <rob@landley.net>
parents:
605
diff
changeset
|
20 --- linux-2.6.30.old/arch/x86/kernel/cpu/Makefile 2009-06-09 22:05:27.000000000 -0500 |
79baef2e88cc
Update perl removal patches to the versions submitted to linux-kernel. (Mostly description tweak.)
Rob Landley <rob@landley.net>
parents:
605
diff
changeset
|
21 +++ linux-2.6.30/arch/x86/kernel/cpu/Makefile 2009-06-22 16:39:06.000000000 -0500 |
79baef2e88cc
Update perl removal patches to the versions submitted to linux-kernel. (Mostly description tweak.)
Rob Landley <rob@landley.net>
parents:
605
diff
changeset
|
22 @@ -30,10 +30,10 @@ |
558 | 23 obj-$(CONFIG_X86_LOCAL_APIC) += perfctr-watchdog.o |
24 | |
25 quiet_cmd_mkcapflags = MKCAP $@ | |
26 - cmd_mkcapflags = $(PERL) $(srctree)/$(src)/mkcapflags.pl $< $@ | |
27 + cmd_mkcapflags = $(CONFIG_SHELL) $(srctree)/$(src)/mkcapflags.sh $< $@ | |
28 | |
29 cpufeature = $(src)/../../include/asm/cpufeature.h | |
30 | |
31 targets += capflags.c | |
32 -$(obj)/capflags.c: $(cpufeature) $(src)/mkcapflags.pl FORCE | |
33 +$(obj)/capflags.c: $(cpufeature) $(src)/mkcapflags.sh FORCE | |
34 $(call if_changed,mkcapflags) | |
759
79baef2e88cc
Update perl removal patches to the versions submitted to linux-kernel. (Mostly description tweak.)
Rob Landley <rob@landley.net>
parents:
605
diff
changeset
|
35 diff -ruN linux-2.6.30.old/arch/x86/kernel/cpu/mkcapflags.pl linux-2.6.30/arch/x86/kernel/cpu/mkcapflags.pl |
79baef2e88cc
Update perl removal patches to the versions submitted to linux-kernel. (Mostly description tweak.)
Rob Landley <rob@landley.net>
parents:
605
diff
changeset
|
36 --- linux-2.6.30.old/arch/x86/kernel/cpu/mkcapflags.pl 2009-06-09 22:05:27.000000000 -0500 |
79baef2e88cc
Update perl removal patches to the versions submitted to linux-kernel. (Mostly description tweak.)
Rob Landley <rob@landley.net>
parents:
605
diff
changeset
|
37 +++ linux-2.6.30/arch/x86/kernel/cpu/mkcapflags.pl 1969-12-31 18:00:00.000000000 -0600 |
558 | 38 @@ -1,32 +0,0 @@ |
39 -#!/usr/bin/perl | |
40 -# | |
41 -# Generate the x86_cap_flags[] array from include/asm-x86/cpufeature.h | |
42 -# | |
43 - | |
44 -($in, $out) = @ARGV; | |
45 - | |
46 -open(IN, "< $in\0") or die "$0: cannot open: $in: $!\n"; | |
47 -open(OUT, "> $out\0") or die "$0: cannot create: $out: $!\n"; | |
48 - | |
49 -print OUT "#include <asm/cpufeature.h>\n\n"; | |
50 -print OUT "const char * const x86_cap_flags[NCAPINTS*32] = {\n"; | |
51 - | |
52 -while (defined($line = <IN>)) { | |
53 - if ($line =~ /^\s*\#\s*define\s+(X86_FEATURE_(\S+))\s+(.*)$/) { | |
54 - $macro = $1; | |
55 - $feature = $2; | |
56 - $tail = $3; | |
57 - if ($tail =~ /\/\*\s*\"([^"]*)\".*\*\//) { | |
58 - $feature = $1; | |
59 - } | |
60 - | |
61 - if ($feature ne '') { | |
62 - printf OUT "\t%-32s = \"%s\",\n", | |
63 - "[$macro]", "\L$feature"; | |
64 - } | |
65 - } | |
66 -} | |
67 -print OUT "};\n"; | |
68 - | |
69 -close(IN); | |
70 -close(OUT); | |
759
79baef2e88cc
Update perl removal patches to the versions submitted to linux-kernel. (Mostly description tweak.)
Rob Landley <rob@landley.net>
parents:
605
diff
changeset
|
71 diff -ruN linux-2.6.30.old/arch/x86/kernel/cpu/mkcapflags.sh linux-2.6.30/arch/x86/kernel/cpu/mkcapflags.sh |
79baef2e88cc
Update perl removal patches to the versions submitted to linux-kernel. (Mostly description tweak.)
Rob Landley <rob@landley.net>
parents:
605
diff
changeset
|
72 --- linux-2.6.30.old/arch/x86/kernel/cpu/mkcapflags.sh 1969-12-31 18:00:00.000000000 -0600 |
79baef2e88cc
Update perl removal patches to the versions submitted to linux-kernel. (Mostly description tweak.)
Rob Landley <rob@landley.net>
parents:
605
diff
changeset
|
73 +++ linux-2.6.30/arch/x86/kernel/cpu/mkcapflags.sh 2009-06-22 16:39:06.000000000 -0500 |
558 | 74 @@ -0,0 +1,28 @@ |
75 +#!/bin/sh | |
76 +# | |
77 +# Generate the x86_cap_flags[] array from include/asm/cpufeature.h | |
78 +# | |
79 + | |
80 +IN=$1 | |
81 +OUT=$2 | |
82 + | |
83 +( | |
84 + echo "#include <asm/cpufeature.h>" | |
85 + echo "" | |
86 + echo "const char * const x86_cap_flags[NCAPINTS*32] = {" | |
87 + | |
88 + # Iterate through any input lines starting with #define X86_FEATURE_ | |
89 + sed -n -e 's/\t/ /g' -e 's/^ *# *define *X86_FEATURE_//p' $IN | | |
90 + while read i | |
91 + do | |
92 + # Name is everything up to the first whitespace | |
93 + NAME="$(echo "$i" | sed 's/ .*//')" | |
94 + | |
561
8dc7e099309e
Update the perl removal patches for 2.6.28 to the versions I'm submitting to the linux-kernel list.
Rob Landley <rob@landley.net>
parents:
558
diff
changeset
|
95 + # If the /* comment */ starts with a quote string, grab that. |
558 | 96 + VALUE="$(echo "$i" | sed -n 's@.*/\* *\("[^"]*"\).*\*/@\1@p')" |
97 + [ -z "$VALUE" ] && VALUE="\"$(echo "$NAME" | tr A-Z a-z)\"" | |
98 + | |
99 + [ "$VALUE" != '""' ] && echo " [X86_FEATURE_$NAME] = $VALUE," | |
100 + done | |
101 + echo "};" | |
102 +) > $OUT |