Page MenuHomeFreeBSD

D57879.diff
No OneTemporary

D57879.diff

diff --git a/sys/dev/bhnd/tools/bus_macro.sh b/sys/dev/bhnd/tools/bus_macro.sh
--- a/sys/dev/bhnd/tools/bus_macro.sh
+++ b/sys/dev/bhnd/tools/bus_macro.sh
@@ -33,28 +33,28 @@
macro () {
n=${1}
- bus_n=$(echo $n | tr "[:lower:]" "[:upper:]")
+ bus_n=$(echo "$n" | tr "[:lower:]" "[:upper:]")
shift
- echo -n "#define bhnd_bus_${n}(r"
+ printf "#define bhnd_bus_%s(r" "${n}"
for i
do
- echo -n ", ${i}"
+ printf ", %s" "${i}"
done
echo ") \\"
echo " (((r)->direct) ? \\"
- echo -n " bus_${n}((r)->res"
+ printf " bus_%s((r)->res" "${n}"
for i
do
- echo -n ", (${i})"
+ printf ", (%s)" "${i}"
done
echo ") : \\"
echo " BHND_BUS_${bus_n}( \\"
echo " device_get_parent(rman_get_device((r)->res)), \\"
- echo -n " rman_get_device((r)->res), (r)"
+ printf " rman_get_device((r)->res), (r)"
for i
do
- echo -n ", (${i})"
+ printf ", (%s)" "${i}"
done
echo "))"
@@ -64,9 +64,8 @@
for w in 1 2 4 #8
do
- # macro copy_region_$w so dh do c
- # macro copy_region_stream_$w ?
- # macro peek_$w
+ # TODO: copy_region_$w[_stream_] and peek_$w are not yet
+ # generated; add them here with the correct arg lists if needed.
for s in "" stream_
do
macro read_$s$w o
@@ -76,15 +75,13 @@
macro write_multi_$s$w o d c
macro write_region_$s$w o d c
done
-
+
# set_(multi_)?_stream is not supported on ARM/ARM64, and so for
# simplicity, we don't support their use with bhnd resources.
- #
- # if that changes, these can be merged back into the stream-eanbled
- # loop above.
- for s in ""
- do
- macro set_multi_$s$w o v c
- macro set_region_$s$w o v c
- done
+ #
+ # If that changes, wrap these two calls in a
+ # for s in "" stream_
+ # loop (as the read/write macros above) and drop the bare $w suffix.
+ macro set_multi_$w o v c
+ macro set_region_$w o v c
done

File Metadata

Mime Type
text/plain
Expires
Fri, Jul 17, 4:21 AM (2 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34399366
Default Alt Text
D57879.diff (2 KB)

Event Timeline