From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AFAC1C4332F for ; Fri, 15 Dec 2023 08:01:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=PiidtX5tq8ivNigFQK9J034APNN2AhJsyu0LsFfwd0M=; b=qSnnUz5pTC1KpF lvM1EEUoqmHj5alwLNfqIjm6owadW3lAse/U3cXgKLsJHs4EaHMl5driFHK1juxDbAS2wwaKJRo/u dyRZLi37v09+2z+7CkpNRDHbnitLJn+XozjoIDCV2eA8YgFlvS6cimW/HG+aYGAB5BlJFX95027qq Ldc8WBtjYCm63cK3pXromgoIhs/HUYk1qDOnwuyhWEGDdMkYyFtFNQ1Q+ih8PdinxjIYLZHXI2Xvv 4ixVCJ/ux8KVbYXBXqeiIXXty5EFXGq2tEEYHYMzxaJeMv+jl77g6c+tp/vpjBzFwgAOBqRdeieZZ xaceoIB2LSjSYYw9ri7w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rE38F-002O6I-2X; Fri, 15 Dec 2023 08:01:15 +0000 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rE38C-002O4l-2P for linux-arm-kernel@lists.infradead.org; Fri, 15 Dec 2023 08:01:14 +0000 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-40c1e3ea2f2so3744525e9.2 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=lists.infradead.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=BXd06lSkpf91GpiACeu6MZq9qAbXmupit+AKTZbtM0eHiU2Yoz5XzibUv6VvSh3H7a GvbmTtjzIUaEFKJZWGTacuhbzvjexaqo2A57FE3YUhxgt06TKtsKZzyESfuyECPD7cqU lshxOH5WnfqwsZaiDCW6v+bcnoTLGcdiIUOqm2/YCfEG5/NhmWvubwDXdapquzXs19FE boNcEAZ3bDTcadKbodck2cUEBVoWjno/scU8/Aj+9YqO4bv4vwC8EsvJZgu5tAf83pTR tAwo0vRvIaRrNXYCPWFRQuWZeBj/ZK4607CRCicc5nr2RK1e02qI89E043APQ5JvCMce C8vg== 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=azAN7D/faSaiqA735+MTxaa4JqmMJhvuDMFqodR5ewGaDCxf+sb66XuVhfXSV8hYj1 pqcze708BNjCbwtTLJajqhSURUWUKpMNwMtmfCFrPirC2XRoe/nM4RW3e7QpLk93HCLm HxvGEITeJy2r6W81Q6+1lWw7SL4j0tqK63o7U66xMMDdwHnIUG1C+vm0LJJSTgqs3Z0W QFiIKJ7quf/aHGaRgHvbUpzhObXs/plg0PcecPFcKdpe1HOulheBvYyAsGiEeUVBd/R7 nbIxKFRF1A3v83d0JcxCNzyQwi23qeezogOck4kGOHUBQ7B/Uf6bJmj/S8sYvRMP3Q9w c6jA== X-Gm-Message-State: AOJu0Yy9Jog3MOOl1JklJtSm1GQuTeIRyMwAJtYwW18X1JKcbgyQe64I EMrqOHfxAiuQsr8AEqgTCp/EAQ== X-Google-Smtp-Source: AGHT+IFaizMfmTfk1pBatmtoqvouAfwt3X/BddgE0L3I+FPpPUI4AV4RF34ktreCHSuhfrS0UreFag== 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 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+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvMYX6U8VwD TNeBxJu5Ex0Izf1NV9CzC3nNaFUYOY8KfN01X5SExAoVTr09ewARAQABzTRLcnp5c3p0b2Yg S296bG93c2tpIDxrcn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RG KQ06ztUMRrj8eVtpImjsWCd0bDWRaaR4vqhCHvAG9iWXZu4qh3ipie2Y0oSJygcZT7H3UZxq fyYKiqEmRuqsvv6dcbblD8ZLkz1EVZL6djImH5zc5x8qpVxlA0A0i23v5QvN00m6G9NFF0Le D2GYIS41Kv4Isx2dEFh+/Q== In-Reply-To: <584e036a-2ae7-4b88-a517-8f79c6baed4a@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231215_000112_785151_86C0CCFE X-CRM114-Status: GOOD ( 20.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel