You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'akpm' (patches from Andrew)
Merge yet more updates from Andrew Morton: - the rest of MM - various misc fixes and tweaks * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (22 commits) mm: Change return type int to vm_fault_t for fault handlers lib/fonts: convert comments to utf-8 s390: ebcdic: convert comments to UTF-8 treewide: convert ISO_8859-1 text comments to utf-8 drivers/gpu/drm/gma500/: change return type to vm_fault_t docs/core-api: mm-api: add section about GFP flags docs/mm: make GFP flags descriptions usable as kernel-doc docs/core-api: split memory management API to a separate file docs/core-api: move *{str,mem}dup* to "String Manipulation" docs/core-api: kill trailing whitespace in kernel-api.rst mm/util: add kernel-doc for kvfree mm/util: make strndup_user description a kernel-doc comment fs/proc/vmcore.c: hide vmcoredd_mmap_dumps() for nommu builds treewide: correct "differenciate" and "instanciate" typos fs/afs: use new return type vm_fault_t drivers/hwtracing/intel_th/msu.c: change return type to vm_fault_t mm: soft-offline: close the race against page allocation mm: fix race on soft-offlining free huge pages namei: allow restricted O_CREAT of FIFOs and regular files hfs: prevent crash on exit from failed search ...
This commit is contained in:
@@ -27,6 +27,7 @@ Core utilities
|
||||
errseq
|
||||
printk-formats
|
||||
circular-buffers
|
||||
mm-api
|
||||
gfp_mask-from-fs-io
|
||||
timekeeping
|
||||
boot-time-mm
|
||||
|
||||
@@ -39,6 +39,10 @@ String Manipulation
|
||||
.. kernel-doc:: lib/string.c
|
||||
:export:
|
||||
|
||||
.. kernel-doc:: mm/util.c
|
||||
:functions: kstrdup kstrdup_const kstrndup kmemdup kmemdup_nul memdup_user
|
||||
vmemdup_user strndup_user memdup_user_nul
|
||||
|
||||
Basic Kernel Library Functions
|
||||
==============================
|
||||
|
||||
@@ -155,60 +159,6 @@ UUID/GUID
|
||||
.. kernel-doc:: lib/uuid.c
|
||||
:export:
|
||||
|
||||
Memory Management in Linux
|
||||
==========================
|
||||
|
||||
The Slab Cache
|
||||
--------------
|
||||
|
||||
.. kernel-doc:: include/linux/slab.h
|
||||
:internal:
|
||||
|
||||
.. kernel-doc:: mm/slab.c
|
||||
:export:
|
||||
|
||||
.. kernel-doc:: mm/util.c
|
||||
:export:
|
||||
|
||||
User Space Memory Access
|
||||
------------------------
|
||||
|
||||
.. kernel-doc:: arch/x86/include/asm/uaccess.h
|
||||
:internal:
|
||||
|
||||
.. kernel-doc:: arch/x86/lib/usercopy_32.c
|
||||
:export:
|
||||
|
||||
More Memory Management Functions
|
||||
--------------------------------
|
||||
|
||||
.. kernel-doc:: mm/readahead.c
|
||||
:export:
|
||||
|
||||
.. kernel-doc:: mm/filemap.c
|
||||
:export:
|
||||
|
||||
.. kernel-doc:: mm/memory.c
|
||||
:export:
|
||||
|
||||
.. kernel-doc:: mm/vmalloc.c
|
||||
:export:
|
||||
|
||||
.. kernel-doc:: mm/page_alloc.c
|
||||
:internal:
|
||||
|
||||
.. kernel-doc:: mm/mempool.c
|
||||
:export:
|
||||
|
||||
.. kernel-doc:: mm/dmapool.c
|
||||
:export:
|
||||
|
||||
.. kernel-doc:: mm/page-writeback.c
|
||||
:export:
|
||||
|
||||
.. kernel-doc:: mm/truncate.c
|
||||
:export:
|
||||
|
||||
Kernel IPC facilities
|
||||
=====================
|
||||
|
||||
@@ -437,4 +387,3 @@ Read-Copy Update (RCU)
|
||||
.. kernel-doc:: include/linux/rcu_sync.h
|
||||
|
||||
.. kernel-doc:: kernel/rcu/sync.c
|
||||
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
======================
|
||||
Memory Management APIs
|
||||
======================
|
||||
|
||||
User Space Memory Access
|
||||
========================
|
||||
|
||||
.. kernel-doc:: arch/x86/include/asm/uaccess.h
|
||||
:internal:
|
||||
|
||||
.. kernel-doc:: arch/x86/lib/usercopy_32.c
|
||||
:export:
|
||||
|
||||
.. kernel-doc:: mm/util.c
|
||||
:functions: get_user_pages_fast
|
||||
|
||||
Memory Allocation Controls
|
||||
==========================
|
||||
|
||||
Functions which need to allocate memory often use GFP flags to express
|
||||
how that memory should be allocated. The GFP acronym stands for "get
|
||||
free pages", the underlying memory allocation function. Not every GFP
|
||||
flag is allowed to every function which may allocate memory. Most
|
||||
users will want to use a plain ``GFP_KERNEL``.
|
||||
|
||||
.. kernel-doc:: include/linux/gfp.h
|
||||
:doc: Page mobility and placement hints
|
||||
|
||||
.. kernel-doc:: include/linux/gfp.h
|
||||
:doc: Watermark modifiers
|
||||
|
||||
.. kernel-doc:: include/linux/gfp.h
|
||||
:doc: Reclaim modifiers
|
||||
|
||||
.. kernel-doc:: include/linux/gfp.h
|
||||
:doc: Common combinations
|
||||
|
||||
The Slab Cache
|
||||
==============
|
||||
|
||||
.. kernel-doc:: include/linux/slab.h
|
||||
:internal:
|
||||
|
||||
.. kernel-doc:: mm/slab.c
|
||||
:export:
|
||||
|
||||
.. kernel-doc:: mm/util.c
|
||||
:functions: kfree_const kvmalloc_node kvfree
|
||||
|
||||
More Memory Management Functions
|
||||
================================
|
||||
|
||||
.. kernel-doc:: mm/readahead.c
|
||||
:export:
|
||||
|
||||
.. kernel-doc:: mm/filemap.c
|
||||
:export:
|
||||
|
||||
.. kernel-doc:: mm/memory.c
|
||||
:export:
|
||||
|
||||
.. kernel-doc:: mm/vmalloc.c
|
||||
:export:
|
||||
|
||||
.. kernel-doc:: mm/page_alloc.c
|
||||
:internal:
|
||||
|
||||
.. kernel-doc:: mm/mempool.c
|
||||
:export:
|
||||
|
||||
.. kernel-doc:: mm/dmapool.c
|
||||
:export:
|
||||
|
||||
.. kernel-doc:: mm/page-writeback.c
|
||||
:export:
|
||||
|
||||
.. kernel-doc:: mm/truncate.c
|
||||
:export:
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
Required properties:
|
||||
- compatible: Should be "nxp,pn544-i2c".
|
||||
- clock-frequency: I²C work frequency.
|
||||
- clock-frequency: I²C work frequency.
|
||||
- reg: address on the bus
|
||||
- interrupts: GPIO interrupt to which the chip is connected
|
||||
- enable-gpios: Output GPIO pin used for enabling/disabling the PN544
|
||||
|
||||
@@ -49,7 +49,7 @@ compatible (optional) - standard definition
|
||||
- may contain the following strings:
|
||||
- shared-dma-pool: This indicates a region of memory meant to be
|
||||
used as a shared pool of DMA buffers for a set of devices. It can
|
||||
be used by an operating system to instanciate the necessary pool
|
||||
be used by an operating system to instantiate the necessary pool
|
||||
management subsystem if necessary.
|
||||
- vendor specific string in the form <vendor>,[<device>-]<usage>
|
||||
no-map (optional) - empty property
|
||||
|
||||
@@ -34,7 +34,9 @@ Currently, these files are in /proc/sys/fs:
|
||||
- overflowgid
|
||||
- pipe-user-pages-hard
|
||||
- pipe-user-pages-soft
|
||||
- protected_fifos
|
||||
- protected_hardlinks
|
||||
- protected_regular
|
||||
- protected_symlinks
|
||||
- suid_dumpable
|
||||
- super-max
|
||||
@@ -182,6 +184,24 @@ applied.
|
||||
|
||||
==============================================================
|
||||
|
||||
protected_fifos:
|
||||
|
||||
The intent of this protection is to avoid unintentional writes to
|
||||
an attacker-controlled FIFO, where a program expected to create a regular
|
||||
file.
|
||||
|
||||
When set to "0", writing to FIFOs is unrestricted.
|
||||
|
||||
When set to "1" don't allow O_CREAT open on FIFOs that we don't own
|
||||
in world writable sticky directories, unless they are owned by the
|
||||
owner of the directory.
|
||||
|
||||
When set to "2" it also applies to group writable sticky directories.
|
||||
|
||||
This protection is based on the restrictions in Openwall.
|
||||
|
||||
==============================================================
|
||||
|
||||
protected_hardlinks:
|
||||
|
||||
A long-standing class of security issues is the hardlink-based
|
||||
@@ -202,6 +222,22 @@ This protection is based on the restrictions in Openwall and grsecurity.
|
||||
|
||||
==============================================================
|
||||
|
||||
protected_regular:
|
||||
|
||||
This protection is similar to protected_fifos, but it
|
||||
avoids writes to an attacker-controlled regular file, where a program
|
||||
expected to create one.
|
||||
|
||||
When set to "0", writing to regular files is unrestricted.
|
||||
|
||||
When set to "1" don't allow O_CREAT open on regular files that we
|
||||
don't own in world writable sticky directories, unless they are
|
||||
owned by the owner of the directory.
|
||||
|
||||
When set to "2" it also applies to group writable sticky directories.
|
||||
|
||||
==============================================================
|
||||
|
||||
protected_symlinks:
|
||||
|
||||
A long-standing class of security issues is the symlink-based
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Copyright 2014 Open Source Support GmbH
|
||||
*
|
||||
* David Lanzendörfer <david.lanzendoerfer@o2s.ch>
|
||||
* David Lanzendörfer <david.lanzendoerfer@o2s.ch>
|
||||
*
|
||||
* This file is dual-licensed: you can use it either under the terms
|
||||
* of the GPL or the X11 license, at your option. Note that this dual
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Glue code for the SHA256 Secure Hash Algorithm assembly implementation
|
||||
* using optimized ARM assembler and NEON instructions.
|
||||
*
|
||||
* Copyright © 2015 Google Inc.
|
||||
* Copyright © 2015 Google Inc.
|
||||
*
|
||||
* This file is based on sha256_ssse3_glue.c:
|
||||
* Copyright (C) 2013 Intel Corporation
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
* Glue code for the SHA256 Secure Hash Algorithm assembly implementation
|
||||
* using NEON instructions.
|
||||
*
|
||||
* Copyright © 2015 Google Inc.
|
||||
* Copyright © 2015 Google Inc.
|
||||
*
|
||||
* This file is based on sha512_neon_glue.c:
|
||||
* Copyright © 2014 Jussi Kivilinna <jussi.kivilinna@iki.fi>
|
||||
* Copyright © 2014 Jussi Kivilinna <jussi.kivilinna@iki.fi>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
|
||||
@@ -514,7 +514,7 @@ static void kvmppc_set_msr_pr(struct kvm_vcpu *vcpu, u64 msr)
|
||||
/*
|
||||
* When switching from 32 to 64-bit, we may have a stale 32-bit
|
||||
* magic page around, we need to flush it. Typically 32-bit magic
|
||||
* page will be instanciated when calling into RTAS. Note: We
|
||||
* page will be instantiated when calling into RTAS. Note: We
|
||||
* assume that such transition only happens while in kernel mode,
|
||||
* ie, we never transition from user 32-bit to kernel 64-bit with
|
||||
* a 32-bit magic page around.
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
* Virtual mode variants of the hcalls for use on radix/radix
|
||||
* with AIL. They require the VCPU's VP to be "pushed"
|
||||
*
|
||||
* We still instanciate them here because we use some of the
|
||||
* We still instantiate them here because we use some of the
|
||||
* generated utility functions as well in this file.
|
||||
*/
|
||||
#define XIVE_RUNTIME_CHECKS
|
||||
|
||||
@@ -1192,7 +1192,7 @@ static void pmac_i2c_devscan(void (*callback)(struct device_node *dev,
|
||||
{ NULL, NULL, 0 },
|
||||
};
|
||||
|
||||
/* Only some devices need to have platform functions instanciated
|
||||
/* Only some devices need to have platform functions instantiated
|
||||
* here. For now, we have a table. Others, like 9554 i2c GPIOs used
|
||||
* on Xserve, if we ever do a driver for them, will use their own
|
||||
* platform function instance
|
||||
|
||||
@@ -266,7 +266,7 @@ static unsigned int xive_get_irq(void)
|
||||
* of pending priorities. This will also have the effect of
|
||||
* updating the CPPR to the most favored pending interrupts.
|
||||
*
|
||||
* In the future, if we have a way to differenciate a first
|
||||
* In the future, if we have a way to differentiate a first
|
||||
* entry (on HW interrupt) from a replay triggered by EOI,
|
||||
* we could skip this on replays unless we soft-mask tells us
|
||||
* that a new HW interrupt occurred.
|
||||
|
||||
+18
-18
@@ -111,15 +111,15 @@ __u8 _ebcasc[256] =
|
||||
0x07, 0x07, 0x16, 0x07, 0x07, 0x07, 0x07, 0x04,
|
||||
/* 0x38 -SBS -IT -RFF -CU3 DC4 NAK ---- SUB */
|
||||
0x07, 0x07, 0x07, 0x07, 0x14, 0x15, 0x07, 0x1A,
|
||||
/* 0x40 SP RSP �ä ---- */
|
||||
/* 0x40 SP RSP ä ---- */
|
||||
0x20, 0xFF, 0x83, 0x84, 0x85, 0xA0, 0x07, 0x86,
|
||||
/* 0x48 . < ( + | */
|
||||
0x87, 0xA4, 0x9B, 0x2E, 0x3C, 0x28, 0x2B, 0x7C,
|
||||
/* 0x50 & ---- */
|
||||
0x26, 0x82, 0x88, 0x89, 0x8A, 0xA1, 0x8C, 0x07,
|
||||
/* 0x58 �ß ! $ * ) ; */
|
||||
/* 0x58 ß ! $ * ) ; */
|
||||
0x8D, 0xE1, 0x21, 0x24, 0x2A, 0x29, 0x3B, 0xAA,
|
||||
/* 0x60 - / ---- �Ä ---- ---- ---- */
|
||||
/* 0x60 - / ---- Ä ---- ---- ---- */
|
||||
0x2D, 0x2F, 0x07, 0x8E, 0x07, 0x07, 0x07, 0x8F,
|
||||
/* 0x68 ---- , % _ > ? */
|
||||
0x80, 0xA5, 0x07, 0x2C, 0x25, 0x5F, 0x3E, 0x3F,
|
||||
@@ -131,7 +131,7 @@ __u8 _ebcasc[256] =
|
||||
0x07, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
|
||||
/* 0x88 h i ---- ---- ---- */
|
||||
0x68, 0x69, 0xAE, 0xAF, 0x07, 0x07, 0x07, 0xF1,
|
||||
/* 0x90 �° j k l m n o p */
|
||||
/* 0x90 ° j k l m n o p */
|
||||
0xF8, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70,
|
||||
/* 0x98 q r ---- ---- */
|
||||
0x71, 0x72, 0xA6, 0xA7, 0x91, 0x07, 0x92, 0x07,
|
||||
@@ -139,25 +139,25 @@ __u8 _ebcasc[256] =
|
||||
0xE6, 0x7E, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78,
|
||||
/* 0xA8 y z ---- ---- ---- ---- */
|
||||
0x79, 0x7A, 0xAD, 0xAB, 0x07, 0x07, 0x07, 0x07,
|
||||
/* 0xB0 ^ ---- �§ ---- */
|
||||
/* 0xB0 ^ ---- § ---- */
|
||||
0x5E, 0x9C, 0x9D, 0xFA, 0x07, 0x07, 0x07, 0xAC,
|
||||
/* 0xB8 ---- [ ] ---- ---- ---- ---- */
|
||||
0xAB, 0x07, 0x5B, 0x5D, 0x07, 0x07, 0x07, 0x07,
|
||||
/* 0xC0 { A B C D E F G */
|
||||
0x7B, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
|
||||
/* 0xC8 H I ---- �ö ---- */
|
||||
/* 0xC8 H I ---- ö ---- */
|
||||
0x48, 0x49, 0x07, 0x93, 0x94, 0x95, 0xA2, 0x07,
|
||||
/* 0xD0 } J K L M N O P */
|
||||
0x7D, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50,
|
||||
/* 0xD8 Q R ---- �ü */
|
||||
/* 0xD8 Q R ---- ü */
|
||||
0x51, 0x52, 0x07, 0x96, 0x81, 0x97, 0xA3, 0x98,
|
||||
/* 0xE0 \ S T U V W X */
|
||||
0x5C, 0xF6, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58,
|
||||
/* 0xE8 Y Z ---- �Ö ---- ---- ---- */
|
||||
/* 0xE8 Y Z ---- Ö ---- ---- ---- */
|
||||
0x59, 0x5A, 0xFD, 0x07, 0x99, 0x07, 0x07, 0x07,
|
||||
/* 0xF0 0 1 2 3 4 5 6 7 */
|
||||
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
|
||||
/* 0xF8 8 9 ---- ---- �Ü ---- ---- ---- */
|
||||
/* 0xF8 8 9 ---- ---- Ü ---- ---- ---- */
|
||||
0x38, 0x39, 0x07, 0x07, 0x9A, 0x07, 0x07, 0x07
|
||||
};
|
||||
|
||||
@@ -260,15 +260,15 @@ __u8 _ebcasc_500[256] =
|
||||
0x07, 0x07, 0x16, 0x07, 0x07, 0x07, 0x07, 0x04,
|
||||
/* 0x38 -SBS -IT -RFF -CU3 DC4 NAK ---- SUB */
|
||||
0x07, 0x07, 0x07, 0x07, 0x14, 0x15, 0x07, 0x1A,
|
||||
/* 0x40 SP RSP �ä ---- */
|
||||
/* 0x40 SP RSP ä ---- */
|
||||
0x20, 0xFF, 0x83, 0x84, 0x85, 0xA0, 0x07, 0x86,
|
||||
/* 0x48 [ . < ( + ! */
|
||||
0x87, 0xA4, 0x5B, 0x2E, 0x3C, 0x28, 0x2B, 0x21,
|
||||
/* 0x50 & ---- */
|
||||
0x26, 0x82, 0x88, 0x89, 0x8A, 0xA1, 0x8C, 0x07,
|
||||
/* 0x58 �ß ] $ * ) ; ^ */
|
||||
/* 0x58 ß ] $ * ) ; ^ */
|
||||
0x8D, 0xE1, 0x5D, 0x24, 0x2A, 0x29, 0x3B, 0x5E,
|
||||
/* 0x60 - / ---- �Ä ---- ---- ---- */
|
||||
/* 0x60 - / ---- Ä ---- ---- ---- */
|
||||
0x2D, 0x2F, 0x07, 0x8E, 0x07, 0x07, 0x07, 0x8F,
|
||||
/* 0x68 ---- , % _ > ? */
|
||||
0x80, 0xA5, 0x07, 0x2C, 0x25, 0x5F, 0x3E, 0x3F,
|
||||
@@ -280,7 +280,7 @@ __u8 _ebcasc_500[256] =
|
||||
0x07, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
|
||||
/* 0x88 h i ---- ---- ---- */
|
||||
0x68, 0x69, 0xAE, 0xAF, 0x07, 0x07, 0x07, 0xF1,
|
||||
/* 0x90 �° j k l m n o p */
|
||||
/* 0x90 ° j k l m n o p */
|
||||
0xF8, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70,
|
||||
/* 0x98 q r ---- ---- */
|
||||
0x71, 0x72, 0xA6, 0xA7, 0x91, 0x07, 0x92, 0x07,
|
||||
@@ -288,25 +288,25 @@ __u8 _ebcasc_500[256] =
|
||||
0xE6, 0x7E, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78,
|
||||
/* 0xA8 y z ---- ---- ---- ---- */
|
||||
0x79, 0x7A, 0xAD, 0xAB, 0x07, 0x07, 0x07, 0x07,
|
||||
/* 0xB0 ---- �§ ---- */
|
||||
/* 0xB0 ---- § ---- */
|
||||
0x9B, 0x9C, 0x9D, 0xFA, 0x07, 0x07, 0x07, 0xAC,
|
||||
/* 0xB8 ---- | ---- ---- ---- ---- */
|
||||
0xAB, 0x07, 0xAA, 0x7C, 0x07, 0x07, 0x07, 0x07,
|
||||
/* 0xC0 { A B C D E F G */
|
||||
0x7B, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
|
||||
/* 0xC8 H I ---- �ö ---- */
|
||||
/* 0xC8 H I ---- ö ---- */
|
||||
0x48, 0x49, 0x07, 0x93, 0x94, 0x95, 0xA2, 0x07,
|
||||
/* 0xD0 } J K L M N O P */
|
||||
0x7D, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50,
|
||||
/* 0xD8 Q R ---- �ü */
|
||||
/* 0xD8 Q R ---- ü */
|
||||
0x51, 0x52, 0x07, 0x96, 0x81, 0x97, 0xA3, 0x98,
|
||||
/* 0xE0 \ S T U V W X */
|
||||
0x5C, 0xF6, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58,
|
||||
/* 0xE8 Y Z ---- �Ö ---- ---- ---- */
|
||||
/* 0xE8 Y Z ---- Ö ---- ---- ---- */
|
||||
0x59, 0x5A, 0xFD, 0x07, 0x99, 0x07, 0x07, 0x07,
|
||||
/* 0xF0 0 1 2 3 4 5 6 7 */
|
||||
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
|
||||
/* 0xF8 8 9 ---- ---- �Ü ---- ---- ---- */
|
||||
/* 0xF8 8 9 ---- ---- Ü ---- ---- ---- */
|
||||
0x38, 0x39, 0x07, 0x07, 0x9A, 0x07, 0x07, 0x07
|
||||
};
|
||||
|
||||
|
||||
@@ -129,9 +129,9 @@ $code=<<___;
|
||||
le?vperm $IN,$IN,$IN,$lemask
|
||||
vxor $zero,$zero,$zero
|
||||
|
||||
vpmsumd $Xl,$IN,$Hl # H.lo·Xi.lo
|
||||
vpmsumd $Xm,$IN,$H # H.hi·Xi.lo+H.lo·Xi.hi
|
||||
vpmsumd $Xh,$IN,$Hh # H.hi·Xi.hi
|
||||
vpmsumd $Xl,$IN,$Hl # H.lo·Xi.lo
|
||||
vpmsumd $Xm,$IN,$H # H.hi·Xi.lo+H.lo·Xi.hi
|
||||
vpmsumd $Xh,$IN,$Hh # H.hi·Xi.hi
|
||||
|
||||
vpmsumd $t2,$Xl,$xC2 # 1st phase
|
||||
|
||||
@@ -187,11 +187,11 @@ $code=<<___;
|
||||
.align 5
|
||||
Loop:
|
||||
subic $len,$len,16
|
||||
vpmsumd $Xl,$IN,$Hl # H.lo·Xi.lo
|
||||
vpmsumd $Xl,$IN,$Hl # H.lo·Xi.lo
|
||||
subfe. r0,r0,r0 # borrow?-1:0
|
||||
vpmsumd $Xm,$IN,$H # H.hi·Xi.lo+H.lo·Xi.hi
|
||||
vpmsumd $Xm,$IN,$H # H.hi·Xi.lo+H.lo·Xi.hi
|
||||
and r0,r0,$len
|
||||
vpmsumd $Xh,$IN,$Hh # H.hi·Xi.hi
|
||||
vpmsumd $Xh,$IN,$Hh # H.hi·Xi.hi
|
||||
add $inp,$inp,r0
|
||||
|
||||
vpmsumd $t2,$Xl,$xC2 # 1st phase
|
||||
|
||||
@@ -108,7 +108,7 @@ static int psbfb_pan(struct fb_var_screeninfo *var, struct fb_info *info)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int psbfb_vm_fault(struct vm_fault *vmf)
|
||||
static vm_fault_t psbfb_vm_fault(struct vm_fault *vmf)
|
||||
{
|
||||
struct vm_area_struct *vma = vmf->vma;
|
||||
struct psb_framebuffer *psbfb = vma->vm_private_data;
|
||||
@@ -118,7 +118,7 @@ static int psbfb_vm_fault(struct vm_fault *vmf)
|
||||
int page_num;
|
||||
int i;
|
||||
unsigned long address;
|
||||
int ret;
|
||||
vm_fault_t ret = VM_FAULT_SIGBUS;
|
||||
unsigned long pfn;
|
||||
unsigned long phys_addr = (unsigned long)dev_priv->stolen_base +
|
||||
gtt->offset;
|
||||
@@ -131,18 +131,14 @@ static int psbfb_vm_fault(struct vm_fault *vmf)
|
||||
for (i = 0; i < page_num; i++) {
|
||||
pfn = (phys_addr >> PAGE_SHIFT);
|
||||
|
||||
ret = vm_insert_mixed(vma, address,
|
||||
ret = vmf_insert_mixed(vma, address,
|
||||
__pfn_to_pfn_t(pfn, PFN_DEV));
|
||||
if (unlikely((ret == -EBUSY) || (ret != 0 && i > 0)))
|
||||
if (unlikely(ret & VM_FAULT_ERROR))
|
||||
break;
|
||||
else if (unlikely(ret != 0)) {
|
||||
ret = (ret == -ENOMEM) ? VM_FAULT_OOM : VM_FAULT_SIGBUS;
|
||||
return ret;
|
||||
}
|
||||
address += PAGE_SIZE;
|
||||
phys_addr += PAGE_SIZE;
|
||||
}
|
||||
return VM_FAULT_NOPAGE;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void psbfb_vm_open(struct vm_area_struct *vma)
|
||||
|
||||
@@ -134,12 +134,13 @@ int psb_gem_dumb_create(struct drm_file *file, struct drm_device *dev,
|
||||
* vma->vm_private_data points to the GEM object that is backing this
|
||||
* mapping.
|
||||
*/
|
||||
int psb_gem_fault(struct vm_fault *vmf)
|
||||
vm_fault_t psb_gem_fault(struct vm_fault *vmf)
|
||||
{
|
||||
struct vm_area_struct *vma = vmf->vma;
|
||||
struct drm_gem_object *obj;
|
||||
struct gtt_range *r;
|
||||
int ret;
|
||||
int err;
|
||||
vm_fault_t ret;
|
||||
unsigned long pfn;
|
||||
pgoff_t page_offset;
|
||||
struct drm_device *dev;
|
||||
@@ -158,9 +159,10 @@ int psb_gem_fault(struct vm_fault *vmf)
|
||||
/* For now the mmap pins the object and it stays pinned. As things
|
||||
stand that will do us no harm */
|
||||
if (r->mmapping == 0) {
|
||||
ret = psb_gtt_pin(r);
|
||||
if (ret < 0) {
|
||||
dev_err(dev->dev, "gma500: pin failed: %d\n", ret);
|
||||
err = psb_gtt_pin(r);
|
||||
if (err < 0) {
|
||||
dev_err(dev->dev, "gma500: pin failed: %d\n", err);
|
||||
ret = vmf_error(err);
|
||||
goto fail;
|
||||
}
|
||||
r->mmapping = 1;
|
||||
@@ -175,18 +177,9 @@ int psb_gem_fault(struct vm_fault *vmf)
|
||||
pfn = (dev_priv->stolen_base + r->offset) >> PAGE_SHIFT;
|
||||
else
|
||||
pfn = page_to_pfn(r->pages[page_offset]);
|
||||
ret = vm_insert_pfn(vma, vmf->address, pfn);
|
||||
|
||||
ret = vmf_insert_pfn(vma, vmf->address, pfn);
|
||||
fail:
|
||||
mutex_unlock(&dev_priv->mmap_mutex);
|
||||
switch (ret) {
|
||||
case 0:
|
||||
case -ERESTARTSYS:
|
||||
case -EINTR:
|
||||
return VM_FAULT_NOPAGE;
|
||||
case -ENOMEM:
|
||||
return VM_FAULT_OOM;
|
||||
default:
|
||||
return VM_FAULT_SIGBUS;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#define _PSB_DRV_H_
|
||||
|
||||
#include <linux/kref.h>
|
||||
#include <linux/mm_types.h>
|
||||
|
||||
#include <drm/drmP.h>
|
||||
#include <drm/drm_global.h>
|
||||
@@ -749,7 +750,7 @@ extern int psb_gem_get_aperture(struct drm_device *dev, void *data,
|
||||
struct drm_file *file);
|
||||
extern int psb_gem_dumb_create(struct drm_file *file, struct drm_device *dev,
|
||||
struct drm_mode_create_dumb *args);
|
||||
extern int psb_gem_fault(struct vm_fault *vmf);
|
||||
extern vm_fault_t psb_gem_fault(struct vm_fault *vmf);
|
||||
|
||||
/* psb_device.c */
|
||||
extern const struct psb_ops psb_chip_ops;
|
||||
|
||||
@@ -1182,7 +1182,7 @@ static void msc_mmap_close(struct vm_area_struct *vma)
|
||||
mutex_unlock(&msc->buf_mutex);
|
||||
}
|
||||
|
||||
static int msc_mmap_fault(struct vm_fault *vmf)
|
||||
static vm_fault_t msc_mmap_fault(struct vm_fault *vmf)
|
||||
{
|
||||
struct msc_iter *iter = vmf->vma->vm_file->private_data;
|
||||
struct msc *msc = iter->msc;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* LTC2632 Digital to analog convertors spi driver
|
||||
*
|
||||
* Copyright 2017 Maxime Roussin-Bélanger
|
||||
* Copyright 2017 Maxime Roussin-Bélanger
|
||||
* expanded by Silvan Murer <silvan.murer@gmail.com>
|
||||
*
|
||||
* Licensed under the GPL-2.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user