| Age | Commit message (Collapse) | Author | Files | Lines |
|
IRQsoff tracer requires to protect cpu_idle function
to get correct timing report.
Signed-off-by: Michal Simek <[email protected]>
|
|
I had to comment sched_clock generic function because of broken toolchain.
It is fine grain timing.
Signed-off-by: Michal Simek <[email protected]>
|
|
Implement intelligent backtracing by searching for stack frame creation,
and emitting only return addresses. Use print_hex_dump() to display the
entire binary kernel stack.
Limitation: MMU kernels are not currently able to trace beyond a system trap
(interrupt, syscall, etc.). It is the intent of this patch to provide
infrastructure that can be extended to add this capability later.
Changes from V1:
* Removed checks in find_frame_creation() that prevented location of the frame
creation instruction in heavily optimized code
* Various formatting/commenting/file location tweaks per review comments
* Dropped Kconfig option to enable STACKTRACE as something logically separate
Signed-off-by: Steven J. Magnani <[email protected]>
|
|
Allow developer to configure memory page size at compile time.
Larger pages can improve performance on some workloads.
Based on PowerPC code.
Signed-off-by: Steven J. Magnani <[email protected]>
Signed-off-by: Michal Simek <[email protected]>
|
|
Add trace_hardirqs_off and trace_hardirqs_on to do_IRQ function.
Signed-off-by: Michal Simek <[email protected]>
|
|
sys_clone syscall ignored args which this patch mapped to args
which are passing from glibc.
Here is the origin problem description.
"I ran the static libgcc tests (very few of them are there, they are
mostly dynamically linked) and some of them fail with an assertion in
fork() system call (tid != pid), I looked at the microblaze/entry.S
file and it looks suspicious (ignores arguments 3-5)"
Arg mapping should be:
glibc ARCH_FORK(...) -> do_fork(...)
r5 -> r5 (clone_flags)
r6 -> r6 (stack_start, use parent->stack if NULL)
pt_regs -> r7 (pt_regs)
r7 -> r8 (stack_size)
r8 -> r9 (parent_tidptr)
r9 -> r10 (child_tidptr)
Signed-off-by: John Williams <[email protected]>
Signed-off-by: Michal Simek <[email protected]>
|
|
copy_to_user_page macro is used in mm/memory.c:access_process_vm
function. This function is called from ptrace code (POKETEXT, POKEDATA)
which write data to memory. Microblaze handle physical address for
caches that's why there is virt_to_phys conversion.
There is potential one location which can caused the problem on WB system.
The important is take a look at write PTRACEs requests
(POKE/TEXT, DATA, USR).
Note:
Majority of Microblaze PTRACE code is moved to generic location
in newer kernel version that's why this solution should work on
the newest kernel version too.
linux/io.h is in cacheflush because of mm/nommu.c
Tested on a WB system - hello world debugging.
Signed-off-by: Michal Simek <[email protected]>
|
|
There is wrong comment for TLB. Early printk uartlite
console uses TLB 63.
Signed-off-by: Michal Simek <[email protected]>
|
|
This list used was by only two platforms with all other platforms defining an
own list of valid bus id's to pass to of_platform_bus_probe. This patch:
i) copies the default list to the two platforms that depended on it (powerpc)
ii) remove the usage of of_default_bus_ids in of_platform_bus_probe
iii) removes the definition of the list from all architectures that defined it
Passing a NULL 'matches' parameter to of_platform_bus_probe is still valid; the
function returns no error in that case as the NULL value is equivalent to an
empty list.
Signed-off-by: Jonas Bonn <[email protected]>
[[email protected]: added __initdata annotations, warn on and return error on missing match table, and fix whitespace errors]
Signed-off-by: Grant Likely <[email protected]>
|
|
There's no need for this function to be architecture specific and all four
architectures defining it had the same definition. The function has been
moved to drivers/of/platform.c.
Signed-off-by: Jonas Bonn <[email protected]>
[[email protected]: moved to drivers/of/platform.c, simplified code, and added kerneldoc comment]
Signed-off-by: Grant Likely <[email protected]>
Acked-by: David S. Miller <[email protected]>
|
|
of_device is just a #define alias to platform_device. This patch
replaces all references to it with platform_device.
Signed-off-by: Grant Likely <[email protected]>
|
|
Both of_bus_type and of_platform_bus_type are just #define aliases
for the platform bus. This patch removes all references to them and
switches to the of_register_platform_driver()/of_unregister_platform_driver()
API for registering.
Subsequent patches will convert each user of of_register_platform_driver()
into plain platform_drivers without the of_platform_driver shim. At which
point the of_register_platform_driver()/of_unregister_platform_driver()
functions can be removed.
Signed-off-by: Grant Likely <[email protected]>
Acked-by: David S. Miller <[email protected]>
|
|
of_platform_bus was being used in the same manner as the platform_bus.
The only difference being that of_platform_bus devices are generated
from data in the device tree, and platform_bus devices are usually
statically allocated in platform code. Having them separate causes
the problem of device drivers having to be registered twice if it
was possible for the same device to appear on either bus.
This patch removes of_platform_bus_type and registers all of_platform
bus devices and drivers on the platform bus instead. A previous patch
made the of_device structure an alias for the platform_device structure,
and a shim is used to adapt of_platform_drivers to the platform bus.
After all of of_platform_bus drivers are converted to be normal platform
drivers, the shim code can be removed.
Signed-off-by: Grant Likely <[email protected]>
Acked-by: David S. Miller <[email protected]>
|
|
Conflicts:
arch/sparc/kernel/prom_64.c
|
|
Signed-off-by: Grant Likely <[email protected]>
Acked-by: Benjamin Herrenschmidt <[email protected]>
|
|
via following scripts
FILES=$(find * -type f | grep -vE 'oprofile|[^K]config')
sed -i \
-e 's/lmb/memblock/g' \
-e 's/LMB/MEMBLOCK/g' \
$FILES
for N in $(find . -name lmb.[ch]); do
M=$(echo $N | sed 's/lmb/memblock/g')
mv $N $M
done
and remove some wrong change like lmbench and dlmb etc.
also move memblock.c from lib/ to mm/
Suggested-by: Ingo Molnar <[email protected]>
Acked-by: "H. Peter Anvin" <[email protected]>
Acked-by: Benjamin Herrenschmidt <[email protected]>
Acked-by: Linus Torvalds <[email protected]>
Signed-off-by: Yinghai Lu <[email protected]>
Signed-off-by: Benjamin Herrenschmidt <[email protected]>
|
|
Currently the kernel uses the struct device_node.data pointer to resolve
a struct gpio_chip pointer from a device tree node. However, the .data
member doesn't provide any type checking and there aren't any rules
enforced on what it should be used for. There's no guarantee that the
data stored in it actually points to an gpio_chip pointer.
Instead of relying on the .data pointer, this patch modifies the code
to add a lookup function which scans through the registered gpio_chips
and returns the gpio_chip that has a pointer to the specified
device_node.
Signed-off-by: Grant Likely <[email protected]>
CC: Andrew Morton <[email protected]>
CC: Anton Vorontsov <[email protected]>
CC: Grant Likely <[email protected]>
CC: David Brownell <[email protected]>
CC: Bill Gatliff <[email protected]>
CC: Dmitry Eremin-Solenikov <[email protected]>
CC: Benjamin Herrenschmidt <[email protected]>
CC: Jean Delvare <[email protected]>
CC: [email protected]
CC: [email protected]
|
|
The OF gpio infrastructure is great for describing GPIO connections within
the device tree. However, using a GPIO binding still requires changes to
the gpio controller just to add an of_gpio structure. In most cases, the
gpio controller doesn't actually need any special support and the simple
OF gpio mapping function is more than sufficient. Additional, the current
scheme of using of_gpio_chip requires a convoluted scheme to maintain
1:1 mappings between of_gpio_chip and gpio_chip instances.
If the struct of_gpio_chip data members were moved into struct gpio_chip,
then it would simplify the processing of OF gpio bindings, and it would
make it trivial to use device tree OF connections on existing gpiolib
controller drivers.
This patch eliminates the of_gpio_chip structure and moves the relevant
fields into struct gpio_chip (conditional on CONFIG_OF_GPIO). This move
simplifies the existing code and prepares for adding automatic device tree
support to existing drivers.
Signed-off-by: Grant Likely <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Anton Vorontsov <[email protected]>
Cc: Grant Likely <[email protected]>
Cc: David Brownell <[email protected]>
Cc: Bill Gatliff <[email protected]>
Cc: Dmitry Eremin-Solenikov <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Jean Delvare <[email protected]>
|
|
This patch merges the common routines of_device_alloc() and
of_device_make_bus_id() from powerpc and microblaze.
Signed-off-by: Grant Likely <[email protected]>
CC: Michal Simek <[email protected]>
CC: Grant Likely <[email protected]>
CC: Benjamin Herrenschmidt <[email protected]>
CC: Stephen Rothwell <[email protected]>
CC: [email protected]
CC: [email protected]
CC: [email protected]
|
|
Merge common code between PowerPC and microblaze. This patch merges
the code that scans the tree and registers devices. The functions
merged are of_platform_bus_probe(), of_platform_bus_create(), and
of_platform_device_create().
This patch also move the of_default_bus_ids[] table out of a Microblaze
header file and makes it non-static. The device ids table isn't merged
because powerpc and microblaze use different default data.
Signed-off-by: Grant Likely <[email protected]>
CC: Michal Simek <[email protected]>
CC: Grant Likely <[email protected]>
CC: Benjamin Herrenschmidt <[email protected]>
CC: Stephen Rothwell <[email protected]>
CC: [email protected]
CC: [email protected]
|
|
Merge common code between powerpc and microblaze
Signed-off-by: Grant Likely <[email protected]>
CC: Michal Simek <[email protected]>
CC: Wolfram Sang <[email protected]>
CC: Stephen Rothwell <[email protected]>
CC: Benjamin Herrenschmidt <[email protected]>
CC: [email protected]
CC: [email protected]
|
|
Microblaze and PowerPC share a large chunk of code for translating
OF device tree data into usable addresses. Differences between the two
consist of cosmetic differences, and the addition of dma-ranges support
code to powerpc but not microblaze. This patch moves the powerpc
version into common code and applies many of the cosmetic (non-functional)
changes from the microblaze version.
Signed-off-by: Grant Likely <[email protected]>
Acked-by: Benjamin Herrenschmidt <[email protected]>
CC: Michal Simek <[email protected]>
CC: Wolfram Sang <[email protected]>
CC: Stephen Rothwell <[email protected]>
|
|
Merge common code between PowerPC and Microblaze. This patch also
moves the prototype of pci_address_to_pio() out of pci-bridge.h and
into prom.h because the only user of pci_address_to_pio() is
of_address_to_resource().
Signed-off-by: Grant Likely <[email protected]>
Acked-by: Benjamin Herrenschmidt <[email protected]>
CC: Michal Simek <[email protected]>
CC: Stephen Rothwell <[email protected]>
|
|
Merge common code between Microblaze and PowerPC. This patch creates
new of_address.h and address.c files to containing address translation
and mapping routines. First routine to be moved it of_iomap()
Signed-off-by: Grant Likely <[email protected]>
Acked-by: Benjamin Herrenschmidt <[email protected]>
CC: Michal Simek <[email protected]>
CC: Stephen Rothwell <[email protected]>
|
|
Merge common irq mapping code between PowerPC and Microblaze.
This patch merges of_irq_find_parent(), of_irq_map_raw() and
of_irq_map_one(). The functions are dependent on one another, so all
three are merged in a single patch. Other than cosmetic difference
(ie. DBG() vs. pr_debug()), the implementations are identical.
of_irq_to_resource() is also merged, but in this case the
implementations are different. This patch drops the microblaze version
and uses the powerpc implementation unchanged. The microblaze version
essentially open-coded irq_of_parse_and_map() which it does not need
to do. Therefore the powerpc version is safe to adopt.
Signed-off-by: Grant Likely <[email protected]>
CC: Michal Simek <[email protected]>
CC: Benjamin Herrenschmidt <[email protected]>
CC: Stephen Rothwell <[email protected]>
|
|
Microblaze doesn't have any legacy workaround in the device tree irq
mapping data. All of the of_irq_workarounds stuff can be dropped
Signed-off-by: Grant Likely <[email protected]>
Cc: Michal Simek <[email protected]>
Cc: Stephen Rothwell <[email protected]>
|
|
Merge common code between PowerPC and Microblaze. SPARC implements
irq_of_parse_and_map(), but the implementation is different, so it
does not use this code.
Signed-off-by: Grant Likely <[email protected]>
Acked-by: Benjamin Herrenschmidt <[email protected]>
Cc: Michal Simek <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: Stephen Rothwell <[email protected]>
Cc: Jeremy Kerr <[email protected]>
|
|
The commit "asm-generic: add NEED_SG_DMA_LENGTH to define sg_dma_len()"
18e98307de0d746cb0845ebf66535ce2184c25a2 broke microblaze compilation.
dma_direct_map_sg() sets sg->dma_length, however microblaze doesn't
set NEED_SG_DMA_LENGTH so scatterlist strcutres doesn't include
dma_length.
sg->dma_length is always equal to sg->length on microblaze. So we
don't need to set set dma_length, that is, microblaze can simply use
sg->length.
Signed-off-by: FUJITA Tomonori <[email protected]>
Signed-off-by: Michal Simek <[email protected]>
|
|
Merging in current state of Linus' tree to deal with merge conflicts and
build failures in vio.c after merge.
Conflicts:
drivers/i2c/busses/i2c-cpm.c
drivers/i2c/busses/i2c-mpc.c
drivers/net/gianfar.c
Also fixed up one line in arch/powerpc/kernel/vio.c to use the
correct node pointer.
Signed-off-by: Grant Likely <[email protected]>
|
|
By moving dma_mask into pdev_archdata, and adding archdata to
struct of_device, it makes it possible to substitute of_device
with struct platform_device, which is a stepping stone to
removing the of_platform bus entirely.
Signed-off-by: Grant Likely <[email protected]>
|
|
This patch eliminates the node pointer from struct of_device and the
of_node (or prom_node) pointer from struct dev_archdata since the node
pointer is now part of struct device proper when CONFIG_OF is set, and
all users of the old pointer locations have already been converted over
to use device->of_node.
Also remove dev_archdata_{get,set}_node() as it is no longer used by
anything.
Signed-off-by: Grant Likely <[email protected]>
|
|
The following structure elements duplicate the information in
'struct device.of_node' and so are being eliminated. This patch
makes all readers of these elements use device.of_node instead.
(struct of_device *)->node
(struct dev_archdata *)->prom_node (sparc)
(struct dev_archdata *)->of_node (powerpc & microblaze)
Signed-off-by: Grant Likely <[email protected]>
|
|
There is necessary to flush whole dcache. Icache work should be
done in kernel/module.c.
Signed-off-by: Michal Simek <[email protected]>
|
|
Export __strncpy_user, memory_size, ioremap_bot for modules.
Signed-off-by: Michal Simek <[email protected]>
|
|
CC arch/microblaze/kernel/cpu/cache.o
arch/microblaze/kernel/cpu/cache.c: In function '__invalidate_dcache_range_wb':
arch/microblaze/kernel/cpu/cache.c:398: warning: ISO C90 forbids mixed declarations and code
arch/microblaze/kernel/cpu/cache.c: In function '__flush_dcache_range_wb':
arch/microblaze/kernel/cpu/cache.c:509: warning: ISO C90 forbids mixed declara
Signed-off-by: Michal Simek <[email protected]>
|
|
Modules that use copy_{to,from}_user(), memcpy(), and memset() fail to build
in certain circumstances.
Signed-off-by: Steven J. Magnani <[email protected]>
Signed-off-by: Michal Simek <[email protected]>
|
|
schedule() should not be called with interrupts disabled.
Signed-off-by: Steven J. Magnani <[email protected]>
Signed-off-by: Michal Simek <[email protected]>
|
|
1. Remove CACHE_ALL_LOOP2 macro because it is identical to CACHE_ALL_LOOP
2. Change BUG_ON to WARN_ON
3. Remove end aligned from CACHE_LOOP_LIMITS.
C implementation do not need aligned end address and ASM code do aligned
in their macros
4. ASM optimized CACHE_RANGE_LOOP_1/2 macros needs to get aligned end address.
Because end address is compound from start + size, end address is the first address
which is exclude.
Here is the corresponding code which describe it.
+ int align = ~(line_length - 1);
+ end = ((end & align) == end) ? end - line_length : end & align;
a) end is aligned:
it is necessary to subtruct line length because we don't want to work with
next cacheline
b) end address is not aligned:
Just align it to be ready for ASM code.
Signed-off-by: Michal Simek <[email protected]>
|
|
Show cache line length in /proc/cpuinfo.
Signed-off-by: Michal Simek <[email protected]>
|
|
Copy & paste error.
Signed-off-by: Michal Simek <[email protected]>
|
|
This patch fix consistent code which had problems with consistent_free
function.
I am not sure if we need to call flush_tlb_all after it but it keeps
tlbs synced.
I added noMMU and MMU version together.
Uncached shadow feature is not tested.
Signed-off-by: Michal Simek <[email protected]>
|
|
Current implementation doesn't handle dcache_line_length
correctly that's why is better to use generic memcpy.
Cache optimized function could be good way howto improve
performance but must be based on benchmarking not blind
function like this.
Signed-off-by: Michal Simek <[email protected]>
|
|
Fix divide exception message to say "divide by zero".
Signed-off-by: Randy Dunlap <[email protected]>
Cc: Michal Simek <[email protected]>
Cc: [email protected]
Signed-off-by: Michal Simek <[email protected]>
|
|
I found several function which we don't use that's why I am removing them.
Signed-off-by: Michal Simek <[email protected]>
|
|
_start is located in .text, which causes mismatch warnings with
machine_early_init() and start_kernel() in .init.text.
Signed-off-by: Steven J. Magnani <[email protected]>
Signed-off-by: Michal Simek <[email protected]>
|
|
Function traces on Microblaze don't include IRQ entry and exit arrows,
i.e.
0) | memcpy_toiovec() {
0) ==========> |
0) | do_IRQ() {
...
0) <========== |
0) ! 5414.000 us | }
...because do_IRQ() doesn't have the proper attributes.
Signed-off-by: Steven J. Magnani <[email protected]>
Signed-off-by: Michal Simek <[email protected]>
|
|
Currently, platforms using CONFIG_OF add a 'struct device_node *of_node'
to dev->archdata. However, with CONFIG_OF becoming generic for all
architectures, it makes sense for commonality to move it out of archdata
and into struct device proper.
This patch adds a struct device_node *of_node member to struct device
and updates all locations which currently write the device_node pointer
into archdata to also update dev->of_node. Subsequent patches will
modify callers to use the archdata location and ultimately remove
the archdata member entirely.
Signed-off-by: Grant Likely <[email protected]>
Acked-by: Greg Kroah-Hartman <[email protected]>
CC: Michal Simek <[email protected]>
CC: Greg Kroah-Hartman <[email protected]>
CC: Benjamin Herrenschmidt <[email protected]>
CC: "David S. Miller" <[email protected]>
CC: Stephen Rothwell <[email protected]>
CC: Jeremy Kerr <[email protected]>
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
|
|
Patch b3c1e01a09d6af2dd7811a066ffcfc5171be2bed should do it.
Signed-off-by: Michal Simek <[email protected]>
|
|
The Microblaze dynamic ftrace code assumes a call ordering that is not met
in all scenarios. Specifically, executing a command similar to:
echo 105 > /sys/kernel/debug/tracing/set_ftrace_pid
before any other tracing-related commands results in a kernel panic:
BUG: failure at arch/microblaze/kernel/ftrace.c:198/ftrace_update_ftrace_func()!
Recoding ftrace_update_ftrace_func() to use &ftrace_caller directly eliminates
the need to capture its address elsewhere (and thus rely on a particular call
sequence).
Signed-off-by: Steven J. Magnani <[email protected]>
Signed-off-by: Michal Simek <[email protected]>
|
|
|