long bus walk times on boot up] (with patch this time)
-----Forwarded Message-----
Quoted 16 lines
From: Ryan Bradetich <[email protected]>
To: Matthew Wilcox <[email protected]>, Derek Engelhaupt <[email protected]>
Cc: [email protected]
Subject: Re: [parisc-linux] long bus walk times on boot up
Date: 20 Nov 2002 22:16:31 -0700Derek or anyone else experience this problem,
Feel free to test out this patch. This impliments Willy's idea and seems to work find on linux-2.5. I can not test this against cvs head on linux-2.4 since my C200 HPMCs in
cpu_idle().I do not have time to track down the linux-2.4 boot issue right now, but I will commit this patch once I get C200 to boot cvs head and if feedback from the patch is good.
Quoted 33 lines
Thanks,
- Ryan
Quoted 27 lines · Matthew Wilcox
Quoted 13 lines · Derek Engelhaupt
Well, my C180 is gone to a new home and my C360 is well on it's way, but I had a question about the new netinstall ISO's out there. I had been running the 2.4.19-pa19-20020922-netinst.iso on the C180 and it didn't have the bus walk issues that cause the long boot up times. I really would like to avoid having my C360 take 20+ minutes to boot up. Are there any real huge issues with running this older kernal on my C360 or are there any immediate plans to fix the issues of having to walk the entire bus? I'm still a little weary of compiling my own kernal (only done this through SAM on HP-UX), but if I was forced to I could probably figure it out using the HOWTO's. Is there a kernal parameter I could tweak that could resolve the long bus walk times? Or am I just totally off base? :)
2.4.19-pa19 should run fine on a C360. the long bus walk problem isn't yet fixed in the 2.4 CVS (but should be fixed in the 2.5 tree). this isn't a ploy to persuade more people to use 2.5; it's just ryan didn't get around to it yet ;-)
Signature · 5 lines
Revolutions do not require corporate support. _______________________________________________ parisc-linux mailing list [email protected] http://lists.parisc-linux.org/mailman/listinfo/parisc-linux
Index: arch/parisc/kernel/drivers.c
===================================================================
RCS file: /var/cvs/linux/arch/parisc/kernel/drivers.c,v retrieving revision 1.48
parisc/kernel/drivers.c +24 -26
@@ -9,6 +9,7 @@* Copyright (c) 1999 The Puffin Group * Copyright (c) 2001 Matthew Wilcox for Hewlett Packard * Copyright (c) 2001 Helge Deller <[email protected]> +* Copyright (c) 2001,2002 Ryan Bradetich * * The file handles registering devices and drivers, then matching them. * It's the closest we get to a dating agency.
@@ -23,7 +24,6 @@#include <asm/hardware.h> #include <asm/io.h> #include <asm/pdc.h> -#include <asm/gsc.h> /* See comments in include/asm-parisc/pci.h */ struct pci_dma_ops *hppa_dma_ops;
@@ -416,6 +416,7 @@ alloc_pa_dev(unsigned long hpa, struct h dev->id.sversion = ((iodc_data[4 ] &0x0f ) <<16 ) | (iodc_data[5 ] <<8 ) | iodc_data[6 ]; dev->hpa = hpa; + name =parisc_hardware_description (&dev->id);if (name) {strncpy (dev->name, name,sizeof (dev->name)-1 );
@@ -461,30 +462,25 @@ int register_parisc_device(struct parisc#define BC_PORT_MASK 0x8#define BC_LOWER_PORT 0x8 +#define IO_STATUS offsetof(struct bc_module, io_status)#define BUS_CONVERTER (dev) \ ((dev->id.hw_type == HPHW_IOA) || (dev->id.hw_type == HPHW_BCPORT))#define IS_LOWER_PORT (dev) \ - ((gsc_readl(&((struct bc_module *)dev->hpa)->io_status) \ - & BC_PORT_MASK) == BC_LOWER_PORT) - -#define READ_IO_IO_LOW (dev) \ - (dev->id.hw_type == HPHW_IOA ? \ - __raw_readl((unsigned long)&((struct bc_module *)dev->hpa)->io_io_low) << 16 : \ - __raw_readl((unsigned long)&((struct bc_module *)dev->hpa)->io_io_low)) - -#define READ_IO_IO_HIGH (dev) \ - (dev->id.hw_type == HPHW_IOA ? \ - __raw_readl((unsigned long)&((struct bc_module *)dev->hpa)->io_io_high) << 16 : \ - __raw_readl((unsigned long)&((struct bc_module *)dev->hpa)->io_io_high)) + ((__raw_readl(dev->hpa + IO_STATUS) & BC_PORT_MASK) == BC_LOWER_PORT) +#define MAX_NATIVE_DEVICES 64 +#define NATIVE_DEVICE_OFFSET 0x1000 -static void walk_native_bus (unsigned long io_io_low,unsigned long io_io_high, -struct parisc_device *parent); - -#define FLEX_MASK (unsigned long)0xfffffffffffc0000 +#define FLEX_MASK (unsigned long)0xfffffffffffc0000 +#define IO_IO_LOW offsetof(struct bc_module, io_io_low) +#define IO_IO_HIGH offsetof(struct bc_module, io_io_high) +#define READ_IO_IO_LOW (dev) (unsigned long)(signed int)__raw_readl(dev->hpa + IO_IO_LOW) +#define READ_IO_IO_HIGH (dev) (unsigned long)(signed int)__raw_readl(dev->hpa + IO_IO_HIGH) +static void walk_native_bus (unsigned long io_io_low,unsigned long io_io_high, +struct parisc_device *parent);void walk_lower_bus (struct parisc_device *dev) {
@@ -493,15 +489,17 @@ void walk_lower_bus(struct parisc_deviceif (!BUS_CONVERTER (dev) ||IS_LOWER_PORT (dev))return ; - io_io_low = ((unsigned long )(signed int )READ_IO_IO_LOW (dev) + ~FLEX_MASK ) &FLEX_MASK ; - io_io_high = ((unsigned long )(signed int )READ_IO_IO_HIGH (dev) + ~FLEX_MASK ) &FLEX_MASK ; +if (dev->id.hw_type ==HPHW_IOA ) { + io_io_low = (unsigned long )(signed int )(READ_IO_IO_LOW (dev) <<16 ); + io_io_high = io_io_low +MAX_NATIVE_DEVICES *NATIVE_DEVICE_OFFSET ; + }else { + io_io_low = (READ_IO_IO_LOW (dev) + ~FLEX_MASK ) &FLEX_MASK ; + io_io_high = (READ_IO_IO_HIGH (dev)+ ~FLEX_MASK ) &FLEX_MASK ; + }walk_native_bus (io_io_low, io_io_high, dev); } -#define MAX_NATIVE_DEVICES 64 -#define NATIVE_DEVICE_OFFSET 0x1000 -/** * walk_native_bus -- Probe a bus for devices * @io_io_low: Base address of this bus.
@@ -515,7 +513,7 @@ void walk_lower_bus(struct parisc_device* keyboard ports). This problem is not yet solved. */ static void walk_native_bus (unsigned long io_io_low,unsigned long io_io_high, -struct parisc_device *parent) +struct parisc_device *parent) {int i, devices_found =0 ;unsigned long hpa = io_io_low;
@@ -523,7 +521,7 @@ static void walk_native_bus(unsigned longet_node_path (parent, &path); do { - for (i = 0; i < MAX_NATIVE_DEVICES; i++, hpa += NATIVE_DEVICE_OFFSET) { + for(i = 0; i < MAX_NATIVE_DEVICES; i++, hpa += NATIVE_DEVICE_OFFSET) { struct parisc_device *dev; /* Was the device already added by Firmware? */
@@ -539,7 +537,7 @@ static void walk_native_bus(unsigned lon }walk_lower_bus (dev); } - }while (!devices_found && hpa < io_io_high); + }while (!devices_found && hpa < io_io_high); }#define CENTRAL_BUS_ADDR (unsigned long) 0xfffffffffff80000
@@ -552,7 +550,7 @@ static void walk_native_bus(unsigned lon*/ void walk_central_bus (void ) { -walk_native_bus (CENTRAL_BUS_ADDR , +walk_native_bus (CENTRAL_BUS_ADDR ,CENTRAL_BUS_ADDR + (MAX_NATIVE_DEVICES *NATIVE_DEVICE_OFFSET ), &root); }