2019-05-27 08:55:01 +02:00
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-23 18:46:26 +01:00
|
|
|
|
2024-01-29 12:52:14 +01:00
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-05-31 17:42:29 +02:00
|
|
|
|
2024-01-29 12:52:14 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
|
|
|
|
|
2022-03-07 19:26:26 +05:30
|
|
|
|
2024-01-29 12:52:14 +01:00
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-23 18:46:25 +01:00
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
|
|
|
|
|
reset: add support for non-DT systems
The reset framework only supports device-tree. There are some platforms
however, which need to use it even in legacy, board-file based mode.
An example of such architecture is the DaVinci family of SoCs which
supports both device tree and legacy boot modes and we don't want to
introduce any regressions.
We're currently working on converting the platform from its hand-crafted
clock API to using the common clock framework. Part of the overhaul will
be representing the chip's power sleep controller's reset lines using
the reset framework.
This changeset extends the core reset code with a new reset lookup
entry structure. It contains data allowing the reset core to associate
reset lines with devices by comparing the dev_id and con_id strings.
It also provides a function allowing drivers to register lookup entries
with the framework.
The new lookup function is only called as a fallback in case the
of_node field is NULL and doesn't change anything for current users.
Tested with a dummy reset driver with several lookup entries.
An example lookup table registration from a driver can be found below:
static struct reset_control_lookup foobar_reset_lookup[] = {
RESET_LOOKUP("foo.0", "foo", 15),
RESET_LOOKUP("bar.0", NULL, 5),
};
foobar_probe()
{
...
reset_controller_add_lookup(&rcdev, foobar_reset_lookup,
ARRAY_SIZE(foobar_reset_lookup));
...
}
Cc: Sekhar Nori <nsekhar@ti.com>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: David Lechner <david@lechnology.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2018-02-28 14:08:57 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-01-29 12:52:14 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-23 18:46:25 +01:00
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
|
|
|
|
|
2016-02-23 18:46:25 +01:00
|
|
|
|
2019-02-21 16:25:53 +01:00
|
|
|
|
2016-02-23 18:46:26 +01:00
|
|
|
|
2020-07-28 19:10:11 +02:00
|
|
|
|
|
|
|
|
|
2016-11-12 14:13:03 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-23 18:46:25 +01:00
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
2017-05-31 17:42:29 +02:00
|
|
|
|
2019-02-21 16:25:53 +01:00
|
|
|
|
2017-01-13 17:57:40 +00:00
|
|
|
|
2017-05-22 16:53:25 +05:30
|
|
|
|
2016-02-23 18:46:26 +01:00
|
|
|
|
2016-11-12 14:13:03 +01:00
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
|
|
|
|
|
2017-05-22 16:53:25 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-09-22 10:52:29 -07:00
|
|
|
|
2017-05-22 16:53:25 +05:30
|
|
|
|
|
|
|
|
|
2024-01-29 12:52:14 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-02-21 16:25:53 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-01-29 12:52:14 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-02-21 16:25:53 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-10-22 16:51:37 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
2013-12-19 14:11:10 +05:30
|
|
|
|
2021-03-04 16:56:56 +01:00
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-01-29 12:52:14 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-23 18:46:25 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
2016-02-23 18:46:25 +01:00
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-23 18:46:25 +01:00
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
2016-02-23 18:46:25 +01:00
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-01 19:36:57 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-11-20 15:59:27 +01:00
|
|
|
|
2016-05-01 19:36:57 +09:00
|
|
|
|
2019-11-20 15:59:27 +01:00
|
|
|
|
2016-05-01 19:36:57 +09:00
|
|
|
|
|
|
|
|
|
2019-11-20 15:59:27 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-01 19:36:57 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
reset: add support for non-DT systems
The reset framework only supports device-tree. There are some platforms
however, which need to use it even in legacy, board-file based mode.
An example of such architecture is the DaVinci family of SoCs which
supports both device tree and legacy boot modes and we don't want to
introduce any regressions.
We're currently working on converting the platform from its hand-crafted
clock API to using the common clock framework. Part of the overhaul will
be representing the chip's power sleep controller's reset lines using
the reset framework.
This changeset extends the core reset code with a new reset lookup
entry structure. It contains data allowing the reset core to associate
reset lines with devices by comparing the dev_id and con_id strings.
It also provides a function allowing drivers to register lookup entries
with the framework.
The new lookup function is only called as a fallback in case the
of_node field is NULL and doesn't change anything for current users.
Tested with a dummy reset driver with several lookup entries.
An example lookup table registration from a driver can be found below:
static struct reset_control_lookup foobar_reset_lookup[] = {
RESET_LOOKUP("foo.0", "foo", 15),
RESET_LOOKUP("bar.0", NULL, 5),
};
foobar_probe()
{
...
reset_controller_add_lookup(&rcdev, foobar_reset_lookup,
ARRAY_SIZE(foobar_reset_lookup));
...
}
Cc: Sekhar Nori <nsekhar@ti.com>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: David Lechner <david@lechnology.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2018-02-28 14:08:57 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-23 14:04:48 +01:00
|
|
|
|
reset: add support for non-DT systems
The reset framework only supports device-tree. There are some platforms
however, which need to use it even in legacy, board-file based mode.
An example of such architecture is the DaVinci family of SoCs which
supports both device tree and legacy boot modes and we don't want to
introduce any regressions.
We're currently working on converting the platform from its hand-crafted
clock API to using the common clock framework. Part of the overhaul will
be representing the chip's power sleep controller's reset lines using
the reset framework.
This changeset extends the core reset code with a new reset lookup
entry structure. It contains data allowing the reset core to associate
reset lines with devices by comparing the dev_id and con_id strings.
It also provides a function allowing drivers to register lookup entries
with the framework.
The new lookup function is only called as a fallback in case the
of_node field is NULL and doesn't change anything for current users.
Tested with a dummy reset driver with several lookup entries.
An example lookup table registration from a driver can be found below:
static struct reset_control_lookup foobar_reset_lookup[] = {
RESET_LOOKUP("foo.0", "foo", 15),
RESET_LOOKUP("bar.0", NULL, 5),
};
foobar_probe()
{
...
reset_controller_add_lookup(&rcdev, foobar_reset_lookup,
ARRAY_SIZE(foobar_reset_lookup));
...
}
Cc: Sekhar Nori <nsekhar@ti.com>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: David Lechner <david@lechnology.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2018-02-28 14:08:57 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-23 14:04:48 +01:00
|
|
|
|
|
|
|
|
|
reset: add support for non-DT systems
The reset framework only supports device-tree. There are some platforms
however, which need to use it even in legacy, board-file based mode.
An example of such architecture is the DaVinci family of SoCs which
supports both device tree and legacy boot modes and we don't want to
introduce any regressions.
We're currently working on converting the platform from its hand-crafted
clock API to using the common clock framework. Part of the overhaul will
be representing the chip's power sleep controller's reset lines using
the reset framework.
This changeset extends the core reset code with a new reset lookup
entry structure. It contains data allowing the reset core to associate
reset lines with devices by comparing the dev_id and con_id strings.
It also provides a function allowing drivers to register lookup entries
with the framework.
The new lookup function is only called as a fallback in case the
of_node field is NULL and doesn't change anything for current users.
Tested with a dummy reset driver with several lookup entries.
An example lookup table registration from a driver can be found below:
static struct reset_control_lookup foobar_reset_lookup[] = {
RESET_LOOKUP("foo.0", "foo", 15),
RESET_LOOKUP("bar.0", NULL, 5),
};
foobar_probe()
{
...
reset_controller_add_lookup(&rcdev, foobar_reset_lookup,
ARRAY_SIZE(foobar_reset_lookup));
...
}
Cc: Sekhar Nori <nsekhar@ti.com>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: David Lechner <david@lechnology.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2018-02-28 14:08:57 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-05-22 16:53:25 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-11-13 00:00:43 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-01-13 17:57:41 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-11-12 14:13:03 +01:00
|
|
|
|
|
|
|
|
|
2017-01-13 17:57:41 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-23 18:46:26 +01:00
|
|
|
|
|
|
|
|
|
2017-05-22 16:53:25 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-11-12 14:13:03 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-02-21 16:25:53 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-11-12 14:13:03 +01:00
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
2016-11-12 14:13:03 +01:00
|
|
|
|
2017-02-15 19:15:51 +01:00
|
|
|
|
2016-11-12 14:13:03 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-03-14 18:44:46 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-11-13 00:00:43 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-23 18:46:26 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-11-12 14:13:03 +01:00
|
|
|
|
|
|
|
|
|
2017-01-13 17:57:41 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-01-13 17:57:41 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-20 13:05:14 +02:00
|
|
|
|
|
|
|
|
|
2017-05-22 16:53:25 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-23 18:46:26 +01:00
|
|
|
|
2016-11-12 14:13:03 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-23 18:46:26 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-07-12 17:51:22 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-02-21 16:25:53 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-23 18:46:26 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-03-14 18:44:46 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-23 18:46:26 +01:00
|
|
|
|
|
|
|
|
|
2016-11-12 14:13:03 +01:00
|
|
|
|
|
|
|
|
|
2017-01-13 17:57:41 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-01-13 17:57:41 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-20 13:05:14 +02:00
|
|
|
|
|
|
|
|
|
2017-05-22 16:53:25 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-23 18:46:26 +01:00
|
|
|
|
2016-11-12 14:13:03 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-23 18:46:26 +01:00
|
|
|
|
|
|
|
|
|
2019-02-21 16:25:53 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-23 18:46:26 +01:00
|
|
|
|
|
|
|
|
|
2017-07-12 17:51:22 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-23 18:46:26 +01:00
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-03-14 18:44:46 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-10-10 10:21:14 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-01-13 17:57:41 +00:00
|
|
|
|
2014-10-10 10:21:14 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-01-13 17:57:41 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-05-22 16:53:25 +05:30
|
|
|
|
2016-06-20 13:05:14 +02:00
|
|
|
|
|
|
|
|
|
2014-10-10 10:21:14 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-10-29 09:55:00 +01:00
|
|
|
|
2014-10-10 10:21:14 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-02-21 16:25:53 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
2021-03-14 18:44:46 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-03-04 16:56:56 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-23 18:46:25 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-02-21 16:25:53 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-23 18:46:26 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-05-31 17:42:29 +02:00
|
|
|
|
2016-02-23 18:46:25 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-06-07 10:26:15 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-23 18:46:25 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-05-31 17:42:29 +02:00
|
|
|
|
2019-02-21 16:25:53 +01:00
|
|
|
|
2016-02-23 18:46:26 +01:00
|
|
|
|
2016-02-23 18:46:25 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-05-31 17:42:29 +02:00
|
|
|
|
2016-02-23 18:46:25 +01:00
|
|
|
|
2017-05-31 17:42:29 +02:00
|
|
|
|
|
|
|
|
|
2016-02-23 18:46:25 +01:00
|
|
|
|
2017-05-31 17:42:29 +02:00
|
|
|
|
2016-02-23 18:46:25 +01:00
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-01-13 17:57:41 +00:00
|
|
|
|
|
|
|
|
|
2016-02-23 18:46:24 +01:00
|
|
|
|
2017-01-13 17:57:41 +00:00
|
|
|
|
2016-02-23 18:46:24 +01:00
|
|
|
|
|
|
|
|
|
2013-12-20 22:41:07 +01:00
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
2017-01-13 17:57:41 +00:00
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
2024-01-29 12:52:14 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
2024-01-29 12:52:14 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-01-29 12:52:14 +01:00
|
|
|
|
|
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
2018-10-08 13:14:35 +02:00
|
|
|
|
2024-01-29 12:52:14 +01:00
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
|
|
|
|
|
2016-01-14 16:24:44 +01:00
|
|
|
|
2018-10-08 13:14:35 +02:00
|
|
|
|
2024-01-29 12:52:14 +01:00
|
|
|
|
2016-01-14 16:24:44 +01:00
|
|
|
|
|
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
|
|
|
|
|
2018-10-08 13:14:35 +02:00
|
|
|
|
2024-01-29 12:52:14 +01:00
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
|
|
|
|
|
2016-02-23 18:46:25 +01:00
|
|
|
|
2019-02-21 16:25:53 +01:00
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
2024-01-29 12:52:14 +01:00
|
|
|
|
2016-02-23 18:46:25 +01:00
|
|
|
|
2024-01-29 12:52:14 +01:00
|
|
|
|
2018-10-08 13:14:35 +02:00
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-23 18:46:24 +01:00
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
2018-03-23 14:04:48 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
reset: add support for non-DT systems
The reset framework only supports device-tree. There are some platforms
however, which need to use it even in legacy, board-file based mode.
An example of such architecture is the DaVinci family of SoCs which
supports both device tree and legacy boot modes and we don't want to
introduce any regressions.
We're currently working on converting the platform from its hand-crafted
clock API to using the common clock framework. Part of the overhaul will
be representing the chip's power sleep controller's reset lines using
the reset framework.
This changeset extends the core reset code with a new reset lookup
entry structure. It contains data allowing the reset core to associate
reset lines with devices by comparing the dev_id and con_id strings.
It also provides a function allowing drivers to register lookup entries
with the framework.
The new lookup function is only called as a fallback in case the
of_node field is NULL and doesn't change anything for current users.
Tested with a dummy reset driver with several lookup entries.
An example lookup table registration from a driver can be found below:
static struct reset_control_lookup foobar_reset_lookup[] = {
RESET_LOOKUP("foo.0", "foo", 15),
RESET_LOOKUP("bar.0", NULL, 5),
};
foobar_probe()
{
...
reset_controller_add_lookup(&rcdev, foobar_reset_lookup,
ARRAY_SIZE(foobar_reset_lookup));
...
}
Cc: Sekhar Nori <nsekhar@ti.com>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: David Lechner <david@lechnology.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2018-02-28 14:08:57 +01:00
|
|
|
|
|
|
|
|
|
2019-02-21 16:25:53 +01:00
|
|
|
|
reset: add support for non-DT systems
The reset framework only supports device-tree. There are some platforms
however, which need to use it even in legacy, board-file based mode.
An example of such architecture is the DaVinci family of SoCs which
supports both device tree and legacy boot modes and we don't want to
introduce any regressions.
We're currently working on converting the platform from its hand-crafted
clock API to using the common clock framework. Part of the overhaul will
be representing the chip's power sleep controller's reset lines using
the reset framework.
This changeset extends the core reset code with a new reset lookup
entry structure. It contains data allowing the reset core to associate
reset lines with devices by comparing the dev_id and con_id strings.
It also provides a function allowing drivers to register lookup entries
with the framework.
The new lookup function is only called as a fallback in case the
of_node field is NULL and doesn't change anything for current users.
Tested with a dummy reset driver with several lookup entries.
An example lookup table registration from a driver can be found below:
static struct reset_control_lookup foobar_reset_lookup[] = {
RESET_LOOKUP("foo.0", "foo", 15),
RESET_LOOKUP("bar.0", NULL, 5),
};
foobar_probe()
{
...
reset_controller_add_lookup(&rcdev, foobar_reset_lookup,
ARRAY_SIZE(foobar_reset_lookup));
...
}
Cc: Sekhar Nori <nsekhar@ti.com>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: David Lechner <david@lechnology.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2018-02-28 14:08:57 +01:00
|
|
|
|
|
|
|
|
|
2018-03-23 14:04:48 +01:00
|
|
|
|
reset: add support for non-DT systems
The reset framework only supports device-tree. There are some platforms
however, which need to use it even in legacy, board-file based mode.
An example of such architecture is the DaVinci family of SoCs which
supports both device tree and legacy boot modes and we don't want to
introduce any regressions.
We're currently working on converting the platform from its hand-crafted
clock API to using the common clock framework. Part of the overhaul will
be representing the chip's power sleep controller's reset lines using
the reset framework.
This changeset extends the core reset code with a new reset lookup
entry structure. It contains data allowing the reset core to associate
reset lines with devices by comparing the dev_id and con_id strings.
It also provides a function allowing drivers to register lookup entries
with the framework.
The new lookup function is only called as a fallback in case the
of_node field is NULL and doesn't change anything for current users.
Tested with a dummy reset driver with several lookup entries.
An example lookup table registration from a driver can be found below:
static struct reset_control_lookup foobar_reset_lookup[] = {
RESET_LOOKUP("foo.0", "foo", 15),
RESET_LOOKUP("bar.0", NULL, 5),
};
foobar_probe()
{
...
reset_controller_add_lookup(&rcdev, foobar_reset_lookup,
ARRAY_SIZE(foobar_reset_lookup));
...
}
Cc: Sekhar Nori <nsekhar@ti.com>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: David Lechner <david@lechnology.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2018-02-28 14:08:57 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-23 14:04:48 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
reset: add support for non-DT systems
The reset framework only supports device-tree. There are some platforms
however, which need to use it even in legacy, board-file based mode.
An example of such architecture is the DaVinci family of SoCs which
supports both device tree and legacy boot modes and we don't want to
introduce any regressions.
We're currently working on converting the platform from its hand-crafted
clock API to using the common clock framework. Part of the overhaul will
be representing the chip's power sleep controller's reset lines using
the reset framework.
This changeset extends the core reset code with a new reset lookup
entry structure. It contains data allowing the reset core to associate
reset lines with devices by comparing the dev_id and con_id strings.
It also provides a function allowing drivers to register lookup entries
with the framework.
The new lookup function is only called as a fallback in case the
of_node field is NULL and doesn't change anything for current users.
Tested with a dummy reset driver with several lookup entries.
An example lookup table registration from a driver can be found below:
static struct reset_control_lookup foobar_reset_lookup[] = {
RESET_LOOKUP("foo.0", "foo", 15),
RESET_LOOKUP("bar.0", NULL, 5),
};
foobar_probe()
{
...
reset_controller_add_lookup(&rcdev, foobar_reset_lookup,
ARRAY_SIZE(foobar_reset_lookup));
...
}
Cc: Sekhar Nori <nsekhar@ti.com>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: David Lechner <david@lechnology.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2018-02-28 14:08:57 +01:00
|
|
|
|
2019-02-21 16:25:53 +01:00
|
|
|
|
reset: add support for non-DT systems
The reset framework only supports device-tree. There are some platforms
however, which need to use it even in legacy, board-file based mode.
An example of such architecture is the DaVinci family of SoCs which
supports both device tree and legacy boot modes and we don't want to
introduce any regressions.
We're currently working on converting the platform from its hand-crafted
clock API to using the common clock framework. Part of the overhaul will
be representing the chip's power sleep controller's reset lines using
the reset framework.
This changeset extends the core reset code with a new reset lookup
entry structure. It contains data allowing the reset core to associate
reset lines with devices by comparing the dev_id and con_id strings.
It also provides a function allowing drivers to register lookup entries
with the framework.
The new lookup function is only called as a fallback in case the
of_node field is NULL and doesn't change anything for current users.
Tested with a dummy reset driver with several lookup entries.
An example lookup table registration from a driver can be found below:
static struct reset_control_lookup foobar_reset_lookup[] = {
RESET_LOOKUP("foo.0", "foo", 15),
RESET_LOOKUP("bar.0", NULL, 5),
};
foobar_probe()
{
...
reset_controller_add_lookup(&rcdev, foobar_reset_lookup,
ARRAY_SIZE(foobar_reset_lookup));
...
}
Cc: Sekhar Nori <nsekhar@ti.com>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: David Lechner <david@lechnology.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2018-02-28 14:08:57 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-05 13:41:39 +01:00
|
|
|
|
2019-02-21 16:25:53 +01:00
|
|
|
|
|
|
|
|
|
2016-02-05 13:41:39 +01:00
|
|
|
|
2019-02-21 16:25:53 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-05 13:41:39 +01:00
|
|
|
|
|
|
|
|
|
2019-02-21 16:25:53 +01:00
|
|
|
|
2016-02-05 13:41:39 +01:00
|
|
|
|
2019-02-21 16:25:53 +01:00
|
|
|
|
|
|
|
|
|
2016-02-05 13:41:39 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-03-14 18:44:46 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-05-22 16:53:25 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-10-22 14:06:23 +05:30
|
|
|
|
2017-05-22 16:53:25 +05:30
|
|
|
|
|
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-01 08:05:22 +01:00
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
|
|
|
|
|
2017-05-22 16:53:25 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-23 18:46:25 +01:00
|
|
|
|
2016-02-05 13:41:39 +01:00
|
|
|
|
2016-02-23 18:46:25 +01:00
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-03-14 18:44:46 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-11-29 17:55:33 +01:00
|
|
|
|
2021-03-14 18:44:46 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-03-04 16:56:56 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-02-21 16:25:53 +01:00
|
|
|
|
2019-11-20 15:59:27 +01:00
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
2019-11-20 15:59:27 +01:00
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
|
|
|
|
|
2019-11-20 15:59:27 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
|
|
|
|
|
2016-02-23 18:46:24 +01:00
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
2021-03-14 18:44:46 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
2021-01-14 09:04:50 +01:00
|
|
|
|
|
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
2017-10-29 01:50:06 +09:00
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
2017-10-29 01:50:06 +09:00
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
2022-03-07 19:26:26 +05:30
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
2017-10-29 01:50:06 +09:00
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-03-07 19:26:26 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-02-21 16:25:53 +01:00
|
|
|
|
2012-11-19 17:23:13 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-10-29 01:50:06 +09:00
|
|
|
|
2017-05-22 16:53:25 +05:30
|
|
|
|
2019-10-22 16:09:50 +02:00
|
|
|
|
2017-05-22 16:53:25 +05:30
|
|
|
|
|
|
|
|
|
2019-10-22 16:09:50 +02:00
|
|
|
|
2017-05-22 16:53:25 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-02-21 16:25:54 +01:00
|
|
|
|
|
|
|
|
|
2017-05-22 16:53:25 +05:30
|
|
|
|
2019-11-20 15:26:13 +01:00
|
|
|
|
2017-05-22 16:53:25 +05:30
|
|
|
|
|
|
|
|
|
2019-02-21 16:25:54 +01:00
|
|
|
|
|
|
|
|
|
2017-05-22 16:53:25 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
treewide: Use struct_size() for kmalloc()-family
One of the more common cases of allocation size calculations is finding
the size of a structure that has a zero-sized array at the end, along
with memory for some number of elements for that array. For example:
struct foo {
int stuff;
void *entry[];
};
instance = kmalloc(sizeof(struct foo) + sizeof(void *) * count, GFP_KERNEL);
Instead of leaving these open-coded and prone to type mistakes, we can
now use the new struct_size() helper:
instance = kmalloc(struct_size(instance, entry, count), GFP_KERNEL);
This patch makes the changes for kmalloc()-family (and kvmalloc()-family)
uses. It was done via automatic conversion with manual review for the
"CHECKME" non-standard cases noted below, using the following Coccinelle
script:
// pkey_cache = kmalloc(sizeof *pkey_cache + tprops->pkey_tbl_len *
// sizeof *pkey_cache->table, GFP_KERNEL);
@@
identifier alloc =~ "kmalloc|kzalloc|kvmalloc|kvzalloc";
expression GFP;
identifier VAR, ELEMENT;
expression COUNT;
@@
- alloc(sizeof(*VAR) + COUNT * sizeof(*VAR->ELEMENT), GFP)
+ alloc(struct_size(VAR, ELEMENT, COUNT), GFP)
// mr = kzalloc(sizeof(*mr) + m * sizeof(mr->map[0]), GFP_KERNEL);
@@
identifier alloc =~ "kmalloc|kzalloc|kvmalloc|kvzalloc";
expression GFP;
identifier VAR, ELEMENT;
expression COUNT;
@@
- alloc(sizeof(*VAR) + COUNT * sizeof(VAR->ELEMENT[0]), GFP)
+ alloc(struct_size(VAR, ELEMENT, COUNT), GFP)
// Same pattern, but can't trivially locate the trailing element name,
// or variable name.
@@
identifier alloc =~ "kmalloc|kzalloc|kvmalloc|kvzalloc";
expression GFP;
expression SOMETHING, COUNT, ELEMENT;
@@
- alloc(sizeof(SOMETHING) + COUNT * sizeof(ELEMENT), GFP)
+ alloc(CHECKME_struct_size(&SOMETHING, ELEMENT, COUNT), GFP)
Signed-off-by: Kees Cook <keescook@chromium.org>
2018-05-08 13:45:50 -07:00
|
|
|
|
2017-05-22 16:53:25 +05:30
|
|
|
|
|
|
|
|
|
2023-09-22 10:52:29 -07:00
|
|
|
|
2017-05-22 16:53:25 +05:30
|
|
|
|
|
|
|
|
|
2019-02-21 16:25:53 +01:00
|
|
|
|
2019-02-21 16:25:54 +01:00
|
|
|
|
2017-05-22 16:53:25 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-11-20 15:26:13 +01:00
|
|
|
|
2017-05-22 16:53:25 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-11-20 15:59:27 +01:00
|
|
|
|
2017-05-22 16:53:25 +05:30
|
|
|
|
2019-11-20 15:59:27 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-05-22 16:53:25 +05:30
|
|
|
|
|
|
|
|
|
2019-02-21 16:25:54 +01:00
|
|
|
|
2019-11-20 15:59:26 +01:00
|
|
|
|
2019-11-20 15:59:27 +01:00
|
|
|
|
2017-05-22 16:53:25 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-11-20 15:59:27 +01:00
|
|
|
|
|
|
|
|
|
2017-05-22 16:53:25 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-11-13 13:47:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-11-14 21:49:35 +00:00
|
|
|
|
2018-11-13 13:47:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-11-14 21:49:35 +00:00
|
|
|
|
2018-11-13 13:47:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|