From owner-svn-src-head@freebsd.org Sat Oct 31 00:31:38 2015 Return-Path: Delivered-To: svn-src-head@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 7EE5DA22D40; Sat, 31 Oct 2015 00:31:38 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x233.google.com (mail-ig0-x233.google.com [IPv6:2607:f8b0:4001:c05::233]) (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 4A7A3180E; Sat, 31 Oct 2015 00:31:38 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by igbdj2 with SMTP id dj2so21976053igb.1; Fri, 30 Oct 2015 17:31:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:content-type; bh=pJjyqe/YX4NOxdSe7JzwiqYd/PX8DAOcmC+Iq5CK2MQ=; b=tzDCE0iWEMN7gMxl9nI/WlGEBKikIxbaQ6/RVPlrD0Wr8E4NFm/mKkJeeSMYOshHZT YP14+D9jupS5uCU4FctHQyqEUocAsfVPM5VVHLrvgL2DPZTA7xBafC4sUKS/t2tucYzF Zo+ahm9LcbbcGYw3HP/Mq6+2JHHwTv/u6bQ2YmHZ6lW8sYBMwyj+rqHXC/vrghT3XoW4 Q/Q0TYEqUMVO4rhLyj780QQ93etQmU1pyJYYDuPZjqmG/fXX5iTwOJ794PeXYpvbVl9h /K7rN4RPYu4yG4hAahFL/5D9PZg+Dc+JgrhliIZvdqjPhE+nn7S8U6jR2dot7Bx5hQDE erPA== MIME-Version: 1.0 X-Received: by 10.50.178.141 with SMTP id cy13mr999582igc.61.1446251497726; Fri, 30 Oct 2015 17:31:37 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.46.66 with HTTP; Fri, 30 Oct 2015 17:31:37 -0700 (PDT) In-Reply-To: <201510310029.t9V0TQRM023040@repo.freebsd.org> References: <201510310029.t9V0TQRM023040@repo.freebsd.org> Date: Fri, 30 Oct 2015 17:31:37 -0700 X-Google-Sender-Auth: RgTIAMYT_X3G29LgJ6S-t0f1LPI Message-ID: Subject: Re: svn commit: r290219 - head/sys/mips/mips From: Adrian Chadd To: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Oct 2015 00:31:38 -0000 patch from: ian sorry ian! -a On 30 October 2015 at 17:29, Adrian Chadd wrote: > Author: adrian > Date: Sat Oct 31 00:29:26 2015 > New Revision: 290219 > URL: https://svnweb.freebsd.org/changeset/base/290219 > > Log: > mips: do mips_sync() on sync operations to uncachable memory. > > mips24k/mips74k document that we need an explicit SYNC so to order > things correctly, even with access to uncachable memory. > We were doing calls to SYNC in the cache ops (inv, wbinv) but we > weren't doing it for uncachable memory. > > Modified: > head/sys/mips/mips/busdma_machdep.c > > Modified: head/sys/mips/mips/busdma_machdep.c > ============================================================================== > --- head/sys/mips/mips/busdma_machdep.c Sat Oct 31 00:04:44 2015 (r290218) > +++ head/sys/mips/mips/busdma_machdep.c Sat Oct 31 00:29:26 2015 (r290219) > @@ -1220,11 +1220,12 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus > if (STAILQ_FIRST(&map->bpages)) > _bus_dmamap_sync_bp(dmat, map, op); > > - if (dmat->flags & BUS_DMA_COHERENT) > - return; > - > - if (map->flags & DMAMAP_UNCACHEABLE) > + if ((dmat->flags & BUS_DMA_COHERENT) || > + (map->flags & DMAMAP_UNCACHEABLE)) { > + if (op & BUS_DMASYNC_PREWRITE) > + mips_sync(); > return; > + } > > aligned = (map->flags & DMAMAP_CACHE_ALIGNED) ? 1 : 0; > >