Loading Makefile +4 −1 Original line number Diff line number Diff line VERSION = 3 PATCHLEVEL = 18 SUBLEVEL = 88 SUBLEVEL = 91 EXTRAVERSION = NAME = Diseased Newt Loading Loading @@ -775,6 +775,9 @@ KBUILD_CFLAGS += $(call cc-disable-warning, pointer-sign) # disable invalid "can't wrap" optimizations for signed / pointers KBUILD_CFLAGS += $(call cc-option,-fno-strict-overflow) # Make sure -fstack-check isn't enabled (like gentoo apparently did) KBUILD_CFLAGS += $(call cc-option,-fno-stack-check,) # conserve stack if available KBUILD_CFLAGS += $(call cc-option,-fconserve-stack) Loading arch/arm/boot/dts/am335x-evmsk.dts +1 −0 Original line number Diff line number Diff line Loading @@ -646,6 +646,7 @@ ti,non-removable; bus-width = <4>; cap-power-off-card; keep-power-in-suspend; pinctrl-names = "default"; pinctrl-0 = <&mmc2_pins>; Loading arch/arm/boot/dts/dra7.dtsi +2 −0 Original line number Diff line number Diff line Loading @@ -118,6 +118,7 @@ device_type = "pci"; ranges = <0x81000000 0 0 0x03000 0 0x00010000 0x82000000 0 0x20013000 0x13000 0 0xffed000>; bus-range = <0x00 0xff>; #interrupt-cells = <1>; num-lanes = <1>; ti,hwmods = "pcie1"; Loading Loading @@ -153,6 +154,7 @@ device_type = "pci"; ranges = <0x81000000 0 0 0x03000 0 0x00010000 0x82000000 0 0x30013000 0x13000 0 0xffed000>; bus-range = <0x00 0xff>; #interrupt-cells = <1>; num-lanes = <1>; ti,hwmods = "pcie2"; Loading arch/arm/mm/dma-mapping.c +19 −1 Original line number Diff line number Diff line Loading @@ -864,13 +864,31 @@ static void arm_coherent_dma_free(struct device *dev, size_t size, void *cpu_add __arm_dma_free(dev, size, cpu_addr, handle, attrs, true); } /* * The whole dma_get_sgtable() idea is fundamentally unsafe - it seems * that the intention is to allow exporting memory allocated via the * coherent DMA APIs through the dma_buf API, which only accepts a * scattertable. This presents a couple of problems: * 1. Not all memory allocated via the coherent DMA APIs is backed by * a struct page * 2. Passing coherent DMA memory into the streaming APIs is not allowed * as we will try to flush the memory through a different alias to that * actually being used (and the flushes are redundant.) */ int arm_dma_get_sgtable(struct device *dev, struct sg_table *sgt, void *cpu_addr, dma_addr_t handle, size_t size, struct dma_attrs *attrs) { struct page *page = pfn_to_page(dma_to_pfn(dev, handle)); unsigned long pfn = dma_to_pfn(dev, handle); struct page *page; int ret; /* If the PFN is not valid, we do not have a struct page */ if (!pfn_valid(pfn)) return -ENXIO; page = pfn_to_page(pfn); ret = sg_alloc_table(sgt, 1, GFP_KERNEL); if (unlikely(ret)) return ret; Loading arch/arm64/include/asm/memory.h +1 −0 Original line number Diff line number Diff line Loading @@ -133,6 +133,7 @@ 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((pfn) << PAGE_SHIFT) #define virt_to_pfn(x) __phys_to_pfn(__virt_to_phys(x)) #define sym_to_pfn(x) __phys_to_pfn(__pa_symbol(x)) /* * virt_to_page(k) convert a _valid_ virtual address to struct page * Loading Loading
Makefile +4 −1 Original line number Diff line number Diff line VERSION = 3 PATCHLEVEL = 18 SUBLEVEL = 88 SUBLEVEL = 91 EXTRAVERSION = NAME = Diseased Newt Loading Loading @@ -775,6 +775,9 @@ KBUILD_CFLAGS += $(call cc-disable-warning, pointer-sign) # disable invalid "can't wrap" optimizations for signed / pointers KBUILD_CFLAGS += $(call cc-option,-fno-strict-overflow) # Make sure -fstack-check isn't enabled (like gentoo apparently did) KBUILD_CFLAGS += $(call cc-option,-fno-stack-check,) # conserve stack if available KBUILD_CFLAGS += $(call cc-option,-fconserve-stack) Loading
arch/arm/boot/dts/am335x-evmsk.dts +1 −0 Original line number Diff line number Diff line Loading @@ -646,6 +646,7 @@ ti,non-removable; bus-width = <4>; cap-power-off-card; keep-power-in-suspend; pinctrl-names = "default"; pinctrl-0 = <&mmc2_pins>; Loading
arch/arm/boot/dts/dra7.dtsi +2 −0 Original line number Diff line number Diff line Loading @@ -118,6 +118,7 @@ device_type = "pci"; ranges = <0x81000000 0 0 0x03000 0 0x00010000 0x82000000 0 0x20013000 0x13000 0 0xffed000>; bus-range = <0x00 0xff>; #interrupt-cells = <1>; num-lanes = <1>; ti,hwmods = "pcie1"; Loading Loading @@ -153,6 +154,7 @@ device_type = "pci"; ranges = <0x81000000 0 0 0x03000 0 0x00010000 0x82000000 0 0x30013000 0x13000 0 0xffed000>; bus-range = <0x00 0xff>; #interrupt-cells = <1>; num-lanes = <1>; ti,hwmods = "pcie2"; Loading
arch/arm/mm/dma-mapping.c +19 −1 Original line number Diff line number Diff line Loading @@ -864,13 +864,31 @@ static void arm_coherent_dma_free(struct device *dev, size_t size, void *cpu_add __arm_dma_free(dev, size, cpu_addr, handle, attrs, true); } /* * The whole dma_get_sgtable() idea is fundamentally unsafe - it seems * that the intention is to allow exporting memory allocated via the * coherent DMA APIs through the dma_buf API, which only accepts a * scattertable. This presents a couple of problems: * 1. Not all memory allocated via the coherent DMA APIs is backed by * a struct page * 2. Passing coherent DMA memory into the streaming APIs is not allowed * as we will try to flush the memory through a different alias to that * actually being used (and the flushes are redundant.) */ int arm_dma_get_sgtable(struct device *dev, struct sg_table *sgt, void *cpu_addr, dma_addr_t handle, size_t size, struct dma_attrs *attrs) { struct page *page = pfn_to_page(dma_to_pfn(dev, handle)); unsigned long pfn = dma_to_pfn(dev, handle); struct page *page; int ret; /* If the PFN is not valid, we do not have a struct page */ if (!pfn_valid(pfn)) return -ENXIO; page = pfn_to_page(pfn); ret = sg_alloc_table(sgt, 1, GFP_KERNEL); if (unlikely(ret)) return ret; Loading
arch/arm64/include/asm/memory.h +1 −0 Original line number Diff line number Diff line Loading @@ -133,6 +133,7 @@ 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((pfn) << PAGE_SHIFT) #define virt_to_pfn(x) __phys_to_pfn(__virt_to_phys(x)) #define sym_to_pfn(x) __phys_to_pfn(__pa_symbol(x)) /* * virt_to_page(k) convert a _valid_ virtual address to struct page * Loading