Modify

Opened 3 years ago

Last modified 3 years ago

#19213 new defect

mt7621 get a panic with pinctrl driver

Reported by: williamtoyang@… Owned by: developers
Priority: normal Milestone: Chaos Calmer 15.05
Component: packages Version: Trunk
Keywords: pinctrl mt7621 Cc:

Description

CPU0 revision is: 0001992f (MIPS 1004Kc)
[ 0.000000] MIPS: machine is Mediatek MT7621 evaluation board
[ 0.000000] Determined physical RAM map:
[ 0.000000] memory: 02000000 @ 00000000 (usable)
[ 0.000000] Initrd not found or empty - disabling initrd
[ 0.000000] Zone ranges:
[ 0.000000] Normal [mem 0x00000000-0x01ffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x00000000-0x01ffffff]
[ 0.000000] Initmem setup node 0 [mem 0x00000000-0x01ffffff]
[ 0.000000] Detected 3 available secondary CPU(s)
[ 0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[ 0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[ 0.000000] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[ 0.000000] PERCPU: Embedded 9 pages/cpu @81049000 s5696 r8192 d22976 u36864
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 8128
[ 0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2
[ 0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[ 0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.000000] Writing ErrCtl register=00060000
[ 0.000000] Readback ErrCtl register=00060000
[ 0.000000] Memory: 28544K/32768K available (2685K kernel code, 137K rwdata, 520K rodata, 164K init, 196K bss, 4224K reserved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] NR_IRQS:256
[ 0.000000] gic: revision 3.0
[ 0.000000] CPU Clock: 880MHz
[ 0.000000] Calibrating delay loop... 577.53 BogoMIPS (lpj=2887680)
[ 0.050000] pid_max: default: 32768 minimum: 301
[ 0.060000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.070000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.080000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[ 0.080000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[ 0.080000] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[ 0.080000] CPU1 revision is: 0001992f (MIPS 1004Kc)
[ 0.180000] Synchronize counters for CPU 1: done.
[ 0.180000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[ 0.180000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[ 0.180000] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[ 0.190000] CPU2 revision is: 0001992f (MIPS 1004Kc)
[ 0.280000] Synchronize counters for CPU 2: done.
[ 0.290000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[ 0.290000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[ 0.290000] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[ 0.290000] CPU3 revision is: 0001992f (MIPS 1004Kc)
[ 0.380000] Synchronize counters for CPU 3: done.
[ 0.390000] Brought up 4 CPUs
[ 0.400000] pinctrl core: initialized pinctrl subsystem
[ 0.410000] NET: Registered protocol family 16
[ 0.420000] pinctrl core: failed to register map default (0): invalid type given
[ 0.430000] Kernel bug detected#1:
[ 0.430000] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.18.9 #3
[ 0.430000] task: 81838000 ti: 81832000 task.ti: 81832000
[ 0.430000] $ 0 : 00000000 00000000 81009bc0 00000001
[ 0.430000] $ 4 : 00000000 801f0030 801f0030 80330000
[ 0.430000] $ 8 : 0000006e 64696c61 70797420 69672065
[ 0.430000] $12 : 6c696166 0000051c 00000000 74206465
[ 0.430000] $16 : 81932780 81932718 81932718 00100100
[ 0.430000] $20 : 00200200 81002ac8 81002b38 810029fc
[ 0.430000] $24 : 00000003 801ffdd0
[ 0.430000] $28 : 81832000 81833b28 81000658 801cde28
[ 0.430000] Hi : 00000000
[ 0.430000] Lo : 00000000
[ 0.430000] epc : 80164134 kfree+0x68/0x178
[ 0.430000] Not tainted
[ 0.430000] ra : 801cde28 pinctrl_dt_free_maps+0x70/0xa0
[ 0.430000] Status: 11009c03 KERNEL EXL IE
[ 0.430000] Cause : 10800034
[ 0.430000] PrId : 0001992f (MIPS 1004Kc)
[ 0.430000] Modules linked in:
[ 0.430000] Process swapper/0 (pid: 1, threadinfo=81832000, task=81838000, tls=00000000)
[ 0.430000] Stack : 81932700 81932700 00000000 00000000 81932700 ffffffea 00000000 81930800

00000000 801ce0f0 00000000 00000000 00000000 803339e8 00000006 00000007
00000006 801f0030 00000001 81000658 8100066c 00000000 81932700 80399a54
818fba10 81932680 0000003c 8180beec 0000003d 80340000 80342144 801ce684
0000003c 8180bee0 0000003c 802f0000 81930790 80285c08 81930800 80340000
...

[ 0.430000] Call Trace:
[ 0.430000] [<80164134>] kfree+0x68/0x178
[ 0.430000] [<801cde28>] pinctrl_dt_free_maps+0x70/0xa0
[ 0.430000] [<801ce0f0>] pinctrl_dt_to_map+0x298/0x2cc
[ 0.430000] [<801ce684>] pinctrl_get+0x168/0x430
[ 0.430000] [<801cf5b8>] pinctrl_register+0x2a0/0x474
[ 0.430000] [<80200470>] rt2880_pinmux_probe+0x454/0x5b4
[ 0.430000] [<801d3e38>] platform_drv_probe+0x24/0x60
[ 0.430000] [<800e593c>] driver_probe_device+0xd8/0x224
[ 0.430000] [<800997c8>] bus_for_each_drv+0x9c/0xac
[ 0.430000] [<800c5df0>] device_attach+0x78/0x9c
[ 0.430000] [<80099874>] bus_probe_device+0x3c/0xcc
[ 0.430000] [<800c5c9c>] device_add+0x428/0x4fc
[ 0.430000] [<801a6e88>] of_platform_device_create_pdata+0x104/0x14c
[ 0.430000] [<801a6bdc>] of_platform_bus_create+0xfc/0x1a4
[ 0.430000] [<801a6ff4>] of_platform_populate+0x78/0xc0
[ 0.430000] [<80349970>] plat_of_setup+0x68/0x94
[ 0.430000] [<800d91b4>] do_one_initcall+0x148/0x1ec
[ 0.430000] [<80347d0c>] kernel_init_freeable+0x168/0x220
[ 0.430000] [<8000a4a0>] kernel_init+0x10/0x114
[ 0.430000] [<80005878>] ret_from_kernel_thread+0x14/0x1c
[ 0.430000]
[ 0.430000]
Code: 8c430000 3063c000 2c630001 <00030336> 8c450000 7ca50380 10a00002 00000000 8c450038
[ 0.440000] ---[ end trace b06f08b3a1d18d49 ]---
[ 0.440000] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[ 0.440000]
[ 0.440000] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[ 0.440000]

Attachments (0)

Change History (2)

comment:1 follow-up: Changed 3 years ago by williamtoyang@…

modify pinctrl/core.c,add a debug message,works well!
static struct pinctrl *create_pinctrl(struct device *dev)
{

struct pinctrl *p;
const char *devname;
struct pinctrl_maps *maps_node;
int i;
struct pinctrl_map const *map;
int ret;

/*

  • create the state cookie holder struct pinctrl for each
  • mapping, this is what consumers will get when requesting
  • a pin control handle with pinctrl_get() */

p = kzalloc(sizeof(*p), GFP_KERNEL);
if (p == NULL) {

dev_err(dev, "failed to alloc struct pinctrl\n");
return ERR_PTR(-ENOMEM);

}
p->dev = dev;
INIT_LIST_HEAD(&p->states);
INIT_LIST_HEAD(&p->dt_maps);

printk("---->create_pinctrl:%s\n",dev_name(dev)); add this

ret = pinctrl_dt_to_map(p);
if (ret < 0) {

kfree(p);
return ERR_PTR(ret);

}

comment:2 in reply to: ↑ 1 Changed 3 years ago by fclql

Replying to williamtoyang@…:

modify pinctrl/core.c,add a debug message,works well!
static struct pinctrl *create_pinctrl(struct device *dev)
{

struct pinctrl *p;
const char *devname;
struct pinctrl_maps *maps_node;
int i;
struct pinctrl_map const *map;
int ret;

/*

  • create the state cookie holder struct pinctrl for each
  • mapping, this is what consumers will get when requesting
  • a pin control handle with pinctrl_get() */

p = kzalloc(sizeof(*p), GFP_KERNEL);
if (p == NULL) {

dev_err(dev, "failed to alloc struct pinctrl\n");
return ERR_PTR(-ENOMEM);

}
p->dev = dev;
INIT_LIST_HEAD(&p->states);
INIT_LIST_HEAD(&p->dt_maps);

printk("---->create_pinctrl:%s\n",dev_name(dev)); add this

ret = pinctrl_dt_to_map(p);
if (ret < 0) {

kfree(p);
return ERR_PTR(ret);

}

Return 3.14 kernels have this problem?

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.