mirror of https://gitee.com/openkylin/linux.git
Merge branch 'akpm' (patches from Andrew)
Merge yet more updates from Andrew Morton: - Almost all of the rest of MM (memcg, slab-generic, slab, pagealloc, gup, hugetlb, pagemap, memremap) - Various other things (hfs, ocfs2, kmod, misc, seqfile) * akpm: (34 commits) ipc/util.c: sysvipc_find_ipc() should increase position index kernel/gcov/fs.c: gcov_seq_next() should increase position index fs/seq_file.c: seq_read(): add info message about buggy .next functions drivers/dma/tegra20-apb-dma.c: fix platform_get_irq.cocci warnings change email address for Pali Rohár selftests: kmod: test disabling module autoloading selftests: kmod: fix handling test numbers above 9 docs: admin-guide: document the kernel.modprobe sysctl fs/filesystems.c: downgrade user-reachable WARN_ONCE() to pr_warn_once() kmod: make request_module() return an error when autoloading is disabled mm/memremap: set caching mode for PCI P2PDMA memory to WC mm/memory_hotplug: add pgprot_t to mhp_params powerpc/mm: thread pgprot_t through create_section_mapping() x86/mm: introduce __set_memory_prot() x86/mm: thread pgprot_t through init_memory_mapping() mm/memory_hotplug: rename mhp_restrictions to mhp_params mm/memory_hotplug: drop the flags field from struct mhp_restrictions mm/special: create generic fallbacks for pte_special() and pte_mkspecial() mm/vma: introduce VM_ACCESS_FLAGS mm/vma: define a default value for VM_DATA_DEFAULT_FLAGS ...
This commit is contained in:
commit
5b8b9d0c6d
1
.mailmap
1
.mailmap
|
@ -210,6 +210,7 @@ Oleksij Rempel <linux@rempel-privat.de> <external.Oleksij.Rempel@de.bosch.com>
|
|||
Oleksij Rempel <linux@rempel-privat.de> <fixed-term.Oleksij.Rempel@de.bosch.com>
|
||||
Oleksij Rempel <linux@rempel-privat.de> <o.rempel@pengutronix.de>
|
||||
Oleksij Rempel <linux@rempel-privat.de> <ore@pengutronix.de>
|
||||
Pali Rohár <pali@kernel.org> <pali.rohar@gmail.com>
|
||||
Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
|
||||
Patrick Mochel <mochel@digitalimplant.org>
|
||||
Paul Burton <paulburton@kernel.org> <paul.burton@imgtec.com>
|
||||
|
|
|
@ -2,7 +2,7 @@ What: /sys/class/leds/dell::kbd_backlight/als_enabled
|
|||
Date: December 2014
|
||||
KernelVersion: 3.19
|
||||
Contact: Gabriele Mazzotta <gabriele.mzt@gmail.com>,
|
||||
Pali Rohár <pali.rohar@gmail.com>
|
||||
Pali Rohár <pali@kernel.org>
|
||||
Description:
|
||||
This file allows to control the automatic keyboard
|
||||
illumination mode on some systems that have an ambient
|
||||
|
@ -13,7 +13,7 @@ What: /sys/class/leds/dell::kbd_backlight/als_setting
|
|||
Date: December 2014
|
||||
KernelVersion: 3.19
|
||||
Contact: Gabriele Mazzotta <gabriele.mzt@gmail.com>,
|
||||
Pali Rohár <pali.rohar@gmail.com>
|
||||
Pali Rohár <pali@kernel.org>
|
||||
Description:
|
||||
This file allows to specifiy the on/off threshold value,
|
||||
as reported by the ambient light sensor.
|
||||
|
@ -22,7 +22,7 @@ What: /sys/class/leds/dell::kbd_backlight/start_triggers
|
|||
Date: December 2014
|
||||
KernelVersion: 3.19
|
||||
Contact: Gabriele Mazzotta <gabriele.mzt@gmail.com>,
|
||||
Pali Rohár <pali.rohar@gmail.com>
|
||||
Pali Rohár <pali@kernel.org>
|
||||
Description:
|
||||
This file allows to control the input triggers that
|
||||
turn on the keyboard backlight illumination that is
|
||||
|
@ -45,7 +45,7 @@ What: /sys/class/leds/dell::kbd_backlight/stop_timeout
|
|||
Date: December 2014
|
||||
KernelVersion: 3.19
|
||||
Contact: Gabriele Mazzotta <gabriele.mzt@gmail.com>,
|
||||
Pali Rohár <pali.rohar@gmail.com>
|
||||
Pali Rohár <pali@kernel.org>
|
||||
Description:
|
||||
This file allows to specify the interval after which the
|
||||
keyboard illumination is disabled because of inactivity.
|
||||
|
|
|
@ -1471,6 +1471,14 @@
|
|||
hpet_mmap= [X86, HPET_MMAP] Allow userspace to mmap HPET
|
||||
registers. Default set by CONFIG_HPET_MMAP_DEFAULT.
|
||||
|
||||
hugetlb_cma= [HW] The size of a cma area used for allocation
|
||||
of gigantic hugepages.
|
||||
Format: nn[KMGTPE]
|
||||
|
||||
Reserve a cma area of given size and allocate gigantic
|
||||
hugepages using the cma allocator. If enabled, the
|
||||
boot-time allocation of gigantic hugepages is skipped.
|
||||
|
||||
hugepages= [HW,X86-32,IA-64] HugeTLB pages to allocate at boot.
|
||||
hugepagesz= [HW,IA-64,PPC,X86-64] The size of the HugeTLB pages.
|
||||
On x86-64 and powerpc, this option can be specified
|
||||
|
|
|
@ -446,6 +446,27 @@ Notes:
|
|||
successful IPC object allocation. If an IPC object allocation syscall
|
||||
fails, it is undefined if the value remains unmodified or is reset to -1.
|
||||
|
||||
modprobe:
|
||||
=========
|
||||
|
||||
The path to the usermode helper for autoloading kernel modules, by
|
||||
default "/sbin/modprobe". This binary is executed when the kernel
|
||||
requests a module. For example, if userspace passes an unknown
|
||||
filesystem type to mount(), then the kernel will automatically request
|
||||
the corresponding filesystem module by executing this usermode helper.
|
||||
This usermode helper should insert the needed module into the kernel.
|
||||
|
||||
This sysctl only affects module autoloading. It has no effect on the
|
||||
ability to explicitly insert modules.
|
||||
|
||||
If this sysctl is set to the empty string, then module autoloading is
|
||||
completely disabled. The kernel will not try to execute a usermode
|
||||
helper at all, nor will it call the kernel_module_request LSM hook.
|
||||
|
||||
If CONFIG_STATIC_USERMODEHELPER=y is set in the kernel configuration,
|
||||
then the configured static usermode helper overrides this sysctl,
|
||||
except that the empty string is still accepted to completely disable
|
||||
module autoloading as described above.
|
||||
|
||||
nmi_watchdog
|
||||
============
|
||||
|
|
16
MAINTAINERS
16
MAINTAINERS
|
@ -727,7 +727,7 @@ L: linux-alpha@vger.kernel.org
|
|||
F: arch/alpha/
|
||||
|
||||
ALPS PS/2 TOUCHPAD DRIVER
|
||||
R: Pali Rohár <pali.rohar@gmail.com>
|
||||
R: Pali Rohár <pali@kernel.org>
|
||||
F: drivers/input/mouse/alps.*
|
||||
|
||||
ALTERA I2C CONTROLLER DRIVER
|
||||
|
@ -4774,23 +4774,23 @@ F: drivers/net/fddi/defza.*
|
|||
|
||||
DELL LAPTOP DRIVER
|
||||
M: Matthew Garrett <mjg59@srcf.ucam.org>
|
||||
M: Pali Rohár <pali.rohar@gmail.com>
|
||||
M: Pali Rohár <pali@kernel.org>
|
||||
L: platform-driver-x86@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/platform/x86/dell-laptop.c
|
||||
|
||||
DELL LAPTOP FREEFALL DRIVER
|
||||
M: Pali Rohár <pali.rohar@gmail.com>
|
||||
M: Pali Rohár <pali@kernel.org>
|
||||
S: Maintained
|
||||
F: drivers/platform/x86/dell-smo8800.c
|
||||
|
||||
DELL LAPTOP RBTN DRIVER
|
||||
M: Pali Rohár <pali.rohar@gmail.com>
|
||||
M: Pali Rohár <pali@kernel.org>
|
||||
S: Maintained
|
||||
F: drivers/platform/x86/dell-rbtn.*
|
||||
|
||||
DELL LAPTOP SMM DRIVER
|
||||
M: Pali Rohár <pali.rohar@gmail.com>
|
||||
M: Pali Rohár <pali@kernel.org>
|
||||
S: Maintained
|
||||
F: drivers/hwmon/dell-smm-hwmon.c
|
||||
F: include/uapi/linux/i8k.h
|
||||
|
@ -4802,7 +4802,7 @@ S: Maintained
|
|||
F: drivers/platform/x86/dell_rbu.c
|
||||
|
||||
DELL SMBIOS DRIVER
|
||||
M: Pali Rohár <pali.rohar@gmail.com>
|
||||
M: Pali Rohár <pali@kernel.org>
|
||||
M: Mario Limonciello <mario.limonciello@dell.com>
|
||||
L: platform-driver-x86@vger.kernel.org
|
||||
S: Maintained
|
||||
|
@ -4835,7 +4835,7 @@ F: drivers/platform/x86/dell-wmi-descriptor.c
|
|||
|
||||
DELL WMI NOTIFICATIONS DRIVER
|
||||
M: Matthew Garrett <mjg59@srcf.ucam.org>
|
||||
M: Pali Rohár <pali.rohar@gmail.com>
|
||||
M: Pali Rohár <pali@kernel.org>
|
||||
S: Maintained
|
||||
F: drivers/platform/x86/dell-wmi.c
|
||||
|
||||
|
@ -11950,7 +11950,7 @@ F: drivers/media/i2c/et8ek8
|
|||
F: drivers/media/i2c/ad5820.c
|
||||
|
||||
NOKIA N900 POWER SUPPLY DRIVERS
|
||||
R: Pali Rohár <pali.rohar@gmail.com>
|
||||
R: Pali Rohár <pali@kernel.org>
|
||||
F: include/linux/power/bq2415x_charger.h
|
||||
F: include/linux/power/bq27xxx_battery.h
|
||||
F: drivers/power/supply/bq2415x_charger.c
|
||||
|
|
|
@ -90,9 +90,6 @@ typedef struct page *pgtable_t;
|
|||
#define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
|
||||
#endif /* CONFIG_DISCONTIGMEM */
|
||||
|
||||
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
|
||||
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
|
||||
#include <asm-generic/memory_model.h>
|
||||
#include <asm-generic/getorder.h>
|
||||
|
||||
|
|
|
@ -268,7 +268,6 @@ extern inline void pud_clear(pud_t * pudp) { pud_val(*pudp) = 0; }
|
|||
extern inline int pte_write(pte_t pte) { return !(pte_val(pte) & _PAGE_FOW); }
|
||||
extern inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; }
|
||||
extern inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; }
|
||||
extern inline int pte_special(pte_t pte) { return 0; }
|
||||
|
||||
extern inline pte_t pte_wrprotect(pte_t pte) { pte_val(pte) |= _PAGE_FOW; return pte; }
|
||||
extern inline pte_t pte_mkclean(pte_t pte) { pte_val(pte) &= ~(__DIRTY_BITS); return pte; }
|
||||
|
@ -276,7 +275,6 @@ extern inline pte_t pte_mkold(pte_t pte) { pte_val(pte) &= ~(__ACCESS_BITS); ret
|
|||
extern inline pte_t pte_mkwrite(pte_t pte) { pte_val(pte) &= ~_PAGE_FOW; return pte; }
|
||||
extern inline pte_t pte_mkdirty(pte_t pte) { pte_val(pte) |= __DIRTY_BITS; return pte; }
|
||||
extern inline pte_t pte_mkyoung(pte_t pte) { pte_val(pte) |= __ACCESS_BITS; return pte; }
|
||||
extern inline pte_t pte_mkspecial(pte_t pte) { return pte; }
|
||||
|
||||
#define PAGE_DIR_OFFSET(tsk,address) pgd_offset((tsk),(address))
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@ typedef pte_t * pgtable_t;
|
|||
#define virt_addr_valid(kaddr) pfn_valid(virt_to_pfn(kaddr))
|
||||
|
||||
/* Default Permissions for stack/heaps pages (Non Executable) */
|
||||
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
#define VM_DATA_DEFAULT_FLAGS VM_DATA_FLAGS_NON_EXEC
|
||||
|
||||
#define WANT_PAGE_VIRTUAL 1
|
||||
|
||||
|
|
|
@ -161,9 +161,7 @@ extern int pfn_valid(unsigned long);
|
|||
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
|
||||
#define VM_DATA_DEFAULT_FLAGS \
|
||||
(((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0) | \
|
||||
VM_READ | VM_WRITE | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
#define VM_DATA_DEFAULT_FLAGS VM_DATA_FLAGS_TSK_EXEC
|
||||
|
||||
#include <asm-generic/getorder.h>
|
||||
|
||||
|
|
|
@ -211,8 +211,6 @@ static inline pmd_t *pmd_offset(pud_t *pud, unsigned long addr)
|
|||
#define pmd_addr_end(addr,end) (end)
|
||||
|
||||
#define set_pte_ext(ptep,pte,ext) cpu_set_pte_ext(ptep,pte,ext)
|
||||
#define pte_special(pte) (0)
|
||||
static inline pte_t pte_mkspecial(pte_t pte) { return pte; }
|
||||
|
||||
/*
|
||||
* We don't have huge page support for short descriptors, for the moment
|
||||
|
|
|
@ -243,19 +243,8 @@ static inline void __sync_icache_dcache(pte_t pteval)
|
|||
extern void __sync_icache_dcache(pte_t pteval);
|
||||
#endif
|
||||
|
||||
static inline void set_pte_at(struct mm_struct *mm, unsigned long addr,
|
||||
pte_t *ptep, pte_t pteval)
|
||||
{
|
||||
unsigned long ext = 0;
|
||||
|
||||
if (addr < TASK_SIZE && pte_valid_user(pteval)) {
|
||||
if (!pte_special(pteval))
|
||||
__sync_icache_dcache(pteval);
|
||||
ext |= PTE_EXT_NG;
|
||||
}
|
||||
|
||||
set_pte_ext(ptep, pteval, ext);
|
||||
}
|
||||
void set_pte_at(struct mm_struct *mm, unsigned long addr,
|
||||
pte_t *ptep, pte_t pteval);
|
||||
|
||||
static inline pte_t clear_pte_bit(pte_t pte, pgprot_t prot)
|
||||
{
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Copyright (C) 2011 Texas Instruments, Inc.
|
||||
* Santosh Shilimkar <santosh.shilimkar@ti.com>
|
||||
* Copyright (C) 2012 Ivaylo Dimitrov <freemangordon@abv.bg>
|
||||
* Copyright (C) 2013 Pali Rohár <pali.rohar@gmail.com>
|
||||
* Copyright (C) 2013 Pali Rohár <pali@kernel.org>
|
||||
*/
|
||||
|
||||
#include <linux/arm-smccc.h>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Copyright (C) 2011 Texas Instruments, Inc.
|
||||
* Santosh Shilimkar <santosh.shilimkar@ti.com>
|
||||
* Copyright (C) 2012 Ivaylo Dimitrov <freemangordon@abv.bg>
|
||||
* Copyright (C) 2013 Pali Rohár <pali.rohar@gmail.com>
|
||||
* Copyright (C) 2013 Pali Rohár <pali@kernel.org>
|
||||
*/
|
||||
#ifndef OMAP_ARCH_OMAP_SECURE_H
|
||||
#define OMAP_ARCH_OMAP_SECURE_H
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* Written by Santosh Shilimkar <santosh.shilimkar@ti.com>
|
||||
*
|
||||
* Copyright (C) 2012 Ivaylo Dimitrov <freemangordon@abv.bg>
|
||||
* Copyright (C) 2013 Pali Rohár <pali.rohar@gmail.com>
|
||||
* Copyright (C) 2013 Pali Rohár <pali@kernel.org>
|
||||
*/
|
||||
|
||||
#include <linux/linkage.h>
|
||||
|
|
|
@ -189,7 +189,7 @@ void do_bad_area(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
|
|||
*/
|
||||
static inline bool access_error(unsigned int fsr, struct vm_area_struct *vma)
|
||||
{
|
||||
unsigned int mask = VM_READ | VM_WRITE | VM_EXEC;
|
||||
unsigned int mask = VM_ACCESS_FLAGS;
|
||||
|
||||
if ((fsr & FSR_WRITE) && !(fsr & FSR_CM))
|
||||
mask = VM_WRITE;
|
||||
|
|
|
@ -1646,3 +1646,17 @@ void __init early_mm_init(const struct machine_desc *mdesc)
|
|||
build_mem_type_table();
|
||||
early_paging_init(mdesc);
|
||||
}
|
||||
|
||||
void set_pte_at(struct mm_struct *mm, unsigned long addr,
|
||||
pte_t *ptep, pte_t pteval)
|
||||
{
|
||||
unsigned long ext = 0;
|
||||
|
||||
if (addr < TASK_SIZE && pte_valid_user(pteval)) {
|
||||
if (!pte_special(pteval))
|
||||
__sync_icache_dcache(pteval);
|
||||
ext |= PTE_EXT_NG;
|
||||
}
|
||||
|
||||
set_pte_ext(ptep, pteval, ext);
|
||||
}
|
||||
|
|
|
@ -36,9 +36,7 @@ extern int pfn_valid(unsigned long);
|
|||
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
|
||||
#define VM_DATA_DEFAULT_FLAGS \
|
||||
(((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0) | \
|
||||
VM_READ | VM_WRITE | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
#define VM_DATA_DEFAULT_FLAGS VM_DATA_FLAGS_TSK_EXEC
|
||||
|
||||
#include <asm-generic/getorder.h>
|
||||
|
||||
|
|
|
@ -445,7 +445,7 @@ static int __kprobes do_page_fault(unsigned long addr, unsigned int esr,
|
|||
const struct fault_info *inf;
|
||||
struct mm_struct *mm = current->mm;
|
||||
vm_fault_t fault, major = 0;
|
||||
unsigned long vm_flags = VM_READ | VM_WRITE | VM_EXEC;
|
||||
unsigned long vm_flags = VM_ACCESS_FLAGS;
|
||||
unsigned int mm_flags = FAULT_FLAG_DEFAULT;
|
||||
|
||||
if (kprobe_page_fault(regs, esr))
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include <linux/mm.h>
|
||||
#include <linux/kexec.h>
|
||||
#include <linux/crash_dump.h>
|
||||
#include <linux/hugetlb.h>
|
||||
|
||||
#include <asm/boot.h>
|
||||
#include <asm/fixmap.h>
|
||||
|
@ -457,6 +458,11 @@ void __init arm64_memblock_init(void)
|
|||
high_memory = __va(memblock_end_of_DRAM() - 1) + 1;
|
||||
|
||||
dma_contiguous_reserve(arm64_dma32_phys_limit);
|
||||
|
||||
#ifdef CONFIG_ARM64_4K_PAGES
|
||||
hugetlb_cma_reserve(PUD_SHIFT - PAGE_SHIFT);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
void __init bootmem_init(void)
|
||||
|
|
|
@ -1374,7 +1374,7 @@ static void __remove_pgd_mapping(pgd_t *pgdir, unsigned long start, u64 size)
|
|||
}
|
||||
|
||||
int arch_add_memory(int nid, u64 start, u64 size,
|
||||
struct mhp_restrictions *restrictions)
|
||||
struct mhp_params *params)
|
||||
{
|
||||
int ret, flags = 0;
|
||||
|
||||
|
@ -1382,12 +1382,13 @@ int arch_add_memory(int nid, u64 start, u64 size,
|
|||
flags = NO_BLOCK_MAPPINGS | NO_CONT_MAPPINGS;
|
||||
|
||||
__create_pgd_mapping(swapper_pg_dir, start, __phys_to_virt(start),
|
||||
size, PAGE_KERNEL, __pgd_pgtable_alloc, flags);
|
||||
size, params->pgprot, __pgd_pgtable_alloc,
|
||||
flags);
|
||||
|
||||
memblock_clear_nomap(start, size);
|
||||
|
||||
ret = __add_pages(nid, start >> PAGE_SHIFT, size >> PAGE_SHIFT,
|
||||
restrictions);
|
||||
params);
|
||||
if (ret)
|
||||
__remove_pgd_mapping(swapper_pg_dir,
|
||||
__phys_to_virt(start), size);
|
||||
|
|
|
@ -2,10 +2,7 @@
|
|||
#ifndef _ASM_C6X_PAGE_H
|
||||
#define _ASM_C6X_PAGE_H
|
||||
|
||||
#define VM_DATA_DEFAULT_FLAGS \
|
||||
(VM_READ | VM_WRITE | \
|
||||
((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0) | \
|
||||
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
#define VM_DATA_DEFAULT_FLAGS VM_DATA_FLAGS_TSK_EXEC
|
||||
|
||||
#include <asm-generic/page.h>
|
||||
|
||||
|
|
|
@ -85,9 +85,6 @@ extern unsigned long va_pa_offset;
|
|||
PHYS_OFFSET_OFFSET)
|
||||
#define virt_to_page(x) (mem_map + MAP_NR(x))
|
||||
|
||||
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
|
||||
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
|
||||
#define pfn_to_kaddr(x) __va(PFN_PHYS(x))
|
||||
|
||||
#include <asm-generic/memory_model.h>
|
||||
|
|
|
@ -110,9 +110,6 @@ extern unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)];
|
|||
extern void load_pgd(unsigned long pg_dir);
|
||||
extern pte_t invalid_pte_table[PTRS_PER_PTE];
|
||||
|
||||
static inline int pte_special(pte_t pte) { return 0; }
|
||||
static inline pte_t pte_mkspecial(pte_t pte) { return pte; }
|
||||
|
||||
static inline void set_pte(pte_t *p, pte_t pte)
|
||||
{
|
||||
*p = pte;
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
#include <linux/types.h>
|
||||
|
||||
#define MAP_NR(addr) (((uintptr_t)(addr)-PAGE_OFFSET) >> PAGE_SHIFT)
|
||||
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
|
||||
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
extern unsigned long rom_length;
|
||||
|
|
|
@ -93,8 +93,7 @@ struct page;
|
|||
#define virt_to_page(kaddr) pfn_to_page(PFN_DOWN(__pa(kaddr)))
|
||||
|
||||
/* Default vm area behavior is non-executable. */
|
||||
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | \
|
||||
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
#define VM_DATA_DEFAULT_FLAGS VM_DATA_FLAGS_NON_EXEC
|
||||
|
||||
#define pfn_valid(pfn) ((pfn) < max_mapnr)
|
||||
#define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
|
||||
|
|
|
@ -158,8 +158,6 @@ extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; /* located in head.S */
|
|||
|
||||
/* Seems to be zero even in architectures where the zero page is firewalled? */
|
||||
#define FIRST_USER_ADDRESS 0UL
|
||||
#define pte_special(pte) 0
|
||||
#define pte_mkspecial(pte) (pte)
|
||||
|
||||
/* HUGETLB not working currently */
|
||||
#ifdef CONFIG_HUGETLB_PAGE
|
||||
|
|
|
@ -218,10 +218,7 @@ get_order (unsigned long size)
|
|||
|
||||
#define PAGE_OFFSET RGN_BASE(RGN_KERNEL)
|
||||
|
||||
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | \
|
||||
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC | \
|
||||
(((current->personality & READ_IMPLIES_EXEC) != 0) \
|
||||
? VM_EXEC : 0))
|
||||
#define VM_DATA_DEFAULT_FLAGS VM_DATA_FLAGS_TSK_EXEC
|
||||
|
||||
#define GATE_ADDR RGN_BASE(RGN_GATE)
|
||||
|
||||
|
|
|
@ -298,7 +298,6 @@ extern unsigned long VMALLOC_END;
|
|||
#define pte_exec(pte) ((pte_val(pte) & _PAGE_AR_RX) != 0)
|
||||
#define pte_dirty(pte) ((pte_val(pte) & _PAGE_D) != 0)
|
||||
#define pte_young(pte) ((pte_val(pte) & _PAGE_A) != 0)
|
||||
#define pte_special(pte) 0
|
||||
|
||||
/*
|
||||
* Note: we convert AR_RWX to AR_RX and AR_RW to AR_R by clearing the 2nd bit in the
|
||||
|
@ -311,7 +310,6 @@ extern unsigned long VMALLOC_END;
|
|||
#define pte_mkclean(pte) (__pte(pte_val(pte) & ~_PAGE_D))
|
||||
#define pte_mkdirty(pte) (__pte(pte_val(pte) | _PAGE_D))
|
||||
#define pte_mkhuge(pte) (__pte(pte_val(pte)))
|
||||
#define pte_mkspecial(pte) (pte)
|
||||
|
||||
/*
|
||||
* Because ia64's Icache and Dcache is not coherent (on a cpu), we need to
|
||||
|
|
|
@ -670,13 +670,16 @@ mem_init (void)
|
|||
|
||||
#ifdef CONFIG_MEMORY_HOTPLUG
|
||||
int arch_add_memory(int nid, u64 start, u64 size,
|
||||
struct mhp_restrictions *restrictions)
|
||||
struct mhp_params *params)
|
||||
{
|
||||
unsigned long start_pfn = start >> PAGE_SHIFT;
|
||||
unsigned long nr_pages = size >> PAGE_SHIFT;
|
||||
int ret;
|
||||
|
||||
ret = __add_pages(nid, start_pfn, nr_pages, restrictions);
|
||||
if (WARN_ON_ONCE(params->pgprot.pgprot != PAGE_KERNEL.pgprot))
|
||||
return -EINVAL;
|
||||
|
||||
ret = __add_pages(nid, start_pfn, nr_pages, params);
|
||||
if (ret)
|
||||
printk("%s: Problem encountered in __add_pages() as ret=%d\n",
|
||||
__func__, ret);
|
||||
|
|
|
@ -235,11 +235,6 @@ static inline int pte_young(pte_t pte)
|
|||
return pte_val(pte) & CF_PAGE_ACCESSED;
|
||||
}
|
||||
|
||||
static inline int pte_special(pte_t pte)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline pte_t pte_wrprotect(pte_t pte)
|
||||
{
|
||||
pte_val(pte) &= ~CF_PAGE_WRITABLE;
|
||||
|
@ -312,11 +307,6 @@ static inline pte_t pte_mkcache(pte_t pte)
|
|||
return pte;
|
||||
}
|
||||
|
||||
static inline pte_t pte_mkspecial(pte_t pte)
|
||||
{
|
||||
return pte;
|
||||
}
|
||||
|
||||
#define swapper_pg_dir kernel_pg_dir
|
||||
extern pgd_t kernel_pg_dir[PTRS_PER_PGD];
|
||||
|
||||
|
|
|
@ -174,7 +174,6 @@ static inline void pud_set(pud_t *pudp, pmd_t *pmdp)
|
|||
static inline int pte_write(pte_t pte) { return !(pte_val(pte) & _PAGE_RONLY); }
|
||||
static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; }
|
||||
static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; }
|
||||
static inline int pte_special(pte_t pte) { return 0; }
|
||||
|
||||
static inline pte_t pte_wrprotect(pte_t pte) { pte_val(pte) |= _PAGE_RONLY; return pte; }
|
||||
static inline pte_t pte_mkclean(pte_t pte) { pte_val(pte) &= ~_PAGE_DIRTY; return pte; }
|
||||
|
@ -192,7 +191,6 @@ static inline pte_t pte_mkcache(pte_t pte)
|
|||
pte_val(pte) = (pte_val(pte) & _CACHEMASK040) | m68k_supervisor_cachemode;
|
||||
return pte;
|
||||
}
|
||||
static inline pte_t pte_mkspecial(pte_t pte) { return pte; }
|
||||
|
||||
#define PAGE_DIR_OFFSET(tsk,address) pgd_offset((tsk),(address))
|
||||
|
||||
|
|
|
@ -65,9 +65,6 @@ extern unsigned long _ramend;
|
|||
#define __phys_to_pfn(paddr) ((unsigned long)((paddr) >> PAGE_SHIFT))
|
||||
#define __pfn_to_phys(pfn) PFN_PHYS(pfn)
|
||||
|
||||
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
|
||||
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
|
||||
#include <asm-generic/getorder.h>
|
||||
|
||||
#endif /* _M68K_PAGE_H */
|
||||
|
|
|
@ -155,7 +155,6 @@ static inline void pmd_clear (pmd_t *pmdp) { pmd_val (*pmdp) = 0; }
|
|||
static inline int pte_write(pte_t pte) { return pte_val(pte) & SUN3_PAGE_WRITEABLE; }
|
||||
static inline int pte_dirty(pte_t pte) { return pte_val(pte) & SUN3_PAGE_MODIFIED; }
|
||||
static inline int pte_young(pte_t pte) { return pte_val(pte) & SUN3_PAGE_ACCESSED; }
|
||||
static inline int pte_special(pte_t pte) { return 0; }
|
||||
|
||||
static inline pte_t pte_wrprotect(pte_t pte) { pte_val(pte) &= ~SUN3_PAGE_WRITEABLE; return pte; }
|
||||
static inline pte_t pte_mkclean(pte_t pte) { pte_val(pte) &= ~SUN3_PAGE_MODIFIED; return pte; }
|
||||
|
@ -168,7 +167,6 @@ static inline pte_t pte_mknocache(pte_t pte) { pte_val(pte) |= SUN3_PAGE_NOCACHE
|
|||
//static inline pte_t pte_mkcache(pte_t pte) { pte_val(pte) &= SUN3_PAGE_NOCACHE; return pte; }
|
||||
// until then, use:
|
||||
static inline pte_t pte_mkcache(pte_t pte) { return pte; }
|
||||
static inline pte_t pte_mkspecial(pte_t pte) { return pte; }
|
||||
|
||||
extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
|
||||
extern pgd_t kernel_pg_dir[PTRS_PER_PGD];
|
||||
|
|
|
@ -194,8 +194,6 @@ extern int page_is_ram(unsigned long pfn);
|
|||
|
||||
#ifdef CONFIG_MMU
|
||||
|
||||
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
|
||||
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
#endif /* CONFIG_MMU */
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
|
|
@ -77,10 +77,6 @@ extern pte_t *va_to_pte(unsigned long address);
|
|||
* Undefined behaviour if not..
|
||||
*/
|
||||
|
||||
static inline int pte_special(pte_t pte) { return 0; }
|
||||
|
||||
static inline pte_t pte_mkspecial(pte_t pte) { return pte; }
|
||||
|
||||
/* Start and end of the vmalloc area. */
|
||||
/* Make sure to map the vmalloc area above the pinned kernel memory area
|
||||
of 32Mb. */
|
||||
|
|
|
@ -253,10 +253,7 @@ extern bool __virt_addr_valid(const volatile void *kaddr);
|
|||
#define virt_addr_valid(kaddr) \
|
||||
__virt_addr_valid((const volatile void *) (kaddr))
|
||||
|
||||
#define VM_DATA_DEFAULT_FLAGS \
|
||||
(VM_READ | VM_WRITE | \
|
||||
((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0) | \
|
||||
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
#define VM_DATA_DEFAULT_FLAGS VM_DATA_FLAGS_TSK_EXEC
|
||||
|
||||
#include <asm-generic/memory_model.h>
|
||||
#include <asm-generic/getorder.h>
|
||||
|
|
|
@ -269,6 +269,36 @@ static inline void set_pte_at(struct mm_struct *mm, unsigned long addr,
|
|||
*/
|
||||
extern pgd_t swapper_pg_dir[];
|
||||
|
||||
/*
|
||||
* Platform specific pte_special() and pte_mkspecial() definitions
|
||||
* are required only when ARCH_HAS_PTE_SPECIAL is enabled.
|
||||
*/
|
||||
#if defined(CONFIG_ARCH_HAS_PTE_SPECIAL)
|
||||
#if defined(CONFIG_PHYS_ADDR_T_64BIT) && defined(CONFIG_CPU_MIPS32)
|
||||
static inline int pte_special(pte_t pte)
|
||||
{
|
||||
return pte.pte_low & _PAGE_SPECIAL;
|
||||
}
|
||||
|
||||
static inline pte_t pte_mkspecial(pte_t pte)
|
||||
{
|
||||
pte.pte_low |= _PAGE_SPECIAL;
|
||||
return pte;
|
||||
}
|
||||
#else
|
||||
static inline int pte_special(pte_t pte)
|
||||
{
|
||||
return pte_val(pte) & _PAGE_SPECIAL;
|
||||
}
|
||||
|
||||
static inline pte_t pte_mkspecial(pte_t pte)
|
||||
{
|
||||
pte_val(pte) |= _PAGE_SPECIAL;
|
||||
return pte;
|
||||
}
|
||||
#endif
|
||||
#endif /* CONFIG_ARCH_HAS_PTE_SPECIAL */
|
||||
|
||||
/*
|
||||
* The following only work if pte_present() is true.
|
||||
* Undefined behaviour if not..
|
||||
|
@ -277,7 +307,6 @@ extern pgd_t swapper_pg_dir[];
|
|||
static inline int pte_write(pte_t pte) { return pte.pte_low & _PAGE_WRITE; }
|
||||
static inline int pte_dirty(pte_t pte) { return pte.pte_low & _PAGE_MODIFIED; }
|
||||
static inline int pte_young(pte_t pte) { return pte.pte_low & _PAGE_ACCESSED; }
|
||||
static inline int pte_special(pte_t pte) { return pte.pte_low & _PAGE_SPECIAL; }
|
||||
|
||||
static inline pte_t pte_wrprotect(pte_t pte)
|
||||
{
|
||||
|
@ -338,17 +367,10 @@ static inline pte_t pte_mkyoung(pte_t pte)
|
|||
}
|
||||
return pte;
|
||||
}
|
||||
|
||||
static inline pte_t pte_mkspecial(pte_t pte)
|
||||
{
|
||||
pte.pte_low |= _PAGE_SPECIAL;
|
||||
return pte;
|
||||
}
|
||||
#else
|
||||
static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_WRITE; }
|
||||
static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_MODIFIED; }
|
||||
static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; }
|
||||
static inline int pte_special(pte_t pte) { return pte_val(pte) & _PAGE_SPECIAL; }
|
||||
|
||||
static inline pte_t pte_wrprotect(pte_t pte)
|
||||
{
|
||||
|
@ -392,12 +414,6 @@ static inline pte_t pte_mkyoung(pte_t pte)
|
|||
return pte;
|
||||
}
|
||||
|
||||
static inline pte_t pte_mkspecial(pte_t pte)
|
||||
{
|
||||
pte_val(pte) |= _PAGE_SPECIAL;
|
||||
return pte;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_MIPS_HUGE_TLB_SUPPORT
|
||||
static inline int pte_huge(pte_t pte) { return pte_val(pte) & _PAGE_HUGE; }
|
||||
|
||||
|
|
|
@ -59,9 +59,6 @@ typedef struct page *pgtable_t;
|
|||
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
|
||||
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
|
||||
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif
|
||||
|
|
|
@ -286,15 +286,6 @@ PTE_BIT_FUNC(mkclean, &=~_PAGE_D);
|
|||
PTE_BIT_FUNC(mkdirty, |=_PAGE_D);
|
||||
PTE_BIT_FUNC(mkold, &=~_PAGE_YOUNG);
|
||||
PTE_BIT_FUNC(mkyoung, |=_PAGE_YOUNG);
|
||||
static inline int pte_special(pte_t pte)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline pte_t pte_mkspecial(pte_t pte)
|
||||
{
|
||||
return pte;
|
||||
}
|
||||
|
||||
/*
|
||||
* Mark the prot value as uncacheable and unbufferable.
|
||||
|
|
|
@ -79,7 +79,7 @@ void do_page_fault(unsigned long entry, unsigned long addr,
|
|||
struct vm_area_struct *vma;
|
||||
int si_code;
|
||||
vm_fault_t fault;
|
||||
unsigned int mask = VM_READ | VM_WRITE | VM_EXEC;
|
||||
unsigned int mask = VM_ACCESS_FLAGS;
|
||||
unsigned int flags = FAULT_FLAG_DEFAULT;
|
||||
|
||||
error_code = error_code & (ITYPE_mskINST | ITYPE_mskETYPE);
|
||||
|
|
|
@ -98,8 +98,7 @@ static inline bool pfn_valid(unsigned long pfn)
|
|||
# define virt_to_page(vaddr) pfn_to_page(PFN_DOWN(virt_to_phys(vaddr)))
|
||||
# define virt_addr_valid(vaddr) pfn_valid(PFN_DOWN(virt_to_phys(vaddr)))
|
||||
|
||||
# define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | \
|
||||
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
# define VM_DATA_DEFAULT_FLAGS VM_DATA_FLAGS_NON_EXEC
|
||||
|
||||
#include <asm-generic/memory_model.h>
|
||||
|
||||
|
|
|
@ -113,7 +113,6 @@ static inline int pte_dirty(pte_t pte) \
|
|||
{ return pte_val(pte) & _PAGE_DIRTY; }
|
||||
static inline int pte_young(pte_t pte) \
|
||||
{ return pte_val(pte) & _PAGE_ACCESSED; }
|
||||
static inline int pte_special(pte_t pte) { return 0; }
|
||||
|
||||
#define pgprot_noncached pgprot_noncached
|
||||
|
||||
|
@ -168,8 +167,6 @@ static inline pte_t pte_mkdirty(pte_t pte)
|
|||
return pte;
|
||||
}
|
||||
|
||||
static inline pte_t pte_mkspecial(pte_t pte) { return pte; }
|
||||
|
||||
static inline pte_t pte_mkyoung(pte_t pte)
|
||||
{
|
||||
pte_val(pte) |= _PAGE_ACCESSED;
|
||||
|
|
|
@ -86,11 +86,6 @@ typedef struct page *pgtable_t;
|
|||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
|
||||
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
|
||||
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
|
||||
|
||||
#include <asm-generic/memory_model.h>
|
||||
#include <asm-generic/getorder.h>
|
||||
|
||||
|
|
|
@ -236,8 +236,6 @@ static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_WRITE; }
|
|||
static inline int pte_exec(pte_t pte) { return pte_val(pte) & _PAGE_EXEC; }
|
||||
static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; }
|
||||
static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; }
|
||||
static inline int pte_special(pte_t pte) { return 0; }
|
||||
static inline pte_t pte_mkspecial(pte_t pte) { return pte; }
|
||||
|
||||
static inline pte_t pte_wrprotect(pte_t pte)
|
||||
{
|
||||
|
|
|
@ -180,9 +180,6 @@ extern int npmem_ranges;
|
|||
#define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT)
|
||||
#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
|
||||
|
||||
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
|
||||
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
|
||||
#include <asm-generic/memory_model.h>
|
||||
#include <asm-generic/getorder.h>
|
||||
#include <asm/pdc.h>
|
||||
|
|
|
@ -377,7 +377,6 @@ static inline void pud_clear(pud_t *pud) {
|
|||
static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; }
|
||||
static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; }
|
||||
static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_WRITE; }
|
||||
static inline int pte_special(pte_t pte) { return 0; }
|
||||
|
||||
static inline pte_t pte_mkclean(pte_t pte) { pte_val(pte) &= ~_PAGE_DIRTY; return pte; }
|
||||
static inline pte_t pte_mkold(pte_t pte) { pte_val(pte) &= ~_PAGE_ACCESSED; return pte; }
|
||||
|
@ -385,7 +384,6 @@ static inline pte_t pte_wrprotect(pte_t pte) { pte_val(pte) &= ~_PAGE_WRITE; ret
|
|||
static inline pte_t pte_mkdirty(pte_t pte) { pte_val(pte) |= _PAGE_DIRTY; return pte; }
|
||||
static inline pte_t pte_mkyoung(pte_t pte) { pte_val(pte) |= _PAGE_ACCESSED; return pte; }
|
||||
static inline pte_t pte_mkwrite(pte_t pte) { pte_val(pte) |= _PAGE_WRITE; return pte; }
|
||||
static inline pte_t pte_mkspecial(pte_t pte) { return pte; }
|
||||
|
||||
/*
|
||||
* Huge pte definitions.
|
||||
|
|
|
@ -251,7 +251,8 @@ extern int __meminit hash__vmemmap_create_mapping(unsigned long start,
|
|||
extern void hash__vmemmap_remove_mapping(unsigned long start,
|
||||
unsigned long page_size);
|
||||
|
||||
int hash__create_section_mapping(unsigned long start, unsigned long end, int nid);
|
||||
int hash__create_section_mapping(unsigned long start, unsigned long end,
|
||||
int nid, pgprot_t prot);
|
||||
int hash__remove_section_mapping(unsigned long start, unsigned long end);
|
||||
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
|
|
|
@ -294,7 +294,8 @@ static inline unsigned long radix__get_tree_size(void)
|
|||
}
|
||||
|
||||
#ifdef CONFIG_MEMORY_HOTPLUG
|
||||
int radix__create_section_mapping(unsigned long start, unsigned long end, int nid);
|
||||
int radix__create_section_mapping(unsigned long start, unsigned long end,
|
||||
int nid, pgprot_t prot);
|
||||
int radix__remove_section_mapping(unsigned long start, unsigned long end);
|
||||
#endif /* CONFIG_MEMORY_HOTPLUG */
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
|
|
@ -240,13 +240,8 @@ static inline bool pfn_valid(unsigned long pfn)
|
|||
* and needs to be executable. This means the whole heap ends
|
||||
* up being executable.
|
||||
*/
|
||||
#define VM_DATA_DEFAULT_FLAGS32 \
|
||||
(((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0) | \
|
||||
VM_READ | VM_WRITE | \
|
||||
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
|
||||
#define VM_DATA_DEFAULT_FLAGS64 (VM_READ | VM_WRITE | \
|
||||
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
#define VM_DATA_DEFAULT_FLAGS32 VM_DATA_FLAGS_TSK_EXEC
|
||||
#define VM_DATA_DEFAULT_FLAGS64 VM_DATA_FLAGS_NON_EXEC
|
||||
|
||||
#ifdef __powerpc64__
|
||||
#include <asm/page_64.h>
|
||||
|
|
|
@ -94,11 +94,8 @@ extern u64 ppc64_pft_size;
|
|||
* stack by default, so in the absence of a PT_GNU_STACK program header
|
||||
* we turn execute permission off.
|
||||
*/
|
||||
#define VM_STACK_DEFAULT_FLAGS32 (VM_READ | VM_WRITE | VM_EXEC | \
|
||||
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
|
||||
#define VM_STACK_DEFAULT_FLAGS64 (VM_READ | VM_WRITE | \
|
||||
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
#define VM_STACK_DEFAULT_FLAGS32 VM_DATA_FLAGS_EXEC
|
||||
#define VM_STACK_DEFAULT_FLAGS64 VM_DATA_FLAGS_NON_EXEC
|
||||
|
||||
#define VM_STACK_DEFAULT_FLAGS \
|
||||
(is_32bit_task() ? \
|
||||
|
|
|
@ -13,7 +13,8 @@
|
|||
#endif /* CONFIG_SPARSEMEM */
|
||||
|
||||
#ifdef CONFIG_MEMORY_HOTPLUG
|
||||
extern int create_section_mapping(unsigned long start, unsigned long end, int nid);
|
||||
extern int create_section_mapping(unsigned long start, unsigned long end,
|
||||
int nid, pgprot_t prot);
|
||||
extern int remove_section_mapping(unsigned long start, unsigned long end);
|
||||
|
||||
#ifdef CONFIG_PPC_BOOK3S_64
|
||||
|
|
|
@ -809,7 +809,8 @@ int resize_hpt_for_hotplug(unsigned long new_mem_size)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int hash__create_section_mapping(unsigned long start, unsigned long end, int nid)
|
||||
int hash__create_section_mapping(unsigned long start, unsigned long end,
|
||||
int nid, pgprot_t prot)
|
||||
{
|
||||
int rc;
|
||||
|
||||
|
@ -819,7 +820,7 @@ int hash__create_section_mapping(unsigned long start, unsigned long end, int nid
|
|||
}
|
||||
|
||||
rc = htab_bolt_mapping(start, end, __pa(start),
|
||||
pgprot_val(PAGE_KERNEL), mmu_linear_psize,
|
||||
pgprot_val(prot), mmu_linear_psize,
|
||||
mmu_kernel_ssize);
|
||||
|
||||
if (rc < 0) {
|
||||
|
|
|
@ -171,12 +171,13 @@ void mmu_cleanup_all(void)
|
|||
}
|
||||
|
||||
#ifdef CONFIG_MEMORY_HOTPLUG
|
||||
int __meminit create_section_mapping(unsigned long start, unsigned long end, int nid)
|
||||
int __meminit create_section_mapping(unsigned long start, unsigned long end,
|
||||
int nid, pgprot_t prot)
|
||||
{
|
||||
if (radix_enabled())
|
||||
return radix__create_section_mapping(start, end, nid);
|
||||
return radix__create_section_mapping(start, end, nid, prot);
|
||||
|
||||
return hash__create_section_mapping(start, end, nid);
|
||||
return hash__create_section_mapping(start, end, nid, prot);
|
||||
}
|
||||
|
||||
int __meminit remove_section_mapping(unsigned long start, unsigned long end)
|
||||
|
|
|
@ -315,7 +315,7 @@ int __execute_only_pkey(struct mm_struct *mm)
|
|||
static inline bool vma_is_pkey_exec_only(struct vm_area_struct *vma)
|
||||
{
|
||||
/* Do this check first since the vm_flags should be hot */
|
||||
if ((vma->vm_flags & (VM_READ | VM_WRITE | VM_EXEC)) != VM_EXEC)
|
||||
if ((vma->vm_flags & VM_ACCESS_FLAGS) != VM_EXEC)
|
||||
return false;
|
||||
|
||||
return (vma_pkey(vma) == vma->vm_mm->context.execute_only_pkey);
|
||||
|
|
|
@ -254,7 +254,7 @@ static unsigned long next_boundary(unsigned long addr, unsigned long end)
|
|||
|
||||
static int __meminit create_physical_mapping(unsigned long start,
|
||||
unsigned long end,
|
||||
int nid)
|
||||
int nid, pgprot_t _prot)
|
||||
{
|
||||
unsigned long vaddr, addr, mapping_size = 0;
|
||||
bool prev_exec, exec = false;
|
||||
|
@ -290,7 +290,7 @@ static int __meminit create_physical_mapping(unsigned long start,
|
|||
prot = PAGE_KERNEL_X;
|
||||
exec = true;
|
||||
} else {
|
||||
prot = PAGE_KERNEL;
|
||||
prot = _prot;
|
||||
exec = false;
|
||||
}
|
||||
|
||||
|
@ -334,7 +334,7 @@ static void __init radix_init_pgtable(void)
|
|||
|
||||
WARN_ON(create_physical_mapping(reg->base,
|
||||
reg->base + reg->size,
|
||||
-1));
|
||||
-1, PAGE_KERNEL));
|
||||
}
|
||||
|
||||
/* Find out how many PID bits are supported */
|
||||
|
@ -713,8 +713,10 @@ static int __meminit stop_machine_change_mapping(void *data)
|
|||
|
||||
spin_unlock(&init_mm.page_table_lock);
|
||||
pte_clear(&init_mm, params->aligned_start, params->pte);
|
||||
create_physical_mapping(__pa(params->aligned_start), __pa(params->start), -1);
|
||||
create_physical_mapping(__pa(params->end), __pa(params->aligned_end), -1);
|
||||
create_physical_mapping(__pa(params->aligned_start),
|
||||
__pa(params->start), -1, PAGE_KERNEL);
|
||||
create_physical_mapping(__pa(params->end), __pa(params->aligned_end),
|
||||
-1, PAGE_KERNEL);
|
||||
spin_lock(&init_mm.page_table_lock);
|
||||
return 0;
|
||||
}
|
||||
|
@ -871,14 +873,16 @@ static void __meminit remove_pagetable(unsigned long start, unsigned long end)
|
|||
radix__flush_tlb_kernel_range(start, end);
|
||||
}
|
||||
|
||||
int __meminit radix__create_section_mapping(unsigned long start, unsigned long end, int nid)
|
||||
int __meminit radix__create_section_mapping(unsigned long start,
|
||||
unsigned long end, int nid,
|
||||
pgprot_t prot)
|
||||
{
|
||||
if (end >= RADIX_VMALLOC_START) {
|
||||
pr_warn("Outside the supported range\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
return create_physical_mapping(__pa(start), __pa(end), nid);
|
||||
return create_physical_mapping(__pa(start), __pa(end), nid, prot);
|
||||
}
|
||||
|
||||
int __meminit radix__remove_section_mapping(unsigned long start, unsigned long end)
|
||||
|
|
|
@ -90,7 +90,8 @@ int memory_add_physaddr_to_nid(u64 start)
|
|||
}
|
||||
#endif
|
||||
|
||||
int __weak create_section_mapping(unsigned long start, unsigned long end, int nid)
|
||||
int __weak create_section_mapping(unsigned long start, unsigned long end,
|
||||
int nid, pgprot_t prot)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
|
@ -122,7 +123,7 @@ static void flush_dcache_range_chunked(unsigned long start, unsigned long stop,
|
|||
}
|
||||
|
||||
int __ref arch_add_memory(int nid, u64 start, u64 size,
|
||||
struct mhp_restrictions *restrictions)
|
||||
struct mhp_params *params)
|
||||
{
|
||||
unsigned long start_pfn = start >> PAGE_SHIFT;
|
||||
unsigned long nr_pages = size >> PAGE_SHIFT;
|
||||
|
@ -131,14 +132,15 @@ int __ref arch_add_memory(int nid, u64 start, u64 size,
|
|||
resize_hpt_for_hotplug(memblock_phys_mem_size());
|
||||
|
||||
start = (unsigned long)__va(start);
|
||||
rc = create_section_mapping(start, start + size, nid);
|
||||
rc = create_section_mapping(start, start + size, nid,
|
||||
params->pgprot);
|
||||
if (rc) {
|
||||
pr_warn("Unable to create mapping for hot added memory 0x%llx..0x%llx: %d\n",
|
||||
start, start + size, rc);
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
return __add_pages(nid, start_pfn, nr_pages, restrictions);
|
||||
return __add_pages(nid, start_pfn, nr_pages, params);
|
||||
}
|
||||
|
||||
void __ref arch_remove_memory(int nid, u64 start, u64 size,
|
||||
|
|
|
@ -137,8 +137,7 @@ extern phys_addr_t __phys_addr_symbol(unsigned long x);
|
|||
|
||||
#define virt_addr_valid(vaddr) (pfn_valid(virt_to_pfn(vaddr)))
|
||||
|
||||
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | \
|
||||
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
#define VM_DATA_DEFAULT_FLAGS VM_DATA_FLAGS_NON_EXEC
|
||||
|
||||
#include <asm-generic/memory_model.h>
|
||||
#include <asm-generic/getorder.h>
|
||||
|
|
|
@ -181,8 +181,7 @@ int arch_make_page_accessible(struct page *page);
|
|||
|
||||
#define virt_addr_valid(kaddr) pfn_valid(virt_to_pfn(kaddr))
|
||||
|
||||
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | \
|
||||
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
#define VM_DATA_DEFAULT_FLAGS VM_DATA_FLAGS_NON_EXEC
|
||||
|
||||
#include <asm-generic/memory_model.h>
|
||||
#include <asm-generic/getorder.h>
|
||||
|
|
|
@ -580,7 +580,7 @@ void do_dat_exception(struct pt_regs *regs)
|
|||
int access;
|
||||
vm_fault_t fault;
|
||||
|
||||
access = VM_READ | VM_EXEC | VM_WRITE;
|
||||
access = VM_ACCESS_FLAGS;
|
||||
fault = do_exception(regs, access);
|
||||
if (unlikely(fault))
|
||||
do_fault_error(regs, access, fault);
|
||||
|
|
|
@ -268,20 +268,23 @@ device_initcall(s390_cma_mem_init);
|
|||
#endif /* CONFIG_CMA */
|
||||
|
||||
int arch_add_memory(int nid, u64 start, u64 size,
|
||||
struct mhp_restrictions *restrictions)
|
||||
struct mhp_params *params)
|
||||
{
|
||||
unsigned long start_pfn = PFN_DOWN(start);
|
||||
unsigned long size_pages = PFN_DOWN(size);
|
||||
int rc;
|
||||
|
||||
if (WARN_ON_ONCE(restrictions->altmap))
|
||||
if (WARN_ON_ONCE(params->altmap))
|
||||
return -EINVAL;
|
||||
|
||||
if (WARN_ON_ONCE(params->pgprot.pgprot != PAGE_KERNEL.pgprot))
|
||||
return -EINVAL;
|
||||
|
||||
rc = vmem_add_mapping(start, size);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
rc = __add_pages(nid, start_pfn, size_pages, restrictions);
|
||||
rc = __add_pages(nid, start_pfn, size_pages, params);
|
||||
if (rc)
|
||||
vmem_remove_mapping(start, size);
|
||||
return rc;
|
||||
|
|
|
@ -182,9 +182,6 @@ typedef struct page *pgtable_t;
|
|||
#endif
|
||||
#define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
|
||||
|
||||
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
|
||||
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
|
||||
#include <asm-generic/memory_model.h>
|
||||
#include <asm-generic/getorder.h>
|
||||
|
||||
|
|
|
@ -406,14 +406,17 @@ void __init mem_init(void)
|
|||
|
||||
#ifdef CONFIG_MEMORY_HOTPLUG
|
||||
int arch_add_memory(int nid, u64 start, u64 size,
|
||||
struct mhp_restrictions *restrictions)
|
||||
struct mhp_params *params)
|
||||
{
|
||||
unsigned long start_pfn = PFN_DOWN(start);
|
||||
unsigned long nr_pages = size >> PAGE_SHIFT;
|
||||
int ret;
|
||||
|
||||
if (WARN_ON_ONCE(params->pgprot.pgprot != PAGE_KERNEL.pgprot)
|
||||
return -EINVAL;
|
||||
|
||||
/* We only have ZONE_NORMAL, so this is easy.. */
|
||||
ret = __add_pages(nid, start_pfn, nr_pages, restrictions);
|
||||
ret = __add_pages(nid, start_pfn, nr_pages, params);
|
||||
if (unlikely(ret))
|
||||
printk("%s: Failed, __add_pages() == %d\n", __func__, ret);
|
||||
|
||||
|
|
|
@ -133,9 +133,6 @@ extern unsigned long pfn_base;
|
|||
#define pfn_valid(pfn) (((pfn) >= (pfn_base)) && (((pfn)-(pfn_base)) < max_mapnr))
|
||||
#define virt_addr_valid(kaddr) ((((unsigned long)(kaddr)-PAGE_OFFSET)>>PAGE_SHIFT) < max_mapnr)
|
||||
|
||||
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
|
||||
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
|
||||
#include <asm-generic/memory_model.h>
|
||||
#include <asm-generic/getorder.h>
|
||||
|
||||
|
|
|
@ -158,9 +158,6 @@ extern unsigned long PAGE_OFFSET;
|
|||
|
||||
#endif /* !(__ASSEMBLY__) */
|
||||
|
||||
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
|
||||
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
|
||||
#include <asm-generic/getorder.h>
|
||||
|
||||
#endif /* _SPARC64_PAGE_H */
|
||||
|
|
|
@ -223,11 +223,6 @@ static inline int pte_young(pte_t pte)
|
|||
return pte_val(pte) & SRMMU_REF;
|
||||
}
|
||||
|
||||
static inline int pte_special(pte_t pte)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline pte_t pte_wrprotect(pte_t pte)
|
||||
{
|
||||
return __pte(pte_val(pte) & ~SRMMU_WRITE);
|
||||
|
@ -258,8 +253,6 @@ static inline pte_t pte_mkyoung(pte_t pte)
|
|||
return __pte(pte_val(pte) | SRMMU_REF);
|
||||
}
|
||||
|
||||
#define pte_mkspecial(pte) (pte)
|
||||
|
||||
#define pfn_pte(pfn, prot) mk_pte(pfn_to_page(pfn), prot)
|
||||
|
||||
static inline unsigned long pte_pfn(pte_t pte)
|
||||
|
|
|
@ -907,11 +907,11 @@ static inline unsigned long pud_pfn(pud_t pud)
|
|||
(((address) >> PMD_SHIFT) & (PTRS_PER_PMD-1)))
|
||||
|
||||
/* Find an entry in the third-level page table.. */
|
||||
#define pte_index(dir, address) \
|
||||
((pte_t *) __pmd_page(*(dir)) + \
|
||||
((address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)))
|
||||
#define pte_offset_kernel pte_index
|
||||
#define pte_offset_map pte_index
|
||||
#define pte_index(address) \
|
||||
((address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
|
||||
#define pte_offset_kernel(dir, address) \
|
||||
((pte_t *) __pmd_page(*(dir)) + pte_index(address))
|
||||
#define pte_offset_map(dir, address) pte_offset_kernel((dir), (address))
|
||||
#define pte_unmap(pte) do { } while (0)
|
||||
|
||||
/* We cannot include <linux/mm_types.h> at this point yet: */
|
||||
|
|
|
@ -167,11 +167,6 @@ static inline int pte_newprot(pte_t pte)
|
|||
return(pte_present(pte) && (pte_get_bits(pte, _PAGE_NEWPROT)));
|
||||
}
|
||||
|
||||
static inline int pte_special(pte_t pte)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* =================================
|
||||
* Flags setting section.
|
||||
|
@ -247,11 +242,6 @@ static inline pte_t pte_mknewpage(pte_t pte)
|
|||
return(pte);
|
||||
}
|
||||
|
||||
static inline pte_t pte_mkspecial(pte_t pte)
|
||||
{
|
||||
return(pte);
|
||||
}
|
||||
|
||||
static inline void set_pte(pte_t *pteptr, pte_t pteval)
|
||||
{
|
||||
pte_copy(*pteptr, pteval);
|
||||
|
|
|
@ -69,9 +69,6 @@ extern int pfn_valid(unsigned long);
|
|||
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
|
||||
#define VM_DATA_DEFAULT_FLAGS \
|
||||
(VM_READ | VM_WRITE | VM_EXEC | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
|
||||
#include <asm-generic/getorder.h>
|
||||
|
||||
#endif
|
||||
|
|
|
@ -177,7 +177,6 @@ extern struct page *empty_zero_page;
|
|||
#define pte_dirty(pte) (pte_val(pte) & PTE_DIRTY)
|
||||
#define pte_young(pte) (pte_val(pte) & PTE_YOUNG)
|
||||
#define pte_exec(pte) (pte_val(pte) & PTE_EXEC)
|
||||
#define pte_special(pte) (0)
|
||||
|
||||
#define PTE_BIT_FUNC(fn, op) \
|
||||
static inline pte_t pte_##fn(pte_t pte) { pte_val(pte) op; return pte; }
|
||||
|
@ -189,8 +188,6 @@ PTE_BIT_FUNC(mkdirty, |= PTE_DIRTY);
|
|||
PTE_BIT_FUNC(mkold, &= ~PTE_YOUNG);
|
||||
PTE_BIT_FUNC(mkyoung, |= PTE_YOUNG);
|
||||
|
||||
static inline pte_t pte_mkspecial(pte_t pte) { return pte; }
|
||||
|
||||
/*
|
||||
* Mark the prot value as uncacheable.
|
||||
*/
|
||||
|
|
|
@ -149,7 +149,7 @@ void do_bad_area(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
|
|||
*/
|
||||
static inline bool access_error(unsigned int fsr, struct vm_area_struct *vma)
|
||||
{
|
||||
unsigned int mask = VM_READ | VM_WRITE | VM_EXEC;
|
||||
unsigned int mask = VM_ACCESS_FLAGS;
|
||||
|
||||
if (!(fsr ^ 0x12)) /* write? */
|
||||
mask = VM_WRITE;
|
||||
|
|
|
@ -35,9 +35,7 @@
|
|||
|
||||
#define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET)
|
||||
|
||||
#define VM_DATA_DEFAULT_FLAGS \
|
||||
(((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0 ) | \
|
||||
VM_READ | VM_WRITE | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
#define VM_DATA_DEFAULT_FLAGS VM_DATA_FLAGS_TSK_EXEC
|
||||
|
||||
#define __PHYSICAL_START ALIGN(CONFIG_PHYSICAL_START, \
|
||||
CONFIG_PHYSICAL_ALIGN)
|
||||
|
@ -73,9 +71,6 @@ static inline phys_addr_t get_max_mapped(void)
|
|||
|
||||
bool pfn_range_is_mapped(unsigned long start_pfn, unsigned long end_pfn);
|
||||
|
||||
extern unsigned long init_memory_mapping(unsigned long start,
|
||||
unsigned long end);
|
||||
|
||||
extern void initmem_init(void);
|
||||
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
|
|
|
@ -860,7 +860,10 @@ static inline unsigned long pmd_index(unsigned long address)
|
|||
*
|
||||
* this function returns the index of the entry in the pte page which would
|
||||
* control the given virtual address
|
||||
*
|
||||
* Also define macro so we can test if pte_index is defined for arch.
|
||||
*/
|
||||
#define pte_index pte_index
|
||||
static inline unsigned long pte_index(unsigned long address)
|
||||
{
|
||||
return (address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1);
|
||||
|
@ -1078,6 +1081,9 @@ static inline void __meminit init_trampoline_default(void)
|
|||
|
||||
void __init poking_init(void);
|
||||
|
||||
unsigned long init_memory_mapping(unsigned long start,
|
||||
unsigned long end, pgprot_t prot);
|
||||
|
||||
# ifdef CONFIG_RANDOMIZE_MEMORY
|
||||
void __meminit init_trampoline(void);
|
||||
# else
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
* The caller is required to take care of these.
|
||||
*/
|
||||
|
||||
int __set_memory_prot(unsigned long addr, int numpages, pgprot_t prot);
|
||||
int _set_memory_uc(unsigned long addr, int numpages);
|
||||
int _set_memory_wc(unsigned long addr, int numpages);
|
||||
int _set_memory_wt(unsigned long addr, int numpages);
|
||||
|
|
|
@ -744,7 +744,8 @@ int __init gart_iommu_init(void)
|
|||
|
||||
start_pfn = PFN_DOWN(aper_base);
|
||||
if (!pfn_range_is_mapped(start_pfn, end_pfn))
|
||||
init_memory_mapping(start_pfn<<PAGE_SHIFT, end_pfn<<PAGE_SHIFT);
|
||||
init_memory_mapping(start_pfn<<PAGE_SHIFT, end_pfn<<PAGE_SHIFT,
|
||||
PAGE_KERNEL);
|
||||
|
||||
pr_info("PCI-DMA: using GART IOMMU.\n");
|
||||
iommu_size = check_iommu_size(info.aper_base, aper_size);
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include <linux/pci.h>
|
||||
#include <linux/root_dev.h>
|
||||
#include <linux/sfi.h>
|
||||
#include <linux/hugetlb.h>
|
||||
#include <linux/tboot.h>
|
||||
#include <linux/usb/xhci-dbgp.h>
|
||||
|
||||
|
@ -1157,6 +1158,9 @@ void __init setup_arch(char **cmdline_p)
|
|||
initmem_init();
|
||||
dma_contiguous_reserve(max_pfn_mapped << PAGE_SHIFT);
|
||||
|
||||
if (boot_cpu_has(X86_FEATURE_GBPAGES))
|
||||
hugetlb_cma_reserve(PUD_SHIFT - PAGE_SHIFT);
|
||||
|
||||
/*
|
||||
* Reserve memory for crash kernel after SRAT is parsed so that it
|
||||
* won't consume hotpluggable memory.
|
||||
|
|
|
@ -467,7 +467,7 @@ bool pfn_range_is_mapped(unsigned long start_pfn, unsigned long end_pfn)
|
|||
* the physical memory. To access them they are temporarily mapped.
|
||||
*/
|
||||
unsigned long __ref init_memory_mapping(unsigned long start,
|
||||
unsigned long end)
|
||||
unsigned long end, pgprot_t prot)
|
||||
{
|
||||
struct map_range mr[NR_RANGE_MR];
|
||||
unsigned long ret = 0;
|
||||
|
@ -481,7 +481,8 @@ unsigned long __ref init_memory_mapping(unsigned long start,
|
|||
|
||||
for (i = 0; i < nr_range; i++)
|
||||
ret = kernel_physical_mapping_init(mr[i].start, mr[i].end,
|
||||
mr[i].page_size_mask);
|
||||
mr[i].page_size_mask,
|
||||
prot);
|
||||
|
||||
add_pfn_range_mapped(start >> PAGE_SHIFT, ret >> PAGE_SHIFT);
|
||||
|
||||
|
@ -521,7 +522,7 @@ static unsigned long __init init_range_memory_mapping(
|
|||
*/
|
||||
can_use_brk_pgt = max(start, (u64)pgt_buf_end<<PAGE_SHIFT) >=
|
||||
min(end, (u64)pgt_buf_top<<PAGE_SHIFT);
|
||||
init_memory_mapping(start, end);
|
||||
init_memory_mapping(start, end, PAGE_KERNEL);
|
||||
mapped_ram_size += end - start;
|
||||
can_use_brk_pgt = true;
|
||||
}
|
||||
|
@ -661,7 +662,7 @@ void __init init_mem_mapping(void)
|
|||
#endif
|
||||
|
||||
/* the ISA range is always mapped regardless of memory holes */
|
||||
init_memory_mapping(0, ISA_END_ADDRESS);
|
||||
init_memory_mapping(0, ISA_END_ADDRESS, PAGE_KERNEL);
|
||||
|
||||
/* Init the trampoline, possibly with KASLR memory offset */
|
||||
init_trampoline();
|
||||
|
|
|
@ -257,7 +257,8 @@ static inline int __is_kernel_text(unsigned long addr)
|
|||
unsigned long __init
|
||||
kernel_physical_mapping_init(unsigned long start,
|
||||
unsigned long end,
|
||||
unsigned long page_size_mask)
|
||||
unsigned long page_size_mask,
|
||||
pgprot_t prot)
|
||||
{
|
||||
int use_pse = page_size_mask == (1<<PG_LEVEL_2M);
|
||||
unsigned long last_map_addr = end;
|
||||
|
@ -819,12 +820,24 @@ void __init mem_init(void)
|
|||
|
||||
#ifdef CONFIG_MEMORY_HOTPLUG
|
||||
int arch_add_memory(int nid, u64 start, u64 size,
|
||||
struct mhp_restrictions *restrictions)
|
||||
struct mhp_params *params)
|
||||
{
|
||||
unsigned long start_pfn = start >> PAGE_SHIFT;
|
||||
unsigned long nr_pages = size >> PAGE_SHIFT;
|
||||
int ret;
|
||||
|
||||
return __add_pages(nid, start_pfn, nr_pages, restrictions);
|
||||
/*
|
||||
* The page tables were already mapped at boot so if the caller
|
||||
* requests a different mapping type then we must change all the
|
||||
* pages with __set_memory_prot().
|
||||
*/
|
||||
if (params->pgprot.pgprot != PAGE_KERNEL.pgprot) {
|
||||
ret = __set_memory_prot(start, nr_pages, params->pgprot);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
return __add_pages(nid, start_pfn, nr_pages, params);
|
||||
}
|
||||
|
||||
void arch_remove_memory(int nid, u64 start, u64 size,
|
||||
|
|
|
@ -585,7 +585,7 @@ phys_pmd_init(pmd_t *pmd_page, unsigned long paddr, unsigned long paddr_end,
|
|||
*/
|
||||
static unsigned long __meminit
|
||||
phys_pud_init(pud_t *pud_page, unsigned long paddr, unsigned long paddr_end,
|
||||
unsigned long page_size_mask, bool init)
|
||||
unsigned long page_size_mask, pgprot_t _prot, bool init)
|
||||
{
|
||||
unsigned long pages = 0, paddr_next;
|
||||
unsigned long paddr_last = paddr_end;
|
||||
|
@ -595,7 +595,7 @@ phys_pud_init(pud_t *pud_page, unsigned long paddr, unsigned long paddr_end,
|
|||
for (; i < PTRS_PER_PUD; i++, paddr = paddr_next) {
|
||||
pud_t *pud;
|
||||
pmd_t *pmd;
|
||||
pgprot_t prot = PAGE_KERNEL;
|
||||
pgprot_t prot = _prot;
|
||||
|
||||
vaddr = (unsigned long)__va(paddr);
|
||||
pud = pud_page + pud_index(vaddr);
|
||||
|
@ -644,9 +644,12 @@ phys_pud_init(pud_t *pud_page, unsigned long paddr, unsigned long paddr_end,
|
|||
if (page_size_mask & (1<<PG_LEVEL_1G)) {
|
||||
pages++;
|
||||
spin_lock(&init_mm.page_table_lock);
|
||||
|
||||
prot = __pgprot(pgprot_val(prot) | __PAGE_KERNEL_LARGE);
|
||||
|
||||
set_pte_init((pte_t *)pud,
|
||||
pfn_pte((paddr & PUD_MASK) >> PAGE_SHIFT,
|
||||
PAGE_KERNEL_LARGE),
|
||||
prot),
|
||||
init);
|
||||
spin_unlock(&init_mm.page_table_lock);
|
||||
paddr_last = paddr_next;
|
||||
|
@ -669,7 +672,7 @@ phys_pud_init(pud_t *pud_page, unsigned long paddr, unsigned long paddr_end,
|
|||
|
||||
static unsigned long __meminit
|
||||
phys_p4d_init(p4d_t *p4d_page, unsigned long paddr, unsigned long paddr_end,
|
||||
unsigned long page_size_mask, bool init)
|
||||
unsigned long page_size_mask, pgprot_t prot, bool init)
|
||||
{
|
||||
unsigned long vaddr, vaddr_end, vaddr_next, paddr_next, paddr_last;
|
||||
|
||||
|
@ -679,7 +682,7 @@ phys_p4d_init(p4d_t *p4d_page, unsigned long paddr, unsigned long paddr_end,
|
|||
|
||||
if (!pgtable_l5_enabled())
|
||||
return phys_pud_init((pud_t *) p4d_page, paddr, paddr_end,
|
||||
page_size_mask, init);
|
||||
page_size_mask, prot, init);
|
||||
|
||||
for (; vaddr < vaddr_end; vaddr = vaddr_next) {
|
||||
p4d_t *p4d = p4d_page + p4d_index(vaddr);
|
||||
|
@ -702,13 +705,13 @@ phys_p4d_init(p4d_t *p4d_page, unsigned long paddr, unsigned long paddr_end,
|
|||
if (!p4d_none(*p4d)) {
|
||||
pud = pud_offset(p4d, 0);
|
||||
paddr_last = phys_pud_init(pud, paddr, __pa(vaddr_end),
|
||||
page_size_mask, init);
|
||||
page_size_mask, prot, init);
|
||||
continue;
|
||||
}
|
||||
|
||||
pud = alloc_low_page();
|
||||
paddr_last = phys_pud_init(pud, paddr, __pa(vaddr_end),
|
||||
page_size_mask, init);
|
||||
page_size_mask, prot, init);
|
||||
|
||||
spin_lock(&init_mm.page_table_lock);
|
||||
p4d_populate_init(&init_mm, p4d, pud, init);
|
||||
|
@ -722,7 +725,7 @@ static unsigned long __meminit
|
|||
__kernel_physical_mapping_init(unsigned long paddr_start,
|
||||
unsigned long paddr_end,
|
||||
unsigned long page_size_mask,
|
||||
bool init)
|
||||
pgprot_t prot, bool init)
|
||||
{
|
||||
bool pgd_changed = false;
|
||||
unsigned long vaddr, vaddr_start, vaddr_end, vaddr_next, paddr_last;
|
||||
|
@ -743,13 +746,13 @@ __kernel_physical_mapping_init(unsigned long paddr_start,
|
|||
paddr_last = phys_p4d_init(p4d, __pa(vaddr),
|
||||
__pa(vaddr_end),
|
||||
page_size_mask,
|
||||
init);
|
||||
prot, init);
|
||||
continue;
|
||||
}
|
||||
|
||||
p4d = alloc_low_page();
|
||||
paddr_last = phys_p4d_init(p4d, __pa(vaddr), __pa(vaddr_end),
|
||||
page_size_mask, init);
|
||||
page_size_mask, prot, init);
|
||||
|
||||
spin_lock(&init_mm.page_table_lock);
|
||||
if (pgtable_l5_enabled())
|
||||
|
@ -778,10 +781,10 @@ __kernel_physical_mapping_init(unsigned long paddr_start,
|
|||
unsigned long __meminit
|
||||
kernel_physical_mapping_init(unsigned long paddr_start,
|
||||
unsigned long paddr_end,
|
||||
unsigned long page_size_mask)
|
||||
unsigned long page_size_mask, pgprot_t prot)
|
||||
{
|
||||
return __kernel_physical_mapping_init(paddr_start, paddr_end,
|
||||
page_size_mask, true);
|
||||
page_size_mask, prot, true);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -796,7 +799,8 @@ kernel_physical_mapping_change(unsigned long paddr_start,
|
|||
unsigned long page_size_mask)
|
||||
{
|
||||
return __kernel_physical_mapping_init(paddr_start, paddr_end,
|
||||
page_size_mask, false);
|
||||
page_size_mask, PAGE_KERNEL,
|
||||
false);
|
||||
}
|
||||
|
||||
#ifndef CONFIG_NUMA
|
||||
|
@ -843,11 +847,11 @@ static void update_end_of_memory_vars(u64 start, u64 size)
|
|||
}
|
||||
|
||||
int add_pages(int nid, unsigned long start_pfn, unsigned long nr_pages,
|
||||
struct mhp_restrictions *restrictions)
|
||||
struct mhp_params *params)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = __add_pages(nid, start_pfn, nr_pages, restrictions);
|
||||
ret = __add_pages(nid, start_pfn, nr_pages, params);
|
||||
WARN_ON_ONCE(ret);
|
||||
|
||||
/* update max_pfn, max_low_pfn and high_memory */
|
||||
|
@ -858,14 +862,14 @@ int add_pages(int nid, unsigned long start_pfn, unsigned long nr_pages,
|
|||
}
|
||||
|
||||
int arch_add_memory(int nid, u64 start, u64 size,
|
||||
struct mhp_restrictions *restrictions)
|
||||
struct mhp_params *params)
|
||||
{
|
||||
unsigned long start_pfn = start >> PAGE_SHIFT;
|
||||
unsigned long nr_pages = size >> PAGE_SHIFT;
|
||||
|
||||
init_memory_mapping(start, start + size);
|
||||
init_memory_mapping(start, start + size, params->pgprot);
|
||||
|
||||
return add_pages(nid, start_pfn, nr_pages, restrictions);
|
||||
return add_pages(nid, start_pfn, nr_pages, params);
|
||||
}
|
||||
|
||||
#define PAGE_INUSE 0xFD
|
||||
|
|
|
@ -12,7 +12,8 @@ void early_ioremap_page_table_range_init(void);
|
|||
|
||||
unsigned long kernel_physical_mapping_init(unsigned long start,
|
||||
unsigned long end,
|
||||
unsigned long page_size_mask);
|
||||
unsigned long page_size_mask,
|
||||
pgprot_t prot);
|
||||
unsigned long kernel_physical_mapping_change(unsigned long start,
|
||||
unsigned long end,
|
||||
unsigned long page_size_mask);
|
||||
|
|
|
@ -1795,6 +1795,19 @@ static inline int cpa_clear_pages_array(struct page **pages, int numpages,
|
|||
CPA_PAGES_ARRAY, pages);
|
||||
}
|
||||
|
||||
/*
|
||||
* _set_memory_prot is an internal helper for callers that have been passed
|
||||
* a pgprot_t value from upper layers and a reservation has already been taken.
|
||||
* If you want to set the pgprot to a specific page protocol, use the
|
||||
* set_memory_xx() functions.
|
||||
*/
|
||||
int __set_memory_prot(unsigned long addr, int numpages, pgprot_t prot)
|
||||
{
|
||||
return change_page_attr_set_clr(&addr, numpages, prot,
|
||||
__pgprot(~pgprot_val(prot)), 0, 0,
|
||||
NULL);
|
||||
}
|
||||
|
||||
int _set_memory_uc(unsigned long addr, int numpages)
|
||||
{
|
||||
/*
|
||||
|
|
|
@ -63,7 +63,7 @@ int __execute_only_pkey(struct mm_struct *mm)
|
|||
static inline bool vma_is_pkey_exec_only(struct vm_area_struct *vma)
|
||||
{
|
||||
/* Do this check first since the vm_flags should be hot */
|
||||
if ((vma->vm_flags & (VM_READ | VM_WRITE | VM_EXEC)) != VM_EXEC)
|
||||
if ((vma->vm_flags & VM_ACCESS_FLAGS) != VM_EXEC)
|
||||
return false;
|
||||
if (vma_pkey(vma) != vma->vm_mm->context.execute_only_pkey)
|
||||
return false;
|
||||
|
|
|
@ -352,7 +352,8 @@ void __iomem *__init efi_ioremap(unsigned long phys_addr, unsigned long size,
|
|||
if (type == EFI_MEMORY_MAPPED_IO)
|
||||
return ioremap(phys_addr, size);
|
||||
|
||||
last_map_pfn = init_memory_mapping(phys_addr, phys_addr + size);
|
||||
last_map_pfn = init_memory_mapping(phys_addr, phys_addr + size,
|
||||
PAGE_KERNEL);
|
||||
if ((last_map_pfn << PAGE_SHIFT) < phys_addr + size) {
|
||||
unsigned long top = last_map_pfn << PAGE_SHIFT;
|
||||
efi_ioremap(top, size - (top - phys_addr), type, attribute);
|
||||
|
|
|
@ -9,17 +9,11 @@
|
|||
|
||||
#ifdef CONFIG_X86_32
|
||||
|
||||
#define VM_DATA_DEFAULT_FLAGS \
|
||||
(VM_READ | VM_WRITE | \
|
||||
((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0 ) | \
|
||||
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
#define VM_DATA_DEFAULT_FLAGS VM_DATA_FLAGS_TSK_EXEC
|
||||
|
||||
#else
|
||||
|
||||
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
|
||||
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
#define VM_STACK_DEFAULT_FLAGS (VM_GROWSDOWN | VM_READ | VM_WRITE | \
|
||||
VM_EXEC | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
#define VM_STACK_DEFAULT_FLAGS (VM_GROWSDOWN | VM_DATA_FLAGS_EXEC)
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -203,8 +203,5 @@ static inline unsigned long ___pa(unsigned long va)
|
|||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
|
||||
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
|
||||
#include <asm-generic/memory_model.h>
|
||||
#endif /* _XTENSA_PAGE_H */
|
||||
|
|
|
@ -266,7 +266,6 @@ static inline void paging_init(void) { }
|
|||
static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_WRITABLE; }
|
||||
static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; }
|
||||
static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; }
|
||||
static inline int pte_special(pte_t pte) { return 0; }
|
||||
|
||||
static inline pte_t pte_wrprotect(pte_t pte)
|
||||
{ pte_val(pte) &= ~(_PAGE_WRITABLE | _PAGE_HW_WRITE); return pte; }
|
||||
|
@ -280,8 +279,6 @@ static inline pte_t pte_mkyoung(pte_t pte)
|
|||
{ pte_val(pte) |= _PAGE_ACCESSED; return pte; }
|
||||
static inline pte_t pte_mkwrite(pte_t pte)
|
||||
{ pte_val(pte) |= _PAGE_WRITABLE; return pte; }
|
||||
static inline pte_t pte_mkspecial(pte_t pte)
|
||||
{ return pte; }
|
||||
|
||||
#define pgprot_noncached(prot) (__pgprot(pgprot_val(prot) & ~_PAGE_CA_MASK))
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* Copyright (C) 2009 Nokia Corporation
|
||||
* Author: Juha Yrjola <juha.yrjola@solidboot.com>
|
||||
*
|
||||
* Copyright (C) 2013 Pali Rohár <pali.rohar@gmail.com>
|
||||
* Copyright (C) 2013 Pali Rohár <pali@kernel.org>
|
||||
*
|
||||
* This file is licensed under the terms of the GNU General Public
|
||||
* License version 2. This program is licensed "as is" without any
|
||||
|
@ -178,5 +178,5 @@ module_platform_driver(omap3_rom_rng_driver);
|
|||
|
||||
MODULE_ALIAS("platform:omap3-rom-rng");
|
||||
MODULE_AUTHOR("Juha Yrjola");
|
||||
MODULE_AUTHOR("Pali Rohár <pali.rohar@gmail.com>");
|
||||
MODULE_AUTHOR("Pali Rohár <pali@kernel.org>");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
|
|
@ -1493,7 +1493,6 @@ static int tegra_dma_probe(struct platform_device *pdev)
|
|||
irq = platform_get_irq(pdev, i);
|
||||
if (irq < 0) {
|
||||
ret = irq;
|
||||
dev_err(&pdev->dev, "No irq resource for chan %d\n", i);
|
||||
goto err_pm_disable;
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* Hwmon integration:
|
||||
* Copyright (C) 2011 Jean Delvare <jdelvare@suse.de>
|
||||
* Copyright (C) 2013, 2014 Guenter Roeck <linux@roeck-us.net>
|
||||
* Copyright (C) 2014, 2015 Pali Rohár <pali.rohar@gmail.com>
|
||||
* Copyright (C) 2014, 2015 Pali Rohár <pali@kernel.org>
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||
|
@ -86,7 +86,7 @@ static unsigned int auto_fan;
|
|||
#define I8K_HWMON_HAVE_FAN3 (1 << 12)
|
||||
|
||||
MODULE_AUTHOR("Massimo Dal Zotto (dz@debian.org)");
|
||||
MODULE_AUTHOR("Pali Rohár <pali.rohar@gmail.com>");
|
||||
MODULE_AUTHOR("Pali Rohár <pali@kernel.org>");
|
||||
MODULE_DESCRIPTION("Dell laptop SMM BIOS hwmon driver");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_ALIAS("i8k");
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* Copyright (c) Red Hat <mjg@redhat.com>
|
||||
* Copyright (c) 2014 Gabriele Mazzotta <gabriele.mzt@gmail.com>
|
||||
* Copyright (c) 2014 Pali Rohár <pali.rohar@gmail.com>
|
||||
* Copyright (c) 2014 Pali Rohár <pali@kernel.org>
|
||||
*
|
||||
* Based on documentation in the libsmbios package:
|
||||
* Copyright (C) 2005-2014 Dell Inc.
|
||||
|
@ -2295,6 +2295,6 @@ module_exit(dell_exit);
|
|||
|
||||
MODULE_AUTHOR("Matthew Garrett <mjg@redhat.com>");
|
||||
MODULE_AUTHOR("Gabriele Mazzotta <gabriele.mzt@gmail.com>");
|
||||
MODULE_AUTHOR("Pali Rohár <pali.rohar@gmail.com>");
|
||||
MODULE_AUTHOR("Pali Rohár <pali@kernel.org>");
|
||||
MODULE_DESCRIPTION("Dell laptop driver");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
/*
|
||||
Dell Airplane Mode Switch driver
|
||||
Copyright (C) 2014-2015 Pali Rohár <pali.rohar@gmail.com>
|
||||
Copyright (C) 2014-2015 Pali Rohár <pali@kernel.org>
|
||||
|
||||
*/
|
||||
|
||||
|
@ -495,5 +495,5 @@ MODULE_PARM_DESC(auto_remove_rfkill, "Automatically remove rfkill devices when "
|
|||
"(default true)");
|
||||
MODULE_DEVICE_TABLE(acpi, rbtn_ids);
|
||||
MODULE_DESCRIPTION("Dell Airplane Mode Switch driver");
|
||||
MODULE_AUTHOR("Pali Rohár <pali.rohar@gmail.com>");
|
||||
MODULE_AUTHOR("Pali Rohár <pali@kernel.org>");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
/*
|
||||
Dell Airplane Mode Switch driver
|
||||
Copyright (C) 2014-2015 Pali Rohár <pali.rohar@gmail.com>
|
||||
Copyright (C) 2014-2015 Pali Rohár <pali@kernel.org>
|
||||
|
||||
*/
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* Copyright (c) Red Hat <mjg@redhat.com>
|
||||
* Copyright (c) 2014 Gabriele Mazzotta <gabriele.mzt@gmail.com>
|
||||
* Copyright (c) 2014 Pali Rohár <pali.rohar@gmail.com>
|
||||
* Copyright (c) 2014 Pali Rohár <pali@kernel.org>
|
||||
*
|
||||
* Based on documentation in the libsmbios package:
|
||||
* Copyright (C) 2005-2014 Dell Inc.
|
||||
|
@ -645,7 +645,7 @@ module_exit(dell_smbios_exit);
|
|||
|
||||
MODULE_AUTHOR("Matthew Garrett <mjg@redhat.com>");
|
||||
MODULE_AUTHOR("Gabriele Mazzotta <gabriele.mzt@gmail.com>");
|
||||
MODULE_AUTHOR("Pali Rohár <pali.rohar@gmail.com>");
|
||||
MODULE_AUTHOR("Pali Rohár <pali@kernel.org>");
|
||||
MODULE_AUTHOR("Mario Limonciello <mario.limonciello@dell.com>");
|
||||
MODULE_DESCRIPTION("Common functions for kernel modules using Dell SMBIOS");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* Copyright (c) Red Hat <mjg@redhat.com>
|
||||
* Copyright (c) 2014 Gabriele Mazzotta <gabriele.mzt@gmail.com>
|
||||
* Copyright (c) 2014 Pali Rohár <pali.rohar@gmail.com>
|
||||
* Copyright (c) 2014 Pali Rohár <pali@kernel.org>
|
||||
* Copyright (c) 2017 Dell Inc.
|
||||
*/
|
||||
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* Copyright (c) Red Hat <mjg@redhat.com>
|
||||
* Copyright (c) 2014 Gabriele Mazzotta <gabriele.mzt@gmail.com>
|
||||
* Copyright (c) 2014 Pali Rohár <pali.rohar@gmail.com>
|
||||
* Copyright (c) 2014 Pali Rohár <pali@kernel.org>
|
||||
*
|
||||
* Based on documentation in the libsmbios package:
|
||||
* Copyright (C) 2005-2014 Dell Inc.
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* dell-smo8800.c - Dell Latitude ACPI SMO88XX freefall sensor driver
|
||||
*
|
||||
* Copyright (C) 2012 Sonal Santan <sonal.santan@gmail.com>
|
||||
* Copyright (C) 2014 Pali Rohár <pali.rohar@gmail.com>
|
||||
* Copyright (C) 2014 Pali Rohár <pali@kernel.org>
|
||||
*
|
||||
* This is loosely based on lis3lv02d driver.
|
||||
*/
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* Dell WMI hotkeys
|
||||
*
|
||||
* Copyright (C) 2008 Red Hat <mjg@redhat.com>
|
||||
* Copyright (C) 2014-2015 Pali Rohár <pali.rohar@gmail.com>
|
||||
* Copyright (C) 2014-2015 Pali Rohár <pali@kernel.org>
|
||||
*
|
||||
* Portions based on wistron_btns.c:
|
||||
* Copyright (C) 2005 Miloslav Trmac <mitr@volny.cz>
|
||||
|
@ -29,7 +29,7 @@
|
|||
#include "dell-wmi-descriptor.h"
|
||||
|
||||
MODULE_AUTHOR("Matthew Garrett <mjg@redhat.com>");
|
||||
MODULE_AUTHOR("Pali Rohár <pali.rohar@gmail.com>");
|
||||
MODULE_AUTHOR("Pali Rohár <pali@kernel.org>");
|
||||
MODULE_DESCRIPTION("Dell laptop WMI hotkeys driver");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/*
|
||||
* bq2415x charger driver
|
||||
*
|
||||
* Copyright (C) 2011-2013 Pali Rohár <pali.rohar@gmail.com>
|
||||
* Copyright (C) 2011-2013 Pali Rohár <pali@kernel.org>
|
||||
*
|
||||
* Datasheets:
|
||||
* http://www.ti.com/product/bq24150
|
||||
|
@ -1788,6 +1788,6 @@ static struct i2c_driver bq2415x_driver = {
|
|||
};
|
||||
module_i2c_driver(bq2415x_driver);
|
||||
|
||||
MODULE_AUTHOR("Pali Rohár <pali.rohar@gmail.com>");
|
||||
MODULE_AUTHOR("Pali Rohár <pali@kernel.org>");
|
||||
MODULE_DESCRIPTION("bq2415x charger driver");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* Copyright (C) 2008 Rodolfo Giometti <giometti@linux.it>
|
||||
* Copyright (C) 2008 Eurotech S.p.A. <info@eurotech.it>
|
||||
* Copyright (C) 2010-2011 Lars-Peter Clausen <lars@metafoo.de>
|
||||
* Copyright (C) 2011 Pali Rohár <pali.rohar@gmail.com>
|
||||
* Copyright (C) 2011 Pali Rohár <pali@kernel.org>
|
||||
* Copyright (C) 2017 Liam Breck <kernel@networkimprov.net>
|
||||
*
|
||||
* Based on a previous work by Copyright (C) 2008 Texas Instruments, Inc.
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* ISP1704 USB Charger Detection driver
|
||||
*
|
||||
* Copyright (C) 2010 Nokia Corporation
|
||||
* Copyright (C) 2012 - 2013 Pali Rohár <pali.rohar@gmail.com>
|
||||
* Copyright (C) 2012 - 2013 Pali Rohár <pali@kernel.org>
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/*
|
||||
* Nokia RX-51 battery driver
|
||||
*
|
||||
* Copyright (C) 2012 Pali Rohár <pali.rohar@gmail.com>
|
||||
* Copyright (C) 2012 Pali Rohár <pali@kernel.org>
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
|
@ -278,6 +278,6 @@ static struct platform_driver rx51_battery_driver = {
|
|||
module_platform_driver(rx51_battery_driver);
|
||||
|
||||
MODULE_ALIAS("platform:rx51-battery");
|
||||
MODULE_AUTHOR("Pali Rohár <pali.rohar@gmail.com>");
|
||||
MODULE_AUTHOR("Pali Rohár <pali@kernel.org>");
|
||||
MODULE_DESCRIPTION("Nokia RX-51 battery driver");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue