All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] sparc: drop SBUS ifdefs
@ 2011-01-05 21:02 Sam Ravnborg
  2011-01-05 23:23 ` Julian Calaby
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Sam Ravnborg @ 2011-01-05 21:02 UTC (permalink / raw)
  To: sparclinux

Kristoffer Glembo noticed that SBUS is always defined for SPARC.
So I went out and dropped all #ifdef SBUS that were
present in SPARC only code.

This touches:
- arch/sparc
- drivers/net
- sound/sparc

But despite this I expect we can add all this to sparc.git.
If you prefer I can submit the patches via the usual channels.

Build tested on sparc64 & sparc.

Patches are on top of sparc-next as of yesterday.

	Sam

Sam Ravnborg (4):
      sparc: drop ifdef CONFIG_SBUS in arch/sparc - SBUS is always defined
      sunhme: cleanup conditional on CONFIG_SBUS
      cs4231: cleanup conditional on CONFIG_SBUS
      sound,sparc: drop SBUS dependency

 arch/sparc/kernel/ioport.c        |    4 ----
 arch/sparc/kernel/prom_irqtrans.c |    5 -----
 arch/sparc/mm/io-unit.c           |    4 ----
 arch/sparc/mm/iommu.c             |    4 ----
 drivers/net/sunhme.c              |    9 +--------
 sound/sparc/Kconfig               |    2 --
 sound/sparc/cs4231.c              |   13 -------------
 7 files changed, 1 insertions(+), 40 deletions(-)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/4] sparc: drop SBUS ifdefs
  2011-01-05 21:02 [PATCH 0/4] sparc: drop SBUS ifdefs Sam Ravnborg
@ 2011-01-05 23:23 ` Julian Calaby
  2011-01-05 23:36 ` David Miller
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Julian Calaby @ 2011-01-05 23:23 UTC (permalink / raw)
  To: sparclinux

On Thu, Jan 6, 2011 at 08:02, Sam Ravnborg <sam@ravnborg.org> wrote:
> Kristoffer Glembo noticed that SBUS is always defined for SPARC.
> So I went out and dropped all #ifdef SBUS that were
> present in SPARC only code.

Good catch, but is this necessarily correct - i.e. do all sparc
machines have sbus hardware, and is it necessary to have sbus support
compiled into all sparc kernels? - should this be a (hidden) compile
option in like most other bus types? (e.g. PCI)

And beyond that, keeping these (unnecessary) #ifdefs is good
documentation - it makes it obvious that these drivers require sbus to
function. Would it potentially be a better choice to drop the SPARC
dependency as it's the only architecture that defines SBUS?

Thanks,

-- 

Julian Calaby

Email: julian.calaby@gmail.com
Profile: http://www.google.com/profiles/julian.calaby/
.Plan: http://sites.google.com/site/juliancalaby/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/4] sparc: drop SBUS ifdefs
  2011-01-05 21:02 [PATCH 0/4] sparc: drop SBUS ifdefs Sam Ravnborg
  2011-01-05 23:23 ` Julian Calaby
@ 2011-01-05 23:36 ` David Miller
  2011-01-05 23:42 ` Julian Calaby
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2011-01-05 23:36 UTC (permalink / raw)
  To: sparclinux

From: Julian Calaby <julian.calaby@gmail.com>
Date: Thu, 6 Jan 2011 10:23:43 +1100

> And beyond that, keeping these (unnecessary) #ifdefs is good
> documentation - it makes it obvious that these drivers require sbus to
> function.

It should be buildable on any platform that has CONFIG_OF support,
as all of the SBUS drivers only use generic OF and dma_*() interfaces.

And this has value because it increases build testing.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/4] sparc: drop SBUS ifdefs
  2011-01-05 21:02 [PATCH 0/4] sparc: drop SBUS ifdefs Sam Ravnborg
  2011-01-05 23:23 ` Julian Calaby
  2011-01-05 23:36 ` David Miller
@ 2011-01-05 23:42 ` Julian Calaby
  2011-01-06 22:31 ` David Miller
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Julian Calaby @ 2011-01-05 23:42 UTC (permalink / raw)
  To: sparclinux

On Thu, Jan 6, 2011 at 10:36, David Miller <davem@davemloft.net> wrote:
> From: Julian Calaby <julian.calaby@gmail.com>
> Date: Thu, 6 Jan 2011 10:23:43 +1100
>
>> And beyond that, keeping these (unnecessary) #ifdefs is good
>> documentation - it makes it obvious that these drivers require sbus to
>> function.
>
> It should be buildable on any platform that has CONFIG_OF support,
> as all of the SBUS drivers only use generic OF and dma_*() interfaces.
>
> And this has value because it increases build testing.

Oh, yes, forgot that =)

That said, sunhme has SBUS conditionals around calls to
sbus_can_burst64() and sbus_can_dma_64bit() - I'm not sure if the
other drivers also use similar functions to determine what they can /
should do and whether this would break things.

Thanks,

-- 

Julian Calaby

Email: julian.calaby@gmail.com
Profile: http://www.google.com/profiles/julian.calaby/
.Plan: http://sites.google.com/site/juliancalaby/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/4] sparc: drop SBUS ifdefs
  2011-01-05 21:02 [PATCH 0/4] sparc: drop SBUS ifdefs Sam Ravnborg
                   ` (2 preceding siblings ...)
  2011-01-05 23:42 ` Julian Calaby
@ 2011-01-06 22:31 ` David Miller
  2011-01-07  6:04 ` Sam Ravnborg
  2011-01-07  8:24 ` Julian Calaby
  5 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2011-01-06 22:31 UTC (permalink / raw)
  To: sparclinux

From: Sam Ravnborg <sam@ravnborg.org>
Date: Wed, 5 Jan 2011 22:02:17 +0100

> Kristoffer Glembo noticed that SBUS is always defined for SPARC.
> So I went out and dropped all #ifdef SBUS that were
> present in SPARC only code.
> 
> This touches:
> - arch/sparc
> - drivers/net
> - sound/sparc
> 
> But despite this I expect we can add all this to sparc.git.
> If you prefer I can submit the patches via the usual channels.
> 
> Build tested on sparc64 & sparc.
> 
> Patches are on top of sparc-next as of yesterday.

I've decided I'm going to defer on this set of patches for now.

The real thing to do is to create a include/linux/sbus.h that
provides the SBUS specific interfaces, and dummy ones when
CONFIG_SBUS is not defined.

That way all of the sparc drivers can be enabled unconditionally
as long as CONFIG_OF is true.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/4] sparc: drop SBUS ifdefs
  2011-01-05 21:02 [PATCH 0/4] sparc: drop SBUS ifdefs Sam Ravnborg
                   ` (3 preceding siblings ...)
  2011-01-06 22:31 ` David Miller
@ 2011-01-07  6:04 ` Sam Ravnborg
  2011-01-07  8:24 ` Julian Calaby
  5 siblings, 0 replies; 7+ messages in thread
From: Sam Ravnborg @ 2011-01-07  6:04 UTC (permalink / raw)
  To: sparclinux

On Thu, Jan 06, 2011 at 02:31:13PM -0800, David Miller wrote:
> From: Sam Ravnborg <sam@ravnborg.org>
> Date: Wed, 5 Jan 2011 22:02:17 +0100
> 
> > Kristoffer Glembo noticed that SBUS is always defined for SPARC.
> > So I went out and dropped all #ifdef SBUS that were
> > present in SPARC only code.
> > 
> > This touches:
> > - arch/sparc
> > - drivers/net
> > - sound/sparc
> > 
> > But despite this I expect we can add all this to sparc.git.
> > If you prefer I can submit the patches via the usual channels.
> > 
> > Build tested on sparc64 & sparc.
> > 
> > Patches are on top of sparc-next as of yesterday.
> 
> I've decided I'm going to defer on this set of patches for now.
> 
> The real thing to do is to create a include/linux/sbus.h that
> provides the SBUS specific interfaces, and dummy ones when
> CONFIG_SBUS is not defined.
> 
> That way all of the sparc drivers can be enabled unconditionally
> as long as CONFIG_OF is true.

OK.
I will try to look into providing this an resend.

	Sam

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/4] sparc: drop SBUS ifdefs
  2011-01-05 21:02 [PATCH 0/4] sparc: drop SBUS ifdefs Sam Ravnborg
                   ` (4 preceding siblings ...)
  2011-01-07  6:04 ` Sam Ravnborg
@ 2011-01-07  8:24 ` Julian Calaby
  5 siblings, 0 replies; 7+ messages in thread
From: Julian Calaby @ 2011-01-07  8:24 UTC (permalink / raw)
  To: sparclinux

On Fri, Jan 7, 2011 at 17:04, Sam Ravnborg <sam@ravnborg.org> wrote:
> On Thu, Jan 06, 2011 at 02:31:13PM -0800, David Miller wrote:
>> From: Sam Ravnborg <sam@ravnborg.org>
>> Date: Wed, 5 Jan 2011 22:02:17 +0100
>>
>> > Kristoffer Glembo noticed that SBUS is always defined for SPARC.
>> > So I went out and dropped all #ifdef SBUS that were
>> > present in SPARC only code.
>> >
>> > This touches:
>> > - arch/sparc
>> > - drivers/net
>> > - sound/sparc
>> >
>> > But despite this I expect we can add all this to sparc.git.
>> > If you prefer I can submit the patches via the usual channels.
>> >
>> > Build tested on sparc64 & sparc.
>> >
>> > Patches are on top of sparc-next as of yesterday.
>>
>> I've decided I'm going to defer on this set of patches for now.
>>
>> The real thing to do is to create a include/linux/sbus.h that
>> provides the SBUS specific interfaces, and dummy ones when
>> CONFIG_SBUS is not defined.
>>
>> That way all of the sparc drivers can be enabled unconditionally
>> as long as CONFIG_OF is true.
>
> OK.
> I will try to look into providing this an resend.

I'm thinking about having a look to see if it's possible to split the
sBus code out of the base sparc arch code this weekend. I'm thinking
of trying to put it behind a KConfig option, similar to PCI - of
course making it properly backwards compatible so that nothing breaks
horribly.

I'll hold off on sending anything until you've re-sent this.

Thanks,

-- 

Julian Calaby

Email: julian.calaby@gmail.com
Profile: http://www.google.com/profiles/julian.calaby/
.Plan: http://sites.google.com/site/juliancalaby/

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-01-07  8:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-05 21:02 [PATCH 0/4] sparc: drop SBUS ifdefs Sam Ravnborg
2011-01-05 23:23 ` Julian Calaby
2011-01-05 23:36 ` David Miller
2011-01-05 23:42 ` Julian Calaby
2011-01-06 22:31 ` David Miller
2011-01-07  6:04 ` Sam Ravnborg
2011-01-07  8:24 ` Julian Calaby

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.