From sedara2003@yahoo.co.in Mon Jan  1 03:32:59 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 01 Jan 2007 03:33:04 +0000 (GMT)
Received: from web7710.mail.in.yahoo.com ([202.86.4.48]:56666 "HELO
	web7710.mail.in.yahoo.com") by ftp.linux-mips.org with SMTP
	id S28643466AbXAADc7 (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Mon, 1 Jan 2007 03:32:59 +0000
Received: (qmail 57629 invoked by uid 60001); 1 Jan 2007 03:32:52 -0000
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
  s=s1024; d=yahoo.co.in;
  h=X-YMail-OSG:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID;
  b=sWn2h/u2v3r4tr86/n/PzE/sR43O59Z6zFN/W1sD6rz0S6lzlcXCdYl8/FRwCd2prgv6jf45kxvH0cpcKrwzEim0zuCjZOUgv0d0L5KYVFCatcJoj5vCBUawVCUGUG5hlS7dHIDdNbueZvvSOATXGU8sEMSQh2BbZA5GxeDOMFE=;
X-YMail-OSG: lSCkrq8VM1kGnlfKKJMdNYKeNqjqImY7WByRpIKRVcr4gzKmnm5kWlgCYWpk_rtf5oEhlGPDHQBYrj.VEHIljij7w2G70tE5NxuzwPTZCe5YXtxzJdZOLe0TuaToTqyw
Received: from [63.81.75.66] by web7710.mail.in.yahoo.com via HTTP; Mon, 01 Jan 2007 03:32:52 GMT
Date:	Mon, 1 Jan 2007 03:32:52 +0000 (GMT)
From:	sbedara edara <sedara2003@yahoo.co.in>
Subject: Porting Linux-2.6.18 kernel on MIPS24KE processor
To:	linux-mips@linux-mips.org
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="0-1672399382-1167622372=:57626"
Content-Transfer-Encoding: 8bit
Message-ID: <497999.57626.qm@web7710.mail.in.yahoo.com>
Return-Path: <sedara2003@yahoo.co.in>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13531
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: sedara2003@yahoo.co.in
Precedence: bulk
X-list: linux-mips

--0-1672399382-1167622372=:57626
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

Hi,
    I would like to port linux-2.6.18 kernel on MIPS24KE processor.
   
  Is MIPS24KE  processor support is avaliable if i take linux-2.6.18 kernel source code from 
  www.linux-mips.org or www.kernel.org
   
  Could you please tell me what are the options should i enable in the kernel menuconfig to build image for MIPS24KE processor.
   
   
  In order to enable cache for MIPS24KE in linux-2.6.18 kernel, Should i enable R4000 or some other options?
   
  Thank you.
   
  Regards,
  Sedara

 Send free SMS to your Friends on Mobile from your Yahoo! Messenger. Download Now! http://messenger.yahoo.com/download.php
--0-1672399382-1167622372=:57626
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

<div>Hi,</div>  <div>&nbsp; I would like to port linux-2.6.18 kernel on MIPS24KE processor.</div>  <div>&nbsp;</div>  <div>Is MIPS24KE&nbsp; processor support is avaliable if i take linux-2.6.18 kernel source code from </div>  <div><A href="http://www.linux-mips.org or www.kernel.org">www.linux-mips.org or www.kernel.org</A></div>  <div>&nbsp;</div>  <div>Could you please tell me what are the options should i enable in the kernel menuconfig to build image for MIPS24KE processor.</div>  <div>&nbsp;</div>  <div>&nbsp;</div>  <div>In order to enable cache for MIPS24KE in linux-2.6.18 kernel, Should i enable R4000 or some other options?</div>  <div>&nbsp;</div>  <div>Thank you.</div>  <div>&nbsp;</div>  <div>Regards,</div>  <div>Sedara</div><p>&#32;Send free SMS to your Friends on Mobile from your Yahoo! Messenger. Download Now! http://messenger.yahoo.com/download.php
--0-1672399382-1167622372=:57626--

From veerasena_b@yahoo.co.in Tue Jan  2 07:04:25 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 02 Jan 2007 07:04:30 +0000 (GMT)
Received: from web8408.mail.in.yahoo.com ([202.43.219.156]:39761 "HELO
	web8408.mail.in.yahoo.com") by ftp.linux-mips.org with SMTP
	id S20039214AbXABHEZ (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 2 Jan 2007 07:04:25 +0000
Received: (qmail 57041 invoked by uid 60001); 2 Jan 2007 07:04:15 -0000
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
  s=s1024; d=yahoo.co.in;
  h=X-YMail-OSG:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID;
  b=sWg6u/oJGP2VR1KHeTXckjUKhHTRsT7nCDTOVGBPONm6krVqL/4zGbMH/KCm0T7xjdFlj/ZJaDODL6KsKYH3G7P4nRT3pHWCxPgsXWQc2nTvbRAiFKnnJPF7+ACXBJAIGmC2U0eH2F8x7HsXQ86J9P0r5AUQkDKM/QAgmzPfSuM=;
X-YMail-OSG: itk0oPkVM1ki95d9946TbF.B1d4bb5ZUBpophv5UVQHLG6anOQTcnw6ADaEqX_1RULiKzXQNNIFAp1Q6pQWULWQswt7T7SWy5MJ2SRcGakx8qjgz32bdhPTF2QOfw.0ToAugsx2FVAPnOrh1Xi7aaMBTAA--
Received: from [61.246.223.98] by web8408.mail.in.yahoo.com via HTTP; Tue, 02 Jan 2007 07:04:15 GMT
Date:	Tue, 2 Jan 2007 07:04:15 +0000 (GMT)
From:	veerasena reddy <veerasena_b@yahoo.co.in>
Subject: problem with starting an application daemon from rcS script in case of lnux-2.6.18 kernel version.
To:	linux-mips <linux-mips@linux-mips.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Message-ID: <201707.54244.qm@web8408.mail.in.yahoo.com>
Return-Path: <veerasena_b@yahoo.co.in>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13532
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: veerasena_b@yahoo.co.in
Precedence: bulk
X-list: linux-mips

Hi,

I wrote a small appication "test_shell" and started
the same as a background process ("test_shell&") from
"rcS" script to print a message "This is to test the
shell for daemon processes" on console for every ten
seconds.

For this, the rcS script contains the below command:
"test_shell &"

I have built two images for the target with the kernel
versions linux-2.6.18 and linux-mips-2.6.12.

In case of linux-mips-2.6.12 i am able to see the
prints on the console.

In case of linux-2.6.18 i am not getting the prints
on the console. if i try "ps" command i am able to see
the process running in the background.

In both kernel versions libraries and shell used are
same.

What could be the reason for this?
Please suggest me some solution for this.

Thanks in advance.

Regards,
veeru.

Send free SMS to your Friends on Mobile from your Yahoo! Messenger. Download Now! http://messenger.yahoo.com/download.php

From lists@nabble.com Tue Jan  2 14:05:59 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 02 Jan 2007 14:06:05 +0000 (GMT)
Received: from www.nabble.com ([72.21.53.35]:17597 "EHLO talk.nabble.com")
	by ftp.linux-mips.org with ESMTP id S28645331AbXABOF7 (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Tue, 2 Jan 2007 14:05:59 +0000
Received: from [72.21.53.38] (helo=jubjub.nabble.com)
	by talk.nabble.com with esmtp (Exim 4.50)
	id 1H1kH5-0002yf-Al
	for linux-mips@linux-mips.org; Tue, 02 Jan 2007 06:05:55 -0800
Message-ID: <8124491.post@talk.nabble.com>
Date:	Tue, 2 Jan 2007 06:05:55 -0800 (PST)
From:	Daniel Laird <danieljlaird@hotmail.com>
To:	linux-mips@linux-mips.org
Subject: Re: [PATCH][respin] pnx8550: fix system timer support
In-Reply-To: <acd2a5930612280820l43639382x1f573386f2752d18@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Nabble-From: danieljlaird@hotmail.com
References: <20061228171405.b1e3eed8.vitalywool@gmail.com> <20061229.011621.05599370.anemo@mba.ocn.ne.jp> <acd2a5930612280820l43639382x1f573386f2752d18@mail.gmail.com>
Return-Path: <lists@nabble.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13533
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: danieljlaird@hotmail.com
Precedence: bulk
X-list: linux-mips



Vitaly Wool-4 wrote:
> 
> On 12/28/06, Atsushi Nemoto <anemo@mba.ocn.ne.jp> wrote:
>>
>> On Thu, 28 Dec 2006 17:14:05 +0300, Vitaly Wool <vitalywool@gmail.com>
>> wrote:
>> > --- linux-mips.git.orig/arch/mips/philips/pnx8550/common/time.c
>> > +++ linux-mips.git/arch/mips/philips/pnx8550/common/time.c
>> > @@ -29,11 +29,22 @@
>> >  #include <asm/hardirq.h>
>> >  #include <asm/div64.h>
>> >  #include <asm/debug.h>
>> > +#include <asm/time.h>
>>
>> As I said before, asm/time.h is already included just before there.
>> Why double inclusion?
>>
>>
> Oh shoot, thanks, this hunk is bogus.
> 
> Vitaly
> 
> 
I have now tried this new patch and am still not having much success and am
still not understanding the patch very well.
First things first, if I do use the line 
clocksource_mips.read = hpt_read; 
It does not compile as this symbol is not in a header file and is a static
struct in arch/mips/kernel/time.c
I can make it not static and extern it from pnx8550/common/time.c is this
how I should do it?

Secondly I look at the logic for the arch/mips/kernel/time.c in the
time_init code
I think we want to follow the else branch (/* We know counter frequency.  Or
we can get it.  */)
In this case it then checks to see if mips_hpt_read is undefined which in
our case it is.
It then defines the mips_hpt_read to be c0_hpt_read

It then also overrides mips_timer_ack to be c0_timer_ack which i think is
wrong as we have already overridden this function in
arch/mips/philips/pnx8550/common/time.c.  (Is this behaviour correct?)

I used the patch and ran the kernel,  It does not work very well, Long Hang
after 
Memory: ......
Very slow behaviour after this.

I tried the following:
else {
    /* We know counter frequency.  Or we can get it.  */
    if (!mips_hpt_read) 
    {
        /* No external high precision timer -- use R4k.  */
	mips_hpt_read = c0_hpt_read;

	if (!mips_timer_state) {
            /* No external timer interrupt -- use R4k.  */
	    mips_hpt_init = c0_hpt_timer_init;
+	    if(!mips_timer_ack)
                mips_timer_ack = c0_timer_ack;
	}
}
This means it uses the mips_timer_ack function defined in
arch/mips/philips/pnx8550/common/time.c 
(mips_timer_ack = timer_ack;)

If I use this patch then the kernel still hangs for a long time at 
Memory: ...... (of the order of 12-14 secs)
It then seems to run at full speed and to a prompt.

In summary:
How do I override clocksource_mips.read properly?
Should mips_timer_ack = c0_timer_ack; be being done even though the board
specific mips_timer_ack = timer_ack; has been done?
Finally there is still the long hang which still looks top be related to
waiting for counter to cycle could ?

Any help with all three would be appreciated but 1 and 2 appear to be more
generic questions whilst 3 is PNX8550 specific (any help  would be
appreciated there as well).

Cheers
Dan




-- 
View this message in context: http://www.nabble.com/-PATCH--respin--pnx8550%3A-fix-system-timer-support-tf2890537.html#a8124491
Sent from the linux-mips main mailing list archive at Nabble.com.


From anemo@mba.ocn.ne.jp Tue Jan  2 16:06:56 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 02 Jan 2007 16:07:01 +0000 (GMT)
Received: from mba.ocn.ne.jp ([210.190.142.172]:21201 "HELO smtp.mba.ocn.ne.jp")
	by ftp.linux-mips.org with SMTP id S28647188AbXABQG4 (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Tue, 2 Jan 2007 16:06:56 +0000
Received: from localhost (p2194-ipad201funabasi.chiba.ocn.ne.jp [222.146.65.194])
	by smtp.mba.ocn.ne.jp (Postfix) with ESMTP
	id 2F77CFABE; Wed,  3 Jan 2007 01:06:51 +0900 (JST)
Date:	Wed, 03 Jan 2007 01:06:50 +0900 (JST)
Message-Id: <20070103.010650.25910215.anemo@mba.ocn.ne.jp>
To:	danieljlaird@hotmail.com
Cc:	linux-mips@linux-mips.org
Subject: Re: [PATCH][respin] pnx8550: fix system timer support
From:	Atsushi Nemoto <anemo@mba.ocn.ne.jp>
In-Reply-To: <8124491.post@talk.nabble.com>
References: <20061229.011621.05599370.anemo@mba.ocn.ne.jp>
	<acd2a5930612280820l43639382x1f573386f2752d18@mail.gmail.com>
	<8124491.post@talk.nabble.com>
X-Fingerprint: 6ACA 1623 39BD 9A94 9B1A  B746 CA77 FE94 2874 D52F
X-Pgp-Public-Key: http://wwwkeys.pgp.net/pks/lookup?op=get&search=0x2874D52F
X-Mailer: Mew version 3.3 on Emacs 21.4 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Return-Path: <anemo@mba.ocn.ne.jp>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13534
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: anemo@mba.ocn.ne.jp
Precedence: bulk
X-list: linux-mips

On Tue, 2 Jan 2007 06:05:55 -0800 (PST), Daniel Laird <danieljlaird@hotmail.com> wrote:
> First things first, if I do use the line 
> clocksource_mips.read = hpt_read; 
> It does not compile as this symbol is not in a header file and is a static
> struct in arch/mips/kernel/time.c
> I can make it not static and extern it from pnx8550/common/time.c is this
> how I should do it?

To fix the build problem, use latest linux-mips.org git-tree or use
2.6.20-rc3 from kernel.org, or import these patches:

http://www.linux-mips.org/git?p=linux.git;a=commit;h=c87b6ebaea034c0e0ce86127870cf1511a307b64
http://www.linux-mips.org/git?p=linux.git;a=commit;h=005985609ff72df3257fde6b29aa9d71342c2a6b

---
Atsushi Nemoto

From lists@nabble.com Tue Jan  2 17:17:38 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 02 Jan 2007 17:17:43 +0000 (GMT)
Received: from www.nabble.com ([72.21.53.35]:2538 "EHLO talk.nabble.com")
	by ftp.linux-mips.org with ESMTP id S28575680AbXABRRi (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Tue, 2 Jan 2007 17:17:38 +0000
Received: from [72.21.53.38] (helo=jubjub.nabble.com)
	by talk.nabble.com with esmtp (Exim 4.50)
	id 1H1nGW-0000to-3K
	for linux-mips@linux-mips.org; Tue, 02 Jan 2007 09:17:32 -0800
Message-ID: <8127168.post@talk.nabble.com>
Date:	Tue, 2 Jan 2007 09:17:32 -0800 (PST)
From:	Daniel Laird <danieljlaird@hotmail.com>
To:	linux-mips@linux-mips.org
Subject: Re: [PATCH][respin] pnx8550: fix system timer support
In-Reply-To: <20070103.010650.25910215.anemo@mba.ocn.ne.jp>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Nabble-From: danieljlaird@hotmail.com
References: <20061228171405.b1e3eed8.vitalywool@gmail.com> <20061229.011621.05599370.anemo@mba.ocn.ne.jp> <acd2a5930612280820l43639382x1f573386f2752d18@mail.gmail.com> <8124491.post@talk.nabble.com> <20070103.010650.25910215.anemo@mba.ocn.ne.jp>
Return-Path: <lists@nabble.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13535
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: danieljlaird@hotmail.com
Precedence: bulk
X-list: linux-mips



Atsushi Nemoto wrote:
> 
> On Tue, 2 Jan 2007 06:05:55 -0800 (PST), Daniel Laird
> <danieljlaird@hotmail.com> wrote:
>> First things first, if I do use the line 
>> clocksource_mips.read = hpt_read; 
>> It does not compile as this symbol is not in a header file and is a
>> static
>> struct in arch/mips/kernel/time.c
>> I can make it not static and extern it from pnx8550/common/time.c is this
>> how I should do it?
> 
> To fix the build problem, use latest linux-mips.org git-tree or use
> 2.6.20-rc3 from kernel.org, or import these patches:
> 
> http://www.linux-mips.org/git?p=linux.git;a=commit;h=c87b6ebaea034c0e0ce86127870cf1511a307b64
> http://www.linux-mips.org/git?p=linux.git;a=commit;h=005985609ff72df3257fde6b29aa9d71342c2a6b
> 
> ---
> Atsushi Nemoto
> 
> 
> 
Thanks, thats the build problem removed, I now have a kernel that builds
properly! (issues 1 and 2 appear to be closed)
Only issue remaining is that I still have a long hang (10 seconds ish) 
after this
Memory: 53540k/57344k available (2156k kernel code, 3744k reserved, 383k
data, 128k init, 0k highmem)
 I am investigating but any help is appreciated...
Dan


-- 
View this message in context: http://www.nabble.com/-PATCH--respin--pnx8550%3A-fix-system-timer-support-tf2890537.html#a8127168
Sent from the linux-mips main mailing list archive at Nabble.com.


From sathesh_edara2003@yahoo.co.in Tue Jan  2 21:08:42 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 02 Jan 2007 21:08:48 +0000 (GMT)
Received: from web7910.mail.in.yahoo.com ([202.86.4.86]:29078 "HELO
	web7910.mail.in.yahoo.com") by ftp.linux-mips.org with SMTP
	id S28646171AbXABVIm (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 2 Jan 2007 21:08:42 +0000
Received: (qmail 40875 invoked by uid 60001); 2 Jan 2007 21:08:35 -0000
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
  s=s1024; d=yahoo.co.in;
  h=X-YMail-OSG:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID;
  b=dk18Wtf3T+ubK36KMsbJMXrU1I9p6esyvGw0GHX5SOZgnkmNYCyTIdvxEbwBsTCxZ1b5jYJQtttoP/PJ1DRONTIQLPdFrfscPlLhjtj3NDr8ExOueKXF9yoaWZ3Yu1LHS/jBXBRCmxsQSaL7i6uEpiT0tE868ga8zbRsh7m9XSg=;
X-YMail-OSG: vHT41woVM1k6bnVqZlPCNKycyoU04f3kbIeVrKFfhr.JlV8WPjT8f_rCZaIr0WJ8eqEjXbdyl6ciQuMl_DrHNq_VlvAnMwkhGRVQze0fg7KmFG2tlTJqM6g0KLkygqLh8GJtloZXaY02cWdsMJQcoXitOQ--
Received: from [206.40.46.114] by web7910.mail.in.yahoo.com via HTTP; Tue, 02 Jan 2007 21:08:35 GMT
Date:	Tue, 2 Jan 2007 21:08:35 +0000 (GMT)
From:	sathesh babu <sathesh_edara2003@yahoo.co.in>
Subject: Running linux-2.6.18 kernel in uncache area
To:	linux-mips@linux-mips.org
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="0-328417631-1167772115=:40204"
Content-Transfer-Encoding: 8bit
Message-ID: <30660.40204.qm@web7910.mail.in.yahoo.com>
Return-Path: <sathesh_edara2003@yahoo.co.in>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13536
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: sathesh_edara2003@yahoo.co.in
Precedence: bulk
X-list: linux-mips

--0-328417631-1167772115=:40204
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

Hi,
    I would like to know is there any configuration option ( using make menuconfig)  to turn off cache in linux-2.6.18 kernel.
   
  Basically i would like to run kernel in uncache area.
   
  I see there is an option in the in the menuconfig under 
  Kernel hacking
               [ ] Run uncached (NEW)
  Sould i need to enable this  option to run in the uncahe area?
   
  Could you please tell me how to disable cache and run the kernel in uncache area.
   
   
   
  Regards,
  Sathesh

 Send free SMS to your Friends on Mobile from your Yahoo! Messenger. Download Now! http://messenger.yahoo.com/download.php
--0-328417631-1167772115=:40204
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

<div>Hi,</div>  <div>&nbsp; I would like to know is there any configuration option ( using make menuconfig) &nbsp;to turn off cache in linux-2.6.18 kernel.</div>  <div>&nbsp;</div>  <div>Basically i would like to run kernel in uncache area.</div>  <div>&nbsp;</div>  <div>I see there is an option in the in the menuconfig under&nbsp;</div>  <div>Kernel hacking</div>  <div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [ ] Run uncached (NEW)</div>  <div>Sould&nbsp;i need to enable this&nbsp; option to run in the uncahe area?</div>  <div>&nbsp;</div>  <div>Could you please tell me how to disable cache and run the kernel in uncache area.</div>  <div>&nbsp;</div>  <div>&nbsp;</div>  <div>&nbsp;</div>  <div>Regards,</div>  <div>Sathesh</div><p>&#32;Send free SMS to your Friends on Mobile from your Yahoo! Messenger. Download Now! http://messenger.yahoo.com/download.php
--0-328417631-1167772115=:40204--

From mlachwani@mvista.com Tue Jan  2 21:22:01 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 02 Jan 2007 21:22:05 +0000 (GMT)
Received: from gateway-1237.mvista.com ([63.81.120.158]:59092 "EHLO
	gateway-1237.mvista.com") by ftp.linux-mips.org with ESMTP
	id S28646200AbXABVWB (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 2 Jan 2007 21:22:01 +0000
Received: from [10.0.0.139] (prometheus.mvista.com [10.0.0.139])
	by hermes.mvista.com (Postfix) with ESMTP
	id 7E8B51C5C1; Tue,  2 Jan 2007 13:21:54 -0800 (PST)
Message-ID: <459ACCF2.5000500@mvista.com>
Date:	Tue, 02 Jan 2007 13:21:54 -0800
From:	mlachwani <mlachwani@mvista.com>
User-Agent: Thunderbird 1.5.0.9 (X11/20061206)
MIME-Version: 1.0
To:	sathesh babu <sathesh_edara2003@yahoo.co.in>
Cc:	linux-mips@linux-mips.org
Subject: Re: Running linux-2.6.18 kernel in uncache area
References: <30660.40204.qm@web7910.mail.in.yahoo.com>
In-Reply-To: <30660.40204.qm@web7910.mail.in.yahoo.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Return-Path: <mlachwani@mvista.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13537
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: mlachwani@mvista.com
Precedence: bulk
X-list: linux-mips

sathesh babu wrote:
> Hi,
>   I would like to know is there any configuration option ( using make 
> menuconfig)  to turn off cache in linux-2.6.18 kernel.
>  
> Basically i would like to run kernel in uncache area.
>  
> I see there is an option in the in the menuconfig under 
> Kernel hacking
>              [ ] Run uncached (NEW)
> Sould i need to enable this  option to run in the uncahe area?
>  
> Could you please tell me how to disable cache and run the kernel in 
> uncache area.
>  
>  
>  
> Regards,
> Sathesh
>
> Send free SMS to your Friends on Mobile from your Yahoo! Messenger. 
> Download Now! http://messenger.yahoo.com/download.php
>
That should be it. Did you try with that option MIPS_UNCACHED enabled?

thanks,
Manish Lachwani

From sathesh_edara2003@yahoo.co.in Wed Jan  3 00:21:14 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 03 Jan 2007 00:21:19 +0000 (GMT)
Received: from web7905.mail.in.yahoo.com ([202.86.4.81]:38555 "HELO
	web7905.mail.in.yahoo.com") by ftp.linux-mips.org with SMTP
	id S28646597AbXACAVO (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Wed, 3 Jan 2007 00:21:14 +0000
Received: (qmail 83987 invoked by uid 60001); 3 Jan 2007 00:21:06 -0000
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
  s=s1024; d=yahoo.co.in;
  h=X-YMail-OSG:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID;
  b=eKvB5M37DTtVxzxHgm26uyI2l5SA3XSdn2Pdp+B/ukOF1ujSpNektYknc+tk4xSkAY8bThpIwzAldpdboe+3LLrLHueQ5vQVvlNdeCCbCWMfKa/ak2O3m/Z+Hwvemnj9kvfflVG2wOviExXcNZodsMbUxl+CTlAsW9aTHNbs3fM=;
X-YMail-OSG: Y.ZplSEVM1nPhaHC6TsrcqjDkxC6faX7XzBMdzeH0UM85mcdDaZfzdoDk61AlztWWhGgWGc8pT.TCKaPphSZsvqUesbOtQ7Twx36TTBvCcVhpYzeBqOyslzljXeb_hrdmCiMtun_Em2EE4U-
Received: from [206.40.46.114] by web7905.mail.in.yahoo.com via HTTP; Wed, 03 Jan 2007 00:21:06 GMT
Date:	Wed, 3 Jan 2007 00:21:06 +0000 (GMT)
From:	sathesh babu <sathesh_edara2003@yahoo.co.in>
Subject: Re: Running linux-2.6.18 kernel in uncache area
To:	mlachwani <mlachwani@mvista.com>
Cc:	linux-mips@linux-mips.org
In-Reply-To: <459ACCF2.5000500@mvista.com>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="0-1963923944-1167783666=:81528"
Content-Transfer-Encoding: 8bit
Message-ID: <506196.81528.qm@web7905.mail.in.yahoo.com>
Return-Path: <sathesh_edara2003@yahoo.co.in>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13538
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: sathesh_edara2003@yahoo.co.in
Precedence: bulk
X-list: linux-mips

--0-1963923944-1167783666=:81528
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

Hi Mlachwani,
   I tried by enabling Uncache option.
  But how do i know kernel runs from the uncache area.
   
  During the boot process , i checked the boot up message and observed that kernel  still calling cache initilization routines.
   
  I did quick test :
    - Read the  10 words of uncached area start from 0xa0800000
   
    - Read the 10 word of cached area start ftom 0x80800000
   
  I checked the contents in the both areas and are same.
   
  That means  cache is not disabled properly.
   
  Is there anyway i can check the kernel is running from cache or uncached area?
   
  Any other options should i enable/disable to run kernel from uncached area.
   
   Regards,
  Sathesh
   
  BOOTUP MESSAGES:
  --------------------------------------------------------------------
Determined physical RAM map:
 memory: 02000000 @ 00000000 (usable)
Initial ramdisk at: 0x80000000 (0 bytes)
Built 1 zonelists.  Total pages: 8192
Kernel command line: root=/dev/mtdblock2 rw rootfstype=jffs2 myfs_start=0xbfA800
00 rootfstype=jffs2
Primary instruction cache 16kB, linesize 32 bytes.
Primary data cache 8kB, linesize 32 bytes.
Fusiv LX4189 CACHES
Synthesized TLB refill handler (17 instructions).
Synthesized TLB load handler fastpath (31 instructions).
Synthesized TLB store handler fastpath (31 instructions).
th (25 instructions).
PID hash table entries: 256 (order: 8, 1024 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 28864k/32768k available (2367k kernel code, 3888k reserved, 401k data, 1
56k init, 0k highmem)
Mount-cache hash table entries: 512
  ---------------------------------------------------------------------
mlachwani <mlachwani@mvista.com> wrote:
  sathesh babu wrote:
> Hi,
> I would like to know is there any configuration option ( using make 
> menuconfig) to turn off cache in linux-2.6.18 kernel.
> 
> Basically i would like to run kernel in uncache area.
> 
> I see there is an option in the in the menuconfig under 
> Kernel hacking
> [ ] Run uncached (NEW)
> Sould i need to enable this option to run in the uncahe area?
> 
> Could you please tell me how to disable cache and run the kernel in 
> uncache area.
> 
> 
> 
> Regards,
> Sathesh
>
> Send free SMS to your Friends on Mobile from your Yahoo! Messenger. 
> Download Now! http://messenger.yahoo.com/download.php
>
That should be it. Did you try with that option MIPS_UNCACHED enabled?

thanks,
Manish Lachwani



 Send free SMS to your Friends on Mobile from your Yahoo! Messenger. Download Now! http://messenger.yahoo.com/download.php
--0-1963923944-1167783666=:81528
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

<div>Hi Mlachwani,</div>  <div>&nbsp;I tried by enabling Uncache option.</div>  <div>But how do i know&nbsp;kernel runs from the uncache area.</div>  <div>&nbsp;</div>  <div>During the boot process , i checked the boot up message&nbsp;and observed that&nbsp;kernel &nbsp;still calling cache initilization routines.</div>  <div>&nbsp;</div>  <div>I did quick test :</div>  <div>&nbsp;&nbsp;- Read the &nbsp;10 words of uncached area start&nbsp;from 0xa0800000</div>  <div>&nbsp;</div>  <div>&nbsp; - Read the 10 word of cached area start ftom 0x80800000</div>  <div>&nbsp;</div>  <div>I checked the contents in the both areas and are same.</div>  <div>&nbsp;</div>  <div>That means&nbsp; cache is not disabled properly.</div>  <div>&nbsp;</div>  <div>Is there anyway i can check the kernel is running from cache or uncached area?</div>  <div>&nbsp;</div>  <div>Any other options should i enable/disable to run kernel from uncached area.</div>  <div>&nbsp;</div>  <div>&nbsp;Regards,</div> 
 <div>Sathesh</div>  <div>&nbsp;</div>  <div>BOOTUP MESSAGES:</div>  <div>--------------------------------------------------------------------<BR>Determined physical RAM map:<BR>&nbsp;memory: 02000000 @ 00000000 (usable)<BR>Initial ramdisk at: 0x80000000 (0 bytes)<BR>Built 1 zonelists.&nbsp; Total pages: 8192<BR>Kernel command line: root=/dev/mtdblock2 rw rootfstype=jffs2 myfs_start=0xbfA800<BR>00 rootfstype=jffs2<BR>Primary instruction cache 16kB, linesize 32 bytes.<BR>Primary data cache 8kB, linesize 32 bytes.<BR>Fusiv LX4189 CACHES<BR>Synthesized TLB refill handler (17 instructions).<BR>Synthesized TLB load handler fastpath (31 instructions).<BR>Synthesized TLB store handler fastpath (31 instructions).<BR>th (25 instructions).<BR>PID hash table entries: 256 (order: 8, 1024 bytes)<BR>Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)<BR>Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)<BR>Memory: 28864k/32768k available (2367k kernel code, 3888k
 reserved, 401k data, 1<BR>56k init, 0k highmem)<BR>Mount-cache hash table entries: 512</div>  <div>---------------------------------------------------------------------<BR><B><I>mlachwani &lt;mlachwani@mvista.com&gt;</I></B> wrote:</div>  <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">sathesh babu wrote:<BR>&gt; Hi,<BR>&gt; I would like to know is there any configuration option ( using make <BR>&gt; menuconfig) to turn off cache in linux-2.6.18 kernel.<BR>&gt; <BR>&gt; Basically i would like to run kernel in uncache area.<BR>&gt; <BR>&gt; I see there is an option in the in the menuconfig under <BR>&gt; Kernel hacking<BR>&gt; [ ] Run uncached (NEW)<BR>&gt; Sould i need to enable this option to run in the uncahe area?<BR>&gt; <BR>&gt; Could you please tell me how to disable cache and run the kernel in <BR>&gt; uncache area.<BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; Regards,<BR>&gt; Sathesh<BR>&gt;<BR>&gt; Send free SMS to your
 Friends on Mobile from your Yahoo! Messenger. <BR>&gt; Download Now! http://messenger.yahoo.com/download.php<BR>&gt;<BR>That should be it. Did you try with that option MIPS_UNCACHED enabled?<BR><BR>thanks,<BR>Manish Lachwani<BR><BR></BLOCKQUOTE><BR><p>&#32;Send free SMS to your Friends on Mobile from your Yahoo! Messenger. Download Now! http://messenger.yahoo.com/download.php
--0-1963923944-1167783666=:81528--

From lists@nabble.com Wed Jan  3 13:37:54 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 03 Jan 2007 13:37:56 +0000 (GMT)
Received: from www.nabble.com ([72.21.53.35]:51639 "EHLO talk.nabble.com")
	by ftp.linux-mips.org with ESMTP id S20045273AbXACNhy (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Wed, 3 Jan 2007 13:37:54 +0000
Received: from [72.21.53.38] (helo=jubjub.nabble.com)
	by talk.nabble.com with esmtp (Exim 4.50)
	id 1H26JN-0001zT-Tt
	for linux-mips@linux-mips.org; Wed, 03 Jan 2007 05:37:45 -0800
Message-ID: <8140851.post@talk.nabble.com>
Date:	Wed, 3 Jan 2007 05:37:45 -0800 (PST)
From:	Daniel Laird <danieljlaird@hotmail.com>
To:	linux-mips@linux-mips.org
Subject: Re: [PATCH][respin] pnx8550: fix system timer support
In-Reply-To: <8127168.post@talk.nabble.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Nabble-From: danieljlaird@hotmail.com
References: <20061228171405.b1e3eed8.vitalywool@gmail.com> <20061229.011621.05599370.anemo@mba.ocn.ne.jp> <acd2a5930612280820l43639382x1f573386f2752d18@mail.gmail.com> <8124491.post@talk.nabble.com> <20070103.010650.25910215.anemo@mba.ocn.ne.jp> <8127168.post@talk.nabble.com>
Return-Path: <lists@nabble.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13539
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: danieljlaird@hotmail.com
Precedence: bulk
X-list: linux-mips



Daniel Laird wrote:
> 
> 
Thanks, thats the build problem removed, I now have a kernel that builds
properly! (issues 1 and 2 appear to be closed)
Only issue remaining is that I still have a long hang (10 seconds ish) 
after this
Memory: 53540k/57344k available (2156k kernel code, 3744k reserved, 383k
data, 128k init, 0k highmem)
 I am investigating but any help is appreciated...
Dan


I have been debugging this and the delay is all due to the calibrate_delay
function.
If I use a preset lpj all works fine (fast start up)
If I let it calculate it using the logic
while ((loops_per_jiffy <<= 1) != 0) {
    /* wait for "start of" clock tick */
	ticks = jiffies;
    while (ticks == jiffies)
	/* nothing */;
    /* Go .. */
    ticks = jiffies;
    __delay(loops_per_jiffy);
    ticks = jiffies - ticks;
    if (ticks)
	break;
}
Then I get the hang so it seems this is the culprit function, however as for
why this is happening I am still debugging
Cheers
Dan
-- 
View this message in context: http://www.nabble.com/-PATCH--respin--pnx8550%3A-fix-system-timer-support-tf2890537.html#a8140851
Sent from the linux-mips main mailing list archive at Nabble.com.


From anemo@mba.ocn.ne.jp Wed Jan  3 13:57:17 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 03 Jan 2007 13:57:20 +0000 (GMT)
Received: from mba.ocn.ne.jp ([210.190.142.172]:65499 "HELO smtp.mba.ocn.ne.jp")
	by ftp.linux-mips.org with SMTP id S28573787AbXACN5R (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Wed, 3 Jan 2007 13:57:17 +0000
Received: from localhost (p3162-ipad31funabasi.chiba.ocn.ne.jp [221.189.127.162])
	by smtp.mba.ocn.ne.jp (Postfix) with ESMTP
	id D49C811C16; Wed,  3 Jan 2007 22:57:13 +0900 (JST)
Date:	Wed, 03 Jan 2007 22:57:13 +0900 (JST)
Message-Id: <20070103.225713.74752439.anemo@mba.ocn.ne.jp>
To:	danieljlaird@hotmail.com
Cc:	linux-mips@linux-mips.org
Subject: Re: [PATCH][respin] pnx8550: fix system timer support
From:	Atsushi Nemoto <anemo@mba.ocn.ne.jp>
In-Reply-To: <8127168.post@talk.nabble.com>
References: <8124491.post@talk.nabble.com>
	<20070103.010650.25910215.anemo@mba.ocn.ne.jp>
	<8127168.post@talk.nabble.com>
X-Fingerprint: 6ACA 1623 39BD 9A94 9B1A  B746 CA77 FE94 2874 D52F
X-Pgp-Public-Key: http://wwwkeys.pgp.net/pks/lookup?op=get&search=0x2874D52F
X-Mailer: Mew version 3.3 on Emacs 21.4 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Return-Path: <anemo@mba.ocn.ne.jp>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13540
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: anemo@mba.ocn.ne.jp
Precedence: bulk
X-list: linux-mips

On Tue, 2 Jan 2007 09:17:32 -0800 (PST), Daniel Laird <danieljlaird@hotmail.com> wrote:
> Thanks, thats the build problem removed, I now have a kernel that builds
> properly! (issues 1 and 2 appear to be closed)
> Only issue remaining is that I still have a long hang (10 seconds ish) 
> after this
> Memory: 53540k/57344k available (2156k kernel code, 3744k reserved, 383k
> data, 128k init, 0k highmem)
>  I am investigating but any help is appreciated...

Does this patch (on top of Vitaly's patch) solve remaining problem?

diff --git a/arch/mips/philips/pnx8550/common/time.c b/arch/mips/philips/pnx8550/common/time.c
index 08ebc3d..9d9fc71 100644
--- a/arch/mips/philips/pnx8550/common/time.c
+++ b/arch/mips/philips/pnx8550/common/time.c
@@ -80,6 +80,7 @@ void pnx8550_time_init(void)
 	 */
 	mips_hpt_frequency = 27UL * ((1000000UL * n)/(m * pow2p));
 	cpj = (mips_hpt_frequency + HZ / 2) / HZ;
+	write_c0_count(0);
 	timer_ack();
 
 	/* Setup Timer 2 */

From lists@nabble.com Wed Jan  3 14:34:17 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 03 Jan 2007 14:34:19 +0000 (GMT)
Received: from www.nabble.com ([72.21.53.35]:19140 "EHLO talk.nabble.com")
	by ftp.linux-mips.org with ESMTP id S28573925AbXACOeR (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Wed, 3 Jan 2007 14:34:17 +0000
Received: from [72.21.53.38] (helo=jubjub.nabble.com)
	by talk.nabble.com with esmtp (Exim 4.50)
	id 1H27C1-0003u9-Up
	for linux-mips@linux-mips.org; Wed, 03 Jan 2007 06:34:13 -0800
Message-ID: <8141727.post@talk.nabble.com>
Date:	Wed, 3 Jan 2007 06:34:13 -0800 (PST)
From:	Daniel Laird <danieljlaird@hotmail.com>
To:	linux-mips@linux-mips.org
Subject: Re: [PATCH][respin] pnx8550: fix system timer support
In-Reply-To: <20070103.225713.74752439.anemo@mba.ocn.ne.jp>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Nabble-From: danieljlaird@hotmail.com
References: <20061228171405.b1e3eed8.vitalywool@gmail.com> <20061229.011621.05599370.anemo@mba.ocn.ne.jp> <acd2a5930612280820l43639382x1f573386f2752d18@mail.gmail.com> <8124491.post@talk.nabble.com> <20070103.010650.25910215.anemo@mba.ocn.ne.jp> <8127168.post@talk.nabble.com> <20070103.225713.74752439.anemo@mba.ocn.ne.jp>
Return-Path: <lists@nabble.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13541
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: danieljlaird@hotmail.com
Precedence: bulk
X-list: linux-mips




Atsushi Nemoto wrote:
> 
> On Tue, 2 Jan 2007 09:17:32 -0800 (PST), Daniel Laird
> <danieljlaird@hotmail.com> wrote:
>> Thanks, thats the build problem removed, I now have a kernel that builds
>> properly! (issues 1 and 2 appear to be closed)
>> Only issue remaining is that I still have a long hang (10 seconds ish) 
>> after this
>> Memory: 53540k/57344k available (2156k kernel code, 3744k reserved, 383k
>> data, 128k init, 0k highmem)
>>  I am investigating but any help is appreciated...
> 
> Does this patch (on top of Vitaly's patch) solve remaining problem?
> 
> diff --git a/arch/mips/philips/pnx8550/common/time.c
> b/arch/mips/philips/pnx8550/common/time.c
> index 08ebc3d..9d9fc71 100644
> --- a/arch/mips/philips/pnx8550/common/time.c
> +++ b/arch/mips/philips/pnx8550/common/time.c
> @@ -80,6 +80,7 @@ void pnx8550_time_init(void)
>  	 */
>  	mips_hpt_frequency = 27UL * ((1000000UL * n)/(m * pow2p));
>  	cpj = (mips_hpt_frequency + HZ / 2) / HZ;
> +	write_c0_count(0);
>  	timer_ack();
>  
>  	/* Setup Timer 2 */
> 

I too caqme to this conclusion and you are correct it does indeed fix the
problem.  The kernel now boots straight through to the prompt.
Thanks
Dan
-- 
View this message in context: http://www.nabble.com/-PATCH--respin--pnx8550%3A-fix-system-timer-support-tf2890537.html#a8141727
Sent from the linux-mips main mailing list archive at Nabble.com.


From hjl@lucon.org Wed Jan  3 20:45:46 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 03 Jan 2007 20:45:52 +0000 (GMT)
Received: from smtp110.sbc.mail.mud.yahoo.com ([68.142.198.209]:54189 "HELO
	smtp110.sbc.mail.mud.yahoo.com") by ftp.linux-mips.org with SMTP
	id S20045564AbXACUpq (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Wed, 3 Jan 2007 20:45:46 +0000
Received: (qmail 71821 invoked from network); 3 Jan 2007 20:45:38 -0000
Received: from unknown (HELO lucon.org) (hjjean@sbcglobal.net@71.146.101.137 with login)
  by smtp110.sbc.mail.mud.yahoo.com with SMTP; 3 Jan 2007 20:45:37 -0000
X-YMail-OSG: 6wtVrEMVM1n2ex35p_8i1EaUbLPF1nkPlnULwXmn3JSgCiP7qzTUArl5BfxFNAem94nlUnT3jisu8RM7kL.o20DD6xNK0GMLMYQHG2vbOSK6QpU6ZogG6PXt380LVNe2hwDUqfYAr2Xe.aA-
Received: by lucon.org (Postfix, from userid 500)
	id A2A4046EEA5; Wed,  3 Jan 2007 12:45:35 -0800 (PST)
Date:	Wed, 3 Jan 2007 12:45:35 -0800
From:	"H. J. Lu" <hjl@lucon.org>
To:	linux-gcc@vger.kernel.org,
	GNU C Library <libc-alpha@sources.redhat.com>,
	gcc@gcc.gnu.org, Mat Hostetter <mat@lcs.mit.edu>,
	Warner Losh <imp@village.org>, linux-mips@linux-mips.org,
	Ralf Baechle <ralf@linux-mips.org>,
	Linas Vepstas <linas@linas.org>, linux-vax@pergamentum.com
Subject: The Linux binutils 2.17.50.0.9 is released
Message-ID: <20070103204535.GA5131@lucon.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.4.2.2i
Return-Path: <hjl@lucon.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13542
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: hjl@lucon.org
Precedence: bulk
X-list: linux-mips

This is the beta release of binutils 2.17.50.0.9 for Linux, which is
based on binutils 2007 0103 in CVS on sourceware.org plus various
changes. It is purely for Linux.

Starting from the 2.17.50.0.4 release, the default output section LMA
(load memory address) has changed for allocatable sections from being
equal to VMA (virtual memory address), to keeping the difference between
LMA and VMA the same as the previous output section in the same region.

For

.data.init_task : { *(.data.init_task) }

LMA of .data.init_task section is equal to its VMA with the old linker.
With the new linker, it depends on the previous output section. You
can use

.data.init_task : AT (ADDR(.data.init_task)) { *(.data.init_task) }

to ensure that LMA of .data.init_task section is always equal to its
VMA. The linker script in the older 2.6 x86-64 kernel depends on the
old behavior.  You can add AT (ADDR(section)) to force LMA of
.data.init_task section equal to its VMA. It will work with both old
and new linkers. The x86-64 kernel linker script in kernel 2.6.13 and
above is OK.

The new x86_64 assembler no longer accepts

	monitor %eax,%ecx,%edx

You should use

	monitor %rax,%ecx,%edx

or
	monitor

which works with both old and new x86_64 assemblers. They should
generate the same opcode.

The new i386/x86_64 assemblers no longer accept instructions for moving
between a segment register and a 32bit memory location, i.e.,

	movl (%eax),%ds
	movl %ds,(%eax)

To generate instructions for moving between a segment register and a
16bit memory location without the 16bit operand size prefix, 0x66,

	mov (%eax),%ds
	mov %ds,(%eax)

should be used. It will work with both new and old assemblers. The
assembler starting from 2.16.90.0.1 will also support

	movw (%eax),%ds
	movw %ds,(%eax)

without the 0x66 prefix. Patches for 2.4 and 2.6 Linux kernels are
available at

http://www.kernel.org/pub/linux/devel/binutils/linux-2.4-seg-4.patch
http://www.kernel.org/pub/linux/devel/binutils/linux-2.6-seg-5.patch

The ia64 assembler is now defaulted to tune for Itanium 2 processors.
To build a kernel for Itanium 1 processors, you will need to add

ifeq ($(CONFIG_ITANIUM),y)
	CFLAGS += -Wa,-mtune=itanium1
	AFLAGS += -Wa,-mtune=itanium1
endif

to arch/ia64/Makefile in your kernel source tree.

Please report any bugs related to binutils 2.17.50.0.9 to hjl@lucon.org

and

http://www.sourceware.org/bugzilla/

If you don't use

# rpmbuild -ta binutils-xx.xx.xx.xx.xx.tar.bz2

to compile the Linux binutils, please read patches/README in source
tree to apply Linux patches if there are any.

Changes from binutils 2.17.50.0.8:

1. Update from binutils 2007 0103.
2. Fix --wrap linker bug.
3. Improve handling ELF binaries generated by foreign ELF linkers.
4. Various ELF M68K bug fixes.
5. Score bug fixes.
6. Don't read past end of archive elements. PR 3704.
7. Improve .eh_frame_hdr section handling.
8. Fix symbol visibility with comdat/linkonce sections in ELF linker.
PR 3666.
9. Fix 4 operand instruction handling in x86 assembler.
10. Properly check the 4th operand in x86 assembler. PR 3712.
11. Fix .cfi_endproc handling in assembler. PR 3607.
12. Various ARM bug fixes.
13. Various PE linker fixes.
14. Improve x86 dissassembler for cmpxchg8b.

Changes from binutils 2.17.50.0.7:

1. Update from binutils 2006 1201.
2. Fix "objcopy --only-keep-debug" crash. PR 3609.
3. Fix various ARM ELF bugs.
4. Fix various xtensa bugs.
5. Update x86 disassembler.

Changes from binutils 2.17.50.0.6:

1. Update from binutils 2006 1127.
2. Properly set ELF output segment address when the first section in
input segment is removed.
3. Better merging of CIEs in linker .eh_frame optimizations.
4. Support .cfi_personality and .cfi_lsda assembler directives.
5. Fix an ARM linker crash. PR 3532.
6. Fix various PPC64 ELF bugs.
7. Mark discarded debug info more thoroughly in linker output.
8. Fix various MIPS ELF bugs.
9. Fix readelf to display program interpreter path > 64 chars. PR 3384.
10. Add support for PowerPC SPU.
11. Properly handle cloned symbols used in relocations in assembler. PR
3469.
12. Update opcode for POPCNT in amdfam10 architecture.

Changes from binutils 2.17.50.0.5:

1. Update from binutils 2006 1020.
2. Don't make debug symbol dynamic. PR 3290.
3. Don't page align empty SHF_ALLOC sections, which leads to very large
executables. PR 3314.
4. Use a different section index for section relative symbols against
removed empty sections.
5. Fix a few ELF EH frame handling bugs.
6. Don't ignore relocation overflow on branches to undefweaks for
x86-64. PR 3283.
7. Rename MNI to SSSE3.
8. Properly append symbol list for --dynamic-list.
lists.
9. Various ARM ELF fixes.
10. Correct 64bit library search path for Linux/x86 linker with 64bit
support.
11. Fix ELF linker to copy OS/PROC specific flags from input section to
output section.
12. Fix DW_FORM_ref_addr handling in linker dwarf reader. PR 3191.
13. Fix ELF indirect symbol handling. PR 3351.
14. Fix PT_GNU_RELRO segment handling for SHF_TLS sections. Don't add
PT_GNU_RELRO segment when there are no relro sections. PR 3281.
15. Various MIPS ELF fixes.
16. Various Sparc ELF fixes.
17. Various Xtensa ELF fixes.

Changes from binutils 2.17.50.0.4:

1. Update from binutils 2006 0927.
2. Fix linker regressions of section address and section relative symbol
with empty output section. PR 3223/3267.
3. Fix "strings -T". PR 3257.
4. Fix "objcopy --only-keep-debug". PR 3262.
5. Add Intell iwmmxt2 support.
6. Fix an x86 disassembler bug. PR 3100.

Changes from binutils 2.17.50.0.3:

1. Update from binutils 2006 0924.
2. Speed up linker on .o files with debug info on linkonce sections.
PR 3111.
3. Added x86-64 PE support.
4. Fix objcopy/strip on .o files with section groups. PR 3181.
5. Fix "ld --hash-style=gnu" crash with gcc 3.4.6. PR 3197.
6. Fix "strip --strip-debug" on .o files generated with
"gcc -feliminate-dwarf2-dups". PR 3186.
7. Fix "ld -r" on .o files generated with "gcc -feliminate-dwarf2-dups".
PR 3249.
8. Add --dynamic-list to linker to make global symbols dynamic.
9. Fix magic number for EFI ia64. PR 3171.
10. Remove PT_NULL segment for "ld -z relro". PR 3015.
11. Make objcopy to perserve the file formats in archive elements.
PR 3110.
12. Optimize x86-64 assembler and fix disassembler for
"add32 mov xx,$eax". PR 3235.
13. Improve linker diagnostics. PR 3107.
14. Fix "ld --sort-section name". PR 3009.
15. Updated an x86 disassembler bug. PR 3000.
16. Various updates for PPC, ARM, MIPS, SH, Xtensa.
17. Added Score support.

Changes from binutils 2.17.50.0.2:

1. Update from binutils 2006 0715.
2. Add --hash-style to ELF linker with DT_GNU_HASH and SHT_GNU_HASH.
3. Fix a visibility bug in ELF linker (PR 2884).
4. Properly fix the i386 TLS linker bug (PR 2513).
5. Add assembler and dissassembler support for Pentium Pro nops.
6. Optimize x86 nops for Pentium Pro and above.
7. Add -march=/-mtune= to x86 assembler.
8. Fix an ELF linker with TLS common symbols.
9. Improve program header allocation in ELF linker.
10. Improve MIPS, M68K and ARM support.
11. Fix an ELF linker crash when reporting alignment change (PR 2735).
12. Remove unused ELF section symbols (PR 2723).
13. Add --localize-hidden to objcopy.
14. Add AMD SSE4a and ABM new instruction support.
15. Properly handle illegal x86 instructions in group 11 (PR 2829).
16. Add "-z max-page-size=" and "-z common-page-size=" to ELF linker.
17. Fix objcopy for .tbss sections.

Changes from binutils 2.17.50.0.1:

1. Update from binutils 2006 0526.
2. Change the x86-64 maximum page size to 2MB.
3. Support --enable-targets=all for 64bit target and host (PR 1485).
4. Properly update CIE/FDE length and align section for .eh_frame
section (PR 2655/2657).
5. Properly handle removed ELF section symbols.
6. Fix an ELF linker regression introduced on 2006-04-21.
7. Fix an segfault in PPC ELF linker (PR 2658).
8. Speed up the ELF linker by caching the result of kept section check.
9. Properly create stabs section for ELF.
10. Preserve ELF program header when copying ELF files.
11. Properly handle ELF SHN_LOPROC/SHN_HIOS when checking section
index (PR 2607).
12. Misc mips updates.
13. Misc arm updates.
14. Misc xtensa updates.
15. Fix an alpha assembler warning (PR 2598).
16. Fix assembler buffer overflow.
17. Properly disassemble sgdt/sidt for x86-64.

Changes from binutils 2.16.91.0.7:

1. Update from binutils 2006 0427.
2. Fix an objcopy regression (PR 2593).
3. Reduce ar memory usage (PR 2467).
4. Allow application specific ELF sections (PR 2537).
5. Fix an i386 TLS linker bug (PR 2513).
6. Speed up ia64 linker by 1300X in some cases (PR 2442).
7. Check illegal immediate register operand in i386 assembler (PR
2533).
8. Fix a strings bug (PR 2584).
9. Better handle corrupted ELF files (PR 2257).
10. Fix a MIPS linker bug (PR 2267).

Changes from binutils 2.16.91.0.6:

1. Update from binutils 2006 0317.
2. Support Intel Merom New Instructions in assembler/disassembler.
3. Support Intel new instructions in Montecito.
4. Fix linker "--as-needed" (PR 2434).
5. Fix linker "-s" regression (PR 2462).
6. Fix REP prefix for string instructions in x86 disassembler
(PR 2428).
7. Fix the weak undefined symbols in PIE (PR 2218).
8. Fix 2 DWARF reader bugs (PRs 2443, 2338).
9. Improve ELF linker error message (PR 2322).
10. Avoid abort with dynamic symbols in >64K sections (PR 2411).
11. Handle mismatched symbol types for executables (PR 2404).
12. Avoid a linker linkonce regression (PR 2342).

Changes from binutils 2.16.91.0.5:

1. Update from binutils 2006 0212.
2. Correct Linux linker search order for DT_NEEDED entries (PR 2290).
3. Fix the x86-64 disassembler for control/debug register moves.
4. Properly handle ELF strip/objcopy with unmodified program header
(PR 2258).
5. Improve ELF linker error handling when there are not enough room for
program headers (PR 2322).
6. Properly handle weak undefined symbols in PIE (PR 2218).
7. Support new i386/x86-64 TLS relocations.
8. Fix addr2line for linux kernel (PR 2096).
9. Fix an assembler memory leak with --statistics.
10. Avoid an ia64 assembler regression (PR 2117).

Changes from binutils 2.16.91.0.4:

1. Update from binutils 2005 1219.
2. Fix a MIPS linker regression (PR 1932).
3. Fix an objcopy bug for ia64 (PR 1991).
4. Fix a linker crash on bad input (PR 2008).
5. Fix 64bit monitor and mwait (PR 1874).

Changes from binutils 2.16.91.0.3:

1. Update from binutils 2005 1111.
2. Fix ELF orphan section handling (PR 1467)
3. Fix ELF section attribute handleing (PR 1487).
4. Fix IA64 unwind info dump for relocatable files. (PR 1436).
5. Add DWARF info dump to objdump.
6. Fix SHF_LINK_ORDER handling (PR 1321).
7. Don't allow "ld --just-symbols" on DSO (PR 1263).
8. Fix a "ld -u" crash on TLS symbol (PR 1301).
9. Fix an IA64 linker crash (PR 1247).
10. Fix a MIPS linker bug (PR 1150).
11. Fix a M68K linker bug (PR 1775).
12. Fix an ELF symbol versioning linker bug (PR 1540).
13. Improve linker error handling (PR 1208).
14. Add new SPARC processors to SunOS for objcopy (PR 1472).
15. Add "@file" to read options from a file.
16. Add assembler weakref support.

Changes from binutils 2.16.91.0.2:

1. Update from binutils 2005 0821.
2. Support x86-64 medium model.
3. Fix "objdump -S --adjust-vma=xxx" (PR 1179).
4. Reduce R_IA64_NONE relocations from R_IA64_LDXMOV relaxation.
5. Fix x86 linker regression for dosemu.
6. Add "readelf -t/--section-details" to display section details.
7. Fix "as -al=file" regression (PR 1118).

Changes from binutils 2.16.91.0.1:

1. Update from binutils 2005 0720.
2. Add Intel VMX support.
3. Add AMD SVME support.
4. Add x86-64 new relocations for medium model.
5. Fix a PIE regression (PR 975).
6. Fix an x86_64 signed 32bit displacement regression.
7. Fix PPC PLT (PR 1004). 
8. Improve empty section removal.

Changes from binutils 2.16.90.0.3:

1. Update from binutils 2005 0622.
2. Fix a linker versioning bug exposed by gcc 4 (PR 1022/1023/1025).
3. Optimize ia64 br->brl relaxation (PR 834).
4. Improve linker empty section removal.
5. Fix DWARF 2 line number reporting (PR 990).
6. Fix DWARF 2 line number reporting regression on assembly file (PR
1000).

Changes from binutils 2.16.90.0.2:

1. Update from binutils 2005 0510.
2. Update ia64 assembler to support comdat group section generated by
gcc 4 (PR 940).
3. Fix a linker crash on bad input (PR 939).
4. Fix a sh64 assembler regression (PR 936).
5. Support linker script on executable (PR 882).
6. Fix the linker -pie regression (PR 878).
7. Fix an x86_64 disassembler bug (PR 843).
8. Fix a PPC linker regression.
9. Misc speed up.

Changes from binutils 2.16.90.0.1:

1. Update from binutils 2005 0429.
2. Fix an ELF linker regression (PR 815).
3. Fix an empty section removal related bug.
4. Fix an ia64 linker regression (PR 855).
5. Don't allow local symbol to be equated common/undefined symbols (PR
857).
6. Fix the ia64 linker to handle local dynamic symbol error reporting.
7. Make non-debugging reference to discarded section an error (PR 858).
8. Support Sparc/TLS.
9. Support rpm build with newer rpm.
10. Fix an alpha linker regression.
11. Fix the non-gcc build regression.

Changes from binutils 2.15.94.0.2.2:

1. Update from binutils 2005 0408.
2. The i386/x86_64 assemblers no longer accept instructions for moving
between a segment register and a 32bit memory location.
3. The x86_64 assembler now allows movq between a segment register and
a 64bit general purpose register.
4. 20x Speed up linker for input files with >64K sections.
5. Properly report ia64 linker relaxation failures.
6. Support tuning ia64 assembler for Itanium 2 processors.
7. Linker will remove empty unused output sections.
8. Add -N to readelf to display full section names.
9. Fix the ia64 linker to support linkonce text sections without unwind
sections.
10. More unwind directive checkings in the ia64 assembler.
11. Speed up linker with wildcard handling.
12. Fix readelf to properly dump .debug_ranges and .debug_loc sections.

Changes from binutils 2.15.94.0.2:

1. Fix greater than 64K section support in linker.
2. Properly handle i386 and x86_64 protected symbols in linker.
3. Fix readelf for LEB128 on 64bit hosts.
4. Speed up readelf for section group process.
5. Include ia64 texinfo pages.
6. Change ia64 assembler to check hint.b for Montecito.
7. Improve relaxation failure report in ia64 linker.
8. Fix ia64 linker to allow relax backward branch in the same section.

Changes from binutils 2.15.94.0.1:

1. Update from binutils 2004 1220.
2. Fix strip for TLS symbol references.

Changes from binutils 2.15.92.0.2:

1. Update from binutils 2004 1121.
2. Put ia64 .ctors/.dtors sections next to small data section for
Intel ia64 compiler.
3. Fix -Bdynamic/-Bstatic handling for linker script.
4. Provide more information on relocation overflow.
5. Add --sort-section to linker.
6. Support icc 8.1 unwind info in readelf.
7. Fix the infinite loop bug on bad input in the ia64 assembler.
8. Fix ia64 SECREL relocation in linker.
9. Fix a section group memory leak in readelf.

Changes from binutils 2.15.91.0.2:

1. Update from binutils 2004 0927.
2. Work around a section header bug in Intel ia64 compiler.
3. Fix an unwind directive bug in the ia64 assembler.
4. Fix various PPC bugs.
5. Update ARM support.
6. Fix an x86-64 linker warning while building Linux kernel.

Changes from binutils 2.15.91.0.1:

1. Update from binutils 2004 0727.
2. Fix the x86_64 linker to prevent non-PIC code in shared library.
3. Fix the ia64 linker to warn the relotable files which can't be
relaxed.
4. Fix the comdat group support. Allow mix single-member comdat group
with linkonce section.
5. Added --add-needed/--no-add-needed options to linker.
6. Fix the SHF_LINK_ORDER support.
7. Fix the ia64 assembler for multiple sections with the same name and
SHT_IA_64_UNWIND sections.
8. Fix the ia64 assembler for merge section and relaxation.

Changes from binutils 2.15.90.0.3:

1. Update from binutils 2004 0527.
2. Fix -x auto option in the ia64 assembler.
3. Add the AR check in the ia64 assembler.
4. Fix the section group support.
5. Add a new -z relro linker option.
6. Fix an exception section placement bug in linker.
7. Add .serialize.data and .serialize.instruction to the ia64
assembler.

Changes from binutils 2.15.90.0.2:

1. Update from binutils 2004 0415.
2. Fix the linker for weak undefined symbol handling.
3. Fix the ELF/Sparc and ELF/Sparc64 linker for statically linking PIC
code.

Changes from binutils 2.15.90.0.1.1:

1. Update from binutils 2004 0412.
2. Add --as-needed/--no-as-needed to linker.
3. Fix -z defs in linker.
4. Always reserve the memory for ia64 dynamic linker.
5. Fix a race condition in ia64 lazy binding.

Changes from binutils 2.15.90.0.1:

1. Fixed an ia64 assembler bug.
2. Install the assembler man page.

Changes from binutils 2.14.90.0.8:

1. Update from binutils 2004 0303.
2. Fixed linker for undefined symbols with non-default visibility.
3. Sped up linker weakdef symbol handling.
4. Fixed mixing ELF32 and ELF64 object files in archive.
5. Added ia64 linker brl optimization.
6. Fixed ia64 linker to disallow invalid dynamic relocations.
7. Fixed DT_TEXTREL handling in ia64 linker.
8. Fixed alignment handling in ia64 assembler.
9. Improved ia64 assembler unwind table handling. 

Changes from binutils 2.14.90.0.7:

1. Update from binutils 2004 0114.
2. Fixed an ia64 assembler unwind table bug. 
3. Better handle IPF linker relaxation overflow.
4. Fixed misc PPC bugs.

Changes from binutils 2.14.90.0.6:

1. Update from binutils 2003 1029.
2. Allow type changes for undefined symbols.
3. Fix EH frame optimization.
4. Fix the check for undefined versioned symbol with wildcard.
5. Support generating code for Itanium.
6. Detect and warn bad symbol index.
7. Update IPF assemebler DV check.

Changes from binutils 2.14.90.0.5:

1. Update from binutils 2003 0820.
2. No longer use section names for ELF section types nor flags.
3. Fix some ELF/IA64 linker bugs.
4. Fix some ELF/ppc bugs.
5. Add archive support to readelf.

Changes from binutils 2.14.90.0.4.1:

1. Update from binutils 2003 0722.
2. Fix an ELF/mips linker bug.
3. Fix an ELF/hpppa linker bug.
4. Fix an ELF/ia64 assembler bug.
5. Fix a linkonce support with C++ debug.
6. A new working C++ demangler.
7. Various alpha, mips, ia64, ... bug fixes.
8. Support for the current gcc and glibc.

Changes from binutils 2.14.90.0.4:
 
1. Fix an ia64 assembler hint@pause bug.
2. Support Intel Prescott New Instructions.

Changes from binutils 2.14.90.0.3:

1. Work around the brain dead libtool.

Changes from binutils 2.14.90.0.2:

1. Update from binutils 2003 0523.
2. Fix 2 ELF visibility bugs.
3. Fix ELF/ppc linker bugs.

Changes from binutils 2.14.90.0.1:

1. Update from binutils 2003 0515.
2. Fix various ELF visibility bugs.
3. Fix some ia64 linker bugs.
4. Add more IAS compatibilities to ia64 assembler.

Changes from binutils 2.13.90.0.20:

1. Update from binutils 2003 0505.
2. Fix various ELF visibility bugs.
3. Fix some ia64 linker bugs.
4. Fix some ia64 assembler bugs.
5. Add some IAS compatibilities to ia64 assembler.
6. Fix ELF common symbol alignment.
7. Fix ELF weak symbol handling.

Changes from binutils 2.13.90.0.18:

1. Update from binutils 2003 0319.
2. Fix an ia64 linker brl relaxation bug.
3. Fix some ELF/ppc linker bugs.

Changes from binutils 2.13.90.0.16:

1. Update from binutils 2003 0121.
2. Fix an ia64 gas bug.
3. Fix some TLS bugs.
4. Fix some ELF/ppc bugs.
5. Fix an ELF/m68k bug.

2. Include /usr/bin/c++filt.
Changes from binutils 2.13.90.0.14:

1. Update from binutils 2002 1126.
2. Include /usr/bin/c++filt.
3. Fix "ld -r" with execption handling.

Changes from binutils 2.13.90.0.10:

1. Update from binutils 2002 1114.
2. Fix ELF/alpha bugs.
3. Fix an ELF/i386 assembler bug.

Changes from binutils 2.13.90.0.4:

1. Update from binutils 2002 1010.
2. More ELF/PPC linker bug fixes.
3. Fix an ELF/alpha linker bug.
4. Fix an ELF/sparc linker bug to support Solaris.
5. More TLS updates.

Changes from binutils 2.13.90.0.3:

1. Update from binutils 2002 0814.
2. Fix symbol versioning bugs for gcc 3.2.
3. Fix mips gas.

Changes from binutils 2.13.90.0.2:

1. Update from binutils 2002 0809.
2. Fix a mips gas compatibility bug.
3. Fix an x86 TLS bfd bug.
4. Fix an x86 PIC gas bug.
5. Improve symbol versioning support.

The file list:

1. binutils-2.17.50.0.9.tar.bz2. Source code.
2. binutils-2.17.50.0.8-2.17.50.0.9.diff.bz2. Patch against the
   previous beta source code.
3. binutils-2.17.50.0.9-1.i386.rpm. IA-32 binary RPM for RedHat EL 4.
4. binutils-2.17.50.0.9-1.ia64.rpm. IA-64 binary RPM for RedHat EL 4.
5. binutils-2.17.50.0.9-1.x86_64.rpm. X64_64 binary RPM for RedHat
   EL 4.

There is no separate source rpm. You can do

# rpmbuild -ta binutils-2.17.50.0.9.tar.bz2

to create both binary and source rpms.

The primary sites for the beta Linux binutils are:

1. http://www.kernel.org/pub/linux/devel/binutils/

Thanks.


H.J. Lu
hjl@lucon.org
01/03/2007

From bunk@stusta.de Thu Jan  4 18:53:03 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 04 Jan 2007 18:53:07 +0000 (GMT)
Received: from emailhub.stusta.mhn.de ([141.84.69.5]:21259 "HELO
	mailout.stusta.mhn.de") by ftp.linux-mips.org with SMTP
	id S28578721AbXADSxD (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Thu, 4 Jan 2007 18:53:03 +0000
Received: (qmail 26897 invoked from network); 4 Jan 2007 18:52:53 -0000
Received: from r063144.stusta.swh.mhn.de (10.150.63.144)
  by mailhub.stusta.mhn.de with SMTP; 4 Jan 2007 18:52:53 -0000
Received: by r063144.stusta.swh.mhn.de (Postfix, from userid 1000)
	id 4D58E11484E; Thu,  4 Jan 2007 19:52:58 +0100 (CET)
Date:	Thu, 4 Jan 2007 19:52:58 +0100
From:	Adrian Bunk <bunk@stusta.de>
To:	ralf@linux-mips.org
Cc:	linux-mips@linux-mips.org, linux-kernel@vger.kernel.org
Subject: [RFC: 2.6 patch] mips: remove the broken BINFMT_IRIX code
Message-ID: <20070104185258.GD20714@stusta.de>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="XWOWbaMNXpFDWE00"
Content-Disposition: inline
User-Agent: Mutt/1.5.13 (2006-08-11)
Return-Path: <bunk@stusta.de>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13543
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: bunk@stusta.de
Precedence: bulk
X-list: linux-mips


--XWOWbaMNXpFDWE00
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

The BINFMT_IRIX code:
- has been marked as BROKEN for more than two years years and
- is still marked as BROKEN.

Code that has been marked as BROKEN for such a long time seem to be 
unlikely to be revived in the forseeable future.

But if anyone wants to ever revive this driver, the code is still
present in the older kernel releases.

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

Due to it's size, the patch is attached compressed.

 arch/mips/Kconfig              |    4 
 arch/mips/kernel/Makefile      |    4 
 arch/mips/kernel/irix5sys.S    | 1041 ----------------
 arch/mips/kernel/irixelf.c     | 1332 --------------------
 arch/mips/kernel/irixinv.c     |   78 -
 arch/mips/kernel/irixioctl.c   |  251 ---
 arch/mips/kernel/irixsig.c     |  880 -------------
 arch/mips/kernel/process.c     |    7 
 arch/mips/kernel/scall32-o32.S |   18 
 arch/mips/kernel/sysirix.c     | 2140 ---------------------------------
 include/asm-mips/signal.h      |    3 
 11 files changed, 5758 deletions(-)



--XWOWbaMNXpFDWE00
Content-Type: application/octet-stream
Content-Disposition: attachment; filename="patch-remove-BINFMT_IRIX.gz"
Content-Transfer-Encoding: base64

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
7Mft91mLt+OT9k9tGr//H/JPCtavVQIA

--XWOWbaMNXpFDWE00--

From mark.e.mason@broadcom.com Thu Jan  4 19:51:44 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 04 Jan 2007 19:51:50 +0000 (GMT)
Received: from mms1.broadcom.com ([216.31.210.17]:61456 "EHLO
	mms1.broadcom.com") by ftp.linux-mips.org with ESMTP
	id S28578857AbXADTvo (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Thu, 4 Jan 2007 19:51:44 +0000
Received: from 10.10.64.154 by mms1.broadcom.com with ESMTP (Broadcom
 SMTP Relay (Email Firewall v6.3.0)); Thu, 04 Jan 2007 11:51:25 -0800
X-Server-Uuid: D7CB97D3-6392-476F-BE46-AB3D6F515C9A
Received: by mail-irva-10.broadcom.com (Postfix, from userid 47) id
 837632AF; Thu, 4 Jan 2007 11:51:25 -0800 (PST)
Received: from mail-irva-8.broadcom.com (mail-irva-8 [10.10.64.221]) by
 mail-irva-10.broadcom.com (Postfix) with ESMTP id 57A622AE for
 <linux-mips@linux-mips.org>; Thu, 4 Jan 2007 11:51:25 -0800 (PST)
Received: from mail-sj1-12.sj.broadcom.com (mail-sj1-12.sj.broadcom.com
 [10.16.128.215]) by mail-irva-8.broadcom.com (MOS 3.7.5a-GA) with ESMTP
 id ESL85375; Thu, 4 Jan 2007 11:51:24 -0800 (PST)
Received: from NT-SJCA-0750.brcm.ad.broadcom.com (nt-sjca-0750
 [10.16.192.220]) by mail-sj1-12.sj.broadcom.com (Postfix) with ESMTP id
 8010E20501 for <linux-mips@linux-mips.org>; Thu, 4 Jan 2007 11:51:24
 -0800 (PST)
Received: from debian.broadcom.com ([10.240.253.68]) by
 NT-SJCA-0750.brcm.ad.broadcom.com with Microsoft
 SMTPSVC(6.0.3790.1830); Thu, 4 Jan 2007 11:51:23 -0800
Received: from mason by debian.broadcom.com with local (Exim 4.50) id
 1H2Ybo-0000iE-NW for linux-mips@linux-mips.org; Thu, 04 Jan 2007
 11:50:40 -0800
Date:	Thu, 4 Jan 2007 11:50:40 -0800
To:	linux-mips@linux-mips.org
Subject: [PATCH] Sync up sibyte headers with master versions
Message-ID: <20070104195040.GA2732@broadcom.com>
MIME-Version: 1.0
User-Agent: Mutt/1.5.9i
From:	"mason" <mason@broadcom.com>
X-OriginalArrivalTime: 04 Jan 2007 19:51:23.0556 (UTC)
 FILETIME=[B6724640:01C73039]
X-WSS-ID: 698385373EK15940771-01-01
Content-Type: text/plain;
 charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: 7bit
Return-Path: <mark.e.mason@broadcom.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13544
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: mason@broadcom.com
Precedence: bulk
X-list: linux-mips

Hello,

Below is a patch to sync up the sibyte-specific header files with the
master versions maintained here at Broadcom.  The master files get
edited directly, and then the derivitative versions for CFE, Linux, etc,
all get generated automatically with the appropriate license, etc.

Because these haven't been synced in a while, some of these are just
whitespace adjustments - please forgive those, but including them now
will make future sync-ups much easier.

The real changes are updates for the 1480 register defintions to support
Z-Bus tracing, and some of the newer MAC features, correcting a few
typos, and providing names for a few additional 11xx based boards.

These were tested against the 2.6.18-rc4 kernel, as the tip doesn't seem
to be working at the moment (ie. yesterday).

Thanks,
Mark

Signed-off-by: Mark Mason <mason@broadcom.com>


diff --git a/include/asm-mips/sibyte/bcm1480_int.h b/include/asm-mips/sibyte/bcm1480_int.h
index 42d4cf0..d8c7460 100644
--- a/include/asm-mips/sibyte/bcm1480_int.h
+++ b/include/asm-mips/sibyte/bcm1480_int.h
@@ -1,22 +1,22 @@
 /*  *********************************************************************
     *  BCM1280/BCM1480 Board Support Package
-    *
+    *  
     *  Interrupt Mapper definitions		File: bcm1480_int.h
-    *
+    *  
     *  This module contains constants for manipulating the
     *  BCM1255/BCM1280/BCM1455/BCM1480's interrupt mapper and
     *  definitions for the interrupt sources.
-    *
+    *  
     *  BCM1480 specification level: 1X55_1X80-UM100-D4 (11/24/03)
-    *
-    *********************************************************************
+    *  
+    *********************************************************************  
     *
     *  Copyright 2000,2001,2002,2003
     *  Broadcom Corporation. All rights reserved.
-    *
-    *  This program is free software; you can redistribute it and/or
-    *  modify it under the terms of the GNU General Public License as
-    *  published by the Free Software Foundation; either version 2 of
+    *  
+    *  This program is free software; you can redistribute it and/or 
+    *  modify it under the terms of the GNU General Public License as 
+    *  published by the Free Software Foundation; either version 2 of 
     *  the License, or (at your option) any later version.
     *
     *  This program is distributed in the hope that it will be useful,
@@ -26,7 +26,7 @@
     *
     *  You should have received a copy of the GNU General Public License
     *  along with this program; if not, write to the Free Software
-    *  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+    *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
     *  MA 02111-1307 USA
     ********************************************************************* */
 
@@ -51,9 +51,9 @@ #include "sb1250_defs.h"
  * register.
  */
 
-/*
+/* 
  * This entire file uses _BCM1480_ in all the symbols because it is
- * entirely BCM1480 specific.
+ * entirely BCM1480 specific.  
  */
 
 /*
diff --git a/include/asm-mips/sibyte/bcm1480_l2c.h b/include/asm-mips/sibyte/bcm1480_l2c.h
index 886b099..35c6721 100644
--- a/include/asm-mips/sibyte/bcm1480_l2c.h
+++ b/include/asm-mips/sibyte/bcm1480_l2c.h
@@ -1,21 +1,21 @@
 /*  *********************************************************************
     *  BCM1280/BCM1480 Board Support Package
-    *
+    *  
     *  L2 Cache constants and macros		File: bcm1480_l2c.h
-    *
+    *  
     *  This module contains constants useful for manipulating the
     *  level 2 cache.
-    *
+    *  
     *  BCM1400 specification level:  1280-UM100-D2 (11/14/03)
-    *
-    *********************************************************************
+    *  
+    *********************************************************************  
     *
     *  Copyright 2000,2001,2002,2003
     *  Broadcom Corporation. All rights reserved.
-    *
-    *  This program is free software; you can redistribute it and/or
-    *  modify it under the terms of the GNU General Public License as
-    *  published by the Free Software Foundation; either version 2 of
+    *  
+    *  This program is free software; you can redistribute it and/or 
+    *  modify it under the terms of the GNU General Public License as 
+    *  published by the Free Software Foundation; either version 2 of 
     *  the License, or (at your option) any later version.
     *
     *  This program is distributed in the hope that it will be useful,
@@ -25,7 +25,7 @@
     *
     *  You should have received a copy of the GNU General Public License
     *  along with this program; if not, write to the Free Software
-    *  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+    *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
     *  MA 02111-1307 USA
     ********************************************************************* */
 
diff --git a/include/asm-mips/sibyte/bcm1480_mc.h b/include/asm-mips/sibyte/bcm1480_mc.h
index 6bdc941..4e50cd4 100644
--- a/include/asm-mips/sibyte/bcm1480_mc.h
+++ b/include/asm-mips/sibyte/bcm1480_mc.h
@@ -1,21 +1,21 @@
 /*  *********************************************************************
     *  BCM1280/BCM1480 Board Support Package
-    *
-    *  Memory Controller constants              File: bcm1480_mc.h
-    *
+    *  
+    *  Memory Controller constants              File: bcm1480_mc.h       
+    *  
     *  This module contains constants and macros useful for
     *  programming the memory controller.
-    *
+    *  
     *  BCM1400 specification level:  1280-UM100-D1 (11/14/03 Review Copy)
-    *
-    *********************************************************************
+    *  
+    *********************************************************************  
     *
     *  Copyright 2000,2001,2002,2003
     *  Broadcom Corporation. All rights reserved.
-    *
-    *  This program is free software; you can redistribute it and/or
-    *  modify it under the terms of the GNU General Public License as
-    *  published by the Free Software Foundation; either version 2 of
+    *  
+    *  This program is free software; you can redistribute it and/or 
+    *  modify it under the terms of the GNU General Public License as 
+    *  published by the Free Software Foundation; either version 2 of 
     *  the License, or (at your option) any later version.
     *
     *  This program is distributed in the hope that it will be useful,
@@ -25,7 +25,7 @@
     *
     *  You should have received a copy of the GNU General Public License
     *  along with this program; if not, write to the Free Software
-    *  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+    *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
     *  MA 02111-1307 USA
     ********************************************************************* */
 
@@ -74,7 +74,7 @@ #define K_BCM1480_MC_CS0123_MODE	    0x0
 #define K_BCM1480_MC_CS0246_MODE	    0x55
 #define K_BCM1480_MC_CS0145_MODE	    0x33
 #define K_BCM1480_MC_CS0167_MODE	    0xC3
-#define K_BCM1480_MC_CSFULL_MODE	    0xFF
+#define K_BCM1480_MC_CSFULL_MODE	    0xFF	
 
 /*
  * Chip Select Start Address Register (Table 82)
@@ -207,7 +207,7 @@ #define M_BCM1480_MC_ROW14              
 #define V_BCM1480_MC_ROW14(x)               _SB_MAKEVALUE(x,S_BCM1480_MC_ROW14)
 #define G_BCM1480_MC_ROW14(x)               _SB_GETVALUE(x,S_BCM1480_MC_ROW14,M_BCM1480_MC_ROW14)
 
-#define K_BCM1480_MC_ROWX_BIT_SPACING  	    8
+#define K_BCM1480_MC_ROWX_BIT_SPACING  	    8			
 
 /*
  * Column Address Bit Select Register 0 (Table 86)
@@ -289,7 +289,7 @@ #define M_BCM1480_MC_COL14              
 #define V_BCM1480_MC_COL14(x)               _SB_MAKEVALUE(x,S_BCM1480_MC_COL14)
 #define G_BCM1480_MC_COL14(x)               _SB_GETVALUE(x,S_BCM1480_MC_COL14,M_BCM1480_MC_COL14)
 
-#define K_BCM1480_MC_COLX_BIT_SPACING  	    8
+#define K_BCM1480_MC_COLX_BIT_SPACING  	    8			
 
 /*
  * CS0 and CS1 Bank Address Bit Select Register (Table 88)
@@ -410,14 +410,16 @@ #define K_BCM1480_MC_DRAM_TYPE_FCRAM    
 
 #if SIBYTE_HDR_FEATURE(1480, PASS2)
 #define K_BCM1480_MC_DRAM_TYPE_DDR2	    2
-#endif
+#endif			
+
+#define K_BCM1480_MC_DRAM_TYPE_DDR2_PASS1   0	
 
 #define V_BCM1480_MC_DRAM_TYPE_JEDEC        V_BCM1480_MC_DRAM_TYPE(K_BCM1480_MC_DRAM_TYPE_JEDEC)
 #define V_BCM1480_MC_DRAM_TYPE_FCRAM        V_BCM1480_MC_DRAM_TYPE(K_BCM1480_MC_DRAM_TYPE_FCRAM)
 
 #if SIBYTE_HDR_FEATURE(1480, PASS2)
 #define V_BCM1480_MC_DRAM_TYPE_DDR2	    V_BCM1480_MC_DRAM_TYPE(K_BCM1480_MC_DRAM_TYPE_DDR2)
-#endif
+#endif 
 
 #define M_BCM1480_MC_GANGED                 _SB_MAKEMASK1(36)
 #define M_BCM1480_MC_BY9_INTF               _SB_MAKEMASK1(37)
@@ -438,10 +440,10 @@ #define V_BCM1480_MC_PG_POLICY_CAS_TIME_
 #if SIBYTE_HDR_FEATURE(1480, PASS2)
 #define M_BCM1480_MC_2T_CMD		    _SB_MAKEMASK1(42)
 #define M_BCM1480_MC_ECC_COR_DIS	    _SB_MAKEMASK1(43)
-#endif
+#endif	
 
 #define V_BCM1480_MC_DRAMMODE_DEFAULT	V_BCM1480_MC_EMODE_DEFAULT | V_BCM1480_MC_MODE_DEFAULT | V_BCM1480_MC_DRAM_TYPE_JEDEC | \
-                                V_BCM1480_MC_PG_POLICY(K_BCM1480_MC_PG_POLICY_CAS_TIME_CHK)
+                                V_BCM1480_MC_PG_POLICY(K_BCM1480_MC_PG_POLICY_CAS_TIME_CHK) 
 
 /*
  * Memory Clock Configuration Register (Table 92)
@@ -460,7 +462,7 @@ #define V_BCM1480_MC_REF_RATE(x)        
 #define G_BCM1480_MC_REF_RATE(x)            _SB_GETVALUE(x,S_BCM1480_MC_REF_RATE,M_BCM1480_MC_REF_RATE)
 
 #define K_BCM1480_MC_REF_RATE_100MHz        0x31
-#define K_BCM1480_MC_REF_RATE_200MHz        0x62
+#define K_BCM1480_MC_REF_RATE_200MHz        0x62 
 #define K_BCM1480_MC_REF_RATE_400MHz        0xC4
 
 #define V_BCM1480_MC_REF_RATE_100MHz        V_BCM1480_MC_REF_RATE(K_BCM1480_MC_REF_RATE_100MHz)
@@ -511,6 +513,22 @@ #define M_BCM1480_MC_WR_ODT6_CS4	    _SB
 #define M_BCM1480_MC_WR_ODT6_CS6	    _SB_MAKEMASK1(31)
 
 #define M_BCM1480_MC_CS_ODD_ODT_EN	    _SB_MAKEMASK1(32)
+
+#define S_BCM1480_MC_ODT0	            0
+#define M_BCM1480_MC_ODT0		    _SB_MAKEMASK(8,S_BCM1480_MC_ODT0)
+#define V_BCM1480_MC_ODT0(x)		    _SB_MAKEVALUE(x,S_BCM1480_MC_ODT0)
+		    
+#define S_BCM1480_MC_ODT2	            8
+#define M_BCM1480_MC_ODT2		    _SB_MAKEMASK(8,S_BCM1480_MC_ODT2)
+#define V_BCM1480_MC_ODT2(x)		    _SB_MAKEVALUE(x,S_BCM1480_MC_ODT2)
+
+#define S_BCM1480_MC_ODT4	            16
+#define M_BCM1480_MC_ODT4		    _SB_MAKEMASK(8,S_BCM1480_MC_ODT4)
+#define V_BCM1480_MC_ODT4(x)		    _SB_MAKEVALUE(x,S_BCM1480_MC_ODT4)
+
+#define S_BCM1480_MC_ODT6	            24
+#define M_BCM1480_MC_ODT6		    _SB_MAKEMASK(8,S_BCM1480_MC_ODT6)
+#define V_BCM1480_MC_ODT6(x)		    _SB_MAKEVALUE(x,S_BCM1480_MC_ODT6)
 #endif
 
 /*
@@ -588,11 +606,11 @@ #define	M_BCM1480_MC_DLL_REGBYPASS      
 #define	M_BCM1480_MC_DQO_SHIFT            _SB_MAKEMASK1(47)
 #endif
 
-#define S_BCM1480_MC_DLL_DEFAULT            48
-#define M_BCM1480_MC_DLL_DEFAULT            _SB_MAKEMASK(6,S_BCM1480_MC_DLL_DEFAULT)
-#define V_BCM1480_MC_DLL_DEFAULT(x)         _SB_MAKEVALUE(x,S_BCM1480_MC_DLL_DEFAULT)
-#define G_BCM1480_MC_DLL_DEFAULT(x)         _SB_GETVALUE(x,S_BCM1480_MC_DLL_DEFAULT,M_BCM1480_MC_DLL_DEFAULT)
-#define V_BCM1480_MC_DLL_DEFAULT_DEFAULT    V_BCM1480_MC_DLL_DEFAULT(0x10)
+#define S_BCM1480_MC_DLL_DEFAULT           48
+#define M_BCM1480_MC_DLL_DEFAULT           _SB_MAKEMASK(6,S_BCM1480_MC_DLL_DEFAULT)
+#define V_BCM1480_MC_DLL_DEFAULT(x)        _SB_MAKEVALUE(x,S_BCM1480_MC_DLL_DEFAULT)
+#define G_BCM1480_MC_DLL_DEFAULT(x)        _SB_GETVALUE(x,S_BCM1480_MC_DLL_DEFAULT,M_BCM1480_MC_DLL_DEFAULT)
+#define V_BCM1480_MC_DLL_DEFAULT_DEFAULT   V_BCM1480_MC_DLL_DEFAULT(0x10)
 
 #if SIBYTE_HDR_FEATURE(1480, PASS2)
 #define S_BCM1480_MC_DLL_REGCTRL	  54
diff --git a/include/asm-mips/sibyte/bcm1480_regs.h b/include/asm-mips/sibyte/bcm1480_regs.h
index c2dd2fe..4aff386 100644
--- a/include/asm-mips/sibyte/bcm1480_regs.h
+++ b/include/asm-mips/sibyte/bcm1480_regs.h
@@ -2,20 +2,20 @@
     *  BCM1255/BCM1280/BCM1455/BCM1480 Board Support Package
     *
     *  Register Definitions                     File: bcm1480_regs.h
-    *
+    *  
     *  This module contains the addresses of the on-chip peripherals
     *  on the BCM1280 and BCM1480.
-    *
+    *  
     *  BCM1480 specification level:  1X55_1X80-UM100-D4 (11/24/03)
-    *
-    *********************************************************************
+    *  
+    *********************************************************************  
     *
     *  Copyright 2000,2001,2002,2003
     *  Broadcom Corporation. All rights reserved.
-    *
-    *  This program is free software; you can redistribute it and/or
-    *  modify it under the terms of the GNU General Public License as
-    *  published by the Free Software Foundation; either version 2 of
+    *  
+    *  This program is free software; you can redistribute it and/or 
+    *  modify it under the terms of the GNU General Public License as 
+    *  published by the Free Software Foundation; either version 2 of 
     *  the License, or (at your option) any later version.
     *
     *  This program is distributed in the hope that it will be useful,
@@ -25,7 +25,7 @@
     *
     *  You should have received a copy of the GNU General Public License
     *  along with this program; if not, write to the Free Software
-    *  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+    *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
     *  MA 02111-1307 USA
     ********************************************************************* */
 
@@ -44,7 +44,7 @@ #include "sb1250_regs.h"
 
 /*  *********************************************************************
     *  Some general notes:
-    *
+    *  
     *  Register addresses are grouped by function and follow the order
     *  of the User Manual.
     *
@@ -53,7 +53,7 @@ #include "sb1250_regs.h"
     *  offsets from the base of each peripheral.  For example,
     *  the MAC registers are described as offsets from the first
     *  MAC register, and there will be a MAC_REGISTER() macro
-    *  to calculate the base address of a given MAC.
+    *  to calculate the base address of a given MAC.  
     *
     *  The information in this file is based on the BCM1X55/BCM1X80
     *  User Manual, Document 1X55_1X80-UM100-R, 22/12/03.
@@ -62,21 +62,21 @@ #include "sb1250_regs.h"
     *  BCM1250 and the new BCM1480 (and derivatives) share many common
     *  features, this file contains only what's new or changed from
     *  the 1250.  (above, you can see that we include the 1250 symbols
-    *  to get the base functionality).
+    *  to get the base functionality).  
     *
-    *  In software, be sure to use the correct symbols, particularly
+    *  In software, be sure to use the correct symbols, particularly 
     *  for blocks that are different between the two chip families.
     *  All BCM1480-specific symbols have _BCM1480_ in their names,
-    *  and all BCM1250-specific and "base" functions that are common in
+    *  and all BCM1250-specific and "base" functions that are common in 
     *  both chips have no special names (this is for compatibility with
     *  older include files).  Therefore, if you're working with the
     *  SCD, which is very different on each chip, A_SCD_xxx implies
     *  the BCM1250 version and A_BCM1480_SCD_xxx implies the BCM1480
-    *  version.
+    *  version.  
     ********************************************************************* */
 
 
-/*  *********************************************************************
+/*  ********************************************************************* 
     * Memory Controller Registers (Section 6)
     ********************************************************************* */
 
@@ -136,7 +136,7 @@ #define A_BCM1480_MC_GLB_ECC_ADDR       
 #define A_BCM1480_MC_GLB_ECC_CORRECT        0x0010054180
 #define A_BCM1480_MC_GLB_PERF_CNT_CONTROL   0x00100541A0
 
-/*  *********************************************************************
+/*  ********************************************************************* 
     * L2 Cache Control Registers (Section 5)
     ********************************************************************* */
 
@@ -168,7 +168,7 @@ #define A_BCM1480_L2_BANK_ADDRESS(b)    
 #define A_BCM1480_L2_MGMT_TAG_BASE          0x00D0000000
 
 
-/*  *********************************************************************
+/*  ********************************************************************* 
     * PCI-X Interface Registers (Section 7)
     ********************************************************************* */
 
@@ -179,7 +179,7 @@ #define A_BCM1480_PCI_DLL               
 
 #define A_BCM1480_PCI_TYPE00_HEADER         0x002E000000
 
-/*  *********************************************************************
+/*  ********************************************************************* 
     * Ethernet MAC Registers (Section 11) and DMA Registers (Section 10.6)
     ********************************************************************* */
 
@@ -201,7 +201,7 @@ #define R_MAC_DMA_OODPKTLOST        R_BC
 #endif
 
 
-/*  *********************************************************************
+/*  ********************************************************************* 
     * DUART Registers (Section 14)
     ********************************************************************* */
 
@@ -274,14 +274,14 @@ #define A_BCM1480_DUART_INPORT_CHNG_C   
 #define A_BCM1480_DUART_INPORT_CHNG_D       0x00100606E0
 
 
-/*  *********************************************************************
+/*  ********************************************************************* 
     * Generic Bus Registers (Section 15) and PCMCIA Registers (Section 16)
     ********************************************************************* */
 
 #define A_BCM1480_IO_PCMCIA_CFG_B	0x0010061A58
 #define A_BCM1480_IO_PCMCIA_STATUS_B	0x0010061A68
 
-/*  *********************************************************************
+/*  ********************************************************************* 
     * GPIO Registers (Section 17)
     ********************************************************************* */
 
@@ -293,13 +293,13 @@ #define R_BCM1480_GPIO_INT_ADD_TYPE     
 #define A_GPIO_INT_ADD_TYPE	A_BCM1480_GPIO_INT_ADD_TYPE
 #define R_GPIO_INT_ADD_TYPE	R_BCM1480_GPIO_INT_ADD_TYPE
 
-/*  *********************************************************************
+/*  ********************************************************************* 
     * SMBus Registers (Section 18)
     ********************************************************************* */
 
 /* No changes from BCM1250 */
 
-/*  *********************************************************************
+/*  ********************************************************************* 
     * Timer Registers (Sections 4.6)
     ********************************************************************* */
 
@@ -332,7 +332,7 @@ #define A_BCM1480_SCD_ZBBUS_CYCLE_CP1   
 #define A_BCM1480_SCD_ZBBUS_CYCLE_CP2           0x0010020C10
 #define A_BCM1480_SCD_ZBBUS_CYCLE_CP3           0x0010020C18
 
-/*  *********************************************************************
+/*  ********************************************************************* 
     * System Control Registers (Section 4.2)
     ********************************************************************* */
 
@@ -340,13 +340,13 @@ #define A_BCM1480_SCD_ZBBUS_CYCLE_CP3   
 
 #define A_BCM1480_SCD_SCRATCH	 	0x100200A0
 
-/*  *********************************************************************
+/*  ********************************************************************* 
     * System Address Trap Registers (Section 4.9)
     ********************************************************************* */
 
 /* No changes from BCM1250 */
 
-/*  *********************************************************************
+/*  ********************************************************************* 
     * System Interrupt Mapper Registers (Sections 4.3-4.5)
     ********************************************************************* */
 
@@ -404,7 +404,7 @@ #define A_BCM1480_IMR_ALIAS_MAILBOX_REGI
 #define R_BCM1480_IMR_ALIAS_MAILBOX_0           0x0000		/* 0x0x0 */
 #define R_BCM1480_IMR_ALIAS_MAILBOX_0_SET       0x0008		/* 0x0x8 */
 
-/*  *********************************************************************
+/*  ********************************************************************* 
     * System Performance Counter Registers (Section 4.7)
     ********************************************************************* */
 
@@ -428,7 +428,7 @@ #define A_BCM1480_SCD_PERF_CNT_5        
 #define A_BCM1480_SCD_PERF_CNT_6            0x0010020500
 #define A_BCM1480_SCD_PERF_CNT_7            0x0010020508
 
-/*  *********************************************************************
+/*  ********************************************************************* 
     * System Bus Watcher Registers (Section 4.8)
     ********************************************************************* */
 
@@ -437,26 +437,26 @@ #define A_BCM1480_SCD_PERF_CNT_7        
 
 #define A_BCM1480_BUS_ERR_STATUS_DEBUG      0x00100208D8
 
-/*  *********************************************************************
+/*  ********************************************************************* 
     * System Debug Controller Registers (Section 19)
     ********************************************************************* */
 
 /* Same as 1250 */
 
-/*  *********************************************************************
+/*  ********************************************************************* 
     * System Trace Unit Registers (Sections 4.10)
     ********************************************************************* */
 
 /* Same as 1250 */
 
-/*  *********************************************************************
+/*  ********************************************************************* 
     * Data Mover DMA Registers (Section 10.7)
     ********************************************************************* */
 
 /* Same as 1250 */
 
 
-/*  *********************************************************************
+/*  ********************************************************************* 
     * HyperTransport Interface Registers (Section 8)
     ********************************************************************* */
 
@@ -470,7 +470,7 @@ #define A_BCM1480_HT_PORT2_HEADER       
 #define A_BCM1480_HT_TYPE00_HEADER         0x00FE002000
 
 
-/*  *********************************************************************
+/*  ********************************************************************* 
     * Node Controller Registers (Section 9)
     ********************************************************************* */
 
@@ -507,7 +507,7 @@ #define A_BCM1480_NC_SR_TIMEOUT_COUNTER 
 #define A_BCM1480_NC_SR_TIMEOUT_COUNTER_SEL 0x00DFBE0080
 
 
-/*  *********************************************************************
+/*  ********************************************************************* 
     * H&R Block Configuration Registers (Section 12.4)
     ********************************************************************* */
 
@@ -551,7 +551,7 @@ #define R_BCM1480_HR_RT_WORD(idx)       
 
 
 /* checked to here - ehs */
-/*  *********************************************************************
+/*  ********************************************************************* 
     * Packet Manager DMA Registers (Section 12.5)
     ********************************************************************* */
 
@@ -678,7 +678,7 @@ #define A_BCM1480_SWTRC_MATCH_TAG_MASK(x
 
 
 
-/*  *********************************************************************
+/*  ********************************************************************* 
     *  High-Speed Port Registers (Section 13)
     ********************************************************************* */
 
diff --git a/include/asm-mips/sibyte/bcm1480_scd.h b/include/asm-mips/sibyte/bcm1480_scd.h
index 648bed9..1edde6e 100644
--- a/include/asm-mips/sibyte/bcm1480_scd.h
+++ b/include/asm-mips/sibyte/bcm1480_scd.h
@@ -1,21 +1,21 @@
 /*  *********************************************************************
     *  BCM1280/BCM1400 Board Support Package
-    *
+    *  
     *  SCD Constants and Macros                     File: bcm1480_scd.h
-    *
+    *  
     *  This module contains constants and macros useful for
     *  manipulating the System Control and Debug module.
-    *
+    *  
     *  BCM1400 specification level: 1X55_1X80-UM100-R (12/18/03)
-    *
-    *********************************************************************
+    *  
+    *********************************************************************  
     *
     *  Copyright 2000,2001,2002,2003
     *  Broadcom Corporation. All rights reserved.
-    *
-    *  This program is free software; you can redistribute it and/or
-    *  modify it under the terms of the GNU General Public License as
-    *  published by the Free Software Foundation; either version 2 of
+    *  
+    *  This program is free software; you can redistribute it and/or 
+    *  modify it under the terms of the GNU General Public License as 
+    *  published by the Free Software Foundation; either version 2 of 
     *  the License, or (at your option) any later version.
     *
     *  This program is distributed in the hope that it will be useful,
@@ -25,7 +25,7 @@
     *
     *  You should have received a copy of the GNU General Public License
     *  along with this program; if not, write to the Free Software
-    *  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+    *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
     *  MA 02111-1307 USA
     ********************************************************************* */
 
@@ -42,22 +42,22 @@ #include "sb1250_scd.h"
 
 /*  *********************************************************************
     *  Some general notes:
-    *
+    *  
     *  This file is basically a "what's new" header file.  Since the
     *  BCM1250 and the new BCM1480 (and derivatives) share many common
     *  features, this file contains only what's new or changed from
     *  the 1250.  (above, you can see that we include the 1250 symbols
-    *  to get the base functionality).
+    *  to get the base functionality).  
     *
-    *  In software, be sure to use the correct symbols, particularly
+    *  In software, be sure to use the correct symbols, particularly 
     *  for blocks that are different between the two chip families.
     *  All BCM1480-specific symbols have _BCM1480_ in their names,
-    *  and all BCM1250-specific and "base" functions that are common in
+    *  and all BCM1250-specific and "base" functions that are common in 
     *  both chips have no special names (this is for compatibility with
     *  older include files).  Therefore, if you're working with the
     *  SCD, which is very different on each chip, A_SCD_xxx implies
     *  the BCM1250 version and A_BCM1480_SCD_xxx implies the BCM1480
-    *  version.
+    *  version.  
     ********************************************************************* */
 
 /*  *********************************************************************
@@ -71,13 +71,14 @@ #include "sb1250_scd.h"
  */
 
 /*
- * New part definitions
+ * New part definitions 
  */
 
 #define K_SYS_PART_BCM1480          0x1406
 #define K_SYS_PART_BCM1280          0x1206
 #define K_SYS_PART_BCM1455          0x1407
 #define K_SYS_PART_BCM1255          0x1257
+#define K_SYS_PART_BCM1158          0x1156
 
 /*
  * Manufacturing Information Register (Table 14)
@@ -87,7 +88,7 @@ #define K_SYS_PART_BCM1255          0x12
 /*
  * System Configuration Register (Table 15)
  * Register: SCD_SYSTEM_CFG
- * Entire register is different from 1250, all new constants below
+ * Entire register is different from 1250, all new constants below 
  */
 
 #define M_BCM1480_SYS_RESERVED0             _SB_MAKEMASK1(0)
@@ -180,7 +181,7 @@ #define M_BCM1480_SYS_SW_FLAG           
 /*
  * Watchdog Timer Initial Count Registers (Table 23)
  * Registers: SCD_WDOG_INIT_CNT_x
- *
+ * 
  * The watchdogs are almost the same as the 1250, except
  * the configuration register has more bits to control the
  * other CPUs.
@@ -221,7 +222,7 @@ #define M_BCM1480_SCD_WDOG_HAS_RESET    
 /*
  * ZBbus Count Register (Table 29)
  * Register: ZBBUS_CYCLE_COUNT
- *
+ * 
  * Same as BCM1250
  */
 
@@ -237,49 +238,30 @@ #define M_BCM1480_SCD_WDOG_HAS_RESET    
  * System Performance Counter Configuration Register (Table 31)
  * Register: PERF_CNT_CFG_0
  *
- * Since the clear/enable bits are moved compared to the
- * 1250 and there are more fields, this register will be BCM1480 specific.
+ * SPC_CFG_SRC[0-3] is the same as the 1250.
+ * SPC_CFG_SRC[4-7] only exist on the 1480
+ * The clear/enable bits are in different locations on the 1250 and 1480.
  */
 
-#define S_BCM1480_SPC_CFG_SRC0              0
-#define M_BCM1480_SPC_CFG_SRC0              _SB_MAKEMASK(8,S_BCM1480_SPC_CFG_SRC0)
-#define V_BCM1480_SPC_CFG_SRC0(x)           _SB_MAKEVALUE(x,S_BCM1480_SPC_CFG_SRC0)
-#define G_BCM1480_SPC_CFG_SRC0(x)           _SB_GETVALUE(x,S_BCM1480_SPC_CFG_SRC0,M_BCM1480_SPC_CFG_SRC0)
-
-#define S_BCM1480_SPC_CFG_SRC1              8
-#define M_BCM1480_SPC_CFG_SRC1              _SB_MAKEMASK(8,S_BCM1480_SPC_CFG_SRC1)
-#define V_BCM1480_SPC_CFG_SRC1(x)           _SB_MAKEVALUE(x,S_BCM1480_SPC_CFG_SRC1)
-#define G_BCM1480_SPC_CFG_SRC1(x)           _SB_GETVALUE(x,S_BCM1480_SPC_CFG_SRC1,M_BCM1480_SPC_CFG_SRC1)
-
-#define S_BCM1480_SPC_CFG_SRC2              16
-#define M_BCM1480_SPC_CFG_SRC2              _SB_MAKEMASK(8,S_BCM1480_SPC_CFG_SRC2)
-#define V_BCM1480_SPC_CFG_SRC2(x)           _SB_MAKEVALUE(x,S_BCM1480_SPC_CFG_SRC2)
-#define G_BCM1480_SPC_CFG_SRC2(x)           _SB_GETVALUE(x,S_BCM1480_SPC_CFG_SRC2,M_BCM1480_SPC_CFG_SRC2)
-
-#define S_BCM1480_SPC_CFG_SRC3              24
-#define M_BCM1480_SPC_CFG_SRC3              _SB_MAKEMASK(8,S_BCM1480_SPC_CFG_SRC3)
-#define V_BCM1480_SPC_CFG_SRC3(x)           _SB_MAKEVALUE(x,S_BCM1480_SPC_CFG_SRC3)
-#define G_BCM1480_SPC_CFG_SRC3(x)           _SB_GETVALUE(x,S_BCM1480_SPC_CFG_SRC3,M_BCM1480_SPC_CFG_SRC3)
-
-#define S_BCM1480_SPC_CFG_SRC4              32
-#define M_BCM1480_SPC_CFG_SRC4              _SB_MAKEMASK(8,S_BCM1480_SPC_CFG_SRC4)
-#define V_BCM1480_SPC_CFG_SRC4(x)           _SB_MAKEVALUE(x,S_BCM1480_SPC_CFG_SRC4)
-#define G_BCM1480_SPC_CFG_SRC4(x)           _SB_GETVALUE(x,S_BCM1480_SPC_CFG_SRC4,M_BCM1480_SPC_CFG_SRC4)
-
-#define S_BCM1480_SPC_CFG_SRC5              40
-#define M_BCM1480_SPC_CFG_SRC5              _SB_MAKEMASK(8,S_BCM1480_SPC_CFG_SRC5)
-#define V_BCM1480_SPC_CFG_SRC5(x)           _SB_MAKEVALUE(x,S_BCM1480_SPC_CFG_SRC5)
-#define G_BCM1480_SPC_CFG_SRC5(x)           _SB_GETVALUE(x,S_BCM1480_SPC_CFG_SRC5,M_BCM1480_SPC_CFG_SRC5)
-
-#define S_BCM1480_SPC_CFG_SRC6              48
-#define M_BCM1480_SPC_CFG_SRC6              _SB_MAKEMASK(8,S_BCM1480_SPC_CFG_SRC6)
-#define V_BCM1480_SPC_CFG_SRC6(x)           _SB_MAKEVALUE(x,S_BCM1480_SPC_CFG_SRC6)
-#define G_BCM1480_SPC_CFG_SRC6(x)           _SB_GETVALUE(x,S_BCM1480_SPC_CFG_SRC6,M_BCM1480_SPC_CFG_SRC6)
-
-#define S_BCM1480_SPC_CFG_SRC7              56
-#define M_BCM1480_SPC_CFG_SRC7              _SB_MAKEMASK(8,S_BCM1480_SPC_CFG_SRC7)
-#define V_BCM1480_SPC_CFG_SRC7(x)           _SB_MAKEVALUE(x,S_BCM1480_SPC_CFG_SRC7)
-#define G_BCM1480_SPC_CFG_SRC7(x)           _SB_GETVALUE(x,S_BCM1480_SPC_CFG_SRC7,M_BCM1480_SPC_CFG_SRC7)
+#define S_SPC_CFG_SRC4              32
+#define M_SPC_CFG_SRC4              _SB_MAKEMASK(8,S_SPC_CFG_SRC4)
+#define V_SPC_CFG_SRC4(x)           _SB_MAKEVALUE(x,S_SPC_CFG_SRC4)
+#define G_SPC_CFG_SRC4(x)           _SB_GETVALUE(x,S_SPC_CFG_SRC4,M_SPC_CFG_SRC4)
+
+#define S_SPC_CFG_SRC5              40
+#define M_SPC_CFG_SRC5              _SB_MAKEMASK(8,S_SPC_CFG_SRC5)
+#define V_SPC_CFG_SRC5(x)           _SB_MAKEVALUE(x,S_SPC_CFG_SRC5)
+#define G_SPC_CFG_SRC5(x)           _SB_GETVALUE(x,S_SPC_CFG_SRC5,M_SPC_CFG_SRC5)
+
+#define S_SPC_CFG_SRC6              48
+#define M_SPC_CFG_SRC6              _SB_MAKEMASK(8,S_SPC_CFG_SRC6)
+#define V_SPC_CFG_SRC6(x)           _SB_MAKEVALUE(x,S_SPC_CFG_SRC6)
+#define G_SPC_CFG_SRC6(x)           _SB_GETVALUE(x,S_SPC_CFG_SRC6,M_SPC_CFG_SRC6)
+
+#define S_SPC_CFG_SRC7              56
+#define M_SPC_CFG_SRC7              _SB_MAKEMASK(8,S_SPC_CFG_SRC7)
+#define V_SPC_CFG_SRC7(x)           _SB_MAKEVALUE(x,S_SPC_CFG_SRC7)
+#define G_SPC_CFG_SRC7(x)           _SB_GETVALUE(x,S_SPC_CFG_SRC7,M_SPC_CFG_SRC7)
 
 /*
  * System Performance Counter Control Register (Table 32)
@@ -287,8 +269,8 @@ #define G_BCM1480_SPC_CFG_SRC7(x)       
  * BCM1480 specific
  */
 
-#define M_BCM1480_SPC_CFG_CLEAR             _SB_MAKEMASK1(0)
-#define M_BCM1480_SPC_CFG_ENABLE            _SB_MAKEMASK1(1)
+#define M_SPC_CFG_CLEAR             _SB_MAKEMASK1(0)
+#define M_SPC_CFG_ENABLE            _SB_MAKEMASK1(1)
 
 /*
  * System Performance Counters (Table 33)
@@ -333,7 +315,7 @@ #define M_BCM1480_SPC_CNT_OFLOW         
  * Address Trap Registers
  *
  * Register layout same as BCM1250, almost.  The bus agents
- * are different, and the address trap configuration bits are
+ * are different, and the address trap configuration bits are 
  * slightly different.
  */
 
@@ -405,20 +387,10 @@ #define G_BCM1480_SCD_TRSEQ_SWFUNC(x)   
  * Trace Control Register (Table 49)
  * Register: TRACE_CFG
  *
- * Bits 0..8 are the same as the BCM1250, rest are different.
- * Entire register is redefined below.
+ * BCM1480 changes to this register (other than location of the CUR_ADDR field)
+ * are defined below.
  */
 
-#define M_BCM1480_SCD_TRACE_CFG_RESET       _SB_MAKEMASK1(0)
-#define M_BCM1480_SCD_TRACE_CFG_START_READ  _SB_MAKEMASK1(1)
-#define M_BCM1480_SCD_TRACE_CFG_START       _SB_MAKEMASK1(2)
-#define M_BCM1480_SCD_TRACE_CFG_STOP        _SB_MAKEMASK1(3)
-#define M_BCM1480_SCD_TRACE_CFG_FREEZE      _SB_MAKEMASK1(4)
-#define M_BCM1480_SCD_TRACE_CFG_FREEZE_FULL _SB_MAKEMASK1(5)
-#define M_BCM1480_SCD_TRACE_CFG_DEBUG_FULL  _SB_MAKEMASK1(6)
-#define M_BCM1480_SCD_TRACE_CFG_FULL        _SB_MAKEMASK1(7)
-#define M_BCM1480_SCD_TRACE_CFG_FORCE_CNT   _SB_MAKEMASK1(8)
-
 #define S_BCM1480_SCD_TRACE_CFG_MODE        16
 #define M_BCM1480_SCD_TRACE_CFG_MODE        _SB_MAKEMASK(2,S_BCM1480_SCD_TRACE_CFG_MODE)
 #define V_BCM1480_SCD_TRACE_CFG_MODE(x)     _SB_MAKEVALUE(x,S_BCM1480_SCD_TRACE_CFG_MODE)
@@ -428,9 +400,4 @@ #define K_BCM1480_SCD_TRACE_CFG_MODE_BLO
 #define K_BCM1480_SCD_TRACE_CFG_MODE_BYTEEN_INT	1
 #define K_BCM1480_SCD_TRACE_CFG_MODE_FLOW_ID	2
 
-#define S_BCM1480_SCD_TRACE_CFG_CUR_ADDR    24
-#define M_BCM1480_SCD_TRACE_CFG_CUR_ADDR    _SB_MAKEMASK(8,S_BCM1480_SCD_TRACE_CFG_CUR_ADDR)
-#define V_BCM1480_SCD_TRACE_CFG_CUR_ADDR(x) _SB_MAKEVALUE(x,S_BCM1480_SCD_TRACE_CFG_CUR_ADDR)
-#define G_BCM1480_SCD_TRACE_CFG_CUR_ADDR(x) _SB_GETVALUE(x,S_BCM1480_SCD_TRACE_CFG_CUR_ADDR,M_BCM1480_SCD_TRACE_CFG_CUR_ADDR)
-
 #endif /* _BCM1480_SCD_H */
diff --git a/include/asm-mips/sibyte/bigsur.h b/include/asm-mips/sibyte/bigsur.h
index ebefe79..02b9123 100644
--- a/include/asm-mips/sibyte/bigsur.h
+++ b/include/asm-mips/sibyte/bigsur.h
@@ -22,7 +22,7 @@ #include <asm/sibyte/sb1250.h>
 #include <asm/sibyte/bcm1480_int.h>
 
 #ifdef CONFIG_SIBYTE_BIGSUR
-#define SIBYTE_BOARD_NAME "BCM91x80A/B (BigSur)"
+#define SIBYTE_BOARD_NAME "BCM91280A (BIGSUR)"
 #define SIBYTE_HAVE_PCMCIA 1
 #define SIBYTE_HAVE_IDE    1
 #endif
diff --git a/include/asm-mips/sibyte/carmel.h b/include/asm-mips/sibyte/carmel.h
index 57c53e6..e691b6d 100644
--- a/include/asm-mips/sibyte/carmel.h
+++ b/include/asm-mips/sibyte/carmel.h
@@ -18,18 +18,17 @@
 #ifndef __ASM_SIBYTE_CARMEL_H
 #define __ASM_SIBYTE_CARMEL_H
 
-
 #include <asm/sibyte/sb1250.h>
 #include <asm/sibyte/sb1250_int.h>
 
 #define SIBYTE_BOARD_NAME "Carmel"
 
-#define GPIO_PHY_INTERRUPT      2
-#define GPIO_NONMASKABLE_INT    3
-#define GPIO_CF_INSERTED        6
-#define GPIO_MONTEREY_RESET     7
-#define GPIO_QUADUART_INT       8
-#define GPIO_CF_INT             9
+#define GPIO_PHY_INTERRUPT      2 
+#define GPIO_NONMASKABLE_INT    3 
+#define GPIO_CF_INSERTED        6 
+#define GPIO_MONTEREY_RESET     7 
+#define GPIO_QUADUART_INT       8 
+#define GPIO_CF_INT             9 
 #define GPIO_FPGA_CCLK          10
 #define GPIO_FPGA_DOUT          11
 #define GPIO_FPGA_DIN           12
diff --git a/include/asm-mips/sibyte/sb1250_defs.h b/include/asm-mips/sibyte/sb1250_defs.h
index 335dbaf..f2e28e9 100644
--- a/include/asm-mips/sibyte/sb1250_defs.h
+++ b/include/asm-mips/sibyte/sb1250_defs.h
@@ -1,21 +1,21 @@
 /*  *********************************************************************
     *  SB1250 Board Support Package
-    *
-    *  Global constants and macros		File: sb1250_defs.h
-    *
+    *  
+    *  Global constants and macros		File: sb1250_defs.h	
+    *  
     *  This file contains macros and definitions used by the other
     *  include files.
     *
     *  SB1250 specification level:  User's manual 1/02/02
-    *
-    *********************************************************************
+    *  
+    *********************************************************************  
     *
     *  Copyright 2000,2001,2002,2003
     *  Broadcom Corporation. All rights reserved.
-    *
-    *  This program is free software; you can redistribute it and/or
-    *  modify it under the terms of the GNU General Public License as
-    *  published by the Free Software Foundation; either version 2 of
+    *  
+    *  This program is free software; you can redistribute it and/or 
+    *  modify it under the terms of the GNU General Public License as 
+    *  published by the Free Software Foundation; either version 2 of 
     *  the License, or (at your option) any later version.
     *
     *  This program is distributed in the hope that it will be useful,
@@ -25,7 +25,7 @@
     *
     *  You should have received a copy of the GNU General Public License
     *  along with this program; if not, write to the Free Software
-    *  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+    *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
     *  MA 02111-1307 USA
     ********************************************************************* */
 
@@ -107,7 +107,7 @@ #define SIBYTE_HDR_FMASK_1480_ALL		0x000
 #define SIBYTE_HDR_FMASK_1480_PASS1		0x00001000
 #define SIBYTE_HDR_FMASK_1480_PASS2		0x00002000
 
-/* Bit mask for chip/revision.  (use _ALL for all revisions of a chip).  */
+/* Bit mask for chip/revision.  (use _ALL for all revisions of a chip).  */ 
 #define	SIBYTE_HDR_FMASK(chip, pass)					\
     (SIBYTE_HDR_FMASK_ ## chip ## _ ## pass)
 #define	SIBYTE_HDR_FMASK_ALLREVS(chip)					\
@@ -167,31 +167,31 @@ #define SIBYTE_HDR_FEATURE_UP_TO(chip, p
 
 /*  *********************************************************************
     *  Naming schemes for constants in these files:
-    *
-    *  M_xxx           MASK constant (identifies bits in a register).
+    *  
+    *  M_xxx           MASK constant (identifies bits in a register). 
     *                  For multi-bit fields, all bits in the field will
     *                  be set.
     *
     *  K_xxx           "Code" constant (value for data in a multi-bit
     *                  field).  The value is right justified.
     *
-    *  V_xxx           "Value" constant.  This is the same as the
+    *  V_xxx           "Value" constant.  This is the same as the 
     *                  corresponding "K_xxx" constant, except it is
     *                  shifted to the correct position in the register.
     *
     *  S_xxx           SHIFT constant.  This is the number of bits that
-    *                  a field value (code) needs to be shifted
+    *                  a field value (code) needs to be shifted 
     *                  (towards the left) to put the value in the right
     *                  position for the register.
     *
-    *  A_xxx           ADDRESS constant.  This will be a physical
+    *  A_xxx           ADDRESS constant.  This will be a physical 
     *                  address.  Use the PHYS_TO_K1 macro to generate
     *                  a K1SEG address.
     *
     *  R_xxx           RELATIVE offset constant.  This is an offset from
     *                  an A_xxx constant (usually the first register in
     *                  a group).
-    *
+    *  
     *  G_xxx(X)        GET value.  This macro obtains a multi-bit field
     *                  from a register, masks it, and shifts it to
     *                  the bottom of the register (retrieving a K_xxx
@@ -206,7 +206,7 @@ #define SIBYTE_HDR_FEATURE_UP_TO(chip, p
 
 
 /*
- * Cast to 64-bit number.  Presumably the syntax is different in
+ * Cast to 64-bit number.  Presumably the syntax is different in 
  * assembly language.
  *
  * Note: you'll need to define uint32_t and uint64_t in your headers.
@@ -257,3 +257,4 @@ #define SBREADCSR(csr) (*((volatile uint
 #endif /* __ASSEMBLER__ */
 
 #endif
+
diff --git a/include/asm-mips/sibyte/sb1250_dma.h b/include/asm-mips/sibyte/sb1250_dma.h
index e6145f5..8c8892c 100644
--- a/include/asm-mips/sibyte/sb1250_dma.h
+++ b/include/asm-mips/sibyte/sb1250_dma.h
@@ -1,23 +1,23 @@
 /*  *********************************************************************
     *  SB1250 Board Support Package
-    *
+    *  
     *  DMA definitions				File: sb1250_dma.h
-    *
+    *  
     *  This module contains constants and macros useful for
     *  programming the SB1250's DMA controllers, both the data mover
     *  and the Ethernet DMA.
-    *
+    *  
     *  SB1250 specification level:  User's manual 10/21/02
     *  BCM1280 specification level: User's manual 11/24/03
-    *
-    *********************************************************************
+    *  
+    *********************************************************************  
     *
     *  Copyright 2000,2001,2002,2003
     *  Broadcom Corporation. All rights reserved.
-    *
-    *  This program is free software; you can redistribute it and/or
-    *  modify it under the terms of the GNU General Public License as
-    *  published by the Free Software Foundation; either version 2 of
+    *  
+    *  This program is free software; you can redistribute it and/or 
+    *  modify it under the terms of the GNU General Public License as 
+    *  published by the Free Software Foundation; either version 2 of 
     *  the License, or (at your option) any later version.
     *
     *  This program is distributed in the hope that it will be useful,
@@ -27,7 +27,7 @@
     *
     *  You should have received a copy of the GNU General Public License
     *  along with this program; if not, write to the Free Software
-    *  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+    *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
     *  MA 02111-1307 USA
     ********************************************************************* */
 
@@ -42,9 +42,9 @@ #include "sb1250_defs.h"
     *  DMA Registers
     ********************************************************************* */
 
-/*
+/* 
  * Ethernet and Serial DMA Configuration Register 0  (Table 7-4)
- * Registers: DMA_CONFIG0_MAC_x_RX_CH_0
+ * Registers: DMA_CONFIG0_MAC_x_RX_CH_0 
  * Registers: DMA_CONFIG0_MAC_x_TX_CH_0
  * Registers: DMA_CONFIG0_SER_x_RX
  * Registers: DMA_CONFIG0_SER_x_TX
@@ -97,7 +97,7 @@ #define G_DMA_LOW_WATERMARK(x)      _SB_
 
 /*
  * Ethernet and Serial DMA Configuration Register 1 (Table 7-5)
- * Registers: DMA_CONFIG1_MAC_x_RX_CH_0
+ * Registers: DMA_CONFIG1_MAC_x_RX_CH_0 
  * Registers: DMA_CONFIG1_DMA_x_TX_CH_0
  * Registers: DMA_CONFIG1_SER_x_RX
  * Registers: DMA_CONFIG1_SER_x_TX
@@ -151,11 +151,11 @@ #define M_DMA_ASIC_BASE_MBZ         _SB_
 /*
  * DMA Descriptor Count Registers (Table 7-8)
  */
-
+ 
 /* No bitfields */
 
 
-/*
+/* 
  * Current Descriptor Address Register (Table 7-11)
  */
 
@@ -274,7 +274,7 @@ #define M_DMA_DSCRB_STATUS          _SB_
 #define V_DMA_DSCRB_STATUS(x)       _SB_MAKEVALUE(x,S_DMA_DSCRB_STATUS)
 #define G_DMA_DSCRB_STATUS(x)       _SB_GETVALUE(x,S_DMA_DSCRB_STATUS,M_DMA_DSCRB_STATUS)
 
-/*
+/* 
  * Ethernet Descriptor Status Bits (Table 7-15)
  */
 
@@ -324,7 +324,7 @@ #define M_DMA_ETHRX_SOP             _SB_
 
 #define M_DMA_ETHTX_SOP	    	    _SB_MAKEMASK1(63)
 
-/*
+/* 
  * Ethernet Transmit Options (Table 7-17)
  */
 
@@ -377,7 +377,7 @@ #define K_DMA_SERTX_ABORT           _SB_
     *  Data Mover Registers
     ********************************************************************* */
 
-/*
+/* 
  * Data Mover Descriptor Base Address Register (Table 7-22)
  * Register: DM_DSCR_BASE_0
  * Register: DM_DSCR_BASE_1
@@ -414,7 +414,7 @@ #define M_DM_DSCR_BASE_ERROR        _SB_
 #define M_DM_DSCR_BASE_ABORT        _SB_MAKEMASK1(62)
 #define M_DM_DSCR_BASE_ENABL        _SB_MAKEMASK1(63)
 
-/*
+/* 
  * Data Mover Descriptor Count Register (Table 7-25)
  */
 
diff --git a/include/asm-mips/sibyte/sb1250_genbus.h b/include/asm-mips/sibyte/sb1250_genbus.h
index 1b5cbc5..9a83b3f 100644
--- a/include/asm-mips/sibyte/sb1250_genbus.h
+++ b/include/asm-mips/sibyte/sb1250_genbus.h
@@ -1,22 +1,22 @@
 /*  *********************************************************************
     *  SB1250 Board Support Package
-    *
+    *  
     *  Generic Bus Constants                     File: sb1250_genbus.h
-    *
-    *  This module contains constants and macros useful for
+    *  
+    *  This module contains constants and macros useful for 
     *  manipulating the SB1250's Generic Bus interface
-    *
+    *  
     *  SB1250 specification level:  User's manual 10/21/02
     *  BCM1280 specification level: User's Manual 11/14/03
-    *
-    *********************************************************************
+    *  
+    *********************************************************************  
     *
     *  Copyright 2000,2001,2002,2003
     *  Broadcom Corporation. All rights reserved.
-    *
-    *  This program is free software; you can redistribute it and/or
-    *  modify it under the terms of the GNU General Public License as
-    *  published by the Free Software Foundation; either version 2 of
+    *  
+    *  This program is free software; you can redistribute it and/or 
+    *  modify it under the terms of the GNU General Public License as 
+    *  published by the Free Software Foundation; either version 2 of 
     *  the License, or (at your option) any later version.
     *
     *  This program is distributed in the hope that it will be useful,
@@ -26,7 +26,7 @@
     *
     *  You should have received a copy of the GNU General Public License
     *  along with this program; if not, write to the Free Software
-    *  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+    *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
     *  MA 02111-1307 USA
     ********************************************************************* */
 
@@ -416,7 +416,7 @@ #define G_GPIO_INTR_TYPE14(x)	_SB_GETVAL
 #if SIBYTE_HDR_FEATURE_CHIP(1480)
 
 /*
- * GPIO Interrupt Additional Type Register
+ * GPIO Interrupt Additional Type Register 
  */
 
 #define K_GPIO_INTR_BOTHEDGE	0
diff --git a/include/asm-mips/sibyte/sb1250_int.h b/include/asm-mips/sibyte/sb1250_int.h
index 05c7b39..14be0b1 100644
--- a/include/asm-mips/sibyte/sb1250_int.h
+++ b/include/asm-mips/sibyte/sb1250_int.h
@@ -1,21 +1,21 @@
 /*  *********************************************************************
     *  SB1250 Board Support Package
-    *
+    *  
     *  Interrupt Mapper definitions		File: sb1250_int.h
-    *
+    *  
     *  This module contains constants for manipulating the SB1250's
     *  interrupt mapper and definitions for the interrupt sources.
-    *
+    *  
     *  SB1250 specification level:  User's manual 1/02/02
-    *
-    *********************************************************************
+    *  
+    *********************************************************************  
     *
     *  Copyright 2000,2001,2002,2003
     *  Broadcom Corporation. All rights reserved.
-    *
-    *  This program is free software; you can redistribute it and/or
-    *  modify it under the terms of the GNU General Public License as
-    *  published by the Free Software Foundation; either version 2 of
+    *  
+    *  This program is free software; you can redistribute it and/or 
+    *  modify it under the terms of the GNU General Public License as 
+    *  published by the Free Software Foundation; either version 2 of 
     *  the License, or (at your option) any later version.
     *
     *  This program is distributed in the hope that it will be useful,
@@ -25,7 +25,7 @@
     *
     *  You should have received a copy of the GNU General Public License
     *  along with this program; if not, write to the Free Software
-    *  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+    *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
     *  MA 02111-1307 USA
     ********************************************************************* */
 
@@ -41,7 +41,7 @@ #include "sb1250_defs.h"
 
 /*
  * Interrupt sources (Table 4-8, UM 0.2)
- *
+ * 
  * First, the interrupt numbers.
  */
 
diff --git a/include/asm-mips/sibyte/sb1250_l2c.h b/include/asm-mips/sibyte/sb1250_l2c.h
index 842f205..5667d9e 100644
--- a/include/asm-mips/sibyte/sb1250_l2c.h
+++ b/include/asm-mips/sibyte/sb1250_l2c.h
@@ -1,21 +1,21 @@
 /*  *********************************************************************
     *  SB1250 Board Support Package
-    *
+    *  
     *  L2 Cache constants and macros		File: sb1250_l2c.h
-    *
+    *  
     *  This module contains constants useful for manipulating the
     *  level 2 cache.
-    *
+    *  
     *  SB1250 specification level:  User's manual 1/02/02
-    *
-    *********************************************************************
+    *  
+    *********************************************************************  
     *
     *  Copyright 2000,2001,2002,2003
     *  Broadcom Corporation. All rights reserved.
-    *
-    *  This program is free software; you can redistribute it and/or
-    *  modify it under the terms of the GNU General Public License as
-    *  published by the Free Software Foundation; either version 2 of
+    *  
+    *  This program is free software; you can redistribute it and/or 
+    *  modify it under the terms of the GNU General Public License as 
+    *  published by the Free Software Foundation; either version 2 of 
     *  the License, or (at your option) any later version.
     *
     *  This program is distributed in the hope that it will be useful,
@@ -25,7 +25,7 @@
     *
     *  You should have received a copy of the GNU General Public License
     *  along with this program; if not, write to the Free Software
-    *  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+    *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
     *  MA 02111-1307 USA
     ********************************************************************* */
 
diff --git a/include/asm-mips/sibyte/sb1250_ldt.h b/include/asm-mips/sibyte/sb1250_ldt.h
index 7092535..d0626d9 100644
--- a/include/asm-mips/sibyte/sb1250_ldt.h
+++ b/include/asm-mips/sibyte/sb1250_ldt.h
@@ -1,21 +1,21 @@
 /*  *********************************************************************
     *  SB1250 Board Support Package
-    *
+    *  
     *  LDT constants				File: sb1250_ldt.h
-    *
-    *  This module contains constants and macros to describe
-    *  the LDT interface on the SB1250.
-    *
+    *  
+    *  This module contains constants and macros to describe 
+    *  the LDT interface on the SB1250.  
+    *  
     *  SB1250 specification level:  User's manual 1/02/02
-    *
-    *********************************************************************
+    *  
+    *********************************************************************  
     *
     *  Copyright 2000,2001,2002,2003
     *  Broadcom Corporation. All rights reserved.
-    *
-    *  This program is free software; you can redistribute it and/or
-    *  modify it under the terms of the GNU General Public License as
-    *  published by the Free Software Foundation; either version 2 of
+    *  
+    *  This program is free software; you can redistribute it and/or 
+    *  modify it under the terms of the GNU General Public License as 
+    *  published by the Free Software Foundation; either version 2 of 
     *  the License, or (at your option) any later version.
     *
     *  This program is distributed in the hope that it will be useful,
@@ -25,7 +25,7 @@
     *
     *  You should have received a copy of the GNU General Public License
     *  along with this program; if not, write to the Free Software
-    *  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+    *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
     *  MA 02111-1307 USA
     ********************************************************************* */
 
@@ -153,7 +153,7 @@ #define G_LDT_DEVHDR_BIST(x)		_SB_GETVAL
 
 /*
  * LDT Status Register (Table 8-14).  Note that these constants
- * assume you've read the command and status register
+ * assume you've read the command and status register 
  * together (32-bit read at offset 0x04)
  *
  * These bits also apply to the secondary status
@@ -181,8 +181,8 @@ #define M_LDT_STATUS_SIGDSERR		_SB_MAKEM
 #define M_LDT_STATUS_DETPARERR		_SB_MAKEMASK1_32(31)
 
 /*
- * Bridge Control Register (Table 8-16).  Note that these
- * constants assume you've read the register as a 32-bit
+ * Bridge Control Register (Table 8-16).  Note that these 
+ * constants assume you've read the register as a 32-bit 
  * read (offset 0x3C)
  */
 
diff --git a/include/asm-mips/sibyte/sb1250_mac.h b/include/asm-mips/sibyte/sb1250_mac.h
index adfc688..acc118c 100644
--- a/include/asm-mips/sibyte/sb1250_mac.h
+++ b/include/asm-mips/sibyte/sb1250_mac.h
@@ -1,21 +1,21 @@
 /*  *********************************************************************
     *  SB1250 Board Support Package
-    *
+    *  
     *  MAC constants and macros			File: sb1250_mac.h
-    *
+    *  
     *  This module contains constants and macros for the SB1250's
     *  ethernet controllers.
-    *
+    *  
     *  SB1250 specification level:  User's manual 1/02/02
-    *
-    *********************************************************************
+    *  
+    *********************************************************************  
     *
     *  Copyright 2000,2001,2002,2003
     *  Broadcom Corporation. All rights reserved.
-    *
-    *  This program is free software; you can redistribute it and/or
-    *  modify it under the terms of the GNU General Public License as
-    *  published by the Free Software Foundation; either version 2 of
+    *  
+    *  This program is free software; you can redistribute it and/or 
+    *  modify it under the terms of the GNU General Public License as 
+    *  published by the Free Software Foundation; either version 2 of 
     *  the License, or (at your option) any later version.
     *
     *  This program is distributed in the hope that it will be useful,
@@ -25,7 +25,7 @@
     *
     *  You should have received a copy of the GNU General Public License
     *  along with this program; if not, write to the Free Software
-    *  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+    *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
     *  MA 02111-1307 USA
     ********************************************************************* */
 
@@ -129,9 +129,9 @@ #define K_MAC_BYPASS_EOP            3
 #define M_MAC_BYPASS_16             _SB_MAKEMASK1(42)
 #define M_MAC_BYPASS_FCS_CHK	    _SB_MAKEMASK1(43)
 
-#if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1)
+#if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480)
 #define M_MAC_RX_CH_SEL_MSB	    _SB_MAKEMASK1(44)
-#endif /* 1250 PASS2 || 112x PASS1 */
+#endif /* 1250 PASS2 || 112x PASS1 || 1480*/
 
 #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480)
 #define M_MAC_SPLIT_CH_SEL	    _SB_MAKEMASK1(45)
@@ -223,9 +223,9 @@ #if SIBYTE_HDR_FEATURE_UP_TO(1250, PASS1
 /* XXX: Can't enable, as it has the same name as a pass2+ define below.  */
 /* #define M_MAC_TX_WR_THRSH           _SB_MAKEMASK(6,S_MAC_TX_WR_THRSH) */
 #endif /* up to 1250 PASS1 */
-#if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1)
+#if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480)
 #define M_MAC_TX_WR_THRSH           _SB_MAKEMASK(7,S_MAC_TX_WR_THRSH)
-#endif /* 1250 PASS2 || 112x PASS1 */
+#endif /* 1250 PASS2 || 112x PASS1 || 1480 */
 #define V_MAC_TX_WR_THRSH(x)        _SB_MAKEVALUE(x,S_MAC_TX_WR_THRSH)
 #define G_MAC_TX_WR_THRSH(x)        _SB_GETVALUE(x,S_MAC_TX_WR_THRSH,M_MAC_TX_WR_THRSH)
 
@@ -234,9 +234,9 @@ #if SIBYTE_HDR_FEATURE_UP_TO(1250, PASS1
 /* XXX: Can't enable, as it has the same name as a pass2+ define below.  */
 /* #define M_MAC_TX_RD_THRSH           _SB_MAKEMASK(6,S_MAC_TX_RD_THRSH) */
 #endif /* up to 1250 PASS1 */
-#if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1)
+#if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480)
 #define M_MAC_TX_RD_THRSH           _SB_MAKEMASK(7,S_MAC_TX_RD_THRSH)
-#endif /* 1250 PASS2 || 112x PASS1 */
+#endif /* 1250 PASS2 || 112x PASS1 || 1480 */
 #define V_MAC_TX_RD_THRSH(x)        _SB_MAKEVALUE(x,S_MAC_TX_RD_THRSH)
 #define G_MAC_TX_RD_THRSH(x)        _SB_GETVALUE(x,S_MAC_TX_RD_THRSH,M_MAC_TX_RD_THRSH)
 
@@ -260,12 +260,12 @@ #define M_MAC_RX_RL_THRSH           _SB_
 #define V_MAC_RX_RL_THRSH(x)        _SB_MAKEVALUE(x,S_MAC_RX_RL_THRSH)
 #define G_MAC_RX_RL_THRSH(x)        _SB_GETVALUE(x,S_MAC_RX_RL_THRSH,M_MAC_RX_RL_THRSH)
 
-#if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1)
+#if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480)
 #define S_MAC_ENC_FC_THRSH           _SB_MAKE64(56)
 #define M_MAC_ENC_FC_THRSH           _SB_MAKEMASK(6,S_MAC_ENC_FC_THRSH)
 #define V_MAC_ENC_FC_THRSH(x)        _SB_MAKEVALUE(x,S_MAC_ENC_FC_THRSH)
 #define G_MAC_ENC_FC_THRSH(x)        _SB_GETVALUE(x,S_MAC_ENC_FC_THRSH,M_MAC_ENC_FC_THRSH)
-#endif /* 1250 PASS2 || 112x PASS1 */
+#endif /* 1250 PASS2 || 112x PASS1 || 1480 */
 
 /*
  * MAC Frame Configuration Registers (Table 9-15)
@@ -324,7 +324,7 @@ #define G_MAC_MAX_FRAMESZ(x)        _SB_
 
 /*
  * These constants are used to configure the fields within the Frame
- * Configuration Register.
+ * Configuration Register.  
  */
 
 #define K_MAC_IFG_RX_10             _SB_MAKE64(0)	/* See table 176, not used */
@@ -406,7 +406,7 @@ #endif /* 1250 PASS3 || 112x PASS1 */
  * Register: MAC_INT_MASK_2
  */
 
-/*
+/* 
  * Use these constants to shift the appropriate channel
  * into the CH0 position so the same tests can be used
  * on each channel.
@@ -462,9 +462,9 @@ #define M_MAC_TX_OVRFL              _SB_
 #define M_MAC_LTCOL_ERR             _SB_MAKEMASK1(44)
 #define M_MAC_EXCOL_ERR             _SB_MAKEMASK1(45)
 #define M_MAC_CNTR_OVRFL_ERR        _SB_MAKEMASK1(46)
-#if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1)
+#if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480)
 #define M_MAC_SPLIT_EN		    _SB_MAKEMASK1(47) 	/* interrupt mask only */
-#endif /* 1250 PASS2 || 112x PASS1 */
+#endif /* 1250 PASS2 || 112x PASS1 || 1480 */
 
 #define S_MAC_COUNTER_ADDR          _SB_MAKE64(47)
 #define M_MAC_COUNTER_ADDR          _SB_MAKEMASK(5,S_MAC_COUNTER_ADDR)
@@ -598,9 +598,9 @@ #define M_MAC_MCAST_EN          _SB_MAKE
 #define M_MAC_MCAST_INV         _SB_MAKEMASK1(4)
 #define M_MAC_BCAST_EN          _SB_MAKEMASK1(5)
 #define M_MAC_DIRECT_INV        _SB_MAKEMASK1(6)
-#if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1)
+#if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480)
 #define M_MAC_ALLMCAST_EN	_SB_MAKEMASK1(7)
-#endif /* 1250 PASS2 || 112x PASS1 */
+#endif /* 1250 PASS2 || 112x PASS1 || 1480 */
 
 #define S_MAC_IPHDR_OFFSET      _SB_MAKE64(8)
 #define M_MAC_IPHDR_OFFSET      _SB_MAKEMASK(8,S_MAC_IPHDR_OFFSET)
diff --git a/include/asm-mips/sibyte/sb1250_mc.h b/include/asm-mips/sibyte/sb1250_mc.h
index 26e4214..20bfb31 100644
--- a/include/asm-mips/sibyte/sb1250_mc.h
+++ b/include/asm-mips/sibyte/sb1250_mc.h
@@ -1,21 +1,21 @@
 /*  *********************************************************************
     *  SB1250 Board Support Package
-    *
-    *  Memory Controller constants              File: sb1250_mc.h
-    *
+    *  
+    *  Memory Controller constants              File: sb1250_mc.h       
+    *  
     *  This module contains constants and macros useful for
     *  programming the memory controller.
-    *
+    *  
     *  SB1250 specification level:  User's manual 1/02/02
-    *
-    *********************************************************************
+    *  
+    *********************************************************************  
     *
     *  Copyright 2000,2001,2002,2003
     *  Broadcom Corporation. All rights reserved.
-    *
-    *  This program is free software; you can redistribute it and/or
-    *  modify it under the terms of the GNU General Public License as
-    *  published by the Free Software Foundation; either version 2 of
+    *  
+    *  This program is free software; you can redistribute it and/or 
+    *  modify it under the terms of the GNU General Public License as 
+    *  published by the Free Software Foundation; either version 2 of 
     *  the License, or (at your option) any later version.
     *
     *  This program is distributed in the hope that it will be useful,
@@ -25,7 +25,7 @@
     *
     *  You should have received a copy of the GNU General Public License
     *  along with this program; if not, write to the Free Software
-    *  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+    *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
     *  MA 02111-1307 USA
     ********************************************************************* */
 
@@ -164,7 +164,7 @@ #define G_MC_REF_RATE(x)             _SB
 
 #define K_MC_REF_RATE_100MHz         0x62
 #define K_MC_REF_RATE_133MHz         0x81
-#define K_MC_REF_RATE_200MHz         0xC4
+#define K_MC_REF_RATE_200MHz         0xC4 
 
 #define V_MC_REF_RATE_100MHz         V_MC_REF_RATE(K_MC_REF_RATE_100MHz)
 #define V_MC_REF_RATE_133MHz         V_MC_REF_RATE(K_MC_REF_RATE_133MHz)
@@ -226,7 +226,7 @@ #define V_MC_CLKCONFIG_DEFAULT       V_M
                                      V_MC_ADDR_DRIVE_DEFAULT | \
                                      V_MC_DATA_DRIVE_DEFAULT | \
                                      V_MC_CLOCK_DRIVE_DEFAULT | \
-                                     V_MC_REF_RATE_DEFAULT
+                                     V_MC_REF_RATE_DEFAULT 
 
 
 
@@ -295,7 +295,7 @@ #define M_MC_EXTERNALDECODE	    _SB_MAKE
 
 #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1)
 #define M_MC_PRE_ON_A8              _SB_MAKEMASK1(36)
-#define M_MC_RAM_WITH_A13           _SB_MAKEMASK1(38)
+#define M_MC_RAM_WITH_A13           _SB_MAKEMASK1(37)
 #endif /* 1250 PASS3 || 112x PASS1 */
 
 
diff --git a/include/asm-mips/sibyte/sb1250_regs.h b/include/asm-mips/sibyte/sb1250_regs.h
index bab3a45..1f147db 100644
--- a/include/asm-mips/sibyte/sb1250_regs.h
+++ b/include/asm-mips/sibyte/sb1250_regs.h
@@ -1,21 +1,21 @@
 /*  *********************************************************************
     *  SB1250 Board Support Package
-    *
+    *  
     *  Register Definitions                     File: sb1250_regs.h
-    *
+    *  
     *  This module contains the addresses of the on-chip peripherals
     *  on the SB1250.
-    *
+    *  
     *  SB1250 specification level:  01/02/2002
-    *
-    *********************************************************************
+    *  
+    *********************************************************************  
     *
     *  Copyright 2000,2001,2002,2003
     *  Broadcom Corporation. All rights reserved.
-    *
-    *  This program is free software; you can redistribute it and/or
-    *  modify it under the terms of the GNU General Public License as
-    *  published by the Free Software Foundation; either version 2 of
+    *  
+    *  This program is free software; you can redistribute it and/or 
+    *  modify it under the terms of the GNU General Public License as 
+    *  published by the Free Software Foundation; either version 2 of 
     *  the License, or (at your option) any later version.
     *
     *  This program is distributed in the hope that it will be useful,
@@ -25,7 +25,7 @@
     *
     *  You should have received a copy of the GNU General Public License
     *  along with this program; if not, write to the Free Software
-    *  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+    *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
     *  MA 02111-1307 USA
     ********************************************************************* */
 
@@ -38,20 +38,20 @@ #include "sb1250_defs.h"
 
 /*  *********************************************************************
     *  Some general notes:
-    *
+    *  
     *  For the most part, when there is more than one peripheral
     *  of the same type on the SOC, the constants below will be
     *  offsets from the base of each peripheral.  For example,
     *  the MAC registers are described as offsets from the first
     *  MAC register, and there will be a MAC_REGISTER() macro
-    *  to calculate the base address of a given MAC.
-    *
+    *  to calculate the base address of a given MAC.  
+    *  
     *  The information in this file is based on the SB1250 SOC
     *  manual version 0.2, July 2000.
     ********************************************************************* */
 
 
-/*  *********************************************************************
+/*  ********************************************************************* 
     * Memory Controller Registers
     ********************************************************************* */
 
@@ -103,7 +103,7 @@ #define R_MC_MCLK_CFG               0x00
 
 #endif	/* 1250 & 112x */
 
-/*  *********************************************************************
+/*  ********************************************************************* 
     * L2 Cache Control Registers
     ********************************************************************* */
 
@@ -131,7 +131,8 @@ #define A_L2_EEC_ADDRESS            A_L2
 
 #endif
 
-/*  *********************************************************************
+
+/*  ********************************************************************* 
     * PCI Interface Registers
     ********************************************************************* */
 
@@ -141,7 +142,7 @@ #define A_PCI_TYPE01_HEADER         0x00
 #endif
 
 
-/*  *********************************************************************
+/*  ********************************************************************* 
     * Ethernet DMA and MACs
     ********************************************************************* */
 
@@ -191,7 +192,7 @@ #define R_MAC_DMA_REGISTER(txrx,chan,reg
             (R_MAC_DMA_CHANNEL_BASE(txrx,chan) +    \
             (reg))
 
-/*
+/* 
  * DMA channel registers, relative to A_MAC_DMA_CHANNEL_BASE
  */
 
@@ -239,14 +240,14 @@ #define R_MAC_THRSH_CFG                 
 #define R_MAC_VLANTAG                   0x00000110
 #define R_MAC_FRAMECFG                  0x00000118
 #define R_MAC_EOPCNT                    0x00000120
-#define R_MAC_FIFO_PTRS                 0x00000130
+#define R_MAC_FIFO_PTRS                 0x00000128
 #define R_MAC_ADFILTER_CFG              0x00000200
 #define R_MAC_ETHERNET_ADDR             0x00000208
 #define R_MAC_PKT_TYPE                  0x00000210
-#if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1)
+#if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480)
 #define R_MAC_ADMASK0			0x00000218
 #define R_MAC_ADMASK1			0x00000220
-#endif /* 1250 PASS3 || 112x PASS1 */
+#endif /* 1250 PASS3 || 112x PASS1 || 1480 */
 #define R_MAC_HASH_BASE                 0x00000240
 #define R_MAC_ADDR_BASE                 0x00000280
 #define R_MAC_CHLO0_BASE                0x00000300
@@ -256,9 +257,9 @@ #define R_MAC_STATUS                    
 #define R_MAC_INT_MASK                  0x00000410
 #define R_MAC_TXD_CTL                   0x00000420
 #define R_MAC_MDIO                      0x00000428
-#if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1)
+#if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480)
 #define R_MAC_STATUS1		        0x00000430
-#endif /* 1250 PASS2 || 112x PASS1 */
+#endif /* 1250 PASS2 || 112x PASS1 || 1480 */
 #define R_MAC_DEBUG_STATUS              0x00000448
 
 #define MAC_HASH_COUNT			8
@@ -266,7 +267,7 @@ #define MAC_ADDR_COUNT			8
 #define MAC_CHMAP_COUNT			4
 
 
-/*  *********************************************************************
+/*  ********************************************************************* 
     * DUART Registers
     ********************************************************************* */
 
@@ -289,11 +290,11 @@ #define R_DUART_CMD                 0x15
 #define R_DUART_RX_HOLD             0x160
 #define R_DUART_TX_HOLD             0x170
 
-#if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1)
+#if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480)
 #define R_DUART_FULL_CTL	    0x140
 #define R_DUART_OPCR_X		    0x180
 #define R_DUART_AUXCTL_X	    0x190
-#endif /* 1250 PASS2 || 112x PASS1 */
+#endif /* 1250 PASS2 || 112x PASS1 || 1480*/
 
 
 /*
@@ -372,7 +373,7 @@ #define A_DUART_INPORT_CHNG_DEBUG   0x00
 #endif /* 1250 PASS2 || 112x PASS1 */
 
 
-/*  *********************************************************************
+/*  ********************************************************************* 
     * Synchronous Serial Registers
     ********************************************************************* */
 
@@ -408,7 +409,7 @@ #define A_SER_DMA_REGISTER(sernum,txrx,r
             (reg))
 
 
-/*
+/* 
  * DMA channel registers, relative to A_SER_DMA_CHANNEL_BASE
  */
 
@@ -470,7 +471,7 @@ #define R_SER_RMON_RX_BADADDR       0x00
 
 #endif	/* 1250/112x */
 
-/*  *********************************************************************
+/*  ********************************************************************* 
     * Generic Bus Registers
     ********************************************************************* */
 
@@ -526,7 +527,7 @@ #define R_IO_INTERRUPT_PARITY       0x0A
 #define R_IO_PCMCIA_CFG             0x0A60
 #define R_IO_PCMCIA_STATUS          0x0A70
 
-/*  *********************************************************************
+/*  ********************************************************************* 
     * GPIO Registers
     ********************************************************************* */
 
@@ -550,7 +551,7 @@ #define R_GPIO_DIRECTION            0x28
 #define R_GPIO_PIN_CLR              0x30
 #define R_GPIO_PIN_SET              0x38
 
-/*  *********************************************************************
+/*  ********************************************************************* 
     * SMBus Registers
     ********************************************************************* */
 
@@ -586,7 +587,7 @@ #define R_SMB_DATA                  0x00
 #define R_SMB_CONTROL               0x0000000060
 #define R_SMB_PEC                   0x0000000070
 
-/*  *********************************************************************
+/*  ********************************************************************* 
     * Timer Registers
     ********************************************************************* */
 
@@ -655,7 +656,7 @@ #define A_SCD_ZBBUS_CYCLE_CP0	   0x00100
 #define A_SCD_ZBBUS_CYCLE_CP1	   0x0010020C08
 #endif
 
-/*  *********************************************************************
+/*  ********************************************************************* 
     * System Control Registers
     ********************************************************************* */
 
@@ -663,7 +664,7 @@ #define A_SCD_SYSTEM_REVISION       0x00
 #define A_SCD_SYSTEM_CFG            0x0010020008
 #define A_SCD_SYSTEM_MANUF          0x0010038000
 
-/*  *********************************************************************
+/*  ********************************************************************* 
     * System Address Trap Registers
     ********************************************************************* */
 
@@ -686,7 +687,7 @@ #define A_ADDR_TRAP_REG_DEBUG	    0x0010
 #endif /* 1250 PASS2 || 112x PASS1 || 1480 */
 
 
-/*  *********************************************************************
+/*  ********************************************************************* 
     * System Interrupt Mapper Registers
     ********************************************************************* */
 
@@ -717,7 +718,7 @@ #define R_IMR_INTERRUPT_MAP_BASE        
 #define R_IMR_INTERRUPT_MAP_COUNT       64
 #endif	/* 1250/112x */
 
-/*  *********************************************************************
+/*  ********************************************************************* 
     * System Performance Counter Registers
     ********************************************************************* */
 
@@ -727,7 +728,7 @@ #define A_SCD_PERF_CNT_1            0x00
 #define A_SCD_PERF_CNT_2            0x00100204E0
 #define A_SCD_PERF_CNT_3            0x00100204E8
 
-/*  *********************************************************************
+/*  ********************************************************************* 
     * System Bus Watcher Registers
     ********************************************************************* */
 
@@ -743,13 +744,13 @@ #define A_BUS_ERR_DATA_3            0x00
 #define A_BUS_L2_ERRORS             0x00100208C0
 #define A_BUS_MEM_IO_ERRORS         0x00100208C8
 
-/*  *********************************************************************
+/*  ********************************************************************* 
     * System Debug Controller Registers
     ********************************************************************* */
 
 #define A_SCD_JTAG_BASE             0x0010000000
 
-/*  *********************************************************************
+/*  ********************************************************************* 
     * System Trace Buffer Registers
     ********************************************************************* */
 
@@ -772,7 +773,7 @@ #define A_SCD_TRACE_SEQUENCE_5      0x00
 #define A_SCD_TRACE_SEQUENCE_6      0x0010020A90
 #define A_SCD_TRACE_SEQUENCE_7      0x0010020A98
 
-/*  *********************************************************************
+/*  ********************************************************************* 
     * System Generic DMA Registers
     ********************************************************************* */
 
diff --git a/include/asm-mips/sibyte/sb1250_scd.h b/include/asm-mips/sibyte/sb1250_scd.h
index f4178bd..0f262b1 100644
--- a/include/asm-mips/sibyte/sb1250_scd.h
+++ b/include/asm-mips/sibyte/sb1250_scd.h
@@ -1,21 +1,21 @@
 /*  *********************************************************************
     *  SB1250 Board Support Package
-    *
+    *  
     *  SCD Constants and Macros			File: sb1250_scd.h
-    *
+    *  
     *  This module contains constants and macros useful for
     *  manipulating the System Control and Debug module on the 1250.
-    *
+    *  
     *  SB1250 specification level:  User's manual 1/02/02
-    *
-    *********************************************************************
+    *  
+    *********************************************************************  
     *
     *  Copyright 2000,2001,2002,2003
     *  Broadcom Corporation. All rights reserved.
-    *
-    *  This program is free software; you can redistribute it and/or
-    *  modify it under the terms of the GNU General Public License as
-    *  published by the Free Software Foundation; either version 2 of
+    *  
+    *  This program is free software; you can redistribute it and/or 
+    *  modify it under the terms of the GNU General Public License as 
+    *  published by the Free Software Foundation; either version 2 of 
     *  the License, or (at your option) any later version.
     *
     *  This program is distributed in the hope that it will be useful,
@@ -25,7 +25,7 @@
     *
     *  You should have received a copy of the GNU General Public License
     *  along with this program; if not, write to the Free Software
-    *  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+    *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
     *  MA 02111-1307 USA
     ********************************************************************* */
 
@@ -84,12 +84,13 @@ #define K_SYS_REVISION_BCM112x_A1	0x20
 #define K_SYS_REVISION_BCM112x_A2	0x21
 #define K_SYS_REVISION_BCM112x_A3	0x22
 #define K_SYS_REVISION_BCM112x_A4	0x23
+#define K_SYS_REVISION_BCM112x_B0	0x30
 
 #define K_SYS_REVISION_BCM1480_S0	0x01
 #define K_SYS_REVISION_BCM1480_A1	0x02
 #define K_SYS_REVISION_BCM1480_A2	0x03
 #define K_SYS_REVISION_BCM1480_A3	0x04
-#define K_SYS_REVISION_BCM1480_B0	0x11
+#define K_SYS_REVISION_BCM1480_B0       0x11
 
 /*Cache size - 23:20  of revision register*/
 #define S_SYS_L2C_SIZE            _SB_MAKE64(20)
@@ -173,46 +174,47 @@ #define M_SYS_WID                   _SB_
 #define V_SYS_WID(x)                _SB_MAKEVALUE(x,S_SYS_WID)
 #define G_SYS_WID(x)                _SB_GETVALUE(x,S_SYS_WID,M_SYS_WID)
 
-/*
+/* 
  * System Manufacturing Register
  * Register: SCD_SYSTEM_MANUF
  */
 
-#if SIBYTE_HDR_FEATURE_1250_112x
+#if SIBYTE_HDR_FEATURE_1250_112x 
 /* Wafer ID: bits 31:0 */
 #define S_SYS_WAFERID1_200        _SB_MAKE64(0)
 #define M_SYS_WAFERID1_200        _SB_MAKEMASK(32,S_SYS_WAFERID1_200)
 #define V_SYS_WAFERID1_200(x)     _SB_MAKEVALUE(x,S_SYS_WAFERID1_200)
 #define G_SYS_WAFERID1_200(x)     _SB_GETVALUE(x,S_SYS_WAFERID1_200,M_SYS_WAFERID1_200)
-
+ 
 #define S_SYS_BIN                 _SB_MAKE64(32)
 #define M_SYS_BIN                 _SB_MAKEMASK(4,S_SYS_BIN)
 #define V_SYS_BIN(x)              _SB_MAKEVALUE(x,S_SYS_BIN)
 #define G_SYS_BIN(x)              _SB_GETVALUE(x,S_SYS_BIN,M_SYS_BIN)
-
+ 
 /* Wafer ID: bits 39:36 */
 #define S_SYS_WAFERID2_200        _SB_MAKE64(36)
 #define M_SYS_WAFERID2_200        _SB_MAKEMASK(4,S_SYS_WAFERID2_200)
 #define V_SYS_WAFERID2_200(x)     _SB_MAKEVALUE(x,S_SYS_WAFERID2_200)
 #define G_SYS_WAFERID2_200(x)     _SB_GETVALUE(x,S_SYS_WAFERID2_200,M_SYS_WAFERID2_200)
-
+ 
 /* Wafer ID: bits 39:0 */
 #define S_SYS_WAFERID_300         _SB_MAKE64(0)
 #define M_SYS_WAFERID_300         _SB_MAKEMASK(40,S_SYS_WAFERID_300)
 #define V_SYS_WAFERID_300(x)      _SB_MAKEVALUE(x,S_SYS_WAFERID_300)
 #define G_SYS_WAFERID_300(x)      _SB_GETVALUE(x,S_SYS_WAFERID_300,M_SYS_WAFERID_300)
-
+ 
 #define S_SYS_XPOS                _SB_MAKE64(40)
 #define M_SYS_XPOS                _SB_MAKEMASK(6,S_SYS_XPOS)
 #define V_SYS_XPOS(x)             _SB_MAKEVALUE(x,S_SYS_XPOS)
 #define G_SYS_XPOS(x)             _SB_GETVALUE(x,S_SYS_XPOS,M_SYS_XPOS)
-
+ 
 #define S_SYS_YPOS                _SB_MAKE64(46)
 #define M_SYS_YPOS                _SB_MAKEMASK(6,S_SYS_YPOS)
 #define V_SYS_YPOS(x)             _SB_MAKEVALUE(x,S_SYS_YPOS)
 #define G_SYS_YPOS(x)             _SB_GETVALUE(x,S_SYS_YPOS,M_SYS_YPOS)
 #endif
 
+ 
 /*
  * System Config Register (Table 4-2)
  * Register: SCD_SYSTEM_CFG
@@ -359,13 +361,13 @@ #endif
  */
 
 #define V_SCD_TIMER_FREQ            1000000
-#define V_SCD_TIMER_WIDTH           23
 
 #define S_SCD_TIMER_INIT            0
-#define M_SCD_TIMER_INIT            _SB_MAKEMASK(V_SCD_TIMER_WIDTH,S_SCD_TIMER_INIT)
+#define M_SCD_TIMER_INIT            _SB_MAKEMASK(23,S_SCD_TIMER_INIT)
 #define V_SCD_TIMER_INIT(x)         _SB_MAKEVALUE(x,S_SCD_TIMER_INIT)
 #define G_SCD_TIMER_INIT(x)         _SB_GETVALUE(x,S_SCD_TIMER_INIT,M_SCD_TIMER_INIT)
 
+#define V_SCD_TIMER_WIDTH	    23
 #define S_SCD_TIMER_CNT             0
 #define M_SCD_TIMER_CNT             _SB_MAKEMASK(V_SCD_TIMER_WIDTH,S_SCD_TIMER_CNT)
 #define V_SCD_TIMER_CNT(x)         _SB_MAKEVALUE(x,S_SCD_TIMER_CNT)
@@ -379,7 +381,6 @@ #define M_SCD_TIMER_MODE_CONTINUOUS M_SC
  * System Performance Counters
  */
 
-#if SIBYTE_HDR_FEATURE_1250_112x
 #define S_SPC_CFG_SRC0            0
 #define M_SPC_CFG_SRC0            _SB_MAKEMASK(8,S_SPC_CFG_SRC0)
 #define V_SPC_CFG_SRC0(x)         _SB_MAKEVALUE(x,S_SPC_CFG_SRC0)
@@ -400,6 +401,7 @@ #define M_SPC_CFG_SRC3            _SB_MA
 #define V_SPC_CFG_SRC3(x)         _SB_MAKEVALUE(x,S_SPC_CFG_SRC3)
 #define G_SPC_CFG_SRC3(x)         _SB_GETVALUE(x,S_SPC_CFG_SRC3,M_SPC_CFG_SRC3)
 
+#if SIBYTE_HDR_FEATURE_1250_112x
 #define M_SPC_CFG_CLEAR		_SB_MAKEMASK1(32)
 #define M_SPC_CFG_ENABLE	_SB_MAKEMASK1(33)
 #endif
@@ -515,8 +517,6 @@ #endif	/* 1250/112x */
  * Trace Buffer Config register
  */
 
-#if SIBYTE_HDR_FEATURE_1250_112x
-
 #define M_SCD_TRACE_CFG_RESET           _SB_MAKEMASK1(0)
 #define M_SCD_TRACE_CFG_START_READ      _SB_MAKEMASK1(1)
 #define M_SCD_TRACE_CFG_START           _SB_MAKEMASK1(2)
@@ -525,17 +525,25 @@ #define M_SCD_TRACE_CFG_FREEZE          
 #define M_SCD_TRACE_CFG_FREEZE_FULL     _SB_MAKEMASK1(5)
 #define M_SCD_TRACE_CFG_DEBUG_FULL      _SB_MAKEMASK1(6)
 #define M_SCD_TRACE_CFG_FULL            _SB_MAKEMASK1(7)
-#if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1)
+#if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480)
 #define M_SCD_TRACE_CFG_FORCECNT        _SB_MAKEMASK1(8)
-#endif /* 1250 PASS2 || 112x PASS1 */
+#endif /* 1250 PASS2 || 112x PASS1 || 1480 */
 
+/*
+ * This field is the same on the 1250/112x and 1480, just located in
+ * a slightly different place in the register.
+ */
+#if SIBYTE_HDR_FEATURE_1250_112x
 #define S_SCD_TRACE_CFG_CUR_ADDR        10
+#endif	/* 1250/112x */
+#if SIBYTE_HDR_FEATURE_CHIP(1480)
+#define S_SCD_TRACE_CFG_CUR_ADDR        24
+#endif	/* 1480 */
+
 #define M_SCD_TRACE_CFG_CUR_ADDR        _SB_MAKEMASK(8,S_SCD_TRACE_CFG_CUR_ADDR)
 #define V_SCD_TRACE_CFG_CUR_ADDR(x)     _SB_MAKEVALUE(x,S_SCD_TRACE_CFG_CUR_ADDR)
 #define G_SCD_TRACE_CFG_CUR_ADDR(x)     _SB_GETVALUE(x,S_SCD_TRACE_CFG_CUR_ADDR,M_SCD_TRACE_CFG_CUR_ADDR)
 
-#endif	/* 1250/112x */
-
 /*
  * Trace Event registers
  */
diff --git a/include/asm-mips/sibyte/sb1250_smbus.h b/include/asm-mips/sibyte/sb1250_smbus.h
index 279a912..e95636e 100644
--- a/include/asm-mips/sibyte/sb1250_smbus.h
+++ b/include/asm-mips/sibyte/sb1250_smbus.h
@@ -1,22 +1,22 @@
 /*  *********************************************************************
     *  SB1250 Board Support Package
-    *
+    *  
     *  SMBUS Constants                          File: sb1250_smbus.h
-    *
-    *  This module contains constants and macros useful for
+    *  
+    *  This module contains constants and macros useful for 
     *  manipulating the SB1250's SMbus devices.
-    *
+    *  
     *  SB1250 specification level:  10/21/02
     *  BCM1280 specification level:  11/24/03
-    *
-    *********************************************************************
+    *  
+    *********************************************************************  
     *
     *  Copyright 2000,2001,2002,2003
     *  Broadcom Corporation. All rights reserved.
-    *
-    *  This program is free software; you can redistribute it and/or
-    *  modify it under the terms of the GNU General Public License as
-    *  published by the Free Software Foundation; either version 2 of
+    *  
+    *  This program is free software; you can redistribute it and/or 
+    *  modify it under the terms of the GNU General Public License as 
+    *  published by the Free Software Foundation; either version 2 of 
     *  the License, or (at your option) any later version.
     *
     *  This program is distributed in the hope that it will be useful,
@@ -26,7 +26,7 @@
     *
     *  You should have received a copy of the GNU General Public License
     *  along with this program; if not, write to the Free Software
-    *  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+    *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
     *  MA 02111-1307 USA
     ********************************************************************* */
 
diff --git a/include/asm-mips/sibyte/sb1250_syncser.h b/include/asm-mips/sibyte/sb1250_syncser.h
index dd154ac..6a1d554 100644
--- a/include/asm-mips/sibyte/sb1250_syncser.h
+++ b/include/asm-mips/sibyte/sb1250_syncser.h
@@ -7,15 +7,15 @@
     *  manipulating the SB1250's Synchronous Serial
     *
     *  SB1250 specification level:  User's manual 1/02/02
-    *
+    *  
     *********************************************************************
     *
     *  Copyright 2000,2001,2002,2003
     *  Broadcom Corporation. All rights reserved.
-    *
-    *  This program is free software; you can redistribute it and/or
-    *  modify it under the terms of the GNU General Public License as
-    *  published by the Free Software Foundation; either version 2 of
+    *  
+    *  This program is free software; you can redistribute it and/or 
+    *  modify it under the terms of the GNU General Public License as 
+    *  published by the Free Software Foundation; either version 2 of 
     *  the License, or (at your option) any later version.
     *
     *  This program is distributed in the hope that it will be useful,
@@ -25,7 +25,7 @@
     *
     *  You should have received a copy of the GNU General Public License
     *  along with this program; if not, write to the Free Software
-    *  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+    *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
     *  MA 02111-1307 USA
     ********************************************************************* */
 
diff --git a/include/asm-mips/sibyte/sb1250_uart.h b/include/asm-mips/sibyte/sb1250_uart.h
index e87045e..a2cea2a 100644
--- a/include/asm-mips/sibyte/sb1250_uart.h
+++ b/include/asm-mips/sibyte/sb1250_uart.h
@@ -1,21 +1,21 @@
 /*  *********************************************************************
     *  SB1250 Board Support Package
-    *
+    *  
     *  UART Constants				File: sb1250_uart.h
-    *
-    *  This module contains constants and macros useful for
+    *  
+    *  This module contains constants and macros useful for 
     *  manipulating the SB1250's UARTs
     *
     *  SB1250 specification level:  User's manual 1/02/02
-    *
-    *********************************************************************
+    *  
+    *********************************************************************  
     *
     *  Copyright 2000,2001,2002,2003
     *  Broadcom Corporation. All rights reserved.
-    *
-    *  This program is free software; you can redistribute it and/or
-    *  modify it under the terms of the GNU General Public License as
-    *  published by the Free Software Foundation; either version 2 of
+    *  
+    *  This program is free software; you can redistribute it and/or 
+    *  modify it under the terms of the GNU General Public License as 
+    *  published by the Free Software Foundation; either version 2 of 
     *  the License, or (at your option) any later version.
     *
     *  This program is distributed in the hope that it will be useful,
@@ -25,7 +25,7 @@
     *
     *  You should have received a copy of the GNU General Public License
     *  along with this program; if not, write to the Free Software
-    *  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+    *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
     *  MA 02111-1307 USA
     ********************************************************************* */
 
@@ -35,7 +35,7 @@ #define _SB1250_UART_H
 
 #include "sb1250_defs.h"
 
-/* **********************************************************************
+/* ********************************************************************** 
    * DUART Registers
    ********************************************************************** */
 
@@ -143,7 +143,7 @@ #define V_DUART_MISC_CMD_RESET_BREAK_INT
 #define V_DUART_MISC_CMD_START_BREAK     V_DUART_MISC_CMD(K_DUART_MISC_CMD_START_BREAK)
 #define V_DUART_MISC_CMD_STOP_BREAK      V_DUART_MISC_CMD(K_DUART_MISC_CMD_STOP_BREAK)
 
-#define M_DUART_CMD_RESERVED             _SB_MAKEMASK1(7)
+#define M_DUART_CMD_RESERVED             _SB_MAKEMASK1(7) 
 
 /*
  * DUART Status Register (Table 10-6)
@@ -163,7 +163,7 @@ #define M_DUART_RCVD_BRK            _SB_
 
 /*
  * DUART Baud Rate Register (Table 10-7)
- * Register: DUART_CLK_SEL_A
+ * Register: DUART_CLK_SEL_A 
  * Register: DUART_CLK_SEL_B
  */
 
@@ -335,7 +335,7 @@ #define M_DUART_OUT_PIN_CLR(chan) \
     (chan == 0 ? M_DUART_OUT_PIN_CLR0 : M_DUART_OUT_PIN_CLR1)
 
 #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480)
-/*
+/* 
  * Full Interrupt Control Register
  */
 
diff --git a/include/asm-mips/sibyte/sentosa.h b/include/asm-mips/sibyte/sentosa.h
diff --git a/include/asm-mips/sibyte/swarm.h b/include/asm-mips/sibyte/swarm.h
index 86db37e..540865f 100644
--- a/include/asm-mips/sibyte/swarm.h
+++ b/include/asm-mips/sibyte/swarm.h
@@ -32,6 +32,18 @@ #define SIBYTE_HAVE_PCMCIA 1
 #define SIBYTE_HAVE_IDE    1
 #define SIBYTE_DEFAULT_CONSOLE "ttyS0,115200"
 #endif
+#ifdef CONFIG_SIBYTE_PT1120
+#define SIBYTE_BOARD_NAME "PT1120"
+#define SIBYTE_HAVE_PCMCIA 1
+#define SIBYTE_HAVE_IDE    1
+#define SIBYTE_DEFAULT_CONSOLE "ttyS0,115200"
+#endif
+#ifdef CONFIG_SIBYTE_PT1125
+#define SIBYTE_BOARD_NAME "PT1125"
+#define SIBYTE_HAVE_PCMCIA 1
+#define SIBYTE_HAVE_IDE    1
+#define SIBYTE_DEFAULT_CONSOLE "ttyS0,115200"
+#endif
 #ifdef CONFIG_SIBYTE_LITTLESUR
 #define SIBYTE_BOARD_NAME "BCM91250C2 (LittleSur)"
 #define SIBYTE_HAVE_PCMCIA 0



From chandave-linux-mips@wiasia.com Fri Jan  5 06:14:36 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 05 Jan 2007 06:14:41 +0000 (GMT)
Received: from cwb.pacific.net.hk ([202.14.67.92]:62862 "EHLO
	cwb.pacific.net.hk") by ftp.linux-mips.org with ESMTP
	id S20043178AbXAEGOg (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Fri, 5 Jan 2007 06:14:36 +0000
Received: from shockwave.dccext.org (ip155.bb203.pacific.net.hk [202.64.203.155])
        by cwb.pacific.net.hk with ESMTP
        id l056EQZ8015314; Fri, 5 Jan 2007 14:14:26 +0800
Received: (from root@localhost)
	by shockwave.dccext.org (8.11.4/8.11.4) id l056EDQ14986;
	Fri, 5 Jan 2007 14:14:13 +0800 (HKT)
Date:	Fri, 5 Jan 2007 13:56:46 +0800
From:	Davy Chan <chandave-linux-mips@wiasia.com>
To:	ralf@linux-mips.org
Cc:	linux-mips@linux-mips.org
Subject: [PATCH] pnx8550: Fix broken write_config_byte() function in arch/mips/pci/ops-pnx8550.c
Message-ID: <20070105135646.D14007@wiasia.com>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="RnlQjJ0d97Da+TV1"
Content-Disposition: inline
User-Agent: Mutt/1.2.5.1i
Return-Path: <chandave-linux-mips@wiasia.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13545
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: chandave-linux-mips@wiasia.com
Precedence: bulk
X-list: linux-mips


--RnlQjJ0d97Da+TV1
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

(Looks like not many people write single bytes to the PCI configuration
 registers on a PNX8550-based system.)

There's a serious typo in the function:
  arch/mips/pci/ops-pnx8550.c:write_config_byte()

The parameter passed to the function config_access() is PCI_CMD_CONFIG_READ
instead of PCI_CMD_CONFIG_WRITE. This renders any attempts to write
a single byte to the PCI configuration registers useless.

This problem does not exist for write_config_word() nor write_config_dword().

This problem has been there since kernel v2.6.17 and is still there
as of kernel v2.6.19.1.

Patch attached.

See ya...

d.c.


--RnlQjJ0d97Da+TV1
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="ops-pnx8550.c.patch"

--- linux-2.6.17.13-orig/arch/mips/pci/ops-pnx8550.c	2006-09-10 01:17:04.000000000 +0800
+++ linux-2.6.17.13/arch/mips/pci/ops-pnx8550.c	2007-01-04 13:49:37.000000000 +0800
@@ -202,7 +202,7 @@
 		break;
 	}
 
-	err = config_access(PCI_CMD_CONFIG_READ, bus, devfn, where, ~(1 << (where & 3)), &data);
+	err = config_access(PCI_CMD_CONFIG_WRITE, bus, devfn, where, ~(1 << (where & 3)), &data);
 
 	return err;
 }

--RnlQjJ0d97Da+TV1--




From anemo@mba.ocn.ne.jp Fri Jan  5 16:23:11 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 05 Jan 2007 16:23:15 +0000 (GMT)
Received: from mba.ocn.ne.jp ([210.190.142.172]:65501 "HELO smtp.mba.ocn.ne.jp")
	by ftp.linux-mips.org with SMTP id S28581818AbXAEQXL (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Fri, 5 Jan 2007 16:23:11 +0000
Received: from localhost (p1005-ipad209funabasi.chiba.ocn.ne.jp [58.88.112.5])
	by smtp.mba.ocn.ne.jp (Postfix) with ESMTP
	id 4767AF4D6; Sat,  6 Jan 2007 01:23:06 +0900 (JST)
Date:	Sat, 06 Jan 2007 01:23:06 +0900 (JST)
Message-Id: <20070106.012306.126936273.anemo@mba.ocn.ne.jp>
To:	linux-mips@linux-mips.org
Cc:	ralf@linux-mips.org
Subject: Re: [PATCH 1/3] Fix csum_partial_copy_from_user (take 2)
From:	Atsushi Nemoto <anemo@mba.ocn.ne.jp>
In-Reply-To: <20061229.013145.126760356.anemo@mba.ocn.ne.jp>
References: <20061227.005407.59032424.anemo@mba.ocn.ne.jp>
	<20061228.003413.27954771.anemo@mba.ocn.ne.jp>
	<20061229.013145.126760356.anemo@mba.ocn.ne.jp>
X-Fingerprint: 6ACA 1623 39BD 9A94 9B1A  B746 CA77 FE94 2874 D52F
X-Pgp-Public-Key: http://wwwkeys.pgp.net/pks/lookup?op=get&search=0x2874D52F
X-Mailer: Mew version 3.3 on Emacs 21.4 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Return-Path: <anemo@mba.ocn.ne.jp>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13546
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: anemo@mba.ocn.ne.jp
Precedence: bulk
X-list: linux-mips

On Fri, 29 Dec 2006 01:31:45 +0900 (JST), Atsushi Nemoto <anemo@mba.ocn.ne.jp> wrote:
> On Thu, 28 Dec 2006 00:34:13 +0900 (JST), Atsushi Nemoto <anemo@mba.ocn.ne.jp> wrote:
> > I forgot to change function names in comment block.  Revised.
> 
> Revised again.  Fix "warning: cast adds address space to expression"
> sparse warnings.

Revised again and again...  Fix a function name in comment block
correctly.


Subject: [PATCH 1/3] Fix csum_partial_copy_from_user (take 2)

I found that asm version of csum_partial_copy_from_user() introduced
in e9e016815f264227b6260f77ca84f1c43cf8b9bd was less effective.

For csum_partial_copy_from_user() case, "both_aligned" 8-word copy/sum
loop block is skipped to handle LOAD failure properly, and 4-word
copy/sum block is not loop, thus we will loop at ineffective
"less_than_4units" block.

This patch re-arrange register usages so that t0-t7 can be used in
"both_aligned" loop.  This makes "both_aligned" loop can be used for
copy_from_user case too.  This patch also cleanup codes around entry
point.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
---
 arch/mips/lib/csum_partial.S |   77 +++++++++++++++--------------------------
 include/asm-mips/checksum.h  |   12 +++---
 2 files changed, 36 insertions(+), 53 deletions(-)

diff --git a/arch/mips/lib/csum_partial.S b/arch/mips/lib/csum_partial.S
index ec0744d..c0a77fe 100644
--- a/arch/mips/lib/csum_partial.S
+++ b/arch/mips/lib/csum_partial.S
@@ -279,8 +279,7 @@ #endif
  * checksum and copy routines based on memcpy.S
  *
  *	csum_partial_copy_nocheck(src, dst, len, sum)
- *	__csum_partial_copy_from_user(src, dst, len, sum, errp)
- *	__csum_and_copy_to_user(src, dst, len, sum, errp)
+ *	__csum_partial_copy_user(src, dst, len, sum, errp)
  *
  * See "Spec" in memcpy.S for details.  Unlike __copy_user, all
  * function in this file use the standard calling convention.
@@ -291,8 +290,8 @@ #define dst a1
 #define len a2
 #define psum a3
 #define sum v0
-#define odd t5
-#define errptr t6
+#define odd t8
+#define errptr t9
 
 /*
  * The exception handler for loads requires that:
@@ -376,30 +375,20 @@ #define ADDRMASK (NBYTES-1)
 
 	.set	noat
 
-LEAF(csum_partial_copy_nocheck)
-	move	AT, zero
-	b	__csum_partial_copy
-	 move	errptr, zero
-FEXPORT(__csum_partial_copy_from_user)
-	b	__csum_partial_copy_user
-	 PTR_ADDU	AT, src, len	/* See (1) above. */
-FEXPORT(__csum_and_copy_to_user)
-	move	AT, zero
-__csum_partial_copy_user:
+LEAF(__csum_partial_copy_user)
+	PTR_ADDU	AT, src, len	/* See (1) above. */
 #ifdef CONFIG_64BIT
 	move	errptr, a4
 #else
 	lw	errptr, 16(sp)
 #endif
-__csum_partial_copy:
+FEXPORT(csum_partial_copy_nocheck)
 	move	sum, zero
 	move	odd, zero
 	/*
 	 * Note: dst & src may be unaligned, len may be 0
 	 * Temps
 	 */
-#define rem t8
-
 	/*
 	 * The "issue break"s below are very approximate.
 	 * Issue delays for dcache fills will perturb the schedule, as will
@@ -422,51 +411,45 @@ #define rem t8
 both_aligned:
 	 SRL	t0, len, LOG_NBYTES+3    # +3 for 8 units/iter
 	beqz	t0, cleanup_both_aligned # len < 8*NBYTES
-	 and	rem, len, (8*NBYTES-1)	 # rem = len % (8*NBYTES)
-	/*
-	 * We can not do this loop if LOAD might fail, otherwize
-	 * l_exc_copy can not calclate sum correctly.
-	 * AT==0 means LOAD should not fail.
-	 */
-	bnez	AT, cleanup_both_aligned
 	 nop
+	SUB	len, 8*NBYTES		# subtract here for bgez loop
 	.align	4
 1:
-	LOAD	t0, UNIT(0)(src)
-	LOAD	t1, UNIT(1)(src)
-	LOAD	t2, UNIT(2)(src)
-	LOAD	t3, UNIT(3)(src)
+EXC(	LOAD	t0, UNIT(0)(src),	l_exc)
+EXC(	LOAD	t1, UNIT(1)(src),	l_exc_copy)
+EXC(	LOAD	t2, UNIT(2)(src),	l_exc_copy)
+EXC(	LOAD	t3, UNIT(3)(src),	l_exc_copy)
+EXC(	LOAD	t4, UNIT(4)(src),	l_exc_copy)
+EXC(	LOAD	t5, UNIT(5)(src),	l_exc_copy)
+EXC(	LOAD	t6, UNIT(6)(src),	l_exc_copy)
+EXC(	LOAD	t7, UNIT(7)(src),	l_exc_copy)
 	SUB	len, len, 8*NBYTES
-	LOAD	t4, UNIT(4)(src)
-	LOAD	t7, UNIT(5)(src)
+	ADD	src, src, 8*NBYTES
 EXC(	STORE	t0, UNIT(0)(dst),	s_exc)
 	ADDC(sum, t0)
 EXC(	STORE	t1, UNIT(1)(dst),	s_exc)
 	ADDC(sum, t1)
-	LOAD	t0, UNIT(6)(src)
-	LOAD	t1, UNIT(7)(src)
-	ADD	src, src, 8*NBYTES
-	ADD	dst, dst, 8*NBYTES
-EXC(	STORE	t2, UNIT(-6)(dst),	s_exc)
+EXC(	STORE	t2, UNIT(2)(dst),	s_exc)
 	ADDC(sum, t2)
-EXC(	STORE	t3, UNIT(-5)(dst),	s_exc)
+EXC(	STORE	t3, UNIT(3)(dst),	s_exc)
 	ADDC(sum, t3)
-EXC(	STORE	t4, UNIT(-4)(dst),	s_exc)
+EXC(	STORE	t4, UNIT(4)(dst),	s_exc)
 	ADDC(sum, t4)
-EXC(	STORE	t7, UNIT(-3)(dst),	s_exc)
+EXC(	STORE	t5, UNIT(5)(dst),	s_exc)
+	ADDC(sum, t5)
+EXC(	STORE	t6, UNIT(6)(dst),	s_exc)
+	ADDC(sum, t6)
+EXC(	STORE	t7, UNIT(7)(dst),	s_exc)
 	ADDC(sum, t7)
-EXC(	STORE	t0, UNIT(-2)(dst),	s_exc)
-	ADDC(sum, t0)
-EXC(	STORE	t1, UNIT(-1)(dst),	s_exc)
-	.set reorder
-	ADDC(sum, t1)
-	bne	len, rem, 1b
-	.set noreorder
+	bgez	len, 1b
+	 ADD	dst, dst, 8*NBYTES
+	ADD	len, 8*NBYTES		# revert len (see above)
 
 	/*
-	 * len == rem == the number of bytes left to copy < 8*NBYTES
+	 * len == the number of bytes left to copy < 8*NBYTES
 	 */
 cleanup_both_aligned:
+#define rem t7
 	beqz	len, done
 	 sltu	t0, len, 4*NBYTES
 	bnez	t0, less_than_4units
@@ -729,4 +712,4 @@ s_exc:
 	li	v1, -EFAULT
 	jr	ra
 	 sw	v1, (errptr)
-	END(csum_partial_copy_nocheck)
+	END(__csum_partial_copy_user)
diff --git a/include/asm-mips/checksum.h b/include/asm-mips/checksum.h
index 6596fe6..24cdcc6 100644
--- a/include/asm-mips/checksum.h
+++ b/include/asm-mips/checksum.h
@@ -29,10 +29,8 @@ #include <asm/uaccess.h>
  */
 __wsum csum_partial(const void *buff, int len, __wsum sum);
 
-__wsum __csum_partial_copy_from_user(const void __user *src, void *dst,
-				     int len, __wsum sum, int *err_ptr);
-__wsum __csum_and_copy_to_user(const void *src, void __user *dst,
-			       int len, __wsum sum, int *err_ptr);
+__wsum __csum_partial_copy_user(const void *src, void *dst,
+				int len, __wsum sum, int *err_ptr);
 
 /*
  * this is a new version of the above that records errors it finds in *errp,
@@ -43,7 +41,8 @@ __wsum csum_partial_copy_from_user(const
 				   __wsum sum, int *err_ptr)
 {
 	might_sleep();
-	return __csum_partial_copy_from_user(src, dst, len, sum, err_ptr);
+	return __csum_partial_copy_user((__force void *)src, dst,
+					len, sum, err_ptr);
 }
 
 /*
@@ -56,7 +55,8 @@ __wsum csum_and_copy_to_user(const void 
 {
 	might_sleep();
 	if (access_ok(VERIFY_WRITE, dst, len))
-		return __csum_and_copy_to_user(src, dst, len, sum, err_ptr);
+		return __csum_partial_copy_user(src, (__force void *)dst,
+						len, sum, err_ptr);
 	if (len)
 		*err_ptr = -EFAULT;
 

From demiourgos@gmail.com Sun Jan  7 10:57:03 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Sun, 07 Jan 2007 10:57:08 +0000 (GMT)
Received: from ug-out-1314.google.com ([66.249.92.174]:20285 "EHLO
	ug-out-1314.google.com") by ftp.linux-mips.org with ESMTP
	id S20041940AbXAGK5D (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Sun, 7 Jan 2007 10:57:03 +0000
Received: by ug-out-1314.google.com with SMTP id 40so7038577uga
        for <linux-mips@linux-mips.org>; Sun, 07 Jan 2007 02:57:03 -0800 (PST)
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
        s=beta; d=gmail.com;
        h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition;
        b=cN/D9KjWll59kasE3oStCudmunkJyKzyDvUDYpKvZrTZBWFNTlLgS9cjIPdlmbLxJdDYlHwgSfQkqDMbFLpORBiI7y61gx9MahMbb6lOvV53aFhcCoynp8JzwGaEHSD6y+OYUrNOLEdmMwzB5UN5rJmrAu4eZvcHT3xuCJ+NBUw=
Received: by 10.78.201.15 with SMTP id y15mr3716427huf.1168167422899;
        Sun, 07 Jan 2007 02:57:02 -0800 (PST)
Received: by 10.78.43.2 with HTTP; Sun, 7 Jan 2007 02:57:02 -0800 (PST)
Message-ID: <c4357ccd0701070257u73994becy81976a64e2eadabb@mail.gmail.com>
Date:	Sun, 7 Jan 2007 12:57:02 +0200
From:	"Alexander Sirotkin" <demiourgos@gmail.com>
To:	linux-mips@linux-mips.org
Subject: network hardware accelerators
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Return-Path: <demiourgos@gmail.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13547
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: demiourgos@gmail.com
Precedence: bulk
X-list: linux-mips

Hello.

I'd like to know LinuxMIPS community opinion on network hardware
accelerators. I'm not talking about VPN accelerators, there is plenty
of material on the subject on the net and the benefits are quite
clear, as well as potential problems.

There is a claim that in order to do wire-speed, i.e. 100Mbps, router
using not high-end embedded processor, say MIPS 4K or 24K, one has to
use hardware accelerators for firewall, NAT, bridging and other
standard networking features of the residential gateway. I know that
the idea of HW network accelerators is not very welcome in Linux
community and the problems in functionality that it can cause. But the
question still remains - whether 100Mbps firewall, NAT, etc can run on
moderately priced embedded processor without HW acceleration.

Opinions ?

I'm going to get my hands on a reference design board in order to do
some benchmarking, but maybe somebody saw these kinds of benchmarks on
the net ? There are quite a few processors we are looking at and it
would be problematic to benchmark them all.

Thanks.

From anemo@mba.ocn.ne.jp Sun Jan  7 15:20:27 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Sun, 07 Jan 2007 15:20:32 +0000 (GMT)
Received: from mba.ocn.ne.jp ([210.190.142.172]:4288 "HELO smtp.mba.ocn.ne.jp")
	by ftp.linux-mips.org with SMTP id S28576110AbXAGPU1 (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Sun, 7 Jan 2007 15:20:27 +0000
Received: from localhost (p2249-ipad204funabasi.chiba.ocn.ne.jp [222.146.89.249])
	by smtp.mba.ocn.ne.jp (Postfix) with ESMTP
	id EB3F5E9BB; Mon,  8 Jan 2007 00:20:23 +0900 (JST)
Date:	Mon, 08 Jan 2007 00:20:24 +0900 (JST)
Message-Id: <20070108.002024.75184927.anemo@mba.ocn.ne.jp>
To:	linux-mips@linux-mips.org
Cc:	ralf@linux-mips.org
Subject: [PATCH] Remove unused rm9k_cpu_irq_disable()
From:	Atsushi Nemoto <anemo@mba.ocn.ne.jp>
X-Fingerprint: 6ACA 1623 39BD 9A94 9B1A  B746 CA77 FE94 2874 D52F
X-Pgp-Public-Key: http://wwwkeys.pgp.net/pks/lookup?op=get&search=0x2874D52F
X-Mailer: Mew version 3.3 on Emacs 21.4 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Return-Path: <anemo@mba.ocn.ne.jp>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13548
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: anemo@mba.ocn.ne.jp
Precedence: bulk
X-list: linux-mips

rm9k_cpu_irq_disable() is unused since commit
1603b5aca4f15b34848fb5594d0c7b6333b99144.  Remove it.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
---
diff --git a/arch/mips/kernel/irq-rm9000.c b/arch/mips/kernel/irq-rm9000.c
index 0e6f4c5..2e68e4b 100644
--- a/arch/mips/kernel/irq-rm9000.c
+++ b/arch/mips/kernel/irq-rm9000.c
@@ -39,15 +39,6 @@ static inline void rm9k_cpu_irq_enable(u
 	local_irq_restore(flags);
 }
 
-static void rm9k_cpu_irq_disable(unsigned int irq)
-{
-	unsigned long flags;
-
-	local_irq_save(flags);
-	mask_rm9k_irq(irq);
-	local_irq_restore(flags);
-}
-
 /*
  * Performance counter interrupts are global on all processors.
  */

From anemo@mba.ocn.ne.jp Sun Jan  7 15:50:38 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Sun, 07 Jan 2007 15:50:43 +0000 (GMT)
Received: from mba.ocn.ne.jp ([210.190.142.172]:5363 "HELO smtp.mba.ocn.ne.jp")
	by ftp.linux-mips.org with SMTP id S28640979AbXAGPui (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Sun, 7 Jan 2007 15:50:38 +0000
Received: from localhost (p2249-ipad204funabasi.chiba.ocn.ne.jp [222.146.89.249])
	by smtp.mba.ocn.ne.jp (Postfix) with ESMTP
	id 26F82EF12; Mon,  8 Jan 2007 00:50:34 +0900 (JST)
Date:	Mon, 08 Jan 2007 00:50:34 +0900 (JST)
Message-Id: <20070108.005034.104640508.anemo@mba.ocn.ne.jp>
To:	linux-mips@linux-mips.org
Cc:	ralf@linux-mips.org
Subject: [PATCH] SMTC build fix
From:	Atsushi Nemoto <anemo@mba.ocn.ne.jp>
X-Fingerprint: 6ACA 1623 39BD 9A94 9B1A  B746 CA77 FE94 2874 D52F
X-Pgp-Public-Key: http://wwwkeys.pgp.net/pks/lookup?op=get&search=0x2874D52F
X-Mailer: Mew version 3.3 on Emacs 21.4 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Return-Path: <anemo@mba.ocn.ne.jp>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13549
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: anemo@mba.ocn.ne.jp
Precedence: bulk
X-list: linux-mips

Pass "irq" to __DO_IRQ_SMTC_HOOK() macro.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
---
diff --git a/include/asm-mips/irq.h b/include/asm-mips/irq.h
index 6765708..386da82 100644
--- a/include/asm-mips/irq.h
+++ b/include/asm-mips/irq.h
@@ -31,14 +31,14 @@ static inline int irq_canonicalize(int i
  * functions will take over re-enabling the low-level mask.
  * Otherwise it will be done on return from exception.
  */
-#define __DO_IRQ_SMTC_HOOK()						\
+#define __DO_IRQ_SMTC_HOOK(irq)						\
 do {									\
 	if (irq_hwmask[irq] & 0x0000ff00)				\
 		write_c0_tccontext(read_c0_tccontext() &		\
 		                   ~(irq_hwmask[irq] & 0x0000ff00));	\
 } while (0)
 #else
-#define __DO_IRQ_SMTC_HOOK() do { } while (0)
+#define __DO_IRQ_SMTC_HOOK(irq) do { } while (0)
 #endif
 
 /*
@@ -52,7 +52,7 @@ do {									\
 #define do_IRQ(irq)							\
 do {									\
 	irq_enter();							\
-	__DO_IRQ_SMTC_HOOK();						\
+	__DO_IRQ_SMTC_HOOK(irq);					\
 	generic_handle_irq(irq);					\
 	irq_exit();							\
 } while (0)

From anemo@mba.ocn.ne.jp Sun Jan  7 16:27:43 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Sun, 07 Jan 2007 16:27:48 +0000 (GMT)
Received: from mba.ocn.ne.jp ([210.190.142.172]:17105 "HELO smtp.mba.ocn.ne.jp")
	by ftp.linux-mips.org with SMTP id S28576383AbXAGQ1n (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Sun, 7 Jan 2007 16:27:43 +0000
Received: from localhost (p2249-ipad204funabasi.chiba.ocn.ne.jp [222.146.89.249])
	by smtp.mba.ocn.ne.jp (Postfix) with ESMTP
	id 66C41C8ED; Mon,  8 Jan 2007 01:27:39 +0900 (JST)
Date:	Mon, 08 Jan 2007 01:27:40 +0900 (JST)
Message-Id: <20070108.012740.30187488.anemo@mba.ocn.ne.jp>
To:	linux-mips@linux-mips.org
Cc:	ralf@linux-mips.org
Subject: [PATCH] Fix build errors on SEAD
From:	Atsushi Nemoto <anemo@mba.ocn.ne.jp>
X-Fingerprint: 6ACA 1623 39BD 9A94 9B1A  B746 CA77 FE94 2874 D52F
X-Pgp-Public-Key: http://wwwkeys.pgp.net/pks/lookup?op=get&search=0x2874D52F
X-Mailer: Mew version 3.3 on Emacs 21.4 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Return-Path: <anemo@mba.ocn.ne.jp>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13550
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: anemo@mba.ocn.ne.jp
Precedence: bulk
X-list: linux-mips

Quick and dirty fix for build errors on SEAD.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
---
diff --git a/arch/mips/mips-boards/generic/time.c b/arch/mips/mips-boards/generic/time.c
index e4604c7..a3c3a1d 100644
--- a/arch/mips/mips-boards/generic/time.c
+++ b/arch/mips/mips-boards/generic/time.c
@@ -47,6 +47,9 @@
 #ifdef CONFIG_MIPS_MALTA
 #include <asm/mips-boards/maltaint.h>
 #endif
+#ifdef CONFIG_MIPS_SEAD
+#include <asm/mips-boards/seadint.h>
+#endif
 
 unsigned long cpu_khz;
 
@@ -263,11 +266,13 @@ void __init mips_time_init(void)
 
 void __init plat_timer_setup(struct irqaction *irq)
 {
+#ifdef MSC01E_INT_BASE
 	if (cpu_has_veic) {
 		set_vi_handler (MSC01E_INT_CPUCTR, mips_timer_dispatch);
 		mips_cpu_timer_irq = MSC01E_INT_BASE + MSC01E_INT_CPUCTR;
-	}
-	else {
+	} else
+#endif
+	{
 		if (cpu_has_vint)
 			set_vi_handler (MIPSCPU_INT_CPUCTR, mips_timer_dispatch);
 		mips_cpu_timer_irq = MIPSCPU_INT_BASE + MIPSCPU_INT_CPUCTR;
diff --git a/arch/mips/mips-boards/sead/sead_int.c b/arch/mips/mips-boards/sead/sead_int.c
index f445fcd..874ccb0 100644
--- a/arch/mips/mips-boards/sead/sead_int.c
+++ b/arch/mips/mips-boards/sead/sead_int.c
@@ -21,7 +21,7 @@
  * Sead board.
  */
 #include <linux/init.h>
-#include <linux/irq.h>
+#include <linux/interrupt.h>
 
 #include <asm/irq_cpu.h>
 #include <asm/mipsregs.h>
@@ -108,7 +108,7 @@ asmlinkage void plat_irq_dispatch(void)
 	if (irq >= 0)
 		do_IRQ(MIPSCPU_INT_BASE + irq);
 	else
-		spurious_interrupt(regs);
+		spurious_interrupt();
 }
 
 void __init arch_init_irq(void)

From anemo@mba.ocn.ne.jp Sun Jan  7 17:14:33 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Sun, 07 Jan 2007 17:14:39 +0000 (GMT)
Received: from mba.ocn.ne.jp ([210.190.142.172]:46275 "HELO smtp.mba.ocn.ne.jp")
	by ftp.linux-mips.org with SMTP id S20042615AbXAGROd (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Sun, 7 Jan 2007 17:14:33 +0000
Received: from localhost (p2249-ipad204funabasi.chiba.ocn.ne.jp [222.146.89.249])
	by smtp.mba.ocn.ne.jp (Postfix) with ESMTP
	id 3BE3AE5E2; Mon,  8 Jan 2007 02:14:28 +0900 (JST)
Date:	Mon, 08 Jan 2007 02:14:29 +0900 (JST)
Message-Id: <20070108.021429.78706014.anemo@mba.ocn.ne.jp>
To:	linux-mips@linux-mips.org
Cc:	ralf@linux-mips.org
Subject: [PATCH] Define MIPS_CPU_IRQ_BASE in generic header
From:	Atsushi Nemoto <anemo@mba.ocn.ne.jp>
X-Fingerprint: 6ACA 1623 39BD 9A94 9B1A  B746 CA77 FE94 2874 D52F
X-Pgp-Public-Key: http://wwwkeys.pgp.net/pks/lookup?op=get&search=0x2874D52F
X-Mailer: Mew version 3.3 on Emacs 21.4 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Return-Path: <anemo@mba.ocn.ne.jp>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13551
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: anemo@mba.ocn.ne.jp
Precedence: bulk
X-list: linux-mips

The irq_base for {mips,rm7k,rm9k}_cpu_irq_init() are constant on all
platforms and are same value on most platforms (0 or 16, depends on
CONFIG_I8259).  Define them in asm-mips/mach-generic/irq.h and make
them customizable.  This will save a few cycle on each CPU interrupt.

A good side effect is removing some dependencies to MALTA in generic
SMTC code.

Although MIPS_CPU_IRQ_BASE is customizable, this patch changes irq
mappings on DDB5477, EMMA2RH and MIPS_SIM, since really customizing
them might cause some header dependency problem and there seems no
good reason to customize it.  So currently only VR41XX is using custom
MIPS_CPU_IRQ_BASE value, which is 0 regardless of CONFIG_I8259.

Testing this patch on those platforms is greatly appreciated.  Thank
you.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
---
 arch/mips/basler/excite/excite_irq.c    |    6 +++---
 arch/mips/cobalt/irq.c                  |    2 +-
 arch/mips/ddb5xxx/ddb5477/irq.c         |    4 ++--
 arch/mips/dec/setup.c                   |   12 ++++++------
 arch/mips/emma2rh/markeins/irq.c        |    2 +-
 arch/mips/gt64120/momenco_ocelot/irq.c  |    4 ++--
 arch/mips/gt64120/wrppmc/irq.c          |    2 +-
 arch/mips/kernel/irq-rm7000.c           |   11 ++++-------
 arch/mips/kernel/irq-rm9000.c           |   11 ++++-------
 arch/mips/kernel/irq_cpu.c              |   17 +++++++----------
 arch/mips/kernel/rtlx.c                 |    4 ++--
 arch/mips/kernel/smp-mt.c               |    9 ++++-----
 arch/mips/kernel/smtc.c                 |   12 +-----------
 arch/mips/mips-boards/atlas/atlas_int.c |    2 +-
 arch/mips/mips-boards/malta/malta_int.c |    2 +-
 arch/mips/mips-boards/sead/sead_int.c   |    2 +-
 arch/mips/mips-boards/sim/sim_int.c     |    6 ++----
 arch/mips/momentum/jaguar_atx/irq.c     |    4 ++--
 arch/mips/momentum/ocelot_3/irq.c       |    2 +-
 arch/mips/momentum/ocelot_c/irq.c       |    2 +-
 arch/mips/momentum/ocelot_g/irq.c       |    4 ++--
 arch/mips/pmc-sierra/yosemite/irq.c     |    6 +++---
 arch/mips/sgi-ip22/ip22-int.c           |    5 ++---
 arch/mips/vr41xx/common/irq.c           |    2 +-
 include/asm-mips/ddb5xxx/ddb5477.h      |    5 +++--
 include/asm-mips/dec/interrupts.h       |    3 ++-
 include/asm-mips/emma2rh/emma2rh.h      |    5 ++++-
 include/asm-mips/emma2rh/markeins.h     |    1 -
 include/asm-mips/irq_cpu.h              |    6 +++---
 include/asm-mips/mach-cobalt/cobalt.h   |    4 +++-
 include/asm-mips/mach-emma2rh/irq.h     |    2 ++
 include/asm-mips/mach-generic/irq.h     |   26 ++++++++++++++++++++++++++
 include/asm-mips/mach-mips/irq.h        |    2 ++
 include/asm-mips/mach-vr41xx/irq.h      |    8 ++++++++
 include/asm-mips/mips-boards/atlasint.h |    4 +++-
 include/asm-mips/mips-boards/maltaint.h |    4 +++-
 include/asm-mips/mips-boards/seadint.h  |    4 +++-
 include/asm-mips/mips-boards/simint.h   |    3 ++-
 include/asm-mips/rtlx.h                 |    3 ++-
 include/asm-mips/sgi/ip22.h             |   13 +++++++------
 40 files changed, 128 insertions(+), 98 deletions(-)

diff --git a/arch/mips/basler/excite/excite_irq.c b/arch/mips/basler/excite/excite_irq.c
index 2e2061a..1ecab63 100644
--- a/arch/mips/basler/excite/excite_irq.c
+++ b/arch/mips/basler/excite/excite_irq.c
@@ -47,9 +47,9 @@ extern asmlinkage void excite_handle_int
  */
 void __init arch_init_irq(void)
 {
-	mips_cpu_irq_init(0);
-	rm7k_cpu_irq_init(8);
-	rm9k_cpu_irq_init(12);
+	mips_cpu_irq_init();
+	rm7k_cpu_irq_init();
+	rm9k_cpu_irq_init();
 
 #ifdef CONFIG_KGDB
 	excite_kgdb_init();
diff --git a/arch/mips/cobalt/irq.c b/arch/mips/cobalt/irq.c
index 4c46f0e..fe93b84 100644
--- a/arch/mips/cobalt/irq.c
+++ b/arch/mips/cobalt/irq.c
@@ -104,7 +104,7 @@ void __init arch_init_irq(void)
 	GT_WRITE(GT_INTRMASK_OFS, 0);
 
 	init_i8259_irqs();				/*  0 ... 15 */
-	mips_cpu_irq_init(COBALT_CPU_IRQ);		/* 16 ... 23 */
+	mips_cpu_irq_init();		/* 16 ... 23 */
 
 	/*
 	 * Mask all cpu interrupts
diff --git a/arch/mips/ddb5xxx/ddb5477/irq.c b/arch/mips/ddb5xxx/ddb5477/irq.c
index a8bd2e6..bd7cd7c 100644
--- a/arch/mips/ddb5xxx/ddb5477/irq.c
+++ b/arch/mips/ddb5xxx/ddb5477/irq.c
@@ -17,6 +17,7 @@
 #include <linux/ptrace.h>
 
 #include <asm/i8259.h>
+#include <asm/irq_cpu.h>
 #include <asm/system.h>
 #include <asm/mipsregs.h>
 #include <asm/debug.h>
@@ -73,7 +74,6 @@ set_pci_int_attr(u32 pci, u32 intn, u32
 }
 
 extern void vrc5477_irq_init(u32 base);
-extern void mips_cpu_irq_init(u32 base);
 static struct irqaction irq_cascade = { no_action, 0, CPU_MASK_NONE, "cascade", NULL, NULL };
 
 void __init arch_init_irq(void)
@@ -125,7 +125,7 @@ void __init arch_init_irq(void)
 
 	/* init all controllers */
 	init_i8259_irqs();
-	mips_cpu_irq_init(CPU_IRQ_BASE);
+	mips_cpu_irq_init();
 	vrc5477_irq_init(VRC5477_IRQ_BASE);
 
 
diff --git a/arch/mips/dec/setup.c b/arch/mips/dec/setup.c
index d34032a..1058e2f 100644
--- a/arch/mips/dec/setup.c
+++ b/arch/mips/dec/setup.c
@@ -234,7 +234,7 @@ static void __init dec_init_kn01(void)
 	memcpy(&cpu_mask_nr_tbl, &kn01_cpu_mask_nr_tbl,
 		sizeof(kn01_cpu_mask_nr_tbl));
 
-	mips_cpu_irq_init(DEC_CPU_IRQ_BASE);
+	mips_cpu_irq_init();
 
 }				/* dec_init_kn01 */
 
@@ -309,7 +309,7 @@ static void __init dec_init_kn230(void)
 	memcpy(&cpu_mask_nr_tbl, &kn230_cpu_mask_nr_tbl,
 		sizeof(kn230_cpu_mask_nr_tbl));
 
-	mips_cpu_irq_init(DEC_CPU_IRQ_BASE);
+	mips_cpu_irq_init();
 
 }				/* dec_init_kn230 */
 
@@ -403,7 +403,7 @@ static void __init dec_init_kn02(void)
 	memcpy(&asic_mask_nr_tbl, &kn02_asic_mask_nr_tbl,
 		sizeof(kn02_asic_mask_nr_tbl));
 
-	mips_cpu_irq_init(DEC_CPU_IRQ_BASE);
+	mips_cpu_irq_init();
 	init_kn02_irqs(KN02_IRQ_BASE);
 
 }				/* dec_init_kn02 */
@@ -504,7 +504,7 @@ static void __init dec_init_kn02ba(void)
 	memcpy(&asic_mask_nr_tbl, &kn02ba_asic_mask_nr_tbl,
 		sizeof(kn02ba_asic_mask_nr_tbl));
 
-	mips_cpu_irq_init(DEC_CPU_IRQ_BASE);
+	mips_cpu_irq_init();
 	init_ioasic_irqs(IO_IRQ_BASE);
 
 }				/* dec_init_kn02ba */
@@ -601,7 +601,7 @@ static void __init dec_init_kn02ca(void)
 	memcpy(&asic_mask_nr_tbl, &kn02ca_asic_mask_nr_tbl,
 		sizeof(kn02ca_asic_mask_nr_tbl));
 
-	mips_cpu_irq_init(DEC_CPU_IRQ_BASE);
+	mips_cpu_irq_init();
 	init_ioasic_irqs(IO_IRQ_BASE);
 
 }				/* dec_init_kn02ca */
@@ -702,7 +702,7 @@ static void __init dec_init_kn03(void)
 	memcpy(&asic_mask_nr_tbl, &kn03_asic_mask_nr_tbl,
 		sizeof(kn03_asic_mask_nr_tbl));
 
-	mips_cpu_irq_init(DEC_CPU_IRQ_BASE);
+	mips_cpu_irq_init();
 	init_ioasic_irqs(IO_IRQ_BASE);
 
 }				/* dec_init_kn03 */
diff --git a/arch/mips/emma2rh/markeins/irq.c b/arch/mips/emma2rh/markeins/irq.c
index c93369c..3299b6d 100644
--- a/arch/mips/emma2rh/markeins/irq.c
+++ b/arch/mips/emma2rh/markeins/irq.c
@@ -106,7 +106,7 @@ void __init arch_init_irq(void)
 	emma2rh_irq_init(EMMA2RH_IRQ_BASE);
 	emma2rh_sw_irq_init(EMMA2RH_SW_IRQ_BASE);
 	emma2rh_gpio_irq_init(EMMA2RH_GPIO_IRQ_BASE);
-	mips_cpu_irq_init(CPU_IRQ_BASE);
+	mips_cpu_irq_init();
 
 	/* setup cascade interrupts */
 	setup_irq(EMMA2RH_IRQ_BASE + EMMA2RH_SW_CASCADE, &irq_cascade);
diff --git a/arch/mips/gt64120/momenco_ocelot/irq.c b/arch/mips/gt64120/momenco_ocelot/irq.c
index d929440..2585d9d 100644
--- a/arch/mips/gt64120/momenco_ocelot/irq.c
+++ b/arch/mips/gt64120/momenco_ocelot/irq.c
@@ -90,6 +90,6 @@ void __init arch_init_irq(void)
 	clear_c0_status(ST0_IM);
 	local_irq_disable();
 
-	mips_cpu_irq_init(0);
-	rm7k_cpu_irq_init(8);
+	mips_cpu_irq_init();
+	rm7k_cpu_irq_init();
 }
diff --git a/arch/mips/gt64120/wrppmc/irq.c b/arch/mips/gt64120/wrppmc/irq.c
index eedfc24..d3d9659 100644
--- a/arch/mips/gt64120/wrppmc/irq.c
+++ b/arch/mips/gt64120/wrppmc/irq.c
@@ -63,7 +63,7 @@ void gt64120_init_pic(void)
 void __init arch_init_irq(void)
 {
 	/* IRQ 0 - 7 are for MIPS common irq_cpu controller */
-	mips_cpu_irq_init(0);
+	mips_cpu_irq_init();
 
 	gt64120_init_pic();
 }
diff --git a/arch/mips/kernel/irq-rm7000.c b/arch/mips/kernel/irq-rm7000.c
index 123324b..a60cfe5 100644
--- a/arch/mips/kernel/irq-rm7000.c
+++ b/arch/mips/kernel/irq-rm7000.c
@@ -17,16 +17,14 @@
 #include <asm/mipsregs.h>
 #include <asm/system.h>
 
-static int irq_base;
-
 static inline void unmask_rm7k_irq(unsigned int irq)
 {
-	set_c0_intcontrol(0x100 << (irq - irq_base));
+	set_c0_intcontrol(0x100 << (irq - RM7K_CPU_IRQ_BASE));
 }
 
 static inline void mask_rm7k_irq(unsigned int irq)
 {
-	clear_c0_intcontrol(0x100 << (irq - irq_base));
+	clear_c0_intcontrol(0x100 << (irq - RM7K_CPU_IRQ_BASE));
 }
 
 static struct irq_chip rm7k_irq_controller = {
@@ -37,8 +35,9 @@ static struct irq_chip rm7k_irq_controll
 	.unmask = unmask_rm7k_irq,
 };
 
-void __init rm7k_cpu_irq_init(int base)
+void __init rm7k_cpu_irq_init(void)
 {
+	int base = RM7K_CPU_IRQ_BASE;
 	int i;
 
 	clear_c0_intcontrol(0x00000f00);		/* Mask all */
@@ -46,6 +45,4 @@ void __init rm7k_cpu_irq_init(int base)
 	for (i = base; i < base + 4; i++)
 		set_irq_chip_and_handler(i, &rm7k_irq_controller,
 					 handle_level_irq);
-
-	irq_base = base;
 }
diff --git a/arch/mips/kernel/irq-rm9000.c b/arch/mips/kernel/irq-rm9000.c
index 0e6f4c5..6df072b 100644
--- a/arch/mips/kernel/irq-rm9000.c
+++ b/arch/mips/kernel/irq-rm9000.c
@@ -18,16 +18,14 @@
 #include <asm/mipsregs.h>
 #include <asm/system.h>
 
-static int irq_base;
-
 static inline void unmask_rm9k_irq(unsigned int irq)
 {
-	set_c0_intcontrol(0x1000 << (irq - irq_base));
+	set_c0_intcontrol(0x1000 << (irq - RM9K_CPU_IRQ_BASE));
 }
 
 static inline void mask_rm9k_irq(unsigned int irq)
 {
-	clear_c0_intcontrol(0x1000 << (irq - irq_base));
+	clear_c0_intcontrol(0x1000 << (irq - RM9K_CPU_IRQ_BASE));
 }
 
 static inline void rm9k_cpu_irq_enable(unsigned int irq)
@@ -102,8 +100,9 @@ unsigned int rm9000_perfcount_irq;
 
 EXPORT_SYMBOL(rm9000_perfcount_irq);
 
-void __init rm9k_cpu_irq_init(int base)
+void __init rm9k_cpu_irq_init(void)
 {
+	int base = RM9K_CPU_IRQ_BASE;
 	int i;
 
 	clear_c0_intcontrol(0x0000f000);		/* Mask all */
@@ -115,6 +114,4 @@ void __init rm9k_cpu_irq_init(int base)
 	rm9000_perfcount_irq = base + 1;
 	set_irq_chip_and_handler(rm9000_perfcount_irq, &rm9k_perfcounter_irq,
 				 handle_level_irq);
-
-	irq_base = base;
 }
diff --git a/arch/mips/kernel/irq_cpu.c b/arch/mips/kernel/irq_cpu.c
index fcc86b9..6e73dda 100644
--- a/arch/mips/kernel/irq_cpu.c
+++ b/arch/mips/kernel/irq_cpu.c
@@ -25,7 +25,7 @@
  * Don't even think about using this on SMP.  You have been warned.
  *
  * This file exports one global function:
- *	void mips_cpu_irq_init(int irq_base);
+ *	void mips_cpu_irq_init(void);
  */
 #include <linux/init.h>
 #include <linux/interrupt.h>
@@ -36,17 +36,15 @@
 #include <asm/mipsmtregs.h>
 #include <asm/system.h>
 
-static int mips_cpu_irq_base;
-
 static inline void unmask_mips_irq(unsigned int irq)
 {
-	set_c0_status(0x100 << (irq - mips_cpu_irq_base));
+	set_c0_status(0x100 << (irq - MIPS_CPU_IRQ_BASE));
 	irq_enable_hazard();
 }
 
 static inline void mask_mips_irq(unsigned int irq)
 {
-	clear_c0_status(0x100 << (irq - mips_cpu_irq_base));
+	clear_c0_status(0x100 << (irq - MIPS_CPU_IRQ_BASE));
 	irq_disable_hazard();
 }
 
@@ -70,7 +68,7 @@ static unsigned int mips_mt_cpu_irq_star
 {
 	unsigned int vpflags = dvpe();
 
-	clear_c0_cause(0x100 << (irq - mips_cpu_irq_base));
+	clear_c0_cause(0x100 << (irq - MIPS_CPU_IRQ_BASE));
 	evpe(vpflags);
 	unmask_mips_mt_irq(irq);
 
@@ -84,7 +82,7 @@ static unsigned int mips_mt_cpu_irq_star
 static void mips_mt_cpu_irq_ack(unsigned int irq)
 {
 	unsigned int vpflags = dvpe();
-	clear_c0_cause(0x100 << (irq - mips_cpu_irq_base));
+	clear_c0_cause(0x100 << (irq - MIPS_CPU_IRQ_BASE));
 	evpe(vpflags);
 	mask_mips_mt_irq(irq);
 }
@@ -99,8 +97,9 @@ static struct irq_chip mips_mt_cpu_irq_c
 	.eoi		= unmask_mips_mt_irq,
 };
 
-void __init mips_cpu_irq_init(int irq_base)
+void __init mips_cpu_irq_init(void)
 {
+	int irq_base = MIPS_CPU_IRQ_BASE;
 	int i;
 
 	/* Mask interrupts. */
@@ -118,6 +117,4 @@ void __init mips_cpu_irq_init(int irq_ba
 	for (i = irq_base + 2; i < irq_base + 8; i++)
 		set_irq_chip_and_handler(i, &mips_cpu_irq_controller,
 					 handle_level_irq);
-
-	mips_cpu_irq_base = irq_base;
 }
diff --git a/arch/mips/kernel/rtlx.c b/arch/mips/kernel/rtlx.c
index 5a99e3e..8610f4a 100644
--- a/arch/mips/kernel/rtlx.c
+++ b/arch/mips/kernel/rtlx.c
@@ -63,7 +63,7 @@ extern void *vpe_get_shared(int index);
 
 static void rtlx_dispatch(void)
 {
-	do_IRQ(MIPSCPU_INT_BASE + MIPS_CPU_RTLX_IRQ);
+	do_IRQ(MIPS_CPU_IRQ_BASE + MIPS_CPU_RTLX_IRQ);
 }
 
 
@@ -491,7 +491,7 @@ static struct irqaction rtlx_irq = {
 	.name		= "RTLX",
 };
 
-static int rtlx_irq_num = MIPSCPU_INT_BASE + MIPS_CPU_RTLX_IRQ;
+static int rtlx_irq_num = MIPS_CPU_IRQ_BASE + MIPS_CPU_RTLX_IRQ;
 
 static char register_chrdev_failed[] __initdata =
 	KERN_ERR "rtlx_module_init: unable to register device\n";
diff --git a/arch/mips/kernel/smp-mt.c b/arch/mips/kernel/smp-mt.c
index 1ee689c..64b62bd 100644
--- a/arch/mips/kernel/smp-mt.c
+++ b/arch/mips/kernel/smp-mt.c
@@ -35,7 +35,6 @@
 #include <asm/mipsregs.h>
 #include <asm/mipsmtregs.h>
 #include <asm/mips_mt.h>
-#include <asm/mips-boards/maltaint.h>  /* This is f*cking wrong */
 
 #define MIPS_CPU_IPI_RESCHED_IRQ 0
 #define MIPS_CPU_IPI_CALL_IRQ 1
@@ -108,12 +107,12 @@ void __init sanitize_tlb_entries(void)
 
 static void ipi_resched_dispatch(void)
 {
-	do_IRQ(MIPSCPU_INT_BASE + MIPS_CPU_IPI_RESCHED_IRQ);
+	do_IRQ(MIPS_CPU_IRQ_BASE + MIPS_CPU_IPI_RESCHED_IRQ);
 }
 
 static void ipi_call_dispatch(void)
 {
-	do_IRQ(MIPSCPU_INT_BASE + MIPS_CPU_IPI_CALL_IRQ);
+	do_IRQ(MIPS_CPU_IRQ_BASE + MIPS_CPU_IPI_CALL_IRQ);
 }
 
 static irqreturn_t ipi_resched_interrupt(int irq, void *dev_id)
@@ -270,8 +269,8 @@ void __init plat_prepare_cpus(unsigned i
 		set_vi_handler(MIPS_CPU_IPI_CALL_IRQ, ipi_call_dispatch);
 	}
 
-	cpu_ipi_resched_irq = MIPSCPU_INT_BASE + MIPS_CPU_IPI_RESCHED_IRQ;
-	cpu_ipi_call_irq = MIPSCPU_INT_BASE + MIPS_CPU_IPI_CALL_IRQ;
+	cpu_ipi_resched_irq = MIPS_CPU_IRQ_BASE + MIPS_CPU_IPI_RESCHED_IRQ;
+	cpu_ipi_call_irq = MIPS_CPU_IRQ_BASE + MIPS_CPU_IPI_CALL_IRQ;
 
 	setup_irq(cpu_ipi_resched_irq, &irq_resched);
 	setup_irq(cpu_ipi_call_irq, &irq_call);
diff --git a/arch/mips/kernel/smtc.c b/arch/mips/kernel/smtc.c
index 802febe..36d33d3 100644
--- a/arch/mips/kernel/smtc.c
+++ b/arch/mips/kernel/smtc.c
@@ -25,16 +25,6 @@
  * This file should be built into the kernel only if CONFIG_MIPS_MT_SMTC is set.
  */
 
-/*
- * MIPSCPU_INT_BASE is identically defined in both
- * asm-mips/mips-boards/maltaint.h and asm-mips/mips-boards/simint.h,
- * but as yet there's no properly organized include structure that
- * will ensure that the right *int.h file will be included for a
- * given platform build.
- */
-
-#define MIPSCPU_INT_BASE	16
-
 #define MIPS_CPU_IPI_IRQ	1
 
 #define LOCK_MT_PRA() \
@@ -916,7 +906,7 @@ void smtc_timer_broadcast(int vpe)
  * interrupts.
  */
 
-static int cpu_ipi_irq = MIPSCPU_INT_BASE + MIPS_CPU_IPI_IRQ;
+static int cpu_ipi_irq = MIPS_CPU_IRQ_BASE + MIPS_CPU_IPI_IRQ;
 
 static irqreturn_t ipi_interrupt(int irq, void *dev_idm)
 {
diff --git a/arch/mips/mips-boards/atlas/atlas_int.c b/arch/mips/mips-boards/atlas/atlas_int.c
index 43dba6c..85482a6 100644
--- a/arch/mips/mips-boards/atlas/atlas_int.c
+++ b/arch/mips/mips-boards/atlas/atlas_int.c
@@ -238,7 +238,7 @@ void __init arch_init_irq(void)
 	init_atlas_irqs(ATLAS_INT_BASE);
 
 	if (!cpu_has_veic)
-		mips_cpu_irq_init(MIPSCPU_INT_BASE);
+		mips_cpu_irq_init();
 
 	switch(mips_revision_corid) {
 	case MIPS_REVISION_CORID_CORE_MSC:
diff --git a/arch/mips/mips-boards/malta/malta_int.c b/arch/mips/mips-boards/malta/malta_int.c
index 90ad5bf..d9ddb17 100644
--- a/arch/mips/mips-boards/malta/malta_int.c
+++ b/arch/mips/mips-boards/malta/malta_int.c
@@ -310,7 +310,7 @@ void __init arch_init_irq(void)
 	init_i8259_irqs();
 
 	if (!cpu_has_veic)
-		mips_cpu_irq_init (MIPSCPU_INT_BASE);
+		mips_cpu_irq_init();
 
         switch(mips_revision_corid) {
         case MIPS_REVISION_CORID_CORE_MSC:
diff --git a/arch/mips/mips-boards/sead/sead_int.c b/arch/mips/mips-boards/sead/sead_int.c
index f445fcd..2f79a70 100644
--- a/arch/mips/mips-boards/sead/sead_int.c
+++ b/arch/mips/mips-boards/sead/sead_int.c
@@ -113,5 +113,5 @@ asmlinkage void plat_irq_dispatch(void)
 
 void __init arch_init_irq(void)
 {
-	mips_cpu_irq_init(MIPSCPU_INT_BASE);
+	mips_cpu_irq_init();
 }
diff --git a/arch/mips/mips-boards/sim/sim_int.c b/arch/mips/mips-boards/sim/sim_int.c
index 2ce449d..15ac065 100644
--- a/arch/mips/mips-boards/sim/sim_int.c
+++ b/arch/mips/mips-boards/sim/sim_int.c
@@ -21,9 +21,7 @@
 #include <linux/interrupt.h>
 #include <linux/kernel_stat.h>
 #include <asm/mips-boards/simint.h>
-
-
-extern void mips_cpu_irq_init(int);
+#include <asm/irq_cpu.h>
 
 static inline int clz(unsigned long x)
 {
@@ -86,5 +84,5 @@ asmlinkage void plat_irq_dispatch(void)
 
 void __init arch_init_irq(void)
 {
-	mips_cpu_irq_init(MIPSCPU_INT_BASE);
+	mips_cpu_irq_init();
 }
diff --git a/arch/mips/momentum/jaguar_atx/irq.c b/arch/mips/momentum/jaguar_atx/irq.c
index 2efb25a..f2b4325 100644
--- a/arch/mips/momentum/jaguar_atx/irq.c
+++ b/arch/mips/momentum/jaguar_atx/irq.c
@@ -82,8 +82,8 @@ void __init arch_init_irq(void)
 	 */
 	clear_c0_status(ST0_IM);
 
-	mips_cpu_irq_init(0);
-	rm7k_cpu_irq_init(8);
+	mips_cpu_irq_init();
+	rm7k_cpu_irq_init();
 
 	/* set up the cascading interrupts */
 	setup_irq(8, &cascade_mv64340);
diff --git a/arch/mips/momentum/ocelot_3/irq.c b/arch/mips/momentum/ocelot_3/irq.c
index cea0e5d..3862d1d 100644
--- a/arch/mips/momentum/ocelot_3/irq.c
+++ b/arch/mips/momentum/ocelot_3/irq.c
@@ -65,7 +65,7 @@ void __init arch_init_irq(void)
 	 */
 	clear_c0_status(ST0_IM | ST0_BEV);
 
-	rm7k_cpu_irq_init(8);
+	rm7k_cpu_irq_init();
 
 	/* set up the cascading interrupts */
 	setup_irq(8, &cascade_mv64340);		/* unmask intControl IM8, IRQ 9 */
diff --git a/arch/mips/momentum/ocelot_c/irq.c b/arch/mips/momentum/ocelot_c/irq.c
index ea65223..40472f7 100644
--- a/arch/mips/momentum/ocelot_c/irq.c
+++ b/arch/mips/momentum/ocelot_c/irq.c
@@ -94,7 +94,7 @@ void __init arch_init_irq(void)
 	 */
 	clear_c0_status(ST0_IM);
 
-	mips_cpu_irq_init(0);
+	mips_cpu_irq_init();
 
 	/* set up the cascading interrupts */
 	setup_irq(3, &cascade_fpga);
diff --git a/arch/mips/momentum/ocelot_g/irq.c b/arch/mips/momentum/ocelot_g/irq.c
index da46524..273541f 100644
--- a/arch/mips/momentum/ocelot_g/irq.c
+++ b/arch/mips/momentum/ocelot_g/irq.c
@@ -94,8 +94,8 @@ void __init arch_init_irq(void)
 	clear_c0_status(ST0_IM);
 	local_irq_disable();
 
-	mips_cpu_irq_init(0);
-	rm7k_cpu_irq_init(8);
+	mips_cpu_irq_init();
+	rm7k_cpu_irq_init();
 
 	gt64240_irq_init();
 }
diff --git a/arch/mips/pmc-sierra/yosemite/irq.c b/arch/mips/pmc-sierra/yosemite/irq.c
index adb0485..428d1f4 100644
--- a/arch/mips/pmc-sierra/yosemite/irq.c
+++ b/arch/mips/pmc-sierra/yosemite/irq.c
@@ -148,9 +148,9 @@ void __init arch_init_irq(void)
 {
 	clear_c0_status(ST0_IM);
 
-	mips_cpu_irq_init(0);
-	rm7k_cpu_irq_init(8);
-	rm9k_cpu_irq_init(12);
+	mips_cpu_irq_init();
+	rm7k_cpu_irq_init();
+	rm9k_cpu_irq_init();
 
 #ifdef CONFIG_KGDB
 	/* At this point, initialize the second serial port */
diff --git a/arch/mips/sgi-ip22/ip22-int.c b/arch/mips/sgi-ip22/ip22-int.c
index c44f8be..f3d2ae3 100644
--- a/arch/mips/sgi-ip22/ip22-int.c
+++ b/arch/mips/sgi-ip22/ip22-int.c
@@ -19,6 +19,7 @@
 
 #include <asm/mipsregs.h>
 #include <asm/addrspace.h>
+#include <asm/irq_cpu.h>
 
 #include <asm/sgi/ioc.h>
 #include <asm/sgi/hpc3.h>
@@ -253,8 +254,6 @@ asmlinkage void plat_irq_dispatch(void)
 		indy_8254timer_irq();
 }
 
-extern void mips_cpu_irq_init(unsigned int irq_base);
-
 void __init arch_init_irq(void)
 {
 	int i;
@@ -316,7 +315,7 @@ void __init arch_init_irq(void)
 	sgint->cmeimask1 = 0;
 
 	/* init CPU irqs */
-	mips_cpu_irq_init(SGINT_CPU);
+	mips_cpu_irq_init();
 
 	for (i = SGINT_LOCAL0; i < SGI_INTERRUPTS; i++) {
 		struct irq_chip *handler;
diff --git a/arch/mips/vr41xx/common/irq.c b/arch/mips/vr41xx/common/irq.c
index 397ba94..70b5beb 100644
--- a/arch/mips/vr41xx/common/irq.c
+++ b/arch/mips/vr41xx/common/irq.c
@@ -111,5 +111,5 @@ asmlinkage void plat_irq_dispatch(void)
 
 void __init arch_init_irq(void)
 {
-	mips_cpu_irq_init(MIPS_CPU_IRQ_BASE);
+	mips_cpu_irq_init();
 }
diff --git a/include/asm-mips/ddb5xxx/ddb5477.h b/include/asm-mips/ddb5xxx/ddb5477.h
index c5af4b7..27655db 100644
--- a/include/asm-mips/ddb5xxx/ddb5477.h
+++ b/include/asm-mips/ddb5xxx/ddb5477.h
@@ -17,6 +17,7 @@
 #ifndef __ASM_DDB5XXX_DDB5477_H
 #define __ASM_DDB5XXX_DDB5477_H
 
+#include <irq.h>
 
 /*
  * This contains macros that are specific to DDB5477 or renamed from
@@ -257,8 +258,8 @@ extern void ll_vrc5477_irq_disable(int v
 #define	DDB_IRQ_BASE		0
 
 #define	I8259_IRQ_BASE		DDB_IRQ_BASE
-#define	VRC5477_IRQ_BASE	(I8259_IRQ_BASE + NUM_I8259_IRQ)
-#define	CPU_IRQ_BASE		(VRC5477_IRQ_BASE + NUM_VRC5477_IRQ)
+#define	CPU_IRQ_BASE		MIPS_CPU_IRQ_BASE
+#define	VRC5477_IRQ_BASE	(CPU_IRQ_BASE + NUM_CPU_IRQ)
 
 /*
  * vrc5477 irq defs
diff --git a/include/asm-mips/dec/interrupts.h b/include/asm-mips/dec/interrupts.h
index 273e4d6..e10d341 100644
--- a/include/asm-mips/dec/interrupts.h
+++ b/include/asm-mips/dec/interrupts.h
@@ -14,6 +14,7 @@
 #ifndef __ASM_DEC_INTERRUPTS_H
 #define __ASM_DEC_INTERRUPTS_H
 
+#include <irq.h>
 #include <asm/mipsregs.h>
 
 
@@ -87,7 +88,7 @@
 #define DEC_CPU_INR_SW1		1	/* software #1 */
 #define DEC_CPU_INR_SW0		0	/* software #0 */
 
-#define DEC_CPU_IRQ_BASE	0	/* first IRQ assigned to CPU */
+#define DEC_CPU_IRQ_BASE	MIPS_CPU_IRQ_BASE	/* first IRQ assigned to CPU */
 
 #define DEC_CPU_IRQ_NR(n)	((n) + DEC_CPU_IRQ_BASE)
 #define DEC_CPU_IRQ_MASK(n)	(1 << ((n) + CAUSEB_IP))
diff --git a/include/asm-mips/emma2rh/emma2rh.h b/include/asm-mips/emma2rh/emma2rh.h
index 4fb8df7..6a1af0a 100644
--- a/include/asm-mips/emma2rh/emma2rh.h
+++ b/include/asm-mips/emma2rh/emma2rh.h
@@ -24,6 +24,8 @@
 #ifndef __ASM_EMMA2RH_EMMA2RH_H
 #define __ASM_EMMA2RH_EMMA2RH_H
 
+#include <irq.h>
+
 /*
  * EMMA2RH registers
  */
@@ -104,7 +106,8 @@
 #define NUM_EMMA2RH_IRQ		96
 
 #define CPU_EMMA2RH_CASCADE	2
-#define EMMA2RH_IRQ_BASE	0
+#define CPU_IRQ_BASE		MIPS_CPU_IRQ_BASE
+#define EMMA2RH_IRQ_BASE	(CPU_IRQ_BASE + NUM_CPU_IRQ)
 
 /*
  * emma2rh irq defs
diff --git a/include/asm-mips/emma2rh/markeins.h b/include/asm-mips/emma2rh/markeins.h
index 8fa7667..973b062 100644
--- a/include/asm-mips/emma2rh/markeins.h
+++ b/include/asm-mips/emma2rh/markeins.h
@@ -33,7 +33,6 @@
 
 #define EMMA2RH_SW_IRQ_BASE	(EMMA2RH_IRQ_BASE + NUM_EMMA2RH_IRQ)
 #define EMMA2RH_GPIO_IRQ_BASE	(EMMA2RH_SW_IRQ_BASE + NUM_EMMA2RH_IRQ_SW)
-#define CPU_IRQ_BASE		(EMMA2RH_GPIO_IRQ_BASE + NUM_EMMA2RH_IRQ_GPIO)
 
 #define EMMA2RH_SW_IRQ_INT0	(0+EMMA2RH_SW_IRQ_BASE)
 #define EMMA2RH_SW_IRQ_INT1	(1+EMMA2RH_SW_IRQ_BASE)
diff --git a/include/asm-mips/irq_cpu.h b/include/asm-mips/irq_cpu.h
index ed3d1e3..ef6a07c 100644
--- a/include/asm-mips/irq_cpu.h
+++ b/include/asm-mips/irq_cpu.h
@@ -13,8 +13,8 @@
 #ifndef _ASM_IRQ_CPU_H
 #define _ASM_IRQ_CPU_H
 
-extern void mips_cpu_irq_init(int irq_base);
-extern void rm7k_cpu_irq_init(int irq_base);
-extern void rm9k_cpu_irq_init(int irq_base);
+extern void mips_cpu_irq_init(void);
+extern void rm7k_cpu_irq_init(void);
+extern void rm9k_cpu_irq_init(void);
 
 #endif /* _ASM_IRQ_CPU_H */
diff --git a/include/asm-mips/mach-cobalt/cobalt.h b/include/asm-mips/mach-cobalt/cobalt.h
index 00b0fc6..24a8d51 100644
--- a/include/asm-mips/mach-cobalt/cobalt.h
+++ b/include/asm-mips/mach-cobalt/cobalt.h
@@ -12,6 +12,8 @@
 #ifndef __ASM_COBALT_H
 #define __ASM_COBALT_H
 
+#include <irq.h>
+
 /*
  * i8259 legacy interrupts used on Cobalt:
  *
@@ -25,7 +27,7 @@
 /*
  * CPU IRQs  are 16 ... 23
  */
-#define COBALT_CPU_IRQ		16
+#define COBALT_CPU_IRQ		MIPS_CPU_IRQ_BASE
 
 #define COBALT_GALILEO_IRQ	(COBALT_CPU_IRQ + 2)
 #define COBALT_SCC_IRQ          (COBALT_CPU_IRQ + 3)	/* pre-production has 85C30 */
diff --git a/include/asm-mips/mach-emma2rh/irq.h b/include/asm-mips/mach-emma2rh/irq.h
index bce6424..5439eb8 100644
--- a/include/asm-mips/mach-emma2rh/irq.h
+++ b/include/asm-mips/mach-emma2rh/irq.h
@@ -10,4 +10,6 @@
 
 #define NR_IRQS	256
 
+#include_next <irq.h>
+
 #endif /* __ASM_MACH_EMMA2RH_IRQ_H */
diff --git a/include/asm-mips/mach-generic/irq.h b/include/asm-mips/mach-generic/irq.h
index 500e10f..91e6778 100644
--- a/include/asm-mips/mach-generic/irq.h
+++ b/include/asm-mips/mach-generic/irq.h
@@ -8,6 +8,32 @@
 #ifndef __ASM_MACH_GENERIC_IRQ_H
 #define __ASM_MACH_GENERIC_IRQ_H
 
+#ifndef NR_IRQS
 #define NR_IRQS	128
+#endif
+
+#ifdef CONFIG_IRQ_CPU
+
+#ifndef MIPS_CPU_IRQ_BASE
+#ifdef CONFIG_I8259
+#define MIPS_CPU_IRQ_BASE 16
+#else
+#define MIPS_CPU_IRQ_BASE 0
+#endif /* CONFIG_I8259 */
+#endif
+
+#ifdef CONFIG_IRQ_CPU_RM7K
+#ifndef RM7K_CPU_IRQ_BASE
+#define RM7K_CPU_IRQ_BASE (MIPS_CPU_IRQ_BASE+8)
+#endif
+#endif
+
+#ifdef CONFIG_IRQ_CPU_RM9K
+#ifndef RM9K_CPU_IRQ_BASE
+#define RM9K_CPU_IRQ_BASE (MIPS_CPU_IRQ_BASE+12)
+#endif
+#endif
+
+#endif /* CONFIG_IRQ_CPU */
 
 #endif /* __ASM_MACH_GENERIC_IRQ_H */
diff --git a/include/asm-mips/mach-mips/irq.h b/include/asm-mips/mach-mips/irq.h
index e994b0c..9b9da26 100644
--- a/include/asm-mips/mach-mips/irq.h
+++ b/include/asm-mips/mach-mips/irq.h
@@ -4,4 +4,6 @@
 
 #define NR_IRQS	256
 
+#include_next <irq.h>
+
 #endif /* __ASM_MACH_MIPS_IRQ_H */
diff --git a/include/asm-mips/mach-vr41xx/irq.h b/include/asm-mips/mach-vr41xx/irq.h
new file mode 100644
index 0000000..862058d
--- /dev/null
+++ b/include/asm-mips/mach-vr41xx/irq.h
@@ -0,0 +1,8 @@
+#ifndef __ASM_MACH_VR41XX_IRQ_H
+#define __ASM_MACH_VR41XX_IRQ_H
+
+#include <asm/vr41xx/irq.h> /* for MIPS_CPU_IRQ_BASE */
+
+#include_next <irq.h>
+
+#endif /* __ASM_MACH_VR41XX_IRQ_H */
diff --git a/include/asm-mips/mips-boards/atlasint.h b/include/asm-mips/mips-boards/atlasint.h
index b15e4ea..76add42 100644
--- a/include/asm-mips/mips-boards/atlasint.h
+++ b/include/asm-mips/mips-boards/atlasint.h
@@ -26,10 +26,12 @@
 #ifndef _MIPS_ATLASINT_H
 #define _MIPS_ATLASINT_H
 
+#include <irq.h>
+
 /*
  * Interrupts 0..7 are used for Atlas CPU interrupts (nonEIC mode)
  */
-#define MIPSCPU_INT_BASE	0
+#define MIPSCPU_INT_BASE	MIPS_CPU_IRQ_BASE
 
 /* CPU interrupt offsets */
 #define MIPSCPU_INT_SW0		0
diff --git a/include/asm-mips/mips-boards/maltaint.h b/include/asm-mips/mips-boards/maltaint.h
index da6cc2f..9180d64 100644
--- a/include/asm-mips/mips-boards/maltaint.h
+++ b/include/asm-mips/mips-boards/maltaint.h
@@ -25,6 +25,8 @@
 #ifndef _MIPS_MALTAINT_H
 #define _MIPS_MALTAINT_H
 
+#include <irq.h>
+
 /*
  * Interrupts 0..15 are used for Malta ISA compatible interrupts
  */
@@ -33,7 +35,7 @@
 /*
  * Interrupts 16..23 are used for Malta CPU interrupts (nonEIC mode)
  */
-#define MIPSCPU_INT_BASE	16
+#define MIPSCPU_INT_BASE	MIPS_CPU_IRQ_BASE
 
 /* CPU interrupt offsets */
 #define MIPSCPU_INT_SW0		0
diff --git a/include/asm-mips/mips-boards/seadint.h b/include/asm-mips/mips-boards/seadint.h
index 365c2a3..4f6a393 100644
--- a/include/asm-mips/mips-boards/seadint.h
+++ b/include/asm-mips/mips-boards/seadint.h
@@ -20,10 +20,12 @@
 #ifndef _MIPS_SEADINT_H
 #define _MIPS_SEADINT_H
 
+#include <irq.h>
+
 /*
  * Interrupts 0..7 are used for SEAD CPU interrupts
  */
-#define MIPSCPU_INT_BASE	0
+#define MIPSCPU_INT_BASE	MIPS_CPU_IRQ_BASE
 
 #define MIPSCPU_INT_UART0	2
 #define MIPSCPU_INT_UART1	3
diff --git a/include/asm-mips/mips-boards/simint.h b/include/asm-mips/mips-boards/simint.h
index 4952e0b..54f2fe6 100644
--- a/include/asm-mips/mips-boards/simint.h
+++ b/include/asm-mips/mips-boards/simint.h
@@ -17,10 +17,11 @@
 #ifndef _MIPS_SIMINT_H
 #define _MIPS_SIMINT_H
 
+#include <irq.h>
 
 #define SIM_INT_BASE		0
 #define MIPSCPU_INT_MB0		2
-#define MIPSCPU_INT_BASE	16
+#define MIPSCPU_INT_BASE	MIPS_CPU_IRQ_BASE
 #define MIPS_CPU_TIMER_IRQ	7
 
 
diff --git a/include/asm-mips/rtlx.h b/include/asm-mips/rtlx.h
index 76cd51c..59162f7 100644
--- a/include/asm-mips/rtlx.h
+++ b/include/asm-mips/rtlx.h
@@ -6,9 +6,10 @@
 #ifndef __ASM_RTLX_H
 #define __ASM_RTLX_H_
 
+#include <irq.h>
+
 #define LX_NODE_BASE 10
 
-#define MIPSCPU_INT_BASE       16
 #define MIPS_CPU_RTLX_IRQ 0
 
 #define RTLX_VERSION 2
diff --git a/include/asm-mips/sgi/ip22.h b/include/asm-mips/sgi/ip22.h
index bbfc05c..6592f3b 100644
--- a/include/asm-mips/sgi/ip22.h
+++ b/include/asm-mips/sgi/ip22.h
@@ -21,15 +21,16 @@
  * HAL2 driver). This will prevent many complications, trust me ;-)
  */
 
+#include <irq.h>
 #include <asm/sgi/ioc.h>
 
 #define SGINT_EISA	0	/* 16 EISA irq levels (Indigo2) */
-#define SGINT_CPU	16	/* MIPS CPU define 8 interrupt sources */
-#define SGINT_LOCAL0	24	/* 8 local0 irq levels */
-#define SGINT_LOCAL1	32	/* 8 local1 irq levels */
-#define SGINT_LOCAL2	40	/* 8 local2 vectored irq levels */
-#define SGINT_LOCAL3	48	/* 8 local3 vectored irq levels */
-#define SGINT_END	56	/* End of 'spaces' */
+#define SGINT_CPU	MIPS_CPU_IRQ_BASE	/* MIPS CPU define 8 interrupt sources */
+#define SGINT_LOCAL0	(SGINT_CPU+8)	/* 8 local0 irq levels */
+#define SGINT_LOCAL1	(SGINT_CPU+16)	/* 8 local1 irq levels */
+#define SGINT_LOCAL2	(SGINT_CPU+24)	/* 8 local2 vectored irq levels */
+#define SGINT_LOCAL3	(SGINT_CPU+32)	/* 8 local3 vectored irq levels */
+#define SGINT_END	(SGINT_CPU+40)	/* End of 'spaces' */
 
 /*
  * Individual interrupt definitions for the Indy and Indigo2

From zzh.hust@gmail.com Mon Jan  8 13:59:46 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 08 Jan 2007 13:59:50 +0000 (GMT)
Received: from nf-out-0910.google.com ([64.233.182.187]:64663 "EHLO
	nf-out-0910.google.com") by ftp.linux-mips.org with ESMTP
	id S20044904AbXAHN7q (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Mon, 8 Jan 2007 13:59:46 +0000
Received: by nf-out-0910.google.com with SMTP id l24so8689195nfc
        for <linux-mips@linux-mips.org>; Mon, 08 Jan 2007 05:59:46 -0800 (PST)
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
        s=beta; d=gmail.com;
        h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition;
        b=jTQ/GTIi3WS+sYEECgTHZtC918ZXkIXDeUom7mii9CdFNTJaWTaSM/W51uQ8xVn3zuowm9YB5p0TK8Pt+80rdSI9u5yZuyTuxom1xmS/Fidld9dXIQsW4gSJ49MG0E+JnZrcbnnPZKFd2tS66PhnCEZ2413VCcLHJcYFGNrWtyo=
Received: by 10.82.136.4 with SMTP id j4mr2052697bud.1168264786192;
        Mon, 08 Jan 2007 05:59:46 -0800 (PST)
Received: by 10.82.179.13 with HTTP; Mon, 8 Jan 2007 05:59:46 -0800 (PST)
Message-ID: <50c9a2250701080559m66bb04afqd5c9eb1871b85928@mail.gmail.com>
Date:	Mon, 8 Jan 2007 21:59:46 +0800
From:	zhuzhenhua <zzh.hust@gmail.com>
To:	linux-mips <linux-mips@linux-mips.org>
Subject: run linux on hardware without kseg2?
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Return-Path: <zzh.hust@gmail.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13552
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: zzh.hust@gmail.com
Precedence: bulk
X-list: linux-mips

hello all
      our team want to use the mips kesg2 to do other things.and i
found in linux that seems it use kseg2 in vmalloc?
is that possible to remove kseg2 and the linux can also run ?

Best Regards

sky

From ralf@linux-mips.org Mon Jan  8 14:09:28 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 08 Jan 2007 14:09:32 +0000 (GMT)
Received: from wf1.mips-uk.com ([194.74.144.154]:23487 "EHLO
	dl5rb.ham-radio-op.net") by ftp.linux-mips.org with ESMTP
	id S20044925AbXAHOJ2 (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Mon, 8 Jan 2007 14:09:28 +0000
Received: from denk.linux-mips.net (denk.linux-mips.net [127.0.0.1])
	by dl5rb.ham-radio-op.net (8.13.8/8.13.8) with ESMTP id l08EAIUx015494;
	Mon, 8 Jan 2007 14:10:18 GMT
Received: (from ralf@localhost)
	by denk.linux-mips.net (8.13.8/8.13.8/Submit) id l08EAHl1015493;
	Mon, 8 Jan 2007 14:10:17 GMT
Date:	Mon, 8 Jan 2007 14:10:17 +0000
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc:	linux-mips@linux-mips.org
Subject: Re: [PATCH] Fix build errors on SEAD
Message-ID: <20070108141017.GA15486@linux-mips.org>
References: <20070108.012740.30187488.anemo@mba.ocn.ne.jp>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20070108.012740.30187488.anemo@mba.ocn.ne.jp>
User-Agent: Mutt/1.4.2.2i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13553
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips

On Mon, Jan 08, 2007 at 01:27:40AM +0900, Atsushi Nemoto wrote:

> Quick and dirty fix for build errors on SEAD.

Applied,

  Ralf

From ralf@linux-mips.org Mon Jan  8 15:05:30 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 08 Jan 2007 15:05:31 +0000 (GMT)
Received: from wf1.mips-uk.com ([194.74.144.154]:57545 "EHLO
	dl5rb.ham-radio-op.net") by ftp.linux-mips.org with ESMTP
	id S28573844AbXAHPFa (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Mon, 8 Jan 2007 15:05:30 +0000
Received: from denk.linux-mips.net (denk.linux-mips.net [127.0.0.1])
	by dl5rb.ham-radio-op.net (8.13.8/8.13.8) with ESMTP id l08E4xSv014924;
	Mon, 8 Jan 2007 14:07:39 GMT
Received: (from ralf@localhost)
	by denk.linux-mips.net (8.13.8/8.13.8/Submit) id l08E4xgp014923;
	Mon, 8 Jan 2007 14:04:59 GMT
Date:	Mon, 8 Jan 2007 14:04:59 +0000
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc:	linux-mips@linux-mips.org
Subject: Re: [PATCH] SMTC build fix
Message-ID: <20070108140459.GB10909@linux-mips.org>
References: <20070108.005034.104640508.anemo@mba.ocn.ne.jp>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20070108.005034.104640508.anemo@mba.ocn.ne.jp>
User-Agent: Mutt/1.4.2.2i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13554
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips

On Mon, Jan 08, 2007 at 12:50:34AM +0900, Atsushi Nemoto wrote:

> Pass "irq" to __DO_IRQ_SMTC_HOOK() macro.

Applied,

  Ralf

From ralf@linux-mips.org Mon Jan  8 15:10:08 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 08 Jan 2007 15:10:09 +0000 (GMT)
Received: from wf1.mips-uk.com ([194.74.144.154]:17891 "EHLO
	dl5rb.ham-radio-op.net") by ftp.linux-mips.org with ESMTP
	id S28573921AbXAHPKI (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Mon, 8 Jan 2007 15:10:08 +0000
Received: from denk.linux-mips.net (denk.linux-mips.net [127.0.0.1])
	by dl5rb.ham-radio-op.net (8.13.8/8.13.8) with ESMTP id l08FAveA028699;
	Mon, 8 Jan 2007 15:10:57 GMT
Received: (from ralf@localhost)
	by denk.linux-mips.net (8.13.8/8.13.8/Submit) id l08FAunB028698;
	Mon, 8 Jan 2007 15:10:56 GMT
Date:	Mon, 8 Jan 2007 15:10:56 +0000
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc:	linux-mips@linux-mips.org
Subject: Re: [PATCH] Remove unused rm9k_cpu_irq_disable()
Message-ID: <20070108151056.GA28691@linux-mips.org>
References: <20070108.002024.75184927.anemo@mba.ocn.ne.jp>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20070108.002024.75184927.anemo@mba.ocn.ne.jp>
User-Agent: Mutt/1.4.2.2i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13555
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips

On Mon, Jan 08, 2007 at 12:20:24AM +0900, Atsushi Nemoto wrote:

> rm9k_cpu_irq_disable() is unused since commit
> 1603b5aca4f15b34848fb5594d0c7b6333b99144.  Remove it.

Queued for 2.6.21,

  Ralf

From ralf@linux-mips.org Mon Jan  8 15:10:33 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 08 Jan 2007 15:10:35 +0000 (GMT)
Received: from wf1.mips-uk.com ([194.74.144.154]:18659 "EHLO
	dl5rb.ham-radio-op.net") by ftp.linux-mips.org with ESMTP
	id S28573979AbXAHPKV (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Mon, 8 Jan 2007 15:10:21 +0000
Received: from denk.linux-mips.net (denk.linux-mips.net [127.0.0.1])
	by dl5rb.ham-radio-op.net (8.13.8/8.13.8) with ESMTP id l08FBBdC028705;
	Mon, 8 Jan 2007 15:11:11 GMT
Received: (from ralf@localhost)
	by denk.linux-mips.net (8.13.8/8.13.8/Submit) id l08FBBLe028704;
	Mon, 8 Jan 2007 15:11:11 GMT
Date:	Mon, 8 Jan 2007 15:11:11 +0000
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc:	linux-mips@linux-mips.org
Subject: Re: [PATCH] Define MIPS_CPU_IRQ_BASE in generic header
Message-ID: <20070108151111.GB28691@linux-mips.org>
References: <20070108.021429.78706014.anemo@mba.ocn.ne.jp>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20070108.021429.78706014.anemo@mba.ocn.ne.jp>
User-Agent: Mutt/1.4.2.2i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13556
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips

On Mon, Jan 08, 2007 at 02:14:29AM +0900, Atsushi Nemoto wrote:

> The irq_base for {mips,rm7k,rm9k}_cpu_irq_init() are constant on all
> platforms and are same value on most platforms (0 or 16, depends on
> CONFIG_I8259).  Define them in asm-mips/mach-generic/irq.h and make
> them customizable.  This will save a few cycle on each CPU interrupt.
> 
> A good side effect is removing some dependencies to MALTA in generic
> SMTC code.
> 
> Although MIPS_CPU_IRQ_BASE is customizable, this patch changes irq
> mappings on DDB5477, EMMA2RH and MIPS_SIM, since really customizing
> them might cause some header dependency problem and there seems no
> good reason to customize it.  So currently only VR41XX is using custom
> MIPS_CPU_IRQ_BASE value, which is 0 regardless of CONFIG_I8259.
> 
> Testing this patch on those platforms is greatly appreciated.  Thank
> you.

Queued for 2.6.21,

  Ralf

From ralf@linux-mips.org Mon Jan  8 15:25:46 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 08 Jan 2007 15:25:48 +0000 (GMT)
Received: from wf1.mips-uk.com ([194.74.144.154]:52099 "EHLO
	dl5rb.ham-radio-op.net") by ftp.linux-mips.org with ESMTP
	id S28573984AbXAHPZq (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Mon, 8 Jan 2007 15:25:46 +0000
Received: from denk.linux-mips.net (denk.linux-mips.net [127.0.0.1])
	by dl5rb.ham-radio-op.net (8.13.8/8.13.8) with ESMTP id l08FQaG6029381;
	Mon, 8 Jan 2007 15:26:36 GMT
Received: (from ralf@localhost)
	by denk.linux-mips.net (8.13.8/8.13.8/Submit) id l08FQRIa029379;
	Mon, 8 Jan 2007 15:26:27 GMT
Date:	Mon, 8 Jan 2007 15:26:27 +0000
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Davy Chan <chandave-linux-mips@wiasia.com>
Cc:	linux-mips@linux-mips.org
Subject: Re: [PATCH] pnx8550: Fix broken write_config_byte() function in arch/mips/pci/ops-pnx8550.c
Message-ID: <20070108152627.GD28691@linux-mips.org>
References: <20070105135646.D14007@wiasia.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20070105135646.D14007@wiasia.com>
User-Agent: Mutt/1.4.2.2i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13557
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips

On Fri, Jan 05, 2007 at 01:56:46PM +0800, Davy Chan wrote:

> There's a serious typo in the function:
>   arch/mips/pci/ops-pnx8550.c:write_config_byte()
> 
> The parameter passed to the function config_access() is PCI_CMD_CONFIG_READ
> instead of PCI_CMD_CONFIG_WRITE. This renders any attempts to write
> a single byte to the PCI configuration registers useless.
> 
> This problem does not exist for write_config_word() nor write_config_dword().
> 
> This problem has been there since kernel v2.6.17 and is still there
> as of kernel v2.6.19.1.

The bug exists even in 2.6.16 which is the oldest -stable branch I'm still
maintaining on linux-mips.org.

Patch applied.  Standard rant, please add a Signed-off-by: line.  See
Documentation/SubmittingPatches for what this is about.

  Ralf

From ralf@linux-mips.org Mon Jan  8 15:54:05 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 08 Jan 2007 15:54:07 +0000 (GMT)
Received: from wf1.mips-uk.com ([194.74.144.154]:32911 "EHLO
	dl5rb.ham-radio-op.net") by ftp.linux-mips.org with ESMTP
	id S28574073AbXAHPyF (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Mon, 8 Jan 2007 15:54:05 +0000
Received: from denk.linux-mips.net (denk.linux-mips.net [127.0.0.1])
	by dl5rb.ham-radio-op.net (8.13.8/8.13.8) with ESMTP id l08Fssjc001647;
	Mon, 8 Jan 2007 15:54:54 GMT
Received: (from ralf@localhost)
	by denk.linux-mips.net (8.13.8/8.13.8/Submit) id l08Fsrq3001646;
	Mon, 8 Jan 2007 15:54:53 GMT
Date:	Mon, 8 Jan 2007 15:54:53 +0000
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc:	linux-mips@linux-mips.org
Subject: Re: [PATCH] prom_free_prom_memory cleanup
Message-ID: <20070108155453.GA1619@linux-mips.org>
References: <20061230.004359.41198543.anemo@mba.ocn.ne.jp>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20061230.004359.41198543.anemo@mba.ocn.ne.jp>
User-Agent: Mutt/1.4.2.2i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13558
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips

On Sat, Dec 30, 2006 at 12:43:59AM +0900, Atsushi Nemoto wrote:

> Current prom_free_prom_memory() implementations are almost same as
> free_init_pages(), or no-op.  Make free_init_pages() extern (again)
> and make prom_free_prom_memory() use it.

Queued for 2.6.21.  Thanks,

  Ralf

From ralf@linux-mips.org Mon Jan  8 16:26:14 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 08 Jan 2007 16:26:16 +0000 (GMT)
Received: from wf1.mips-uk.com ([194.74.144.154]:13191 "EHLO
	dl5rb.ham-radio-op.net") by ftp.linux-mips.org with ESMTP
	id S28574123AbXAHQ0O (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Mon, 8 Jan 2007 16:26:14 +0000
Received: from denk.linux-mips.net (denk.linux-mips.net [127.0.0.1])
	by dl5rb.ham-radio-op.net (8.13.8/8.13.8) with ESMTP id l08GR3gp007260;
	Mon, 8 Jan 2007 16:27:03 GMT
Received: (from ralf@localhost)
	by denk.linux-mips.net (8.13.8/8.13.8/Submit) id l08GR2mK007259;
	Mon, 8 Jan 2007 16:27:02 GMT
Date:	Mon, 8 Jan 2007 16:27:02 +0000
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc:	linux-mips@linux-mips.org
Subject: Re: [PATCH] Unify memset.S
Message-ID: <20070108162702.GA5763@linux-mips.org>
References: <20061218.000740.08076708.anemo@mba.ocn.ne.jp>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20061218.000740.08076708.anemo@mba.ocn.ne.jp>
User-Agent: Mutt/1.4.2.2i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13559
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips

On Mon, Dec 18, 2006 at 12:07:40AM +0900, Atsushi Nemoto wrote:

> The 32-bit version and 64-bit version are almost equal.  Unify them.
> This makes further improvements (for example, supporting CDEX, etc.)
> easier.

Queued for 2.6.21 as well.  Thanks,

  Ralf

From ralf@linux-mips.org Mon Jan  8 16:26:58 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 08 Jan 2007 16:27:00 +0000 (GMT)
Received: from wf1.mips-uk.com ([194.74.144.154]:14727 "EHLO
	dl5rb.ham-radio-op.net") by ftp.linux-mips.org with ESMTP
	id S28574123AbXAHQ06 (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Mon, 8 Jan 2007 16:26:58 +0000
Received: from denk.linux-mips.net (denk.linux-mips.net [127.0.0.1])
	by dl5rb.ham-radio-op.net (8.13.8/8.13.8) with ESMTP id l08GRmeQ007282;
	Mon, 8 Jan 2007 16:27:48 GMT
Received: (from ralf@localhost)
	by denk.linux-mips.net (8.13.8/8.13.8/Submit) id l08GRmZ1007281;
	Mon, 8 Jan 2007 16:27:48 GMT
Date:	Mon, 8 Jan 2007 16:27:48 +0000
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc:	linux-mips@linux-mips.org
Subject: Re: [PATCH] Fix build_store_reg()
Message-ID: <20070108162748.GB5763@linux-mips.org>
References: <20061218.003821.96686517.anemo@mba.ocn.ne.jp>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20061218.003821.96686517.anemo@mba.ocn.ne.jp>
User-Agent: Mutt/1.4.2.2i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13560
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips

On Mon, Dec 18, 2006 at 12:38:21AM +0900, Atsushi Nemoto wrote:

> The commit a923660d786a53e78834b19062f7af2535f7f8ad accidently
> prevents TX49 from using CDEX.  Use build_dst_pref() only if prefetch
> for store was really available.

Applied.  Thanks,

  Ralf

From vagabon.xyz@gmail.com Mon Jan  8 17:42:48 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 08 Jan 2007 17:42:55 +0000 (GMT)
Received: from nf-out-0910.google.com ([64.233.182.187]:3897 "EHLO
	nf-out-0910.google.com") by ftp.linux-mips.org with ESMTP
	id S28574354AbXAHRms (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Mon, 8 Jan 2007 17:42:48 +0000
Received: by nf-out-0910.google.com with SMTP id l24so8744174nfc
        for <linux-mips@linux-mips.org>; Mon, 08 Jan 2007 09:42:47 -0800 (PST)
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
        s=beta; d=gmail.com;
        h=received:to:cc:subject:date:message-id:x-mailer:in-reply-to:references:from;
        b=n3yUOEUpum5TeRwkVpOPpmAsLRAopZwPQUqxoAkFaiHb44ezaUdXTtkf1ehZAZSiPZf7Auipwuo30Ihp64aXbfzlh1IK0YgGX3QcEeWb+3fACoVTvnz6RpuQIMNrzXdHxPasYkXivGRSBbamOoRJ95SwWluco1hJNcAVRtLiE8k=
Received: by 10.49.90.4 with SMTP id s4mr1554392nfl.1168278166881;
        Mon, 08 Jan 2007 09:42:46 -0800 (PST)
Received: from spoutnik.innova-card.com ( [81.252.61.1])
        by mx.google.com with ESMTP id x27sm107759001nfb.2007.01.08.09.42.45;
        Mon, 08 Jan 2007 09:42:46 -0800 (PST)
Received: by spoutnik.innova-card.com (Postfix, from userid 500)
	id AD5FF23F759; Mon,  8 Jan 2007 18:44:52 +0100 (CET)
To:	ralf@linux-mips.org
Cc:	linux-mips@linux-mips.org, Franck Bui-Huu <fbuihuu@gmail.com>
Subject: [PATCH 1/2] Setup min_low_pfn/max_low_pfn correctly
Date:	Mon,  8 Jan 2007 18:44:51 +0100
Message-Id: <11682782922887-git-send-email-fbuihuu@gmail.com>
X-Mailer: git-send-email 1.4.4.3.ge6d4
In-Reply-To: <11682782923799-git-send-email-fbuihuu@gmail.com>
References: <11682782923799-git-send-email-fbuihuu@gmail.com>
From:	Franck Bui-Huu <vagabon.xyz@gmail.com>
Return-Path: <vagabon.xyz@gmail.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13561
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: vagabon.xyz@gmail.com
Precedence: bulk
X-list: linux-mips

From: Franck Bui-Huu <fbuihuu@gmail.com>

This patch makes a better usage of these two globals.
'min_low_pfn' is now correctly setup for all configs, which
allow us to rely on it in boot memory code init.

Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
---
 arch/mips/kernel/setup.c |   29 ++++++++++++++++++++---------
 arch/mips/mm/init.c      |   23 +++++++++++------------
 include/asm-mips/dma.h   |    1 +
 3 files changed, 32 insertions(+), 21 deletions(-)

diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
index 89440a0..581409d 100644
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -271,8 +271,7 @@ static void __init bootmem_init(void)
 static void __init bootmem_init(void)
 {
 	unsigned long reserved_end;
-	unsigned long highest = 0;
-	unsigned long mapstart = -1UL;
+	unsigned long mapstart = ~0UL;
 	unsigned long bootmap_size;
 	int i;
 
@@ -284,6 +283,13 @@ static void __init bootmem_init(void)
 	reserved_end = max(init_initrd(), PFN_UP(__pa_symbol(&_end)));
 
 	/*
+	 * max_low_pfn is not a number of pages. The number of pages
+	 * of the system is given by 'max_low_pfn - min_low_pfn'.
+	 */
+	min_low_pfn = ~0UL;
+	max_low_pfn = 0;
+
+	/*
 	 * Find the highest page frame number we have available.
 	 */
 	for (i = 0; i < boot_mem_map.nr_map; i++) {
@@ -296,8 +302,10 @@ static void __init bootmem_init(void)
 		end = PFN_DOWN(boot_mem_map.map[i].addr
 				+ boot_mem_map.map[i].size);
 
-		if (end > highest)
-			highest = end;
+		if (end > max_low_pfn)
+			max_low_pfn = end;
+		if (start < min_low_pfn)
+			min_low_pfn = start;
 		if (end <= reserved_end)
 			continue;
 		if (start >= mapstart)
@@ -305,22 +313,25 @@ static void __init bootmem_init(void)
 		mapstart = max(reserved_end, start);
 	}
 
+	if (min_low_pfn >= max_low_pfn)
+		panic("Incorrect memory mapping !!!");
+
 	/*
 	 * Determine low and high memory ranges
 	 */
-	if (highest > PFN_DOWN(HIGHMEM_START)) {
+	if (max_low_pfn > PFN_DOWN(HIGHMEM_START)) {
 #ifdef CONFIG_HIGHMEM
 		highstart_pfn = PFN_DOWN(HIGHMEM_START);
-		highend_pfn = highest;
+		highend_pfn = max_low_pfn;
 #endif
-		highest = PFN_DOWN(HIGHMEM_START);
+		max_low_pfn = PFN_DOWN(HIGHMEM_START);
 	}
 
 	/*
 	 * Initialize the boot-time allocator with low memory only.
 	 */
-	bootmap_size = init_bootmem(mapstart, highest);
-
+	bootmap_size = init_bootmem_node(NODE_DATA(0), mapstart,
+					 min_low_pfn, max_low_pfn);
 	/*
 	 * Register fully available low RAM pages with the bootmem allocator.
 	 */
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c
index 30245c0..cd50b7a 100644
--- a/arch/mips/mm/init.c
+++ b/arch/mips/mm/init.c
@@ -341,7 +341,6 @@ static int __init page_is_ram(unsigned long pagenr)
 void __init paging_init(void)
 {
 	unsigned long zones_size[MAX_NR_ZONES] = { 0, };
-	unsigned long max_dma, low;
 #ifndef CONFIG_FLATMEM
 	unsigned long zholes_size[MAX_NR_ZONES] = { 0, };
 	unsigned long i, j, pfn;
@@ -354,19 +353,19 @@ void __init paging_init(void)
 #endif
 	kmap_coherent_init();
 
-	max_dma = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT;
-	low = max_low_pfn;
-
 #ifdef CONFIG_ISA
-	if (low < max_dma)
-		zones_size[ZONE_DMA] = low;
-	else {
-		zones_size[ZONE_DMA] = max_dma;
-		zones_size[ZONE_NORMAL] = low - max_dma;
-	}
-#else
-	zones_size[ZONE_DMA] = low;
+	if (max_low_pfn >= MAX_DMA_PFN)
+		if (min_low_pfn >= MAX_DMA_PFN) {
+			zones_size[ZONE_DMA] = 0;
+			zones_size[ZONE_NORMAL] = max_low_pfn - min_low_pfn;
+		} else {
+			zones_size[ZONE_DMA] = MAX_DMA_PFN - min_low_pfn;
+			zones_size[ZONE_NORMAL] = max_low_pfn - MAX_DMA_PFN;
+		}
+	else
 #endif
+	zones_size[ZONE_DMA] = max_low_pfn - min_low_pfn;
+
 #ifdef CONFIG_HIGHMEM
 	zones_size[ZONE_HIGHMEM] = highend_pfn - highstart_pfn;
 
diff --git a/include/asm-mips/dma.h b/include/asm-mips/dma.h
index 23f789c..e06ef07 100644
--- a/include/asm-mips/dma.h
+++ b/include/asm-mips/dma.h
@@ -91,6 +91,7 @@
 #else
 #define MAX_DMA_ADDRESS		(PAGE_OFFSET + 0x01000000)
 #endif
+#define MAX_DMA_PFN		PFN_DOWN(virt_to_phys((void *)MAX_DMA_ADDRESS))
 
 /* 8237 DMA controllers */
 #define IO_DMA1_BASE	0x00	/* 8 bit slave DMA, channels 0..3 */
-- 
1.4.4.3.ge6d4


From vagabon.xyz@gmail.com Mon Jan  8 17:43:19 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 08 Jan 2007 17:43:22 +0000 (GMT)
Received: from nf-out-0910.google.com ([64.233.182.191]:59 "EHLO
	nf-out-0910.google.com") by ftp.linux-mips.org with ESMTP
	id S28574356AbXAHRms (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Mon, 8 Jan 2007 17:42:48 +0000
Received: by nf-out-0910.google.com with SMTP id l24so8744178nfc
        for <linux-mips@linux-mips.org>; Mon, 08 Jan 2007 09:42:48 -0800 (PST)
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
        s=beta; d=gmail.com;
        h=received:to:cc:subject:date:message-id:x-mailer:in-reply-to:references:from;
        b=UanY6F5Ng1phtAl8TgXmd9KzL7v2cpbPHuTk4gLdJ+XQJJZgAELxvN8OR4ty4RDnFB+maM4QPqaL4Vr6vTCdM8TPHdnvMmbgAMVrg7yMw4dOhR96HWQFa/gG/vHZCQaBP8EvpM4XfuJ14p+fjKkfJ7clLmo7aeR9yLuyFvsojXY=
Received: by 10.48.220.15 with SMTP id s15mr11206482nfg.1168278166956;
        Mon, 08 Jan 2007 09:42:46 -0800 (PST)
Received: from spoutnik.innova-card.com ( [81.252.61.1])
        by mx.google.com with ESMTP id p45sm107678077nfa.2007.01.08.09.42.45;
        Mon, 08 Jan 2007 09:42:46 -0800 (PST)
Received: by spoutnik.innova-card.com (Postfix, from userid 500)
	id D175A23F76E; Mon,  8 Jan 2007 18:44:52 +0100 (CET)
To:	ralf@linux-mips.org
Cc:	linux-mips@linux-mips.org, Franck Bui-Huu <fbuihuu@gmail.com>
Subject: [PATCH 2/2] FLATMEM: introduce PHYS_OFFSET.
Date:	Mon,  8 Jan 2007 18:44:52 +0100
Message-Id: <11682782923407-git-send-email-fbuihuu@gmail.com>
X-Mailer: git-send-email 1.4.4.3.ge6d4
In-Reply-To: <11682782923799-git-send-email-fbuihuu@gmail.com>
References: <11682782923799-git-send-email-fbuihuu@gmail.com>
From:	Franck Bui-Huu <vagabon.xyz@gmail.com>
Return-Path: <vagabon.xyz@gmail.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13562
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: vagabon.xyz@gmail.com
Precedence: bulk
X-list: linux-mips

From: Franck Bui-Huu <fbuihuu@gmail.com>

The old code was assuming that min_low_pfn was always 0. This
means that platforms having a big hole at their memory start
paid the price of wasting some memory for the allocation of
unused entries in mem_map[].

This patch prevents this waste.

It introduces PHYS_OFFSET define which is the start of the
physical memory and uses it wherever needed. Specially when
converting physical/virtual addresses into virtual/physical
ones.

Currently all platforms defines PHYS_OFFSET to 0.

Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
---
 arch/mips/kernel/setup.c |    3 +++
 include/asm-mips/io.h    |    4 ++--
 include/asm-mips/page.h  |   25 +++++++++++++++++++++----
 3 files changed, 26 insertions(+), 6 deletions(-)

diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
index 581409d..63c17ce 100644
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -315,6 +315,9 @@ static void __init bootmem_init(void)
 
 	if (min_low_pfn >= max_low_pfn)
 		panic("Incorrect memory mapping !!!");
+	if (min_low_pfn != ARCH_PFN_OFFSET)
+		panic("PHYS_OFFSET(%lx) and your mem start(%lx) don't match",
+		      PHYS_OFFSET, PFN_PHYS(min_low_pfn));
 
 	/*
 	 * Determine low and high memory ranges
diff --git a/include/asm-mips/io.h b/include/asm-mips/io.h
index 38d1399..e1592af 100644
--- a/include/asm-mips/io.h
+++ b/include/asm-mips/io.h
@@ -115,7 +115,7 @@ static inline void set_io_port_base(unsigned long base)
  */
 static inline unsigned long virt_to_phys(volatile const void *address)
 {
-	return (unsigned long)address - PAGE_OFFSET;
+	return (unsigned long)address - PAGE_OFFSET + PHYS_OFFSET;
 }
 
 /*
@@ -132,7 +132,7 @@ static inline unsigned long virt_to_phys(volatile const void *address)
  */
 static inline void * phys_to_virt(unsigned long address)
 {
-	return (void *)(address + PAGE_OFFSET);
+	return (void *)(address + PAGE_OFFSET - PHYS_OFFSET);
 }
 
 /*
diff --git a/include/asm-mips/page.h b/include/asm-mips/page.h
index 2f9e1a9..d3fbd83 100644
--- a/include/asm-mips/page.h
+++ b/include/asm-mips/page.h
@@ -34,6 +34,20 @@
 
 #ifndef __ASSEMBLY__
 
+/*
+ * This gives the physical RAM offset.
+ */
+#ifndef PHYS_OFFSET
+#define PHYS_OFFSET		0UL
+#endif
+
+/*
+ * It's normally defined only for FLATMEM config but it's
+ * used in our early mem init code for all memory models.
+ * So always define it.
+ */
+#define ARCH_PFN_OFFSET		PFN_UP(PHYS_OFFSET)
+
 #include <linux/pfn.h>
 #include <asm/io.h>
 
@@ -132,20 +146,23 @@ typedef struct { unsigned long pgprot; } pgprot_t;
 /* to align the pointer to the (next) page boundary */
 #define PAGE_ALIGN(addr)	(((addr) + PAGE_SIZE - 1) & PAGE_MASK)
 
+/*
+ * __pa()/__va() should be used only during mem init.
+ */
 #if defined(CONFIG_64BIT) && !defined(CONFIG_BUILD_ELF64)
 #define __pa_page_offset(x)	((unsigned long)(x) < CKSEG0 ? PAGE_OFFSET : CKSEG0)
 #else
 #define __pa_page_offset(x)	PAGE_OFFSET
 #endif
-#define __pa(x)			((unsigned long)(x) - __pa_page_offset(x))
-#define __pa_symbol(x)		__pa(RELOC_HIDE((unsigned long)(x),0))
-#define __va(x)			((void *)((unsigned long)(x) + PAGE_OFFSET))
+#define __pa(x)		((unsigned long)(x) - __pa_page_offset(x) + PHYS_OFFSET)
+#define __va(x)		((void *)((unsigned long)(x) + PAGE_OFFSET - PHYS_OFFSET))
+#define __pa_symbol(x)	__pa(RELOC_HIDE((unsigned long)(x),0))
 
 #define pfn_to_kaddr(pfn)	__va((pfn) << PAGE_SHIFT)
 
 #ifdef CONFIG_FLATMEM
 
-#define pfn_valid(pfn)		((pfn) < max_mapnr)
+#define pfn_valid(pfn)		((pfn) >= ARCH_PFN_OFFSET && (pfn) < max_mapnr)
 
 #elif defined(CONFIG_SPARSEMEM)
 
-- 
1.4.4.3.ge6d4


From vagabon.xyz@gmail.com Mon Jan  8 17:43:46 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 08 Jan 2007 17:43:52 +0000 (GMT)
Received: from nf-out-0910.google.com ([64.233.182.187]:3897 "EHLO
	nf-out-0910.google.com") by ftp.linux-mips.org with ESMTP
	id S28574360AbXAHRmt (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Mon, 8 Jan 2007 17:42:49 +0000
Received: by nf-out-0910.google.com with SMTP id l24so8744174nfc
        for <linux-mips@linux-mips.org>; Mon, 08 Jan 2007 09:42:49 -0800 (PST)
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
        s=beta; d=gmail.com;
        h=received:to:cc:subject:date:message-id:x-mailer:from;
        b=hecV1tXDhT1/GmTMKWLVJcZs0yN9klVD22hrdTAiHkJRsvinANm1vypNTGOfHG1kVimE/5QsZCBFQDBMm3naHqTrtBn5LSxroL5ibX+CZrC5YEuWOTn1/otQq2lb7K0o1gQO6bHijKze44KqK7HUQ8fETUz7Yk1wzLBLsG7L1tg=
Received: by 10.49.107.8 with SMTP id j8mr17910946nfm.1168278166576;
        Mon, 08 Jan 2007 09:42:46 -0800 (PST)
Received: from spoutnik.innova-card.com ( [81.252.61.1])
        by mx.google.com with ESMTP id k23sm107815220nfc.2007.01.08.09.42.45;
        Mon, 08 Jan 2007 09:42:46 -0800 (PST)
Received: by spoutnik.innova-card.com (Postfix, from userid 500)
	id 806C723F76A; Mon,  8 Jan 2007 18:44:52 +0100 (CET)
To:	ralf@linux-mips.org
Cc:	linux-mips@linux-mips.org
Subject: [PATCH 0/2] FLATMEM: allow memory to start at pfn != 0
Date:	Mon,  8 Jan 2007 18:44:50 +0100
Message-Id: <11682782923799-git-send-email-fbuihuu@gmail.com>
X-Mailer: git-send-email 1.4.4.3.ge6d4
From:	Franck Bui-Huu <vagabon.xyz@gmail.com>
Return-Path: <vagabon.xyz@gmail.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13563
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: vagabon.xyz@gmail.com
Precedence: bulk
X-list: linux-mips

Ralf,

I'm resending this patchset with almost no change. The only one
made is in patch #1 in paging_init() when CONFIG_ISA is set.

I know that you encountered some issues when using malta config. It
seems that this platform uses HIGHMEM but no ISA config. So this new
patchset shouldn't fix anything for you, but I need more info to
debug it.

Could you give a try to patch #1 _only_ and give me the console
output ? That would be really nice.

Thanks
		Franck




From anemo@mba.ocn.ne.jp Tue Jan  9 01:23:05 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 09 Jan 2007 01:23:09 +0000 (GMT)
Received: from topsns2.toshiba-tops.co.jp ([202.230.225.126]:59026 "EHLO
	topsns2.toshiba-tops.co.jp") by ftp.linux-mips.org with ESMTP
	id S28575789AbXAIBXF (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 9 Jan 2007 01:23:05 +0000
Received: from topsms.toshiba-tops.co.jp by topsns2.toshiba-tops.co.jp
          via smtpd (for ftp.linux-mips.org [194.74.144.162]) with ESMTP; Tue, 9 Jan 2007 10:23:04 +0900
Received: from topsms.toshiba-tops.co.jp (localhost.localdomain [127.0.0.1])
	by localhost.toshiba-tops.co.jp (Postfix) with ESMTP id 9C8AE41812;
	Tue,  9 Jan 2007 10:23:01 +0900 (JST)
Received: from srd2sd.toshiba-tops.co.jp (srd2sd.toshiba-tops.co.jp [172.17.28.2])
	by topsms.toshiba-tops.co.jp (Postfix) with ESMTP id 9001D20268;
	Tue,  9 Jan 2007 10:23:01 +0900 (JST)
Received: from localhost (fragile [172.17.28.65])
	by srd2sd.toshiba-tops.co.jp (8.12.10/8.12.10) with ESMTP id l091N0W0029078;
	Tue, 9 Jan 2007 10:23:01 +0900 (JST)
	(envelope-from anemo@mba.ocn.ne.jp)
Date:	Tue, 09 Jan 2007 10:23:00 +0900 (JST)
Message-Id: <20070109.102300.126576736.nemoto@toshiba-tops.co.jp>
To:	linux-mips@linux-mips.org
Cc:	ralf@linux-mips.org, danieljlaird@hotmail.com
Subject: Re: [MIPS] PNX8550: Fix system timer support
From:	Atsushi Nemoto <anemo@mba.ocn.ne.jp>
In-Reply-To: <S28574475AbXAHSAL/20070108180011Z+188138@ftp.linux-mips.org>
References: <S28574475AbXAHSAL/20070108180011Z+188138@ftp.linux-mips.org>
X-Fingerprint: 6ACA 1623 39BD 9A94 9B1A  B746 CA77 FE94 2874 D52F
X-Pgp-Public-Key: http://wwwkeys.pgp.net/pks/lookup?op=get&search=0x2874D52F
X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Return-Path: <anemo@mba.ocn.ne.jp>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13564
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: anemo@mba.ocn.ne.jp
Precedence: bulk
X-list: linux-mips

On Mon, 08 Jan 2007 18:00:06 +0000, linux-mips@linux-mips.org wrote:
> Author: Vitaly Wool <vitalywool@gmail.com> Thu Dec 28 17:14:05 2006 +0300
> Comitter: Ralf Baechle <ralf@linux-mips.org> Mon Jan 8 17:48:25 2007 +0000
> Commit: 390964852cbd7d5c589de60223d7cf73e9cbcdb9
> Gitweb: http://www.linux-mips.org/g/linux/39096485
> Branch: master
> 
> the patch inlined below restores proper time accounting for PNX8550-based
> boards. It also gets rid of #ifdef in the generic code which becomes
> unnecessary then.
> 
> It's functionally identical to the previous patch with the same name but
> it has minor comments from Atsushi and Sergei taken into account.

Please apply this patch too.  Daniel confirmed this patch fixes a long
hang on boot.

Subject: PNX8550: Fix system timer initialization

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>

diff --git a/arch/mips/philips/pnx8550/common/time.c b/arch/mips/philips/pnx8550/common/time.c
index 08ebc3d..9d9fc71 100644
--- a/arch/mips/philips/pnx8550/common/time.c
+++ b/arch/mips/philips/pnx8550/common/time.c
@@ -80,6 +80,7 @@ void pnx8550_time_init(void)
 	 */
 	mips_hpt_frequency = 27UL * ((1000000UL * n)/(m * pow2p));
 	cpj = (mips_hpt_frequency + HZ / 2) / HZ;
+	write_c0_count(0);
 	timer_ack();
 
 	/* Setup Timer 2 */


From colin@realtek.com.tw Tue Jan  9 02:52:23 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 09 Jan 2007 02:52:27 +0000 (GMT)
Received: from mf2.realtek.com.tw ([60.248.182.6]:60945 "EHLO
	mf2.realtek.com.tw") by ftp.linux-mips.org with ESMTP
	id S28576189AbXAICwX (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 9 Jan 2007 02:52:23 +0000
Received: from msx.realtek.com.tw (unverified [172.21.1.77]) by mf2.realtek.com.tw
 (Clearswift SMTPRS 5.1.7) with ESMTP id <T7d12e6286bdc803816a4c@mf2.realtek.com.tw> for <linux-mips@linux-mips.org>;
 Tue, 9 Jan 2007 10:53:05 +0800
Received: from rtpdii3098 ([172.21.98.16])
          by msx.realtek.com.tw (Lotus Domino Release 6.5.3)
          with ESMTP id 2007010910521398-230522 ;
          Tue, 9 Jan 2007 10:52:13 +0800 
Message-ID: <1cf601c73399$2ab7cd10$106215ac@realtek.com.tw>
From:	"colin" <colin@realtek.com.tw>
To:	<linux-mips@linux-mips.org>
Subject: Using 802.11x wireless usb device on MIPS platform
Date:	Tue, 9 Jan 2007 10:52:14 +0800
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2800.1807
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1807
X-MIMETrack: Itemize by SMTP Server on msx/Realtek(Release 6.5.3|September 14, 2004) at
 2007/01/09 =?Bog5?B?pFekyCAxMDo1MjoxNA==?=,
	Serialize by Router on msx/Realtek(Release 6.5.3|September 14, 2004) at
 2007/01/09 =?Bog5?B?pFekyCAxMDo1MjoxNQ==?=,
	Serialize complete at 2007/01/09 =?Bog5?B?pFekyCAxMDo1MjoxNQ==?=
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset="big5"
Return-Path: <colin@realtek.com.tw>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13565
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: colin@realtek.com.tw
Precedence: bulk
X-list: linux-mips


Hi all,
I have used two 802.11x wireless usb devices successfully on MIPS platform.
One is realtek 8187 and the other one is ralink 2571.
I would like to put them into kernel tree and then I found that there are
not many 802.11x devices supported in Linux. Moreover, there is no any
wireless usb device supported.
It is also very strange that 8187 and 2571 both have their own ieee802.11x
stack and crypt drivers. It seems that Linux doesn't offer them.
I am wondering why Linux is so complex in 802.11x.

Regards,
Colin


From ralf@linux-mips.org Tue Jan  9 11:45:05 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 09 Jan 2007 11:45:07 +0000 (GMT)
Received: from wf1.mips-uk.com ([194.74.144.154]:43158 "EHLO
	dl5rb.ham-radio-op.net") by ftp.linux-mips.org with ESMTP
	id S28584491AbXAILpF (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 9 Jan 2007 11:45:05 +0000
Received: from denk.linux-mips.net (denk.linux-mips.net [127.0.0.1])
	by dl5rb.ham-radio-op.net (8.13.8/8.13.8) with ESMTP id l09BjrLP006719;
	Tue, 9 Jan 2007 11:45:53 GMT
Received: (from ralf@localhost)
	by denk.linux-mips.net (8.13.8/8.13.8/Submit) id l09BjqO5006718;
	Tue, 9 Jan 2007 11:45:52 GMT
Date:	Tue, 9 Jan 2007 11:45:52 +0000
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc:	linux-mips@linux-mips.org, danieljlaird@hotmail.com
Subject: Re: [MIPS] PNX8550: Fix system timer support
Message-ID: <20070109114552.GA6614@linux-mips.org>
References: <S28574475AbXAHSAL/20070108180011Z+188138@ftp.linux-mips.org> <20070109.102300.126576736.nemoto@toshiba-tops.co.jp>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20070109.102300.126576736.nemoto@toshiba-tops.co.jp>
User-Agent: Mutt/1.4.2.2i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13566
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips

On Tue, Jan 09, 2007 at 10:23:00AM +0900, Atsushi Nemoto wrote:

> Please apply this patch too.  Daniel confirmed this patch fixes a long
> hang on boot.
> 
> Subject: PNX8550: Fix system timer initialization

Thanks, applied.

  Ralf

From ralf@linux-mips.org Tue Jan  9 14:08:44 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 09 Jan 2007 14:08:45 +0000 (GMT)
Received: from wf1.mips-uk.com ([194.74.144.154]:1245 "EHLO
	dl5rb.ham-radio-op.net") by ftp.linux-mips.org with ESMTP
	id S28577554AbXAIOIo (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 9 Jan 2007 14:08:44 +0000
Received: from denk.linux-mips.net (denk.linux-mips.net [127.0.0.1])
	by dl5rb.ham-radio-op.net (8.13.8/8.13.8) with ESMTP id l09E9XnY018320;
	Tue, 9 Jan 2007 14:09:33 GMT
Received: (from ralf@localhost)
	by denk.linux-mips.net (8.13.8/8.13.8/Submit) id l09E9VV7018319;
	Tue, 9 Jan 2007 14:09:31 GMT
Date:	Tue, 9 Jan 2007 14:09:31 +0000
From:	Ralf Baechle <ralf@linux-mips.org>
To:	colin <colin@realtek.com.tw>
Cc:	linux-mips@linux-mips.org, netdev@vger.kernel.org
Subject: Re: Using 802.11x wireless usb device on MIPS platform
Message-ID: <20070109140931.GB6614@linux-mips.org>
References: <1cf601c73399$2ab7cd10$106215ac@realtek.com.tw>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <1cf601c73399$2ab7cd10$106215ac@realtek.com.tw>
User-Agent: Mutt/1.4.2.2i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13567
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips

On Tue, Jan 09, 2007 at 10:52:14AM +0800, colin wrote:

> I have used two 802.11x wireless usb devices successfully on MIPS platform.
> One is realtek 8187 and the other one is ralink 2571.
> I would like to put them into kernel tree and then I found that there are
> not many 802.11x devices supported in Linux.

If you want to submit a driver to the kernel, please post it to
netdev@vger.kernel.org.  Don't expect a driver to be just accepted; it
will go through a thorough review and after all the issues have been
resolved it will be accepted.

> Moreover, there is no any wireless usb device supported.

Wireless support under Linux is suffering from several problems:

 o some core require microcode to be loaded but the vendor does not
   give such permission.
 o lack of documentation, sometimes for paranoid or bogus legal reasons or
   "intellectual property" concerns.

At times it really seems vendors are working to maximize pain for the user ...

> It is also very strange that 8187 and 2571 both have their own ieee802.11x
> stack and crypt drivers. It seems that Linux doesn't offer them.
> I am wondering why Linux is so complex in 802.11x.

Well, for one thing because 802.11 is complex.  The Linux wireless support
has gone through several generations; some of the wireless work was for
one or the other reason never integrated in the kernel.org kernel.

  Ralf

From vagabon.xyz@gmail.com Wed Jan 10 16:07:40 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 10 Jan 2007 16:07:54 +0000 (GMT)
Received: from p549F72FE.dip.t-dialin.net ([84.159.114.254]:33981 "EHLO
	p549F72FE.dip.t-dialin.net") by ftp.linux-mips.org with ESMTP
	id S20040407AbXAJQHk (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Wed, 10 Jan 2007 16:07:40 +0000
Received: from nf-out-0910.google.com ([64.233.182.189]:5588 "EHLO
	nf-out-0910.google.com") by lappi.linux-mips.net with ESMTP
	id S136406AbXAJImD (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Wed, 10 Jan 2007 09:42:03 +0100
Received: by nf-out-0910.google.com with SMTP id l24so408127nfc
        for <linux-mips@linux-mips.org>; Wed, 10 Jan 2007 00:42:02 -0800 (PST)
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=beta;
        h=received:to:cc:subject:date:message-id:x-mailer:in-reply-to:references:from;
        b=LEfihUVPMECUa/94YxTCUnVP+fd7StiiiLmSzol/pChA+qswMktD+Qa/GOaWPGasEYO8DhQTGK4gZGdlpJqrc11ArxruRkXamaxQBGZSvxtlgx2DHdZXK4QPP2pbRL0PB8jqiimN27uTb39/M1gHuAIK4w/N/8lIzjLZlzTCeOw=
Received: by 10.48.48.13 with SMTP id v13mr1004035nfv.1168418522582;
        Wed, 10 Jan 2007 00:42:02 -0800 (PST)
Received: from spoutnik.innova-card.com ( [81.252.61.1])
        by mx.google.com with ESMTP id x1sm3246051nfb.2007.01.10.00.41.59;
        Wed, 10 Jan 2007 00:42:01 -0800 (PST)
Received: by spoutnik.innova-card.com (Postfix, from userid 500)
	id 07BFC23F759; Wed, 10 Jan 2007 09:44:06 +0100 (CET)
To:	ralf@linux-mips.org
Cc:	linux-mips@linux-mips.org, Franck Bui-Huu <fbuihuu@gmail.com>
Subject: [PATCH 1/2] Setup min_low_pfn/max_low_pfn correctly
Date:	Wed, 10 Jan 2007 09:44:04 +0100
Message-Id: <116841864571-git-send-email-fbuihuu@gmail.com>
X-Mailer: git-send-email 1.4.4.3.ge6d4
In-Reply-To: <116841864595-git-send-email-fbuihuu@gmail.com>
References: <116841864595-git-send-email-fbuihuu@gmail.com>
From:	Franck Bui-Huu <vagabon.xyz@gmail.com>
Return-Path: <vagabon.xyz@gmail.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13568
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: vagabon.xyz@gmail.com
Precedence: bulk
X-list: linux-mips

From: Franck Bui-Huu <fbuihuu@gmail.com>

This patch makes a better usage of these two globals.
'min_low_pfn' is now correctly setup for all configs, which
allow us to rely on it in boot memory code init.

Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
---
 arch/mips/kernel/setup.c |   36 +++++++++++++++++++++++++++---------
 arch/mips/mm/init.c      |   23 +++++++++++------------
 include/asm-mips/dma.h   |    1 +
 3 files changed, 39 insertions(+), 21 deletions(-)

diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
index 89440a0..f352cd9 100644
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -271,8 +271,7 @@ static void __init bootmem_init(void)
 static void __init bootmem_init(void)
 {
 	unsigned long reserved_end;
-	unsigned long highest = 0;
-	unsigned long mapstart = -1UL;
+	unsigned long mapstart = ~0UL;
 	unsigned long bootmap_size;
 	int i;
 
@@ -284,6 +283,13 @@ static void __init bootmem_init(void)
 	reserved_end = max(init_initrd(), PFN_UP(__pa_symbol(&_end)));
 
 	/*
+	 * max_low_pfn is not a number of pages. The number of pages
+	 * of the system is given by 'max_low_pfn - min_low_pfn'.
+	 */
+	min_low_pfn = ~0UL;
+	max_low_pfn = 0;
+
+	/*
 	 * Find the highest page frame number we have available.
 	 */
 	for (i = 0; i < boot_mem_map.nr_map; i++) {
@@ -296,8 +302,10 @@ static void __init bootmem_init(void)
 		end = PFN_DOWN(boot_mem_map.map[i].addr
 				+ boot_mem_map.map[i].size);
 
-		if (end > highest)
-			highest = end;
+		if (end > max_low_pfn)
+			max_low_pfn = end;
+		if (start < min_low_pfn)
+			min_low_pfn = start;
 		if (end <= reserved_end)
 			continue;
 		if (start >= mapstart)
@@ -305,22 +313,32 @@ static void __init bootmem_init(void)
 		mapstart = max(reserved_end, start);
 	}
 
+	if (min_low_pfn >= max_low_pfn)
+		panic("Incorrect memory mapping !!!");
+	if (min_low_pfn > 0) {
+		printk(KERN_INFO
+		       "Wasting %lu bytes for tracking %lu unused pages\n",
+		       min_low_pfn * sizeof(struct page),
+		       min_low_pfn);
+		min_low_pfn = 0;
+	}
+
 	/*
 	 * Determine low and high memory ranges
 	 */
-	if (highest > PFN_DOWN(HIGHMEM_START)) {
+	if (max_low_pfn > PFN_DOWN(HIGHMEM_START)) {
 #ifdef CONFIG_HIGHMEM
 		highstart_pfn = PFN_DOWN(HIGHMEM_START);
-		highend_pfn = highest;
+		highend_pfn = max_low_pfn;
 #endif
-		highest = PFN_DOWN(HIGHMEM_START);
+		max_low_pfn = PFN_DOWN(HIGHMEM_START);
 	}
 
 	/*
 	 * Initialize the boot-time allocator with low memory only.
 	 */
-	bootmap_size = init_bootmem(mapstart, highest);
-
+	bootmap_size = init_bootmem_node(NODE_DATA(0), mapstart,
+					 min_low_pfn, max_low_pfn);
 	/*
 	 * Register fully available low RAM pages with the bootmem allocator.
 	 */
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c
index 30245c0..cd50b7a 100644
--- a/arch/mips/mm/init.c
+++ b/arch/mips/mm/init.c
@@ -341,7 +341,6 @@ static int __init page_is_ram(unsigned long pagenr)
 void __init paging_init(void)
 {
 	unsigned long zones_size[MAX_NR_ZONES] = { 0, };
-	unsigned long max_dma, low;
 #ifndef CONFIG_FLATMEM
 	unsigned long zholes_size[MAX_NR_ZONES] = { 0, };
 	unsigned long i, j, pfn;
@@ -354,19 +353,19 @@ void __init paging_init(void)
 #endif
 	kmap_coherent_init();
 
-	max_dma = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT;
-	low = max_low_pfn;
-
 #ifdef CONFIG_ISA
-	if (low < max_dma)
-		zones_size[ZONE_DMA] = low;
-	else {
-		zones_size[ZONE_DMA] = max_dma;
-		zones_size[ZONE_NORMAL] = low - max_dma;
-	}
-#else
-	zones_size[ZONE_DMA] = low;
+	if (max_low_pfn >= MAX_DMA_PFN)
+		if (min_low_pfn >= MAX_DMA_PFN) {
+			zones_size[ZONE_DMA] = 0;
+			zones_size[ZONE_NORMAL] = max_low_pfn - min_low_pfn;
+		} else {
+			zones_size[ZONE_DMA] = MAX_DMA_PFN - min_low_pfn;
+			zones_size[ZONE_NORMAL] = max_low_pfn - MAX_DMA_PFN;
+		}
+	else
 #endif
+	zones_size[ZONE_DMA] = max_low_pfn - min_low_pfn;
+
 #ifdef CONFIG_HIGHMEM
 	zones_size[ZONE_HIGHMEM] = highend_pfn - highstart_pfn;
 
diff --git a/include/asm-mips/dma.h b/include/asm-mips/dma.h
index 23f789c..e06ef07 100644
--- a/include/asm-mips/dma.h
+++ b/include/asm-mips/dma.h
@@ -91,6 +91,7 @@
 #else
 #define MAX_DMA_ADDRESS		(PAGE_OFFSET + 0x01000000)
 #endif
+#define MAX_DMA_PFN		PFN_DOWN(virt_to_phys((void *)MAX_DMA_ADDRESS))
 
 /* 8237 DMA controllers */
 #define IO_DMA1_BASE	0x00	/* 8 bit slave DMA, channels 0..3 */
-- 
1.4.4.3.ge6d4


From joseph@codesourcery.com Wed Jan 10 16:08:27 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 10 Jan 2007 16:08:40 +0000 (GMT)
Received: from p549F72FE.dip.t-dialin.net ([84.159.114.254]:33981 "EHLO
	p549F72FE.dip.t-dialin.net") by ftp.linux-mips.org with ESMTP
	id S20040600AbXAJQI1 (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Wed, 10 Jan 2007 16:08:27 +0000
Received: from mail.codesourcery.com ([65.74.133.4]:65249 "EHLO
	mail.codesourcery.com") by lappi.linux-mips.net with ESMTP
	id S136598AbXAJMay (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Wed, 10 Jan 2007 13:30:54 +0100
Received: (qmail 27833 invoked from network); 10 Jan 2007 12:30:51 -0000
Received: from unknown (HELO digraph.polyomino.org.uk) (joseph@127.0.0.2)
  by mail.codesourcery.com with ESMTPA; 10 Jan 2007 12:30:51 -0000
Received: from jsm28 (helo=localhost)
	by digraph.polyomino.org.uk with local-esmtp (Exim 4.63)
	(envelope-from <joseph@codesourcery.com>)
	id 1H4cbS-0001si-R0
	for linux-mips@linux-mips.org; Wed, 10 Jan 2007 12:30:50 +0000
Date:	Wed, 10 Jan 2007 12:30:50 +0000 (UTC)
From:	"Joseph S. Myers" <joseph@codesourcery.com>
X-X-Sender: jsm28@digraph.polyomino.org.uk
To:	linux-mips@linux-mips.org
Subject: [PATCH] Use compat_sys_pselect6
Message-ID: <Pine.LNX.4.64.0701101228450.6217@digraph.polyomino.org.uk>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Return-Path: <joseph@codesourcery.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13569
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: joseph@codesourcery.com
Precedence: bulk
X-list: linux-mips

The N32 and O32 pselect6 syscalls need to use compat_sys_pselect6 to
translate arguments from 32-bit to 64-bit layout.

Signed-off-by: Joseph Myers <joseph@codesourcery.com>
---
diff -rupN linux-2.6.19.orig/arch/mips/kernel/scall64-n32.S linux-2.6.19/arch/mips/kernel/scall64-n32.S
--- linux-2.6.19.orig/arch/mips/kernel/scall64-n32.S	2006-11-29 21:57:37.000000000 +0000
+++ linux-2.6.19/arch/mips/kernel/scall64-n32.S	2007-01-10 00:17:13.000000000 +0000
@@ -384,7 +384,7 @@ EXPORT(sysn32_call_table)
 	PTR	sys_readlinkat
 	PTR	sys_fchmodat
 	PTR	sys_faccessat
-	PTR	sys_pselect6
+	PTR	compat_sys_pselect6
 	PTR	sys_ppoll			/* 6265 */
 	PTR	sys_unshare
 	PTR	sys_splice
diff -rupN linux-2.6.19.orig/arch/mips/kernel/scall64-o32.S linux-2.6.19/arch/mips/kernel/scall64-o32.S
--- linux-2.6.19.orig/arch/mips/kernel/scall64-o32.S	2006-11-29 21:57:37.000000000 +0000
+++ linux-2.6.19/arch/mips/kernel/scall64-o32.S	2007-01-10 00:16:26.000000000 +0000
@@ -506,7 +506,7 @@ sys_call_table:
 	PTR	sys_readlinkat
 	PTR	sys_fchmodat
 	PTR	sys_faccessat			/* 4300 */
-	PTR	sys_pselect6
+	PTR	compat_sys_pselect6
 	PTR	sys_ppoll
 	PTR	sys_unshare
 	PTR	sys_splice

-- 
Joseph S. Myers
joseph@codesourcery.com

From ralf@linux-mips.org Wed Jan 10 16:09:44 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 10 Jan 2007 16:09:46 +0000 (GMT)
Received: from wf1.mips-uk.com ([194.74.144.154]:6017 "EHLO
	dl5rb.ham-radio-op.net") by ftp.linux-mips.org with ESMTP
	id S20040612AbXAJQJo (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Wed, 10 Jan 2007 16:09:44 +0000
Received: from denk.linux-mips.net (denk.linux-mips.net [127.0.0.1])
	by dl5rb.ham-radio-op.net (8.13.8/8.13.8) with ESMTP id l0ABKt4C006269;
	Wed, 10 Jan 2007 11:21:04 GMT
Received: (from ralf@localhost)
	by denk.linux-mips.net (8.13.8/8.13.8/Submit) id l0ABKssQ006268;
	Wed, 10 Jan 2007 11:20:54 GMT
Date:	Wed, 10 Jan 2007 11:20:54 +0000
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Franck Bui-Huu <vagabon.xyz@gmail.com>
Cc:	linux-mips@linux-mips.org
Subject: Re: [PATCH 0/2] FLATMEM: allow memory to start at pfn != 0 [take #2]
Message-ID: <20070110112054.GA6193@linux-mips.org>
References: <116841864595-git-send-email-fbuihuu@gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <116841864595-git-send-email-fbuihuu@gmail.com>
User-Agent: Mutt/1.4.2.2i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13570
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips

On Wed, Jan 10, 2007 at 09:44:03AM +0100, Franck Bui-Huu wrote:

> Here's is the second attempt to make this works on your Malta board
> and all other boards that have some data reserved at the start of
> their memories. In these cases the first patchset assumed wrongly that
> the start of the memory was after this reserved area.
> 
> Patch 1/2 should work alone now. the kernel should report that your
> mem config is wasting some memory for tracking reserved pages located
> at the start of the mem.

So this series now works for me, both 1/2 along and 1/2 + 2/2 applied.
So I'll drop this into the 2.6.21 queue.

  Ralf

From vagabon.xyz@gmail.com Wed Jan 10 16:16:20 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 10 Jan 2007 16:16:23 +0000 (GMT)
Received: from p549F72FE.dip.t-dialin.net ([84.159.114.254]:33981 "EHLO
	p549F72FE.dip.t-dialin.net") by ftp.linux-mips.org with ESMTP
	id S20040407AbXAJQQU (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Wed, 10 Jan 2007 16:16:20 +0000
Received: from wr-out-0506.google.com ([64.233.184.239]:6637 "EHLO
	wr-out-0506.google.com") by lappi.linux-mips.net with ESMTP
	id S134689AbXAIU4L (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 9 Jan 2007 21:56:11 +0100
Received: by wr-out-0506.google.com with SMTP id i7so78438wra
        for <linux-mips@linux-mips.org>; Tue, 09 Jan 2007 12:56:10 -0800 (PST)
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
        s=beta; d=gmail.com;
        h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references;
        b=GnrTf7ihSZXAQ09z/tyuJE5RePZetQpvqGLNFPSxh0t1znaSkg2V8VXnYwONkrJeLoLQeu6axFDt5nxHISojPV1HkOwImtkZ57vYg5oH5AnIWUeNQp6hrLwteLt1U2NFdJ11UL6y4CeC1ndmQf4YRUKRbINLaTT36zlFdPwqs1U=
Received: by 10.90.98.10 with SMTP id v10mr3367575agb.1168376170389;
        Tue, 09 Jan 2007 12:56:10 -0800 (PST)
Received: by 10.90.104.20 with HTTP; Tue, 9 Jan 2007 12:56:10 -0800 (PST)
Message-ID: <cda58cb80701091256i2e03c248ve36d45c57bf55fff@mail.gmail.com>
Date:	Tue, 9 Jan 2007 21:56:10 +0100
From:	"Franck Bui-Huu" <vagabon.xyz@gmail.com>
To:	"Ralf Baechle" <ralf@linux-mips.org>
Subject: Re: [PATCH 1/2] Setup min_low_pfn/max_low_pfn correctly
Cc:	linux-mips@linux-mips.org, "Franck Bui-Huu" <fbuihuu@gmail.com>
In-Reply-To: <20070108222422.GA28495@linux-mips.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
References: <11682782923799-git-send-email-fbuihuu@gmail.com>
	 <11682782922887-git-send-email-fbuihuu@gmail.com>
	 <20070108222422.GA28495@linux-mips.org>
Return-Path: <vagabon.xyz@gmail.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13571
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: vagabon.xyz@gmail.com
Precedence: bulk
X-list: linux-mips

-- On 1/8/07, Ralf Baechle <ralf@linux-mips.org> wrote:
> On Mon, Jan 08, 2007 at 06:44:51PM +0100, Franck Bui-Huu wrote:
>
> > This patch makes a better usage of these two globals.
> > 'min_low_pfn' is now correctly setup for all configs, which
> > allow us to rely on it in boot memory code init.
>

[snip]

> Call Trace:
> [<80109484>] dump_stack+0x8/0x34
> [<80159fbc>] bad_page+0x68/0xa8
> [<8015a804>] free_hot_cold_page+0x3a4/0x3b4
> [<80414150>] free_all_bootmem_core+0x150/0x258
> [<8040aefc>] mem_init+0x40/0x1c0
> [<80400940>] start_kernel+0x2b4/0x3c8
>

[snip]

> From a working kernel:
>
> Determined physical RAM map:
>  memory: 00001000 @ 00000000 (reserved)
>  memory: 000ef000 @ 00001000 (ROM data)
>  memory: 0035a000 @ 000f0000 (reserved)
>  memory: 03bb6000 @ 0044a000 (usable)
>
> So it's basically 64MB starting at physical 0.
>
> Oh and Malta does not use CONFIG_HIGHMEM.
>

Yeah I just noticed that, Malta supports highmem but actually doesn't
use it.

Regarding to your mapping, usable ram starts at 0x44a000. So
min_low_pfn is now set to the corresponding pfn and the bootmem alloc
assumes it's the begining of your memory. This is done by
bootmem_init():

	bootmap_size = init_bootmem_node(NODE_DATA(0), mapstart,
                                        min_low_pfn, max_low_pfn);

However, old code always assumed that the begining of the memory was
0. That was done by:

	bootmap_size = init_bootmem(mapstart, highest);

After a while paging_init() is called which in turn calls:

	free_area_init(zones_size);

which expands to:

	free_area_init_node(0, NODE_DATA(0), zones_size,
		__pa(PAGE_OFFSET) >> PAGE_SHIFT, NULL);

In your case "__pa(PAGE_OFFSET) >> PAGE_SHIFT" results in 0 since you
haven't applied patch #2 and setup PHYS_OFFSET. So now, we're assuming
that the start of physical mem is 0 and I think it's wrong since we
previously assumed a different value.

Could you try to apply patch #2 on top of patch #1 and give it a try ?
I expect your kernel to panic in a different way. This time you should
be shooted by the following sanity check added by patch #2:

	if (min_low_pfn != ARCH_PFN_OFFSET)
		panic("PHYS_OFFSET(%lx) and your mem start(%lx) don't match",
		      PHYS_OFFSET, PFN_PHYS(min_low_pfn));

If so, could you give another try with PHYS_OFFSET defined as follow:

	#define PHYS_OFFSET	0x44a000

BTW mem_map[] size should be 32Kb smaller.

thanks,

               Franck

From vagabon.xyz@gmail.com Wed Jan 10 16:30:15 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 10 Jan 2007 16:30:17 +0000 (GMT)
Received: from p549F72FE.dip.t-dialin.net ([84.159.114.254]:33981 "EHLO
	p549F72FE.dip.t-dialin.net") by ftp.linux-mips.org with ESMTP
	id S20039254AbXAJQaP (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Wed, 10 Jan 2007 16:30:15 +0000
Received: from nf-out-0910.google.com ([64.233.182.186]:33237 "EHLO
	nf-out-0910.google.com") by lappi.linux-mips.net with ESMTP
	id S136405AbXAJImD (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Wed, 10 Jan 2007 09:42:03 +0100
Received: by nf-out-0910.google.com with SMTP id l24so408123nfc
        for <linux-mips@linux-mips.org>; Wed, 10 Jan 2007 00:42:02 -0800 (PST)
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=beta;
        h=received:to:cc:subject:date:message-id:x-mailer:in-reply-to:references:from;
        b=RygRHZYm1PlsEbyYnyUDziBaH9GLl+JSShtb4mOIKrYEf5DZUSvwroWujJ0lCbdS7+UjOhiuBAhwLown4igSiPDDN22GjUE3jBwkutdapNS5QN4in7pFjuvRy36J/GDit/2vgwFctT2o+0mUDhm2g1/pAR6SShZ6OZtLG+LEHIU=
Received: by 10.49.57.1 with SMTP id j1mr997173nfk.1168418522012;
        Wed, 10 Jan 2007 00:42:02 -0800 (PST)
Received: from spoutnik.innova-card.com ( [81.252.61.1])
        by mx.google.com with ESMTP id p45sm3241412nfa.2007.01.10.00.41.59;
        Wed, 10 Jan 2007 00:42:01 -0800 (PST)
Received: by spoutnik.innova-card.com (Postfix, from userid 500)
	id 3EC2323F76A; Wed, 10 Jan 2007 09:44:06 +0100 (CET)
To:	ralf@linux-mips.org
Cc:	linux-mips@linux-mips.org, Franck Bui-Huu <fbuihuu@gmail.com>
Subject: [PATCH 2/2] FLATMEM: introduce PHYS_OFFSET.
Date:	Wed, 10 Jan 2007 09:44:05 +0100
Message-Id: <11684186464085-git-send-email-fbuihuu@gmail.com>
X-Mailer: git-send-email 1.4.4.3.ge6d4
In-Reply-To: <116841864595-git-send-email-fbuihuu@gmail.com>
References: <116841864595-git-send-email-fbuihuu@gmail.com>
From:	Franck Bui-Huu <vagabon.xyz@gmail.com>
Return-Path: <vagabon.xyz@gmail.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13572
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: vagabon.xyz@gmail.com
Precedence: bulk
X-list: linux-mips

From: Franck Bui-Huu <fbuihuu@gmail.com>

The old code was assuming that min_low_pfn was always 0. This
means that platforms having a big hole at their memory start
paid the price of wasting some memory for the allocation of
unused entries in mem_map[].

This patch prevents this waste.

It introduces PHYS_OFFSET define which is the start of the
physical memory and uses it wherever needed. Specially when
converting physical/virtual addresses into virtual/physical
ones.

Currently all platforms defines PHYS_OFFSET to 0.

Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>

Conflicts:

	arch/mips/kernel/setup.c
---
 arch/mips/kernel/setup.c |   12 ++++++++----
 include/asm-mips/io.h    |    4 ++--
 include/asm-mips/page.h  |   25 +++++++++++++++++++++----
 3 files changed, 31 insertions(+), 10 deletions(-)

diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
index f352cd9..e1d76b8 100644
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -315,13 +315,17 @@ static void __init bootmem_init(void)
 
 	if (min_low_pfn >= max_low_pfn)
 		panic("Incorrect memory mapping !!!");
-	if (min_low_pfn > 0) {
+	if (min_low_pfn > ARCH_PFN_OFFSET) {
 		printk(KERN_INFO
 		       "Wasting %lu bytes for tracking %lu unused pages\n",
-		       min_low_pfn * sizeof(struct page),
-		       min_low_pfn);
-		min_low_pfn = 0;
+		       (min_low_pfn - ARCH_PFN_OFFSET) * sizeof(struct page),
+		       min_low_pfn - ARCH_PFN_OFFSET);
+	} else if (min_low_pfn < ARCH_PFN_OFFSET) {
+		printk(KERN_INFO
+		       "%lu free pages won't be used\n",
+		       ARCH_PFN_OFFSET - min_low_pfn);
 	}
+	min_low_pfn = ARCH_PFN_OFFSET;
 
 	/*
 	 * Determine low and high memory ranges
diff --git a/include/asm-mips/io.h b/include/asm-mips/io.h
index 38d1399..e1592af 100644
--- a/include/asm-mips/io.h
+++ b/include/asm-mips/io.h
@@ -115,7 +115,7 @@ static inline void set_io_port_base(unsigned long base)
  */
 static inline unsigned long virt_to_phys(volatile const void *address)
 {
-	return (unsigned long)address - PAGE_OFFSET;
+	return (unsigned long)address - PAGE_OFFSET + PHYS_OFFSET;
 }
 
 /*
@@ -132,7 +132,7 @@ static inline unsigned long virt_to_phys(volatile const void *address)
  */
 static inline void * phys_to_virt(unsigned long address)
 {
-	return (void *)(address + PAGE_OFFSET);
+	return (void *)(address + PAGE_OFFSET - PHYS_OFFSET);
 }
 
 /*
diff --git a/include/asm-mips/page.h b/include/asm-mips/page.h
index 2f9e1a9..d3fbd83 100644
--- a/include/asm-mips/page.h
+++ b/include/asm-mips/page.h
@@ -34,6 +34,20 @@
 
 #ifndef __ASSEMBLY__
 
+/*
+ * This gives the physical RAM offset.
+ */
+#ifndef PHYS_OFFSET
+#define PHYS_OFFSET		0UL
+#endif
+
+/*
+ * It's normally defined only for FLATMEM config but it's
+ * used in our early mem init code for all memory models.
+ * So always define it.
+ */
+#define ARCH_PFN_OFFSET		PFN_UP(PHYS_OFFSET)
+
 #include <linux/pfn.h>
 #include <asm/io.h>
 
@@ -132,20 +146,23 @@ typedef struct { unsigned long pgprot; } pgprot_t;
 /* to align the pointer to the (next) page boundary */
 #define PAGE_ALIGN(addr)	(((addr) + PAGE_SIZE - 1) & PAGE_MASK)
 
+/*
+ * __pa()/__va() should be used only during mem init.
+ */
 #if defined(CONFIG_64BIT) && !defined(CONFIG_BUILD_ELF64)
 #define __pa_page_offset(x)	((unsigned long)(x) < CKSEG0 ? PAGE_OFFSET : CKSEG0)
 #else
 #define __pa_page_offset(x)	PAGE_OFFSET
 #endif
-#define __pa(x)			((unsigned long)(x) - __pa_page_offset(x))
-#define __pa_symbol(x)		__pa(RELOC_HIDE((unsigned long)(x),0))
-#define __va(x)			((void *)((unsigned long)(x) + PAGE_OFFSET))
+#define __pa(x)		((unsigned long)(x) - __pa_page_offset(x) + PHYS_OFFSET)
+#define __va(x)		((void *)((unsigned long)(x) + PAGE_OFFSET - PHYS_OFFSET))
+#define __pa_symbol(x)	__pa(RELOC_HIDE((unsigned long)(x),0))
 
 #define pfn_to_kaddr(pfn)	__va((pfn) << PAGE_SHIFT)
 
 #ifdef CONFIG_FLATMEM
 
-#define pfn_valid(pfn)		((pfn) < max_mapnr)
+#define pfn_valid(pfn)		((pfn) >= ARCH_PFN_OFFSET && (pfn) < max_mapnr)
 
 #elif defined(CONFIG_SPARSEMEM)
 
-- 
1.4.4.3.ge6d4


From anemo@mba.ocn.ne.jp Wed Jan 10 16:38:22 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 10 Jan 2007 16:38:26 +0000 (GMT)
Received: from p549F72FE.dip.t-dialin.net ([84.159.114.254]:33981 "EHLO
	p549F72FE.dip.t-dialin.net") by ftp.linux-mips.org with ESMTP
	id S20039673AbXAJQiW (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Wed, 10 Jan 2007 16:38:22 +0000
Received: from topsns2.toshiba-tops.co.jp ([202.230.225.126]:13013 "EHLO
	topsns2.toshiba-tops.co.jp") by lappi.linux-mips.net with ESMTP
	id S1100422AbXAJJxh (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Wed, 10 Jan 2007 10:53:37 +0100
Received: from topsms.toshiba-tops.co.jp by topsns2.toshiba-tops.co.jp
          via smtpd (for p549F72FE.dip.t-dialin.net [84.159.114.254]) with ESMTP; Wed, 10 Jan 2007 18:53:37 +0900
Received: from topsms.toshiba-tops.co.jp (localhost.localdomain [127.0.0.1])
	by localhost.toshiba-tops.co.jp (Postfix) with ESMTP id 4024541E1C;
	Wed, 10 Jan 2007 18:53:33 +0900 (JST)
Received: from srd2sd.toshiba-tops.co.jp (srd2sd.toshiba-tops.co.jp [172.17.28.2])
	by topsms.toshiba-tops.co.jp (Postfix) with ESMTP id 351AA203B8;
	Wed, 10 Jan 2007 18:53:33 +0900 (JST)
Received: from localhost (fragile [172.17.28.65])
	by srd2sd.toshiba-tops.co.jp (8.12.10/8.12.10) with ESMTP id l0A9rXW0035795;
	Wed, 10 Jan 2007 18:53:33 +0900 (JST)
	(envelope-from anemo@mba.ocn.ne.jp)
Date:	Wed, 10 Jan 2007 18:53:33 +0900 (JST)
Message-Id: <20070110.185333.51860171.nemoto@toshiba-tops.co.jp>
To:	linux-mips@linux-mips.org
Cc:	ralf@linux-mips.org, kaz@zeugmasystems.com, drow@false.org
Subject: [PATCH] Fix N32 SysV IPC routines
From:	Atsushi Nemoto <anemo@mba.ocn.ne.jp>
X-Fingerprint: 6ACA 1623 39BD 9A94 9B1A  B746 CA77 FE94 2874 D52F
X-Pgp-Public-Key: http://wwwkeys.pgp.net/pks/lookup?op=get&search=0x2874D52F
X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Return-Path: <anemo@mba.ocn.ne.jp>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13573
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: anemo@mba.ocn.ne.jp
Precedence: bulk
X-list: linux-mips

Add wrappers for N32 msg{snd,rcv} while compat_sys_msg{snd,rcv} could
not be used as system call entries as is.  This fix is based on patch
originally made by Kaz Kylheku.

Also change a type of last argument of sysn32_semctl to match its true
size.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
---
 linux32.c     |   16 ++++++++--
 scall64-n32.S |    4 +-
 2 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/arch/mips/kernel/linux32.c b/arch/mips/kernel/linux32.c
index b061c9a..de3fae2 100644
--- a/arch/mips/kernel/linux32.c
+++ b/arch/mips/kernel/linux32.c
@@ -440,14 +440,26 @@ sys32_ipc (u32 call, int first, int seco
 }
 
 #ifdef CONFIG_MIPS32_N32
-asmlinkage long sysn32_semctl(int semid, int semnum, int cmd, union semun arg)
+asmlinkage long sysn32_semctl(int semid, int semnum, int cmd, u32 arg)
 {
 	/* compat_sys_semctl expects a pointer to union semun */
 	u32 __user *uptr = compat_alloc_user_space(sizeof(u32));
-	if (put_user(ptr_to_compat(arg.__pad), uptr))
+	if (put_user(arg, uptr))
 		return -EFAULT;
 	return compat_sys_semctl(semid, semnum, cmd, uptr);
 }
+
+asmlinkage long sysn32_msgsnd(int msqid, u32 msgp, unsigned msgsz, int msgflg)
+{
+	return compat_sys_msgsnd(msqid, msgsz, msgflg, compat_ptr(msgp));
+}
+
+asmlinkage long sysn32_msgrcv(int msqid, u32 msgp, size_t msgsz, int msgtyp,
+			      int msgflg)
+{
+	return compat_sys_msgrcv(msqid, msgsz, msgtyp, msgflg, IPC_64,
+				 compat_ptr(msgp));
+}
 #endif
 
 struct sysctl_args32
diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S
index 34567d8..a7bff2a 100644
--- a/arch/mips/kernel/scall64-n32.S
+++ b/arch/mips/kernel/scall64-n32.S
@@ -187,8 +187,8 @@ EXPORT(sysn32_call_table)
 	PTR	sysn32_semctl
 	PTR	sys_shmdt			/* 6065 */
 	PTR	sys_msgget
-	PTR	compat_sys_msgsnd
-	PTR	compat_sys_msgrcv
+	PTR	sysn32_msgsnd
+	PTR	sysn32_msgrcv
 	PTR	compat_sys_msgctl
 	PTR	compat_sys_fcntl		/* 6070 */
 	PTR	sys_flock

From vagabon.xyz@gmail.com Wed Jan 10 16:38:50 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 10 Jan 2007 16:38:53 +0000 (GMT)
Received: from p549F72FE.dip.t-dialin.net ([84.159.114.254]:33981 "EHLO
	p549F72FE.dip.t-dialin.net") by ftp.linux-mips.org with ESMTP
	id S20039514AbXAJQig (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Wed, 10 Jan 2007 16:38:36 +0000
Received: from wx-out-0506.google.com ([66.249.82.236]:22526 "EHLO
	wx-out-0506.google.com") by lappi.linux-mips.net with ESMTP
	id S136830AbXAJOwQ (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Wed, 10 Jan 2007 15:52:16 +0100
Received: by wx-out-0506.google.com with SMTP id t14so133838wxc
        for <linux-mips@linux-mips.org>; Wed, 10 Jan 2007 06:52:15 -0800 (PST)
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=beta;
        h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references;
        b=sByzxjlNVYkuk6BrJptTOrhUuj/GhqIrS+VRKS8rg4QLfVPvVEG4Gh1jDw+MJ8HkKCP1EwTNMq7/m08dnwyF3l/POEbLz5WH/QP0CnwDhS5L+93OysKRsWDBcczVu6EJHsdhqI2csBajLhJz4SN1N53Rr6/1WepHmKZdFZoiRdo=
Received: by 10.90.78.1 with SMTP id a1mr283162agb.1168440735745;
        Wed, 10 Jan 2007 06:52:15 -0800 (PST)
Received: by 10.90.104.20 with HTTP; Wed, 10 Jan 2007 06:52:15 -0800 (PST)
Message-ID: <cda58cb80701100652l218d6d32m39242f2da8942caf@mail.gmail.com>
Date:	Wed, 10 Jan 2007 15:52:15 +0100
From:	"Franck Bui-Huu" <vagabon.xyz@gmail.com>
To:	"Ralf Baechle" <ralf@linux-mips.org>
Subject: Re: [PATCH 0/2] FLATMEM: allow memory to start at pfn != 0 [take #2]
Cc:	linux-mips@linux-mips.org
In-Reply-To: <20070110112054.GA6193@linux-mips.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
References: <116841864595-git-send-email-fbuihuu@gmail.com>
	 <20070110112054.GA6193@linux-mips.org>
Return-Path: <vagabon.xyz@gmail.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13574
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: vagabon.xyz@gmail.com
Precedence: bulk
X-list: linux-mips

On 1/10/07, Ralf Baechle <ralf@linux-mips.org> wrote:
> So this series now works for me, both 1/2 along and 1/2 + 2/2 applied.
> So I'll drop this into the 2.6.21 queue.
>

Great !

What did the console say when 1/2 was applied alone ?

Did you try to set PHYS_OFFSET to something different from 0 when 1/2,
2/2 are applied ? If so, does mem_map[] size decrease ?

Thanks for your time.
-- 
               Franck

From vagabon.xyz@gmail.com Wed Jan 10 16:40:53 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 10 Jan 2007 16:40:55 +0000 (GMT)
Received: from p549F72FE.dip.t-dialin.net ([84.159.114.254]:33981 "EHLO
	p549F72FE.dip.t-dialin.net") by ftp.linux-mips.org with ESMTP
	id S20040558AbXAJQkx (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Wed, 10 Jan 2007 16:40:53 +0000
Received: from nf-out-0910.google.com ([64.233.182.185]:6101 "EHLO
	nf-out-0910.google.com") by lappi.linux-mips.net with ESMTP
	id S136378AbXAJImA (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Wed, 10 Jan 2007 09:42:00 +0100
Received: by nf-out-0910.google.com with SMTP id l24so408118nfc
        for <linux-mips@linux-mips.org>; Wed, 10 Jan 2007 00:42:01 -0800 (PST)
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=beta;
        h=received:to:cc:subject:date:message-id:x-mailer:from;
        b=adrJ5QmNFU5FzWIKxdWh3FL+0g4YsqgarkdDxbWm/kZ+9qlUZ208cOQGq2lDyodsdVZFzrp13d8sLO766KG/XcAVMoZBj2dz2y3wzNyAj63sGCJ2vp/xBwZ5qby34GzAfUgQV6GCSTNhJwhpvlq9sY1750GyqA8Mc8x8B4k+aGU=
Received: by 10.49.13.14 with SMTP id q14mr981998nfi.1168418520988;
        Wed, 10 Jan 2007 00:42:00 -0800 (PST)
Received: from spoutnik.innova-card.com ( [81.252.61.1])
        by mx.google.com with ESMTP id l32sm3232375nfa.2007.01.10.00.41.59;
        Wed, 10 Jan 2007 00:42:00 -0800 (PST)
Received: by spoutnik.innova-card.com (Postfix, from userid 500)
	id 0165C23F76E; Wed, 10 Jan 2007 09:44:05 +0100 (CET)
To:	ralf@linux-mips.org
Cc:	linux-mips@linux-mips.org
Subject: [PATCH 0/2] FLATMEM: allow memory to start at pfn != 0 [take #2]
Date:	Wed, 10 Jan 2007 09:44:03 +0100
Message-Id: <116841864595-git-send-email-fbuihuu@gmail.com>
X-Mailer: git-send-email 1.4.4.3.ge6d4
From:	Franck Bui-Huu <vagabon.xyz@gmail.com>
Return-Path: <vagabon.xyz@gmail.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13575
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: vagabon.xyz@gmail.com
Precedence: bulk
X-list: linux-mips

Ralf,

Here's is the second attempt to make this works on your Malta board
and all other boards that have some data reserved at the start of
their memories. In these cases the first patchset assumed wrongly that
the start of the memory was after this reserved area.

Patch 1/2 should work alone now. the kernel should report that your
mem config is wasting some memory for tracking reserved pages located
at the start of the mem.

Thanks for testing

		Franck

---

 arch/mips/kernel/setup.c |   40 +++++++++++++++++++++++++++++++---------
 arch/mips/mm/init.c      |   23 +++++++++++------------
 include/asm-mips/dma.h   |    1 +
 include/asm-mips/io.h    |    4 ++--
 include/asm-mips/page.h  |   25 +++++++++++++++++++++----
 5 files changed, 66 insertions(+), 27 deletions(-)



From ralf@linux-mips.org Wed Jan 10 19:51:51 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 10 Jan 2007 19:51:53 +0000 (GMT)
Received: from wf1.mips-uk.com ([194.74.144.154]:2283 "EHLO
	dl5rb.ham-radio-op.net") by ftp.linux-mips.org with ESMTP
	id S20046081AbXAJTvv (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Wed, 10 Jan 2007 19:51:51 +0000
Received: from denk.linux-mips.net (denk.linux-mips.net [127.0.0.1])
	by dl5rb.ham-radio-op.net (8.13.8/8.13.8) with ESMTP id l0AJqdNg010321;
	Wed, 10 Jan 2007 19:52:40 GMT
Received: (from ralf@localhost)
	by denk.linux-mips.net (8.13.8/8.13.8/Submit) id l0AJqclf010320;
	Wed, 10 Jan 2007 19:52:38 GMT
Date:	Wed, 10 Jan 2007 19:52:38 +0000
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Alexander Bigga <ab@mycable.de>
Cc:	linux-mips@linux-mips.org
Subject: Re: [PATCH] fix PCI-memory access on Alchemy Au15x0
Message-ID: <20070110195238.GA10283@linux-mips.org>
References: <20061221102519.GA11796@mycable-alex>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20061221102519.GA11796@mycable-alex>
User-Agent: Mutt/1.4.2.2i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13576
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips

On Thu, Dec 21, 2006 at 11:25:19AM +0100, Alexander Bigga wrote:

> The problem was introduced in 2.6.18.3 with the casting of some 36bit-defines
> (PCI memory) in au1000.h to resource_size_t which may be u32 or u64 depending on
> the experimental CONFIG_RESOURCES_64BIT.
> 
> With unset CONFIG_RESOURCES_64BIT, the pci-memory cannot be accessed because
> the ioremap in arch/mips/au1000/common/pci.c already used the truncated
> addresses.
> With set CONFIG_RESOURCES_64BIT, things get even worse, because PCI-scan
> aborts, due to resource conflict: request_resource() in arch/mips/pci/pci.c
> fails because the maximum iomem-address is 0xffffffff (32bit) but the
> pci-memory-start-address is 0x440000000 (36bit).
> 
> To get pci working again, I propose the following patch:
> 
> 1. remove the resource_size_t-casting from au1000.h again
> 2. make the casting in arch/mips/au1000/common/pci.c (it's allowed and
> necessary here. The 36bit-handling will be done in __fixup_bigphys_addr).
> 
> With this patch pci works again like in 2.6.18.2, the gcc-compile warnings
> in pci.c are gone and it doesn't depend on CONFIG_EXPERIMENTAL.
> 
> Only advantages ;-) Nevertheless, I'm open for your comments or even better
> solutions.

Looks reasonable, applied.

  Ralf

From sathesh_edara2003@yahoo.co.in Wed Jan 10 20:35:28 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 10 Jan 2007 20:35:33 +0000 (GMT)
Received: from web7902.mail.in.yahoo.com ([202.86.4.78]:51366 "HELO
	web7902.mail.in.yahoo.com") by ftp.linux-mips.org with SMTP
	id S28578495AbXAJUf2 (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Wed, 10 Jan 2007 20:35:28 +0000
Received: (qmail 52651 invoked by uid 60001); 10 Jan 2007 20:35:21 -0000
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
  s=s1024; d=yahoo.co.in;
  h=X-YMail-OSG:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID;
  b=zuC85f9DU/81nAtcUbuu98hagA63Djev/agx7SOQ9MKTjr1DQLvGPYY4W4mmpYUMNxfOdMQuLSJSnO/V71vOM7qWNBWvfwS7iYwtwWOU9ndxAF03YpZ2PxUHJXWeAJju3um8yqrTWCIwXEZ3ieyj4VqX6zSQRMnyEhGT7xqqu7k=;
X-YMail-OSG: mKHTII0VM1kgaA2ucyMvgFyfXoqJZLo5XWO.e_454V2Cq3P.q135MHlNqf98lMSRWtvnI1NGPKgkzctlal8dr0J7uFa_RVEZfrfZt.rmtha_h_d4E5Am173ln4fCKVQ1lU6Dz9MSnbu.d_jaWe_g13YFcg--
Received: from [206.40.46.114] by web7902.mail.in.yahoo.com via HTTP; Wed, 10 Jan 2007 20:35:20 GMT
Date:	Wed, 10 Jan 2007 20:35:20 +0000 (GMT)
From:	sathesh babu <sathesh_edara2003@yahoo.co.in>
Subject: Re: Running linux-2.6.18 kernel in uncache area
To:	mlachwani <mlachwani@mvista.com>, macro@ds2.pg.gda.pl,
	jsun@mvista.com
Cc:	linux-mips@linux-mips.org
In-Reply-To: <506196.81528.qm@web7905.mail.in.yahoo.com>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="0-1737839988-1168461320=:50036"
Content-Transfer-Encoding: 8bit
Message-ID: <78203.50036.qm@web7902.mail.in.yahoo.com>
Return-Path: <sathesh_edara2003@yahoo.co.in>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13577
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: sathesh_edara2003@yahoo.co.in
Precedence: bulk
X-list: linux-mips

--0-1737839988-1168461320=:50036
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

Hi,
    I would like to runlinux-2.6.18 kernel in uncached area.I tried it by enabling CONFIG_UNCACHE.But still i am doubting it is running in cache area.
   
  Is there a way to know the kernel is running in cache or uncache area?
   
  While going thru mailing list i read that there is a patch to run the kernel in uncache area.
   
  If you have could you please pass to me.
   
  Regards,
  Sathesh
   
  

sathesh babu <sathesh_edara2003@yahoo.co.in> wrote:
    Hi Mlachwani,
   I tried by enabling Uncache option.
  But how do i know kernel runs from the uncache area.
   
  During the boot process , i checked the boot up message and observed that kernel  still calling cache initilization routines.
   
  I did quick test :
    - Read the  10 words of uncached area start from 0xa0800000
   
    - Read the 10 word of cached area start ftom 0x80800000
   
  I checked the contents in the both areas and are same.
   
  That means  cache is not disabled properly.
   
  Is there anyway i can check the kernel is running from cache or uncached area?
   
  Any other options should i enable/disable to run kernel from uncached area.
   
   Regards,
  Sathesh
   
  BOOTUP MESSAGES:
  --------------------------------------------------------------------
Determined physical RAM map:
 memory: 02000000 @ 00000000 (usable)
Initial ramdisk at: 0x80000000 (0 bytes)
Built 1 zonelists.  Total pages: 8192
Kernel command line: root=/dev/mtdblock2 rw rootfstype=jffs2 myfs_start=0xbfA800
00 rootfstype=jffs2
Primary instruction cache 16kB, linesize 32 bytes.
Primary data cache 8kB, linesize 32 bytes.
Fusiv LX4189 CACHES
Synthesized TLB refill handler (17 instructions).
Synthesized TLB load handler fastpath (31 instructions).
Synthesized TLB store handler fastpath (31 instructions).
th (25 instructions).
PID hash table entries: 256 (order: 8, 1024 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 28864k/32768k available (2367k kernel code, 3888k reserved, 401k data, 1
56k init, 0k highmem)
Mount-cache hash table entries: 512
  ---------------------------------------------------------------------
mlachwani <mlachwani@mvista.com> wrote:
  sathesh babu wrote:
> Hi,
> I would like to know is there any configuration option ( using make 
> menuconfig) to turn off cache in linux-2.6.18 kernel.
> 
> Basically i would like to run kernel in uncache area.
> 
> I see there is an option in the in the menuconfig under 
> Kernel hacking
> [ ] Run uncached (NEW)
> Sould i need to enable this option to run in the uncahe area?
> 
> Could you please tell me how to disable cache and run the kernel in 
> uncache area.
> 
> 
> 
> Regards,
> Sathesh
>
> Send free SMS to your Friends on Mobile from your Yahoo! Messenger. 
> Download Now! http://messenger.yahoo.com/download.php
>
That should be it. Did you try with that option MIPS_UNCACHED enabled?

thanks,
Manish Lachwani


  Send free SMS to your Friends on Mobile from your Yahoo! Messenger. Download Now! http://messenger.yahoo.com/download.php


 				
---------------------------------
 Here’s a new way to find what you're looking for - Yahoo! Answers 
--0-1737839988-1168461320=:50036
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

<div>Hi,</div>  <div>&nbsp; I would like to runlinux-2.6.18 kernel in uncached area.I tried it by enabling CONFIG_UNCACHE.But still i am doubting it is running in cache area.</div>  <div>&nbsp;</div>  <div>Is there a way to know the kernel is running in cache or uncache area?</div>  <div>&nbsp;</div>  <div>While going thru mailing list i read that there is a patch to run the kernel in uncache area.</div>  <div>&nbsp;</div>  <div>If you have could you please pass to me.</div>  <div>&nbsp;</div>  <div>Regards,</div>  <div>Sathesh</div>  <div>&nbsp;</div>  <div><BR><BR><B><I>sathesh babu &lt;sathesh_edara2003@yahoo.co.in&gt;</I></B> wrote:</div>  <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">  <DIV>Hi Mlachwani,</DIV>  <DIV>&nbsp;I tried by enabling Uncache option.</DIV>  <DIV>But how do i know&nbsp;kernel runs from the uncache area.</DIV>  <DIV>&nbsp;</DIV>  <DIV>During the boot process , i checked the boot up
 message&nbsp;and observed that&nbsp;kernel &nbsp;still calling cache initilization routines.</DIV>  <DIV>&nbsp;</DIV>  <DIV>I did quick test :</DIV>  <DIV>&nbsp;&nbsp;- Read the &nbsp;10 words of uncached area start&nbsp;from 0xa0800000</DIV>  <DIV>&nbsp;</DIV>  <DIV>&nbsp; - Read the 10 word of cached area start ftom 0x80800000</DIV>  <DIV>&nbsp;</DIV>  <DIV>I checked the contents in the both areas and are same.</DIV>  <DIV>&nbsp;</DIV>  <DIV>That means&nbsp; cache is not disabled properly.</DIV>  <DIV>&nbsp;</DIV>  <DIV>Is there anyway i can check the kernel is running from cache or uncached area?</DIV>  <DIV>&nbsp;</DIV>  <DIV>Any other options should i enable/disable to run kernel from uncached area.</DIV>  <DIV>&nbsp;</DIV>  <DIV>&nbsp;Regards,</DIV>  <DIV>Sathesh</DIV>  <DIV>&nbsp;</DIV>  <DIV>BOOTUP MESSAGES:</DIV>  <DIV>--------------------------------------------------------------------<BR>Determined physical RAM map:<BR>&nbsp;memory: 02000000 @ 00000000
 (usable)<BR>Initial ramdisk at: 0x80000000 (0 bytes)<BR>Built 1 zonelists.&nbsp; Total pages: 8192<BR>Kernel command line: root=/dev/mtdblock2 rw rootfstype=jffs2 myfs_start=0xbfA800<BR>00 rootfstype=jffs2<BR>Primary instruction cache 16kB, linesize 32 bytes.<BR>Primary data cache 8kB, linesize 32 bytes.<BR>Fusiv LX4189 CACHES<BR>Synthesized TLB refill handler (17 instructions).<BR>Synthesized TLB load handler fastpath (31 instructions).<BR>Synthesized TLB store handler fastpath (31 instructions).<BR>th (25 instructions).<BR>PID hash table entries: 256 (order: 8, 1024 bytes)<BR>Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)<BR>Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)<BR>Memory: 28864k/32768k available (2367k kernel code, 3888k reserved, 401k data, 1<BR>56k init, 0k highmem)<BR>Mount-cache hash table entries: 512</DIV>  <DIV>---------------------------------------------------------------------<BR><B><I>mlachwani
 &lt;mlachwani@mvista.com&gt;</I></B> wrote:</DIV>  <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">sathesh babu wrote:<BR>&gt; Hi,<BR>&gt; I would like to know is there any configuration option ( using make <BR>&gt; menuconfig) to turn off cache in linux-2.6.18 kernel.<BR>&gt; <BR>&gt; Basically i would like to run kernel in uncache area.<BR>&gt; <BR>&gt; I see there is an option in the in the menuconfig under <BR>&gt; Kernel hacking<BR>&gt; [ ] Run uncached (NEW)<BR>&gt; Sould i need to enable this option to run in the uncahe area?<BR>&gt; <BR>&gt; Could you please tell me how to disable cache and run the kernel in <BR>&gt; uncache area.<BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; Regards,<BR>&gt; Sathesh<BR>&gt;<BR>&gt; Send free SMS to your Friends on Mobile from your Yahoo! Messenger. <BR>&gt; Download Now! http://messenger.yahoo.com/download.php<BR>&gt;<BR>That should be it. Did you try with that option MIPS_UNCACHED
 enabled?<BR><BR>thanks,<BR>Manish Lachwani<BR><BR></BLOCKQUOTE><BR>  <div>Send free SMS to your Friends on Mobile from your Yahoo! Messenger. Download Now! http://messenger.yahoo.com/download.php</div></BLOCKQUOTE><BR><p>&#32;
	

	
		<hr size=1></hr> 
Here’s a new way to find what you're looking for - <a href="http://us.rd.yahoo.com/mail/in/yanswers/*http://in.answers.yahoo.com/">Yahoo! Answers</a> 
--0-1737839988-1168461320=:50036--

From sathesh_edara2003@yahoo.co.in Wed Jan 10 21:38:07 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 10 Jan 2007 21:38:13 +0000 (GMT)
Received: from web7903.mail.in.yahoo.com ([202.86.4.79]:27231 "HELO
	web7903.mail.in.yahoo.com") by ftp.linux-mips.org with SMTP
	id S20046121AbXAJViH (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Wed, 10 Jan 2007 21:38:07 +0000
Received: (qmail 95468 invoked by uid 60001); 10 Jan 2007 21:37:59 -0000
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
  s=s1024; d=yahoo.co.in;
  h=X-YMail-OSG:Received:Date:From:Subject:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID;
  b=T7yGVkcNjHi511kYtVRqnugh0qzTM7ta1ZwsTBlN8yZCaO1bOXsHr6fuBWV317p7nDhcmP3yZRxsGGlvoUD987vX1SVTvvMXtReq3rwhyS1srojU6QS80bOOZwoRw1PqOXtb+sr7w221zKBPV+VhQSKyOPxkRgeoiYAjwKIPDq8=;
X-YMail-OSG: gFnszFEVM1nv_94WXw1UNBdTkw5Q8iMFoC_aQnpo9zecgNR1Z6S2lFUMxqPUuPWTH5kCmGOqvswD0HxTtOi.PERlglTMwuMh4mDGw4uB8vT7R.Zcf26uZ9eFK75GgE9t0Lmmtk8KfkPc18w0nm5dmOctjK_Gp6xPNARrVgMQ
Received: from [206.40.46.114] by web7903.mail.in.yahoo.com via HTTP; Wed, 10 Jan 2007 21:37:59 GMT
Date:	Wed, 10 Jan 2007 21:37:59 +0000 (GMT)
From:	sathesh babu <sathesh_edara2003@yahoo.co.in>
Subject: Re: Running linux-2.6.18 kernel in uncache area
To:	mlachwani <mlachwani@mvista.com>, macro@ds2.pg.gda.pl,
	jsun@mvista.com, sathesh_edara2003@yahoo.co.in
Cc:	linux-mips@linux-mips.org
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="0-2056778440-1168465079=:95321"
Content-Transfer-Encoding: 8bit
Message-ID: <851009.95321.qm@web7903.mail.in.yahoo.com>
Return-Path: <sathesh_edara2003@yahoo.co.in>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13578
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: sathesh_edara2003@yahoo.co.in
Precedence: bulk
X-list: linux-mips

--0-2056778440-1168465079=:95321
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit



    Hi,
    I would like to runlinux-2.6.18 kernel in uncached area.I tried it by enabling CONFIG_UNCACHE.But still i am doubting it is running in cache area.
   
  Is there a way to know the kernel is running in cache or uncache area?
   
  While going thru mailing list i read that there is a patch to run the kernel in uncache area.
   
  If you have could you please pass to me.
   
  Regards,
  Sathesh
   
  

sathesh babu <sathesh_edara2003@yahoo.co.in> wrote:
    Hi Mlachwani,
   I tried by enabling Uncache option.
  But how do i know kernel runs from the uncache area.
   
  During the boot process , i checked the boot up message and observed that kernel  still calling cache initilization routines.
   
  I did quick test :
    - Read the  10 words of uncached area start from 0xa0800000
   
    - Read the 10 word of cached area start ftom 0x80800000
   
  I checked the contents in the both areas and are same.
   
  That means  cache is not disabled properly.
   
  Is there anyway i can check the kernel is running from cache or uncached area?
   
  Any other options should i enable/disable to run kernel from uncached area.
   
   Regards,
  Sathesh
   
  BOOTUP MESSAGES:
  --------------------------------------------------------------------
Determined physical RAM map:
 memory: 02000000 @ 00000000 (usable)
Initial ramdisk at: 0x80000000 (0 bytes)
Built 1 zonelists.  Total pages: 8192
Kernel command line: root=/dev/mtdblock2 rw rootfstype=jffs2 myfs_start=0xbfA800
00 rootfstype=jffs2
Primary instruction cache 16kB, linesize 32 bytes.
Primary data cache 8kB, linesize 32 bytes.
Fusiv LX4189 CACHES
Synthesized TLB refill handler (17 instructions).
Synthesized TLB load handler fastpath (31 instructions).
Synthesized TLB store handler fastpath (31 instructions).
th (25 instructions).
PID hash table entries: 256 (order: 8, 1024 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 28864k/32768k available (2367k kernel code, 3888k reserved, 401k data, 1
56k init, 0k highmem)
Mount-cache hash table entries: 512
  ---------------------------------------------------------------------
mlachwani <mlachwani@mvista.com> wrote:
  sathesh babu wrote:
> Hi,
> I would like to know is there any configuration option ( using make 
> menuconfig) to turn off cache in linux-2.6.18 kernel.
> 
> Basically i would like to run kernel in uncache area.
> 
> I see there is an option in the in the menuconfig under 
> Kernel hacking
> [ ] Run uncached (NEW)
> Sould i need to enable this option to run in the uncahe area?
> 
> Could you please tell me how to disable cache and run the kernel in 
> uncache area.
> 
> 
> 
> Regards,
> Sathesh
>
> Send free SMS to your Friends on Mobile from your Yahoo! Messenger. 
> Download Now! http://messenger.yahoo.com/download.php
>
That should be it. Did you try with that option MIPS_UNCACHED enabled?

thanks,
Manish Lachwani


  Send free SMS to your Friends on Mobile from your Yahoo! Messenger. Download Now! http://messenger.yahoo.com/download.php

    
---------------------------------
  Here’s a new way to find what you're looking for - Yahoo! Answers 

 				
---------------------------------
 Here’s a new way to find what you're looking for - Yahoo! Answers 
--0-2056778440-1168465079=:95321
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

<BR><BR>  <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">  <DIV>Hi,</DIV>  <DIV>&nbsp; I would like to runlinux-2.6.18 kernel in uncached area.I tried it by enabling CONFIG_UNCACHE.But still i am doubting it is running in cache area.</DIV>  <DIV>&nbsp;</DIV>  <DIV>Is there a way to know the kernel is running in cache or uncache area?</DIV>  <DIV>&nbsp;</DIV>  <DIV>While going thru mailing list i read that there is a patch to run the kernel in uncache area.</DIV>  <DIV>&nbsp;</DIV>  <DIV>If you have could you please pass to me.</DIV>  <DIV>&nbsp;</DIV>  <DIV>Regards,</DIV>  <DIV>Sathesh</DIV>  <DIV>&nbsp;</DIV>  <DIV><BR><BR><B><I>sathesh babu &lt;sathesh_edara2003@yahoo.co.in&gt;</I></B> wrote:</DIV>  <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">  <DIV>Hi Mlachwani,</DIV>  <DIV>&nbsp;I tried by enabling Uncache option.</DIV>  <DIV>But how do i know&nbsp;kernel runs
 from the uncache area.</DIV>  <DIV>&nbsp;</DIV>  <DIV>During the boot process , i checked the boot up message&nbsp;and observed that&nbsp;kernel &nbsp;still calling cache initilization routines.</DIV>  <DIV>&nbsp;</DIV>  <DIV>I did quick test :</DIV>  <DIV>&nbsp;&nbsp;- Read the &nbsp;10 words of uncached area start&nbsp;from 0xa0800000</DIV>  <DIV>&nbsp;</DIV>  <DIV>&nbsp; - Read the 10 word of cached area start ftom 0x80800000</DIV>  <DIV>&nbsp;</DIV>  <DIV>I checked the contents in the both areas and are same.</DIV>  <DIV>&nbsp;</DIV>  <DIV>That means&nbsp; cache is not disabled properly.</DIV>  <DIV>&nbsp;</DIV>  <DIV>Is there anyway i can check the kernel is running from cache or uncached area?</DIV>  <DIV>&nbsp;</DIV>  <DIV>Any other options should i enable/disable to run kernel from uncached area.</DIV>  <DIV>&nbsp;</DIV>  <DIV>&nbsp;Regards,</DIV>  <DIV>Sathesh</DIV>  <DIV>&nbsp;</DIV>  <DIV>BOOTUP MESSAGES:</DIV> 
 <DIV>--------------------------------------------------------------------<BR>Determined physical RAM map:<BR>&nbsp;memory: 02000000 @ 00000000 (usable)<BR>Initial ramdisk at: 0x80000000 (0 bytes)<BR>Built 1 zonelists.&nbsp; Total pages: 8192<BR>Kernel command line: root=/dev/mtdblock2 rw rootfstype=jffs2 myfs_start=0xbfA800<BR>00 rootfstype=jffs2<BR>Primary instruction cache 16kB, linesize 32 bytes.<BR>Primary data cache 8kB, linesize 32 bytes.<BR>Fusiv LX4189 CACHES<BR>Synthesized TLB refill handler (17 instructions).<BR>Synthesized TLB load handler fastpath (31 instructions).<BR>Synthesized TLB store handler fastpath (31 instructions).<BR>th (25 instructions).<BR>PID hash table entries: 256 (order: 8, 1024 bytes)<BR>Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)<BR>Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)<BR>Memory: 28864k/32768k available (2367k kernel code, 3888k reserved, 401k data, 1<BR>56k init, 0k highmem)<BR>Mount-cache hash table
 entries: 512</DIV>  <DIV>---------------------------------------------------------------------<BR><B><I>mlachwani &lt;mlachwani@mvista.com&gt;</I></B> wrote:</DIV>  <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">sathesh babu wrote:<BR>&gt; Hi,<BR>&gt; I would like to know is there any configuration option ( using make <BR>&gt; menuconfig) to turn off cache in linux-2.6.18 kernel.<BR>&gt; <BR>&gt; Basically i would like to run kernel in uncache area.<BR>&gt; <BR>&gt; I see there is an option in the in the menuconfig under <BR>&gt; Kernel hacking<BR>&gt; [ ] Run uncached (NEW)<BR>&gt; Sould i need to enable this option to run in the uncahe area?<BR>&gt; <BR>&gt; Could you please tell me how to disable cache and run the kernel in <BR>&gt; uncache area.<BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; Regards,<BR>&gt; Sathesh<BR>&gt;<BR>&gt; Send free SMS to your Friends on Mobile from your Yahoo! Messenger. <BR>&gt; Download Now!
 http://messenger.yahoo.com/download.php<BR>&gt;<BR>That should be it. Did you try with that option MIPS_UNCACHED enabled?<BR><BR>thanks,<BR>Manish Lachwani<BR><BR></BLOCKQUOTE><BR>  <DIV>Send free SMS to your Friends on Mobile from your Yahoo! Messenger. Download Now! http://messenger.yahoo.com/download.php</DIV></BLOCKQUOTE><BR>  <div>  <HR SIZE=1>  </HR>Here’s a new way to find what you're looking for - <A href="http://us.rd.yahoo.com/mail/in/yanswers/*http://in.answers.yahoo.com/">Yahoo! Answers</A> </BLOCKQUOTE><BR><p>&#32;
	

	
		<hr size=1></hr> 
Here’s a new way to find what you're looking for - <a href="http://us.rd.yahoo.com/mail/in/yanswers/*http://in.answers.yahoo.com/">Yahoo! Answers</a> 
--0-2056778440-1168465079=:95321--

From sathesh_edara2003@yahoo.co.in Thu Jan 11 01:02:33 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 11 Jan 2007 01:02:38 +0000 (GMT)
Received: from web7914.mail.in.yahoo.com ([202.86.4.90]:11113 "HELO
	web7914.mail.in.yahoo.com") by ftp.linux-mips.org with SMTP
	id S28579171AbXAKBCd (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Thu, 11 Jan 2007 01:02:33 +0000
Received: (qmail 33927 invoked by uid 60001); 11 Jan 2007 01:02:26 -0000
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
  s=s1024; d=yahoo.co.in;
  h=X-YMail-OSG:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID;
  b=g2iHCLTYa15uCxczn0cbmbrSq7Zr06PCbpL/0uOY6iMT01QfGR/mc8y/yOGMF8L70wX8CBLId6g5HFskZKYOgttNhZSp/4u14WNqQrSdjOFsS1Ajg+5BSfgoQOikcnenaVihZqmeg/C/Pxiw3UyGNbJ39dGmGTMa651p6l1r+n8=;
X-YMail-OSG: uDoPbUkVM1mamofQqY26TQRaK_XSZrFEp8HmE5STyTbq5Ugy0NfB7W.GMMnrvlkJkYrkWl1lTV.cmgSreYiXRvRTXwWfcGrTjl8S2fcUMAvvPo8tCMjwV8CpUqH4bx0mmX55rireiY5kQ4geEOPF9Q--
Received: from [206.40.46.114] by web7914.mail.in.yahoo.com via HTTP; Thu, 11 Jan 2007 01:02:26 GMT
Date:	Thu, 11 Jan 2007 01:02:26 +0000 (GMT)
From:	sathesh babu <sathesh_edara2003@yahoo.co.in>
Subject: Re: Running linux-2.6.18 kernel in uncache area
To:	sathesh babu <sathesh_edara2003@yahoo.co.in>,
	mlachwani <mlachwani@mvista.com>, macro@ds2.pg.gda.pl,
	jsun@mvista.com
Cc:	linux-mips@linux-mips.org
In-Reply-To: <851009.95321.qm@web7903.mail.in.yahoo.com>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="0-1817604482-1168477346=:31860"
Content-Transfer-Encoding: 8bit
Message-ID: <793966.31860.qm@web7914.mail.in.yahoo.com>
Return-Path: <sathesh_edara2003@yahoo.co.in>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13579
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: sathesh_edara2003@yahoo.co.in
Precedence: bulk
X-list: linux-mips

--0-1817604482-1168477346=:31860
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

Hi, 
    Could you please respond on this.
   
  Regards,
  Sathesh

sathesh babu <sathesh_edara2003@yahoo.co.in> wrote:
  

    Hi,
    I would like to runlinux-2.6.18 kernel in uncached area.I tried it by enabling CONFIG_UNCACHE.But still i am doubting it is running in cache area.
   
  Is there a way to know the kernel is running in cache or uncache area?
   
  While going thru mailing list i read that there is a patch to run the kernel in uncache area.
   
  If you have could you please pass to me.
   
  Regards,
  Sathesh
   
  

sathesh babu <sathesh_edara2003@yahoo.co.in> wrote:
    Hi Mlachwani,
   I tried by enabling Uncache option.
  But how do i know kernel runs from the uncache area.
   
  During the boot process , i checked the boot up message and observed that kernel  still calling cache initilization routines.
   
  I did quick test :
    - Read the  10 words of uncached area start from 0xa0800000
   
    - Read the 10 word of cached area start ftom 0x80800000
   
  I checked the contents in the both areas and are same.
   
  That means  cache is not disabled properly.
   
  Is there anyway i can check the kernel is running from cache or uncached area?
   
  Any other options should i enable/disable to run kernel from uncached area.
   
   Regards,
  Sathesh
   
  BOOTUP MESSAGES:
  --------------------------------------------------------------------
Determined physical RAM map:
 memory: 02000000 @ 00000000 (usable)
Initial ramdisk at: 0x80000000 (0 bytes)
Built 1 zonelists.  Total pages: 8192
Kernel command line: root=/dev/mtdblock2 rw rootfstype=jffs2 myfs_start=0xbfA800
00 rootfstype=jffs2
Primary instruction cache 16kB, linesize 32 bytes.
Primary data cache 8kB, linesize 32 bytes.
Fusiv LX4189 CACHES
Synthesized TLB refill handler (17 instructions).
Synthesized TLB load handler fastpath (31 instructions).
Synthesized TLB store handler fastpath (31 instructions).
th (25 instructions).
PID hash table entries: 256 (order: 8, 1024 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 28864k/32768k available (2367k kernel code, 3888k reserved, 401k data, 1
56k init, 0k highmem)
Mount-cache hash table entries: 512
  ---------------------------------------------------------------------
mlachwani <mlachwani@mvista.com> wrote:
  sathesh babu wrote:
> Hi,
> I would like to know is there any configuration option ( using make 
> menuconfig) to turn off cache in linux-2.6.18 kernel.
> 
> Basically i would like to run kernel in uncache area.
> 
> I see there is an option in the in the menuconfig under 
> Kernel hacking
> [ ] Run uncached (NEW)
> Sould i need to enable this option to run in the uncahe area?
> 
> Could you please tell me how to disable cache and run the kernel in 
> uncache area.
> 
> 
> 
> Regards,
> Sathesh
>
> Send free SMS to your Friends on Mobile from your Yahoo! Messenger. 
> Download Now! http://messenger.yahoo.com/download.php
>
That should be it. Did you try with that option MIPS_UNCACHED enabled?

thanks,
Manish Lachwani


  Send free SMS to your Friends on Mobile from your Yahoo! Messenger. Download Now! http://messenger.yahoo.com/download.php

    
---------------------------------
  Here’s a new way to find what you're looking for - Yahoo! Answers 

    
---------------------------------
  Here’s a new way to find what you're looking for - Yahoo! Answers 

 				
---------------------------------
 Here’s a new way to find what you're looking for - Yahoo! Answers 
--0-1817604482-1168477346=:31860
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

<div>Hi, </div>  <div>&nbsp; Could you please respond on this.</div>  <div>&nbsp;</div>  <div>Regards,</div>  <div>Sathesh<BR><BR><B><I>sathesh babu &lt;sathesh_edara2003@yahoo.co.in&gt;</I></B> wrote:</div>  <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid"><BR><BR>  <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">  <DIV>Hi,</DIV>  <DIV>&nbsp; I would like to runlinux-2.6.18 kernel in uncached area.I tried it by enabling CONFIG_UNCACHE.But still i am doubting it is running in cache area.</DIV>  <DIV>&nbsp;</DIV>  <DIV>Is there a way to know the kernel is running in cache or uncache area?</DIV>  <DIV>&nbsp;</DIV>  <DIV>While going thru mailing list i read that there is a patch to run the kernel in uncache area.</DIV>  <DIV>&nbsp;</DIV>  <DIV>If you have could you please pass to me.</DIV>  <DIV>&nbsp;</DIV>  <DIV>Regards,</DIV>  <DIV>Sathesh</DIV>  <DIV>&nbsp;</DIV> 
 <DIV><BR><BR><B><I>sathesh babu &lt;sathesh_edara2003@yahoo.co.in&gt;</I></B> wrote:</DIV>  <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">  <DIV>Hi Mlachwani,</DIV>  <DIV>&nbsp;I tried by enabling Uncache option.</DIV>  <DIV>But how do i know&nbsp;kernel runs from the uncache area.</DIV>  <DIV>&nbsp;</DIV>  <DIV>During the boot process , i checked the boot up message&nbsp;and observed that&nbsp;kernel &nbsp;still calling cache initilization routines.</DIV>  <DIV>&nbsp;</DIV>  <DIV>I did quick test :</DIV>  <DIV>&nbsp;&nbsp;- Read the &nbsp;10 words of uncached area start&nbsp;from 0xa0800000</DIV>  <DIV>&nbsp;</DIV>  <DIV>&nbsp; - Read the 10 word of cached area start ftom 0x80800000</DIV>  <DIV>&nbsp;</DIV>  <DIV>I checked the contents in the both areas and are same.</DIV>  <DIV>&nbsp;</DIV>  <DIV>That means&nbsp; cache is not disabled properly.</DIV>  <DIV>&nbsp;</DIV>  <DIV>Is there anyway i can check the kernel is
 running from cache or uncached area?</DIV>  <DIV>&nbsp;</DIV>  <DIV>Any other options should i enable/disable to run kernel from uncached area.</DIV>  <DIV>&nbsp;</DIV>  <DIV>&nbsp;Regards,</DIV>  <DIV>Sathesh</DIV>  <DIV>&nbsp;</DIV>  <DIV>BOOTUP MESSAGES:</DIV>  <DIV>--------------------------------------------------------------------<BR>Determined physical RAM map:<BR>&nbsp;memory: 02000000 @ 00000000 (usable)<BR>Initial ramdisk at: 0x80000000 (0 bytes)<BR>Built 1 zonelists.&nbsp; Total pages: 8192<BR>Kernel command line: root=/dev/mtdblock2 rw rootfstype=jffs2 myfs_start=0xbfA800<BR>00 rootfstype=jffs2<BR>Primary instruction cache 16kB, linesize 32 bytes.<BR>Primary data cache 8kB, linesize 32 bytes.<BR>Fusiv LX4189 CACHES<BR>Synthesized TLB refill handler (17 instructions).<BR>Synthesized TLB load handler fastpath (31 instructions).<BR>Synthesized TLB store handler fastpath (31 instructions).<BR>th (25 instructions).<BR>PID hash table entries: 256 (order: 8, 1024
 bytes)<BR>Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)<BR>Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)<BR>Memory: 28864k/32768k available (2367k kernel code, 3888k reserved, 401k data, 1<BR>56k init, 0k highmem)<BR>Mount-cache hash table entries: 512</DIV>  <DIV>---------------------------------------------------------------------<BR><B><I>mlachwani &lt;mlachwani@mvista.com&gt;</I></B> wrote:</DIV>  <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">sathesh babu wrote:<BR>&gt; Hi,<BR>&gt; I would like to know is there any configuration option ( using make <BR>&gt; menuconfig) to turn off cache in linux-2.6.18 kernel.<BR>&gt; <BR>&gt; Basically i would like to run kernel in uncache area.<BR>&gt; <BR>&gt; I see there is an option in the in the menuconfig under <BR>&gt; Kernel hacking<BR>&gt; [ ] Run uncached (NEW)<BR>&gt; Sould i need to enable this option to run in the uncahe area?<BR>&gt;
 <BR>&gt; Could you please tell me how to disable cache and run the kernel in <BR>&gt; uncache area.<BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; Regards,<BR>&gt; Sathesh<BR>&gt;<BR>&gt; Send free SMS to your Friends on Mobile from your Yahoo! Messenger. <BR>&gt; Download Now! http://messenger.yahoo.com/download.php<BR>&gt;<BR>That should be it. Did you try with that option MIPS_UNCACHED enabled?<BR><BR>thanks,<BR>Manish Lachwani<BR><BR></BLOCKQUOTE><BR>  <DIV>Send free SMS to your Friends on Mobile from your Yahoo! Messenger. Download Now! http://messenger.yahoo.com/download.php</DIV></BLOCKQUOTE><BR>  <DIV>  <HR SIZE=1>  </HR>Here’s a new way to find what you're looking for - <A href="http://us.rd.yahoo.com/mail/in/yanswers/*http://in.answers.yahoo.com/">Yahoo! Answers</A> </DIV></BLOCKQUOTE><BR>  <div>  <HR SIZE=1>  </HR>Here’s a new way to find what you're looking for - <A href="http://us.rd.yahoo.com/mail/in/yanswers/*http://in.answers.yahoo.com/">Yahoo! Answers</A>
 </BLOCKQUOTE><BR><p>&#32;
	

	
		<hr size=1></hr> 
Here’s a new way to find what you're looking for - <a href="http://us.rd.yahoo.com/mail/in/yanswers/*http://in.answers.yahoo.com/">Yahoo! Answers</a> 
--0-1817604482-1168477346=:31860--

From yoichi_yuasa@tripeaks.co.jp Thu Jan 11 05:56:03 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 11 Jan 2007 05:56:09 +0000 (GMT)
Received: from mo31.po.2iij.net ([210.128.50.54]:7200 "EHLO mo31.po.2iij.net")
	by ftp.linux-mips.org with ESMTP id S20039725AbXAKF4D (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Thu, 11 Jan 2007 05:56:03 +0000
Received: by mo.po.2iij.net (mo31) id l0B5txu7032532; Thu, 11 Jan 2007 14:55:59 +0900 (JST)
Received: from localhost.localdomain (65.126.232.202.bf.2iij.net [202.232.126.65])
	by mbox.po.2iij.net (mbox33) id l0B5twHe006668
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT);
	Thu, 11 Jan 2007 14:55:58 +0900 (JST)
Message-Id: <200701110555.l0B5twHe006668@mbox33.po.2iij.net>
Date:	Thu, 11 Jan 2007 14:55:58 +0900
From:	Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
To:	Ralf Baechle <ralf@linux-mips.org>
Cc:	yoichi_yuasa@tripeaks.co.jp, linux-mips <linux-mips@linux-mips.org>
Subject: [PATCH] [MIPS] Fixed PCI resource fixup
Organization: TriPeaks Corporation
X-Mailer: Sylpheed version 1.0.4 (GTK+ 1.2.10; i386-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Return-Path: <yoichi_yuasa@tripeaks.co.jp>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13580
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: yoichi_yuasa@tripeaks.co.jp
Precedence: bulk
X-list: linux-mips

Hi Ralf,

This patch has fixed IDE resources problem about Cobalt.

pcibios_fixup_device_resources() changes non-movable resources.
It cannot be changed if there is IORESOURCE_PCI_FIXED in the resource flags. 

Yoichi

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>

diff -pruN -X mips/Documentation/dontdiff mips-orig/arch/mips/pci/pci.c mips/arch/mips/pci/pci.c
--- mips-orig/arch/mips/pci/pci.c	2006-12-18 15:53:10.735222250 +0900
+++ mips/arch/mips/pci/pci.c	2006-12-18 15:56:59.805538250 +0900
@@ -232,7 +232,8 @@ static void __init pcibios_fixup_device_
 	int i;
 
 	for (i = 0; i < PCI_NUM_RESOURCES; i++) {
-		if (!dev->resource[i].start)
+		if (!dev->resource[i].start ||
+		    dev->resource[i].flags & IORESOURCE_PCI_FIXED)
 			continue;
 		if (dev->resource[i].flags & IORESOURCE_IO)
 			offset = hose->io_offset;

From KevinK@mips.com Thu Jan 11 07:25:36 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 11 Jan 2007 07:25:40 +0000 (GMT)
Received: from mx.mips.com ([63.167.95.198]:19421 "EHLO dns0.mips.com")
	by ftp.linux-mips.org with ESMTP id S28580041AbXAKHZg (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Thu, 11 Jan 2007 07:25:36 +0000
Received: from mercury.mips.com (mercury [192.168.64.101])
	by dns0.mips.com (8.12.11/8.12.11) with ESMTP id l0B7QX41025216;
	Wed, 10 Jan 2007 23:26:34 -0800 (PST)
Received: from Ulysses ([192.168.3.143])
	by mercury.mips.com (8.13.5/8.13.5) with SMTP id l0B7PQ81005986;
	Wed, 10 Jan 2007 23:25:26 -0800 (PST)
Message-ID: <000d01c73551$dc5883c0$8f03a8c0@Ulysses>
From:	"Kevin D. Kissell" <KevinK@mips.com>
To:	"sathesh babu" <sathesh_edara2003@yahoo.co.in>,
	"mlachwani" <mlachwani@mvista.com>, <macro@ds2.pg.gda.pl>,
	<jsun@mvista.com>
Cc:	<linux-mips@linux-mips.org>
References: <793966.31860.qm@web7914.mail.in.yahoo.com>
Subject: Re: Running linux-2.6.18 kernel in uncache area
Date:	Thu, 11 Jan 2007 07:26:48 -0000
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_000A_01C73551.DB03A220"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2800.1807
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1807
Return-Path: <KevinK@mips.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13581
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: KevinK@mips.com
Precedence: bulk
X-list: linux-mips

This is a multi-part message in MIME format.

------=_NextPart_000_000A_01C73551.DB03A220
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

The way an uncached kernel boot works is by setting the cache attribute
of kseg0 (0x80000000-0x9fffffff) to be non-cacheable. It doesn't change =
a
lot of other code, so there's nothing necessarily strange about cache =
initialization
being done anyway, and it's perfectly normal and expected that the same
memory be seen at 0x80800000 as at 0xa0800000.
  ----- Original Message -----=20
  From: sathesh babu=20
  To: sathesh babu ; mlachwani ; macro@ds2.pg.gda.pl ; jsun@mvista.com=20
  Cc: linux-mips@linux-mips.org=20
  Sent: Thursday, January 11, 2007 1:02 AM
  Subject: Re: Running linux-2.6.18 kernel in uncache area


  Hi,=20
    Could you please respond on this.

  Regards,
  Sathesh

  sathesh babu <sathesh_edara2003@yahoo.co.in> wrote:



      Hi,
        I would like to runlinux-2.6.18 kernel in uncached area.I tried =
it by enabling CONFIG_UNCACHE.But still i am doubting it is running in =
cache area.

      Is there a way to know the kernel is running in cache or uncache =
area?

      While going thru mailing list i read that there is a patch to run =
the kernel in uncache area.

      If you have could you please pass to me.

      Regards,
      Sathesh



      sathesh babu <sathesh_edara2003@yahoo.co.in> wrote:
        Hi Mlachwani,
         I tried by enabling Uncache option.
        But how do i know kernel runs from the uncache area.

        During the boot process , i checked the boot up message and =
observed that kernel  still calling cache initilization routines.

        I did quick test :
          - Read the  10 words of uncached area start from 0xa0800000

          - Read the 10 word of cached area start ftom 0x80800000

        I checked the contents in the both areas and are same.

        That means  cache is not disabled properly.

        Is there anyway i can check the kernel is running from cache or =
uncached area?

        Any other options should i enable/disable to run kernel from =
uncached area.

         Regards,
        Sathesh

        BOOTUP MESSAGES:
        =
--------------------------------------------------------------------
        Determined physical RAM map:
         memory: 02000000 @ 00000000 (usable)
        Initial ramdisk at: 0x80000000 (0 bytes)
        Built 1 zonelists.  Total pages: 8192
        Kernel command line: root=3D/dev/mtdblock2 rw rootfstype=3Djffs2 =
myfs_start=3D0xbfA800
        00 rootfstype=3Djffs2
        Primary instruction cache 16kB, linesize 32 bytes.
        Primary data cache 8kB, linesize 32 bytes.
        Fusiv LX4189 CACHES
        Synthesized TLB refill handler (17 instructions).
        Synthesized TLB load handler fastpath (31 instructions).
        Synthesized TLB store handler fastpath (31 instructions).
        th (25 instructions).
        PID hash table entries: 256 (order: 8, 1024 bytes)
        Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
        Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
        Memory: 28864k/32768k available (2367k kernel code, 3888k =
reserved, 401k data, 1
        56k init, 0k highmem)
        Mount-cache hash table entries: 512
        =
---------------------------------------------------------------------
        mlachwani <mlachwani@mvista.com> wrote:
          sathesh babu wrote:
          > Hi,
          > I would like to know is there any configuration option ( =
using make=20
          > menuconfig) to turn off cache in linux-2.6.18 kernel.
          >=20
          > Basically i would like to run kernel in uncache area.
          >=20
          > I see there is an option in the in the menuconfig under=20
          > Kernel hacking
          > [ ] Run uncached (NEW)
          > Sould i need to enable this option to run in the uncahe =
area?
          >=20
          > Could you please tell me how to disable cache and run the =
kernel in=20
          > uncache area.
          >=20
          >=20
          >=20
          > Regards,
          > Sathesh
          >
          > Send free SMS to your Friends on Mobile from your Yahoo! =
Messenger.=20
          > Download Now! http://messenger.yahoo.com/download.php
          >
          That should be it. Did you try with that option MIPS_UNCACHED =
enabled?

          thanks,
          Manish Lachwani




        Send free SMS to your Friends on Mobile from your Yahoo! =
Messenger. Download Now! http://messenger.yahoo.com/download.php



-------------------------------------------------------------------------=
-
      Here's a new way to find what you're looking for - Yahoo! Answers=20



-------------------------------------------------------------------------=
---
    Here's a new way to find what you're looking for - Yahoo! Answers=20




-------------------------------------------------------------------------=
-----
  Here's a new way to find what you're looking for - Yahoo! Answers 
------=_NextPart_000_000A_01C73551.DB03A220
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1561" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>The way an uncached kernel boot works =
is by setting=20
the cache attribute</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>of kseg0 (0x80000000-0x9fffffff) to be=20
non-cacheable. It doesn't change a</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>lot of other code, so there's nothing =
necessarily=20
strange about cache initialization</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>being done anyway, and it's perfectly =
normal and=20
expected that the same</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>memory be seen at 0x80800000 as at=20
0xa0800000.</FONT></DIV>
<BLOCKQUOTE=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV=20
  style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"><B>From:</B>=20
  <A title=3Dsathesh_edara2003@yahoo.co.in=20
  href=3D"mailto:sathesh_edara2003@yahoo.co.in">sathesh babu</A> </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A=20
  title=3Dsathesh_edara2003@yahoo.co.in=20
  href=3D"mailto:sathesh_edara2003@yahoo.co.in">sathesh babu</A> ; <A=20
  title=3Dmlachwani@mvista.com =
href=3D"mailto:mlachwani@mvista.com">mlachwani</A> ;=20
  <A title=3Dmacro@ds2.pg.gda.pl=20
  href=3D"mailto:macro@ds2.pg.gda.pl">macro@ds2.pg.gda.pl</A> ; <A=20
  title=3Djsun@mvista.com =
href=3D"mailto:jsun@mvista.com">jsun@mvista.com</A> </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Cc:</B> <A =
title=3Dlinux-mips@linux-mips.org=20
  =
href=3D"mailto:linux-mips@linux-mips.org">linux-mips@linux-mips.org</A> =
</DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Thursday, January 11, =
2007 1:02=20
  AM</DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> Re: Running =
linux-2.6.18 kernel=20
  in uncache area</DIV>
  <DIV><BR></DIV>
  <DIV>Hi, </DIV>
  <DIV>&nbsp; Could you please respond on this.</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>Regards,</DIV>
  <DIV>Sathesh<BR><BR><B><I>sathesh babu &lt;<A=20
  =
href=3D"mailto:sathesh_edara2003@yahoo.co.in">sathesh_edara2003@yahoo.co.=
in</A>&gt;</I></B>=20
  wrote:</DIV>
  <BLOCKQUOTE class=3Dreplbq=20
  style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px =
solid"><BR><BR>
    <BLOCKQUOTE class=3Dreplbq=20
    style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff =
2px solid">
      <DIV>Hi,</DIV>
      <DIV>&nbsp; I would like to runlinux-2.6.18 kernel in uncached =
area.I=20
      tried it by enabling CONFIG_UNCACHE.But still i am doubting it is =
running=20
      in cache area.</DIV>
      <DIV>&nbsp;</DIV>
      <DIV>Is there a way to know the kernel is running in cache or =
uncache=20
      area?</DIV>
      <DIV>&nbsp;</DIV>
      <DIV>While going thru mailing list i read that there is a patch to =
run the=20
      kernel in uncache area.</DIV>
      <DIV>&nbsp;</DIV>
      <DIV>If you have could you please pass to me.</DIV>
      <DIV>&nbsp;</DIV>
      <DIV>Regards,</DIV>
      <DIV>Sathesh</DIV>
      <DIV>&nbsp;</DIV>
      <DIV><BR><BR><B><I>sathesh babu &lt;<A=20
      =
href=3D"mailto:sathesh_edara2003@yahoo.co.in">sathesh_edara2003@yahoo.co.=
in</A>&gt;</I></B>=20
      wrote:</DIV>
      <BLOCKQUOTE class=3Dreplbq=20
      style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff =
2px solid">
        <DIV>Hi Mlachwani,</DIV>
        <DIV>&nbsp;I tried by enabling Uncache option.</DIV>
        <DIV>But how do i know&nbsp;kernel runs from the uncache =
area.</DIV>
        <DIV>&nbsp;</DIV>
        <DIV>During the boot process , i checked the boot up =
message&nbsp;and=20
        observed that&nbsp;kernel &nbsp;still calling cache =
initilization=20
        routines.</DIV>
        <DIV>&nbsp;</DIV>
        <DIV>I did quick test :</DIV>
        <DIV>&nbsp;&nbsp;- Read the &nbsp;10 words of uncached area=20
        start&nbsp;from 0xa0800000</DIV>
        <DIV>&nbsp;</DIV>
        <DIV>&nbsp; - Read the 10 word of cached area start ftom=20
0x80800000</DIV>
        <DIV>&nbsp;</DIV>
        <DIV>I checked the contents in the both areas and are =
same.</DIV>
        <DIV>&nbsp;</DIV>
        <DIV>That means&nbsp; cache is not disabled properly.</DIV>
        <DIV>&nbsp;</DIV>
        <DIV>Is there anyway i can check the kernel is running from =
cache or=20
        uncached area?</DIV>
        <DIV>&nbsp;</DIV>
        <DIV>Any other options should i enable/disable to run kernel =
from=20
        uncached area.</DIV>
        <DIV>&nbsp;</DIV>
        <DIV>&nbsp;Regards,</DIV>
        <DIV>Sathesh</DIV>
        <DIV>&nbsp;</DIV>
        <DIV>BOOTUP MESSAGES:</DIV>
        =
<DIV>--------------------------------------------------------------------=
<BR>Determined=20
        physical RAM map:<BR>&nbsp;memory: 02000000 @ 00000000=20
        (usable)<BR>Initial ramdisk at: 0x80000000 (0 bytes)<BR>Built 1=20
        zonelists.&nbsp; Total pages: 8192<BR>Kernel command line:=20
        root=3D/dev/mtdblock2 rw rootfstype=3Djffs2 =
myfs_start=3D0xbfA800<BR>00=20
        rootfstype=3Djffs2<BR>Primary instruction cache 16kB, linesize =
32=20
        bytes.<BR>Primary data cache 8kB, linesize 32 bytes.<BR>Fusiv =
LX4189=20
        CACHES<BR>Synthesized TLB refill handler (17=20
        instructions).<BR>Synthesized TLB load handler fastpath (31=20
        instructions).<BR>Synthesized TLB store handler fastpath (31=20
        instructions).<BR>th (25 instructions).<BR>PID hash table =
entries: 256=20
        (order: 8, 1024 bytes)<BR>Dentry cache hash table entries: 4096 =
(order:=20
        2, 16384 bytes)<BR>Inode-cache hash table entries: 2048 (order: =
1, 8192=20
        bytes)<BR>Memory: 28864k/32768k available (2367k kernel code, =
3888k=20
        reserved, 401k data, 1<BR>56k init, 0k highmem)<BR>Mount-cache =
hash=20
        table entries: 512</DIV>
        =
<DIV>--------------------------------------------------------------------=
-<BR><B><I>mlachwani=20
        &lt;mlachwani@mvista.com&gt;</I></B> wrote:</DIV>
        <BLOCKQUOTE class=3Dreplbq=20
        style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: =
#1010ff 2px solid">sathesh=20
          babu wrote:<BR>&gt; Hi,<BR>&gt; I would like to know is there =
any=20
          configuration option ( using make <BR>&gt; menuconfig) to turn =
off=20
          cache in linux-2.6.18 kernel.<BR>&gt; <BR>&gt; Basically i =
would like=20
          to run kernel in uncache area.<BR>&gt; <BR>&gt; I see there is =
an=20
          option in the in the menuconfig under <BR>&gt; Kernel =
hacking<BR>&gt;=20
          [ ] Run uncached (NEW)<BR>&gt; Sould i need to enable this =
option to=20
          run in the uncahe area?<BR>&gt; <BR>&gt; Could you please tell =
me how=20
          to disable cache and run the kernel in <BR>&gt; uncache =
area.<BR>&gt;=20
          <BR>&gt; <BR>&gt; <BR>&gt; Regards,<BR>&gt; =
Sathesh<BR>&gt;<BR>&gt;=20
          Send free SMS to your Friends on Mobile from your Yahoo! =
Messenger.=20
          <BR>&gt; Download Now!=20
          http://messenger.yahoo.com/download.php<BR>&gt;<BR>That should =
be it.=20
          Did you try with that option MIPS_UNCACHED=20
          enabled?<BR><BR>thanks,<BR>Manish =
Lachwani<BR><BR></BLOCKQUOTE><BR>
        <DIV>Send free SMS to your Friends on Mobile from your Yahoo! =
Messenger.=20
        Download Now!=20
      http://messenger.yahoo.com/download.php</DIV></BLOCKQUOTE><BR>
      <DIV>
      <HR SIZE=3D1>
      </HR>Here=92s a new way to find what you're looking for - <A=20
      =
href=3D"http://us.rd.yahoo.com/mail/in/yanswers/*http://in.answers.yahoo.=
com/">Yahoo!=20
      Answers</A> </DIV></BLOCKQUOTE><BR>
    <DIV>
    <HR SIZE=3D1>
    </HR>Here=92s a new way to find what you're looking for - <A=20
    =
href=3D"http://us.rd.yahoo.com/mail/in/yanswers/*http://in.answers.yahoo.=
com/">Yahoo!=20
    Answers</A> </DIV></BLOCKQUOTE><BR>
  <P>
  <HR SIZE=3D1>
  </HR>Here=92s a new way to find what you're looking for - <A=20
  =
href=3D"http://us.rd.yahoo.com/mail/in/yanswers/*http://in.answers.yahoo.=
com/">Yahoo!=20
  Answers</A> </BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_000A_01C73551.DB03A220--


From bunk@stusta.de Thu Jan 11 13:50:36 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 11 Jan 2007 13:50:40 +0000 (GMT)
Received: from mailout.stusta.mhn.de ([141.84.69.5]:3858 "HELO
	mailout.stusta.mhn.de") by ftp.linux-mips.org with SMTP
	id S20046649AbXAKNug (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Thu, 11 Jan 2007 13:50:36 +0000
Received: (qmail 14917 invoked from network); 11 Jan 2007 13:50:30 -0000
Received: from r063144.stusta.swh.mhn.de (10.150.63.144)
  by mailhub.stusta.mhn.de with SMTP; 11 Jan 2007 13:50:30 -0000
Received: by r063144.stusta.swh.mhn.de (Postfix, from userid 1000)
	id 194DC3A9DBA; Thu, 11 Jan 2007 14:50:37 +0100 (CET)
Date:	Thu, 11 Jan 2007 14:50:37 +0100
From:	Adrian Bunk <bunk@stusta.de>
To:	ralf@linux-mips.org
Cc:	linux-mips@linux-mips.org, linux-kernel@vger.kernel.org
Subject: [2.6 patch] MIPS: remove smp_tune_scheduling()
Message-ID: <20070111135037.GK20027@stusta.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.5.13 (2006-08-11)
Return-Path: <bunk@stusta.de>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13582
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: bunk@stusta.de
Precedence: bulk
X-list: linux-mips

Since smp_tune_scheduling() didn't do anything we can simply remove it.

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

 arch/mips/kernel/smp.c |   28 ----------------------------
 1 file changed, 28 deletions(-)

--- linux-2.6.20-rc3-mm1/arch/mips/kernel/smp.c.old	2007-01-11 14:19:43.000000000 +0100
+++ linux-2.6.20-rc3-mm1/arch/mips/kernel/smp.c	2007-01-11 14:20:01.000000000 +0100
@@ -51,33 +51,6 @@
 EXPORT_SYMBOL(phys_cpu_present_map);
 EXPORT_SYMBOL(cpu_online_map);
 
-static void smp_tune_scheduling (void)
-{
-	struct cache_desc *cd = &current_cpu_data.scache;
-	unsigned long cachesize;       /* kB   */
-	unsigned long cpu_khz;
-
-	/*
-	 * Crude estimate until we actually meassure ...
-	 */
-	cpu_khz = loops_per_jiffy * 2 * HZ / 1000;
-
-	/*
-	 * Rough estimation for SMP scheduling, this is the number of
-	 * cycles it takes for a fully memory-limited process to flush
-	 * the SMP-local cache.
-	 *
-	 * (For a P5 this pretty much means we will choose another idle
-	 *  CPU almost always at wakeup time (this is due to the small
-	 *  L1 cache), on PIIs it's around 50-100 usecs, depending on
-	 *  the cache size)
-	 */
-	if (!cpu_khz)
-		return;
-
-	cachesize = cd->linesz * cd->sets * cd->ways;
-}
-
 extern void __init calibrate_delay(void);
 extern ATTRIB_NORET void cpu_idle(void);
 
@@ -245,7 +218,6 @@
 {
 	init_new_context(current, &init_mm);
 	current_thread_info()->cpu = 0;
-	smp_tune_scheduling();
 	plat_prepare_cpus(max_cpus);
 #ifndef CONFIG_HOTPLUG_CPU
 	cpu_present_map = cpu_possible_map;


From ralf@linux-mips.org Thu Jan 11 14:30:29 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 11 Jan 2007 14:30:31 +0000 (GMT)
Received: from wf1.mips-uk.com ([194.74.144.154]:14313 "EHLO
	dl5rb.ham-radio-op.net") by ftp.linux-mips.org with ESMTP
	id S20046744AbXAKOa3 (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Thu, 11 Jan 2007 14:30:29 +0000
Received: from denk.linux-mips.net (denk.linux-mips.net [127.0.0.1])
	by dl5rb.ham-radio-op.net (8.13.8/8.13.8) with ESMTP id l0BEVI0t004534;
	Thu, 11 Jan 2007 14:31:18 GMT
Received: (from ralf@localhost)
	by denk.linux-mips.net (8.13.8/8.13.8/Submit) id l0BEVGGj004533;
	Thu, 11 Jan 2007 14:31:16 GMT
Date:	Thu, 11 Jan 2007 14:31:16 +0000
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Cc:	linux-mips <linux-mips@linux-mips.org>
Subject: Re: [PATCH] [MIPS] Fixed PCI resource fixup
Message-ID: <20070111143116.GA4451@linux-mips.org>
References: <200701110555.l0B5twHe006668@mbox33.po.2iij.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <200701110555.l0B5twHe006668@mbox33.po.2iij.net>
User-Agent: Mutt/1.4.2.2i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13583
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips

On Thu, Jan 11, 2007 at 02:55:58PM +0900, Yoichi Yuasa wrote:

> This patch has fixed IDE resources problem about Cobalt.
> 
> pcibios_fixup_device_resources() changes non-movable resources.
> It cannot be changed if there is IORESOURCE_PCI_FIXED in the resource flags. 

<Ralf> anemo: Have you seen Yoichi's patch?
<anemo> Ralf: yes, but I could not see why ...  My impression is IORESOURCE_PCI_FIXED and io_offset adjustment is irrerevant.
<Ralf> This whole fixup thing is really meant to handle machines where there is an offset between PCI bus addresses and CPU physical addresses.
<Ralf> And that exists regardless of IORESOURCE_PCI_FIXED
<anemo> I thought so too.  So I can not see why youichi's patch fix something.
<Ralf> This may be the explanation:
<Ralf> static struct pci_controller cobalt_pci_controller = {
<Ralf>         .pci_ops        = &gt64111_pci_ops,
<Ralf>         .mem_resource   = &cobalt_mem_resource,
<Ralf>         .mem_offset     = 0,
<Ralf>         .io_resource    = &cobalt_io_resource,
<Ralf>         .io_offset      = 0 - GT_DEF_PCI0_IO_BASE,
<Ralf> };
<Ralf> I think he should have io_offset = 0.

Which is what other GT-64120 platforms are using, so I wonder why that is
different on Cobalt.

  Ralf

From macro@linux-mips.org Thu Jan 11 14:44:05 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 11 Jan 2007 14:44:10 +0000 (GMT)
Received: from pollux.ds.pg.gda.pl ([153.19.208.7]:10248 "EHLO
	pollux.ds.pg.gda.pl") by ftp.linux-mips.org with ESMTP
	id S28580535AbXAKOoF (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Thu, 11 Jan 2007 14:44:05 +0000
Received: from localhost (localhost [127.0.0.1])
	by pollux.ds.pg.gda.pl (Postfix) with ESMTP id DB212F59AE;
	Thu, 11 Jan 2007 15:43:50 +0100 (CET)
X-Virus-Scanned: by amavisd-new at pollux.ds.pg.gda.pl
Received: from pollux.ds.pg.gda.pl ([127.0.0.1])
	by localhost (pollux.ds.pg.gda.pl [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id oW9hcat-jlTW; Thu, 11 Jan 2007 15:43:50 +0100 (CET)
Received: from piorun.ds.pg.gda.pl (piorun.ds.pg.gda.pl [153.19.208.8])
	by pollux.ds.pg.gda.pl (Postfix) with ESMTP id 7ACBCF59AA;
	Thu, 11 Jan 2007 15:43:50 +0100 (CET)
Received: from blysk.ds.pg.gda.pl (macro@blysk.ds.pg.gda.pl [153.19.208.6])
	by piorun.ds.pg.gda.pl (8.13.8/8.13.8) with ESMTP id l0BEhxZn026442;
	Thu, 11 Jan 2007 15:44:00 +0100
Date:	Thu, 11 Jan 2007 14:43:54 +0000 (GMT)
From:	"Maciej W. Rozycki" <macro@linux-mips.org>
To:	Andrew Morton <akpm@osdl.org>
cc:	linux-mips@linux-mips.org, linux-kernel@vger.kernel.org
Subject: [PATCH 2.6.20-rc1 11/10] TURBOchannel resources off-by-one fix 
Message-ID: <Pine.LNX.4.64N.0701111439070.11394@blysk.ds.pg.gda.pl>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Virus-Scanned: ClamAV 0.88.7/2435/Thu Jan 11 09:34:23 2007 on piorun.ds.pg.gda.pl
X-Virus-Status:	Clean
Return-Path: <macro@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13584
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: macro@linux-mips.org
Precedence: bulk
X-list: linux-mips

 This is a trivial fix to resource reservation of TURBOchannel areas, 
where the end is one byte too far.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
---

 Please apply.

  Maciej

patch-mips-2.6.18-20060920-tc-sysfs-resource-0
diff -up --recursive --new-file linux-mips-2.6.18-20060920.macro/drivers/tc/tc.c linux-mips-2.6.18-20060920/drivers/tc/tc.c
--- linux-mips-2.6.18-20060920.macro/drivers/tc/tc.c	2006-12-19 23:03:11.000000000 +0000
+++ linux-mips-2.6.18-20060920/drivers/tc/tc.c	2006-12-28 18:51:49.000000000 +0000
@@ -160,7 +160,7 @@ static int __init tc_init(void)
 		tc_bus.resource[0].start = tc_bus.slot_base;
 		tc_bus.resource[0].end = tc_bus.slot_base +
 					 (tc_bus.info.slot_size << 20) *
-					 tc_bus.num_tcslots;
+					 tc_bus.num_tcslots - 1;
 		tc_bus.resource[0].name = tc_bus.name;
 		tc_bus.resource[0].flags = IORESOURCE_MEM;
 		if (request_resource(&iomem_resource,
@@ -172,7 +172,7 @@ static int __init tc_init(void)
 			tc_bus.resource[1].start = tc_bus.ext_slot_base;
 			tc_bus.resource[1].end = tc_bus.ext_slot_base +
 						 tc_bus.ext_slot_size *
-						 tc_bus.num_tcslots;
+						 tc_bus.num_tcslots - 1;
 			tc_bus.resource[1].name = tc_bus.name;
 			tc_bus.resource[1].flags = IORESOURCE_MEM;
 			if (request_resource(&iomem_resource,

From yoichi_yuasa@tripeaks.co.jp Thu Jan 11 14:47:55 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 11 Jan 2007 14:48:01 +0000 (GMT)
Received: from mo32.po.2iij.net ([210.128.50.17]:13317 "EHLO mo32.po.2iij.net")
	by ftp.linux-mips.org with ESMTP id S28580544AbXAKOrz (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Thu, 11 Jan 2007 14:47:55 +0000
Received: by mo.po.2iij.net (mo32) id l0BElr1c054824; Thu, 11 Jan 2007 23:47:53 +0900 (JST)
Received: from localhost.localdomain (45.28.30.125.dy.iij4u.or.jp [125.30.28.45])
	by mbox.po.2iij.net (mbox32) id l0BEllGG001929
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT);
	Thu, 11 Jan 2007 23:47:47 +0900 (JST)
Date:	Thu, 11 Jan 2007 23:47:47 +0900
From:	Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
To:	Ralf Baechle <ralf@linux-mips.org>
Cc:	yoichi_yuasa@tripeaks.co.jp, linux-mips@linux-mips.org
Subject: Re: [PATCH] [MIPS] Fixed PCI resource fixup
Message-Id: <20070111234747.7eed9028.yoichi_yuasa@tripeaks.co.jp>
In-Reply-To: <20070111143116.GA4451@linux-mips.org>
References: <200701110555.l0B5twHe006668@mbox33.po.2iij.net>
	<20070111143116.GA4451@linux-mips.org>
Organization: TriPeaks Corporation
X-Mailer: Sylpheed version 1.0.6 (GTK+ 1.2.10; i486-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Return-Path: <yoichi_yuasa@tripeaks.co.jp>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13585
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: yoichi_yuasa@tripeaks.co.jp
Precedence: bulk
X-list: linux-mips

On Thu, 11 Jan 2007 14:31:16 +0000
Ralf Baechle <ralf@linux-mips.org> wrote:

> On Thu, Jan 11, 2007 at 02:55:58PM +0900, Yoichi Yuasa wrote:
> 
> > This patch has fixed IDE resources problem about Cobalt.
> > 
> > pcibios_fixup_device_resources() changes non-movable resources.
> > It cannot be changed if there is IORESOURCE_PCI_FIXED in the resource flags. 
> 
> <Ralf> anemo: Have you seen Yoichi's patch?
> <anemo> Ralf: yes, but I could not see why ...  My impression is IORESOURCE_PCI_FIXED and io_offset adjustment is irrerevant.
> <Ralf> This whole fixup thing is really meant to handle machines where there is an offset between PCI bus addresses and CPU physical addresses.
> <Ralf> And that exists regardless of IORESOURCE_PCI_FIXED
> <anemo> I thought so too.  So I can not see why youichi's patch fix something.
> <Ralf> This may be the explanation:
> <Ralf> static struct pci_controller cobalt_pci_controller = {
> <Ralf>         .pci_ops        = &gt64111_pci_ops,
> <Ralf>         .mem_resource   = &cobalt_mem_resource,
> <Ralf>         .mem_offset     = 0,
> <Ralf>         .io_resource    = &cobalt_io_resource,
> <Ralf>         .io_offset      = 0 - GT_DEF_PCI0_IO_BASE,
> <Ralf> };
> <Ralf> I think he should have io_offset = 0.

When I tried io_offset = 0, tulip net driver didn't work.

> Which is what other GT-64120 platforms are using, so I wonder why that is
> different on Cobalt.

I don't know, but io_offset is needed for Cobalt.

Yoichi

From yoichi_yuasa@tripeaks.co.jp Thu Jan 11 14:53:27 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 11 Jan 2007 14:53:32 +0000 (GMT)
Received: from mo30.po.2iij.net ([210.128.50.53]:53056 "EHLO mo30.po.2iij.net")
	by ftp.linux-mips.org with ESMTP id S20041256AbXAKOx1 (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Thu, 11 Jan 2007 14:53:27 +0000
Received: by mo.po.2iij.net (mo30) id l0BErO4j079771; Thu, 11 Jan 2007 23:53:24 +0900 (JST)
Received: from localhost.localdomain (45.28.30.125.dy.iij4u.or.jp [125.30.28.45])
	by mbox.po.2iij.net (mbox32) id l0BErIBb004005
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT);
	Thu, 11 Jan 2007 23:53:19 +0900 (JST)
Date:	Thu, 11 Jan 2007 23:53:18 +0900
From:	Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
To:	Ralf Baechle <ralf@linux-mips.org>
Cc:	yoichi_yuasa@tripeaks.co.jp, linux-mips <linux-mips@linux-mips.org>
Subject: [PATCH] [MIPS] vr41xx: add MACINT controls
Message-Id: <20070111235318.49bf0820.yoichi_yuasa@tripeaks.co.jp>
Organization: TriPeaks Corporation
X-Mailer: Sylpheed version 1.0.6 (GTK+ 1.2.10; i486-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Return-Path: <yoichi_yuasa@tripeaks.co.jp>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13586
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: yoichi_yuasa@tripeaks.co.jp
Precedence: bulk
X-list: linux-mips

Hi Ralf,

This patch has added MACINT controls.
They are necessary for VR4133 ethernet driver.

Yoichi

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>

diff -pruN -X mips/Documentation/dontdiff mips-orig/arch/mips/vr41xx/common/icu.c mips/arch/mips/vr41xx/common/icu.c
--- mips-orig/arch/mips/vr41xx/common/icu.c	2007-01-11 22:49:53.309677500 +0900
+++ mips/arch/mips/vr41xx/common/icu.c	2007-01-11 23:25:24.954897000 +0900
@@ -3,7 +3,7 @@
  *
  *  Copyright (C) 2001-2002  MontaVista Software Inc.
  *    Author: Yoichi Yuasa <yyuasa@mvista.com or source@mvista.com>
- *  Copyright (C) 2003-2005  Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
+ *  Copyright (C) 2003-2006  Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -68,6 +68,7 @@ static unsigned char sysint2_assign[16] 
 #define MPIUINTREG	0x0e
 #define MAIUINTREG	0x10
 #define MKIUINTREG	0x12
+#define MMACINTREG	0x12
 #define MGIUINTLREG	0x14
 #define MDSIUINTREG	0x16
 #define NMIREG		0x18
@@ -241,6 +242,30 @@ void vr41xx_disable_kiuint(uint16_t mask
 
 EXPORT_SYMBOL(vr41xx_disable_kiuint);
 
+void vr41xx_enable_macint(uint16_t mask)
+{
+	struct irq_desc *desc = irq_desc + ETHERNET_IRQ;
+	unsigned long flags;
+
+	spin_lock_irqsave(&desc->lock, flags);
+	icu1_set(MMACINTREG, mask);
+	spin_unlock_irqrestore(&desc->lock, flags);
+}
+
+EXPORT_SYMBOL(vr41xx_enable_macint);
+
+void vr41xx_disable_macint(uint16_t mask)
+{
+	struct irq_desc *desc = irq_desc + ETHERNET_IRQ;
+	unsigned long flags;
+
+	spin_lock_irqsave(&desc->lock, flags);
+	icu1_clear(MMACINTREG, mask);
+	spin_unlock_irqrestore(&desc->lock, flags);
+}
+
+EXPORT_SYMBOL(vr41xx_disable_macint);
+
 void vr41xx_enable_dsiuint(uint16_t mask)
 {
 	struct irq_desc *desc = irq_desc + DSIU_IRQ;

From anemo@mba.ocn.ne.jp Thu Jan 11 15:45:37 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 11 Jan 2007 15:45:42 +0000 (GMT)
Received: from mba.ocn.ne.jp ([210.190.142.172]:5580 "HELO smtp.mba.ocn.ne.jp")
	by ftp.linux-mips.org with SMTP id S20046799AbXAKPph (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Thu, 11 Jan 2007 15:45:37 +0000
Received: from localhost (p2161-ipad26funabasi.chiba.ocn.ne.jp [220.104.88.161])
	by smtp.mba.ocn.ne.jp (Postfix) with ESMTP
	id 9B185BD9D; Fri, 12 Jan 2007 00:45:31 +0900 (JST)
Date:	Fri, 12 Jan 2007 00:45:31 +0900 (JST)
Message-Id: <20070112.004531.132304408.anemo@mba.ocn.ne.jp>
To:	yoichi_yuasa@tripeaks.co.jp
Cc:	ralf@linux-mips.org, linux-mips@linux-mips.org
Subject: Re: [PATCH] [MIPS] Fixed PCI resource fixup
From:	Atsushi Nemoto <anemo@mba.ocn.ne.jp>
In-Reply-To: <20070111234747.7eed9028.yoichi_yuasa@tripeaks.co.jp>
References: <200701110555.l0B5twHe006668@mbox33.po.2iij.net>
	<20070111143116.GA4451@linux-mips.org>
	<20070111234747.7eed9028.yoichi_yuasa@tripeaks.co.jp>
X-Fingerprint: 6ACA 1623 39BD 9A94 9B1A  B746 CA77 FE94 2874 D52F
X-Pgp-Public-Key: http://wwwkeys.pgp.net/pks/lookup?op=get&search=0x2874D52F
X-Mailer: Mew version 3.3 on Emacs 21.4 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Return-Path: <anemo@mba.ocn.ne.jp>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13587
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: anemo@mba.ocn.ne.jp
Precedence: bulk
X-list: linux-mips

On Thu, 11 Jan 2007 23:47:47 +0900, Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> wrote:
> > <Ralf> I think he should have io_offset = 0.
> 
> When I tried io_offset = 0, tulip net driver didn't work.
> 
> > Which is what other GT-64120 platforms are using, so I wonder why that is
> > different on Cobalt.
> 
> I don't know, but io_offset is needed for Cobalt.

If io_offset = 0, GT-64120 must be programmed to remap physicall
address GT_DEF_PCI0_IO_BASE to PCI IO address 0.  Maybe other GT-64120
users have such configuraion?

---
Atsushi Nemoto

From ralf@linux-mips.org Thu Jan 11 16:50:20 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 11 Jan 2007 16:50:21 +0000 (GMT)
Received: from wf1.mips-uk.com ([194.74.144.154]:9896 "EHLO
	dl5rb.ham-radio-op.net") by ftp.linux-mips.org with ESMTP
	id S28581219AbXAKQuU (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Thu, 11 Jan 2007 16:50:20 +0000
Received: from denk.linux-mips.net (denk.linux-mips.net [127.0.0.1])
	by dl5rb.ham-radio-op.net (8.13.8/8.13.8) with ESMTP id l0BGp9Jf011727;
	Thu, 11 Jan 2007 16:51:09 GMT
Received: (from ralf@localhost)
	by denk.linux-mips.net (8.13.8/8.13.8/Submit) id l0BGp7XJ011726;
	Thu, 11 Jan 2007 16:51:07 GMT
Date:	Thu, 11 Jan 2007 16:51:07 +0000
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Cc:	linux-mips <linux-mips@linux-mips.org>
Subject: Re: [PATCH] [MIPS] vr41xx: add MACINT controls
Message-ID: <20070111165107.GA23014@linux-mips.org>
References: <20070111235318.49bf0820.yoichi_yuasa@tripeaks.co.jp>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20070111235318.49bf0820.yoichi_yuasa@tripeaks.co.jp>
User-Agent: Mutt/1.4.2.2i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13588
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips

On Thu, Jan 11, 2007 at 11:53:18PM +0900, Yoichi Yuasa wrote:

> This patch has added MACINT controls.
> They are necessary for VR4133 ethernet driver.

Okay, queued.

  Ralf

From ralf@linux-mips.org Thu Jan 11 17:14:59 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 11 Jan 2007 17:15:01 +0000 (GMT)
Received: from wf1.mips-uk.com ([194.74.144.154]:43456 "EHLO
	dl5rb.ham-radio-op.net") by ftp.linux-mips.org with ESMTP
	id S28581298AbXAKRO7 (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Thu, 11 Jan 2007 17:14:59 +0000
Received: from denk.linux-mips.net (denk.linux-mips.net [127.0.0.1])
	by dl5rb.ham-radio-op.net (8.13.8/8.13.8) with ESMTP id l0BHBjup012808;
	Thu, 11 Jan 2007 17:11:45 GMT
Received: (from ralf@localhost)
	by denk.linux-mips.net (8.13.8/8.13.8/Submit) id l0BHBfdO012807;
	Thu, 11 Jan 2007 17:11:41 GMT
Date:	Thu, 11 Jan 2007 17:11:41 +0000
From:	Ralf Baechle <ralf@linux-mips.org>
To:	"Joseph S. Myers" <joseph@codesourcery.com>
Cc:	linux-mips@linux-mips.org
Subject: Re: [PATCH] Use compat_sys_pselect6
Message-ID: <20070111171138.GC23014@linux-mips.org>
References: <Pine.LNX.4.64.0701101228450.6217@digraph.polyomino.org.uk>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <Pine.LNX.4.64.0701101228450.6217@digraph.polyomino.org.uk>
User-Agent: Mutt/1.4.2.2i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13589
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips

On Wed, Jan 10, 2007 at 12:30:50PM +0000, Joseph S. Myers wrote:

> The N32 and O32 pselect6 syscalls need to use compat_sys_pselect6 to
> translate arguments from 32-bit to 64-bit layout.

Thanks, applied.

  Ralf

From yoichi_yuasa@tripeaks.co.jp Fri Jan 12 02:46:24 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 12 Jan 2007 02:46:30 +0000 (GMT)
Received: from mo30.po.2iij.net ([210.128.50.53]:39713 "EHLO mo30.po.2iij.net")
	by ftp.linux-mips.org with ESMTP id S20047294AbXALCqY (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Fri, 12 Jan 2007 02:46:24 +0000
Received: by mo.po.2iij.net (mo30) id l0C2kL4v054102; Fri, 12 Jan 2007 11:46:21 +0900 (JST)
Received: from localhost.localdomain (65.126.232.202.bf.2iij.net [202.232.126.65])
	by mbox.po.2iij.net (mbox33) id l0C2kImH092260
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT);
	Fri, 12 Jan 2007 11:46:19 +0900 (JST)
Date:	Fri, 12 Jan 2007 11:46:18 +0900
From:	Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
To:	Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc:	yoichi_yuasa@tripeaks.co.jp, ralf@linux-mips.org,
	linux-mips@linux-mips.org
Subject: Re: [PATCH] [MIPS] Fixed PCI resource fixup
Message-Id: <20070112114618.78d10a3d.yoichi_yuasa@tripeaks.co.jp>
In-Reply-To: <20070112.004531.132304408.anemo@mba.ocn.ne.jp>
References: <200701110555.l0B5twHe006668@mbox33.po.2iij.net>
	<20070111143116.GA4451@linux-mips.org>
	<20070111234747.7eed9028.yoichi_yuasa@tripeaks.co.jp>
	<20070112.004531.132304408.anemo@mba.ocn.ne.jp>
Organization: TriPeaks Corporation
X-Mailer: Sylpheed version 1.0.4 (GTK+ 1.2.10; i386-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Return-Path: <yoichi_yuasa@tripeaks.co.jp>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13590
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: yoichi_yuasa@tripeaks.co.jp
Precedence: bulk
X-list: linux-mips

On Fri, 12 Jan 2007 00:45:31 +0900 (JST)
Atsushi Nemoto <anemo@mba.ocn.ne.jp> wrote:

> On Thu, 11 Jan 2007 23:47:47 +0900, Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> wrote:
> > > <Ralf> I think he should have io_offset = 0.
> > 
> > When I tried io_offset = 0, tulip net driver didn't work.
> > 
> > > Which is what other GT-64120 platforms are using, so I wonder why that is
> > > different on Cobalt.
> > 
> > I don't know, but io_offset is needed for Cobalt.
> 
> If io_offset = 0, GT-64120 must be programmed to remap physicall
> address GT_DEF_PCI0_IO_BASE to PCI IO address 0.  Maybe other GT-64120
> users have such configuraion?

GT-64111(used for Cobalt) has no remap register.
It cannot be programmed to address remap.

Yoichi

From c.flame@gmail.com Fri Jan 12 08:01:58 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 12 Jan 2007 08:02:02 +0000 (GMT)
Received: from py-out-1112.google.com ([64.233.166.181]:16875 "EHLO
	py-out-1112.google.com") by ftp.linux-mips.org with ESMTP
	id S20040702AbXALIB6 (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Fri, 12 Jan 2007 08:01:58 +0000
Received: by py-out-1112.google.com with SMTP id u52so356439pyb
        for <linux-mips@linux-mips.org>; Fri, 12 Jan 2007 00:01:56 -0800 (PST)
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=beta;
        h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition;
        b=RAj2YPX06Tcu66Dh8q0quSRQzwwVKz2tY7uhHPD+6qmkAayiyOaIKPaSj8GFYnXKK96/xQU7he9uaEvlVjomivaPzlpSl88x2qZh8sLb1Na2bYu5QexCl8FHuD1c3jFYMjR+jTE1jxNhQBb5pz2iFBYddvuesw5FPXBVfaNLiLk=
Received: by 10.35.41.12 with SMTP id t12mr599909pyj.1168588916769;
        Fri, 12 Jan 2007 00:01:56 -0800 (PST)
Received: by 10.35.26.4 with HTTP; Fri, 12 Jan 2007 00:01:56 -0800 (PST)
Message-ID: <ee9e31d90701120001t31ab7d5et94865936679ef402@mail.gmail.com>
Date:	Fri, 12 Jan 2007 10:01:56 +0200
From:	"K '" <c.flame@gmail.com>
To:	linux-mips@linux-mips.org
Subject: Problem: Xfree cross-compiled for mips, It runs but screen is empty :(
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Return-Path: <c.flame@gmail.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13591
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: c.flame@gmail.com
Precedence: bulk
X-list: linux-mips

Dear members,

I have a problem with running XFree. I have cross-compiled XFree
version 4.3.0 for mips platform successfully. "make install" command
has created libraries under "/usr/X11R6/lib" and binaries under
"/usr/X11R6/bin". I also copied resultant Xfbdev from
"/build/programs/Xserver" to "usr/X11R6/bin". I set DISPLAY and
required paths with this small script:

#!/bin/sh
export PATH=$PATH:/usr/X11R6/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/X11R6/lib
export DISPLAY=127.0.0.1:0.0

Then I try to run Xfbdef with "Xfbdev &". It actually starts as a
process ("ps aux" shows that it has started), but somehow I cannot see
anything on the screen. I used many sample programs under
"/tmp/usr/X11R6/bin", such as xlogo, xload, xcalc, etc... All of them
runs, but I have nothing on the screen. For example, here is the
output of the xperf (After starting Xfbdev as deamon):

none) # x11perf -all
x11perf - X11 performance program, version 1.5
Keith Packard server version 600300 on 127.0.0.1:0.0
from (none)
Sat Jan  1 23:54:03 2005
Sync time adjustment is 0.8264 msecs.

7000000 reps @   0.0008 msec (1240000.0/sec): Dot
7000000 reps @   0.0008 msec (1240000.0/sec): Dot
7000000 reps @   0.0008 msec (1240000.0/sec): Dot
7000000 reps @   0.0008 msec (1240000.0/sec): Dot
7000000 reps @   0.0008 msec (1230000.0/sec): Dot
35000000 trep @   0.0008 msec (1240000.0/sec): Dot
.
.
.

and goes like that till it finished the performance test, but I see
nothing on the screen. Let me give another example, xcalc:


(none) # xcalc &
(none) # Warning: locale not supported by C library, locale unchanged
Warning: locale not supported by Xlib, locale set to C
Warning: X locale modifiers not supported, using default
Warning: Cannot convert string "8x13" to type FontStruct
Warning: Unable to load any usable fontset
Warning: Cannot convert string
"-adobe-symbol-*-*-*-*-*-120-*-*-*-*-*-*" to type FontStruct

I got some font warnings but I assume they are not important. When I
run "ps aux" afterwards, I see xclac is started:

root       939  0.0  1.6   4148   852 ttyS1    Ss   23:37   0:00 -/bin/sh -i
root       957 12.0  3.2   5864  1688 ttyS1    S    23:51   0:39 Xfbdev
root       998  3.3  3.8   8108  2000 ttyS1    S    23:56   0:00 xcalc
root      1001 10.0  1.8   3600   972 ttyS1    R+   23:56   0:00 ps aux


The screen is black empty. I am trying to get the display from a TFT
screen that is connected to my mips system with SCART (composite video
is used). What might be the problem? It seems a video mode problem,
but I could not find a solution. I am dealing with this problem for
weeks, please help me. "cat /proc/fb" gives:

(none) # cat /proc/fb
0 3rdparty X9812

Also, here are the shell outputs when I try to run Xfbdev:

(none) # Xfbdev &
(none) # Could not init font path element
/usr/X11R6/lib/X11/fonts/misc/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/75dpi/,
removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/100dpi/,
removing from list!

From anemo@mba.ocn.ne.jp Fri Jan 12 13:55:04 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 12 Jan 2007 13:55:10 +0000 (GMT)
Received: from mba.ocn.ne.jp ([210.190.142.172]:23489 "HELO smtp.mba.ocn.ne.jp")
	by ftp.linux-mips.org with SMTP id S20042476AbXALNzE (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Fri, 12 Jan 2007 13:55:04 +0000
Received: from localhost (p8091-ipad27funabasi.chiba.ocn.ne.jp [220.107.199.91])
	by smtp.mba.ocn.ne.jp (Postfix) with ESMTP
	id 04F14A8CE; Fri, 12 Jan 2007 22:55:00 +0900 (JST)
Date:	Fri, 12 Jan 2007 22:54:59 +0900 (JST)
Message-Id: <20070112.225459.106262484.anemo@mba.ocn.ne.jp>
To:	yoichi_yuasa@tripeaks.co.jp
Cc:	ralf@linux-mips.org, linux-mips@linux-mips.org
Subject: Re: [PATCH] [MIPS] Fixed PCI resource fixup
From:	Atsushi Nemoto <anemo@mba.ocn.ne.jp>
In-Reply-To: <20070112114618.78d10a3d.yoichi_yuasa@tripeaks.co.jp>
References: <20070111234747.7eed9028.yoichi_yuasa@tripeaks.co.jp>
	<20070112.004531.132304408.anemo@mba.ocn.ne.jp>
	<20070112114618.78d10a3d.yoichi_yuasa@tripeaks.co.jp>
X-Fingerprint: 6ACA 1623 39BD 9A94 9B1A  B746 CA77 FE94 2874 D52F
X-Pgp-Public-Key: http://wwwkeys.pgp.net/pks/lookup?op=get&search=0x2874D52F
X-Mailer: Mew version 3.3 on Emacs 21.4 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Return-Path: <anemo@mba.ocn.ne.jp>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13592
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: anemo@mba.ocn.ne.jp
Precedence: bulk
X-list: linux-mips

On Fri, 12 Jan 2007 11:46:18 +0900, Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> wrote:
> > If io_offset = 0, GT-64120 must be programmed to remap physicall
> > address GT_DEF_PCI0_IO_BASE to PCI IO address 0.  Maybe other GT-64120
> > users have such configuraion?
> 
> GT-64111(used for Cobalt) has no remap register.
> It cannot be programmed to address remap.

Then, inb(0) converted to physical address 0x10000000
(GT_DEF_PCI0_IO_BASE), and on PCI bus it is PCI IO address 0? or
0x10000000?

If PCI IO address was 0, io_offset should be 0.  Otherwise, io_offset
should be -0x10000000, as current code does.

So if it does not work now, something's going wrong... but I have no
idea now.

---
Atsushi Nemoto

From phorton@bitbox.co.uk Fri Jan 12 14:16:44 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 12 Jan 2007 14:16:49 +0000 (GMT)
Received: from no-dns-yet.demon.co.uk ([80.176.203.50]:62648 "EHLO
	pangolin.localnet") by ftp.linux-mips.org with ESMTP
	id S28574873AbXALOQo (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Fri, 12 Jan 2007 14:16:44 +0000
Received: from [192.168.1.21] (hylobates.localnet [192.168.1.21])
	by pangolin.localnet (Postfix) with ESMTP id B50FD1476D9;
	Fri, 12 Jan 2007 14:16:26 +0000 (GMT)
Message-ID: <45A79847.1060302@bitbox.co.uk>
Date:	Fri, 12 Jan 2007 14:16:39 +0000
From:	Peter Horton <phorton@bitbox.co.uk>
User-Agent: Thunderbird 1.5.0.9 (Windows/20061207)
MIME-Version: 1.0
To:	Ralf Baechle <ralf@linux-mips.org>
Cc:	Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>,
	linux-mips <linux-mips@linux-mips.org>
Subject: Re: [PATCH] [MIPS] Fixed PCI resource fixup
References: <200701110555.l0B5twHe006668@mbox33.po.2iij.net> <20070111143116.GA4451@linux-mips.org>
In-Reply-To: <20070111143116.GA4451@linux-mips.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Return-Path: <phorton@bitbox.co.uk>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13593
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: phorton@bitbox.co.uk
Precedence: bulk
X-list: linux-mips

Ralf Baechle wrote:
> On Thu, Jan 11, 2007 at 02:55:58PM +0900, Yoichi Yuasa wrote:
> 
>> This patch has fixed IDE resources problem about Cobalt.
>>
>> pcibios_fixup_device_resources() changes non-movable resources.
>> It cannot be changed if there is IORESOURCE_PCI_FIXED in the resource flags. 
> 
> <Ralf> anemo: Have you seen Yoichi's patch?
> <anemo> Ralf: yes, but I could not see why ...  My impression is IORESOURCE_PCI_FIXED and io_offset adjustment is irrerevant.
> <Ralf> This whole fixup thing is really meant to handle machines where there is an offset between PCI bus addresses and CPU physical addresses.
> <Ralf> And that exists regardless of IORESOURCE_PCI_FIXED
> <anemo> I thought so too.  So I can not see why youichi's patch fix something.
> <Ralf> This may be the explanation:
> <Ralf> static struct pci_controller cobalt_pci_controller = {
> <Ralf>         .pci_ops        = &gt64111_pci_ops,
> <Ralf>         .mem_resource   = &cobalt_mem_resource,
> <Ralf>         .mem_offset     = 0,
> <Ralf>         .io_resource    = &cobalt_io_resource,
> <Ralf>         .io_offset      = 0 - GT_DEF_PCI0_IO_BASE,
> <Ralf> };
> <Ralf> I think he should have io_offset = 0.
> 
> Which is what other GT-64120 platforms are using, so I wonder why that is
> different on Cobalt.
> 

The GT-64111 passes the CPU addresses straight onto the PCI bus and does 
not remove the offset of the Galileo's PCI window in CPU space. This 
means the only PCI I/O addresses that can be supported are 0x1000.0000 
to 0x11ff.ffff, hence the negative 'io_offset'.

I assume the GT-64120 remaps the PCI addresses somehow to remove the offset.

P.

From alan@lxorguk.ukuu.org.uk Fri Jan 12 14:29:29 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 12 Jan 2007 14:29:33 +0000 (GMT)
Received: from outpipe-village-512-1.bc.nu ([81.2.110.250]:12495 "EHLO
	lxorguk.ukuu.org.uk") by ftp.linux-mips.org with ESMTP
	id S28575042AbXALO33 (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Fri, 12 Jan 2007 14:29:29 +0000
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by lxorguk.ukuu.org.uk (8.13.8/8.13.4) with ESMTP id l0CEeg6d030870;
	Fri, 12 Jan 2007 14:40:43 GMT
Date:	Fri, 12 Jan 2007 14:40:42 +0000
From:	Alan <alan@lxorguk.ukuu.org.uk>
To:	Peter Horton <phorton@bitbox.co.uk>
Cc:	Ralf Baechle <ralf@linux-mips.org>,
	Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>,
	linux-mips <linux-mips@linux-mips.org>
Subject: Re: [PATCH] [MIPS] Fixed PCI resource fixup
Message-ID: <20070112144042.74c4edca@localhost.localdomain>
In-Reply-To: <45A79847.1060302@bitbox.co.uk>
References: <200701110555.l0B5twHe006668@mbox33.po.2iij.net>
	<20070111143116.GA4451@linux-mips.org>
	<45A79847.1060302@bitbox.co.uk>
X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.10.4; x86_64-redhat-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Return-Path: <alan@lxorguk.ukuu.org.uk>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13594
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: alan@lxorguk.ukuu.org.uk
Precedence: bulk
X-list: linux-mips

On Fri, 12 Jan 2007 14:16:39 +0000
Peter Horton <phorton@bitbox.co.uk> wrote:

> Ralf Baechle wrote:
> > On Thu, Jan 11, 2007 at 02:55:58PM +0900, Yoichi Yuasa wrote:
> > 
> >> This patch has fixed IDE resources problem about Cobalt.
> >>
> >> pcibios_fixup_device_resources() changes non-movable resources.
> >> It cannot be changed if there is IORESOURCE_PCI_FIXED in the resource flags. 
> > 
> > <Ralf> anemo: Have you seen Yoichi's patch?
> > <anemo> Ralf: yes, but I could not see why ...  My impression is IORESOURCE_PCI_FIXED and io_offset adjustment is irrerevant.
> > <Ralf> This whole fixup thing is really meant to handle machines where there is an offset between PCI bus addresses and CPU physical addresses.
> > <Ralf> And that exists regardless of IORESOURCE_PCI_FIXED
> > <anemo> I thought so too.  So I can not see why youichi's patch fix something.
> > <Ralf> This may be the explanation:
> > <Ralf> static struct pci_controller cobalt_pci_controller = {
> > <Ralf>         .pci_ops        = &gt64111_pci_ops,
> > <Ralf>         .mem_resource   = &cobalt_mem_resource,
> > <Ralf>         .mem_offset     = 0,
> > <Ralf>         .io_resource    = &cobalt_io_resource,
> > <Ralf>         .io_offset      = 0 - GT_DEF_PCI0_IO_BASE,
> > <Ralf> };
> > <Ralf> I think he should have io_offset = 0.
> > 
> > Which is what other GT-64120 platforms are using, so I wonder why that is
> > different on Cobalt.
> > 
> 
> The GT-64111 passes the CPU addresses straight onto the PCI bus and does 
> not remove the offset of the Galileo's PCI window in CPU space. This 
> means the only PCI I/O addresses that can be supported are 0x1000.0000 
> to 0x11ff.ffff, hence the negative 'io_offset'.
> 
> I assume the GT-64120 remaps the PCI addresses somehow to remove the offset.
> 
> P.


-- 
--
Sick of rip off UK rail fares ? Learn how to get far cheaper fares
		http://zeniv.linux.org.uk/~alan/GTR/

From alan@lxorguk.ukuu.org.uk Fri Jan 12 14:37:46 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 12 Jan 2007 14:37:51 +0000 (GMT)
Received: from outpipe-village-512-1.bc.nu ([81.2.110.250]:5598 "EHLO
	lxorguk.ukuu.org.uk") by ftp.linux-mips.org with ESMTP
	id S28575218AbXALOhq (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Fri, 12 Jan 2007 14:37:46 +0000
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by lxorguk.ukuu.org.uk (8.13.8/8.13.4) with ESMTP id l0CEn5b1030930;
	Fri, 12 Jan 2007 14:49:05 GMT
Date:	Fri, 12 Jan 2007 14:49:05 +0000
From:	Alan <alan@lxorguk.ukuu.org.uk>
To:	Alan <alan@lxorguk.ukuu.org.uk>
Cc:	Peter Horton <phorton@bitbox.co.uk>,
	Ralf Baechle <ralf@linux-mips.org>,
	Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>,
	linux-mips <linux-mips@linux-mips.org>
Subject: Re: [PATCH] [MIPS] Fixed PCI resource fixup
Message-ID: <20070112144905.2919e705@localhost.localdomain>
In-Reply-To: <20070112144042.74c4edca@localhost.localdomain>
References: <200701110555.l0B5twHe006668@mbox33.po.2iij.net>
	<20070111143116.GA4451@linux-mips.org>
	<45A79847.1060302@bitbox.co.uk>
	<20070112144042.74c4edca@localhost.localdomain>
X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.10.4; x86_64-redhat-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Return-Path: <alan@lxorguk.ukuu.org.uk>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13595
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: alan@lxorguk.ukuu.org.uk
Precedence: bulk
X-list: linux-mips

On Fri, 12 Jan 2007 14:40:42 +0000
Alan <alan@lxorguk.ukuu.org.uk> wrote:

Sorry hit the wrong button

> > The GT-64111 passes the CPU addresses straight onto the PCI bus and does 
> > not remove the offset of the Galileo's PCI window in CPU space. This 
> > means the only PCI I/O addresses that can be supported are 0x1000.0000 
> > to 0x11ff.ffff, hence the negative 'io_offset'.

Does this mean it can't hit PCI I/O space legacy addresses (0x1F0 etc) ?

If so can you set CONFIG_NO_ATA_LEGACY in your platform configuration

From yoichi_yuasa@tripeaks.co.jp Sat Jan 13 15:21:10 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Sat, 13 Jan 2007 15:21:16 +0000 (GMT)
Received: from mo30.po.2iij.net ([210.128.50.53]:12850 "EHLO mo30.po.2iij.net")
	by ftp.linux-mips.org with ESMTP id S28573718AbXAMPVK (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Sat, 13 Jan 2007 15:21:10 +0000
Received: by mo.po.2iij.net (mo30) id l0DFL6X3067800; Sun, 14 Jan 2007 00:21:06 +0900 (JST)
Received: from localhost.localdomain (69.25.30.125.dy.iij4u.or.jp [125.30.25.69])
	by mbox.po.2iij.net (mbox30) id l0DFKxUY094872
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT);
	Sun, 14 Jan 2007 00:21:00 +0900 (JST)
Date:	Sun, 14 Jan 2007 00:20:59 +0900
From:	Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
To:	Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc:	yoichi_yuasa@tripeaks.co.jp, ralf@linux-mips.org,
	linux-mips@linux-mips.org
Subject: Re: [PATCH] [MIPS] Fixed PCI resource fixup
Message-Id: <20070114002059.56fc29db.yoichi_yuasa@tripeaks.co.jp>
In-Reply-To: <20070112.225459.106262484.anemo@mba.ocn.ne.jp>
References: <20070111234747.7eed9028.yoichi_yuasa@tripeaks.co.jp>
	<20070112.004531.132304408.anemo@mba.ocn.ne.jp>
	<20070112114618.78d10a3d.yoichi_yuasa@tripeaks.co.jp>
	<20070112.225459.106262484.anemo@mba.ocn.ne.jp>
Organization: TriPeaks Corporation
X-Mailer: Sylpheed version 1.0.6 (GTK+ 1.2.10; i486-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Return-Path: <yoichi_yuasa@tripeaks.co.jp>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13596
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: yoichi_yuasa@tripeaks.co.jp
Precedence: bulk
X-list: linux-mips

On Fri, 12 Jan 2007 22:54:59 +0900 (JST)
Atsushi Nemoto <anemo@mba.ocn.ne.jp> wrote:

> On Fri, 12 Jan 2007 11:46:18 +0900, Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> wrote:
> > > If io_offset = 0, GT-64120 must be programmed to remap physicall
> > > address GT_DEF_PCI0_IO_BASE to PCI IO address 0.  Maybe other GT-64120
> > > users have such configuraion?
> > 
> > GT-64111(used for Cobalt) has no remap register.
> > It cannot be programmed to address remap.
> 
> Then, inb(0) converted to physical address 0x10000000
> (GT_DEF_PCI0_IO_BASE), and on PCI bus it is PCI IO address 0? or
> 0x10000000?

When PCI base address register set 0x1000(I/O space), inb(0x1000) reads wrong value
(tulip net driver reads wrong eeprom data).

When PCI base address register set 0x10001000(I/O space), inb(0x1000) reads valid value.
PCI I/O address and CPU bus address seem to have to be same.

> 
> If PCI IO address was 0, io_offset should be 0.  Otherwise, io_offset
> should be -0x10000000, as current code does.

Based on the above result, io_offset should be -0x10000000.

> So if it does not work now, something's going wrong... but I have no
> idea now.

Yoichi

From anemo@mba.ocn.ne.jp Sun Jan 14 14:41:49 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Sun, 14 Jan 2007 14:41:55 +0000 (GMT)
Received: from mba.ocn.ne.jp ([210.190.142.172]:21975 "HELO smtp.mba.ocn.ne.jp")
	by ftp.linux-mips.org with SMTP id S20050755AbXANOlt (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Sun, 14 Jan 2007 14:41:49 +0000
Received: from localhost (p1114-ipad202funabasi.chiba.ocn.ne.jp [222.146.72.114])
	by smtp.mba.ocn.ne.jp (Postfix) with ESMTP
	id 8644DA8FC; Sun, 14 Jan 2007 23:41:42 +0900 (JST)
Date:	Sun, 14 Jan 2007 23:41:42 +0900 (JST)
Message-Id: <20070114.234142.41198466.anemo@mba.ocn.ne.jp>
To:	linux-mips@linux-mips.org
Cc:	ralf@linux-mips.org
Subject: [PATCH] Make I8259A_IRQ_BASE customizable
From:	Atsushi Nemoto <anemo@mba.ocn.ne.jp>
X-Fingerprint: 6ACA 1623 39BD 9A94 9B1A  B746 CA77 FE94 2874 D52F
X-Pgp-Public-Key: http://wwwkeys.pgp.net/pks/lookup?op=get&search=0x2874D52F
X-Mailer: Mew version 3.3 on Emacs 21.4 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Return-Path: <anemo@mba.ocn.ne.jp>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13597
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: anemo@mba.ocn.ne.jp
Precedence: bulk
X-list: linux-mips

Move I8259A_IRQ_BASE from asm/i8259.h to asm/mach-generic/irq.h and
make it really customizable.  And remove I8259_IRQ_BASE declared on
some platforms.  Currently only NEC_CMBVR4133 is using custom
I8259A_IRQ_BASE value.

Testing this patch on those platforms is greatly appreciated.  Thank
you.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
---
This patch depends on "Define MIPS_CPU_IRQ_BASE in generic header"
patch which is in linux-queue tree.

 arch/mips/ddb5xxx/ddb5477/irq.c      |    5 +-
 arch/mips/kernel/i8259.c             |   20 +++++++---
 arch/mips/pci/fixup-vr4133.c         |   13 +-----
 arch/mips/vr41xx/nec-cmbvr4133/irq.c |   53 +--------------------------
 include/asm-mips/ddb5xxx/ddb5477.h   |   36 ++++++++----------
 include/asm-mips/i8259.h             |    3 -
 include/asm-mips/irq.h               |    2 -
 include/asm-mips/mach-generic/irq.h  |    6 +++
 include/asm-mips/mach-vr41xx/irq.h   |    3 +
 include/asm-mips/vr41xx/cmbvr4133.h  |    5 +-
 10 files changed, 49 insertions(+), 97 deletions(-)

diff --git a/arch/mips/ddb5xxx/ddb5477/irq.c b/arch/mips/ddb5xxx/ddb5477/irq.c
index bd7cd7c..2b23234 100644
--- a/arch/mips/ddb5xxx/ddb5477/irq.c
+++ b/arch/mips/ddb5xxx/ddb5477/irq.c
@@ -146,8 +146,7 @@ u8 i8259_interrupt_ack(void)
 	irq = *(volatile u8 *) KSEG1ADDR(DDB_PCI_IACK_BASE);
 	ddb_out32(DDB_PCIINIT10, reg);
 
-	/* i8259.c set the base vector to be 0x0 */
-	return irq + I8259_IRQ_BASE;
+	return irq;
 }
 /*
  * the first level int-handler will jump here if it is a vrc5477 irq
@@ -177,7 +176,7 @@ static void vrc5477_irq_dispatch(void)
 		/* check for i8259 interrupts */
 		if (intStatus & (1 << VRC5477_I8259_CASCADE)) {
 			int i8259_irq = i8259_interrupt_ack();
-			do_IRQ(I8259_IRQ_BASE + i8259_irq);
+			do_IRQ(i8259_irq);
 			return;
 		}
 	}
diff --git a/arch/mips/kernel/i8259.c b/arch/mips/kernel/i8259.c
index b59a676..91de422 100644
--- a/arch/mips/kernel/i8259.c
+++ b/arch/mips/kernel/i8259.c
@@ -54,9 +54,11 @@ static unsigned int cached_irq_mask = 0x
 
 void disable_8259A_irq(unsigned int irq)
 {
-	unsigned int mask = 1 << irq;
+	unsigned int mask;
 	unsigned long flags;
 
+	irq -= I8259A_IRQ_BASE;
+	mask = 1 << irq;
 	spin_lock_irqsave(&i8259A_lock, flags);
 	cached_irq_mask |= mask;
 	if (irq & 8)
@@ -68,9 +70,11 @@ void disable_8259A_irq(unsigned int irq)
 
 void enable_8259A_irq(unsigned int irq)
 {
-	unsigned int mask = ~(1 << irq);
+	unsigned int mask;
 	unsigned long flags;
 
+	irq -= I8259A_IRQ_BASE;
+	mask = ~(1 << irq);
 	spin_lock_irqsave(&i8259A_lock, flags);
 	cached_irq_mask &= mask;
 	if (irq & 8)
@@ -82,10 +86,12 @@ void enable_8259A_irq(unsigned int irq)
 
 int i8259A_irq_pending(unsigned int irq)
 {
-	unsigned int mask = 1 << irq;
+	unsigned int mask;
 	unsigned long flags;
 	int ret;
 
+	irq -= I8259A_IRQ_BASE;
+	mask = 1 << irq;
 	spin_lock_irqsave(&i8259A_lock, flags);
 	if (irq < 8)
 		ret = inb(PIC_MASTER_CMD) & mask;
@@ -134,9 +140,11 @@ static inline int i8259A_irq_real(unsign
  */
 void mask_and_ack_8259A(unsigned int irq)
 {
-	unsigned int irqmask = 1 << irq;
+	unsigned int irqmask;
 	unsigned long flags;
 
+	irq -= I8259A_IRQ_BASE;
+	irqmask = 1 << irq;
 	spin_lock_irqsave(&i8259A_lock, flags);
 	/*
 	 * Lightweight spurious IRQ detection. We do not want
@@ -322,8 +330,8 @@ void __init init_i8259_irqs (void)
 
 	init_8259A(0);
 
-	for (i = 0; i < 16; i++)
+	for (i = I8259A_IRQ_BASE; i < I8259A_IRQ_BASE + 16; i++)
 		set_irq_chip_and_handler(i, &i8259A_chip, handle_level_irq);
 
-	setup_irq(PIC_CASCADE_IR, &irq2);
+	setup_irq(I8259A_IRQ_BASE + PIC_CASCADE_IR, &irq2);
 }
diff --git a/arch/mips/pci/fixup-vr4133.c b/arch/mips/pci/fixup-vr4133.c
index 597b897..b1a5b31 100644
--- a/arch/mips/pci/fixup-vr4133.c
+++ b/arch/mips/pci/fixup-vr4133.c
@@ -19,6 +19,7 @@
 #include <linux/pci.h>
 
 #include <asm/io.h>
+#include <asm/i8259.h>
 #include <asm/vr41xx/cmbvr4133.h>
 
 extern int vr4133_rockhopper;
@@ -160,17 +161,7 @@ int rockhopper_get_irq(struct pci_dev *d
 #ifdef CONFIG_ROCKHOPPER
 void i8259_init(void)
 {
-	outb(0x11, 0x20);		/* Master ICW1 */
-	outb(I8259_IRQ_BASE, 0x21);	/* Master ICW2 */
-	outb(0x04, 0x21);		/* Master ICW3 */
-	outb(0x01, 0x21);		/* Master ICW4 */
-	outb(0xff, 0x21);		/* Master IMW */
-
-	outb(0x11, 0xa0);		/* Slave ICW1 */
-	outb(I8259_IRQ_BASE + 8, 0xa1);	/* Slave ICW2 */
-	outb(0x02, 0xa1);		/* Slave ICW3 */
-	outb(0x01, 0xa1);		/* Slave ICW4 */
-	outb(0xff, 0xa1);		/* Slave IMW */
+	init_i8259_irqs();
 
 	outb(0x00, 0x4d0);
 	outb(0x02, 0x4d1);	/* USB IRQ9 is level */
diff --git a/arch/mips/vr41xx/nec-cmbvr4133/irq.c b/arch/mips/vr41xx/nec-cmbvr4133/irq.c
index 128ed8d..7d2d076 100644
--- a/arch/mips/vr41xx/nec-cmbvr4133/irq.c
+++ b/arch/mips/vr41xx/nec-cmbvr4133/irq.c
@@ -21,60 +21,16 @@
 #include <linux/interrupt.h>
 
 #include <asm/io.h>
+#include <asm/i8259.h>
 #include <asm/vr41xx/cmbvr4133.h>
 
-extern void enable_8259A_irq(unsigned int irq);
-extern void disable_8259A_irq(unsigned int irq);
-extern void mask_and_ack_8259A(unsigned int irq);
-extern void init_8259A(int hoge);
-
 extern int vr4133_rockhopper;
 
-static void enable_i8259_irq(unsigned int irq)
-{
-	enable_8259A_irq(irq - I8259_IRQ_BASE);
-}
-
-static void disable_i8259_irq(unsigned int irq)
-{
-	disable_8259A_irq(irq - I8259_IRQ_BASE);
-}
-
-static void ack_i8259_irq(unsigned int irq)
-{
-	mask_and_ack_8259A(irq - I8259_IRQ_BASE);
-}
-
-static struct irq_chip i8259_irq_type = {
-	.typename       = "XT-PIC",
-	.ack            = ack_i8259_irq,
-	.mask		= disable_i8259_irq,
-	.mask_ack	= ack_i8259_irq,
-	.unmask		= enable_i8259_irq,
-};
-
 static int i8259_get_irq_number(int irq)
 {
-	unsigned long isr;
-
-	isr = inb(0x20);
-	irq = ffz(~isr);
-	if (irq == 2) {
-		isr = inb(0xa0);
-		irq = 8 + ffz(~isr);
-	}
-
-	if (irq < 0 || irq > 15)
-		return -EINVAL;
-
-	return I8259_IRQ_BASE + irq;
+	return i8259_irq();
 }
 
-static struct irqaction i8259_slave_cascade = {
-	.handler        = &no_action,
-	.name           = "cascade",
-};
-
 void __init rockhopper_init_irq(void)
 {
 	int i;
@@ -84,11 +40,6 @@ void __init rockhopper_init_irq(void)
 		return;
 	}
 
-	for (i = I8259_IRQ_BASE; i <= I8259_IRQ_LAST; i++)
-		set_irq_chip_and_handler(i, &i8259_irq_type, handle_level_irq);
-
-	setup_irq(I8259_SLAVE_IRQ, &i8259_slave_cascade);
-
 	vr41xx_set_irq_trigger(CMBVR41XX_INTC_PIN, TRIGGER_LEVEL, SIGNAL_THROUGH);
 	vr41xx_set_irq_level(CMBVR41XX_INTC_PIN, LEVEL_HIGH);
 	vr41xx_cascade_irq(CMBVR41XX_INTC_IRQ, i8259_get_irq_number);
diff --git a/include/asm-mips/ddb5xxx/ddb5477.h b/include/asm-mips/ddb5xxx/ddb5477.h
index 27655db..6cf177c 100644
--- a/include/asm-mips/ddb5xxx/ddb5477.h
+++ b/include/asm-mips/ddb5xxx/ddb5477.h
@@ -252,12 +252,8 @@ extern void ll_vrc5477_irq_disable(int v
  */
 
 #define	NUM_CPU_IRQ		8
-#define	NUM_I8259_IRQ		16
 #define	NUM_VRC5477_IRQ		32
 
-#define	DDB_IRQ_BASE		0
-
-#define	I8259_IRQ_BASE		DDB_IRQ_BASE
 #define	CPU_IRQ_BASE		MIPS_CPU_IRQ_BASE
 #define	VRC5477_IRQ_BASE	(CPU_IRQ_BASE + NUM_CPU_IRQ)
 
@@ -301,22 +297,22 @@ extern void ll_vrc5477_irq_disable(int v
 /*
  * i2859 irq assignment
  */
-#define I8259_IRQ_RESERVED_0	(0 + I8259_IRQ_BASE)
-#define I8259_IRQ_KEYBOARD	(1 + I8259_IRQ_BASE)	/* M1543 default */
-#define I8259_IRQ_CASCADE	(2 + I8259_IRQ_BASE)
-#define I8259_IRQ_UART_B	(3 + I8259_IRQ_BASE)	/* M1543 default, may conflict with RTC according to schematic diagram  */
-#define I8259_IRQ_UART_A	(4 + I8259_IRQ_BASE)	/* M1543 default */
-#define I8259_IRQ_PARALLEL	(5 + I8259_IRQ_BASE)	/* M1543 default */
-#define I8259_IRQ_RESERVED_6	(6 + I8259_IRQ_BASE)
-#define I8259_IRQ_RESERVED_7	(7 + I8259_IRQ_BASE)
-#define I8259_IRQ_RTC		(8 + I8259_IRQ_BASE)	/* who set this? */
-#define I8259_IRQ_USB		(9 + I8259_IRQ_BASE)	/* ddb_setup */
-#define I8259_IRQ_PMU		(10 + I8259_IRQ_BASE)	/* ddb_setup */
-#define I8259_IRQ_RESERVED_11	(11 + I8259_IRQ_BASE)
-#define I8259_IRQ_RESERVED_12	(12 + I8259_IRQ_BASE)	/* m1543_irq_setup */
-#define I8259_IRQ_RESERVED_13	(13 + I8259_IRQ_BASE)
-#define I8259_IRQ_HDC1		(14 + I8259_IRQ_BASE)	/* default and ddb_setup */
-#define I8259_IRQ_HDC2		(15 + I8259_IRQ_BASE)	/* default */
+#define I8259_IRQ_RESERVED_0	(0 + I8259A_IRQ_BASE)
+#define I8259_IRQ_KEYBOARD	(1 + I8259A_IRQ_BASE)	/* M1543 default */
+#define I8259_IRQ_CASCADE	(2 + I8259A_IRQ_BASE)
+#define I8259_IRQ_UART_B	(3 + I8259A_IRQ_BASE)	/* M1543 default, may conflict with RTC according to schematic diagram  */
+#define I8259_IRQ_UART_A	(4 + I8259A_IRQ_BASE)	/* M1543 default */
+#define I8259_IRQ_PARALLEL	(5 + I8259A_IRQ_BASE)	/* M1543 default */
+#define I8259_IRQ_RESERVED_6	(6 + I8259A_IRQ_BASE)
+#define I8259_IRQ_RESERVED_7	(7 + I8259A_IRQ_BASE)
+#define I8259_IRQ_RTC		(8 + I8259A_IRQ_BASE)	/* who set this? */
+#define I8259_IRQ_USB		(9 + I8259A_IRQ_BASE)	/* ddb_setup */
+#define I8259_IRQ_PMU		(10 + I8259A_IRQ_BASE)	/* ddb_setup */
+#define I8259_IRQ_RESERVED_11	(11 + I8259A_IRQ_BASE)
+#define I8259_IRQ_RESERVED_12	(12 + I8259A_IRQ_BASE)	/* m1543_irq_setup */
+#define I8259_IRQ_RESERVED_13	(13 + I8259A_IRQ_BASE)
+#define I8259_IRQ_HDC1		(14 + I8259A_IRQ_BASE)	/* default and ddb_setup */
+#define I8259_IRQ_HDC2		(15 + I8259A_IRQ_BASE)	/* default */
 
 
 /*
diff --git a/include/asm-mips/i8259.h b/include/asm-mips/i8259.h
index 4df8d8b..e88a016 100644
--- a/include/asm-mips/i8259.h
+++ b/include/asm-mips/i8259.h
@@ -18,6 +18,7 @@
 #include <linux/spinlock.h>
 
 #include <asm/io.h>
+#include <irq.h>
 
 /* i8259A PIC registers */
 #define PIC_MASTER_CMD		0x20
@@ -42,8 +43,6 @@ extern void disable_8259A_irq(unsigned i
 
 extern void init_i8259_irqs(void);
 
-#define I8259A_IRQ_BASE	0
-
 /*
  * Do the traditional i8259 interrupt polling thing.  This is for the few
  * cases where no better interrupt acknowledge method is available and we
diff --git a/include/asm-mips/irq.h b/include/asm-mips/irq.h
index 386da82..91803ba 100644
--- a/include/asm-mips/irq.h
+++ b/include/asm-mips/irq.h
@@ -18,7 +18,7 @@
 #ifdef CONFIG_I8259
 static inline int irq_canonicalize(int irq)
 {
-	return ((irq == 2) ? 9 : irq);
+	return ((irq == I8259A_IRQ_BASE + 2) ? I8259A_IRQ_BASE + 9 : irq);
 }
 #else
 #define irq_canonicalize(irq) (irq)	/* Sane hardware, sane code ... */
diff --git a/include/asm-mips/mach-generic/irq.h b/include/asm-mips/mach-generic/irq.h
index 91e6778..70d9a25 100644
--- a/include/asm-mips/mach-generic/irq.h
+++ b/include/asm-mips/mach-generic/irq.h
@@ -12,6 +12,12 @@
 #define NR_IRQS	128
 #endif
 
+#ifdef CONFIG_I8259
+#ifndef I8259A_IRQ_BASE
+#define I8259A_IRQ_BASE	0
+#endif
+#endif
+
 #ifdef CONFIG_IRQ_CPU
 
 #ifndef MIPS_CPU_IRQ_BASE
diff --git a/include/asm-mips/mach-vr41xx/irq.h b/include/asm-mips/mach-vr41xx/irq.h
index 862058d..8488122 100644
--- a/include/asm-mips/mach-vr41xx/irq.h
+++ b/include/asm-mips/mach-vr41xx/irq.h
@@ -2,6 +2,9 @@
 #define __ASM_MACH_VR41XX_IRQ_H
 
 #include <asm/vr41xx/irq.h> /* for MIPS_CPU_IRQ_BASE */
+#ifdef CONFIG_NEC_CMBVR4133
+#include <asm/vr41xx/cmbvr4133.h> /* for I8259A_IRQ_BASE */
+#endif
 
 #include_next <irq.h>
 
diff --git a/include/asm-mips/vr41xx/cmbvr4133.h b/include/asm-mips/vr41xx/cmbvr4133.h
index 9490ade..4230003 100644
--- a/include/asm-mips/vr41xx/cmbvr4133.h
+++ b/include/asm-mips/vr41xx/cmbvr4133.h
@@ -35,8 +35,8 @@
 #define CMBVR41XX_INTD_IRQ		GIU_IRQ(CMBVR41XX_INTD_PIN)
 #define CMBVR41XX_INTE_IRQ		GIU_IRQ(CMBVR41XX_INTE_PIN)
 
-#define I8259_IRQ_BASE			72
-#define I8259_IRQ(x)			(I8259_IRQ_BASE + (x))
+#define I8259A_IRQ_BASE			72
+#define I8259_IRQ(x)			(I8259A_IRQ_BASE + (x))
 #define TIMER_IRQ			I8259_IRQ(0)
 #define KEYBOARD_IRQ			I8259_IRQ(1)
 #define I8259_SLAVE_IRQ			I8259_IRQ(2)
@@ -52,6 +52,5 @@
 #define AUX_IRQ				I8259_IRQ(12)
 #define IDE_PRIMARY_IRQ			I8259_IRQ(14)
 #define IDE_SECONDARY_IRQ		I8259_IRQ(15)
-#define I8259_IRQ_LAST			IDE_SECONDARY_IRQ
 
 #endif /* __NEC_CMBVR4133_H */

From anemo@mba.ocn.ne.jp Sun Jan 14 15:07:31 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Sun, 14 Jan 2007 15:07:37 +0000 (GMT)
Received: from mba.ocn.ne.jp ([210.190.142.172]:30152 "HELO smtp.mba.ocn.ne.jp")
	by ftp.linux-mips.org with SMTP id S20050789AbXANPHb (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Sun, 14 Jan 2007 15:07:31 +0000
Received: from localhost (p1114-ipad202funabasi.chiba.ocn.ne.jp [222.146.72.114])
	by smtp.mba.ocn.ne.jp (Postfix) with ESMTP
	id 08AA19CC7; Mon, 15 Jan 2007 00:07:26 +0900 (JST)
Date:	Mon, 15 Jan 2007 00:07:25 +0900 (JST)
Message-Id: <20070115.000725.92586142.anemo@mba.ocn.ne.jp>
To:	linux-mips@linux-mips.org
Cc:	ralf@linux-mips.org
Subject: [PATCH] use name instead of typename for each irq_chip
From:	Atsushi Nemoto <anemo@mba.ocn.ne.jp>
X-Fingerprint: 6ACA 1623 39BD 9A94 9B1A  B746 CA77 FE94 2874 D52F
X-Pgp-Public-Key: http://wwwkeys.pgp.net/pks/lookup?op=get&search=0x2874D52F
X-Mailer: Mew version 3.3 on Emacs 21.4 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Return-Path: <anemo@mba.ocn.ne.jp>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13598
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: anemo@mba.ocn.ne.jp
Precedence: bulk
X-list: linux-mips

The "typename" field was obsoleted by the "name" field.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
---
 arch/mips/au1000/common/irq.c                            |    8 ++++----
 arch/mips/ddb5xxx/ddb5477/irq_5477.c                     |    2 +-
 arch/mips/dec/ioasic-irq.c                               |    4 ++--
 arch/mips/dec/kn02-irq.c                                 |    2 +-
 arch/mips/emma2rh/common/irq_emma2rh.c                   |    2 +-
 arch/mips/emma2rh/markeins/irq_markeins.c                |    4 ++--
 arch/mips/gt64120/ev64120/irq.c                          |    2 +-
 arch/mips/jazz/irq.c                                     |    2 +-
 arch/mips/jmr3927/rbhma3100/irq.c                        |    2 +-
 arch/mips/kernel/irq-msc01.c                             |    4 ++--
 arch/mips/kernel/irq-mv6434x.c                           |    2 +-
 arch/mips/kernel/irq-rm7000.c                            |    2 +-
 arch/mips/kernel/irq-rm9000.c                            |    4 ++--
 arch/mips/kernel/irq_cpu.c                               |    4 ++--
 arch/mips/lasat/interrupt.c                              |    2 +-
 arch/mips/mips-boards/atlas/atlas_int.c                  |    2 +-
 arch/mips/momentum/ocelot_c/cpci-irq.c                   |    2 +-
 arch/mips/momentum/ocelot_c/uart-irq.c                   |    2 +-
 arch/mips/philips/pnx8550/common/int.c                   |    2 +-
 arch/mips/sgi-ip22/ip22-eisa.c                           |    4 ++--
 arch/mips/sgi-ip22/ip22-int.c                            |    8 ++++----
 arch/mips/sgi-ip27/ip27-irq.c                            |    2 +-
 arch/mips/sgi-ip27/ip27-timer.c                          |    2 +-
 arch/mips/sgi-ip32/ip32-irq.c                            |   10 +++++-----
 arch/mips/sibyte/bcm1480/irq.c                           |    2 +-
 arch/mips/sibyte/sb1250/irq.c                            |    2 +-
 arch/mips/sni/irq.c                                      |    2 +-
 arch/mips/tx4927/common/tx4927_irq.c                     |    4 ++--
 arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c |   12 ++++++------
 arch/mips/tx4938/common/irq.c                            |    4 ++--
 arch/mips/tx4938/toshiba_rbtx4938/irq.c                  |    2 +-
 arch/mips/vr41xx/common/icu.c                            |    4 ++--
 32 files changed, 56 insertions(+), 56 deletions(-)

diff --git a/arch/mips/au1000/common/irq.c b/arch/mips/au1000/common/irq.c
index 9cf7b67..ea6e99f 100644
--- a/arch/mips/au1000/common/irq.c
+++ b/arch/mips/au1000/common/irq.c
@@ -233,7 +233,7 @@ void restore_local_and_enable(int contro
 
 
 static struct irq_chip rise_edge_irq_type = {
-	.typename = "Au1000 Rise Edge",
+	.name = "Au1000 Rise Edge",
 	.ack = mask_and_ack_rise_edge_irq,
 	.mask = local_disable_irq,
 	.mask_ack = mask_and_ack_rise_edge_irq,
@@ -242,7 +242,7 @@ static struct irq_chip rise_edge_irq_typ
 };
 
 static struct irq_chip fall_edge_irq_type = {
-	.typename = "Au1000 Fall Edge",
+	.name = "Au1000 Fall Edge",
 	.ack = mask_and_ack_fall_edge_irq,
 	.mask = local_disable_irq,
 	.mask_ack = mask_and_ack_fall_edge_irq,
@@ -251,7 +251,7 @@ static struct irq_chip fall_edge_irq_typ
 };
 
 static struct irq_chip either_edge_irq_type = {
-	.typename = "Au1000 Rise or Fall Edge",
+	.name = "Au1000 Rise or Fall Edge",
 	.ack = mask_and_ack_either_edge_irq,
 	.mask = local_disable_irq,
 	.mask_ack = mask_and_ack_either_edge_irq,
@@ -260,7 +260,7 @@ static struct irq_chip either_edge_irq_t
 };
 
 static struct irq_chip level_irq_type = {
-	.typename = "Au1000 Level",
+	.name = "Au1000 Level",
 	.ack = mask_and_ack_level_irq,
 	.mask = local_disable_irq,
 	.mask_ack = mask_and_ack_level_irq,
diff --git a/arch/mips/ddb5xxx/ddb5477/irq_5477.c b/arch/mips/ddb5xxx/ddb5477/irq_5477.c
index 96249aa..98c3b15 100644
--- a/arch/mips/ddb5xxx/ddb5477/irq_5477.c
+++ b/arch/mips/ddb5xxx/ddb5477/irq_5477.c
@@ -82,7 +82,7 @@ vrc5477_irq_end(unsigned int irq)
 }
 
 struct irq_chip vrc5477_irq_controller = {
-	.typename = "vrc5477_irq",
+	.name = "vrc5477_irq",
 	.ack = vrc5477_irq_ack,
 	.mask = vrc5477_irq_disable,
 	.mask_ack = vrc5477_irq_ack,
diff --git a/arch/mips/dec/ioasic-irq.c b/arch/mips/dec/ioasic-irq.c
index 4c7cb40..3acb133 100644
--- a/arch/mips/dec/ioasic-irq.c
+++ b/arch/mips/dec/ioasic-irq.c
@@ -62,7 +62,7 @@ static inline void end_ioasic_irq(unsign
 }
 
 static struct irq_chip ioasic_irq_type = {
-	.typename = "IO-ASIC",
+	.name = "IO-ASIC",
 	.ack = ack_ioasic_irq,
 	.mask = mask_ioasic_irq,
 	.mask_ack = ack_ioasic_irq,
@@ -84,7 +84,7 @@ static inline void end_ioasic_dma_irq(un
 }
 
 static struct irq_chip ioasic_dma_irq_type = {
-	.typename = "IO-ASIC-DMA",
+	.name = "IO-ASIC-DMA",
 	.ack = ack_ioasic_dma_irq,
 	.mask = mask_ioasic_dma_irq,
 	.mask_ack = ack_ioasic_dma_irq,
diff --git a/arch/mips/dec/kn02-irq.c b/arch/mips/dec/kn02-irq.c
index 916e46b..02439dc 100644
--- a/arch/mips/dec/kn02-irq.c
+++ b/arch/mips/dec/kn02-irq.c
@@ -58,7 +58,7 @@ static void ack_kn02_irq(unsigned int ir
 }
 
 static struct irq_chip kn02_irq_type = {
-	.typename = "KN02-CSR",
+	.name = "KN02-CSR",
 	.ack = ack_kn02_irq,
 	.mask = mask_kn02_irq,
 	.mask_ack = ack_kn02_irq,
diff --git a/arch/mips/emma2rh/common/irq_emma2rh.c b/arch/mips/emma2rh/common/irq_emma2rh.c
index 8d880f0..96df37b 100644
--- a/arch/mips/emma2rh/common/irq_emma2rh.c
+++ b/arch/mips/emma2rh/common/irq_emma2rh.c
@@ -57,7 +57,7 @@ static void emma2rh_irq_disable(unsigned
 }
 
 struct irq_chip emma2rh_irq_controller = {
-	.typename = "emma2rh_irq",
+	.name = "emma2rh_irq",
 	.ack = emma2rh_irq_disable,
 	.mask = emma2rh_irq_disable,
 	.mask_ack = emma2rh_irq_disable,
diff --git a/arch/mips/emma2rh/markeins/irq_markeins.c b/arch/mips/emma2rh/markeins/irq_markeins.c
index 2116d9b..fba5c15 100644
--- a/arch/mips/emma2rh/markeins/irq_markeins.c
+++ b/arch/mips/emma2rh/markeins/irq_markeins.c
@@ -49,7 +49,7 @@ static void emma2rh_sw_irq_disable(unsig
 }
 
 struct irq_chip emma2rh_sw_irq_controller = {
-	.typename = "emma2rh_sw_irq",
+	.name = "emma2rh_sw_irq",
 	.ack = emma2rh_sw_irq_disable,
 	.mask = emma2rh_sw_irq_disable,
 	.mask_ack = emma2rh_sw_irq_disable,
@@ -115,7 +115,7 @@ static void emma2rh_gpio_irq_end(unsigne
 }
 
 struct irq_chip emma2rh_gpio_irq_controller = {
-	.typename = "emma2rh_gpio_irq",
+	.name = "emma2rh_gpio_irq",
 	.ack = emma2rh_gpio_irq_ack,
 	.mask = emma2rh_gpio_irq_disable,
 	.mask_ack = emma2rh_gpio_irq_ack,
diff --git a/arch/mips/gt64120/ev64120/irq.c b/arch/mips/gt64120/ev64120/irq.c
index b3e5796..04572b9 100644
--- a/arch/mips/gt64120/ev64120/irq.c
+++ b/arch/mips/gt64120/ev64120/irq.c
@@ -88,7 +88,7 @@ static void end_ev64120_irq(unsigned int
 }
 
 static struct irq_chip ev64120_irq_type = {
-	.typename	= "EV64120",
+	.name		= "EV64120",
 	.ack		= disable_ev64120_irq,
 	.mask		= disable_ev64120_irq,
 	.mask_ack	= disable_ev64120_irq,
diff --git a/arch/mips/jazz/irq.c b/arch/mips/jazz/irq.c
index f8d417b..295892e 100644
--- a/arch/mips/jazz/irq.c
+++ b/arch/mips/jazz/irq.c
@@ -40,7 +40,7 @@ void disable_r4030_irq(unsigned int irq)
 }
 
 static struct irq_chip r4030_irq_type = {
-	.typename = "R4030",
+	.name = "R4030",
 	.ack = disable_r4030_irq,
 	.mask = disable_r4030_irq,
 	.mask_ack = disable_r4030_irq,
diff --git a/arch/mips/jmr3927/rbhma3100/irq.c b/arch/mips/jmr3927/rbhma3100/irq.c
index 3da49c5..7d2c203 100644
--- a/arch/mips/jmr3927/rbhma3100/irq.c
+++ b/arch/mips/jmr3927/rbhma3100/irq.c
@@ -439,7 +439,7 @@ void __init arch_init_irq(void)
 }
 
 static struct irq_chip jmr3927_irq_controller = {
-	.typename = "jmr3927_irq",
+	.name = "jmr3927_irq",
 	.ack = jmr3927_irq_ack,
 	.mask = jmr3927_irq_disable,
 	.mask_ack = jmr3927_irq_ack,
diff --git a/arch/mips/kernel/irq-msc01.c b/arch/mips/kernel/irq-msc01.c
index bcaad66..2967537 100644
--- a/arch/mips/kernel/irq-msc01.c
+++ b/arch/mips/kernel/irq-msc01.c
@@ -112,7 +112,7 @@ msc_bind_eic_interrupt (unsigned int irq
 }
 
 struct irq_chip msc_levelirq_type = {
-	.typename = "SOC-it-Level",
+	.name = "SOC-it-Level",
 	.ack = level_mask_and_ack_msc_irq,
 	.mask = mask_msc_irq,
 	.mask_ack = level_mask_and_ack_msc_irq,
@@ -122,7 +122,7 @@ struct irq_chip msc_levelirq_type = {
 };
 
 struct irq_chip msc_edgeirq_type = {
-	.typename = "SOC-it-Edge",
+	.name = "SOC-it-Edge",
 	.ack = edge_mask_and_ack_msc_irq,
 	.mask = mask_msc_irq,
 	.mask_ack = edge_mask_and_ack_msc_irq,
diff --git a/arch/mips/kernel/irq-mv6434x.c b/arch/mips/kernel/irq-mv6434x.c
index efbd219..bf6015e 100644
--- a/arch/mips/kernel/irq-mv6434x.c
+++ b/arch/mips/kernel/irq-mv6434x.c
@@ -92,7 +92,7 @@ void ll_mv64340_irq(void)
 }
 
 struct irq_chip mv64340_irq_type = {
-	.typename = "MV-64340",
+	.name = "MV-64340",
 	.ack = mask_mv64340_irq,
 	.mask = mask_mv64340_irq,
 	.mask_ack = mask_mv64340_irq,
diff --git a/arch/mips/kernel/irq-rm7000.c b/arch/mips/kernel/irq-rm7000.c
index a60cfe5..2507328 100644
--- a/arch/mips/kernel/irq-rm7000.c
+++ b/arch/mips/kernel/irq-rm7000.c
@@ -28,7 +28,7 @@ static inline void mask_rm7k_irq(unsigne
 }
 
 static struct irq_chip rm7k_irq_controller = {
-	.typename = "RM7000",
+	.name = "RM7000",
 	.ack = mask_rm7k_irq,
 	.mask = mask_rm7k_irq,
 	.mask_ack = mask_rm7k_irq,
diff --git a/arch/mips/kernel/irq-rm9000.c b/arch/mips/kernel/irq-rm9000.c
index 6df072b..d62a59e 100644
--- a/arch/mips/kernel/irq-rm9000.c
+++ b/arch/mips/kernel/irq-rm9000.c
@@ -79,7 +79,7 @@ static void rm9k_perfcounter_irq_shutdow
 }
 
 static struct irq_chip rm9k_irq_controller = {
-	.typename = "RM9000",
+	.name = "RM9000",
 	.ack = mask_rm9k_irq,
 	.mask = mask_rm9k_irq,
 	.mask_ack = mask_rm9k_irq,
@@ -87,7 +87,7 @@ static struct irq_chip rm9k_irq_controll
 };
 
 static struct irq_chip rm9k_perfcounter_irq = {
-	.typename = "RM9000",
+	.name = "RM9000",
 	.startup = rm9k_perfcounter_irq_startup,
 	.shutdown = rm9k_perfcounter_irq_shutdown,
 	.ack = mask_rm9k_irq,
diff --git a/arch/mips/kernel/irq_cpu.c b/arch/mips/kernel/irq_cpu.c
index 6e73dda..7b66e03 100644
--- a/arch/mips/kernel/irq_cpu.c
+++ b/arch/mips/kernel/irq_cpu.c
@@ -49,7 +49,7 @@ static inline void mask_mips_irq(unsigne
 }
 
 static struct irq_chip mips_cpu_irq_controller = {
-	.typename	= "MIPS",
+	.name		= "MIPS",
 	.ack		= mask_mips_irq,
 	.mask		= mask_mips_irq,
 	.mask_ack	= mask_mips_irq,
@@ -88,7 +88,7 @@ static void mips_mt_cpu_irq_ack(unsigned
 }
 
 static struct irq_chip mips_mt_cpu_irq_controller = {
-	.typename	= "MIPS",
+	.name		= "MIPS",
 	.startup	= mips_mt_cpu_irq_startup,
 	.ack		= mips_mt_cpu_irq_ack,
 	.mask		= mask_mips_mt_irq,
diff --git a/arch/mips/lasat/interrupt.c b/arch/mips/lasat/interrupt.c
index 2affa5f..9a622b9 100644
--- a/arch/mips/lasat/interrupt.c
+++ b/arch/mips/lasat/interrupt.c
@@ -45,7 +45,7 @@ void enable_lasat_irq(unsigned int irq_n
 }
 
 static struct irq_chip lasat_irq_type = {
-	.typename = "Lasat",
+	.name = "Lasat",
 	.ack = disable_lasat_irq,
 	.mask = disable_lasat_irq,
 	.mask_ack = disable_lasat_irq,
diff --git a/arch/mips/mips-boards/atlas/atlas_int.c b/arch/mips/mips-boards/atlas/atlas_int.c
index 85482a6..6cfcd8f 100644
--- a/arch/mips/mips-boards/atlas/atlas_int.c
+++ b/arch/mips/mips-boards/atlas/atlas_int.c
@@ -69,7 +69,7 @@ static void end_atlas_irq(unsigned int i
 }
 
 static struct irq_chip atlas_irq_type = {
-	.typename = "Atlas",
+	.name = "Atlas",
 	.ack = disable_atlas_irq,
 	.mask = disable_atlas_irq,
 	.mask_ack = disable_atlas_irq,
diff --git a/arch/mips/momentum/ocelot_c/cpci-irq.c b/arch/mips/momentum/ocelot_c/cpci-irq.c
index bb11fef..186a140 100644
--- a/arch/mips/momentum/ocelot_c/cpci-irq.c
+++ b/arch/mips/momentum/ocelot_c/cpci-irq.c
@@ -84,7 +84,7 @@ void ll_cpci_irq(void)
 }
 
 struct irq_chip cpci_irq_type = {
-	.typename = "CPCI/FPGA",
+	.name = "CPCI/FPGA",
 	.ack = mask_cpci_irq,
 	.mask = mask_cpci_irq,
 	.mask_ack = mask_cpci_irq,
diff --git a/arch/mips/momentum/ocelot_c/uart-irq.c b/arch/mips/momentum/ocelot_c/uart-irq.c
index a7a80c0..de1a31e 100644
--- a/arch/mips/momentum/ocelot_c/uart-irq.c
+++ b/arch/mips/momentum/ocelot_c/uart-irq.c
@@ -77,7 +77,7 @@ void ll_uart_irq(void)
 }
 
 struct irq_chip uart_irq_type = {
-	.typename = "UART/FPGA",
+	.name = "UART/FPGA",
 	.ack = mask_uart_irq,
 	.mask = mask_uart_irq,
 	.mask_ack = mask_uart_irq,
diff --git a/arch/mips/philips/pnx8550/common/int.c b/arch/mips/philips/pnx8550/common/int.c
index 2c36c10..d48665e 100644
--- a/arch/mips/philips/pnx8550/common/int.c
+++ b/arch/mips/philips/pnx8550/common/int.c
@@ -159,7 +159,7 @@ int pnx8550_set_gic_priority(int irq, in
 }
 
 static struct irq_chip level_irq_type = {
-	.typename =	"PNX Level IRQ",
+	.name =		"PNX Level IRQ",
 	.ack =		mask_irq,
 	.mask =		mask_irq,
 	.mask_ack =	mask_irq,
diff --git a/arch/mips/sgi-ip22/ip22-eisa.c b/arch/mips/sgi-ip22/ip22-eisa.c
index a1a9af6..6b6e97b 100644
--- a/arch/mips/sgi-ip22/ip22-eisa.c
+++ b/arch/mips/sgi-ip22/ip22-eisa.c
@@ -139,7 +139,7 @@ static void end_eisa1_irq(unsigned int i
 }
 
 static struct irq_chip ip22_eisa1_irq_type = {
-	.typename	= "IP22 EISA",
+	.name		= "IP22 EISA",
 	.startup	= startup_eisa1_irq,
 	.ack		= mask_and_ack_eisa1_irq,
 	.mask		= disable_eisa1_irq,
@@ -194,7 +194,7 @@ static void end_eisa2_irq(unsigned int i
 }
 
 static struct irq_chip ip22_eisa2_irq_type = {
-	.typename	= "IP22 EISA",
+	.name		= "IP22 EISA",
 	.startup	= startup_eisa2_irq,
 	.ack		= mask_and_ack_eisa2_irq,
 	.mask		= disable_eisa2_irq,
diff --git a/arch/mips/sgi-ip22/ip22-int.c b/arch/mips/sgi-ip22/ip22-int.c
index f3d2ae3..b454924 100644
--- a/arch/mips/sgi-ip22/ip22-int.c
+++ b/arch/mips/sgi-ip22/ip22-int.c
@@ -53,7 +53,7 @@ static void disable_local0_irq(unsigned
 }
 
 static struct irq_chip ip22_local0_irq_type = {
-	.typename	= "IP22 local 0",
+	.name		= "IP22 local 0",
 	.ack		= disable_local0_irq,
 	.mask		= disable_local0_irq,
 	.mask_ack	= disable_local0_irq,
@@ -74,7 +74,7 @@ void disable_local1_irq(unsigned int irq
 }
 
 static struct irq_chip ip22_local1_irq_type = {
-	.typename	= "IP22 local 1",
+	.name		= "IP22 local 1",
 	.ack		= disable_local1_irq,
 	.mask		= disable_local1_irq,
 	.mask_ack	= disable_local1_irq,
@@ -95,7 +95,7 @@ void disable_local2_irq(unsigned int irq
 }
 
 static struct irq_chip ip22_local2_irq_type = {
-	.typename	= "IP22 local 2",
+	.name		= "IP22 local 2",
 	.ack		= disable_local2_irq,
 	.mask		= disable_local2_irq,
 	.mask_ack	= disable_local2_irq,
@@ -116,7 +116,7 @@ void disable_local3_irq(unsigned int irq
 }
 
 static struct irq_chip ip22_local3_irq_type = {
-	.typename	= "IP22 local 3",
+	.name		= "IP22 local 3",
 	.ack		= disable_local3_irq,
 	.mask		= disable_local3_irq,
 	.mask_ack	= disable_local3_irq,
diff --git a/arch/mips/sgi-ip27/ip27-irq.c b/arch/mips/sgi-ip27/ip27-irq.c
index 319f880..60ade76 100644
--- a/arch/mips/sgi-ip27/ip27-irq.c
+++ b/arch/mips/sgi-ip27/ip27-irq.c
@@ -333,7 +333,7 @@ static inline void disable_bridge_irq(un
 }
 
 static struct irq_chip bridge_irq_type = {
-	.typename	= "bridge",
+	.name		= "bridge",
 	.startup	= startup_bridge_irq,
 	.shutdown	= shutdown_bridge_irq,
 	.ack		= disable_bridge_irq,
diff --git a/arch/mips/sgi-ip27/ip27-timer.c b/arch/mips/sgi-ip27/ip27-timer.c
index c20e989..9ce5136 100644
--- a/arch/mips/sgi-ip27/ip27-timer.c
+++ b/arch/mips/sgi-ip27/ip27-timer.c
@@ -181,7 +181,7 @@ static void disable_rt_irq(unsigned int
 }
 
 static struct irq_chip rt_irq_type = {
-	.typename	= "SN HUB RT timer",
+	.name		= "SN HUB RT timer",
 	.ack		= disable_rt_irq,
 	.mask		= disable_rt_irq,
 	.mask_ack	= disable_rt_irq,
diff --git a/arch/mips/sgi-ip32/ip32-irq.c b/arch/mips/sgi-ip32/ip32-irq.c
index ae06386..8c450d9 100644
--- a/arch/mips/sgi-ip32/ip32-irq.c
+++ b/arch/mips/sgi-ip32/ip32-irq.c
@@ -144,7 +144,7 @@ static void end_cpu_irq(unsigned int irq
 }
 
 static struct irq_chip ip32_cpu_interrupt = {
-	.typename = "IP32 CPU",
+	.name = "IP32 CPU",
 	.ack = disable_cpu_irq,
 	.mask = disable_cpu_irq,
 	.mask_ack = disable_cpu_irq,
@@ -193,7 +193,7 @@ static void end_crime_irq(unsigned int i
 }
 
 static struct irq_chip ip32_crime_interrupt = {
-	.typename = "IP32 CRIME",
+	.name = "IP32 CRIME",
 	.ack = mask_and_ack_crime_irq,
 	.mask = disable_crime_irq,
 	.mask_ack = mask_and_ack_crime_irq,
@@ -234,7 +234,7 @@ static void end_macepci_irq(unsigned int
 }
 
 static struct irq_chip ip32_macepci_interrupt = {
-	.typename = "IP32 MACE PCI",
+	.name = "IP32 MACE PCI",
 	.ack = disable_macepci_irq,
 	.mask = disable_macepci_irq,
 	.mask_ack = disable_macepci_irq,
@@ -347,7 +347,7 @@ static void end_maceisa_irq(unsigned irq
 }
 
 static struct irq_chip ip32_maceisa_interrupt = {
-	.typename = "IP32 MACE ISA",
+	.name = "IP32 MACE ISA",
 	.ack = mask_and_ack_maceisa_irq,
 	.mask = disable_maceisa_irq,
 	.mask_ack = mask_and_ack_maceisa_irq,
@@ -379,7 +379,7 @@ static void end_mace_irq(unsigned int ir
 }
 
 static struct irq_chip ip32_mace_interrupt = {
-	.typename = "IP32 MACE",
+	.name = "IP32 MACE",
 	.ack = disable_mace_irq,
 	.mask = disable_mace_irq,
 	.mask_ack = disable_mace_irq,
diff --git a/arch/mips/sibyte/bcm1480/irq.c b/arch/mips/sibyte/bcm1480/irq.c
index 2e8f6b2..1dc5d05 100644
--- a/arch/mips/sibyte/bcm1480/irq.c
+++ b/arch/mips/sibyte/bcm1480/irq.c
@@ -82,7 +82,7 @@ extern char sb1250_duart_present[];
 #endif
 
 static struct irq_chip bcm1480_irq_type = {
-	.typename = "BCM1480-IMR",
+	.name = "BCM1480-IMR",
 	.ack = ack_bcm1480_irq,
 	.mask = disable_bcm1480_irq,
 	.mask_ack = ack_bcm1480_irq,
diff --git a/arch/mips/sibyte/sb1250/irq.c b/arch/mips/sibyte/sb1250/irq.c
index 82ce753..1482394 100644
--- a/arch/mips/sibyte/sb1250/irq.c
+++ b/arch/mips/sibyte/sb1250/irq.c
@@ -67,7 +67,7 @@ extern char sb1250_duart_present[];
 #endif
 
 static struct irq_chip sb1250_irq_type = {
-	.typename = "SB1250-IMR",
+	.name = "SB1250-IMR",
 	.ack = ack_sb1250_irq,
 	.mask = disable_sb1250_irq,
 	.mask_ack = ack_sb1250_irq,
diff --git a/arch/mips/sni/irq.c b/arch/mips/sni/irq.c
index 8511bcc..039e8e5 100644
--- a/arch/mips/sni/irq.c
+++ b/arch/mips/sni/irq.c
@@ -37,7 +37,7 @@ static void end_pciasic_irq(unsigned int
 }
 
 static struct irq_chip pciasic_irq_type = {
-	.typename = "ASIC-PCI",
+	.name = "ASIC-PCI",
 	.ack = disable_pciasic_irq,
 	.mask = disable_pciasic_irq,
 	.mask_ack = disable_pciasic_irq,
diff --git a/arch/mips/tx4927/common/tx4927_irq.c b/arch/mips/tx4927/common/tx4927_irq.c
index ed4a19a..e7f3e5b 100644
--- a/arch/mips/tx4927/common/tx4927_irq.c
+++ b/arch/mips/tx4927/common/tx4927_irq.c
@@ -120,7 +120,7 @@ static void tx4927_irq_pic_disable(unsig
 
 #define TX4927_CP0_NAME "TX4927-CP0"
 static struct irq_chip tx4927_irq_cp0_type = {
-	.typename	= TX4927_CP0_NAME,
+	.name		= TX4927_CP0_NAME,
 	.ack		= tx4927_irq_cp0_disable,
 	.mask		= tx4927_irq_cp0_disable,
 	.mask_ack	= tx4927_irq_cp0_disable,
@@ -129,7 +129,7 @@ static struct irq_chip tx4927_irq_cp0_ty
 
 #define TX4927_PIC_NAME "TX4927-PIC"
 static struct irq_chip tx4927_irq_pic_type = {
-	.typename	= TX4927_PIC_NAME,
+	.name		= TX4927_PIC_NAME,
 	.ack		= tx4927_irq_pic_disable,
 	.mask		= tx4927_irq_pic_disable,
 	.mask_ack	= tx4927_irq_pic_disable,
diff --git a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c
index b54b529..dcce88f 100644
--- a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c
+++ b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c
@@ -228,7 +228,7 @@ static void toshiba_rbtx4927_irq_isa_mas
 
 #define TOSHIBA_RBTX4927_IOC_NAME "RBTX4927-IOC"
 static struct irq_chip toshiba_rbtx4927_irq_ioc_type = {
-	.typename = TOSHIBA_RBTX4927_IOC_NAME,
+	.name = TOSHIBA_RBTX4927_IOC_NAME,
 	.ack = toshiba_rbtx4927_irq_ioc_disable,
 	.mask = toshiba_rbtx4927_irq_ioc_disable,
 	.mask_ack = toshiba_rbtx4927_irq_ioc_disable,
@@ -241,7 +241,7 @@ static struct irq_chip toshiba_rbtx4927_
 #ifdef CONFIG_TOSHIBA_FPCIB0
 #define TOSHIBA_RBTX4927_ISA_NAME "RBTX4927-ISA"
 static struct irq_chip toshiba_rbtx4927_irq_isa_type = {
-	.typename = TOSHIBA_RBTX4927_ISA_NAME,
+	.name = TOSHIBA_RBTX4927_ISA_NAME,
 	.ack = toshiba_rbtx4927_irq_isa_mask_and_ack,
 	.mask = toshiba_rbtx4927_irq_isa_disable,
 	.mask_ack = toshiba_rbtx4927_irq_isa_mask_and_ack,
@@ -490,13 +490,13 @@ void toshiba_rbtx4927_irq_dump(char *key
 	{
 		u32 i, j = 0;
 		for (i = 0; i < NR_IRQS; i++) {
-			if (strcmp(irq_desc[i].chip->typename, "none")
+			if (strcmp(irq_desc[i].chip->name, "none")
 			    == 0)
 				continue;
 
 			if ((i >= 1)
-			    && (irq_desc[i - 1].chip->typename ==
-				irq_desc[i].chip->typename)) {
+			    && (irq_desc[i - 1].chip->name ==
+				irq_desc[i].chip->name)) {
 				j++;
 			} else {
 				j = 0;
@@ -510,7 +510,7 @@ void toshiba_rbtx4927_irq_dump(char *key
 			     (u32) (irq_desc[i].action ? irq_desc[i].
 				    action->handler : 0),
 			     irq_desc[i].depth,
-			     irq_desc[i].chip->typename, j);
+			     irq_desc[i].chip->name, j);
 		}
 	}
 #endif
diff --git a/arch/mips/tx4938/common/irq.c b/arch/mips/tx4938/common/irq.c
index a347b42..3a2dbfc 100644
--- a/arch/mips/tx4938/common/irq.c
+++ b/arch/mips/tx4938/common/irq.c
@@ -49,7 +49,7 @@ static void tx4938_irq_pic_disable(unsig
 
 #define TX4938_CP0_NAME "TX4938-CP0"
 static struct irq_chip tx4938_irq_cp0_type = {
-	.typename = TX4938_CP0_NAME,
+	.name = TX4938_CP0_NAME,
 	.ack = tx4938_irq_cp0_disable,
 	.mask = tx4938_irq_cp0_disable,
 	.mask_ack = tx4938_irq_cp0_disable,
@@ -58,7 +58,7 @@ static struct irq_chip tx4938_irq_cp0_ty
 
 #define TX4938_PIC_NAME "TX4938-PIC"
 static struct irq_chip tx4938_irq_pic_type = {
-	.typename = TX4938_PIC_NAME,
+	.name = TX4938_PIC_NAME,
 	.ack = tx4938_irq_pic_disable,
 	.mask = tx4938_irq_pic_disable,
 	.mask_ack = tx4938_irq_pic_disable,
diff --git a/arch/mips/tx4938/toshiba_rbtx4938/irq.c b/arch/mips/tx4938/toshiba_rbtx4938/irq.c
index b6f363d..2e96dbb 100644
--- a/arch/mips/tx4938/toshiba_rbtx4938/irq.c
+++ b/arch/mips/tx4938/toshiba_rbtx4938/irq.c
@@ -92,7 +92,7 @@ static void toshiba_rbtx4938_irq_ioc_dis
 
 #define TOSHIBA_RBTX4938_IOC_NAME "RBTX4938-IOC"
 static struct irq_chip toshiba_rbtx4938_irq_ioc_type = {
-	.typename = TOSHIBA_RBTX4938_IOC_NAME,
+	.name = TOSHIBA_RBTX4938_IOC_NAME,
 	.ack = toshiba_rbtx4938_irq_ioc_disable,
 	.mask = toshiba_rbtx4938_irq_ioc_disable,
 	.mask_ack = toshiba_rbtx4938_irq_ioc_disable,
diff --git a/arch/mips/vr41xx/common/icu.c b/arch/mips/vr41xx/common/icu.c
index c075261..97d7d9a 100644
--- a/arch/mips/vr41xx/common/icu.c
+++ b/arch/mips/vr41xx/common/icu.c
@@ -428,7 +428,7 @@ static void enable_sysint1_irq(unsigned
 }
 
 static struct irq_chip sysint1_irq_type = {
-	.typename	= "SYSINT1",
+	.name		= "SYSINT1",
 	.ack		= disable_sysint1_irq,
 	.mask		= disable_sysint1_irq,
 	.mask_ack	= disable_sysint1_irq,
@@ -446,7 +446,7 @@ static void enable_sysint2_irq(unsigned
 }
 
 static struct irq_chip sysint2_irq_type = {
-	.typename	= "SYSINT2",
+	.name		= "SYSINT2",
 	.ack		= disable_sysint2_irq,
 	.mask		= disable_sysint2_irq,
 	.mask_ack	= disable_sysint2_irq,

From phorton@bitbox.co.uk Mon Jan 15 13:37:38 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 15 Jan 2007 13:37:43 +0000 (GMT)
Received: from outmail1.freedom2surf.net ([194.106.33.237]:12984 "EHLO
	outmail1.freedom2surf.net") by ftp.linux-mips.org with ESMTP
	id S28641767AbXAONhi (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Mon, 15 Jan 2007 13:37:38 +0000
Received: from [172.16.97.130] (f2s.colonel-panic.org [83.67.53.76])
	by outmail1.freedom2surf.net (Postfix) with ESMTP
	id 88E31CD92C; Mon, 15 Jan 2007 13:37:30 +0000 (GMT)
Message-ID: <45AB839A.50003@bitbox.co.uk>
Date:	Mon, 15 Jan 2007 13:37:30 +0000
From:	Peter Horton <phorton@bitbox.co.uk>
User-Agent: Thunderbird 1.5 (Windows/20051201)
MIME-Version: 1.0
To:	Ralf Baechle <ralf@linux-mips.org>
Cc:	Alan <alan@lxorguk.ukuu.org.uk>,
	Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>,
	linux-mips <linux-mips@linux-mips.org>
Subject: Re: [PATCH] [MIPS] Fixed PCI resource fixup
References: <200701110555.l0B5twHe006668@mbox33.po.2iij.net> <20070111143116.GA4451@linux-mips.org> <45A79847.1060302@bitbox.co.uk> <20070112144042.74c4edca@localhost.localdomain> <20070112144905.2919e705@localhost.localdomain> <20070114115539.GA5755@linux-mips.org>
In-Reply-To: <20070114115539.GA5755@linux-mips.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Return-Path: <phorton@bitbox.co.uk>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13599
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: phorton@bitbox.co.uk
Precedence: bulk
X-list: linux-mips

Ralf Baechle wrote:
> On Fri, Jan 12, 2007 at 02:49:05PM +0000, Alan wrote:
> 
>>>> The GT-64111 passes the CPU addresses straight onto the PCI bus and does 
>>>> not remove the offset of the Galileo's PCI window in CPU space. This 
>>>> means the only PCI I/O addresses that can be supported are 0x1000.0000 
>>>> to 0x11ff.ffff, hence the negative 'io_offset'.
>> Does this mean it can't hit PCI I/O space legacy addresses (0x1F0 etc) ?
>>
>> If so can you set CONFIG_NO_ATA_LEGACY in your platform configuration
> 
> In the meantime I checked this against the Galileo documentation.  Which
> says just like Yoichi and Peter that the GT-64111 is passing local
> addresses in the configured PCI memory or I/O windows straight through to
> the PCI bus.  Reconfiguring the PCI I/O window to start at physical address
> zero is not really an option because the CPU has it's exception vectors
> there.
> 
> There is one inconsistency in the whole story still.  Cobalts use a PC-style
> legacy RTC chip at I/O port 0x70 and that seems to work just fine.  I suspect
> the the VIA Apollo SuperIO chip makes this work by just dropping some of the
> high I/O port address bits ...
> 

I've just checked on the Qube2 here and the RTC can be found at 
0x1000.0070, 0x1001.0070 etc so the VIA bridge is only decoding the low 
16 address lines for I/O space. Handy really otherwise it wouldn't work 
with the GT-64111 :-)

P.


From florian.fainelli@int-evry.fr Mon Jan 15 18:46:18 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 15 Jan 2007 18:46:23 +0000 (GMT)
Received: from smtp-ext.int-evry.fr ([157.159.11.17]:30421 "EHLO
	smtp-ext.int-evry.fr") by ftp.linux-mips.org with ESMTP
	id S28643080AbXAOSqS (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Mon, 15 Jan 2007 18:46:18 +0000
Received: from mini.int.alphacore.net (florian.maisel.int-evry.fr [157.159.41.36])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp-ext.int-evry.fr (Postfix) with ESMTP id 4FD938D168F
	for <linux-mips@linux-mips.org>; Mon, 15 Jan 2007 19:45:04 +0100 (CET)
From:	Florian Fainelli <florian.fainelli@int-evry.fr>
To:	linux-mips@linux-mips.org
Subject: [PATCH] Add support for Cobalt Server front LED
Date:	Mon, 15 Jan 2007 19:36:52 +0100
User-Agent: KMail/1.9.5
MIME-Version: 1.0
Content-Type: multipart/signed;
  boundary="nextPart3049338.yGKx3zGaik";
  protocol="application/pgp-signature";
  micalg=pgp-sha1
Content-Transfer-Encoding: 7bit
Message-Id: <200701151936.57738.florian.fainelli@int-evry.fr>
Return-Path: <florian.fainelli@int-evry.fr>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13600
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: florian.fainelli@int-evry.fr
Precedence: bulk
X-list: linux-mips

--nextPart3049338.yGKx3zGaik
Content-Type: text/plain;
  charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Hi all,

This patch adds support for controlling the front LED on Cobalt Server. It =
has=20
been tested on Qube 2 with either no default trigger, or the IDE-activity=20
trigger. Both work fine. Please comment and test !

Thanks

=46lorian

Signed-off-by: Florian Fainelli <florian.fainelli@int-evry.fr>

diff -urN linux-2.6.19.1/include/asm-mips/mach-cobalt/cobalt.h=20
linux-2.6.19.1.led/include/asm-mips/mach-cobalt/cobalt.h
=2D-- linux-2.6.19.1/include/asm-mips/mach-cobalt/cobalt.h        2006-12-1=
1=20
20:32:53.000000000 +0100
+++ linux-2.6.19.1.led/include/asm-mips/mach-cobalt/cobalt.h    2007-01-15=
=20
19:29:07.000000000 +0100
@@ -97,6 +97,7 @@
                (PCI_FUNC (devfn) << 8) | (where)), GT_PCI0_CFGADDR_OFS)

 #define COBALT_LED_PORT                (*(volatile unsigned char *)=20
CKSEG1ADDR(0x1c000000))
+#define COBALT_LED_BASE         0xbc000000
 # define COBALT_LED_BAR_LEFT   (1 << 0)        /* Qube */
 # define COBALT_LED_BAR_RIGHT  (1 << 1)        /* Qube */
 # define COBALT_LED_WEB                (1 << 2)        /* RaQ */
diff -urN linux-2.6.19.1/drivers/leds/Kconfig=20
linux-2.6.19.1.led/drivers/leds/Kconfig
=2D-- linux-2.6.19.1/drivers/leds/Kconfig 2006-12-11 20:32:53.000000000 +01=
00
+++ linux-2.6.19.1.led/drivers/leds/Kconfig     2007-01-15 19:22:00.0000000=
00=20
+0100
@@ -76,6 +76,12 @@
          This option enables support for the Soekris net4801 and net4826=20
error
          LED.

+config LEDS_COBALT
+       tristate "LED Support for Cobalt Server front LED"
+       depends on LEDS_CLASS && MIPS_COBALT
+       help
+         This option enables support for the front LED on Cobalt Server
+
 comment "LED Triggers"

 config LEDS_TRIGGERS
diff -urN linux-2.6.19.1/drivers/leds/leds-cobalt.c=20
linux-2.6.19.1.led/drivers/leds/leds-cobalt.c
=2D-- linux-2.6.19.1/drivers/leds/leds-cobalt.c   1970-01-01 01:00:00.00000=
0000=20
+0100
+++ linux-2.6.19.1.led/drivers/leds/leds-cobalt.c       2007-01-15=20
19:28:09.000000000 +0100
@@ -0,0 +1,55 @@
+#include <linux/module.h>
+#include <linux/types.h>
+#include <linux/kernel.h>
+#include <linux/device.h>
+#include <linux/leds.h>
+#include <asm/mach-cobalt/cobalt.h>
+
+/* Copyright 2006 - Florian Fainelli <florian@openwrt.org>
+ *
+ * This driver let you control the Cobalt Qube/RaQ front LED
+ *
+ * 255 (max brightness) -> turn the led on
+ * 0 -> turn the led off
+ *
+ * If you want the LED to be blinking on IDE activity, select the IDE trig=
ger
+ */
+
+void cobalt_led_set(struct led_classdev *led_cdev, enum led_brightness=20
brightness)
+{
+       switch (brightness) {
+       case LED_OFF:
+               *(volatile uint8_t *) COBALT_LED_BASE =3D 0;
+               break;
+       case LED_FULL:
+               *(volatile uint8_t *) COBALT_LED_BASE =3D COBALT_LED_BAR_LE=
=46T |=20
COBALT_LED_BAR_RIGHT;
+               break;
+       default:
+               return;
+       }
+}
+
+static struct led_classdev cobalt_led =3D {
+       .name =3D "cobalt-front-led",
+       .brightness_set =3D cobalt_led_set,
+#ifdef CONFIG_LEDS_TRIGGER_IDE_DISK
+       .default_trigger =3D "ide-disk",
+#endif
+};
+
+static int __init cobalt_led_init(void)
+{
+       return led_classdev_register(NULL, &cobalt_led);
+}
+
+static void __exit cobalt_led_exit(void)
+{
+       led_classdev_unregister(&cobalt_led);
+}
+
+module_init(cobalt_led_init);
+module_exit(cobalt_led_exit);
+
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("Front LED support for Cobalt Server");
+MODULE_AUTHOR("Florian Fainelli <florian@openwrt.org>");
diff -urN linux-2.6.19.1/drivers/leds/Makefile=20
linux-2.6.19.1.led/drivers/leds/Makefile
=2D-- linux-2.6.19.1/drivers/leds/Makefile        2006-12-11 20:32:53.00000=
0000=20
+0100
+++ linux-2.6.19.1.led/drivers/leds/Makefile    2007-01-15 19:22:18.0000000=
00=20
+0100
@@ -13,6 +13,7 @@
 obj-$(CONFIG_LEDS_S3C24XX)             +=3D leds-s3c24xx.o
 obj-$(CONFIG_LEDS_AMS_DELTA)           +=3D leds-ams-delta.o
 obj-$(CONFIG_LEDS_NET48XX)             +=3D leds-net48xx.o
+obj-$(CONFIG_LEDS_COBALT)              +=3D leds-cobalt.o

 # LED Triggers
 obj-$(CONFIG_LEDS_TRIGGER_TIMER)       +=3D ledtrig-timer.o

--nextPart3049338.yGKx3zGaik
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.1 (GNU/Linux)

iD8DBQBFq8nJQ/Yr6D8A81kRAhxtAJ0fAqQT1eCle6UNpz2tLwMNhmb3SwCfUKJn
WFM92oygkJo+ZA54kGbnbfw=
=sOts
-----END PGP SIGNATURE-----

--nextPart3049338.yGKx3zGaik--

From adobriyan@gmail.com Mon Jan 15 21:14:31 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 15 Jan 2007 21:14:36 +0000 (GMT)
Received: from ug-out-1314.google.com ([66.249.92.169]:62548 "EHLO
	ug-out-1314.google.com") by ftp.linux-mips.org with ESMTP
	id S20045658AbXAOVOb (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Mon, 15 Jan 2007 21:14:31 +0000
Received: by ug-out-1314.google.com with SMTP id 40so1601735uga
        for <linux-mips@linux-mips.org>; Mon, 15 Jan 2007 13:14:30 -0800 (PST)
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=beta;
        h=received:date:from:to:cc:subject:message-id:mime-version:content-type:content-disposition:user-agent;
        b=JR4F35IhU4a5IfohyWnMgJWVyPkbqGbe51SuBHJn7eGNnqY2t8zPH9AXASNe4B5APqTL4BA3xl/MaEw7hbgHP4i+JFm4ric1TpqfVMYg/+IctbWAPSqBuN931tSev1HTa26kejqlJ4qRTNNA/UDNXKxCKAy4HjYVFJeXaUdfEHY=
Received: by 10.66.232.9 with SMTP id e9mr6057303ugh.1168895670335;
        Mon, 15 Jan 2007 13:14:30 -0800 (PST)
Received: from gmail.com ( [217.67.117.64])
        by mx.google.com with ESMTP id 59sm7384968ugf.2007.01.15.13.14.29;
        Mon, 15 Jan 2007 13:14:29 -0800 (PST)
Received: by gmail.com (nbSMTP-1.00) for uid 1000
	(using TLSv1/SSLv3 with cipher DES-CBC3-SHA (168/168 bits))
	adobriyan@gmail.com; Tue, 16 Jan 2007 00:14:15 +0300 (MSK)
Date:	Tue, 16 Jan 2007 00:14:13 +0300
From:	Alexey Dobriyan <adobriyan@gmail.com>
To:	akpm@osdl.org
Cc:	linux-kernel@vger.kernel.org, linux-mips@linux-mips.org
Subject: [PATCH] seq_file conversion: APM on mips
Message-ID: <20070115211413.GB5010@martell.zuzino.mipt.ru>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.5.11
Return-Path: <adobriyan@gmail.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13601
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: adobriyan@gmail.com
Precedence: bulk
X-list: linux-mips

Compile-tested.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

 arch/mips/kernel/apm.c |   28 +++++++++++++++++++++++-----
 1 file changed, 23 insertions(+), 5 deletions(-)

--- a/arch/mips/kernel/apm.c
+++ b/arch/mips/kernel/apm.c
@@ -15,6 +15,7 @@ #include <linux/poll.h>
 #include <linux/timer.h>
 #include <linux/slab.h>
 #include <linux/proc_fs.h>
+#include <linux/seq_file.h>
 #include <linux/miscdevice.h>
 #include <linux/apm_bios.h>
 #include <linux/capability.h>
@@ -434,11 +435,10 @@ #ifdef CONFIG_PROC_FS
  *	-1: Unknown
  *   8) min = minutes; sec = seconds
  */
-static int apm_get_info(char *buf, char **start, off_t fpos, int length)
+static int proc_apm_show(struct seq_file *m, void *v)
 {
 	struct apm_power_info info;
 	char *units;
-	int ret;
 
 	info.ac_line_status = 0xff;
 	info.battery_status = 0xff;
@@ -456,14 +456,26 @@ static int apm_get_info(char *buf, char 
 	case 1: 	units = "sec";	break;
 	}
 
-	ret = sprintf(buf, "%s 1.2 0x%02x 0x%02x 0x%02x 0x%02x %d%% %d %s\n",
+	seq_printf(m, "%s 1.2 0x%02x 0x%02x 0x%02x 0x%02x %d%% %d %s\n",
 		     driver_version, APM_32_BIT_SUPPORT,
 		     info.ac_line_status, info.battery_status,
 		     info.battery_flag, info.battery_life,
 		     info.time, units);
+	return 0;
+}
 
- 	return ret;
+static int proc_apm_open(struct inode *inode, struct file *file)
+{
+	return single_open(file, proc_apm_show, NULL);
 }
+
+static const struct file_operations proc_apm_fops = {
+	.owner		= THIS_MODULE,
+	.open		= proc_apm_open,
+	.read		= seq_read,
+	.llseek		= seq_lseek,
+	.release	= single_release,
+};
 #endif
 
 static int kapmd(void *arg)
@@ -529,7 +541,13 @@ static int __init apm_init(void)
 	}
 
 #ifdef CONFIG_PROC_FS
-	create_proc_info_entry("apm", 0, NULL, apm_get_info);
+	{
+		struct proc_dir_entry *pde;
+
+		pde = create_proc_entry("apm", 0, NULL);
+		if (pde)
+			pde->proc_fops = &proc_apm_fops;
+	}
 #endif
 
 	ret = misc_register(&apm_device);


From yoichi_yuasa@tripeaks.co.jp Mon Jan 15 22:42:20 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 15 Jan 2007 22:42:25 +0000 (GMT)
Received: from mo30.po.2iij.net ([210.128.50.53]:30980 "EHLO mo30.po.2iij.net")
	by ftp.linux-mips.org with ESMTP id S28578739AbXAOWmU (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Mon, 15 Jan 2007 22:42:20 +0000
Received: by mo.po.2iij.net (mo30) id l0FMg8Q7082440; Tue, 16 Jan 2007 07:42:08 +0900 (JST)
Received: from localhost.localdomain (69.25.30.125.dy.iij4u.or.jp [125.30.25.69])
	by mbox.po.2iij.net (mbox30) id l0FMg650060855
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT);
	Tue, 16 Jan 2007 07:42:06 +0900 (JST)
Date:	Tue, 16 Jan 2007 07:42:05 +0900
From:	Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
To:	Florian Fainelli <florian.fainelli@int-evry.fr>
Cc:	yoichi_yuasa@tripeaks.co.jp, linux-mips@linux-mips.org
Subject: Re: [PATCH] Add support for Cobalt Server front LED
Message-Id: <20070116074205.0428449d.yoichi_yuasa@tripeaks.co.jp>
In-Reply-To: <200701151936.57738.florian.fainelli@int-evry.fr>
References: <200701151936.57738.florian.fainelli@int-evry.fr>
Organization: TriPeaks Corporation
X-Mailer: Sylpheed version 1.0.6 (GTK+ 1.2.10; i486-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Return-Path: <yoichi_yuasa@tripeaks.co.jp>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13602
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: yoichi_yuasa@tripeaks.co.jp
Precedence: bulk
X-list: linux-mips

Hi,

On Mon, 15 Jan 2007 19:36:52 +0100
Florian Fainelli <florian.fainelli@int-evry.fr> wrote:

> Hi all,
> 
> This patch adds support for controlling the front LED on Cobalt Server. It has 
> been tested on Qube 2 with either no default trigger, or the IDE-activity 
> trigger. Both work fine. Please comment and test !
> 
> Thanks
> 
> Florian
> 
> Signed-off-by: Florian Fainelli <florian.fainelli@int-evry.fr>
> 
> diff -urN linux-2.6.19.1/include/asm-mips/mach-cobalt/cobalt.h 
> linux-2.6.19.1.led/include/asm-mips/mach-cobalt/cobalt.h
> --- linux-2.6.19.1/include/asm-mips/mach-cobalt/cobalt.h        2006-12-11 
> 20:32:53.000000000 +0100
> +++ linux-2.6.19.1.led/include/asm-mips/mach-cobalt/cobalt.h    2007-01-15 
> 19:29:07.000000000 +0100
> @@ -97,6 +97,7 @@
>                 (PCI_FUNC (devfn) << 8) | (where)), GT_PCI0_CFGADDR_OFS)
> 
>  #define COBALT_LED_PORT                (*(volatile unsigned char *) 
> CKSEG1ADDR(0x1c000000))
> +#define COBALT_LED_BASE         0xbc000000

You don't need COBALT_LED_BASE.
Because COBALT_LED_PORT is already defined.

Yoichi

From florian.fainelli@int-evry.fr Mon Jan 15 23:34:07 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 15 Jan 2007 23:34:12 +0000 (GMT)
Received: from smtp-ext.int-evry.fr ([157.159.11.17]:10700 "EHLO
	smtp-ext.int-evry.fr") by ftp.linux-mips.org with ESMTP
	id S28577019AbXAOXeH (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Mon, 15 Jan 2007 23:34:07 +0000
Received: from mini.int.alphacore.net (florian.maisel.int-evry.fr [157.159.41.36])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp-ext.int-evry.fr (Postfix) with ESMTP id 49F628D168F;
	Tue, 16 Jan 2007 00:32:54 +0100 (CET)
From:	Florian Fainelli <florian.fainelli@int-evry.fr>
To:	Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Subject: Re: [PATCH] Add support for Cobalt Server front LED
Date:	Tue, 16 Jan 2007 00:33:06 +0100
User-Agent: KMail/1.9.5
Cc:	linux-mips@linux-mips.org
References: <200701151936.57738.florian.fainelli@int-evry.fr> <20070116074205.0428449d.yoichi_yuasa@tripeaks.co.jp>
In-Reply-To: <20070116074205.0428449d.yoichi_yuasa@tripeaks.co.jp>
MIME-Version: 1.0
Content-Type: multipart/signed;
  boundary="nextPart1497024.eRIfmZyur9";
  protocol="application/pgp-signature";
  micalg=pgp-sha1
Content-Transfer-Encoding: 7bit
Message-Id: <200701160033.10947.florian.fainelli@int-evry.fr>
Return-Path: <florian.fainelli@int-evry.fr>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13603
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: florian.fainelli@int-evry.fr
Precedence: bulk
X-list: linux-mips

--nextPart1497024.eRIfmZyur9
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Hi Yoichi,

I first used the COBALT_LED_PORT address but it did not work for a reason I=
=20
ignore. If I use the COBALT_LED_BASE as defined, which is taken from the Co=
Lo=20
code, it works fine.

Do know you what could explain this difference ? Can you test it on your=20
boxes ?

Thank you very much in advance for your answer.

Le lundi 15 janvier 2007 23:42, Yoichi Yuasa a =E9crit=A0:
> Hi,
>
> On Mon, 15 Jan 2007 19:36:52 +0100
>
> Florian Fainelli <florian.fainelli@int-evry.fr> wrote:
> > Hi all,
> >
> > This patch adds support for controlling the front LED on Cobalt Server.
> > It has been tested on Qube 2 with either no default trigger, or the
> > IDE-activity trigger. Both work fine. Please comment and test !
> >
> > Thanks
> >
> > Florian
> >
> > Signed-off-by: Florian Fainelli <florian.fainelli@int-evry.fr>
> >
> > diff -urN linux-2.6.19.1/include/asm-mips/mach-cobalt/cobalt.h
> > linux-2.6.19.1.led/include/asm-mips/mach-cobalt/cobalt.h
> > --- linux-2.6.19.1/include/asm-mips/mach-cobalt/cobalt.h      =20
> > 2006-12-11 20:32:53.000000000 +0100
> > +++ linux-2.6.19.1.led/include/asm-mips/mach-cobalt/cobalt.h  =20
> > 2007-01-15 19:29:07.000000000 +0100
> > @@ -97,6 +97,7 @@
> >                 (PCI_FUNC (devfn) << 8) | (where)), GT_PCI0_CFGADDR_OFS)
> >
> >  #define COBALT_LED_PORT                (*(volatile unsigned char *)
> > CKSEG1ADDR(0x1c000000))
> > +#define COBALT_LED_BASE         0xbc000000
>
> You don't need COBALT_LED_BASE.
> Because COBALT_LED_PORT is already defined.
>
> Yoichi

=2D-=20
Cordialement, Florian Fainelli
=2D--------------------------------------------
5, rue Charles Fourier
Chambre 1202
91011 Evry
http://www.alphacore.net
(+33) 01 60 76 64 21
(+33) 06 09 02 64 95
=2D--------------------------------------------
Association MiNET
http://www.minet.net
=2D--------------------------------------------
Institut National des T=E9l=E9communication
http://www.int-evry.fr/telecomint
=2D--------------------------------------------

--nextPart1497024.eRIfmZyur9
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.1 (GNU/Linux)

iD8DBQBFrA82Q/Yr6D8A81kRAhxAAJ95my1K1YPfmBuamzf5Dbfo/IvLWwCfblr8
qyyzyiJG7Ccm+4Zz0YmDgxo=
=JnCd
-----END PGP SIGNATURE-----

--nextPart1497024.eRIfmZyur9--

From florian.fainelli@int-evry.fr Mon Jan 15 23:55:53 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 15 Jan 2007 23:55:58 +0000 (GMT)
Received: from smtp-ext.int-evry.fr ([157.159.11.17]:21221 "EHLO
	smtp-ext.int-evry.fr") by ftp.linux-mips.org with ESMTP
	id S28643747AbXAOXzx (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Mon, 15 Jan 2007 23:55:53 +0000
Received: from mini.int.alphacore.net (florian.maisel.int-evry.fr [157.159.41.36])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp-ext.int-evry.fr (Postfix) with ESMTP id D39A18D168F
	for <linux-mips@linux-mips.org>; Tue, 16 Jan 2007 00:54:37 +0100 (CET)
From:	Florian Fainelli <florian.fainelli@int-evry.fr>
To:	linux-mips@linux-mips.org
Subject: MTX-1 maintainer
Date:	Tue, 16 Jan 2007 00:54:55 +0100
User-Agent: KMail/1.9.5
MIME-Version: 1.0
Content-Type: multipart/signed;
  boundary="nextPart1304237.zxZomJxB8B";
  protocol="application/pgp-signature";
  micalg=pgp-sha1
Content-Transfer-Encoding: 7bit
Message-Id: <200701160054.55758.florian.fainelli@int-evry.fr>
Return-Path: <florian.fainelli@int-evry.fr>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13604
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: florian.fainelli@int-evry.fr
Precedence: bulk
X-list: linux-mips

--nextPart1304237.zxZomJxB8B
Content-Type: text/plain;
  charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Hi all,

Does somebody still maintain MTX-1 code ? I have some patches at=20
https://dev.openwrt.org/browser/trunk/target/linux/au1000-2.6/patches that=
=20
could probably go mainline if acceptable.

Thank you very much in advance for your answer.
=2D-=20
=46lorian

--nextPart1304237.zxZomJxB8B
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.1 (GNU/Linux)

iD8DBQBFrBRPQ/Yr6D8A81kRAluHAKDFTWcF8HGPOEMhh9Wp7PATcuapwACfeRlr
YOZsrk0ycx4dMjrUVTB1k9s=
=7/BD
-----END PGP SIGNATURE-----

--nextPart1304237.zxZomJxB8B--

From florian.fainelli@int-evry.fr Mon Jan 15 23:56:56 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 15 Jan 2007 23:57:01 +0000 (GMT)
Received: from smtp-ext.int-evry.fr ([157.159.11.17]:41639 "EHLO
	smtp-ext.int-evry.fr") by ftp.linux-mips.org with ESMTP
	id S28643747AbXAOX44 (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Mon, 15 Jan 2007 23:56:56 +0000
Received: from mini.int.alphacore.net (florian.maisel.int-evry.fr [157.159.41.36])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp-ext.int-evry.fr (Postfix) with ESMTP id D82E38D168F;
	Tue, 16 Jan 2007 00:55:42 +0100 (CET)
From:	Florian Fainelli <florian.fainelli@int-evry.fr>
To:	Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Subject: Re: [PATCH] Add support for Cobalt Server front LED
Date:	Tue, 16 Jan 2007 00:56:00 +0100
User-Agent: KMail/1.9.5
Cc:	linux-mips@linux-mips.org
References: <200701151936.57738.florian.fainelli@int-evry.fr> <20070116074205.0428449d.yoichi_yuasa@tripeaks.co.jp> <200701160033.10947.florian.fainelli@int-evry.fr>
In-Reply-To: <200701160033.10947.florian.fainelli@int-evry.fr>
MIME-Version: 1.0
Content-Type: multipart/signed;
  boundary="nextPart4482606.En2iAhNvg2";
  protocol="application/pgp-signature";
  micalg=pgp-sha1
Content-Transfer-Encoding: 7bit
Message-Id: <200701160056.00748.florian.fainelli@int-evry.fr>
Return-Path: <florian.fainelli@int-evry.fr>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13605
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: florian.fainelli@int-evry.fr
Precedence: bulk
X-list: linux-mips

--nextPart4482606.En2iAhNvg2
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Hi Yoichi,

Answering back to myself, since I fixed the stuff using the COBALT_LED_PORT=
,=20
here the corrected patch. Can you queue this patch for a commit if it sound=
s=20
acceptable to you ?

Thank you very much in advance.

diff -urN linux-2.6.19.1/drivers/leds/leds-cobalt.c=20
linux-2.6.19.1.led/drivers/leds/leds-cobalt.c
=2D-- linux-2.6.19.1/drivers/leds/leds-cobalt.c =A0 1970-01-01 01:00:00.000=
000000=20
+0100
+++ linux-2.6.19.1.led/drivers/leds/leds-cobalt.c =A0 =A0 =A0 2007-01-16=20
00:49:20.000000000 +0100
@@ -0,0 +1,55 @@
+#include <linux/module.h>
+#include <linux/types.h>
+#include <linux/kernel.h>
+#include <linux/device.h>
+#include <linux/leds.h>
+#include <asm/mach-cobalt/cobalt.h>
+
+/* Copyright 2006 - Florian Fainelli <florian@openwrt.org>
+ *
+ * This driver let you control the Cobalt Qube/RaQ front LED
+ *
+ * 255 (max brightness) -> turn the led on
+ * 0 -> turn the led off
+ *
+ * If you want the LED to be blinking on IDE activity, select the IDE trig=
ger
+ */
+
+void cobalt_led_set(struct led_classdev *led_cdev, enum led_brightness=20
brightness)
+{
+ =A0 =A0 =A0 switch (brightness) {
+ =A0 =A0 =A0 case LED_OFF:
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 COBALT_LED_PORT =3D 0;
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 break;
+ =A0 =A0 =A0 case LED_FULL:
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 COBALT_LED_PORT =3D COBALT_LED_BAR_LEFT | COB=
ALT_LED_BAR_RIGHT;
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 break;
+ =A0 =A0 =A0 default:
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 return;
+ =A0 =A0 =A0 }
+}
+
+static struct led_classdev cobalt_led =3D {
+ =A0 =A0 =A0 .name =3D "cobalt-front-led",
+ =A0 =A0 =A0 .brightness_set =3D cobalt_led_set,
+#ifdef CONFIG_LEDS_TRIGGER_IDE_DISK
+ =A0 =A0 =A0 .default_trigger =3D "ide-disk",
+#endif
+};
+
+static int __init cobalt_led_init(void)
+{
+ =A0 =A0 =A0 return led_classdev_register(NULL, &cobalt_led);
+}
+
+static void __exit cobalt_led_exit(void)
+{
+ =A0 =A0 =A0 led_classdev_unregister(&cobalt_led);
+}
+
+module_init(cobalt_led_init);
+module_exit(cobalt_led_exit);
+
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("Front LED support for Cobalt Server");
+MODULE_AUTHOR("Florian Fainelli <florian@openwrt.org>");

Le mardi 16 janvier 2007 00:33, Florian Fainelli a =E9crit=A0:
> Hi Yoichi,
>
> I first used the COBALT_LED_PORT address but it did not work for a reason=
 I
> ignore. If I use the COBALT_LED_BASE as defined, which is taken from the
> CoLo code, it works fine.
>
> Do know you what could explain this difference ? Can you test it on your
> boxes ?
>
> Thank you very much in advance for your answer.
>
> Le lundi 15 janvier 2007 23:42, Yoichi Yuasa a =E9crit=A0:
> > Hi,
> >
> > On Mon, 15 Jan 2007 19:36:52 +0100
> >
> > Florian Fainelli <florian.fainelli@int-evry.fr> wrote:
> > > Hi all,
> > >
> > > This patch adds support for controlling the front LED on Cobalt Serve=
r.
> > > It has been tested on Qube 2 with either no default trigger, or the
> > > IDE-activity trigger. Both work fine. Please comment and test !
> > >
> > > Thanks
> > >
> > > Florian
> > >
> > > Signed-off-by: Florian Fainelli <florian.fainelli@int-evry.fr>
> > >
> > > diff -urN linux-2.6.19.1/include/asm-mips/mach-cobalt/cobalt.h
> > > linux-2.6.19.1.led/include/asm-mips/mach-cobalt/cobalt.h
> > > --- linux-2.6.19.1/include/asm-mips/mach-cobalt/cobalt.h
> > > 2006-12-11 20:32:53.000000000 +0100
> > > +++ linux-2.6.19.1.led/include/asm-mips/mach-cobalt/cobalt.h
> > > 2007-01-15 19:29:07.000000000 +0100
> > > @@ -97,6 +97,7 @@
> > >                 (PCI_FUNC (devfn) << 8) | (where)),
> > > GT_PCI0_CFGADDR_OFS)
> > >
> > >  #define COBALT_LED_PORT                (*(volatile unsigned char *)
> > > CKSEG1ADDR(0x1c000000))
> > > +#define COBALT_LED_BASE         0xbc000000
> >
> > You don't need COBALT_LED_BASE.
> > Because COBALT_LED_PORT is already defined.
> >
> > Yoichi

=2D-=20
Cordialement, Florian Fainelli
=2D--------------------------------------------
5, rue Charles Fourier
Chambre 1202
91011 Evry
http://www.alphacore.net
(+33) 01 60 76 64 21
(+33) 06 09 02 64 95
=2D--------------------------------------------
Association MiNET
http://www.minet.net
=2D--------------------------------------------
Institut National des T=E9l=E9communication
http://www.int-evry.fr/telecomint
=2D--------------------------------------------

--nextPart4482606.En2iAhNvg2
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.1 (GNU/Linux)

iD8DBQBFrBSQQ/Yr6D8A81kRAvWYAJsGeIspEpyCy9a/dDHbDjA8txnkigCeJcFd
wG36aAGDNG/YFWz1Y+BG1VE=
=1+gq
-----END PGP SIGNATURE-----

--nextPart4482606.En2iAhNvg2--

From phorton@bitbox.co.uk Tue Jan 16 09:53:25 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 09:53:30 +0000 (GMT)
Received: from outmail1.freedom2surf.net ([194.106.33.237]:59589 "EHLO
	outmail1.freedom2surf.net") by ftp.linux-mips.org with ESMTP
	id S28771549AbXAPJxZ (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 09:53:25 +0000
Received: from [172.16.97.170] (f2s.colonel-panic.org [83.67.53.76])
	by outmail1.freedom2surf.net (Postfix) with ESMTP
	id 6590324CA14; Tue, 16 Jan 2007 09:53:19 +0000 (GMT)
Message-ID: <45ACA08F.8000203@bitbox.co.uk>
Date:	Tue, 16 Jan 2007 09:53:19 +0000
From:	Peter Horton <phorton@bitbox.co.uk>
User-Agent: Thunderbird 1.5.0.9 (Windows/20061207)
MIME-Version: 1.0
To:	Florian Fainelli <florian.fainelli@int-evry.fr>
Cc:	linux-mips@linux-mips.org
Subject: Re: [PATCH] Add support for Cobalt Server front LED
References: <200701151936.57738.florian.fainelli@int-evry.fr>
In-Reply-To: <200701151936.57738.florian.fainelli@int-evry.fr>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Return-Path: <phorton@bitbox.co.uk>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13606
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: phorton@bitbox.co.uk
Precedence: bulk
X-list: linux-mips

Florian Fainelli wrote:
> 
> This patch adds support for controlling the front LED on Cobalt Server. It has 
> been tested on Qube 2 with either no default trigger, or the IDE-activity 
> trigger. Both work fine. Please comment and test !
>

Why did you add COBALT_LED_BASE when there was already a COBALT_LED_PORT 
define on the line above ?

All your

	*(volatile uint8_t *) COBALT_LED_BASE = n;

can be replaced by

	COBALT_LED_PORT = n;

P.

From florian.fainelli@int-evry.fr Tue Jan 16 10:17:42 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 10:17:48 +0000 (GMT)
Received: from smtp-ext.int-evry.fr ([157.159.11.17]:52904 "EHLO
	smtp-ext.int-evry.fr") by ftp.linux-mips.org with ESMTP
	id S20051533AbXAPKRm (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 10:17:42 +0000
Received: from mini.int.alphacore.net (florian.maisel.int-evry.fr [157.159.41.36])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp-ext.int-evry.fr (Postfix) with ESMTP id 45850D0E315;
	Tue, 16 Jan 2007 11:16:28 +0100 (CET)
From:	Florian Fainelli <florian.fainelli@int-evry.fr>
To:	Peter Horton <phorton@bitbox.co.uk>
Subject: Re: [PATCH] Add support for Cobalt Server front LED
Date:	Tue, 16 Jan 2007 11:14:55 +0100
User-Agent: KMail/1.9.5
Cc:	linux-mips@linux-mips.org
References: <200701151936.57738.florian.fainelli@int-evry.fr> <45ACA08F.8000203@bitbox.co.uk>
In-Reply-To: <45ACA08F.8000203@bitbox.co.uk>
MIME-Version: 1.0
Content-Type: multipart/signed;
  boundary="nextPart4605224.VkHRzjHuEv";
  protocol="application/pgp-signature";
  micalg=pgp-sha1
Content-Transfer-Encoding: 7bit
Message-Id: <200701161114.59117.florian.fainelli@int-evry.fr>
Return-Path: <florian.fainelli@int-evry.fr>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13607
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: florian.fainelli@int-evry.fr
Precedence: bulk
X-list: linux-mips

--nextPart4605224.VkHRzjHuEv
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Hi Peter,

The patch I resend last night is using COBALT_LED_PORT. Is there anything e=
lse=20
that needs to be changed ? Thank you in advance for your answer

Le mardi 16 janvier 2007 10:53, Peter Horton a =E9crit=A0:
> Florian Fainelli wrote:
> > This patch adds support for controlling the front LED on Cobalt Server.
> > It has been tested on Qube 2 with either no default trigger, or the
> > IDE-activity trigger. Both work fine. Please comment and test !
>
> Why did you add COBALT_LED_BASE when there was already a COBALT_LED_PORT
> define on the line above ?
>
> All your
>
> 	*(volatile uint8_t *) COBALT_LED_BASE =3D n;
>
> can be replaced by
>
> 	COBALT_LED_PORT =3D n;
>
> P.

=2D-=20
Cordialement, Florian Fainelli
=2D--------------------------------------------
5, rue Charles Fourier
Chambre 1202
91011 Evry
http://www.alphacore.net
(+33) 01 60 76 64 21
(+33) 06 09 02 64 95
=2D--------------------------------------------
Association MiNET
http://www.minet.net
=2D--------------------------------------------
Institut National des T=E9l=E9communication
http://www.int-evry.fr/telecomint
=2D--------------------------------------------

--nextPart4605224.VkHRzjHuEv
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.1 (GNU/Linux)

iD8DBQBFrKWjQ/Yr6D8A81kRAtYHAJ9qGoB2LTukALRE59Ls/sUfDxPv6gCdH0Ht
psyALYY8wvhne5PW5XqUOKQ=
=6g0Q
-----END PGP SIGNATURE-----

--nextPart4605224.VkHRzjHuEv--

From ralf@linux-mips.org Tue Jan 16 12:59:59 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 13:00:01 +0000 (GMT)
Received: from localhost.localdomain ([127.0.0.1]:11237 "EHLO
	dl5rb.ham-radio-op.net") by ftp.linux-mips.org with ESMTP
	id S20040936AbXAPM77 (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 12:59:59 +0000
Received: from denk.linux-mips.net (denk.linux-mips.net [127.0.0.1])
	by dl5rb.ham-radio-op.net (8.13.8/8.13.8) with ESMTP id l0GCvqTG025059;
	Tue, 16 Jan 2007 12:57:53 GMT
Received: (from ralf@localhost)
	by denk.linux-mips.net (8.13.8/8.13.8/Submit) id l0GCvMqH024921;
	Tue, 16 Jan 2007 12:57:22 GMT
Date:	Tue, 16 Jan 2007 12:57:22 +0000
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc:	linux-mips@linux-mips.org
Subject: Re: [PATCH] Make I8259A_IRQ_BASE customizable
Message-ID: <20070116125722.GA24642@linux-mips.org>
References: <20070114.234142.41198466.anemo@mba.ocn.ne.jp>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20070114.234142.41198466.anemo@mba.ocn.ne.jp>
User-Agent: Mutt/1.4.2.2i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13608
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips

On Sun, Jan 14, 2007 at 11:41:42PM +0900, Atsushi Nemoto wrote:

> Move I8259A_IRQ_BASE from asm/i8259.h to asm/mach-generic/irq.h and
> make it really customizable.  And remove I8259_IRQ_BASE declared on
> some platforms.  Currently only NEC_CMBVR4133 is using custom
> I8259A_IRQ_BASE value.
> 
> Testing this patch on those platforms is greatly appreciated.  Thank
> you.
> 
> Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
> ---
> This patch depends on "Define MIPS_CPU_IRQ_BASE in generic header"
> patch which is in linux-queue tree.

Thanks, also in the queue.

  Ralf

From anemo@mba.ocn.ne.jp Tue Jan 16 14:29:16 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 14:29:21 +0000 (GMT)
Received: from mba.ocn.ne.jp ([210.190.142.172]:40665 "HELO smtp.mba.ocn.ne.jp")
	by ftp.linux-mips.org with SMTP id S20046699AbXAPO3Q (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Tue, 16 Jan 2007 14:29:16 +0000
Received: from localhost (p1128-ipad01funabasi.chiba.ocn.ne.jp [61.126.134.129])
	by smtp.mba.ocn.ne.jp (Postfix) with ESMTP
	id 958ADA2BA; Tue, 16 Jan 2007 23:29:11 +0900 (JST)
Date:	Tue, 16 Jan 2007 23:29:11 +0900 (JST)
Message-Id: <20070116.232911.126576645.anemo@mba.ocn.ne.jp>
To:	linux-mips@linux-mips.org
Cc:	ralf@linux-mips.org
Subject: [PATCH] kconfig: move some entries to appropriate menu
From:	Atsushi Nemoto <anemo@mba.ocn.ne.jp>
X-Fingerprint: 6ACA 1623 39BD 9A94 9B1A  B746 CA77 FE94 2874 D52F
X-Pgp-Public-Key: http://wwwkeys.pgp.net/pks/lookup?op=get&search=0x2874D52F
X-Mailer: Mew version 3.3 on Emacs 21.4 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Return-Path: <anemo@mba.ocn.ne.jp>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13609
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: anemo@mba.ocn.ne.jp
Precedence: bulk
X-list: linux-mips

Currently KEXEC is in "Machine selection", SECCOMP, PM, APM are in
"Executable file formats" menu.  Move KEXEC and SECCOMP to "Kernel
type" and PM, APM to new "Power management options" menu.  Also
replace "config PM" with kernel/power/Kconfig.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
---
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 07f1b43..77a434b 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -790,23 +790,6 @@ config TOSHIBA_RBTX4938
 
 endchoice
 
-config KEXEC
- 	bool "Kexec system call (EXPERIMENTAL)"
- 	depends on EXPERIMENTAL
- 	help
- 	  kexec is a system call that implements the ability to shutdown your
- 	  current kernel, and to start another kernel.  It is like a reboot
- 	  but it is indepedent of the system firmware.   And like a reboot
- 	  you can start any kernel with it, not just Linux.
-
- 	  The name comes from the similiarity to the exec system call.
-
- 	  It is an ongoing process to be certain the hardware in a machine
- 	  is properly shutdown, so do not be surprised if this code does not
- 	  initially work for you.  It may help to enable device hotplugging
- 	  support.  As of this writing the exact hardware interface is
- 	  strongly in flux, so no good recommendation can be made.
-
 source "arch/mips/ddb5xxx/Kconfig"
 source "arch/mips/gt64120/ev64120/Kconfig"
 source "arch/mips/jazz/Kconfig"
@@ -1845,6 +1828,40 @@ config MIPS_INSANE_LARGE
 	  This will result in additional memory usage, so it is not
 	  recommended for normal users.
 
+config KEXEC
+ 	bool "Kexec system call (EXPERIMENTAL)"
+ 	depends on EXPERIMENTAL
+ 	help
+ 	  kexec is a system call that implements the ability to shutdown your
+ 	  current kernel, and to start another kernel.  It is like a reboot
+ 	  but it is indepedent of the system firmware.   And like a reboot
+ 	  you can start any kernel with it, not just Linux.
+
+ 	  The name comes from the similiarity to the exec system call.
+
+ 	  It is an ongoing process to be certain the hardware in a machine
+ 	  is properly shutdown, so do not be surprised if this code does not
+ 	  initially work for you.  It may help to enable device hotplugging
+ 	  support.  As of this writing the exact hardware interface is
+ 	  strongly in flux, so no good recommendation can be made.
+
+config SECCOMP
+	bool "Enable seccomp to safely compute untrusted bytecode"
+	depends on PROC_FS && BROKEN
+	default y
+	help
+	  This kernel feature is useful for number crunching applications
+	  that may need to compute untrusted bytecode during their
+	  execution. By using pipes or other transports made available to
+	  the process as file descriptors supporting the read/write
+	  syscalls, it's possible to isolate those applications in
+	  their own address space using seccomp. Once seccomp is
+	  enabled via /proc/<pid>/seccomp, it cannot be disabled
+	  and the task is only allowed to execute a few safe syscalls
+	  defined by each seccomp mode.
+
+	  If unsure, say Y. Only embedded should say N here.
+
 endmenu
 
 config RWSEM_GENERIC_SPINLOCK
@@ -2011,26 +2028,12 @@ config BINFMT_ELF32
 	bool
 	default y if MIPS32_O32 || MIPS32_N32
 
-config SECCOMP
-	bool "Enable seccomp to safely compute untrusted bytecode"
-	depends on PROC_FS && BROKEN
-	default y
-	help
-	  This kernel feature is useful for number crunching applications
-	  that may need to compute untrusted bytecode during their
-	  execution. By using pipes or other transports made available to
-	  the process as file descriptors supporting the read/write
-	  syscalls, it's possible to isolate those applications in
-	  their own address space using seccomp. Once seccomp is
-	  enabled via /proc/<pid>/seccomp, it cannot be disabled
-	  and the task is only allowed to execute a few safe syscalls
-	  defined by each seccomp mode.
+endmenu
 
-	  If unsure, say Y. Only embedded should say N here.
+menu "Power management options (EXPERIMENTAL)"
+depends on EXPERIMENTAL && SOC_AU1X00
 
-config PM
-	bool "Power Management support (EXPERIMENTAL)"
-	depends on EXPERIMENTAL && SOC_AU1X00
+source kernel/power/Kconfig
 
 config APM
         tristate "Advanced Power Management Emulation"

From Marc_St-Jean@pmc-sierra.com Tue Jan 16 14:32:17 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 14:32:22 +0000 (GMT)
Received: from father.pmc-sierra.com ([216.241.224.13]:5048 "HELO
	father.pmc-sierra.bc.ca") by ftp.linux-mips.org with SMTP
	id S20041122AbXAPOcR (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 14:32:17 +0000
Received: (qmail 9533 invoked by uid 101); 16 Jan 2007 14:32:10 -0000
Received: from unknown (HELO pmxedge1.pmc-sierra.bc.ca) (216.241.226.183)
  by father.pmc-sierra.com with SMTP; 16 Jan 2007 14:32:10 -0000
Received: from bby1exi01.pmc_nt.nt.pmc-sierra.bc.ca (bby1exi01.pmc-sierra.bc.ca [216.241.231.251])
	by pmxedge1.pmc-sierra.bc.ca (8.13.4/8.12.7) with ESMTP id l0GEW0Oh003632
	for <linux-mips@linux-mips.org>; Tue, 16 Jan 2007 06:32:08 -0800
Received: by bby1exi01.pmc-sierra.bc.ca with Internet Mail Service (5.5.2657.72)
	id <C6N4DJQF>; Mon, 15 Jan 2007 12:21:38 -0800
Message-ID: <5C1FD43E5F1B824E83985A74F396286E03AD7608@bby1exm08.pmc_nt.nt.pmc-sierra.bc.ca>
From:	Marc St-Jean <Marc_St-Jean@pmc-sierra.com>
To:	"'linux-mips@linux-mips.org'" <linux-mips@linux-mips.org>
Subject: Questions on new platform submission
Date:	Mon, 15 Jan 2007 12:21:32 -0800
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2657.72)
Content-Type: text/plain
Return-Path: <Marc_St-Jean@pmc-sierra.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13610
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: Marc_St-Jean@pmc-sierra.com
Precedence: bulk
X-list: linux-mips

Hi all,

I am about to submit a new platform and have a few questions to attempt the reduce the number of iterations:

1. Should I prepare the patches against the linux.git master?

2. Form previous posts I'm assuming patches for the serial driver (drivers/serial/8250.c) should not go to this list but the serial maintainer. Is this correct?

3. Same question for USB driver (mostly drivers/usb/host and gadget), should I send to a usb maintainer?

Advanced thanks,
Marc

From ralf@linux-mips.org Tue Jan 16 15:44:18 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 15:44:19 +0000 (GMT)
Received: from localhost.localdomain ([127.0.0.1]:53201 "EHLO
	dl5rb.ham-radio-op.net") by ftp.linux-mips.org with ESMTP
	id S28580558AbXAPPoS (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 15:44:18 +0000
Received: from denk.linux-mips.net (denk.linux-mips.net [127.0.0.1])
	by dl5rb.ham-radio-op.net (8.13.8/8.13.8) with ESMTP id l0GFj9d2007253;
	Tue, 16 Jan 2007 15:45:09 GMT
Received: (from ralf@localhost)
	by denk.linux-mips.net (8.13.8/8.13.8/Submit) id l0GFj3bF007252;
	Tue, 16 Jan 2007 15:45:03 GMT
Date:	Tue, 16 Jan 2007 15:45:03 +0000
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Marc St-Jean <Marc_St-Jean@pmc-sierra.com>
Cc:	"'linux-mips@linux-mips.org'" <linux-mips@linux-mips.org>
Subject: Re: Questions on new platform submission
Message-ID: <20070116154503.GA6391@linux-mips.org>
References: <5C1FD43E5F1B824E83985A74F396286E03AD7608@bby1exm08.pmc_nt.nt.pmc-sierra.bc.ca>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <5C1FD43E5F1B824E83985A74F396286E03AD7608@bby1exm08.pmc_nt.nt.pmc-sierra.bc.ca>
User-Agent: Mutt/1.4.2.2i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13611
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips

On Mon, Jan 15, 2007 at 12:21:32PM -0800, Marc St-Jean wrote:

> I am about to submit a new platform and have a few questions to attempt the reduce the number of iterations:
> 
> 1. Should I prepare the patches against the linux.git master?

Yes.

> 2. Form previous posts I'm assuming patches for the serial driver (drivers/serial/8250.c) should not go to this list but the serial maintainer. Is this correct?

Yes - however a cc to the linux-mips list can't harm in case there are
any issues raised.

> 3. Same question for USB driver (mostly drivers/usb/host and gadget), should I send to a usb maintainer?

Dito.

  Ralf

From alan@lxorguk.ukuu.org.uk Tue Jan 16 15:50:41 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 15:50:46 +0000 (GMT)
Received: from outpipe-village-512-1.bc.nu ([81.2.110.250]:42662 "EHLO
	lxorguk.ukuu.org.uk") by ftp.linux-mips.org with ESMTP
	id S28580643AbXAPPul (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 15:50:41 +0000
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by lxorguk.ukuu.org.uk (8.13.8/8.13.4) with ESMTP id l0GG2Slo007104;
	Tue, 16 Jan 2007 16:02:28 GMT
Date:	Tue, 16 Jan 2007 16:02:27 +0000
From:	Alan <alan@lxorguk.ukuu.org.uk>
To:	Ralf Baechle <ralf@linux-mips.org>
Cc:	Marc St-Jean <Marc_St-Jean@pmc-sierra.com>,
	"'linux-mips@linux-mips.org'" <linux-mips@linux-mips.org>
Subject: Re: Questions on new platform submission
Message-ID: <20070116160227.668f1271@localhost.localdomain>
In-Reply-To: <20070116154503.GA6391@linux-mips.org>
References: <5C1FD43E5F1B824E83985A74F396286E03AD7608@bby1exm08.pmc_nt.nt.pmc-sierra.bc.ca>
	<20070116154503.GA6391@linux-mips.org>
X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.10.4; x86_64-redhat-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Return-Path: <alan@lxorguk.ukuu.org.uk>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13612
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: alan@lxorguk.ukuu.org.uk
Precedence: bulk
X-list: linux-mips

> > 2. Form previous posts I'm assuming patches for the serial driver (drivers/serial/8250.c) should not go to this list but the serial maintainer. Is this correct?
> 
> Yes - however a cc to the linux-mips list can't harm in case there are
> any issues raised.

There is no serial maintainer, so please send them to linux-kernel and cc
linux-serial to be picked up.

Alan

From ebiederm@xmission.com Tue Jan 16 16:37:01 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 16:37:05 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:42967 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S20041430AbXAPQhB (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:37:01 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGYSew000719;
	Tue, 16 Jan 2007 09:34:28 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGXl8M000468;
	Tue, 16 Jan 2007 09:33:47 -0700
X-Authentication-Warning: ebiederm.dsl.xmission.com: eric set sender to ebiederm@xmission.com using -f
From:	ebiederm@xmission.com (Eric W. Biederman)
To:	Andrew Morton <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>,
	Linux Containers <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, lethal@linux-sh.org,
	linuxsh-shmedia-dev@lists.sourceforge.net, <ak@suse.de>,
	vojtech@suse.cz, clemens@ladisch.de, a.zummo@towertech.it,
	rtc-linux@googlegroups.com, linux-parport@lists.infradead.org,
	andrea@suse.de, tim@cyberelk.net, philb@gnu.org,
	aharkes@cs.cmu.edu, coda@cs.cmu.edu,
	codalist@TELEMANN.coda.cs.cmu.edu, aia21@cantab.net,
	linux-ntfs-dev@lists.sourceforge.net, mark.fasheh@oracle.com,
	kurt.hackel@oracle.com
Subject: [PATCH 0/59] Cleanup sysctl 
Date:	Tue, 16 Jan 2007 09:33:47 -0700
Message-ID: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Return-Path: <ebiederm@xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13613
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips


There has not been much maintenance on sysctl in years, and as a result is
there is a lot to do to allow future interesting work to happen, and being
ambitious I'm trying to do it all at once :)

The patches in this series fall into several general categories.

- Removal of useless attempts to override the standard sysctls

- Registers of sysctl numbers in sysctl.h so someone else does not use
  the magic number and conflict.

- C99 conversions so it becomes possible to change the layout of 
  struct ctl_table without breaking everything.

- Removal of useless claims of module ownership, in the proc dir entries

- Removal of sys_sysctl support where people had used conflicting sysctl
  numbers. Trying to break glibc or other applications by changing the
  ABI is not cool.  9 instances of this in the kernel seems a little
  extreme.

- General enhancements when I got the junk I could see out.

Odds are I missed something, most of the cleanups are simply a result of
me working on the sysctl core and glancing at the users and going: What?

Eric

From eric@ebiederm.dsl.xmission.com Tue Jan 16 16:41:12 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 16:41:16 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:62848 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S20041436AbXAPQlM (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:41:12 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGecAd000949;
	Tue, 16 Jan 2007 09:40:38 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGebp4000948;
	Tue, 16 Jan 2007 09:40:37 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 20/59] sysctl: cdrom Don't set de->owner
Date:	Tue, 16 Jan 2007 09:39:25 -0700
Message-Id: <11689656373737-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13614
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

There is no need for open files in /proc/sys/XXX to hold
a reference count on the module that provides the file
to prevent module unload races.  While there is code active
in the module p->used in the sysctl_table_header is incremented,
preventing the sysctl from being unregisted.  Once the
sysctl is unregistered it cannot be found.  Open files
are also not a problem as they revalidate the sysctl information
and bump p->used before accessing module code.

So setting de->owner is unnecessary, makes for a bad example
and gets in my way of removing ctl_table->de.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 drivers/cdrom/cdrom.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
index f0a6801..14f72c4 100644
--- a/drivers/cdrom/cdrom.c
+++ b/drivers/cdrom/cdrom.c
@@ -3554,8 +3554,6 @@ static void cdrom_sysctl_register(void)
 		return;
 
 	cdrom_sysctl_header = register_sysctl_table(cdrom_root_table, 0);
-	if (cdrom_root_table->ctl_name && cdrom_root_table->child->de)
-		cdrom_root_table->child->de->owner = THIS_MODULE;
 
 	/* set the defaults */
 	cdrom_sysctl_settings.autoclose = autoclose;
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 16:41:40 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 16:41:45 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:63872 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S20041441AbXAPQlM (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:41:12 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGeMuU000896;
	Tue, 16 Jan 2007 09:40:22 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGeMGF000895;
	Tue, 16 Jan 2007 09:40:22 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 7/59] sysctl: llc remove unnecessary insert_at_head flag
Date:	Tue, 16 Jan 2007 09:39:12 -0700
Message-Id: <1168965622720-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13615
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

The sysctl numbers used are unique so setting the insert_at_head
flag serves no semantis purpose, and is just confusing.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 net/llc/sysctl_net_llc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/llc/sysctl_net_llc.c b/net/llc/sysctl_net_llc.c
index 45d7dd9..4aab676 100644
--- a/net/llc/sysctl_net_llc.c
+++ b/net/llc/sysctl_net_llc.c
@@ -116,7 +116,7 @@ static struct ctl_table_header *llc_table_header;
 
 int __init llc_sysctl_init(void)
 {
-	llc_table_header = register_sysctl_table(llc_root_table, 1);
+	llc_table_header = register_sysctl_table(llc_root_table, 0);
 
 	return llc_table_header ? 0 : -ENOMEM;
 }
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 16:42:09 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 16:42:15 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:641 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S20041448AbXAPQlO (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:41:14 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGebUr000945;
	Tue, 16 Jan 2007 09:40:37 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGea3G000944;
	Tue, 16 Jan 2007 09:40:36 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 19/59] sysctl: cdrom remove unnecessary insert_at_head flag
Date:	Tue, 16 Jan 2007 09:39:24 -0700
Message-Id: <11689656363765-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13616
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

With unique binary sysctl numbers setting insert_at_head to
override other sysctl entries is pointless.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 drivers/cdrom/cdrom.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
index 3105ddd..f0a6801 100644
--- a/drivers/cdrom/cdrom.c
+++ b/drivers/cdrom/cdrom.c
@@ -3553,7 +3553,7 @@ static void cdrom_sysctl_register(void)
 	if (initialized == 1)
 		return;
 
-	cdrom_sysctl_header = register_sysctl_table(cdrom_root_table, 1);
+	cdrom_sysctl_header = register_sysctl_table(cdrom_root_table, 0);
 	if (cdrom_root_table->ctl_name && cdrom_root_table->child->de)
 		cdrom_root_table->child->de->owner = THIS_MODULE;
 
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 16:42:39 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 16:42:43 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:1409 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S20041456AbXAPQlP (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:41:15 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGeUi3000925;
	Tue, 16 Jan 2007 09:40:30 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGeUNo000924;
	Tue, 16 Jan 2007 09:40:30 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 14/59] sysctl: C99 convert xfs ctl_tables
Date:	Tue, 16 Jan 2007 09:39:19 -0700
Message-Id: <11689656301563-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13617
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 fs/xfs/linux-2.6/xfs_sysctl.c |  258 ++++++++++++++++++++++++++++------------
 1 files changed, 180 insertions(+), 78 deletions(-)

diff --git a/fs/xfs/linux-2.6/xfs_sysctl.c b/fs/xfs/linux-2.6/xfs_sysctl.c
index af777e9..5a0eefc 100644
--- a/fs/xfs/linux-2.6/xfs_sysctl.c
+++ b/fs/xfs/linux-2.6/xfs_sysctl.c
@@ -55,95 +55,197 @@ xfs_stats_clear_proc_handler(
 #endif /* CONFIG_PROC_FS */
 
 STATIC ctl_table xfs_table[] = {
-	{XFS_RESTRICT_CHOWN, "restrict_chown", &xfs_params.restrict_chown.val,
-	sizeof(int), 0644, NULL, &proc_dointvec_minmax,
-	&sysctl_intvec, NULL,
-	&xfs_params.restrict_chown.min, &xfs_params.restrict_chown.max},
-
-	{XFS_SGID_INHERIT, "irix_sgid_inherit", &xfs_params.sgid_inherit.val,
-	sizeof(int), 0644, NULL, &proc_dointvec_minmax,
-	&sysctl_intvec, NULL,
-	&xfs_params.sgid_inherit.min, &xfs_params.sgid_inherit.max},
-
-	{XFS_SYMLINK_MODE, "irix_symlink_mode", &xfs_params.symlink_mode.val,
-	sizeof(int), 0644, NULL, &proc_dointvec_minmax,
-	&sysctl_intvec, NULL,
-	&xfs_params.symlink_mode.min, &xfs_params.symlink_mode.max},
-
-	{XFS_PANIC_MASK, "panic_mask", &xfs_params.panic_mask.val,
-	sizeof(int), 0644, NULL, &proc_dointvec_minmax,
-	&sysctl_intvec, NULL,
-	&xfs_params.panic_mask.min, &xfs_params.panic_mask.max},
-
-	{XFS_ERRLEVEL, "error_level", &xfs_params.error_level.val,
-	sizeof(int), 0644, NULL, &proc_dointvec_minmax,
-	&sysctl_intvec, NULL,
-	&xfs_params.error_level.min, &xfs_params.error_level.max},
-
-	{XFS_SYNCD_TIMER, "xfssyncd_centisecs", &xfs_params.syncd_timer.val,
-	sizeof(int), 0644, NULL, &proc_dointvec_minmax,
-	&sysctl_intvec, NULL,
-	&xfs_params.syncd_timer.min, &xfs_params.syncd_timer.max},
-
-	{XFS_INHERIT_SYNC, "inherit_sync", &xfs_params.inherit_sync.val,
-	sizeof(int), 0644, NULL, &proc_dointvec_minmax,
-	&sysctl_intvec, NULL,
-	&xfs_params.inherit_sync.min, &xfs_params.inherit_sync.max},
-
-	{XFS_INHERIT_NODUMP, "inherit_nodump", &xfs_params.inherit_nodump.val,
-	sizeof(int), 0644, NULL, &proc_dointvec_minmax,
-	&sysctl_intvec, NULL,
-	&xfs_params.inherit_nodump.min, &xfs_params.inherit_nodump.max},
-
-	{XFS_INHERIT_NOATIME, "inherit_noatime", &xfs_params.inherit_noatim.val,
-	sizeof(int), 0644, NULL, &proc_dointvec_minmax,
-	&sysctl_intvec, NULL,
-	&xfs_params.inherit_noatim.min, &xfs_params.inherit_noatim.max},
-
-	{XFS_BUF_TIMER, "xfsbufd_centisecs", &xfs_params.xfs_buf_timer.val,
-	sizeof(int), 0644, NULL, &proc_dointvec_minmax,
-	&sysctl_intvec, NULL,
-	&xfs_params.xfs_buf_timer.min, &xfs_params.xfs_buf_timer.max},
-
-	{XFS_BUF_AGE, "age_buffer_centisecs", &xfs_params.xfs_buf_age.val,
-	sizeof(int), 0644, NULL, &proc_dointvec_minmax,
-	&sysctl_intvec, NULL,
-	&xfs_params.xfs_buf_age.min, &xfs_params.xfs_buf_age.max},
-
-	{XFS_INHERIT_NOSYM, "inherit_nosymlinks", &xfs_params.inherit_nosym.val,
-	sizeof(int), 0644, NULL, &proc_dointvec_minmax,
-	&sysctl_intvec, NULL,
-	&xfs_params.inherit_nosym.min, &xfs_params.inherit_nosym.max},
-
-	{XFS_ROTORSTEP, "rotorstep", &xfs_params.rotorstep.val,
-	sizeof(int), 0644, NULL, &proc_dointvec_minmax,
-	&sysctl_intvec, NULL,
-	&xfs_params.rotorstep.min, &xfs_params.rotorstep.max},
-
-	{XFS_INHERIT_NODFRG, "inherit_nodefrag", &xfs_params.inherit_nodfrg.val,
-	sizeof(int), 0644, NULL, &proc_dointvec_minmax,
-	&sysctl_intvec, NULL,
-	&xfs_params.inherit_nodfrg.min, &xfs_params.inherit_nodfrg.max},
+	{
+		.ctl_name	= XFS_RESTRICT_CHOWN,
+		.procname	= "restrict_chown",
+		.data		= &xfs_params.restrict_chown.val,
+		.maxlen		= sizeof(int),
+		.mode		= 0644,
+		.proc_handler	= &proc_dointvec_minmax,
+		.strategy	= &sysctl_intvec,
+		.extra1		= &xfs_params.restrict_chown.min,
+		.extra2		= &xfs_params.restrict_chown.max
+	},
+	{
+		.ctl_name	= XFS_SGID_INHERIT,
+		.procname	= "irix_sgid_inherit",
+		.data		= &xfs_params.sgid_inherit.val,
+		.maxlen		= sizeof(int),
+		.mode		= 0644,
+		.proc_handler	= &proc_dointvec_minmax,
+		.strategy	= &sysctl_intvec,
+		.extra1		= &xfs_params.sgid_inherit.min,
+		.extra2		= &xfs_params.sgid_inherit.max
+	},
+	{
+		.ctl_name	= XFS_SYMLINK_MODE,
+		.procname	= "irix_symlink_mode",
+		.data		= &xfs_params.symlink_mode.val,
+		.maxlen		= sizeof(int),
+		.mode		= 0644,
+		.proc_handler	= &proc_dointvec_minmax,
+		.strategy	= &sysctl_intvec,
+		.extra1		= &xfs_params.symlink_mode.min,
+		.extra2		= &xfs_params.symlink_mode.max
+	},
+	{
+		.ctl_name	= XFS_PANIC_MASK,
+		.procname	= "panic_mask",
+		.data		= &xfs_params.panic_mask.val,
+		.maxlen		= sizeof(int),
+		.mode		= 0644,
+		.proc_handler	=  &proc_dointvec_minmax,
+		.strategy	= &sysctl_intvec,
+		.extra1		= &xfs_params.panic_mask.min,
+		.extra2		= &xfs_params.panic_mask.max
+	},
 
+	{
+		.ctl_name	= XFS_ERRLEVEL,
+		.procname	= "error_level",
+		.data		= &xfs_params.error_level.val,
+		.maxlen		= sizeof(int),
+		.mode		= 0644,
+		.proc_handler	= &proc_dointvec_minmax,
+		.strategy	= &sysctl_intvec,
+		.extra1		= &xfs_params.error_level.min,
+		.extra2		= &xfs_params.error_level.max
+	},
+	{
+		.ctl_name	= XFS_SYNCD_TIMER,
+		.procname	= "xfssyncd_centisecs",
+		.data		= &xfs_params.syncd_timer.val,
+		.maxlen		= sizeof(int),
+		.mode		= 0644,
+		.proc_handler	= &proc_dointvec_minmax,
+		.strategy	= &sysctl_intvec,
+		.extra1		= &xfs_params.syncd_timer.min,
+		.extra2		= &xfs_params.syncd_timer.max
+	},
+	{
+		.ctl_name	= XFS_INHERIT_SYNC,
+		.procname	= "inherit_sync",
+		.data		= &xfs_params.inherit_sync.val,
+		.maxlen		= sizeof(int),
+		.mode		= 0644,
+		.proc_handler	= &proc_dointvec_minmax,
+		.strategy	= &sysctl_intvec,
+		.extra1		= &xfs_params.inherit_sync.min,
+		.extra2		= &xfs_params.inherit_sync.max
+	},
+	{
+		.ctl_name	= XFS_INHERIT_NODUMP,
+		.procname	= "inherit_nodump",
+		.data		= &xfs_params.inherit_nodump.val,
+		.maxlen		= sizeof(int),
+		.mode		= 0644,
+		.proc_handler	= &proc_dointvec_minmax,
+		.strategy	= &sysctl_intvec, NULL,
+		.extra1		= &xfs_params.inherit_nodump.min,
+		.extra2		= &xfs_params.inherit_nodump.max
+	},
+	{
+		.ctl_name	= XFS_INHERIT_NOATIME,
+		.procname	= "inherit_noatime",
+		.data		= &xfs_params.inherit_noatim.val,
+		.maxlen		= sizeof(int),
+		.mode		= 0644,
+		.proc_handler	= &proc_dointvec_minmax,
+		.strategy	= &sysctl_intvec, NULL,
+		.extra1		= &xfs_params.inherit_noatim.min,
+		.extra2		= &xfs_params.inherit_noatim.max
+	},
+	{
+		.ctl_name	= XFS_BUF_TIMER,
+		.procname	= "xfsbufd_centisecs",
+		.data		= &xfs_params.xfs_buf_timer.val,
+		.maxlen		= sizeof(int),
+		.mode		= 0644,
+		.proc_handler	= &proc_dointvec_minmax,
+		.strategy	= &sysctl_intvec,
+		.extra1		= &xfs_params.xfs_buf_timer.min,
+		.extra2		= &xfs_params.xfs_buf_timer.max
+	},
+	{
+		.ctl_name	= XFS_BUF_AGE,
+		.procname	= "age_buffer_centisecs",
+		.data		= &xfs_params.xfs_buf_age.val,
+		.maxlen		= sizeof(int),
+		.mode		= 0644,
+		.proc_handler	= &proc_dointvec_minmax,
+		.strategy	= &sysctl_intvec, NULL,
+		.extra1		= &xfs_params.xfs_buf_age.min,
+		.extra2		= &xfs_params.xfs_buf_age.max
+	},
+	{
+		.ctl_name	= XFS_INHERIT_NOSYM,
+		.procname	= "inherit_nosymlinks",
+		.data		= &xfs_params.inherit_nosym.val,
+		.maxlen		= sizeof(int),
+		.mode		= 0644,
+		.proc_handler	= &proc_dointvec_minmax,
+		.strategy	= &sysctl_intvec,
+		.extra1		= &xfs_params.inherit_nosym.min,
+		.extra2		= &xfs_params.inherit_nosym.max
+	},
+	{
+		.ctl_name	= XFS_ROTORSTEP,
+		.procname	= "rotorstep",
+		.data		= &xfs_params.rotorstep.val,
+		.maxlen		= sizeof(int),
+		.mode		= 0644,
+		.proc_handler	= &proc_dointvec_minmax,
+		.strategy	= &sysctl_intvec,
+		.extra1		= &xfs_params.rotorstep.min,
+		.extra2		= &xfs_params.rotorstep.max
+	},
+	{
+		.ctl_name	= XFS_INHERIT_NODFRG,
+		.procname	= "inherit_nodefrag",
+		.data		= &xfs_params.inherit_nodfrg.val,
+		.maxlen		= sizeof(int),
+		.mode		= 0644,
+		.proc_handler	= &proc_dointvec_minmax,
+		.strategy	= &sysctl_intvec,
+		.extra1		= &xfs_params.inherit_nodfrg.min,
+		.extra2		= &xfs_params.inherit_nodfrg.max
+	},
 	/* please keep this the last entry */
 #ifdef CONFIG_PROC_FS
-	{XFS_STATS_CLEAR, "stats_clear", &xfs_params.stats_clear.val,
-	sizeof(int), 0644, NULL, &xfs_stats_clear_proc_handler,
-	&sysctl_intvec, NULL,
-	&xfs_params.stats_clear.min, &xfs_params.stats_clear.max},
+	{
+		.ctl_name	= XFS_STATS_CLEAR,
+		.procname	= "stats_clear",
+		.data		= &xfs_params.stats_clear.val,
+		.maxlen		= sizeof(int),
+		.mode		= 0644,
+		.proc_handler	=  &xfs_stats_clear_proc_handler,
+		.strategy	= &sysctl_intvec,
+		.extra1		= &xfs_params.stats_clear.min,
+		.extra2		= &xfs_params.stats_clear.max
+	},
 #endif /* CONFIG_PROC_FS */
 
-	{0}
+	{}
 };
 
 STATIC ctl_table xfs_dir_table[] = {
-	{FS_XFS, "xfs", NULL, 0, 0555, xfs_table},
-	{0}
+	{
+		.ctl_name	= FS_XFS,
+		.procname	= "xfs",
+		.mode		= 0555,
+		.child		= xfs_table
+	},
+	{}
 };
 
 STATIC ctl_table xfs_root_table[] = {
-	{CTL_FS, "fs",  NULL, 0, 0555, xfs_dir_table},
-	{0}
+	{
+		.ctl_name	= CTL_FS,
+		.procname	= "fs",
+		.mode		= 0555,
+		.child		= xfs_dir_table
+	},
+	{}
 };
 
 void
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 16:43:06 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 16:43:11 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:3457 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S20041459AbXAPQlP (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:41:15 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGeC2U000870;
	Tue, 16 Jan 2007 09:40:12 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGeBB7000860;
	Tue, 16 Jan 2007 09:40:11 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 2/59] sysctl: Move CTL_SUNRPC to sysctl.h where it belongs
Date:	Tue, 16 Jan 2007 09:39:07 -0700
Message-Id: <116896561018-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13618
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 include/linux/sunrpc/debug.h |    1 -
 include/linux/sysctl.h       |    3 ++-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/sunrpc/debug.h b/include/linux/sunrpc/debug.h
index 60fce3c..b7c7307 100644
--- a/include/linux/sunrpc/debug.h
+++ b/include/linux/sunrpc/debug.h
@@ -78,7 +78,6 @@ void		rpc_unregister_sysctl(void);
  * module currently registers its sysctl table dynamically, the sysctl path
  * for module FOO is <CTL_SUNRPC, CTL_FOODEBUG>.
  */
-#define CTL_SUNRPC	7249	/* arbitrary and hopefully unused */
 
 enum {
 	CTL_RPCDEBUG = 1,
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 81480e6..54a9cf5 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -69,7 +69,8 @@ enum
 	CTL_DEV=7,		/* Devices */
 	CTL_BUS=8,		/* Busses */
 	CTL_ABI=9,		/* Binary emulation */
-	CTL_CPU=10		/* CPU stuff (speed scaling, etc) */
+	CTL_CPU=10,		/* CPU stuff (speed scaling, etc) */
+	CTL_SUNRPC=7249,	/* sunrpc debug */
 };
 
 /* CTL_BUS names: */
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 16:43:34 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 16:43:40 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:6529 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S20041461AbXAPQlR (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:41:17 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGeWq6000929;
	Tue, 16 Jan 2007 09:40:32 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGeWQP000928;
	Tue, 16 Jan 2007 09:40:32 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 15/59] sysctl: scsi remove unnecessary insert_at_head flag
Date:	Tue, 16 Jan 2007 09:39:20 -0700
Message-Id: <11689656323486-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13619
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 drivers/scsi/scsi_sysctl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/scsi_sysctl.c b/drivers/scsi/scsi_sysctl.c
index 04d06c2..b16b775 100644
--- a/drivers/scsi/scsi_sysctl.c
+++ b/drivers/scsi/scsi_sysctl.c
@@ -41,7 +41,7 @@ static struct ctl_table_header *scsi_table_header;
 
 int __init scsi_init_sysctl(void)
 {
-	scsi_table_header = register_sysctl_table(scsi_root_table, 1);
+	scsi_table_header = register_sysctl_table(scsi_root_table, 0);
 	if (!scsi_table_header)
 		return -ENOMEM;
 	return 0;
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 16:44:03 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 16:44:09 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:6785 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S20041462AbXAPQlR (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:41:17 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGeRWl000913;
	Tue, 16 Jan 2007 09:40:27 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGeRVj000911;
	Tue, 16 Jan 2007 09:40:27 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 11/59] sysctl: ax25 remove unnecessary insert_at_head flag
Date:	Tue, 16 Jan 2007 09:39:16 -0700
Message-Id: <11689656273396-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13620
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 net/ax25/sysctl_net_ax25.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/ax25/sysctl_net_ax25.c b/net/ax25/sysctl_net_ax25.c
index d23a27f..afdba04 100644
--- a/net/ax25/sysctl_net_ax25.c
+++ b/net/ax25/sysctl_net_ax25.c
@@ -245,7 +245,7 @@ void ax25_register_sysctl(void)
 
 	ax25_dir_table[0].child = ax25_table;
 
-	ax25_table_header = register_sysctl_table(ax25_root_table, 1);
+	ax25_table_header = register_sysctl_table(ax25_root_table, 0);
 }
 
 void ax25_unregister_sysctl(void)
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 16:44:32 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 16:44:36 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:9089 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S28580768AbXAPQlT (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:41:19 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGeZgp000941;
	Tue, 16 Jan 2007 09:40:35 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGeZhL000940;
	Tue, 16 Jan 2007 09:40:35 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 18/59] sysctl: ipmi remove unnecessary insert_at_head flag
Date:	Tue, 16 Jan 2007 09:39:23 -0700
Message-Id: <1168965635875-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13621
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

With unique sysctl binary numbers setting insert_at_head is pointless.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 drivers/char/ipmi/ipmi_poweroff.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/char/ipmi/ipmi_poweroff.c b/drivers/char/ipmi/ipmi_poweroff.c
index 9d23136..b3ae65e 100644
--- a/drivers/char/ipmi/ipmi_poweroff.c
+++ b/drivers/char/ipmi/ipmi_poweroff.c
@@ -686,7 +686,7 @@ static int ipmi_poweroff_init (void)
 		printk(KERN_INFO PFX "Power cycle is enabled.\n");
 
 #ifdef CONFIG_PROC_FS
-	ipmi_table_header = register_sysctl_table(ipmi_root_table, 1);
+	ipmi_table_header = register_sysctl_table(ipmi_root_table, 0);
 	if (!ipmi_table_header) {
 		printk(KERN_ERR PFX "Unable to register powercycle sysctl\n");
 		rv = -ENOMEM;
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 16:44:59 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 16:45:04 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:10113 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S28580773AbXAPQlT (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:41:19 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGeO5j000904;
	Tue, 16 Jan 2007 09:40:24 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGeOCe000903;
	Tue, 16 Jan 2007 09:40:24 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 9/59] sysctl: decnet remove unnecessary insert_at_head flag
Date:	Tue, 16 Jan 2007 09:39:14 -0700
Message-Id: <1168965624501-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13622
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

The sysctl numbers used are unique so setting the insert_at_head
flag does not succeed in overriding any sysctls, and is just
confusing because it doesn't.  Clear the flag.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 net/decnet/sysctl_net_decnet.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/decnet/sysctl_net_decnet.c b/net/decnet/sysctl_net_decnet.c
index a4065eb..81469fd 100644
--- a/net/decnet/sysctl_net_decnet.c
+++ b/net/decnet/sysctl_net_decnet.c
@@ -491,7 +491,7 @@ static ctl_table dn_root_table[] = {
 
 void dn_register_sysctl(void)
 {
-	dn_table_header = register_sysctl_table(dn_root_table, 1);
+	dn_table_header = register_sysctl_table(dn_root_table, 0);
 }
 
 void dn_unregister_sysctl(void)
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 16:45:27 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 16:45:32 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:11137 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S28580775AbXAPQlT (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:41:19 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGe6sn000843;
	Tue, 16 Jan 2007 09:40:06 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGe5Kg000834;
	Tue, 16 Jan 2007 09:40:05 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 1/59] sysctl x25: Remove unnecessary insert_at_head from register_sysctl_table.
Date:	Tue, 16 Jan 2007 09:39:06 -0700
Message-Id: <11689656044103-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13623
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

Since x25 uses unique binary numbers inserting yourself at the
head of the search list for sysctls so you can override already
registered sysctls is pointless.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 net/x25/sysctl_net_x25.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/x25/sysctl_net_x25.c b/net/x25/sysctl_net_x25.c
index aabda59..94aff67 100644
--- a/net/x25/sysctl_net_x25.c
+++ b/net/x25/sysctl_net_x25.c
@@ -98,7 +98,7 @@ static struct ctl_table x25_root_table[] = {
 
 void __init x25_register_sysctl(void)
 {
-	x25_table_header = register_sysctl_table(x25_root_table, 1);
+	x25_table_header = register_sysctl_table(x25_root_table, 0);
 }
 
 void x25_unregister_sysctl(void)
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 16:45:55 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 16:46:00 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:18817 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S28580776AbXAPQlX (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:41:23 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGeSWe000917;
	Tue, 16 Jan 2007 09:40:28 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGeSDx000916;
	Tue, 16 Jan 2007 09:40:28 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 12/59] sysctl: atalk remove unnecessary insert_at_head flag
Date:	Tue, 16 Jan 2007 09:39:17 -0700
Message-Id: <11689656281139-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13624
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 net/appletalk/sysctl_net_atalk.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/appletalk/sysctl_net_atalk.c b/net/appletalk/sysctl_net_atalk.c
index 40b0af7..4f806b6 100644
--- a/net/appletalk/sysctl_net_atalk.c
+++ b/net/appletalk/sysctl_net_atalk.c
@@ -73,7 +73,7 @@ static struct ctl_table_header *atalk_table_header;
 
 void atalk_register_sysctl(void)
 {
-	atalk_table_header = register_sysctl_table(atalk_root_table, 1);
+	atalk_table_header = register_sysctl_table(atalk_root_table, 0);
 }
 
 void atalk_unregister_sysctl(void)
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 16:46:24 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 16:46:27 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:21121 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S28580769AbXAPQlY (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:41:24 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGeJ8H000888;
	Tue, 16 Jan 2007 09:40:19 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGeJMi000887;
	Tue, 16 Jan 2007 09:40:19 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 5/59] sysctl: rose remove unnecessary insert_at_head flag
Date:	Tue, 16 Jan 2007 09:39:10 -0700
Message-Id: <11689656191854-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13625
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

The sysctl numbers used are unique so setting the insert_at_head
flag serves no semantic purpose.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 net/rose/sysctl_net_rose.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/rose/sysctl_net_rose.c b/net/rose/sysctl_net_rose.c
index 8548c7c..0190a07 100644
--- a/net/rose/sysctl_net_rose.c
+++ b/net/rose/sysctl_net_rose.c
@@ -160,7 +160,7 @@ static ctl_table rose_root_table[] = {
 
 void __init rose_register_sysctl(void)
 {
-	rose_table_header = register_sysctl_table(rose_root_table, 1);
+	rose_table_header = register_sysctl_table(rose_root_table, 0);
 }
 
 void rose_unregister_sysctl(void)
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 16:46:50 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 16:46:54 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:21377 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S28580777AbXAPQlZ (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:41:25 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGee0a000957;
	Tue, 16 Jan 2007 09:40:40 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGee9j000956;
	Tue, 16 Jan 2007 09:40:40 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 22/59] sysctl: frv pm remove unnecessary insert_at_head flag
Date:	Tue, 16 Jan 2007 09:39:27 -0700
Message-Id: <1168965639241-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13626
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

With unique binary numbers setting insert_at_head to
insert yourself at the head of sysctl list and thus override
existing sysctl entries serves no point.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 arch/frv/kernel/pm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/frv/kernel/pm.c b/arch/frv/kernel/pm.c
index 6b76466..c1840d6 100644
--- a/arch/frv/kernel/pm.c
+++ b/arch/frv/kernel/pm.c
@@ -419,7 +419,7 @@ static struct ctl_table pm_dir_table[] =
  */
 static int __init pm_init(void)
 {
-	register_sysctl_table(pm_dir_table, 1);
+	register_sysctl_table(pm_dir_table, 0);
 	return 0;
 }
 
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 16:47:18 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 16:47:22 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:21889 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S28580779AbXAPQlZ (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:41:25 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGeNFS000900;
	Tue, 16 Jan 2007 09:40:23 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGeNg9000899;
	Tue, 16 Jan 2007 09:40:23 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 8/59] sysctl: ipx remove unnecessary insert_at_head flag
Date:	Tue, 16 Jan 2007 09:39:13 -0700
Message-Id: <11689656232449-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13627
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

The sysctl numbers used are unique so setting the insert_at_head
flag servers no semantic purpose and is just confusing.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 net/ipx/sysctl_net_ipx.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/ipx/sysctl_net_ipx.c b/net/ipx/sysctl_net_ipx.c
index fa57473..0442f44 100644
--- a/net/ipx/sysctl_net_ipx.c
+++ b/net/ipx/sysctl_net_ipx.c
@@ -52,7 +52,7 @@ static struct ctl_table_header *ipx_table_header;
 
 void ipx_register_sysctl(void)
 {
-	ipx_table_header = register_sysctl_table(ipx_root_table, 1);
+	ipx_table_header = register_sysctl_table(ipx_root_table, 0);
 }
 
 void ipx_unregister_sysctl(void)
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 16:47:46 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 16:47:50 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:36225 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S28580780AbXAPQlc (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:41:32 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGegSa000961;
	Tue, 16 Jan 2007 09:40:42 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGefUt000960;
	Tue, 16 Jan 2007 09:40:41 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 23/59] sysctl: Move CTL_FRV into sysctl.h where it belongs
Date:	Tue, 16 Jan 2007 09:39:28 -0700
Message-Id: <1168965640807-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13628
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 arch/frv/kernel/sysctl.c |    1 -
 include/linux/sysctl.h   |    1 +
 2 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/frv/kernel/sysctl.c b/arch/frv/kernel/sysctl.c
index ce67680..2f4da32 100644
--- a/arch/frv/kernel/sysctl.c
+++ b/arch/frv/kernel/sysctl.c
@@ -186,7 +186,6 @@ static struct ctl_table frv_table[] =
  * Use a temporary sysctl number. Horrid, but will be cleaned up in 2.6
  * when all the PM interfaces exist nicely.
  */
-#define CTL_FRV 9898
 static struct ctl_table frv_dir_table[] =
 {
 	{CTL_FRV, "frv", NULL, 0, 0555, frv_table},
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index e7c40b6..71c16b4 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -72,6 +72,7 @@ enum
 	CTL_CPU=10,		/* CPU stuff (speed scaling, etc) */
 	CTL_SUNRPC=7249,	/* sunrpc debug */
 	CTL_PM=9899,		/* frv power management */
+	CTL_FRV=9898,		/* frv specific sysctls */
 };
 
 /* CTL_BUS names: */
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 16:48:13 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 16:48:19 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:45185 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S28580783AbXAPQlf (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:41:35 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGed6g000953;
	Tue, 16 Jan 2007 09:40:39 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGecor000952;
	Tue, 16 Jan 2007 09:40:38 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 21/59] sysctl: Move CTL_PM into sysctl.h where it belongs.
Date:	Tue, 16 Jan 2007 09:39:26 -0700
Message-Id: <11689656383210-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13629
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 arch/frv/kernel/pm.c   |    1 -
 include/linux/sysctl.h |    1 +
 2 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/frv/kernel/pm.c b/arch/frv/kernel/pm.c
index ee677ce..6b76466 100644
--- a/arch/frv/kernel/pm.c
+++ b/arch/frv/kernel/pm.c
@@ -125,7 +125,6 @@ unsigned long sleep_phys_sp(void *sp)
  * Use a temporary sysctl number. Horrid, but will be cleaned up in 2.6
  * when all the PM interfaces exist nicely.
  */
-#define CTL_PM 9899
 #define CTL_PM_SUSPEND 1
 #define CTL_PM_CMODE 2
 #define CTL_PM_P0 4
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 54a9cf5..e7c40b6 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -71,6 +71,7 @@ enum
 	CTL_ABI=9,		/* Binary emulation */
 	CTL_CPU=10,		/* CPU stuff (speed scaling, etc) */
 	CTL_SUNRPC=7249,	/* sunrpc debug */
+	CTL_PM=9899,		/* frv power management */
 };
 
 /* CTL_BUS names: */
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 16:48:42 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 16:48:45 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:43649 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S28580782AbXAPQle (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:41:34 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGePk0000908;
	Tue, 16 Jan 2007 09:40:25 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGePvg000907;
	Tue, 16 Jan 2007 09:40:25 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 10/59] sysctl: dccp remove unnecessary insert_at_head flag
Date:	Tue, 16 Jan 2007 09:39:15 -0700
Message-Id: <1168965624939-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13630
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 net/dccp/sysctl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/dccp/sysctl.c b/net/dccp/sysctl.c
index fdcfca3..3391631 100644
--- a/net/dccp/sysctl.c
+++ b/net/dccp/sysctl.c
@@ -127,7 +127,7 @@ static struct ctl_table_header *dccp_table_header;
 
 int __init dccp_sysctl_init(void)
 {
-	dccp_table_header = register_sysctl_table(dccp_root_table, 1);
+	dccp_table_header = register_sysctl_table(dccp_root_table, 0);
 
 	return dccp_table_header != NULL ? 0 : -ENOMEM;
 }
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 16:49:08 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 16:49:14 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:48257 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S28580785AbXAPQlg (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:41:36 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGerVW000993;
	Tue, 16 Jan 2007 09:40:53 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGertE000991;
	Tue, 16 Jan 2007 09:40:53 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 30/59] sysctl: mips/au1000 Remove sys_sysctl support
Date:	Tue, 16 Jan 2007 09:39:35 -0700
Message-Id: <11689656521540-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13631
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

The assignment of binary numbers for sys_sysctl use was in
shambles and despite requiring methods.  Nothing was implemented
on the sys_sysctl side.

So this patch gives a mercy killing to the sys_sysctl support for
powermanagment on mips/au1000.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 arch/mips/au1000/common/power.c |   16 +++++-----------
 1 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/arch/mips/au1000/common/power.c b/arch/mips/au1000/common/power.c
index 7504a63..b531ab7 100644
--- a/arch/mips/au1000/common/power.c
+++ b/arch/mips/au1000/common/power.c
@@ -62,12 +62,6 @@ extern unsigned long save_local_and_disable(int controller);
 extern void restore_local_and_enable(int controller, unsigned long mask);
 extern void local_enable_irq(unsigned int irq_nr);
 
-/* Quick acpi hack. This will have to change! */
-#define	CTL_ACPI 9999
-#define	ACPI_S1_SLP_TYP 19
-#define	ACPI_SLEEP 21
-
-
 static DEFINE_SPINLOCK(pm_lock);
 
 /* We need to save/restore a bunch of core registers that are
@@ -425,14 +419,14 @@ static int pm_do_freq(ctl_table * ctl, int write, struct file *file,
 
 
 static struct ctl_table pm_table[] = {
-	{ACPI_S1_SLP_TYP, "suspend", NULL, 0, 0600, NULL, &pm_do_suspend},
-	{ACPI_SLEEP, "sleep", NULL, 0, 0600, NULL, &pm_do_sleep},
-	{CTL_ACPI, "freq", NULL, 0, 0600, NULL, &pm_do_freq},
+	{CTL_UNNUMBERED, "suspend", NULL, 0, 0600, NULL, &pm_do_suspend},
+	{CTL_UNNUMBERED, "sleep", NULL, 0, 0600, NULL, &pm_do_sleep},
+	{CTL_UNNUMBERED, "freq", NULL, 0, 0600, NULL, &pm_do_freq},
 	{0}
 };
 
 static struct ctl_table pm_dir_table[] = {
-	{CTL_ACPI, "pm", NULL, 0, 0555, pm_table},
+	{CTL_UNNUMBERED, "pm", NULL, 0, 0555, pm_table},
 	{0}
 };
 
@@ -441,7 +435,7 @@ static struct ctl_table pm_dir_table[] = {
  */
 static int __init pm_init(void)
 {
-	register_sysctl_table(pm_dir_table, 1);
+	register_sysctl_table(pm_dir_table, 0);
 	return 0;
 }
 
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 16:49:37 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 16:49:40 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:51073 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S28580786AbXAPQlh (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:41:37 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGem4a000979;
	Tue, 16 Jan 2007 09:40:48 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGelJh000978;
	Tue, 16 Jan 2007 09:40:47 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 27/59] sysctl: sn Remove sysctl ABI BREAKAGE
Date:	Tue, 16 Jan 2007 09:39:32 -0700
Message-Id: <1168965647511-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13632
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

By not using the enumeration in sysctl.h (or even understanding it)
the SN platform placed their arch specific xpc directory on top of
CTL_KERN and only because they didn't have 4 entries in their xpc
directory got lucky and didn't break glibc.

This is totally irresponsible.  So this patch entirely removes
sys_sysctl support from their sysctl code.  Hopefully they
don't have ascii name conflicts as well.

And now that they have no ABI numbers add them to the end
instead of the sysctl list instead of the head so nothing
else will be overridden.

Cc: Tony Luck <tony.luck@intel.com>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 arch/ia64/sn/kernel/xpc_main.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/ia64/sn/kernel/xpc_main.c b/arch/ia64/sn/kernel/xpc_main.c
index 7a387d2..24adb75 100644
--- a/arch/ia64/sn/kernel/xpc_main.c
+++ b/arch/ia64/sn/kernel/xpc_main.c
@@ -101,7 +101,7 @@ static int xpc_disengage_request_max_timelimit = 120;
 
 static ctl_table xpc_sys_xpc_hb_dir[] = {
 	{
-		1,
+		CTL_UNNUMBERED,
 		"hb_interval",
 		&xpc_hb_interval,
 		sizeof(int),
@@ -114,7 +114,7 @@ static ctl_table xpc_sys_xpc_hb_dir[] = {
 		&xpc_hb_max_interval
 	},
 	{
-		2,
+		CTL_UNNUMBERED,
 		"hb_check_interval",
 		&xpc_hb_check_interval,
 		sizeof(int),
@@ -130,7 +130,7 @@ static ctl_table xpc_sys_xpc_hb_dir[] = {
 };
 static ctl_table xpc_sys_xpc_dir[] = {
 	{
-		1,
+		CTL_UNNUMBERED,
 		"hb",
 		NULL,
 		0,
@@ -138,7 +138,7 @@ static ctl_table xpc_sys_xpc_dir[] = {
 		xpc_sys_xpc_hb_dir
 	},
 	{
-		2,
+		CTL_UNNUMBERED,
 		"disengage_request_timelimit",
 		&xpc_disengage_request_timelimit,
 		sizeof(int),
@@ -154,7 +154,7 @@ static ctl_table xpc_sys_xpc_dir[] = {
 };
 static ctl_table xpc_sys_dir[] = {
 	{
-		1,
+		CTL_UNNUMBERED,
 		"xpc",
 		NULL,
 		0,
@@ -1251,7 +1251,7 @@ xpc_init(void)
 	snprintf(xpc_part->bus_id, BUS_ID_SIZE, "part");
 	snprintf(xpc_chan->bus_id, BUS_ID_SIZE, "chan");
 
-	xpc_sysctl = register_sysctl_table(xpc_sys_dir, 1);
+	xpc_sysctl = register_sysctl_table(xpc_sys_dir, 0);
 
 	/*
 	 * The first few fields of each entry of xpc_partitions[] need to
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 16:50:03 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 16:50:09 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:51329 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S28580787AbXAPQlh (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:41:37 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGeES7000880;
	Tue, 16 Jan 2007 09:40:14 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGeDFZ000879;
	Tue, 16 Jan 2007 09:40:13 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 3/59] sysctl: sunrpc Remove unnecessary insert_at_head flag
Date:	Tue, 16 Jan 2007 09:39:08 -0700
Message-Id: <11689656133336-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13633
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

Because the sunrpc sysctls don't conflict with any other
sysctls the setting the insert at head flag to register_sysctl
has no semantic meaning.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 net/sunrpc/sysctl.c   |    2 +-
 net/sunrpc/xprtsock.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/sunrpc/sysctl.c b/net/sunrpc/sysctl.c
index 82b2752..3852689 100644
--- a/net/sunrpc/sysctl.c
+++ b/net/sunrpc/sysctl.c
@@ -36,7 +36,7 @@ void
 rpc_register_sysctl(void)
 {
 	if (!sunrpc_table_header) {
-		sunrpc_table_header = register_sysctl_table(sunrpc_table, 1);
+		sunrpc_table_header = register_sysctl_table(sunrpc_table, 0);
 #ifdef CONFIG_PROC_FS
 		if (sunrpc_table[0].de)
 			sunrpc_table[0].de->owner = THIS_MODULE;
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index 49cabff..98d1af9 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -1630,7 +1630,7 @@ int init_socket_xprt(void)
 {
 #ifdef RPC_DEBUG
 	if (!sunrpc_table_header) {
-		sunrpc_table_header = register_sysctl_table(sunrpc_table, 1);
+		sunrpc_table_header = register_sysctl_table(sunrpc_table, 0);
 #ifdef CONFIG_PROC_FS
 		if (sunrpc_table[0].de)
 			sunrpc_table[0].de->owner = THIS_MODULE;
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 16:50:32 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 16:50:35 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:54401 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S20041436AbXAPQll (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:41:41 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGeMN3000892;
	Tue, 16 Jan 2007 09:40:22 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGeKFT000891;
	Tue, 16 Jan 2007 09:40:20 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 6/59] sysctl: netrom remove unnecessary insert_at_head flag
Date:	Tue, 16 Jan 2007 09:39:11 -0700
Message-Id: <11689656204073-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13634
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

The sysctl numbers used are unique so setting the insert_at_head
flag serves no semantic purpose, so it is just confusing.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 net/netrom/sysctl_net_netrom.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/netrom/sysctl_net_netrom.c b/net/netrom/sysctl_net_netrom.c
index 6bb8dda..09f4246 100644
--- a/net/netrom/sysctl_net_netrom.c
+++ b/net/netrom/sysctl_net_netrom.c
@@ -192,7 +192,7 @@ static ctl_table nr_root_table[] = {
 
 void __init nr_register_sysctl(void)
 {
-	nr_table_header = register_sysctl_table(nr_root_table, 1);
+	nr_table_header = register_sysctl_table(nr_root_table, 0);
 }
 
 void nr_unregister_sysctl(void)
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 16:50:58 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 16:51:04 +0000 (GMT)
Received: from p549F7CF3.dip.t-dialin.net ([84.159.124.243]:20646 "EHLO
	p549F7CF3.dip.t-dialin.net") by ftp.linux-mips.org with ESMTP
	id S20041464AbXAPQlk (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:41:40 +0000
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:59098 "EHLO
	ebiederm.dsl.xmission.com") by lappi.linux-mips.net with ESMTP
	id S1099604AbXAPQlf (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 17:41:35 +0100
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGehpF000965;
	Tue, 16 Jan 2007 09:40:43 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGeg0l000964;
	Tue, 16 Jan 2007 09:40:42 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 24/59] sysctl: frv remove unnecessary insert_at_head flag
Date:	Tue, 16 Jan 2007 09:39:29 -0700
Message-Id: <1168965642471-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13635
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

Since the binary sysctl numbers are unique putting the registered
sysctls at the head of the sysctl list where they can override
existing sysctls serves no useful purpose.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 arch/frv/kernel/sysctl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/frv/kernel/sysctl.c b/arch/frv/kernel/sysctl.c
index 2f4da32..37528eb 100644
--- a/arch/frv/kernel/sysctl.c
+++ b/arch/frv/kernel/sysctl.c
@@ -197,7 +197,7 @@ static struct ctl_table frv_dir_table[] =
  */
 static int __init frv_sysctl_init(void)
 {
-	register_sysctl_table(frv_dir_table, 1);
+	register_sysctl_table(frv_dir_table, 0);
 	return 0;
 }
 
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 16:51:28 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 16:51:32 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:54913 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S20041446AbXAPQll (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:41:41 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGeHfo000884;
	Tue, 16 Jan 2007 09:40:17 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGeFmu000883;
	Tue, 16 Jan 2007 09:40:15 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 4/59] sysctl: sunrpc Don't unnecessarily set ctl_table->de
Date:	Tue, 16 Jan 2007 09:39:09 -0700
Message-Id: <11689656151751-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13636
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

We don't need this to prevent module unload races so remove
the unnecessary code.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 net/sunrpc/sysctl.c   |    8 +-------
 net/sunrpc/xprtsock.c |    7 +------
 2 files changed, 2 insertions(+), 13 deletions(-)

diff --git a/net/sunrpc/sysctl.c b/net/sunrpc/sysctl.c
index 3852689..6a82ed2 100644
--- a/net/sunrpc/sysctl.c
+++ b/net/sunrpc/sysctl.c
@@ -35,14 +35,8 @@ static ctl_table		sunrpc_table[];
 void
 rpc_register_sysctl(void)
 {
-	if (!sunrpc_table_header) {
+	if (!sunrpc_table_header)
 		sunrpc_table_header = register_sysctl_table(sunrpc_table, 0);
-#ifdef CONFIG_PROC_FS
-		if (sunrpc_table[0].de)
-			sunrpc_table[0].de->owner = THIS_MODULE;
-#endif
-	}
-			
 }
 
 void
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index 98d1af9..51964cf 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -1629,13 +1629,8 @@ struct rpc_xprt *xs_setup_tcp(struct sockaddr *addr, size_t addrlen, struct rpc_
 int init_socket_xprt(void)
 {
 #ifdef RPC_DEBUG
-	if (!sunrpc_table_header) {
+	if (!sunrpc_table_header)
 		sunrpc_table_header = register_sysctl_table(sunrpc_table, 0);
-#ifdef CONFIG_PROC_FS
-		if (sunrpc_table[0].de)
-			sunrpc_table[0].de->owner = THIS_MODULE;
-#endif
-	}
 #endif
 
 	return 0;
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 16:51:56 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 16:52:00 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:58497 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S28580791AbXAPQlm (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:41:42 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGej6Z000975;
	Tue, 16 Jan 2007 09:40:45 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGej9s000974;
	Tue, 16 Jan 2007 09:40:45 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 26/59] sysctl: C99 convert arch/frv/kernel/sysctl.c
Date:	Tue, 16 Jan 2007 09:39:31 -0700
Message-Id: <11689656454112-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13637
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 arch/frv/kernel/sysctl.c |   29 ++++++++++++++++++++++++-----
 1 files changed, 24 insertions(+), 5 deletions(-)

diff --git a/arch/frv/kernel/sysctl.c b/arch/frv/kernel/sysctl.c
index 37528eb..577ad16 100644
--- a/arch/frv/kernel/sysctl.c
+++ b/arch/frv/kernel/sysctl.c
@@ -175,11 +175,25 @@ static int procctl_frv_pin_cxnr(ctl_table *table, int write, struct file *filp,
  */
 static struct ctl_table frv_table[] =
 {
-	{ 1, "cache-mode",	NULL, 0, 0644, NULL, &procctl_frv_cachemode },
+	{
+		.ctl_name 	= 1,
+		.procname 	= "cache-mode",
+		.data		= NULL,
+		.maxlen		= 0,
+		.mode		= 0644,
+		.proc_handler	= &procctl_frv_cachemode,
+	},
 #ifdef CONFIG_MMU
-	{ 2, "pin-cxnr",	NULL, 0, 0644, NULL, &procctl_frv_pin_cxnr },
+	{
+		.ctl_name	= 2,
+		.procname	= "pin-cxnr",
+		.data		= NULL,
+		.maxlen		= 0,
+		.mode		= 0644,
+		.proc_handler	= &procctl_frv_pin_cxnr
+	},
 #endif
-	{ 0 }
+	{}
 };
 
 /*
@@ -188,8 +202,13 @@ static struct ctl_table frv_table[] =
  */
 static struct ctl_table frv_dir_table[] =
 {
-	{CTL_FRV, "frv", NULL, 0, 0555, frv_table},
-	{0}
+	{
+		.ctl_name	= CTL_FRV,
+		.procname	= "frv",
+		.mode 		= 0555,
+		.child		= frv_table
+	},
+	{}
 };
 
 /*
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 16:52:23 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 16:52:28 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:64897 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S28580792AbXAPQlo (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:41:44 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGeYrn000937;
	Tue, 16 Jan 2007 09:40:34 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGeYpe000936;
	Tue, 16 Jan 2007 09:40:34 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 17/59] sysctl: mac_hid remove unnecessary insert_at_head flag
Date:	Tue, 16 Jan 2007 09:39:22 -0700
Message-Id: <11689656343467-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13638
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

With unique sysctl binary numbers setting insert_at_head is pointless.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 drivers/macintosh/mac_hid.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/macintosh/mac_hid.c b/drivers/macintosh/mac_hid.c
index ee6b4ca..c676740 100644
--- a/drivers/macintosh/mac_hid.c
+++ b/drivers/macintosh/mac_hid.c
@@ -138,7 +138,7 @@ int __init mac_hid_init(void)
 		return err;
 
 #if defined(CONFIG_SYSCTL)
-	mac_hid_sysctl_header = register_sysctl_table(mac_hid_root_dir, 1);
+	mac_hid_sysctl_header = register_sysctl_table(mac_hid_root_dir, 0);
 #endif /* CONFIG_SYSCTL */
 
 	return 0;
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 16:52:51 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 16:52:55 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:642 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S28580793AbXAPQlp (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:41:45 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGeqjH000988;
	Tue, 16 Jan 2007 09:40:52 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGeojp000986;
	Tue, 16 Jan 2007 09:40:50 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 29/59] sysctl: C99 convert arch/ia64/kernel/perfmon and remove ABI breakage
Date:	Tue, 16 Jan 2007 09:39:34 -0700
Message-Id: <1168965650735-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13639
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

This convers the sysctl ctl_tables to use C99 initializers.
While I was looking at it I discovered it was using a portion of
the sysctl binary addresses space under CTL_KERN KERN_OSTYPE
which was completely inappropriate.  So I completely removed
all of the sysctl binary names, to remove and avoid the ABI conflict.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 arch/ia64/kernel/perfmon.c |   56 ++++++++++++++++++++++++++++++++++++-------
 1 files changed, 47 insertions(+), 9 deletions(-)

diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c
index aa94f60..8c679ab 100644
--- a/arch/ia64/kernel/perfmon.c
+++ b/arch/ia64/kernel/perfmon.c
@@ -521,19 +521,57 @@ pfm_sysctl_t pfm_sysctl;
 EXPORT_SYMBOL(pfm_sysctl);
 
 static ctl_table pfm_ctl_table[]={
-	{1, "debug", &pfm_sysctl.debug, sizeof(int), 0666, NULL, &proc_dointvec, NULL,},
-	{2, "debug_ovfl", &pfm_sysctl.debug_ovfl, sizeof(int), 0666, NULL, &proc_dointvec, NULL,},
-	{3, "fastctxsw", &pfm_sysctl.fastctxsw, sizeof(int), 0600, NULL, &proc_dointvec, NULL,},
-	{4, "expert_mode", &pfm_sysctl.expert_mode, sizeof(int), 0600, NULL, &proc_dointvec, NULL,},
-	{ 0, },
+	{
+		.ctl_name	= CTL_UNNUMBERED,
+		.procname	= "debug",
+		.data		= &pfm_sysctl.debug,
+		.maxlen		= sizeof(int),
+		.mode		= 0666,
+		.proc_handler	= &proc_dointvec,
+	},
+	{
+		.ctl_name	= CTL_UNNUMBERED,
+		.procname	= "debug_ovfl",
+		.data		= &pfm_sysctl.debug_ovfl,
+		.maxlen		= sizeof(int),
+		.mode		= 0666,
+		.proc_handler	= &proc_dointvec,
+	},
+	{
+		.ctl_name	= CTL_UNNUMBERED,
+		.procname	= "fastctxsw",
+		.data		= &pfm_sysctl.fastctxsw,
+		.maxlen		= sizeof(int),
+		.mode		= 0600,
+		.proc_handler	=  &proc_dointvec,
+	},
+	{
+		.ctl_name	= CTL_UNNUMBERED,
+		.procname	= "expert_mode",
+		.data		= &pfm_sysctl.expert_mode,
+		.maxlen		= sizeof(int),
+		.mode		= 0600,
+		.proc_handler	= &proc_dointvec,
+	},
+	{}
 };
 static ctl_table pfm_sysctl_dir[] = {
-	{1, "perfmon", NULL, 0, 0755, pfm_ctl_table, },
- 	{0,},
+	{
+		.ctl_name	= CTL_UNNUMBERED,
+		.procname	= "perfmon",
+		.mode		= 0755,
+		.child		= pfm_ctl_table,
+	},
+ 	{}
 };
 static ctl_table pfm_sysctl_root[] = {
-	{1, "kernel", NULL, 0, 0755, pfm_sysctl_dir, },
- 	{0,},
+	{
+		.ctl_name	= CTL_KERN,
+		.procname	= "kernel",
+		.mode		= 0755,
+		.child		= pfm_sysctl_dir,
+	},
+ 	{}
 };
 static struct ctl_table_header *pfm_sysctl_header;
 
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 16:53:18 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 16:53:23 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:8578 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S28580796AbXAPQlr (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:41:47 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGeiRq000971;
	Tue, 16 Jan 2007 09:40:44 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGeiTR000969;
	Tue, 16 Jan 2007 09:40:44 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 25/59] sysctl: C99 convert arch/frv/kernel/pm.c
Date:	Tue, 16 Jan 2007 09:39:30 -0700
Message-Id: <11689656443582-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13640
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 arch/frv/kernel/pm.c |   50 +++++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 43 insertions(+), 7 deletions(-)

diff --git a/arch/frv/kernel/pm.c b/arch/frv/kernel/pm.c
index c1840d6..aa50333 100644
--- a/arch/frv/kernel/pm.c
+++ b/arch/frv/kernel/pm.c
@@ -401,17 +401,53 @@ static int cm_sysctl(ctl_table *table, int __user *name, int nlen,
 
 static struct ctl_table pm_table[] =
 {
-	{CTL_PM_SUSPEND, "suspend", NULL, 0, 0200, NULL, &sysctl_pm_do_suspend},
-	{CTL_PM_CMODE, "cmode", &clock_cmode_current, sizeof(int), 0644, NULL, &cmode_procctl, &cmode_sysctl, NULL},
-	{CTL_PM_P0, "p0", &clock_p0_current, sizeof(int), 0644, NULL, &p0_procctl, &p0_sysctl, NULL},
-	{CTL_PM_CM, "cm", &clock_cm_current, sizeof(int), 0644, NULL, &cm_procctl, &cm_sysctl, NULL},
-	{0}
+	{
+		.ctl_name	= CTL_PM_SUSPEND,
+		.procname	= "suspend",
+		.data		= NULL,
+		.maxlen		= 0,
+		.mode		= 0200,
+		.proc_handler	= &sysctl_pm_do_suspend,
+	},
+	{
+		.ctl_name	= CTL_PM_CMODE,
+		.procname	= "cmode",
+		.data		= &clock_cmode_current,
+		.maxlen		= sizeof(int),
+		.mode		= 0644,
+		.proc_handler	= &cmode_procctl,
+		.strategy	= &cmode_sysctl,
+	},
+	{
+		.ctl_name	= CTL_PM_P0,
+		.procname	= "p0",
+		.data		= &clock_p0_current,
+		.maxlen		= sizeof(int),
+		.mode		= 0644,
+		.proc_handler	= &p0_procctl,
+		.strategy	= &p0_sysctl,
+	},
+	{
+		.ctl_name	= CTL_PM_CM,
+		.procname	= "cm",
+		.data		= &clock_cm_current,
+		.maxlen		= sizeof(int),
+		.mode		= 0644,
+		.proc_handler	= &cm_procctl,
+		.strategy	= &cm_sysctl,
+	},
+	{ .ctl_name = 0}
 };
 
 static struct ctl_table pm_dir_table[] =
 {
-	{CTL_PM, "pm", NULL, 0, 0555, pm_table},
-	{0}
+	{
+		.ctl_name	= CTL_PM,
+		.procname	= "pm",
+		.mode		= 0555,
+		.child		= pm_table,
+	},
+	{ .ctl_name = 0}
 };
 
 /*
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 16:53:46 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 16:53:51 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:14210 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S28580797AbXAPQlt (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:41:49 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGeweR001005;
	Tue, 16 Jan 2007 09:40:58 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGev0l001004;
	Tue, 16 Jan 2007 09:40:57 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 33/59] sysctl: s390 move sysctl definitions to sysctl.h
Date:	Tue, 16 Jan 2007 09:39:38 -0700
Message-Id: <11689656572714-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13641
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

We need to have the the definition of all top level sysctl
directories registers in sysctl.h so we don't conflict by
accident and cause abi problems.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 arch/s390/appldata/appldata.h |    3 +--
 arch/s390/kernel/debug.c      |    1 -
 arch/s390/mm/cmm.c            |    4 ----
 include/linux/sysctl.h        |    7 +++++++
 4 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/arch/s390/appldata/appldata.h b/arch/s390/appldata/appldata.h
index 0429481..4069b81 100644
--- a/arch/s390/appldata/appldata.h
+++ b/arch/s390/appldata/appldata.h
@@ -21,8 +21,7 @@
 #define APPLDATA_RECORD_NET_SUM_ID	0x03	/* must be < 256 !     */
 #define APPLDATA_RECORD_PROC_ID		0x04
 
-#define CTL_APPLDATA 		2120	/* sysctl IDs, must be unique */
-#define CTL_APPLDATA_TIMER 	2121
+#define CTL_APPLDATA_TIMER 	2121	/* sysctl IDs, must be unique */
 #define CTL_APPLDATA_INTERVAL 	2122
 #define CTL_APPLDATA_MEM	2123
 #define CTL_APPLDATA_OS		2124
diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c
index bb57bc0..c81f8e5 100644
--- a/arch/s390/kernel/debug.c
+++ b/arch/s390/kernel/debug.c
@@ -852,7 +852,6 @@ debug_finish_entry(debug_info_t * id, debug_entry_t* active, int level,
 static int debug_stoppable=1;
 static int debug_active=1;
 
-#define CTL_S390DBF 5677
 #define CTL_S390DBF_STOPPABLE 5678
 #define CTL_S390DBF_ACTIVE 5679
 
diff --git a/arch/s390/mm/cmm.c b/arch/s390/mm/cmm.c
index 607f50e..df733d5 100644
--- a/arch/s390/mm/cmm.c
+++ b/arch/s390/mm/cmm.c
@@ -256,10 +256,6 @@ cmm_skip_blanks(char *cp, char **endp)
 }
 
 #ifdef CONFIG_CMM_PROC
-/* These will someday get removed. */
-#define VM_CMM_PAGES		1111
-#define VM_CMM_TIMED_PAGES	1112
-#define VM_CMM_TIMEOUT		1113
 
 static struct ctl_table cmm_table[];
 
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 71c16b4..56d0161 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -73,6 +73,8 @@ enum
 	CTL_SUNRPC=7249,	/* sunrpc debug */
 	CTL_PM=9899,		/* frv power management */
 	CTL_FRV=9898,		/* frv specific sysctls */
+	CTL_S390DBF=5677,	/* s390 debug */
+	CTL_APPLDATA=2120,	/* s390 appldata */
 };
 
 /* CTL_BUS names: */
@@ -205,6 +207,11 @@ enum
 	VM_PANIC_ON_OOM=33,	/* panic at out-of-memory */
 	VM_VDSO_ENABLED=34,	/* map VDSO into new processes? */
 	VM_MIN_SLAB=35,		 /* Percent pages ignored by zone reclaim */
+
+	/* s390 vm cmm sysctls */
+	VM_CMM_PAGES=1111,
+	VM_CMM_TIMED_PAGES=1112,
+	VM_CMM_TIMEOUT=1113,
 };
 
 
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 16:54:14 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 16:54:20 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:26498 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S28580799AbXAPQlz (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:41:55 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGf9up001041;
	Tue, 16 Jan 2007 09:41:09 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGf8p9001040;
	Tue, 16 Jan 2007 09:41:08 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 42/59] sysctl: Remove sys_sysctl support from the hpet timer driver.
Date:	Tue, 16 Jan 2007 09:39:47 -0700
Message-Id: <11689656683585-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13642
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

In the binary sysctl interface the hpet driver was claiming to
be the cdrom driver.  This is a no-no so remove support for the
binary interface.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 drivers/char/hpet.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c
index 20dc3be..81be1db 100644
--- a/drivers/char/hpet.c
+++ b/drivers/char/hpet.c
@@ -703,7 +703,7 @@ int hpet_control(struct hpet_task *tp, unsigned int cmd, unsigned long arg)
 
 static ctl_table hpet_table[] = {
 	{
-	 .ctl_name = 1,
+	 .ctl_name = CTL_UNNUMBERED,
 	 .procname = "max-user-freq",
 	 .data = &hpet_max_freq,
 	 .maxlen = sizeof(int),
@@ -715,7 +715,7 @@ static ctl_table hpet_table[] = {
 
 static ctl_table hpet_root[] = {
 	{
-	 .ctl_name = 1,
+	 .ctl_name = CTL_UNNUMBERED,
 	 .procname = "hpet",
 	 .maxlen = 0,
 	 .mode = 0555,
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 16:54:43 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 16:54:46 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:29058 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S28580803AbXAPQl5 (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:41:57 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGfDdg001053;
	Tue, 16 Jan 2007 09:41:13 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGfDan001052;
	Tue, 16 Jan 2007 09:41:13 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 45/59] sysctl: C99 convert ctl_tables in drivers/parport/procfs.c
Date:	Tue, 16 Jan 2007 09:39:50 -0700
Message-Id: <11689656733768-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13643
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 drivers/parport/procfs.c |  264 +++++++++++++++++++++++++++++++++-------------
 1 files changed, 189 insertions(+), 75 deletions(-)

diff --git a/drivers/parport/procfs.c b/drivers/parport/procfs.c
index 2e744a2..5337789 100644
--- a/drivers/parport/procfs.c
+++ b/drivers/parport/procfs.c
@@ -233,12 +233,12 @@ static int do_hardware_modes (ctl_table *table, int write,
 	return copy_to_user(result, buffer, len) ? -EFAULT : 0;
 }
 
-#define PARPORT_PORT_DIR(child) { 0, NULL, NULL, 0, 0555, child }
-#define PARPORT_PARPORT_DIR(child) { DEV_PARPORT, "parport", \
-                                     NULL, 0, 0555, child }
-#define PARPORT_DEV_DIR(child) { CTL_DEV, "dev", NULL, 0, 0555, child }
-#define PARPORT_DEVICES_ROOT_DIR  { DEV_PARPORT_DEVICES, "devices", \
-                                    NULL, 0, 0555, NULL }
+#define PARPORT_PORT_DIR(CHILD) { .ctl_name = 0, .procname = NULL, .mode = 0555, .child = CHILD }
+#define PARPORT_PARPORT_DIR(CHILD) { .ctl_name = DEV_PARPORT, .procname = "parport", \
+                                     .mode = 0555, .child = CHILD }
+#define PARPORT_DEV_DIR(CHILD) { .ctl_name = CTL_DEV, .procname = "dev", .mode = 0555, .child = CHILD }
+#define PARPORT_DEVICES_ROOT_DIR  { .ctl_name = DEV_PARPORT_DEVICES, .procname = "devices", \
+                                    .mode = 0555, .child = NULL }
 
 static const unsigned long parport_min_timeslice_value =
 PARPORT_MIN_TIMESLICE_VALUE;
@@ -263,50 +263,118 @@ struct parport_sysctl_table {
 };
 
 static const struct parport_sysctl_table parport_sysctl_template = {
-	NULL,
+	.sysctl_header = NULL,
         {
-		{ DEV_PARPORT_SPINTIME, "spintime",
-		  NULL, sizeof(int), 0644, NULL,
-		  &proc_dointvec_minmax, NULL, NULL,
-		  (void*) &parport_min_spintime_value,
-		  (void*) &parport_max_spintime_value },
-		{ DEV_PARPORT_BASE_ADDR, "base-addr",
-		  NULL, 0, 0444, NULL,
-		  &do_hardware_base_addr },
-		{ DEV_PARPORT_IRQ, "irq",
-		  NULL, 0, 0444, NULL,
-		  &do_hardware_irq },
-		{ DEV_PARPORT_DMA, "dma",
-		  NULL, 0, 0444, NULL,
-		  &do_hardware_dma },
-		{ DEV_PARPORT_MODES, "modes",
-		  NULL, 0, 0444, NULL,
-		  &do_hardware_modes },
+		{
+			.ctl_name	= DEV_PARPORT_SPINTIME,
+			.procname	= "spintime",
+			.data		= NULL,
+			.maxlen		= sizeof(int),
+			.mode		= 0644,
+			.proc_handler	= &proc_dointvec_minmax,
+			.extra1		= (void*) &parport_min_spintime_value,
+			.extra2		= (void*) &parport_max_spintime_value
+		},
+		{
+			.ctl_name	= DEV_PARPORT_BASE_ADDR,
+			.procname	= "base-addr",
+			.data		= NULL,
+			.maxlen		= 0,
+			.mode		= 0444,
+			.proc_handler	= &do_hardware_base_addr
+		},
+		{
+			.ctl_name	= DEV_PARPORT_IRQ,
+			.procname	= "irq",
+			.data		= NULL,
+			.maxlen		= 0,
+			.mode		= 0444,
+			.proc_handler	= &do_hardware_irq
+		},
+		{
+			.ctl_name	= DEV_PARPORT_DMA,
+			.procname	= "dma",
+			.data		= NULL,
+			.maxlen		= 0,
+			.mode		= 0444,
+			.proc_handler	= &do_hardware_dma
+		},
+		{
+			.ctl_name	= DEV_PARPORT_MODES,
+			.procname	= "modes",
+			.data		= NULL,
+			.maxlen		= 0,
+			.mode		= 0444,
+			.proc_handler	= &do_hardware_modes
+		},
 		PARPORT_DEVICES_ROOT_DIR,
 #ifdef CONFIG_PARPORT_1284
-		{ DEV_PARPORT_AUTOPROBE, "autoprobe",
-		  NULL, 0, 0444, NULL,
-		  &do_autoprobe },
-		{ DEV_PARPORT_AUTOPROBE + 1, "autoprobe0",
-		 NULL, 0, 0444, NULL,
-		 &do_autoprobe },
-		{ DEV_PARPORT_AUTOPROBE + 2, "autoprobe1",
-		  NULL, 0, 0444, NULL,
-		  &do_autoprobe },
-		{ DEV_PARPORT_AUTOPROBE + 3, "autoprobe2",
-		  NULL, 0, 0444, NULL,
-		  &do_autoprobe },
-		{ DEV_PARPORT_AUTOPROBE + 4, "autoprobe3",
-		  NULL, 0, 0444, NULL,
-		  &do_autoprobe },
+		{
+			.ctl_name	= DEV_PARPORT_AUTOPROBE,
+			.procname	= "autoprobe",
+			.data		= NULL,
+			.maxlen		= 0,
+			.mode		= 0444,
+			.proc_handler	= &do_autoprobe
+		},
+		{
+			.ctl_name	= DEV_PARPORT_AUTOPROBE + 1,
+			.procname	= "autoprobe0",
+			.data		= NULL,
+			.maxlen		= 0,
+			.maxlen		= 0444,
+			.proc_handler	=  &do_autoprobe
+		},
+		{
+			.ctl_name	= DEV_PARPORT_AUTOPROBE + 2,
+			.procname	= "autoprobe1",
+			.data		= NULL,
+			.maxlen		= 0,
+			.mode		= 0444,
+			.proc_handler	= &do_autoprobe
+		},
+		{
+			.ctl_name	= DEV_PARPORT_AUTOPROBE + 3,
+			.procname	= "autoprobe2",
+			.data		= NULL,
+			.maxlen		= 0,
+			.mode		= 0444,
+			.proc_handler	= &do_autoprobe
+		},
+		{
+			.ctl_name	= DEV_PARPORT_AUTOPROBE + 4,
+			.procname	= "autoprobe3",
+			.data		= NULL,
+			.maxlen		= 0,
+			.mode		= 0444,
+			.proc_handler	= &do_autoprobe
+		},
 #endif /* IEEE 1284 support */
-		{0}
+		{}
 	},
-	{ {DEV_PARPORT_DEVICES_ACTIVE, "active", NULL, 0, 0444, NULL,
-	  &do_active_device }, {0}},
-	{ PARPORT_PORT_DIR(NULL), {0}},
-	{ PARPORT_PARPORT_DIR(NULL), {0}},
-	{ PARPORT_DEV_DIR(NULL), {0}}
+	{
+		{
+			.ctl_name	= DEV_PARPORT_DEVICES_ACTIVE,
+			.procname	= "active",
+			.data		= NULL,
+			.maxlen		= 0,
+			.mode		= 0444,
+			.proc_handler	= &do_active_device
+		},
+		{}
+	},
+	{
+		PARPORT_PORT_DIR(NULL),
+		{}
+	},
+	{
+		PARPORT_PARPORT_DIR(NULL),
+		{}
+	},
+	{
+		PARPORT_DEV_DIR(NULL),
+		{}
+	}
 };
 
 struct parport_device_sysctl_table
@@ -322,19 +390,46 @@ struct parport_device_sysctl_table
 
 static const struct parport_device_sysctl_table
 parport_device_sysctl_template = {
-	NULL,
+	.sysctl_header = NULL,
+	{
+		{
+			.ctl_name 	= DEV_PARPORT_DEVICE_TIMESLICE,
+			.procname 	= "timeslice",
+			.data		= NULL,
+			.maxlen		= sizeof(int),
+			.mode		= 0644,
+			.proc_handler	= &proc_doulongvec_ms_jiffies_minmax,
+			.extra1		= (void*) &parport_min_timeslice_value,
+			.extra2		= (void*) &parport_max_timeslice_value
+		},
+	},
+	{
+		{
+			.ctl_name	= 0,
+			.procname	= NULL,
+			.data		= NULL,
+			.maxlen		= 0,
+			.mode		= 0555,
+			.child		= NULL
+		},
+		{}
+	},
 	{
-		{ DEV_PARPORT_DEVICE_TIMESLICE, "timeslice",
-		  NULL, sizeof(int), 0644, NULL,
-		  &proc_doulongvec_ms_jiffies_minmax, NULL, NULL,
-		  (void*) &parport_min_timeslice_value,
-		  (void*) &parport_max_timeslice_value },
+		PARPORT_DEVICES_ROOT_DIR,
+		{}
+	},
+	{
+		PARPORT_PORT_DIR(NULL),
+		{}
 	},
-	{ {0, NULL, NULL, 0, 0555, NULL}, {0}},
-	{ PARPORT_DEVICES_ROOT_DIR, {0}},
-	{ PARPORT_PORT_DIR(NULL), {0}},
-	{ PARPORT_PARPORT_DIR(NULL), {0}},
-	{ PARPORT_DEV_DIR(NULL), {0}}
+	{
+		PARPORT_PARPORT_DIR(NULL),
+		{}
+	},
+	{
+		PARPORT_DEV_DIR(NULL),
+		{}
+	}
 };
 
 struct parport_default_sysctl_table
@@ -351,28 +446,47 @@ extern int parport_default_spintime;
 
 static struct parport_default_sysctl_table
 parport_default_sysctl_table = {
-	NULL,
+	.sysctl_header	= NULL,
+	{
+		{
+			.ctl_name	= DEV_PARPORT_DEFAULT_TIMESLICE,
+			.procname	= "timeslice",
+			.data		= &parport_default_timeslice,
+			.maxlen		= sizeof(parport_default_timeslice),
+			.mode		= 0644,
+			.proc_handler	= &proc_doulongvec_ms_jiffies_minmax,
+			.extra1		= (void*) &parport_min_timeslice_value,
+			.extra2		= (void*) &parport_max_timeslice_value
+		},
+		{
+			.ctl_name	= DEV_PARPORT_DEFAULT_SPINTIME,
+			.procname	= "spintime",
+			.data		= &parport_default_spintime,
+			.maxlen		= sizeof(parport_default_spintime),
+			.mode		= 0644,
+			.proc_handler	= &proc_dointvec_minmax,
+			.extra1		= (void*) &parport_min_spintime_value,
+			.extra2		= (void*) &parport_max_spintime_value
+		},
+		{}
+	},
 	{
-		{ DEV_PARPORT_DEFAULT_TIMESLICE, "timeslice",
-		  &parport_default_timeslice,
-		  sizeof(parport_default_timeslice), 0644, NULL,
-		  &proc_doulongvec_ms_jiffies_minmax, NULL, NULL,
-		  (void*) &parport_min_timeslice_value,
-		  (void*) &parport_max_timeslice_value },
-		{ DEV_PARPORT_DEFAULT_SPINTIME, "spintime",
-		  &parport_default_spintime,
-		  sizeof(parport_default_spintime), 0644, NULL,
-		  &proc_dointvec_minmax, NULL, NULL,
-		  (void*) &parport_min_spintime_value,
-		  (void*) &parport_max_spintime_value },
-		{0}
+		{
+			.ctl_name	= DEV_PARPORT_DEFAULT,
+			.procname	= "default",
+			.mode		= 0555,
+			.child		= parport_default_sysctl_table.vars
+		},
+		{}
 	},
-	{ { DEV_PARPORT_DEFAULT, "default", NULL, 0, 0555,
-	    parport_default_sysctl_table.vars },{0}},
 	{
-	PARPORT_PARPORT_DIR(parport_default_sysctl_table.default_dir), 
-	{0}},
-	{ PARPORT_DEV_DIR(parport_default_sysctl_table.parport_dir), {0}}
+		PARPORT_PARPORT_DIR(parport_default_sysctl_table.default_dir), 
+		{}
+	},
+	{
+		PARPORT_DEV_DIR(parport_default_sysctl_table.parport_dir), 
+		{}
+	}
 };
 
 
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 16:55:09 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 16:55:15 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:32386 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S28580804AbXAPQmA (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:42:00 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGensg000983;
	Tue, 16 Jan 2007 09:40:49 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGem9p000982;
	Tue, 16 Jan 2007 09:40:48 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 28/59] sysctl: C99 Convert arch/ia64/sn/kernel/xpc_main.c
Date:	Tue, 16 Jan 2007 09:39:33 -0700
Message-Id: <11689656481444-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13644
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 arch/ia64/sn/kernel/xpc_main.c |   86 +++++++++++++++++----------------------
 1 files changed, 38 insertions(+), 48 deletions(-)

diff --git a/arch/ia64/sn/kernel/xpc_main.c b/arch/ia64/sn/kernel/xpc_main.c
index 24adb75..e04f7b5 100644
--- a/arch/ia64/sn/kernel/xpc_main.c
+++ b/arch/ia64/sn/kernel/xpc_main.c
@@ -101,67 +101,57 @@ static int xpc_disengage_request_max_timelimit = 120;
 
 static ctl_table xpc_sys_xpc_hb_dir[] = {
 	{
-		CTL_UNNUMBERED,
-		"hb_interval",
-		&xpc_hb_interval,
-		sizeof(int),
-		0644,
-		NULL,
-		&proc_dointvec_minmax,
-		&sysctl_intvec,
-		NULL,
-		&xpc_hb_min_interval,
-		&xpc_hb_max_interval
+		.ctl_name 	= CTL_UNNUMBERED,
+		.procname	= "hb_interval",
+		.data		= &xpc_hb_interval,
+		.maxlen		= sizeof(int),
+		.mode		= 0644,
+		.proc_handler	= &proc_dointvec_minmax,
+		.strategy	= &sysctl_intvec,
+		.extra1		= &xpc_hb_min_interval,
+		.extra2		= &xpc_hb_max_interval
 	},
 	{
-		CTL_UNNUMBERED,
-		"hb_check_interval",
-		&xpc_hb_check_interval,
-		sizeof(int),
-		0644,
-		NULL,
-		&proc_dointvec_minmax,
-		&sysctl_intvec,
-		NULL,
-		&xpc_hb_check_min_interval,
-		&xpc_hb_check_max_interval
+		.ctl_name	= CTL_UNNUMBERED,
+		.procname	= "hb_check_interval",
+		.data		= &xpc_hb_check_interval,
+		.maxlen		= sizeof(int),
+		.mode		= 0644,
+		.proc_handler	= &proc_dointvec_minmax,
+		.strategy	= &sysctl_intvec,
+		.extra1		= &xpc_hb_check_min_interval,
+		.extra2		= &xpc_hb_check_max_interval
 	},
-	{0}
+	{}
 };
 static ctl_table xpc_sys_xpc_dir[] = {
 	{
-		CTL_UNNUMBERED,
-		"hb",
-		NULL,
-		0,
-		0555,
-		xpc_sys_xpc_hb_dir
+		.ctl_name	= CTL_UNNUMBERED,
+		.procname	= "hb",
+		.mode		= 0555,
+		.child		= xpc_sys_xpc_hb_dir
 	},
 	{
-		CTL_UNNUMBERED,
-		"disengage_request_timelimit",
-		&xpc_disengage_request_timelimit,
-		sizeof(int),
-		0644,
-		NULL,
-		&proc_dointvec_minmax,
-		&sysctl_intvec,
-		NULL,
-		&xpc_disengage_request_min_timelimit,
-		&xpc_disengage_request_max_timelimit
+		.ctl_name	= CTL_UNNUMBERED,
+		.procname	= "disengage_request_timelimit",
+		.data		= &xpc_disengage_request_timelimit,
+		.maxlen		= sizeof(int),
+		.mode		= 0644,
+		.proc_handler	= &proc_dointvec_minmax,
+		.strategy	= &sysctl_intvec,
+		.extra1		= &xpc_disengage_request_min_timelimit,
+		.extra2		= &xpc_disengage_request_max_timelimit
 	},
-	{0}
+	{}
 };
 static ctl_table xpc_sys_dir[] = {
 	{
-		CTL_UNNUMBERED,
-		"xpc",
-		NULL,
-		0,
-		0555,
-		xpc_sys_xpc_dir
+		.ctl_name	= CTL_UNNUMBERED,
+		.procname	= "xpc",
+		.mode		= 0555,
+		.child		= xpc_sys_xpc_dir
 	},
-	{0}
+	{}
 };
 static struct ctl_table_header *xpc_sysctl;
 
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 16:55:38 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 16:55:42 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:32898 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S28580805AbXAPQmB (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:42:01 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGeuD0000997;
	Tue, 16 Jan 2007 09:40:56 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGetFD000996;
	Tue, 16 Jan 2007 09:40:55 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 31/59] sysctl: C99 convert the ctl_tables in arch/mips/au1000/common/power.c
Date:	Tue, 16 Jan 2007 09:39:36 -0700
Message-Id: <11689656551180-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13645
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 arch/mips/au1000/common/power.c |   38 ++++++++++++++++++++++++++++++++------
 1 files changed, 32 insertions(+), 6 deletions(-)

diff --git a/arch/mips/au1000/common/power.c b/arch/mips/au1000/common/power.c
index b531ab7..31256b8 100644
--- a/arch/mips/au1000/common/power.c
+++ b/arch/mips/au1000/common/power.c
@@ -419,15 +419,41 @@ static int pm_do_freq(ctl_table * ctl, int write, struct file *file,
 
 
 static struct ctl_table pm_table[] = {
-	{CTL_UNNUMBERED, "suspend", NULL, 0, 0600, NULL, &pm_do_suspend},
-	{CTL_UNNUMBERED, "sleep", NULL, 0, 0600, NULL, &pm_do_sleep},
-	{CTL_UNNUMBERED, "freq", NULL, 0, 0600, NULL, &pm_do_freq},
-	{0}
+	{
+		.ctl_name 	= CTL_UNNUMBERED,
+		.procname	= "suspend",
+		.data		= NULL,
+		.maxlen		= 0,
+		.mode		= 0600,
+		.proc_handler	= &pm_do_suspend
+	},
+	{
+		.ctl_name	= CTL_UNNUMBERED,
+		.procname	= "sleep",
+		.data		= NULL,
+		.maxlen		= 0,
+		.mode		= 0600,
+		.proc_handler	= &pm_do_sleep
+	},
+	{
+		.ctl_name	= CTL_UNNUMBERED,
+		.procname	= "freq",
+		.data		= NULL,
+		.maxlen		= 0,
+		.mode		= 0600,
+		.proc_handler	= &pm_do_freq
+	},
+	{}
 };
 
 static struct ctl_table pm_dir_table[] = {
-	{CTL_UNNUMBERED, "pm", NULL, 0, 0555, pm_table},
-	{0}
+	{
+		.ctl_name	= CTL_UNNUMBERED,
+		.procname	= "pm",
+		.mode		= 0555,
+		.child		= pm_table
+	},
+	{}
 };
 
 /*
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 16:56:05 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 16:56:11 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:35202 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S28580810AbXAPQmC (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:42:02 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGf2fM001021;
	Tue, 16 Jan 2007 09:41:02 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGf2Pd001020;
	Tue, 16 Jan 2007 09:41:02 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 37/59] sysctl: C99 convert arch/sh64/kernel/traps.c and remove ABI breakage.
Date:	Tue, 16 Jan 2007 09:39:42 -0700
Message-Id: <11689656622749-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13646
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

While doing the C99 conversion I notices that the top level sh64
directory was using the binary number for CTL_KERN.  That is a
no-no so I removed the support for the sysctl binary interface
only leaving sysctl /proc support.

At least the sysctl tables were placed at the end of
the list so user space did not see this mistake.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 arch/sh64/kernel/traps.c |   49 +++++++++++++++++++++++++++++++++++----------
 1 files changed, 38 insertions(+), 11 deletions(-)

diff --git a/arch/sh64/kernel/traps.c b/arch/sh64/kernel/traps.c
index 224b7f5..02cca74 100644
--- a/arch/sh64/kernel/traps.c
+++ b/arch/sh64/kernel/traps.c
@@ -910,25 +910,52 @@ static int misaligned_fixup(struct pt_regs *regs)
 }
 
 static ctl_table unaligned_table[] = {
-	{1, "kernel_reports", &kernel_mode_unaligned_fixup_count,
-		sizeof(int), 0644, NULL, &proc_dointvec},
+	{
+		.ctl_name	= CTL_UNNUMBERED,
+		.procname	= "kernel_reports",
+		.data		= &kernel_mode_unaligned_fixup_count,
+		.maxlen		= sizeof(int),
+		.mode		= 0644,
+		.proc_handler	= &proc_dointvec
+	},
 #if defined(CONFIG_SH64_USER_MISALIGNED_FIXUP)
-	{2, "user_reports", &user_mode_unaligned_fixup_count,
-		sizeof(int), 0644, NULL, &proc_dointvec},
-	{3, "user_enable", &user_mode_unaligned_fixup_enable,
-		sizeof(int), 0644, NULL, &proc_dointvec},
+	{
+		.ctl_name	= CTL_UNNUMBERED,
+		.procname	= "user_reports",
+		.data		= &user_mode_unaligned_fixup_count,
+		.maxlen		= sizeof(int),
+		.mode		= 0644,
+		.proc_handler	= &proc_dointvec
+	},
+	{
+		.ctl_name	= CTL_UNNUMBERED,
+		.procname	= "user_enable",
+		.data		= &user_mode_unaligned_fixup_enable,
+		.maxlen		= sizeof(int),
+		.mode		= 0644,
+		.proc_handler	= &proc_dointvec},
 #endif
-	{0}
+	{}
 };
 
 static ctl_table unaligned_root[] = {
-	{1, "unaligned_fixup", NULL, 0, 0555, unaligned_table},
-	{0}
+	{
+		.ctl_name	= CTL_UNNUMBERED,
+		.procname	= "unaligned_fixup",
+		.mode		= 0555,
+		unaligned_table
+	},
+	{}
 };
 
 static ctl_table sh64_root[] = {
-	{1, "sh64", NULL, 0, 0555, unaligned_root},
-	{0}
+	{
+		.ctl_name	= CTL_UNNUMBERED,
+		.procname	= "sh64",
+		.mode		= 0555,
+		.child		= unaligned_root
+	},
+	{}
 };
 static struct ctl_table_header *sysctl_header;
 static int __init init_sysctl(void)
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 16:56:34 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 16:56:38 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:36482 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S28580811AbXAPQmD (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:42:03 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGf8tP001037;
	Tue, 16 Jan 2007 09:41:08 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGf7PD001036;
	Tue, 16 Jan 2007 09:41:08 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 41/59] sysctl: C99 convert ctl_tables in arch/x86_64/mm/init.c
Date:	Tue, 16 Jan 2007 09:39:46 -0700
Message-Id: <11689656673646-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13647
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 arch/x86_64/mm/init.c |   22 ++++++++++++++++------
 1 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/arch/x86_64/mm/init.c b/arch/x86_64/mm/init.c
index 65aa66c..a04535d 100644
--- a/arch/x86_64/mm/init.c
+++ b/arch/x86_64/mm/init.c
@@ -711,15 +711,25 @@ int kern_addr_valid(unsigned long addr)
 extern int exception_trace, page_fault_trace;
 
 static ctl_table debug_table2[] = {
-	{ 99, "exception-trace", &exception_trace, sizeof(int), 0644, NULL,
-	  proc_dointvec },
-	{ 0, }
+	{
+		.ctl_name	= 99,
+		.procname	= "exception-trace",
+		.data		= &exception_trace,
+		.maxlen		= sizeof(int),
+		.mode		= 0644,
+		.proc_handler	= proc_dointvec
+	},
+	{}
 }; 
 
 static ctl_table debug_root_table2[] = { 
-	{ .ctl_name = CTL_DEBUG, .procname = "debug", .mode = 0555, 
-	   .child = debug_table2 }, 
-	{ 0 }, 
+	{
+		.ctl_name = CTL_DEBUG,
+		.procname = "debug",
+		.mode = 0555,
+		.child = debug_table2
+	}, 
+	{}
 }; 
 
 static __init int x8664_sysctl_init(void)
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 16:57:01 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 16:57:07 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:37762 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S28580812AbXAPQmE (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:42:04 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGevpM001001;
	Tue, 16 Jan 2007 09:40:57 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGevn2001000;
	Tue, 16 Jan 2007 09:40:57 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 32/59] sysctl: C99 convert arch/mips/lasat/sysctl.c and remove ABI breakage.
Date:	Tue, 16 Jan 2007 09:39:37 -0700
Message-Id: <11689656574092-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13648
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

While C99 converting the ctl_table initializers I realized
that the binary sysctl numbers were in conflict with the binary
values under CTL_KERN.   Including CTL_KERN KERN_VERSION as used
by glibc.  So I just removed the sysctl binary interface for these
values, as it was unsupportable.

Luckily these sysctl were inserted at the end of the
sysctl list so this bug was not visible to userspace.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 arch/mips/lasat/sysctl.c |  145 ++++++++++++++++++++++++++++++++++++---------
 1 files changed, 116 insertions(+), 29 deletions(-)

diff --git a/arch/mips/lasat/sysctl.c b/arch/mips/lasat/sysctl.c
index 1287835..c04e82f 100644
--- a/arch/mips/lasat/sysctl.c
+++ b/arch/mips/lasat/sysctl.c
@@ -302,42 +302,129 @@ extern int lasat_boot_to_service;
 #ifdef CONFIG_SYSCTL
 
 static ctl_table lasat_table[] = {
-	{LASAT_CPU_HZ, "cpu-hz", &lasat_board_info.li_cpu_hz, sizeof(int),
-	 0444, NULL, &proc_dointvec, &sysctl_intvec},
-	{LASAT_BUS_HZ, "bus-hz", &lasat_board_info.li_bus_hz, sizeof(int),
-	 0444, NULL, &proc_dointvec, &sysctl_intvec},
-	{LASAT_MODEL, "bmid", &lasat_board_info.li_bmid, sizeof(int),
-	 0444, NULL, &proc_dointvec, &sysctl_intvec},
-	{LASAT_PRID, "prid", &lasat_board_info.li_prid, sizeof(int),
-	 0644, NULL, &proc_lasat_eeprom_value, &sysctl_lasat_eeprom_value},
+	{
+		.ctl_name	= CTL_UNNUMBERED,
+		.procname	= "cpu-hz",
+		.data		= &lasat_board_info.li_cpu_hz,
+		.maxlen		= sizeof(int),
+		.mode		= 0444,
+		.proc_handler	= &proc_dointvec,
+		.strategy	= &sysctl_intvec
+	},
+	{
+		.ctl_name	= CTL_UNNUMBERED,
+		.procname	= "bus-hz",
+		.data		= &lasat_board_info.li_bus_hz,
+		.maxlen		= sizeof(int),
+		.mode		= 0444,
+		.proc_handler	= &proc_dointvec,
+		.strategy	= &sysctl_intvec
+	},
+	{
+		.ctl_name	= CTL_UNNUMBERED,
+		.procname	= "bmid",
+		.data		= &lasat_board_info.li_bmid,
+		.maxlen		= sizeof(int),
+		.mode		= 0444,
+		.proc_handler	= &proc_dointvec,
+		.strategy	= &sysctl_intvec
+	},
+	{
+		.ctl_name	= CTL_UNNUMBERED,
+		.procname	= "prid",
+		.data		= &lasat_board_info.li_prid,
+		.maxlen		= sizeof(int),
+		.mode		= 0644,
+		.proc_handler	= &proc_lasat_eeprom_value,
+		.strategy	= &sysctl_lasat_eeprom_value
+	},
 #ifdef CONFIG_INET
-	{LASAT_IPADDR, "ipaddr", &lasat_board_info.li_eeprom_info.ipaddr, sizeof(int),
-	 0644, NULL, &proc_lasat_ip, &sysctl_lasat_intvec},
-	{LASAT_NETMASK, "netmask", &lasat_board_info.li_eeprom_info.netmask, sizeof(int),
-	 0644, NULL, &proc_lasat_ip, &sysctl_lasat_intvec},
-	{LASAT_BCAST, "bcastaddr", &lasat_bcastaddr,
-		sizeof(lasat_bcastaddr), 0600, NULL,
-		&proc_dostring, &sysctl_string},
+	{
+		.ctl_name	= CTL_UNNUMBERED,
+		.procname	= "ipaddr",
+		.data		= &lasat_board_info.li_eeprom_info.ipaddr,
+		.maxlen		= sizeof(int),
+		.mode		= 0644,
+		.proc_handler	= &proc_lasat_ip,
+		.strategy	= &sysctl_lasat_intvec
+	},
+	{
+		.ctl_name	= LASAT_NETMASK,
+		.procname	= "netmask",
+		.data		= &lasat_board_info.li_eeprom_info.netmask,
+		.maxlen		= sizeof(int),
+		.mode		= 0644,
+		.proc_handler	= &proc_lasat_ip,
+		.strategy	= &sysctl_lasat_intvec
+	},
+	{
+		.ctl_name	= CTL_UNNUMBERED,
+		.procname	= "bcastaddr",
+		.data		= &lasat_bcastaddr,
+		.maxlen		= sizeof(lasat_bcastaddr),
+		.mode		= 0600,
+		.proc_handler	= &proc_dostring,
+		.strategy	= &sysctl_string
+	},
 #endif
-	{LASAT_PASSWORD, "passwd_hash", &lasat_board_info.li_eeprom_info.passwd_hash, sizeof(lasat_board_info.li_eeprom_info.passwd_hash),
-	 0600, NULL, &proc_dolasatstring, &sysctl_lasatstring},
-	{LASAT_SBOOT, "boot-service", &lasat_boot_to_service, sizeof(int),
-	 0644, NULL, &proc_dointvec, &sysctl_intvec},
+	{
+		.ctl_name	= CTL_UNNUMBERED,
+		.procname	= "passwd_hash",
+		.data		= &lasat_board_info.li_eeprom_info.passwd_hash,
+		.maxlen		= sizeof(lasat_board_info.li_eeprom_info.passwd_hash),
+		.mode		= 0600,
+		.proc_handler	= &proc_dolasatstring,
+		.strategy	= &sysctl_lasatstring
+	},
+	{
+		.ctl_name	= CTL_UNNUMBERED,
+		.procname	= "boot-service",
+		.data		= &lasat_boot_to_service,
+		.maxlen		= sizeof(int),
+		.mode		= 0644,
+		.proc_handler	= &proc_dointvec,
+		.strategy	= &sysctl_intvec
+	},
 #ifdef CONFIG_DS1603
-	{LASAT_RTC, "rtc", &rtctmp, sizeof(int),
-	 0644, NULL, &proc_dolasatrtc, &sysctl_lasat_rtc},
+	{
+		.ctl_name	= CTL_UNNUMBERED,
+		.procname	= "rtc",
+		.data		= &rtctmp,
+		.maxlen		= sizeof(int),
+		.mode		= 0644,
+		.proc_handler	= &proc_dolasatrtc,
+		.strategy	= &sysctl_lasat_rtc
+	},
 #endif
-	{LASAT_NAMESTR, "namestr", &lasat_board_info.li_namestr, sizeof(lasat_board_info.li_namestr),
-	 0444, NULL, &proc_dostring, &sysctl_string},
-	{LASAT_TYPESTR, "typestr", &lasat_board_info.li_typestr, sizeof(lasat_board_info.li_typestr),
-	 0444, NULL, &proc_dostring, &sysctl_string},
-	{0}
+	{
+		.ctl_name	= CTL_UNNUMBERED,
+		.procname	= "namestr",
+		.data		= &lasat_board_info.li_namestr,
+		.maxlen		= sizeof(lasat_board_info.li_namestr),
+		.mode		= 0444,
+		.proc_handler	=  &proc_dostring,
+		.strategy	= &sysctl_string
+	},
+	{
+		.ctl_name	= CTL_UNNUMBERED,
+		.procname	= "typestr",
+		.data		= &lasat_board_info.li_typestr,
+		.maxlen		= sizeof(lasat_board_info.li_typestr),
+		.mode		= 0444,
+		.proc_handler	= &proc_dostring,
+		.strategy	= &sysctl_string
+	},
+	{}
 };
 
-#define CTL_LASAT 1	// CTL_ANY ???
 static ctl_table lasat_root_table[] = {
-	{ CTL_LASAT, "lasat", NULL, 0, 0555, lasat_table },
-	{ 0 }
+	{
+		.ctl_name	= CTL_UNNUMBERED,
+		.procname	= "lasat",
+		.mode		=  0555,
+		.child		= lasat_table
+	},
+	{}
 };
 
 static int __init lasat_register_sysctl(void)
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 16:57:30 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 16:57:34 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:39298 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S28580813AbXAPQmF (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:42:05 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGfKjk001061;
	Tue, 16 Jan 2007 09:41:20 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGfJ0P001060;
	Tue, 16 Jan 2007 09:41:19 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 47/59] sysctl: C99 convert ctl_tables in NTFS and remove sys_sysctl support
Date:	Tue, 16 Jan 2007 09:39:52 -0700
Message-Id: <11689656793474-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13649
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

Putting ntfs-debug under FS_NRINODE was not a kosher thing to do
so don't give it any binary number.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 fs/ntfs/sysctl.c |   24 ++++++++++++++++--------
 1 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/fs/ntfs/sysctl.c b/fs/ntfs/sysctl.c
index 1c23138..bc217de 100644
--- a/fs/ntfs/sysctl.c
+++ b/fs/ntfs/sysctl.c
@@ -33,20 +33,28 @@
 #include "sysctl.h"
 #include "debug.h"
 
-#define FS_NTFS	1
-
 /* Definition of the ntfs sysctl. */
 static ctl_table ntfs_sysctls[] = {
-	{ FS_NTFS, "ntfs-debug",		/* Binary and text IDs. */
-	  &debug_msgs,sizeof(debug_msgs),	/* Data pointer and size. */
-	  0644,	NULL, &proc_dointvec },		/* Mode, child, proc handler. */
-	{ 0 }
+	{
+		.ctl_name	= CTL_UNUMBERED,	/* Binary and text IDs. */
+		.procname	= "ntfs-debug",
+		.data		= &debug_msgs,		/* Data pointer and size. */
+		.maxlen		= sizeof(debug_msgs),
+		.mode		= 0644,			/* Mode, proc handler. */
+		.proc_handler	= &proc_dointvec
+	},
+	{}
 };
 
 /* Define the parent directory /proc/sys/fs. */
 static ctl_table sysctls_root[] = {
-	{ CTL_FS, "fs", NULL, 0, 0555, ntfs_sysctls },
-	{ 0 }
+	{
+		.ctl_name	= CTL_FS,
+		.procname	= "fs",
+		.mode		= 0555,
+		.child		= ntfs_sysctls
+	},
+	{}
 };
 
 /* Storage for the sysctls header. */
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 16:57:57 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 16:58:00 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:40834 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S28580814AbXAPQmG (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:42:06 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGf06o001013;
	Tue, 16 Jan 2007 09:41:00 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGexjV001012;
	Tue, 16 Jan 2007 09:40:59 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 35/59] sysctl: C99 convert ctl_tables in arch/powerpc/kernel/idle.c
Date:	Tue, 16 Jan 2007 09:39:40 -0700
Message-Id: <11689656593247-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13650
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

This was partially done already and there was no ABI breakage what
a relief.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 arch/powerpc/kernel/idle.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/arch/powerpc/kernel/idle.c b/arch/powerpc/kernel/idle.c
index 8994af3..8b27bb1 100644
--- a/arch/powerpc/kernel/idle.c
+++ b/arch/powerpc/kernel/idle.c
@@ -110,11 +110,16 @@ static ctl_table powersave_nap_ctl_table[]={
 		.mode		= 0644,
 		.proc_handler	= &proc_dointvec,
 	},
-	{ 0, },
+	{}
 };
 static ctl_table powersave_nap_sysctl_root[] = {
-	{ 1, "kernel", NULL, 0, 0755, powersave_nap_ctl_table, },
- 	{ 0,},
+	{
+		.ctl_name	= CTL_KERN,
+		.procname	= "kernel",
+		.mode		= 0755,
+		.child		= powersave_nap_ctl_table,
+	},
+	{}
 };
 
 static int __init
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 16:58:24 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 16:58:28 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:42114 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S28580815AbXAPQmG (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:42:06 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGf1kD001017;
	Tue, 16 Jan 2007 09:41:01 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGf1DY001016;
	Tue, 16 Jan 2007 09:41:01 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 36/59] sysctl: C99 convert ctl_tables entries in arch/ppc/kernel/ppc_htab.c
Date:	Tue, 16 Jan 2007 09:39:41 -0700
Message-Id: <11689656602523-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13651
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

And make the mode of the kernel directory 0555 no one is allowed
to write to sysctl directories.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 arch/ppc/kernel/ppc_htab.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/arch/ppc/kernel/ppc_htab.c b/arch/ppc/kernel/ppc_htab.c
index bd129d3..77b20ff 100644
--- a/arch/ppc/kernel/ppc_htab.c
+++ b/arch/ppc/kernel/ppc_htab.c
@@ -442,11 +442,16 @@ static ctl_table htab_ctl_table[]={
 		.mode		= 0644,
 		.proc_handler	= &proc_dol2crvec,
 	},
-	{ 0, },
+	{}
 };
 static ctl_table htab_sysctl_root[] = {
-	{ 1, "kernel", NULL, 0, 0755, htab_ctl_table, },
- 	{ 0,},
+	{
+		.ctl_name	= CTL_KERN,
+		.procname	= "kernel",
+		.mode		= 0555,
+		.child		= htab_ctl_table,
+	},
+	{}
 };
 
 static int __init
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 16:58:51 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 16:58:56 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:47490 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S20041441AbXAPQmK (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:42:10 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGex9U001009;
	Tue, 16 Jan 2007 09:40:59 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGewVo001008;
	Tue, 16 Jan 2007 09:40:58 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 34/59] sysctl: s390 Remove unnecessary use of insert_at_head
Date:	Tue, 16 Jan 2007 09:39:39 -0700
Message-Id: <11689656581195-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13652
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 arch/s390/appldata/appldata_base.c |    4 ++--
 arch/s390/kernel/debug.c           |    2 +-
 arch/s390/mm/cmm.c                 |    2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/s390/appldata/appldata_base.c b/arch/s390/appldata/appldata_base.c
index b8c2372..cdc4109 100644
--- a/arch/s390/appldata/appldata_base.c
+++ b/arch/s390/appldata/appldata_base.c
@@ -506,7 +506,7 @@ int appldata_register_ops(struct appldata_ops *ops)
 
 	ops->ctl_table[3].ctl_name = 0;
 
-	ops->sysctl_header = register_sysctl_table(ops->ctl_table,1);
+	ops->sysctl_header = register_sysctl_table(ops->ctl_table,0);
 
 	P_INFO("%s-ops registered!\n", ops->name);
 	return 0;
@@ -606,7 +606,7 @@ static int __init appldata_init(void)
 	/* Register cpu hotplug notifier */
 	register_hotcpu_notifier(&appldata_nb);
 
-	appldata_sysctl_header = register_sysctl_table(appldata_dir_table, 1);
+	appldata_sysctl_header = register_sysctl_table(appldata_dir_table, 0);
 #ifdef MODULE
 	appldata_dir_table[0].de->owner = THIS_MODULE;
 	appldata_table[0].de->owner = THIS_MODULE;
diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c
index c81f8e5..d38cb27 100644
--- a/arch/s390/kernel/debug.c
+++ b/arch/s390/kernel/debug.c
@@ -1053,7 +1053,7 @@ __init debug_init(void)
 {
 	int rc = 0;
 
-	s390dbf_sysctl_header = register_sysctl_table(s390dbf_dir_table, 1);
+	s390dbf_sysctl_header = register_sysctl_table(s390dbf_dir_table, 0);
 	down(&debug_lock);
 	debug_debugfs_root_entry = debugfs_create_dir(DEBUG_DIR_ROOT,NULL);
 	printk(KERN_INFO "debug: Initialization complete\n");
diff --git a/arch/s390/mm/cmm.c b/arch/s390/mm/cmm.c
index df733d5..5f83a3f 100644
--- a/arch/s390/mm/cmm.c
+++ b/arch/s390/mm/cmm.c
@@ -418,7 +418,7 @@ cmm_init (void)
 	int rc = -ENOMEM;
 
 #ifdef CONFIG_CMM_PROC
-	cmm_sysctl_header = register_sysctl_table(cmm_dir_table, 1);
+	cmm_sysctl_header = register_sysctl_table(cmm_dir_table, 0);
 	if (!cmm_sysctl_header)
 		goto out;
 #endif
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 16:59:26 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 16:59:30 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:50562 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S28580818AbXAPQmN (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:42:13 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGfGD4001057;
	Tue, 16 Jan 2007 09:41:16 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGfFo3001056;
	Tue, 16 Jan 2007 09:41:15 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 46/59] sysctl: C99 convert coda ctl_tables and remove binary sysctls.
Date:	Tue, 16 Jan 2007 09:39:51 -0700
Message-Id: <11689656751225-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13653
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

Will converting the coda sysctl initializers I discovered that
it is yet another user of sysctl that was stomping CTL_KERN.
So off with it's sys_sysctl support since it wasn't done
in a supportable way.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 fs/coda/sysctl.c |   58 ++++++++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 48 insertions(+), 10 deletions(-)

diff --git a/fs/coda/sysctl.c b/fs/coda/sysctl.c
index 1c82e9a..df682e2 100644
--- a/fs/coda/sysctl.c
+++ b/fs/coda/sysctl.c
@@ -32,8 +32,6 @@
 
 static struct ctl_table_header *fs_table_header;
 
-#define FS_CODA         1       /* Coda file system */
-
 #define CODA_TIMEOUT    3       /* timeout on upcalls to become intrble */
 #define CODA_HARD       5       /* mount type "hard" or "soft" */
 #define CODA_VFS 	 6       /* vfs statistics */
@@ -184,17 +182,57 @@ static int coda_cache_inv_stats_get_info( char * buffer, char ** start,
 }
 
 static ctl_table coda_table[] = {
- 	{CODA_TIMEOUT, "timeout", &coda_timeout, sizeof(int), 0644, NULL, &proc_dointvec},
- 	{CODA_HARD, "hard", &coda_hard, sizeof(int), 0644, NULL, &proc_dointvec},
- 	{CODA_VFS, "vfs_stats", NULL, 0, 0644, NULL, &do_reset_coda_vfs_stats},
- 	{CODA_CACHE_INV, "cache_inv_stats", NULL, 0, 0644, NULL, &do_reset_coda_cache_inv_stats},
- 	{CODA_FAKE_STATFS, "fake_statfs", &coda_fake_statfs, sizeof(int), 0600, NULL, &proc_dointvec},
-	{ 0 }
+	{
+		.ctl_name	= CTL_UNNUMBERED,
+		.procname	= "timeout",
+		.data		= &coda_timeout,
+		.maxlen		= sizeof(int),
+		.mode		= 0644,
+		.proc_handler	= &proc_dointvec
+	},
+	{
+		.ctl_name	= CTL_UNNUMBERED,
+		.procname	= "hard",
+		.data		= &coda_hard,
+		.maxlen		= sizeof(int),
+		.mode		= 0644,
+		.proc_handler	= &proc_dointvec
+	},
+	{
+		.ctl_name	= CTL_UNNUMBERED,
+		.procname	= "vfs_stats",
+		.data		= NULL,
+		.maxlen		= 0,
+		.mode		= 0644,
+		.proc_handler	= &do_reset_coda_vfs_stats
+	},
+	{
+		.ctl_name	= CTL_UNNUMBERED,
+		.procname	= "cache_inv_stats",
+		.data		= NULL,
+		.maxlen		= 0,
+		.mode		= 0644,
+		.proc_handler	= &do_reset_coda_cache_inv_stats
+	},
+	{
+		.ctl_name	= CTL_UNNUMBERED,
+		.procname	= "fake_statfs",
+		.data		= &coda_fake_statfs,
+		.maxlen		= sizeof(int),
+		.mode		= 0600,
+		.proc_handler	= &proc_dointvec
+	},
+	{}
 };
 
 static ctl_table fs_table[] = {
-       {FS_CODA, "coda",    NULL, 0, 0555, coda_table},
-       {0}
+	{
+		.ctl_name	= CTL_UNNUMBERED,
+		.procname	= "coda",
+		.mode		= 0555,
+		.child		= coda_table
+	},
+	{}
 };
 
 
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 16:59:54 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 16:59:58 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:55170 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S28580820AbXAPQmQ (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:42:16 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGf3PU001025;
	Tue, 16 Jan 2007 09:41:03 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGf3mK001024;
	Tue, 16 Jan 2007 09:41:03 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 38/59] sysctl: x86_64 Remove unnecessary use of insert_at_head
Date:	Tue, 16 Jan 2007 09:39:43 -0700
Message-Id: <1168965663675-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13654
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

The only sysctl x86_64 provides are not provided elsewhere,
so insert_at_head is unnecessary.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 arch/x86_64/ia32/ia32_binfmt.c |    2 +-
 arch/x86_64/mm/init.c          |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86_64/ia32/ia32_binfmt.c b/arch/x86_64/ia32/ia32_binfmt.c
index 543ef4f..75677ad 100644
--- a/arch/x86_64/ia32/ia32_binfmt.c
+++ b/arch/x86_64/ia32/ia32_binfmt.c
@@ -408,7 +408,7 @@ static ctl_table abi_root_table2[] = {
 
 static __init int ia32_binfmt_init(void)
 { 
-	register_sysctl_table(abi_root_table2, 1);
+	register_sysctl_table(abi_root_table2, 0);
 	return 0;
 }
 __initcall(ia32_binfmt_init);
diff --git a/arch/x86_64/mm/init.c b/arch/x86_64/mm/init.c
index 2968b90..65aa66c 100644
--- a/arch/x86_64/mm/init.c
+++ b/arch/x86_64/mm/init.c
@@ -724,7 +724,7 @@ static ctl_table debug_root_table2[] = {
 
 static __init int x8664_sysctl_init(void)
 { 
-	register_sysctl_table(debug_root_table2, 1);
+	register_sysctl_table(debug_root_table2, 0);
 	return 0;
 }
 __initcall(x8664_sysctl_init);
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 17:00:21 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 17:00:26 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:57474 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S28580822AbXAPQmS (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:42:18 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGf7QC001033;
	Tue, 16 Jan 2007 09:41:07 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGf6LG001032;
	Tue, 16 Jan 2007 09:41:06 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 40/59] sysctl: C99 convert ctl_tables in arch/x86_64/kernel/vsyscall.c
Date:	Tue, 16 Jan 2007 09:39:45 -0700
Message-Id: <11689656651135-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13655
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

Basically everything was done but I removed all element
initializers from the trailing entries to make it clear
the entire last entry should be zero filled.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 arch/x86_64/kernel/vsyscall.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86_64/kernel/vsyscall.c b/arch/x86_64/kernel/vsyscall.c
index 2433d6f..c0e2b48 100644
--- a/arch/x86_64/kernel/vsyscall.c
+++ b/arch/x86_64/kernel/vsyscall.c
@@ -235,13 +235,13 @@ static ctl_table kernel_table2[] = {
 	  .data = &sysctl_vsyscall, .maxlen = sizeof(int), .mode = 0644,
 	  .strategy = vsyscall_sysctl_nostrat,
 	  .proc_handler = vsyscall_sysctl_change },
-	{ 0, }
+	{}
 };
 
 static ctl_table kernel_root_table2[] = {
 	{ .ctl_name = CTL_KERN, .procname = "kernel", .mode = 0555,
 	  .child = kernel_table2 },
-	{ 0 },
+	{}
 };
 
 #endif
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 17:00:49 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 17:00:54 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:58242 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S28580823AbXAPQmS (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:42:18 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGf5Ir001029;
	Tue, 16 Jan 2007 09:41:05 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGf4Wk001028;
	Tue, 16 Jan 2007 09:41:04 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 39/59] sysctl: C99 convert ctl_tables in arch/x86_64/ia32/ia32_binfmt.c
Date:	Tue, 16 Jan 2007 09:39:44 -0700
Message-Id: <1168965664873-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13656
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 arch/x86_64/ia32/ia32_binfmt.c |   30 ++++++++++++++++++++----------
 1 files changed, 20 insertions(+), 10 deletions(-)

diff --git a/arch/x86_64/ia32/ia32_binfmt.c b/arch/x86_64/ia32/ia32_binfmt.c
index 75677ad..644b203 100644
--- a/arch/x86_64/ia32/ia32_binfmt.c
+++ b/arch/x86_64/ia32/ia32_binfmt.c
@@ -395,16 +395,26 @@ EXPORT_SYMBOL(ia32_setup_arg_pages);
 #include <linux/sysctl.h>
 
 static ctl_table abi_table2[] = {
-	{ 99, "vsyscall32", &sysctl_vsyscall32, sizeof(int), 0644, NULL,
-	  proc_dointvec },
-	{ 0, }
-}; 
-
-static ctl_table abi_root_table2[] = { 
-	{ .ctl_name = CTL_ABI, .procname = "abi", .mode = 0555, 
-	  .child = abi_table2 }, 
-	{ 0 }, 
-}; 
+	{
+		.ctl_name	= 99,
+		.procname	= "vsyscall32",
+		.data		= &sysctl_vsyscall32,
+		.maxlen		= sizeof(int),
+		.mode		= 0644,
+		.proc_handler	= proc_dointvec
+	},
+	{}
+};
+
+static ctl_table abi_root_table2[] = {
+	{
+		.ctl_name = CTL_ABI,
+		.procname = "abi",
+		.mode = 0555,
+		.child = abi_table2
+	},
+	{}
+};
 
 static __init int ia32_binfmt_init(void)
 { 
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 17:01:17 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 17:01:20 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:63106 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S20046795AbXAPQmW (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:42:22 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGfPDe001069;
	Tue, 16 Jan 2007 09:41:25 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGfODb001068;
	Tue, 16 Jan 2007 09:41:24 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 49/59] sysctl: Move init_irq_proc into init/main where it belongs
Date:	Tue, 16 Jan 2007 09:39:54 -0700
Message-Id: <1168965684147-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13657
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 init/main.c     |    3 +++
 kernel/sysctl.c |    3 ---
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/init/main.c b/init/main.c
index 8b4a7d7..8af5c6e 100644
--- a/init/main.c
+++ b/init/main.c
@@ -691,6 +691,9 @@ static void __init do_basic_setup(void)
 #ifdef CONFIG_SYSCTL
 	sysctl_init();
 #endif
+#ifdef CONFIG_PROC_FS
+	init_irq_proc();
+#endif
 
 	do_initcalls();
 }
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 600b333..7420761 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -1172,8 +1172,6 @@ static ctl_table dev_table[] = {
 	{ .ctl_name = 0 }
 };
 
-extern void init_irq_proc (void);
-
 static DEFINE_SPINLOCK(sysctl_lock);
 
 /* called under sysctl_lock */
@@ -1219,7 +1217,6 @@ void __init sysctl_init(void)
 {
 #ifdef CONFIG_PROC_SYSCTL
 	register_proc_table(root_table, proc_sys_root, &root_table_header);
-	init_irq_proc();
 #endif
 }
 
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 17:01:44 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 17:01:49 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:65410 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S28580824AbXAPQmY (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:42:24 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGfAuI001045;
	Tue, 16 Jan 2007 09:41:10 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGf9eM001044;
	Tue, 16 Jan 2007 09:41:09 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 43/59] sysctl: Remove sys_sysctl support from drivers/char/rtc.c
Date:	Tue, 16 Jan 2007 09:39:48 -0700
Message-Id: <1168965669760-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13658
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

The real time clock driver was using the binary number reserved
for cdroms in the sysctl binary number interface, which is a no-no.
So since the sysctl binary interface is wrong remove it.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 drivers/char/rtc.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/char/rtc.c b/drivers/char/rtc.c
index 664f36c..df11289 100644
--- a/drivers/char/rtc.c
+++ b/drivers/char/rtc.c
@@ -282,7 +282,7 @@ irqreturn_t rtc_interrupt(int irq, void *dev_id)
  */
 static ctl_table rtc_table[] = {
 	{
-		.ctl_name	= 1,
+		.ctl_name	= CTL_UNNUMBERED,
 		.procname	= "max-user-freq",
 		.data		= &rtc_max_user_freq,
 		.maxlen		= sizeof(int),
@@ -294,9 +294,8 @@ static ctl_table rtc_table[] = {
 
 static ctl_table rtc_root[] = {
 	{
-		.ctl_name	= 1,
+		.ctl_name	= CTL_UNNUMBERED,
 		.procname	= "rtc",
-		.maxlen		= 0,
 		.mode		= 0555,
 		.child		= rtc_table,
 	},
@@ -307,7 +306,6 @@ static ctl_table dev_root[] = {
 	{
 		.ctl_name	= CTL_DEV,
 		.procname	= "dev",
-		.maxlen		= 0,
 		.mode		= 0555,
 		.child		= rtc_root,
 	},
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 17:02:12 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 17:02:15 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:3715 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S28580826AbXAPQm2 (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:42:28 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGfNWG001065;
	Tue, 16 Jan 2007 09:41:23 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGfMXm001064;
	Tue, 16 Jan 2007 09:41:22 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 48/59] sysctl: Register the ocfs2 sysctl numbers
Date:	Tue, 16 Jan 2007 09:39:53 -0700
Message-Id: <11689656823041-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13659
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

ocfs2 was did not have the binary number it uses under CTL_FS
registered in sysctl.h.  Register it to avoid future conflicts,
and change the name of the definition to be in line with the
rest of the sysctl numbers.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 fs/ocfs2/cluster/nodemanager.c |    4 ++--
 fs/ocfs2/cluster/nodemanager.h |    3 +--
 include/linux/sysctl.h         |    1 +
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/fs/ocfs2/cluster/nodemanager.c b/fs/ocfs2/cluster/nodemanager.c
index b17333a..df763c7 100644
--- a/fs/ocfs2/cluster/nodemanager.c
+++ b/fs/ocfs2/cluster/nodemanager.c
@@ -55,7 +55,7 @@ static ctl_table ocfs2_nm_table[] = {
 
 static ctl_table ocfs2_mod_table[] = {
 	{
-		.ctl_name	= KERN_OCFS2_NM,
+		.ctl_name	= FS_OCFS2_NM,
 		.procname	= "nm",
 		.data		= NULL,
 		.maxlen		= 0,
@@ -67,7 +67,7 @@ static ctl_table ocfs2_mod_table[] = {
 
 static ctl_table ocfs2_kern_table[] = {
 	{
-		.ctl_name	= KERN_OCFS2,
+		.ctl_name	= FS_OCFS2,
 		.procname	= "ocfs2",
 		.data		= NULL,
 		.maxlen		= 0,
diff --git a/fs/ocfs2/cluster/nodemanager.h b/fs/ocfs2/cluster/nodemanager.h
index 8fb23ca..0705221 100644
--- a/fs/ocfs2/cluster/nodemanager.h
+++ b/fs/ocfs2/cluster/nodemanager.h
@@ -33,8 +33,7 @@
 #include <linux/configfs.h>
 #include <linux/rbtree.h>
 
-#define KERN_OCFS2		988
-#define KERN_OCFS2_NM		1
+#define FS_OCFS2_NM		1
 
 const char *o2nm_get_hb_ctl_path(void);
 
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index f4ba72e..63e1bac 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -813,6 +813,7 @@ enum
 	FS_AIO_NR=18,	/* current system-wide number of aio requests */
 	FS_AIO_MAX_NR=19,	/* system-wide maximum number of aio requests */
 	FS_INOTIFY=20,	/* inotify submenu */
+	FS_OCFS2=988,	/* ocfs2 */
 };
 
 /* /proc/sys/fs/quota/ */
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 17:02:39 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 17:02:44 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:4739 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S28580827AbXAPQma (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:42:30 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGfQ0E001073;
	Tue, 16 Jan 2007 09:41:26 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGfPqv001072;
	Tue, 16 Jan 2007 09:41:25 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 50/59] sysctl: Move utsname sysctls to their own file
Date:	Tue, 16 Jan 2007 09:39:55 -0700
Message-Id: <11689656853154-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13660
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

This is just a simple cleanup to keep kernel/sysctl.c
from getting to crowded with special cases, and by
keeping all of the utsname logic to together it makes
the code a little more readable.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 kernel/Makefile         |    1 +
 kernel/sysctl.c         |  115 -------------------------------------
 kernel/utsname_sysctl.c |  146 +++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 147 insertions(+), 115 deletions(-)

diff --git a/kernel/Makefile b/kernel/Makefile
index 14f4d45..d286c44 100644
--- a/kernel/Makefile
+++ b/kernel/Makefile
@@ -48,6 +48,7 @@ obj-$(CONFIG_SECCOMP) += seccomp.o
 obj-$(CONFIG_RCU_TORTURE_TEST) += rcutorture.o
 obj-$(CONFIG_RELAY) += relay.o
 obj-$(CONFIG_UTS_NS) += utsname.o
+obj-$(CONFIG_SYSCTL) += utsname_sysctl.o
 obj-$(CONFIG_TASK_DELAY_ACCT) += delayacct.o
 obj-$(CONFIG_TASKSTATS) += taskstats.o tsacct.o
 
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 7420761..a8c0a03 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -135,13 +135,6 @@ static int parse_table(int __user *, int, void __user *, size_t __user *,
 		void __user *, size_t, ctl_table *);
 #endif
 
-static int proc_do_uts_string(ctl_table *table, int write, struct file *filp,
-		  void __user *buffer, size_t *lenp, loff_t *ppos);
-
-static int sysctl_uts_string(ctl_table *table, int __user *name, int nlen,
-		  void __user *oldval, size_t __user *oldlenp,
-		  void __user *newval, size_t newlen);
-
 #ifdef CONFIG_SYSVIPC
 static int sysctl_ipc_data(ctl_table *table, int __user *name, int nlen,
 		  void __user *oldval, size_t __user *oldlenp,
@@ -174,27 +167,6 @@ extern ctl_table inotify_table[];
 int sysctl_legacy_va_layout;
 #endif
 
-static void *get_uts(ctl_table *table, int write)
-{
-	char *which = table->data;
-#ifdef CONFIG_UTS_NS
-	struct uts_namespace *uts_ns = current->nsproxy->uts_ns;
-	which = (which - (char *)&init_uts_ns) + (char *)uts_ns;
-#endif
-	if (!write)
-		down_read(&uts_sem);
-	else
-		down_write(&uts_sem);
-	return which;
-}
-
-static void put_uts(ctl_table *table, int write, void *which)
-{
-	if (!write)
-		up_read(&uts_sem);
-	else
-		up_write(&uts_sem);
-}
 
 #ifdef CONFIG_SYSVIPC
 static void *get_ipc(ctl_table *table, int write)
@@ -275,51 +247,6 @@ static ctl_table root_table[] = {
 
 static ctl_table kern_table[] = {
 	{
-		.ctl_name	= KERN_OSTYPE,
-		.procname	= "ostype",
-		.data		= init_uts_ns.name.sysname,
-		.maxlen		= sizeof(init_uts_ns.name.sysname),
-		.mode		= 0444,
-		.proc_handler	= &proc_do_uts_string,
-		.strategy	= &sysctl_uts_string,
-	},
-	{
-		.ctl_name	= KERN_OSRELEASE,
-		.procname	= "osrelease",
-		.data		= init_uts_ns.name.release,
-		.maxlen		= sizeof(init_uts_ns.name.release),
-		.mode		= 0444,
-		.proc_handler	= &proc_do_uts_string,
-		.strategy	= &sysctl_uts_string,
-	},
-	{
-		.ctl_name	= KERN_VERSION,
-		.procname	= "version",
-		.data		= init_uts_ns.name.version,
-		.maxlen		= sizeof(init_uts_ns.name.version),
-		.mode		= 0444,
-		.proc_handler	= &proc_do_uts_string,
-		.strategy	= &sysctl_uts_string,
-	},
-	{
-		.ctl_name	= KERN_NODENAME,
-		.procname	= "hostname",
-		.data		= init_uts_ns.name.nodename,
-		.maxlen		= sizeof(init_uts_ns.name.nodename),
-		.mode		= 0644,
-		.proc_handler	= &proc_do_uts_string,
-		.strategy	= &sysctl_uts_string,
-	},
-	{
-		.ctl_name	= KERN_DOMAINNAME,
-		.procname	= "domainname",
-		.data		= init_uts_ns.name.domainname,
-		.maxlen		= sizeof(init_uts_ns.name.domainname),
-		.mode		= 0644,
-		.proc_handler	= &proc_do_uts_string,
-		.strategy	= &sysctl_uts_string,
-	},
-	{
 		.ctl_name	= KERN_PANIC,
 		.procname	= "panic",
 		.data		= &panic_timeout,
@@ -1746,21 +1673,6 @@ int proc_dostring(ctl_table *table, int write, struct file *filp,
 			       buffer, lenp, ppos);
 }
 
-/*
- *	Special case of dostring for the UTS structure. This has locks
- *	to observe. Should this be in kernel/sys.c ????
- */
-
-static int proc_do_uts_string(ctl_table *table, int write, struct file *filp,
-		  void __user *buffer, size_t *lenp, loff_t *ppos)
-{
-	int r;
-	void *which;
-	which = get_uts(table, write);
-	r = _proc_do_string(which, table->maxlen,write,filp,buffer,lenp, ppos);
-	put_uts(table, write, which);
-	return r;
-}
 
 static int do_proc_dointvec_conv(int *negp, unsigned long *lvalp,
 				 int *valp,
@@ -2379,12 +2291,6 @@ int proc_dostring(ctl_table *table, int write, struct file *filp,
 	return -ENOSYS;
 }
 
-static int proc_do_uts_string(ctl_table *table, int write, struct file *filp,
-		void __user *buffer, size_t *lenp, loff_t *ppos)
-{
-	return -ENOSYS;
-}
-
 #ifdef CONFIG_SYSVIPC
 static int proc_do_ipc_string(ctl_table *table, int write, struct file *filp,
 		void __user *buffer, size_t *lenp, loff_t *ppos)
@@ -2602,21 +2508,6 @@ int sysctl_ms_jiffies(ctl_table *table, int __user *name, int nlen,
 }
 
 
-/* The generic string strategy routine: */
-static int sysctl_uts_string(ctl_table *table, int __user *name, int nlen,
-		  void __user *oldval, size_t __user *oldlenp,
-		  void __user *newval, size_t newlen)
-{
-	struct ctl_table uts_table;
-	int r, write;
-	write = newval && newlen;
-	memcpy(&uts_table, table, sizeof(uts_table));
-	uts_table.data = get_uts(table, write);
-	r = sysctl_string(&uts_table, name, nlen,
-		oldval, oldlenp, newval, newlen);
-	put_uts(table, write, uts_table.data);
-	return r;
-}
 
 #ifdef CONFIG_SYSVIPC
 /* The generic sysctl ipc data routine. */
@@ -2723,12 +2614,6 @@ int sysctl_ms_jiffies(ctl_table *table, int __user *name, int nlen,
 	return -ENOSYS;
 }
 
-static int sysctl_uts_string(ctl_table *table, int __user *name, int nlen,
-		  void __user *oldval, size_t __user *oldlenp,
-		  void __user *newval, size_t newlen)
-{
-	return -ENOSYS;
-}
 static int sysctl_ipc_data(ctl_table *table, int __user *name, int nlen,
 		void __user *oldval, size_t __user *oldlenp,
 		void __user *newval, size_t newlen)
diff --git a/kernel/utsname_sysctl.c b/kernel/utsname_sysctl.c
new file mode 100644
index 0000000..324aa13
--- /dev/null
+++ b/kernel/utsname_sysctl.c
@@ -0,0 +1,146 @@
+/*
+ *  Copyright (C) 2007
+ *
+ *  Author: Eric Biederman <ebiederm@xmision.com>
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU General Public License as
+ *  published by the Free Software Foundation, version 2 of the
+ *  License.
+ */
+
+#include <linux/module.h>
+#include <linux/uts.h>
+#include <linux/utsname.h>
+#include <linux/version.h>
+#include <linux/sysctl.h>
+
+static void *get_uts(ctl_table *table, int write)
+{
+	char *which = table->data;
+#ifdef CONFIG_UTS_NS
+	struct uts_namespace *uts_ns = current->nsproxy->uts_ns;
+	which = (which - (char *)&init_uts_ns) + (char *)uts_ns;
+#endif
+	if (!write)
+		down_read(&uts_sem);
+	else
+		down_write(&uts_sem);
+	return which;
+}
+
+static void put_uts(ctl_table *table, int write, void *which)
+{
+	if (!write)
+		up_read(&uts_sem);
+	else
+		up_write(&uts_sem);
+}
+
+#ifdef CONFIG_PROC_FS
+/*
+ *	Special case of dostring for the UTS structure. This has locks
+ *	to observe. Should this be in kernel/sys.c ????
+ */
+static int proc_do_uts_string(ctl_table *table, int write, struct file *filp,
+		  void __user *buffer, size_t *lenp, loff_t *ppos)
+{
+	struct ctl_table uts_table;
+	int r;
+	memcpy(&uts_table, table, sizeof(uts_table));
+	uts_table.data = get_uts(table, write);
+	r = proc_dostring(&uts_table,write,filp,buffer,lenp, ppos);
+	put_uts(table, write, uts_table.data);
+	return r;
+}
+#else
+#define proc_do_uts_string NULL
+#endif
+
+
+#ifdef CONFIG_SYSCTL_SYSCALL
+/* The generic string strategy routine: */
+static int sysctl_uts_string(ctl_table *table, int __user *name, int nlen,
+		  void __user *oldval, size_t __user *oldlenp,
+		  void __user *newval, size_t newlen)
+{
+	struct ctl_table uts_table;
+	int r, write;
+	write = newval && newlen;
+	memcpy(&uts_table, table, sizeof(uts_table));
+	uts_table.data = get_uts(table, write);
+	r = sysctl_string(&uts_table, name, nlen,
+		oldval, oldlenp, newval, newlen);
+	put_uts(table, write, uts_table.data);
+	return r;
+}
+#else
+#define sysctl_uts_string NULL
+#endif
+
+static struct ctl_table uts_kern_table[] = {
+	{
+		.ctl_name	= KERN_OSTYPE,
+		.procname	= "ostype",
+		.data		= init_uts_ns.name.sysname,
+		.maxlen		= sizeof(init_uts_ns.name.sysname),
+		.mode		= 0444,
+		.proc_handler	= proc_do_uts_string,
+		.strategy	= sysctl_uts_string,
+	},
+	{
+		.ctl_name	= KERN_OSRELEASE,
+		.procname	= "osrelease",
+		.data		= init_uts_ns.name.release,
+		.maxlen		= sizeof(init_uts_ns.name.release),
+		.mode		= 0444,
+		.proc_handler	= proc_do_uts_string,
+		.strategy	= sysctl_uts_string,
+	},
+	{
+		.ctl_name	= KERN_VERSION,
+		.procname	= "version",
+		.data		= init_uts_ns.name.version,
+		.maxlen		= sizeof(init_uts_ns.name.version),
+		.mode		= 0444,
+		.proc_handler	= proc_do_uts_string,
+		.strategy	= sysctl_uts_string,
+	},
+	{
+		.ctl_name	= KERN_NODENAME,
+		.procname	= "hostname",
+		.data		= init_uts_ns.name.nodename,
+		.maxlen		= sizeof(init_uts_ns.name.nodename),
+		.mode		= 0644,
+		.proc_handler	= proc_do_uts_string,
+		.strategy	= sysctl_uts_string,
+	},
+	{
+		.ctl_name	= KERN_DOMAINNAME,
+		.procname	= "domainname",
+		.data		= init_uts_ns.name.domainname,
+		.maxlen		= sizeof(init_uts_ns.name.domainname),
+		.mode		= 0644,
+		.proc_handler	= proc_do_uts_string,
+		.strategy	= sysctl_uts_string,
+	},
+	{}
+};
+
+static struct ctl_table uts_root_table[] = {
+	{
+		.ctl_name	= CTL_KERN,
+		.procname	= "kernel",
+		.mode		= 0555,
+		.child		= uts_kern_table,
+	},
+	{}
+};
+
+static int __init utsname_sysctl_init(void)
+{
+	register_sysctl_table(uts_root_table, 0);
+	return 0;
+}
+
+__initcall(utsname_sysctl_init);
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 17:03:07 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 17:03:11 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:6787 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S28580828AbXAPQme (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:42:34 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGffAX001097;
	Tue, 16 Jan 2007 09:41:41 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGfeow001096;
	Tue, 16 Jan 2007 09:41:40 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 55/59] sysctl: Remove insert_at_head from register_sysctl
Date:	Tue, 16 Jan 2007 09:40:00 -0700
Message-Id: <11689657002123-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13661
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

The semantic effect of insert_at_head is that it would allow
new registered sysctl entries to override existing sysctl entries
of the same name.  Which is pain for caching and the proc interface
never implemented.

I have done an audit and discovered that none of the current
users of register_sysctl care as (excpet for directories) they
do not register duplicate sysctl entries.

So this patch simply removes the support for overriding
existing entries in the sys_sysctl interface since no one
uses it or cares and it makes future enhancments harder.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 arch/arm/kernel/isa.c                        |    2 +-
 arch/frv/kernel/pm.c                         |    2 +-
 arch/frv/kernel/sysctl.c                     |    2 +-
 arch/ia64/kernel/crash.c                     |    2 +-
 arch/ia64/kernel/perfmon.c                   |    2 +-
 arch/ia64/sn/kernel/xpc_main.c               |    2 +-
 arch/mips/au1000/common/power.c              |    2 +-
 arch/mips/lasat/sysctl.c                     |    2 +-
 arch/powerpc/kernel/idle.c                   |    2 +-
 arch/ppc/kernel/ppc_htab.c                   |    2 +-
 arch/s390/appldata/appldata_base.c           |    4 ++--
 arch/s390/kernel/debug.c                     |    2 +-
 arch/s390/mm/cmm.c                           |    2 +-
 arch/sh64/kernel/traps.c                     |    2 +-
 arch/x86_64/ia32/ia32_binfmt.c               |    2 +-
 arch/x86_64/kernel/vsyscall.c                |    2 +-
 arch/x86_64/mm/init.c                        |    2 +-
 drivers/cdrom/cdrom.c                        |    2 +-
 drivers/char/hpet.c                          |    2 +-
 drivers/char/ipmi/ipmi_poweroff.c            |    2 +-
 drivers/char/rtc.c                           |    2 +-
 drivers/macintosh/mac_hid.c                  |    2 +-
 drivers/md/md.c                              |    2 +-
 drivers/net/wireless/arlan-proc.c            |    2 +-
 drivers/parport/procfs.c                     |    6 +++---
 drivers/scsi/scsi_sysctl.c                   |    2 +-
 fs/coda/sysctl.c                             |    2 +-
 fs/dquot.c                                   |    2 +-
 fs/lockd/svc.c                               |    2 +-
 fs/nfs/sysctl.c                              |    2 +-
 fs/ntfs/sysctl.c                             |    2 +-
 fs/ocfs2/cluster/nodemanager.c               |    2 +-
 fs/xfs/linux-2.6/xfs_sysctl.c                |    2 +-
 include/linux/sysctl.h                       |    4 ++--
 ipc/ipc_sysctl.c                             |    2 +-
 ipc/mqueue.c                                 |    2 +-
 kernel/sysctl.c                              |    9 ++-------
 kernel/utsname_sysctl.c                      |    2 +-
 net/appletalk/sysctl_net_atalk.c             |    2 +-
 net/ax25/sysctl_net_ax25.c                   |    2 +-
 net/bridge/br_netfilter.c                    |    2 +-
 net/core/neighbour.c                         |    2 +-
 net/dccp/sysctl.c                            |    2 +-
 net/decnet/dn_dev.c                          |    2 +-
 net/decnet/sysctl_net_decnet.c               |    2 +-
 net/ipv4/devinet.c                           |    4 ++--
 net/ipv4/ipvs/ip_vs_ctl.c                    |    2 +-
 net/ipv4/ipvs/ip_vs_lblc.c                   |    2 +-
 net/ipv4/ipvs/ip_vs_lblcr.c                  |    2 +-
 net/ipv4/netfilter/ip_conntrack_proto_sctp.c |    2 +-
 net/ipv4/netfilter/ip_conntrack_standalone.c |    2 +-
 net/ipv4/netfilter/ip_queue.c                |    2 +-
 net/ipv6/addrconf.c                          |    4 ++--
 net/ipv6/netfilter/ip6_queue.c               |    2 +-
 net/ipv6/sysctl_net_ipv6.c                   |    2 +-
 net/ipx/sysctl_net_ipx.c                     |    2 +-
 net/irda/irsysctl.c                          |    2 +-
 net/llc/sysctl_net_llc.c                     |    2 +-
 net/netfilter/nf_conntrack_standalone.c      |    2 +-
 net/netfilter/nf_sysctl.c                    |    2 +-
 net/netrom/sysctl_net_netrom.c               |    2 +-
 net/rose/sysctl_net_rose.c                   |    2 +-
 net/rxrpc/sysctl.c                           |    2 +-
 net/sctp/sysctl.c                            |    2 +-
 net/sunrpc/sysctl.c                          |    2 +-
 net/sunrpc/xprtsock.c                        |    2 +-
 net/unix/sysctl_net_unix.c                   |    2 +-
 net/x25/sysctl_net_x25.c                     |    2 +-
 68 files changed, 75 insertions(+), 80 deletions(-)

diff --git a/arch/arm/kernel/isa.c b/arch/arm/kernel/isa.c
index 54bbd9f..50a30bc 100644
--- a/arch/arm/kernel/isa.c
+++ b/arch/arm/kernel/isa.c
@@ -70,5 +70,5 @@ register_isa_ports(unsigned int membase, unsigned int portbase, unsigned int por
 	isa_membase = membase;
 	isa_portbase = portbase;
 	isa_portshift = portshift;
-	isa_sysctl_header = register_sysctl_table(ctl_bus, 0);
+	isa_sysctl_header = register_sysctl_table(ctl_bus);
 }
diff --git a/arch/frv/kernel/pm.c b/arch/frv/kernel/pm.c
index aa50333..c57ce3f 100644
--- a/arch/frv/kernel/pm.c
+++ b/arch/frv/kernel/pm.c
@@ -455,7 +455,7 @@ static struct ctl_table pm_dir_table[] =
  */
 static int __init pm_init(void)
 {
-	register_sysctl_table(pm_dir_table, 0);
+	register_sysctl_table(pm_dir_table);
 	return 0;
 }
 
diff --git a/arch/frv/kernel/sysctl.c b/arch/frv/kernel/sysctl.c
index 577ad16..3e9d7e0 100644
--- a/arch/frv/kernel/sysctl.c
+++ b/arch/frv/kernel/sysctl.c
@@ -216,7 +216,7 @@ static struct ctl_table frv_dir_table[] =
  */
 static int __init frv_sysctl_init(void)
 {
-	register_sysctl_table(frv_dir_table, 0);
+	register_sysctl_table(frv_dir_table);
 	return 0;
 }
 
diff --git a/arch/ia64/kernel/crash.c b/arch/ia64/kernel/crash.c
index bc2f64d..8a2cb76 100644
--- a/arch/ia64/kernel/crash.c
+++ b/arch/ia64/kernel/crash.c
@@ -214,7 +214,7 @@ machine_crash_setup(void)
 	if((ret = register_die_notifier(&kdump_init_notifier_nb)) != 0)
 		return ret;
 #ifdef CONFIG_SYSCTL
-	register_sysctl_table(sys_table, 0);
+	register_sysctl_table(sys_table);
 #endif
 	return 0;
 }
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c
index 8c679ab..8a15377 100644
--- a/arch/ia64/kernel/perfmon.c
+++ b/arch/ia64/kernel/perfmon.c
@@ -6727,7 +6727,7 @@ pfm_init(void)
 	/*
 	 * create /proc/sys/kernel/perfmon (for debugging purposes)
 	 */
-	pfm_sysctl_header = register_sysctl_table(pfm_sysctl_root, 0);
+	pfm_sysctl_header = register_sysctl_table(pfm_sysctl_root);
 
 	/*
 	 * initialize all our spinlocks
diff --git a/arch/ia64/sn/kernel/xpc_main.c b/arch/ia64/sn/kernel/xpc_main.c
index e04f7b5..68355ef 100644
--- a/arch/ia64/sn/kernel/xpc_main.c
+++ b/arch/ia64/sn/kernel/xpc_main.c
@@ -1241,7 +1241,7 @@ xpc_init(void)
 	snprintf(xpc_part->bus_id, BUS_ID_SIZE, "part");
 	snprintf(xpc_chan->bus_id, BUS_ID_SIZE, "chan");
 
-	xpc_sysctl = register_sysctl_table(xpc_sys_dir, 0);
+	xpc_sysctl = register_sysctl_table(xpc_sys_dir);
 
 	/*
 	 * The first few fields of each entry of xpc_partitions[] need to
diff --git a/arch/mips/au1000/common/power.c b/arch/mips/au1000/common/power.c
index 31256b8..3901e8e 100644
--- a/arch/mips/au1000/common/power.c
+++ b/arch/mips/au1000/common/power.c
@@ -461,7 +461,7 @@ static struct ctl_table pm_dir_table[] = {
  */
 static int __init pm_init(void)
 {
-	register_sysctl_table(pm_dir_table, 0);
+	register_sysctl_table(pm_dir_table);
 	return 0;
 }
 
diff --git a/arch/mips/lasat/sysctl.c b/arch/mips/lasat/sysctl.c
index c04e82f..699ab18 100644
--- a/arch/mips/lasat/sysctl.c
+++ b/arch/mips/lasat/sysctl.c
@@ -432,7 +432,7 @@ static int __init lasat_register_sysctl(void)
 	struct ctl_table_header *lasat_table_header;
 
 	lasat_table_header =
-		register_sysctl_table(lasat_root_table, 0);
+		register_sysctl_table(lasat_root_table);
 
 	return 0;
 }
diff --git a/arch/powerpc/kernel/idle.c b/arch/powerpc/kernel/idle.c
index 8b27bb1..6e7f509 100644
--- a/arch/powerpc/kernel/idle.c
+++ b/arch/powerpc/kernel/idle.c
@@ -125,7 +125,7 @@ static ctl_table powersave_nap_sysctl_root[] = {
 static int __init
 register_powersave_nap_sysctl(void)
 {
-	register_sysctl_table(powersave_nap_sysctl_root, 0);
+	register_sysctl_table(powersave_nap_sysctl_root);
 
 	return 0;
 }
diff --git a/arch/ppc/kernel/ppc_htab.c b/arch/ppc/kernel/ppc_htab.c
index 77b20ff..0a7e42d 100644
--- a/arch/ppc/kernel/ppc_htab.c
+++ b/arch/ppc/kernel/ppc_htab.c
@@ -457,7 +457,7 @@ static ctl_table htab_sysctl_root[] = {
 static int __init
 register_ppc_htab_sysctl(void)
 {
-	register_sysctl_table(htab_sysctl_root, 0);
+	register_sysctl_table(htab_sysctl_root);
 
 	return 0;
 }
diff --git a/arch/s390/appldata/appldata_base.c b/arch/s390/appldata/appldata_base.c
index cdc4109..b1ff93a 100644
--- a/arch/s390/appldata/appldata_base.c
+++ b/arch/s390/appldata/appldata_base.c
@@ -506,7 +506,7 @@ int appldata_register_ops(struct appldata_ops *ops)
 
 	ops->ctl_table[3].ctl_name = 0;
 
-	ops->sysctl_header = register_sysctl_table(ops->ctl_table,0);
+	ops->sysctl_header = register_sysctl_table(ops->ctl_table);
 
 	P_INFO("%s-ops registered!\n", ops->name);
 	return 0;
@@ -606,7 +606,7 @@ static int __init appldata_init(void)
 	/* Register cpu hotplug notifier */
 	register_hotcpu_notifier(&appldata_nb);
 
-	appldata_sysctl_header = register_sysctl_table(appldata_dir_table, 0);
+	appldata_sysctl_header = register_sysctl_table(appldata_dir_table);
 #ifdef MODULE
 	appldata_dir_table[0].de->owner = THIS_MODULE;
 	appldata_table[0].de->owner = THIS_MODULE;
diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c
index d38cb27..00f0382 100644
--- a/arch/s390/kernel/debug.c
+++ b/arch/s390/kernel/debug.c
@@ -1053,7 +1053,7 @@ __init debug_init(void)
 {
 	int rc = 0;
 
-	s390dbf_sysctl_header = register_sysctl_table(s390dbf_dir_table, 0);
+	s390dbf_sysctl_header = register_sysctl_table(s390dbf_dir_table);
 	down(&debug_lock);
 	debug_debugfs_root_entry = debugfs_create_dir(DEBUG_DIR_ROOT,NULL);
 	printk(KERN_INFO "debug: Initialization complete\n");
diff --git a/arch/s390/mm/cmm.c b/arch/s390/mm/cmm.c
index 5f83a3f..8a5c71f 100644
--- a/arch/s390/mm/cmm.c
+++ b/arch/s390/mm/cmm.c
@@ -418,7 +418,7 @@ cmm_init (void)
 	int rc = -ENOMEM;
 
 #ifdef CONFIG_CMM_PROC
-	cmm_sysctl_header = register_sysctl_table(cmm_dir_table, 0);
+	cmm_sysctl_header = register_sysctl_table(cmm_dir_table);
 	if (!cmm_sysctl_header)
 		goto out;
 #endif
diff --git a/arch/sh64/kernel/traps.c b/arch/sh64/kernel/traps.c
index 02cca74..c346d7e 100644
--- a/arch/sh64/kernel/traps.c
+++ b/arch/sh64/kernel/traps.c
@@ -960,7 +960,7 @@ static ctl_table sh64_root[] = {
 static struct ctl_table_header *sysctl_header;
 static int __init init_sysctl(void)
 {
-	sysctl_header = register_sysctl_table(sh64_root, 0);
+	sysctl_header = register_sysctl_table(sh64_root);
 	return 0;
 }
 
diff --git a/arch/x86_64/ia32/ia32_binfmt.c b/arch/x86_64/ia32/ia32_binfmt.c
index 644b203..aab2c91 100644
--- a/arch/x86_64/ia32/ia32_binfmt.c
+++ b/arch/x86_64/ia32/ia32_binfmt.c
@@ -418,7 +418,7 @@ static ctl_table abi_root_table2[] = {
 
 static __init int ia32_binfmt_init(void)
 { 
-	register_sysctl_table(abi_root_table2, 0);
+	register_sysctl_table(abi_root_table2);
 	return 0;
 }
 __initcall(ia32_binfmt_init);
diff --git a/arch/x86_64/kernel/vsyscall.c b/arch/x86_64/kernel/vsyscall.c
index c0e2b48..313dc6a 100644
--- a/arch/x86_64/kernel/vsyscall.c
+++ b/arch/x86_64/kernel/vsyscall.c
@@ -301,7 +301,7 @@ static int __init vsyscall_init(void)
 	BUG_ON((unsigned long) &vgetcpu != VSYSCALL_ADDR(__NR_vgetcpu));
 	map_vsyscall();
 #ifdef CONFIG_SYSCTL
-	register_sysctl_table(kernel_root_table2, 0);
+	register_sysctl_table(kernel_root_table2);
 #endif
 	on_each_cpu(cpu_vsyscall_init, NULL, 0, 1);
 	hotcpu_notifier(cpu_vsyscall_notifier, 0);
diff --git a/arch/x86_64/mm/init.c b/arch/x86_64/mm/init.c
index a04535d..079bcaa 100644
--- a/arch/x86_64/mm/init.c
+++ b/arch/x86_64/mm/init.c
@@ -734,7 +734,7 @@ static ctl_table debug_root_table2[] = {
 
 static __init int x8664_sysctl_init(void)
 { 
-	register_sysctl_table(debug_root_table2, 0);
+	register_sysctl_table(debug_root_table2);
 	return 0;
 }
 __initcall(x8664_sysctl_init);
diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
index 14f72c4..b36f44d 100644
--- a/drivers/cdrom/cdrom.c
+++ b/drivers/cdrom/cdrom.c
@@ -3553,7 +3553,7 @@ static void cdrom_sysctl_register(void)
 	if (initialized == 1)
 		return;
 
-	cdrom_sysctl_header = register_sysctl_table(cdrom_root_table, 0);
+	cdrom_sysctl_header = register_sysctl_table(cdrom_root_table);
 
 	/* set the defaults */
 	cdrom_sysctl_settings.autoclose = autoclose;
diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c
index 81be1db..0be700f 100644
--- a/drivers/char/hpet.c
+++ b/drivers/char/hpet.c
@@ -1018,7 +1018,7 @@ static int __init hpet_init(void)
 	if (result < 0)
 		return -ENODEV;
 
-	sysctl_header = register_sysctl_table(dev_root, 0);
+	sysctl_header = register_sysctl_table(dev_root);
 
 	result = acpi_bus_register_driver(&hpet_acpi_driver);
 	if (result < 0) {
diff --git a/drivers/char/ipmi/ipmi_poweroff.c b/drivers/char/ipmi/ipmi_poweroff.c
index b3ae65e..e02893b 100644
--- a/drivers/char/ipmi/ipmi_poweroff.c
+++ b/drivers/char/ipmi/ipmi_poweroff.c
@@ -686,7 +686,7 @@ static int ipmi_poweroff_init (void)
 		printk(KERN_INFO PFX "Power cycle is enabled.\n");
 
 #ifdef CONFIG_PROC_FS
-	ipmi_table_header = register_sysctl_table(ipmi_root_table, 0);
+	ipmi_table_header = register_sysctl_table(ipmi_root_table);
 	if (!ipmi_table_header) {
 		printk(KERN_ERR PFX "Unable to register powercycle sysctl\n");
 		rv = -ENOMEM;
diff --git a/drivers/char/rtc.c b/drivers/char/rtc.c
index df11289..98a2f5e 100644
--- a/drivers/char/rtc.c
+++ b/drivers/char/rtc.c
@@ -316,7 +316,7 @@ static struct ctl_table_header *sysctl_header;
 
 static int __init init_sysctl(void)
 {
-    sysctl_header = register_sysctl_table(dev_root, 0);
+    sysctl_header = register_sysctl_table(dev_root);
     return 0;
 }
 
diff --git a/drivers/macintosh/mac_hid.c b/drivers/macintosh/mac_hid.c
index c676740..030399f 100644
--- a/drivers/macintosh/mac_hid.c
+++ b/drivers/macintosh/mac_hid.c
@@ -138,7 +138,7 @@ int __init mac_hid_init(void)
 		return err;
 
 #if defined(CONFIG_SYSCTL)
-	mac_hid_sysctl_header = register_sysctl_table(mac_hid_root_dir, 0);
+	mac_hid_sysctl_header = register_sysctl_table(mac_hid_root_dir);
 #endif /* CONFIG_SYSCTL */
 
 	return 0;
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 966e8be..72b378e 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -5551,7 +5551,7 @@ static int __init md_init(void)
 			    md_probe, NULL, NULL);
 
 	register_reboot_notifier(&md_notifier);
-	raid_table_header = register_sysctl_table(raid_root_table, 0);
+	raid_table_header = register_sysctl_table(raid_root_table);
 
 	md_geninit();
 	return (0);
diff --git a/drivers/net/wireless/arlan-proc.c b/drivers/net/wireless/arlan-proc.c
index 20499a6..015abd9 100644
--- a/drivers/net/wireless/arlan-proc.c
+++ b/drivers/net/wireless/arlan-proc.c
@@ -1244,7 +1244,7 @@ int __init init_arlan_proc(void)
 		return 0;
 	for (i = 0; i < MAX_ARLANS && arlan_device[i]; i++)
 		arlan_table[i].ctl_name = i + 1;
-	arlan_device_sysctl_header = register_sysctl_table(arlan_root_table, 0);
+	arlan_device_sysctl_header = register_sysctl_table(arlan_root_table);
 	if (!arlan_device_sysctl_header)
 		return -1;
 
diff --git a/drivers/parport/procfs.c b/drivers/parport/procfs.c
index 5337789..afdd392 100644
--- a/drivers/parport/procfs.c
+++ b/drivers/parport/procfs.c
@@ -518,7 +518,7 @@ int parport_proc_register(struct parport *port)
 	t->parport_dir[0].child = t->port_dir;
 	t->dev_dir[0].child = t->parport_dir;
 
-	t->sysctl_header = register_sysctl_table(t->dev_dir, 0);
+	t->sysctl_header = register_sysctl_table(t->dev_dir);
 	if (t->sysctl_header == NULL) {
 		kfree(t);
 		t = NULL;
@@ -574,7 +574,7 @@ int parport_device_proc_register(struct pardevice *device)
 	t->device_dir[0].child = t->vars;
 	t->vars[0].data = &device->timeslice;
 
-	t->sysctl_header = register_sysctl_table(t->dev_dir, 0);
+	t->sysctl_header = register_sysctl_table(t->dev_dir);
 	if (t->sysctl_header == NULL) {
 		kfree(t);
 		t = NULL;
@@ -597,7 +597,7 @@ int parport_device_proc_unregister(struct pardevice *device)
 static int __init parport_default_proc_register(void)
 {
 	parport_default_sysctl_table.sysctl_header =
-		register_sysctl_table(parport_default_sysctl_table.dev_dir, 0);
+		register_sysctl_table(parport_default_sysctl_table.dev_dir);
 	return 0;
 }
 
diff --git a/drivers/scsi/scsi_sysctl.c b/drivers/scsi/scsi_sysctl.c
index b16b775..6cfaaa2 100644
--- a/drivers/scsi/scsi_sysctl.c
+++ b/drivers/scsi/scsi_sysctl.c
@@ -41,7 +41,7 @@ static struct ctl_table_header *scsi_table_header;
 
 int __init scsi_init_sysctl(void)
 {
-	scsi_table_header = register_sysctl_table(scsi_root_table, 0);
+	scsi_table_header = register_sysctl_table(scsi_root_table);
 	if (!scsi_table_header)
 		return -ENOMEM;
 	return 0;
diff --git a/fs/coda/sysctl.c b/fs/coda/sysctl.c
index df682e2..77d7563 100644
--- a/fs/coda/sysctl.c
+++ b/fs/coda/sysctl.c
@@ -269,7 +269,7 @@ void coda_sysctl_init(void)
 
 #ifdef CONFIG_SYSCTL
 	if ( !fs_table_header )
-		fs_table_header = register_sysctl_table(fs_table, 0);
+		fs_table_header = register_sysctl_table(fs_table);
 #endif 
 }
 
diff --git a/fs/dquot.c b/fs/dquot.c
index 0952cc4..9a25927 100644
--- a/fs/dquot.c
+++ b/fs/dquot.c
@@ -1822,7 +1822,7 @@ static int __init dquot_init(void)
 
 	printk(KERN_NOTICE "VFS: Disk quotas %s\n", __DQUOT_VERSION__);
 
-	register_sysctl_table(sys_table, 0);
+	register_sysctl_table(sys_table);
 
 	dquot_cachep = kmem_cache_create("dquot", 
 			sizeof(struct dquot), sizeof(unsigned long) * 4,
diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c
index 8ca1808..67aa93e 100644
--- a/fs/lockd/svc.c
+++ b/fs/lockd/svc.c
@@ -506,7 +506,7 @@ module_param(nsm_use_hostnames, bool, 0644);
 
 static int __init init_nlm(void)
 {
-	nlm_sysctl_table = register_sysctl_table(nlm_sysctl_root, 0);
+	nlm_sysctl_table = register_sysctl_table(nlm_sysctl_root);
 	return nlm_sysctl_table ? 0 : -ENOMEM;
 }
 
diff --git a/fs/nfs/sysctl.c b/fs/nfs/sysctl.c
index 3ea50ac..fcdcafb 100644
--- a/fs/nfs/sysctl.c
+++ b/fs/nfs/sysctl.c
@@ -75,7 +75,7 @@ static ctl_table nfs_cb_sysctl_root[] = {
 
 int nfs_register_sysctl(void)
 {
-	nfs_callback_sysctl_table = register_sysctl_table(nfs_cb_sysctl_root, 0);
+	nfs_callback_sysctl_table = register_sysctl_table(nfs_cb_sysctl_root);
 	if (nfs_callback_sysctl_table == NULL)
 		return -ENOMEM;
 	return 0;
diff --git a/fs/ntfs/sysctl.c b/fs/ntfs/sysctl.c
index bc217de..7edb370 100644
--- a/fs/ntfs/sysctl.c
+++ b/fs/ntfs/sysctl.c
@@ -70,7 +70,7 @@ int ntfs_sysctl(int add)
 {
 	if (add) {
 		BUG_ON(sysctls_root_table);
-		sysctls_root_table = register_sysctl_table(sysctls_root, 0);
+		sysctls_root_table = register_sysctl_table(sysctls_root);
 		if (!sysctls_root_table)
 			return -ENOMEM;
 #ifdef CONFIG_PROC_FS
diff --git a/fs/ocfs2/cluster/nodemanager.c b/fs/ocfs2/cluster/nodemanager.c
index df763c7..9f5ad0f 100644
--- a/fs/ocfs2/cluster/nodemanager.c
+++ b/fs/ocfs2/cluster/nodemanager.c
@@ -922,7 +922,7 @@ static int __init init_o2nm(void)
 	o2hb_init();
 	o2net_init();
 
-	ocfs2_table_header = register_sysctl_table(ocfs2_root_table, 0);
+	ocfs2_table_header = register_sysctl_table(ocfs2_root_table);
 	if (!ocfs2_table_header) {
 		printk(KERN_ERR "nodemanager: unable to register sysctl\n");
 		ret = -ENOMEM; /* or something. */
diff --git a/fs/xfs/linux-2.6/xfs_sysctl.c b/fs/xfs/linux-2.6/xfs_sysctl.c
index 5a0eefc..3ac4dab 100644
--- a/fs/xfs/linux-2.6/xfs_sysctl.c
+++ b/fs/xfs/linux-2.6/xfs_sysctl.c
@@ -251,7 +251,7 @@ STATIC ctl_table xfs_root_table[] = {
 void
 xfs_sysctl_register(void)
 {
-	xfs_table_header = register_sysctl_table(xfs_root_table, 0);
+	xfs_table_header = register_sysctl_table(xfs_root_table);
 }
 
 void
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index c99e4bb..6113f3b 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -1034,8 +1034,8 @@ struct ctl_table_header
 	struct completion *unregistering;
 };
 
-struct ctl_table_header * register_sysctl_table(ctl_table * table, 
-						int insert_at_head);
+struct ctl_table_header * register_sysctl_table(ctl_table * table); 
+
 void unregister_sysctl_table(struct ctl_table_header * table);
 
 #else /* __KERNEL__ */
diff --git a/ipc/ipc_sysctl.c b/ipc/ipc_sysctl.c
index 9018009..a491c60 100644
--- a/ipc/ipc_sysctl.c
+++ b/ipc/ipc_sysctl.c
@@ -175,7 +175,7 @@ static struct ctl_table ipc_root_table[] = {
 
 static int __init ipc_sysctl_init(void)
 {
-	register_sysctl_table(ipc_root_table, 0);
+	register_sysctl_table(ipc_root_table);
 	return 0;
 }
 
diff --git a/ipc/mqueue.c b/ipc/mqueue.c
index 02717f7..00b842a 100644
--- a/ipc/mqueue.c
+++ b/ipc/mqueue.c
@@ -1255,7 +1255,7 @@ static int __init init_mqueue_fs(void)
 		return -ENOMEM;
 
 	/* ignore failues - they are not fatal */
-	mq_sysctl_table = register_sysctl_table(mq_sysctl_root, 0);
+	mq_sysctl_table = register_sysctl_table(mq_sysctl_root);
 
 	error = register_filesystem(&mqueue_fs_type);
 	if (error)
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 2c3703d..5beee1f 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -1240,7 +1240,6 @@ int do_sysctl_strategy (ctl_table *table,
 /**
  * register_sysctl_table - register a sysctl hierarchy
  * @table: the top-level table structure
- * @insert_at_head: whether the entry should be inserted in front or at the end
  *
  * Register a sysctl table hierarchy. @table should be a filled in ctl_table
  * array. An entry with a ctl_name of 0 terminates the table. 
@@ -1306,8 +1305,7 @@ int do_sysctl_strategy (ctl_table *table,
  * This routine returns %NULL on a failure to register, and a pointer
  * to the table header on success.
  */
-struct ctl_table_header *register_sysctl_table(ctl_table * table, 
-					       int insert_at_head)
+struct ctl_table_header *register_sysctl_table(ctl_table * table)
 {
 	struct ctl_table_header *tmp;
 	tmp = kmalloc(sizeof(struct ctl_table_header), GFP_KERNEL);
@@ -1318,10 +1316,7 @@ struct ctl_table_header *register_sysctl_table(ctl_table * table,
 	tmp->used = 0;
 	tmp->unregistering = NULL;
 	spin_lock(&sysctl_lock);
-	if (insert_at_head)
-		list_add(&tmp->ctl_entry, &root_table_header.ctl_entry);
-	else
-		list_add_tail(&tmp->ctl_entry, &root_table_header.ctl_entry);
+	list_add_tail(&tmp->ctl_entry, &root_table_header.ctl_entry);
 	spin_unlock(&sysctl_lock);
 #ifdef CONFIG_PROC_SYSCTL
 	register_proc_table(table, proc_sys_root, tmp);
diff --git a/kernel/utsname_sysctl.c b/kernel/utsname_sysctl.c
index 324aa13..f22b9db 100644
--- a/kernel/utsname_sysctl.c
+++ b/kernel/utsname_sysctl.c
@@ -139,7 +139,7 @@ static struct ctl_table uts_root_table[] = {
 
 static int __init utsname_sysctl_init(void)
 {
-	register_sysctl_table(uts_root_table, 0);
+	register_sysctl_table(uts_root_table);
 	return 0;
 }
 
diff --git a/net/appletalk/sysctl_net_atalk.c b/net/appletalk/sysctl_net_atalk.c
index 4f806b6..7df1778 100644
--- a/net/appletalk/sysctl_net_atalk.c
+++ b/net/appletalk/sysctl_net_atalk.c
@@ -73,7 +73,7 @@ static struct ctl_table_header *atalk_table_header;
 
 void atalk_register_sysctl(void)
 {
-	atalk_table_header = register_sysctl_table(atalk_root_table, 0);
+	atalk_table_header = register_sysctl_table(atalk_root_table);
 }
 
 void atalk_unregister_sysctl(void)
diff --git a/net/ax25/sysctl_net_ax25.c b/net/ax25/sysctl_net_ax25.c
index afdba04..443a836 100644
--- a/net/ax25/sysctl_net_ax25.c
+++ b/net/ax25/sysctl_net_ax25.c
@@ -245,7 +245,7 @@ void ax25_register_sysctl(void)
 
 	ax25_dir_table[0].child = ax25_table;
 
-	ax25_table_header = register_sysctl_table(ax25_root_table, 0);
+	ax25_table_header = register_sysctl_table(ax25_root_table);
 }
 
 void ax25_unregister_sysctl(void)
diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c
index ea3337a..77998b6 100644
--- a/net/bridge/br_netfilter.c
+++ b/net/bridge/br_netfilter.c
@@ -966,7 +966,7 @@ int br_netfilter_init(void)
 	}
 
 #ifdef CONFIG_SYSCTL
-	brnf_sysctl_header = register_sysctl_table(brnf_net_table, 0);
+	brnf_sysctl_header = register_sysctl_table(brnf_net_table);
 	if (brnf_sysctl_header == NULL) {
 		printk(KERN_WARNING
 		       "br_netfilter: can't register to sysctl.\n");
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index e7300b6..8437678 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -2701,7 +2701,7 @@ int neigh_sysctl_register(struct net_device *dev, struct neigh_parms *p,
 	t->neigh_proto_dir[0].child    = t->neigh_neigh_dir;
 	t->neigh_root_dir[0].child     = t->neigh_proto_dir;
 
-	t->sysctl_header = register_sysctl_table(t->neigh_root_dir, 0);
+	t->sysctl_header = register_sysctl_table(t->neigh_root_dir);
 	if (!t->sysctl_header) {
 		err = -ENOBUFS;
 		goto free_procname;
diff --git a/net/dccp/sysctl.c b/net/dccp/sysctl.c
index 3391631..1260aab 100644
--- a/net/dccp/sysctl.c
+++ b/net/dccp/sysctl.c
@@ -127,7 +127,7 @@ static struct ctl_table_header *dccp_table_header;
 
 int __init dccp_sysctl_init(void)
 {
-	dccp_table_header = register_sysctl_table(dccp_root_table, 0);
+	dccp_table_header = register_sysctl_table(dccp_root_table);
 
 	return dccp_table_header != NULL ? 0 : -ENOMEM;
 }
diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c
index fc6f3c0..baaa02e 100644
--- a/net/decnet/dn_dev.c
+++ b/net/decnet/dn_dev.c
@@ -282,7 +282,7 @@ static void dn_dev_sysctl_register(struct net_device *dev, struct dn_dev_parms *
 	t->dn_dev_root_dir[0].de = NULL;
 	t->dn_dev_vars[0].extra1 = (void *)dev;
 
-	t->sysctl_header = register_sysctl_table(t->dn_dev_root_dir, 0);
+	t->sysctl_header = register_sysctl_table(t->dn_dev_root_dir);
 	if (t->sysctl_header == NULL)
 		kfree(t);
 	else
diff --git a/net/decnet/sysctl_net_decnet.c b/net/decnet/sysctl_net_decnet.c
index 81469fd..37fff9a 100644
--- a/net/decnet/sysctl_net_decnet.c
+++ b/net/decnet/sysctl_net_decnet.c
@@ -491,7 +491,7 @@ static ctl_table dn_root_table[] = {
 
 void dn_register_sysctl(void)
 {
-	dn_table_header = register_sysctl_table(dn_root_table, 0);
+	dn_table_header = register_sysctl_table(dn_root_table);
 }
 
 void dn_unregister_sysctl(void)
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index 480ace9..b731a0c 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -1603,7 +1603,7 @@ static void devinet_sysctl_register(struct in_device *in_dev,
 	t->devinet_root_dir[0].child  = t->devinet_proto_dir;
 	t->devinet_root_dir[0].de     = NULL;
 
-	t->sysctl_header = register_sysctl_table(t->devinet_root_dir, 0);
+	t->sysctl_header = register_sysctl_table(t->devinet_root_dir);
 	if (!t->sysctl_header)
 	    goto free_procname;
 
@@ -1637,7 +1637,7 @@ void __init devinet_init(void)
 	rtnetlink_links[PF_INET] = inet_rtnetlink_table;
 #ifdef CONFIG_SYSCTL
 	devinet_sysctl.sysctl_header =
-		register_sysctl_table(devinet_sysctl.devinet_root_dir, 0);
+		register_sysctl_table(devinet_sysctl.devinet_root_dir);
 	devinet_sysctl_register(NULL, &ipv4_devconf_dflt);
 #endif
 }
diff --git a/net/ipv4/ipvs/ip_vs_ctl.c b/net/ipv4/ipvs/ip_vs_ctl.c
index 9b93338..c4e4237 100644
--- a/net/ipv4/ipvs/ip_vs_ctl.c
+++ b/net/ipv4/ipvs/ip_vs_ctl.c
@@ -2359,7 +2359,7 @@ int ip_vs_control_init(void)
 	proc_net_fops_create("ip_vs", 0, &ip_vs_info_fops);
 	proc_net_fops_create("ip_vs_stats",0, &ip_vs_stats_fops);
 
-	sysctl_header = register_sysctl_table(vs_root_table, 0);
+	sysctl_header = register_sysctl_table(vs_root_table);
 
 	/* Initialize ip_vs_svc_table, ip_vs_svc_fwm_table, ip_vs_rtable */
 	for(idx = 0; idx < IP_VS_SVC_TAB_SIZE; idx++)  {
diff --git a/net/ipv4/ipvs/ip_vs_lblc.c b/net/ipv4/ipvs/ip_vs_lblc.c
index a4385a2..0e9cdfc 100644
--- a/net/ipv4/ipvs/ip_vs_lblc.c
+++ b/net/ipv4/ipvs/ip_vs_lblc.c
@@ -583,7 +583,7 @@ static struct ip_vs_scheduler ip_vs_lblc_scheduler =
 static int __init ip_vs_lblc_init(void)
 {
 	INIT_LIST_HEAD(&ip_vs_lblc_scheduler.n_list);
-	sysctl_header = register_sysctl_table(lblc_root_table, 0);
+	sysctl_header = register_sysctl_table(lblc_root_table);
 	return register_ip_vs_scheduler(&ip_vs_lblc_scheduler);
 }
 
diff --git a/net/ipv4/ipvs/ip_vs_lblcr.c b/net/ipv4/ipvs/ip_vs_lblcr.c
index fe1af5d..22004f8 100644
--- a/net/ipv4/ipvs/ip_vs_lblcr.c
+++ b/net/ipv4/ipvs/ip_vs_lblcr.c
@@ -841,7 +841,7 @@ static struct ip_vs_scheduler ip_vs_lblcr_scheduler =
 static int __init ip_vs_lblcr_init(void)
 {
 	INIT_LIST_HEAD(&ip_vs_lblcr_scheduler.n_list);
-	sysctl_header = register_sysctl_table(lblcr_root_table, 0);
+	sysctl_header = register_sysctl_table(lblcr_root_table);
 #ifdef CONFIG_IP_VS_LBLCR_DEBUG
 	proc_net_create("ip_vs_lblcr", 0, ip_vs_lblcr_getinfo);
 #endif
diff --git a/net/ipv4/netfilter/ip_conntrack_proto_sctp.c b/net/ipv4/netfilter/ip_conntrack_proto_sctp.c
index 2443322..44513b4 100644
--- a/net/ipv4/netfilter/ip_conntrack_proto_sctp.c
+++ b/net/ipv4/netfilter/ip_conntrack_proto_sctp.c
@@ -623,7 +623,7 @@ static int __init ip_conntrack_proto_sctp_init(void)
 	}
 
 #ifdef CONFIG_SYSCTL
-	ip_ct_sysctl_header = register_sysctl_table(ip_ct_net_table, 0);
+	ip_ct_sysctl_header = register_sysctl_table(ip_ct_net_table);
 	if (ip_ct_sysctl_header == NULL) {
 		ret = -ENOMEM;
 		printk("ip_conntrack_proto_sctp: can't register to sysctl.\n");
diff --git a/net/ipv4/netfilter/ip_conntrack_standalone.c b/net/ipv4/netfilter/ip_conntrack_standalone.c
index 86efb54..9d89469 100644
--- a/net/ipv4/netfilter/ip_conntrack_standalone.c
+++ b/net/ipv4/netfilter/ip_conntrack_standalone.c
@@ -849,7 +849,7 @@ static int __init ip_conntrack_standalone_init(void)
 		goto cleanup_proc_stat;
 	}
 #ifdef CONFIG_SYSCTL
-	ip_ct_sysctl_header = register_sysctl_table(ip_ct_net_table, 0);
+	ip_ct_sysctl_header = register_sysctl_table(ip_ct_net_table);
 	if (ip_ct_sysctl_header == NULL) {
 		printk("ip_conntrack: can't register to sysctl.\n");
 		ret = -ENOMEM;
diff --git a/net/ipv4/netfilter/ip_queue.c b/net/ipv4/netfilter/ip_queue.c
index cd520df..3446d4a 100644
--- a/net/ipv4/netfilter/ip_queue.c
+++ b/net/ipv4/netfilter/ip_queue.c
@@ -693,7 +693,7 @@ static int __init ip_queue_init(void)
 	}
 	
 	register_netdevice_notifier(&ipq_dev_notifier);
-	ipq_sysctl_header = register_sysctl_table(ipq_root_table, 0);
+	ipq_sysctl_header = register_sysctl_table(ipq_root_table);
 	
 	status = nf_register_queue_handler(PF_INET, &nfqh);
 	if (status < 0) {
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 171e5b5..791aaba 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -4004,7 +4004,7 @@ static void addrconf_sysctl_register(struct inet6_dev *idev, struct ipv6_devconf
 	t->addrconf_root_dir[0].child = t->addrconf_proto_dir;
 	t->addrconf_root_dir[0].de = NULL;
 
-	t->sysctl_header = register_sysctl_table(t->addrconf_root_dir, 0);
+	t->sysctl_header = register_sysctl_table(t->addrconf_root_dir);
 	if (t->sysctl_header == NULL)
 		goto free_procname;
 	else
@@ -4089,7 +4089,7 @@ int __init addrconf_init(void)
 	rtnetlink_links[PF_INET6] = inet6_rtnetlink_table;
 #ifdef CONFIG_SYSCTL
 	addrconf_sysctl.sysctl_header =
-		register_sysctl_table(addrconf_sysctl.addrconf_root_dir, 0);
+		register_sysctl_table(addrconf_sysctl.addrconf_root_dir);
 	addrconf_sysctl_register(NULL, &ipv6_devconf_dflt);
 #endif
 
diff --git a/net/ipv6/netfilter/ip6_queue.c b/net/ipv6/netfilter/ip6_queue.c
index d4d9f18..e774be7 100644
--- a/net/ipv6/netfilter/ip6_queue.c
+++ b/net/ipv6/netfilter/ip6_queue.c
@@ -683,7 +683,7 @@ static int __init ip6_queue_init(void)
 	}
 	
 	register_netdevice_notifier(&ipq_dev_notifier);
-	ipq_sysctl_header = register_sysctl_table(ipq_root_table, 0);
+	ipq_sysctl_header = register_sysctl_table(ipq_root_table);
 	
 	status = nf_register_queue_handler(PF_INET6, &nfqh);
 	if (status < 0) {
diff --git a/net/ipv6/sysctl_net_ipv6.c b/net/ipv6/sysctl_net_ipv6.c
index 7a4639d..31e2494 100644
--- a/net/ipv6/sysctl_net_ipv6.c
+++ b/net/ipv6/sysctl_net_ipv6.c
@@ -107,7 +107,7 @@ static ctl_table ipv6_root_table[] = {
 
 void ipv6_sysctl_register(void)
 {
-	ipv6_sysctl_header = register_sysctl_table(ipv6_root_table, 0);
+	ipv6_sysctl_header = register_sysctl_table(ipv6_root_table);
 }
 
 void ipv6_sysctl_unregister(void)
diff --git a/net/ipx/sysctl_net_ipx.c b/net/ipx/sysctl_net_ipx.c
index 0442f44..55a7d96 100644
--- a/net/ipx/sysctl_net_ipx.c
+++ b/net/ipx/sysctl_net_ipx.c
@@ -52,7 +52,7 @@ static struct ctl_table_header *ipx_table_header;
 
 void ipx_register_sysctl(void)
 {
-	ipx_table_header = register_sysctl_table(ipx_root_table, 0);
+	ipx_table_header = register_sysctl_table(ipx_root_table);
 }
 
 void ipx_unregister_sysctl(void)
diff --git a/net/irda/irsysctl.c b/net/irda/irsysctl.c
index 86805c3..b60b72f 100644
--- a/net/irda/irsysctl.c
+++ b/net/irda/irsysctl.c
@@ -274,7 +274,7 @@ static struct ctl_table_header *irda_table_header;
  */
 int __init irda_sysctl_register(void)
 {
-	irda_table_header = register_sysctl_table(irda_root_table, 0);
+	irda_table_header = register_sysctl_table(irda_root_table);
 	if (!irda_table_header)
 		return -ENOMEM;
 
diff --git a/net/llc/sysctl_net_llc.c b/net/llc/sysctl_net_llc.c
index 4aab676..154a3e6 100644
--- a/net/llc/sysctl_net_llc.c
+++ b/net/llc/sysctl_net_llc.c
@@ -116,7 +116,7 @@ static struct ctl_table_header *llc_table_header;
 
 int __init llc_sysctl_init(void)
 {
-	llc_table_header = register_sysctl_table(llc_root_table, 0);
+	llc_table_header = register_sysctl_table(llc_root_table);
 
 	return llc_table_header ? 0 : -ENOMEM;
 }
diff --git a/net/netfilter/nf_conntrack_standalone.c b/net/netfilter/nf_conntrack_standalone.c
index f1cb60f..2587b49 100644
--- a/net/netfilter/nf_conntrack_standalone.c
+++ b/net/netfilter/nf_conntrack_standalone.c
@@ -445,7 +445,7 @@ static int __init nf_conntrack_standalone_init(void)
 	proc_stat->owner = THIS_MODULE;
 #endif
 #ifdef CONFIG_SYSCTL
-	nf_ct_sysctl_header = register_sysctl_table(nf_ct_net_table, 0);
+	nf_ct_sysctl_header = register_sysctl_table(nf_ct_net_table);
 	if (nf_ct_sysctl_header == NULL) {
 		printk("nf_conntrack: can't register to sysctl.\n");
 		ret = -ENOMEM;
diff --git a/net/netfilter/nf_sysctl.c b/net/netfilter/nf_sysctl.c
index 06ddddb..ee34589 100644
--- a/net/netfilter/nf_sysctl.c
+++ b/net/netfilter/nf_sysctl.c
@@ -56,7 +56,7 @@ nf_register_sysctl_table(struct ctl_table *path, struct ctl_table *table)
 	path = path_dup(path, table);
 	if (path == NULL)
 		return NULL;
-	header = register_sysctl_table(path, 0);
+	header = register_sysctl_table(path);
 	if (header == NULL)
 		path_free(path, table);
 	return header;
diff --git a/net/netrom/sysctl_net_netrom.c b/net/netrom/sysctl_net_netrom.c
index 09f4246..4cbc309 100644
--- a/net/netrom/sysctl_net_netrom.c
+++ b/net/netrom/sysctl_net_netrom.c
@@ -192,7 +192,7 @@ static ctl_table nr_root_table[] = {
 
 void __init nr_register_sysctl(void)
 {
-	nr_table_header = register_sysctl_table(nr_root_table, 0);
+	nr_table_header = register_sysctl_table(nr_root_table);
 }
 
 void nr_unregister_sysctl(void)
diff --git a/net/rose/sysctl_net_rose.c b/net/rose/sysctl_net_rose.c
index 0190a07..c30e1c7 100644
--- a/net/rose/sysctl_net_rose.c
+++ b/net/rose/sysctl_net_rose.c
@@ -160,7 +160,7 @@ static ctl_table rose_root_table[] = {
 
 void __init rose_register_sysctl(void)
 {
-	rose_table_header = register_sysctl_table(rose_root_table, 0);
+	rose_table_header = register_sysctl_table(rose_root_table);
 }
 
 void rose_unregister_sysctl(void)
diff --git a/net/rxrpc/sysctl.c b/net/rxrpc/sysctl.c
index 6374df7..3bad91a 100644
--- a/net/rxrpc/sysctl.c
+++ b/net/rxrpc/sysctl.c
@@ -97,7 +97,7 @@ static ctl_table rxrpc_dir_sysctl_table[] = {
 int rxrpc_sysctl_init(void)
 {
 #ifdef CONFIG_SYSCTL
-	rxrpc_sysctl = register_sysctl_table(rxrpc_dir_sysctl_table, 0);
+	rxrpc_sysctl = register_sysctl_table(rxrpc_dir_sysctl_table);
 	if (!rxrpc_sysctl)
 		return -ENOMEM;
 #endif /* CONFIG_SYSCTL */
diff --git a/net/sctp/sysctl.c b/net/sctp/sysctl.c
index 633cd17..e2c679b 100644
--- a/net/sctp/sysctl.c
+++ b/net/sctp/sysctl.c
@@ -254,7 +254,7 @@ static struct ctl_table_header * sctp_sysctl_header;
 /* Sysctl registration.  */
 void sctp_sysctl_register(void)
 {
-	sctp_sysctl_header = register_sysctl_table(sctp_root_table, 0);
+	sctp_sysctl_header = register_sysctl_table(sctp_root_table);
 }
 
 /* Sysctl deregistration.  */
diff --git a/net/sunrpc/sysctl.c b/net/sunrpc/sysctl.c
index 6a82ed2..df70c8c 100644
--- a/net/sunrpc/sysctl.c
+++ b/net/sunrpc/sysctl.c
@@ -36,7 +36,7 @@ void
 rpc_register_sysctl(void)
 {
 	if (!sunrpc_table_header)
-		sunrpc_table_header = register_sysctl_table(sunrpc_table, 0);
+		sunrpc_table_header = register_sysctl_table(sunrpc_table);
 }
 
 void
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index 51964cf..a314c86 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -1630,7 +1630,7 @@ int init_socket_xprt(void)
 {
 #ifdef RPC_DEBUG
 	if (!sunrpc_table_header)
-		sunrpc_table_header = register_sysctl_table(sunrpc_table, 0);
+		sunrpc_table_header = register_sysctl_table(sunrpc_table);
 #endif
 
 	return 0;
diff --git a/net/unix/sysctl_net_unix.c b/net/unix/sysctl_net_unix.c
index 690ffa5..eb0bd57 100644
--- a/net/unix/sysctl_net_unix.c
+++ b/net/unix/sysctl_net_unix.c
@@ -50,7 +50,7 @@ static struct ctl_table_header * unix_sysctl_header;
 
 void unix_sysctl_register(void)
 {
-	unix_sysctl_header = register_sysctl_table(unix_root_table, 0);
+	unix_sysctl_header = register_sysctl_table(unix_root_table);
 }
 
 void unix_sysctl_unregister(void)
diff --git a/net/x25/sysctl_net_x25.c b/net/x25/sysctl_net_x25.c
index 94aff67..324ae1c 100644
--- a/net/x25/sysctl_net_x25.c
+++ b/net/x25/sysctl_net_x25.c
@@ -98,7 +98,7 @@ static struct ctl_table x25_root_table[] = {
 
 void __init x25_register_sysctl(void)
 {
-	x25_table_header = register_sysctl_table(x25_root_table, 0);
+	x25_table_header = register_sysctl_table(x25_root_table);
 }
 
 void x25_unregister_sysctl(void)
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 17:03:34 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 17:03:40 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:7299 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S28580829AbXAPQme (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:42:34 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGfWN7001081;
	Tue, 16 Jan 2007 09:41:32 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGfVcC001080;
	Tue, 16 Jan 2007 09:41:31 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 51/59] sysctl: Move SYSV IPC sysctls to their own file
Date:	Tue, 16 Jan 2007 09:39:56 -0700
Message-Id: <11689656911014-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13662
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

This is just a simple cleanup to keep kernel/sysctl.c
from getting to crowded with special cases, and by
keeping all of the ipc logic to together it makes
the code a little more readable.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 init/Kconfig     |    6 ++
 ipc/Makefile     |    1 +
 ipc/ipc_sysctl.c |  182 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 kernel/sysctl.c  |  174 ---------------------------------------------------
 4 files changed, 189 insertions(+), 174 deletions(-)

diff --git a/init/Kconfig b/init/Kconfig
index a3f83e2..33bc38d 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -116,6 +116,12 @@ config SYSVIPC
 	  section 6.4 of the Linux Programmer's Guide, available from
 	  <http://www.tldp.org/guides.html>.
 
+config SYSVIPC_SYSCTL
+	bool
+	depends on SYSVIPC
+	depends on SYSCTL
+	default y
+
 config IPC_NS
 	bool "IPC Namespaces"
 	depends on SYSVIPC
diff --git a/ipc/Makefile b/ipc/Makefile
index 0a6d626..b93bba6 100644
--- a/ipc/Makefile
+++ b/ipc/Makefile
@@ -4,6 +4,7 @@
 
 obj-$(CONFIG_SYSVIPC_COMPAT) += compat.o
 obj-$(CONFIG_SYSVIPC) += util.o msgutil.o msg.o sem.o shm.o
+obj-$(CONFIG_SYSVIPC_SYSCTL) += ipc_sysctl.o
 obj_mq-$(CONFIG_COMPAT) += compat_mq.o
 obj-$(CONFIG_POSIX_MQUEUE) += mqueue.o msgutil.o $(obj_mq-y)
 
diff --git a/ipc/ipc_sysctl.c b/ipc/ipc_sysctl.c
new file mode 100644
index 0000000..9018009
--- /dev/null
+++ b/ipc/ipc_sysctl.c
@@ -0,0 +1,182 @@
+/*
+ *  Copyright (C) 2007
+ *
+ *  Author: Eric Biederman <ebiederm@xmision.com>
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU General Public License as
+ *  published by the Free Software Foundation, version 2 of the
+ *  License.
+ */
+
+#include <linux/module.h>
+#include <linux/ipc.h>
+#include <linux/nsproxy.h>
+#include <linux/sysctl.h>
+
+#ifdef CONFIG_IPC_NS
+static void *get_ipc(ctl_table *table)
+{
+	char *which = table->data;
+	struct ipc_namespace *ipc_ns = current->nsproxy->ipc_ns;
+	which = (which - (char *)&init_ipc_ns) + (char *)ipc_ns;
+	return which;
+}
+#else
+#define get_ipc(T) ((T)->data)
+#endif
+
+#ifdef CONFIG_PROC_FS
+static int proc_ipc_dointvec(ctl_table *table, int write, struct file *filp,
+	void __user *buffer, size_t *lenp, loff_t *ppos)
+{
+	struct ctl_table ipc_table;
+	memcpy(&ipc_table, table, sizeof(ipc_table));
+	ipc_table.data = get_ipc(table);
+
+	return proc_dointvec(&ipc_table, write, filp, buffer, lenp, ppos);
+}
+
+static int proc_ipc_doulongvec_minmax(ctl_table *table, int write,
+	struct file *filp, void __user *buffer, size_t *lenp, loff_t *ppos)
+{
+	struct ctl_table ipc_table;
+	memcpy(&ipc_table, table, sizeof(ipc_table));
+	ipc_table.data = get_ipc(table);
+
+	return proc_doulongvec_minmax(&ipc_table, write, filp, buffer,
+					lenp, ppos);
+}
+
+#else
+#define proc_ipc_do_ulongvec_minmax NULL
+#define proc_ipc_do_intvec	    NULL
+#endif
+
+#ifdef CONFIG_SYSCTL_SYSCALL
+/* The generic sysctl ipc data routine. */
+static int sysctl_ipc_data(ctl_table *table, int __user *name, int nlen,
+		void __user *oldval, size_t __user *oldlenp,
+		void __user *newval, size_t newlen)
+{
+	size_t len;
+	void *data;
+
+	/* Get out of I don't have a variable */
+	if (!table->data || !table->maxlen)
+		return -ENOTDIR;
+
+	data = get_ipc(table);
+	if (!data)
+		return -ENOTDIR;
+
+	if (oldval && oldlenp) {
+		if (get_user(len, oldlenp))
+			return -EFAULT;
+		if (len) {
+			if (len > table->maxlen)
+				len = table->maxlen;
+			if (copy_to_user(oldval, data, len))
+				return -EFAULT;
+			if (put_user(len, oldlenp))
+				return -EFAULT;
+		}
+	}
+
+	if (newval && newlen) {
+		if (newlen > table->maxlen)
+			newlen = table->maxlen;
+
+		if (copy_from_user(data, newval, newlen))
+			return -EFAULT;
+	}
+	return 1;
+}
+#else
+#define sysctl_ipc_data NULL
+#endif
+
+static struct ctl_table ipc_kern_table[] = {
+	{
+		.ctl_name	= KERN_SHMMAX,
+		.procname	= "shmmax",
+		.data		= &init_ipc_ns.shm_ctlmax,
+		.maxlen		= sizeof (init_ipc_ns.shm_ctlmax),
+		.mode		= 0644,
+		.proc_handler	= proc_ipc_doulongvec_minmax,
+		.strategy	= sysctl_ipc_data,
+	},
+	{
+		.ctl_name	= KERN_SHMALL,
+		.procname	= "shmall",
+		.data		= &init_ipc_ns.shm_ctlall,
+		.maxlen		= sizeof (init_ipc_ns.shm_ctlall),
+		.mode		= 0644,
+		.proc_handler	= proc_ipc_doulongvec_minmax,
+		.strategy	= sysctl_ipc_data,
+	},
+	{
+		.ctl_name	= KERN_SHMMNI,
+		.procname	= "shmmni",
+		.data		= &init_ipc_ns.shm_ctlmni,
+		.maxlen		= sizeof (init_ipc_ns.shm_ctlmni),
+		.mode		= 0644,
+		.proc_handler	= proc_ipc_dointvec,
+		.strategy	= sysctl_ipc_data,
+	},
+	{
+		.ctl_name	= KERN_MSGMAX,
+		.procname	= "msgmax",
+		.data		= &init_ipc_ns.msg_ctlmax,
+		.maxlen		= sizeof (init_ipc_ns.msg_ctlmax),
+		.mode		= 0644,
+		.proc_handler	= proc_ipc_dointvec,
+		.strategy	= sysctl_ipc_data,
+	},
+	{
+		.ctl_name	= KERN_MSGMNI,
+		.procname	= "msgmni",
+		.data		= &init_ipc_ns.msg_ctlmni,
+		.maxlen		= sizeof (init_ipc_ns.msg_ctlmni),
+		.mode		= 0644,
+		.proc_handler	= proc_ipc_dointvec,
+		.strategy	= sysctl_ipc_data,
+	},
+	{
+		.ctl_name	= KERN_MSGMNB,
+		.procname	=  "msgmnb",
+		.data		= &init_ipc_ns.msg_ctlmnb,
+		.maxlen		= sizeof (init_ipc_ns.msg_ctlmnb),
+		.mode		= 0644,
+		.proc_handler	= proc_ipc_dointvec,
+		.strategy	= sysctl_ipc_data,
+	},
+	{
+		.ctl_name	= KERN_SEM,
+		.procname	= "sem",
+		.data		= &init_ipc_ns.sem_ctls,
+		.maxlen		= 4*sizeof (int),
+		.mode		= 0644,
+		.proc_handler	= proc_ipc_dointvec,
+		.strategy	= sysctl_ipc_data,
+	},
+	{}
+};
+
+static struct ctl_table ipc_root_table[] = {
+	{
+		.ctl_name	= CTL_KERN,
+		.procname	= "kernel",
+		.mode		= 0555,
+		.child		= ipc_kern_table,
+	},
+	{}
+};
+
+static int __init ipc_sysctl_init(void)
+{
+	register_sysctl_table(ipc_root_table, 0);
+	return 0;
+}
+
+__initcall(ipc_sysctl_init);
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index a8c0a03..6e2e608 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -90,12 +90,6 @@ extern char modprobe_path[];
 #ifdef CONFIG_CHR_DEV_SG
 extern int sg_big_buff;
 #endif
-#ifdef CONFIG_SYSVIPC
-static int proc_ipc_dointvec(ctl_table *table, int write, struct file *filp,
-		void __user *buffer, size_t *lenp, loff_t *ppos);
-static int proc_ipc_doulongvec_minmax(ctl_table *table, int write, struct file *filp,
-		void __user *buffer, size_t *lenp, loff_t *ppos);
-#endif
 
 #ifdef __sparc__
 extern char reboot_command [];
@@ -135,11 +129,6 @@ static int parse_table(int __user *, int, void __user *, size_t __user *,
 		void __user *, size_t, ctl_table *);
 #endif
 
-#ifdef CONFIG_SYSVIPC
-static int sysctl_ipc_data(ctl_table *table, int __user *name, int nlen,
-		  void __user *oldval, size_t __user *oldlenp,
-		  void __user *newval, size_t newlen);
-#endif
 
 #ifdef CONFIG_PROC_SYSCTL
 static int proc_do_cad_pid(ctl_table *table, int write, struct file *filp,
@@ -168,17 +157,6 @@ int sysctl_legacy_va_layout;
 #endif
 
 
-#ifdef CONFIG_SYSVIPC
-static void *get_ipc(ctl_table *table, int write)
-{
-	char *which = table->data;
-	struct ipc_namespace *ipc_ns = current->nsproxy->ipc_ns;
-	which = (which - (char *)&init_ipc_ns) + (char *)ipc_ns;
-	return which;
-}
-#else
-#define get_ipc(T,W) ((T)->data)
-#endif
 
 /* /proc declarations: */
 
@@ -400,71 +378,6 @@ static ctl_table kern_table[] = {
 		.proc_handler	= &proc_dointvec,
 	},
 #endif
-#ifdef CONFIG_SYSVIPC
-	{
-		.ctl_name	= KERN_SHMMAX,
-		.procname	= "shmmax",
-		.data		= &init_ipc_ns.shm_ctlmax,
-		.maxlen		= sizeof (init_ipc_ns.shm_ctlmax),
-		.mode		= 0644,
-		.proc_handler	= &proc_ipc_doulongvec_minmax,
-		.strategy	= sysctl_ipc_data,
-	},
-	{
-		.ctl_name	= KERN_SHMALL,
-		.procname	= "shmall",
-		.data		= &init_ipc_ns.shm_ctlall,
-		.maxlen		= sizeof (init_ipc_ns.shm_ctlall),
-		.mode		= 0644,
-		.proc_handler	= &proc_ipc_doulongvec_minmax,
-		.strategy	= sysctl_ipc_data,
-	},
-	{
-		.ctl_name	= KERN_SHMMNI,
-		.procname	= "shmmni",
-		.data		= &init_ipc_ns.shm_ctlmni,
-		.maxlen		= sizeof (init_ipc_ns.shm_ctlmni),
-		.mode		= 0644,
-		.proc_handler	= &proc_ipc_dointvec,
-		.strategy	= sysctl_ipc_data,
-	},
-	{
-		.ctl_name	= KERN_MSGMAX,
-		.procname	= "msgmax",
-		.data		= &init_ipc_ns.msg_ctlmax,
-		.maxlen		= sizeof (init_ipc_ns.msg_ctlmax),
-		.mode		= 0644,
-		.proc_handler	= &proc_ipc_dointvec,
-		.strategy	= sysctl_ipc_data,
-	},
-	{
-		.ctl_name	= KERN_MSGMNI,
-		.procname	= "msgmni",
-		.data		= &init_ipc_ns.msg_ctlmni,
-		.maxlen		= sizeof (init_ipc_ns.msg_ctlmni),
-		.mode		= 0644,
-		.proc_handler	= &proc_ipc_dointvec,
-		.strategy	= sysctl_ipc_data,
-	},
-	{
-		.ctl_name	= KERN_MSGMNB,
-		.procname	=  "msgmnb",
-		.data		= &init_ipc_ns.msg_ctlmnb,
-		.maxlen		= sizeof (init_ipc_ns.msg_ctlmnb),
-		.mode		= 0644,
-		.proc_handler	= &proc_ipc_dointvec,
-		.strategy	= sysctl_ipc_data,
-	},
-	{
-		.ctl_name	= KERN_SEM,
-		.procname	= "sem",
-		.data		= &init_ipc_ns.sem_ctls,
-		.maxlen		= 4*sizeof (int),
-		.mode		= 0644,
-		.proc_handler	= &proc_ipc_dointvec,
-		.strategy	= sysctl_ipc_data,
-	},
-#endif
 #ifdef CONFIG_MAGIC_SYSRQ
 	{
 		.ctl_name	= KERN_SYSRQ,
@@ -2240,27 +2153,6 @@ int proc_dointvec_ms_jiffies(ctl_table *table, int write, struct file *filp,
 				do_proc_dointvec_ms_jiffies_conv, NULL);
 }
 
-#ifdef CONFIG_SYSVIPC
-static int proc_ipc_dointvec(ctl_table *table, int write, struct file *filp,
-	void __user *buffer, size_t *lenp, loff_t *ppos)
-{
-	void *which;
-	which = get_ipc(table, write);
-	return __do_proc_dointvec(which, table, write, filp, buffer,
-			lenp, ppos, NULL, NULL);
-}
-
-static int proc_ipc_doulongvec_minmax(ctl_table *table, int write,
-	struct file *filp, void __user *buffer, size_t *lenp, loff_t *ppos)
-{
-	void *which;
-	which = get_ipc(table, write);
-	return __do_proc_doulongvec_minmax(which, table, write, filp, buffer,
-			lenp, ppos, 1l, 1l);
-}
-
-#endif
-
 static int proc_do_cad_pid(ctl_table *table, int write, struct file *filp,
 			   void __user *buffer, size_t *lenp, loff_t *ppos)
 {
@@ -2291,25 +2183,6 @@ int proc_dostring(ctl_table *table, int write, struct file *filp,
 	return -ENOSYS;
 }
 
-#ifdef CONFIG_SYSVIPC
-static int proc_do_ipc_string(ctl_table *table, int write, struct file *filp,
-		void __user *buffer, size_t *lenp, loff_t *ppos)
-{
-	return -ENOSYS;
-}
-static int proc_ipc_dointvec(ctl_table *table, int write, struct file *filp,
-		void __user *buffer, size_t *lenp, loff_t *ppos)
-{
-	return -ENOSYS;
-}
-static int proc_ipc_doulongvec_minmax(ctl_table *table, int write,
-		struct file *filp, void __user *buffer,
-		size_t *lenp, loff_t *ppos)
-{
-	return -ENOSYS;
-}
-#endif
-
 int proc_dointvec(ctl_table *table, int write, struct file *filp,
 		  void __user *buffer, size_t *lenp, loff_t *ppos)
 {
@@ -2509,47 +2382,6 @@ int sysctl_ms_jiffies(ctl_table *table, int __user *name, int nlen,
 
 
 
-#ifdef CONFIG_SYSVIPC
-/* The generic sysctl ipc data routine. */
-static int sysctl_ipc_data(ctl_table *table, int __user *name, int nlen,
-		void __user *oldval, size_t __user *oldlenp,
-		void __user *newval, size_t newlen)
-{
-	size_t len;
-	void *data;
-
-	/* Get out of I don't have a variable */
-	if (!table->data || !table->maxlen)
-		return -ENOTDIR;
-
-	data = get_ipc(table, 1);
-	if (!data)
-		return -ENOTDIR;
-
-	if (oldval && oldlenp) {
-		if (get_user(len, oldlenp))
-			return -EFAULT;
-		if (len) {
-			if (len > table->maxlen)
-				len = table->maxlen;
-			if (copy_to_user(oldval, data, len))
-				return -EFAULT;
-			if (put_user(len, oldlenp))
-				return -EFAULT;
-		}
-	}
-
-	if (newval && newlen) {
-		if (newlen > table->maxlen)
-			newlen = table->maxlen;
-
-		if (copy_from_user(data, newval, newlen))
-			return -EFAULT;
-	}
-	return 1;
-}
-#endif
-
 #else /* CONFIG_SYSCTL_SYSCALL */
 
 
@@ -2614,12 +2446,6 @@ int sysctl_ms_jiffies(ctl_table *table, int __user *name, int nlen,
 	return -ENOSYS;
 }
 
-static int sysctl_ipc_data(ctl_table *table, int __user *name, int nlen,
-		void __user *oldval, size_t __user *oldlenp,
-		void __user *newval, size_t newlen)
-{
-	return -ENOSYS;
-}
 #endif /* CONFIG_SYSCTL_SYSCALL */
 
 /*
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 17:04:03 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 17:04:06 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:9091 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S28580831AbXAPQme (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:42:34 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGfY79001085;
	Tue, 16 Jan 2007 09:41:34 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGfXUL001084;
	Tue, 16 Jan 2007 09:41:33 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 52/59] sysctl: Create sys/fs/binfmt_misc as an ordinary sysctl entry
Date:	Tue, 16 Jan 2007 09:39:57 -0700
Message-Id: <11689656932416-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13663
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

binfmt_misc has a mount point in the middle of the sysctl and
that mount point is created as a proc_generic directory.

Doing it that way gets in the way of cleaning up the sysctl
proc support as it continues the existence of a horrible hack.
So instead simply create the directory as an ordinary sysctl
directory.   At least that removes the magic special case.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 fs/proc/root.c  |    4 ----
 kernel/sysctl.c |   13 +++++++++++++
 2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/fs/proc/root.c b/fs/proc/root.c
index 64d242b..8059e92 100644
--- a/fs/proc/root.c
+++ b/fs/proc/root.c
@@ -74,10 +74,6 @@ void __init proc_root_init(void)
 #ifdef CONFIG_SYSCTL
 	proc_sys_root = proc_mkdir("sys", NULL);
 #endif
-#if defined(CONFIG_BINFMT_MISC) || defined(CONFIG_BINFMT_MISC_MODULE)
-	proc_mkdir("sys/fs", NULL);
-	proc_mkdir("sys/fs/binfmt_misc", NULL);
-#endif
 	proc_root_fs = proc_mkdir("fs", NULL);
 	proc_root_driver = proc_mkdir("driver", NULL);
 	proc_mkdir("fs/nfsd", NULL); /* somewhere for the nfsd filesystem to be mounted */
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 6e2e608..8da6647 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -142,6 +142,7 @@ static struct ctl_table_header root_table_header =
 static ctl_table kern_table[];
 static ctl_table vm_table[];
 static ctl_table fs_table[];
+static ctl_table binfmt_misc_table[];
 static ctl_table debug_table[];
 static ctl_table dev_table[];
 extern ctl_table random_table[];
@@ -1001,6 +1002,18 @@ static ctl_table fs_table[] = {
 		.mode		= 0644,
 		.proc_handler	= &proc_dointvec,
 	},
+#if defined(CONFIG_BINFMT_MISC) || defined(CONFIG_BINFMT_MISC_MODULE)
+	{
+		.ctl_name	= CTL_UNNUMBERED,
+		.procname	= "binfmt_misc",
+		.mode		= 0555,
+		.child		= binfmt_misc_table,
+	},
+#endif
+	{ .ctl_name = 0 }
+};
+
+static ctl_table binfmt_misc_table[] = {
 	{ .ctl_name = 0 }
 };
 
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 17:04:29 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 17:04:33 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:9603 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S28580832AbXAPQmf (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:42:35 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGfgTC001101;
	Tue, 16 Jan 2007 09:41:42 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGffT6001100;
	Tue, 16 Jan 2007 09:41:41 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 56/59] sysctl: factor out sysctl_head_next from do_sysctl
Date:	Tue, 16 Jan 2007 09:40:01 -0700
Message-Id: <11689657011683-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13664
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

The current logic to walk through the list of sysctl table
headers is slightly painful and implement in a way it cannot
be used by code outside sysctl.c

I am in the process of implementing a version of the sysctl
proc support that instead of using the proc generic non-caching
monster, just uses the existing sysctl data structure as
backing store for building the dcache entries and for doing
directory reads.   To use the existing data structures however
I need a way to get at them.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 include/linux/sysctl.h |    4 +++
 kernel/sysctl.c        |   57 +++++++++++++++++++++++++++++++++++------------
 2 files changed, 46 insertions(+), 15 deletions(-)

diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 6113f3b..81ee9ea 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -923,6 +923,10 @@ enum
 #ifdef __KERNEL__
 #include <linux/list.h>
 
+/* For the /proc/sys support */
+extern struct ctl_table_header *sysctl_head_next(struct ctl_table_header *prev);
+extern void sysctl_head_finish(struct ctl_table_header *prev);
+
 extern void sysctl_init(void);
 
 typedef struct ctl_table ctl_table;
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 5beee1f..ca2831a 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -1066,6 +1066,42 @@ static void start_unregistering(struct ctl_table_header *p)
 	list_del_init(&p->ctl_entry);
 }
 
+void sysctl_head_finish(struct ctl_table_header *head)
+{
+	if (!head)
+		return;
+	spin_lock(&sysctl_lock);
+	unuse_table(head);
+	spin_unlock(&sysctl_lock);
+}
+
+struct ctl_table_header *sysctl_head_next(struct ctl_table_header *prev)
+{
+	struct ctl_table_header *head;
+	struct list_head *tmp;
+	spin_lock(&sysctl_lock);
+	if (prev) {
+		tmp = &prev->ctl_entry;
+		unuse_table(prev);
+		goto next;
+	}
+	tmp = &root_table_header.ctl_entry;
+	for (;;) {
+		head = list_entry(tmp, struct ctl_table_header, ctl_entry);
+
+		if (!use_table(head))
+			goto next;
+		spin_unlock(&sysctl_lock);
+		return head;
+	next:
+		tmp = tmp->next;
+		if (tmp == &root_table_header.ctl_entry)
+			break;
+	}
+	spin_unlock(&sysctl_lock);
+	return NULL;
+}
+
 void __init sysctl_init(void)
 {
 #ifdef CONFIG_PROC_SYSCTL
@@ -1077,6 +1113,7 @@ void __init sysctl_init(void)
 int do_sysctl(int __user *name, int nlen, void __user *oldval, size_t __user *oldlenp,
 	       void __user *newval, size_t newlen)
 {
+	struct ctl_table_header *head;
 	struct list_head *tmp;
 	int error = -ENOTDIR;
 
@@ -1087,26 +1124,16 @@ int do_sysctl(int __user *name, int nlen, void __user *oldval, size_t __user *ol
 		if (!oldlenp || get_user(old_len, oldlenp))
 			return -EFAULT;
 	}
-	spin_lock(&sysctl_lock);
-	tmp = &root_table_header.ctl_entry;
-	do {
-		struct ctl_table_header *head =
-			list_entry(tmp, struct ctl_table_header, ctl_entry);
 
-		if (!use_table(head))
-			continue;
-
-		spin_unlock(&sysctl_lock);
+	for (head = sysctl_head_next(NULL); head; head = sysctl_head_next(head)) {
 
 		error = parse_table(name, nlen, oldval, oldlenp, 
 					newval, newlen, head->ctl_table);
-
-		spin_lock(&sysctl_lock);
-		unuse_table(head);
-		if (error != -ENOTDIR)
+		if (error != -ENOTDIR) {
+			sysctl_head_finish(head);
 			break;
-	} while ((tmp = tmp->next) != &root_table_header.ctl_entry);
-	spin_unlock(&sysctl_lock);
+		}
+	}
 	return error;
 }
 
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 17:04:56 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 17:05:02 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:10371 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S28580833AbXAPQmg (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:42:36 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGfikk001105;
	Tue, 16 Jan 2007 09:41:44 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGfisx001104;
	Tue, 16 Jan 2007 09:41:44 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 57/59] sysctl: allow sysctl_perm to be called from outside of sysctl.c
Date:	Tue, 16 Jan 2007 09:40:02 -0700
Message-Id: <11689657031417-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13665
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 include/linux/sysctl.h |    2 ++
 kernel/sysctl.c        |   10 +++++-----
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 81ee9ea..20c23b5 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -924,8 +924,10 @@ enum
 #include <linux/list.h>
 
 /* For the /proc/sys support */
+struct ctl_table;
 extern struct ctl_table_header *sysctl_head_next(struct ctl_table_header *prev);
 extern void sysctl_head_finish(struct ctl_table_header *prev);
+extern int sysctl_perm(struct ctl_table *table, int op);
 
 extern void sysctl_init(void);
 
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index ca2831a..ec5e4a1 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -1154,7 +1154,7 @@ asmlinkage long sys_sysctl(struct __sysctl_args __user *args)
 #endif /* CONFIG_SYSCTL_SYSCALL */
 
 /*
- * ctl_perm does NOT grant the superuser all rights automatically, because
+ * sysctl_perm does NOT grant the superuser all rights automatically, because
  * some sysctl variables are readonly even to root.
  */
 
@@ -1169,7 +1169,7 @@ static int test_perm(int mode, int op)
 	return -EACCES;
 }
 
-static inline int ctl_perm(ctl_table *table, int op)
+int sysctl_perm(ctl_table *table, int op)
 {
 	int error;
 	error = security_sysctl(table, op);
@@ -1196,7 +1196,7 @@ repeat:
 		if (n == table->ctl_name) {
 			int error;
 			if (table->child) {
-				if (ctl_perm(table, 001))
+				if (sysctl_perm(table, 001))
 					return -EPERM;
 				name++;
 				nlen--;
@@ -1225,7 +1225,7 @@ int do_sysctl_strategy (ctl_table *table,
 		op |= 004;
 	if (newval) 
 		op |= 002;
-	if (ctl_perm(table, op))
+	if (sysctl_perm(table, op))
 		return -EPERM;
 
 	if (table->strategy) {
@@ -1495,7 +1495,7 @@ static ssize_t do_rw_proc(int write, struct file * file, char __user * buf,
 			goto out;
 		error = -EPERM;
 		op = (write ? 002 : 004);
-		if (ctl_perm(table, op))
+		if (sysctl_perm(table, op))
 			goto out;
 		
 		/* careful: calling conventions are nasty here */
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 17:05:25 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 17:05:29 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:12675 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S28580835AbXAPQmh (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:42:37 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGfdHo001093;
	Tue, 16 Jan 2007 09:41:39 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGfd41001092;
	Tue, 16 Jan 2007 09:41:39 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 54/59] sysctl: Remove support for directory strategy routines.
Date:	Tue, 16 Jan 2007 09:39:59 -0700
Message-Id: <11689656993630-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13666
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

parse_table has support for calling a strategy routine
when descending into a directory.  To date no one has
used this functionality and the /proc/sys interface has
no analog to it.

So no one is using this functionality kill it and make
the binary sysctl code easier to follow.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 kernel/sysctl.c |    8 --------
 1 files changed, 0 insertions(+), 8 deletions(-)

diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index e655b11..2c3703d 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -1171,14 +1171,6 @@ repeat:
 			if (table->child) {
 				if (ctl_perm(table, 001))
 					return -EPERM;
-				if (table->strategy) {
-					error = table->strategy(
-						table, name, nlen,
-						oldval, oldlenp,
-						newval, newlen);
-					if (error)
-						return error;
-				}
 				name++;
 				nlen--;
 				table = table->child;
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 17:05:52 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 17:05:57 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:14211 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S28580836AbXAPQmj (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:42:39 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGfcw3001089;
	Tue, 16 Jan 2007 09:41:38 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGfbli001088;
	Tue, 16 Jan 2007 09:41:37 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 53/59] sysctl: Remove support for CTL_ANY
Date:	Tue, 16 Jan 2007 09:39:58 -0700
Message-Id: <11689656972739-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13667
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

There are currently no users in the kernel for CTL_ANY and it
only has effect on the binary interface which is practically
unused.

So this complicates sysctl lookups for no good reason so just remove it.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 include/linux/sysctl.h |    1 -
 kernel/sysctl.c        |    2 +-
 2 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 63e1bac..c99e4bb 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -53,7 +53,6 @@ struct __sysctl_args {
 
 /* For internal pattern-matching use only: */
 #ifdef __KERNEL__
-#define CTL_ANY		-1	/* Matches any name */
 #define CTL_NONE	0
 #define CTL_UNNUMBERED	CTL_NONE	/* sysctl without a binary number */
 #endif
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 8da6647..e655b11 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -1166,7 +1166,7 @@ repeat:
 	for ( ; table->ctl_name || table->procname; table++) {
 		if (!table->ctl_name)
 			continue;
-		if (n == table->ctl_name || table->ctl_name == CTL_ANY) {
+		if (n == table->ctl_name) {
 			int error;
 			if (table->child) {
 				if (ctl_perm(table, 001))
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 17:06:20 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 17:06:23 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:14723 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S20041448AbXAPQmk (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:42:40 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGeXiE000933;
	Tue, 16 Jan 2007 09:40:33 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGeX18000932;
	Tue, 16 Jan 2007 09:40:33 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 16/59] sysctl: md Remove unnecessary insert_at_head flag
Date:	Tue, 16 Jan 2007 09:39:21 -0700
Message-Id: <1168965633112-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13668
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

The sysctls used by the md driver are have unique binary numbers
so remove the insert_at_head flag as it serves no useful purpose.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 drivers/md/md.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/md/md.c b/drivers/md/md.c
index d1cb45f..966e8be 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -5551,7 +5551,7 @@ static int __init md_init(void)
 			    md_probe, NULL, NULL);
 
 	register_reboot_notifier(&md_notifier);
-	raid_table_header = register_sysctl_table(raid_root_table, 1);
+	raid_table_header = register_sysctl_table(raid_root_table, 0);
 
 	md_geninit();
 	return (0);
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 17:06:47 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 17:06:51 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:16515 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S28580837AbXAPQml (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:42:41 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGeTio000921;
	Tue, 16 Jan 2007 09:40:29 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGeTeT000920;
	Tue, 16 Jan 2007 09:40:29 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 13/59] sysctl: xfs remove unnecessary insert_at_head flag
Date:	Tue, 16 Jan 2007 09:39:18 -0700
Message-Id: <11689656291632-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13669
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 fs/xfs/linux-2.6/xfs_sysctl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/xfs/linux-2.6/xfs_sysctl.c b/fs/xfs/linux-2.6/xfs_sysctl.c
index af24653..af777e9 100644
--- a/fs/xfs/linux-2.6/xfs_sysctl.c
+++ b/fs/xfs/linux-2.6/xfs_sysctl.c
@@ -149,7 +149,7 @@ STATIC ctl_table xfs_root_table[] = {
 void
 xfs_sysctl_register(void)
 {
-	xfs_table_header = register_sysctl_table(xfs_root_table, 1);
+	xfs_table_header = register_sysctl_table(xfs_root_table, 0);
 }
 
 void
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 17:07:14 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 17:07:19 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:26243 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S28580784AbXAPQmu (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:42:50 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGfogC001113;
	Tue, 16 Jan 2007 09:41:50 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGfm6c001112;
	Tue, 16 Jan 2007 09:41:48 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 59/59] sysctl: Remove the proc_dir_entry member for the sysctl tables.
Date:	Tue, 16 Jan 2007 09:40:04 -0700
Message-Id: <11689657081820-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13670
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

It isn't needed anymore, all of the users are gone, and all of the
ctl_table initializers have been converted to use explicit names
of the fields they are initializing.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 include/linux/sysctl.h |    1 -
 net/decnet/dn_dev.c    |    5 -----
 net/ipv4/devinet.c     |    5 -----
 net/ipv6/addrconf.c    |    5 -----
 4 files changed, 0 insertions(+), 16 deletions(-)

diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 20c23b5..8c2fab5 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -1025,7 +1025,6 @@ struct ctl_table
 	ctl_table *child;
 	proc_handler *proc_handler;	/* Callback for text formatting */
 	ctl_handler *strategy;		/* Callback function for all r/w */
-	struct proc_dir_entry *de;	/* /proc control block */
 	void *extra1;
 	void *extra2;
 };
diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c
index baaa02e..324eb47 100644
--- a/net/decnet/dn_dev.c
+++ b/net/decnet/dn_dev.c
@@ -261,7 +261,6 @@ static void dn_dev_sysctl_register(struct net_device *dev, struct dn_dev_parms *
 	for(i = 0; i < ARRAY_SIZE(t->dn_dev_vars) - 1; i++) {
 		long offset = (long)t->dn_dev_vars[i].data;
 		t->dn_dev_vars[i].data = ((char *)parms) + offset;
-		t->dn_dev_vars[i].de = NULL;
 	}
 
 	if (dev) {
@@ -273,13 +272,9 @@ static void dn_dev_sysctl_register(struct net_device *dev, struct dn_dev_parms *
 	}
 
 	t->dn_dev_dev[0].child = t->dn_dev_vars;
-	t->dn_dev_dev[0].de = NULL;
 	t->dn_dev_conf_dir[0].child = t->dn_dev_dev;
-	t->dn_dev_conf_dir[0].de = NULL;
 	t->dn_dev_proto_dir[0].child = t->dn_dev_conf_dir;
-	t->dn_dev_proto_dir[0].de = NULL;
 	t->dn_dev_root_dir[0].child = t->dn_dev_proto_dir;
-	t->dn_dev_root_dir[0].de = NULL;
 	t->dn_dev_vars[0].extra1 = (void *)dev;
 
 	t->sysctl_header = register_sysctl_table(t->dn_dev_root_dir);
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index b731a0c..8cfcc78 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -1573,7 +1573,6 @@ static void devinet_sysctl_register(struct in_device *in_dev,
 		return;
 	for (i = 0; i < ARRAY_SIZE(t->devinet_vars) - 1; i++) {
 		t->devinet_vars[i].data += (char *)p - (char *)&ipv4_devconf;
-		t->devinet_vars[i].de = NULL;
 	}
 
 	if (dev) {
@@ -1595,13 +1594,9 @@ static void devinet_sysctl_register(struct in_device *in_dev,
 
 	t->devinet_dev[0].procname    = dev_name;
 	t->devinet_dev[0].child	      = t->devinet_vars;
-	t->devinet_dev[0].de	      = NULL;
 	t->devinet_conf_dir[0].child  = t->devinet_dev;
-	t->devinet_conf_dir[0].de     = NULL;
 	t->devinet_proto_dir[0].child = t->devinet_conf_dir;
-	t->devinet_proto_dir[0].de    = NULL;
 	t->devinet_root_dir[0].child  = t->devinet_proto_dir;
-	t->devinet_root_dir[0].de     = NULL;
 
 	t->sysctl_header = register_sysctl_table(t->devinet_root_dir);
 	if (!t->sysctl_header)
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 791aaba..6aded83 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -3973,7 +3973,6 @@ static void addrconf_sysctl_register(struct inet6_dev *idev, struct ipv6_devconf
 		return;
 	for (i=0; t->addrconf_vars[i].data; i++) {
 		t->addrconf_vars[i].data += (char*)p - (char*)&ipv6_devconf;
-		t->addrconf_vars[i].de = NULL;
 		t->addrconf_vars[i].extra1 = idev; /* embedded; no ref */
 	}
 	if (dev) {
@@ -3996,13 +3995,9 @@ static void addrconf_sysctl_register(struct inet6_dev *idev, struct ipv6_devconf
 	t->addrconf_dev[0].procname = dev_name;
 
 	t->addrconf_dev[0].child = t->addrconf_vars;
-	t->addrconf_dev[0].de = NULL;
 	t->addrconf_conf_dir[0].child = t->addrconf_dev;
-	t->addrconf_conf_dir[0].de = NULL;
 	t->addrconf_proto_dir[0].child = t->addrconf_conf_dir;
-	t->addrconf_proto_dir[0].de = NULL;
 	t->addrconf_root_dir[0].child = t->addrconf_proto_dir;
-	t->addrconf_root_dir[0].de = NULL;
 
 	t->sysctl_header = register_sysctl_table(t->addrconf_root_dir);
 	if (t->sysctl_header == NULL)
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 17:07:42 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 17:07:47 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:30083 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S28580842AbXAPQmy (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:42:54 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGfmRv001109;
	Tue, 16 Jan 2007 09:41:48 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGfllc001108;
	Tue, 16 Jan 2007 09:41:47 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 58/59] sysctl: Reimplement the sysctl proc support
Date:	Tue, 16 Jan 2007 09:40:03 -0700
Message-Id: <11689657073389-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13671
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

With this change the sysctl inodes can be cached and
nothing needs to be done when removing a sysctl table.

For a costk of 2K code we will save about 4K of static tables
(when we remove de from ctl_table) and 70K in proc_dir_entries
that we will not allocate, or about half that on a 32bit arch.

The speed feels about the same, even though we can now cache
the sysctl dentries :(

We get the core advantage that we don't need to have a
1 to 1 mapping between ctl table entries and proc files.
Making it possible to have /proc/sys vary depending on
the namespace you are in.  The currently merged namespaces
don't have an issue here but the network namespace under
/proc/sys/net needs to have different directories depending
on which network adapters are visible.  By simply being
a cache different directories being visible depending
on who you are is trivial to implement.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 fs/proc/Makefile      |    2 +-
 fs/proc/inode.c       |    1 +
 fs/proc/internal.h    |    2 +
 fs/proc/proc_sysctl.c |  477 +++++++++++++++++++++++++++++++++++++++++++++++++
 fs/proc/root.c        |   10 +-
 init/main.c           |    4 -
 kernel/sysctl.c       |  182 -------------------
 7 files changed, 484 insertions(+), 194 deletions(-)

diff --git a/fs/proc/Makefile b/fs/proc/Makefile
index f6c7762..a6b3a8f 100644
--- a/fs/proc/Makefile
+++ b/fs/proc/Makefile
@@ -8,7 +8,7 @@ proc-y			:= nommu.o task_nommu.o
 proc-$(CONFIG_MMU)	:= mmu.o task_mmu.o
 
 proc-y       += inode.o root.o base.o generic.o array.o \
-		proc_tty.o proc_misc.o
+		proc_tty.o proc_misc.o proc_sysctl.o
 
 proc-$(CONFIG_PROC_KCORE)	+= kcore.o
 proc-$(CONFIG_PROC_VMCORE)	+= vmcore.o
diff --git a/fs/proc/inode.c b/fs/proc/inode.c
index e26945b..0ea8265 100644
--- a/fs/proc/inode.c
+++ b/fs/proc/inode.c
@@ -161,6 +161,7 @@ struct inode *proc_get_inode(struct super_block *sb, unsigned int ino,
 	if (!inode)
 		goto out_ino;
 
+	PROC_I(inode)->fd = 0;
 	PROC_I(inode)->pde = de;
 	if (de) {
 		if (de->mode) {
diff --git a/fs/proc/internal.h b/fs/proc/internal.h
index 987c773..3c9a305 100644
--- a/fs/proc/internal.h
+++ b/fs/proc/internal.h
@@ -11,6 +11,8 @@
 
 #include <linux/proc_fs.h>
 
+extern int proc_sys_init(void);
+
 struct vmalloc_info {
 	unsigned long	used;
 	unsigned long	largest_chunk;
diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
new file mode 100644
index 0000000..08a2e66
--- /dev/null
+++ b/fs/proc/proc_sysctl.c
@@ -0,0 +1,477 @@
+/*
+ * /proc/sys support
+ */
+
+#include <linux/sysctl.h>
+#include <linux/proc_fs.h>
+#include <linux/security.h>
+#include "internal.h"
+
+static struct dentry_operations proc_sys_dentry_operations;
+static const struct file_operations proc_sys_file_operations;
+static struct inode_operations proc_sys_inode_operations;
+
+static void proc_sys_refresh_inode(struct inode *inode, struct ctl_table *table)
+{
+	/* Refresh the cached information bits in the inode */
+	if (table) {
+		inode->i_uid = 0;
+		inode->i_gid = 0;
+		inode->i_mode = table->mode;
+		if (table->proc_handler) {
+			inode->i_mode |= S_IFREG;
+			inode->i_nlink = 1;
+		} else {
+			inode->i_mode |= S_IFDIR;
+			inode->i_nlink = 0;	/* It is too hard to figure out */
+		}
+	}
+}
+
+static struct inode *proc_sys_make_inode(struct inode *dir, struct ctl_table *table)
+{
+	struct inode *inode;
+	struct proc_inode *dir_ei, *ei;
+	int depth;
+
+	inode = new_inode(dir->i_sb);
+	if (!inode)
+		goto out;
+
+	/* A directory is always one deeper than it's parent */
+	dir_ei = PROC_I(dir);
+	depth = dir_ei->fd + 1;
+
+	ei = PROC_I(inode);
+	ei->fd = depth;
+	inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
+	inode->i_op = &proc_sys_inode_operations;
+	inode->i_fop = &proc_sys_file_operations;
+	proc_sys_refresh_inode(inode, table);
+out:
+	return inode;
+}
+
+static struct dentry *proc_sys_ancestor(struct dentry *dentry, int depth)
+{
+	for (;;) {
+		struct proc_inode *ei;
+
+		ei = PROC_I(dentry->d_inode);
+		if (ei->fd == depth)
+			break; /* found */
+
+		dentry = dentry->d_parent;
+	}
+	return dentry;
+}
+
+static struct ctl_table *proc_sys_lookup_table_one(struct ctl_table *table,
+							struct qstr *name)
+{
+	int len;
+	for ( ; table->ctl_name || table->procname; table++) {
+
+		if (!table->procname)
+			continue;
+
+		len = strlen(table->procname);
+		if (len != name->len)
+			continue;
+
+		if (memcmp(table->procname, name->name, len) != 0)
+			continue;
+
+		/* I have a match */
+		return table;
+	}
+	return NULL;
+}
+
+static struct ctl_table *proc_sys_lookup_table(struct dentry *dentry,
+						struct ctl_table *table)
+{
+	struct dentry *ancestor;
+	struct proc_inode *ei;
+	int depth, i;
+
+	ei = PROC_I(dentry->d_inode);
+	depth = ei->fd;
+
+	if (depth == 0)
+		return table;
+
+	for (i = 1; table && (i <= depth); i++) {
+		ancestor = proc_sys_ancestor(dentry, i);
+		table = proc_sys_lookup_table_one(table, &ancestor->d_name);
+		if (table)
+			table = table->child;
+	}
+	return table;
+
+}
+static struct ctl_table *proc_sys_lookup_entry(struct dentry *dparent,
+						struct qstr *name,
+						struct ctl_table *table)
+{
+	table = proc_sys_lookup_table(dparent, table);
+	if (table)
+		table = proc_sys_lookup_table_one(table, name);
+	return table;
+}
+
+static struct ctl_table *do_proc_sys_lookup(struct dentry *parent,
+						struct qstr *name,
+						struct ctl_table_header **ptr)
+{
+	struct ctl_table_header *head;
+	struct ctl_table *table;
+
+	for (head = sysctl_head_next(NULL); head; head = sysctl_head_next(head)) {
+		table = proc_sys_lookup_entry(parent, name, head->ctl_table);
+		if (table)
+			break;
+	}
+	*ptr = head;
+	return table;
+}
+
+static struct dentry *proc_sys_lookup(struct inode *dir, struct dentry *dentry,
+					struct nameidata *nd)
+{
+	struct ctl_table_header *head;
+	struct inode *inode;
+	struct dentry *err;
+	struct ctl_table *table;
+
+	err = ERR_PTR(-ENOENT);
+	table = do_proc_sys_lookup(dentry->d_parent, &dentry->d_name, &head);
+	if (!table)
+		goto out;
+
+	err = ERR_PTR(-ENOMEM);
+	inode = proc_sys_make_inode(dir, table);
+	if (!inode)
+		goto out;
+
+	err = NULL;
+	dentry->d_op = &proc_sys_dentry_operations;
+	d_add(dentry, inode);
+
+out:
+	sysctl_head_finish(head);
+	return err;
+}
+
+static ssize_t proc_sys_read(struct file *filp, char __user *buf,
+				size_t count, loff_t *ppos)
+{
+	struct dentry *dentry = filp->f_dentry;
+	struct ctl_table_header *head;
+	struct ctl_table *table;
+	ssize_t error, res;
+
+	table = do_proc_sys_lookup(dentry->d_parent, &dentry->d_name, &head);
+	/* Has the sysctl entry disappeared on us? */
+	error = -ENOENT;
+	if (!table)
+		goto out;
+
+	/* Has the sysctl entry been replaced by a directory? */
+	error = -EISDIR;
+	if (!table->proc_handler)
+		goto out;
+
+	/*
+	 * At this point we know that the sysctl was not unregistered
+	 * and won't be until we finish.
+	 */
+	error = -EPERM;
+	if (sysctl_perm(table, MAY_READ))
+		goto out;
+
+	/* careful: calling conventions are nasty here */
+	res = count;
+	error = table->proc_handler(table, 0, filp, buf, &res, ppos);
+	if (!error)
+		error = res;
+out:
+	sysctl_head_finish(head);
+
+	return error;
+}
+
+static ssize_t proc_sys_write(struct file *filp, const char __user *buf,
+				size_t count, loff_t *ppos)
+{
+	struct dentry *dentry = filp->f_dentry;
+	struct ctl_table_header *head;
+	struct ctl_table *table;
+	ssize_t error, res;
+
+	table = do_proc_sys_lookup(dentry->d_parent, &dentry->d_name, &head);
+	/* Has the sysctl entry disappeared on us? */
+	error = -ENOENT;
+	if (!table)
+		goto out;
+
+	/* Has the sysctl entry been replaced by a directory? */
+	error = -EISDIR;
+	if (!table->proc_handler)
+		goto out;
+
+	/*
+	 * At this point we know that the sysctl was not unregistered
+	 * and won't be until we finish.
+	 */
+	error = -EPERM;
+	if (sysctl_perm(table, MAY_WRITE))
+		goto out;
+
+	/* careful: calling conventions are nasty here */
+	res = count;
+	error = table->proc_handler(table, 1, filp, buf, &res, ppos);
+	if (!error)
+		error = res;
+out:
+	sysctl_head_finish(head);
+
+	return error;
+}
+
+
+static int proc_sys_fill_cache(struct file *filp, void *dirent,
+				filldir_t filldir, struct ctl_table *table)
+{
+	struct ctl_table_header *head;
+	struct ctl_table *child_table = NULL;
+	struct dentry *child, *dir = filp->f_path.dentry;
+	struct inode *inode;
+	struct qstr qname;
+	ino_t ino = 0;
+	unsigned type = DT_UNKNOWN;
+	int ret;
+
+	qname.name = table->procname;
+	qname.len  = strlen(table->procname);
+	qname.hash = full_name_hash(qname.name, qname.len);
+
+	/* Suppress duplicates.
+	 * Only fill a directory entry if it is the value that
+	 * an ordinary lookup of that name returns.  Hide all
+	 * others.
+	 *
+	 * If we ever cache this translation in the dcache
+	 * I should do a dcache lookup first.  But for now
+	 * it is just simpler not to.
+	 */
+	ret = 0;
+	child_table = do_proc_sys_lookup(dir, &qname, &head);
+	sysctl_head_finish(head);
+	if (child_table != table)
+		return 0;
+
+	child = d_lookup(dir, &qname);
+	if (!child) {
+		struct dentry *new;
+		new = d_alloc(dir, &qname);
+		if (new) {
+			inode = proc_sys_make_inode(dir->d_inode, table);
+			if (!inode)
+				child = ERR_PTR(-ENOMEM);
+			else {
+				new->d_op = &proc_sys_dentry_operations;
+				d_add(new, inode);
+			}
+			if (child)
+				dput(new);
+			else
+				child = new;
+		}
+	}
+	if (!child || IS_ERR(child) || !child->d_inode)
+		goto end_instantiate;
+	inode = child->d_inode;
+	if (inode) {
+		ino  = inode->i_ino;
+		type = inode->i_mode >> 12;
+	}
+	dput(child);
+end_instantiate:
+	if (!ino)
+		ino= find_inode_number(dir, &qname);
+	if (!ino)
+		ino = 1;
+	return filldir(dirent, qname.name, qname.len, filp->f_pos, ino, type);
+}
+
+static int proc_sys_readdir(struct file *filp, void *dirent, filldir_t filldir)
+{
+	struct dentry *dentry = filp->f_dentry;
+	struct inode *inode = dentry->d_inode;
+	struct ctl_table_header *head = NULL;
+	struct ctl_table *table;
+	unsigned long pos;
+	int ret;
+
+	ret = -ENOTDIR;
+	if (!S_ISDIR(inode->i_mode))
+		goto out;
+
+	ret = 0;
+	switch(filp->f_pos) {
+	case 0:
+		if (filldir(dirent, ".", 1, filp->f_pos, inode->i_ino, DT_DIR) < 0)
+			goto out;
+		filp->f_pos++;
+		/* fall through */
+	case 1:
+		if (filldir(dirent, "..", 2, filp->f_pos, parent_ino(dentry), DT_DIR) < 0)
+			goto out;
+		filp->f_pos++;
+		/* fall through */
+	default:
+		pos = 2;
+		break;
+	}
+
+	/* - Find each instance of the directory
+	 * - Read all entries in each instance
+	 * - Before returning an entry to user space lookup the entry
+	 *   by name and if I find a different entry don't return
+	 *   this one because it means it is a buried dup.
+	 * For sysctl this should only happen for directory entries.
+	 */
+	for (head = sysctl_head_next(NULL); head; head = sysctl_head_next(head)) {
+		table = proc_sys_lookup_table(dentry, head->ctl_table);
+
+		if (!table)
+			continue;
+
+		for (; table->ctl_name || table->procname; table++, pos++) {
+			/* Can't do anything without a proc name */
+			if (!table->procname)
+				continue;
+
+			if (pos < filp->f_pos)
+				continue;
+
+			if (proc_sys_fill_cache(filp, dirent, filldir, table) < 0)
+				goto out;
+			filp->f_pos = pos + 1;
+		}
+	}
+	ret = 1;
+out:
+	sysctl_head_finish(head);
+	return ret;
+}
+
+static int proc_sys_permission(struct inode *inode, int mask, struct nameidata *nd)
+{
+	/*
+	 * sysctl entries that are not writeable,
+	 * are _NOT_ writeable, capabilities or not.
+	 */
+	struct ctl_table_header *head;
+	struct ctl_table *table;
+	struct dentry *dentry;
+	int mode;
+	int depth;
+	int error;
+
+	head = NULL;
+	depth = PROC_I(inode)->fd;
+
+	/* First check the cached permissions, in case we don't have
+	 * enough information to lookup the sysctl table entry.
+	 */
+	error = -EACCES;
+	mode = inode->i_mode;
+
+	if (current->euid == 0)
+		mode >>= 6;
+	else if (in_group_p(0))
+		mode >>= 3;
+
+	if ((mode & mask & (MAY_READ|MAY_WRITE|MAY_EXEC)) == mask)
+		error = 0;
+
+	/* If we can't get a sysctl table entry the permission
+	 * checks on the cached mode will have to be enough.
+	 */
+	if (!nd || !depth)
+		goto out;
+
+	dentry = nd->dentry;
+	table = do_proc_sys_lookup(dentry->d_parent, &dentry->d_name, &head);
+
+	/* If the entry does not exist deny permission */
+	error = -EACCES;
+	if (!table)
+		goto out;
+
+	/* Use the permissions on the sysctl table entry */
+	error = sysctl_perm(table, mask);
+out:
+	sysctl_head_finish(head);
+	return error;
+}
+
+static int proc_sys_setattr(struct dentry *dentry, struct iattr *attr)
+{
+	struct inode *inode = dentry->d_inode;
+	int error;
+
+	if (attr->ia_valid & (ATTR_MODE | ATTR_UID | ATTR_GID))
+		return -EPERM;
+
+	error = inode_change_ok(inode, attr);
+	if (!error) {
+		error = security_inode_setattr(dentry, attr);
+		if (!error)
+			error = inode_setattr(inode, attr);
+	}
+
+	return error;
+}
+
+/* I'm lazy and don't distinguish between files and directories,
+ * until access time.
+ */
+static const struct file_operations proc_sys_file_operations = {
+	.read		= proc_sys_read,
+	.write		= proc_sys_write,
+	.readdir	= proc_sys_readdir,
+};
+
+static struct inode_operations proc_sys_inode_operations = {
+	.lookup		= proc_sys_lookup,
+	.permission	= proc_sys_permission,
+	.setattr	= proc_sys_setattr,
+};
+
+static int proc_sys_revalidate(struct dentry *dentry, struct nameidata *nd)
+{
+	struct ctl_table_header *head;
+	struct ctl_table *table;
+	table = do_proc_sys_lookup(dentry->d_parent, &dentry->d_name, &head);
+	proc_sys_refresh_inode(dentry->d_inode, table);
+	sysctl_head_finish(head);
+	return !!table;
+}
+
+static struct dentry_operations proc_sys_dentry_operations = {
+	.d_revalidate	= proc_sys_revalidate,
+};
+
+struct proc_dir_entry *proc_sys_root;
+
+int proc_sys_init(void)
+{
+	proc_sys_root = proc_mkdir("sys", NULL);
+	proc_sys_root->proc_iops = &proc_sys_inode_operations;
+	proc_sys_root->proc_fops = &proc_sys_file_operations;
+	proc_sys_root->nlink = 0;
+	return 0;
+}
diff --git a/fs/proc/root.c b/fs/proc/root.c
index 8059e92..4d42406 100644
--- a/fs/proc/root.c
+++ b/fs/proc/root.c
@@ -23,10 +23,6 @@
 
 struct proc_dir_entry *proc_net, *proc_net_stat, *proc_bus, *proc_root_fs, *proc_root_driver;
 
-#ifdef CONFIG_SYSCTL
-struct proc_dir_entry *proc_sys_root;
-#endif
-
 static int proc_get_sb(struct file_system_type *fs_type,
 	int flags, const char *dev_name, void *data, struct vfsmount *mnt)
 {
@@ -71,9 +67,6 @@ void __init proc_root_init(void)
 #ifdef CONFIG_SYSVIPC
 	proc_mkdir("sysvipc", NULL);
 #endif
-#ifdef CONFIG_SYSCTL
-	proc_sys_root = proc_mkdir("sys", NULL);
-#endif
 	proc_root_fs = proc_mkdir("fs", NULL);
 	proc_root_driver = proc_mkdir("driver", NULL);
 	proc_mkdir("fs/nfsd", NULL); /* somewhere for the nfsd filesystem to be mounted */
@@ -86,6 +79,9 @@ void __init proc_root_init(void)
 	proc_device_tree_init();
 #endif
 	proc_bus = proc_mkdir("bus", NULL);
+#ifdef CONFIG_SYSCTL
+	proc_sys_init();
+#endif
 }
 
 static int proc_root_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat
diff --git a/init/main.c b/init/main.c
index 8af5c6e..7926e5d 100644
--- a/init/main.c
+++ b/init/main.c
@@ -86,7 +86,6 @@ extern void init_IRQ(void);
 extern void fork_init(unsigned long);
 extern void mca_init(void);
 extern void sbus_init(void);
-extern void sysctl_init(void);
 extern void signals_init(void);
 extern void pidhash_init(void);
 extern void pidmap_init(void);
@@ -688,9 +687,6 @@ static void __init do_basic_setup(void)
 	usermodehelper_init();
 	driver_init();
 
-#ifdef CONFIG_SYSCTL
-	sysctl_init();
-#endif
 #ifdef CONFIG_PROC_FS
 	init_irq_proc();
 #endif
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index ec5e4a1..4b45bdb 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -159,26 +159,6 @@ int sysctl_legacy_va_layout;
 
 
 
-/* /proc declarations: */
-
-#ifdef CONFIG_PROC_SYSCTL
-
-static ssize_t proc_readsys(struct file *, char __user *, size_t, loff_t *);
-static ssize_t proc_writesys(struct file *, const char __user *, size_t, loff_t *);
-static int proc_opensys(struct inode *, struct file *);
-
-const struct file_operations proc_sys_file_operations = {
-	.open		= proc_opensys,
-	.read		= proc_readsys,
-	.write		= proc_writesys,
-};
-
-extern struct proc_dir_entry *proc_sys_root;
-
-static void register_proc_table(ctl_table *, struct proc_dir_entry *, void *);
-static void unregister_proc_table(ctl_table *, struct proc_dir_entry *);
-#endif
-
 /* The default sysctl tables: */
 
 static ctl_table root_table[] = {
@@ -1102,13 +1082,6 @@ struct ctl_table_header *sysctl_head_next(struct ctl_table_header *prev)
 	return NULL;
 }
 
-void __init sysctl_init(void)
-{
-#ifdef CONFIG_PROC_SYSCTL
-	register_proc_table(root_table, proc_sys_root, &root_table_header);
-#endif
-}
-
 #ifdef CONFIG_SYSCTL_SYSCALL
 int do_sysctl(int __user *name, int nlen, void __user *oldval, size_t __user *oldlenp,
 	       void __user *newval, size_t newlen)
@@ -1345,9 +1318,6 @@ struct ctl_table_header *register_sysctl_table(ctl_table * table)
 	spin_lock(&sysctl_lock);
 	list_add_tail(&tmp->ctl_entry, &root_table_header.ctl_entry);
 	spin_unlock(&sysctl_lock);
-#ifdef CONFIG_PROC_SYSCTL
-	register_proc_table(table, proc_sys_root, tmp);
-#endif
 	return tmp;
 }
 
@@ -1363,9 +1333,6 @@ void unregister_sysctl_table(struct ctl_table_header * header)
 	might_sleep();
 	spin_lock(&sysctl_lock);
 	start_unregistering(header);
-#ifdef CONFIG_PROC_SYSCTL
-	unregister_proc_table(header->ctl_table, proc_sys_root);
-#endif
 	spin_unlock(&sysctl_lock);
 	kfree(header);
 }
@@ -1389,155 +1356,6 @@ void unregister_sysctl_table(struct ctl_table_header * table)
 
 #ifdef CONFIG_PROC_SYSCTL
 
-/* Scan the sysctl entries in table and add them all into /proc */
-static void register_proc_table(ctl_table * table, struct proc_dir_entry *root, void *set)
-{
-	struct proc_dir_entry *de;
-	int len;
-	mode_t mode;
-	
-	for (; table->ctl_name || table->procname; table++) {
-		/* Can't do anything without a proc name. */
-		if (!table->procname)
-			continue;
-		/* Maybe we can't do anything with it... */
-		if (!table->proc_handler && !table->child) {
-			printk(KERN_WARNING "SYSCTL: Can't register %s\n",
-				table->procname);
-			continue;
-		}
-
-		len = strlen(table->procname);
-		mode = table->mode;
-
-		de = NULL;
-		if (table->proc_handler)
-			mode |= S_IFREG;
-		else {
-			mode |= S_IFDIR;
-			for (de = root->subdir; de; de = de->next) {
-				if (proc_match(len, table->procname, de))
-					break;
-			}
-			/* If the subdir exists already, de is non-NULL */
-		}
-
-		if (!de) {
-			de = create_proc_entry(table->procname, mode, root);
-			if (!de)
-				continue;
-			de->set = set;
-			de->data = (void *) table;
-			if (table->proc_handler)
-				de->proc_fops = &proc_sys_file_operations;
-		}
-		table->de = de;
-		if (de->mode & S_IFDIR)
-			register_proc_table(table->child, de, set);
-	}
-}
-
-/*
- * Unregister a /proc sysctl table and any subdirectories.
- */
-static void unregister_proc_table(ctl_table * table, struct proc_dir_entry *root)
-{
-	struct proc_dir_entry *de;
-	for (; table->ctl_name || table->procname; table++) {
-		if (!(de = table->de))
-			continue;
-		if (de->mode & S_IFDIR) {
-			if (!table->child) {
-				printk (KERN_ALERT "Help - malformed sysctl tree on free\n");
-				continue;
-			}
-			unregister_proc_table(table->child, de);
-
-			/* Don't unregister directories which still have entries.. */
-			if (de->subdir)
-				continue;
-		}
-
-		/*
-		 * In any case, mark the entry as goner; we'll keep it
-		 * around if it's busy, but we'll know to do nothing with
-		 * its fields.  We are under sysctl_lock here.
-		 */
-		de->data = NULL;
-
-		/* Don't unregister proc entries that are still being used.. */
-		if (atomic_read(&de->count))
-			continue;
-
-		table->de = NULL;
-		remove_proc_entry(table->procname, root);
-	}
-}
-
-static ssize_t do_rw_proc(int write, struct file * file, char __user * buf,
-			  size_t count, loff_t *ppos)
-{
-	int op;
-	struct proc_dir_entry *de = PDE(file->f_path.dentry->d_inode);
-	struct ctl_table *table;
-	size_t res;
-	ssize_t error = -ENOTDIR;
-	
-	spin_lock(&sysctl_lock);
-	if (de && de->data && use_table(de->set)) {
-		/*
-		 * at that point we know that sysctl was not unregistered
-		 * and won't be until we finish
-		 */
-		spin_unlock(&sysctl_lock);
-		table = (struct ctl_table *) de->data;
-		if (!table || !table->proc_handler)
-			goto out;
-		error = -EPERM;
-		op = (write ? 002 : 004);
-		if (sysctl_perm(table, op))
-			goto out;
-		
-		/* careful: calling conventions are nasty here */
-		res = count;
-		error = (*table->proc_handler)(table, write, file,
-						buf, &res, ppos);
-		if (!error)
-			error = res;
-	out:
-		spin_lock(&sysctl_lock);
-		unuse_table(de->set);
-	}
-	spin_unlock(&sysctl_lock);
-	return error;
-}
-
-static int proc_opensys(struct inode *inode, struct file *file)
-{
-	if (file->f_mode & FMODE_WRITE) {
-		/*
-		 * sysctl entries that are not writable,
-		 * are _NOT_ writable, capabilities or not.
-		 */
-		if (!(inode->i_mode & S_IWUSR))
-			return -EPERM;
-	}
-
-	return 0;
-}
-
-static ssize_t proc_readsys(struct file * file, char __user * buf,
-			    size_t count, loff_t *ppos)
-{
-	return do_rw_proc(0, file, buf, count, ppos);
-}
-
-static ssize_t proc_writesys(struct file * file, const char __user * buf,
-			     size_t count, loff_t *ppos)
-{
-	return do_rw_proc(1, file, (char __user *) buf, count, ppos);
-}
-
 static int _proc_do_string(void* data, int maxlen, int write,
 			   struct file *filp, void __user *buffer,
 			   size_t *lenp, loff_t *ppos)
-- 
1.4.4.1.g278f


From eric@ebiederm.dsl.xmission.com Tue Jan 16 17:08:11 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 17:08:15 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:58304 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S20046817AbXAPQqn (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:46:43 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0GGfBZ7001049;
	Tue, 16 Jan 2007 09:41:11 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0GGfAiB001048;
	Tue, 16 Jan 2007 09:41:10 -0700
From:	"Eric W. Biederman" <ebiederm@xmission.com>
To:	"<Andrew Morton" <akpm@osdl.org>
Cc:	<linux-kernel@vger.kernel.org>, <containers@lists.osdl.org>,
	<netdev@vger.kernel.org>, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	<tony.luck@intel.com>, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	<ak@suse.de>, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 44/59] sysctl: Register the sysctl number used by the arlan driver.
Date:	Tue, 16 Jan 2007 09:39:49 -0700
Message-Id: <1168965670476-git-send-email-ebiederm@xmission.com>
X-Mailer: git-send-email 1.5.0.rc1.gb60d
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Return-Path: <eric@ebiederm.dsl.xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13672
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 drivers/net/wireless/arlan-proc.c |    2 +-
 include/linux/sysctl.h            |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/arlan-proc.c b/drivers/net/wireless/arlan-proc.c
index 5fa9854..20499a6 100644
--- a/drivers/net/wireless/arlan-proc.c
+++ b/drivers/net/wireless/arlan-proc.c
@@ -1216,7 +1216,7 @@ static ctl_table arlan_table[MAX_ARLANS + 1] =
 static ctl_table arlan_root_table[] =
 {
 	{
-		.ctl_name	= 254,
+		.ctl_name	= CTL_ARLAN,
 		.procname	= "arlan",
 		.maxlen		= 0,
 		.mode		= 0555,
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 56d0161..f4ba72e 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -70,6 +70,7 @@ enum
 	CTL_BUS=8,		/* Busses */
 	CTL_ABI=9,		/* Binary emulation */
 	CTL_CPU=10,		/* CPU stuff (speed scaling, etc) */
+	CTL_ARLAN=254,		/* arlan wireless driver */
 	CTL_SUNRPC=7249,	/* sunrpc debug */
 	CTL_PM=9899,		/* frv power management */
 	CTL_FRV=9898,		/* frv specific sysctls */
-- 
1.4.4.1.g278f


From hpa@zytor.com Tue Jan 16 17:08:49 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 17:08:55 +0000 (GMT)
Received: from terminus.zytor.com ([192.83.249.54]:49115 "EHLO
	terminus.zytor.com") by ftp.linux-mips.org with ESMTP
	id S20046822AbXAPQ7q (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 16:59:46 +0000
Received: from [172.27.0.16] (c-67-180-238-27.hsd1.ca.comcast.net [67.180.238.27])
	(authenticated bits=0)
	by terminus.zytor.com (8.13.8/8.13.7) with ESMTP id l0GGrJBu000984
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Tue, 16 Jan 2007 08:53:20 -0800
Message-ID: <45AD02FF.605@zytor.com>
Date:	Tue, 16 Jan 2007 08:53:19 -0800
From:	"H. Peter Anvin" <hpa@zytor.com>
User-Agent: Thunderbird 1.5.0.9 (X11/20061219)
MIME-Version: 1.0
To:	"Eric W. Biederman" <ebiederm@xmission.com>
CC:	Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org,
	Linux Containers <containers@lists.osdl.org>,
	netdev@vger.kernel.org, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	tony.luck@intel.com, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	ak@suse.de, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com
Subject: Re: [PATCH 0/59] Cleanup sysctl
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: ClamAV 0.88.7/2457/Tue Jan 16 03:53:04 2007 on terminus.zytor.com
X-Virus-Status:	Clean
Return-Path: <hpa@zytor.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13673
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: hpa@zytor.com
Precedence: bulk
X-list: linux-mips

Eric W. Biederman wrote:
> 
> - Removal of sys_sysctl support where people had used conflicting sysctl
>   numbers. Trying to break glibc or other applications by changing the
>   ABI is not cool.  9 instances of this in the kernel seems a little
>   extreme.
> 

It would be highly advantageous if we could have a file that acts as a 
central registry of architectural sysctl numbers *and have the numbers 
in the kernel derived from there*.  As I've said before, I don't really 
think sys_sysctl is any worse than ad hoc system calls (sys_mips and the 
like), but the real problem is that there are architectural and 
non-archtectural numbers, and they're mixed in all over the place.

I think it would be fair to say that if they're not in <linux/sysctl.h> 
they're not architectural, but that doesn't resolve the counterpositive 
(are there sysctls in <linux/sysctl.h> which aren't architectural?  From 
the looks of it, I would say yes.)  Non-architectural sysctl numbers 
should not be exported to userspace, and should eventually be rejected 
by sys_sysctl.

	-hpa

From ralf@linux-mips.org Tue Jan 16 17:36:09 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 17:36:11 +0000 (GMT)
Received: from localhost.localdomain ([127.0.0.1]:16333 "EHLO
	dl5rb.ham-radio-op.net") by ftp.linux-mips.org with ESMTP
	id S20041549AbXAPRgJ (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 17:36:09 +0000
Received: from denk.linux-mips.net (denk.linux-mips.net [127.0.0.1])
	by dl5rb.ham-radio-op.net (8.13.8/8.13.8) with ESMTP id l0GHavV2009929;
	Tue, 16 Jan 2007 17:36:57 GMT
Received: (from ralf@localhost)
	by denk.linux-mips.net (8.13.8/8.13.8/Submit) id l0GHapnq009928;
	Tue, 16 Jan 2007 17:36:51 GMT
Date:	Tue, 16 Jan 2007 17:36:51 +0000
From:	Ralf Baechle <ralf@linux-mips.org>
To:	"Eric W. Biederman" <ebiederm@xmission.com>
Cc:	"<Andrew Morton" <akpm@osdl.org>, linux-kernel@vger.kernel.org,
	containers@lists.osdl.org, netdev@vger.kernel.org,
	xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	tony.luck@intel.com, linux-mips@linux-mips.org,
	schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com,
	linux390@de.ibm.com, linux-390@vm.marist.edu, paulus@samba.org,
	linuxppc-dev@ozlabs.org, lethal@linux-sh.org,
	linuxsh-shmedia-dev@lists.sourceforge.net, ak@suse.de,
	vojtech@suse.cz, clemens@ladisch.de, a.zummo@towertech.it,
	rtc-linux@googlegroups.com, linux-parport@lists.infradead.org,
	andrea@suse.de, tim@cyberelk.net, philb@gnu.org,
	aharkes@cs.cmu.edu, coda@cs.cmu.edu,
	codalist@TELEMANN.coda.cs.cmu.edu, aia21@cantab.net,
	linux-ntfs-dev@lists.sourceforge.net, mark.fasheh@oracle.com,
	kurt.hackel@oracle.com
Subject: Re: [PATCH 5/59] sysctl: rose remove unnecessary insert_at_head flag
Message-ID: <20070116173651.GA9184@linux-mips.org>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com> <11689656191854-git-send-email-ebiederm@xmission.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <11689656191854-git-send-email-ebiederm@xmission.com>
User-Agent: Mutt/1.4.2.2i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13674
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips

On Tue, Jan 16, 2007 at 09:39:10AM -0700, Eric W. Biederman wrote:

Looks ok, for these:

Subject: [PATCH 5/59] sysctl: rose remove unnecessary insert_at_head flag
Subject: [PATCH 6/59] sysctl: netrom remove unnecessary insert_at_head flag
Subject: [PATCH 11/59] sysctl: ax25 remove unnecessary insert_at_head flag
Subject: [PATCH 30/59] sysctl: mips/au1000 Remove sys_sysctl support
Subject: [PATCH 31/59] sysctl: C99 convert the ctl_tables in arch/mips/au1000/common/power.c
Subject: [PATCH 32/59] sysctl: C99 convert arch/mips/lasat/sysctl.c and remove ABI breakage.
Subject: [PATCH 43/59] sysctl: Remove sys_sysctl support from drivers/char/rtc.c
Subject: [PATCH 55/59] sysctl: Remove insert_at_head from register_sysctl

Acked-by: Ralf Baechle <ralf@linux-mips.org>

  Ralf

From James.Bottomley@SteelEye.com Tue Jan 16 18:20:23 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 18:20:27 +0000 (GMT)
Received: from hancock.steeleye.com ([71.30.118.248]:15819 "EHLO
	hancock.sc.steeleye.com") by ftp.linux-mips.org with ESMTP
	id S28581140AbXAPSUW (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 18:20:22 +0000
Received: from midgard.sc.steeleye.com (midgard.sc.steeleye.com [172.17.6.40])
	by hancock.sc.steeleye.com (8.11.6/8.11.6) with ESMTP id l0GIJZx27292;
	Tue, 16 Jan 2007 13:19:35 -0500
Subject: Re: [PATCH 20/59] sysctl: cdrom Don't set de->owner
From:	James Bottomley <James.Bottomley@SteelEye.com>
To:	"Eric W. Biederman" <ebiederm@xmission.com>
Cc:	"<Andrew Morton" <akpm@osdl.org>, linux-kernel@vger.kernel.org,
	containers@lists.osdl.org, netdev@vger.kernel.org,
	xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, minyard@acm.org,
	openipmi-developer@lists.sourceforge.net, tony.luck@intel.com,
	linux-mips@linux-mips.org, ralf@linux-mips.org,
	schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com,
	linux390@de.ibm.com, linux-390@vm.marist.edu, paulus@samba.org,
	linuxppc-dev@ozlabs.org, lethal@linux-sh.org,
	linuxsh-shmedia-dev@lists.sourceforge.net, ak@suse.de,
	vojtech@suse.cz, clemens@ladisch.de, a.zummo@towertech.it,
	rtc-linux@googlegroups.com, linux-parport@lists.infradead.org,
	andrea@suse.de, tim@cyberelk.net, philb@gnu.org,
	aharkes@cs.cmu.edu, coda@cs.cmu.edu,
	codalist@TELEMANN.coda.cs.cmu.edu, aia21@cantab.net,
	linux-ntfs-dev@lists.sourceforge.net, mark.fasheh@oracle.com,
	kurt.hackel@oracle.com
In-Reply-To: <11689656373737-git-send-email-ebiederm@xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
	 <11689656373737-git-send-email-ebiederm@xmission.com>
Content-Type: text/plain
Date:	Tue, 16 Jan 2007 12:19:34 -0600
Message-Id: <1168971574.2789.14.camel@mulgrave.il.steeleye.com>
Mime-Version: 1.0
X-Mailer: Evolution 2.6.3 (2.6.3-1.fc5.5) 
Content-Transfer-Encoding: 7bit
Return-Path: <James.Bottomley@SteelEye.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13675
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: James.Bottomley@SteelEye.com
Precedence: bulk
X-list: linux-mips

On Tue, 2007-01-16 at 09:39 -0700, Eric W. Biederman wrote:
> From: Eric W. Biederman <ebiederm@xmission.com> - unquoted

These three look OK:

[PATCH 15/59] sysctl: scsi remove unnecessary insert_at_head flag
[PATCH 19/59] sysctl: cdrom remove unnecessary insert_at_head flag
[PATCH 20/59] sysctl: cdrom Don't set de->owner

So you can add an ACK from me.

It would have been nice not to have 56 other irrelevant patches sprayed
over the list and into my inbox, though ...

James



From ralf@linux-mips.org Tue Jan 16 19:50:16 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 19:50:18 +0000 (GMT)
Received: from localhost.localdomain ([127.0.0.1]:24247 "EHLO
	dl5rb.ham-radio-op.net") by ftp.linux-mips.org with ESMTP
	id S28581646AbXAPTuQ (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 19:50:16 +0000
Received: from denk.linux-mips.net (denk.linux-mips.net [127.0.0.1])
	by dl5rb.ham-radio-op.net (8.13.8/8.13.8) with ESMTP id l0GJpFwd018916;
	Tue, 16 Jan 2007 19:51:15 GMT
Received: (from ralf@localhost)
	by denk.linux-mips.net (8.13.8/8.13.8/Submit) id l0GJpE0a018915;
	Tue, 16 Jan 2007 19:51:14 GMT
Date:	Tue, 16 Jan 2007 19:51:14 +0000
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc:	linux-mips@linux-mips.org
Subject: Re: [PATCH] kconfig: move some entries to appropriate menu
Message-ID: <20070116195114.GA18870@linux-mips.org>
References: <20070116.232911.126576645.anemo@mba.ocn.ne.jp>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20070116.232911.126576645.anemo@mba.ocn.ne.jp>
User-Agent: Mutt/1.4.2.2i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13676
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips

On Tue, Jan 16, 2007 at 11:29:11PM +0900, Atsushi Nemoto wrote:

> Currently KEXEC is in "Machine selection", SECCOMP, PM, APM are in
> "Executable file formats" menu.  Move KEXEC and SECCOMP to "Kernel
> type" and PM, APM to new "Power management options" menu.  Also
> replace "config PM" with kernel/power/Kconfig.

Queued - after fixing up all the whitespace rubbish in the patch.  I
also dropped the power managment bit since it conflicts with another
patchset I have pending.

  Ralf

From dhowells@redhat.com Tue Jan 16 20:03:21 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 20:03:26 +0000 (GMT)
Received: from mx1.redhat.com ([66.187.233.31]:11471 "EHLO mx1.redhat.com")
	by ftp.linux-mips.org with ESMTP id S28771850AbXAPUDV (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Tue, 16 Jan 2007 20:03:21 +0000
Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254])
	by mx1.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id l0GK2epX009674;
	Tue, 16 Jan 2007 15:02:40 -0500
Received: from warthog.cambridge.redhat.com (warthog.cambridge.redhat.com [172.16.18.73])
	by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l0GK2cwE008887;
	Tue, 16 Jan 2007 15:02:39 -0500
Received: from redhat.com (localhost.localdomain [127.0.0.1])
	by warthog.cambridge.redhat.com (8.13.8/8.13.8) with ESMTP id l0GK2LXQ032226;
	Tue, 16 Jan 2007 20:02:22 GMT
From:	David Howells <dhowells@redhat.com>
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com> 
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com> 
To:	ebiederm@xmission.com (Eric W. Biederman)
Cc:	Andrew Morton <akpm@osdl.org>, linux-mips@linux-mips.org,
	linux-parport@lists.infradead.org, heiko.carstens@de.ibm.com,
	ak@suse.de, linuxppc-dev@ozlabs.org, paulus@samba.org,
	aharkes@cs.cmu.edu, schwidefsky@de.ibm.com, tim@cyberelk.net,
	rtc-linux@googlegroups.com, linux-scsi@vger.kernel.org,
	kurt.hackel@oracle.com, coda@cs.cmu.edu, vojtech@suse.cz,
	linuxsh-shmedia-dev@lists.sourceforge.net,
	James.Bottomley@SteelEye.com, clemens@ladisch.de, xfs@oss.sgi.com,
	xfs-masters@oss.sgi.com, andrea@suse.de,
	openipmi-developer@lists.sourceforge.net, linux-390@vm.marist.edu,
	codalist@TELEMANN.coda.cs.cmu.edu, a.zummo@towertech.it,
	tony.luck@intel.com, linux-ntfs-dev@lists.sourceforge.net,
	netdev@vger.kernel.org, aia21@cantab.net,
	linux-kernel@vger.kernel.org, ralf@linux-mips.org,
	lethal@linux-sh.org, Linux Containers <containers@lists.osdl.org>,
	linux390@de.ibm.com, philb@gnu.org
Subject: Re: [PATCH 0/59] Cleanup sysctl 
X-Mailer: MH-E 8.0; nmh 1.1; GNU Emacs 22.0.50
Date:	Tue, 16 Jan 2007 20:02:21 +0000
Message-ID: <32225.1168977741@redhat.com>
Return-Path: <dhowells@redhat.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13677
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: dhowells@redhat.com
Precedence: bulk
X-list: linux-mips


The FRV bits look okay.  I can't test them until I get back from Australia in
Feb.

David

From mark.fasheh@oracle.com Tue Jan 16 20:40:05 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 20:40:11 +0000 (GMT)
Received: from rgminet01.oracle.com ([148.87.113.118]:14655 "EHLO
	rgminet01.oracle.com") by ftp.linux-mips.org with ESMTP
	id S28581782AbXAPUkF (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 20:40:05 +0000
Received: from rgmsgw02.us.oracle.com (rgmsgw02.us.oracle.com [138.1.186.52])
	by rgminet01.oracle.com (Switch-3.2.4/Switch-3.1.6) with ESMTP id l0GKbEF4026568;
	Tue, 16 Jan 2007 13:37:14 -0700
Received: from ca-server1.us.oracle.com (ca-server1.us.oracle.com [139.185.48.5])
	by rgmsgw02.us.oracle.com (Switch-3.2.4/Switch-3.2.4) with ESMTP id l0GKbB5o020122
	(version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO);
	Tue, 16 Jan 2007 13:37:11 -0700
Received: from mfasheh by ca-server1.us.oracle.com with local (Exim 4.63)
	(envelope-from <mark.fasheh@oracle.com>)
	id 1H6v3O-0004Wv-Sh; Tue, 16 Jan 2007 12:37:10 -0800
Date:	Tue, 16 Jan 2007 12:37:10 -0800
From:	Mark Fasheh <mark.fasheh@oracle.com>
To:	"Eric W. Biederman" <ebiederm@xmission.com>
Cc:	"<Andrew Morton" <akpm@osdl.org>, linux-kernel@vger.kernel.org,
	containers@lists.osdl.org, netdev@vger.kernel.org,
	xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	tony.luck@intel.com, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	ak@suse.de, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	kurt.hackel@oracle.com
Subject: Re: [PATCH 48/59] sysctl: Register the ocfs2 sysctl numbers
Message-ID: <20070116203710.GB6831@ca-server1.us.oracle.com>
Reply-To: Mark Fasheh <mark.fasheh@oracle.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com> <11689656823041-git-send-email-ebiederm@xmission.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <11689656823041-git-send-email-ebiederm@xmission.com>
Organization: Oracle Corporation
User-Agent: Mutt/1.5.11
X-Brightmail-Tracker: AAAAAQAAAAI=
X-Brightmail-Tracker: AAAAAQAAAAI=
X-Whitelist: TRUE
X-Whitelist: TRUE
Return-Path: <mark.fasheh@oracle.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13678
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: mark.fasheh@oracle.com
Precedence: bulk
X-list: linux-mips

On Tue, Jan 16, 2007 at 09:39:53AM -0700, Eric W. Biederman wrote:
> From: Eric W. Biederman <ebiederm@xmission.com> - unquoted
> 
> ocfs2 was did not have the binary number it uses under CTL_FS
> registered in sysctl.h.  Register it to avoid future conflicts,
> and change the name of the definition to be in line with the
> rest of the sysctl numbers.

This looks good - ACK.
	--Mark

--
Mark Fasheh
Senior Software Developer, Oracle
mark.fasheh@oracle.com

From lethal@linux-sh.org Tue Jan 16 22:08:38 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 22:08:43 +0000 (GMT)
Received: from smtp.ocgnet.org ([64.20.243.3]:28642 "EHLO smtp.ocgnet.org")
	by ftp.linux-mips.org with ESMTP id S28581964AbXAPWIi (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Tue, 16 Jan 2007 22:08:38 +0000
Received: from smtp.ocgnet.org (localhost [127.0.0.1])
	by smtp.ocgnet.org (Postfix) with ESMTP id 2B6075203FE;
	Tue, 16 Jan 2007 16:08:35 -0600 (CST)
Received: from master.linux-sh.org (124x34x33x190.ap124.ftth.ucom.ne.jp [124.34.33.190])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.ocgnet.org (Postfix) with ESMTP id 09CBC5203E0;
	Tue, 16 Jan 2007 16:08:34 -0600 (CST)
Received: from localhost (unknown [127.0.0.1])
	by master.linux-sh.org (Postfix) with ESMTP id E0A9164C7A;
	Tue, 16 Jan 2007 22:07:09 +0000 (UTC)
X-Virus-Scanned: amavisd-new at linux-sh.org
Received: from master.linux-sh.org ([127.0.0.1])
	by localhost (master.linux-sh.org [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id XJlX94V1oSl6; Wed, 17 Jan 2007 07:07:09 +0900 (JST)
Received: by master.linux-sh.org (Postfix, from userid 500)
	id 075F764C7C; Wed, 17 Jan 2007 07:07:09 +0900 (JST)
Date:	Wed, 17 Jan 2007 07:07:08 +0900
From:	Paul Mundt <lethal@linux-sh.org>
To:	"Eric W. Biederman" <ebiederm@xmission.com>
Cc:	"<Andrew Morton" <akpm@osdl.org>, linux-kernel@vger.kernel.org,
	containers@lists.osdl.org, netdev@vger.kernel.org,
	xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	tony.luck@intel.com, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	linuxsh-shmedia-dev@lists.sourceforge.net, ak@suse.de,
	vojtech@suse.cz, clemens@ladisch.de, a.zummo@towertech.it,
	rtc-linux@googlegroups.com, linux-parport@lists.infradead.org,
	andrea@suse.de, tim@cyberelk.net, philb@gnu.org,
	aharkes@cs.cmu.edu, coda@cs.cmu.edu,
	codalist@TELEMANN.coda.cs.cmu.edu, aia21@cantab.net,
	linux-ntfs-dev@lists.sourceforge.net, mark.fasheh@oracle.com,
	kurt.hackel@oracle.com
Subject: Re: [PATCH 37/59] sysctl: C99 convert arch/sh64/kernel/traps.c and remove ABI breakage.
Message-ID: <20070116220708.GA10821@linux-sh.org>
Mail-Followup-To: Paul Mundt <lethal@linux-sh.org>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	"<Andrew Morton" <akpm@osdl.org>, linux-kernel@vger.kernel.org,
	containers@lists.osdl.org, netdev@vger.kernel.org,
	xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	tony.luck@intel.com, linux-mips@linux-mips.org, ralf@linux-mips.org,
	schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com,
	linux390@de.ibm.com, linux-390@vm.marist.edu, paulus@samba.org,
	linuxppc-dev@ozlabs.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	ak@suse.de, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de, tim@cyberelk.net,
	philb@gnu.org, aharkes@cs.cmu.edu, coda@cs.cmu.edu,
	codalist@TELEMANN.coda.cs.cmu.edu, aia21@cantab.net,
	linux-ntfs-dev@lists.sourceforge.net, mark.fasheh@oracle.com,
	kurt.hackel@oracle.com
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com> <11689656622749-git-send-email-ebiederm@xmission.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <11689656622749-git-send-email-ebiederm@xmission.com>
User-Agent: Mutt/1.5.13 (2006-08-11)
X-Virus-Scanned: ClamAV using ClamSMTP
Return-Path: <lethal@linux-sh.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13679
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: lethal@linux-sh.org
Precedence: bulk
X-list: linux-mips

On Tue, Jan 16, 2007 at 09:39:42AM -0700, Eric W. Biederman wrote:
> From: Eric W. Biederman <ebiederm@xmission.com> - unquoted
> 
> While doing the C99 conversion I notices that the top level sh64
> directory was using the binary number for CTL_KERN.  That is a
> no-no so I removed the support for the sysctl binary interface
> only leaving sysctl /proc support.
> 
> At least the sysctl tables were placed at the end of
> the list so user space did not see this mistake.
> 
> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>

Looks good, thanks Eric.

Acked-by: Paul Mundt <lethal@linux-sh.org>

From ioe-lkml@rameria.de Tue Jan 16 22:16:04 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 22:16:10 +0000 (GMT)
Received: from smtprelay01.ispgateway.de ([80.67.18.13]:44238 "EHLO
	smtprelay01.ispgateway.de") by ftp.linux-mips.org with ESMTP
	id S28581980AbXAPWQE (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 22:16:04 +0000
Received: (qmail 25811 invoked from network); 16 Jan 2007 22:16:02 -0000
Received: from unknown (HELO p5483ff26.dip.t-dialin.net) (696817@[84.131.255.38])
          (envelope-sender <ioe-lkml@rameria.de>)
          by smtprelay01.ispgateway.de (qmail-ldap-1.03) with AES256-SHA encrypted SMTP
          for <ebiederm@xmission.com>; 16 Jan 2007 22:16:02 -0000
From:	Ingo Oeser <ioe-lkml@rameria.de>
To:	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: Re: [PATCH 45/59] sysctl: C99 convert ctl_tables in drivers/parport/procfs.c
Date:	Tue, 16 Jan 2007 23:15:43 +0100
User-Agent: KMail/1.9.5
Cc:	"<Andrew Morton" <akpm@osdl.org>, linux-kernel@vger.kernel.org,
	containers@lists.osdl.org, netdev@vger.kernel.org,
	xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@steeleye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	tony.luck@intel.com, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	ak@suse.de, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@telemann.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com> <11689656733768-git-send-email-ebiederm@xmission.com>
In-Reply-To: <11689656733768-git-send-email-ebiederm@xmission.com>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="iso-8859-15"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200701162315.56454.ioe-lkml@rameria.de>
Return-Path: <ioe-lkml@rameria.de>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13680
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ioe-lkml@rameria.de
Precedence: bulk
X-list: linux-mips

Hi Eric,

On Tuesday, 16. January 2007 17:39, Eric W. Biederman wrote:
> diff --git a/drivers/parport/procfs.c b/drivers/parport/procfs.c
> index 2e744a2..5337789 100644
> --- a/drivers/parport/procfs.c
> +++ b/drivers/parport/procfs.c
> @@ -263,50 +263,118 @@ struct parport_sysctl_table {
> +		{
> +			.ctl_name	= DEV_PARPORT_BASE_ADDR,
> +			.procname	= "base-addr",
> +			.data		= NULL,
> +			.maxlen		= 0,
> +			.mode		= 0444,
> +			.proc_handler	= &do_hardware_base_addr
> +		},

No need to initialize to zero or NULL. Just list any variable, which is NOT zero or NULL.

> +		{
> +			.ctl_name	= DEV_PARPORT_AUTOPROBE + 1,
> +			.procname	= "autoprobe0",
> +			.data		= NULL,
> +			.maxlen		= 0,
> +			.maxlen		= 0444,
> +			.proc_handler	=  &do_autoprobe
> +		},

Typo here? .mode = 0444 makes mor sense.

Regards

Ingo Oeser

From ioe-lkml@rameria.de Tue Jan 16 23:36:23 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 16 Jan 2007 23:36:28 +0000 (GMT)
Received: from smtprelay01.ispgateway.de ([80.67.18.13]:12424 "EHLO
	smtprelay01.ispgateway.de") by ftp.linux-mips.org with ESMTP
	id S20052741AbXAPXgX (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Tue, 16 Jan 2007 23:36:23 +0000
Received: (qmail 24212 invoked from network); 16 Jan 2007 23:36:22 -0000
Received: from unknown (HELO p5483d117.dip.t-dialin.net) (696817@[84.131.209.23])
          (envelope-sender <ioe-lkml@rameria.de>)
          by smtprelay01.ispgateway.de (qmail-ldap-1.03) with AES256-SHA encrypted SMTP
          for <ebiederm@xmission.com>; 16 Jan 2007 23:36:22 -0000
From:	Ingo Oeser <ioe-lkml@rameria.de>
To:	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: Re: [PATCH 31/59] sysctl: C99 convert the ctl_tables in arch/mips/au1000/common/power.c
Date:	Tue, 16 Jan 2007 23:20:17 +0100
User-Agent: KMail/1.9.5
Cc:	"<Andrew Morton" <akpm@osdl.org>, linux-kernel@vger.kernel.org,
	containers@lists.osdl.org, netdev@vger.kernel.org,
	xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@steeleye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	tony.luck@intel.com, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	ak@suse.de, vojtech@suse.cz, clemens@ladisch.de,
	a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-parport@lists.infradead.org, andrea@suse.de,
	tim@cyberelk.net, philb@gnu.org, aharkes@cs.cmu.edu,
	coda@cs.cmu.edu, codalist@telemann.coda.cs.cmu.edu,
	aia21@cantab.net, linux-ntfs-dev@lists.sourceforge.net,
	mark.fasheh@oracle.com, kurt.hackel@oracle.com
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com> <11689656551180-git-send-email-ebiederm@xmission.com>
In-Reply-To: <11689656551180-git-send-email-ebiederm@xmission.com>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="iso-8859-15"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200701162320.27961.ioe-lkml@rameria.de>
Return-Path: <ioe-lkml@rameria.de>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13681
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ioe-lkml@rameria.de
Precedence: bulk
X-list: linux-mips

Hi Eric,

On Tuesday, 16. January 2007 17:39, Eric W. Biederman wrote:
> diff --git a/arch/mips/au1000/common/power.c b/arch/mips/au1000/common/power.c
> index b531ab7..31256b8 100644
> --- a/arch/mips/au1000/common/power.c
> +++ b/arch/mips/au1000/common/power.c
> @@ -419,15 +419,41 @@ static int pm_do_freq(ctl_table * ctl, int write, struct file *file,

> +	{
> +		.ctl_name 	= CTL_UNNUMBERED,
> +		.procname	= "suspend",
> +		.data		= NULL,
> +		.maxlen		= 0,
> +		.mode		= 0600,
> +		.proc_handler	= &pm_do_suspend
> +	},

No need for zero initialization for maxlen.

> +	{
> +		.ctl_name	= CTL_UNNUMBERED,
> +		.procname	= "sleep",
> +		.data		= NULL,
> +		.maxlen		= 0,
> +		.mode		= 0600,
> +		.proc_handler	= &pm_do_sleep
> +	},

dito

> +	{
> +		.ctl_name	= CTL_UNNUMBERED,
> +		.procname	= "freq",
> +		.data		= NULL,
> +		.maxlen		= 0,
> +		.mode		= 0600,
> +		.proc_handler	= &pm_do_freq
> +	},
> +	{}
>  };

dito

Regards

Ingo Oeser

From benh@kernel.crashing.org Wed Jan 17 03:15:51 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 17 Jan 2007 03:15:55 +0000 (GMT)
Received: from gate.crashing.org ([63.228.1.57]:32973 "EHLO gate.crashing.org")
	by ftp.linux-mips.org with ESMTP id S20047332AbXAQDPv (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Wed, 17 Jan 2007 03:15:51 +0000
Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1])
	by gate.crashing.org (8.13.8/8.13.8) with ESMTP id l0H3EviD006666;
	Tue, 16 Jan 2007 21:15:01 -0600
Subject: Re: [PATCH 18/59] sysctl: ipmi remove unnecessary insert_at_head
	flag
From:	Benjamin Herrenschmidt <benh@kernel.crashing.org>
To:	"Eric W. Biederman" <ebiederm@xmission.com>
Cc:	"<Andrew Morton" <akpm@osdl.org>, linux-mips@linux-mips.org,
	linux-parport@lists.infradead.org, heiko.carstens@de.ibm.com,
	ak@suse.de, linuxppc-dev@ozlabs.org, paulus@samba.org,
	aharkes@cs.cmu.edu, schwidefsky@de.ibm.com, tim@cyberelk.net,
	rtc-linux@googlegroups.com, linux-scsi@vger.kernel.org,
	kurt.hackel@oracle.com, coda@cs.cmu.edu, vojtech@suse.cz,
	linuxsh-shmedia-dev@lists.sourceforge.net,
	James.Bottomley@SteelEye.com, clemens@ladisch.de, xfs@oss.sgi.com,
	xfs-masters@oss.sgi.com, andrea@suse.de,
	openipmi-developer@lists.sourceforge.net, linux-390@vm.marist.edu,
	codalist@TELEMANN.coda.cs.cmu.edu, a.zummo@towertech.it,
	tony.luck@intel.com, linux-ntfs-dev@lists.sourceforge.net,
	netdev@vger.kernel.org, aia21@cantab.net,
	linux-kernel@vger.kernel.org, ralf@linux-mips.org,
	lethal@linux-sh.org, containers@lists.osdl.org,
	linux390@de.ibm.com, philb@gnu.org
In-Reply-To: <1168965635875-git-send-email-ebiederm@xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
	 <1168965635875-git-send-email-ebiederm@xmission.com>
Content-Type: text/plain
Date:	Wed, 17 Jan 2007 14:14:54 +1100
Message-Id: <1169003694.4778.15.camel@localhost.localdomain>
Mime-Version: 1.0
X-Mailer: Evolution 2.8.1 
Content-Transfer-Encoding: 7bit
Return-Path: <benh@kernel.crashing.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13682
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: benh@kernel.crashing.org
Precedence: bulk
X-list: linux-mips

On Tue, 2007-01-16 at 09:39 -0700, Eric W. Biederman wrote:
> From: Eric W. Biederman <ebiederm@xmission.com> - unquoted
> 
> With unique sysctl binary numbers setting insert_at_head is pointless.
> 
> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>

Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

> ---
>  drivers/char/ipmi/ipmi_poweroff.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/char/ipmi/ipmi_poweroff.c b/drivers/char/ipmi/ipmi_poweroff.c
> index 9d23136..b3ae65e 100644
> --- a/drivers/char/ipmi/ipmi_poweroff.c
> +++ b/drivers/char/ipmi/ipmi_poweroff.c
> @@ -686,7 +686,7 @@ static int ipmi_poweroff_init (void)
>  		printk(KERN_INFO PFX "Power cycle is enabled.\n");
>  
>  #ifdef CONFIG_PROC_FS
> -	ipmi_table_header = register_sysctl_table(ipmi_root_table, 1);
> +	ipmi_table_header = register_sysctl_table(ipmi_root_table, 0);
>  	if (!ipmi_table_header) {
>  		printk(KERN_ERR PFX "Unable to register powercycle sysctl\n");
>  		rv = -ENOMEM;


From benh@kernel.crashing.org Wed Jan 17 03:17:07 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 17 Jan 2007 03:17:12 +0000 (GMT)
Received: from gate.crashing.org ([63.228.1.57]:57050 "EHLO gate.crashing.org")
	by ftp.linux-mips.org with ESMTP id S20047337AbXAQDRH (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Wed, 17 Jan 2007 03:17:07 +0000
Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1])
	by gate.crashing.org (8.13.8/8.13.8) with ESMTP id l0H3GTCA006697;
	Tue, 16 Jan 2007 21:16:30 -0600
Subject: Re: [PATCH 35/59] sysctl: C99 convert ctl_tables in
	arch/powerpc/kernel/idle.c
From:	Benjamin Herrenschmidt <benh@kernel.crashing.org>
To:	"Eric W. Biederman" <ebiederm@xmission.com>
Cc:	"<Andrew Morton" <akpm@osdl.org>, linux-mips@linux-mips.org,
	linux-parport@lists.infradead.org, heiko.carstens@de.ibm.com,
	ak@suse.de, linuxppc-dev@ozlabs.org, paulus@samba.org,
	aharkes@cs.cmu.edu, schwidefsky@de.ibm.com, tim@cyberelk.net,
	rtc-linux@googlegroups.com, linux-scsi@vger.kernel.org,
	kurt.hackel@oracle.com, coda@cs.cmu.edu, vojtech@suse.cz,
	linuxsh-shmedia-dev@lists.sourceforge.net,
	James.Bottomley@SteelEye.com, clemens@ladisch.de, xfs@oss.sgi.com,
	xfs-masters@oss.sgi.com, andrea@suse.de,
	openipmi-developer@lists.sourceforge.net, linux-390@vm.marist.edu,
	codalist@TELEMANN.coda.cs.cmu.edu, a.zummo@towertech.it,
	tony.luck@intel.com, linux-ntfs-dev@lists.sourceforge.net,
	netdev@vger.kernel.org, aia21@cantab.net,
	linux-kernel@vger.kernel.org, ralf@linux-mips.org,
	lethal@linux-sh.org, containers@lists.osdl.org,
	linux390@de.ibm.com, philb@gnu.org
In-Reply-To: <11689656593247-git-send-email-ebiederm@xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
	 <11689656593247-git-send-email-ebiederm@xmission.com>
Content-Type: text/plain
Date:	Wed, 17 Jan 2007 14:16:27 +1100
Message-Id: <1169003787.4778.17.camel@localhost.localdomain>
Mime-Version: 1.0
X-Mailer: Evolution 2.8.1 
Content-Transfer-Encoding: 7bit
Return-Path: <benh@kernel.crashing.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13683
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: benh@kernel.crashing.org
Precedence: bulk
X-list: linux-mips

On Tue, 2007-01-16 at 09:39 -0700, Eric W. Biederman wrote:
> From: Eric W. Biederman <ebiederm@xmission.com> - unquoted
> 
> This was partially done already and there was no ABI breakage what
> a relief.
> 
> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>

Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

> ---
>  arch/powerpc/kernel/idle.c |   11 ++++++++---
>  1 files changed, 8 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/powerpc/kernel/idle.c b/arch/powerpc/kernel/idle.c
> index 8994af3..8b27bb1 100644
> --- a/arch/powerpc/kernel/idle.c
> +++ b/arch/powerpc/kernel/idle.c
> @@ -110,11 +110,16 @@ static ctl_table powersave_nap_ctl_table[]={
>  		.mode		= 0644,
>  		.proc_handler	= &proc_dointvec,
>  	},
> -	{ 0, },
> +	{}
>  };
>  static ctl_table powersave_nap_sysctl_root[] = {
> -	{ 1, "kernel", NULL, 0, 0755, powersave_nap_ctl_table, },
> - 	{ 0,},
> +	{
> +		.ctl_name	= CTL_KERN,
> +		.procname	= "kernel",
> +		.mode		= 0755,
> +		.child		= powersave_nap_ctl_table,
> +	},
> +	{}
>  };
>  
>  static int __init


From benh@kernel.crashing.org Wed Jan 17 03:17:35 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 17 Jan 2007 03:17:38 +0000 (GMT)
Received: from gate.crashing.org ([63.228.1.57]:60890 "EHLO gate.crashing.org")
	by ftp.linux-mips.org with ESMTP id S20047325AbXAQDR1 (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Wed, 17 Jan 2007 03:17:27 +0000
Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1])
	by gate.crashing.org (8.13.8/8.13.8) with ESMTP id l0H3GtQY006707;
	Tue, 16 Jan 2007 21:16:56 -0600
Subject: Re: [PATCH 36/59] sysctl: C99 convert ctl_tables entries in
	arch/ppc/kernel/ppc_htab.c
From:	Benjamin Herrenschmidt <benh@kernel.crashing.org>
To:	"Eric W. Biederman" <ebiederm@xmission.com>
Cc:	"<Andrew Morton" <akpm@osdl.org>, linux-mips@linux-mips.org,
	linux-parport@lists.infradead.org, heiko.carstens@de.ibm.com,
	ak@suse.de, linuxppc-dev@ozlabs.org, paulus@samba.org,
	aharkes@cs.cmu.edu, schwidefsky@de.ibm.com, tim@cyberelk.net,
	rtc-linux@googlegroups.com, linux-scsi@vger.kernel.org,
	kurt.hackel@oracle.com, coda@cs.cmu.edu, vojtech@suse.cz,
	linuxsh-shmedia-dev@lists.sourceforge.net,
	James.Bottomley@SteelEye.com, clemens@ladisch.de, xfs@oss.sgi.com,
	xfs-masters@oss.sgi.com, andrea@suse.de,
	openipmi-developer@lists.sourceforge.net, linux-390@vm.marist.edu,
	codalist@TELEMANN.coda.cs.cmu.edu, a.zummo@towertech.it,
	tony.luck@intel.com, linux-ntfs-dev@lists.sourceforge.net,
	netdev@vger.kernel.org, aia21@cantab.net,
	linux-kernel@vger.kernel.org, ralf@linux-mips.org,
	lethal@linux-sh.org, containers@lists.osdl.org,
	linux390@de.ibm.com, philb@gnu.org
In-Reply-To: <11689656602523-git-send-email-ebiederm@xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
	 <11689656602523-git-send-email-ebiederm@xmission.com>
Content-Type: text/plain
Date:	Wed, 17 Jan 2007 14:16:54 +1100
Message-Id: <1169003814.4778.19.camel@localhost.localdomain>
Mime-Version: 1.0
X-Mailer: Evolution 2.8.1 
Content-Transfer-Encoding: 7bit
Return-Path: <benh@kernel.crashing.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13684
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: benh@kernel.crashing.org
Precedence: bulk
X-list: linux-mips

On Tue, 2007-01-16 at 09:39 -0700, Eric W. Biederman wrote:
> From: Eric W. Biederman <ebiederm@xmission.com> - unquoted
> 
> And make the mode of the kernel directory 0555 no one is allowed
> to write to sysctl directories.
> 
> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>

Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

> ---
>  arch/ppc/kernel/ppc_htab.c |   11 ++++++++---
>  1 files changed, 8 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/ppc/kernel/ppc_htab.c b/arch/ppc/kernel/ppc_htab.c
> index bd129d3..77b20ff 100644
> --- a/arch/ppc/kernel/ppc_htab.c
> +++ b/arch/ppc/kernel/ppc_htab.c
> @@ -442,11 +442,16 @@ static ctl_table htab_ctl_table[]={
>  		.mode		= 0644,
>  		.proc_handler	= &proc_dol2crvec,
>  	},
> -	{ 0, },
> +	{}
>  };
>  static ctl_table htab_sysctl_root[] = {
> -	{ 1, "kernel", NULL, 0, 0755, htab_ctl_table, },
> - 	{ 0,},
> +	{
> +		.ctl_name	= CTL_KERN,
> +		.procname	= "kernel",
> +		.mode		= 0555,
> +		.child		= htab_ctl_table,
> +	},
> +	{}
>  };
>  
>  static int __init


From ak@suse.de Wed Jan 17 04:27:29 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 17 Jan 2007 04:27:34 +0000 (GMT)
Received: from cantor2.suse.de ([195.135.220.15]:32196 "EHLO mx2.suse.de")
	by ftp.linux-mips.org with ESMTP id S20039090AbXAQE13 (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Wed, 17 Jan 2007 04:27:29 +0000
Received: from Relay1.suse.de (mail2.suse.de [195.135.221.8])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx2.suse.de (Postfix) with ESMTP id D913E218CA;
	Wed, 17 Jan 2007 05:27:10 +0100 (CET)
From:	Andi Kleen <ak@suse.de>
To:	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: Re: [PATCH 0/59] Cleanup sysctl
Date:	Wed, 17 Jan 2007 15:21:43 +1100
User-Agent: KMail/1.9.1
Cc:	Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org,
	Linux Containers <containers@lists.osdl.org>,
	netdev@vger.kernel.org, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@steeleye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	tony.luck@intel.com, linux-mips@linux-mips.org,
	ralf@linux-mips.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, linux390@de.ibm.com,
	linux-390@vm.marist.edu, paulus@samba.org, linuxppc-dev@ozlabs.org,
	lethal@linux-sh.org, linuxsh-shmedia-dev@lists.sourceforge.net,
	vojtech@suse.cz, clemens@ladisch.de, a.zummo@towertech.it,
	rtc-linux@googlegroups.com, linux-parport@lists.infradead.org,
	andrea@suse.de, tim@cyberelk.net, philb@gnu.org,
	aharkes@cs.cmu.edu, coda@cs.cmu.edu,
	codalist@telemann.coda.cs.cmu.edu, aia21@cantab.net,
	linux-ntfs-dev@lists.sourceforge.net, mark.fasheh@oracle.com,
	kurt.hackel@oracle.com
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200701171521.45323.ak@suse.de>
Return-Path: <ak@suse.de>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13685
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ak@suse.de
Precedence: bulk
X-list: linux-mips

On Wednesday 17 January 2007 03:33, Eric W. Biederman wrote:
> There has not been much maintenance on sysctl in years, and as a result is
> there is a lot to do to allow future interesting work to happen, and being
> ambitious I'm trying to do it all at once :)
>
> The patches in this series fall into several general categories.

[...]

The patches look good to me.

-Andi

From sachidananda.naik@ap.sony.com Wed Jan 17 07:14:45 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 17 Jan 2007 07:14:51 +0000 (GMT)
Received: from mail152.messagelabs.com ([216.82.253.19]:34180 "EHLO
	mail152.messagelabs.com") by ftp.linux-mips.org with ESMTP
	id S20039164AbXAQHOp (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Wed, 17 Jan 2007 07:14:45 +0000
X-VirusChecked:	Checked
X-Env-Sender: sachidananda.naik@ap.sony.com
X-Msg-Ref: server-13.tower-152.messagelabs.com!1169018072!2046510!1
X-StarScan-Version: 5.5.10.7; banners=-,-,-
X-Originating-IP: [121.100.32.134]
Received: (qmail 2661 invoked from network); 17 Jan 2007 07:14:36 -0000
Received: from sggdcex1ns01.sony.com.sg (HELO sggdcex1ns01.sony.com.sg) (121.100.32.134)
  by server-13.tower-152.messagelabs.com with DES-CBC3-SHA encrypted SMTP; 17 Jan 2007 07:14:36 -0000
Received: from sgsesgdcia01.sony.com.sg (sggdcwn1vs01 [43.68.8.23])
	by sggdcex1ns01.sony.com.sg (8.13.7+Sun/8.13.7) with SMTP id l0H7Chit027236;
	Wed, 17 Jan 2007 15:13:09 +0800 (SGT)
Received: from (seagw.sony.com.sg [43.68.8.1]) by sgsesgdcia01.sony.com.sg with smtp
	 id 7a18_203c6a3e_a5fa_11db_9dfa_001372631f16;
	Wed, 17 Jan 2007 15:12:43 +0800
Received: from sgapxbh04.ap.sony.com ([43.68.15.49])
	by sgsesgdcid01.sony.com.sg (8.13.7+Sun/8.13.7) with ESMTP id l0H7Chow009409;
	Wed, 17 Jan 2007 15:12:43 +0800 (SGT)
Received: from insardxms01.ap.sony.com ([43.88.102.10]) by sgapxbh04.ap.sony.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 17 Jan 2007 15:12:43 +0800
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----_=_NextPart_001_01C73A06.CF1DDAE3"
Subject: OSK ARM board automatic rebooting procedure...
Content-Transfer-Encoding: 7bit
content-class: urn:content-classes:message
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2826
Date:	Wed, 17 Jan 2007 12:42:12 +0530
Message-ID: <7CC0A4CCB789A841944E316301AD1538399C24@insardxms01.ap.sony.com>
Importance: normal
Priority: normal
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: OSK ARM board automatic rebooting procedure...
Thread-Index: Acc6B6XIRbvTKJVMTQuMquAX+AbQ5w==
From:	"Naik, Sachidananda" <sachidananda.naik@ap.sony.com>
To:	<linux-mips@linux-mips.org>, <linux-parport@lists.infradead.org>,
	<heiko.carstens@de.ibm.com>, <ak@suse.de>,
	<linuxppc-dev@ozlabs.org>, <paulus@samba.org>, <aharkes@cs.cmu.edu>
X-OriginalArrivalTime: 17 Jan 2007 07:12:43.0332 (UTC) FILETIME=[E1A61040:01C73A06]
Return-Path: <sachidananda.naik@ap.sony.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13686
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: sachidananda.naik@ap.sony.com
Precedence: bulk
X-list: linux-mips

This is a multi-part message in MIME format.

------_=_NextPart_001_01C73A06.CF1DDAE3
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Hi all,
=20
I'm trying to achieve automatic restarting of ARM Board : OMAP 5012 OSK
board. For that I found a link and I went through it.
=20
Here is the link that discusses about Ebony board reboot procedure ::
           =20

http://tree.celinuxforum.org/CelfPubWiki/TargetSwitchControlFromParallel
Port?action=3Dhighlight&value=3Dparallel+port
<http://tree.celinuxforum.org/CelfPubWiki/TargetSwitchControlFromParalle
lPort?action=3Dhighlight&value=3Dparallel+port>=20

In the link :

        1. They have taken DB25 connector ::=20

                            I'm not familiar with this device : Anybody
who knows better about this device please send some information abt it.

        2. They have used the parport device driver :

                            Inside the source file, parport.c in the
link , they are taking some addresses, I wan to kno abt those addresses.

        3. And In the module they have developed, the four pins are
there to connect on the target board, In the OMAP 5012 OSK board where
to connect these=20

            wires.

Please reply with some information.

Thanks and Regards

Sachidananda Naik



-------------------------------------------------------------------
This email is confidential and intended only for the use of the =
individual or entity named above and may contain information that is =
privileged. If you are not the intended recipient, you are notified that =
any dissemination, distribution or copying of this email is strictly =
prohibited. If you have received this email in error, please notify us =
immediately by return email or telephone and destroy the original =
message. - This mail is sent via Sony Asia Pacific Mail Gateway.
-------------------------------------------------------------------

------_=_NextPart_001_01C73A06.CF1DDAE3
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<META content=3D"MSHTML 6.00.2900.3020" name=3DGENERATOR></HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D765430807-17012007>Hi=20
all,</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D765430807-17012007></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D765430807-17012007>I'm =
trying to=20
achieve automatic restarting of ARM&nbsp;Board : OMAP&nbsp;5012 =
OSK&nbsp;board.=20
For that I found a link and I went through it.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D765430807-17012007></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D765430807-17012007>Here =
is the link=20
that discusses about Ebony board reboot =
procedure&nbsp;::</SPAN></FONT></DIV>
<DIV><FONT><SPAN class=3D765430807-17012007><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;=20
</FONT>
<P><A=20
href=3D"http://tree.celinuxforum.org/CelfPubWiki/TargetSwitchControlFromP=
arallelPort?action=3Dhighlight&amp;value=3Dparallel+port"><U><FONT=20
color=3D#0000ff><FONT face=3DArial=20
size=3D2>http://tree.celinuxforum.org/CelfPubWiki/TargetSwitchControlFrom=
ParallelPort?action=3Dhighlight&amp;value=3Dparallel+port</FONT></U></FON=
T></A></P>
<P><SPAN class=3D765430807-17012007><FONT face=3DArial size=3D2>In the =
link=20
:</FONT></SPAN></P>
<P><SPAN =
class=3D765430807-17012007>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
<FONT face=3DArial size=3D2>1. They have taken DB25 connector :: =
</FONT></SPAN></P>
<P><SPAN class=3D765430807-17012007><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;=20
I'm not familiar with this device : Anybody who knows better about this =
device=20
please send some information abt it.</FONT></SPAN></P>
<P><SPAN =
class=3D765430807-17012007>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
<FONT face=3DArial size=3D2>2. They have used the parport device driver=20
:</FONT></SPAN></P>
<P><SPAN=20
class=3D765430807-17012007>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
<FONT face=3DArial size=3D2>Inside the source file, parport.c in the =
link , they are=20
taking some addresses, I wan to kno abt those =
addresses.</FONT></SPAN></P>
<P><SPAN=20
class=3D765430807-17012007>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;3.&nbsp;<FONT=20
face=3DArial size=3D2>And In the module they have developed, the four =
pins are there=20
to connect on the target board, In the OMAP&nbsp;5012 OSK&nbsp;board =
where to=20
connect these </FONT></SPAN></P>
<P><SPAN=20
class=3D765430807-17012007>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;=20
<FONT face=3DArial size=3D2>wires.</FONT></SPAN></P>
<P><SPAN class=3D765430807-17012007><FONT face=3DArial size=3D2>Please =
reply with some=20
information.</FONT></SPAN></P>
<P><SPAN class=3D765430807-17012007><FONT face=3DArial size=3D2>Thanks =
and=20
Regards</FONT></SPAN></P>
<P><SPAN class=3D765430807-17012007><FONT face=3DArial =
size=3D2>Sachidananda=20
Naik</FONT></SPAN></P></SPAN></FONT></DIV><p></p><hr><br>This email is =
confidential and intended only for the use of the individual or entity =
named above and may contain information that is privileged. If you are =
not the intended recipient, you are notified that any dissemination, =
distribution or copying of this email is strictly prohibited. If you =
have received this email in error, please notify us immediately by =
return email or telephone and destroy the original message. - This mail =
is sent via Sony Asia Pacific Mail Gateway.<hr></BODY></HTML>

------_=_NextPart_001_01C73A06.CF1DDAE3--

From schwidefsky@de.ibm.com Wed Jan 17 12:10:18 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 17 Jan 2007 12:10:23 +0000 (GMT)
Received: from mtagate5.uk.ibm.com ([195.212.29.138]:7987 "EHLO
	mtagate5.uk.ibm.com") by ftp.linux-mips.org with ESMTP
	id S20042048AbXAQMKS (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Wed, 17 Jan 2007 12:10:18 +0000
Received: from d06nrmr1407.portsmouth.uk.ibm.com (d06nrmr1407.portsmouth.uk.ibm.com [9.149.38.185])
	by mtagate5.uk.ibm.com (8.13.8/8.13.8) with ESMTP id l0HCACft113842;
	Wed, 17 Jan 2007 12:10:12 GMT
Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228])
	by d06nrmr1407.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v8.2) with ESMTP id l0HCACI5753696;
	Wed, 17 Jan 2007 12:10:12 GMT
Received: from d06av02.portsmouth.uk.ibm.com (loopback [127.0.0.1])
	by d06av02.portsmouth.uk.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id l0HCAAww027104;
	Wed, 17 Jan 2007 12:10:12 GMT
Received: from dyn-9-152-216-78.boeblingen.de.ibm.com (dyn-9-152-216-78.boeblingen.de.ibm.com [9.152.216.78])
	by d06av02.portsmouth.uk.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id l0HCAAW9027077;
	Wed, 17 Jan 2007 12:10:10 GMT
Subject: Re: [PATCH 0/59] Cleanup sysctl
From:	Martin Schwidefsky <schwidefsky@de.ibm.com>
Reply-To: schwidefsky@de.ibm.com
To:	"Eric W. Biederman" <ebiederm@xmission.com>
Cc:	Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org,
	Linux Containers <containers@lists.osdl.org>,
	netdev@vger.kernel.org, xfs-masters@oss.sgi.com, xfs@oss.sgi.com,
	linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	tony.luck@intel.com, linux-mips@linux-mips.org,
	ralf@linux-mips.org, heiko.carstens@de.ibm.com,
	linux390@de.ibm.com, linux-390@vm.marist.edu, paulus@samba.org,
	linuxppc-dev@ozlabs.org, lethal@linux-sh.org,
	linuxsh-shmedia-dev@lists.sourceforge.net, ak@suse.de,
	vojtech@suse.cz, clemens@ladisch.de, a.zummo@towertech.it,
	rtc-linux@googlegroups.com, linux-parport@lists.infradead.org,
	andrea@suse.de, tim@cyberelk.net, philb@gnu.org,
	aharkes@cs.cmu.edu, coda@cs.cmu.edu,
	codalist@TELEMANN.coda.cs.cmu.edu, aia21@cantab.net,
	linux-ntfs-dev@lists.sourceforge.net, mark.fasheh@oracle.com,
	kurt.hackel@oracle.com
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Content-Type: text/plain
Organization: IBM Corporation
Date:	Wed, 17 Jan 2007 13:10:13 +0100
Message-Id: <1169035813.7711.7.camel@localhost>
Mime-Version: 1.0
X-Mailer: Evolution 2.6.3 
Content-Transfer-Encoding: 7bit
Return-Path: <schwidefsky@de.ibm.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13687
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: schwidefsky@de.ibm.com
Precedence: bulk
X-list: linux-mips

On Tue, 2007-01-16 at 09:33 -0700, Eric W. Biederman wrote:
> There has not been much maintenance on sysctl in years, and as a result is
> there is a lot to do to allow future interesting work to happen, and being
> ambitious I'm trying to do it all at once :)

s390 parts look good. Kernels boots and the system controls are still
working. I had to add an #include <linux/uaccess.h> to ipc/ipc_sysctl.c
to get the kernel compiled. That include should be added to patch #51.

Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com> for:
[PATCH 33/59] sysctl: s390 move sysctl definitions to sysctl.h
[PATCH 34/59] sysctl: s390 Remove unnecessary use of insert_at_head

and the s390 parts of 
[PATCH 55/59] sysctl: Remove insert_at_head from register_sysctl

-- 
blue skies,
  Martin.

Martin Schwidefsky
Linux for zSeries Development & Services
IBM Deutschland Entwicklung GmbH

"Reality continues to ruin my life." - Calvin.



From ralf@linux-mips.org Wed Jan 17 16:45:12 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 17 Jan 2007 16:45:14 +0000 (GMT)
Received: from localhost.localdomain ([127.0.0.1]:59327 "EHLO
	dl5rb.ham-radio-op.net") by ftp.linux-mips.org with ESMTP
	id S20053196AbXAQQpM (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Wed, 17 Jan 2007 16:45:12 +0000
Received: from denk.linux-mips.net (denk.linux-mips.net [127.0.0.1])
	by dl5rb.ham-radio-op.net (8.13.8/8.13.8) with ESMTP id l0HGkBrv001391;
	Wed, 17 Jan 2007 16:46:11 GMT
Received: (from ralf@localhost)
	by denk.linux-mips.net (8.13.8/8.13.8/Submit) id l0HGkARn001390;
	Wed, 17 Jan 2007 16:46:10 GMT
Date:	Wed, 17 Jan 2007 16:46:10 +0000
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Florian Fainelli <florian.fainelli@int-evry.fr>
Cc:	Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>,
	linux-mips@linux-mips.org
Subject: Re: [PATCH] Add support for Cobalt Server front LED
Message-ID: <20070117164610.GA1200@linux-mips.org>
References: <200701151936.57738.florian.fainelli@int-evry.fr> <20070116074205.0428449d.yoichi_yuasa@tripeaks.co.jp> <200701160033.10947.florian.fainelli@int-evry.fr> <200701160056.00748.florian.fainelli@int-evry.fr>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <200701160056.00748.florian.fainelli@int-evry.fr>
User-Agent: Mutt/1.4.2.2i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13688
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips

On Tue, Jan 16, 2007 at 12:56:00AM +0100, Florian Fainelli wrote:

> Answering back to myself, since I fixed the stuff using the COBALT_LED_PORT, 
> here the corrected patch. Can you queue this patch for a commit if it sounds 
> acceptable to you ?
> 
> Thank you very much in advance.

Signed-off???

> +void cobalt_led_set(struct led_classdev *led_cdev, enum led_brightness 
> brightness)

This function is only used locally so should be static.

  Ralf

From dev@sw.ru Wed Jan 17 16:52:20 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 17 Jan 2007 16:52:24 +0000 (GMT)
Received: from mailhub.sw.ru ([195.214.233.200]:7757 "EHLO relay.sw.ru")
	by ftp.linux-mips.org with ESMTP id S28575403AbXAQQwU (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Wed, 17 Jan 2007 16:52:20 +0000
Received: from [192.168.1.129] ([192.168.1.129])
	by relay.sw.ru (8.13.4/8.13.4) with ESMTP id l0HGqLY3002393;
	Wed, 17 Jan 2007 19:52:22 +0300 (MSK)
Message-ID: <45AE567C.3080706@sw.ru>
Date:	Wed, 17 Jan 2007 20:01:48 +0300
From:	Kirill Korotaev <dev@sw.ru>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.13) Gecko/20060417
X-Accept-Language: en-us, en, ru
MIME-Version: 1.0
To:	"Eric W. Biederman" <ebiederm@xmission.com>
CC:	"<Andrew Morton" <akpm@osdl.org>, James.Bottomley@SteelEye.com,
	linux-mips@linux-mips.org, linux-parport@lists.infradead.org,
	minyard@acm.org, rtc-linux@googlegroups.com, clemens@ladisch.de,
	heiko.carstens@de.ibm.com, xfs@oss.sgi.com,
	linuxppc-dev@ozlabs.org, paulus@samba.org,
	openipmi-developer@lists.sourceforge.net, linux-390@vm.marist.edu,
	schwidefsky@de.ibm.com, tim@cyberelk.net,
	codalist@TELEMANN.coda.cs.cmu.edu, a.zummo@towertech.it,
	tony.luck@intel.com, vojtech@suse.cz, linux-scsi@vger.kernel.org,
	xfs-masters@oss.sgi.com, linux-ntfs-dev@lists.sourceforge.net,
	netdev@vger.kernel.org, aia21@cantab.net, aharkes@cs.cmu.edu,
	linux-kernel@vger.kernel.org, ralf@linux-mips.org,
	mark.fasheh@oracle.com, coda@cs.cmu.edu, lethal@linux-sh.org,
	kurt.hackel@oracle.com, containers@lists.osdl.org,
	linux390@de.ibm.com, philb@gnu.org, andrea@suse.de,
	linuxsh-shmedia-dev@lists.sourceforge.net, ak@suse.de
Subject: Re: [PATCH 14/59] sysctl: C99 convert xfs ctl_tables
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com> <11689656301563-git-send-email-ebiederm@xmission.com>
In-Reply-To: <11689656301563-git-send-email-ebiederm@xmission.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Return-Path: <dev@sw.ru>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13689
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: dev@sw.ru
Precedence: bulk
X-list: linux-mips

minor extra space in table below...

Kirill

> From: Eric W. Biederman <ebiederm@xmission.com> - unquoted
> 
> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
> ---
>  fs/xfs/linux-2.6/xfs_sysctl.c |  258 ++++++++++++++++++++++++++++------------
>  1 files changed, 180 insertions(+), 78 deletions(-)
> 
> diff --git a/fs/xfs/linux-2.6/xfs_sysctl.c b/fs/xfs/linux-2.6/xfs_sysctl.c
> index af777e9..5a0eefc 100644
> --- a/fs/xfs/linux-2.6/xfs_sysctl.c
> +++ b/fs/xfs/linux-2.6/xfs_sysctl.c
> @@ -55,95 +55,197 @@ xfs_stats_clear_proc_handler(
>  #endif /* CONFIG_PROC_FS */
>  
>  STATIC ctl_table xfs_table[] = {
> -	{XFS_RESTRICT_CHOWN, "restrict_chown", &xfs_params.restrict_chown.val,
> -	sizeof(int), 0644, NULL, &proc_dointvec_minmax,
> -	&sysctl_intvec, NULL,
> -	&xfs_params.restrict_chown.min, &xfs_params.restrict_chown.max},
> -
> -	{XFS_SGID_INHERIT, "irix_sgid_inherit", &xfs_params.sgid_inherit.val,
> -	sizeof(int), 0644, NULL, &proc_dointvec_minmax,
> -	&sysctl_intvec, NULL,
> -	&xfs_params.sgid_inherit.min, &xfs_params.sgid_inherit.max},
> -
> -	{XFS_SYMLINK_MODE, "irix_symlink_mode", &xfs_params.symlink_mode.val,
> -	sizeof(int), 0644, NULL, &proc_dointvec_minmax,
> -	&sysctl_intvec, NULL,
> -	&xfs_params.symlink_mode.min, &xfs_params.symlink_mode.max},
> -
> -	{XFS_PANIC_MASK, "panic_mask", &xfs_params.panic_mask.val,
> -	sizeof(int), 0644, NULL, &proc_dointvec_minmax,
> -	&sysctl_intvec, NULL,
> -	&xfs_params.panic_mask.min, &xfs_params.panic_mask.max},
> -
> -	{XFS_ERRLEVEL, "error_level", &xfs_params.error_level.val,
> -	sizeof(int), 0644, NULL, &proc_dointvec_minmax,
> -	&sysctl_intvec, NULL,
> -	&xfs_params.error_level.min, &xfs_params.error_level.max},
> -
> -	{XFS_SYNCD_TIMER, "xfssyncd_centisecs", &xfs_params.syncd_timer.val,
> -	sizeof(int), 0644, NULL, &proc_dointvec_minmax,
> -	&sysctl_intvec, NULL,
> -	&xfs_params.syncd_timer.min, &xfs_params.syncd_timer.max},
> -
> -	{XFS_INHERIT_SYNC, "inherit_sync", &xfs_params.inherit_sync.val,
> -	sizeof(int), 0644, NULL, &proc_dointvec_minmax,
> -	&sysctl_intvec, NULL,
> -	&xfs_params.inherit_sync.min, &xfs_params.inherit_sync.max},
> -
> -	{XFS_INHERIT_NODUMP, "inherit_nodump", &xfs_params.inherit_nodump.val,
> -	sizeof(int), 0644, NULL, &proc_dointvec_minmax,
> -	&sysctl_intvec, NULL,
> -	&xfs_params.inherit_nodump.min, &xfs_params.inherit_nodump.max},
> -
> -	{XFS_INHERIT_NOATIME, "inherit_noatime", &xfs_params.inherit_noatim.val,
> -	sizeof(int), 0644, NULL, &proc_dointvec_minmax,
> -	&sysctl_intvec, NULL,
> -	&xfs_params.inherit_noatim.min, &xfs_params.inherit_noatim.max},
> -
> -	{XFS_BUF_TIMER, "xfsbufd_centisecs", &xfs_params.xfs_buf_timer.val,
> -	sizeof(int), 0644, NULL, &proc_dointvec_minmax,
> -	&sysctl_intvec, NULL,
> -	&xfs_params.xfs_buf_timer.min, &xfs_params.xfs_buf_timer.max},
> -
> -	{XFS_BUF_AGE, "age_buffer_centisecs", &xfs_params.xfs_buf_age.val,
> -	sizeof(int), 0644, NULL, &proc_dointvec_minmax,
> -	&sysctl_intvec, NULL,
> -	&xfs_params.xfs_buf_age.min, &xfs_params.xfs_buf_age.max},
> -
> -	{XFS_INHERIT_NOSYM, "inherit_nosymlinks", &xfs_params.inherit_nosym.val,
> -	sizeof(int), 0644, NULL, &proc_dointvec_minmax,
> -	&sysctl_intvec, NULL,
> -	&xfs_params.inherit_nosym.min, &xfs_params.inherit_nosym.max},
> -
> -	{XFS_ROTORSTEP, "rotorstep", &xfs_params.rotorstep.val,
> -	sizeof(int), 0644, NULL, &proc_dointvec_minmax,
> -	&sysctl_intvec, NULL,
> -	&xfs_params.rotorstep.min, &xfs_params.rotorstep.max},
> -
> -	{XFS_INHERIT_NODFRG, "inherit_nodefrag", &xfs_params.inherit_nodfrg.val,
> -	sizeof(int), 0644, NULL, &proc_dointvec_minmax,
> -	&sysctl_intvec, NULL,
> -	&xfs_params.inherit_nodfrg.min, &xfs_params.inherit_nodfrg.max},
> +	{
> +		.ctl_name	= XFS_RESTRICT_CHOWN,
> +		.procname	= "restrict_chown",
> +		.data		= &xfs_params.restrict_chown.val,
> +		.maxlen		= sizeof(int),
> +		.mode		= 0644,
> +		.proc_handler	= &proc_dointvec_minmax,
> +		.strategy	= &sysctl_intvec,
> +		.extra1		= &xfs_params.restrict_chown.min,
> +		.extra2		= &xfs_params.restrict_chown.max
> +	},
> +	{
> +		.ctl_name	= XFS_SGID_INHERIT,
> +		.procname	= "irix_sgid_inherit",
> +		.data		= &xfs_params.sgid_inherit.val,
> +		.maxlen		= sizeof(int),
> +		.mode		= 0644,
> +		.proc_handler	= &proc_dointvec_minmax,
> +		.strategy	= &sysctl_intvec,
> +		.extra1		= &xfs_params.sgid_inherit.min,
> +		.extra2		= &xfs_params.sgid_inherit.max
> +	},
> +	{
> +		.ctl_name	= XFS_SYMLINK_MODE,
> +		.procname	= "irix_symlink_mode",
> +		.data		= &xfs_params.symlink_mode.val,
> +		.maxlen		= sizeof(int),
> +		.mode		= 0644,
> +		.proc_handler	= &proc_dointvec_minmax,
> +		.strategy	= &sysctl_intvec,
> +		.extra1		= &xfs_params.symlink_mode.min,
> +		.extra2		= &xfs_params.symlink_mode.max
> +	},
> +	{
> +		.ctl_name	= XFS_PANIC_MASK,
> +		.procname	= "panic_mask",
> +		.data		= &xfs_params.panic_mask.val,
> +		.maxlen		= sizeof(int),
> +		.mode		= 0644,
> +		.proc_handler	=  &proc_dointvec_minmax,
> +		.strategy	= &sysctl_intvec,
> +		.extra1		= &xfs_params.panic_mask.min,
> +		.extra2		= &xfs_params.panic_mask.max
> +	},
>  
> +	{
> +		.ctl_name	= XFS_ERRLEVEL,
> +		.procname	= "error_level",
> +		.data		= &xfs_params.error_level.val,
> +		.maxlen		= sizeof(int),
> +		.mode		= 0644,
> +		.proc_handler	= &proc_dointvec_minmax,
> +		.strategy	= &sysctl_intvec,
> +		.extra1		= &xfs_params.error_level.min,
> +		.extra2		= &xfs_params.error_level.max
> +	},
> +	{
> +		.ctl_name	= XFS_SYNCD_TIMER,
> +		.procname	= "xfssyncd_centisecs",
> +		.data		= &xfs_params.syncd_timer.val,
> +		.maxlen		= sizeof(int),
> +		.mode		= 0644,
> +		.proc_handler	= &proc_dointvec_minmax,
> +		.strategy	= &sysctl_intvec,
> +		.extra1		= &xfs_params.syncd_timer.min,
> +		.extra2		= &xfs_params.syncd_timer.max
> +	},
> +	{
> +		.ctl_name	= XFS_INHERIT_SYNC,
> +		.procname	= "inherit_sync",
> +		.data		= &xfs_params.inherit_sync.val,
> +		.maxlen		= sizeof(int),
> +		.mode		= 0644,
> +		.proc_handler	= &proc_dointvec_minmax,
> +		.strategy	= &sysctl_intvec,
> +		.extra1		= &xfs_params.inherit_sync.min,
> +		.extra2		= &xfs_params.inherit_sync.max
> +	},
> +	{
> +		.ctl_name	= XFS_INHERIT_NODUMP,
> +		.procname	= "inherit_nodump",
> +		.data		= &xfs_params.inherit_nodump.val,
> +		.maxlen		= sizeof(int),
> +		.mode		= 0644,
> +		.proc_handler	= &proc_dointvec_minmax,
> +		.strategy	= &sysctl_intvec, NULL,
> +		.extra1		= &xfs_params.inherit_nodump.min,
> +		.extra2		= &xfs_params.inherit_nodump.max
> +	},
> +	{
> +		.ctl_name	= XFS_INHERIT_NOATIME,
> +		.procname	= "inherit_noatime",
> +		.data		= &xfs_params.inherit_noatim.val,
> +		.maxlen		= sizeof(int),
> +		.mode		= 0644,
> +		.proc_handler	= &proc_dointvec_minmax,
> +		.strategy	= &sysctl_intvec, NULL,
> +		.extra1		= &xfs_params.inherit_noatim.min,
> +		.extra2		= &xfs_params.inherit_noatim.max
> +	},
> +	{
> +		.ctl_name	= XFS_BUF_TIMER,
> +		.procname	= "xfsbufd_centisecs",
> +		.data		= &xfs_params.xfs_buf_timer.val,
> +		.maxlen		= sizeof(int),
> +		.mode		= 0644,
> +		.proc_handler	= &proc_dointvec_minmax,
> +		.strategy	= &sysctl_intvec,
> +		.extra1		= &xfs_params.xfs_buf_timer.min,
> +		.extra2		= &xfs_params.xfs_buf_timer.max
> +	},
> +	{
> +		.ctl_name	= XFS_BUF_AGE,
> +		.procname	= "age_buffer_centisecs",
> +		.data		= &xfs_params.xfs_buf_age.val,
> +		.maxlen		= sizeof(int),
> +		.mode		= 0644,
> +		.proc_handler	= &proc_dointvec_minmax,
> +		.strategy	= &sysctl_intvec, NULL,
> +		.extra1		= &xfs_params.xfs_buf_age.min,
> +		.extra2		= &xfs_params.xfs_buf_age.max
> +	},
> +	{
> +		.ctl_name	= XFS_INHERIT_NOSYM,
> +		.procname	= "inherit_nosymlinks",
> +		.data		= &xfs_params.inherit_nosym.val,
> +		.maxlen		= sizeof(int),
> +		.mode		= 0644,
> +		.proc_handler	= &proc_dointvec_minmax,
> +		.strategy	= &sysctl_intvec,
> +		.extra1		= &xfs_params.inherit_nosym.min,
> +		.extra2		= &xfs_params.inherit_nosym.max
> +	},
> +	{
> +		.ctl_name	= XFS_ROTORSTEP,
> +		.procname	= "rotorstep",
> +		.data		= &xfs_params.rotorstep.val,
> +		.maxlen		= sizeof(int),
> +		.mode		= 0644,
> +		.proc_handler	= &proc_dointvec_minmax,
> +		.strategy	= &sysctl_intvec,
> +		.extra1		= &xfs_params.rotorstep.min,
> +		.extra2		= &xfs_params.rotorstep.max
> +	},
> +	{
> +		.ctl_name	= XFS_INHERIT_NODFRG,
> +		.procname	= "inherit_nodefrag",
> +		.data		= &xfs_params.inherit_nodfrg.val,
> +		.maxlen		= sizeof(int),
> +		.mode		= 0644,
> +		.proc_handler	= &proc_dointvec_minmax,
> +		.strategy	= &sysctl_intvec,
> +		.extra1		= &xfs_params.inherit_nodfrg.min,
> +		.extra2		= &xfs_params.inherit_nodfrg.max
> +	},
>  	/* please keep this the last entry */
>  #ifdef CONFIG_PROC_FS
> -	{XFS_STATS_CLEAR, "stats_clear", &xfs_params.stats_clear.val,
> -	sizeof(int), 0644, NULL, &xfs_stats_clear_proc_handler,
> -	&sysctl_intvec, NULL,
> -	&xfs_params.stats_clear.min, &xfs_params.stats_clear.max},
> +	{
> +		.ctl_name	= XFS_STATS_CLEAR,
> +		.procname	= "stats_clear",
> +		.data		= &xfs_params.stats_clear.val,
> +		.maxlen		= sizeof(int),
> +		.mode		= 0644,
> +		.proc_handler	=  &xfs_stats_clear_proc_handler,
<<< minor. extra space.
> +		.strategy	= &sysctl_intvec,
> +		.extra1		= &xfs_params.stats_clear.min,
> +		.extra2		= &xfs_params.stats_clear.max
> +	},
>  #endif /* CONFIG_PROC_FS */
>  
> -	{0}
> +	{}
>  };
>  
>  STATIC ctl_table xfs_dir_table[] = {
> -	{FS_XFS, "xfs", NULL, 0, 0555, xfs_table},
> -	{0}
> +	{
> +		.ctl_name	= FS_XFS,
> +		.procname	= "xfs",
> +		.mode		= 0555,
> +		.child		= xfs_table
> +	},
> +	{}
>  };
>  
>  STATIC ctl_table xfs_root_table[] = {
> -	{CTL_FS, "fs",  NULL, 0, 0555, xfs_dir_table},
> -	{0}
> +	{
> +		.ctl_name	= CTL_FS,
> +		.procname	= "fs",
> +		.mode		= 0555,
> +		.child		= xfs_dir_table
> +	},
> +	{}
>  };
>  
>  void


From dev@sw.ru Wed Jan 17 17:04:45 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 17 Jan 2007 17:04:49 +0000 (GMT)
Received: from mailhub.sw.ru ([195.214.233.200]:22571 "EHLO relay.sw.ru")
	by ftp.linux-mips.org with ESMTP id S20042496AbXAQREp (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Wed, 17 Jan 2007 17:04:45 +0000
Received: from [192.168.1.129] ([192.168.1.129])
	by relay.sw.ru (8.13.4/8.13.4) with ESMTP id l0HH4nf2002966;
	Wed, 17 Jan 2007 20:04:50 +0300 (MSK)
Message-ID: <45AE5969.8030603@sw.ru>
Date:	Wed, 17 Jan 2007 20:14:17 +0300
From:	Kirill Korotaev <dev@sw.ru>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.13) Gecko/20060417
X-Accept-Language: en-us, en, ru
MIME-Version: 1.0
To:	"Eric W. Biederman" <ebiederm@xmission.com>
CC:	"<Andrew Morton" <akpm@osdl.org>, James.Bottomley@SteelEye.com,
	linux-mips@linux-mips.org, linux-parport@lists.infradead.org,
	minyard@acm.org, rtc-linux@googlegroups.com, clemens@ladisch.de,
	heiko.carstens@de.ibm.com, xfs@oss.sgi.com,
	linuxppc-dev@ozlabs.org, paulus@samba.org,
	openipmi-developer@lists.sourceforge.net, linux-390@vm.marist.edu,
	schwidefsky@de.ibm.com, tim@cyberelk.net,
	codalist@TELEMANN.coda.cs.cmu.edu, a.zummo@towertech.it,
	tony.luck@intel.com, vojtech@suse.cz, linux-scsi@vger.kernel.org,
	xfs-masters@oss.sgi.com, linux-ntfs-dev@lists.sourceforge.net,
	netdev@vger.kernel.org, aia21@cantab.net, aharkes@cs.cmu.edu,
	linux-kernel@vger.kernel.org, ralf@linux-mips.org,
	mark.fasheh@oracle.com, coda@cs.cmu.edu, lethal@linux-sh.org,
	kurt.hackel@oracle.com, containers@lists.osdl.org,
	linux390@de.ibm.com, philb@gnu.org, andrea@suse.de,
	linuxsh-shmedia-dev@lists.sourceforge.net, ak@suse.de
Subject: Re: [PATCH 25/59] sysctl: C99 convert arch/frv/kernel/pm.c
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com> <11689656443582-git-send-email-ebiederm@xmission.com>
In-Reply-To: <11689656443582-git-send-email-ebiederm@xmission.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Return-Path: <dev@sw.ru>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13690
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: dev@sw.ru
Precedence: bulk
X-list: linux-mips

another small minor note.

> From: Eric W. Biederman <ebiederm@xmission.com> - unquoted
> 
> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
> ---
>  arch/frv/kernel/pm.c |   50 +++++++++++++++++++++++++++++++++++++++++++-------
>  1 files changed, 43 insertions(+), 7 deletions(-)
> 
> diff --git a/arch/frv/kernel/pm.c b/arch/frv/kernel/pm.c
> index c1840d6..aa50333 100644
> --- a/arch/frv/kernel/pm.c
> +++ b/arch/frv/kernel/pm.c
> @@ -401,17 +401,53 @@ static int cm_sysctl(ctl_table *table, int __user *name, int nlen,
>  
>  static struct ctl_table pm_table[] =
>  {
> -	{CTL_PM_SUSPEND, "suspend", NULL, 0, 0200, NULL, &sysctl_pm_do_suspend},
> -	{CTL_PM_CMODE, "cmode", &clock_cmode_current, sizeof(int), 0644, NULL, &cmode_procctl, &cmode_sysctl, NULL},
> -	{CTL_PM_P0, "p0", &clock_p0_current, sizeof(int), 0644, NULL, &p0_procctl, &p0_sysctl, NULL},
> -	{CTL_PM_CM, "cm", &clock_cm_current, sizeof(int), 0644, NULL, &cm_procctl, &cm_sysctl, NULL},
> -	{0}
> +	{
> +		.ctl_name	= CTL_PM_SUSPEND,
> +		.procname	= "suspend",
> +		.data		= NULL,
> +		.maxlen		= 0,
> +		.mode		= 0200,
> +		.proc_handler	= &sysctl_pm_do_suspend,
> +	},
> +	{
> +		.ctl_name	= CTL_PM_CMODE,
> +		.procname	= "cmode",
> +		.data		= &clock_cmode_current,
> +		.maxlen		= sizeof(int),
> +		.mode		= 0644,
> +		.proc_handler	= &cmode_procctl,
> +		.strategy	= &cmode_sysctl,
> +	},
> +	{
> +		.ctl_name	= CTL_PM_P0,
> +		.procname	= "p0",
> +		.data		= &clock_p0_current,
> +		.maxlen		= sizeof(int),
> +		.mode		= 0644,
> +		.proc_handler	= &p0_procctl,
> +		.strategy	= &p0_sysctl,
> +	},
> +	{
> +		.ctl_name	= CTL_PM_CM,
> +		.procname	= "cm",
> +		.data		= &clock_cm_current,
> +		.maxlen		= sizeof(int),
> +		.mode		= 0644,
> +		.proc_handler	= &cm_procctl,
> +		.strategy	= &cm_sysctl,
> +	},
> +	{ .ctl_name = 0}
in next patch (26/59) you write just "{ }". .ctl_name = 0 not required here.


>  };
>  
>  static struct ctl_table pm_dir_table[] =
>  {
> -	{CTL_PM, "pm", NULL, 0, 0555, pm_table},
> -	{0}
> +	{
> +		.ctl_name	= CTL_PM,
> +		.procname	= "pm",
> +		.mode		= 0555,
> +		.child		= pm_table,
> +	},
> +	{ .ctl_name = 0}
>  };
>  
>  /*


From dev@sw.ru Wed Jan 17 17:14:12 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 17 Jan 2007 17:14:16 +0000 (GMT)
Received: from mailhub.sw.ru ([195.214.233.200]:8219 "EHLO relay.sw.ru")
	by ftp.linux-mips.org with ESMTP id S28575802AbXAQROM (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Wed, 17 Jan 2007 17:14:12 +0000
Received: from [192.168.1.129] ([192.168.1.129])
	by relay.sw.ru (8.13.4/8.13.4) with ESMTP id l0HHDr4c020448;
	Wed, 17 Jan 2007 20:13:54 +0300 (MSK)
Message-ID: <45AE5B8A.5040407@sw.ru>
Date:	Wed, 17 Jan 2007 20:23:22 +0300
From:	Kirill Korotaev <dev@sw.ru>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.13) Gecko/20060417
X-Accept-Language: en-us, en, ru
MIME-Version: 1.0
To:	"Eric W. Biederman" <ebiederm@xmission.com>
CC:	"<Andrew Morton" <akpm@osdl.org>, James.Bottomley@SteelEye.com,
	linux-mips@linux-mips.org, linux-parport@lists.infradead.org,
	minyard@acm.org, rtc-linux@googlegroups.com, clemens@ladisch.de,
	heiko.carstens@de.ibm.com, xfs@oss.sgi.com,
	linuxppc-dev@ozlabs.org, paulus@samba.org,
	openipmi-developer@lists.sourceforge.net, linux-390@vm.marist.edu,
	schwidefsky@de.ibm.com, tim@cyberelk.net,
	codalist@TELEMANN.coda.cs.cmu.edu, a.zummo@towertech.it,
	tony.luck@intel.com, vojtech@suse.cz, linux-scsi@vger.kernel.org,
	xfs-masters@oss.sgi.com, linux-ntfs-dev@lists.sourceforge.net,
	netdev@vger.kernel.org, aia21@cantab.net, aharkes@cs.cmu.edu,
	linux-kernel@vger.kernel.org, ralf@linux-mips.org,
	mark.fasheh@oracle.com, coda@cs.cmu.edu, lethal@linux-sh.org,
	kurt.hackel@oracle.com, containers@lists.osdl.org,
	linux390@de.ibm.com, philb@gnu.org, andrea@suse.de,
	linuxsh-shmedia-dev@lists.sourceforge.net, ak@suse.de
Subject: Re: [PATCH 33/59] sysctl: s390 move sysctl definitions to sysctl.h
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com> <11689656572714-git-send-email-ebiederm@xmission.com>
In-Reply-To: <11689656572714-git-send-email-ebiederm@xmission.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Return-Path: <dev@sw.ru>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13691
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: dev@sw.ru
Precedence: bulk
X-list: linux-mips

IDs not sorted in enum. see below.

> From: Eric W. Biederman <ebiederm@xmission.com> - unquoted
> 
> We need to have the the definition of all top level sysctl
> directories registers in sysctl.h so we don't conflict by
> accident and cause abi problems.
> 
> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
> ---
>  arch/s390/appldata/appldata.h |    3 +--
>  arch/s390/kernel/debug.c      |    1 -
>  arch/s390/mm/cmm.c            |    4 ----
>  include/linux/sysctl.h        |    7 +++++++
>  4 files changed, 8 insertions(+), 7 deletions(-)
> 
> diff --git a/arch/s390/appldata/appldata.h b/arch/s390/appldata/appldata.h
> index 0429481..4069b81 100644
> --- a/arch/s390/appldata/appldata.h
> +++ b/arch/s390/appldata/appldata.h
> @@ -21,8 +21,7 @@
>  #define APPLDATA_RECORD_NET_SUM_ID	0x03	/* must be < 256 !     */
>  #define APPLDATA_RECORD_PROC_ID		0x04
>  
> -#define CTL_APPLDATA 		2120	/* sysctl IDs, must be unique */
> -#define CTL_APPLDATA_TIMER 	2121
> +#define CTL_APPLDATA_TIMER 	2121	/* sysctl IDs, must be unique */
>  #define CTL_APPLDATA_INTERVAL 	2122
>  #define CTL_APPLDATA_MEM	2123
>  #define CTL_APPLDATA_OS		2124
> diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c
> index bb57bc0..c81f8e5 100644
> --- a/arch/s390/kernel/debug.c
> +++ b/arch/s390/kernel/debug.c
> @@ -852,7 +852,6 @@ debug_finish_entry(debug_info_t * id, debug_entry_t* active, int level,
>  static int debug_stoppable=1;
>  static int debug_active=1;
>  
> -#define CTL_S390DBF 5677
>  #define CTL_S390DBF_STOPPABLE 5678
>  #define CTL_S390DBF_ACTIVE 5679
>  
> diff --git a/arch/s390/mm/cmm.c b/arch/s390/mm/cmm.c
> index 607f50e..df733d5 100644
> --- a/arch/s390/mm/cmm.c
> +++ b/arch/s390/mm/cmm.c
> @@ -256,10 +256,6 @@ cmm_skip_blanks(char *cp, char **endp)
>  }
>  
>  #ifdef CONFIG_CMM_PROC
> -/* These will someday get removed. */
> -#define VM_CMM_PAGES		1111
> -#define VM_CMM_TIMED_PAGES	1112
> -#define VM_CMM_TIMEOUT		1113
>  
>  static struct ctl_table cmm_table[];
>  
> diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
> index 71c16b4..56d0161 100644
> --- a/include/linux/sysctl.h
> +++ b/include/linux/sysctl.h
> @@ -73,6 +73,8 @@ enum
>  	CTL_SUNRPC=7249,	/* sunrpc debug */
>  	CTL_PM=9899,		/* frv power management */
>  	CTL_FRV=9898,		/* frv specific sysctls */
> +	CTL_S390DBF=5677,	/* s390 debug */
> +	CTL_APPLDATA=2120,	/* s390 appldata */
<<<< not sorted by ID? imho should be sorted. otherwise can'be unnotied when inserted above.

>  };
>  
>  /* CTL_BUS names: */
> @@ -205,6 +207,11 @@ enum
>  	VM_PANIC_ON_OOM=33,	/* panic at out-of-memory */
>  	VM_VDSO_ENABLED=34,	/* map VDSO into new processes? */
>  	VM_MIN_SLAB=35,		 /* Percent pages ignored by zone reclaim */
> +
> +	/* s390 vm cmm sysctls */
> +	VM_CMM_PAGES=1111,
> +	VM_CMM_TIMED_PAGES=1112,
> +	VM_CMM_TIMEOUT=1113,
>  };
>  
>  


From dev@sw.ru Wed Jan 17 17:31:55 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 17 Jan 2007 17:31:59 +0000 (GMT)
Received: from mailhub.sw.ru ([195.214.233.200]:12202 "EHLO relay.sw.ru")
	by ftp.linux-mips.org with ESMTP id S28576323AbXAQRbz (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Wed, 17 Jan 2007 17:31:55 +0000
Received: from [192.168.1.129] ([192.168.1.129])
	by relay.sw.ru (8.13.4/8.13.4) with ESMTP id l0HHWI69013069;
	Wed, 17 Jan 2007 20:32:21 +0300 (MSK)
Message-ID: <45AE5FDC.5050603@sw.ru>
Date:	Wed, 17 Jan 2007 20:41:48 +0300
From:	Kirill Korotaev <dev@sw.ru>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.13) Gecko/20060417
X-Accept-Language: en-us, en, ru
MIME-Version: 1.0
To:	"Eric W. Biederman" <ebiederm@xmission.com>
CC:	"<Andrew Morton" <akpm@osdl.org>, James.Bottomley@SteelEye.com,
	linux-mips@linux-mips.org, linux-parport@lists.infradead.org,
	minyard@acm.org, rtc-linux@googlegroups.com, clemens@ladisch.de,
	heiko.carstens@de.ibm.com, xfs@oss.sgi.com,
	linuxppc-dev@ozlabs.org, paulus@samba.org,
	openipmi-developer@lists.sourceforge.net, linux-390@vm.marist.edu,
	schwidefsky@de.ibm.com, tim@cyberelk.net,
	codalist@TELEMANN.coda.cs.cmu.edu, a.zummo@towertech.it,
	tony.luck@intel.com, vojtech@suse.cz, linux-scsi@vger.kernel.org,
	xfs-masters@oss.sgi.com, linux-ntfs-dev@lists.sourceforge.net,
	netdev@vger.kernel.org, aia21@cantab.net, aharkes@cs.cmu.edu,
	linux-kernel@vger.kernel.org, ralf@linux-mips.org,
	mark.fasheh@oracle.com, coda@cs.cmu.edu, lethal@linux-sh.org,
	kurt.hackel@oracle.com, containers@lists.osdl.org,
	linux390@de.ibm.com, philb@gnu.org, andrea@suse.de,
	linuxsh-shmedia-dev@lists.sourceforge.net, ak@suse.de
Subject: Re: [PATCH 50/59] sysctl: Move utsname sysctls to their own file
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com> <11689656853154-git-send-email-ebiederm@xmission.com>
In-Reply-To: <11689656853154-git-send-email-ebiederm@xmission.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Return-Path: <dev@sw.ru>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13692
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: dev@sw.ru
Precedence: bulk
X-list: linux-mips

Eric, though I personally don't care much:
1. I ask for not setting your authorship/copyright on the code which you just copied
  from other places. Just doesn't look polite IMHO.
2. I would propose to not introduce utsname_sysctl.c.
  both files are too small and minor that I can't see much reasons splitting them.

Kirill

> From: Eric W. Biederman <ebiederm@xmission.com> - unquoted
> 
> This is just a simple cleanup to keep kernel/sysctl.c
> from getting to crowded with special cases, and by
> keeping all of the utsname logic to together it makes
> the code a little more readable.
> 
> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
> ---
>  kernel/Makefile         |    1 +
>  kernel/sysctl.c         |  115 -------------------------------------
>  kernel/utsname_sysctl.c |  146 +++++++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 147 insertions(+), 115 deletions(-)
> 
> diff --git a/kernel/Makefile b/kernel/Makefile
> index 14f4d45..d286c44 100644
> --- a/kernel/Makefile
> +++ b/kernel/Makefile
> @@ -48,6 +48,7 @@ obj-$(CONFIG_SECCOMP) += seccomp.o
>  obj-$(CONFIG_RCU_TORTURE_TEST) += rcutorture.o
>  obj-$(CONFIG_RELAY) += relay.o
>  obj-$(CONFIG_UTS_NS) += utsname.o
> +obj-$(CONFIG_SYSCTL) += utsname_sysctl.o
>  obj-$(CONFIG_TASK_DELAY_ACCT) += delayacct.o
>  obj-$(CONFIG_TASKSTATS) += taskstats.o tsacct.o
>  
> diff --git a/kernel/sysctl.c b/kernel/sysctl.c
> index 7420761..a8c0a03 100644
> --- a/kernel/sysctl.c
> +++ b/kernel/sysctl.c
> @@ -135,13 +135,6 @@ static int parse_table(int __user *, int, void __user *, size_t __user *,
>  		void __user *, size_t, ctl_table *);
>  #endif
>  
> -static int proc_do_uts_string(ctl_table *table, int write, struct file *filp,
> -		  void __user *buffer, size_t *lenp, loff_t *ppos);
> -
> -static int sysctl_uts_string(ctl_table *table, int __user *name, int nlen,
> -		  void __user *oldval, size_t __user *oldlenp,
> -		  void __user *newval, size_t newlen);
> -
>  #ifdef CONFIG_SYSVIPC
>  static int sysctl_ipc_data(ctl_table *table, int __user *name, int nlen,
>  		  void __user *oldval, size_t __user *oldlenp,
> @@ -174,27 +167,6 @@ extern ctl_table inotify_table[];
>  int sysctl_legacy_va_layout;
>  #endif
>  
> -static void *get_uts(ctl_table *table, int write)
> -{
> -	char *which = table->data;
> -#ifdef CONFIG_UTS_NS
> -	struct uts_namespace *uts_ns = current->nsproxy->uts_ns;
> -	which = (which - (char *)&init_uts_ns) + (char *)uts_ns;
> -#endif
> -	if (!write)
> -		down_read(&uts_sem);
> -	else
> -		down_write(&uts_sem);
> -	return which;
> -}
> -
> -static void put_uts(ctl_table *table, int write, void *which)
> -{
> -	if (!write)
> -		up_read(&uts_sem);
> -	else
> -		up_write(&uts_sem);
> -}
>  
>  #ifdef CONFIG_SYSVIPC
>  static void *get_ipc(ctl_table *table, int write)
> @@ -275,51 +247,6 @@ static ctl_table root_table[] = {
>  
>  static ctl_table kern_table[] = {
>  	{
> -		.ctl_name	= KERN_OSTYPE,
> -		.procname	= "ostype",
> -		.data		= init_uts_ns.name.sysname,
> -		.maxlen		= sizeof(init_uts_ns.name.sysname),
> -		.mode		= 0444,
> -		.proc_handler	= &proc_do_uts_string,
> -		.strategy	= &sysctl_uts_string,
> -	},
> -	{
> -		.ctl_name	= KERN_OSRELEASE,
> -		.procname	= "osrelease",
> -		.data		= init_uts_ns.name.release,
> -		.maxlen		= sizeof(init_uts_ns.name.release),
> -		.mode		= 0444,
> -		.proc_handler	= &proc_do_uts_string,
> -		.strategy	= &sysctl_uts_string,
> -	},
> -	{
> -		.ctl_name	= KERN_VERSION,
> -		.procname	= "version",
> -		.data		= init_uts_ns.name.version,
> -		.maxlen		= sizeof(init_uts_ns.name.version),
> -		.mode		= 0444,
> -		.proc_handler	= &proc_do_uts_string,
> -		.strategy	= &sysctl_uts_string,
> -	},
> -	{
> -		.ctl_name	= KERN_NODENAME,
> -		.procname	= "hostname",
> -		.data		= init_uts_ns.name.nodename,
> -		.maxlen		= sizeof(init_uts_ns.name.nodename),
> -		.mode		= 0644,
> -		.proc_handler	= &proc_do_uts_string,
> -		.strategy	= &sysctl_uts_string,
> -	},
> -	{
> -		.ctl_name	= KERN_DOMAINNAME,
> -		.procname	= "domainname",
> -		.data		= init_uts_ns.name.domainname,
> -		.maxlen		= sizeof(init_uts_ns.name.domainname),
> -		.mode		= 0644,
> -		.proc_handler	= &proc_do_uts_string,
> -		.strategy	= &sysctl_uts_string,
> -	},
> -	{
>  		.ctl_name	= KERN_PANIC,
>  		.procname	= "panic",
>  		.data		= &panic_timeout,
> @@ -1746,21 +1673,6 @@ int proc_dostring(ctl_table *table, int write, struct file *filp,
>  			       buffer, lenp, ppos);
>  }
>  
> -/*
> - *	Special case of dostring for the UTS structure. This has locks
> - *	to observe. Should this be in kernel/sys.c ????
> - */
> -
> -static int proc_do_uts_string(ctl_table *table, int write, struct file *filp,
> -		  void __user *buffer, size_t *lenp, loff_t *ppos)
> -{
> -	int r;
> -	void *which;
> -	which = get_uts(table, write);
> -	r = _proc_do_string(which, table->maxlen,write,filp,buffer,lenp, ppos);
> -	put_uts(table, write, which);
> -	return r;
> -}
>  
>  static int do_proc_dointvec_conv(int *negp, unsigned long *lvalp,
>  				 int *valp,
> @@ -2379,12 +2291,6 @@ int proc_dostring(ctl_table *table, int write, struct file *filp,
>  	return -ENOSYS;
>  }
>  
> -static int proc_do_uts_string(ctl_table *table, int write, struct file *filp,
> -		void __user *buffer, size_t *lenp, loff_t *ppos)
> -{
> -	return -ENOSYS;
> -}
> -
>  #ifdef CONFIG_SYSVIPC
>  static int proc_do_ipc_string(ctl_table *table, int write, struct file *filp,
>  		void __user *buffer, size_t *lenp, loff_t *ppos)
> @@ -2602,21 +2508,6 @@ int sysctl_ms_jiffies(ctl_table *table, int __user *name, int nlen,
>  }
>  
>  
> -/* The generic string strategy routine: */
> -static int sysctl_uts_string(ctl_table *table, int __user *name, int nlen,
> -		  void __user *oldval, size_t __user *oldlenp,
> -		  void __user *newval, size_t newlen)
> -{
> -	struct ctl_table uts_table;
> -	int r, write;
> -	write = newval && newlen;
> -	memcpy(&uts_table, table, sizeof(uts_table));
> -	uts_table.data = get_uts(table, write);
> -	r = sysctl_string(&uts_table, name, nlen,
> -		oldval, oldlenp, newval, newlen);
> -	put_uts(table, write, uts_table.data);
> -	return r;
> -}
>  
>  #ifdef CONFIG_SYSVIPC
>  /* The generic sysctl ipc data routine. */
> @@ -2723,12 +2614,6 @@ int sysctl_ms_jiffies(ctl_table *table, int __user *name, int nlen,
>  	return -ENOSYS;
>  }
>  
> -static int sysctl_uts_string(ctl_table *table, int __user *name, int nlen,
> -		  void __user *oldval, size_t __user *oldlenp,
> -		  void __user *newval, size_t newlen)
> -{
> -	return -ENOSYS;
> -}
>  static int sysctl_ipc_data(ctl_table *table, int __user *name, int nlen,
>  		void __user *oldval, size_t __user *oldlenp,
>  		void __user *newval, size_t newlen)
> diff --git a/kernel/utsname_sysctl.c b/kernel/utsname_sysctl.c
> new file mode 100644
> index 0000000..324aa13
> --- /dev/null
> +++ b/kernel/utsname_sysctl.c
> @@ -0,0 +1,146 @@
> +/*
> + *  Copyright (C) 2007
> + *
> + *  Author: Eric Biederman <ebiederm@xmision.com>
> + *
> + *  This program is free software; you can redistribute it and/or
> + *  modify it under the terms of the GNU General Public License as
> + *  published by the Free Software Foundation, version 2 of the
> + *  License.
> + */
> +
> +#include <linux/module.h>
> +#include <linux/uts.h>
> +#include <linux/utsname.h>
> +#include <linux/version.h>
> +#include <linux/sysctl.h>
> +
> +static void *get_uts(ctl_table *table, int write)
> +{
> +	char *which = table->data;
> +#ifdef CONFIG_UTS_NS
> +	struct uts_namespace *uts_ns = current->nsproxy->uts_ns;
> +	which = (which - (char *)&init_uts_ns) + (char *)uts_ns;
> +#endif
> +	if (!write)
> +		down_read(&uts_sem);
> +	else
> +		down_write(&uts_sem);
> +	return which;
> +}
> +
> +static void put_uts(ctl_table *table, int write, void *which)
> +{
> +	if (!write)
> +		up_read(&uts_sem);
> +	else
> +		up_write(&uts_sem);
> +}
> +
> +#ifdef CONFIG_PROC_FS
> +/*
> + *	Special case of dostring for the UTS structure. This has locks
> + *	to observe. Should this be in kernel/sys.c ????
> + */
> +static int proc_do_uts_string(ctl_table *table, int write, struct file *filp,
> +		  void __user *buffer, size_t *lenp, loff_t *ppos)
> +{
> +	struct ctl_table uts_table;
> +	int r;
> +	memcpy(&uts_table, table, sizeof(uts_table));
> +	uts_table.data = get_uts(table, write);
> +	r = proc_dostring(&uts_table,write,filp,buffer,lenp, ppos);
> +	put_uts(table, write, uts_table.data);
> +	return r;
> +}
> +#else
> +#define proc_do_uts_string NULL
> +#endif
> +
> +
> +#ifdef CONFIG_SYSCTL_SYSCALL
> +/* The generic string strategy routine: */
> +static int sysctl_uts_string(ctl_table *table, int __user *name, int nlen,
> +		  void __user *oldval, size_t __user *oldlenp,
> +		  void __user *newval, size_t newlen)
> +{
> +	struct ctl_table uts_table;
> +	int r, write;
> +	write = newval && newlen;
> +	memcpy(&uts_table, table, sizeof(uts_table));
> +	uts_table.data = get_uts(table, write);
> +	r = sysctl_string(&uts_table, name, nlen,
> +		oldval, oldlenp, newval, newlen);
> +	put_uts(table, write, uts_table.data);
> +	return r;
> +}
> +#else
> +#define sysctl_uts_string NULL
> +#endif
> +
> +static struct ctl_table uts_kern_table[] = {
> +	{
> +		.ctl_name	= KERN_OSTYPE,
> +		.procname	= "ostype",
> +		.data		= init_uts_ns.name.sysname,
> +		.maxlen		= sizeof(init_uts_ns.name.sysname),
> +		.mode		= 0444,
> +		.proc_handler	= proc_do_uts_string,
> +		.strategy	= sysctl_uts_string,
> +	},
> +	{
> +		.ctl_name	= KERN_OSRELEASE,
> +		.procname	= "osrelease",
> +		.data		= init_uts_ns.name.release,
> +		.maxlen		= sizeof(init_uts_ns.name.release),
> +		.mode		= 0444,
> +		.proc_handler	= proc_do_uts_string,
> +		.strategy	= sysctl_uts_string,
> +	},
> +	{
> +		.ctl_name	= KERN_VERSION,
> +		.procname	= "version",
> +		.data		= init_uts_ns.name.version,
> +		.maxlen		= sizeof(init_uts_ns.name.version),
> +		.mode		= 0444,
> +		.proc_handler	= proc_do_uts_string,
> +		.strategy	= sysctl_uts_string,
> +	},
> +	{
> +		.ctl_name	= KERN_NODENAME,
> +		.procname	= "hostname",
> +		.data		= init_uts_ns.name.nodename,
> +		.maxlen		= sizeof(init_uts_ns.name.nodename),
> +		.mode		= 0644,
> +		.proc_handler	= proc_do_uts_string,
> +		.strategy	= sysctl_uts_string,
> +	},
> +	{
> +		.ctl_name	= KERN_DOMAINNAME,
> +		.procname	= "domainname",
> +		.data		= init_uts_ns.name.domainname,
> +		.maxlen		= sizeof(init_uts_ns.name.domainname),
> +		.mode		= 0644,
> +		.proc_handler	= proc_do_uts_string,
> +		.strategy	= sysctl_uts_string,
> +	},
> +	{}
> +};
> +
> +static struct ctl_table uts_root_table[] = {
> +	{
> +		.ctl_name	= CTL_KERN,
> +		.procname	= "kernel",
> +		.mode		= 0555,
> +		.child		= uts_kern_table,
> +	},
> +	{}
> +};
> +
> +static int __init utsname_sysctl_init(void)
> +{
> +	register_sysctl_table(uts_root_table, 0);
> +	return 0;
> +}
> +
> +__initcall(utsname_sysctl_init);


From dev@sw.ru Wed Jan 17 17:34:29 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 17 Jan 2007 17:34:34 +0000 (GMT)
Received: from mailhub.sw.ru ([195.214.233.200]:45753 "EHLO relay.sw.ru")
	by ftp.linux-mips.org with ESMTP id S28576378AbXAQRe3 (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Wed, 17 Jan 2007 17:34:29 +0000
Received: from [192.168.1.129] ([192.168.1.129])
	by relay.sw.ru (8.13.4/8.13.4) with ESMTP id l0HHZ50q000963;
	Wed, 17 Jan 2007 20:35:06 +0300 (MSK)
Message-ID: <45AE6082.1000601@sw.ru>
Date:	Wed, 17 Jan 2007 20:44:34 +0300
From:	Kirill Korotaev <dev@sw.ru>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.13) Gecko/20060417
X-Accept-Language: en-us, en, ru
MIME-Version: 1.0
To:	"Eric W. Biederman" <ebiederm@xmission.com>
CC:	"<Andrew Morton" <akpm@osdl.org>, James.Bottomley@SteelEye.com,
	linux-mips@linux-mips.org, linux-parport@lists.infradead.org,
	minyard@acm.org, rtc-linux@googlegroups.com, clemens@ladisch.de,
	heiko.carstens@de.ibm.com, xfs@oss.sgi.com,
	linuxppc-dev@ozlabs.org, paulus@samba.org,
	openipmi-developer@lists.sourceforge.net, linux-390@vm.marist.edu,
	schwidefsky@de.ibm.com, tim@cyberelk.net,
	codalist@TELEMANN.coda.cs.cmu.edu, a.zummo@towertech.it,
	tony.luck@intel.com, vojtech@suse.cz, linux-scsi@vger.kernel.org,
	xfs-masters@oss.sgi.com, linux-ntfs-dev@lists.sourceforge.net,
	netdev@vger.kernel.org, aia21@cantab.net, aharkes@cs.cmu.edu,
	linux-kernel@vger.kernel.org, ralf@linux-mips.org,
	mark.fasheh@oracle.com, coda@cs.cmu.edu, lethal@linux-sh.org,
	kurt.hackel@oracle.com, containers@lists.osdl.org,
	linux390@de.ibm.com, philb@gnu.org, andrea@suse.de,
	linuxsh-shmedia-dev@lists.sourceforge.net, ak@suse.de
Subject: Re: [PATCH 51/59] sysctl: Move SYSV IPC sysctls to their own file
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com> <11689656911014-git-send-email-ebiederm@xmission.com>
In-Reply-To: <11689656911014-git-send-email-ebiederm@xmission.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Return-Path: <dev@sw.ru>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13693
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: dev@sw.ru
Precedence: bulk
X-list: linux-mips

1. I ask for not setting your authorship/copyright on the code which you just copied
   from other places. Just doesn't look polite IMHO.
2. please don't name files like ipc/ipc_sysctl.c
   ipc/sysctl.c sounds better IMHO.
3. any reason to introduce CONFIG_SYSVIPC_SYSCTL?
   why not simply do
   > +obj-$(CONFIG_SYSCTL) += sysctl.o
   instead?

Kirill

> From: Eric W. Biederman <ebiederm@xmission.com> - unquoted
> 
> This is just a simple cleanup to keep kernel/sysctl.c
> from getting to crowded with special cases, and by
> keeping all of the ipc logic to together it makes
> the code a little more readable.
> 
> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
> ---
>  init/Kconfig     |    6 ++
>  ipc/Makefile     |    1 +
>  ipc/ipc_sysctl.c |  182 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  kernel/sysctl.c  |  174 ---------------------------------------------------
>  4 files changed, 189 insertions(+), 174 deletions(-)
> 
> diff --git a/init/Kconfig b/init/Kconfig
> index a3f83e2..33bc38d 100644
> --- a/init/Kconfig
> +++ b/init/Kconfig
> @@ -116,6 +116,12 @@ config SYSVIPC
>  	  section 6.4 of the Linux Programmer's Guide, available from
>  	  <http://www.tldp.org/guides.html>.
>  
> +config SYSVIPC_SYSCTL
> +	bool
> +	depends on SYSVIPC
> +	depends on SYSCTL
> +	default y
> +
>  config IPC_NS
>  	bool "IPC Namespaces"
>  	depends on SYSVIPC
> diff --git a/ipc/Makefile b/ipc/Makefile
> index 0a6d626..b93bba6 100644
> --- a/ipc/Makefile
> +++ b/ipc/Makefile
> @@ -4,6 +4,7 @@
>  
>  obj-$(CONFIG_SYSVIPC_COMPAT) += compat.o
>  obj-$(CONFIG_SYSVIPC) += util.o msgutil.o msg.o sem.o shm.o
> +obj-$(CONFIG_SYSVIPC_SYSCTL) += ipc_sysctl.o
>  obj_mq-$(CONFIG_COMPAT) += compat_mq.o
>  obj-$(CONFIG_POSIX_MQUEUE) += mqueue.o msgutil.o $(obj_mq-y)
>  
> diff --git a/ipc/ipc_sysctl.c b/ipc/ipc_sysctl.c
> new file mode 100644
> index 0000000..9018009
> --- /dev/null
> +++ b/ipc/ipc_sysctl.c
> @@ -0,0 +1,182 @@
> +/*
> + *  Copyright (C) 2007
> + *
> + *  Author: Eric Biederman <ebiederm@xmision.com>
> + *
> + *  This program is free software; you can redistribute it and/or
> + *  modify it under the terms of the GNU General Public License as
> + *  published by the Free Software Foundation, version 2 of the
> + *  License.
> + */
> +
> +#include <linux/module.h>
> +#include <linux/ipc.h>
> +#include <linux/nsproxy.h>
> +#include <linux/sysctl.h>
> +
> +#ifdef CONFIG_IPC_NS
> +static void *get_ipc(ctl_table *table)
> +{
> +	char *which = table->data;
> +	struct ipc_namespace *ipc_ns = current->nsproxy->ipc_ns;
> +	which = (which - (char *)&init_ipc_ns) + (char *)ipc_ns;
> +	return which;
> +}
> +#else
> +#define get_ipc(T) ((T)->data)
> +#endif
> +
> +#ifdef CONFIG_PROC_FS
> +static int proc_ipc_dointvec(ctl_table *table, int write, struct file *filp,
> +	void __user *buffer, size_t *lenp, loff_t *ppos)
> +{
> +	struct ctl_table ipc_table;
> +	memcpy(&ipc_table, table, sizeof(ipc_table));
> +	ipc_table.data = get_ipc(table);
> +
> +	return proc_dointvec(&ipc_table, write, filp, buffer, lenp, ppos);
> +}
> +
> +static int proc_ipc_doulongvec_minmax(ctl_table *table, int write,
> +	struct file *filp, void __user *buffer, size_t *lenp, loff_t *ppos)
> +{
> +	struct ctl_table ipc_table;
> +	memcpy(&ipc_table, table, sizeof(ipc_table));
> +	ipc_table.data = get_ipc(table);
> +
> +	return proc_doulongvec_minmax(&ipc_table, write, filp, buffer,
> +					lenp, ppos);
> +}
> +
> +#else
> +#define proc_ipc_do_ulongvec_minmax NULL
> +#define proc_ipc_do_intvec	    NULL
> +#endif
> +
> +#ifdef CONFIG_SYSCTL_SYSCALL
> +/* The generic sysctl ipc data routine. */
> +static int sysctl_ipc_data(ctl_table *table, int __user *name, int nlen,
> +		void __user *oldval, size_t __user *oldlenp,
> +		void __user *newval, size_t newlen)
> +{
> +	size_t len;
> +	void *data;
> +
> +	/* Get out of I don't have a variable */
> +	if (!table->data || !table->maxlen)
> +		return -ENOTDIR;
> +
> +	data = get_ipc(table);
> +	if (!data)
> +		return -ENOTDIR;
> +
> +	if (oldval && oldlenp) {
> +		if (get_user(len, oldlenp))
> +			return -EFAULT;
> +		if (len) {
> +			if (len > table->maxlen)
> +				len = table->maxlen;
> +			if (copy_to_user(oldval, data, len))
> +				return -EFAULT;
> +			if (put_user(len, oldlenp))
> +				return -EFAULT;
> +		}
> +	}
> +
> +	if (newval && newlen) {
> +		if (newlen > table->maxlen)
> +			newlen = table->maxlen;
> +
> +		if (copy_from_user(data, newval, newlen))
> +			return -EFAULT;
> +	}
> +	return 1;
> +}
> +#else
> +#define sysctl_ipc_data NULL
> +#endif
> +
> +static struct ctl_table ipc_kern_table[] = {
> +	{
> +		.ctl_name	= KERN_SHMMAX,
> +		.procname	= "shmmax",
> +		.data		= &init_ipc_ns.shm_ctlmax,
> +		.maxlen		= sizeof (init_ipc_ns.shm_ctlmax),
> +		.mode		= 0644,
> +		.proc_handler	= proc_ipc_doulongvec_minmax,
> +		.strategy	= sysctl_ipc_data,
> +	},
> +	{
> +		.ctl_name	= KERN_SHMALL,
> +		.procname	= "shmall",
> +		.data		= &init_ipc_ns.shm_ctlall,
> +		.maxlen		= sizeof (init_ipc_ns.shm_ctlall),
> +		.mode		= 0644,
> +		.proc_handler	= proc_ipc_doulongvec_minmax,
> +		.strategy	= sysctl_ipc_data,
> +	},
> +	{
> +		.ctl_name	= KERN_SHMMNI,
> +		.procname	= "shmmni",
> +		.data		= &init_ipc_ns.shm_ctlmni,
> +		.maxlen		= sizeof (init_ipc_ns.shm_ctlmni),
> +		.mode		= 0644,
> +		.proc_handler	= proc_ipc_dointvec,
> +		.strategy	= sysctl_ipc_data,
> +	},
> +	{
> +		.ctl_name	= KERN_MSGMAX,
> +		.procname	= "msgmax",
> +		.data		= &init_ipc_ns.msg_ctlmax,
> +		.maxlen		= sizeof (init_ipc_ns.msg_ctlmax),
> +		.mode		= 0644,
> +		.proc_handler	= proc_ipc_dointvec,
> +		.strategy	= sysctl_ipc_data,
> +	},
> +	{
> +		.ctl_name	= KERN_MSGMNI,
> +		.procname	= "msgmni",
> +		.data		= &init_ipc_ns.msg_ctlmni,
> +		.maxlen		= sizeof (init_ipc_ns.msg_ctlmni),
> +		.mode		= 0644,
> +		.proc_handler	= proc_ipc_dointvec,
> +		.strategy	= sysctl_ipc_data,
> +	},
> +	{
> +		.ctl_name	= KERN_MSGMNB,
> +		.procname	=  "msgmnb",
> +		.data		= &init_ipc_ns.msg_ctlmnb,
> +		.maxlen		= sizeof (init_ipc_ns.msg_ctlmnb),
> +		.mode		= 0644,
> +		.proc_handler	= proc_ipc_dointvec,
> +		.strategy	= sysctl_ipc_data,
> +	},
> +	{
> +		.ctl_name	= KERN_SEM,
> +		.procname	= "sem",
> +		.data		= &init_ipc_ns.sem_ctls,
> +		.maxlen		= 4*sizeof (int),
> +		.mode		= 0644,
> +		.proc_handler	= proc_ipc_dointvec,
> +		.strategy	= sysctl_ipc_data,
> +	},
> +	{}
> +};
> +
> +static struct ctl_table ipc_root_table[] = {
> +	{
> +		.ctl_name	= CTL_KERN,
> +		.procname	= "kernel",
> +		.mode		= 0555,
> +		.child		= ipc_kern_table,
> +	},
> +	{}
> +};
> +
> +static int __init ipc_sysctl_init(void)
> +{
> +	register_sysctl_table(ipc_root_table, 0);
> +	return 0;
> +}
> +
> +__initcall(ipc_sysctl_init);
> diff --git a/kernel/sysctl.c b/kernel/sysctl.c
> index a8c0a03..6e2e608 100644
> --- a/kernel/sysctl.c
> +++ b/kernel/sysctl.c
> @@ -90,12 +90,6 @@ extern char modprobe_path[];
>  #ifdef CONFIG_CHR_DEV_SG
>  extern int sg_big_buff;
>  #endif
> -#ifdef CONFIG_SYSVIPC
> -static int proc_ipc_dointvec(ctl_table *table, int write, struct file *filp,
> -		void __user *buffer, size_t *lenp, loff_t *ppos);
> -static int proc_ipc_doulongvec_minmax(ctl_table *table, int write, struct file *filp,
> -		void __user *buffer, size_t *lenp, loff_t *ppos);
> -#endif
>  
>  #ifdef __sparc__
>  extern char reboot_command [];
> @@ -135,11 +129,6 @@ static int parse_table(int __user *, int, void __user *, size_t __user *,
>  		void __user *, size_t, ctl_table *);
>  #endif
>  
> -#ifdef CONFIG_SYSVIPC
> -static int sysctl_ipc_data(ctl_table *table, int __user *name, int nlen,
> -		  void __user *oldval, size_t __user *oldlenp,
> -		  void __user *newval, size_t newlen);
> -#endif
>  
>  #ifdef CONFIG_PROC_SYSCTL
>  static int proc_do_cad_pid(ctl_table *table, int write, struct file *filp,
> @@ -168,17 +157,6 @@ int sysctl_legacy_va_layout;
>  #endif
>  
>  
> -#ifdef CONFIG_SYSVIPC
> -static void *get_ipc(ctl_table *table, int write)
> -{
> -	char *which = table->data;
> -	struct ipc_namespace *ipc_ns = current->nsproxy->ipc_ns;
> -	which = (which - (char *)&init_ipc_ns) + (char *)ipc_ns;
> -	return which;
> -}
> -#else
> -#define get_ipc(T,W) ((T)->data)
> -#endif
>  
>  /* /proc declarations: */
>  
> @@ -400,71 +378,6 @@ static ctl_table kern_table[] = {
>  		.proc_handler	= &proc_dointvec,
>  	},
>  #endif
> -#ifdef CONFIG_SYSVIPC
> -	{
> -		.ctl_name	= KERN_SHMMAX,
> -		.procname	= "shmmax",
> -		.data		= &init_ipc_ns.shm_ctlmax,
> -		.maxlen		= sizeof (init_ipc_ns.shm_ctlmax),
> -		.mode		= 0644,
> -		.proc_handler	= &proc_ipc_doulongvec_minmax,
> -		.strategy	= sysctl_ipc_data,
> -	},
> -	{
> -		.ctl_name	= KERN_SHMALL,
> -		.procname	= "shmall",
> -		.data		= &init_ipc_ns.shm_ctlall,
> -		.maxlen		= sizeof (init_ipc_ns.shm_ctlall),
> -		.mode		= 0644,
> -		.proc_handler	= &proc_ipc_doulongvec_minmax,
> -		.strategy	= sysctl_ipc_data,
> -	},
> -	{
> -		.ctl_name	= KERN_SHMMNI,
> -		.procname	= "shmmni",
> -		.data		= &init_ipc_ns.shm_ctlmni,
> -		.maxlen		= sizeof (init_ipc_ns.shm_ctlmni),
> -		.mode		= 0644,
> -		.proc_handler	= &proc_ipc_dointvec,
> -		.strategy	= sysctl_ipc_data,
> -	},
> -	{
> -		.ctl_name	= KERN_MSGMAX,
> -		.procname	= "msgmax",
> -		.data		= &init_ipc_ns.msg_ctlmax,
> -		.maxlen		= sizeof (init_ipc_ns.msg_ctlmax),
> -		.mode		= 0644,
> -		.proc_handler	= &proc_ipc_dointvec,
> -		.strategy	= sysctl_ipc_data,
> -	},
> -	{
> -		.ctl_name	= KERN_MSGMNI,
> -		.procname	= "msgmni",
> -		.data		= &init_ipc_ns.msg_ctlmni,
> -		.maxlen		= sizeof (init_ipc_ns.msg_ctlmni),
> -		.mode		= 0644,
> -		.proc_handler	= &proc_ipc_dointvec,
> -		.strategy	= sysctl_ipc_data,
> -	},
> -	{
> -		.ctl_name	= KERN_MSGMNB,
> -		.procname	=  "msgmnb",
> -		.data		= &init_ipc_ns.msg_ctlmnb,
> -		.maxlen		= sizeof (init_ipc_ns.msg_ctlmnb),
> -		.mode		= 0644,
> -		.proc_handler	= &proc_ipc_dointvec,
> -		.strategy	= sysctl_ipc_data,
> -	},
> -	{
> -		.ctl_name	= KERN_SEM,
> -		.procname	= "sem",
> -		.data		= &init_ipc_ns.sem_ctls,
> -		.maxlen		= 4*sizeof (int),
> -		.mode		= 0644,
> -		.proc_handler	= &proc_ipc_dointvec,
> -		.strategy	= sysctl_ipc_data,
> -	},
> -#endif
>  #ifdef CONFIG_MAGIC_SYSRQ
>  	{
>  		.ctl_name	= KERN_SYSRQ,
> @@ -2240,27 +2153,6 @@ int proc_dointvec_ms_jiffies(ctl_table *table, int write, struct file *filp,
>  				do_proc_dointvec_ms_jiffies_conv, NULL);
>  }
>  
> -#ifdef CONFIG_SYSVIPC
> -static int proc_ipc_dointvec(ctl_table *table, int write, struct file *filp,
> -	void __user *buffer, size_t *lenp, loff_t *ppos)
> -{
> -	void *which;
> -	which = get_ipc(table, write);
> -	return __do_proc_dointvec(which, table, write, filp, buffer,
> -			lenp, ppos, NULL, NULL);
> -}
> -
> -static int proc_ipc_doulongvec_minmax(ctl_table *table, int write,
> -	struct file *filp, void __user *buffer, size_t *lenp, loff_t *ppos)
> -{
> -	void *which;
> -	which = get_ipc(table, write);
> -	return __do_proc_doulongvec_minmax(which, table, write, filp, buffer,
> -			lenp, ppos, 1l, 1l);
> -}
> -
> -#endif
> -
>  static int proc_do_cad_pid(ctl_table *table, int write, struct file *filp,
>  			   void __user *buffer, size_t *lenp, loff_t *ppos)
>  {
> @@ -2291,25 +2183,6 @@ int proc_dostring(ctl_table *table, int write, struct file *filp,
>  	return -ENOSYS;
>  }
>  
> -#ifdef CONFIG_SYSVIPC
> -static int proc_do_ipc_string(ctl_table *table, int write, struct file *filp,
> -		void __user *buffer, size_t *lenp, loff_t *ppos)
> -{
> -	return -ENOSYS;
> -}
> -static int proc_ipc_dointvec(ctl_table *table, int write, struct file *filp,
> -		void __user *buffer, size_t *lenp, loff_t *ppos)
> -{
> -	return -ENOSYS;
> -}
> -static int proc_ipc_doulongvec_minmax(ctl_table *table, int write,
> -		struct file *filp, void __user *buffer,
> -		size_t *lenp, loff_t *ppos)
> -{
> -	return -ENOSYS;
> -}
> -#endif
> -
>  int proc_dointvec(ctl_table *table, int write, struct file *filp,
>  		  void __user *buffer, size_t *lenp, loff_t *ppos)
>  {
> @@ -2509,47 +2382,6 @@ int sysctl_ms_jiffies(ctl_table *table, int __user *name, int nlen,
>  
>  
>  
> -#ifdef CONFIG_SYSVIPC
> -/* The generic sysctl ipc data routine. */
> -static int sysctl_ipc_data(ctl_table *table, int __user *name, int nlen,
> -		void __user *oldval, size_t __user *oldlenp,
> -		void __user *newval, size_t newlen)
> -{
> -	size_t len;
> -	void *data;
> -
> -	/* Get out of I don't have a variable */
> -	if (!table->data || !table->maxlen)
> -		return -ENOTDIR;
> -
> -	data = get_ipc(table, 1);
> -	if (!data)
> -		return -ENOTDIR;
> -
> -	if (oldval && oldlenp) {
> -		if (get_user(len, oldlenp))
> -			return -EFAULT;
> -		if (len) {
> -			if (len > table->maxlen)
> -				len = table->maxlen;
> -			if (copy_to_user(oldval, data, len))
> -				return -EFAULT;
> -			if (put_user(len, oldlenp))
> -				return -EFAULT;
> -		}
> -	}
> -
> -	if (newval && newlen) {
> -		if (newlen > table->maxlen)
> -			newlen = table->maxlen;
> -
> -		if (copy_from_user(data, newval, newlen))
> -			return -EFAULT;
> -	}
> -	return 1;
> -}
> -#endif
> -
>  #else /* CONFIG_SYSCTL_SYSCALL */
>  
>  
> @@ -2614,12 +2446,6 @@ int sysctl_ms_jiffies(ctl_table *table, int __user *name, int nlen,
>  	return -ENOSYS;
>  }
>  
> -static int sysctl_ipc_data(ctl_table *table, int __user *name, int nlen,
> -		void __user *oldval, size_t __user *oldlenp,
> -		void __user *newval, size_t newlen)
> -{
> -	return -ENOSYS;
> -}
>  #endif /* CONFIG_SYSCTL_SYSCALL */
>  
>  /*


From dev@sw.ru Wed Jan 17 18:00:53 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 17 Jan 2007 18:00:57 +0000 (GMT)
Received: from mailhub.sw.ru ([195.214.233.200]:24730 "EHLO relay.sw.ru")
	by ftp.linux-mips.org with ESMTP id S20042566AbXAQSAx (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Wed, 17 Jan 2007 18:00:53 +0000
Received: from [192.168.1.129] ([192.168.1.129])
	by relay.sw.ru (8.13.4/8.13.4) with ESMTP id l0HI1K8t026726;
	Wed, 17 Jan 2007 21:01:21 +0300 (MSK)
Message-ID: <45AE66AA.1050508@sw.ru>
Date:	Wed, 17 Jan 2007 21:10:50 +0300
From:	Kirill Korotaev <dev@sw.ru>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.13) Gecko/20060417
X-Accept-Language: en-us, en, ru
MIME-Version: 1.0
To:	"Eric W. Biederman" <ebiederm@xmission.com>
CC:	Andrew Morton <akpm@osdl.org>, James.Bottomley@SteelEye.com,
	linux-mips@linux-mips.org, linux-parport@lists.infradead.org,
	minyard@acm.org, rtc-linux@googlegroups.com, clemens@ladisch.de,
	heiko.carstens@de.ibm.com, xfs@oss.sgi.com,
	linuxppc-dev@ozlabs.org, paulus@samba.org,
	openipmi-developer@lists.sourceforge.net, linux-390@vm.marist.edu,
	schwidefsky@de.ibm.com, tim@cyberelk.net,
	codalist@TELEMANN.coda.cs.cmu.edu, a.zummo@towertech.it,
	tony.luck@intel.com, vojtech@suse.cz, linux-scsi@vger.kernel.org,
	xfs-masters@oss.sgi.com, linux-ntfs-dev@lists.sourceforge.net,
	netdev@vger.kernel.org, aia21@cantab.net, aharkes@cs.cmu.edu,
	linux-kernel@vger.kernel.org, ralf@linux-mips.org,
	mark.fasheh@oracle.com, coda@cs.cmu.edu, lethal@linux-sh.org,
	kurt.hackel@oracle.com,
	Linux Containers <containers@lists.osdl.org>,
	linux390@de.ibm.com, philb@gnu.org, andrea@suse.de,
	linuxsh-shmedia-dev@lists.sourceforge.net, ak@suse.de
Subject: Re: [PATCH 0/59] Cleanup sysctl
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
In-Reply-To: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Return-Path: <dev@sw.ru>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13694
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: dev@sw.ru
Precedence: bulk
X-list: linux-mips

Eric, really good job!

Patches: 1-13, 15-24, 26-32, 34-44, 46-49, 52-55, 57 (all except below)
Acked-By: Kirill Korotaev <dev@openvz.org>

14/59 - minor (extra space)
25/59 - minor note	
33/59 - not sorted sysctl IDs
45/59 - typo
50/59 - copyright/file note
51/59 - copyright/file name/kconfig option notes

56,58,59/59 - will review tomorrow

another issue I have to think over is removal of de->owner.
Alexey Dobriyan has sent recently patching fixing /proc <-> modules refcounting.
I guess w/o these patches your changes are not safe if proc_handler or strategy
are functions from the module.

Thanks,
Kirill

> There has not been much maintenance on sysctl in years, and as a result is
> there is a lot to do to allow future interesting work to happen, and being
> ambitious I'm trying to do it all at once :)
> 
> The patches in this series fall into several general categories.
> 
> - Removal of useless attempts to override the standard sysctls
> 
> - Registers of sysctl numbers in sysctl.h so someone else does not use
>   the magic number and conflict.
> 
> - C99 conversions so it becomes possible to change the layout of 
>   struct ctl_table without breaking everything.
> 
> - Removal of useless claims of module ownership, in the proc dir entries
> 
> - Removal of sys_sysctl support where people had used conflicting sysctl
>   numbers. Trying to break glibc or other applications by changing the
>   ABI is not cool.  9 instances of this in the kernel seems a little
>   extreme.
> 
> - General enhancements when I got the junk I could see out.
> 
> Odds are I missed something, most of the cleanups are simply a result of
> me working on the sysctl core and glancing at the users and going: What?
> 
> Eric
> _______________________________________________
> Containers mailing list
> Containers@lists.osdl.org
> https://lists.osdl.org/mailman/listinfo/containers
> 
> 


From florian.fainelli@int-evry.fr Wed Jan 17 18:05:26 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 17 Jan 2007 18:05:31 +0000 (GMT)
Received: from smtp-ext.int-evry.fr ([157.159.11.17]:60606 "EHLO
	smtp-ext.int-evry.fr") by ftp.linux-mips.org with ESMTP
	id S20042581AbXAQSF0 (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Wed, 17 Jan 2007 18:05:26 +0000
Received: from mini.int.alphacore.net (florian.maisel.int-evry.fr [157.159.41.36])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp-ext.int-evry.fr (Postfix) with ESMTP id D52F28D1693;
	Wed, 17 Jan 2007 19:04:08 +0100 (CET)
From:	Florian Fainelli <florian.fainelli@int-evry.fr>
To:	Ralf Baechle <ralf@linux-mips.org>
Subject: Re: [PATCH] Add support for Cobalt Server front LED
Date:	Wed, 17 Jan 2007 19:04:23 +0100
User-Agent: KMail/1.9.5
Cc:	Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>,
	linux-mips@linux-mips.org
References: <200701151936.57738.florian.fainelli@int-evry.fr> <200701160056.00748.florian.fainelli@int-evry.fr> <20070117164610.GA1200@linux-mips.org>
In-Reply-To: <20070117164610.GA1200@linux-mips.org>
MIME-Version: 1.0
Content-Type: multipart/signed;
  boundary="nextPart2142788.HERbmlOEkF";
  protocol="application/pgp-signature";
  micalg=pgp-sha1
Content-Transfer-Encoding: 7bit
Message-Id: <200701171904.28281.florian.fainelli@int-evry.fr>
Return-Path: <florian.fainelli@int-evry.fr>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13695
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: florian.fainelli@int-evry.fr
Precedence: bulk
X-list: linux-mips

--nextPart2142788.HERbmlOEkF
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Hi Ralf,

This should take into account everything that has been said before.

Thanks.

Signed-off-by: Florian Fainelli <florian.fainelli@int-evry.fr>

diff -urN linux-2.6.19.1/drivers/leds/Kconfig=20
linux-2.6.19.1.led/drivers/leds/Kconfig
=2D-- linux-2.6.19.1/drivers/leds/Kconfig 2006-12-11 20:32:53.000000000 +01=
00
+++ linux-2.6.19.1.led/drivers/leds/Kconfig =A0 =A0 2007-01-15 19:22:00.000=
000000=20
+0100
@@ -76,6 +76,12 @@
=A0 =A0 =A0 =A0 =A0 This option enables support for the Soekris net4801 and=
 net4826=20
error
=A0 =A0 =A0 =A0 =A0 LED.

+config LEDS_COBALT
+ =A0 =A0 =A0 tristate "LED Support for Cobalt Server front LED"
+ =A0 =A0 =A0 depends on LEDS_CLASS && MIPS_COBALT
+ =A0 =A0 =A0 help
+ =A0 =A0 =A0 =A0 This option enables support for the front LED on Cobalt S=
erver
+
=A0comment "LED Triggers"

=A0config LEDS_TRIGGERS
diff -urN linux-2.6.19.1/drivers/leds/leds-cobalt.c=20
linux-2.6.19.1.led/drivers/leds/leds-cobalt.c
=2D-- linux-2.6.19.1/drivers/leds/leds-cobalt.c =A0 1970-01-01 01:00:00.000=
000000=20
+0100
+++ linux-2.6.19.1.led/drivers/leds/leds-cobalt.c =A0 =A0 =A0 2007-01-15=20
19:28:09.000000000 +0100
@@ -0,0 +1,55 @@
+#include <linux/module.h>
+#include <linux/types.h>
+#include <linux/kernel.h>
+#include <linux/device.h>
+#include <linux/leds.h>
+#include <asm/mach-cobalt/cobalt.h>
+
+/* Copyright 2006 - Florian Fainelli <florian@openwrt.org>
+ *
+ * This driver let you control the Cobalt Qube/RaQ front LED
+ *
+ * 255 (max brightness) -> turn the led on
+ * 0 -> turn the led off
+ *
+ * If you want the LED to be blinking on IDE activity, select the IDE trig=
ger
+ */
+
+static void cobalt_led_set(struct led_classdev *led_cdev, enum led_brightn=
ess=20
brightness)
+{
+ =A0 =A0 =A0 switch (brightness) {
+ =A0 =A0 =A0 case LED_OFF:
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 *(volatile uint8_t *) COBALT_LED_BASE =3D 0;
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 break;
+ =A0 =A0 =A0 case LED_FULL:
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 *(volatile uint8_t *) COBALT_LED_BASE =3D COB=
ALT_LED_BAR_LEFT |=20
COBALT_LED_BAR_RIGHT;
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 break;
+ =A0 =A0 =A0 default:
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 return;
+ =A0 =A0 =A0 }
+}
+
+static struct led_classdev cobalt_led =3D {
+ =A0 =A0 =A0 .name =3D "cobalt-front-led",
+ =A0 =A0 =A0 .brightness_set =3D cobalt_led_set,
+#ifdef CONFIG_LEDS_TRIGGER_IDE_DISK
+ =A0 =A0 =A0 .default_trigger =3D "ide-disk",
+#endif
+};
+
+static int __init cobalt_led_init(void)
+{
+ =A0 =A0 =A0 return led_classdev_register(NULL, &cobalt_led);
+}
+
+static void __exit cobalt_led_exit(void)
+{
+ =A0 =A0 =A0 led_classdev_unregister(&cobalt_led);
+}
+
+module_init(cobalt_led_init);
+module_exit(cobalt_led_exit);
+
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("Front LED support for Cobalt Server");
+MODULE_AUTHOR("Florian Fainelli <florian@openwrt.org>");
diff -urN linux-2.6.19.1/drivers/leds/Makefile=20
linux-2.6.19.1.led/drivers/leds/Makefile
=2D-- linux-2.6.19.1/drivers/leds/Makefile =A0 =A0 =A0 =A02006-12-11 20:32:=
53.000000000=20
+0100
+++ linux-2.6.19.1.led/drivers/leds/Makefile =A0 =A02007-01-15 19:22:18.000=
000000=20
+0100
@@ -13,6 +13,7 @@
=A0obj-$(CONFIG_LEDS_S3C24XX) =A0 =A0 =A0 =A0 =A0 =A0 +=3D leds-s3c24xx.o
=A0obj-$(CONFIG_LEDS_AMS_DELTA) =A0 =A0 =A0 =A0 =A0 +=3D leds-ams-delta.o
=A0obj-$(CONFIG_LEDS_NET48XX) =A0 =A0 =A0 =A0 =A0 =A0 +=3D leds-net48xx.o
+obj-$(CONFIG_LEDS_COBALT) =A0 =A0 =A0 =A0 =A0 =A0 =A0+=3D leds-cobalt.o

=A0# LED Triggers
=A0obj-$(CONFIG_LEDS_TRIGGER_TIMER) =A0 =A0 =A0 +=3D ledtrig-timer.o


Le mercredi 17 janvier 2007 17:46, Ralf Baechle a =E9crit=A0:
> On Tue, Jan 16, 2007 at 12:56:00AM +0100, Florian Fainelli wrote:
> > Answering back to myself, since I fixed the stuff using the
> > COBALT_LED_PORT, here the corrected patch. Can you queue this patch for=
 a
> > commit if it sounds acceptable to you ?
> >
> > Thank you very much in advance.
>
> Signed-off???
>
> > +void cobalt_led_set(struct led_classdev *led_cdev, enum led_brightness
> > brightness)
>
> This function is only used locally so should be static.
>
>   Ralf

--nextPart2142788.HERbmlOEkF
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.1 (GNU/Linux)

iD8DBQBFrmUsQ/Yr6D8A81kRAmzKAJ9kmfdoMsAFbTZ+BcR5SC+BvWxDrQCgjtYd
1ef/0HtECtir4vwwnAGW2VY=
=s/gs
-----END PGP SIGNATURE-----

--nextPart2142788.HERbmlOEkF--

From ralf@linux-mips.org Wed Jan 17 18:28:17 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 17 Jan 2007 18:28:18 +0000 (GMT)
Received: from localhost.localdomain ([127.0.0.1]:7100 "EHLO
	dl5rb.ham-radio-op.net") by ftp.linux-mips.org with ESMTP
	id S28574807AbXAQS2R (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Wed, 17 Jan 2007 18:28:17 +0000
Received: from denk.linux-mips.net (denk.linux-mips.net [127.0.0.1])
	by dl5rb.ham-radio-op.net (8.13.8/8.13.8) with ESMTP id l0HITFM4006424;
	Wed, 17 Jan 2007 18:29:16 GMT
Received: (from ralf@localhost)
	by denk.linux-mips.net (8.13.8/8.13.8/Submit) id l0HITEUk006423;
	Wed, 17 Jan 2007 18:29:14 GMT
Date:	Wed, 17 Jan 2007 18:29:14 +0000
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Florian Fainelli <florian.fainelli@int-evry.fr>
Cc:	Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>,
	linux-mips@linux-mips.org
Subject: Re: [PATCH] Add support for Cobalt Server front LED
Message-ID: <20070117182914.GA5733@linux-mips.org>
References: <200701151936.57738.florian.fainelli@int-evry.fr> <200701160056.00748.florian.fainelli@int-evry.fr> <20070117164610.GA1200@linux-mips.org> <200701171904.28281.florian.fainelli@int-evry.fr>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <200701171904.28281.florian.fainelli@int-evry.fr>
User-Agent: Mutt/1.4.2.2i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13696
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips

On Wed, Jan 17, 2007 at 07:04:23PM +0100, Florian Fainelli wrote:

> This should take into account everything that has been said before.

It does (thanks!) - but it arrived in my mailbox is nicely line wrapped
ASCII jibberish, no longer a valid patch ...

  Ralf

From ralf@linux-mips.org Wed Jan 17 18:38:51 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 17 Jan 2007 18:38:52 +0000 (GMT)
Received: from localhost.localdomain ([127.0.0.1]:33507 "EHLO
	dl5rb.ham-radio-op.net") by ftp.linux-mips.org with ESMTP
	id S28575977AbXAQSiv (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Wed, 17 Jan 2007 18:38:51 +0000
Received: from denk.linux-mips.net (denk.linux-mips.net [127.0.0.1])
	by dl5rb.ham-radio-op.net (8.13.8/8.13.8) with ESMTP id l0HIdntt006711;
	Wed, 17 Jan 2007 18:39:49 GMT
Received: (from ralf@localhost)
	by denk.linux-mips.net (8.13.8/8.13.8/Submit) id l0HIdmLK006710;
	Wed, 17 Jan 2007 18:39:48 GMT
Date:	Wed, 17 Jan 2007 18:39:48 +0000
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc:	linux-mips@linux-mips.org
Subject: Re: [PATCH] use name instead of typename for each irq_chip
Message-ID: <20070117183948.GB5733@linux-mips.org>
References: <20070115.000725.92586142.anemo@mba.ocn.ne.jp>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20070115.000725.92586142.anemo@mba.ocn.ne.jp>
User-Agent: Mutt/1.4.2.2i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13697
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips

On Mon, Jan 15, 2007 at 12:07:25AM +0900, Atsushi Nemoto wrote:

> The "typename" field was obsoleted by the "name" field.

The patch is in the queue :-)

  Ralf

From florian.fainelli@int-evry.fr Wed Jan 17 18:39:15 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 17 Jan 2007 18:39:21 +0000 (GMT)
Received: from smtp-ext.int-evry.fr ([157.159.11.17]:60905 "EHLO
	smtp-ext.int-evry.fr") by ftp.linux-mips.org with ESMTP
	id S28576103AbXAQSjA (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Wed, 17 Jan 2007 18:39:00 +0000
Received: from mini.int.alphacore.net (florian.maisel.int-evry.fr [157.159.41.36])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp-ext.int-evry.fr (Postfix) with ESMTP id E93758D1690;
	Wed, 17 Jan 2007 19:37:43 +0100 (CET)
From:	Florian Fainelli <florian.fainelli@int-evry.fr>
To:	Ralf Baechle <ralf@linux-mips.org>
Subject: Re: [PATCH] Add support for Cobalt Server front LED
Date:	Wed, 17 Jan 2007 19:37:57 +0100
User-Agent: KMail/1.9.5
Cc:	Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>,
	linux-mips@linux-mips.org
References: <200701151936.57738.florian.fainelli@int-evry.fr> <200701171904.28281.florian.fainelli@int-evry.fr> <20070117182914.GA5733@linux-mips.org>
In-Reply-To: <20070117182914.GA5733@linux-mips.org>
MIME-Version: 1.0
Content-Type: Multipart/Mixed;
  boundary="Boundary-00=_F0mrFCJaluNnsdZ"
Message-Id: <200701171937.57932.florian.fainelli@int-evry.fr>
Return-Path: <florian.fainelli@int-evry.fr>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13698
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: florian.fainelli@int-evry.fr
Precedence: bulk
X-list: linux-mips

--Boundary-00=_F0mrFCJaluNnsdZ
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Hi Ralf,

Sorry for the line wrapping :)

Signed-off-by: Florian Fainelli <florian.fainelli@int-evry.fr>

Le mercredi 17 janvier 2007 19:29, Ralf Baechle a =E9crit=A0:
> On Wed, Jan 17, 2007 at 07:04:23PM +0100, Florian Fainelli wrote:
> > This should take into account everything that has been said before.
>
> It does (thanks!) - but it arrived in my mailbox is nicely line wrapped
> ASCII jibberish, no longer a valid patch ...
>
>   Ralf

--Boundary-00=_F0mrFCJaluNnsdZ
Content-Type: text/plain;
  charset="iso-8859-1";
  name="leds-cobalt.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="leds-cobalt.patch"

diff -urN linux-2.6.19.1/drivers/leds/Kconfig linux-2.6.19.1.led/drivers/le=
ds/Kconfig
=2D-- linux-2.6.19.1/drivers/leds/Kconfig	2006-12-11 20:32:53.000000000 +01=
00
+++ linux-2.6.19.1.led/drivers/leds/Kconfig	2007-01-15 19:22:00.000000000 +=
0100
@@ -76,6 +76,12 @@
 	  This option enables support for the Soekris net4801 and net4826 error
 	  LED.
=20
+config LEDS_COBALT
+	tristate "LED Support for Cobalt Server front LED"
+	depends on LEDS_CLASS && MIPS_COBALT
+	help
+	  This option enables support for the front LED on Cobalt Server
+
 comment "LED Triggers"
=20
 config LEDS_TRIGGERS
diff -urN linux-2.6.19.1/drivers/leds/leds-cobalt.c linux-2.6.19.1.led/driv=
ers/leds/leds-cobalt.c
=2D-- linux-2.6.19.1/drivers/leds/leds-cobalt.c	1970-01-01 01:00:00.0000000=
00 +0100
+++ linux-2.6.19.1.led/drivers/leds/leds-cobalt.c	2007-01-17 19:35:15.00000=
0000 +0100
@@ -0,0 +1,55 @@
+#include <linux/module.h>
+#include <linux/types.h>
+#include <linux/kernel.h>
+#include <linux/device.h>
+#include <linux/leds.h>
+#include <asm/mach-cobalt/cobalt.h>
+
+/* Copyright 2006 - Florian Fainelli <florian@openwrt.org>
+ *=20
+ * This driver let you control the Cobalt Qube/RaQ front LED
+ *
+ * 255 (max brightness) -> turn the led on
+ * 0 -> turn the led off
+ *
+ * If you want the LED to be blinking on IDE activity, select the IDE trig=
ger
+ */
+
+static void cobalt_led_set(struct led_classdev *led_cdev, enum led_brightn=
ess brightness)
+{
+	switch (brightness) {
+	case LED_OFF:
+		COBALT_LED_PORT =3D 0;
+		break;
+	case LED_FULL:
+		COBALT_LED_PORT =3D COBALT_LED_BAR_LEFT | COBALT_LED_BAR_RIGHT;
+		break;
+	default:
+		return;
+	}
+}
+
+static struct led_classdev cobalt_led =3D {
+       .name =3D "cobalt-front-led",
+       .brightness_set =3D cobalt_led_set,
+#ifdef CONFIG_LEDS_TRIGGER_IDE_DISK
+       .default_trigger =3D "ide-disk",
+#endif
+};
+
+static int __init cobalt_led_init(void)
+{
+	return led_classdev_register(NULL, &cobalt_led);
+}
+
+static void __exit cobalt_led_exit(void)
+{
+	led_classdev_unregister(&cobalt_led);
+}
+
+module_init(cobalt_led_init);
+module_exit(cobalt_led_exit);
+
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("Front LED support for Cobalt Server");
+MODULE_AUTHOR("Florian Fainelli <florian@openwrt.org>");
diff -urN linux-2.6.19.1/drivers/leds/Makefile linux-2.6.19.1.led/drivers/l=
eds/Makefile
=2D-- linux-2.6.19.1/drivers/leds/Makefile	2006-12-11 20:32:53.000000000 +0=
100
+++ linux-2.6.19.1.led/drivers/leds/Makefile	2007-01-15 19:22:18.000000000 =
+0100
@@ -13,6 +13,7 @@
 obj-$(CONFIG_LEDS_S3C24XX)		+=3D leds-s3c24xx.o
 obj-$(CONFIG_LEDS_AMS_DELTA)		+=3D leds-ams-delta.o
 obj-$(CONFIG_LEDS_NET48XX)		+=3D leds-net48xx.o
+obj-$(CONFIG_LEDS_COBALT)		+=3D leds-cobalt.o
=20
 # LED Triggers
 obj-$(CONFIG_LEDS_TRIGGER_TIMER)	+=3D ledtrig-timer.o

--Boundary-00=_F0mrFCJaluNnsdZ--

From ebiederm@xmission.com Wed Jan 17 19:04:04 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 17 Jan 2007 19:04:37 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:63161 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S28577482AbXAQTEE (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Wed, 17 Jan 2007 19:04:04 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0HJ397D016977;
	Wed, 17 Jan 2007 12:03:09 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0HJ2SX7016966;
	Wed, 17 Jan 2007 12:02:28 -0700
X-Authentication-Warning: ebiederm.dsl.xmission.com: eric set sender to ebiederm@xmission.com using -f
From:	ebiederm@xmission.com (Eric W. Biederman)
To:	Kirill Korotaev <dev@sw.ru>
Cc:	Andrew Morton <akpm@osdl.org>, James.Bottomley@SteelEye.com,
	linux-mips@linux-mips.org, linux-parport@lists.infradead.org,
	minyard@acm.org, rtc-linux@googlegroups.com, clemens@ladisch.de,
	heiko.carstens@de.ibm.com, xfs@oss.sgi.com,
	linuxppc-dev@ozlabs.org, paulus@samba.org,
	openipmi-developer@lists.sourceforge.net, linux-390@vm.marist.edu,
	schwidefsky@de.ibm.com, tim@cyberelk.net,
	codalist@TELEMANN.coda.cs.cmu.edu, a.zummo@towertech.it,
	tony.luck@intel.com, vojtech@suse.cz, linux-scsi@vger.kernel.org,
	xfs-masters@oss.sgi.com, linux-ntfs-dev@lists.sourceforge.net,
	netdev@vger.kernel.org, aia21@cantab.net, aharkes@cs.cmu.edu,
	linux-kernel@vger.kernel.org, ralf@linux-mips.org,
	mark.fasheh@oracle.com, coda@cs.cmu.edu, lethal@linux-sh.org,
	kurt.hackel@oracle.com,
	Linux Containers <containers@lists.osdl.org>,
	linux390@de.ibm.com, philb@gnu.org, andrea@suse.de,
	linuxsh-shmedia-dev@lists.sourceforge.net, ak@suse.de
Subject: Re: [PATCH 0/59] Cleanup sysctl
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
	<45AE66AA.1050508@sw.ru>
Date:	Wed, 17 Jan 2007 12:02:27 -0700
In-Reply-To: <45AE66AA.1050508@sw.ru> (Kirill Korotaev's message of "Wed, 17
	Jan 2007 21:10:50 +0300")
Message-ID: <m1y7o18ojg.fsf@ebiederm.dsl.xmission.com>
User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Return-Path: <ebiederm@xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13699
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

Kirill Korotaev <dev@sw.ru> writes:

> Eric, really good job!
>
> Patches: 1-13, 15-24, 26-32, 34-44, 46-49, 52-55, 57 (all except below)
> Acked-By: Kirill Korotaev <dev@openvz.org>
>
> 14/59 - minor (extra space)
> 25/59 - minor note	
> 33/59 - not sorted sysctl IDs
> 45/59 - typo
> 50/59 - copyright/file note
> 51/59 - copyright/file name/kconfig option notes
>
> 56,58,59/59 - will review tomorrow
>
> another issue I have to think over is removal of de->owner.
> Alexey Dobriyan has sent recently patching fixing /proc <-> modules refcounting.
> I guess w/o these patches your changes are not safe if proc_handler or strategy
> are functions from the module.

sysctl uses the logic in use_table/unuse_table to keep it safe from module
remove while it is in use.  And it does the logic in the generic code
in either do_rw_proc or do_sysctl.  This definitely works on the sys_sysctl path
and it appears to work in the do_rw_proc case, things are a little trickier
there so someone may have missed a race somewhere.  In my rewrite of proc
it works exactly like the binary case so we are good there. 

It is certainly the intention of the sysctl implementation that users
should not have to set de->owner.  So if there is a problem with 
removing de->owner it is a bug in the sysctl implementation not in
the code where it was removed.

Normal proc users definitely have to set de->owner to be safe, but sysctl has
always been it's own thing, with different rules. 

Eric

From ebiederm@xmission.com Wed Jan 17 19:32:04 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 17 Jan 2007 19:32:08 +0000 (GMT)
Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:30414 "EHLO
	ebiederm.dsl.xmission.com") by ftp.linux-mips.org with ESMTP
	id S28578025AbXAQTcE (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Wed, 17 Jan 2007 19:32:04 +0000
Received: from ebiederm.dsl.xmission.com (localhost [127.0.0.1])
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Debian-2) with ESMTP id l0HJVO7Y017089;
	Wed, 17 Jan 2007 12:31:24 -0700
Received: (from eric@localhost)
	by ebiederm.dsl.xmission.com (8.13.8/8.13.8/Submit) id l0HJVMOI017088;
	Wed, 17 Jan 2007 12:31:22 -0700
X-Authentication-Warning: ebiederm.dsl.xmission.com: eric set sender to ebiederm@xmission.com using -f
From:	ebiederm@xmission.com (Eric W. Biederman)
To:	Kirill Korotaev <dev@sw.ru>
Cc:	"<Andrew Morton" <akpm@osdl.org>, James.Bottomley@SteelEye.com,
	linux-mips@linux-mips.org, linux-parport@lists.infradead.org,
	minyard@acm.org, rtc-linux@googlegroups.com, clemens@ladisch.de,
	heiko.carstens@de.ibm.com, xfs@oss.sgi.com,
	linuxppc-dev@ozlabs.org, paulus@samba.org,
	openipmi-developer@lists.sourceforge.net, linux-390@vm.marist.edu,
	schwidefsky@de.ibm.com, tim@cyberelk.net,
	codalist@TELEMANN.coda.cs.cmu.edu, a.zummo@towertech.it,
	tony.luck@intel.com, vojtech@suse.cz, linux-scsi@vger.kernel.org,
	xfs-masters@oss.sgi.com, linux-ntfs-dev@lists.sourceforge.net,
	netdev@vger.kernel.org, aia21@cantab.net, aharkes@cs.cmu.edu,
	linux-kernel@vger.kernel.org, ralf@linux-mips.org,
	mark.fasheh@oracle.com, coda@cs.cmu.edu, lethal@linux-sh.org,
	kurt.hackel@oracle.com, containers@lists.osdl.org,
	linux390@de.ibm.com, philb@gnu.org, andrea@suse.de,
	linuxsh-shmedia-dev@lists.sourceforge.net, ak@suse.de
Subject: Re: [PATCH 50/59] sysctl: Move utsname sysctls to their own file
References: <m1ac0jc4no.fsf@ebiederm.dsl.xmission.com>
	<11689656853154-git-send-email-ebiederm@xmission.com>
	<45AE5FDC.5050603@sw.ru>
Date:	Wed, 17 Jan 2007 12:31:22 -0700
In-Reply-To: <45AE5FDC.5050603@sw.ru> (Kirill Korotaev's message of "Wed, 17
	Jan 2007 20:41:48 +0300")
Message-ID: <m1ps9d8n79.fsf@ebiederm.dsl.xmission.com>
User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Return-Path: <ebiederm@xmission.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13700
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ebiederm@xmission.com
Precedence: bulk
X-list: linux-mips

Kirill Korotaev <dev@sw.ru> writes:

> Eric, though I personally don't care much:
> 1. I ask for not setting your authorship/copyright on the code which you just
> copied
>   from other places. Just doesn't look polite IMHO.

I can't claim complete ownership of the code, there was plenty of feed back
and contributions from others but the final form without a big switch
statement is mine.  I certainly can't claim the table, it has been in
that form for years.

If you notice I actually didn't say whose copyright it was :)  just
that I wrote the file.

If there are copyright claims I should include I will be happy to do that.
Mostly I was just trying to find some stupid boiler plate that would work.

> 2. I would propose to not introduce utsname_sysctl.c.
>   both files are too small and minor that I can't see much reasons splitting
> them.

The impact of moving this code out of sysctl.c is a major
simplification, to sysctl.c.  Putting them in their own file means we
can cleanly restrict the code to only be compiled CONFIG_SYSCTL is set.

It is a necessary first step to implementing a per process /proc/sys.

It reorganizes the ipc and utsname sysctl from a terribly fragile
structure to something that is robust and easy to follow.  Code
scattered all throughout sysctl.c was just a disaster.  We had
several instances of having to fix bugs with odd combinations of
CONFIG options, simply because the other spot that needed to be touched
wasn't obvious.

So from my perspective this is an extremely worthwhile change that
will make maintenance easier and is a small first step towards
some nice future functionality.

Eric

From sathesh_edara2003@yahoo.co.in Thu Jan 18 02:33:38 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 18 Jan 2007 02:33:44 +0000 (GMT)
Received: from web7902.mail.in.yahoo.com ([202.86.4.78]:35181 "HELO
	web7902.mail.in.yahoo.com") by ftp.linux-mips.org with SMTP
	id S28584841AbXARCdi (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Thu, 18 Jan 2007 02:33:38 +0000
Received: (qmail 24184 invoked by uid 60001); 18 Jan 2007 02:33:32 -0000
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
  s=s1024; d=yahoo.co.in;
  h=X-YMail-OSG:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID;
  b=V5j2VOLSpuzciVTz56+iXfxDx25UQglX05B2hlYFGPq/DVTHsoqkvv2oPFgx1JpMvJV/TKA4llAi2WDzFhTgudUoCQmxAUUkDCoH5Lh7W/vFmhnKOCG9NrXDcghvI3Qy6aXpEWjfZNrPNE2WWH9LxfKEAb2vbJ9aTsaGUDPGFl8=;
X-YMail-OSG: .wcZcmkVM1kuhDBlQn72POylUfLtSeF2Vp1ZcrVfOV7Vcpm5vVSPahUD.fN7gUMaZZiTmfByYp5OfcMU_9TiS3HgJX6mWxd_cViI3dO_ciy1IzxpRKqh4joWCtMR6WkhMwMYvQsJjMbMmFyhzXdwCyUzkw--
Received: from [206.40.46.114] by web7902.mail.in.yahoo.com via HTTP; Thu, 18 Jan 2007 02:33:31 GMT
Date:	Thu, 18 Jan 2007 02:33:31 +0000 (GMT)
From:	sathesh babu <sathesh_edara2003@yahoo.co.in>
Subject: Setting Write through mode in linux-2.6.18.2 kernel ( MIPS 24KE) 
To:	linux-mips@linux-mips.org
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="0-657535069-1169087611=:24060"
Content-Transfer-Encoding: 8bit
Message-ID: <42504.24060.qm@web7902.mail.in.yahoo.com>
Return-Path: <sathesh_edara2003@yahoo.co.in>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13701
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: sathesh_edara2003@yahoo.co.in
Precedence: bulk
X-list: linux-mips

--0-657535069-1169087611=:24060
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

Hi,
    I am porting linux-2.6.18.2 kernel on MIPS 24KE processor.
  I would like to configure  write through cache mode.
   
  I checked the cache defines ( asm-mips/pgtable-bits.h) .
   
  Only write back mode is defined for MIPS32.
   
  Does the linux-2.6.18.2 kernel ( on MIPS 24KE) have support for write through mode?.
  Could you please tell me write through mode is there in linux-2.6.18.2 kernel for MIPS 24KE.
   
   
  Thanks in advance.
   
  Regards,
  Sathesh
   
   

 				
---------------------------------
 Here’s a new way to find what you're looking for - Yahoo! Answers 
--0-657535069-1169087611=:24060
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

<div>Hi,</div>  <div>&nbsp; I am porting linux-2.6.18.2 kernel on MIPS 24KE processor.</div>  <div>I would like to configure &nbsp;write through cache mode.</div>  <div>&nbsp;</div>  <div>I checked the cache&nbsp;defines&nbsp;( asm-mips/pgtable-bits.h)&nbsp;.</div>  <div>&nbsp;</div>  <div>Only write back mode is defined for MIPS32.</div>  <div>&nbsp;</div>  <div>Does the linux-2.6.18.2 kernel ( on MIPS 24KE) have support for write through mode?.</div>  <div>Could you please tell me write through mode is there in linux-2.6.18.2 kernel for MIPS 24KE.</div>  <div>&nbsp;</div>  <div>&nbsp;</div>  <div>Thanks in advance.</div>  <div>&nbsp;</div>  <div>Regards,</div>  <div>Sathesh</div>  <div>&nbsp;</div>  <div>&nbsp;</div><p>&#32;
	

	
		<hr size=1></hr> 
Here’s a new way to find what you're looking for - <a href="http://us.rd.yahoo.com/mail/in/yanswers/*http://in.answers.yahoo.com/">Yahoo! Answers</a> 
--0-657535069-1169087611=:24060--

From anders.brogestam@avegasystems.com Thu Jan 18 04:33:04 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 18 Jan 2007 04:33:09 +0000 (GMT)
Received: from mail2.opentransfer.com ([69.49.238.3]:18074 "HELO
	mail2.opentransfer.com") by ftp.linux-mips.org with SMTP
	id S28576890AbXAREdE (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Thu, 18 Jan 2007 04:33:04 +0000
Received: (qmail 28375 invoked by uid 399); 18 Jan 2007 04:32:54 -0000
Received: from unknown (HELO ?192.168.1.240?) (150.101.126.138)
  by mail2.opentransfer.com with SMTP; 18 Jan 2007 04:32:54 -0000
Subject: crt0.s for mips
From:	Anders Brogestam <anders.brogestam@avegasystems.com>
To:	linux-mips@linux-mips.org
Content-Type: text/plain
Date:	Thu, 18 Jan 2007 15:35:06 +1100
Message-Id: <1169094906.14832.3.camel@localhost>
Mime-Version: 1.0
X-Mailer: Evolution 2.6.1 
Content-Transfer-Encoding: 7bit
Return-Path: <anders.brogestam@avegasystems.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13702
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: anders.brogestam@avegasystems.com
Precedence: bulk
X-list: linux-mips

Hi.

I am looking for a crt0.s file for the MIPS architecture. Included in
all the Linux kernels that I downloaded and looked in there are only
source for the PPC.

Best Regards
Anders B


From lists@nabble.com Thu Jan 18 08:45:24 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 18 Jan 2007 08:45:30 +0000 (GMT)
Received: from www.nabble.com ([72.21.53.35]:45742 "EHLO talk.nabble.com")
	by ftp.linux-mips.org with ESMTP id S20043418AbXARIpY (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Thu, 18 Jan 2007 08:45:24 +0000
Received: from [72.21.53.38] (helo=jubjub.nabble.com)
	by talk.nabble.com with esmtp (Exim 4.50)
	id 1H7Ste-0008Ct-35
	for linux-mips@linux-mips.org; Thu, 18 Jan 2007 00:45:22 -0800
Message-ID: <8426876.post@talk.nabble.com>
Date:	Thu, 18 Jan 2007 00:45:22 -0800 (PST)
From:	Daniel Laird <danieljlaird@hotmail.com>
To:	linux-mips@linux-mips.org
Subject: Install Headers Target
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Nabble-From: danieljlaird@hotmail.com
Return-Path: <lists@nabble.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13703
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: danieljlaird@hotmail.com
Precedence: bulk
X-list: linux-mips


I have been trying to build a kernel, toolchain and rootfs using buildroot.

Buildroot uses the install-headers target of the kernel to get the headers
to build a toolchain.
I tried to build a the uClibc-gcc toolchain combo was missing 2 header files
to do the build.
This I fixed by patching Kbuild in asm-mips dir
See below:
diff -urN overlay_orig/include/asm-mips/Kbuild
overlay/include/asm-mips/Kbuild
--- a/include/asm-mips/Kbuild	2007-01-17 12:57:20.000000000 +0000
+++b/include/asm-mips/Kbuild	2007-01-17 12:53:46.000000000 +0000
@@ -1,3 +1,3 @@
 include include/asm-generic/Kbuild.asm

-header-y += cachectl.h sgidefs.h sysmips.h
+header-y += asm.h cachectl.h regdef.h sgidefs.h sysmips.h

Is it possible for this to go in? (Any one any problems with this patch)
Is this mailing list the correct one for this patch?

Hope it helps
Daniel Laird

-- 
View this message in context: http://www.nabble.com/Install-Headers-Target-tf3032928.html#a8426876
Sent from the linux-mips main mailing list archive at Nabble.com.


From ths@networkno.de Thu Jan 18 11:09:43 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 18 Jan 2007 11:09:45 +0000 (GMT)
Received: from phoenix.bawue.net ([193.7.176.60]:56472 "EHLO mail.bawue.net")
	by ftp.linux-mips.org with ESMTP id S28580150AbXARLJn (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Thu, 18 Jan 2007 11:09:43 +0000
Received: from lagash (88-106-179-150.dynamic.dsl.as9105.com [88.106.179.150])
	(using TLSv1 with cipher AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mail.bawue.net (Postfix) with ESMTP id 7385F84115;
	Thu, 18 Jan 2007 12:02:27 +0100 (CET)
Received: from ths by lagash with local (Exim 4.63)
	(envelope-from <ths@networkno.de>)
	id 1H7V3R-0001pY-64; Thu, 18 Jan 2007 11:03:37 +0000
Date:	Thu, 18 Jan 2007 11:03:37 +0000
To:	Anders Brogestam <anders.brogestam@avegasystems.com>
Cc:	linux-mips@linux-mips.org
Subject: Re: crt0.s for mips
Message-ID: <20070118110336.GB23469@networkno.de>
References: <1169094906.14832.3.camel@localhost>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <1169094906.14832.3.camel@localhost>
User-Agent: Mutt/1.5.13 (2006-08-11)
From:	Thiemo Seufer <ths@networkno.de>
Return-Path: <ths@networkno.de>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13704
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ths@networkno.de
Precedence: bulk
X-list: linux-mips

Anders Brogestam wrote:
> Hi.
> 
> I am looking for a crt0.s file for the MIPS architecture. Included in
> all the Linux kernels that I downloaded and looked in there are only
> source for the PPC.

The Kernel has not much use for crt0.s, look in (userland) libc code
instead.


Thiemo

From ths@networkno.de Thu Jan 18 11:10:08 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 18 Jan 2007 11:10:10 +0000 (GMT)
Received: from phoenix.bawue.net ([193.7.176.60]:37273 "EHLO mail.bawue.net")
	by ftp.linux-mips.org with ESMTP id S28580152AbXARLJ6 (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Thu, 18 Jan 2007 11:09:58 +0000
Received: from lagash (88-106-179-150.dynamic.dsl.as9105.com [88.106.179.150])
	(using TLSv1 with cipher AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mail.bawue.net (Postfix) with ESMTP id 2C7DBBACBB;
	Thu, 18 Jan 2007 12:05:34 +0100 (CET)
Received: from ths by lagash with local (Exim 4.63)
	(envelope-from <ths@networkno.de>)
	id 1H7V6S-0001pj-1M; Thu, 18 Jan 2007 11:06:44 +0000
Date:	Thu, 18 Jan 2007 11:06:43 +0000
To:	Daniel Laird <danieljlaird@hotmail.com>
Cc:	linux-mips@linux-mips.org
Subject: Re: Install Headers Target
Message-ID: <20070118110643.GC23469@networkno.de>
References: <8426876.post@talk.nabble.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <8426876.post@talk.nabble.com>
User-Agent: Mutt/1.5.13 (2006-08-11)
From:	Thiemo Seufer <ths@networkno.de>
Return-Path: <ths@networkno.de>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13705
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ths@networkno.de
Precedence: bulk
X-list: linux-mips

Daniel Laird wrote:
> 
> I have been trying to build a kernel, toolchain and rootfs using buildroot.
> 
> Buildroot uses the install-headers target of the kernel to get the headers
> to build a toolchain.
> I tried to build a the uClibc-gcc toolchain combo was missing 2 header files
> to do the build.
> This I fixed by patching Kbuild in asm-mips dir
> See below:
> diff -urN overlay_orig/include/asm-mips/Kbuild
> overlay/include/asm-mips/Kbuild
> --- a/include/asm-mips/Kbuild	2007-01-17 12:57:20.000000000 +0000
> +++b/include/asm-mips/Kbuild	2007-01-17 12:53:46.000000000 +0000
> @@ -1,3 +1,3 @@
>  include include/asm-generic/Kbuild.asm
> 
> -header-y += cachectl.h sgidefs.h sysmips.h
> +header-y += asm.h cachectl.h regdef.h sgidefs.h sysmips.h
> 
> Is it possible for this to go in? (Any one any problems with this patch)
> Is this mailing list the correct one for this patch?

For a glibc configuration those files are provided by glibc. I think
uClibc should do the same, the files aren't Linux specific.


Thiemo

From anemo@mba.ocn.ne.jp Thu Jan 18 11:22:58 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 18 Jan 2007 11:23:00 +0000 (GMT)
Received: from topsns2.toshiba-tops.co.jp ([202.230.225.126]:58837 "EHLO
	topsns2.toshiba-tops.co.jp") by ftp.linux-mips.org with ESMTP
	id S28580215AbXARLW6 (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Thu, 18 Jan 2007 11:22:58 +0000
Received: from topsms.toshiba-tops.co.jp by topsns2.toshiba-tops.co.jp
          via smtpd (for ftp.linux-mips.org [194.74.144.162]) with ESMTP; Thu, 18 Jan 2007 20:22:57 +0900
Received: from topsms.toshiba-tops.co.jp (localhost.localdomain [127.0.0.1])
	by localhost.toshiba-tops.co.jp (Postfix) with ESMTP id 60EF13A3E0;
	Thu, 18 Jan 2007 20:22:53 +0900 (JST)
Received: from srd2sd.toshiba-tops.co.jp (srd2sd.toshiba-tops.co.jp [172.17.28.2])
	by topsms.toshiba-tops.co.jp (Postfix) with ESMTP id 4D97C20403;
	Thu, 18 Jan 2007 20:22:53 +0900 (JST)
Received: from localhost (fragile [172.17.28.65])
	by srd2sd.toshiba-tops.co.jp (8.12.10/8.12.10) with ESMTP id l0IBMqW0073293;
	Thu, 18 Jan 2007 20:22:52 +0900 (JST)
	(envelope-from anemo@mba.ocn.ne.jp)
Date:	Thu, 18 Jan 2007 20:22:52 +0900 (JST)
Message-Id: <20070118.202252.29576513.nemoto@toshiba-tops.co.jp>
To:	ths@networkno.de
Cc:	danieljlaird@hotmail.com, linux-mips@linux-mips.org
Subject: Re: Install Headers Target
From:	Atsushi Nemoto <anemo@mba.ocn.ne.jp>
In-Reply-To: <20070118110643.GC23469@networkno.de>
References: <8426876.post@talk.nabble.com>
	<20070118110643.GC23469@networkno.de>
X-Fingerprint: 6ACA 1623 39BD 9A94 9B1A  B746 CA77 FE94 2874 D52F
X-Pgp-Public-Key: http://wwwkeys.pgp.net/pks/lookup?op=get&search=0x2874D52F
X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Return-Path: <anemo@mba.ocn.ne.jp>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13706
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: anemo@mba.ocn.ne.jp
Precedence: bulk
X-list: linux-mips

On Thu, 18 Jan 2007 11:06:43 +0000, Thiemo Seufer <ths@networkno.de> wrote:
> > Is it possible for this to go in? (Any one any problems with this patch)
> > Is this mailing list the correct one for this patch?
> 
> For a glibc configuration those files are provided by glibc. I think
> uClibc should do the same, the files aren't Linux specific.

uClibc svn already do the same.  If any references to asm/asm.h,
asm/regdef was remained in uClibc, please fix them.

---
Atsushi Nemoto

From ralf@linux-mips.org Thu Jan 18 12:01:33 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 18 Jan 2007 12:01:35 +0000 (GMT)
Received: from localhost.localdomain ([127.0.0.1]:1744 "EHLO
	dl5rb.ham-radio-op.net") by ftp.linux-mips.org with ESMTP
	id S20044129AbXARMBd (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Thu, 18 Jan 2007 12:01:33 +0000
Received: from denk.linux-mips.net (denk.linux-mips.net [127.0.0.1])
	by dl5rb.ham-radio-op.net (8.13.8/8.13.8) with ESMTP id l0IC2XkK004809;
	Thu, 18 Jan 2007 12:02:33 GMT
Received: (from ralf@localhost)
	by denk.linux-mips.net (8.13.8/8.13.8/Submit) id l0IC2Xh2004808;
	Thu, 18 Jan 2007 12:02:33 GMT
Date:	Thu, 18 Jan 2007 12:02:33 +0000
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Anders Brogestam <anders.brogestam@avegasystems.com>
Cc:	linux-mips@linux-mips.org
Subject: Re: crt0.s for mips
Message-ID: <20070118120233.GA4440@linux-mips.org>
References: <1169094906.14832.3.camel@localhost>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <1169094906.14832.3.camel@localhost>
User-Agent: Mutt/1.4.2.2i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13707
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips

On Thu, Jan 18, 2007 at 03:35:06PM +1100, Anders Brogestam wrote:

> I am looking for a crt0.s file for the MIPS architecture. Included in
> all the Linux kernels that I downloaded and looked in there are only
> source for the PPC.

crt0 is a file used ages ago for a.out.  So somehow sounds you're trying
a wrong solution - but what problem are you trying to solve anyway?

  Ralf

From ralf@linux-mips.org Thu Jan 18 12:03:52 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 18 Jan 2007 12:03:54 +0000 (GMT)
Received: from localhost.localdomain ([127.0.0.1]:38105 "EHLO
	dl5rb.ham-radio-op.net") by ftp.linux-mips.org with ESMTP
	id S20044139AbXARMDw (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Thu, 18 Jan 2007 12:03:52 +0000
Received: from denk.linux-mips.net (denk.linux-mips.net [127.0.0.1])
	by dl5rb.ham-radio-op.net (8.13.8/8.13.8) with ESMTP id l0IC4rJo004851;
	Thu, 18 Jan 2007 12:04:53 GMT
Received: (from ralf@localhost)
	by denk.linux-mips.net (8.13.8/8.13.8/Submit) id l0IC4qmC004850;
	Thu, 18 Jan 2007 12:04:52 GMT
Date:	Thu, 18 Jan 2007 12:04:52 +0000
From:	Ralf Baechle <ralf@linux-mips.org>
To:	sathesh babu <sathesh_edara2003@yahoo.co.in>
Cc:	linux-mips@linux-mips.org
Subject: Re: Setting Write through mode in linux-2.6.18.2 kernel ( MIPS 24KE)
Message-ID: <20070118120452.GB4440@linux-mips.org>
References: <42504.24060.qm@web7902.mail.in.yahoo.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <42504.24060.qm@web7902.mail.in.yahoo.com>
User-Agent: Mutt/1.4.2.2i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13708
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips

On Thu, Jan 18, 2007 at 02:33:31AM +0000, sathesh babu wrote:

>     I am porting linux-2.6.18.2 kernel on MIPS 24KE processor.

Strange, I though we already did that years ago ...

>   I would like to configure  write through cache mode.
>    
>   I checked the cache defines ( asm-mips/pgtable-bits.h) .
>    
>   Only write back mode is defined for MIPS32.
>    
>   Does the linux-2.6.18.2 kernel ( on MIPS 24KE) have support for write through mode?.
>   Could you please tell me write through mode is there in linux-2.6.18.2 kernel for MIPS 24KE.

Just set CONF_CM_DEFAULT to the cache mode of choice.

But why would you want to use a slower cache mode anyway ...

  Ralf

From lists@nabble.com Thu Jan 18 12:53:04 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 18 Jan 2007 12:53:09 +0000 (GMT)
Received: from www.nabble.com ([72.21.53.35]:55698 "EHLO talk.nabble.com")
	by ftp.linux-mips.org with ESMTP id S28585417AbXARMxE (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Thu, 18 Jan 2007 12:53:04 +0000
Received: from [72.21.53.38] (helo=jubjub.nabble.com)
	by talk.nabble.com with esmtp (Exim 4.50)
	id 1H7WlJ-0001XV-MF
	for linux-mips@linux-mips.org; Thu, 18 Jan 2007 04:53:01 -0800
Message-ID: <8430190.post@talk.nabble.com>
Date:	Thu, 18 Jan 2007 04:53:01 -0800 (PST)
From:	Daniel Laird <danieljlaird@hotmail.com>
To:	linux-mips@linux-mips.org
Subject: Re: Install Headers Target
In-Reply-To: <8426876.post@talk.nabble.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Nabble-From: danieljlaird@hotmail.com
References: <8426876.post@talk.nabble.com>
Return-Path: <lists@nabble.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13709
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: danieljlaird@hotmail.com
Precedence: bulk
X-list: linux-mips




Daniel Laird wrote:
> 
> I have been trying to build a kernel, toolchain and rootfs using
> buildroot.
> 
> Buildroot uses the install-headers target of the kernel to get the headers
> to build a toolchain.
> I tried to build a the uClibc-gcc toolchain combo was missing 2 header
> files to do the build.
> This I fixed by patching Kbuild in asm-mips dir
> See below:
> diff -urN overlay_orig/include/asm-mips/Kbuild
> overlay/include/asm-mips/Kbuild
> --- a/include/asm-mips/Kbuild	2007-01-17 12:57:20.000000000 +0000
> +++b/include/asm-mips/Kbuild	2007-01-17 12:53:46.000000000 +0000
> @@ -1,3 +1,3 @@
>  include include/asm-generic/Kbuild.asm
> 
> -header-y += cachectl.h sgidefs.h sysmips.h
> +header-y += asm.h cachectl.h regdef.h sgidefs.h sysmips.h
> 
> Is it possible for this to go in? (Any one any problems with this patch)
> Is this mailing list the correct one for this patch?
> 
> Hope it helps
> Daniel Laird
> 
> 
Ok, Must be because I am using a released version of uClibc (hence 0.9.28)
and therefore not picked up the necessary fixes.  This should go when 0.9.29
is released!!
Daniel 
-- 
View this message in context: http://www.nabble.com/Install-Headers-Target-tf3032928.html#a8430190
Sent from the linux-mips main mailing list archive at Nabble.com.


From yoichi_yuasa@tripeaks.co.jp Thu Jan 18 13:24:22 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 18 Jan 2007 13:24:27 +0000 (GMT)
Received: from mo30.po.2iij.net ([210.128.50.53]:30216 "EHLO mo30.po.2iij.net")
	by ftp.linux-mips.org with ESMTP id S20044383AbXARNYW (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Thu, 18 Jan 2007 13:24:22 +0000
Received: by mo.po.2iij.net (mo30) id l0IDOFLa099021; Thu, 18 Jan 2007 22:24:15 +0900 (JST)
Received: from localhost.localdomain (69.25.30.125.dy.iij4u.or.jp [125.30.25.69])
	by mbox.po.2iij.net (mbox33) id l0IDO8QA024000
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT);
	Thu, 18 Jan 2007 22:24:09 +0900 (JST)
Date:	Thu, 18 Jan 2007 22:24:08 +0900
From:	Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
To:	Ralf Baechle <ralf@linux-mips.org>
Cc:	yoichi_yuasa@tripeaks.co.jp, linux-mips <linux-mips@linux-mips.org>
Subject: [PATCH][MIPS] fix Cobalt UART resource
Message-Id: <20070118222408.198fb0c1.yoichi_yuasa@tripeaks.co.jp>
Organization: TriPeaks Corporation
X-Mailer: Sylpheed version 1.0.6 (GTK+ 1.2.10; i486-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Return-Path: <yoichi_yuasa@tripeaks.co.jp>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13710
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: yoichi_yuasa@tripeaks.co.jp
Precedence: bulk
X-list: linux-mips

Hi Ralf,

This patch has fixed UART I/O type.
The cobalt UART device is connected to memory resource.

Yoichi

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>

diff -pruN -X mips/Documentation/dontdiff mips-orig/arch/mips/cobalt/setup.c mips/arch/mips/cobalt/setup.c
--- mips-orig/arch/mips/cobalt/setup.c	2006-12-09 19:03:28.738974000 +0900
+++ mips/arch/mips/cobalt/setup.c	2006-12-09 19:32:33.329616250 +0900
@@ -130,7 +130,7 @@ void __init plat_mem_setup(void)
 
 	set_io_port_base(CKSEG1ADDR(GT_DEF_PCI0_IO_BASE));
 
-	/* I/O port resource must include UART and LCD/buttons */
+	/* I/O port resource must include LCD/buttons */
 	ioport_resource.end = 0x0fffffff;
 
 	/* request I/O space for devices used on all i[345]86 PCs */
@@ -149,24 +149,24 @@ void __init plat_mem_setup(void)
 	register_pci_controller(&cobalt_pci_controller);
 #endif
 
-#ifdef CONFIG_SERIAL_8250
 	if (cobalt_board_id > COBALT_BRD_ID_RAQ1) {
-
 #ifdef CONFIG_EARLY_PRINTK
 		cobalt_early_console();
 #endif
 
+#ifdef CONFIG_SERIAL_8250
 		uart.line	= 0;
 		uart.type	= PORT_UNKNOWN;
 		uart.uartclk	= 18432000;
 		uart.irq	= COBALT_SERIAL_IRQ;
-		uart.flags	= UPF_BOOT_AUTOCONF | UPF_SKIP_TEST;
-		uart.iobase	= 0xc800000;
-		uart.iotype	= UPIO_PORT;
+		uart.flags	= UPF_IOREMAP | UPF_BOOT_AUTOCONF |
+				  UPF_SKIP_TEST;
+		uart.iotype	= UPIO_MEM;
+		uart.mapbase	= 0x1c800000;
 
 		early_serial_setup(&uart);
-	}
 #endif
+	}
 }
 
 /*

From yoichi_yuasa@tripeaks.co.jp Thu Jan 18 13:27:16 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 18 Jan 2007 13:27:21 +0000 (GMT)
Received: from mo30.po.2iij.net ([210.128.50.53]:55324 "EHLO mo30.po.2iij.net")
	by ftp.linux-mips.org with ESMTP id S20044398AbXARN1Q (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Thu, 18 Jan 2007 13:27:16 +0000
Received: by mo.po.2iij.net (mo30) id l0IDRDJi099608; Thu, 18 Jan 2007 22:27:13 +0900 (JST)
Received: from localhost.localdomain (69.25.30.125.dy.iij4u.or.jp [125.30.25.69])
	by mbox.po.2iij.net (mbox33) id l0IDRCPg025887
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT);
	Thu, 18 Jan 2007 22:27:12 +0900 (JST)
Date:	Thu, 18 Jan 2007 22:27:11 +0900
From:	Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
To:	Ralf Baechle <ralf@linux-mips.org>
Cc:	yoichi_yuasa@tripeaks.co.jp, linux-mips <linux-mips@linux-mips.org>
Subject: [PATCH][MIPS] update vr41xx IRQ numers
Message-Id: <20070118222711.4e6e4e8b.yoichi_yuasa@tripeaks.co.jp>
Organization: TriPeaks Corporation
X-Mailer: Sylpheed version 1.0.6 (GTK+ 1.2.10; i486-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Return-Path: <yoichi_yuasa@tripeaks.co.jp>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13711
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: yoichi_yuasa@tripeaks.co.jp
Precedence: bulk
X-list: linux-mips

Hi Ralf,

This patch has updated vr41xx IRQ numbers using definitions.

Yoichi

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>

diff -pruN -X mips/Documentation/dontdiff mips-orig/arch/mips/vr41xx/common/irq.c mips/arch/mips/vr41xx/common/irq.c
--- mips-orig/arch/mips/vr41xx/common/irq.c	2006-12-02 22:54:49.989496500 +0900
+++ mips/arch/mips/vr41xx/common/irq.c	2006-12-01 23:53:55.826752500 +0900
@@ -1,7 +1,7 @@
 /*
  *  Interrupt handing routines for NEC VR4100 series.
  *
- *  Copyright (C) 2005  Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
+ *  Copyright (C) 2005-2006  Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -89,22 +89,22 @@ asmlinkage void plat_irq_dispatch(void)
 	unsigned int pending = read_c0_cause() & read_c0_status() & ST0_IM;
 
 	if (pending & CAUSEF_IP7)
-		do_IRQ(7);
+		do_IRQ(TIMER_IRQ);
 	else if (pending & 0x7800) {
 		if (pending & CAUSEF_IP3)
-			irq_dispatch(3);
+			irq_dispatch(INT1_IRQ);
 		else if (pending & CAUSEF_IP4)
-			irq_dispatch(4);
+			irq_dispatch(INT2_IRQ);
 		else if (pending & CAUSEF_IP5)
-			irq_dispatch(5);
+			irq_dispatch(INT3_IRQ);
 		else if (pending & CAUSEF_IP6)
-			irq_dispatch(6);
+			irq_dispatch(INT4_IRQ);
 	} else if (pending & CAUSEF_IP2)
-		irq_dispatch(2);
+		irq_dispatch(INT0_IRQ);
 	else if (pending & CAUSEF_IP0)
-		do_IRQ(0);
+		do_IRQ(MIPS_SOFTINT0_IRQ);
 	else if (pending & CAUSEF_IP1)
-		do_IRQ(1);
+		do_IRQ(MIPS_SOFTINT1_IRQ);
 	else
 		spurious_interrupt();
 }

From ralf@linux-mips.org Thu Jan 18 13:57:09 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 18 Jan 2007 13:57:10 +0000 (GMT)
Received: from localhost.localdomain ([127.0.0.1]:22691 "EHLO
	dl5rb.ham-radio-op.net") by ftp.linux-mips.org with ESMTP
	id S28585562AbXARN5J (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Thu, 18 Jan 2007 13:57:09 +0000
Received: from denk.linux-mips.net (denk.linux-mips.net [127.0.0.1])
	by dl5rb.ham-radio-op.net (8.13.8/8.13.8) with ESMTP id l0IDw8k8018425;
	Thu, 18 Jan 2007 13:58:08 GMT
Received: (from ralf@localhost)
	by denk.linux-mips.net (8.13.8/8.13.8/Submit) id l0IDw7kh018424;
	Thu, 18 Jan 2007 13:58:07 GMT
Date:	Thu, 18 Jan 2007 13:58:07 +0000
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Cc:	linux-mips <linux-mips@linux-mips.org>
Subject: Re: [PATCH][MIPS] update vr41xx IRQ numers
Message-ID: <20070118135807.GA11056@linux-mips.org>
References: <20070118222711.4e6e4e8b.yoichi_yuasa@tripeaks.co.jp>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20070118222711.4e6e4e8b.yoichi_yuasa@tripeaks.co.jp>
User-Agent: Mutt/1.4.2.2i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13712
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips

On Thu, Jan 18, 2007 at 10:27:11PM +0900, Yoichi Yuasa wrote:

Thanks, applied.

  Ralf

From anemo@mba.ocn.ne.jp Thu Jan 18 15:23:52 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 18 Jan 2007 15:23:57 +0000 (GMT)
Received: from mba.ocn.ne.jp ([210.190.142.172]:30403 "HELO smtp.mba.ocn.ne.jp")
	by ftp.linux-mips.org with SMTP id S28573739AbXARPXw (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Thu, 18 Jan 2007 15:23:52 +0000
Received: from localhost (p1212-ipad02funabasi.chiba.ocn.ne.jp [61.214.21.212])
	by smtp.mba.ocn.ne.jp (Postfix) with ESMTP
	id 04C09B614; Fri, 19 Jan 2007 00:23:47 +0900 (JST)
Date:	Fri, 19 Jan 2007 00:23:46 +0900 (JST)
Message-Id: <20070119.002346.74752797.anemo@mba.ocn.ne.jp>
To:	linux-kernel@vger.kernel.org
Cc:	linux-mips@linux-mips.org, akpm@osdl.org, ralf@linux-mips.org
Subject: [PATCH] Make CARDBUS_MEM_SIZE and CARDBUS_IO_SIZE customizable
From:	Atsushi Nemoto <anemo@mba.ocn.ne.jp>
X-Fingerprint: 6ACA 1623 39BD 9A94 9B1A  B746 CA77 FE94 2874 D52F
X-Pgp-Public-Key: http://wwwkeys.pgp.net/pks/lookup?op=get&search=0x2874D52F
X-Mailer: Mew version 3.3 on Emacs 21.4 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Return-Path: <anemo@mba.ocn.ne.jp>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13713
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: anemo@mba.ocn.ne.jp
Precedence: bulk
X-list: linux-mips

CARDBUS_MEM_SIZE was increased to 64MB on 2.6.20-rc2, but larger size
might result in allocation failure for the reserving itself on some
platforms (for example typical 32bit MIPS).  Make it (and
CARDBUS_IO_SIZE too) customizable for such platforms.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
---
diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig
index 3cfb0a3..6085d3d 100644
--- a/drivers/pci/Kconfig
+++ b/drivers/pci/Kconfig
@@ -60,3 +60,19 @@ config HT_IRQ
 	   This allows native hypertransport devices to use interrupts.
 
 	   If unsure say Y.
+
+config PCI_CARDBUS_IO_SIZE
+	int "CardBus IO window size (bytes)"
+	depends on PCI
+	default "256"
+	help
+	  A fixed amount of bus space is reserved for CardBus bridges.
+	  The default value is 256 bytes.
+
+config PCI_CARDBUS_MEM_SIZE
+	int "CardBus Memory window size (megabytes)"
+	depends on PCI
+	default "64"
+	help
+	  A fixed amount of bus space is reserved for CardBus bridges.
+	  The default value is 64 megabytes.
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index 89f3036..046c87b 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -40,8 +40,8 @@
  * FIXME: IO should be max 256 bytes.  However, since we may
  * have a P2P bridge below a cardbus bridge, we need 4K.
  */
-#define CARDBUS_IO_SIZE		(256)
-#define CARDBUS_MEM_SIZE	(64*1024*1024)
+#define CARDBUS_IO_SIZE		CONFIG_PCI_CARDBUS_IO_SIZE
+#define CARDBUS_MEM_SIZE	(CONFIG_PCI_CARDBUS_MEM_SIZE * 1024 * 1024)
 
 static void __devinit
 pbus_assign_resources_sorted(struct pci_bus *bus)

From ralf@linux-mips.org Thu Jan 18 16:02:40 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 18 Jan 2007 16:02:42 +0000 (GMT)
Received: from localhost.localdomain ([127.0.0.1]:22206 "EHLO
	dl5rb.ham-radio-op.net") by ftp.linux-mips.org with ESMTP
	id S28573849AbXARQCk (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Thu, 18 Jan 2007 16:02:40 +0000
Received: from denk.linux-mips.net (denk.linux-mips.net [127.0.0.1])
	by dl5rb.ham-radio-op.net (8.13.8/8.13.8) with ESMTP id l0IG3eVH006549;
	Thu, 18 Jan 2007 16:03:40 GMT
Received: (from ralf@localhost)
	by denk.linux-mips.net (8.13.8/8.13.8/Submit) id l0IG3dQZ006548;
	Thu, 18 Jan 2007 16:03:39 GMT
Date:	Thu, 18 Jan 2007 16:03:38 +0000
From:	Ralf Baechle <ralf@linux-mips.org>
To:	Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc:	linux-kernel@vger.kernel.org, linux-mips@linux-mips.org,
	akpm@osdl.org
Subject: Re: [PATCH] Make CARDBUS_MEM_SIZE and CARDBUS_IO_SIZE customizable
Message-ID: <20070118160338.GA6343@linux-mips.org>
References: <20070119.002346.74752797.anemo@mba.ocn.ne.jp>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20070119.002346.74752797.anemo@mba.ocn.ne.jp>
User-Agent: Mutt/1.4.2.2i
Return-Path: <ralf@linux-mips.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13714
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
X-list: linux-mips

On Fri, Jan 19, 2007 at 12:23:46AM +0900, Atsushi Nemoto wrote:

> CARDBUS_MEM_SIZE was increased to 64MB on 2.6.20-rc2, but larger size
> might result in allocation failure for the reserving itself on some
> platforms (for example typical 32bit MIPS).  Make it (and
> CARDBUS_IO_SIZE too) customizable for such platforms.

Patch looks technically ok to me, so feel free to add my Acked-by: line.

The grief I have with this sort of patch is that this kind of detailed
technical knowledge should not be required by a mortal configuring the
Linux kernel.

  Ralf

From rpjday@mindspring.com Thu Jan 18 16:20:11 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 18 Jan 2007 16:20:16 +0000 (GMT)
Received: from nic.NetDirect.CA ([216.16.235.2]:37610 "EHLO
	rubicon.netdirect.ca") by ftp.linux-mips.org with ESMTP
	id S28573851AbXARQUL (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Thu, 18 Jan 2007 16:20:11 +0000
X-Originating-Ip: 74.109.98.130
Received: from CPE00045a9c397f-CM001225dbafb6.cpe.net.cable.rogers.com (CPE00045a9c397f-CM001225dbafb6.cpe.net.cable.rogers.com [74.109.98.130])
	(authenticated bits=0)
	by rubicon.netdirect.ca (8.13.1/8.13.1) with ESMTP id l0IGJU91021620
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Thu, 18 Jan 2007 11:19:38 -0500
Date:	Thu, 18 Jan 2007 11:14:12 -0500 (EST)
From:	"Robert P. J. Day" <rpjday@mindspring.com>
X-X-Sender: rpjday@CPE00045a9c397f-CM001225dbafb6
To:	Ralf Baechle <ralf@linux-mips.org>
cc:	Atsushi Nemoto <anemo@mba.ocn.ne.jp>, linux-kernel@vger.kernel.org,
	linux-mips@linux-mips.org, akpm@osdl.org
Subject: Re: [PATCH] Make CARDBUS_MEM_SIZE and CARDBUS_IO_SIZE customizable
In-Reply-To: <20070118160338.GA6343@linux-mips.org>
Message-ID: <Pine.LNX.4.64.0701181112410.21156@CPE00045a9c397f-CM001225dbafb6>
References: <20070119.002346.74752797.anemo@mba.ocn.ne.jp>
 <20070118160338.GA6343@linux-mips.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Net-Direct-Inc-MailScanner-Information: Please contact the ISP for more information
X-Net-Direct-Inc-MailScanner: Found to be clean
X-Net-Direct-Inc-MailScanner-SpamCheck:	not spam, SpamAssassin (not cached,
	score=-16.8, required 5, autolearn=not spam, ALL_TRUSTED -1.80,
	BAYES_00 -15.00)
X-Net-Direct-Inc-MailScanner-From: rpjday@mindspring.com
Return-Path: <rpjday@mindspring.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13715
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: rpjday@mindspring.com
Precedence: bulk
X-list: linux-mips

On Thu, 18 Jan 2007, Ralf Baechle wrote:

> On Fri, Jan 19, 2007 at 12:23:46AM +0900, Atsushi Nemoto wrote:
>
> > CARDBUS_MEM_SIZE was increased to 64MB on 2.6.20-rc2, but larger size
> > might result in allocation failure for the reserving itself on some
> > platforms (for example typical 32bit MIPS).  Make it (and
> > CARDBUS_IO_SIZE too) customizable for such platforms.
>
> Patch looks technically ok to me, so feel free to add my Acked-by:
> line.
>
> The grief I have with this sort of patch is that this kind of
> detailed technical knowledge should not be required by a mortal
> configuring the Linux kernel.

that's why help info for options like that should always have a "If
you're unsure about what to say here ..." paragraph.

i'm big on stuff like that.  :-)

rday

From akpm@osdl.org Thu Jan 18 21:53:36 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 18 Jan 2007 21:53:42 +0000 (GMT)
Received: from smtp.osdl.org ([65.172.181.24]:60344 "EHLO smtp.osdl.org")
	by ftp.linux-mips.org with ESMTP id S28574937AbXARVxg (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Thu, 18 Jan 2007 21:53:36 +0000
Received: from shell0.pdx.osdl.net (fw.osdl.org [65.172.181.6])
	by smtp.osdl.org (8.12.8/8.12.8) with ESMTP id l0ILrRFf012409
	(version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO);
	Thu, 18 Jan 2007 13:53:28 -0800
Received: from sony (shell0.pdx.osdl.net [10.9.0.31])
	by shell0.pdx.osdl.net (8.13.1/8.11.6) with SMTP id l0ILrPsv008879;
	Thu, 18 Jan 2007 13:53:26 -0800
Date:	Thu, 18 Jan 2007 13:53:26 -0800
From:	Andrew Morton <akpm@osdl.org>
To:	Ralf Baechle <ralf@linux-mips.org>
Cc:	anemo@mba.ocn.ne.jp, linux-kernel@vger.kernel.org,
	linux-mips@linux-mips.org
Subject: Re: [PATCH] Make CARDBUS_MEM_SIZE and CARDBUS_IO_SIZE customizable
Message-Id: <20070118135326.c0238873.akpm@osdl.org>
In-Reply-To: <20070118160338.GA6343@linux-mips.org>
References: <20070119.002346.74752797.anemo@mba.ocn.ne.jp>
	<20070118160338.GA6343@linux-mips.org>
X-Mailer: Sylpheed version 2.2.4 (GTK+ 2.8.19; i686-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-MIMEDefang-Filter: osdl$Revision: 1.170 $
X-Scanned-By: MIMEDefang 2.36
Return-Path: <akpm@osdl.org>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13716
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: akpm@osdl.org
Precedence: bulk
X-list: linux-mips

> On Thu, 18 Jan 2007 16:03:38 +0000 Ralf Baechle <ralf@linux-mips.org> wrote:
> On Fri, Jan 19, 2007 at 12:23:46AM +0900, Atsushi Nemoto wrote:
> 
> > CARDBUS_MEM_SIZE was increased to 64MB on 2.6.20-rc2, but larger size
> > might result in allocation failure for the reserving itself on some
> > platforms (for example typical 32bit MIPS).  Make it (and
> > CARDBUS_IO_SIZE too) customizable for such platforms.
> 
> Patch looks technically ok to me, so feel free to add my Acked-by: line.
> 
> The grief I have with this sort of patch is that this kind of detailed
> technical knowledge should not be required by a mortal configuring the
> Linux kernel.
> 

Yes, it does rater suck.  A boot option/module parameter would be better.

From wilson@specifix.com Thu Jan 18 23:17:57 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 18 Jan 2007 23:18:01 +0000 (GMT)
Received: from w099.z064220152.sjc-ca.dsl.cnc.net ([64.220.152.99]:44418 "EHLO
	bluesmobile.corp.specifix.com") by ftp.linux-mips.org with ESMTP
	id S28575036AbXARXR5 (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Thu, 18 Jan 2007 23:17:57 +0000
Received: from localhost.localdomain (bluesmobile.specifix.com [64.220.152.99])
	by bluesmobile.corp.specifix.com (Postfix) with ESMTP id 171EF3B830;
	Thu, 18 Jan 2007 15:17:47 -0800 (PST)
Subject: Re: crt0.s for mips
From:	Jim Wilson <wilson@specifix.com>
To:	Anders Brogestam <anders.brogestam@avegasystems.com>
Cc:	linux-mips@linux-mips.org
In-Reply-To: <1169094906.14832.3.camel@localhost>
References: <1169094906.14832.3.camel@localhost>
Content-Type: text/plain
Date:	Thu, 18 Jan 2007 15:17:47 -0800
Message-Id: <1169162267.2542.7.camel@localhost.localdomain>
Mime-Version: 1.0
X-Mailer: Evolution 2.6.3 (2.6.3-1.fc5.5) 
Content-Transfer-Encoding: 7bit
Return-Path: <wilson@specifix.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13717
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: wilson@specifix.com
Precedence: bulk
X-list: linux-mips

On Thu, 2007-01-18 at 15:35 +1100, Anders Brogestam wrote:
> I am looking for a crt0.s file for the MIPS architecture. Included in
> all the Linux kernels that I downloaded and looked in there are only
> source for the PPC.

You can find some example embedded target crt0.s files in the libgloss
directory of the newlib package.  The newlib package can be found on the
sourceware.org web site.  This stuff has nothing to do with linux or the
linux kernel though.  It is meant for running code on bare hardware.
-- 
Jim Wilson, GNU Tools Support, http://www.specifix.com



From Marc_St-Jean@pmc-sierra.com Fri Jan 19 00:23:18 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 19 Jan 2007 00:23:23 +0000 (GMT)
Received: from father.pmc-sierra.com ([216.241.224.13]:9969 "HELO
	father.pmc-sierra.bc.ca") by ftp.linux-mips.org with SMTP
	id S28574739AbXASAXS (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Fri, 19 Jan 2007 00:23:18 +0000
Received: (qmail 17774 invoked by uid 101); 19 Jan 2007 00:23:03 -0000
Received: from unknown (HELO pmxedge2.pmc-sierra.bc.ca) (216.241.226.184)
  by father.pmc-sierra.com with SMTP; 19 Jan 2007 00:23:03 -0000
Received: from bby1exi01.pmc_nt.nt.pmc-sierra.bc.ca (bby1exi01.pmc-sierra.bc.ca [216.241.231.251])
	by pmxedge2.pmc-sierra.bc.ca (8.13.4/8.12.7) with ESMTP id l0J0N329021412;
	Thu, 18 Jan 2007 16:23:03 -0800
Received: by bby1exi01.pmc-sierra.bc.ca with Internet Mail Service (5.5.2657.72)
	id <DCB58CMF>; Thu, 18 Jan 2007 16:23:03 -0800
Message-ID: <45B00F65.6000406@pmc-sierra.com>
From:	Marc St-Jean <Marc_St-Jean@pmc-sierra.com>
To:	linux-mips@linux-mips.org, linux-serial@vger.kernel.org
Subject: [PATCH] serial driver PMC MSP71xx, kernel linux-mips.git master
Date:	Thu, 18 Jan 2007 16:23:01 -0800
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2657.72)
x-originalarrivaltime: 19 Jan 2007 00:23:01.0670 (UTC) FILETIME=[FAA99C60:01C73B5F]
user-agent: Thunderbird 1.5.0.9 (X11/20061206)
Content-Type: text/plain;
	charset="iso-8859-1"
Return-Path: <Marc_St-Jean@pmc-sierra.com>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13718
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: Marc_St-Jean@pmc-sierra.com
Precedence: bulk
X-list: linux-mips

Here is a serial driver patch for the PMC-Sierra MSP71xx device.

There are three different fixes:
1. Fix for THRE errata
2. Fix for Busy Detect on LCR write
3. Workaround for interrupt/data concurrency issue

The first fix is handled cleanly using a UART_BUG_* flag.

The second and third fixes use platform tests. I couldn't think of a
good way to implement them without using tests and not increase code
and structure sizes for platforms not requiring them.

Does anyone have any suggestions on implementing these without the
platform flag?

Thanks,
Marc

Signed-off-by: Marc St-Jean <Marc_St-Jean@pmc-sierra.com>


Index: linux_2_6/drivers/serial/8250.c
===================================================================
RCS file: linux_2_6/drivers/serial/8250.c,v
retrieving revision 1.1.1.7
retrieving revision 1.9
diff -u -r1.1.1.7 -r1.9
--- linux_2_6/drivers/serial/8250.c	19 Oct 2006 21:00:58 -0000	1.1.1.7
+++ linux_2_6/drivers/serial/8250.c	19 Oct 2006 22:08:15 -0000	1.9
@@ -44,6 +44,10 @@
  #include <asm/io.h>
  #include <asm/irq.h>

+#ifdef CONFIG_PMC_MSP
+#include <msp_regs.h>
+#endif
+
  #include "8250.h"

  /*
@@ -130,6 +134,9 @@
  	unsigned char		mcr_mask;	/* mask of user bits */
  	unsigned char		mcr_force;	/* mask of forced bits */
  	unsigned char		lsr_break_flag;
+#ifdef CONFIG_PMC_MSP
+	int					dwapb_lcr;	/* saved LCR for DW APB WAR */
+#endif

  	/*
  	 * We provide a per-port pm hook.
@@ -333,6 +340,10 @@
  static void
  serial_out(struct uart_8250_port *up, int offset, int value)
  {
+#ifdef CONFIG_PMC_MSP
+	/* Save the offset before it's remapped */
+	int dwapb_offset = offset;
+#endif
  	offset = map_8250_out_reg(up, offset) << up->port.regshift;

  	switch (up->port.iotype) {
@@ -342,7 +353,19 @@
  		break;

  	case UPIO_MEM:
+#ifdef CONFIG_PMC_MSP
+		/* Save the LCR value so it can be re-written when a
+		 * Busy Detect interrupt occurs. */
+		if (dwapb_offset == UART_LCR)
+			up->dwapb_lcr = value;
+#endif
  		writeb(value, up->port.membase + offset);
+#ifdef CONFIG_PMC_MSP
+		/* Re-read the IER to ensure any interrupt disabling has
+		 * completed before proceeding with ISR. */
+		if (dwapb_offset == UART_IER)
+			value = serial_in(up, dwapb_offset);
+#endif
  		break;

  	case UPIO_MEM32:
@@ -1016,6 +1039,17 @@
  		up->bugs |= UART_BUG_NOMSR;
  #endif

+	/* Workaround:
+	 * The DesignWare SoC UART part has a bug for all
+	 * versions before 3.03a (2005-07-18)
+	 * In brief, this is a non-standard 16550 in that the THRE interrupt
+	 * will not re-assert itself simply by disabling and re-enabling the
+	 * THRI bit in the IER, it is only re-enabled if a character is actually
+	 * sent out.
+	 */
+	if( up->port.flags & UPF_DW_THRE_BUG )
+		up->bugs |= UART_BUG_DWTHRE;
+
  	serial_outp(up, UART_LCR, save_lcr);

  	if (up->capabilities != uart_config[up->port.type].flags) {
@@ -1141,6 +1175,12 @@
  			iir = serial_in(up, UART_IIR);
  			if (lsr & UART_LSR_TEMT && iir & UART_IIR_NO_INT)
  				transmit_chars(up);
+		} else if (up->bugs & UART_BUG_DWTHRE) {
+			unsigned char lsr, iir;
+			lsr = serial_in(up, UART_LSR);
+			iir = serial_in(up, UART_IIR);
+			if (lsr & UART_LSR_THRE)
+				transmit_chars(up);
  		}
  	}

@@ -1366,6 +1406,31 @@
  			handled = 1;

  			end = NULL;
+#ifdef CONFIG_PMC_MSP
+		} else if ((iir & UART_IER_BUSY) == UART_IER_BUSY) {
+			/*
+			 * The MSP (DesignWare APB UART) serial subsystem has a
+			 * non-standard interrupt condition (0x7) which means
+			 * that the LCR was written while the UART was busy, so
+			 * the LCR was not actually written.  It is cleared by
+			 * reading the special non-standard extended UART status
+			 * register.
+			 */
+			unsigned int tmp;
+			if( up->port.line == 0 )
+				tmp = *UART0_STATUS_REG;
+			else
+				tmp = *UART1_STATUS_REG;
+			
+			/* Check if saved on LCR write */
+			if( up->dwapb_lcr != -1 )
+				serial_outp(up, UART_LCR, up->dwapb_lcr);
+			else
+				printk(KERN_ERR "serial8250: UART BUSY, no LCR write!\n" );
+
+			handled = 1;
+			end = NULL;
+#endif
  		} else if (end == NULL)
  			end = l;

@@ -2191,6 +2256,11 @@
  	for (i = 0; i < nr_uarts; i++) {
  		struct uart_8250_port *up = &serial8250_ports[i];

+#ifdef CONFIG_PMC_MSP
+		/* Initialize saved LCR value */
+		up->dwapb_lcr = -1;
+#endif
+
  		up->port.dev = dev;
  		uart_add_one_port(drv, &up->port);
  	}
Index: linux_2_6/drivers/serial/8250.h
===================================================================
RCS file: linux_2_6/drivers/serial/8250.h,v
retrieving revision 1.1.1.6
retrieving revision 1.4
diff -u -r1.1.1.6 -r1.4
--- linux_2_6/drivers/serial/8250.h	19 Oct 2006 21:00:58 -0000	1.1.1.6
+++ linux_2_6/drivers/serial/8250.h	19 Oct 2006 22:08:15 -0000	1.4
@@ -49,6 +49,7 @@
  #define UART_BUG_QUOT	(1 << 0)	/* UART has buggy quot LSB */
  #define UART_BUG_TXEN	(1 << 1)	/* UART has buggy TX IIR status */
  #define UART_BUG_NOMSR	(1 << 2)	/* UART has buggy MSR status bits (Au1x00) */
+#define UART_BUG_DWTHRE (1 << 3)	/* UART has buggy DesignWare THRE interrupt re-assertion */

  #define PROBE_RSA	(1 << 0)
  #define PROBE_ANY	(~0)
Index: linux_2_6/include/linux/serial_core.h
===================================================================
RCS file: linux_2_6/include/linux/serial_core.h,v
retrieving revision 1.1.1.7
retrieving revision 1.5
diff -u -r1.1.1.7 -r1.5
--- linux_2_6/include/linux/serial_core.h	19 Oct 2006 21:01:02 -0000	1.1.1.7
+++ linux_2_6/include/linux/serial_core.h	19 Oct 2006 22:08:16 -0000	1.5
@@ -258,6 +258,8 @@
  #define UPF_CONS_FLOW		((__force upf_t) (1 << 23))
  #define UPF_SHARE_IRQ		((__force upf_t) (1 << 24))
  #define UPF_BOOT_AUTOCONF	((__force upf_t) (1 << 28))
+#define UPF_DW_THRE_BUG		((__force upf_t)(1 << 29)) /* DesignWare THRE hardware BUG
+														* (cannot be autodetected) */
  #define UPF_DEAD		((__force upf_t) (1 << 30))
  #define UPF_IOREMAP		((__force upf_t) (1 << 31))

Index: linux_2_6/include/linux/serial_reg.h
===================================================================
RCS file: linux_2_6/include/linux/serial_reg.h,v
retrieving revision 1.1.1.2
retrieving revision 1.3
diff -u -r1.1.1.2 -r1.3
--- linux_2_6/include/linux/serial_reg.h	19 Oct 2006 18:29:50 -0000	1.1.1.2
+++ linux_2_6/include/linux/serial_reg.h	19 Oct 2006 19:45:04 -0000	1.3
@@ -218,6 +218,10 @@
  #define UART_FCR_PXAR16	0x80	/* receive FIFO treshold = 16 */
  #define UART_FCR_PXAR32	0xc0	/* receive FIFO treshold = 32 */

+/*
+ * DesignWare APB UART
+ */
+#define UART_IER_BUSY		0x07	/* Busy Detect */





From anemo@mba.ocn.ne.jp Fri Jan 19 03:19:16 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 19 Jan 2007 03:19:20 +0000 (GMT)
Received: from topsns2.toshiba-tops.co.jp ([202.230.225.126]:26764 "EHLO
	topsns2.toshiba-tops.co.jp") by ftp.linux-mips.org with ESMTP
	id S28575941AbXASDTQ (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Fri, 19 Jan 2007 03:19:16 +0000
Received: from topsms.toshiba-tops.co.jp by topsns2.toshiba-tops.co.jp
          via smtpd (for ftp.linux-mips.org [194.74.144.162]) with ESMTP; Fri, 19 Jan 2007 12:19:14 +0900
Received: from topsms.toshiba-tops.co.jp (localhost.localdomain [127.0.0.1])
	by localhost.toshiba-tops.co.jp (Postfix) with ESMTP id 4585341D08;
	Fri, 19 Jan 2007 12:19:12 +0900 (JST)
Received: from srd2sd.toshiba-tops.co.jp (srd2sd.toshiba-tops.co.jp [172.17.28.2])
	by topsms.toshiba-tops.co.jp (Postfix) with ESMTP id 311CA41A5B;
	Fri, 19 Jan 2007 12:19:12 +0900 (JST)
Received: from localhost (fragile [172.17.28.65])
	by srd2sd.toshiba-tops.co.jp (8.12.10/8.12.10) with ESMTP id l0J3JBW0076303;
	Fri, 19 Jan 2007 12:19:11 +0900 (JST)
	(envelope-from anemo@mba.ocn.ne.jp)
Date:	Fri, 19 Jan 2007 12:19:10 +0900 (JST)
Message-Id: <20070119.121910.96686038.nemoto@toshiba-tops.co.jp>
To:	akpm@osdl.org
Cc:	ralf@linux-mips.org, linux-kernel@vger.kernel.org,
	linux-mips@linux-mips.org
Subject: Re: [PATCH] Make CARDBUS_MEM_SIZE and CARDBUS_IO_SIZE customizable
From:	Atsushi Nemoto <anemo@mba.ocn.ne.jp>
In-Reply-To: <20070118135326.c0238873.akpm@osdl.org>
References: <20070119.002346.74752797.anemo@mba.ocn.ne.jp>
	<20070118160338.GA6343@linux-mips.org>
	<20070118135326.c0238873.akpm@osdl.org>
X-Fingerprint: 6ACA 1623 39BD 9A94 9B1A  B746 CA77 FE94 2874 D52F
X-Pgp-Public-Key: http://wwwkeys.pgp.net/pks/lookup?op=get&search=0x2874D52F
X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Return-Path: <anemo@mba.ocn.ne.jp>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13719
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: anemo@mba.ocn.ne.jp
Precedence: bulk
X-list: linux-mips

On Thu, 18 Jan 2007 13:53:26 -0800, Andrew Morton <akpm@osdl.org> wrote:
> > Patch looks technically ok to me, so feel free to add my Acked-by: line.
> > 
> > The grief I have with this sort of patch is that this kind of detailed
> > technical knowledge should not be required by a mortal configuring the
> > Linux kernel.
> > 
> 
> Yes, it does rater suck.  A boot option/module parameter would be better.

OK, here is a revised patch which uses pci= option instead of config
parameters.


Subject: [PATCH] Make CARDBUS_MEM_SIZE and CARDBUS_IO_SIZE customizable

CARDBUS_MEM_SIZE was increased to 64MB on 2.6.20-rc2, but larger size
might result in allocation failure for the reserving itself on some
platforms (for example typical 32bit MIPS).  Make it (and
CARDBUS_IO_SIZE too) customizable by "pci=" option for such platforms.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
---
 Documentation/kernel-parameters.txt |    6 ++++++
 drivers/pci/pci.c                   |    6 ++++++
 drivers/pci/setup-bus.c             |   27 +++++++++++++++------------
 include/linux/pci.h                 |    3 +++
 4 files changed, 30 insertions(+), 12 deletions(-)

diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 25d2985..ace7a9a 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1259,6 +1259,12 @@ and is between 256 and 4096 characters. 
 				This sorting is done to get a device
 				order compatible with older (<= 2.4) kernels.
 		nobfsort	Don't sort PCI devices into breadth-first order.
+		cbiosize=nn[KMG]	A fixed amount of bus space is
+				reserved for CardBus bridges.
+				The default value is 256 bytes.
+		cbmemsize=nn[KMG]	A fixed amount of bus space is
+				reserved for CardBus bridges.
+				The default value is 64 megabytes.
 
 	pcmv=		[HW,PCMCIA] BadgePAD 4
 
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 206c834..639069a 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -1168,6 +1168,12 @@ static int __devinit pci_setup(char *str
 		if (*str && (str = pcibios_setup(str)) && *str) {
 			if (!strcmp(str, "nomsi")) {
 				pci_no_msi();
+			} else if (!strncmp(str, "cbiosize=", 9)) {
+				pci_cardbus_io_size =
+					memparse(str + 9, &str);
+			} else if (!strncmp(str, "cbmemsize=", 10)) {
+				pci_cardbus_mem_size =
+					memparse(str + 10, &str);
 			} else {
 				printk(KERN_ERR "PCI: Unknown option `%s'\n",
 						str);
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index 89f3036..1dfc288 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -40,8 +40,11 @@ #define ROUND_UP(x, a)		(((x) + (a) - 1)
  * FIXME: IO should be max 256 bytes.  However, since we may
  * have a P2P bridge below a cardbus bridge, we need 4K.
  */
-#define CARDBUS_IO_SIZE		(256)
-#define CARDBUS_MEM_SIZE	(64*1024*1024)
+#define DEFAULT_CARDBUS_IO_SIZE		(256)
+#define DEFAULT_CARDBUS_MEM_SIZE	(64*1024*1024)
+/* pci=cbmemsize=nnM,cbiosize=nn can override this */
+unsigned long pci_cardbus_io_size = DEFAULT_CARDBUS_IO_SIZE;
+unsigned long pci_cardbus_mem_size = DEFAULT_CARDBUS_MEM_SIZE;
 
 static void __devinit
 pbus_assign_resources_sorted(struct pci_bus *bus)
@@ -415,12 +418,12 @@ pci_bus_size_cardbus(struct pci_bus *bus
 	 * Reserve some resources for CardBus.  We reserve
 	 * a fixed amount of bus space for CardBus bridges.
 	 */
-	b_res[0].start = CARDBUS_IO_SIZE;
-	b_res[0].end = b_res[0].start + CARDBUS_IO_SIZE - 1;
+	b_res[0].start = pci_cardbus_io_size;
+	b_res[0].end = b_res[0].start + pci_cardbus_io_size - 1;
 	b_res[0].flags |= IORESOURCE_IO;
 
-	b_res[1].start = CARDBUS_IO_SIZE;
-	b_res[1].end = b_res[1].start + CARDBUS_IO_SIZE - 1;
+	b_res[1].start = pci_cardbus_io_size;
+	b_res[1].end = b_res[1].start + pci_cardbus_io_size - 1;
 	b_res[1].flags |= IORESOURCE_IO;
 
 	/*
@@ -440,16 +443,16 @@ pci_bus_size_cardbus(struct pci_bus *bus
 	 * twice the size.
 	 */
 	if (ctrl & PCI_CB_BRIDGE_CTL_PREFETCH_MEM0) {
-		b_res[2].start = CARDBUS_MEM_SIZE;
-		b_res[2].end = b_res[2].start + CARDBUS_MEM_SIZE - 1;
+		b_res[2].start = pci_cardbus_mem_size;
+		b_res[2].end = b_res[2].start + pci_cardbus_mem_size - 1;
 		b_res[2].flags |= IORESOURCE_MEM | IORESOURCE_PREFETCH;
 
-		b_res[3].start = CARDBUS_MEM_SIZE;
-		b_res[3].end = b_res[3].start + CARDBUS_MEM_SIZE - 1;
+		b_res[3].start = pci_cardbus_mem_size;
+		b_res[3].end = b_res[3].start + pci_cardbus_mem_size - 1;
 		b_res[3].flags |= IORESOURCE_MEM;
 	} else {
-		b_res[3].start = CARDBUS_MEM_SIZE * 2;
-		b_res[3].end = b_res[3].start + CARDBUS_MEM_SIZE * 2 - 1;
+		b_res[3].start = pci_cardbus_mem_size * 2;
+		b_res[3].end = b_res[3].start + pci_cardbus_mem_size * 2 - 1;
 		b_res[3].flags |= IORESOURCE_MEM;
 	}
 }
diff --git a/include/linux/pci.h b/include/linux/pci.h
index f3c617e..ff04c69 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -837,5 +837,8 @@ #define PCIPCI_VSFX		16
 #define PCIPCI_ALIMAGIK		32	/* Need low latency setting */
 #define PCIAGP_FAIL		64	/* No PCI to AGP DMA */
 
+extern unsigned long pci_cardbus_io_size;
+extern unsigned long pci_cardbus_mem_size;
+
 #endif /* __KERNEL__ */
 #endif /* LINUX_PCI_H */

From anemo@mba.ocn.ne.jp Fri Jan 19 03:57:56 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 19 Jan 2007 03:58:01 +0000 (GMT)
Received: from topsns2.toshiba-tops.co.jp ([202.230.225.126]:25521 "EHLO
	topsns2.toshiba-tops.co.jp") by ftp.linux-mips.org with ESMTP
	id S28576030AbXASD54 (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Fri, 19 Jan 2007 03:57:56 +0000
Received: from topsms.toshiba-tops.co.jp by topsns2.toshiba-tops.co.jp
          via smtpd (for ftp.linux-mips.org [194.74.144.162]) with ESMTP; Fri, 19 Jan 2007 12:57:54 +0900
Received: from topsms.toshiba-tops.co.jp (localhost.localdomain [127.0.0.1])
	by localhost.toshiba-tops.co.jp (Postfix) with ESMTP id 7131541FA9;
	Fri, 19 Jan 2007 12:57:52 +0900 (JST)
Received: from srd2sd.toshiba-tops.co.jp (srd2sd.toshiba-tops.co.jp [172.17.28.2])
	by topsms.toshiba-tops.co.jp (Postfix) with ESMTP id 5CB06203E0;
	Fri, 19 Jan 2007 12:57:52 +0900 (JST)
Received: from localhost (fragile [172.17.28.65])
	by srd2sd.toshiba-tops.co.jp (8.12.10/8.12.10) with ESMTP id l0J3vpW0076451;
	Fri, 19 Jan 2007 12:57:51 +0900 (JST)
	(envelope-from anemo@mba.ocn.ne.jp)
Date:	Fri, 19 Jan 2007 12:57:51 +0900 (JST)
Message-Id: <20070119.125751.104030382.nemoto@toshiba-tops.co.jp>
To:	akpm@osdl.org
Cc:	ralf@linux-mips.org, linux-kernel@vger.kernel.org,
	linux-mips@linux-mips.org
Subject: Re: [PATCH] Make CARDBUS_MEM_SIZE and CARDBUS_IO_SIZE customizable
From:	Atsushi Nemoto <anemo@mba.ocn.ne.jp>
In-Reply-To: <20070119.121910.96686038.nemoto@toshiba-tops.co.jp>
References: <20070118160338.GA6343@linux-mips.org>
	<20070118135326.c0238873.akpm@osdl.org>
	<20070119.121910.96686038.nemoto@toshiba-tops.co.jp>
X-Fingerprint: 6ACA 1623 39BD 9A94 9B1A  B746 CA77 FE94 2874 D52F
X-Pgp-Public-Key: http://wwwkeys.pgp.net/pks/lookup?op=get&search=0x2874D52F
X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Return-Path: <anemo@mba.ocn.ne.jp>
X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0)
X-Orcpt: rfc822;linux-mips@linux-mips.org
Original-Recipient: rfc822;linux-mips@linux-mips.org
X-archive-position: 13720
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: anemo@mba.ocn.ne.jp
Precedence: bulk
X-list: linux-mips

On Fri, 19 Jan 2007 12:19:10 +0900 (JST), Atsushi Nemoto <anemo@mba.ocn.ne.jp> wrote:
> OK, here is a revised patch which uses pci= option instead of config
> parameters.

Sorry, this patch would cause build failure if setup-bus.c was not
built into kernel.  Revised again.


Subject: [PATCH] Make CARDBUS_MEM_SIZE and CARDBUS_IO_SIZE customizable

CARDBUS_MEM_SIZE was increased to 64MB on 2.6.20-rc2, but larger size
might result in allocation failure for the reserving itself on some
platforms (for example typical 32bit MIPS).  Make it (and
CARDBUS_IO_SIZE too) customizable by "pci=" option for such platforms.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
---
 Documentation/kernel-parameters.txt |    6 ++++++
 drivers/pci/pci.c                   |   16 ++++++++++++++++
 drivers/pci/setup-bus.c             |   27 ++++++++++-----------------
 include/linux/pci.h                 |    3 +++
 4 files changed, 35 insertions(+), 17 deletions(-)

diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 25d2985..ace7a9a 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1259,6 +1259,12 @@ and is between 256 and 4096 characters. 
 				This sorting is done to get a device
 				order compatible with older (<= 2.4) kernels.
 		nobfsort	Don't sort PCI devices into breadth-first order.
+		cbiosize=nn[KMG]	A fixed amount of bus space is
+				reserved for CardBus bridges.
+				The default value is 256 bytes.
+		cbmemsize=nn[KMG]	A fixed amount of bus space is
+				reserved for CardBus bridges.
+				The default value is 64 megabytes.
 
 	pcmv=		[HW,PCMCIA] BadgePAD 4
 
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 206c834..dc7f40e 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -1159,6 +1159,16 @@ static int __devinit pci_init(void)
 	return 0;
 }
 
+/*
+ * FIXME: IO should be max 256 bytes.  However, since we may
+ * have a P2P bridge below a cardbus bridge, we need 4K.
+ */
+#define DEFAULT_CARDBUS_IO_SIZE		(256)
+#define DEFAULT_CARDBUS_MEM_SIZE	(64*1024*1024)
+/* pci=cbmemsize=nnM,cbiosize=nn can override this */
+unsigned long pci_cardbus_io_size = DEFAULT_CARDBUS_IO_SIZE;
+unsigned long pci_cardbus_mem_size = DEFAULT_CARDBUS_MEM_SIZE;
+
 static int __devinit pci_setup(char *str)
 {
 	while (str) {
@@ -1168,6 +1178,12 @@ static int __devinit pci_setup(char *str
 		if (*str && (str = pcibios_setup(str)) && *str) {
 			if (!strcmp(str, "nomsi")) {
 				pci_no_msi();
+			} else if (!strncmp(str, "cbiosize=", 9)) {
+				pci_cardbus_io_size =
+					memparse(str + 9, &str);
+			} else if (!strncmp(str, "cbmemsize=", 10)) {
+				pci_cardbus_mem_size =
+					memparse(str + 10, &str);
 			} else {
 				printk(KERN_ERR "PCI: Unknown option `%s'\n",
 						str);
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index 89f3036..3554f39 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -36,13 +36,6 @@ #endif
 
 #define ROUND_UP(x, a)		(((x) + (a) - 1) & ~((a) - 1))
 
-/*
- * FIXME: IO should be max 256 bytes.  However, since we may
- * have a P2P bridge below a cardbus bridge, we need 4K.
- */
-#define CARDBUS_IO_SIZE		(256)
-#define CARDBUS_MEM_SIZE	(64*1024*1024)
-
 static void __devinit
 pbus_assign_resources_sorted(struct pci_bus *bus)
 {
@@ -415,12 +408,12 @@ pci_bus_size_cardbus(struct pci_bus *bus
 	 * Reserve some resources for CardBus.  We reserve
 	 * a fixed amount of bus space for CardBus bridges.
 	 */
-	b_res[0].start = CARDBUS_IO_SIZE;
-	b_res[0].end = b_res[0].start + CARDBUS_IO_SIZE - 1;
+	b_res[0].start = pci_cardbus_io_size;
+	b_res[0].end = b_res[0].start + pci_cardbus_io_size - 1;
 	b_res[0].flags |= IORESOURCE_IO;
 
-	b_res[1].start = CARDBUS_IO_SIZE;
-	b_res[1].end = b_res[1].start + CARDBUS_IO_SIZE - 1;
+	b_res[1].start = pci_cardbus_io_size;
+	b_res[1].end = b_res[1].start + pci_cardbus_io_size - 1;
 	b_res[1].flags |= IORESOURCE_IO;
 
 	/*
@@ -440,16 +433,16 @@ pci_bus_size_cardbus(struct pci_bus *bus
 	 * twice the size.
 	 */
 	if (ctrl & PCI_CB_BRIDGE_CTL_PREFETCH_MEM0) {
-		b_res[2].start = CARDBUS_MEM_SIZE;
-		b_res[2].end = b_res[2].start + CARDBUS_MEM_SIZE - 1;
+		b_res[2].start = pci_cardbus_mem_size;
+		b_res[2].end = b_res[2].start + pci_cardbus_mem_size - 1;
 		b_res[2].flags |= IORESOURCE_MEM | IORESOURCE_PREFETCH;
 
-		b_res[3].start = CARDBUS_MEM_SIZE;
-		b_res[3].end = b_res[3].start + CARDBUS_MEM_SIZE - 1;
+		b_res[3].start = pci_cardbus_mem_size;
+		b_res[3].end = b_res[3].start + pci_cardbus_mem_size - 1;
 		b_res[3].flags |= IORESOURCE_MEM;
 	} else {
-		b_res[3].start = CARDBUS_MEM_SIZE * 2;
-		b_res[3].end = b_res[3].start + CARDBUS_MEM_SIZE * 2 - 1;
+		b_res[3].start = pci_cardbus_mem_size * 2;
+		b_res[3].end = b_res[3].start + pci_cardbus_mem_size * 2 - 1;
 		b_res[3].flags |= IORESOURCE_MEM;
 	}
 }
diff --git a/include/linux/pci.h b/include/linux/pci.h
index f3c617e..ff04c69 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -837,5 +837,8 @@ #define PCIPCI_VSFX		16
 #define PCIPCI_ALIMAGIK		32	/* Need low latency setting */
 #define PCIAGP_FAIL		64	/* No PCI to AGP DMA */
 
+extern unsigned long pci_cardbus_io_size;
+extern unsigned long pci_cardbus_mem_size;
+
 #endif /* __KERNEL__ */
 #endif /* LINUX_PCI_H */

From ralf@linux-mips.org Fri Jan 19 14:18:08 2007
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 19 Jan 2007 14:18:09 +0000 (GMT)
Received: from localhost.localdomain ([127.0.0.1]:3227 "EHLO
	dl5rb.ham-radio-op.net") by ftp.linux-mips.org with ESMTP
	id S20049432AbXASOSI (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Fri, 19 Jan 2007 14:18:08 +0000
Received: from denk.linux-mips.net (denk.linux-mips.net [127.0.0.1])
	by dl5rb.ham-radio-op.net (8.13.8/8.13.8) with ESMTP id l0JEI227000979;
	Fri, 19 Jan 2007 14:18:02 GMT
Received: (from ralf@localhost)
	by denk.linux-mips.net (8.13.8/8.13.8/Submit) id