Bug 9155 - x86/pci-dma: Fix logical error in patch_do_basic_check()
Summary: x86/pci-dma: Fix logical error in patch_do_basic_check()
Status: NEW
Alias: None
Product: ANCK 6.6 Dev
Classification: ANCK
Component: X86 (show other bugs) X86
Version: unspecified
Hardware: x86_64 Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: Guanjun
QA Contact: shuming
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-23 17:13 UTC by LeoLiu-oc
Modified: 2024-05-28 10:26 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description LeoLiu-oc zhaoxin_group 2024-05-23 17:13:02 UTC
Description of problem:

    anolis: x86/pci-dma: Fix logical error in patch_do_basic_check()
    
    The purpose of the if statement in function A regarding dir is to return
    false only when dir is not equal to B or C. Therefore, the '||' (logical
    OR) should be replaced with '&&' (logical AND).
    
    Fixes: fb5016b847cf ("anolis: Fix streaming DMA writes disorder issue for
    Zhaoxin's KH-40000 platform")
Comment 1 小龙 admin 2024-05-23 17:34:38 UTC
The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/3257
Comment 2 LeoLiu-oc zhaoxin_group 2024-05-28 10:26:55 UTC
anolis: Fix dev->node equal to NUMA_NO_NODE issue

Some device or driver issues lead to dev->numa_node equal toNUMA_NO_NODE(-1).
The preferred_nid of the __alloc_pages_node_mask() function cannot pass in negative values, so add the judgement of dev->numa_node.