From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 806B0C4321A for ; Tue, 11 Jun 2019 08:16:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 54B9020652 for ; Tue, 11 Jun 2019 08:16:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404721AbfFKIQs (ORCPT ); Tue, 11 Jun 2019 04:16:48 -0400 Received: from foss.arm.com ([217.140.110.172]:54866 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404250AbfFKIQs (ORCPT ); Tue, 11 Jun 2019 04:16:48 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4372B337; Tue, 11 Jun 2019 01:16:47 -0700 (PDT) Received: from [10.1.29.141] (e121487-lin.cambridge.arm.com [10.1.29.141]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id EE1693F73C; Tue, 11 Jun 2019 01:16:44 -0700 (PDT) Subject: Re: [PATCH 15/15] riscv: add binfmt_flat support To: Christoph Hellwig , Greg Ungerer Cc: uclinux-h8-devel@lists.sourceforge.jp, linux-xtensa@linux-xtensa.org, Michal Simek , linux-c6x-dev@linux-c6x.org, linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-riscv@lists.infradead.org, linux-arm-kernel@lists.infradead.org References: <20190610212015.9157-1-hch@lst.de> <20190610212015.9157-16-hch@lst.de> From: Vladimir Murzin Message-ID: Date: Tue, 11 Jun 2019 09:16:43 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20190610212015.9157-16-hch@lst.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/10/19 10:20 PM, Christoph Hellwig wrote: > Use the generic support with arguments are on the stack. Same as arm > and m68k. Out of curiosity, what is reason for keeping arguments on the stack? ARM port of uClibc has following comment around manipulating of argv/argc: /* * uClinux/arm stacks look a little different from normal * MMU-full Linux/arm stacks (for no good reason) */ So I though it is kind of legacy. Thanks Vladimir > > Signed-off-by: Christoph Hellwig > --- > arch/riscv/Kconfig | 2 ++ > arch/riscv/include/asm/Kbuild | 1 + > 2 files changed, 3 insertions(+) > > diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig > index 0c4b12205632..2e3b60cdeef4 100644 > --- a/arch/riscv/Kconfig > +++ b/arch/riscv/Kconfig > @@ -17,7 +17,9 @@ config RISCV > select OF > select OF_EARLY_FLATTREE > select OF_IRQ > + select ARCH_HAS_BINFMT_FLAT > select ARCH_WANT_FRAME_POINTERS > + select BINFMT_FLAT_ARGVP_ENVP_ON_STACK > select CLONE_BACKWARDS > select COMMON_CLK > select GENERIC_CLOCKEVENTS > diff --git a/arch/riscv/include/asm/Kbuild b/arch/riscv/include/asm/Kbuild > index 5ee646619cc3..1efaeddf1e4b 100644 > --- a/arch/riscv/include/asm/Kbuild > +++ b/arch/riscv/include/asm/Kbuild > @@ -5,6 +5,7 @@ generic-y += compat.h > generic-y += device.h > generic-y += div64.h > generic-y += extable.h > +generic-y += flat.h > generic-y += dma.h > generic-y += dma-contiguous.h > generic-y += dma-mapping.h >