From patchwork Mon Sep 17 21:29:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Brodkin X-Patchwork-Id: 970838 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="lFL+VhRQ"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=synopsys.com header.i=@synopsys.com header.b="GSBfdZ5I"; 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 42DfRn6tDdz9sCK for ; Tue, 18 Sep 2018 07:30:29 +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=uIGKgnjF8iaUXbKkG1hujg5C6bjaLAUeinNF0d3z5wM=; b=lFL+VhRQwsB4sTRUZGtYB8q1wy y2fXn/5IO6fxUU88SA0Pwfp5DLRyBGlPzv1GYtmoSlAHiuvhCn8DlptVyvuEh5YJlgNVxsWuogXeg LinDM+JZEuiWLmGOjz3wbRXhngL9sPD1eYrAH5nERDEFllmg5MARLpSEhFtIUCnywI+qxxSPYrJRn nuC/GxhGvaak4e9v6zhOshXPhVrfjAna8g8dvKO11MpUjb8rp54kxvrowDj90bQ/IObVoxDs4e1S3 1zvFKiNTXq3KMhFtXI25XVL4CLtFSDjUPMcwJLvnjc6QU35rixNw+go1CV6eURByrfoQFcTXvyO75 4Dj2KFvw==; 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 1g216A-00032z-8i; Mon, 17 Sep 2018 21:30:26 +0000 Received: from smtprelay.synopsys.com ([198.182.47.9]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g215v-0001j5-DM for linux-snps-arc@lists.infradead.org; Mon, 17 Sep 2018 21:30:18 +0000 Received: from mailhost.synopsys.com (mailhost1.synopsys.com [10.12.238.239]) by smtprelay.synopsys.com (Postfix) with ESMTP id ABF7B24E0647; Mon, 17 Sep 2018 14:30:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1537219802; bh=xFwgePbdHuQnzBHkqAjGYY4TimmzkFLo/x5tCY7wTOM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GSBfdZ5I/eI2x9SBWjVsynsz7A/W3YF159NSIPIPrpU6uert9yo1R7gxOA4NgnZ3s NrwJ+VrWwTFAQfpuCHUN7Ra8W2HcnhFT/qbZsVUZDGBO3gdylFoFwyBv7dOkoXUvvf qmQFfUJPDMai7N7IbQkeBSRsxzdvZKNdUd60RZAy7ou+bf6Ah+Mxsxg/N0A/5mbH9x arTxKUZf2HQRVY/eo9/NiBGM4VRvRlcaCUuoIXtofB1lrjsI8o8PPbUEsJGV0Fcngc o2uVWeWztpQIx4pEiNWypAWQlUaZyQfZZuE79B+rvM5aGl+SdoTJVfEaXHPBVY/3gC 1f0SjF7zOrKpA== Received: from ru20arcgnu1.internal.synopsys.com (ru20arcgnu1.internal.synopsys.com [10.121.9.48]) by mailhost.synopsys.com (Postfix) with ESMTP id 039265538; Mon, 17 Sep 2018 14:30:00 -0700 (PDT) From: Alexey Brodkin To: openembedded-core@lists.openembedded.org Subject: [PATCH 05/10] nspr: Add ARC support Date: Tue, 18 Sep 2018 00:29:38 +0300 Message-Id: <20180917212943.27237-6-abrodkin@synopsys.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180917212943.27237-1-abrodkin@synopsys.com> References: <20180917212943.27237-1-abrodkin@synopsys.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180917_143011_502426_3E9C5EE7 X-CRM114-Status: GOOD ( 13.99 ) 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_VALID Message has at least one valid DKIM or DK signature 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 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 --- .../nspr/nspr/0004-Add-ARC-support.patch | 86 ++++++++++++++++++++++ meta/recipes-support/nspr/nspr_4.19.bb | 1 + 2 files changed, 87 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 0000000..dda1928 --- /dev/null +++ b/meta/recipes-support/nspr/nspr/0004-Add-ARC-support.patch @@ -0,0 +1,86 @@ +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 +--- + 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 b5264be..0212be7 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 \ "