mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-19 13:46:25 +00:00
Merge trunk r6221 into iser branch
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@6222 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -15,6 +15,9 @@ version="$1"; shift
|
||||
files="$*"
|
||||
if [ -z "$files" ]; then
|
||||
files=$($scriptdir/list-source-files)
|
||||
if [ -e build_mode ]; then
|
||||
files="${files} build_mode"
|
||||
fi
|
||||
fi
|
||||
|
||||
tar --owner=root --group=root --transform="s|^|$name-$version/|" \
|
||||
|
||||
@@ -278,14 +278,6 @@ CONFIG_TRACING CONFIG_X86_32 \
|
||||
patch -p1 -f -s <"${p}" >>"${patchoutput}" 2>&1
|
||||
done
|
||||
fi &&
|
||||
if [ -e $srcdir/srpt/patches/kernel-${kver}-pre-cflags.patch ]; then
|
||||
echo "$srcdir/srpt/patches/kernel-${kver}-pre-cflags.patch ..." \
|
||||
>>"${patchoutput}"
|
||||
patch -p1 -f -s <$srcdir/srpt/patches/kernel-${kver}-pre-cflags.patch \
|
||||
>>"${patchoutput}"
|
||||
else
|
||||
echo "srpt/patches/kernel-${kver}-pre-cflags.patch not found."
|
||||
fi &&
|
||||
make -s allmodconfig &>"${outputdir}/make-config-output.txt" &&
|
||||
for c in $disable; do sed -i.tmp "s/^$c=[ym]\$/$c=n/" .config; done &&
|
||||
make -s oldconfig &>/dev/null
|
||||
|
||||
@@ -227,7 +227,7 @@ function evaluate(stmnt, pattern, arg, op, result) {
|
||||
stmnt = "+#if " (op[2] != 0 ? op[1] : op[2])
|
||||
}
|
||||
|
||||
pattern="^+#if[[:blank:]]*(!*[[:blank:]]*[A-Za-z_]*[[:blank:]]*)\\&\\&[[:blank:]]*([01])[[:blank:]]*$"
|
||||
pattern="^+#if[[:blank:]]*(!*[[:blank:]]*[A-Za-z_]*)[[:blank:]]*\\&\\&[[:blank:]]*([01])[[:blank:]]*$"
|
||||
while (match(stmnt, pattern, op) != 0)
|
||||
{
|
||||
stmnt = "+#if " (op[2] != 0 ? op[1] : op[2])
|
||||
@@ -561,6 +561,8 @@ BEGIN {
|
||||
delete_next_blank_line = 0
|
||||
if (match($0, "^+ *#"))
|
||||
{
|
||||
if (debug)
|
||||
printf "/* debug specialize-patch: line %d: %s*/\n", NR, $0
|
||||
process_preprocessor_statement()
|
||||
}
|
||||
else if (output)
|
||||
|
||||
Executable
+55
@@ -0,0 +1,55 @@
|
||||
#!/bin/awk -f
|
||||
|
||||
BEGIN {
|
||||
if (debug != "")
|
||||
print "[<node>, <per_node_cpu_idx>]: <cpu>";
|
||||
"ls -1d /sys/devices/system/node/node* 2>&1 | wc -l" | getline nodes
|
||||
if (nodes > 1) {
|
||||
for (i = 0; i < nodes; i++) {
|
||||
cpus_per_node = 0
|
||||
while (("cd /sys/devices/system/cpu && ls -d cpu*/node" i " | sed 's/^cpu//;s,/.*,,'|sort -n" | getline j) > 0) {
|
||||
if (debug != "")
|
||||
print "[" i ", " cpus_per_node "]: " j
|
||||
cpu[i, cpus_per_node++] = j
|
||||
}
|
||||
}
|
||||
} else {
|
||||
cpus_per_node = 0
|
||||
while (("cd /sys/devices/system/cpu && ls -d cpu[0-9]* | sed 's/^cpu//'|sort -n" | getline j) > 0) {
|
||||
if (debug != "")
|
||||
print "[0, " cpus_per_node "]: " j
|
||||
cpu[0, cpus_per_node++] = j
|
||||
}
|
||||
}
|
||||
for (i = 0; i < nodes; i++)
|
||||
nextcpu[i] = 0
|
||||
while (("sed -n 's/.*mlx4-ib-\\([0-9]*\\)-[0-9]*@\\(.*\\)$/\\1 \\2/p' /proc/interrupts | uniq" | getline) > 0) {
|
||||
port = $1
|
||||
bus = substr($0, length($1) + 2)
|
||||
if (debug != "")
|
||||
print "HCA port = " port "; bus = " bus
|
||||
irqcount = 0
|
||||
while (("sed -n 's/^[[:blank:]]*\\([0-9]*\\):[0-9[:blank:]]*[^[:blank:]]*[[:blank:]]*\\(mlx4-ib-" port "-[0-9]*@" bus "\\)$/\\1 \\2/p' </proc/interrupts" | getline) > 0) {
|
||||
irq[irqcount] = $1
|
||||
irqname[irqcount] = substr($0, length($1) + 2)
|
||||
irqcount++
|
||||
}
|
||||
for (i = 0; i < nodes; i++) {
|
||||
ch_start = i * irqcount / nodes
|
||||
ch_end = (i + 1) * irqcount / nodes
|
||||
for (ch = ch_start; ch < ch_end; ch++) {
|
||||
c = cpu[i, nextcpu[i]++ % cpus_per_node]
|
||||
if (nodes > 1)
|
||||
nodetxt = " (node " i ")"
|
||||
else
|
||||
nodetxt = ""
|
||||
print "IRQ " irq[ch] " (" irqname[ch] "): CPU " c nodetxt
|
||||
cmd="echo " c " >/proc/irq/" irq[ch] "/smp_affinity_list"
|
||||
if (debug != "")
|
||||
print cmd
|
||||
system(cmd)
|
||||
}
|
||||
}
|
||||
}
|
||||
exit 0
|
||||
}
|
||||
Executable
+27
@@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
# Update the version number in SCST source files.
|
||||
|
||||
usage() {
|
||||
echo "Usage: $(basename $0) <major> <minor> <release> [<suffix>]"
|
||||
exit 1
|
||||
}
|
||||
|
||||
if [ $# != 3 -a $# != 4 ]; then
|
||||
usage
|
||||
fi
|
||||
|
||||
major=$1
|
||||
minor=$2
|
||||
release=$3
|
||||
suffix=$4
|
||||
fv=$major.$minor.$release$suffix
|
||||
reldate=$(date "+%d %B %Y")
|
||||
|
||||
sed -i "s,^\(#define[[:blank:]]*\(FT_VERSION\|ISCSI_VERSION_STRING\|Q2T_VERSION_STRING\|SCST_LOCAL_VERSION\|SCST_VERSION_NAME\|DRV_VERSION\|VERSION_STR\)[[:blank:]]*\)\"[^\"]*\",\1\"$major.$minor.$release$suffix\"," scst_local/scst_local.c srpt/src/ib_srpt.c fcst/fcst.h iscsi-scst/include/iscsi_scst_ver.h qla2x00t/qla2x00-target/qla2x00t.h scst/include/scst_const.h
|
||||
sed -i "s,^\(<date>Version[[:blank:]]*\)[^[:blank:]]*\(</date>\),\1$fv\2," doc/scst_user_spec.sgml
|
||||
sed -i "s/^Version .*/Version $fv, $reldate/" iscsi-scst/README qla2x00t/qla2x00-target/README scst/README usr/fileio/README
|
||||
sed -i "s/^\(\(static const char \*scst_local_version_date\|#define[[:blank:]]*DRV_RELDATE\)[[:blank:]]*\)\"[^\"]*\"/\1\"$reldate\"/" scst_local/scst_local.c srpt/src/ib_srpt.c
|
||||
sed -i "s/^\(#define[[:blank:]]*[^[:blank:]]*_REV[[:blank:]]*\)\"[[:blank:]0-9]*\"/\1\"$(printf "%2d%d%d" $major $minor $release)\"/" usr/fileio/common.h scst/src/dev_handlers/scst_vdisk.c
|
||||
sed -i "s/^\(#define[[:blank:]]*SCST_VERSION_CODE[[:blank:]]*\).*/\1SCST_VERSION($major, $minor, $release, 0)/" scst/include/scst.h
|
||||
sed -i "s/^\(#define[[:blank:]]*Q2T_VERSION_CODE[[:blank:]]*\).*/\1Q2T_VERSION($major, $minor, $release, 0)/" qla2x00t/qla2x00-target/qla2x00t.h
|
||||
sed -i "s/^\(.Version[[:blank:]]*=[[:blank:]]*'SCST Configurator v\)[0-9.]*/\1$fv/" scstadmin/scstadmin.sysfs/scstadmin
|
||||
Reference in New Issue
Block a user