Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp938009rdb; Fri, 19 Jan 2024 03:35:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IEsccTh01WIDHiytTETSeFbTOGB5Iqc+CRZjYyMSUsq7uu/7hKlYxMoArDhin4ffVMICqjV X-Received: by 2002:a05:6a21:99a2:b0:19b:5b08:195d with SMTP id ve34-20020a056a2199a200b0019b5b08195dmr2101918pzb.19.1705664134149; Fri, 19 Jan 2024 03:35:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705664134; cv=pass; d=google.com; s=arc-20160816; b=d63vExW2Azqb11sxOJSx6zpYXbEpJBd4nQ58cvyJls/bPTRbiNtaJsoSoA5LuWHaz8 t7NGf2Q9TW2ZqcCWO3Gatt+XIuOfVffYrxCmDSmB4vDkzOc6J6CMFs+9f8Yv5/muKO2E jq3ziloXZy6RJ+QNrR+YNDapzca78fsw+/Pp0Z15F7zl2+vjJo8xCNpoZMb8mzyN5RQ2 M+XN1KPrErEhImDdp3elftLScUf/7fxbaOFHwTD9lCVWt5BMwAvtwfV2OlBxqOkIAd6Y NiVhi5YPtuFs2oBx5qiWJYSsfJMJiiYz3lPeogL3ZtI7tVFOioD3vvCj7IDTbxQ3j0Tz 4F1Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=k38gzzXnRwc1LG01yYkdNKX2/4JudjETsypjyCoA1oc=; fh=sCaLDPmI3z3WfJgoG5Ri8nSrNxiyuF4F9Uj24RFqprM=; b=ri0NSJBzEuk/ww89tWwknivBWXEwkfoIDqlzLJAI24edPH9/tkKQxAHkNUI5fgSl7a 2QtwRkIw0H7rniLzusO0nRaHCW/SLAlnE76annNOJ/uGVjjaE9T7iFY8XRiHp8+Mbcec Q5PhhSUq9JXeuYl650CuzLr71+f9DsPe8mBnTSH3sfMfVOI81MLXcau9ho+gdAP2WquU YxgY7omj3NzwusmbCxPH5t2SwD/mVVnHq6taxYJSgUZG14gCeQDgzSazjpcszss6hMTq ZPx+BHdSGQGrkq7WB5fHo/dN8wLcWvD7wHhFJWW2RxD8njxY0dssJ57nHLzGkU5nmXUk +q+g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=CZxqI0Bd; arc=pass (i=1 spf=pass spfdomain=ventanamicro.com dkim=pass dkdomain=ventanamicro.com); spf=pass (google.com: domain of linux-kernel+bounces-31100-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31100-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id a11-20020a170902eccb00b001d5c0d3f5d1si3241487plh.395.2024.01.19.03.35.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 03:35:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-31100-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=CZxqI0Bd; arc=pass (i=1 spf=pass spfdomain=ventanamicro.com dkim=pass dkdomain=ventanamicro.com); spf=pass (google.com: domain of linux-kernel+bounces-31100-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31100-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 69A45B23326 for ; Fri, 19 Jan 2024 11:35:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 46CB04F1E6; Fri, 19 Jan 2024 11:35:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ventanamicro.com header.i=@ventanamicro.com header.b="CZxqI0Bd" Received: from mail-il1-f171.google.com (mail-il1-f171.google.com [209.85.166.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 368454EB58 for ; Fri, 19 Jan 2024 11:35:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705664109; cv=none; b=C16a2airERKybCjr7LgZsjCeESWHIpp0v407Wd/pO7SFOuGjAZGf2MMK+8/2aQWScSLw/tne/3ggXFWU2v6Kan+ajLIsbT+wMgexigW81CkmaXAlpl2WBe6800rzMfG4traw7UltdtpEyt3vZAJ1Uro68ly2dKxknv+H4nc6XU4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705664109; c=relaxed/simple; bh=C5iRWOaVPvgyoKC+hI5XbA0WdGNDbqEUa5o2YyeO7Ao=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Ud+A6NAlC9xeCjqtnffd/4j0LRFrw0Gd5yEgOcF8A1+zlyOIFV7xq01lHewF98L0OQCLOk7V0X7EjRRK7xHRxXrxCRQt+6204ciMzHpt/n0TsZKUpb81k/xYOv7LxCxt4VLND///s6KayGydeyKBYyZpsIf94JfIumj+Qi607Nk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ventanamicro.com; spf=pass smtp.mailfrom=ventanamicro.com; dkim=pass (2048-bit key) header.d=ventanamicro.com header.i=@ventanamicro.com header.b=CZxqI0Bd; arc=none smtp.client-ip=209.85.166.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ventanamicro.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ventanamicro.com Received: by mail-il1-f171.google.com with SMTP id e9e14a558f8ab-3606c7a4cb5so3291085ab.3 for ; Fri, 19 Jan 2024 03:35:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1705664107; x=1706268907; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=k38gzzXnRwc1LG01yYkdNKX2/4JudjETsypjyCoA1oc=; b=CZxqI0BdDTcoozSkR/a28LpSgR1gpMw5CRIoktrw+Zto+znxGyybJXV/utBlAoWCT1 00oUQIfDtL4AGaXcmUa7Npz7nEo2fXU9KxToFA1bSnRvoRhp0XUmlTqfk3u2alw6ho9G u1wzteojoyKQEQlaO+QeoftlHWXAD2Q6xAeNNXlDQlH6CG/HCHs+8AOmR/b5y+GWouoG Vat48JJ5CYA/AHtJM7M63K+QRf463r9pRwjOzUFQGamAe/+bN9P9/M2xgF5SeEYWwBwf r1ZQo+cgXsD9C8Xfmiuo8VFlbchkS6xjWyzUr/ITUbYqn1EboaumF4nkQqPgZV3wCNjF 5qMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705664107; x=1706268907; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=k38gzzXnRwc1LG01yYkdNKX2/4JudjETsypjyCoA1oc=; b=Vcs3V/xQVD7GYm4y/Xzzjpie5UIhiINmddLjjKgl8ktMyTfVWowJsU4boWxE0WWN+T /boV0PyFru1TqrATsrmqrmPGuwzF/sAlWXUekDymZmdtJwkqow/OE0WVf48BBmJ6qrk9 yCUQx7ne1JDCHs54ELjiYxL9vN7evzloTuFH3xeGcT5IiqASbo0oi3HI0i3mVU9MaJ+n s7RTEq05OuOqOs7UfWEQFNDqIrTy9Ycw5aDrNfzvOiXRFLygI6v2XgG6xM+6zVzZX6sQ N/e3R2xFNwJ6MEetaKJbFEt0NgxZo1KACxIg+5JfD4RzK2UJqw2JgBXgXZopSAUO64fT C7Ww== X-Gm-Message-State: AOJu0YwQEKH05ETa/JVawWwkMVAQCEtVtLw9t4OcTg0jSSR2vdhc9RR8 72OPiodGces6zogx+UBW6dVHbpE7FQ8XnIwBb4oGTy9RX795BE8QdoluVJSB5K4= X-Received: by 2002:a05:6e02:80a:b0:361:981f:5b32 with SMTP id u10-20020a056e02080a00b00361981f5b32mr2364278ilm.123.1705664107212; Fri, 19 Jan 2024 03:35:07 -0800 (PST) Received: from anup-ubuntu-vm.localdomain ([103.97.165.210]) by smtp.gmail.com with ESMTPSA id a5-20020a92a305000000b0036062f40c51sm5347302ili.71.2024.01.19.03.35.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 03:35:06 -0800 (PST) From: Anup Patel To: Palmer Dabbelt , Paul Walmsley , Greg Kroah-Hartman , Jiri Slaby Cc: Conor Dooley , Andrew Jones , linux-riscv@lists.infradead.org, linux-serial@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Anup Patel Subject: [PATCH v6 1/5] RISC-V: Add stubs for sbi_console_putchar/getchar() Date: Fri, 19 Jan 2024 17:04:45 +0530 Message-Id: <20240119113449.492152-2-apatel@ventanamicro.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240119113449.492152-1-apatel@ventanamicro.com> References: <20240119113449.492152-1-apatel@ventanamicro.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The functions sbi_console_putchar() and sbi_console_getchar() are not defined when CONFIG_RISCV_SBI_V01 is disabled so let us add stub of these functions to avoid "#ifdef" on user side. Signed-off-by: Anup Patel Reviewed-by: Andrew Jones --- arch/riscv/include/asm/sbi.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/riscv/include/asm/sbi.h b/arch/riscv/include/asm/sbi.h index b6f898c56940..e0a8eca32ba5 100644 --- a/arch/riscv/include/asm/sbi.h +++ b/arch/riscv/include/asm/sbi.h @@ -288,8 +288,13 @@ struct sbiret sbi_ecall(int ext, int fid, unsigned long arg0, unsigned long arg3, unsigned long arg4, unsigned long arg5); +#ifdef CONFIG_RISCV_SBI_V01 void sbi_console_putchar(int ch); int sbi_console_getchar(void); +#else +static inline void sbi_console_putchar(int ch) { } +static inline int sbi_console_getchar(void) { return -ENOENT; } +#endif long sbi_get_mvendorid(void); long sbi_get_marchid(void); long sbi_get_mimpid(void); -- 2.34.1