Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7828088imu; Thu, 15 Nov 2018 02:07:02 -0800 (PST) X-Google-Smtp-Source: AJdET5eFsP/EjaBre0aoEsHr/x/LjSZDtSZJBU7ACxE21+tbfCgWve3MuH2MfyzXqEocNJJO5uCh X-Received: by 2002:a62:2e46:: with SMTP id u67-v6mr5764281pfu.236.1542276422392; Thu, 15 Nov 2018 02:07:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542276422; cv=none; d=google.com; s=arc-20160816; b=nWKL5qmWQMaidJ4jnWry9gFzaXurOxyzIfTUC0zdc0dCNDnq2gK0L+Y+rFxArm2OER 1ALdxEiMyNcKSlU14lYV/rBbbTIxnSniZnPSenrbfWF1mN38UKJ7G84HGqO2UpoayHb5 zB+dxzPQTgR2g0eUzkEu7k66pDxS1ZiWu8gU7y5Iz0Jm9jlRIuUfQXkiUzfYq+x4T/vR BJQ+dPgRgNrJcyocbjFt78CMSVmAdp3WrZs+r/T82RhoxWu5K/nyvG7TvMfpCMHklb7H REBreOS4AoHzQigjJRi7sgGuQpMEiJt2Sl+e7bsXsFohtMP7dFVNijHDwZS9W9NkksJH PZLg== 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 :in-reply-to:references:mime-version:dkim-signature; bh=1O5QeBXNTKJsnfH4yuc6B/0oPJM0+rcTyrA4hnHLMJ4=; b=rXLXIGOBskc04quicJQngYXpCUWoeqQurMYfrfLkJnMn7WIaq1sMtAiTVxHFdJE9cr k8lSN5m6L42tK4CCBE35B/IojlZKqWUZR36f40rbQVS2z34HmnZ0pO5r92yFm00O68SJ 29Nti5NBA7g6Q/58NSyS4g9sTEitd33H1DoUij+X7OyhTScsX/WG/IkfzOWeTjDdWCrs 8bTTOJ1zEDbc8URx37QMAdxZ16oNXAl1jkvsglJ2jvqFlQ4IAl/9OjJPqXJeqWwPrRNZ ID6e3uB4uw3qzW9eKeEZm4KgS4PelU+HNYUcduqRbt76uj7njqP7ibawwqQCXWzd5GZQ F2xQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HBkAJeoJ; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e189si7353152pfc.202.2018.11.15.02.06.41; Thu, 15 Nov 2018 02:07:02 -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=@linaro.org header.s=google header.b=HBkAJeoJ; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387487AbeKOUMp (ORCPT + 99 others); Thu, 15 Nov 2018 15:12:45 -0500 Received: from mail-it1-f196.google.com ([209.85.166.196]:38344 "EHLO mail-it1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729083AbeKOUMo (ORCPT ); Thu, 15 Nov 2018 15:12:44 -0500 Received: by mail-it1-f196.google.com with SMTP id k141-v6so28423899itk.3 for ; Thu, 15 Nov 2018 02:05:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1O5QeBXNTKJsnfH4yuc6B/0oPJM0+rcTyrA4hnHLMJ4=; b=HBkAJeoJwfE9BzYgivF5GViHshYLx8/aeNv/x0tqg2G4mWGYAY3j52wj9ZvWOZchan QkBegBhLRbPlNaDuxRR/UXURr7KlaGE094UmZqO+5som4DauFq2flFkjBR6gRiVw4NFi 3w/jerH/ejrXBoHivlhwtHSMOcMlsB7bs5v1w= 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; bh=1O5QeBXNTKJsnfH4yuc6B/0oPJM0+rcTyrA4hnHLMJ4=; b=hq2yP7Wv5YNDfqO2FqZe++HOmYtLIx2fxXFwnOczw5rbbFObmU1nvQwISdcNdWJJtn NpbmJfJnrO4MraolT0EICYIObqBbQbqN0eYYStnrYAMEJnkgyNrWhBhP4qHVts0in9XB Ky0WPHMeCNQCb5a8H2w0aHhwbDgH0ncksnkHx51xvMWYs5fIaTHsqkcxQuFr71B8WZsa HiDdXHK39HGxaf2vHXthR1Tj7fMmVjr9qMopzclrtdSYT8Fpil+RRuUkmhTbNOYiLPcR J4YFugw0xi7mJwqoH9NyG9j+IzuYAyeFpolO1AQd8Dz4VKmzXOY9Xn7nXAPeJOg9kSkE BjEQ== X-Gm-Message-State: AA+aEWbcypx2oXFmU15k3P0vEAun/7khr2nuwvrxrwUXcq1ywgiWjRzE 7KDgy5oQXr658MTQs9fFI7B7htJ2/4OonFKAuM7SKFIzlaw= X-Received: by 2002:a24:b009:: with SMTP id d9-v6mr4929034itf.166.1542276334446; Thu, 15 Nov 2018 02:05:34 -0800 (PST) MIME-Version: 1.0 References: <1542104370-22831-1-git-send-email-firoz.khan@linaro.org> <1542104370-22831-2-git-send-email-firoz.khan@linaro.org> In-Reply-To: From: Firoz Khan Date: Thu, 15 Nov 2018 15:35:23 +0530 Message-ID: Subject: Re: [PATCH v2 1/3] xtensa: add __NR_syscalls along with __NR_syscall_count To: Max Filippov Cc: Chris Zankel , linux-xtensa@linux-xtensa.org, Greg Kroah-Hartman , Philippe Ombredanne , Thomas Gleixner , Kate Stewart , y2038 Mailman List , Linux Kernel Mailing List , Linux-Arch , Arnd Bergmann , Deepa Dinamani , Marcin Juszkiewicz 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 Hi Max, On Wed, 14 Nov 2018 at 05:19, Max Filippov wrote: > > Hi Firoz, > > I have one more question: > > On Tue, Nov 13, 2018 at 2:20 AM Firoz Khan wrote: > > The 2nd option will be the recommended one. For that, I > > added the __NR_syscalls macro in uapi/asm/unistd.h along > > with __NR_syscall_count asm/unistd.h. The macro __NR_sys- > > calls also added for making the name convention same across > > all architecture. While __NR_syscalls isn't strictly part > > of the uapi, having it as part of the generated header to > > simplifies the implementation. We also need to enclose > > this macro with #ifdef __KERNEL__ to avoid side effects. > > Looking at the include/uapi/asm-generic/unistd.h I see that > __NR_syscalls is not guarded by the #ifdef __KERNEL__, > why should it be guarded for xtensa? __NR_syscalls for kernel. So this macro is present in asm/unistd.h rather than uapi/asm/unistd.h. As I mentioned in the patch, it would be better to keep in uapi/asm/unistd.h to count the number of syscalls. But this will create some side effect. So I was guarded with __KERNEL__. In order to come up with common implementation, I kept this for all architecture. > > If we remove __NR_syscall_count from the uapi header I'd > suggest dropping it completely and switching its two current > users to __NR_syscalls. I'm not removing the __NR_syscall_count macro; just place it in asm/unistd.h file for the above reason. FYI, I made sure that the kernel will build with my patch. I would appreciate if you can perform the boot test on the actual platform. Thanks Firoz > > -- > Thanks. > -- Max