From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4B03FC433B4 for ; Mon, 12 Apr 2021 23:48:02 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C9F8D61244 for ; Mon, 12 Apr 2021 23:48:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C9F8D61244 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=aj.id.au Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Subject:Cc:To:From:Date:References:In-Reply-To: Message-Id:Mime-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=4yOU4J6VZWEosjAMAxCaceANTaNn682/yanAln2N6Q0=; b=HvecU/O2kN+ibW7ThHb/WDVLB 69bXcRj3ig7S6INclU+GvQ4Jxhuj5OZCZUARPffSY1bxZjcc6UwnG0tf0czV0SulnK0Dn+XJIATg3 /cpSlmF3OmFiEoefmiKcXsPcC+b6mU2f4eBaxAtvZQss6V7bgwSxH27wbLVRyR7b92/zJdD37cuWo HJbkTKbOC/okzt4C1HwrNZYtqy1VfdK7CWypoBpqDPWvT07z3nSUMvq190JHWkmO+zsZUGoYw/gwZ +/vzZ6MSgV+XQDXKSjamid984025DYw6HDCCdxevLKldsq6SNqYBL4uPW62Wy7w2UaGaxw800vwNE iyQdcN8MA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lW6GA-007uQj-8x; Mon, 12 Apr 2021 23:46:26 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lW6G4-007uQ5-Uh for linux-arm-kernel@desiato.infradead.org; Mon, 12 Apr 2021 23:46:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Type:Subject:Cc:To:From:Date: References:In-Reply-To:Message-Id:Mime-Version:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=fmEbaEZe+KED5JiPxN0DVWg/HvQWdbcFjVOEUztK2NI=; b=KGznGzclN6kMHH/QIj3Jh+OAcK qSQpNEOgbBxqDexjbbn0l5q6J4BAsPecwJ1oB7BJTfKk9A8LxwEPn/OPbmoEuMdXZ2wU5DfapKhI9 9ynzM3sUCQyUyBZWzyvoFjj0J3uaYqNW2924f8Do68WN8N/v4ik2yo6WpEPvohhY9SS+gkOeyfxPL 8U5NKHKWFOBh5OPbEwJp7F7O/NRaMC4uWMDFOd1sDI3MRgnVgSVpf/y1ct73fNqEg6vWJRpsGLOC1 EOgWCh9QfhTNvKjO7dyvlOOiJzFZ0VRTgIr0wg+5gRPB9tctG9oTdI7g4bm+Wy8mHKKYZ4eODYPxJ VdWdolHg==; Received: from new2-smtp.messagingengine.com ([66.111.4.224]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lW6G2-006dIo-9v for linux-arm-kernel@lists.infradead.org; Mon, 12 Apr 2021 23:46:19 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.nyi.internal (Postfix) with ESMTP id 62113580449; Mon, 12 Apr 2021 19:46:17 -0400 (EDT) Received: from imap2 ([10.202.2.52]) by compute3.internal (MEProxy); Mon, 12 Apr 2021 19:46:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aj.id.au; h= mime-version:message-id:in-reply-to:references:date:from:to:cc :subject:content-type; s=fm2; bh=fmEbaEZe+KED5JiPxN0DVWg/HvQWdbc FjVOEUztK2NI=; b=Vx/AVcRxxdiZfCzmg6HH9s7fTRcRO2A7YIjLyLaYe8qYr0r BS6egDBjdLmYM34p470HJr5LqP5KoInLDDwqdcamk5MRSrxO7dAhMPAMUDC0dhjh vJPcgIwiLG8KOJ3uKA0GTGu1jcMQaOMSnd2WrYuTHIQZVsAWFGqkwBRXNlti55x/ 6ugOqakXKGxkr0fFLfkKWrDXxcxOVi08DvlZS08DU0g+kMkvrqeAYCT7meuT5hdW cOoZaNo0ceLqWTSGPHWkpxqHpGYT21VoEfaKHBFdWelkIXGtvA0GWL6pRx9n2reQ 6kULJBJilakY/lES25nZKfX1V5Pxebr9HcJga0Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=fmEbaE Ze+KED5JiPxN0DVWg/HvQWdbcFjVOEUztK2NI=; b=RCRlZHDVBmLjCH2Y7LqZJ+ LPMZ6zfYSA6N9BRlHWDS80Td69J2sFZ47v0FrYjGX9CByF1tu62RmXm7qpQJoCd9 lyFdYNdzNHNXMTeMxpri2aLsG94InMhJ8JdMtTYuYL8jgwgeI3B/KHx/1h7FXxwW GFXGj/30mGVdydc6aQu8SVDfHYocr+6I1EzEpM+MqorxoGRXWXNhvEDsz/DFvSXa rYE3E5TnGUmIZZ4eTJZgl8j6ujkfUb41tPfnYSTWk7WZo5HbgTE0bvvQIlBDdV1N ceo9eazaMv36UwCVQ0aDxCcUePl6VUptDzGA6jyNVzZzVveA5t4xIBSb2wGGWApw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudekkedgvdehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgesthdtredtreerjeenucfhrhhomhepfdetnhgu rhgvficulfgvfhhfvghrhidfuceorghnughrvgifsegrjhdrihgurdgruheqnecuggftrf grthhtvghrnhepuddttdekueeggedvtddtueekiedutdfguedutdefieeuteefieelteet vddthfeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh eprghnughrvgifsegrjhdrihgurdgruh X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 38211A00492; Mon, 12 Apr 2021 19:46:16 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-273-g8500d2492d-fm-20210323.002-g8500d249 Mime-Version: 1.0 Message-Id: In-Reply-To: References: <20210319062752.145730-1-andrew@aj.id.au> <20210319062752.145730-16-andrew@aj.id.au> Date: Tue, 13 Apr 2021 09:15:55 +0930 From: "Andrew Jeffery" To: "Arnd Bergmann" Cc: "Dmitry Torokhov" , openipmi-developer@lists.sourceforge.net, "OpenBMC Maillist" , "Corey Minyard" , "Joel Stanley" , "Ryan Chen" , DTML , "Tomer Maimon" , linux-aspeed , "open list:GPIO SUBSYSTEM" , "Avi Fishman" , "Patrick Venture" , "Linus Walleij" , "Linux Kernel Mailing List" , "Tali Perry" , "Rob Herring" , "Lee Jones" , "Chia-Wei, Wang" , "Linux ARM" , "Benjamin Fair" Subject: =?UTF-8?Q?Re:_[PATCH_v2_16/21]_ipmi:_kcs=5Fbmc:_Add_a_"raw"_character_de?= =?UTF-8?Q?vice_interface?= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210412_164618_434627_150B969E X-CRM114-Status: GOOD ( 35.74 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, 12 Apr 2021, at 18:18, Arnd Bergmann wrote: > On Mon, Apr 12, 2021 at 3:33 AM Andrew Jeffery wrote: > > On Fri, 9 Apr 2021, at 17:25, Arnd Bergmann wrote: > > > On Fri, Mar 19, 2021 at 7:31 AM Andrew Jeffery wrote: > > > > > > > > The existing IPMI chardev encodes IPMI behaviours as the name suggests. > > > > However, KCS devices are useful beyond IPMI (or keyboards), as they > > > > provide a means to generate IRQs and exchange arbitrary data between a > > > > BMC and its host system. > > > > > > I only noticed the series after Joel asked about the DT changes on the arm > > > side. One question though: > > > > > > How does this related to the drivers/input/serio/ framework that also talks > > > to the keyboard controller for things that are not keyboards? > > > > I've taken a brief look and I feel they're somewhat closely related. > > > > It's plausible that we could wrangle the code so the Aspeed and Nuvoton > > KCS drivers move under drivers/input/serio. If you squint, the i8042 > > serio device driver has similarities with what the Aspeed and Nuvoton > > device drivers are providing to the KCS IPMI stack. > > After looking some more into it, I finally understood that the two are > rather complementary. While the drivers/char/ipmi/kcs_bmc.c > is the other (bmc) end of drivers/char/ipmi/ipmi_kcs_sm.c, it seems > that the proposed kcs_bmc_cdev_raw.c interface would be > what corresponds to the other side of > drivers/input/serio/i8042.c+userio.c. Right. I guess the question is should we be splitting kernel subsystems along host/bmc lines? Doesn't feel intuitive, it's all Linux, but maybe we can consolidate in the future if it makes sense? > Then again, these are also on > separate ports (0x60 for the keyboard controller, 0xca2 for the BMC > KCS), so they would never actually talk to one another. Well, sort of I guess. On Power systems we don't use the keyboard controller for IPMI or keyboards, so we're just kinda exploiting the hardware for our own purposes. > > > Both the KCS IPMI and raw chardev I've implemented in this patch need > > both read and write access to the status register (STR). serio could > > potentially expose its value through serio_interrupt() using the > > SERIO_OOB_DATA flag, but I haven't put any thought into it beyond this > > sentence. We'd need some extra support for writing STR via the serio > > API. I'm not sure that fits into the abstraction (unless we make > > serio_write() take a flags argument?). > > > > In that vein, the serio_raw interface is close to the functionality > > that the raw chardev provides in this patch, though again serio_raw > > lacks userspace access to STR. Flags are ignored in the ->interrupt() > > callback so all values received via ->interrupt() are exposed as data. > > The result is there's no way to take care of SERIO_OOB_DATA in the > > read() path. Given that, I think we'd have to expose an ioctl() to > > access the STR value after taking care of SERIO_OOB_DATA in > > ->interrupt(). > > > > I'm not sure where that lands us. > > Based on what I looked up, I think you can just forget about my original > question. We have two separate interfaces that use an Intel 8042-style > protocol, but they don't really interact. Right, this is still true given Power doesn't care for keyboards or IPMI via the keyboard controllers; the two still don't interact. Andrew _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel