From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1162480AbdEWVIq (ORCPT ); Tue, 23 May 2017 17:08:46 -0400 Received: from gate.crashing.org ([63.228.1.57]:39960 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161980AbdEWVIm (ORCPT ); Tue, 23 May 2017 17:08:42 -0400 Message-ID: <1495573670.3352.11.camel@kernel.crashing.org> Subject: Re: [patches] Re: [PATCH 2/7] RISC-V: arch/riscv Makefile and Kconfigs From: Benjamin Herrenschmidt To: Olof Johansson , patches@groups.riscv.org Cc: "linux-kernel@vger.kernel.org" , Arnd Bergmann , albert@sifive.com Date: Wed, 24 May 2017 07:07:50 +1000 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6 (3.22.6-2.fc25) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2017-05-22 at 22:16 -0700, Olof Johansson wrote: > The same is true for some other drivers. Actually, I wonder if it > might be just as easy to implement a sbi backend for hvc -- see > hvc_udbg.c for an example where, on power, you have a simple get/put > char hypervisor call in a very similar manner. Rather look at hvc_opal. This is the console driver we use on native POWER servers with the OPAL firmware, and it calls into a firmware in a very similar way. The driver lives in drivers/tty/hvc. It does call some "helpers" in the arch code that wrap the actual FW calls. > Either way (keeping discrete sbi driver or implementing hvc backend), > moving to drivers/tty is the right thing here -- we've worked hard on > ARM to get rid of random drivers under arch/ and it'd be nice to not > see new ones intoduced here. Yup. The reason mostly is that if the tty maintainer needs to do a subsystem-wide change, he can address all drivers in drivers/tty and doesn't have to look for others elsewhere in the tree. This is the same for all subsystems. Cheers, Ben.