]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
17 years ago[AVR32] Fix compile error with gcc 4.1
Haavard Skinnemoen [Fri, 27 Apr 2007 12:21:47 +0000 (14:21 +0200)]
[AVR32] Fix compile error with gcc 4.1

gcc 4.1 doesn't seem to like const variables as inline assembly
outputs. Drop support for reading 64-bit values using get_user() so
that we can use an unsigned long to hold the result regardless of the
actual size. This should be safe since many architectures, including
i386, doesn't support reading 64-bit values with get_user().

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
17 years agoavr32: remove unneeded cast in atomic.h
Mathieu Desnoyers [Tue, 10 Apr 2007 22:23:09 +0000 (18:23 -0400)]
avr32: remove unneeded cast in atomic.h

This int cast is superfluous since system.h cmpxchg already casts it in
(typeof(*(ptr))).

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
17 years agoAVR32: Remove useless config option "GENERIC_BUST_SPINLOCK".
Robert P. J. Day [Thu, 26 Apr 2007 12:53:38 +0000 (08:53 -0400)]
AVR32: Remove useless config option "GENERIC_BUST_SPINLOCK".

Remove the clearly useless config option GENERIC_BUST_SPINLOCK, which
is not used anywhere in the tree.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
17 years ago[AVR32] Optimize the TLB miss handler
Haavard Skinnemoen [Wed, 14 Mar 2007 12:59:13 +0000 (13:59 +0100)]
[AVR32] Optimize the TLB miss handler

Reorder some instructions and change the register usage to reduce
the number of pipeline stalls. Also use the bfextu and bfins
instructions for bitfield manipulations instead of shifting and
masking.

This makes gzipping a 80MB file approximately 2% faster.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
17 years ago[AVR32] Board code for ATNGW100
Haavard Skinnemoen [Thu, 12 Apr 2007 15:26:57 +0000 (17:26 +0200)]
[AVR32] Board code for ATNGW100

Add board code and defconfig for the ATNGW100 Network Gateway kit.
For more information about this board, see

http://www.atmel.com/dyn/products/tools_card.asp?tool_id=4102

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
17 years ago[AVR32] Use memcpy/memset in memcpy_{from,to}_io and memset_io
Haavard Skinnemoen [Wed, 7 Mar 2007 09:40:44 +0000 (10:40 +0100)]
[AVR32] Use memcpy/memset in memcpy_{from,to}_io and memset_io

Using readb/writeb to implement these breaks NOR flash support. I
can't see any reason why regular memcpy and memset shouldn't work.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
17 years ago[AVR32] Get rid of board_setup_fbmem()
Haavard Skinnemoen [Wed, 21 Mar 2007 15:23:41 +0000 (16:23 +0100)]
[AVR32] Get rid of board_setup_fbmem()

Since the core setup code takes care of both allocation and
reservation of framebuffer memory, there's no need for this board-
specific hook anymore. Replace it with two global variables,
fbmem_start and fbmem_size, which can be used directly.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
17 years ago[AVR32] Reserve framebuffer memory in early_parse_fbmem()
Haavard Skinnemoen [Wed, 21 Mar 2007 15:16:50 +0000 (16:16 +0100)]
[AVR32] Reserve framebuffer memory in early_parse_fbmem()

With the current strategy of using the bootmem allocator to allocate
or reserve framebuffer memory, there's a slight chance that the
requested area has been taken by the boot allocator bitmap before we
get around to reserving it.

By inserting the framebuffer region as a reserved region as early as
possible, we improve our chances for success and we make the region
visible as a reserved region in dmesg and /proc/iomem without any
extra work.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
17 years ago[AVR32] Simplify early handling of memory regions
Haavard Skinnemoen [Wed, 21 Mar 2007 15:02:57 +0000 (16:02 +0100)]
[AVR32] Simplify early handling of memory regions

Use struct resource to specify both physical memory regions and
reserved regions and push everything into the same framework,
including kernel code/data and initrd memory. This allows us to get
rid of many special cases in the bootmem initialization and will also
make it easier to implement more robust handling of framebuffer
memory later.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
17 years ago[AVR32] Move setup_bootmem() from mm/init.c to kernel/setup.c
Haavard Skinnemoen [Wed, 21 Mar 2007 14:39:18 +0000 (15:39 +0100)]
[AVR32] Move setup_bootmem() from mm/init.c to kernel/setup.c

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
17 years ago[AVR32] Make I/O access macros work with external devices
Haavard Skinnemoen [Mon, 12 Feb 2007 15:28:56 +0000 (16:28 +0100)]
[AVR32] Make I/O access macros work with external devices

Fix the I/O access macros so that they work with externally connected
devices accessed in little-endian mode over any bus width:

* Use a set of macros to define I/O port- and memory operations
  borrowed from MIPS.
* Allow subarchitecture to specify address- and data-mangling
* Implement at32ap-specific port mangling (with build-time
  configurable bus width. Only one bus width at a time supported
  for now.)
* Rewrite iowriteN and friends to use write[bwl] and friends
  (not the __raw counterparts.)

This has been tested using pata_pcmcia to access a CompactFlash card
connected to the EBI (16-bit bus width.)

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
17 years ago[AVR32] Fix NMI handler
Haavard Skinnemoen [Tue, 13 Mar 2007 09:06:37 +0000 (10:06 +0100)]
[AVR32] Fix NMI handler

Fix a problem with the NMI handler entry code related to the NMI handler
sharing some code with the exception handlers. This is not a good idea
because the RSR and RAR registers are not the same, and the NMI handler
runs with interrupts masked the whole time so there's no need to check
for pending work.

Open-code the low-level NMI handling logic instead so that the pt_regs
layout is actually correct when the higher-level handler is called.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
17 years ago[AVR32] Clean up exception handling code
Haavard Skinnemoen [Tue, 13 Mar 2007 16:59:11 +0000 (17:59 +0100)]
[AVR32] Clean up exception handling code

  * Use generic BUG() handling
  * Remove some useless debug statements
  * Use a common function _exception() to send signals or oops when
    an exception can't be handled. This makes sure init doesn't
    enter an infinite exception loop as well. Borrowed from powerpc.
  * Add some basic exception tracing support to the page fault code.
  * Rework dump_stack(), show_regs() and friends and move everything
    into process.c
  * Print information about configuration options and chip type when
    oopsing

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
17 years ago[AVR32] Clean up cpu identification and add features bitmap
Haavard Skinnemoen [Tue, 13 Mar 2007 14:30:38 +0000 (15:30 +0100)]
[AVR32] Clean up cpu identification and add features bitmap

Clean up the cpu identification code, using definitions from
<asm/sysreg.h> instead of hardcoded constants. Also, add a features
bitmap to struct avr32_cpuinfo to allow other code to make decisions
based upon what the running cpu is actually capable of.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
17 years ago[AVR32] Clean up asm/sysreg.h
Haavard Skinnemoen [Tue, 13 Mar 2007 13:17:14 +0000 (14:17 +0100)]
[AVR32] Clean up asm/sysreg.h

Fix indentation and remove spurious comments in asm-avr32/sysreg.h

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
17 years ago[AVR32] Don't enable clocks with no users
Haavard Skinnemoen [Wed, 14 Mar 2007 12:23:44 +0000 (13:23 +0100)]
[AVR32] Don't enable clocks with no users

Bring the code that sets the initial PM clock masks in line with the
comment preceding it by only enabling clocks that have users != 0.
Fix SM clock definition and avr32_hpt_init() so that the SM and TC0
clocks keep ticking.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
17 years ago[AVR32] Put cpu in sleep 0 when idle.
Hans-Christian Egtvedt [Mon, 26 Feb 2007 12:50:43 +0000 (13:50 +0100)]
[AVR32] Put cpu in sleep 0 when idle.

This patch puts the CPU in sleep 0 when doing nothing, idle. This will
turn of the CPU clock and thus save power. The CPU is waken again when
an interrupt occurs.

Signed-off-by: Hans-Christian Egtvedt <hcegtvedt@atmel.com>
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
17 years ago[AVR32] Change system timer from count-compare to Timer/Counter 0
Hans-Christian Egtvedt [Mon, 12 Mar 2007 17:15:16 +0000 (18:15 +0100)]
[AVR32] Change system timer from count-compare to Timer/Counter 0

Due to limitation of the count-compare system timer (not able to
count when CPU is in sleep), the system timer had to be changed to
use a peripheral timer/counter.

The old COUNT-COMPARE code is still present in time.c as weak
functions. The new timer is added to the architecture directory.

This patch sets up TC0 as system timer The new timer has been tested
on AT32AP7000/ATSTK1000 at 100 Hz, 250 Hz, 300 Hz and 1000 Hz.

For more details about the timer/counter see the datasheet for
AT32AP700x available at

http://www.atmel.com/dyn/products/product_card.asp?part_id=3903

Signed-off-by: Hans-Christian Egtvedt <hcegtvedt@atmel.com>
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
17 years ago[AVR32] Add mach-specific Kconfig
Haavard Skinnemoen [Wed, 7 Mar 2007 14:24:34 +0000 (15:24 +0100)]
[AVR32] Add mach-specific Kconfig

Include at32ap-specific Kconfig file from top-level Kconfig file. The
at32ap Kconfig is currently empty, but it will grow some machine-
specific options soon.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
17 years ago[AVR32] Add nwait and tdf parameters to SMC configuration
Hans-Christian Egtvedt [Wed, 31 Jan 2007 17:01:45 +0000 (18:01 +0100)]
[AVR32] Add nwait and tdf parameters to SMC configuration

Complete the SMC configuration code by adding nwait and tdf
parameter. After this change, we support the same parameters as the
hardware.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
17 years ago[AVR32] Add basic HMATRIX support
Haavard Skinnemoen [Thu, 1 Feb 2007 15:34:10 +0000 (16:34 +0100)]
[AVR32] Add basic HMATRIX support

This adds register and clock definitions for the High-speed bus Matrix
(HMATRIX) as well as a function that can be used to configure special
EBI functionality like CompactFlash and NAND flash support.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
17 years ago[IPV4] nl_fib_lookup: Initialise res.r before fib_res_put(&res)
Sergey Vlasov [Fri, 27 Apr 2007 09:17:19 +0000 (02:17 -0700)]
[IPV4] nl_fib_lookup: Initialise res.r before fib_res_put(&res)

When CONFIG_IP_MULTIPLE_TABLES is enabled, the code in nl_fib_lookup()
needs to initialize the res.r field before fib_res_put(&res) - unlike
fib_lookup(), a direct call to ->tb_lookup does not set this field.

Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[IPV6]: Fix thinko in ipv6_rthdr_rcv() changes.
YOSHIFUJI Hideaki [Fri, 27 Apr 2007 09:13:39 +0000 (02:13 -0700)]
[IPV6]: Fix thinko in ipv6_rthdr_rcv() changes.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[IPV4]: Add multipath cached to feature-removal-schedule.txt
David S. Miller [Fri, 27 Apr 2007 08:04:23 +0000 (01:04 -0700)]
[IPV4]: Add multipath cached to feature-removal-schedule.txt

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SCSI] SUNESP: Complete driver rewrite to version 2.0
David S. Miller [Fri, 27 Apr 2007 04:19:23 +0000 (21:19 -0700)]
[SCSI] SUNESP: Complete driver rewrite to version 2.0

Major features:

1) Tagged queuing support.
2) Will properly negotiate for synchronous transfers even on
   devices that reject the wide negotiation message, such as
   CDROMs
3) Significantly lower kernel stack usage in interrupt
   handler path by elimination of function vector arrays,
   replaced by a top-level switch statement state machine.
4) Uses generic scsi infrastructure as much as possible to
   avoid code duplication.
5) Automatic request of sense data in response to CHECK_CONDITION
6) Portable to other platforms using ESP such as DEC and Sun3
   systems.

Signed-off-by: David S. Miller <davem@davemloft.net>
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 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 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>
17 years ago[OPENPROM]: Use pci_device_to_OF_node().
David S. Miller [Wed, 25 Apr 2007 23:01:51 +0000 (16:01 -0700)]
[OPENPROM]: Use pci_device_to_OF_node().

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[TULIP]: Use pci_device_to_OF_node() on sparc.
David S. Miller [Thu, 29 Mar 2007 08:41:28 +0000 (01:41 -0700)]
[TULIP]: Use pci_device_to_OF_node() on sparc.

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