- 16 9月, 2008 2 次提交
-
-
由 Paul Mackerras 提交于
This implements CONFIG_RELOCATABLE for 64-bit by making the kernel as a position-independent executable (PIE) when it is set. This involves processing the dynamic relocations in the image in the early stages of booting, even if the kernel is being run at the address it is linked at, since the linker does not necessarily fill in words in the image for which there are dynamic relocations. (In fact the linker does fill in such words for 64-bit executables, though not for 32-bit executables, so in principle we could avoid calling relocate() entirely when we're running a 64-bit kernel at the linked address.) The dynamic relocations are processed by a new function relocate(addr), where the addr parameter is the virtual address where the image will be run. In fact we call it twice; once before calling prom_init, and again when starting the main kernel. This means that reloc_offset() returns 0 in prom_init (since it has been relocated to the address it is running at), which necessitated a few adjustments. This also changes __va and __pa to use an equivalent definition that is simpler. With the relocatable kernel, PAGE_OFFSET and MEMORY_START are constants (for 64-bit) whereas PHYSICAL_START is a variable (and KERNELBASE ideally should be too, but isn't yet). With this, relocatable kernels still copy themselves down to physical address 0 and run there. Signed-off-by: NPaul Mackerras <paulus@samba.org>
-
由 Chandru 提交于
Kdump kernel needs to use only those memory regions that it is allowed to use (crashkernel, rtas, tce, etc.). Each of these regions have their own sizes and are currently added under 'linux,usable-memory' property under each memory@xxx node of the device tree. The ibm,dynamic-memory property of ibm,dynamic-reconfiguration-memory node (on POWER6) now stores in it the representation for most of the logical memory blocks with the size of each memory block being a constant (lmb_size). If one or more or part of the above mentioned regions lie under one of the lmb from ibm,dynamic-memory property, there is a need to identify those regions within the given lmb. This makes the kernel recognize a new 'linux,drconf-usable-memory' property added by kexec-tools. Each entry in this property is of the form of a count followed by that many (base, size) pairs for the above mentioned regions. The number of cells in the count value is given by the #size-cells property of the root node. Signed-off-by: NChandru Siddalingappa <chandru@in.ibm.com> Signed-off-by: NPaul Mackerras <paulus@samba.org>
-
- 01 7月, 2008 1 次提交
-
-
由 Michael Neuling 提交于
Add a VSX CPU feature. Also add code to detect if VSX is available from the device tree. Signed-off-by: NMichael Neuling <mikey@neuling.org> Signed-off-by: NJoel Schopp <jschopp@austin.ibm.com> Signed-off-by: NPaul Mackerras <paulus@samba.org>
-
- 24 4月, 2008 1 次提交
-
-
由 Kumar Gala 提交于
Added support to allow an 85xx kernel to be run from a non-zero physical address (useful for cooperative asymmetric multiprocessing situations and kdump). The support can be configured at compile time by setting CONFIG_PAGE_OFFSET, CONFIG_KERNEL_START, and CONFIG_PHYSICAL_START as desired. Alternatively, the kernel build can set CONFIG_RELOCATABLE. Setting this config option causes the kernel to determine at runtime the physical addresses of CONFIG_PAGE_OFFSET and CONFIG_KERNEL_START. If CONFIG_RELOCATABLE is set, then CONFIG_PHYSICAL_START has no meaning. However, CONFIG_PHYSICAL_START will always be used to set the LOAD program header physical address field in the resulting ELF image. Currently we are limited to running at a physical address that is a multiple of 256M. This is due to how we map TLBs to cover lowmem. This should be fixed to allow 64M or maybe even 16M alignment in the future. It is considered an error to try and run a kernel at a non-aligned physical address. All the magic for this support is accomplished by proper initialization of the kernel memory subsystem and use of ARCH_PFN_OFFSET. The use of ARCH_PFN_OFFSET only affects normal memory and not IO mappings. ioremap uses map_page and isn't affected by ARCH_PFN_OFFSET. /dev/mem continues to allow access to any physical address in the system regardless of how CONFIG_PHYSICAL_START is set. Signed-off-by: NKumar Gala <galak@kernel.crashing.org> Signed-off-by: NPaul Mackerras <paulus@samba.org>
-
- 18 4月, 2008 1 次提交
-
-
由 Benjamin Herrenschmidt 提交于
Lockdep found out that we can occasionally take the device-tree lock for reading from softirq time (from rtas_token called by the rtas real time clock code called by the NTP code), while we take it occasionally for writing without masking interrupts. The combination of those two can thus deadlock. While some of those cases of interrupt read lock could be fixed (such as caching the RTAS tokens) I figured that taking the lock for writing is so rare (device-tree modification) that we may as well penalize that case and allow reading from interrupts. Thus, this turns all the writers to take the lock with irqs masked to avoid the situation. Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: NPaul Mackerras <paulus@samba.org>
-
- 17 4月, 2008 1 次提交
-
-
由 Manish Ahuja 提交于
This changes the way we calculate how much space to reserve for the pHyp dump. Currently we reserve 256MB only. With this change, the code first checks to see if an amount has been specified on the boot command line with the "phyp_dump_reserve_size" option, and if so, uses that much. Otherwise it computes 5% of total ram and rounds it down to a multiple of 256MB, and uses the larger of that or 256MB. This is for large systems with a lot of memory (10GB or more). The aim is to have more space available for the kernel on reboot on machines with more resources. Although the dump will be collected pretty fast and the memory released really early on allowing the machine to have the full memory available, this alleviates any issues that can be caused by having way too little memory on very very large systems during those few minutes. Signed-off-by: NManish Ahuja <mahuja@us.ibm.com> Signed-off-by: NPaul Mackerras <paulus@samba.org>
-
- 01 4月, 2008 1 次提交
-
-
由 Geert Uytterhoeven 提交于
WARNING: vmlinux.o(.text+0x1e4c0): Section mismatch in reference from the function .move_device_tree() to the function .init.text:.lmb_alloc_base() The function .move_device_tree() references the function __init .lmb_alloc_base(). This is often because .move_device_tree lacks a __init annotation or the annotation of .lmb_alloc_base is wrong. move_device_tree() is called from early_init_devtree() only, which is __init Signed-off-by: NGeert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Signed-off-by: NPaul Mackerras <paulus@samba.org>
-
- 26 3月, 2008 2 次提交
-
-
由 Manish Ahuja 提交于
This adds a kernel command line option "phyp_dump", which takes a 0/1 value for disabling/ enabling phyp_dump at boot time. Kdump can use this on cmdline (phyp_dump=0) to disable phyp-dump during boot when enabling itself. This will ensure only one dumping mechanism is active at any given time. Signed-off-by: NManish Ahuja <mahuja@us.ibm.com> Signed-off-by: NPaul Mackerras <paulus@samba.org>
-
由 Manish Ahuja 提交于
Initial patch for reserving memory in early boot, and freeing it later. If the previous boot had ended with a crash, the reserved memory would contain a copy of the crashed kernel data. Signed-off-by: NManish Ahuja <mahuja@us.ibm.com> Signed-off-by: NLinas Vepstas <linasvepstas@gmail.com> Signed-off-by: NPaul Mackerras <paulus@samba.org>
-
- 20 2月, 2008 1 次提交
-
-
由 Becky Bruce 提交于
dt_mem_next_cell() currently does of_read_ulong(). This does not allow for the case where #size-cells and/or #address-cells = 2 on a 32-bit system, as it will end up reading 32 bits instead of the expected 64. Change it to use of_read_number instead and always return a u64. Signed-off-by: Becky Bruce <becky.bruce at freescale.com> Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: NPaul Mackerras <paulus@samba.org>
-
- 14 2月, 2008 1 次提交
-
-
由 David S. Miller 提交于
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 24 12月, 2007 1 次提交
-
-
由 Valentine Barshak 提交于
Renaming the CPU nodes with generic names put the CPU model in the "model" property and thus broke the PowerPC 440EP(x)/440GR(x) identical PVR workaround. The updates it to use the new model property for CPU identification. Signed-off-by: NValentine Barshak <vbarshak@ru.mvista.com> Signed-off-by: NJosh Boyer <jwboyer@linux.vnet.ibm.com>
-
- 11 12月, 2007 1 次提交
-
-
由 Michael Neuling 提交于
Currently we hardwire the number of SLBs to 64, but PAPR says we should use the ibm,slb-size property to obtain the number of SLB entries. This uses this property instead of assuming 64. If no property is found, we assume 64 entries as before. This soft patches the SLB handler, so it shouldn't change performance at all. Signed-off-by: NMichael Neuling <mikey@neuling.org> Signed-off-by: NPaul Mackerras <paulus@samba.org>
-
- 01 11月, 2007 1 次提交
-
-
由 Valentine Barshak 提交于
PowerPC 440EP(x) 440GR(x) processors have the same PVR values, since they have identical cores. However, FPU is not supported on GR(x) and enabling APU instruction broadcast in the CCR0 register (to enable FPU) may cause unpredictable results. There's no safe way to detect FPU support at runtime. This patch provides a workarund for the issue. We use a POWER6 "logical PVR approach". First, we identify all EP(x) and GR(x) processors as GR(x) ones (which is safe). Then we check the device tree cpu path. If we have a EP(x) processor entry, we call identify_cpu again with PVR | 0x8. This bit is always 0 in the real PVR. This way we enable FPU only for 440EP(x). Signed-off-by: NValentine Barshak <vbarshak@ru.mvista.com> Signed-off-by: NJosh Boyer <jwboyer@linux.vnet.ibm.com>
-
- 09 10月, 2007 1 次提交
-
-
由 Paul Mackerras 提交于
Discussions with firmware architects have confirmed that the bit in the ibm,pa-features property that indicates support for cache-inhibited large (>= 64kB) page mappings does in fact mean that the hypervisor allows 64kB mappings to I/O devices. Thus we can now enable the code that tests that bit and sets our CPU_FTR_CI_LARGE_PAGE feature bit. Signed-off-by: NPaul Mackerras <paulus@samba.org>
-
- 13 9月, 2007 2 次提交
-
-
由 Linas Vepstas 提交于
Grammatical corrections to comments. Signed-off-by: NLinas Vepstas <linas@austin.ibm.com> Signed-off-by: NPaul Mackerras <paulus@samba.org>
-
由 Linas Vepstas 提交于
Whitespace cleanup: badly indented lines. Signed-off-by: NLinas Vepstas <linas@austin.ibm.com> Signed-off-by: NPaul Mackerras <paulus@samba.org>
-
- 17 8月, 2007 1 次提交
-
-
由 Jesper Juhl 提交于
This removes several duplicate includes from arch/powerpc/. Signed-off-by: NJesper Juhl <jesper.juhl@gmail.com> Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: NPaul Mackerras <paulus@samba.org>
-
- 22 7月, 2007 1 次提交
-
-
由 Segher Boessenkool 提交于
...since it modifies it (when it sets the OF_DETACHED flag). Signed-off-by: NSegher Boessenkool <segher@kernel.crashing.org> Signed-off-by: NPaul Mackerras <paulus@samba.org>
-
- 20 7月, 2007 6 次提交
-
-
由 Stephen Rothwell 提交于
This consolidates the routines of_find_node_by_path, of_find_node_by_name, of_find_node_by_type and of_find_compatible_device. Again, the comparison of strings are done differently by Sparc and PowerPC and also these add read_locks around the iterations. Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au> Acked-by: NPaul Mackerras <paulus@samba.org> Acked-by: NDavid S. Miller <davem@davemloft.net>
-
由 Stephen Rothwell 提交于
This adds a read_lock around the child/next accesses on Sparc. Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au> Acked-by: NPaul Mackerras <paulus@samba.org> Acked-by: NDavid S. Miller <davem@davemloft.net>
-
由 Stephen Rothwell 提交于
This requires creating dummy of_node_{get,put} routines for sparc and sparc64. It also adds a read_lock around the parent accesses. Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au> Acked-by: NPaul Mackerras <paulus@samba.org> Acked-by: NDavid S. Miller <davem@davemloft.net>
-
由 Stephen Rothwell 提交于
The only change here is that a readlock is taken while the property list is being traversed on Sparc where it was not taken previously. Also, Sparc uses strcasecmp to compare property names while PowerPC uses strcmp. Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au> Acked-by: NPaul Mackerras <paulus@samba.org> Acked-by: NDavid S. Miller <davem@davemloft.net>
-
由 Stephen Rothwell 提交于
The only difference here is that Sparc uses strncmp to match compatibility names while PowerPC uses strncasecmp. Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au> Acked-by: NPaul Mackerras <paulus@samba.org> Acked-by: NDavid S. Miller <davem@davemloft.net>
-
由 Stephen Rothwell 提交于
This creates drivers/of/base.c (depending on CONFIG_OF) and puts the first trivially common bits from the prom.c files into it. Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au> Acked-by: NPaul Mackerras <paulus@samba.org> Acked-by: NDavid S. Miller <davem@davemloft.net>
-
- 10 7月, 2007 5 次提交
-
-
由 Mathieu Desnoyers 提交于
Signed-off-by: NMathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NPaul Mackerras <paulus@samba.org>
-
由 Michael Ellerman 提交于
The prom.c debugging code creates a "powerpc" directory in debugfs, which is nice, but doesn't allow any other debugging code to stick things under "powerpc" in debugfs. So make it global. While we're there we should make the prom.c debugging code depend on CONFIG_DEBUG_FS, because it doesn't work otherwise. Signed-off-by: NMichael Ellerman <michael@ellerman.id.au> Signed-off-by: NPaul Mackerras <paulus@samba.org>
-
由 Michael Ellerman 提交于
When the refcount for a device node goes to 0, we call the destructor - of_node_release(). This should only happen if we've already detached the node from the device tree. So add a flag OF_DETACHED which tracks detached-ness, and if we find ourselves in of_node_release() without it set, issue a warning and don't free the device_node. To avoid warning continuously reinitialise the kref to a sane value. Signed-off-by: NMichael Ellerman <michael@ellerman.id.au> Signed-off-by: NPaul Mackerras <paulus@samba.org>
-
由 Michael Ellerman 提交于
The struct device_node currently has a _flags variable, although it's only used for one flag - OF_DYNAMIC. Generalise the flag accessors so we can use them with other flags in future. Signed-off-by: NMichael Ellerman <michael@ellerman.id.au> Signed-off-by: NPaul Mackerras <paulus@samba.org>
-
由 Michael Ellerman 提交于
It's not sensible to call of_detach_node() on the root node, but we should check for it just to be safe. Signed-off-by: NMichael Ellerman <michael@ellerman.id.au> Signed-off-by: NPaul Mackerras <paulus@samba.org>
-
- 28 6月, 2007 1 次提交
-
-
由 Geoff Levand 提交于
Add a printout of the params value to early_init_devtree. This value is handy to have for comparison when debugging the bootwrapper code. Signed-off-by: NGeoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: NPaul Mackerras <paulus@samba.org>
-
- 02 6月, 2007 1 次提交
-
-
由 Michael Ellerman 提交于
The documentation for of_find_node_by_type() incorrectly refers to the "name" parameter - it should be "type". Also the behaviour when from == NULL is not really documented, fix that. Signed-off-by: NMichael Ellerman <michael@ellerman.id.au> Signed-off-by: NPaul Mackerras <paulus@samba.org>
-
- 17 5月, 2007 1 次提交
-
-
由 Benjamin Herrenschmidt 提交于
Our device-tree unflattening code makes sure the name and type fields of a device-node are not NULL. However, the code for dynamically adding devices nodes which is used for pSeries hotplug for example didn't do it, potentially causing crashes in some code that assume it can always do things like strcmp on those. Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: NPaul Mackerras <paulus@samba.org>
-
- 10 5月, 2007 1 次提交
-
-
由 Michael Ellerman 提交于
If CONFIG_BLK_DEV_INITRD is not defined the prop variable in early_init_dt_scan_chosen() is unused, causing a compiler warning. So split the initrd logic into a separate function, allowing us to declare prop only when we need it. Built for both cases and booted with an initrd. Signed-off-by: NMichael Ellerman <michael@ellerman.id.au> Signed-off-by: NPaul Mackerras <paulus@samba.org>
-
- 24 4月, 2007 5 次提交
-
-
由 Stephen Rothwell 提交于
Replace uses with of_find_node_by_name and for_each_node_by_name. Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: NPaul Mackerras <paulus@samba.org>
-
由 Stephen Rothwell 提交于
Replaced by of_find_node_by_type. Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: NPaul Mackerras <paulus@samba.org>
-
由 Stephen Rothwell 提交于
Replaced by of_find_node_by_path. Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: NPaul Mackerras <paulus@samba.org>
-
由 Stephen Rothwell 提交于
This old interface has no more users. Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: NPaul Mackerras <paulus@samba.org>
-
由 Stephen Rothwell 提交于
This is an old interface and is replaced by of_find_compatible_node. Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: NPaul Mackerras <paulus@samba.org>
-
- 13 4月, 2007 1 次提交
-
-
由 Stephen Rothwell 提交于
Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: NPaul Mackerras <paulus@samba.org>
-