summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Input: i8042 - print debug data when testing AUX IRQ deliveryDmitry Torokhov2009-10-081-0/+3
| | | | | | | Sometimes it is not clear why IRQ delivery test failed so let's add some debug printks so we know the exact reason. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: libps2 - fix dependancy on i8042Dmitry Torokhov2009-10-051-6/+7
| | | | | | | | libps2 can not be built in if i8042 is a module, all other combinations are allowed. Reported-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: fix rx51 board keymapAmit Kucheria2009-10-052-42/+42
| | | | | | | | | | | | | | | | | The original driver was written with the KEY() macro defined as (col, row) instead of (row, col) as defined by the matrix keypad infrastructure. So the keymap was defined accordingly. Since the driver that was merged upstream uses the matrix keypad infrastructure, modify the keymap accordingly. While we are at it, fix the comments in twl4030.h and define PERSISTENT_KEY as (r,c) instead of (c, r) Tested on a RX51 (N900) device. Signed-off-by: Amit Kucheria <amit.kucheria@verdurent.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: ad7879 - pass up error codes from probe functionsMichael Hennerich2009-10-051-2/+2
| | | | | | | | | | If the sub-probe functions fail, we need to pass up the error code to the higher levels from the probe function. We currently always return 0 even if there was an error so higher levels don't report problems. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: xpad - add BigBen Interactive XBOX 360 ControllerThomas Gruber2009-10-051-0/+2
| | | | | | | | Add BigBen Interactive XBOX 360 Controller (146b:0601) to xpad driver. Signed-off-by: Thomas Gruber <kerneldev@tuxpower.org> Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: rotary_encoder - fix relative axis supportH Hartley Sweeten2009-10-051-2/+2
| | | | | | | | | | When the rotart_encoder driver is used to report relative axis information the "steps" in the platform data could be missing since it's not relevant. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: sparkspkr - move remove() functions to .devexit.textUwe Kleine-König2009-10-051-2/+2
| | | | | | | | | The function bbc_remove and grover_remove are used only wrapped by __devexit_p so define it using __devexit. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: wistron_btns - add DMI entry for Medion WIM2030 laptopSebastian Frei2009-10-051-0/+9
| | | | | Signed-off-by: Sebastian Frei <dr.nop@gmx.net> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: add driver for Atmel AT42QT2160 Sensor ChipRaphael Derosso Pereira2009-09-223-0/+408
| | | | | | | | | This version only supports individual cells (no slide support yet). The code has been tested on proprietary development ARM board, but should work fine on other machines. Signed-off-by: Raphael Derosso Pereira <raphaelpereira@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: max7359 - use threaded IRQsDmitry Torokhov2009-09-211-35/+13
| | | | | | | | Convert max7359 driver to use IRQ threading instead of using workqueue. Tested-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: add driver for Maxim MAX7359 key switch controllerKim Kyuwon2009-09-213-0/+364
| | | | | | | | | | The Maxim MAX7359 is a I2C interfaced key switch controller which provides microprocessors with management of up to 64 key switches. This patch adds support for the MAX7359 key switch controller. Signed-off-by: Kim Kyuwon <q1.kim@samsung.com> Reviewed-by: Trilok Soni <soni.trilok@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: add driver for ADP5588 QWERTY I2C KeypadMichael Hennerich2009-09-174-0/+464
| | | | | | | Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: add touchscreen driver for MELFAS MCS-5000 controllerJoonyoung Shim2009-09-174-0/+354
| | | | | | | | | | | | | The MELPAS MCS-5000 is the touchscreen controller. The overview of this controller can see at the following website: http://www.melfas.com/product/product01.asp?k_r=eng_ This driver is tested on s3c6410 NCP board and supports only the i2c interface. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: add driver for OpenCores Keyboard ControllerJavier Herrero2009-09-173-0/+190
| | | | | | | | | | Driver for the keyboard hardware documented here: http://www.opencores.org/project,keyboardcontroller Signed-off-by: Javier Herrero <jherrero@hvsistemas.es> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: dm355evm_keys - remove dm355evm_keys_hardirqDmitry Torokhov2009-09-171-17/+9
| | | | | | | The genirq already provides default hard IRQ handler for threaded IRQs, no need to implement our own here. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: synaptics_i2c - switch to using __cancel_delayed_work()Dmitry Torokhov2009-09-171-19/+32
| | | | | | | | cancel_delayed_work() may spin and therefore should not be used in interrupt contexts. Acked-by: Mike Rapoport <mike@compulab.co.il> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: ad7879 - add support for AD7889Michael Hennerich2009-09-172-5/+7
| | | | | | | | | The AD7889 is a new part but 100% software compatible with the AD7879, so add it to the id_table and help text. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: atkbd - rely on input core to restore state on resumeDmitry Torokhov2009-09-171-25/+0
| | | | | | | Now that input core takes care of restoring state of input devices upon resume we don't need to do anything special here. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: add generic suspend and resume for input devicesDmitry Torokhov2009-09-172-2/+64
| | | | | | | Automatically turn off leds and sound effects as part of suspend process and restore led state, sounds and repeat rate at resume. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: libps2 - additional locking for i8042 portsDmitry Torokhov2009-09-177-12/+117
| | | | | | | | | | | | | | | | | The serio ports on i8042 are not completely isolated; while we provide enough locking to ensure proper serialization when accessing control and data registers AUX and KBD ports can still have an effect on each other on PS/2 protocol level. The most prominent effect is that issuing a command for the device connected to one port may cause abort of the command currently executing by the device connected to another port. Since i8042 nor serio subsystem are not aware of the details of the PS/2 protocol (length of the commands and their replies and so on) the locking should be done on libps2 level by adding special handling when we see that we are dealing with serio port on i8042. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-next-2.6Linus Torvalds2009-09-1512-385/+522
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-next-2.6: ide: fixup for fujitsu disk ide: convert to ->proc_fops at91_ide: remove headers specific for at91sam9263 IDE: palm_bk3710: convert clock usage after clkdev conversion ide: fix races in handling of user-space SET XFER commands ide: allow ide_dev_read_id() to be called from the IRQ context ide: ide-taskfile.c fix style problems drivers/ide/ide-cd.c: Use DIV_ROUND_CLOSEST ide-tape: fix handling of postponed rqs ide-tape: convert to ide_debug_log macro ide-tape: fix debug call ide: Fix annoying warning in ide_pio_bytes(). IDE: Save a call to PageHighMem()
| * ide: fixup for fujitsu diskWu Zhangjin2009-09-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch will fix the following problem on Yeeloong netbook with fujitsu disk. irq 14: nobody cared (try booting with the "irqpoll" option) Call Trace: [<ffffffff8020d438>] dump_stack+0x8/0x40 [<ffffffff8027ec64>] __report_bad_irq+0x58/0xe4 [<ffffffff8027ee6c>] note_interrupt+0x17c/0x23c [<ffffffff8027f9b8>] handle_level_irq+0xcc/0x134 [<ffffffff802125b0>] mach_irq_dispatch+0xb8/0x1e0 [<ffffffff8020041c>] ret_from_irq+0x0/0x4 [<ffffffff8029e678>] free_hot_cold_page+0x224/0x2a0 [<ffffffff8026f794>] swsusp_free+0xb0/0x14c [<ffffffff8026ec08>] hibernate+0x198/0x218 [<ffffffff8026cfa8>] state_store+0x90/0x138 [<ffffffff8032b5a4>] sysfs_write_file+0x130/0x194 [<ffffffff802c94fc>] vfs_write+0xb8/0x180 [<ffffffff802c96b8>] SyS_write+0x50/0x98 [<ffffffff80203fd8>] handle_sys+0x158/0x174 handlers: [<ffffffff80429670>] (ide_intr+0x0/0x300) Disabling IRQ #14 References: 1. commit 1fde02e7146d4a1bab80fd1506f9018fe71e8521 of git://dev.lemote.com/linux_loongson.git 2. 8bc1e5aa06a2a9a425c4a6795fc564cba1521487 (ide: respect quirk_drives[] list on all controllers) Signed-off-by: Yan Hua <yanh@lemote.com> Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * ide: convert to ->proc_fopsAlexey Dobriyan2009-09-016-207/+365
| | | | | | | | | | | | | | | | | | | | | | | | ->read_proc, ->write_proc are going away, ->proc_fops should be used instead. The only tricky place is IDENTIFY handling: if for some reason taskfile_lib_get_identify() fails, buffer _is_ changed and at least first byte is overwritten. Emulate old behaviour with returning that first byte to userspace and reporting length=1 despite overall -E. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * at91_ide: remove headers specific for at91sam9263Sergey Matyukevich2009-08-151-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | This driver requires only static memory controller definitions and macroses contained in generic header at91sam9_smc.h. Those extra headers are misleading since this driver also works fine for at91sam9260 SoC: tests were performed on afeb9260 board. Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com> Acked-by: Stanislaw Gruszka <stf_xl@wp.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
| * IDE: palm_bk3710: convert clock usage after clkdev conversionKevin Hilman2009-08-151-1/+1
| | | | | | | | | | | | | | | | | | | | DaVinci core code has converted to the new clkdev API so clock name strings are not needed. Instead, just the a 'struct device' pointer is needed. Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * ide: fix races in handling of user-space SET XFER commandsBartlomiej Zolnierkiewicz2009-08-075-26/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Make cmd->tf_flags field 'u16' and add IDE_TFLAG_SET_XFER taskfile flag. * Update ide_finish_cmd() to set xfer / re-read id if the new flag is set. * Convert set_xfer_rate() (write handler for /proc/ide/hd?/current_speed) and ide_cmd_ioctl() (HDIO_DRIVE_CMD ioctl handler) to use the new flag. * Remove no longer needed disable_irq_nosync() + enable_irq() from ide_config_drive_speed(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * ide: allow ide_dev_read_id() to be called from the IRQ contextBartlomiej Zolnierkiewicz2009-08-073-14/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Un-static __ide_wait_stat(). * Allow ide_dev_read_id() helper to be called from the IRQ context by adding irq_ctx flag and using mdelay()/__ide_wait_stat() when needed. * Switch ide_driveid_update() to set irq_ctx flag. This change is needed for the consecutive patch which fixes races in handling of user-space SET XFER commands but for improved bisectability and clarity it is better to do it in a separate patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * ide: ide-taskfile.c fix style problemsJaswinder Singh Rajput2009-08-071-58/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix trivial style problems: WARNING: Use #include <linux/uaccess.h> instead of <asm/uaccess.h> WARNING: space prohibited between function name and open parenthesis '(' WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable ERROR: do not use C99 // comments X 2 ERROR: trailing statements should be on next line ERROR: trailing whitespace ERROR: switch and case should be at the same indent WARNING: line over 80 characters total: 5 errors, 4 warnings Also removed dead code Also used pr_err() to avoid line breaks Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com> Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * drivers/ide/ide-cd.c: Use DIV_ROUND_CLOSESTJulia Lawall2009-08-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The kernel.h macro DIV_ROUND_CLOSEST performs the computation (x + d/2)/d but is perhaps more readable. The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @haskernel@ @@ #include <linux/kernel.h> @depends on haskernel@ expression x,__divisor; @@ - (((x) + ((__divisor) / 2)) / (__divisor)) + DIV_ROUND_CLOSEST(x,__divisor) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Acked-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * ide-tape: fix handling of postponed rqsBorislav Petkov2009-08-071-22/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ide-tape used to hit [ 58.614854] ide-tape: ht0: BUG: Two DSC requests queued! due to the fact that another rq was being issued while the driver was waiting for DSC to get set for the device executing ATAPI commands which set the DSC to 1 to indicate completion. Here's a sample output of that case: issue REZERO_UNIT [ 143.088505] ide-tape: ide_tape_issue_pc: retry #0, cmd: 0x01 [ 143.095122] ide: Enter ide_pc_intr - interrupt handler [ 143.096118] ide: Packet command completed, 0 bytes transferred [ 143.106319] ide-tape: ide_tape_callback: cmd: 0x1, dsc: 1, err: 0 [ 143.112601] ide-tape: idetape_postpone_request: cmd: 0x1, dsc_poll_freq: 2000 we stall the ide-tape queue here waiting for DSC [ 143.119936] ide-tape: ide_tape_read_position: enter [ 145.119019] ide-tape: idetape_do_request: sector: 4294967295, nr_sectors: 0 and issue the new READ_POSITION rq and hit the check. [ 145.126247] ide-tape: ht0: BUG: Two DSC requests queued! [ 145.131748] ide-tape: ide_tape_read_position: BOP - No [ 145.137059] ide-tape: ide_tape_read_position: EOP - No Also, ->postponed_rq used to point to that postponed request. To make things worse, in certain circumstances the rq it was pointing to got replaced unterneath it by swiftly reusing the same rq from the mempool of the block layer practically confusing stuff even more. However, we don't need to keep a pointer to that rq but simply wait for DSC to be set first before issuing the follow-up request in the drive's queue. In order to do that, we make idetape_do_request() first check the DSC and if not set, we stall the drive queue giving the other device on that IDE channel a chance. Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * ide-tape: convert to ide_debug_log macroBorislav Petkov2009-08-071-53/+49
| | | | | | | | | | | | | | | | | | Remove tape->debug_mask and use drive->debug_mask instead. There should be no functional change resulting from this patch. Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * ide-tape: fix debug callMark de Wever2009-08-071-1/+1
| | | | | | | | | | | | | | This error only occurs when IDETAPE_DEBUG_LOG is enabled. Signed-off-by: Mark de Wever <koraq@xs4all.nl> Signed-off-by: David S. Miller <davem@davemloft.net>
| * ide: Fix annoying warning in ide_pio_bytes().David S. Miller2009-08-071-1/+1
| | | | | | | | | | | | | | | | | | GCC can't see that flags is only set and used when PageHighmem() is true. Inspired by a patch from Jean Delvare. Signed-off-by: David S. Miller <davem@davemloft.net>
| * IDE: Save a call to PageHighMem()Jean Delvare2009-08-071-2/+4
| | | | | | | | | | | | | | | | PageHighMem() isn't cheap so avoid calling it twice on the same page. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge branch 'next' of ↵Linus Torvalds2009-09-15220-2461/+11256
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (134 commits) powerpc/nvram: Enable use Generic NVRAM driver for different size chips powerpc/iseries: Fix oops reading from /proc/iSeries/mf/*/cmdline powerpc/ps3: Workaround for flash memory I/O error powerpc/booke: Don't set DABR on 64-bit BookE, use DAC1 instead powerpc/perf_counters: Reduce stack usage of power_check_constraints powerpc: Fix bug where perf_counters breaks oprofile powerpc/85xx: Fix SMP compile error and allow NULL for smp_ops powerpc/irq: Improve nanodoc powerpc: Fix some late PowerMac G5 with PCIe ATI graphics powerpc/fsl-booke: Use HW PTE format if CONFIG_PTE_64BIT powerpc/book3e: Add missing page sizes powerpc/pseries: Fix to handle slb resize across migration powerpc/powermac: Thermal control turns system off too eagerly powerpc/pci: Merge ppc32 and ppc64 versions of phb_scan() powerpc/405ex: support cuImage via included dtb powerpc/405ex: provide necessary fixup function to support cuImage powerpc/40x: Add support for the ESTeem 195E (PPC405EP) SBC powerpc/44x: Add Eiger AMCC (AppliedMicro) PPC460SX evaluation board support. powerpc/44x: Update Arches defconfig powerpc/44x: Update Arches dts ... Fix up conflicts in drivers/char/agp/uninorth-agp.c
| * | powerpc/nvram: Enable use Generic NVRAM driver for different size chipsMartyn Welch2009-09-113-7/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the reliance on a staticly defined NVRAM size, allowing platforms to support NVRAMs with sizes differing from the standard. A fall back value is provided for platforms not supporting this extension. Signed-off-by: Martyn Welch <martyn.welch@gefanuc.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | powerpc/iseries: Fix oops reading from /proc/iSeries/mf/*/cmdlineBenjamin Herrenschmidt2009-09-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That code uses dma_mapping_error() with a NULL device, which is a bad idea :-) The proper fix might be to start using some kind of pseudo device for all these low level mappings with the hypervisor but that will be for another day. Since it directly calls into the low level iommu code, I see no problem in having it directly test against DMA_ERROR_CODE instead of using the accessors with a NULL argument for now. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | powerpc/ps3: Workaround for flash memory I/O errorGeoff Levand2009-09-111-3/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A workaround for flash memory I/O errors when the PS3 internal hard disk has not been formatted for OtherOS use. This error condition mainly effects 'Live CD' users who have not formatted the PS3's internal hard disk for OtherOS. Fixes errors similar to these when using the ps3-flash-util or ps3-boot-game-os programs: ps3flash read failed 0x2050000 os_area_header_read: read error: os_area_header: Input/output error main:627: os_area_read_hp error. ERROR: can't change boot flag Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | powerpc/booke: Don't set DABR on 64-bit BookE, use DAC1 insteadBenjamin Herrenschmidt2009-09-111-7/+7
| | | | | | | | | | | | | | | | | | | | | Also remove a duplicate setting of it in the context switch path on BookE. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | powerpc/perf_counters: Reduce stack usage of power_check_constraintsPaul Mackerras2009-09-111-23/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Michael Ellerman reported stack-frame size warnings being produced for power_check_constraints(), which uses an 8*8 array of u64 and two 8*8 arrays of unsigned long, which are currently allocated on the stack, along with some other smaller variables. These arrays come to 1.5kB on 64-bit or 1kB on 32-bit, which is a bit too much for the stack. This fixes the problem by putting these arrays in the existing per-cpu cpu_hw_counters struct. This is OK because two of the call sites have interrupts disabled already; for the third call site we use get_cpu_var, which disables preemption, so we know we won't get a context switch while we're in power_check_constraints(). Note that power_check_constraints() can be called during context switch but is not called from interrupts. Reported-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org> Cc: <stable@kernel.org) Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | powerpc: Fix bug where perf_counters breaks oprofilePaul Mackerras2009-09-114-16/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently there is a bug where if you use oprofile on a pSeries machine, then use perf_counters, then use oprofile again, oprofile will not work correctly; it will lose the PMU configuration the next time the hypervisor does a partition context switch, and thereafter won't count anything. Maynard Johnson identified the sequence causing the problem: - oprofile setup calls ppc_enable_pmcs(), which calls pseries_lpar_enable_pmcs, which tells the hypervisor that we want to use the PMU, and sets the "PMU in use" flag in the lppaca. This flag tells the hypervisor whether it needs to save and restore the PMU config. - The perf_counter code sets and clears the "PMU in use" flag directly as it context-switches the PMU between tasks, and leaves it clear when it finishes. - oprofile setup, called for a new oprofile run, calls ppc_enable_pmcs, which does nothing because it has already been called. In particular it doesn't set the "PMU in use" flag. This fixes the problem by arranging for ppc_enable_pmcs to always set the "PMU in use" flag. It makes the perf_counter code call ppc_enable_pmcs also rather than calling the lower-level function directly, and removes the setting of the "PMU in use" flag from pseries_lpar_enable_pmcs, since that is now done in its caller. This also removes the declaration of pasemi_enable_pmcs because it isn't defined anywhere. Reported-by: Maynard Johnson <mpjohn@us.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org> Cc: <stable@kernel.org) Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | powerpc/85xx: Fix SMP compile error and allow NULL for smp_opsKumar Gala2009-09-112-13/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following commit introduced a compile error since it removed the implementation of smp_85xx_basic_setup: commit 77c0a700c1c292edafa11c1e52821ce4636f81b0 Author: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: Fri Aug 28 14:25:04 2009 +1000 powerpc: Properly start decrementer on BookE secondary CPUs Make it so that smp_ops probe() and setup_cpu() can be set to NULL. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | powerpc/irq: Improve nanodocWolfram Sang2009-09-111-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | The OF helpers look like nanodoc but are missing the header. Fix this and a typo (s/nad/and/) while we are here. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | powerpc: Fix some late PowerMac G5 with PCIe ATI graphicsBenjamin Herrenschmidt2009-09-022-0/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A misconfiguration by the firmware of the U4 PCIe bridge on PowerMac G5 with the U4 bridge (latest generations, may also affect the iMac G5 "iSight") is causing us to re-assign the PCI BARs of the video card, which can get it out of sync with the firmware, thus breaking offb. This works around it by fixing up the bridge configuration properly at boot time. It also fixes a bug where the firmware provides us with an incorrect set of accessible regions in the device-tree. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | powerpc/fsl-booke: Use HW PTE format if CONFIG_PTE_64BITKumar Gala2009-09-024-18/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switch to using the Power ISA defined PTE format when we have a 64-bit PTE. This makes the code handling between fsl-booke and book3e-64 similiar for TLB faults. Additionally this lets use take advantage of the page size encodings and full permissions that the HW PTE defines. Also defined _PMD_PRESENT, _PMD_PRESENT_MASK, and _PMD_BAD since the 32-bit ppc arch code expects them. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | powerpc/book3e: Add missing page sizesKumar Gala2009-09-021-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | Add defines for the other page sizes. Even if HW doesn't support them we made them use them for hugetlbfs support. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | powerpc/pseries: Fix to handle slb resize across migrationBrian King2009-09-025-6/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The SLB can change sizes across a live migration, which was not being handled, resulting in possible machine crashes during migration if migrating to a machine which has a smaller max SLB size than the source machine. Fix this by first reducing the SLB size to the minimum possible value, which is 32, prior to migration. Then during the device tree update which occurs after migration, we make the call to ensure the SLB gets updated. Also add the slb_size to the lparcfg output so that the migration tools can check to make sure the kernel has this capability before allowing migration in scenarios where the SLB size will change. BenH: Fixed #include <asm/mmu-hash64.h> -> <asm/mmu.h> to avoid breaking ppc32 build Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | powerpc/powermac: Thermal control turns system off too eagerlyLyonel Vincent2009-09-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On certain PowerMacs, a module (therm_windtunnel) controls various thermal settings (it can report CPU/case temperature, change speed of internal fans, etc.) By default, the hardware thermal control has a temperature limit to protect the computer from damages (the default limit seems to be 80°C) but therm_windtunnel.c reduces it to an anormaly low value (65°C), which means that he computer will shut down randomly when hit by direct sun light or during summer (summer in France can be quite hot), actually possibly losing data instead of protecting it. The overheat limit in therm_windtunnel.c:253-254 should be set to 75°C and 70°C instead of 65°C and 60°C respectively. From: Lyonel Vincent <lyonel@ezix.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | powerpc/pci: Merge ppc32 and ppc64 versions of phb_scan()Grant Likely2009-09-027-66/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The two versions are doing almost exactly the same thing. No need to maintain them as separate files. This patch also has the side effect of making the PCI device tree scanning code available to 32 bit powerpc machines, but no board ports actually make use of this feature at this point. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | powerpc/405ex: support cuImage via included dtbTiejun Chen2009-08-312-1/+50
| | | | | | | | | | | | | | | | | | | | | | | | To support cuImage, we need to initialize the required sections and ensure that it is built. Signed-off-by: Tiejun Chen <tiejun.chen@windriver.com> Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
OpenPOWER on IntegriCloud