[PATCH] arch/i386/kernel/smpboot.c: remove unneeded ifdef

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=24d34dc56449a322d8140d497440d3c1bea49618
Commit: 24d34dc56449a322d8140d497440d3c1bea49618
Parent: 445722f97a0ecd3aed3f53d9f0dcaacaef8c6223
Author: Andrew Morton [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:33:40 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:46 2006 -0800

[PATCH] arch/i386/kernel/smpboot.c: remove unneeded ifdef

#ifdef CONFIG_SMP in a file which isn't compiled in non-SMP kernels.

Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/i386/kernel/smpboot.c |2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c
index b0f84e5..aef39be 100644
--- a/arch/i386/kernel/smpboot.c
+++ b/arch/i386/kernel/smpboot.c
@@ -69,9 +69,7 @@ static int __devinitdata smp_b_stepping;
 
 /* Number of siblings per CPU package */
 int smp_num_siblings = 1;
-#ifdef CONFIG_SMP
 EXPORT_SYMBOL(smp_num_siblings);
-#endif
 
 /* Last level cache ID of each logical CPU */
 int cpu_llc_id[NR_CPUS] __cpuinitdata = {[0 ... NR_CPUS-1] = BAD_APICID};
-
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] KVM: Put KVM in a new Virtualization menu

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fd24dc4af6387d820159e3affdfb1e9d3bdce1f8
Commit: fd24dc4af6387d820159e3affdfb1e9d3bdce1f8
Parent: 3b3be0d1cc8a56468e0cb35ab3895f265d8e5cc6
Author: Avi Kivity [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:33:44 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:46 2006 -0800

[PATCH] KVM: Put KVM in a new Virtualization menu

Instead of in the main drivers menu.

Signed-off-by: Avi Kivity [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/kvm/Kconfig |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/kvm/Kconfig b/drivers/kvm/Kconfig
index 36412e9..703cc88 100644
--- a/drivers/kvm/Kconfig
+++ b/drivers/kvm/Kconfig
@@ -1,6 +1,8 @@
 #
 # KVM configuration
 #
+menu Virtualization
+
 config KVM
tristate Kernel-based Virtual Machine (KVM) support
depends on X86  EXPERIMENTAL
@@ -31,3 +33,5 @@ config KVM_AMD
---help---
  Provides support for KVM on AMD processors equipped with the AMD-V
  (SVM) extensions.
+
+endmenu
-
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] KVM: Clean up AMD SVM debug registers load and unload

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5aff458e9c90df55d6badabd89a1a063a80d9768
Commit: 5aff458e9c90df55d6badabd89a1a063a80d9768
Parent: fd24dc4af6387d820159e3affdfb1e9d3bdce1f8
Author: Avi Kivity [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:33:45 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:46 2006 -0800

[PATCH] KVM: Clean up AMD SVM debug registers load and unload

By letting gcc choose the temporary register for us, we lose arch dependency
and some ugliness.  Conceivably gcc will also generate marginally better 
code.

Signed-off-by: Avi Kivity [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/kvm/svm.c |   51 ---
 1 files changed, 8 insertions(+), 43 deletions(-)

diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c
index a33a89c..d6042ee 100644
--- a/drivers/kvm/svm.c
+++ b/drivers/kvm/svm.c
@@ -1345,53 +1345,18 @@ static void kvm_reput_irq(struct kvm_vcpu *vcpu)
 
 static void save_db_regs(unsigned long *db_regs)
 {
-#ifdef __x86_64__
-   asm (mov %%dr0, %%rax \n\t
-mov %%rax, %[dr0] \n\t
-mov %%dr1, %%rax \n\t
-mov %%rax, %[dr1] \n\t
-mov %%dr2, %%rax \n\t
-mov %%rax, %[dr2] \n\t
-mov %%dr3, %%rax \n\t
-mov %%rax, %[dr3] \n\t
-: [dr0] =m(db_regs[0]),
-  [dr1] =m(db_regs[1]),
-  [dr2] =m(db_regs[2]),
-  [dr3] =m(db_regs[3])
-: : rax);
-#else
-   asm (mov %%dr0, %%eax \n\t
-mov %%eax, %[dr0] \n\t
-mov %%dr1, %%eax \n\t
-mov %%eax, %[dr1] \n\t
-mov %%dr2, %%eax \n\t
-mov %%eax, %[dr2] \n\t
-mov %%dr3, %%eax \n\t
-mov %%eax, %[dr3] \n\t
-: [dr0] =m(db_regs[0]),
-  [dr1] =m(db_regs[1]),
-  [dr2] =m(db_regs[2]),
-  [dr3] =m(db_regs[3])
-: : eax);
-#endif
+   asm volatile (mov %%dr0, %0 : =r(db_regs[0]));
+   asm volatile (mov %%dr1, %0 : =r(db_regs[1]));
+   asm volatile (mov %%dr2, %0 : =r(db_regs[2]));
+   asm volatile (mov %%dr3, %0 : =r(db_regs[3]));
 }
 
 static void load_db_regs(unsigned long *db_regs)
 {
-   asm volatile (mov %[dr0], %%dr0 \n\t
-mov %[dr1], %%dr1 \n\t
-mov %[dr2], %%dr2 \n\t
-mov %[dr3], %%dr3 \n\t
-:
-: [dr0] r(db_regs[0]),
-  [dr1] r(db_regs[1]),
-  [dr2] r(db_regs[2]),
-  [dr3] r(db_regs[3])
-#ifdef __x86_64__
-: rax);
-#else
-: eax);
-#endif
+   asm volatile (mov %0, %%dr0 : : r(db_regs[0]));
+   asm volatile (mov %0, %%dr1 : : r(db_regs[1]));
+   asm volatile (mov %0, %%dr2 : : r(db_regs[2]));
+   asm volatile (mov %0, %%dr3 : : r(db_regs[3]));
 }
 
 static int svm_vcpu_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
-
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] another build fix, header rearrangements (OSK)

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ffd22b8e08fb86692d316cdcc1a4da4d10a016c5
Commit: ffd22b8e08fb86692d316cdcc1a4da4d10a016c5
Parent: 8c1bc04e793a7ff4004180aa42890c3d382ec87f
Author: David Brownell [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:33:49 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:46 2006 -0800

[PATCH] another build fix, header rearrangements (OSK)

Some of the header file rearrangements broke the build for board-osk.

Signed-off-by: David Brownell [EMAIL PROTECTED]
Cc: Russell King [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/arm/mach-omap1/board-osk.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c
index 3a62280..7d0cf7a 100644
--- a/arch/arm/mach-omap1/board-osk.c
+++ b/arch/arm/mach-omap1/board-osk.c
@@ -30,6 +30,7 @@
 #include linux/init.h
 #include linux/platform_device.h
 #include linux/irq.h
+#include linux/interrupt.h
 
 #include linux/mtd/mtd.h
 #include linux/mtd/partitions.h
-
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] Pass vma argument to copy_user_highpage().

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9de455b20705f36384a711d4a20bcf7ba1ab180b
Commit: 9de455b20705f36384a711d4a20bcf7ba1ab180b
Parent: 77fff4ae2b7bba6d66a8287d9ab948e2b6c16145
Author: Atsushi Nemoto [EMAIL PROTECTED]
AuthorDate: Tue Dec 12 17:14:55 2006 +
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:27:08 2006 -0800

[PATCH] Pass vma argument to copy_user_highpage().

To allow a more effective copy_user_highpage() on certain architectures,
a vma argument is added to the function and cow_user_page() allowing
the implementation of these functions to check for the VM_EXEC bit.

The main part of this patch was originally written by Ralf Baechle;
Atushi Nemoto did the the debugging.

Signed-off-by: Atsushi Nemoto [EMAIL PROTECTED]
Signed-off-by: Ralf Baechle [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 include/linux/highmem.h |3 ++-
 mm/hugetlb.c|6 +++---
 mm/memory.c |   10 +-
 3 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/include/linux/highmem.h b/include/linux/highmem.h
index ea5780b..ca9a602 100644
--- a/include/linux/highmem.h
+++ b/include/linux/highmem.h
@@ -98,7 +98,8 @@ static inline void memclear_highpage_flush(struct page *page, 
unsigned int offse
 
 #ifndef __HAVE_ARCH_COPY_USER_HIGHPAGE
 
-static inline void copy_user_highpage(struct page *to, struct page *from, 
unsigned long vaddr)
+static inline void copy_user_highpage(struct page *to, struct page *from,
+   unsigned long vaddr, struct vm_area_struct *vma)
 {
char *vfrom, *vto;
 
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 089092d..cb362f7 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -44,14 +44,14 @@ static void clear_huge_page(struct page *page, unsigned 
long addr)
 }
 
 static void copy_huge_page(struct page *dst, struct page *src,
-  unsigned long addr)
+  unsigned long addr, struct vm_area_struct *vma)
 {
int i;
 
might_sleep();
for (i = 0; i  HPAGE_SIZE/PAGE_SIZE; i++) {
cond_resched();
-   copy_user_highpage(dst + i, src + i, addr + i*PAGE_SIZE);
+   copy_user_highpage(dst + i, src + i, addr + i*PAGE_SIZE, vma);
}
 }
 
@@ -442,7 +442,7 @@ static int hugetlb_cow(struct mm_struct *mm, struct 
vm_area_struct *vma,
}
 
spin_unlock(mm-page_table_lock);
-   copy_huge_page(new_page, old_page, address);
+   copy_huge_page(new_page, old_page, address, vma);
spin_lock(mm-page_table_lock);
 
ptep = huge_pte_offset(mm, address  HPAGE_MASK);
diff --git a/mm/memory.c b/mm/memory.c
index bf61002..c00bac6 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -1441,7 +1441,7 @@ static inline pte_t maybe_mkwrite(pte_t pte, struct 
vm_area_struct *vma)
return pte;
 }
 
-static inline void cow_user_page(struct page *dst, struct page *src, unsigned 
long va)
+static inline void cow_user_page(struct page *dst, struct page *src, unsigned 
long va, struct vm_area_struct *vma)
 {
/*
 * If the source page was a PFN mapping, we don't have
@@ -1464,9 +1464,9 @@ static inline void cow_user_page(struct page *dst, struct 
page *src, unsigned lo
kunmap_atomic(kaddr, KM_USER0);
flush_dcache_page(dst);
return;
-   
+
}
-   copy_user_highpage(dst, src, va);
+   copy_user_highpage(dst, src, va, vma);
 }
 
 /*
@@ -1577,7 +1577,7 @@ gotten:
new_page = alloc_page_vma(GFP_HIGHUSER, vma, address);
if (!new_page)
goto oom;
-   cow_user_page(new_page, old_page, address);
+   cow_user_page(new_page, old_page, address, vma);
}
 
/*
@@ -2200,7 +2200,7 @@ retry:
page = alloc_page_vma(GFP_HIGHUSER, vma, address);
if (!page)
goto oom;
-   copy_user_highpage(page, new_page, address);
+   copy_user_highpage(page, new_page, address, vma);
page_cache_release(new_page);
new_page = page;
anon = 1;
-
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] ide: HPT3xxN clocking fixes

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=836c0063c74cc088ffe370d007e1c6cac95e7caa
Commit: 836c0063c74cc088ffe370d007e1c6cac95e7caa
Parent: cd7175edf963a92b2c3cd491d3e34afd357e7284
Author: Sergei Shtylyov [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:35:47 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:55 2006 -0800

[PATCH] ide: HPT3xxN clocking fixes

Fix serious problems with the HPT372N clock turnaround code:

- the wrong ports were written to when called for the secondary channel;

- it didn't serialize access to the channels;

- turnaround shou;dn't be done on 66 MHz PCI;

- caching the clock mode per-channel caused it to get out of sync with the
  actual register value.

Additionally, avoid calibrating PLL twice (for each channel) as the second 
try
results in a wrong PCI frequency and thus in the wrong timings.

Make the driver deal with HPT302N and HPT371N correctly -- the clocking and
(seemingly) a need for clock tunaround is the same as for HPT372N.  HPT371/N
chips have only one, secondary channel, so avoid touching their pure 
virtual
primary channel, and disable it if the BIOS haven't done this already.

Also, while at it, disable UltraATA/133 for HPT372 by default -- 50 MHz DPLL
clock don't allow for this speed anyway.  And remove the traces of the 
former
bad patch that wasn't even applicable to this version of driver.

Has been tested on HPT370/371N, unfortunately I don't have an instant access
to the other chips...

Signed-off-by: Sergei Shtylyov [EMAIL PROTECTED]
Cc: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
Cc: Alan Cox [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/ide/pci/hpt366.c |  223 -
 1 files changed, 139 insertions(+), 84 deletions(-)

diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c
index e993a51..7534171 100644
--- a/drivers/ide/pci/hpt366.c
+++ b/drivers/ide/pci/hpt366.c
@@ -4,6 +4,7 @@
  * Copyright (C) 1999-2003 Andre Hedrick [EMAIL PROTECTED]
  * Portions Copyright (C) 2001 Sun Microsystems, Inc.
  * Portions Copyright (C) 2003 Red Hat Inc
+ * Portions Copyright (C) 2005-2006MontaVista Software, Inc.
  *
  * Thanks to HighPoint Technologies for their assistance, and hardware.
  * Special Thanks to Jon Burchmore in SanDiego for the deep pockets, his
@@ -11,9 +12,11 @@
  * development and support.
  *
  *
- * Highpoint have their own driver (source except for the raid part)
- * available from http://www.highpoint-tech.com/hpt3xx-opensource-v131.tgz
- * This may be useful to anyone wanting to work on the mainstream hpt IDE.
+ * HighPoint has its own drivers (open source except for the RAID part)
+ * available from http://www.highpoint-tech.com/BIOS%20+%20Driver/.
+ * This may be useful to anyone wanting to work on this driver, however  do not
+ * trust  them too much since the code tends to become less and less meaningful
+ * as the time passes... :-/
  *
  * Note that final HPT370 support was done by force extraction of GPL.
  *
@@ -52,6 +55,20 @@
  * keeping me sane. 
  * Alan Cox [EMAIL PROTECTED]
  *
+ * - fix the clock turnaround code: it was writing to the wrong ports when
+ *   called for the secondary channel, caching the current clock mode per-
+ *   channel caused the cached register value to get out of sync with the
+ *   actual one, the channels weren't serialized, the turnaround shouldn't
+ *   be done on 66 MHz PCI bus
+ * - avoid calibrating PLL twice as the second time results in a wrong PCI
+ *   frequency and thus in the wrong timings for the secondary channel
+ * - disable UltraATA/133 for HPT372 by default (50 MHz DPLL clock do not
+ *   allow for this speed anyway)
+ * - add support for HPT302N and HPT371N clocking (the same as for HPT372N)
+ * - HPT371/N are single channel chips, so avoid touching the primary channel
+ *   which exists only virtually (there's no pins for it)
+ * [EMAIL PROTECTED]
+ *
  */
 
 
@@ -76,8 +93,8 @@
 
 /* various tuning parameters */
 #define HPT_RESET_STATE_ENGINE
-#undef HPT_DELAY_INTERRUPT
-#undef HPT_SERIALIZE_IO
+#undef HPT_DELAY_INTERRUPT
+#define HPT_SERIALIZE_IO   0
 
 static const char *quirk_drives[] = {
QUANTUM FIREBALLlct08 08,
@@ -439,7 +456,7 @@ static struct chipset_bus_clock_list_entry 
sixty_six_base_hpt374[] = {
 #define HPT374_ALLOW_ATA133_6  0
 #define HPT371_ALLOW_ATA133_6  0
 #define HPT302_ALLOW_ATA133_6  0
-#define HPT372_ALLOW_ATA133_6  1
+#define HPT372_ALLOW_ATA133_6  0
 #define HPT370_ALLOW_ATA100_5  1
 #define HPT366_ALLOW_ATA66_4   1
 #define HPT366_ALLOW_ATA66_3   1
@@ -461,7 +478,8 @@ struct hpt_info

[PATCH] lockdep: improve verbose messages

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=81fc685a898f84d0787eeebb1c118de0bd3484a0
Commit: 81fc685a898f84d0787eeebb1c118de0bd3484a0
Parent: a664089741aa9010333ecbdadbf5d9de62bafa2d
Author: Ingo Molnar [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:34:40 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:50 2006 -0800

[PATCH] lockdep: improve verbose messages

Make verbose lockdep messages (off by default) more informative by printing
out the hash chain key.  (this patch was what helped me catch the earlier
lockdep hash-collision bug)

Signed-off-by: Ingo Molnar [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 kernel/lockdep.c |8 ++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/kernel/lockdep.c b/kernel/lockdep.c
index 5d69c7d..5ba2825 100644
--- a/kernel/lockdep.c
+++ b/kernel/lockdep.c
@@ -1264,7 +1264,7 @@ out_unlock_set:
  * add it and return 0 - in this case the new dependency chain is
  * validated. If the key is already hashed, return 1.
  */
-static inline int lookup_chain_cache(u64 chain_key)
+static inline int lookup_chain_cache(u64 chain_key, struct lock_class *class)
 {
struct list_head *hash_head = chainhashentry(chain_key);
struct lock_chain *chain;
@@ -1286,9 +1286,13 @@ cache_hit:
__raw_spin_lock(hash_lock);
return 1;
 #endif
+   if (very_verbose(class))
+   printk(\nhash chain already cached, key: 
%016Lx tail class: [%p] %s\n, chain_key, class-key, class-name);
return 0;
}
}
+   if (very_verbose(class))
+   printk(\nnew hash chain, key: %016Lx tail class: [%p] %s\n, 
chain_key, class-key, class-name);
/*
 * Allocate a new chain entry from the static array, and add
 * it to the hash:
@@ -2139,7 +2143,7 @@ out_calc_hash:
 * (If lookup_chain_cache() returns with 1 it acquires
 * hash_lock for us)
 */
-   if (!trylock  (check == 2)  lookup_chain_cache(chain_key)) {
+   if (!trylock  (check == 2)  lookup_chain_cache(chain_key, class)) {
/*
 * Check whether last held lock:
 *
-
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] appldata_mem dependes on vm counters

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=62fb2ba3d870305e246c6cb317609c1dc2c9dd0b
Commit: 62fb2ba3d870305e246c6cb317609c1dc2c9dd0b
Parent: 3b4709a6cd0578d129d032a5dec9dc2684b71b3a
Author: Al Viro [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:34:59 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:52 2006 -0800

[PATCH] appldata_mem dependes on vm counters

Signed-off-by: Al Viro [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/s390/Kconfig |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index ff69056..1227236 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -407,7 +407,7 @@ config APPLDATA_BASE
 
 config APPLDATA_MEM
tristate Monitor memory management statistics
-   depends on APPLDATA_BASE
+   depends on APPLDATA_BASE  VM_EVENT_COUNTERS
help
  This provides memory management related data to the Linux - VM Monitor
  Stream, like paging/swapping rate, memory utilisation, etc.
-
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] relative atime

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=47ae32d6a54955a041cdc30b06d0bb16e75f68d5
Commit: 47ae32d6a54955a041cdc30b06d0bb16e75f68d5
Parent: b227613841d4d211a10c5860acc73e133b613bc0
Author: Valerie Henson [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:34:34 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:50 2006 -0800

[PATCH] relative atime

Add relatime (relative atime) support.  Relative atime only updates the
atime if the previous atime is older than the mtime or ctime.  Like
noatime, but useful for applications like mutt that need to know when a
file has been read since it was last modified.

A corresponding patch against mount(8) is available at
http://userweb.kernel.org/~akpm/mount-relative-atime.txt

Signed-off-by: Valerie Henson [EMAIL PROTECTED]
Cc: Mark Fasheh [EMAIL PROTECTED]
Cc: Al Viro [EMAIL PROTECTED]
Cc: Christoph Hellwig [EMAIL PROTECTED]
Cc: Karel Zak [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 fs/inode.c|   22 ++
 fs/namespace.c|5 -
 include/linux/fs.h|1 +
 include/linux/mount.h |1 +
 4 files changed, 24 insertions(+), 5 deletions(-)

diff --git a/fs/inode.c b/fs/inode.c
index 04536eb..bf21dc6 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1177,13 +1177,27 @@ void touch_atime(struct vfsmount *mnt, struct dentry 
*dentry)
return;
if ((mnt-mnt_flags  MNT_NODIRATIME)  S_ISDIR(inode-i_mode))
return;
+
+   if (mnt-mnt_flags  MNT_RELATIME) {
+   /*
+* With relative atime, only update atime if the
+* previous atime is earlier than either the ctime or
+* mtime.
+*/
+   if (timespec_compare(inode-i_mtime,
+   inode-i_atime)  0 
+   timespec_compare(inode-i_ctime,
+   inode-i_atime)  0)
+   return;
+   }
}
 
now = current_fs_time(inode-i_sb);
-   if (!timespec_equal(inode-i_atime, now)) {
-   inode-i_atime = now;
-   mark_inode_dirty_sync(inode);
-   }
+   if (timespec_equal(inode-i_atime, now))
+   return;
+
+   inode-i_atime = now;
+   mark_inode_dirty_sync(inode);
 }
 EXPORT_SYMBOL(touch_atime);
 
diff --git a/fs/namespace.c b/fs/namespace.c
index fde8553..5ef336c 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -368,6 +368,7 @@ static int show_vfsmnt(struct seq_file *m, void *v)
{ MNT_NOEXEC, ,noexec },
{ MNT_NOATIME, ,noatime },
{ MNT_NODIRATIME, ,nodiratime },
+   { MNT_RELATIME, ,relatime },
{ 0, NULL }
};
struct proc_fs_info *fs_infop;
@@ -1405,9 +1406,11 @@ long do_mount(char *dev_name, char *dir_name, char 
*type_page,
mnt_flags |= MNT_NOATIME;
if (flags  MS_NODIRATIME)
mnt_flags |= MNT_NODIRATIME;
+   if (flags  MS_RELATIME)
+   mnt_flags |= MNT_RELATIME;
 
flags = ~(MS_NOSUID | MS_NOEXEC | MS_NODEV | MS_ACTIVE |
-  MS_NOATIME | MS_NODIRATIME);
+  MS_NOATIME | MS_NODIRATIME | MS_RELATIME);
 
/* ... and get the mountpoint */
retval = path_lookup(dir_name, LOOKUP_FOLLOW, nd);
diff --git a/include/linux/fs.h b/include/linux/fs.h
index adce6e1..186da81 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -120,6 +120,7 @@ extern int dir_notify_enable;
 #define MS_PRIVATE (118) /* change to private */
 #define MS_SLAVE   (119) /* change to slave */
 #define MS_SHARED  (120) /* change to shared */
+#define MS_RELATIME(121) /* Update atime relative to mtime/ctime. */
 #define MS_ACTIVE  (130)
 #define MS_NOUSER  (131)
 
diff --git a/include/linux/mount.h b/include/linux/mount.h
index e357dc8..1b7e178 100644
--- a/include/linux/mount.h
+++ b/include/linux/mount.h
@@ -27,6 +27,7 @@ struct mnt_namespace;
 #define MNT_NOEXEC 0x04
 #define MNT_NOATIME0x08
 #define MNT_NODIRATIME 0x10
+#define MNT_RELATIME   0x20
 
 #define MNT_SHRINKABLE 0x100
 
-
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] smbfs: Make conn_pid a struct pid

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a71113da44063b587b5a4c2fc94c948a14f2bb43
Commit: a71113da44063b587b5a4c2fc94c948a14f2bb43
Parent: 3cec556a84be02bcd8755422eec61f1b9bee4e2f
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:35:10 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:53 2006 -0800

[PATCH] smbfs: Make conn_pid a struct pid

smbfs keeps track of the user space server process in conn_pid.  This 
converts
that track to use a struct pid instead of pid_t.  This keeps us safe from 
pid
wrap around issues and prepares the way for the pid namespace.

Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 fs/smbfs/inode.c  |5 +++--
 fs/smbfs/proc.c   |6 +++---
 fs/smbfs/smbiod.c |5 +++--
 include/linux/smb_fs_sb.h |2 +-
 4 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/fs/smbfs/inode.c b/fs/smbfs/inode.c
index 4af4cd7..84dfe3f 100644
--- a/fs/smbfs/inode.c
+++ b/fs/smbfs/inode.c
@@ -482,12 +482,13 @@ smb_put_super(struct super_block *sb)
smb_close_socket(server);
 
if (server-conn_pid)
-   kill_proc(server-conn_pid, SIGTERM, 1);
+   kill_pid(server-conn_pid, SIGTERM, 1);
 
kfree(server-ops);
smb_unload_nls(server);
sb-s_fs_info = NULL;
smb_unlock_server(server);
+   put_pid(server-conn_pid);
kfree(server);
 }
 
@@ -530,7 +531,7 @@ static int smb_fill_super(struct super_block *sb, void 
*raw_data, int silent)
INIT_LIST_HEAD(server-xmitq);
INIT_LIST_HEAD(server-recvq);
server-conn_error = 0;
-   server-conn_pid = 0;
+   server-conn_pid = NULL;
server-state = CONN_INVALID; /* no connection yet */
server-generation = 0;
 
diff --git a/fs/smbfs/proc.c b/fs/smbfs/proc.c
index a5ced9e..feac460 100644
--- a/fs/smbfs/proc.c
+++ b/fs/smbfs/proc.c
@@ -877,7 +877,7 @@ smb_newconn(struct smb_sb_info *server, struct smb_conn_opt 
*opt)
goto out_putf;
 
server-sock_file = filp;
-   server-conn_pid = current-pid;
+   server-conn_pid = get_pid(task_pid(current));
server-opt = *opt;
server-generation += 1;
server-state = CONN_VALID;
@@ -971,8 +971,8 @@ smb_newconn(struct smb_sb_info *server, struct smb_conn_opt 
*opt)
}
 
VERBOSE(protocol=%d, max_xmit=%d, pid=%d capabilities=0x%x\n,
-   server-opt.protocol, server-opt.max_xmit, server-conn_pid,
-   server-opt.capabilities);
+   server-opt.protocol, server-opt.max_xmit,
+   pid_nr(server-conn_pid), server-opt.capabilities);
 
/* FIXME: this really should be done by smbmount. */
if (server-opt.max_xmit  SMB_MAX_PACKET_SIZE) {
diff --git a/fs/smbfs/smbiod.c b/fs/smbfs/smbiod.c
index e675404..89eaf31 100644
--- a/fs/smbfs/smbiod.c
+++ b/fs/smbfs/smbiod.c
@@ -152,7 +152,7 @@ int smbiod_retry(struct smb_sb_info *server)
 {
struct list_head *head;
struct smb_request *req;
-   pid_t pid = server-conn_pid;
+   struct pid *pid = get_pid(server-conn_pid);
int result = 0;
 
VERBOSE(state: %d\n, server-state);
@@ -222,7 +222,7 @@ int smbiod_retry(struct smb_sb_info *server)
/*
 * Note: use the priv flag, as a user process may need to reconnect.
 */
-   result = kill_proc(pid, SIGUSR1, 1);
+   result = kill_pid(pid, SIGUSR1, 1);
if (result) {
/* FIXME: this is most likely fatal, umount? */
printk(KERN_ERR smb_retry: signal failed [%d]\n, result);
@@ -233,6 +233,7 @@ int smbiod_retry(struct smb_sb_info *server)
/* FIXME: The retried requests should perhaps get a time boost. */
 
 out:
+   put_pid(pid);
return result;
 }
 
diff --git a/include/linux/smb_fs_sb.h b/include/linux/smb_fs_sb.h
index 5b4ae2c..3aa97aa 100644
--- a/include/linux/smb_fs_sb.h
+++ b/include/linux/smb_fs_sb.h
@@ -55,7 +55,7 @@ struct smb_sb_info {
 * generation is incremented.
 */
unsigned int generation;
-   pid_t conn_pid;
+   struct pid *conn_pid;
struct smb_conn_opt opt;
wait_queue_head_t conn_wq;
int conn_complete;
-
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] ide: HPT3xx: fix PCI clock detection

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=26c068daf089aa21844236c97d05049b9497cc0a
Commit: 26c068daf089aa21844236c97d05049b9497cc0a
Parent: 73d1dd93c462b52512685fe118159eafc7eb9f7e
Author: Sergei Shtylyov [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:35:52 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:55 2006 -0800

[PATCH] ide: HPT3xx: fix PCI clock detection

Use the f_CNT value saved by the HighPoint BIOS if available as reading it
directly would give us a wrong PCI frequency after DPLL has already been
calibrated by BIOS.

Signed-off-by: Sergei Shtylyov [EMAIL PROTECTED]
Cc: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
Cc: Alan Cox [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/ide/pci/hpt366.c |   46 --
 1 files changed, 32 insertions(+), 14 deletions(-)

diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c
index 4968b16..9fd5080 100644
--- a/drivers/ide/pci/hpt366.c
+++ b/drivers/ide/pci/hpt366.c
@@ -70,6 +70,8 @@
  * - fix/remove bad/unused timing tables and use one set of tables for the 
whole
  *   HPT37x chip family; save space by introducing the separate transfer mode
  *   table in which the mode lookup is done
+ * - use f_CNT value saved by  the HighPoint BIOS as reading it directly gives
+ *   the wrong PCI frequency since DPLL has already been calibrated by BIOS
  * - fix the hotswap code:  it caused RESET- to glitch when tristating the bus,
  *   and for HPT36x the obsolete HDIO_TRISTATE_HWIF handler was called instead
  * - pass to init_chipset() handlers a copy of the IDE PCI device structure as
@@ -1010,8 +1012,8 @@ static void __devinit hpt37x_clocking(ide_hwif_t *hwif)
struct hpt_info *info = ide_get_hwifdata(hwif);
struct pci_dev *dev = hwif-pci_dev;
int adjust, i;
-   u16 freq;
-   u32 pll;
+   u16 freq = 0;
+   u32 pll, temp = 0;
u8 reg5bh = 0, mcr1 = 0;

/*
@@ -1025,15 +1027,34 @@ static void __devinit hpt37x_clocking(ide_hwif_t *hwif)
pci_write_config_byte(dev, 0x5b, 0x23);
 
/*
-* set up the PLL. we need to adjust it so that it's stable. 
-* freq = Tpll * 192 / Tpci
+* We'll have to read f_CNT value in order to determine
+* the PCI clock frequency according to the following ratio:
 *
-* Todo. For non x86 should probably check the dword is
-* set to 0xABCDExxx indicating the BIOS saved f_CNT
+* f_CNT = Fpci * 192 / Fdpll
+*
+* First try reading the register in which the HighPoint BIOS
+* saves f_CNT value before  reprogramming the DPLL from its
+* default setting (which differs for the various chips).
+* In case the signature check fails, we'll have to resort to
+* reading the f_CNT register itself in hopes that nobody has
+* touched the DPLL yet...
 */
-   pci_read_config_word(dev, 0x78, freq);
-   freq = 0x1FF;
-   
+   pci_read_config_dword(dev, 0x70, temp);
+   if ((temp  0xF000) != 0xABCDE000) {
+   int i;
+
+   printk(KERN_WARNING HPT37X: no clock data saved by BIOS\n);
+
+   /* Calculate the average value of f_CNT */
+   for (temp = i = 0; i  128; i++) {
+   pci_read_config_word(dev, 0x78, freq);
+   temp += freq  0x1ff;
+   mdelay(1);
+   }
+   freq = temp / 128;
+   } else
+   freq = temp  0x1ff;
+
/*
 * HPT3xxN chips use different PCI clock information.
 * Currently we always set up the PLL for them.
@@ -1095,11 +1116,8 @@ static void __devinit hpt37x_clocking(ide_hwif_t *hwif)
info-flags |= PLL_MODE;

/*
-* FIXME: make this work correctly, esp with 372N as per
-* reference driver code.
-*
-* adjust PLL based upon PCI clock, enable it, and wait for
-* stabilization.
+* Adjust the PLL based upon the PCI clock, enable it, and
+* wait for stabilization...
 */
adjust = 0;
freq = (pll  F_LOW_PCI_50) ? 2 : 4;
-
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] HPT37x: read f_CNT saved by BIOS from port

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f13c152684a7f99ead26525270ed3e28a1d2467f
Commit: f13c152684a7f99ead26525270ed3e28a1d2467f
Parent: 26c068daf089aa21844236c97d05049b9497cc0a
Author: Sergei Shtylyov [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:35:53 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:55 2006 -0800

[PATCH] HPT37x: read f_CNT saved by BIOS from port

The undocumented register BIOS uses for saving f_CNT seems to only be
mapped to I/O space while all the other HPT3xx regs are dual-mapped.  Looks
like another HighPoint's dirty trick.  With this patch, the deadly kernel
oops on the cards having the modern HighPoint BIOSes is now at last gone!

Signed-off-by: Sergei Shtylyov [EMAIL PROTECTED]
Cc: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
Cc: Alan Cox [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/ide/pci/hpt366.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c
index 9fd5080..08119da 100644
--- a/drivers/ide/pci/hpt366.c
+++ b/drivers/ide/pci/hpt366.c
@@ -1035,14 +1035,14 @@ static void __devinit hpt37x_clocking(ide_hwif_t *hwif)
 * First try reading the register in which the HighPoint BIOS
 * saves f_CNT value before  reprogramming the DPLL from its
 * default setting (which differs for the various chips).
+* NOTE: This register is only accessible via I/O space.
+*
 * In case the signature check fails, we'll have to resort to
 * reading the f_CNT register itself in hopes that nobody has
 * touched the DPLL yet...
 */
-   pci_read_config_dword(dev, 0x70, temp);
+   temp = inl(pci_resource_start(dev, 4) + 0x90);
if ((temp  0xF000) != 0xABCDE000) {
-   int i;
-
printk(KERN_WARNING HPT37X: no clock data saved by BIOS\n);
 
/* Calculate the average value of f_CNT */
-
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] knfsd: nfsd4: remove a dprink from nfsd4_lock

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=451c11a161168fbdbba17573d4b062fdd2a4c2c4
Commit: 451c11a161168fbdbba17573d4b062fdd2a4c2c4
Parent: b21a323710e77a27b2f66af901bd3640c30aba6e
Author: J.Bruce Fields [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:35:18 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:53 2006 -0800

[PATCH] knfsd: nfsd4: remove a dprink from nfsd4_lock

This dprintk is printing the wrong error now, but it's probably an 
unnecessary
dprintk anyway; just remove it.

Signed-off-by: J. Bruce Fields [EMAIL PROTECTED]
Signed-off-by: Neil Brown [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 fs/nfsd/nfs4state.c |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index b7179bd..3936243 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -2759,7 +2759,6 @@ nfsd4_lock(struct svc_rqst *rqstp, struct svc_fh 
*current_fh, struct nfsd4_lock
conflock.fl_ops = NULL;
conflock.fl_lmops = NULL;
err = posix_lock_file_conf(filp, file_lock, conflock);
-   dprintk(NFSD: nfsd4_lock: posix_lock_file_conf status %d\n,status);
switch (-err) {
case 0: /* success! */
update_stateid(lock_stp-st_stateid);
-
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] lockdep: use chain hash on CONFIG_DEBUG_LOCKDEP too

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=27c3b23226fc649de47e4886ccbf994482f388ba
Commit: 27c3b23226fc649de47e4886ccbf994482f388ba
Parent: 33e94e960b57497fe7fd9493080210b6d87e88e6
Author: Ingo Molnar [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:34:42 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:50 2006 -0800

[PATCH] lockdep: use chain hash on CONFIG_DEBUG_LOCKDEP too

CONFIG_DEBUG_LOCKDEP is unacceptably slow because it does not utilize
the chain-hash. Turn the chain-hash back on in this case too.

Signed-off-by: Ingo Molnar [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 kernel/lockdep.c |8 
 1 files changed, 0 insertions(+), 8 deletions(-)

diff --git a/kernel/lockdep.c b/kernel/lockdep.c
index c4ffd3c..69e92c6 100644
--- a/kernel/lockdep.c
+++ b/kernel/lockdep.c
@@ -1276,14 +1276,6 @@ static inline int lookup_chain_cache(u64 chain_key, 
struct lock_class *class)
if (chain-chain_key == chain_key) {
 cache_hit:
debug_atomic_inc(chain_lookup_hits);
-   /*
-* In the debugging case, force redundant checking
-* by returning 1:
-*/
-#ifdef CONFIG_DEBUG_LOCKDEP
-   __raw_spin_lock(hash_lock);
-   return 1;
-#endif
if (very_verbose(class))
printk(\nhash chain already cached, key: 
%016Lx tail class: [%p] %s\n, chain_key, class-key, class-name);
return 0;
-
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] Propagate down request sync flag

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7749a8d423c483a51983b13acda1a4dd9c1b
Commit: 7749a8d423c483a51983b13acda1a4dd9c1b
Parent: 445722f97a0ecd3aed3f53d9f0dcaacaef8c6223
Author: Jens Axboe [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 13:02:26 2006 +0100
Committer:  Jens Axboe [EMAIL PROTECTED]
CommitDate: Wed Dec 13 13:02:26 2006 +0100

[PATCH] Propagate down request sync flag

We need to do this, otherwise the io schedulers don't get access to the
sync flag. Then they cannot tell the difference between a regular write
and an O_DIRECT write, which can cause a performance loss.

Signed-off-by: Jens Axboe [EMAIL PROTECTED]
---
 block/cfq-iosched.c |   18 --
 block/ll_rw_blk.c   |   28 
 2 files changed, 32 insertions(+), 14 deletions(-)

diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index 78c6b31..533a293 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -219,9 +219,12 @@ static int cfq_queue_empty(request_queue_t *q)
return !cfqd-busy_queues;
 }
 
-static inline pid_t cfq_queue_pid(struct task_struct *task, int rw)
+static inline pid_t cfq_queue_pid(struct task_struct *task, int rw, int 
is_sync)
 {
-   if (rw == READ || rw == WRITE_SYNC)
+   /*
+* Use the per-process queue, for read requests and syncronous writes
+*/
+   if (!(rw  REQ_RW) || is_sync)
return task-pid;
 
return CFQ_KEY_ASYNC;
@@ -473,7 +476,7 @@ static struct request *
 cfq_find_rq_fmerge(struct cfq_data *cfqd, struct bio *bio)
 {
struct task_struct *tsk = current;
-   pid_t key = cfq_queue_pid(tsk, bio_data_dir(bio));
+   pid_t key = cfq_queue_pid(tsk, bio_data_dir(bio), bio_sync(bio));
struct cfq_queue *cfqq;
 
cfqq = cfq_find_cfq_hash(cfqd, key, tsk-ioprio);
@@ -1748,6 +1751,9 @@ static int cfq_may_queue(request_queue_t *q, int rw)
struct cfq_data *cfqd = q-elevator-elevator_data;
struct task_struct *tsk = current;
struct cfq_queue *cfqq;
+   unsigned int key;
+
+   key = cfq_queue_pid(tsk, rw, rw  REQ_RW_SYNC);
 
/*
 * don't force setup of a queue from here, as a call to may_queue
@@ -1755,7 +1761,7 @@ static int cfq_may_queue(request_queue_t *q, int rw)
 * so just lookup a possibly existing queue, or return 'may queue'
 * if that fails
 */
-   cfqq = cfq_find_cfq_hash(cfqd, cfq_queue_pid(tsk, rw), tsk-ioprio);
+   cfqq = cfq_find_cfq_hash(cfqd, key, tsk-ioprio);
if (cfqq) {
cfq_init_prio_data(cfqq);
cfq_prio_boost(cfqq);
@@ -1798,10 +1804,10 @@ cfq_set_request(request_queue_t *q, struct request *rq, 
gfp_t gfp_mask)
struct task_struct *tsk = current;
struct cfq_io_context *cic;
const int rw = rq_data_dir(rq);
-   pid_t key = cfq_queue_pid(tsk, rw);
+   const int is_sync = rq_is_sync(rq);
+   pid_t key = cfq_queue_pid(tsk, rw, is_sync);
struct cfq_queue *cfqq;
unsigned long flags;
-   int is_sync = key != CFQ_KEY_ASYNC;
 
might_sleep_if(gfp_mask  __GFP_WAIT);
 
diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c
index a541b42..79807db 100644
--- a/block/ll_rw_blk.c
+++ b/block/ll_rw_blk.c
@@ -2058,15 +2058,16 @@ static void freed_request(request_queue_t *q, int rw, 
int priv)
  * Returns NULL on failure, with queue_lock held.
  * Returns !NULL on success, with queue_lock *not held*.
  */
-static struct request *get_request(request_queue_t *q, int rw, struct bio *bio,
-  gfp_t gfp_mask)
+static struct request *get_request(request_queue_t *q, int rw_flags,
+  struct bio *bio, gfp_t gfp_mask)
 {
struct request *rq = NULL;
struct request_list *rl = q-rq;
struct io_context *ioc = NULL;
+   const int rw = rw_flags  0x01;
int may_queue, priv;
 
-   may_queue = elv_may_queue(q, rw);
+   may_queue = elv_may_queue(q, rw_flags);
if (may_queue == ELV_MQUEUE_NO)
goto rq_starved;
 
@@ -2114,7 +2115,7 @@ static struct request *get_request(request_queue_t *q, 
int rw, struct bio *bio,
 
spin_unlock_irq(q-queue_lock);
 
-   rq = blk_alloc_request(q, rw, priv, gfp_mask);
+   rq = blk_alloc_request(q, rw_flags, priv, gfp_mask);
if (unlikely(!rq)) {
/*
 * Allocation failed presumably due to memory. Undo anything
@@ -2162,12 +2163,13 @@ out:
  *
  * Called with q-queue_lock held, and returns with it unlocked.
  */
-static struct request *get_request_wait(request_queue_t *q, int rw,
+static struct request *get_request_wait(request_queue_t *q, int rw_flags,
struct bio *bio)
 {
+   const int rw = rw_flags  0x01;
struct request *rq;
 
-   rq = get_request(q, rw, bio, GFP_NOIO);
+   rq = 

[PATCH] uml problems with linux/io.h

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ee36c2bf8edb1c3e3855a928b348d29c6359093d
Commit: ee36c2bf8edb1c3e3855a928b348d29c6359093d
Parent: 62fb2ba3d870305e246c6cb317609c1dc2c9dd0b
Author: Al Viro [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:35:00 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:52 2006 -0800

[PATCH] uml problems with linux/io.h

Remove useless includes of linux/io.h, don't even try to build iomap_copy
on uml (it doesn't have readb() et.al., so...)

Signed-off-by: Al Viro [EMAIL PROTECTED]
Acked-by: Jeff Dike [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 crypto/blkcipher.c |1 -
 lib/Kconfig|5 +
 lib/Makefile   |3 ++-
 lib/ioremap.c  |1 -
 4 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/crypto/blkcipher.c b/crypto/blkcipher.c
index 034c939..6e93004 100644
--- a/crypto/blkcipher.c
+++ b/crypto/blkcipher.c
@@ -17,7 +17,6 @@
 #include linux/crypto.h
 #include linux/errno.h
 #include linux/kernel.h
-#include linux/io.h
 #include linux/module.h
 #include linux/scatterlist.h
 #include linux/seq_file.h
diff --git a/lib/Kconfig b/lib/Kconfig
index 47b172d..9b03581 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -101,4 +101,9 @@ config TEXTSEARCH_FSM
 config PLIST
boolean
 
+config IOMAP_COPY
+   boolean
+   depends on !UML
+   default y
+
 endmenu
diff --git a/lib/Makefile b/lib/Makefile
index c9ec8f1..77b4bad 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -12,13 +12,14 @@ lib-$(CONFIG_SMP) += cpumask.o
 
 lib-y  += kobject.o kref.o kobject_uevent.o klist.o
 
-obj-y += sort.o parser.o halfmd4.o iomap_copy.o debug_locks.o random32.o
+obj-y += sort.o parser.o halfmd4.o debug_locks.o random32.o
 
 ifeq ($(CONFIG_DEBUG_KOBJECT),y)
 CFLAGS_kobject.o += -DDEBUG
 CFLAGS_kobject_uevent.o += -DDEBUG
 endif
 
+obj-$(CONFIG_IOMAP_COPY) += iomap_copy.o
 obj-$(CONFIG_DEBUG_LOCKING_API_SELFTESTS) += locking-selftest.o
 obj-$(CONFIG_DEBUG_SPINLOCK) += spinlock_debug.o
 lib-$(CONFIG_RWSEM_GENERIC_SPINLOCK) += rwsem-spinlock.o
diff --git a/lib/ioremap.c b/lib/ioremap.c
index 99fa277..a9e4415 100644
--- a/lib/ioremap.c
+++ b/lib/ioremap.c
@@ -5,7 +5,6 @@
  *
  * (C) Copyright 1995 1996 Linus Torvalds
  */
-#include linux/io.h
 #include linux/vmalloc.h
 #include linux/mm.h
 
-
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] fbdev: remove references to non-existent fbmon_valid_timings()

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3161986224a3faa8ccca3e665b7404d81e7ee3cf
Commit: 3161986224a3faa8ccca3e665b7404d81e7ee3cf
Parent: f13c152684a7f99ead26525270ed3e28a1d2467f
Author: Geert Uytterhoeven [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:35:54 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:55 2006 -0800

[PATCH] fbdev: remove references to non-existent fbmon_valid_timings()

Remove references to non-existent fbmon_valid_timings()

Signed-off-by: Geert Uytterhoeven [EMAIL PROTECTED]
Cc: James Simmons [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/video/amifb.c  |8 
 drivers/video/aty/atyfb_base.c |4 
 include/linux/fb.h |2 --
 3 files changed, 0 insertions(+), 14 deletions(-)

diff --git a/drivers/video/amifb.c b/drivers/video/amifb.c
index 88a4784..1a849b8 100644
--- a/drivers/video/amifb.c
+++ b/drivers/video/amifb.c
@@ -2906,14 +2906,6 @@ static int ami_decode_var(struct fb_var_screeninfo *var,
par-crsr.spot_x = par-crsr.spot_y = 0;
par-crsr.height = par-crsr.width = 0;
 
-#if 0  /* fbmon not done.  uncomment for 2.5.x -brad */
-   if (!fbmon_valid_timings(pixclock[clk_shift], htotal, vtotal,
-fb_info)) {
-   DPRINTK(mode doesn't fit for monitor\n);
-   return -EINVAL;
-   }
-#endif
-
return 0;
 }
 
diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c
index 176f9b8..09684d7 100644
--- a/drivers/video/aty/atyfb_base.c
+++ b/drivers/video/aty/atyfb_base.c
@@ -1488,10 +1488,6 @@ static int atyfb_check_var(struct fb_var_screeninfo 
*var, struct fb_info *info)
else
info-var.accel_flags = 0;
 
-#if 0 /* fbmon is not done. uncomment for 2.5.x -brad */
-   if (!fbmon_valid_timings(pixclock, htotal, vtotal, info))
-   return -EINVAL;
-#endif
aty_crtc_to_var(crtc, var);
var-pixclock = par-pll_ops-pll_to_var(info, pll);
return 0;
diff --git a/include/linux/fb.h b/include/linux/fb.h
index 6fe56aa..64177ec 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -929,8 +929,6 @@ extern void fb_bl_default_curve(struct fb_info *fb_info, u8 
off, u8 min, u8 max)
 #define FB_MODE_IS_FIRST   16
 #define FB_MODE_IS_FROM_VAR 32
 
-extern int fbmon_valid_timings(u_int pixclock, u_int htotal, u_int vtotal,
-  const struct fb_info *fb_info);
 extern int fbmon_dpms(const struct fb_info *fb_info);
 extern int fb_get_mode(int flags, u32 val, struct fb_var_screeninfo *var,
   struct fb_info *info);
-
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


hwmon/f71805f: Add support for speed mode fan speed control

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=315c7113b5580a5f88169b62f597aacd64ef3717
Commit: 315c7113b5580a5f88169b62f597aacd64ef3717
Parent: e196783d54a75bea05580ce692126532ac54ee24
Author: Jean Delvare [EMAIL PROTECTED]
AuthorDate: Tue Dec 12 18:18:27 2006 +0100
Committer:  Jean Delvare [EMAIL PROTECTED]
CommitDate: Tue Dec 12 18:18:27 2006 +0100

hwmon/f71805f: Add support for speed mode fan speed control

In speed mode, the user specifies a target fan speed (in RPM) and the
chip automatically adjusts the PWM duty cycle (or DC output level) to
reach this target.

Signed-off-by: Jean Delvare [EMAIL PROTECTED]
---
 drivers/hwmon/f71805f.c |   50 ++-
 1 files changed, 49 insertions(+), 1 deletions(-)

diff --git a/drivers/hwmon/f71805f.c b/drivers/hwmon/f71805f.c
index 29a3984..975c1cc 100644
--- a/drivers/hwmon/f71805f.c
+++ b/drivers/hwmon/f71805f.c
@@ -111,6 +111,7 @@ superio_exit(int base)
 /* fan nr from 0 to 2 (12-bit values, two registers) */
 #define F71805F_REG_FAN(nr)(0x20 + 2 * (nr))
 #define F71805F_REG_FAN_LOW(nr)(0x28 + 2 * (nr))
+#define F71805F_REG_FAN_TARGET(nr) (0x69 + 16 * (nr))
 #define F71805F_REG_FAN_CTRL(nr)   (0x60 + 16 * (nr))
 #define F71805F_REG_PWM_FREQ(nr)   (0x63 + 16 * (nr))
 #define F71805F_REG_PWM_DUTY(nr)   (0x6B + 16 * (nr))
@@ -127,6 +128,7 @@ superio_exit(int base)
 /* individual register bits */
 #define FAN_CTRL_SKIP  0x80
 #define FAN_CTRL_DC_MODE   0x10
+#define FAN_CTRL_LATCH_FULL0x08
 #define FAN_CTRL_MODE_MASK 0x03
 #define FAN_CTRL_MODE_SPEED0x00
 #define FAN_CTRL_MODE_TEMPERATURE  0x01
@@ -153,6 +155,7 @@ struct f71805f_data {
u8 in_low[9];
u16 fan[3];
u16 fan_low[3];
+   u16 fan_target[3];
u8 fan_ctrl[3];
u8 pwm[3];
u8 pwm_freq[3];
@@ -324,6 +327,8 @@ static struct f71805f_data *f71805f_update_device(struct 
device *dev)
continue;
data-fan_low[nr] = f71805f_read16(data,
F71805F_REG_FAN_LOW(nr));
+   data-fan_target[nr] = f71805f_read16(data,
+  F71805F_REG_FAN_TARGET(nr));
data-pwm_freq[nr] = f71805f_read8(data,
 F71805F_REG_PWM_FREQ(nr));
}
@@ -510,6 +515,16 @@ static ssize_t show_fan_min(struct device *dev, struct 
device_attribute
return sprintf(buf, %ld\n, fan_from_reg(data-fan_low[nr]));
 }
 
+static ssize_t show_fan_target(struct device *dev, struct device_attribute
+  *devattr, char *buf)
+{
+   struct f71805f_data *data = f71805f_update_device(dev);
+   struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+   int nr = attr-index;
+
+   return sprintf(buf, %ld\n, fan_from_reg(data-fan_target[nr]));
+}
+
 static ssize_t set_fan_min(struct device *dev, struct device_attribute
   *devattr, const char *buf, size_t count)
 {
@@ -526,6 +541,23 @@ static ssize_t set_fan_min(struct device *dev, struct 
device_attribute
return count;
 }
 
+static ssize_t set_fan_target(struct device *dev, struct device_attribute
+ *devattr, const char *buf, size_t count)
+{
+   struct f71805f_data *data = dev_get_drvdata(dev);
+   struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+   int nr = attr-index;
+   long val = simple_strtol(buf, NULL, 10);
+
+   mutex_lock(data-update_lock);
+   data-fan_target[nr] = fan_to_reg(val);
+   f71805f_write16(data, F71805F_REG_FAN_TARGET(nr),
+   data-fan_target[nr]);
+   mutex_unlock(data-update_lock);
+
+   return count;
+}
+
 static ssize_t show_pwm(struct device *dev, struct device_attribute *devattr,
char *buf)
 {
@@ -822,12 +854,18 @@ static SENSOR_DEVICE_ATTR(in8_min, S_IRUGO | S_IWUSR,
 static SENSOR_DEVICE_ATTR(fan1_input, S_IRUGO, show_fan, NULL, 0);
 static SENSOR_DEVICE_ATTR(fan1_min, S_IRUGO | S_IWUSR,
  show_fan_min, set_fan_min, 0);
+static SENSOR_DEVICE_ATTR(fan1_target, S_IRUGO | S_IWUSR,
+ show_fan_target, set_fan_target, 0);
 static SENSOR_DEVICE_ATTR(fan2_input, S_IRUGO, show_fan, NULL, 1);
 static SENSOR_DEVICE_ATTR(fan2_min, S_IRUGO | S_IWUSR,
  show_fan_min, set_fan_min, 1);
+static SENSOR_DEVICE_ATTR(fan2_target, S_IRUGO | S_IWUSR,
+ show_fan_target, set_fan_target, 1);
 static SENSOR_DEVICE_ATTR(fan3_input, S_IRUGO, show_fan, NULL, 2);
 static SENSOR_DEVICE_ATTR(fan3_min, S_IRUGO | S_IWUSR,
  show_fan_min, set_fan_min, 2);
+static 

hwmon/f71805f: Let the user adjust the PWM base frequency

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6e2bc17b0793297b38aef1bba39f2cb634d66208
Commit: 6e2bc17b0793297b38aef1bba39f2cb634d66208
Parent: 95e353127dfcd86df56a742a96ccf56369929b95
Author: Jean Delvare [EMAIL PROTECTED]
AuthorDate: Tue Dec 12 18:18:27 2006 +0100
Committer:  Jean Delvare [EMAIL PROTECTED]
CommitDate: Tue Dec 12 18:18:27 2006 +0100

hwmon/f71805f: Let the user adjust the PWM base frequency

Different frequencies can give better results depending on the exact fan
model used.

Signed-off-by: Jean Delvare [EMAIL PROTECTED]
---
 drivers/hwmon/f71805f.c |   63 ++-
 1 files changed, 62 insertions(+), 1 deletions(-)

diff --git a/drivers/hwmon/f71805f.c b/drivers/hwmon/f71805f.c
index 6e65420..173e2d2 100644
--- a/drivers/hwmon/f71805f.c
+++ b/drivers/hwmon/f71805f.c
@@ -112,6 +112,7 @@ superio_exit(int base)
 #define F71805F_REG_FAN(nr)(0x20 + 2 * (nr))
 #define F71805F_REG_FAN_LOW(nr)(0x28 + 2 * (nr))
 #define F71805F_REG_FAN_CTRL(nr)   (0x60 + 16 * (nr))
+#define F71805F_REG_PWM_FREQ(nr)   (0x63 + 16 * (nr))
 #define F71805F_REG_PWM_DUTY(nr)   (0x6B + 16 * (nr))
 /* temp nr from 0 to 2 (8-bit values) */
 #define F71805F_REG_TEMP(nr)   (0x1B + (nr))
@@ -153,6 +154,7 @@ struct f71805f_data {
u16 fan_low[3];
u8 fan_ctrl[3];
u8 pwm[3];
+   u8 pwm_freq[3];
u8 temp[3];
u8 temp_high[3];
u8 temp_hyst[3];
@@ -209,6 +211,28 @@ static inline u16 fan_to_reg(long rpm)
return (150 / rpm);
 }
 
+static inline unsigned long pwm_freq_from_reg(u8 reg)
+{
+   unsigned long clock = (reg  0x80) ? 4800UL : 100UL;
+
+   reg = 0x7f;
+   if (reg == 0)
+   reg++;
+   return clock / (reg  8);
+}
+
+static inline u8 pwm_freq_to_reg(unsigned long val)
+{
+   if (val = 187500)  /* The highest we can do */
+   return 0x80;
+   if (val = 1475)/* Use 48 MHz clock */
+   return 0x80 | (4800UL / (val  8));
+   if (val  31)   /* The lowest we can do */
+   return 0x7f;
+   else/* Use 1 MHz clock */
+   return 100UL / (val  8);
+}
+
 static inline long temp_from_reg(u8 reg)
 {
return (reg * 1000);
@@ -294,6 +318,8 @@ static struct f71805f_data *f71805f_update_device(struct 
device *dev)
continue;
data-fan_low[nr] = f71805f_read16(data,
F71805F_REG_FAN_LOW(nr));
+   data-pwm_freq[nr] = f71805f_read8(data,
+F71805F_REG_PWM_FREQ(nr));
}
for (nr = 0; nr  3; nr++) {
data-temp_high[nr] = f71805f_read8(data,
@@ -526,6 +552,16 @@ static ssize_t show_pwm_enable(struct device *dev, struct 
device_attribute
return sprintf(buf, %d\n, mode);
 }
 
+static ssize_t show_pwm_freq(struct device *dev, struct device_attribute
+*devattr, char *buf)
+{
+   struct f71805f_data *data = f71805f_update_device(dev);
+   struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+   int nr = attr-index;
+
+   return sprintf(buf, %lu\n, pwm_freq_from_reg(data-pwm_freq[nr]));
+}
+
 static ssize_t set_pwm(struct device *dev, struct device_attribute *devattr,
   const char *buf, size_t count)
 {
@@ -592,6 +628,22 @@ static ssize_t set_pwm_enable(struct device *dev, struct 
device_attribute
return count;
 }
 
+static ssize_t set_pwm_freq(struct device *dev, struct device_attribute
+   *devattr, const char *buf, size_t count)
+{
+   struct f71805f_data *data = dev_get_drvdata(dev);
+   struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+   int nr = attr-index;
+   unsigned long val = simple_strtoul(buf, NULL, 10);
+
+   mutex_lock(data-update_lock);
+   data-pwm_freq[nr] = pwm_freq_to_reg(val);
+   f71805f_write8(data, F71805F_REG_PWM_FREQ(nr), data-pwm_freq[nr]);
+   mutex_unlock(data-update_lock);
+
+   return count;
+}
+
 static ssize_t show_temp(struct device *dev, struct device_attribute *devattr,
 char *buf)
 {
@@ -785,12 +837,18 @@ static SENSOR_DEVICE_ATTR(temp3_type, S_IRUGO, 
show_temp_type, NULL, 2);
 static SENSOR_DEVICE_ATTR(pwm1, S_IRUGO, show_pwm, set_pwm, 0);
 static SENSOR_DEVICE_ATTR(pwm1_enable, S_IRUGO | S_IWUSR,
  show_pwm_enable, set_pwm_enable, 0);
+static SENSOR_DEVICE_ATTR(pwm1_freq, S_IRUGO | S_IWUSR,
+ show_pwm_freq, set_pwm_freq, 0);
 static SENSOR_DEVICE_ATTR(pwm2, S_IRUGO, show_pwm, set_pwm, 1);
 static SENSOR_DEVICE_ATTR(pwm2_enable, S_IRUGO | S_IWUSR,
  

[PATCH] lockdep: print irq-trace info on asserts

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3117df0453828bd045c16244e6f50e5714667a8a
Commit: 3117df0453828bd045c16244e6f50e5714667a8a
Parent: 27c3b23226fc649de47e4886ccbf994482f388ba
Author: Ingo Molnar [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:34:43 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:50 2006 -0800

[PATCH] lockdep: print irq-trace info on asserts

When we print an assert due to scheduling-in-atomic bugs, and if lockdep
is enabled, then the IRQ tracing information of lockdep can be printed
to pinpoint the code location that disabled interrupts. This saved me
quite a bit of debugging time in cases where the backtrace did not
identify the irq-disabling site well enough.

Signed-off-by: Ingo Molnar [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 include/linux/lockdep.h |   16 +---
 kernel/lockdep.c|6 +-
 kernel/sched.c  |4 
 3 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h
index 498bfbd..ea097dd 100644
--- a/include/linux/lockdep.h
+++ b/include/linux/lockdep.h
@@ -281,15 +281,25 @@ struct lock_class_key { };
 #if defined(CONFIG_TRACE_IRQFLAGS)  defined(CONFIG_GENERIC_HARDIRQS)
 extern void early_init_irq_lock_class(void);
 #else
-# define early_init_irq_lock_class()   do { } while (0)
+static inline void early_init_irq_lock_class(void)
+{
+}
 #endif
 
 #ifdef CONFIG_TRACE_IRQFLAGS
 extern void early_boot_irqs_off(void);
 extern void early_boot_irqs_on(void);
+extern void print_irqtrace_events(struct task_struct *curr);
 #else
-# define early_boot_irqs_off() do { } while (0)
-# define early_boot_irqs_on()  do { } while (0)
+static inline void early_boot_irqs_off(void)
+{
+}
+static inline void early_boot_irqs_on(void)
+{
+}
+static inline void print_irqtrace_events(struct task_struct *curr)
+{
+}
 #endif
 
 /*
diff --git a/kernel/lockdep.c b/kernel/lockdep.c
index 69e92c6..07a3d74 100644
--- a/kernel/lockdep.c
+++ b/kernel/lockdep.c
@@ -1447,7 +1447,7 @@ check_usage_backwards(struct task_struct *curr, struct 
held_lock *this,
return print_irq_inversion_bug(curr, backwards_match, this, 0, 
irqclass);
 }
 
-static inline void print_irqtrace_events(struct task_struct *curr)
+void print_irqtrace_events(struct task_struct *curr)
 {
printk(irq event stamp: %u\n, curr-irq_events);
printk(hardirqs last  enabled at (%u): , curr-hardirq_enable_event);
@@ -1460,10 +1460,6 @@ static inline void print_irqtrace_events(struct 
task_struct *curr)
print_ip_sym(curr-softirq_disable_ip);
 }
 
-#else
-static inline void print_irqtrace_events(struct task_struct *curr)
-{
-}
 #endif
 
 static int
diff --git a/kernel/sched.c b/kernel/sched.c
index 8a0afb9..5cd833b 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -3429,6 +3429,8 @@ asmlinkage void __sched schedule(void)
%s/0x%08x/%d\n,
current-comm, preempt_count(), current-pid);
debug_show_held_locks(current);
+   if (irqs_disabled())
+   print_irqtrace_events(current);
dump_stack();
}
profile_hit(SCHED_PROFILING, __builtin_return_address(0));
@@ -6977,6 +6979,8 @@ void __might_sleep(char *file, int line)
printk(in_atomic():%d, irqs_disabled():%d\n,
in_atomic(), irqs_disabled());
debug_show_held_locks(current);
+   if (irqs_disabled())
+   print_irqtrace_events(current);
dump_stack();
}
 #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


[PATCH] rtc: remove syslog spam on registration

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5a6534e4cf53e16a6ea92f033f89d6575b3d7422
Commit: 5a6534e4cf53e16a6ea92f033f89d6575b3d7422
Parent: 9cef779ec3643e6c846f86a32d8c44daff16a336
Author: David Brownell [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:35:06 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:52 2006 -0800

[PATCH] rtc: remove syslog spam on registration

This removes some syslog spam as RTC drivers register; debug messages
shouldn't come out at info level.

Signed-off-by: David Brownell [EMAIL PROTECTED]
Acked-by: Alessandro Zummo [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/rtc/rtc-dev.c   |2 +-
 drivers/rtc/rtc-proc.c  |2 +-
 drivers/rtc/rtc-sysfs.c |2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/rtc/rtc-dev.c b/drivers/rtc/rtc-dev.c
index 828b329..94d3df6 100644
--- a/drivers/rtc/rtc-dev.c
+++ b/drivers/rtc/rtc-dev.c
@@ -435,7 +435,7 @@ static int rtc_dev_add_device(struct class_device 
*class_dev,
goto err_cdev_del;
}
 
-   dev_info(class_dev-dev, rtc intf: dev (%d:%d)\n,
+   dev_dbg(class_dev-dev, rtc intf: dev (%d:%d)\n,
MAJOR(rtc-rtc_dev-devt),
MINOR(rtc-rtc_dev-devt));
 
diff --git a/drivers/rtc/rtc-proc.c b/drivers/rtc/rtc-proc.c
index d51d8f2..91a43c9 100644
--- a/drivers/rtc/rtc-proc.c
+++ b/drivers/rtc/rtc-proc.c
@@ -120,7 +120,7 @@ static int rtc_proc_add_device(struct class_device 
*class_dev,
ent-owner = rtc-owner;
ent-data = class_dev;
 
-   dev_info(class_dev-dev, rtc intf: proc\n);
+   dev_dbg(class_dev-dev, rtc intf: proc\n);
}
else
rtc_dev = NULL;
diff --git a/drivers/rtc/rtc-sysfs.c b/drivers/rtc/rtc-sysfs.c
index 625637b..9418a59 100644
--- a/drivers/rtc/rtc-sysfs.c
+++ b/drivers/rtc/rtc-sysfs.c
@@ -83,7 +83,7 @@ static int __devinit rtc_sysfs_add_device(struct class_device 
*class_dev,
 {
int err;
 
-   dev_info(class_dev-dev, rtc intf: sysfs\n);
+   dev_dbg(class_dev-dev, rtc intf: sysfs\n);
 
err = sysfs_create_group(class_dev-kobj, rtc_attr_group);
if (err)
-
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 1/2] cciss: map out more memory for config table

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=98040015bc5d6cea3bd2dcb642fe1e8c4bded8e1
Commit: 98040015bc5d6cea3bd2dcb642fe1e8c4bded8e1
Parent: 7749a8d423c483a51983b13acda1a4dd9c1b
Author: [EMAIL PROTECTED] [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 13:08:56 2006 +0100
Committer:  Jens Axboe [EMAIL PROTECTED]
CommitDate: Wed Dec 13 13:08:56 2006 +0100

[PATCH 1/2] cciss: map out more memory for config table

This patch maps out more memory for our config table. It's required to reach
offset 0x214 to disable DMA on the P600. I'm not sure how I lost this hunk.
Please consider this for inclusion.

Signed-off-by: Mike Miller [EMAIL PROTECTED]
Signed-off-by: Jens Axboe [EMAIL PROTECTED]
---
 drivers/block/cciss.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index ee159ed..8879e95 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -2865,7 +2865,7 @@ static int cciss_pci_init(ctlr_info_t *c, struct pci_dev 
*pdev)
 #ifdef CCISS_DEBUG
printk(address 0 = %x\n, c-paddr);
 #endif /* CCISS_DEBUG */
-   c-vaddr = remap_pci_mem(c-paddr, 200);
+   c-vaddr = remap_pci_mem(c-paddr, 0x250);
 
/* Wait for the board to become ready.  (PCI hotplug needs this.)
 * We poll for up to 120 secs, once per 100ms. */
-
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] Use activate_mm() in fs/aio.c:use_mm()

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=90aef12e6dd609e1ad7fb70044eedc78ca55ee5e
Commit: 90aef12e6dd609e1ad7fb70044eedc78ca55ee5e
Parent: 74c383f1400f559562aa517d6d62f77245bddf52
Author: Jeremy Fitzhardinge [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:34:49 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:51 2006 -0800

[PATCH] Use activate_mm() in fs/aio.c:use_mm()

activate_mm() is not the right thing to be using in use_mm().  It should be
switch_mm().

On normal x86, they're synonymous, but for the Xen patches I'm adding a
hook which assumes that activate_mm is only used the first time a new mm
is used after creation (I have another hook for dealing with dup_mm).  I
think this use of activate_mm() is the only place where it could be used
a second time on an mm.

From a quick look at the other architectures I think this is OK (most
simply implement one in terms of the other), but some are doing some
subtly different stuff between the two.

Acked-by: David Miller [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 fs/aio.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/aio.c b/fs/aio.c
index d3a6ec2..5f577a6 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -586,7 +586,7 @@ static void use_mm(struct mm_struct *mm)
 * Note that on UML this *requires* PF_BORROWED_MM to be set, otherwise
 * it won't work. Update it accordingly if you change it here
 */
-   activate_mm(active_mm, mm);
+   switch_mm(active_mm, mm, tsk);
task_unlock(tsk);
 
mmdrop(active_mm);
-
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] CONFIG_COMPUTONE should depend on ISA|EISA|PCI

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3b4709a6cd0578d129d032a5dec9dc2684b71b3a
Commit: 3b4709a6cd0578d129d032a5dec9dc2684b71b3a
Parent: 34f8f0a5e953d3e40c4419e5e5c4b6fd14f7ebf2
Author: Al Viro [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:34:58 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:52 2006 -0800

[PATCH] CONFIG_COMPUTONE should depend on ISA|EISA|PCI

Signed-off-by: Al Viro [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/char/Kconfig |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
index 0876199..9e43e39 100644
--- a/drivers/char/Kconfig
+++ b/drivers/char/Kconfig
@@ -97,7 +97,7 @@ config SERIAL_NONSTANDARD
 
 config COMPUTONE
tristate Computone IntelliPort Plus serial support
-   depends on SERIAL_NONSTANDARD
+   depends on SERIAL_NONSTANDARD  (ISA || EISA || PCI)
---help---
  This driver supports the entire family of Intelliport II/Plus
  controllers with the exception of the MicroChannel controllers and
-
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] rtc: fx error case

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f3e92d355e1251fb6d1a15508f2a5448d2354727
Commit: f3e92d355e1251fb6d1a15508f2a5448d2354727
Parent: e8c5c045d790e7018c56f1a998a2d240b732ea3c
Author: Jan Beulich [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:35:04 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:52 2006 -0800

[PATCH] rtc: fx error case

Ensure RTC driver doesn't use its timer when it doesn't get to set it up
(as it cannot currently prevent other of its functions to be called from
outside when not built as a module - probably this should also be
addressed).

Signed-off-by: Jan Beulich [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/char/rtc.c |8 
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/drivers/char/rtc.c b/drivers/char/rtc.c
index 66a7385..2eb53be 100644
--- a/drivers/char/rtc.c
+++ b/drivers/char/rtc.c
@@ -958,6 +958,7 @@ static int __init rtc_init(void)
}
}
 #endif
+   rtc_has_irq = 0;
printk(KERN_ERR rtc_init: no PC rtc found\n);
return -EIO;
 
@@ -972,6 +973,7 @@ found:
 * PCI Slot 2 INTA# (and some INTx# in Slot 1).
 */
if (request_irq(rtc_irq, rtc_interrupt, IRQF_SHARED, rtc, (void 
*)rtc_port)) {
+   rtc_has_irq = 0;
printk(KERN_ERR rtc: cannot register IRQ %d\n, rtc_irq);
return -EIO;
}
@@ -982,6 +984,9 @@ no_irq:
else
r = request_mem_region(RTC_PORT(0), RTC_IO_EXTENT, rtc);
if (!r) {
+#ifdef RTC_IRQ
+   rtc_has_irq = 0;
+#endif
printk(KERN_ERR rtc: I/O resource %lx is not free.\n,
   (long)(RTC_PORT(0)));
return -EIO;
@@ -996,6 +1001,7 @@ no_irq:
 
if(request_irq(RTC_IRQ, rtc_int_handler_ptr, IRQF_DISABLED, rtc, 
NULL)) {
/* Yeah right, seeing as irq 8 doesn't even hit the bus. */
+   rtc_has_irq = 0;
printk(KERN_ERR rtc: IRQ %d is not free.\n, RTC_IRQ);
if (RTC_IOMAPPED)
release_region(RTC_PORT(0), RTC_IO_EXTENT);
@@ -1012,6 +1018,7 @@ no_irq:
if (misc_register(rtc_dev)) {
 #ifdef RTC_IRQ
free_irq(RTC_IRQ, NULL);
+   rtc_has_irq = 0;
 #endif
release_region(RTC_PORT(0), RTC_IO_EXTENT);
return -ENODEV;
@@ -1021,6 +1028,7 @@ no_irq:
if (!ent) {
 #ifdef RTC_IRQ
free_irq(RTC_IRQ, NULL);
+   rtc_has_irq = 0;
 #endif
release_region(RTC_PORT(0), RTC_IO_EXTENT);
misc_deregister(rtc_dev);
-
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] lockdep: clean up VERY_VERBOSE define

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=33e94e960b57497fe7fd9493080210b6d87e88e6
Commit: 33e94e960b57497fe7fd9493080210b6d87e88e6
Parent: 23d95a03d63eff25118b50737006ce6e7c1b8def
Author: Ingo Molnar [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:34:41 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:50 2006 -0800

[PATCH] lockdep: clean up VERY_VERBOSE define

Cleanup: the VERY_VERBOSE define was unnecessarily dependent on #ifdef 
VERBOSE
- while the VERBOSE switch is 0 or 1 (always defined).

Signed-off-by: Ingo Molnar [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 kernel/lockdep.c |4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/kernel/lockdep.c b/kernel/lockdep.c
index 77fa791..c4ffd3c 100644
--- a/kernel/lockdep.c
+++ b/kernel/lockdep.c
@@ -145,9 +145,7 @@ EXPORT_SYMBOL(lockdep_on);
  */
 
 #define VERBOSE0
-#ifdef VERBOSE
-# define VERY_VERBOSE  0
-#endif
+#define VERY_VERBOSE   0
 
 #if VERBOSE
 # define HARDIRQ_VERBOSE   1
-
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] reorder struct pipe_buf_operations

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6a8ba9d12150461acc91bd3c9124eac19e853218
Commit: 6a8ba9d12150461acc91bd3c9124eac19e853218
Parent: 0a0c502c94af0491ab454ad6d216c7a6fda8362b
Author: Eric Dumazet [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:34:10 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:48 2006 -0800

[PATCH] reorder struct pipe_buf_operations

Fields of struct pipe_buf_operations have not a precise layout (ie not
optimized to fit cache lines nor reduce cache line ping pongs)

The bufs[] array is *large* and is placed near the beginning of the
structure, so all following fields have a large offset.  This is
unfortunate because many archs have smaller instructions when using small
offsets relative to a base register.  On x86 for example, 7 bits offsets
have smaller instruction lengths.

Moving bufs[] at the end of pipe_buf_operations permits all fields to have
small offsets, and reduce text size, and icache pressure.

# size vmlinux.pre vmlinux
textdata bss dec hex filename
3268989  664356  492196 4425541  438745 vmlinux.pre
3268765  664356  492196 4425317  438665 vmlinux

So this patch reduces text size by 224 bytes on my x86_64 machine. Similar
results on ia32.

Signed-off-by: Eric Dumazet [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 include/linux/pipe_fs_i.h |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h
index cc902d2..2e19478 100644
--- a/include/linux/pipe_fs_i.h
+++ b/include/linux/pipe_fs_i.h
@@ -41,7 +41,6 @@ struct pipe_buf_operations {
 struct pipe_inode_info {
wait_queue_head_t wait;
unsigned int nrbufs, curbuf;
-   struct pipe_buffer bufs[PIPE_BUFFERS];
struct page *tmp_page;
unsigned int readers;
unsigned int writers;
@@ -51,6 +50,7 @@ struct pipe_inode_info {
struct fasync_struct *fasync_readers;
struct fasync_struct *fasync_writers;
struct inode *inode;
+   struct pipe_buffer bufs[PIPE_BUFFERS];
 };
 
 /* Differs from PIPE_BUF in that PIPE_SIZE is the length of the actual
-
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] ide: fix HPT37x timing tables

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9448732f6c9ef4932b226056338d1084f3669752
Commit: 9448732f6c9ef4932b226056338d1084f3669752
Parent: 836c0063c74cc088ffe370d007e1c6cac95e7caa
Author: Sergei Shtylyov [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:35:49 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:55 2006 -0800

[PATCH] ide: fix HPT37x timing tables

Fix/remove bad/unused timing tables: HPT370/A 66 MHz tables weren't really
needed (the chips are not UltraATA/133 capable and shouldn't support 66 MHz
PCI) and had many modes over- and underclocked, HPT372 33 MHz table was in
fact for 66 MHz and 50 MHz table missed UltraDMA mode 6, HPT374 33 MHz table
was really for 50 MHz...  (Actually, HPT370/A 33 MHz tables also have 
issues.
e.g.  HPT370 has PIO modes 0/1 overlocked.)

There's also no need in the separate HPT374 tables because HPT372 timings
should be the same (and those tables has UltraDMA mode 6 which HPT374 
supports
depending on HPT374_ALLOW_ATA133_6 #define)...

Signed-off-by: Sergei Shtylyov [EMAIL PROTECTED]
Cc: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
Cc: Alan Cox [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/ide/pci/hpt366.c |  149 +-
 1 files changed, 29 insertions(+), 120 deletions(-)

diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c
index 7534171..51f40f2 100644
--- a/drivers/ide/pci/hpt366.c
+++ b/drivers/ide/pci/hpt366.c
@@ -67,6 +67,10 @@
  * - add support for HPT302N and HPT371N clocking (the same as for HPT372N)
  * - HPT371/N are single channel chips, so avoid touching the primary channel
  *   which exists only virtually (there's no pins for it)
+ * - fix/remove bad/unused timing tables: HPT370/A  66 MHz tables weren't 
really
+ *   needed and had many modes over- and  underclocked,  HPT372 33 MHz table 
was
+ *   for 66 MHz and 50 MHz table missed UltraDMA mode 6, HPT374 33 MHz table 
was
+ *   really for 50 MHz; switch to using HPT372 tables for HPT374...
  * [EMAIL PROTECTED]
  *
  */
@@ -264,26 +268,6 @@ static struct chipset_bus_clock_list_entry 
thirty_three_base_hpt370[] = {
{   0,  0x06514e57  }
 };
 
-static struct chipset_bus_clock_list_entry sixty_six_base_hpt370[] = {
-   {   XFER_UDMA_5,0x14846231  },
-   {   XFER_UDMA_4,0x14886231  },
-   {   XFER_UDMA_3,0x148c6231  },
-   {   XFER_UDMA_2,0x148c6231  },
-   {   XFER_UDMA_1,0x14906231  },
-   {   XFER_UDMA_0,0x14986231  },
-
-   {   XFER_MW_DMA_2,  0x26514e21  },
-   {   XFER_MW_DMA_1,  0x26514e33  },
-   {   XFER_MW_DMA_0,  0x26514e97  },
-
-   {   XFER_PIO_4, 0x06514e21  },
-   {   XFER_PIO_3, 0x06514e22  },
-   {   XFER_PIO_2, 0x06514e33  },
-   {   XFER_PIO_1, 0x06914e43  },
-   {   XFER_PIO_0, 0x06914e57  },
-   {   0,  0x06514e57  }
-};
-
 /* these are the current (4 sep 2001) timings from highpoint */
 static struct chipset_bus_clock_list_entry thirty_three_base_hpt370a[] = {
{   XFER_UDMA_5,0x12446231  },
@@ -305,27 +289,6 @@ static struct chipset_bus_clock_list_entry 
thirty_three_base_hpt370a[] = {
{   0,  0x06814ea7  }
 };
 
-/* 2x 33MHz timings */
-static struct chipset_bus_clock_list_entry sixty_six_base_hpt370a[] = {
-   {   XFER_UDMA_5,0x1488e673  },
-   {   XFER_UDMA_4,0x1488e673  },
-   {   XFER_UDMA_3,0x1498e673  },
-   {   XFER_UDMA_2,0x1490e673  },
-   {   XFER_UDMA_1,0x1498e677  },
-   {   XFER_UDMA_0,0x14a0e73f  },
-
-   {   XFER_MW_DMA_2,  0x2480fa73  },
-   {   XFER_MW_DMA_1,  0x2480fa77  }, 
-   {   XFER_MW_DMA_0,  0x2480fb3f  },
-
-   {   XFER_PIO_4, 0x0c82be73  },
-   {   XFER_PIO_3, 0x0c82be95  },
-   {   XFER_PIO_2, 0x0c82beb7  },
-   {   XFER_PIO_1, 0x0d02bf37  },
-   {   XFER_PIO_0, 0x0d02bf5f  },
-   {   0,  0x0d02bf5f  }
-};
-
 static struct chipset_bus_clock_list_entry fifty_base_hpt370a[] = {
{   XFER_UDMA_5,0x12848242  },
{   XFER_UDMA_4,0x12ac8242  },
@@ -347,27 +310,28 @@ static struct chipset_bus_clock_list_entry 
fifty_base_hpt370a[] = {
 };
 
 static struct chipset_bus_clock_list_entry thirty_three_base_hpt372[] = {
-   {   XFER_UDMA_6,0x1c81dc62  },
-   {   XFER_UDMA_5,0x1c6ddc62  },
-   {   XFER_UDMA_4,0x1c8ddc62  },
-   {   

[PATCH] Revert [PATCH] identifier to nsproxy

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5f8442edfb214908e9c6ca1142bf882c9bc364e5
Commit: 5f8442edfb214908e9c6ca1142bf882c9bc364e5
Parent: d4c3cca941b64a938eaa9734585a93547c6be323
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:34:04 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:47 2006 -0800

[PATCH] Revert [PATCH] identifier to nsproxy

This reverts commit 373beb35cd6b625e0ba4ad98baace12310a26aa8.

No one is using this identifier yet.  The purpose of this identifier is to
export nsproxy to user space which is wrong.  nsproxy is an internal
implementation optimization, which should keep our fork times from getting
slower as we increase the number of global namespaces you don't have to
share.

Adding a global identifier like this is inappropriate because it makes
namespaces inherently non-recursive, greatly limiting what we can do with
them in the future.

Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Cc: Cedric Le Goater [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 include/linux/init_task.h |1 -
 include/linux/nsproxy.h   |1 -
 kernel/nsproxy.c  |4 +---
 3 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/include/linux/init_task.h b/include/linux/init_task.h
index b531515..6383d2d 100644
--- a/include/linux/init_task.h
+++ b/include/linux/init_task.h
@@ -75,7 +75,6 @@ extern struct nsproxy init_nsproxy;
.pid_ns = init_pid_ns, \
.count  = ATOMIC_INIT(1),   \
.nslock = __SPIN_LOCK_UNLOCKED(nsproxy.nslock), \
-   .id = 0,\
.uts_ns = init_uts_ns, \
.mnt_ns = NULL, \
INIT_IPC_NS(ipc_ns) \
diff --git a/include/linux/nsproxy.h b/include/linux/nsproxy.h
index fdfb0e4..0b9f0dc 100644
--- a/include/linux/nsproxy.h
+++ b/include/linux/nsproxy.h
@@ -24,7 +24,6 @@ struct pid_namespace;
 struct nsproxy {
atomic_t count;
spinlock_t nslock;
-   unsigned long id;
struct uts_namespace *uts_ns;
struct ipc_namespace *ipc_ns;
struct mnt_namespace *mnt_ns;
diff --git a/kernel/nsproxy.c b/kernel/nsproxy.c
index e2ce748..f5b9ee6 100644
--- a/kernel/nsproxy.c
+++ b/kernel/nsproxy.c
@@ -46,10 +46,8 @@ static inline struct nsproxy *clone_namespaces(struct 
nsproxy *orig)
struct nsproxy *ns;
 
ns = kmemdup(orig, sizeof(struct nsproxy), GFP_KERNEL);
-   if (ns) {
+   if (ns)
atomic_set(ns-count, 1);
-   ns-id = -1;
-   }
return ns;
 }
 
-
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] knfsd: Don't ignore kstrdup failure in rpc caches

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=dd08d6ea443abafe9455997d2889719364b8794b
Commit: dd08d6ea443abafe9455997d2889719364b8794b
Parent: 27d630ece08ae15e35d54201665c247a9fae584c
Author: NeilBrown [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:35:44 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:54 2006 -0800

[PATCH] knfsd: Don't ignore kstrdup failure in rpc caches

Signed-off-by: Neil Brown [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 net/sunrpc/svcauth_unix.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/net/sunrpc/svcauth_unix.c b/net/sunrpc/svcauth_unix.c
index 177f816..0d1e8fb 100644
--- a/net/sunrpc/svcauth_unix.c
+++ b/net/sunrpc/svcauth_unix.c
@@ -53,6 +53,10 @@ struct auth_domain *unix_domain_find(char *name)
return NULL;
kref_init(new-h.ref);
new-h.name = kstrdup(name, GFP_KERNEL);
+   if (new-h.name == NULL) {
+   kfree(new);
+   return NULL;
+   }
new-h.flavour = svcauth_unix;
new-addr_changes = 0;
rv = auth_domain_lookup(name, new-h);
-
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] touch_atime() cleanup

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b227613841d4d211a10c5860acc73e133b613bc0
Commit: b227613841d4d211a10c5860acc73e133b613bc0
Parent: 1c0350bd0c9b59957760e67516973db35bafa050
Author: Andrew Morton [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:34:33 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:50 2006 -0800

[PATCH] touch_atime() cleanup

Simplify touch_atime() layout.

Cc: Valerie Henson [EMAIL PROTECTED]
Cc: Mark Fasheh [EMAIL PROTECTED]
Cc: Al Viro [EMAIL PROTECTED]
Cc: Christoph Hellwig [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 fs/inode.c |   21 +++--
 1 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/fs/inode.c b/fs/inode.c
index d00de18..04536eb 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1144,7 +1144,6 @@ sector_t bmap(struct inode * inode, sector_t block)
res = inode-i_mapping-a_ops-bmap(inode-i_mapping, block);
return res;
 }
-
 EXPORT_SYMBOL(bmap);
 
 /**
@@ -1163,19 +1162,22 @@ void touch_atime(struct vfsmount *mnt, struct dentry 
*dentry)
 
if (IS_RDONLY(inode))
return;
-
-   if ((inode-i_flags  S_NOATIME) ||
-   (inode-i_sb-s_flags  MS_NOATIME) ||
-   ((inode-i_sb-s_flags  MS_NODIRATIME)  S_ISDIR(inode-i_mode)))
+   if (inode-i_flags  S_NOATIME)
+   return;
+   if (inode-i_sb-s_flags  MS_NOATIME)
+   return;
+   if ((inode-i_sb-s_flags  MS_NODIRATIME)  S_ISDIR(inode-i_mode))
return;
 
/*
 * We may have a NULL vfsmount when coming from NFSD
 */
-   if (mnt 
-   ((mnt-mnt_flags  MNT_NOATIME) ||
-((mnt-mnt_flags  MNT_NODIRATIME)  S_ISDIR(inode-i_mode
-   return;
+   if (mnt) {
+   if (mnt-mnt_flags  MNT_NOATIME)
+   return;
+   if ((mnt-mnt_flags  MNT_NODIRATIME)  S_ISDIR(inode-i_mode))
+   return;
+   }
 
now = current_fs_time(inode-i_sb);
if (!timespec_equal(inode-i_atime, now)) {
@@ -1183,7 +1185,6 @@ void touch_atime(struct vfsmount *mnt, struct dentry 
*dentry)
mark_inode_dirty_sync(inode);
}
 }
-
 EXPORT_SYMBOL(touch_atime);
 
 /**
-
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


hwmon/f71805f: Always create all fan inputs

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c7176cb515edbc937006fd05fa391b0d926a337a
Commit: c7176cb515edbc937006fd05fa391b0d926a337a
Parent: 51c997d80e1f625aea3426a8a9087f5830ac6db3
Author: Jean Delvare [EMAIL PROTECTED]
AuthorDate: Tue Dec 12 18:18:29 2006 +0100
Committer:  Jean Delvare [EMAIL PROTECTED]
CommitDate: Tue Dec 12 18:18:29 2006 +0100

hwmon/f71805f: Always create all fan inputs

Fans can be hotplugged, so we should create sysfs file even for fans
which are disabled at driver load time.

Signed-off-by: Jean Delvare [EMAIL PROTECTED]
---
 drivers/hwmon/f71805f.c |   74 ++
 1 files changed, 23 insertions(+), 51 deletions(-)

diff --git a/drivers/hwmon/f71805f.c b/drivers/hwmon/f71805f.c
index ba5e7b7..37ba421 100644
--- a/drivers/hwmon/f71805f.c
+++ b/drivers/hwmon/f71805f.c
@@ -132,7 +132,6 @@ superio_exit(int base)
 #define F71805F_REG_STATUS(nr) (0x36 + (nr))
 
 /* individual register bits */
-#define FAN_CTRL_SKIP  0x80
 #define FAN_CTRL_DC_MODE   0x10
 #define FAN_CTRL_LATCH_FULL0x08
 #define FAN_CTRL_MODE_MASK 0x03
@@ -337,8 +336,6 @@ static struct f71805f_data *f71805f_update_device(struct 
device *dev)
   F71805F_REG_IN_LOW(nr));
}
for (nr = 0; nr  3; nr++) {
-   if (data-fan_ctrl[nr]  FAN_CTRL_SKIP)
-   continue;
data-fan_low[nr] = f71805f_read16(data,
F71805F_REG_FAN_LOW(nr));
data-fan_target[nr] = f71805f_read16(data,
@@ -367,8 +364,6 @@ static struct f71805f_data *f71805f_update_device(struct 
device *dev)
   F71805F_REG_IN(nr));
}
for (nr = 0; nr  3; nr++) {
-   if (data-fan_ctrl[nr]  FAN_CTRL_SKIP)
-   continue;
data-fan[nr] = f71805f_read16(data,
F71805F_REG_FAN(nr));
data-fan_ctrl[nr] = f71805f_read8(data,
@@ -991,6 +986,29 @@ static struct attribute *f71805f_attributes[] = {
sensor_dev_attr_in7_max.dev_attr.attr,
sensor_dev_attr_in7_min.dev_attr.attr,
 
+   sensor_dev_attr_fan1_input.dev_attr.attr,
+   sensor_dev_attr_fan1_min.dev_attr.attr,
+   sensor_dev_attr_fan1_alarm.dev_attr.attr,
+   sensor_dev_attr_fan1_target.dev_attr.attr,
+   sensor_dev_attr_fan2_input.dev_attr.attr,
+   sensor_dev_attr_fan2_min.dev_attr.attr,
+   sensor_dev_attr_fan2_alarm.dev_attr.attr,
+   sensor_dev_attr_fan2_target.dev_attr.attr,
+   sensor_dev_attr_fan3_input.dev_attr.attr,
+   sensor_dev_attr_fan3_min.dev_attr.attr,
+   sensor_dev_attr_fan3_alarm.dev_attr.attr,
+   sensor_dev_attr_fan3_target.dev_attr.attr,
+
+   sensor_dev_attr_pwm1.dev_attr.attr,
+   sensor_dev_attr_pwm1_enable.dev_attr.attr,
+   sensor_dev_attr_pwm1_mode.dev_attr.attr,
+   sensor_dev_attr_pwm2.dev_attr.attr,
+   sensor_dev_attr_pwm2_enable.dev_attr.attr,
+   sensor_dev_attr_pwm2_mode.dev_attr.attr,
+   sensor_dev_attr_pwm3.dev_attr.attr,
+   sensor_dev_attr_pwm3_enable.dev_attr.attr,
+   sensor_dev_attr_pwm3_mode.dev_attr.attr,
+
sensor_dev_attr_temp1_input.dev_attr.attr,
sensor_dev_attr_temp1_max.dev_attr.attr,
sensor_dev_attr_temp1_max_hyst.dev_attr.attr,
@@ -1061,43 +1079,6 @@ static const struct attribute_group 
f71805f_group_optin[4] = {
{ .attrs = f71805f_attributes_optin[3] },
 };
 
-static struct attribute *f71805f_attributes_fan[3][8] = {
-   {
-   sensor_dev_attr_fan1_input.dev_attr.attr,
-   sensor_dev_attr_fan1_min.dev_attr.attr,
-   sensor_dev_attr_fan1_alarm.dev_attr.attr,
-   sensor_dev_attr_fan1_target.dev_attr.attr,
-   sensor_dev_attr_pwm1.dev_attr.attr,
-   sensor_dev_attr_pwm1_enable.dev_attr.attr,
-   sensor_dev_attr_pwm1_mode.dev_attr.attr,
-   NULL
-   }, {
-   sensor_dev_attr_fan2_input.dev_attr.attr,
-   sensor_dev_attr_fan2_min.dev_attr.attr,
-   sensor_dev_attr_fan2_alarm.dev_attr.attr,
-   sensor_dev_attr_fan2_target.dev_attr.attr,
-   sensor_dev_attr_pwm2.dev_attr.attr,
-   sensor_dev_attr_pwm2_enable.dev_attr.attr,
-   sensor_dev_attr_pwm2_mode.dev_attr.attr,
-   NULL
-   }, {
-   sensor_dev_attr_fan3_input.dev_attr.attr,
-   sensor_dev_attr_fan3_min.dev_attr.attr,
-   sensor_dev_attr_fan3_alarm.dev_attr.attr,
-   sensor_dev_attr_fan3_target.dev_attr.attr,
-   sensor_dev_attr_pwm3.dev_attr.attr,
-   

[PATCH] cpuset: rework cpuset_zone_allowed api

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=02a0e53d8227aff5e62e0433f82c12c1c2805fd6
Commit: 02a0e53d8227aff5e62e0433f82c12c1c2805fd6
Parent: 55935a34a428a1497e3b37982e2782c09c6f914d
Author: Paul Jackson [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:34:25 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:49 2006 -0800

[PATCH] cpuset: rework cpuset_zone_allowed api

Elaborate the API for calling cpuset_zone_allowed(), so that users have to
explicitly choose between the two variants:

  cpuset_zone_allowed_hardwall()
  cpuset_zone_allowed_softwall()

Until now, whether or not you got the hardwall flavor depended solely on
whether or not you or'd in the __GFP_HARDWALL gfp flag to the gfp_mask
argument.

If you didn't specify __GFP_HARDWALL, you implicitly got the softwall
version.

Unfortunately, this meant that users would end up with the softwall version
without thinking about it.  Since only the softwall version might sleep,
this led to bugs with possible sleeping in interrupt context on more than
one occassion.

The hardwall version requires that the current tasks mems_allowed allows
the node of the specified zone (or that you're in interrupt or that
__GFP_THISNODE is set or that you're on a one cpuset system.)

The softwall version, depending on the gfp_mask, might allow a node if it
was allowed in the nearest enclusing cpuset marked mem_exclusive (which
requires taking the cpuset lock 'callback_mutex' to evaluate.)

This patch removes the cpuset_zone_allowed() call, and forces the caller to
explicitly choose between the hardwall and the softwall case.

If the caller wants the gfp_mask to determine this choice, they should (1)
be sure they can sleep or that __GFP_HARDWALL is set, and (2) invoke the
cpuset_zone_allowed_softwall() routine.

This adds another 100 or 200 bytes to the kernel text space, due to the few
lines of nearly duplicate code at the top of both cpuset_zone_allowed_*
routines.  It should save a few instructions executed for the calls that
turned into calls of cpuset_zone_allowed_hardwall, thanks to not having to
set (before the call) then check (within the call) the __GFP_HARDWALL flag.

For the most critical call, from get_page_from_freelist(), the same
instructions are executed as before -- the old cpuset_zone_allowed()
routine it used to call is the same code as the
cpuset_zone_allowed_softwall() routine that it calls now.

Not a perfect win, but seems worth it, to reduce this chance of hitting a
sleeping with irq off complaint again.

Signed-off-by: Paul Jackson [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 include/linux/cpuset.h |   22 ++--
 kernel/cpuset.c|   82 ++-
 mm/hugetlb.c   |2 +-
 mm/oom_kill.c  |2 +-
 mm/page_alloc.c|2 +-
 mm/slab.c  |2 +-
 mm/vmscan.c|8 ++--
 7 files changed, 92 insertions(+), 28 deletions(-)

diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h
index 8821e1f..826b15e 100644
--- a/include/linux/cpuset.h
+++ b/include/linux/cpuset.h
@@ -30,10 +30,19 @@ void cpuset_update_task_memory_state(void);
nodes_subset((nodes), current-mems_allowed)
 int cpuset_zonelist_valid_mems_allowed(struct zonelist *zl);
 
-extern int __cpuset_zone_allowed(struct zone *z, gfp_t gfp_mask);
-static int inline cpuset_zone_allowed(struct zone *z, gfp_t gfp_mask)
+extern int __cpuset_zone_allowed_softwall(struct zone *z, gfp_t gfp_mask);
+extern int __cpuset_zone_allowed_hardwall(struct zone *z, gfp_t gfp_mask);
+
+static int inline cpuset_zone_allowed_softwall(struct zone *z, gfp_t gfp_mask)
+{
+   return number_of_cpusets = 1 ||
+   __cpuset_zone_allowed_softwall(z, gfp_mask);
+}
+
+static int inline cpuset_zone_allowed_hardwall(struct zone *z, gfp_t gfp_mask)
 {
-   return number_of_cpusets = 1 || __cpuset_zone_allowed(z, gfp_mask);
+   return number_of_cpusets = 1 ||
+   __cpuset_zone_allowed_hardwall(z, gfp_mask);
 }
 
 extern int cpuset_excl_nodes_overlap(const struct task_struct *p);
@@ -94,7 +103,12 @@ static inline int cpuset_zonelist_valid_mems_allowed(struct 
zonelist *zl)
return 1;
 }
 
-static inline int cpuset_zone_allowed(struct zone *z, gfp_t gfp_mask)
+static inline int cpuset_zone_allowed_softwall(struct zone *z, gfp_t gfp_mask)
+{
+   return 1;
+}
+
+static inline int cpuset_zone_allowed_hardwall(struct zone *z, gfp_t gfp_mask)
 {
return 1;
 }
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index 2c3b443..232aed2 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -2342,32 +2342,48 @@ 

[PATCH] KVM: Make the GET_SREGS and SET_SREGS ioctls symmetric

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f7fbf1fdf0d79241f5cc95310b96f0c52452ab39
Commit: f7fbf1fdf0d79241f5cc95310b96f0c52452ab39
Parent: acd19499e9724615d720b29c74be6b218ce765c6
Author: Uri Lublin [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:34:00 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:47 2006 -0800

[PATCH] KVM: Make the GET_SREGS and SET_SREGS ioctls symmetric

This makes the SET_SREGS ioctl behave symmetrically to the GET_SREGS ioctl 
wrt
the segment access rights flag.

Signed-off-by: Uri Lublin [EMAIL PROTECTED]
Signed-off-by: Avi Kivity [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/kvm/vmx.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c
index ad97014..fc01c4b 100644
--- a/drivers/kvm/vmx.c
+++ b/drivers/kvm/vmx.c
@@ -884,6 +884,8 @@ static void vmx_set_segment(struct kvm_vcpu *vcpu,
ar |= (var-db  1)  14;
ar |= (var-g  1)  15;
}
+   if (ar == 0) /* a 0 value means unusable */
+   ar = AR_UNUSABLE_MASK;
vmcs_write32(sf-ar_bytes, ar);
 }
 
-
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] knfsd: nfsd4: move replay_owner to cstate

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a4f1706a9bd94d0e33e853a7e9f40b2650d54fbf
Commit: a4f1706a9bd94d0e33e853a7e9f40b2650d54fbf
Parent: d9e626f1e23358487595c2d3901126d00f9de7e0
Author: J.Bruce Fields [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:35:28 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:54 2006 -0800

[PATCH] knfsd: nfsd4: move replay_owner to cstate

Tuck away the replay_owner in the cstate while we're at it.

Signed-off-by: J. Bruce Fields [EMAIL PROTECTED]
Signed-off-by: Neil Brown [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 fs/nfsd/nfs4proc.c|   31 ++-
 fs/nfsd/nfs4state.c   |   22 ++
 include/linux/nfsd/xdr4.h |   17 +++--
 3 files changed, 31 insertions(+), 39 deletions(-)

diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index 0166b49..0972cb3 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -163,7 +163,7 @@ do_open_fhandle(struct svc_rqst *rqstp, struct svc_fh 
*current_fh, struct nfsd4_
 
 static inline __be32
 nfsd4_open(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
-  struct nfsd4_open *open, struct nfs4_stateowner **replay_owner)
+  struct nfsd4_open *open)
 {
__be32 status;
dprintk(NFSD: nfsd4_open filename %.*s op_stateowner %p\n,
@@ -255,7 +255,7 @@ nfsd4_open(struct svc_rqst *rqstp, struct 
nfsd4_compound_state *cstate,
 out:
if (open-op_stateowner) {
nfs4_get_stateowner(open-op_stateowner);
-   *replay_owner = open-op_stateowner;
+   cstate-replay_owner = open-op_stateowner;
}
nfs4_unlock_state();
return status;
@@ -761,6 +761,7 @@ static void cstate_free(struct nfsd4_compound_state *cstate)
return;
fh_put(cstate-current_fh);
fh_put(cstate-save_fh);
+   BUG_ON(cstate-replay_owner);
kfree(cstate);
 }
 
@@ -773,6 +774,7 @@ static struct nfsd4_compound_state *cstate_alloc(void)
return NULL;
fh_init(cstate-current_fh, NFS4_FHSIZE);
fh_init(cstate-save_fh, NFS4_FHSIZE);
+   cstate-replay_owner = NULL;
return cstate;
 }
 
@@ -786,7 +788,6 @@ nfsd4_proc_compound(struct svc_rqst *rqstp,
 {
struct nfsd4_op *op;
struct nfsd4_compound_state *cstate = NULL;
-   struct nfs4_stateowner *replay_owner = NULL;
int slack_bytes;
__be32  status;
 
@@ -876,7 +877,7 @@ nfsd4_proc_compound(struct svc_rqst *rqstp,
break;
case OP_CLOSE:
op-status = nfsd4_close(rqstp, cstate,
-op-u.close, replay_owner);
+op-u.close);
break;
case OP_COMMIT:
op-status = nfsd4_commit(rqstp, cstate,
@@ -901,15 +902,13 @@ nfsd4_proc_compound(struct svc_rqst *rqstp,
op-status = nfsd4_link(rqstp, cstate, op-u.link);
break;
case OP_LOCK:
-   op-status = nfsd4_lock(rqstp, cstate, op-u.lock,
-   replay_owner);
+   op-status = nfsd4_lock(rqstp, cstate, op-u.lock);
break;
case OP_LOCKT:
op-status = nfsd4_lockt(rqstp, cstate, op-u.lockt);
break;
case OP_LOCKU:
-   op-status = nfsd4_locku(rqstp, cstate, op-u.locku,
-replay_owner);
+   op-status = nfsd4_locku(rqstp, cstate, op-u.locku);
break;
case OP_LOOKUP:
op-status = nfsd4_lookup(rqstp, cstate,
@@ -926,17 +925,15 @@ nfsd4_proc_compound(struct svc_rqst *rqstp,
break;
case OP_OPEN:
op-status = nfsd4_open(rqstp, cstate,
-   op-u.open, replay_owner);
+   op-u.open);
break;
case OP_OPEN_CONFIRM:
op-status = nfsd4_open_confirm(rqstp, cstate,
-   op-u.open_confirm,
-   replay_owner);
+   op-u.open_confirm);
break;
case OP_OPEN_DOWNGRADE:
op-status = nfsd4_open_downgrade(rqstp, cstate,
-op-u.open_downgrade,
-   

[PATCH] knfsd: nfsd4: remove spurious replay_owner check

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d9e626f1e23358487595c2d3901126d00f9de7e0
Commit: d9e626f1e23358487595c2d3901126d00f9de7e0
Parent: ca3643171bc6e08b7c4d1f9a2ce659541a01a7fe
Author: J.Bruce Fields [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:35:28 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:54 2006 -0800

[PATCH] knfsd: nfsd4: remove spurious replay_owner check

OK, this is embarassing--I've even looked back at the history, and cannot 
for
the life of me figure out why I added this check.

Signed-off-by: J. Bruce Fields [EMAIL PROTECTED]
Signed-off-by: Neil Brown [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 fs/nfsd/nfs4proc.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index 1b6756a..0166b49 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -1008,7 +1008,7 @@ encode_op:
nfsd4_encode_operation(resp, op);
status = op-status;
}
-   if (replay_owner  (replay_owner != (void *)(-1))) {
+   if (replay_owner) {
nfs4_put_stateowner(replay_owner);
replay_owner = NULL;
}
-
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] knfsd: nfsd4: reorganize compound ops

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b591480bbe1a7f0e90533bce8ea86efecc84648e
Commit: b591480bbe1a7f0e90533bce8ea86efecc84648e
Parent: c954e2a5d1c9662991a41282297ddebcadee0578
Author: J.Bruce Fields [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:35:38 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:54 2006 -0800

[PATCH] knfsd: nfsd4: reorganize compound ops

Define an op descriptor struct, use it to simplify nfsd4_proc_compound().

Signed-off-by: J. Bruce Fields [EMAIL PROTECTED]
Signed-off-by: Neil Brown [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 fs/nfsd/nfs4proc.c |  254 ++--
 fs/nfsd/nfs4state.c|   14 ++-
 include/linux/nfsd/state.h |1 -
 include/linux/nfsd/xdr4.h  |5 +
 4 files changed, 144 insertions(+), 130 deletions(-)

diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index 8fc2cab..e1c463b 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -258,7 +258,8 @@ out:
  * filehandle-manipulating ops.
  */
 static __be32
-nfsd4_getfh(struct nfsd4_compound_state *cstate, struct svc_fh **getfh)
+nfsd4_getfh(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+   struct svc_fh **getfh)
 {
if (!cstate-current_fh.fh_dentry)
return nfserr_nofilehandle;
@@ -279,7 +280,8 @@ nfsd4_putfh(struct svc_rqst *rqstp, struct 
nfsd4_compound_state *cstate,
 }
 
 static __be32
-nfsd4_putrootfh(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate)
+nfsd4_putrootfh(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+   void *arg)
 {
__be32 status;
 
@@ -290,7 +292,8 @@ nfsd4_putrootfh(struct svc_rqst *rqstp, struct 
nfsd4_compound_state *cstate)
 }
 
 static __be32
-nfsd4_restorefh(struct nfsd4_compound_state *cstate)
+nfsd4_restorefh(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+   void *arg)
 {
if (!cstate-save_fh.fh_dentry)
return nfserr_restorefh;
@@ -300,7 +303,8 @@ nfsd4_restorefh(struct nfsd4_compound_state *cstate)
 }
 
 static __be32
-nfsd4_savefh(struct nfsd4_compound_state *cstate)
+nfsd4_savefh(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+void *arg)
 {
if (!cstate-current_fh.fh_dentry)
return nfserr_nofilehandle;
@@ -463,7 +467,8 @@ nfsd4_link(struct svc_rqst *rqstp, struct 
nfsd4_compound_state *cstate,
 }
 
 static __be32
-nfsd4_lookupp(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate)
+nfsd4_lookupp(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+ void *arg)
 {
struct svc_fh tmp_fh;
__be32 ret;
@@ -791,6 +796,16 @@ static struct nfsd4_compound_state *cstate_alloc(void)
return cstate;
 }
 
+typedef __be32(*nfsd4op_func)(struct svc_rqst *, struct nfsd4_compound_state *,
+ void *);
+
+struct nfsd4_operation {
+   nfsd4op_func op_func;
+   u32 op_flags;
+};
+
+static struct nfsd4_operation nfsd4_ops[];
+
 /*
  * COMPOUND call.
  */
@@ -800,6 +815,7 @@ nfsd4_proc_compound(struct svc_rqst *rqstp,
struct nfsd4_compoundres *resp)
 {
struct nfsd4_op *op;
+   struct nfsd4_operation *opdesc;
struct nfsd4_compound_state *cstate = NULL;
int slack_bytes;
__be32  status;
@@ -854,6 +870,8 @@ nfsd4_proc_compound(struct svc_rqst *rqstp,
goto encode_op;
}
 
+   opdesc = nfsd4_ops[op-opnum];
+
/* All operations except RENEW, SETCLIENTID, RESTOREFH
* SETCLIENTID_CONFIRM, PUTFH and PUTROOTFH
* require a valid current filehandle
@@ -883,127 +901,11 @@ nfsd4_proc_compound(struct svc_rqst *rqstp,
op-status = nfserr_moved;
goto encode_op;
}
-   switch (op-opnum) {
-   case OP_ACCESS:
-   op-status = nfsd4_access(rqstp, cstate,
- op-u.access);
-   break;
-   case OP_CLOSE:
-   op-status = nfsd4_close(rqstp, cstate,
-op-u.close);
-   break;
-   case OP_COMMIT:
-   op-status = nfsd4_commit(rqstp, cstate,
- op-u.commit);
-   break;
-   case OP_CREATE:
-   op-status = nfsd4_create(rqstp, cstate,
- op-u.create);
-   break;
-   case OP_DELEGRETURN:
-   op-status = nfsd4_delegreturn(rqstp, cstate,
-

[PATCH] vt: fix comments to not refer to kill_proc

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3dfcaf16135150d0f025047a7525664a41bb2adf
Commit: 3dfcaf16135150d0f025047a7525664a41bb2adf
Parent: 5f8442edfb214908e9c6ca1142bf882c9bc364e5
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:34:05 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:47 2006 -0800

[PATCH] vt: fix comments to not refer to kill_proc

The code has been fixed to use kill_pid instead of kill_proc fix the
comments as well.

Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/char/vt_ioctl.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/char/vt_ioctl.c b/drivers/char/vt_ioctl.c
index ac5d60e..311493e 100644
--- a/drivers/char/vt_ioctl.c
+++ b/drivers/char/vt_ioctl.c
@@ -1087,7 +1087,7 @@ static void complete_change_console(struct vc_data *vc)
switch_screen(vc);
 
/*
-* This can't appear below a successful kill_proc().  If it did,
+* This can't appear below a successful kill_pid().  If it did,
 * then the *blank_screen operation could occur while X, having
 * received acqsig, is waking up on another processor.  This
 * condition can lead to overlapping accesses to the VGA range
@@ -1110,7 +1110,7 @@ static void complete_change_console(struct vc_data *vc)
 */
if (vc-vt_mode.mode == VT_PROCESS) {
/*
-* Send the signal as privileged - kill_proc() will
+* Send the signal as privileged - kill_pid() will
 * tell us if the process has gone or something else
 * is awry
 */
@@ -1170,7 +1170,7 @@ void change_console(struct vc_data *new_vc)
vc = vc_cons[fg_console].d;
if (vc-vt_mode.mode == VT_PROCESS) {
/*
-* Send the signal as privileged - kill_proc() will
+* Send the signal as privileged - kill_pid() will
 * tell us if the process has gone or something else
 * is awry
 */
-
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


hwmon/it87: Remove the SMBus interface support

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8e9afcbbdef71aeeb510732f4f8d5ac3de863df0
Commit: 8e9afcbbdef71aeeb510732f4f8d5ac3de863df0
Parent: 0f23e50aa5fc578e1c50e873858e6ab7a1e32f0e
Author: Jean Delvare [EMAIL PROTECTED]
AuthorDate: Tue Dec 12 18:18:28 2006 +0100
Committer:  Jean Delvare [EMAIL PROTECTED]
CommitDate: Tue Dec 12 18:18:28 2006 +0100

hwmon/it87: Remove the SMBus interface support

This interface was useless as the LPC ISA-like interface is always
available, is faster, and is more reliable. This cuts the driver
size by some 20%.

This change is also required to later convert the it87 driver to a
platform driver, so that we can get rid of i2c-isa in a near future.

Signed-off-by: Jean Delvare [EMAIL PROTECTED]
---
 Documentation/feature-removal-schedule.txt |9 --
 Documentation/hwmon/it87   |   15 ++-
 drivers/hwmon/it87.c   |  202 +++-
 include/linux/i2c-id.h |1 -
 4 files changed, 64 insertions(+), 163 deletions(-)

diff --git a/Documentation/feature-removal-schedule.txt 
b/Documentation/feature-removal-schedule.txt
index 46f2a55..e82c15d 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -151,15 +151,6 @@ Who:   Thomas Gleixner [EMAIL PROTECTED]
 
 ---
 
-What:  I2C interface of the it87 driver
-When:  January 2007
-Why:   The ISA interface is faster and should be always available. The I2C
-   probing is also known to cause trouble in at least one case (see
-   bug #5889.)
-Who:   Jean Delvare [EMAIL PROTECTED]
-

-
 What:  Unused EXPORT_SYMBOL/EXPORT_SYMBOL_GPL exports
(temporary transition config option provided until then)
The transition config option will also be removed at the same time.
diff --git a/Documentation/hwmon/it87 b/Documentation/hwmon/it87
index e783fd6..74a8099 100644
--- a/Documentation/hwmon/it87
+++ b/Documentation/hwmon/it87
@@ -9,8 +9,7 @@ Supported chips:
http://www.ite.com.tw/
   * IT8712F
 Prefix: 'it8712'
-Addresses scanned: I2C 0x2d
-   from Super I/O config space (8 I/O ports)
+Addresses scanned: from Super I/O config space (8 I/O ports)
 Datasheet: Publicly available at the ITE website
http://www.ite.com.tw/
   * IT8716F
@@ -53,6 +52,18 @@ Module Parameters
   misconfigured by BIOS - PWM values would be inverted. This option tries
   to fix this. Please contact your BIOS manufacturer and ask him for fix.
 
+
+Hardware Interfaces
+---
+
+All the chips suported by this driver are LPC Super-I/O chips, accessed
+through the LPC bus (ISA-like I/O ports). The IT8712F additionally has an
+SMBus interface to the hardware monitoring functions. This driver no
+longer supports this interface though, as it is slower and less reliable
+than the ISA access, and was only available on a small number of
+motherboard models.
+
+
 Description
 ---
 
diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c
index 323ef06..1ed8b7e 100644
--- a/drivers/hwmon/it87.c
+++ b/drivers/hwmon/it87.c
@@ -3,7 +3,7 @@
  monitoring.
 
 Supports: IT8705F  Super I/O chip w/LPC interface
-  IT8712F  Super I/O chip w/LPC interface  SMBus
+  IT8712F  Super I/O chip w/LPC interface
   IT8716F  Super I/O chip w/LPC interface
   IT8718F  Super I/O chip w/LPC interface
   Sis950   A clone of the IT8705F
@@ -41,12 +41,8 @@
 #include asm/io.h
 
 
-/* Addresses to scan */
-static unsigned short normal_i2c[] = { 0x2d, I2C_CLIENT_END };
 static unsigned short isa_address;
-
-/* Insmod parameters */
-I2C_CLIENT_INSMOD_4(it87, it8712, it8716, it8718);
+enum chips { it87, it8712, it8716, it8718 };
 
 #defineREG 0x2e/* The register to read/write */
 #defineDEV 0x07/* Register: Logical device select */
@@ -162,8 +158,6 @@ static u8 vid_value;
 #define IT87_REG_TEMP_HIGH(nr) (0x40 + (nr) * 2)
 #define IT87_REG_TEMP_LOW(nr)  (0x41 + (nr) * 2)
 
-#define IT87_REG_I2C_ADDR  0x48
-
 #define IT87_REG_VIN_ENABLE0x50
 #define IT87_REG_TEMP_ENABLE   0x51
 
@@ -242,33 +236,22 @@ struct it87_data {
 };
 
 
-static int it87_attach_adapter(struct i2c_adapter *adapter);
-static int it87_isa_attach_adapter(struct i2c_adapter *adapter);
-static int it87_detect(struct i2c_adapter *adapter, int address, int kind);
+static int it87_detect(struct i2c_adapter *adapter);
 static int it87_detach_client(struct i2c_client *client);
 
 static int it87_read_value(struct i2c_client *client, u8 reg);
-static int it87_write_value(struct i2c_client *client, u8 reg, u8 value);
+static void it87_write_value(struct i2c_client *client, u8 reg, u8 value);
 static struct it87_data *it87_update_device(struct device *dev);
 

[PATCH] slab: fix sleeping in atomic bug

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=dd47ea755693228bf842c779e8afdfa47efb20a3
Commit: dd47ea755693228bf842c779e8afdfa47efb20a3
Parent: 6a8ba9d12150461acc91bd3c9124eac19e853218
Author: Christoph Lameter [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:34:11 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:48 2006 -0800

[PATCH] slab: fix sleeping in atomic bug

Fallback_alloc() does not do the check for GFP_WAIT as done in
cache_grow().  Thus interrupts are disabled when we call kmem_getpages()
which results in the failure.

Duplicate the handling of GFP_WAIT in cache_grow().

Signed-off-by: Christoph Lameter [EMAIL PROTECTED]
Cc: Jay Cliburn [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 mm/slab.c |6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/mm/slab.c b/mm/slab.c
index 2c65553..c7576b9 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -3252,6 +3252,7 @@ void *fallback_alloc(struct kmem_cache *cache, gfp_t 
flags)
struct zone **z;
void *obj = NULL;
int nid;
+   gfp_t local_flags = (flags  GFP_LEVEL_MASK);
 
 retry:
/*
@@ -3275,7 +3276,12 @@ retry:
 * We may trigger various forms of reclaim on the allowed
 * set and go into memory reserves if necessary.
 */
+   if (local_flags  __GFP_WAIT)
+   local_irq_enable();
+   kmem_flagcheck(cache, flags);
obj = kmem_getpages(cache, flags, -1);
+   if (local_flags  __GFP_WAIT)
+   local_irq_disable();
if (obj) {
/*
 * Insert into the appropriate per node queues
-
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 section mismatch in parainstructions

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=acd19499e9724615d720b29c74be6b218ce765c6
Commit: acd19499e9724615d720b29c74be6b218ce765c6
Parent: d78437245aa3842e8eeaef2709753ac485465652
Author: Randy Dunlap [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:33:57 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:47 2006 -0800

[PATCH] Fix section mismatch in parainstructions

Section .parainstructions should not warn about section mismatches.

WARNING: drivers/net/hamradio/scc.o - Section mismatch: reference to 
.exit.text: from .parainstructions after '' (at offset 0x0)
WARNING: drivers/net/hamradio/scc.o - Section mismatch: reference to 
.exit.text: from .parainstructions after '' (at offset 0x8)

Signed-off-by: Randy Dunlap [EMAIL PROTECTED]
Cc: Andi Kleen [EMAIL PROTECTED]
Acked-by: Rusty Russell [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 scripts/mod/modpost.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index ac0a582..15ab5d0 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -997,6 +997,7 @@ static int exit_section_ref_ok(const char *name)
__bug_table, /* used by powerpc for BUG() */
.exitcall.exit,
.eh_frame,
+   .parainstructions,
.stab,
__ex_table,
.fixup,
-
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


hwmon/f71805f: Support DC fan speed control mode

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e196783d54a75bea05580ce692126532ac54ee24
Commit: e196783d54a75bea05580ce692126532ac54ee24
Parent: 6e2bc17b0793297b38aef1bba39f2cb634d66208
Author: Jean Delvare [EMAIL PROTECTED]
AuthorDate: Tue Dec 12 18:18:27 2006 +0100
Committer:  Jean Delvare [EMAIL PROTECTED]
CommitDate: Tue Dec 12 18:18:27 2006 +0100

hwmon/f71805f: Support DC fan speed control mode

In DC mode, the pwmN_freq files are not created.

Signed-off-by: Jean Delvare [EMAIL PROTECTED]
---
 drivers/hwmon/f71805f.c |   46 +++---
 1 files changed, 43 insertions(+), 3 deletions(-)

diff --git a/drivers/hwmon/f71805f.c b/drivers/hwmon/f71805f.c
index 173e2d2..29a3984 100644
--- a/drivers/hwmon/f71805f.c
+++ b/drivers/hwmon/f71805f.c
@@ -126,6 +126,7 @@ superio_exit(int base)
 
 /* individual register bits */
 #define FAN_CTRL_SKIP  0x80
+#define FAN_CTRL_DC_MODE   0x10
 #define FAN_CTRL_MODE_MASK 0x03
 #define FAN_CTRL_MODE_SPEED0x00
 #define FAN_CTRL_MODE_TEMPERATURE  0x01
@@ -233,6 +234,11 @@ static inline u8 pwm_freq_to_reg(unsigned long val)
return 100UL / (val  8);
 }
 
+static inline int pwm_mode_from_reg(u8 reg)
+{
+   return !(reg  FAN_CTRL_DC_MODE);
+}
+
 static inline long temp_from_reg(u8 reg)
 {
return (reg * 1000);
@@ -562,6 +568,16 @@ static ssize_t show_pwm_freq(struct device *dev, struct 
device_attribute
return sprintf(buf, %lu\n, pwm_freq_from_reg(data-pwm_freq[nr]));
 }
 
+static ssize_t show_pwm_mode(struct device *dev, struct device_attribute
+*devattr, char *buf)
+{
+   struct f71805f_data *data = f71805f_update_device(dev);
+   struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+   int nr = attr-index;
+
+   return sprintf(buf, %d\n, pwm_mode_from_reg(data-fan_ctrl[nr]));
+}
+
 static ssize_t set_pwm(struct device *dev, struct device_attribute *devattr,
   const char *buf, size_t count)
 {
@@ -839,16 +855,19 @@ static SENSOR_DEVICE_ATTR(pwm1_enable, S_IRUGO | S_IWUSR,
  show_pwm_enable, set_pwm_enable, 0);
 static SENSOR_DEVICE_ATTR(pwm1_freq, S_IRUGO | S_IWUSR,
  show_pwm_freq, set_pwm_freq, 0);
+static SENSOR_DEVICE_ATTR(pwm1_mode, S_IRUGO, show_pwm_mode, NULL, 0);
 static SENSOR_DEVICE_ATTR(pwm2, S_IRUGO, show_pwm, set_pwm, 1);
 static SENSOR_DEVICE_ATTR(pwm2_enable, S_IRUGO | S_IWUSR,
  show_pwm_enable, set_pwm_enable, 1);
 static SENSOR_DEVICE_ATTR(pwm2_freq, S_IRUGO | S_IWUSR,
  show_pwm_freq, set_pwm_freq, 1);
+static SENSOR_DEVICE_ATTR(pwm2_mode, S_IRUGO, show_pwm_mode, NULL, 1);
 static SENSOR_DEVICE_ATTR(pwm3, S_IRUGO, show_pwm, set_pwm, 2);
 static SENSOR_DEVICE_ATTR(pwm3_enable, S_IRUGO | S_IWUSR,
  show_pwm_enable, set_pwm_enable, 2);
 static SENSOR_DEVICE_ATTR(pwm3_freq, S_IRUGO | S_IWUSR,
  show_pwm_freq, set_pwm_freq, 2);
+static SENSOR_DEVICE_ATTR(pwm3_mode, S_IRUGO, show_pwm_mode, NULL, 2);
 
 static SENSOR_DEVICE_ATTR(in0_alarm, S_IRUGO, show_alarm, NULL, 0);
 static SENSOR_DEVICE_ATTR(in1_alarm, S_IRUGO, show_alarm, NULL, 1);
@@ -944,7 +963,7 @@ static struct attribute *f71805f_attributes_fan[3][7] = {
sensor_dev_attr_fan1_alarm.dev_attr.attr,
sensor_dev_attr_pwm1.dev_attr.attr,
sensor_dev_attr_pwm1_enable.dev_attr.attr,
-   sensor_dev_attr_pwm1_freq.dev_attr.attr,
+   sensor_dev_attr_pwm1_mode.dev_attr.attr,
NULL
}, {
sensor_dev_attr_fan2_input.dev_attr.attr,
@@ -952,7 +971,7 @@ static struct attribute *f71805f_attributes_fan[3][7] = {
sensor_dev_attr_fan2_alarm.dev_attr.attr,
sensor_dev_attr_pwm2.dev_attr.attr,
sensor_dev_attr_pwm2_enable.dev_attr.attr,
-   sensor_dev_attr_pwm2_freq.dev_attr.attr,
+   sensor_dev_attr_pwm2_mode.dev_attr.attr,
NULL
}, {
sensor_dev_attr_fan3_input.dev_attr.attr,
@@ -960,7 +979,7 @@ static struct attribute *f71805f_attributes_fan[3][7] = {
sensor_dev_attr_fan3_alarm.dev_attr.attr,
sensor_dev_attr_pwm3.dev_attr.attr,
sensor_dev_attr_pwm3_enable.dev_attr.attr,
-   sensor_dev_attr_pwm3_freq.dev_attr.attr,
+   sensor_dev_attr_pwm3_mode.dev_attr.attr,
NULL
}
 };
@@ -971,6 +990,19 @@ static const struct attribute_group f71805f_group_fan[3] = 
{
{ .attrs = f71805f_attributes_fan[2] },
 };
 
+/* We don't include pwm_freq files in the arrays above, because they must be
+   created conditionally (only if pwm_mode is 1 == PWM) */
+static struct attribute *f71805f_attributes_pwm_freq[] 

[PATCH] update Tigran's email addresses

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=69688262fb94e92a32f188b79c02dc32016d4927
Commit: 69688262fb94e92a32f188b79c02dc32016d4927
Parent: 1de241268d7b6bea05d64f9269bf9aa90be49ff1
Author: Tigran Aivazian [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:35:14 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:53 2006 -0800

[PATCH] update Tigran's email addresses

As Adrian pointed out recently, there were still a couple of places where
I should have fixed my email address.

Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 Documentation/filesystems/bfs.txt |2 +-
 arch/i386/kernel/microcode.c  |6 +++---
 fs/bfs/inode.c|4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/Documentation/filesystems/bfs.txt 
b/Documentation/filesystems/bfs.txt
index d2841e0..ea825e1 100644
--- a/Documentation/filesystems/bfs.txt
+++ b/Documentation/filesystems/bfs.txt
@@ -54,4 +54,4 @@ The first 4 bytes should be 0x1badface.
 If you have any patches, questions or suggestions regarding this BFS
 implementation please contact the author:
 
-Tigran A. Aivazian [EMAIL PROTECTED]
+Tigran Aivazian [EMAIL PROTECTED]
diff --git a/arch/i386/kernel/microcode.c b/arch/i386/kernel/microcode.c
index 9723466..47ffec5 100644
--- a/arch/i386/kernel/microcode.c
+++ b/arch/i386/kernel/microcode.c
@@ -1,7 +1,7 @@
 /*
  * Intel CPU Microcode Update Driver for Linux
  *
- * Copyright (C) 2000-2004 Tigran Aivazian
+ * Copyright (C) 2000-2006 Tigran Aivazian [EMAIL PROTECTED]
  *   2006  Shaohua Li [EMAIL PROTECTED]
  *
  * This driver allows to upgrade microcode on Intel processors
@@ -92,7 +92,7 @@
 #include asm/processor.h
 
 MODULE_DESCRIPTION(Intel CPU (IA-32) Microcode Update Driver);
-MODULE_AUTHOR(Tigran Aivazian [EMAIL PROTECTED]);
+MODULE_AUTHOR(Tigran Aivazian [EMAIL PROTECTED]);
 MODULE_LICENSE(GPL);
 
 #define MICROCODE_VERSION  1.14a
@@ -752,7 +752,7 @@ static int __init microcode_init (void)
register_hotcpu_notifier(mc_cpu_notifier);
 
printk(KERN_INFO 
-   IA-32 Microcode Update Driver: v MICROCODE_VERSION  [EMAIL 
PROTECTED]\n);
+   IA-32 Microcode Update Driver: v MICROCODE_VERSION  [EMAIL 
PROTECTED]\n);
return 0;
 }
 
diff --git a/fs/bfs/inode.c b/fs/bfs/inode.c
index eac175e..134c999 100644
--- a/fs/bfs/inode.c
+++ b/fs/bfs/inode.c
@@ -1,7 +1,7 @@
 /*
  * fs/bfs/inode.c
  * BFS superblock and inode operations.
- * Copyright (C) 1999,2000 Tigran Aivazian [EMAIL PROTECTED]
+ * Copyright (C) 1999-2006 Tigran Aivazian [EMAIL PROTECTED]
  * From fs/minix, Copyright (C) 1991, 1992 Linus Torvalds.
  *
  *  Made endianness-clean by Andrew Stribblehill [EMAIL PROTECTED], 2005.
@@ -18,7 +18,7 @@
 #include asm/uaccess.h
 #include bfs.h
 
-MODULE_AUTHOR(Tigran A. Aivazian [EMAIL PROTECTED]);
+MODULE_AUTHOR(Tigran Aivazian [EMAIL PROTECTED]);
 MODULE_DESCRIPTION(SCO UnixWare BFS filesystem for Linux);
 MODULE_LICENSE(GPL);
 
-
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] PM: Fix SMP races in the freezer

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8a102eed9c4e1d21bad07a8fd97bd4fbf125d966
Commit: 8a102eed9c4e1d21bad07a8fd97bd4fbf125d966
Parent: 3df494a32b936aef76d893f5065f962ebd9b9437
Author: Rafael J. Wysocki [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:34:30 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:49 2006 -0800

[PATCH] PM: Fix SMP races in the freezer

Currently, to tell a task that it should go to the refrigerator, we set the
PF_FREEZE flag for it and send a fake signal to it.  Unfortunately there
are two SMP-related problems with this approach.  First, a task running on
another CPU may be updating its flags while the freezer attempts to set
PF_FREEZE for it and this may leave the task's flags in an inconsistent
state.  Second, there is a potential race between freeze_process() and
refrigerator() in which freeze_process() running on one CPU is reading a
task's PF_FREEZE flag while refrigerator() running on another CPU has just
set PF_FROZEN for the same task and attempts to reset PF_FREEZE for it.  If
the refrigerator wins the race, freeze_process() will state that PF_FREEZE
hasn't been set for the task and will set it unnecessarily, so the task
will go to the refrigerator once again after it's been thawed.

To solve first of these problems we need to stop using PF_FREEZE to tell
tasks that they should go to the refrigerator.  Instead, we can introduce a
special TIF_*** flag and use it for this purpose, since it is allowed to
change the other tasks' TIF_*** flags and there are special calls for it.

To avoid the freeze_process()-refrigerator() race we can make
freeze_process() to always check the task's PF_FROZEN flag after it's read
its freeze flag.  We should also make sure that refrigerator() will
always reset the task's freeze flag after it's set PF_FROZEN for it.

Signed-off-by: Rafael J. Wysocki [EMAIL PROTECTED]
Acked-by: Pavel Machek [EMAIL PROTECTED]
Cc: Russell King [EMAIL PROTECTED]
Cc: David Howells [EMAIL PROTECTED]
Cc: Andi Kleen [EMAIL PROTECTED]
Cc: Luck, Tony [EMAIL PROTECTED]
Cc: Benjamin Herrenschmidt [EMAIL PROTECTED]
Cc: Paul Mackerras [EMAIL PROTECTED]
Cc: Paul Mundt [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 include/asm-arm/thread_info.h |2 ++
 include/asm-frv/thread_info.h |2 ++
 include/asm-i386/thread_info.h|2 ++
 include/asm-ia64/thread_info.h|2 ++
 include/asm-powerpc/thread_info.h |2 ++
 include/asm-sh/thread_info.h  |2 ++
 include/asm-x86_64/thread_info.h  |2 ++
 include/linux/freezer.h   |   11 ++-
 include/linux/sched.h |1 -
 kernel/power/process.c|   17 ++---
 10 files changed, 30 insertions(+), 13 deletions(-)

diff --git a/include/asm-arm/thread_info.h b/include/asm-arm/thread_info.h
index d9b8bdd..5014794 100644
--- a/include/asm-arm/thread_info.h
+++ b/include/asm-arm/thread_info.h
@@ -147,6 +147,7 @@ extern void iwmmxt_task_switch(struct thread_info *);
 #define TIF_POLLING_NRFLAG 16
 #define TIF_USING_IWMMXT   17
 #define TIF_MEMDIE 18
+#define TIF_FREEZE 19
 
 #define _TIF_NOTIFY_RESUME (1  TIF_NOTIFY_RESUME)
 #define _TIF_SIGPENDING(1  TIF_SIGPENDING)
@@ -154,6 +155,7 @@ extern void iwmmxt_task_switch(struct thread_info *);
 #define _TIF_SYSCALL_TRACE (1  TIF_SYSCALL_TRACE)
 #define _TIF_POLLING_NRFLAG(1  TIF_POLLING_NRFLAG)
 #define _TIF_USING_IWMMXT  (1  TIF_USING_IWMMXT)
+#define _TIF_FREEZE(1  TIF_FREEZE)
 
 /*
  * Change these and you break ASM code in entry-common.S
diff --git a/include/asm-frv/thread_info.h b/include/asm-frv/thread_info.h
index d66c48e..d881f51 100644
--- a/include/asm-frv/thread_info.h
+++ b/include/asm-frv/thread_info.h
@@ -116,6 +116,7 @@ register struct thread_info *__current_thread_info 
asm(gr15);
 #define TIF_RESTORE_SIGMASK6   /* restore signal mask in do_signal() */
 #define TIF_POLLING_NRFLAG 16  /* true if poll_idle() is polling 
TIF_NEED_RESCHED */
 #define TIF_MEMDIE 17  /* OOM killer killed process */
+#define TIF_FREEZE 18  /* freezing for suspend */
 
 #define _TIF_SYSCALL_TRACE (1  TIF_SYSCALL_TRACE)
 #define _TIF_NOTIFY_RESUME (1  TIF_NOTIFY_RESUME)
@@ -125,6 +126,7 @@ register struct thread_info *__current_thread_info 
asm(gr15);
 #define _TIF_IRET  (1  TIF_IRET)
 #define _TIF_RESTORE_SIGMASK   (1  TIF_RESTORE_SIGMASK)
 #define _TIF_POLLING_NRFLAG(1  TIF_POLLING_NRFLAG)
+#define _TIF_FREEZE(1  TIF_FREEZE)
 
 #define _TIF_WORK_MASK 0xFFFE  /* work to do on 
interrupt/exception return */
 #define _TIF_ALLWORK_MASK  0x 

hwmon/f71805f: Document the fan control features

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e9cea646014e25aa96eefa1b41d373a6ad95c189
Commit: e9cea646014e25aa96eefa1b41d373a6ad95c189
Parent: 315c7113b5580a5f88169b62f597aacd64ef3717
Author: Jean Delvare [EMAIL PROTECTED]
AuthorDate: Tue Dec 12 18:18:27 2006 +0100
Committer:  Jean Delvare [EMAIL PROTECTED]
CommitDate: Tue Dec 12 18:18:27 2006 +0100

hwmon/f71805f: Document the fan control features

Document the different fan control methods, list their options, and give
some hints for best results.

Signed-off-by: Jean Delvare [EMAIL PROTECTED]
---
 Documentation/hwmon/f71805f |   42 ++
 1 files changed, 38 insertions(+), 4 deletions(-)

diff --git a/Documentation/hwmon/f71805f b/Documentation/hwmon/f71805f
index 2ca69df..bc571f9 100644
--- a/Documentation/hwmon/f71805f
+++ b/Documentation/hwmon/f71805f
@@ -13,8 +13,8 @@ Thanks to Denis Kieft from Barracuda Networks for the 
donation of a
 test system (custom Jetway K8M8MS motherboard, with CPU and RAM) and
 for providing initial documentation.
 
-Thanks to Kris Chen from Fintek for answering technical questions and
-providing additional documentation.
+Thanks to Kris Chen and Aaron Huang from Fintek for answering technical
+questions and providing additional documentation.
 
 Thanks to Chris Lin from Jetway for providing wiring schematics and
 answering technical questions.
@@ -28,8 +28,7 @@ capabilities. It can monitor up to 9 voltages (counting its 
own power
 source), 3 fans and 3 temperature sensors.
 
 This chip also has fan controlling features, using either DC or PWM, in
-three different modes (one manual, two automatic). The driver doesn't
-support these features yet.
+three different modes (one manual, two automatic).
 
 The driver assumes that no more than one chip is present, which seems
 reasonable.
@@ -103,3 +102,38 @@ sensor. Each channel can be used for connecting either a 
thermal diode
 or a thermistor. The driver reports the currently selected mode, but
 doesn't allow changing it. In theory, the BIOS should have configured
 everything properly.
+
+
+Fan Control
+---
+
+Both PWM (pulse-width modulation) and DC fan speed control methods are
+supported. The right one to use depends on external circuitry on the
+motherboard, so the driver assumes that the BIOS set the method
+properly. The driver will report the method, but won't let you change
+it.
+
+When the PWM method is used, you can select the operating frequency,
+from 187.5 kHz (default) to 31 Hz. The best frequency depends on the
+fan model. As a rule of thumb, lower frequencies seem to give better
+control, but may generate annoying high-pitch noise. Fintek recommends
+not going below 1 kHz, as the fan tachometers get confused by lower
+frequencies as well.
+
+When the DC method is used, Fintek recommends not going below 5 V, which
+corresponds to a pwm value of 106 for the driver. The driver doesn't
+enforce this limit though.
+
+Three different fan control modes are supported:
+
+* Manual mode
+  You ask for a specific PWM duty cycle or DC voltage.
+
+* Fan speed mode
+  You ask for a specific fan speed. This mode assumes that pwm1
+  corresponds to fan1, pwm2 to fan2 and pwm3 to fan3.
+
+* Temperature mode
+  You define 3 temperature/fan speed trip points, and the fan speed is
+  adjusted depending on the measured temperature, using interpolation.
+  This mode is not yet supported by the driver.
-
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] knfsd: nfsd: make exp_rootfh handle exp_parent errors

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4b41bd85d5f93af37c2730df172aeb54280be7c3
Commit: 4b41bd85d5f93af37c2730df172aeb54280be7c3
Parent: e57101991156aaba97c630f38e880f0d4012edcd
Author: J.Bruce Fields [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:35:21 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:53 2006 -0800

[PATCH] knfsd: nfsd: make exp_rootfh handle exp_parent errors

Since exp_parent can fail by returning an error (-EAGAIN) in addition to by
returning NULL, we should check for that case in exp_rootfh.

(TODO: we should check that userland handles these errors too.)

Signed-off-by: J. Bruce Fields [EMAIL PROTECTED]
Signed-off-by: Neil Brown [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 fs/nfsd/export.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c
index f37df46..0747bb5 100644
--- a/fs/nfsd/export.c
+++ b/fs/nfsd/export.c
@@ -1104,6 +1104,10 @@ exp_rootfh(svc_client *clp, char *path, struct knfsd_fh 
*f, int maxsize)
 path, nd.dentry, clp-name,
 inode-i_sb-s_id, inode-i_ino);
exp = exp_parent(clp, nd.mnt, nd.dentry, NULL);
+   if (IS_ERR(exp)) {
+   err = PTR_ERR(exp);
+   goto out;
+   }
if (!exp) {
dprintk(nfsd: exp_rootfh export not found.\n);
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


[PATCH] lockdep: improve lockdep_reset()

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=23d95a03d63eff25118b50737006ce6e7c1b8def
Commit: 23d95a03d63eff25118b50737006ce6e7c1b8def
Parent: 81fc685a898f84d0787eeebb1c118de0bd3484a0
Author: Ingo Molnar [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:34:40 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:50 2006 -0800

[PATCH] lockdep: improve lockdep_reset()

Clear all the chains during lockdep_reset().  This fixes some 
locking-selftest
false positives i saw on -rt.  (never saw those on mainline though, but it
could happen.)

Signed-off-by: Ingo Molnar [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 kernel/lockdep.c |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/kernel/lockdep.c b/kernel/lockdep.c
index 5ba2825..77fa791 100644
--- a/kernel/lockdep.c
+++ b/kernel/lockdep.c
@@ -2437,6 +2437,7 @@ EXPORT_SYMBOL_GPL(lock_release);
 void lockdep_reset(void)
 {
unsigned long flags;
+   int i;
 
raw_local_irq_save(flags);
current-curr_chain_key = 0;
@@ -2447,6 +2448,8 @@ void lockdep_reset(void)
nr_softirq_chains = 0;
nr_process_chains = 0;
debug_locks = 1;
+   for (i = 0; i  CHAINHASH_SIZE; i++)
+   INIT_LIST_HEAD(chainhash_table + i);
raw_local_irq_restore(flags);
 }
 
-
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] n_r3964: Use struct pid to track user space clients

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3cec556a84be02bcd8755422eec61f1b9bee4e2f
Commit: 3cec556a84be02bcd8755422eec61f1b9bee4e2f
Parent: b3f13debd593dbd7242a4ecf6c9b4d529805e5a0
Author: Eric W. Biederman [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:35:10 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:53 2006 -0800

[PATCH] n_r3964: Use struct pid to track user space clients

Currently this driver tracks user space clients it should send signals to.  
In
the presenct of file descriptor passing this is appears susceptible to
confusion from pid wrap around issues.

Replacing this with a struct pid prevents us from getting confused, and
prepares for a pid namespace implementation.

Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Cc: David Woodhouse [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/char/n_r3964.c  |   37 +
 include/linux/n_r3964.h |2 +-
 2 files changed, 18 insertions(+), 21 deletions(-)

diff --git a/drivers/char/n_r3964.c b/drivers/char/n_r3964.c
index 103d338..dc6d418 100644
--- a/drivers/char/n_r3964.c
+++ b/drivers/char/n_r3964.c
@@ -125,8 +125,8 @@ static void transmit_block(struct r3964_info *pInfo);
 static void receive_char(struct r3964_info *pInfo, const unsigned char c);
 static void receive_error(struct r3964_info *pInfo, const char flag);
 static void on_timeout(unsigned long priv);
-static int enable_signals(struct r3964_info *pInfo, pid_t pid, int arg);
-static int read_telegram(struct r3964_info *pInfo, pid_t pid, unsigned char 
__user *buf);
+static int enable_signals(struct r3964_info *pInfo, struct pid *pid, int arg);
+static int read_telegram(struct r3964_info *pInfo, struct pid *pid, unsigned 
char __user *buf);
 static void add_msg(struct r3964_client_info *pClient, int msg_id, int arg,
  int error_code, struct r3964_block_header *pBlock);
 static struct r3964_message* remove_msg(struct r3964_info *pInfo, 
@@ -829,7 +829,7 @@ static void on_timeout(unsigned long priv)
 }
 
 static struct r3964_client_info *findClient(
-  struct r3964_info *pInfo, pid_t pid)
+  struct r3964_info *pInfo, struct pid *pid)
 {
struct r3964_client_info *pClient;

@@ -843,7 +843,7 @@ static struct r3964_client_info *findClient(
return NULL;
 }
 
-static int enable_signals(struct r3964_info *pInfo, pid_t pid, int arg)
+static int enable_signals(struct r3964_info *pInfo, struct pid *pid, int arg)
 {
struct r3964_client_info *pClient;
struct r3964_client_info **ppClient;
@@ -858,7 +858,7 @@ static int enable_signals(struct r3964_info *pInfo, pid_t 
pid, int arg)
  
  if(pClient-pid == pid)
  {
-TRACE_PS(removing client %d from client list, pid);
+TRACE_PS(removing client %d from client list, pid_nr(pid));
 *ppClient = pClient-next;
 while(pClient-msg_count)
 {
@@ -869,6 +869,7 @@ static int enable_signals(struct r3964_info *pInfo, pid_t 
pid, int arg)
   TRACE_M(enable_signals - msg kfree %p,pMsg);
}
 }
+   put_pid(pClient-pid);
 kfree(pClient);
 TRACE_M(enable_signals - kfree %p,pClient);
 return 0;
@@ -892,10 +893,10 @@ static int enable_signals(struct r3964_info *pInfo, pid_t 
pid, int arg)
  if(pClient==NULL)
 return -ENOMEM;
 
- TRACE_PS(add client %d to client list, pid);
+ TRACE_PS(add client %d to client list, pid_nr(pid));
 spin_lock_init(pClient-lock);
  pClient-sig_flags=arg;
- pClient-pid = pid;
+ pClient-pid = get_pid(pid);
  pClient-next=pInfo-firstClient;
  pClient-first_msg = NULL;
  pClient-last_msg = NULL;
@@ -908,7 +909,7 @@ static int enable_signals(struct r3964_info *pInfo, pid_t 
pid, int arg)
return 0;
 }
 
-static int read_telegram(struct r3964_info *pInfo, pid_t pid, unsigned char 
__user *buf)
+static int read_telegram(struct r3964_info *pInfo, struct pid *pid, unsigned 
char __user *buf)
 {
 struct r3964_client_info *pClient;
 struct r3964_block_header *block;
@@ -1005,7 +1006,7 @@ queue_the_message:
/* Send SIGIO signal to client process: */
if(pClient-sig_flags  R3964_USE_SIGIO)
{
-  kill_proc(pClient-pid, SIGIO, 1);
+  kill_pid(pClient-pid, SIGIO, 1);
}
 }
 
@@ -1042,7 +1043,7 @@ static void remove_client_block(struct r3964_info *pInfo,
 {
 struct r3964_block_header *block;
 
-TRACE_PS(remove_client_block PID %d, pClient-pid);
+TRACE_PS(remove_client_block PID %d, pid_nr(pClient-pid));
 
 block=pClient-next_block_to_read;
 if(block)
@@ -1157,6 +1158,7 @@ static void r3964_close(struct tty_struct *tty)
  TRACE_M(r3964_close - msg kfree 

[PATCH] lockdep: fix possible races while disabling lock-debugging

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=74c383f1400f559562aa517d6d62f77245bddf52
Commit: 74c383f1400f559562aa517d6d62f77245bddf52
Parent: 3117df0453828bd045c16244e6f50e5714667a8a
Author: Ingo Molnar [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:34:43 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:50 2006 -0800

[PATCH] lockdep: fix possible races while disabling lock-debugging

Jarek Poplawski noticed that lockdep global state could be accessed in a
racy way if one CPU did a lockdep assert (shutting lockdep down), while the
other CPU would try to do something that changes its global state.

This patch fixes those races and cleans up lockdep's internal locking by
adding a graph_lock()/graph_unlock()/debug_locks_off_graph_unlock helpers.

(Also note that as we all know the Linux kernel is, by definition, bug-free
and perfect, so this code never triggers, so these fixes are highly
theoretical.  I wrote this patch for aesthetic reasons alone.)

[EMAIL PROTECTED]: build fix]
[EMAIL PROTECTED]: build fix's refix]
Signed-off-by: Ingo Molnar [EMAIL PROTECTED]
Signed-off-by: Jarek Poplawski [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 kernel/lockdep.c |  170 +-
 1 files changed, 105 insertions(+), 65 deletions(-)

diff --git a/kernel/lockdep.c b/kernel/lockdep.c
index 07a3d74..01e7505 100644
--- a/kernel/lockdep.c
+++ b/kernel/lockdep.c
@@ -43,13 +43,49 @@
 #include lockdep_internals.h
 
 /*
- * hash_lock: protects the lockdep hashes and class/list/hash allocators.
+ * lockdep_lock: protects the lockdep graph, the hashes and the
+ *   class/list/hash allocators.
  *
  * This is one of the rare exceptions where it's justified
  * to use a raw spinlock - we really dont want the spinlock
- * code to recurse back into the lockdep code.
+ * code to recurse back into the lockdep code...
  */
-static raw_spinlock_t hash_lock = (raw_spinlock_t)__RAW_SPIN_LOCK_UNLOCKED;
+static raw_spinlock_t lockdep_lock = (raw_spinlock_t)__RAW_SPIN_LOCK_UNLOCKED;
+
+static int graph_lock(void)
+{
+   __raw_spin_lock(lockdep_lock);
+   /*
+* Make sure that if another CPU detected a bug while
+* walking the graph we dont change it (while the other
+* CPU is busy printing out stuff with the graph lock
+* dropped already)
+*/
+   if (!debug_locks) {
+   __raw_spin_unlock(lockdep_lock);
+   return 0;
+   }
+   return 1;
+}
+
+static inline int graph_unlock(void)
+{
+   __raw_spin_unlock(lockdep_lock);
+   return 0;
+}
+
+/*
+ * Turn lock debugging off and return with 0 if it was off already,
+ * and also release the graph lock:
+ */
+static inline int debug_locks_off_graph_unlock(void)
+{
+   int ret = debug_locks_off();
+
+   __raw_spin_unlock(lockdep_lock);
+
+   return ret;
+}
 
 static int lockdep_initialized;
 
@@ -57,14 +93,15 @@ unsigned long nr_list_entries;
 static struct lock_list list_entries[MAX_LOCKDEP_ENTRIES];
 
 /*
- * Allocate a lockdep entry. (assumes hash_lock held, returns
+ * Allocate a lockdep entry. (assumes the graph_lock held, returns
  * with NULL on failure)
  */
 static struct lock_list *alloc_list_entry(void)
 {
if (nr_list_entries = MAX_LOCKDEP_ENTRIES) {
-   __raw_spin_unlock(hash_lock);
-   debug_locks_off();
+   if (!debug_locks_off_graph_unlock())
+   return NULL;
+
printk(BUG: MAX_LOCKDEP_ENTRIES too low!\n);
printk(turning off the locking correctness validator.\n);
return NULL;
@@ -205,7 +242,7 @@ static int softirq_verbose(struct lock_class *class)
 
 /*
  * Stack-trace: tightly packed array of stack backtrace
- * addresses. Protected by the hash_lock.
+ * addresses. Protected by the graph_lock.
  */
 unsigned long nr_stack_trace_entries;
 static unsigned long stack_trace[MAX_STACK_TRACE_ENTRIES];
@@ -224,18 +261,15 @@ static int save_trace(struct stack_trace *trace)
trace-max_entries = trace-nr_entries;
 
nr_stack_trace_entries += trace-nr_entries;
-   if (DEBUG_LOCKS_WARN_ON(nr_stack_trace_entries  
MAX_STACK_TRACE_ENTRIES)) {
-   __raw_spin_unlock(hash_lock);
-   return 0;
-   }
 
if (nr_stack_trace_entries == MAX_STACK_TRACE_ENTRIES) {
-   __raw_spin_unlock(hash_lock);
-   if (debug_locks_off()) {
-   printk(BUG: MAX_STACK_TRACE_ENTRIES too low!\n);
-   printk(turning off the locking correctness 
validator.\n);
-   dump_stack();
-   }
+   if (!debug_locks_off_graph_unlock())
+   return 0;
+
+   

[PATCH] KVM: Add MAINTAINERS entry

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=426d62e2158c2fd3aa1ed1fd62122afd2ccb89ae
Commit: 426d62e2158c2fd3aa1ed1fd62122afd2ccb89ae
Parent: 8c7bb723b4e36dbd4b144176116d126104dc65e0
Author: Avi Kivity [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:34:03 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:47 2006 -0800

[PATCH] KVM: Add MAINTAINERS entry

Signed-off-by: Avi Kivity [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 MAINTAINERS |7 +++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 8a0bfec..38df725 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1747,6 +1747,13 @@ W:   http://nfs.sourceforge.net/
 W: http://www.cse.unsw.edu.au/~neilb/patches/linux-devel/
 S: Maintained
 
+KERNEL VIRTUAL MACHINE (KVM)
+P: Avi Kivity
+M: [EMAIL PROTECTED]
+L: kvm-devel@lists.sourceforge.net
+W: kvm.sourceforge.net
+S: Supported
+
 KEXEC
 P: Eric Biederman
 M: [EMAIL PROTECTED]
-
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] KVM: MMU: Ignore pcd, pwt, and pat bits on ptes

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8c7bb723b4e36dbd4b144176116d126104dc65e0
Commit: 8c7bb723b4e36dbd4b144176116d126104dc65e0
Parent: 0770b19b94ed8fc97e1fcac91c320ec738919628
Author: Avi Kivity [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:34:02 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:47 2006 -0800

[PATCH] KVM: MMU: Ignore pcd, pwt, and pat bits on ptes

The pcd, pwt, and pat bits on page table entries affect the cpu cache.  
Since
the cache is a host resource, the guest should not be able to control it.
Moreover, the meaning of these bits changes depending on whether pat is
enabled or not.

So, force these bits to zero on shadow page table entries at all times.

Signed-off-by: Avi Kivity [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/kvm/mmu.c |   17 ++---
 drivers/kvm/paging_tmpl.h |   20 +++-
 2 files changed, 9 insertions(+), 28 deletions(-)

diff --git a/drivers/kvm/mmu.c b/drivers/kvm/mmu.c
index 4e29d9b..3d367cb 100644
--- a/drivers/kvm/mmu.c
+++ b/drivers/kvm/mmu.c
@@ -61,22 +61,9 @@
 
 
 #define PT32_PTE_COPY_MASK \
-   (PT_PRESENT_MASK | PT_PWT_MASK | PT_PCD_MASK | \
-   PT_ACCESSED_MASK | PT_DIRTY_MASK | PT_PAT_MASK | \
-   PT_GLOBAL_MASK )
-
-#define PT32_NON_PTE_COPY_MASK \
-   (PT_PRESENT_MASK | PT_PWT_MASK | PT_PCD_MASK | \
-   PT_ACCESSED_MASK | PT_DIRTY_MASK)
-
-
-#define PT64_PTE_COPY_MASK \
-   (PT64_NX_MASK | PT32_PTE_COPY_MASK)
-
-#define PT64_NON_PTE_COPY_MASK \
-   (PT64_NX_MASK | PT32_NON_PTE_COPY_MASK)
-
+   (PT_PRESENT_MASK | PT_ACCESSED_MASK | PT_DIRTY_MASK | PT_GLOBAL_MASK)
 
+#define PT64_PTE_COPY_MASK (PT64_NX_MASK | PT32_PTE_COPY_MASK)
 
 #define PT_FIRST_AVAIL_BITS_SHIFT 9
 #define PT64_SECOND_AVAIL_BITS_SHIFT 52
diff --git a/drivers/kvm/paging_tmpl.h b/drivers/kvm/paging_tmpl.h
index 765c2e1..a9771b4 100644
--- a/drivers/kvm/paging_tmpl.h
+++ b/drivers/kvm/paging_tmpl.h
@@ -32,7 +32,6 @@
#define SHADOW_PT_INDEX(addr, level) PT64_INDEX(addr, level)
#define PT_LEVEL_MASK(level) PT64_LEVEL_MASK(level)
#define PT_PTE_COPY_MASK PT64_PTE_COPY_MASK
-   #define PT_NON_PTE_COPY_MASK PT64_NON_PTE_COPY_MASK
 #elif PTTYPE == 32
#define pt_element_t u32
#define guest_walker guest_walker32
@@ -43,7 +42,6 @@
#define SHADOW_PT_INDEX(addr, level) PT64_INDEX(addr, level)
#define PT_LEVEL_MASK(level) PT32_LEVEL_MASK(level)
#define PT_PTE_COPY_MASK PT32_PTE_COPY_MASK
-   #define PT_NON_PTE_COPY_MASK PT32_NON_PTE_COPY_MASK
 #else
#error Invalid PTTYPE value
 #endif
@@ -105,9 +103,7 @@ static void FNAME(set_pde)(struct kvm_vcpu *vcpu, u64 
guest_pde,
if (PTTYPE == 32  is_cpuid_PSE36())
gaddr |= (guest_pde  PT32_DIR_PSE36_MASK) 
(32 - PT32_DIR_PSE36_SHIFT);
-   *shadow_pte = (guest_pde  (PT_NON_PTE_COPY_MASK | PT_GLOBAL_MASK)) |
- ((guest_pde  PT_DIR_PAT_MASK) 
-   (PT_DIR_PAT_SHIFT - PT_PAT_SHIFT));
+   *shadow_pte = guest_pde  PT_PTE_COPY_MASK;
set_pte_common(vcpu, shadow_pte, gaddr,
   guest_pde  PT_DIRTY_MASK, access_bits);
 }
@@ -162,6 +158,7 @@ static u64 *FNAME(fetch)(struct kvm_vcpu *vcpu, gva_t addr,
u32 index = SHADOW_PT_INDEX(addr, level);
u64 *shadow_ent = ((u64 *)__va(shadow_addr)) + index;
pt_element_t *guest_ent;
+   u64 shadow_pte;
 
if (is_present_pte(*shadow_ent) || is_io_pte(*shadow_ent)) {
if (level == PT_PAGE_TABLE_LEVEL)
@@ -204,14 +201,11 @@ static u64 *FNAME(fetch)(struct kvm_vcpu *vcpu, gva_t 
addr,
shadow_addr = kvm_mmu_alloc_page(vcpu, shadow_ent);
if (!VALID_PAGE(shadow_addr))
return ERR_PTR(-ENOMEM);
-   if (!kvm_arch_ops-is_long_mode(vcpu)  level == 3)
-   *shadow_ent = shadow_addr |
-   (*guest_ent  (PT_PRESENT_MASK | PT_PWT_MASK | 
PT_PCD_MASK));
-   else {
-   *shadow_ent = shadow_addr |
-   (*guest_ent  PT_NON_PTE_COPY_MASK);
-   *shadow_ent |= (PT_WRITABLE_MASK | PT_USER_MASK);
-   }
+   shadow_pte = shadow_addr | PT_PRESENT_MASK;
+   if (vcpu-mmu.root_level  3 || level != 3)
+   shadow_pte |= PT_ACCESSED_MASK
+   | PT_WRITABLE_MASK | PT_USER_MASK;
+   *shadow_ent = shadow_pte;
prev_shadow_ent = shadow_ent;
}
 }
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]

[PATCH] tty: remove useless memory barrier

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=34f8f0a5e953d3e40c4419e5e5c4b6fd14f7ebf2
Commit: 34f8f0a5e953d3e40c4419e5e5c4b6fd14f7ebf2
Parent: cd86128088554d64fea1679191509f00e6353c5b
Author: Ralf Baechle [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:34:57 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:52 2006 -0800

[PATCH] tty: remove useless memory barrier

I don't see why there is a memory barrier in copy_from_read_buf() at all.
Even if it was useful spin_unlock_irqrestore implies a barrier.

Signed-off-by: Ralf Baechle [EMAIL PROTECTED]
Cc: Alan Cox [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/char/n_tty.c |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/char/n_tty.c b/drivers/char/n_tty.c
index e96a00f..2bdb014 100644
--- a/drivers/char/n_tty.c
+++ b/drivers/char/n_tty.c
@@ -1151,7 +1151,6 @@ static int copy_from_read_buf(struct tty_struct *tty,
n = min(*nr, n);
spin_unlock_irqrestore(tty-read_lock, flags);
if (n) {
-   mb();
retval = copy_to_user(*b, tty-read_buf[tty-read_tail], n);
n -= retval;
spin_lock_irqsave(tty-read_lock, flags);
-
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] ide: optimize HPT37x timing tables

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=471a0bda5a2de5b0fd3b58255791eb831517a52c
Commit: 471a0bda5a2de5b0fd3b58255791eb831517a52c
Parent: 9448732f6c9ef4932b226056338d1084f3669752
Author: Sergei Shtylyov [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:35:49 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:55 2006 -0800

[PATCH] ide: optimize HPT37x timing tables

Save some space on the timing tables by introducing the separate transfer 
mode
table in which the mode lookup is done to get the index into the timing 
table
itself.  Get rid of the rest of the obsolete/duplicate tables and use one 
set
of tables for the whole HPT37x chip family like the HighPoint open-source
drivers do.  Documnent the different timing register layout for the HPT36x
chip family (this is my guesswork based on the timing values).

Have been tested and works fine on HPT370/302/371N.

Signed-off-by: Sergei Shtylyov [EMAIL PROTECTED]
Cc: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
Cc: Alan Cox [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/ide/pci/hpt366.c |  404 --
 1 files changed, 174 insertions(+), 230 deletions(-)

diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c
index 51f40f2..787efd3 100644
--- a/drivers/ide/pci/hpt366.c
+++ b/drivers/ide/pci/hpt366.c
@@ -67,10 +67,9 @@
  * - add support for HPT302N and HPT371N clocking (the same as for HPT372N)
  * - HPT371/N are single channel chips, so avoid touching the primary channel
  *   which exists only virtually (there's no pins for it)
- * - fix/remove bad/unused timing tables: HPT370/A  66 MHz tables weren't 
really
- *   needed and had many modes over- and  underclocked,  HPT372 33 MHz table 
was
- *   for 66 MHz and 50 MHz table missed UltraDMA mode 6, HPT374 33 MHz table 
was
- *   really for 50 MHz; switch to using HPT372 tables for HPT374...
+ * - fix/remove bad/unused timing tables and use one set of tables for the 
whole
+ *   HPT37x chip family; save space by introducing the separate transfer mode
+ *   table in which the mode lookup is done
  * [EMAIL PROTECTED]
  *
  */
@@ -162,214 +161,168 @@ static const char *bad_ata33[] = {
NULL
 };
 
-struct chipset_bus_clock_list_entry {
-   u8  xfer_speed;
-   unsigned intchipset_settings;
+static u8 xfer_speeds[] = {
+   XFER_UDMA_6,
+   XFER_UDMA_5,
+   XFER_UDMA_4,
+   XFER_UDMA_3,
+   XFER_UDMA_2,
+   XFER_UDMA_1,
+   XFER_UDMA_0,
+
+   XFER_MW_DMA_2,
+   XFER_MW_DMA_1,
+   XFER_MW_DMA_0,
+
+   XFER_PIO_4,
+   XFER_PIO_3,
+   XFER_PIO_2,
+   XFER_PIO_1,
+   XFER_PIO_0
 };
 
-/* key for bus clock timings
- * bit
- * 0:3data_high_time. inactive time of DIOW_/DIOR_ for PIO and MW
- *DMA. cycles = value + 1
- * 4:8data_low_time. active time of DIOW_/DIOR_ for PIO and MW
- *DMA. cycles = value + 1
- * 9:12   cmd_high_time. inactive time of DIOW_/DIOR_ during task file
- *register access.
- * 13:17  cmd_low_time. active time of DIOW_/DIOR_ during task file
- *register access.
- * 18:21  udma_cycle_time. clock freq and clock cycles for UDMA xfer.
- *during task file register access.
- * 22:24  pre_high_time. time to initialize 1st cycle for PIO and MW DMA
- *xfer.
- * 25:27  cmd_pre_high_time. time to initialize 1st PIO cycle for task
- *register access.
- * 28 UDMA enable
- * 29 DMA enable
- * 30 PIO_MST enable. if set, the chip is in bus master mode during
- *PIO.
- * 31 FIFO enable.
+/* Key for bus clock timings
+ * 36x   37x
+ * bits  bits
+ * 0:3  0:3data_high_time. Inactive time of DIOW_/DIOR_ for PIO and MW DMA.
+ * cycles = value + 1
+ * 4:7  4:8data_low_time. Active time of DIOW_/DIOR_ for PIO and MW DMA.
+ * cycles = value + 1
+ * 8:11  9:12  cmd_high_time. Inactive time of DIOW_/DIOR_ during task file
+ * register access.
+ * 12:15 13:17 cmd_low_time. Active time of DIOW_/DIOR_ during task file
+ * register access.
+ * 16:18 18:20 udma_cycle_time. Clock cycles for UDMA xfer.
+ * -21 CLK frequency: 0=ATA clock, 1=dual ATA clock.
+ * 19:21 22:24 pre_high_time. Time to initialize the 1st cycle for PIO and
+ * MW DMA xfer.
+ * 22:24 25:27 cmd_pre_high_time. Time to initialize the 1st PIO cycle for
+ * task file register access.
+ * 28   28 UDMA enable.
+ * 29   29 DMA  enable.
+ * 30   30 PIO MST enable. If set, the chip is in bus master mode during
+ * PIO xfer.
+ * 31   31 FIFO enable.
  */
-static struct chipset_bus_clock_list_entry forty_base_hpt366[] = {
-   {   XFER_UDMA_4,0x900fd943  },
-   {   

[PATCH] MIPS: Fix COW D-cache aliasing on fork

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bcd022801ee514e28c32837f0b3ce18c775f1a7b
Commit: bcd022801ee514e28c32837f0b3ce18c775f1a7b
Parent: 9de455b20705f36384a711d4a20bcf7ba1ab180b
Author: Atsushi Nemoto [EMAIL PROTECTED]
AuthorDate: Tue Dec 12 17:14:56 2006 +
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:27:08 2006 -0800

[PATCH] MIPS: Fix COW D-cache aliasing on fork

Provide a custom copy_user_highpage() to deal with aliasing issues on
MIPS.  It uses kmap_coherent() to map an user page for kernel with same
color.  Rewrite copy_to_user_page() and copy_from_user_page() with the
new interfaces to avoid extra cache flushing.

The main part of this patch was originally written by Ralf Baechle;
Atushi Nemoto did the the debugging.

Signed-off-by: Atsushi Nemoto [EMAIL PROTECTED]
Signed-off-by: Ralf Baechle [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/mips/mm/init.c |   25 +
 include/asm-mips/page.h |   16 ++--
 2 files changed, 31 insertions(+), 10 deletions(-)

diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c
index ea2d153..30245c0 100644
--- a/arch/mips/mm/init.c
+++ b/arch/mips/mm/init.c
@@ -203,6 +203,31 @@ static inline void kunmap_coherent(struct page *page)
preempt_check_resched();
 }
 
+void copy_user_highpage(struct page *to, struct page *from,
+   unsigned long vaddr, struct vm_area_struct *vma)
+{
+   void *vfrom, *vto;
+
+   vto = kmap_atomic(to, KM_USER1);
+   if (cpu_has_dc_aliases) {
+   vfrom = kmap_coherent(from, vaddr);
+   copy_page(vto, vfrom);
+   kunmap_coherent(from);
+   } else {
+   vfrom = kmap_atomic(from, KM_USER0);
+   copy_page(vto, vfrom);
+   kunmap_atomic(vfrom, KM_USER0);
+   }
+   if (((vma-vm_flags  VM_EXEC)  !cpu_has_ic_fills_f_dc) ||
+   pages_do_alias((unsigned long)vto, vaddr  PAGE_MASK))
+   flush_data_cache_page((unsigned long)vto);
+   kunmap_atomic(vto, KM_USER1);
+   /* Make sure this page is cleared on other CPU's too before using it */
+   smp_wmb();
+}
+
+EXPORT_SYMBOL(copy_user_highpage);
+
 void copy_to_user_page(struct vm_area_struct *vma,
struct page *page, unsigned long vaddr, void *dst, const void *src,
unsigned long len)
diff --git a/include/asm-mips/page.h b/include/asm-mips/page.h
index 0dc1a45..2f9e1a9 100644
--- a/include/asm-mips/page.h
+++ b/include/asm-mips/page.h
@@ -35,7 +35,6 @@
 #ifndef __ASSEMBLY__
 
 #include linux/pfn.h
-#include asm/cpu-features.h
 #include asm/io.h
 
 extern void clear_page(void * page);
@@ -61,16 +60,13 @@ static inline void clear_user_page(void *addr, unsigned 
long vaddr,
flush_data_cache_page((unsigned long)addr);
 }
 
-static inline void copy_user_page(void *vto, void *vfrom, unsigned long vaddr,
-   struct page *to)
-{
-   extern void (*flush_data_cache_page)(unsigned long addr);
+extern void copy_user_page(void *vto, void *vfrom, unsigned long vaddr,
+   struct page *to);
+struct vm_area_struct;
+extern void copy_user_highpage(struct page *to, struct page *from,
+   unsigned long vaddr, struct vm_area_struct *vma);
 
-   copy_page(vto, vfrom);
-   if (!cpu_has_ic_fills_f_dc ||
-   pages_do_alias((unsigned long)vto, vaddr  PAGE_MASK))
-   flush_data_cache_page((unsigned long)vto);
-}
+#define __HAVE_ARCH_COPY_USER_HIGHPAGE
 
 /*
  * These are used to make use of C type-checking..
-
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 more workqueue build breakage (tps65010)

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8c1bc04e793a7ff4004180aa42890c3d382ec87f
Commit: 8c1bc04e793a7ff4004180aa42890c3d382ec87f
Parent: 05b3e0c2c791a70bf0735aaec53cdf6d340eef85
Author: David Brownell [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:33:46 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:46 2006 -0800

[PATCH] fix more workqueue build breakage (tps65010)

More fixes to build breakage from the work_struct changes ...  this updates
the tps65010 driver.  Plus, fix some dependencies related to the way it's
used on the OMAP OSK: force static linking there, since the resulting
kernel can't link.

NOTE that until the i2c core gets fixed to work without SMBUS_QUICK,
kernels needing this driver must still use tps65010.force=0,0x48 on the
command line.

Signed-off-by: David Brownell [EMAIL PROTECTED]
Cc: Jean Delvare [EMAIL PROTECTED]
Cc: Russell King [EMAIL PROTECTED]
Cc: David Howells [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/arm/mach-omap1/Kconfig  |1 +
 drivers/i2c/chips/tps65010.c |   21 -
 2 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/arch/arm/mach-omap1/Kconfig b/arch/arm/mach-omap1/Kconfig
index d135568..8781aae 100644
--- a/arch/arm/mach-omap1/Kconfig
+++ b/arch/arm/mach-omap1/Kconfig
@@ -43,6 +43,7 @@ config MACH_OMAP_H3
 config MACH_OMAP_OSK
bool TI OSK Support
depends on ARCH_OMAP1  ARCH_OMAP16XX
+   select TPS65010
help
  TI OMAP 5912 OSK (OMAP Starter Kit) board support. Say Y here
   if you have such a board.
diff --git a/drivers/i2c/chips/tps65010.c b/drivers/i2c/chips/tps65010.c
index 60bef94..4ee56de 100644
--- a/drivers/i2c/chips/tps65010.c
+++ b/drivers/i2c/chips/tps65010.c
@@ -82,7 +82,7 @@ struct tps65010 {
struct i2c_client   client;
struct mutexlock;
int irq;
-   struct work_struct  work;
+   struct delayed_work work;
struct dentry   *file;
unsignedcharging:1;
unsignedpor:1;
@@ -328,7 +328,7 @@ static void tps65010_interrupt(struct tps65010 *tps)
 {
u8 tmp = 0, mask, poll;
 
-   /* IRQs won't trigger irqs for certain events, but we can get
+   /* IRQs won't trigger for certain events, but we can get
 * others by polling (normally, with external power applied).
 */
poll = 0;
@@ -411,10 +411,11 @@ static void tps65010_interrupt(struct tps65010 *tps)
 }
 
 /* handle IRQs and polling using keventd for now */
-static void tps65010_work(void *_tps)
+static void tps65010_work(struct work_struct *work)
 {
-   struct tps65010 *tps = _tps;
+   struct tps65010 *tps;
 
+   tps = container_of(work, struct tps65010, work.work);
mutex_lock(tps-lock);
 
tps65010_interrupt(tps);
@@ -452,7 +453,7 @@ static irqreturn_t tps65010_irq(int irq, void *_tps)
 
disable_irq_nosync(irq);
set_bit(FLAG_IRQ_ENABLE, tps-flags);
-   (void) schedule_work(tps-work);
+   (void) schedule_work(tps-work.work);
return IRQ_HANDLED;
 }
 
@@ -465,13 +466,15 @@ static int __exit tps65010_detach_client(struct 
i2c_client *client)
struct tps65010 *tps;
 
tps = container_of(client, struct tps65010, client);
+   free_irq(tps-irq, tps);
 #ifdef CONFIG_ARM
if (machine_is_omap_h2())
omap_free_gpio(58);
if (machine_is_omap_osk())
omap_free_gpio(OMAP_MPUIO(1));
 #endif
-   free_irq(tps-irq, tps);
+   cancel_delayed_work(tps-work);
+   flush_scheduled_work();
debugfs_remove(tps-file);
if (i2c_detach_client(client) == 0)
kfree(tps);
@@ -505,7 +508,7 @@ tps65010_probe(struct i2c_adapter *bus, int address, int 
kind)
return 0;
 
mutex_init(tps-lock);
-   INIT_WORK(tps-work, tps65010_work, tps);
+   INIT_DELAYED_WORK(tps-work, tps65010_work);
tps-irq = -1;
tps-client.addr = address;
tps-client.adapter = bus;
@@ -620,7 +623,7 @@ tps65010_probe(struct i2c_adapter *bus, int address, int 
kind)
(void) i2c_smbus_write_byte_data(tps-client, TPS_MASK3, 0x0f
| i2c_smbus_read_byte_data(tps-client, TPS_MASK3));
 
-   tps65010_work(tps);
+   tps65010_work(tps-work.work);
 
tps-file = debugfs_create_file(DRIVER_NAME, S_IRUGO, NULL,
tps, DEBUG_FOPS);
@@ -672,7 +675,7 @@ int tps65010_set_vbus_draw(unsigned mA)
 test_and_set_bit(
FLAG_VBUS_CHANGED, the_tps-flags)) {
/* gadget drivers call this in_irq() */
-   (void) schedule_work(the_tps-work);

[PATCH 2/2] cciss: remove calls to pci_disable_device

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c4977f596c5bce4d20fbd22cdb03486112985622
Commit: c4977f596c5bce4d20fbd22cdb03486112985622
Parent: 98040015bc5d6cea3bd2dcb642fe1e8c4bded8e1
Author: [EMAIL PROTECTED] [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 13:10:04 2006 +0100
Committer:  Jens Axboe [EMAIL PROTECTED]
CommitDate: Wed Dec 13 13:10:04 2006 +0100

[PATCH 2/2] cciss: remove calls to pci_disable_device

This patch removes calls to pci_disable_device except in fail_all_cmds. The
pci_disable_device function does something nasty to Smart Array controllers
that pci_enable_device does not undo. So if the driver is unloaded it 
cannot be
reloaded.

Also, customers can disable any pci device via the ROM Based Setup Utility
(RBSU). If the customer has disabled the controller we should not try to
blindly enable the card from the driver.  Please consider this for 
inclusion.

Signed-off-by: Mike Miller [EMAIL PROTECTED]
Acked-by: Alan Cox [EMAIL PROTECTED]
Signed-off-by: Jens Axboe [EMAIL PROTECTED]
---
 drivers/block/cciss.c |6 +-
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index 8879e95..335e218 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -3006,10 +3006,8 @@ static int cciss_pci_init(ctlr_info_t *c, struct pci_dev 
*pdev)
 
   err_out_free_res:
pci_release_regions(pdev);
-
-  err_out_disable_pdev:
-   pci_disable_device(pdev);
return err;
+
 }
 
 /*
@@ -3383,7 +3381,6 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
blk_cleanup_queue(drv-queue);
}
pci_release_regions(pdev);
-   pci_disable_device(pdev);
pci_set_drvdata(pdev, NULL);
free_hba(i);
return -1;
@@ -3453,7 +3450,6 @@ static void __devexit cciss_remove_one(struct pci_dev 
*pdev)
kfree(hba[i]-scsi_rejects.complete);
 #endif
pci_release_regions(pdev);
-   pci_disable_device(pdev);
pci_set_drvdata(pdev, NULL);
free_hba(i);
 }
-
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


hwmon/pc87360: Autodetect the VRM version

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3d7f9a8697ffe76e9edaf6b1751f2a2db660e4d5
Commit: 3d7f9a8697ffe76e9edaf6b1751f2a2db660e4d5
Parent: e9cea646014e25aa96eefa1b41d373a6ad95c189
Author: Jim Cromie [EMAIL PROTECTED]
AuthorDate: Tue Dec 12 18:18:28 2006 +0100
Committer:  Jean Delvare [EMAIL PROTECTED]
CommitDate: Tue Dec 12 18:18:28 2006 +0100

hwmon/pc87360: Autodetect the VRM version

pc87360 currently hardcodes vrm = 90 (2.4 vintage).  Update it to use
newer code in hwmon-vid which reads cpuid to determine the correct vid.

Signed-off-by: Jim Cromie [EMAIL PROTECTED]
Signed-off-by: Jean Delvare [EMAIL PROTECTED]
---
 drivers/hwmon/pc87360.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/hwmon/pc87360.c b/drivers/hwmon/pc87360.c
index 3b8b819..c8a21be 100644
--- a/drivers/hwmon/pc87360.c
+++ b/drivers/hwmon/pc87360.c
@@ -1000,7 +1000,7 @@ static int pc87360_detect(struct i2c_adapter *adapter)
(i0x02) ? external : internal);
 
data-vid_conf = confreg[3];
-   data-vrm = 90;
+   data-vrm = vid_which_vrm();
}
 
/* Fan clock dividers may be needed before any data is read */
-
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] i2o_exec_exit and i2o_driver_exit should not be __exit.

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d78437245aa3842e8eeaef2709753ac485465652
Commit: d78437245aa3842e8eeaef2709753ac485465652
Parent: 39f07223d400330b9e08aae4c77a391f2418023e
Author: Ralf Baechle [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:33:53 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:47 2006 -0800

[PATCH] i2o_exec_exit and i2o_driver_exit should not be __exit.

i2o_exec_exit and i2o_driver_exit were marked as __exit which is a bug
because both are invoked from __init and __exit functions.

Signed-off-by: Ralf Baechle [EMAIL PROTECTED]
Cc: Markus Lidel [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/message/i2o/core.h |4 ++--
 drivers/message/i2o/driver.c   |2 +-
 drivers/message/i2o/exec-osm.c |2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/message/i2o/core.h b/drivers/message/i2o/core.h
index dc388a3..cbe384f 100644
--- a/drivers/message/i2o/core.h
+++ b/drivers/message/i2o/core.h
@@ -18,7 +18,7 @@ extern struct i2o_driver i2o_exec_driver;
 extern int i2o_exec_lct_get(struct i2o_controller *);
 
 extern int __init i2o_exec_init(void);
-extern void __exit i2o_exec_exit(void);
+extern void i2o_exec_exit(void);
 
 /* driver */
 extern struct bus_type i2o_bus_type;
@@ -26,7 +26,7 @@ extern struct bus_type i2o_bus_type;
 extern int i2o_driver_dispatch(struct i2o_controller *, u32);
 
 extern int __init i2o_driver_init(void);
-extern void __exit i2o_driver_exit(void);
+extern void i2o_driver_exit(void);
 
 /* PCI */
 extern int __init i2o_pci_init(void);
diff --git a/drivers/message/i2o/driver.c b/drivers/message/i2o/driver.c
index 9104b65..d3235f2 100644
--- a/drivers/message/i2o/driver.c
+++ b/drivers/message/i2o/driver.c
@@ -362,7 +362,7 @@ int __init i2o_driver_init(void)
  *
  * Unregisters the I2O bus and frees driver array.
  */
-void __exit i2o_driver_exit(void)
+void i2o_driver_exit(void)
 {
bus_unregister(i2o_bus_type);
kfree(i2o_drivers);
diff --git a/drivers/message/i2o/exec-osm.c b/drivers/message/i2o/exec-osm.c
index 902753b..a539d3b 100644
--- a/drivers/message/i2o/exec-osm.c
+++ b/drivers/message/i2o/exec-osm.c
@@ -595,7 +595,7 @@ int __init i2o_exec_init(void)
  *
  * Unregisters the Exec OSM from the I2O core.
  */
-void __exit i2o_exec_exit(void)
+void i2o_exec_exit(void)
 {
i2o_driver_unregister(i2o_exec_driver);
 };
-
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] knfsd: nfsd: simplify exp_pseudoroot

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6899320c2cefe5ae6b606f820ba8b762ba21f34a
Commit: 6899320c2cefe5ae6b606f820ba8b762ba21f34a
Parent: 4b41bd85d5f93af37c2730df172aeb54280be7c3
Author: J.Bruce Fields [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:35:23 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:54 2006 -0800

[PATCH] knfsd: nfsd: simplify exp_pseudoroot

Note there's no need for special handling of -EAGAIN here; nfserrno() does
what we want already.  So this is a pure cleanup with no change in
functionality.

Signed-off-by: J. Bruce Fields [EMAIL PROTECTED]
Signed-off-by: Neil Brown [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 fs/nfsd/export.c |6 ++
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c
index 0747bb5..b0591cd 100644
--- a/fs/nfsd/export.c
+++ b/fs/nfsd/export.c
@@ -1163,12 +1163,10 @@ exp_pseudoroot(struct auth_domain *clp, struct svc_fh 
*fhp,
mk_fsid_v1(fsidv, 0);
 
exp = exp_find(clp, 1, fsidv, creq);
-   if (IS_ERR(exp)  PTR_ERR(exp) == -EAGAIN)
-   return nfserr_dropit;
+   if (IS_ERR(exp))
+   return nfserrno(PTR_ERR(exp));
if (exp == NULL)
return nfserr_perm;
-   else if (IS_ERR(exp))
-   return nfserrno(PTR_ERR(exp));
rv = fh_compose(fhp, exp, exp-ex_dentry, NULL);
exp_put(exp);
return rv;
-
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] PM: Fix freezing of stopped tasks

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3df494a32b936aef76d893f5065f962ebd9b9437
Commit: 3df494a32b936aef76d893f5065f962ebd9b9437
Parent: 6a2d7a955d8de6cb19ed9cd194b3c83008a22c32
Author: Rafael J. Wysocki [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:34:28 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:49 2006 -0800

[PATCH] PM: Fix freezing of stopped tasks

Currently, if a task is stopped (ie.  it's in the TASK_STOPPED state), it
is considered by the freezer as unfreezeable.  However, there may be a race
between the freezer and the delivery of the continuation signal to the task
resulting in the task running after we have finished freezing the other
tasks.  This, in turn, may lead to undesirable effects up to and including
data corruption.

To prevent this from happening we first need to make the freezer consider
stopped tasks as freezeable.  For this purpose we need to make freezeable()
stop returning 0 for these tasks and we need to force them to enter the
refrigerator.  However, if there's no continuation signal in the meantime,
the stopped tasks should remain stopped after all processes have been
thawed, so we need to send an additional SIGSTOP to each of them before
waking it up.

Also, a stopped task that has just been woken up should first check if
there's a freezing request for it and go to the refrigerator if that's the
case.

Signed-off-by: Rafael J. Wysocki [EMAIL PROTECTED]
Acked-by: Pavel Machek [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 kernel/power/process.c |   12 ++--
 kernel/signal.c|4 +++-
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/kernel/power/process.c b/kernel/power/process.c
index 99eeb11..b9a3286 100644
--- a/kernel/power/process.c
+++ b/kernel/power/process.c
@@ -28,8 +28,7 @@ static inline int freezeable(struct task_struct * p)
if ((p == current) || 
(p-flags  PF_NOFREEZE) ||
(p-exit_state == EXIT_ZOMBIE) ||
-   (p-exit_state == EXIT_DEAD) ||
-   (p-state == TASK_STOPPED))
+   (p-exit_state == EXIT_DEAD))
return 0;
return 1;
 }
@@ -61,9 +60,12 @@ static inline void freeze_process(struct task_struct *p)
unsigned long flags;
 
if (!freezing(p)) {
+   if (p-state == TASK_STOPPED)
+   force_sig_specific(SIGSTOP, p);
+
freeze(p);
spin_lock_irqsave(p-sighand-siglock, flags);
-   signal_wake_up(p, 0);
+   signal_wake_up(p, p-state == TASK_STOPPED);
spin_unlock_irqrestore(p-sighand-siglock, flags);
}
 }
@@ -103,9 +105,7 @@ static unsigned int try_to_freeze_tasks(int 
freeze_user_space)
if (frozen(p))
continue;
 
-   if (p-state == TASK_TRACED 
-   (frozen(p-parent) ||
-p-parent-state == TASK_STOPPED)) {
+   if (p-state == TASK_TRACED  frozen(p-parent)) {
cancel_freezing(p);
continue;
}
diff --git a/kernel/signal.c b/kernel/signal.c
index 1921ffd..5630255 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -1705,7 +1705,9 @@ finish_stop(int stop_count)
read_unlock(tasklist_lock);
}
 
-   schedule();
+   do {
+   schedule();
+   } while (try_to_freeze());
/*
 * Now we don't run again until continued.
 */
-
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] More slab.h cleanups

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=55935a34a428a1497e3b37982e2782c09c6f914d
Commit: 55935a34a428a1497e3b37982e2782c09c6f914d
Parent: 2e892f43ccb602e8ffad73396a1000f2040c9e0b
Author: Christoph Lameter [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:34:24 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:49 2006 -0800

[PATCH] More slab.h cleanups

More cleanups for slab.h

1. Remove tabs from weird locations as suggested by Pekka

2. Drop the check for NUMA and SLAB_DEBUG from the fallback section
   as suggested by Pekka.

3. Uses static inline for the fallback defs as also suggested by Pekka.

4. Make kmem_ptr_valid take a const * argument.

5. Separate the NUMA fallback definitions from the kmalloc_track fallback
   definitions.

Signed-off-by: Christoph Lameter [EMAIL PROTECTED]
Cc: Pekka Enberg [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 include/linux/slab.h |   44 
 mm/slab.c|2 +-
 mm/slob.c|2 +-
 3 files changed, 26 insertions(+), 22 deletions(-)

diff --git a/include/linux/slab.h b/include/linux/slab.h
index e7a9c6b..1ef822e 100644
--- a/include/linux/slab.h
+++ b/include/linux/slab.h
@@ -20,11 +20,11 @@ typedef struct kmem_cache kmem_cache_t __deprecated;
  * Flags to pass to kmem_cache_create().
  * The ones marked DEBUG are only valid if CONFIG_SLAB_DEBUG is set.
  */
-#defineSLAB_DEBUG_FREE 0x0100UL/* DEBUG: Perform 
(expensive) checks on free */
-#defineSLAB_DEBUG_INITIAL  0x0200UL/* DEBUG: Call 
constructor (as verifier) */
-#defineSLAB_RED_ZONE   0x0400UL/* DEBUG: Red zone objs 
in a cache */
-#defineSLAB_POISON 0x0800UL/* DEBUG: Poison 
objects */
-#defineSLAB_HWCACHE_ALIGN  0x2000UL/* Align objs on cache 
lines */
+#define SLAB_DEBUG_FREE0x0100UL/* DEBUG: Perform 
(expensive) checks on free */
+#define SLAB_DEBUG_INITIAL 0x0200UL/* DEBUG: Call constructor (as 
verifier) */
+#define SLAB_RED_ZONE  0x0400UL/* DEBUG: Red zone objs in a 
cache */
+#define SLAB_POISON0x0800UL/* DEBUG: Poison objects */
+#define SLAB_HWCACHE_ALIGN 0x2000UL/* Align objs on cache lines */
 #define SLAB_CACHE_DMA 0x4000UL/* Use GFP_DMA memory */
 #define SLAB_MUST_HWCACHE_ALIGN0x8000UL/* Force alignment even 
if debuggin is active */
 #define SLAB_STORE_USER0x0001UL/* DEBUG: Store the 
last owner for bug hunting */
@@ -34,9 +34,9 @@ typedef struct kmem_cache kmem_cache_t __deprecated;
 #define SLAB_MEM_SPREAD0x0010UL/* Spread some memory 
over cpuset */
 
 /* Flags passed to a constructor functions */
-#defineSLAB_CTOR_CONSTRUCTOR   0x001UL /* If not set, then 
deconstructor */
+#define SLAB_CTOR_CONSTRUCTOR  0x001UL /* If not set, then 
deconstructor */
 #define SLAB_CTOR_ATOMIC   0x002UL /* Tell constructor it can't 
sleep */
-#defineSLAB_CTOR_VERIFY0x004UL /* Tell constructor 
it's a verify call */
+#define SLAB_CTOR_VERIFY   0x004UL /* Tell constructor it's a 
verify call */
 
 /*
  * struct kmem_cache related prototypes
@@ -55,7 +55,7 @@ void *kmem_cache_zalloc(struct kmem_cache *, gfp_t);
 void kmem_cache_free(struct kmem_cache *, void *);
 unsigned int kmem_cache_size(struct kmem_cache *);
 const char *kmem_cache_name(struct kmem_cache *);
-int kmem_ptr_validate(struct kmem_cache *cachep, void *ptr);
+int kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr);
 
 #ifdef CONFIG_NUMA
 extern void *kmem_cache_alloc_node(struct kmem_cache *, gfp_t flags, int node);
@@ -93,19 +93,15 @@ static inline void *kcalloc(size_t n, size_t size, gfp_t 
flags)
  * ways to convert kmalloc() calls to kmem_cache_alloc() invocations by 
selecting
  * the appropriate general cache at compile time.
  */
+
 #ifdef CONFIG_SLAB
 #include linux/slab_def.h
 #else
-
 /*
  * Fallback definitions for an allocator not wanting to provide
  * its own optimized kmalloc definitions (like SLOB).
  */
 
-#if defined(CONFIG_NUMA) || defined(CONFIG_DEBUG_SLAB)
-#error SLAB fallback definitions not usable for NUMA or Slab debug
-#endif
-
 /**
  * kmalloc - allocate memory
  * @size: how many bytes of memory are required.
@@ -151,7 +147,7 @@ static inline void *kcalloc(size_t n, size_t size, gfp_t 
flags)
  *
  * %__GFP_REPEAT - If allocation fails initially, try once more before failing.
  */
-void *kmalloc(size_t size, gfp_t flags)
+static inline void *kmalloc(size_t size, gfp_t flags)
 {
return __kmalloc(size, flags);
 }
@@ -161,12 +157,24 @@ void 

[PATCH] debug: add sysrq_always_enabled boot option

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5d6f647fc6bb57377c9f417c4752e43189f56bb1
Commit: 5d6f647fc6bb57377c9f417c4752e43189f56bb1
Parent: e61c90188b9956edae1105eef361d8981a352fcd
Author: Ingo Molnar [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:34:36 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:50 2006 -0800

[PATCH] debug: add sysrq_always_enabled boot option

Most distributions enable sysrq support but set it to 0 by default.  Add a
sysrq_always_enabled boot option to always-enable sysrq keys.  Useful for
debugging - without having to modify the disribution's config files (which
might not be possible if the kernel is on a live CD, etc.).

Also, while at it, clean up the sysrq interfaces.

[EMAIL PROTECTED]: make sysrq_always_enabled_setup() static]
Signed-off-by: Ingo Molnar [EMAIL PROTECTED]
Signed-off-by: Adrian Bunk [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 Documentation/kernel-parameters.txt |6 +
 drivers/char/sysrq.c|   37 +-
 drivers/char/viocons.c  |   10 +++-
 include/linux/sysrq.h   |   22 +---
 kernel/sysctl.c |3 +-
 5 files changed, 60 insertions(+), 18 deletions(-)

diff --git a/Documentation/kernel-parameters.txt 
b/Documentation/kernel-parameters.txt
index d8323b8..ef69c75 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1656,6 +1656,12 @@ and is between 256 and 4096 characters. It is defined in 
the file
sym53c416=  [HW,SCSI]
See header of drivers/scsi/sym53c416.c.
 
+   sysrq_always_enabled
+   [KNL]
+   Ignore sysrq setting - this boot parameter will
+   neutralize any effect of /proc/sys/kernel/sysrq.
+   Useful for debugging.
+
t128=   [HW,SCSI]
See header of drivers/scsi/t128.c.
 
diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c
index 05810c8..1393523 100644
--- a/drivers/char/sysrq.c
+++ b/drivers/char/sysrq.c
@@ -41,7 +41,34 @@
 #include asm/irq_regs.h
 
 /* Whether we react on sysrq keys or just ignore them */
-int sysrq_enabled = 1;
+int __read_mostly __sysrq_enabled = 1;
+
+static int __read_mostly sysrq_always_enabled;
+
+int sysrq_on(void)
+{
+   return __sysrq_enabled || sysrq_always_enabled;
+}
+
+/*
+ * A value of 1 means 'all', other nonzero values are an op mask:
+ */
+static inline int sysrq_on_mask(int mask)
+{
+   return sysrq_always_enabled || __sysrq_enabled == 1 ||
+   (__sysrq_enabled  mask);
+}
+
+static int __init sysrq_always_enabled_setup(char *str)
+{
+   sysrq_always_enabled = 1;
+   printk(KERN_INFO debug: sysrq always enabled.\n);
+
+   return 1;
+}
+
+__setup(sysrq_always_enabled, sysrq_always_enabled_setup);
+
 
 static void sysrq_handle_loglevel(int key, struct tty_struct *tty)
 {
@@ -379,8 +406,7 @@ void __handle_sysrq(int key, struct tty_struct *tty, int 
check_mask)
 * Should we check for enabled operations (/proc/sysrq-trigger
 * should not) and is the invoked operation enabled?
 */
-   if (!check_mask || sysrq_enabled == 1 ||
-   (sysrq_enabled  op_p-enable_mask)) {
+   if (!check_mask || sysrq_on_mask(op_p-enable_mask)) {
printk(%s\n, op_p-action_msg);
console_loglevel = orig_log_level;
op_p-handler(key, tty);
@@ -414,9 +440,8 @@ void __handle_sysrq(int key, struct tty_struct *tty, int 
check_mask)
  */
 void handle_sysrq(int key, struct tty_struct *tty)
 {
-   if (!sysrq_enabled)
-   return;
-   __handle_sysrq(key, tty, 1);
+   if (sysrq_on())
+   __handle_sysrq(key, tty, 1);
 }
 EXPORT_SYMBOL(handle_sysrq);
 
diff --git a/drivers/char/viocons.c b/drivers/char/viocons.c
index 6d2e314..0e0da44 100644
--- a/drivers/char/viocons.c
+++ b/drivers/char/viocons.c
@@ -61,10 +61,7 @@
 static DEFINE_SPINLOCK(consolelock);
 static DEFINE_SPINLOCK(consoleloglock);
 
-#ifdef CONFIG_MAGIC_SYSRQ
 static int vio_sysrq_pressed;
-extern int sysrq_enabled;
-#endif
 
 #define VIOCHAR_NUM_BUF16
 
@@ -936,8 +933,10 @@ static void vioHandleData(struct HvLpEvent *event)
 */
num_pushed = 0;
for (index = 0; index  cevent-len; index++) {
-#ifdef CONFIG_MAGIC_SYSRQ
-   if (sysrq_enabled) {
+   /*
+* Will be optimized away if !CONFIG_MAGIC_SYSRQ:
+*/
+   if (sysrq_on()) {
/* 0x0f is the ascii character for ^O */
  

[PATCH] cciss: remove calls to pci_disable_device

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=872225ca77519a243d7e19270b062b0ac53418d8
Commit: 872225ca77519a243d7e19270b062b0ac53418d8
Parent: a5b92873a87cc579f6399693e2c9ae6b43932ddf
Author: Mike Miller [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:34:22 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:49 2006 -0800

[PATCH] cciss: remove calls to pci_disable_device

Remove calls to pci_disable_device except in fail_all_cmds.  The
pci_disable_device function does something nasty to Smart Array controllers
that pci_enable_device does not undo.  So if the driver is unloaded it
cannot be reloaded.

Also, customers can disable any pci device via the ROM Based Setup Utility
(RBSU).  If the customer has disabled the controller we should not try to
blindly enable the card from the driver.  Please consider this for
inclusion.

Signed-off-by: Mike Miller [EMAIL PROTECTED]
Acked-by: Alan Cox [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/block/cciss.c |   19 +--
 1 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index 8879e95..730f969 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -2837,7 +2837,7 @@ static int cciss_pci_init(ctlr_info_t *c, struct pci_dev 
*pdev)
if (err) {
printk(KERN_ERR cciss: Cannot obtain PCI resources, 
   aborting\n);
-   goto err_out_disable_pdev;
+   return err;
}
 
subsystem_vendor_id = pdev-subsystem_vendor;
@@ -3005,10 +3005,11 @@ static int cciss_pci_init(ctlr_info_t *c, struct 
pci_dev *pdev)
return 0;
 
   err_out_free_res:
+   /*
+* Deliberately omit pci_disable_device(): it does something nasty to
+* Smart Array controllers that pci_enable_device does not undo
+*/
pci_release_regions(pdev);
-
-  err_out_disable_pdev:
-   pci_disable_device(pdev);
return err;
 }
 
@@ -3382,8 +3383,11 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
if (drv-queue)
blk_cleanup_queue(drv-queue);
}
+   /*
+* Deliberately omit pci_disable_device(): it does something nasty to
+* Smart Array controllers that pci_enable_device does not undo
+*/
pci_release_regions(pdev);
-   pci_disable_device(pdev);
pci_set_drvdata(pdev, NULL);
free_hba(i);
return -1;
@@ -3452,8 +3456,11 @@ static void __devexit cciss_remove_one(struct pci_dev 
*pdev)
 #ifdef CONFIG_CISS_SCSI_TAPE
kfree(hba[i]-scsi_rejects.complete);
 #endif
+   /*
+* Deliberately omit pci_disable_device(): it does something nasty to
+* Smart Array controllers that pci_enable_device does not undo
+*/
pci_release_regions(pdev);
-   pci_disable_device(pdev);
pci_set_drvdata(pdev, NULL);
free_hba(i);
 }
-
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


hwmon: Update Rudolf Marek's e-mail address

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7188cc66b4facf749e4fc0a44165b06716e1b621
Commit: 7188cc66b4facf749e4fc0a44165b06716e1b621
Parent: 75c990291dd7af84ea68f3c3ead934b51d0b81ad
Author: Jean Delvare [EMAIL PROTECTED]
AuthorDate: Tue Dec 12 18:18:30 2006 +0100
Committer:  Jean Delvare [EMAIL PROTECTED]
CommitDate: Tue Dec 12 18:18:30 2006 +0100

hwmon: Update Rudolf Marek's e-mail address

The Silicon Hill club is not what it used to be.

Signed-off-by: Rudolf Marek [EMAIL PROTECTED]
Signed-off-by: Jean Delvare [EMAIL PROTECTED]
---
 Documentation/hwmon/k8temp   |2 +-
 Documentation/hwmon/w83627ehf|2 +-
 Documentation/hwmon/w83791d  |2 +-
 MAINTAINERS  |2 +-
 drivers/hwmon/hwmon-vid.c|4 ++--
 drivers/hwmon/k8temp.c   |4 ++--
 drivers/hwmon/w83627ehf.c|2 +-
 drivers/hwmon/w83792d.c  |2 +-
 drivers/i2c/busses/i2c-ali1563.c |2 +-
 9 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/Documentation/hwmon/k8temp b/Documentation/hwmon/k8temp
index 30d123b..0005c71 100644
--- a/Documentation/hwmon/k8temp
+++ b/Documentation/hwmon/k8temp
@@ -8,7 +8,7 @@ Supported chips:
 Datasheet: 
http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/32559.pdf
 
 Author: Rudolf Marek
-Contact: Rudolf Marek [EMAIL PROTECTED]
+Contact: Rudolf Marek [EMAIL PROTECTED]
 
 Description
 ---
diff --git a/Documentation/hwmon/w83627ehf b/Documentation/hwmon/w83627ehf
index caa610a..8a15a74 100644
--- a/Documentation/hwmon/w83627ehf
+++ b/Documentation/hwmon/w83627ehf
@@ -10,7 +10,7 @@ Supported chips:
 Authors:
 Jean Delvare [EMAIL PROTECTED]
 Yuan Mu (Winbond)
-Rudolf Marek [EMAIL PROTECTED]
+Rudolf Marek [EMAIL PROTECTED]
 
 Description
 ---
diff --git a/Documentation/hwmon/w83791d b/Documentation/hwmon/w83791d
index 19b2ed7..db9881d 100644
--- a/Documentation/hwmon/w83791d
+++ b/Documentation/hwmon/w83791d
@@ -18,7 +18,7 @@ Credits:
 and Mark Studebaker [EMAIL PROTECTED]
   w83792d.c:
 Chunhao Huang [EMAIL PROTECTED],
-Rudolf Marek [EMAIL PROTECTED]
+Rudolf Marek [EMAIL PROTECTED]
 
 Additional contributors:
 Sven Anders [EMAIL PROTECTED]
diff --git a/MAINTAINERS b/MAINTAINERS
index dbf449b..c2eea29 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -277,7 +277,7 @@ S:  Maintained
 
 ALI1563 I2C DRIVER
 P: Rudolf Marek
-M: [EMAIL PROTECTED]
+M: [EMAIL PROTECTED]
 L: [EMAIL PROTECTED]
 S: Maintained
 
diff --git a/drivers/hwmon/hwmon-vid.c b/drivers/hwmon/hwmon-vid.c
index 9d67320..31c4200 100644
--- a/drivers/hwmon/hwmon-vid.c
+++ b/drivers/hwmon/hwmon-vid.c
@@ -1,7 +1,7 @@
 /*
 hwmon-vid.c - VID/VRM/VRD voltage conversions
 
-Copyright (c) 2004 Rudolf Marek [EMAIL PROTECTED]
+Copyright (c) 2004 Rudolf Marek [EMAIL PROTECTED]
 
 Partly imported from i2c-vid.h of the lm_sensors project
 Copyright (c) 2002 Mark D. Studebaker [EMAIL PROTECTED]
@@ -232,7 +232,7 @@ u8 vid_which_vrm(void)
 EXPORT_SYMBOL(vid_from_reg);
 EXPORT_SYMBOL(vid_which_vrm);
 
-MODULE_AUTHOR(Rudolf Marek [EMAIL PROTECTED]);
+MODULE_AUTHOR(Rudolf Marek [EMAIL PROTECTED]);
 
 MODULE_DESCRIPTION(hwmon-vid driver);
 MODULE_LICENSE(GPL);
diff --git a/drivers/hwmon/k8temp.c b/drivers/hwmon/k8temp.c
index f58b64e..5d8d0ca 100644
--- a/drivers/hwmon/k8temp.c
+++ b/drivers/hwmon/k8temp.c
@@ -1,7 +1,7 @@
 /*
  * k8temp.c - Linux kernel module for hardware monitoring
  *
- * Copyright (C) 2006 Rudolf Marek [EMAIL PROTECTED]
+ * Copyright (C) 2006 Rudolf Marek [EMAIL PROTECTED]
  *
  * Inspired from the w83785 and amd756 drivers.
  *
@@ -286,7 +286,7 @@ static void __exit k8temp_exit(void)
pci_unregister_driver(k8temp_driver);
 }
 
-MODULE_AUTHOR(Rudolf Marek [EMAIL PROTECTED]);
+MODULE_AUTHOR(Rudolf Marek [EMAIL PROTECTED]);
 MODULE_DESCRIPTION(AMD K8 core temperature monitor);
 MODULE_LICENSE(GPL);
 
diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c
index 2257806..212a155 100644
--- a/drivers/hwmon/w83627ehf.c
+++ b/drivers/hwmon/w83627ehf.c
@@ -3,7 +3,7 @@
 the Winbond W83627EHF Super-I/O chip
 Copyright (C) 2005  Jean Delvare [EMAIL PROTECTED]
 Copyright (C) 2006  Yuan Mu (Winbond),
-Rudolf Marek [EMAIL PROTECTED]
+Rudolf Marek [EMAIL PROTECTED]
 David Hubbard [EMAIL PROTECTED]
 
 Shamelessly ripped from the w83627hf driver
diff --git a/drivers/hwmon/w83792d.c b/drivers/hwmon/w83792d.c
index 4e10826..b0fa296 100644
--- a/drivers/hwmon/w83792d.c
+++ b/drivers/hwmon/w83792d.c
@@ -3,7 +3,7 @@
 monitoring
 Copyright (C) 2004, 2005 Winbond Electronics Corp.
 Chunhao Huang [EMAIL PROTECTED],
-Rudolf Marek [EMAIL PROTECTED]
+Rudolf Marek [EMAIL 

[PATCH] w1: Fix for kconfig entry typo

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=89040b21e7e2205985feb77f9a83138ab9cb0dfd
Commit: 89040b21e7e2205985feb77f9a83138ab9cb0dfd
Parent: bfdc0c280a497575670e87efa89e78a88438483b
Author: Evgeniy Polyakov [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:34:16 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:48 2006 -0800

[PATCH] w1: Fix for kconfig entry typo

Based on patch from Alexander Rigbo [EMAIL PROTECTED]

Signed-off-by: Evgeniy Polyakov [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/w1/slaves/Kconfig |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/w1/slaves/Kconfig b/drivers/w1/slaves/Kconfig
index d18d642..904e5ae 100644
--- a/drivers/w1/slaves/Kconfig
+++ b/drivers/w1/slaves/Kconfig
@@ -9,7 +9,7 @@ config W1_SLAVE_THERM
tristate Thermal family implementation
depends on W1
help
- Say Y here if you want to connect 1-wire thermal sensors to you
+ Say Y here if you want to connect 1-wire thermal sensors to your
  wire.
 
 config W1_SLAVE_SMEM
@@ -17,7 +17,7 @@ config W1_SLAVE_SMEM
depends on W1
help
  Say Y here if you want to connect 1-wire
- simple 64bit memory rom(ds2401/ds2411/ds1990*) to you wire.
+ simple 64bit memory rom(ds2401/ds2411/ds1990*) to your wire.
 
 config W1_SLAVE_DS2433
tristate 4kb EEPROM family support (DS2433)
-
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] KVM: Fix vmx hardware_enable() on macbooks

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bfdc0c280a497575670e87efa89e78a88438483b
Commit: bfdc0c280a497575670e87efa89e78a88438483b
Parent: 3b99ab242145c99ec8781dc267ec100e7f23ef9d
Author: Avi Kivity [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:34:16 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:48 2006 -0800

[PATCH] KVM: Fix vmx hardware_enable() on macbooks

It seems macbooks set bit 2 but not bit 0, which is an enabled but vmxon 
will
fault setting.

Signed-off-by: Avi Kivity [EMAIL PROTECTED]
Tested-by: Alex Larsson (sometimes testing helps)
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/kvm/vmx.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c
index ea3bdbb..f0f0b1a 100644
--- a/drivers/kvm/vmx.c
+++ b/drivers/kvm/vmx.c
@@ -534,7 +534,7 @@ static __init void hardware_enable(void *garbage)
u64 old;
 
rdmsrl(MSR_IA32_FEATURE_CONTROL, old);
-   if ((old  5) == 0)
+   if ((old  5) != 5)
/* enable and lock */
wrmsrl(MSR_IA32_FEATURE_CONTROL, old | 5);
write_cr4(read_cr4() | CR4_VMXE); /* FIXME: not cpu hotplug 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] optimize o_direct on block devices

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e61c90188b9956edae1105eef361d8981a352fcd
Commit: e61c90188b9956edae1105eef361d8981a352fcd
Parent: 7e913c53609d5e8374f55d6f29c0bcd6650a2362
Author: Chen, Kenneth W [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:34:36 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:50 2006 -0800

[PATCH] optimize o_direct on block devices

Implement block device specific .direct_IO method instead of going through
generic direct_io_worker for block device.

direct_io_worker() is fairly complex because it needs to handle O_DIRECT on
file system, where it needs to perform block allocation, hole detection,
extents file on write, and tons of other corner cases.  The end result is
that it takes tons of CPU time to submit an I/O.

For block device, the block allocation is much simpler and a tight triple
loop can be written to iterate each iovec and each page within the iovec in
order to construct/prepare bio structure and then subsequently submit it to
the block layer.  This significantly speeds up O_D on block device.

[EMAIL PROTECTED]: small speedup]
Signed-off-by: Ken Chen [EMAIL PROTECTED]
Cc: Christoph Hellwig [EMAIL PROTECTED]
Cc: Zach Brown [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 fs/bio.c|2 +-
 fs/block_dev.c  |  202 ---
 include/linux/aio.h |1 +
 include/linux/bio.h |1 +
 4 files changed, 178 insertions(+), 28 deletions(-)

diff --git a/fs/bio.c b/fs/bio.c
index 7ec737e..7618bcb 100644
--- a/fs/bio.c
+++ b/fs/bio.c
@@ -916,7 +916,7 @@ void bio_set_pages_dirty(struct bio *bio)
}
 }
 
-static void bio_release_pages(struct bio *bio)
+void bio_release_pages(struct bio *bio)
 {
struct bio_vec *bvec = bio-bi_io_vec;
int i;
diff --git a/fs/block_dev.c b/fs/block_dev.c
index 197f939..1715d6b 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -129,43 +129,191 @@ blkdev_get_block(struct inode *inode, sector_t iblock,
return 0;
 }
 
-static int
-blkdev_get_blocks(struct inode *inode, sector_t iblock,
-   struct buffer_head *bh, int create)
+static int blk_end_aio(struct bio *bio, unsigned int bytes_done, int error)
 {
-   sector_t end_block = max_block(I_BDEV(inode));
-   unsigned long max_blocks = bh-b_size  inode-i_blkbits;
+   struct kiocb *iocb = bio-bi_private;
+   atomic_t *bio_count = iocb-ki_bio_count;
 
-   if ((iblock + max_blocks)  end_block) {
-   max_blocks = end_block - iblock;
-   if ((long)max_blocks = 0) {
-   if (create)
-   return -EIO;/* write fully beyond EOF */
-   /*
-* It is a read which is fully beyond EOF.  We return
-* a !buffer_mapped buffer
-*/
-   max_blocks = 0;
-   }
+   if (bio_data_dir(bio) == READ)
+   bio_check_pages_dirty(bio);
+   else {
+   bio_release_pages(bio);
+   bio_put(bio);
+   }
+
+   /* iocb-ki_nbytes stores error code from LLDD */
+   if (error)
+   iocb-ki_nbytes = -EIO;
+
+   if (atomic_dec_and_test(bio_count)) {
+   if (iocb-ki_nbytes  0)
+   aio_complete(iocb, iocb-ki_nbytes, 0);
+   else
+   aio_complete(iocb, iocb-ki_left, 0);
}
 
-   bh-b_bdev = I_BDEV(inode);
-   bh-b_blocknr = iblock;
-   bh-b_size = max_blocks  inode-i_blkbits;
-   if (max_blocks)
-   set_buffer_mapped(bh);
return 0;
 }
 
+#define VEC_SIZE   16
+struct pvec {
+   unsigned short nr;
+   unsigned short idx;
+   struct page *page[VEC_SIZE];
+};
+
+#define PAGES_SPANNED(addr, len)   \
+   (DIV_ROUND_UP((addr) + (len), PAGE_SIZE) - (addr) / PAGE_SIZE);
+
+/*
+ * get page pointer for user addr, we internally cache struct page array for
+ * (addr, count) range in pvec to avoid frequent call to get_user_pages.  If
+ * internal page list is exhausted, a batch count of up to VEC_SIZE is used
+ * to get next set of page struct.
+ */
+static struct page *blk_get_page(unsigned long addr, size_t count, int rw,
+struct pvec *pvec)
+{
+   int ret, nr_pages;
+   if (pvec-idx == pvec-nr) {
+   nr_pages = PAGES_SPANNED(addr, count);
+   nr_pages = min(nr_pages, VEC_SIZE);
+   down_read(current-mm-mmap_sem);
+   ret = get_user_pages(current, current-mm, addr, nr_pages,
+rw == READ, 0, pvec-page, NULL);
+   up_read(current-mm-mmap_sem);
+   if (ret  0)

[PATCH] KVM: Disallow the kvm-amd module on intel hardware, and vice versa

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=873a7c423bf8f12bff48a4b8963b32be568b4fcf
Commit: 873a7c423bf8f12bff48a4b8963b32be568b4fcf
Parent: 802ba064c49f655d20fed563f2a4924c8256ea10
Author: Avi Kivity [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:34:14 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:48 2006 -0800

[PATCH] KVM: Disallow the kvm-amd module on intel hardware, and vice versa

They're not on speaking terms.

Signed-off-by: Avi Kivity [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/kvm/svm.c |5 ++---
 drivers/kvm/vmx.c |3 +--
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c
index 73a022c..0e6bc8c 100644
--- a/drivers/kvm/svm.c
+++ b/drivers/kvm/svm.c
@@ -377,6 +377,7 @@ static __init int svm_hardware_setup(void)
void *msrpm_va;
int r;
 
+   kvm_emulator_want_group7_invlpg();
 
iopm_pages = alloc_pages(GFP_KERNEL, IOPM_ALLOC_ORDER);
 
@@ -1628,9 +1629,7 @@ static struct kvm_arch_ops svm_arch_ops = {
 
 static int __init svm_init(void)
 {
-   kvm_emulator_want_group7_invlpg();
-   kvm_init_arch(svm_arch_ops, THIS_MODULE);
-   return 0;
+   return kvm_init_arch(svm_arch_ops, THIS_MODULE);
 }
 
 static void __exit svm_exit(void)
diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c
index 4362206..d046296 100644
--- a/drivers/kvm/vmx.c
+++ b/drivers/kvm/vmx.c
@@ -2000,8 +2000,7 @@ static struct kvm_arch_ops vmx_arch_ops = {
 
 static int __init vmx_init(void)
 {
-   kvm_init_arch(vmx_arch_ops, THIS_MODULE);
-   return 0;
+   return kvm_init_arch(vmx_arch_ops, THIS_MODULE);
 }
 
 static void __exit vmx_exit(void)
-
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] KVM: Don't touch the virtual apic vt registers on 32-bit

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3b99ab242145c99ec8781dc267ec100e7f23ef9d
Commit: 3b99ab242145c99ec8781dc267ec100e7f23ef9d
Parent: 873a7c423bf8f12bff48a4b8963b32be568b4fcf
Author: Michael Riepe [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:34:15 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:48 2006 -0800

[PATCH] KVM: Don't touch the virtual apic vt registers on 32-bit

Signed-off-by: Avi Kivity [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/kvm/vmx.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c
index d046296..ea3bdbb 100644
--- a/drivers/kvm/vmx.c
+++ b/drivers/kvm/vmx.c
@@ -1175,8 +1175,10 @@ static int vmx_vcpu_setup(struct kvm_vcpu *vcpu)
VM_ENTRY_CONTROLS, 0);
vmcs_write32(VM_ENTRY_INTR_INFO_FIELD, 0);  /* 22.2.1 */
 
+#ifdef CONFIG_X86_64
vmcs_writel(VIRTUAL_APIC_PAGE_ADDR, 0);
vmcs_writel(TPR_THRESHOLD, 0);
+#endif
 
vmcs_writel(CR0_GUEST_HOST_MASK, KVM_GUEST_CR0_MASK);
vmcs_writel(CR4_GUEST_HOST_MASK, KVM_GUEST_CR4_MASK);
-
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] lockd endianness annotations

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e8c5c045d790e7018c56f1a998a2d240b732ea3c
Commit: e8c5c045d790e7018c56f1a998a2d240b732ea3c
Parent: 905f3ed62515f233fea09dc5ad68bbcff4903520
Author: Al Viro [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:35:03 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:52 2006 -0800

[PATCH] lockd endianness annotations

Annotated, all places switched to keeping status net-endian.

Signed-off-by: Al Viro [EMAIL PROTECTED]
Acked-by: Trond Myklebust [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 fs/lockd/clntlock.c|   10 +-
 fs/lockd/clntproc.c|   39 ---
 fs/lockd/svclock.c |4 ++--
 fs/lockd/xdr.c |8 
 fs/lockd/xdr4.c|8 
 fs/nfsd/lockd.c|2 +-
 include/linux/lockd/bind.h |2 +-
 include/linux/lockd/lockd.h|2 +-
 include/linux/lockd/sm_inter.h |2 +-
 include/linux/lockd/xdr.h  |8 
 10 files changed, 43 insertions(+), 42 deletions(-)

diff --git a/fs/lockd/clntlock.c b/fs/lockd/clntlock.c
index 92681c9..0627077 100644
--- a/fs/lockd/clntlock.c
+++ b/fs/lockd/clntlock.c
@@ -36,7 +36,7 @@ struct nlm_wait {
struct nlm_host *   b_host;
struct file_lock *  b_lock; /* local file lock */
unsigned short  b_reclaim;  /* got to reclaim lock */
-   u32 b_status;   /* grant callback status */
+   __be32  b_status;   /* grant callback status */
 };
 
 static LIST_HEAD(nlm_blocked);
@@ -53,7 +53,7 @@ struct nlm_wait *nlmclnt_prepare_block(struct nlm_host *host, 
struct file_lock *
block-b_host = host;
block-b_lock = fl;
init_waitqueue_head(block-b_wait);
-   block-b_status = NLM_LCK_BLOCKED;
+   block-b_status = nlm_lck_blocked;
list_add(block-b_list, nlm_blocked);
}
return block;
@@ -89,7 +89,7 @@ int nlmclnt_block(struct nlm_wait *block, struct nlm_rqst 
*req, long timeout)
 * nlmclnt_lock for an explanation.
 */
ret = wait_event_interruptible_timeout(block-b_wait,
-   block-b_status != NLM_LCK_BLOCKED,
+   block-b_status != nlm_lck_blocked,
timeout);
if (ret  0)
return -ERESTARTSYS;
@@ -131,7 +131,7 @@ __be32 nlmclnt_grant(const struct sockaddr_in *addr, const 
struct nlm_lock *lock
/* Alright, we found a lock. Set the return status
 * and wake up the caller
 */
-   block-b_status = NLM_LCK_GRANTED;
+   block-b_status = nlm_granted;
wake_up(block-b_wait);
res = nlm_granted;
}
@@ -211,7 +211,7 @@ restart:
/* Now, wake up all processes that sleep on a blocked lock */
list_for_each_entry(block, nlm_blocked, b_list) {
if (block-b_host == host) {
-   block-b_status = NLM_LCK_DENIED_GRACE_PERIOD;
+   block-b_status = nlm_lck_denied_grace_period;
wake_up(block-b_wait);
}
}
diff --git a/fs/lockd/clntproc.c b/fs/lockd/clntproc.c
index 80a1a6d..0b4acc1 100644
--- a/fs/lockd/clntproc.c
+++ b/fs/lockd/clntproc.c
@@ -27,7 +27,7 @@
 static int nlmclnt_test(struct nlm_rqst *, struct file_lock *);
 static int nlmclnt_lock(struct nlm_rqst *, struct file_lock *);
 static int nlmclnt_unlock(struct nlm_rqst *, struct file_lock *);
-static int nlm_stat_to_errno(u32 stat);
+static int nlm_stat_to_errno(__be32 stat);
 static voidnlmclnt_locks_init_private(struct file_lock *fl, struct 
nlm_host *host);
 static int nlmclnt_cancel(struct nlm_host *, int , struct file_lock *);
 
@@ -325,7 +325,7 @@ nlmclnt_call(struct nlm_rqst *req, u32 proc)
}
break;
} else
-   if (resp-status == NLM_LCK_DENIED_GRACE_PERIOD) {
+   if (resp-status == nlm_lck_denied_grace_period) {
dprintk(lockd: server in grace period\n);
if (argp-reclaim) {
printk(KERN_WARNING
@@ -411,10 +411,10 @@ nlmclnt_test(struct nlm_rqst *req, struct file_lock *fl)
goto out;
 
switch (req-a_res.status) {
-   case NLM_LCK_GRANTED:
+   case nlm_granted:
fl-fl_type = F_UNLCK;
break;
-   case NLM_LCK_DENIED:
+   case nlm_lck_denied:
/*
 * Report the conflicting lock back to the 

[PATCH] Xtensa: Add ktermios and minor filename fix

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1c0350bd0c9b59957760e67516973db35bafa050
Commit: 1c0350bd0c9b59957760e67516973db35bafa050
Parent: 8a102eed9c4e1d21bad07a8fd97bd4fbf125d966
Author: Chris Zankel [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:34:32 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:50 2006 -0800

[PATCH] Xtensa: Add ktermios and minor filename fix

The kernel termios (ktermios) changes were somehow missed for Xtensa.  This
patch adds the ktermios structure and also includes some minor file name
fix that was missed in the syscall patch.

Signed-off-by: Chris Zankel [EMAIL PROTECTED]
Acked-by: Alan Cox [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/xtensa/kernel/Makefile   |2 +-
 arch/xtensa/kernel/syscall.c  |2 +-
 include/asm-xtensa/termbits.h |   11 +++
 include/asm-xtensa/uaccess.h  |1 -
 4 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/arch/xtensa/kernel/Makefile b/arch/xtensa/kernel/Makefile
index d573017..71f733c 100644
--- a/arch/xtensa/kernel/Makefile
+++ b/arch/xtensa/kernel/Makefile
@@ -6,7 +6,7 @@ extra-y := head.o vmlinux.lds
 
 
 obj-y := align.o entry.o irq.o coprocessor.o process.o ptrace.o semaphore.o  \
-setup.o signal.o syscalls.o time.o traps.o vectors.o platform.o  \
+setup.o signal.o syscall.o time.o traps.o vectors.o platform.o  \
 pci-dma.o
 
 ## windowspill.o
diff --git a/arch/xtensa/kernel/syscall.c b/arch/xtensa/kernel/syscall.c
index 418268f..fe3834b 100644
--- a/arch/xtensa/kernel/syscall.c
+++ b/arch/xtensa/kernel/syscall.c
@@ -16,7 +16,7 @@
  *
  */
 #include asm/uaccess.h
-#include asm/syscalls.h
+#include asm/syscall.h
 #include asm/unistd.h
 #include linux/linkage.h
 #include linux/stringify.h
diff --git a/include/asm-xtensa/termbits.h b/include/asm-xtensa/termbits.h
index c780593..057b9a3 100644
--- a/include/asm-xtensa/termbits.h
+++ b/include/asm-xtensa/termbits.h
@@ -30,6 +30,17 @@ struct termios {
cc_t c_cc[NCCS];/* control characters */
 };
 
+struct ktermios {
+   tcflag_t c_iflag;   /* input mode flags */
+   tcflag_t c_oflag;   /* output mode flags */
+   tcflag_t c_cflag;   /* control mode flags */
+   tcflag_t c_lflag;   /* local mode flags */
+   cc_t c_line;/* line discipline */
+   cc_t c_cc[NCCS];/* control characters */
+   speed_t c_ispeed;   /* input speed */
+   speed_t c_ospeed;   /* output speed */
+};
+
 /* c_cc characters */
 
 #define VINTR 0
diff --git a/include/asm-xtensa/uaccess.h b/include/asm-xtensa/uaccess.h
index 88a64e1..d6352da 100644
--- a/include/asm-xtensa/uaccess.h
+++ b/include/asm-xtensa/uaccess.h
@@ -23,7 +23,6 @@
 
 #ifdef __ASSEMBLY__
 
-#define _ASMLANGUAGE
 #include asm/current.h
 #include asm/asm-offsets.h
 #include asm/processor.h
-
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


hwmon/f71805f: Fix the device address decoding

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=75c990291dd7af84ea68f3c3ead934b51d0b81ad
Commit: 75c990291dd7af84ea68f3c3ead934b51d0b81ad
Parent: c7176cb515edbc937006fd05fa391b0d926a337a
Author: Jean Delvare [EMAIL PROTECTED]
AuthorDate: Tue Dec 12 18:18:29 2006 +0100
Committer:  Jean Delvare [EMAIL PROTECTED]
CommitDate: Tue Dec 12 18:18:29 2006 +0100

hwmon/f71805f: Fix the device address decoding

The lowest 3 bits are ignored, and the chip decodes all 8 addresses,
not only the 2 it needs.

Signed-off-by: Jean Delvare [EMAIL PROTECTED]
---
 drivers/hwmon/f71805f.c |7 ---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/hwmon/f71805f.c b/drivers/hwmon/f71805f.c
index 37ba421..a272cae 100644
--- a/drivers/hwmon/f71805f.c
+++ b/drivers/hwmon/f71805f.c
@@ -102,9 +102,9 @@ superio_exit(int base)
  * ISA constants
  */
 
-#define REGION_LENGTH  2
-#define ADDR_REG_OFFSET0
-#define DATA_REG_OFFSET1
+#define REGION_LENGTH  8
+#define ADDR_REG_OFFSET5
+#define DATA_REG_OFFSET6
 
 /*
  * Registers
@@ -1359,6 +1359,7 @@ static int __init f71805f_find(int sioaddr, unsigned 
short *address,
   skipping\n);
goto exit;
}
+   *address = ~(REGION_LENGTH - 1);   /* Ignore 3 LSB */
 
err = 0;
printk(KERN_INFO DRVNAME : Found %s chip at %#x, revision %u\n,
-
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] KVM: Move find_vmx_entry() to vmx.c

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7725f0badd6682e5bcc06f38eedf0123712a3f60
Commit: 7725f0badd6682e5bcc06f38eedf0123712a3f60
Parent: f7fbf1fdf0d79241f5cc95310b96f0c52452ab39
Author: Avi Kivity [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:34:01 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:47 2006 -0800

[PATCH] KVM: Move find_vmx_entry() to vmx.c

Signed-off-by: Avi Kivity [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/kvm/kvm_main.c |   21 ++---
 drivers/kvm/vmx.c  |   12 ++--
 2 files changed, 12 insertions(+), 21 deletions(-)

diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c
index f8f11c7..088a445 100644
--- a/drivers/kvm/kvm_main.c
+++ b/drivers/kvm/kvm_main.c
@@ -72,17 +72,6 @@ static struct dentry *debugfs_dir;
 #define CR8_RESEVED_BITS (~0x0fULL)
 #define EFER_RESERVED_BITS 0xf2fe
 
-struct vmx_msr_entry *find_msr_entry(struct kvm_vcpu *vcpu, u32 msr)
-{
-   int i;
-
-   for (i = 0; i  vcpu-nmsrs; ++i)
-   if (vcpu-guest_msrs[i].index == msr)
-   return vcpu-guest_msrs[i];
-   return 0;
-}
-EXPORT_SYMBOL_GPL(find_msr_entry);
-
 #ifdef CONFIG_X86_64
 // LDT or TSS descriptor in the GDT. 16 bytes.
 struct segment_descriptor_64 {
@@ -1124,8 +1113,6 @@ static int get_msr(struct kvm_vcpu *vcpu, u32 msr_index, 
u64 *pdata)
 
 void set_efer(struct kvm_vcpu *vcpu, u64 efer)
 {
-   struct vmx_msr_entry *msr;
-
if (efer  EFER_RESERVED_BITS) {
printk(KERN_DEBUG set_efer: 0x%llx #GP, reserved bits\n,
   efer);
@@ -1140,16 +1127,12 @@ void set_efer(struct kvm_vcpu *vcpu, u64 efer)
return;
}
 
+   kvm_arch_ops-set_efer(vcpu, efer);
+
efer = ~EFER_LMA;
efer |= vcpu-shadow_efer  EFER_LMA;
 
vcpu-shadow_efer = efer;
-
-   msr = find_msr_entry(vcpu, MSR_EFER);
-
-   if (!(efer  EFER_LMA))
-   efer = ~EFER_LME;
-   msr-data = efer;
 }
 EXPORT_SYMBOL_GPL(set_efer);
 
diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c
index fc01c4b..4362206 100644
--- a/drivers/kvm/vmx.c
+++ b/drivers/kvm/vmx.c
@@ -78,8 +78,6 @@ static const u32 vmx_msr_index[] = {
 };
 #define NR_VMX_MSR (sizeof(vmx_msr_index) / sizeof(*vmx_msr_index))
 
-struct vmx_msr_entry *find_msr_entry(struct kvm_vcpu *vcpu, u32 msr);
-
 static inline int is_page_fault(u32 intr_info)
 {
return (intr_info  (INTR_INFO_INTR_TYPE_MASK | INTR_INFO_VECTOR_MASK |
@@ -93,6 +91,16 @@ static inline int is_external_interrupt(u32 intr_info)
== (INTR_TYPE_EXT_INTR | INTR_INFO_VALID_MASK);
 }
 
+static struct vmx_msr_entry *find_msr_entry(struct kvm_vcpu *vcpu, u32 msr)
+{
+   int i;
+
+   for (i = 0; i  vcpu-nmsrs; ++i)
+   if (vcpu-guest_msrs[i].index == msr)
+   return vcpu-guest_msrs[i];
+   return 0;
+}
+
 static void vmcs_clear(struct vmcs *vmcs)
 {
u64 phys_addr = __pa(vmcs);
-
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


hwmon/f71805f: Add support for the Fintek F71872F/FG chip

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=51c997d80e1f625aea3426a8a9087f5830ac6db3
Commit: 51c997d80e1f625aea3426a8a9087f5830ac6db3
Parent: ba224e2c4f0a706714ccb483b0c21d32f5994f67
Author: Jean Delvare [EMAIL PROTECTED]
AuthorDate: Tue Dec 12 18:18:29 2006 +0100
Committer:  Jean Delvare [EMAIL PROTECTED]
CommitDate: Tue Dec 12 18:18:29 2006 +0100

hwmon/f71805f: Add support for the Fintek F71872F/FG chip

Add support for the Fintek F71872F/FG Super-I/O chip. It is basically the
same as the Fintek F71805F/FG as far as hardware monitoring is concerned,
with two additional internal voltages monitored (VSB and battery), and 6
VID inputs (not yet supported.)

To make things a bit more confusing, two of the voltage input pins (in4
and in8) can be used for other functions. The driver reads the pin
configuration from the Super-I/O configuration space to decide whether
it must create interface files for these inputs or not.

Many thanks to Nikolay Derkach for testing the early iterations of this
code and reporting bugs.

Signed-off-by: Jean Delvare [EMAIL PROTECTED]
---
 Documentation/hwmon/f71805f |   14 +++-
 drivers/hwmon/Kconfig   |5 +-
 drivers/hwmon/f71805f.c |  230 +++
 3 files changed, 203 insertions(+), 46 deletions(-)

diff --git a/Documentation/hwmon/f71805f b/Documentation/hwmon/f71805f
index bc571f9..bfd0f15 100644
--- a/Documentation/hwmon/f71805f
+++ b/Documentation/hwmon/f71805f
@@ -6,6 +6,10 @@ Supported chips:
 Prefix: 'f71805f'
 Addresses scanned: none, address read from Super I/O config space
 Datasheet: Provided by Fintek on request
+  * Fintek F71872F/FG
+Prefix: 'f71872f'
+Addresses scanned: none, address read from Super I/O config space
+Datasheet: Provided by Fintek on request
 
 Author: Jean Delvare [EMAIL PROTECTED]
 
@@ -30,6 +34,10 @@ source), 3 fans and 3 temperature sensors.
 This chip also has fan controlling features, using either DC or PWM, in
 three different modes (one manual, two automatic).
 
+The Fintek F71872F/FG Super I/O chip is almost the same, with two
+additional internal voltages monitored (VSB and battery). It also features
+6 VID inputs. The VID inputs are not yet supported by this driver.
+
 The driver assumes that no more than one chip is present, which seems
 reasonable.
 
@@ -41,7 +49,8 @@ Voltages are sampled by an 8-bit ADC with a LSB of 8 mV. The 
supported
 range is thus from 0 to 2.040 V. Voltage values outside of this range
 need external resistors. An exception is in0, which is used to monitor
 the chip's own power source (+3.3V), and is divided internally by a
-factor 2.
+factor 2. For the F71872F/FG, in9 (VSB) and in10 (battery) are also
+divided internally by a factor 2.
 
 The two LSB of the voltage limit registers are not used (always 0), so
 you can only set the limits in steps of 32 mV (before scaling).
@@ -60,9 +69,12 @@ in5 VIN5+12V200K 20K   11.001.05 
V
 in6 VIN6VCC1.5V  10K   -1.001.50 V
 in7 VIN7VCORE10K   -1.00   ~1.40 V (1)
 in8 VIN8VSB5V   200K 47K1.000.95 V
+in10VSB VSB3.3V int.int.2.001.65 V (3)
+in9 VBATVBATTERYint.int.2.001.50 V (3)
 
 (1) Depends on your hardware setup.
 (2) Obviously not correct, swapping R1 and R2 would make more sense.
+(3) F71872F/FG only.
 
 These values can be used as hints at best, as motherboard manufacturers
 are free to use a completely different setup. As a matter of fact, the
diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
index e379ac4..5a07631 100644
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
@@ -142,11 +142,12 @@ config SENSORS_DS1621
  will be called ds1621.
 
 config SENSORS_F71805F
-   tristate Fintek F71805F/FG
+   tristate Fintek F71805F/FG and F71872F/FG
depends on HWMON  EXPERIMENTAL
help
  If you say yes here you get support for hardware monitoring
- features of the Fintek F71805F/FG chips.
+ features of the Fintek F71805F/FG and F71872F/FG Super-I/O
+ chips.
 
  This driver can also be built as a module.  If so, the module
  will be called f71805f.
diff --git a/drivers/hwmon/f71805f.c b/drivers/hwmon/f71805f.c
index 975c1cc..ba5e7b7 100644
--- a/drivers/hwmon/f71805f.c
+++ b/drivers/hwmon/f71805f.c
@@ -1,12 +1,15 @@
 /*
- * f71805f.c - driver for the Fintek F71805F/FG Super-I/O chip integrated
- * hardware monitoring features
+ * f71805f.c - driver for the Fintek F71805F/FG and F71872F/FG Super-I/O
+ * chips integrated hardware monitoring features
  * Copyright (C) 2005-2006  Jean Delvare [EMAIL PROTECTED]
  *
  * The F71805F/FG is a LPC Super-I/O chip made by Fintek. It integrates
  * complete hardware 

[PATCH] Optimize calc_load()

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cd7175edf963a92b2c3cd491d3e34afd357e7284
Commit: cd7175edf963a92b2c3cd491d3e34afd357e7284
Parent: f988443a84528bd30c2f474efa5e2c511959f19b
Author: Eric Dumazet [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:35:45 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:55 2006 -0800

[PATCH] Optimize calc_load()

calc_load() is called by timer interrupt to update avenrun[].  It currently
calls nr_active() at each timer tick (HZ per second), while the update of
avenrun[] is done only once every 5 seconds.  (LOAD_FREQ=5 Hz)

nr_active() is quite expensive on SMP machines, since it has to sum up
nr_running and nr_uninterruptible of all online CPUS, bringing foreign
dirty cache lines.

This patch is an optimization of calc_load() so that nr_active() is called
only if we need it.

The use of unlikely() is welcome since the condition is true only once every
5*HZ time.

Signed-off-by: Eric Dumazet [EMAIL PROTECTED]
Cc: Ingo Molnar [EMAIL PROTECTED]
Acked-by: Siddha, Suresh B [EMAIL PROTECTED]
Cc: Nick Piggin [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 kernel/timer.c |   14 +-
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/kernel/timer.c b/kernel/timer.c
index 0256ab4..feddf81 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -1146,11 +1146,15 @@ static inline void calc_load(unsigned long ticks)
unsigned long active_tasks; /* fixed-point */
static int count = LOAD_FREQ;
 
-   active_tasks = count_active_tasks();
-   for (count -= ticks; count  0; count += LOAD_FREQ) {
-   CALC_LOAD(avenrun[0], EXP_1, active_tasks);
-   CALC_LOAD(avenrun[1], EXP_5, active_tasks);
-   CALC_LOAD(avenrun[2], EXP_15, active_tasks);
+   count -= ticks;
+   if (unlikely(count  0)) {
+   active_tasks = count_active_tasks();
+   do {
+   CALC_LOAD(avenrun[0], EXP_1, active_tasks);
+   CALC_LOAD(avenrun[1], EXP_5, active_tasks);
+   CALC_LOAD(avenrun[2], EXP_15, active_tasks);
+   count += LOAD_FREQ;
+   } while (count  0);
}
 }
 
-
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] knfsd: nfsd4: handling more nfsd_cross_mnt errors in nfsd4 readdir

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=021d3a72459191a76e8e482ee4937ba6bc9fd712
Commit: 021d3a72459191a76e8e482ee4937ba6bc9fd712
Parent: 6899320c2cefe5ae6b606f820ba8b762ba21f34a
Author: J.Bruce Fields [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:35:24 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:54 2006 -0800

[PATCH] knfsd: nfsd4: handling more nfsd_cross_mnt errors in nfsd4 readdir

This patch on its own causes no change in behavior, since nfsd_cross_mnt()
only returns -EAGAIN; but in the future I'd like it to also be able to 
return
-ETIMEDOUT, so we may as well handle any possible error here.

Signed-off-by: J. Bruce Fields [EMAIL PROTECTED]
Signed-off-by: Neil Brown [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 fs/nfsd/nfs4xdr.c |   14 +-
 1 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index f3f239d..fea4636 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -1845,15 +1845,11 @@ nfsd4_encode_dirent_fattr(struct nfsd4_readdir *cd,
 
exp_get(exp);
if (d_mountpoint(dentry)) {
-   if (nfsd_cross_mnt(cd-rd_rqstp, dentry, exp)) {
-   /*
-* -EAGAIN is the only error returned from
-* nfsd_cross_mnt() and it indicates that an
-* up-call has  been initiated to fill in the export
-* options on exp.  When the answer comes back,
-* this call will be retried.
-*/
-   nfserr = nfserr_dropit;
+   int err;
+
+   err = nfsd_cross_mnt(cd-rd_rqstp, dentry, exp);
+   if (err) {
+   nfserr = nfserrno(err);
goto out_put;
}
 
-
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] constify pipe_buf_operations

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d4c3cca941b64a938eaa9734585a93547c6be323
Commit: d4c3cca941b64a938eaa9734585a93547c6be323
Parent: 426d62e2158c2fd3aa1ed1fd62122afd2ccb89ae
Author: Eric Dumazet [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:34:04 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:47 2006 -0800

[PATCH] constify pipe_buf_operations

- pipe/splice should use const pipe_buf_operations and file_operations

- struct pipe_inode_info has an unused field start : get rid of it.

Signed-off-by: Eric Dumazet [EMAIL PROTECTED]
Cc: Jens Axboe [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 fs/pipe.c |   12 ++--
 fs/splice.c   |8 
 include/linux/pipe_fs_i.h |3 +--
 3 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/fs/pipe.c b/fs/pipe.c
index f8b6bdc..9a06e8e 100644
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -207,7 +207,7 @@ int generic_pipe_buf_pin(struct pipe_inode_info *info, 
struct pipe_buffer *buf)
return 0;
 }
 
-static struct pipe_buf_operations anon_pipe_buf_ops = {
+static const struct pipe_buf_operations anon_pipe_buf_ops = {
.can_merge = 1,
.map = generic_pipe_buf_map,
.unmap = generic_pipe_buf_unmap,
@@ -243,7 +243,7 @@ pipe_read(struct kiocb *iocb, const struct iovec *_iov,
if (bufs) {
int curbuf = pipe-curbuf;
struct pipe_buffer *buf = pipe-bufs + curbuf;
-   struct pipe_buf_operations *ops = buf-ops;
+   const struct pipe_buf_operations *ops = buf-ops;
void *addr;
size_t chars = buf-len;
int error, atomic;
@@ -365,7 +365,7 @@ pipe_write(struct kiocb *iocb, const struct iovec *_iov,
int lastbuf = (pipe-curbuf + pipe-nrbufs - 1) 
(PIPE_BUFFERS-1);
struct pipe_buffer *buf = pipe-bufs + lastbuf;
-   struct pipe_buf_operations *ops = buf-ops;
+   const struct pipe_buf_operations *ops = buf-ops;
int offset = buf-offset + buf-len;
 
if (ops-can_merge  offset + chars = PAGE_SIZE) {
@@ -756,7 +756,7 @@ const struct file_operations rdwr_fifo_fops = {
.fasync = pipe_rdwr_fasync,
 };
 
-static struct file_operations read_pipe_fops = {
+static const struct file_operations read_pipe_fops = {
.llseek = no_llseek,
.read   = do_sync_read,
.aio_read   = pipe_read,
@@ -768,7 +768,7 @@ static struct file_operations read_pipe_fops = {
.fasync = pipe_read_fasync,
 };
 
-static struct file_operations write_pipe_fops = {
+static const struct file_operations write_pipe_fops = {
.llseek = no_llseek,
.read   = bad_pipe_r,
.write  = do_sync_write,
@@ -780,7 +780,7 @@ static struct file_operations write_pipe_fops = {
.fasync = pipe_write_fasync,
 };
 
-static struct file_operations rdwr_pipe_fops = {
+static const struct file_operations rdwr_pipe_fops = {
.llseek = no_llseek,
.read   = do_sync_read,
.aio_read   = pipe_read,
diff --git a/fs/splice.c b/fs/splice.c
index bbd0aeb..2fca6eb 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -42,7 +42,7 @@ struct splice_pipe_desc {
struct partial_page *partial;   /* pages[] may not be contig */
int nr_pages;   /* number of pages in map */
unsigned int flags; /* splice flags */
-   struct pipe_buf_operations *ops;/* ops associated with output pipe */
+   const struct pipe_buf_operations *ops;/* ops associated with output 
pipe */
 };
 
 /*
@@ -139,7 +139,7 @@ error:
return err;
 }
 
-static struct pipe_buf_operations page_cache_pipe_buf_ops = {
+static const struct pipe_buf_operations page_cache_pipe_buf_ops = {
.can_merge = 0,
.map = generic_pipe_buf_map,
.unmap = generic_pipe_buf_unmap,
@@ -159,7 +159,7 @@ static int user_page_pipe_buf_steal(struct pipe_inode_info 
*pipe,
return generic_pipe_buf_steal(pipe, buf);
 }
 
-static struct pipe_buf_operations user_page_pipe_buf_ops = {
+static const struct pipe_buf_operations user_page_pipe_buf_ops = {
.can_merge = 0,
.map = generic_pipe_buf_map,
.unmap = generic_pipe_buf_unmap,
@@ -724,7 +724,7 @@ static ssize_t __splice_from_pipe(struct pipe_inode_info 
*pipe,
for (;;) {
if (pipe-nrbufs) {
struct pipe_buffer *buf = pipe-bufs + pipe-curbuf;
-   struct pipe_buf_operations *ops = buf-ops;
+   const struct pipe_buf_operations *ops = 

hwmon/hdaps: Update the list of supported devices

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0f23e50aa5fc578e1c50e873858e6ab7a1e32f0e
Commit: 0f23e50aa5fc578e1c50e873858e6ab7a1e32f0e
Parent: 509a5e85c3a8f0a81c916fac4579b6d1b5ea58da
Author: Stephan Berberig [EMAIL PROTECTED]
AuthorDate: Tue Dec 12 18:18:28 2006 +0100
Committer:  Jean Delvare [EMAIL PROTECTED]
CommitDate: Tue Dec 12 18:18:28 2006 +0100

hwmon/hdaps: Update the list of supported devices

Remove the strange DMI for the R52 (1846AQG)
and add a note to update to latest BIOS in the Kconfig
and source code.

Signed-off-by: Stephan Berberig [EMAIL PROTECTED]
Signed-off-by: Robert Love [EMAIL PROTECTED]
Signed-off-by: Jean Delvare [EMAIL PROTECTED]
---
 drivers/hwmon/Kconfig |3 +++
 drivers/hwmon/hdaps.c |6 +++---
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
index e76d919..39ab2fc 100644
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
@@ -527,6 +527,9 @@ config SENSORS_HDAPS
  This driver also provides an absolute input class device, allowing
  the laptop to act as a pinball machine-esque joystick.
 
+ If your ThinkPad is not recognized by the driver, please update to 
latest
+ BIOS. This is especially the case for some R52 ThinkPads.
+
  Say Y here if you have an applicable laptop and want to experience
  the awesome power of hdaps.
 
diff --git a/drivers/hwmon/hdaps.c b/drivers/hwmon/hdaps.c
index 0b11698..bf759ea 100644
--- a/drivers/hwmon/hdaps.c
+++ b/drivers/hwmon/hdaps.c
@@ -511,14 +511,14 @@ static int __init hdaps_dmi_match_invert(struct 
dmi_system_id *id)
 }
 
 /* Note that HDAPS_DMI_MATCH_NORMAL(ThinkPad T42) would match
-  ThinkPad T42p, so the order of the entries matters */
+   ThinkPad T42p, so the order of the entries matters.
+   If your ThinkPad is not recognized, please update to latest
+   BIOS. This is especially the case for some R52 ThinkPads. */
 static struct dmi_system_id __initdata hdaps_whitelist[] = {
-   HDAPS_DMI_MATCH_NORMAL(IBM, ThinkPad H),
HDAPS_DMI_MATCH_INVERT(IBM, ThinkPad R50p),
HDAPS_DMI_MATCH_NORMAL(IBM, ThinkPad R50),
HDAPS_DMI_MATCH_NORMAL(IBM, ThinkPad R51),
HDAPS_DMI_MATCH_NORMAL(IBM, ThinkPad R52),
-   HDAPS_DMI_MATCH_NORMAL(IBM, ThinkPad H),   /* R52 (1846AQG) */
HDAPS_DMI_MATCH_INVERT(IBM, ThinkPad T41p),
HDAPS_DMI_MATCH_NORMAL(IBM, ThinkPad T41),
HDAPS_DMI_MATCH_INVERT(IBM, ThinkPad T42p),
-
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] kconfig: set gconf's save-widget's sensitivity according to .config's changed state

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0a0c502c94af0491ab454ad6d216c7a6fda8362b
Commit: 0a0c502c94af0491ab454ad6d216c7a6fda8362b
Parent: 3b354c557c7a6fcac099b3a20b308853fe596183
Author: Karsten Wiese [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:34:09 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:48 2006 -0800

[PATCH] kconfig: set gconf's save-widget's sensitivity according to 
.config's changed state

Clean up a little.

Signed-off-by: Karsten Wiese [EMAIL PROTECTED]
Cc: Sam Ravnborg [EMAIL PROTECTED]
Cc: Roman Zippel [EMAIL PROTECTED]
Acked-by: Randy Dunlap [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 scripts/kconfig/gconf.c |   35 ++-
 scripts/kconfig/gconf.glade |4 ++--
 2 files changed, 20 insertions(+), 19 deletions(-)

diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c
index 7b0d3a9..61d8166 100644
--- a/scripts/kconfig/gconf.c
+++ b/scripts/kconfig/gconf.c
@@ -38,8 +38,6 @@ static gboolean show_all = FALSE;
 static gboolean show_debug = FALSE;
 static gboolean resizeable = FALSE;
 
-static gboolean config_changed = FALSE;
-
 static char nohelp_text[] =
 N_(Sorry, no help available for this option yet.\n);
 
@@ -50,6 +48,8 @@ GtkWidget *text_w = NULL;
 GtkWidget *hpaned = NULL;
 GtkWidget *vpaned = NULL;
 GtkWidget *back_btn = NULL;
+GtkWidget *save_btn = NULL;
+GtkWidget *save_menu_item = NULL;
 
 GtkTextTag *tag1, *tag2;
 GdkColor color;
@@ -75,7 +75,7 @@ static void display_tree_part(void);
 static void update_tree(struct menu *src, GtkTreeIter * dst);
 static void set_node(GtkTreeIter * node, struct menu *menu, gchar ** row);
 static gchar **fill_row(struct menu *menu);
-
+static void conf_changed(void);
 
 /* Helping/Debugging Functions */
 
@@ -224,6 +224,10 @@ void init_main_window(const gchar * glade_file)
gtk_check_menu_item_set_active((GtkCheckMenuItem *) widget,
   show_value);
 
+   save_btn = glade_xml_get_widget(xml, button3);
+   save_menu_item = glade_xml_get_widget(xml, save1);
+   conf_set_changed_callback(conf_changed);
+
style = gtk_widget_get_style(main_wnd);
widget = glade_xml_get_widget(xml, toolbar1);
 
@@ -512,14 +516,14 @@ static void text_insert_msg(const char *title, const char 
*message)
 
 /* Main Windows Callbacks */
 
-void on_save1_activate(GtkMenuItem * menuitem, gpointer user_data);
+void on_save_activate(GtkMenuItem * menuitem, gpointer user_data);
 gboolean on_window1_delete_event(GtkWidget * widget, GdkEvent * event,
 gpointer user_data)
 {
GtkWidget *dialog, *label;
gint result;
 
-   if (config_changed == FALSE)
+   if (!conf_get_changed())
return FALSE;
 
dialog = gtk_dialog_new_with_buttons(_(Warning !),
@@ -543,7 +547,7 @@ gboolean on_window1_delete_event(GtkWidget * widget, 
GdkEvent * event,
result = gtk_dialog_run(GTK_DIALOG(dialog));
switch (result) {
case GTK_RESPONSE_YES:
-   on_save1_activate(NULL, NULL);
+   on_save_activate(NULL, NULL);
return FALSE;
case GTK_RESPONSE_NO:
return FALSE;
@@ -621,12 +625,10 @@ void on_load1_activate(GtkMenuItem * menuitem, gpointer 
user_data)
 }
 
 
-void on_save1_activate(GtkMenuItem * menuitem, gpointer user_data)
+void on_save_activate(GtkMenuItem * menuitem, gpointer user_data)
 {
if (conf_write(NULL))
text_insert_msg(_(Error), _(Unable to save configuration 
!));
-
-   config_changed = FALSE;
 }
 
 
@@ -819,12 +821,6 @@ void on_load_clicked(GtkButton * button, gpointer 
user_data)
 }
 
 
-void on_save_clicked(GtkButton * button, gpointer user_data)
-{
-   on_save1_activate(NULL, user_data);
-}
-
-
 void on_single_clicked(GtkButton * button, gpointer user_data)
 {
view_mode = SINGLE_VIEW;
@@ -899,7 +895,6 @@ static void renderer_edited(GtkCellRendererText * cell,
 
sym_set_string_value(sym, new_def);
 
-   config_changed = TRUE;
update_tree(rootmenu, NULL);
 
gtk_tree_path_free(path);
@@ -930,7 +925,6 @@ static void change_sym_value(struct menu *menu, gint col)
if (!sym_tristate_within_range(sym, newval))
newval = yes;
sym_set_tristate_value(sym, newval);
-   config_changed = TRUE;
if (view_mode == FULL_VIEW)
update_tree(rootmenu, NULL);
else if (view_mode == SPLIT_VIEW) {
@@ -1633,3 +1627,10 @@ int main(int ac, char *av[])
 
return 0;
 }
+
+static void conf_changed(void)
+{
+   bool changed = conf_get_changed();
+   gtk_widget_set_sensitive(save_btn, changed);
+   

hwmon: New PC87427 hardware monitoring driver

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ba224e2c4f0a706714ccb483b0c21d32f5994f67
Commit: ba224e2c4f0a706714ccb483b0c21d32f5994f67
Parent: 8e9afcbbdef71aeeb510732f4f8d5ac3de863df0
Author: Jean Delvare [EMAIL PROTECTED]
AuthorDate: Tue Dec 12 18:18:29 2006 +0100
Committer:  Jean Delvare [EMAIL PROTECTED]
CommitDate: Tue Dec 12 18:18:29 2006 +0100

hwmon: New PC87427 hardware monitoring driver

This is a new hardware monitoring driver for the National Semiconductor
PC87427 Super-I/O chip. It only supports fan speed monitoring for now,
while the chip can do much more.

Thanks to Amir Habibi at Candelis for setting up a test system, and to
Michael Kress for testing several iterations of this driver.

Signed-off-by: Jean Delvare [EMAIL PROTECTED]
---
 Documentation/hwmon/pc87427 |   38 +++
 drivers/hwmon/Kconfig   |   13 +
 drivers/hwmon/Makefile  |1 +
 drivers/hwmon/pc87427.c |  627 +++
 4 files changed, 679 insertions(+), 0 deletions(-)

diff --git a/Documentation/hwmon/pc87427 b/Documentation/hwmon/pc87427
new file mode 100644
index 000..9a0708f
--- /dev/null
+++ b/Documentation/hwmon/pc87427
@@ -0,0 +1,38 @@
+Kernel driver pc87427
+=
+
+Supported chips:
+  * National Semiconductor PC87427
+Prefix: 'pc87427'
+Addresses scanned: none, address read from Super I/O config space
+Datasheet: http://www.winbond.com.tw/E-WINBONDHTM/partner/apc_007.html
+
+Author: Jean Delvare [EMAIL PROTECTED]
+
+Thanks to Amir Habibi at Candelis for setting up a test system, and to
+Michael Kress for testing several iterations of this driver.
+
+
+Description
+---
+
+The National Semiconductor Super I/O chip includes complete hardware
+monitoring capabilities. It can monitor up to 18 voltages, 8 fans and
+6 temperature sensors. Only the fans are supported at the moment.
+
+This chip also has fan controlling features, which are not yet supported
+by this driver either.
+
+The driver assumes that no more than one chip is present, which seems
+reasonable.
+
+
+Fan Monitoring
+--
+
+Fan rotation speeds are reported as 14-bit values from a gated clock
+signal. Speeds down to 83 RPM can be measured.
+
+An alarm is triggered if the rotation speed drops below a programmable
+limit. Another alarm is triggered if the speed is too low to to be measured
+(including stalled or missing fan).
diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
index 39ab2fc..e379ac4 100644
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
@@ -353,6 +353,19 @@ config SENSORS_PC87360
  This driver can also be built as a module.  If so, the module
  will be called pc87360.
 
+config SENSORS_PC87427
+   tristate National Semiconductor PC87427
+   depends on HWMON  EXPERIMENTAL
+   help
+ If you say yes here you get access to the hardware monitoring
+ functions of the National Semiconductor PC87427 Super-I/O chip.
+ The chip has two distinct logical devices, one for fan speed
+ monitoring and control, and one for voltage and temperature
+ monitoring. Only fan speed monitoring is supported right now.
+
+ This driver can also be built as a module.  If so, the module
+ will be called pc87427.
+
 config SENSORS_SIS5595
tristate Silicon Integrated Systems Corp. SiS5595
depends on HWMON  I2C  PCI  EXPERIMENTAL
diff --git a/drivers/hwmon/Makefile b/drivers/hwmon/Makefile
index af01cc6..95f3fc5 100644
--- a/drivers/hwmon/Makefile
+++ b/drivers/hwmon/Makefile
@@ -41,6 +41,7 @@ obj-$(CONFIG_SENSORS_LM90)+= lm90.o
 obj-$(CONFIG_SENSORS_LM92) += lm92.o
 obj-$(CONFIG_SENSORS_MAX1619)  += max1619.o
 obj-$(CONFIG_SENSORS_PC87360)  += pc87360.o
+obj-$(CONFIG_SENSORS_PC87427)  += pc87427.o
 obj-$(CONFIG_SENSORS_SIS5595)  += sis5595.o
 obj-$(CONFIG_SENSORS_SMSC47B397)+= smsc47b397.o
 obj-$(CONFIG_SENSORS_SMSC47M1) += smsc47m1.o
diff --git a/drivers/hwmon/pc87427.c b/drivers/hwmon/pc87427.c
new file mode 100644
index 000..affa21a
--- /dev/null
+++ b/drivers/hwmon/pc87427.c
@@ -0,0 +1,627 @@
+/*
+ *  pc87427.c - hardware monitoring driver for the
+ *  National Semiconductor PC87427 Super-I/O chip
+ *  Copyright (C) 2006 Jean Delvare [EMAIL PROTECTED]
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  published by the Free Software Foundation.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  Supports the following chips:
+ *
+ *  Chip#vin#fan#pwm#temp   devid
+ *  PC87427 -   8   -   -   

[PATCH] knfsd: nfsd4: clarify units of COMPOUND_SLACK_SPACE

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e57101991156aaba97c630f38e880f0d4012edcd
Commit: e57101991156aaba97c630f38e880f0d4012edcd
Parent: b797b5beac966df5c5d96c0d39fe366f57135343
Author: J.Bruce Fields [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 00:35:20 2006 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 09:05:53 2006 -0800

[PATCH] knfsd: nfsd4: clarify units of COMPOUND_SLACK_SPACE

A comment here incorrectly states that slack_space is measured in words, 
not
bytes.  Remove the comment, and adjust a variable name and a few comments to
clarify the situation.

This is pure cleanup; there should be no change in functionality.

Signed-off-by: J. Bruce Fields [EMAIL PROTECTED]
Signed-off-by: Neil Brown [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 fs/nfsd/nfs4proc.c|   10 +-
 include/linux/nfsd/nfsd.h |4 ++--
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index 50bc942..793a0b0 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -740,7 +740,7 @@ nfsd4_proc_compound(struct svc_rqst *rqstp,
struct svc_fh   *current_fh = NULL;
struct svc_fh   *save_fh = NULL;
struct nfs4_stateowner *replay_owner = NULL;
-   int slack_space;/* in words, not bytes! */
+   int slack_bytes;
__be32  status;
 
status = nfserr_resource;
@@ -790,10 +790,10 @@ nfsd4_proc_compound(struct svc_rqst *rqstp,
 * failed response to the next operation.  If we don't
 * have enough room, fail with ERR_RESOURCE.
 */
-/* FIXME - is slack_space *really* words, or bytes??? - neilb */
-   slack_space = (char *)resp-end - (char *)resp-p;
-   if (slack_space  COMPOUND_SLACK_SPACE + 
COMPOUND_ERR_SLACK_SPACE) {
-   BUG_ON(slack_space  COMPOUND_ERR_SLACK_SPACE);
+   slack_bytes = (char *)resp-end - (char *)resp-p;
+   if (slack_bytes  COMPOUND_SLACK_SPACE
+   + COMPOUND_ERR_SLACK_SPACE) {
+   BUG_ON(slack_bytes  COMPOUND_ERR_SLACK_SPACE);
op-status = nfserr_resource;
goto encode_op;
}
diff --git a/include/linux/nfsd/nfsd.h b/include/linux/nfsd/nfsd.h
index edb54c3..0727774 100644
--- a/include/linux/nfsd/nfsd.h
+++ b/include/linux/nfsd/nfsd.h
@@ -275,12 +275,12 @@ static inline int is_fsid(struct svc_fh *fh, struct 
knfsd_fh *reffh)
  * we might process an operation with side effects, and be unable to
  * tell the client that the operation succeeded.
  *
- * COMPOUND_SLACK_SPACE - this is the minimum amount of buffer space
+ * COMPOUND_SLACK_SPACE - this is the minimum bytes of buffer space
  * needed to encode an ordinary _successful_ operation.  (GETATTR,
  * READ, READDIR, and READLINK have their own buffer checks.)  if we
  * fall below this level, we fail the next operation with NFS4ERR_RESOURCE.
  *
- * COMPOUND_ERR_SLACK_SPACE - this is the minimum amount of buffer space
+ * COMPOUND_ERR_SLACK_SPACE - this is the minimum bytes of buffer space
  * needed to encode an operation which has failed with NFS4ERR_RESOURCE.
  * care is taken to ensure that we never fall below this level for any
  * reason.
-
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] Add missing KORENIX PCI ID's

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=aef6fba4f97bbec1dc5a253f388be9a4c7a30e41
Commit: aef6fba4f97bbec1dc5a253f388be9a4c7a30e41
Parent: ec8c0446b6e2b67b5c8813eb517f4bf00efa99a9
Author: Russell King [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 17:56:11 2006 +
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Dec 13 10:06:55 2006 -0800

[PATCH] Add missing KORENIX PCI ID's

Oops, sorry about that.

Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 include/linux/pci_ids.h |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 51180db..95c1e74 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -2067,6 +2067,10 @@
 #define PCI_DEVICE_ID_JMICRON_JMB366   0x2366
 #define PCI_DEVICE_ID_JMICRON_JMB368   0x2368
 
+#define PCI_VENDOR_ID_KORENIX  0x1982
+#define PCI_DEVICE_ID_KORENIX_JETCARDF00x1600
+#define PCI_DEVICE_ID_KORENIX_JETCARDF10x16ff
+
 #define PCI_VENDOR_ID_TEKRAM   0x1de1
 #define PCI_DEVICE_ID_TEKRAM_DC290 0xdc29
 
-
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


[ARM] Unuse another Linux PTE bit

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ad1ae2fe7fe68414ef29eab3c87b48841f8b72f2
Commit: ad1ae2fe7fe68414ef29eab3c87b48841f8b72f2
Parent: f06b97ffd1ed7a96d5022d52f795fba8483afb75
Author: Russell King [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 14:34:43 2006 +
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Wed Dec 13 14:34:43 2006 +

[ARM] Unuse another Linux PTE bit

L_PTE_ASID is not really required to be stored in every PTE, since we
can identify it via the address passed to set_pte_at().  So, create
set_pte_ext() which takes the address of the PTE to set, the Linux
PTE value, and the additional CPU PTE bits which aren't encoded in
the Linux PTE value.

Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mm/consistent.c  |2 +-
 arch/arm/mm/copypage-v4mc.c   |2 +-
 arch/arm/mm/copypage-v6.c |6 +++---
 arch/arm/mm/copypage-xscale.c |2 +-
 arch/arm/mm/fault-armv.c  |2 +-
 arch/arm/mm/flush.c   |2 +-
 arch/arm/mm/ioremap.c |4 ++--
 arch/arm/mm/mmu.c |8 +---
 arch/arm/mm/pgd.c |2 +-
 arch/arm/mm/proc-arm1020.S|4 ++--
 arch/arm/mm/proc-arm1020e.S   |4 ++--
 arch/arm/mm/proc-arm1022.S|6 +++---
 arch/arm/mm/proc-arm1026.S|6 +++---
 arch/arm/mm/proc-arm6_7.S |   10 +-
 arch/arm/mm/proc-arm720.S |6 +++---
 arch/arm/mm/proc-arm920.S |6 +++---
 arch/arm/mm/proc-arm922.S |6 +++---
 arch/arm/mm/proc-arm925.S |6 +++---
 arch/arm/mm/proc-arm926.S |6 +++---
 arch/arm/mm/proc-sa110.S  |6 +++---
 arch/arm/mm/proc-sa1100.S |6 +++---
 arch/arm/mm/proc-syms.c   |2 +-
 arch/arm/mm/proc-v6.S |   30 --
 arch/arm/mm/proc-xsc3.S   |6 +++---
 arch/arm/mm/proc-xscale.S |6 +++---
 include/asm-arm/cpu-multi32.h |7 ---
 include/asm-arm/cpu-single.h  |4 ++--
 include/asm-arm/pgtable.h |   11 +++
 28 files changed, 84 insertions(+), 84 deletions(-)

diff --git a/arch/arm/mm/consistent.c b/arch/arm/mm/consistent.c
index b797217..6a9c362 100644
--- a/arch/arm/mm/consistent.c
+++ b/arch/arm/mm/consistent.c
@@ -238,7 +238,7 @@ __dma_alloc(struct device *dev, size_t size, dma_addr_t 
*handle, gfp_t gfp,
 * x86 does not mark the pages reserved...
 */
SetPageReserved(page);
-   set_pte(pte, mk_pte(page, prot));
+   set_pte_ext(pte, mk_pte(page, prot), 0);
page++;
pte++;
off++;
diff --git a/arch/arm/mm/copypage-v4mc.c b/arch/arm/mm/copypage-v4mc.c
index df1645e..408b05a 100644
--- a/arch/arm/mm/copypage-v4mc.c
+++ b/arch/arm/mm/copypage-v4mc.c
@@ -71,7 +71,7 @@ void v4_mc_copy_user_page(void *kto, const void *kfrom, 
unsigned long vaddr)
 {
spin_lock(minicache_lock);
 
-   set_pte(TOP_PTE(0x8000), pfn_pte(__pa(kfrom)  PAGE_SHIFT, 
minicache_pgprot));
+   set_pte_ext(TOP_PTE(0x8000), pfn_pte(__pa(kfrom)  PAGE_SHIFT, 
minicache_pgprot), 0);
flush_tlb_kernel_page(0x8000);
 
mc_copy_user_page((void *)0x8000, kto);
diff --git a/arch/arm/mm/copypage-v6.c b/arch/arm/mm/copypage-v6.c
index 3d0d3a9..865777d 100644
--- a/arch/arm/mm/copypage-v6.c
+++ b/arch/arm/mm/copypage-v6.c
@@ -70,8 +70,8 @@ static void v6_copy_user_page_aliasing(void *kto, const void 
*kfrom, unsigned lo
 */
spin_lock(v6_lock);
 
-   set_pte(TOP_PTE(from_address) + offset, pfn_pte(__pa(kfrom)  
PAGE_SHIFT, PAGE_KERNEL));
-   set_pte(TOP_PTE(to_address) + offset, pfn_pte(__pa(kto)  PAGE_SHIFT, 
PAGE_KERNEL));
+   set_pte_ext(TOP_PTE(from_address) + offset, pfn_pte(__pa(kfrom)  
PAGE_SHIFT, PAGE_KERNEL), 0);
+   set_pte_ext(TOP_PTE(to_address) + offset, pfn_pte(__pa(kto)  
PAGE_SHIFT, PAGE_KERNEL), 0);
 
from = from_address + (offset  PAGE_SHIFT);
to   = to_address + (offset  PAGE_SHIFT);
@@ -110,7 +110,7 @@ static void v6_clear_user_page_aliasing(void *kaddr, 
unsigned long vaddr)
 */
spin_lock(v6_lock);
 
-   set_pte(TOP_PTE(to_address) + offset, pfn_pte(__pa(kaddr)  
PAGE_SHIFT, PAGE_KERNEL));
+   set_pte_ext(TOP_PTE(to_address) + offset, pfn_pte(__pa(kaddr)  
PAGE_SHIFT, PAGE_KERNEL), 0);
flush_tlb_kernel_page(to);
clear_page((void *)to);
 
diff --git a/arch/arm/mm/copypage-xscale.c b/arch/arm/mm/copypage-xscale.c
index 84ebe0a..aea5da7 100644
--- a/arch/arm/mm/copypage-xscale.c
+++ b/arch/arm/mm/copypage-xscale.c
@@ -93,7 +93,7 @@ void xscale_mc_copy_user_page(void *kto, const void *kfrom, 
unsigned long vaddr)
 {
spin_lock(minicache_lock);
 
-   set_pte(TOP_PTE(COPYPAGE_MINICACHE), pfn_pte(__pa(kfrom)  PAGE_SHIFT, 
minicache_pgprot));
+   

DebugFS : inotify create/mkdir support

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4f36557fbe4ab59feb2783cdb5d049cb8c3f34f3
Commit: 4f36557fbe4ab59feb2783cdb5d049cb8c3f34f3
Parent: 44c53c4ff01a3551e9d73604eba42e372e9d0c1a
Author: Mathieu Desnoyers [EMAIL PROTECTED]
AuthorDate: Fri Nov 24 13:45:37 2006 -0500
Committer:  Greg Kroah-Hartman [EMAIL PROTECTED]
CommitDate: Wed Dec 13 15:38:45 2006 -0800

DebugFS : inotify create/mkdir support

Add inotify create and mkdir events to DebugFS.

Signed-off-by: Mathieu Desnoyers [EMAIL PROTECTED]
Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED]
---
 fs/debugfs/inode.c |   12 ++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c
index 137d76c..020da4c 100644
--- a/fs/debugfs/inode.c
+++ b/fs/debugfs/inode.c
@@ -24,6 +24,7 @@
 #include linux/kobject.h
 #include linux/namei.h
 #include linux/debugfs.h
+#include linux/fsnotify.h
 
 #define DEBUGFS_MAGIC  0x64626720
 
@@ -87,15 +88,22 @@ static int debugfs_mkdir(struct inode *dir, struct dentry 
*dentry, int mode)
 
mode = (mode  (S_IRWXUGO | S_ISVTX)) | S_IFDIR;
res = debugfs_mknod(dir, dentry, mode, 0);
-   if (!res)
+   if (!res) {
inc_nlink(dir);
+   fsnotify_mkdir(dir, dentry);
+   }
return res;
 }
 
 static int debugfs_create(struct inode *dir, struct dentry *dentry, int mode)
 {
+   int res;
+
mode = (mode  S_IALLUGO) | S_IFREG;
-   return debugfs_mknod(dir, dentry, mode, 0);
+   res = debugfs_mknod(dir, dentry, mode, 0);
+   if (!res)
+   fsnotify_create(dir, dentry);
+   return res;
 }
 
 static inline int debugfs_positive(struct dentry *dentry)
-
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


[ARM] Provide a method to alter the control register

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=47fd705287e9377acd2a4cee9aeeea02867d2e54
Commit: 47fd705287e9377acd2a4cee9aeeea02867d2e54
Parent: 02828845dda5ccf921ab2557c6ca17b6e7fc70e2
Author: Russell King [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 18:33:53 2006 +
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Wed Dec 13 18:33:53 2006 +

[ARM] Provide a method to alter the control register

i.MX needs to tweak the control register to support CPU frequency
scaling.  Rather than have folk blindly try and change the control
register by writing to it and then wondering why it doesn't work,
provide a method (which is safe for UP only, and therefore only
available for UP) to achieve this.

Signed-off-by: Russell King [EMAIL PROTECTED]
---
 include/asm-arm/system.h |   20 
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/include/asm-arm/system.h b/include/asm-arm/system.h
index f60facc..e160aeb 100644
--- a/include/asm-arm/system.h
+++ b/include/asm-arm/system.h
@@ -173,6 +173,26 @@ static inline void set_copro_access(unsigned int val)
 extern unsigned long cr_no_alignment;  /* defined in entry-armv.S */
 extern unsigned long cr_alignment; /* defined in entry-armv.S */
 
+#ifndef CONFIG_SMP
+static inline void adjust_cr(unsigned long mask, unsigned long set)
+{
+   unsigned long flags, cr;
+
+   mask = ~CR_A;
+
+   set = mask;
+
+   local_irq_save(flags);
+
+   cr_no_alignment = (cr_no_alignment  ~mask) | set;
+   cr_alignment = (cr_alignment  ~mask) | set;
+
+   set_cr((get_cr()  ~mask) | set);
+
+   local_irq_restore(flags);
+}
+#endif
+
 #define UDBG_UNDEFINED (1  0)
 #define UDBG_SYSCALL   (1  1)
 #define UDBG_BADABORT  (1  2)
-
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


DebugFS : file/directory removal fix

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=29a7f3ada7fea5510504c5359c3f70d109aeb055
Commit: 29a7f3ada7fea5510504c5359c3f70d109aeb055
Parent: 65c67b1aea57d58168ad3dc1df27b0227401
Author: Mathieu Desnoyers [EMAIL PROTECTED]
AuthorDate: Fri Nov 24 13:51:14 2006 -0500
Committer:  Greg Kroah-Hartman [EMAIL PROTECTED]
CommitDate: Wed Dec 13 15:38:45 2006 -0800

DebugFS : file/directory removal fix

Fix file and directory removal in debugfs. Add inotify support for file 
removal.

The following scenario :
create dir a
create dir a/b

cd a/b (some process goes in cwd a/b)

rmdir a/b
rmdir a

fails due to the fact that a appears to be non empty. It is because
the b dentry is not deleted from a and still in use. The same
problem happens if b is a file. d_delete is nice enough to know when
it needs to unhash and free the dentry if nothing else is using it or,
if someone is using it, to remove it from the hash queues and wait for
it to be deleted when it has no users.

The nice side-effect of this fix is that it calls the file removal
notification.

Signed-off-by: Mathieu Desnoyers [EMAIL PROTECTED]
Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED]
---
 fs/debugfs/inode.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c
index 554f4a9..c692487 100644
--- a/fs/debugfs/inode.c
+++ b/fs/debugfs/inode.c
@@ -286,6 +286,7 @@ void debugfs_remove(struct dentry *dentry)
mutex_lock(parent-d_inode-i_mutex);
if (debugfs_positive(dentry)) {
if (dentry-d_inode) {
+   dget(dentry);
if (S_ISDIR(dentry-d_inode-i_mode)) {
ret = simple_rmdir(parent-d_inode, dentry);
if (ret)
@@ -295,6 +296,9 @@ void debugfs_remove(struct dentry *dentry)
dentry-d_name.name);
} else
simple_unlink(parent-d_inode, dentry);
+   if (!ret)
+   d_delete(dentry);
+   dput(dentry);
}
}
mutex_unlock(parent-d_inode-i_mutex);
-
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


[ARM] Remove empty fixup function

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=386b0ce25ae16eb1d25db6a004c959e3a9003ce3
Commit: 386b0ce25ae16eb1d25db6a004c959e3a9003ce3
Parent: c2dade510128fc6ac73eeb322742f4e90f600837
Author: Russell King [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 14:48:36 2006 +
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Wed Dec 13 14:48:36 2006 +

[ARM] Remove empty fixup function

Empty fixup functions are just a waste of code, and are not
necessary.  Remote them.

Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-pxa/trizeps4.c |5 -
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-pxa/trizeps4.c b/arch/arm/mach-pxa/trizeps4.c
index c1827d0..119c64b 100644
--- a/arch/arm/mach-pxa/trizeps4.c
+++ b/arch/arm/mach-pxa/trizeps4.c
@@ -393,10 +393,6 @@ static struct pxafb_mach_info sharp_lcd = {
 .pxafb_backlight_power = board_backlight_power,
 };
 
-static void __init trizeps4_fixup(struct machine_desc *desc, struct tag *tags, 
char **cmdline, struct meminfo *mi)
-{
-}
-
 static void __init trizeps4_init(void)
 {
platform_add_devices(trizeps4_devices, ARRAY_SIZE(trizeps4_devices));
@@ -469,7 +465,6 @@ MACHINE_START(TRIZEPS4, Keith und Koep Trizeps IV module)
.phys_io= 0x4000,
.io_pg_offst= (io_p2v(0x4000)  18)  0xfffc,
.boot_params= TRIZEPS4_SDRAM_BASE + 0x100,
-   .fixup  = trizeps4_fixup,
.init_machine   = trizeps4_init,
.map_io = trizeps4_map_io,
.init_irq   = pxa_init_irq,
-
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


[ARM] 3992/1: i.MX/MX1 CPU Frequency scaling support

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3c8cd0cce9ab8a25dbcf519cb0de00d2716f8379
Commit: 3c8cd0cce9ab8a25dbcf519cb0de00d2716f8379
Parent: 47fd705287e9377acd2a4cee9aeeea02867d2e54
Author: Pavel Pisa [EMAIL PROTECTED]
AuthorDate: Wed Dec 6 17:25:04 2006 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Wed Dec 13 18:36:02 2006 +

[ARM] 3992/1: i.MX/MX1 CPU Frequency scaling support

Support to change MX1 CPU frequency at runtime.
Tested on PiKRON's PiMX1 board and seems to be fully
stable up to 200 MHz end even as low as 8 MHz.

Signed-off-by: Pavel Pisa [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/Kconfig|   11 ++-
 arch/arm/mach-imx/Makefile  |2 +
 arch/arm/mach-imx/cpufreq.c |  287 +++
 include/asm-arm/arch-imx/imx-regs.h |   10 +-
 4 files changed, 306 insertions(+), 4 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 1a59110..63e7c0c 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -732,7 +732,7 @@ config XIP_PHYS_ADDR
 
 endmenu
 
-if (ARCH_SA1100 || ARCH_INTEGRATOR || ARCH_OMAP)
+if (ARCH_SA1100 || ARCH_INTEGRATOR || ARCH_OMAP || ARCH_IMX )
 
 menu CPU Frequency scaling
 
@@ -759,6 +759,15 @@ config CPU_FREQ_INTEGRATOR
 
  If in doubt, say Y.
 
+config CPU_FREQ_IMX
+   tristate CPUfreq driver for i.MX CPUs
+   depends on ARCH_IMX  CPU_FREQ
+   default n
+   help
+ This enables the CPUfreq driver for i.MX CPUs.
+
+ If in doubt, say N.
+
 endmenu
 
 endif
diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile
index 0b27d79..02272aa 100644
--- a/arch/arm/mach-imx/Makefile
+++ b/arch/arm/mach-imx/Makefile
@@ -9,6 +9,8 @@
 
 obj-y  += irq.o time.o dma.o generic.o
 
+obj-$(CONFIG_CPU_FREQ_IMX) += cpufreq.o
+
 # Specific board support
 obj-$(CONFIG_ARCH_MX1ADS) += mx1ads.o
 
diff --git a/arch/arm/mach-imx/cpufreq.c b/arch/arm/mach-imx/cpufreq.c
new file mode 100644
index 000..ac5f998
--- /dev/null
+++ b/arch/arm/mach-imx/cpufreq.c
@@ -0,0 +1,287 @@
+/*
+ * cpu.c: clock scaling for the iMX
+ *
+ * Copyright (C) 2000 2001, The Delft University of Technology
+ * Copyright (c) 2004 Sascha Hauer [EMAIL PROTECTED]
+ * Copyright (C) 2006 Inky Lung [EMAIL PROTECTED]
+ * Copyright (C) 2006 Pavel Pisa, PiKRON [EMAIL PROTECTED]
+ *
+ * Based on SA1100 version written by:
+ * - Johan Pouwelse ([EMAIL PROTECTED]): initial version
+ * - Erik Mouw ([EMAIL PROTECTED]):
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+/*#define DEBUG*/
+
+#include linux/kernel.h
+#include linux/types.h
+#include linux/init.h
+#include linux/cpufreq.h
+#include asm/system.h
+
+#include asm/hardware.h
+
+#include generic.h
+
+#ifndef __val2mfld
+#define __val2mfld(mask,val) (((mask)~((mask)1))*(val)(mask))
+#endif
+#ifndef __mfld2val
+#define __mfld2val(mask,val) (((val)(mask))/((mask)~((mask)1)))
+#endif
+
+#define CR_920T_CLOCK_MODE 0xC000
+#define CR_920T_FASTBUS_MODE   0x
+#define CR_920T_ASYNC_MODE 0xC000
+
+static u32 mpctl0_at_boot;
+
+static void imx_set_async_mode(void)
+{
+   adjust_cr(CR_920T_CLOCK_MODE, CR_920T_ASYNC_MODE);
+}
+
+static void imx_set_fastbus_mode(void)
+{
+   adjust_cr(CR_920T_CLOCK_MODE, CR_920T_FASTBUS_MODE);
+}
+
+static void imx_set_mpctl0(u32 mpctl0)
+{
+   unsigned long flags;
+
+   if (mpctl0 == 0) {
+   local_irq_save(flags);
+   CSCR = ~CSCR_MPEN;
+   local_irq_restore(flags);
+   return;
+   }
+
+   local_irq_save(flags);
+   MPCTL0 = mpctl0;
+   CSCR |= CSCR_MPEN;
+   local_irq_restore(flags);
+}
+
+/**
+ * imx_compute_mpctl - compute new PLL parameters
+ * @new_mpctl: pointer to location assigned by new PLL control register value
+ * @cur_mpctl: current PLL control register parameters
+ * @freq:  required frequency in Hz
+ * @relation:  is one of %CPUFREQ_RELATION_L (supremum)
+ * and %CPUFREQ_RELATION_H (infimum)
+ */
+long imx_compute_mpctl(u32 *new_mpctl, u32 cur_mpctl, unsigned long freq, int 
relation)
+{
+u32 f_ref = (CSCR  CSCR_SYSTEM_SEL) ? 1600 : (CLK32 * 512);
+ 

[ARM] 4012/1: Clocksource for pxa

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c80204e5d67d1452ac0b761d980f1651dc2c66dc
Commit: c80204e5d67d1452ac0b761d980f1651dc2c66dc
Parent: da2c12a279ae225f3d4696f76cb3b32a5bec5bfb
Author: Sascha Hauer [EMAIL PROTECTED]
AuthorDate: Tue Dec 12 09:21:50 2006 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Wed Dec 13 14:37:26 2006 +

[ARM] 4012/1: Clocksource for pxa

Add a clocksource driver for pxa2xx systems

Signed-off-by: Luotao Fu [EMAIL PROTECTED]
Signed-off-by: Sascha Hauer [EMAIL PROTECTED]
Signed-off-by: Nicolas Pitre [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-pxa/time.c |   45 +++--
 1 files changed, 23 insertions(+), 22 deletions(-)

diff --git a/arch/arm/mach-pxa/time.c b/arch/arm/mach-pxa/time.c
index b914668..3775b8f 100644
--- a/arch/arm/mach-pxa/time.c
+++ b/arch/arm/mach-pxa/time.c
@@ -18,6 +18,7 @@
 #include linux/signal.h
 #include linux/errno.h
 #include linux/sched.h
+#include linux/clocksource.h
 
 #include asm/system.h
 #include asm/hardware.h
@@ -48,27 +49,6 @@ static int pxa_set_rtc(void)
return 0;
 }
 
-/* IRQs are disabled before entering here from do_gettimeofday() */
-static unsigned long pxa_gettimeoffset (void)
-{
-   long ticks_to_match, elapsed, usec;
-
-   /* Get ticks before next timer match */
-   ticks_to_match = OSMR0 - OSCR;
-
-   /* We need elapsed ticks since last match */
-   elapsed = LATCH - ticks_to_match;
-
-   /* don't get fooled by the workaround in pxa_timer_interrupt() */
-   if (elapsed = 0)
-   return 0;
-
-   /* Now convert them to usec */
-   usec = (unsigned long)(elapsed * (tick_nsec / 1000))/LATCH;
-
-   return usec;
-}
-
 #ifdef CONFIG_NO_IDLE_HZ
 static unsigned long initial_match;
 static int match_posponed;
@@ -121,6 +101,20 @@ static struct irqaction pxa_timer_irq = {
.handler= pxa_timer_interrupt,
 };
 
+cycle_t pxa_get_cycles(void)
+{
+   return OSCR;
+}
+
+static struct clocksource clocksource_pxa = {
+   .name   = pxa_timer,
+   .rating = 200,
+   .read   = pxa_get_cycles,
+   .mask   = CLOCKSOURCE_MASK(32),
+   .shift  = 20,
+   .is_continuous  = 1,
+};
+
 static void __init pxa_timer_init(void)
 {
struct timespec tv;
@@ -139,6 +133,14 @@ static void __init pxa_timer_init(void)
OIER = OIER_E0; /* enable match on timer 0 to cause interrupts 
*/
OSMR0 = OSCR + LATCH;   /* set initial match */
local_irq_restore(flags);
+
+   /* on PXA OSCR runs continiously and is not written to, so we can use it
+* as clock source directly.
+*/
+   clocksource_pxa.mult =
+   clocksource_hz2mult(CLOCK_TICK_RATE, clocksource_pxa.shift);
+   clocksource_register(clocksource_pxa);
+
 }
 
 #ifdef CONFIG_NO_IDLE_HZ
@@ -211,7 +213,6 @@ struct sys_timer pxa_timer = {
.init   = pxa_timer_init,
.suspend= pxa_timer_suspend,
.resume = pxa_timer_resume,
-   .offset = pxa_gettimeoffset,
 #ifdef CONFIG_NO_IDLE_HZ
.dyn_tick   = pxa_dyn_tick,
 #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


[ARM] 4004/1: S3C24XX: UDC remove implict addition of VA to regs

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9fddda232ca2de4d40ba9c3890e27bdb4f4f8bbd
Commit: 9fddda232ca2de4d40ba9c3890e27bdb4f4f8bbd
Parent: 94b1e96d9dfbb8cc19b09b68a3621243752c0586
Author: Ben Dooks [EMAIL PROTECTED]
AuthorDate: Fri Dec 8 00:08:33 2006 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Fri Dec 8 16:05:53 2006 +

[ARM] 4004/1: S3C24XX: UDC remove implict addition of VA to regs

Remove the implicit addition of a virtual address
to the UDC registers. This should have been done
by ioremap() in the driver, not by a static map.

Signed-off-by: Ben Dooks [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 include/asm-arm/arch-s3c2410/regs-udc.h |7 +++
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/include/asm-arm/arch-s3c2410/regs-udc.h 
b/include/asm-arm/arch-s3c2410/regs-udc.h
index 487861d..3c83546 100644
--- a/include/asm-arm/arch-s3c2410/regs-udc.h
+++ b/include/asm-arm/arch-s3c2410/regs-udc.h
@@ -11,8 +11,7 @@
 #ifndef __ASM_ARCH_REGS_UDC_H
 #define __ASM_ARCH_REGS_UDC_H
 
-
-#define S3C2410_USBDREG(x) ((x) + S3C24XX_VA_USBDEV)
+#define S3C2410_USBDREG(x) (x)
 
 #define S3C2410_UDC_FUNC_ADDR_REG  S3C2410_USBDREG(0x0140)
 #define S3C2410_UDC_PWR_REGS3C2410_USBDREG(0x0144)
@@ -136,8 +135,8 @@
 #define S3C2410_UDC_OCSR2_ISO  (16) // R/W
 #define S3C2410_UDC_OCSR2_DMAIEN   (15) // R/W
 
-#define S3C2410_UDC_SETIX(x)   \
-   __raw_writel(S3C2410_UDC_INDEX_ ## x, S3C2410_UDC_INDEX_REG);
+#define S3C2410_UDC_SETIX(base,x)  \
+   writel(S3C2410_UDC_INDEX_ ## x, base+S3C2410_UDC_INDEX_REG);
 
 
 #define S3C2410_UDC_EP0_CSR_OPKRDY (10)
-
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


Driver core: Make platform_device_add_data accept a const pointer

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6eefd34fdcbd34e2cddb8b7da26d838367591954
Commit: 6eefd34fdcbd34e2cddb8b7da26d838367591954
Parent: c63e07834bb12910bea41da15b8902150f5217c2
Author: Scott Wood [EMAIL PROTECTED]
AuthorDate: Mon Dec 4 14:57:19 2006 -0800
Committer:  Greg Kroah-Hartman [EMAIL PROTECTED]
CommitDate: Wed Dec 13 15:38:46 2006 -0800

Driver core: Make platform_device_add_data accept a const pointer

platform_device_add_data() makes a copy of the data that is given to it,
and thus the parameter can be const.  This removes a warning when data
from get_property() on powerpc is handed to platform_device_add_data(),
as get_property() returns a const pointer.

Signed-off-by: Scott Wood [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED]
---
 drivers/base/platform.c |2 +-
 include/linux/platform_device.h |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index 0338289..f9c903b 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -212,7 +212,7 @@ EXPORT_SYMBOL_GPL(platform_device_add_resources);
  * pointer.  The memory associated with the platform data will be freed
  * when the platform device is released.
  */
-int platform_device_add_data(struct platform_device *pdev, void *data, size_t 
size)
+int platform_device_add_data(struct platform_device *pdev, const void *data, 
size_t size)
 {
void *d;
 
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h
index 20f47b8..8bbd459 100644
--- a/include/linux/platform_device.h
+++ b/include/linux/platform_device.h
@@ -39,7 +39,7 @@ extern struct platform_device 
*platform_device_register_simple(char *, unsigned
 
 extern struct platform_device *platform_device_alloc(const char *name, 
unsigned int id);
 extern int platform_device_add_resources(struct platform_device *pdev, struct 
resource *res, unsigned int num);
-extern int platform_device_add_data(struct platform_device *pdev, void *data, 
size_t size);
+extern int platform_device_add_data(struct platform_device *pdev, const void 
*data, size_t size);
 extern int platform_device_add(struct platform_device *pdev);
 extern void platform_device_del(struct platform_device *pdev);
 extern void platform_device_put(struct platform_device *pdev);
-
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


[ARM] 4011/1: AT91SAM9260: Fix compilation with NAND driver

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8df12925a04194e77081a855d688d6f5638acd9d
Commit: 8df12925a04194e77081a855d688d6f5638acd9d
Parent: 44853a81ed3b1c4b3cee19622e2fc5687158c46f
Author: Andrew Victor [EMAIL PROTECTED]
AuthorDate: Fri Dec 8 11:30:29 2006 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Fri Dec 8 15:42:05 2006 +

[ARM] 4011/1: AT91SAM9260: Fix compilation with NAND driver

Add missing include for NAND device support on AT91SAM9260.

Signed-off-by: Wojtek Kaniewski [EMAIL PROTECTED]
Signed-off-by: Andrew Victor [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-at91rm9200/at91sam9260_devices.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-at91rm9200/at91sam9260_devices.c 
b/arch/arm/mach-at91rm9200/at91sam9260_devices.c
index a6c596d..f42d3a4 100644
--- a/arch/arm/mach-at91rm9200/at91sam9260_devices.c
+++ b/arch/arm/mach-at91rm9200/at91sam9260_devices.c
@@ -18,6 +18,7 @@
 #include asm/arch/gpio.h
 #include asm/arch/at91sam9260.h
 #include asm/arch/at91sam926x_mc.h
+#include asm/arch/at91sam9260_matrix.h
 
 #include generic.h
 
-
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


[ARM] 4017/1: [Jornada7xx] - Updating Jornada720.c

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=408966b85e47859a488f0f6e8c83f09beb563081
Commit: 408966b85e47859a488f0f6e8c83f09beb563081
Parent: 3c8cd0cce9ab8a25dbcf519cb0de00d2716f8379
Author: Kristoffer Ericson [EMAIL PROTECTED]
AuthorDate: Wed Dec 13 21:32:08 2006 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Wed Dec 13 22:43:37 2006 +

[ARM] 4017/1: [Jornada7xx] - Updating Jornada720.c

* HP Jornada 720 uses epson 1356 chip for graphics. This chip is compatible 
with s1d13xxxfb driver.

* HP Jornada 720 uses a Microprocessor Control Unit to talk to various
hardware. We add it as a platform device in jornada720_init()

* We provide pm_suspend() to avoid unresolved symbols in apm.o. We are
unable to truly suspend now, hence the stub.

* Speaker/microphone enabling got removed because it will be placed in the 
alsa driver.

Signed-off-by: Filip Zyzniewski (address hidden)
Signed-off-by: Kristoffer Ericson (address hidden)
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-sa1100/jornada720.c |  229 +
 1 files changed, 204 insertions(+), 25 deletions(-)

diff --git a/arch/arm/mach-sa1100/jornada720.c 
b/arch/arm/mach-sa1100/jornada720.c
index 17f5a43..54ecdaa 100644
--- a/arch/arm/mach-sa1100/jornada720.c
+++ b/arch/arm/mach-sa1100/jornada720.c
@@ -1,5 +1,15 @@
 /*
  * linux/arch/arm/mach-sa1100/jornada720.c
+ *
+ * HP Jornada720 init code
+ *
+ * Copyright (C) 2006 Filip Zyzniewski [EMAIL PROTECTED]
+ *  Copyright (C) 2005 Michael Gernoth [EMAIL PROTECTED]
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
  */
 
 #include linux/init.h
@@ -10,13 +20,13 @@
 #include linux/ioport.h
 #include linux/mtd/mtd.h
 #include linux/mtd/partitions.h
+#include video/s1d13xxxfb.h
 
 #include asm/hardware.h
 #include asm/hardware/sa.h
 #include asm/irq.h
 #include asm/mach-types.h
 #include asm/setup.h
-
 #include asm/mach/arch.h
 #include asm/mach/flash.h
 #include asm/mach/map.h
@@ -24,13 +34,170 @@
 
 #include generic.h
 
+/*
+ * HP Documentation referred in this file:
+ * http://www.jlime.com/downloads/development/docs/jornada7xx/jornada720.txt
+ */
+
+/* line 110 of HP's doc */
+#define TUCR_VAL   0x2400
+
+/* memory space (line 52 of HP's doc) */
+#define SAREGSTART 0x4000
+#define SAREGLEN   0x1fff
+#define EPSONREGSTART  0x4800
+#define EPSONREGLEN0x0010
+#define EPSONFBSTART   0x4820
+/* 512kB framebuffer */
+#define EPSONFBLEN 512*1024
+
+static struct s1d13xxxfb_regval s1d13xxxfb_initregs[] = {
+   /* line 344 of HP's doc */
+   {0x0001,0x00},  // Miscellaneous Register
+   {0x01FC,0x00},  // Display Mode Register
+   {0x0004,0x00},  // General IO Pins Configuration Register 0
+   {0x0005,0x00},  // General IO Pins Configuration Register 1
+   {0x0008,0x00},  // General IO Pins Control Register 0
+   {0x0009,0x00},  // General IO Pins Control Register 1
+   {0x0010,0x01},  // Memory Clock Configuration Register
+   {0x0014,0x11},  // LCD Pixel Clock Configuration Register
+   {0x0018,0x01},  // CRT/TV Pixel Clock Configuration Register
+   {0x001C,0x01},  // MediaPlug Clock Configuration Register
+   {0x001E,0x01},  // CPU To Memory Wait State Select Register
+   {0x0020,0x00},  // Memory Configuration Register
+   {0x0021,0x45},  // DRAM Refresh Rate Register
+   {0x002A,0x01},  // DRAM Timings Control Register 0
+   {0x002B,0x03},  // DRAM Timings Control Register 1
+   {0x0030,0x1c},  // Panel Type Register
+   {0x0031,0x00},  // MOD Rate Register
+   {0x0032,0x4F},  // LCD Horizontal Display Width Register
+   {0x0034,0x07},  // LCD Horizontal Non-Display Period Register
+   {0x0035,0x01},  // TFT FPLINE Start Position Register
+   {0x0036,0x0B},  // TFT FPLINE Pulse Width Register
+   {0x0038,0xEF},  // LCD Vertical Display Height Register 0
+   {0x0039,0x00},  // LCD Vertical Display Height Register 1
+   {0x003A,0x13},  // LCD Vertical Non-Display Period Register
+   {0x003B,0x0B},  // TFT FPFRAME Start Position Register
+   {0x003C,0x01},  // TFT FPFRAME Pulse Width Register
+   {0x0040,0x05},  // LCD Display Mode Register (2:4bpp,3:8bpp,5:16bpp)
+   {0x0041,0x00},  // LCD Miscellaneous Register
+   {0x0042,0x00},  // LCD Display Start Address Register 0
+   {0x0043,0x00},  // LCD Display Start Address Register 1
+   {0x0044,0x00},  // LCD Display Start Address Register 2
+   {0x0046,0x80},  // LCD Memory Address Offset Register 0
+   {0x0047,0x02},  // LCD Memory Address Offset Register 1
+   {0x0048,0x00},  // LCD Pixel Panning Register
+   {0x004A,0x00},  // LCD Display FIFO High 

[ARM] 4014/1: include drivers/hid/Kconfig

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c2dade510128fc6ac73eeb322742f4e90f600837
Commit: c2dade510128fc6ac73eeb322742f4e90f600837
Parent: 1a815aed1e03c73fcd0390109c7da9c69dc97490
Author: Sascha Hauer [EMAIL PROTECTED]
AuthorDate: Tue Dec 12 10:32:42 2006 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Wed Dec 13 14:37:29 2006 +

[ARM] 4014/1: include drivers/hid/Kconfig

HID drivers are in their own directory now, so we have to
include the Kconfig file for arm.

Signed-off-by: Sascha Hauer [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/Kconfig |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 8c05d43..1a59110 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -937,6 +937,8 @@ source drivers/video/Kconfig
 
 source sound/Kconfig
 
+source drivers/hid/Kconfig
+
 source drivers/usb/Kconfig
 
 source drivers/mmc/Kconfig
-
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


[ARM] Clean up KERNEL_RAM_ADDR

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f06b97ffd1ed7a96d5022d52f795fba8483afb75
Commit: f06b97ffd1ed7a96d5022d52f795fba8483afb75
Parent: bca0b8e75f6b7cf52cf52c967286b72d84f9b37e
Author: Russell King [EMAIL PROTECTED]
AuthorDate: Mon Dec 11 22:29:16 2006 +
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Mon Dec 11 22:29:16 2006 +

[ARM] Clean up KERNEL_RAM_ADDR

Clean up the KERNEL_RAM_ADDR stuff in arch/arm/kernel/head.S to
make it clearer what's referring to what.  In doing so, remove
the usage of __virt_to_phys(), which is not guaranteed to be
something that the assembler can parse.

Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/kernel/head.S |   19 ++-
 1 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
index bda0748..d994561 100644
--- a/arch/arm/kernel/head.S
+++ b/arch/arm/kernel/head.S
@@ -22,30 +22,31 @@
 #include asm/thread_info.h
 #include asm/system.h
 
-#define KERNEL_RAM_ADDR(PAGE_OFFSET + TEXT_OFFSET)
+#define KERNEL_RAM_VADDR   (PAGE_OFFSET + TEXT_OFFSET)
+#define KERNEL_RAM_PADDR   (PHYS_OFFSET + TEXT_OFFSET)
 
 /*
  * swapper_pg_dir is the virtual address of the initial page table.
- * We place the page tables 16K below KERNEL_RAM_ADDR.  Therefore, we must
- * make sure that KERNEL_RAM_ADDR is correctly set.  Currently, we expect
+ * We place the page tables 16K below KERNEL_RAM_VADDR.  Therefore, we must
+ * make sure that KERNEL_RAM_VADDR is correctly set.  Currently, we expect
  * the least significant 16 bits to be 0x8000, but we could probably
- * relax this restriction to KERNEL_RAM_ADDR = PAGE_OFFSET + 0x4000.
+ * relax this restriction to KERNEL_RAM_VADDR = PAGE_OFFSET + 0x4000.
  */
-#if (KERNEL_RAM_ADDR  0x) != 0x8000
-#error KERNEL_RAM_ADDR must start at 0x8000
+#if (KERNEL_RAM_VADDR  0x) != 0x8000
+#error KERNEL_RAM_VADDR must start at 0x8000
 #endif
 
.globl  swapper_pg_dir
-   .equswapper_pg_dir, KERNEL_RAM_ADDR - 0x4000
+   .equswapper_pg_dir, KERNEL_RAM_VADDR - 0x4000
 
.macro  pgtbl, rd
-   ldr \rd, =(__virt_to_phys(KERNEL_RAM_ADDR - 0x4000))
+   ldr \rd, =(KERNEL_RAM_PADDR - 0x4000)
.endm
 
 #ifdef CONFIG_XIP_KERNEL
 #define TEXTADDR  XIP_VIRT_ADDR(CONFIG_XIP_PHYS_ADDR)
 #else
-#define TEXTADDR  KERNEL_RAM_ADDR
+#define TEXTADDR  KERNEL_RAM_VADDR
 #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


Driver core: deprecate PM_LEGACY, default it to N

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f89bce3d9afc6b1fb898ae176df4962c1303ee86
Commit: f89bce3d9afc6b1fb898ae176df4962c1303ee86
Parent: 6eefd34fdcbd34e2cddb8b7da26d838367591954
Author: David Brownell [EMAIL PROTECTED]
AuthorDate: Tue Dec 5 03:07:38 2006 -0800
Committer:  Greg Kroah-Hartman [EMAIL PROTECTED]
CommitDate: Wed Dec 13 15:38:46 2006 -0800

Driver core: deprecate PM_LEGACY, default it to N

Deprecate the old legacy PM API, and more importantly default it to n.
Virtually nothing in-tree uses it any more.

Signed-off-by: David Brownell [EMAIL PROTECTED]
Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED]
---
 kernel/power/Kconfig |9 +
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig
index 710ed08..ed29622 100644
--- a/kernel/power/Kconfig
+++ b/kernel/power/Kconfig
@@ -20,13 +20,14 @@ config PM
  sending the processor to sleep and saving power.
 
 config PM_LEGACY
-   bool Legacy Power Management API
+   bool Legacy Power Management API (DEPRECATED)
depends on PM
-   default y
+   default n
---help---
-  Support for pm_register() and friends.
+  Support for pm_register() and friends.  This old API is obsoleted
+  by the driver model.
 
-  If unsure, say Y.
+  If unsure, say N.
 
 config PM_DEBUG
bool Power Management Debug Support
-
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


Driver core: show initstate of module

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1f71740ab9714bf5ae9ee04c724ff0d5c67ca3dc
Commit: 1f71740ab9714bf5ae9ee04c724ff0d5c67ca3dc
Parent: aef6fba4f97bbec1dc5a253f388be9a4c7a30e41
Author: Kay Sievers [EMAIL PROTECTED]
AuthorDate: Fri Nov 24 12:15:25 2006 +0100
Committer:  Greg Kroah-Hartman [EMAIL PROTECTED]
CommitDate: Wed Dec 13 15:38:45 2006 -0800

Driver core: show initstate of module

Show the initialization state(live, coming, going) of the module:
  $ cat /sys/module/usbcore/initstate
  live

Signed-off-by: Kay Sievers [EMAIL PROTECTED]
Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED]
---
 kernel/module.c |   25 +
 1 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/kernel/module.c b/kernel/module.c
index d9eae45..b565eae 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -824,9 +824,34 @@ static inline void module_unload_init(struct module *mod)
 }
 #endif /* CONFIG_MODULE_UNLOAD */
 
+static ssize_t show_initstate(struct module_attribute *mattr,
+  struct module *mod, char *buffer)
+{
+   const char *state = unknown;
+
+   switch (mod-state) {
+   case MODULE_STATE_LIVE:
+   state = live;
+   break;
+   case MODULE_STATE_COMING:
+   state = coming;
+   break;
+   case MODULE_STATE_GOING:
+   state = going;
+   break;
+   }
+   return sprintf(buffer, %s\n, state);
+}
+
+static struct module_attribute initstate = {
+   .attr = { .name = initstate, .mode = 0444, .owner = THIS_MODULE },
+   .show = show_initstate,
+};
+
 static struct module_attribute *modinfo_attrs[] = {
modinfo_version,
modinfo_srcversion,
+   initstate,
 #ifdef CONFIG_MODULE_UNLOAD
refcnt,
 #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


[NETFILTER]: Fix INET=n linking error

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3a411355bcf4bf714022420badfec1cd1e2fbd9a
Commit: 3a411355bcf4bf714022420badfec1cd1e2fbd9a
Parent: e05135d1550e73f722ae92909f9c9f44b305e9e2
Author: Patrick McHardy [EMAIL PROTECTED]
AuthorDate: Tue Dec 12 00:27:46 2006 -0800
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Wed Dec 13 16:48:18 2006 -0800

[NETFILTER]: Fix INET=n linking error

Building with INET=n results in

WARNING: ip_route_output_key [net/netfilter/nf_conntrack_h323.ko] 
undefined!

The entire code in net/netfilter is only used for IPv4/IPv6 currently, so
let it depend on INET.

Noticed by Toralf Förster [EMAIL PROTECTED].

Signed-off-by: Patrick McHardy [EMAIL PROTECTED]
Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 net/netfilter/Kconfig |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/netfilter/Kconfig b/net/netfilter/Kconfig
index 3a66878..1b853c3 100644
--- a/net/netfilter/Kconfig
+++ b/net/netfilter/Kconfig
@@ -1,5 +1,5 @@
 menu Core Netfilter Configuration
-   depends on NET  NETFILTER
+   depends on NET  INET  NETFILTER
 
 config NETFILTER_NETLINK
tristate Netfilter netlink interface
-
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


[NETFILTER]: nf_nat: fix NF_NAT dependency

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=083e69e99e1c728d360c6346456daa4d4c19e25c
Commit: 083e69e99e1c728d360c6346456daa4d4c19e25c
Parent: 3a411355bcf4bf714022420badfec1cd1e2fbd9a
Author: Yasuyuki Kozakai [EMAIL PROTECTED]
AuthorDate: Tue Dec 12 00:28:09 2006 -0800
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Wed Dec 13 16:48:19 2006 -0800

[NETFILTER]: nf_nat: fix NF_NAT dependency

NF_NAT depends on NF_CONNTRACK_IPV4, not NF_CONNTRACK.

Signed-off-by: Yasuyuki Kozakai [EMAIL PROTECTED]
Signed-off-by: Patrick McHardy [EMAIL PROTECTED]
Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 net/ipv4/netfilter/Kconfig |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/ipv4/netfilter/Kconfig b/net/ipv4/netfilter/Kconfig
index 363df99..f6026d4 100644
--- a/net/ipv4/netfilter/Kconfig
+++ b/net/ipv4/netfilter/Kconfig
@@ -401,7 +401,7 @@ config IP_NF_NAT
 # NAT + specific targets: nf_conntrack
 config NF_NAT
tristate Full NAT
-   depends on IP_NF_IPTABLES  NF_CONNTRACK
+   depends on IP_NF_IPTABLES  NF_CONNTRACK_IPV4
help
  The Full NAT option allows masquerading, port forwarding and other
  forms of full Network Address Port Translation.  It is controlled by
-
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


[NETFILTER]: x_tables: error if ip_conntrack is asked to handle IPv6 packets

2006-12-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fe0b9294c9f951a64c768f8a5879154235efe63f
Commit: fe0b9294c9f951a64c768f8a5879154235efe63f
Parent: 083e69e99e1c728d360c6346456daa4d4c19e25c
Author: Yasuyuki Kozakai [EMAIL PROTECTED]
AuthorDate: Tue Dec 12 00:28:40 2006 -0800
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Wed Dec 13 16:48:20 2006 -0800

[NETFILTER]: x_tables: error if ip_conntrack is asked to handle IPv6 packets

To do that, this makes nf_ct_l3proto_try_module_{get,put} compatible
functions. As a result we can remove '#ifdef' surrounds and direct call of
need_conntrack().

Signed-off-by: Yasuyuki Kozakai [EMAIL PROTECTED]
Signed-off-by: Patrick McHardy [EMAIL PROTECTED]
Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 include/net/netfilter/nf_conntrack_compat.h |   10 ++
 net/netfilter/xt_connmark.c |7 +--
 net/netfilter/xt_conntrack.c|8 ++--
 net/netfilter/xt_helper.c   |8 ++--
 net/netfilter/xt_state.c|7 +--
 5 files changed, 16 insertions(+), 24 deletions(-)

diff --git a/include/net/netfilter/nf_conntrack_compat.h 
b/include/net/netfilter/nf_conntrack_compat.h
index f1b1482..b9ce5c8 100644
--- a/include/net/netfilter/nf_conntrack_compat.h
+++ b/include/net/netfilter/nf_conntrack_compat.h
@@ -64,6 +64,16 @@ static inline int nf_ct_get_ctinfo(const struct sk_buff *skb,
return (ct != NULL);
 }
 
+static inline int nf_ct_l3proto_try_module_get(unsigned short l3proto)
+{
+   need_conntrack();
+   return l3proto == PF_INET ? 0 : -1;
+}
+
+static inline void nf_ct_l3proto_module_put(unsigned short l3proto)
+{
+}
+
 #else /* CONFIG_IP_NF_CONNTRACK */
 
 #include net/netfilter/ipv4/nf_conntrack_ipv4.h
diff --git a/net/netfilter/xt_connmark.c b/net/netfilter/xt_connmark.c
index a8f0305..36c2def 100644
--- a/net/netfilter/xt_connmark.c
+++ b/net/netfilter/xt_connmark.c
@@ -63,22 +63,18 @@ checkentry(const char *tablename,
printk(KERN_WARNING connmark: only support 32bit mark\n);
return 0;
}
-#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
if (nf_ct_l3proto_try_module_get(match-family)  0) {
-   printk(KERN_WARNING can't load nf_conntrack support for 
+   printk(KERN_WARNING can't load conntrack support for 
proto=%d\n, match-family);
return 0;
}
-#endif
return 1;
 }
 
 static void
 destroy(const struct xt_match *match, void *matchinfo)
 {
-#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
nf_ct_l3proto_module_put(match-family);
-#endif
 }
 
 #ifdef CONFIG_COMPAT
@@ -140,7 +136,6 @@ static struct xt_match xt_connmark_match[] = {
 
 static int __init xt_connmark_init(void)
 {
-   need_conntrack();
return xt_register_matches(xt_connmark_match,
   ARRAY_SIZE(xt_connmark_match));
 }
diff --git a/net/netfilter/xt_conntrack.c b/net/netfilter/xt_conntrack.c
index 0ea501a..3dc2357 100644
--- a/net/netfilter/xt_conntrack.c
+++ b/net/netfilter/xt_conntrack.c
@@ -20,6 +20,7 @@
 
 #include linux/netfilter/x_tables.h
 #include linux/netfilter/xt_conntrack.h
+#include net/netfilter/nf_conntrack_compat.h
 
 MODULE_LICENSE(GPL);
 MODULE_AUTHOR(Marc Boucher [EMAIL PROTECTED]);
@@ -228,21 +229,17 @@ checkentry(const char *tablename,
   void *matchinfo,
   unsigned int hook_mask)
 {
-#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
if (nf_ct_l3proto_try_module_get(match-family)  0) {
-   printk(KERN_WARNING can't load nf_conntrack support for 
+   printk(KERN_WARNING can't load conntrack support for 
proto=%d\n, match-family);
return 0;
}
-#endif
return 1;
 }
 
 static void destroy(const struct xt_match *match, void *matchinfo)
 {
-#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
nf_ct_l3proto_module_put(match-family);
-#endif
 }
 
 static struct xt_match conntrack_match = {
@@ -257,7 +254,6 @@ static struct xt_match conntrack_match = {
 
 static int __init xt_conntrack_init(void)
 {
-   need_conntrack();
return xt_register_match(conntrack_match);
 }
 
diff --git a/net/netfilter/xt_helper.c b/net/netfilter/xt_helper.c
index 5d7818b..04bc32b 100644
--- a/net/netfilter/xt_helper.c
+++ b/net/netfilter/xt_helper.c
@@ -24,6 +24,7 @@
 #endif
 #include linux/netfilter/x_tables.h
 #include linux/netfilter/xt_helper.h
+#include net/netfilter/nf_conntrack_compat.h
 
 MODULE_LICENSE(GPL);
 MODULE_AUTHOR(Martin Josefsson [EMAIL PROTECTED]);
@@ -143,13 +144,11 @@ static int check(const char *tablename,
 {
struct xt_helper_info *info = matchinfo;
 
-#if defined(CONFIG_NF_CONNTRACK) || 

  1   2   >