]> pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
17 years ago[SPARC64]: Convert PCI over to generic struct iommu/strbuf.
David S. Miller [Fri, 27 Apr 2007 04:08:21 +0000 (21:08 -0700)]
[SPARC64]: Convert PCI over to generic struct iommu/strbuf.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[WIRELESS] cfg80211: Clarify locking comment.
Johannes Berg [Fri, 27 Apr 2007 03:51:12 +0000 (20:51 -0700)]
[WIRELESS] cfg80211: Clarify locking comment.

This patch clarifies the comment about locking in wiphy_unregister.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[WIRELESS] cfg80211: Fix locking in wiphy_new.
Johannes Berg [Fri, 27 Apr 2007 03:50:35 +0000 (20:50 -0700)]
[WIRELESS] cfg80211: Fix locking in wiphy_new.

This patch fixes the locking in wiphy new. Ingo Oeser
<netdev@axxeo.de> noticed that locking in the error case was wrong and
also suggested this fix.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[WEXT] net_device: Don't include wext bits if not required.
Johannes Berg [Fri, 27 Apr 2007 03:48:23 +0000 (20:48 -0700)]
[WEXT] net_device: Don't include wext bits if not required.

This patch makes the wext bits in struct net_device depend on
CONFIG_WIRELESS_EXT.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[WEXT]: Misc code cleanups.
Johannes Berg [Fri, 27 Apr 2007 03:47:25 +0000 (20:47 -0700)]
[WEXT]: Misc code cleanups.

Just a few things that didn't fit in with the other patches.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[WEXT]: Reduce inline abuse.
Johannes Berg [Fri, 27 Apr 2007 03:46:55 +0000 (20:46 -0700)]
[WEXT]: Reduce inline abuse.

This patch removes a bunch of inline abuse from wext. Most functions
that were marked inline are only used once so the compiler will inline
them anyway, others are used multiple times but there's no requirement
for them to be inline since they aren't in any fast paths.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[WEXT]: Move EXPORT_SYMBOL statements where they belong.
Johannes Berg [Fri, 27 Apr 2007 03:46:23 +0000 (20:46 -0700)]
[WEXT]: Move EXPORT_SYMBOL statements where they belong.

EXPORT_SYMBOL statements are supposed to go together with the symbol
they're exporting. This patch moves them accordingly.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[WEXT]: Cleanup early ioctl call path.
Johannes Berg [Fri, 27 Apr 2007 03:45:47 +0000 (20:45 -0700)]
[WEXT]: Cleanup early ioctl call path.

This patch makes the code in wireless_process_ioctl somewhat more
readable.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[WEXT]: Remove options.
Johannes Berg [Fri, 27 Apr 2007 03:45:14 +0000 (20:45 -0700)]
[WEXT]: Remove options.

This patch kills the two options in wext that are required to be
enabled anyway because they influence the userspace API.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[WEXT]: Remove dead debug code.
Johannes Berg [Fri, 27 Apr 2007 03:44:35 +0000 (20:44 -0700)]
[WEXT]: Remove dead debug code.

This patch kills a whole bunch of code that can only ever be used by
defining some things in wext.c. Also, the things that are printed are
mostly useless since the API is fairly well-tested.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[WEXT]: Clean up how wext is called.
Johannes Berg [Fri, 27 Apr 2007 03:43:56 +0000 (20:43 -0700)]
[WEXT]: Clean up how wext is called.

This patch cleans up the call paths from the core code into wext.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[WEXT]: Move to net/wireless
Johannes Berg [Fri, 27 Apr 2007 03:42:51 +0000 (20:42 -0700)]
[WEXT]: Move to net/wireless

This patch moves dev/core/wireless.c to net/wireless/wext.c.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[AFS]: Eliminate cmpxchg() usage in vlocation code.
David S. Miller [Fri, 27 Apr 2007 03:39:14 +0000 (20:39 -0700)]
[AFS]: Eliminate cmpxchg() usage in vlocation code.

cmpxchg() is not available on every processor so can't
be used in generic code.

Replace with spinlock protection on the ->state changes,
wakeups, and wait loops.

Add what appears to be a missing wakeup on transition
to AFS_VL_VALID state in afs_vlocation_updater().

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[RXRPC]: Fix pointers passed to bitops.
David S. Miller [Fri, 27 Apr 2007 03:20:21 +0000 (20:20 -0700)]
[RXRPC]: Fix pointers passed to bitops.

  CC [M]  net/rxrpc/ar-input.o
net/rxrpc/ar-input.c: In function ‘rxrpc_fast_process_data’:
net/rxrpc/ar-input.c:171: warning: passing argument 2 of ‘__test_and_set_bit’ from incompatible pointer type
net/rxrpc/ar-input.c:180: warning: passing argument 2 of ‘__clear_bit’ from incompatible pointer type
net/rxrpc/ar-input.c:218: warning: passing argument 2 of ‘__clear_bit’ from incompatible pointer type

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[RXRPC]: Remove bogus atomic_* overrides.
David S. Miller [Fri, 27 Apr 2007 03:18:17 +0000 (20:18 -0700)]
[RXRPC]: Remove bogus atomic_* overrides.

These are done with CPP defines which several platforms
use for their atomic.h implementation, which floods the
build with warnings and breaks the build.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[AFS]: Fix u64 printing in debug logging.
David S. Miller [Thu, 26 Apr 2007 23:06:22 +0000 (16:06 -0700)]
[AFS]: Fix u64 printing in debug logging.

Need 'unsigned long long' casts to quiet warnings on
64-bit platforms when using %ll on a u64.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[AFS]: Add "directory write" support.
David Howells [Thu, 26 Apr 2007 22:59:35 +0000 (15:59 -0700)]
[AFS]: Add "directory write" support.

Add support for the create, link, symlink, unlink, mkdir, rmdir and
rename VFS operations to the in-kernel AFS filesystem.

Also:

 (1) Fix dentry and inode revalidation.  d_revalidate should only look at
     state of the dentry.  Revalidation of the contents of an inode pointed to
     by a dentry is now separate.

 (2) Fix afs_lookup() to hash negative dentries as well as positive ones.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[AFS]: Implement the CB.InitCallBackState3 operation.
David Howells [Thu, 26 Apr 2007 22:58:49 +0000 (15:58 -0700)]
[AFS]: Implement the CB.InitCallBackState3 operation.

Implement the CB.InitCallBackState3 operation for the fileserver to
call.  This reduces the amount of network traffic because if this op
is aborted, the fileserver will then attempt an CB.InitCallBackState
operation.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[AFS]: Add support for the CB.GetCapabilities operation.
David Howells [Thu, 26 Apr 2007 22:58:17 +0000 (15:58 -0700)]
[AFS]: Add support for the CB.GetCapabilities operation.

Add support for the CB.GetCapabilities operation with which the fileserver can
ask the client for the following information:

 (1) The list of network interfaces it has available as IPv4 address + netmask
     plus the MTUs.

 (2) The client's UUID.

 (3) The extended capabilities of the client, for which the only current one
     is unified error mapping (abort code interpretation).

To support this, the patch adds the following routines to AFS:

 (1) A function to iterate through all the network interfaces using RTNETLINK
     to extract IPv4 addresses and MTUs.

 (2) A function to iterate through all the network interfaces using RTNETLINK
     to pull out the MAC address of the lowest index interface to use in UUID
     construction.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[AFS]: Update the AFS fs documentation.
David Howells [Thu, 26 Apr 2007 22:57:43 +0000 (15:57 -0700)]
[AFS]: Update the AFS fs documentation.

Update the AFS fs documentation.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[AFS]: Add security support.
David Howells [Thu, 26 Apr 2007 22:57:07 +0000 (15:57 -0700)]
[AFS]: Add security support.

Add security support to the AFS filesystem.  Kerberos IV tickets are added as
RxRPC keys are added to the session keyring with the klog program.  open() and
other VFS operations then find this ticket with request_key() and either use
it immediately (eg: mkdir, unlink) or attach it to a file descriptor (open).

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[AFS]: Handle multiple mounts of an AFS superblock correctly.
David Howells [Thu, 26 Apr 2007 22:56:24 +0000 (15:56 -0700)]
[AFS]: Handle multiple mounts of an AFS superblock correctly.

Handle multiple mounts of an AFS superblock correctly, checking to see
whether the superblock is already initialised after calling sget()
rather than just unconditionally stamping all over it.

Also delete the "silent" parameter to afs_fill_super() as it's not
used and can, in any case, be obtained from sb->s_flags.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[AF_RXRPC]: Delete the old RxRPC code.
David Howells [Thu, 26 Apr 2007 22:55:48 +0000 (15:55 -0700)]
[AF_RXRPC]: Delete the old RxRPC code.

Delete the old RxRPC code as it's now no longer used.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[AF_RXRPC]: Make the in-kernel AFS filesystem use AF_RXRPC.
David Howells [Thu, 26 Apr 2007 22:55:03 +0000 (15:55 -0700)]
[AF_RXRPC]: Make the in-kernel AFS filesystem use AF_RXRPC.

Make the in-kernel AFS filesystem use AF_RXRPC instead of the old RxRPC code.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[AF_RXRPC]: Add an interface to the AF_RXRPC module for the AFS filesystem to use
David Howells [Thu, 26 Apr 2007 22:50:17 +0000 (15:50 -0700)]
[AF_RXRPC]: Add an interface to the AF_RXRPC module for the AFS filesystem to use

Add an interface to the AF_RXRPC module so that the AFS filesystem module can
more easily make use of the services available.  AFS still opens a socket but
then uses the action functions in lieu of sendmsg() and registers an intercept
functions to grab messages before they're queued on the socket Rx queue.

This permits AFS (or whatever) to:

 (1) Avoid the overhead of using the recvmsg() call.

 (2) Use different keys directly on individual client calls on one socket
     rather than having to open a whole slew of sockets, one for each key it
     might want to use.

 (3) Avoid calling request_key() at the point of issue of a call or opening of
     a socket.  This is done instead by AFS at the point of open(), unlink() or
     other VFS operation and the key handed through.

 (4) Request the use of something other than GFP_KERNEL to allocate memory.

Furthermore:

 (*) The socket buffer markings used by RxRPC are made available for AFS so
     that it can interpret the cooked RxRPC messages itself.

 (*) rxgen (un)marshalling abort codes are made available.

The following documentation for the kernel interface is added to
Documentation/networking/rxrpc.txt:

=========================
AF_RXRPC KERNEL INTERFACE
=========================

The AF_RXRPC module also provides an interface for use by in-kernel utilities
such as the AFS filesystem.  This permits such a utility to:

 (1) Use different keys directly on individual client calls on one socket
     rather than having to open a whole slew of sockets, one for each key it
     might want to use.

 (2) Avoid having RxRPC call request_key() at the point of issue of a call or
     opening of a socket.  Instead the utility is responsible for requesting a
     key at the appropriate point.  AFS, for instance, would do this during VFS
     operations such as open() or unlink().  The key is then handed through
     when the call is initiated.

 (3) Request the use of something other than GFP_KERNEL to allocate memory.

 (4) Avoid the overhead of using the recvmsg() call.  RxRPC messages can be
     intercepted before they get put into the socket Rx queue and the socket
     buffers manipulated directly.

To use the RxRPC facility, a kernel utility must still open an AF_RXRPC socket,
bind an addess as appropriate and listen if it's to be a server socket, but
then it passes this to the kernel interface functions.

The kernel interface functions are as follows:

 (*) Begin a new client call.

struct rxrpc_call *
rxrpc_kernel_begin_call(struct socket *sock,
struct sockaddr_rxrpc *srx,
struct key *key,
unsigned long user_call_ID,
gfp_t gfp);

     This allocates the infrastructure to make a new RxRPC call and assigns
     call and connection numbers.  The call will be made on the UDP port that
     the socket is bound to.  The call will go to the destination address of a
     connected client socket unless an alternative is supplied (srx is
     non-NULL).

     If a key is supplied then this will be used to secure the call instead of
     the key bound to the socket with the RXRPC_SECURITY_KEY sockopt.  Calls
     secured in this way will still share connections if at all possible.

     The user_call_ID is equivalent to that supplied to sendmsg() in the
     control data buffer.  It is entirely feasible to use this to point to a
     kernel data structure.

     If this function is successful, an opaque reference to the RxRPC call is
     returned.  The caller now holds a reference on this and it must be
     properly ended.

 (*) End a client call.

void rxrpc_kernel_end_call(struct rxrpc_call *call);

     This is used to end a previously begun call.  The user_call_ID is expunged
     from AF_RXRPC's knowledge and will not be seen again in association with
     the specified call.

 (*) Send data through a call.

int rxrpc_kernel_send_data(struct rxrpc_call *call, struct msghdr *msg,
   size_t len);

     This is used to supply either the request part of a client call or the
     reply part of a server call.  msg.msg_iovlen and msg.msg_iov specify the
     data buffers to be used.  msg_iov may not be NULL and must point
     exclusively to in-kernel virtual addresses.  msg.msg_flags may be given
     MSG_MORE if there will be subsequent data sends for this call.

     The msg must not specify a destination address, control data or any flags
     other than MSG_MORE.  len is the total amount of data to transmit.

 (*) Abort a call.

void rxrpc_kernel_abort_call(struct rxrpc_call *call, u32 abort_code);

     This is used to abort a call if it's still in an abortable state.  The
     abort code specified will be placed in the ABORT message sent.

 (*) Intercept received RxRPC messages.

typedef void (*rxrpc_interceptor_t)(struct sock *sk,
    unsigned long user_call_ID,
    struct sk_buff *skb);

void
rxrpc_kernel_intercept_rx_messages(struct socket *sock,
   rxrpc_interceptor_t interceptor);

     This installs an interceptor function on the specified AF_RXRPC socket.
     All messages that would otherwise wind up in the socket's Rx queue are
     then diverted to this function.  Note that care must be taken to process
     the messages in the right order to maintain DATA message sequentiality.

     The interceptor function itself is provided with the address of the socket
     and handling the incoming message, the ID assigned by the kernel utility
     to the call and the socket buffer containing the message.

     The skb->mark field indicates the type of message:

MARK MEANING
=============================== =======================================
RXRPC_SKB_MARK_DATA Data message
RXRPC_SKB_MARK_FINAL_ACK Final ACK received for an incoming call
RXRPC_SKB_MARK_BUSY Client call rejected as server busy
RXRPC_SKB_MARK_REMOTE_ABORT Call aborted by peer
RXRPC_SKB_MARK_NET_ERROR Network error detected
RXRPC_SKB_MARK_LOCAL_ERROR Local error encountered
RXRPC_SKB_MARK_NEW_CALL New incoming call awaiting acceptance

     The remote abort message can be probed with rxrpc_kernel_get_abort_code().
     The two error messages can be probed with rxrpc_kernel_get_error_number().
     A new call can be accepted with rxrpc_kernel_accept_call().

     Data messages can have their contents extracted with the usual bunch of
     socket buffer manipulation functions.  A data message can be determined to
     be the last one in a sequence with rxrpc_kernel_is_data_last().  When a
     data message has been used up, rxrpc_kernel_data_delivered() should be
     called on it..

     Non-data messages should be handled to rxrpc_kernel_free_skb() to dispose
     of.  It is possible to get extra refs on all types of message for later
     freeing, but this may pin the state of a call until the message is finally
     freed.

 (*) Accept an incoming call.

struct rxrpc_call *
rxrpc_kernel_accept_call(struct socket *sock,
 unsigned long user_call_ID);

     This is used to accept an incoming call and to assign it a call ID.  This
     function is similar to rxrpc_kernel_begin_call() and calls accepted must
     be ended in the same way.

     If this function is successful, an opaque reference to the RxRPC call is
     returned.  The caller now holds a reference on this and it must be
     properly ended.

 (*) Reject an incoming call.

int rxrpc_kernel_reject_call(struct socket *sock);

     This is used to reject the first incoming call on the socket's queue with
     a BUSY message.  -ENODATA is returned if there were no incoming calls.
     Other errors may be returned if the call had been aborted (-ECONNABORTED)
     or had timed out (-ETIME).

 (*) Record the delivery of a data message and free it.

void rxrpc_kernel_data_delivered(struct sk_buff *skb);

     This is used to record a data message as having been delivered and to
     update the ACK state for the call.  The socket buffer will be freed.

 (*) Free a message.

void rxrpc_kernel_free_skb(struct sk_buff *skb);

     This is used to free a non-DATA socket buffer intercepted from an AF_RXRPC
     socket.

 (*) Determine if a data message is the last one on a call.

bool rxrpc_kernel_is_data_last(struct sk_buff *skb);

     This is used to determine if a socket buffer holds the last data message
     to be received for a call (true will be returned if it does, false
     if not).

     The data message will be part of the reply on a client call and the
     request on an incoming call.  In the latter case there will be more
     messages, but in the former case there will not.

 (*) Get the abort code from an abort message.

u32 rxrpc_kernel_get_abort_code(struct sk_buff *skb);

     This is used to extract the abort code from a remote abort message.

 (*) Get the error number from a local or network error message.

int rxrpc_kernel_get_error_number(struct sk_buff *skb);

     This is used to extract the error number from a message indicating either
     a local error occurred or a network error occurred.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[AFS]: Clean up the AFS sources
David Howells [Thu, 26 Apr 2007 22:49:28 +0000 (15:49 -0700)]
[AFS]: Clean up the AFS sources

Clean up the AFS sources.

Also remove references to AFS keys.  RxRPC keys are used instead.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[AF_RXRPC]: Provide secure RxRPC sockets for use by userspace and kernel both
David Howells [Thu, 26 Apr 2007 22:48:28 +0000 (15:48 -0700)]
[AF_RXRPC]: Provide secure RxRPC sockets for use by userspace and kernel both

Provide AF_RXRPC sockets that can be used to talk to AFS servers, or serve
answers to AFS clients.  KerberosIV security is fully supported.  The patches
and some example test programs can be found in:

http://people.redhat.com/~dhowells/rxrpc/

This will eventually replace the old implementation of kernel-only RxRPC
currently resident in net/rxrpc/.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[AF_RXRPC]: Make it possible to merely try to cancel timers from a module
David Howells [Thu, 26 Apr 2007 22:46:56 +0000 (15:46 -0700)]
[AF_RXRPC]: Make it possible to merely try to cancel timers from a module

Export try_to_del_timer_sync() for use by the AF_RXRPC module.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[AF_RXRPC]: Key facility changes for AF_RXRPC
David Howells [Thu, 26 Apr 2007 22:46:23 +0000 (15:46 -0700)]
[AF_RXRPC]: Key facility changes for AF_RXRPC

Export the keyring key type definition and document its availability.

Add alternative types into the key's type_data union to make it more useful.
Not all users necessarily want to use it as a list_head (AF_RXRPC doesn't, for
example), so make it clear that it can be used in other ways.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[WORKQUEUE]: cancel_delayed_work: use del_timer() instead of del_timer_sync()
Oleg Nesterov [Thu, 26 Apr 2007 22:45:32 +0000 (15:45 -0700)]
[WORKQUEUE]: cancel_delayed_work: use del_timer() instead of del_timer_sync()

del_timer_sync() buys nothing for cancel_delayed_work(), but it is less
efficient since it locks the timer unconditionally, and may wait for the
completion of the delayed_work_timer_fn().

cancel_delayed_work() == 0 means:

before this patch:
work->func may still be running or queued

after this patch:
work->func may still be running or queued, or
delayed_work_timer_fn->__queue_work() in progress.

The latter doesn't differ from the caller's POV,
delayed_work_timer_fn() is called with _PENDING
bit set.

cancel_delayed_work() == 1 with this patch adds a new possibility:

delayed_work->work was cancelled, but delayed_work_timer_fn
is still running (this is only possible for the re-arming
works on single-threaded workqueue).

In this case the timer was re-started by work->func(), nobody
else can do this. This in turn means that delayed_work_timer_fn
has already passed __queue_work() (and wont't touch delayed_work)
because nobody else can queue delayed_work->work.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Signed-Off-By: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoocfs2: Cache extent records
Mark Fasheh [Tue, 24 Apr 2007 01:53:12 +0000 (18:53 -0700)]
ocfs2: Cache extent records

The extent map code was ripped out earlier because of an inability to deal
with holes. This patch adds back a simpler caching scheme requiring far less
code.

Our old extent map caching was designed back when meta data block caching in
Ocfs2 didn't work very well, resulting in many disk reads. These days our
metadata caching is much better, resulting in no un-necessary disk reads. As
a result, extent caching doesn't have to be as fancy, nor does it have to
cache as many extents. Keeping the last 3 extents seen should be sufficient
to give us a small performance boost on some streaming workloads.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
17 years agoocfs2: Remember rw lock level during direct io
Mark Fasheh [Tue, 17 Apr 2007 00:28:51 +0000 (17:28 -0700)]
ocfs2: Remember rw lock level during direct io

Cluster locking might have been redone because a direct write won't
complete, so this needs to be reflected in the iocb.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
17 years agoocfs2: Fix up i_blocks calculation to know about holes
Mark Fasheh [Thu, 22 Mar 2007 23:53:23 +0000 (16:53 -0700)]
ocfs2: Fix up i_blocks calculation to know about holes

Older file systems which didn't support holes did a dumb calculation of
i_blocks based on i_size. This is no longer accurate, so fix things up to
take actual allocation into account.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
17 years agoocfs2: Fix extent lookup to return true size of holes
Mark Fasheh [Sat, 10 Mar 2007 00:26:50 +0000 (16:26 -0800)]
ocfs2: Fix extent lookup to return true size of holes

Initially, we had wired things to return a size '1' of holes. Cook up a
small amount of code to find the next extent and calculate the number of
clusters between the virtual offset and the next allocated extent.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
17 years agoocfs2: Read from an unwritten extent returns zeros
Mark Fasheh [Sat, 10 Mar 2007 00:21:46 +0000 (16:21 -0800)]
ocfs2: Read from an unwritten extent returns zeros

Return an optional extent flags field from our lookup functions and wire up
callers to treat unwritten regions as holes for the purpose of returning
zeros to the user.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
17 years agoocfs2: make room for unwritten extents flag
Mark Fasheh [Thu, 8 Mar 2007 00:46:57 +0000 (16:46 -0800)]
ocfs2: make room for unwritten extents flag

Due to the size of our group bitmaps, we'll never have a leaf node extent
record with more than 16 bits worth of clusters. Split e_clusters up so that
leaf nodes can get a flags field where we can mark unwritten extents.
Interior nodes whose length references all the child nodes beneath it can't
split their e_clusters field, so we use a union to preserve sizing there.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
17 years agoocfs2: Use own splice write actor
Mark Fasheh [Wed, 7 Mar 2007 01:24:46 +0000 (17:24 -0800)]
ocfs2: Use own splice write actor

We need to fill holes during a splice write. Provide our own splice write
actor which can call ocfs2_file_buffered_write() with a splice-specific
callback.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
17 years agoocfs2: Use do_sync_mapping_range() in ocfs2_zero_tail_for_truncate()
Mark Fasheh [Thu, 1 Mar 2007 19:22:19 +0000 (11:22 -0800)]
ocfs2: Use do_sync_mapping_range() in ocfs2_zero_tail_for_truncate()

Do this instead of filemap_fdatawrite() - this way we sync only the
range between i_size and the cluster boundary.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
17 years ago[PATCH] Turn do_sync_file_range() into do_sync_mapping_range()
Mark Fasheh [Thu, 1 Mar 2007 19:01:55 +0000 (11:01 -0800)]
[PATCH] Turn do_sync_file_range() into do_sync_mapping_range()

do_sync_file_range() accepts a file * from which it takes an address_space to
sync.  Abstract out the bulk of the function into do_sync_mapping_range()
which takes the address_space directly.  This way callers who want to sync an
address_space directly can take advantage of the functionality provided.

do_sync_file_range() is preserved as a small wrapper around
do_sync_mapping_range().

Ocfs2 in particular would like to use this to initiate a sync of a specific
inode range during truncate, where a file * may not be available.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
17 years agoocfs2: zero tail of sparse files on truncate
Mark Fasheh [Fri, 16 Feb 2007 19:46:50 +0000 (11:46 -0800)]
ocfs2: zero tail of sparse files on truncate

Since we don't zero on extend anymore, truncate needs to be fixed up to zero
the part of a file between i_size and and end of it's cluster. Otherwise a
subsequent extend could expose bad data.

This introduced a new helper, which can be used in ocfs2_write().

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
17 years agoocfs2: Teach ocfs2_get_block() about holes
Mark Fasheh [Wed, 14 Feb 2007 23:30:30 +0000 (15:30 -0800)]
ocfs2: Teach ocfs2_get_block() about holes

ocfs2_get_block() didn't understand sparse files, fix that. Also remove some
code that isn't really useful anymore. We can fix up
ocfs2_direct_IO_get_blocks() at the same time.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
17 years agoocfs2: remove ocfs2_prepare_write() and ocfs2_commit_write()
Mark Fasheh [Sat, 10 Feb 2007 04:52:53 +0000 (20:52 -0800)]
ocfs2: remove ocfs2_prepare_write() and ocfs2_commit_write()

These are no longer used, and can't handle file systems with sparse file
allocation.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
17 years agoocfs2: teach ocfs2_file_aio_write() about sparse files
Mark Fasheh [Sat, 10 Feb 2007 04:24:12 +0000 (20:24 -0800)]
ocfs2: teach ocfs2_file_aio_write() about sparse files

Unfortunately, ocfs2 can no longer make use of generic_file_aio_write_nlock()
because allocating writes will require zeroing of pages adjacent to the I/O
for cluster sizes greater than page size.

Implement a custom file write here, which can order page locks for zeroing.
This also has the advantage that cluster locks can easily be ordered outside
of the page locks.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
17 years agoocfs2: Turn off shared writeable mmap for local files systems with holes.
Mark Fasheh [Wed, 17 Jan 2007 21:10:55 +0000 (13:10 -0800)]
ocfs2: Turn off shared writeable mmap for local files systems with holes.

This will be turned back on once we can do allocation in ->page_mkwrite().

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
17 years agoocfs2: abstract out allocation locking
Mark Fasheh [Wed, 17 Jan 2007 21:07:24 +0000 (13:07 -0800)]
ocfs2: abstract out allocation locking

Right now, file allocation for ocfs2 is done within ocfs2_extend_file(),
which is either called from ->setattr() (for an i_size change), or at the
top of ocfs2_file_aio_write().

Inodes on file systems with sparse file support will want to do their
allocation during the actual write call.

In either case the cluster locking decisions are the same. We abstract out
that code into a new function, ocfs2_lock_allocators() which will be used by
a later patch to enable writing to sparse files.

This also provides a nice cleanup of ocfs2_extend_allocation().

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
17 years agoocfs2: teach extend/truncate about sparse files
Mark Fasheh [Wed, 17 Jan 2007 20:53:31 +0000 (12:53 -0800)]
ocfs2: teach extend/truncate about sparse files

For ocfs2_truncate_file(), we eliminate the "simple" truncate case which no
longer exists since i_size is not tied to i_clusters. In
ocfs2_extend_file(), we skip the allocation / page zeroing code for file
systems which understand sparse files.

The core truncate code is changed to do a bottom up tree traversal. This
gets abstracted out into it's own function. To make things more readable,
most of the special case handling for in-inode extents from
ocfs2_do_truncate() is also removed.

Though write support for sparse files comes in a later patch, we at least
update ocfs2_prepare_inode_for_write() to skip allocation for sparse files.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
17 years agoocfs2: temporarily remove extent map caching
Mark Fasheh [Wed, 17 Jan 2007 20:31:35 +0000 (12:31 -0800)]
ocfs2: temporarily remove extent map caching

The code in extent_map.c is not prepared to deal with a subtree being
rotated between lookups. This can happen when filling holes in sparse files.
Instead of a lengthy patch to update the code (which would likely lose the
benefit of caching subtree roots), we remove most of the algorithms and
implement a simple path based lookup. A less ambitious extent caching scheme
will be added in a later patch.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
17 years agoocfs2: sparse b-tree support
Mark Fasheh [Tue, 16 Jan 2007 19:32:23 +0000 (11:32 -0800)]
ocfs2: sparse b-tree support

Introduce tree rotations into the b-tree code. This will allow ocfs2 to
support sparse files. Much of the added code is designed to be generic (in
the ocfs2 sense) so that it can later be re-used to implement large
extended attributes.

This patch only adds the rotation code and does minimal updates to callers
of the extent api.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
17 years agoocfs2: small cleanup of ocfs2_request_delete()
Mark Fasheh [Wed, 21 Mar 2007 00:17:54 +0000 (17:17 -0700)]
ocfs2: small cleanup of ocfs2_request_delete()

There are two checks in there (one for inode newness, one for other mounted
nodes) which are unnecessary, so remove them. The DLM will allow the trylock
in either case without any messaging overhead.

Removing these makes ocfs2_request_delete() a one liner function, so just
move the trylock out one level into ocfs2_query_inode_wipe().

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
17 years agoocfs2: remove unused code
Tiger Yang [Tue, 20 Mar 2007 23:42:10 +0000 (16:42 -0700)]
ocfs2: remove unused code

Remove node messaging code that becomes unused with the delete inode vote
removal.

[Removed even more cruft which I spotted during review --Mark]

Signed-off-by: Tiger Yang <tiger.yang@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
17 years agoocfs2: Remove delete inode vote
Tiger Yang [Tue, 20 Mar 2007 23:01:38 +0000 (16:01 -0700)]
ocfs2: Remove delete inode vote

Ocfs2 currently does cluster-wide node messaging to check the open state of
an inode during delete. This patch removes that mechanism in favor of an
inode cluster lock which is taken at shared read when an inode is first read
and dropped in clear_inode(). This allows a deleting node to test the
liveness of an inode by attempting to take an exclusive lock.

Signed-off-by: Tiger Yang <tiger.yang@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
17 years ago[XFRM]: Missing bits to SAD info.
Jamal Hadi Salim [Thu, 26 Apr 2007 21:12:15 +0000 (14:12 -0700)]
[XFRM]: Missing bits to SAD info.

This brings the SAD info in sync with net-2.6.22/net-2.6

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoocfs2: filter more error prints
Mark Fasheh [Thu, 26 Apr 2007 18:43:43 +0000 (11:43 -0700)]
ocfs2: filter more error prints

We don't want to print anything at all in ocfs2_lookup() when getting an
error from ocfs2_iget() - it could be something as innocuous as a signal
being detected in the dlm.

ocfs2_permission() should filter on -ENOENT which ocfs2_meta_lock() can
return if the inode was deleted on another node.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
17 years agoocfs2: Replace panic() with emergency_restart() when fencing
Sunil Mushran [Tue, 17 Apr 2007 20:53:38 +0000 (13:53 -0700)]
ocfs2: Replace panic() with emergency_restart() when fencing

We have noticed panic() hanging leading us to a situation in which
the node, while otherwise dead, is still disk heartbeating. This
leads to a hung cluster as the other nodes are waiting for this
node to stop disk heartbeating. This situation is only resolved
by power resetting the box.

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
17 years agoocfs2: Silence compiler warnings
Sunil Mushran [Tue, 17 Apr 2007 20:49:19 +0000 (13:49 -0700)]
ocfs2: Silence compiler warnings

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
17 years agoocfs2: Local mounts should skip inode updates
Mark Fasheh [Wed, 18 Apr 2007 22:22:08 +0000 (15:22 -0700)]
ocfs2: Local mounts should skip inode updates

We don't want the extent map and uptodate cache destruction in
ocfs2_meta_lock_update() on a local mount, so skip that.

This fixes several bugs with uptodate being cleared on buffers and extent
maps being corrupted.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
17 years agoocfs2_dlm: Call cond_resched_lock() once per hash bucket scan
Sunil Mushran [Tue, 17 Apr 2007 20:32:20 +0000 (13:32 -0700)]
ocfs2_dlm: Call cond_resched_lock() once per hash bucket scan

In dlm_migrate_all_locks(), we currently call cond_resched_lock() after
processing each lockres in a hash bucket. Move it outside the loop so as to
call it only after the entire hash bucket has been processed.

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
17 years agoocfs2_dlm: fix race in dlm_remaster_locks
Srinivas Eeda [Tue, 17 Apr 2007 20:26:33 +0000 (13:26 -0700)]
ocfs2_dlm: fix race in dlm_remaster_locks

There is a possibility that dlm_remaster_locks could overwride node->state
with DLM_RECO_NODE_DATA_REQUESTED after dlm_reco_data_done_handler sets the
node->state to DLM_RECO_NODE_DATA_DONE. This could lead to recovery getting
stuck and requires a cluster reboot. Synchronize with dlm_reco_state_lock
spinlock.

Signed-off-by: Srinivas Eeda <srinivas.eeda@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
17 years ago[SPARC]: device_node name constification fallout
Stephen Rothwell [Thu, 26 Apr 2007 07:03:53 +0000 (00:03 -0700)]
[SPARC]: device_node name constification fallout

A couple of routines need their arguments to be const.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC64]: Convert SBUS over to generic iommu/strbuf structs.
David S. Miller [Wed, 25 Apr 2007 22:58:22 +0000 (15:58 -0700)]
[SPARC64]: Convert SBUS over to generic iommu/strbuf structs.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC64]: Add generic iommu and strbuf structs to iommu.h
David S. Miller [Wed, 25 Apr 2007 07:12:09 +0000 (00:12 -0700)]
[SPARC64]: Add generic iommu and strbuf structs to iommu.h

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC64]: Consolidate {sbus,pci}_iommu_arena.
David S. Miller [Wed, 25 Apr 2007 06:51:18 +0000 (23:51 -0700)]
[SPARC64]: Consolidate {sbus,pci}_iommu_arena.

Move to asm-sparc64/iommu.h and rename to plain "iommu_arena".

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC]: Make device_node name and type const
Stephen Rothwell [Thu, 12 Apr 2007 21:38:34 +0000 (14:38 -0700)]
[SPARC]: Make device_node name and type const

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC64]: constify some paramaters of OF routines
Stephen Rothwell [Thu, 29 Mar 2007 18:22:57 +0000 (11:22 -0700)]
[SPARC64]: constify some paramaters of OF routines

This starts bringing the PowerPC and Sparc64 implemetations back closer
together.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[TIGON3]: of_get_property() returns const.
David S. Miller [Thu, 29 Mar 2007 08:57:57 +0000 (01:57 -0700)]
[TIGON3]: of_get_property() returns const.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC64]: Fix PCI rework to adhere to of_get_property() const return.
David S. Miller [Thu, 29 Mar 2007 08:50:16 +0000 (01:50 -0700)]
[SPARC64]: Fix PCI rework to adhere to of_get_property() const return.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC64]: Document and fix calculation of pages_avail.
David S. Miller [Fri, 16 Mar 2007 05:52:18 +0000 (22:52 -0700)]
[SPARC64]: Document and fix calculation of pages_avail.

It should be set to the total number of pages that the
system will really have available after things like
initmem, the bootmem map, and initrd are freed up.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC64]: Make sure pbm->prom_node is setup easly enough in psycho.c
David S. Miller [Fri, 16 Mar 2007 04:44:03 +0000 (21:44 -0700)]
[SPARC64]: Make sure pbm->prom_node is setup easly enough in psycho.c

It needs to be ready before we invoke pci_determine_mem_io_space().

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC64]: Use bootmem_bootmap_pages() in choose_bootmap_pfn().
David S. Miller [Fri, 16 Mar 2007 02:36:53 +0000 (19:36 -0700)]
[SPARC64]: Use bootmem_bootmap_pages() in choose_bootmap_pfn().

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC64]: Add proper header file extern for cmdline_memory_size.
David S. Miller [Fri, 16 Mar 2007 01:29:13 +0000 (18:29 -0700)]
[SPARC64]: Add proper header file extern for cmdline_memory_size.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC64]: Kill sparc_ultra_dump_{i,d}tlb()
David S. Miller [Fri, 16 Mar 2007 01:26:00 +0000 (18:26 -0700)]
[SPARC64]: Kill sparc_ultra_dump_{i,d}tlb()

While useful in odd circumstances to debug something, they are
normally totally unused and anyone can fetch this code out of the
history if they really need it.

And in any event, the person who needs this kind of code is usually me
:-)

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC64]: Use DECLARE_BITMAP and BITS_TO_LONGS in mm/init.c
David S. Miller [Fri, 16 Mar 2007 00:51:26 +0000 (17:51 -0700)]
[SPARC64]: Use DECLARE_BITMAP and BITS_TO_LONGS in mm/init.c

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC64]: Give move verbose show_mem() output just like i386.
David S. Miller [Thu, 15 Mar 2007 23:00:29 +0000 (16:00 -0700)]
[SPARC64]: Give move verbose show_mem() output just like i386.

We now report everything i386 does except for highmem which
doesn't apply.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC64]: Mark show_mem() printk's with KERN_INFO.
David S. Miller [Thu, 15 Mar 2007 22:56:07 +0000 (15:56 -0700)]
[SPARC64]: Mark show_mem() printk's with KERN_INFO.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC64]: Kill kvaddr_to_phys() and friends.
David S. Miller [Thu, 15 Mar 2007 22:50:11 +0000 (15:50 -0700)]
[SPARC64]: Kill kvaddr_to_phys() and friends.

Just inline it into flush_icache_range() which is the only
user.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC64]: Privatize sun4u_get_pte() and fix name.
David S. Miller [Thu, 15 Mar 2007 22:44:05 +0000 (15:44 -0700)]
[SPARC64]: Privatize sun4u_get_pte() and fix name.

__get_phys is only called from init.c as is prom_virt_to_phys(),
__get_iospace() is not called at all, and sun4u_get_pte() is largely
misnamed.

Privatize the implementation and helper functions of
sun4u_get_phys() to mm/init.c, and rename to
kvaddr_to_paddr().

The only used of this thing is flush_icache_range(), and thus
things can be considerably further simplified.  For example,
we should only see module or PAGE_OFFSET kernel addresses here,
so we don't need the OBP firmware range handling at all.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC64]: Kill _start[]/_end[] declarations in mm/init.c
David S. Miller [Thu, 15 Mar 2007 22:09:06 +0000 (15:09 -0700)]
[SPARC64]: Kill _start[]/_end[] declarations in mm/init.c

We already get those from asm/sections.h

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC64]: MAX_PHYSADDR_BITS et al. really need to be 42 bits not 41.
David S. Miller [Thu, 15 Mar 2007 07:21:45 +0000 (00:21 -0700)]
[SPARC64]: MAX_PHYSADDR_BITS et al. really need to be 42 bits not 41.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC64]: Simplify read_obp_memory().
David S. Miller [Thu, 15 Mar 2007 07:06:34 +0000 (00:06 -0700)]
[SPARC64]: Simplify read_obp_memory().

Kick out empty entries as soon as we spot them, and use memmove()
instead of a silly loop to make the operation more clear.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC64]: Use SPARSEMEM_STATIC
David S. Miller [Thu, 15 Mar 2007 05:47:01 +0000 (22:47 -0700)]
[SPARC64]: Use SPARSEMEM_STATIC

Decrease the SECTION_SIZE_BITS --> MAX_PHYSADDR_BITS
range a little bit.

The cost of going to SPARSEMEM_STATIC becomes 8K of BSS space, and in
return we save a pointer dereferences on every page struct lookup.
Even better we hit the main kernel image for the base address which is
in a hugepage locked TLB entry.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC64]: Use DECLARE_BITMAP in struct pci_iommu.
David S. Miller [Thu, 15 Mar 2007 01:33:49 +0000 (18:33 -0700)]
[SPARC64]: Use DECLARE_BITMAP in struct pci_iommu.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC64]: Force dummy host controller onto bus zero.
David S. Miller [Tue, 13 Mar 2007 02:40:26 +0000 (19:40 -0700)]
[SPARC64]: Force dummy host controller onto bus zero.

This helps deal with the invisible bridge that sits between
the host controller and the top-most visisble PCI devices
on hypervisor systems.

For example, on T1000 the bus-range property says 2 --> 4
and so there is a PCI express bridge at bus 2, devfn 0, etc.

So if we don't force the dummy host controller to bus zero,
we'll try to create two devices with the same domain/bus/devfn
triplet.

Also, add some more log diagnostics to make debugging stuff like this
easyer.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC64]: Add dummy host controller to root of all PCI domains.
David S. Miller [Sun, 11 Mar 2007 23:42:53 +0000 (16:42 -0700)]
[SPARC64]: Add dummy host controller to root of all PCI domains.

We fake up a dummy one in all cases because that is the simplest
thing to do and it happens to be necessary for hypervisor systems.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC64]: Const'ify pci_iommu_ops.
David S. Miller [Sat, 10 Mar 2007 00:58:43 +0000 (16:58 -0800)]
[SPARC64]: Const'ify pci_iommu_ops.

Based upon a similar patch for x86_64 written by
Stephen Hemminger.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC64]: Kill pbm->pci_first_slot.
David S. Miller [Fri, 9 Mar 2007 07:06:39 +0000 (23:06 -0800)]
[SPARC64]: Kill pbm->pci_first_slot.

Set but never used.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC64]: Kill pci_controller->pbms_same_domain
David S. Miller [Fri, 9 Mar 2007 06:52:11 +0000 (22:52 -0800)]
[SPARC64]: Kill pci_controller->pbms_same_domain

We don't do the "Simba APB is a PBM" bogosity for Sabre
controllers any longer, so this pbms_same_domain thing
is no longer necessary.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC64]: Kill pci_controller->base_address_update().
David S. Miller [Fri, 9 Mar 2007 06:46:02 +0000 (22:46 -0800)]
[SPARC64]: Kill pci_controller->base_address_update().

Implemented but never actually used.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC64]: Kill pci_controller->resource_adjust()
David S. Miller [Fri, 9 Mar 2007 06:42:19 +0000 (22:42 -0800)]
[SPARC64]: Kill pci_controller->resource_adjust()

All the implementations can be identical and generic, so
no need for controller specific methods.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC64]: Kill PBM ranges software state.
David S. Miller [Fri, 9 Mar 2007 06:28:17 +0000 (22:28 -0800)]
[SPARC64]: Kill PBM ranges software state.

It is only used in one spot and we can just fetch the
OF property right there.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC64]: Kill PBM intmap software state.
David S. Miller [Fri, 9 Mar 2007 06:11:00 +0000 (22:11 -0800)]
[SPARC64]: Kill PBM intmap software state.

Set but never used.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC64]: Consolidate PCI mem/io resource determination.
David S. Miller [Fri, 9 Mar 2007 05:55:49 +0000 (21:55 -0800)]
[SPARC64]: Consolidate PCI mem/io resource determination.

It can be done for every PCI configuration using OF properties.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC64]: Fix sabre pci controllers with new probing scheme.
David S. Miller [Sun, 4 Mar 2007 20:53:19 +0000 (12:53 -0800)]
[SPARC64]: Fix sabre pci controllers with new probing scheme.

The SIMBA APB bridge is strange, it is a PCI bridge but it lacks
some standard OF properties, in particular it lacks a 'ranges'
property.

What you have to do is read the IO and MEM range registers in
the APB bridge to determine the ranges handled by each bridge.
So fill in the bus resources by doing that.

Since we now handle this quirk in the generic PCI and OF device
probing layers, we can flat out eliminate all of that code from
the sabre pci controller driver.

In fact we can thus eliminate completely another quirk of the sabre
driver.  It tried to make the two APB bridges look like PBMs but that
makes zero sense now (and it's questionable whether it ever made sense).
So now just use pbm_A and probe the whole PCI hierarchy using that as
the root.

This simplification allows many future cleanups to occur.

Also, I've found yet another quirk that needs to be worked around
while testing this.  You can't use the 'class-code' OF firmware
property, especially for IDE controllers.  We have to read the value
out of PCI config space or else we'll see the value the device was
showing before it was programmed into native mode.

I'm starting to think it might be wise to just read all of the values
out of PCI config space instead of using the OF properties. :-/

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC64]: Fix obppath pci device sysfs creation.
David S. Miller [Thu, 1 Mar 2007 19:46:13 +0000 (11:46 -0800)]
[SPARC64]: Fix obppath pci device sysfs creation.

Need to traverse recursively down child busses else we only
get the file created under devices at the top-level.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC64]: Minor cleanups to schizo pci controller driver.
David S. Miller [Thu, 1 Mar 2007 19:20:37 +0000 (11:20 -0800)]
[SPARC64]: Minor cleanups to schizo pci controller driver.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC64]: Internalize pci_memspace_mask.
David S. Miller [Thu, 1 Mar 2007 07:38:38 +0000 (23:38 -0800)]
[SPARC64]: Internalize pci_memspace_mask.

The only user was bus_dvma_to_mem() which is no longer used
by any driver, so kill that, and the export of pci_memspace_mask.

The only user now is the PCI mmap support code.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC64]: Probe PCI bus using OF device tree.
David S. Miller [Thu, 1 Mar 2007 07:35:04 +0000 (23:35 -0800)]
[SPARC64]: Probe PCI bus using OF device tree.

Almost entirely taken from the 64-bit PowerPC PCI code.

This allowed to eliminate a ton of cruft from the sparc64
PCI layer.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC64] isa: Convert to use pci_device_to_OF_node().
David S. Miller [Thu, 1 Mar 2007 02:01:38 +0000 (18:01 -0800)]
[SPARC64] isa: Convert to use pci_device_to_OF_node().

Also, do not try to compute resources by hand, instead use
the pre-computed ones in the of_device.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC64] ebus: Convert to use pci_device_to_OF_node().
David S. Miller [Thu, 1 Mar 2007 01:55:46 +0000 (17:55 -0800)]
[SPARC64] ebus: Convert to use pci_device_to_OF_node().

Also, we don't need to store or use the PBM so kill that
from the linux_ebus.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[IGAFB]: Use pci_device_to_OF_node() on sparc.
David S. Miller [Thu, 1 Mar 2007 01:05:06 +0000 (17:05 -0800)]
[IGAFB]: Use pci_device_to_OF_node() on sparc.

Also __sparc__ --> CONFIG_SPARC

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[ATYFB]: Use pci_device_to_OF_node() in sparc.
David S. Miller [Thu, 1 Mar 2007 01:02:45 +0000 (17:02 -0800)]
[ATYFB]: Use pci_device_to_OF_node() in sparc.

Signed-off-by: David S. Miller <davem@davemloft.net>