Received: by 10.223.164.202 with SMTP id h10csp58299wrb; Thu, 9 Nov 2017 02:42:52 -0800 (PST) X-Google-Smtp-Source: ABhQp+Tf10d5icFQgik4wrTebPd6JQHC/poYFY/8GfGCtnKSDG0ek3Lw5SDI6kiI/KBTZ+exA6Vf X-Received: by 10.98.3.7 with SMTP id 7mr37115pfd.160.1510224172701; Thu, 09 Nov 2017 02:42:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510224172; cv=none; d=google.com; s=arc-20160816; b=VvOsa1F+oYzpKqwFMg38sT0FGAIYXJP92lWRQuQ1kV3aat3e3cHh603XvmhNFOzePa dHsesa+HPGMPpeZuEx9+WAdO5mZVTJ/KPTTsUpiJnYlexx5IHztbEv9exbEHk9uixNiS 054ntVL2ypn8ysFrg0xerCpnmMEWL378OZGwnl6P4LoIkDI26DwmXceXVQDi3COR41iA iEtDZij4dVtsMXWKOxAGZ/HYzYbYxOY9ZZUmjh8R4cP38jwJMvIdVzsglzizqfGOWEg5 p/DNhnHADiGcaOm/kkabaoe5cCMeYzCx/K3w8Oo2dVvMwXlwPc2T9tjKgRlpEqXVCEzz ylhw== 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 :mime-version:dkim-signature:arc-authentication-results; bh=QOv91P2saLwlI7mi9rt/emkyGmkxxVm3Qk7UJIItEBE=; b=ktyFgjTvyx9fO1vW+kzSghz3qApJDfKnPc5IPdgTTBg/MuMgDuTlwXl9RklBtHJanC EDoBTHlM2nKeXapS4nB9y4g1aHC7DJDwG4qrwuWUyEpBcmewPhLHJyGNEVVFrLznzwAy h8Dhu7vUodI02aXLoIc6PhdPzN8M4SyG3iOfShvKqGGI3bfDzkpX+RzwSG+9HfEmbEv4 rsLP7Tx4SLQY95DYUiyw2Upv2yqT/hgIUHkP3LHx9rvCOCpqtKXdrS7XWZ5IIFC3NPHE GK1XUWQH7jQBq9zpMKJgeB0VhsXnQwqKUsTim9Yup71ghHg5lckTWhKJsOlWTATAi7p+ ITJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=NVu/AjYd; 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 x23si5986471pgc.683.2017.11.09.02.42.41; Thu, 09 Nov 2017 02:42:52 -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=NVu/AjYd; 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 S1752686AbdKIKmE (ORCPT + 81 others); Thu, 9 Nov 2017 05:42:04 -0500 Received: from mail-it0-f48.google.com ([209.85.214.48]:51758 "EHLO mail-it0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751020AbdKIKmB (ORCPT ); Thu, 9 Nov 2017 05:42:01 -0500 Received: by mail-it0-f48.google.com with SMTP id o135so10216974itb.0; Thu, 09 Nov 2017 02:42:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=QOv91P2saLwlI7mi9rt/emkyGmkxxVm3Qk7UJIItEBE=; b=NVu/AjYdEgCgN4Sye6WyUXDPXZBEBizfNquQ3/KhEU5iVP/N7eEgmp35F7J0w4xdrq stCgEYXzYJw1gvEU3Q+cNcJVCOsui0zFk2+VGfqL9TnvrveKeaMtLg4DRXtbzYZFvRtS 9kJenS0U+fjmGg/rw3URMT/aKTYCumdK6qqIiVVO6lk1wbYjlrRnQGanhdY3LiUKPkdJ u7P01xFoTgd6b0mtgcL4zQ4rW+dlGAYFLaYzW5xKOMPjCn2l6KVcMV918lURDOJtfiDD WnsByvf1LF4h351Vdz7vRj8CFH5eGryiRfNuLQu27IZAaPwB2Oe40JPWU7DDOBCLfGmx JZbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=QOv91P2saLwlI7mi9rt/emkyGmkxxVm3Qk7UJIItEBE=; b=OYgTd+yL91w00y+MCqaHv7cyJXxBgOnFVAMtCg9w+dTUJQRXrnlKdWA4WbQshJTm3E flue1r2DmpP3TXh7Q9soubwxnPLzbLtNXaOrm9rYg7aAlwpTZvwYDvobj2V6s6j6qgJI b2ZK3TMVAVWnDGP8jiSg+Grkn04XWPLbkkVbxgNVnNh2ZKncQtgUItLZ2khCpc8NWUFo TDNYcxShsiCKcpwbL+4IpuewnoYoEa/RNEgsxhiMtq8p3GyFcX7x650G+/yBniIp/ve8 RytQdnmuG6dyJ8G4W1F1c9E2pe5/1nH+DvVXoNkLUFYc9t8TPH+NPm9bZ40IiNmETXr4 aKPA== X-Gm-Message-State: AJaThX4jpFdv0IFIlLIrKx5+xKc5yTZvApxUGcAdbnn5aoidEXx/xOBw dzwm5DbBmfSZsTDeG5fRX6lZn3EGaLIBsK8DnSc= X-Received: by 10.36.88.72 with SMTP id f69mr5127itb.129.1510224121281; Thu, 09 Nov 2017 02:42:01 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.62.213 with HTTP; Thu, 9 Nov 2017 02:42:00 -0800 (PST) From: Vincent Chen Date: Thu, 9 Nov 2017 18:42:00 +0800 Message-ID: Subject: Re: FW: [PATCH 24/31] nds32: Miscellaneous header files To: arndbergmann@gmail.com Cc: greentime@andestech.com, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, tglx@linutronix.de, jason@lakedaemon.net, marc.zyngier@arm.com, robh+dt@kernel.org, netdev@vger.kernel.org, green.hu@gmail.com 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 >>On Wed, Nov 8, 2017 at 6:55 AM, Greentime Hu wrote: >> + >> +static inline void __delay(unsigned long loops) { >> + __asm__ __volatile__(".align 2\n" >> + "1:\n" >> + "\taddi\t%0, %0, -1\n" >> + "\tbgtz\t%0, 1b\n" >> + :"=r"(loops) >> + :"0"(loops)); } > > Does the architecture define a high-resolution clock source? If yes, then it's better to use that to get exact timing than to rely on the loop calibration. > Dear Arnd: Thanks. I will modify it in the next version patch. >> +/* >> + * This file is generally used by user-level software, so you need to >> + * be a little careful about namespace pollution etc. Also, we >> +cannot >> + * assume GCC is being used. >> + */ >> + >> +typedef unsigned short __kernel_mode_t; #define __kernel_mode_t >> +__kernel_mode_t >> + >> +typedef unsigned short __kernel_ipc_pid_t; #define __kernel_ipc_pid_t >> +__kernel_ipc_pid_t >> + >> +typedef unsigned short __kernel_uid_t; typedef unsigned short >> +__kernel_gid_t; #define __kernel_uid_t __kernel_uid_t >> + >> +typedef unsigned short __kernel_old_dev_t; #define __kernel_old_dev_t >> +__kernel_old_dev_t >> + >> +#include > > I don't understand why you would want to override any of those. > Changing them unfortunately means rebuilding all of your user space, but I think it would be better to do that now than to suffer from this later on. > > Arnd Thanks. I will remove them in the next version patch. Best regards Vincent From 1583491445910248303@xxx Wed Nov 08 09:58:42 +0000 2017 X-GM-THRID: 1583483462231450888 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread