Re: [PATCH 31/48] uv: Replace __get_cpu_var
On Wed, 5 Mar 2014, Mike Travis wrote: > I haven't had much chance yet to look over your proposed changes but > FYI, the counters are strictly feedback to insure that there are not > unhandled NMI events from the perf subsystem. The exact count is > irrelevant. IOW, counts in the double or triple digits is okay, > counts > 100,000 is definitely not okay (there are multiple millions > of perf events every 'perf top' refresh.) > > I'm not sure if this alters how you want to approach the changes. Gotta patch here that converts all the atomic per cpu counters to int but the local64_t definitions look very strange to me. I have never seen a local64_t definition that is global and used for a counters. That can only work if there is only one and exactly one processor that is modifying the count. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 31/48] uv: Replace __get_cpu_var
On Wed, 5 Mar 2014, Mike Travis wrote: I haven't had much chance yet to look over your proposed changes but FYI, the counters are strictly feedback to insure that there are not unhandled NMI events from the perf subsystem. The exact count is irrelevant. IOW, counts in the double or triple digits is okay, counts 100,000 is definitely not okay (there are multiple millions of perf events every 'perf top' refresh.) I'm not sure if this alters how you want to approach the changes. Gotta patch here that converts all the atomic per cpu counters to int but the local64_t definitions look very strange to me. I have never seen a local64_t definition that is global and used for a counters. That can only work if there is only one and exactly one processor that is modifying the count. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 31/48] uv: Replace __get_cpu_var
On 3/5/2014 1:57 PM, Christoph Lameter wrote: > The driver seems to use local64_t to define a single static instance of a > counter and then seems to think that it is safe to increment the counter > from multiple processors using local64_inc and friends. Common > misunderstanding and a reason why I wanted the this_cpu operations. > > The counters seem to be exported via module parameters.. So I guess we > need to define these per cpu and then sum them up when they need to be > displayed. > > Dimitri? > > Maybe lets move this outside of this patchset. > Hi Christoph, I haven't had much chance yet to look over your proposed changes but FYI, the counters are strictly feedback to insure that there are not unhandled NMI events from the perf subsystem. The exact count is irrelevant. IOW, counts in the double or triple digits is okay, counts > 100,000 is definitely not okay (there are multiple millions of perf events every 'perf top' refresh.) I'm not sure if this alters how you want to approach the changes. Thanks, Mike -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 31/48] uv: Replace __get_cpu_var
The driver seems to use local64_t to define a single static instance of a counter and then seems to think that it is safe to increment the counter from multiple processors using local64_inc and friends. Common misunderstanding and a reason why I wanted the this_cpu operations. The counters seem to be exported via module parameters.. So I guess we need to define these per cpu and then sum them up when they need to be displayed. Dimitri? Maybe lets move this outside of this patchset. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 31/48] uv: Replace __get_cpu_var
On Tue, 4 Mar 2014, Andrew Morton wrote: > On Tue, 4 Mar 2014 21:31:12 -0600 (CST) Christoph Lameter > wrote: > > --- a/arch/x86/include/asm/uv/uv_hub.h~uv-replace-__get_cpu_var-fix > +++ a/arch/x86/include/asm/uv/uv_hub.h > @@ -618,7 +618,7 @@ struct uv_cpu_nmi_s { > }; > > DECLARE_PER_CPU(struct uv_cpu_nmi_s, __uv_cpu_nmi); > -#define uv_cpu_nmi __this_cpu_read(_uv_cpu_nmi) > +#define uv_cpu_nmi __this_cpu_read(__uv_cpu_nmi) > #define uv_hub_nmi (uv_cpu_nmi.hub) > #define uv_cpu_nmi_per(cpu) (per_cpu(__uv_cpu_nmi, cpu)) > #define uv_hub_nmi_per(cpu) (uv_cpu_nmi_per(cpu).hub) > > arch/x86/platform/uv/uv_nmi.c: In function 'uv_check_nmi': > arch/x86/platform/uv/uv_nmi.c:218: error: lvalue required as increment operand Uhh.. Lets drop this patch for now. This would mean more work is required. Will submit a more extensive patch. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 31/48] uv: Replace __get_cpu_var
On Tue, 4 Mar 2014, Andrew Morton wrote: On Tue, 4 Mar 2014 21:31:12 -0600 (CST) Christoph Lameter c...@linux.com wrote: --- a/arch/x86/include/asm/uv/uv_hub.h~uv-replace-__get_cpu_var-fix +++ a/arch/x86/include/asm/uv/uv_hub.h @@ -618,7 +618,7 @@ struct uv_cpu_nmi_s { }; DECLARE_PER_CPU(struct uv_cpu_nmi_s, __uv_cpu_nmi); -#define uv_cpu_nmi __this_cpu_read(_uv_cpu_nmi) +#define uv_cpu_nmi __this_cpu_read(__uv_cpu_nmi) #define uv_hub_nmi (uv_cpu_nmi.hub) #define uv_cpu_nmi_per(cpu) (per_cpu(__uv_cpu_nmi, cpu)) #define uv_hub_nmi_per(cpu) (uv_cpu_nmi_per(cpu).hub) arch/x86/platform/uv/uv_nmi.c: In function 'uv_check_nmi': arch/x86/platform/uv/uv_nmi.c:218: error: lvalue required as increment operand Uhh.. Lets drop this patch for now. This would mean more work is required. Will submit a more extensive patch. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 31/48] uv: Replace __get_cpu_var
The driver seems to use local64_t to define a single static instance of a counter and then seems to think that it is safe to increment the counter from multiple processors using local64_inc and friends. Common misunderstanding and a reason why I wanted the this_cpu operations. The counters seem to be exported via module parameters.. So I guess we need to define these per cpu and then sum them up when they need to be displayed. Dimitri? Maybe lets move this outside of this patchset. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 31/48] uv: Replace __get_cpu_var
On 3/5/2014 1:57 PM, Christoph Lameter wrote: The driver seems to use local64_t to define a single static instance of a counter and then seems to think that it is safe to increment the counter from multiple processors using local64_inc and friends. Common misunderstanding and a reason why I wanted the this_cpu operations. The counters seem to be exported via module parameters.. So I guess we need to define these per cpu and then sum them up when they need to be displayed. Dimitri? Maybe lets move this outside of this patchset. Hi Christoph, I haven't had much chance yet to look over your proposed changes but FYI, the counters are strictly feedback to insure that there are not unhandled NMI events from the perf subsystem. The exact count is irrelevant. IOW, counts in the double or triple digits is okay, counts 100,000 is definitely not okay (there are multiple millions of perf events every 'perf top' refresh.) I'm not sure if this alters how you want to approach the changes. Thanks, Mike -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 31/48] uv: Replace __get_cpu_var
On Tue, 4 Mar 2014 21:31:12 -0600 (CST) Christoph Lameter wrote: > On Tue, 4 Mar 2014, Andrew Morton wrote: > > > > > > > ... > > > > > > --- linux.orig/arch/x86/include/asm/uv/uv_hub.h 2014-02-03 > > > 14:16:53.987889372 -0600 > > > +++ linux/arch/x86/include/asm/uv/uv_hub.h2014-02-03 > > > 14:16:53.987889372 -0600 > > > @@ -618,7 +618,7 @@ > > > }; > > > > > > DECLARE_PER_CPU(struct uv_cpu_nmi_s, __uv_cpu_nmi); > > > -#define uv_cpu_nmi (__get_cpu_var(__uv_cpu_nmi)) > > > +#define uv_cpu_nmi __this_cpu_read(_uv_cpu_nmi) > > > > arch/x86/platform/uv/uv_nmi.c: In function 'uv_check_nmi': > > arch/x86/platform/uv/uv_nmi.c:218: error: '_uv_cpu_nmi' undeclared (first > > use in this function) > > arch/x86/platform/uv/uv_nmi.c:218: error: (Each undeclared identifier is > > reported only once > > arch/x86/platform/uv/uv_nmi.c:218: error: for each function it appears in.) > > > > > > This? > > Nope. I missed an underscore. > > > > --- a/arch/x86/include/asm/uv/uv_hub.h~uv-replace-__get_cpu_var-fix > > +++ a/arch/x86/include/asm/uv/uv_hub.h > > @@ -618,7 +618,7 @@ struct uv_cpu_nmi_s { > > }; > > > > DECLARE_PER_CPU(struct uv_cpu_nmi_s, __uv_cpu_nmi); > > -#define uv_cpu_nmi __this_cpu_read(_uv_cpu_nmi) > > +#define uv_cpu_nmi (*this_cpu_ptr(&__uv_cpu_nmi)) > > __this_cpu_read(__uv_cpu_nmi) --- a/arch/x86/include/asm/uv/uv_hub.h~uv-replace-__get_cpu_var-fix +++ a/arch/x86/include/asm/uv/uv_hub.h @@ -618,7 +618,7 @@ struct uv_cpu_nmi_s { }; DECLARE_PER_CPU(struct uv_cpu_nmi_s, __uv_cpu_nmi); -#define uv_cpu_nmi __this_cpu_read(_uv_cpu_nmi) +#define uv_cpu_nmi __this_cpu_read(__uv_cpu_nmi) #define uv_hub_nmi (uv_cpu_nmi.hub) #define uv_cpu_nmi_per(cpu)(per_cpu(__uv_cpu_nmi, cpu)) #define uv_hub_nmi_per(cpu)(uv_cpu_nmi_per(cpu).hub) arch/x86/platform/uv/uv_nmi.c: In function 'uv_check_nmi': arch/x86/platform/uv/uv_nmi.c:218: error: lvalue required as increment operand arch/x86/platform/uv/uv_nmi.c: In function 'uv_nmi_wait': arch/x86/platform/uv/uv_nmi.c:362: error: lvalue required as unary '&' operand arch/x86/platform/uv/uv_nmi.c: In function 'uv_nmi_dump_state_cpu': arch/x86/platform/uv/uv_nmi.c:422: error: lvalue required as unary '&' operand arch/x86/platform/uv/uv_nmi.c: In function 'uv_nmi_dump_state': arch/x86/platform/uv/uv_nmi.c:491: error: lvalue required as unary '&' operand arch/x86/platform/uv/uv_nmi.c: In function 'uv_handle_nmi': arch/x86/platform/uv/uv_nmi.c:618: error: lvalue required as unary '&' operand arch/x86/platform/uv/uv_nmi.c:642: error: lvalue required as unary '&' operand arch/x86/platform/uv/uv_nmi.c: In function 'uv_handle_nmi_ping': arch/x86/platform/uv/uv_nmi.c:669: error: lvalue required as increment operand arch/x86/platform/uv/uv_nmi.c:670: error: lvalue required as unary '&' operand arch/x86/platform/uv/uv_nmi.c:675: error: lvalue required as increment operand arch/x86/platform/uv/uv_nmi.c:678: error: lvalue required as unary '&' operand -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 31/48] uv: Replace __get_cpu_var
On Tue, 4 Mar 2014, Andrew Morton wrote: > > > > ... > > > > --- linux.orig/arch/x86/include/asm/uv/uv_hub.h 2014-02-03 > > 14:16:53.987889372 -0600 > > +++ linux/arch/x86/include/asm/uv/uv_hub.h 2014-02-03 14:16:53.987889372 > > -0600 > > @@ -618,7 +618,7 @@ > > }; > > > > DECLARE_PER_CPU(struct uv_cpu_nmi_s, __uv_cpu_nmi); > > -#define uv_cpu_nmi (__get_cpu_var(__uv_cpu_nmi)) > > +#define uv_cpu_nmi __this_cpu_read(_uv_cpu_nmi) > > arch/x86/platform/uv/uv_nmi.c: In function 'uv_check_nmi': > arch/x86/platform/uv/uv_nmi.c:218: error: '_uv_cpu_nmi' undeclared (first use > in this function) > arch/x86/platform/uv/uv_nmi.c:218: error: (Each undeclared identifier is > reported only once > arch/x86/platform/uv/uv_nmi.c:218: error: for each function it appears in.) > > > This? Nope. I missed an underscore. > --- a/arch/x86/include/asm/uv/uv_hub.h~uv-replace-__get_cpu_var-fix > +++ a/arch/x86/include/asm/uv/uv_hub.h > @@ -618,7 +618,7 @@ struct uv_cpu_nmi_s { > }; > > DECLARE_PER_CPU(struct uv_cpu_nmi_s, __uv_cpu_nmi); > -#define uv_cpu_nmi __this_cpu_read(_uv_cpu_nmi) > +#define uv_cpu_nmi (*this_cpu_ptr(&__uv_cpu_nmi)) __this_cpu_read(__uv_cpu_nmi) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 31/48] uv: Replace __get_cpu_var
On 03/04/2014 03:02 PM, Andrew Morton wrote: > On Fri, 14 Feb 2014 14:19:12 -0600 Christoph Lameter wrote: > >> Use __this_cpu_read instead. >> >> >> --- linux.orig/arch/x86/include/asm/uv/uv_hub.h 2014-02-03 >> 14:16:53.987889372 -0600 >> +++ linux/arch/x86/include/asm/uv/uv_hub.h 2014-02-03 14:16:53.987889372 >> -0600 >> @@ -618,7 +618,7 @@ >> }; >> >> DECLARE_PER_CPU(struct uv_cpu_nmi_s, __uv_cpu_nmi); >> -#define uv_cpu_nmi (__get_cpu_var(__uv_cpu_nmi)) >> +#define uv_cpu_nmi __this_cpu_read(_uv_cpu_nmi) > > arch/x86/platform/uv/uv_nmi.c: In function 'uv_check_nmi': > arch/x86/platform/uv/uv_nmi.c:218: error: '_uv_cpu_nmi' undeclared (first use > in this function) > arch/x86/platform/uv/uv_nmi.c:218: error: (Each undeclared identifier is > reported only once > arch/x86/platform/uv/uv_nmi.c:218: error: for each function it appears in.) > > > This? > More likely just add the missing second underscore. -hpa -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 31/48] uv: Replace __get_cpu_var
On Tue, 4 Mar 2014 18:42:10 -0500 Steven Rostedt wrote: > > --- a/arch/x86/include/asm/uv/uv_hub.h~uv-replace-__get_cpu_var-fix > > +++ a/arch/x86/include/asm/uv/uv_hub.h > > @@ -618,7 +618,7 @@ struct uv_cpu_nmi_s { > > }; > > > > DECLARE_PER_CPU(struct uv_cpu_nmi_s, __uv_cpu_nmi); > > -#define uv_cpu_nmi __this_cpu_read(_uv_cpu_nmi) > > +#define uv_cpu_nmi (*this_cpu_ptr(&__uv_cpu_nmi)) > > Looks like an extra "_" was added. yes, there were two mistakes in that line. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 31/48] uv: Replace __get_cpu_var
On Tue, 4 Mar 2014 15:02:17 -0800 Andrew Morton wrote: > On Fri, 14 Feb 2014 14:19:12 -0600 Christoph Lameter wrote: > > > Use __this_cpu_read instead. > > > > ... > > > > --- linux.orig/arch/x86/include/asm/uv/uv_hub.h 2014-02-03 > > 14:16:53.987889372 -0600 > > +++ linux/arch/x86/include/asm/uv/uv_hub.h 2014-02-03 14:16:53.987889372 > > -0600 > > @@ -618,7 +618,7 @@ > > }; > > > > DECLARE_PER_CPU(struct uv_cpu_nmi_s, __uv_cpu_nmi); > > -#define uv_cpu_nmi (__get_cpu_var(__uv_cpu_nmi)) > > +#define uv_cpu_nmi __this_cpu_read(_uv_cpu_nmi) > > arch/x86/platform/uv/uv_nmi.c: In function 'uv_check_nmi': > arch/x86/platform/uv/uv_nmi.c:218: error: '_uv_cpu_nmi' undeclared (first use > in this function) > arch/x86/platform/uv/uv_nmi.c:218: error: (Each undeclared identifier is > reported only once > arch/x86/platform/uv/uv_nmi.c:218: error: for each function it appears in.) > > > This? > > --- a/arch/x86/include/asm/uv/uv_hub.h~uv-replace-__get_cpu_var-fix > +++ a/arch/x86/include/asm/uv/uv_hub.h > @@ -618,7 +618,7 @@ struct uv_cpu_nmi_s { > }; > > DECLARE_PER_CPU(struct uv_cpu_nmi_s, __uv_cpu_nmi); > -#define uv_cpu_nmi __this_cpu_read(_uv_cpu_nmi) > +#define uv_cpu_nmi (*this_cpu_ptr(&__uv_cpu_nmi)) Looks like an extra "_" was added. -- Steve > #define uv_hub_nmi (uv_cpu_nmi.hub) > #define uv_cpu_nmi_per(cpu) (per_cpu(__uv_cpu_nmi, cpu)) > #define uv_hub_nmi_per(cpu) (uv_cpu_nmi_per(cpu).hub) > _ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 31/48] uv: Replace __get_cpu_var
On Fri, 14 Feb 2014 14:19:12 -0600 Christoph Lameter wrote: > Use __this_cpu_read instead. > > ... > > --- linux.orig/arch/x86/include/asm/uv/uv_hub.h 2014-02-03 > 14:16:53.987889372 -0600 > +++ linux/arch/x86/include/asm/uv/uv_hub.h2014-02-03 14:16:53.987889372 > -0600 > @@ -618,7 +618,7 @@ > }; > > DECLARE_PER_CPU(struct uv_cpu_nmi_s, __uv_cpu_nmi); > -#define uv_cpu_nmi (__get_cpu_var(__uv_cpu_nmi)) > +#define uv_cpu_nmi __this_cpu_read(_uv_cpu_nmi) arch/x86/platform/uv/uv_nmi.c: In function 'uv_check_nmi': arch/x86/platform/uv/uv_nmi.c:218: error: '_uv_cpu_nmi' undeclared (first use in this function) arch/x86/platform/uv/uv_nmi.c:218: error: (Each undeclared identifier is reported only once arch/x86/platform/uv/uv_nmi.c:218: error: for each function it appears in.) This? --- a/arch/x86/include/asm/uv/uv_hub.h~uv-replace-__get_cpu_var-fix +++ a/arch/x86/include/asm/uv/uv_hub.h @@ -618,7 +618,7 @@ struct uv_cpu_nmi_s { }; DECLARE_PER_CPU(struct uv_cpu_nmi_s, __uv_cpu_nmi); -#define uv_cpu_nmi __this_cpu_read(_uv_cpu_nmi) +#define uv_cpu_nmi (*this_cpu_ptr(&__uv_cpu_nmi)) #define uv_hub_nmi (uv_cpu_nmi.hub) #define uv_cpu_nmi_per(cpu)(per_cpu(__uv_cpu_nmi, cpu)) #define uv_hub_nmi_per(cpu)(uv_cpu_nmi_per(cpu).hub) _ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 31/48] uv: Replace __get_cpu_var
On Fri, 14 Feb 2014 14:19:12 -0600 Christoph Lameter c...@linux.com wrote: Use __this_cpu_read instead. ... --- linux.orig/arch/x86/include/asm/uv/uv_hub.h 2014-02-03 14:16:53.987889372 -0600 +++ linux/arch/x86/include/asm/uv/uv_hub.h2014-02-03 14:16:53.987889372 -0600 @@ -618,7 +618,7 @@ }; DECLARE_PER_CPU(struct uv_cpu_nmi_s, __uv_cpu_nmi); -#define uv_cpu_nmi (__get_cpu_var(__uv_cpu_nmi)) +#define uv_cpu_nmi __this_cpu_read(_uv_cpu_nmi) arch/x86/platform/uv/uv_nmi.c: In function 'uv_check_nmi': arch/x86/platform/uv/uv_nmi.c:218: error: '_uv_cpu_nmi' undeclared (first use in this function) arch/x86/platform/uv/uv_nmi.c:218: error: (Each undeclared identifier is reported only once arch/x86/platform/uv/uv_nmi.c:218: error: for each function it appears in.) This? --- a/arch/x86/include/asm/uv/uv_hub.h~uv-replace-__get_cpu_var-fix +++ a/arch/x86/include/asm/uv/uv_hub.h @@ -618,7 +618,7 @@ struct uv_cpu_nmi_s { }; DECLARE_PER_CPU(struct uv_cpu_nmi_s, __uv_cpu_nmi); -#define uv_cpu_nmi __this_cpu_read(_uv_cpu_nmi) +#define uv_cpu_nmi (*this_cpu_ptr(__uv_cpu_nmi)) #define uv_hub_nmi (uv_cpu_nmi.hub) #define uv_cpu_nmi_per(cpu)(per_cpu(__uv_cpu_nmi, cpu)) #define uv_hub_nmi_per(cpu)(uv_cpu_nmi_per(cpu).hub) _ -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 31/48] uv: Replace __get_cpu_var
On Tue, 4 Mar 2014 15:02:17 -0800 Andrew Morton a...@linux-foundation.org wrote: On Fri, 14 Feb 2014 14:19:12 -0600 Christoph Lameter c...@linux.com wrote: Use __this_cpu_read instead. ... --- linux.orig/arch/x86/include/asm/uv/uv_hub.h 2014-02-03 14:16:53.987889372 -0600 +++ linux/arch/x86/include/asm/uv/uv_hub.h 2014-02-03 14:16:53.987889372 -0600 @@ -618,7 +618,7 @@ }; DECLARE_PER_CPU(struct uv_cpu_nmi_s, __uv_cpu_nmi); -#define uv_cpu_nmi (__get_cpu_var(__uv_cpu_nmi)) +#define uv_cpu_nmi __this_cpu_read(_uv_cpu_nmi) arch/x86/platform/uv/uv_nmi.c: In function 'uv_check_nmi': arch/x86/platform/uv/uv_nmi.c:218: error: '_uv_cpu_nmi' undeclared (first use in this function) arch/x86/platform/uv/uv_nmi.c:218: error: (Each undeclared identifier is reported only once arch/x86/platform/uv/uv_nmi.c:218: error: for each function it appears in.) This? --- a/arch/x86/include/asm/uv/uv_hub.h~uv-replace-__get_cpu_var-fix +++ a/arch/x86/include/asm/uv/uv_hub.h @@ -618,7 +618,7 @@ struct uv_cpu_nmi_s { }; DECLARE_PER_CPU(struct uv_cpu_nmi_s, __uv_cpu_nmi); -#define uv_cpu_nmi __this_cpu_read(_uv_cpu_nmi) +#define uv_cpu_nmi (*this_cpu_ptr(__uv_cpu_nmi)) Looks like an extra _ was added. -- Steve #define uv_hub_nmi (uv_cpu_nmi.hub) #define uv_cpu_nmi_per(cpu) (per_cpu(__uv_cpu_nmi, cpu)) #define uv_hub_nmi_per(cpu) (uv_cpu_nmi_per(cpu).hub) _ -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 31/48] uv: Replace __get_cpu_var
On Tue, 4 Mar 2014 18:42:10 -0500 Steven Rostedt rost...@goodmis.org wrote: --- a/arch/x86/include/asm/uv/uv_hub.h~uv-replace-__get_cpu_var-fix +++ a/arch/x86/include/asm/uv/uv_hub.h @@ -618,7 +618,7 @@ struct uv_cpu_nmi_s { }; DECLARE_PER_CPU(struct uv_cpu_nmi_s, __uv_cpu_nmi); -#define uv_cpu_nmi __this_cpu_read(_uv_cpu_nmi) +#define uv_cpu_nmi (*this_cpu_ptr(__uv_cpu_nmi)) Looks like an extra _ was added. yes, there were two mistakes in that line. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 31/48] uv: Replace __get_cpu_var
On 03/04/2014 03:02 PM, Andrew Morton wrote: On Fri, 14 Feb 2014 14:19:12 -0600 Christoph Lameter c...@linux.com wrote: Use __this_cpu_read instead. --- linux.orig/arch/x86/include/asm/uv/uv_hub.h 2014-02-03 14:16:53.987889372 -0600 +++ linux/arch/x86/include/asm/uv/uv_hub.h 2014-02-03 14:16:53.987889372 -0600 @@ -618,7 +618,7 @@ }; DECLARE_PER_CPU(struct uv_cpu_nmi_s, __uv_cpu_nmi); -#define uv_cpu_nmi (__get_cpu_var(__uv_cpu_nmi)) +#define uv_cpu_nmi __this_cpu_read(_uv_cpu_nmi) arch/x86/platform/uv/uv_nmi.c: In function 'uv_check_nmi': arch/x86/platform/uv/uv_nmi.c:218: error: '_uv_cpu_nmi' undeclared (first use in this function) arch/x86/platform/uv/uv_nmi.c:218: error: (Each undeclared identifier is reported only once arch/x86/platform/uv/uv_nmi.c:218: error: for each function it appears in.) This? More likely just add the missing second underscore. -hpa -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 31/48] uv: Replace __get_cpu_var
On Tue, 4 Mar 2014, Andrew Morton wrote: ... --- linux.orig/arch/x86/include/asm/uv/uv_hub.h 2014-02-03 14:16:53.987889372 -0600 +++ linux/arch/x86/include/asm/uv/uv_hub.h 2014-02-03 14:16:53.987889372 -0600 @@ -618,7 +618,7 @@ }; DECLARE_PER_CPU(struct uv_cpu_nmi_s, __uv_cpu_nmi); -#define uv_cpu_nmi (__get_cpu_var(__uv_cpu_nmi)) +#define uv_cpu_nmi __this_cpu_read(_uv_cpu_nmi) arch/x86/platform/uv/uv_nmi.c: In function 'uv_check_nmi': arch/x86/platform/uv/uv_nmi.c:218: error: '_uv_cpu_nmi' undeclared (first use in this function) arch/x86/platform/uv/uv_nmi.c:218: error: (Each undeclared identifier is reported only once arch/x86/platform/uv/uv_nmi.c:218: error: for each function it appears in.) This? Nope. I missed an underscore. --- a/arch/x86/include/asm/uv/uv_hub.h~uv-replace-__get_cpu_var-fix +++ a/arch/x86/include/asm/uv/uv_hub.h @@ -618,7 +618,7 @@ struct uv_cpu_nmi_s { }; DECLARE_PER_CPU(struct uv_cpu_nmi_s, __uv_cpu_nmi); -#define uv_cpu_nmi __this_cpu_read(_uv_cpu_nmi) +#define uv_cpu_nmi (*this_cpu_ptr(__uv_cpu_nmi)) __this_cpu_read(__uv_cpu_nmi) -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 31/48] uv: Replace __get_cpu_var
On Tue, 4 Mar 2014 21:31:12 -0600 (CST) Christoph Lameter c...@linux.com wrote: On Tue, 4 Mar 2014, Andrew Morton wrote: ... --- linux.orig/arch/x86/include/asm/uv/uv_hub.h 2014-02-03 14:16:53.987889372 -0600 +++ linux/arch/x86/include/asm/uv/uv_hub.h2014-02-03 14:16:53.987889372 -0600 @@ -618,7 +618,7 @@ }; DECLARE_PER_CPU(struct uv_cpu_nmi_s, __uv_cpu_nmi); -#define uv_cpu_nmi (__get_cpu_var(__uv_cpu_nmi)) +#define uv_cpu_nmi __this_cpu_read(_uv_cpu_nmi) arch/x86/platform/uv/uv_nmi.c: In function 'uv_check_nmi': arch/x86/platform/uv/uv_nmi.c:218: error: '_uv_cpu_nmi' undeclared (first use in this function) arch/x86/platform/uv/uv_nmi.c:218: error: (Each undeclared identifier is reported only once arch/x86/platform/uv/uv_nmi.c:218: error: for each function it appears in.) This? Nope. I missed an underscore. --- a/arch/x86/include/asm/uv/uv_hub.h~uv-replace-__get_cpu_var-fix +++ a/arch/x86/include/asm/uv/uv_hub.h @@ -618,7 +618,7 @@ struct uv_cpu_nmi_s { }; DECLARE_PER_CPU(struct uv_cpu_nmi_s, __uv_cpu_nmi); -#define uv_cpu_nmi __this_cpu_read(_uv_cpu_nmi) +#define uv_cpu_nmi (*this_cpu_ptr(__uv_cpu_nmi)) __this_cpu_read(__uv_cpu_nmi) --- a/arch/x86/include/asm/uv/uv_hub.h~uv-replace-__get_cpu_var-fix +++ a/arch/x86/include/asm/uv/uv_hub.h @@ -618,7 +618,7 @@ struct uv_cpu_nmi_s { }; DECLARE_PER_CPU(struct uv_cpu_nmi_s, __uv_cpu_nmi); -#define uv_cpu_nmi __this_cpu_read(_uv_cpu_nmi) +#define uv_cpu_nmi __this_cpu_read(__uv_cpu_nmi) #define uv_hub_nmi (uv_cpu_nmi.hub) #define uv_cpu_nmi_per(cpu)(per_cpu(__uv_cpu_nmi, cpu)) #define uv_hub_nmi_per(cpu)(uv_cpu_nmi_per(cpu).hub) arch/x86/platform/uv/uv_nmi.c: In function 'uv_check_nmi': arch/x86/platform/uv/uv_nmi.c:218: error: lvalue required as increment operand arch/x86/platform/uv/uv_nmi.c: In function 'uv_nmi_wait': arch/x86/platform/uv/uv_nmi.c:362: error: lvalue required as unary '' operand arch/x86/platform/uv/uv_nmi.c: In function 'uv_nmi_dump_state_cpu': arch/x86/platform/uv/uv_nmi.c:422: error: lvalue required as unary '' operand arch/x86/platform/uv/uv_nmi.c: In function 'uv_nmi_dump_state': arch/x86/platform/uv/uv_nmi.c:491: error: lvalue required as unary '' operand arch/x86/platform/uv/uv_nmi.c: In function 'uv_handle_nmi': arch/x86/platform/uv/uv_nmi.c:618: error: lvalue required as unary '' operand arch/x86/platform/uv/uv_nmi.c:642: error: lvalue required as unary '' operand arch/x86/platform/uv/uv_nmi.c: In function 'uv_handle_nmi_ping': arch/x86/platform/uv/uv_nmi.c:669: error: lvalue required as increment operand arch/x86/platform/uv/uv_nmi.c:670: error: lvalue required as unary '' operand arch/x86/platform/uv/uv_nmi.c:675: error: lvalue required as increment operand arch/x86/platform/uv/uv_nmi.c:678: error: lvalue required as unary '' operand -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/