From patchwork Thu Mar 15 07:43:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasant Hegde X-Patchwork-Id: 886139 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4020wH2QRQz9sTh for ; Thu, 15 Mar 2018 18:44:15 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.vnet.ibm.com Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4020wH1848zDrCY for ; Thu, 15 Mar 2018 18:44:15 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.vnet.ibm.com X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=none (mailfrom) smtp.mailfrom=linux.vnet.ibm.com (client-ip=148.163.156.1; helo=mx0a-001b2d01.pphosted.com; envelope-from=hegdevasant@linux.vnet.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.vnet.ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4020w90JBkzDqZs for ; Thu, 15 Mar 2018 18:44:08 +1100 (AEDT) Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w2F7hdiG071950 for ; Thu, 15 Mar 2018 03:44:06 -0400 Received: from e06smtp13.uk.ibm.com (e06smtp13.uk.ibm.com [195.75.94.109]) by mx0a-001b2d01.pphosted.com with ESMTP id 2gqfjv2qay-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Thu, 15 Mar 2018 03:44:06 -0400 Received: from localhost by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 15 Mar 2018 07:44:04 -0000 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp13.uk.ibm.com (192.168.101.143) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 15 Mar 2018 07:44:01 -0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w2F7i1Xo56688712; Thu, 15 Mar 2018 07:44:01 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1F319AE057; Thu, 15 Mar 2018 07:34:27 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8FBE5AE051; Thu, 15 Mar 2018 07:34:25 +0000 (GMT) Received: from hegdevasant.domain.name (unknown [9.80.222.28]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 15 Mar 2018 07:34:25 +0000 (GMT) From: Vasant Hegde To: skiboot@lists.ozlabs.org Date: Thu, 15 Mar 2018 13:13:56 +0530 X-Mailer: git-send-email 2.14.3 X-TM-AS-GCONF: 00 x-cbid: 18031507-0012-0000-0000-000005BEE316 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18031507-0013-0000-0000-0000193AEB90 Message-Id: <20180315074356.31473-1-hegdevasant@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2018-03-15_03:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1803150090 Subject: [Skiboot] [PATCH] hdata: Move 'HRMOR_BIT' macro to header file X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Its already defined twice. Lets move it to header file. Signed-off-by: Vasant Hegde --- hdata/memory.c | 2 -- hdata/spira.c | 5 ++--- hdata/spira.h | 6 ++++++ 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/hdata/memory.c b/hdata/memory.c index 27dc559f5..a83898955 100644 --- a/hdata/memory.c +++ b/hdata/memory.c @@ -602,8 +602,6 @@ static struct dt_node *add_hb_reserve_node(const char *name, u64 start, u64 end) return node; } -#define HRMOR_BIT (1ul << 63) - static void get_hb_reserved_mem(struct HDIF_common_hdr *ms_vpd) { const struct msvpd_hb_reserved_mem *hb_resv_mem; diff --git a/hdata/spira.c b/hdata/spira.c index 0724dcc42..19f456a1e 100644 --- a/hdata/spira.c +++ b/hdata/spira.c @@ -88,16 +88,15 @@ __section(".cpuctrl.data") struct cpu_ctl_init_data cpu_ctl_init_data = { * To help the FSP distinguishing between TCE tokens and actual physical * addresses, we set the top bit to 1 on physical addresses */ -#define ADDR_TOP_BIT (1ul << 63) __section(".mdst.data") struct dump_mdst_table init_mdst_table[2] = { { - .addr = CPU_TO_BE64(INMEM_CON_START | ADDR_TOP_BIT), + .addr = CPU_TO_BE64(INMEM_CON_START | HRMOR_BIT), .type = CPU_TO_BE32(DUMP_REGION_CONSOLE), .size = CPU_TO_BE32(INMEM_CON_LEN), }, { - .addr = CPU_TO_BE64(HBRT_CON_START | ADDR_TOP_BIT), + .addr = CPU_TO_BE64(HBRT_CON_START | HRMOR_BIT), .type = CPU_TO_BE32(DUMP_REGION_HBRT_LOG), .size = CPU_TO_BE32(HBRT_CON_LEN), }, diff --git a/hdata/spira.h b/hdata/spira.h index 39e0e3333..d8421dcb6 100644 --- a/hdata/spira.h +++ b/hdata/spira.h @@ -19,6 +19,12 @@ #include "hdif.h" +/* + * To help the FSP/hostboot distinguishing between physical address and relative + * address/TCE tokens, we set the top bit to 1 on physical addresses. + */ +#define HRMOR_BIT (1ul << 63) + /* * The SPIRA structure *