summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>2012-04-19 12:35:08 +0200
committerBorislav Petkov <borislav.petkov@amd.com>2012-04-19 18:30:28 +0200
commita720b2dd2470a52345df11dca8d6c1466599f812 (patch)
treecb494b852aadbd797c0ce2ef90836c1f48d90b32 /include
parente816b57a337ea3b755de72bec38c10c864f23015 (diff)
downloadlinux-3.10-a720b2dd2470a52345df11dca8d6c1466599f812.tar.gz
linux-3.10-a720b2dd2470a52345df11dca8d6c1466599f812.tar.bz2
linux-3.10-a720b2dd2470a52345df11dca8d6c1466599f812.zip
x86, intel_cacheinfo: Fix error return code in amd_set_l3_disable_slot()
If the L3 disable slot is already in use, return -EEXIST instead of -EINVAL. The caller, store_cache_disable(), checks this return value to print an appropriate warning. Also, we want to signal with -EEXIST that the current index we're disabling has actually been already disabled on the node: $ echo 12 > /sys/devices/system/cpu/cpu3/cache/index3/cache_disable_0 $ echo 12 > /sys/devices/system/cpu/cpu3/cache/index3/cache_disable_0 -bash: echo: write error: File exists $ echo 12 > /sys/devices/system/cpu/cpu3/cache/index3/cache_disable_1 -bash: echo: write error: File exists $ echo 12 > /sys/devices/system/cpu/cpu5/cache/index3/cache_disable_1 -bash: echo: write error: File exists The old code would say -bash: echo: write error: Invalid argument for disable slot 1 when playing the example above with no output in dmesg, which is clearly misleading. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> Link: http://lkml.kernel.org/r/20120419070053.GB16645@elgon.mountain [Boris: add testing for the other index too] Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions