Hello,
On Linaro Android 14.04, with custom compiled kernel (config file attached), I am facing a kernel crash (details log attached). I am running on Samsung Arndale Board with Exynos 5250.
Output from my /sys/kernel/debug/gpio looks as below -
root@arndale:/ # cat /sys/kernel/debug/gpio
GPIOs 0-7, GPA0: gpio-0 (s3c24xx-uart ) in hi gpio-1 (s3c24xx-uart ) in hi gpio-2 (s3c24xx-uart ) in lo gpio-3 (s3c24xx-uart ) in hi gpio-6 (i2c-bus ) in hi gpio-7 (i2c-bus ) in hi
GPIOs 9-14, GPA1: gpio-9 (s3c24xx-uart ) in hi gpio-10 (s3c24xx-uart ) in hi gpio-11 (s3c24xx-uart ) in hi gpio-12 (s3c24xx-uart ) in hi gpio-13 (s3c24xx-uart ) in lo gpio-14 (s3c24xx-uart ) in hi
GPIOs 16-23, GPA2:
GPIOs 25-29, GPB0:
GPIOs 31-35, GPB1:
GPIOs 37-40, GPB2:
GPIOs 42-45, GPB3: gpio-42 (i2c-bus ) in hi gpio-43 (i2c-bus ) in hi
GPIOs 47-53, GPC0: gpio-47 (dw-mci-bus ) in lo gpio-48 (dw-mci-bus ) in hi gpio-50 (dw-mci-bus ) in hi gpio-51 (dw-mci-bus ) in hi gpio-52 (dw-mci-bus ) in hi gpio-53 (dw-mci-bus ) in hi
GPIOs 55-58, GPC1: gpio-55 (dw-mci-bus ) in hi gpio-56 (dw-mci-bus ) in hi gpio-57 (dw-mci-bus ) in hi gpio-58 (dw-mci-bus ) in hi
GPIOs 60-66, GPC2:
GPIOs 68-74, GPC3: gpio-68 (dw-mci-bus ) in lo gpio-69 (dw-mci-bus ) in hi gpio-70 (dw-mci-cd ) in lo gpio-71 (dw-mci-bus ) in lo gpio-72 (dw-mci-bus ) in hi gpio-73 (dw-mci-bus ) in hi gpio-74 (dw-mci-bus ) in hi
GPIOs 76-82, GPC4:
GPIOs 84-87, GPD0: gpio-84 (s3c24xx-uart ) in lo gpio-85 (s3c24xx-uart ) in hi gpio-86 (s3c24xx-uart ) in lo gpio-87 (s3c24xx-uart ) in hi
GPIOs 89-96, GPD1:
GPIOs 98-103, GPY0:
GPIOs 105-108, GPY1:
GPIOs 110-115, GPY2:
GPIOs 117-124, GPY3:
GPIOs 126-133, GPY4:
GPIOs 135-142, GPY5:
GPIOs 144-151, GPY6:
GPIOs 153-160, GPX0:
GPIOs 162-169, GPX1: gpio-163 (VDD_33ON_2.8V ) out hi
GPIOs 171-178, GPX2: gpio-174 (S5M8767 DS2 ) out lo gpio-175 (S5M8767 DS3 ) out lo gpio-176 (S5M8767 DS4 ) out lo
GPIOs 180-187, GPX3: gpio-187 (HPD ) in lo
GPIOs 189-196, GPE0:
GPIOs 198-199, GPE1:
GPIOs 201-204, GPF0:
GPIOs 206-209, GPF1:
GPIOs 211-218, GPG0:
GPIOs 220-227, GPG1:
GPIOs 229-230, GPG2:
GPIOs 232-235, GPH0:
GPIOs 237-244, GPH1:
GPIOs 246-253, GPV0:
GPIOs 255-262, GPV1:
GPIOs 264-271, GPV2:
GPIOs 273-280, GPV3:
GPIOs 282-283, GPV4:
GPIOs 285-291, GPZ:
While trying to export gpio 8, the crash happens -
root@arndale:/ # echo 8 > /sys/class/gpio/export
1Unable to handle kernel NULL pointer dereference at virtual address 00000044
[ 26.700000] Unable to handle kernel NULL pointer dereference at virtual address 00000044 1pgd = e8848000
[ 26.700000] pgd = e8848000 [00000044] *pgd=00000000[ 26.720000] [00000044] *pgd=00000000
Internal error: Oops: 5 [#1] PREEMPT SMP ARM
[ 26.730000] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
From above, I noted that gpio 0 - 7 are associated with GPA0 and gpio
9 - 14 with GPA1. gpio 8 is not existent in /sys/kernel/debug/gpio file.
On the same board, I ran Linaro Saucy server, and there the crash does not happen. /sys/kernel/debug/gpio on saucy server looks as below -
GPIOs 0-7, platform/11400000.pinctrl, gpa0:
GPIOs 8-13, platform/11400000.pinctrl, gpa1:
GPIOs 14-21, platform/11400000.pinctrl, gpa2:
GPIOs 22-26, platform/11400000.pinctrl, gpb0:
GPIOs 27-31, platform/11400000.pinctrl, gpb1:
GPIOs 32-35, platform/11400000.pinctrl, gpb2:
GPIOs 36-39, platform/11400000.pinctrl, gpb3:
GPIOs 40-46, platform/11400000.pinctrl, gpc0:
GPIOs 47-50, platform/11400000.pinctrl, gpc1:
GPIOs 51-57, platform/11400000.pinctrl, gpc2:
GPIOs 58-64, platform/11400000.pinctrl, gpc3:
GPIOs 65-68, platform/11400000.pinctrl, gpd0:
GPIOs 69-76, platform/11400000.pinctrl, gpd1: gpio-76 (usb3503 connect ) out hi
GPIOs 77-83, platform/11400000.pinctrl, gpc4:
GPIOs 84-89, platform/11400000.pinctrl, gpy0:
GPIOs 90-93, platform/11400000.pinctrl, gpy1:
GPIOs 94-99, platform/11400000.pinctrl, gpy2:
GPIOs 100-107, platform/11400000.pinctrl, gpy3:
GPIOs 108-115, platform/11400000.pinctrl, gpy4:
GPIOs 116-123, platform/11400000.pinctrl, gpy5:
GPIOs 124-131, platform/11400000.pinctrl, gpy6:
GPIOs 132-139, platform/11400000.pinctrl, gpx0:
GPIOs 140-147, platform/11400000.pinctrl, gpx1: gpio-141 (VDD_33ON_2.8V ) out hi gpio-144 (SW-TACT2 ) in hi gpio-145 (SW-TACT3 ) in hi gpio-146 (SW-TACT4 ) in hi gpio-147 (SW-TACT5 ) in hi
GPIOs 148-155, platform/11400000.pinctrl, gpx2: gpio-148 (SW-TACT6 ) in hi gpio-149 (SW-TACT7 ) in hi gpio-151 (S5M8767 DS2 ) out lo gpio-152 (S5M8767 DS3 ) out lo gpio-153 (S5M8767 DS4 ) out lo
GPIOs 156-163, platform/11400000.pinctrl, gpx3: gpio-161 (usb3503 reset ) out hi gpio-163 (HPD ) in lo
GPIOs 164-171, platform/13400000.pinctrl, gpe0:
GPIOs 172-173, platform/13400000.pinctrl, gpe1:
GPIOs 174-177, platform/13400000.pinctrl, gpf0:
GPIOs 178-181, platform/13400000.pinctrl, gpf1:
GPIOs 182-189, platform/13400000.pinctrl, gpg0:
GPIOs 190-197, platform/13400000.pinctrl, gpg1:
GPIOs 198-199, platform/13400000.pinctrl, gpg2:
GPIOs 200-203, platform/13400000.pinctrl, gph0:
GPIOs 204-211, platform/13400000.pinctrl, gph1:
GPIOs 212-219, platform/10d10000.pinctrl, gpv0:
GPIOs 220-227, platform/10d10000.pinctrl, gpv1:
GPIOs 228-235, platform/10d10000.pinctrl, gpv2:
GPIOs 236-243, platform/10d10000.pinctrl, gpv3:
GPIOs 244-245, platform/10d10000.pinctrl, gpv4:
GPIOs 246-252, platform/3860000.pinctrl, gpz:
Questions -
1. Is it kernel bug? 2. Why are some gpios (8, 15, 24, etc) not mapped to any device on android?
Mohammad,
Does the problem occur with a mainline kernel?
Regards, Amit
On Wed, Jun 25, 2014 at 1:47 PM, Mohammad Merajul Islam Molla meraj.enigma@gmail.com wrote:
Hello,
On Linaro Android 14.04, with custom compiled kernel (config file attached), I am facing a kernel crash (details log attached). I am running on Samsung Arndale Board with Exynos 5250.
Output from my /sys/kernel/debug/gpio looks as below -
root@arndale:/ # cat /sys/kernel/debug/gpio
GPIOs 0-7, GPA0: gpio-0 (s3c24xx-uart ) in hi gpio-1 (s3c24xx-uart ) in hi gpio-2 (s3c24xx-uart ) in lo gpio-3 (s3c24xx-uart ) in hi gpio-6 (i2c-bus ) in hi gpio-7 (i2c-bus ) in hi
GPIOs 9-14, GPA1: gpio-9 (s3c24xx-uart ) in hi gpio-10 (s3c24xx-uart ) in hi gpio-11 (s3c24xx-uart ) in hi gpio-12 (s3c24xx-uart ) in hi gpio-13 (s3c24xx-uart ) in lo gpio-14 (s3c24xx-uart ) in hi
GPIOs 16-23, GPA2:
GPIOs 25-29, GPB0:
GPIOs 31-35, GPB1:
GPIOs 37-40, GPB2:
GPIOs 42-45, GPB3: gpio-42 (i2c-bus ) in hi gpio-43 (i2c-bus ) in hi
GPIOs 47-53, GPC0: gpio-47 (dw-mci-bus ) in lo gpio-48 (dw-mci-bus ) in hi gpio-50 (dw-mci-bus ) in hi gpio-51 (dw-mci-bus ) in hi gpio-52 (dw-mci-bus ) in hi gpio-53 (dw-mci-bus ) in hi
GPIOs 55-58, GPC1: gpio-55 (dw-mci-bus ) in hi gpio-56 (dw-mci-bus ) in hi gpio-57 (dw-mci-bus ) in hi gpio-58 (dw-mci-bus ) in hi
GPIOs 60-66, GPC2:
GPIOs 68-74, GPC3: gpio-68 (dw-mci-bus ) in lo gpio-69 (dw-mci-bus ) in hi gpio-70 (dw-mci-cd ) in lo gpio-71 (dw-mci-bus ) in lo gpio-72 (dw-mci-bus ) in hi gpio-73 (dw-mci-bus ) in hi gpio-74 (dw-mci-bus ) in hi
GPIOs 76-82, GPC4:
GPIOs 84-87, GPD0: gpio-84 (s3c24xx-uart ) in lo gpio-85 (s3c24xx-uart ) in hi gpio-86 (s3c24xx-uart ) in lo gpio-87 (s3c24xx-uart ) in hi
GPIOs 89-96, GPD1:
GPIOs 98-103, GPY0:
GPIOs 105-108, GPY1:
GPIOs 110-115, GPY2:
GPIOs 117-124, GPY3:
GPIOs 126-133, GPY4:
GPIOs 135-142, GPY5:
GPIOs 144-151, GPY6:
GPIOs 153-160, GPX0:
GPIOs 162-169, GPX1: gpio-163 (VDD_33ON_2.8V ) out hi
GPIOs 171-178, GPX2: gpio-174 (S5M8767 DS2 ) out lo gpio-175 (S5M8767 DS3 ) out lo gpio-176 (S5M8767 DS4 ) out lo
GPIOs 180-187, GPX3: gpio-187 (HPD ) in lo
GPIOs 189-196, GPE0:
GPIOs 198-199, GPE1:
GPIOs 201-204, GPF0:
GPIOs 206-209, GPF1:
GPIOs 211-218, GPG0:
GPIOs 220-227, GPG1:
GPIOs 229-230, GPG2:
GPIOs 232-235, GPH0:
GPIOs 237-244, GPH1:
GPIOs 246-253, GPV0:
GPIOs 255-262, GPV1:
GPIOs 264-271, GPV2:
GPIOs 273-280, GPV3:
GPIOs 282-283, GPV4:
GPIOs 285-291, GPZ:
While trying to export gpio 8, the crash happens -
root@arndale:/ # echo 8 > /sys/class/gpio/export
1Unable to handle kernel NULL pointer dereference at virtual address 00000044
[ 26.700000] Unable to handle kernel NULL pointer dereference at virtual address 00000044 1pgd = e8848000
[ 26.700000] pgd = e8848000 [00000044] *pgd=00000000[ 26.720000] [00000044] *pgd=00000000
Internal error: Oops: 5 [#1] PREEMPT SMP ARM
[ 26.730000] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
From above, I noted that gpio 0 - 7 are associated with GPA0 and gpio 9 - 14 with GPA1. gpio 8 is not existent in /sys/kernel/debug/gpio file.
On the same board, I ran Linaro Saucy server, and there the crash does not happen. /sys/kernel/debug/gpio on saucy server looks as below -
GPIOs 0-7, platform/11400000.pinctrl, gpa0:
GPIOs 8-13, platform/11400000.pinctrl, gpa1:
GPIOs 14-21, platform/11400000.pinctrl, gpa2:
GPIOs 22-26, platform/11400000.pinctrl, gpb0:
GPIOs 27-31, platform/11400000.pinctrl, gpb1:
GPIOs 32-35, platform/11400000.pinctrl, gpb2:
GPIOs 36-39, platform/11400000.pinctrl, gpb3:
GPIOs 40-46, platform/11400000.pinctrl, gpc0:
GPIOs 47-50, platform/11400000.pinctrl, gpc1:
GPIOs 51-57, platform/11400000.pinctrl, gpc2:
GPIOs 58-64, platform/11400000.pinctrl, gpc3:
GPIOs 65-68, platform/11400000.pinctrl, gpd0:
GPIOs 69-76, platform/11400000.pinctrl, gpd1: gpio-76 (usb3503 connect ) out hi
GPIOs 77-83, platform/11400000.pinctrl, gpc4:
GPIOs 84-89, platform/11400000.pinctrl, gpy0:
GPIOs 90-93, platform/11400000.pinctrl, gpy1:
GPIOs 94-99, platform/11400000.pinctrl, gpy2:
GPIOs 100-107, platform/11400000.pinctrl, gpy3:
GPIOs 108-115, platform/11400000.pinctrl, gpy4:
GPIOs 116-123, platform/11400000.pinctrl, gpy5:
GPIOs 124-131, platform/11400000.pinctrl, gpy6:
GPIOs 132-139, platform/11400000.pinctrl, gpx0:
GPIOs 140-147, platform/11400000.pinctrl, gpx1: gpio-141 (VDD_33ON_2.8V ) out hi gpio-144 (SW-TACT2 ) in hi gpio-145 (SW-TACT3 ) in hi gpio-146 (SW-TACT4 ) in hi gpio-147 (SW-TACT5 ) in hi
GPIOs 148-155, platform/11400000.pinctrl, gpx2: gpio-148 (SW-TACT6 ) in hi gpio-149 (SW-TACT7 ) in hi gpio-151 (S5M8767 DS2 ) out lo gpio-152 (S5M8767 DS3 ) out lo gpio-153 (S5M8767 DS4 ) out lo
GPIOs 156-163, platform/11400000.pinctrl, gpx3: gpio-161 (usb3503 reset ) out hi gpio-163 (HPD ) in lo
GPIOs 164-171, platform/13400000.pinctrl, gpe0:
GPIOs 172-173, platform/13400000.pinctrl, gpe1:
GPIOs 174-177, platform/13400000.pinctrl, gpf0:
GPIOs 178-181, platform/13400000.pinctrl, gpf1:
GPIOs 182-189, platform/13400000.pinctrl, gpg0:
GPIOs 190-197, platform/13400000.pinctrl, gpg1:
GPIOs 198-199, platform/13400000.pinctrl, gpg2:
GPIOs 200-203, platform/13400000.pinctrl, gph0:
GPIOs 204-211, platform/13400000.pinctrl, gph1:
GPIOs 212-219, platform/10d10000.pinctrl, gpv0:
GPIOs 220-227, platform/10d10000.pinctrl, gpv1:
GPIOs 228-235, platform/10d10000.pinctrl, gpv2:
GPIOs 236-243, platform/10d10000.pinctrl, gpv3:
GPIOs 244-245, platform/10d10000.pinctrl, gpv4:
GPIOs 246-252, platform/3860000.pinctrl, gpz:
Questions -
- Is it kernel bug?
- Why are some gpios (8, 15, 24, etc) not mapped to any device on android?
-- Thanks,
- Meraj
linaro-kernel mailing list linaro-kernel@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-kernel
Hello Amit,
I did some further testing.
The issue occurs with Linaro Saucy server with Linaro Stable Kernel 3.10.40.
root@linaro-server: uname -a Linux linaro-server 3.10.40 #1 SMP Thu Jun 26 09:25:03 BDT 2014 armv7l armv7l armv7l GNU/Linux
Output from /sys/kernel/debug/gpio -
root@linaro-server:~# cat /sys/kernel/debug/gpio GPIOs 0-7, platform/11400000.pinctrl, gpa0:
GPIOs 8-13, platform/11400000.pinctrl, gpa1:
GPIOs 14-21, platform/11400000.pinctrl, gpa2:
GPIOs 22-26, platform/11400000.pinctrl, gpb0:
GPIOs 27-31, platform/11400000.pinctrl, gpb1:
GPIOs 32-35, platform/11400000.pinctrl, gpb2:
GPIOs 36-39, platform/11400000.pinctrl, gpb3:
GPIOs 40-46, platform/11400000.pinctrl, gpc0:
GPIOs 47-50, platform/11400000.pinctrl, gpc1:
GPIOs 51-57, platform/11400000.pinctrl, gpc2:
GPIOs 58-64, platform/11400000.pinctrl, gpc3:
GPIOs 65-68, platform/11400000.pinctrl, gpd0:
GPIOs 69-76, platform/11400000.pinctrl, gpd1:
GPIOs 77-83, platform/11400000.pinctrl, gpc4:
GPIOs 84-89, platform/11400000.pinctrl, gpy0:
GPIOs 90-93, platform/11400000.pinctrl, gpy1:
GPIOs 94-99, platform/11400000.pinctrl, gpy2:
GPIOs 100-107, platform/11400000.pinctrl, gpy3:
GPIOs 108-115, platform/11400000.pinctrl, gpy4:
GPIOs 116-123, platform/11400000.pinctrl, gpy5:
GPIOs 124-131, platform/11400000.pinctrl, gpy6:
GPIOs 132-139, platform/11400000.pinctrl, gpx0:
GPIOs 140-147, platform/11400000.pinctrl, gpx1: gpio-141 (VDD_33ON_2.8V ) out hi gpio-144 (SW-TACT2 ) in hi gpio-145 (SW-TACT3 ) in hi gpio-146 (SW-TACT4 ) in hi gpio-147 (SW-TACT5 ) in hi
GPIOs 148-155, platform/11400000.pinctrl, gpx2: gpio-148 (SW-TACT6 ) in hi gpio-149 (SW-TACT7 ) in hi gpio-151 (S5M8767 DS2 ) out lo gpio-152 (S5M8767 DS3 ) out lo gpio-153 (S5M8767 DS4 ) out lo
GPIOs 156-163, platform/11400000.pinctrl, gpx3:
GPIOs 164-171, platform/13400000.pinctrl, gpe0:
GPIOs 172-173, platform/13400000.pinctrl, gpe1:
GPIOs 174-177, platform/13400000.pinctrl, gpf0:
GPIOs 178-181, platform/13400000.pinctrl, gpf1:
GPIOs 182-189, platform/13400000.pinctrl, gpg0:
GPIOs 190-197, platform/13400000.pinctrl, gpg1:
GPIOs 198-199, platform/13400000.pinctrl, gpg2:
GPIOs 200-203, platform/13400000.pinctrl, gph0:
GPIOs 204-211, platform/13400000.pinctrl, gph1:
GPIOs 212-219, platform/10d10000.pinctrl, gpv0:
GPIOs 220-227, platform/10d10000.pinctrl, gpv1:
GPIOs 228-235, platform/10d10000.pinctrl, gpv2:
GPIOs 236-243, platform/10d10000.pinctrl, gpv3:
GPIOs 244-245, platform/10d10000.pinctrl, gpv4:
GPIOs 246-252, platform/3860000.pinctrl, gpz:
While trying to export gpio 253 which does not exist in /sys/kernel/debug/gpio -
root@linaro-server:~# echo 8 > /sys/class/gpio/export root@linaro-server:~# echo 253 > /sys/class/gpio/export [ 184.656031] Unable to handle kernel NULL pointer dereference at virtual address 00000044 [ 184.662600] pgd = e65f4980 [ 184.665222] [00000044] *pgd=a65e2003, *pmd=a664a003, *pte=00000000 [ 184.671291] Internal error: Oops: 207 [#1] SMP THUMB2 [ 184.676242] Modules linked in: [ 184.679239] CPU: 1 PID: 1887 Comm: bash Not tainted 3.10.40 #1 [ 184.684964] task: e6591580 ti: e6734000 task.ti: e6734000 [ 184.690281] PC is at gpiod_request+0x2e/0x130 [ 184.694543] LR is at _raw_spin_lock_irqsave+0x13/0x18 [ 184.699490] pc : [<8027b2aa>] lr : [<8047e8f7>] psr: 600700b3 [ 184.699490] sp : e6735ef8 ip : 802dc6bd fp : 00000000 [ 184.710767] r10: e718f218 r9 : e7193748 r8 : 805ea048 [ 184.715878] r7 : fffffdfb r6 : a0070013 r5 : 00000000 r4 : 807edc7c [ 184.722286] r3 : e6591580 r2 : 00000001 r1 : 007a0079 r0 : a0070013 [ 184.728698] Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA Thumb Segment user [ 184.735958] Control: 70c5387d Table: a65f4980 DAC: 55555555 [ 184.741588] Process bash (pid: 1887, stack limit = 0xe6734238) [ 184.747311] Stack: (0xe6735ef8 to 0xe6736000) [ 184.751585] 5ee0: 00000000 00000004 [ 184.759630] 5f00: 807edc7c e6735f80 804d8900 e7193748 e718f218 8027be35 e6bab8d8 000000fd [ 184.767677] 5f20: 8027be05 e6bab8c0 e6bab8d8 802dc6cf 00000004 801055f3 e72ca200 00251408 [ 184.775703] 5f40: e6735f80 801054f9 00000004 00000004 00000000 800c09c1 e65decc0 800bf57b [ 184.783730] 5f60: 00060000 00000000 00000000 e72ca200 00000000 00251408 00000004 800c0dd3 [ 184.791757] 5f80: 00000000 00000000 800181c4 00000004 00251408 76f02a78 00000004 800181c4 [ 184.799786] 5fa0: e6734000 80018001 00000004 00251408 00000001 00251408 00000004 00000000 [ 184.807814] 5fc0: 00000004 00251408 76f02a78 00000004 00000004 00000000 000a6094 00000000 [ 184.815842] 5fe0: 00000000 7ee9a93c 76e7143d 76ea902c 40070010 00000001 00000000 00000000 [ 184.823907] [<8027b2aa>] (gpiod_request+0x2e/0x130) from [<8027be35>] (export_store+0x31/0x94) [ 184.832364] [<8027be35>] (export_store+0x31/0x94) from [<802dc6cf>] (class_attr_store+0x13/0x1c) [ 184.840985] [<802dc6cf>] (class_attr_store+0x13/0x1c) from [<801055f3>] (sysfs_write_file+0xfb/0x130) [ 184.850034] [<801055f3>] (sysfs_write_file+0xfb/0x130) from [<800c09c1>] (vfs_write+0x75/0x114) [ 184.858573] [<800c09c1>] (vfs_write+0x75/0x114) from [<800c0dd3>] (SyS_write+0x2f/0x58) [ 184.866430] [<800c0dd3>] (SyS_write+0x2f/0x58) from [<80018001>] (ret_fast_syscall+0x1/0x46) [ 184.874699] Code: bb10 6825 f46f 7701 (6c6b) f64a [ 184.879373] ---[ end trace 5ed1d539ac53eee0 ]---
However, I cloned linux-linaro-tracking.git (kernel version shows 3.14.0) and there the issue does not occur.
May be some fix went in between kernel 3.10.40 and 3.14.0 where the bug was fixed? Fix is probably not integrated in android kernel (at least in Linaro Android 14.04 which has kernel version 3.9.1).
-- Thanks, -Meraj
On Wed, Jun 25, 2014 at 2:31 PM, Amit Kucheria amit.kucheria@linaro.org wrote:
Mohammad,
Does the problem occur with a mainline kernel?
Regards, Amit
On Wed, Jun 25, 2014 at 1:47 PM, Mohammad Merajul Islam Molla meraj.enigma@gmail.com wrote:
Hello,
On Linaro Android 14.04, with custom compiled kernel (config file attached), I am facing a kernel crash (details log attached). I am running on Samsung Arndale Board with Exynos 5250.
Output from my /sys/kernel/debug/gpio looks as below -
root@arndale:/ # cat /sys/kernel/debug/gpio
GPIOs 0-7, GPA0: gpio-0 (s3c24xx-uart ) in hi gpio-1 (s3c24xx-uart ) in hi gpio-2 (s3c24xx-uart ) in lo gpio-3 (s3c24xx-uart ) in hi gpio-6 (i2c-bus ) in hi gpio-7 (i2c-bus ) in hi
GPIOs 9-14, GPA1: gpio-9 (s3c24xx-uart ) in hi gpio-10 (s3c24xx-uart ) in hi gpio-11 (s3c24xx-uart ) in hi gpio-12 (s3c24xx-uart ) in hi gpio-13 (s3c24xx-uart ) in lo gpio-14 (s3c24xx-uart ) in hi
GPIOs 16-23, GPA2:
GPIOs 25-29, GPB0:
GPIOs 31-35, GPB1:
GPIOs 37-40, GPB2:
GPIOs 42-45, GPB3: gpio-42 (i2c-bus ) in hi gpio-43 (i2c-bus ) in hi
GPIOs 47-53, GPC0: gpio-47 (dw-mci-bus ) in lo gpio-48 (dw-mci-bus ) in hi gpio-50 (dw-mci-bus ) in hi gpio-51 (dw-mci-bus ) in hi gpio-52 (dw-mci-bus ) in hi gpio-53 (dw-mci-bus ) in hi
GPIOs 55-58, GPC1: gpio-55 (dw-mci-bus ) in hi gpio-56 (dw-mci-bus ) in hi gpio-57 (dw-mci-bus ) in hi gpio-58 (dw-mci-bus ) in hi
GPIOs 60-66, GPC2:
GPIOs 68-74, GPC3: gpio-68 (dw-mci-bus ) in lo gpio-69 (dw-mci-bus ) in hi gpio-70 (dw-mci-cd ) in lo gpio-71 (dw-mci-bus ) in lo gpio-72 (dw-mci-bus ) in hi gpio-73 (dw-mci-bus ) in hi gpio-74 (dw-mci-bus ) in hi
GPIOs 76-82, GPC4:
GPIOs 84-87, GPD0: gpio-84 (s3c24xx-uart ) in lo gpio-85 (s3c24xx-uart ) in hi gpio-86 (s3c24xx-uart ) in lo gpio-87 (s3c24xx-uart ) in hi
GPIOs 89-96, GPD1:
GPIOs 98-103, GPY0:
GPIOs 105-108, GPY1:
GPIOs 110-115, GPY2:
GPIOs 117-124, GPY3:
GPIOs 126-133, GPY4:
GPIOs 135-142, GPY5:
GPIOs 144-151, GPY6:
GPIOs 153-160, GPX0:
GPIOs 162-169, GPX1: gpio-163 (VDD_33ON_2.8V ) out hi
GPIOs 171-178, GPX2: gpio-174 (S5M8767 DS2 ) out lo gpio-175 (S5M8767 DS3 ) out lo gpio-176 (S5M8767 DS4 ) out lo
GPIOs 180-187, GPX3: gpio-187 (HPD ) in lo
GPIOs 189-196, GPE0:
GPIOs 198-199, GPE1:
GPIOs 201-204, GPF0:
GPIOs 206-209, GPF1:
GPIOs 211-218, GPG0:
GPIOs 220-227, GPG1:
GPIOs 229-230, GPG2:
GPIOs 232-235, GPH0:
GPIOs 237-244, GPH1:
GPIOs 246-253, GPV0:
GPIOs 255-262, GPV1:
GPIOs 264-271, GPV2:
GPIOs 273-280, GPV3:
GPIOs 282-283, GPV4:
GPIOs 285-291, GPZ:
While trying to export gpio 8, the crash happens -
root@arndale:/ # echo 8 > /sys/class/gpio/export
1Unable to handle kernel NULL pointer dereference at virtual address 00000044
[ 26.700000] Unable to handle kernel NULL pointer dereference at virtual address 00000044 1pgd = e8848000
[ 26.700000] pgd = e8848000 [00000044] *pgd=00000000[ 26.720000] [00000044] *pgd=00000000
Internal error: Oops: 5 [#1] PREEMPT SMP ARM
[ 26.730000] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
From above, I noted that gpio 0 - 7 are associated with GPA0 and gpio 9 - 14 with GPA1. gpio 8 is not existent in /sys/kernel/debug/gpio file.
On the same board, I ran Linaro Saucy server, and there the crash does not happen. /sys/kernel/debug/gpio on saucy server looks as below -
GPIOs 0-7, platform/11400000.pinctrl, gpa0:
GPIOs 8-13, platform/11400000.pinctrl, gpa1:
GPIOs 14-21, platform/11400000.pinctrl, gpa2:
GPIOs 22-26, platform/11400000.pinctrl, gpb0:
GPIOs 27-31, platform/11400000.pinctrl, gpb1:
GPIOs 32-35, platform/11400000.pinctrl, gpb2:
GPIOs 36-39, platform/11400000.pinctrl, gpb3:
GPIOs 40-46, platform/11400000.pinctrl, gpc0:
GPIOs 47-50, platform/11400000.pinctrl, gpc1:
GPIOs 51-57, platform/11400000.pinctrl, gpc2:
GPIOs 58-64, platform/11400000.pinctrl, gpc3:
GPIOs 65-68, platform/11400000.pinctrl, gpd0:
GPIOs 69-76, platform/11400000.pinctrl, gpd1: gpio-76 (usb3503 connect ) out hi
GPIOs 77-83, platform/11400000.pinctrl, gpc4:
GPIOs 84-89, platform/11400000.pinctrl, gpy0:
GPIOs 90-93, platform/11400000.pinctrl, gpy1:
GPIOs 94-99, platform/11400000.pinctrl, gpy2:
GPIOs 100-107, platform/11400000.pinctrl, gpy3:
GPIOs 108-115, platform/11400000.pinctrl, gpy4:
GPIOs 116-123, platform/11400000.pinctrl, gpy5:
GPIOs 124-131, platform/11400000.pinctrl, gpy6:
GPIOs 132-139, platform/11400000.pinctrl, gpx0:
GPIOs 140-147, platform/11400000.pinctrl, gpx1: gpio-141 (VDD_33ON_2.8V ) out hi gpio-144 (SW-TACT2 ) in hi gpio-145 (SW-TACT3 ) in hi gpio-146 (SW-TACT4 ) in hi gpio-147 (SW-TACT5 ) in hi
GPIOs 148-155, platform/11400000.pinctrl, gpx2: gpio-148 (SW-TACT6 ) in hi gpio-149 (SW-TACT7 ) in hi gpio-151 (S5M8767 DS2 ) out lo gpio-152 (S5M8767 DS3 ) out lo gpio-153 (S5M8767 DS4 ) out lo
GPIOs 156-163, platform/11400000.pinctrl, gpx3: gpio-161 (usb3503 reset ) out hi gpio-163 (HPD ) in lo
GPIOs 164-171, platform/13400000.pinctrl, gpe0:
GPIOs 172-173, platform/13400000.pinctrl, gpe1:
GPIOs 174-177, platform/13400000.pinctrl, gpf0:
GPIOs 178-181, platform/13400000.pinctrl, gpf1:
GPIOs 182-189, platform/13400000.pinctrl, gpg0:
GPIOs 190-197, platform/13400000.pinctrl, gpg1:
GPIOs 198-199, platform/13400000.pinctrl, gpg2:
GPIOs 200-203, platform/13400000.pinctrl, gph0:
GPIOs 204-211, platform/13400000.pinctrl, gph1:
GPIOs 212-219, platform/10d10000.pinctrl, gpv0:
GPIOs 220-227, platform/10d10000.pinctrl, gpv1:
GPIOs 228-235, platform/10d10000.pinctrl, gpv2:
GPIOs 236-243, platform/10d10000.pinctrl, gpv3:
GPIOs 244-245, platform/10d10000.pinctrl, gpv4:
GPIOs 246-252, platform/3860000.pinctrl, gpz:
Questions -
- Is it kernel bug?
- Why are some gpios (8, 15, 24, etc) not mapped to any device on android?
-- Thanks,
- Meraj
linaro-kernel mailing list linaro-kernel@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-kernel
I'm going to have to refer you to Andrey, Mark and Tushar about LSK and linux-linaro contents. Tushar should know more about Samsung-specific issues.
On Thu, Jun 26, 2014 at 11:27 AM, Mohammad Merajul Islam Molla meraj.enigma@gmail.com wrote:
Hello Amit,
I did some further testing.
The issue occurs with Linaro Saucy server with Linaro Stable Kernel 3.10.40.
root@linaro-server: uname -a Linux linaro-server 3.10.40 #1 SMP Thu Jun 26 09:25:03 BDT 2014 armv7l armv7l armv7l GNU/Linux
Output from /sys/kernel/debug/gpio -
root@linaro-server:~# cat /sys/kernel/debug/gpio GPIOs 0-7, platform/11400000.pinctrl, gpa0:
GPIOs 8-13, platform/11400000.pinctrl, gpa1:
GPIOs 14-21, platform/11400000.pinctrl, gpa2:
GPIOs 22-26, platform/11400000.pinctrl, gpb0:
GPIOs 27-31, platform/11400000.pinctrl, gpb1:
GPIOs 32-35, platform/11400000.pinctrl, gpb2:
GPIOs 36-39, platform/11400000.pinctrl, gpb3:
GPIOs 40-46, platform/11400000.pinctrl, gpc0:
GPIOs 47-50, platform/11400000.pinctrl, gpc1:
GPIOs 51-57, platform/11400000.pinctrl, gpc2:
GPIOs 58-64, platform/11400000.pinctrl, gpc3:
GPIOs 65-68, platform/11400000.pinctrl, gpd0:
GPIOs 69-76, platform/11400000.pinctrl, gpd1:
GPIOs 77-83, platform/11400000.pinctrl, gpc4:
GPIOs 84-89, platform/11400000.pinctrl, gpy0:
GPIOs 90-93, platform/11400000.pinctrl, gpy1:
GPIOs 94-99, platform/11400000.pinctrl, gpy2:
GPIOs 100-107, platform/11400000.pinctrl, gpy3:
GPIOs 108-115, platform/11400000.pinctrl, gpy4:
GPIOs 116-123, platform/11400000.pinctrl, gpy5:
GPIOs 124-131, platform/11400000.pinctrl, gpy6:
GPIOs 132-139, platform/11400000.pinctrl, gpx0:
GPIOs 140-147, platform/11400000.pinctrl, gpx1: gpio-141 (VDD_33ON_2.8V ) out hi gpio-144 (SW-TACT2 ) in hi gpio-145 (SW-TACT3 ) in hi gpio-146 (SW-TACT4 ) in hi gpio-147 (SW-TACT5 ) in hi
GPIOs 148-155, platform/11400000.pinctrl, gpx2: gpio-148 (SW-TACT6 ) in hi gpio-149 (SW-TACT7 ) in hi gpio-151 (S5M8767 DS2 ) out lo gpio-152 (S5M8767 DS3 ) out lo gpio-153 (S5M8767 DS4 ) out lo
GPIOs 156-163, platform/11400000.pinctrl, gpx3:
GPIOs 164-171, platform/13400000.pinctrl, gpe0:
GPIOs 172-173, platform/13400000.pinctrl, gpe1:
GPIOs 174-177, platform/13400000.pinctrl, gpf0:
GPIOs 178-181, platform/13400000.pinctrl, gpf1:
GPIOs 182-189, platform/13400000.pinctrl, gpg0:
GPIOs 190-197, platform/13400000.pinctrl, gpg1:
GPIOs 198-199, platform/13400000.pinctrl, gpg2:
GPIOs 200-203, platform/13400000.pinctrl, gph0:
GPIOs 204-211, platform/13400000.pinctrl, gph1:
GPIOs 212-219, platform/10d10000.pinctrl, gpv0:
GPIOs 220-227, platform/10d10000.pinctrl, gpv1:
GPIOs 228-235, platform/10d10000.pinctrl, gpv2:
GPIOs 236-243, platform/10d10000.pinctrl, gpv3:
GPIOs 244-245, platform/10d10000.pinctrl, gpv4:
GPIOs 246-252, platform/3860000.pinctrl, gpz:
While trying to export gpio 253 which does not exist in /sys/kernel/debug/gpio -
root@linaro-server:~# echo 8 > /sys/class/gpio/export root@linaro-server:~# echo 253 > /sys/class/gpio/export [ 184.656031] Unable to handle kernel NULL pointer dereference at virtual address 00000044 [ 184.662600] pgd = e65f4980 [ 184.665222] [00000044] *pgd=a65e2003, *pmd=a664a003, *pte=00000000 [ 184.671291] Internal error: Oops: 207 [#1] SMP THUMB2 [ 184.676242] Modules linked in: [ 184.679239] CPU: 1 PID: 1887 Comm: bash Not tainted 3.10.40 #1 [ 184.684964] task: e6591580 ti: e6734000 task.ti: e6734000 [ 184.690281] PC is at gpiod_request+0x2e/0x130 [ 184.694543] LR is at _raw_spin_lock_irqsave+0x13/0x18 [ 184.699490] pc : [<8027b2aa>] lr : [<8047e8f7>] psr: 600700b3 [ 184.699490] sp : e6735ef8 ip : 802dc6bd fp : 00000000 [ 184.710767] r10: e718f218 r9 : e7193748 r8 : 805ea048 [ 184.715878] r7 : fffffdfb r6 : a0070013 r5 : 00000000 r4 : 807edc7c [ 184.722286] r3 : e6591580 r2 : 00000001 r1 : 007a0079 r0 : a0070013 [ 184.728698] Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA Thumb Segment user [ 184.735958] Control: 70c5387d Table: a65f4980 DAC: 55555555 [ 184.741588] Process bash (pid: 1887, stack limit = 0xe6734238) [ 184.747311] Stack: (0xe6735ef8 to 0xe6736000) [ 184.751585] 5ee0: 00000000 00000004 [ 184.759630] 5f00: 807edc7c e6735f80 804d8900 e7193748 e718f218 8027be35 e6bab8d8 000000fd [ 184.767677] 5f20: 8027be05 e6bab8c0 e6bab8d8 802dc6cf 00000004 801055f3 e72ca200 00251408 [ 184.775703] 5f40: e6735f80 801054f9 00000004 00000004 00000000 800c09c1 e65decc0 800bf57b [ 184.783730] 5f60: 00060000 00000000 00000000 e72ca200 00000000 00251408 00000004 800c0dd3 [ 184.791757] 5f80: 00000000 00000000 800181c4 00000004 00251408 76f02a78 00000004 800181c4 [ 184.799786] 5fa0: e6734000 80018001 00000004 00251408 00000001 00251408 00000004 00000000 [ 184.807814] 5fc0: 00000004 00251408 76f02a78 00000004 00000004 00000000 000a6094 00000000 [ 184.815842] 5fe0: 00000000 7ee9a93c 76e7143d 76ea902c 40070010 00000001 00000000 00000000 [ 184.823907] [<8027b2aa>] (gpiod_request+0x2e/0x130) from [<8027be35>] (export_store+0x31/0x94) [ 184.832364] [<8027be35>] (export_store+0x31/0x94) from [<802dc6cf>] (class_attr_store+0x13/0x1c) [ 184.840985] [<802dc6cf>] (class_attr_store+0x13/0x1c) from [<801055f3>] (sysfs_write_file+0xfb/0x130) [ 184.850034] [<801055f3>] (sysfs_write_file+0xfb/0x130) from [<800c09c1>] (vfs_write+0x75/0x114) [ 184.858573] [<800c09c1>] (vfs_write+0x75/0x114) from [<800c0dd3>] (SyS_write+0x2f/0x58) [ 184.866430] [<800c0dd3>] (SyS_write+0x2f/0x58) from [<80018001>] (ret_fast_syscall+0x1/0x46) [ 184.874699] Code: bb10 6825 f46f 7701 (6c6b) f64a [ 184.879373] ---[ end trace 5ed1d539ac53eee0 ]---
However, I cloned linux-linaro-tracking.git (kernel version shows 3.14.0) and there the issue does not occur.
May be some fix went in between kernel 3.10.40 and 3.14.0 where the bug was fixed? Fix is probably not integrated in android kernel (at least in Linaro Android 14.04 which has kernel version 3.9.1).
-- Thanks, -Meraj
On Wed, Jun 25, 2014 at 2:31 PM, Amit Kucheria amit.kucheria@linaro.org wrote:
Mohammad,
Does the problem occur with a mainline kernel?
Regards, Amit
On Wed, Jun 25, 2014 at 1:47 PM, Mohammad Merajul Islam Molla meraj.enigma@gmail.com wrote:
Hello,
On Linaro Android 14.04, with custom compiled kernel (config file attached), I am facing a kernel crash (details log attached). I am running on Samsung Arndale Board with Exynos 5250.
Output from my /sys/kernel/debug/gpio looks as below -
root@arndale:/ # cat /sys/kernel/debug/gpio
GPIOs 0-7, GPA0: gpio-0 (s3c24xx-uart ) in hi gpio-1 (s3c24xx-uart ) in hi gpio-2 (s3c24xx-uart ) in lo gpio-3 (s3c24xx-uart ) in hi gpio-6 (i2c-bus ) in hi gpio-7 (i2c-bus ) in hi
GPIOs 9-14, GPA1: gpio-9 (s3c24xx-uart ) in hi gpio-10 (s3c24xx-uart ) in hi gpio-11 (s3c24xx-uart ) in hi gpio-12 (s3c24xx-uart ) in hi gpio-13 (s3c24xx-uart ) in lo gpio-14 (s3c24xx-uart ) in hi
GPIOs 16-23, GPA2:
GPIOs 25-29, GPB0:
GPIOs 31-35, GPB1:
GPIOs 37-40, GPB2:
GPIOs 42-45, GPB3: gpio-42 (i2c-bus ) in hi gpio-43 (i2c-bus ) in hi
GPIOs 47-53, GPC0: gpio-47 (dw-mci-bus ) in lo gpio-48 (dw-mci-bus ) in hi gpio-50 (dw-mci-bus ) in hi gpio-51 (dw-mci-bus ) in hi gpio-52 (dw-mci-bus ) in hi gpio-53 (dw-mci-bus ) in hi
GPIOs 55-58, GPC1: gpio-55 (dw-mci-bus ) in hi gpio-56 (dw-mci-bus ) in hi gpio-57 (dw-mci-bus ) in hi gpio-58 (dw-mci-bus ) in hi
GPIOs 60-66, GPC2:
GPIOs 68-74, GPC3: gpio-68 (dw-mci-bus ) in lo gpio-69 (dw-mci-bus ) in hi gpio-70 (dw-mci-cd ) in lo gpio-71 (dw-mci-bus ) in lo gpio-72 (dw-mci-bus ) in hi gpio-73 (dw-mci-bus ) in hi gpio-74 (dw-mci-bus ) in hi
GPIOs 76-82, GPC4:
GPIOs 84-87, GPD0: gpio-84 (s3c24xx-uart ) in lo gpio-85 (s3c24xx-uart ) in hi gpio-86 (s3c24xx-uart ) in lo gpio-87 (s3c24xx-uart ) in hi
GPIOs 89-96, GPD1:
GPIOs 98-103, GPY0:
GPIOs 105-108, GPY1:
GPIOs 110-115, GPY2:
GPIOs 117-124, GPY3:
GPIOs 126-133, GPY4:
GPIOs 135-142, GPY5:
GPIOs 144-151, GPY6:
GPIOs 153-160, GPX0:
GPIOs 162-169, GPX1: gpio-163 (VDD_33ON_2.8V ) out hi
GPIOs 171-178, GPX2: gpio-174 (S5M8767 DS2 ) out lo gpio-175 (S5M8767 DS3 ) out lo gpio-176 (S5M8767 DS4 ) out lo
GPIOs 180-187, GPX3: gpio-187 (HPD ) in lo
GPIOs 189-196, GPE0:
GPIOs 198-199, GPE1:
GPIOs 201-204, GPF0:
GPIOs 206-209, GPF1:
GPIOs 211-218, GPG0:
GPIOs 220-227, GPG1:
GPIOs 229-230, GPG2:
GPIOs 232-235, GPH0:
GPIOs 237-244, GPH1:
GPIOs 246-253, GPV0:
GPIOs 255-262, GPV1:
GPIOs 264-271, GPV2:
GPIOs 273-280, GPV3:
GPIOs 282-283, GPV4:
GPIOs 285-291, GPZ:
While trying to export gpio 8, the crash happens -
root@arndale:/ # echo 8 > /sys/class/gpio/export
1Unable to handle kernel NULL pointer dereference at virtual address 00000044
[ 26.700000] Unable to handle kernel NULL pointer dereference at virtual address 00000044 1pgd = e8848000
[ 26.700000] pgd = e8848000 [00000044] *pgd=00000000[ 26.720000] [00000044] *pgd=00000000
Internal error: Oops: 5 [#1] PREEMPT SMP ARM
[ 26.730000] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
From above, I noted that gpio 0 - 7 are associated with GPA0 and gpio 9 - 14 with GPA1. gpio 8 is not existent in /sys/kernel/debug/gpio file.
On the same board, I ran Linaro Saucy server, and there the crash does not happen. /sys/kernel/debug/gpio on saucy server looks as below -
GPIOs 0-7, platform/11400000.pinctrl, gpa0:
GPIOs 8-13, platform/11400000.pinctrl, gpa1:
GPIOs 14-21, platform/11400000.pinctrl, gpa2:
GPIOs 22-26, platform/11400000.pinctrl, gpb0:
GPIOs 27-31, platform/11400000.pinctrl, gpb1:
GPIOs 32-35, platform/11400000.pinctrl, gpb2:
GPIOs 36-39, platform/11400000.pinctrl, gpb3:
GPIOs 40-46, platform/11400000.pinctrl, gpc0:
GPIOs 47-50, platform/11400000.pinctrl, gpc1:
GPIOs 51-57, platform/11400000.pinctrl, gpc2:
GPIOs 58-64, platform/11400000.pinctrl, gpc3:
GPIOs 65-68, platform/11400000.pinctrl, gpd0:
GPIOs 69-76, platform/11400000.pinctrl, gpd1: gpio-76 (usb3503 connect ) out hi
GPIOs 77-83, platform/11400000.pinctrl, gpc4:
GPIOs 84-89, platform/11400000.pinctrl, gpy0:
GPIOs 90-93, platform/11400000.pinctrl, gpy1:
GPIOs 94-99, platform/11400000.pinctrl, gpy2:
GPIOs 100-107, platform/11400000.pinctrl, gpy3:
GPIOs 108-115, platform/11400000.pinctrl, gpy4:
GPIOs 116-123, platform/11400000.pinctrl, gpy5:
GPIOs 124-131, platform/11400000.pinctrl, gpy6:
GPIOs 132-139, platform/11400000.pinctrl, gpx0:
GPIOs 140-147, platform/11400000.pinctrl, gpx1: gpio-141 (VDD_33ON_2.8V ) out hi gpio-144 (SW-TACT2 ) in hi gpio-145 (SW-TACT3 ) in hi gpio-146 (SW-TACT4 ) in hi gpio-147 (SW-TACT5 ) in hi
GPIOs 148-155, platform/11400000.pinctrl, gpx2: gpio-148 (SW-TACT6 ) in hi gpio-149 (SW-TACT7 ) in hi gpio-151 (S5M8767 DS2 ) out lo gpio-152 (S5M8767 DS3 ) out lo gpio-153 (S5M8767 DS4 ) out lo
GPIOs 156-163, platform/11400000.pinctrl, gpx3: gpio-161 (usb3503 reset ) out hi gpio-163 (HPD ) in lo
GPIOs 164-171, platform/13400000.pinctrl, gpe0:
GPIOs 172-173, platform/13400000.pinctrl, gpe1:
GPIOs 174-177, platform/13400000.pinctrl, gpf0:
GPIOs 178-181, platform/13400000.pinctrl, gpf1:
GPIOs 182-189, platform/13400000.pinctrl, gpg0:
GPIOs 190-197, platform/13400000.pinctrl, gpg1:
GPIOs 198-199, platform/13400000.pinctrl, gpg2:
GPIOs 200-203, platform/13400000.pinctrl, gph0:
GPIOs 204-211, platform/13400000.pinctrl, gph1:
GPIOs 212-219, platform/10d10000.pinctrl, gpv0:
GPIOs 220-227, platform/10d10000.pinctrl, gpv1:
GPIOs 228-235, platform/10d10000.pinctrl, gpv2:
GPIOs 236-243, platform/10d10000.pinctrl, gpv3:
GPIOs 244-245, platform/10d10000.pinctrl, gpv4:
GPIOs 246-252, platform/3860000.pinctrl, gpz:
Questions -
- Is it kernel bug?
- Why are some gpios (8, 15, 24, etc) not mapped to any device on android?
-- Thanks,
- Meraj
linaro-kernel mailing list linaro-kernel@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-kernel
On Thu, Jun 26, 2014 at 1:45 PM, Amit Kucheria amit.kucheria@linaro.org wrote:
I'm going to have to refer you to Andrey, Mark and Tushar about LSK and linux-linaro contents. Tushar should know more about Samsung-specific issues.
Hi,
For Arndale board, pin-control was selected over gpiolib starting v3.10. The issue of missing gpio numbers got fixed during that migration.
I don't think '/sys/class/gpio/export' is valid anymore after using pin-control.
Did I answer the queries?
On Thu, Jun 26, 2014 at 11:27 AM, Mohammad Merajul Islam Molla meraj.enigma@gmail.com wrote:
Hello Amit,
I did some further testing.
The issue occurs with Linaro Saucy server with Linaro Stable Kernel 3.10.40.
root@linaro-server: uname -a Linux linaro-server 3.10.40 #1 SMP Thu Jun 26 09:25:03 BDT 2014 armv7l armv7l armv7l GNU/Linux
Output from /sys/kernel/debug/gpio -
root@linaro-server:~# cat /sys/kernel/debug/gpio GPIOs 0-7, platform/11400000.pinctrl, gpa0:
GPIOs 8-13, platform/11400000.pinctrl, gpa1:
GPIOs 14-21, platform/11400000.pinctrl, gpa2:
GPIOs 22-26, platform/11400000.pinctrl, gpb0:
GPIOs 27-31, platform/11400000.pinctrl, gpb1:
GPIOs 32-35, platform/11400000.pinctrl, gpb2:
GPIOs 36-39, platform/11400000.pinctrl, gpb3:
GPIOs 40-46, platform/11400000.pinctrl, gpc0:
GPIOs 47-50, platform/11400000.pinctrl, gpc1:
GPIOs 51-57, platform/11400000.pinctrl, gpc2:
GPIOs 58-64, platform/11400000.pinctrl, gpc3:
GPIOs 65-68, platform/11400000.pinctrl, gpd0:
GPIOs 69-76, platform/11400000.pinctrl, gpd1:
GPIOs 77-83, platform/11400000.pinctrl, gpc4:
GPIOs 84-89, platform/11400000.pinctrl, gpy0:
GPIOs 90-93, platform/11400000.pinctrl, gpy1:
GPIOs 94-99, platform/11400000.pinctrl, gpy2:
GPIOs 100-107, platform/11400000.pinctrl, gpy3:
GPIOs 108-115, platform/11400000.pinctrl, gpy4:
GPIOs 116-123, platform/11400000.pinctrl, gpy5:
GPIOs 124-131, platform/11400000.pinctrl, gpy6:
GPIOs 132-139, platform/11400000.pinctrl, gpx0:
GPIOs 140-147, platform/11400000.pinctrl, gpx1: gpio-141 (VDD_33ON_2.8V ) out hi gpio-144 (SW-TACT2 ) in hi gpio-145 (SW-TACT3 ) in hi gpio-146 (SW-TACT4 ) in hi gpio-147 (SW-TACT5 ) in hi
GPIOs 148-155, platform/11400000.pinctrl, gpx2: gpio-148 (SW-TACT6 ) in hi gpio-149 (SW-TACT7 ) in hi gpio-151 (S5M8767 DS2 ) out lo gpio-152 (S5M8767 DS3 ) out lo gpio-153 (S5M8767 DS4 ) out lo
GPIOs 156-163, platform/11400000.pinctrl, gpx3:
GPIOs 164-171, platform/13400000.pinctrl, gpe0:
GPIOs 172-173, platform/13400000.pinctrl, gpe1:
GPIOs 174-177, platform/13400000.pinctrl, gpf0:
GPIOs 178-181, platform/13400000.pinctrl, gpf1:
GPIOs 182-189, platform/13400000.pinctrl, gpg0:
GPIOs 190-197, platform/13400000.pinctrl, gpg1:
GPIOs 198-199, platform/13400000.pinctrl, gpg2:
GPIOs 200-203, platform/13400000.pinctrl, gph0:
GPIOs 204-211, platform/13400000.pinctrl, gph1:
GPIOs 212-219, platform/10d10000.pinctrl, gpv0:
GPIOs 220-227, platform/10d10000.pinctrl, gpv1:
GPIOs 228-235, platform/10d10000.pinctrl, gpv2:
GPIOs 236-243, platform/10d10000.pinctrl, gpv3:
GPIOs 244-245, platform/10d10000.pinctrl, gpv4:
GPIOs 246-252, platform/3860000.pinctrl, gpz:
While trying to export gpio 253 which does not exist in /sys/kernel/debug/gpio -
root@linaro-server:~# echo 8 > /sys/class/gpio/export root@linaro-server:~# echo 253 > /sys/class/gpio/export [ 184.656031] Unable to handle kernel NULL pointer dereference at virtual address 00000044 [ 184.662600] pgd = e65f4980 [ 184.665222] [00000044] *pgd=a65e2003, *pmd=a664a003, *pte=00000000 [ 184.671291] Internal error: Oops: 207 [#1] SMP THUMB2 [ 184.676242] Modules linked in: [ 184.679239] CPU: 1 PID: 1887 Comm: bash Not tainted 3.10.40 #1 [ 184.684964] task: e6591580 ti: e6734000 task.ti: e6734000 [ 184.690281] PC is at gpiod_request+0x2e/0x130 [ 184.694543] LR is at _raw_spin_lock_irqsave+0x13/0x18 [ 184.699490] pc : [<8027b2aa>] lr : [<8047e8f7>] psr: 600700b3 [ 184.699490] sp : e6735ef8 ip : 802dc6bd fp : 00000000 [ 184.710767] r10: e718f218 r9 : e7193748 r8 : 805ea048 [ 184.715878] r7 : fffffdfb r6 : a0070013 r5 : 00000000 r4 : 807edc7c [ 184.722286] r3 : e6591580 r2 : 00000001 r1 : 007a0079 r0 : a0070013 [ 184.728698] Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA Thumb Segment user [ 184.735958] Control: 70c5387d Table: a65f4980 DAC: 55555555 [ 184.741588] Process bash (pid: 1887, stack limit = 0xe6734238) [ 184.747311] Stack: (0xe6735ef8 to 0xe6736000) [ 184.751585] 5ee0: 00000000 00000004 [ 184.759630] 5f00: 807edc7c e6735f80 804d8900 e7193748 e718f218 8027be35 e6bab8d8 000000fd [ 184.767677] 5f20: 8027be05 e6bab8c0 e6bab8d8 802dc6cf 00000004 801055f3 e72ca200 00251408 [ 184.775703] 5f40: e6735f80 801054f9 00000004 00000004 00000000 800c09c1 e65decc0 800bf57b [ 184.783730] 5f60: 00060000 00000000 00000000 e72ca200 00000000 00251408 00000004 800c0dd3 [ 184.791757] 5f80: 00000000 00000000 800181c4 00000004 00251408 76f02a78 00000004 800181c4 [ 184.799786] 5fa0: e6734000 80018001 00000004 00251408 00000001 00251408 00000004 00000000 [ 184.807814] 5fc0: 00000004 00251408 76f02a78 00000004 00000004 00000000 000a6094 00000000 [ 184.815842] 5fe0: 00000000 7ee9a93c 76e7143d 76ea902c 40070010 00000001 00000000 00000000 [ 184.823907] [<8027b2aa>] (gpiod_request+0x2e/0x130) from [<8027be35>] (export_store+0x31/0x94) [ 184.832364] [<8027be35>] (export_store+0x31/0x94) from [<802dc6cf>] (class_attr_store+0x13/0x1c) [ 184.840985] [<802dc6cf>] (class_attr_store+0x13/0x1c) from [<801055f3>] (sysfs_write_file+0xfb/0x130) [ 184.850034] [<801055f3>] (sysfs_write_file+0xfb/0x130) from [<800c09c1>] (vfs_write+0x75/0x114) [ 184.858573] [<800c09c1>] (vfs_write+0x75/0x114) from [<800c0dd3>] (SyS_write+0x2f/0x58) [ 184.866430] [<800c0dd3>] (SyS_write+0x2f/0x58) from [<80018001>] (ret_fast_syscall+0x1/0x46) [ 184.874699] Code: bb10 6825 f46f 7701 (6c6b) f64a [ 184.879373] ---[ end trace 5ed1d539ac53eee0 ]---
However, I cloned linux-linaro-tracking.git (kernel version shows 3.14.0) and there the issue does not occur.
May be some fix went in between kernel 3.10.40 and 3.14.0 where the bug was fixed? Fix is probably not integrated in android kernel (at least in Linaro Android 14.04 which has kernel version 3.9.1).
-- Thanks, -Meraj
On Wed, Jun 25, 2014 at 2:31 PM, Amit Kucheria amit.kucheria@linaro.org wrote:
Mohammad,
Does the problem occur with a mainline kernel?
Regards, Amit
On Wed, Jun 25, 2014 at 1:47 PM, Mohammad Merajul Islam Molla meraj.enigma@gmail.com wrote:
Hello,
On Linaro Android 14.04, with custom compiled kernel (config file attached), I am facing a kernel crash (details log attached). I am running on Samsung Arndale Board with Exynos 5250.
Output from my /sys/kernel/debug/gpio looks as below -
root@arndale:/ # cat /sys/kernel/debug/gpio
GPIOs 0-7, GPA0: gpio-0 (s3c24xx-uart ) in hi gpio-1 (s3c24xx-uart ) in hi gpio-2 (s3c24xx-uart ) in lo gpio-3 (s3c24xx-uart ) in hi gpio-6 (i2c-bus ) in hi gpio-7 (i2c-bus ) in hi
GPIOs 9-14, GPA1: gpio-9 (s3c24xx-uart ) in hi gpio-10 (s3c24xx-uart ) in hi gpio-11 (s3c24xx-uart ) in hi gpio-12 (s3c24xx-uart ) in hi gpio-13 (s3c24xx-uart ) in lo gpio-14 (s3c24xx-uart ) in hi
GPIOs 16-23, GPA2:
GPIOs 25-29, GPB0:
GPIOs 31-35, GPB1:
GPIOs 37-40, GPB2:
GPIOs 42-45, GPB3: gpio-42 (i2c-bus ) in hi gpio-43 (i2c-bus ) in hi
GPIOs 47-53, GPC0: gpio-47 (dw-mci-bus ) in lo gpio-48 (dw-mci-bus ) in hi gpio-50 (dw-mci-bus ) in hi gpio-51 (dw-mci-bus ) in hi gpio-52 (dw-mci-bus ) in hi gpio-53 (dw-mci-bus ) in hi
GPIOs 55-58, GPC1: gpio-55 (dw-mci-bus ) in hi gpio-56 (dw-mci-bus ) in hi gpio-57 (dw-mci-bus ) in hi gpio-58 (dw-mci-bus ) in hi
GPIOs 60-66, GPC2:
GPIOs 68-74, GPC3: gpio-68 (dw-mci-bus ) in lo gpio-69 (dw-mci-bus ) in hi gpio-70 (dw-mci-cd ) in lo gpio-71 (dw-mci-bus ) in lo gpio-72 (dw-mci-bus ) in hi gpio-73 (dw-mci-bus ) in hi gpio-74 (dw-mci-bus ) in hi
GPIOs 76-82, GPC4:
GPIOs 84-87, GPD0: gpio-84 (s3c24xx-uart ) in lo gpio-85 (s3c24xx-uart ) in hi gpio-86 (s3c24xx-uart ) in lo gpio-87 (s3c24xx-uart ) in hi
GPIOs 89-96, GPD1:
GPIOs 98-103, GPY0:
GPIOs 105-108, GPY1:
GPIOs 110-115, GPY2:
GPIOs 117-124, GPY3:
GPIOs 126-133, GPY4:
GPIOs 135-142, GPY5:
GPIOs 144-151, GPY6:
GPIOs 153-160, GPX0:
GPIOs 162-169, GPX1: gpio-163 (VDD_33ON_2.8V ) out hi
GPIOs 171-178, GPX2: gpio-174 (S5M8767 DS2 ) out lo gpio-175 (S5M8767 DS3 ) out lo gpio-176 (S5M8767 DS4 ) out lo
GPIOs 180-187, GPX3: gpio-187 (HPD ) in lo
GPIOs 189-196, GPE0:
GPIOs 198-199, GPE1:
GPIOs 201-204, GPF0:
GPIOs 206-209, GPF1:
GPIOs 211-218, GPG0:
GPIOs 220-227, GPG1:
GPIOs 229-230, GPG2:
GPIOs 232-235, GPH0:
GPIOs 237-244, GPH1:
GPIOs 246-253, GPV0:
GPIOs 255-262, GPV1:
GPIOs 264-271, GPV2:
GPIOs 273-280, GPV3:
GPIOs 282-283, GPV4:
GPIOs 285-291, GPZ:
While trying to export gpio 8, the crash happens -
root@arndale:/ # echo 8 > /sys/class/gpio/export
1Unable to handle kernel NULL pointer dereference at virtual address 00000044
[ 26.700000] Unable to handle kernel NULL pointer dereference at virtual address 00000044 1pgd = e8848000
[ 26.700000] pgd = e8848000 [00000044] *pgd=00000000[ 26.720000] [00000044] *pgd=00000000
Internal error: Oops: 5 [#1] PREEMPT SMP ARM
[ 26.730000] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
From above, I noted that gpio 0 - 7 are associated with GPA0 and gpio 9 - 14 with GPA1. gpio 8 is not existent in /sys/kernel/debug/gpio file.
On the same board, I ran Linaro Saucy server, and there the crash does not happen. /sys/kernel/debug/gpio on saucy server looks as below -
GPIOs 0-7, platform/11400000.pinctrl, gpa0:
GPIOs 8-13, platform/11400000.pinctrl, gpa1:
GPIOs 14-21, platform/11400000.pinctrl, gpa2:
GPIOs 22-26, platform/11400000.pinctrl, gpb0:
GPIOs 27-31, platform/11400000.pinctrl, gpb1:
GPIOs 32-35, platform/11400000.pinctrl, gpb2:
GPIOs 36-39, platform/11400000.pinctrl, gpb3:
GPIOs 40-46, platform/11400000.pinctrl, gpc0:
GPIOs 47-50, platform/11400000.pinctrl, gpc1:
GPIOs 51-57, platform/11400000.pinctrl, gpc2:
GPIOs 58-64, platform/11400000.pinctrl, gpc3:
GPIOs 65-68, platform/11400000.pinctrl, gpd0:
GPIOs 69-76, platform/11400000.pinctrl, gpd1: gpio-76 (usb3503 connect ) out hi
GPIOs 77-83, platform/11400000.pinctrl, gpc4:
GPIOs 84-89, platform/11400000.pinctrl, gpy0:
GPIOs 90-93, platform/11400000.pinctrl, gpy1:
GPIOs 94-99, platform/11400000.pinctrl, gpy2:
GPIOs 100-107, platform/11400000.pinctrl, gpy3:
GPIOs 108-115, platform/11400000.pinctrl, gpy4:
GPIOs 116-123, platform/11400000.pinctrl, gpy5:
GPIOs 124-131, platform/11400000.pinctrl, gpy6:
GPIOs 132-139, platform/11400000.pinctrl, gpx0:
GPIOs 140-147, platform/11400000.pinctrl, gpx1: gpio-141 (VDD_33ON_2.8V ) out hi gpio-144 (SW-TACT2 ) in hi gpio-145 (SW-TACT3 ) in hi gpio-146 (SW-TACT4 ) in hi gpio-147 (SW-TACT5 ) in hi
GPIOs 148-155, platform/11400000.pinctrl, gpx2: gpio-148 (SW-TACT6 ) in hi gpio-149 (SW-TACT7 ) in hi gpio-151 (S5M8767 DS2 ) out lo gpio-152 (S5M8767 DS3 ) out lo gpio-153 (S5M8767 DS4 ) out lo
GPIOs 156-163, platform/11400000.pinctrl, gpx3: gpio-161 (usb3503 reset ) out hi gpio-163 (HPD ) in lo
GPIOs 164-171, platform/13400000.pinctrl, gpe0:
GPIOs 172-173, platform/13400000.pinctrl, gpe1:
GPIOs 174-177, platform/13400000.pinctrl, gpf0:
GPIOs 178-181, platform/13400000.pinctrl, gpf1:
GPIOs 182-189, platform/13400000.pinctrl, gpg0:
GPIOs 190-197, platform/13400000.pinctrl, gpg1:
GPIOs 198-199, platform/13400000.pinctrl, gpg2:
GPIOs 200-203, platform/13400000.pinctrl, gph0:
GPIOs 204-211, platform/13400000.pinctrl, gph1:
GPIOs 212-219, platform/10d10000.pinctrl, gpv0:
GPIOs 220-227, platform/10d10000.pinctrl, gpv1:
GPIOs 228-235, platform/10d10000.pinctrl, gpv2:
GPIOs 236-243, platform/10d10000.pinctrl, gpv3:
GPIOs 244-245, platform/10d10000.pinctrl, gpv4:
GPIOs 246-252, platform/3860000.pinctrl, gpz:
Questions -
- Is it kernel bug?
- Why are some gpios (8, 15, 24, etc) not mapped to any device on android?
-- Thanks,
- Meraj
linaro-kernel mailing list linaro-kernel@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-kernel
Hello,
Just a few more things -
1. Does it require any kernel config option to enable pin-control? 2. As I mentioned earlier, with Linaro Saucy Server and linxu-linaro-tracking kernel 3.14.0, the issue does not occur. However, /sys/class/gpio/export is still there and its possible to export free gpios via this interface. So, if its not valid anymore, why is it still there on Arndale Board?
@Amit: Powerdebug depends on existence of /sys/class/gpio/export file to display free gpios. If its not going to be valid anymore on Arndale board, how should powerdebug behave on this board?
-- Thanks, -Meraj
On Thu, Jun 26, 2014 at 3:19 PM, Tushar Behera trblinux@gmail.com wrote:
On Thu, Jun 26, 2014 at 1:45 PM, Amit Kucheria amit.kucheria@linaro.org wrote:
I'm going to have to refer you to Andrey, Mark and Tushar about LSK and linux-linaro contents. Tushar should know more about Samsung-specific issues.
Hi,
For Arndale board, pin-control was selected over gpiolib starting v3.10. The issue of missing gpio numbers got fixed during that migration.
I don't think '/sys/class/gpio/export' is valid anymore after using pin-control.
Did I answer the queries?
On Thu, Jun 26, 2014 at 11:27 AM, Mohammad Merajul Islam Molla meraj.enigma@gmail.com wrote:
Hello Amit,
I did some further testing.
The issue occurs with Linaro Saucy server with Linaro Stable Kernel 3.10.40.
root@linaro-server: uname -a Linux linaro-server 3.10.40 #1 SMP Thu Jun 26 09:25:03 BDT 2014 armv7l armv7l armv7l GNU/Linux
Output from /sys/kernel/debug/gpio -
root@linaro-server:~# cat /sys/kernel/debug/gpio GPIOs 0-7, platform/11400000.pinctrl, gpa0:
GPIOs 8-13, platform/11400000.pinctrl, gpa1:
GPIOs 14-21, platform/11400000.pinctrl, gpa2:
GPIOs 22-26, platform/11400000.pinctrl, gpb0:
GPIOs 27-31, platform/11400000.pinctrl, gpb1:
GPIOs 32-35, platform/11400000.pinctrl, gpb2:
GPIOs 36-39, platform/11400000.pinctrl, gpb3:
GPIOs 40-46, platform/11400000.pinctrl, gpc0:
GPIOs 47-50, platform/11400000.pinctrl, gpc1:
GPIOs 51-57, platform/11400000.pinctrl, gpc2:
GPIOs 58-64, platform/11400000.pinctrl, gpc3:
GPIOs 65-68, platform/11400000.pinctrl, gpd0:
GPIOs 69-76, platform/11400000.pinctrl, gpd1:
GPIOs 77-83, platform/11400000.pinctrl, gpc4:
GPIOs 84-89, platform/11400000.pinctrl, gpy0:
GPIOs 90-93, platform/11400000.pinctrl, gpy1:
GPIOs 94-99, platform/11400000.pinctrl, gpy2:
GPIOs 100-107, platform/11400000.pinctrl, gpy3:
GPIOs 108-115, platform/11400000.pinctrl, gpy4:
GPIOs 116-123, platform/11400000.pinctrl, gpy5:
GPIOs 124-131, platform/11400000.pinctrl, gpy6:
GPIOs 132-139, platform/11400000.pinctrl, gpx0:
GPIOs 140-147, platform/11400000.pinctrl, gpx1: gpio-141 (VDD_33ON_2.8V ) out hi gpio-144 (SW-TACT2 ) in hi gpio-145 (SW-TACT3 ) in hi gpio-146 (SW-TACT4 ) in hi gpio-147 (SW-TACT5 ) in hi
GPIOs 148-155, platform/11400000.pinctrl, gpx2: gpio-148 (SW-TACT6 ) in hi gpio-149 (SW-TACT7 ) in hi gpio-151 (S5M8767 DS2 ) out lo gpio-152 (S5M8767 DS3 ) out lo gpio-153 (S5M8767 DS4 ) out lo
GPIOs 156-163, platform/11400000.pinctrl, gpx3:
GPIOs 164-171, platform/13400000.pinctrl, gpe0:
GPIOs 172-173, platform/13400000.pinctrl, gpe1:
GPIOs 174-177, platform/13400000.pinctrl, gpf0:
GPIOs 178-181, platform/13400000.pinctrl, gpf1:
GPIOs 182-189, platform/13400000.pinctrl, gpg0:
GPIOs 190-197, platform/13400000.pinctrl, gpg1:
GPIOs 198-199, platform/13400000.pinctrl, gpg2:
GPIOs 200-203, platform/13400000.pinctrl, gph0:
GPIOs 204-211, platform/13400000.pinctrl, gph1:
GPIOs 212-219, platform/10d10000.pinctrl, gpv0:
GPIOs 220-227, platform/10d10000.pinctrl, gpv1:
GPIOs 228-235, platform/10d10000.pinctrl, gpv2:
GPIOs 236-243, platform/10d10000.pinctrl, gpv3:
GPIOs 244-245, platform/10d10000.pinctrl, gpv4:
GPIOs 246-252, platform/3860000.pinctrl, gpz:
While trying to export gpio 253 which does not exist in /sys/kernel/debug/gpio -
root@linaro-server:~# echo 8 > /sys/class/gpio/export root@linaro-server:~# echo 253 > /sys/class/gpio/export [ 184.656031] Unable to handle kernel NULL pointer dereference at virtual address 00000044 [ 184.662600] pgd = e65f4980 [ 184.665222] [00000044] *pgd=a65e2003, *pmd=a664a003, *pte=00000000 [ 184.671291] Internal error: Oops: 207 [#1] SMP THUMB2 [ 184.676242] Modules linked in: [ 184.679239] CPU: 1 PID: 1887 Comm: bash Not tainted 3.10.40 #1 [ 184.684964] task: e6591580 ti: e6734000 task.ti: e6734000 [ 184.690281] PC is at gpiod_request+0x2e/0x130 [ 184.694543] LR is at _raw_spin_lock_irqsave+0x13/0x18 [ 184.699490] pc : [<8027b2aa>] lr : [<8047e8f7>] psr: 600700b3 [ 184.699490] sp : e6735ef8 ip : 802dc6bd fp : 00000000 [ 184.710767] r10: e718f218 r9 : e7193748 r8 : 805ea048 [ 184.715878] r7 : fffffdfb r6 : a0070013 r5 : 00000000 r4 : 807edc7c [ 184.722286] r3 : e6591580 r2 : 00000001 r1 : 007a0079 r0 : a0070013 [ 184.728698] Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA Thumb Segment user [ 184.735958] Control: 70c5387d Table: a65f4980 DAC: 55555555 [ 184.741588] Process bash (pid: 1887, stack limit = 0xe6734238) [ 184.747311] Stack: (0xe6735ef8 to 0xe6736000) [ 184.751585] 5ee0: 00000000 00000004 [ 184.759630] 5f00: 807edc7c e6735f80 804d8900 e7193748 e718f218 8027be35 e6bab8d8 000000fd [ 184.767677] 5f20: 8027be05 e6bab8c0 e6bab8d8 802dc6cf 00000004 801055f3 e72ca200 00251408 [ 184.775703] 5f40: e6735f80 801054f9 00000004 00000004 00000000 800c09c1 e65decc0 800bf57b [ 184.783730] 5f60: 00060000 00000000 00000000 e72ca200 00000000 00251408 00000004 800c0dd3 [ 184.791757] 5f80: 00000000 00000000 800181c4 00000004 00251408 76f02a78 00000004 800181c4 [ 184.799786] 5fa0: e6734000 80018001 00000004 00251408 00000001 00251408 00000004 00000000 [ 184.807814] 5fc0: 00000004 00251408 76f02a78 00000004 00000004 00000000 000a6094 00000000 [ 184.815842] 5fe0: 00000000 7ee9a93c 76e7143d 76ea902c 40070010 00000001 00000000 00000000 [ 184.823907] [<8027b2aa>] (gpiod_request+0x2e/0x130) from [<8027be35>] (export_store+0x31/0x94) [ 184.832364] [<8027be35>] (export_store+0x31/0x94) from [<802dc6cf>] (class_attr_store+0x13/0x1c) [ 184.840985] [<802dc6cf>] (class_attr_store+0x13/0x1c) from [<801055f3>] (sysfs_write_file+0xfb/0x130) [ 184.850034] [<801055f3>] (sysfs_write_file+0xfb/0x130) from [<800c09c1>] (vfs_write+0x75/0x114) [ 184.858573] [<800c09c1>] (vfs_write+0x75/0x114) from [<800c0dd3>] (SyS_write+0x2f/0x58) [ 184.866430] [<800c0dd3>] (SyS_write+0x2f/0x58) from [<80018001>] (ret_fast_syscall+0x1/0x46) [ 184.874699] Code: bb10 6825 f46f 7701 (6c6b) f64a [ 184.879373] ---[ end trace 5ed1d539ac53eee0 ]---
However, I cloned linux-linaro-tracking.git (kernel version shows 3.14.0) and there the issue does not occur.
May be some fix went in between kernel 3.10.40 and 3.14.0 where the bug was fixed? Fix is probably not integrated in android kernel (at least in Linaro Android 14.04 which has kernel version 3.9.1).
-- Thanks, -Meraj
On Wed, Jun 25, 2014 at 2:31 PM, Amit Kucheria amit.kucheria@linaro.org wrote:
Mohammad,
Does the problem occur with a mainline kernel?
Regards, Amit
On Wed, Jun 25, 2014 at 1:47 PM, Mohammad Merajul Islam Molla meraj.enigma@gmail.com wrote:
Hello,
On Linaro Android 14.04, with custom compiled kernel (config file attached), I am facing a kernel crash (details log attached). I am running on Samsung Arndale Board with Exynos 5250.
Output from my /sys/kernel/debug/gpio looks as below -
root@arndale:/ # cat /sys/kernel/debug/gpio
GPIOs 0-7, GPA0: gpio-0 (s3c24xx-uart ) in hi gpio-1 (s3c24xx-uart ) in hi gpio-2 (s3c24xx-uart ) in lo gpio-3 (s3c24xx-uart ) in hi gpio-6 (i2c-bus ) in hi gpio-7 (i2c-bus ) in hi
GPIOs 9-14, GPA1: gpio-9 (s3c24xx-uart ) in hi gpio-10 (s3c24xx-uart ) in hi gpio-11 (s3c24xx-uart ) in hi gpio-12 (s3c24xx-uart ) in hi gpio-13 (s3c24xx-uart ) in lo gpio-14 (s3c24xx-uart ) in hi
GPIOs 16-23, GPA2:
GPIOs 25-29, GPB0:
GPIOs 31-35, GPB1:
GPIOs 37-40, GPB2:
GPIOs 42-45, GPB3: gpio-42 (i2c-bus ) in hi gpio-43 (i2c-bus ) in hi
GPIOs 47-53, GPC0: gpio-47 (dw-mci-bus ) in lo gpio-48 (dw-mci-bus ) in hi gpio-50 (dw-mci-bus ) in hi gpio-51 (dw-mci-bus ) in hi gpio-52 (dw-mci-bus ) in hi gpio-53 (dw-mci-bus ) in hi
GPIOs 55-58, GPC1: gpio-55 (dw-mci-bus ) in hi gpio-56 (dw-mci-bus ) in hi gpio-57 (dw-mci-bus ) in hi gpio-58 (dw-mci-bus ) in hi
GPIOs 60-66, GPC2:
GPIOs 68-74, GPC3: gpio-68 (dw-mci-bus ) in lo gpio-69 (dw-mci-bus ) in hi gpio-70 (dw-mci-cd ) in lo gpio-71 (dw-mci-bus ) in lo gpio-72 (dw-mci-bus ) in hi gpio-73 (dw-mci-bus ) in hi gpio-74 (dw-mci-bus ) in hi
GPIOs 76-82, GPC4:
GPIOs 84-87, GPD0: gpio-84 (s3c24xx-uart ) in lo gpio-85 (s3c24xx-uart ) in hi gpio-86 (s3c24xx-uart ) in lo gpio-87 (s3c24xx-uart ) in hi
GPIOs 89-96, GPD1:
GPIOs 98-103, GPY0:
GPIOs 105-108, GPY1:
GPIOs 110-115, GPY2:
GPIOs 117-124, GPY3:
GPIOs 126-133, GPY4:
GPIOs 135-142, GPY5:
GPIOs 144-151, GPY6:
GPIOs 153-160, GPX0:
GPIOs 162-169, GPX1: gpio-163 (VDD_33ON_2.8V ) out hi
GPIOs 171-178, GPX2: gpio-174 (S5M8767 DS2 ) out lo gpio-175 (S5M8767 DS3 ) out lo gpio-176 (S5M8767 DS4 ) out lo
GPIOs 180-187, GPX3: gpio-187 (HPD ) in lo
GPIOs 189-196, GPE0:
GPIOs 198-199, GPE1:
GPIOs 201-204, GPF0:
GPIOs 206-209, GPF1:
GPIOs 211-218, GPG0:
GPIOs 220-227, GPG1:
GPIOs 229-230, GPG2:
GPIOs 232-235, GPH0:
GPIOs 237-244, GPH1:
GPIOs 246-253, GPV0:
GPIOs 255-262, GPV1:
GPIOs 264-271, GPV2:
GPIOs 273-280, GPV3:
GPIOs 282-283, GPV4:
GPIOs 285-291, GPZ:
While trying to export gpio 8, the crash happens -
root@arndale:/ # echo 8 > /sys/class/gpio/export
1Unable to handle kernel NULL pointer dereference at virtual address 00000044
[ 26.700000] Unable to handle kernel NULL pointer dereference at virtual address 00000044 1pgd = e8848000
[ 26.700000] pgd = e8848000 [00000044] *pgd=00000000[ 26.720000] [00000044] *pgd=00000000
Internal error: Oops: 5 [#1] PREEMPT SMP ARM
[ 26.730000] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
From above, I noted that gpio 0 - 7 are associated with GPA0 and gpio 9 - 14 with GPA1. gpio 8 is not existent in /sys/kernel/debug/gpio file.
On the same board, I ran Linaro Saucy server, and there the crash does not happen. /sys/kernel/debug/gpio on saucy server looks as below -
GPIOs 0-7, platform/11400000.pinctrl, gpa0:
GPIOs 8-13, platform/11400000.pinctrl, gpa1:
GPIOs 14-21, platform/11400000.pinctrl, gpa2:
GPIOs 22-26, platform/11400000.pinctrl, gpb0:
GPIOs 27-31, platform/11400000.pinctrl, gpb1:
GPIOs 32-35, platform/11400000.pinctrl, gpb2:
GPIOs 36-39, platform/11400000.pinctrl, gpb3:
GPIOs 40-46, platform/11400000.pinctrl, gpc0:
GPIOs 47-50, platform/11400000.pinctrl, gpc1:
GPIOs 51-57, platform/11400000.pinctrl, gpc2:
GPIOs 58-64, platform/11400000.pinctrl, gpc3:
GPIOs 65-68, platform/11400000.pinctrl, gpd0:
GPIOs 69-76, platform/11400000.pinctrl, gpd1: gpio-76 (usb3503 connect ) out hi
GPIOs 77-83, platform/11400000.pinctrl, gpc4:
GPIOs 84-89, platform/11400000.pinctrl, gpy0:
GPIOs 90-93, platform/11400000.pinctrl, gpy1:
GPIOs 94-99, platform/11400000.pinctrl, gpy2:
GPIOs 100-107, platform/11400000.pinctrl, gpy3:
GPIOs 108-115, platform/11400000.pinctrl, gpy4:
GPIOs 116-123, platform/11400000.pinctrl, gpy5:
GPIOs 124-131, platform/11400000.pinctrl, gpy6:
GPIOs 132-139, platform/11400000.pinctrl, gpx0:
GPIOs 140-147, platform/11400000.pinctrl, gpx1: gpio-141 (VDD_33ON_2.8V ) out hi gpio-144 (SW-TACT2 ) in hi gpio-145 (SW-TACT3 ) in hi gpio-146 (SW-TACT4 ) in hi gpio-147 (SW-TACT5 ) in hi
GPIOs 148-155, platform/11400000.pinctrl, gpx2: gpio-148 (SW-TACT6 ) in hi gpio-149 (SW-TACT7 ) in hi gpio-151 (S5M8767 DS2 ) out lo gpio-152 (S5M8767 DS3 ) out lo gpio-153 (S5M8767 DS4 ) out lo
GPIOs 156-163, platform/11400000.pinctrl, gpx3: gpio-161 (usb3503 reset ) out hi gpio-163 (HPD ) in lo
GPIOs 164-171, platform/13400000.pinctrl, gpe0:
GPIOs 172-173, platform/13400000.pinctrl, gpe1:
GPIOs 174-177, platform/13400000.pinctrl, gpf0:
GPIOs 178-181, platform/13400000.pinctrl, gpf1:
GPIOs 182-189, platform/13400000.pinctrl, gpg0:
GPIOs 190-197, platform/13400000.pinctrl, gpg1:
GPIOs 198-199, platform/13400000.pinctrl, gpg2:
GPIOs 200-203, platform/13400000.pinctrl, gph0:
GPIOs 204-211, platform/13400000.pinctrl, gph1:
GPIOs 212-219, platform/10d10000.pinctrl, gpv0:
GPIOs 220-227, platform/10d10000.pinctrl, gpv1:
GPIOs 228-235, platform/10d10000.pinctrl, gpv2:
GPIOs 236-243, platform/10d10000.pinctrl, gpv3:
GPIOs 244-245, platform/10d10000.pinctrl, gpv4:
GPIOs 246-252, platform/3860000.pinctrl, gpz:
Questions -
- Is it kernel bug?
- Why are some gpios (8, 15, 24, etc) not mapped to any device on android?
-- Thanks,
- Meraj
linaro-kernel mailing list linaro-kernel@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-kernel
-- Tushar Behera
On Thu, Jun 26, 2014 at 3:22 PM, Mohammad Merajul Islam Molla meraj.enigma@gmail.com wrote:
Hello,
Just a few more things -
- Does it require any kernel config option to enable pin-control?
- As I mentioned earlier, with Linaro Saucy Server and
linxu-linaro-tracking kernel 3.14.0, the issue does not occur. However, /sys/class/gpio/export is still there and its possible to export free gpios via this interface. So, if its not valid anymore, why is it still there on Arndale Board?
@Amit: Powerdebug depends on existence of /sys/class/gpio/export file to display free gpios. If its not going to be valid anymore on Arndale board, how should powerdebug behave on this board?
We should add pinctrl support to powerdebug. Do you want to try and add this feature?
Regards, Amit
Hello Amit,
Yes, I would like to give it a try. Would someone from Linaro collaborate on this? Since need to make decision regarding the requirements (what information we want to display, etc).
-- Thanks, -Meraj
On Thu, Jun 26, 2014 at 3:54 PM, Amit Kucheria amit.kucheria@linaro.org wrote:
On Thu, Jun 26, 2014 at 3:22 PM, Mohammad Merajul Islam Molla meraj.enigma@gmail.com wrote:
Hello,
Just a few more things -
- Does it require any kernel config option to enable pin-control?
- As I mentioned earlier, with Linaro Saucy Server and
linxu-linaro-tracking kernel 3.14.0, the issue does not occur. However, /sys/class/gpio/export is still there and its possible to export free gpios via this interface. So, if its not valid anymore, why is it still there on Arndale Board?
@Amit: Powerdebug depends on existence of /sys/class/gpio/export file to display free gpios. If its not going to be valid anymore on Arndale board, how should powerdebug behave on this board?
We should add pinctrl support to powerdebug. Do you want to try and add this feature?
Regards, Amit
Linus is the pinctrl maintainer.
Linus, we'd like to show the state of the various pins in powerdebug. Would it be useful for developers? Can you guide Mohammad?
On Fri, Jun 27, 2014 at 1:32 PM, Mohammad Merajul Islam Molla meraj.enigma@gmail.com wrote:
Hello Amit,
Yes, I would like to give it a try. Would someone from Linaro collaborate on this? Since need to make decision regarding the requirements (what information we want to display, etc).
-- Thanks, -Meraj
On Thu, Jun 26, 2014 at 3:54 PM, Amit Kucheria amit.kucheria@linaro.org wrote:
On Thu, Jun 26, 2014 at 3:22 PM, Mohammad Merajul Islam Molla meraj.enigma@gmail.com wrote:
Hello,
Just a few more things -
- Does it require any kernel config option to enable pin-control?
- As I mentioned earlier, with Linaro Saucy Server and
linxu-linaro-tracking kernel 3.14.0, the issue does not occur. However, /sys/class/gpio/export is still there and its possible to export free gpios via this interface. So, if its not valid anymore, why is it still there on Arndale Board?
@Amit: Powerdebug depends on existence of /sys/class/gpio/export file to display free gpios. If its not going to be valid anymore on Arndale board, how should powerdebug behave on this board?
We should add pinctrl support to powerdebug. Do you want to try and add this feature?
Regards, Amit
On Thu, Jun 26, 2014 at 3:22 PM, Mohammad Merajul Islam Molla meraj.enigma@gmail.com wrote:
Hello,
Just a few more things -
- Does it require any kernel config option to enable pin-control?
Pin-control is enabled by default now.
- As I mentioned earlier, with Linaro Saucy Server and
linxu-linaro-tracking kernel 3.14.0, the issue does not occur.
I tested on v3.14 kernel, ARCH_NR_GPIOS turns out to be 1024. So exporting a bigger gpio number might not result in kernel panic. The case might be different in v3.10, which results in the kernel crash while exporting gpio 253.
However, /sys/class/gpio/export is still there and its possible to export free gpios via this interface. So, if its not valid anymore, why is it still there on Arndale Board?
/sys/class/gpio/export is there if generic gpiolib support and gpio sysfs support is enabled. I am not sure if it is still valid to 'export' the gpios defined via pin-control. Adding Linus Walleij to clarify on this.
Linus,
Is it still okay to export GPIOs via /sys/class/gpio/export for Exynos case where we are using pin-control to configure the GPIO pins?
@Amit: Powerdebug depends on existence of /sys/class/gpio/export file to display free gpios. If its not going to be valid anymore on Arndale board, how should powerdebug behave on this board?
-- Thanks, -Meraj
On Thu, Jun 26, 2014 at 3:19 PM, Tushar Behera trblinux@gmail.com wrote:
On Thu, Jun 26, 2014 at 1:45 PM, Amit Kucheria amit.kucheria@linaro.org wrote:
I'm going to have to refer you to Andrey, Mark and Tushar about LSK and linux-linaro contents. Tushar should know more about Samsung-specific issues.
Hi,
For Arndale board, pin-control was selected over gpiolib starting v3.10. The issue of missing gpio numbers got fixed during that migration.
I don't think '/sys/class/gpio/export' is valid anymore after using pin-control.
Did I answer the queries?
On Thu, Jun 26, 2014 at 11:27 AM, Mohammad Merajul Islam Molla meraj.enigma@gmail.com wrote:
Hello Amit,
I did some further testing.
The issue occurs with Linaro Saucy server with Linaro Stable Kernel 3.10.40.
root@linaro-server: uname -a Linux linaro-server 3.10.40 #1 SMP Thu Jun 26 09:25:03 BDT 2014 armv7l armv7l armv7l GNU/Linux
Output from /sys/kernel/debug/gpio -
root@linaro-server:~# cat /sys/kernel/debug/gpio GPIOs 0-7, platform/11400000.pinctrl, gpa0:
GPIOs 8-13, platform/11400000.pinctrl, gpa1:
GPIOs 14-21, platform/11400000.pinctrl, gpa2:
GPIOs 22-26, platform/11400000.pinctrl, gpb0:
GPIOs 27-31, platform/11400000.pinctrl, gpb1:
GPIOs 32-35, platform/11400000.pinctrl, gpb2:
GPIOs 36-39, platform/11400000.pinctrl, gpb3:
GPIOs 40-46, platform/11400000.pinctrl, gpc0:
GPIOs 47-50, platform/11400000.pinctrl, gpc1:
GPIOs 51-57, platform/11400000.pinctrl, gpc2:
GPIOs 58-64, platform/11400000.pinctrl, gpc3:
GPIOs 65-68, platform/11400000.pinctrl, gpd0:
GPIOs 69-76, platform/11400000.pinctrl, gpd1:
GPIOs 77-83, platform/11400000.pinctrl, gpc4:
GPIOs 84-89, platform/11400000.pinctrl, gpy0:
GPIOs 90-93, platform/11400000.pinctrl, gpy1:
GPIOs 94-99, platform/11400000.pinctrl, gpy2:
GPIOs 100-107, platform/11400000.pinctrl, gpy3:
GPIOs 108-115, platform/11400000.pinctrl, gpy4:
GPIOs 116-123, platform/11400000.pinctrl, gpy5:
GPIOs 124-131, platform/11400000.pinctrl, gpy6:
GPIOs 132-139, platform/11400000.pinctrl, gpx0:
GPIOs 140-147, platform/11400000.pinctrl, gpx1: gpio-141 (VDD_33ON_2.8V ) out hi gpio-144 (SW-TACT2 ) in hi gpio-145 (SW-TACT3 ) in hi gpio-146 (SW-TACT4 ) in hi gpio-147 (SW-TACT5 ) in hi
GPIOs 148-155, platform/11400000.pinctrl, gpx2: gpio-148 (SW-TACT6 ) in hi gpio-149 (SW-TACT7 ) in hi gpio-151 (S5M8767 DS2 ) out lo gpio-152 (S5M8767 DS3 ) out lo gpio-153 (S5M8767 DS4 ) out lo
GPIOs 156-163, platform/11400000.pinctrl, gpx3:
GPIOs 164-171, platform/13400000.pinctrl, gpe0:
GPIOs 172-173, platform/13400000.pinctrl, gpe1:
GPIOs 174-177, platform/13400000.pinctrl, gpf0:
GPIOs 178-181, platform/13400000.pinctrl, gpf1:
GPIOs 182-189, platform/13400000.pinctrl, gpg0:
GPIOs 190-197, platform/13400000.pinctrl, gpg1:
GPIOs 198-199, platform/13400000.pinctrl, gpg2:
GPIOs 200-203, platform/13400000.pinctrl, gph0:
GPIOs 204-211, platform/13400000.pinctrl, gph1:
GPIOs 212-219, platform/10d10000.pinctrl, gpv0:
GPIOs 220-227, platform/10d10000.pinctrl, gpv1:
GPIOs 228-235, platform/10d10000.pinctrl, gpv2:
GPIOs 236-243, platform/10d10000.pinctrl, gpv3:
GPIOs 244-245, platform/10d10000.pinctrl, gpv4:
GPIOs 246-252, platform/3860000.pinctrl, gpz:
While trying to export gpio 253 which does not exist in /sys/kernel/debug/gpio -
root@linaro-server:~# echo 8 > /sys/class/gpio/export root@linaro-server:~# echo 253 > /sys/class/gpio/export [ 184.656031] Unable to handle kernel NULL pointer dereference at virtual address 00000044 [ 184.662600] pgd = e65f4980 [ 184.665222] [00000044] *pgd=a65e2003, *pmd=a664a003, *pte=00000000 [ 184.671291] Internal error: Oops: 207 [#1] SMP THUMB2 [ 184.676242] Modules linked in: [ 184.679239] CPU: 1 PID: 1887 Comm: bash Not tainted 3.10.40 #1 [ 184.684964] task: e6591580 ti: e6734000 task.ti: e6734000 [ 184.690281] PC is at gpiod_request+0x2e/0x130 [ 184.694543] LR is at _raw_spin_lock_irqsave+0x13/0x18 [ 184.699490] pc : [<8027b2aa>] lr : [<8047e8f7>] psr: 600700b3 [ 184.699490] sp : e6735ef8 ip : 802dc6bd fp : 00000000 [ 184.710767] r10: e718f218 r9 : e7193748 r8 : 805ea048 [ 184.715878] r7 : fffffdfb r6 : a0070013 r5 : 00000000 r4 : 807edc7c [ 184.722286] r3 : e6591580 r2 : 00000001 r1 : 007a0079 r0 : a0070013 [ 184.728698] Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA Thumb Segment user [ 184.735958] Control: 70c5387d Table: a65f4980 DAC: 55555555 [ 184.741588] Process bash (pid: 1887, stack limit = 0xe6734238) [ 184.747311] Stack: (0xe6735ef8 to 0xe6736000) [ 184.751585] 5ee0: 00000000 00000004 [ 184.759630] 5f00: 807edc7c e6735f80 804d8900 e7193748 e718f218 8027be35 e6bab8d8 000000fd [ 184.767677] 5f20: 8027be05 e6bab8c0 e6bab8d8 802dc6cf 00000004 801055f3 e72ca200 00251408 [ 184.775703] 5f40: e6735f80 801054f9 00000004 00000004 00000000 800c09c1 e65decc0 800bf57b [ 184.783730] 5f60: 00060000 00000000 00000000 e72ca200 00000000 00251408 00000004 800c0dd3 [ 184.791757] 5f80: 00000000 00000000 800181c4 00000004 00251408 76f02a78 00000004 800181c4 [ 184.799786] 5fa0: e6734000 80018001 00000004 00251408 00000001 00251408 00000004 00000000 [ 184.807814] 5fc0: 00000004 00251408 76f02a78 00000004 00000004 00000000 000a6094 00000000 [ 184.815842] 5fe0: 00000000 7ee9a93c 76e7143d 76ea902c 40070010 00000001 00000000 00000000 [ 184.823907] [<8027b2aa>] (gpiod_request+0x2e/0x130) from [<8027be35>] (export_store+0x31/0x94) [ 184.832364] [<8027be35>] (export_store+0x31/0x94) from [<802dc6cf>] (class_attr_store+0x13/0x1c) [ 184.840985] [<802dc6cf>] (class_attr_store+0x13/0x1c) from [<801055f3>] (sysfs_write_file+0xfb/0x130) [ 184.850034] [<801055f3>] (sysfs_write_file+0xfb/0x130) from [<800c09c1>] (vfs_write+0x75/0x114) [ 184.858573] [<800c09c1>] (vfs_write+0x75/0x114) from [<800c0dd3>] (SyS_write+0x2f/0x58) [ 184.866430] [<800c0dd3>] (SyS_write+0x2f/0x58) from [<80018001>] (ret_fast_syscall+0x1/0x46) [ 184.874699] Code: bb10 6825 f46f 7701 (6c6b) f64a [ 184.879373] ---[ end trace 5ed1d539ac53eee0 ]---
However, I cloned linux-linaro-tracking.git (kernel version shows 3.14.0) and there the issue does not occur.
May be some fix went in between kernel 3.10.40 and 3.14.0 where the bug was fixed? Fix is probably not integrated in android kernel (at least in Linaro Android 14.04 which has kernel version 3.9.1).
-- Thanks, -Meraj
On Wed, Jun 25, 2014 at 2:31 PM, Amit Kucheria amit.kucheria@linaro.org wrote:
Mohammad,
Does the problem occur with a mainline kernel?
Regards, Amit
On Wed, Jun 25, 2014 at 1:47 PM, Mohammad Merajul Islam Molla meraj.enigma@gmail.com wrote:
Hello,
On Linaro Android 14.04, with custom compiled kernel (config file attached), I am facing a kernel crash (details log attached). I am running on Samsung Arndale Board with Exynos 5250.
Output from my /sys/kernel/debug/gpio looks as below -
root@arndale:/ # cat /sys/kernel/debug/gpio
GPIOs 0-7, GPA0: gpio-0 (s3c24xx-uart ) in hi gpio-1 (s3c24xx-uart ) in hi gpio-2 (s3c24xx-uart ) in lo gpio-3 (s3c24xx-uart ) in hi gpio-6 (i2c-bus ) in hi gpio-7 (i2c-bus ) in hi
GPIOs 9-14, GPA1: gpio-9 (s3c24xx-uart ) in hi gpio-10 (s3c24xx-uart ) in hi gpio-11 (s3c24xx-uart ) in hi gpio-12 (s3c24xx-uart ) in hi gpio-13 (s3c24xx-uart ) in lo gpio-14 (s3c24xx-uart ) in hi
GPIOs 16-23, GPA2:
GPIOs 25-29, GPB0:
GPIOs 31-35, GPB1:
GPIOs 37-40, GPB2:
GPIOs 42-45, GPB3: gpio-42 (i2c-bus ) in hi gpio-43 (i2c-bus ) in hi
GPIOs 47-53, GPC0: gpio-47 (dw-mci-bus ) in lo gpio-48 (dw-mci-bus ) in hi gpio-50 (dw-mci-bus ) in hi gpio-51 (dw-mci-bus ) in hi gpio-52 (dw-mci-bus ) in hi gpio-53 (dw-mci-bus ) in hi
GPIOs 55-58, GPC1: gpio-55 (dw-mci-bus ) in hi gpio-56 (dw-mci-bus ) in hi gpio-57 (dw-mci-bus ) in hi gpio-58 (dw-mci-bus ) in hi
GPIOs 60-66, GPC2:
GPIOs 68-74, GPC3: gpio-68 (dw-mci-bus ) in lo gpio-69 (dw-mci-bus ) in hi gpio-70 (dw-mci-cd ) in lo gpio-71 (dw-mci-bus ) in lo gpio-72 (dw-mci-bus ) in hi gpio-73 (dw-mci-bus ) in hi gpio-74 (dw-mci-bus ) in hi
GPIOs 76-82, GPC4:
GPIOs 84-87, GPD0: gpio-84 (s3c24xx-uart ) in lo gpio-85 (s3c24xx-uart ) in hi gpio-86 (s3c24xx-uart ) in lo gpio-87 (s3c24xx-uart ) in hi
GPIOs 89-96, GPD1:
GPIOs 98-103, GPY0:
GPIOs 105-108, GPY1:
GPIOs 110-115, GPY2:
GPIOs 117-124, GPY3:
GPIOs 126-133, GPY4:
GPIOs 135-142, GPY5:
GPIOs 144-151, GPY6:
GPIOs 153-160, GPX0:
GPIOs 162-169, GPX1: gpio-163 (VDD_33ON_2.8V ) out hi
GPIOs 171-178, GPX2: gpio-174 (S5M8767 DS2 ) out lo gpio-175 (S5M8767 DS3 ) out lo gpio-176 (S5M8767 DS4 ) out lo
GPIOs 180-187, GPX3: gpio-187 (HPD ) in lo
GPIOs 189-196, GPE0:
GPIOs 198-199, GPE1:
GPIOs 201-204, GPF0:
GPIOs 206-209, GPF1:
GPIOs 211-218, GPG0:
GPIOs 220-227, GPG1:
GPIOs 229-230, GPG2:
GPIOs 232-235, GPH0:
GPIOs 237-244, GPH1:
GPIOs 246-253, GPV0:
GPIOs 255-262, GPV1:
GPIOs 264-271, GPV2:
GPIOs 273-280, GPV3:
GPIOs 282-283, GPV4:
GPIOs 285-291, GPZ:
While trying to export gpio 8, the crash happens -
root@arndale:/ # echo 8 > /sys/class/gpio/export
1Unable to handle kernel NULL pointer dereference at virtual address 00000044
[ 26.700000] Unable to handle kernel NULL pointer dereference at virtual address 00000044 1pgd = e8848000
[ 26.700000] pgd = e8848000 [00000044] *pgd=00000000[ 26.720000] [00000044] *pgd=00000000
Internal error: Oops: 5 [#1] PREEMPT SMP ARM
[ 26.730000] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
From above, I noted that gpio 0 - 7 are associated with GPA0 and gpio 9 - 14 with GPA1. gpio 8 is not existent in /sys/kernel/debug/gpio file.
On the same board, I ran Linaro Saucy server, and there the crash does not happen. /sys/kernel/debug/gpio on saucy server looks as below -
GPIOs 0-7, platform/11400000.pinctrl, gpa0:
GPIOs 8-13, platform/11400000.pinctrl, gpa1:
GPIOs 14-21, platform/11400000.pinctrl, gpa2:
GPIOs 22-26, platform/11400000.pinctrl, gpb0:
GPIOs 27-31, platform/11400000.pinctrl, gpb1:
GPIOs 32-35, platform/11400000.pinctrl, gpb2:
GPIOs 36-39, platform/11400000.pinctrl, gpb3:
GPIOs 40-46, platform/11400000.pinctrl, gpc0:
GPIOs 47-50, platform/11400000.pinctrl, gpc1:
GPIOs 51-57, platform/11400000.pinctrl, gpc2:
GPIOs 58-64, platform/11400000.pinctrl, gpc3:
GPIOs 65-68, platform/11400000.pinctrl, gpd0:
GPIOs 69-76, platform/11400000.pinctrl, gpd1: gpio-76 (usb3503 connect ) out hi
GPIOs 77-83, platform/11400000.pinctrl, gpc4:
GPIOs 84-89, platform/11400000.pinctrl, gpy0:
GPIOs 90-93, platform/11400000.pinctrl, gpy1:
GPIOs 94-99, platform/11400000.pinctrl, gpy2:
GPIOs 100-107, platform/11400000.pinctrl, gpy3:
GPIOs 108-115, platform/11400000.pinctrl, gpy4:
GPIOs 116-123, platform/11400000.pinctrl, gpy5:
GPIOs 124-131, platform/11400000.pinctrl, gpy6:
GPIOs 132-139, platform/11400000.pinctrl, gpx0:
GPIOs 140-147, platform/11400000.pinctrl, gpx1: gpio-141 (VDD_33ON_2.8V ) out hi gpio-144 (SW-TACT2 ) in hi gpio-145 (SW-TACT3 ) in hi gpio-146 (SW-TACT4 ) in hi gpio-147 (SW-TACT5 ) in hi
GPIOs 148-155, platform/11400000.pinctrl, gpx2: gpio-148 (SW-TACT6 ) in hi gpio-149 (SW-TACT7 ) in hi gpio-151 (S5M8767 DS2 ) out lo gpio-152 (S5M8767 DS3 ) out lo gpio-153 (S5M8767 DS4 ) out lo
GPIOs 156-163, platform/11400000.pinctrl, gpx3: gpio-161 (usb3503 reset ) out hi gpio-163 (HPD ) in lo
GPIOs 164-171, platform/13400000.pinctrl, gpe0:
GPIOs 172-173, platform/13400000.pinctrl, gpe1:
GPIOs 174-177, platform/13400000.pinctrl, gpf0:
GPIOs 178-181, platform/13400000.pinctrl, gpf1:
GPIOs 182-189, platform/13400000.pinctrl, gpg0:
GPIOs 190-197, platform/13400000.pinctrl, gpg1:
GPIOs 198-199, platform/13400000.pinctrl, gpg2:
GPIOs 200-203, platform/13400000.pinctrl, gph0:
GPIOs 204-211, platform/13400000.pinctrl, gph1:
GPIOs 212-219, platform/10d10000.pinctrl, gpv0:
GPIOs 220-227, platform/10d10000.pinctrl, gpv1:
GPIOs 228-235, platform/10d10000.pinctrl, gpv2:
GPIOs 236-243, platform/10d10000.pinctrl, gpv3:
GPIOs 244-245, platform/10d10000.pinctrl, gpv4:
GPIOs 246-252, platform/3860000.pinctrl, gpz:
Questions -
- Is it kernel bug?
- Why are some gpios (8, 15, 24, etc) not mapped to any device on android?
-- Thanks,
- Meraj
linaro-kernel mailing list linaro-kernel@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-kernel
-- Tushar Behera
On Thu, Jun 26, 2014 at 1:07 PM, Tushar Behera trblinux@gmail.com wrote:
/sys/class/gpio/export is there if generic gpiolib support and gpio sysfs support is enabled. I am not sure if it is still valid to 'export' the gpios defined via pin-control. Adding Linus Walleij to clarify on this.
Linus,
Is it still okay to export GPIOs via /sys/class/gpio/export for Exynos case where we are using pin-control to configure the GPIO pins?
The generic answer is that /sys/class/gpip/export is a dangerous place and should be avoided. This interface was merged into the kernel at a time when the GPIO subsystem was orphaned and had no real maintainer :-(
The suggestion upstream from my side is to rewrite the subsystem to use char devices like /dev/gpiochip0/...
But if there are bugs in the sysfs interface we should try to fix them for sure ... I just don't have this hardware so cannot work on it unless I get it. The bug is probably generic, in gpiolib.
Yours, Linus Walleij
linaro-kernel@lists.linaro.org