aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAge
* powerpc: Delete unused prom_strtoul and prom_memparseMilton Miller2008-10-21
| | | | | | | | | These functions should have been static, and inspection shows they are no longer used. (We used to parse mem= but we now defer that to early_param). Signed-off-by: Milton Miller <miltonm@bga.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc: Revert CHRP boot wrapper to real-base = 12MB on 32-bitPaul Mackerras2008-10-21
| | | | | | | | | | | | | | | | Commit 9b09c6d909dfd8de96b99b9b9c808b94b0a71614 ("powerpc: Change the default link address for pSeries zImage kernels") changed the real-base value in the CHRP note added by addnote to the zImage from 12MB to 32MB. It turns out that this causes unnecessary extra reboots on old 32-bit CHRP machines. This therefore adds a -r flag to addnote to allow us to specify what real-base value it should put in the CHRP note, and adjusts the wrapper script to pass -r c00000 to addnote when making a zImage for a CHRP machine. Also, CHRP machines ignore the RPA note, so we don't need to arrange for it to be the same as the kernel's. Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc: Always trim numa memory to lmb_end_of_DRAM()Milton Miller2008-10-21
| | | | | | | | | | | | numa_enforce_memory_limit tried to be smart and only call lmb_end_of_DRAM when a memory limit was set via mem= on the command line. However, the early boot code will also limit memory added to the lmb system when iommu=off is specified. When this happens, the page allocator is given pages not in the linear mapping and this results in a fatal data reference to the unmapped page. Signed-off-by: Milton Miller <miltonm@bga.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc: Use cpu_thread_in_core in smp_init for of_spin_mapMilton Miller2008-10-21
| | | | | | | | | | | | We used to assume that even numbered threads were the primary threads, ie those that would be listed and started as a cpu from open firmware. Replace a left over is even (% 2) check with a check for it being a primary thread and update the comments. Tested with a debug print on pseries, identical code found for cell. Signed-off-by: Milton Miller <miltonm@bga.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc: Find and destroy possible stale kernel added propertiesMilton Miller2008-10-21
| | | | | | | | | | | | | | | | | | | | | 64 bit powerpc requires the kexec user space tools avoid overwriting the static kernel image and translation hash table when choosing where to put memory image data because it copies the data into place using the kernels virtual memory system. Kexec userspace determines these and other areas blocked by reading properties the kernel adds, but does not filter these properties when creating the device tree for the next kernel. When the second kernel tries to add its values for these properties, the export via /proc/device-tree is hidden by the pre-existing but stale values from the flat tree. Kexec userspace reads the old property, allocates the new kernel at the old kernel's end, and gets rejected by the overlap check. Search and remove these stale properties before adding the new values. Signed-off-by: Milton Miller <miltonm@bga.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc: Remove Kconfig support for PPC_MERGEKumar Gala2008-10-21
| | | | | | | | There are no users of PPC_MERGE in tree so we can get rid of it. It was a hold over from the arch/ppc days. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc: Fix build issue with CONFIG_RELOCATABLE=yKumar Gala2008-10-21
| | | | | | | | | | There are two issues when we enable CONFIG_RELOCATABLE. The first is due to the fact that phys_addr_t is now defined in linux/types.h. The second is due to the fact that the DMA code changes expose memstart_addr to prom_init.c Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* of: Format string bug in drivers/of/of_i2c.cJon Smirl2008-10-21
| | | | | | | | | Format string bug. Not exploitable, as this is only writable by root, but worth fixing all the same. See 326f6a5c9c9e1a62aec37bdc0c3f8d53adabe77b Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc: Add missing cuImage.initrd.% targetGrant Likely2008-10-21
| | | | | | | This target is needed to build cuImages with an embedded ramdisk image. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc: Fix boot wrapper memcmp() called with zero length argumentMike Ditto2008-10-21
| | | | | | | | | I noticed, when trying to use, e.g., node = find_node_by_prop_value(prev, "booleanprop", "", 0)) to search for all nodes with a certain boolean property, that memcmp() returns garbage when comparing zero bytes. It should return zero. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc/numa: Make memory reserve code more robustJon Tollefson2008-10-21
| | | | | | | | | | Adjust amount to reserve based on previous nodes for reserves spanning multiple nodes. Check if the node active range is empty before attempting to pass the reserve to bootmem. In practice the range shouldn't be empty, but to be sure we check. Signed-off-by: Jon Tollefson <kniht@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc/oprofile: Fix mutex locking for cell spu-oprofileCarl Love2008-10-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The issue is the SPU code is not holding the kernel mutex lock while adding samples to the kernel buffer. This patch creates per SPU buffers to hold the data. Data is added to the buffers from in interrupt context. The data is periodically pushed to the kernel buffer via a new Oprofile function oprofile_put_buff(). The oprofile_put_buff() function is called via a work queue enabling the funtion to acquire the mutex lock. The existing user controls for adjusting the per CPU buffer size is used to control the size of the per SPU buffers. Similarly, overflows of the SPU buffers are reported by incrementing the per CPU buffer stats. This eliminates the need to have architecture specific controls for the per SPU buffers which is not acceptable to the OProfile user tool maintainer. The export of the oprofile add_event_entry() is removed as it is no longer needed given this patch. Note, this patch has not addressed the issue of indexing arrays by the spu number. This still needs to be fixed as the spu numbering is not guarenteed to be 0 to max_num_spus-1. Signed-off-by: Carl Love <carll@us.ibm.com> Signed-off-by: Maynard Johnson <maynardj@us.ibm.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Acked-by: Robert Richter <robert.richter@amd.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc: Unsigned speed cannot be negative in udbg_16559.croel kluin2008-10-21
| | | | | | | | "unsigned int" speed cannot be negative, it's thus pointless to test if it is. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc/pseries: Validate PFN in pseries_remove_lmb()Nathan Fontenot2008-10-21
| | | | | | | | | | | The pfn of the memory to be removed should be validated prior to attempting to remove the memory. In cases where the probe of a memory section fails during hotplug add, the pfn for the lmb may not be valid. Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com> Signed-off-by: Nathan Fontenot <nfont@austin.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc/boot: Compare _start against ei.loadsize instead ei.memsizeSebastian Siewior2008-10-21
| | | | | | | | | | | | | | | If the vmlinux binary in memory is larger than 4 MiB than it collides with the initial boot code which is linked at 4 MiB in case of cuBoot. If the the uncompressed image size (on disk size) is less than 4 MiB then it would fit. The difference between those two sizes is the bss section. In cuBoot we have the dtb embedded right after the data section so it is very likely that the reset of the bss section (in kernel's start up code) will overwrite the dtb blob. Therefore we reallocate the dtb. Something similar is allready done to the initrd. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Acked-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Merge commit 'gcl/gcl-next'Benjamin Herrenschmidt2008-10-20
|\
| * powerpc/mpc5200: Refactor FEC mdio read/write routinesWolfram Sang2008-10-15
| | | | | | | | | | | | | | | | | | Read & write functions now call a generic transfer function, so identical code in both routines could be eliminated. The result is easier to maintain and smaller in source and binary code. Also, fix some checkpatch warnings. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
| * powerpc/mpc5200: Don't touch pipelining for MPC5200BWolfram Sang2008-10-15
| | | | | | | | | | | | | | | | MPC5200 needs to have pipelining disabled for ATA to work. MPC5200B does not. So, for the latter, don't touch the original setting from the bootloader. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
| * powerpc/52xx: Make cuImage more robust in locating immr node.Grant Likely2008-10-15
| | | | | | | | | | | | | | | | Current device trees do not have the device_type = soc property set anymore. Fix up the cuImage bootwrapper fragment to still find the IMMR nodes. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* | Merge commit 'jwb/jwb-next'Benjamin Herrenschmidt2008-10-20
|\ \
| * | ibm_newemac: Fix new MAL feature handlingJosh Boyer2008-10-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support for new features needed by the PPC 405EZ boards introduced some errors in the MAL and EMAC feature handling. This broke 'allmodconfig' builds as CONFIG_PPC_DCR_NATIVE is not set for those. This patch fixes these errors by wrapping the code in the appropriate #ifdefs. Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
| * | powerpc/4xx: Add PowerPC 4xx GPIO driverSteven A. Falco2008-10-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the GPIO functions of PPC40x and PPC44x SOCs. Signed-off-by: Steve Falco <sfalco@harris.com> Acked-by: Stefan Roese <sr@denx.de> Acked-by: Sean MacLennan <smaclennan@pikatech.com> Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
| * | powerpc/40x: Add support for Netstal HCU4 boardNiklaus Giger2008-10-17
| | | | | | | | | | | | | | | | | | | | | Adds support for a HCU4 PPC405GPr based board from Netstal Maschinen AG. Signed-off-by: Niklaus Giger <niklaus.giger@member.fsf.org> Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
| * | powerpc/40x: Add PowerPC 405EZ Acadia defconfigJosh Boyer2008-10-17
| | | | | | | | | | | | | | | | | | Add simple defconfig for the AMCC PowerPC 405EZ Acadia evaluation board Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
| * | powerpc/40x: Add cuboot wrapper for Acadia boardJosh Boyer2008-10-17
| | | | | | | | | | | | | | | | | | | | | This adds a cuboot wrapper for the AMCC PowerPC 405EZ Acadia board. The clocking code is derived from U-Boot, originally written by Stefan Roese. Signed-off-by: Josh Boyer <jwboyer@linux.ibm.com>
| * | powerpc/40x: Add PowerPC 40x simple platform supportJosh Boyer2008-10-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a common board file for almost all of the "simple" PowerPC 40x boards that exist today. This is intended to be a single place to add support for boards that do not differ in platform support from most of the evaluation boards that are used as reference platforms. Boards that have specific requirements or custom hardware setup should still have their own board.c file. The first board ported to this is the AMCC PowerPC 405EZ Acadia board. Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
| * | powerpc/40x: Add AMCC PowerPC 405EZ to cputableJosh Boyer2008-10-17
| | | | | | | | | | | | | | | | | | This adds the AMCC PowerPC 405EZ chip to the cputable Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
| * | powerpc/40x: AMCC PowerPC 405EZ Acadia DTSJosh Boyer2008-10-17
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the base DTS for the AMCC PowerPC 405EZ Acadia evalution board. In addition to some of the normal PPC 40x peripherals, the Acadia board has: - 64 MiB PSRAM - NOR and NAND flash - Two USB 1.1 host ports - Two CAN 2.0 ports - ADC and DAC connectors - LCD display This adds the basic platform support to build from. Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
* | powerpc/spufs: Explain conditional decrement of aff_sched_countAndre Detsch2008-10-20
| | | | | | | | | | | | | | | | This patch adds a comment to clarify why atomic_dec_if_positive is being used to decrement gang's aff_sched_count on SPU context unbind. Signed-off-by: Andre Detsch <adetsch@br.ibm.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* | powerpc/spufs: Improve search of node for contexts with SPU affinityAndre Detsch2008-10-20
| | | | | | | | | | | | | | | | | | | | | | This patch improves redability of the code responsible for trying to find a node with enough SPUs not committed to other affinity gangs. An additional check is also added, to avoid taking into account gangs that have no SPU affinity. Signed-off-by: Andre Detsch <adetsch@br.ibm.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* | powerpc/spufs: Use kmalloc rather than kzalloc for switch log bufferJeremy Kerr2008-10-20
| | | | | | | | | | | | No need to zero the entire buffer, just the head and tail indices. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* | powerpc/spufs: Don't spu_acquire_saved unnecessarily in regs readJeremy Kerr2008-10-20
| | | | | | | | | | | | | | | | | | | | | | | | With most file readers (eg cat, dd), reading a context's regs file will result in two reads: the first to read the data, and the second to return EOF. Because each read performs a spu_acquire_saved, we end up descheduling and re-scheduling the context twice. This change does a simple check to see if we'd return EOF before calling spu_acquire_saved(), saving the extra schedule operation. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* | powerpc/spufs: Don't require full buffer in switch_log readJeremy Kerr2008-10-20
| | | | | | | | | | | | | | | | | | | | | | | | Currently, read() on the sputrace log will block until the read buffer is full. This makes it difficult to retrieve the end of the buffer, as the user will need to read with the right-sized buffer. In a similar method as 91553a1b5e0df006a3573a88d98ee7cd48a3818a, this change makes the switch_log return if there has already been data read. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* | powerpc/spufs: Use state_mutex for switch_log locking, and prevent multiple ↵Jeremy Kerr2008-10-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | openers Currently, we use ctx->mapping_lock and ctx->switch_log->lock for the context switch log. The mapping lock only prevents concurrent open()s, so we require the switch_lock->lock for reads. Since writes to the switch log buffer occur on context switches, we're better off synchronising with the state_mutex, which is held during a switch. Since we're serialised througout the buffer reads and writes, we can use the state mutex to protect open and release too, and can now kfree() the log buffer on release. This allows us to perform the switch log notify without taking any extra locks. Because the buffer is only present while the file is open, we can use it to prevent multiple simultaneous openers. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* | powerpc/spufs: sputrace: Don't block until the read buffer is fullJeremy Kerr2008-10-20
| | | | | | | | | | | | | | | | | | | | | | | | Currently, read() on the sputrace buffer will only return data when the user buffer is exhausted. This may mean that we never see the end of the event log, unless we read() with exactly the right-sized buffer. This change makes sputrace_read not block if we have data ready to return. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* | powerpc/spufs: sputrace: Only enable logging on open(), prevent multiple openersJeremy Kerr2008-10-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, sputrace will start logging to the event buffer before the log buffer has been open()ed. This results in a heap of "lost samples" warnings if the sputrace file hasn't yet been opened. Since the buffer is reset on open() anyway, there's no need to enable logging when no-one has opened the log. Because open clears the log, make it return EBUSY for mutliple open calls. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* | Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linusLinus Torvalds2008-10-15
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: MIPS: Kill unused <asm/debug.h> inclusions MIPS: IP32: Add platform device for CMOS RTC; remove dead code RTC: M48T35: new RTC driver MIPS: IP27: Switch over to RTC class driver MIPS: DS1286: New RTC driver MIPS: IP22/28: Switch over to RTC class driver MIPS: PCI: Scan busses when they are registered MIPS: WGT634U: Add reset button support MIPS: BCM47xx: Use the new SSB GPIO API MIPS: BCM47xx: Remove references to BCM947XX MIPS: WGT634U: Add machine detection message MIPS: Align .data.cacheline_aligned based on CONFIG_MIPS_L1_CACHE_SHIFT MIPS: show_cpuinfo prints the type of the calling CPU MIPS: Fix wrong branch target in new spin_lock code. MIPS: Have a heart for a lonely, lost header file ...
| * | MIPS: Kill unused <asm/debug.h> inclusionsShinya Kuribayashi2008-10-15
| | | | | | | | | | | | | | | Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
| * | MIPS: IP32: Add platform device for CMOS RTC; remove dead codeThomas Bogendoerfer2008-10-15
| | | | | | | | | | | | | | | Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
| * | RTC: M48T35: new RTC driverThomas Bogendoerfer2008-10-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | This driver replaces the broken ip27-rtc driver in drivers/char and gives back RTC support for SGI IP27 machines. Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Acked-by: Alessandro Zummo <alessandro.zummo@towertech.it> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
| * | MIPS: IP27: Switch over to RTC class driverThomas Bogendoerfer2008-10-15
| | | | | | | | | | | | | | | | | | | | | | | | This patchset removes some dead code and creates a platform device for the RTC class driver. Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
| * | MIPS: DS1286: New RTC driverThomas Bogendoerfer2008-10-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | This driver replaces the broken DS1286 driver in drivers/char and gives back RTC support for SGI IP22 and IP28 machines. Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Acked-by: Alessandro Zummo <alessandro.zummo@towertech.it> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
| * | MIPS: IP22/28: Switch over to RTC class driverThomas Bogendoerfer2008-10-15
| | | | | | | | | | | | | | | | | | | | | | | | This patchset removes some dead code and creates a platform device for the RTC class driver. Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
| * | MIPS: PCI: Scan busses when they are registeredAurelien Jarno2008-10-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch below changes register_pci_controller() such that controllers being added after pcibios_init() has run are be scanned immediately. This is needed for example by the BCM47xx PCI controller, which is located on the SSB bus, which is now initialized after the PCI subsystem. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
| * | MIPS: WGT634U: Add reset button supportAurelien Jarno2008-10-15
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the reset button of WGT634U machine, using GPIO interrupts. Based on a patch from Michel Lespinasse. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
| * | MIPS: BCM47xx: Use the new SSB GPIO APIAurelien Jarno2008-10-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch simplifies the BCM47xx GPIO code by using the new SSB GPIO API, which does a lot things that were implemented directly in the BCM47xx code. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
| * | MIPS: BCM47xx: Remove references to BCM947XXAurelien Jarno2008-10-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the remaining reference to the BCM947xx development board codename. Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
| * | MIPS: WGT634U: Add machine detection messageAurelien Jarno2008-10-15
| | | | | | | | | | | | | | | | | | | | | This adds a printk message when a WGT634U machine is detected. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
| * | MIPS: Align .data.cacheline_aligned based on CONFIG_MIPS_L1_CACHE_SHIFTDavid Daney2008-10-15
| | | | | | | | | | | | | | | | | | Signed-off-by: David Daney <ddaney@caviumnetworks.com> Signed-off-by: Tomaso Paoletti <tpaoletti@caviumnetworks.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
| * | MIPS: show_cpuinfo prints the type of the calling CPUJohannes Dickgreber2008-10-15
| | | | | | | | | | | | | | | | | | | | | It should print the type of the Nth processor. Signed-off-by: Johannes Dickgreber <tanzy@gmx.de> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>