Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6511789rdb; Fri, 15 Dec 2023 00:01:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IEFyPPVoTY6a3e5VFUQOfrgKR0vKYL6X62aQ1xkcTPtyREp0zJ309PdqosPrEDFZ3E/4w01 X-Received: by 2002:a05:6214:20c1:b0:67a:e56:221d with SMTP id 1-20020a05621420c100b0067a0e56221dmr17252078qve.29.1702627277733; Fri, 15 Dec 2023 00:01:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702627277; cv=none; d=google.com; s=arc-20160816; b=wU0k66mx4zD4luWKuBe+YFuL4/NdyUuZYEmcbZIlzNdPbCtxQ3TWDTQlkOoYsV+9Ms ZQuPICsMcTujOT8hfkwNsZtiXCQZwEFhomyXy8mJFpGllJkS0iWeotN9R0k+PjtSrDB3 sAic/7bNZEW0yORCTU4xPX/TItv/XYeTbi1I3s6TI8kyWlhYI0/ff9XWY4EOeCfLzwG8 pXNdmla9nL+ppyNlti/HZRKEEXJYaRHvlk9uMvwcpnzkHUZfh0OztWsPC/TgoyBExvF6 MP//QCpX5pBvbdgN2UMrlzDmm3L5mcKeXTp95QokfTzjoysOiBvo9mhMRJkK1Eg5w/XA h2nA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=qmihgIcpypovKce3Rw8dyfl+3YaY2Yil6pF5hP9z400=; fh=702vpJVAIT7xYICE4VfLu4bw4hyB1L1rPjy1YzkiqjI=; b=MuHwerI1k+HYxho2tEadDlujbW2CmmPVsIIxlbq/ENHYMdQ4Y/j++FewZ/ZvwHKBa3 NiCpDWprD6GaKTdC46ck2Zih8ilNc8Unen1vlggPFohbrkMs369mS/dakj/gcrr9azy5 ZegqNMquTttblz+WTmtgFvPtj9EJI8+foeN25rFQpWVN2L2JfSePpU7mfjjFxeZSPLrf 936Wb2Tyg6AO2Pn9wKpNldljRyrMHFXzovpGowgXuR/noXN6x1YutPRA1Y8wssDCC6we vxo8N32O/lVZT8/KPtAZObWEQr+fe9oHI8lUHMI3sfOAZ7JEZGss61w+ow0wa2UXjImR vUkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="hOqU/JrF"; spf=pass (google.com: domain of linux-kernel+bounces-572-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-572-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id qr2-20020a05620a390200b0077f44291e20si13021097qkn.254.2023.12.15.00.01.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 00:01:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-572-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="hOqU/JrF"; spf=pass (google.com: domain of linux-kernel+bounces-572-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-572-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 6EA461C2250E for ; Fri, 15 Dec 2023 08:01:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8715311192; Fri, 15 Dec 2023 08:01:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="hOqU/JrF" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 12730179AA for ; Fri, 15 Dec 2023 08:01:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-40c48d7a7a7so3696015e9.3 for ; Fri, 15 Dec 2023 00:01:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702627266; x=1703232066; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=qmihgIcpypovKce3Rw8dyfl+3YaY2Yil6pF5hP9z400=; b=hOqU/JrFgkYp9OORf6PRXIKsamX4Mdgkc4gCgAkoPjTxsYk/G73yWyLIWXt6lcP5Oc pJxhuhPHY8qbju7rIC+tVHrA91vKfAaPoh5bokzayUcLWky5Oy6VqJGbQ1rEWeAjiAbp sMh/QPDycMHCjSPgQg6vkQEXOo7QQmCJMwrEiTniBxEvn0sHcKB4boVnUIPAVz4aAymS Z7DqHz8zVnZTJGDgl2rc6P3pPi5wGC9jNlBRTSBjiIUf8gJkof8Gj4MZ6JR+vRC8lFiY bqrv+2fJ1MPYxTnHU5Qkcy4/XAEPUgsBLT4tUIH4Lb653nNvyAjn62tdVgJDXRkqWPF3 gNFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702627266; x=1703232066; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=qmihgIcpypovKce3Rw8dyfl+3YaY2Yil6pF5hP9z400=; b=GLFTkCU8JKncPMe88NJdFIpzIQzzKi3PZhuXqBujhhmMaKd0v7MYWvonjLQ4PHR9Tx qPsrE1SoYM3loZoxbm+VCmZscruCdhxHWrG8B7Su7OdnlTJ5z1JS2eoBzeZeVoW5iLXC X0CRna5kH0KzgOk4vXLNwFKbJ0jaWoARvlpCZUIJH/BBCxQUKlkui0Kd4vUZvOeFy9Ct 8rf9vKv7j8HN01XaA9WVVD71zp6tpYHEhw6r7ip9102yfCLqVK4QUsrx5nKjoMZYLCsd oMbe/XwNR5pWQDjmr9WQYWxcTpHLx931XvJe4dPtisPWSqPeDfylzBaN7RPjMV/hz0xA MCZA== X-Gm-Message-State: AOJu0YxqWlEiTHOvWTPneMEt77w/roIS/pTUpvKDd8hjO7l5NkUbdTKf l6SLQR3XBGwwnNSfRtyrvHv0cw== X-Received: by 2002:a05:600c:1d23:b0:40c:6a86:3f2e with SMTP id l35-20020a05600c1d2300b0040c6a863f2emr344569wms.96.1702627266298; Fri, 15 Dec 2023 00:01:06 -0800 (PST) Received: from [192.168.1.20] ([178.197.218.27]) by smtp.gmail.com with ESMTPSA id q14-20020a05600c46ce00b0040c4c9c52a3sm16259159wmo.12.2023.12.15.00.01.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 15 Dec 2023 00:01:05 -0800 (PST) Message-ID: <914b634d-444c-4eae-bc7e-0f20d0629470@linaro.org> Date: Fri, 15 Dec 2023 09:01:03 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 05/13] tty: serial: samsung: add gs101 earlycon support Content-Language: en-US To: Tudor Ambarus , Arnd Bergmann , Peter Griffin , Rob Herring , krzysztof.kozlowski+dt@linaro.org, Michael Turquette , Stephen Boyd , Conor Dooley , andi.shyti@kernel.org, Alim Akhtar , Greg Kroah-Hartman , Jiri Slaby , Catalin Marinas , Will Deacon , Sylwester Nawrocki , Tomasz Figa , Chanwoo Choi , Sam Protsenko Cc: =?UTF-8?Q?Andr=C3=A9_Draszik?= , saravanak@google.com, William McVicker , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, linux-serial@vger.kernel.org References: <20231214105243.3707730-1-tudor.ambarus@linaro.org> <20231214105243.3707730-6-tudor.ambarus@linaro.org> <1938fcf1-eb5d-4723-a6c6-d2fe2c6dd1c0@app.fastmail.com> <8808ceeb-35dc-4094-aec4-f43c7acd6174@linaro.org> <6962ac73-2f44-4c9e-8731-152087815454@app.fastmail.com> <584e036a-2ae7-4b88-a517-8f79c6baed4a@linaro.org> From: Krzysztof Kozlowski Autocrypt: addr=krzysztof.kozlowski@linaro.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+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QlzUea7FgsnuWdstgfWi6LxstswEzxLZ Sj1EqpXYZE4uLjh6dW292sO+j4LEqPYr53hyV4I2LPmptPE9Rb9yCTAbSUlzgjiyyjuXhcwM qf3lzsm02y7Ooq+ERVKiJzlvLd9tSe4jRx6Z6LMXhB21fa5DGs/tHAcUF35hSJrvMJzPT/+u /oVmYDFZkbLlqs2XpWaVCo2jv8+iHxZZ9FL7F6AHFzqEFdqGnJQqmEApiRqH6b4jRBOgJ+cY qc+rJggwMQcJL9F+oDm3wX47nr6jIsEB5ZftdybIzpMZ5V9v45lUwmdnMrSzZVgC4jRGXzsU EViBQt2CopXtHtYfPAO5nAkIvKSNp3jmGxZw4aTc5xoAZBLo0OV+Ezo71pg3AYvq0a3/oGRG KQ06ztUMRrj8eVtpImjsWCd0bDWRaaR4vqhCHvAG9iWXZu4qh3ipie2Y0oSJygcZT7H3UZxq fyYKiqEmRuqsvv6dcbblD8ZLkz1EVZL6djImH5zc5x8qpVxlA0A0i23v5QvN00m6G9NFF0Le D2GYIS41Kv4Isx2dEFh+/Q== In-Reply-To: <584e036a-2ae7-4b88-a517-8f79c6baed4a@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 14/12/2023 15:31, Tudor Ambarus wrote: > > > On 12/14/23 14:19, Arnd Bergmann wrote: >> On Thu, Dec 14, 2023, at 13:52, Tudor Ambarus wrote: >>> On 12/14/23 12:01, Arnd Bergmann wrote: >>>> On Thu, Dec 14, 2023, at 11:52, Tudor Ambarus wrote: >>>>> +static int __init gs101_early_console_setup(struct earlycon_device *device, >>>> >>> >>> It works if in device tree one specifies the reg-io-width property and >>> sets it to 4. If the reg-io-width is not specified, the iotype defaults >>> to UPIO_MEM causing the SError interrupt on gs101 which makes the system >>> unusable. >> >> In the case of incorrect DT data like a missing reg-io-width property, >> I would expect it to still fail once the regular console or tty takes >> over from earlycon. >> >>> Also, if the earlycon comes specified from the kernel params, the >>> of_setup_earlycon() is no longer called and the earlycon will be set >>> solely based on the kernel params buffer, thus allowing users to crash >>> the kernel on wrong earlycon definitions. >> >> But that in turn is the same as specifying any other incorrect earlycon. > > I don't think you can crash the kernel if you use other earlycon as you > don't make accesses on the 32bit restricted bus. But I agree that if > using the correct earlycon name, and mmio instead mmio32, is equivalent > to not specifying reg-io-width in dt. > >> >>> If you think the change is fine, I can amend the commit message with the >>> description from above. >> >> I'm still not convinced we need a special case here when everything else >> just requires passing the correct data. We shouldn't need any data from DT for this case, because this property apparently can be inferred from the compatible. IOW, GS101 SoC requires reg-io-width=4, everywhere, for each node, thus there is no need to specify this property. It should be deduced from the compatible. Best regards, Krzysztof