Skip to content

Commit

Permalink
powerpc/powernv: remove unused NPU DMA code
Browse files Browse the repository at this point in the history
None of these routines were ever used anywhere in the kernel tree
since they were added to the kernel.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
  • Loading branch information
Christoph Hellwig authored and Michael Ellerman committed Jul 1, 2019
1 parent c498a4f commit 7eb3cf7
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 581 deletions.
2 changes: 0 additions & 2 deletions arch/powerpc/include/asm/book3s/64/mmu.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,6 @@ typedef struct {
/* Number of users of the external (Nest) MMU */
atomic_t copros;

/* NPU NMMU context */
struct npu_context *npu_context;
struct hash_mm_context *hash_context;

unsigned long vdso_base;
Expand Down
22 changes: 0 additions & 22 deletions arch/powerpc/include/asm/powernv.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,35 +11,13 @@
#define _ASM_POWERNV_H

#ifdef CONFIG_PPC_POWERNV
#define NPU2_WRITE 1
extern void powernv_set_nmmu_ptcr(unsigned long ptcr);
extern struct npu_context *pnv_npu2_init_context(struct pci_dev *gpdev,
unsigned long flags,
void (*cb)(struct npu_context *, void *),
void *priv);
extern void pnv_npu2_destroy_context(struct npu_context *context,
struct pci_dev *gpdev);
extern int pnv_npu2_handle_fault(struct npu_context *context, uintptr_t *ea,
unsigned long *flags, unsigned long *status,
int count);

void pnv_program_cpu_hotplug_lpcr(unsigned int cpu, u64 lpcr_val);

void pnv_tm_init(void);
#else
static inline void powernv_set_nmmu_ptcr(unsigned long ptcr) { }
static inline struct npu_context *pnv_npu2_init_context(struct pci_dev *gpdev,
unsigned long flags,
struct npu_context *(*cb)(struct npu_context *, void *),
void *priv) { return ERR_PTR(-ENODEV); }
static inline void pnv_npu2_destroy_context(struct npu_context *context,
struct pci_dev *gpdev) { }

static inline int pnv_npu2_handle_fault(struct npu_context *context,
uintptr_t *ea, unsigned long *flags,
unsigned long *status, int count) {
return -ENODEV;
}

static inline void pnv_tm_init(void) { }
#endif
Expand Down
1 change: 0 additions & 1 deletion arch/powerpc/mm/book3s64/mmu_context.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ static int radix__init_new_context(struct mm_struct *mm)
*/
asm volatile("ptesync;isync" : : : "memory");

mm->context.npu_context = NULL;
mm->context.hash_context = NULL;

return index;
Expand Down
Loading

0 comments on commit 7eb3cf7

Please sign in to comment.