Re: [PATCH] kernel/resource.c: fix muxed resource handling in __request_region()

2016-02-23 Thread One Thousand Gnomes
> > IORESOURCE_MUXED is a convenient way to deal with that. For some code > > examples you can look at the superio_* functions in the IT87 drivers: > > gpio/gpio-it87.c, hwmon/it87.c and watchdog/it87_wdt.c. > > > > I am not aware of any other users for IORESOURCE_MUXED. > > > > Let me know how

Re: [PATCH] kernel/resource.c: fix muxed resource handling in __request_region()

2016-02-23 Thread One Thousand Gnomes
> > IORESOURCE_MUXED is a convenient way to deal with that. For some code > > examples you can look at the superio_* functions in the IT87 drivers: > > gpio/gpio-it87.c, hwmon/it87.c and watchdog/it87_wdt.c. > > > > I am not aware of any other users for IORESOURCE_MUXED. > > > > Let me know how

Re: [PATCH] kernel/resource.c: fix muxed resource handling in __request_region()

2016-02-23 Thread Jesse Barnes
On 02/23/2016 08:19 AM, Simon Guinot wrote: > On Mon, Feb 22, 2016 at 12:46:09PM -0800, Jesse Barnes wrote: >> On 02/22/2016 05:49 AM, Alan Cox wrote: we have some good alternatives in the form of bus and platform drivers that can manage the appropriate serialization and keep things

Re: [PATCH] kernel/resource.c: fix muxed resource handling in __request_region()

2016-02-23 Thread Jesse Barnes
On 02/23/2016 08:19 AM, Simon Guinot wrote: > On Mon, Feb 22, 2016 at 12:46:09PM -0800, Jesse Barnes wrote: >> On 02/22/2016 05:49 AM, Alan Cox wrote: we have some good alternatives in the form of bus and platform drivers that can manage the appropriate serialization and keep things

Re: [PATCH] kernel/resource.c: fix muxed resource handling in __request_region()

2016-02-23 Thread Simon Guinot
On Mon, Feb 22, 2016 at 12:46:09PM -0800, Jesse Barnes wrote: > On 02/22/2016 05:49 AM, Alan Cox wrote: > >> we have some good alternatives in the form of bus and platform > >> drivers that > >> can manage the appropriate serialization and keep things from > >> stomping > >> on one another. > > >

Re: [PATCH] kernel/resource.c: fix muxed resource handling in __request_region()

2016-02-23 Thread Simon Guinot
On Mon, Feb 22, 2016 at 12:46:09PM -0800, Jesse Barnes wrote: > On 02/22/2016 05:49 AM, Alan Cox wrote: > >> we have some good alternatives in the form of bus and platform > >> drivers that > >> can manage the appropriate serialization and keep things from > >> stomping > >> on one another. > > >

Re: [PATCH] kernel/resource.c: fix muxed resource handling in __request_region()

2016-02-22 Thread Vincent Pelletier
On Mon, 22 Feb 2016 13:49:12 +, Alan Cox wrote: > It's not used much, especially nowdays. The use case is basically multi > I/O chips on the ISA/LPC bus with magic shared config register ports. This is precisely a super I/O driver (gpio-f7188x) which, when used with

Re: [PATCH] kernel/resource.c: fix muxed resource handling in __request_region()

2016-02-22 Thread Vincent Pelletier
On Mon, 22 Feb 2016 13:49:12 +, Alan Cox wrote: > It's not used much, especially nowdays. The use case is basically multi > I/O chips on the ISA/LPC bus with magic shared config register ports. This is precisely a super I/O driver (gpio-f7188x) which, when used with concurrent accesses on an

Re: [PATCH] kernel/resource.c: fix muxed resource handling in __request_region()

2016-02-22 Thread Jesse Barnes
On 02/22/2016 05:49 AM, Alan Cox wrote: >> we have some good alternatives in the form of bus and platform >> drivers that >> can manage the appropriate serialization and keep things from >> stomping >> on one another. > > It's not used much, especially nowdays. The use case is basically multi >

Re: [PATCH] kernel/resource.c: fix muxed resource handling in __request_region()

2016-02-22 Thread Jesse Barnes
On 02/22/2016 05:49 AM, Alan Cox wrote: >> we have some good alternatives in the form of bus and platform >> drivers that >> can manage the appropriate serialization and keep things from >> stomping >> on one another. > > It's not used much, especially nowdays. The use case is basically multi >

Re: [PATCH] kernel/resource.c: fix muxed resource handling in __request_region()

2016-02-22 Thread Alan Cox
> we have some good alternatives in the form of bus and platform > drivers that > can manage the appropriate serialization and keep things from > stomping > on one another. It's not used much, especially nowdays. The use case is basically multi I/O chips on the ISA/LPC bus with magic shared

Re: [PATCH] kernel/resource.c: fix muxed resource handling in __request_region()

2016-02-22 Thread Alan Cox
> we have some good alternatives in the form of bus and platform > drivers that > can manage the appropriate serialization and keep things from > stomping > on one another. It's not used much, especially nowdays. The use case is basically multi I/O chips on the ISA/LPC bus with magic shared

Re: [PATCH] kernel/resource.c: fix muxed resource handling in __request_region()

2016-02-20 Thread Jesse Barnes
On February 20, 2016 9:12:01 AM Linus Torvalds wrote: On Fri, Feb 19, 2016 at 3:25 PM, Jesse Barnes wrote: +Linus (the de-facto resource guy). On 02/19/2016 01:10 PM, Vincent Pelletier wrote: Tested-by: Vincent Pelletier

Re: [PATCH] kernel/resource.c: fix muxed resource handling in __request_region()

2016-02-20 Thread Jesse Barnes
On February 20, 2016 9:12:01 AM Linus Torvalds wrote: On Fri, Feb 19, 2016 at 3:25 PM, Jesse Barnes wrote: +Linus (the de-facto resource guy). On 02/19/2016 01:10 PM, Vincent Pelletier wrote: Tested-by: Vincent Pelletier Hmm. So I'm not entirely happy with the patch, because I think

Re: [PATCH] kernel/resource.c: fix muxed resource handling in __request_region()

2016-02-20 Thread Linus Torvalds
On Fri, Feb 19, 2016 at 3:25 PM, Jesse Barnes wrote: > +Linus (the de-facto resource guy). > > On 02/19/2016 01:10 PM, Vincent Pelletier wrote: >> >> I finally got around to rebasing some patches, and realised that the >> patch from Simon Guinot below still gets rebased

Re: [PATCH] kernel/resource.c: fix muxed resource handling in __request_region()

2016-02-20 Thread Linus Torvalds
On Fri, Feb 19, 2016 at 3:25 PM, Jesse Barnes wrote: > +Linus (the de-facto resource guy). > > On 02/19/2016 01:10 PM, Vincent Pelletier wrote: >> >> I finally got around to rebasing some patches, and realised that the >> patch from Simon Guinot below still gets rebased over torvalds' v4.4 . >>

Re: [PATCH] kernel/resource.c: fix muxed resource handling in __request_region()

2016-02-19 Thread Jesse Barnes
+Linus (the de-facto resource guy). On 02/19/2016 01:10 PM, Vincent Pelletier wrote: > Hello, > > I finally got around to rebasing some patches, and realised that the > patch from Simon Guinot below still gets rebased over torvalds' v4.4 . > > Any reason it was not applied ? > Or was the issue

Re: [PATCH] kernel/resource.c: fix muxed resource handling in __request_region()

2016-02-19 Thread Jesse Barnes
+Linus (the de-facto resource guy). On 02/19/2016 01:10 PM, Vincent Pelletier wrote: > Hello, > > I finally got around to rebasing some patches, and realised that the > patch from Simon Guinot below still gets rebased over torvalds' v4.4 . > > Any reason it was not applied ? > Or was the issue

Re: [PATCH] kernel/resource.c: fix muxed resource handling in __request_region()

2016-02-19 Thread Vincent Pelletier
Hello, I finally got around to rebasing some patches, and realised that the patch from Simon Guinot below still gets rebased over torvalds' v4.4 . Any reason it was not applied ? Or was the issue fixed in another, non-git-conflicting way ? (I see nothing recent in git log kernel/resource.c) I

Re: [PATCH] kernel/resource.c: fix muxed resource handling in __request_region()

2016-02-19 Thread Vincent Pelletier
Hello, I finally got around to rebasing some patches, and realised that the patch from Simon Guinot below still gets rebased over torvalds' v4.4 . Any reason it was not applied ? Or was the issue fixed in another, non-git-conflicting way ? (I see nothing recent in git log kernel/resource.c) I

[PATCH] kernel/resource.c: fix muxed resource handling in __request_region()

2015-09-09 Thread Simon Guinot
In __request_region, if a conflict with a BUSY and MUXED resource is detected, then the caller goes to sleep and waits for the resource to be released. A pointer on the conflicting resource is kept. At wake-up this pointer is used as a parent to retry to request the region. A first problem is that

[PATCH] kernel/resource.c: fix muxed resource handling in __request_region()

2015-09-09 Thread Simon Guinot
In __request_region, if a conflict with a BUSY and MUXED resource is detected, then the caller goes to sleep and waits for the resource to be released. A pointer on the conflicting resource is kept. At wake-up this pointer is used as a parent to retry to request the region. A first problem is that