From patchwork Thu Sep 20 20:42:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Brodkin X-Patchwork-Id: 972713 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=synopsys.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="DGV2Fx0u"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=synopsys.com header.i=@synopsys.com header.b="ijnHRgy5"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42GTFs1TYpz9s8T for ; Fri, 21 Sep 2018 06:43:13 +1000 (AEST) 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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=/45w2hGGFJPt+sP9V3uM2g9lKwu+UQhd0/D7eyB8s04=; b=DGV2Fx0uJUFCk5xSkfHQuvNVPP gB5dO7rkfo5rkxd4KyJ6O/+omA/Ikd3Sqcdrb6ZRVdG9yY4Ln5AzAho2TOHj/TLOVVoOYDojNweHF BdzORYAtUFwX87TafwvU1LbqcX/+vaHjjcZi87kuWLWu9oW76N7Wj7e/ydaVeeWR7vKDbcg6MWyjK DnUT9E0C8C7Z27HE3ESezDo+ONiSgYCv8YPXGTAg/hlVOTmeYIGTjnzHinvVN+45M9vuGL4dWS9Oo DqY07MpSR3yhyqJDJ+9s51GF2CCQsMfH85SOvPD7JLqvyGQsvZbuIe9saG3t0lpqyxHa3/4Mk7F2Z jOEl3z9g==; 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 1g35n2-0003nz-RH; Thu, 20 Sep 2018 20:43:08 +0000 Received: from smtprelay4.synopsys.com ([198.182.47.9] helo=smtprelay.synopsys.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g35mr-0003jO-Ba for linux-snps-arc@lists.infradead.org; Thu, 20 Sep 2018 20:43:03 +0000 Received: from mailhost.synopsys.com (mailhost3.synopsys.com [10.12.238.238]) by smtprelay.synopsys.com (Postfix) with ESMTP id 5125E24E0D54; Thu, 20 Sep 2018 13:42:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1537476171; bh=VmsEIUWBVRJ7xtuVpHRSecePqTxcASnMtovZztbIB/g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ijnHRgy5GoqDyfwvq3bP7C4VpuGt5LA5PEtx/HlxKLOgQ+PUcAWmf49Z9LUXB2Kuj TYGLqeDNHKuQ/+NHa+hvDln/aeXgQshC32p34JlLV2B7bxgReoS032EUMkRkIattw3 NIti46V4KnGfODwwooxAILX84iMrGcaIwQNCo/dSdbvFcYbEPtJ6a+Fp6semaNbBxh yVFgnMvZx3MFWaryvp3nE8aE0PGKxnUXgpyWERnmnnuTVRE+yx/G/f7sXaVcbG9ff/ EhdSTkQzAYI7BDBN8PosmzazBDb88M0VZQTJuAzW5vVLL8ZcA8MVKY2605H0qsXNaF AjOutPOkMXQAg== Received: from ru20arcgnu1.internal.synopsys.com (ru20arcgnu1.internal.synopsys.com [10.121.9.48]) by mailhost.synopsys.com (Postfix) with ESMTP id A23ED3AB4; Thu, 20 Sep 2018 13:42:49 -0700 (PDT) From: Alexey Brodkin To: openembedded-core@lists.openembedded.org Subject: [PATCH v2 4/9] nspr: Add ARC support Date: Thu, 20 Sep 2018 23:42:27 +0300 Message-Id: <20180920204232.10583-5-abrodkin@synopsys.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180920204232.10583-1-abrodkin@synopsys.com> References: <20180920204232.10583-1-abrodkin@synopsys.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180920_134257_444178_2AB9B22B X-CRM114-Status: GOOD ( 12.66 ) X-Spam-Score: -0.1 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [198.182.47.9 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Antoine Tenart , linux-snps-arc@lists.infradead.org, Alexey Brodkin , Khem Raj MIME-Version: 1.0 Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Antoine Tenart [Alexey: Rebased on top of other patches like RiscV, NIOS2 etc] Signed-off-by: Antoine Tenart Signed-off-by: Alexey Brodkin --- Changes v1 -> v2: * Added upstream status .../nspr/nspr/0004-Add-ARC-support.patch | 88 ++++++++++++++++++++++ meta/recipes-support/nspr/nspr_4.19.bb | 1 + 2 files changed, 89 insertions(+) create mode 100644 meta/recipes-support/nspr/nspr/0004-Add-ARC-support.patch diff --git a/meta/recipes-support/nspr/nspr/0004-Add-ARC-support.patch b/meta/recipes-support/nspr/nspr/0004-Add-ARC-support.patch new file mode 100644 index 0000000000..9d686017df --- /dev/null +++ b/meta/recipes-support/nspr/nspr/0004-Add-ARC-support.patch @@ -0,0 +1,88 @@ +From 6cb5b0be8837222a1e01745f2cf57cd0e593186d Mon Sep 17 00:00:00 2001 +From: Antoine Tenart +Date: Mon, 23 Oct 2017 10:28:20 +0200 +Subject: [PATCH] Add ARC support + +[Alexey: Rebased on top of other patches like RiscV, NIOS2 etc]. + +Signed-off-by: Antoine Tenart +Signed-off-by: Alexey Brodkin + +Upstream-Status: Submitted [ https://bugzilla.mozilla.org/show_bug.cgi?id=1492378 ] +--- + pr/include/md/_linux.cfg | 45 ++++++++++++++++++++++++++++++++++++++++ + pr/include/md/_linux.h | 2 ++ + 2 files changed, 47 insertions(+) + +diff --git a/pr/include/md/_linux.cfg b/pr/include/md/_linux.cfg +index fec8525378dc..5f4fa0eac783 100644 +--- a/pr/include/md/_linux.cfg ++++ b/pr/include/md/_linux.cfg +@@ -1157,6 +1157,51 @@ + #define PR_BYTES_PER_WORD_LOG2 3 + #define PR_BYTES_PER_DWORD_LOG2 3 + ++#elif defined(__arc__) ++ ++#define IS_LITTLE_ENDIAN 1 ++#undef IS_BIG_ENDIAN ++ ++#define PR_BYTES_PER_BYTE 1 ++#define PR_BYTES_PER_SHORT 2 ++#define PR_BYTES_PER_INT 4 ++#define PR_BYTES_PER_INT64 8 ++#define PR_BYTES_PER_LONG 4 ++#define PR_BYTES_PER_FLOAT 4 ++#define PR_BYTES_PER_DOUBLE 8 ++#define PR_BYTES_PER_WORD 4 ++#define PR_BYTES_PER_DWORD 8 ++ ++#define PR_BITS_PER_BYTE 8 ++#define PR_BITS_PER_SHORT 16 ++#define PR_BITS_PER_INT 32 ++#define PR_BITS_PER_INT64 64 ++#define PR_BITS_PER_LONG 32 ++#define PR_BITS_PER_FLOAT 32 ++#define PR_BITS_PER_DOUBLE 64 ++#define PR_BITS_PER_WORD 32 ++ ++#define PR_BITS_PER_BYTE_LOG2 3 ++#define PR_BITS_PER_SHORT_LOG2 4 ++#define PR_BITS_PER_INT_LOG2 5 ++#define PR_BITS_PER_INT64_LOG2 6 ++#define PR_BITS_PER_LONG_LOG2 5 ++#define PR_BITS_PER_FLOAT_LOG2 5 ++#define PR_BITS_PER_DOUBLE_LOG2 6 ++#define PR_BITS_PER_WORD_LOG2 5 ++ ++#define PR_ALIGN_OF_SHORT 2 ++#define PR_ALIGN_OF_INT 4 ++#define PR_ALIGN_OF_LONG 4 ++#define PR_ALIGN_OF_INT64 4 ++#define PR_ALIGN_OF_FLOAT 4 ++#define PR_ALIGN_OF_DOUBLE 4 ++#define PR_ALIGN_OF_POINTER 4 ++#define PR_ALIGN_OF_WORD 4 ++ ++#define PR_BYTES_PER_WORD_LOG2 2 ++#define PR_BYTES_PER_DWORD_LOG2 3 ++ + #else + + #error "Unknown CPU architecture" +diff --git a/pr/include/md/_linux.h b/pr/include/md/_linux.h +index 8e04fad479a1..628b1217e9c8 100644 +--- a/pr/include/md/_linux.h ++++ b/pr/include/md/_linux.h +@@ -63,6 +63,8 @@ + #define _PR_SI_ARCHITECTURE "riscv32" + #elif defined(__riscv) && (__riscv_xlen == 64) + #define _PR_SI_ARCHITECTURE "riscv64" ++#elif defined(__arc__) ++#define _PR_SI_ARCHITECTURE "arc" + #else + #error "Unknown CPU architecture" + #endif +-- +2.17.1 + diff --git a/meta/recipes-support/nspr/nspr_4.19.bb b/meta/recipes-support/nspr/nspr_4.19.bb index b5264be2a0..0212be7f40 100644 --- a/meta/recipes-support/nspr/nspr_4.19.bb +++ b/meta/recipes-support/nspr/nspr_4.19.bb @@ -12,6 +12,7 @@ SRC_URI = "http://ftp.mozilla.org/pub/nspr/releases/v${PV}/src/nspr-${PV}.tar.gz file://0002-Add-nios2-support.patch \ file://0001-md-Fix-build-with-musl.patch \ file://0003-Add-type-definitions-for-the-RISC-V-architecture.patch \ + file://0004-Add-ARC-support.patch \ file://nspr.pc.in \ "