Skip to content

Commit

Permalink
Merge ra.kernel.org:/pub/scm/linux/kernel/git/davem/net
Browse files Browse the repository at this point in the history
Lots of overlapping changes, mostly trivial in nature.

The mlxsw conflict was resolving using the example
resolution at:

https://github.com/jpirko/linux_mlxsw/blob/combined_queue/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c

Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
davem330 committed Aug 5, 2018
2 parents d89d415 + 1ffaddd commit c1c8626
Show file tree
Hide file tree
Showing 70 changed files with 539 additions and 217 deletions.
1 change: 1 addition & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -5444,6 +5444,7 @@ F: drivers/iommu/exynos-iommu.c

EZchip NPS platform support
M: Vineet Gupta <[email protected]>
M: Ofer Levi <[email protected]>
S: Supported
F: arch/arc/plat-eznps
F: arch/arc/boot/dts/eznps.dts
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
VERSION = 4
PATCHLEVEL = 18
SUBLEVEL = 0
EXTRAVERSION = -rc7
EXTRAVERSION = -rc8
NAME = Merciless Moray

# *DOCUMENTATION*
Expand Down
3 changes: 3 additions & 0 deletions arch/arc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ config ARC
select HAVE_KERNEL_LZMA
select ARCH_HAS_PTE_SPECIAL

config ARCH_HAS_CACHE_LINE_SIZE
def_bool y

config MIGHT_HAVE_PCI
bool

Expand Down
4 changes: 3 additions & 1 deletion arch/arc/include/asm/cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@
})

/* Largest line length for either L1 or L2 is 128 bytes */
#define ARCH_DMA_MINALIGN 128
#define SMP_CACHE_BYTES 128
#define cache_line_size() SMP_CACHE_BYTES
#define ARCH_DMA_MINALIGN SMP_CACHE_BYTES

extern void arc_cache_init(void);
extern char *arc_cache_mumbojumbo(int cpu_id, char *buf, int len);
Expand Down
3 changes: 3 additions & 0 deletions arch/arc/include/asm/delay.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@
#ifndef __ASM_ARC_UDELAY_H
#define __ASM_ARC_UDELAY_H

#include <asm-generic/types.h>
#include <asm/param.h> /* HZ */

extern unsigned long loops_per_jiffy;

static inline void __delay(unsigned long loops)
{
__asm__ __volatile__(
Expand Down
17 changes: 14 additions & 3 deletions arch/arc/mm/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -1038,7 +1038,7 @@ void flush_cache_mm(struct mm_struct *mm)
void flush_cache_page(struct vm_area_struct *vma, unsigned long u_vaddr,
unsigned long pfn)
{
unsigned int paddr = pfn << PAGE_SHIFT;
phys_addr_t paddr = pfn << PAGE_SHIFT;

u_vaddr &= PAGE_MASK;

Expand All @@ -1058,8 +1058,9 @@ void flush_anon_page(struct vm_area_struct *vma, struct page *page,
unsigned long u_vaddr)
{
/* TBD: do we really need to clear the kernel mapping */
__flush_dcache_page(page_address(page), u_vaddr);
__flush_dcache_page(page_address(page), page_address(page));
__flush_dcache_page((phys_addr_t)page_address(page), u_vaddr);
__flush_dcache_page((phys_addr_t)page_address(page),
(phys_addr_t)page_address(page));

}

Expand Down Expand Up @@ -1246,6 +1247,16 @@ void __init arc_cache_init_master(void)
}
}

/*
* Check that SMP_CACHE_BYTES (and hence ARCH_DMA_MINALIGN) is larger
* or equal to any cache line length.
*/
BUILD_BUG_ON_MSG(L1_CACHE_BYTES > SMP_CACHE_BYTES,
"SMP_CACHE_BYTES must be >= any cache line length");
if (is_isa_arcv2() && (l2_line_sz > SMP_CACHE_BYTES))
panic("L2 Cache line [%d] > kernel Config [%d]\n",
l2_line_sz, SMP_CACHE_BYTES);

/* Note that SLC disable not formally supported till HS 3.0 */
if (is_isa_arcv2() && l2_line_sz && !slc_enable)
arc_slc_disable();
Expand Down
49 changes: 47 additions & 2 deletions arch/arc/mm/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,59 @@ int arch_dma_mmap(struct device *dev, struct vm_area_struct *vma,
return ret;
}

/*
* Cache operations depending on function and direction argument, inspired by
* https://lkml.org/lkml/2018/5/18/979
* "dma_sync_*_for_cpu and direction=TO_DEVICE (was Re: [PATCH 02/20]
* dma-mapping: provide a generic dma-noncoherent implementation)"
*
* | map == for_device | unmap == for_cpu
* |----------------------------------------------------------------
* TO_DEV | writeback writeback | none none
* FROM_DEV | invalidate invalidate | invalidate* invalidate*
* BIDIR | writeback+inv writeback+inv | invalidate invalidate
*
* [*] needed for CPU speculative prefetches
*
* NOTE: we don't check the validity of direction argument as it is done in
* upper layer functions (in include/linux/dma-mapping.h)
*/

void arch_sync_dma_for_device(struct device *dev, phys_addr_t paddr,
size_t size, enum dma_data_direction dir)
{
dma_cache_wback(paddr, size);
switch (dir) {
case DMA_TO_DEVICE:
dma_cache_wback(paddr, size);
break;

case DMA_FROM_DEVICE:
dma_cache_inv(paddr, size);
break;

case DMA_BIDIRECTIONAL:
dma_cache_wback_inv(paddr, size);
break;

default:
break;
}
}

void arch_sync_dma_for_cpu(struct device *dev, phys_addr_t paddr,
size_t size, enum dma_data_direction dir)
{
dma_cache_inv(paddr, size);
switch (dir) {
case DMA_TO_DEVICE:
break;

/* FROM_DEVICE invalidate needed if speculative CPU prefetch only */
case DMA_FROM_DEVICE:
case DMA_BIDIRECTIONAL:
dma_cache_inv(paddr, size);
break;

default:
break;
}
}
10 changes: 10 additions & 0 deletions arch/arc/plat-eznps/include/plat/ctop.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#error "Incorrect ctop.h include"
#endif

#include <linux/types.h>
#include <soc/nps/common.h>

/* core auxiliary registers */
Expand Down Expand Up @@ -143,6 +144,15 @@ struct nps_host_reg_gim_p_int_dst {
};

/* AUX registers definition */
struct nps_host_reg_aux_dpc {
union {
struct {
u32 ien:1, men:1, hen:1, reserved:29;
};
u32 value;
};
};

struct nps_host_reg_aux_udmc {
union {
struct {
Expand Down
6 changes: 4 additions & 2 deletions arch/arc/plat-eznps/mtm.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
*/

#include <linux/smp.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/io.h>
#include <linux/log2.h>
#include <asm/arcregs.h>
Expand Down Expand Up @@ -157,10 +159,10 @@ void mtm_enable_core(unsigned int cpu)
/* Verify and set the value of the mtm hs counter */
static int __init set_mtm_hs_ctr(char *ctr_str)
{
long hs_ctr;
int hs_ctr;
int ret;

ret = kstrtol(ctr_str, 0, &hs_ctr);
ret = kstrtoint(ctr_str, 0, &hs_ctr);

if (ret || hs_ctr > MT_HS_CNT_MAX || hs_ctr < MT_HS_CNT_MIN) {
pr_err("** Invalid @nps_mtm_hs_ctr [%d] needs to be [%d:%d] (incl)\n",
Expand Down
8 changes: 6 additions & 2 deletions arch/arm64/crypto/ghash-ce-glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -488,9 +488,13 @@ static int gcm_decrypt(struct aead_request *req)
err = skcipher_walk_done(&walk,
walk.nbytes % AES_BLOCK_SIZE);
}
if (walk.nbytes)
pmull_gcm_encrypt_block(iv, iv, NULL,
if (walk.nbytes) {
kernel_neon_begin();
pmull_gcm_encrypt_block(iv, iv, ctx->aes_key.key_enc,
num_rounds(&ctx->aes_key));
kernel_neon_end();
}

} else {
__aes_arm64_encrypt(ctx->aes_key.key_enc, tag, iv,
num_rounds(&ctx->aes_key));
Expand Down
33 changes: 21 additions & 12 deletions arch/powerpc/include/asm/mmu_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,24 +143,33 @@ static inline void mm_context_remove_copro(struct mm_struct *mm)
{
int c;

c = atomic_dec_if_positive(&mm->context.copros);

/* Detect imbalance between add and remove */
WARN_ON(c < 0);

/*
* Need to broadcast a global flush of the full mm before
* decrementing active_cpus count, as the next TLBI may be
* local and the nMMU and/or PSL need to be cleaned up.
* Should be rare enough so that it's acceptable.
* When removing the last copro, we need to broadcast a global
* flush of the full mm, as the next TLBI may be local and the
* nMMU and/or PSL need to be cleaned up.
*
* Both the 'copros' and 'active_cpus' counts are looked at in
* flush_all_mm() to determine the scope (local/global) of the
* TLBIs, so we need to flush first before decrementing
* 'copros'. If this API is used by several callers for the
* same context, it can lead to over-flushing. It's hopefully
* not common enough to be a problem.
*
* Skip on hash, as we don't know how to do the proper flush
* for the time being. Invalidations will remain global if
* used on hash.
* used on hash. Note that we can't drop 'copros' either, as
* it could make some invalidations local with no flush
* in-between.
*/
if (c == 0 && radix_enabled()) {
if (radix_enabled()) {
flush_all_mm(mm);
dec_mm_active_cpus(mm);

c = atomic_dec_if_positive(&mm->context.copros);
/* Detect imbalance between add and remove */
WARN_ON(c < 0);

if (c == 0)
dec_mm_active_cpus(mm);
}
}
#else
Expand Down
4 changes: 3 additions & 1 deletion arch/powerpc/kernel/pci-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
#include <asm/ppc-pci.h>
#include <asm/eeh.h>

#include "../../../drivers/pci/pci.h"

/* hose_spinlock protects accesses to the the phb_bitmap. */
static DEFINE_SPINLOCK(hose_spinlock);
LIST_HEAD(hose_list);
Expand Down Expand Up @@ -1014,7 +1016,7 @@ void pcibios_setup_bus_devices(struct pci_bus *bus)
/* Cardbus can call us to add new devices to a bus, so ignore
* those who are already fully discovered
*/
if (dev->is_added)
if (pci_dev_is_added(dev))
continue;

pcibios_setup_device(dev);
Expand Down
3 changes: 2 additions & 1 deletion arch/powerpc/platforms/powernv/pci-ioda.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@

#include "powernv.h"
#include "pci.h"
#include "../../../../drivers/pci/pci.h"

#define PNV_IODA1_M64_NUM 16 /* Number of M64 BARs */
#define PNV_IODA1_M64_SEGS 8 /* Segments per M64 BAR */
Expand Down Expand Up @@ -3138,7 +3139,7 @@ static void pnv_pci_ioda_fixup_iov_resources(struct pci_dev *pdev)
struct pci_dn *pdn;
int mul, total_vfs;

if (!pdev->is_physfn || pdev->is_added)
if (!pdev->is_physfn || pci_dev_is_added(pdev))
return;

pdn = pci_get_pdn(pdev);
Expand Down
3 changes: 2 additions & 1 deletion arch/powerpc/platforms/pseries/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
#include <asm/security_features.h>

#include "pseries.h"
#include "../../../../drivers/pci/pci.h"

int CMO_PrPSP = -1;
int CMO_SecPSP = -1;
Expand Down Expand Up @@ -664,7 +665,7 @@ static void pseries_pci_fixup_iov_resources(struct pci_dev *pdev)
const int *indexes;
struct device_node *dn = pci_device_to_OF_node(pdev);

if (!pdev->is_physfn || pdev->is_added)
if (!pdev->is_physfn || pci_dev_is_added(pdev))
return;
/*Firmware must support open sriov otherwise dont configure*/
indexes = of_get_property(dn, "ibm,open-sriov-vf-bar-info", NULL);
Expand Down
Loading

0 comments on commit c1c8626

Please sign in to comment.