Add a mising gpio pin description.

This file enumerates the gpio pins in two different ways: as enum
values and as an array of data.  The enum values are used as keys into
the array.  One of the enums, GPIODV_9, is missing from the table.  As
a result, lookup fails to find a matching entry and returns an invalid
entry, which causes the kernel to panic.  This patch adds the missing
data to the array.

However, the underlying problem is not fixed.  Somewhere in the kernel
is lookup logic that does not check the validity of the results to
ensure that a match indeed occurred.  There are no doubt other
potential panics to be triggered by the same lookup code applied to
other tables (or future versions of this one).
This commit is contained in:
brook 2022-06-23 03:36:00 +00:00
parent fc5c743ea0
commit df01e1af48
1 changed files with 3 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: meson8b_pinctrl.c,v 1.2 2019/08/14 09:50:20 jmcneill Exp $ */
/* $NetBSD: meson8b_pinctrl.c,v 1.3 2022/06/23 03:36:00 brook Exp $ */
/*-
* Copyright (c) 2019 Jared McNeill <jmcneill@invisible.ca>
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: meson8b_pinctrl.c,v 1.2 2019/08/14 09:50:20 jmcneill Exp $");
__KERNEL_RCSID(0, "$NetBSD: meson8b_pinctrl.c,v 1.3 2022/06/23 03:36:00 brook Exp $");
#include <sys/param.h>
@ -226,6 +226,7 @@ static const struct meson_pinctrl_gpio meson8b_cbus_gpios[] = {
CBUS_GPIO(GPIOY_14, 3, 14, 3, 14),
/* GPIODV */
CBUS_GPIO(GPIODV_9, 6, 9, 0, 9),
CBUS_GPIO(GPIODV_24, 6, 24, 0, 24),
CBUS_GPIO(GPIODV_25, 6, 25, 0, 25),
CBUS_GPIO(GPIODV_26, 6, 26, 0, 26),