linux-kernel: regmap: random page fault due to huge i2c access

0

Lately, I was getting random page fault after switching to regmap from traditional I²C access, I suspect it is due to the huge register access, since another regmap (idtsmu_sabre_range_cfg) with smaller register (0 to 0x400) space doesn't have that problem.

Does anyone have any insight for this?

static const struct regmap_range_cfg idtsmu_cm_range_cfg[] = {
    {
        .range_min = 0,
        .range_max = 0xD000,
        .selector_reg = IDTSMU_CM_PAGE_ADDR,
        .selector_mask = 0xFF,
        .selector_shift = 0,
        .window_start = 0,
        .window_len = IDTSMU_CM_PAGE_WINDOW,
    }
};

static const struct regmap_range_cfg idtsmu_sabre_range_cfg[] = {
    {
        .range_min = 0,
        .range_max = 0x400,
        .selector_reg = IDTSMU_SABRE_PAGE_ADDR,
        .selector_mask = 0xFF,
        .selector_shift = 0,
        .window_start = 0,
        .window_len = IDTSMU_SABRE_PAGE_WINDOW,
    }
};
[    0.000000] Virtual kernel memory layout:
[    0.000000]     modules : 0xffffff8000000000 - 0xffffff8008000000   (   128 MB)
[    0.000000]     vmalloc : 0xffffff8008000000 - 0xffffffbebfff0000   (   250 GB)
[    0.000000]       .text : 0xffffff8008080000 - 0xffffff8008a60000   ( 10112 KB)
[    0.000000]     .rodata : 0xffffff8008a60000 - 0xffffff8008d90000   (  3264 KB)
[    0.000000]       .init : 0xffffff8008d90000 - 0xffffff8008e10000   (   512 KB)
[    0.000000]       .data : 0xffffff8008e10000 - 0xffffff8008eb6200   (   665 KB)
[    0.000000]        .bss : 0xffffff8008eb6200 - 0xffffff80090d40b0   (  2168 KB)
[    0.000000]     fixed   : 0xffffffbefe7fd000 - 0xffffffbefec00000   (  4108 KB)
[    0.000000]     PCI I/O : 0xffffffbefee00000 - 0xffffffbeffe00000   (    16 MB)
[    0.000000]     vmemmap : 0xffffffbf00000000 - 0xffffffc000000000   (     4 GB maximum)
[    0.000000]               0xffffffbf00000000 - 0xffffffbf1dc00000   (   476 MB actual)
[    0.000000]     memory  : 0xffffffc000000000 - 0xffffffc880000000   ( 34816 MB)
[ 186.307394] Unable to handle kernel paging request at virtual address ffffff800c000010
[ 186.315316] Mem abort info:
[ 186.318107] Exception class = DABT (current EL), IL = 32 bits
[ 186.324022] SET = 0, FnV = 0
[ 186.327069] EA = 0, S1PTW = 0
[ 186.330201] Data abort info:
[ 186.333075] ISV = 0, ISS = 0x00000007
[ 186.336902] CM = 0, WnR = 0
[ 186.339860] swapper pgtable: 4k pages, 39-bit VAs, pgd = ffffff80090d8000
[ 186.346634] [ffffff800c000010] *pgd=000000087fffe003, *pud=000000087fffe003, *pmd=00000008789b8003, *pte=0000000000000000
[ 186.357591] Internal error: Oops: 96000007 [#2] SMP
[ 186.362452] Modules linked in: ptp_idtcm(O) idtsmu(O) idtsmu_i2c(O) [last unloaded: uio_pdrv_genirq]
[ 186.371578] CPU: 0 PID: 2324 Comm: cat Tainted: G D O 4.14.0-xilinx-v2018.3 #1
[ 186.379742] Hardware name: ZynqMP ZCU102 Rev1.0 (DT)
[ 186.384691] task: ffffffc87bb28480 task.stack: ffffff800c230000
[ 186.390599] PC is at dev_attr_show+0x30/0x78
[ 186.394856] LR is at dev_attr_show+0x24/0x78
[ 186.399108] pc : [<ffffff800857b3e8>] lr : [<ffffff800857b3dc>] pstate: 80000145
[ 186.406486] sp : ffffff800c2338e0
Segmentation fault
linux-kernel
i2c
regmap-api
asked on Stack Overflow Dec 8, 2020 by user3375547 • edited Dec 12, 2020 by 0andriy

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0