Re: [PATCH 5/5] 2.6.13-rc5-mm1, driver for IBM Automatic Server Restart watchdog

2005-08-17 Thread Andrey Panin
On 229, 08 17, 2005 at 01:14:15PM -0700, Andrew Morton wrote:
> Andrey Panin <[EMAIL PROTECTED]> wrote:
> >
> > 
> > This patch adds driver for IBM Automatic Server Restart watchdog hardware
> > found in some IBM eServer xSeries machines. This driver is based on the ugly
> > driver provided by IBM. Driver was tested on IBM eServer 226.
> > 
> > ...
> > +
> > +   case ASMTYPE_JASPER:
> > +   type = "Jaspers ";
> > +
> > +   /* FIXME: need to use pci_config_lock here, but it's not 
> > exported */
> 
> That's gregkh material.
> 
> > +
> > +/* spin_lock_irqsave(_config_lock, flags);*/
> > +
> > +   /* Select the SuperIO chip in the PCI I/O port register */
> > +   outl(0x8000f858, 0xcf8);
> > +
> > +   /* 
> > +* Read the base address for the SuperIO chip.
> > +* Only the lower 16 bits are valid, but the address is word 
> > +* aligned so the last bit must be masked off.
> > +*/
> > +   asr_base = inl(0xcfc) & 0xfffe;
> > +
> > +/* spin_unlock_irqrestore(_config_lock, flags);*/
> >
> > ...
> >
> > +static int asr_ioctl(struct inode *inode, struct file *file,
> > +unsigned int cmd, unsigned long arg)
> > +{
> > +   static const struct watchdog_info ident = {
> > +   .options =  WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT |
> > +   WDIOF_MAGICCLOSE,
> > +   .identity = "IBM ASR"
> > +   };
> > +   void __user *argp = (void __user *)arg;
> > +   int __user *p = argp;
> > +   int heartbeat;
> > +
> > +   switch (cmd) {
> > +   case WDIOC_GETSUPPORT:
> > +   return copy_to_user(argp, , sizeof(ident)) ? 
> > +   -EFAULT : 0;
> > +
> > +   case WDIOC_GETSTATUS:
> > +   case WDIOC_GETBOOTSTATUS:
> > +   return put_user(0, p);
> > +
> > +   case WDIOC_KEEPALIVE:
> > +   asr_toggle();
> > +   return 0;
> > +
> > +
> > +   case WDIOC_SETTIMEOUT:
> > +   if (get_user(heartbeat, p))
> > +   return -EFAULT;
> > +   /* Fall */
> > +
> > +   case WDIOC_GETTIMEOUT:
> > +   heartbeat = 256;
> > +   return put_user(heartbeat, p);
> 
> Something very wrong is happening with WDIOC_SETTIMEOUT and
> WDIOC_GETTIMEOUT.  They're both no-ops and the effect of WDIOC_SETTIMEOUT
> is immidiately overwritten.

Hardware has fixed timeout value, so WDIOC_SETTIMEOUT is noop and 
WDIOC_GETTIMEOUT
always returns 256.

-- 
Andrey Panin| Linux and UNIX system administrator
[EMAIL PROTECTED]   | PGP key: wwwkeys.pgp.net


signature.asc
Description: Digital signature


Re: [PATCH 5/5] 2.6.13-rc5-mm1, driver for IBM Automatic Server Restart watchdog

2005-08-17 Thread Andrew Morton
Andrey Panin <[EMAIL PROTECTED]> wrote:
>
> 
> This patch adds driver for IBM Automatic Server Restart watchdog hardware
> found in some IBM eServer xSeries machines. This driver is based on the ugly
> driver provided by IBM. Driver was tested on IBM eServer 226.
> 
> ...
> +
> + case ASMTYPE_JASPER:
> + type = "Jaspers ";
> +
> + /* FIXME: need to use pci_config_lock here, but it's not 
> exported */

That's gregkh material.

> +
> +/*   spin_lock_irqsave(_config_lock, flags);*/
> +
> + /* Select the SuperIO chip in the PCI I/O port register */
> + outl(0x8000f858, 0xcf8);
> +
> + /* 
> +  * Read the base address for the SuperIO chip.
> +  * Only the lower 16 bits are valid, but the address is word 
> +  * aligned so the last bit must be masked off.
> +  */
> + asr_base = inl(0xcfc) & 0xfffe;
> +
> +/*   spin_unlock_irqrestore(_config_lock, flags);*/
>
> ...
>
> +static int asr_ioctl(struct inode *inode, struct file *file,
> +  unsigned int cmd, unsigned long arg)
> +{
> + static const struct watchdog_info ident = {
> + .options =  WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT |
> + WDIOF_MAGICCLOSE,
> + .identity = "IBM ASR"
> + };
> + void __user *argp = (void __user *)arg;
> + int __user *p = argp;
> + int heartbeat;
> +
> + switch (cmd) {
> + case WDIOC_GETSUPPORT:
> + return copy_to_user(argp, , sizeof(ident)) ? 
> + -EFAULT : 0;
> +
> + case WDIOC_GETSTATUS:
> + case WDIOC_GETBOOTSTATUS:
> + return put_user(0, p);
> +
> + case WDIOC_KEEPALIVE:
> + asr_toggle();
> + return 0;
> +
> +
> + case WDIOC_SETTIMEOUT:
> + if (get_user(heartbeat, p))
> + return -EFAULT;
> + /* Fall */
> +
> + case WDIOC_GETTIMEOUT:
> + heartbeat = 256;
> + return put_user(heartbeat, p);

Something very wrong is happening with WDIOC_SETTIMEOUT and
WDIOC_GETTIMEOUT.  They're both no-ops and the effect of WDIOC_SETTIMEOUT
is immidiately overwritten.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 5/5] 2.6.13-rc5-mm1, driver for IBM Automatic Server Restart watchdog

2005-08-17 Thread Andrew Morton
Andrey Panin [EMAIL PROTECTED] wrote:

 
 This patch adds driver for IBM Automatic Server Restart watchdog hardware
 found in some IBM eServer xSeries machines. This driver is based on the ugly
 driver provided by IBM. Driver was tested on IBM eServer 226.
 
 ...
 +
 + case ASMTYPE_JASPER:
 + type = Jaspers ;
 +
 + /* FIXME: need to use pci_config_lock here, but it's not 
 exported */

That's gregkh material.

 +
 +/*   spin_lock_irqsave(pci_config_lock, flags);*/
 +
 + /* Select the SuperIO chip in the PCI I/O port register */
 + outl(0x8000f858, 0xcf8);
 +
 + /* 
 +  * Read the base address for the SuperIO chip.
 +  * Only the lower 16 bits are valid, but the address is word 
 +  * aligned so the last bit must be masked off.
 +  */
 + asr_base = inl(0xcfc)  0xfffe;
 +
 +/*   spin_unlock_irqrestore(pci_config_lock, flags);*/

 ...

 +static int asr_ioctl(struct inode *inode, struct file *file,
 +  unsigned int cmd, unsigned long arg)
 +{
 + static const struct watchdog_info ident = {
 + .options =  WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT |
 + WDIOF_MAGICCLOSE,
 + .identity = IBM ASR
 + };
 + void __user *argp = (void __user *)arg;
 + int __user *p = argp;
 + int heartbeat;
 +
 + switch (cmd) {
 + case WDIOC_GETSUPPORT:
 + return copy_to_user(argp, ident, sizeof(ident)) ? 
 + -EFAULT : 0;
 +
 + case WDIOC_GETSTATUS:
 + case WDIOC_GETBOOTSTATUS:
 + return put_user(0, p);
 +
 + case WDIOC_KEEPALIVE:
 + asr_toggle();
 + return 0;
 +
 +
 + case WDIOC_SETTIMEOUT:
 + if (get_user(heartbeat, p))
 + return -EFAULT;
 + /* Fall */
 +
 + case WDIOC_GETTIMEOUT:
 + heartbeat = 256;
 + return put_user(heartbeat, p);

Something very wrong is happening with WDIOC_SETTIMEOUT and
WDIOC_GETTIMEOUT.  They're both no-ops and the effect of WDIOC_SETTIMEOUT
is immidiately overwritten.

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 5/5] 2.6.13-rc5-mm1, driver for IBM Automatic Server Restart watchdog

2005-08-17 Thread Andrey Panin
On 229, 08 17, 2005 at 01:14:15PM -0700, Andrew Morton wrote:
 Andrey Panin [EMAIL PROTECTED] wrote:
 
  
  This patch adds driver for IBM Automatic Server Restart watchdog hardware
  found in some IBM eServer xSeries machines. This driver is based on the ugly
  driver provided by IBM. Driver was tested on IBM eServer 226.
  
  ...
  +
  +   case ASMTYPE_JASPER:
  +   type = Jaspers ;
  +
  +   /* FIXME: need to use pci_config_lock here, but it's not 
  exported */
 
 That's gregkh material.
 
  +
  +/* spin_lock_irqsave(pci_config_lock, flags);*/
  +
  +   /* Select the SuperIO chip in the PCI I/O port register */
  +   outl(0x8000f858, 0xcf8);
  +
  +   /* 
  +* Read the base address for the SuperIO chip.
  +* Only the lower 16 bits are valid, but the address is word 
  +* aligned so the last bit must be masked off.
  +*/
  +   asr_base = inl(0xcfc)  0xfffe;
  +
  +/* spin_unlock_irqrestore(pci_config_lock, flags);*/
 
  ...
 
  +static int asr_ioctl(struct inode *inode, struct file *file,
  +unsigned int cmd, unsigned long arg)
  +{
  +   static const struct watchdog_info ident = {
  +   .options =  WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT |
  +   WDIOF_MAGICCLOSE,
  +   .identity = IBM ASR
  +   };
  +   void __user *argp = (void __user *)arg;
  +   int __user *p = argp;
  +   int heartbeat;
  +
  +   switch (cmd) {
  +   case WDIOC_GETSUPPORT:
  +   return copy_to_user(argp, ident, sizeof(ident)) ? 
  +   -EFAULT : 0;
  +
  +   case WDIOC_GETSTATUS:
  +   case WDIOC_GETBOOTSTATUS:
  +   return put_user(0, p);
  +
  +   case WDIOC_KEEPALIVE:
  +   asr_toggle();
  +   return 0;
  +
  +
  +   case WDIOC_SETTIMEOUT:
  +   if (get_user(heartbeat, p))
  +   return -EFAULT;
  +   /* Fall */
  +
  +   case WDIOC_GETTIMEOUT:
  +   heartbeat = 256;
  +   return put_user(heartbeat, p);
 
 Something very wrong is happening with WDIOC_SETTIMEOUT and
 WDIOC_GETTIMEOUT.  They're both no-ops and the effect of WDIOC_SETTIMEOUT
 is immidiately overwritten.

Hardware has fixed timeout value, so WDIOC_SETTIMEOUT is noop and 
WDIOC_GETTIMEOUT
always returns 256.

-- 
Andrey Panin| Linux and UNIX system administrator
[EMAIL PROTECTED]   | PGP key: wwwkeys.pgp.net


signature.asc
Description: Digital signature


Re: 2.6.13-rc5-mm1: BUG: rwlock recursion on CPU#0

2005-08-15 Thread Zwane Mwaikambo
On Mon, 15 Aug 2005, Harald Welte wrote:

> On Sun, Aug 14, 2005 at 08:15:53PM -0600, Zwane Mwaikambo wrote:
> 
> > Is the following patch correct? ip_conntrack_event_cache should never be 
> > called with ip_conntrack_lock held and ct_add_counters does not need to be 
> > called with ip_conntrack_lock held.
> 
> No, it's not correct.  ct_add_countes has to be called from within
> write_lock_bh() on ip_conntrack_lock.
> 
> So if you keep the ct_add_counters() call where it is and only apply the
> rest of your patch (i.e. deferring of ip_conntrack_event_cache() call),
> then I think your patch would work.
> 
> However, the whole eventcache needs to be audited, it's called from a
> number of places.
> 
> As Patrick wrote he's working on a solution, I'm not going to intervene
> or replicate his work.  As a interim solution I'd suggest disabling
> CONFIG_IP_NF_CT_ACCT [which can't be vital anyway, since it was only
> added in net-2.6.14 (and thus -mm)].

Thanks for the explanation Harald, i based the ct_add_counters assumption 
on other callers of it.

Thanks,
Zwane

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.13-rc5-mm1: BUG: rwlock recursion on CPU#0

2005-08-15 Thread Harald Welte
On Sun, Aug 14, 2005 at 08:15:53PM -0600, Zwane Mwaikambo wrote:

> Is the following patch correct? ip_conntrack_event_cache should never be 
> called with ip_conntrack_lock held and ct_add_counters does not need to be 
> called with ip_conntrack_lock held.

No, it's not correct.  ct_add_countes has to be called from within
write_lock_bh() on ip_conntrack_lock.

So if you keep the ct_add_counters() call where it is and only apply the
rest of your patch (i.e. deferring of ip_conntrack_event_cache() call),
then I think your patch would work.

However, the whole eventcache needs to be audited, it's called from a
number of places.

As Patrick wrote he's working on a solution, I'm not going to intervene
or replicate his work.  As a interim solution I'd suggest disabling
CONFIG_IP_NF_CT_ACCT [which can't be vital anyway, since it was only
added in net-2.6.14 (and thus -mm)].

Cheers,
-- 
- Harald Welte <[EMAIL PROTECTED]> http://netfilter.org/

  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."-- Paul Vixie


pgp4mtnL5UmbM.pgp
Description: PGP signature


Re: 2.6.13-rc5-mm1: BUG: rwlock recursion on CPU#0

2005-08-15 Thread Harald Welte
On Sun, Aug 14, 2005 at 08:15:53PM -0600, Zwane Mwaikambo wrote:

 Is the following patch correct? ip_conntrack_event_cache should never be 
 called with ip_conntrack_lock held and ct_add_counters does not need to be 
 called with ip_conntrack_lock held.

No, it's not correct.  ct_add_countes has to be called from within
write_lock_bh() on ip_conntrack_lock.

So if you keep the ct_add_counters() call where it is and only apply the
rest of your patch (i.e. deferring of ip_conntrack_event_cache() call),
then I think your patch would work.

However, the whole eventcache needs to be audited, it's called from a
number of places.

As Patrick wrote he's working on a solution, I'm not going to intervene
or replicate his work.  As a interim solution I'd suggest disabling
CONFIG_IP_NF_CT_ACCT [which can't be vital anyway, since it was only
added in net-2.6.14 (and thus -mm)].

Cheers,
-- 
- Harald Welte [EMAIL PROTECTED] http://netfilter.org/

  Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed.-- Paul Vixie


pgp4mtnL5UmbM.pgp
Description: PGP signature


Re: 2.6.13-rc5-mm1: BUG: rwlock recursion on CPU#0

2005-08-15 Thread Zwane Mwaikambo
On Mon, 15 Aug 2005, Harald Welte wrote:

 On Sun, Aug 14, 2005 at 08:15:53PM -0600, Zwane Mwaikambo wrote:
 
  Is the following patch correct? ip_conntrack_event_cache should never be 
  called with ip_conntrack_lock held and ct_add_counters does not need to be 
  called with ip_conntrack_lock held.
 
 No, it's not correct.  ct_add_countes has to be called from within
 write_lock_bh() on ip_conntrack_lock.
 
 So if you keep the ct_add_counters() call where it is and only apply the
 rest of your patch (i.e. deferring of ip_conntrack_event_cache() call),
 then I think your patch would work.
 
 However, the whole eventcache needs to be audited, it's called from a
 number of places.
 
 As Patrick wrote he's working on a solution, I'm not going to intervene
 or replicate his work.  As a interim solution I'd suggest disabling
 CONFIG_IP_NF_CT_ACCT [which can't be vital anyway, since it was only
 added in net-2.6.14 (and thus -mm)].

Thanks for the explanation Harald, i based the ct_add_counters assumption 
on other callers of it.

Thanks,
Zwane

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.13-rc5-mm1: BUG: rwlock recursion on CPU#0

2005-08-14 Thread Zwane Mwaikambo
On Sun, 14 Aug 2005, Rafael J. Wysocki wrote:

> I've got the following BUG on Asus L5D (x86-64) with the 2.6.13-rc5-mm1 
> kernel:
> 
> BUG: rwlock recursion on CPU#0, nscd/3668, 8817d4a0
> 
> Call Trace:{add_preempt_count+105} 
> {rwlock_bug+114}
>{_raw_write_lock+62} 
> {_write_lock_bh+40}
>{:ip_conntrack:destroy_conntrack+196}
>{:ip_conntrack:__ip_ct_event_cache_init+165}
>{:ip_conntrack:ip_ct_refresh_acct+249}
>{:ip_conntrack:udp_packet+47} 
> {:ip_conntrack:ip_conntrack_in+1059}
>{:ip_conntrack:ip_conntrack_local+76}
>{nf_iterate+92} {dst_output+0}
>{nf_hook_slow+142} {dst_output+0}
>{ip_push_pending_frames+895} 
> {lock_sock+201}
>{udp_push_pending_frames+574} 
> {udp_sendmsg+1703}
>{current_fs_time+78} 
> {file_read_actor+60}
>{update_atime+76} 
> {do_generic_mapping_read+1194}
>{inet_sendmsg+86} 
> {sock_sendmsg+271}
>{add_preempt_count+105} 
> {free_hot_cold_page+270}
>{free_hot_page+11} 
> {add_preempt_count+105}
>{autoremove_wake_function+0} 
> {sockfd_lookup+28}
>{sys_sendto+260} {do_sys_poll+851}
>{__pollwait+0} {system_call+126}
>
> ---
> | preempt count: 0303 ]
> | 3 level deep critical section nesting:
> 
> .. []  nf_hook_slow+0x35/0x160
> .[] ..   ( <= ip_push_pending_frames+0x37f/0x490)
> .. []  _write_lock_bh+0x20/0x30
> .[] ..   ( <= ip_ct_refresh_acct+0xb0/0x160 
> [ip_conntrack])
> .. []  _write_lock_bh+0x20/0x30
> .[] ..   ( <= destroy_conntrack+0xc4/0x180 
> [ip_conntrack])

Is the following patch correct? ip_conntrack_event_cache should never be 
called with ip_conntrack_lock held and ct_add_counters does not need to be 
called with ip_conntrack_lock held.

Index: linux-2.6.13-rc5-mm1/net/ipv4/netfilter/ip_conntrack_core.c
===
RCS file: 
/home/cvsroot/linux-2.6.13-rc5-mm1/net/ipv4/netfilter/ip_conntrack_core.c,v
retrieving revision 1.1.1.1
diff -u -p -B -r1.1.1.1 ip_conntrack_core.c
--- linux-2.6.13-rc5-mm1/net/ipv4/netfilter/ip_conntrack_core.c 7 Aug 2005 
21:38:40 -   1.1.1.1
+++ linux-2.6.13-rc5-mm1/net/ipv4/netfilter/ip_conntrack_core.c 15 Aug 2005 
02:09:23 -
@@ -1139,15 +1139,20 @@ void ip_ct_refresh_acct(struct ip_conntr
ct->timeout.expires = extra_jiffies;
ct_add_counters(ct, ctinfo, skb);
} else {
+   int do_event_cache = 0;
+
write_lock_bh(_conntrack_lock);
/* Need del_timer for race avoidance (may already be dying). */
if (del_timer(>timeout)) {
ct->timeout.expires = jiffies + extra_jiffies;
add_timer(>timeout);
-   ip_conntrack_event_cache(IPCT_REFRESH, skb);
+   do_event_cache = 1;
}
-   ct_add_counters(ct, ctinfo, skb);
write_unlock_bh(_conntrack_lock);
+
+   if (do_event_cache)
+   ip_conntrack_event_cache(IPCT_REFRESH, skb);
+   ct_add_counters(ct, ctinfo, skb);
}
 }
 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.13-rc5-mm1: BUG: rwlock recursion on CPU#0

2005-08-14 Thread Patrick McHardy
Rafael J. Wysocki wrote:
> I've got the following BUG on Asus L5D (x86-64) with the 2.6.13-rc5-mm1 
> kernel:
> 
> BUG: rwlock recursion on CPU#0, nscd/3668, 8817d4a0
> 
> Call Trace:{add_preempt_count+105} 
> {rwlock_bug+114}
>{_raw_write_lock+62} 
> {_write_lock_bh+40}
>{:ip_conntrack:destroy_conntrack+196}
>{:ip_conntrack:__ip_ct_event_cache_init+165}
>{:ip_conntrack:ip_ct_refresh_acct+249}
>{:ip_conntrack:udp_packet+47} 
> {:ip_conntrack:ip_conntrack_in+1059}
>{:ip_conntrack:ip_conntrack_local+76}
>{nf_iterate+92} {dst_output+0}
>{nf_hook_slow+142} {dst_output+0}
>{ip_push_pending_frames+895} 
> {lock_sock+201}
>{udp_push_pending_frames+574} 
> {udp_sendmsg+1703}
>{current_fs_time+78} 
> {file_read_actor+60}
>{update_atime+76} 
> {do_generic_mapping_read+1194}
>{inet_sendmsg+86} 
> {sock_sendmsg+271}
>{add_preempt_count+105} 
> {free_hot_cold_page+270}
>{free_hot_page+11} 
> {add_preempt_count+105}
>{autoremove_wake_function+0} 
> {sockfd_lookup+28}
>{sys_sendto+260} {do_sys_poll+851}
>{__pollwait+0} {system_call+126}

I fear my event cache fixes are responsible for this, we must not cache
events while holding a lock anymore because we might need to deliver
old cached events. I'll try to come up with a fix later.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


2.6.13-rc5-mm1: BUG: rwlock recursion on CPU#0

2005-08-14 Thread Rafael J. Wysocki
Hi,

I've got the following BUG on Asus L5D (x86-64) with the 2.6.13-rc5-mm1 kernel:

BUG: rwlock recursion on CPU#0, nscd/3668, 8817d4a0

Call Trace:{add_preempt_count+105} 
{rwlock_bug+114}
   {_raw_write_lock+62} 
{_write_lock_bh+40}
   {:ip_conntrack:destroy_conntrack+196}
   {:ip_conntrack:__ip_ct_event_cache_init+165}
   {:ip_conntrack:ip_ct_refresh_acct+249}
   {:ip_conntrack:udp_packet+47} 
{:ip_conntrack:ip_conntrack_in+1059}
   {:ip_conntrack:ip_conntrack_local+76}
   {nf_iterate+92} {dst_output+0}
   {nf_hook_slow+142} {dst_output+0}
   {ip_push_pending_frames+895} 
{lock_sock+201}
   {udp_push_pending_frames+574} 
{udp_sendmsg+1703}
   {current_fs_time+78} 
{file_read_actor+60}
   {update_atime+76} 
{do_generic_mapping_read+1194}
   {inet_sendmsg+86} {sock_sendmsg+271}
   {add_preempt_count+105} 
{free_hot_cold_page+270}
   {free_hot_page+11} 
{add_preempt_count+105}
   {autoremove_wake_function+0} 
{sockfd_lookup+28}
   {sys_sendto+260} {do_sys_poll+851}
   {__pollwait+0} {system_call+126}
   
---
| preempt count: 0303 ]
| 3 level deep critical section nesting:

.. []  nf_hook_slow+0x35/0x160
.[] ..   ( <= ip_push_pending_frames+0x37f/0x490)
.. []  _write_lock_bh+0x20/0x30
.[] ..   ( <= ip_ct_refresh_acct+0xb0/0x160 
[ip_conntrack])
.. []  _write_lock_bh+0x20/0x30
.[] ..   ( <= destroy_conntrack+0xc4/0x180 [ip_conntrack])

It does not seem to be easily reproducible.

Greets,
Rafael


-- 
- Would you tell me, please, which way I ought to go from here?
- That depends a good deal on where you want to get to.
-- Lewis Carroll "Alice's Adventures in Wonderland"
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


2.6.13-rc5-mm1: BUG: rwlock recursion on CPU#0

2005-08-14 Thread Rafael J. Wysocki
Hi,

I've got the following BUG on Asus L5D (x86-64) with the 2.6.13-rc5-mm1 kernel:

BUG: rwlock recursion on CPU#0, nscd/3668, 8817d4a0

Call Trace:80241ca9{add_preempt_count+105} 
80241682{rwlock_bug+114}
   8024179e{_raw_write_lock+62} 
80350f48{_write_lock_bh+40}
   88171824{:ip_conntrack:destroy_conntrack+196}
   88170435{:ip_conntrack:__ip_ct_event_cache_init+165}
   88170549{:ip_conntrack:ip_ct_refresh_acct+249}
   88173c4f{:ip_conntrack:udp_packet+47} 
88172143{:ip_conntrack:ip_conntrack_in+1059}
   8816fb4c{:ip_conntrack:ip_conntrack_local+76}
   802fe7ec{nf_iterate+92} 80311d90{dst_output+0}
   802ff3de{nf_hook_slow+142} 80311d90{dst_output+0}
   803123bf{ip_push_pending_frames+895} 
802eade9{lock_sock+201}
   8032e72e{udp_push_pending_frames+574} 
8032ffc7{udp_sendmsg+1703}
   8013874e{current_fs_time+78} 
8015c03c{file_read_actor+60}
   80199b6c{update_atime+76} 
8015e8fa{do_generic_mapping_read+1194}
   80335946{inet_sendmsg+86} 802e7dff{sock_sendmsg+271}
   80241ca9{add_preempt_count+105} 
8016153e{free_hot_cold_page+270}
   801615bb{free_hot_page+11} 
80241ca9{add_preempt_count+105}
   8014a670{autoremove_wake_function+0} 
802e846c{sockfd_lookup+28}
   802e9c64{sys_sendto+260} 80193003{do_sys_poll+851}
   80193de0{__pollwait+0} 8010eb3e{system_call+126}
   
---
| preempt count: 0303 ]
| 3 level deep critical section nesting:

.. [802ff385]  nf_hook_slow+0x35/0x160
.[803123bf] ..   ( = ip_push_pending_frames+0x37f/0x490)
.. [80350f40]  _write_lock_bh+0x20/0x30
.[88170500] ..   ( = ip_ct_refresh_acct+0xb0/0x160 
[ip_conntrack])
.. [80350f40]  _write_lock_bh+0x20/0x30
.[88171824] ..   ( = destroy_conntrack+0xc4/0x180 [ip_conntrack])

It does not seem to be easily reproducible.

Greets,
Rafael


-- 
- Would you tell me, please, which way I ought to go from here?
- That depends a good deal on where you want to get to.
-- Lewis Carroll Alice's Adventures in Wonderland
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.13-rc5-mm1: BUG: rwlock recursion on CPU#0

2005-08-14 Thread Patrick McHardy
Rafael J. Wysocki wrote:
 I've got the following BUG on Asus L5D (x86-64) with the 2.6.13-rc5-mm1 
 kernel:
 
 BUG: rwlock recursion on CPU#0, nscd/3668, 8817d4a0
 
 Call Trace:80241ca9{add_preempt_count+105} 
 80241682{rwlock_bug+114}
8024179e{_raw_write_lock+62} 
 80350f48{_write_lock_bh+40}
88171824{:ip_conntrack:destroy_conntrack+196}
88170435{:ip_conntrack:__ip_ct_event_cache_init+165}
88170549{:ip_conntrack:ip_ct_refresh_acct+249}
88173c4f{:ip_conntrack:udp_packet+47} 
 88172143{:ip_conntrack:ip_conntrack_in+1059}
8816fb4c{:ip_conntrack:ip_conntrack_local+76}
802fe7ec{nf_iterate+92} 80311d90{dst_output+0}
802ff3de{nf_hook_slow+142} 80311d90{dst_output+0}
803123bf{ip_push_pending_frames+895} 
 802eade9{lock_sock+201}
8032e72e{udp_push_pending_frames+574} 
 8032ffc7{udp_sendmsg+1703}
8013874e{current_fs_time+78} 
 8015c03c{file_read_actor+60}
80199b6c{update_atime+76} 
 8015e8fa{do_generic_mapping_read+1194}
80335946{inet_sendmsg+86} 
 802e7dff{sock_sendmsg+271}
80241ca9{add_preempt_count+105} 
 8016153e{free_hot_cold_page+270}
801615bb{free_hot_page+11} 
 80241ca9{add_preempt_count+105}
8014a670{autoremove_wake_function+0} 
 802e846c{sockfd_lookup+28}
802e9c64{sys_sendto+260} 80193003{do_sys_poll+851}
80193de0{__pollwait+0} 8010eb3e{system_call+126}

I fear my event cache fixes are responsible for this, we must not cache
events while holding a lock anymore because we might need to deliver
old cached events. I'll try to come up with a fix later.

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.13-rc5-mm1: BUG: rwlock recursion on CPU#0

2005-08-14 Thread Zwane Mwaikambo
On Sun, 14 Aug 2005, Rafael J. Wysocki wrote:

 I've got the following BUG on Asus L5D (x86-64) with the 2.6.13-rc5-mm1 
 kernel:
 
 BUG: rwlock recursion on CPU#0, nscd/3668, 8817d4a0
 
 Call Trace:80241ca9{add_preempt_count+105} 
 80241682{rwlock_bug+114}
8024179e{_raw_write_lock+62} 
 80350f48{_write_lock_bh+40}
88171824{:ip_conntrack:destroy_conntrack+196}
88170435{:ip_conntrack:__ip_ct_event_cache_init+165}
88170549{:ip_conntrack:ip_ct_refresh_acct+249}
88173c4f{:ip_conntrack:udp_packet+47} 
 88172143{:ip_conntrack:ip_conntrack_in+1059}
8816fb4c{:ip_conntrack:ip_conntrack_local+76}
802fe7ec{nf_iterate+92} 80311d90{dst_output+0}
802ff3de{nf_hook_slow+142} 80311d90{dst_output+0}
803123bf{ip_push_pending_frames+895} 
 802eade9{lock_sock+201}
8032e72e{udp_push_pending_frames+574} 
 8032ffc7{udp_sendmsg+1703}
8013874e{current_fs_time+78} 
 8015c03c{file_read_actor+60}
80199b6c{update_atime+76} 
 8015e8fa{do_generic_mapping_read+1194}
80335946{inet_sendmsg+86} 
 802e7dff{sock_sendmsg+271}
80241ca9{add_preempt_count+105} 
 8016153e{free_hot_cold_page+270}
801615bb{free_hot_page+11} 
 80241ca9{add_preempt_count+105}
8014a670{autoremove_wake_function+0} 
 802e846c{sockfd_lookup+28}
802e9c64{sys_sendto+260} 80193003{do_sys_poll+851}
80193de0{__pollwait+0} 8010eb3e{system_call+126}

 ---
 | preempt count: 0303 ]
 | 3 level deep critical section nesting:
 
 .. [802ff385]  nf_hook_slow+0x35/0x160
 .[803123bf] ..   ( = ip_push_pending_frames+0x37f/0x490)
 .. [80350f40]  _write_lock_bh+0x20/0x30
 .[88170500] ..   ( = ip_ct_refresh_acct+0xb0/0x160 
 [ip_conntrack])
 .. [80350f40]  _write_lock_bh+0x20/0x30
 .[88171824] ..   ( = destroy_conntrack+0xc4/0x180 
 [ip_conntrack])

Is the following patch correct? ip_conntrack_event_cache should never be 
called with ip_conntrack_lock held and ct_add_counters does not need to be 
called with ip_conntrack_lock held.

Index: linux-2.6.13-rc5-mm1/net/ipv4/netfilter/ip_conntrack_core.c
===
RCS file: 
/home/cvsroot/linux-2.6.13-rc5-mm1/net/ipv4/netfilter/ip_conntrack_core.c,v
retrieving revision 1.1.1.1
diff -u -p -B -r1.1.1.1 ip_conntrack_core.c
--- linux-2.6.13-rc5-mm1/net/ipv4/netfilter/ip_conntrack_core.c 7 Aug 2005 
21:38:40 -   1.1.1.1
+++ linux-2.6.13-rc5-mm1/net/ipv4/netfilter/ip_conntrack_core.c 15 Aug 2005 
02:09:23 -
@@ -1139,15 +1139,20 @@ void ip_ct_refresh_acct(struct ip_conntr
ct-timeout.expires = extra_jiffies;
ct_add_counters(ct, ctinfo, skb);
} else {
+   int do_event_cache = 0;
+
write_lock_bh(ip_conntrack_lock);
/* Need del_timer for race avoidance (may already be dying). */
if (del_timer(ct-timeout)) {
ct-timeout.expires = jiffies + extra_jiffies;
add_timer(ct-timeout);
-   ip_conntrack_event_cache(IPCT_REFRESH, skb);
+   do_event_cache = 1;
}
-   ct_add_counters(ct, ctinfo, skb);
write_unlock_bh(ip_conntrack_lock);
+
+   if (do_event_cache)
+   ip_conntrack_event_cache(IPCT_REFRESH, skb);
+   ct_add_counters(ct, ctinfo, skb);
}
 }
 
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: UML build broken on 2.6.13-rc5-mm1

2005-08-12 Thread Miklos Szeredi
> > UML is broken again in -mm.
> > 
> > Maybe UML should be added to one of the automatic build suites.
> 
> It is, see here: http://l4x.org/k/?d=6080 .

Cool.

> But the maintainer (if he cares) will know that it's broken and send
> a fix in time.  -mm is imho designed to be broken from time to time.

Yeah, that's OK.  I just wondered, if I could be spared from the build
testing cycle of UML ;)

Miklos
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: UML build broken on 2.6.13-rc5-mm1

2005-08-12 Thread Miklos Szeredi
  UML is broken again in -mm.
  
  Maybe UML should be added to one of the automatic build suites.
 
 It is, see here: http://l4x.org/k/?d=6080 .

Cool.

 But the maintainer (if he cares) will know that it's broken and send
 a fix in time.  -mm is imho designed to be broken from time to time.

Yeah, that's OK.  I just wondered, if I could be spared from the build
testing cycle of UML ;)

Miklos
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: UML build broken on 2.6.13-rc5-mm1

2005-08-11 Thread Jan Dittmer
Miklos Szeredi wrote:
> UML is broken again in -mm.
> 
> Maybe UML should be added to one of the automatic build suites.

It is, see here: http://l4x.org/k/?d=6080 . But the maintainer (if he cares)
will know that it's broken and send a fix in time.
-mm is imho designed to be broken from time to time.

-- 
Jan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


UML build broken on 2.6.13-rc5-mm1

2005-08-11 Thread Miklos Szeredi
UML is broken again in -mm.

Maybe UML should be added to one of the automatic build suites.

Miklos


ccache gcc -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs 
-fno-strict-aliasing -fno-common -ffreestanding -O2 -fno-omit-frame-pointer 
-fno-optimize-sibling-calls -g  -D__arch_um__ -DSUBARCH=\"i386\" 
-Iarch/um/include  -I/usr/src/quilt/linux/arch/um/kernel/tt/include  
-I/usr/src/quilt/linux/arch/um/kernel/skas/include -Dvmap=kernel_vmap 
-Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask  -U__i386__ -Ui386  
-D_LARGEFILE64_SOURCE-nostdinc -isystem 
/usr/lib/gcc-lib/i486-linux/3.3.4/include -D__KERNEL__ -Iinclude  -S -o 
arch/um/kernel-offsets.s arch/um/sys-i386/kernel-offsets.c
In file included from include/asm/ptrace-generic.h:17,
 from include/asm/ptrace.h:12,
 from include/asm/processor-generic.h:14,
 from include/asm/processor.h:46,
 from include/asm/thread_info.h:12,
 from include/linux/thread_info.h:21,
 from include/linux/spinlock.h:53,
 from include/linux/capability.h:45,
 from include/linux/sched.h:7,
 from arch/um/sys-i386/kernel-offsets.c:3:
include/asm/arch/ptrace.h:60:26: mach_segment.h: No such file or directory
In file included from include/asm/system-generic.h:4,
 from include/asm/system.h:4,
 from include/linux/spinlock.h:57,
 from include/linux/capability.h:45,
 from include/linux/sched.h:7,
 from arch/um/sys-i386/kernel-offsets.c:3:
include/asm/arch/system.h:414:25: mach_system.h: No such file or directory
In file included from include/asm/system-generic.h:4,
 from include/asm/system.h:4,
 from include/linux/spinlock.h:57,
 from include/linux/capability.h:45,
 from include/linux/sched.h:7,
 from arch/um/sys-i386/kernel-offsets.c:3:
include/asm/arch/system.h: In function `sched_cacheflush':
include/asm/arch/system.h:439: warning: implicit declaration of function 
`wbinvd'
make: *** [arch/um/kernel-offsets.s] Error 1
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


UML build broken on 2.6.13-rc5-mm1

2005-08-11 Thread Miklos Szeredi
UML is broken again in -mm.

Maybe UML should be added to one of the automatic build suites.

Miklos


ccache gcc -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs 
-fno-strict-aliasing -fno-common -ffreestanding -O2 -fno-omit-frame-pointer 
-fno-optimize-sibling-calls -g  -D__arch_um__ -DSUBARCH=\i386\ 
-Iarch/um/include  -I/usr/src/quilt/linux/arch/um/kernel/tt/include  
-I/usr/src/quilt/linux/arch/um/kernel/skas/include -Dvmap=kernel_vmap 
-Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask  -U__i386__ -Ui386  
-D_LARGEFILE64_SOURCE-nostdinc -isystem 
/usr/lib/gcc-lib/i486-linux/3.3.4/include -D__KERNEL__ -Iinclude  -S -o 
arch/um/kernel-offsets.s arch/um/sys-i386/kernel-offsets.c
In file included from include/asm/ptrace-generic.h:17,
 from include/asm/ptrace.h:12,
 from include/asm/processor-generic.h:14,
 from include/asm/processor.h:46,
 from include/asm/thread_info.h:12,
 from include/linux/thread_info.h:21,
 from include/linux/spinlock.h:53,
 from include/linux/capability.h:45,
 from include/linux/sched.h:7,
 from arch/um/sys-i386/kernel-offsets.c:3:
include/asm/arch/ptrace.h:60:26: mach_segment.h: No such file or directory
In file included from include/asm/system-generic.h:4,
 from include/asm/system.h:4,
 from include/linux/spinlock.h:57,
 from include/linux/capability.h:45,
 from include/linux/sched.h:7,
 from arch/um/sys-i386/kernel-offsets.c:3:
include/asm/arch/system.h:414:25: mach_system.h: No such file or directory
In file included from include/asm/system-generic.h:4,
 from include/asm/system.h:4,
 from include/linux/spinlock.h:57,
 from include/linux/capability.h:45,
 from include/linux/sched.h:7,
 from arch/um/sys-i386/kernel-offsets.c:3:
include/asm/arch/system.h: In function `sched_cacheflush':
include/asm/arch/system.h:439: warning: implicit declaration of function 
`wbinvd'
make: *** [arch/um/kernel-offsets.s] Error 1
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: UML build broken on 2.6.13-rc5-mm1

2005-08-11 Thread Jan Dittmer
Miklos Szeredi wrote:
 UML is broken again in -mm.
 
 Maybe UML should be added to one of the automatic build suites.

It is, see here: http://l4x.org/k/?d=6080 . But the maintainer (if he cares)
will know that it's broken and send a fix in time.
-mm is imho designed to be broken from time to time.

-- 
Jan
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 4/5] 2.6.13-rc5-mm1, IPMI, use dmi_find_device()

2005-08-10 Thread Corey Minyard
Andrew, this patch (along with the patch 3/5) works fine for me and is
an obvious improvement to the IPMI driver.  You will need to remove the
patch named dmi_table-counting-in-ipmi_si_intfc.patch first.

Thanks, Andrey.

-Corey

On Wed, 2005-08-10 at 14:32 +0400, Andrey Panin wrote:
> This patch replaces homebrew DMI scanning code in IPMI System Interface driver
> with dmi_find_device() call.
> 
> Signed-off-by: Andrey Panin <[EMAIL PROTECTED]>
> 
>  drivers/char/ipmi/ipmi_si_intf.c |  105 
> ++-
>  1 files changed, 17 insertions(+), 88 deletions(-)
> 
> diff -urdpNX /usr/share/dontdiff 
> linux-2.6.13-rc5-mm1.vanilla/drivers/char/ipmi/ipmi_si_intf.c 
> linux-2.6.13-rc5-mm1/drivers/char/ipmi/ipmi_si_intf.c
> --- linux-2.6.13-rc5-mm1.vanilla/drivers/char/ipmi/ipmi_si_intf.c 
> 2005-08-08 14:32:07.0 +0400
> +++ linux-2.6.13-rc5-mm1/drivers/char/ipmi/ipmi_si_intf.c 2005-08-08 
> 11:39:00.0 +0400
> @@ -75,6 +75,7 @@ static inline void add_usec_to_timer(str
>  #include 
>  #include "ipmi_si_sm.h"
>  #include 
> +#include 
>  
>  /* Measure times between events in the driver. */
>  #undef DEBUG_TIMING
> @@ -1642,22 +1643,15 @@ typedef struct dmi_ipmi_data
>  static dmi_ipmi_data_t dmi_data[SI_MAX_DRIVERS];
>  static int dmi_data_entries;
>  
> -typedef struct dmi_header
> -{
> - u8  type;
> - u8  length;
> - u16 handle;
> -} dmi_header_t;
> -
> -static int decode_dmi(dmi_header_t __iomem *dm, int intf_num)
> +static int __init decode_dmi(struct dmi_header *dm, int intf_num)
>  {
> - u8  __iomem *data = (u8 __iomem *)dm;
> + u8 *data = (u8 *)dm;
>   unsigned long   base_addr;
>   u8  reg_spacing;
> - u8  len = readb(>length);
> + u8  len = dm->length;
>   dmi_ipmi_data_t *ipmi_data = dmi_data+intf_num;
>  
> - ipmi_data->type = readb([4]);
> + ipmi_data->type = data[4];
>  
>   memcpy(_addr, data+8, sizeof(unsigned long));
>   if (len >= 0x11) {
> @@ -1672,12 +1666,12 @@ static int decode_dmi(dmi_header_t __iom
>   }
>   /* If bit 4 of byte 0x10 is set, then the lsb for the address
>  is odd. */
> - ipmi_data->base_addr = base_addr | ((readb([0x10]) & 0x10) 
> >> 4);
> + ipmi_data->base_addr = base_addr | ((data[0x10] & 0x10) >> 4);
>  
> - ipmi_data->irq = readb([0x11]);
> + ipmi_data->irq = data[0x11];
>  
>   /* The top two bits of byte 0x10 hold the register spacing. */
> - reg_spacing = (readb([0x10]) & 0xC0) >> 6;
> + reg_spacing = (data[0x10] & 0xC0) >> 6;
>   switch(reg_spacing){
>   case 0x00: /* Byte boundaries */
>   ipmi_data->offset = 1;
> @@ -1705,7 +1699,7 @@ static int decode_dmi(dmi_header_t __iom
>   ipmi_data->offset = 1;
>   }
>  
> - ipmi_data->slave_addr = readb([6]);
> + ipmi_data->slave_addr = data[6];
>  
>   if (is_new_interface(-1, ipmi_data->addr_space,ipmi_data->base_addr)) {
>   dmi_data_entries++;
> @@ -1717,82 +1711,17 @@ static int decode_dmi(dmi_header_t __iom
>   return -1;
>  }
>  
> -static int dmi_table(u32 base, int len, int num)
> -{
> - u8__iomem *buf;
> - struct dmi_header __iomem *dm;
> - u8__iomem *data;
> - int   i=1;
> - int   status=-1;
> - int   intf_num = 0;
> -
> - buf = ioremap(base, len);
> - if(buf==NULL)
> - return -1;
> -
> - data = buf;
> -
> - while(i - {
> - dm=(dmi_header_t __iomem *)data;
> -
> - if((data-buf+readb(>length)) >= len)
> - break;
> -
> - if (readb(>type) == 38) {
> - if (decode_dmi(dm, intf_num) == 0) {
> - intf_num++;
> - if (intf_num >= SI_MAX_DRIVERS)
> - break;
> - }
> - }
> -
> - data+=readb(>length);
> - while((data-buf) < len && (readb(data)||readb(data+1)))
> - data++;
> - data+=2;
> - i++;
> - }
> - iounmap(buf);
> -
> - return status;
> -}
> -
> -static inline int dmi_checksum(u8 *buf)
> -{
> - u8   sum=0;
> - in

[PATCH 5/5] 2.6.13-rc5-mm1, driver for IBM Automatic Server Restart watchdog

2005-08-10 Thread Andrey Panin

This patch adds driver for IBM Automatic Server Restart watchdog hardware
found in some IBM eServer xSeries machines. This driver is based on the ugly
driver provided by IBM. Driver was tested on IBM eServer 226.

Signed-off-by: Andrey Panin <[EMAIL PROTECTED]>

 drivers/char/watchdog/Kconfig  |   10 +
 drivers/char/watchdog/Makefile |1 
 drivers/char/watchdog/ibmasr.c |  407 +
 3 files changed, 418 insertions(+)

diff -urdpN linux-2.6.13-rc5-mm1.vanilla/drivers/char/watchdog/ibmasr.c 
linux-2.6.13-rc5-mm1/drivers/char/watchdog/ibmasr.c
--- linux-2.6.13-rc5-mm1.vanilla/drivers/char/watchdog/ibmasr.c 1970-01-01 
03:00:00.0 +0300
+++ linux-2.6.13-rc5-mm1/drivers/char/watchdog/ibmasr.c 2005-08-10 
11:43:45.0 +0400
@@ -0,0 +1,407 @@
+/*
+ * IBM Automatic Server Restart driver.
+ *
+ * Copyright (c) 2005 Andrey Panin <[EMAIL PROTECTED]>
+ *
+ * Based on driver written by Pete Reynolds.
+ * Copyright (c) IBM Corporation, 1998-2004.
+ *
+ * This software may be used and distributed according to the terms
+ * of the GNU Public License, incorporated herein by reference.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+
+enum {
+   ASMTYPE_UNKNOWN,
+   ASMTYPE_TOPAZ,
+   ASMTYPE_JASPER,
+   ASMTYPE_PEARL,
+   ASMTYPE_JUNIPER,
+   ASMTYPE_SPRUCE,
+};
+
+#define PFX "ibmasr: "
+
+#define TOPAZ_ASR_REG_OFFSET   4
+#define TOPAZ_ASR_TOGGLE   0x40
+#define TOPAZ_ASR_DISABLE  0x80
+
+/* PEARL ASR S/W REGISTER SUPERIO PORT ADDRESSES */
+#define PEARL_BASE 0xe04
+#define PEARL_WRITE0xe06
+#define PEARL_READ 0xe07
+
+#define PEARL_ASR_DISABLE_MASK 0x80/* bit 7: disable = 1, enable = 0 */
+#define PEARL_ASR_TOGGLE_MASK  0x40/* bit 6: 0, then 1, then 0 */
+
+/* JASPER OFFSET FROM SIO BASE ADDR TO ASR S/W REGISTERS. */
+#define JASPER_ASR_REG_OFFSET  0x38
+
+#define JASPER_ASR_DISABLE_MASK0x01/* bit 0: disable = 1, enable = 
0 */
+#define JASPER_ASR_TOGGLE_MASK 0x02/* bit 1: 0, then 1, then 0 */
+
+#define JUNIPER_BASE_ADDRESS   0x54b   /* Base address of Juniper ASR */
+#define JUNIPER_ASR_DISABLE_MASK 0x01  /* bit 0: disable = 1 enable = 0 */
+#define JUNIPER_ASR_TOGGLE_MASK0x02/* bit 1: 0, then 1, then 0 */
+
+#define SPRUCE_BASE_ADDRESS0x118e  /* Base address of Spruce ASR */
+#define SPRUCE_ASR_DISABLE_MASK0x01/* bit 1: disable = 1 enable = 
0 */
+#define SPRUCE_ASR_TOGGLE_MASK 0x02/* bit 0: 0, then 1, then 0 */
+
+
+static int nowayout = WATCHDOG_NOWAYOUT;
+
+static unsigned long asr_is_open;
+static char asr_expect_close;
+
+static unsigned int asr_type, asr_base, asr_length;
+static unsigned int asr_read_addr, asr_write_addr;
+static unsigned char asr_toggle_mask, asr_disable_mask;
+
+static void asr_toggle(void)
+{
+   unsigned char reg = inb(asr_read_addr);
+
+   outb(reg & ~asr_toggle_mask, asr_write_addr);
+   reg = inb(asr_read_addr);
+
+   outb(reg | asr_toggle_mask, asr_write_addr);
+   reg = inb(asr_read_addr);
+
+   outb(reg & ~asr_toggle_mask, asr_write_addr);
+   reg = inb(asr_read_addr);
+}
+
+static void asr_enable(void)
+{
+   unsigned char reg;
+
+   if (asr_type == ASMTYPE_TOPAZ) {
+   /* asr_write_addr == asr_read_addr */
+   reg = inb(asr_read_addr);
+   outb(reg & ~(TOPAZ_ASR_TOGGLE | TOPAZ_ASR_DISABLE),
+asr_read_addr);
+   } else {
+   /*
+* First make sure the hardware timer is reset by toggling
+* ASR hardware timer line.
+*/
+   asr_toggle();
+
+   reg = inb(asr_read_addr);
+   outb(reg & ~asr_disable_mask, asr_write_addr);
+   }
+   reg = inb(asr_read_addr);
+}
+
+static void asr_disable(void)
+{
+   unsigned char reg = inb(asr_read_addr);
+
+   if (asr_type == ASMTYPE_TOPAZ)
+   /* asr_write_addr == asr_read_addr */
+   outb(reg | TOPAZ_ASR_TOGGLE | TOPAZ_ASR_DISABLE,
+asr_read_addr);
+   else {
+   outb(reg | asr_toggle_mask, asr_write_addr);
+   reg = inb(asr_read_addr);
+
+   outb(reg | asr_disable_mask, asr_write_addr);
+   }
+   reg = inb(asr_read_addr);
+}
+
+static int __init asr_get_base_address(void)
+{
+   unsigned char low, high;
+   const char *type = "";
+
+   asr_length = 1;
+
+   switch (asr_type) {
+   case ASMTYPE_TOPAZ:
+   /* SELECT SuperIO CHIP FOR QUERYING (WRITE 0x07 TO BOTH 0x2E 
and 0x2F) */
+   outb(0x07, 0x2e);
+   outb(0x07, 0x2f);
+
+   /* SELECT AND READ THE HIGH-NIBBLE OF THE GPIO BASE ADDRESS */
+   outb(0x60, 0x2e);
+   high = inb(0x2f);
+
+   /* SELECT 

[PATCH 1/5] 2.6.13-rc5-mm1, remove old debugging code

2005-08-10 Thread Andrey Panin

DMI debugging code is unused for ages. This patch removes it.

Signed-off-by: Andrey Panin <[EMAIL PROTECTED]>

 arch/i386/kernel/dmi_scan.c |   21 -
 1 files changed, 21 deletions(-)

diff -urdpNX /usr/share/dontdiff 
linux-2.6.13-rc5-mm1.vanilla/arch/i386/kernel/dmi_scan.c 
linux-2.6.13-rc5-mm1/arch/i386/kernel/dmi_scan.c
--- linux-2.6.13-rc5-mm1.vanilla/arch/i386/kernel/dmi_scan.c2005-06-14 
23:24:54.0 +0400
+++ linux-2.6.13-rc5-mm1/arch/i386/kernel/dmi_scan.c2005-06-14 
23:25:07.0 +0400
@@ -12,13 +12,6 @@ struct dmi_header {
u16 handle;
 };
 
-#undef DMI_DEBUG
-
-#ifdef DMI_DEBUG
-#define dmi_printk(x) printk x
-#else
-#define dmi_printk(x)
-#endif
 
 static char * __init dmi_string(struct dmi_header *dm, u8 s)
 {
@@ -117,29 +110,19 @@ static void __init dmi_decode(struct dmi

switch(dm->type) {
case  0:
-   dmi_printk(("BIOS Vendor: %s\n", dmi_string(dm, data[4])));
dmi_save_ident(dm, DMI_BIOS_VENDOR, 4);
-   dmi_printk(("BIOS Version: %s\n", dmi_string(dm, data[5])));
dmi_save_ident(dm, DMI_BIOS_VERSION, 5);
-   dmi_printk(("BIOS Release: %s\n", dmi_string(dm, data[8])));
dmi_save_ident(dm, DMI_BIOS_DATE, 8);
break;
case 1:
-   dmi_printk(("System Vendor: %s\n", dmi_string(dm, data[4])));
dmi_save_ident(dm, DMI_SYS_VENDOR, 4);
-   dmi_printk(("Product Name: %s\n", dmi_string(dm, data[5])));
dmi_save_ident(dm, DMI_PRODUCT_NAME, 5);
-   dmi_printk(("Version: %s\n", dmi_string(dm, data[6])));
dmi_save_ident(dm, DMI_PRODUCT_VERSION, 6);
-   dmi_printk(("Serial Number: %s\n", dmi_string(dm, data[7])));
dmi_save_ident(dm, DMI_PRODUCT_SERIAL, 7);
break;
case 2:
-   dmi_printk(("Board Vendor: %s\n", dmi_string(dm, data[4])));
dmi_save_ident(dm, DMI_BOARD_VENDOR, 4);
-   dmi_printk(("Board Name: %s\n", dmi_string(dm, data[5])));
dmi_save_ident(dm, DMI_BOARD_NAME, 5);
-   dmi_printk(("Board Version: %s\n", dmi_string(dm, data[6])));
dmi_save_ident(dm, DMI_BOARD_VERSION, 6);
break;
}
@@ -177,10 +160,6 @@ void __init dmi_scan_machine(void)
else
printk(KERN_INFO "DMI present.\n");
 
-   dmi_printk((KERN_INFO "%d structures occupying %d 
bytes.\n",
-   num, len));
-   dmi_printk((KERN_INFO "DMI table at 0x%08X.\n", base));
-
if (dmi_table(base,len, num, dmi_decode) == 0)
return;
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 3/5] 2.6.13-rc5-mm1, add onboard devices discovery

2005-08-10 Thread Andrey Panin

This patch adds onboard devices and IPMI BMC discovery into DMI scan code.
Drivers can use dmi_find_device() function to search for devices by type
and name.

Signed-off-by: Andrey Panin <[EMAIL PROTECTED]>

 arch/i386/kernel/dmi_scan.c |  102 ++--
 include/linux/dmi.h |   34 +-
 2 files changed, 121 insertions(+), 15 deletions(-)

diff -urdpNX /usr/share/dontdiff 
linux-2.6.13-rc5-mm1.vanilla/arch/i386/kernel/dmi_scan.c 
linux-2.6.13-rc5-mm1/arch/i386/kernel/dmi_scan.c
--- linux-2.6.13-rc5-mm1.vanilla/arch/i386/kernel/dmi_scan.c2005-08-09 
14:39:13.0 +0400
+++ linux-2.6.13-rc5-mm1/arch/i386/kernel/dmi_scan.c2005-08-09 
15:07:57.0 +0400
@@ -6,13 +6,6 @@
 #include 
 
 
-struct dmi_header {
-   u8 type;
-   u8 length;
-   u16 handle;
-};
-
-
 static char * __init dmi_string(struct dmi_header *dm, u8 s)
 {
u8 *bp = ((u8 *) dm) + dm->length;
@@ -88,6 +81,7 @@ static int __init dmi_checksum(u8 *buf)
 }
 
 static char *dmi_ident[DMI_STRING_MAX];
+static LIST_HEAD(dmi_devices);
 
 /*
  * Save a DMI string
@@ -106,6 +100,58 @@ static void __init dmi_save_ident(struct
dmi_ident[slot] = p;
 }
 
+static void __init dmi_save_devices(struct dmi_header *dm)
+{
+   int i, count = (dm->length - sizeof(struct dmi_header)) / 2;
+   struct dmi_device *dev;
+
+   for (i = 0; i < count; i++) {
+   char *d = ((char *) dm) + (i * 2);
+
+   /* Skip disabled device */
+   if ((*d & 0x80) == 0)
+   continue;
+
+   dev = alloc_bootmem(sizeof(*dev));
+   if (!dev) {
+   printk(KERN_ERR "dmi_save_devices: out of memory.\n");
+   break;
+   }
+
+   dev->type = *d++ & 0x7f;
+   dev->name = dmi_string(dm, *d);
+   dev->device_data = NULL;
+
+   list_add(>list, _devices);
+   }
+}
+
+static void __init dmi_save_ipmi_device(struct dmi_header *dm)
+{
+   struct dmi_device *dev;
+   void * data;
+
+   data = alloc_bootmem(dm->length);
+   if (data == NULL) {
+   printk(KERN_ERR "dmi_save_ipmi_device: out of memory.\n");
+   return;
+   }
+
+   memcpy(data, dm, dm->length);
+
+   dev = alloc_bootmem(sizeof(*dev));
+   if (!dev) {
+   printk(KERN_ERR "dmi_save_ipmi_device: out of memory.\n");
+   return;
+   }
+
+   dev->type = DMI_DEV_TYPE_IPMI;
+   dev->name = "IPMI controller";
+   dev->device_data = data;
+
+   list_add(>list, _devices);
+}
+
 /*
  * Process a DMI table entry. Right now all we care about are the BIOS
  * and machine entries. For 2.5 we should pull the smbus controller info
@@ -113,25 +159,28 @@ static void __init dmi_save_ident(struct
  */
 static void __init dmi_decode(struct dmi_header *dm)
 {
-   u8 *data __attribute__((__unused__)) = (u8 *)dm;
-   
switch(dm->type) {
-   case  0:
+   case 0: /* BIOS Information */
dmi_save_ident(dm, DMI_BIOS_VENDOR, 4);
dmi_save_ident(dm, DMI_BIOS_VERSION, 5);
dmi_save_ident(dm, DMI_BIOS_DATE, 8);
break;
-   case 1:
+   case 1: /* System Information */
dmi_save_ident(dm, DMI_SYS_VENDOR, 4);
dmi_save_ident(dm, DMI_PRODUCT_NAME, 5);
dmi_save_ident(dm, DMI_PRODUCT_VERSION, 6);
dmi_save_ident(dm, DMI_PRODUCT_SERIAL, 7);
break;
-   case 2:
+   case 2: /* Base Board Information */
dmi_save_ident(dm, DMI_BOARD_VENDOR, 4);
dmi_save_ident(dm, DMI_BOARD_NAME, 5);
dmi_save_ident(dm, DMI_BOARD_VERSION, 6);
break;
+   case 10:/* Onboard Devices Information */
+   dmi_save_devices(dm);
+   break;
+   case 38:/* IPMI Device Information */
+   dmi_save_ipmi_device(dm);
}
 }
 
@@ -221,3 +270,32 @@ char *dmi_get_system_info(int field)
return dmi_ident[field];
 }
 EXPORT_SYMBOL(dmi_get_system_info);
+
+/**
+ * dmi_find_device - find onboard device by type/name
+ * @type: device type or %DMI_DEV_TYPE_ANY to match all device types
+ * @desc: device name string or %NULL to match all
+ * @from: previous device found in search, or %NULL for new search.
+ *
+ * Iterates through the list of known onboard devices. If a device is
+ * found with a matching @vendor and @device, a pointer to its device
+ * structure is returned.  Otherwise, %NULL is returned.
+ * A new search is initiated by passing %NULL to the @from argument.
+ * If @from is not %NULL, searches continue from next device.
+ */
+struct dmi_device * dmi_fin

[PATCH 4/5] 2.6.13-rc5-mm1, IPMI, use dmi_find_device()

2005-08-10 Thread Andrey Panin

This patch replaces homebrew DMI scanning code in IPMI System Interface driver
with dmi_find_device() call.

Signed-off-by: Andrey Panin <[EMAIL PROTECTED]>

 drivers/char/ipmi/ipmi_si_intf.c |  105 ++-
 1 files changed, 17 insertions(+), 88 deletions(-)

diff -urdpNX /usr/share/dontdiff 
linux-2.6.13-rc5-mm1.vanilla/drivers/char/ipmi/ipmi_si_intf.c 
linux-2.6.13-rc5-mm1/drivers/char/ipmi/ipmi_si_intf.c
--- linux-2.6.13-rc5-mm1.vanilla/drivers/char/ipmi/ipmi_si_intf.c   
2005-08-08 14:32:07.0 +0400
+++ linux-2.6.13-rc5-mm1/drivers/char/ipmi/ipmi_si_intf.c   2005-08-08 
11:39:00.0 +0400
@@ -75,6 +75,7 @@ static inline void add_usec_to_timer(str
 #include 
 #include "ipmi_si_sm.h"
 #include 
+#include 
 
 /* Measure times between events in the driver. */
 #undef DEBUG_TIMING
@@ -1642,22 +1643,15 @@ typedef struct dmi_ipmi_data
 static dmi_ipmi_data_t dmi_data[SI_MAX_DRIVERS];
 static int dmi_data_entries;
 
-typedef struct dmi_header
-{
-   u8  type;
-   u8  length;
-   u16 handle;
-} dmi_header_t;
-
-static int decode_dmi(dmi_header_t __iomem *dm, int intf_num)
+static int __init decode_dmi(struct dmi_header *dm, int intf_num)
 {
-   u8  __iomem *data = (u8 __iomem *)dm;
+   u8 *data = (u8 *)dm;
unsigned long   base_addr;
u8  reg_spacing;
-   u8  len = readb(>length);
+   u8  len = dm->length;
dmi_ipmi_data_t *ipmi_data = dmi_data+intf_num;
 
-   ipmi_data->type = readb([4]);
+   ipmi_data->type = data[4];
 
memcpy(_addr, data+8, sizeof(unsigned long));
if (len >= 0x11) {
@@ -1672,12 +1666,12 @@ static int decode_dmi(dmi_header_t __iom
}
/* If bit 4 of byte 0x10 is set, then the lsb for the address
   is odd. */
-   ipmi_data->base_addr = base_addr | ((readb([0x10]) & 0x10) 
>> 4);
+   ipmi_data->base_addr = base_addr | ((data[0x10] & 0x10) >> 4);
 
-   ipmi_data->irq = readb([0x11]);
+   ipmi_data->irq = data[0x11];
 
/* The top two bits of byte 0x10 hold the register spacing. */
-   reg_spacing = (readb([0x10]) & 0xC0) >> 6;
+   reg_spacing = (data[0x10] & 0xC0) >> 6;
switch(reg_spacing){
case 0x00: /* Byte boundaries */
ipmi_data->offset = 1;
@@ -1705,7 +1699,7 @@ static int decode_dmi(dmi_header_t __iom
ipmi_data->offset = 1;
}
 
-   ipmi_data->slave_addr = readb([6]);
+   ipmi_data->slave_addr = data[6];
 
if (is_new_interface(-1, ipmi_data->addr_space,ipmi_data->base_addr)) {
dmi_data_entries++;
@@ -1717,82 +1711,17 @@ static int decode_dmi(dmi_header_t __iom
return -1;
 }
 
-static int dmi_table(u32 base, int len, int num)
-{
-   u8__iomem *buf;
-   struct dmi_header __iomem *dm;
-   u8__iomem *data;
-   int   i=1;
-   int   status=-1;
-   int   intf_num = 0;
-
-   buf = ioremap(base, len);
-   if(buf==NULL)
-   return -1;
-
-   data = buf;
-
-   while(ilength)) >= len)
-   break;
-
-   if (readb(>type) == 38) {
-   if (decode_dmi(dm, intf_num) == 0) {
-   intf_num++;
-   if (intf_num >= SI_MAX_DRIVERS)
-   break;
-   }
-   }
-
-   data+=readb(>length);
-   while((data-buf) < len && (readb(data)||readb(data+1)))
-   data++;
-   data+=2;
-   i++;
-   }
-   iounmap(buf);
-
-   return status;
-}
-
-static inline int dmi_checksum(u8 *buf)
-{
-   u8   sum=0;
-   int  a;
-
-   for(a=0; a<15; a++)
-   sum+=buf[a];
-   return (sum==0);
-}
-
-static int dmi_decode(void)
+static void __init dmi_find_bmc(void)
 {
-   u8   buf[15];
-   u32  fp=0xF;
-
-#ifdef CONFIG_SIMNOW
-   return -1;
-#endif
+   struct dmi_device *dev = NULL;
+   int intf_num = 0;
 
-   while(fp < 0xF)
-   {
-   isa_memcpy_fromio(buf, fp, 15);
-   if(memcmp(buf, "_DMI_", 5)==0 && dmi_checksum(buf))
-   {
-   u16 num=buf[13]<<8|buf[12];
-   u16 len=buf[7]<<8|buf[6];
-   u32 base=buf[11]<<24|buf[10]<<16|buf[9]<<8|buf[8];
+   while ((dev = dmi_find_device(DMI_DEV_TYPE_IPMI, NULL, dev))) {
+   if (intf_num >= SI_MAX_DRIVERS)
+   break;
 
-   if(

[PATCH 2/5] 2.6.13-rc5-mm1, make dmi_string() behave like strdup()

2005-08-10 Thread Andrey Panin

This patch changes dmi_string() function to allocate string copy by itself,
to avoid code duplication in the next patch.

Signed-off-by: Andrey Panin <[EMAIL PROTECTED]>

 arch/i386/kernel/dmi_scan.c |   39 +++
 1 files changed, 23 insertions(+), 16 deletions(-)

diff -urdpNX /usr/share/dontdiff 
linux-2.6.13-rc5-mm1.vanilla/arch/i386/kernel/dmi_scan.c 
linux-2.6.13-rc5-mm1/arch/i386/kernel/dmi_scan.c
--- linux-2.6.13-rc5-mm1.vanilla/arch/i386/kernel/dmi_scan.c2005-06-14 
23:31:39.0 +0400
+++ linux-2.6.13-rc5-mm1/arch/i386/kernel/dmi_scan.c2005-06-14 
23:31:51.0 +0400
@@ -16,15 +16,25 @@ struct dmi_header {
 static char * __init dmi_string(struct dmi_header *dm, u8 s)
 {
u8 *bp = ((u8 *) dm) + dm->length;
+   char *str = "";
 
-   if (!s)
-   return "";
-   s--;
-   while (s > 0 && *bp) {
-   bp += strlen(bp) + 1;
+   if (s) {
s--;
-   }
-   return bp;
+   while (s > 0 && *bp) {
+   bp += strlen(bp) + 1;
+   s--;
+   }
+
+   if (*bp != 0) {
+   str = alloc_bootmem(strlen(bp) + 1);
+   if (str != NULL)
+   strcpy(str, bp);
+   else
+   printk(KERN_ERR "dmi_string: out of memory.\n");
+   }
+   }
+
+   return str;
 }
 
 /*
@@ -84,19 +94,16 @@ static char *dmi_ident[DMI_STRING_MAX];
  */
 static void __init dmi_save_ident(struct dmi_header *dm, int slot, int string)
 {
-   char *d = (char*)dm;
-   char *p = dmi_string(dm, d[string]);
+   char *p, *d = (char*) dm;
 
-   if (p == NULL || *p == 0)
-   return;
if (dmi_ident[slot])
return;
 
-   dmi_ident[slot] = alloc_bootmem(strlen(p) + 1);
-   if(dmi_ident[slot])
-   strcpy(dmi_ident[slot], p);
-   else
-   printk(KERN_ERR "dmi_save_ident: out of memory.\n");
+   p = dmi_string(dm, d[string]);
+   if (p == NULL)
+   return;
+
+   dmi_ident[slot] = p;
 }
 
 /*

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 0/5] 2.6.13-rc5-mm1, remove uneeded function

2005-08-10 Thread Andrey Panin

After elimination of central DMI blacklist dmi_scan_machine() function
became a wrapper for dmi_iterate(). This patch moves some code around to
kill unneeded function.

Signed-off-by: Andrey Panin <[EMAIL PROTECTED]>

 arch/i386/kernel/dmi_scan.c |   85 
 1 files changed, 40 insertions(+), 45 deletions(-)

diff -urdpNX /usr/share/dontdiff 
linux-2.6.13-rc5-mm1.vanilla/arch/i386/kernel/dmi_scan.c 
linux-2.6.13-rc5-mm1/arch/i386/kernel/dmi_scan.c
--- linux-2.6.13-rc5-mm1.vanilla/arch/i386/kernel/dmi_scan.c2005-06-12 
23:07:37.0 +0400
+++ linux-2.6.13-rc5-mm1/arch/i386/kernel/dmi_scan.c2005-06-14 
23:18:18.0 +0400
@@ -84,49 +84,6 @@ static int __init dmi_checksum(u8 *buf)
return sum == 0;
 }
 
-static int __init dmi_iterate(void (*decode)(struct dmi_header *))
-{
-   u8 buf[15];
-   char __iomem *p, *q;
-
-   /*
-* no iounmap() for that ioremap(); it would be a no-op, but it's
-* so early in setup that sucker gets confused into doing what
-* it shouldn't if we actually call it.
-*/
-   p = ioremap(0xF, 0x1);
-   if (p == NULL)
-   return -1;
-
-   for (q = p; q < p + 0x1; q += 16) {
-   memcpy_fromio(buf, q, 15);
-   if ((memcmp(buf, "_DMI_", 5) == 0) && dmi_checksum(buf)) {
-   u16 num = (buf[13] << 8) | buf[12];
-   u16 len = (buf[7] << 8) | buf[6];
-   u32 base = (buf[11] << 24) | (buf[10] << 16) |
-  (buf[9] << 8) | buf[8];
-
-   /*
-* DMI version 0.0 means that the real version is taken 
from
-* the SMBIOS version, which we don't know at this 
point.
-*/
-   if (buf[14] != 0)
-   printk(KERN_INFO "DMI %d.%d present.\n",
-   buf[14] >> 4, buf[14] & 0xF);
-   else
-   printk(KERN_INFO "DMI present.\n");
-
-   dmi_printk((KERN_INFO "%d structures occupying %d 
bytes.\n",
-   num, len));
-   dmi_printk((KERN_INFO "DMI table at 0x%08X.\n", base));
-
-   if (dmi_table(base,len, num, decode) == 0)
-   return 0;
-   }
-   }
-   return -1;
-}
-
 static char *dmi_ident[DMI_STRING_MAX];
 
 /*
@@ -190,8 +147,46 @@ static void __init dmi_decode(struct dmi
 
 void __init dmi_scan_machine(void)
 {
-   if (dmi_iterate(dmi_decode))
-   printk(KERN_INFO "DMI not present.\n");
+   u8 buf[15];
+   char __iomem *p, *q;
+
+   /*
+* no iounmap() for that ioremap(); it would be a no-op, but it's
+* so early in setup that sucker gets confused into doing what
+* it shouldn't if we actually call it.
+*/
+   p = ioremap(0xF, 0x1);
+   if (p == NULL)
+   goto out;
+
+   for (q = p; q < p + 0x1; q += 16) {
+   memcpy_fromio(buf, q, 15);
+   if ((memcmp(buf, "_DMI_", 5) == 0) && dmi_checksum(buf)) {
+   u16 num = (buf[13] << 8) | buf[12];
+   u16 len = (buf[7] << 8) | buf[6];
+   u32 base = (buf[11] << 24) | (buf[10] << 16) |
+  (buf[9] << 8) | buf[8];
+
+   /*
+* DMI version 0.0 means that the real version is taken 
from
+* the SMBIOS version, which we don't know at this 
point.
+*/
+   if (buf[14] != 0)
+   printk(KERN_INFO "DMI %d.%d present.\n",
+   buf[14] >> 4, buf[14] & 0xF);
+   else
+   printk(KERN_INFO "DMI present.\n");
+
+   dmi_printk((KERN_INFO "%d structures occupying %d 
bytes.\n",
+   num, len));
+   dmi_printk((KERN_INFO "DMI table at 0x%08X.\n", base));
+
+   if (dmi_table(base,len, num, dmi_decode) == 0)
+   return;
+   }
+   }
+
+out:   printk(KERN_INFO "DMI not present.\n");
 }
 
 

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 2/5] 2.6.13-rc5-mm1, make dmi_string() behave like strdup()

2005-08-10 Thread Andrey Panin

This patch changes dmi_string() function to allocate string copy by itself,
to avoid code duplication in the next patch.

Signed-off-by: Andrey Panin [EMAIL PROTECTED]

 arch/i386/kernel/dmi_scan.c |   39 +++
 1 files changed, 23 insertions(+), 16 deletions(-)

diff -urdpNX /usr/share/dontdiff 
linux-2.6.13-rc5-mm1.vanilla/arch/i386/kernel/dmi_scan.c 
linux-2.6.13-rc5-mm1/arch/i386/kernel/dmi_scan.c
--- linux-2.6.13-rc5-mm1.vanilla/arch/i386/kernel/dmi_scan.c2005-06-14 
23:31:39.0 +0400
+++ linux-2.6.13-rc5-mm1/arch/i386/kernel/dmi_scan.c2005-06-14 
23:31:51.0 +0400
@@ -16,15 +16,25 @@ struct dmi_header {
 static char * __init dmi_string(struct dmi_header *dm, u8 s)
 {
u8 *bp = ((u8 *) dm) + dm-length;
+   char *str = ;
 
-   if (!s)
-   return ;
-   s--;
-   while (s  0  *bp) {
-   bp += strlen(bp) + 1;
+   if (s) {
s--;
-   }
-   return bp;
+   while (s  0  *bp) {
+   bp += strlen(bp) + 1;
+   s--;
+   }
+
+   if (*bp != 0) {
+   str = alloc_bootmem(strlen(bp) + 1);
+   if (str != NULL)
+   strcpy(str, bp);
+   else
+   printk(KERN_ERR dmi_string: out of memory.\n);
+   }
+   }
+
+   return str;
 }
 
 /*
@@ -84,19 +94,16 @@ static char *dmi_ident[DMI_STRING_MAX];
  */
 static void __init dmi_save_ident(struct dmi_header *dm, int slot, int string)
 {
-   char *d = (char*)dm;
-   char *p = dmi_string(dm, d[string]);
+   char *p, *d = (char*) dm;
 
-   if (p == NULL || *p == 0)
-   return;
if (dmi_ident[slot])
return;
 
-   dmi_ident[slot] = alloc_bootmem(strlen(p) + 1);
-   if(dmi_ident[slot])
-   strcpy(dmi_ident[slot], p);
-   else
-   printk(KERN_ERR dmi_save_ident: out of memory.\n);
+   p = dmi_string(dm, d[string]);
+   if (p == NULL)
+   return;
+
+   dmi_ident[slot] = p;
 }
 
 /*

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 0/5] 2.6.13-rc5-mm1, remove uneeded function

2005-08-10 Thread Andrey Panin

After elimination of central DMI blacklist dmi_scan_machine() function
became a wrapper for dmi_iterate(). This patch moves some code around to
kill unneeded function.

Signed-off-by: Andrey Panin [EMAIL PROTECTED]

 arch/i386/kernel/dmi_scan.c |   85 
 1 files changed, 40 insertions(+), 45 deletions(-)

diff -urdpNX /usr/share/dontdiff 
linux-2.6.13-rc5-mm1.vanilla/arch/i386/kernel/dmi_scan.c 
linux-2.6.13-rc5-mm1/arch/i386/kernel/dmi_scan.c
--- linux-2.6.13-rc5-mm1.vanilla/arch/i386/kernel/dmi_scan.c2005-06-12 
23:07:37.0 +0400
+++ linux-2.6.13-rc5-mm1/arch/i386/kernel/dmi_scan.c2005-06-14 
23:18:18.0 +0400
@@ -84,49 +84,6 @@ static int __init dmi_checksum(u8 *buf)
return sum == 0;
 }
 
-static int __init dmi_iterate(void (*decode)(struct dmi_header *))
-{
-   u8 buf[15];
-   char __iomem *p, *q;
-
-   /*
-* no iounmap() for that ioremap(); it would be a no-op, but it's
-* so early in setup that sucker gets confused into doing what
-* it shouldn't if we actually call it.
-*/
-   p = ioremap(0xF, 0x1);
-   if (p == NULL)
-   return -1;
-
-   for (q = p; q  p + 0x1; q += 16) {
-   memcpy_fromio(buf, q, 15);
-   if ((memcmp(buf, _DMI_, 5) == 0)  dmi_checksum(buf)) {
-   u16 num = (buf[13]  8) | buf[12];
-   u16 len = (buf[7]  8) | buf[6];
-   u32 base = (buf[11]  24) | (buf[10]  16) |
-  (buf[9]  8) | buf[8];
-
-   /*
-* DMI version 0.0 means that the real version is taken 
from
-* the SMBIOS version, which we don't know at this 
point.
-*/
-   if (buf[14] != 0)
-   printk(KERN_INFO DMI %d.%d present.\n,
-   buf[14]  4, buf[14]  0xF);
-   else
-   printk(KERN_INFO DMI present.\n);
-
-   dmi_printk((KERN_INFO %d structures occupying %d 
bytes.\n,
-   num, len));
-   dmi_printk((KERN_INFO DMI table at 0x%08X.\n, base));
-
-   if (dmi_table(base,len, num, decode) == 0)
-   return 0;
-   }
-   }
-   return -1;
-}
-
 static char *dmi_ident[DMI_STRING_MAX];
 
 /*
@@ -190,8 +147,46 @@ static void __init dmi_decode(struct dmi
 
 void __init dmi_scan_machine(void)
 {
-   if (dmi_iterate(dmi_decode))
-   printk(KERN_INFO DMI not present.\n);
+   u8 buf[15];
+   char __iomem *p, *q;
+
+   /*
+* no iounmap() for that ioremap(); it would be a no-op, but it's
+* so early in setup that sucker gets confused into doing what
+* it shouldn't if we actually call it.
+*/
+   p = ioremap(0xF, 0x1);
+   if (p == NULL)
+   goto out;
+
+   for (q = p; q  p + 0x1; q += 16) {
+   memcpy_fromio(buf, q, 15);
+   if ((memcmp(buf, _DMI_, 5) == 0)  dmi_checksum(buf)) {
+   u16 num = (buf[13]  8) | buf[12];
+   u16 len = (buf[7]  8) | buf[6];
+   u32 base = (buf[11]  24) | (buf[10]  16) |
+  (buf[9]  8) | buf[8];
+
+   /*
+* DMI version 0.0 means that the real version is taken 
from
+* the SMBIOS version, which we don't know at this 
point.
+*/
+   if (buf[14] != 0)
+   printk(KERN_INFO DMI %d.%d present.\n,
+   buf[14]  4, buf[14]  0xF);
+   else
+   printk(KERN_INFO DMI present.\n);
+
+   dmi_printk((KERN_INFO %d structures occupying %d 
bytes.\n,
+   num, len));
+   dmi_printk((KERN_INFO DMI table at 0x%08X.\n, base));
+
+   if (dmi_table(base,len, num, dmi_decode) == 0)
+   return;
+   }
+   }
+
+out:   printk(KERN_INFO DMI not present.\n);
 }
 
 

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/5] 2.6.13-rc5-mm1, remove old debugging code

2005-08-10 Thread Andrey Panin

DMI debugging code is unused for ages. This patch removes it.

Signed-off-by: Andrey Panin [EMAIL PROTECTED]

 arch/i386/kernel/dmi_scan.c |   21 -
 1 files changed, 21 deletions(-)

diff -urdpNX /usr/share/dontdiff 
linux-2.6.13-rc5-mm1.vanilla/arch/i386/kernel/dmi_scan.c 
linux-2.6.13-rc5-mm1/arch/i386/kernel/dmi_scan.c
--- linux-2.6.13-rc5-mm1.vanilla/arch/i386/kernel/dmi_scan.c2005-06-14 
23:24:54.0 +0400
+++ linux-2.6.13-rc5-mm1/arch/i386/kernel/dmi_scan.c2005-06-14 
23:25:07.0 +0400
@@ -12,13 +12,6 @@ struct dmi_header {
u16 handle;
 };
 
-#undef DMI_DEBUG
-
-#ifdef DMI_DEBUG
-#define dmi_printk(x) printk x
-#else
-#define dmi_printk(x)
-#endif
 
 static char * __init dmi_string(struct dmi_header *dm, u8 s)
 {
@@ -117,29 +110,19 @@ static void __init dmi_decode(struct dmi

switch(dm-type) {
case  0:
-   dmi_printk((BIOS Vendor: %s\n, dmi_string(dm, data[4])));
dmi_save_ident(dm, DMI_BIOS_VENDOR, 4);
-   dmi_printk((BIOS Version: %s\n, dmi_string(dm, data[5])));
dmi_save_ident(dm, DMI_BIOS_VERSION, 5);
-   dmi_printk((BIOS Release: %s\n, dmi_string(dm, data[8])));
dmi_save_ident(dm, DMI_BIOS_DATE, 8);
break;
case 1:
-   dmi_printk((System Vendor: %s\n, dmi_string(dm, data[4])));
dmi_save_ident(dm, DMI_SYS_VENDOR, 4);
-   dmi_printk((Product Name: %s\n, dmi_string(dm, data[5])));
dmi_save_ident(dm, DMI_PRODUCT_NAME, 5);
-   dmi_printk((Version: %s\n, dmi_string(dm, data[6])));
dmi_save_ident(dm, DMI_PRODUCT_VERSION, 6);
-   dmi_printk((Serial Number: %s\n, dmi_string(dm, data[7])));
dmi_save_ident(dm, DMI_PRODUCT_SERIAL, 7);
break;
case 2:
-   dmi_printk((Board Vendor: %s\n, dmi_string(dm, data[4])));
dmi_save_ident(dm, DMI_BOARD_VENDOR, 4);
-   dmi_printk((Board Name: %s\n, dmi_string(dm, data[5])));
dmi_save_ident(dm, DMI_BOARD_NAME, 5);
-   dmi_printk((Board Version: %s\n, dmi_string(dm, data[6])));
dmi_save_ident(dm, DMI_BOARD_VERSION, 6);
break;
}
@@ -177,10 +160,6 @@ void __init dmi_scan_machine(void)
else
printk(KERN_INFO DMI present.\n);
 
-   dmi_printk((KERN_INFO %d structures occupying %d 
bytes.\n,
-   num, len));
-   dmi_printk((KERN_INFO DMI table at 0x%08X.\n, base));
-
if (dmi_table(base,len, num, dmi_decode) == 0)
return;
}

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 3/5] 2.6.13-rc5-mm1, add onboard devices discovery

2005-08-10 Thread Andrey Panin

This patch adds onboard devices and IPMI BMC discovery into DMI scan code.
Drivers can use dmi_find_device() function to search for devices by type
and name.

Signed-off-by: Andrey Panin [EMAIL PROTECTED]

 arch/i386/kernel/dmi_scan.c |  102 ++--
 include/linux/dmi.h |   34 +-
 2 files changed, 121 insertions(+), 15 deletions(-)

diff -urdpNX /usr/share/dontdiff 
linux-2.6.13-rc5-mm1.vanilla/arch/i386/kernel/dmi_scan.c 
linux-2.6.13-rc5-mm1/arch/i386/kernel/dmi_scan.c
--- linux-2.6.13-rc5-mm1.vanilla/arch/i386/kernel/dmi_scan.c2005-08-09 
14:39:13.0 +0400
+++ linux-2.6.13-rc5-mm1/arch/i386/kernel/dmi_scan.c2005-08-09 
15:07:57.0 +0400
@@ -6,13 +6,6 @@
 #include linux/bootmem.h
 
 
-struct dmi_header {
-   u8 type;
-   u8 length;
-   u16 handle;
-};
-
-
 static char * __init dmi_string(struct dmi_header *dm, u8 s)
 {
u8 *bp = ((u8 *) dm) + dm-length;
@@ -88,6 +81,7 @@ static int __init dmi_checksum(u8 *buf)
 }
 
 static char *dmi_ident[DMI_STRING_MAX];
+static LIST_HEAD(dmi_devices);
 
 /*
  * Save a DMI string
@@ -106,6 +100,58 @@ static void __init dmi_save_ident(struct
dmi_ident[slot] = p;
 }
 
+static void __init dmi_save_devices(struct dmi_header *dm)
+{
+   int i, count = (dm-length - sizeof(struct dmi_header)) / 2;
+   struct dmi_device *dev;
+
+   for (i = 0; i  count; i++) {
+   char *d = ((char *) dm) + (i * 2);
+
+   /* Skip disabled device */
+   if ((*d  0x80) == 0)
+   continue;
+
+   dev = alloc_bootmem(sizeof(*dev));
+   if (!dev) {
+   printk(KERN_ERR dmi_save_devices: out of memory.\n);
+   break;
+   }
+
+   dev-type = *d++  0x7f;
+   dev-name = dmi_string(dm, *d);
+   dev-device_data = NULL;
+
+   list_add(dev-list, dmi_devices);
+   }
+}
+
+static void __init dmi_save_ipmi_device(struct dmi_header *dm)
+{
+   struct dmi_device *dev;
+   void * data;
+
+   data = alloc_bootmem(dm-length);
+   if (data == NULL) {
+   printk(KERN_ERR dmi_save_ipmi_device: out of memory.\n);
+   return;
+   }
+
+   memcpy(data, dm, dm-length);
+
+   dev = alloc_bootmem(sizeof(*dev));
+   if (!dev) {
+   printk(KERN_ERR dmi_save_ipmi_device: out of memory.\n);
+   return;
+   }
+
+   dev-type = DMI_DEV_TYPE_IPMI;
+   dev-name = IPMI controller;
+   dev-device_data = data;
+
+   list_add(dev-list, dmi_devices);
+}
+
 /*
  * Process a DMI table entry. Right now all we care about are the BIOS
  * and machine entries. For 2.5 we should pull the smbus controller info
@@ -113,25 +159,28 @@ static void __init dmi_save_ident(struct
  */
 static void __init dmi_decode(struct dmi_header *dm)
 {
-   u8 *data __attribute__((__unused__)) = (u8 *)dm;
-   
switch(dm-type) {
-   case  0:
+   case 0: /* BIOS Information */
dmi_save_ident(dm, DMI_BIOS_VENDOR, 4);
dmi_save_ident(dm, DMI_BIOS_VERSION, 5);
dmi_save_ident(dm, DMI_BIOS_DATE, 8);
break;
-   case 1:
+   case 1: /* System Information */
dmi_save_ident(dm, DMI_SYS_VENDOR, 4);
dmi_save_ident(dm, DMI_PRODUCT_NAME, 5);
dmi_save_ident(dm, DMI_PRODUCT_VERSION, 6);
dmi_save_ident(dm, DMI_PRODUCT_SERIAL, 7);
break;
-   case 2:
+   case 2: /* Base Board Information */
dmi_save_ident(dm, DMI_BOARD_VENDOR, 4);
dmi_save_ident(dm, DMI_BOARD_NAME, 5);
dmi_save_ident(dm, DMI_BOARD_VERSION, 6);
break;
+   case 10:/* Onboard Devices Information */
+   dmi_save_devices(dm);
+   break;
+   case 38:/* IPMI Device Information */
+   dmi_save_ipmi_device(dm);
}
 }
 
@@ -221,3 +270,32 @@ char *dmi_get_system_info(int field)
return dmi_ident[field];
 }
 EXPORT_SYMBOL(dmi_get_system_info);
+
+/**
+ * dmi_find_device - find onboard device by type/name
+ * @type: device type or %DMI_DEV_TYPE_ANY to match all device types
+ * @desc: device name string or %NULL to match all
+ * @from: previous device found in search, or %NULL for new search.
+ *
+ * Iterates through the list of known onboard devices. If a device is
+ * found with a matching @vendor and @device, a pointer to its device
+ * structure is returned.  Otherwise, %NULL is returned.
+ * A new search is initiated by passing %NULL to the @from argument.
+ * If @from is not %NULL, searches continue from next device.
+ */
+struct dmi_device * dmi_find_device(int type, const char *name,
+   struct dmi_device *from

[PATCH 4/5] 2.6.13-rc5-mm1, IPMI, use dmi_find_device()

2005-08-10 Thread Andrey Panin

This patch replaces homebrew DMI scanning code in IPMI System Interface driver
with dmi_find_device() call.

Signed-off-by: Andrey Panin [EMAIL PROTECTED]

 drivers/char/ipmi/ipmi_si_intf.c |  105 ++-
 1 files changed, 17 insertions(+), 88 deletions(-)

diff -urdpNX /usr/share/dontdiff 
linux-2.6.13-rc5-mm1.vanilla/drivers/char/ipmi/ipmi_si_intf.c 
linux-2.6.13-rc5-mm1/drivers/char/ipmi/ipmi_si_intf.c
--- linux-2.6.13-rc5-mm1.vanilla/drivers/char/ipmi/ipmi_si_intf.c   
2005-08-08 14:32:07.0 +0400
+++ linux-2.6.13-rc5-mm1/drivers/char/ipmi/ipmi_si_intf.c   2005-08-08 
11:39:00.0 +0400
@@ -75,6 +75,7 @@ static inline void add_usec_to_timer(str
 #include asm/io.h
 #include ipmi_si_sm.h
 #include linux/init.h
+#include linux/dmi.h
 
 /* Measure times between events in the driver. */
 #undef DEBUG_TIMING
@@ -1642,22 +1643,15 @@ typedef struct dmi_ipmi_data
 static dmi_ipmi_data_t dmi_data[SI_MAX_DRIVERS];
 static int dmi_data_entries;
 
-typedef struct dmi_header
-{
-   u8  type;
-   u8  length;
-   u16 handle;
-} dmi_header_t;
-
-static int decode_dmi(dmi_header_t __iomem *dm, int intf_num)
+static int __init decode_dmi(struct dmi_header *dm, int intf_num)
 {
-   u8  __iomem *data = (u8 __iomem *)dm;
+   u8 *data = (u8 *)dm;
unsigned long   base_addr;
u8  reg_spacing;
-   u8  len = readb(dm-length);
+   u8  len = dm-length;
dmi_ipmi_data_t *ipmi_data = dmi_data+intf_num;
 
-   ipmi_data-type = readb(data[4]);
+   ipmi_data-type = data[4];
 
memcpy(base_addr, data+8, sizeof(unsigned long));
if (len = 0x11) {
@@ -1672,12 +1666,12 @@ static int decode_dmi(dmi_header_t __iom
}
/* If bit 4 of byte 0x10 is set, then the lsb for the address
   is odd. */
-   ipmi_data-base_addr = base_addr | ((readb(data[0x10])  0x10) 
 4);
+   ipmi_data-base_addr = base_addr | ((data[0x10]  0x10)  4);
 
-   ipmi_data-irq = readb(data[0x11]);
+   ipmi_data-irq = data[0x11];
 
/* The top two bits of byte 0x10 hold the register spacing. */
-   reg_spacing = (readb(data[0x10])  0xC0)  6;
+   reg_spacing = (data[0x10]  0xC0)  6;
switch(reg_spacing){
case 0x00: /* Byte boundaries */
ipmi_data-offset = 1;
@@ -1705,7 +1699,7 @@ static int decode_dmi(dmi_header_t __iom
ipmi_data-offset = 1;
}
 
-   ipmi_data-slave_addr = readb(data[6]);
+   ipmi_data-slave_addr = data[6];
 
if (is_new_interface(-1, ipmi_data-addr_space,ipmi_data-base_addr)) {
dmi_data_entries++;
@@ -1717,82 +1711,17 @@ static int decode_dmi(dmi_header_t __iom
return -1;
 }
 
-static int dmi_table(u32 base, int len, int num)
-{
-   u8__iomem *buf;
-   struct dmi_header __iomem *dm;
-   u8__iomem *data;
-   int   i=1;
-   int   status=-1;
-   int   intf_num = 0;
-
-   buf = ioremap(base, len);
-   if(buf==NULL)
-   return -1;
-
-   data = buf;
-
-   while(inum  (data - buf)  len)
-   {
-   dm=(dmi_header_t __iomem *)data;
-
-   if((data-buf+readb(dm-length)) = len)
-   break;
-
-   if (readb(dm-type) == 38) {
-   if (decode_dmi(dm, intf_num) == 0) {
-   intf_num++;
-   if (intf_num = SI_MAX_DRIVERS)
-   break;
-   }
-   }
-
-   data+=readb(dm-length);
-   while((data-buf)  len  (readb(data)||readb(data+1)))
-   data++;
-   data+=2;
-   i++;
-   }
-   iounmap(buf);
-
-   return status;
-}
-
-static inline int dmi_checksum(u8 *buf)
-{
-   u8   sum=0;
-   int  a;
-
-   for(a=0; a15; a++)
-   sum+=buf[a];
-   return (sum==0);
-}
-
-static int dmi_decode(void)
+static void __init dmi_find_bmc(void)
 {
-   u8   buf[15];
-   u32  fp=0xF;
-
-#ifdef CONFIG_SIMNOW
-   return -1;
-#endif
+   struct dmi_device *dev = NULL;
+   int intf_num = 0;
 
-   while(fp  0xF)
-   {
-   isa_memcpy_fromio(buf, fp, 15);
-   if(memcmp(buf, _DMI_, 5)==0  dmi_checksum(buf))
-   {
-   u16 num=buf[13]8|buf[12];
-   u16 len=buf[7]8|buf[6];
-   u32 base=buf[11]24|buf[10]16|buf[9]8|buf[8];
+   while ((dev = dmi_find_device(DMI_DEV_TYPE_IPMI, NULL, dev))) {
+   if (intf_num = SI_MAX_DRIVERS)
+   break;
 
-   if(dmi_table(base, len, num) == 0

[PATCH 5/5] 2.6.13-rc5-mm1, driver for IBM Automatic Server Restart watchdog

2005-08-10 Thread Andrey Panin

This patch adds driver for IBM Automatic Server Restart watchdog hardware
found in some IBM eServer xSeries machines. This driver is based on the ugly
driver provided by IBM. Driver was tested on IBM eServer 226.

Signed-off-by: Andrey Panin [EMAIL PROTECTED]

 drivers/char/watchdog/Kconfig  |   10 +
 drivers/char/watchdog/Makefile |1 
 drivers/char/watchdog/ibmasr.c |  407 +
 3 files changed, 418 insertions(+)

diff -urdpN linux-2.6.13-rc5-mm1.vanilla/drivers/char/watchdog/ibmasr.c 
linux-2.6.13-rc5-mm1/drivers/char/watchdog/ibmasr.c
--- linux-2.6.13-rc5-mm1.vanilla/drivers/char/watchdog/ibmasr.c 1970-01-01 
03:00:00.0 +0300
+++ linux-2.6.13-rc5-mm1/drivers/char/watchdog/ibmasr.c 2005-08-10 
11:43:45.0 +0400
@@ -0,0 +1,407 @@
+/*
+ * IBM Automatic Server Restart driver.
+ *
+ * Copyright (c) 2005 Andrey Panin [EMAIL PROTECTED]
+ *
+ * Based on driver written by Pete Reynolds.
+ * Copyright (c) IBM Corporation, 1998-2004.
+ *
+ * This software may be used and distributed according to the terms
+ * of the GNU Public License, incorporated herein by reference.
+ */
+
+#include linux/config.h
+#include linux/fs.h
+#include linux/kernel.h
+#include linux/slab.h
+#include linux/module.h
+#include linux/pci.h
+#include linux/timer.h
+#include linux/miscdevice.h
+#include linux/watchdog.h
+#include linux/dmi.h
+
+#include asm/io.h
+#include asm/uaccess.h
+
+
+enum {
+   ASMTYPE_UNKNOWN,
+   ASMTYPE_TOPAZ,
+   ASMTYPE_JASPER,
+   ASMTYPE_PEARL,
+   ASMTYPE_JUNIPER,
+   ASMTYPE_SPRUCE,
+};
+
+#define PFX ibmasr: 
+
+#define TOPAZ_ASR_REG_OFFSET   4
+#define TOPAZ_ASR_TOGGLE   0x40
+#define TOPAZ_ASR_DISABLE  0x80
+
+/* PEARL ASR S/W REGISTER SUPERIO PORT ADDRESSES */
+#define PEARL_BASE 0xe04
+#define PEARL_WRITE0xe06
+#define PEARL_READ 0xe07
+
+#define PEARL_ASR_DISABLE_MASK 0x80/* bit 7: disable = 1, enable = 0 */
+#define PEARL_ASR_TOGGLE_MASK  0x40/* bit 6: 0, then 1, then 0 */
+
+/* JASPER OFFSET FROM SIO BASE ADDR TO ASR S/W REGISTERS. */
+#define JASPER_ASR_REG_OFFSET  0x38
+
+#define JASPER_ASR_DISABLE_MASK0x01/* bit 0: disable = 1, enable = 
0 */
+#define JASPER_ASR_TOGGLE_MASK 0x02/* bit 1: 0, then 1, then 0 */
+
+#define JUNIPER_BASE_ADDRESS   0x54b   /* Base address of Juniper ASR */
+#define JUNIPER_ASR_DISABLE_MASK 0x01  /* bit 0: disable = 1 enable = 0 */
+#define JUNIPER_ASR_TOGGLE_MASK0x02/* bit 1: 0, then 1, then 0 */
+
+#define SPRUCE_BASE_ADDRESS0x118e  /* Base address of Spruce ASR */
+#define SPRUCE_ASR_DISABLE_MASK0x01/* bit 1: disable = 1 enable = 
0 */
+#define SPRUCE_ASR_TOGGLE_MASK 0x02/* bit 0: 0, then 1, then 0 */
+
+
+static int nowayout = WATCHDOG_NOWAYOUT;
+
+static unsigned long asr_is_open;
+static char asr_expect_close;
+
+static unsigned int asr_type, asr_base, asr_length;
+static unsigned int asr_read_addr, asr_write_addr;
+static unsigned char asr_toggle_mask, asr_disable_mask;
+
+static void asr_toggle(void)
+{
+   unsigned char reg = inb(asr_read_addr);
+
+   outb(reg  ~asr_toggle_mask, asr_write_addr);
+   reg = inb(asr_read_addr);
+
+   outb(reg | asr_toggle_mask, asr_write_addr);
+   reg = inb(asr_read_addr);
+
+   outb(reg  ~asr_toggle_mask, asr_write_addr);
+   reg = inb(asr_read_addr);
+}
+
+static void asr_enable(void)
+{
+   unsigned char reg;
+
+   if (asr_type == ASMTYPE_TOPAZ) {
+   /* asr_write_addr == asr_read_addr */
+   reg = inb(asr_read_addr);
+   outb(reg  ~(TOPAZ_ASR_TOGGLE | TOPAZ_ASR_DISABLE),
+asr_read_addr);
+   } else {
+   /*
+* First make sure the hardware timer is reset by toggling
+* ASR hardware timer line.
+*/
+   asr_toggle();
+
+   reg = inb(asr_read_addr);
+   outb(reg  ~asr_disable_mask, asr_write_addr);
+   }
+   reg = inb(asr_read_addr);
+}
+
+static void asr_disable(void)
+{
+   unsigned char reg = inb(asr_read_addr);
+
+   if (asr_type == ASMTYPE_TOPAZ)
+   /* asr_write_addr == asr_read_addr */
+   outb(reg | TOPAZ_ASR_TOGGLE | TOPAZ_ASR_DISABLE,
+asr_read_addr);
+   else {
+   outb(reg | asr_toggle_mask, asr_write_addr);
+   reg = inb(asr_read_addr);
+
+   outb(reg | asr_disable_mask, asr_write_addr);
+   }
+   reg = inb(asr_read_addr);
+}
+
+static int __init asr_get_base_address(void)
+{
+   unsigned char low, high;
+   const char *type = ;
+
+   asr_length = 1;
+
+   switch (asr_type) {
+   case ASMTYPE_TOPAZ:
+   /* SELECT SuperIO CHIP FOR QUERYING (WRITE 0x07 TO BOTH 0x2E 
and 0x2F) */
+   outb(0x07, 0x2e);
+   outb(0x07, 0x2f);
+
+   /* SELECT AND READ THE HIGH-NIBBLE OF THE GPIO BASE ADDRESS

Re: [PATCH 4/5] 2.6.13-rc5-mm1, IPMI, use dmi_find_device()

2005-08-10 Thread Corey Minyard
Andrew, this patch (along with the patch 3/5) works fine for me and is
an obvious improvement to the IPMI driver.  You will need to remove the
patch named dmi_table-counting-in-ipmi_si_intfc.patch first.

Thanks, Andrey.

-Corey

On Wed, 2005-08-10 at 14:32 +0400, Andrey Panin wrote:
 This patch replaces homebrew DMI scanning code in IPMI System Interface driver
 with dmi_find_device() call.
 
 Signed-off-by: Andrey Panin [EMAIL PROTECTED]
 
  drivers/char/ipmi/ipmi_si_intf.c |  105 
 ++-
  1 files changed, 17 insertions(+), 88 deletions(-)
 
 diff -urdpNX /usr/share/dontdiff 
 linux-2.6.13-rc5-mm1.vanilla/drivers/char/ipmi/ipmi_si_intf.c 
 linux-2.6.13-rc5-mm1/drivers/char/ipmi/ipmi_si_intf.c
 --- linux-2.6.13-rc5-mm1.vanilla/drivers/char/ipmi/ipmi_si_intf.c 
 2005-08-08 14:32:07.0 +0400
 +++ linux-2.6.13-rc5-mm1/drivers/char/ipmi/ipmi_si_intf.c 2005-08-08 
 11:39:00.0 +0400
 @@ -75,6 +75,7 @@ static inline void add_usec_to_timer(str
  #include asm/io.h
  #include ipmi_si_sm.h
  #include linux/init.h
 +#include linux/dmi.h
  
  /* Measure times between events in the driver. */
  #undef DEBUG_TIMING
 @@ -1642,22 +1643,15 @@ typedef struct dmi_ipmi_data
  static dmi_ipmi_data_t dmi_data[SI_MAX_DRIVERS];
  static int dmi_data_entries;
  
 -typedef struct dmi_header
 -{
 - u8  type;
 - u8  length;
 - u16 handle;
 -} dmi_header_t;
 -
 -static int decode_dmi(dmi_header_t __iomem *dm, int intf_num)
 +static int __init decode_dmi(struct dmi_header *dm, int intf_num)
  {
 - u8  __iomem *data = (u8 __iomem *)dm;
 + u8 *data = (u8 *)dm;
   unsigned long   base_addr;
   u8  reg_spacing;
 - u8  len = readb(dm-length);
 + u8  len = dm-length;
   dmi_ipmi_data_t *ipmi_data = dmi_data+intf_num;
  
 - ipmi_data-type = readb(data[4]);
 + ipmi_data-type = data[4];
  
   memcpy(base_addr, data+8, sizeof(unsigned long));
   if (len = 0x11) {
 @@ -1672,12 +1666,12 @@ static int decode_dmi(dmi_header_t __iom
   }
   /* If bit 4 of byte 0x10 is set, then the lsb for the address
  is odd. */
 - ipmi_data-base_addr = base_addr | ((readb(data[0x10])  0x10) 
  4);
 + ipmi_data-base_addr = base_addr | ((data[0x10]  0x10)  4);
  
 - ipmi_data-irq = readb(data[0x11]);
 + ipmi_data-irq = data[0x11];
  
   /* The top two bits of byte 0x10 hold the register spacing. */
 - reg_spacing = (readb(data[0x10])  0xC0)  6;
 + reg_spacing = (data[0x10]  0xC0)  6;
   switch(reg_spacing){
   case 0x00: /* Byte boundaries */
   ipmi_data-offset = 1;
 @@ -1705,7 +1699,7 @@ static int decode_dmi(dmi_header_t __iom
   ipmi_data-offset = 1;
   }
  
 - ipmi_data-slave_addr = readb(data[6]);
 + ipmi_data-slave_addr = data[6];
  
   if (is_new_interface(-1, ipmi_data-addr_space,ipmi_data-base_addr)) {
   dmi_data_entries++;
 @@ -1717,82 +1711,17 @@ static int decode_dmi(dmi_header_t __iom
   return -1;
  }
  
 -static int dmi_table(u32 base, int len, int num)
 -{
 - u8__iomem *buf;
 - struct dmi_header __iomem *dm;
 - u8__iomem *data;
 - int   i=1;
 - int   status=-1;
 - int   intf_num = 0;
 -
 - buf = ioremap(base, len);
 - if(buf==NULL)
 - return -1;
 -
 - data = buf;
 -
 - while(inum  (data - buf)  len)
 - {
 - dm=(dmi_header_t __iomem *)data;
 -
 - if((data-buf+readb(dm-length)) = len)
 - break;
 -
 - if (readb(dm-type) == 38) {
 - if (decode_dmi(dm, intf_num) == 0) {
 - intf_num++;
 - if (intf_num = SI_MAX_DRIVERS)
 - break;
 - }
 - }
 -
 - data+=readb(dm-length);
 - while((data-buf)  len  (readb(data)||readb(data+1)))
 - data++;
 - data+=2;
 - i++;
 - }
 - iounmap(buf);
 -
 - return status;
 -}
 -
 -static inline int dmi_checksum(u8 *buf)
 -{
 - u8   sum=0;
 - int  a;
 -
 - for(a=0; a15; a++)
 - sum+=buf[a];
 - return (sum==0);
 -}
 -
 -static int dmi_decode(void)
 +static void __init dmi_find_bmc(void)
  {
 - u8   buf[15];
 - u32  fp=0xF;
 -
 -#ifdef CONFIG_SIMNOW
 - return -1;
 -#endif
 + struct dmi_device *dev = NULL;
 + int intf_num = 0;
  
 - while(fp  0xF)
 - {
 - isa_memcpy_fromio(buf, fp, 15);
 - if(memcmp(buf, _DMI_, 5)==0  dmi_checksum(buf))
 - {
 - u16 num=buf[13]8|buf[12];
 - u16 len=buf[7]8|buf[6];
 - u32

Re: 2.6.13-rc5-mm1 doesnt boot on x86_64

2005-08-09 Thread Ashok Raj
On Mon, Aug 08, 2005 at 07:06:50PM -0500, James Bottomley wrote:
> On Mon, 2005-08-08 at 10:42 -0700, Andrew Morton wrote:
> > -mm has extra list_head debugging goodies.  I'd be suspecting a list_head
> > corruption detected somewhere under spi_release_transport().
> 
> Aha, looking in wrong driver ... the problem actually appears to be a
> double release of the transport template in aic79xx.  Try this patch

Hi James

Sorry for the delay...

This patch works like a charm!.

Cheers,
ashok
> 
> James
> 
> diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c 
> b/drivers/scsi/aic7xxx/aic79xx_osm.c
> --- a/drivers/scsi/aic7xxx/aic79xx_osm.c
> +++ b/drivers/scsi/aic7xxx/aic79xx_osm.c
> @@ -2326,8 +2326,6 @@ done:
>   return (retval);
>  }
>  
> -static void ahd_linux_exit(void);
> -
>  static void ahd_linux_set_width(struct scsi_target *starget, int width)
>  {
>   struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
> @@ -2772,7 +2770,7 @@ ahd_linux_init(void)
>   if (ahd_linux_detect(_driver_template) > 0)
>   return 0;
>   spi_release_transport(ahd_linux_transport_template);
> - ahd_linux_exit();
> +
>   return -ENODEV;
>  }
>  
> diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c 
> b/drivers/scsi/aic7xxx/aic7xxx_osm.c
> --- a/drivers/scsi/aic7xxx/aic7xxx_osm.c
> +++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c
> @@ -2331,8 +2331,6 @@ ahc_platform_dump_card_state(struct ahc_
>  {
>  }
>  
> -static void ahc_linux_exit(void);
> -
>  static void ahc_linux_set_width(struct scsi_target *starget, int width)
>  {
>   struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
> 
> 

-- 
Cheers,
Ashok Raj
- Open Source Technology Center
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.13-rc5-mm1 doesnt boot on x86_64

2005-08-09 Thread Ashok Raj
On Mon, Aug 08, 2005 at 07:06:50PM -0500, James Bottomley wrote:
 On Mon, 2005-08-08 at 10:42 -0700, Andrew Morton wrote:
  -mm has extra list_head debugging goodies.  I'd be suspecting a list_head
  corruption detected somewhere under spi_release_transport().
 
 Aha, looking in wrong driver ... the problem actually appears to be a
 double release of the transport template in aic79xx.  Try this patch

Hi James

Sorry for the delay...

This patch works like a charm!.

Cheers,
ashok
 
 James
 
 diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c 
 b/drivers/scsi/aic7xxx/aic79xx_osm.c
 --- a/drivers/scsi/aic7xxx/aic79xx_osm.c
 +++ b/drivers/scsi/aic7xxx/aic79xx_osm.c
 @@ -2326,8 +2326,6 @@ done:
   return (retval);
  }
  
 -static void ahd_linux_exit(void);
 -
  static void ahd_linux_set_width(struct scsi_target *starget, int width)
  {
   struct Scsi_Host *shost = dev_to_shost(starget-dev.parent);
 @@ -2772,7 +2770,7 @@ ahd_linux_init(void)
   if (ahd_linux_detect(aic79xx_driver_template)  0)
   return 0;
   spi_release_transport(ahd_linux_transport_template);
 - ahd_linux_exit();
 +
   return -ENODEV;
  }
  
 diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c 
 b/drivers/scsi/aic7xxx/aic7xxx_osm.c
 --- a/drivers/scsi/aic7xxx/aic7xxx_osm.c
 +++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c
 @@ -2331,8 +2331,6 @@ ahc_platform_dump_card_state(struct ahc_
  {
  }
  
 -static void ahc_linux_exit(void);
 -
  static void ahc_linux_set_width(struct scsi_target *starget, int width)
  {
   struct Scsi_Host *shost = dev_to_shost(starget-dev.parent);
 
 

-- 
Cheers,
Ashok Raj
- Open Source Technology Center
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


2.6.13-rc5-mm1, mii.c functions linking problem

2005-08-08 Thread Jiri Slaby

Hello, i find out this problem:
#make O=../bu allmodconfig
...
#make O=../bu all
...
 LD  .tmp_vmlinux1
drivers/built-in.o(.text+0x63c87): In function `sis190_get_settings':
/l/latest/xxx/drivers/net/sis190.c:1656: undefined reference to 
`mii_ethtool_gset'

drivers/built-in.o(.text+0x63c96): In function `sis190_set_settings':
/l/latest/xxx/drivers/net/sis190.c:1663: undefined reference to 
`mii_ethtool_sset'

drivers/built-in.o(.text+0x63d04): In function `sis190_nway_reset':
/l/latest/xxx/drivers/net/sis190.c:1699: undefined reference to 
`mii_nway_restart'

drivers/built-in.o(.text+0x63d2d): In function `sis190_ioctl':
/l/latest/xxx/drivers/net/sis190.c:1732: undefined reference to 
`generic_mii_ioctl'

make[1]: *** [.tmp_vmlinux1] Error 1
make: *** [all] Error 2
# objdump ../bu/drivers/net/mii.o -t|grep gener
0018 l O __kcrctab  0004 __kcrctab_generic_mii_ioctl
005e l O __ksymtab_strings  0012 __kstrtab_generic_mii_ioctl
0030 l O __ksymtab  0008 __ksymtab_generic_mii_ioctl
131e7c56 g   *ABS*   __crc_generic_mii_ioctl
0635 g F .text  0130 generic_mii_ioctl
#objdump ../bu/drivers/net/built-in.o -t|grep gener
 *UND*   generic_mii_ioctl
# objdump ../bu/drivers/built-in.o -t|grep generic_mii
 *UND*   generic_mii_ioctl
...

--
Jiri Slaby www.fi.muni.cz/~xslaby
~\-/~  [EMAIL PROTECTED]  ~\-/~
241B347EC88228DE51EE A49C4A73A25004CB2A10

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.13-rc5-mm1 doesnt boot on x86_64

2005-08-08 Thread James Bottomley
On Mon, 2005-08-08 at 10:42 -0700, Andrew Morton wrote:
> -mm has extra list_head debugging goodies.  I'd be suspecting a list_head
> corruption detected somewhere under spi_release_transport().

Aha, looking in wrong driver ... the problem actually appears to be a
double release of the transport template in aic79xx.  Try this patch

James

diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c 
b/drivers/scsi/aic7xxx/aic79xx_osm.c
--- a/drivers/scsi/aic7xxx/aic79xx_osm.c
+++ b/drivers/scsi/aic7xxx/aic79xx_osm.c
@@ -2326,8 +2326,6 @@ done:
return (retval);
 }
 
-static void ahd_linux_exit(void);
-
 static void ahd_linux_set_width(struct scsi_target *starget, int width)
 {
struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
@@ -2772,7 +2770,7 @@ ahd_linux_init(void)
if (ahd_linux_detect(_driver_template) > 0)
return 0;
spi_release_transport(ahd_linux_transport_template);
-   ahd_linux_exit();
+
return -ENODEV;
 }
 
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c 
b/drivers/scsi/aic7xxx/aic7xxx_osm.c
--- a/drivers/scsi/aic7xxx/aic7xxx_osm.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c
@@ -2331,8 +2331,6 @@ ahc_platform_dump_card_state(struct ahc_
 {
 }
 
-static void ahc_linux_exit(void);
-
 static void ahc_linux_set_width(struct scsi_target *starget, int width)
 {
struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.13-rc5-mm1 doesnt boot on x86_64

2005-08-08 Thread Andrew Morton
James Bottomley <[EMAIL PROTECTED]> wrote:
>
> On Mon, 2005-08-08 at 19:11 +0200, Andi Kleen wrote:
> > Looks like a SCSI problem. The machine has an Adaptec SCSI adapter, right?
> 
> The traceback looks pretty meaningless.
> 
> What was happening on the machine before this.  i.e. was it booting up,
> in which case can we have the prior dmesg file; or was the aic79xxx
> driver being removed?
> 

-mm has extra list_head debugging goodies.  I'd be suspecting a list_head
corruption detected somewhere under spi_release_transport().


--- 25/include/linux/list.h~list_del-debug  2005-03-08 11:40:27.0 
-0800
+++ 25-akpm/include/linux/list.h2005-03-08 11:40:49.0 -0800
@@ -5,7 +5,9 @@
 
 #include 
 #include 
+#include 
 #include 
+#include 
 
 /*
  * These are non-NULL pointers that will result in page faults
@@ -160,6 +162,8 @@ static inline void __list_del(struct lis
  */
 static inline void list_del(struct list_head *entry)
 {
+   BUG_ON(entry->prev->next != entry);
+   BUG_ON(entry->next->prev != entry);
__list_del(entry->prev, entry->next);
entry->next = LIST_POISON1;
entry->prev = LIST_POISON2;
_

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.13-rc5-mm1 doesnt boot on x86_64

2005-08-08 Thread Ashok Raj
On Mon, Aug 08, 2005 at 12:33:29PM -0500, James Bottomley wrote:
> On Mon, 2005-08-08 at 19:11 +0200, Andi Kleen wrote:
> > Looks like a SCSI problem. The machine has an Adaptec SCSI adapter, right?
> 
> The traceback looks pretty meaningless.
> 
> What was happening on the machine before this.  i.e. was it booting up,
> in which case can we have the prior dmesg file; or was the aic79xxx
> driver being removed?

I can get the trace again, but basically the system was booting. 

AIC_7XXX was defined in defconfig, but my system doesnt have it. Seems like
the senario was the driver tried to probe, found nothing, and tries
to de-reg resulting in the BUG().

I will try to get the recompile and entire dmesg log in the meantime.
> 
> James
> 
> 

-- 
Cheers,
Ashok Raj
- Open Source Technology Center
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.13-rc5-mm1 doesnt boot on x86_64

2005-08-08 Thread James Bottomley
On Mon, 2005-08-08 at 19:11 +0200, Andi Kleen wrote:
> Looks like a SCSI problem. The machine has an Adaptec SCSI adapter, right?

The traceback looks pretty meaningless.

What was happening on the machine before this.  i.e. was it booting up,
in which case can we have the prior dmesg file; or was the aic79xxx
driver being removed?

James


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.13-rc5-mm1 doesnt boot on x86_64

2005-08-08 Thread Ashok Raj
On Mon, Aug 08, 2005 at 07:11:26PM +0200, Andi Kleen wrote:
> On Mon, Aug 08, 2005 at 09:48:19AM -0700, Ashok Raj wrote:
> > Folks,
> > 
> > Iam getting this on the recent 2.6.12-rc5-mm1 kernel built with defconfig. 
> > 
> > Cheers,
> > Ashok Raj
> > 
> > --- [cut here ] - [please bite here ] -
> > Kernel BUG at "include/linux/list.h":165
> > invalid operand:  [1] SMP
> > CPU 2
> > Modules linked in:
> > Pid: 1, comm: swapper Not tainted 2.6.13-rc5-mm1
> > RIP: 0010:[] 
> > {attribute_container_unregist}RSP: 0018:8100bfb63f00  
> > EFLAGS: 00010283
> > RAX: 8100bfbd4c58 RBX: 8100bfbd4c00 RCX: 804e6600
> > RDX: 00200200 RSI:  RDI: 804e6600
> > RBP:  R08: 8100bfbd4c48 R09: 0020
> > R10:  R11: 8019baa0 R12: 80100190
> > R13:  R14: 8010 R15: 80627fb0
> > FS:  () GS:80616980() knlGS:
> > CS:  0010 DS: 0018 ES: 0018 CR0: 8005003b
> > CR2:  CR3: 00101000 CR4: 06e0
> > Process swapper (pid: 1, threadinfo 8100bfb62000, task 8100bfb614d0)
> > Stack: 8032643d  8064499f 80100190
> >80651288  8010b249 0246
> >00020800 804ae180
> > Call Trace:{spi_release_transport+13} 
> > {ahd}   {init+505} 
> > {child_rip+8}
> >{init+0} {child_rip+0}
> 
> Looks like a SCSI problem. The machine has an Adaptec SCSI adapter, right?

Yep, its adaptec problem

Actually i dont need AIX7XXX, since my system requires only CONFIG_FUSION.
I turned that option off, and it seems to boot fine now.

Ashok


> 
> -AndI
> > 
> > 
> > Code: 0f 0b a3 e1 d9 44 80 ff ff ff ff c2 a5 00 49 8b 00 4c 39 40
> > RIP {attribute_container_unregister+52} RSP 
> >  <0>Kernel panic - not syncing: Attempted to kill init!
> > 

-- 
Cheers,
Ashok Raj
- Open Source Technology Center
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.13-rc5-mm1 doesnt boot on x86_64

2005-08-08 Thread Andi Kleen
On Mon, Aug 08, 2005 at 09:48:19AM -0700, Ashok Raj wrote:
> Folks,
> 
> Iam getting this on the recent 2.6.12-rc5-mm1 kernel built with defconfig. 
> 
> Cheers,
> Ashok Raj
> 
> --- [cut here ] - [please bite here ] -
> Kernel BUG at "include/linux/list.h":165
> invalid operand:  [1] SMP
> CPU 2
> Modules linked in:
> Pid: 1, comm: swapper Not tainted 2.6.13-rc5-mm1
> RIP: 0010:[] 
> {attribute_container_unregist}RSP: 0018:8100bfb63f00  
> EFLAGS: 00010283
> RAX: 8100bfbd4c58 RBX: 8100bfbd4c00 RCX: 804e6600
> RDX: 00200200 RSI:  RDI: 804e6600
> RBP:  R08: 8100bfbd4c48 R09: 0020
> R10:  R11: 8019baa0 R12: 80100190
> R13:  R14: 8010 R15: 80627fb0
> FS:  () GS:80616980() knlGS:
> CS:  0010 DS: 0018 ES: 0018 CR0: 8005003b
> CR2:  CR3: 00101000 CR4: 06e0
> Process swapper (pid: 1, threadinfo 8100bfb62000, task 8100bfb614d0)
> Stack: 8032643d  8064499f 80100190
>80651288  8010b249 0246
>00020800 804ae180
> Call Trace:{spi_release_transport+13} 
> {ahd}   {init+505} 
> {child_rip+8}
>{init+0} {child_rip+0}

Looks like a SCSI problem. The machine has an Adaptec SCSI adapter, right?

-AndI
> 
> 
> Code: 0f 0b a3 e1 d9 44 80 ff ff ff ff c2 a5 00 49 8b 00 4c 39 40
> RIP {attribute_container_unregister+52} RSP 
>  <0>Kernel panic - not syncing: Attempted to kill init!
> 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


2.6.13-rc5-mm1 doesnt boot on x86_64

2005-08-08 Thread Ashok Raj
Folks,

Iam getting this on the recent 2.6.12-rc5-mm1 kernel built with defconfig. 

Cheers,
Ashok Raj

--- [cut here ] - [please bite here ] -
Kernel BUG at "include/linux/list.h":165
invalid operand:  [1] SMP
CPU 2
Modules linked in:
Pid: 1, comm: swapper Not tainted 2.6.13-rc5-mm1
RIP: 0010:[] 
{attribute_container_unregist}RSP: 0018:8100bfb63f00  
EFLAGS: 00010283
RAX: 8100bfbd4c58 RBX: 8100bfbd4c00 RCX: 804e6600
RDX: 00200200 RSI:  RDI: 804e6600
RBP:  R08: 8100bfbd4c48 R09: 0020
R10:  R11: 8019baa0 R12: 80100190
R13:  R14: 8010 R15: 80627fb0
FS:  () GS:80616980() knlGS:
CS:  0010 DS: 0018 ES: 0018 CR0: 8005003b
CR2:  CR3: 00101000 CR4: 06e0
Process swapper (pid: 1, threadinfo 8100bfb62000, task 8100bfb614d0)
Stack: 8032643d  8064499f 80100190
   80651288  8010b249 0246
   00020800 804ae180
Call Trace:{spi_release_transport+13} {ahd} 
  {init+505} {child_rip+8}
   {init+0} {child_rip+0}


Code: 0f 0b a3 e1 d9 44 80 ff ff ff ff c2 a5 00 49 8b 00 4c 39 40
RIP {attribute_container_unregister+52} RSP  
<0>Kernel panic - not syncing: Attempted to kill init!

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.13-rc5-mm1: oops when starting nscd on AMD64

2005-08-08 Thread Alexander Nyberg
> > > I don't think it was supposed to do that.
> >  > 
> >  > Quite possibly it's something to do with the new debugging code - could 
> > you
> >  > please take a copy of the offending config, send it over and then try
> >  > removing debug options, see if the crash goes away?  CONFIG_DEBUG_PREEMPT
> >  > would be the first to try..
> > 
> >  The (offending) .config is attached and here's what happens without 
> > CONFIG_DEBUG_PREEMPT
> >  (the other debug options being unchanged):
> 
> Yes, my emt64 machine keels over with your .config too.  Maybe it's due to
> CONFIG_SMP=n, not sure.
> 
> Bisection searching shows that the bug was introduced by
> slab-leak-detector-give-longer-traces.patch.
> 

I was afraid it was when I first saw it but I couldn't reproduce (and
still can't).

> Call Trace:{sys_epoll_create+568} 
> {vfs_readdir+167}
>{add_preempt_count+93} 
> {system_call+126}
>   
>  

For some reason your compilers inline heavier than mine do, which makes
this:

kmem_cache_alloc
sys_epoll_create(__builtin_return_address(0))
system_call (__builtin_return_address(1))
(__builtin_return_address(2))

and off the stack we go...

I guess it was naive to even try to use this for more than the first
caller, sorry. Please throw that thing away and I'll do some backtracing
similar to CONFIG_PAGE_OWNER
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.13-rc5-mm1

2005-08-08 Thread Ingo Molnar

* Andrew Morton <[EMAIL PROTECTED]> wrote:

> - This kernel is broken on ia64: the spinlock consolidation patch 
> needs fixing.

ia64 had a couple of other compilation problems as well. The patch below 
fixes the spinlock-type issues and 3 other types of build errors.  The 
patched kernel builds fine in an ia64 crosscompiling setup, is otherwise 
untested.

Ingo

-

fix ia64 build errors:

 - merge to spinlock-consolidation.patch.

 - fix C syntax errors and calls to nonexistent functions in 
   arch/ia64/kernel/acpi.c and arch/ia64/kernel/iosapic.c

Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>

 arch/ia64/kernel/acpi.c |4 ++--
 arch/ia64/kernel/iosapic.c  |4 ++--
 include/asm-ia64/spinlock.h |   41 -
 3 files changed, 20 insertions(+), 29 deletions(-)

Index: linux/arch/ia64/kernel/acpi.c
===
--- linux.orig/arch/ia64/kernel/acpi.c
+++ linux/arch/ia64/kernel/acpi.c
@@ -74,7 +74,7 @@ unsigned int acpi_cpei_override;
 unsigned int acpi_cpei_phys_cpuid;
 
 #define MAX_SAPICS 256
-u16 ia64_acpiid_to_sapicid[MAX_SAPICS] = {[0...MAX_SAPICS - 1] = -1 };
+u16 ia64_acpiid_to_sapicid[MAX_SAPICS] = {[0 ... MAX_SAPICS - 1] = -1 };
 
 EXPORT_SYMBOL(ia64_acpiid_to_sapicid);
 
@@ -138,7 +138,7 @@ const char *acpi_get_sysname(void)
 
 /* Array to record platform interrupt vectors for generic interrupt routing. */
 int platform_intr_list[ACPI_MAX_PLATFORM_INTERRUPTS] = {
-   [0...ACPI_MAX_PLATFORM_INTERRUPTS - 1] = -1
+   [0 ... ACPI_MAX_PLATFORM_INTERRUPTS - 1] = -1
 };
 
 enum acpi_irq_model_id acpi_irq_model = ACPI_IRQ_MODEL_IOSAPIC;
Index: linux/arch/ia64/kernel/iosapic.c
===
--- linux.orig/arch/ia64/kernel/iosapic.c
+++ linux/arch/ia64/kernel/iosapic.c
@@ -735,11 +735,11 @@ again:
spin_unlock_irqrestore(_lock, flags);
 
/* If vector is running out, we try to find a sharable vector */
-   vector = assign_irq_vector_nopanic(AUTO_ASSIGN);
+   vector = assign_irq_vector(AUTO_ASSIGN);
if (vector < 0) {
vector = iosapic_find_sharable_vector(trigger, polarity);
if (vector < 0)
-   Return -ENOSPC;
+   return -ENOSPC;
}
 
spin_lock_irqsave(_descp(vector)->lock, flags);
Index: linux/include/asm-ia64/spinlock.h
===
--- linux.orig/include/asm-ia64/spinlock.h
+++ linux/include/asm-ia64/spinlock.h
@@ -86,17 +86,17 @@ __raw_spin_lock_flags (raw_spinlock_t *l
 #endif
 }
 
-#define _raw_spin_lock(lock) _raw_spin_lock_flags(lock, 0)
+#define __raw_spin_lock(lock) __raw_spin_lock_flags(lock, 0)
 
 /* Unlock by doing an ordered store and releasing the cacheline with nta */
-static inline void _raw_spin_unlock(spinlock_t *x) {
+static inline void __raw_spin_unlock(raw_spinlock_t *x) {
barrier();
asm volatile ("st4.rel.nta [%0] = r0\n\t" :: "r"(x));
 }
 
 #else /* !ASM_SUPPORTED */
-#define _raw_spin_lock_flags(lock, flags) _raw_spin_lock(lock)
-# define _raw_spin_lock(x) 
\
+#define __raw_spin_lock_flags(lock, flags) __raw_spin_lock(lock)
+# define __raw_spin_lock(x)
\
 do {   
\
__u32 *ia64_spinlock_ptr = (__u32 *) (x);   
\
__u64 ia64_spinlock_val;
\
@@ -109,29 +109,20 @@ do {  
\
} while (ia64_spinlock_val);
\
}   
\
 } while (0)
-#define _raw_spin_unlock(x)do { barrier(); ((spinlock_t *) x)->lock = 0; } 
while (0)
+#define __raw_spin_unlock(x)   do { barrier(); ((raw_spinlock_t *) x)->lock = 
0; } while (0)
 #endif /* !ASM_SUPPORTED */
 
-#define spin_is_locked(x)  ((x)->lock != 0)
-#define _raw_spin_trylock(x)   (cmpxchg_acq(&(x)->lock, 0, 1) == 0)
-#define spin_unlock_wait(x)do { barrier(); } while ((x)->lock)
-
-typedef struct {
-   volatile unsigned int read_counter  : 24;
-   volatile unsigned int write_lock:  8;
-#ifdef CONFIG_PREEMPT
-   unsigned int break_lock;
-#endif
-} rwlock_t;
-#define RW_LOCK_UNLOCKED (rwlock_t) { 0, 0 }
+#define __raw_spin_is_locked(x)((x)->lock != 0)
+#define __raw_spin_trylock(x)  (cmpxchg_acq(&(x)->lock, 0, 1) == 0)
+#define __raw_spin_unlock_wait(lock) \
+   do { while (__raw_spin_is_locked(lock)) cpu_relax(); } while (0)
 
-#define rwlock_init(x) do { *(x) = RW_LOCK_UNLOCKED; } while(0)
-#define 

Re: 2.6.13-rc5-mm1: oops when starting nscd on AMD64

2005-08-08 Thread Andrew Morton
"Rafael J. Wysocki" <[EMAIL PROTECTED]> wrote:
>
> > I don't think it was supposed to do that.
>  > 
>  > Quite possibly it's something to do with the new debugging code - could you
>  > please take a copy of the offending config, send it over and then try
>  > removing debug options, see if the crash goes away?  CONFIG_DEBUG_PREEMPT
>  > would be the first to try..
> 
>  The (offending) .config is attached and here's what happens without 
> CONFIG_DEBUG_PREEMPT
>  (the other debug options being unchanged):

Yes, my emt64 machine keels over with your .config too.  Maybe it's due to
CONFIG_SMP=n, not sure.

Bisection searching shows that the bug was introduced by
slab-leak-detector-give-longer-traces.patch.


Starting NFS statd: [  OK  ]
Starting NFS4 idmapd: Unable to handle kernel NULL pointer dereference at 
0408 RIP: 
{kmem_cache_alloc+222}

PGD 17cd3b067 PUD 17cd36067 PMD 0   
Oops:  [1] PREEMPT
CPU 0  
Modules linked in: sunrpc af_packet pcmcia firmware_class yenta_socket 
rsrc_nonstatic pcmcia_core binm
Pid: 5237, comm: rpc.idmapd Not tainted 2.6.13-rc6-mm1  
 
RIP: 0010:[] {kmem_cache_alloc+222}
RSP: 0018:81017cc85e88  EFLAGS: 00010202   
RAX: 0400 RBX: 8010e8fa RCX: 
RDX:  RSI: 81017d8c48b8 RDI: 81007ffcf6c0
RBP: 81017cc85eb8 R08: ff5d R09: 
R10: 81017d8c48c0 R11: 0100 R12: 81007ffcf6c0
R13: 81017d8c48b8 R14: 80d0 R15: 801a17bb
FS:  2aadcb00() GS:80540880() knlGS:
CS:  0010 DS:  ES:  CR0: 8005003b   
CR2: 0408 CR3: 00017cd3 CR4: 06e0
Process rpc.idmapd (pid: 5237, threadinfo 81017cc84000, task 
81017ecf6ad0)
Stack: 0246  81017f1d2e60 81017c089c88  
  
   fff4 0003 81017cc85f78 801a17bb 
   fffe 81017f1d2e60   
Call Trace:{sys_epoll_create+568} 
{vfs_readdir+167}
   {add_preempt_count+93} 
{system_call+126}

   
BUG: spinlock trylock failure on UP on CPU#0, rpc.idmapd/5237
 lock: 803f2b00, .magic: dead4ead, .owner: rpc.idmapd/5237, .owner_cpu: 0

 
Call Trace:{add_preempt_count+93} 
{spin_bug+187}
   {show_trace+524} 
{_raw_spin_trylock+62}  
   {_spin_trylock+30} {oops_begin+17}   
  
   {do_page_fault+1733} {vprintk+812}
   {vprintk+812} {error_exit+0}  
   {show_trace+524} {show_trace+520}
   {show_stack+210} {show_registers+132}
   {__die+143} {do_page_fault+1843} 
   {vsnprintf+1344} 
{sys_epoll_create+568}
   {error_exit+0} 
{sys_epoll_create+568}  
   {system_call+126} 
{kmem_cache_alloc+222}
   {kmem_cache_alloc+206} 
{sys_epoll_create+568}
   {vfs_readdir+167} 
{add_preempt_count+93} 
   {system_call+126}  
   
---
| preempt count: 0002 ]
| 2 level deep critical section nesting:

.. []  _spin_trylock+0x16/0x56
.[] ..   ( <= oops_begin+0x11/0x55)
.. []  _spin_trylock+0x16/0x56 
.[] ..   ( <= oops_begin+0x11/0x55)
 
Unable to handle kernel NULL pointer dereference at 0008 RIP: 
{show_trace+524}
PGD 17cd3b067 PUD 17cd36067 PMD 0 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.13-rc5-mm1: oops when starting nscd on AMD64

2005-08-08 Thread Andrew Morton
Rafael J. Wysocki [EMAIL PROTECTED] wrote:

  I don't think it was supposed to do that.
   
   Quite possibly it's something to do with the new debugging code - could you
   please take a copy of the offending config, send it over and then try
   removing debug options, see if the crash goes away?  CONFIG_DEBUG_PREEMPT
   would be the first to try..
 
  The (offending) .config is attached and here's what happens without 
 CONFIG_DEBUG_PREEMPT
  (the other debug options being unchanged):

Yes, my emt64 machine keels over with your .config too.  Maybe it's due to
CONFIG_SMP=n, not sure.

Bisection searching shows that the bug was introduced by
slab-leak-detector-give-longer-traces.patch.


Starting NFS statd: [  OK  ]
Starting NFS4 idmapd: Unable to handle kernel NULL pointer dereference at 
0408 RIP: 
8015eb28{kmem_cache_alloc+222}

PGD 17cd3b067 PUD 17cd36067 PMD 0   
Oops:  [1] PREEMPT
CPU 0  
Modules linked in: sunrpc af_packet pcmcia firmware_class yenta_socket 
rsrc_nonstatic pcmcia_core binm
Pid: 5237, comm: rpc.idmapd Not tainted 2.6.13-rc6-mm1  
 
RIP: 0010:[8015eb28] 8015eb28{kmem_cache_alloc+222}
RSP: 0018:81017cc85e88  EFLAGS: 00010202   
RAX: 0400 RBX: 8010e8fa RCX: 
RDX:  RSI: 81017d8c48b8 RDI: 81007ffcf6c0
RBP: 81017cc85eb8 R08: ff5d R09: 
R10: 81017d8c48c0 R11: 0100 R12: 81007ffcf6c0
R13: 81017d8c48b8 R14: 80d0 R15: 801a17bb
FS:  2aadcb00() GS:80540880() knlGS:
CS:  0010 DS:  ES:  CR0: 8005003b   
CR2: 0408 CR3: 00017cd3 CR4: 06e0
Process rpc.idmapd (pid: 5237, threadinfo 81017cc84000, task 
81017ecf6ad0)
Stack: 0246  81017f1d2e60 81017c089c88  
  
   fff4 0003 81017cc85f78 801a17bb 
   fffe 81017f1d2e60   
Call Trace:801a17bb{sys_epoll_create+568} 
8018b1f7{vfs_readdir+167}
   80231000{add_preempt_count+93} 
8010e8fa{system_call+126}

   
BUG: spinlock trylock failure on UP on CPU#0, rpc.idmapd/5237
 lock: 803f2b00, .magic: dead4ead, .owner: rpc.idmapd/5237, .owner_cpu: 0

 
Call Trace:80231000{add_preempt_count+93} 
80230acf{spin_bug+187}
   8010fb4a{show_trace+524} 
80230c53{_raw_spin_trylock+62}  
   80377591{_spin_trylock+30} 8010fe13{oops_begin+17}   
  
   80378745{do_page_fault+1733} 80132177{vprintk+812}
   80132177{vprintk+812} 8010f1ed{error_exit+0}  
   8010fb4a{show_trace+524} 8010fb46{show_trace+520}
   8010fc3a{show_stack+210} 8010fce9{show_registers+132}
   8010ff22{__die+143} 803787b3{do_page_fault+1843} 
   8022e630{vsnprintf+1344} 
801a17bb{sys_epoll_create+568}
   8010f1ed{error_exit+0} 
801a17bb{sys_epoll_create+568}  
   8010e8fa{system_call+126} 
8015eb28{kmem_cache_alloc+222}
   8015eb18{kmem_cache_alloc+206} 
801a17bb{sys_epoll_create+568}
   8018b1f7{vfs_readdir+167} 
80231000{add_preempt_count+93} 
   8010e8fa{system_call+126}  
   
---
| preempt count: 0002 ]
| 2 level deep critical section nesting:

.. [80377589]  _spin_trylock+0x16/0x56
.[8010fe13] ..   ( = oops_begin+0x11/0x55)
.. [80377589]  _spin_trylock+0x16/0x56 
.[8010fe13] ..   ( = oops_begin+0x11/0x55)
 
Unable to handle kernel NULL pointer dereference at 0008 RIP: 
8010fb4a{show_trace+524}
PGD 17cd3b067 PUD 17cd36067 PMD 0 
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.13-rc5-mm1

2005-08-08 Thread Ingo Molnar

* Andrew Morton [EMAIL PROTECTED] wrote:

 - This kernel is broken on ia64: the spinlock consolidation patch 
 needs fixing.

ia64 had a couple of other compilation problems as well. The patch below 
fixes the spinlock-type issues and 3 other types of build errors.  The 
patched kernel builds fine in an ia64 crosscompiling setup, is otherwise 
untested.

Ingo

-

fix ia64 build errors:

 - merge to spinlock-consolidation.patch.

 - fix C syntax errors and calls to nonexistent functions in 
   arch/ia64/kernel/acpi.c and arch/ia64/kernel/iosapic.c

Signed-off-by: Ingo Molnar [EMAIL PROTECTED]

 arch/ia64/kernel/acpi.c |4 ++--
 arch/ia64/kernel/iosapic.c  |4 ++--
 include/asm-ia64/spinlock.h |   41 -
 3 files changed, 20 insertions(+), 29 deletions(-)

Index: linux/arch/ia64/kernel/acpi.c
===
--- linux.orig/arch/ia64/kernel/acpi.c
+++ linux/arch/ia64/kernel/acpi.c
@@ -74,7 +74,7 @@ unsigned int acpi_cpei_override;
 unsigned int acpi_cpei_phys_cpuid;
 
 #define MAX_SAPICS 256
-u16 ia64_acpiid_to_sapicid[MAX_SAPICS] = {[0...MAX_SAPICS - 1] = -1 };
+u16 ia64_acpiid_to_sapicid[MAX_SAPICS] = {[0 ... MAX_SAPICS - 1] = -1 };
 
 EXPORT_SYMBOL(ia64_acpiid_to_sapicid);
 
@@ -138,7 +138,7 @@ const char *acpi_get_sysname(void)
 
 /* Array to record platform interrupt vectors for generic interrupt routing. */
 int platform_intr_list[ACPI_MAX_PLATFORM_INTERRUPTS] = {
-   [0...ACPI_MAX_PLATFORM_INTERRUPTS - 1] = -1
+   [0 ... ACPI_MAX_PLATFORM_INTERRUPTS - 1] = -1
 };
 
 enum acpi_irq_model_id acpi_irq_model = ACPI_IRQ_MODEL_IOSAPIC;
Index: linux/arch/ia64/kernel/iosapic.c
===
--- linux.orig/arch/ia64/kernel/iosapic.c
+++ linux/arch/ia64/kernel/iosapic.c
@@ -735,11 +735,11 @@ again:
spin_unlock_irqrestore(iosapic_lock, flags);
 
/* If vector is running out, we try to find a sharable vector */
-   vector = assign_irq_vector_nopanic(AUTO_ASSIGN);
+   vector = assign_irq_vector(AUTO_ASSIGN);
if (vector  0) {
vector = iosapic_find_sharable_vector(trigger, polarity);
if (vector  0)
-   Return -ENOSPC;
+   return -ENOSPC;
}
 
spin_lock_irqsave(irq_descp(vector)-lock, flags);
Index: linux/include/asm-ia64/spinlock.h
===
--- linux.orig/include/asm-ia64/spinlock.h
+++ linux/include/asm-ia64/spinlock.h
@@ -86,17 +86,17 @@ __raw_spin_lock_flags (raw_spinlock_t *l
 #endif
 }
 
-#define _raw_spin_lock(lock) _raw_spin_lock_flags(lock, 0)
+#define __raw_spin_lock(lock) __raw_spin_lock_flags(lock, 0)
 
 /* Unlock by doing an ordered store and releasing the cacheline with nta */
-static inline void _raw_spin_unlock(spinlock_t *x) {
+static inline void __raw_spin_unlock(raw_spinlock_t *x) {
barrier();
asm volatile (st4.rel.nta [%0] = r0\n\t :: r(x));
 }
 
 #else /* !ASM_SUPPORTED */
-#define _raw_spin_lock_flags(lock, flags) _raw_spin_lock(lock)
-# define _raw_spin_lock(x) 
\
+#define __raw_spin_lock_flags(lock, flags) __raw_spin_lock(lock)
+# define __raw_spin_lock(x)
\
 do {   
\
__u32 *ia64_spinlock_ptr = (__u32 *) (x);   
\
__u64 ia64_spinlock_val;
\
@@ -109,29 +109,20 @@ do {  
\
} while (ia64_spinlock_val);
\
}   
\
 } while (0)
-#define _raw_spin_unlock(x)do { barrier(); ((spinlock_t *) x)-lock = 0; } 
while (0)
+#define __raw_spin_unlock(x)   do { barrier(); ((raw_spinlock_t *) x)-lock = 
0; } while (0)
 #endif /* !ASM_SUPPORTED */
 
-#define spin_is_locked(x)  ((x)-lock != 0)
-#define _raw_spin_trylock(x)   (cmpxchg_acq((x)-lock, 0, 1) == 0)
-#define spin_unlock_wait(x)do { barrier(); } while ((x)-lock)
-
-typedef struct {
-   volatile unsigned int read_counter  : 24;
-   volatile unsigned int write_lock:  8;
-#ifdef CONFIG_PREEMPT
-   unsigned int break_lock;
-#endif
-} rwlock_t;
-#define RW_LOCK_UNLOCKED (rwlock_t) { 0, 0 }
+#define __raw_spin_is_locked(x)((x)-lock != 0)
+#define __raw_spin_trylock(x)  (cmpxchg_acq((x)-lock, 0, 1) == 0)
+#define __raw_spin_unlock_wait(lock) \
+   do { while (__raw_spin_is_locked(lock)) cpu_relax(); } while (0)
 
-#define rwlock_init(x) do { *(x) = RW_LOCK_UNLOCKED; } while(0)
-#define read_can_lock(rw) 

Re: 2.6.13-rc5-mm1: oops when starting nscd on AMD64

2005-08-08 Thread Alexander Nyberg
   I don't think it was supposed to do that.

Quite possibly it's something to do with the new debugging code - could 
  you
please take a copy of the offending config, send it over and then try
removing debug options, see if the crash goes away?  CONFIG_DEBUG_PREEMPT
would be the first to try..
  
   The (offending) .config is attached and here's what happens without 
  CONFIG_DEBUG_PREEMPT
   (the other debug options being unchanged):
 
 Yes, my emt64 machine keels over with your .config too.  Maybe it's due to
 CONFIG_SMP=n, not sure.
 
 Bisection searching shows that the bug was introduced by
 slab-leak-detector-give-longer-traces.patch.
 

I was afraid it was when I first saw it but I couldn't reproduce (and
still can't).

 Call Trace:801a17bb{sys_epoll_create+568} 
 8018b1f7{vfs_readdir+167}
80231000{add_preempt_count+93} 
 8010e8fa{system_call+126}
   
  

For some reason your compilers inline heavier than mine do, which makes
this:

kmem_cache_alloc
sys_epoll_create(__builtin_return_address(0))
system_call (__builtin_return_address(1))
(__builtin_return_address(2))

and off the stack we go...

I guess it was naive to even try to use this for more than the first
caller, sorry. Please throw that thing away and I'll do some backtracing
similar to CONFIG_PAGE_OWNER
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


2.6.13-rc5-mm1 doesnt boot on x86_64

2005-08-08 Thread Ashok Raj
Folks,

Iam getting this on the recent 2.6.12-rc5-mm1 kernel built with defconfig. 

Cheers,
Ashok Raj

--- [cut here ] - [please bite here ] -
Kernel BUG at include/linux/list.h:165
invalid operand:  [1] SMP
CPU 2
Modules linked in:
Pid: 1, comm: swapper Not tainted 2.6.13-rc5-mm1
RIP: 0010:[802b9ef4] 
802b9ef4{attribute_container_unregist}RSP: 0018:8100bfb63f00  
EFLAGS: 00010283
RAX: 8100bfbd4c58 RBX: 8100bfbd4c00 RCX: 804e6600
RDX: 00200200 RSI:  RDI: 804e6600
RBP:  R08: 8100bfbd4c48 R09: 0020
R10:  R11: 8019baa0 R12: 80100190
R13:  R14: 8010 R15: 80627fb0
FS:  () GS:80616980() knlGS:
CS:  0010 DS: 0018 ES: 0018 CR0: 8005003b
CR2:  CR3: 00101000 CR4: 06e0
Process swapper (pid: 1, threadinfo 8100bfb62000, task 8100bfb614d0)
Stack: 8032643d  8064499f 80100190
   80651288  8010b249 0246
   00020800 804ae180
Call Trace:8032643d{spi_release_transport+13} 8064499f{ahd} 
  8010b249{init+505} 8010e896{child_rip+8}
   8010b050{init+0} 8010e88e{child_rip+0}


Code: 0f 0b a3 e1 d9 44 80 ff ff ff ff c2 a5 00 49 8b 00 4c 39 40
RIP 802b9ef4{attribute_container_unregister+52} RSP 8100bfb63f0 
0Kernel panic - not syncing: Attempted to kill init!

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.13-rc5-mm1 doesnt boot on x86_64

2005-08-08 Thread Andi Kleen
On Mon, Aug 08, 2005 at 09:48:19AM -0700, Ashok Raj wrote:
 Folks,
 
 Iam getting this on the recent 2.6.12-rc5-mm1 kernel built with defconfig. 
 
 Cheers,
 Ashok Raj
 
 --- [cut here ] - [please bite here ] -
 Kernel BUG at include/linux/list.h:165
 invalid operand:  [1] SMP
 CPU 2
 Modules linked in:
 Pid: 1, comm: swapper Not tainted 2.6.13-rc5-mm1
 RIP: 0010:[802b9ef4] 
 802b9ef4{attribute_container_unregist}RSP: 0018:8100bfb63f00  
 EFLAGS: 00010283
 RAX: 8100bfbd4c58 RBX: 8100bfbd4c00 RCX: 804e6600
 RDX: 00200200 RSI:  RDI: 804e6600
 RBP:  R08: 8100bfbd4c48 R09: 0020
 R10:  R11: 8019baa0 R12: 80100190
 R13:  R14: 8010 R15: 80627fb0
 FS:  () GS:80616980() knlGS:
 CS:  0010 DS: 0018 ES: 0018 CR0: 8005003b
 CR2:  CR3: 00101000 CR4: 06e0
 Process swapper (pid: 1, threadinfo 8100bfb62000, task 8100bfb614d0)
 Stack: 8032643d  8064499f 80100190
80651288  8010b249 0246
00020800 804ae180
 Call Trace:8032643d{spi_release_transport+13} 
 8064499f{ahd}   8010b249{init+505} 
 8010e896{child_rip+8}
8010b050{init+0} 8010e88e{child_rip+0}

Looks like a SCSI problem. The machine has an Adaptec SCSI adapter, right?

-AndI
 
 
 Code: 0f 0b a3 e1 d9 44 80 ff ff ff ff c2 a5 00 49 8b 00 4c 39 40
 RIP 802b9ef4{attribute_container_unregister+52} RSP 
 8100bfb63f0 0Kernel panic - not syncing: Attempted to kill init!
 
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.13-rc5-mm1 doesnt boot on x86_64

2005-08-08 Thread Ashok Raj
On Mon, Aug 08, 2005 at 07:11:26PM +0200, Andi Kleen wrote:
 On Mon, Aug 08, 2005 at 09:48:19AM -0700, Ashok Raj wrote:
  Folks,
  
  Iam getting this on the recent 2.6.12-rc5-mm1 kernel built with defconfig. 
  
  Cheers,
  Ashok Raj
  
  --- [cut here ] - [please bite here ] -
  Kernel BUG at include/linux/list.h:165
  invalid operand:  [1] SMP
  CPU 2
  Modules linked in:
  Pid: 1, comm: swapper Not tainted 2.6.13-rc5-mm1
  RIP: 0010:[802b9ef4] 
  802b9ef4{attribute_container_unregist}RSP: 0018:8100bfb63f00  
  EFLAGS: 00010283
  RAX: 8100bfbd4c58 RBX: 8100bfbd4c00 RCX: 804e6600
  RDX: 00200200 RSI:  RDI: 804e6600
  RBP:  R08: 8100bfbd4c48 R09: 0020
  R10:  R11: 8019baa0 R12: 80100190
  R13:  R14: 8010 R15: 80627fb0
  FS:  () GS:80616980() knlGS:
  CS:  0010 DS: 0018 ES: 0018 CR0: 8005003b
  CR2:  CR3: 00101000 CR4: 06e0
  Process swapper (pid: 1, threadinfo 8100bfb62000, task 8100bfb614d0)
  Stack: 8032643d  8064499f 80100190
 80651288  8010b249 0246
 00020800 804ae180
  Call Trace:8032643d{spi_release_transport+13} 
  8064499f{ahd}   8010b249{init+505} 
  8010e896{child_rip+8}
 8010b050{init+0} 8010e88e{child_rip+0}
 
 Looks like a SCSI problem. The machine has an Adaptec SCSI adapter, right?

Yep, its adaptec problem

Actually i dont need AIX7XXX, since my system requires only CONFIG_FUSION.
I turned that option off, and it seems to boot fine now.

Ashok


 
 -AndI
  
  
  Code: 0f 0b a3 e1 d9 44 80 ff ff ff ff c2 a5 00 49 8b 00 4c 39 40
  RIP 802b9ef4{attribute_container_unregister+52} RSP 
  8100bfb63f0 0Kernel panic - not syncing: Attempted to kill init!
  

-- 
Cheers,
Ashok Raj
- Open Source Technology Center
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.13-rc5-mm1 doesnt boot on x86_64

2005-08-08 Thread James Bottomley
On Mon, 2005-08-08 at 19:11 +0200, Andi Kleen wrote:
 Looks like a SCSI problem. The machine has an Adaptec SCSI adapter, right?

The traceback looks pretty meaningless.

What was happening on the machine before this.  i.e. was it booting up,
in which case can we have the prior dmesg file; or was the aic79xxx
driver being removed?

James


-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.13-rc5-mm1 doesnt boot on x86_64

2005-08-08 Thread Ashok Raj
On Mon, Aug 08, 2005 at 12:33:29PM -0500, James Bottomley wrote:
 On Mon, 2005-08-08 at 19:11 +0200, Andi Kleen wrote:
  Looks like a SCSI problem. The machine has an Adaptec SCSI adapter, right?
 
 The traceback looks pretty meaningless.
 
 What was happening on the machine before this.  i.e. was it booting up,
 in which case can we have the prior dmesg file; or was the aic79xxx
 driver being removed?

I can get the trace again, but basically the system was booting. 

AIC_7XXX was defined in defconfig, but my system doesnt have it. Seems like
the senario was the driver tried to probe, found nothing, and tries
to de-reg resulting in the BUG().

I will try to get the recompile and entire dmesg log in the meantime.
 
 James
 
 

-- 
Cheers,
Ashok Raj
- Open Source Technology Center
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.13-rc5-mm1 doesnt boot on x86_64

2005-08-08 Thread Andrew Morton
James Bottomley [EMAIL PROTECTED] wrote:

 On Mon, 2005-08-08 at 19:11 +0200, Andi Kleen wrote:
  Looks like a SCSI problem. The machine has an Adaptec SCSI adapter, right?
 
 The traceback looks pretty meaningless.
 
 What was happening on the machine before this.  i.e. was it booting up,
 in which case can we have the prior dmesg file; or was the aic79xxx
 driver being removed?
 

-mm has extra list_head debugging goodies.  I'd be suspecting a list_head
corruption detected somewhere under spi_release_transport().


--- 25/include/linux/list.h~list_del-debug  2005-03-08 11:40:27.0 
-0800
+++ 25-akpm/include/linux/list.h2005-03-08 11:40:49.0 -0800
@@ -5,7 +5,9 @@
 
 #include linux/stddef.h
 #include linux/prefetch.h
+#include linux/kernel.h
 #include asm/system.h
+#include asm/bug.h
 
 /*
  * These are non-NULL pointers that will result in page faults
@@ -160,6 +162,8 @@ static inline void __list_del(struct lis
  */
 static inline void list_del(struct list_head *entry)
 {
+   BUG_ON(entry-prev-next != entry);
+   BUG_ON(entry-next-prev != entry);
__list_del(entry-prev, entry-next);
entry-next = LIST_POISON1;
entry-prev = LIST_POISON2;
_

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.13-rc5-mm1 doesnt boot on x86_64

2005-08-08 Thread James Bottomley
On Mon, 2005-08-08 at 10:42 -0700, Andrew Morton wrote:
 -mm has extra list_head debugging goodies.  I'd be suspecting a list_head
 corruption detected somewhere under spi_release_transport().

Aha, looking in wrong driver ... the problem actually appears to be a
double release of the transport template in aic79xx.  Try this patch

James

diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c 
b/drivers/scsi/aic7xxx/aic79xx_osm.c
--- a/drivers/scsi/aic7xxx/aic79xx_osm.c
+++ b/drivers/scsi/aic7xxx/aic79xx_osm.c
@@ -2326,8 +2326,6 @@ done:
return (retval);
 }
 
-static void ahd_linux_exit(void);
-
 static void ahd_linux_set_width(struct scsi_target *starget, int width)
 {
struct Scsi_Host *shost = dev_to_shost(starget-dev.parent);
@@ -2772,7 +2770,7 @@ ahd_linux_init(void)
if (ahd_linux_detect(aic79xx_driver_template)  0)
return 0;
spi_release_transport(ahd_linux_transport_template);
-   ahd_linux_exit();
+
return -ENODEV;
 }
 
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c 
b/drivers/scsi/aic7xxx/aic7xxx_osm.c
--- a/drivers/scsi/aic7xxx/aic7xxx_osm.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c
@@ -2331,8 +2331,6 @@ ahc_platform_dump_card_state(struct ahc_
 {
 }
 
-static void ahc_linux_exit(void);
-
 static void ahc_linux_set_width(struct scsi_target *starget, int width)
 {
struct Scsi_Host *shost = dev_to_shost(starget-dev.parent);


-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


2.6.13-rc5-mm1, mii.c functions linking problem

2005-08-08 Thread Jiri Slaby

Hello, i find out this problem:
#make O=../bu allmodconfig
...
#make O=../bu all
...
 LD  .tmp_vmlinux1
drivers/built-in.o(.text+0x63c87): In function `sis190_get_settings':
/l/latest/xxx/drivers/net/sis190.c:1656: undefined reference to 
`mii_ethtool_gset'

drivers/built-in.o(.text+0x63c96): In function `sis190_set_settings':
/l/latest/xxx/drivers/net/sis190.c:1663: undefined reference to 
`mii_ethtool_sset'

drivers/built-in.o(.text+0x63d04): In function `sis190_nway_reset':
/l/latest/xxx/drivers/net/sis190.c:1699: undefined reference to 
`mii_nway_restart'

drivers/built-in.o(.text+0x63d2d): In function `sis190_ioctl':
/l/latest/xxx/drivers/net/sis190.c:1732: undefined reference to 
`generic_mii_ioctl'

make[1]: *** [.tmp_vmlinux1] Error 1
make: *** [all] Error 2
# objdump ../bu/drivers/net/mii.o -t|grep gener
0018 l O __kcrctab  0004 __kcrctab_generic_mii_ioctl
005e l O __ksymtab_strings  0012 __kstrtab_generic_mii_ioctl
0030 l O __ksymtab  0008 __ksymtab_generic_mii_ioctl
131e7c56 g   *ABS*   __crc_generic_mii_ioctl
0635 g F .text  0130 generic_mii_ioctl
#objdump ../bu/drivers/net/built-in.o -t|grep gener
 *UND*   generic_mii_ioctl
# objdump ../bu/drivers/built-in.o -t|grep generic_mii
 *UND*   generic_mii_ioctl
...

--
Jiri Slaby www.fi.muni.cz/~xslaby
~\-/~  [EMAIL PROTECTED]  ~\-/~
241B347EC88228DE51EE A49C4A73A25004CB2A10

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.13-rc5-mm1

2005-08-07 Thread Andrew Morton
Rogério Brito <[EMAIL PROTECTED]> wrote:
>
> Thanks Andrew, for including the vfat speedup patch.
> 
> It has really improved a lot the performance of access to directories
> having many subdirectories in an external Firewire HD that I have.
> 
> I'd say that if others don't have problems with it, then it should be
> in 2.6.13, as far as I am concerned.

It's probably a bit late to be able to determine that.  This one's 2.6.14
material, sorry.

> BTW, everything is working fine with the sbp2/ieee1394 drivers that
> are in the mm tree.

Good to hear.

> It seems that there are some issues with ALSA, though. I will report
> back as soon as I see if these are userland problems or not (it worked
> fine with vanilla 2.6.13-rc5).

OK, thanks for testing and reporting.  Our turnaround time for ALSA fixes
is not fantastic, really, so any problems which we currently have will
probably carry over into 2.6.13.  If you can raise a bugzilla record for
any problems in -rc6 I'll make sure they aren't forgotten.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.13-rc5-mm1

2005-08-07 Thread Rogério Brito
Thanks Andrew, for including the vfat speedup patch.

It has really improved a lot the performance of access to directories
having many subdirectories in an external Firewire HD that I have.

I'd say that if others don't have problems with it, then it should be
in 2.6.13, as far as I am concerned.

BTW, everything is working fine with the sbp2/ieee1394 drivers that
are in the mm tree.

It seems that there are some issues with ALSA, though. I will report
back as soon as I see if these are userland problems or not (it worked
fine with vanilla 2.6.13-rc5).


Thanks, Rogério.

-- 
Rogério Brito : [EMAIL PROTECTED] : http://www.ime.usp.br/~rbrito
Homepage of the algorithms package : http://algorithms.berlios.de
Homepage on freshmeat:  http://freshmeat.net/projects/algorithms/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.13-rc5-mm1: oops when starting nscd on AMD64

2005-08-07 Thread Rafael J. Wysocki
On Sunday, 7 of August 2005 19:23, Andrew Morton wrote:
> "Rafael J. Wysocki" <[EMAIL PROTECTED]> wrote:
> >
> > I get the following Oops after trying to start nscd from YaST on an 
> > Athlon64-based box
> >  (compiled with CONFIG_DEBUG_SPINLOCK=y):
> > 
> >  Unable to handle kernel NULL pointer dereference at 0008 RIP:
> >  {kmem_cache_alloc+232}
> >  PGD 1501a067 PUD 1501b067 PMD 0
> >  Oops:  [1] PREEMPT
> >  CPU 0
> >  Modules linked in: raw af_key usbserial thermal processor fan button 
> > battery ac snd_pcm_oss snd_mixer_oss snd_intel8x0 snd_ac97_codec snd_ac97t
> >  Pid: 6570, comm: nscd Not tainted 2.6.13-rc5-mm1
> >  RIP: 0010:[] {kmem_cache_alloc+232}
> >  RSP: 0018:81001506de88  EFLAGS: 00010202
> >  RAX:  RBX: 8010eb3e RCX: 
> >  RDX:  RSI: 8100292bdd68 RDI: 810001c3f6c0
> >  RBP: 81001506deb8 R08:  R09: 8100292bdd70
> >  R10: 0006 R11:  R12: 810001c3f6c0
> >  R13: 8100292bdd68 R14: 80d0 R15: 801abe5c
> >  FS:  2b11cb00() GS:804f2840() 
> > knlGS:56abc320
> >  CS:  0010 DS:  ES:  CR0: 8005003b
> >  CR2: 0008 CR3: 15019000 CR4: 06e0
> >  Process nscd (pid: 6570, threadinfo 81001506c000, task 
> > 81001506b250)
> >  Stack: 0246  81001569b5a0 8100155fe980
> > fff4 000a 81001506df78 801abe5c
> > 40a05fff 81001569b5a0
> >  Call Trace:{sys_epoll_create+604} 
> > {add_preempt_count+105}
> > {system_call+126}
> >  BUG: spinlock trylock failure on UP on CPU#0, nscd/6570
> >   lock: 803bae80, .magic: dead4ead, .owner: nscd/6570, .owner_cpu: 0
> > 
> >  Call Trace:{add_preempt_count+105} 
> > {spin_bug+211}
> > {show_trace+571} 
> > {_raw_spin_trylock+62}
> > {_spin_trylock+30} 
> > {oops_begin+17}
> > {do_page_fault+1722} 
> > {vprintk+830}
> > {vprintk+830} 
> > {kallsyms_lookup+246}
> > {error_exit+0} {show_trace+571}
> > {show_trace+567} 
> > {show_stack+216}
> > {show_registers+135} {__die+142}
> > {do_page_fault+1832} 
> > {vsnprintf+1393}
> > {sys_epoll_create+604} 
> > {error_exit+0}
> > {sys_epoll_create+604} 
> > {system_call+126}
> > {kmem_cache_alloc+232} 
> > {kmem_cache_alloc+216}
> > {sys_epoll_create+604} 
> > {add_preempt_count+105}
> > {system_call+126}
> >  ---
> >  | preempt count: 0002 ]
> >  | 2 level deep critical section nesting:
> >  
> >  .. []  _spin_trylock+0x16/0x60
> >  .[] ..   ( <= oops_begin+0x11/0x60)
> >  .. []  _spin_trylock+0x16/0x60
> >  .[] ..   ( <= oops_begin+0x11/0x60)
> 
> I don't think it was supposed to do that.
> 
> Quite possibly it's something to do with the new debugging code - could you
> please take a copy of the offending config, send it over and then try
> removing debug options, see if the crash goes away?  CONFIG_DEBUG_PREEMPT
> would be the first to try..

The (offending) .config is attached and here's what happens without 
CONFIG_DEBUG_PREEMPT
(the other debug options being unchanged):

Bootdata ok (command line is root=/dev/hdc6 vga=792 selinux=0 noapic 
resume=/dev/hdc3 console=ttyS0,57600 console=tty0 debug)
Linux version 2.6.13-rc5-mm1 ([EMAIL PROTECTED]) (gcc version 3.3.5 20050117 
(prerelease) (SUSE Linux)) #2 PREEMPT Sun Aug 7 21:10:38 CEST 2005
BIOS-provided physical RAM map:
 BIOS-e820:  - 0009fc00 (usable)
 BIOS-e820: 0009fc00 - 000a (reserved)
 BIOS-e820: 000e - 0010 (reserved)
 BIOS-e820: 0010 - 2ff4 (usable)
 BIOS-e820: 2ff4 - 2ff5 (ACPI data)
 BIOS-e820: 2ff5 - 3000 (ACPI NVS)
 BIOS-e820: fec0 - fec01000 (reserved)
 BIOS-e820: fee0 - fee01000 (reserved)
ACPI: RSDP (v000 ACPIAM) @ 0x000f76e0
ACPI: RSDT (v001 A M I  OEMRSDT  0x05000425 MSFT 0x0097) @ 
0x2ff4
ACPI: FADT (v001 A M I  OEMFACP  0x05000425 MSFT 0x0097) @ 
0x2ff40200
ACPI: OEMB (v001 A M I  OEMBIOS  0x05000425 MSFT 0x0097) @ 
0x2ff50040
  >>> ERROR: Invalid checksum
ACPI: DSDT (v001  L5DK8 L5DK8014 0x0014 INTL 0x0

Re: 2.6.13-rc5-mm1

2005-08-07 Thread Avuton Olrich
On 8/7/05, Andrew Morton <[EMAIL PROTECTED]> wrote:
> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.13-rc5/2.6.13-rc5-mm1/

I probably don't need/want phy stuff anyhow, but when I tried it:

Problem:
drivers/built-in.o: In function `phy_start_machine':
: undefined reference to `phy_timer'
drivers/built-in.o: In function `phy_stop_machine':
: undefined reference to `phy_stop_interrupts'
make: *** [.tmp_vmlinux1] Error 1

Config:
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.13-rc5-mm1
# Sun Aug  7 11:27:22 2005
#
CONFIG_X86=y
CONFIG_SEMAPHORE_SLEEPERS=y
CONFIG_MMU=y
CONFIG_UID16=y
CONFIG_GENERIC_ISA_DMA=y
CONFIG_GENERIC_IOMAP=y

#
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y
CONFIG_CLEAN_COMPILE=y
CONFIG_BROKEN_ON_SMP=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32

#
# General setup
#
CONFIG_LOCALVERSION=""
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
# CONFIG_POSIX_MQUEUE is not set
# CONFIG_BSD_PROCESS_ACCT is not set
CONFIG_SYSCTL=y
# CONFIG_AUDIT is not set
CONFIG_HOTPLUG=y
CONFIG_KOBJECT_UEVENT=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
# CONFIG_EMBEDDED is not set
CONFIG_KALLSYMS=y
# CONFIG_KALLSYMS_EXTRA_PASS is not set
CONFIG_PRINTK=y
CONFIG_BUG=y
CONFIG_BASE_FULL=y
CONFIG_FUTEX=y
CONFIG_EPOLL=y
CONFIG_SHMEM=y
CONFIG_CC_ALIGN_FUNCTIONS=0
CONFIG_CC_ALIGN_LABELS=0
CONFIG_CC_ALIGN_LOOPS=0
CONFIG_CC_ALIGN_JUMPS=0
# CONFIG_TINY_SHMEM is not set
CONFIG_BASE_SMALL=0

#
# Loadable module support
#
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
# CONFIG_MODULE_FORCE_UNLOAD is not set
CONFIG_OBSOLETE_MODPARM=y
# CONFIG_MODVERSIONS is not set
# CONFIG_MODULE_SRCVERSION_ALL is not set
CONFIG_KMOD=y

#
# Processor type and features
#
CONFIG_X86_PC=y
# CONFIG_X86_ELAN is not set
# CONFIG_X86_VOYAGER is not set
# CONFIG_X86_NUMAQ is not set
# CONFIG_X86_SUMMIT is not set
# CONFIG_X86_BIGSMP is not set
# CONFIG_X86_VISWS is not set
# CONFIG_X86_GENERICARCH is not set
# CONFIG_X86_ES7000 is not set
# CONFIG_M386 is not set
# CONFIG_M486 is not set
# CONFIG_M586 is not set
# CONFIG_M586TSC is not set
# CONFIG_M586MMX is not set
# CONFIG_M686 is not set
# CONFIG_MPENTIUMII is not set
# CONFIG_MPENTIUMIII is not set
# CONFIG_MPENTIUMM is not set
# CONFIG_MPENTIUM4 is not set
# CONFIG_MK6 is not set
CONFIG_MK7=y
# CONFIG_MK8 is not set
# CONFIG_MCRUSOE is not set
# CONFIG_MEFFICEON is not set
# CONFIG_MWINCHIPC6 is not set
# CONFIG_MWINCHIP2 is not set
# CONFIG_MWINCHIP3D is not set
# CONFIG_MGEODEGX1 is not set
# CONFIG_MCYRIXIII is not set
# CONFIG_MVIAC3_2 is not set
# CONFIG_X86_GENERIC is not set
CONFIG_X86_CMPXCHG=y
CONFIG_X86_XADD=y
CONFIG_X86_L1_CACHE_SHIFT=6
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_X86_WP_WORKS_OK=y
CONFIG_X86_INVLPG=y
CONFIG_X86_BSWAP=y
CONFIG_X86_POPAD_OK=y
CONFIG_X86_GOOD_APIC=y
CONFIG_X86_INTEL_USERCOPY=y
CONFIG_X86_USE_PPRO_CHECKSUM=y
CONFIG_X86_USE_3DNOW=y
CONFIG_HPET_TIMER=y
CONFIG_HPET_EMULATE_RTC=y
# CONFIG_SMP is not set
# CONFIG_PREEMPT_NONE is not set
# CONFIG_PREEMPT_VOLUNTARY is not set
CONFIG_PREEMPT=y
CONFIG_PREEMPT_BKL=y
CONFIG_X86_UP_APIC=y
CONFIG_X86_UP_IOAPIC=y
CONFIG_X86_LOCAL_APIC=y
CONFIG_X86_IO_APIC=y
CONFIG_X86_TSC=y
CONFIG_X86_MCE=y
CONFIG_X86_MCE_NONFATAL=y
# CONFIG_X86_MCE_P4THERMAL is not set
# CONFIG_TOSHIBA is not set
# CONFIG_I8K is not set
# CONFIG_X86_REBOOTFIXUPS is not set
# CONFIG_MICROCODE is not set
# CONFIG_X86_MSR is not set
# CONFIG_X86_CPUID is not set

#
# Firmware Drivers
#
# CONFIG_EDD is not set
# CONFIG_DELL_RBU is not set
CONFIG_NOHIGHMEM=y
# CONFIG_HIGHMEM4G is not set
# CONFIG_HIGHMEM64G is not set
CONFIG_SELECT_MEMORY_MODEL=y
CONFIG_FLATMEM_MANUAL=y
# CONFIG_DISCONTIGMEM_MANUAL is not set
# CONFIG_SPARSEMEM_MANUAL is not set
CONFIG_FLATMEM=y
CONFIG_FLAT_NODE_MEM_MAP=y
# CONFIG_MATH_EMULATION is not set
CONFIG_MTRR=y
# CONFIG_EFI is not set
CONFIG_HAVE_DEC_LOCK=y
CONFIG_REGPARM=y
CONFIG_SECCOMP=y
# CONFIG_HZ_100 is not set
# CONFIG_HZ_250 is not set
CONFIG_HZ_1000=y
CONFIG_HZ=1000
CONFIG_PHYSICAL_START=0x10
# CONFIG_KEXEC is not set

#
# Performance-monitoring counters support
#
# CONFIG_PERFCTR is not set

#
# Power management options (ACPI, APM)
#
CONFIG_PM=y
CONFIG_PM_DEBUG=y
# CONFIG_SOFTWARE_SUSPEND is not set

#
# ACPI (Advanced Configuration and Power Interface) Support
#
CONFIG_ACPI=y
CONFIG_ACPI_BOOT=y
CONFIG_ACPI_INTERPRETER=y
CONFIG_ACPI_SLEEP=y
CONFIG_ACPI_SLEEP_PROC_FS=y
# CONFIG_ACPI_SLEEP_PROC_SLEEP is not set
# CONFIG_ACPI_AC is not set
# CONFIG_ACPI_BATTERY is not set
CONFIG_ACPI_BUTTON=y
CONFIG_ACPI_VIDEO=m
CONFIG_ACPI_HOTKEY=y
# CONFIG_ACPI_FAN is not set
CONFIG_ACPI_PROCESSOR=m
CONFIG_ACPI_THERMAL=m
# CONFIG_ACPI_ASUS is not set
# CONFIG_ACPI_IBM is not set
# CONFIG_ACPI_TOSHIBA is not set
CONFIG_ACPI_BLACKLIST_YEAR=0
CONFIG_ACPI_DEBUG=y
CONFIG_ACPI_BUS=y
CONFIG_ACPI_EC=y
CONFIG_ACPI_POWER=y
CONFIG_ACPI_PCI=y
CONFIG_ACPI_SYSTEM=y
CONFIG_X86_PM_TIMER=y
CONFIG_ACPI_CONTAINER=y

#
# APM (Advanced Power Management) BIOS Sup

Re: 2.6.13-rc5-mm1: oops when starting nscd on AMD64

2005-08-07 Thread Andrew Morton
"Rafael J. Wysocki" <[EMAIL PROTECTED]> wrote:
>
> I get the following Oops after trying to start nscd from YaST on an 
> Athlon64-based box
>  (compiled with CONFIG_DEBUG_SPINLOCK=y):
> 
>  Unable to handle kernel NULL pointer dereference at 0008 RIP:
>  {kmem_cache_alloc+232}
>  PGD 1501a067 PUD 1501b067 PMD 0
>  Oops:  [1] PREEMPT
>  CPU 0
>  Modules linked in: raw af_key usbserial thermal processor fan button battery 
> ac snd_pcm_oss snd_mixer_oss snd_intel8x0 snd_ac97_codec snd_ac97t
>  Pid: 6570, comm: nscd Not tainted 2.6.13-rc5-mm1
>  RIP: 0010:[] {kmem_cache_alloc+232}
>  RSP: 0018:81001506de88  EFLAGS: 00010202
>  RAX:  RBX: 8010eb3e RCX: 
>  RDX:  RSI: 8100292bdd68 RDI: 810001c3f6c0
>  RBP: 81001506deb8 R08:  R09: 8100292bdd70
>  R10: 0006 R11:  R12: 810001c3f6c0
>  R13: 8100292bdd68 R14: 80d0 R15: 801abe5c
>  FS:  2b11cb00() GS:804f2840() knlGS:56abc320
>  CS:  0010 DS:  ES:  CR0: 8005003b
>  CR2: 0008 CR3: 15019000 CR4: 06e0
>  Process nscd (pid: 6570, threadinfo 81001506c000, task 81001506b250)
>  Stack: 0246  81001569b5a0 8100155fe980
> fff4 000a 81001506df78 801abe5c
> 40a05fff 81001569b5a0
>  Call Trace:{sys_epoll_create+604} 
> {add_preempt_count+105}
> {system_call+126}
>  BUG: spinlock trylock failure on UP on CPU#0, nscd/6570
>   lock: 803bae80, .magic: dead4ead, .owner: nscd/6570, .owner_cpu: 0
> 
>  Call Trace:{add_preempt_count+105} 
> {spin_bug+211}
> {show_trace+571} 
> {_raw_spin_trylock+62}
> {_spin_trylock+30} {oops_begin+17}
> {do_page_fault+1722} {vprintk+830}
> {vprintk+830} 
> {kallsyms_lookup+246}
> {error_exit+0} {show_trace+571}
> {show_trace+567} {show_stack+216}
> {show_registers+135} {__die+142}
> {do_page_fault+1832} 
> {vsnprintf+1393}
> {sys_epoll_create+604} 
> {error_exit+0}
> {sys_epoll_create+604} 
> {system_call+126}
> {kmem_cache_alloc+232} 
> {kmem_cache_alloc+216}
> {sys_epoll_create+604} 
> {add_preempt_count+105}
> {system_call+126}
>  ---
>  | preempt count: 0002 ]
>  | 2 level deep critical section nesting:
>  
>  .. []  _spin_trylock+0x16/0x60
>  .[] ..   ( <= oops_begin+0x11/0x60)
>  .. []  _spin_trylock+0x16/0x60
>  .[] ..   ( <= oops_begin+0x11/0x60)

I don't think it was supposed to do that.

Quite possibly it's something to do with the new debugging code - could you
please take a copy of the offending config, send it over and then try
removing debug options, see if the crash goes away?  CONFIG_DEBUG_PREEMPT
would be the first to try..

Thanks.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


2.6.13-rc5-mm1: oops when starting nscd on AMD64

2005-08-07 Thread Rafael J. Wysocki
Hi,

I get the following Oops after trying to start nscd from YaST on an 
Athlon64-based box
(compiled with CONFIG_DEBUG_SPINLOCK=y):

Unable to handle kernel NULL pointer dereference at 0008 RIP:
{kmem_cache_alloc+232}
PGD 1501a067 PUD 1501b067 PMD 0
Oops:  [1] PREEMPT
CPU 0
Modules linked in: raw af_key usbserial thermal processor fan button battery ac 
snd_pcm_oss snd_mixer_oss snd_intel8x0 snd_ac97_codec snd_ac97t
Pid: 6570, comm: nscd Not tainted 2.6.13-rc5-mm1
RIP: 0010:[] {kmem_cache_alloc+232}
RSP: 0018:81001506de88  EFLAGS: 00010202
RAX:  RBX: 8010eb3e RCX: 
RDX:  RSI: 8100292bdd68 RDI: 810001c3f6c0
RBP: 81001506deb8 R08:  R09: 8100292bdd70
R10: 0006 R11:  R12: 810001c3f6c0
R13: 8100292bdd68 R14: 80d0 R15: 801abe5c
FS:  2b11cb00() GS:804f2840() knlGS:56abc320
CS:  0010 DS:  ES:  CR0: 8005003b
CR2: 0008 CR3: 15019000 CR4: 06e0
Process nscd (pid: 6570, threadinfo 81001506c000, task 81001506b250)
Stack: 0246  81001569b5a0 8100155fe980
   fff4 000a 81001506df78 801abe5c
   40a05fff 81001569b5a0
Call Trace:{sys_epoll_create+604} 
{add_preempt_count+105}
   {system_call+126}
BUG: spinlock trylock failure on UP on CPU#0, nscd/6570
 lock: 803bae80, .magic: dead4ead, .owner: nscd/6570, .owner_cpu: 0

Call Trace:{add_preempt_count+105} 
{spin_bug+211}
   {show_trace+571} 
{_raw_spin_trylock+62}
   {_spin_trylock+30} {oops_begin+17}
   {do_page_fault+1722} {vprintk+830}
   {vprintk+830} {kallsyms_lookup+246}
   {error_exit+0} {show_trace+571}
   {show_trace+567} {show_stack+216}
   {show_registers+135} {__die+142}
   {do_page_fault+1832} {vsnprintf+1393}
   {sys_epoll_create+604} {error_exit+0}
   {sys_epoll_create+604} 
{system_call+126}
   {kmem_cache_alloc+232} 
{kmem_cache_alloc+216}
   {sys_epoll_create+604} 
{add_preempt_count+105}
   {system_call+126}
---
| preempt count: 0002 ]
| 2 level deep critical section nesting:

.. []  _spin_trylock+0x16/0x60
.[] ..   ( <= oops_begin+0x11/0x60)
.. []  _spin_trylock+0x16/0x60
.[] ..   ( <= oops_begin+0x11/0x60)

It causes other Oopses to appear in an infinite loop (some of them are 
attached).

This is 100% reproducible, and 2.6.13-rc5 is not affected.

Greets,
Rafael


-- 
- Would you tell me, please, which way I ought to go from here?
- That depends a good deal on where you want to get to.
-- Lewis Carroll "Alice's Adventures in Wonderland"
Unable to handle kernel NULL pointer dereference at 0008 RIP:
{show_trace+571}
PGD 1501a067 PUD 1501b067 PMD 0
Oops:  [2] PREEMPT
CPU 0
Modules linked in: raw af_key usbserial thermal processor fan button battery ac snd_pcm_oss snd_mixer_oss snd_intel8x0 snd_ac97_codec snd_ac97t
Pid: 6570, comm: nscd Not tainted 2.6.13-rc5-mm1
RIP: 0010:[] {show_trace+571}
RSP: 0018:81001506dbc8  EFLAGS: 00010092
RAX: 0001 RBX: 002b RCX: 
RDX:  RSI: 0096 RDI: 0001
RBP: 81001506dc08 R08:  R09: 0001
R10: 81001506dae8 R11:  R12: 81001506e000
R13:  R14: 0024 R15: 80463fc0
FS:  2b11cb00() GS:804f2840() knlGS:56abc320
CS:  0010 DS:  ES:  CR0: 8005003b
CR2: 0008 CR3: 15019000 CR4: 06e0
Process nscd (pid: 6570, threadinfo 81001506c000, task 81001506b250)
Stack:  0092 1506dc08 81001506ded8
   000a 80463fc0 8045ffc0 
   81001506dc48 80110168
Call Trace:{show_stack+216} {show_registers+135}
   {__die+142} {do_page_fault+1832}
   {vsnprintf+1393} {sys_epoll_create+604}
   {error_exit+0} {sys_epoll_create+604}
   {system_call+126} {kmem_cache_alloc+232}
   {kmem_cache_alloc+216} {sys_epoll_create+604}
   {add_preempt_count+105} {system_call+126}

Unable to handle kernel NULL pointer dereference at 0008 RIP:
{show_trace+571}
PGD 1501a067 PUD 1501b067 PMD 0
Oops:  [3] PREEMPT
CPU 0
Modules linked in: raw af_key usbserial thermal processor fan button battery ac snd_pcm_oss snd_mixer_oss snd_intel8x0 snd_ac97_codec snd_ac97t
Pid: 6570, comm: nscd Not tainted 2.6.13-rc5-mm1
RIP: 0010:[] {show_trace+571}
RSP: 0018:81001506d908  EFLAGS: 00010096
RAX: 0001 RBX: 002b RCX: 
RDX:  RSI: 0096 RDI: 0001
RBP: 81001506d948 R08:  R09: 

2.6.13-rc5-mm1

2005-08-07 Thread Andrew Morton

ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.13-rc5/2.6.13-rc5-mm1/

(Grab it from
http://www.zip.com.au/~akpm/linux/patches/stuff/2.6.13-rc5-mm1.gz until the
kernel.org mirrors catch up)


- Added the git-scsi-iscsi.patch tree: iSCSI drivers (James Bottomley)

- This kernel is broken on ia64: the spinlock consolidation patch needs fixing.

- The acpi development tree is back in -mm.

- Dropped cachefs and the cachefs-for-AFS patches.  These get in the way of
  memory management testing a bit, and they're being redone anyway.



Changes since 2.6.13-rc4-mm1:


 linus.patch
 git-acpi.patch
 git-alsa.patch
 git-cryptodev.patch
 git-drm.patch
 git-ia64.patch
 git-audit.patch
 git-jfs.patch
 git-kbuild.patch
 git-libata-adma-mwi.patch
 git-libata-chs-support.patch
 git-libata-passthru.patch
 git-libata-promise-sata-pata.patch
 git-mtd.patch
 git-net.patch
 git-netdev-chelsio.patch
 git-netdev-e100.patch
 git-netdev-sis190.patch
 git-netdev-smc91x-eeprom.patch
 git-netdev-ieee80211-wifi.patch
 git-netdev-upstream.patch
 git-ocfs2.patch
 git-serial.patch
 git-scsi-block.patch
 git-scsi-iscsi.patch
 git-scsi-misc.patch
 git-sparc64.patch

 Subsystem trees

-i2c-mpc-revert-duplicate-patch.patch
-skge-build-fix.patch
-pci-and-yenta-pcibios_bus_to_resource.patch
-disable-address-space-randomization-on-transmeta-cpus.patch
-v4l-miscellaneous-fixes.patch
-v4l-cx88-card-support-and-documentation-finishing.patch
-maintainers-record-man-pages.patch
-maintainers-record-man-pages-fix.patch
-ppc64-fix-config_altivec-not-set.patch
-display-name-of-fbdev-device.patch
-acpi_register_gsi-change-acpi_register_gsi-interface.patch
-acpi_register_gsi-change-acpi-pci-code.patch
-acpi_register_gsi-change-hpet-driver.patch
-acpi_register_gsi-change-phpacpi-driver.patch
-acpi_register_gsi-change-acpi-based-8250-driver.patch
-acpi_register_gsi-change-ia64-iosapic-code.patch
-acpi-ext-build-fix.patch
-no-acpi-build-fix.patch
-pci_link-pm_message_t-fix.patch
-acpi-fix-table-discovery-from-efi-for-x86.patch
-enable-acpi_hotplug_cpu-automatically-if-hotplug_cpu=y.patch
-drivers-char-drm-drm_pcic-fix-warnings.patch
-input-quirk-for-the-fn-key-on-powerbooks-with-an-usb.patch
-scsi_sata-has-to-be-a-tristate.patch
-include-net-ieee80211h-must-include-linux-wirelessh.patch
-drivers-net-wireless-hostap-hostapc-export_symtab-does-nothing.patch
-fc4-warning-fix.patch
-scsi-ibmvscsi-srph-fix-a-wrong-type-code-used-for-srp_login_rej.patch
-usb-ehci-microframe-handling-fix.patch
-silence-cs89x0.patch
-orinoco-sparse-fixes.patch
-tms380tr-move-to-dma-api.patch
-forcedeth-write-back-the-misordered-mac-address.patch
-ppc32-mark-boards-that-dont-build-as-broken.patch
-ppc32-add-440ep-support.patch
-ppc32-add-bamboo-platform.patch
-ppc32-add-bamboo-defconfig.patch
-ppc32-add-missing-4xx-emac-sysfs-nodes.patch
-8xx-convert-fec-driver-to-use-work_struct.patch
-8xx-using-dma_alloc_coherent-instead-consistent_alloc.patch
-8xx-fec-fix-interrupt-handler-prototypes.patch
-ppc32-remove-board-support-for-ep405.patch
-fix-outstanding-gzip-zlib-security-issues.patch
-fix-outstanding-gzip-zlib-security-issues-ppc64.patch
-remove-special-hpet_emulate_rtc-config-option.patch
-use-pci_device-in-forcedethc.patch

 Merged

+x86_64-ignore-machine-checks-from-boot-time.patch

 Avoid scary x86_64 messages

+__bio_clone-dead-comment.patch

 Fix a bad comment

+make-visws-compile-again.patch
+visws-linkage-fix.patch

 visws build fixes

+remove-linux-pagemaph-from-linux-swaph.patch

 sparc32 build fix

+8xx-convert-fec-driver-to-use-work_struct.patch
+8xx-using-dma_alloc_coherent-instead-consistent_alloc.patch
+8xx-fec-fix-interrupt-handler-prototypes.patch
+ppc32-8xx-fix-cpm-ethernet-description.patch
+ppc32-8xx-restrict-enet_big_buffers-option.patch
+ppc32-8xx-kill-unused-variable-in-commproc.patch
+ppc32-8xx-commproc-avoid-direct-pte-manipulation-use-dma-coherent-api-instead.patch

 ppc32 stuff

+move-the-fix-to-align-node_end_pfns-to-a-proper-location.patch

 sparsemem setup fix

+crc32c-typo-fix.patch

 Fix a tpyo

+fix-possible-null-pointer-access-acpi_pci_irq_disable.patch

 ACPI fix

+gregkh-i2c-i2c-max6875-simplify.patch
+gregkh-i2c-i2c-max6875-fix-build-error.patch
+gregkh-i2c-i2c-max6875-kobj_to_i2c_client.patch
+gregkh-i2c-i2c-max6875-cleanup.patch
+gregkh-i2c-w1-netlink-callbacks.patch

 Additions to Greg's i2c tree

+hid-core-wireless-security-lock-blacklist-entry.patch

 USB fix

+apple-powerbook-usb-keyboard-hid-fix.patch
+ns558-list-handling-fix.patch

 Input driver fixes

+activate-sata300-tx4-in-sata_promise.patch

 New sata device

+git-net-ddcp-fixes.patch
+git-net-svcsock-build-fix.patch

 git-net build fixes

-tcp-hang.patch

 No longer needed

+time-conversion-error-in-net-sunrpc-svcsockc.patch

 timeval calculation fix

+mbio_bus-pm_message_t-fix.patch

 git-netdev fix

+git-scsi-iscsi-vs-git-net.patch

 Make the iscsi code play properly with netlink changes in git-net.patch

+aic79xx-needs-scsi_transport_spi.patch

 git-scsi-misc

2.6.13-rc5-mm1

2005-08-07 Thread Andrew Morton

ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.13-rc5/2.6.13-rc5-mm1/

(Grab it from
http://www.zip.com.au/~akpm/linux/patches/stuff/2.6.13-rc5-mm1.gz until the
kernel.org mirrors catch up)


- Added the git-scsi-iscsi.patch tree: iSCSI drivers (James Bottomley)

- This kernel is broken on ia64: the spinlock consolidation patch needs fixing.

- The acpi development tree is back in -mm.

- Dropped cachefs and the cachefs-for-AFS patches.  These get in the way of
  memory management testing a bit, and they're being redone anyway.



Changes since 2.6.13-rc4-mm1:


 linus.patch
 git-acpi.patch
 git-alsa.patch
 git-cryptodev.patch
 git-drm.patch
 git-ia64.patch
 git-audit.patch
 git-jfs.patch
 git-kbuild.patch
 git-libata-adma-mwi.patch
 git-libata-chs-support.patch
 git-libata-passthru.patch
 git-libata-promise-sata-pata.patch
 git-mtd.patch
 git-net.patch
 git-netdev-chelsio.patch
 git-netdev-e100.patch
 git-netdev-sis190.patch
 git-netdev-smc91x-eeprom.patch
 git-netdev-ieee80211-wifi.patch
 git-netdev-upstream.patch
 git-ocfs2.patch
 git-serial.patch
 git-scsi-block.patch
 git-scsi-iscsi.patch
 git-scsi-misc.patch
 git-sparc64.patch

 Subsystem trees

-i2c-mpc-revert-duplicate-patch.patch
-skge-build-fix.patch
-pci-and-yenta-pcibios_bus_to_resource.patch
-disable-address-space-randomization-on-transmeta-cpus.patch
-v4l-miscellaneous-fixes.patch
-v4l-cx88-card-support-and-documentation-finishing.patch
-maintainers-record-man-pages.patch
-maintainers-record-man-pages-fix.patch
-ppc64-fix-config_altivec-not-set.patch
-display-name-of-fbdev-device.patch
-acpi_register_gsi-change-acpi_register_gsi-interface.patch
-acpi_register_gsi-change-acpi-pci-code.patch
-acpi_register_gsi-change-hpet-driver.patch
-acpi_register_gsi-change-phpacpi-driver.patch
-acpi_register_gsi-change-acpi-based-8250-driver.patch
-acpi_register_gsi-change-ia64-iosapic-code.patch
-acpi-ext-build-fix.patch
-no-acpi-build-fix.patch
-pci_link-pm_message_t-fix.patch
-acpi-fix-table-discovery-from-efi-for-x86.patch
-enable-acpi_hotplug_cpu-automatically-if-hotplug_cpu=y.patch
-drivers-char-drm-drm_pcic-fix-warnings.patch
-input-quirk-for-the-fn-key-on-powerbooks-with-an-usb.patch
-scsi_sata-has-to-be-a-tristate.patch
-include-net-ieee80211h-must-include-linux-wirelessh.patch
-drivers-net-wireless-hostap-hostapc-export_symtab-does-nothing.patch
-fc4-warning-fix.patch
-scsi-ibmvscsi-srph-fix-a-wrong-type-code-used-for-srp_login_rej.patch
-usb-ehci-microframe-handling-fix.patch
-silence-cs89x0.patch
-orinoco-sparse-fixes.patch
-tms380tr-move-to-dma-api.patch
-forcedeth-write-back-the-misordered-mac-address.patch
-ppc32-mark-boards-that-dont-build-as-broken.patch
-ppc32-add-440ep-support.patch
-ppc32-add-bamboo-platform.patch
-ppc32-add-bamboo-defconfig.patch
-ppc32-add-missing-4xx-emac-sysfs-nodes.patch
-8xx-convert-fec-driver-to-use-work_struct.patch
-8xx-using-dma_alloc_coherent-instead-consistent_alloc.patch
-8xx-fec-fix-interrupt-handler-prototypes.patch
-ppc32-remove-board-support-for-ep405.patch
-fix-outstanding-gzip-zlib-security-issues.patch
-fix-outstanding-gzip-zlib-security-issues-ppc64.patch
-remove-special-hpet_emulate_rtc-config-option.patch
-use-pci_device-in-forcedethc.patch

 Merged

+x86_64-ignore-machine-checks-from-boot-time.patch

 Avoid scary x86_64 messages

+__bio_clone-dead-comment.patch

 Fix a bad comment

+make-visws-compile-again.patch
+visws-linkage-fix.patch

 visws build fixes

+remove-linux-pagemaph-from-linux-swaph.patch

 sparc32 build fix

+8xx-convert-fec-driver-to-use-work_struct.patch
+8xx-using-dma_alloc_coherent-instead-consistent_alloc.patch
+8xx-fec-fix-interrupt-handler-prototypes.patch
+ppc32-8xx-fix-cpm-ethernet-description.patch
+ppc32-8xx-restrict-enet_big_buffers-option.patch
+ppc32-8xx-kill-unused-variable-in-commproc.patch
+ppc32-8xx-commproc-avoid-direct-pte-manipulation-use-dma-coherent-api-instead.patch

 ppc32 stuff

+move-the-fix-to-align-node_end_pfns-to-a-proper-location.patch

 sparsemem setup fix

+crc32c-typo-fix.patch

 Fix a tpyo

+fix-possible-null-pointer-access-acpi_pci_irq_disable.patch

 ACPI fix

+gregkh-i2c-i2c-max6875-simplify.patch
+gregkh-i2c-i2c-max6875-fix-build-error.patch
+gregkh-i2c-i2c-max6875-kobj_to_i2c_client.patch
+gregkh-i2c-i2c-max6875-cleanup.patch
+gregkh-i2c-w1-netlink-callbacks.patch

 Additions to Greg's i2c tree

+hid-core-wireless-security-lock-blacklist-entry.patch

 USB fix

+apple-powerbook-usb-keyboard-hid-fix.patch
+ns558-list-handling-fix.patch

 Input driver fixes

+activate-sata300-tx4-in-sata_promise.patch

 New sata device

+git-net-ddcp-fixes.patch
+git-net-svcsock-build-fix.patch

 git-net build fixes

-tcp-hang.patch

 No longer needed

+time-conversion-error-in-net-sunrpc-svcsockc.patch

 timeval calculation fix

+mbio_bus-pm_message_t-fix.patch

 git-netdev fix

+git-scsi-iscsi-vs-git-net.patch

 Make the iscsi code play properly with netlink changes in git-net.patch

+aic79xx-needs-scsi_transport_spi.patch

 git-scsi-misc

2.6.13-rc5-mm1: oops when starting nscd on AMD64

2005-08-07 Thread Rafael J. Wysocki
Hi,

I get the following Oops after trying to start nscd from YaST on an 
Athlon64-based box
(compiled with CONFIG_DEBUG_SPINLOCK=y):

Unable to handle kernel NULL pointer dereference at 0008 RIP:
801664d8{kmem_cache_alloc+232}
PGD 1501a067 PUD 1501b067 PMD 0
Oops:  [1] PREEMPT
CPU 0
Modules linked in: raw af_key usbserial thermal processor fan button battery ac 
snd_pcm_oss snd_mixer_oss snd_intel8x0 snd_ac97_codec snd_ac97t
Pid: 6570, comm: nscd Not tainted 2.6.13-rc5-mm1
RIP: 0010:[801664d8] 801664d8{kmem_cache_alloc+232}
RSP: 0018:81001506de88  EFLAGS: 00010202
RAX:  RBX: 8010eb3e RCX: 
RDX:  RSI: 8100292bdd68 RDI: 810001c3f6c0
RBP: 81001506deb8 R08:  R09: 8100292bdd70
R10: 0006 R11:  R12: 810001c3f6c0
R13: 8100292bdd68 R14: 80d0 R15: 801abe5c
FS:  2b11cb00() GS:804f2840() knlGS:56abc320
CS:  0010 DS:  ES:  CR0: 8005003b
CR2: 0008 CR3: 15019000 CR4: 06e0
Process nscd (pid: 6570, threadinfo 81001506c000, task 81001506b250)
Stack: 0246  81001569b5a0 8100155fe980
   fff4 000a 81001506df78 801abe5c
   40a05fff 81001569b5a0
Call Trace:801abe5c{sys_epoll_create+604} 
80243579{add_preempt_count+105}
   8010eb3e{system_call+126}
BUG: spinlock trylock failure on UP on CPU#0, nscd/6570
 lock: 803bae80, .magic: dead4ead, .owner: nscd/6570, .owner_cpu: 0

Call Trace:80243579{add_preempt_count+105} 
802431a3{spin_bug+211}
   8011004b{show_trace+571} 
8024328e{_raw_spin_trylock+62}
   8035270e{_spin_trylock+30} 8010fc81{oops_begin+17}
   803538ea{do_page_fault+1722} 801343de{vprintk+830}
   801343de{vprintk+830} 801521f6{kallsyms_lookup+246}
   8010f431{error_exit+0} 8011004b{show_trace+571}
   80110047{show_trace+567} 80110168{show_stack+216}
   80110207{show_registers+135} 8011050e{__die+142}
   80353958{do_page_fault+1832} 802410c1{vsnprintf+1393}
   801abe5c{sys_epoll_create+604} 8010f431{error_exit+0}
   801abe5c{sys_epoll_create+604} 
8010eb3e{system_call+126}
   801664d8{kmem_cache_alloc+232} 
801664c8{kmem_cache_alloc+216}
   801abe5c{sys_epoll_create+604} 
80243579{add_preempt_count+105}
   8010eb3e{system_call+126}
---
| preempt count: 0002 ]
| 2 level deep critical section nesting:

.. [80352706]  _spin_trylock+0x16/0x60
.[8010fc81] ..   ( = oops_begin+0x11/0x60)
.. [80352706]  _spin_trylock+0x16/0x60
.[8010fc81] ..   ( = oops_begin+0x11/0x60)

It causes other Oopses to appear in an infinite loop (some of them are 
attached).

This is 100% reproducible, and 2.6.13-rc5 is not affected.

Greets,
Rafael


-- 
- Would you tell me, please, which way I ought to go from here?
- That depends a good deal on where you want to get to.
-- Lewis Carroll Alice's Adventures in Wonderland
Unable to handle kernel NULL pointer dereference at 0008 RIP:
8011004b{show_trace+571}
PGD 1501a067 PUD 1501b067 PMD 0
Oops:  [2] PREEMPT
CPU 0
Modules linked in: raw af_key usbserial thermal processor fan button battery ac snd_pcm_oss snd_mixer_oss snd_intel8x0 snd_ac97_codec snd_ac97t
Pid: 6570, comm: nscd Not tainted 2.6.13-rc5-mm1
RIP: 0010:[8011004b] 8011004b{show_trace+571}
RSP: 0018:81001506dbc8  EFLAGS: 00010092
RAX: 0001 RBX: 002b RCX: 
RDX:  RSI: 0096 RDI: 0001
RBP: 81001506dc08 R08:  R09: 0001
R10: 81001506dae8 R11:  R12: 81001506e000
R13:  R14: 0024 R15: 80463fc0
FS:  2b11cb00() GS:804f2840() knlGS:56abc320
CS:  0010 DS:  ES:  CR0: 8005003b
CR2: 0008 CR3: 15019000 CR4: 06e0
Process nscd (pid: 6570, threadinfo 81001506c000, task 81001506b250)
Stack:  0092 1506dc08 81001506ded8
   000a 80463fc0 8045ffc0 
   81001506dc48 80110168
Call Trace:80110168{show_stack+216} 80110207{show_registers+135}
   8011050e{__die+142} 80353958{do_page_fault+1832}
   802410c1{vsnprintf+1393} 801abe5c{sys_epoll_create+604}
   8010f431{error_exit+0} 801abe5c{sys_epoll_create+604

Re: 2.6.13-rc5-mm1: oops when starting nscd on AMD64

2005-08-07 Thread Andrew Morton
Rafael J. Wysocki [EMAIL PROTECTED] wrote:

 I get the following Oops after trying to start nscd from YaST on an 
 Athlon64-based box
  (compiled with CONFIG_DEBUG_SPINLOCK=y):
 
  Unable to handle kernel NULL pointer dereference at 0008 RIP:
  801664d8{kmem_cache_alloc+232}
  PGD 1501a067 PUD 1501b067 PMD 0
  Oops:  [1] PREEMPT
  CPU 0
  Modules linked in: raw af_key usbserial thermal processor fan button battery 
 ac snd_pcm_oss snd_mixer_oss snd_intel8x0 snd_ac97_codec snd_ac97t
  Pid: 6570, comm: nscd Not tainted 2.6.13-rc5-mm1
  RIP: 0010:[801664d8] 801664d8{kmem_cache_alloc+232}
  RSP: 0018:81001506de88  EFLAGS: 00010202
  RAX:  RBX: 8010eb3e RCX: 
  RDX:  RSI: 8100292bdd68 RDI: 810001c3f6c0
  RBP: 81001506deb8 R08:  R09: 8100292bdd70
  R10: 0006 R11:  R12: 810001c3f6c0
  R13: 8100292bdd68 R14: 80d0 R15: 801abe5c
  FS:  2b11cb00() GS:804f2840() knlGS:56abc320
  CS:  0010 DS:  ES:  CR0: 8005003b
  CR2: 0008 CR3: 15019000 CR4: 06e0
  Process nscd (pid: 6570, threadinfo 81001506c000, task 81001506b250)
  Stack: 0246  81001569b5a0 8100155fe980
 fff4 000a 81001506df78 801abe5c
 40a05fff 81001569b5a0
  Call Trace:801abe5c{sys_epoll_create+604} 
 80243579{add_preempt_count+105}
 8010eb3e{system_call+126}
  BUG: spinlock trylock failure on UP on CPU#0, nscd/6570
   lock: 803bae80, .magic: dead4ead, .owner: nscd/6570, .owner_cpu: 0
 
  Call Trace:80243579{add_preempt_count+105} 
 802431a3{spin_bug+211}
 8011004b{show_trace+571} 
 8024328e{_raw_spin_trylock+62}
 8035270e{_spin_trylock+30} 8010fc81{oops_begin+17}
 803538ea{do_page_fault+1722} 801343de{vprintk+830}
 801343de{vprintk+830} 
 801521f6{kallsyms_lookup+246}
 8010f431{error_exit+0} 8011004b{show_trace+571}
 80110047{show_trace+567} 80110168{show_stack+216}
 80110207{show_registers+135} 8011050e{__die+142}
 80353958{do_page_fault+1832} 
 802410c1{vsnprintf+1393}
 801abe5c{sys_epoll_create+604} 
 8010f431{error_exit+0}
 801abe5c{sys_epoll_create+604} 
 8010eb3e{system_call+126}
 801664d8{kmem_cache_alloc+232} 
 801664c8{kmem_cache_alloc+216}
 801abe5c{sys_epoll_create+604} 
 80243579{add_preempt_count+105}
 8010eb3e{system_call+126}
  ---
  | preempt count: 0002 ]
  | 2 level deep critical section nesting:
  
  .. [80352706]  _spin_trylock+0x16/0x60
  .[8010fc81] ..   ( = oops_begin+0x11/0x60)
  .. [80352706]  _spin_trylock+0x16/0x60
  .[8010fc81] ..   ( = oops_begin+0x11/0x60)

I don't think it was supposed to do that.

Quite possibly it's something to do with the new debugging code - could you
please take a copy of the offending config, send it over and then try
removing debug options, see if the crash goes away?  CONFIG_DEBUG_PREEMPT
would be the first to try..

Thanks.
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.13-rc5-mm1

2005-08-07 Thread Avuton Olrich
On 8/7/05, Andrew Morton [EMAIL PROTECTED] wrote:
 ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.13-rc5/2.6.13-rc5-mm1/

I probably don't need/want phy stuff anyhow, but when I tried it:

Problem:
drivers/built-in.o: In function `phy_start_machine':
: undefined reference to `phy_timer'
drivers/built-in.o: In function `phy_stop_machine':
: undefined reference to `phy_stop_interrupts'
make: *** [.tmp_vmlinux1] Error 1

Config:
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.13-rc5-mm1
# Sun Aug  7 11:27:22 2005
#
CONFIG_X86=y
CONFIG_SEMAPHORE_SLEEPERS=y
CONFIG_MMU=y
CONFIG_UID16=y
CONFIG_GENERIC_ISA_DMA=y
CONFIG_GENERIC_IOMAP=y

#
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y
CONFIG_CLEAN_COMPILE=y
CONFIG_BROKEN_ON_SMP=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32

#
# General setup
#
CONFIG_LOCALVERSION=
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
# CONFIG_POSIX_MQUEUE is not set
# CONFIG_BSD_PROCESS_ACCT is not set
CONFIG_SYSCTL=y
# CONFIG_AUDIT is not set
CONFIG_HOTPLUG=y
CONFIG_KOBJECT_UEVENT=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
# CONFIG_EMBEDDED is not set
CONFIG_KALLSYMS=y
# CONFIG_KALLSYMS_EXTRA_PASS is not set
CONFIG_PRINTK=y
CONFIG_BUG=y
CONFIG_BASE_FULL=y
CONFIG_FUTEX=y
CONFIG_EPOLL=y
CONFIG_SHMEM=y
CONFIG_CC_ALIGN_FUNCTIONS=0
CONFIG_CC_ALIGN_LABELS=0
CONFIG_CC_ALIGN_LOOPS=0
CONFIG_CC_ALIGN_JUMPS=0
# CONFIG_TINY_SHMEM is not set
CONFIG_BASE_SMALL=0

#
# Loadable module support
#
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
# CONFIG_MODULE_FORCE_UNLOAD is not set
CONFIG_OBSOLETE_MODPARM=y
# CONFIG_MODVERSIONS is not set
# CONFIG_MODULE_SRCVERSION_ALL is not set
CONFIG_KMOD=y

#
# Processor type and features
#
CONFIG_X86_PC=y
# CONFIG_X86_ELAN is not set
# CONFIG_X86_VOYAGER is not set
# CONFIG_X86_NUMAQ is not set
# CONFIG_X86_SUMMIT is not set
# CONFIG_X86_BIGSMP is not set
# CONFIG_X86_VISWS is not set
# CONFIG_X86_GENERICARCH is not set
# CONFIG_X86_ES7000 is not set
# CONFIG_M386 is not set
# CONFIG_M486 is not set
# CONFIG_M586 is not set
# CONFIG_M586TSC is not set
# CONFIG_M586MMX is not set
# CONFIG_M686 is not set
# CONFIG_MPENTIUMII is not set
# CONFIG_MPENTIUMIII is not set
# CONFIG_MPENTIUMM is not set
# CONFIG_MPENTIUM4 is not set
# CONFIG_MK6 is not set
CONFIG_MK7=y
# CONFIG_MK8 is not set
# CONFIG_MCRUSOE is not set
# CONFIG_MEFFICEON is not set
# CONFIG_MWINCHIPC6 is not set
# CONFIG_MWINCHIP2 is not set
# CONFIG_MWINCHIP3D is not set
# CONFIG_MGEODEGX1 is not set
# CONFIG_MCYRIXIII is not set
# CONFIG_MVIAC3_2 is not set
# CONFIG_X86_GENERIC is not set
CONFIG_X86_CMPXCHG=y
CONFIG_X86_XADD=y
CONFIG_X86_L1_CACHE_SHIFT=6
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_X86_WP_WORKS_OK=y
CONFIG_X86_INVLPG=y
CONFIG_X86_BSWAP=y
CONFIG_X86_POPAD_OK=y
CONFIG_X86_GOOD_APIC=y
CONFIG_X86_INTEL_USERCOPY=y
CONFIG_X86_USE_PPRO_CHECKSUM=y
CONFIG_X86_USE_3DNOW=y
CONFIG_HPET_TIMER=y
CONFIG_HPET_EMULATE_RTC=y
# CONFIG_SMP is not set
# CONFIG_PREEMPT_NONE is not set
# CONFIG_PREEMPT_VOLUNTARY is not set
CONFIG_PREEMPT=y
CONFIG_PREEMPT_BKL=y
CONFIG_X86_UP_APIC=y
CONFIG_X86_UP_IOAPIC=y
CONFIG_X86_LOCAL_APIC=y
CONFIG_X86_IO_APIC=y
CONFIG_X86_TSC=y
CONFIG_X86_MCE=y
CONFIG_X86_MCE_NONFATAL=y
# CONFIG_X86_MCE_P4THERMAL is not set
# CONFIG_TOSHIBA is not set
# CONFIG_I8K is not set
# CONFIG_X86_REBOOTFIXUPS is not set
# CONFIG_MICROCODE is not set
# CONFIG_X86_MSR is not set
# CONFIG_X86_CPUID is not set

#
# Firmware Drivers
#
# CONFIG_EDD is not set
# CONFIG_DELL_RBU is not set
CONFIG_NOHIGHMEM=y
# CONFIG_HIGHMEM4G is not set
# CONFIG_HIGHMEM64G is not set
CONFIG_SELECT_MEMORY_MODEL=y
CONFIG_FLATMEM_MANUAL=y
# CONFIG_DISCONTIGMEM_MANUAL is not set
# CONFIG_SPARSEMEM_MANUAL is not set
CONFIG_FLATMEM=y
CONFIG_FLAT_NODE_MEM_MAP=y
# CONFIG_MATH_EMULATION is not set
CONFIG_MTRR=y
# CONFIG_EFI is not set
CONFIG_HAVE_DEC_LOCK=y
CONFIG_REGPARM=y
CONFIG_SECCOMP=y
# CONFIG_HZ_100 is not set
# CONFIG_HZ_250 is not set
CONFIG_HZ_1000=y
CONFIG_HZ=1000
CONFIG_PHYSICAL_START=0x10
# CONFIG_KEXEC is not set

#
# Performance-monitoring counters support
#
# CONFIG_PERFCTR is not set

#
# Power management options (ACPI, APM)
#
CONFIG_PM=y
CONFIG_PM_DEBUG=y
# CONFIG_SOFTWARE_SUSPEND is not set

#
# ACPI (Advanced Configuration and Power Interface) Support
#
CONFIG_ACPI=y
CONFIG_ACPI_BOOT=y
CONFIG_ACPI_INTERPRETER=y
CONFIG_ACPI_SLEEP=y
CONFIG_ACPI_SLEEP_PROC_FS=y
# CONFIG_ACPI_SLEEP_PROC_SLEEP is not set
# CONFIG_ACPI_AC is not set
# CONFIG_ACPI_BATTERY is not set
CONFIG_ACPI_BUTTON=y
CONFIG_ACPI_VIDEO=m
CONFIG_ACPI_HOTKEY=y
# CONFIG_ACPI_FAN is not set
CONFIG_ACPI_PROCESSOR=m
CONFIG_ACPI_THERMAL=m
# CONFIG_ACPI_ASUS is not set
# CONFIG_ACPI_IBM is not set
# CONFIG_ACPI_TOSHIBA is not set
CONFIG_ACPI_BLACKLIST_YEAR=0
CONFIG_ACPI_DEBUG=y
CONFIG_ACPI_BUS=y
CONFIG_ACPI_EC=y
CONFIG_ACPI_POWER=y
CONFIG_ACPI_PCI=y
CONFIG_ACPI_SYSTEM=y
CONFIG_X86_PM_TIMER=y
CONFIG_ACPI_CONTAINER=y

#
# APM (Advanced Power Management) BIOS Support
#
# CONFIG_APM

Re: 2.6.13-rc5-mm1: oops when starting nscd on AMD64

2005-08-07 Thread Rafael J. Wysocki
On Sunday, 7 of August 2005 19:23, Andrew Morton wrote:
 Rafael J. Wysocki [EMAIL PROTECTED] wrote:
 
  I get the following Oops after trying to start nscd from YaST on an 
  Athlon64-based box
   (compiled with CONFIG_DEBUG_SPINLOCK=y):
  
   Unable to handle kernel NULL pointer dereference at 0008 RIP:
   801664d8{kmem_cache_alloc+232}
   PGD 1501a067 PUD 1501b067 PMD 0
   Oops:  [1] PREEMPT
   CPU 0
   Modules linked in: raw af_key usbserial thermal processor fan button 
  battery ac snd_pcm_oss snd_mixer_oss snd_intel8x0 snd_ac97_codec snd_ac97t
   Pid: 6570, comm: nscd Not tainted 2.6.13-rc5-mm1
   RIP: 0010:[801664d8] 801664d8{kmem_cache_alloc+232}
   RSP: 0018:81001506de88  EFLAGS: 00010202
   RAX:  RBX: 8010eb3e RCX: 
   RDX:  RSI: 8100292bdd68 RDI: 810001c3f6c0
   RBP: 81001506deb8 R08:  R09: 8100292bdd70
   R10: 0006 R11:  R12: 810001c3f6c0
   R13: 8100292bdd68 R14: 80d0 R15: 801abe5c
   FS:  2b11cb00() GS:804f2840() 
  knlGS:56abc320
   CS:  0010 DS:  ES:  CR0: 8005003b
   CR2: 0008 CR3: 15019000 CR4: 06e0
   Process nscd (pid: 6570, threadinfo 81001506c000, task 
  81001506b250)
   Stack: 0246  81001569b5a0 8100155fe980
  fff4 000a 81001506df78 801abe5c
  40a05fff 81001569b5a0
   Call Trace:801abe5c{sys_epoll_create+604} 
  80243579{add_preempt_count+105}
  8010eb3e{system_call+126}
   BUG: spinlock trylock failure on UP on CPU#0, nscd/6570
lock: 803bae80, .magic: dead4ead, .owner: nscd/6570, .owner_cpu: 0
  
   Call Trace:80243579{add_preempt_count+105} 
  802431a3{spin_bug+211}
  8011004b{show_trace+571} 
  8024328e{_raw_spin_trylock+62}
  8035270e{_spin_trylock+30} 
  8010fc81{oops_begin+17}
  803538ea{do_page_fault+1722} 
  801343de{vprintk+830}
  801343de{vprintk+830} 
  801521f6{kallsyms_lookup+246}
  8010f431{error_exit+0} 8011004b{show_trace+571}
  80110047{show_trace+567} 
  80110168{show_stack+216}
  80110207{show_registers+135} 8011050e{__die+142}
  80353958{do_page_fault+1832} 
  802410c1{vsnprintf+1393}
  801abe5c{sys_epoll_create+604} 
  8010f431{error_exit+0}
  801abe5c{sys_epoll_create+604} 
  8010eb3e{system_call+126}
  801664d8{kmem_cache_alloc+232} 
  801664c8{kmem_cache_alloc+216}
  801abe5c{sys_epoll_create+604} 
  80243579{add_preempt_count+105}
  8010eb3e{system_call+126}
   ---
   | preempt count: 0002 ]
   | 2 level deep critical section nesting:
   
   .. [80352706]  _spin_trylock+0x16/0x60
   .[8010fc81] ..   ( = oops_begin+0x11/0x60)
   .. [80352706]  _spin_trylock+0x16/0x60
   .[8010fc81] ..   ( = oops_begin+0x11/0x60)
 
 I don't think it was supposed to do that.
 
 Quite possibly it's something to do with the new debugging code - could you
 please take a copy of the offending config, send it over and then try
 removing debug options, see if the crash goes away?  CONFIG_DEBUG_PREEMPT
 would be the first to try..

The (offending) .config is attached and here's what happens without 
CONFIG_DEBUG_PREEMPT
(the other debug options being unchanged):

Bootdata ok (command line is root=/dev/hdc6 vga=792 selinux=0 noapic 
resume=/dev/hdc3 console=ttyS0,57600 console=tty0 debug)
Linux version 2.6.13-rc5-mm1 ([EMAIL PROTECTED]) (gcc version 3.3.5 20050117 
(prerelease) (SUSE Linux)) #2 PREEMPT Sun Aug 7 21:10:38 CEST 2005
BIOS-provided physical RAM map:
 BIOS-e820:  - 0009fc00 (usable)
 BIOS-e820: 0009fc00 - 000a (reserved)
 BIOS-e820: 000e - 0010 (reserved)
 BIOS-e820: 0010 - 2ff4 (usable)
 BIOS-e820: 2ff4 - 2ff5 (ACPI data)
 BIOS-e820: 2ff5 - 3000 (ACPI NVS)
 BIOS-e820: fec0 - fec01000 (reserved)
 BIOS-e820: fee0 - fee01000 (reserved)
ACPI: RSDP (v000 ACPIAM) @ 0x000f76e0
ACPI: RSDT (v001 A M I  OEMRSDT  0x05000425 MSFT 0x0097) @ 
0x2ff4
ACPI: FADT (v001 A M I  OEMFACP  0x05000425 MSFT 0x0097) @ 
0x2ff40200
ACPI: OEMB (v001 A M I  OEMBIOS  0x05000425 MSFT 0x0097) @ 
0x2ff50040
   ERROR: Invalid checksum
ACPI: DSDT (v001  L5DK8 L5DK8014 0x0014 INTL 0x02002026

Re: 2.6.13-rc5-mm1

2005-08-07 Thread Rogério Brito
Thanks Andrew, for including the vfat speedup patch.

It has really improved a lot the performance of access to directories
having many subdirectories in an external Firewire HD that I have.

I'd say that if others don't have problems with it, then it should be
in 2.6.13, as far as I am concerned.

BTW, everything is working fine with the sbp2/ieee1394 drivers that
are in the mm tree.

It seems that there are some issues with ALSA, though. I will report
back as soon as I see if these are userland problems or not (it worked
fine with vanilla 2.6.13-rc5).


Thanks, Rogério.

-- 
Rogério Brito : [EMAIL PROTECTED] : http://www.ime.usp.br/~rbrito
Homepage of the algorithms package : http://algorithms.berlios.de
Homepage on freshmeat:  http://freshmeat.net/projects/algorithms/
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.13-rc5-mm1

2005-08-07 Thread Andrew Morton
Rogério Brito [EMAIL PROTECTED] wrote:

 Thanks Andrew, for including the vfat speedup patch.
 
 It has really improved a lot the performance of access to directories
 having many subdirectories in an external Firewire HD that I have.
 
 I'd say that if others don't have problems with it, then it should be
 in 2.6.13, as far as I am concerned.

It's probably a bit late to be able to determine that.  This one's 2.6.14
material, sorry.

 BTW, everything is working fine with the sbp2/ieee1394 drivers that
 are in the mm tree.

Good to hear.

 It seems that there are some issues with ALSA, though. I will report
 back as soon as I see if these are userland problems or not (it worked
 fine with vanilla 2.6.13-rc5).

OK, thanks for testing and reporting.  Our turnaround time for ALSA fixes
is not fantastic, really, so any problems which we currently have will
probably carry over into 2.6.13.  If you can raise a bugzilla record for
any problems in -rc6 I'll make sure they aren't forgotten.
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/