summaryrefslogtreecommitdiffstats
path: root/arch/powerpc
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'next' of ↵Linus Torvalds2011-01-1178-612/+1874
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (72 commits) powerpc/pseries: Fix build of topology stuff without CONFIG_NUMA powerpc/pseries: Fix VPHN build errors on non-SMP systems powerpc/83xx: add mpc8308_p1m DMA controller device-tree node powerpc/83xx: add DMA controller to mpc8308 device-tree node powerpc/512x: try to free dma descriptors in case of allocation failure powerpc/512x: add MPC8308 dma support powerpc/512x: fix the hanged dma transfer issue powerpc/512x: scatter/gather dma fix powerpc/powermac: Make auto-loading of therm_pm72 possible of/address: Use propper endianess in get_flags powerpc/pci: Use printf extension %pR for struct resource powerpc: Remove unnecessary casts of void ptr powerpc: Disable VPHN polling during a suspend operation powerpc/pseries: Poll VPA for topology changes and update NUMA maps powerpc: iommu: Add device name to iommu error printks powerpc: Record vma->phys_addr in ioremap() powerpc: Update compat_arch_ptrace powerpc: Fix PPC_PTRACE_SETHWDEBUG on PPC_BOOK3S powerpc/time: printk time stamp init not correct powerpc: Minor cleanups for machdep.h ...
| * powerpc/pseries: Fix build of topology stuff without CONFIG_NUMABenjamin Herrenschmidt2011-01-122-14/+14
| | | | | | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * powerpc/pseries: Fix VPHN build errors on non-SMP systemsJesse Larrew2011-01-112-12/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The header asm/hvcall.h was previously included indirectly via smp.h. On non-SMP systems, however, these declarations are excluded and the build breaks. This is easily fixed by including asm/hvcall.h directly. The VPHN feature is only meaningful on NUMA systems that implement the SPLPAR option, so exclude the VPHN code on systems without SPLPAR enabled. Also, expose unmap_cpu_from_node() on systems with SPLPAR enabled, even if CONFIG_HOTPLUG_CPU is disabled. Lastly, map_cpu_to_node() is now needed by VPHN to manipulate the node masks after boot time, so remove the __cpuinit annotation to fix a section mismatch. Signed-off-by: Jesse Larrew <jlarrew@linux.vnet.ibm.com>
| * Merge remote branch 'gcl/next' into nextBenjamin Herrenschmidt2011-01-115-11/+88
| |\
| | * powerpc/83xx: add mpc8308_p1m DMA controller device-tree nodeIlya Yanok2010-12-291-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MPC8308 has DMA controller compatible with mpc512x_dma driver. This patch adds device-tree node to support DMA controller on MPC8308 P1M board. Signed-off-by: Ilya Yanok <yanok@emcraft.com> Acked-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
| | * powerpc/83xx: add DMA controller to mpc8308 device-tree nodeIlya Yanok2010-12-291-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MPC8308 has DMA controller compatible with mpc512x_dma driver. This patch adds device-tree node to support DMA controller on MPC8308RDB board. Signed-off-by: Ilya Yanok <yanok@emcraft.com> Acked-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
| | * Merge v2.6.37-rc8 into powerpc/nextGrant Likely2010-12-29243-2330/+7435
| | |\
| | * | powerpc/5xxx: extend mpc8xxx_gpio driver to support mpc512x gpiosAnatolij Gustschin2010-09-102-11/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The GPIO controller of MPC512x is slightly different from 8xxx GPIO controllers. The register interface is the same except the external interrupt control register. The MPC512x GPIO controller differentiates between four interrupt event types and therefore provides two interrupt control registers, GPICR1 and GPICR2. GPIO[0:15] interrupt event types are configured in GPICR1 register, GPIO[16:31] - in GPICR2 register. This patch adds MPC512x speciffic set_type() callback and updates config file and comments. Additionally the gpio chip registration function is changed to use for_each_matching_node() preventing multiple registration if a node claimes compatibility with another gpio controller type. Signed-off-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
| * | | powerpc/powermac: Make auto-loading of therm_pm72 possibleMarc Zyngier2010-12-091-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The therm_pm72 driver, used on the PowerMac G5 range, cannot be auto-loaded, since the driver itself creates both the device node and the driver instance. Moving the device node creation to the platform setup code and adding the necessary MODULE_DEVICE_TABLE() information allows the driver to be automatically loaded by udev on any semi-modern distribution. It "fixes" a major source of problem on G5 machines where the driver wasn't explicitely loaded by default, and the system would automatically shutdown under load. Tested on an Xserve G5. Signed-off-by: Marc Zyngier <maz@misterjones.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | | of/address: Use propper endianess in get_flagsSebastian Siewior2010-12-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes u32 to __be32 for all "ranges", "prop" and "addr" and such. Those variables are pointing to the device tree which containts intergers in big endian format. Most functions are doing it right because of_read_number() is doing the right thing for them. of_bus_isa_get_flags(), of_bus_pci_get_flags() and of_bus_isa_map() were accessing the data directly and were doing it wrong. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | | powerpc/pci: Use printf extension %pR for struct resourceJoe Perches2010-12-092-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Using %pR standardizes the struct resource output. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | | powerpc: Remove unnecessary casts of void ptrJesper Juhl2010-12-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hi, The [vk][cmz]alloc(_node) family of functions return void pointers which it's completely unnecessary/pointless to cast to other pointer types since that happens implicitly. This patch removes such casts from arch/powerpc/ Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | | powerpc: Disable VPHN polling during a suspend operationJesse Larrew2010-12-092-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tie the polling mechanism into the ibm,suspend-me rtas call to stop/restart polling before/after a suspend, hibernate, migrate, or checkpoint restart operation. This ensures that the system has a chance to disable the polling if the partition is migrated to a system that does not support VPHN (and vice versa). Signed-off-by: Jesse Larrew <jlarrew@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | | powerpc/pseries: Poll VPA for topology changes and update NUMA mapsJesse Larrew2010-12-092-11/+271
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch sets a timer during boot that will periodically poll the associativity change counters in the VPA. When a change in associativity is detected, it retrieves the new associativity domain information via the H_HOME_NODE_ASSOCIATIVITY hcall and updates the NUMA node maps and sysfs entries accordingly. Note that since the ibm,associativity device tree property does not exist on configurations with both NUMA and SPLPAR enabled, no device tree updates are necessary. Signed-off-by: Jesse Larrew <jlarrew@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | | powerpc: iommu: Add device name to iommu error printksAnton Blanchard2010-12-091-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now its difficult to see which device is running out of iommu space: iommu_alloc failed, tbl c00000076e096660 vaddr c000000768806600 npages 1 Use dev_info() so we get the device name and location: ipr 0000:00:01.0: iommu_alloc failed, tbl c00000076e096660 vaddr c000000768806600 npages 1 Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | | powerpc: Record vma->phys_addr in ioremap()Michael Ellerman2010-12-092-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The vmalloc code can track the physical address of a vma, when the vma is used for ioremap, if set it is displayed in /proc/vmallocinfo. Because get_vm_area_caller() doesn't know it's being called for ioremap() it's up to the arch code to set the phys_addr. A bunch of other arch's do this, I'm not sure why powerpc doesn't? Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | | powerpc: Update compat_arch_ptraceAndreas Schwab2010-12-091-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update compat_arch_ptrace to follow recent changes in PTRACE_GET_DEBUGREG and the addition of PPC_PTRACE_{GETHWDBGINFO|{SET|DEL}HWDEBUG}. The latter three can be forwarded to arch_ptrace unchanged. Signed-off-by: Andreas Schwab <schwab@linux-m68k.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | | powerpc: Fix PPC_PTRACE_SETHWDEBUG on PPC_BOOK3SAndreas Schwab2010-12-091-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Properly set the DABR_TRANSLATION/DABR_DATA_READ/DABR_DATA_READ bits in the dabr when setting the debug register via PPC_PTRACE_SETHWDEBUG. Also don't reject trigger type of PPC_BREAKPOINT_TRIGGER_READ. Signed-off-by: Andreas Schwab <schwab@linux-m68k.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | | powerpc/time: printk time stamp init not correctHeiko Schocher2010-12-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | problem: I see sometimes on my mpc5200 based board such printk timing information: [ 0.000000] NR_IRQS:512 nr_irqs:512 16 [ 0.000000] MPC52xx PIC is up and running! [ 0.000000] clocksource: timebase mult[79364d9] shift[22] registered [ 0.000000] console [ttyPSC0] enabled [ 130.300633] pid_max: default: 32768 minimum: 301 [ 130.305647] Mount-cache hash table entries: 512 [ 130.315818] NET: Registered protocol family 16 reason: if the tbu not starts from 0 when linux boots, boot_tb maybe could not store the real 64 bit tbu value, because boot_tp is only a 32 bit unsigned long. solution: change boot_tb to u64 [BenH: Made it u64 instead of unsigned long long] Signed-off-by: Heiko Schocher <hs@denx.de> cc: Wolfgang Denk <wd@denx.de> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | | powerpc: Minor cleanups for machdep.hSonny Rao2010-12-091-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove stale declaration of setup_pci_ptrs, aparently from ppc before 2.4.0 Remove #ifdef around struct existance delcaration Fix spelling of "linear" Signed-off-by: Milton Miller <miltonm@bga.com> Signed-off-by: Sonny Rao <sonnyrao@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | | Powerpc: separate CONFIG_RELOCATABLE from CONFIG_CRASHDUMP in boot codeSonny Rao2010-12-091-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix head_64.S so that we can build a relocatable kernel that isn't necessarily a crash-dump kernel Signed-off-by: Milton Miller <miltonm@bga.com> Signed-off-by: Sonny Rao <sonnyrao@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | | powerpc: Fix incorrect comment about interrupt stack allocationAnton Blanchard2010-12-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We now allow interrupt stacks anywhere in the first segment which can be 256M or 1TB. Fix the comment. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | | powerpc: Hardcode popcnt instructions for old assemblersAnton Blanchard2010-12-092-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The popcnt instructions went into binutils relatively recently. As with a number of other instructions, create macros and hardcode them. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | | powerpc/pseries: Pass phb only to iommu_table_setparms_lparBenjamin Herrenschmidt2010-12-091-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | iommu_table_setparms_lpar needs either the phb or the subbusnumber (not both), pass the phb to make it similar to iommu_table_setparms. Note: In cases where a caller was passing bus->number previously to iommu_table_setparms_lpar() rather than phb->bus->number, this can lead to a different value in tbl->it_busno. The only example of this was the removed pci_dma_dev_setup_pSeriesLP(), removed in "ppc/iommu: remove unneeded pci_dma_dev_setup_pSeriesLP". [BenH: You updated only one of the two callers. Fixed that for you] Signed-off-by: Milton Miller <miltonm@bga.com> Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | | powerpc/pseries: Do not need to check for dma_window == NULLNishanth Aravamudan2010-12-091-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The block in pci_dma_dev_setup_pSeriesLP for dma_window == NULL can be removed because we will only teminate the loop if we had already allocated a iommu table for that node or we found a window. While there may be no window for the device, the intresting part is if we are reusing a table or creating it for the first device under it. Signed-off-by: Milton Miller <miltonm@bga.com> Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | | powerpc/pseries: Checking for pdn->parent is redundantNishanth Aravamudan2010-12-091-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The device tree root is never a pci bus, and will not have a PCI_DN(pdn), so the check for PCI_DN added in 650f7b3b2f0ead0673e90452cf3dedde97c537ba makes the check for pdn->parent redundant and it can be removed. Signed-off-by: Milton Miller <miltonm@bga.com> Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | | powerpc/pseries: Do not search for dma-window property on dlpar removeNishanth Aravamudan2010-12-091-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The iommu_table pointer in the pci auxiliary struct of device_node has not been used by the iommu ops since the dma refactor of 12d04eef927bf61328af2c7cbe756c96f98ac3bf, however this code still uses it to find tables for dlpar. By only setting the PCI_DN iommu_table pointer on nodes with dma window properties, we will be able to quickly find the node for later checks, and can remove the table without looking for the the dma window property on dlpar remove. Signed-off-by: Milton Miller <miltonm@bga.com> Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | | powerpc/iommu: Use coherent_dma_mask for alloc_coherentNishanth Aravamudan2010-12-092-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The IOMMU code has been passing the dma-mask instead of the coherent_dma_mask to the iommu allocator. Coherent allocations should be made using the coherent_dma_mask. Also update the vio code to ensure the coherent_dma_mask is set. Without this change drivers, such as ibmvscsi, fail to load with the corrected dma_iommu_alloc_coherent(). Signed-off-by: Milton Miller <miltonm@bga.com> Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | | Merge remote branch 'jwb/next' into nextBenjamin Herrenschmidt2010-12-098-26/+387
| |\ \ \
| | * | | powerpc/4xx: Add Canyonlands suspend and idle supportVictor Gallardo2010-11-292-22/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add Clock Power Management (CPM) node to dts tree - Add idle-doze entry in CPM node - Add standby entry in CPM node - Add PM and SUSPEND support by default in defconfig - Remove UART2 and UART3 as they are unused, this will allow CPM to put unused-units (UART2 and UART3) to sleep. Signed-off-by: Victor Gallardo <vgallardo@apm.com> Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
| | * | | powerpc/4xx: Add Kilauea suspend and idle supportVictor Gallardo2010-11-292-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add Clock Power Management (CPM) node to dts tree - Add idle-doze entry in CPM node - Add standby entry in CPM node - Add PM and SUSPEND support by default in defconfig - Add NO_HZ and CONFIG_HIGH_RES_TIMERS support by default in defconfig Signed-off-by: Victor Gallardo <vgallardo@apm.com> Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
| | * | | powerpc/4xx: Add suspend and idle supportVictor Gallardo2010-11-294-4/+361
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add suspend/resume support for 4xx compatible CPUs. See /sys/power/state for available power states configured in. Add two different idle states (idle-wait and idle-doze) controlled via sysfs. Default is idle-wait. cat /sys/devices/system/cpu/cpu0/idle [wait] doze To save additional power, use idle-doze. echo doze > /sys/devices/system/cpu/cpu0/idle cat /sys/devices/system/cpu/cpu0/idle wait [doze] Signed-off-by: Victor Gallardo <vgallardo@apm.com> Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
| * | | | Merge branch 'nvram' into nextBenjamin Herrenschmidt2010-12-095-363/+381
| |\ \ \ \ | | |/ / / | |/| | |
| | * | | powerpc/nvram: Handle partition names >= 12 charsJim Keniston2010-11-301-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The name field in the nvram_header can be < 12 chars, null-terminated, or 12 chars without the null. Handle this safely. Signed-off-by: Jim Keniston <jkenisto@us.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| | * | | powerpc/nvram: Fix NVRAM partition list setupJim Keniston2010-11-301-18/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplify creation and use of the NVRAM partition list. Signed-off-by: Jim Keniston <jkenisto@us.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| | * | | powerpc/nvram: Rename ppc64,linux partition to ibm,rtas-logBenjamin Herrenschmidt2010-11-301-10/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I'm not aware of any userspace tool accessing it by its name anyways, it's read back by the kernel itself on the next boot to get back older log entries Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| | * | | powerpc/nvram: Move the log partition stuff to pseriesBenjamin Herrenschmidt2010-11-303-237/+227
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The nvram log partition stuff currently in nvram_64.c is really pseries specific. It isn't actually used on anything else (despite the fact that we ran the code to setup the partition on anything except powermac) and the log format is specific to pseries RTAS implementation. So move it where it belongs Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| | * | | powerpc/nvram: Change nvram_setup_partition() to use new helperBenjamin Herrenschmidt2010-11-301-39/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the function to use nvram_find_partition() instead of doing the lookup "by hand". It also makes some of the logic clearer and prints out more useful diagnostic information. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| | * | | powerpc/nvram: Add nvram_find_partition()Benjamin Herrenschmidt2010-11-301-0/+22
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| | * | | powerpc/nvram: Improve partition removalBenjamin Herrenschmidt2010-11-301-48/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Existing code is nasty, has bugs etc... rewrite the function more simply, and make it take the signature and optional name of the partitions to remove as arguments, thus making it a more generic utility. We also try to remove a log partition that we find and is too small rather than creating a duplicate. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| | * | | powerpc/nvram: Shuffle code around in nvram_create_partition()Benjamin Herrenschmidt2010-11-301-46/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This error log stuff is really pseries specific. As a first step we move the initialization of these variables to the caller of nvram_create_partition(), which is also slightly reorganized so we setup the free partition before we clear the new partition, so the chance of an error during clear leaving us with invalid headers is lessened. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| | * | | powerpc/nvram: Completely clear a new partitionBenjamin Herrenschmidt2010-11-301-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When creating a partition, we clear it entirely rather than just the first two words since the previous code was rather specific to the pseries log partition format. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| | * | | powerpc/nvram: Ensure that the partition header/block size is rightBenjamin Herrenschmidt2010-11-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use BUILD_BUG_ON to ensure the structure representing a partition header have the right size. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| | * | | powerpc/nvram: nvram_create_partitions() now uses bytesBenjamin Herrenschmidt2010-11-301-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This converts nvram_create_partition() to use a size in bytes rather than blocks. It does the appropriate alignment internally The size passed is also the data size (ie. doesn't include the header anymore). Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| | * | | powerpc/nvram: More flexible nvram_create_partition()Benjamin Herrenschmidt2010-11-302-21/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace nvram_create_os_partition() with a variant that takes the partition name, signature and size as arguments. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| | * | | powerpc/nvram: Move things out of asm/nvram.hBenjamin Herrenschmidt2010-11-304-41/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This moves a bunch of definitions out of asm/nvram.h to the files that use them or just outright remove completely unused stuff. We leave the partition signatures definitions, they will be useful Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | | | powerpc: Remove second definition of STACK_FRAME_OVERHEADStephen Rothwell2010-11-2914-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since STACK_FRAME_OVERHEAD is defined in asm/ptrace.h and that is ASSEMBER safe, we can just include that instead of going via asm-offsets.h. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | | | powerpc/mm: Avoid avoidable void* pointerMichael Neuling2010-11-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change pgdir from a void to real type. Having this as a void is stupid and has already caused 1 bug. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | | | powerpc: Add POWER7+ cputable entryMichael Neuling2010-11-291-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the POWER7+ cputable entry for the PVR 0x004a0000. Rest is the same as vanilla POWER7. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | | | powerpc: Remove POWER6 oprofile workarounds for POWER7Michael Neuling2010-11-291-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are not needed on POWER7 so remove them. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
OpenPOWER on IntegriCloud