* linux-next: manual merge of the sparc-next tree with the sparc tree
@ 2014-08-05 23:58 Stephen Rothwell
2014-08-06 1:58 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Stephen Rothwell @ 2014-08-05 23:58 UTC (permalink / raw)
To: David Miller; +Cc: linux-next, linux-kernel, bob picco
[-- Attachment #1: Type: text/plain, Size: 3147 bytes --]
Hi David,
Today's linux-next merge of the sparc-next tree got a conflict in
arch/sparc/mm/init_64.c between commit 4ca9a23765da ("sparc64: Guard
against flushing openfirmware mappings") from the sparc tree and commit
f6d4fb5cc047 ("sparc64 - add mem to iomem resource") from the
sparc-next tree.
I fixed it up (see below) and can carry the fix as necessary (no action
is required).
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
diff --cc arch/sparc/mm/init_64.c
index 2cfb0f25e0ed,9f4f532e2627..000000000000
--- a/arch/sparc/mm/init_64.c
+++ b/arch/sparc/mm/init_64.c
@@@ -2708,25 -2701,66 +2709,89 @@@ void hugetlb_setup(struct pt_regs *regs
}
#endif
+#ifdef CONFIG_SMP
+#define do_flush_tlb_kernel_range smp_flush_tlb_kernel_range
+#else
+#define do_flush_tlb_kernel_range __flush_tlb_kernel_range
+#endif
+
+void flush_tlb_kernel_range(unsigned long start, unsigned long end)
+{
+ if (start < HI_OBP_ADDRESS && end > LOW_OBP_ADDRESS) {
+ if (start < LOW_OBP_ADDRESS) {
+ flush_tsb_kernel_range(start, LOW_OBP_ADDRESS);
+ do_flush_tlb_kernel_range(start, LOW_OBP_ADDRESS);
+ }
+ if (end > HI_OBP_ADDRESS) {
+ flush_tsb_kernel_range(end, HI_OBP_ADDRESS);
+ do_flush_tlb_kernel_range(end, HI_OBP_ADDRESS);
+ }
+ } else {
+ flush_tsb_kernel_range(start, end);
+ do_flush_tlb_kernel_range(start, end);
+ }
+}
++
+ static struct resource code_resource = {
+ .name = "Kernel code",
+ .flags = IORESOURCE_BUSY | IORESOURCE_MEM
+ };
+
+ static struct resource data_resource = {
+ .name = "Kernel data",
+ .flags = IORESOURCE_BUSY | IORESOURCE_MEM
+ };
+
+ static struct resource bss_resource = {
+ .name = "Kernel bss",
+ .flags = IORESOURCE_BUSY | IORESOURCE_MEM
+ };
+
+ static inline resource_size_t compute_kern_paddr(void *addr)
+ {
+ return (resource_size_t) (addr - KERNBASE + kern_base);
+ }
+
+ static void __init kernel_lds_init(void)
+ {
+ code_resource.start = compute_kern_paddr(_text);
+ code_resource.end = compute_kern_paddr(_etext - 1);
+ data_resource.start = compute_kern_paddr(_etext);
+ data_resource.end = compute_kern_paddr(_edata - 1);
+ bss_resource.start = compute_kern_paddr(__bss_start);
+ bss_resource.end = compute_kern_paddr(_end - 1);
+ }
+
+ static int __init report_memory(void)
+ {
+ int i;
+ struct resource *res;
+
+ kernel_lds_init();
+
+ for (i = 0; i < pavail_ents; i++) {
+ res = kzalloc(sizeof(struct resource), GFP_KERNEL);
+
+ if (!res) {
+ pr_warn("Failed to allocate source.\n");
+ break;
+ }
+
+ res->name = "System RAM";
+ res->start = pavail[i].phys_addr;
+ res->end = pavail[i].phys_addr + pavail[i].reg_size - 1;
+ res->flags = IORESOURCE_BUSY | IORESOURCE_MEM;
+
+ if (insert_resource(&iomem_resource, res) < 0) {
+ pr_warn("Resource insertion failed.\n");
+ break;
+ }
+
+ insert_resource(res, &code_resource);
+ insert_resource(res, &data_resource);
+ insert_resource(res, &bss_resource);
+ }
+
+ return 0;
+ }
+ device_initcall(report_memory);
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: linux-next: manual merge of the sparc-next tree with the sparc tree
2014-08-05 23:58 linux-next: manual merge of the sparc-next tree with the sparc tree Stephen Rothwell
@ 2014-08-06 1:58 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2014-08-06 1:58 UTC (permalink / raw)
To: sfr; +Cc: linux-next, linux-kernel, bpicco
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 6 Aug 2014 09:58:45 +1000
> Today's linux-next merge of the sparc-next tree got a conflict in
> arch/sparc/mm/init_64.c between commit 4ca9a23765da ("sparc64: Guard
> against flushing openfirmware mappings") from the sparc tree and commit
> f6d4fb5cc047 ("sparc64 - add mem to iomem resource") from the
> sparc-next tree.
>
> I fixed it up (see below) and can carry the fix as necessary (no action
> is required).
Thanks Stephen, simple non-overlapping additions and I'm about to push
that resolution to my tree.
Thanks again!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-08-06 1:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-05 23:58 linux-next: manual merge of the sparc-next tree with the sparc tree Stephen Rothwell
2014-08-06 1:58 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.