diff mbox

[RFC,v2,04/12] Move virtio_mmio.h to fix update-linux-headers.sh

Message ID 983a6cd6c33f273c0bcb7cb6632a8c23626d9fda.1487829585.git.sam.bobroff@au1.ibm.com
State New
Headers show

Commit Message

Sam Bobroff Feb. 23, 2017, 5:59 a.m. UTC
Currently, running update-linux-headers.sh will produce a patch that
deletes virtio_mmio.h, which is still needed. This happens because
virtio_mmio.h is in the directory used to store headers from the linux
kernel that are copied by the kernel's "make headers_install" target
(used by the update script) but it is not one of the files in that
set.

Fix this by moving that file into a new directory.

In the future if that file is added to the "headers_install" target
then this change should be reverted.

Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com>
---
v2:
* FWIW, here's one way of fixing it.

 hw/virtio/virtio-mmio.c                                          | 2 +-
 include/{standard-headers => kernel-headers}/linux/virtio_mmio.h | 0
 2 files changed, 1 insertion(+), 1 deletion(-)
 rename include/{standard-headers => kernel-headers}/linux/virtio_mmio.h (100%)

Comments

Michael S. Tsirkin Feb. 24, 2017, 4:40 p.m. UTC | #1
On Thu, Feb 23, 2017 at 04:59:57PM +1100, Sam Bobroff wrote:
> Currently, running update-linux-headers.sh will produce a patch that
> deletes virtio_mmio.h, which is still needed. This happens because
> virtio_mmio.h is in the directory used to store headers from the linux
> kernel that are copied by the kernel's "make headers_install" target
> (used by the update script) but it is not one of the files in that
> set.
> 
> Fix this by moving that file into a new directory.
> 
> In the future if that file is added to the "headers_install" target
> then this change should be reverted.
> 
> Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com>

This is a temporary condition. I'm merging a patch
exporting virtio_mmio.h for next linux and we'll
want to stay in sync, so I don't think we should make this
change.

> ---
> v2:
> * FWIW, here's one way of fixing it.
> 
>  hw/virtio/virtio-mmio.c                                          | 2 +-
>  include/{standard-headers => kernel-headers}/linux/virtio_mmio.h | 0
>  2 files changed, 1 insertion(+), 1 deletion(-)
>  rename include/{standard-headers => kernel-headers}/linux/virtio_mmio.h (100%)
> 
> diff --git a/hw/virtio/virtio-mmio.c b/hw/virtio/virtio-mmio.c
> index 5807aa87fe..cc6afa9da1 100644
> --- a/hw/virtio/virtio-mmio.c
> +++ b/hw/virtio/virtio-mmio.c
> @@ -20,7 +20,7 @@
>   */
>  
>  #include "qemu/osdep.h"
> -#include "standard-headers/linux/virtio_mmio.h"
> +#include "kernel-headers/linux/virtio_mmio.h"
>  #include "hw/sysbus.h"
>  #include "hw/virtio/virtio.h"
>  #include "qemu/host-utils.h"
> diff --git a/include/standard-headers/linux/virtio_mmio.h b/include/kernel-headers/linux/virtio_mmio.h
> similarity index 100%
> rename from include/standard-headers/linux/virtio_mmio.h
> rename to include/kernel-headers/linux/virtio_mmio.h
> -- 
> 2.11.0
>
Michael S. Tsirkin Feb. 24, 2017, 4:47 p.m. UTC | #2
On Thu, Feb 23, 2017 at 04:59:57PM +1100, Sam Bobroff wrote:
> Currently, running update-linux-headers.sh will produce a patch that
> deletes virtio_mmio.h, which is still needed. This happens because
> virtio_mmio.h is in the directory used to store headers from the linux
> kernel that are copied by the kernel's "make headers_install" target
> (used by the update script) but it is not one of the files in that
> set.
> 
> Fix this by moving that file into a new directory.
> 
> In the future if that file is added to the "headers_install" target
> then this change should be reverted.
> 
> Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com>

This is a temporary condition - I'm adding a patch exporting
this header for next linux. So I don't think we should merge this.

> ---
> v2:
> * FWIW, here's one way of fixing it.
> 
>  hw/virtio/virtio-mmio.c                                          | 2 +-
>  include/{standard-headers => kernel-headers}/linux/virtio_mmio.h | 0
>  2 files changed, 1 insertion(+), 1 deletion(-)
>  rename include/{standard-headers => kernel-headers}/linux/virtio_mmio.h (100%)
> 
> diff --git a/hw/virtio/virtio-mmio.c b/hw/virtio/virtio-mmio.c
> index 5807aa87fe..cc6afa9da1 100644
> --- a/hw/virtio/virtio-mmio.c
> +++ b/hw/virtio/virtio-mmio.c
> @@ -20,7 +20,7 @@
>   */
>  
>  #include "qemu/osdep.h"
> -#include "standard-headers/linux/virtio_mmio.h"
> +#include "kernel-headers/linux/virtio_mmio.h"
>  #include "hw/sysbus.h"
>  #include "hw/virtio/virtio.h"
>  #include "qemu/host-utils.h"
> diff --git a/include/standard-headers/linux/virtio_mmio.h b/include/kernel-headers/linux/virtio_mmio.h
> similarity index 100%
> rename from include/standard-headers/linux/virtio_mmio.h
> rename to include/kernel-headers/linux/virtio_mmio.h
> -- 
> 2.11.0
>
Sam Bobroff Feb. 28, 2017, 2:23 a.m. UTC | #3
On Fri, Feb 24, 2017 at 06:47:03PM +0200, Michael S. Tsirkin wrote:
> On Thu, Feb 23, 2017 at 04:59:57PM +1100, Sam Bobroff wrote:
> > Currently, running update-linux-headers.sh will produce a patch that
> > deletes virtio_mmio.h, which is still needed. This happens because
> > virtio_mmio.h is in the directory used to store headers from the linux
> > kernel that are copied by the kernel's "make headers_install" target
> > (used by the update script) but it is not one of the files in that
> > set.
> > 
> > Fix this by moving that file into a new directory.
> > 
> > In the future if that file is added to the "headers_install" target
> > then this change should be reverted.
> > 
> > Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com>
> 
> This is a temporary condition - I'm adding a patch exporting
> this header for next linux. So I don't think we should merge this.

Great :-)

I'll drop this patch from the next version.

Cheers,
Sam.

> > ---
> > v2:
> > * FWIW, here's one way of fixing it.
> > 
> >  hw/virtio/virtio-mmio.c                                          | 2 +-
> >  include/{standard-headers => kernel-headers}/linux/virtio_mmio.h | 0
> >  2 files changed, 1 insertion(+), 1 deletion(-)
> >  rename include/{standard-headers => kernel-headers}/linux/virtio_mmio.h (100%)
> > 
> > diff --git a/hw/virtio/virtio-mmio.c b/hw/virtio/virtio-mmio.c
> > index 5807aa87fe..cc6afa9da1 100644
> > --- a/hw/virtio/virtio-mmio.c
> > +++ b/hw/virtio/virtio-mmio.c
> > @@ -20,7 +20,7 @@
> >   */
> >  
> >  #include "qemu/osdep.h"
> > -#include "standard-headers/linux/virtio_mmio.h"
> > +#include "kernel-headers/linux/virtio_mmio.h"
> >  #include "hw/sysbus.h"
> >  #include "hw/virtio/virtio.h"
> >  #include "qemu/host-utils.h"
> > diff --git a/include/standard-headers/linux/virtio_mmio.h b/include/kernel-headers/linux/virtio_mmio.h
> > similarity index 100%
> > rename from include/standard-headers/linux/virtio_mmio.h
> > rename to include/kernel-headers/linux/virtio_mmio.h
> > -- 
> > 2.11.0
> >
diff mbox

Patch

diff --git a/hw/virtio/virtio-mmio.c b/hw/virtio/virtio-mmio.c
index 5807aa87fe..cc6afa9da1 100644
--- a/hw/virtio/virtio-mmio.c
+++ b/hw/virtio/virtio-mmio.c
@@ -20,7 +20,7 @@ 
  */
 
 #include "qemu/osdep.h"
-#include "standard-headers/linux/virtio_mmio.h"
+#include "kernel-headers/linux/virtio_mmio.h"
 #include "hw/sysbus.h"
 #include "hw/virtio/virtio.h"
 #include "qemu/host-utils.h"
diff --git a/include/standard-headers/linux/virtio_mmio.h b/include/kernel-headers/linux/virtio_mmio.h
similarity index 100%
rename from include/standard-headers/linux/virtio_mmio.h
rename to include/kernel-headers/linux/virtio_mmio.h