diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index a1068742a6df..096deaa447a6 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -1550,6 +1550,10 @@ If specified, z/VM IUCV HVC accepts connections from listed z/VM user IDs only. + hvc_dcc.enable= [ARM,ARM64] Enable DCC driver at runtime. For GKI, + disabled at runtime by default to prevent + crashes in devices which do not support DCC. + hv_nopvspin [X86,HYPER_V] Disables the paravirt spinlock optimizations which allow the hypervisor to 'idle' the guest on lock contention. diff --git a/drivers/tty/hvc/hvc_dcc.c b/drivers/tty/hvc/hvc_dcc.c index e1ebcdd5fe8d..e9aff1f6b196 100644 --- a/drivers/tty/hvc/hvc_dcc.c +++ b/drivers/tty/hvc/hvc_dcc.c @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include @@ -13,6 +14,13 @@ #include "hvc_console.h" +/* + * Disable DCC driver at runtime. Want driver enabled for GKI, but some devices + * do not support the registers and crash when driver pokes the registers + */ +static bool enable; +module_param(enable, bool, 0444); + /* DCC Status Bits */ #define DCC_STATUS_RX (1 << 30) #define DCC_STATUS_TX (1 << 29) @@ -244,7 +252,7 @@ static int __init hvc_dcc_console_init(void) { int ret; - if (!hvc_dcc_check()) + if (!enable || !hvc_dcc_check()) return -ENODEV; /* Returns -1 if error */ @@ -258,7 +266,7 @@ static int __init hvc_dcc_init(void) { struct hvc_struct *p; - if (!hvc_dcc_check()) + if (!enable || !hvc_dcc_check()) return -ENODEV; p = hvc_alloc(0, 0, &hvc_dcc_get_put_ops, 128);