From owner-svn-src-head@freebsd.org Sun Apr 9 14:31:42 2017 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 C1196D3642C; Sun, 9 Apr 2017 14:31:42 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7A15DDE1; Sun, 9 Apr 2017 14:31:42 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v39EVfoR078865; Sun, 9 Apr 2017 14:31:41 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v39EVfLW078861; Sun, 9 Apr 2017 14:31:41 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201704091431.v39EVfLW078861@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 9 Apr 2017 14:31:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316656 - in head/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 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: Sun, 09 Apr 2017 14:31:42 -0000 Author: hselasky Date: Sun Apr 9 14:31:41 2017 New Revision: 316656 URL: https://svnweb.freebsd.org/changeset/base/316656 Log: Fix compilation of LinuxKPI for PowerPC. Found by: emaste @ MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/mm.h head/sys/compat/linuxkpi/common/include/linux/page.h head/sys/compat/linuxkpi/common/src/linux_compat.c Modified: head/sys/compat/linuxkpi/common/include/linux/mm.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/mm.h Sun Apr 9 12:32:22 2017 (r316655) +++ head/sys/compat/linuxkpi/common/include/linux/mm.h Sun Apr 9 14:31:41 2017 (r316656) @@ -91,7 +91,7 @@ CTASSERT((VM_PROT_ALL & -(1 << 8)) == 0) #define FAULT_FLAG_REMOTE (1 << 7) #define FAULT_FLAG_INSTRUCTION (1 << 8) -typedef int (*pte_fn_t)(pte_t *, pgtable_t, unsigned long addr, void *data); +typedef int (*pte_fn_t)(linux_pte_t *, pgtable_t, unsigned long addr, void *data); struct vm_area_struct { vm_offset_t vm_start; Modified: head/sys/compat/linuxkpi/common/include/linux/page.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/page.h Sun Apr 9 12:32:22 2017 (r316655) +++ head/sys/compat/linuxkpi/common/include/linux/page.h Sun Apr 9 14:31:41 2017 (r316656) @@ -40,9 +40,9 @@ #include #include -typedef unsigned long pte_t; -typedef unsigned long pmd_t; -typedef unsigned long pgd_t; +typedef unsigned long linux_pte_t; +typedef unsigned long linux_pmd_t; +typedef unsigned long linux_pgd_t; typedef unsigned long pgprot_t; #define page vm_page Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_compat.c Sun Apr 9 12:32:22 2017 (r316655) +++ head/sys/compat/linuxkpi/common/src/linux_compat.c Sun Apr 9 14:31:41 2017 (r316656) @@ -411,7 +411,7 @@ linux_cdev_pager_populate(vm_object_t vm MPASS(vmap->vm_private_data == vm_obj->handle); /* fill out VM fault structure */ - vmf.virtual_address = (void *)(pidx << PAGE_SHIFT); + vmf.virtual_address = (void *)((uintptr_t)pidx << PAGE_SHIFT); vmf.flags = (fault_type & VM_PROT_WRITE) ? FAULT_FLAG_WRITE : 0; vmf.pgoff = 0; vmf.page = NULL;