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 X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C6E78C433E0 for ; Tue, 16 Feb 2021 10:51:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 815B664DFF for ; Tue, 16 Feb 2021 10:51:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230111AbhBPKvW (ORCPT ); Tue, 16 Feb 2021 05:51:22 -0500 Received: from marcansoft.com ([212.63.210.85]:34526 "EHLO mail.marcansoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229703AbhBPKvL (ORCPT ); Tue, 16 Feb 2021 05:51:11 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: marcan@marcan.st) by mail.marcansoft.com (Postfix) with ESMTPSA id 82C8D419B4; Tue, 16 Feb 2021 10:50:14 +0000 (UTC) Subject: Re: [PATCH v2 23/25] tty: serial: samsung_tty: Add earlycon support for Apple UARTs To: Arnd Bergmann , Krzysztof Kozlowski Cc: Linux ARM , Marc Zyngier , Rob Herring , Olof Johansson , Mark Kettenis , Tony Lindgren , Mohamed Mediouni , Stan Skowronek , Alexander Graf , Will Deacon , Linus Walleij , Mark Rutland , DTML , "linux-kernel@vger.kernel.org" , Arnd Bergmann References: <20210215121713.57687-1-marcan@marcan.st> <20210215121713.57687-24-marcan@marcan.st> <20210215191748.uhus2e6gclkwgjo5@kozik-lap> From: Hector Martin Message-ID: Date: Tue, 16 Feb 2021 19:50:12 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: es-ES Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 16/02/2021 19.29, Arnd Bergmann wrote: > On Tue, Feb 16, 2021 at 11:20 AM Krzysztof Kozlowski wrote: >> >> On Tue, 16 Feb 2021 at 11:19, Arnd Bergmann wrote: >>>>> + return samsung_early_console_setup(device, opt); >>>> >>>> Don't you need to handle the error code - set PROT_DEFAULT() or whatever >>>> was there before? >>> >>> __set_fixmap() has no return value, it just writes a page table entry and >>> does not fail. >> >> I meant, handle samsung_early_console_setup() error code (NULL). > > Ah, I see. > > I don't think it makes a difference -- if ->setup() fails, the page table entry > is just left in place unused, and the type of the unused mapping doesn't > matter. If earlycon tried to unmap the page, the type also would not > change anything. > > With earlycon, I'd generally lean towards keeping things as simple as possible, > in order to increase the chance of seeing anything at all. It clearly wouldn't > hurt to try to add minimal error handling here. There's no logic to clean this up in earlycon itself anyway, so there's no point in trying to do it for the override. If another earlycon driver ends up getting instantiated for some reason, it will override the mapping with a normal one again. -- Hector Martin (marcan@marcan.st) Public Key: https://mrcn.st/pub 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 X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5CB2DC433E0 for ; Tue, 16 Feb 2021 10:52:08 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 03DBD64DDA for ; Tue, 16 Feb 2021 10:52:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 03DBD64DDA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=marcan.st Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=k3IwK1DdG8zKg+g/XEnZtj3i5wZPte1J/ydnD4/bPFQ=; b=FSafqQ/WUYtonqXNP1ZDvs3Ce 7AfTQVveBXQdOah81tk8+VWOJqXLh5WfY4t7UkorkBZ/y5E3zO0l8tbXRFSq04ANrTFG2fG9hnpxA qwcdpeakdh1/k+D0OcaE2HGH4R1AMkhw+MOEqgZEcTibz4/rs6a0yzBEqG5BKNSs7mZoyQxLh/9Yn 1V8nDKe9Z1tcdNuD8+rgak/tvwsEcPSdDBH3Sfzup5bx9/64qSoDIZS7jHT7svGNiqCrog+xErJ/i Po0b/hf2ybkTFBsT0PCXVkPP/J5OgnzhZxS6eIJFGPF3AkwFOr+/JRrKFlP6U9BLXOwvVUPvwSfQt 4IFgxBL2g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lBxw1-0002Fo-8e; Tue, 16 Feb 2021 10:50:25 +0000 Received: from marcansoft.com ([2a01:298:fe:f::2] helo=mail.marcansoft.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lBxvy-0002FE-3O for linux-arm-kernel@lists.infradead.org; Tue, 16 Feb 2021 10:50:23 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: marcan@marcan.st) by mail.marcansoft.com (Postfix) with ESMTPSA id 82C8D419B4; Tue, 16 Feb 2021 10:50:14 +0000 (UTC) Subject: Re: [PATCH v2 23/25] tty: serial: samsung_tty: Add earlycon support for Apple UARTs To: Arnd Bergmann , Krzysztof Kozlowski References: <20210215121713.57687-1-marcan@marcan.st> <20210215121713.57687-24-marcan@marcan.st> <20210215191748.uhus2e6gclkwgjo5@kozik-lap> From: Hector Martin Message-ID: Date: Tue, 16 Feb 2021 19:50:12 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Language: es-ES X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210216_055022_272045_B5CEE9FA X-CRM114-Status: GOOD ( 19.34 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Rob Herring , Arnd Bergmann , DTML , Tony Lindgren , Marc Zyngier , Linus Walleij , "linux-kernel@vger.kernel.org" , Alexander Graf , Olof Johansson , Mohamed Mediouni , Stan Skowronek , Will Deacon , Linux ARM , Mark Kettenis Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 16/02/2021 19.29, Arnd Bergmann wrote: > On Tue, Feb 16, 2021 at 11:20 AM Krzysztof Kozlowski wrote: >> >> On Tue, 16 Feb 2021 at 11:19, Arnd Bergmann wrote: >>>>> + return samsung_early_console_setup(device, opt); >>>> >>>> Don't you need to handle the error code - set PROT_DEFAULT() or whatever >>>> was there before? >>> >>> __set_fixmap() has no return value, it just writes a page table entry and >>> does not fail. >> >> I meant, handle samsung_early_console_setup() error code (NULL). > > Ah, I see. > > I don't think it makes a difference -- if ->setup() fails, the page table entry > is just left in place unused, and the type of the unused mapping doesn't > matter. If earlycon tried to unmap the page, the type also would not > change anything. > > With earlycon, I'd generally lean towards keeping things as simple as possible, > in order to increase the chance of seeing anything at all. It clearly wouldn't > hurt to try to add minimal error handling here. There's no logic to clean this up in earlycon itself anyway, so there's no point in trying to do it for the override. If another earlycon driver ends up getting instantiated for some reason, it will override the mapping with a normal one again. -- Hector Martin (marcan@marcan.st) Public Key: https://mrcn.st/pub _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel