Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp5588213pxb; Tue, 16 Feb 2021 02:21:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJyvkyN+qUH4C6AU8V4JaBN+ugAHgD8qW0zCs3VpcoYVwxCG8ofrnOpeVFuIWu52nOvMKKNG X-Received: by 2002:a05:6402:c15:: with SMTP id co21mr2367709edb.115.1613470916300; Tue, 16 Feb 2021 02:21:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613470916; cv=none; d=google.com; s=arc-20160816; b=xerL304Z8SehJUaDphVNxKeYZIry40NXQJFITiZ0GsJ5xH6tyNU4oviGio4YkVDA4C Mgn6zqkGRRikPUVypF8uyxrhN+f3TyxVubpvzB9zlwrY31Ij5FCKf7M/BVWctBGRCvtF 87KAW80WT1R9n4YF5nrqrtMtOLiquEWe/iC/9eiKd5Wkdc80eMqTsBxxb24V0NfXMZka y67IthhQukbkHgSAeyRfSXiJ26HiLY5E4yN75M/T7A3p1iD2KPFGXuJOm2fZPKRJxFvh m5nOkafK9bhIJJAnVO6eTbGj6/gM0o+1N/ip1jXTrb99vKCuiqqVW60rWS4Ea2Jpe9uF 6UmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=ANDl43g0b57jfhaxia2z3uOgqJ9dvHPtdbzUnyd+aGk=; b=dCeGur1Li7n2hoUn/qWg8mtKQwaA3ozydH6vF0rcHcIgmQfLG0OmQz/B6xZ/8QeWLl zGZwABJJjJtJWA/y14f8HWvCYcBmd9UxTOj5AFU9/09ipXLn09D9WkARn6a46ypiCfds YMFVLVTFLWr3F2zktFn7hNFR91IOAp7qfHoAjAZrBgPgYjNAo7kh1kMZ59xfXeQnuF67 65pwnOTVvJuyYiwIF3aaci3+tKUH06o3qmVFSgbtAdzXP4Ib0QsB+hJikIftRynaY5oC 2eFTqMYHaW0fjQW4jnwWiS2Y6tdahQHiGqthQ/HWM63ZiKLaXaofTxb/eh2cLVkWPsll CGhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rh+goMEe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p2si4792746eds.51.2021.02.16.02.21.33; Tue, 16 Feb 2021 02:21:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rh+goMEe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229864AbhBPKT7 (ORCPT + 99 others); Tue, 16 Feb 2021 05:19:59 -0500 Received: from mail.kernel.org ([198.145.29.99]:56818 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229717AbhBPKTy (ORCPT ); Tue, 16 Feb 2021 05:19:54 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4744164DE0; Tue, 16 Feb 2021 10:19:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1613470753; bh=eY3mTlj51VDYTzN/HdqXV4UVbM576klVPmjNaB7BtAE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=rh+goMEe6guEquXfbwF4p/banP+VlKviFUn9KeZpAkmv8y3GfNI82iVu6B1a0WUIE yJXvBuYad7dsukXs4KvDRmvXIVsDfZ2sejfXfi6+ftkhGMG4DMhIPUAwPqwRBZRAJi ebWB2ntvXZXlfawafzxB6dth2N7fvOd1RLc4p1UBmcX9mAw4yMy5Ti60xRd+kESDKV eTOKRF3HYietQXaMe4/gAyeyoGuZ+sYPvKg1bvfg1nKDEURdM8dHeMcmbLM+Ee+dLY u+/8w2/vM+CRK1ouUKeGOsAmYKxkQifPC9ZSdDVRPnP9JZsMRdP2eCXEpyVlHJkDHn ugTurxEvzFh5g== Received: by mail-ot1-f43.google.com with SMTP id q4so8538998otm.9; Tue, 16 Feb 2021 02:19:13 -0800 (PST) X-Gm-Message-State: AOAM533Cw8RUVddswmW23uki/i7swCFFjVZ4QejdSv+x+ih+PvJNQr2Q sxno6rzhQQ0TSYvEb1DkUz+NULfZ2ORh9g9VzQk= X-Received: by 2002:a9d:6c11:: with SMTP id f17mr14202610otq.210.1613470752538; Tue, 16 Feb 2021 02:19:12 -0800 (PST) MIME-Version: 1.0 References: <20210215121713.57687-1-marcan@marcan.st> <20210215121713.57687-24-marcan@marcan.st> <20210215191748.uhus2e6gclkwgjo5@kozik-lap> In-Reply-To: <20210215191748.uhus2e6gclkwgjo5@kozik-lap> From: Arnd Bergmann Date: Tue, 16 Feb 2021 11:18:56 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 23/25] tty: serial: samsung_tty: Add earlycon support for Apple UARTs To: Krzysztof Kozlowski Cc: Hector Martin , 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 Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 15, 2021 at 8:19 PM Krzysztof Kozlowski wrote: > On Mon, Feb 15, 2021 at 09:17:11PM +0900, Hector Martin wrote: > > + > > +/* Apple S5L */ > > +static int __init apple_s5l_early_console_setup(struct earlycon_device *device, > > + const char *opt) > > +{ > > + /* Close enough to S3C2410 for earlycon... */ > > + device->port.private_data = &s3c2410_early_console_data; > > + > > +#ifdef CONFIG_ARM64 > > if IS_ENABLED() > (unless it cannot be used due to missing symbol?) > > > + /* ... but we need to override the existing fixmap entry as nGnRnE */ > > + __set_fixmap(FIX_EARLYCON_MEM_BASE, device->port.mapbase, > > + __pgprot(PROT_DEVICE_nGnRnE)); > > +#endif It has to be a preprocessor conditional because PROT_DEVICE_nGnRnE is only defined on arm64. We could add a FIXMAP_PAGE_NONPOSTED alias for it that defaults to FIXMAP_PAGE_IO, but in the end this is really an architecture specific thing and I think leaving it guarded by the architecture is appropriate. > > + 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. Arnd