Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp585911ybe; Wed, 11 Sep 2019 01:21:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqyiAsxbznf5EFqKrYKD6sFPPV6X8B6po1qAQHhRSi/2wQkd5xgpqD9uHoJGWO86xJpj4gqe X-Received: by 2002:a17:906:7621:: with SMTP id c1mr13044232ejn.39.1568190103356; Wed, 11 Sep 2019 01:21:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568190103; cv=none; d=google.com; s=arc-20160816; b=xa2Wyfu/cFNZX9z5Q5KlR/esf3REFRucl6T2Ln6HmHQPV2ziOBkOP3rsYcKueL64YJ KBGqpBRLL955F7fj4WOE3HRm6Fv1URCKJ8OaxYx+KyY6ixU577m+wqFsF31I2mIG2peD BxO8CXL62jWKW2FApBb2tQk1E86sIHewYE4/4DRdiqls7cVSIwwZPA3UK2zDmw2fmlqh a4uhl20Iac9fc7WbdQ/7fUv0PGM0Gh+Qm3MGoGNknqeeeRDxJMgTzIgETA3U5mtk28D1 346InlTq34HSd1Tir8NBniXOYZy4myoXmGtMSZvMJmZerJXP5XTH2nl3/OItd6uRu/WO FdjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=4123drVjT1SUnN5dOMkIBFNQBIbtPzK6GBM7KCHtoXI=; b=IAoTPDLIbV8tkOyxqVUUtJ0lXJZZycpjDq9cIm8Fb8lpSOiQWaT3czYmorwEuiP6jx kFxc7QfVos/wSYmvAXKW20aFumKbQvlniF5beFhSEhwPItQRP1Wd0yvcvyVUNEmPbBBx gVSPaZyswsYl7eHpEb9OJJqSxnFMGT3CYQLcHgY0FaUxN6oebr4SbI/WE9dbZzSED5kv ZTklLXFhfzKrgVCnlr5joWDdJL7anJ7QbzYCtPbIITTkmmS2mYk8W1z7AXY9s0GHiIxA VUwC8v1H1X/A7NcrqA37I4YP/mAHeJtKNtCVR81opv1dH/1zPvnZzx1x5X8Y6co3aoEa GcGw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l22si12183335edb.241.2019.09.11.01.21.18; Wed, 11 Sep 2019 01:21:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727152AbfIKIRM convert rfc822-to-8bit (ORCPT + 99 others); Wed, 11 Sep 2019 04:17:12 -0400 Received: from mail-qt1-f193.google.com ([209.85.160.193]:33616 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725924AbfIKIRL (ORCPT ); Wed, 11 Sep 2019 04:17:11 -0400 Received: by mail-qt1-f193.google.com with SMTP id r5so24249660qtd.0 for ; Wed, 11 Sep 2019 01:17:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=sSX4It+UYh+SclLrqRYTuJcNxBVNhdLE6sMCo8UKYag=; b=odps4wedpHvykTEEpCP7BgBlMXQhWcBKuQaJ/BZI/OtolWazZZSfRod1coAZN5Miyu 92qu3ihv5bzSPrT1+c14iAki4Tvm9jAMjXula/a7CbmV9mlkliNXNoiynrBuJC+Y8fcV /XiBssc2T/h4jNgnnqUoAUT6f6DF8IslUVuKpGoV6f51F/LNy2FdN6jPpL9/W2m3c+Co /lbEbeK2I0f8NRddzp1PsTWgY5Uhxm48Atflhyx6HJphd9DuHpUl6+HCYqSTDlxGAjOX ZYCLnSXXVR64c8Q5OyJccBJPrais8BRGi+SjWBPyjxtxJzKA8tspc4cMVSMlx3V3q3lN XWHA== X-Gm-Message-State: APjAAAWZaOByvphZ7rpqFMKSx+sEMGJmxRHi7/d/7k7pGU1QcGqcxUb3 LfvpnSRCeFRW2ufvhoFnyV2uspsPcK9BXYs0SFQ= X-Received: by 2002:ac8:342a:: with SMTP id u39mr33940011qtb.7.1568189830279; Wed, 11 Sep 2019 01:17:10 -0700 (PDT) MIME-Version: 1.0 References: <20190905054647.1235-1-james.tai@realtek.com> <43B123F21A8CFE44A9641C099E4196FFCF8DA1D0@RTITMBSVM04.realtek.com.tw> In-Reply-To: <43B123F21A8CFE44A9641C099E4196FFCF8DA1D0@RTITMBSVM04.realtek.com.tw> From: Arnd Bergmann Date: Wed, 11 Sep 2019 10:16:53 +0200 Message-ID: Subject: Re: [PATCH] ARM: Add support for Realtek SOC To: =?UTF-8?B?SmFtZXMgVGFpW+aItOW/l+WzsF0=?= Cc: "jamestai.sky@gmail.com" , Linux ARM , "linux-kernel@vger.kernel.org" , Russell King , Linus Walleij , Paul Burton , Masahiro Yamada , Mauro Carvalho Chehab , Mike Rapoport , Doug Anderson , Ard Biesheuvel , Benjamin Gaignard , Nick Desaulniers , Stefan Agner , Nicolas Pitre , Thierry Reding , "Jason A . Donenfeld" , Rob Herring , =?UTF-8?B?Q1lfSHVhbmdb6buD6Ymm5pmPXQ==?= , Phinex Hung , =?UTF-8?Q?Andreas_F=C3=A4rber?= , Lorenzo Pieralisi Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 11, 2019 at 9:46 AM James Tai[戴志峰] wrote: > > Subject: Re: [PATCH] ARM: Add support for Realtek SOC > > > @@ -148,6 +148,7 @@ endif > > > textofs-$(CONFIG_ARCH_MSM8X60) := 0x00208000 > > > textofs-$(CONFIG_ARCH_MSM8960) := 0x00208000 > > > textofs-$(CONFIG_ARCH_MESON) := 0x00208000 > > > +textofs-$(CONFIG_ARCH_REALTEK) := 0x00208000 > > > textofs-$(CONFIG_ARCH_AXXIA) := 0x00308000 > > > > Can you explain why this is needed for your platform? > > > We need to reserve memory (0x00000000 ~ 0x001B0000) for rom and boot code. Ok. > > > +config ARCH_RTD16XX > > > + bool "Enable support for RTD1619" > > > + depends on ARCH_REALTEK > > > + select ARM_GIC_V3 > > > + select ARM_PSCI > > > > As I understand, this chip uses a Cortex-A55. What is the reason for adding > > support only to the 32-bit ARM architecture rather than 64-bit? > > The RTD16XX platform also support the 64-bit ARM architecture. > I will add the 64-bit ARM architecture in new version patch. > > > Most 64-bit SoCs are only supported with arch/arm64, but generally speaking > > that is not a requirement. My rule of thumb is that on systems with 1GB of > > RAM or more, one would want to run a 64-bit kernel, while systems with less > > than that are better off with a 32-bit one, but that is clearly not the only reason > > for picking one over the other. > > > Support 32-bit ARM architecture is for application compatibility. Generally speaking, a 64-bit kernel should work better on 64-bit hardware even when you are running mostly 32-bit applications. However, you may have device drivers that do not correctly set compat_ioctl handlers. As I said, it's no problem to allow both, just explain this in the changelog text for the driver, along with the need for the textofs setting. > > It's very unusual to see custom smp operations on an ARMv8 system, as we > > normally use PSCI here. Can you explain what is going on here? Are you able to > > use a boot wrapper that implements these in psci instead? > > > The smp operations is porting form other Realtek platform. > > Currently, The RTD16XX platform can use the PSCI method. > I will add PSCI method in new version patch. Ok, perfect! > > > + timer_probe(); > > > + tick_setup_hrtimer_broadcast(); } > > > > What do you need tick_setup_hrtimer_broadcast() for? I don't see any other > > platform calling this. > > > I want to initialize the HR timer. I'm still unsure about this one. My feeling is that it should not be in the platform code, but I don't quite understand which hardware needs it. I see that Lorenzo Pieralisi added the same code to arm64 in commit 9358d755bd5c ("arm64: kernel: initialize broadcast hrtimer based clock event device"), but nothing ever calls it on 32-bit arch/arm even though the code does get built in to the kernel. My feeling is that either you don't really need it, or this is something that other platforms should really do as well, and it should be called from the generic time_init() function in arch/arm/kernel/time.c instead. Can you try to find out more of the background here, and then move the call to time_init() assuming it is indeed useful? Arnd