chromeos-4.4: Modular builds broken due to cr50 deep sleep changes |
||||
Issue description
The cr50 can be built as modules, but some variables from its core are not exported. This results in the following build errors.
ERROR: "cr50_resume" [drivers/char/tpm/cr50_spi.ko] undefined!
ERROR: "cr50_suspend" [drivers/char/tpm/cr50_spi.ko] undefined!
ERROR: "cr50_control_deep_sleep" [drivers/char/tpm/cr50_spi.ko] undefined!
Caused by commit 3dc37c8e0169 ("CHROMIUM: tpm: control deep-sleep for cr50").
Note that this commit has other oddities: some global functions are marked as __maybe_unused, which does not really add any value.
,
Jan 17 2017
Yes, cr50_spi is not supposed to be built as a module, as of now. Will fix in Kconfig. I could export cr50_resume/suspend/control_deep_sleep from cr50.o. But using tpm_transmit_cmd actually requires that we build statically, it is not and should not be a part of the external interface. And re-implementing tpm_transmit_cmd doesn't make sense either.
,
Jan 19 2017
,
Jan 19 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/87069819956115f9c93a48fbb4c543e4bf39018e commit 87069819956115f9c93a48fbb4c543e4bf39018e Author: Guenter Roeck <groeck@chromium.org> Date: Thu Jan 19 00:40:33 2017 FIXUP: CHROMIUM: tpm: control deep-sleep for cr50 Fix build problems such as ERROR: "cr50_control_deep_sleep" [drivers/char/tpm/cr50_spi.ko] undefined! ERROR: "tpm_transmit_cmd" [drivers/char/tpm/cr50.ko] undefined! The first problem is seen because functions from cr50 common code are not exported. The latter problem is seen because tpm_transmit_cmd is not exported, and should not be exported, from the core kernel code. While at it, also drop the useless __maybe_unused markers attached to the global functions. BUG= chromium:681997 TEST=Build x86_64:allmodconfig and xtensa:allmodconfig Change-Id: Id9d6593edddb14e5fb5fea36bdacaa46ddfbf4d9 Signed-off-by: Guenter Roeck <groeck@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/430299 Reviewed-by: Andrey Pronin <apronin@chromium.org> [modify] https://crrev.com/87069819956115f9c93a48fbb4c543e4bf39018e/drivers/char/tpm/Kconfig [modify] https://crrev.com/87069819956115f9c93a48fbb4c543e4bf39018e/drivers/char/tpm/cr50.c
,
Jan 19 2017
|
||||
►
Sign in to add a comment |
||||
Comment 1 by groeck@chromium.org
, Jan 17 2017