Patch "selftests/powerpc/pmu: Fix sample field check in the mmcra_thresh_marked_sample_test" has been added to the 6.2-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    selftests/powerpc/pmu: Fix sample field check in the mmcra_thresh_marked_sample_test

to the 6.2-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     selftests-powerpc-pmu-fix-sample-field-check-in-the-.patch
and it can be found in the queue-6.2 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit e5f854cab0eb0acd698a3000d371a2bc74393d1a
Author: Kajol Jain <kjain@xxxxxxxxxxxxx>
Date:   Wed Mar 1 22:39:17 2023 +0530

    selftests/powerpc/pmu: Fix sample field check in the mmcra_thresh_marked_sample_test
    
    [ Upstream commit 8a32341cf04ba05974931b4664683c2c9fb84e56 ]
    
    The testcase verifies the setting of different fields in Monitor Mode
    Control Register A (MMCRA). In the current code, EV_CODE_EXTRACT macro
    is used to extract the "sample" field, which then needs to be further
    processed to fetch rand_samp_elig and rand_samp_mode bits. But the
    current code is not passing valid sample field to EV_CODE_EXTRACT
    macro. Patch addresses this by fixing the input for EV_CODE_EXTRACT.
    
    Fixes: 29cf373c5766 ("selftests/powerpc/pmu: Add interface test for mmcra register fields")
    Reported-by: David Binderman <dcb314@xxxxxxxxxxx>
    Link: https://lore.kernel.org/r/DB6P189MB0568CF002762C6C43AF6DF169CA89@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    Signed-off-by: Kajol Jain <kjain@xxxxxxxxxxxxx>
    Signed-off-by: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
    Link: https://msgid.link/20230301170918.69176-1-kjain@xxxxxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/testing/selftests/powerpc/pmu/sampling_tests/mmcra_thresh_marked_sample_test.c b/tools/testing/selftests/powerpc/pmu/sampling_tests/mmcra_thresh_marked_sample_test.c
index 022cc1655eb52..75527876ad3c1 100644
--- a/tools/testing/selftests/powerpc/pmu/sampling_tests/mmcra_thresh_marked_sample_test.c
+++ b/tools/testing/selftests/powerpc/pmu/sampling_tests/mmcra_thresh_marked_sample_test.c
@@ -63,9 +63,9 @@ static int mmcra_thresh_marked_sample(void)
 			get_mmcra_thd_stop(get_reg_value(intr_regs, "MMCRA"), 4));
 	FAIL_IF(EV_CODE_EXTRACT(event.attr.config, marked) !=
 			get_mmcra_marked(get_reg_value(intr_regs, "MMCRA"), 4));
-	FAIL_IF(EV_CODE_EXTRACT(event.attr.config, sample >> 2) !=
+	FAIL_IF((EV_CODE_EXTRACT(event.attr.config, sample) >> 2) !=
 			get_mmcra_rand_samp_elig(get_reg_value(intr_regs, "MMCRA"), 4));
-	FAIL_IF(EV_CODE_EXTRACT(event.attr.config, sample & 0x3) !=
+	FAIL_IF((EV_CODE_EXTRACT(event.attr.config, sample) & 0x3) !=
 			get_mmcra_sample_mode(get_reg_value(intr_regs, "MMCRA"), 4));
 	FAIL_IF(EV_CODE_EXTRACT(event.attr.config, sm) !=
 			get_mmcra_sm(get_reg_value(intr_regs, "MMCRA"), 4));



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux