Commit graph

102366 commits

Author SHA1 Message Date
Sam Ravnborg f92ffa12f4 sparc: Merge asm-sparc{,64}/mman.h
Renaming the function sparc64_mmap_check() to
sparc_mmap_check() was enough to make the two
header files identical.

:$ diff -u include/asm-sparc/mman.h include/asm-sparc64/mman.h
:-- include/asm-sparc/mman.h	2008-06-13 06:46:39.000000000 +0200
:++ include/asm-sparc64/mman.h	2008-06-13 06:46:39.000000000 +0200
:@@ -1,5 +1,5 @@
:-#ifndef __SPARC_MMAN_H__
:-#define __SPARC_MMAN_H__
:+#ifndef __SPARC64_MMAN_H__
:+#define __SPARC64_MMAN_H__
:
: #include <asm-generic/mman.h>
:
:@@ -23,9 +23,9 @@
:
: #ifdef __KERNEL__
: #ifndef __ASSEMBLY__
:-#define arch_mmap_check(addr,len,flags)	sparc_mmap_check(addr,len)
:-int sparc_mmap_check(unsigned long addr, unsigned long len);
:+#define arch_mmap_check(addr,len,flags)	sparc64_mmap_check(addr,len)
:+int sparc64_mmap_check(unsigned long addr, unsigned long len);
: #endif
: #endif
:
:-#endif /* __SPARC_MMAN_H__ */
:+#endif /* __SPARC64_MMAN_H__ */

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-07-17 21:41:51 -07:00
Sam Ravnborg 2d1419624c sparc: Merge asm-sparc{,64}/shmbuf.h
Padding in the shmbuf structure made conditional
as only 32 bit sparc did so.

:$ diff -u include/asm-sparc/shmbuf.h include/asm-sparc64/shmbuf.h
:-- include/asm-sparc/shmbuf.h	2008-06-13 06:42:07.000000000 +0200
:++ include/asm-sparc64/shmbuf.h	2008-06-13 06:42:07.000000000 +0200
:@@ -1,23 +1,19 @@
:-#ifndef _SPARC_SHMBUF_H
:-#define _SPARC_SHMBUF_H
:+#ifndef _SPARC64_SHMBUF_H
:+#define _SPARC64_SHMBUF_H
:
: /*
:- * The shmid64_ds structure for sparc architecture.
:+ * The shmid64_ds structure for sparc64 architecture.
:  * Note extra padding because this structure is passed back and forth
:  * between kernel and user space.
:  *
:  * Pad space is left for:
:- * - 64-bit time_t to solve y2038 problem
:- * - 2 miscellaneous 32-bit values
:+ * - 2 miscellaneous 64-bit values
:  */
:
: struct shmid64_ds {
: 	struct ipc64_perm	shm_perm;	/* operation perms */
:-	unsigned int		__pad1;
: 	__kernel_time_t		shm_atime;	/* last attach time */
:-	unsigned int		__pad2;
: 	__kernel_time_t		shm_dtime;	/* last detach time */
:-	unsigned int		__pad3;
: 	__kernel_time_t		shm_ctime;	/* last change time */
: 	size_t			shm_segsz;	/* size of segment (bytes) */
: 	__kernel_pid_t		shm_cpid;	/* pid of creator */
:@@ -39,4 +35,4 @@
: 	unsigned long	__unused4;
: };
:
:-#endif /* _SPARC_SHMBUF_H */
:+#endif /* _SPARC64_SHMBUF_H */

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-07-17 21:41:48 -07:00
Sam Ravnborg fcb07081f2 sparc: Merge asm-sparc{,64}/sembuf.h
Padding in the sembuf structure made conditional
as only 32 bit sparc did so.

:$ diff -u include/asm-sparc/sembuf.h include/asm-sparc64/sembuf.h
:-- include/asm-sparc/sembuf.h	2008-06-13 06:42:07.000000000 +0200
:++ include/asm-sparc64/sembuf.h	2008-06-13 06:42:07.000000000 +0200
:@@ -1,21 +1,18 @@
:-#ifndef _SPARC_SEMBUF_H
:-#define _SPARC_SEMBUF_H
:+#ifndef _SPARC64_SEMBUF_H
:+#define _SPARC64_SEMBUF_H
:
: /*
:- * The semid64_ds structure for sparc architecture.
:+ * The semid64_ds structure for sparc64 architecture.
:  * Note extra padding because this structure is passed back and forth
:  * between kernel and user space.
:  *
:  * Pad space is left for:
:- * - 64-bit time_t to solve y2038 problem
:- * - 2 miscellaneous 32-bit values
:+ * - 2 miscellaneous 64-bit values
:  */
:
: struct semid64_ds {
: 	struct ipc64_perm sem_perm;		/* permissions .. see ipc.h */
:-	unsigned int	__pad1;
: 	__kernel_time_t	sem_otime;		/* last semop time */
:-	unsigned int	__pad2;
: 	__kernel_time_t	sem_ctime;		/* last change time */
: 	unsigned long	sem_nsems;		/* no. of semaphores in array */
: 	unsigned long	__unused1;

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-07-17 21:41:44 -07:00
Sam Ravnborg 100b10d752 sparc: Merge asm-sparc{,64}/msgbuf.h
Padding from 32 bit sparc kept using preprocessor magic

:$ diff -u include/asm-sparc/msgbuf.h include/asm-sparc64/msgbuf.h
:-- include/asm-sparc/msgbuf.h	2008-06-13 06:42:07.000000000 +0200
:++ include/asm-sparc64/msgbuf.h	2008-06-13 06:42:07.000000000 +0200
:@@ -7,17 +7,13 @@
:  * between kernel and user space.
:  *
:  * Pad space is left for:
:- * - 64-bit time_t to solve y2038 problem
:- * - 2 miscellaneous 32-bit values
:+ * - 2 miscellaneous 64-bit values
:  */
:
: struct msqid64_ds {
: 	struct ipc64_perm msg_perm;
:-	unsigned int   __pad1;
: 	__kernel_time_t msg_stime;	/* last msgsnd time */
:-	unsigned int   __pad2;
: 	__kernel_time_t msg_rtime;	/* last msgrcv time */
:-	unsigned int   __pad3;
: 	__kernel_time_t msg_ctime;	/* last change time */
: 	unsigned long  msg_cbytes;	/* current number of bytes on queue */

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-07-17 21:41:42 -07:00
Sam Ravnborg 6d1f4b88ee sparc: Merge asm-sparc{,64}/fcntl.h
The definition of O_NDELAY differed - the rest was equal

:$ diff -u include/asm-sparc/fcntl.h include/asm-sparc64/fcntl.h
:-- include/asm-sparc/fcntl.h	2008-06-13 06:46:39.000000000 +0200
:++ include/asm-sparc64/fcntl.h	2008-06-13 06:46:39.000000000 +0200
:@@ -1,8 +1,9 @@
:-#ifndef _SPARC_FCNTL_H
:-#define _SPARC_FCNTL_H
:+#ifndef _SPARC64_FCNTL_H
:+#define _SPARC64_FCNTL_H
:
: /* open/fcntl - O_SYNC is only implemented on blocks devices and on files
:    located on an ext2 file system */
:+#define O_NDELAY	0x0004
: #define O_APPEND	0x0008
: #define FASYNC		0x0040	/* fcntl, for BSD compatibility */
: #define O_CREAT		0x0200	/* not fcntl */
:@@ -10,7 +11,6 @@
: #define O_EXCL		0x0800	/* not fcntl */
: #define O_SYNC		0x2000
: #define O_NONBLOCK	0x4000
:-#define O_NDELAY	(0x0004 | O_NONBLOCK)
: #define O_NOCTTY	0x8000	/* not fcntl */
: #define O_LARGEFILE	0x40000
: #define O_DIRECT        0x100000 /* direct disk access hint */
:@@ -29,8 +29,7 @@
: #define F_UNLCK		3
:
: #define __ARCH_FLOCK_PAD	short __unused;
:-#define __ARCH_FLOCK64_PAD	short __unused;
:
: #include <asm-generic/fcntl.h>
:
:-#endif
:+#endif /* !(_SPARC64_FCNTL_H) */

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-07-17 21:41:39 -07:00
Sam Ravnborg e880e8701c sparc: Merge asm-sparc{,64}/sockios.h
:$ diff -u include/asm-sparc/sockios.h include/asm-sparc64/sockios.h
:-- include/asm-sparc/sockios.h	2008-06-13 06:42:07.000000000 +0200
:++ include/asm-sparc64/sockios.h	2008-06-13 06:42:07.000000000 +0200
:@@ -1,5 +1,5 @@
:-#ifndef _ASM_SPARC_SOCKIOS_H
:-#define _ASM_SPARC_SOCKIOS_H
:+#ifndef _ASM_SPARC64_SOCKIOS_H
:+#define _ASM_SPARC64_SOCKIOS_H
:
: /* Socket-level I/O control calls. */
: #define FIOSETOWN 	0x8901
:@@ -10,5 +10,5 @@
: #define SIOCGSTAMP	0x8906		/* Get stamp (timeval) */
: #define SIOCGSTAMPNS	0x8907		/* Get stamp (timespec) */
:
:-#endif /* !(_ASM_SPARC_SOCKIOS_H) */
:+#endif /* !(_ASM_SPARC64_SOCKIOS_H) */

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-07-17 21:41:35 -07:00
Sam Ravnborg c8b8be5427 sparc: Merge asm-sparc{,64}/socket.h
:$ diff -u include/asm-sparc/socket.h include/asm-sparc64/socket.h
:-- include/asm-sparc/socket.h	2008-06-13 06:46:39.000000000 +0200
:++ include/asm-sparc64/socket.h	2008-06-13 06:46:39.000000000 +0200
:@@ -48,11 +48,10 @@
: #define SO_TIMESTAMPNS		0x0021
: #define SCM_TIMESTAMPNS		SO_TIMESTAMPNS
:
:-#define SO_MARK			0x0022
:-
: /* Security levels - as per NRL IPv6 - don't actually do anything */
: #define SO_SECURITY_AUTHENTICATION		0x5001
: #define SO_SECURITY_ENCRYPTION_TRANSPORT	0x5002
: #define SO_SECURITY_ENCRYPTION_NETWORK		0x5004
:
:+#define SO_MARK			0x0022
: #endif /* _ASM_SOCKET_H */

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-07-17 21:41:27 -07:00
Sam Ravnborg 62e612f0ab sparc: Merge asm-sparc{,64}/poll.h
:$ diff -u include/asm-sparc/poll.h include/asm-sparc64/poll.h
:-- include/asm-sparc/poll.h	2008-06-13 06:42:07.000000000 +0200
:++ include/asm-sparc64/poll.h	2008-06-13 06:42:07.000000000 +0200
:@@ -1,5 +1,5 @@
:-#ifndef __SPARC_POLL_H
:-#define __SPARC_POLL_H
:+#ifndef __SPARC64_POLL_H
:+#define __SPARC64_POLL_H
:
: #define POLLWRNORM	POLLOUT
: #define POLLWRBAND	256

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-07-17 21:41:24 -07:00
Sam Ravnborg 4835bd988e sparc: Merge asm-sparc{,64}/param.h
:$ diff -u include/asm-sparc/param.h include/asm-sparc64/param.h
:-- include/asm-sparc/param.h	2008-06-13 06:46:39.000000000 +0200
:++ include/asm-sparc64/param.h	2008-06-13 06:42:07.000000000 +0200
:@@ -1,5 +1,6 @@
:-#ifndef _ASMSPARC_PARAM_H
:-#define _ASMSPARC_PARAM_H
:+#ifndef _ASMSPARC64_PARAM_H
:+#define _ASMSPARC64_PARAM_H
:+
:
: #ifdef __KERNEL__
: # define HZ		CONFIG_HZ	/* Internal kernel timer frequency */
:@@ -19,4 +20,4 @@
:
: #define MAXHOSTNAMELEN	64	/* max length of hostname */
:
:-#endif
:+#endif /* _ASMSPARC64_PARAM_H */

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-07-17 21:41:20 -07:00
Sam Ravnborg f1ba03cac2 sparc: Merge asm-sparc{,64}/ioctls.h
Trivial differenses in comments - used the version from sparc64

:$ diff -u include/asm-sparc/ioctls.h include/asm-sparc64/ioctls.h
:-- include/asm-sparc/ioctls.h	2008-06-13 08:46:29.000000000 +0200
:++ include/asm-sparc64/ioctls.h	2008-06-13 08:46:29.000000000 +0200
:@@ -1,5 +1,5 @@
:-#ifndef _ASM_SPARC_IOCTLS_H
:-#define _ASM_SPARC_IOCTLS_H
:+#ifndef _ASM_SPARC64_IOCTLS_H
:+#define _ASM_SPARC64_IOCTLS_H
:
: #include <asm/ioctl.h>
:
:@@ -22,7 +22,7 @@
:
: /* Note that all the ioctls that are not available in Linux have a
:  * double underscore on the front to: a) avoid some programs to
:- * thing we support some ioctls under Linux (autoconfiguration stuff)
:+ * think we support some ioctls under Linux (autoconfiguration stuff)
:  */
: /* Little t */
: #define TIOCGETD	_IOR('t', 0, int)
:@@ -110,7 +110,7 @@
: #define TIOCSERGETLSR   0x5459 /* Get line status register */
: #define TIOCSERGETMULTI 0x545A /* Get multiport config  */
: #define TIOCSERSETMULTI 0x545B /* Set multiport config */
:-#define TIOCMIWAIT	0x545C /* Wait input */
:+#define TIOCMIWAIT	0x545C /* Wait for change on serial input line(s) */
: #define TIOCGICOUNT	0x545D /* Read serial port inline interrupt counts */
:
: /* Kernel definitions */
:@@ -133,4 +133,4 @@
: #define TIOCPKT_NOSTOP		16
: #define TIOCPKT_DOSTOP		32
:
:-#endif /* !(_ASM_SPARC_IOCTLS_H) */
:+#endif /* !(_ASM_SPARC64_IOCTLS_H) */

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-07-17 21:41:16 -07:00
Sam Ravnborg 278864fac7 sparc: Merge asm-sparc{,64}/ioctl.h
:$ diff -u include/asm-sparc/ioctl.h include/asm-sparc64/ioctl.h
:-- include/asm-sparc/ioctl.h	2008-06-13 06:46:39.000000000 +0200
:++ include/asm-sparc64/ioctl.h	2008-06-13 08:46:29.000000000 +0200
:@@ -1,5 +1,5 @@
:-#ifndef _SPARC_IOCTL_H
:-#define _SPARC_IOCTL_H
:+#ifndef _SPARC64_IOCTL_H
:+#define _SPARC64_IOCTL_H
:
:/*
:* Our DIR and SIZE overlap in order to simulteneously provide
:@@ -64,4 +64,4 @@
:#define IOCSIZE_MASK    (_IOC_XSIZEMASK << _IOC_SIZESHIFT)
:#define IOCSIZE_SHIFT   (_IOC_SIZESHIFT)
:
:-#endif /* !(_SPARC_IOCTL_H) */
:+#endif /* !(_SPARC64_IOCTL_H) */

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-07-17 21:41:06 -07:00
Sam Ravnborg 09d3e1baa1 sparc: copy exported sparc64 specific header files to asm-sparc
Copy was done using the following simple script:

set -e
SPARC64="h display7seg.h envctrl.h psrcompat.h pstate.h uctx.h utrap.h watchdog.h"
for FILE in ${SPARC64}; do
	if [ -f asm-sparc/$FILE ]; then
		echo $FILE exist in asm-sparc
	fi
	cat asm-sparc64/$FILE > asm-sparc/$FILE
	printf "#include <asm-sparc/$FILE>\n" > asm-sparc64/$FILE
done

The name of the copied files are added to asm-sparc/Kbuild
to keep "make headers_check" functional.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-07-17 21:40:49 -07:00
Sam Ravnborg 9ae95bce73 sparc: add -m64 when building vmlinux.lds
David Miller noticed that the build of vmlinux.lds
failed to use the -m64 specifier.
This caused the build to break with a bi-arch gcc with
unified headers.

Add the -m64 option to CPPFLAGS_vmlinux.lds so we
have the correct defines available when building
vmliux.lds.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-07-17 21:39:11 -07:00
David S. Miller 597631f2ea sparc64 Kbuild: apb.h and bbc.h should not be exported to userspace
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-17 21:38:47 -07:00
Sam Ravnborg 3f261e829f sparc: Merge include/asm-sparc{,64}/perfctr.h
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-17 21:38:42 -07:00
Sam Ravnborg fc491d7da8 sparc: Merge include/asm-sparc{,64}/openpromio.h
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-17 21:38:36 -07:00
Adrian Bunk d6eaadfbbd sparc: remove PROM_AP1000
This seems to be left from the long gone AP1000 support.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-17 21:38:24 -07:00
Adrian Bunk 960681450f drivers/sbus/: cleanups
This patch contains the following cleanups:
- make the following needlessly global code static:
  - char/uctrl.c: uctrl_get_event_status()
  - char/uctrl.c: uctrl_get_external_status()
  - char/vfc_dev.c: struct vfc_dev_lst
  - char/vfc_dev.c: vfc_lock_device()
  - char/vfc_dev.c: vfc_unlock_device()
  - char/vfc_dev.c: vfc_captstat_reset()
  - char/vfc_dev.c: vfc_memptr_reset()
  - char/vfc_dev.c: vfc_csr_init()
  - char/vfc_dev.c: vfc_saa9051_init()
  - char/vfc_dev.c: init_vfc_hw()
  - char/vfc_dev.c: init_vfc_devstruct()
  - char/vfc_dev.c: init_vfc_device()
  - char/vfc_dev.c: vfc_get_dev_ptr()
  - char/vfc_dev.c: vfc_capture_start()
  - char/vfc_dev.c: vfc_capture_poll()
  - char/vfc_dev.c: vfc_port_change_ioctl()
  - char/vfc_dev.c: vfc_set_video_ioctl()
  - char/vfc_dev.c: vfc_get_video_ioctl()
  - char/vfc_i2c.c: vfc_i2c_wait_for_bus()
  - char/vfc_i2c.c: vfc_i2c_wait_for_pin()
  - char/vfc_i2c.c: vfc_i2c_xmit_addr()
  - char/vfc_i2c.c: vfc_i2c_xmit_byte()
  - char/vfc_i2c.c: vfc_i2c_recv_byte()
  - dvma.c: init_one_dvma()
- remove an unused variable from a function:
  - char/uctrl.c: ts102_uctrl_init()
- remove the following unused and empty function:
  - char/uctrl.c: uctrl_set_video()

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-17 21:38:17 -07:00
Adrian Bunk 908f5162ca sparc64/kernel/: make code static
This patch makes the following needlessly global code static:
- central.c: struct central_bus
- central.c: struct fhc_list
- central.c: apply_fhc_ranges()
- central.c: apply_central_ranges()
- ds.c: struct ds_states_template[]
- pci_msi.c: sparc64_setup_msi_irq()
- pci_msi.c: sparc64_teardown_msi_irq()
- pci_sun4v.c: struct sun4v_dma_ops
- sys_sparc32.c: cp_compat_stat64()

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-17 21:38:08 -07:00
Adrian Bunk 50215d6511 sparc/mm/: possible cleanups
This patch contains the following possible cleanups:
- make the following needlessly global code static:
  - fault.c: force_user_fault()
  - init.c: calc_max_low_pfn()
  - init.c: pgt_cache_water[]
  - init.c: map_high_region()
  - srmmu.c: hwbug_bitmask
  - srmmu.c: srmmu_swapper_pg_dir
  - srmmu.c: srmmu_context_table
  - srmmu.c: is_hypersparc
  - srmmu.c: srmmu_cache_pagetables
  - srmmu.c: srmmu_nocache_size
  - srmmu.c: srmmu_nocache_end
  - srmmu.c: srmmu_get_nocache()
  - srmmu.c: srmmu_free_nocache()
  - srmmu.c: srmmu_early_allocate_ptable_skeleton()
  - srmmu.c: srmmu_nocache_calcsize()
  - srmmu.c: srmmu_nocache_init()
  - srmmu.c: srmmu_alloc_thread_info()
  - srmmu.c: early_pgtable_allocfail()
  - srmmu.c: srmmu_early_allocate_ptable_skeleton()
  - srmmu.c: srmmu_allocate_ptable_skeleton()
  - srmmu.c: srmmu_inherit_prom_mappings()
  - sunami.S: tsunami_copy_1page
- remove the following unused code:
  - init.c: struct sparc_aliases

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-17 21:38:01 -07:00
Adrian Bunk c61c65cdcd sparc/kernel/: possible cleanups
This patch contains the following possible cleanups:
- make the following needlessly global code static:
  - apc.c: apc_swift_idle()
  - ebus.c: ebus_blacklist_irq()
  - ebus.c: fill_ebus_child()
  - ebus.c: fill_ebus_device()
  - entry.S: syscall_is_too_hard
  - etra: tsetup_sun4c_stackchk
  - head.S: cputyp
  - head.S: prom_vector_p
  - idprom.c: Sun_Machines[]
  - ioport.c: _sparc_find_resource()
  - ioport.c: create_proc_read_entry()
  - irq.c: struct sparc_irq[]
  - rtrap.S: sun4c_rett_stackchk
  - setup.c: prom_sync_me()
  - setup.c: boot_flags
  - sun4c_irq.c: sun4c_sbint_to_irq()
  - sun4d_irq.c: sbus_tid[]
  - sun4d_irq.c: struct sbus_actions
  - sun4d_irq.c: sun4d_sbint_to_irq()
  - sun4m_irq.c: sun4m_sbint_to_irq()
  - sun4m_irq.c: sun4m_get_irqmask()
  - sun4m_irq.c: sun4m_timers
  - sun4m_smp.c: smp4m_cross_call()
  - sun4m_smp.c: smp4m_blackbox_id()
  - sun4m_smp.c: smp4m_blackbox_current()
  - time.c: sp_clock_typ
  - time.c: sbus_time_init()
  - traps.c: instruction_dump()
  - wof.S: spwin_sun4c_stackchk
  - wuf.S: sun4c_fwin_stackchk
- #if 0 the following unused code:
  - process.c: sparc_backtrace_lock
  - process.c: __show_backtrace()
  - process.c: show_backtrace()
  - process.c: smp_show_backtrace_all_cpus()
- remove the following unused code:
  - entry.S: __handle_exception
  - smp.c: smp_num_cpus
  - smp.c: smp_activated
  - smp.c: __cpu_number_map[]
  - smp.c: __cpu_logical_map[]
  - smp.c: bitops_spinlock
  - traps.c: trap_curbuf
  - traps.c: trapbuf[]
  - traps.c: linux_smp_still_initting
  - traps.c: thiscpus_tbr
  - traps.c: thiscpus_mid

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-17 21:37:46 -07:00
Linus Torvalds 5b664cb235 Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2:
  [PATCH] ocfs2: fix oops in mmap_truncate testing
  configfs: call drop_link() to cleanup after create_link() failure
  configfs: Allow ->make_item() and ->make_group() to return detailed errors.
  configfs: Fix failing mkdir() making racing rmdir() fail
  configfs: Fix deadlock with racing rmdir() and rename()
  configfs: Make configfs_new_dirent() return error code instead of NULL
  configfs: Protect configfs_dirent s_links list mutations
  configfs: Introduce configfs_dirent_lock
  ocfs2: Don't snprintf() without a format.
  ocfs2: Fix CONFIG_OCFS2_DEBUG_FS #ifdefs
  ocfs2/net: Silence build warnings on sparc64
  ocfs2: Handle error during journal load
  ocfs2: Silence an error message in ocfs2_file_aio_read()
  ocfs2: use simple_read_from_buffer()
  ocfs2: fix printk format warnings with OCFS2_FS_STATS=n
  [PATCH 2/2] ocfs2: Instrument fs cluster locks
  [PATCH 1/2] ocfs2: Add CONFIG_OCFS2_FS_STATS config option
2008-07-17 10:55:51 -07:00
Linus Torvalds f39548a6ad Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-fixes-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-fixes-2.6:
  pcmcia: ide-cs: Remove outdated comment
  pcmcia: fix cisinfo_t removal
  pcmcia: fix return value in cm4000_cs.c
2008-07-17 10:55:07 -07:00
Linus Torvalds 2b04be7e8a Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86: fix asm/e820.h for userspace inclusion
  x86: fix numaq_tsc_disable
  x86: fix kernel_physical_mapping_init() for large x86 systems
2008-07-17 10:38:59 -07:00
Linus Torvalds bdec6cace4 Merge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  ftrace: do not trace library functions
  ftrace: do not trace scheduler functions
  ftrace: fix lockup with MAXSMP
  ftrace: fix merge buglet
2008-07-17 10:37:10 -07:00
Rusty Russell 2567d71cc7 x86: fix asm/e820.h for userspace inclusion
asm-x86/e820.h is included from userspace.  'x86: make e820.c to have
common functions' (b79cd8f126) broke it:

	make -C Documentation/lguest
	cc -Wall -Wmissing-declarations -Wmissing-prototypes -O3 -I../../include
lguest.c  -lz -o lguest
	In file included from ../../include/asm-x86/bootparam.h:8,
	                 from lguest.c:45:
	../../include/asm/e820.h:66: error: expected ‘)’ before ‘start’
	../../include/asm/e820.h:67: error: expected ‘)’ before ‘start’
	../../include/asm/e820.h:68: error: expected ‘)’ before ‘start’
	../../include/asm/e820.h:72: error: expected ‘=’, ‘,’, ‘;’, ‘asm’
or ‘__attribute__’ before ‘e820_update_range’
	...

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-07-17 19:28:48 +02:00
Yinghai Lu 9354094a95 x86: fix numaq_tsc_disable
fix:

 arch/x86/kernel/numaq_32.c: In function ‘numaq_tsc_disable’:
 arch/x86/kernel/numaq_32.c:99: warning: ‘return’ with a value, in function returning void

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-07-17 19:27:08 +02:00
Ingo Molnar c43c1be0f7 Merge branch 'linus' into x86/urgent 2008-07-17 19:24:56 +02:00
Takashi Iwai 2f73ccab56 fix build error of arch/ia64/kvm/*
Fix calls of smp_call_function*() in arch/ia64/kvm for recent API
changes.

    CC [M]  arch/ia64/kvm/kvm-ia64.o
  arch/ia64/kvm/kvm-ia64.c: In function 'handle_global_purge':
  arch/ia64/kvm/kvm-ia64.c:398: error: too many arguments to function 'smp_call_function_single'
  arch/ia64/kvm/kvm-ia64.c: In function 'kvm_vcpu_kick':
  arch/ia64/kvm/kvm-ia64.c:1696: error: too many arguments to function 'smp_call_function_single'

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by Xiantao Zhang <xiantao.zhang@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-17 09:16:31 -07:00
Linus Torvalds 42fea1f385 Merge branch 'ptrace-cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/frob/linux-2.6-utrace
* 'ptrace-cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/frob/linux-2.6-utrace:
  fix dangling zombie when new parent ignores children
  do_wait: return security_task_wait() error code in place of -ECHILD
  ptrace children revamp
  do_wait reorganization
2008-07-17 09:15:23 -07:00
David Woodhouse 7259d936c6 Update scripts/Makefile.fwinst to cope with older make
Also fix unwanted rebuilds of the firmware/ihex2fw tool by including
the .ihex2fw.cmd file when present.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Reported-and-tested-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-17 09:12:04 -07:00
Linus Torvalds ee723cb3d4 Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
  [S390] dasd: use -EOPNOTSUPP instead of -ENOTSUPP
  [S390] qdio: new qdio driver.
  [S390] cio: Export chsc_error_from_response().
  [S390] vmur: Fix return code handling.
  [S390] Fix stacktrace compile bug.
  [S390] Increase default warning stacksize.
  [S390] dasd: Fix cleanup in dasd_{fba,diag}_check_characteristics().
  [S390] chsc headers userspace cleanup
  [S390] dasd: fix unsolicited SIM handling.
  [S390] zfcpdump: Make SCSI disk dump tool recognize storage holes
2008-07-17 09:05:38 -07:00
Grant Likely 7023cc6129 Fix collateral damage to top level Makefile
The patch named "powerpc/mpc5121: Add clock driver", also contained
an unrelated and bogus change to the top-level makefile.  This patch
backs out the bad bit.

SHA1 of offending patch: 137e95906e)

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Repented-by: John Rigby <jrigby@freescale.com>
[ Heh. Normally I pick these out from the diffstats, but I guess
  I've grown to trust the ppc tree too much ;)   - Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-17 09:05:12 -07:00
Ingo Molnar 2464a609de ftrace: do not trace library functions
make function tracing more robust: do not trace library functions.

We've already got a sizable list of exceptions:

 ifdef CONFIG_FTRACE
 # Do not profile string.o, since it may be used in early boot or vdso
 CFLAGS_REMOVE_string.o = -pg
 # Also do not profile any debug utilities
 CFLAGS_REMOVE_spinlock_debug.o = -pg
 CFLAGS_REMOVE_list_debug.o = -pg
 CFLAGS_REMOVE_debugobjects.o = -pg
 CFLAGS_REMOVE_find_next_bit.o = -pg
 CFLAGS_REMOVE_cpumask.o = -pg
 CFLAGS_REMOVE_bitmap.o = -pg
 endif

... and the pattern has been that random library functionality showed
up in ftrace's critical path (outside of its recursion check), causing
hard to debug lockups.

So be a bit defensive about it and exclude all lib/*.o functions by
default. It's not that they are overly interesting for tracing purposes
anyway. Specific ones can still be traced, in an opt-in manner.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-07-17 17:40:48 +02:00
Ingo Molnar c349e0a01c ftrace: do not trace scheduler functions
do not trace scheduler functions - it's still a bit fragile
and can lock up with:

  http://redhat.com/~mingo/misc/config-Thu_Jul_17_13_34_52_CEST_2008

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-07-17 17:40:11 +02:00
Ingo Molnar 9fa111372a ftrace: fix lockup with MAXSMP
MAXSMP brings in lots of use of various bitops in smp_processor_id()
and friends - causing ftrace to lock up during bootup:

  calling  anon_inode_init+0x0/0x130
  initcall anon_inode_init+0x0/0x130 returned 0 after 0 msecs
  calling  acpi_event_init+0x0/0x57
  [ hard hang ]

So exclude the bitops facilities from tracing.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-07-17 17:38:17 +02:00
Stefan Haberland 8586cb60ce [S390] dasd: use -EOPNOTSUPP instead of -ENOTSUPP
return value -ENOTSUPP is not valid in userspace context, use
-EOPNOTSUPP instead

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2008-07-17 17:22:10 +02:00
Jan Glauber 779e6e1c72 [S390] qdio: new qdio driver.
List of major changes:
- split qdio driver into several files
- seperation of thin interrupt code
- improved handling for multiple thin interrupt devices
- inbound and outbound processing now always runs in tasklet context
- significant less tasklet schedules per interrupt needed
- merged qebsm with non-qebsm handling
- cleanup qdio interface and added kerneldoc
- coding style

Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Reviewed-by: Utz Bacher <utz.bacher@de.ibm.com>
Reviewed-by: Ursula Braun <braunu@de.ibm.com>
Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2008-07-17 17:22:10 +02:00
Cornelia Huck dae39843f4 [S390] cio: Export chsc_error_from_response().
Make chsc_error_from_response() available to chsc callers outside
of chsc.c (namely qdio) to avoid duplicating error checking code.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2008-07-17 17:22:10 +02:00
Frank Munzert b9993a38a9 [S390] vmur: Fix return code handling.
Use -EOPNOTSUPP instead of -ENOTSUPP.

Signed-off-by: Frank Munzert <munzert@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-07-17 17:22:09 +02:00
Heiko Carstens 8de2ce86cd [S390] Fix stacktrace compile bug.
Add missing module.h include to fix this:

  CC      arch/s390/kernel/stacktrace.o
arch/s390/kernel/stacktrace.c:84: warning: data definition has no type or storage class
arch/s390/kernel/stacktrace.c:84: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL'
arch/s390/kernel/stacktrace.c:84: warning: parameter names (without types) in function declaration
arch/s390/kernel/stacktrace.c:97: warning: data definition has no type or storage class
arch/s390/kernel/stacktrace.c:97: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL'
arch/s390/kernel/stacktrace.c:97: warning: parameter names (without types) in function declaration

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-07-17 17:22:09 +02:00
Heiko Carstens c5a3725549 [S390] Increase default warning stacksize.
Compiling a kernel with allmodconfig or allyesconfig results in tons
of gcc warnings, because the default maximum stacksize from which on
gcc will emit a warning is just 256 bytes.
Increase this to 2048, so these warnings don't distract from the real
warnings that we need to watch at.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-07-17 17:22:09 +02:00
Cornelia Huck 7337194f70 [S390] dasd: Fix cleanup in dasd_{fba,diag}_check_characteristics().
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-07-17 17:22:08 +02:00
Adrian Bunk 626f311737 [S390] chsc headers userspace cleanup
Kernel headers shouldn't expose functions to userspace.

Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-07-17 17:22:08 +02:00
Stefan Haberland 9d853caf44 [S390] dasd: fix unsolicited SIM handling.
Add missing schedule_bh and check that there is 32 bit sense data.

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-07-17 17:22:08 +02:00
Frank Munzert 12e0c95e0c [S390] zfcpdump: Make SCSI disk dump tool recognize storage holes
The kernel part of zfcpdump establishes a new debugfs file zcore/memmap
which exports information on memory layout (start address and length of each
memory chunk) to its userspace counterpart.

Signed-off-by: Frank Munzert <munzert@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-07-17 17:22:07 +02:00
Ingo Molnar 8e9509c827 ftrace: fix merge buglet
-tip testing found a bootup hang here:

  initcall anon_inode_init+0x0/0x130 returned 0 after 0 msecs
  calling  acpi_event_init+0x0/0x57

the bootup should have continued with:

  initcall acpi_event_init+0x0/0x57 returned 0 after 45 msecs

but it hung hard there instead.

bisection led to this commit:

| commit 5806b81ac1
| Merge: d14c8a6... 6712e29...
| Author: Ingo Molnar <mingo@elte.hu>
| Date:   Mon Jul 14 16:11:52 2008 +0200
|     Merge branch 'auto-ftrace-next' into tracing/for-linus

turns out that i made this mistake in the merge:

  ifdef CONFIG_FTRACE
  # Do not profile debug utilities
  CFLAGS_REMOVE_tsc_64.o = -pg
  CFLAGS_REMOVE_tsc_32.o = -pg

those two files got unified meanwhile - so the dont-profile annotation
got lost. The proper rule is:

  CFLAGS_REMOVE_tsc.o = -pg

i guess this could have been caught sooner if the CFLAGS_REMOVE* kbuild
rule aborted the build if it met a target that does not exist anymore?

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-07-17 13:26:50 +02:00
Roland McGrath 666f164f4f fix dangling zombie when new parent ignores children
This fixes an arcane bug that we think was a regression introduced
by commit b2b2cbc4b2.  When a parent
ignores SIGCHLD (or uses SA_NOCLDWAIT), its children would self-reap
but they don't if it's using ptrace on them.  When the parent thread
later exits and ceases to ptrace a child but leaves other live
threads in the parent's thread group, any zombie children are left
dangling.  The fix makes them self-reap then, as they would have
done earlier if ptrace had not been in use.

Signed-off-by: Roland McGrath <roland@redhat.com>
2008-07-16 18:02:34 -07:00
Roland McGrath 14dd0b8141 do_wait: return security_task_wait() error code in place of -ECHILD
This reverts the effect of commit f2cc3eb133
"do_wait: fix security checks".  That change reverted the effect of commit
7324328446.  The rationale for the original
commit still stands.  The inconsistent treatment of children hidden by
ptrace was an unintended omission in the original change and in no way
invalidates its purpose.

This makes do_wait return the error returned by security_task_wait()
(usually -EACCES) in place of -ECHILD when there are some children the
caller would be able to wait for if not for the permission failure.  A
permission error will give the user a clue to look for security policy
problems, rather than for mysterious wait bugs.

Signed-off-by: Roland McGrath <roland@redhat.com>
2008-07-16 18:02:34 -07:00
Roland McGrath f470021adb ptrace children revamp
ptrace no longer fiddles with the children/sibling links, and the
old ptrace_children list is gone.  Now ptrace, whether of one's own
children or another's via PTRACE_ATTACH, just uses the new ptraced
list instead.

There should be no user-visible difference that matters.  The only
change is the order in which do_wait() sees multiple stopped
children and stopped ptrace attachees.  Since wait_task_stopped()
was changed earlier so it no longer reorders the children list, we
already know this won't cause any new problems.

Signed-off-by: Roland McGrath <roland@redhat.com>
2008-07-16 18:02:33 -07:00