summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* sh: Make NUMA depend on sparsemem.Paul Mundt2007-06-081-1/+1
| | | | | | | The only platforms that are supporting NUMA are doing so via sparsemem, so update the dependency. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: URAM node support for SH7722.Paul Mundt2007-06-082-1/+10
| | | | | | | | This adds the URAM block on SH7722 as a separate node. Sparsemem is required for this, or it can simply be disabled by explicitly selecting a flatmem model. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Support for multiple nodes.Paul Mundt2007-06-085-0/+180
| | | | | | | | | This adds basic support for multiple nodes on SH machines. This is primarily useful for boards with many different memory blocks that are otherwise unused (SH7722/SH7785 URAM and so forth). Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Use asm/sections.h for linker section symbols.Paul Mundt2007-06-081-7/+4
| | | | | | Kill off a bunch of externs, and use sections.h instead.. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Fix up max_zone_pfns[] with multiple nodes.Paul Mundt2007-06-081-12/+17
| | | | | | | | Currently using multiple nodes tramples the ZONE_NORMAL max low pfn, tidy up the logic a bit to get it all working as expected. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Default to 4-byte alignment for SLUB objects.Paul Mundt2007-06-081-0/+7
| | | | | | | | | Slub currently defaults to 8-byte alignment for the kmalloc and slab minalign values, where 4 will suffice. In the slab case BYTES_PER_WORD == 4 already, so defining the minalign values outright doesn't cause any regressions there either. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Wire up mempolicy syscalls.Paul Mundt2007-06-081-3/+3
| | | | | | Wire up mbind and get/set_mempolicy() in their reserved places. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Tidy compiler warnings for SH-2A build.Paul Mundt2007-06-082-1/+1
| | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Wrap CPU tuning through cc-option.Paul Mundt2007-06-081-5/+7
| | | | | | | | | Some compilers don't support the explicit CPU tuning, while binutils is still able to handle the special subtype-specific opcodes. Make the CFLAG optional, falling back on the compiler default if nothing better exists. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Enable IPR-IRQ for SH7206.Paul Mundt2007-06-081-0/+1
| | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Mark sparsemem regions present earlier.Paul Mundt2007-06-081-4/+5
| | | | | | | | | We have to call in to sparse_memory_present_with_active_regions() earlier in order for sparsemem to be happy. This was being called too late, and was causing troubles with the platforms that needed to enable sparsemem. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Register multiple nodes in topology_init().Paul Mundt2007-06-081-0/+7
| | | | | | If we have multiple nodes, register these at topology_init() time. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Allow for bootmem debug support.Paul Mundt2007-06-081-0/+4
| | | | | | Handy for debugging bootmem troubles. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: sparsemem support.Paul Mundt2007-06-084-25/+38
| | | | | | | | This implements basic sparsemem support for SH. Presently this only uses static sparsemem, and we still permit explicit selection of flatmem. Those boards that want sparsemem can select it as usual. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: pfn_valid() depends on flatmem.Paul Mundt2007-06-081-0/+2
| | | | | | | pfn_valid() is already defined in the sparsemem case, so we only need to define this for CONFIG_FLATMEM. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Add L-BOX RE2 to mach-types.Nobuhiro Iwamatsu2007-06-081-0/+1
| | | | | Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Align .machvec.init section on a 4-byte boundary.Takashi YOSHII2007-06-081-0/+1
| | | | | | | | .machvec.init can be misaligned with the recent machvec changes, forcibly align it on the boundary that it expects, as before. Signed-off-by: Takashi YOSHII <takashi.yoshii.ze@hitachi.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Fix SH-4 CPU selects.Paul Mundt2007-06-084-13/+26
| | | | | | | | | Now that select no longer works for selecting the "closest" CPU, we have to explicitly reference the precise sub-type in the few places where it actually matters (presently only setup code and some legacy sh-sci cruft). Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Rip out special unknown machvec.Paul Mundt2007-06-087-48/+13
| | | | | | | | | | | | | | This kills off the BareCPU board as a "special" machvec, rather, we leave this as a default for when no other vector is available, or when we want to use it in combination with other vectors for testing with generic ops. As sh_mv is copied out anyways (or overloaded when an alternate vector is explicitly selected), this doesn't consume any additional memory. The generic machvec can be forcibly selected with sh_mv=generic, or by not having any other boards enabled. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Kill off machvec aliases.Paul Mundt2007-06-0832-91/+69
| | | | | | | | | | | We now throw all of the machvecs in to .machvec.init and either select one on the command line, or copy out the first (and usually only) one to sh_mv. The rest are freed as usual. This gets rid of all of the silly sh_mv aliasing and makes the selection explicit rather than link-order dependent. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Get multiple boards in one image working again.Paul Mundt2007-06-082-39/+51
| | | | | | | | | This tidies up the build rules and permits multiple boards to be linked in to the same kernel. The earlier Kconfig work ensures that the CPU configuration is consistent across the boards, as this is the only thing that we can't do dynamically. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Fixup cmdline handling from machvec changes.Paul Mundt2007-06-081-6/+7
| | | | | | | The command line wasn't being saved off properly after the machvec changes went in, fix it up. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Rework CPU/board dependencies.Paul Mundt2007-06-083-158/+165
| | | | | | | | | This was a big mess, rework the logic a bit so that we constrain to a particular subtype and figure out the board support based on that. This makes building subtype specific kernels supporting multiple boards possible again. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Shut up SH2-DSP compile warnings.Paul Mundt2007-06-082-2/+2
| | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Fixup machvec support.Paul Mundt2007-06-087-184/+125
| | | | | | | | This fixes up much of the machvec handling, allowing for it to be overloaded on boot. Making practical use of this still requires some Kconfig munging, however. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: __user annotations for __get/__put_user().Paul Mundt2007-06-088-34/+49
| | | | | | | | This adds in some more __user annotations. These weren't being handled properly in some of the __get_user and __put_user paths, so tidy those up. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Split out CPU topology initialization.Paul Mundt2007-06-083-19/+26
| | | | | | | | | | Split out the CPU topology initialization to a separate file, and switch it to a percpu type, rather than an NR_CPUS array. At the same time, switch to only registering present CPUs, rather than using the possible CPU map. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* RAMFS NOMMU: missed POSIX UID/GID inode attribute checkingBryan Wu2007-06-071-0/+5
| | | | | | | | | | | | | | | This bug was caught by LTP testcase fchmod06 on Blackfin platform. In the manpage of fchmod, "EPERM: The effective UID does not match the owner of the file, and the process is not privileged (Linux: it does not have the CAP_FOWNER capability)." But the ramfs nommu code missed the inode_change_ok POSIX UID/GID verification. This patch fixed this. Signed-off-by: Bryan Wu <bryan.wu@analog.com> Cc: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge git://git.linux-xtensa.org/kernel/xtensa-feedLinus Torvalds2007-06-0726-783/+475
|\ | | | | | | | | | | | | | | | | | | | | | | | | * git://git.linux-xtensa.org/kernel/xtensa-feed: Xtensa: use asm-generic/fcntl.h [XTENSA] Remove non-rt signal handling [XTENSA] Move common sections into bss sections [XTENSA] clean-up header files [XTENSA] Use generic 64-bit division [XTENSA] Remove multi-exported symbols from xtensa_ksyms.c [XTENSA] fix sources using deprecated assembler directive [XTENSA] Spelling fixes in arch/xtensa [XTENSA] fix bit operations in bitops.h
| * Xtensa: use asm-generic/fcntl.hStephen Rothwell2007-05-311-99/+1
| | | | | | | | | | | | | | | | | | | | Commit fc4fb2adf944d45a7f3d4d38df991c79ffdb6a43 "fixed" the Xtensa asm/fcntl.h and in doing so ignored asm-generic/fcntl.h completely. It turns out that it is now exactly the same as asm-generic/fcntl.h. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Chris Zankel <zankel@tensilica.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
| * [XTENSA] Remove non-rt signal handlingChris Zankel2007-05-318-524/+350
| | | | | | | | | | | | | | | | | | | | | | The non-rt signal handling was never really used, so we don't break anything. This patch also cleans up the signal stack-frame to make it independent from the processor configuration. It also improves the method used for controlling single-stepping. We now save and restore the 'icountlevel' register that controls single stepping and set or clear the saved state to enable or disable it. Signed-off-by: Chris Zankel <chris@zankel.net>
| * [XTENSA] Move common sections into bss sectionsChris Zankel2007-05-311-8/+11
| | | | | | | | | | | | | | | | Move the fields of the COMMON sections 'swapper_pg_dir' and 'empty_zero_page' to the BSS section. Remove the unused COMMON sections 'emtpy_bad_page_table' and 'empty_bad_page'. Signed-off-by: Chris Zankel <chris@zankel.net>
| * [XTENSA] clean-up header filesChris Zankel2007-05-3110-63/+50
| | | | | | | | | | | | | | | | | | | | The header files in the asm-xtensa directory are not clean and 'make headers_check' fails. This is a first patch to fix most of the header files. It removes unnecessary include statements and adds some that are required for building the kernel. The linker script required some updates or the linking stage would fail. Signed-off-by: Chris Zankel <chris@zankel.net>
| * [XTENSA] Use generic 64-bit divisionChris Zankel2007-05-311-12/+3
| | | | | | | | | | | | Use generic 64-bit division algorithm from the asm-generic directory.\ Signed-off-by: Chris Zankel <chris@zankel.net>
| * [XTENSA] Remove multi-exported symbols from xtensa_ksyms.cChris Zankel2007-05-311-11/+0
| | | | | | | | | | | | | | | | | | This patch removes the following symbols from arch/xtensa/kernel/xtensa_ksyms.c that were already exported: memcmp, memchr, strcat, strchr, strlen, stncat, strnlen, strrchr, strstr, enable_irq, and disable_irq Signed-off-by: Chris Zankel <chris@zankel.net>
| * [XTENSA] fix sources using deprecated assembler directiveChris Zankel2007-05-312-32/+34
| | | | | | | | | | | | | | The assembler directive '.begin literal' is deprecated in the newer versions of the binutils (strncopy_user.S and strnlen_user.S). Signed-off-by: Chris Zankel <chris@zankel.net>
| * [XTENSA] Spelling fixes in arch/xtensaChris Zankel2007-05-313-3/+3
| | | | | | | | | | | | | | Spelling fixes in arch/xtensa/. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Signed-off-by: Chris Zankel <chris@zankel.net>
| * [XTENSA] fix bit operations in bitops.hChris Zankel2007-05-311-34/+26
| | | | | | | | | | | | | | | | | | A macro used internally in the bitops.h file to identify the number of leading zeros (__cntlz) was implemented incorrectly for Xtensa processors that don't provide the 'nsa/nsau' instructions. As a result, the dependent functions and macros (ffs, ffz, fls) were broken. Signed-off-by: Chris Zankel <chris@zankel.net>
* | Merge branch 'master' of ↵Linus Torvalds2007-06-073-60/+65
|\ \ | | | | | | | | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6 * 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6: [SPARC64]: Fix SBUS IRQ regression caused by PCI-E driver. [SPARC64]: Fix 2 bugs in PCI Sabre bus scanning.
| * | [SPARC64]: Fix SBUS IRQ regression caused by PCI-E driver.David S. Miller2007-06-072-54/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We used to access the 64-bit IRQ IMAP and ICLR registers of bus controllers 4-bytes in and as a 32-bit register word, since only the low 32-bits were relevant. This seemed like a good idea at the time. But the PCI-E controller requires full 8-byte 64-bit access to these registers, so we switched over to accessing them fully. SBUS was not adjusted properly, which broke interrupts completely. Signed-off-by: David S. Miller <davem@davemloft.net>
| * | [SPARC64]: Fix 2 bugs in PCI Sabre bus scanning.David S. Miller2007-06-071-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | If we are on hummingbird, bus runs at 66MHZ. pbm->pci_bus should be setup with the result of pci_scan_one_pbm() or else we deref NULL pointers in the error interrupt handlers. Signed-off-by: David S. Miller <davem@davemloft.net>
* | | Merge branch 'master' of ↵Linus Torvalds2007-06-0763-655/+748
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 * 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (24 commits) xfrm: Add security check before flushing SAD/SPD [NET_SCHED]: Fix filter double free [NET]: Avoid duplicate netlink notification when changing link state [UDP]: Revert 2-pass hashing changes. [AF_UNIX]: Fix stream recvmsg() race. [NETFILTER]: nf_conntrack_amanda: fix textsearch_prepare() error check [NETFILTER]: ip_tables: fix compat related crash [NETFILTER]: nf_conntrack: fix helper module unload races [RTNETLINK]: ifindex 0 does not exist [NETLINK]: Mark netlink policies const [TCP] tcp_probe: Attach printf attribute properly to printl(). [TCP]: Use LIMIT_NETDEBUG in tcp_retransmit_timer(). [NET]: Merge dst_discard_in and dst_discard_out. [RFKILL]: Make rfkill->name const [IPV4]: Restore old behaviour of default config values [IPV4]: Add default config support after inetdev_init [IPV4]: Convert IPv4 devconf to an array [IPV4]: Only panic if inetdev_init fails for loopback [TCP]: Honour sk_bound_dev_if in tcp_v4_send_ack [BNX2]: Update version and reldate. ...
| * | | xfrm: Add security check before flushing SAD/SPDJoy Latten2007-06-075-13/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we check for permission before deleting entries from SAD and SPD, (see security_xfrm_policy_delete() security_xfrm_state_delete()) However we are not checking for authorization when flushing the SPD and the SAD completely. It was perhaps missed in the original security hooks patch. This patch adds a security check when flushing entries from the SAD and SPD. It runs the entire database and checks each entry for a denial. If the process attempting the flush is unable to remove all of the entries a denial is logged the the flush function returns an error without removing anything. This is particularly useful when a process may need to create or delete its own xfrm entries used for things like labeled networking but that same process should not be able to delete other entries or flush the entire database. Signed-off-by: Joy Latten<latten@austin.ibm.com> Signed-off-by: Eric Paris <eparis@parisplace.org> Signed-off-by: James Morris <jmorris@namei.org>
| * | | [NET_SCHED]: Fix filter double freePatrick McHardy2007-06-072-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cbq and atm destroy their filters twice when destroying inner classes during qdisc destruction. Reported-and-tested-by: Strobl Anton <a.strobl@aws-it.at> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | | [NET]: Avoid duplicate netlink notification when changing link stateThomas Graf2007-06-071-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When changing the link state from userspace not affecting any other flags. Two duplicate notification are being sent, once as action in the NETDEV_UP/NETDEV_DOWN notification chain and a second time when comparing old and new device flags after the change has been completed. Although harmless, the duplicates should be avoided. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | | [UDP]: Revert 2-pass hashing changes.David S. Miller2007-06-078-212/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts changesets: 6aaf47fa48d3c44280810b1b470261d340e4ed87 b7b5f487ab39bc10ed0694af35651a03d9cb97ff de34ed91c4ffa4727964a832c46e624dd1495cf5 fc038410b4b1643766f8033f4940bcdb1dace633 There are still some correctness issues recently discovered which do not have a known fix that doesn't involve doing a full hash table scan on port bind. So revert for now. Signed-off-by: David S. Miller <davem@davemloft.net>
| * | | [AF_UNIX]: Fix stream recvmsg() race.Miklos Szeredi2007-06-071-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A recv() on an AF_UNIX, SOCK_STREAM socket can race with a send()+close() on the peer, causing recv() to return zero, even though the sent data should be received. This happens if the send() and the close() is performed between skb_dequeue() and checking sk->sk_shutdown in unix_stream_recvmsg(): process A skb_dequeue() returns NULL, there's no data in the socket queue process B new data is inserted onto the queue by unix_stream_sendmsg() process B sk->sk_shutdown is set to SHUTDOWN_MASK by unix_release_sock() process A sk->sk_shutdown is checked, unix_release_sock() returns zero I'm surprised nobody noticed this, it's not hard to trigger. Maybe it's just (un)luck with the timing. It's possible to work around this bug in userspace, by retrying the recv() once in case of a zero return value. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | | [NETFILTER]: nf_conntrack_amanda: fix textsearch_prepare() error checkAkinobu Mita2007-06-071-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The return value from textsearch_prepare() needs to be checked by IS_ERR(). Because it returns error code as a pointer. Cc: "Brian J. Murrell" <netfilter@interlinx.bc.ca> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | | [NETFILTER]: ip_tables: fix compat related crashDmitry Mishin2007-06-072-18/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | check_compat_entry_size_and_hooks iterates over the matches and calls compat_check_calc_match, which loads the match and calculates the compat offsets, but unlike the non-compat version, doesn't call ->checkentry yet. On error however it calls cleanup_matches, which in turn calls ->destroy, which can result in crashes if the destroy function (validly) expects to only get called after the checkentry function. Add a compat_release_match function that only drops the module reference on error and rename compat_check_calc_match to compat_find_calc_match to reflect the fact that it doesn't call the checkentry function. Reported by Jan Engelhardt <jengelh@linux01.gwdg.de> Signed-off-by: Dmitry Mishin <dim@openvz.org> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | | [NETFILTER]: nf_conntrack: fix helper module unload racesPatrick McHarrdy2007-06-077-29/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a helper module is unloaded all conntracks refering to it have their helper pointer NULLed out, leading to lots of races. In most places this can be fixed by proper use of RCU (they do already check for != NULL, but in a racy way), additionally nf_conntrack_expect_related needs to bail out when no helper is present. Also remove two paranoid BUG_ONs in nf_conntrack_proto_gre that are racy and not worth fixing. Signed-off-by: Patrick McHarrdy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
OpenPOWER on IntegriCloud