[PATCH v7 26/36] x86/CPU/AMD: Make the microcode level available earlier in the boot

2017-06-16 Thread Tom Lendacky
Move the setting of the cpuinfo_x86.microcode field from amd_init() to early_amd_init() so that it is available earlier in the boot process. This avoids having to read MSR_AMD64_PATCH_LEVEL directly during early boot. Signed-off-by: Tom Lendacky ---

[PATCH v7 26/36] x86/CPU/AMD: Make the microcode level available earlier in the boot

2017-06-16 Thread Tom Lendacky
Move the setting of the cpuinfo_x86.microcode field from amd_init() to early_amd_init() so that it is available earlier in the boot process. This avoids having to read MSR_AMD64_PATCH_LEVEL directly during early boot. Signed-off-by: Tom Lendacky --- arch/x86/kernel/cpu/amd.c |8 1

[PATCH v7 28/36] x86, realmode: Check for memory encryption on the APs

2017-06-16 Thread Tom Lendacky
Add support to check if memory encryption is active in the kernel and that it has been enabled on the AP. If memory encryption is active in the kernel but has not been enabled on the AP, then set the memory encryption bit (bit 23) of MSR_K8_SYSCFG to enable memory encryption on that AP and allow

[PATCH v7 27/36] iommu/amd: Allow the AMD IOMMU to work with memory encryption

2017-06-16 Thread Tom Lendacky
The IOMMU is programmed with physical addresses for the various tables and buffers that are used to communicate between the device and the driver. When the driver allocates this memory it is encrypted. In order for the IOMMU to access the memory as encrypted the encryption mask needs to be

[PATCH v7 28/36] x86, realmode: Check for memory encryption on the APs

2017-06-16 Thread Tom Lendacky
Add support to check if memory encryption is active in the kernel and that it has been enabled on the AP. If memory encryption is active in the kernel but has not been enabled on the AP, then set the memory encryption bit (bit 23) of MSR_K8_SYSCFG to enable memory encryption on that AP and allow

[PATCH v7 27/36] iommu/amd: Allow the AMD IOMMU to work with memory encryption

2017-06-16 Thread Tom Lendacky
The IOMMU is programmed with physical addresses for the various tables and buffers that are used to communicate between the device and the driver. When the driver allocates this memory it is encrypted. In order for the IOMMU to access the memory as encrypted the encryption mask needs to be

[PATCH v7 25/36] swiotlb: Add warnings for use of bounce buffers with SME

2017-06-16 Thread Tom Lendacky
Add warnings to let the user know when bounce buffers are being used for DMA when SME is active. Since the bounce buffers are not in encrypted memory, these notifications are to allow the user to determine some appropriate action - if necessary. Actions can range from utilizing an IOMMU,

[PATCH v7 25/36] swiotlb: Add warnings for use of bounce buffers with SME

2017-06-16 Thread Tom Lendacky
Add warnings to let the user know when bounce buffers are being used for DMA when SME is active. Since the bounce buffers are not in encrypted memory, these notifications are to allow the user to determine some appropriate action - if necessary. Actions can range from utilizing an IOMMU,

[PATCH v7 24/36] x86, swiotlb: Add memory encryption support

2017-06-16 Thread Tom Lendacky
Since DMA addresses will effectively look like 48-bit addresses when the memory encryption mask is set, SWIOTLB is needed if the DMA mask of the device performing the DMA does not support 48-bits. SWIOTLB will be initialized to create decrypted bounce buffers for use by these devices.

[PATCH v7 24/36] x86, swiotlb: Add memory encryption support

2017-06-16 Thread Tom Lendacky
Since DMA addresses will effectively look like 48-bit addresses when the memory encryption mask is set, SWIOTLB is needed if the DMA mask of the device performing the DMA does not support 48-bits. SWIOTLB will be initialized to create decrypted bounce buffers for use by these devices.

[PATCH v7 22/36] x86/mm: Add support for changing the memory encryption attribute

2017-06-16 Thread Tom Lendacky
Add support for changing the memory encryption attribute for one or more memory pages. This will be useful when we have to change the AP trampoline area to not be encrypted. Or when we need to change the SWIOTLB area to not be encrypted in support of devices that can't support the encryption mask

[PATCH v7 22/36] x86/mm: Add support for changing the memory encryption attribute

2017-06-16 Thread Tom Lendacky
Add support for changing the memory encryption attribute for one or more memory pages. This will be useful when we have to change the AP trampoline area to not be encrypted. Or when we need to change the SWIOTLB area to not be encrypted in support of devices that can't support the encryption mask

[PATCH v7 21/36] x86/mm: Add support to access persistent memory in the clear

2017-06-16 Thread Tom Lendacky
Persistent memory is expected to persist across reboots. The encryption key used by SME will change across reboots which will result in corrupted persistent memory. Persistent memory is handed out by block devices through memory remapping functions, so be sure not to map this memory as encrypted.

[PATCH v7 21/36] x86/mm: Add support to access persistent memory in the clear

2017-06-16 Thread Tom Lendacky
Persistent memory is expected to persist across reboots. The encryption key used by SME will change across reboots which will result in corrupted persistent memory. Persistent memory is handed out by block devices through memory remapping functions, so be sure not to map this memory as encrypted.

[PATCH v7 18/36] x86/efi: Update EFI pagetable creation to work with SME

2017-06-16 Thread Tom Lendacky
When SME is active, pagetable entries created for EFI need to have the encryption mask set as necessary. When the new pagetable pages are allocated they are mapped encrypted. So, update the efi_pgt value that will be used in cr3 to include the encryption mask so that the PGD table can be read

[PATCH v7 18/36] x86/efi: Update EFI pagetable creation to work with SME

2017-06-16 Thread Tom Lendacky
When SME is active, pagetable entries created for EFI need to have the encryption mask set as necessary. When the new pagetable pages are allocated they are mapped encrypted. So, update the efi_pgt value that will be used in cr3 to include the encryption mask so that the PGD table can be read

[PATCH v7 17/36] efi: Update efi_mem_type() to return an error rather than 0

2017-06-16 Thread Tom Lendacky
The efi_mem_type() function currently returns a 0, which maps to EFI_RESERVED_TYPE, if the function is unable to find a memmap entry for the supplied physical address. Returning EFI_RESERVED_TYPE implies that a memmap entry exists, when it doesn't. Instead of returning 0, change the function to

[PATCH v7 17/36] efi: Update efi_mem_type() to return an error rather than 0

2017-06-16 Thread Tom Lendacky
The efi_mem_type() function currently returns a 0, which maps to EFI_RESERVED_TYPE, if the function is unable to find a memmap entry for the supplied physical address. Returning EFI_RESERVED_TYPE implies that a memmap entry exists, when it doesn't. Instead of returning 0, change the function to

[PATCH v7 16/36] efi: Add an EFI table address match function

2017-06-16 Thread Tom Lendacky
Add a function that will determine if a supplied physical address matches the address of an EFI table. Reviewed-by: Borislav Petkov Signed-off-by: Tom Lendacky --- drivers/firmware/efi/efi.c | 33 + include/linux/efi.h

[PATCH v7 15/36] x86/boot/e820: Add support to determine the E820 type of an address

2017-06-16 Thread Tom Lendacky
Add a function that will return the E820 type associated with an address range. Reviewed-by: Borislav Petkov Signed-off-by: Tom Lendacky --- arch/x86/include/asm/e820/api.h |2 ++ arch/x86/kernel/e820.c | 26 +++--- 2

[PATCH v7 16/36] efi: Add an EFI table address match function

2017-06-16 Thread Tom Lendacky
Add a function that will determine if a supplied physical address matches the address of an EFI table. Reviewed-by: Borislav Petkov Signed-off-by: Tom Lendacky --- drivers/firmware/efi/efi.c | 33 + include/linux/efi.h|7 +++ 2 files changed,

[PATCH v7 15/36] x86/boot/e820: Add support to determine the E820 type of an address

2017-06-16 Thread Tom Lendacky
Add a function that will return the E820 type associated with an address range. Reviewed-by: Borislav Petkov Signed-off-by: Tom Lendacky --- arch/x86/include/asm/e820/api.h |2 ++ arch/x86/kernel/e820.c | 26 +++--- 2 files changed, 25 insertions(+), 3

[PATCH v7 14/36] x86/mm: Insure that boot memory areas are mapped properly

2017-06-16 Thread Tom Lendacky
The boot data and command line data are present in memory in a decrypted state and are copied early in the boot process. The early page fault support will map these areas as encrypted, so before attempting to copy them, add decrypted mappings so the data is accessed properly when copied. For the

[PATCH v7 14/36] x86/mm: Insure that boot memory areas are mapped properly

2017-06-16 Thread Tom Lendacky
The boot data and command line data are present in memory in a decrypted state and are copied early in the boot process. The early page fault support will map these areas as encrypted, so before attempting to copy them, add decrypted mappings so the data is accessed properly when copied. For the

[PATCH v7 11/36] x86/mm: Add SME support for read_cr3_pa()

2017-06-16 Thread Tom Lendacky
The cr3 register entry can contain the SME encryption mask that indicates the PGD is encrypted. The encryption mask should not be used when creating a virtual address from the cr3 register, so remove the SME encryption mask in the read_cr3_pa() function. During early boot SME will need to use a

[PATCH v7 12/36] x86/mm: Extend early_memremap() support with additional attrs

2017-06-16 Thread Tom Lendacky
Add early_memremap() support to be able to specify encrypted and decrypted mappings with and without write-protection. The use of write-protection is necessary when encrypting data "in place". The write-protect attribute is considered cacheable for loads, but not stores. This implies that the

[PATCH v7 11/36] x86/mm: Add SME support for read_cr3_pa()

2017-06-16 Thread Tom Lendacky
The cr3 register entry can contain the SME encryption mask that indicates the PGD is encrypted. The encryption mask should not be used when creating a virtual address from the cr3 register, so remove the SME encryption mask in the read_cr3_pa() function. During early boot SME will need to use a

[PATCH v7 12/36] x86/mm: Extend early_memremap() support with additional attrs

2017-06-16 Thread Tom Lendacky
Add early_memremap() support to be able to specify encrypted and decrypted mappings with and without write-protection. The use of write-protection is necessary when encrypting data "in place". The write-protect attribute is considered cacheable for loads, but not stores. This implies that the

[PATCH v7 13/36] x86/mm: Add support for early encrypt/decrypt of memory

2017-06-16 Thread Tom Lendacky
Add support to be able to either encrypt or decrypt data in place during the early stages of booting the kernel. This does not change the memory encryption attribute - it is used for ensuring that data present in either an encrypted or decrypted memory area is in the proper state (for example the

[PATCH v7 13/36] x86/mm: Add support for early encrypt/decrypt of memory

2017-06-16 Thread Tom Lendacky
Add support to be able to either encrypt or decrypt data in place during the early stages of booting the kernel. This does not change the memory encryption attribute - it is used for ensuring that data present in either an encrypted or decrypted memory area is in the proper state (for example the

[PATCH v7 06/36] x86/mm: Add Secure Memory Encryption (SME) support

2017-06-16 Thread Tom Lendacky
Add support for Secure Memory Encryption (SME). This initial support provides a Kconfig entry to build the SME support into the kernel and defines the memory encryption mask that will be used in subsequent patches to mark pages as encrypted. Reviewed-by: Borislav Petkov

[PATCH v7 06/36] x86/mm: Add Secure Memory Encryption (SME) support

2017-06-16 Thread Tom Lendacky
Add support for Secure Memory Encryption (SME). This initial support provides a Kconfig entry to build the SME support into the kernel and defines the memory encryption mask that will be used in subsequent patches to mark pages as encrypted. Reviewed-by: Borislav Petkov Signed-off-by: Tom

[PATCH v7 09/36] x86/mm: Simplify p[gum]d_page() macros

2017-06-16 Thread Tom Lendacky
Create a pgd_pfn() macro similar to the p[um]d_pfn() macros and then use the p[gum]d_pfn() macros in the p[gum]d_page() macros instead of duplicating the code. Reviewed-by: Borislav Petkov Signed-off-by: Tom Lendacky --- arch/x86/include/asm/pgtable.h |

[PATCH v7 09/36] x86/mm: Simplify p[gum]d_page() macros

2017-06-16 Thread Tom Lendacky
Create a pgd_pfn() macro similar to the p[um]d_pfn() macros and then use the p[gum]d_pfn() macros in the p[gum]d_page() macros instead of duplicating the code. Reviewed-by: Borislav Petkov Signed-off-by: Tom Lendacky --- arch/x86/include/asm/pgtable.h | 16 +--- 1 file changed, 9

[PATCH v7 08/36] x86/mm: Add support to enable SME in early boot processing

2017-06-16 Thread Tom Lendacky
Add support to the early boot code to use Secure Memory Encryption (SME). Since the kernel has been loaded into memory in a decrypted state, encrypt the kernel in place and update the early pagetables with the memory encryption mask so that new pagetable entries will use memory encryption. The

[PATCH v7 07/36] x86/mm: Don't use phys_to_virt in ioremap() if SME is active

2017-06-16 Thread Tom Lendacky
Currently there is a check if the address being mapped is in the ISA range (is_ISA_range()), and if it is then phys_to_virt() is used to perform the mapping. When SME is active, however, this will result in the mapping having the encryption bit set when it is expected that an ioremap() should not

[PATCH v7 08/36] x86/mm: Add support to enable SME in early boot processing

2017-06-16 Thread Tom Lendacky
Add support to the early boot code to use Secure Memory Encryption (SME). Since the kernel has been loaded into memory in a decrypted state, encrypt the kernel in place and update the early pagetables with the memory encryption mask so that new pagetable entries will use memory encryption. The

[PATCH v7 07/36] x86/mm: Don't use phys_to_virt in ioremap() if SME is active

2017-06-16 Thread Tom Lendacky
Currently there is a check if the address being mapped is in the ISA range (is_ISA_range()), and if it is then phys_to_virt() is used to perform the mapping. When SME is active, however, this will result in the mapping having the encryption bit set when it is expected that an ioremap() should not

[PATCH v7 04/36] x86/CPU/AMD: Add the Secure Memory Encryption CPU feature

2017-06-16 Thread Tom Lendacky
Update the CPU features to include identifying and reporting on the Secure Memory Encryption (SME) feature. SME is identified by CPUID 0x801f, but requires BIOS support to enable it (set bit 23 of MSR_K8_SYSCFG). Only show the SME feature as available if reported by CPUID and enabled by

[PATCH v7 04/36] x86/CPU/AMD: Add the Secure Memory Encryption CPU feature

2017-06-16 Thread Tom Lendacky
Update the CPU features to include identifying and reporting on the Secure Memory Encryption (SME) feature. SME is identified by CPUID 0x801f, but requires BIOS support to enable it (set bit 23 of MSR_K8_SYSCFG). Only show the SME feature as available if reported by CPUID and enabled by

[PATCH v7 01/36] x86: Document AMD Secure Memory Encryption (SME)

2017-06-16 Thread Tom Lendacky
Create a Documentation entry to describe the AMD Secure Memory Encryption (SME) feature and add documentation for the mem_encrypt= kernel parameter. Reviewed-by: Borislav Petkov Signed-off-by: Tom Lendacky ---

[PATCH v7 01/36] x86: Document AMD Secure Memory Encryption (SME)

2017-06-16 Thread Tom Lendacky
Create a Documentation entry to describe the AMD Secure Memory Encryption (SME) feature and add documentation for the mem_encrypt= kernel parameter. Reviewed-by: Borislav Petkov Signed-off-by: Tom Lendacky --- Documentation/admin-guide/kernel-parameters.txt | 11

[PATCH v7 02/36] x86/mm/pat: Set write-protect cache mode for full PAT support

2017-06-16 Thread Tom Lendacky
For processors that support PAT, set the write-protect cache mode (_PAGE_CACHE_MODE_WP) entry to the actual write-protect value (x05). Acked-by: Borislav Petkov Signed-off-by: Tom Lendacky --- arch/x86/mm/pat.c |6 +++--- 1 file changed, 3

[PATCH v7 02/36] x86/mm/pat: Set write-protect cache mode for full PAT support

2017-06-16 Thread Tom Lendacky
For processors that support PAT, set the write-protect cache mode (_PAGE_CACHE_MODE_WP) entry to the actual write-protect value (x05). Acked-by: Borislav Petkov Signed-off-by: Tom Lendacky --- arch/x86/mm/pat.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

Re: hexagon: build error in -next due to 'mm: memcontrol: per-lruvec stats infrastructure'

2017-06-16 Thread Johannes Weiner
Hi Guenter, On Wed, Jun 14, 2017 at 12:26:46AM -0700, Guenter Roeck wrote: > Hi, > > I see the following build error in -next when building hexagon images. > > CC arch/hexagon/kernel/asm-offsets.s > In file included from ./include/linux/memcontrol.h:30:0, > from

Re: hexagon: build error in -next due to 'mm: memcontrol: per-lruvec stats infrastructure'

2017-06-16 Thread Johannes Weiner
Hi Guenter, On Wed, Jun 14, 2017 at 12:26:46AM -0700, Guenter Roeck wrote: > Hi, > > I see the following build error in -next when building hexagon images. > > CC arch/hexagon/kernel/asm-offsets.s > In file included from ./include/linux/memcontrol.h:30:0, > from

Re: [RFC PATCH 00/13] Switchtec NTB Support

2017-06-16 Thread Serge Semin
On Fri, Jun 16, 2017 at 11:08:52AM -0600, Logan Gunthorpe wrote: > > > On 16/06/17 10:33 AM, Serge Semin wrote: > > New NTB API is going to be merged to mainline kernel within next features > > merge window, so it's really recommended to use that API for new hardware. > >

Re: [RFC PATCH 00/13] Switchtec NTB Support

2017-06-16 Thread Serge Semin
On Fri, Jun 16, 2017 at 11:08:52AM -0600, Logan Gunthorpe wrote: > > > On 16/06/17 10:33 AM, Serge Semin wrote: > > New NTB API is going to be merged to mainline kernel within next features > > merge window, so it's really recommended to use that API for new hardware. > > Could you please

Re: [PATCH v9 5/7] vfio: Define vfio based dma-buf operations

2017-06-16 Thread Kirti Wankhede
On 6/16/2017 10:09 PM, Alex Williamson wrote: > On Fri, 16 Jun 2017 19:02:30 +0530 > Kirti Wankhede wrote: > >> On 6/16/2017 2:08 AM, Alex Williamson wrote: >>> On Thu, 15 Jun 2017 18:00:38 +0200 >>> Gerd Hoffmann wrote: >>> Hi, >>

Re: [PATCH v9 5/7] vfio: Define vfio based dma-buf operations

2017-06-16 Thread Kirti Wankhede
On 6/16/2017 10:09 PM, Alex Williamson wrote: > On Fri, 16 Jun 2017 19:02:30 +0530 > Kirti Wankhede wrote: > >> On 6/16/2017 2:08 AM, Alex Williamson wrote: >>> On Thu, 15 Jun 2017 18:00:38 +0200 >>> Gerd Hoffmann wrote: >>> Hi, >> +struct vfio_dmabuf_mgr_plane_info {

Re: [PATCH] arc: implement DMA_ATTR_NO_KERNEL_MAPPING

2017-06-16 Thread Vineet Gupta
On 06/16/2017 12:11 AM, Christoph Hellwig wrote: This way allocations like the NVMe HMB don't consume iomap space Signed-off-by: Christoph Hellwig --- Note: compile tested only, I stumbled over this when researching dma api quirks for HMB support. arch/arc/mm/dma.c | 42

Re: [PATCH] arc: implement DMA_ATTR_NO_KERNEL_MAPPING

2017-06-16 Thread Vineet Gupta
On 06/16/2017 12:11 AM, Christoph Hellwig wrote: This way allocations like the NVMe HMB don't consume iomap space Signed-off-by: Christoph Hellwig --- Note: compile tested only, I stumbled over this when researching dma api quirks for HMB support. arch/arc/mm/dma.c | 42

[PATCH 03/44] dmaengine: ioat: don't use DMA_ERROR_CODE

2017-06-16 Thread Christoph Hellwig
DMA_ERROR_CODE is not a public API and will go away. Instead properly unwind based on the loop counter. Signed-off-by: Christoph Hellwig Acked-by: Dave Jiang Acked-By: Vinod Koul --- drivers/dma/ioat/init.c | 24

[PATCH 03/44] dmaengine: ioat: don't use DMA_ERROR_CODE

2017-06-16 Thread Christoph Hellwig
DMA_ERROR_CODE is not a public API and will go away. Instead properly unwind based on the loop counter. Signed-off-by: Christoph Hellwig Acked-by: Dave Jiang Acked-By: Vinod Koul --- drivers/dma/ioat/init.c | 24 +++- 1 file changed, 7 insertions(+), 17 deletions(-) diff

[PATCH 05/44] drm/armada: don't abuse DMA_ERROR_CODE

2017-06-16 Thread Christoph Hellwig
dev_addr isn't even a dma_addr_t, and DMA_ERROR_CODE has never been a valid driver API. Add a bool mapped flag instead. Signed-off-by: Christoph Hellwig --- drivers/gpu/drm/armada/armada_fb.c | 2 +- drivers/gpu/drm/armada/armada_gem.c | 5 ++---

[PATCH 05/44] drm/armada: don't abuse DMA_ERROR_CODE

2017-06-16 Thread Christoph Hellwig
dev_addr isn't even a dma_addr_t, and DMA_ERROR_CODE has never been a valid driver API. Add a bool mapped flag instead. Signed-off-by: Christoph Hellwig --- drivers/gpu/drm/armada/armada_fb.c | 2 +- drivers/gpu/drm/armada/armada_gem.c | 5 ++--- drivers/gpu/drm/armada/armada_gem.h | 1 + 3

[PATCH 06/44] iommu/dma: don't rely on DMA_ERROR_CODE

2017-06-16 Thread Christoph Hellwig
DMA_ERROR_CODE is not a public API and will go away soon. dma dma-iommu driver already implements a proper ->mapping_error method, so it's only using the value internally. Add a new local define using the value that arm64 which is the only current user of dma-iommu. Signed-off-by: Christoph

[PATCH 04/44] drm/exynos: don't use DMA_ERROR_CODE

2017-06-16 Thread Christoph Hellwig
DMA_ERROR_CODE already isn't a valid API to user for drivers and will go away soon. exynos_drm_fb_dma_addr uses it a an error return when the passed in index is invalid, but the callers never check for it but instead pass the address straight to the hardware. Add a WARN_ON instead and just

[PATCH 06/44] iommu/dma: don't rely on DMA_ERROR_CODE

2017-06-16 Thread Christoph Hellwig
DMA_ERROR_CODE is not a public API and will go away soon. dma dma-iommu driver already implements a proper ->mapping_error method, so it's only using the value internally. Add a new local define using the value that arm64 which is the only current user of dma-iommu. Signed-off-by: Christoph

[PATCH 04/44] drm/exynos: don't use DMA_ERROR_CODE

2017-06-16 Thread Christoph Hellwig
DMA_ERROR_CODE already isn't a valid API to user for drivers and will go away soon. exynos_drm_fb_dma_addr uses it a an error return when the passed in index is invalid, but the callers never check for it but instead pass the address straight to the hardware. Add a WARN_ON instead and just

[PATCH 07/44] xen-swiotlb: consolidate xen_swiotlb_dma_ops

2017-06-16 Thread Christoph Hellwig
ARM and x86 had duplicated versions of the dma_ops structure, the only difference is that x86 hasn't wired up the set_dma_mask, mmap, and get_sgtable ops yet. On x86 all of them are identical to the generic version, so they aren't needed but harmless. All the symbols used only for

[PATCH 07/44] xen-swiotlb: consolidate xen_swiotlb_dma_ops

2017-06-16 Thread Christoph Hellwig
ARM and x86 had duplicated versions of the dma_ops structure, the only difference is that x86 hasn't wired up the set_dma_mask, mmap, and get_sgtable ops yet. On x86 all of them are identical to the generic version, so they aren't needed but harmless. All the symbols used only for

[PATCH 09/44] c6x: remove DMA_ERROR_CODE

2017-06-16 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- arch/c6x/include/asm/dma-mapping.h | 5 - 1 file changed, 5 deletions(-) diff --git a/arch/c6x/include/asm/dma-mapping.h b/arch/c6x/include/asm/dma-mapping.h index aca9f755e4f8..05daf1038111 100644 --- a/arch/c6x/include/asm/dma-mapping.h

[PATCH 09/44] c6x: remove DMA_ERROR_CODE

2017-06-16 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- arch/c6x/include/asm/dma-mapping.h | 5 - 1 file changed, 5 deletions(-) diff --git a/arch/c6x/include/asm/dma-mapping.h b/arch/c6x/include/asm/dma-mapping.h index aca9f755e4f8..05daf1038111 100644 --- a/arch/c6x/include/asm/dma-mapping.h +++

[PATCH 08/44] xen-swiotlb: implement ->mapping_error

2017-06-16 Thread Christoph Hellwig
DMA_ERROR_CODE is going to go away, so don't rely on it. Signed-off-by: Christoph Hellwig Reviewed-by: Konrad Rzeszutek Wilk --- drivers/xen/swiotlb-xen.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git

[PATCH 08/44] xen-swiotlb: implement ->mapping_error

2017-06-16 Thread Christoph Hellwig
DMA_ERROR_CODE is going to go away, so don't rely on it. Signed-off-by: Christoph Hellwig Reviewed-by: Konrad Rzeszutek Wilk --- drivers/xen/swiotlb-xen.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c

[PATCH 10/44] ia64: remove DMA_ERROR_CODE

2017-06-16 Thread Christoph Hellwig
All ia64 dma_mapping_ops instances already have a mapping_error member. Signed-off-by: Christoph Hellwig --- arch/ia64/include/asm/dma-mapping.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/ia64/include/asm/dma-mapping.h b/arch/ia64/include/asm/dma-mapping.h index

[PATCH 10/44] ia64: remove DMA_ERROR_CODE

2017-06-16 Thread Christoph Hellwig
All ia64 dma_mapping_ops instances already have a mapping_error member. Signed-off-by: Christoph Hellwig --- arch/ia64/include/asm/dma-mapping.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/ia64/include/asm/dma-mapping.h b/arch/ia64/include/asm/dma-mapping.h index

[PATCH 11/44] m32r: remove DMA_ERROR_CODE

2017-06-16 Thread Christoph Hellwig
dma-noop is the only dma_mapping_ops instance for m32r and does not return errors. Signed-off-by: Christoph Hellwig --- arch/m32r/include/asm/dma-mapping.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/m32r/include/asm/dma-mapping.h

[PATCH 11/44] m32r: remove DMA_ERROR_CODE

2017-06-16 Thread Christoph Hellwig
dma-noop is the only dma_mapping_ops instance for m32r and does not return errors. Signed-off-by: Christoph Hellwig --- arch/m32r/include/asm/dma-mapping.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/m32r/include/asm/dma-mapping.h b/arch/m32r/include/asm/dma-mapping.h index

Re: [PATCH v4 4/5] watchdog: provide watchdog_reconfigure() for arch watchdogs

2017-06-16 Thread Andrew Morton
On Fri, 16 Jun 2017 16:57:14 +1000 Nicholas Piggin wrote: > After reconfiguring watchdog sysctls etc., architecture specific > watchdogs may not get all their parameters updated. > > watchdog_reconfigure() can be implemented to pull the new values > in and set the arch NMI

Re: [PATCH v4 4/5] watchdog: provide watchdog_reconfigure() for arch watchdogs

2017-06-16 Thread Andrew Morton
On Fri, 16 Jun 2017 16:57:14 +1000 Nicholas Piggin wrote: > After reconfiguring watchdog sysctls etc., architecture specific > watchdogs may not get all their parameters updated. > > watchdog_reconfigure() can be implemented to pull the new values > in and set the arch NMI watchdog. > I'll

[PATCH 01/44] firmware/ivc: use dma_mapping_error

2017-06-16 Thread Christoph Hellwig
DMA_ERROR_CODE is not supposed to be used by drivers. Signed-off-by: Christoph Hellwig Acked-by: Thierry Reding --- drivers/firmware/tegra/ivc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/firmware/tegra/ivc.c

[PATCH 12/44] microblaze: remove DMA_ERROR_CODE

2017-06-16 Thread Christoph Hellwig
microblaze does not return errors for dma_map_page. Signed-off-by: Christoph Hellwig --- arch/microblaze/include/asm/dma-mapping.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/microblaze/include/asm/dma-mapping.h b/arch/microblaze/include/asm/dma-mapping.h index

[PATCH 01/44] firmware/ivc: use dma_mapping_error

2017-06-16 Thread Christoph Hellwig
DMA_ERROR_CODE is not supposed to be used by drivers. Signed-off-by: Christoph Hellwig Acked-by: Thierry Reding --- drivers/firmware/tegra/ivc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/firmware/tegra/ivc.c b/drivers/firmware/tegra/ivc.c index

[PATCH 12/44] microblaze: remove DMA_ERROR_CODE

2017-06-16 Thread Christoph Hellwig
microblaze does not return errors for dma_map_page. Signed-off-by: Christoph Hellwig --- arch/microblaze/include/asm/dma-mapping.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/microblaze/include/asm/dma-mapping.h b/arch/microblaze/include/asm/dma-mapping.h index

[PATCH 15/44] xtensa: remove DMA_ERROR_CODE

2017-06-16 Thread Christoph Hellwig
xtensa already implements the mapping_error method for its only dma_map_ops instance. Signed-off-by: Christoph Hellwig --- arch/xtensa/include/asm/dma-mapping.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/xtensa/include/asm/dma-mapping.h

[PATCH 15/44] xtensa: remove DMA_ERROR_CODE

2017-06-16 Thread Christoph Hellwig
xtensa already implements the mapping_error method for its only dma_map_ops instance. Signed-off-by: Christoph Hellwig --- arch/xtensa/include/asm/dma-mapping.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/xtensa/include/asm/dma-mapping.h b/arch/xtensa/include/asm/dma-mapping.h

[PATCH 16/44] arm64: remove DMA_ERROR_CODE

2017-06-16 Thread Christoph Hellwig
The dma alloc interface returns an error by return NULL, and the mapping interfaces rely on the mapping_error method, which the dummy ops already implement correctly. Thus remove the DMA_ERROR_CODE define. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy

[PATCH 16/44] arm64: remove DMA_ERROR_CODE

2017-06-16 Thread Christoph Hellwig
The dma alloc interface returns an error by return NULL, and the mapping interfaces rely on the mapping_error method, which the dummy ops already implement correctly. Thus remove the DMA_ERROR_CODE define. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy ---

Re: [PATCH] usb: gadget: bdc: 64-bit pointer capability check

2017-06-16 Thread Florian Fainelli
On 06/15/2017 02:09 AM, Srinath Mannam wrote: > Corrected the register to check the 64-bit pointer > capability state. 64-bit pointer implementation capability > was checking in wrong register, which causes the BDC > enumeration failure in 64-bit memory address. > > Fixes: efed421a94e6 ("usb:

Re: [PATCH] usb: gadget: bdc: 64-bit pointer capability check

2017-06-16 Thread Florian Fainelli
On 06/15/2017 02:09 AM, Srinath Mannam wrote: > Corrected the register to check the 64-bit pointer > capability state. 64-bit pointer implementation capability > was checking in wrong register, which causes the BDC > enumeration failure in 64-bit memory address. > > Fixes: efed421a94e6 ("usb:

[PATCH 13/44] openrisc: remove DMA_ERROR_CODE

2017-06-16 Thread Christoph Hellwig
openrisc does not return errors for dma_map_page. Signed-off-by: Christoph Hellwig --- arch/openrisc/include/asm/dma-mapping.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/openrisc/include/asm/dma-mapping.h b/arch/openrisc/include/asm/dma-mapping.h index

[PATCH 13/44] openrisc: remove DMA_ERROR_CODE

2017-06-16 Thread Christoph Hellwig
openrisc does not return errors for dma_map_page. Signed-off-by: Christoph Hellwig --- arch/openrisc/include/asm/dma-mapping.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/openrisc/include/asm/dma-mapping.h b/arch/openrisc/include/asm/dma-mapping.h index 0c0075f17145..a4ea139c2ef9

[PATCH 18/44] iommu/amd: implement ->mapping_error

2017-06-16 Thread Christoph Hellwig
DMA_ERROR_CODE is going to go away, so don't rely on it. Signed-off-by: Christoph Hellwig --- drivers/iommu/amd_iommu.c | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index

[PATCH 18/44] iommu/amd: implement ->mapping_error

2017-06-16 Thread Christoph Hellwig
DMA_ERROR_CODE is going to go away, so don't rely on it. Signed-off-by: Christoph Hellwig --- drivers/iommu/amd_iommu.c | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index 63cacf5d6cf2..d41280e869de

[PATCH 20/44] sparc: implement ->mapping_error

2017-06-16 Thread Christoph Hellwig
DMA_ERROR_CODE is going to go away, so don't rely on it. Signed-off-by: Christoph Hellwig Acked-by: David S. Miller --- arch/sparc/include/asm/dma-mapping.h | 2 -- arch/sparc/kernel/iommu.c| 12 +--- arch/sparc/kernel/iommu_common.h |

[PATCH 14/44] sh: remove DMA_ERROR_CODE

2017-06-16 Thread Christoph Hellwig
sh does not return errors for dma_map_page. Signed-off-by: Christoph Hellwig --- arch/sh/include/asm/dma-mapping.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/sh/include/asm/dma-mapping.h b/arch/sh/include/asm/dma-mapping.h index d99008af5f73..9b06be07db4d 100644 ---

[PATCH 20/44] sparc: implement ->mapping_error

2017-06-16 Thread Christoph Hellwig
DMA_ERROR_CODE is going to go away, so don't rely on it. Signed-off-by: Christoph Hellwig Acked-by: David S. Miller --- arch/sparc/include/asm/dma-mapping.h | 2 -- arch/sparc/kernel/iommu.c| 12 +--- arch/sparc/kernel/iommu_common.h | 2 ++

[PATCH 14/44] sh: remove DMA_ERROR_CODE

2017-06-16 Thread Christoph Hellwig
sh does not return errors for dma_map_page. Signed-off-by: Christoph Hellwig --- arch/sh/include/asm/dma-mapping.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/sh/include/asm/dma-mapping.h b/arch/sh/include/asm/dma-mapping.h index d99008af5f73..9b06be07db4d 100644 ---

[PATCH 19/44] s390: implement ->mapping_error

2017-06-16 Thread Christoph Hellwig
s390 can also use noop_dma_ops, and while that currently does not return errors it will so in the future. Implementing the mapping_error method is the proper way to have per-ops error conditions. Signed-off-by: Christoph Hellwig Acked-by: Gerald Schaefer

[PATCH 19/44] s390: implement ->mapping_error

2017-06-16 Thread Christoph Hellwig
s390 can also use noop_dma_ops, and while that currently does not return errors it will so in the future. Implementing the mapping_error method is the proper way to have per-ops error conditions. Signed-off-by: Christoph Hellwig Acked-by: Gerald Schaefer ---

[PATCH 22/44] x86/pci-nommu: implement ->mapping_error

2017-06-16 Thread Christoph Hellwig
DMA_ERROR_CODE is going to go away, so don't rely on it. Signed-off-by: Christoph Hellwig --- arch/x86/kernel/pci-nommu.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/arch/x86/kernel/pci-nommu.c b/arch/x86/kernel/pci-nommu.c index

[PATCH 22/44] x86/pci-nommu: implement ->mapping_error

2017-06-16 Thread Christoph Hellwig
DMA_ERROR_CODE is going to go away, so don't rely on it. Signed-off-by: Christoph Hellwig --- arch/x86/kernel/pci-nommu.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/arch/x86/kernel/pci-nommu.c b/arch/x86/kernel/pci-nommu.c index a88952ef371c..085fe6ce4049

[PATCH 23/44] x86/calgary: implement ->mapping_error

2017-06-16 Thread Christoph Hellwig
DMA_ERROR_CODE is going to go away, so don't rely on it. Signed-off-by: Christoph Hellwig --- arch/x86/kernel/pci-calgary_64.c | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/arch/x86/kernel/pci-calgary_64.c

Re: [PATCH v4 2/5] watchdog: introduce arch_touch_nmi_watchdog()

2017-06-16 Thread Andrew Morton
On Fri, 16 Jun 2017 16:57:12 +1000 Nicholas Piggin wrote: > For architectures that define HAVE_NMI_WATCHDOG, instead of having > them provide the complete touch_nmi_watchdog() function, just have > them provide arch_touch_nmi_watchdog(). > > This gives the generic code more

[PATCH 23/44] x86/calgary: implement ->mapping_error

2017-06-16 Thread Christoph Hellwig
DMA_ERROR_CODE is going to go away, so don't rely on it. Signed-off-by: Christoph Hellwig --- arch/x86/kernel/pci-calgary_64.c | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/arch/x86/kernel/pci-calgary_64.c b/arch/x86/kernel/pci-calgary_64.c index

Re: [PATCH v4 2/5] watchdog: introduce arch_touch_nmi_watchdog()

2017-06-16 Thread Andrew Morton
On Fri, 16 Jun 2017 16:57:12 +1000 Nicholas Piggin wrote: > For architectures that define HAVE_NMI_WATCHDOG, instead of having > them provide the complete touch_nmi_watchdog() function, just have > them provide arch_touch_nmi_watchdog(). > > This gives the generic code more flexibility in

[PATCH 21/44] powerpc: implement ->mapping_error

2017-06-16 Thread Christoph Hellwig
DMA_ERROR_CODE is going to go away, so don't rely on it. Instead define a ->mapping_error method for all IOMMU based dma operation instances. The direct ops don't ever return an error and don't need a ->mapping_error method. Signed-off-by: Christoph Hellwig Acked-by: Michael

[PATCH 21/44] powerpc: implement ->mapping_error

2017-06-16 Thread Christoph Hellwig
DMA_ERROR_CODE is going to go away, so don't rely on it. Instead define a ->mapping_error method for all IOMMU based dma operation instances. The direct ops don't ever return an error and don't need a ->mapping_error method. Signed-off-by: Christoph Hellwig Acked-by: Michael Ellerman ---

<    1   2   3   4   5   6   7   8   9   10   >