Watch
1
Fork
You've already forked kernel_a52xq
0
mirror of https://github.com/a52xq-dev/kernel.git synced 2026-10-18 21:58:11 +07:00

cxl: Move include file cxl.h -> cxl-base.h

This moves the current include file from cxl.h -> cxl-base.h.  This current
include file is used only to pass information between the base driver that
needs to be built into the kernel and the cxl module.

This is to make way for a new include/misc/cxl.h which will
contain just the kernel API for other driver to use

Signed-off-by: Michael Neuling <mikey@neuling.org>
Acked-by: Ian Munsie <imunsie@au1.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
Michael Neuling 2015-05-27 16:07:16 +10:00 • committed by Michael Ellerman
commit ec249dd860
11 changed files with 12 additions and 12 deletions

View file

@ -2946,7 +2946,7 @@ M: Michael Neuling <mikey@neuling.org>
L: linuxppc-dev@lists.ozlabs.org
S: Supported
F: drivers/misc/cxl/
F: include/misc/cxl.h
F: include/misc/cxl*
F: include/uapi/misc/cxl.h
F: Documentation/powerpc/cxl.txt
F: Documentation/powerpc/cxl.txt

View file

@ -11,7 +11,7 @@
#define _ASM_PNV_PCI_H
#include <linux/pci.h>
#include <misc/cxl.h>
#include <misc/cxl-base.h>
int pnv_phb_to_cxl_mode(struct pci_dev *dev, uint64_t mode);
int pnv_cxl_ioda_msi_setup(struct pci_dev *dev, unsigned int hwirq,

View file

@ -26,7 +26,7 @@
#include <asm/reg.h>
#include <asm/copro.h>
#include <asm/spu.h>
#include <misc/cxl.h>
#include <misc/cxl-base.h>
/*
* This ought to be kept in sync with the powerpc specific do_page_fault

View file

@ -29,7 +29,7 @@
#include <asm/kexec.h>
#include <asm/ppc-opcode.h>
#include <misc/cxl.h>
#include <misc/cxl-base.h>
#ifdef DEBUG_LOW
#define DBG_LOW(fmt...) udbg_printf(fmt)

View file

@ -39,7 +39,7 @@
#include <asm/firmware.h>
#include <asm/pnv-pci.h>
#include <misc/cxl.h>
#include <misc/cxl-base.h>
#include "powernv.h"
#include "pci.h"

View file

@ -10,7 +10,7 @@
#include <linux/module.h>
#include <linux/rcupdate.h>
#include <asm/errno.h>
#include <misc/cxl.h>
#include <misc/cxl-base.h>
#include "cxl.h"
/* protected by rcu */

View file

@ -21,7 +21,7 @@
#include <asm/cputable.h>
#include <asm/mmu.h>
#include <asm/reg.h>
#include <misc/cxl.h>
#include <misc/cxl-base.h>
#include <uapi/misc/cxl.h>

View file

@ -14,7 +14,7 @@
#include <linux/slab.h>
#include <linux/pid.h>
#include <asm/cputable.h>
#include <misc/cxl.h>
#include <misc/cxl-base.h>
#include "cxl.h"
#include "trace.h"

View file

@ -20,7 +20,7 @@
#include <linux/idr.h>
#include <linux/pci.h>
#include <asm/cputable.h>
#include <misc/cxl.h>
#include <misc/cxl-base.h>
#include "cxl.h"
#include "trace.h"

View file

@ -15,7 +15,7 @@
#include <linux/mm.h>
#include <linux/uaccess.h>
#include <asm/synch.h>
#include <misc/cxl.h>
#include <misc/cxl-base.h>
#include "cxl.h"
#include "trace.h"

48
include/misc/cxl-base.h Normal file
View file

@ -0,0 +1,48 @@
/*
* Copyright 2014 IBM Corp.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
#ifndef _MISC_CXL_BASE_H
#define _MISC_CXL_BASE_H
#ifdef CONFIG_CXL_BASE
#define CXL_IRQ_RANGES 4
struct cxl_irq_ranges {
irq_hw_number_t offset[CXL_IRQ_RANGES];
irq_hw_number_t range[CXL_IRQ_RANGES];
};
extern atomic_t cxl_use_count;
static inline bool cxl_ctx_in_use(void)
{
return (atomic_read(&cxl_use_count) != 0);
}
static inline void cxl_ctx_get(void)
{
atomic_inc(&cxl_use_count);
}
static inline void cxl_ctx_put(void)
{
atomic_dec(&cxl_use_count);
}
void cxl_slbia(struct mm_struct *mm);
#else /* CONFIG_CXL_BASE */
static inline bool cxl_ctx_in_use(void) { return false; }
static inline void cxl_slbia(struct mm_struct *mm) {}
#endif /* CONFIG_CXL_BASE */
#endif