From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: Re: [PATCH V4 00/27] C-SKY(csky) Linux Kernel Port Date: Mon, 24 Sep 2018 10:47:09 +0200 Message-ID: References: <20180914143719.GA27689@guoren-Inspiron-7460> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Geert Uytterhoeven Cc: Palmer Dabbelt , Guo Ren , linux-arch , Linux Kernel Mailing List , Thomas Gleixner , Daniel Lezcano , Jason Cooper , DTML , andrea.parri@amarulasolutions.com, Peter Zijlstra , c-sky_gcc_upstream@c-sky.com, gnu-csky@mentor.com, Thomas Petazzoni , wbx@uclibc-ng.org, Greentime Hu , Stephen Rothwell List-Id: linux-arch.vger.kernel.org On Mon, Sep 24, 2018 at 9:21 AM Geert Uytterhoeven wrote: > > Hi Arnd, > > On Fri, Sep 21, 2018 at 7:19 AM Arnd Bergmann wrote: > > On Thu, Sep 20, 2018 at 10:52 AM Palmer Dabbelt wrote: > > > On Fri, 14 Sep 2018 07:37:20 PDT (-0700), ren_guo@c-sky.com wrote: > > > > On Wed, Sep 12, 2018 at 04:30:36PM +0200, Arnd Bergmann wrote: > > > >> On Wed, Sep 12, 2018 at 3:25 PM Guo Ren wrote: > > My plan was to get that all into 4.20, and then have a conversation about the > > actual syscall table changes in 4.21. If we need it for both csky and rv32, > > we might just change the generic syscall table that way in 4.21 without > > changing all the other ones along with them. I don't want to drag things out > > over too many merge windows though, and my plan was to do all architectures > > together to simplify the version checks in the libc code to only have to check > > for a single version. > > What happens with the version checks if it is backported to stable? They end up as dead code. The way these version checks are done in glibc, we always try the new interface first before falling back to the old version, but don't check the kernel version at runtime. The compile-time check optimizes out the fallback if glibc is built for a recent-enough minimum kernel version that is guaranteed to have the new version. Arnd From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt1-f193.google.com ([209.85.160.193]:39403 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727525AbeIXOs0 (ORCPT ); Mon, 24 Sep 2018 10:48:26 -0400 MIME-Version: 1.0 References: <20180914143719.GA27689@guoren-Inspiron-7460> In-Reply-To: From: Arnd Bergmann Date: Mon, 24 Sep 2018 10:47:09 +0200 Message-ID: Subject: Re: [PATCH V4 00/27] C-SKY(csky) Linux Kernel Port Content-Type: text/plain; charset="UTF-8" Sender: linux-arch-owner@vger.kernel.org List-ID: To: Geert Uytterhoeven Cc: Palmer Dabbelt , Guo Ren , linux-arch , Linux Kernel Mailing List , Thomas Gleixner , Daniel Lezcano , Jason Cooper , DTML , andrea.parri@amarulasolutions.com, Peter Zijlstra , c-sky_gcc_upstream@c-sky.com, gnu-csky@mentor.com, Thomas Petazzoni , wbx@uclibc-ng.org, Greentime Hu , Stephen Rothwell Message-ID: <20180924084709.2FdRfYnKXyZ5r4QHuPIlE8F-eWiCiBE8dG8r2--QEHE@z> On Mon, Sep 24, 2018 at 9:21 AM Geert Uytterhoeven wrote: > > Hi Arnd, > > On Fri, Sep 21, 2018 at 7:19 AM Arnd Bergmann wrote: > > On Thu, Sep 20, 2018 at 10:52 AM Palmer Dabbelt wrote: > > > On Fri, 14 Sep 2018 07:37:20 PDT (-0700), ren_guo@c-sky.com wrote: > > > > On Wed, Sep 12, 2018 at 04:30:36PM +0200, Arnd Bergmann wrote: > > > >> On Wed, Sep 12, 2018 at 3:25 PM Guo Ren wrote: > > My plan was to get that all into 4.20, and then have a conversation about the > > actual syscall table changes in 4.21. If we need it for both csky and rv32, > > we might just change the generic syscall table that way in 4.21 without > > changing all the other ones along with them. I don't want to drag things out > > over too many merge windows though, and my plan was to do all architectures > > together to simplify the version checks in the libc code to only have to check > > for a single version. > > What happens with the version checks if it is backported to stable? They end up as dead code. The way these version checks are done in glibc, we always try the new interface first before falling back to the old version, but don't check the kernel version at runtime. The compile-time check optimizes out the fallback if glibc is built for a recent-enough minimum kernel version that is guaranteed to have the new version. Arnd