Skip to content

Commit 5472595

Browse files
committed
parisc: Move proc_mckinley_root and proc_runway_root to sba_iommu
Clean up the procfs root entries for gsc, runway, and mckinley busses. Signed-off-by: Helge Deller <deller@gmx.de>
1 parent a4c59c9 commit 5472595

File tree

3 files changed

+7
-49
lines changed

3 files changed

+7
-49
lines changed

arch/parisc/kernel/pci-dma.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ pcxl_dma_init(void)
381381
pcxl_res_map = (char *)__get_free_pages(GFP_KERNEL,
382382
get_order(pcxl_res_size));
383383
memset(pcxl_res_map, 0, pcxl_res_size);
384-
proc_gsc_root = proc_mkdir("gsc", NULL);
384+
proc_gsc_root = proc_mkdir("bus/gsc", NULL);
385385
if (!proc_gsc_root)
386386
printk(KERN_WARNING
387387
"pcxl_dma_init: Unable to create gsc /proc dir entry\n");

arch/parisc/kernel/setup.c

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,6 @@
4040

4141
static char __initdata command_line[COMMAND_LINE_SIZE];
4242

43-
/* Intended for ccio/sba/cpu statistics under /proc/bus/{runway|gsc} */
44-
struct proc_dir_entry * proc_runway_root __read_mostly = NULL;
45-
struct proc_dir_entry * proc_gsc_root __read_mostly = NULL;
46-
struct proc_dir_entry * proc_mckinley_root __read_mostly = NULL;
47-
4843
static void __init setup_cmdline(char **cmdline_p)
4944
{
5045
extern unsigned int boot_args[];
@@ -196,48 +191,6 @@ const struct seq_operations cpuinfo_op = {
196191
.show = show_cpuinfo
197192
};
198193

199-
static void __init parisc_proc_mkdir(void)
200-
{
201-
/*
202-
** Can't call proc_mkdir() until after proc_root_init() has been
203-
** called by start_kernel(). In other words, this code can't
204-
** live in arch/.../setup.c because start_parisc() calls
205-
** start_kernel().
206-
*/
207-
switch (boot_cpu_data.cpu_type) {
208-
case pcxl:
209-
case pcxl2:
210-
if (NULL == proc_gsc_root)
211-
{
212-
proc_gsc_root = proc_mkdir("bus/gsc", NULL);
213-
}
214-
break;
215-
case pcxt_:
216-
case pcxu:
217-
case pcxu_:
218-
case pcxw:
219-
case pcxw_:
220-
case pcxw2:
221-
if (NULL == proc_runway_root)
222-
{
223-
proc_runway_root = proc_mkdir("bus/runway", NULL);
224-
}
225-
break;
226-
case mako:
227-
case mako2:
228-
if (NULL == proc_mckinley_root)
229-
{
230-
proc_mckinley_root = proc_mkdir("bus/mckinley", NULL);
231-
}
232-
break;
233-
default:
234-
/* FIXME: this was added to prevent the compiler
235-
* complaining about missing pcx, pcxs and pcxt
236-
* I'm assuming they have neither gsc nor runway */
237-
break;
238-
}
239-
}
240-
241194
static struct resource central_bus = {
242195
.name = "Central Bus",
243196
.start = F_EXTEND(0xfff80000),
@@ -294,7 +247,6 @@ static int __init parisc_init(void)
294247
{
295248
u32 osid = (OS_ID_LINUX << 16);
296249

297-
parisc_proc_mkdir();
298250
parisc_init_resources();
299251
do_device_inventory(); /* probe for hardware */
300252

drivers/parisc/sba_iommu.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ module_param(sba_reserve_agpgart, int, 0444);
121121
MODULE_PARM_DESC(sba_reserve_agpgart, "Reserve half of IO pdir as AGPGART");
122122
#endif
123123

124+
struct proc_dir_entry *proc_runway_root __ro_after_init;
125+
struct proc_dir_entry *proc_mckinley_root __ro_after_init;
124126

125127
/************************************
126128
** SBA register read and write support
@@ -1968,11 +1970,15 @@ static int __init sba_driver_callback(struct parisc_device *dev)
19681970
#ifdef CONFIG_PROC_FS
19691971
switch (dev->id.hversion) {
19701972
case PLUTO_MCKINLEY_PORT:
1973+
if (!proc_mckinley_root)
1974+
proc_mckinley_root = proc_mkdir("bus/mckinley", NULL);
19711975
root = proc_mckinley_root;
19721976
break;
19731977
case ASTRO_RUNWAY_PORT:
19741978
case IKE_MERCED_PORT:
19751979
default:
1980+
if (!proc_runway_root)
1981+
proc_runway_root = proc_mkdir("bus/runway", NULL);
19761982
root = proc_runway_root;
19771983
break;
19781984
}

0 commit comments

Comments
 (0)