Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp107062ybd; Fri, 28 Jun 2019 15:34:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqx+94a6uolXW+aEBc0p5Ou4remmRjF3ZChqdz8UOjIdfFrXtfbMmQ5RwjhqGMoDOvg6rRRQ X-Received: by 2002:a63:56:: with SMTP id 83mr11734916pga.145.1561761262156; Fri, 28 Jun 2019 15:34:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561761262; cv=none; d=google.com; s=arc-20160816; b=s9PwP8SrvwMPQwF81B6K4MSBKif7O3mGzVwOBv5T2WeV+bSuvprHj5tlPIgXha7iQx v1BgkBK2+ENDTqVlpj7j2r00T1z+RqgZxoeNxO8U71uVIQw9gm9B12U9er6cZ7f5FuG2 DyV9Rdlvf/XMLfQTtKvqTY3ZeBe41597AiwAu2jFUxyl7cNH1wsdQqjKXkttROaPCKUr 4QevQU+gY7RkkADi5xhtVmnwJuDWJLn6wPSzvxoTpNe+WFHl910JEg1Is44Xy5EGEiqf VnKd/EGOhr60HOlsdG3xILz+kZQNd+rYjXDkMlQKmAc2LXf1HDSq/xZeiGB0jlTnxMrj gAZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:in-reply-to :subject:cc:to:from:user-agent:references; bh=i99tsY/jj2nry9/KRi+dNA39BbzuG63OENt0wCdUKpg=; b=NQ33sAvGS0jrxb1Yk8WgR/9uGWiD7WseAH2EYNjwcU/18vNKzUVjN+osOyJCZzqG4q e6w8G2Q7pBkN2i3v5wPRGOfYebaaQar+xuRuE1EXcSGt09B9KphTHaTypPzZgRhwmISj ZcYs7S6Y0WpdmAL9nsBDzPFQH+jcPCykxlQfHS6OZ30zh135Vpcueftg46d4UXRBx3VP Y/dY2hRNUaGlksa+CXiBP5UyrHXYSWOatIJyF/zO1us5t5E2VEe4l2hAm1nKyikeqa4M Hly7Y7GN1fDvCIV1ntp10iHq2P288KdV6yz24jk8F/WZ+MIxZ2MWhLbT3ApvFOrGdQ2P wrCQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t22si2908556pgh.582.2019.06.28.15.34.05; Fri, 28 Jun 2019 15:34:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726719AbfF1WeC (ORCPT + 99 others); Fri, 28 Jun 2019 18:34:02 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:41902 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726563AbfF1WeB (ORCPT ); Fri, 28 Jun 2019 18:34:01 -0400 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x5SMVtVc097104; Fri, 28 Jun 2019 18:33:37 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 2tdtv11n5s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 28 Jun 2019 18:33:37 -0400 Received: from m0098393.ppops.net (m0098393.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.27/8.16.0.27) with SMTP id x5SMWAlp097783; Fri, 28 Jun 2019 18:33:37 -0400 Received: from ppma03dal.us.ibm.com (b.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.11]) by mx0a-001b2d01.pphosted.com with ESMTP id 2tdtv11n5f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 28 Jun 2019 18:33:37 -0400 Received: from pps.filterd (ppma03dal.us.ibm.com [127.0.0.1]) by ppma03dal.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id x5SMTYEn010551; Fri, 28 Jun 2019 22:33:36 GMT Received: from b03cxnp08028.gho.boulder.ibm.com (b03cxnp08028.gho.boulder.ibm.com [9.17.130.20]) by ppma03dal.us.ibm.com with ESMTP id 2t9by7r9vc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 28 Jun 2019 22:33:36 +0000 Received: from b03ledav005.gho.boulder.ibm.com (b03ledav005.gho.boulder.ibm.com [9.17.130.236]) by b03cxnp08028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x5SMXX1G64618938 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 28 Jun 2019 22:33:33 GMT Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B5303BE04F; Fri, 28 Jun 2019 22:33:33 +0000 (GMT) Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 64C9DBE051; Fri, 28 Jun 2019 22:33:30 +0000 (GMT) Received: from morokweng.localdomain (unknown [9.85.221.58]) by b03ledav005.gho.boulder.ibm.com (Postfix) with ESMTPS; Fri, 28 Jun 2019 22:33:30 +0000 (GMT) References: <20190521044912.1375-1-bauerman@linux.ibm.com> <20190521044912.1375-4-bauerman@linux.ibm.com> <3b45cc84-273b-b333-831c-85c501b7e78e@ozlabs.ru> User-agent: mu4e 1.2.0; emacs 26.2 From: Thiago Jung Bauermann To: Alexey Kardashevskiy Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Anshuman Khandual , Benjamin Herrenschmidt , Christoph Hellwig , Michael Ellerman , Mike Anderson , Paul Mackerras , Ram Pai , Claudio Carvalho Subject: Re: [RFC PATCH 03/12] powerpc/prom_init: Add the ESM call to prom_init In-reply-to: <3b45cc84-273b-b333-831c-85c501b7e78e@ozlabs.ru> Date: Fri, 28 Jun 2019 19:33:24 -0300 Message-ID: <87mui1732j.fsf@morokweng.localdomain> MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-06-28_11:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=8 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906280258 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Alexey, Thanks for reviewing this patch! Alexey Kardashevskiy writes: > On 21/05/2019 14:49, Thiago Jung Bauermann wrote: >> @@ -1707,6 +1723,43 @@ static void __init prom_close_stdin(void) >> } >> } >> >> +#ifdef CONFIG_PPC_SVM >> +static int prom_rtas_os_term_hcall(uint64_t args) > > > This is just an rtas hcall, nothing special about "os-term". Sorry, unfortunately I don't understand how we're treating os-term especially. Do you mean that we should inline this function directly into prom_rtas_os_term()? >> +{ >> + register uint64_t arg1 asm("r3") = 0xf000; >> + register uint64_t arg2 asm("r4") = args; >> + >> + asm volatile("sc 1\n" : "=r" (arg1) : >> + "r" (arg1), >> + "r" (arg2) :); >> + return arg1; >> +} >> + >> +static struct rtas_args __prombss os_term_args; >> + >> +static void __init prom_rtas_os_term(char *str) >> +{ >> + phandle rtas_node; >> + __be32 val; >> + u32 token; >> + >> + prom_printf("%s: start...\n", __func__); >> + rtas_node = call_prom("finddevice", 1, 1, ADDR("/rtas")); >> + prom_printf("rtas_node: %x\n", rtas_node); >> + if (!PHANDLE_VALID(rtas_node)) >> + return; >> + >> + val = 0; >> + prom_getprop(rtas_node, "ibm,os-term", &val, sizeof(val)); >> + token = be32_to_cpu(val); >> + prom_printf("ibm,os-term: %x\n", token); >> + if (token == 0) >> + prom_panic("Could not get token for ibm,os-term\n"); >> + os_term_args.token = cpu_to_be32(token); >> + prom_rtas_os_term_hcall((uint64_t)&os_term_args); >> +} >> +#endif /* CONFIG_PPC_SVM */ >> + >> /* >> * Allocate room for and instantiate RTAS >> */ -- Thiago Jung Bauermann IBM Linux Technology Center