* [-mm patch 1/8] s/fucn/func/ typo fix
2006-02-21 3:46 [-mm patch 0/8] fix build errors by bitops code consolidation Akinobu Mita
@ 2006-02-21 3:46 ` Akinobu Mita
2006-02-21 3:46 ` [-mm patch 2/8] more s/fucn/func/ typo fixes Akinobu Mita
` (6 subsequent siblings)
7 siblings, 0 replies; 11+ messages in thread
From: Akinobu Mita @ 2006-02-21 3:46 UTC (permalink / raw)
To: akpm; +Cc: linux-kernel, Akinobu Mita
[-- Attachment #1: fucn-to-func.patch --]
[-- Type: text/plain, Size: 876 bytes --]
typo fix
Signed-off-by: Akinobu Mita <mita@miraclelinux.com>
include/asm-generic/bitops/atomic.h | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
Index: 2.6-mm/include/asm-generic/bitops/atomic.h
===================================================================
--- 2.6-mm.orig/include/asm-generic/bitops/atomic.h
+++ 2.6-mm/include/asm-generic/bitops/atomic.h
@@ -42,7 +42,7 @@ extern raw_spinlock_t __atomic_hash[ATOM
/*
* NMI events can occur at any time, including when interrupts have been
* disabled by *_irqsave(). So you can get NMI events occurring while a
- * *_bit fucntion is holding a spin lock. If the NMI handler also wants
+ * *_bit function is holding a spin lock. If the NMI handler also wants
* to do bit manipulation (and they do) then you can get a deadlock
* between the original caller of *_bit() and the NMI handler.
*
--
^ permalink raw reply [flat|nested] 11+ messages in thread* [-mm patch 2/8] more s/fucn/func/ typo fixes
2006-02-21 3:46 [-mm patch 0/8] fix build errors by bitops code consolidation Akinobu Mita
2006-02-21 3:46 ` [-mm patch 1/8] s/fucn/func/ typo fix Akinobu Mita
@ 2006-02-21 3:46 ` Akinobu Mita
2006-02-21 3:46 ` [-mm patch 3/8] frv: remove unnesesary "&" Akinobu Mita
` (5 subsequent siblings)
7 siblings, 0 replies; 11+ messages in thread
From: Akinobu Mita @ 2006-02-21 3:46 UTC (permalink / raw)
To: akpm; +Cc: linux-kernel, Akinobu Mita
[-- Attachment #1: more-fucn-to-func.patch --]
[-- Type: text/plain, Size: 5673 bytes --]
s/fucntion/function/ typo fixes
Signed-off-by: Akinobu Mita <mita@miraclelinux.com>
Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl | 2 +-
arch/m68k/bvme6000/config.c | 2 +-
arch/s390/crypto/crypt_s390_query.c | 2 +-
drivers/acpi/processor_core.c | 2 +-
drivers/net/sis900.c | 4 ++--
include/linux/gameport.h | 4 ++--
include/linux/serio.h | 6 +++---
7 files changed, 11 insertions(+), 11 deletions(-)
Index: 2.6-mm/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
===================================================================
--- 2.6-mm.orig/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
+++ 2.6-mm/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
@@ -2836,7 +2836,7 @@ struct _snd_pcm_runtime {
<para>
Note that this callback became non-atomic since the recent version.
- You can use schedule-related fucntions safely in this callback now.
+ You can use schedule-related functions safely in this callback now.
</para>
<para>
Index: 2.6-mm/arch/m68k/bvme6000/config.c
===================================================================
--- 2.6-mm.orig/arch/m68k/bvme6000/config.c
+++ 2.6-mm/arch/m68k/bvme6000/config.c
@@ -142,7 +142,7 @@ void __init config_bvme6000(void)
/* Now do the PIT configuration */
pit->pgcr = 0x00; /* Unidirectional 8 bit, no handshake for now */
- pit->psrr = 0x18; /* PIACK and PIRQ fucntions enabled */
+ pit->psrr = 0x18; /* PIACK and PIRQ functions enabled */
pit->pacr = 0x00; /* Sub Mode 00, H2 i/p, no DMA */
pit->padr = 0x00; /* Just to be tidy! */
pit->paddr = 0x00; /* All inputs for now (safest) */
Index: 2.6-mm/arch/s390/crypto/crypt_s390_query.c
===================================================================
--- 2.6-mm.orig/arch/s390/crypto/crypt_s390_query.c
+++ 2.6-mm/arch/s390/crypto/crypt_s390_query.c
@@ -55,7 +55,7 @@ static void query_available_functions(vo
printk(KERN_INFO "KMC_AES_256: %d\n",
crypt_s390_func_available(KMC_AES_256_ENCRYPT));
- /* query available KIMD fucntions */
+ /* query available KIMD functions */
printk(KERN_INFO "KIMD_QUERY: %d\n",
crypt_s390_func_available(KIMD_QUERY));
printk(KERN_INFO "KIMD_SHA_1: %d\n",
Index: 2.6-mm/drivers/acpi/processor_core.c
===================================================================
--- 2.6-mm.orig/drivers/acpi/processor_core.c
+++ 2.6-mm/drivers/acpi/processor_core.c
@@ -246,7 +246,7 @@ static int acpi_processor_errata(struct
}
/* --------------------------------------------------------------------------
- Common ACPI processor fucntions
+ Common ACPI processor functions
-------------------------------------------------------------------------- */
/*
Index: 2.6-mm/drivers/net/sis900.c
===================================================================
--- 2.6-mm.orig/drivers/net/sis900.c
+++ 2.6-mm/drivers/net/sis900.c
@@ -1692,7 +1692,7 @@ static irqreturn_t sis900_interrupt(int
*
* Process receive interrupt events,
* put buffer to higher layer and refill buffer pool
- * Note: This fucntion is called by interrupt handler,
+ * Note: This function is called by interrupt handler,
* don't do "too much" work here
*/
@@ -1839,7 +1839,7 @@ static int sis900_rx(struct net_device *
*
* Check for error condition and free socket buffer etc
* schedule for more transmission as needed
- * Note: This fucntion is called by interrupt handler,
+ * Note: This function is called by interrupt handler,
* don't do "too much" work here
*/
Index: 2.6-mm/include/linux/gameport.h
===================================================================
--- 2.6-mm.orig/include/linux/gameport.h
+++ 2.6-mm/include/linux/gameport.h
@@ -120,7 +120,7 @@ static inline void gameport_set_name(str
}
/*
- * Use the following fucntions to manipulate gameport's per-port
+ * Use the following functions to manipulate gameport's per-port
* driver-specific data.
*/
static inline void *gameport_get_drvdata(struct gameport *gameport)
@@ -134,7 +134,7 @@ static inline void gameport_set_drvdata(
}
/*
- * Use the following fucntions to pin gameport's driver in process context
+ * Use the following functions to pin gameport's driver in process context
*/
static inline int gameport_pin_driver(struct gameport *gameport)
{
Index: 2.6-mm/include/linux/serio.h
===================================================================
--- 2.6-mm.orig/include/linux/serio.h
+++ 2.6-mm/include/linux/serio.h
@@ -120,7 +120,7 @@ static inline void serio_cleanup(struct
}
/*
- * Use the following fucntions to manipulate serio's per-port
+ * Use the following functions to manipulate serio's per-port
* driver-specific data.
*/
static inline void *serio_get_drvdata(struct serio *serio)
@@ -134,7 +134,7 @@ static inline void serio_set_drvdata(str
}
/*
- * Use the following fucntions to protect critical sections in
+ * Use the following functions to protect critical sections in
* driver code from port's interrupt handler
*/
static inline void serio_pause_rx(struct serio *serio)
@@ -148,7 +148,7 @@ static inline void serio_continue_rx(str
}
/*
- * Use the following fucntions to pin serio's driver in process context
+ * Use the following functions to pin serio's driver in process context
*/
static inline int serio_pin_driver(struct serio *serio)
{
--
^ permalink raw reply [flat|nested] 11+ messages in thread* [-mm patch 3/8] frv: remove unnesesary "&"
2006-02-21 3:46 [-mm patch 0/8] fix build errors by bitops code consolidation Akinobu Mita
2006-02-21 3:46 ` [-mm patch 1/8] s/fucn/func/ typo fix Akinobu Mita
2006-02-21 3:46 ` [-mm patch 2/8] more s/fucn/func/ typo fixes Akinobu Mita
@ 2006-02-21 3:46 ` Akinobu Mita
2006-02-21 10:51 ` David Howells
2006-02-21 3:46 ` [-mm patch 4/8] fix error: __u32 undeclared Akinobu Mita
` (4 subsequent siblings)
7 siblings, 1 reply; 11+ messages in thread
From: Akinobu Mita @ 2006-02-21 3:46 UTC (permalink / raw)
To: akpm; +Cc: linux-kernel, Akinobu Mita, David Howells
[-- Attachment #1: frv-cleanup.patch --]
[-- Type: text/plain, Size: 1194 bytes --]
Fix warning messages triggered by bitops code consolidation patches.
cxn_bitmap is the array of unsigned long.
'&' is unnesesary for the argument of *_bit() routins.
Signed-off-by: Akinobu Mita <mita@miraclelinux.com>
Cc: David Howells <dhowells@redhat.com>
arch/frv/mm/mmu-context.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
Index: 2.6-mm/arch/frv/mm/mmu-context.c
===================================================================
--- 2.6-mm.orig/arch/frv/mm/mmu-context.c
+++ 2.6-mm/arch/frv/mm/mmu-context.c
@@ -54,9 +54,9 @@ static unsigned get_cxn(mm_context_t *ct
/* find the first unallocated context number
* - 0 is reserved for the kernel
*/
- cxn = find_next_zero_bit(&cxn_bitmap, NR_CXN, 1);
+ cxn = find_next_zero_bit(cxn_bitmap, NR_CXN, 1);
if (cxn < NR_CXN) {
- set_bit(cxn, &cxn_bitmap);
+ set_bit(cxn, cxn_bitmap);
}
else {
/* none remaining - need to steal someone else's cxn */
@@ -138,7 +138,7 @@ void destroy_context(struct mm_struct *m
cxn_pinned = -1;
list_del_init(&ctx->id_link);
- clear_bit(ctx->id, &cxn_bitmap);
+ clear_bit(ctx->id, cxn_bitmap);
__flush_tlb_mm(ctx->id);
ctx->id = 0;
}
--
^ permalink raw reply [flat|nested] 11+ messages in thread* [-mm patch 4/8] fix error: __u32 undeclared
2006-02-21 3:46 [-mm patch 0/8] fix build errors by bitops code consolidation Akinobu Mita
` (2 preceding siblings ...)
2006-02-21 3:46 ` [-mm patch 3/8] frv: remove unnesesary "&" Akinobu Mita
@ 2006-02-21 3:46 ` Akinobu Mita
2006-02-21 3:46 ` [-mm patch 5/8] um: fix undefined reference to hweight32 Akinobu Mita
` (3 subsequent siblings)
7 siblings, 0 replies; 11+ messages in thread
From: Akinobu Mita @ 2006-02-21 3:46 UTC (permalink / raw)
To: akpm; +Cc: linux-kernel, Akinobu Mita
[-- Attachment #1: include-linux-types.patch --]
[-- Type: text/plain, Size: 1112 bytes --]
Build fix for s390
declare __u32 and __u64.
Signed-off-by: Akinobu Mita <mita@miraclelinux.com>
include/asm-generic/bitops/fls64.h | 2 ++
include/asm-generic/bitops/hweight.h | 2 ++
2 files changed, 4 insertions(+)
Index: 2.6-mm/include/asm-generic/bitops/fls64.h
===================================================================
--- 2.6-mm.orig/include/asm-generic/bitops/fls64.h
+++ 2.6-mm/include/asm-generic/bitops/fls64.h
@@ -1,6 +1,8 @@
#ifndef _ASM_GENERIC_BITOPS_FLS64_H_
#define _ASM_GENERIC_BITOPS_FLS64_H_
+#include <asm/types.h>
+
static inline int fls64(__u64 x)
{
__u32 h = x >> 32;
Index: 2.6-mm/include/asm-generic/bitops/hweight.h
===================================================================
--- 2.6-mm.orig/include/asm-generic/bitops/hweight.h
+++ 2.6-mm/include/asm-generic/bitops/hweight.h
@@ -1,6 +1,8 @@
#ifndef _ASM_GENERIC_BITOPS_HWEIGHT_H_
#define _ASM_GENERIC_BITOPS_HWEIGHT_H_
+#include <asm/types.h>
+
extern unsigned int hweight32(unsigned int w);
extern unsigned int hweight16(unsigned int w);
extern unsigned int hweight8(unsigned int w);
--
^ permalink raw reply [flat|nested] 11+ messages in thread* [-mm patch 5/8] um: fix undefined reference to hweight32
2006-02-21 3:46 [-mm patch 0/8] fix build errors by bitops code consolidation Akinobu Mita
` (3 preceding siblings ...)
2006-02-21 3:46 ` [-mm patch 4/8] fix error: __u32 undeclared Akinobu Mita
@ 2006-02-21 3:46 ` Akinobu Mita
2006-02-21 21:28 ` Jeff Dike
2006-02-21 3:46 ` [-mm patch 6/8] arm: fix undefined reference to generic_fls Akinobu Mita
` (2 subsequent siblings)
7 siblings, 1 reply; 11+ messages in thread
From: Akinobu Mita @ 2006-02-21 3:46 UTC (permalink / raw)
To: akpm; +Cc: linux-kernel, Akinobu Mita, Jeff Dike
[-- Attachment #1: uml-fix.patch --]
[-- Type: text/plain, Size: 871 bytes --]
Build fix for user mode linux.
Signed-off-by: Akinobu Mita <mita@miraclelinux.com>
Cc: Jeff Dike <jdike@karaya.com>
arch/um/Kconfig.i386 | 5 +++++
arch/um/Kconfig.x86_64 | 5 +++++
2 files changed, 10 insertions(+)
Index: 2.6-mm/arch/um/Kconfig.i386
===================================================================
--- 2.6-mm.orig/arch/um/Kconfig.i386
+++ 2.6-mm/arch/um/Kconfig.i386
@@ -52,3 +52,8 @@ config ARCH_HAS_SC_SIGNALS
config ARCH_REUSE_HOST_VSYSCALL_AREA
bool
default y
+
+config GENERIC_HWEIGHT
+ bool
+ default y
+
Index: 2.6-mm/arch/um/Kconfig.x86_64
===================================================================
--- 2.6-mm.orig/arch/um/Kconfig.x86_64
+++ 2.6-mm/arch/um/Kconfig.x86_64
@@ -46,3 +46,8 @@ config ARCH_REUSE_HOST_VSYSCALL_AREA
config SMP_BROKEN
bool
default y
+
+config GENERIC_HWEIGHT
+ bool
+ default y
+
--
^ permalink raw reply [flat|nested] 11+ messages in thread* [-mm patch 6/8] arm: fix undefined reference to generic_fls
2006-02-21 3:46 [-mm patch 0/8] fix build errors by bitops code consolidation Akinobu Mita
` (4 preceding siblings ...)
2006-02-21 3:46 ` [-mm patch 5/8] um: fix undefined reference to hweight32 Akinobu Mita
@ 2006-02-21 3:46 ` Akinobu Mita
2006-02-21 3:46 ` [-mm patch 7/8] m68k: fix undefined reference to generic_find_next_zero_le_bit Akinobu Mita
2006-02-21 3:46 ` [-mm patch 8/8] ppc: fix undefined reference to hweight32 Akinobu Mita
7 siblings, 0 replies; 11+ messages in thread
From: Akinobu Mita @ 2006-02-21 3:46 UTC (permalink / raw)
To: akpm; +Cc: linux-kernel, Akinobu Mita, Russell King
[-- Attachment #1: arm-fix.patch --]
[-- Type: text/plain, Size: 1337 bytes --]
This patch defines constant_fls() instead of removed generic_fls().
Signed-off-by: Akinobu Mita <mita@miraclelinux.com>
Cc: Russell King <rmk@arm.linux.org.uk>
include/asm-arm/bitops.h | 31 ++++++++++++++++++++++++++++++-
1 files changed, 30 insertions(+), 1 deletion(-)
Index: 2.6-mm/include/asm-arm/bitops.h
===================================================================
--- 2.6-mm.orig/include/asm-arm/bitops.h
+++ 2.6-mm/include/asm-arm/bitops.h
@@ -239,13 +239,42 @@ extern int _find_next_bit_be(const unsig
#else
+static inline int constant_fls(int x)
+{
+ int r = 32;
+
+ if (!x)
+ return 0;
+ if (!(x & 0xffff0000u)) {
+ x <<= 16;
+ r -= 16;
+ }
+ if (!(x & 0xff000000u)) {
+ x <<= 8;
+ r -= 8;
+ }
+ if (!(x & 0xf0000000u)) {
+ x <<= 4;
+ r -= 4;
+ }
+ if (!(x & 0xc0000000u)) {
+ x <<= 2;
+ r -= 2;
+ }
+ if (!(x & 0x80000000u)) {
+ x <<= 1;
+ r -= 1;
+ }
+ return r;
+}
+
/*
* On ARMv5 and above those functions can be implemented around
* the clz instruction for much better code efficiency.
*/
#define fls(x) \
- ( __builtin_constant_p(x) ? generic_fls(x) : \
+ ( __builtin_constant_p(x) ? constant_fls(x) : \
({ int __r; asm("clz\t%0, %1" : "=r"(__r) : "r"(x) : "cc"); 32-__r; }) )
#define ffs(x) ({ unsigned long __t = (x); fls(__t & -__t); })
#define __ffs(x) (ffs(x) - 1)
--
^ permalink raw reply [flat|nested] 11+ messages in thread* [-mm patch 7/8] m68k: fix undefined reference to generic_find_next_zero_le_bit
2006-02-21 3:46 [-mm patch 0/8] fix build errors by bitops code consolidation Akinobu Mita
` (5 preceding siblings ...)
2006-02-21 3:46 ` [-mm patch 6/8] arm: fix undefined reference to generic_fls Akinobu Mita
@ 2006-02-21 3:46 ` Akinobu Mita
2006-02-21 3:46 ` [-mm patch 8/8] ppc: fix undefined reference to hweight32 Akinobu Mita
7 siblings, 0 replies; 11+ messages in thread
From: Akinobu Mita @ 2006-02-21 3:46 UTC (permalink / raw)
To: akpm; +Cc: linux-kernel, Akinobu Mita, Geert Uytterhoeven, Roman Zippel
[-- Attachment #1: m68k-fix.patch --]
[-- Type: text/plain, Size: 2270 bytes --]
This patch reverts ext2 bitmap functions.
Signed-off-by: Akinobu Mita <mita@miraclelinux.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
include/asm-m68k/bitops.h | 54 ++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 52 insertions(+), 2 deletions(-)
Index: 2.6-mm/include/asm-m68k/bitops.h
===================================================================
--- 2.6-mm.orig/include/asm-m68k/bitops.h
+++ 2.6-mm/include/asm-m68k/bitops.h
@@ -351,11 +351,61 @@ static inline int minix_test_bit(int nr,
/* Bitmap functions for the ext2 filesystem. */
-#include <asm-generic/bitops/ext2-non-atomic.h>
-
+#define ext2_set_bit(nr, addr) __test_and_set_bit((nr) ^ 24, (unsigned long *)(addr))
#define ext2_set_bit_atomic(lock, nr, addr) test_and_set_bit((nr) ^ 24, (unsigned long *)(addr))
+#define ext2_clear_bit(nr, addr) __test_and_clear_bit((nr) ^ 24, (unsigned long *)(addr))
#define ext2_clear_bit_atomic(lock, nr, addr) test_and_clear_bit((nr) ^ 24, (unsigned long *)(addr))
+static inline int ext2_test_bit(int nr, const void *vaddr)
+{
+ const unsigned char *p = vaddr;
+ return (p[nr >> 3] & (1U << (nr & 7))) != 0;
+}
+
+static inline int ext2_find_first_zero_bit(const void *vaddr, unsigned size)
+{
+ const unsigned long *p = vaddr, *addr = vaddr;
+ int res;
+
+ if (!size)
+ return 0;
+
+ size = (size >> 5) + ((size & 31) > 0);
+ while (*p++ == ~0UL)
+ {
+ if (--size == 0)
+ return (p - addr) << 5;
+ }
+
+ --p;
+ for (res = 0; res < 32; res++)
+ if (!ext2_test_bit (res, p))
+ break;
+ return (p - addr) * 32 + res;
+}
+
+static inline int ext2_find_next_zero_bit(const void *vaddr, unsigned size,
+ unsigned offset)
+{
+ const unsigned long *addr = vaddr;
+ const unsigned long *p = addr + (offset >> 5);
+ int bit = offset & 31UL, res;
+
+ if (offset >= size)
+ return size;
+
+ if (bit) {
+ /* Look for zero in first longword */
+ for (res = bit; res < 32; res++)
+ if (!ext2_test_bit (res, p))
+ return (p - addr) * 32 + res;
+ p++;
+ }
+ /* No zero yet, search remaining full bytes for a zero */
+ res = ext2_find_first_zero_bit (p, size - 32 * (p - addr));
+ return (p - addr) * 32 + res;
+}
+
#endif /* __KERNEL__ */
#endif /* _M68K_BITOPS_H */
--
^ permalink raw reply [flat|nested] 11+ messages in thread* [-mm patch 8/8] ppc: fix undefined reference to hweight32
2006-02-21 3:46 [-mm patch 0/8] fix build errors by bitops code consolidation Akinobu Mita
` (6 preceding siblings ...)
2006-02-21 3:46 ` [-mm patch 7/8] m68k: fix undefined reference to generic_find_next_zero_le_bit Akinobu Mita
@ 2006-02-21 3:46 ` Akinobu Mita
7 siblings, 0 replies; 11+ messages in thread
From: Akinobu Mita @ 2006-02-21 3:46 UTC (permalink / raw)
To: akpm; +Cc: linux-kernel, Akinobu Mita, Paul Mackerras
[-- Attachment #1: ppc-fix.patch --]
[-- Type: text/plain, Size: 506 bytes --]
Build fix for ppc
Signed-off-by: Akinobu Mita <mita@miraclelinux.com>
Cc: Paul Mackerras <paulus@samba.org>
arch/ppc/Kconfig | 4 ++++
1 files changed, 4 insertions(+)
Index: 2.6-mm/arch/ppc/Kconfig
===================================================================
--- 2.6-mm.orig/arch/ppc/Kconfig
+++ 2.6-mm/arch/ppc/Kconfig
@@ -19,6 +19,10 @@ config RWSEM_XCHGADD_ALGORITHM
bool
default y
+config GENERIC_HWEIGHT
+ bool
+ default y
+
config GENERIC_CALIBRATE_DELAY
bool
default y
--
^ permalink raw reply [flat|nested] 11+ messages in thread