Received: by 10.223.164.202 with SMTP id h10csp4261231wrb; Wed, 29 Nov 2017 03:41:31 -0800 (PST) X-Google-Smtp-Source: AGs4zMa3wNwEmQbh8+AunzaCFpw+8602MWV2tuEAZpnth3a9AQTtq0/A/ZrTJxwH8pzWV10TpHWl X-Received: by 10.101.73.139 with SMTP id r11mr2521688pgs.411.1511955691669; Wed, 29 Nov 2017 03:41:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511955691; cv=none; d=google.com; s=arc-20160816; b=THHapImxFUd289OH9S1utM/QmmedXjS79TJbQ+IfBTPaCFIZ3prWY0dgUeegOCliPG hU2xG6SVpM4rIBeAZuOcRycci1E9rCCq1atl9saBwwh/2pSURt1C2wVPtLR0JVrWm80N wXOdbgro2kxhxiUiI/de550DfT6Y68RMIQgYcUQwoF4/0CPKNAmt7oOCiVAB6E+1AlG2 o/RTpSF5uK2qJdu8Dl3wqAUnGZLqrM9SVbIQdiGnQyhXeLj+EKJFLgFfLPhu2YifQSkV DSTlRL/not+VnCGd5Ofp1liGQm2Plz7M6Ph9/1IfHqIOSo+sHvxJ5e5oqwEmGfn80XUO w3MA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=KH6ROffKwHiqKT5wAIWkOHwKYqV7RCbHAvcDkAP3Pmk=; b=Gir1AwsfCka/6SBYSWZQxjlTHg2SjWXaERfCbhXl1chLRrfAiE4sHecAluxEOe4Kvy Vdi9wNw5z78JgEEzDsPahvtYtxxqeZ4QQNRTV8moUoGSr4tG1oD2pKujFN7MDrwgmGsw fUjE2gN/0tq2HGwEC1KLcWDcl+X6wzYuDYyusr3zkhDsb84FGuDuYGfh2VQFNbQhp6eX SHDaItfUKjpFZMQ8OAJRoKg7cPKwbPi2AvXIY+Ps39hG7yNsKDuoBRCMI2RISKXKk1ee mXCVSSkToYuG6wL5HrMlL6YQ4zXNbPMswIZNay22/1CvtMy1akW4Rx1JmQTAfGDYuBA+ Qufg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=cqHQBD7n; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d1si1129931pgn.564.2017.11.29.03.41.21; Wed, 29 Nov 2017 03:41:31 -0800 (PST) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=cqHQBD7n; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754647AbdK2Lkn (ORCPT + 70 others); Wed, 29 Nov 2017 06:40:43 -0500 Received: from mail-vk0-f66.google.com ([209.85.213.66]:42117 "EHLO mail-vk0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751496AbdK2Lkk (ORCPT ); Wed, 29 Nov 2017 06:40:40 -0500 Received: by mail-vk0-f66.google.com with SMTP id o70so976849vkc.9; Wed, 29 Nov 2017 03:40:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=KH6ROffKwHiqKT5wAIWkOHwKYqV7RCbHAvcDkAP3Pmk=; b=cqHQBD7nHOdrXMGKYsCvEmJtBqTu2W0AvdANOz1pUl1g8AxgxwqNN2RVgVfgoRG4lW ffWVCPY1LCtUuxw6ymyVANn3OxyYKunMaYjU1hkq4TeuptSRsRMWUed8lJevlOeMbwRB Wr+rbCK3jF7yNkSNrd7q0A/fAFdb7I5BEMt9G4bvnTrVgLN/V2N8yJRy0KsMR2UmIfeK pW7tmmU8axYiSI8cA+6J/K6nPloSuXR84LMi+QmPOrsckIrCnxVUGIrmA//2z8L3qO7t cgy/SkiuNV0rWWuV91o0Lo2CLZTvsk/Sc1a3xgbTGIIw3YvMHE9kAUZqhLTk7uVIUDhi r94w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=KH6ROffKwHiqKT5wAIWkOHwKYqV7RCbHAvcDkAP3Pmk=; b=JD/se8v+uccpxy6VywjNNW3MEx9jmbDQX4xdHal5jaMBg/5h0JYalCN3zkkNYvsO1w HC3WstXCCgFkC8TRfXxOH1XYFIZiWLxtSt5Y4hXQ6xXeTj8BBQWnfKyiloL48C22bNbh 8roMj0xyUPXLnX0D83u0COBAY0n739gjNqQ8cIOv+AmAMwT6Idz73Jd6G2XOEjmazBE8 ZrIlfFhj4562YlMmkGiwIEBgw9+Nzt+l2UTaI7xI8428yLQEbGIeCrVW2Jv7tIiY6Llr olB1roDfZgHPHZkLhAZDGXiLjjukHQUShLqXnHiTq/KFFBs2zJ7xlTi1xYEzOh7LzPQp nTXA== X-Gm-Message-State: AJaThX4WJ4LzNn2hVeeOtD8SqMqZcUuPatHsBmOenNJavXEaYzvVcPDR tg2XWA17Nai+tSPoYIecE2KUZENvafoKJ7h4g0U= X-Received: by 10.31.89.66 with SMTP id n63mr1868405vkb.188.1511955639063; Wed, 29 Nov 2017 03:40:39 -0800 (PST) MIME-Version: 1.0 Received: by 10.176.27.105 with HTTP; Wed, 29 Nov 2017 03:39:58 -0800 (PST) In-Reply-To: References: <5e1be9ebc591c6de79b75f726a5a38b2564eaa92.1511785528.git.green.hu@gmail.com> From: Greentime Hu Date: Wed, 29 Nov 2017 19:39:58 +0800 Message-ID: Subject: Re: [PATCH v2 25/35] nds32: Build infrastructure To: Arnd Bergmann Cc: Geert Uytterhoeven , Greentime , Linux Kernel Mailing List , linux-arch , Thomas Gleixner , Jason Cooper , Marc Zyngier , Rob Herring , Networking , Vincent Chen , DTML , Al Viro , David Howells , Will Deacon , Daniel Lezcano , "linux-serial@vger.kernel.org" , Vincent Chen Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2017-11-29 17:25 GMT+08:00 Arnd Bergmann : > On Wed, Nov 29, 2017 at 10:10 AM, Geert Uytterhoeven > wrote: >> Hi Arnd, >> >> On Wed, Nov 29, 2017 at 9:58 AM, Arnd Bergmann wrote: >>> On Wed, Nov 29, 2017 at 9:39 AM, Greentime Hu wrote: >>>> 2017-11-27 22:21 GMT+08:00 Arnd Bergmann : >>>>> On Mon, Nov 27, 2017 at 1:28 PM, Greentime Hu wrote: >>>>>> diff --git a/arch/nds32/Kconfig.cpu b/arch/nds32/Kconfig.cpu >>>>>> +config CPU_CACHE_NONALIASING >>>>>> + bool "Non-aliasing cache" >>>>>> + help >>>>>> + If this CPU is using VIPT data cache and its cache way size is larger >>>>>> + than page size, say N. If it is using PIPT data cache, say Y. >>>>>> + >>>>>> + If unsure, say Y. >>>>> >>>>> Can you determine this from the CPU type? >>>> >>>> There is no cpu register to determine it. It also depeneds on page >>>> size and way size however page size is configurable by software. >>>> These codes are determined at compile time will be benefit to code >>>> size and performance. >>>> IMHO, I think it would be better to be determined here. >>> >>> I meant determining it at compile time from other Kconfig symbols, >>> if that's possible. Do the CPU cores each have a fixed way-size? >>> If they do, it could be done like >>> >>> menu "CPU selection" >>> >>> config CPU_N15 >>> bool "AndesCore N15" >>> select CPU_CACHE_NONALIASING >>> >>> config CPU_N13 >>> bool "AndesCore N15" >>> select CPU_CACHE_NONALIASING if PAGE_SIZE_16K >>> >>> ... >>> >>> endmenu >>> >>> and then you can use the same CPU_... symbols to make other decisions >>> as well, e.g. CPU specific compiler optimizations. >> >> Do you want to support multiple CPU types in a single kernel image >> (I see no "choice" statement above)? >> If yes, you may have a mix of aliasing and non-aliasing caches, so >> you may want to invert the logic, and select CPU_CACHE_ALIASING >> instead. > > Right, my mistake. > Thanks to Arnd and Geert! How about this? choice prompt "CPU type" default CPU_N13 config CPU_N15 bool "AndesCore N15" select CPU_CACHE_NONALIASING config CPU_N13 bool "AndesCore N13" select CPU_CACHE_NONALIASING if ANDES_PAGE_SIZE_8KB config CPU_N10 bool "AndesCore N10" select CPU_CACHE_NONALIASING if ANDES_PAGE_SIZE_8KB config CPU_D15 bool "AndesCore D15" select CPU_CACHE_NONALIASING select HWZOL config CPU_D10 bool "AndesCore D10" select CPU_CACHE_NONALIASING if ANDES_PAGE_SIZE_8KB endchoice From 1585392002502777739@xxx Wed Nov 29 09:27:14 +0000 2017 X-GM-THRID: 1585224361841060243 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread