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 branches 'amba', 'fixes', 'misc' and 'tauros2' into for-next
This commit is contained in:
@@ -100,3 +100,29 @@ allocated by dma_alloc_attrs() function from individual pages if it can
|
||||
be mapped as contiguous chunk into device dma address space. By
|
||||
specifying this attribute the allocated buffer is forced to be contiguous
|
||||
also in physical memory.
|
||||
|
||||
DMA_ATTR_ALLOC_SINGLE_PAGES
|
||||
---------------------------
|
||||
|
||||
This is a hint to the DMA-mapping subsystem that it's probably not worth
|
||||
the time to try to allocate memory to in a way that gives better TLB
|
||||
efficiency (AKA it's not worth trying to build the mapping out of larger
|
||||
pages). You might want to specify this if:
|
||||
- You know that the accesses to this memory won't thrash the TLB.
|
||||
You might know that the accesses are likely to be sequential or
|
||||
that they aren't sequential but it's unlikely you'll ping-pong
|
||||
between many addresses that are likely to be in different physical
|
||||
pages.
|
||||
- You know that the penalty of TLB misses while accessing the
|
||||
memory will be small enough to be inconsequential. If you are
|
||||
doing a heavy operation like decryption or decompression this
|
||||
might be the case.
|
||||
- You know that the DMA mapping is fairly transitory. If you expect
|
||||
the mapping to have a short lifetime then it may be worth it to
|
||||
optimize allocation (avoid coming up with large pages) instead of
|
||||
getting the slight performance win of larger pages.
|
||||
Setting this hint doesn't guarantee that you won't get huge pages, but it
|
||||
means that we won't try quite as hard to get them.
|
||||
|
||||
NOTE: At the moment DMA_ATTR_ALLOC_SINGLE_PAGES is only implemented on ARM,
|
||||
though ARM64 patches will likely be posted soon.
|
||||
|
||||
@@ -340,8 +340,10 @@ comparison:
|
||||
|
||||
int (*match)(struct device * dev, struct device_driver * drv);
|
||||
|
||||
match should return '1' if the driver supports the device, and '0'
|
||||
otherwise.
|
||||
match should return positive value if the driver supports the device,
|
||||
and zero otherwise. It may also return error code (for example
|
||||
-EPROBE_DEFER) if determining that given driver supports the device is
|
||||
not possible.
|
||||
|
||||
When a device is registered, the bus's list of drivers is iterated
|
||||
over. bus->match() is called for each one until a match is found.
|
||||
|
||||
+2
-3
@@ -572,7 +572,6 @@ config ARCH_RPC
|
||||
select NEED_MACH_IO_H
|
||||
select NEED_MACH_MEMORY_H
|
||||
select NO_IOPORT_MAP
|
||||
select VIRT_TO_BUS
|
||||
help
|
||||
On the Acorn Risc-PC, Linux can support the internal IDE disk and
|
||||
CD-ROM interface, serial and parallel port, and the floppy drive.
|
||||
@@ -1337,7 +1336,6 @@ config BIG_LITTLE
|
||||
config BL_SWITCHER
|
||||
bool "big.LITTLE switcher support"
|
||||
depends on BIG_LITTLE && MCPM && HOTPLUG_CPU && ARM_GIC
|
||||
select ARM_CPU_SUSPEND
|
||||
select CPU_PM
|
||||
help
|
||||
The big.LITTLE "switcher" provides the core functionality to
|
||||
@@ -2111,7 +2109,8 @@ config ARCH_SUSPEND_POSSIBLE
|
||||
def_bool y
|
||||
|
||||
config ARM_CPU_SUSPEND
|
||||
def_bool PM_SLEEP
|
||||
def_bool PM_SLEEP || BL_SWITCHER || ARM_PSCI_FW
|
||||
depends on ARCH_SUSPEND_POSSIBLE
|
||||
|
||||
config ARCH_HIBERNATION_POSSIBLE
|
||||
bool
|
||||
|
||||
@@ -352,7 +352,6 @@ archclean:
|
||||
|
||||
# My testing targets (bypasses dependencies)
|
||||
bp:; $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/bootpImage
|
||||
i zi:; $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $@
|
||||
|
||||
|
||||
define archhelp
|
||||
|
||||
@@ -88,7 +88,7 @@ $(obj)/bootpImage: $(obj)/bootp/bootp FORCE
|
||||
$(call if_changed,objcopy)
|
||||
@$(kecho) ' Kernel: $@ is ready'
|
||||
|
||||
PHONY += initrd FORCE
|
||||
PHONY += initrd
|
||||
initrd:
|
||||
@test "$(INITRD_PHYS)" != "" || \
|
||||
(echo This machine does not support INITRD; exit -1)
|
||||
@@ -107,12 +107,4 @@ uinstall:
|
||||
$(CONFIG_SHELL) $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" \
|
||||
$(obj)/uImage System.map "$(INSTALL_PATH)"
|
||||
|
||||
zi:
|
||||
$(CONFIG_SHELL) $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" \
|
||||
$(obj)/zImage System.map "$(INSTALL_PATH)"
|
||||
|
||||
i:
|
||||
$(CONFIG_SHELL) $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" \
|
||||
$(obj)/Image System.map "$(INSTALL_PATH)"
|
||||
|
||||
subdir- := bootp compressed dts
|
||||
|
||||
@@ -3,11 +3,7 @@ bswapsdi2.S
|
||||
font.c
|
||||
lib1funcs.S
|
||||
hyp-stub.S
|
||||
piggy.gzip
|
||||
piggy.lzo
|
||||
piggy.lzma
|
||||
piggy.xzkern
|
||||
piggy.lz4
|
||||
piggy_data
|
||||
vmlinux
|
||||
vmlinux.lds
|
||||
|
||||
|
||||
@@ -66,11 +66,11 @@ endif
|
||||
|
||||
CPPFLAGS_vmlinux.lds := -DTEXT_START="$(ZTEXTADDR)" -DBSS_START="$(ZBSSADDR)"
|
||||
|
||||
suffix_$(CONFIG_KERNEL_GZIP) = gzip
|
||||
suffix_$(CONFIG_KERNEL_LZO) = lzo
|
||||
suffix_$(CONFIG_KERNEL_LZMA) = lzma
|
||||
suffix_$(CONFIG_KERNEL_XZ) = xzkern
|
||||
suffix_$(CONFIG_KERNEL_LZ4) = lz4
|
||||
compress-$(CONFIG_KERNEL_GZIP) = gzip
|
||||
compress-$(CONFIG_KERNEL_LZO) = lzo
|
||||
compress-$(CONFIG_KERNEL_LZMA) = lzma
|
||||
compress-$(CONFIG_KERNEL_XZ) = xzkern
|
||||
compress-$(CONFIG_KERNEL_LZ4) = lz4
|
||||
|
||||
# Borrowed libfdt files for the ATAG compatibility mode
|
||||
|
||||
@@ -89,15 +89,12 @@ ifeq ($(CONFIG_ARM_ATAG_DTB_COMPAT),y)
|
||||
OBJS += $(libfdt_objs) atags_to_fdt.o
|
||||
endif
|
||||
|
||||
targets := vmlinux vmlinux.lds \
|
||||
piggy.$(suffix_y) piggy.$(suffix_y).o \
|
||||
lib1funcs.o lib1funcs.S ashldi3.o ashldi3.S bswapsdi2.o \
|
||||
bswapsdi2.S font.o font.c head.o misc.o $(OBJS)
|
||||
targets := vmlinux vmlinux.lds piggy_data piggy.o \
|
||||
lib1funcs.o ashldi3.o bswapsdi2.o \
|
||||
head.o $(OBJS)
|
||||
|
||||
# Make sure files are removed during clean
|
||||
extra-y += piggy.gzip piggy.lzo piggy.lzma piggy.xzkern piggy.lz4 \
|
||||
lib1funcs.S ashldi3.S bswapsdi2.S $(libfdt) $(libfdt_hdrs) \
|
||||
hyp-stub.S
|
||||
clean-files += piggy_data lib1funcs.S ashldi3.S bswapsdi2.S \
|
||||
$(libfdt) $(libfdt_hdrs) hyp-stub.S
|
||||
|
||||
KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING
|
||||
|
||||
@@ -178,22 +175,24 @@ fi
|
||||
|
||||
efi-obj-$(CONFIG_EFI_STUB) := $(objtree)/drivers/firmware/efi/libstub/lib.a
|
||||
|
||||
$(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.$(suffix_y).o \
|
||||
$(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.o \
|
||||
$(addprefix $(obj)/, $(OBJS)) $(lib1funcs) $(ashldi3) \
|
||||
$(bswapsdi2) $(efi-obj-y) FORCE
|
||||
@$(check_for_multiple_zreladdr)
|
||||
$(call if_changed,ld)
|
||||
@$(check_for_bad_syms)
|
||||
|
||||
$(obj)/piggy.$(suffix_y): $(obj)/../Image FORCE
|
||||
$(call if_changed,$(suffix_y))
|
||||
$(obj)/piggy_data: $(obj)/../Image FORCE
|
||||
$(call if_changed,$(compress-y))
|
||||
|
||||
$(obj)/piggy.$(suffix_y).o: $(obj)/piggy.$(suffix_y) FORCE
|
||||
$(obj)/piggy.o: $(obj)/piggy_data
|
||||
|
||||
CFLAGS_font.o := -Dstatic=
|
||||
|
||||
$(obj)/font.c: $(FONTC)
|
||||
$(call cmd,shipped)
|
||||
|
||||
AFLAGS_hyp-stub.o := -Wa,-march=armv7-a
|
||||
|
||||
$(obj)/hyp-stub.S: $(srctree)/arch/$(SRCARCH)/kernel/hyp-stub.S
|
||||
$(call cmd,shipped)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.section .piggydata,#alloc
|
||||
.globl input_data
|
||||
input_data:
|
||||
.incbin "arch/arm/boot/compressed/piggy.gzip"
|
||||
.incbin "arch/arm/boot/compressed/piggy_data"
|
||||
.globl input_data_end
|
||||
input_data_end:
|
||||
@@ -1,6 +0,0 @@
|
||||
.section .piggydata,#alloc
|
||||
.globl input_data
|
||||
input_data:
|
||||
.incbin "arch/arm/boot/compressed/piggy.lz4"
|
||||
.globl input_data_end
|
||||
input_data_end:
|
||||
@@ -1,6 +0,0 @@
|
||||
.section .piggydata,#alloc
|
||||
.globl input_data
|
||||
input_data:
|
||||
.incbin "arch/arm/boot/compressed/piggy.lzma"
|
||||
.globl input_data_end
|
||||
input_data_end:
|
||||
@@ -1,6 +0,0 @@
|
||||
.section .piggydata,#alloc
|
||||
.globl input_data
|
||||
input_data:
|
||||
.incbin "arch/arm/boot/compressed/piggy.lzo"
|
||||
.globl input_data_end
|
||||
input_data_end:
|
||||
@@ -1,6 +0,0 @@
|
||||
.section .piggydata,#alloc
|
||||
.globl input_data
|
||||
input_data:
|
||||
.incbin "arch/arm/boot/compressed/piggy.xzkern"
|
||||
.globl input_data_end
|
||||
input_data_end:
|
||||
@@ -1290,7 +1290,7 @@ static int sa1111_match(struct device *_dev, struct device_driver *_drv)
|
||||
struct sa1111_dev *dev = SA1111_DEV(_dev);
|
||||
struct sa1111_driver *drv = SA1111_DRV(_drv);
|
||||
|
||||
return dev->devid & drv->devid;
|
||||
return !!(dev->devid & drv->devid);
|
||||
}
|
||||
|
||||
static int sa1111_bus_suspend(struct device *dev, pm_message_t state)
|
||||
|
||||
@@ -23,7 +23,6 @@ generic-y += preempt.h
|
||||
generic-y += resource.h
|
||||
generic-y += rwsem.h
|
||||
generic-y += seccomp.h
|
||||
generic-y += sections.h
|
||||
generic-y += segment.h
|
||||
generic-y += sembuf.h
|
||||
generic-y += serial.h
|
||||
|
||||
@@ -74,7 +74,7 @@ static inline uint32_t __div64_32(uint64_t *n, uint32_t base)
|
||||
static inline uint64_t __arch_xprod_64(uint64_t m, uint64_t n, bool bias)
|
||||
{
|
||||
unsigned long long res;
|
||||
unsigned int tmp = 0;
|
||||
register unsigned int tmp asm("ip") = 0;
|
||||
|
||||
if (!bias) {
|
||||
asm ( "umull %Q0, %R0, %Q1, %Q2\n\t"
|
||||
@@ -90,12 +90,12 @@ static inline uint64_t __arch_xprod_64(uint64_t m, uint64_t n, bool bias)
|
||||
: "r" (m), "r" (n)
|
||||
: "cc");
|
||||
} else {
|
||||
asm ( "umull %Q0, %R0, %Q1, %Q2\n\t"
|
||||
"cmn %Q0, %Q1\n\t"
|
||||
"adcs %R0, %R0, %R1\n\t"
|
||||
"adc %Q0, %3, #0"
|
||||
: "=&r" (res)
|
||||
: "r" (m), "r" (n), "r" (tmp)
|
||||
asm ( "umull %Q0, %R0, %Q2, %Q3\n\t"
|
||||
"cmn %Q0, %Q2\n\t"
|
||||
"adcs %R0, %R0, %R2\n\t"
|
||||
"adc %Q0, %1, #0"
|
||||
: "=&r" (res), "+&r" (tmp)
|
||||
: "r" (m), "r" (n)
|
||||
: "cc");
|
||||
}
|
||||
|
||||
|
||||
@@ -134,6 +134,21 @@
|
||||
*/
|
||||
#define PLAT_PHYS_OFFSET UL(CONFIG_PHYS_OFFSET)
|
||||
|
||||
#ifdef CONFIG_XIP_KERNEL
|
||||
/*
|
||||
* When referencing data in RAM from the XIP region in a relative manner
|
||||
* with the MMU off, we need the relative offset between the two physical
|
||||
* addresses. The macro below achieves this, which is:
|
||||
* __pa(v_data) - __xip_pa(v_text)
|
||||
*/
|
||||
#define PHYS_RELATIVE(v_data, v_text) \
|
||||
(((v_data) - PAGE_OFFSET + PLAT_PHYS_OFFSET) - \
|
||||
((v_text) - XIP_VIRT_ADDR(CONFIG_XIP_PHYS_ADDR) + \
|
||||
CONFIG_XIP_PHYS_ADDR))
|
||||
#else
|
||||
#define PHYS_RELATIVE(v_data, v_text) ((v_data) - (v_text))
|
||||
#endif
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
/*
|
||||
@@ -273,14 +288,14 @@ static inline void *phys_to_virt(phys_addr_t x)
|
||||
#define __va(x) ((void *)__phys_to_virt((phys_addr_t)(x)))
|
||||
#define pfn_to_kaddr(pfn) __va((phys_addr_t)(pfn) << PAGE_SHIFT)
|
||||
|
||||
extern phys_addr_t (*arch_virt_to_idmap)(unsigned long x);
|
||||
extern unsigned long (*arch_virt_to_idmap)(unsigned long x);
|
||||
|
||||
/*
|
||||
* These are for systems that have a hardware interconnect supported alias of
|
||||
* physical memory for idmap purposes. Most cases should leave these
|
||||
* untouched.
|
||||
* untouched. Note: this can only return addresses less than 4GiB.
|
||||
*/
|
||||
static inline phys_addr_t __virt_to_idmap(unsigned long x)
|
||||
static inline unsigned long __virt_to_idmap(unsigned long x)
|
||||
{
|
||||
if (IS_ENABLED(CONFIG_MMU) && arch_virt_to_idmap)
|
||||
return arch_virt_to_idmap(x);
|
||||
@@ -303,20 +318,6 @@ static inline phys_addr_t __virt_to_idmap(unsigned long x)
|
||||
#define __bus_to_pfn(x) __phys_to_pfn(x)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_VIRT_TO_BUS
|
||||
#define virt_to_bus virt_to_bus
|
||||
static inline __deprecated unsigned long virt_to_bus(void *x)
|
||||
{
|
||||
return __virt_to_bus((unsigned long)x);
|
||||
}
|
||||
|
||||
#define bus_to_virt bus_to_virt
|
||||
static inline __deprecated void *bus_to_virt(unsigned long x)
|
||||
{
|
||||
return (void *)__bus_to_virt(x);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Conversion between a struct page and a physical address.
|
||||
*
|
||||
|
||||
@@ -26,7 +26,12 @@ void __check_vmalloc_seq(struct mm_struct *mm);
|
||||
#ifdef CONFIG_CPU_HAS_ASID
|
||||
|
||||
void check_and_switch_context(struct mm_struct *mm, struct task_struct *tsk);
|
||||
#define init_new_context(tsk,mm) ({ atomic64_set(&(mm)->context.id, 0); 0; })
|
||||
static inline int
|
||||
init_new_context(struct task_struct *tsk, struct mm_struct *mm)
|
||||
{
|
||||
atomic64_set(&mm->context.id, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ARM_ERRATA_798181
|
||||
void a15_erratum_get_cpumask(int this_cpu, struct mm_struct *mm,
|
||||
@@ -85,7 +90,12 @@ static inline void finish_arch_post_lock_switch(void)
|
||||
|
||||
#endif /* CONFIG_MMU */
|
||||
|
||||
#define init_new_context(tsk,mm) 0
|
||||
static inline int
|
||||
init_new_context(struct task_struct *tsk, struct mm_struct *mm)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#endif /* CONFIG_CPU_HAS_ASID */
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
#ifndef _ASM_ARM_SECTIONS_H
|
||||
#define _ASM_ARM_SECTIONS_H
|
||||
|
||||
#include <asm-generic/sections.h>
|
||||
|
||||
extern char _exiprom[];
|
||||
|
||||
#endif /* _ASM_ARM_SECTIONS_H */
|
||||
@@ -15,10 +15,11 @@
|
||||
* Eg, if you have 2 banks of up to 64MB at 0x80000000, 0x84000000,
|
||||
* then MAX_PHYSMEM_BITS is 32, SECTION_SIZE_BITS is 26.
|
||||
*
|
||||
* Define these in your mach/memory.h.
|
||||
* These can be overridden in your mach/memory.h.
|
||||
*/
|
||||
#if !defined(SECTION_SIZE_BITS) || !defined(MAX_PHYSMEM_BITS)
|
||||
#error Sparsemem is not supported on this platform
|
||||
#if !defined(MAX_PHYSMEM_BITS) || !defined(SECTION_SIZE_BITS)
|
||||
#define MAX_PHYSMEM_BITS 36
|
||||
#define SECTION_SIZE_BITS 28
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -88,6 +88,7 @@ obj-$(CONFIG_DEBUG_LL) += debug.o
|
||||
obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
|
||||
|
||||
obj-$(CONFIG_ARM_VIRT_EXT) += hyp-stub.o
|
||||
AFLAGS_hyp-stub.o :=-Wa,-march=armv7-a
|
||||
ifeq ($(CONFIG_ARM_PSCI),y)
|
||||
obj-$(CONFIG_SMP) += psci_smp.o
|
||||
endif
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user