#!/bin/sh # # A depmod wrapper used by the toplevel Makefile if test $# -ne 3; then echo "Usage: $0 /sbin/depmod " >&2 exit 1 fi DEPMOD=$1 KERNELRELEASE=$2 SYMBOL_PREFIX=$3 if ! test -r System.map -a -x "$DEPMOD"; then exit 0 fi # older versions of depmod don't support -P # support was added in module-init-tools 3.13 if test -n "$SYMBOL_PREFIX"; then release=$("$DEPMOD" --version) package=$(echo "$release" | cut -d' ' -f 1) if test "$package" = "module-init-tools"; then version=$(echo "$release" | cut -d' ' -f 2) later=$(printf '%s\n' "$version" "3.13" | sort -V | tail -n 1) if test "$later" != "$version"; then # module-init-tools < 3.13, drop the symbol prefix SYMBOL_PREFIX="" fi fi if test -n "$SYMBOL_PREFIX"; then SYMBOL_PREFIX="-P $SYMBOL_PREFIX" fi fi # older versions of depmod require the version string to start with three # numbers, so we cheat with a symlink here depmod_hack_needed=true tmp_dir=$(mktemp -d ${TMPDIR:-/tmp}/depmod.XXXXXX) mkdir -p "$tmp_dir/lib/modules/$KERNELRELEASE" if "$DEPMOD" -b "$tmp_dir" $KERNELRELEASE 2>/dev/null; then if test -e "$tmp_dir/lib/modules/$KERNELRELEASE/modules.dep" -o \ -e "$tmp_dir/lib/modules/$KERNELRELEASE/modules.dep.bin"; then depmod_hack_needed=false fi fi rm -rf "$tmp_dir" if $depmod_hack_needed; then symlink="$INSTALL_MOD_PATH/lib/modules/99.98.$KERNELRELEASE" ln -s "$KERNELRELEASE" "$symlink" KERNELRELEASE=99.98.$KERNELRELEASE fi set -- -ae -F System.map if test -n "$INSTALL_MOD_PATH"; then set -- "$@" -b "$INSTALL_MOD_PATH" fi "$DEPMOD" "$@" "$KERNELRELEASE" $SYMBOL_PREFIX ret=$? if $depmod_hack_needed; then rm -f "$symlink" fi exit $ret fslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Rutland <mark.rutland@arm.com>2017-01-06 13:12:47 +0100
committerRussell King <rmk+kernel@armlinux.org.uk>2017-01-10 23:32:26 +0000
commitddc37832a1349f474c4532de381498020ed71d31 (patch)
tree382716b98cb953cd8c9025787f9e9bc6ed5b2732
parent270c8cf1cacc69cb8d99dea812f06067a45e4609 (diff)
ARM: 8634/1: hw_breakpoint: blacklist Scorpion CPUs
On APQ8060, the kernel crashes in arch_hw_breakpoint_init, taking an undefined instruction trap within write_wb_reg. This is because Scorpion CPUs erroneously appear to set DBGPRSR.SPD when WFI is issued, even if the core is not powered down. When DBGPRSR.SPD is set, breakpoint and watchpoint registers are treated as undefined. It's possible to trigger similar crashes later on from userspace, by requesting the kernel to install a breakpoint or watchpoint, as we can go idle at any point between the reset of the debug registers and their later use. This has always been the case. Given that this has always been broken, no-one has complained until now, and there is no clear workaround, disable hardware breakpoints and watchpoints on Scorpion to avoid these issues. Signed-off-by: Mark Rutland <mark.rutland@arm.com> Reported-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Stephen Boyd <sboyd@codeaurora.org> Acked-by: Will Deacon <will.deacon@arm.com> Cc: Russell King <linux@armlinux.org.uk> Cc: stable@vger.kernel.org Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>