From patchwork Tue May 19 05:46:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oliver O'Halloran X-Patchwork-Id: 1292956 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49R4mF70nmz9sTc for ; Tue, 19 May 2020 15:52:45 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=cYzHXnE/; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 49R4mD5hl0zDqLd for ; Tue, 19 May 2020 15:52:44 +1000 (AEST) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::441; helo=mail-pf1-x441.google.com; envelope-from=oohall@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=cYzHXnE/; dkim-atps=neutral Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 49R4f64TrNzDqfG for ; Tue, 19 May 2020 15:47:26 +1000 (AEST) Received: by mail-pf1-x441.google.com with SMTP id b190so6023035pfg.6 for ; Mon, 18 May 2020 22:47:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FTDiMrRzvWiT0c7pYNCwHY++tQYnU7q2C3i9iqsa8fA=; b=cYzHXnE/WUm8w34NWIkJVwgmjM1deQvcxv+0K4RGM99jWZBxta/byCFR9qVKtYtJD4 GOIw5gr4wFL+zN17a65jU1ZaGZrk9XXr6I/11kpHmmAz4cc/TsQgCggPCTGH8YKXz590 QahEdwgTv6pwnC2+ucGP3Xa7w9y+kmwwiljr2Ul+VBqra3mc/u14F/rw1CdGroj83MyW X17KGo3RYTeaTG0ZwBzmLIEgb00oZlSuBL/4iHyb6k3VCIpPTxdJm1Q4I4Av07oxBe9B T2/EdUuDN6rWZnUF3dT1goIFHQx+VGxR843xuV9NcMivJvc0JLPDgYqouammeZS3ciuh n7vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FTDiMrRzvWiT0c7pYNCwHY++tQYnU7q2C3i9iqsa8fA=; b=Oq8fy3/1dJHl5rcnh8uKa2pt4IUpPziieZwWsduAq6KdBmEomJ2W5yGzY0na6kSagH 4X2t0flIDrvMYWPT3gw5GYnVAQxAJQFIXc0YK+kZ9fT9LkQJ6bNHV/EbM6yS2ojL1w2A Vz5nTRpDMeR80+IaCKkN7E+eipwxEeu4sa7uGOIYII6V2Ks3iNvVSO3E2dUVmz0mMU+v e44YE4XJqKqjeCuRPcLVUoiy3qVYVX6LQ0pfazwSiknyr6042Pqqcu6kzOI5QOxGyMfu TBRlh91p73WU26MupJidlmXlsjoxvnVlfhHIZqJSL4aefik4ntH36S6kooKcQfKQEI+e HrCA== X-Gm-Message-State: AOAM5301XG/hQ00qLvfOuVXWEvMopOEM2xrd1t2W9CkQXvVDbYEgf9Qf vAIvirazTYIhbojKaBF7tIqOxlH9 X-Google-Smtp-Source: ABdhPJygty+YTviNRH2PqFD7brFT1DOfuGLF/IvAzPkpkaf9MAtOM1Gw7Kx5YvtQ/34hRPLzblbBvg== X-Received: by 2002:a65:480c:: with SMTP id h12mr18713311pgs.106.1589867243642; Mon, 18 May 2020 22:47:23 -0700 (PDT) Received: from 192-168-1-12.tpgi.com.au ([203.221.252.191]) by smtp.gmail.com with ESMTPSA id p12sm2798358pgj.22.2020.05.18.22.47.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 May 2020 22:47:23 -0700 (PDT) From: Oliver O'Halloran To: skiboot@lists.ozlabs.org Date: Tue, 19 May 2020 15:46:31 +1000 Message-Id: <20200519054633.113238-11-oohall@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200519054633.113238-1-oohall@gmail.com> References: <20200519054633.113238-1-oohall@gmail.com> MIME-Version: 1.0 Subject: [Skiboot] [RFC PATCH 10/12] core/console: Drop con_buf X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" We can use the buffer pointer in memcons instead. Signed-off-by: Oliver O'Halloran --- core/console.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/core/console.c b/core/console.c index 719ba67063a0..d37a4cb128e2 100644 --- a/core/console.c +++ b/core/console.c @@ -15,8 +15,6 @@ #include #include -static char *con_buf = (char *)INMEM_CON_START; - /* * Skiboot is both the producer and consumer of the memcons. On the consumer * side we need to keep track of how much of the log buffer has been written @@ -92,7 +90,7 @@ struct dt_node *add_opal_console_node(int index, const char *type, void clear_console(void) { - memset(con_buf, 0, INMEM_CON_LEN); + memset(memcons.obuf, 0, memcons.obuf_size); } /* @@ -162,7 +160,7 @@ static bool __flush_console(bool flush_to_drivers, bool need_unlock) req = memcons.out_pos - flush_head; unlock(&con_lock); - len = con_driver->write(con_buf + flush_head, req); + len = con_driver->write(memcons.obuf + flush_head, req); lock(&con_lock); flush_head = (flush_head + len) % INMEM_CON_OUT_LEN;