Skip to contentSkip to conversation

register_fallback_cpu()

parisc-linux [email protected] 4 participants 6 messages Feb 1, 2001 – Feb 2, 2001 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 2 lines · Grant Grundler

But I don't think it's related to the register_fallback_cpu() code changes I made. Maybe something else I submitted that day...

I now have it booting, b ut not with today's cvs I had to revert to 2001-01-31.
The problem is that register_driver only tries the first structure in the array it gets, and the ASP is second in the array in busdevice.c which causes it to never be initialized.

I also noticed that the busdev_driver_for array is marked as initdata, but a pointer to it gets saved in arch/parisc/drivers.c.

Best Regards, Daniel

#2 lore raw
Quoted 8 lines · [email protected] wrote:
Quoted 2 lines · Grant Grundler

But I don't think it's related to the register_fallback_cpu() code changes I made. Maybe something else I submitted that day...

I now have it booting, b ut not with today's cvs I had to revert to 2001-01-31.
The problem is that register_driver only tries the first structure in the array it gets, and the ASP is second in the array in busdevice.c which causes it to never be initialized.

Yup. I submitted that bug in the same batch. :^(
I've committed the fix for this. Thanks!

Quoted 2 lines

I also noticed that the busdev_driver_for array is marked as initdata, but a pointer to it gets saved in arch/parisc/drivers.c.

Someone with system with LASI should test/commit (in that order) this bugfix. Helge, Richard, or Matthew perhaps?

thanks,
grant

#3 lore raw
In reply to a message not in the archive

On 31 Jan, Grant Grundler wrote:

.... And the patch...

/Daniel

Index: arch/parisc/kernel/drivers.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/drivers.c,v retrieving revision 1.10
diff -r1.10 drivers.c
54,76c54,81
<
< /* link driver to the head of the global list.
< ** The list gets built in reverse order...ideally, it shouldn't
< ** matter but reality will eventually rear it's ugly head.
< */
< driver->next = pa_drivers;
< pa_drivers = driver;
<
< for (i=0; i < num_devices; i++) {
< device = &pa_devices[i];
<
< if (device->managed) continue;
< if (0 == compare_spec(device, driver)) continue;
<
< if ( (*driver->callback)(device,driver) ==0) {
< device->managed=1;
< } else {
< printk("Warning : device (%d, 0x%x, 0x%x, 0x%x, 0x%x) NOT claimed by %s %s\n",
< device->hw_type,
< device->hversion, device->hversion_rev,
< device->sversion, device->sversion_rev,
< driver->name, driver->version);
< }
---

Quoted 28 lines
        
        while(0!=driver->hw_type) {
	   
	       /* link driver to the head of the global list.
	       ** The list gets built in reverse order...ideally, it shouldn't
	       ** matter but reality will eventually rear it's ugly head.
	       */
	       driver->next = pa_drivers;
	       pa_drivers = driver;
        
    
	       for (i=0; i < num_devices; i++) {
	        	device = &pa_devices[i];

		       if (device->managed)			continue;
		       if (0 == compare_spec(device, driver))	continue;

		       if ( (*driver->callback)(device,driver) ==0) {
			         device->managed=1;
		       } else {
			         printk("Warning : device (%d, 0x%x, 0x%x, 0x%x, 0x%x) NOT claimed by %s %s\n",
				        device->hw_type,
				        device->hversion, device->hversion_rev,
					device->sversion, device->sversion_rev,
					driver->name, driver->version);
		       }
	       }
	       driver++;
#4 lore raw

please use the .cvsrc distributed in the `buildtools' cvs archive. this ensures that your diffs are generated in the correct format (ie unified)

Signature · 1 line
Revolutions do not require corporate support.
#5 lore raw
In reply to [email protected]
Quoted 6 lines · [email protected] wrote:

---1463811727-1804289383-981065757=:6612
Content-Type: TEXT/plain; CHARSET=US-ASCII

On 31 Jan, Grant Grundler wrote:

.... And the patch...

Ok. I see the problem:
Multiple entries in the "array" passed to register_driver()

I mistakenly deleted this line from the code:
- for (;driver->check;driver++) {

and the associated '}'. I'll restore the for() loop.

But Matthew is right: use the build-tools/cvsrc as your "~/.cvsrc". It's generally easier to read.

thanks! (and sorry for the mistake)
grant

Grant Grundler
parisc-linux {PCI|IOMMU|SMP} hacker
+1.408.447.7253

#6 lore raw

[parisc-linux] C100 w/ Current CVS Bits

In reply to [email protected]

Howdy,

Did it again. CVS update, build new kernel, boot. This one mounts the root filesystem from a SCSI disk and then barfs copiously with this message:

kernel BUG at /usr/src/parisc/linux/include/asm/pgalloc.h:60!

Quick ref: Here's the offending code from flush_cache_range():

	if (!mm->context) {
		BUG();
		return;
	}

Suggestions?

- Greg