* Re: [PATCH v4 00/11] ASoC: fsl_ssi: Clean up - coding style level
From: Caleb Crome @ 2017-12-18 22:19 UTC (permalink / raw)
To: Timur Tabi
Cc: Nicolin Chen, Mark Brown, linux-kernel, linuxppc-dev, alsa-devel,
Liam Girdwood, Fabio Estevam, mail, Arnaud Mouiche, lukma,
Sascha Hauer
In-Reply-To: <4e69ef31-3aa6-66ea-331b-8a7472a66a15@tabi.org>
On Sun, Dec 17, 2017 at 7:13 PM, Timur Tabi <timur@tabi.org> wrote:
>
> On 12/17/17 8:51 PM, Nicolin Chen wrote:
>>
>> Nicolin Chen (11):
>> ASoC: fsl_ssi: Rename fsl_ssi_private to fsl_ssi
>> ASoC: fsl_ssi: Cache pdev->dev pointer
>> ASoC: fsl_ssi: Refine all comments
>> ASoC: fsl_ssi: Rename registers and fields macros
>> ASoC: fsl_ssi: Refine indentations and wrappings
>> ASoC: fsl_ssi: Refine printk outputs
>> ASoC: fsl_ssi: Rename cpu_dai parameter to dai
>> ASoC: fsl_ssi: Rename scr_val to scr
>> ASoC: fsl_ssi: Replace fsl_ssi_rxtx_reg_val with fsl_ssi_regvals
>> ASoC: fsl_ssi: Rename i2smode to i2s_net
>> ASoC: fsl_ssi: Define ternary macros to simplify code
>
>
> Acked-by: Timur Tabi <timur@tabi.org>
I'm re-setting up my loopback test to try to verify these most recent changes.
I'm starting with the for-next branch at
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git (which
is a 4.15 numbered kernel).
The basic setup is using a wandboard with a TX pin tied directly to an
RX pin do test if what is sent is what is received, using Arnaud's
tester here: https://github.com/amouiche/atest
Unfortunately, it doesn't pass the loopback test, even before these
patches. I'm not actively developing on this platform at the moment,
and my brain has been out of kernel development for quite a while.
I'm getting channel slips again.
output from atest:
warn: 11a0 11a1 1160 11a3 11a4 11a5 11a6 11a7
warn: Valid frame after 1 invalid frames
warn: 11c0 11c1 11c2 11c3 11c4 11c5 11c6 11c7
warn: first invalid frame while expecting frame 0x00a0
warn: 13e7 1400 1401 1402 1403 1404 1405 1404
warn: 1407 1420 1421 1422 1423 1424 1425 1426
warn: 1427 1440 1441 1442 1443 1444 1445 1484
warn: 1447 1460 1461 1462 1463 1464 1465 1466
Those last 4 lines are the channel slips -- the least significant
nibble should be the channel number: i.e. should go 0, 1, 2, 3, 4, 5,
6, 7.
Ugh, so it's basically quite broken again -- before these patches.
I guess I need to go backwards in time and see what rev re-broke it.
I don't really have time to dig too deep on this again.
I'd be happy to provide the hardware to anybody that can diagnose and
debug this more quickly than I can. I'm very inefficient at kernel
drivers I think. My day job is acoustical and electrical
engineering.
Here's what the hardware looks like for anybody that's interested.
Just a single wire loopback on the wandboard header.
https://ibb.co/d2rfzm
-Caleb
^ permalink raw reply
* Re: [PATCH v9 29/51] mm/mprotect, powerpc/mm/pkeys, x86/mm/pkeys: Add sysfs interface
From: Ram Pai @ 2017-12-18 22:18 UTC (permalink / raw)
To: Dave Hansen
Cc: mpe, mingo, akpm, corbet, arnd, linuxppc-dev, linux-mm, x86,
linux-arch, linux-doc, linux-kselftest, linux-kernel, benh,
paulus, khandual, aneesh.kumar, bsingharora, hbabu, mhocko,
bauerman, ebiederm
In-Reply-To: <bbc5593e-31ec-183a-01a5-1a253dc0c275@intel.com>
On Mon, Dec 18, 2017 at 10:54:26AM -0800, Dave Hansen wrote:
> On 11/06/2017 12:57 AM, Ram Pai wrote:
> > Expose useful information for programs using memory protection keys.
> > Provide implementation for powerpc and x86.
> >
> > On a powerpc system with pkeys support, here is what is shown:
> >
> > $ head /sys/kernel/mm/protection_keys/*
> > ==> /sys/kernel/mm/protection_keys/disable_access_supported <==
> > true
>
> This is cute, but I don't think it should be part of the ABI. Put it in
thanks :)
> debugfs if you want it for cute tests. The stuff that this tells you
> can and should come from pkey_alloc() for the ABI.
Applications can make system calls with different parameters and on
failure determine indirectly that such a feature may not be available in
the kernel/hardware. But from an application point of view, I think, it
is a very clumsy/difficult way to determine that.
For example, an application can keep making pkey_alloc() calls and count
till the call fails, to determine the number of keys supported by the
system. And then the application has to release those keys too. Too
much side-effect just to determine a simple thing. Do we want the
application to endure this pain?
I think we should aim to provide sufficient API/ABI for the application
to consume the feature efficiently, and not any more.
I do not claim that the ABI exposed by this patch is sufficiently
optimal. But I do believe it is tending towards it.
currently the following ABI is exposed.
a) total number of keys available in the system. This information may
not be useful and can possibly be dropped.
b) minimum number of keys available to the application.
if libraries consumes a few, they could provide a library
interface to the application informing the number available to
the application. The library interface can leverage (b) to
provide the information.
c) types of disable-rights supported by keys.
Helps the application to determine the types of disable-features
available. This is helpful, otherwise the app has to
make pkey_alloc() call with the corresponding parameter set
and see if it suceeds or fails. Painful from an application
point of view, in my opinion.
>
> http://man7.org/linux/man-pages/man7/pkeys.7.html
>
> > Any application wanting to use protection keys needs to be able to
> > function without them. They might be unavailable because the
> > hardware that the application runs on does not support them, the
> > kernel code does not contain support, the kernel support has been
> > disabled, or because the keys have all been allocated, perhaps by a
> > library the application is using. It is recommended that
> > applications wanting to use protection keys should simply call
> > pkey_alloc(2) and test whether the call succeeds, instead of
> > attempting to detect support for the feature in any other way.
>
> Do you really not have standard way on ppc to say whether hardware
> features are supported by the kernel? For instance, how do you know if
> a given set of registers are known to and are being context-switched by
> the kernel?
I think on x86 you look for some hardware registers to determine which
hardware features are enabled by the kernel.
We do not have generic support for something like that on ppc.
The kernel looks at the device tree to determine what hardware features
are available. But does not have mechanism to tell the hardware to track
which of its features are currently enabled/used by the kernel; atleast
not for the memory-key feature.
RP
^ permalink raw reply
* Re: [trivial PATCH] treewide: Align function definition open/close braces
From: Alexandre Belloni @ 2017-12-18 22:15 UTC (permalink / raw)
To: Joe Perches
Cc: Jiri Kosina, Linus Torvalds, linux-kernel, linux-acpi, amd-gfx,
dri-devel, linux-media, MPT-FusionLinux.pdl, linux-scsi, netdev,
linux-wireless, acpi4asus-user, platform-driver-x86, linux-rtc,
linux-fsdevel, ocfs2-devel, linux-xfs, linux-audit, alsa-devel,
linuxppc-dev
In-Reply-To: <1513556924.31581.51.camel@perches.com>
On 17/12/2017 at 16:28:44 -0800, Joe Perches wrote:
> Some functions definitions have either the initial open brace and/or
> the closing brace outside of column 1.
>
> Move those braces to column 1.
>
> This allows various function analyzers like gnu complexity to work
> properly for these modified functions.
>
> Miscellanea:
>
> o Remove extra trailing ; and blank line from xfs_agf_verify
>
> Signed-off-by: Joe Perches <joe@perches.com>
For RTC:
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
--
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply
* Re: [trivial PATCH] treewide: Align function definition open/close braces
From: Dave Chinner @ 2017-12-18 22:10 UTC (permalink / raw)
To: Joe Perches
Cc: Jiri Kosina, Linus Torvalds, linux-kernel, linux-acpi, amd-gfx,
dri-devel, linux-media, MPT-FusionLinux.pdl, linux-scsi, netdev,
linux-wireless, acpi4asus-user, platform-driver-x86, linux-rtc,
linux-fsdevel, ocfs2-devel, linux-xfs, linux-audit, alsa-devel,
linuxppc-dev
In-Reply-To: <1513556924.31581.51.camel@perches.com>
On Sun, Dec 17, 2017 at 04:28:44PM -0800, Joe Perches wrote:
> Some functions definitions have either the initial open brace and/or
> the closing brace outside of column 1.
>
> Move those braces to column 1.
>
> This allows various function analyzers like gnu complexity to work
> properly for these modified functions.
>
> Miscellanea:
>
> o Remove extra trailing ; and blank line from xfs_agf_verify
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
....
XFS bits look fine.
Acked-by: Dave Chinner <dchinner@redhat.com>
--
Dave Chinner
david@fromorbit.com
^ permalink raw reply
* Re: [trivial PATCH] treewide: Align function definition open/close braces
From: Alex Deucher @ 2017-12-18 22:07 UTC (permalink / raw)
To: Joe Perches
Cc: Jiri Kosina, Linus Torvalds, linux-rtc,
alsa-devel@alsa-project.org, linuxppc-dev, Linux SCSI List,
Network Development, acpi4asus-user, Linux Wireless List, LKML,
Maling list - DRI developers, platform-driver-x86, linux-xfs,
Linux ACPI, linux-audit, amd-gfx list, linux-fsdevel,
MPT-FusionLinux.pdl, ocfs2-devel, linux-media
In-Reply-To: <1513556924.31581.51.camel@perches.com>
On Sun, Dec 17, 2017 at 7:28 PM, Joe Perches <joe@perches.com> wrote:
> Some functions definitions have either the initial open brace and/or
> the closing brace outside of column 1.
>
> Move those braces to column 1.
>
> This allows various function analyzers like gnu complexity to work
> properly for these modified functions.
>
> Miscellanea:
>
> o Remove extra trailing ; and blank line from xfs_agf_verify
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> git diff -w shows no difference other than the above 'Miscellanea'
>
> (this is against -next, but it applies against Linus' tree
> with a couple offsets)
>
> arch/x86/include/asm/atomic64_32.h | 2 +-
> drivers/acpi/custom_method.c | 2 +-
> drivers/acpi/fan.c | 2 +-
> drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +-
For amdgpu:
Acked-by: Alex Deucher <alexander.deucher@amd.com>
> drivers/media/i2c/msp3400-kthreads.c | 2 +-
> drivers/message/fusion/mptsas.c | 2 +-
> drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c | 2 +-
> drivers/net/wireless/ath/ath9k/xmit.c | 2 +-
> drivers/platform/x86/eeepc-laptop.c | 2 +-
> drivers/rtc/rtc-ab-b5ze-s3.c | 2 +-
> drivers/scsi/dpt_i2o.c | 2 +-
> drivers/scsi/sym53c8xx_2/sym_glue.c | 2 +-
> fs/locks.c | 2 +-
> fs/ocfs2/stack_user.c | 2 +-
> fs/xfs/libxfs/xfs_alloc.c | 5 ++---
> fs/xfs/xfs_export.c | 2 +-
> kernel/audit.c | 6 +++---
> kernel/trace/trace_printk.c | 4 ++--
> lib/raid6/sse2.c | 14 +++++++-------
> sound/soc/fsl/fsl_dma.c | 2 +-
> 20 files changed, 30 insertions(+), 31 deletions(-)
>
> diff --git a/arch/x86/include/asm/atomic64_32.h b/arch/x86/include/asm/atomic64_32.h
> index 97c46b8169b7..d4d4883080fa 100644
> --- a/arch/x86/include/asm/atomic64_32.h
> +++ b/arch/x86/include/asm/atomic64_32.h
> @@ -122,7 +122,7 @@ static inline long long atomic64_read(const atomic64_t *v)
> long long r;
> alternative_atomic64(read, "=&A" (r), "c" (v) : "memory");
> return r;
> - }
> +}
>
> /**
> * atomic64_add_return - add and return
> diff --git a/drivers/acpi/custom_method.c b/drivers/acpi/custom_method.c
> index c68e72414a67..e967c1173ba3 100644
> --- a/drivers/acpi/custom_method.c
> +++ b/drivers/acpi/custom_method.c
> @@ -94,7 +94,7 @@ static void __exit acpi_custom_method_exit(void)
> {
> if (cm_dentry)
> debugfs_remove(cm_dentry);
> - }
> +}
>
> module_init(acpi_custom_method_init);
> module_exit(acpi_custom_method_exit);
> diff --git a/drivers/acpi/fan.c b/drivers/acpi/fan.c
> index 6cf4988206f2..3563103590c6 100644
> --- a/drivers/acpi/fan.c
> +++ b/drivers/acpi/fan.c
> @@ -219,7 +219,7 @@ fan_set_cur_state(struct thermal_cooling_device *cdev, unsigned long state)
> return fan_set_state_acpi4(device, state);
> else
> return fan_set_state(device, state);
> - }
> +}
>
> static const struct thermal_cooling_device_ops fan_cooling_ops = {
> .get_max_state = fan_get_max_state,
> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
> index d1488d5ee028..1e0d1e7c5324 100644
> --- a/drivers/gpu/drm/amd/display/dc/core/dc.c
> +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
> @@ -461,7 +461,7 @@ static void disable_dangling_plane(struct dc *dc, struct dc_state *context)
> ******************************************************************************/
>
> struct dc *dc_create(const struct dc_init_data *init_params)
> - {
> +{
> struct dc *dc = kzalloc(sizeof(*dc), GFP_KERNEL);
> unsigned int full_pipe_count;
>
> diff --git a/drivers/media/i2c/msp3400-kthreads.c b/drivers/media/i2c/msp3400-kthreads.c
> index 4dd01e9f553b..dc6cb8d475b3 100644
> --- a/drivers/media/i2c/msp3400-kthreads.c
> +++ b/drivers/media/i2c/msp3400-kthreads.c
> @@ -885,7 +885,7 @@ static int msp34xxg_modus(struct i2c_client *client)
> }
>
> static void msp34xxg_set_source(struct i2c_client *client, u16 reg, int in)
> - {
> +{
> struct msp_state *state = to_state(i2c_get_clientdata(client));
> int source, matrix;
>
> diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c
> index 345f6035599e..69a62d23514b 100644
> --- a/drivers/message/fusion/mptsas.c
> +++ b/drivers/message/fusion/mptsas.c
> @@ -2968,7 +2968,7 @@ mptsas_exp_repmanufacture_info(MPT_ADAPTER *ioc,
> mutex_unlock(&ioc->sas_mgmt.mutex);
> out:
> return ret;
> - }
> +}
>
> static void
> mptsas_parse_device_info(struct sas_identify *identify,
> diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c
> index 3dd973475125..0ea141ece19e 100644
> --- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c
> +++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c
> @@ -603,7 +603,7 @@ static struct uni_table_desc *nx_get_table_desc(const u8 *unirom, int section)
>
> static int
> netxen_nic_validate_header(struct netxen_adapter *adapter)
> - {
> +{
> const u8 *unirom = adapter->fw->data;
> struct uni_table_desc *directory = (struct uni_table_desc *) &unirom[0];
> u32 fw_file_size = adapter->fw->size;
> diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
> index bd438062a6db..baedc7186b10 100644
> --- a/drivers/net/wireless/ath/ath9k/xmit.c
> +++ b/drivers/net/wireless/ath/ath9k/xmit.c
> @@ -196,7 +196,7 @@ ath_tid_pull(struct ath_atx_tid *tid)
> }
>
> return skb;
> - }
> +}
>
> static struct sk_buff *ath_tid_dequeue(struct ath_atx_tid *tid)
> {
> diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c
> index 5a681962899c..4c38904a8a32 100644
> --- a/drivers/platform/x86/eeepc-laptop.c
> +++ b/drivers/platform/x86/eeepc-laptop.c
> @@ -492,7 +492,7 @@ static void eeepc_platform_exit(struct eeepc_laptop *eeepc)
> * potentially bad time, such as a timer interrupt.
> */
> static void tpd_led_update(struct work_struct *work)
> - {
> +{
> struct eeepc_laptop *eeepc;
>
> eeepc = container_of(work, struct eeepc_laptop, tpd_led_work);
> diff --git a/drivers/rtc/rtc-ab-b5ze-s3.c b/drivers/rtc/rtc-ab-b5ze-s3.c
> index a319bf1e49de..ef5c16dfabfa 100644
> --- a/drivers/rtc/rtc-ab-b5ze-s3.c
> +++ b/drivers/rtc/rtc-ab-b5ze-s3.c
> @@ -648,7 +648,7 @@ static int abb5zes3_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alarm)
> ret);
>
> return ret;
> - }
> +}
>
> /* Enable or disable battery low irq generation */
> static inline int _abb5zes3_rtc_battery_low_irq_enable(struct regmap *regmap,
> diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c
> index fd172b0890d3..a00d822e3142 100644
> --- a/drivers/scsi/dpt_i2o.c
> +++ b/drivers/scsi/dpt_i2o.c
> @@ -3524,7 +3524,7 @@ static int adpt_i2o_systab_send(adpt_hba* pHba)
> #endif
>
> return ret;
> - }
> +}
>
>
> /*============================================================================
> diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c
> index 791a2182de53..7320d5fe4cbc 100644
> --- a/drivers/scsi/sym53c8xx_2/sym_glue.c
> +++ b/drivers/scsi/sym53c8xx_2/sym_glue.c
> @@ -1393,7 +1393,7 @@ static struct Scsi_Host *sym_attach(struct scsi_host_template *tpnt, int unit,
> scsi_host_put(shost);
>
> return NULL;
> - }
> +}
>
>
> /*
> diff --git a/fs/locks.c b/fs/locks.c
> index 21b4dfa289ee..d2399d001afe 100644
> --- a/fs/locks.c
> +++ b/fs/locks.c
> @@ -559,7 +559,7 @@ static const struct lock_manager_operations lease_manager_ops = {
> * Initialize a lease, use the default lock manager operations
> */
> static int lease_init(struct file *filp, long type, struct file_lock *fl)
> - {
> +{
> if (assign_type(fl, type) != 0)
> return -EINVAL;
>
> diff --git a/fs/ocfs2/stack_user.c b/fs/ocfs2/stack_user.c
> index dae9eb7c441e..d2fb97b173da 100644
> --- a/fs/ocfs2/stack_user.c
> +++ b/fs/ocfs2/stack_user.c
> @@ -398,7 +398,7 @@ static int ocfs2_control_do_setnode_msg(struct file *file,
>
> static int ocfs2_control_do_setversion_msg(struct file *file,
> struct ocfs2_control_message_setv *msg)
> - {
> +{
> long major, minor;
> char *ptr = NULL;
> struct ocfs2_control_private *p = file->private_data;
> diff --git a/fs/xfs/libxfs/xfs_alloc.c b/fs/xfs/libxfs/xfs_alloc.c
> index 0da80019a917..217108f765d5 100644
> --- a/fs/xfs/libxfs/xfs_alloc.c
> +++ b/fs/xfs/libxfs/xfs_alloc.c
> @@ -2401,7 +2401,7 @@ static bool
> xfs_agf_verify(
> struct xfs_mount *mp,
> struct xfs_buf *bp)
> - {
> +{
> struct xfs_agf *agf = XFS_BUF_TO_AGF(bp);
>
> if (xfs_sb_version_hascrc(&mp->m_sb)) {
> @@ -2449,8 +2449,7 @@ xfs_agf_verify(
> be32_to_cpu(agf->agf_refcount_level) > XFS_BTREE_MAXLEVELS))
> return false;
>
> - return true;;
> -
> + return true;
> }
>
> static void
> diff --git a/fs/xfs/xfs_export.c b/fs/xfs/xfs_export.c
> index fe1bfee35898..7d5c355d78b5 100644
> --- a/fs/xfs/xfs_export.c
> +++ b/fs/xfs/xfs_export.c
> @@ -122,7 +122,7 @@ xfs_nfs_get_inode(
> struct super_block *sb,
> u64 ino,
> u32 generation)
> - {
> +{
> xfs_mount_t *mp = XFS_M(sb);
> xfs_inode_t *ip;
> int error;
> diff --git a/kernel/audit.c b/kernel/audit.c
> index 227db99b0f19..d97e8f0f73ca 100644
> --- a/kernel/audit.c
> +++ b/kernel/audit.c
> @@ -443,15 +443,15 @@ static int audit_set_failure(u32 state)
> * Drop any references inside the auditd connection tracking struct and free
> * the memory.
> */
> - static void auditd_conn_free(struct rcu_head *rcu)
> - {
> +static void auditd_conn_free(struct rcu_head *rcu)
> +{
> struct auditd_connection *ac;
>
> ac = container_of(rcu, struct auditd_connection, rcu);
> put_pid(ac->pid);
> put_net(ac->net);
> kfree(ac);
> - }
> +}
>
> /**
> * auditd_set - Set/Reset the auditd connection state
> diff --git a/kernel/trace/trace_printk.c b/kernel/trace/trace_printk.c
> index ad1d6164e946..50f44b7b2b32 100644
> --- a/kernel/trace/trace_printk.c
> +++ b/kernel/trace/trace_printk.c
> @@ -196,7 +196,7 @@ struct notifier_block module_trace_bprintk_format_nb = {
> };
>
> int __trace_bprintk(unsigned long ip, const char *fmt, ...)
> - {
> +{
> int ret;
> va_list ap;
>
> @@ -214,7 +214,7 @@ int __trace_bprintk(unsigned long ip, const char *fmt, ...)
> EXPORT_SYMBOL_GPL(__trace_bprintk);
>
> int __ftrace_vbprintk(unsigned long ip, const char *fmt, va_list ap)
> - {
> +{
> if (unlikely(!fmt))
> return 0;
>
> diff --git a/lib/raid6/sse2.c b/lib/raid6/sse2.c
> index 1d2276b007ee..8191e1d0d2fb 100644
> --- a/lib/raid6/sse2.c
> +++ b/lib/raid6/sse2.c
> @@ -91,7 +91,7 @@ static void raid6_sse21_gen_syndrome(int disks, size_t bytes, void **ptrs)
>
> static void raid6_sse21_xor_syndrome(int disks, int start, int stop,
> size_t bytes, void **ptrs)
> - {
> +{
> u8 **dptr = (u8 **)ptrs;
> u8 *p, *q;
> int d, z, z0;
> @@ -200,9 +200,9 @@ static void raid6_sse22_gen_syndrome(int disks, size_t bytes, void **ptrs)
> kernel_fpu_end();
> }
>
> - static void raid6_sse22_xor_syndrome(int disks, int start, int stop,
> +static void raid6_sse22_xor_syndrome(int disks, int start, int stop,
> size_t bytes, void **ptrs)
> - {
> +{
> u8 **dptr = (u8 **)ptrs;
> u8 *p, *q;
> int d, z, z0;
> @@ -265,7 +265,7 @@ static void raid6_sse22_gen_syndrome(int disks, size_t bytes, void **ptrs)
>
> asm volatile("sfence" : : : "memory");
> kernel_fpu_end();
> - }
> +}
>
> const struct raid6_calls raid6_sse2x2 = {
> raid6_sse22_gen_syndrome,
> @@ -366,9 +366,9 @@ static void raid6_sse24_gen_syndrome(int disks, size_t bytes, void **ptrs)
> kernel_fpu_end();
> }
>
> - static void raid6_sse24_xor_syndrome(int disks, int start, int stop,
> +static void raid6_sse24_xor_syndrome(int disks, int start, int stop,
> size_t bytes, void **ptrs)
> - {
> +{
> u8 **dptr = (u8 **)ptrs;
> u8 *p, *q;
> int d, z, z0;
> @@ -471,7 +471,7 @@ static void raid6_sse24_gen_syndrome(int disks, size_t bytes, void **ptrs)
> }
> asm volatile("sfence" : : : "memory");
> kernel_fpu_end();
> - }
> +}
>
>
> const struct raid6_calls raid6_sse2x4 = {
> diff --git a/sound/soc/fsl/fsl_dma.c b/sound/soc/fsl/fsl_dma.c
> index 0c11f434a374..ec619f51d336 100644
> --- a/sound/soc/fsl/fsl_dma.c
> +++ b/sound/soc/fsl/fsl_dma.c
> @@ -879,7 +879,7 @@ static const struct snd_pcm_ops fsl_dma_ops = {
> };
>
> static int fsl_soc_dma_probe(struct platform_device *pdev)
> - {
> +{
> struct dma_object *dma;
> struct device_node *np = pdev->dev.of_node;
> struct device_node *ssi_np;
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply
* Re: [trivial PATCH] treewide: Align function definition open/close braces
From: Paul Moore @ 2017-12-18 22:04 UTC (permalink / raw)
To: Joe Perches
Cc: Jiri Kosina, Linus Torvalds, linux-rtc, alsa-devel, linuxppc-dev,
linux-scsi, netdev, acpi4asus-user, linux-wireless, linux-kernel,
dri-devel, platform-driver-x86, linux-xfs, linux-acpi,
linux-audit, amd-gfx, linux-fsdevel, MPT-FusionLinux.pdl,
ocfs2-devel, linux-media
In-Reply-To: <1513556924.31581.51.camel@perches.com>
On Sun, Dec 17, 2017 at 7:28 PM, Joe Perches <joe@perches.com> wrote:
> Some functions definitions have either the initial open brace and/or
> the closing brace outside of column 1.
>
> Move those braces to column 1.
>
> This allows various function analyzers like gnu complexity to work
> properly for these modified functions.
>
> Miscellanea:
>
> o Remove extra trailing ; and blank line from xfs_agf_verify
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> git diff -w shows no difference other than the above 'Miscellanea'
>
> (this is against -next, but it applies against Linus' tree
> with a couple offsets)
>
> arch/x86/include/asm/atomic64_32.h | 2 +-
> drivers/acpi/custom_method.c | 2 +-
> drivers/acpi/fan.c | 2 +-
> drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +-
> drivers/media/i2c/msp3400-kthreads.c | 2 +-
> drivers/message/fusion/mptsas.c | 2 +-
> drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c | 2 +-
> drivers/net/wireless/ath/ath9k/xmit.c | 2 +-
> drivers/platform/x86/eeepc-laptop.c | 2 +-
> drivers/rtc/rtc-ab-b5ze-s3.c | 2 +-
> drivers/scsi/dpt_i2o.c | 2 +-
> drivers/scsi/sym53c8xx_2/sym_glue.c | 2 +-
> fs/locks.c | 2 +-
> fs/ocfs2/stack_user.c | 2 +-
> fs/xfs/libxfs/xfs_alloc.c | 5 ++---
> fs/xfs/xfs_export.c | 2 +-
> kernel/audit.c | 6 +++---
> kernel/trace/trace_printk.c | 4 ++--
> lib/raid6/sse2.c | 14 +++++++-------
> sound/soc/fsl/fsl_dma.c | 2 +-
> 20 files changed, 30 insertions(+), 31 deletions(-)
For the audit bits ...
Acked-by: Paul Moore <paul@paul-moore.com>
--
paul moore
www.paul-moore.com
^ permalink raw reply
* Re: ps3: Improve a size determination in five functions
From: Geoff Levand @ 2017-12-18 20:52 UTC (permalink / raw)
To: SF Markus Elfring, linuxppc-dev
Cc: Benjamin Herrenschmidt, Michael Ellerman, Paul Mackerras, LKML,
kernel-janitors
In-Reply-To: <37ac8110-057a-9f07-841c-03e49d48f317@users.sourceforge.net>
On 12/18/2017 12:45 PM, SF Markus Elfring wrote:
>> but you are also removing empty lines and changing the coding format.
>
> * Why do you not like such a change combination?
>
> * Do you really want to integrate further update steps in this case?
I want to keep the coding style consistent throughout the file.
-Geoff
^ permalink raw reply
* Re: ps3: Improve a size determination in five functions
From: SF Markus Elfring @ 2017-12-18 20:45 UTC (permalink / raw)
To: Geoff Levand, linuxppc-dev
Cc: Benjamin Herrenschmidt, Michael Ellerman, Paul Mackerras, LKML,
kernel-janitors
In-Reply-To: <128a40fe-0998-2d6c-ad56-e7b63fce7f12@infradead.org>
>> Replace the specification of data structures by variable references
>> as the parameter for the operator "sizeof" to make the corresponding size
>> determination a bit safer according to the Linux coding style convention.
>
> This would be OK,
Thanks.
> but you are also removing empty lines and changing the coding format.
* Why do you not like such a change combination?
* Do you really want to integrate further update steps in this case?
Regards,
Markus
^ permalink raw reply
* Re: [PATCH v1 7/7] pseries/setup: Add Initialization of VF Bars
From: Juan Alvarez @ 2017-12-18 19:29 UTC (permalink / raw)
To: Alexey Kardashevskiy, Bryant G. Ly, benh, paulus, mpe
Cc: seroyer, alex.williamson, helgaas, ruscur, linux-pci,
linuxppc-dev, bodong, eli, saeedm
In-Reply-To: <4ea33f2e-d98c-85ef-eedf-2e8ca49aa839@ozlabs.ru>
This is PF only path. Yes either we have a root returned otherwise
will fall back to iomem_resource.
On 12/18/17 1:21 AM, Alexey Kardashevskiy wrote:
> @dev here is a VF, right? I am not familiar with powervn much but from what
> I see - the devices are sitting on a root bus of their own PHB and they all
> either have a root returned from pci_find_parent_resource() or none of them
> has a root and will fall back to &iomem_resource, or both cases are possible?
^ permalink raw reply
* Re: [PATCH v1 4/7] powerpc/kernel Add EEH operations to notify resume
From: Juan Alvarez @ 2017-12-18 19:29 UTC (permalink / raw)
To: Alexey Kardashevskiy, Bryant G. Ly, benh, paulus, mpe
Cc: seroyer, alex.williamson, helgaas, ruscur, linux-pci,
linuxppc-dev, bodong, eli, saeedm
In-Reply-To: <b2d30341-1945-0331-fb36-d441efc89109@ozlabs.ru>
Yes, way less. So our current design only supports less than or equal to
256 VFs per PF. That is 256*2 bytes.
On 12/17/17 11:02 PM, Alexey Kardashevskiy wrote:
> It is kind of assumed that the number of VFs is always less than 2048 minus
> rtas call parameters (RTAS_DATA_BUF_SIZE==4096 now)?
^ permalink raw reply
* Re: [PATCH v1 3/7] platforms/pseries: Set eeh_pe of EEH_PE_VF type
From: Juan Alvarez @ 2017-12-18 19:29 UTC (permalink / raw)
To: Alexey Kardashevskiy, Bryant G. Ly, benh, paulus, mpe
Cc: seroyer, alex.williamson, helgaas, ruscur, linux-pci,
linuxppc-dev, bodong, eli, saeedm
In-Reply-To: <5a9a3c99-ae38-ac52-415c-fe3c2042acb2@ozlabs.ru>
Here we need to set the config_addr as PHYP (platform)
does not enable the PE until the PE is bound to a VM,
reason why we disable VF autoprobe.
On 12/17/17 10:34 PM, Alexey Kardashevskiy wrote:
> powernv does this from eeh_ops::probe, and so does pseries_eeh_probe(), do
> you still need this here?
^ permalink raw reply
* Re: [PATCH] On ppc64le we HAVE_RELIABLE_STACKTRACE
From: Josh Poimboeuf @ 2017-12-18 18:56 UTC (permalink / raw)
To: Nicholas Piggin
Cc: Torsten Duwe, linux-kernel, Jiri Kosina, live-patching,
linuxppc-dev
In-Reply-To: <20171218153334.618c0b66@roar.ozlabs.ibm.com>
On Mon, Dec 18, 2017 at 03:33:34PM +1000, Nicholas Piggin wrote:
> On Sun, 17 Dec 2017 20:58:54 -0600
> Josh Poimboeuf <jpoimboe@redhat.com> wrote:
>
> > On Fri, Dec 15, 2017 at 07:40:09PM +1000, Nicholas Piggin wrote:
> > > On Tue, 12 Dec 2017 08:05:01 -0600
> > > Josh Poimboeuf <jpoimboe@redhat.com> wrote:
> > >
> > > > On Tue, Dec 12, 2017 at 12:39:12PM +0100, Torsten Duwe wrote:
> > > > > Hi all,
> > > > >
> > > > > The "Power Architecture 64-Bit ELF V2 ABI" says in section 2.3.2.3:
> > > > >
> > > > > [...] There are several rules that must be adhered to in order to ensure
> > > > > reliable and consistent call chain backtracing:
> > > > >
> > > > > * Before a function calls any other function, it shall establish its
> > > > > own stack frame, whose size shall be a multiple of 16 bytes.
> > > >
> > > > What about leaf functions? If a leaf function doesn't establish a stack
> > > > frame, and it has inline asm which contains a blr to another function,
> > > > this ABI is broken.
> >
> > Oops, I meant to say "bl" instead of "blr".
> >
> > > > Also, even for non-leaf functions, is it possible for GCC to insert the
> > > > inline asm before it sets up the stack frame? (This is an occasional
> > > > problem on x86.)
> > >
> > > Inline asm must not have control transfer out of the statement unless
> > > it is asm goto.
> >
> > Can inline asm have calls to other functions?
>
> I don't believe so.
It's allowed on x86, I don't see why it wouldn't be allowed on powerpc.
As you mentioned, GCC doesn't pay attention to what's inside asm("").
> > > > Also, what about hand-coded asm?
> > >
> > > Should follow the same rules if it uses the stack.
> >
> > How is that enforced?
>
> It's not, AFAIK. Gcc doesn't understand what's inside asm("").
Here I was talking about .S files.
> > > > > To me this sounds like the equivalent of HAVE_RELIABLE_STACKTRACE.
> > > > > This patch may be unneccessarily limited to ppc64le, but OTOH the only
> > > > > user of this flag so far is livepatching, which is only implemented on
> > > > > PPCs with 64-LE, a.k.a. ELF ABI v2.
> > > >
> > > > In addition to fixing the above issues, the unwinder also needs to
> > > > detect interrupts (i.e., preemption) and page faults on the stack of a
> > > > blocked task. If a function were preempted before it created a stack
> > > > frame, or if a leaf function blocked on a page fault, the stack trace
> > > > will skip the function's caller, so such a trace will need to be
> > > > reported to livepatch as unreliable.
> > >
> > > I don't think there is much problem there for powerpc. Stack frame
> > > creation and function call with return pointer are each atomic.
> >
> > What if the function is interrupted before it creates the stack frame?
> >
>
> Then there will be no stack frame, but you still get the caller address
> because it's saved in LR register as part of the function call. Then
> you get the caller's caller in its stack frame.
Ok. So what about the interrupted function itself? Looking at the
powerpc version of save_context_stack(), it doesn't do anything special
for exception frames like checking regs->nip.
Though it looks like that should be possible since show_stack() has a
way to identify exception frames.
--
Josh
^ permalink raw reply
* Re: [PATCH v9 29/51] mm/mprotect, powerpc/mm/pkeys, x86/mm/pkeys: Add sysfs interface
From: Dave Hansen @ 2017-12-18 18:54 UTC (permalink / raw)
To: Ram Pai, mpe, mingo, akpm, corbet, arnd
Cc: linuxppc-dev, linux-mm, x86, linux-arch, linux-doc,
linux-kselftest, linux-kernel, benh, paulus, khandual,
aneesh.kumar, bsingharora, hbabu, mhocko, bauerman, ebiederm
In-Reply-To: <1509958663-18737-30-git-send-email-linuxram@us.ibm.com>
On 11/06/2017 12:57 AM, Ram Pai wrote:
> Expose useful information for programs using memory protection keys.
> Provide implementation for powerpc and x86.
>
> On a powerpc system with pkeys support, here is what is shown:
>
> $ head /sys/kernel/mm/protection_keys/*
> ==> /sys/kernel/mm/protection_keys/disable_access_supported <==
> true
This is cute, but I don't think it should be part of the ABI. Put it in
debugfs if you want it for cute tests. The stuff that this tells you
can and should come from pkey_alloc() for the ABI.
http://man7.org/linux/man-pages/man7/pkeys.7.html
> Any application wanting to use protection keys needs to be able to
> function without them. They might be unavailable because the
> hardware that the application runs on does not support them, the
> kernel code does not contain support, the kernel support has been
> disabled, or because the keys have all been allocated, perhaps by a
> library the application is using. It is recommended that
> applications wanting to use protection keys should simply call
> pkey_alloc(2) and test whether the call succeeds, instead of
> attempting to detect support for the feature in any other way.
Do you really not have standard way on ppc to say whether hardware
features are supported by the kernel? For instance, how do you know if
a given set of registers are known to and are being context-switched by
the kernel?
^ permalink raw reply
* Re: [PATCH v1 2/7] powerpc/kernel: Add uevents in EEH error/resume
From: Bryant G. Ly @ 2017-12-18 18:45 UTC (permalink / raw)
To: Alexey Kardashevskiy, benh, paulus, mpe
Cc: seroyer, jjalvare, alex.williamson, helgaas, ruscur, linux-pci,
linuxppc-dev, bodong, eli, saeedm
In-Reply-To: <79cea2a4-510d-37b5-0892-c87ffd0221b4@ozlabs.ru>
On 12/17/17 9:54 PM, Alexey Kardashevskiy wrote:
> On 14/12/17 02:32, Bryant G. Ly wrote:
>> Devices can go offline when EEH is reported. This patch adds
>> a change to the kernel object and lets udev know of error.
>> When device resumes a change is also set reporting device as
>> online. Therefore, EEH events are better propagated to user
>> space for devices in powerpc arch.
>>
>> Signed-off-by: Bryant G. Ly <bryantly@linux.vnet.ibm.com>
>> Signed-off-by: Juan J. Alvarez <jjalvare@linux.vnet.ibm.com>
>> ---
>> arch/powerpc/kernel/eeh_driver.c | 5 ++++-
>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/arch/powerpc/kernel/eeh_driver.c b/arch/powerpc/kernel/eeh_driver.c
>> index 3c0fa99c5533..c61bf770282b 100644
>> --- a/arch/powerpc/kernel/eeh_driver.c
>> +++ b/arch/powerpc/kernel/eeh_driver.c
>> @@ -204,6 +204,7 @@ static void *eeh_report_error(void *data, void *userdata)
>> struct pci_dev *dev = eeh_dev_to_pci_dev(edev);
>> enum pci_ers_result rc, *res = userdata;
>> struct pci_driver *driver;
>> + char *envp[] = {"EVENT=EEH_ERROR", "ONLINE=0", NULL};
> scripts/checkpatch.pl:
>
> WARNING: char * array declaration might be better as static const
> #27: FILE: arch/powerpc/kernel/eeh_driver.c:207:
> + char *envp[] = {"EVENT=EEH_ERROR", "ONLINE=0", NULL};
>
>
>
>>
>> if (!dev || eeh_dev_removed(edev) || eeh_pe_passed(edev->pe))
>> return NULL;
>> @@ -228,6 +229,7 @@ static void *eeh_report_error(void *data, void *userdata)
>>
>> edev->in_error = true;
>> eeh_pcid_put(dev);
>> + kobject_uevent_env(&dev->dev.kobj, KOBJ_CHANGE, envp);
>> return NULL;
>> }
>>
>> @@ -358,6 +360,7 @@ static void *eeh_report_resume(void *data, void *userdata)
>> struct pci_dev *dev = eeh_dev_to_pci_dev(edev);
>> bool was_in_error;
>> struct pci_driver *driver;
>> + char *envp[] = {"EVENT=EEH_RESUME", "ONLINE=1", NULL};
>
> WARNING: char * array declaration might be better as static const
> #43: FILE: arch/powerpc/kernel/eeh_driver.c:363:
> + char *envp[] = {"EVENT=EEH_RESUME", "ONLINE=1", NULL};
>
>
>
Checkpatch is wrong it doesn't check the function that uses it, which only takes a char *
-Bryant
^ permalink raw reply
* Re: [PATCH 0/2] PS3: Adjustments for six function implementations
From: Geoff Levand @ 2017-12-18 18:32 UTC (permalink / raw)
To: SF Markus Elfring, linuxppc-dev, Benjamin Herrenschmidt,
Michael Ellerman, Paul Mackerras
Cc: LKML, kernel-janitors
In-Reply-To: <9b6464bc-a408-de2a-1b54-cb7794b92506@users.sourceforge.net>
Hi,
On 12/16/2017 05:50 AM, SF Markus Elfring wrote:
> Markus Elfring (2):
> Delete an error message for a failed memory allocation in two functions
> Improve a size determination in five functions
As I mentioned before, please keep your commit message subjects to
50 chars or less.
-Geoff
^ permalink raw reply
* Re: [trivial PATCH] treewide: Align function definition open/close braces
From: Rafael J. Wysocki @ 2017-12-18 18:19 UTC (permalink / raw)
To: Joe Perches
Cc: Jiri Kosina, Linus Torvalds, linux-kernel, linux-acpi, amd-gfx,
dri-devel, linux-media, MPT-FusionLinux.pdl, linux-scsi, netdev,
linux-wireless, acpi4asus-user, platform-driver-x86, linux-rtc,
linux-fsdevel, ocfs2-devel, linux-xfs, linux-audit, alsa-devel,
linuxppc-dev
In-Reply-To: <1513556924.31581.51.camel@perches.com>
On Monday, December 18, 2017 1:28:44 AM CET Joe Perches wrote:
> Some functions definitions have either the initial open brace and/or
> the closing brace outside of column 1.
>
> Move those braces to column 1.
>
> This allows various function analyzers like gnu complexity to work
> properly for these modified functions.
>
> Miscellanea:
>
> o Remove extra trailing ; and blank line from xfs_agf_verify
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> git diff -w shows no difference other than the above 'Miscellanea'
>
> (this is against -next, but it applies against Linus' tree
> with a couple offsets)
>
> arch/x86/include/asm/atomic64_32.h | 2 +-
> drivers/acpi/custom_method.c | 2 +-
> drivers/acpi/fan.c | 2 +-
> drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +-
> drivers/media/i2c/msp3400-kthreads.c | 2 +-
> drivers/message/fusion/mptsas.c | 2 +-
> drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c | 2 +-
> drivers/net/wireless/ath/ath9k/xmit.c | 2 +-
> drivers/platform/x86/eeepc-laptop.c | 2 +-
> drivers/rtc/rtc-ab-b5ze-s3.c | 2 +-
> drivers/scsi/dpt_i2o.c | 2 +-
> drivers/scsi/sym53c8xx_2/sym_glue.c | 2 +-
> fs/locks.c | 2 +-
> fs/ocfs2/stack_user.c | 2 +-
> fs/xfs/libxfs/xfs_alloc.c | 5 ++---
> fs/xfs/xfs_export.c | 2 +-
> kernel/audit.c | 6 +++---
> kernel/trace/trace_printk.c | 4 ++--
> lib/raid6/sse2.c | 14 +++++++-------
> sound/soc/fsl/fsl_dma.c | 2 +-
> 20 files changed, 30 insertions(+), 31 deletions(-)
>
> diff --git a/arch/x86/include/asm/atomic64_32.h b/arch/x86/include/asm/atomic64_32.h
> index 97c46b8169b7..d4d4883080fa 100644
> --- a/arch/x86/include/asm/atomic64_32.h
> +++ b/arch/x86/include/asm/atomic64_32.h
> @@ -122,7 +122,7 @@ static inline long long atomic64_read(const atomic64_t *v)
> long long r;
> alternative_atomic64(read, "=&A" (r), "c" (v) : "memory");
> return r;
> - }
> +}
>
> /**
> * atomic64_add_return - add and return
> diff --git a/drivers/acpi/custom_method.c b/drivers/acpi/custom_method.c
> index c68e72414a67..e967c1173ba3 100644
> --- a/drivers/acpi/custom_method.c
> +++ b/drivers/acpi/custom_method.c
> @@ -94,7 +94,7 @@ static void __exit acpi_custom_method_exit(void)
> {
> if (cm_dentry)
> debugfs_remove(cm_dentry);
> - }
> +}
>
> module_init(acpi_custom_method_init);
> module_exit(acpi_custom_method_exit);
> diff --git a/drivers/acpi/fan.c b/drivers/acpi/fan.c
> index 6cf4988206f2..3563103590c6 100644
> --- a/drivers/acpi/fan.c
> +++ b/drivers/acpi/fan.c
> @@ -219,7 +219,7 @@ fan_set_cur_state(struct thermal_cooling_device *cdev, unsigned long state)
> return fan_set_state_acpi4(device, state);
> else
> return fan_set_state(device, state);
> - }
> +}
>
> static const struct thermal_cooling_device_ops fan_cooling_ops = {
> .get_max_state = fan_get_max_state,
> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
> index d1488d5ee028..1e0d1e7c5324 100644
> --- a/drivers/gpu/drm/amd/display/dc/core/dc.c
> +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
> @@ -461,7 +461,7 @@ static void disable_dangling_plane(struct dc *dc, struct dc_state *context)
> ******************************************************************************/
>
> struct dc *dc_create(const struct dc_init_data *init_params)
> - {
> +{
> struct dc *dc = kzalloc(sizeof(*dc), GFP_KERNEL);
> unsigned int full_pipe_count;
>
> diff --git a/drivers/media/i2c/msp3400-kthreads.c b/drivers/media/i2c/msp3400-kthreads.c
> index 4dd01e9f553b..dc6cb8d475b3 100644
> --- a/drivers/media/i2c/msp3400-kthreads.c
> +++ b/drivers/media/i2c/msp3400-kthreads.c
> @@ -885,7 +885,7 @@ static int msp34xxg_modus(struct i2c_client *client)
> }
>
> static void msp34xxg_set_source(struct i2c_client *client, u16 reg, int in)
> - {
> +{
> struct msp_state *state = to_state(i2c_get_clientdata(client));
> int source, matrix;
>
> diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c
> index 345f6035599e..69a62d23514b 100644
> --- a/drivers/message/fusion/mptsas.c
> +++ b/drivers/message/fusion/mptsas.c
> @@ -2968,7 +2968,7 @@ mptsas_exp_repmanufacture_info(MPT_ADAPTER *ioc,
> mutex_unlock(&ioc->sas_mgmt.mutex);
> out:
> return ret;
> - }
> +}
>
> static void
> mptsas_parse_device_info(struct sas_identify *identify,
> diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c
> index 3dd973475125..0ea141ece19e 100644
> --- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c
> +++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c
> @@ -603,7 +603,7 @@ static struct uni_table_desc *nx_get_table_desc(const u8 *unirom, int section)
>
> static int
> netxen_nic_validate_header(struct netxen_adapter *adapter)
> - {
> +{
> const u8 *unirom = adapter->fw->data;
> struct uni_table_desc *directory = (struct uni_table_desc *) &unirom[0];
> u32 fw_file_size = adapter->fw->size;
> diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
> index bd438062a6db..baedc7186b10 100644
> --- a/drivers/net/wireless/ath/ath9k/xmit.c
> +++ b/drivers/net/wireless/ath/ath9k/xmit.c
> @@ -196,7 +196,7 @@ ath_tid_pull(struct ath_atx_tid *tid)
> }
>
> return skb;
> - }
> +}
>
> static struct sk_buff *ath_tid_dequeue(struct ath_atx_tid *tid)
> {
> diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c
> index 5a681962899c..4c38904a8a32 100644
> --- a/drivers/platform/x86/eeepc-laptop.c
> +++ b/drivers/platform/x86/eeepc-laptop.c
> @@ -492,7 +492,7 @@ static void eeepc_platform_exit(struct eeepc_laptop *eeepc)
> * potentially bad time, such as a timer interrupt.
> */
> static void tpd_led_update(struct work_struct *work)
> - {
> +{
> struct eeepc_laptop *eeepc;
>
> eeepc = container_of(work, struct eeepc_laptop, tpd_led_work);
> diff --git a/drivers/rtc/rtc-ab-b5ze-s3.c b/drivers/rtc/rtc-ab-b5ze-s3.c
> index a319bf1e49de..ef5c16dfabfa 100644
> --- a/drivers/rtc/rtc-ab-b5ze-s3.c
> +++ b/drivers/rtc/rtc-ab-b5ze-s3.c
> @@ -648,7 +648,7 @@ static int abb5zes3_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alarm)
> ret);
>
> return ret;
> - }
> +}
>
> /* Enable or disable battery low irq generation */
> static inline int _abb5zes3_rtc_battery_low_irq_enable(struct regmap *regmap,
> diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c
> index fd172b0890d3..a00d822e3142 100644
> --- a/drivers/scsi/dpt_i2o.c
> +++ b/drivers/scsi/dpt_i2o.c
> @@ -3524,7 +3524,7 @@ static int adpt_i2o_systab_send(adpt_hba* pHba)
> #endif
>
> return ret;
> - }
> +}
>
>
> /*============================================================================
> diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c
> index 791a2182de53..7320d5fe4cbc 100644
> --- a/drivers/scsi/sym53c8xx_2/sym_glue.c
> +++ b/drivers/scsi/sym53c8xx_2/sym_glue.c
> @@ -1393,7 +1393,7 @@ static struct Scsi_Host *sym_attach(struct scsi_host_template *tpnt, int unit,
> scsi_host_put(shost);
>
> return NULL;
> - }
> +}
>
>
> /*
> diff --git a/fs/locks.c b/fs/locks.c
> index 21b4dfa289ee..d2399d001afe 100644
> --- a/fs/locks.c
> +++ b/fs/locks.c
> @@ -559,7 +559,7 @@ static const struct lock_manager_operations lease_manager_ops = {
> * Initialize a lease, use the default lock manager operations
> */
> static int lease_init(struct file *filp, long type, struct file_lock *fl)
> - {
> +{
> if (assign_type(fl, type) != 0)
> return -EINVAL;
>
> diff --git a/fs/ocfs2/stack_user.c b/fs/ocfs2/stack_user.c
> index dae9eb7c441e..d2fb97b173da 100644
> --- a/fs/ocfs2/stack_user.c
> +++ b/fs/ocfs2/stack_user.c
> @@ -398,7 +398,7 @@ static int ocfs2_control_do_setnode_msg(struct file *file,
>
> static int ocfs2_control_do_setversion_msg(struct file *file,
> struct ocfs2_control_message_setv *msg)
> - {
> +{
> long major, minor;
> char *ptr = NULL;
> struct ocfs2_control_private *p = file->private_data;
> diff --git a/fs/xfs/libxfs/xfs_alloc.c b/fs/xfs/libxfs/xfs_alloc.c
> index 0da80019a917..217108f765d5 100644
> --- a/fs/xfs/libxfs/xfs_alloc.c
> +++ b/fs/xfs/libxfs/xfs_alloc.c
> @@ -2401,7 +2401,7 @@ static bool
> xfs_agf_verify(
> struct xfs_mount *mp,
> struct xfs_buf *bp)
> - {
> +{
> struct xfs_agf *agf = XFS_BUF_TO_AGF(bp);
>
> if (xfs_sb_version_hascrc(&mp->m_sb)) {
> @@ -2449,8 +2449,7 @@ xfs_agf_verify(
> be32_to_cpu(agf->agf_refcount_level) > XFS_BTREE_MAXLEVELS))
> return false;
>
> - return true;;
> -
> + return true;
> }
>
> static void
> diff --git a/fs/xfs/xfs_export.c b/fs/xfs/xfs_export.c
> index fe1bfee35898..7d5c355d78b5 100644
> --- a/fs/xfs/xfs_export.c
> +++ b/fs/xfs/xfs_export.c
> @@ -122,7 +122,7 @@ xfs_nfs_get_inode(
> struct super_block *sb,
> u64 ino,
> u32 generation)
> - {
> +{
> xfs_mount_t *mp = XFS_M(sb);
> xfs_inode_t *ip;
> int error;
> diff --git a/kernel/audit.c b/kernel/audit.c
> index 227db99b0f19..d97e8f0f73ca 100644
> --- a/kernel/audit.c
> +++ b/kernel/audit.c
> @@ -443,15 +443,15 @@ static int audit_set_failure(u32 state)
> * Drop any references inside the auditd connection tracking struct and free
> * the memory.
> */
> - static void auditd_conn_free(struct rcu_head *rcu)
> - {
> +static void auditd_conn_free(struct rcu_head *rcu)
> +{
> struct auditd_connection *ac;
>
> ac = container_of(rcu, struct auditd_connection, rcu);
> put_pid(ac->pid);
> put_net(ac->net);
> kfree(ac);
> - }
> +}
>
> /**
> * auditd_set - Set/Reset the auditd connection state
> diff --git a/kernel/trace/trace_printk.c b/kernel/trace/trace_printk.c
> index ad1d6164e946..50f44b7b2b32 100644
> --- a/kernel/trace/trace_printk.c
> +++ b/kernel/trace/trace_printk.c
> @@ -196,7 +196,7 @@ struct notifier_block module_trace_bprintk_format_nb = {
> };
>
> int __trace_bprintk(unsigned long ip, const char *fmt, ...)
> - {
> +{
> int ret;
> va_list ap;
>
> @@ -214,7 +214,7 @@ int __trace_bprintk(unsigned long ip, const char *fmt, ...)
> EXPORT_SYMBOL_GPL(__trace_bprintk);
>
> int __ftrace_vbprintk(unsigned long ip, const char *fmt, va_list ap)
> - {
> +{
> if (unlikely(!fmt))
> return 0;
>
> diff --git a/lib/raid6/sse2.c b/lib/raid6/sse2.c
> index 1d2276b007ee..8191e1d0d2fb 100644
> --- a/lib/raid6/sse2.c
> +++ b/lib/raid6/sse2.c
> @@ -91,7 +91,7 @@ static void raid6_sse21_gen_syndrome(int disks, size_t bytes, void **ptrs)
>
> static void raid6_sse21_xor_syndrome(int disks, int start, int stop,
> size_t bytes, void **ptrs)
> - {
> +{
> u8 **dptr = (u8 **)ptrs;
> u8 *p, *q;
> int d, z, z0;
> @@ -200,9 +200,9 @@ static void raid6_sse22_gen_syndrome(int disks, size_t bytes, void **ptrs)
> kernel_fpu_end();
> }
>
> - static void raid6_sse22_xor_syndrome(int disks, int start, int stop,
> +static void raid6_sse22_xor_syndrome(int disks, int start, int stop,
> size_t bytes, void **ptrs)
> - {
> +{
> u8 **dptr = (u8 **)ptrs;
> u8 *p, *q;
> int d, z, z0;
> @@ -265,7 +265,7 @@ static void raid6_sse22_gen_syndrome(int disks, size_t bytes, void **ptrs)
>
> asm volatile("sfence" : : : "memory");
> kernel_fpu_end();
> - }
> +}
>
> const struct raid6_calls raid6_sse2x2 = {
> raid6_sse22_gen_syndrome,
> @@ -366,9 +366,9 @@ static void raid6_sse24_gen_syndrome(int disks, size_t bytes, void **ptrs)
> kernel_fpu_end();
> }
>
> - static void raid6_sse24_xor_syndrome(int disks, int start, int stop,
> +static void raid6_sse24_xor_syndrome(int disks, int start, int stop,
> size_t bytes, void **ptrs)
> - {
> +{
> u8 **dptr = (u8 **)ptrs;
> u8 *p, *q;
> int d, z, z0;
> @@ -471,7 +471,7 @@ static void raid6_sse24_gen_syndrome(int disks, size_t bytes, void **ptrs)
> }
> asm volatile("sfence" : : : "memory");
> kernel_fpu_end();
> - }
> +}
>
>
> const struct raid6_calls raid6_sse2x4 = {
> diff --git a/sound/soc/fsl/fsl_dma.c b/sound/soc/fsl/fsl_dma.c
> index 0c11f434a374..ec619f51d336 100644
> --- a/sound/soc/fsl/fsl_dma.c
> +++ b/sound/soc/fsl/fsl_dma.c
> @@ -879,7 +879,7 @@ static const struct snd_pcm_ops fsl_dma_ops = {
> };
>
> static int fsl_soc_dma_probe(struct platform_device *pdev)
> - {
> +{
> struct dma_object *dma;
> struct device_node *np = pdev->dev.of_node;
> struct device_node *ssi_np;
>
> --
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
for the ACPI part.
Thanks!
^ permalink raw reply
* Re: [PATCH 2/2] ps3: Improve a size determination in five functions
From: Geoff Levand @ 2017-12-18 18:22 UTC (permalink / raw)
To: SF Markus Elfring, linuxppc-dev, Benjamin Herrenschmidt,
Michael Ellerman, Paul Mackerras
Cc: LKML, kernel-janitors
In-Reply-To: <7aed1208-aa55-edb6-54be-f47fb1498bfd@users.sourceforge.net>
Hi,
On 12/16/2017 05:54 AM, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Sat, 16 Dec 2017 14:21:04 +0100
>
> Replace the specification of data structures by variable references
> as the parameter for the operator "sizeof" to make the corresponding size
> determination a bit safer according to the Linux coding style convention.
This would be OK, but you are also removing empty lines and changing
the coding format.
Please update the patch to only make the sizeof changes.
-Geoff
^ permalink raw reply
* Re: [PATCH 1/2] ps3: Delete an error message for a failed memory allocation in two functions
From: Geoff Levand @ 2017-12-18 18:22 UTC (permalink / raw)
To: SF Markus Elfring, linuxppc-dev, Benjamin Herrenschmidt,
Michael Ellerman, Paul Mackerras
Cc: LKML, kernel-janitors
In-Reply-To: <58807b28-b2b9-7e77-11b8-21db43c9d5ba@users.sourceforge.net>
On 12/16/2017 05:51 AM, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Sat, 16 Dec 2017 12:32:42 +0100
>
> Omit an extra message for a memory allocation failure in these functions.
This is OK, I'll add it to my ps3-queue branch.
-Geoff
^ permalink raw reply
* Re: [PATCH] Fix parse_args cycle limit check.
From: Randy Dunlap @ 2017-12-18 17:57 UTC (permalink / raw)
To: Michal Suchánek
Cc: Hari Bathini, linuxppc-dev, Andrew Morton, Ankit Kumar, lkml,
Mahesh J Salgaonkar
In-Reply-To: <20171218183413.53358649@kitsune.suse.cz>
On 12/18/2017 09:34 AM, Michal Suchánek wrote:
> On Fri, 15 Dec 2017 15:49:09 -0800
> Randy Dunlap <rdunlap@infradead.org> wrote:
>
>> On 12/15/2017 01:41 PM, Michal Suchanek wrote:
>>> Actually args are supposed to be renamed to next so both and args
>>> hold the previous argument so both can be passed to the callback.
>>> This additionla patch
>>
>> additional
>>
>>> should fix up the rename.
>>
>> Would you try rewriting the first sentence, please? I don't get it.
>
> Ok, I guess this should be clarified. For the original patch and the
> fixup squashed together this is what the patch is supposed to do:
>
> This patch adds variable for tracking the parameter which is currently
> being processed. There is "args" variable which tracks the parameter
> which will be processed next so this patch adds "next" variable to
> track that and uses "args" to track the current argument.
OK, thanks.
--
~Randy
^ permalink raw reply
* Re: [PATCH] Fix parse_args cycle limit check.
From: Michal Suchánek @ 2017-12-18 17:34 UTC (permalink / raw)
To: Randy Dunlap
Cc: Hari Bathini, linuxppc-dev, Andrew Morton, Ankit Kumar, lkml,
Mahesh J Salgaonkar
In-Reply-To: <12296c9b-d215-20d4-843e-4c9c9c06f0be@infradead.org>
On Fri, 15 Dec 2017 15:49:09 -0800
Randy Dunlap <rdunlap@infradead.org> wrote:
> On 12/15/2017 01:41 PM, Michal Suchanek wrote:
> > Actually args are supposed to be renamed to next so both and args
> > hold the previous argument so both can be passed to the callback.
> > This additionla patch
>
> additional
>
> > should fix up the rename.
>
> Would you try rewriting the first sentence, please? I don't get it.
Ok, I guess this should be clarified. For the original patch and the
fixup squashed together this is what the patch is supposed to do:
This patch adds variable for tracking the parameter which is currently
being processed. There is "args" variable which tracks the parameter
which will be processed next so this patch adds "next" variable to
track that and uses "args" to track the current argument.
Thanks
Michal
^ permalink raw reply
* Re: Mac Mini G4 defconfig ?
From: Doug Anderson @ 2017-12-18 17:20 UTC (permalink / raw)
To: Mathieu Malaterre; +Cc: linuxppc-dev, Masahiro Yamada
In-Reply-To: <CA+7wUszdpmbScwEkAKSLjDFV5ufJToECxuoJ1tPyA15hG+H+kw@mail.gmail.com>
Hi,
On Sun, Dec 17, 2017 at 2:54 AM, Mathieu Malaterre <malat@debian.org> wrote:
> On Fri, Dec 15, 2017 at 10:01 PM, Mathieu Malaterre <malat@debian.org> wrote:
>> On Fri, Dec 15, 2017 at 9:52 PM, Mathieu Malaterre <malat@debian.org> wrote:
>>> On Fri, Dec 15, 2017 at 8:50 PM, Mathieu Malaterre <malat@debian.org> wrote:
>>>> Hi there,
>>>>
>>>> Does anyone has working defconfig for a Mac Mini G4 ?
>>>>
>>>> Here is what I tried:
>>>>
>>>> $ cat ./arch/powerpc/configs/g4_defconfig
>>>> CONFIG_PPC_FPU=y
>>>> CONFIG_ALTIVEC=y
>>>> $ make ARCH=powerpc g4_defconfig
>>>> $ make -j8 ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- V=1
>>>> set -e; : ' CHK include/config/kernel.release'; mkdir -p
>>>
>>> That is odd. Doing a quick git bisect:
>>>
>>> $ git checkout 3298b690b21cdbe6b2ae8076d9147027f396f2b1
>>> $ make -n ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- -f ./Makefile
>>> silentoldconfig V=1
>>> + make -n ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- -f ./Makefile
>>> silentoldconfig V=1
>>> /bin/sh: line 0: [: -ge: unary operator expected
>>> make -f ./scripts/Makefile.build obj=scripts/basic
>>>
>>> I cannot make sense of this shell error, maybe this is unrelated but
>>> things start breaking around this commit.
>>
>> Even if I discard this shell error, the next error comes with:
>>
>> 433dc2ebe7d17dd21cba7ad5c362d37323592236 is the first bad commit
>>
>> With:
>>
>> $ make ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- V=1
>> [...]
>> powerpc-linux-gnu-gcc -Wp,-MD,kernel/.bounds.s.d -nostdinc -isystem
>> -I./arch/powerpc/include -I./arch/powerpc/include/generated
>> -I./include -I./arch/powerpc/include/uapi
>> -I./arch/powerpc/include/generated/uapi -I./include/uapi
>> -I./include/generated/uapi -include ./include/linux/kconfig.h
>> -D__KERNEL__ -Iarch/powerpc -Wall -Wundef -Wstrict-prototypes
>> -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar
>> -Werror-implicit-function-declaration -Wno-format-security -std=gnu89
>> -pipe -Iarch/powerpc -ffixed-r2 -mmultiple -mcpu=powerpc -Wa,-maltivec
>> -mbig-endian -fno-delete-null-pointer-checks -Wno-frame-address -O2
>> -Wno-maybe-uninitialized --param=allow-store-data-races=0
>> -DCC_HAVE_ASM_GOTO -Wframe-larger-than=1024 -fno-stack-protector
>> -Wno-unused-but-set-variable -Wno-unused-const-variable
>> -fomit-frame-pointer -fno-var-tracking-assignments
>> -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow
>> -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes
>> -Werror=date-time -Werror=incompatible-pointer-types
>> -Werror=designated-init -DKBUILD_BASENAME='"bounds"'
>> -DKBUILD_MODNAME='"bounds"' -fverbose-asm -S -o kernel/bounds.s
>> kernel/bounds.c
>> In file included from ./include/linux/page-flags.h:9:0,
>> from kernel/bounds.c:9:
>> ./include/linux/bug.h:4:21: fatal error: asm/bug.h: No such file or directory
>> #include <asm/bug.h>
>> ^
>> compilation terminated.
>> Kbuild:20: recipe for target 'kernel/bounds.s' failed
>> make[1]: *** [kernel/bounds.s] Error 1
>> Makefile:1051: recipe for target 'prepare0' failed
>> make: *** [prepare0] Error 2
>>
>>
>> Comments ?
>
> Solution is:
>
> $ rm .cache.mk
>
> I guess the cache was not cleared in between my different kernel compilations.
>
> Sorry for the noise
Looks like others are hitting this too and it seems like we'll need to
come up with a solution that avoids this (or at least makes it somehow
clear that a make clean will fix it). See the thread at
<https://lkml.org/lkml/2017/12/16/315>.
-Doug
^ permalink raw reply
* Re: [PATCH 09/13] ocxl: Add trace points
From: Philippe Ombredanne @ 2017-12-18 16:48 UTC (permalink / raw)
To: Frederic Barrat
Cc: linuxppc-dev, LKML, Arnd Bergmann, Greg Kroah-Hartman, mpe,
andrew.donnellan, alastair
In-Reply-To: <7a59e8575bcb8c2de4a68be688fb2a4d0699d61b.1513608243.git.fbarrat@linux.vnet.ibm.com>
Frederic,
On Mon, Dec 18, 2017 at 4:21 PM, Frederic Barrat
<fbarrat@linux.vnet.ibm.com> wrote:
> Define a few trace points so that we can use the standard tracing
> mechanism for debug and/or monitoring.
>
> Signed-off-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
<snip>
> --- /dev/null
> +++ b/drivers/misc/ocxl/trace.h
> @@ -0,0 +1,189 @@
> +/*
> + * Copyright 2017 IBM Corp.
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License
> + * as published by the Free Software Foundation; either version
> + * 2 of the License, or (at your option) any later version.
> + */
Would you mind using the new SPDX tags documented in Thomas patch set
[1] rather than this legalese?
Thank you!
[1] https://lkml.org/lkml/2017/12/4/934
--
Cordially
Philippe Ombredanne
^ permalink raw reply
* Re: [PATCH 13/13] ocxl: add MAINTAINERS entry
From: Joe Perches @ 2017-12-18 16:04 UTC (permalink / raw)
To: Frederic Barrat, linuxppc-dev, linux-kernel
Cc: arnd, gregkh, mpe, andrew.donnellan, alastair
In-Reply-To: <44bdca7f352748a658840889d6e6f52561b4a987.1513608243.git.fbarrat@linux.vnet.ibm.com>
On Mon, 2017-12-18 at 16:21 +0100, Frederic Barrat wrote:
> Signed-off-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
> Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
> ---
> MAINTAINERS | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index a6e86e20761e..edc9e1db352b 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -3919,6 +3919,18 @@ F: drivers/scsi/cxlflash/
> F: include/uapi/scsi/cxlflash_ioctls.h
> F: Documentation/powerpc/cxlflash.txt
>
> +OCXL (Open Coherent Accelerator Processor Interface OpenCAPI) DRIVER
> +M: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
> +M: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
> +L: linuxppc-dev@lists.ozlabs.org
> +S: Supported
> +F: arch/powerpc/platforms/powernv/ocxl.c
> +F: arch/powerpc/include/asm/pnv-ocxl.h
> +F: drivers/misc/ocxl/
> +F: include/misc/ocxl*
> +F: include/uapi/misc/ocxl.h
> +F: Documentation/accelerators/ocxl.txt
> +
Alphabetic ordering by section header please...
Maybe CXL - OCXL ...
> CYBERPRO FB DRIVER
> M: Russell King <linux@armlinux.org.uk>
> L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
^ permalink raw reply
* [PATCH 13/13] ocxl: add MAINTAINERS entry
From: Frederic Barrat @ 2017-12-18 15:21 UTC (permalink / raw)
To: linuxppc-dev, linux-kernel; +Cc: arnd, gregkh, mpe, andrew.donnellan, alastair
In-Reply-To: <cover.1513608243.git.fbarrat@linux.vnet.ibm.com>
Signed-off-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
---
MAINTAINERS | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index a6e86e20761e..edc9e1db352b 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3919,6 +3919,18 @@ F: drivers/scsi/cxlflash/
F: include/uapi/scsi/cxlflash_ioctls.h
F: Documentation/powerpc/cxlflash.txt
+OCXL (Open Coherent Accelerator Processor Interface OpenCAPI) DRIVER
+M: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
+M: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
+L: linuxppc-dev@lists.ozlabs.org
+S: Supported
+F: arch/powerpc/platforms/powernv/ocxl.c
+F: arch/powerpc/include/asm/pnv-ocxl.h
+F: drivers/misc/ocxl/
+F: include/misc/ocxl*
+F: include/uapi/misc/ocxl.h
+F: Documentation/accelerators/ocxl.txt
+
CYBERPRO FB DRIVER
M: Russell King <linux@armlinux.org.uk>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
--
2.14.1
^ permalink raw reply related
* [PATCH 12/13] ocxl: Documentation
From: Frederic Barrat @ 2017-12-18 15:21 UTC (permalink / raw)
To: linuxppc-dev, linux-kernel; +Cc: arnd, gregkh, mpe, andrew.donnellan, alastair
In-Reply-To: <cover.1513608243.git.fbarrat@linux.vnet.ibm.com>
ocxl.rst gives a quick, high-level view of opencapi.
Update ioctl-number.txt to reflect ioctl numbers being used by the
ocxl driver
Signed-off-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
---
Documentation/accelerators/ocxl.rst | 151 +++++++++++++++++++++++++++++++++++
Documentation/ioctl/ioctl-number.txt | 1 +
2 files changed, 152 insertions(+)
create mode 100644 Documentation/accelerators/ocxl.rst
diff --git a/Documentation/accelerators/ocxl.rst b/Documentation/accelerators/ocxl.rst
new file mode 100644
index 000000000000..94ccd55f2acd
--- /dev/null
+++ b/Documentation/accelerators/ocxl.rst
@@ -0,0 +1,151 @@
+========================================================
+OpenCAPI (Open Coherent Accelerator Processor Interface)
+========================================================
+
+OpenCAPI is an interface between processors and accelerators. It aims
+at being low-latency and high-bandwidth. The specification is
+developed by the `OpenCAPI Consortium <http://opencapi.org/>`_.
+
+It allows an accelerator (which could be a FPGA, ASICs, ...) to access
+the host memory coherently, using virtual addresses. An OpenCAPI
+device can also host its own memory, that can be accessed from the
+host.
+
+OpenCAPI is known in linux as 'ocxl', as the open, processor-agnostic
+evolution of 'cxl' (the driver for the IBM CAPI interface for
+powerpc), which was named that way to avoid confusion with the ISDN
+CAPI subsystem.
+
+
+High-level view
+===============
+
+OpenCAPI defines a Data Link Layer (DL) and Transaction Layer (TL), to
+be implemented on top of a physical link. Any processor or device
+implementing the DL and TL can start sharing memory.
+
+::
+
+ +-----------+ +-------------+
+ | | | |
+ | | | Accelerated |
+ | Processor | | Function |
+ | | +--------+ | Unit | +--------+
+ | |--| Memory | | (AFU) |--| Memory |
+ | | +--------+ | | +--------+
+ +-----------+ +-------------+
+ | |
+ +-----------+ +-------------+
+ | TL | | TLX |
+ +-----------+ +-------------+
+ | |
+ +-----------+ +-------------+
+ | DL | | DLX |
+ +-----------+ +-------------+
+ | |
+ | PHY |
+ +---------------------------------------+
+
+
+
+Device discovery
+================
+
+OpenCAPI relies on a PCI-like configuration space, implemented on the
+device. So the host can discover AFUs by querying the config space.
+
+OpenCAPI devices in Linux are treated like PCI devices (with a few
+caveats). The firmware is expected to abstract the hardware as if it
+was a PCI link. A lot of the existing PCI infrastructure is reused:
+devices are scanned and BARs are assigned during the standard PCI
+enumeration. Commands like 'lspci' can therefore be used to see what
+devices are available.
+
+The configuration space defines the AFU(s) that can be found on the
+physical adapter, such as its name, how many memory contexts it can
+work with, the size of its MMIO areas, ...
+
+
+
+MMIO
+====
+
+OpenCAPI defines two MMIO areas for each AFU:
+
+* the global MMIO area, with registers pertinent to the whole AFU.
+* a per-process MMIO area, which has a fixed size for each context.
+
+
+
+AFU interrupts
+==============
+
+OpenCAPI includes the possibility for an AFU to send an interrupt to a
+host process. It is done through a 'intrp_req' defined in the
+Transaction Layer, specifying a 64-bit object handle which defines the
+interrupt.
+
+The driver allows a process to allocate an interrupt and obtain its
+64-bit object handle, that can be passed to the AFU.
+
+
+
+char devices
+============
+
+The driver creates one char device per AFU found on the physical
+device. A physical device may have multiple functions and each
+function can have multiple AFUs. At the time of this writing though,
+it has only been tested with devices exporting only one AFU.
+
+Char devices can be found in /dev/ocxl/ and are named as:
+/dev/ocxl/<AFU name>.<location>.<index>
+
+where <AFU name> is a max 20-character long name, as found in the
+config space of the AFU.
+<location> is added by the driver and can help distinguish devices
+when a system has more than one instance of the same OpenCAPI device.
+<index> is also to help distinguish AFUs in the unlikely case where a
+device carries multiple copies of the same AFU.
+
+
+
+User API
+========
+
+open
+----
+
+Based on the AFU definition found in the config space, an AFU may
+support working with more than one memory context, in which case the
+associated char device may be opened multiple times by different
+processes.
+
+
+ioctl
+-----
+
+OCXL_IOCTL_ATTACH:
+
+ Attach the memory context of the calling process to the AFU so that
+ the AFU can access its memory.
+
+OCXL_IOCTL_IRQ_ALLOC:
+
+ Allocate an AFU interrupt and return an identifier.
+
+OCXL_IOCTL_IRQ_FREE:
+
+ Free a previously allocated AFU interrupt.
+
+OCXL_IOCTL_IRQ_SET_FD:
+
+ Associate an event fd to an AFU interrupt so that the user process
+ can be notified when the AFU sends an interrupt.
+
+
+mmap
+----
+
+A process can mmap the per-process MMIO area for interactions with the
+AFU.
diff --git a/Documentation/ioctl/ioctl-number.txt b/Documentation/ioctl/ioctl-number.txt
index 3e3fdae5f3ed..6501389d55b9 100644
--- a/Documentation/ioctl/ioctl-number.txt
+++ b/Documentation/ioctl/ioctl-number.txt
@@ -326,6 +326,7 @@ Code Seq#(hex) Include File Comments
0xB5 00-0F uapi/linux/rpmsg.h <mailto:linux-remoteproc@vger.kernel.org>
0xC0 00-0F linux/usb/iowarrior.h
0xCA 00-0F uapi/misc/cxl.h
+0xCA 10-2F uapi/misc/ocxl.h
0xCA 80-BF uapi/scsi/cxlflash_ioctl.h
0xCB 00-1F CBM serial IEC bus in development:
<mailto:michael.klein@puffin.lb.shuttle.de>
--
2.14.1
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox