[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <201803180535.vNOZU5Us%fengguang.wu@intel.com>
Date: Sun, 18 Mar 2018 05:51:55 +0800
From: kbuild test robot <lkp@...el.com>
To: Daniel Kurtz <djkurtz@...omium.org>
Cc: kbuild-all@...org, Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
adurbin@...omium.org, linux-kernel@...r.kernel.org,
Daniel Kurtz <djkurtz@...omium.org>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Len Brown <lenb@...nel.org>, Jiri Slaby <jslaby@...e.com>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Matthias Brugger <mbrugger@...e.com>,
Kees Cook <keescook@...omium.org>,
David Howells <dhowells@...hat.com>,
Vignesh R <vigneshr@...com>, Sean Young <sean@...s.org>,
Jeffy Chen <jeffy.chen@...k-chips.com>,
Douglas Anderson <dianders@...omium.org>,
Matt Redfearn <matt.redfearn@...s.com>,
Marc Gonzalez <marc_gonzalez@...madesigns.com>,
"open list:ACPI" <linux-acpi@...r.kernel.org>,
"open list:SERIAL DRIVERS" <linux-serial@...r.kernel.org>
Subject: Re: [PATCH v2 3/3] serial: core: Allow skipping old serial port
initialization
Hi Daniel,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on v4.16-rc4]
[also build test ERROR on next-20180316]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Daniel-Kurtz/Add-earlycon-support-for-AMD-Carrizo-Stoneyridge/20180318-025754
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All errors (new ones prefixed by >>):
drivers//acpi/spcr.c: In function 'acpi_parse_spcr':
>> drivers//acpi/spcr.c:212:29: error: assignment of read-only variable 'serial8250_skip_old_ports'
serial8250_skip_old_ports = true;
^
--
>> drivers//tty/serial/8250/8250_core.c:69:6: error: conflicting type qualifiers for 'serial8250_skip_old_ports'
bool serial8250_skip_old_ports;
^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers//tty/serial/8250/8250_core.c:29:0:
include/linux/serial_8250.h:142:19: note: previous declaration of 'serial8250_skip_old_ports' was here
static const bool serial8250_skip_old_ports;
^~~~~~~~~~~~~~~~~~~~~~~~~
sparse warnings: (new ones prefixed by >>)
>> drivers/acpi/spcr.c:212:17: sparse: assignment to const expression
drivers/acpi/spcr.c: In function 'acpi_parse_spcr':
drivers/acpi/spcr.c:212:29: error: assignment of read-only variable 'serial8250_skip_old_ports'
serial8250_skip_old_ports = true;
^
vim +/serial8250_skip_old_ports +212 drivers//acpi/spcr.c
94
95 /**
96 * acpi_parse_spcr() - parse ACPI SPCR table and add preferred console
97 *
98 * @enable_earlycon: set up earlycon for the console specified by the table
99 * @enable_console: setup the console specified by the table.
100 *
101 * For the architectures with support for ACPI, CONFIG_ACPI_SPCR_TABLE may be
102 * defined to parse ACPI SPCR table. As a result of the parsing preferred
103 * console is registered and if @enable_earlycon is true, earlycon is set up.
104 * If @enable_console is true the system console is also configured.
105 *
106 * When CONFIG_ACPI_SPCR_TABLE is defined, this function should be called
107 * from arch initialization code as soon as the DT/ACPI decision is made.
108 *
109 */
110 int __init acpi_parse_spcr(bool enable_earlycon, bool enable_console)
111 {
112 static char opts[64];
113 struct acpi_table_spcr *table;
114 acpi_status status;
115 char *uart;
116 char *iotype;
117 int baud_rate;
118 int err;
119
120 if (acpi_disabled)
121 return -ENODEV;
122
123 status = acpi_get_table(ACPI_SIG_SPCR, 0,
124 (struct acpi_table_header **)&table);
125
126 if (ACPI_FAILURE(status))
127 return -ENOENT;
128
129 if (table->header.revision < 2)
130 pr_info("SPCR table version %d\n", table->header.revision);
131
132 if (table->serial_port.space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY) {
133 switch (ACPI_ACCESS_BIT_WIDTH((
134 table->serial_port.access_width))) {
135 default:
136 pr_err("Unexpected SPCR Access Width. Defaulting to byte size\n");
137 /* fall through */
138 case 8:
139 iotype = "mmio";
140 break;
141 case 16:
142 iotype = "mmio16";
143 break;
144 case 32:
145 iotype = "mmio32";
146 break;
147 }
148 } else
149 iotype = "io";
150
151 switch (table->interface_type) {
152 case ACPI_DBG2_ARM_SBSA_32BIT:
153 iotype = "mmio32";
154 /* fall through */
155 case ACPI_DBG2_ARM_PL011:
156 case ACPI_DBG2_ARM_SBSA_GENERIC:
157 case ACPI_DBG2_BCM2835:
158 uart = "pl011";
159 break;
160 case ACPI_DBG2_16550_COMPATIBLE:
161 case ACPI_DBG2_16550_SUBSET:
162 uart = "uart";
163 break;
164 default:
165 err = -ENOENT;
166 goto done;
167 }
168
169 switch (table->baud_rate) {
170 case 3:
171 baud_rate = 9600;
172 break;
173 case 4:
174 baud_rate = 19200;
175 break;
176 case 6:
177 baud_rate = 57600;
178 break;
179 case 7:
180 baud_rate = 115200;
181 break;
182 default:
183 err = -ENOENT;
184 goto done;
185 }
186
187 /*
188 * If the E44 erratum is required, then we need to tell the pl011
189 * driver to implement the work-around.
190 *
191 * The global variable is used by the probe function when it
192 * creates the UARTs, whether or not they're used as a console.
193 *
194 * If the user specifies "traditional" earlycon, the qdf2400_e44
195 * console name matches the EARLYCON_DECLARE() statement, and
196 * SPCR is not used. Parameter "earlycon" is false.
197 *
198 * If the user specifies "SPCR" earlycon, then we need to update
199 * the console name so that it also says "qdf2400_e44". Parameter
200 * "earlycon" is true.
201 *
202 * For consistency, if we change the console name, then we do it
203 * for everyone, not just earlycon.
204 */
205 if (qdf2400_erratum_44_present(&table->header)) {
206 qdf2400_e44_present = true;
207 if (enable_earlycon)
208 uart = "qdf2400_e44";
209 }
210
211 if (amdcz_present(table)) {
> 212 serial8250_skip_old_ports = true;
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Download attachment ".config.gz" of type "application/gzip" (63094 bytes)
Powered by blists - more mailing lists