summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* kbuild: asm symlink support for arch/$ARCH/includeSam Ravnborg2008-07-252-16/+29
| | | | | | | | | | Adjust the asm symlink support so we do not create the symlink unless really needed. We check the precense of include/asm-$ARCH by checking for the system.h file. We may end up with a stale directory so it is not enough to check if the directory is present. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
* kbuild: support arch/$ARCH/include for tags, cscopeSam Ravnborg2008-07-251-1/+5
| | | | Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
* kbuild: prepare headers_* for arch/$ARCH/includeSam Ravnborg2008-07-252-27/+63
| | | | | | | | | | | | | | Factor out the headers_*_all support to a seperate shell script and add support for arch specific header files can be located in either arch/$ARCH/include/asm or include/asm-$ARCH/ In "make help" always display the headers_* targets. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
* kbuild: install all headers when arch is changedSam Ravnborg2008-07-252-8/+12
| | | | | | | | | | We see some header files that are selected dependent on the actual architecture so force a reinstallation of all header files when the arch changes. This slows down "make headers_check_all" but then we better reflect reality. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
* kbuild: make clean removes *.o.* as wellAlexey Dobriyan2008-07-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Those are left presumably from aborted ccache(1) compilations: arch/x86/kernel/.tmp_io_apic_64.o.T5veul arch/x86/kvm/.tmp_x86.o.SZWn69 arch/x86/mm/.tmp_pgtable.o.sL1LTf drivers/ieee1394/.tmp_ieee1394_transactions.o.bUj6o1 drivers/infiniband/hw/mlx4/.tmp_main.o.vy0ep6 BTW, with git there is nice way to check for such nuisainces: make mrproper git-ls-files -o should give empty output. More precise wildcard spec from: Jan Engelhardt <jengelh@medozas.de> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Jan Engelhardt <jengelh@medozas.de>
* kbuild: optimize headers_* targetsSam Ravnborg2008-07-254-92/+161
| | | | | | | | | | | | | | | | | | | | | | | | Move the core functionality of headers_install and headers_check to two small perl scripts. The makefile is adapted to use the perl scrip and changed to operate on all files in a directory. So if one file is changed then all files in the directory is processed. perl were chosen for the helper scripts because this is pure text processing which perl is good at and especially the headers_check.pl script are expected to see changes / new checks implmented. The speed is ~300% faster on this box. And the output generated to the screen is now down to two lines per directory (one for install, one for check) so it is easier to scroll back after a kernel build. The perl scripts has been brought to sanity by patient feedback from: Vegard Nossum <vegard.nossum@gmail.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
* kbuild: only one call for include/ in make headers_*Sam Ravnborg2008-07-253-22/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move it to the top-level file to decide if we install/check the generic headers or the arch specific headers. This revealed a long standing bug where "make headers_check_all" relied on the files in asm/ for the current architecture. So make headers_check_all is now broken by this commit. In addition: o add a simpler way to detect if an arch support exporting header files. o add 'set -e;' so we error out early if make headers_check_all fails. o add sparc64 and cris to arch we do not process in make headers_*_all because: sparc64 - use sparc to export headers cris - is know seriously broken Includes suggestions from: David Woodhouse <dwmw2@infradead.org>. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: David Woodhouse <dwmw2@infradead.org>
* kbuild: error out early in make headers_installSam Ravnborg2008-07-251-4/+6
| | | | | | | | Fix the a.out.h case by setting SRCARCH and error out early in case of an error. The a.out.h case failed with the *_all targets. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
* kbuild: code refactoring in Makefile.headerinstSam Ravnborg2008-07-251-29/+35
| | | | | | No functional changes just improved readability Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
* kbuild: drop support of ALTARCH for headers_*Sam Ravnborg2008-07-251-75/+9
| | | | | | | | | | | | | | ALTARCH is no longer used by any arch(*) so drop support for this from Makefile.headerinst Dropping ALTARCH support simplifies Makefile.headerinst (*) sparc64 uses it but work is ongoing to drop it and no furter usage is planned. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: David Woodhouse <dwmw2@infradead.org> Cc: David Miller <davem@davemloft.net>
* kbuild: always unifdef files in headers_install*Sam Ravnborg2008-07-251-19/+10
| | | | | | | | | | | | | | unifdef utility is fast enough to warrant that we always run the scripts through unifdef. This patch runs all headers listed with header-y and unifdef-y through unifdef. Next step is to drop unifdef-y in all Kbuild files and that can now be done in smaller steps. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Adrian Bunk <bunk@kernel.org>
* kbuild: refactor headers_* targets in MakefileSam Ravnborg2008-07-251-16/+23
| | | | | | | | | | | | | o Use lower case for local variables o Add a helper target for common targets o Use $(hdr-inst)= ... to make Make invocations simpler o Add -rR to make invocations In total this adds more lines than it removes but the benefit is better readability Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: David Woodhouse <dwmw2@infradead.org>
* Merge branch 'merge' of ↵Linus Torvalds2008-07-2549-277/+2546
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (34 commits) powerpc: Wireup new syscalls Move update_mmu_cache() declaration from tlbflush.h to pgtable.h powerpc/pseries: Remove kmalloc call in handling writes to lparcfg powerpc/pseries: Update arch vector to indicate support for CMO ibmvfc: Add support for collaborative memory overcommit ibmvscsi: driver enablement for CMO ibmveth: enable driver for CMO ibmveth: Automatically enable larger rx buffer pools for larger mtu powerpc/pseries: Verify CMO memory entitlement updates with virtual I/O powerpc/pseries: vio bus support for CMO powerpc/pseries: iommu enablement for CMO powerpc/pseries: Add CMO paging statistics powerpc/pseries: Add collaborative memory manager powerpc/pseries: Utilities to set firmware page state powerpc/pseries: Enable CMO feature during platform setup powerpc/pseries: Split retrieval of processor entitlement data into a helper routine powerpc/pseries: Add memory entitlement capabilities to /proc/ppc64/lparcfg powerpc/pseries: Split processor entitlement retrieval and gathering to helper routines powerpc/pseries: Remove extraneous error reporting for hcall failures in lparcfg powerpc: Fix compile error with binutils 2.15 ... Fixed up conflict in arch/powerpc/platforms/52xx/Kconfig manually.
| * powerpc: Wireup new syscallsTony Breeds2008-07-253-1/+14
| | | | | | | | | | | | | | signalfd4, eventfd2, epoll_create1, dup3, pipe2 and inotify_init1 Signed-off-by: Tony Breeds <tony@bakeyournoodle.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * Move update_mmu_cache() declaration from tlbflush.h to pgtable.hBenjamin Herrenschmidt2008-07-252-11/+13
| | | | | | | | | | where it belongs. This fixes some build problems on some configs Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * powerpc/pseries: Remove kmalloc call in handling writes to lparcfgNathan Fontenot2008-07-251-16/+12
| | | | | | | | | | | | | | | | | | | | | | There are only 4 valid name=value pairs for writes to /proc/ppc64/lparcfg. Current code allocates a buffer to copy this information in from the user. Since the longest name=value pair will easily fit into a buffer of 64 characters, simply put the buffer on the stack instead of allocating the buffer. Signed-off-by: Nathan Fotenot <nfont@austin.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * powerpc/pseries: Update arch vector to indicate support for CMONathan Fontenot2008-07-251-1/+8
| | | | | | | | | | | | | | | | | | | | Update the architecture vector to indicate that Cooperative Memory Overcommitment is supported if CONFIG_PPC_SMLPAR is set. Signed-off-by: Nathan Fontenot <nfont@austin.ibm.com> Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com> Acked-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * ibmvfc: Add support for collaborative memory overcommitBrian King2008-07-251-0/+15
| | | | | | | | | | | | | | | | | | Adds support to the ibmvfc driver for collaborative memory overcommit. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com> Acked-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * ibmvscsi: driver enablement for CMORobert Jennings2008-07-252-7/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable the driver to function in a Cooperative Memory Overcommitment (CMO) environment. The following changes are made to enable the driver for CMO: * DMA mapping errors will not result in error messages if entitlement has been exceeded and resources were not available. * The driver has a get_desired_dma function defined to function in a CMO environment. It will indicate how much IO memory it would like to function. Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com> Acked by: Brian King <brking@linux.vnet.ibm.com> Acked-by: Paul Mackerras <paulus@samba.org> Acked-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * ibmveth: enable driver for CMORobert Jennings2008-07-252-34/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable ibmveth for Cooperative Memory Overcommitment (CMO). For this driver it means calculating a desired amount of IO memory based on the current MTU and updating this value with the bus when MTU changes occur. Because DMA mappings can fail, we have added a bounce buffer for temporary cases where the driver can not map IO memory for the buffer pool. The following changes are made to enable the driver for CMO: * DMA mapping errors will not result in error messages if entitlement has been exceeded and resources were not available. * DMA mapping errors are handled gracefully, ibmveth_replenish_buffer_pool() is corrected to check the return from dma_map_single and fail gracefully. * The driver will have a get_desired_dma function defined to function in a CMO environment. * When the MTU is changed, the driver will update the device IO entitlement Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com> Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: Santiago Leon <santil@us.ibm.com> Acked-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * ibmveth: Automatically enable larger rx buffer pools for larger mtuSantiago Leon2008-07-251-7/+13
| | | | | | | | | | | | | | | | | | | | | | Activates larger rx buffer pools when the MTU is changed to a larger value. This patch de-activates the large rx buffer pools when the MTU changes to a smaller value. Signed-off-by: Santiago Leon <santil@us.ibm.com> Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com> Acked-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * powerpc/pseries: Verify CMO memory entitlement updates with virtual I/ONathan Fontenot2008-07-251-0/+10
| | | | | | | | | | | | | | | | | | Verify memory entitlement updates can be handled by vio. Signed-off-by: Nathan Fontenot <nfont@austin.ibm.com> Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com> Acked-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * powerpc/pseries: vio bus support for CMORobert Jennings2008-07-252-8/+1052
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a large patch but the normal code path is not affected. For non-pSeries platforms the code is ifdef'ed out and for non-CMO enabled pSeries systems this does not affect the normal code path. Devices that do not perform DMA operations do not need modification with this patch. The function get_desired_dma was renamed from get_io_entitlement for clarity. Overview Cooperative Memory Overcommitment (CMO) allows for a set of OS partitions to be run with less RAM than the aggregate needs of the group of partitions. The firmware will balance memory between the partitions and page in/out memory as needed. Based on the number and type of IO adpaters preset each partition is allocated an amount of memory for DMA operations and this allocation will be guaranteed to the partition; this is referred to as the partition's 'entitlement'. Partitions running in a CMO environment can only have virtual IO devices present. The VIO bus layer will manage the IO entitlement for the system. Accounting, at a system and per-device level, is tracked in the VIO bus code and exposed via sysfs. A set of dma_ops functions are added to the bus to allow for this accounting. Bus initialization At initialization, the bus will calculate the minimum needs of the system based on providing each device present with a standard minimum entitlement along with a spare allocation for the bus to handle hotplug events. If the minimum needs can not be met the system boot will be halted. Device changes The significant changes for devices while running under CMO are that the devices must specify how much dedicated IO entitlement they desire and must also handle DMA mapping errors that can occur due to constrained IO memory. The virtual IO drivers are modified to silence errors when DMA mappings fail for CMO and handle these failures gracefully. Each devices will be guaranteed a minimum entitlement that can always be mapped. Devices will specify how much entitlement they desire and the VIO bus will attempt to provide for this. Devices can change their desired entitlement level at any point in time to address particular needs (via vio_cmo_set_dev_desired()), not just at device probe time. VIO bus changes The system will have a particular entitlement level available from which it can provide memory to the devices. The bus defines two pools of memory within this entitlement, the reserved and excess pools. Each device is provided with it's own entitlement no less than a system defined minimum entitlement and no greater than what the device has specified as it's desired entitlement. The entitlement provided to devices comes from the reserve pool. The reserve pool can also contain a spare allocation as large as the system defined minimum entitlement which is used for device hotplug events. Any entitlement not needed to fulfill the needs of a reserve pool is placed in the excess pool. Each device is guaranteed that it can map up to it's entitled level; additional mapping are possible as long as there is unmapped memory in the excess pool. Bus probe As the system starts, each device is given an entitlement equal only to the system defined minimum entitlement. The reserve pool is equal to the sum of these entitlements, plus a spare allocation. The VIO bus also tracks the aggregate desired entitlement of all the devices. If the system desired entitlement is greater than the size of the reserve pool, when devices unmap IO memory it will be reserved and a balance operation will be scheduled for some time in the future. Entitlement balancing The balance function tries to fairly distribute entitlement between the devices in the system with the goal of providing each device with it's desired amount of entitlement. Devices using more than what would be ideal will have their entitled set-point adjusted; this will effectively set a goal for lower IO memory usage as future mappings can fail and deallocations will trigger a balance operation to distribute the newly unmapped memory. A fair distribution of entitlement can take several balance operations to achieve. Entitlement changes and device DLPAR events will alter the state of CMO and will trigger balance operations. Hotplug events The VIO bus allows for changes in system entitlement at run-time via 'vio_cmo_entitlement_update()'. When devices are added the hotplug device event will be preceded by a system entitlement increase and this is reversed when devices are removed. The following changes are made that the VIO bus layer for CMO: * add IO memory accounting per device structure. * add IO memory entitlement query function to driver structure. * during vio bus probe, if CMO is enabled, check that driver has memory entitlement query function defined. Fail if function not defined. * fail to register driver if io entitlement function not defined. * create set of dma_ops at vio level for CMO that will track allocations and return DMA failures once entitlement is reached. Entitlement will limited by overall system entitlement. Devices will have a reserved quantity of memory that is guaranteed, the rest can be used as available. * expose entitlement, current allocation, desired allocation, and the allocation error counter for devices to the user through sysfs * provide mechanism for changing a device's desired entitlement at run time for devices as an exported function and sysfs tunable * track any DMA failures for entitled IO memory for each vio device. * check entitlement against available system entitlement on device add * track entitlement metrics (high water mark, current usage) * provide function to reset high water mark * provide minimum and desired entitlement numbers at a bus level * provide drivers with a minimum guaranteed entitlement * balance available entitlement between devices to satisfy their needs * handle system entitlement changes and device hotplug Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com> Acked-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * powerpc/pseries: iommu enablement for CMORobert Jennings2008-07-257-20/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To support Cooperative Memory Overcommitment (CMO), we need to check for failure from some of the tce hcalls. These changes for the pseries platform affect the powerpc architecture; patches for the other affected platforms are included in this patch. pSeries platform IOMMU code changes: * platform TCE functions must handle H_NOT_ENOUGH_RESOURCES errors and return an error. Architecture IOMMU code changes: * Calls to ppc_md.tce_build need to check return values and return DMA_MAPPING_ERROR for transient errors. Architecture changes: * struct machdep_calls for tce_build*_pSeriesLP functions need to change to indicate failure. * all other platforms will need updates to iommu functions to match the new calling semantics; they will return 0 on success. The other platforms default configs have been built, but no further testing was performed. Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com> Acked-by: Olof Johansson <olof@lixom.net> Acked-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * powerpc/pseries: Add CMO paging statisticsBrian King2008-07-252-1/+24
| | | | | | | | | | | | | | | | | | | | | | With the addition of Cooperative Memory Overcommitment (CMO) support for IBM Power Systems, two fields have been added to the VPA to report paging statistics. Add support in lparcfg to report them to userspace. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com> Acked-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * powerpc/pseries: Add collaborative memory managerBrian King2008-07-253-0/+492
| | | | | | | | | | | | | | | | | | | | | | | | | | Adds a collaborative memory manager, which acts as a simple balloon driver for System p machines that support cooperative memory overcommitment (CMO). Adds a platform configuration option for CMO called PPC_SMLPAR. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com> Acked-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * powerpc/pseries: Utilities to set firmware page stateBrian King2008-07-252-0/+15
| | | | | | | | | | | | | | | | | | | | | | Newer versions of firmware support page states, which are used by the collaborative memory manager (future patch) to "loan" pages to the hypervisor for use by other partitions. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com> Acked-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * powerpc/pseries: Enable CMO feature during platform setupRobert Jennings2008-07-252-1/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | For Cooperative Memory Overcommitment (CMO), set the FW_FEATURE_CMO flag in powerpc_firmware_features from the rtas ibm,get-system-parameters table prior to calling iommu_init_early_pSeries. With this, any CMO specific functionality can be controlled by checking: firmware_has_feature(FW_FEATURE_CMO) Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com> Acked-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * powerpc/pseries: Split retrieval of processor entitlement data into a helper ↵Robert Jennings2008-07-251-35/+46
| | | | | | | | | | | | | | | | | | | | | | | | routine Split the retrieval of processor entitlement data returned in the H_GET_PPP hcall into its own helper routine. Signed-off-by: Nathan Fontenot <nfont@austin.ibm.com> Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com> Acked-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * powerpc/pseries: Add memory entitlement capabilities to /proc/ppc64/lparcfgNathan Fontenot2008-07-252-2/+137
| | | | | | | | | | | | | | | | | | | | | | | | Update /proc/ppc64/lparcfg to display Cooperative Memory Overcommitment statistics as reported by the H_GET_MPP hcall. This also updates the lparcfg interface to allow setting memory entitlement and weight. Signed-off-by: Nathan Fontenot <nfont@austin.ibm.com> Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com> Acked-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * powerpc/pseries: Split processor entitlement retrieval and gathering to ↵Nathan Fotenot2008-07-251-78/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | helper routines Split the retrieval and setting of processor entitlement and weight into helper routines. This also removes the printing of the raw values returned from h_get_ppp, the values are already parsed and printed. Signed-off-by: Nathan Fontenot <nfont@austin.ibm.com> Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com> Acked-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * powerpc/pseries: Remove extraneous error reporting for hcall failures in lparcfgNathan Fontenot2008-07-251-32/+0
| | | | | | | | | | | | | | | | | | Remove the extraneous error reporting used when a hcall made from lparcfg fails. Signed-off-by: Nathan Fontenot <nfont@austin.ibm.com> Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com> Acked-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * powerpc: Fix compile error with binutils 2.15Segher Boessenkool2008-07-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | My previous patch to fix compilation with binutils-2.17 causes a "file truncated" build error from ld with binutils 2.15 (and possibly older), and a warning with 2.16 and 2.17. This fixes it. Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org> Acked-by: Chuck Meade <chuckmeade@mindspring.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * powerpc/cell: Fixed IOMMU mapping uses weak ordering for a pcie endpointMark Nelson2008-07-251-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At the moment the fixed mapping is by default strongly ordered (the iommu_fixed=weak boot option must be used to make the fixed mapping weakly ordered). If we're on a setup where the southbridge is being used in endpoint mode (triblade and CAB boards) the default should be a weakly ordered fixed mapping. This adds a check so that if a node of type pcie-endpoint can be found in the device tree the fixed mapping is set to be weak by default (but can be overridden using iommu_fixed=strong). Signed-off-by: Mark Nelson <markn@au1.ibm.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * powerpc: BookE hardware watchpoint supportLuis Machado2008-07-257-35/+138
| | | | | | | | | | | | | | | | | | | | | | | | This patch implements support for HW based watchpoint via the DBSR_DAC (Data Address Compare) facility of the BookE processors. It does so by interfacing with the existing DABR breakpoint code and adding the necessary bits and pieces for the new bits to be properly set or cleared Signed-off-by: Luis Machado <luisgpm@br.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * powerpc: Fallout from sysdev API changesStephen Rothwell2008-07-251-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | A struct sysdev_attribute * parameter was added to the show routine by commit 4a0b2b4dbe1335b8b9886ba3dc85a145d5d938ed "sysdev: Pass the attribute to the low level sysdev show/store function". This eliminates a warning: arch/powerpc/kernel/sysfs.c:538: 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 AT_BASE_PLATFORM aux vectorNathan Lynch2008-07-253-0/+21
| | | | | | | | | | | | | | | | | | Stash the first platform string matched by identify_cpu() in powerpc_base_platform, and supply that to the ELF loader for the value of AT_BASE_PLATFORM. Signed-off-by: Nathan Lynch <ntl@pobox.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * ELF loader support for auxvec base platform stringNathan Lynch2008-07-252-1/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some IBM POWER-based platforms have the ability to run in a mode which mostly appears to the OS as a different processor from the actual hardware. For example, a Power6 system may appear to be a Power5+, which makes the AT_PLATFORM value "power5+". This means that programs are restricted to the ISA supported by Power5+; Power6-specific instructions are treated as illegal. However, some applications (virtual machines, optimized libraries) can benefit from knowledge of the underlying CPU model. A new aux vector entry, AT_BASE_PLATFORM, will denote the actual hardware. For example, on a Power6 system in Power5+ compatibility mode, AT_PLATFORM will be "power5+" and AT_BASE_PLATFORM will be "power6". The idea is that AT_PLATFORM indicates the instruction set supported, while AT_BASE_PLATFORM indicates the underlying microarchitecture. If the architecture has defined ELF_BASE_PLATFORM, copy that value to the user stack in the same manner as ELF_PLATFORM. Signed-off-by: Nathan Lynch <ntl@pobox.com> Acked-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * Merge commit 'jk/jk-merge'Benjamin Herrenschmidt2008-07-252-14/+24
| |\
| | * powerpc/spufs: better placement of spu affinity reference contextAndre Detsch2008-07-241-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adjusts the placement of a reference context from a spu affinity chain. The reference context can now be placed only on nodes that have enough spus not intended to be used by another gang (already running on the node). Signed-off-by: Andre Detsch <adetsch@br.ibm.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
| | * powerpc/spufs: fix aff_mutex and cbe_spu_info[n].list_mutex deadlockAndre Detsch2008-07-241-12/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currenlt,, it is possible to lock aff_mutex and cbe_spu_info[n].list_mutex in different orders, allowing a deadlock to occur. With this change, aff_mutex is not taken within a list_mutex critical section anymore. Signed-off-by: Andre Detsch <adetsch@br.ibm.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
| | * powerpc/spufs: correct kcalloc usageMilton Miller2008-07-231-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | kcalloc is supposed to be called with the count as its first argument and the element size as the second. Signed-off-by: Milton Miller <miltonm@bga.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
| * | Merge commit 'gcl/gcl-next'Benjamin Herrenschmidt2008-07-254-6/+95
| |\ \
| | * | of-bindings: Add binding documentation for SPI busses and devicesGrant Likely2008-07-221-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add documentation about how to describe SPI busses in the device tree. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Segher Boessenkool <segher@kernel.crashing.org>
| | * | powerpc/mpc5200: add PSC SICR bit definitionsGrant Likely2008-07-221-1/+31
| | | | | | | | | | | | | | | | | | | | | | | | Required by the PSC I2S audio driver. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
| | * | powerpc/mpc5200: Make mpc5200 GPIO driver select the GENERIC_GPIO configGrant Likely2008-07-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | CONFIG_GENERIC_GPIO is needed for the gpio driver to work. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
| | * | powerpc/mpc5200: Remove fsl-soc.c from mpc5200 build, it is not needed.Jon Smirl2008-07-221-1/+0
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Jon Smirl <jonsmirl@gmail.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
| | * | powerpc/mpc5200: Add AC97 register definitions for the MPC52xx PSCJon Smirl2008-07-221-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Needed by the PSC AC97 sound driver Signed-off-by: Jon Smirl <jonsmirl@gmail.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
| | * | powerpc/mpc5200: Fix wrong 'no interrupt' handling in of_i2cWolfram Sang2008-07-221-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If an I2C device node does not specify an interrupt, the .irq member of the board_info struct was set to -1. This caused crashes on following irq_dispose_mappings. Leave it NO_IRQ as returned from irq_of_parse_and_map. (Suggesting -1 as 'i2c-no-irq' used to be a bug in linux/i2c.h.) Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Sean MacLennan <smaclennan@pikatech.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* | | | Merge branch 'linux-next' of git://git.infradead.org/~dedekind/ubi-2.6Linus Torvalds2008-07-2519-616/+1008
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'linux-next' of git://git.infradead.org/~dedekind/ubi-2.6: (22 commits) UBI: always start the background thread UBI: fix gcc warning UBI: remove pre-sqnum images support UBI: fix kernel-doc errors and warnings UBI: fix checkpatch.pl errors and warnings UBI: bugfix - do not torture PEB needlessly UBI: rework scrubbing messages UBI: implement multiple volumes rename UBI: fix and re-work debugging stuff UBI: amend commentaries UBI: fix error message UBI: improve mkvol request validation UBI: add ubi_sync() interface UBI: fix 64-bit calculations UBI: fix LEB locking UBI: fix memory leak on error path UBI: do not forget to free internal volumes UBI: fix memory leak UBI: avoid unnecessary division operations UBI: fix buffer padding ...