From patchwork Mon Apr 15 09:14:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 10900365 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 37AC014DB for ; Mon, 15 Apr 2019 09:15:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 18C7F285B7 for ; Mon, 15 Apr 2019 09:15:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0CC1228619; Mon, 15 Apr 2019 09:15:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B3F04285B7 for ; Mon, 15 Apr 2019 09:15:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=GvevUyOn+3GfEVzAI1mheJZXe84O9KiJov4bpYE3T14=; b=WlJgniLaMP/kpM 9RW7dx2b0c/NTrxMiLP7yhw0uOxyH0timd+TFWMV90n71JVJlRDIyeeXDmf5Ng/W+T230acugHbJR cLilnnJW8kz8yoI9qRbs4+Jfy7ULoSBK9v9JYtXVzrPrzRq3zahi9iyyM5XsdoS1dxdYc2GCSDf89 PGYsmIoT4XDFaZf46O2z7ojl5bnSE1RFX0oRJFBj+J4h/xV/fWkjHKSiBIBYKuHfiYRAOZwu4ZfVO wF9bO8h4xel982131d6dDYxnO9hNlk8ViuH+0TkGimo6+WxqF2BMrIpRvSMnwKFCbqzLIk6JvgxgK 1B2ZmGdI4UcD8ESEEtIw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hFxhu-0006Rl-UB; Mon, 15 Apr 2019 09:15:18 +0000 Received: from 213-225-15-255.nat.highway.a1.net ([213.225.15.255] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1hFxhs-0006OM-54; Mon, 15 Apr 2019 09:15:16 +0000 From: Christoph Hellwig To: Palmer Dabbelt Subject: [PATCH 03/11] riscv: remove unreachable big endian code Date: Mon, 15 Apr 2019 11:14:34 +0200 Message-Id: <20190415091442.19945-4-hch@lst.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190415091442.19945-1-hch@lst.de> References: <20190415091442.19945-1-hch@lst.de> MIME-Version: 1.0 X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nick Kossifidis , Atish Patra , linux-riscv@lists.infradead.org Sender: "linux-riscv" Errors-To: linux-riscv-bounces+patchwork-linux-riscv=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP RISC-V is always little endian. Signed-off-by: Christoph Hellwig --- arch/riscv/include/asm/elf.h | 6 ------ arch/riscv/include/asm/uaccess.h | 9 +-------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/arch/riscv/include/asm/elf.h b/arch/riscv/include/asm/elf.h index 697fc23b0d5a..ce0cd7d77eb0 100644 --- a/arch/riscv/include/asm/elf.h +++ b/arch/riscv/include/asm/elf.h @@ -27,13 +27,7 @@ #define ELF_CLASS ELFCLASS32 #endif -#if defined(__LITTLE_ENDIAN) #define ELF_DATA ELFDATA2LSB -#elif defined(__BIG_ENDIAN) -#define ELF_DATA ELFDATA2MSB -#else -#error "Unknown endianness" -#endif /* * This is used to ensure we don't load something for the wrong architecture. diff --git a/arch/riscv/include/asm/uaccess.h b/arch/riscv/include/asm/uaccess.h index c51fc8bfbdde..b26f407be5c8 100644 --- a/arch/riscv/include/asm/uaccess.h +++ b/arch/riscv/include/asm/uaccess.h @@ -101,15 +101,8 @@ static inline int __access_ok(unsigned long addr, unsigned long size) * on our cache or tlb entries. */ -#if defined(__LITTLE_ENDIAN) -#define __MSW 1 #define __LSW 0 -#elif defined(__BIG_ENDIAN) -#define __MSW 0 -#define __LSW 1 -#else -#error "Unknown endianness" -#endif +#define __MSW 1 /* * The "__xxx" versions of the user access functions do not verify the address