Daniel Vetter [Thu, 26 Nov 2009 12:34:12 +0000 (13:34 +0100)]
kbuild: specify absolute paths for cscope
Cscope doesn't hadle relative paths when cscope.out is not in $PWD. Use
absolute paths when generating cscope.files, which seems to be the
recommended way to generate cscope.out, anyway (at least according to
cscope.sf.net). The speed and size differences are minimal, the only
drawback is that the database needs to be regenerated if the source
directory is moved.
[mmarek: fixed for O= builds, modified changelog]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Michal Marek <mmarek@suse.cz>
Michal Marek [Wed, 25 Nov 2009 14:14:49 +0000 (15:14 +0100)]
kbuild: create include/generated in silentoldconfig
The toplevel Makefile creates the directory if it runs silentoldconfig
automatically, but if run manually, it fails:
$ make mrproper
$ make defconfig && make silentoldconfig
*** Default configuration is based on 'x86_64_defconfig'
#
# configuration written to .config
#
scripts/kconfig/conf -s arch/x86/Kconfig
*** Error during update of the kernel configuration.
...
Move the mkdir command to the silentoldconfig target to make it work.
Jonathan Nieder [Tue, 24 Nov 2009 15:21:56 +0000 (09:21 -0600)]
scripts/package: deb-pkg: use fakeroot if available
Running "make deb-pkg" requires setting KBUILD_PKG_ROOTCMD or
becoming root oneself or it errors out. Unless already running
as root or KBUILD_PKG_ROOTCMD is already set, use fakeroot as a
good default.
With this patch applied, you can run "make oldconfig deb-pkg" as
an ordinary user to build a binary package for an updated kernel
tree and it should just work.
fakeroot is too zealous by default in treating files as owned by
root. Its wrapped stat() sets st_uid and st_gid to 0 for all
files, which causes Git to go on a wild goose chase if
CONFIG_LOCALVERSION_AUTO is set, checking if any file's content
has changed along with its stat information. Avoid this by
telling fakeroot to use the actual owner and group for
preexisting files, by passing it the -u option.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
Jonathan Nieder [Tue, 24 Nov 2009 15:14:41 +0000 (09:14 -0600)]
scripts/package: add KBUILD_PKG_ROOTCMD variable
Let the deb-pkg target acquire (fake) root privileges before
running commands that need them. Without such privileges,
deb-pkg errors out because chown fails.
The new KBUILD_PKG_ROOTCMD variable, if defined, is used as a
command to run other commands with possibly fake elevated
privileges. Since this is not needed for the tar-pkg and rpm-pkg
targets, it is only used by deb-pkg. If it is not defined, the
behavior is as before, and the user will have to rerun make as
root.
In other words, as a shortcut, instead of running 'make oldconfig &&
make && fakeroot -u make deb-pkg', one can use the single command
'make oldconfig deb-pkg KBUILD_PKG_ROOTCMD="fakeroot -u"'.
Suggested-by: Ryan Anderson <ryan@michonline.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
Michal Marek [Tue, 24 Nov 2009 15:11:37 +0000 (09:11 -0600)]
scripts/package: tar-pkg: use tar --owner=root
Use the --owner= and --group= options to make sure the entries in
the built tar file are owned by root. Without this change, a
careless sysadmin using the tar-pkg target can easily end up
installing a kernel that is writable by the unprivileged user
account used to build the kernel.
Test that these options are understood before using them so that
non-GNU versions of tar can still be used if the operator is
appropriately cautious.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
Jie Zhang [Thu, 12 Nov 2009 09:59:56 +0000 (17:59 +0800)]
net: add net_tstamp.h to headers_install
include/linux/net_tstamp.h is userspace API for hardware time stamping
of network packets. It should be exported to userspace.
Signed-off-by: Jie Zhang <jie.zhang@analog.com> Signed-off-by: Barry Song <barry.song@analog.com> Signed-off-by: Patrick Ohly <patrick.ohly@gmx.de> Signed-off-by: Michal Marek <mmarek@suse.cz>
Sam Ravnborg [Sat, 17 Oct 2009 22:00:43 +0000 (00:00 +0200)]
kbuild: drop include/asm
We no longer use this directory for generated files and
all architectures has moved their header files so no
symlink tricks are needed either.
Drop the symlink and drop the ARCH check.
If we really need to check that the SRCARCH has not changed
when we build a kernel we can add this check back - but then we will
find a more convenient way to store the info.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
Sam Ravnborg [Sat, 17 Oct 2009 20:20:22 +0000 (22:20 +0200)]
sh: move machtypes.h to include/generated
Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Paul Mundt <lethal@linux-sh.org> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Michal Marek <mmarek@suse.cz>
Sam Ravnborg [Mon, 20 Apr 2009 17:59:58 +0000 (19:59 +0200)]
arm: move mach-types to include/generated
Simplified arch/arm/Makefile by dropping the maketools target
It was undocumented and not needed
Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Russell King <linux@arm.linux.org.uk> Signed-off-by: Michal Marek <mmarek@suse.cz>
Sam Ravnborg [Mon, 20 Apr 2009 17:35:54 +0000 (19:35 +0200)]
ia64: move nr-irqs.h to include/generated
Avoid generating files in the now deprecated asm-ia64 dir
Simplified the logic in the Makefile when editing stuff in the area
Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Tony Luck <tony.luck@intel.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
Sam Ravnborg [Sun, 19 Apr 2009 20:35:10 +0000 (22:35 +0200)]
kbuild: move asm-offsets.h to include/generated
The simplest method was to add an extra asm-offsets.h
file in arch/$ARCH/include/asm that references the generated file.
We can now migrate the architectures one-by-one to reference
the generated file direct - and when done we can delete the
temporary arch/$ARCH/include/asm/asm-offsets.h file.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Michal Marek <mmarek@suse.cz>
Sam Ravnborg [Sat, 17 Oct 2009 19:14:18 +0000 (21:14 +0200)]
kbuild: search arch/$ARCH/include before include/
The namespace used in arch/$ARCH/include is different from
what is used in include/ except for the include/asm directory.
This patch gives the arch/$ARCH/include/asm directory priority
over include/asm.
When we add asm-offsets.h to arch/$ARCH/include/asm/ this
patch makes sure we pick up the arch specific version
and not the one we have in include/asm.
The situation with an asm-offsets.h file located in
both include/asm _and_ arch/$ARCH/include/asm will happen
when we move more files over to include/generated.
This happens because in some cases it is not practical
to rename all users so we simply add a file
in arch/$ARCH/include/asm that includes the generated version.
This is the solution we use for asm-offsets.h as an example.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Michal Marek <mmarek@suse.cz>
Michael Tokarev [Tue, 13 Oct 2009 20:22:46 +0000 (22:22 +0200)]
kbuild: fix bzImage build for x86
As has been discussed previously (and Sam has been CC'ed), the fix
is still incorrect. It replaces "echo -ne" with "/bin/echo -ne",
but neither of the two are guaranteed to support the necessary
arguments and necessary (hexadecimal) escape sequences. What should
be used here is printf(1). The trivial patch below (on top of these
kbuild changes) fixes this issue.
Signed-Off-By: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (75 commits)
net: Handle NETREG_UNINITIALIZED devices correctly
can: add the driver for Analog Devices Blackfin on-chip CAN controllers
xfrm: Fix truncation length of authentication algorithms installed via PF_KEY
net: use compat helper functions in compat_sys_recvmmsg
net: fix compat_sys_recvmmsg parameter type
cxgb3: Fixing EEH handlers
cnic: Zero out status block and Event Queue indices.
cnic: Send delete command when shutting down iSCSI ring.
net: smc91x: Fix up type mismatch in smc_drv_resume().
smc91x: fix unused flags warnings on UP systems
MAINTAINERS: Transfering maintainership of cdc-ether
net: Add missing TST_CFG_WRITE bits around sky2_pci_write
net: Fix Yukon-2 Optima TCP offload setup
net: niu uses crc32, so select CRC32
wireless: update old static regulatory domain rules
mac80211: Revert 'Use correct sign for mesh active path refresh'
mac80211: Fixed bug in mesh portal paths
net/mac80211: Correct size given to memset
b43: Remove reset after fatal DMA error
rtl8187: add radio led and fix warnings on suspend
...
* git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic:
asm-generic: add sys_recvmmsg to unistd.h
asm-generic: add sys_accept4 to unistd.h
asm-generic/gpio.h: add some forward decls of the device struct
asm-generic: Fix typo in asm-generic/unistd.h.
lib/checksum: fix one more thinko
lib/checksum.c: make do_csum optional
lib/checksum.c: use 32-bit arithmetic consistently
Linus Torvalds [Sat, 12 Dec 2009 04:49:09 +0000 (20:49 -0800)]
Merge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
itimer: Fix the itimer trace print format
hrtimer: move timer stats helper functions to hrtimer.c
hrtimer: Tune hrtimer_interrupt hang logic
Linus Torvalds [Sat, 12 Dec 2009 04:48:21 +0000 (20:48 -0800)]
Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
lockdep: Avoid out of bounds array reference in save_trace()
futex: Take mmap_sem for get_user_pages in fault_in_user_writeable
lockstat: Add usage info to Documentation/lockstat.txt
lockstat: Fix min, max times in /proc/lock_stats
Linus Torvalds [Sat, 12 Dec 2009 04:47:59 +0000 (20:47 -0800)]
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/amd-iommu: Fix PCI hotplug with passthrough mode
x86/amd-iommu: Fix passthrough mode
x86: mmio-mod.c: Use pr_fmt
x86: kmmio.c: Add and use pr_fmt(fmt)
x86: i8254.c: Add pr_fmt(fmt)
x86: setup_percpu.c: Use pr_<level> and add pr_fmt(fmt)
x86: es7000_32.c: Use pr_<level> and add pr_fmt(fmt)
x86: Print DMI_BOARD_NAME as well as DMI_PRODUCT_NAME from __show_regs()
x86: Factor duplicated code out of __show_regs() into show_regs_common()
arch/x86/kernel/microcode*: Use pr_fmt() and remove duplicated KERN_ERR prefix
x86, mce: fix confusion between bank attributes and mce attributes
x86/mce: Set up timer unconditionally
x86: Fix bogus warning in apic_noop.apic_write()
x86: Fix typo in arch/x86/mm/kmmio.c
x86: ASUS P4S800 reboot=bios quirk
Linus Torvalds [Sat, 12 Dec 2009 04:47:44 +0000 (20:47 -0800)]
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:
tracing: Remove comparing of NULL to va_list in trace_array_vprintk()
tracing: Fix function graph trace_pipe to properly display failed entries
tracing: Add full state to trace_seq
tracing: Buffer the output of seq_file in case of filled buffer
tracing: Only call pipe_close if pipe_close is defined
tracing: Add pipe_close interface
Linus Torvalds [Sat, 12 Dec 2009 04:47:30 +0000 (20:47 -0800)]
Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (57 commits)
x86, perf events: Check if we have APIC enabled
perf_event: Fix variable initialization in other codepaths
perf kmem: Fix unused argument build warning
perf symbols: perf_header__read_build_ids() offset'n'size should be u64
perf symbols: dsos__read_build_ids() should read both user and kernel buildids
perf tools: Align long options which have no short forms
perf kmem: Show usage if no option is specified
sched: Mark sched_clock() as notrace
perf sched: Add max delay time snapshot
perf tools: Correct size given to memset
perf_event: Fix perf_swevent_hrtimer() variable initialization
perf sched: Fix for getting task's execution time
tracing/kprobes: Fix field creation's bad error handling
perf_event: Cleanup for cpu_clock_perf_event_update()
perf_event: Allocate children's perf_event_ctxp at the right time
perf_event: Clean up __perf_event_init_context()
hw-breakpoints: Modify breakpoints without unregistering them
perf probe: Update perf-probe document
perf probe: Support --del option
trace-kprobe: Support delete probe syntax
...
Linus Torvalds [Fri, 11 Dec 2009 23:59:23 +0000 (15:59 -0800)]
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq:
[ACPI/CPUFREQ] Introduce bios_limit per cpu cpufreq sysfs interface
[CPUFREQ] make internal cpufreq_add_dev_* static
[CPUFREQ] use an enum for speedstep processor identification
[CPUFREQ] Document units for transition latency
[CPUFREQ] Use global sysfs cpufreq structure for conservative governor tunings
[CPUFREQ] Documentation: ABI: /sys/devices/system/cpu/cpu#/cpufreq/
[CPUFREQ] powernow-k6: set transition latency value so ondemand governor can be used
[CPUFREQ] cpumask: don't put a cpumask on the stack in x86...cpufreq/powernow-k8.c
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6: (58 commits)
tty: split the lock up a bit further
tty: Move the leader test in disassociate
tty: Push the bkl down a bit in the hangup code
tty: Push the lock down further into the ldisc code
tty: push the BKL down into the handlers a bit
tty: moxa: split open lock
tty: moxa: Kill the use of lock_kernel
tty: moxa: Fix modem op locking
tty: moxa: Kill off the throttle method
tty: moxa: Locking clean up
tty: moxa: rework the locking a bit
tty: moxa: Use more tty_port ops
tty: isicom: fix deadlock on shutdown
tty: mxser: Use the new locking rules to fix setserial properly
tty: mxser: use the tty_port_open method
tty: isicom: sort out the board init logic
tty: isicom: switch to the new tty_port_open helper
tty: tty_port: Add a kref object to the tty port
tty: istallion: tty port open/close methods
tty: stallion: Convert to the tty_port_open/close methods
...
Linus Torvalds [Fri, 11 Dec 2009 23:31:13 +0000 (15:31 -0800)]
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6: (21 commits)
ext3: PTR_ERR return of wrong pointer in setup_new_group_blocks()
ext3: Fix data / filesystem corruption when write fails to copy data
ext4: Support for 64-bit quota format
ext3: Support for vfsv1 quota format
quota: Implement quota format with 64-bit space and inode limits
quota: Move definition of QFMT_OCFS2 to linux/quota.h
ext2: fix comment in ext2_find_entry about return values
ext3: Unify log messages in ext3
ext2: clear uptodate flag on super block I/O error
ext2: Unify log messages in ext2
ext3: make "norecovery" an alias for "noload"
ext3: Don't update the superblock in ext3_statfs()
ext3: journal all modifications in ext3_xattr_set_handle
ext2: Explicitly assign values to on-disk enum of filetypes
quota: Fix WARN_ON in lookup_one_len
const: struct quota_format_ops
ubifs: remove manual O_SYNC handling
afs: remove manual O_SYNC handling
kill wait_on_page_writeback_range
vfs: Implement proper O_SYNC semantics
...
Linus Torvalds [Fri, 11 Dec 2009 23:30:29 +0000 (15:30 -0800)]
Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs
* 'for-linus' of git://oss.sgi.com/xfs/xfs:
xfs: Fix error return for fallocate() on XFS
xfs: cleanup dmapi macros in the umount path
xfs: remove incorrect sparse annotation for xfs_iget_cache_miss
xfs: kill the STATIC_INLINE macro
xfs: uninline xfs_get_extsz_hint
xfs: rename xfs_attr_fetch to xfs_attr_get_int
xfs: simplify xfs_buf_get / xfs_buf_read interfaces
xfs: remove IO_ISAIO
xfs: Wrapped journal record corruption on read at recovery
xfs: cleanup data end I/O handlers
xfs: use WRITE_SYNC_PLUG for synchronous writeout
xfs: reset the i_iolock lock class in the reclaim path
xfs: I/O completion handlers must use NOFS allocations
xfs: fix mmap_sem/iolock inversion in xfs_free_eofblocks
xfs: simplify inode teardown
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (235 commits)
Staging: IIO: add selection of IIO_SW_RING to LIS3L02DQ as needed
Staging: IIO: Add tsl2560-2 support to tsl2563 driver.
Staging: IIO: Remove tsl2561 driver. Support merged with tsl2563.
Staging: wlags49_h2: fix up signal levels
+ drivers-staging-wlags49_h2-remove-cvs-metadata.patch added to -mm tree
Staging: samsung-laptop: add TODO file
Staging: samsung-laptop: remove old kernel code
Staging: add Samsung Laptop driver
staging: batman-adv meshing protocol
Staging: rtl8192u: depends on USB
Staging: rtl8192u: remove dead code
Staging: rtl8192u: remove bad whitespaces
Staging: rtl8192u: make it compile
Staging: Added Realtek rtl8192u driver to staging
Staging: dream: add gpio and pmem support
Staging: dream: add TODO file
Staging: android: delete android drivers
Staging: et131x: clean up the avail fields in the rx registers
Staging: et131x: Clean up number fields
Staging: et131x: kill RX_DMA_MAX_PKT_TIME
...
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (27 commits)
Driver core: fix race in dev_driver_string
Driver Core: Early platform driver buffer
sysfs: sysfs_setattr remove unnecessary permission check.
sysfs: Factor out sysfs_rename from sysfs_rename_dir and sysfs_move_dir
sysfs: Propagate renames to the vfs on demand
sysfs: Gut sysfs_addrm_start and sysfs_addrm_finish
sysfs: In sysfs_chmod_file lazily propagate the mode change.
sysfs: Implement sysfs_getattr & sysfs_permission
sysfs: Nicely indent sysfs_symlink_inode_operations
sysfs: Update s_iattr on link and unlink.
sysfs: Fix locking and factor out sysfs_sd_setattr
sysfs: Simplify iattr time assignments
sysfs: Simplify sysfs_chmod_file semantics
sysfs: Use dentry_ops instead of directly playing with the dcache
sysfs: Rename sysfs_d_iput to sysfs_dentry_iput
sysfs: Update sysfs_setxattr so it updates secdata under the sysfs_mutex
debugfs: fix create mutex racy fops and private data
Driver core: Don't remove kobjects in device_shutdown.
firmware_class: make request_firmware_nowait more useful
Driver-Core: devtmpfs - set root directory mode to 0755
...
Linus Torvalds [Fri, 11 Dec 2009 23:22:27 +0000 (15:22 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
firewire: ohci: handle receive packets with a data length of zero
Linus Torvalds [Fri, 11 Dec 2009 23:19:56 +0000 (15:19 -0800)]
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb:
kgdb: Always process the whole breakpoint list on activate or deactivate
kgdb: continue and warn on signal passing from gdb
kgdb,x86: do not set kgdb_single_step on x86
kgdb: allow for cpu switch when single stepping
kgdb,i386: Fix corner case access to ss with NMI watch dog exception
kgdb: Replace strstr() by strchr() for single-character needles
kgdbts: Read buffer overflow
kgdb: Read buffer overflow
kgdb,x86: remove redundant test
Alan Cox [Mon, 30 Nov 2009 13:18:51 +0000 (13:18 +0000)]
tty: split the lock up a bit further
The tty count sanity check may need the BKL, that isn't clear. However it
is clear that the count use of the lock is internal and independant of the
bigger use of the lock.
Furthermore the file list locking is also separately locked already
Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Cox [Mon, 30 Nov 2009 13:18:45 +0000 (13:18 +0000)]
tty: Move the leader test in disassociate
There are two call points, both want to check that tty->signal->leader is
set. Move the test into disassociate_ctty() as that will make locking
changes easier in a bit
Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Cox [Mon, 30 Nov 2009 13:18:24 +0000 (13:18 +0000)]
tty: moxa: split open lock
moxa_openlock is used for several situations where we want to handle the
case of an ioctl that crosses many ports (not just the open tty), and also
cases where an open races a deinit (eg a pci unplug) and we hangup a port
before we can cope with that.
The non open race cases can use the moxa_lock spinlock. This simplifies sorting
out the remaining mess.
Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Cox [Mon, 30 Nov 2009 13:18:02 +0000 (13:18 +0000)]
tty: moxa: Locking clean up
- The open lock is needed to fix up the case of a board reset occuring during
tty open but too early for a sane hangup response.
- The lock can however got for other cases
- Use the port mutex for get/setserial
- Fix up the confused lack of locking on the THROTTLE and other bits in the
private flags. Just use set/test/clear bit and it covers the cases we need
Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Path to might_sleep macro from isicom_hangup:
1. isicom_hangup calls spin_lock_irqsave (drivers/char/isicom.c:1315) and
then
calls isicom_shutdown_port.
2. isiscom_shutdown_port calls tty_port_free_xmit_buf at
drivers/char/isicom.c:906
3. tty_port_free_xmit_buf calls mutex_lock at drivers/char/tty_port:48
Found by Linux Driver Verification Project.
Reported-by: Alexander Strakh <strakh@ispras.ru> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Cox [Mon, 30 Nov 2009 13:17:41 +0000 (13:17 +0000)]
tty: mxser: Use the new locking rules to fix setserial properly
Propogate the init/shutdown mutex through the setserial logic. Use the proper
locks for the various bits still using the BKL. Kill the BKL in this driver.
Updated to fix the bug noted by Dan Carpenter
Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Cox [Mon, 30 Nov 2009 13:17:35 +0000 (13:17 +0000)]
tty: mxser: use the tty_port_open method
At first this looks a fairly trivial conversion but we can't quite push
everything into the right format yet. The open side is easy but care is needed
over the setserial methods. Fix up the locking now that we've adopted the
port->mutex locking rule for the initialization.
Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Cox [Mon, 30 Nov 2009 13:17:30 +0000 (13:17 +0000)]
tty: isicom: sort out the board init logic
Split this into two flags - INIT meaning the board is set up and ACTIVE
meaning the board has ports open. Remove the broken HUPCL casing and push
the counts somewhere sensible.
Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Cox [Mon, 30 Nov 2009 13:16:57 +0000 (13:16 +0000)]
tty: tty_port: Move the IO_ERROR clear
Some devices want to set IO_ERROR in their activate methods so that you can
be handed a 'dead' port for operations like setserial. Thus we need to
clear the flag before activate so that activate can choose to set the flag
and still return 0.
This is fine as the file handle/tty are not accessible to the user yet.
Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Cox [Mon, 30 Nov 2009 13:16:41 +0000 (13:16 +0000)]
tty: tty_port: Change the buffer allocator locking
We want to be able to do this without regard for the activate/own open
method being used which causes a problem using port->mutex. Add another
mutex for now. Once everything uses port_open to do buffer allocs we can
kill it back off
Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Cox [Thu, 5 Nov 2009 13:28:38 +0000 (13:28 +0000)]
sdio_uart: Move the open lock
When we move to the tty_port logic the port mutex will protect open v close
v hangup. Move to this first in the existing open code so we have a bisection
point.
Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
devpts_get_tty() assumes that the inode passed in is associated with a valid
pty. But if the only reference to the pty is via a bind-mount, the inode
passed to devpts_get_tty() while valid, would refer to a pty that no longer
exists.
With a lot of debug effort, Grzegorz Nosek developed a small program (see
below) to reproduce a crash on recent kernels. This crash is a regression
introduced by the commit:
Ian Jackson [Wed, 18 Nov 2009 10:08:11 +0000 (11:08 +0100)]
Serial: Do not read IIR in serial8250_start_tx when UART_BUG_TXEN
Do not read IIR in serial8250_start_tx when UART_BUG_TXEN
Reading the IIR clears some oustanding interrupts so it is not safe.
Instead, simply transmit immediately if the buffer is empty without
regard to IIR.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Jiri Kosina <jkosina@suse.cz> Cc: Alan Cox <alan@linux.intel.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Intel(R) PXA27x Processor Family Specification Update (Nov 2005)
says:
E75. UART: Baud rate may not be programmed correctly on
back-to-back writes.
Problem:
When programming the Divisor Latch registers, Low and High (DLL and
DLH), with back-to-back writes, the second register write may not
take effect. The result is an incorrect baud rate.
Workaround:
After programming the first Divisor Latch register, read and verify
it before programming the second Divisor Latch register.
This was hit when changing the baud rate from 115200 to 9600 while
receiving characters at 9600 Bd.
And fixed indention of some comments nearby.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Marc Kleine-Budde <mkl@pengutronix.de> Cc: Eric Miao <eric.y.miao@gmail.com> Cc: Alan Cox <alan@linux.intel.com> Cc: Mike Rapoport <mike@compulab.co.il> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Cox [Tue, 6 Oct 2009 15:06:36 +0000 (16:06 +0100)]
usb_serial: Use the shutdown() operation
As Alan Stern pointed out - now we have tty_port_open the shutdown method
and locking allow us to whack the other bits into the full helper methods
and provide a shutdown op which the tty port code will synchronize with
setup for us.
Signed-off-by: Alan Cox <alan@linux.intel.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Oliver Neukum <oliver@neukum.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Currently there is a field in the jsm_board structure to cont
the number of interrupt that the card recevived, but it's not
working properly when the IRQ line is shared, and also nowhere
else this field is used. So, This patch is removing it.
Actually jsm displays "Device Added" 8 times (for a 8 port device).
This silly patch just makes things more informative, showing
the port (instead of the device) that was added.
Signed-off-by: Breno Leitão <leitao@linux.vnet.ibm.com> Cc: Scott Kilau <scottk@digi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>