From owner-freebsd-arch@freebsd.org Fri Feb 17 19:56:46 2017 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72B30CE3A13 for ; Fri, 17 Feb 2017 19:56:46 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x22e.google.com (mail-it0-x22e.google.com [IPv6:2607:f8b0:4001:c0b::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 435D41949 for ; Fri, 17 Feb 2017 19:56:46 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x22e.google.com with SMTP id h10so31367998ith.1 for ; Fri, 17 Feb 2017 11:56:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=jc17USQQS7430mhRthtRERCJt/wepEbnkJ3CtdvVaHo=; b=Kh+ZrDhYsz/FvaNf6DiY2vhrzQuM+AgJe2fSTJI+BHUuyEp+iJUP6qGwwzZEiohlRj U7df5/2jAiz9K4gF0B2vXe5o/BaK2nIxcTZuWijciwYGiJmakprFTF0v4p5r8n/Y3gnx dwZeoUgeALBXs96QjqZWBpc4zCQ9DbMuXCUJZED9Bz1uBguo+jT5su0cqhntej98zFOS W0XhiyDi6qI9VKJQbXYa5zgVh/bFrUD1GktNjStEoYBOiLKrVDVX9V3SxLS4GHP433Oy 2sKRlpZB/aKlUx2SYnU5yOugDqNCHS0kn6JOdLL6yw8sjVJSeej6MmpP0mYkaRsYls+C Tj7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=jc17USQQS7430mhRthtRERCJt/wepEbnkJ3CtdvVaHo=; b=TopdIIlDQjqwaQGUTawcD35tUkFqwPYy6UAH6jUHLr5bEx9GwGm4skL7YiPPIgfsjO g0ckXlNX32ere9ST735gxnNuClG0ZyaN7AJc/x1xj2zzUZuvcIu6794ciocfi/q4hQ+y AttUMfTjhy0b7scRPJmEXIk+w5uv/GRkbnXMt83CeVx7mWRK8emWh6i1tetM6v033uu/ UokmUCwcmwgzlLFGeS8lYUvgXCl8Jujx/XbFD5FOlH5JOEyHIjuj9cSzn2B3IuAzij9R yfKpd5/UAm0gIfX141MrLIk8A9zQsFqXe4zHadTANKlBrtdKp2v240xOUlXMO1VhqnTc JamQ== X-Gm-Message-State: AMke39lBmHe85VijkzeiY0Eo33znsJRc1QDz55f5qb5JT29TAFHpi76cl7Ms3MCaT48NvEiYAcYEzRuk9lrEhQ== X-Received: by 10.36.135.194 with SMTP id f185mr3382064ite.85.1487361405354; Fri, 17 Feb 2017 11:56:45 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.145.217 with HTTP; Fri, 17 Feb 2017 11:56:44 -0800 (PST) X-Originating-IP: [50.253.99.174] In-Reply-To: References: <34e4e9bd-c7a8-e3e2-4cef-98a691ea7944@freebsd.org> <2553875.ilSvFZYQZ6@ralph.baldwin.cx> <1907688.dXvDEfTesD@ralph.baldwin.cx> From: Warner Losh Date: Fri, 17 Feb 2017 12:56:44 -0700 X-Google-Sender-Auth: 2ZC5YXgMsHwFGPsGfuTuJTlTTU4 Message-ID: Subject: Re: Thinning out GENERIC To: Sean Bruno Cc: John Baldwin , "freebsd-arch@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Feb 2017 19:56:46 -0000 On Fri, Feb 17, 2017 at 12:54 PM, Sean Bruno wrote: > > > On 02/17/17 12:49, John Baldwin wrote: >> On Friday, February 17, 2017 11:43:45 AM Sean Bruno wrote: >>> >>> On 02/13/17 11:33, John Baldwin wrote: >>>> On Monday, February 13, 2017 10:51:36 AM Warner Losh wrote: >>>>> [[ It isn't just GENERIC, it's in every single kernel ]] >>>>> >>>>> On Sun, Feb 12, 2017 at 7:59 AM, Sean Bruno wrote: >>>>>> Index: sys/conf/files >>>>>> =================================================================== >>>>>> --- sys/conf/files (revision 313683) >>>>>> +++ sys/conf/files (working copy) >>>>>> @@ -2419,7 +2419,7 @@ >>>>>> dev/pci/pci_user.c optional pci >>>>>> dev/pci/pcib_if.m standard >>>>>> dev/pci/pcib_support.c standard >>>>>> -dev/pci/vga_pci.c optional pci >>>>>> +#dev/pci/vga_pci.c optional pci >>>>>> dev/pcn/if_pcn.c optional pcn pci >>>>>> dev/pdq/if_fea.c optional fea eisa >>>>>> dev/pdq/if_fpa.c optional fpa pci >>>>>> >>>>>> I'm playing around with small x86 builds and wanted to come up with a >>>>>> knob that disables the vga_pci driver. Obviously I still want pci(4) to >>>>>> be enabled, but I definitely do not need the vga interfaces for >>>>>> anything. Any suggestions? >>>>> >>>>> You could make it dependent on vt or sc as well as pci, no? >>>> >>>> This is a fairly small driver: >>>> >>>> 6139 340 8 6487 0x1957 /usr/obj/usr/src/sys/GENERIC >>>> /vga_pci.o >>>> >>>> (From an 11.0-stable build) >>>> >>>> device ppc and friends is a lot more for example: >>>> >>>> text data bss dec hex filename >>>> 6238 0 0 6238 0x185e /usr/obj/usr/src/sys/GENERIC/ppb_1284.o >>>> 1675 28 0 1703 0x6a7 /usr/obj/usr/src/sys/GENERIC/ppb_base.o >>>> 2042 0 0 2042 0x7fa /usr/obj/usr/src/sys/GENERIC/ppb_msq.o >>>> 6025 296 8 6329 0x18b9 /usr/obj/usr/src/sys/GENERIC/ppbconf.o >>>> 0 168 0 168 0xa8 /usr/obj/usr/src/sys/GENERIC/ppbus_if.o >>>> 9099 36 0 9135 0x23af /usr/obj/usr/src/sys/GENERIC/ppc.o >>>> 495 256 0 751 0x2ef /usr/obj/usr/src/sys/GENERIC/ppc_acpi.o >>>> 1671 256 0 1927 0x787 /usr/obj/usr/src/sys/GENERIC/ppc_isa.o >>>> 1124 208 0 1332 0x534 /usr/obj/usr/src/sys/GENERIC/ppc_pci.o >>>> 451 208 0 659 0x293 /usr/obj/usr/src/sys/GENERIC/ppc_puc.o >>>> 2751 428 8 3187 0xc73 /usr/obj/usr/src/sys/GENERIC/ppi.o >>>> >>>> It is needed for drm. >>>> >>> >>> Ok, so ... make it dependant on drm, vt, sc and pci? >> >> You can kldload drm at runtime, so a static dependency isn't sufficient. >> It's not clear why removing this from GENERIC is that important. ppc is on far >> fewer machines than vga_pci and takes up 10x more space. >> > > I don't want to remove it from GENERIC. I want to add the capability to > remove it. Sorry if that wasn't clear from my subject line, because it > doesn't look clear now that I re-read it. He likely wants to remove a lot of other things too. He's not asking about those because the are already easy to remove :) You'd want to make it a module, then have drm depend on the module as well as the static dependencies you outlines. And yes, this does highlight some issues with our current build system... Warner