]> git.karo-electronics.de Git - mv-sheeva.git/log
mv-sheeva.git
15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
Linus Torvalds [Sun, 28 Dec 2008 20:37:14 +0000 (12:37 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6: (31 commits)
  [CIFS] Remove redundant test
  [CIFS] make sure that DFS pathnames are properly formed
  Remove an already-checked error condition in SendReceiveBlockingLock
  Streamline SendReceiveBlockingLock: Use "goto out:" in an error condition
  Streamline SendReceiveBlockingLock: Use "goto out:" in an error condition
  [CIFS] Streamline SendReceive[2] by using "goto out:" in an error condition
  Slightly streamline SendReceive[2]
  Check the return value of cifs_sign_smb[2]
  [CIFS] Cleanup: Move the check for too large R/W requests
  [CIFS] Slightly simplify wait_for_free_request(), remove an unnecessary "else" branch
  Simplify allocate_mid() slightly: Remove some unnecessary "else" branches
  [CIFS] In SendReceive, move consistency check out of the mutexed region
  cifs: store password in tcon
  cifs: have calc_lanman_hash take more granular args
  cifs: zero out session password before freeing it
  cifs: fix wait_for_response to time out sleeping processes correctly
  [CIFS] Can not mount with prefixpath if root directory of share is inaccessible
  [CIFS] various minor cleanups pointed out by checkpatch script
  [CIFS] fix typo
  [CIFS] remove sparse warning
  ...

Fix trivial conflict in fs/cifs/cifs_fs_sb.h due to comment changes for
the CIFS_MOUNT_xyz bit definitions between cifs updates and security
updates.

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
Linus Torvalds [Sun, 28 Dec 2008 20:33:59 +0000 (12:33 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: (26 commits)
  IB/mlx4: Set ownership bit correctly when copying CQEs during CQ resize
  RDMA/nes: Remove tx_free_list
  RDMA/cma: Add IPv6 support
  RDMA/addr: Add support for translating IPv6 addresses
  mlx4_core: Delete incorrect comment
  mlx4_core: Add support for multiple completion event vectors
  IB/iser: Avoid recv buffer exhaustion caused by unexpected PDUs
  IB/ehca: Remove redundant test of vpage
  IB/ehca: Replace modulus operations in flush error completion path
  IB/ipath: Add locking for interrupt use of ipath_pd contexts vs free
  IB/ipath: Fix spi_pioindex value
  IB/ipath: Only do 1X workaround on rev1 chips
  IB/ipath: Don't count IB symbol and link errors unless link is UP
  IB/ipath: Check return value of dma_map_single()
  IB/ipath: Fix PSN of send WQEs after an RDMA read resend
  RDMA/nes: Cleanup warnings
  RDMA/nes: Add loopback check to make_cm_node()
  RDMA/nes: Check cqp_avail_reqs is empty after locking the list
  RDMA/nes: Fix TCP compliance test failures
  RDMA/nes: Forward packets for a new connection with stale APBVT entry
  ...

15 years agoMerge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
Linus Torvalds [Sun, 28 Dec 2008 20:33:21 +0000 (12:33 -0800)]
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: (85 commits)
  [S390] provide documentation for hvc_iucv kernel parameter.
  [S390] convert ctcm printks to dev_xxx and pr_xxx macros.
  [S390] convert zfcp printks to pr_xxx macros.
  [S390] convert vmlogrdr printks to pr_xxx macros.
  [S390] convert zfcp dumper printks to pr_xxx macros.
  [S390] convert cpu related printks to pr_xxx macros.
  [S390] convert qeth printks to dev_xxx and pr_xxx macros.
  [S390] convert sclp printks to pr_xxx macros.
  [S390] convert iucv printks to dev_xxx and pr_xxx macros.
  [S390] convert ap_bus printks to pr_xxx macros.
  [S390] convert dcssblk and extmem printks messages to pr_xxx macros.
  [S390] convert monwriter printks to pr_xxx macros.
  [S390] convert s390 debug feature printks to pr_xxx macros.
  [S390] convert monreader printks to pr_xxx macros.
  [S390] convert appldata printks to pr_xxx macros.
  [S390] convert setup printks to pr_xxx macros.
  [S390] convert hypfs printks to pr_xxx macros.
  [S390] convert time printks to pr_xxx macros.
  [S390] convert cpacf printks to pr_xxx macros.
  [S390] convert cio printks to pr_xxx macros.
  ...

15 years agoMerge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 28 Dec 2008 20:27:58 +0000 (12:27 -0800)]
Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (31 commits)
  sched: fix warning in fs/proc/base.c
  schedstat: consolidate per-task cpu runtime stats
  sched: use RCU variant of list traversal in for_each_leaf_rt_rq()
  sched, cpuacct: export percpu cpuacct cgroup stats
  sched, cpuacct: refactoring cpuusage_read / cpuusage_write
  sched: optimize update_curr()
  sched: fix wakeup preemption clock
  sched: add missing arch_update_cpu_topology() call
  sched: let arch_update_cpu_topology indicate if topology changed
  sched: idle_balance() does not call load_balance_newidle()
  sched: fix sd_parent_degenerate on non-numa smp machine
  sched: add uid information to sched_debug for CONFIG_USER_SCHED
  sched: move double_unlock_balance() higher
  sched: update comment for move_task_off_dead_cpu
  sched: fix inconsistency when redistribute per-cpu tg->cfs_rq shares
  sched/rt: removed unneeded defintion
  sched: add hierarchical accounting to cpu accounting controller
  sched: include group statistics in /proc/sched_debug
  sched: rename SCHED_NO_NO_OMIT_FRAME_POINTER => SCHED_OMIT_FRAME_POINTER
  sched: clean up SCHED_CPUMASK_ALLOC
  ...

15 years agoMerge branch 'tracing-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 28 Dec 2008 20:21:10 +0000 (12:21 -0800)]
Merge branch 'tracing-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'tracing-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (241 commits)
  sched, trace: update trace_sched_wakeup()
  tracing/ftrace: don't trace on early stage of a secondary cpu boot, v3
  Revert "x86: disable X86_PTRACE_BTS"
  ring-buffer: prevent false positive warning
  ring-buffer: fix dangling commit race
  ftrace: enable format arguments checking
  x86, bts: memory accounting
  x86, bts: add fork and exit handling
  ftrace: introduce tracing_reset_online_cpus() helper
  tracing: fix warnings in kernel/trace/trace_sched_switch.c
  tracing: fix warning in kernel/trace/trace.c
  tracing/ring-buffer: remove unused ring_buffer size
  trace: fix task state printout
  ftrace: add not to regex on filtering functions
  trace: better use of stack_trace_enabled for boot up code
  trace: add a way to enable or disable the stack tracer
  x86: entry_64 - introduce FTRACE_ frame macro v2
  tracing/ftrace: add the printk-msg-only option
  tracing/ftrace: use preempt_enable_no_resched_notrace in ring_buffer_time_stamp()
  x86, bts: correctly report invalid bts records
  ...

Fixed up trivial conflict in scripts/recordmcount.pl due to SH bits
being already partly merged by the SH merge.

15 years agoMerge branch 'x86-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 28 Dec 2008 20:07:57 +0000 (12:07 -0800)]
Merge branch 'x86-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (246 commits)
  x86: traps.c replace #if CONFIG_X86_32 with #ifdef CONFIG_X86_32
  x86: PAT: fix address types in track_pfn_vma_new()
  x86: prioritize the FPU traps for the error code
  x86: PAT: pfnmap documentation update changes
  x86: PAT: move track untrack pfnmap stubs to asm-generic
  x86: PAT: remove follow_pfnmap_pte in favor of follow_phys
  x86: PAT: modify follow_phys to return phys_addr prot and return value
  x86: PAT: clarify is_linear_pfn_mapping() interface
  x86: ia32_signal: remove unnecessary declaration
  x86: common.c boot_cpu_stack and boot_exception_stacks should be static
  x86: fix intel x86_64 llc_shared_map/cpu_llc_id anomolies
  x86: fix warning in arch/x86/kernel/microcode_amd.c
  x86: ia32.h: remove unused struct sigfram32 and rt_sigframe32
  x86: asm-offset_64: use rt_sigframe_ia32
  x86: sigframe.h: include headers for dependency
  x86: traps.c declare functions before they get used
  x86: PAT: update documentation to cover pgprot and remap_pfn related changes - v3
  x86: PAT: add pgprot_writecombine() interface for drivers - v3
  x86: PAT: change pgprot_noncached to uc_minus instead of strong uc - v3
  x86: PAT: implement track/untrack of pfnmap regions for x86 - v3
  ...

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
Linus Torvalds [Sun, 28 Dec 2008 19:43:54 +0000 (11:43 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6: (105 commits)
  SELinux: don't check permissions for kernel mounts
  security: pass mount flags to security_sb_kern_mount()
  SELinux: correctly detect proc filesystems of the form "proc/foo"
  Audit: Log TIOCSTI
  user namespaces: document CFS behavior
  user namespaces: require cap_set{ug}id for CLONE_NEWUSER
  user namespaces: let user_ns be cloned with fairsched
  CRED: fix sparse warnings
  User namespaces: use the current_user_ns() macro
  User namespaces: set of cleanups (v2)
  nfsctl: add headers for credentials
  coda: fix creds reference
  capabilities: define get_vfs_caps_from_disk when file caps are not enabled
  CRED: Allow kernel services to override LSM settings for task actions
  CRED: Add a kernel_service object class to SELinux
  CRED: Differentiate objective and effective subjective credentials on a task
  CRED: Documentation
  CRED: Use creds in file structs
  CRED: Prettify commoncap.c
  CRED: Make execve() take advantage of copy-on-write credentials
  ...

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Linus Torvalds [Sun, 28 Dec 2008 19:43:22 +0000 (11:43 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (57 commits)
  crypto: aes - Precompute tables
  crypto: talitos - Ack done interrupt in isr instead of tasklet
  crypto: testmgr - Correct comment about deflate parameters
  crypto: salsa20 - Remove private wrappers around various operations
  crypto: des3_ede - permit weak keys unless REQ_WEAK_KEY set
  crypto: sha512 - Switch to shash
  crypto: sha512 - Move message schedule W[80] to static percpu area
  crypto: michael_mic - Switch to shash
  crypto: wp512 - Switch to shash
  crypto: tgr192 - Switch to shash
  crypto: sha256 - Switch to shash
  crypto: md5 - Switch to shash
  crypto: md4 - Switch to shash
  crypto: sha1 - Switch to shash
  crypto: rmd320 - Switch to shash
  crypto: rmd256 - Switch to shash
  crypto: rmd160 - Switch to shash
  crypto: rmd128 - Switch to shash
  crypto: null - Switch to shash
  crypto: hash - Make setkey optional
  ...

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Sun, 28 Dec 2008 19:41:32 +0000 (11:41 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (367 commits)
  ALSA: ASoC: fix a typo in omp-pcm.c
  ASoC: Fix DSP formats in SSM2602 audio codec
  ASoC: Fix incorrect DSP format in OMAP McBSP DAI and affected drivers
  ALSA: hda: fix incorrect mixer index values for 92hd83xx
  ALSA: hda: dinput_mux check
  ALSA: hda - Add quirk for another HP dv7
  ALSA: ASoC - Add missing __devexit annotation to wm8350.c
  ALSA: ASoc: DaVinci: davinci-evm use dsp_b mode
  ALSA: ASoC: DaVinci: i2s, evm, pass same value to codec and cpu_dai
  ALSA: ASoC: tlv320aic3x add dsp_a
  ALSA: ASoC: DaVinci: document I2S limitations
  ALSA: ASoC: DaVinci: davinci-i2s clean up
  ALSA: ASoC: DaVinci: davinci-i2s clean up
  ALSA: ASoC: DaVinci: davinci-i2s add comments to explain polarity
  ALSA: ASoC: DaVinci: davinvi-evm, make requests explicit
  ALSA: ca0106 - disable 44.1kHz capture
  ALSA: ca0106 - Add missing card->private_data initialization
  ALSA: ca0106 - Check ac97 availability at PM
  ALSA: hda - Power up always when no jack detection is available
  ALSA: hda - Fix unused variable warnings in patch_sigmatel.c
  ...

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
Linus Torvalds [Sun, 28 Dec 2008 19:39:19 +0000 (11:39 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (132 commits)
  sh: oprofile: Fix up the module build.
  sh: add UIO support for JPU on SH7722.
  serial: sh-sci: Fix up port pinmux for SH7366.
  sh: mach-rsk: Use uImage generation by default for rsk7201/7203.
  sh: mach-sh03: Fix up pata_platform build breakage.
  sh: enable deferred io LCDC on Migo-R
  video: sh_mobile_lcdcfb deferred io support
  video: deferred io with physically contiguous memory
  video: deferred io cleanup
  video: fix deferred io fsync()
  sh: add LCDC interrupt configuration to AP325 and Migo-R
  sh_mobile_lcdc: use FB_SYS helpers instead of FB_CFB
  sh: split coherent pages
  sh: dma: Kill off ISA DMA wrapper.
  sh: Conditionalize the code dumper on CONFIG_DUMP_CODE.
  sh: Kill off the unused SH_ALPHANUMERIC debug option.
  sh: Enable skipping of bss on debug platforms for sh32 also.
  doc: Update sh cpufreq documentation.
  sh: mrshpc_setup_windows() needs to be inline.
  serial: sh-sci: sci_poll_get_char() is only used by CONFIG_CONSOLE_POLL.
  ...

15 years ago[CIFS] Remove redundant test
Julia Lawall [Mon, 22 Dec 2008 21:53:40 +0000 (21:53 +0000)]
[CIFS] Remove redundant test

In fs/cifs/cifssmb.c, pLockData is tested for being NULL at the beginning
of the function, and not reassigned subsequently.

A simplified version of the semantic patch that makes this change is as
follows: (http://www.emn.fr/x-info/coccinelle/)

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years ago[CIFS] make sure that DFS pathnames are properly formed
Steve French [Thu, 18 Dec 2008 01:41:20 +0000 (01:41 +0000)]
[CIFS] make sure that DFS pathnames are properly formed

The paths in a DFS request are supposed to only have a single preceding
backslash, but we are sending them with a double backslash. This is
exposing a bug in Windows where it also sends a path in the response
that has a double backslash.

The existing code that builds the mount option string however expects a
double backslash prefix in a couple of places when it tries to use the
path returned by build_path_from_dentry. Fix compose_mount_options to
expect properly formed DFS paths (single backslash at front).

Also clean up error handling in that function. There was a possible
NULL pointer dereference and situations where a partially built option
string would be returned.

Tested against Samba 3.0.28-ish server and Samba 3.3 and Win2k8.

CC: Stable <stable@kernel.org>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years agoRemove an already-checked error condition in SendReceiveBlockingLock
Volker Lendecke [Sat, 6 Dec 2008 15:40:40 +0000 (16:40 +0100)]
Remove an already-checked error condition in SendReceiveBlockingLock

Remove an already-checked error condition in SendReceiveBlockingLock

Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years agoStreamline SendReceiveBlockingLock: Use "goto out:" in an error condition
Volker Lendecke [Sat, 6 Dec 2008 15:39:31 +0000 (16:39 +0100)]
Streamline SendReceiveBlockingLock: Use "goto out:" in an error condition

Streamline SendReceiveBlockingLock: Use "goto out:" in an error condition

Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years agoStreamline SendReceiveBlockingLock: Use "goto out:" in an error condition
Volker Lendecke [Sat, 6 Dec 2008 15:38:19 +0000 (16:38 +0100)]
Streamline SendReceiveBlockingLock: Use "goto out:" in an error condition

Streamline SendReceiveBlockingLock: Use "goto out:" in an error condition

Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years ago[CIFS] Streamline SendReceive[2] by using "goto out:" in an error condition
Steve French [Thu, 11 Dec 2008 17:26:54 +0000 (17:26 +0000)]
[CIFS] Streamline SendReceive[2] by using "goto out:" in an error condition

Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years agoSlightly streamline SendReceive[2]
Volker Lendecke [Sat, 6 Dec 2008 15:22:15 +0000 (16:22 +0100)]
Slightly streamline SendReceive[2]

Slightly streamline SendReceive[2]

Remove an else branch by naming the error condition what it is

Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years agoCheck the return value of cifs_sign_smb[2]
Volker Lendecke [Sat, 6 Dec 2008 15:00:53 +0000 (16:00 +0100)]
Check the return value of cifs_sign_smb[2]

Check the return value of cifs_sign_smb[2]

Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years ago[CIFS] Cleanup: Move the check for too large R/W requests
Steve French [Tue, 9 Dec 2008 00:28:16 +0000 (00:28 +0000)]
[CIFS] Cleanup: Move the check for too large R/W requests

This avoids an unnecessary else branch

Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years ago[CIFS] Slightly simplify wait_for_free_request(), remove an unnecessary "else" branch
Volker Lendecke [Mon, 8 Dec 2008 20:59:39 +0000 (20:59 +0000)]
[CIFS] Slightly simplify wait_for_free_request(), remove an unnecessary "else" branch

This is no functional change, because in the "if" branch we do an early
"return 0;".

Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years agoSimplify allocate_mid() slightly: Remove some unnecessary "else" branches
Volker Lendecke [Sat, 6 Dec 2008 12:12:34 +0000 (13:12 +0100)]
Simplify allocate_mid() slightly: Remove some unnecessary "else" branches

Simplify allocate_mid() slightly: Remove some unnecessary "else" branches

Signed-off-by: Volker Lendecke <vl@samba.org>
Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years ago[CIFS] In SendReceive, move consistency check out of the mutexed region
Volker Lendecke [Mon, 8 Dec 2008 20:50:24 +0000 (20:50 +0000)]
[CIFS] In SendReceive, move consistency check out of the mutexed region

inbuf->smb_buf_length does not change in in wait_for_free_request() or in
allocate_mid(), so we can check it early.

Signed-off-by: Volker Lendecke <vl@samba.org>
Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years agocifs: store password in tcon
Jeff Layton [Sat, 6 Dec 2008 01:41:21 +0000 (20:41 -0500)]
cifs: store password in tcon

cifs: store password in tcon

Each tcon has its own password for share-level security. Store it in
the tcon and wipe it clean and free it when freeing the tcon. When
doing the tree connect with share-level security, use the tcon password
instead of the session password.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years agocifs: have calc_lanman_hash take more granular args
Jeff Layton [Sat, 6 Dec 2008 01:41:21 +0000 (20:41 -0500)]
cifs: have calc_lanman_hash take more granular args

cifs: have calc_lanman_hash take more granular args

We need to use this routine to encrypt passwords associated with the
tcon too. Don't assume that the password will be attached to the
smb_session.

Also, make some of the values in the lower encryption functions
const since they aren't changed.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years agocifs: zero out session password before freeing it
Jeff Layton [Sat, 6 Dec 2008 01:41:21 +0000 (20:41 -0500)]
cifs: zero out session password before freeing it

cifs: zero out session password before freeing it

...just to be on the safe side.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years agocifs: fix wait_for_response to time out sleeping processes correctly
Jeff Layton [Sat, 6 Dec 2008 01:41:21 +0000 (20:41 -0500)]
cifs: fix wait_for_response to time out sleeping processes correctly

cifs: fix wait_for_response to time out sleeping processes correctly

The current scheme that CIFS uses to sleep and wait for a response is
not quite what we want. After sending a request, wait_for_response puts
the task to sleep with wait_event(). One of the conditions for
wait_event is a timeout (using time_after()).

The problem with this is that there is no guarantee that the process
will ever be woken back up. If the server stops sending data, then
cifs_demultiplex_thread will leave its response queue sleeping.

I think the only thing that saves us here is the fact that
cifs_dnotify_thread periodically (every 15s) wakes up sleeping processes
on all response_q's that have calls in flight.  This makes for
unnecessary wakeups of some processes. It also means large variability
in the timeouts since they're all woken up at once.

Instead of this, put the tasks to sleep with wait_event_timeout. This
makes them wake up on their own if they time out. With this change,
cifs_dnotify_thread should no longer be needed.

I've been testing this in conjunction with some other patches that I'm
working on. It doesn't seem to affect performance at all with with heavy
I/O. Identical iozone -ac runs complete in almost exactly the same time
(<1% difference in times).

Thanks to Wasrshi Nimara for initially pointing this out. Wasrshi, it
would be nice to know whether this patch also helps your testcase.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Cc: Wasrshi Nimara <warshinimara@gmail.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years ago[CIFS] Can not mount with prefixpath if root directory of share is inaccessible
Steve French [Fri, 5 Dec 2008 19:14:12 +0000 (19:14 +0000)]
[CIFS] Can not mount with prefixpath if root directory of share is inaccessible

Windows allows you to deny access to the top of a share, but permit access to
a directory lower in the path.  With the prefixpath feature of cifs
(ie mounting \\server\share\directory\subdirectory\etc.) this should have
worked if the user specified a prefixpath which put the root of the mount
at a directory to which he had access, but we still were doing a lookup
on the root of the share (null path) when we should have been doing it on
the prefixpath subdirectory.

This fixes Samba bug # 5925

Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years ago[CIFS] various minor cleanups pointed out by checkpatch script
Steve French [Wed, 3 Dec 2008 00:57:54 +0000 (00:57 +0000)]
[CIFS] various minor cleanups pointed out by checkpatch script

Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years ago[CIFS] fix typo
Steve French [Tue, 2 Dec 2008 20:52:28 +0000 (20:52 +0000)]
[CIFS] fix typo

Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years ago[CIFS] remove sparse warning
Steve French [Tue, 2 Dec 2008 18:53:55 +0000 (18:53 +0000)]
[CIFS] remove sparse warning

Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years ago[CIFS] add mount option to send mandatory rather than advisory locks
Steve French [Tue, 2 Dec 2008 17:24:33 +0000 (17:24 +0000)]
[CIFS] add mount option to send mandatory rather than advisory locks

Some applications/subsystems require mandatory byte range locks
(as is used for Windows/DOS/OS2 etc). Sending advisory (posix style)
byte range lock requests (instead of mandatory byte range locks) can
lead to problems for these applications (which expect that other
clients be prevented from writing to portions of the file which
they have locked and are updating).  This mount option allows
mounting cifs with the new mount option "forcemand" (or
"forcemandatorylock") in order to have the cifs client use mandatory
byte range locks (ie SMB/CIFS/Windows/NTFS style locks) rather than
posix byte range lock requests, even if the server would support
posix byte range lock requests.  This has no effect if the server
does not support the CIFS Unix Extensions (since posix style locks
require support for the CIFS Unix Extensions), but for mounts
to Samba servers this can be helpful for Wine and applications
that require mandatory byte range locks.

Acked-by: Jeff Layton <jlayton@redhat.com>
CC: Alexander Bokovoy <ab@samba.org>
Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years agocifs: make ipv6_connect take a TCP_Server_Info arg
Jeff Layton [Mon, 1 Dec 2008 23:42:33 +0000 (18:42 -0500)]
cifs: make ipv6_connect take a TCP_Server_Info arg

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years agocifs: make ipv4_connect take a TCP_Server_Info arg
Jeff Layton [Mon, 1 Dec 2008 23:42:15 +0000 (18:42 -0500)]
cifs: make ipv4_connect take a TCP_Server_Info arg

In order to unify the smb_send routines, we need to reorganize the
routines that connect the sockets. Have ipv4_connect take a
TCP_Server_Info pointer and get the necessary fields from that.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years agocifs: don't declare smb_vol info on the stack
Jeff Layton [Mon, 1 Dec 2008 23:41:49 +0000 (18:41 -0500)]
cifs: don't declare smb_vol info on the stack

struct smb_vol is fairly large, it's probably best to kzalloc it...

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years agocifs: move allocation of new TCP_Server_Info into separate function
Jeff Layton [Mon, 1 Dec 2008 23:41:46 +0000 (18:41 -0500)]
cifs: move allocation of new TCP_Server_Info into separate function

Clean up cifs_mount a bit by moving the code that creates new TCP
sessions into a separate function. Have that function search for an
existing socket and then create a new one if one isn't found.

Also reorganize the initializion of TCP_Server_Info a bit to prepare
for cleanup of the socket connection code.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years agocifs: account for IPv6 in ses->serverName and clean up netbios name handling
Jeff Layton [Mon, 1 Dec 2008 20:23:50 +0000 (15:23 -0500)]
cifs: account for IPv6 in ses->serverName and clean up netbios name handling

The current code for setting the session serverName is IPv4-specific.
Allow it to be an IPv6 address as well. Use NIP* macros to set the
format.

This also entails increasing the length of the serverName field, so
declare a new macro for RFC1001 name length and use it in the
appropriate places.

Finally, drop the unicode_server_Name field from TCP_Server_Info since
it's not used. We can add it back later if needed, but for now it just
wastes memory.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years agocifs: make dnotify thread experimental code
Jeff Layton [Mon, 1 Dec 2008 20:23:50 +0000 (15:23 -0500)]
cifs: make dnotify thread experimental code

Now that tasks sleeping in wait_for_response will time out on their own,
we're not reliant on the dnotify thread to do this. Mark it as
experimental code for now.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years agocifs: convert tcpSem to a mutex
Jeff Layton [Mon, 1 Dec 2008 12:09:36 +0000 (07:09 -0500)]
cifs: convert tcpSem to a mutex

Mutexes are preferred for single-holder semaphores...

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years agocifs: take module reference when starting cifsd
Jeff Layton [Mon, 1 Dec 2008 12:09:35 +0000 (07:09 -0500)]
cifs: take module reference when starting cifsd

cifsd can outlive the last cifs mount. We need to hold a module
reference until it exits to prevent someone from unplugging
the module until we're ready.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years agocifs: display addr and prefixpath options in /proc/mounts
Jeff Layton [Mon, 1 Dec 2008 12:09:35 +0000 (07:09 -0500)]
cifs: display addr and prefixpath options in /proc/mounts

Have cifs_show_options display the addr and prefixpath options in
/proc/mounts. Reduce struct dereferencing by adding some local
variables.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years agocifs: remove unused SMB session pointer from struct mid_q_entry
Jeff Layton [Mon, 1 Dec 2008 12:09:34 +0000 (07:09 -0500)]
cifs: remove unused SMB session pointer from struct mid_q_entry

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years agoMerge branch 'sched/urgent'; commit 'v2.6.28' into sched/core
Ingo Molnar [Thu, 25 Dec 2008 12:42:23 +0000 (13:42 +0100)]
Merge branch 'sched/urgent'; commit 'v2.6.28' into sched/core

15 years ago[S390] provide documentation for hvc_iucv kernel parameter.
Hendrik Brueckner [Thu, 25 Dec 2008 12:39:55 +0000 (13:39 +0100)]
[S390] provide documentation for hvc_iucv kernel parameter.

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] convert ctcm printks to dev_xxx and pr_xxx macros.
Peter Tiedemann [Thu, 25 Dec 2008 12:39:54 +0000 (13:39 +0100)]
[S390] convert ctcm printks to dev_xxx and pr_xxx macros.

Signed-off-by: Peter Tiedemann <ptiedem@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] convert zfcp printks to pr_xxx macros.
Christof Schmitt [Thu, 25 Dec 2008 12:39:53 +0000 (13:39 +0100)]
[S390] convert zfcp printks to pr_xxx macros.

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] convert vmlogrdr printks to pr_xxx macros.
Martin Schwidefsky [Thu, 25 Dec 2008 12:39:52 +0000 (13:39 +0100)]
[S390] convert vmlogrdr printks to pr_xxx macros.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] convert zfcp dumper printks to pr_xxx macros.
Michael Holzheu [Thu, 25 Dec 2008 12:39:51 +0000 (13:39 +0100)]
[S390] convert zfcp dumper printks to pr_xxx macros.

Signed-off-by: Michael Holzheu <holzheu@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] convert cpu related printks to pr_xxx macros.
Martin Schwidefsky [Thu, 25 Dec 2008 12:39:50 +0000 (13:39 +0100)]
[S390] convert cpu related printks to pr_xxx macros.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] convert qeth printks to dev_xxx and pr_xxx macros.
Frank Blaschka [Thu, 25 Dec 2008 12:39:49 +0000 (13:39 +0100)]
[S390] convert qeth printks to dev_xxx and pr_xxx macros.

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] convert sclp printks to pr_xxx macros.
Martin Schwidefsky [Thu, 25 Dec 2008 12:39:48 +0000 (13:39 +0100)]
[S390] convert sclp printks to pr_xxx macros.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] convert iucv printks to dev_xxx and pr_xxx macros.
Ursula Braun [Thu, 25 Dec 2008 12:39:47 +0000 (13:39 +0100)]
[S390] convert iucv printks to dev_xxx and pr_xxx macros.

Signed-off-by: Ursula Braun <braunu@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] convert ap_bus printks to pr_xxx macros.
Martin Schwidefsky [Thu, 25 Dec 2008 12:39:46 +0000 (13:39 +0100)]
[S390] convert ap_bus printks to pr_xxx macros.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] convert dcssblk and extmem printks messages to pr_xxx macros.
Hongjie Yang [Thu, 25 Dec 2008 12:39:45 +0000 (13:39 +0100)]
[S390] convert dcssblk and extmem printks messages to pr_xxx macros.

Signed-off-by: Hongjie Yang <hongjie@us.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] convert monwriter printks to pr_xxx macros.
Melissa Howland [Thu, 25 Dec 2008 12:39:44 +0000 (13:39 +0100)]
[S390] convert monwriter printks to pr_xxx macros.

Signed-off-by: Melissa Howland <melissah@us.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] convert s390 debug feature printks to pr_xxx macros.
Michael Holzheu [Thu, 25 Dec 2008 12:39:43 +0000 (13:39 +0100)]
[S390] convert s390 debug feature printks to pr_xxx macros.

Signed-off-by: Michael Holzheu <holzheu@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] convert monreader printks to pr_xxx macros.
Gerald Schaefer [Thu, 25 Dec 2008 12:39:42 +0000 (13:39 +0100)]
[S390] convert monreader printks to pr_xxx macros.

Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] convert appldata printks to pr_xxx macros.
Gerald Schaefer [Thu, 25 Dec 2008 12:39:41 +0000 (13:39 +0100)]
[S390] convert appldata printks to pr_xxx macros.

Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] convert setup printks to pr_xxx macros.
Martin Schwidefsky [Thu, 25 Dec 2008 12:39:40 +0000 (13:39 +0100)]
[S390] convert setup printks to pr_xxx macros.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] convert hypfs printks to pr_xxx macros.
Michael Holzheu [Thu, 25 Dec 2008 12:39:39 +0000 (13:39 +0100)]
[S390] convert hypfs printks to pr_xxx macros.

Signed-off-by: Michael Holzheu <holzheu@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] convert time printks to pr_xxx macros.
Martin Schwidefsky [Thu, 25 Dec 2008 12:39:38 +0000 (13:39 +0100)]
[S390] convert time printks to pr_xxx macros.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] convert cpacf printks to pr_xxx macros.
Jan Glauber [Thu, 25 Dec 2008 12:39:37 +0000 (13:39 +0100)]
[S390] convert cpacf printks to pr_xxx macros.

Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] convert cio printks to pr_xxx macros.
Michael Ernst [Thu, 25 Dec 2008 12:39:36 +0000 (13:39 +0100)]
[S390] convert cio printks to pr_xxx macros.

Signed-off-by: Michael Ernst <mernst@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] convert vmur printks to pr_xxx macros.
Frank Munzert [Thu, 25 Dec 2008 12:39:35 +0000 (13:39 +0100)]
[S390] convert vmur printks to pr_xxx macros.

Signed-off-by: Frank Munzert <munzert@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] convert cpcmd printks to pr_xxx macros.
Christian Borntraeger [Thu, 25 Dec 2008 12:39:34 +0000 (13:39 +0100)]
[S390] convert cpcmd printks to pr_xxx macros.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] convert lcs printks to dev_xxx and pr_xxx macros.
Klaus-D. Wacker [Thu, 25 Dec 2008 12:39:33 +0000 (13:39 +0100)]
[S390] convert lcs printks to dev_xxx and pr_xxx macros.

Signed-off-by: Klaus-D. Wacker <kdwacker@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] convert vmcp printks to pr_xxx macros.
Christian Borntraeger [Thu, 25 Dec 2008 12:39:32 +0000 (13:39 +0100)]
[S390] convert vmcp printks to pr_xxx macros.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] convert xpram printks to pr_xxx macros.
Martin Schwidefsky [Thu, 25 Dec 2008 12:39:31 +0000 (13:39 +0100)]
[S390] convert xpram printks to pr_xxx macros.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] s390: Remove redundant test
Julia Lawall [Thu, 25 Dec 2008 12:39:30 +0000 (13:39 +0100)]
[S390] s390: Remove redundant test

The loop above the modified code only terminates when rc is a valid pointer.

A simplified version of the semantic patch that makes this change is as
follows: (http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@r exists@
local idexpression x;
expression E;
position p1,p2;
@@

if (x@p1 == NULL || ...) { ... when forall
   return ...; }
... when != \(x=E\|x--\|x++\|--x\|++x\|x-=E\|x+=E\|x|=E\|x&=E\|&x\)
(
x@p2 == NULL
|
x@p2 != NULL
)

// another path to the test that is not through p1?
@s exists@
local idexpression r.x;
position r.p1,r.p2;
@@

... when != x@p1
(
x@p2 == NULL
|
x@p2 != NULL
)

@fix depends on !s@
position r.p1,r.p2;
expression x,E;
statement S1,S2;
@@

(
- if ((x@p2 != NULL) || ...)
  S1
|
- if ((x@p2 == NULL) && ...) S1
|
- BUG_ON(x@p2 == NULL);
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] s390/setup: set default preferred console device "ttyS"
Hendrik Brueckner [Thu, 25 Dec 2008 12:39:29 +0000 (13:39 +0100)]
[S390] s390/setup: set default preferred console device "ttyS"

This patch sets the default console device for s390.

The console= kernel parameter can be still used to switch the preferred
console to some other device. In that case, console messages are also
printed on the default console device (ttyS0).

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] drivers/s390/crypto: Move dereference to after IS_ERR test
Julia Lawall [Thu, 25 Dec 2008 12:39:28 +0000 (13:39 +0100)]
[S390] drivers/s390/crypto: Move dereference to after IS_ERR test

If reply is ERR_PTR(...), then it should not be dereferenced, so I have
moved the dereference from the declaration to after the IS_ERR test.

The semantic match that finds the problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@match exists@
expression x, E;
identifier fld;
position p1,p2;
@@

(
x = E;
|
x = E
|
x@p1->fld
... when != x = E
IS_ERR(x@p2)
... when any
)

@other_match exists@
expression match.x, E1, E2;
position match.p1,match.p2;
@@

x = E1
... when != x = E2
    when != x@p1
x@p2

@ script:python depends on !other_match@
p1 << match.p1;
p2 << match.p2;
@@

print "* file %s dereference %s test %s" % (p1[0].file,p1[0].line,p2[0].line)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] panic_stack leak in smp_alloc_lowcore
Martin Schwidefsky [Thu, 25 Dec 2008 12:39:27 +0000 (13:39 +0100)]
[S390] panic_stack leak in smp_alloc_lowcore

Fix freeing of the panic_stack if the allocation of async_stack failed.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] clear_table inline assembly contraints
Martin Schwidefsky [Thu, 25 Dec 2008 12:39:26 +0000 (13:39 +0100)]
[S390] clear_table inline assembly contraints

Tell the compile that the clear_table inline assembly writes to the
memory referenced by *s.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] Remove config options.
Martin Schwidefsky [Thu, 25 Dec 2008 12:39:25 +0000 (13:39 +0100)]
[S390] Remove config options.

On s390 we always want to run with precise cputime accounting.
Remove the config options VIRT_TIMER and VIRT_CPU_ACCOUNTING.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] cpu topology: remove dead code
Heiko Carstens [Thu, 25 Dec 2008 12:39:24 +0000 (13:39 +0100)]
[S390] cpu topology: remove dead code

Interrupts haven't been implemented. So remove the dead code.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] cpu topology: introduce kernel parameter
Heiko Carstens [Thu, 25 Dec 2008 12:39:23 +0000 (13:39 +0100)]
[S390] cpu topology: introduce kernel parameter

Introduce a topology=[on|off] kernel parameter which allows to switch
cpu topology on/off. Default will be off, since it looks like that for
some workloards this doesn't behave very well (on s390).

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] add new machine types to setup_hwcaps.
Martin Schwidefsky [Thu, 25 Dec 2008 12:39:22 +0000 (13:39 +0100)]
[S390] add new machine types to setup_hwcaps.

Add the machine types for z9-bc, z10-ec and z10-bc to the elf_platform
detection in setup_hwcaps.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] Remove initial kernel stack backchain initialization.
Heiko Carstens [Thu, 25 Dec 2008 12:39:21 +0000 (13:39 +0100)]
[S390] Remove initial kernel stack backchain initialization.

Early init code clears the backchain of the initial kernel stack frame.
This is not necessary since it is pre initialized with zeros. Plus it
was broken on 64 bit since it cleared only four of eight bytes.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] s390: use the new byteorder headers
Harvey Harrison [Thu, 25 Dec 2008 12:39:20 +0000 (13:39 +0100)]
[S390] s390: use the new byteorder headers

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] Add processor type march=z10 and a processor type safety check.
Martin Schwidefsky [Thu, 25 Dec 2008 12:39:19 +0000 (13:39 +0100)]
[S390] Add processor type march=z10 and a processor type safety check.

This patch adds the code generation option for IBM System z10 and
adds a check in head[31,64].S to prevents the execution of a kernel
compiled for a new processor type on an old machine.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] sclp vt220: fix compile warning
Heiko Carstens [Thu, 25 Dec 2008 12:39:18 +0000 (13:39 +0100)]
[S390] sclp vt220: fix compile warning

get rid of this one:

  CC      drivers/s390/char/sclp_vt220.o
drivers/s390/char/sclp_vt220.c:588: warning: '__sclp_vt220_flush_buffer' defined but not used

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] remove warnings with functions ending in BUG
Martin Schwidefsky [Thu, 25 Dec 2008 12:39:17 +0000 (13:39 +0100)]
[S390] remove warnings with functions ending in BUG

Functions which end in a BUG() statement and skip the return statement
cause compile warnings on s390, e.g.:

mm/bootmem.c: In function 'mark_bootmem':
mm/bootmem.c:321: warning: control reaches end of non-void function

To avoid the warning add an endless loop to the BUG() macro.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] mark disabled_wait as noreturn function
Heiko Carstens [Thu, 25 Dec 2008 12:39:16 +0000 (13:39 +0100)]
[S390] mark disabled_wait as noreturn function

disabled_wait() won't return, so add an __attribute__((noreturn)).
This will remove a false positive finding which our internal code
checker reports.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] cio: use pim to check for multipath.
Sebastian Ott [Thu, 25 Dec 2008 12:39:15 +0000 (13:39 +0100)]
[S390] cio: use pim to check for multipath.

To check if multipath is available we count the bits set in lpm,
which could change over time (via configure [on|off] of a path).

The following patch uses the pim (which is persistent) for this
decision.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] cio: commit all pmcw changes.
Sebastian Ott [Thu, 25 Dec 2008 12:39:14 +0000 (13:39 +0100)]
[S390] cio: commit all pmcw changes.

Sometimes we change the pmcw configuration but don't call msch
to transmit these changes to the channel subsystem.

The patch fixes this by calling cio_commit_config in such cases.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] cio: introduce cio_commit_config
Sebastian Ott [Thu, 25 Dec 2008 12:39:13 +0000 (13:39 +0100)]
[S390] cio: introduce cio_commit_config

To change the configuration of a subchannel we alter the modifiable
bits of the subchannel's schib field and issue a modify subchannel.
There can be the case that not all changes were applied -or worse-
quietly overwritten by the hardware. With the next store subchannel
we obtain the current state of the hardware but lose our target
configuration.

With this patch we introduce a subchannel_config structure which
contains the target subchannel configuration. Additionally the msch
wrapper cio_modify is replaced with cio_commit_config which
copies the desired changes to a temporary schib. msch is then
called with the temporary schib. This schib is only written back
to the subchannel if all changes were applied.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] cio: introduce cio_update_schib
Sebastian Ott [Thu, 25 Dec 2008 12:39:12 +0000 (13:39 +0100)]
[S390] cio: introduce cio_update_schib

There is the chance that we get condition code 0 for a stsch but
the resulting schib is not vaild. In the current code there are
2 cases:
* we do a check for validity of the schib after stsch, but at this
  time we have already stored the invaild schib in the subchannel
  structure. This may lead to problems.
* we don't do a check for validity, which is not that good either.

The patch addresses both issues by introducing the stsch wrapper
cio_update_schib which performs stsch on a local schib. This schib
is only written back to the subchannel if it's valid.

side note: For some functions (chp_events) the return codes are
different now (-ENXIO vs -ENODEV) but this shouldn't do harm
since the caller doesn't check for _specific_ errors.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] cio: Use device_is_registered().
Cornelia Huck [Thu, 25 Dec 2008 12:39:11 +0000 (13:39 +0100)]
[S390] cio: Use device_is_registered().

Check if a ccw device is registered via device_is_registered()
and not via the old kludge of checking the membership in driver
core internal klists.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] cio: Dont call ->release directly.
Cornelia Huck [Thu, 25 Dec 2008 12:39:10 +0000 (13:39 +0100)]
[S390] cio: Dont call ->release directly.

Just put the cdev's reference count to give up our reference.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] cio: Dont fail probe for I/O subchannels.
Cornelia Huck [Thu, 25 Dec 2008 12:39:09 +0000 (13:39 +0100)]
[S390] cio: Dont fail probe for I/O subchannels.

If we fail the probe for an I/O subchannel, we won't be able
to unregister it again since there are no sch_event()
callbacks for unbound subchannels. Just succeed the probe in
any case and schedule unregistering the subchannel.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] cio: Only register ccw_device for registered subchannel.
Cornelia Huck [Thu, 25 Dec 2008 12:39:08 +0000 (13:39 +0100)]
[S390] cio: Only register ccw_device for registered subchannel.

There is a race between io_subchannel_register() and
io_subchannel_sch_event() which may cause a subchannel to be
unregistered because it is no longer operational before
io_subchannel_register() had run. We need to check whether the
subchannel is still registered before the ccw device can be
registered and just bail out if it is not.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] cio: Fix I/O subchannel refcounting.
Cornelia Huck [Thu, 25 Dec 2008 12:39:07 +0000 (13:39 +0100)]
[S390] cio: Fix I/O subchannel refcounting.

Subchannel refcounting was incorrect in some places, especially
a refcount was missing when ccw_device_call_sch_unregister()
was called and the refcount was not correctly switched after
moving devices.

Fix this by establishing the following rules:
- The ccw_device obtains a reference on its parent subchannel
  when dev.parent is set and gives it up in its release
  function. This is needed because we need a parent reference
  for correct refcounting even before the ccw device is (if at
  all) registered.
- When calling device_move(), obtain a reference on the new
  subchannel before moving the ccw device and give up the
  reference on the old parent after moving. This brings the
  refcount in line with the first rule.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] cio: Fix reference counting for online/offline.
Cornelia Huck [Thu, 25 Dec 2008 12:39:06 +0000 (13:39 +0100)]
[S390] cio: Fix reference counting for online/offline.

The current code attempts to get an extra reference count
for online devices by doing a get_device() in ccw_device_online()
and a put_device() in ccw_device_done(). However, this
- incorrectly obtains an extra reference for disconnected
  devices becoming available again (since they are already
  online)
- needs special checks for css_init_done in order to handle
  the console device
- is not obvious and
- may incorretly drop a reference count in ccw_device_done() if
  that function is called after path verification for a device
  that just became not operational.

So let's just get the reference in ccw_device_set_online() and
drop it in ccw_device_set_offline(). (Unfortunately, we still
need the special case in io_subchannel_probe().)

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] cio: Put referernce on correct device after moving.
Cornelia Huck [Thu, 25 Dec 2008 12:39:05 +0000 (13:39 +0100)]
[S390] cio: Put referernce on correct device after moving.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] cio: fix ccwgroup online vs. ungroup race condition
Peter Oberparleiter [Thu, 25 Dec 2008 12:39:04 +0000 (13:39 +0100)]
[S390] cio: fix ccwgroup online vs. ungroup race condition

Ensure atomicity of ungroup operation to prevent concurrent ungroup
and online processing which may lead to use-after-release situations.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] cio: move irritating comment.
Sebastian Ott [Thu, 25 Dec 2008 12:39:03 +0000 (13:39 +0100)]
[S390] cio: move irritating comment.

Due to former patches a comment and device id initialization were
split from the addressed function call in io_subchannel_probe.

Move it back to where it belongs.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] cio: update sac values
Peter Oberparleiter [Thu, 25 Dec 2008 12:39:02 +0000 (13:39 +0100)]
[S390] cio: update sac values

Values for the sac field have changed - update code accordingly.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] cio: get rid of compile warning
Heiko Carstens [Thu, 25 Dec 2008 12:39:01 +0000 (13:39 +0100)]
[S390] cio: get rid of compile warning

Move cio_tpi() to the rest of the CONFIG_CCW_CONSOLE functions to
get rid of this one:

drivers/s390/cio/cio.c:115: warning: 'cio_tpi' defined but not used

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] remove ptrace warning on 31 bit.
Martin Schwidefsky [Thu, 25 Dec 2008 12:39:00 +0000 (13:39 +0100)]
[S390] remove ptrace warning on 31 bit.

A kernel compile on 31 bit gives the following warnings in ptrace.c:

arch/s390/kernel/ptrace.c: In function 'peek_user':
arch/s390/kernel/ptrace.c:207: warning: unused variable 'dummy'
arch/s390/kernel/ptrace.c: In function 'poke_user':
arch/s390/kernel/ptrace.c:315: warning: unused variable 'dummy'

Getting rid of the dummy variables removes the warnings.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] __page_to_pfn warnings
Martin Schwidefsky [Thu, 25 Dec 2008 12:38:59 +0000 (13:38 +0100)]
[S390] __page_to_pfn warnings

For CONFIG_SPARSEMEM_VMEMMAP=y on s390 I get warnings like

init/main.c: In function 'start_kernel':
init/main.c:641: warning: format '%08lx' expects type 'long unsigned int', but argument 2 has type 'int'

The warning can be suppressed with a cast to unsigned long in the
CONFIG_SPARSEMEM_VMEMMAP=y version of __page_to_pfn.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] iucv: Locking free version of iucv_message_(receive|send)
Hendrik Brueckner [Thu, 25 Dec 2008 12:38:58 +0000 (13:38 +0100)]
[S390] iucv: Locking free version of iucv_message_(receive|send)

Provide a locking free version of iucv_message_receive and iucv_message_send
that do not call local_bh_enable in a spin_lock_(bh|irqsave)() context.

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>