Skip to content

Commit

Permalink
parisc: ccio-dma: Create private runway procfs root entry
Browse files Browse the repository at this point in the history
Create an own procfs "runway" root entry for the CCIO driver.
No need to share it with the sba_iommu driver, as only one
of those busses can be active in one machine anyway.

Signed-off-by: Helge Deller <deller@gmx.de>
Reported-by: kernel test robot <lkp@intel.com>
Fixes: 5472595 ("parisc: Move proc_mckinley_root and proc_runway_root to sba_iommu")
Cc: <stable@vger.kernel.org> # v6.5
  • Loading branch information
Helge Deller committed Aug 28, 2023
1 parent e0701e7 commit 77e0ddf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
3 changes: 0 additions & 3 deletions arch/parisc/include/asm/runway.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
#ifndef ASM_PARISC_RUNWAY_H
#define ASM_PARISC_RUNWAY_H

/* declared in arch/parisc/kernel/setup.c */
extern struct proc_dir_entry * proc_runway_root;

#define RUNWAY_STATUS 0x10
#define RUNWAY_DEBUG 0x40

Expand Down
11 changes: 7 additions & 4 deletions drivers/parisc/ccio-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@
#undef CCIO_COLLECT_STATS
#endif

#include <asm/runway.h> /* for proc_runway_root */

#ifdef DEBUG_CCIO_INIT
#define DBG_INIT(x...) printk(x)
#else
Expand Down Expand Up @@ -1559,10 +1557,15 @@ static int __init ccio_probe(struct parisc_device *dev)

#ifdef CONFIG_PROC_FS
if (ioc_count == 0) {
proc_create_single(MODULE_NAME, 0, proc_runway_root,
struct proc_dir_entry *runway;

runway = proc_mkdir("bus/runway", NULL);
if (runway) {
proc_create_single(MODULE_NAME, 0, runway,
ccio_proc_info);
proc_create_single(MODULE_NAME"-bitmap", 0, proc_runway_root,
proc_create_single(MODULE_NAME"-bitmap", 0, runway,
ccio_proc_bitmap_info);
}
}
#endif
ioc_count++;
Expand Down
2 changes: 1 addition & 1 deletion drivers/parisc/sba_iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ module_param(sba_reserve_agpgart, int, 0444);
MODULE_PARM_DESC(sba_reserve_agpgart, "Reserve half of IO pdir as AGPGART");
#endif

struct proc_dir_entry *proc_runway_root __ro_after_init;
static struct proc_dir_entry *proc_runway_root __ro_after_init;
struct proc_dir_entry *proc_mckinley_root __ro_after_init;

/************************************
Expand Down

0 comments on commit 77e0ddf

Please sign in to comment.