[PATCH] x86_64: Don't print exceptions for ltrace

2005-08-19 Thread Linux Kernel Mailing List
tree dadd784393dd60f390c8c4dc6632f1da27bcee9a
parent 916fa469ab2248d86473577dda72003df599879b
author Andi Kleen <[EMAIL PROTECTED]> Fri, 19 Aug 2005 06:56:04 +0200
committer Linus Torvalds <[EMAIL PROTECTED]> Sat, 20 Aug 2005 09:18:47 -0700

[PATCH] x86_64: Don't print exceptions for ltrace

Don't printk exceptions for ltrace

Signed-off-by: Andi Kleen <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>

 arch/x86_64/mm/fault.c |4 +---
 1 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/x86_64/mm/fault.c b/arch/x86_64/mm/fault.c
--- a/arch/x86_64/mm/fault.c
+++ b/arch/x86_64/mm/fault.c
@@ -211,9 +211,7 @@ int unhandled_signal(struct task_struct 
 {
if (tsk->pid == 1)
return 1;
-   /* Warn for strace, but not for gdb */
-   if (!test_ti_thread_flag(tsk->thread_info, TIF_SYSCALL_TRACE) &&
-   (tsk->ptrace & PT_PTRACED))
+   if (tsk->ptrace & PT_PTRACED)
return 0;
return (tsk->sighand->action[sig-1].sa.sa_handler == SIG_IGN) ||
(tsk->sighand->action[sig-1].sa.sa_handler == SIG_DFL);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] x86_64: Fix race in TSC synchronization

2005-08-19 Thread Linux Kernel Mailing List
tree c72bdb38231e163df346ba118af821e4875c95bb
parent 5e5ec10499a00bf4ce3440d5a9e1a5a176c5a640
author Andi Kleen <[EMAIL PROTECTED]> Fri, 19 Aug 2005 06:56:40 +0200
committer Linus Torvalds <[EMAIL PROTECTED]> Sat, 20 Aug 2005 09:18:47 -0700

[PATCH] x86_64: Fix race in TSC synchronization

Plug a race in TSC synchronization

We need to do tsc_sync_wait() before the CPU is set online to prevent
multiple CPUs from doing it in parallel - which won't work because TSC
sync has global unprotected state.

Signed-off-by: Andi Kleen <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>

 arch/x86_64/kernel/smpboot.c |   15 ---
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/arch/x86_64/kernel/smpboot.c b/arch/x86_64/kernel/smpboot.c
--- a/arch/x86_64/kernel/smpboot.c
+++ b/arch/x86_64/kernel/smpboot.c
@@ -492,6 +492,14 @@ void __cpuinit start_secondary(void)
 */
set_cpu_sibling_map(smp_processor_id());
 
+   /* 
+* Wait for TSC sync to not schedule things before.
+* We still process interrupts, which could see an inconsistent
+* time in that window unfortunately. 
+* Do this here because TSC sync has global unprotected state.
+*/
+   tsc_sync_wait();
+
/*
 * We need to hold call_lock, so there is no inconsistency
 * between the time smp_call_function() determines number of
@@ -509,13 +517,6 @@ void __cpuinit start_secondary(void)
per_cpu(cpu_state, smp_processor_id()) = CPU_ONLINE;
unlock_ipi_call_lock();
 
-   mb();
-
-   /* Wait for TSC sync to not schedule things before.
-  We still process interrupts, which could see an inconsistent
-  time in that window unfortunately. */
-   tsc_sync_wait();
-
cpu_idle();
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[TG3]: Fix SerDes detection

2005-08-19 Thread Linux Kernel Mailing List
tree 8cc7fcfa31f2d439545ff8d16ef188c1b1b7614c
parent 91aa9fb573fcc50bc74d5ee64c7e9b36131f1804
author Michael Chan <[EMAIL PROTECTED]> Sat, 20 Aug 2005 02:54:29 -0700
committer David S. Miller <[EMAIL PROTECTED]> Sat, 20 Aug 2005 02:54:29 -0700

[TG3]: Fix SerDes detection

A problem was reported by Grant Grundler on an HP rx8620 using IOX
Core LAN partno(A7109-6) 5701 copper NIC. The tg3 driver mistakenly
detects this NIC as having a SerDes PHY and link does not come up as a
result.

The problem was caused by an incorrectly programmed eeprom that set the
NIC_SRAM_DATA_CFG_PHY_TYPE_FIBER bit in the NIC_SRAM_DATA_CFG location.

This patch will override the NIC_SRAM_DATA_CFG_PHY_TYPE_FIBER bit if a
valid PHY ID is read from the MII registers on older 570x chips where
the MII interface is not used on SerDes chips. On newer chips such as
the 5780 that use MII for both copper and SerDes, SerDes detection must
rely on the eeprom.

This patch will make the SerDes detection identical to versions 3.25 and
older.

Signed-off-by: Michael Chan <[EMAIL PROTECTED]>
Acked-by: Grant Grundler <[EMAIL PROTECTED]>
Signed-off-by: David S. Miller <[EMAIL PROTECTED]>

 drivers/net/tg3.c |2 ++
 1 files changed, 2 insertions(+)

diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -8970,6 +8970,8 @@ static int __devinit tg3_phy_probe(struc
tp->phy_id = hw_phy_id;
if (hw_phy_id_masked == PHY_ID_BCM8002)
tp->tg3_flags2 |= TG3_FLG2_PHY_SERDES;
+   else
+   tp->tg3_flags2 &= ~TG3_FLG2_PHY_SERDES;
} else {
if (tp->phy_id != PHY_ID_INVALID) {
/* Do nothing, phy ID already set up in
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[TG3]: Update driver version and reldate.

2005-08-19 Thread Linux Kernel Mailing List
tree eec3baca8d1c1f026474906a3db3fac311753b4a
parent da6b2d01d6bd2e79fd4f7a08acd37dc4e8fcdce8
author David S. Miller <[EMAIL PROTECTED]> Sat, 20 Aug 2005 02:57:31 -0700
committer David S. Miller <[EMAIL PROTECTED]> Sat, 20 Aug 2005 02:57:31 -0700

[TG3]: Update driver version and reldate.

Signed-off-by: David S. Miller <[EMAIL PROTECTED]>

 drivers/net/tg3.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -66,8 +66,8 @@
 
 #define DRV_MODULE_NAME"tg3"
 #define PFX DRV_MODULE_NAME": "
-#define DRV_MODULE_VERSION "3.35"
-#define DRV_MODULE_RELDATE "August 6, 2005"
+#define DRV_MODULE_VERSION "3.36"
+#define DRV_MODULE_RELDATE "August 19, 2005"
 
 #define TG3_DEF_MAC_MODE   0
 #define TG3_DEF_RX_MODE0
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] Fix up symlink function pointers

2005-08-19 Thread Linux Kernel Mailing List
tree 8594c24dbb13dc253f41ef885a8ac899f0e434c1
parent cc314eef0128a807e50fa03baf2d0abc0647952c
author Al Viro <[EMAIL PROTECTED]> Sat, 20 Aug 2005 00:17:39 +0100
committer Linus Torvalds <[EMAIL PROTECTED]> Sat, 20 Aug 2005 08:08:21 -0700

[PATCH] Fix up symlink function pointers

This fixes up the symlink functions for the calling convention change:

 * afs, autofs4, befs, devfs, freevxfs, jffs2, jfs, ncpfs, procfs,
   smbfs, sysvfs, ufs, xfs - prototype change for ->follow_link()
 * befs, smbfs, xfs - same for ->put_link()

Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>

 fs/afs/mntpt.c  |8 
 fs/autofs4/symlink.c|4 ++--
 fs/befs/linuxvfs.c  |8 
 fs/devfs/base.c |4 ++--
 fs/freevxfs/vxfs_immed.c|4 ++--
 fs/jffs2/symlink.c  |6 +++---
 fs/jfs/symlink.c|4 ++--
 fs/proc/base.c  |8 
 fs/proc/generic.c   |4 ++--
 fs/smbfs/symlink.c  |6 +++---
 fs/sysv/symlink.c   |4 ++--
 fs/ufs/symlink.c|4 ++--
 fs/xfs/linux-2.6/xfs_iops.c |   10 +-
 13 files changed, 37 insertions(+), 37 deletions(-)

diff --git a/fs/afs/mntpt.c b/fs/afs/mntpt.c
--- a/fs/afs/mntpt.c
+++ b/fs/afs/mntpt.c
@@ -30,7 +30,7 @@ static struct dentry *afs_mntpt_lookup(s
   struct dentry *dentry,
   struct nameidata *nd);
 static int afs_mntpt_open(struct inode *inode, struct file *file);
-static int afs_mntpt_follow_link(struct dentry *dentry, struct nameidata *nd);
+static void *afs_mntpt_follow_link(struct dentry *dentry, struct nameidata 
*nd);
 
 struct file_operations afs_mntpt_file_operations = {
.open   = afs_mntpt_open,
@@ -233,7 +233,7 @@ static struct vfsmount *afs_mntpt_do_aut
 /*
  * follow a link from a mountpoint directory, thus causing it to be mounted
  */
-static int afs_mntpt_follow_link(struct dentry *dentry, struct nameidata *nd)
+static void *afs_mntpt_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
struct vfsmount *newmnt;
struct dentry *old_dentry;
@@ -249,7 +249,7 @@ static int afs_mntpt_follow_link(struct 
newmnt = afs_mntpt_do_automount(dentry);
if (IS_ERR(newmnt)) {
path_release(nd);
-   return PTR_ERR(newmnt);
+   return (void *)newmnt;
}
 
old_dentry = nd->dentry;
@@ -267,7 +267,7 @@ static int afs_mntpt_follow_link(struct 
}
 
kleave(" = %d", err);
-   return err;
+   return ERR_PTR(err);
 } /* end afs_mntpt_follow_link() */
 
 /*/
diff --git a/fs/autofs4/symlink.c b/fs/autofs4/symlink.c
--- a/fs/autofs4/symlink.c
+++ b/fs/autofs4/symlink.c
@@ -12,11 +12,11 @@
 
 #include "autofs_i.h"
 
-static int autofs4_follow_link(struct dentry *dentry, struct nameidata *nd)
+static void *autofs4_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
struct autofs_info *ino = autofs4_dentry_ino(dentry);
nd_set_link(nd, (char *)ino->u.symlink);
-   return 0;
+   return NULL;
 }
 
 struct inode_operations autofs4_symlink_inode_operations = {
diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
--- a/fs/befs/linuxvfs.c
+++ b/fs/befs/linuxvfs.c
@@ -41,8 +41,8 @@ static struct inode *befs_alloc_inode(st
 static void befs_destroy_inode(struct inode *inode);
 static int befs_init_inodecache(void);
 static void befs_destroy_inodecache(void);
-static int befs_follow_link(struct dentry *, struct nameidata *);
-static void befs_put_link(struct dentry *, struct nameidata *);
+static void *befs_follow_link(struct dentry *, struct nameidata *);
+static void befs_put_link(struct dentry *, struct nameidata *, void *);
 static int befs_utf2nls(struct super_block *sb, const char *in, int in_len,
char **out, int *out_len);
 static int befs_nls2utf(struct super_block *sb, const char *in, int in_len,
@@ -487,10 +487,10 @@ befs_follow_link(struct dentry *dentry, 
}
 
nd_set_link(nd, link);
-   return 0;
+   return NULL;
 }
 
-static void befs_put_link(struct dentry *dentry, struct nameidata *nd)
+static void befs_put_link(struct dentry *dentry, struct nameidata *nd, void *p)
 {
befs_inode_info *befs_ino = BEFS_I(dentry->d_inode);
if (befs_ino->i_flags & BEFS_LONG_SYMLINK) {
diff --git a/fs/devfs/base.c b/fs/devfs/base.c
--- a/fs/devfs/base.c
+++ b/fs/devfs/base.c
@@ -2491,11 +2491,11 @@ static int devfs_mknod(struct inode *dir
return 0;
 }  /*  End Function devfs_mknod  */
 
-static int devfs_follow_link(struct dentry *dentry, struct nameidata *nd)
+static void *devfs_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
struct devfs_entry *p = get_devfs_entry_from_vfs_inode(dentry->d_inode);
nd_set_link(nd, p ? p->u.symlink.linkname :

[PATCH] jffs2: fix symlink error handling

2005-08-19 Thread Linux Kernel Mailing List
tree d84587462e0378c5aa9c5581d6920d76242b8c65
parent 91aa9fb573fcc50bc74d5ee64c7e9b36131f1804
author Al Viro <[EMAIL PROTECTED]> Fri, 19 Aug 2005 22:42:16 +0100
committer Linus Torvalds <[EMAIL PROTECTED]> Sat, 20 Aug 2005 07:57:19 -0700

[PATCH] jffs2: fix symlink error handling

The current calling conventions for ->follow_link() are already fairly
complex.

What we have is
1) you can return -error; then you must release nameidata yourself
   and ->put_link() will _not_ be called.
2) you can do nd_set_link(nd, ERR_PTR(-error)) and return 0
3) you can do nd_set_link(nd, path) and return 0
4) you can return 0 (after having moved nameidata yourself)

jffs2 follow_link() is broken - it has an exit where it returns
-EIO and leaks nameidata.

Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>

 fs/jffs2/symlink.c |   10 ++
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/fs/jffs2/symlink.c b/fs/jffs2/symlink.c
--- a/fs/jffs2/symlink.c
+++ b/fs/jffs2/symlink.c
@@ -30,6 +30,7 @@ struct inode_operations jffs2_symlink_in
 static int jffs2_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
struct jffs2_inode_info *f = JFFS2_INODE_INFO(dentry->d_inode);
+   char *p = (char *)f->dents;

/*
 * We don't acquire the f->sem mutex here since the only data we
@@ -45,13 +46,14 @@ static int jffs2_follow_link(struct dent
 * nd_set_link() call.
 */

-   if (!f->dents) {
+   if (!p) {
printk(KERN_ERR "jffs2_follow_link(): can't find symlink 
taerget\n");
-   return -EIO;
+   p = ERR_PTR(-EIO);
+   } else {
+   D1(printk(KERN_DEBUG "jffs2_follow_link(): target path is 
'%s'\n", (char *) f->dents));
}
-   D1(printk(KERN_DEBUG "jffs2_follow_link(): target path is '%s'\n", 
(char *) f->dents));
 
-   nd_set_link(nd, (char *)f->dents);
+   nd_set_link(nd, p);

/*
 * We unlock the f->sem mutex but VFS will use the f->dents string. 
This is safe
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] NFSv4: unbalanced BKL in nfs_atomic_lookup()

2005-08-19 Thread Linux Kernel Mailing List
tree ae3c0190efa548d47e80e7225a8e8da0b2990317
parent cd3716ab40c6049479d29a74b29107fd7e0e1153
author Steve Dickson <[EMAIL PROTECTED]> Sat, 20 Aug 2005 07:57:48 -0700
committer Linus Torvalds <[EMAIL PROTECTED]> Sat, 20 Aug 2005 08:44:56 -0700

[PATCH] NFSv4: unbalanced BKL in nfs_atomic_lookup()

Added missing unlock_kernel() to NFSv4 atomic lookup.

Signed-off-by: Steve Dickson <[EMAIL PROTECTED]>
Signed-off-by: Trond Myklebust <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>

 fs/nfs/dir.c |1 +
 1 files changed, 1 insertion(+)

diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -939,6 +939,7 @@ static struct dentry *nfs_atomic_lookup(
error = nfs_revalidate_inode(NFS_SERVER(dir), dir);
if (error < 0) {
res = ERR_PTR(error);
+   unlock_kernel();
goto out;
}
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[SPARC]: Fix weak aliases

2005-08-19 Thread Linux Kernel Mailing List
tree c00a39d711f43853ac42ff5e93fe0826fa5388e5
parent a3f9985843b674cbcb58f39fab8416675e7ab842
author Al Viro <[EMAIL PROTECTED]> Sat, 20 Aug 2005 05:56:37 -0700
committer David S. Miller <[EMAIL PROTECTED]> Sat, 20 Aug 2005 05:56:37 -0700

[SPARC]: Fix weak aliases

sparc_ksyms.c used to declare weak alias to several gcc intrinsics.  It
doesn't work with gcc4 anymore - it wants a declaration for the thing
we are aliasing to and that's not going to happen for something like
.mul, etc.  Replaced with direct injection of weak alias on the assembler
level - .weak  followed by  = ; that works on all
gcc versions.

Signed-off-by: Al Viro <[EMAIL PROTECTED]>
Signed-off-by: David S. Miller <[EMAIL PROTECTED]>

 arch/sparc/kernel/sparc_ksyms.c |5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/sparc/kernel/sparc_ksyms.c b/arch/sparc/kernel/sparc_ksyms.c
--- a/arch/sparc/kernel/sparc_ksyms.c
+++ b/arch/sparc/kernel/sparc_ksyms.c
@@ -98,8 +98,9 @@ extern void ___rw_write_enter(void);
  * The module references will be fixed up by module_frob_arch_sections.
  */
 #define DOT_ALIAS2(__ret, __x, __arg1, __arg2) \
-   extern __ret __x(__arg1, __arg2) \
-__attribute__((weak, alias("." # __x)));
+   extern __ret __x(__arg1, __arg2); \
+   asm(".weak " #__x);\
+   asm(#__x "=." #__x);
 
 DOT_ALIAS2(int, div, int, int)
 DOT_ALIAS2(int, mul, int, int)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] Mobil Pentium 4 HT and the NMI

2005-08-19 Thread Linux Kernel Mailing List
tree 1b9fa4be58fda88d16d014bf85e460ee6db048ee
parent 008b150a3c4d971cd65d02d107b8fcc860bc959c
author Steven Rostedt <[EMAIL PROTECTED]> Sat, 20 Aug 2005 07:57:46 -0700
committer Linus Torvalds <[EMAIL PROTECTED]> Sat, 20 Aug 2005 08:44:56 -0700

[PATCH] Mobil Pentium 4 HT and the NMI

I'm trying to get the nmi working with my laptop (IBM ThinkPad G41) and after
debugging it a while, I found that the nmi code doesn't want to set it up for
this particular CPU.

Here I have:

$ cat /proc/cpuinfo
processor   : 0
vendor_id   : GenuineIntel
cpu family  : 15
model   : 4
model name  : Mobile Intel(R) Pentium(R) 4 CPU 3.33GHz
stepping: 1
cpu MHz : 3320.084
cache size  : 1024 KB
physical id : 0
siblings: 2
core id : 0
cpu cores   : 1
fdiv_bug: no
hlt_bug : no
f00f_bug: no
coma_bug: no
fpu : yes
fpu_exception   : yes
cpuid level : 3
wp  : yes
flags   : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe pni
monitor ds_cpl est tm2 cid xtpr
bogomips: 6642.39

processor   : 1
vendor_id   : GenuineIntel
cpu family  : 15
model   : 4
model name  : Mobile Intel(R) Pentium(R) 4 CPU 3.33GHz
stepping: 1
cpu MHz : 3320.084
cache size  : 1024 KB
physical id : 0
siblings: 2
core id : 0
cpu cores   : 1
fdiv_bug: no
hlt_bug : no
f00f_bug: no
coma_bug: no
fpu : yes
fpu_exception   : yes
cpuid level : 3
wp  : yes
flags   : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe pni
monitor ds_cpl est tm2 cid xtpr
bogomips: 6637.46

And the following code shows:

$ cat linux-2.6.13-rc6/arch/i386/kernel/nmi.c

[...]

void setup_apic_nmi_watchdog (void)
{
switch (boot_cpu_data.x86_vendor) {
case X86_VENDOR_AMD:
if (boot_cpu_data.x86 != 6 && boot_cpu_data.x86 != 15)
return;
setup_k7_watchdog();
break;
case X86_VENDOR_INTEL:
 switch (boot_cpu_data.x86) {
case 6:
if (boot_cpu_data.x86_model > 0xd)
return;

setup_p6_watchdog();
break;
case 15:
if (boot_cpu_data.x86_model > 0x3)
return;

Here I get boot_cpu_data.x86_model == 0x4.  So I decided to change it and
reboot.  I now seem to have a working NMI.  So, unless there's something know
to be bad about this processor and the NMI.  I'm submitting the following
patch.

Signed-off-by: Steven Rostedt <[EMAIL PROTECTED]>
Acked-by: Zwane Mwaikambo <[EMAIL PROTECTED]>
Acked-by: Mikael Pettersson <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>

 arch/i386/kernel/nmi.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/i386/kernel/nmi.c b/arch/i386/kernel/nmi.c
--- a/arch/i386/kernel/nmi.c
+++ b/arch/i386/kernel/nmi.c
@@ -195,7 +195,7 @@ static void disable_lapic_nmi_watchdog(v
wrmsr(MSR_P6_EVNTSEL0, 0, 0);
break;
case 15:
-   if (boot_cpu_data.x86_model > 0x3)
+   if (boot_cpu_data.x86_model > 0x4)
break;
 
wrmsr(MSR_P4_IQ_CCCR0, 0, 0);
@@ -432,7 +432,7 @@ void setup_apic_nmi_watchdog (void)
setup_p6_watchdog();
break;
case 15:
-   if (boot_cpu_data.x86_model > 0x3)
+   if (boot_cpu_data.x86_model > 0x4)
return;
 
if (!setup_p4_watchdog())
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[SPARC64]: Move kernel unaligned trap handlers into assembler file.

2005-08-19 Thread Linux Kernel Mailing List
tree aa869cd04ff618d018c5f39b7a3b0070d5e3957d
parent 8d5290149ee1c6a4cea5f5146d64e2a0d48f4988
author David S. Miller <[EMAIL PROTECTED]> Sat, 20 Aug 2005 05:55:33 -0700
committer David S. Miller <[EMAIL PROTECTED]> Sat, 20 Aug 2005 05:55:33 -0700

[SPARC64]: Move kernel unaligned trap handlers into assembler file.

GCC 4.x really dislikes the games we are playing in
unaligned.c, and the cleanest way to fix this is to
move things into assembler.

Noted by Al Viro.

Signed-off-by: David S. Miller <[EMAIL PROTECTED]>

 arch/sparc64/kernel/Makefile  |2 
 arch/sparc64/kernel/traps.c   |3 
 arch/sparc64/kernel/una_asm.S |  153 ++
 arch/sparc64/kernel/unaligned.c   |  261 --
 include/asm-sparc64/thread_info.h |5 
 5 files changed, 221 insertions(+), 203 deletions(-)

diff --git a/arch/sparc64/kernel/Makefile b/arch/sparc64/kernel/Makefile
--- a/arch/sparc64/kernel/Makefile
+++ b/arch/sparc64/kernel/Makefile
@@ -8,7 +8,7 @@ EXTRA_CFLAGS := -Werror
 extra-y:= head.o init_task.o vmlinux.lds
 
 obj-y  := process.o setup.o cpu.o idprom.o \
-  traps.o devices.o auxio.o \
+  traps.o devices.o auxio.o una_asm.o \
   irq.o ptrace.o time.o sys_sparc.o signal.o \
   unaligned.o central.o pci.o starfire.o semaphore.o \
   power.o sbus.o iommu_common.o sparc64_ksyms.o chmc.o
diff --git a/arch/sparc64/kernel/traps.c b/arch/sparc64/kernel/traps.c
--- a/arch/sparc64/kernel/traps.c
+++ b/arch/sparc64/kernel/traps.c
@@ -2127,6 +2127,9 @@ void __init trap_init(void)
TI_PRE_COUNT != offsetof(struct thread_info, preempt_count) ||
TI_NEW_CHILD != offsetof(struct thread_info, new_child) ||
TI_SYS_NOERROR != offsetof(struct thread_info, syscall_noerror) ||
+   TI_RESTART_BLOCK != offsetof(struct thread_info, restart_block) ||
+   TI_KUNA_REGS != offsetof(struct thread_info, kern_una_regs) ||
+   TI_KUNA_INSN != offsetof(struct thread_info, kern_una_insn) ||
TI_FPREGS != offsetof(struct thread_info, fpregs) ||
(TI_FPREGS & (64 - 1)))
thread_info_offsets_are_bolixed_dave();
diff --git a/arch/sparc64/kernel/una_asm.S b/arch/sparc64/kernel/una_asm.S
new file mode 100644
--- /dev/null
+++ b/arch/sparc64/kernel/una_asm.S
@@ -0,0 +1,153 @@
+/* una_asm.S: Kernel unaligned trap assembler helpers.
+ *
+ * Copyright (C) 1996,2005 David S. Miller ([EMAIL PROTECTED])
+ * Copyright (C) 1996,1997 Jakub Jelinek ([EMAIL PROTECTED])
+ */
+
+   .text
+
+kernel_unaligned_trap_fault:
+   callkernel_mna_trap_fault
+nop
+   retl
+nop
+   .size   kern_unaligned_trap_fault, .-kern_unaligned_trap_fault
+
+   .globl  __do_int_store
+__do_int_store:
+   rd  %asi, %o4
+   wr  %o3, 0, %asi
+   ldx [%o2], %g3
+   cmp %o1, 2
+   be,pn   %icc, 2f
+cmp%o1, 4
+   be,pt   %icc, 1f
+srlx   %g3, 24, %g2
+   srlx%g3, 56, %g1
+   srlx%g3, 48, %g7
+4: stba%g1, [%o0] %asi
+   srlx%g3, 40, %g1
+5: stba%g7, [%o0 + 1] %asi
+   srlx%g3, 32, %g7
+6: stba%g1, [%o0 + 2] %asi
+7: stba%g7, [%o0 + 3] %asi
+   srlx%g3, 16, %g1
+8: stba%g2, [%o0 + 4] %asi
+   srlx%g3, 8, %g7
+9: stba%g1, [%o0 + 5] %asi
+10:stba%g7, [%o0 + 6] %asi
+   ba,pt   %xcc, 0f
+11: stba   %g3, [%o0 + 7] %asi
+1: srl %g3, 16, %g7
+12:stba%g2, [%o0] %asi
+   srl %g3, 8, %g2
+13:stba%g7, [%o0 + 1] %asi
+14:stba%g2, [%o0 + 2] %asi
+   ba,pt   %xcc, 0f
+15: stba   %g3, [%o0 + 3] %asi
+2: srl %g3, 8, %g2
+16:stba%g2, [%o0] %asi
+17:stba%g3, [%o0 + 1] %asi
+0:
+   wr  %o4, 0x0, %asi
+   retl
+nop
+   .size   __do_int_store, .-__do_int_store
+
+   .section__ex_table
+   .word   4b, kernel_unaligned_trap_fault
+   .word   5b, kernel_unaligned_trap_fault
+   .word   6b, kernel_unaligned_trap_fault
+   .word   7b, kernel_unaligned_trap_fault
+   .word   8b, kernel_unaligned_trap_fault
+   .word   9b, kernel_unaligned_trap_fault
+   .word   10b, kernel_unaligned_trap_fault
+   .word   11b, kernel_unaligned_trap_fault
+   .word   12b, kernel_unaligned_trap_fault
+   .word   13b, kernel_unaligned_trap_fault
+   .word   14b, kernel_unaligned_trap_fault
+   .word   15b, kernel_unaligned_trap_fault
+   .word   16b, kernel_unaligned_trap_fault
+   .word   17b, kernel_unaligned_trap_fault
+   .previous
+
+   .globl  do_int_load
+do_int_load:
+   rd  %asi, %o5
+   wr  %o4, 0, %asi
+   cmp %o1, 8
+   bge,pn  %icc, 9f
+cmp%o1, 4
+   

Fix nasty ncpfs symlink handling bug.

2005-08-19 Thread Linux Kernel Mailing List
tree 8e38db1be28006894915273b3f3cb3beaa6efda3
parent 2fb1e3086df9b454538491fba8121298da37cd23
author Linus Torvalds <[EMAIL PROTECTED]> Sat, 20 Aug 2005 08:02:56 -0700
committer Linus Torvalds <[EMAIL PROTECTED]> Sat, 20 Aug 2005 08:02:56 -0700

Fix nasty ncpfs symlink handling bug.

This bug could cause oopses and page state corruption, because ncpfs
used the generic page-cache symlink handlign functions.  But those
functions only work if the page cache is guaranteed to be "stable", ie a
page that was installed when the symlink walk was started has to still
be installed in the page cache at the end of the walk.

We could have fixed ncpfs to not use the generic helper routines, but it
is in many ways much cleaner to instead improve on the symlink walking
helper routines so that they don't require that absolute stability.

We do this by allowing "follow_link()" to return a error-pointer as a
cookie, which is fed back to the cleanup "put_link()" routine.  This
also simplifies NFS symlink handling.

Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>

 fs/autofs/symlink.c |5 +++--
 fs/cifs/cifsfs.h|4 ++--
 fs/cifs/link.c  |6 +++---
 fs/ext2/symlink.c   |4 ++--
 fs/ext3/symlink.c   |4 ++--
 fs/namei.c  |   40 +---
 fs/nfs/symlink.c|   37 -
 fs/sysfs/symlink.c  |6 +++---
 include/linux/fs.h  |8 
 mm/shmem.c  |   17 ++---
 10 files changed, 54 insertions(+), 77 deletions(-)

diff --git a/fs/autofs/symlink.c b/fs/autofs/symlink.c
--- a/fs/autofs/symlink.c
+++ b/fs/autofs/symlink.c
@@ -12,11 +12,12 @@
 
 #include "autofs_i.h"
 
-static int autofs_follow_link(struct dentry *dentry, struct nameidata *nd)
+/* Nothing to release.. */
+static void *autofs_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
char *s=((struct autofs_symlink *)dentry->d_inode->u.generic_ip)->data;
nd_set_link(nd, s);
-   return 0;
+   return NULL;
 }
 
 struct inode_operations autofs_symlink_inode_operations = {
diff --git a/fs/cifs/cifsfs.h b/fs/cifs/cifsfs.h
--- a/fs/cifs/cifsfs.h
+++ b/fs/cifs/cifsfs.h
@@ -83,8 +83,8 @@ extern int cifs_dir_notify(struct file *
 extern struct dentry_operations cifs_dentry_ops;
 
 /* Functions related to symlinks */
-extern int cifs_follow_link(struct dentry *direntry, struct nameidata *nd);
-extern void cifs_put_link(struct dentry *direntry, struct nameidata *nd);
+extern void *cifs_follow_link(struct dentry *direntry, struct nameidata *nd);
+extern void cifs_put_link(struct dentry *direntry, struct nameidata *nd, void 
*);
 extern int cifs_readlink(struct dentry *direntry, char __user *buffer, 
 int buflen);
 extern int cifs_symlink(struct inode *inode, struct dentry *direntry,
diff --git a/fs/cifs/link.c b/fs/cifs/link.c
--- a/fs/cifs/link.c
+++ b/fs/cifs/link.c
@@ -92,7 +92,7 @@ cifs_hl_exit:
return rc;
 }
 
-int
+void *
 cifs_follow_link(struct dentry *direntry, struct nameidata *nd)
 {
struct inode *inode = direntry->d_inode;
@@ -148,7 +148,7 @@ out:
 out_no_free:
FreeXid(xid);
nd_set_link(nd, target_path);
-   return 0;
+   return NULL;/* No cookie */
 }
 
 int
@@ -330,7 +330,7 @@ cifs_readlink(struct dentry *direntry, c
return rc;
 }
 
-void cifs_put_link(struct dentry *direntry, struct nameidata *nd)
+void cifs_put_link(struct dentry *direntry, struct nameidata *nd, void *cookie)
 {
char *p = nd_get_link(nd);
if (!IS_ERR(p))
diff --git a/fs/ext2/symlink.c b/fs/ext2/symlink.c
--- a/fs/ext2/symlink.c
+++ b/fs/ext2/symlink.c
@@ -21,11 +21,11 @@
 #include "xattr.h"
 #include 
 
-static int ext2_follow_link(struct dentry *dentry, struct nameidata *nd)
+static void *ext2_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
struct ext2_inode_info *ei = EXT2_I(dentry->d_inode);
nd_set_link(nd, (char *)ei->i_data);
-   return 0;
+   return NULL;
 }
 
 struct inode_operations ext2_symlink_inode_operations = {
diff --git a/fs/ext3/symlink.c b/fs/ext3/symlink.c
--- a/fs/ext3/symlink.c
+++ b/fs/ext3/symlink.c
@@ -23,11 +23,11 @@
 #include 
 #include "xattr.h"
 
-static int ext3_follow_link(struct dentry *dentry, struct nameidata *nd)
+static void * ext3_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
struct ext3_inode_info *ei = EXT3_I(dentry->d_inode);
nd_set_link(nd, (char*)ei->i_data);
-   return 0;
+   return NULL;
 }
 
 struct inode_operations ext3_symlink_inode_operations = {
diff --git a/fs/namei.c b/fs/namei.c
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -501,6 +501,7 @@ struct path {
 static inline int __do_follow_link(struct path *path, struct nameidata *nd)
 {
int error;
+   void *cookie;
struct dentry *dentry = path->dentry;
 
touch_atime(path->mnt, dentry);
@@ -508,13 +509,15 @@ static inline int __do_follow_link(struc
 
if (path->mnt == 

[SPARC]: Deal with glibc changing macro names in modpost.c

2005-08-19 Thread Linux Kernel Mailing List
tree 6e61cf51aae72b81e3667e093893265c86febccc
parent 91aa9fb573fcc50bc74d5ee64c7e9b36131f1804
author Ben Colline <[EMAIL PROTECTED]> Sat, 20 Aug 2005 03:44:57 -0700
committer David S. Miller <[EMAIL PROTECTED]> Sat, 20 Aug 2005 03:44:57 -0700

[SPARC]: Deal with glibc changing macro names in modpost.c

GLIBC 2.3.4 and later changed the STT_REGISTER macro to
STT_SPARC_REGISTER, so we need to cope with that somehow.

Original patch from fabbione, reposted by Ben Collins.

Signed-off-by: David S. Miller <[EMAIL PROTECTED]>

 scripts/mod/modpost.c |9 +++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -359,11 +359,16 @@ handle_modversions(struct module *mod, s
/* ignore __this_module, it will be resolved shortly */
if (strcmp(symname, MODULE_SYMBOL_PREFIX "__this_module") == 0)
break;
-#ifdef STT_REGISTER
+/* cope with newer glibc (2.3.4 or higher) STT_ definition in elf.h */
+#if defined(STT_REGISTER) || defined(STT_SPARC_REGISTER)
+/* add compatibility with older glibc */
+#ifndef STT_SPARC_REGISTER
+#define STT_SPARC_REGISTER STT_REGISTER
+#endif
if (info->hdr->e_machine == EM_SPARC ||
info->hdr->e_machine == EM_SPARCV9) {
/* Ignore register directives. */
-   if (ELF_ST_TYPE(sym->st_info) == STT_REGISTER)
+   if (ELF_ST_TYPE(sym->st_info) == STT_SPARC_REGISTER)
break;
}
 #endif
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html