summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* lguest: turn Waker into a thread, not a processRusty Russell2008-07-291-63/+57Star
| | | | | | | | | | | | | | lguest uses a Waker process to break it out of the kernel (ie. actually running the guest) when file descriptor needs attention. Changing this from a process to a thread somewhat simplifies things: it can directly access the fd_set of things to watch. More importantly, it means that the Waker can see Guest memory correctly, so /dev/vring file descriptors will work as anticipated (the alternative is to actually mmap MAP_SHARED, but you can't do that with /dev/zero). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* lguest: Enlarge virtio ringsRusty Russell2008-07-291-2/+2
| | | | | | | | | | With big packets, 128 entries is a little small. Guest -> Host 1GB TCP: Before: 8.43625 seconds xmit 95640 recv 198266 timeout 49771 usec 1252 After: 8.01099 seconds xmit 49200 recv 102263 timeout 26014 usec 2118 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* lguest: Use GSO/IFF_VNET_HDR extensions on tun/tapRusty Russell2008-07-291-14/+20
| | | | | | | | | | | | Guest -> Host 1GB TCP: Before 20.1974 seconds xmit 214510 recv 5 timeout 214491 usec 278 After 8.43625 seconds xmit 95640 recv 198266 timeout 49771 usec 1252 Host -> Guest 1GB TCP: Before: Seconds 9.98854 xmit 172166 recv 5344 timeout 172157 usec 251 After: Seconds 5.72803 xmit 244322 recv 9919 timeout 244302 usec 156 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* lguest: Remove 'network: no dma buffer!' warningRusty Russell2008-07-291-2/+0Star
| | | | | | | This warning can happen a lot under load, and it should be warnx not warn anwyay. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* lguest: Adaptive timeoutRusty Russell2008-07-291-1/+11
| | | | | | | | | | | | Since the correct timeout value varies, use a heuristic which adjusts the timeout depending on how many packets we've seen. This gives slightly worse results, but doesn't need tweaking when GSO is introduced. 500 usec 19.1887 xmit 561141 recv 1 timeout 559657 Dynamic (278) 20.1974 xmit 214510 recv 5 timeout 214491 usec 278 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* lguest: Tell Guest net not to notify us on every packet xmitRusty Russell2008-07-291-13/+93
| | | | | | | | | | | | | | | | | | | | | | | | | virtio_ring has the ability to suppress notifications. This prevents a guest exit for every packet, but we need to set a timer on packet receipt to re-check if there were any remaining packets. Here are the times for 1G TCP Guest->Host with different timeout settings (it matters because the TCP window doesn't grow big enough to fill the entire buffer): Timeout value Seconds Xmit/Recv/Timeout None (before) 25.3784 xmit 7750233 recv 1 2500 usec 62.5119 xmit 207020 recv 2 timeout 207020 1000 usec 34.5379 xmit 207003 recv 2 timeout 207003 750 usec 29.2305 xmit 207002 recv 1 timeout 207002 500 usec 19.1887 xmit 561141 recv 1 timeout 559657 250 usec 20.0465 xmit 214128 recv 2 timeout 214110 100 usec 19.2583 xmit 561621 recv 1 timeout 560153 (Note that these values are sensitive to the GSO patches which come later, and probably other traffic-related variables, so take with a large grain of salt). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* lguest: net block unneeded receive queue update notificationsRusty Russell2008-07-291-1/+13
| | | | | | | | | | Number of exits transmitting 10GB Guest->Host before: network xmit 7858610 recv 118136 After: network xmit 7750233 recv 1 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* lguest: wrap last_avail accesses.Rusty Russell2008-07-291-5/+11
| | | | | | | | To simplify the transition to when we publish indices in the ring (and make shuffling my patch queue easier), wrap them in a lg_last_avail() macro. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* lguest: use cpu capability accessorsAndrew Morton2008-07-291-2/+2
| | | | | | | | | | To support my little make-x86-bitops-use-proper-typechecking projectlet. Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Andrea Arcangeli <andrea@qumranet.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* lguest: virtio-rng supportRusty Russell2008-07-291-0/+90
| | | | | | | | This is a simple patch to add support for the virtio "hardware random generator" to lguest. It gets about 1.2 MB/sec reading from /dev/hwrng in the guest. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* lguest: Support assigning a MAC addressMark McLoughlin2008-07-291-33/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | If you've got a nice DHCP configuration which maps MAC addresses to specific IP addresses, then you're going to want to start your guest with one of those MAC addresses. Also, in Fedora, we have persistent network interface naming based on the MAC address, so with randomly assigned addresses you're soon going to hit eth13. Who knows what will happen then! Allow assigning a MAC address to the network interface with e.g. --tunnet=bridge:eth0:00:FF:95:6B:DA:3D or: --tunnet=192.168.121.1:00:FF:95:6B:DA:3D which is pretty unintelligable, but ... (includes Rusty's minor rework) Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* lguest: Don't leak /dev/zero fdMark McLoughlin2008-07-291-0/+1
| | | | | Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* lguest: fix verbose printing of device features.Rusty Russell2008-07-291-2/+2
| | | | | | %02x is more appropriate for bytes than %08x. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* lguest: fix switcher_page leak on unloadJohannes Weiner2008-07-291-0/+1
| | | | | | | | map_switcher allocates the array, unmap_switcher has to free it accordingly. Signed-off-by: Johannes Weiner <hannes@saeurebad.de> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* lguest: Guest int3 fixRusty Russell2008-07-291-7/+17
| | | | | | | | | Ron Minnich noticed that guest userspace gets a GPF when it tries to int3: we need to copy the privilege level from the guest-supplied IDT to the real IDT. int3 is the only common case where guest userspace expects to invoke an interrupt, so that's the symptom of failing to do this. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* lguest: set max_pfn_mapped, growl loudly at Yinghai LuRusty Russell2008-07-291-0/+3
| | | | | | | | | | | | | | 6af61a7614a306fe882a0c2b4ddc63b65aa66efc 'x86: clean up max_pfn_mapped usage - 32-bit' makes the following comment: XEN PV and lguest may need to assign max_pfn_mapped too. But no CC. Yinghai, wasting fellow developers' time is a VERY bad habit. If you do it again, I will hunt you down and try to extract the three hours of my life I just lost :) Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Cc: Yinghai Lu <yhlu.kernel@gmail.com>
* Merge branch 'cpus4096-v2' of ↵Linus Torvalds2008-07-2919-141/+85Star
|\ | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'cpus4096-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: cpu masks: optimize and clean up cpumask_of_cpu() cpumask: export cpumask_of_cpu_map cpumask: change cpumask_of_cpu_ptr to use new cpumask_of_cpu cpumask: put cpumask_of_cpu_map in the initdata section cpumask: make cpumask_of_cpu_map generic
| * Merge branch 'linus' into cpus4096Ingo Molnar2008-07-28911-11708/+20191
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: kernel/stop_machine.c Signed-off-by: Ingo Molnar <mingo@elte.hu>
| * | cpu masks: optimize and clean up cpumask_of_cpu()Linus Torvalds2008-07-283-134/+43Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clean up and optimize cpumask_of_cpu(), by sharing all the zero words. Instead of stupidly generating all possible i=0...NR_CPUS 2^i patterns creating a huge array of constant bitmasks, realize that the zero words can be shared. In other words, on a 64-bit architecture, we only ever need 64 of these arrays - with a different bit set in one single world (with enough zero words around it so that we can create any bitmask by just offsetting in that big array). And then we just put enough zeroes around it that we can point every single cpumask to be one of those things. So when we have 4k CPU's, instead of having 4k arrays (of 4k bits each, with one bit set in each array - 2MB memory total), we have exactly 64 arrays instead, each 8k bits in size (64kB total). And then we just point cpumask(n) to the right position (which we can calculate dynamically). Once we have the right arrays, getting "cpumask(n)" ends up being: static inline const cpumask_t *get_cpu_mask(unsigned int cpu) { const unsigned long *p = cpu_bit_bitmap[1 + cpu % BITS_PER_LONG]; p -= cpu / BITS_PER_LONG; return (const cpumask_t *)p; } This brings other advantages and simplifications as well: - we are not wasting memory that is just filled with a single bit in various different places - we don't need all those games to re-create the arrays in some dense format, because they're already going to be dense enough. if we compile a kernel for up to 4k CPU's, "wasting" that 64kB of memory is a non-issue (especially since by doing this "overlapping" trick we probably get better cache behaviour anyway). [ mingo@elte.hu: Converted Linus's mails into a commit. See: http://lkml.org/lkml/2008/7/27/156 http://lkml.org/lkml/2008/7/28/320 Also applied a family filter - which also has the side-effect of leaving out the bits where Linus calls me an idio... Oh, never mind ;-) ] Signed-off-by: Ingo Molnar <mingo@elte.hu> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Al Viro <viro@ZenIV.linux.org.uk> Cc: Mike Travis <travis@sgi.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
| * | Merge branch 'linus' into cpus4096Ingo Molnar2008-07-281107-11190/+46428
| |\ \
| * | | cpumask: export cpumask_of_cpu_mapIngo Molnar2008-07-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fix: ERROR: "cpumask_of_cpu_map" [drivers/acpi/processor.ko] undefined! ERROR: "cpumask_of_cpu_map" [arch/x86/kernel/microcode.ko] undefined! ERROR: "cpumask_of_cpu_map" [arch/x86/kernel/cpu/cpufreq/speedstep-ich.ko] undefined! ERROR: "cpumask_of_cpu_map" [arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko] undefined! Signed-off-by: Ingo Molnar <mingo@elte.hu>
| * | | cpumask: change cpumask_of_cpu_ptr to use new cpumask_of_cpuMike Travis2008-07-2617-83/+37Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Replace previous instances of the cpumask_of_cpu_ptr* macros with a the new (lvalue capable) generic cpumask_of_cpu(). Signed-off-by: Mike Travis <travis@sgi.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Jack Steiner <steiner@sgi.com> Cc: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Ingo Molnar <mingo@elte.hu>
| * | | cpumask: put cpumask_of_cpu_map in the initdata sectionMike Travis2008-07-262-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Create the cpumask_of_cpu_map statically in the init data section using NR_CPUS but replace it during boot up with one sized by nr_cpu_ids (num possible cpus). Signed-off-by: Mike Travis <travis@sgi.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Jack Steiner <steiner@sgi.com> Cc: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Ingo Molnar <mingo@elte.hu>
| * | | cpumask: make cpumask_of_cpu_map genericMike Travis2008-07-262-38/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If an arch doesn't define cpumask_of_cpu_map, create a generic statically-initialized one for them. This allows removal of the buggy cpumask_of_cpu() macro (&cpumask_of_cpu() gives address of out-of-scope var). An arch with NR_CPUS of 4096 probably wants to allocate this itself based on the actual number of CPUs, since otherwise they're using 2MB of rodata (1024 cpus means 128k). That's what CONFIG_HAVE_CPUMASK_OF_CPU_MAP is for (only x86/64 does so at the moment). In future as we support more CPUs, we'll need to resort to a get_cpu_map()/put_cpu_map() allocation scheme. Signed-off-by: Mike Travis <travis@sgi.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Jack Steiner <steiner@sgi.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | | | ipwireless: fix compile failureJames Bottomley2008-07-291-1/+1
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's a brown paper bag compile failure introduced by this patch commit a01386924874c4d6d67f8a34e66f04452c2abb69 Author: David Sterba <dsterba@suse.cz> Date: Mon Jul 28 16:53:32 2008 +0200 ipwireless: Preallocate received packet buffers with MRU size Really, it can't ever have been even compile tested. It looks like the closing bracket is in the wrong place, so this is the fix. Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | Merge branch 'for-linus' of ↵Linus Torvalds2008-07-287-30/+390
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: add driver for Atmel integrated touchscreen controller Input: ads7846 - optimize order of calculating Rt in ads7846_rx() Input: ads7846 - fix sparse endian warnings Input: uinput - remove duplicate include Input: serio - offload resume to kseriod Input: serio - mark serio_register_driver() __must_check
| * | | Input: add driver for Atmel integrated touchscreen controllerDan Liang2008-07-243-0/+345
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The AT91SAM9RL SoC integrates a Touchscreen Controller which can trigger ADC conversion periodically. Signed-off-by: Justin Waters <justin.waters@timesys.com> Signed-off-by: Dan Liang <dan.liang@atmel.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
| * | | Input: ads7846 - optimize order of calculating Rt in ads7846_rx()Hans-Christian Egtvedt2008-07-231-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Alter the if expression for calculating Rt. The old implementation would run unnecessary code when the ADS7843 device was used. The patch also fixes the code style to kernel standard. Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
| * | | Input: ads7846 - fix sparse endian warningsHarvey Harrison2008-07-231-4/+2Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Also remove the temporary pointer and use ->rx_buf directly. Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
| * | | Input: uinput - remove duplicate includeHuang Weiyi2008-07-231-1/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove duplicate include file <linux/smp_lock.h> in drivers/input/misc/uinput.c. Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
| * | | Input: serio - offload resume to kseriodShaohua Li2008-07-231-18/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When resuming AUX ports psmouse driver calls psmouse_extensions() to determine if the attached mouse is still the same, which may take a while to complete for generic mice. Offload the resume process to kseriod so the rest of the system may continue resuming without waiting for the mouse. Signed-off-by: Shaohua Li <shaohua.li@intel.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
| * | | Input: serio - mark serio_register_driver() __must_checkDmitry Torokhov2008-07-231-2/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | Also remove extra declaration of serio_register_driver(). Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* | | | Merge branch 'for-linus' of ↵Linus Torvalds2008-07-283-3/+7
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm: dlm: fix uninitialized variable for search_rsb_list callers dlm: release socket on error dlm: fix basts for granted CW waiting PR/CW dlm: check for null in device_write
| * | | | dlm: fix uninitialized variable for search_rsb_list callersBenny Halevy2008-07-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gcc 4.3.0 correctly emits the following warning. search_rsb_list does not *r_ret if no dlm_rsb is found and _search_rsb may pass the uninitialized value upstream on the error path when both calls to search_rsb_list return non-zero error. The fix sets *r_ret to NULL on search_rsb_list's not-found path. Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: David Teigland <teigland@redhat.com>
| * | | | dlm: release socket on errorMasatake YAMATO2008-07-141-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It seems that `sock' allocated by sock_create_kern in tcp_connect_to_sock() of dlm/fs/lowcomms.c is not released if dlm_nodeid_to_addr an error. Acked-by: Christine Caulfield <ccaulfie@redhat.com> Signed-off-by: Masatake YAMATO <yamato@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com>
| * | | | dlm: fix basts for granted CW waiting PR/CWDavid Teigland2008-07-141-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fix in commit 3650925893469ccb03dbcc6a440c5d363350f591 was addressing the case of a granted PR lock with waiting PR and CW locks. It's a special case that requires forcing a CW bast. However, that forced CW bast was incorrectly applying to a second condition where the granted lock was CW. So, the holder of a CW lock could receive an extraneous CW bast instead of a PR bast. This fix narrows the original special case to what was intended. Signed-off-by: David Teigland <teigland@redhat.com>
| * | | | dlm: check for null in device_writeMasatake YAMATO2008-07-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If `device_write' method is called via "dlm-control", file->private_data is NULL. (See ctl_device_open() in user.c. ) Through proc->flags is read. Signed-off-by: Masatake YAMATO <yamato@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com>
* | | | | Merge branch 'merge' of ↵Linus Torvalds2008-07-2838-260/+1039
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (25 commits) powerpc: Disable 64K hugetlb support when doing 64K SPU mappings powerpc/powermac: Fixup default serial port device for pmac_zilog powerpc/powermac: Use sane default baudrate for SCC debugging powerpc/mm: Implement _PAGE_SPECIAL & pte_special() for 64-bit powerpc: Show processor cache information in sysfs powerpc: Make core id information available to userspace powerpc: Make core sibling information available to userspace powerpc/vio: More fallout from dma_mapping_error API change ibmveth: Fix multiple errors with dma_mapping_error conversion powerpc/pseries: Fix CMO sysdev attribute API change fallout powerpc: Enable tracehook for the architecture powerpc: Add TIF_NOTIFY_RESUME support for tracehook powerpc: Add asm/syscall.h with the tracehook entry points powerpc: Make syscall tracing use tracehook.h helpers powerpc: Call tracehook_signal_handler() when setting up signal frames powerpc: Update cpu_sibling_maps dynamically powerpc: register_cpu_online should be __cpuinit powerpc: kill useless SMT code in prom_hold_cpus powerpc: Fix 8xx build failure powerpc: Fix vio build warnings ...
| * | | | | powerpc: Disable 64K hugetlb support when doing 64K SPU mappingsBenjamin Herrenschmidt2008-07-281-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 64K SPU local store mapping feature is incompatible with the 64K huge pages support due to the inability of some parts of the memory management to differenciate between them while they use a different page table format. For now, disable 64K huge pages when CONFIG_SPU_FS_64K_LS, in the long run, this can be fixed by making this feature use the hugetlb page table format. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | | | | powerpc/powermac: Fixup default serial port device for pmac_zilogBenjamin Herrenschmidt2008-07-282-27/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the non-working code in legacy_serial that tried to handle the powermac SCC ports, and instead add a (now working) function to the powermac platform code to find the default serial console if any. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | | | | powerpc/powermac: Use sane default baudrate for SCC debuggingBenjamin Herrenschmidt2008-07-281-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using the "sccdbg" option to route early kernel messages and xmon to the SCC serial port on PowerMacs, when this wasn't the configured output port of Open Firmware, we initialize the baudrate to 57600bps. This isn't a very good default on some powermacs where both the FW and pmac_zilog will default to 38400. This fixes it to use the same logic as pmac_zilog to pick a default speed. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | | | | powerpc/mm: Implement _PAGE_SPECIAL & pte_special() for 64-bitNick Piggin2008-07-283-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement _PAGE_SPECIAL and pte_special() for 64-bit powerpc. This bit will be used by the fast get_user_pages() to differenciate PTEs that correspond to a valid struct page from special mappings that don't such as IO mappings obtained via io_remap_pfn_ranges(). Signed-off-by: Nick Piggin <npiggin@suse.de> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Hugh Dickins <hugh@veritas.com> Cc: "Paul E. McKenney" <paulmck@us.ibm.com> Reviewed-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | | | | powerpc: Show processor cache information in sysfsNathan Lynch2008-07-281-0/+309
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Collect cache information from the OF device tree and display it in the cpu hierarchy in sysfs. This is intended to be compatible at the userspace level with x86's implementation[1], hence some of the funny attribute names. The arrangement of cache info is not immediately intuitive, but (again) it's for compatibility's sake. The cache attributes exposed are: type (Data, Instruction, or Unified) level (1, 2, 3...) size coherency_line_size number_of_sets ways_of_associativity All of these can be derived on platforms that follow the OF PowerPC Processor binding. The code "publishes" only those attributes for which it is able to determine values; attributes for values which cannot be determined are not created at all. [1] arch/x86/kernel/cpu/intel_cacheinfo.c BenH: Turned some printk's into pr_debug, added better NULL checking in a couple of places. Signed-off-by: Nathan Lynch <ntl@pobox.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | | | | powerpc: Make core id information available to userspaceNathan Lynch2008-07-283-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Existing Open Firmware practice is to report each processor core as a separate node in the device tree. Report the value of the "reg" OF property corresponding to a logical CPU's device node as the core_id attribute in /sys/devices/system/cpu/cpu*/topology/core_id. Signed-off-by: Nathan Lynch <ntl@pobox.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | | | | powerpc: Make core sibling information available to userspaceNathan Lynch2008-07-283-0/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement the notion of "core siblings" for powerpc. This makes /sys/devices/system/cpu/cpu*/topology/core_siblings present sensible values, indicating online CPUs which share an L2 cache. BenH: Made cpu_to_l2cache() use of_find_node_by_phandle() instead of IBM-specific open coded search Signed-off-by: Nathan Lynch <ntl@pobox.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | | | | powerpc/vio: More fallout from dma_mapping_error API changeStephen Rothwell2008-07-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | arch/powerpc/kernel/vio.c:533: error: too few arguments to function 'dma_mapping_error' Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | | | | ibmveth: Fix multiple errors with dma_mapping_error conversionStephen Rothwell2008-07-281-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The addition of an argument to dma_mapping_error() in commit 8d8bb39b9eba32dd70e87fd5ad5c5dd4ba118e06 "dma-mapping: add the device argument to dma_mapping_error()" left a bit of fallout: drivers/net/ibmveth.c:263: error: too few arguments to function 'dma_mapping_error' drivers/net/ibmveth.c:264: error: expected ')' before 'goto' drivers/net/ibmveth.c:284: error: expected expression before '}' token drivers/net/ibmveth.c:297: error: too few arguments to function 'dma_mapping_error' drivers/net/ibmveth.c:298: error: expected ')' before 'dma_unmap_single' drivers/net/ibmveth.c:306: error: expected expression before '}' token drivers/net/ibmveth.c:491: error: too few arguments to function 'dma_mapping_error' drivers/net/ibmveth.c:927: error: too few arguments to function 'dma_mapping_error' drivers/net/ibmveth.c:927: error: expected ')' before '{' token drivers/net/ibmveth.c:974: error: expected expression before '}' token drivers/net/ibmveth.c:914: error: label 'out' used but not defined m Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | | | | powerpc/pseries: Fix CMO sysdev attribute API change falloutStephen Rothwell2008-07-281-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Noticed due to these wanings: arch/powerpc/platforms/pseries/cmm.c:298: warning: initialization from incompatible pointer type arch/powerpc/platforms/pseries/cmm.c:299: warning: initialization from incompatible pointer type arch/powerpc/platforms/pseries/cmm.c:320: warning: initialization from incompatible pointer type arch/powerpc/platforms/pseries/cmm.c:320: warning: initialization from incompatible pointer type Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | | | | powerpc: Enable tracehook for the architectureRoland McGrath2008-07-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The powerpc arch code has all the prerequisites, so set HAVE_ARCH_TRACEHOOK. Signed-off-by: Roland McGrath <roland@redhat.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | | | | powerpc: Add TIF_NOTIFY_RESUME support for tracehookRoland McGrath2008-07-285-8/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds TIF_NOTIFY_RESUME support for powerpc. When set, we call tracehook_notify_resume() on the way to user mode. This overloads do_signal() to do the work, but changes its arguments to it has the TIF_* bits handy in a register and drops the useless first argument that was always zero. Signed-off-by: Roland McGrath <roland@redhat.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>