summaryrefslogtreecommitdiffstats
path: root/lib/locking-selftest-spin-hardirq.h
blob: 693198dce30ab0e88aff2eac1fe24ee4e2d4aae8 (plain) (blame)
1
2
#include "locking-selftest-spin.h"
#include "locking-selftest-hardirq.h"
='column1'>| | | | | | | | | | | | | | | | | | | | devicetree/next changes queued for v3.3 merge window * tag 'devicetree-for-linus-20120104' of git://git.secretlab.ca/git/linux-2.6: ARM: prom.h: Fix build error by removing unneeded header file irq: check domain hwirq range for DT translate dt: add empty of_get_node/of_put_node functions of/pdt: fix section mismatch warning i2c-designware: add OF binding support dt/i2c: Enumerate some of the known trivial i2c devices dt: reform for_each_property to for_each_property_of_node ARM/of: allow *machine_desc.dt_compat to be const of/base: Take NULL string into account for property with multiple strings OF/device-tree: Add some entries to vendor-prefixes.txt Fix up trivial add-add conflicts in include/linux/of.h | * ARM: prom.h: Fix build error by removing unneeded header fileFabio Estevam2012-01-051-0/+1 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the following build error: CC [M] fs/udf/balloc.o In file included from /home/fabio/next/linux-next/arch/arm/include/asm/prom.h:16, from include/linux/of.h:140, from include/asm-generic/gpio.h:7, from arch/arm/plat-mxc/include/mach/irqs.h:14, from /home/fabio/next/linux-next/arch/arm/include/asm/irq.h:4, from /home/fabio/next/linux-next/arch/arm/include/asm/hardirq.h:6, from include/linux/hardirq.h:7, from include/linux/highmem.h:8, from include/linux/pagemap.h:10, from include/linux/buffer_head.h:13, from fs/udf/udfdecl.h:11, from fs/udf/balloc.c:22: /home/fabio/next/linux-next/arch/arm/include/asm/setup.h:146: error: redefinition of 'struct tag' Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> [grant.likely: fix build failure on drivers/of/fdt.c] Signed-off-by: Grant Likely <grant.likely@secretlab.ca> | * of/pdt: fix section mismatch warningSam Ravnborg2011-12-271-1/+1 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the following section mismatch warning - seen when building sparc32: WARNING: vmlinux.o(.text+0x1ff9c0): Section mismatch in reference from the function kernel_tree_alloc() to the function .init.text:prom_early_alloc() The function kernel_tree_alloc() references the function __init prom_early_alloc(). This is often because kernel_tree_alloc lacks a __init annotation or the annotation of prom_early_alloc is wrong. prom_early_alloc() is annotated __init, and users of kernel_tree_alloc() is also annotated __init. So simply match the annoation of these to fix the warning. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Grant Likely <grant.likely@secretlab.ca> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Rob Herring <rob.herring@calxeda.com> | * i2c-designware: add OF binding supportRob Herring2011-12-271-0/+12 | | | | | | | | | | | | | | | | | | | | | | Add of_match_table and DT style i2c registration to designware i2c driver. Refactored for pci/plat split by Dirk Brandewie. Signed-off-by: Rob Herring <rob.herring@calxeda.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com> | * dt: reform for_each_property to for_each_property_of_nodeDong Aisheng2011-12-271-1/+1 | | | | | | | | | | | | | | | | | | Make this macro easier to use(do not need to pass properties, a node is enough), also change to a more sensible name as for_each_child_of_node. Signed-off-by: Dong Aisheng <dong.aisheng@linaro.org> Cc: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Rob Herring <rob.herring@calxeda.com> | * ARM/of: allow *machine_desc.dt_compat to be constUwe Kleine-König2011-12-271-2/+2 | | | | | | | | | | | | | | This allows dt_compat to point to a constant list of compatible strings. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Rob Herring <rob.herring@calxeda.com> | * of/base: Take NULL string into account for property with multiple stringsBenoit Cousson2011-12-191-5/+3Star | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current implementation just ignore any NULL string inserted in a multiple strings property. In some cases we can have a property with a fix number of strings but not necessarily used, like for example in a list of valid pinmux modes. prop = "uart_rx", "uart_tx", "", "", "safe_mode"; Do no skip NULL string and take them into account in of_property_read_string_index and of_property_count_strings. Reported-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Benoit Cousson <b-cousson@ti.com> Cc: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Rob Herring <rob.herring@calxeda.com> * | Merge tag 'spi-for-linus' of git://git.secretlab.ca/git/linux-2.6Linus Torvalds2012-01-074-28/+44 |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | spi changes queued up for v3.3 merge window * tag 'spi-for-linus-20120104' of git://git.secretlab.ca/git/linux-2.6: spi: Fix device unregistration when unregistering the bus master spi-topcliff-pch: Change company name OKI SEMICONDUCTOR to LAPIS Semiconductor spi-topcliff-pch: Support new device LAPIS Semiconductor ML7831 IOH spi/omap: Correct the error path spi/omap: call pm_runtime_disable in error path and remove spi/omap: Use a workqueue per omap2_mcspi controller | * \ Merge branch 'spi/next' (early part) into spi/mergeGrant Likely2012-01-053-27/+43 | |\ \ | | * | spi-topcliff-pch: Change company name OKI SEMICONDUCTOR to LAPIS SemiconductorTomoya MORINAGA2011-10-291-6/+6 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On October 1 in 2011, OKI SEMICONDUCTOR Co., Ltd. changed the company name in to LAPIS Semiconductor Co., Ltd. Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.lapis-semi.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca> | | * | spi-topcliff-pch: Support new device LAPIS Semiconductor ML7831 IOHTomoya MORINAGA2011-10-292-4/+7 | | | | | | | | | | | | | | | | | | | | | | | | | | | | ML7831 is companion chip for Intel Atom E6xx series. Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.lapis-semi.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca> | | * | spi/omap: Correct the error pathShubhrajyoti D2011-10-291-12/+20 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently McSPI driver doesnt follow correct failure fallback steps attempting to correct the same. Also: - label names changed to give meaningful names. - Setting the driver data to NULL in remove Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com> Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca> | | * | spi/omap: call pm_runtime_disable in error path and removeShubhrajyoti D2011-10-291-0/+2 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | omap mcspi probe() doesnt call pm_runtime disable functions in case of failure. remove() doesnt call pm_runtime disable. This could lead to warnings as below on subsequent insmod. ~# insmod spi-omap2-mcspi.ko [ 255.383671] omap2_mcspi omap2_mcspi.1: Unbalanced pm_runtime_enable! ... This patch adds the pm_runtime disable() at appropriate stages. Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com> Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca> | | * | spi/omap: Use a workqueue per omap2_mcspi controllerShubhrajyoti D2011-10-291-8/+11 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently all the spi controllers share the work queue. This patch allocates a work queue per controller. Signed-off-by: Steve Wilkins <steve.wilkins@raymarine.com> Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca> | * | | spi: Fix device unregistration when unregistering the bus masterLaurent Pinchart2011-12-141-1/+1 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Device are added as children of the bus master's parent device, but spi_unregister_master() looks for devices to unregister in the bus master's children. This results in the child devices not being unregistered. Fix this by registering devices as direct children of the bus master. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca> * | | | Merge tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux-2.6Linus Torvalds2012-01-0727-319/+456 |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes queued in gpio/next for the start of the 3.3 merge window * tag 'gpio-for-linus-20120104' of git://git.secretlab.ca/git/linux-2.6: gpio: Add decode of WM8994 GPIO configuration gpio: Convert GPIO drivers to module_platform_driver gpio: Fix typo in comment in Samsung driver gpio: Explicitly index samsung_gpio_cfgs gpio: Add Linus Walleij as gpio co-maintainer of: Add device tree selftests of: create of_phandle_args to simplify return of phandle parsing data gpio/powerpc: Eliminate duplication of of_get_named_gpio_flags() gpio/microblaze: Eliminate duplication of of_get_named_gpio_flags() gpiolib: output basic details and consolidate gpio device drivers pch_gpio: Change company name OKI SEMICONDUCTOR to LAPIS Semiconductor pch_gpio: Support new device LAPIS Semiconductor ML7831 IOH spi/pl022: make the chip deselect handling thread safe spi/pl022: add support for pm_runtime autosuspend spi/pl022: disable the PL022 block when unused spi/pl022: move device disable to workqueue thread spi/pl022: skip default configuration before suspending spi/pl022: fix build warnings spi/pl022: only enable RX interrupts when TX is complete | * | | | gpio: Add decode of WM8994 GPIO configurationMark Brown2012-01-021-2/+77 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the human reader. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca> | * | | | gpio: Convert GPIO drivers to module_platform_driverMark Brown2012-01-0211-128/+11Star | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Where appropriate factor out some boilerplate code for platform device registration into module_platform_driver. Drivers that don't use the standard module_init initcall haven't been converted. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca> | * | | | gpio: Fix typo in comment in Samsung driverMark Brown2012-01-021-1/+1 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca> | * | | | gpio: Explicitly index samsung_gpio_cfgsMark Brown2012-01-021-10/+19 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make it easier to follow the by number references into samsung_gpio_cfgs by putting the indexes into the code initialising the array, improving readability a bit. Ideally we wouldn't be using magic array indexes at all but this is easier than coming up with a better way. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca> | * | | | Merge branch 'pl022' of ↵Grant Likely2011-12-131-56/+85 | |\ \ \ \ | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson into gpio/next | | * | | | spi/pl022: make the chip deselect handling thread safeVirupax Sadashivpetimath2011-12-011-35/+37 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a possibility that the pump_message and giveback run in parallel on a SMP system. Both the pump_message and giveback threads work on the same SPI message queue. Results will be in correct if the pump_message gets to work on the queue first. when the pump_message works with the queue, it reads the head of the queue and removes it from the queue. pump_message activates the chip select depending on this message read. This leads to giveback working on the modified queue or a emptied queue. If the queue is empty or if the next message on the queue (which is not the actual next message, as the pump message has removed the next message from the queue) is not for the same SPI device as that Of the previous one, giveback will de-activate the chip select activated by pump_message(), which is wrong. To solve this problem pump_message is made not to run and access the queue until the giveback is done handling the queue. I.e. by making the cur_msg NULL after the giveback has read the queue. Also a state variable has been introduced to keep track of when the CS for next message is already activated and avoid to double-activate it. Reviewed-by: Viresh Kumar <viresh.kumar@st.com> Signed-off-by: Virupax Sadashivpetimath <virupax.sadashivpetimath@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> | | * | | | spi/pl022: add support for pm_runtime autosuspendChris Blair2011-12-011-2/+18 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds support for configuring the spi bus to use autosuspend for runtime power management. This can reduce the latency in starting an spi transfer by not suspending the device immediately following completion of a transfer. If another transfer then takes place before the autosuspend timeout, the call to resume the device can return immediately rather than needing to risk sleeping in order to resume the device. Reviewed-by: Viresh Kumar <viresh.kumar@st.com> Signed-off-by: Chris Blair <chris.blair@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> | | * | | | spi/pl022: disable the PL022 block when unusedVirupax Sadashivpetimath2011-12-011-1/+5 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure we clear the enable bit when the block is not used. This will save some energy in certain hardware versions. Reviewed-by: Viresh Kumar <viresh.kumar@st.com> Signed-off-by: Virupax Sadashivpetimath <virupax.sadashivpetimath@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> | | * | | | spi/pl022: move device disable to workqueue threadChris Blair2011-12-011-9/+16 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Moves the disabling of the device and clocks to the same thread in which the device and clocks are enabled. This avoids SMP issues where the device can be enabled for a transfer by one thread and then disabled by the completion of the previous transfer in another thread. Reviewed-by: Viresh Kumar <viresh.kumar@st.com> Signed-off-by: Chris Blair <chris.blair@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> | | * | | | spi/pl022: skip default configuration before suspendingVirupax Sadashivpetimath2011-12-011-5/+0Star | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The loading of the default configuration before suspending has been in the driver since its inception, but it is not really needed. Especially so since we take to all the trouble of enabling and disabling power and clock just to do this. Let's scrap this now. Reviewed-by: Viresh Kumar <viresh.kumar@st.com> Signed-off-by: Virupax Sadashivpetimath <virupax.sadashivpetimath@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> | | * | | | spi/pl022: fix build warningsJonas Aaberg2011-12-011-1/+1 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The driver build complains with newer compilers unless you initialize this struct properly. Reviewed-by: Viresh Kumar <viresh.kumar@st.com> Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> | | * | | | spi/pl022: only enable RX interrupts when TX is completeChris Blair2011-12-011-5/+10 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For interrupt mode transfers, start with only TX interrupts enabled to reduce the overall number of interrupts received. Once TX is complete, enable RX interrupts to complete the transfer. Reviewed-by: Viresh Kumar <viresh.kumar@st.com> Signed-off-by: Chris Blair <chris.blair@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> | * | | | | of: Add device tree selftestsGrant Likely2011-12-123-0/+149 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add some runtime test cases for the library of device tree parsing functions. v2: - Add testcase for phandle with 0 args - Don't run testcases if testcase data isn't present in device tree Signed-off-by: Grant Likely <grant.likely@secretlab.ca> | * | | | | of: create of_phandle_args to simplify return of phandle parsing dataGrant Likely2011-12-122-95/+94Star | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of_parse_phandle_with_args() needs to return quite a bit of data. Rather than making each datum a separate **out_ argument, this patch creates struct of_phandle_args to contain all the returned data and reworks the user of the function. This patch also enables of_parse_phandle_with_args() to return the device node pointer for the phandle node. This patch also ends up being fairly major surgery to of_parse_handle_with_args(). The existing structure didn't work well when extending to use of_phandle_args, and I discovered bugs during testing. I also took the opportunity to rename the function to be like the existing of_parse_phandle(). v2: - moved declaration of of_phandle_args to fix compile on non-DT builds - fixed incorrect index in example usage - fixed incorrect return code handling for empty entries Reviewed-by: Shawn Guo <shawn.guo@freescale.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca> | * | | | | gpio/powerpc: Eliminate duplication of of_get_named_gpio_flags()Grant Likely2011-12-121-1/+1 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A large chunk of qe_pin_request() is unnecessarily cut-and-paste directly from of_get_named_gpio_flags(). This patch cuts out the duplicate code and replaces it with a call to of_get_gpio(). v2: fixed compile error due to missing gpio_to_chip() Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Kumar Gala <galak@kernel.crashing.org> | * | | | | gpiolib: output basic details and consolidate gpio device driversGrant Likely2011-12-129-18/+9Star | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a kernel message, containing GPIO range and device name on successful device registration, and removes duplicate messages from the following drivers: * gpio-adp5588 * gpio-bt8xx * gpio-cs5535 * gpio-janz-ttl * gpio-nomadik * gpio-pcf857x * gpio-xilinx * drivers/of/gpio.c Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> [grant.likely@secretlab.ca: squashed 2 patches together] Signed-off-by: Grant Likely <grant.likely@secretlab.ca> | * | | | | pch_gpio: Change company name OKI SEMICONDUCTOR to LAPIS SemiconductorTomoya MORINAGA2011-12-121-3/+3 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On October 1 in 2011, OKI SEMICONDUCTOR Co., Ltd. changed the company name in to LAPIS Semiconductor Co., Ltd. Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.lapis-semi.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca> | * | | | | pch_gpio: Support new device LAPIS Semiconductor ML7831 IOHTomoya MORINAGA2011-12-122-5/+7 | | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | ML7831 is companion chip for Intel Atom E6xx series. Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.lapis-semi.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca> * | | | | Merge branch 'driver-core-next' of ↵Linus Torvalds2012-01-07