Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752312AbdGDVTh (ORCPT ); Tue, 4 Jul 2017 17:19:37 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:55593 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752204AbdGDVTe (ORCPT ); Tue, 4 Jul 2017 17:19:34 -0400 Date: Tue, 4 Jul 2017 23:17:50 +0200 From: Karsten Merker To: Palmer Dabbelt , Thomas Gleixner Cc: patches@groups.riscv.org, peterz@infradead.org, mingo@redhat.com, mcgrof@kernel.org, viro@zeniv.linux.org.uk, sfr@canb.auug.org.au, nicolas.dichtel@6wind.com, rmk+kernel@armlinux.org.uk, msalter@redhat.com, tklauser@distanz.ch, will.deacon@arm.com, james.hogan@imgtec.com, paul.gortmaker@windriver.com, linux@roeck-us.net, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, albert@sifive.com Subject: Re: [patches] Re: [PATCH 1/9] RISC-V: Init and Halt Code Message-ID: <20170704211749.jqgfbgjqzm2bcppy@excalibur.cnev.de> References: <20170704195102.3974-1-palmer@dabbelt.com> <20170704195102.3974-2-palmer@dabbelt.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-No-Archive: yes User-Agent: NeoMutt/20170113 (1.7.2) X-Provags-ID: V03:K0:N5Tt9cRMvvXZMo9GulN8KK6zYK8WvLvXQKYTXv3rPWKP4RSmyFz fzKkrpg/VkOD+fjCkD2H4e73YUqAXzt7qUehm/WJEcwgcWDTLKpnIZFbttSVUrwzy+nJgI2 CmdtxDcbk8NOSzJFBTQ8ZuVZBBxWrJKVDBN7ttWevQFjnzfSF3531QG03E0h1xFfaqfrX0p Hu3LEEHsHaG1afagr3IzA== X-UI-Out-Filterresults: notjunk:1;V01:K0:lHlYE4ofR5U=:BPj1g/dUWgqjqyUqzETev/ wv1ikpTAA+qLOJ2TX+FyQc+bsXknSkC3+n4Ft9ZyUy80DmTPijfuqChj61/0M58rzSQZ8OgqQ f++6oOHgRg6YC4E41QbrlOvUTXxUA8HTQAHf1KebUygQhfOS1eOw7hfAlykSt13J23uf+pd67 K+aoiogLi95XkmdiZfT5ID//ZFS1Puz61nmQ0qypyV53BSNf6L4fiE2YxH3RPiRjLDzsbba9Q WngSwMmDHbRusnT72pIvYe0AQKyekaga0rG1pXbIPt6hS3pQO1CLYCooI6/r3Am9sxUGuwo9L 3flbJixgujB5JQqOb5cqxK05zKW3g3Q0QAGzg9d3IbAA+fzLQP3rH+XXHK2l6Xaydn56nx2JQ 9d8yIYiWLdvaN4T1chWdya5LoAhsHYH/1n5rSLvkg0NuCxvrbRXpneJe6Zg3d9l1VCdSukm/w UWglamZHv2cg1ZPfhcNvY4wkkPdAhk5i3iwTkBYtNd2sBoAHoPYnvX6rWVRE5h/8IsZ4c5nxW iIIFvAxJi4rRJo+VV/F+cYrE393v/75CLx7IRbv2rUUViIyU7HZkv5aWd+ynRprM/yhxbC0+N RhvSMgbDqKX0SYIu8SNog1R4rqp+VGT+5V7T1JN6qv3mxsKKcm530/Ugy3LCzKO49NsDMGzUQ enV4LKoJpIJNMIhC67/IW/yIo+77LpMQJDwTjUFRl0HrvA8G5Zf3o9G7+tkrYj8C69Ao= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1815 Lines: 56 On Tue, Jul 04, 2017 at 10:37:37PM +0200, Thomas Gleixner wrote: > On Tue, 4 Jul 2017, Palmer Dabbelt wrote: > > +unsigned long riscv_timebase; > > + > > +static int next_event(unsigned long delta, struct clock_event_device *ce) > > +{ > > + BUG_ON(ce != timer_riscv_device(smp_processor_id())); > > + sbi_set_timer(get_cycles64() + delta); > > + return 0; > > +} > > + > > +static unsigned long long rdtime(struct clocksource *cs) > > +{ > > + BUG_ON(cs != timer_riscv_source(smp_processor_id())); > > + return get_cycles64(); > > +} > > + > > +void riscv_timer_interrupt(void) > > +{ > > + int cpu = smp_processor_id(); > > + struct clock_event_device *evdev = timer_riscv_device(cpu); > > + > > + evdev->event_handler(evdev); > > +} > > + > > +void __init time_init(void) > > +{ > > + struct device_node *cpu; > > + u32 prop; > > + int cpu_id = smp_processor_id(); > > + > > + cpu = of_find_node_by_path("/cpus"); > > + if (!cpu || of_property_read_u32(cpu, "timebase-frequency", &prop)) > > + panic(KERN_WARNING "RISC-V system with no 'timebase-frequency' in DTS\n"); > > + riscv_timebase = prop; > > + > > + lpj_fine = riscv_timebase / HZ; > > + > > + timer_riscv_init(cpu_id, riscv_timebase, &rdtime, &next_event); > > This function is nowhere.... Neither can I find the header file. It is part of the RISC-V clock driver patchset, please cf. https://github.com/riscv/riscv-linux/commit/0705a31372d4714e54c5104e02021441785c1fd5 https://github.com/riscv/riscv-linux/commits/riscv-for-submission-v4 has the various RISC-V-related driver patchsets merged in (in addition to this arch patchset). Regards, Karsten -- Gem. Par. 28 Abs. 4 Bundesdatenschutzgesetz widerspreche ich der Nutzung sowie der Weitergabe meiner personenbezogenen Daten für Zwecke der Werbung sowie der Markt- oder Meinungsforschung.