From owner-svn-src-all@freebsd.org Tue Mar 14 17:34:55 2017 Return-Path: Delivered-To: svn-src-all@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 5B318D0C77E; Tue, 14 Mar 2017 17:34:55 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from mr11p00im-asmtp002.me.com (mr11p00im-asmtp002.me.com [17.110.69.253]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3EC09D4D; Tue, 14 Mar 2017 17:34:55 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from process-dkim-sign-daemon.mr11p00im-asmtp002.me.com by mr11p00im-asmtp002.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) id <0OMT00A00E1YP300@mr11p00im-asmtp002.me.com>; Tue, 14 Mar 2017 17:34:46 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mac.com; s=4d515a; t=1489512886; bh=nqfvHEGq/J+5Q844XP8gCTV553bRbNggR3EkdXo886c=; h=Date:Subject:From:To:Message-id:MIME-version:Content-type; b=h9b3D8vYb62bqeXh5z117CJhe919tJ6co2haqeja67hym7ZBBqk9lVDZFz4AZgckp 7r45v82ECc73oq5hrKYp3P9TcmFkwYyrKY026SPVFhYvqHZ/AZAp98twJ+b6r3852S cUYttevldzvdsZDPB6s6ArVJYhIThW/K/vucjT+WmwWd+He4GjoQxYLiOjPDzpq8V4 Rg0hHoY3EFLPNFnm+YXvhr8qccB5PL+aAnUw2L1TEOY/LGM4/cI3Lzc8FuQyK7lIzw O8KAy+UOYgAXQsko23NpoTnNSPgXn37OBOO4u+ROmBO+mnHgpq7LvknJEakgXUuGOh C+x+lm0m4/lqw== Received: from icloud.com ([127.0.0.1]) by mr11p00im-asmtp002.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) with ESMTPSA id <0OMT00CU4FHVUD30@mr11p00im-asmtp002.me.com>; Tue, 14 Mar 2017 17:34:44 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-03-14_09:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1034 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1701120000 definitions=main-1703140136 User-Agent: Microsoft-MacOutlook/f.1f.0.170216 Date: Tue, 14 Mar 2017 10:34:42 -0700 Subject: Re: svn commit: r314591 - in stable/11/sys: amd64/amd64 conf i386/i386 modules/mem x86/x86 From: Ravi Pokala Sender: "Pokala, Ravi" To: Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Message-id: <1FC1B5E1-D37F-4719-B282-DE2CFF84CD36@panasas.com> Thread-topic: svn commit: r314591 - in stable/11/sys: amd64/amd64 conf i386/i386 modules/mem x86/x86 References: <201703031030.v23AUVvs015379@repo.freebsd.org> In-reply-to: <201703031030.v23AUVvs015379@repo.freebsd.org> MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Mar 2017 17:34:55 -0000 Hi Konstantin, It looks like this broke pc98 in stable/11 (where it is still supported): make[5]: make[5]: don't know how to make /usr/home/rpokala/freebsd/clean/base/stable/11/sys/i386/i386/i686_mem.c. Stop Thanks, Ravi (rpokala@) -----Original Message----- From: on behalf of Konstantin Belousov Date: 2017-03-03, Friday at 02:30 To: , , , Subject: svn commit: r314591 - in stable/11/sys: amd64/amd64 conf i386/i386 modules/mem x86/x86 Author: kib Date: Fri Mar 3 10:30:30 2017 New Revision: 314591 URL: https://svnweb.freebsd.org/changeset/base/314591 Log: MFC r313898, r313902, r313903, r313934, r314087, r314252: Merge i386 and amd64 mtrr drivers. Added: stable/11/sys/x86/x86/x86_mem.c - copied, changed from r313898, head/sys/x86/x86/x86_mem.c Deleted: stable/11/sys/amd64/amd64/amd64_mem.c stable/11/sys/i386/i386/i686_mem.c Modified: stable/11/sys/conf/files.amd64 stable/11/sys/conf/files.i386 stable/11/sys/modules/mem/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/conf/files.amd64 ============================================================================== --- stable/11/sys/conf/files.amd64 Fri Mar 3 10:17:16 2017 (r314590) +++ stable/11/sys/conf/files.amd64 Fri Mar 3 10:30:30 2017 (r314591) @@ -125,7 +125,6 @@ acpi_wakedata.h optional acpi \ no-obj no-implicit-rule before-depend \ clean "acpi_wakedata.h" # -amd64/amd64/amd64_mem.c optional mem #amd64/amd64/apic_vector.S standard amd64/amd64/atomic.c standard amd64/amd64/bios.c standard @@ -651,6 +650,7 @@ x86/x86/io_apic.c standard x86/x86/legacy.c standard x86/x86/local_apic.c standard x86/x86/mca.c standard +x86/x86/x86_mem.c optional mem x86/x86/mptable.c optional mptable x86/x86/mptable_pci.c optional mptable pci x86/x86/mp_x86.c optional smp Modified: stable/11/sys/conf/files.i386 ============================================================================== --- stable/11/sys/conf/files.i386 Fri Mar 3 10:17:16 2017 (r314590) +++ stable/11/sys/conf/files.i386 Fri Mar 3 10:30:30 2017 (r314591) @@ -486,7 +486,6 @@ i386/i386/elf_machdep.c standard i386/i386/exception.s standard i386/i386/gdb_machdep.c optional gdb i386/i386/geode.c optional cpu_geode -i386/i386/i686_mem.c optional mem i386/i386/in_cksum.c optional inet | inet6 i386/i386/initcpu.c standard i386/i386/io.c optional io @@ -625,6 +624,7 @@ x86/x86/io_apic.c optional apic x86/x86/legacy.c standard x86/x86/local_apic.c optional apic x86/x86/mca.c standard +x86/x86/x86_mem.c optional mem x86/x86/mptable.c optional apic x86/x86/mptable_pci.c optional apic pci x86/x86/mp_x86.c optional smp Modified: stable/11/sys/modules/mem/Makefile ============================================================================== --- stable/11/sys/modules/mem/Makefile Fri Mar 3 10:17:16 2017 (r314590) +++ stable/11/sys/modules/mem/Makefile Fri Mar 3 10:30:30 2017 (r314591) @@ -3,14 +3,17 @@ .PATH: ${.CURDIR}/../../dev/mem .PATH: ${.CURDIR}/../../${MACHINE}/${MACHINE} .PATH: ${.CURDIR}/../../${MACHINE_CPUARCH}/${MACHINE_CPUARCH} +.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" +.PATH: ${.CURDIR}/../../x86/x86 +.endif KMOD= mem SRCS= mem.c memdev.c memutil.c .if ${MACHINE_CPUARCH} == "i386" -SRCS+= i686_mem.c k6_mem.c +SRCS+= x86_mem.c k6_mem.c .endif .if ${MACHINE_CPUARCH} == "amd64" -SRCS+= amd64_mem.c +SRCS+= x86_mem.c .endif SRCS+= bus_if.h device_if.h Copied and modified: stable/11/sys/x86/x86/x86_mem.c (from r313898, head/sys/x86/x86/x86_mem.c) ============================================================================== --- head/sys/x86/x86/x86_mem.c Fri Feb 17 21:08:32 2017 (r313898, copy source) +++ stable/11/sys/x86/x86/x86_mem.c Fri Mar 3 10:30:30 2017 (r314591) @@ -260,7 +260,7 @@ x86_mrfetch(struct mem_range_softc *sc) /* Compute the range from the mask. Ick. */ mrd->mr_len = (~(msrv & mtrr_physmask) & - (mtrr_physmask | 0xfffL)) + 1; + (mtrr_physmask | 0xfff)) + 1; if (!mrvalid(mrd->mr_base, mrd->mr_len)) mrd->mr_flags |= MDF_BOGUS; @@ -303,19 +303,13 @@ x86_mrt2mtrr(int flags, int oldval) * Update running CPU(s) MTRRs to match the ranges in the descriptor * list. * - * XXX Must be called with interrupts enabled. + * Must be called with interrupts enabled. */ static void x86_mrstore(struct mem_range_softc *sc) { -#ifdef SMP smp_rendezvous(NULL, x86_mrstoreone, NULL, sc); -#else - disable_intr(); /* disable interrupts */ - x86_mrstoreone(sc); - enable_intr(); -#endif } /* @@ -644,7 +638,8 @@ x86_mrinit(struct mem_range_softc *sc) * Determine the size of the PhysMask and PhysBase fields in * the variable range MTRRs. */ - mtrr_physmask = ((1UL << cpu_maxphyaddr) - 1) & ~0xfffUL; + mtrr_physmask = (((uint64_t)1 << cpu_maxphyaddr) - 1) & + ~(uint64_t)0xfff; /* If fixed MTRRs supported and enabled. */ if ((mtrrcap & MTRR_CAP_FIXED) && (mtrrdef & MTRR_DEF_FIXED_ENABLE)) { @@ -710,19 +705,13 @@ x86_mrAPinit(struct mem_range_softc *sc) * Re-initialise running CPU(s) MTRRs to match the ranges in the descriptor * list. * - * XXX Must be called with interrupts enabled. + * Must be called with interrupts enabled. */ static void x86_mrreinit(struct mem_range_softc *sc) { -#ifdef SMP - smp_rendezvous(NULL, (void *)x86_mrAPinit, NULL, sc); -#else - disable_intr(); /* disable interrupts */ - x86_mrAPinit(sc); - enable_intr(); -#endif + smp_rendezvous(NULL, (void (*)(void *))x86_mrAPinit, NULL, sc); } static void @@ -733,16 +722,6 @@ x86_mem_drvinit(void *unused) return; if (!(cpu_feature & CPUID_MTRR)) return; - if ((cpu_id & 0xf00) != 0x600 && (cpu_id & 0xf00) != 0xf00) - return; - switch (cpu_vendor_id) { - case CPU_VENDOR_INTEL: - case CPU_VENDOR_AMD: - case CPU_VENDOR_CENTAUR: - break; - default: - return; - } mem_range_softc.mr_op = &x86_mrops; x86_mrinit(&mem_range_softc); }