aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2010-01-22spi/dw_spi: Fix dw_spi_mmio to depend on HAVE_CLKJean-Hugues Deschenes
dw_spi_mmio is dependent on the clock framework. This marks it as such in Kconfig. Signed-off-by: Jean-Hugues Deschenes <jean-hugues.deschenes@octasic.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-01-21spi/dw_spi: Allow dw_spi.c to be a moduleJean-Hugues Deschenes
Signed-off-by: Jean-Hugues Deschenes <jean-hugues.deschenes@octasic.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-01-21spi/dw_spi: mmio code style fixupsJean-Hugues Deschenes
Minor code style cleanups following comments by Wolfram Sang Signed-off-by: Jean-Hugues Deschenes <jean-hugues.deschenes@octasic.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-01-21Memory-mapped dw_spi driverJean-Hugues Deschenes
Adds a memory-mapped I/O dw_spi platform device. Signed-off-by: Jean-Hugues Deschenes <jean-hugues.deschenes@octasic.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-01-21spi/dw_spi: fix missing export of dw_spi_remove_hostFeng Tang
So that interface drivers could be built as modules Signed-off-by: Feng Tang <feng.tang@intel.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-01-21spi/dw_spi: conditional transfer mode changesGeorge Shore
This allows the switching between transfer modes between 'transmit only', 'receive only' and 'transmit and receive' modes. Due to the design of the SPI block, changing transfer modes requires that the block be disabled; in doing so the chipselect line is inherently deasserted and (usually) the attached device discards its state. Consequentially, switching modes requires that a platform-specific chipselect function has been defined so that the chipselect is not dropped during the change. Signed-off-by: George Shore <george@georgeshore.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-01-21spi/dw_spi: remove conditional from 'poll_transfer'.George Shore
The 'poll_transfer' function employs a conditional to test whether the transmit buffer is valid; in doing so, on a receive operation no data is clocked out, thus no data is clocked in and ultimately errors appear. This removes the conditional as the transmit function will be set to a null writer when the transmit buffer is invalid, allowing the driver to clock 0x00 out to the device to receive data from the device. Signed-off-by: George Shore <george@georgeshore.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-01-21spi/dw_spi: fixed a spelling typo in a warning message.George Shore
Signed-off-by: George Shore <george@georgeshore.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-01-21spi/dw_spi: add return value to empty mrst_spi_debugfs_init()George Shore
As per the function signature. Signed-off-by: George Shore <george@georgeshore.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-01-21spi/dw_spi: enable platform specific chipselect.George Shore
The driver core allows for a platform-specific chipselect assert/deassert function, however the chipselect function in the core doesn't take advantage of this fact. This enables the use of a custom function, should it be defined. Signed-off-by: George Shore <george@georgeshore.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-01-21spi/dw_spi: add a FIFO depth detectionFeng Tang
FIFO depth is configurable for each implementation of DW core, so add a depth detection for those interface drivers who don't set the fifo_len explicitly Signed-off-by: Feng Tang <feng.tang@intel.com> Acked-by: Jean-Hugues Deschenes <jean-hugues.deschenes@octasic.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-01-20spi/dw_spi: fix __init/__devinit section mismatchGrant Likely
Section mismatch in reference from the function dw_spi_add_host() to the function init_queue() Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-01-20spi: xilinx_spi: Fix up I/O routine wrapping bogosity.Paul Mundt
xilinx_spi presently makes some fairly questionable assumptions about I/O routines, and attempts to assign ioread32/iowrite32 and friends directly to its own internal function pointers. On many platforms these I/O routines are macros or wrappers and not actual functions on their own, resulting in things like: ERROR: "ioread32be" [drivers/spi/xilinx_spi.ko] undefined! ERROR: "iowrite32be" [drivers/spi/xilinx_spi.ko] undefined! ERROR: "iowrite32" [drivers/spi/xilinx_spi.ko] undefined! ERROR: "ioread32" [drivers/spi/xilinx_spi.ko] undefined! If xilinx_spi wants to do this sort of casting, it needs to provide its own wrappers for these, or change how it does accesses completely. I've opted for the first approach, and the attached silly patch does that. If someone with the hardware available wants to give the second option a try that's ok too. In any event, the current code is broken for at least: arm, avr32, blackfin, microblaze, mn10300, and sh. Signed-off-by: Paul Mundt <lethal@linux-sh.org> Acked-by: Richard Röjfors <richard.rojfors@pelagicore.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-01-20spi/spi_imx: add device information by switching pr_debug() to dev_dbg()Alberto Panizzo
Useful when debugging multiple spi channels. Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-01-20spi: update MSIOF includesMagnus Damm
Update the MSIOF driver to remove the architecture speficic spi header file and add err.h. This makes the driver compile on non-SH architectures. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-01-20spi/dw_spi: refine the IRQ mode working flowFeng Tang
Now dw_spi core fully supports 3 transfer modes: pure polling, DMA and IRQ mode. IRQ mode will use the FIFO half empty as the IRQ trigger, so each interface driver need set the fifo_len, so that core driver can handle it properly Signed-off-by: Feng Tang <feng.tang@intel.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-01-20spi/dw_spi: add a missed dw_spi_remove_host() in exit sequenceFeng Tang
Signed-off-by: Feng Tang <feng.tang@intel.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-01-20spi/dw_spi: bug fix in wait_till_not_busy()Feng Tang
Make the driver wait at least for 1 jiffie before issuing the warning, no matter what HZ is set to Signed-off-by: Feng Tang <feng.tang@intel.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-01-20spi/s3c64xx: Add new parameter to cs callbackJassi Brar
Since most of the chip-selects are simply going to be like gpio_set_value, it would do good to have the same callback type so that it could simply be made to point at gpio_set_value. Signed-off-by: Jassi Brar <jassi.brar@samsung.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-01-20spi/s3c64xx: Include moved headerJassi Brar
Header for platform specific stuff has been rename to include the SoC type. Include the new header instead. Signed-off-by: Jassi Brar <jassi.brar@samsung.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-01-20spi/s3c64xx: Check before mem-region releaseJassi Brar
Add precautionary check before releasing memory region. Signed-off-by: Jassi Brar <jassi.brar@samsung.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-01-20spi/s3c64xx: Move src_clk to local driver dataJassi Brar
The pointer to SPI rate source clock had better be the member of driver local data structure rather than platform specific. Also, remove definitions of variable 'sci' that are rendered useless as a consequence. Signed-off-by: Jassi Brar <jassi.brar@samsung.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-01-20spi/s3c64xx: Differentiate ip and rate clockJassi Brar
The instance of SPI clock for controller and that used for generating signals ought to be independently handled. Signed-off-by: Jassi Brar <jassi.brar@samsung.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-01-20spi/s3c64xx: Rename s3c64xx_spi_cntrlr_infoJassi Brar
Rename 'struct s3c64xx_spi_cntrlr_info' to lesser wordy 'struct s3c64xx_spi_info' Signed-off-by: Jassi Brar <jassi.brar@samsung.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-01-20spi/mpc8xxx: don't check platform_get_irq's return value against zeroUwe Kleine-König
platform_get_irq returns -ENXIO on failure, so !irq was probably always true. Make irq a signed variable and compare irq <= 0. Note that a return value of zero is still handled as error even though this could mean irq0. This is a followup to 305b3228f9ff4d59f49e6d34a7034d44ee8ce2f0 that changed the return value of platform_get_irq from 0 to -ENXIO on error. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-01-20spi: Add Freescale/Motorola Coldfire QSPI driverSteven King
Add support for the QSPI controller found some on Freescale/Motorola Coldfire MCUs. Full duplex, active high cs, spi modes 0-3 and word sizes 8-16 bits are supported. The hardware drives the MISO, MOSI and SCLK lines, but the chip selects are managed via GPIO and must be configured by the board code. The QSPI controller has an 80 byte buffer which allows us to transfer up to 16 words at a time. For transfers longer than 16 words, we split the buffer in half so we can update in one half while the controller is operating on the other half. Interrupt latencies then ultimately limits our sustained thru-put to something less than half the maximum speed supported by the part. Signed-off-by: Steven King <sfking@fdwdc.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-01-20spi: make Open Firmware device id constantMárton Németh
The match_table field of the struct of_device_id is constant in <linux/of_platform.h> so it is worth to make the initialization data constant. The semantic match that finds this kind of pattern is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r@ disable decl_init,const_decl_init; identifier I1, I2, x; @@ struct I1 { ... const struct I2 *x; ... }; @s@ identifier r.I1, y; identifier r.x, E; @@ struct I1 y = { .x = E, }; @c@ identifier r.I2; identifier s.E; @@ const struct I2 E[] = ... ; @depends on !c@ identifier r.I2; identifier s.E; @@ + const struct I2 E[] = ...; // </smpl> Signed-off-by: Márton Németh <nm127@freemail.hu> Cc: Julia Lawall <julia@diku.dk> Cc: cocci@diku.dk Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-01-20spi: Fix reversed args to time_before() in Freescale stmp driver.Robert P. J. Day
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-01-20spi: Add SPI master driver for DaVinci/DA8xxSandeep Paulraj
This patch adds support for a SPI master driver for the DaVinci series of SOCs Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com> Signed-off-by: Mark A. Greer <mgreer@mvista.com> Signed-off-by: Philby John <pjohn@in.mvista.com> Signed-off-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-01-12Linux 2.6.33-rc4Linus Torvalds
2010-01-12Merge git://git.infradead.org/battery-2.6Linus Torvalds
* git://git.infradead.org/battery-2.6: pmu_battery: Fix battery full reporting
2010-01-12[SCSI] megaraid_sas: remove sysfs poll_mode_io world writeable permissionsBryn M. Reeves
/sys/bus/pci/drivers/megaraid_sas/poll_mode_io defaults to being world-writable, which seems bad (letting any user affect kernel driver behavior). This turns off group and user write permissions, so that on typical production systems only root can write to it. Signed-off-by: Bryn M. Reeves <bmr@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-01-12Merge branch 'for-linus' of git://gitorious.org/linux-omap-dss2/linuxLinus Torvalds
* 'for-linus' of git://gitorious.org/linux-omap-dss2/linux: OMAP: DSS2: OMAPFB: fix crash when panel driver was not loaded OMAP: DSS2: Reject scaling settings when they cannot be supported OMAP: DSS2: Make check-delay-loops consistent OMAP: DSS2: OMAPFB: fix omapfb_free_fbmem() video/omap: add __init/__exit macros to drivers/video/omap/lcd_htcherald.c OMAP: DSS2: Fix compile warning MAINTAINERS: Combine DSS2 and OMAPFB2 into one entry MAINTAINERS: change omapfb maintainer OMAP: OMAPFB: add dummy release function for omapdss OMAP: OMAPFB: fix clk_get for RFBI OMAP: DSS2: RFBI: convert to new kfifo API OMAP: DSS2: Fix crash when panel doesn't define enable_te() OMAP: DSS2: Collect interrupt statistics OMAP: DSS2: DSI: print debug DCS cmd in hex OMAP: DSS2: DSI: fix VC channels in send_short and send_null
2010-01-12lib: Introduce generic list_sort functionDave Chinner
There are two copies of list_sort() in the tree already, one in the DRM code, another in ubifs. Now XFS needs this as well. Create a generic list_sort() function from the ubifs version and convert existing users to it so we don't end up with yet another copy in the tree. Signed-off-by: Dave Chinner <david@fromorbit.com> Acked-by: Dave Airlie <airlied@redhat.com> Acked-by: Artem Bityutskiy <dedekind@infradead.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-01-12remove my email address from checkpatch.Dave Jones
Maybe this will stop people emailing me about it. Signed-off-by: Dave Jones <davej@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-01-12Merge branch 'upstream-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev: libata: retry link resume if necessary ata_piix: enable 32bit PIO on SATA piix sata_promise: don't classify overruns as HSM errors
2010-01-12Merge master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds
* master.kernel.org:/home/rmk/linux-2.6-arm: ARM: Ensure ARMv6/7 mm files are built using appropriate assembler options ARM: Fix wrong dmb ARM: 5874/1: serial21285: fix disable_irq-from-interrupt-handler deadlock ARM: 5873/1: ARM: Fix the reset logic for ARM RealView boards ARM: 5872/1: ARM: include needed linux/cpu.h in asm/cpu.h ARM: 5871/1: arch/arm: Fix build failure for lpd7a404_defconfig caused by missing includes ARM: 5870/1: arch/arm: Fix build failure for defconfigs without CONFIG_ISA_DMA_API set ARM: 5868/1: ARM: fix "BUG: using smp_processor_id() in preemptible code" ARM: 5867/1: Update U300 defconfig ARM: 5866/1: arm ptrace: use unsigned types for kernel pt_regs [ARM] pxa: fix strange characters in zaurus gpio .desc ARM: add missing recvmmsg syscall number [ARM] pxa: fix compiler warnings of unused variable 'id' in cpu_is_pxa9*() [ARM] pxa: update pwm_backlight->notify() to include missed 'struct device *' [ARM] pxa: enable L2 if present in XSC3 [ARM] pxa: do not enable L2 after MMU is enabled
2010-01-12Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linusLinus Torvalds
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (22 commits) MIPS: Ignore vmlinux.* MIPS: Move vmlinux.ecoff to arch/mips/boot MIPS: cpumask_of_node() should handle -1 as a node MIPS: Octeon: Use non-overflowing arithmetic in sched_clock MIPS: Malta, PowerTV: Remove unnecessary "Linux started" MIPS: BCM63xx: Remove duplicate CONFIG_CMDLINE. MIPS: AR7: Remove unused prom_getchar() MIPS: PowerTV: Remove extra r4k_clockevent_init() call MIPS: Cobalt use strlcat() for the command line arguments MIPS: Octeon: Add sched_clock() to csrc-octeon.c MIPS: TXx9: Cleanup builtin-cmdline processing MIPS: PowerTV: simplify prom_init_cmdline() and merge into prom_init() MIPS: PowerTV: Remove unused platform_die() MIPS: PowerTV: Remove mips_machine_halt() MIPS: PowerTV: Remove unused ptv_memsize MIPS: PowerTV: Remove unused prom_getcmdline() MIPS: AR7: Remove kgdb_enabled MIPS: Alchemy: Correct code taking the size of a pointer MIPS: BCM63xx: Fix whitespace damaged board_bcm963xx.c MIPS: VR41xx: Use strlcat() for the command line arguments ...
2010-01-12Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: ALSA: hda - Fix ALC861-VD capture source mixer ALSA: ac97: add AC97 STMicroelectronics' codecs ALSA: ac97: Add Dell Dimension 2400 to Headphone/Line Jack Sense blacklist ASoC: Fix WM8350 DSP mode B configuration sbawe: fix memory detection part 2 sound: oss: off by one bug ALSA: usb-audio - Avoid Oops after disconnect ALSA: test off by one in setsamplerate() ALSA: atiixp: Specify codec for Foxconn RC4107MA-RS2
2010-01-12Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6Linus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (56 commits) sky2: Fix oops in sky2_xmit_frame() after TX timeout Documentation/3c509: document ethtool support af_packet: Don't use skb after dev_queue_xmit() vxge: use pci_dma_mapping_error to test return value netfilter: ebtables: enforce CAP_NET_ADMIN e1000e: fix and commonize code for setting the receive address registers e1000e: e1000e_enable_tx_pkt_filtering() returns wrong value e1000e: perform 10/100 adaptive IFS only on parts that support it e1000e: don't accumulate PHY statistics on PHY read failure e1000e: call pci_save_state() after pci_restore_state() netxen: update version to 4.0.72 netxen: fix set mac addr netxen: fix smatch warning netxen: fix tx ring memory leak tcp: update the netstamp_needed counter when cloning sockets TI DaVinci EMAC: Handle emac module clock correctly. dmfe/tulip: Let dmfe handle DM910x except for SPARC on-board chips ixgbe: Fix compiler warning about variable being used uninitialized netfilter: nf_ct_ftp: fix out of bounds read in update_nl_seq() mv643xx_eth: don't include cache padding in rx desc buffer size ... Fix trivial conflict in drivers/scsi/cxgb3i/cxgb3i_offload.c
2010-01-12m68knommu: fix definitions of __pa() and __va()Greg Ungerer
Fix compilation breakage of all m68knommu targets: CC arch/m68knommu/kernel/asm-offsets.s In file included from include/linux/sched.h:77, from arch/m68knommu/kernel/asm-offsets.c:12: include/linux/percpu.h: In function 'per_cpu_ptr_to_phys': include/linux/percpu.h:161: error: implicit declaration of function 'virt_to_phy This is broken in linux-2.6.33-rc3. Change the definitions of __pa() and __va() to not use virt_to_phys() and phys_to_virt(). Trivial 1:1 conversion required for the non-MMU case. A side effect if this is that the m68knommu can now use asm/virtconvert.h for the definition of virt_to_phys() and phys_to_virt(). Also cleaned up the definition of page_to_phys() when moving into virtconvert.h. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-01-12libata: retry link resume if necessaryTejun Heo
Interestingly, when SIDPR is used in ata_piix, writes to DET in SControl sometimes get ignored leading to detection failure. Update sata_link_resume() such that it reads back SControl after clearing DET and retry if it's not clear. Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: fengxiangjun <fengxiangjun@neusoft.com> Reported-by: Jim Faulkner <jfaulkne@ccs.neu.edu> Cc: stable@kernel.org Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2010-01-12ata_piix: enable 32bit PIO on SATA piixTejun Heo
Commit 871af1210f13966ab911ed2166e4ab2ce775b99d enabled 32bit PIO for PATA piix but didn't for SATA. There's no reason not to use 32bit PIO on SATA piix. Enable it. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2010-01-12sata_promise: don't classify overruns as HSM errorsMikael Pettersson
When sata_promise encounters an overrun or underrun error it translates that to a libata AC_ERR_HSM, causing a hard reset. Since over/under-runs were thought to be rare and transient, this action seemed reasonable. Unfortunately it turns out that the controller throws overrun errors when e.g. hal polls a CD or DVD writer containing blank media, causing long sequences of hard resets and retries before EH finally gives up. This patch updates sata_promise to classify over/under-runs as AC_ERR_OTHER instead. This allows libata EH and upper layers to retry or fail the operation as they see fit without the disruption caused by repeated hard resets. This fixes a problem using a DVD-RAM drive with sata_promise, reported by Thomas Schorpp. I also tested it on a DVD-RW drive. Signed-off-by: Mikael Pettersson <mikpe@it.uu.se> Tested-by: thomas schorpp <thomas.schorpp@googlemail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2010-01-12ARM: Ensure ARMv6/7 mm files are built using appropriate assembler optionsRussell King
A kernel with both ARMv6 and ARMv7 selected results in build errors. Fix this by specifying the proper architectures for these assembly files. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-01-12ARM: Fix wrong dmbRussell King
The __kuser_cmpxchg code uses an ARMv6 dmb instruction, rather than one based upon the architecture being built for. Switch to using the macro provided for this purpose, which also eliminates the need for an ifdef. Acked-by: Nicolas Pitre <nico@fluxnic.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-01-12MIPS: Ignore vmlinux.*Yoichi Yuasa
Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org> Cc: linux-mips <linux-mips@linux-mips.org> Patchwork: http://patchwork.linux-mips.org/patch/795/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2010-01-12MIPS: Move vmlinux.ecoff to arch/mips/bootYoichi Yuasa
It moves to the same directory as the boot files in other formats. Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org> Cc: linux-mips <linux-mips@linux-mips.org> Patchwork: http://patchwork.linux-mips.org/patch/796/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2010-01-12MIPS: cpumask_of_node() should handle -1 as a nodeAnton Blanchard
pcibus_to_node can return -1 if we cannot determine which node a pci bus is on. If passed -1, cpumask_of_node will negatively index the lookup array and pull in random data: # cat /sys/devices/pci0000:00/0000:00:01.0/local_cpus 00000000,00000003,00000000,00000000 # cat /sys/devices/pci0000:00/0000:00:01.0/local_cpulist 64-65 Change cpumask_of_node to check for -1 and return cpu_all_mask in this case: # cat /sys/devices/pci0000:00/0000:00:01.0/local_cpus ffffffff,ffffffff,ffffffff,ffffffff # cat /sys/devices/pci0000:00/0000:00:01.0/local_cpulist 0-127 Signed-off-by: Anton Blanchard <anton@samba.org> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Andrew Morton <akpm@linux-foundation.org> Patchwork: http://patchwork.linux-mips.org/patch/831/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2010-01-12MIPS: Octeon: Use non-overflowing arithmetic in sched_clockDavid Daney
With typical mult and shift values, the calculation for Octeon's sched_clock overflows when using 64-bit arithmetic. Use 128-bit calculations instead. Signed-off-by: David Daney <ddaney@caviumnetworks.com> To: linux-mips@linux-mips.org Patchwork: http://patchwork.linux-mips.org/patch/849/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>