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=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=ham 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 73B1DC2D0DB for ; Mon, 27 Jan 2020 18:07:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 527CF2087F for ; Mon, 27 Jan 2020 18:07:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725908AbgA0SHU (ORCPT ); Mon, 27 Jan 2020 13:07:20 -0500 Received: from foss.arm.com ([217.140.110.172]:47788 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725828AbgA0SHU (ORCPT ); Mon, 27 Jan 2020 13:07:20 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 711A430E; Mon, 27 Jan 2020 10:07:19 -0800 (PST) Received: from donnerap.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 63BBB3F67D; Mon, 27 Jan 2020 10:07:18 -0800 (PST) Date: Mon, 27 Jan 2020 18:07:15 +0000 From: Andre Przywara To: Alexandru Elisei Cc: kvm@vger.kernel.org, will@kernel.org, julien.thierry.kdev@gmail.com, sami.mujawar@arm.com, lorenzo.pieralisi@arm.com, maz@kernel.org Subject: Re: [PATCH v2 kvmtool 02/30] hw/i8042: Compile only for x86 Message-ID: <20200127180715.13e726d7@donnerap.cambridge.arm.com> In-Reply-To: <20200123134805.1993-3-alexandru.elisei@arm.com> References: <20200123134805.1993-1-alexandru.elisei@arm.com> <20200123134805.1993-3-alexandru.elisei@arm.com> Organization: ARM X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; aarch64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Thu, 23 Jan 2020 13:47:37 +0000 Alexandru Elisei wrote: > The initialization function for the i8042 emulated device does exactly > nothing for all architectures, except for x86. As a result, the device > is usable only for x86, so let's make the file an architecture specific > object file. > > Signed-off-by: Alexandru Elisei Reviewed-by: Andre Przywara Cheers, Andre. > --- > Makefile | 2 +- > hw/i8042.c | 4 ---- > 2 files changed, 1 insertion(+), 5 deletions(-) > > diff --git a/Makefile b/Makefile > index 6d6880dd4f8a..33eddcbb4d66 100644 > --- a/Makefile > +++ b/Makefile > @@ -103,7 +103,6 @@ OBJS += hw/pci-shmem.o > OBJS += kvm-ipc.o > OBJS += builtin-sandbox.o > OBJS += virtio/mmio.o > -OBJS += hw/i8042.o > > # Translate uname -m into ARCH string > ARCH ?= $(shell uname -m | sed -e s/i.86/i386/ -e s/ppc.*/powerpc/ \ > @@ -124,6 +123,7 @@ endif > #x86 > ifeq ($(ARCH),x86) > DEFINES += -DCONFIG_X86 > + OBJS += hw/i8042.o > OBJS += x86/boot.o > OBJS += x86/cpuid.o > OBJS += x86/interrupt.o > diff --git a/hw/i8042.c b/hw/i8042.c > index 288b7d1108ac..2d8c96e9c7e6 100644 > --- a/hw/i8042.c > +++ b/hw/i8042.c > @@ -349,10 +349,6 @@ static struct ioport_operations kbd_ops = { > > int kbd__init(struct kvm *kvm) > { > -#ifndef CONFIG_X86 > - return 0; > -#endif > - > kbd_reset(); > state.kvm = kvm; > ioport__register(kvm, I8042_DATA_REG, &kbd_ops, 2, NULL);