All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrey Borzenkov <arvidjaar@mail.ru>
To: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Cc: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] rc3-mm1 - /proc/ide/HWIF for modular IDE
Date: Wed, 4 Feb 2004 22:44:49 +0300	[thread overview]
Message-ID: <20040204194449.GB3968@localhost.localdomain> (raw)
In-Reply-To: <200402032139.24487.bzolnier@elka.pw.edu.pl>

[-- Attachment #1: Type: text/plain, Size: 1790 bytes --]

On Tue, Feb 03, 2004 at 09:39:24PM +0100, Bartlomiej Zolnierkiewicz wrote:
> On Tuesday 03 of February 2004 20:48, Andrey Borzenkov wrote:
> > currently /proc/ide/HWIF are created in one shot during initialization
> > or in ide-generic meaning that for modular IDE you must include
> > ide-generic.
> >
> > this adds per-hwif registration currently for PCI only (that is what I
> > can test); if this is OK I will make create_proc_ide_interfaces static
> > and replace it with create_proc_ide_interface where appropriate.
> >
> > this also makes /proc/ide entries for PCI chipset be correctly created
> >
> > -andrey
> 
> @@ -801,6 +805,12 @@ void ide_pci_register_host_proc (ide_pci
>  		tmp->next = p;
>  	} else
>  		ide_pci_host_proc_list = p;
> +
> +	if (proc_ide_root) {
> +		p->parent = proc_ide_root;
> +		create_proc_info_entry(p->name, 0, p->parent, p->get_info);
> +		p->set = 2;
> +	}
>  }
>  
> You should add p->get_info only _after_ all hwifs of a host are probed,
> just like non-modular code does it.  Otherwise you are opening new races.
> 
> @@ -659,6 +659,10 @@ bypass_legacy_dma:
>  			 */
>  			d->init_hwif(hwif);
>  
> +#ifdef CONFIG_PROC_FS
> +		create_proc_ide_interface(hwif);
> +#endif
> +
>  		mate = hwif;
>  		at_least_one_hwif_enabled = 1;
>  	}
> 
> Same problem as above.
> 

oh :( is it possible to do it in probe_hwif_init? it would be most
logical place.

> ide_setup_pci_device()+ide_setup_pci_devices() are correct places
> to add registering of /proc/ide/<chipset> and /proc/ide/<hwif>.
> 

this patch does it for <hwif>

> Even better - you may fix every PCI driver to add these entries
> itself and remove these silly ide_pci_host_proc_t-s :-).
> 

I'll see. what are those races and are they inherently unfixable?

thank you

-andrey

> --bart
> 

[-- Attachment #2: 2.6.2-rc3-mm1-modular_proc_ide.patch --]
[-- Type: text/plain, Size: 814 bytes --]

--- linux-2.6.2-rc3-mm1/drivers/ide/setup-pci.c.modular	2004-02-04 22:14:43.000000000 +0300
+++ linux-2.6.2-rc3-mm1/drivers/ide/setup-pci.c	2004-02-04 22:23:24.000000000 +0300
@@ -746,6 +746,10 @@ void ide_setup_pci_device (struct pci_de
 		probe_hwif_init(&ide_hwifs[index_list.b.low]);
 	if ((index_list.b.high & 0xf0) != 0xf0)
 		probe_hwif_init(&ide_hwifs[index_list.b.high]);
+
+#ifdef CONFIG_PROC_FS
+	create_proc_ide_interfaces();
+#endif
 }
 
 EXPORT_SYMBOL_GPL(ide_setup_pci_device);
@@ -763,6 +767,10 @@ void ide_setup_pci_devices (struct pci_d
 		probe_hwif_init(&ide_hwifs[index_list2.b.low]);
 	if ((index_list2.b.high & 0xf0) != 0xf0)
 		probe_hwif_init(&ide_hwifs[index_list2.b.high]);
+
+#ifdef CONFIG_PROC_FS
+	create_proc_ide_interfaces();
+#endif
 }
 
 EXPORT_SYMBOL_GPL(ide_setup_pci_devices);

  reply	other threads:[~2004-02-04 20:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-03 19:48 [PATCH] rc3-mm1 - /proc/ide/HWIF for modular IDE Andrey Borzenkov
2004-02-03 20:39 ` Bartlomiej Zolnierkiewicz
2004-02-04 19:44   ` Andrey Borzenkov [this message]
2004-02-04 21:55     ` Bartlomiej Zolnierkiewicz
2004-02-05 20:41       ` Andrey Borzenkov
2004-02-22  9:36       ` [PATCH][2.6.3-mm2] " Andrey Borzenkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040204194449.GB3968@localhost.localdomain \
    --to=arvidjaar@mail.ru \
    --cc=B.Zolnierkiewicz@elka.pw.edu.pl \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.